#!/usr/bin/env node /** * Minimal native agent hook bridge. * * Keeps agent integrations close to Loom's core: SQLite remains the source of * truth, SessionStart injects buildLoomContext(), and PostToolUse reuses the * deterministic auto-capture extractor. */ export type AgentHookEvent = "SessionStart" | "PostToolUse" | "Stop"; export type AgentHookPlatform = "codex" | "claude"; export interface AgentHookInput { hook_event_name?: string; session_id?: string; id?: string; sessionId?: string; cwd?: string; source?: string; tool_name?: string; toolName?: string; tool_input?: unknown; toolInput?: unknown; tool_response?: unknown; toolResponse?: unknown; last_assistant_message?: string; lastAssistantMessage?: string; } export interface AgentHookOutput { continue: true; suppressOutput?: boolean; hookSpecificOutput?: { hookEventName: AgentHookEvent; additionalContext?: string; }; } export declare function handleAgentHook(platform: AgentHookPlatform, event: AgentHookEvent, input: AgentHookInput): Promise; export declare function readStdinJson(): Promise; export declare function quiet(): AgentHookOutput;