import { type DeviceIdentity } from "./device-identity.js"; export type GraphEventKind = "entity.upsert" | "entity.delete" | "edge.upsert" | "edge.delete" | "artifact.version"; export type GraphEventDraft = { kind: GraphEventKind; payload: Record; purpose: string; sensitivity?: "normal" | "sensitive" | "restricted"; actor?: Record; provenance?: Record; policyDecision?: Record; occurredAt?: string; }; export type SignedGraphEvent = GraphEventDraft & { eventId: string; bootId: string; sequence: string; schemaVersion: 1; occurredAt: string; sensitivity: "normal" | "sensitive" | "restricted"; actor: Record; provenance: Record; policyDecision: Record; signature: string; }; export declare function canonicalDeviceEventPayload(deviceId: string, event: Omit | SignedGraphEvent): string; export declare function appendGraphEvent(draft: GraphEventDraft, options?: { directory?: string; identity?: DeviceIdentity; bootId?: string; }): SignedGraphEvent; export declare function flushGraphEventOutbox(options: { platformUrl: string; koiId: string; gatewayToken: string; directory?: string; fetchImpl?: typeof fetch; }): Promise<{ sent: number; remaining: number; }>; export declare function graphEventOutboxSize(directory?: string): number;