import { type StdinReadResult } from './stdin-read.js'; export type CometHookIntent = 'context' | 'write' | 'non-write' | 'unknown'; export interface CometHookRequest { intent: CometHookIntent; targets: string[]; toolName: string | null; task?: string; cwd?: string; /** 原始绝对路径仅供物理归属检查,cwd 保持既有规范化契约。 */ rawCwd?: string; sessionId?: string; writes?: CometHookWriteProposal[]; } export interface CometHookWriteProposal { path: string; content?: string; replacements?: { oldText: string; newText: string; replaceAll: boolean; }[]; patch?: string; } export interface CometHookAdapterDecision { allowed: boolean; reason: string; context?: string; diagnostic?: string; } export interface CometHookProcessOutput { exitCode: number; stdout: string; stderr: string; } export declare const COMET_HOOK_PLATFORM_IDS: Set; /** Resource addresses are not filesystem writes. Drive paths remain file targets. */ export declare function normalizeCometHookTargets(targets: readonly string[]): string[]; /** 无完整、唯一匹配的编辑内容时返回 null,不推测工具实际会写什么。 */ export declare function proposedCometHookFileContent(proposal: CometHookWriteProposal, before: string): string | null; export declare function parseCometHookRequest(source: string, filePath?: string): CometHookRequest; export declare function readCometHookRequest(options?: { readStdin?: () => StdinReadResult | Promise; }): Promise; export declare function renderCometHookDecision(platformId: string, decision: CometHookAdapterDecision, options?: { denialOutput?: 'exit-code' | 'json'; }): CometHookProcessOutput; //# sourceMappingURL=hook-adapter.d.ts.map