import type { EvoPaths } from "./paths.ts"; import type { ModelRunner } from "./reflect/model-runner.ts"; import type { EvoService } from "./service.ts"; import type { Proposal } from "./types.ts"; /** * Presentation seam between the two command surfaces: the in-session /evo * extension (cards + notifications + UI confirms) and the standalone evo-pi * CLI (stdout + readline confirms). Shared handlers below are written once * against this interface; each dispatcher supplies its own implementation. */ export interface EvoCommandPresenter { /** "/evo" or "evo-pi"; only used inside usage strings. */ commandPrefix: string; /** Resolved working directory for spawned background work. */ cwd: string; /** Full-content result (extension: custom card; CLI: stdout). */ print(customType: string, content: string, details?: Record): void; /** Short one-line status message. */ notify(message: string): void; /** Yes/no confirmation gating a state change; rejects when non-interactive. */ confirm(title: string, message: string): Promise; } /** The dependency slice shared handlers need; EvoCommandDependencies satisfies it. */ export interface EvoSharedCommandContext { paths: EvoPaths; service: EvoService; runner: ModelRunner; cwd?: string; agentDir?: string; model?: string; } export declare function modelRunOptions(context: EvoSharedCommandContext, signal?: AbortSignal): { paths: EvoPaths; runner: ModelRunner; cwd?: string | undefined; agentDir?: string | undefined; model?: string | undefined; signal?: AbortSignal | undefined; }; export declare function splitFirst(value: string): { first: string; rest: string; }; export declare function requireValue(value: string, usage: string): string; export declare function requireActiveBundleDigest(context: { service: EvoService; }): Promise; export declare function formatProposalCard(paths: EvoPaths, proposal: Proposal): Promise; export interface EvoInstallableWorkflowTemplate { name: string; trigger: string; description: string; /** active: already in the stable bundle; pending: staged proposal awaits approval. */ state: "available" | "active" | "pending"; pendingProposalId?: string; } /** The bundled workflow templates annotated with their local install state. */ export declare function listInstallableWorkflowTemplates(context: EvoSharedCommandContext): Promise; /** Numbered listing used by the parameterless `import` wizard. */ export declare function formatInstallableTemplates(templates: readonly EvoInstallableWorkflowTemplate[]): string; /** Write a bundled template into a throwaway staging directory for import. */ export declare function writeWorkflowTemplateToStaging(name: string): Promise; /** * Run `command` when it is one of the surface-independent commands; returns * false when the command is surface-specific and the caller must dispatch it. */ export declare function runSharedEvoCommand(context: EvoSharedCommandContext, command: string, rest: string, presenter: EvoCommandPresenter): Promise; //# sourceMappingURL=cli-commands.d.ts.map