/** * Resume-command parsing: recognizes a pasted "resume this session" shell * command and recovers {harness, sessionId, autonomy} - or a resume-last * request where the harness supports one. The inverse of buildResumeArgv, * tolerant of what shell history actually carries (quoted ids, resolved * bin paths, --flag=value, flag aliases, root options on either side of a * subcommand). Anchoring rules ported from v1 (D-011): the id must follow * the harness's own resume grammar, match its id shape, and be the ONLY * id-shaped token - a UUID inside quoted prompt text must never be * returned as the session id. Position independence is safe because * tokenize collapses quoted text into single words: a bare resume word can * only come from a real argv slot. */ import type { HarnessDescriptor, HarnessName } from "../knowledge/descriptor.js"; export interface ParsedResume { readonly harness: HarnessName; readonly sessionId: string; readonly autonomy: boolean; } /** A recorded `--last` resume: no id to anchor - the harness decides what * it names at spawn. Most-recent resolution stays inside the harness, so * `rankResumeLast` (resume-last.ts) has no production caller and stays * exported for unit tests only. */ export interface ParsedResumeLast { readonly harness: HarnessName; readonly resumeLast: true; readonly autonomy: boolean; } export declare const parseResumeCommand: (known: readonly HarnessDescriptor[], command: string) => ParsedResume | ParsedResumeLast | null; //# sourceMappingURL=parse-resume.d.ts.map