11// DO NOT EDIT — auto-generated by sync-types.mjs
2- // Source: extension/src/services/telemetry/recording/types.ts
2+ // Source: extension/src/extension/ services/telemetry/recording/types.ts
33// ── Serialization helpers ─────────────────────────────────────────────
44
55export interface SerializedRange {
@@ -56,9 +56,16 @@ export interface BuildResultEvent {
5656 timestamp : number ;
5757 successful : boolean | undefined ;
5858 errorCount : number ;
59+ /** Legacy: flat array of detailText strings for failed test feedbacks. Kept for backwards compat. */
5960 failedTests : string [ ] ;
6061 buildFailed : boolean ;
6162 buildErrorFamilies ?: string [ ] ;
63+ // Scoping fields (added in Block F)
64+ exerciseId ?: number ;
65+ participationId ?: number ;
66+ submissionId ?: number ;
67+ /** Structured failed-test details carrying both the test name and the failure message. */
68+ failedTestDetails ?: { testName : string ; detail : string } [ ] ;
6269}
6370
6471export interface WindowFocusEvent {
@@ -80,7 +87,7 @@ export interface SessionStartEvent {
8087 exerciseId : number ;
8188 participantId : string | undefined ;
8289 exerciseRoot ?: string ;
83- /** Schema version for forward-compat parsing. Introduced in Block AB ( version 2) . */
90+ /** Schema version for forward-compat parsing. Block AB introduces version 2. */
8491 schemaVersion ?: number ;
8592}
8693
@@ -90,16 +97,47 @@ export interface SessionEndEvent {
9097 exerciseId : number ;
9198}
9299
100+ /**
101+ * Emitted when user consent is downgraded (or upgraded) mid-session.
102+ * Minimal payload — carries no user data — acts as a marker only. The
103+ * downgraded path is followed by a `sessionEnd` and metadata finalisation.
104+ */
105+ export interface ConsentChangeEvent {
106+ type : 'consentChange' ;
107+ timestamp : number ;
108+ level : 'downgraded' | 'upgraded' ;
109+ }
110+
111+ /**
112+ * Marker event indicating that all synchronous startup work (snapshots,
113+ * initial diagnostics, initial-state events, startup contributors) has been
114+ * flushed to the event stream. Consumers can use this as a cut-point for
115+ * deterministic "seed state vs. runtime events" separation.
116+ */
117+ export interface StartupPhaseCompleteEvent {
118+ type : 'startupPhaseComplete' ;
119+ timestamp : number ;
120+ }
121+
93122export interface IrisChatMessageEvent {
94123 type : 'irisChatMessage' ;
95124 timestamp : number ;
96125 direction : 'sent' | 'received' ;
97126 content : string ;
127+ // Added in Block H: optional metadata from server response / WebSocket payload
98128 messageId ?: string ;
99129 sessionId ?: string ;
100130 sentAt ?: number ;
101131}
102132
133+ /**
134+ * Records a send attempt lifecycle: pending (before API call), sent (on success),
135+ * or failed (on error). Emitted in addition to irisChatMessage so that:
136+ * - Failed sends (which produce no irisChatMessage) are still visible in the recording.
137+ * - The pending→sent timing is available for latency analysis.
138+ *
139+ * Lifecycle: pending → sent OR pending → failed
140+ */
103141export interface IrisChatSendAttemptEvent {
104142 type : 'irisChatSendAttempt' ;
105143 timestamp : number ;
@@ -108,6 +146,10 @@ export interface IrisChatSendAttemptEvent {
108146 errorMessage ?: string ;
109147}
110148
149+ /**
150+ * Records a helpful/unhelpful rating submitted by the user for a received
151+ * Iris message. Wired up when the webview's feedback UI fires the event.
152+ */
111153export interface IrisChatFeedbackEvent {
112154 type : 'irisChatFeedback' ;
113155 timestamp : number ;
@@ -143,12 +185,21 @@ export interface EqEngineStateEvent {
143185export interface InterventionEvent {
144186 type : 'intervention' ;
145187 timestamp : number ;
146- action : 'shown' | 'accepted' | 'dismissed' ;
188+ action : 'shown' | 'accepted' | 'dismissed' | 'blocked' ;
147189 level : 'subtle' | 'notification' | 'proactive' ;
148190 shouldIntervene : boolean ;
149191 eq : number ;
150192 confidence : 'sufficient' | 'insufficient' ;
151193 triggerType ?: 'execution-error' | 'multiline-paste' | 'idle' | 'selection-maintained' ;
194+ /** Populated when action='blocked'. Identifies why the intervention was blocked. */
195+ blockedReason ?: 'cooldown' | 'warmup' | 'session-limit' | 'low-confidence' ;
196+ /** Populated when action='dismissed'. Identifies how the intervention was dismissed. */
197+ dismissReason ?: 'user-action' | 'hidden' | 'replaced' | 'session-end' ;
198+ /**
199+ * Whether the EQ was above the severity threshold, regardless of confidence/guardrails.
200+ * Populated when action='blocked' to explain the signal that was suppressed.
201+ */
202+ rawWanted ?: boolean ;
152203}
153204
154205export interface ViewNavigationEvent {
@@ -199,10 +250,17 @@ export interface TerminalOpenCloseEvent {
199250 terminalName : string ;
200251}
201252
253+ /**
254+ * Emitted once per URI after three consecutive snapshot-write failures.
255+ * Acts as a permanent "give up" marker so consumers know a snapshot is
256+ * missing and why. Written via `_writeLifecycleEvent` (bypass phase gate)
257+ * only while recording is active.
258+ */
202259export interface FileSnapshotErrorEvent {
203260 type : 'fileSnapshotError' ;
204261 timestamp : number ;
205262 uri : string ;
263+ /** Short human-readable reason, e.g. 'snapshot-write-failed-after-3-retries' or an fs error message. */
206264 reason : string ;
207265}
208266
@@ -251,6 +309,8 @@ export type RecordedEvent =
251309 | FileSnapshotEvent
252310 | SessionStartEvent
253311 | SessionEndEvent
312+ | ConsentChangeEvent
313+ | StartupPhaseCompleteEvent
254314 | IrisChatMessageEvent
255315 | IrisChatSendAttemptEvent
256316 | IrisChatFeedbackEvent
@@ -279,7 +339,7 @@ export interface SessionMetadata {
279339 startTime : number ;
280340 endTime : number | undefined ;
281341 eventCount : number ;
282- /** Schema version for forward-compat parsing. Introduced in Block D ( version 2) . */
342+ /** Schema version for forward-compat parsing. Block D introduces version 2. */
283343 schemaVersion ?: number ;
284344 /** Recorder version string, set by storageWriter at write time. */
285345 recorderVersion ?: string ;
0 commit comments