import type { ParsedPayload } from "../../../hooks/adapter/parse.js"; import type { EventAdapterIdV3 } from "../adapter-id.js"; import type { EventV3Base, RuntimeAttestationV3Base } from "../base-contract.js"; import { type FingerprintContextV3 } from "../canonical.js"; import { type CursorExecutionModeV3 } from "../capabilities.js"; import { type RuntimeTelemetryCapabilitiesV3 } from "../runtime-telemetry-capabilities.js"; export type HookSignalV3Base = "session-start" | "session-end" | "user-prompt-submit" | "after-agent-response" | "stop" | "stop-failure" | "pre-tool-use" | "post-tool-use" | "post-tool-use-failure" | "permission-request" | "sub-agent-start" | "sub-agent-stop" | "pre-compact" | "post-compact"; export interface HookProducerContextV3Base { coordRoot: string; adapter: EventAdapterIdV3; adapterVersion?: string; harnessVersion?: string; root_id: `root_${string}`; run_id?: `run_${string}`; workflow_id?: `wf_${string}`; workflow_agent_id?: string; instance_id: `inst_${string}`; generation_id: `gen_${string}`; attestation_id: `att_${string}`; producer_id: `prd_${string}`; boot_id: `boot_${string}`; sequence: number; build_id: `build_${string}`; platform: "linux" | "windows" | "macos" | "unknown"; bridge?: "codex-wsl"; capability_profile: `cap_${string}`; cursor_mode?: CursorExecutionModeV3; fingerprintContext: FingerprintContextV3; turn_native_id?: string; turn_id?: `tid_${string}`; span_id?: `span_${string}`; caused_by?: `evt_${string}`[]; event_id?: `evt_${string}`; observed_at?: string; recorded_at?: string; monotonic_ns?: string; clock_id?: `clk_${string}`; duration_ms?: number; tool_call_count?: number; tool_call_count_support?: "native" | "derived" | "conditional" | "unsupported"; tool_call_count_missing_reason?: string; response_bytes?: number; delegation_id?: `del_${string}`; child_generation_id?: `gen_${string}`; agent_role?: string; stop_remediation?: boolean; turn_ritual?: TurnRitualEvidenceV3; /** Tuning read from a local runtime transcript by the recorder; hook-base * itself performs no I/O. */ runtime_tuning?: RuntimeTuningContextV3; /** Effective telemetry evidence resolved by the recorder. When absent, the * session-start attestation records only what hook delivery can prove. */ runtime_telemetry?: RuntimeTelemetryCapabilitiesV3; } export interface TurnRitualEvidenceV3 { status_box_present: boolean; status_box_present_strict: boolean; session_name_required: boolean; session_name_present: boolean; } /** Normalize one already-parsed hook payload directly into V3Base without retaining its raw fields. */ export declare function normalizeHookEventV3Base(signal: HookSignalV3Base, payload: ParsedPayload, context: HookProducerContextV3Base): EventV3Base | null; export type RuntimeTuningObservationV3 = RuntimeAttestationV3Base["tuning"]; /** Recorder-supplied tuning read from a local runtime transcript. */ export interface RuntimeTuningContextV3 { effort?: string; speed?: string; attestation: "native" | "derived"; } //# sourceMappingURL=hook-base.d.ts.map