@reticlehq/core 3.4.0 → 3.6.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 (73) hide show
  1. package/dist/artifacts/artifacts-entry.d.ts +2 -0
  2. package/dist/artifacts/artifacts-entry.js +2 -0
  3. package/dist/artifacts/drive-script.d.ts +1298 -0
  4. package/dist/artifacts/drive-script.js +197 -0
  5. package/dist/artifacts/flow-constants.d.ts +1 -0
  6. package/dist/artifacts/flow-constants.js +1 -0
  7. package/dist/artifacts/flow-types.d.ts +60 -0
  8. package/dist/artifacts/flow-types.js +10 -0
  9. package/dist/artifacts/hud-notices.d.ts +134 -0
  10. package/dist/artifacts/hud-notices.js +124 -0
  11. package/dist/artifacts/impact.d.ts +135 -44
  12. package/dist/artifacts/impact.js +25 -0
  13. package/dist/artifacts/journal.d.ts +49 -0
  14. package/dist/artifacts/journal.js +15 -0
  15. package/dist/artifacts/prompt-context.d.ts +105 -0
  16. package/dist/artifacts/prompt-context.js +108 -0
  17. package/dist/desktop-contract.cjs +1 -0
  18. package/dist/desktop-contract.d.cts +1 -0
  19. package/dist/hud-entry.d.ts +1 -0
  20. package/dist/hud-entry.js +2 -0
  21. package/dist/identity/contract-fingerprint.d.ts +9 -0
  22. package/dist/identity/contract-fingerprint.js +12 -0
  23. package/dist/identity/testid-attribute.d.ts +18 -0
  24. package/dist/identity/testid-attribute.js +24 -0
  25. package/dist/index.d.ts +4 -1
  26. package/dist/index.js +4 -1
  27. package/dist/onboarding.d.ts +2 -2
  28. package/dist/schema/command-message.json +6 -0
  29. package/dist/schema/command-name.json +3 -1
  30. package/dist/schema/event-payloads.json +16 -0
  31. package/dist/schema/reticle-message.json +6 -0
  32. package/dist/telemetry-refusal.d.ts +3 -2
  33. package/dist/telemetry-session.d.ts +5 -1
  34. package/dist/telemetry-session.js +3 -1
  35. package/dist/telemetry.d.ts +42 -34
  36. package/dist/telemetry.js +3 -3
  37. package/dist/tour.d.ts +1 -0
  38. package/dist/tour.js +13 -5
  39. package/dist/verdict/consequence.d.ts +3 -0
  40. package/dist/verdict/findings.d.ts +5 -0
  41. package/dist/verdict/findings.js +7 -0
  42. package/dist/verdict/predicate.d.ts +14 -0
  43. package/dist/verdict/predicate.js +7 -12
  44. package/dist/verdict/verdict-attribution.js +1 -0
  45. package/dist/verdict/verification-run.d.ts +18 -0
  46. package/dist/verdict/verification-run.js +8 -0
  47. package/dist/verdict/verified-constants.d.ts +19 -0
  48. package/dist/verdict/verified-constants.js +22 -0
  49. package/dist/wire/constants/constants.d.ts +44 -16
  50. package/dist/wire/constants/constants.js +44 -16
  51. package/dist/wire/constants/hud-controls.d.ts +1 -1
  52. package/dist/wire/constants/hud-controls.js +21 -0
  53. package/dist/wire/constants/hud-use.d.ts +64 -1
  54. package/dist/wire/constants/hud-use.js +40 -1
  55. package/dist/wire/constants/session-constants.d.ts +8 -0
  56. package/dist/wire/constants/session-constants.js +8 -0
  57. package/dist/wire/desktop-contract.d.ts +3 -0
  58. package/dist/wire/desktop-contract.js +3 -0
  59. package/dist/wire/event-payloads.d.ts +25 -4
  60. package/dist/wire/event-payloads.js +10 -0
  61. package/dist/wire/global-press.d.ts +34 -3
  62. package/dist/wire/global-press.js +91 -3
  63. package/dist/wire/hold.d.ts +14 -0
  64. package/dist/wire/hold.js +18 -0
  65. package/dist/wire/messages.d.ts +42 -18
  66. package/dist/wire/messages.js +8 -0
  67. package/dist/wire/platform-link.d.ts +161 -0
  68. package/dist/wire/platform-link.js +189 -0
  69. package/dist/wire/types.d.ts +7 -0
  70. package/dist/words/no-session-reason.d.ts +7 -0
  71. package/dist/words/no-session-reason.js +7 -0
  72. package/dist/words/notices.js +4 -2
  73. package/package.json +1 -1
@@ -193,6 +193,12 @@ export const HarnessConfigSchema = z.object({
193
193
  harnessEnabled: z.boolean(),
194
194
  /** Whether this workspace may drive on OUR model spend. Never folded into the switch. */
195
195
  harnessEntitled: z.boolean(),
196
+ /** Whether the selected provider has a usable platform key. Older daemons may omit it. */
197
+ providerReady: z.boolean().optional(),
198
+ /** Harness credits used and held this 30 days; one is one Harness decision. Absent: unbounded or unknown. */
199
+ credits: z.object({ used: z.number().int().min(0), limit: z.number().int().min(0) }).optional(),
200
+ /** The platform this answer came from, so the HUD's links go there and not to the hosted one. */
201
+ platformUrl: z.string().optional(),
196
202
  });
197
203
  export const ImpactSnapshotSchema = z.object({
198
204
  schemaVersion: z.number().int().positive(),
@@ -230,6 +236,25 @@ export const ImpactSnapshotSchema = z.object({
230
236
  * cannot be honoured is worse than showing none.
231
237
  */
232
238
  harnessConfig: HarnessConfigSchema.optional(),
239
+ /**
240
+ * The rail's notices, already chosen for this machine by the daemon (see `hud-notices.ts`).
241
+ * Absent means the daemon has nothing newer than the SDK's bundled slides, which then show.
242
+ *
243
+ * Loose here on purpose: this schema is on every page's first load, and the full notice schema
244
+ * (link rules, id pattern) is not. The lazily loaded panel validates each notice with
245
+ * `HudNoticeSchema` from `@reticlehq/core/hud` before rendering it.
246
+ */
247
+ notices: z.array(z.unknown()).max(8).optional(),
248
+ /**
249
+ * Reticle Coverage: each level's percentage from the project's coverage ledger (`reached` routes,
250
+ * `proved` controls, `executed` code, ...). Numbers only. Absent until something was measured.
251
+ */
252
+ coverage: z.record(z.number()).optional(),
253
+ /**
254
+ * Where this project's work stands with the platform (status, runs on it, waiting, refused, last
255
+ * push, and the sentence describing it). Loose here, shaped by the daemon's sync-status.
256
+ */
257
+ sync: z.record(z.unknown()).optional(),
233
258
  });
234
259
  /** Empty counters - the starting point for a fresh store and the identity for merges. */
235
260
  export function emptyImpactCounts() {
@@ -13,6 +13,28 @@ export declare const JOURNAL_FILE_VERSION = 1;
13
13
  * to attribute events to this action (`attribution:"window"`); `effect` is a bounded summary of what
14
14
  * the tool returned. Args are already edge-redacted by the browser before they reach here.
15
15
  */
16
+ /**
17
+ * Who drove an action when it was not the agent on the other end of the connection: the Harness,
18
+ * dispatching through the same tools. A run folded from the journal splits on it, so a person can
19
+ * tell what their agent proved from what the Harness proved.
20
+ */
21
+ export declare const DrivenBySchema: z.ZodObject<{
22
+ /** One Harness drive; every action it took carries the same id. */
23
+ harness: z.ZodString;
24
+ /** Which model drove it: `server` is the platform's Harness. */
25
+ driver: z.ZodString;
26
+ /** The journey it was asked to complete, when one was named. */
27
+ persona: z.ZodOptional<z.ZodString>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ harness: string;
30
+ driver: string;
31
+ persona?: string | undefined;
32
+ }, {
33
+ harness: string;
34
+ driver: string;
35
+ persona?: string | undefined;
36
+ }>;
37
+ export type DrivenBy = z.infer<typeof DrivenBySchema>;
16
38
  export declare const JournalActionSchema: z.ZodObject<{
17
39
  v: z.ZodLiteral<1>;
18
40
  /** The command correlation id (`c<n>`) — the natural, cross-side-stable action identity. */
@@ -51,6 +73,23 @@ export declare const JournalActionSchema: z.ZodObject<{
51
73
  }>;
52
74
  /** Elapsed-ms timestamp the action was recorded at (clock injected by the writer). */
53
75
  at: z.ZodNumber;
76
+ /** Set only when the Harness drove this action; absent means the connected agent did. */
77
+ drivenBy: z.ZodOptional<z.ZodObject<{
78
+ /** One Harness drive; every action it took carries the same id. */
79
+ harness: z.ZodString;
80
+ /** Which model drove it: `server` is the platform's Harness. */
81
+ driver: z.ZodString;
82
+ /** The journey it was asked to complete, when one was named. */
83
+ persona: z.ZodOptional<z.ZodString>;
84
+ }, "strip", z.ZodTypeAny, {
85
+ harness: string;
86
+ driver: string;
87
+ persona?: string | undefined;
88
+ }, {
89
+ harness: string;
90
+ driver: string;
91
+ persona?: string | undefined;
92
+ }>>;
54
93
  }, "strip", z.ZodTypeAny, {
55
94
  at: number;
56
95
  tool: string;
@@ -68,6 +107,11 @@ export declare const JournalActionSchema: z.ZodObject<{
68
107
  from: number;
69
108
  to: number;
70
109
  } | undefined;
110
+ drivenBy?: {
111
+ harness: string;
112
+ driver: string;
113
+ persona?: string | undefined;
114
+ } | undefined;
71
115
  }, {
72
116
  at: number;
73
117
  tool: string;
@@ -85,6 +129,11 @@ export declare const JournalActionSchema: z.ZodObject<{
85
129
  from: number;
86
130
  to: number;
87
131
  } | undefined;
132
+ drivenBy?: {
133
+ harness: string;
134
+ driver: string;
135
+ persona?: string | undefined;
136
+ } | undefined;
88
137
  }>;
89
138
  export type JournalAction = z.infer<typeof JournalActionSchema>;
90
139
  /**
@@ -16,6 +16,19 @@ export const JOURNAL_FILE_VERSION = 1;
16
16
  * to attribute events to this action (`attribution:"window"`); `effect` is a bounded summary of what
17
17
  * the tool returned. Args are already edge-redacted by the browser before they reach here.
18
18
  */
19
+ /**
20
+ * Who drove an action when it was not the agent on the other end of the connection: the Harness,
21
+ * dispatching through the same tools. A run folded from the journal splits on it, so a person can
22
+ * tell what their agent proved from what the Harness proved.
23
+ */
24
+ export const DrivenBySchema = z.object({
25
+ /** One Harness drive; every action it took carries the same id. */
26
+ harness: z.string().min(1).max(TRANSPORT_LIMITS.MAX_REF_LENGTH),
27
+ /** Which model drove it: `server` is the platform's Harness. */
28
+ driver: z.string().min(1).max(TRANSPORT_LIMITS.MAX_COMMAND_NAME_LENGTH),
29
+ /** The journey it was asked to complete, when one was named. */
30
+ persona: z.string().max(1000).optional(),
31
+ });
19
32
  export const JournalActionSchema = z.object({
20
33
  v: z.literal(JOURNAL_FILE_VERSION),
21
34
  /** The command correlation id (`c<n>`) — the natural, cross-side-stable action identity. */
@@ -36,6 +49,8 @@ export const JournalActionSchema = z.object({
36
49
  tRange: z.object({ from: z.number().int().min(0), to: z.number().int().min(0) }),
37
50
  /** Elapsed-ms timestamp the action was recorded at (clock injected by the writer). */
38
51
  at: z.number().int().min(0),
52
+ /** Set only when the Harness drove this action; absent means the connected agent did. */
53
+ drivenBy: DrivenBySchema.optional(),
39
54
  });
40
55
  /**
41
56
  * The report written beside `events.jsonl` when its byte ceiling refuses a batch.
@@ -0,0 +1,105 @@
1
+ /**
2
+ * The prompt side of a verification: what the user asked for, relayed by the agent, and every
3
+ * statement in it and in the agent's declared intents, classified and attributed. Daemon-side only:
4
+ * a run carries it loosely (`context`), so it adds nothing to what a page downloads.
5
+ */
6
+ import { z } from 'zod';
7
+ /** What a statement in the prompt context is, so a reader can tell a goal from a preference. */
8
+ export declare const StatementKind: {
9
+ /** What the product should do for its users: the reason the work exists. */
10
+ readonly BUSINESS_INTENT: "business-intent";
11
+ /** What to change in the code: implement, fix, refactor, rename, test. */
12
+ readonly CODING_INTENT: "coding-intent";
13
+ /** How it must look or feel: layout, spacing, mobile, accessibility. */
14
+ readonly UX_EXPECTATION: "ux-expectation";
15
+ /** Who may see or do what, and what must never leak. */
16
+ readonly SECURITY: "security-requirement";
17
+ readonly ACCEPTANCE: "acceptance-criterion";
18
+ readonly CONSTRAINT: "technical-constraint";
19
+ readonly PREFERENCE: "preference";
20
+ /** What not to touch, or not now. */
21
+ readonly OUT_OF_SCOPE: "out-of-scope";
22
+ };
23
+ export type StatementKind = (typeof StatementKind)[keyof typeof StatementKind];
24
+ /** Who said it. The user's words reach Reticle through the agent, so `user` means relayed verbatim. */
25
+ export declare const StatementSource: {
26
+ readonly USER: "user";
27
+ readonly AGENT: "agent";
28
+ };
29
+ export type StatementSource = (typeof StatementSource)[keyof typeof StatementSource];
30
+ /**
31
+ * A statement's kind, by the words in it.
32
+ *
33
+ * ponytail: keyword rules, not a model. Good enough to separate "the checkout must show the total"
34
+ * from "use the existing Button" from "I prefer it darker"; a model classifier can replace this
35
+ * function without changing what is stored.
36
+ */
37
+ export declare function classifyStatement(text: string): StatementKind;
38
+ /** A request split into the sentences a reader would weigh one at a time. */
39
+ export declare function splitStatements(text: string): string[];
40
+ /**
41
+ * The prompt side of a verification: what the user asked for (relayed by the agent), and each
42
+ * statement in it and in the agent's declared intents, classified and attributed.
43
+ *
44
+ * `shared` decides whether it leaves this machine. A linked project shares it by default, so the
45
+ * platform can read what each run was for; `"shareRequests": false` in .reticle.json keeps it here,
46
+ * and an unlinked project has nowhere to send it. See `shareableRun`.
47
+ */
48
+ export declare const PromptContextSchema: z.ZodObject<{
49
+ /** The whole prompt, redacted. Long prompts are the useful ones, so the cap is generous. */
50
+ request: z.ZodOptional<z.ZodString>;
51
+ statements: z.ZodDefault<z.ZodArray<z.ZodObject<{
52
+ text: z.ZodString;
53
+ kind: z.ZodNativeEnum<{
54
+ /** What the product should do for its users: the reason the work exists. */
55
+ readonly BUSINESS_INTENT: "business-intent";
56
+ /** What to change in the code: implement, fix, refactor, rename, test. */
57
+ readonly CODING_INTENT: "coding-intent";
58
+ /** How it must look or feel: layout, spacing, mobile, accessibility. */
59
+ readonly UX_EXPECTATION: "ux-expectation";
60
+ /** Who may see or do what, and what must never leak. */
61
+ readonly SECURITY: "security-requirement";
62
+ readonly ACCEPTANCE: "acceptance-criterion";
63
+ readonly CONSTRAINT: "technical-constraint";
64
+ readonly PREFERENCE: "preference";
65
+ /** What not to touch, or not now. */
66
+ readonly OUT_OF_SCOPE: "out-of-scope";
67
+ }>;
68
+ source: z.ZodNativeEnum<{
69
+ readonly USER: "user";
70
+ readonly AGENT: "agent";
71
+ }>;
72
+ }, "strip", z.ZodTypeAny, {
73
+ text: string;
74
+ kind: "business-intent" | "coding-intent" | "ux-expectation" | "security-requirement" | "acceptance-criterion" | "technical-constraint" | "preference" | "out-of-scope";
75
+ source: "agent" | "user";
76
+ }, {
77
+ text: string;
78
+ kind: "business-intent" | "coding-intent" | "ux-expectation" | "security-requirement" | "acceptance-criterion" | "technical-constraint" | "preference" | "out-of-scope";
79
+ source: "agent" | "user";
80
+ }>, "many">>;
81
+ /** When the request was given, epoch ms. A run long after it is not about it. */
82
+ at: z.ZodOptional<z.ZodNumber>;
83
+ shared: z.ZodOptional<z.ZodBoolean>;
84
+ }, "strip", z.ZodTypeAny, {
85
+ statements: {
86
+ text: string;
87
+ kind: "business-intent" | "coding-intent" | "ux-expectation" | "security-requirement" | "acceptance-criterion" | "technical-constraint" | "preference" | "out-of-scope";
88
+ source: "agent" | "user";
89
+ }[];
90
+ at?: number | undefined;
91
+ request?: string | undefined;
92
+ shared?: boolean | undefined;
93
+ }, {
94
+ at?: number | undefined;
95
+ request?: string | undefined;
96
+ statements?: {
97
+ text: string;
98
+ kind: "business-intent" | "coding-intent" | "ux-expectation" | "security-requirement" | "acceptance-criterion" | "technical-constraint" | "preference" | "out-of-scope";
99
+ source: "agent" | "user";
100
+ }[] | undefined;
101
+ shared?: boolean | undefined;
102
+ }>;
103
+ export type PromptContext = z.infer<typeof PromptContextSchema>;
104
+ /** A run as it may leave this machine: its prompt context only when the project shares it. */
105
+ export declare function shareableRun(run: unknown): unknown;
@@ -0,0 +1,108 @@
1
+ /**
2
+ * The prompt side of a verification: what the user asked for, relayed by the agent, and every
3
+ * statement in it and in the agent's declared intents, classified and attributed. Daemon-side only:
4
+ * a run carries it loosely (`context`), so it adds nothing to what a page downloads.
5
+ */
6
+ import { z } from 'zod';
7
+ /** What a statement in the prompt context is, so a reader can tell a goal from a preference. */
8
+ export const StatementKind = {
9
+ /** What the product should do for its users: the reason the work exists. */
10
+ BUSINESS_INTENT: 'business-intent',
11
+ /** What to change in the code: implement, fix, refactor, rename, test. */
12
+ CODING_INTENT: 'coding-intent',
13
+ /** How it must look or feel: layout, spacing, mobile, accessibility. */
14
+ UX_EXPECTATION: 'ux-expectation',
15
+ /** Who may see or do what, and what must never leak. */
16
+ SECURITY: 'security-requirement',
17
+ ACCEPTANCE: 'acceptance-criterion',
18
+ CONSTRAINT: 'technical-constraint',
19
+ PREFERENCE: 'preference',
20
+ /** What not to touch, or not now. */
21
+ OUT_OF_SCOPE: 'out-of-scope',
22
+ };
23
+ /** Who said it. The user's words reach Reticle through the agent, so `user` means relayed verbatim. */
24
+ export const StatementSource = {
25
+ USER: 'user',
26
+ AGENT: 'agent',
27
+ };
28
+ /** The words that make a statement each kind. Checked in this order; the first that matches wins. */
29
+ const STATEMENT_RULES = [
30
+ {
31
+ kind: StatementKind.OUT_OF_SCOPE,
32
+ words: /\b(don't (?:touch|change|modify)|do not (?:touch|change|modify)|leave (?:it|that|the \w+) (?:alone|as is)|out of scope|not (?:now|yet|in this)|no need to)\b/i,
33
+ },
34
+ {
35
+ kind: StatementKind.PREFERENCE,
36
+ words: /\b(i (?:prefer|like|want it|would rather)|ideally|nicer|taste|style)\b/i,
37
+ },
38
+ {
39
+ kind: StatementKind.SECURITY,
40
+ words: /\b(secure|security|unauthori[sz]ed|authori[sz]ation|permissions?|admins? only|only admins?|roles?|leaks?|xss|csrf|password|secrets?|pii)\b/i,
41
+ },
42
+ {
43
+ kind: StatementKind.CODING_INTENT,
44
+ words: /\b(refactor|implement|rename|migrate|extract|clean up|write (?:a |the )?tests?|add (?:a |an )?(?:test|function|component|hook|endpoint|route|migration)|fix (?:the |this |a )?(?:bug|error|crash|issue|test)|debug)\b/i,
45
+ },
46
+ {
47
+ kind: StatementKind.UX_EXPECTATION,
48
+ words: /\b(layout|spacing|align(?:ed|ment)?|responsive|mobile|dark mode|colou?rs?|font|animation|accessib\w*|a11y|keyboard|screen reader|looks?|feels?)\b/i,
49
+ },
50
+ {
51
+ kind: StatementKind.CONSTRAINT,
52
+ words: /\b(use|don't use|do not use|without|library|framework|api|endpoint|database|schema|typescript|react|must not import|performance|latency)\b/i,
53
+ },
54
+ {
55
+ kind: StatementKind.ACCEPTANCE,
56
+ words: /\b(must|should|has to|needs to|shows?|displays?|returns?|when .* then|so that|until)\b/i,
57
+ },
58
+ ];
59
+ /**
60
+ * A statement's kind, by the words in it.
61
+ *
62
+ * ponytail: keyword rules, not a model. Good enough to separate "the checkout must show the total"
63
+ * from "use the existing Button" from "I prefer it darker"; a model classifier can replace this
64
+ * function without changing what is stored.
65
+ */
66
+ export function classifyStatement(text) {
67
+ for (const rule of STATEMENT_RULES)
68
+ if (rule.words.test(text))
69
+ return rule.kind;
70
+ return StatementKind.BUSINESS_INTENT;
71
+ }
72
+ /** A request split into the sentences a reader would weigh one at a time. */
73
+ export function splitStatements(text) {
74
+ return text
75
+ .split(/(?<=[.!?])\s+|\n+/)
76
+ .map((s) => s.trim())
77
+ .filter((s) => 0 < s.length);
78
+ }
79
+ /**
80
+ * The prompt side of a verification: what the user asked for (relayed by the agent), and each
81
+ * statement in it and in the agent's declared intents, classified and attributed.
82
+ *
83
+ * `shared` decides whether it leaves this machine. A linked project shares it by default, so the
84
+ * platform can read what each run was for; `"shareRequests": false` in .reticle.json keeps it here,
85
+ * and an unlinked project has nowhere to send it. See `shareableRun`.
86
+ */
87
+ export const PromptContextSchema = z.object({
88
+ /** The whole prompt, redacted. Long prompts are the useful ones, so the cap is generous. */
89
+ request: z.string().max(20_000).optional(),
90
+ statements: z
91
+ .array(z.object({
92
+ text: z.string().max(500),
93
+ kind: z.nativeEnum(StatementKind),
94
+ source: z.nativeEnum(StatementSource),
95
+ }))
96
+ .max(100)
97
+ .default([]),
98
+ /** When the request was given, epoch ms. A run long after it is not about it. */
99
+ at: z.number().optional(),
100
+ shared: z.boolean().optional(),
101
+ });
102
+ /** A run as it may leave this machine: its prompt context only when the project shares it. */
103
+ export function shareableRun(run) {
104
+ if ('object' !== typeof run || null === run || !('context' in run))
105
+ return run;
106
+ const { context, ...rest } = run;
107
+ return true === context?.shared ? run : rest;
108
+ }
@@ -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";
@@ -7,3 +7,4 @@
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';
package/dist/hud-entry.js CHANGED
@@ -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
+ // 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';
@@ -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,16 @@ 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/platform-link.js';
35
38
  export * from './wire/constants/discovery.js';
36
39
  export * from './identity/document-identity.js';
37
40
  export * from './identity/edit-epoch.js';
@@ -85,6 +88,6 @@ export * from './telemetry-license.js';
85
88
  export * from './telemetry-feedback.js';
86
89
  export * from './artifacts/impact.js';
87
90
  export * from './artifacts/impact-savings.js';
88
- export { CONTRACT_FINGERPRINT, CONTRACT_PARTS, fnv1a, fingerprintOf, } from './identity/contract-fingerprint.js';
91
+ export { CONTRACT_FINGERPRINT, CONTRACT_PARTS, RETIRED_WIRE_NAMES, fnv1a, fingerprintOf, } from './identity/contract-fingerprint.js';
89
92
  export { fingerprintFinding, type FindingIdentity } from './verdict/finding-fingerprint.js';
90
93
  export * from './words/unreachable-notice.js';
package/dist/index.js CHANGED
@@ -26,14 +26,17 @@ 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/platform-link.js'; // daemon <-> platform: capabilities, drive spec, tool session
37
40
  export * from './wire/constants/discovery.js'; // the call-the-founder invitation, one link for every surface
38
41
  export * from './identity/document-identity.js'; // which document an observation belongs to
39
42
  export * from './identity/edit-epoch.js'; // which round of source edits an observation belongs to
@@ -112,6 +115,6 @@ export * from './telemetry-license.js'; // LicenseActivation — shared by the l
112
115
  export * from './telemetry-feedback.js'; // the two things a PERSON writes: feedback + a self-declared identity
113
116
  export * from './artifacts/impact.js'; // the user's own record of what Reticle has done for them (local only)
114
117
  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';
118
+ export { CONTRACT_FINGERPRINT, CONTRACT_PARTS, RETIRED_WIRE_NAMES, fnv1a, fingerprintOf, } from './identity/contract-fingerprint.js';
116
119
  export { fingerprintFinding } from './verdict/finding-fingerprint.js';
117
120
  export * from './words/unreachable-notice.js'; // the page's unreachable warning, as a contract the daemon parses
@@ -96,7 +96,7 @@ export declare const OnboardingStepSchema: z.ZodObject<{
96
96
  unattended: z.ZodOptional<z.ZodBoolean>;
97
97
  }, "strip", z.ZodTypeAny, {
98
98
  step: string;
99
- status: "skipped" | "completed" | "started" | "failed" | "abandoned";
99
+ status: "skipped" | "completed" | "failed" | "started" | "abandoned";
100
100
  phase: "install" | "onboard" | "first_run";
101
101
  reason?: string | undefined;
102
102
  stack?: string | undefined;
@@ -104,7 +104,7 @@ export declare const OnboardingStepSchema: z.ZodObject<{
104
104
  unattended?: boolean | undefined;
105
105
  }, {
106
106
  step: string;
107
- status: "skipped" | "completed" | "started" | "failed" | "abandoned";
107
+ status: "skipped" | "completed" | "failed" | "started" | "abandoned";
108
108
  phase: "install" | "onboard" | "first_run";
109
109
  reason?: string | undefined;
110
110
  stack?: string | undefined;
@@ -27,6 +27,12 @@
27
27
  "type": "object",
28
28
  "additionalProperties": {},
29
29
  "default": {}
30
+ },
31
+ "by": {
32
+ "type": "string",
33
+ "enum": [
34
+ "harness"
35
+ ]
30
36
  }
31
37
  },
32
38
  "required": [
@@ -23,7 +23,9 @@
23
23
  "capture",
24
24
  "navigate",
25
25
  "refresh",
26
- "flows"
26
+ "flows",
27
+ "flow.progress",
28
+ "plan"
27
29
  ]
28
30
  }
29
31
  },
@@ -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": [
@@ -510,6 +513,12 @@
510
513
  },
511
514
  "engine": {
512
515
  "type": "string"
516
+ },
517
+ "windowLabel": {
518
+ "type": "string"
519
+ },
520
+ "documentStatus": {
521
+ "type": "integer"
513
522
  }
514
523
  },
515
524
  "required": [
@@ -758,6 +767,7 @@
758
767
  "message",
759
768
  "replay",
760
769
  "sync",
770
+ "signin",
761
771
  "harness"
762
772
  ]
763
773
  },
@@ -854,10 +864,16 @@
854
864
  "type": "string",
855
865
  "enum": [
856
866
  "chat",
867
+ "flows",
868
+ "notes",
857
869
  "settings",
858
870
  "report",
859
871
  "none"
860
872
  ]
873
+ },
874
+ "slide": {
875
+ "type": "string",
876
+ "maxLength": 56
861
877
  }
862
878
  },
863
879
  "additionalProperties": false,
@@ -171,6 +171,12 @@
171
171
  "type": "object",
172
172
  "additionalProperties": {},
173
173
  "default": {}
174
+ },
175
+ "by": {
176
+ "type": "string",
177
+ "enum": [
178
+ "harness"
179
+ ]
174
180
  }
175
181
  },
176
182
  "required": [
@@ -63,6 +63,7 @@ export declare const ToolRefusalSchema: z.ZodObject<{
63
63
  readonly AUTH_REFUSED: "auth_refused";
64
64
  readonly LEASE_EXPIRED: "lease_expired";
65
65
  readonly TAB_GONE: "tab_gone";
66
+ readonly NAVIGATED_AWAY: "navigated_away";
66
67
  readonly ROUTE_SERVER_ERROR: "route_server_error";
67
68
  readonly APP_NOT_REOPENED: "app_not_reopened";
68
69
  readonly CONFIG_ELSEWHERE: "config_elsewhere";
@@ -85,11 +86,11 @@ export declare const ToolRefusalSchema: z.ZodObject<{
85
86
  reason: "other" | "no_session" | "no_match" | "unsupported" | "bad_args" | "not_ready";
86
87
  tool: string;
87
88
  retried: boolean;
88
- noSessionReason?: "auth_refused" | "lease_expired" | "tab_gone" | "route_server_error" | "app_not_reopened" | "config_elsewhere" | "no_listener_no_config" | "no_listener" | "no_config" | "sdk_not_reaching_daemon" | undefined;
89
+ noSessionReason?: "auth_refused" | "lease_expired" | "tab_gone" | "navigated_away" | "route_server_error" | "app_not_reopened" | "config_elsewhere" | "no_listener_no_config" | "no_listener" | "no_config" | "sdk_not_reaching_daemon" | undefined;
89
90
  }, {
90
91
  reason: "other" | "no_session" | "no_match" | "unsupported" | "bad_args" | "not_ready";
91
92
  tool: string;
92
93
  retried: boolean;
93
- noSessionReason?: "auth_refused" | "lease_expired" | "tab_gone" | "route_server_error" | "app_not_reopened" | "config_elsewhere" | "no_listener_no_config" | "no_listener" | "no_config" | "sdk_not_reaching_daemon" | undefined;
94
+ noSessionReason?: "auth_refused" | "lease_expired" | "tab_gone" | "navigated_away" | "route_server_error" | "app_not_reopened" | "config_elsewhere" | "no_listener_no_config" | "no_listener" | "no_config" | "sdk_not_reaching_daemon" | undefined;
94
95
  }>;
95
96
  export type ToolRefusal = z.infer<typeof ToolRefusalSchema>;