/** * `openclaw senpi update` — the command surface for planning an in-place recipe change. * * Thin by design, like `senpi validate`: parse flags, call the gateway, render, set the exit code. * Everything worth testing lives behind `senpi.update` in `runtime/update-handler.ts`, so the tests * do not have to drive a command line. * * ## It plans. It has always planned. It will keep planning. * * There is no `--dry-run`, and there never will be. Applying will require `--apply` when that path * exists. The alternative — plan today behind `--dry-run`, apply by default tomorrow — means a * script written this week silently starts mutating a live trading runtime after an upgrade. The * destructive mode is the one you have to ask for, permanently. */ interface CommanderCommand { command(name: string): CommanderCommand; description(text: string): CommanderCommand; option(flags: string, description: string, defaultValue?: unknown): CommanderCommand; argument(name: string, description: string): CommanderCommand; action(handler: (...args: never[]) => void | Promise): CommanderCommand; } interface RawFlags { path?: string; content?: string; dir?: string; id?: string; address?: string; apply?: boolean; codeOnly?: boolean; json?: boolean; } export declare const UPDATE_EXIT: { /** Planned (or, later, applied). */ readonly ok: 0; /** Failed during apply — the runtime may not be where the caller left it. */ readonly failed: 1; /** Refused. Nothing changed. */ readonly refused: 2; /** Malformed request — the invocation is wrong, not the recipe. */ readonly malformed: 3; }; export interface UpdateCommandDeps { callGateway(method: string, params: Record): { ok?: boolean; payload?: unknown; error?: unknown; } | undefined; resolvePath(p: string): string; dirname(p: string): string; readFile(p: string): string; /** True when the path is a directory. Injected so the resolution is testable without a disk. */ isDirectory(p: string): boolean; /** True when the path exists as a readable file. */ fileExists(p: string): boolean; out(line: string): void; err(line: string): void; setExitCode(code: number): void; } /** * The whole command body, with its I/O injected. * * Extracted so the routing and exit codes are testable without spawning a CLI or standing up a * gateway — the exit code in particular is the part an agent branches on, and asserting it through * a subprocess is how it ends up untested. */ export declare function runUpdateCommand(deps: UpdateCommandDeps, flags: RawFlags, target?: string): void; export declare function registerUpdateCommand(senpi: CommanderCommand, deps: UpdateCommandDeps): void; export {}; //# sourceMappingURL=update-command.d.ts.map