/** * The commands only a person may run, and the check that refuses them to an * agent (agent-cannot-approve-itself/AC-1..AC-6, AC-14, AC-15). * * Each command exists so that a person can say yes: carry a paused item on, * pass the ownership gate, reopen from testing. An agent that runs one approves * its own work, which empties "approved" of meaning. * * This check is the line; the approval guard (`approval-guard.ts`) is the early, * logged layer in Claude Code (design D2). A shell denylist can always be talked * around, but no agent harness gives its shell a terminal on stdin, so the * terminal test catches every route the guard misses, in every harness. * * Design: design.md C1 * * @module */ export type HumanRule = 'autopilot-approve' | 'transition-override' | 'amend-confirm'; export interface HumanOnlyCommand { rule: HumanRule; /** How the command is named to whoever is refused. */ label: string; /** The positional words after `aidlc` that name the command. */ words: string[]; /** The flag that makes it need a person, or null when the command always does. */ flag: string | null; } /** The one table. The approval guard embeds it, so both layers refuse the same set. */ export declare const HUMAN_ONLY: readonly HumanOnlyCommand[]; /** The longest command or path a log line keeps. */ export declare const SUBJECT_LIMIT = 500; export interface RefusalEntry { at: string; where: 'cli' | 'guard'; rule: string; reason: string; subject: string; session?: string; } /** * Why no person is present, or null when one is. `AIDLC_UNATTENDED` comes first * so the reason names it even at a terminal (AC-4). Only stdin is read: a person * piping the output through `tee` is still a person. */ export declare function absenceReason(env: NodeJS.ProcessEnv, stdinIsTTY: boolean | undefined): string | null; export declare function refusalMessage(cmd: HumanOnlyCommand, why: string): string; /** Shared by every worktree, and never committed: it records what happened here. */ export declare function refusalsPath(projectRoot: string): string; /** Append one line. Never throws: a refusal that cannot be logged is still a refusal (AC-15). */ export declare function logRefusal(projectRoot: string, entry: RefusalEntry): void; /** * Null when a person is present. Otherwise logs the refusal and returns the * message, for the caller to print in its own way (`amend --json` wraps it). */ export declare function requireHuman(rule: HumanRule, opts: { root: string; env?: NodeJS.ProcessEnv; stdinIsTTY?: boolean; subject?: string; }): string | null; //# sourceMappingURL=human-only.d.ts.map