import type { ParsedPayload } from "../../../hooks/adapter/parse.js"; import type { EventV3Base } from "../base-contract.js"; import type { EventOfTypeV3, EventTypeV3, SpanSummaryV3 } from "../contract.js"; import { type HarnessTimingAccumulatorV3, type TurnTelemetryV3 } from "../turn-telemetry.js"; import { type HookProducerContextV3Base, type HookSignalV3Base } from "./hook-base.js"; export interface HookProducerContextV3 extends HookProducerContextV3Base { /** Required for terminal events; captured when the corresponding span opens. */ terminal_span?: SpanSummaryV3; /** Required by V3 delegation starts so the child span is anchored in its parent tree. */ parent_span_id?: `span_${string}`; /** Optional recorder aggregate. An empty aggregate remains explicit missing evidence. */ harness_timing?: HarnessTimingAccumulatorV3; /** Test/replay override for already-extracted telemetry. */ turn_telemetry?: TurnTelemetryV3; } export type HookSignalV3 = HookSignalV3Base; export type HookEventV3 = EventOfTypeV3; /** * Normalize one hook payload to the V3 contract. * * The V3 base normalizer owns privacy and scope. This adapter adds contract * identity, self-contained terminal spans, and economics. Returning null for an incomplete terminal prevents a producer * from writing a structurally valid-looking event without its load-bearing * self-contained span. */ export declare function normalizeHookEventV3(signal: HookSignalV3Base, payload: ParsedPayload, context: HookProducerContextV3): HookEventV3 | null; /** Upgrade recorder-synthesized hook events, including resolving wait terminals. */ export declare function upgradeHookEventV3(base: EventV3Base, source: ParsedPayload, context: HookProducerContextV3): HookEventV3 | null; //# sourceMappingURL=hook.d.ts.map