/**
 * WorkAdmissionPolicy — WP-07.
 *
 * Answers only: can this work be dispatched now?
 * Does not tell an Agent how to complete the task.
 */

export type WorkAdmissionDecisionKind =
  | "allow"
  | "hold"
  | "reject"
  | "needs_human";

export interface WorkAdmissionDecision {
  decision: WorkAdmissionDecisionKind;
  reason: string;
  evidence?: string[];
  extensions?: Record<string, unknown>;
}

/**
 * Base marker for admission inputs. Concrete policies extend with their fields.
 * Intentionally NOT `Record<string, unknown>` — that forces an index signature
 * and breaks concrete input interfaces (TS2344).
 */
export interface WorkAdmissionInput {}

export interface WorkAdmissionPolicy<
  TInput extends WorkAdmissionInput = WorkAdmissionInput,
> {
  inspect(input: TInput): Promise<WorkAdmissionDecision>;
}
