import { type PlanEditInput, type PlanFieldUpdates, type PlanMutationOperation, type PlanRef, type PlanWriteInput, type SubplanWriteInput, type KnowledgeDelegateDispatch } from "@veewo/claw-core"; import { RegistryFocusSessionStore, SessionRegistryV2 } from "./session-registry-v2.js"; export type CommandContext = { cwd: string; agentSessionId?: string; sessionKey?: string; currentPlan?: PlanRef; host?: string; mode: "stateless" | "session"; }; export type ClawCommandRequest = { operation: "plan.create"; input: Omit; } | { operation: "plan.start"; input: { updates?: PlanFieldUpdates; appendTasks?: Array<{ title: string; detail?: string; }>; }; } | { operation: "plan.resume"; input: { planId?: string; }; } | { operation: "plan.leave"; input: Record; } | { operation: "plan.show"; input: { simple?: boolean; }; } | { operation: "plan.edit"; input: { operations: PlanMutationOperation[]; }; } | { operation: "plan.wait"; input: Record; } | { operation: "plan.done"; input: PlanFieldUpdates; } | { operation: "subplan.create"; input: Omit; } | { operation: "task.edit"; input: Omit; } | { operation: "task.add"; input: { tasks: Array<{ title: string; detail?: string; }>; }; } | { operation: "task.done"; input: { tasks: Array<{ id: number; choiceId?: string; }>; }; } | { operation: "search"; input: { query: string; limit?: number; dir?: string; }; } | { operation: string; input: unknown; }; export type ClawCommandResult = { output: unknown; hostActions?: unknown[]; postCommitEffects?: unknown[]; knowledgeDispatch?: KnowledgeDelegateDispatch; }; export declare class ClawCommandService { readonly registry: SessionRegistryV2; readonly focusStore: RegistryFocusSessionStore; constructor(registry: SessionRegistryV2); execute(context: CommandContext, request: ClawCommandRequest): Promise; private requireSessionKey; private resolveProject; private ownerSessionKey; private editCurrentPlan; private requireCurrentPlan; private finalizeEnteredEnds; private endPostCommitEffects; private codexActionsFromMutation; private codexActionsForPlan; }