/** * Hook registrar — maps saga hooks onto OpenClaw lifecycle. * * Trigger is handled entirely by Mode B (skill routing). * Hooks only handle active saga context injection and authorization. */ import type { SagaState } from '../coordinator/state.js'; export interface HookContext { sessionId: string; agentId: string; sessionKey: string; } export interface BeforePromptBuildResult { injectSystemMessage?: string; } export interface BeforeToolCallResult { action: 'allow' | 'block'; reason?: string; } export interface HookRegistrarDeps { readState(sagaId: string): Promise; activeSagaId(sessionId: string): Promise; } /** * before_prompt_build: inject context for active sagas. * Trigger is handled by skill routing (Mode B), not hooks. */ export declare function handleBeforePromptBuild(ctx: HookContext, deps: HookRegistrarDeps, _prompt?: string): Promise; /** * before_tool_call: authorization guard. */ export declare function handleBeforeToolCall(toolName: string, params: Record, ctx: HookContext, deps: HookRegistrarDeps): Promise; //# sourceMappingURL=hook-registrar.d.ts.map