@reticlehq/core 2.6.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -105,7 +105,30 @@ export declare const ReticleEnv: {
105
105
  /** Hard transport bounds shared by the browser and bridge. */
106
106
  export declare const TRANSPORT_LIMITS: {
107
107
  readonly MAX_MESSAGE_BYTES: number;
108
- readonly MAX_MESSAGES_PER_SECOND: 1000;
108
+ /**
109
+ * Inbound events per second before the bridge SAMPLES rather than records everything.
110
+ *
111
+ * This was 1000, and an ordinary React app with an active query cache blew through it: the
112
+ * reporter's FIRST `act_and_wait` of the session came back `unknown` with `unclean_capture` and a
113
+ * four-figure drop count, and setting the env override to twenty times the default fixed it (#316).
114
+ * Reticle was right to refuse the verdict — a sampled window cannot support one, and the guard that
115
+ * catches false greens is blindest exactly there — but landing that on the first drive after an
116
+ * install, recoverable only by knowing an environment variable exists and inventing a number for
117
+ * it, is the worst possible place to spend the honesty.
118
+ *
119
+ * 20000 is the value that was measured to work on the page that reported it. The cap exists to stop
120
+ * a PATHOLOGICAL page (an animation loop firing DOM mutations every frame), not to throttle a busy
121
+ * one, and the ceiling it has to defend is cheap: the daemon is on the same machine and a typical
122
+ * event is a few hundred bytes, so this is single-digit MB/s over loopback.
123
+ *
124
+ * Raising it does not raise what a runaway page can make the bridge HOLD, and that separation is
125
+ * what makes the change safe. Memory is bounded independently by the ring buffer, which evicts on
126
+ * `RING_BUFFER_DEFAULTS.MAX_BYTES` (this same constant, reached through that alias) as well as on
127
+ * a count and an age. Grep for `MAX_BUFFER_BYTES` alone and it looks like a constant nobody reads,
128
+ * which is exactly the wrong conclusion to draw before touching this number: the rate cap defends
129
+ * parse cost, the ring buffer defends memory, and they are not substitutes.
130
+ */
131
+ readonly MAX_MESSAGES_PER_SECOND: 20000;
109
132
  readonly MAX_SESSIONS: 32;
110
133
  readonly MAX_PENDING_CONNECTIONS: 16;
111
134
  readonly HELLO_TIMEOUT_MS: 5000;
@@ -191,6 +214,7 @@ export declare const VisualReason: {
191
214
  readonly BASELINE_MISSING: "baseline-missing";
192
215
  readonly DIMENSION_MISMATCH: "dimension-mismatch";
193
216
  readonly FULL_PAGE_UNSUPPORTED: "full-page-unsupported";
217
+ readonly NOT_COMPOSITED: "window-not-composited";
194
218
  };
195
219
  export type VisualReason = (typeof VisualReason)[keyof typeof VisualReason];
196
220
  /** Actionable companion to NO_PROVIDER — the visual layer needs a driven browser. */
package/dist/constants.js CHANGED
@@ -107,7 +107,30 @@ export const ReticleEnv = {
107
107
  /** Hard transport bounds shared by the browser and bridge. */
108
108
  export const TRANSPORT_LIMITS = {
109
109
  MAX_MESSAGE_BYTES: 1024 * 1024,
110
- MAX_MESSAGES_PER_SECOND: 1000,
110
+ /**
111
+ * Inbound events per second before the bridge SAMPLES rather than records everything.
112
+ *
113
+ * This was 1000, and an ordinary React app with an active query cache blew through it: the
114
+ * reporter's FIRST `act_and_wait` of the session came back `unknown` with `unclean_capture` and a
115
+ * four-figure drop count, and setting the env override to twenty times the default fixed it (#316).
116
+ * Reticle was right to refuse the verdict — a sampled window cannot support one, and the guard that
117
+ * catches false greens is blindest exactly there — but landing that on the first drive after an
118
+ * install, recoverable only by knowing an environment variable exists and inventing a number for
119
+ * it, is the worst possible place to spend the honesty.
120
+ *
121
+ * 20000 is the value that was measured to work on the page that reported it. The cap exists to stop
122
+ * a PATHOLOGICAL page (an animation loop firing DOM mutations every frame), not to throttle a busy
123
+ * one, and the ceiling it has to defend is cheap: the daemon is on the same machine and a typical
124
+ * event is a few hundred bytes, so this is single-digit MB/s over loopback.
125
+ *
126
+ * Raising it does not raise what a runaway page can make the bridge HOLD, and that separation is
127
+ * what makes the change safe. Memory is bounded independently by the ring buffer, which evicts on
128
+ * `RING_BUFFER_DEFAULTS.MAX_BYTES` (this same constant, reached through that alias) as well as on
129
+ * a count and an age. Grep for `MAX_BUFFER_BYTES` alone and it looks like a constant nobody reads,
130
+ * which is exactly the wrong conclusion to draw before touching this number: the rate cap defends
131
+ * parse cost, the ring buffer defends memory, and they are not substitutes.
132
+ */
133
+ MAX_MESSAGES_PER_SECOND: 20000,
111
134
  MAX_SESSIONS: 32,
112
135
  MAX_PENDING_CONNECTIONS: 16,
113
136
  HELLO_TIMEOUT_MS: 5000,
@@ -196,6 +219,12 @@ export const VisualReason = {
196
219
  // quietly downgraded: a caller who asked for the whole scroll height and silently got the visible
197
220
  // part would bank a baseline that says nothing about the content below the fold.
198
221
  FULL_PAGE_UNSUPPORTED: 'full-page-unsupported',
222
+ // The shell answered, and the window had no composited frame to photograph yet. Distinct from
223
+ // CAPTURE_FAILED on purpose: the capture ran and the window was empty, which is a timing fact
224
+ // about the window rather than a failure of the capture path. Electron's `capturePage()` returns
225
+ // an empty image rather than an error in that state, so without a name of its own it arrived as
226
+ // an unexplained no-image and read identically to a dead window and to a thrown error.
227
+ NOT_COMPOSITED: 'window-not-composited',
199
228
  };
200
229
  /** Actionable companion to NO_PROVIDER — the visual layer needs a driven browser. */
201
230
  export const VISUAL_NO_PROVIDER_RECOMMENDATION = 'visual capture needs a driven browser — start with `reticle drive <url>` or set RETICLE_CDP_URL; the always-on SDK does not ship a screenshotter';
@@ -8,4 +8,5 @@ exports.RETICLE_CAPTURE_CHANNEL = "__reticle:capture";
8
8
  exports.RETICLE_CAPTURE_FILE_PREFIX = "reticle-capture-";
9
9
  exports.RETICLE_TAURI_CAPTURE_COMMAND = "reticle_capture";
10
10
  exports.RETICLE_FULL_PAGE_UNSUPPORTED = "full-page-unsupported";
11
+ exports.RETICLE_NOT_COMPOSITED = "window-not-composited";
11
12
  Object.freeze(exports);
@@ -4,3 +4,4 @@ export declare const RETICLE_CAPTURE_CHANNEL: "__reticle:capture";
4
4
  export declare const RETICLE_CAPTURE_FILE_PREFIX: "reticle-capture-";
5
5
  export declare const RETICLE_TAURI_CAPTURE_COMMAND: "reticle_capture";
6
6
  export declare const RETICLE_FULL_PAGE_UNSUPPORTED: "full-page-unsupported";
7
+ export declare const RETICLE_NOT_COMPOSITED: "window-not-composited";
@@ -43,6 +43,15 @@ export declare const RETICLE_TAURI_CAPTURE_COMMAND = "reticle_capture";
43
43
  * preload (CommonJS) and the daemon must agree on it without sharing a module graph.
44
44
  */
45
45
  export declare const RETICLE_FULL_PAGE_UNSUPPORTED: string;
46
+ /**
47
+ * What a shell answers when the window had no composited frame to photograph.
48
+ *
49
+ * Electron's `capturePage()` returns an EMPTY image in that state rather than an error, and the
50
+ * handler used to turn that into the same bare null it returned for a dead window and for any thrown
51
+ * error. Three different problems, one silence: the tool reported no bytes and no reason, which cost
52
+ * a CI investigation and gives a user hitting it nothing to act on.
53
+ */
54
+ export declare const RETICLE_NOT_COMPOSITED: string;
46
55
  /**
47
56
  * Every value the generated CommonJS shim must expose, as `name → value`.
48
57
  *
@@ -55,4 +64,5 @@ export declare const DESKTOP_CONTRACT: {
55
64
  readonly RETICLE_CAPTURE_FILE_PREFIX: "reticle-capture-";
56
65
  readonly RETICLE_TAURI_CAPTURE_COMMAND: "reticle_capture";
57
66
  readonly RETICLE_FULL_PAGE_UNSUPPORTED: string;
67
+ readonly RETICLE_NOT_COMPOSITED: string;
58
68
  };
@@ -44,6 +44,15 @@ export const RETICLE_TAURI_CAPTURE_COMMAND = 'reticle_capture';
44
44
  * preload (CommonJS) and the daemon must agree on it without sharing a module graph.
45
45
  */
46
46
  export const RETICLE_FULL_PAGE_UNSUPPORTED = VisualReason.FULL_PAGE_UNSUPPORTED;
47
+ /**
48
+ * What a shell answers when the window had no composited frame to photograph.
49
+ *
50
+ * Electron's `capturePage()` returns an EMPTY image in that state rather than an error, and the
51
+ * handler used to turn that into the same bare null it returned for a dead window and for any thrown
52
+ * error. Three different problems, one silence: the tool reported no bytes and no reason, which cost
53
+ * a CI investigation and gives a user hitting it nothing to act on.
54
+ */
55
+ export const RETICLE_NOT_COMPOSITED = VisualReason.NOT_COMPOSITED;
47
56
  /**
48
57
  * Every value the generated CommonJS shim must expose, as `name → value`.
49
58
  *
@@ -56,4 +65,5 @@ export const DESKTOP_CONTRACT = {
56
65
  RETICLE_CAPTURE_FILE_PREFIX,
57
66
  RETICLE_TAURI_CAPTURE_COMMAND,
58
67
  RETICLE_FULL_PAGE_UNSUPPORTED,
68
+ RETICLE_NOT_COMPOSITED,
59
69
  };
@@ -110,6 +110,37 @@ export declare const ContradictionKind: {
110
110
  readonly ROUTE_RENDERED_NOTHING: "route-rendered-nothing";
111
111
  };
112
112
  export type ContradictionKind = (typeof ContradictionKind)[keyof typeof ContradictionKind];
113
+ /**
114
+ * Contradictions inferred from the ABSENCE of evidence in a window whose end Reticle itself chose.
115
+ *
116
+ * The distinction is not cosmetic — it decides whether Reticle is entitled to say an action FAILED.
117
+ * The other kinds are things we positively observed: a request came back 500 while the UI advanced,
118
+ * a signal fired carrying data that disagrees with the DOM, a written field echoed a different
119
+ * value. Those are evidence AGAINST the action, and they must keep outranking a passing assertion,
120
+ * because a green assertion sitting on top of a failed write is the entire bug class this product
121
+ * exists to catch.
122
+ *
123
+ * These five are different. Each says "the thing I expected to see had not happened YET when I
124
+ * stopped looking" — and the window closes the moment the predicate first passes, which on an app
125
+ * that navigates optimistically is routinely before the network drains. Reproduced on the bench app:
126
+ * `auth:granted` fired WITH matching data, application state changed, the token was stored, capture
127
+ * integrity was clean and the honesty grade was `signal` — our strongest evidence class — and the
128
+ * verdict was still `no`, because one POST had not settled. A timing observation overruled a
129
+ * consequence observation, which inverts the grade hierarchy the verifier is built on.
130
+ *
131
+ * A false negative is not the mirror of a false positive here. A false positive stops an agent
132
+ * early; a false NEGATIVE makes it redo work that already succeeded, or stop trusting the verdict
133
+ * channel — and the verdict channel is the product. `bug.attribution` was deleted for exactly this
134
+ * reason: every `attribution: 'app'` on `request-never-settled` turned out to be a misattribution.
135
+ * We removed the field and left the verdict.
136
+ *
137
+ * So these downgrade a verdict to UNKNOWN rather than asserting NO. The finding is still reported in
138
+ * `contradictions` either way — nothing is hidden, and an agent that wants to wait and re-check has
139
+ * everything it needs to.
140
+ */
141
+ export declare const ABSENCE_DERIVED_CONTRADICTIONS: ReadonlySet<ContradictionKind>;
142
+ /** True when this kind was inferred from absence rather than positively observed. */
143
+ export declare function isAbsenceDerived(kind: string): boolean;
113
144
  /**
114
145
  * HTTP methods that CHANGE server state. Several contradiction rules are restricted to these on
115
146
  * purpose: a GET that fires without moving the UI is a prefetch, but a POST that does is a lost
package/dist/findings.js CHANGED
@@ -109,6 +109,45 @@ export const ContradictionKind = {
109
109
  */
110
110
  ROUTE_RENDERED_NOTHING: 'route-rendered-nothing',
111
111
  };
112
+ /**
113
+ * Contradictions inferred from the ABSENCE of evidence in a window whose end Reticle itself chose.
114
+ *
115
+ * The distinction is not cosmetic — it decides whether Reticle is entitled to say an action FAILED.
116
+ * The other kinds are things we positively observed: a request came back 500 while the UI advanced,
117
+ * a signal fired carrying data that disagrees with the DOM, a written field echoed a different
118
+ * value. Those are evidence AGAINST the action, and they must keep outranking a passing assertion,
119
+ * because a green assertion sitting on top of a failed write is the entire bug class this product
120
+ * exists to catch.
121
+ *
122
+ * These five are different. Each says "the thing I expected to see had not happened YET when I
123
+ * stopped looking" — and the window closes the moment the predicate first passes, which on an app
124
+ * that navigates optimistically is routinely before the network drains. Reproduced on the bench app:
125
+ * `auth:granted` fired WITH matching data, application state changed, the token was stored, capture
126
+ * integrity was clean and the honesty grade was `signal` — our strongest evidence class — and the
127
+ * verdict was still `no`, because one POST had not settled. A timing observation overruled a
128
+ * consequence observation, which inverts the grade hierarchy the verifier is built on.
129
+ *
130
+ * A false negative is not the mirror of a false positive here. A false positive stops an agent
131
+ * early; a false NEGATIVE makes it redo work that already succeeded, or stop trusting the verdict
132
+ * channel — and the verdict channel is the product. `bug.attribution` was deleted for exactly this
133
+ * reason: every `attribution: 'app'` on `request-never-settled` turned out to be a misattribution.
134
+ * We removed the field and left the verdict.
135
+ *
136
+ * So these downgrade a verdict to UNKNOWN rather than asserting NO. The finding is still reported in
137
+ * `contradictions` either way — nothing is hidden, and an agent that wants to wait and re-check has
138
+ * everything it needs to.
139
+ */
140
+ export const ABSENCE_DERIVED_CONTRADICTIONS = new Set([
141
+ ContradictionKind.REQUEST_NEVER_SETTLED,
142
+ ContradictionKind.RESPONSE_IGNORED,
143
+ ContradictionKind.ROUTE_RENDERED_NOTHING,
144
+ ContradictionKind.ACTION_HAD_NO_EFFECT,
145
+ ContradictionKind.DUPLICATE_REQUEST,
146
+ ]);
147
+ /** True when this kind was inferred from absence rather than positively observed. */
148
+ export function isAbsenceDerived(kind) {
149
+ return ABSENCE_DERIVED_CONTRADICTIONS.has(kind);
150
+ }
112
151
  /**
113
152
  * HTTP methods that CHANGE server state. Several contradiction rules are restricted to these on
114
153
  * purpose: a GET that fires without moving the UI is a prefetch, but a POST that does is a lost
@@ -44,6 +44,8 @@ export declare const PROJECT_RUN_CAP: {
44
44
  readonly PER_NAME: 50;
45
45
  readonly TOTAL: 200;
46
46
  };
47
+ /** Maximum distinct route identities retained in project.json. */
48
+ export declare const PROJECT_ROUTE_CAP = 200;
47
49
  /** Schema version stamped onto on-disk flow files (.reticle/flows/<name>.json). */
48
50
  export declare const FLOW_FILE_VERSION = 1;
49
51
  /** How a flow step is anchored to the live DOM at replay time (semantic, never a volatile ref). */
@@ -41,6 +41,8 @@ export const PROJECT_RUN_CAP = {
41
41
  PER_NAME: 50,
42
42
  TOTAL: 200,
43
43
  };
44
+ /** Maximum distinct route identities retained in project.json. */
45
+ export const PROJECT_ROUTE_CAP = 200;
44
46
  /** Schema version stamped onto on-disk flow files (.reticle/flows/<name>.json). */
45
47
  export const FLOW_FILE_VERSION = 1;
46
48
  /** How a flow step is anchored to the live DOM at replay time (semantic, never a volatile ref). */
package/dist/notices.d.ts CHANGED
@@ -25,7 +25,7 @@ export declare function isPresenterTone(value: unknown): value is PresenterTone;
25
25
  * eviction may be "I dropped the evidence", not "it never happened" — widen the buffer / grade
26
26
  * sooner. Rides in a `buffer` block only when `dropped > 0` (silence ⇒ nothing lost).
27
27
  */
28
- export declare const BUFFER_EVICTION_WARNING = "event buffer evicted older events (age/size cap) \u2014 a negative result here may be a false negative; the evidence may have expired. Grade sooner or widen the buffer.";
28
+ export declare const BUFFER_EVICTION_WARNING = "event buffer evicted older events (age/size cap): a negative result here may be a false negative; the evidence may have expired. Grade sooner or widen the buffer.";
29
29
  /**
30
30
  * Thrown when a tool needs a live browser session and none is connected. Names the #1 real cause in a
31
31
  * multi-repo / multi-agent setup — a PORT MISMATCH between the app's SDK and the daemon — so the agent
@@ -33,7 +33,7 @@ export declare const BUFFER_EVICTION_WARNING = "event buffer evicted older event
33
33
  */
34
34
  export declare const NO_SESSION_CONNECTED_ERROR = "no browser session connected. Two things to check: (1) your app is running with @reticlehq/browser enabled, and (2) it points at THIS daemon's port \u2014 a mismatch between the app's reticle({ port }) / VITE_RETICLE_WS_URL and the daemon's RETICLE_PORT is the usual cause. reticle_wait_ready blocks briefly for a session to appear.";
35
35
  /** Surfaced on act/assert results when the target tab is throttled. */
36
- export declare const THROTTLED_WARNING = "tab throttled; timer/rAF/pointer gestures may silently no-op \u2014 refocus before driving";
36
+ export declare const THROTTLED_WARNING = "tab throttled; timer/rAF/pointer gestures may silently no-op; refocus before driving";
37
37
  /**
38
38
  * Pushed to the panel when the last agent's MCP connection drops — the agent (any of
39
39
  * Codex/OpenCode/Claude/Hermes) has stopped or is waiting on you. Tells the human, who is
package/dist/notices.js CHANGED
@@ -29,7 +29,7 @@ export function isPresenterTone(value) {
29
29
  * eviction may be "I dropped the evidence", not "it never happened" — widen the buffer / grade
30
30
  * sooner. Rides in a `buffer` block only when `dropped > 0` (silence ⇒ nothing lost).
31
31
  */
32
- export const BUFFER_EVICTION_WARNING = 'event buffer evicted older events (age/size cap) — a negative result here may be a false negative; the evidence may have expired. Grade sooner or widen the buffer.';
32
+ export const BUFFER_EVICTION_WARNING = 'event buffer evicted older events (age/size cap): a negative result here may be a false negative; the evidence may have expired. Grade sooner or widen the buffer.';
33
33
  /**
34
34
  * Thrown when a tool needs a live browser session and none is connected. Names the #1 real cause in a
35
35
  * multi-repo / multi-agent setup — a PORT MISMATCH between the app's SDK and the daemon — so the agent
@@ -37,7 +37,7 @@ export const BUFFER_EVICTION_WARNING = 'event buffer evicted older events (age/s
37
37
  */
38
38
  export const NO_SESSION_CONNECTED_ERROR = "no browser session connected. Two things to check: (1) your app is running with @reticlehq/browser enabled, and (2) it points at THIS daemon's port — a mismatch between the app's reticle({ port }) / VITE_RETICLE_WS_URL and the daemon's RETICLE_PORT is the usual cause. reticle_wait_ready blocks briefly for a session to appear.";
39
39
  /** Surfaced on act/assert results when the target tab is throttled. */
40
- export const THROTTLED_WARNING = 'tab throttled; timer/rAF/pointer gestures may silently no-op — refocus before driving';
40
+ export const THROTTLED_WARNING = 'tab throttled; timer/rAF/pointer gestures may silently no-op; refocus before driving';
41
41
  /**
42
42
  * Pushed to the panel when the last agent's MCP connection drops — the agent (any of
43
43
  * Codex/OpenCode/Claude/Hermes) has stopped or is waiting on you. Tells the human, who is
@@ -374,7 +374,7 @@ export declare const SessionSummarySchema: z.ZodObject<{
374
374
  * Zero here is the single most diagnostic number in the payload: the daemon ran and no app ever
375
375
  * connected, which is a BROKEN INSTALL. Non-zero with no tool calls is the opposite problem — the
376
376
  * install works and the agent never asked. Before this field those two were the same row, and
377
- * they have opposite fixes. Measured 2026-08-10/11: 88 of 116 users attached an agent and never
377
+ * they have opposite fixes. In the field most users who attached an agent never
378
378
  * drove, and we could not say which case any of them was.
379
379
  *
380
380
  * A counter rather than an event because the SDK reconnects on every page reload — an event per
@@ -394,7 +394,7 @@ export declare const SessionSummarySchema: z.ZodObject<{
394
394
  * Distinct from `exit`, which says why the PROCESS ended. A daemon can exit tidily on idle while
395
395
  * the agent's work was abandoned mid-task, and those are different findings.
396
396
  *
397
- * Measured 2026-08-10/11: 20 of the 28 agents that drove an app produced no verdict, and nothing
397
+ * In the field most agents that drove an app produced no verdict, and nothing
398
398
  * could say whether that was a product failure or a task that simply ended.
399
399
  *
400
400
  * Most of this is derivable at query time from `toolCalls` / `verifications` /
@@ -430,13 +430,27 @@ export declare const SessionSummarySchema: z.ZodObject<{
430
430
  errorsRecovered: z.ZodOptional<z.ZodNumber>;
431
431
  /** Errors whose very next call failed again — the message did not land. */
432
432
  errorsRepeated: z.ZodOptional<z.ZodNumber>;
433
+ /**
434
+ * Did this session ever produce a verdict? Absent on a periodic flush — nothing has ended yet.
435
+ *
436
+ * This is the release's headline metric and it was the one thing in the payload that had to be
437
+ * COMPUTED rather than read: `verifications > 0` over the lifetime counters, which are windowed on
438
+ * every other event in the stream, so the obvious query over `session_progress` answers a
439
+ * different question and looks like it answers this one. A metric that requires a correct
440
+ * subtraction to read is a metric that gets read wrong, and this one decides what the product is
441
+ * allowed to claim.
442
+ *
443
+ * ALWAYS present on a final summary, including `false`: a session that drove an app and never
444
+ * asked whether it worked is the finding, so absence and `false` must not look alike.
445
+ */
446
+ endedWithVerdict: z.ZodOptional<z.ZodBoolean>;
433
447
  /** Was this a clean shutdown, or a periodic flush of a still-running session? */
434
448
  final: z.ZodBoolean;
435
449
  /**
436
450
  * WHY the daemon exited. Absent on a periodic flush (`final: false`) — nothing exited.
437
451
  *
438
- * Without this, a designed exit and a real failure are the same row. Measured 2026-08-10/11: 299
439
- * of 321 `mcp_connection_lost` events were `sse_ended` — the stream the daemon closes on its own
452
+ * Without this, a designed exit and a real failure are the same row. In the field the large
453
+ * majority of `mcp_connection_lost` events were `sse_ended` — the stream the daemon closes on its own
440
454
  * scheduled idle shutdown — so the metric meant to say "the agent lost its tools" was mostly
441
455
  * counting the daemon going to sleep as designed, and a genuine outage was invisible inside it.
442
456
  *
@@ -504,6 +518,7 @@ export declare const SessionSummarySchema: z.ZodObject<{
504
518
  errorClasses?: Record<string, number> | undefined;
505
519
  errorsRecovered?: number | undefined;
506
520
  errorsRepeated?: number | undefined;
521
+ endedWithVerdict?: boolean | undefined;
507
522
  exit?: "signal" | "idle" | "unknown" | undefined;
508
523
  }, {
509
524
  durationMs: number;
@@ -564,6 +579,7 @@ export declare const SessionSummarySchema: z.ZodObject<{
564
579
  errorClasses?: Record<string, number> | undefined;
565
580
  errorsRecovered?: number | undefined;
566
581
  errorsRepeated?: number | undefined;
582
+ endedWithVerdict?: boolean | undefined;
567
583
  exit?: "signal" | "idle" | "unknown" | undefined;
568
584
  }>;
569
585
  export type SessionSummary = z.infer<typeof SessionSummarySchema>;
@@ -598,8 +614,8 @@ export declare const ProjectProfileSchema: z.ZodObject<{
598
614
  * help, which is the question that decides whether an agent-correction surface is worth building
599
615
  * at all.
600
616
  *
601
- * Measured 2026-08-10/11, before discovery existed here: stack was detected on **0 of the 77
602
- * projects where Reticle was demonstrably set up**, and 0 of 166 `size: huge` ones. A detector
617
+ * Before discovery existed here, stack was detected on **none of the projects where Reticle was
618
+ * demonstrably set up**, and none of the large ones either. A detector
603
619
  * that reads one directory reports nothing precisely where the real repos are.
604
620
  */
605
621
  stackSource: z.ZodOptional<z.ZodEnum<["cwd", "workspace"]>>;
@@ -243,7 +243,7 @@ export const SessionSummarySchema = z.object({
243
243
  * Zero here is the single most diagnostic number in the payload: the daemon ran and no app ever
244
244
  * connected, which is a BROKEN INSTALL. Non-zero with no tool calls is the opposite problem — the
245
245
  * install works and the agent never asked. Before this field those two were the same row, and
246
- * they have opposite fixes. Measured 2026-08-10/11: 88 of 116 users attached an agent and never
246
+ * they have opposite fixes. In the field most users who attached an agent never
247
247
  * drove, and we could not say which case any of them was.
248
248
  *
249
249
  * A counter rather than an event because the SDK reconnects on every page reload — an event per
@@ -263,7 +263,7 @@ export const SessionSummarySchema = z.object({
263
263
  * Distinct from `exit`, which says why the PROCESS ended. A daemon can exit tidily on idle while
264
264
  * the agent's work was abandoned mid-task, and those are different findings.
265
265
  *
266
- * Measured 2026-08-10/11: 20 of the 28 agents that drove an app produced no verdict, and nothing
266
+ * In the field most agents that drove an app produced no verdict, and nothing
267
267
  * could say whether that was a product failure or a task that simply ended.
268
268
  *
269
269
  * Most of this is derivable at query time from `toolCalls` / `verifications` /
@@ -299,13 +299,27 @@ export const SessionSummarySchema = z.object({
299
299
  errorsRecovered: z.number().int().nonnegative().optional(),
300
300
  /** Errors whose very next call failed again — the message did not land. */
301
301
  errorsRepeated: z.number().int().nonnegative().optional(),
302
+ /**
303
+ * Did this session ever produce a verdict? Absent on a periodic flush — nothing has ended yet.
304
+ *
305
+ * This is the release's headline metric and it was the one thing in the payload that had to be
306
+ * COMPUTED rather than read: `verifications > 0` over the lifetime counters, which are windowed on
307
+ * every other event in the stream, so the obvious query over `session_progress` answers a
308
+ * different question and looks like it answers this one. A metric that requires a correct
309
+ * subtraction to read is a metric that gets read wrong, and this one decides what the product is
310
+ * allowed to claim.
311
+ *
312
+ * ALWAYS present on a final summary, including `false`: a session that drove an app and never
313
+ * asked whether it worked is the finding, so absence and `false` must not look alike.
314
+ */
315
+ endedWithVerdict: z.boolean().optional(),
302
316
  /** Was this a clean shutdown, or a periodic flush of a still-running session? */
303
317
  final: z.boolean(),
304
318
  /**
305
319
  * WHY the daemon exited. Absent on a periodic flush (`final: false`) — nothing exited.
306
320
  *
307
- * Without this, a designed exit and a real failure are the same row. Measured 2026-08-10/11: 299
308
- * of 321 `mcp_connection_lost` events were `sse_ended` — the stream the daemon closes on its own
321
+ * Without this, a designed exit and a real failure are the same row. In the field the large
322
+ * majority of `mcp_connection_lost` events were `sse_ended` — the stream the daemon closes on its own
309
323
  * scheduled idle shutdown — so the metric meant to say "the agent lost its tools" was mostly
310
324
  * counting the daemon going to sleep as designed, and a genuine outage was invisible inside it.
311
325
  *
@@ -345,8 +359,8 @@ export const ProjectProfileSchema = z.object({
345
359
  * help, which is the question that decides whether an agent-correction surface is worth building
346
360
  * at all.
347
361
  *
348
- * Measured 2026-08-10/11, before discovery existed here: stack was detected on **0 of the 77
349
- * projects where Reticle was demonstrably set up**, and 0 of 166 `size: huge` ones. A detector
362
+ * Before discovery existed here, stack was detected on **none of the projects where Reticle was
363
+ * demonstrably set up**, and none of the large ones either. A detector
350
364
  * that reads one directory reports nothing precisely where the real repos are.
351
365
  */
352
366
  stackSource: z.enum(['cwd', 'workspace']).optional(),