import type { Clock, JournalRecord, KernelPaths, TypedEventsPage, V2EventSource, V2EventType, V2TypedEvent } from "./types.js"; /** * Full collision-resistant identity. Never truncates digests to 64 bits. * Provider: run + source + delivery_id only (type/payload conflicts via journal). * GitHub: run + source + repository + observation_key + edge + snapshot_digest. */ export declare function deriveEventId(input: { readonly runId: string; readonly source: V2EventSource; readonly identity: Readonly>; }): string; export declare function validateClosedPayload(type: V2EventType, raw: Readonly>): Readonly>; export declare function buildTypedEvent(input: { readonly source: V2EventSource; readonly type: V2EventType; readonly observedAt: string; readonly runId: string; readonly sessionId?: string | null; readonly taskId?: string | null; readonly repository?: string | null; readonly payload: Readonly>; readonly identity: Readonly>; }): V2TypedEvent; export interface JournalTypedEventResult { readonly event: V2TypedEvent; readonly created: boolean; readonly record: JournalRecord; } /** * Journal one typed event. Always routes through appendJournal so kind/payload * conflicts on the same operation_id fail closed (no silent bypass). */ export declare function journalTypedEvent(paths: KernelPaths, clock: Clock, event: V2TypedEvent): JournalTypedEventResult; export declare function journalTypedEventUnlocked(paths: KernelPaths, clock: Clock, event: V2TypedEvent): JournalTypedEventResult; export declare function listTypedEvents(paths: KernelPaths, runId: string): V2TypedEvent[]; export declare function parseTypedEventPayload(payload: Readonly>): V2TypedEvent | null; /** * Read-only sequence-cursor page. next_cursor is always the last returned * journal sequence (even on an exhausted page) so later polls can request only * newly appended events. */ export declare function listTypedEventsPage(paths: KernelPaths, runId: string, options?: { readonly cursor?: string | number | null; readonly limit?: number; }): TypedEventsPage;