@reticlehq/core 2.2.1 → 2.4.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.
Files changed (104) hide show
  1. package/dist/brand.d.ts +0 -1
  2. package/dist/brand.js +0 -1
  3. package/dist/consequence.d.ts +0 -1
  4. package/dist/consequence.js +0 -1
  5. package/dist/constants.d.ts +30 -33
  6. package/dist/constants.js +33 -31
  7. package/dist/daemon-registry.d.ts +0 -1
  8. package/dist/daemon-registry.js +0 -1
  9. package/dist/desktop-contract.cjs +11 -0
  10. package/dist/desktop-contract.d.cts +6 -0
  11. package/dist/desktop-contract.d.ts +58 -0
  12. package/dist/desktop-contract.js +59 -0
  13. package/dist/event-payloads.d.ts +62 -5
  14. package/dist/event-payloads.js +35 -4
  15. package/dist/event-priority.d.ts +25 -0
  16. package/dist/event-priority.js +45 -0
  17. package/dist/findings.d.ts +124 -0
  18. package/dist/findings.js +122 -0
  19. package/dist/flow-constants.d.ts +0 -1
  20. package/dist/flow-constants.js +0 -1
  21. package/dist/flow-types.d.ts +26 -2
  22. package/dist/flow-types.js +0 -1
  23. package/dist/index.d.ts +8 -1
  24. package/dist/index.js +9 -2
  25. package/dist/journal.d.ts +0 -1
  26. package/dist/journal.js +0 -1
  27. package/dist/messages.d.ts +40 -11
  28. package/dist/messages.js +14 -1
  29. package/dist/net.d.ts +41 -0
  30. package/dist/net.js +40 -0
  31. package/dist/notices.d.ts +0 -1
  32. package/dist/notices.js +0 -1
  33. package/dist/redaction.d.ts +64 -1
  34. package/dist/redaction.js +119 -3
  35. package/dist/schema/event-message.json +3 -1
  36. package/dist/schema/event-type.json +3 -1
  37. package/dist/schema/hello-message.json +9 -0
  38. package/dist/schema/reticle-event.json +3 -1
  39. package/dist/schema/reticle-message.json +12 -1
  40. package/dist/security.d.ts +20 -1
  41. package/dist/security.js +45 -1
  42. package/dist/session-constants.d.ts +0 -1
  43. package/dist/session-constants.js +0 -1
  44. package/dist/source-constants.d.ts +26 -0
  45. package/dist/source-constants.js +26 -0
  46. package/dist/state-select.d.ts +10 -1
  47. package/dist/state-select.js +56 -8
  48. package/dist/telemetry-feedback.d.ts +265 -0
  49. package/dist/telemetry-feedback.js +163 -0
  50. package/dist/telemetry-session.d.ts +524 -0
  51. package/dist/telemetry-session.js +245 -0
  52. package/dist/telemetry.d.ts +1410 -37
  53. package/dist/telemetry.js +338 -18
  54. package/dist/toon.d.ts +0 -1
  55. package/dist/toon.js +0 -1
  56. package/dist/types.d.ts +15 -8
  57. package/dist/types.js +0 -1
  58. package/dist/upgrade.d.ts +0 -1
  59. package/dist/upgrade.js +0 -1
  60. package/dist/verification-run.d.ts +14 -15
  61. package/dist/verification-run.js +0 -1
  62. package/dist/verified-constants.d.ts +104 -0
  63. package/dist/verified-constants.js +102 -0
  64. package/package.json +7 -3
  65. package/dist/brand.d.ts.map +0 -1
  66. package/dist/brand.js.map +0 -1
  67. package/dist/consequence.d.ts.map +0 -1
  68. package/dist/consequence.js.map +0 -1
  69. package/dist/constants.d.ts.map +0 -1
  70. package/dist/constants.js.map +0 -1
  71. package/dist/daemon-registry.d.ts.map +0 -1
  72. package/dist/daemon-registry.js.map +0 -1
  73. package/dist/event-payloads.d.ts.map +0 -1
  74. package/dist/event-payloads.js.map +0 -1
  75. package/dist/flow-constants.d.ts.map +0 -1
  76. package/dist/flow-constants.js.map +0 -1
  77. package/dist/flow-types.d.ts.map +0 -1
  78. package/dist/flow-types.js.map +0 -1
  79. package/dist/index.d.ts.map +0 -1
  80. package/dist/index.js.map +0 -1
  81. package/dist/journal.d.ts.map +0 -1
  82. package/dist/journal.js.map +0 -1
  83. package/dist/messages.d.ts.map +0 -1
  84. package/dist/messages.js.map +0 -1
  85. package/dist/notices.d.ts.map +0 -1
  86. package/dist/notices.js.map +0 -1
  87. package/dist/redaction.d.ts.map +0 -1
  88. package/dist/redaction.js.map +0 -1
  89. package/dist/security.d.ts.map +0 -1
  90. package/dist/security.js.map +0 -1
  91. package/dist/session-constants.d.ts.map +0 -1
  92. package/dist/session-constants.js.map +0 -1
  93. package/dist/state-select.d.ts.map +0 -1
  94. package/dist/state-select.js.map +0 -1
  95. package/dist/telemetry.d.ts.map +0 -1
  96. package/dist/telemetry.js.map +0 -1
  97. package/dist/toon.d.ts.map +0 -1
  98. package/dist/toon.js.map +0 -1
  99. package/dist/types.d.ts.map +0 -1
  100. package/dist/types.js.map +0 -1
  101. package/dist/upgrade.d.ts.map +0 -1
  102. package/dist/upgrade.js.map +0 -1
  103. package/dist/verification-run.d.ts.map +0 -1
  104. package/dist/verification-run.js.map +0 -1
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Which events survive the bridge's rate cap.
3
+ *
4
+ * The cap exists because a busy app can emit faster than the bridge can absorb. But dropping
5
+ * indiscriminately is the wrong sampling policy: event volume is inversely correlated with event
6
+ * value. A React commit storm emits thousands of `render.commit`/`dom.*` per second, while the events
7
+ * an assertion actually turns on — a network call, an uncaught error, a route change — are rare.
8
+ * First-come-first-dropped therefore spends the whole budget on churn and loses exactly the signal
9
+ * the agent asked about.
10
+ *
11
+ * Measured on a react-admin renderer with a render loop: 11,138 events dropped in one window, and the
12
+ * single IPC call under test was among them. The assertion came back `unknown` — honest, but blind.
13
+ *
14
+ * So over the cap we drop the high-volume/low-value kinds first and keep a reserve for these. The
15
+ * reserve is bounded (see RATE_CAP_HIGH_VALUE_RESERVE_RATIO) — a flood of errors is still a flood,
16
+ * and going unbounded here would just move the overload rather than shed it.
17
+ */
18
+ export declare const HIGH_VALUE_EVENT_TYPES: ReadonlySet<string>;
19
+ /**
20
+ * The over-cap reserve for high-value events, as a multiple of the cap. Total admitted per second is
21
+ * therefore bounded at `cap * (1 + ratio)` — still a hard bound, just one that spends its last slots
22
+ * on the events worth keeping.
23
+ */
24
+ export declare const RATE_CAP_HIGH_VALUE_RESERVE_RATIO = 1;
25
+ export declare function isHighValueEvent(type: string): boolean;
@@ -0,0 +1,45 @@
1
+ import { EventType } from './constants.js';
2
+ /**
3
+ * Which events survive the bridge's rate cap.
4
+ *
5
+ * The cap exists because a busy app can emit faster than the bridge can absorb. But dropping
6
+ * indiscriminately is the wrong sampling policy: event volume is inversely correlated with event
7
+ * value. A React commit storm emits thousands of `render.commit`/`dom.*` per second, while the events
8
+ * an assertion actually turns on — a network call, an uncaught error, a route change — are rare.
9
+ * First-come-first-dropped therefore spends the whole budget on churn and loses exactly the signal
10
+ * the agent asked about.
11
+ *
12
+ * Measured on a react-admin renderer with a render loop: 11,138 events dropped in one window, and the
13
+ * single IPC call under test was among them. The assertion came back `unknown` — honest, but blind.
14
+ *
15
+ * So over the cap we drop the high-volume/low-value kinds first and keep a reserve for these. The
16
+ * reserve is bounded (see RATE_CAP_HIGH_VALUE_RESERVE_RATIO) — a flood of errors is still a flood,
17
+ * and going unbounded here would just move the overload rather than shed it.
18
+ */
19
+ export const HIGH_VALUE_EVENT_TYPES = new Set([
20
+ EventType.NET_REQUEST,
21
+ EventType.NET_PENDING,
22
+ EventType.NET_STREAM,
23
+ EventType.NET_DETAIL,
24
+ EventType.CONSOLE_ERROR,
25
+ EventType.CONSOLE_WARN,
26
+ EventType.ERROR_UNCAUGHT,
27
+ EventType.ROUTE_CHANGE,
28
+ EventType.SIGNAL,
29
+ EventType.STORAGE_CHANGE,
30
+ EventType.FLOW_RECORDED,
31
+ // The synthetic honesty events. Dropping these is self-defeating: they are how a sampled window
32
+ // announces that it is sampled, so losing them turns a known blind spot into a silent one.
33
+ EventType.TRANSPORT_OVERFLOW,
34
+ EventType.TRUNCATED,
35
+ EventType.BLIND_SPOT,
36
+ ]);
37
+ /**
38
+ * The over-cap reserve for high-value events, as a multiple of the cap. Total admitted per second is
39
+ * therefore bounded at `cap * (1 + ratio)` — still a hard bound, just one that spends its last slots
40
+ * on the events worth keeping.
41
+ */
42
+ export const RATE_CAP_HIGH_VALUE_RESERVE_RATIO = 1;
43
+ export function isHighValueEvent(type) {
44
+ return HIGH_VALUE_EVENT_TYPES.has(type);
45
+ }
@@ -0,0 +1,124 @@
1
+ /**
2
+ * What a verification can FIND — the vocabulary of faults and contradictions shared by the crawl,
3
+ * the contradiction hunter and the tools that report them. Split out of constants.ts to keep that
4
+ * file under the size cap.
5
+ */
6
+ /**
7
+ * Cross-channel contradictions: two observation channels making INCOMPATIBLE claims about the same
8
+ * action. This is the bug class a human structurally cannot see, because a human has one channel
9
+ * open — the screen. The agent holds DOM, store, signals, console and network in one causally
10
+ * ordered window and can notice they disagree.
11
+ *
12
+ * Every kind here describes a shipped-today false green: the run is green, the screen looks right,
13
+ * and the app is wrong. Contrast `CrawlAnomalyKind`, whose members are all SINGLE-channel facts (an
14
+ * error was logged; a request failed) — those are findable by reading one stream.
15
+ */
16
+ export declare const ContradictionKind: {
17
+ /** The screen moved forward while a request in the same window failed — the swallowed rejection. */
18
+ readonly UI_ADVANCED_REQUEST_FAILED: "ui-advanced-request-failed";
19
+ /** The app fired its own success signal while a request in the same window failed. Strongest form:
20
+ * the app did not merely look right, it explicitly ASSERTED success against its own evidence. */
21
+ readonly SIGNAL_CONTRADICTED: "signal-contradicted";
22
+ /** A write succeeded on the server and nothing on the client moved — the response went nowhere. */
23
+ readonly RESPONSE_IGNORED: "response-ignored";
24
+ /** The same write fired more than once in one action — double-submit / retry storm. */
25
+ readonly DUPLICATE_REQUEST: "duplicate-request";
26
+ /**
27
+ * Two reads of the same endpoint were in flight together and settled OUT OF ORDER, so the one the
28
+ * user asked for first is the one that landed last — and the screen is showing it.
29
+ *
30
+ * The classic filter/search race. It needs no bug in either request: whichever query the server
31
+ * happens to answer more slowly wins, so the UI shows data for a query the user has already
32
+ * replaced. Every channel reports success — both requests are 200, the control shows the new
33
+ * selection, the page settles — which is why it survives review and why `settled` cannot catch it.
34
+ *
35
+ * Detectable only from a request TIMELINE, which is why a screenshot or a DOM snapshot can never
36
+ * see it: the evidence is the interleaving, and by the time anyone looks, the interleaving is gone.
37
+ */
38
+ readonly STALE_RESPONSE_APPLIED: "stale-response-applied";
39
+ /**
40
+ * A request returned 2xx and reported failure inside its BODY.
41
+ *
42
+ * The status line describes the transport, not the outcome. GraphQL returns 200 for every error it
43
+ * has; a bulk endpoint returns 200 for the batch and puts per-item failures in the payload; a
44
+ * gateway-normalised API returns 200 with `success: false`. Every channel above the body — status,
45
+ * UI advance, settle — agrees with the optimistic reading, which is exactly why this survives.
46
+ */
47
+ readonly PARTIAL_FAILURE_IN_OK_RESPONSE: "partial-failure-in-ok-response";
48
+ /**
49
+ * A money value was sent back to the API at a different SCALE than the API stated it.
50
+ *
51
+ * Payment APIs speak minor units (paise, cents) as integers; a UI renders major units; writing the
52
+ * rendered number back into the same field is a 100x error the server accepts and reports as
53
+ * processed. Detectable only by holding the request timeline with bodies — the number sent is
54
+ * exactly the number on the screen, so every other channel agrees it is correct.
55
+ */
56
+ readonly UNIT_MISMATCH: "unit-mismatch";
57
+ /**
58
+ * A write returned success and its OWN echo shows a field it was asked to set was not applied.
59
+ *
60
+ * Ordinary in real backends: a column missing from the UPDATE, a schema stripping unknown keys, a
61
+ * PATCH honouring a subset, an enum falling back to a default. The status is 2xx, the body reports
62
+ * no failure, the UI advanced, the page settled — so every channel except the payload agrees the
63
+ * save worked, and the screen goes on showing the value the user typed rather than the value that
64
+ * was stored. Measured on a preferences write that asked for `locale: fr` and echoed `locale: en`.
65
+ */
66
+ readonly WRITE_FIELD_IGNORED: "write-field-ignored";
67
+ /** The UI advanced while a request was still in flight, so `settled` was reported over a live call. */
68
+ readonly REQUEST_NEVER_SETTLED: "request-never-settled";
69
+ /**
70
+ * The SERVER faulted (5xx) and the app blamed the USER — "invalid credentials" for a broken
71
+ * backend, "not permitted" for a crashed service. The user is told to fix something they cannot
72
+ * fix, and the real fault is never reported. A support ticket that costs hours to trace back.
73
+ */
74
+ readonly FAILURE_MISATTRIBUTED: "failure-misattributed";
75
+ /**
76
+ * The action was dispatched and NOTHING happened — no DOM, no store, no route, no request, no
77
+ * signal, no console line. The click landed on something that does not react.
78
+ *
79
+ * A contradiction rather than a warning because two channels disagree: the act layer reports
80
+ * `dispatched: true, settled: true`, and every observation channel reports an empty window. The
81
+ * settle half is the trap — a page that does nothing is quiet, and quiet is exactly what `settled`
82
+ * tests for, so `until: { kind: 'settled' }` PASSES on a dead click and the verdict read
83
+ * `verified: "yes", because: "no channel disagreeing"`. Measured on a real merchant dashboard by
84
+ * clicking a `styled.div` that `reticle_query { by: 'text' }` had resolved instead of the button
85
+ * beside it: zero events, store unchanged, green verdict.
86
+ */
87
+ readonly ACTION_HAD_NO_EFFECT: "action-had-no-effect";
88
+ /**
89
+ * The route changed and NOTHING was rendered for it — no content added, none removed, no request.
90
+ * The URL says you arrived somewhere; the page is blank.
91
+ *
92
+ * This is the class every "did the control work" heuristic misses, because the control DID work:
93
+ * it navigated. Measured on a real merchant dashboard with nine such links (Invoices, Route,
94
+ * Subscriptions, QR Codes, Customers…), `reticle_crawl` drove all nine and reported
95
+ * `deadControls: 0` — correctly, by its own definition, since a route change is activity.
96
+ *
97
+ * The discriminator came from executing both cases and comparing, not from reasoning: a working
98
+ * nav emitted `domAdded: 1, network: 2`; a blank one emitted `domAdded: 0, domRemoved: 0,
99
+ * network: 0` and left the page at an eighth the size. A real transition either fetches something
100
+ * or renders something.
101
+ *
102
+ * MEASURED PRECISION, and the limit is real: 11 findings on that dashboard, 10 of them genuinely
103
+ * blank destinations (verified by reading the DOM directly, not by asking Reticle), 1 false
104
+ * positive. The false positive is instructive rather than fixable by tuning — a route whose view
105
+ * is REVEALED from DOM that already existed emits `route.change` + `dom.attr` and nothing else,
106
+ * which is byte-for-byte the window a blank destination emits. No event-only rule separates them.
107
+ * Over-warning is the safe direction here (a false alarm costs a glance; a blank page shipped as
108
+ * working does not), so it is reported with that ceiling stated rather than tuned into silence.
109
+ */
110
+ readonly ROUTE_RENDERED_NOTHING: "route-rendered-nothing";
111
+ };
112
+ export type ContradictionKind = (typeof ContradictionKind)[keyof typeof ContradictionKind];
113
+ /**
114
+ * HTTP methods that CHANGE server state. Several contradiction rules are restricted to these on
115
+ * purpose: a GET that fires without moving the UI is a prefetch, but a POST that does is a lost
116
+ * write. Narrowing to writes is what keeps the rules from crying wolf on ordinary reads.
117
+ */
118
+ export declare const MUTATING_METHODS: readonly string[];
119
+ export declare const CrawlAnomalyKind: {
120
+ readonly CONSOLE_ERROR: "console-error";
121
+ readonly FAILED_REQUEST: "failed-request";
122
+ readonly DEAD_CONTROL: "dead-control";
123
+ };
124
+ export type CrawlAnomalyKind = (typeof CrawlAnomalyKind)[keyof typeof CrawlAnomalyKind];
@@ -0,0 +1,122 @@
1
+ /**
2
+ * What a verification can FIND — the vocabulary of faults and contradictions shared by the crawl,
3
+ * the contradiction hunter and the tools that report them. Split out of constants.ts to keep that
4
+ * file under the size cap.
5
+ */
6
+ /**
7
+ * Cross-channel contradictions: two observation channels making INCOMPATIBLE claims about the same
8
+ * action. This is the bug class a human structurally cannot see, because a human has one channel
9
+ * open — the screen. The agent holds DOM, store, signals, console and network in one causally
10
+ * ordered window and can notice they disagree.
11
+ *
12
+ * Every kind here describes a shipped-today false green: the run is green, the screen looks right,
13
+ * and the app is wrong. Contrast `CrawlAnomalyKind`, whose members are all SINGLE-channel facts (an
14
+ * error was logged; a request failed) — those are findable by reading one stream.
15
+ */
16
+ export const ContradictionKind = {
17
+ /** The screen moved forward while a request in the same window failed — the swallowed rejection. */
18
+ UI_ADVANCED_REQUEST_FAILED: 'ui-advanced-request-failed',
19
+ /** The app fired its own success signal while a request in the same window failed. Strongest form:
20
+ * the app did not merely look right, it explicitly ASSERTED success against its own evidence. */
21
+ SIGNAL_CONTRADICTED: 'signal-contradicted',
22
+ /** A write succeeded on the server and nothing on the client moved — the response went nowhere. */
23
+ RESPONSE_IGNORED: 'response-ignored',
24
+ /** The same write fired more than once in one action — double-submit / retry storm. */
25
+ DUPLICATE_REQUEST: 'duplicate-request',
26
+ /**
27
+ * Two reads of the same endpoint were in flight together and settled OUT OF ORDER, so the one the
28
+ * user asked for first is the one that landed last — and the screen is showing it.
29
+ *
30
+ * The classic filter/search race. It needs no bug in either request: whichever query the server
31
+ * happens to answer more slowly wins, so the UI shows data for a query the user has already
32
+ * replaced. Every channel reports success — both requests are 200, the control shows the new
33
+ * selection, the page settles — which is why it survives review and why `settled` cannot catch it.
34
+ *
35
+ * Detectable only from a request TIMELINE, which is why a screenshot or a DOM snapshot can never
36
+ * see it: the evidence is the interleaving, and by the time anyone looks, the interleaving is gone.
37
+ */
38
+ STALE_RESPONSE_APPLIED: 'stale-response-applied',
39
+ /**
40
+ * A request returned 2xx and reported failure inside its BODY.
41
+ *
42
+ * The status line describes the transport, not the outcome. GraphQL returns 200 for every error it
43
+ * has; a bulk endpoint returns 200 for the batch and puts per-item failures in the payload; a
44
+ * gateway-normalised API returns 200 with `success: false`. Every channel above the body — status,
45
+ * UI advance, settle — agrees with the optimistic reading, which is exactly why this survives.
46
+ */
47
+ PARTIAL_FAILURE_IN_OK_RESPONSE: 'partial-failure-in-ok-response',
48
+ /**
49
+ * A money value was sent back to the API at a different SCALE than the API stated it.
50
+ *
51
+ * Payment APIs speak minor units (paise, cents) as integers; a UI renders major units; writing the
52
+ * rendered number back into the same field is a 100x error the server accepts and reports as
53
+ * processed. Detectable only by holding the request timeline with bodies — the number sent is
54
+ * exactly the number on the screen, so every other channel agrees it is correct.
55
+ */
56
+ UNIT_MISMATCH: 'unit-mismatch',
57
+ /**
58
+ * A write returned success and its OWN echo shows a field it was asked to set was not applied.
59
+ *
60
+ * Ordinary in real backends: a column missing from the UPDATE, a schema stripping unknown keys, a
61
+ * PATCH honouring a subset, an enum falling back to a default. The status is 2xx, the body reports
62
+ * no failure, the UI advanced, the page settled — so every channel except the payload agrees the
63
+ * save worked, and the screen goes on showing the value the user typed rather than the value that
64
+ * was stored. Measured on a preferences write that asked for `locale: fr` and echoed `locale: en`.
65
+ */
66
+ WRITE_FIELD_IGNORED: 'write-field-ignored',
67
+ /** The UI advanced while a request was still in flight, so `settled` was reported over a live call. */
68
+ REQUEST_NEVER_SETTLED: 'request-never-settled',
69
+ /**
70
+ * The SERVER faulted (5xx) and the app blamed the USER — "invalid credentials" for a broken
71
+ * backend, "not permitted" for a crashed service. The user is told to fix something they cannot
72
+ * fix, and the real fault is never reported. A support ticket that costs hours to trace back.
73
+ */
74
+ FAILURE_MISATTRIBUTED: 'failure-misattributed',
75
+ /**
76
+ * The action was dispatched and NOTHING happened — no DOM, no store, no route, no request, no
77
+ * signal, no console line. The click landed on something that does not react.
78
+ *
79
+ * A contradiction rather than a warning because two channels disagree: the act layer reports
80
+ * `dispatched: true, settled: true`, and every observation channel reports an empty window. The
81
+ * settle half is the trap — a page that does nothing is quiet, and quiet is exactly what `settled`
82
+ * tests for, so `until: { kind: 'settled' }` PASSES on a dead click and the verdict read
83
+ * `verified: "yes", because: "no channel disagreeing"`. Measured on a real merchant dashboard by
84
+ * clicking a `styled.div` that `reticle_query { by: 'text' }` had resolved instead of the button
85
+ * beside it: zero events, store unchanged, green verdict.
86
+ */
87
+ ACTION_HAD_NO_EFFECT: 'action-had-no-effect',
88
+ /**
89
+ * The route changed and NOTHING was rendered for it — no content added, none removed, no request.
90
+ * The URL says you arrived somewhere; the page is blank.
91
+ *
92
+ * This is the class every "did the control work" heuristic misses, because the control DID work:
93
+ * it navigated. Measured on a real merchant dashboard with nine such links (Invoices, Route,
94
+ * Subscriptions, QR Codes, Customers…), `reticle_crawl` drove all nine and reported
95
+ * `deadControls: 0` — correctly, by its own definition, since a route change is activity.
96
+ *
97
+ * The discriminator came from executing both cases and comparing, not from reasoning: a working
98
+ * nav emitted `domAdded: 1, network: 2`; a blank one emitted `domAdded: 0, domRemoved: 0,
99
+ * network: 0` and left the page at an eighth the size. A real transition either fetches something
100
+ * or renders something.
101
+ *
102
+ * MEASURED PRECISION, and the limit is real: 11 findings on that dashboard, 10 of them genuinely
103
+ * blank destinations (verified by reading the DOM directly, not by asking Reticle), 1 false
104
+ * positive. The false positive is instructive rather than fixable by tuning — a route whose view
105
+ * is REVEALED from DOM that already existed emits `route.change` + `dom.attr` and nothing else,
106
+ * which is byte-for-byte the window a blank destination emits. No event-only rule separates them.
107
+ * Over-warning is the safe direction here (a false alarm costs a glance; a blank page shipped as
108
+ * working does not), so it is reported with that ceiling stated rather than tuned into silence.
109
+ */
110
+ ROUTE_RENDERED_NOTHING: 'route-rendered-nothing',
111
+ };
112
+ /**
113
+ * HTTP methods that CHANGE server state. Several contradiction rules are restricted to these on
114
+ * purpose: a GET that fires without moving the UI is a prefetch, but a POST that does is a lost
115
+ * write. Narrowing to writes is what keeps the rules from crying wolf on ordinary reads.
116
+ */
117
+ export const MUTATING_METHODS = ['POST', 'PUT', 'PATCH', 'DELETE', 'IPC'];
118
+ export const CrawlAnomalyKind = {
119
+ CONSOLE_ERROR: 'console-error', // the click logged a console.error / uncaught error
120
+ FAILED_REQUEST: 'failed-request', // it fired a request that returned >= 400
121
+ DEAD_CONTROL: 'dead-control', // it dispatched but the app did NOTHING (no DOM/net/route/signal)
122
+ };
@@ -172,4 +172,3 @@ export declare const AnnotationErrorCode: {
172
172
  export type AnnotationErrorCode = (typeof AnnotationErrorCode)[keyof typeof AnnotationErrorCode];
173
173
  /** Leading word of the compiled-predicate confirmation ("will assert …"). */
174
174
  export declare const COMPILED_PREDICATE_PREFIX = "will";
175
- //# sourceMappingURL=flow-constants.d.ts.map
@@ -159,4 +159,3 @@ export const AnnotationErrorCode = {
159
159
  };
160
160
  /** Leading word of the compiled-predicate confirmation ("will assert …"). */
161
161
  export const COMPILED_PREDICATE_PREFIX = 'will';
162
- //# sourceMappingURL=flow-constants.js.map
@@ -357,13 +357,38 @@ export interface SuiteFlowResult {
357
357
  * failures carry detail (token-cheap). `status` is fail if any flow drifted or errored.
358
358
  */
359
359
  export interface SuiteVerdict {
360
- status: 'pass' | 'fail';
360
+ /**
361
+ * `unverifiable` means the suite contained flows that CANNOT FAIL, so "pass" would be a lie.
362
+ *
363
+ * A recorded flow with no steps, or one that asserts no observable consequence, replays green no
364
+ * matter what the app does. Reporting `pass` for it is a false green in the exact feature sold as
365
+ * the regression suite — measured: a flow saved as `{steps: [], intent: "..."}`, which `flow_save`
366
+ * had ALREADY graded assertion-free with a warning, came back "all 1 flow pass".
367
+ */
368
+ status: 'pass' | 'fail' | 'unverifiable';
361
369
  total: number;
362
370
  passed: number;
363
371
  failed: number;
364
372
  summary: string;
365
373
  /** Only the failing flows, with their decision (verdict, what changed, where, next action). */
366
374
  failures: SuiteFlowResult[];
375
+ /**
376
+ * Flows that replayed without error but assert nothing, so their green means nothing. Counted
377
+ * apart from `passed` — a number that includes them is not a count of anything verified.
378
+ */
379
+ unverifiable?: {
380
+ flow: string;
381
+ reason: string;
382
+ }[];
383
+ /**
384
+ * Flows that have both passed AND failed on UNCHANGED code — intermittent, not regressions.
385
+ *
386
+ * A flake and a regression demand opposite responses: one is chased, the other is quarantined. The
387
+ * ledger that answers this already existed and was written only by the CLI, so an agent replaying a
388
+ * suite a hundred times could never learn which of its failures were noise. Omitted entirely when
389
+ * the ledger has not seen enough runs to say.
390
+ */
391
+ flaky?: string[];
367
392
  }
368
393
  /** The reticle_flow_replay envelope. */
369
394
  export interface FlowReplayResult {
@@ -1325,4 +1350,3 @@ export interface FlowHealResult {
1325
1350
  };
1326
1351
  }
1327
1352
  export type RecordedFlow = z.infer<typeof RecordedFlowSchema>;
1328
- //# sourceMappingURL=flow-types.d.ts.map
@@ -171,4 +171,3 @@ export const RecordedFlowSchema = z.object({
171
171
  name: z.string(),
172
172
  flow: FlowFileSchema,
173
173
  });
174
- //# sourceMappingURL=flow-types.js.map
package/dist/index.d.ts CHANGED
@@ -8,13 +8,19 @@
8
8
  * now the boundary is documented here.)
9
9
  */
10
10
  export * from './constants.js';
11
+ export * from './source-constants.js';
12
+ export * from './verified-constants.js';
11
13
  export * from './session-constants.js';
12
14
  export * from './messages.js';
13
15
  export * from './event-payloads.js';
16
+ export * from './event-priority.js';
14
17
  export * from './flow-types.js';
15
18
  export * from './verification-run.js';
16
19
  export * from './types.js';
17
20
  export * from './brand.js';
21
+ export * from './net.js';
22
+ export * from './findings.js';
23
+ export * from './desktop-contract.js';
18
24
  export * from './consequence.js';
19
25
  export * from './notices.js';
20
26
  export * from './journal.js';
@@ -25,4 +31,5 @@ export * from './state-select.js';
25
31
  export * from './toon.js';
26
32
  export * from './upgrade.js';
27
33
  export * from './telemetry.js';
28
- //# sourceMappingURL=index.d.ts.map
34
+ export * from './telemetry-session.js';
35
+ export * from './telemetry-feedback.js';
package/dist/index.js CHANGED
@@ -9,13 +9,19 @@
9
9
  */
10
10
  // ── STABLE public surface: the wire/domain contract ──────────────────────────────────────────────
11
11
  export * from './constants.js'; // EventType, ActionType, wire constants, TRANSPORT_LIMITS, …
12
+ export * from './source-constants.js'; // DATA_RETICLE_SOURCE_ATTR, RETICLE_ROOT_GLOBAL
13
+ export * from './verified-constants.js'; // Verified — the one field an agent gates on
12
14
  export * from './session-constants.js';
13
15
  export * from './messages.js'; // ReticleEvent + the message schemas
14
16
  export * from './event-payloads.js'; // per-event payload schemas + wire vocab
17
+ export * from './event-priority.js'; // which events survive the bridge rate cap
15
18
  export * from './flow-types.js'; // FlowStep, FlowExpect, FlowStepTool, replay result shapes
16
19
  export * from './verification-run.js'; // run/verdict shapes for the CI surface
17
20
  export * from './types.js';
18
21
  export * from './brand.js'; // RunId / SessionId / Ref brands + validators
22
+ export * from './net.js'; // NetInitiator / ipc:// scheme — network + desktop-IPC call vocabulary
23
+ export * from './findings.js'; // crawl anomalies + cross-channel contradictions
24
+ export * from './desktop-contract.js'; // the Electron preload/main/renderer/daemon string contract
19
25
  export * from './consequence.js';
20
26
  export * from './notices.js';
21
27
  export * from './journal.js';
@@ -26,5 +32,6 @@ export * from './redaction.js'; // isSensitiveKey / scrubKnownSecrets — the sh
26
32
  export * from './state-select.js'; // selectPath / capDepth — shared by browser SDK + server fallback
27
33
  export * from './toon.js'; // TOON encoding used by the server's result encoder
28
34
  export * from './upgrade.js'; // self-update policy shared by the CLI
29
- export * from './telemetry.js'; // anonymous adoption telemetry wire contract (DAU/WAU/MAU/installs)
30
- //# sourceMappingURL=index.js.map
35
+ export * from './telemetry.js';
36
+ export * from './telemetry-session.js'; // the session/project rollup payloads
37
+ export * from './telemetry-feedback.js'; // the two things a PERSON writes: feedback + a self-declared identity // anonymous adoption telemetry wire contract (DAU/WAU/MAU/installs)
package/dist/journal.d.ts CHANGED
@@ -87,4 +87,3 @@ export declare const JournalActionSchema: z.ZodObject<{
87
87
  } | undefined;
88
88
  }>;
89
89
  export type JournalAction = z.infer<typeof JournalActionSchema>;
90
- //# sourceMappingURL=journal.d.ts.map
package/dist/journal.js CHANGED
@@ -35,4 +35,3 @@ export const JournalActionSchema = z.object({
35
35
  /** Elapsed-ms timestamp the action was recorded at (clock injected by the writer). */
36
36
  at: z.number().int().min(0),
37
37
  });
38
- //# sourceMappingURL=journal.js.map