import { PEAKS_HOOK_SCHEMA, type IdeId, type PeaksCanonicalHook, type PeaksDecisionTransport } from './ide-types.js'; export { PEAKS_HOOK_SCHEMA }; export type { PeaksCanonicalHook, PeaksDecisionTransport }; /** * Compute the deny decision shape for Claude Code (the only adapter registered * in slice #1). The output is a JSON object that, when written to stdout, makes * the Claude Code permission system block the tool call BEFORE the user's * permission prompt — un-bypassable, even under --dangerously-skip-permissions. */ export declare const CLAUDE_CODE_DENY_SHAPE: Record; export declare const CLAUDE_CODE_DENY_TRANSPORT: PeaksDecisionTransport; /** * Compute the deny decision shape for Trae (Cursor-style sibling IDE). * Shape is the standard Cursor/Claude sibling envelope: `hookSpecificOutput` * with `hookEventName`, `permissionDecision`, `permissionDecisionReason`. * The hookEventName is `'beforeToolCall'` for Trae vs `'PreToolUse'` for * Claude Code — the only field that differs between the two siblings. * Fixture: tests/fixtures/trae/trae-1x-payload.json. Constant NAME preserved */ export declare const TRAE_DENY_SHAPE: Record; export declare const TRAE_DENY_TRANSPORT: PeaksDecisionTransport; /** * Format a decision response for a given IDE. Slice #1 handles Claude Code; * slice #3 added Trae (1.x-assumption shape — see TRAE_DENY_SHAPE doc). * Future slices will add exit-code / both variants for IDEs that don't read * stdout. */ export declare function formatDecisionResponse(ide: IdeId, decision: 'allow' | 'deny', reason?: string): { stdout: string; exitCode: number; }; /** * Build a peaks canonical hook from a parsed stdin payload. Caller has already * done stdin parsing + IDE auto-detection; this function normalizes to the * canonical schema. */ export interface BuildCanonicalHookInput { readonly toolName: string; readonly toolInput: Record; readonly projectRoot: string; readonly rawIdeFormat: IdeId; readonly rawPayload: unknown; readonly event?: PeaksCanonicalHook['event']; } export declare function buildCanonicalHook(input: BuildCanonicalHookInput): PeaksCanonicalHook;