@reticlehq/core 3.5.0 → 3.7.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 (113) hide show
  1. package/dist/artifacts/artifacts-entry.d.ts +4 -0
  2. package/dist/artifacts/artifacts-entry.js +4 -0
  3. package/dist/artifacts/drive-script.d.ts +1404 -0
  4. package/dist/artifacts/drive-script.js +220 -0
  5. package/dist/artifacts/flow-constants.d.ts +19 -0
  6. package/dist/artifacts/flow-constants.js +21 -0
  7. package/dist/artifacts/flow-results.d.ts +450 -0
  8. package/dist/artifacts/flow-results.js +1 -0
  9. package/dist/artifacts/flow-types.d.ts +75 -427
  10. package/dist/artifacts/flow-types.js +15 -2
  11. package/dist/artifacts/harness-credits.d.ts +39 -0
  12. package/dist/artifacts/harness-credits.js +69 -0
  13. package/dist/artifacts/harness-map.d.ts +98 -0
  14. package/dist/artifacts/harness-map.js +36 -0
  15. package/dist/artifacts/hud-notices.d.ts +134 -0
  16. package/dist/artifacts/hud-notices.js +124 -0
  17. package/dist/artifacts/impact.d.ts +489 -189
  18. package/dist/artifacts/impact.js +90 -47
  19. package/dist/artifacts/journal.d.ts +105 -5
  20. package/dist/artifacts/journal.js +41 -0
  21. package/dist/artifacts/prompt-context.d.ts +105 -0
  22. package/dist/artifacts/prompt-context.js +108 -0
  23. package/dist/artifacts/screenshot-upload.d.ts +51 -0
  24. package/dist/artifacts/screenshot-upload.js +26 -0
  25. package/dist/desktop-contract.cjs +1 -0
  26. package/dist/desktop-contract.d.cts +1 -0
  27. package/dist/hooks/hook-events.d.ts +4 -4
  28. package/dist/hud-entry.d.ts +2 -0
  29. package/dist/hud-entry.js +4 -0
  30. package/dist/identity/contract-fingerprint.d.ts +9 -0
  31. package/dist/identity/contract-fingerprint.js +12 -0
  32. package/dist/identity/testid-attribute.d.ts +18 -0
  33. package/dist/identity/testid-attribute.js +24 -0
  34. package/dist/index.d.ts +9 -1
  35. package/dist/index.js +9 -1
  36. package/dist/onboarding.d.ts +10 -2
  37. package/dist/onboarding.js +6 -0
  38. package/dist/realm/registry.js +19 -1
  39. package/dist/schema/command-message.json +36 -0
  40. package/dist/schema/command-name.json +5 -1
  41. package/dist/schema/event-payloads.json +56 -2
  42. package/dist/schema/reticle-message.json +36 -0
  43. package/dist/telemetry-bug.d.ts +169 -0
  44. package/dist/telemetry-bug.js +123 -0
  45. package/dist/telemetry-entry.d.ts +1 -0
  46. package/dist/telemetry-entry.js +1 -0
  47. package/dist/telemetry-feedback.d.ts +2 -2
  48. package/dist/telemetry-refusal.d.ts +5 -4
  49. package/dist/telemetry-session.d.ts +79 -1
  50. package/dist/telemetry-session.js +57 -1
  51. package/dist/telemetry-signals.d.ts +339 -0
  52. package/dist/telemetry-signals.js +138 -0
  53. package/dist/telemetry.d.ts +330 -276
  54. package/dist/telemetry.js +40 -115
  55. package/dist/tour.d.ts +1 -0
  56. package/dist/tour.js +13 -5
  57. package/dist/verdict/consequence.d.ts +3 -0
  58. package/dist/verdict/disparity.d.ts +105 -0
  59. package/dist/verdict/disparity.js +40 -0
  60. package/dist/verdict/findings.d.ts +11 -0
  61. package/dist/verdict/findings.js +16 -0
  62. package/dist/verdict/instrumentation-coverage.d.ts +115 -0
  63. package/dist/verdict/instrumentation-coverage.js +226 -0
  64. package/dist/verdict/instrumentation-gap.js +1 -1
  65. package/dist/verdict/intent.d.ts +19 -5
  66. package/dist/verdict/intent.js +13 -1
  67. package/dist/verdict/predicate-tree.d.ts +15 -0
  68. package/dist/verdict/predicate-tree.js +21 -0
  69. package/dist/verdict/predicate.d.ts +28 -0
  70. package/dist/verdict/predicate.js +94 -15
  71. package/dist/verdict/security.d.ts +25 -0
  72. package/dist/verdict/security.js +82 -0
  73. package/dist/verdict/verdict-attribution.js +1 -0
  74. package/dist/verdict/verification-run.d.ts +638 -32
  75. package/dist/verdict/verification-run.js +90 -0
  76. package/dist/verdict/verified-constants.d.ts +19 -0
  77. package/dist/verdict/verified-constants.js +22 -0
  78. package/dist/wire/constants/constants.d.ts +60 -32
  79. package/dist/wire/constants/constants.js +61 -33
  80. package/dist/wire/constants/hud-controls.d.ts +1 -1
  81. package/dist/wire/constants/hud-controls.js +34 -1
  82. package/dist/wire/constants/hud-use.d.ts +89 -1
  83. package/dist/wire/constants/hud-use.js +62 -1
  84. package/dist/wire/constants/mcp-wire.d.ts +10 -0
  85. package/dist/wire/constants/mcp-wire.js +10 -0
  86. package/dist/wire/constants/reticle-chrome.d.ts +19 -0
  87. package/dist/wire/constants/reticle-chrome.js +19 -0
  88. package/dist/wire/constants/session-constants.d.ts +21 -0
  89. package/dist/wire/constants/session-constants.js +21 -0
  90. package/dist/wire/desktop-contract.d.ts +11 -0
  91. package/dist/wire/desktop-contract.js +14 -0
  92. package/dist/wire/event-payloads.d.ts +77 -4
  93. package/dist/wire/event-payloads.js +27 -0
  94. package/dist/wire/global-press.d.ts +34 -3
  95. package/dist/wire/global-press.js +91 -3
  96. package/dist/wire/hold.d.ts +14 -0
  97. package/dist/wire/hold.js +18 -0
  98. package/dist/wire/messages.d.ts +129 -32
  99. package/dist/wire/messages.js +17 -1
  100. package/dist/wire/platform-link.d.ts +238 -0
  101. package/dist/wire/platform-link.js +234 -0
  102. package/dist/wire/tool-names.d.ts +2 -0
  103. package/dist/wire/tool-names.js +2 -0
  104. package/dist/wire/types.d.ts +26 -6
  105. package/dist/wire/types.js +5 -0
  106. package/dist/words/no-session-reason.d.ts +7 -0
  107. package/dist/words/no-session-reason.js +7 -0
  108. package/dist/words/notices.d.ts +1 -1
  109. package/dist/words/notices.js +5 -3
  110. package/dist/words/upgrade.js +1 -1
  111. package/dist/words/writing-rule.d.ts +14 -0
  112. package/dist/words/writing-rule.js +17 -0
  113. package/package.json +1 -1
@@ -0,0 +1,51 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * The body of `POST /v1/runs/:runId/screenshots` — one step screenshot, sent once, after the
4
+ * platform has accepted its run. One schema for both ends, so the daemon cannot send a field the
5
+ * platform does not read.
6
+ *
7
+ * `jpeg` is base64 of real JPEG bytes, and `sha256` is of those decoded bytes. The platform answers
8
+ * 201 stored, 200 already held (same run, seq and sha256), 404 run not found, 400 invalid, 413 too
9
+ * large, 409 too many for one run or a different image already at that seq (a seq is never reused).
10
+ */
11
+ /** The platform's bound on every text field of an upload. */
12
+ export declare const UPLOAD_TEXT_MAX = 300;
13
+ export declare const ScreenshotUploadSchema: z.ZodObject<{
14
+ seq: z.ZodNumber;
15
+ file: z.ZodString;
16
+ step: z.ZodOptional<z.ZodString>;
17
+ tool: z.ZodOptional<z.ZodString>;
18
+ /** The check this picture is of, so the platform's run page can show it beside that check. */
19
+ checkId: z.ZodOptional<z.ZodString>;
20
+ source: z.ZodNativeEnum<{
21
+ readonly BROWSER: "browser";
22
+ readonly RENDERED: "rendered";
23
+ }>;
24
+ width: z.ZodNumber;
25
+ height: z.ZodNumber;
26
+ sha256: z.ZodString;
27
+ jpeg: z.ZodString;
28
+ }, "strip", z.ZodTypeAny, {
29
+ file: string;
30
+ source: "browser" | "rendered";
31
+ width: number;
32
+ height: number;
33
+ sha256: string;
34
+ seq: number;
35
+ jpeg: string;
36
+ step?: string | undefined;
37
+ tool?: string | undefined;
38
+ checkId?: string | undefined;
39
+ }, {
40
+ file: string;
41
+ source: "browser" | "rendered";
42
+ width: number;
43
+ height: number;
44
+ sha256: string;
45
+ seq: number;
46
+ jpeg: string;
47
+ step?: string | undefined;
48
+ tool?: string | undefined;
49
+ checkId?: string | undefined;
50
+ }>;
51
+ export type ScreenshotUpload = z.infer<typeof ScreenshotUploadSchema>;
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ import { ScreenshotSource } from '../verdict/verification-run.js';
3
+ /**
4
+ * The body of `POST /v1/runs/:runId/screenshots` — one step screenshot, sent once, after the
5
+ * platform has accepted its run. One schema for both ends, so the daemon cannot send a field the
6
+ * platform does not read.
7
+ *
8
+ * `jpeg` is base64 of real JPEG bytes, and `sha256` is of those decoded bytes. The platform answers
9
+ * 201 stored, 200 already held (same run, seq and sha256), 404 run not found, 400 invalid, 413 too
10
+ * large, 409 too many for one run or a different image already at that seq (a seq is never reused).
11
+ */
12
+ /** The platform's bound on every text field of an upload. */
13
+ export const UPLOAD_TEXT_MAX = 300;
14
+ export const ScreenshotUploadSchema = z.object({
15
+ seq: z.number().int().min(0),
16
+ file: z.string().min(1).max(UPLOAD_TEXT_MAX),
17
+ step: z.string().min(1).max(UPLOAD_TEXT_MAX).optional(),
18
+ tool: z.string().min(1).max(UPLOAD_TEXT_MAX).optional(),
19
+ /** The check this picture is of, so the platform's run page can show it beside that check. */
20
+ checkId: z.string().min(1).max(UPLOAD_TEXT_MAX).optional(),
21
+ source: z.nativeEnum(ScreenshotSource),
22
+ width: z.number().int().min(0),
23
+ height: z.number().int().min(0),
24
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
25
+ jpeg: z.string().min(1),
26
+ });
@@ -5,6 +5,7 @@
5
5
  'use strict';
6
6
  exports.RETICLE_IPC_GLOBAL = "__reticleIpc";
7
7
  exports.RETICLE_CAPTURE_CHANNEL = "__reticle:capture";
8
+ exports.RETICLE_WINDOW_CHANNEL = "__reticle:window";
8
9
  exports.RETICLE_CAPTURE_FILE_PREFIX = "reticle-capture-";
9
10
  exports.RETICLE_TAURI_CAPTURE_COMMAND = "reticle_capture";
10
11
  exports.RETICLE_FULL_PAGE_UNSUPPORTED = "full-page-unsupported";
@@ -1,6 +1,7 @@
1
1
  // GENERATED by scripts/gen-desktop-contract.mjs — do not edit.
2
2
  export declare const RETICLE_IPC_GLOBAL: "__reticleIpc";
3
3
  export declare const RETICLE_CAPTURE_CHANNEL: "__reticle:capture";
4
+ export declare const RETICLE_WINDOW_CHANNEL: "__reticle:window";
4
5
  export declare const RETICLE_CAPTURE_FILE_PREFIX: "reticle-capture-";
5
6
  export declare const RETICLE_TAURI_CAPTURE_COMMAND: "reticle_capture";
6
7
  export declare const RETICLE_FULL_PAGE_UNSUPPORTED: "full-page-unsupported";
@@ -68,8 +68,8 @@ export declare const VerdictHookPayloadSchema: z.ZodObject<{
68
68
  }, "strip", z.ZodTypeAny, {
69
69
  event: "verdict";
70
70
  at: string;
71
- tool: string;
72
71
  verified: string;
72
+ tool: string;
73
73
  url?: string | undefined;
74
74
  projectId?: string | undefined;
75
75
  sessionId?: string | undefined;
@@ -77,8 +77,8 @@ export declare const VerdictHookPayloadSchema: z.ZodObject<{
77
77
  }, {
78
78
  event: "verdict";
79
79
  at: string;
80
- tool: string;
81
80
  verified: string;
81
+ tool: string;
82
82
  url?: string | undefined;
83
83
  projectId?: string | undefined;
84
84
  sessionId?: string | undefined;
@@ -183,8 +183,8 @@ export declare const HookPayloadSchema: z.ZodDiscriminatedUnion<"event", [z.ZodO
183
183
  }, "strip", z.ZodTypeAny, {
184
184
  event: "verdict";
185
185
  at: string;
186
- tool: string;
187
186
  verified: string;
187
+ tool: string;
188
188
  url?: string | undefined;
189
189
  projectId?: string | undefined;
190
190
  sessionId?: string | undefined;
@@ -192,8 +192,8 @@ export declare const HookPayloadSchema: z.ZodDiscriminatedUnion<"event", [z.ZodO
192
192
  }, {
193
193
  event: "verdict";
194
194
  at: string;
195
- tool: string;
196
195
  verified: string;
196
+ tool: string;
197
197
  url?: string | undefined;
198
198
  projectId?: string | undefined;
199
199
  sessionId?: string | undefined;
@@ -7,3 +7,5 @@
7
7
  * loaded panel ever reads it. `first-load-size` measured it.
8
8
  */
9
9
  export * from './wire/constants/hud-controls.js';
10
+ export * from './artifacts/hud-notices.js';
11
+ export * from './artifacts/harness-credits.js';
package/dist/hud-entry.js CHANGED
@@ -7,3 +7,7 @@
7
7
  * loaded panel ever reads it. `first-load-size` measured it.
8
8
  */
9
9
  export * from './wire/constants/hud-controls.js';
10
+ // The rail's notices: read by the daemon that chooses them and the lazy panel that renders them.
11
+ export * from './artifacts/hud-notices.js';
12
+ // Harness credits: the HUD's row says what the daemon's refusal says.
13
+ export * from './artifacts/harness-credits.js';
@@ -52,3 +52,12 @@ export declare const CONTRACT_PARTS: {
52
52
  readonly events: readonly string[];
53
53
  readonly actions: readonly string[];
54
54
  };
55
+ /**
56
+ * Wire names that were once in the contract and have been removed.
57
+ *
58
+ * An older peer still announces them, and the daemon never sends them, so knowing one changes
59
+ * nothing about whether the two can talk. Skew ignores them. Without this list, removing a name
60
+ * reports every page on an older SDK as skewed, and every verdict on it comes back `unknown` (#1343).
61
+ * A name leaves `ActionType`, `EventType` or `ReticleCommand` only by being added here.
62
+ */
63
+ export declare const RETIRED_WIRE_NAMES: readonly string[];
@@ -72,3 +72,15 @@ export const CONTRACT_PARTS = {
72
72
  events: Object.values(EventType),
73
73
  actions: Object.values(ActionType),
74
74
  };
75
+ /**
76
+ * Wire names that were once in the contract and have been removed.
77
+ *
78
+ * An older peer still announces them, and the daemon never sends them, so knowing one changes
79
+ * nothing about whether the two can talk. Skew ignores them. Without this list, removing a name
80
+ * reports every page on an older SDK as skewed, and every verdict on it comes back `unknown` (#1343).
81
+ * A name leaves `ActionType`, `EventType` or `ReticleCommand` only by being added here.
82
+ */
83
+ export const RETIRED_WIRE_NAMES = [
84
+ // The `webmcp` action, removed in 3.5. SDKs 3.1 to 3.4 still list it.
85
+ 'webmcp',
86
+ ];
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Which DOM attribute carries a test id. `data-testid` is only the default: Elastic UI marks controls
3
+ * `data-test-subj`, Cypress codebases `data-cy`, and a project names its own with `testIdAttribute`
4
+ * in `.reticle.json`. The build plugin carries that to the SDK; the SDK reads it everywhere a testid
5
+ * is matched, advertised or recorded.
6
+ */
7
+ /** The attribute the `testid` locator reads unless a project names its own. */
8
+ export declare const DEFAULT_TESTID_ATTR = "data-testid";
9
+ /**
10
+ * Attributes other test tooling uses for the same job. Only consulted on a MISS, to say "your id is
11
+ * here, under a different attribute" — never to widen what a testid query matches.
12
+ */
13
+ export declare const ALTERNATIVE_TESTID_ATTRS: readonly ["data-test-subj", "data-cy", "data-test", "data-qa", "data-e2e"];
14
+ /**
15
+ * An attribute name safe to interpolate into a CSS attribute selector. `.` and `:` are legal in an
16
+ * attribute name but not in an unescaped selector, so `data.test` would make every query throw.
17
+ */
18
+ export declare const TESTID_ATTR_PATTERN: RegExp;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Which DOM attribute carries a test id. `data-testid` is only the default: Elastic UI marks controls
3
+ * `data-test-subj`, Cypress codebases `data-cy`, and a project names its own with `testIdAttribute`
4
+ * in `.reticle.json`. The build plugin carries that to the SDK; the SDK reads it everywhere a testid
5
+ * is matched, advertised or recorded.
6
+ */
7
+ /** The attribute the `testid` locator reads unless a project names its own. */
8
+ export const DEFAULT_TESTID_ATTR = 'data-testid';
9
+ /**
10
+ * Attributes other test tooling uses for the same job. Only consulted on a MISS, to say "your id is
11
+ * here, under a different attribute" — never to widen what a testid query matches.
12
+ */
13
+ export const ALTERNATIVE_TESTID_ATTRS = [
14
+ 'data-test-subj',
15
+ 'data-cy',
16
+ 'data-test',
17
+ 'data-qa',
18
+ 'data-e2e',
19
+ ];
20
+ /**
21
+ * An attribute name safe to interpolate into a CSS attribute selector. `.` and `:` are legal in an
22
+ * attribute name but not in an unescaped selector, so `data.test` would make every query throw.
23
+ */
24
+ export const TESTID_ATTR_PATTERN = /^[a-zA-Z_][\w-]*$/;
package/dist/index.d.ts CHANGED
@@ -25,13 +25,17 @@ export * from './artifacts/flow-unreached.js';
25
25
  export * from './artifacts/flow-mutation-target.js';
26
26
  export * from './wire/constants/constants.js';
27
27
  export * from './identity/source-constants.js';
28
+ export * from './identity/testid-attribute.js';
28
29
  export * from './wire/event-classification.js';
29
30
  export * from './wire/global-press.js';
31
+ export * from './wire/hold.js';
30
32
  export * from './verdict/verified-constants.js';
31
33
  export * from './verdict/verdict-attribution.js';
32
34
  export * from './verdict/verify-progress.js';
33
35
  export * from './wire/constants/session-constants.js';
34
36
  export * from './wire/constants/hud-use.js';
37
+ export * from './wire/constants/reticle-chrome.js';
38
+ export * from './wire/platform-link.js';
35
39
  export * from './wire/constants/discovery.js';
36
40
  export * from './identity/document-identity.js';
37
41
  export * from './identity/edit-epoch.js';
@@ -44,6 +48,7 @@ export * from './artifacts/flow-types.js';
44
48
  export * from './artifacts/step-effect.js';
45
49
  export * from './artifacts/flow-composition.js';
46
50
  export * from './verdict/verification-run.js';
51
+ export * from './verdict/disparity.js';
47
52
  export * from './wire/types.js';
48
53
  export * from './identity/brand.js';
49
54
  export * from './wire/net.js';
@@ -65,6 +70,7 @@ export * from './registry/project-registry.js';
65
70
  export * from './verdict/intent.js';
66
71
  export * from './verdict/run-context.js';
67
72
  export * from './verdict/instrumentation-gap.js';
73
+ export * from './verdict/instrumentation-coverage.js';
68
74
  export * from './verdict/security.js';
69
75
  export * from './wire/redaction.js';
70
76
  export * from './wire/state-select.js';
@@ -81,10 +87,12 @@ export * from './wire/channel.js';
81
87
  export * from './verdict/revision.js';
82
88
  export * from './realm/registry.js';
83
89
  export * from './telemetry-session.js';
90
+ export * from './telemetry-signals.js';
84
91
  export * from './telemetry-license.js';
85
92
  export * from './telemetry-feedback.js';
86
93
  export * from './artifacts/impact.js';
87
94
  export * from './artifacts/impact-savings.js';
88
- export { CONTRACT_FINGERPRINT, CONTRACT_PARTS, fnv1a, fingerprintOf, } from './identity/contract-fingerprint.js';
95
+ export { CONTRACT_FINGERPRINT, CONTRACT_PARTS, RETIRED_WIRE_NAMES, fnv1a, fingerprintOf, } from './identity/contract-fingerprint.js';
89
96
  export { fingerprintFinding, type FindingIdentity } from './verdict/finding-fingerprint.js';
90
97
  export * from './words/unreachable-notice.js';
98
+ export * from './words/writing-rule.js';
package/dist/index.js CHANGED
@@ -26,14 +26,18 @@ export * from './artifacts/flow-unreached.js'; // unreachedRoutes — known rout
26
26
  export * from './artifacts/flow-mutation-target.js'; // what a flow says it depends on: mutationTargetsFor + perturbationFor
27
27
  export * from './wire/constants/constants.js'; // EventType, ActionType, wire constants, TRANSPORT_LIMITS, …
28
28
  export * from './identity/source-constants.js'; // DATA_RETICLE_SOURCE_ATTR, RETICLE_ROOT_GLOBAL
29
+ export * from './identity/testid-attribute.js'; // DEFAULT_TESTID_ATTR, ALTERNATIVE_TESTID_ATTRS
29
30
  export * from './wire/event-classification.js'; // CHURN_TYPES — shared eviction priority for buffer/queue
30
31
  export * from './wire/global-press.js'; // which press is a document key (Escape / Tab / a shortcut)
32
+ export * from './wire/hold.js'; // clampHoldMs — the bounded hold both input paths honour
31
33
  export * from './verdict/verified-constants.js'; // Verified — the one field an agent gates on
32
34
  // Its own module so a page that never needs it does not download it — see first-load-size.
33
35
  export * from './verdict/verdict-attribution.js';
34
36
  export * from './verdict/verify-progress.js'; // VerifyPhase — what a run is doing while it is still doing it
35
37
  export * from './wire/constants/session-constants.js';
36
38
  export * from './wire/constants/hud-use.js'; // where the HUD sits, for HUD_USED events
39
+ export * from './wire/constants/reticle-chrome.js'; // Reticle's own UI, hidden from every capture
40
+ export * from './wire/platform-link.js'; // daemon <-> platform: capabilities, drive spec, tool session
37
41
  export * from './wire/constants/discovery.js'; // the call-the-founder invitation, one link for every surface
38
42
  export * from './identity/document-identity.js'; // which document an observation belongs to
39
43
  export * from './identity/edit-epoch.js'; // which round of source edits an observation belongs to
@@ -57,6 +61,7 @@ export * from './artifacts/flow-types.js'; // FlowStep, FlowExpect, replay resul
57
61
  export * from './artifacts/step-effect.js'; // StepEffect: a leaf, so the page never downloads it
58
62
  export * from './artifacts/flow-composition.js'; // canFollow: may B replay straight after A
59
63
  export * from './verdict/verification-run.js'; // run/verdict shapes for the CI surface
64
+ export * from './verdict/disparity.js';
60
65
  export * from './wire/types.js';
61
66
  export * from './identity/brand.js'; // RunId / SessionId / ProjectId / Ref brands + validators
62
67
  export * from './wire/net.js'; // NetInitiator / ipc:// scheme — network + desktop-IPC call vocabulary
@@ -84,6 +89,7 @@ export * from './registry/project-registry.js'; // projectId -> directory, so a
84
89
  export * from './verdict/intent.js'; // what a change was supposed to make true, captured while somebody knows
85
90
  export * from './verdict/run-context.js'; // what a run established, folded and capped, for the agent to pull back
86
91
  export * from './verdict/instrumentation-gap.js'; // what Reticle could not see, and the change that would let it
92
+ export * from './verdict/instrumentation-coverage.js'; // how much of an app Reticle sees, and the prompt that closes the rest
87
93
  export * from './verdict/security.js'; // sanitize/serialize helpers shared by browser + server
88
94
  export * from './wire/redaction.js'; // isSensitiveKey / scrubKnownSecrets — the shared redaction rules
89
95
  export * from './wire/state-select.js'; // selectPath / capDepth — shared by browser SDK + server fallback
@@ -108,10 +114,12 @@ export * from './realm/registry.js';
108
114
  // from the protocol. What core re-exports are the few names this repository has always spelled its
109
115
  // own way -- see wire/channel.ts, which imports the rule rather than restating it.
110
116
  export * from './telemetry-session.js'; // the session/project rollup payloads
117
+ export * from './telemetry-signals.js'; // account, client, HUD, link and Harness-run signals
111
118
  export * from './telemetry-license.js'; // LicenseActivation — shared by the licence gate and telemetry
112
119
  export * from './telemetry-feedback.js'; // the two things a PERSON writes: feedback + a self-declared identity
113
120
  export * from './artifacts/impact.js'; // the user's own record of what Reticle has done for them (local only)
114
121
  export * from './artifacts/impact-savings.js'; // the savings model - one file, so every claim is derivable there
115
- export { CONTRACT_FINGERPRINT, CONTRACT_PARTS, fnv1a, fingerprintOf, } from './identity/contract-fingerprint.js';
122
+ export { CONTRACT_FINGERPRINT, CONTRACT_PARTS, RETIRED_WIRE_NAMES, fnv1a, fingerprintOf, } from './identity/contract-fingerprint.js';
116
123
  export { fingerprintFinding } from './verdict/finding-fingerprint.js';
117
124
  export * from './words/unreachable-notice.js'; // the page's unreachable warning, as a contract the daemon parses
125
+ export * from './words/writing-rule.js'; // how agents write the text Reticle keeps (ASD-STE100, about 80%)
@@ -94,21 +94,29 @@ export declare const OnboardingStepSchema: z.ZodObject<{
94
94
  * neither: a human abandons a step, an agent's run exits.
95
95
  */
96
96
  unattended: z.ZodOptional<z.ZodBoolean>;
97
+ /**
98
+ * The first time this machine + project crossed this step, ever. The daemon's "first" steps are
99
+ * claimed on disk and fire once; absent on a step that is not a first, and on one reported from a
100
+ * home that could not be written (which fires once per process instead).
101
+ */
102
+ firstEver: z.ZodOptional<z.ZodBoolean>;
97
103
  }, "strip", z.ZodTypeAny, {
98
104
  step: string;
99
- status: "skipped" | "completed" | "started" | "failed" | "abandoned";
105
+ status: "skipped" | "completed" | "failed" | "started" | "abandoned";
100
106
  phase: "install" | "onboard" | "first_run";
101
107
  reason?: string | undefined;
102
108
  stack?: string | undefined;
103
109
  elapsedMs?: number | undefined;
104
110
  unattended?: boolean | undefined;
111
+ firstEver?: boolean | undefined;
105
112
  }, {
106
113
  step: string;
107
- status: "skipped" | "completed" | "started" | "failed" | "abandoned";
114
+ status: "skipped" | "completed" | "failed" | "started" | "abandoned";
108
115
  phase: "install" | "onboard" | "first_run";
109
116
  reason?: string | undefined;
110
117
  stack?: string | undefined;
111
118
  elapsedMs?: number | undefined;
112
119
  unattended?: boolean | undefined;
120
+ firstEver?: boolean | undefined;
113
121
  }>;
114
122
  export type OnboardingStep = z.infer<typeof OnboardingStepSchema>;
@@ -138,4 +138,10 @@ export const OnboardingStepSchema = z.object({
138
138
  * neither: a human abandons a step, an agent's run exits.
139
139
  */
140
140
  unattended: z.boolean().optional(),
141
+ /**
142
+ * The first time this machine + project crossed this step, ever. The daemon's "first" steps are
143
+ * claimed on disk and fire once; absent on a step that is not a first, and on one reported from a
144
+ * home that could not be written (which fires once per process instead).
145
+ */
146
+ firstEver: z.boolean().optional(),
141
147
  });
@@ -21,6 +21,7 @@
21
21
  import { Surface } from 'open-verification';
22
22
  import { AppRuntime } from '../telemetry-feedback.js';
23
23
  import { PlatformProfile } from '../wire/platform.js';
24
+ import { RETICLE_URL_PARAM } from '../wire/constants/constants.js';
24
25
  /**
25
26
  * Every realm Reticle knows about.
26
27
  *
@@ -166,9 +167,26 @@ export function subjectOf(facts) {
166
167
  // first document is known, never as a substitute for one.
167
168
  instance: facts.currentDocumentId ?? facts.id,
168
169
  ...(epoch === undefined ? {} : { epoch }),
169
- locator: facts.url,
170
+ // The app's address: the marks Reticle puts on a tab to adopt it are not part of it.
171
+ locator: withoutReticleMarks(facts.url),
170
172
  };
171
173
  }
174
+ const RETICLE_MARKS = new Set(Object.values(RETICLE_URL_PARAM));
175
+ /** `url` without Reticle's own query params; returned as given when it does not parse. */
176
+ function withoutReticleMarks(url) {
177
+ try {
178
+ const parsed = new URL(url);
179
+ if (![...parsed.searchParams.keys()].some((key) => RETICLE_MARKS.has(key)))
180
+ return url;
181
+ for (const key of [...parsed.searchParams.keys()])
182
+ if (RETICLE_MARKS.has(key))
183
+ parsed.searchParams.delete(key);
184
+ return parsed.href;
185
+ }
186
+ catch {
187
+ return url;
188
+ }
189
+ }
172
190
  /**
173
191
  * Which realm a project on disk is, judged only by its markers.
174
192
  *
@@ -27,6 +27,42 @@
27
27
  "type": "object",
28
28
  "additionalProperties": {},
29
29
  "default": {}
30
+ },
31
+ "by": {
32
+ "type": "string",
33
+ "enum": [
34
+ "harness"
35
+ ]
36
+ },
37
+ "outward": {
38
+ "type": "object",
39
+ "properties": {
40
+ "allowed": {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "string",
44
+ "enum": [
45
+ "invite",
46
+ "send",
47
+ "share",
48
+ "delete",
49
+ "pay",
50
+ "publish",
51
+ "revoke",
52
+ "transfer",
53
+ "sign out",
54
+ "change role",
55
+ "create key",
56
+ "change state"
57
+ ]
58
+ },
59
+ "maxItems": 16
60
+ }
61
+ },
62
+ "required": [
63
+ "allowed"
64
+ ],
65
+ "additionalProperties": false
30
66
  }
31
67
  },
32
68
  "required": [
@@ -21,9 +21,13 @@
21
21
  "presenter",
22
22
  "impact",
23
23
  "capture",
24
+ "render",
24
25
  "navigate",
25
26
  "refresh",
26
- "flows"
27
+ "flows",
28
+ "flow.progress",
29
+ "plan",
30
+ "markers"
27
31
  ]
28
32
  }
29
33
  },
@@ -161,6 +161,9 @@
161
161
  },
162
162
  "url": {
163
163
  "type": "string"
164
+ },
165
+ "urlRaw": {
166
+ "type": "string"
164
167
  }
165
168
  },
166
169
  "required": [
@@ -216,6 +219,22 @@
216
219
  },
217
220
  "at": {
218
221
  "type": "number"
222
+ },
223
+ "shifted": {
224
+ "type": "object",
225
+ "properties": {
226
+ "ref": {
227
+ "type": "string"
228
+ },
229
+ "selector": {
230
+ "type": "string"
231
+ }
232
+ },
233
+ "required": [
234
+ "ref",
235
+ "selector"
236
+ ],
237
+ "additionalProperties": false
219
238
  }
220
239
  },
221
240
  "required": [
@@ -243,6 +262,14 @@
243
262
  },
244
263
  "hash": {
245
264
  "type": "string"
265
+ },
266
+ "how": {
267
+ "type": "string",
268
+ "enum": [
269
+ "push",
270
+ "replace",
271
+ "pop"
272
+ ]
246
273
  }
247
274
  },
248
275
  "required": [
@@ -250,7 +277,8 @@
250
277
  "to",
251
278
  "pathname",
252
279
  "search",
253
- "hash"
280
+ "hash",
281
+ "how"
254
282
  ],
255
283
  "additionalProperties": false,
256
284
  "$schema": "http://json-schema.org/draft-07/schema#"
@@ -510,6 +538,12 @@
510
538
  },
511
539
  "engine": {
512
540
  "type": "string"
541
+ },
542
+ "windowLabel": {
543
+ "type": "string"
544
+ },
545
+ "documentStatus": {
546
+ "type": "integer"
513
547
  }
514
548
  },
515
549
  "required": [
@@ -758,7 +792,11 @@
758
792
  "message",
759
793
  "replay",
760
794
  "sync",
761
- "harness"
795
+ "signin",
796
+ "harness",
797
+ "harness-run",
798
+ "harness-stop",
799
+ "harness-link"
762
800
  ]
763
801
  },
764
802
  "text": {
@@ -854,10 +892,26 @@
854
892
  "type": "string",
855
893
  "enum": [
856
894
  "chat",
895
+ "flows",
896
+ "notes",
897
+ "harness",
857
898
  "settings",
858
899
  "report",
900
+ "account",
859
901
  "none"
860
902
  ]
903
+ },
904
+ "slide": {
905
+ "type": "string",
906
+ "maxLength": 56
907
+ },
908
+ "prompt": {
909
+ "type": "string",
910
+ "enum": [
911
+ "rail",
912
+ "harness",
913
+ "header"
914
+ ]
861
915
  }
862
916
  },
863
917
  "additionalProperties": false,
@@ -171,6 +171,42 @@
171
171
  "type": "object",
172
172
  "additionalProperties": {},
173
173
  "default": {}
174
+ },
175
+ "by": {
176
+ "type": "string",
177
+ "enum": [
178
+ "harness"
179
+ ]
180
+ },
181
+ "outward": {
182
+ "type": "object",
183
+ "properties": {
184
+ "allowed": {
185
+ "type": "array",
186
+ "items": {
187
+ "type": "string",
188
+ "enum": [
189
+ "invite",
190
+ "send",
191
+ "share",
192
+ "delete",
193
+ "pay",
194
+ "publish",
195
+ "revoke",
196
+ "transfer",
197
+ "sign out",
198
+ "change role",
199
+ "create key",
200
+ "change state"
201
+ ]
202
+ },
203
+ "maxItems": 16
204
+ }
205
+ },
206
+ "required": [
207
+ "allowed"
208
+ ],
209
+ "additionalProperties": false
174
210
  }
175
211
  },
176
212
  "required": [