/** * before_tool_call hook — inject file-context observations before Write/Edit tools. * * Matches CC PreToolUse behavior: before an agent modifies a file, inject * relevant observations so it doesn't repeat past mistakes or miss known patterns. * * Non-blocking: 500ms timeout, failures swallowed (Constitution Principle 3). */ import type { EngramRestClient, Observation } from '../client.js'; import type { PluginConfig } from '../config.js'; import type { BaseHookEvent, PluginHookContext } from '../types/openclaw.js'; export declare function formatFileContext(file: string, observations: Observation[]): string; /** * Handle the before_tool_call hook. * * Detects file-modifying tools (Write/Edit), fetches relevant observations * from engram, and injects them as system context. */ export declare function handleBeforeToolCall(event: BaseHookEvent, ctx: PluginHookContext, client: EngramRestClient, config: PluginConfig): Promise<{ appendSystemContext?: string; } | void>; //# sourceMappingURL=before-tool-call.d.ts.map