#!/usr/bin/env node /** * The command binary. The Codex prompt file and the Claude Code slash-command file call it * (C-1, FR-10), and it is a process wrapper and nothing more: read the two facts only the * caller knows, hand the rest to the host, print what came back. * * The shim states which agent the binary is running inside. This file never guesses it from the * environment, and never checks the name against a list of its own — an unknown agent is the * registry's error to raise, with the agents it does know in the message (FR-56). That is what * keeps FR-57's "one new folder and one line" true of this file too. */ export declare const HELP_TEXT = "Usage: resume-from --target-agent [--target-home ] -- [] [ | | ] [options]\n\nSelectors:\n no selector List sessions available for the current repository.\n Select a numbered row from that list (1 or greater).\n Select an exact session ID.\n Select a session file by absolute, relative or ~/ path.\n\nOptions:\n --agent Filter source sessions: pi, codex, claude, or claude-code.\n --home Search one source home, even one outside the configuration.\n --confirm Import the exact selection and preview identified by the token.\n --target-agent Target host ID; normally supplied by the installed plugin.\n --target-home Target agent home; omit to use that agent's default.\n -h, --help Show this help.\n\nExamples:\n resume-from --target-agent codex --\n resume-from --target-agent codex -- claude 2\n resume-from --target-agent claude-code -- session-id\n resume-from --target-agent codex -- ~/sessions/session.jsonl"; /** The invocation split in two: what the shim states, and what the user typed. */ export interface ShimArgs { /** The agent the shim is running inside. Null when it did not say (FR-56). */ targetAgent: string | null; /** The home that agent is running, or null to use the adapter's declared default (FR-3). */ targetHome: string | null; /** Everything else, in the order it was given. The host's own parser reads it. */ rest: string[]; } export type ShimArgsResult = { ok: true; value: ShimArgs; } | { ok: false; problem: string; }; /** * Both forms of both flags are accepted (`--flag value` and `--flag=value`) because a shim is a * text file a user edits. A flag with no value is left for the caller to report rather than * silently swallowing the argument that follows it. */ export declare function readShimArgs(argv: string[]): ShimArgsResult; export declare function main(argv: string[], cwd: string): Promise;