/** * @octomil/browser -- Canonical route event definition + builder * * Telemetry-safe event emitted after every routing decision. Follows the * contract rule: NEVER include prompt, input, output, audio, file_path, * content, or messages. * * This module is the single source of truth for the route event shape * across the browser SDK. Other SDKs (Python, Node, iOS, Android) emit * the same canonical shape so the server can correlate and query uniformly. */ import type { RouteAttempt } from "./runtime/attempt-runner.js"; import type { RouteEvent, RouteEventAttemptDetail } from "./_generated/runtime_planner_types.js"; /** * Keys that MUST NEVER appear in any route event payload, at any depth. * This list is shared across all SDKs for cross-SDK conformance. */ export declare const FORBIDDEN_TELEMETRY_KEYS: ReadonlySet; /** Gate summary: which gate codes passed and which failed. */ export interface GateSummary { passed: string[]; failed: string[]; } export type RouteAttemptDetail = RouteEventAttemptDetail; export type BrowserRouteEvent = RouteEvent; /** * Build a privacy-safe attempt detail from a RouteAttempt. */ export declare function buildAttemptDetail(attempt: RouteAttempt): RouteAttemptDetail; /** * Generate a random route/plan/request ID prefixed with the given tag. */ export declare function generateCorrelationId(prefix: string): string; /** * Recursively strip forbidden keys from an object. Returns a new object * (does not mutate the input). * * Works on nested objects and arrays. Removes any key whose name appears * in {@link FORBIDDEN_TELEMETRY_KEYS} at any depth. */ export declare function stripForbiddenKeys(obj: T): T; /** * Validate that a route event contains no forbidden keys at any depth. * Returns the list of violating key names (empty if clean). */ export declare function findForbiddenKeys(obj: unknown, path?: string): string[]; //# sourceMappingURL=route-event.d.ts.map