export type EventCategory = "mcp" | "runtime" | "custom"; export interface EventDefinition { name: string; category: EventCategory; version: number; effectiveAt: string; owner: string; deprecated?: boolean; schema: Record; } export interface AccountLinkedV1Properties { /** Milliseconds between mcp.installed and account.linked. Null if the install registry doesn't have a createdAt for this install. */ "timeSinceInstallMs"?: number | null; } export interface AccountLoggedOutV1Properties { /** How many days the local auth.json file existed before logout. */ "sessionLifetimeDays"?: number | null; } export interface AccountLoginCompletedV1Properties { /** Terminal state of the device-code flow. */ "outcome": "success" | "code_expired" | "user_denied" | "network_error" | "polling_aborted"; /** Wall-clock duration from login_initiated to terminal state. */ "durationMs": number; } export interface AccountLoginInitiatedV1Properties { /** What initiated the flow. 'meter_exhausted' is retained for back-compat with pre-pivot telemetry; no new events emit it. */ "trigger": "cli_explicit" | "account_required" | "meter_exhausted"; } export interface McpConsentAcceptedV1Properties { /** Date-stamped policy version (e.g. '2026-05-08'). Bumped when the policy text materially changes. */ "policyVersion": string; } export interface McpConsentDeclinedV1Properties { /** Date-stamped policy version active at the time of decline. */ "policyVersion": string; } export interface McpInstalledV1Properties { /** Semver of @extentos/mcp-server, read from package.json at runtime. */ "mcpVersion": string; /** Best-effort npm registry version string the user installed (vs the resolved one). */ "npmVersion"?: string | null; /** process.platform value: darwin | linux | win32 | etc. */ "os": string; /** process.arch value: x64 | arm64 | etc. */ "arch": string; /** Detected MCP host (claude-code, cursor, windsurf, vscode, claude-desktop, or null if unknown). */ "agentHint"?: string | null; } export interface SessionCreatedV1Properties { /** Vendor identifier (canonical 'meta'; older MCP versions sent the legacy alias 'meta_rayban'). */ "glasses": string; /** Whether the session was created with binary recording enabled. */ "recordingEnabled": boolean; /** Target platform for the session. */ "platform": "android" | "ios"; /** Account tier at session creation (free_account | paid). Null for unauthenticated calls before account-required gate. */ "tier"?: string | null; } export interface ToolCalledV1Properties { /** Canonical tool name from mcp-server/src/tools/definitions.ts. */ "toolName": string; /** Wall-clock duration of the tool call in milliseconds. */ "durationMs": number; /** Terminal state of the call. */ "outcome": "success" | "error" | "validation_failed"; } export interface AppInitializedV1Properties { } export interface AssistantAssistantSpokeV1Properties { /** Verbatim text of what the assistant said. For audio-modality responses this is the model's own transcription of its spoken output. */ "transcript": string; } export interface AssistantErrorV1Properties { /** Coarse error category. Common values: 'websocket_failure' (transport-level), 'provider_error' (OpenAI returned an `error` event), 'reconnect_failed' (reconnection state machine couldn't recover), 'tool_dispatch' (tool body threw uncaught). */ "kind": string; /** Human-readable detail. For provider_error this includes the provider's code + message. For websocket_failure this includes the underlying exception class + message. Treat as opaque text for debugging. */ "message": string; } export interface AssistantReconnectedV1Properties { /** Why the reconnect fired. 'proactivecadence' = scheduled ~50-min rotation ahead of 60-min hard ceiling. 'ceilingapproach' = approaching the ceiling. 'networkdrop' = WS onFailure/onClosed mid-session. */ "reason": "proactivecadence" | "ceilingapproach" | "networkdrop"; /** Wall-clock gap from old-WS-close to new-WS-session.updated, in ms. Includes DNS + TLS + handshake + history replay. Typical 200-1500ms on good network. */ "downtime_ms": number; } export interface AssistantSessionEndedV1Properties { /** Why the session ended. 'user' = customer called assistant.stop() / session.stop(). 'error' = unrecoverable transport or provider error; subsequent .error events may have details. 'ceiling' = approached 60-min provider hard limit and the reconnect attempt failed. */ "reason": "user" | "error" | "ceiling"; /** Optional human-readable detail when reason=error or ceiling. Null for user-initiated stops. */ "message"?: string | null; } export interface AssistantSessionStartedV1Properties { /** Which provider drives the session. 'openai' = AssistantProvider.OpenAi (Phase 4 v1 default). 'mock' = AssistantProvider.Mock (deterministic in-process for tests + MCP injectAssistantUtterance(text:) path). */ "provider": "openai" | "mock"; /** Provider-specific model identifier. For openai: 'gpt-realtime', 'gpt-realtime-mini', 'gpt-realtime-1.5', etc. Null for mock. */ "model"?: string | null; /** Provider-specific voice identifier. For openai: 'alloy', 'echo', 'shimmer', 'marin', etc. Null for mock. Locked at session start per OpenAI Realtime — voice can't change mid-session. */ "voice"?: string | null; } export interface AssistantToolCalledV1Properties { /** The tool name as registered in the customer's tool('', ...) { } block. */ "name": string; /** The arguments object the model passed, parsed from response.function_call_arguments.done's accumulated JSON string. Empty {} for no-arg tools. For typed-args tools (Kotlin `tool(...)`) this is the raw JsonObject pre-deserialization to Args. */ "args"?: unknown; /** Per-invocation identifier from the provider (response.output_item.added's call_id field for OpenAi; 'mock_call_' for Mock). Matched against assistant.tool_result.call_id to pair the call with its result. */ "call_id": string; } export interface AssistantToolResultV1Properties { /** Per-invocation identifier matching assistant.tool_called.call_id. */ "call_id": string; /** Tool name (redundant with assistant.tool_called.name but included so a single getEventLog filtered to tool_result is informative without joining). */ "name": string; /** ToolResult.Ok(output) — the string the model will read aloud / weave into its reply. For ToolResult.Err, this is the failure message. */ "output": string; /** True when the tool returned ToolResult.Err (or the body threw). */ "is_error": boolean; /** Wall-clock time from dispatch to result, in ms. Useful for spotting blocking tools (synthesis #9 — default non-blocking). */ "duration_ms": number; } export interface AssistantUserSpokeV1Properties { /** Verbatim text of what the user said. Per OpenAI Realtime STT (whisper-1 by default). */ "transcript": string; } export interface BlockExecutedV1Properties { /** Stable block identifier from the AppSpec. */ "blockId": string; /** Block type tag (capture_photo, app_callback, set_variable, etc.). */ "blockType"?: string | null; /** Wall-clock duration of block execution. */ "durationMs": number; /** Terminal state of the block. */ "outcome": "normal" | "failed"; } export interface CallbackInvokedV1Properties { /** Spec-declared handler name. */ "handlerName": string; /** Wall-clock duration. Null if the bridge didn't observe both AppCallbackInvoked and AppCallbackCompleted. */ "durationMs"?: number | null; /** Terminal state. */ "outcome": "success" | "error"; } export interface ConnectionClosedV1Properties { /** Disconnect cause. 'meter_exhausted' is retained for back-compat with pre-pivot telemetry; no new events emit it. */ "cause": "user_requested" | "device_dropped" | "thermal_critical" | "hinges_closed" | "session_expired" | "browser_closed" | "meter_exhausted" | "transport_failure"; /** How long the connection was Active before close. */ "durationMs"?: number | null; /** Set when cause='session_expired'. Lowercased reason name from the simulator-protocol session_expired frame. */ "sessionExpireReason"?: string | null; /** Set when cause='transport_failure'. The simple class name of the underlying error. */ "transportErrorCode"?: string | null; } export interface ConnectionOpenedV1Properties { /** Which transport surfaced the connection. */ "transportType": "RealMeta" | "BrowserSim" | "LocalSim"; /** Milliseconds from Connecting to Active. Null if the library didn't observe the Connecting transition. */ "timeToConnectMs"?: number | null; } export interface ConversationBargeInV1Properties { /** The handler whose speak() was interrupted. Pairs scopewise with conversation.handler_started.handlerId. */ "handlerId": string; /** Milliseconds into the speak() audio when the barge-in fired. Aggregate metric for tuning the barge-in threshold. */ "interruptedAtMs"?: number; } export interface ConversationErrorV1Properties { /** When the error happened inside an active handler, its id. Omitted for errors outside handler scope. */ "handlerId"?: string; /** Error kind — mirrors the TurnError variants the developer's handler pattern-matches on. */ "kind": "stt_timeout" | "stt_network" | "stt_rate_limited" | "stt_unauthorized" | "tts_timeout" | "tts_network" | "llm_unavailable" | "internal"; /** Which conversation operation hit the error. */ "operation": "listen" | "speak" | "ai_complete" | "ai_stream"; } export interface ConversationHandlerFinishedV1Properties { /** Pairs with conversation.handler_started.handlerId. */ "handlerId": string; /** How the handler ended. 'completed' = handler returned normally. 'cancelled' = cancelled by registration cancel or shell shutdown. 'error' = uncaught exception escaped the handler. */ "status": "completed" | "cancelled" | "error"; } export interface ConversationHandlerStartedV1Properties { /** Stable id for this handler invocation. Used to pair with conversation.handler_finished and to scope the turn / barge_in / error events that occur within this handler's lifetime. */ "handlerId": string; /** How the handler was triggered. 'wake_phrase' = a phrase match fired the onWake convenience wrapper. 'start' = developer called glasses.conversation.start directly (e.g. from a manual UI button or a scheduled event). */ "trigger": "wake_phrase" | "start"; /** When trigger=wake_phrase, the matched phrase. Omitted when trigger=start. NOT a freeform user utterance — the registered phrase string. */ "wakePhrase"?: string; } export interface ConversationTurnEndedV1Properties { /** Pairs with conversation.handler_started.handlerId. */ "handlerId": string; /** Pairs with conversation.turn_started.turnId. */ "turnId": string; /** The Turn variant the listen() call resolved to (synthesis §8 + S2 fact sheet). */ "outcome": "said" | "hold_requested" | "interrupted" | "error"; /** When outcome=said, the length of the user's transcribed text in characters. The text itself is NOT logged — aggregate metric only per the content/PII boundary (memory: project_extentos_data_posture). */ "textLen"?: number; } export interface ConversationTurnStartedV1Properties { /** The handler this turn is part of — pairs with conversation.handler_started.handlerId. */ "handlerId": string; /** Stable id for this turn. Pairs with conversation.turn_ended.turnId. */ "turnId": string; } export interface ErrorSurfacedV1Properties { /** Simple class name of the underlying exception/error type. Never includes stack frames or message text. */ "errorClass": string; /** Stable error code (record_discrete_failed, capture_photo_failed, speak_failed, transport_disconnected, etc.). */ "errorCode": string; /** Capability layer the error came from. Mirrors the event_log layer enum so dashboards can join errors against per-layer event counts. */ "layer": "audio" | "camera" | "speak" | "toggle" | "stream" | "transport" | "system"; } export interface FlowCompletedV1Properties { /** The triggerId that started this flow. */ "triggerId": string; /** Milliseconds from trigger.fired to flow.completed. Null if the bridge didn't observe both. */ "durationMs"?: number | null; /** Terminal state. Aborted covers explicit abort, timeout, and supersede. Failed indicates an unhandled error inside the flow. */ "outcome": "normal" | "aborted" | "failed"; } export interface SpecLoadedV1Properties { /** SHA-256 hash of the loaded spec's canonical JSON. No spec contents are transmitted. */ "specFingerprint": string; "triggerCount": number; "blockCount": number; } export interface StreamStartedV1Properties { /** Stream type identifier (video_stream, audio_stream, transcription_stream, etc.). */ "streamType": string; /** For video streams: e.g. '1280x720'. */ "resolution"?: string | null; "frameRate"?: number | null; /** For audio streams. */ "sampleRate"?: number | null; "bitsPerSample"?: number | null; "channels"?: number | null; "codec"?: string | null; "bitrate"?: number | null; /** BCP-47 tag for transcription streams. */ "language"?: string | null; "partialResultsEnabled"?: boolean | null; [key: string]: unknown; } export interface StreamStoppedV1Properties { "streamType": string; /** How long the stream was active. */ "durationMs": number; "resolution"?: string | null; "frameRate"?: number | null; "sampleRate"?: number | null; "bitsPerSample"?: number | null; "channels"?: number | null; "codec"?: string | null; "bitrate"?: number | null; "language"?: string | null; "partialResultsEnabled"?: boolean | null; [key: string]: unknown; } export interface ToggleChangedV1Properties { /** Toggle key from the AppSpec. */ "key": string; /** Which surface caused the change. */ "source": "ui" | "voice" | "automation"; } export interface TriggerFiredV1Properties { /** Stable trigger identifier from the AppSpec. */ "triggerId": string; /** Trigger type tag (voice_command, hardware_event, etc.) when the runtime knows it. */ "triggerType"?: string | null; } export declare const EVENT_DEFINITIONS: readonly EventDefinition[]; /** Latest registered version per event name. */ export declare const LATEST_EVENT_VERSION: Readonly>; //# sourceMappingURL=events.d.ts.map