/** * v2 public CLI surface — four commands only. * This is the package-bin command contract after the v2 cutover. */ export declare const V2_PUBLIC_COMMANDS: readonly ["", "status", "doctor", "stop"]; export type V2PublicCommand = (typeof V2_PUBLIC_COMMANDS)[number]; export declare const V2_DEFAULT_SESSION_NAME = "oms"; /** * Complete known legacy top-level commands from v1 `oms` that are not public v2 * actions. `status` and `doctor` remain public; the rest must be rejected. */ export declare const V2_LEGACY_TOP_LEVEL_COMMANDS: readonly ["setup", "init", "project", "probe", "trace", "hook", "events", "reconcile", "schedule", "run", "conductor", "goal", "worker", "team", "structured-role", "trust", "hud", "release", "verify"]; export interface V2CampaignBinding { readonly sessionName: string; readonly workspaceRoot: string; } export interface V2PublicCliAdapters { readonly setupUser: (input: { readonly workspaceRoot: string; readonly packageRoot: string; }) => { readonly ok: boolean; readonly detail: string; readonly warnings?: readonly string[]; }; readonly projectAssets: (input: { readonly workspaceRoot: string; readonly packageRoot: string; }) => { readonly projected: readonly string[]; /** Drifted obsolete generated files preserved on repair; non-empty fails closed. */ readonly conflicts: readonly string[]; }; readonly startOrAttach: (binding: V2CampaignBinding) => { readonly ok: boolean; readonly sessionName: string; readonly action: "started" | "attached" | "repaired"; readonly detail: string; /** When false, bare attach must not re-ask for a goal. */ readonly needsGoal: boolean; }; readonly readStatus: (input: { readonly workspaceRoot: string; }) => readonly string[]; readonly runDoctor: (input: { readonly workspaceRoot: string; readonly packageRoot: string; }) => { readonly ok: boolean; readonly lines: readonly string[]; }; readonly requestStop: (reason: string, input: { readonly workspaceRoot: string; }) => { readonly alreadyTerminal: boolean; readonly detail: string; }; } export declare function formatV2Help(): string; export type V2PublicParseResult = { readonly kind: "help"; } | { readonly kind: "command"; readonly command: V2PublicCommand; } | { readonly kind: "unknown"; readonly unknown: string; }; export declare function parseV2PublicCommand(argv: readonly string[]): V2PublicParseResult; export declare function runV2PublicCli(options: { readonly argv: readonly string[]; readonly workspaceRoot: string; readonly packageRoot: string; readonly adapters: V2PublicCliAdapters; readonly writeStdout: (line: string) => void; readonly writeStderr: (line: string) => void; readonly stopReason?: string; }): number;