import type { ParsedArgs, RunpaneAgent } from './commands'; import { type TailnetMachine } from './workspace'; /** * The note's sections. They extend Codex's compaction prompt * (openai/codex codex-rs/prompts/templates/compact/prompt.md: progress and decisions, context and * constraints, next steps, critical references) with what a receiver on another machine needs: * what was verified, how to check it, and where the code is. */ export declare const HANDOFF_SECTIONS: readonly [{ readonly heading: "Goal"; readonly prompt: "What the work is for and what \"done\" means, in the person's terms. Name the issue or PR."; }, { readonly heading: "Current state"; readonly prompt: "Where things stand right now, in two or three sentences."; }, { readonly heading: "Done and verified"; readonly prompt: "Finished work, each item with how you verified it (command and result)."; }, { readonly heading: "In progress"; readonly prompt: "Half-done work: what is written, what is not, and any failing test or error, quoted."; }, { readonly heading: "Next steps"; readonly prompt: "The ordered next actions. Make the first one concrete enough to start without asking."; }, { readonly heading: "Decisions and constraints"; readonly prompt: "Decisions with their reasons, the person's preferences, non-goals, and approaches that failed (so they are not retried)."; }, { readonly heading: "Open questions"; readonly prompt: "What only the person can answer, and what you were unsure about. Write \"None\" if there are none."; }, { readonly heading: "How to verify"; readonly prompt: "Exact commands to build, test, and see the change working, with the result you expect."; }, { readonly heading: "Git state"; readonly prompt: "Repository, branch, head commit, whether it is pushed, and any uncommitted files that matter."; }]; export interface HandoffDestination { /** A Tailscale machine name, or null for this machine. */ machine: string | null; agent: RunpaneAgent; model?: string; effort?: string; /** Explicit WSL selection is recognized and rejected until supported. */ wsl?: true; } export interface DestinationOverrides { machine?: string; agent?: RunpaneAgent; model?: string; effort?: string; } /** * Reads "codex gpt-5 high on parsas-macbook-pro" into a machine, agent, model, and effort. * Flags win over the text. Anything it cannot place is an error, not a guess. */ export declare function parseDestination(text: string, machines: readonly TailnetMachine[], overrides?: DestinationOverrides): HandoffDestination; export interface NoteCheck { ok: boolean; /** Required sections with no heading. */ missing: string[]; /** Required sections whose heading is there but whose body is empty or only template comments. */ empty: string[]; } /** Checks that every required section is present and written; "None" counts as written. */ export declare function validateNote(text: string): NoteCheck; export interface NoteOrigin { originMachine: string; originPane?: string; originPanel?: string; originSession?: string; repository?: string; branch?: string; head?: string; remote?: string; pushed?: boolean; } /** The note an agent fills in: front matter for the origin, then one section per required heading. */ export declare function noteTemplate(origin: NoteOrigin): string; /** What happened to the sender's session, in the command's output and JSON. */ export interface ContinuityReport { /** True when the sender's session is (or, on a dry run, would be) carried and resumed. */ carried: boolean; /** Absent on a dry run. `fresh-agent` is the note route: a new agent, not the same session. */ result?: 'continued' | 'inconclusive' | 'not-continued' | 'fresh-agent'; agent?: string; /** The sender's native session id. */ sessionId?: string; /** The id the receiver resumes: the sender's, or its fork's on this machine. */ resumedId?: string; fork?: boolean; files?: number; bytes?: number; checks?: { /** Pane launched the agent's own resume for resumedId. */ resumedById: boolean; /** Pane recorded resumedId as the receiver's id, so a restart resumes it. */ restartResumes: boolean; /** The receiver's screen showed the copy's last message; null when there was nothing to compare. */ historyLoaded: boolean | null; /** * Forks only: everything the sender's session held before the fork is unchanged, byte for byte, * and nothing else changed it. When `originalAppended` is set, the sender's transcript also grew: * the sender is the running agent, and its own current turn appended to it. */ originalUntouched?: boolean; /** Forks only: the running sender's own turn appended to its transcript during the handoff. */ originalAppended?: true; }; reason: string; next?: string; } export declare function runHandoff(parsed: ParsedArgs): Promise; //# sourceMappingURL=handoff.d.ts.map