/** * Tool registrar — registers saga_* tools with OpenClaw (§2.3). * * Tools: saga_start, saga_advance, saga_status, saga_resume, saga_cancel, saga_replay. * Each tool has a strict zod schema (C2 allows this — tools are LLM↔tool boundary). */ import type { SagaState } from '../coordinator/state.js'; import type { AdvanceDeps } from '../coordinator/state.js'; export interface ToolContext { sessionKey: string; agentId: string; sessionId: string; } export interface ToolDefinition { name: string; description: string; parametersSchema: Record; handler: (params: Record, ctx: ToolContext) => Promise; } export interface SagaStartDeps extends AdvanceDeps { stateRoot: string; } /** Artifact submitted by the worker alongside saga_advance(workerFinished=true) */ export interface ArtifactSubmission { path: string; content: string; } /** * Create the saga_start tool. */ export declare function createStartTool(deps: SagaStartDeps): ToolDefinition; /** * Create the saga_advance tool. */ export declare function createAdvanceTool(deps: SagaStartDeps): ToolDefinition; /** * Create the saga_status tool. */ export declare function createStatusTool(readState: (sagaId: string) => Promise): ToolDefinition; /** * Create the saga_cancel tool. */ export declare function createCancelTool(readState: (sagaId: string) => Promise, writeState: (state: SagaState) => Promise): ToolDefinition; /** * All tool definitions for registration. */ export declare function createAllTools(deps: SagaStartDeps): ToolDefinition[]; //# sourceMappingURL=tool-registrar.d.ts.map