@reticlehq/core 3.8.0 → 3.8.1

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 (93) hide show
  1. package/dist/artifacts/drive-script.d.ts +84 -1217
  2. package/dist/artifacts/drive-script.js +1 -1
  3. package/dist/artifacts/flow-expect-flat.d.ts +8 -192
  4. package/dist/artifacts/flow-expect-flat.js +2 -2
  5. package/dist/artifacts/flow-results.d.ts +15 -0
  6. package/dist/artifacts/flow-types.d.ts +202 -2331
  7. package/dist/artifacts/flow-types.js +2 -2
  8. package/dist/artifacts/harness-map.d.ts +8 -69
  9. package/dist/artifacts/harness-map.js +1 -1
  10. package/dist/artifacts/hud-notices.d.ts +8 -82
  11. package/dist/artifacts/hud-notices.js +1 -1
  12. package/dist/artifacts/impact.d.ts +80 -1638
  13. package/dist/artifacts/impact.js +4 -4
  14. package/dist/artifacts/journal.d.ts +12 -247
  15. package/dist/artifacts/journal.js +2 -2
  16. package/dist/artifacts/prompt-context.d.ts +5 -43
  17. package/dist/artifacts/prompt-context.js +1 -1
  18. package/dist/artifacts/screenshot-upload.d.ts +3 -26
  19. package/dist/artifacts/screenshot-upload.js +1 -1
  20. package/dist/hooks/hook-events.d.ts +15 -171
  21. package/dist/hooks/hook-events.js +1 -1
  22. package/dist/onboarding.d.ts +8 -58
  23. package/dist/onboarding.js +1 -1
  24. package/dist/registry/daemon-registry.d.ts +2 -14
  25. package/dist/registry/daemon-registry.js +1 -1
  26. package/dist/registry/dev-server-registry.d.ts +2 -31
  27. package/dist/registry/dev-server-registry.js +1 -1
  28. package/dist/registry/project-registry.d.ts +4 -32
  29. package/dist/registry/project-registry.js +1 -1
  30. package/dist/schema/command-message.json +65 -68
  31. package/dist/schema/command-name.json +29 -33
  32. package/dist/schema/command-result.json +25 -30
  33. package/dist/schema/event-message.json +104 -103
  34. package/dist/schema/event-payloads.json +142 -119
  35. package/dist/schema/event-type.json +47 -50
  36. package/dist/schema/hello-message.json +150 -154
  37. package/dist/schema/reticle-event.json +98 -96
  38. package/dist/schema/reticle-message.json +338 -333
  39. package/dist/telemetry-bug.d.ts +4 -75
  40. package/dist/telemetry-bug.js +1 -1
  41. package/dist/telemetry-feedback.d.ts +11 -99
  42. package/dist/telemetry-feedback.js +1 -1
  43. package/dist/telemetry-refusal.d.ts +4 -31
  44. package/dist/telemetry-refusal.js +1 -1
  45. package/dist/telemetry-session.d.ts +39 -633
  46. package/dist/telemetry-session.js +10 -8
  47. package/dist/telemetry-signals.d.ts +58 -151
  48. package/dist/telemetry-signals.js +12 -1
  49. package/dist/telemetry.d.ts +137 -1814
  50. package/dist/telemetry.js +1 -1
  51. package/dist/verdict/compare-source.d.ts +1 -1
  52. package/dist/verdict/compare-source.js +1 -1
  53. package/dist/verdict/disparity.d.ts +8 -56
  54. package/dist/verdict/disparity.js +1 -1
  55. package/dist/verdict/instrumentation-coverage.d.ts +3 -3
  56. package/dist/verdict/instrumentation-coverage.js +1 -1
  57. package/dist/verdict/instrumentation-gap.d.ts +3 -10
  58. package/dist/verdict/instrumentation-gap.js +1 -1
  59. package/dist/verdict/intent.d.ts +25 -224
  60. package/dist/verdict/intent.js +1 -1
  61. package/dist/verdict/predicate.d.ts +1 -1
  62. package/dist/verdict/predicate.js +5 -5
  63. package/dist/verdict/property-assertion.d.ts +23 -101
  64. package/dist/verdict/property-assertion.js +1 -1
  65. package/dist/verdict/run-report.d.ts +13 -108
  66. package/dist/verdict/run-report.js +1 -1
  67. package/dist/verdict/security.d.ts +12 -0
  68. package/dist/verdict/security.js +94 -7
  69. package/dist/verdict/verification-run.d.ts +112 -1668
  70. package/dist/verdict/verification-run.js +4 -4
  71. package/dist/verdict/verify-progress.d.ts +22 -64
  72. package/dist/verdict/verify-progress.js +1 -1
  73. package/dist/wire/constants/event-types.d.ts +2 -0
  74. package/dist/wire/constants/event-types.js +2 -0
  75. package/dist/wire/constants/response-body-reason.d.ts +4 -4
  76. package/dist/wire/constants/response-body-reason.js +4 -4
  77. package/dist/wire/constants/reticle-env.d.ts +2 -0
  78. package/dist/wire/constants/reticle-env.js +2 -0
  79. package/dist/wire/event-payloads.d.ts +108 -678
  80. package/dist/wire/event-payloads.js +24 -7
  81. package/dist/wire/event-priority.js +1 -0
  82. package/dist/wire/messages.d.ts +66 -755
  83. package/dist/wire/messages.js +3 -3
  84. package/dist/wire/next-step.d.ts +11 -51
  85. package/dist/wire/next-step.js +1 -1
  86. package/dist/wire/platform-link.js +2 -2
  87. package/dist/wire/production/production-policy.d.ts +37 -83
  88. package/dist/wire/production/production-policy.js +1 -1
  89. package/dist/wire/types.d.ts +75 -698
  90. package/dist/wire/types.js +5 -5
  91. package/dist/words/upgrade.d.ts +3 -13
  92. package/dist/words/upgrade.js +1 -1
  93. package/package.json +3 -4
@@ -9,7 +9,7 @@
9
9
  * `z.nativeEnum`, timestamps are epoch-ms NUMBERS (the clock is injected — never read inside pure
10
10
  * logic), no `any` (opaque evidence is `z.unknown`), and every domain string is a named constant.
11
11
  */
12
- import { z } from 'zod';
12
+ import * as z from 'zod';
13
13
  import { SubjectRefSchema } from 'open-verification';
14
14
  import { PredicateKind } from './consequence.js';
15
15
  import { Verified } from './verified-constants.js';
@@ -408,8 +408,8 @@ export const VerificationEvidenceSchema = z.object({
408
408
  .array(z.object({
409
409
  store: z.string(),
410
410
  path: z.string(),
411
- expected: z.unknown(),
412
- actual: z.unknown(),
411
+ expected: z.unknown().optional(),
412
+ actual: z.unknown().optional(),
413
413
  ok: z.boolean(),
414
414
  }))
415
415
  .default([]),
@@ -536,7 +536,7 @@ export const ReticleVerificationRunSchema = z.object({
536
536
  * schema loads with every page; its shape is `PromptContextSchema` in `@reticlehq/core/artifacts`,
537
537
  * which the daemon writes and reads it with.
538
538
  */
539
- context: z.record(z.unknown()).optional(),
539
+ context: z.record(z.string(), z.unknown()).optional(),
540
540
  changedFiles: z.array(RunChangedFileSchema).default([]),
541
541
  flows: z.array(RunFlowResultSchema).default([]),
542
542
  checks: z.array(RunCheckSchema).default([]),
@@ -19,7 +19,7 @@
19
19
  * - **`total` is known before the loop starts**, because "step 3" without "of 12" tells a reader
20
20
  * nothing about whether to keep waiting, which is the entire question they are asking.
21
21
  */
22
- import { z } from 'zod';
22
+ import * as z from 'zod';
23
23
  /** The phases a run passes through, in the order they occur. */
24
24
  export declare const VerifyPhase: {
25
25
  /** Opening the bridge connection. Fast, and the first thing that can fail. */
@@ -46,84 +46,42 @@ export declare const VERIFY_PROGRESS_NAME_MAX = 120;
46
46
  /** How many events a receiver keeps for one run. A walk nobody can scroll is not more honest. */
47
47
  export declare const VERIFY_PROGRESS_MAX_EVENTS = 200;
48
48
  export declare const verifyProgressEventSchema: z.ZodObject<{
49
- phase: z.ZodEnum<["connecting", "waiting_for_app", "flows_found", "flow_started", "flow_finished", "grading", "pushed"]>;
50
- /** 0-based position in the suite. Absent on phases that are not about one flow. */
49
+ phase: z.ZodEnum<{
50
+ connecting: "connecting";
51
+ waiting_for_app: "waiting_for_app";
52
+ flows_found: "flows_found";
53
+ flow_started: "flow_started";
54
+ flow_finished: "flow_finished";
55
+ grading: "grading";
56
+ pushed: "pushed";
57
+ }>;
51
58
  index: z.ZodOptional<z.ZodNumber>;
52
- /** How many flows the run will replay. Present from `flows_found` onwards. */
53
59
  total: z.ZodOptional<z.ZodNumber>;
54
- /** The flow being replayed. Absent on phases that are not about one flow. */
55
60
  name: z.ZodOptional<z.ZodString>;
56
- /** Did that flow replay cleanly? A convenience for rendering, never a verdict. */
57
61
  ok: z.ZodOptional<z.ZodBoolean>;
58
- /** When the emitter saw it, from the injected clock — never `Date.now()` in logic. */
59
62
  at: z.ZodNumber;
60
- }, "strip", z.ZodTypeAny, {
61
- at: number;
62
- phase: "connecting" | "waiting_for_app" | "flows_found" | "flow_started" | "flow_finished" | "grading" | "pushed";
63
- name?: string | undefined;
64
- ok?: boolean | undefined;
65
- total?: number | undefined;
66
- index?: number | undefined;
67
- }, {
68
- at: number;
69
- phase: "connecting" | "waiting_for_app" | "flows_found" | "flow_started" | "flow_finished" | "grading" | "pushed";
70
- name?: string | undefined;
71
- ok?: boolean | undefined;
72
- total?: number | undefined;
73
- index?: number | undefined;
74
- }>;
63
+ }, z.core.$strip>;
75
64
  export type VerifyProgressEvent = z.infer<typeof verifyProgressEventSchema>;
76
65
  /** The batch shape a run posts. Batched because one request per flow is a request per flow. */
77
66
  export declare const verifyProgressBatchSchema: z.ZodObject<{
78
67
  runId: z.ZodString;
79
68
  events: z.ZodArray<z.ZodObject<{
80
- phase: z.ZodEnum<["connecting", "waiting_for_app", "flows_found", "flow_started", "flow_finished", "grading", "pushed"]>;
81
- /** 0-based position in the suite. Absent on phases that are not about one flow. */
69
+ phase: z.ZodEnum<{
70
+ connecting: "connecting";
71
+ waiting_for_app: "waiting_for_app";
72
+ flows_found: "flows_found";
73
+ flow_started: "flow_started";
74
+ flow_finished: "flow_finished";
75
+ grading: "grading";
76
+ pushed: "pushed";
77
+ }>;
82
78
  index: z.ZodOptional<z.ZodNumber>;
83
- /** How many flows the run will replay. Present from `flows_found` onwards. */
84
79
  total: z.ZodOptional<z.ZodNumber>;
85
- /** The flow being replayed. Absent on phases that are not about one flow. */
86
80
  name: z.ZodOptional<z.ZodString>;
87
- /** Did that flow replay cleanly? A convenience for rendering, never a verdict. */
88
81
  ok: z.ZodOptional<z.ZodBoolean>;
89
- /** When the emitter saw it, from the injected clock — never `Date.now()` in logic. */
90
82
  at: z.ZodNumber;
91
- }, "strip", z.ZodTypeAny, {
92
- at: number;
93
- phase: "connecting" | "waiting_for_app" | "flows_found" | "flow_started" | "flow_finished" | "grading" | "pushed";
94
- name?: string | undefined;
95
- ok?: boolean | undefined;
96
- total?: number | undefined;
97
- index?: number | undefined;
98
- }, {
99
- at: number;
100
- phase: "connecting" | "waiting_for_app" | "flows_found" | "flow_started" | "flow_finished" | "grading" | "pushed";
101
- name?: string | undefined;
102
- ok?: boolean | undefined;
103
- total?: number | undefined;
104
- index?: number | undefined;
105
- }>, "many">;
106
- }, "strip", z.ZodTypeAny, {
107
- runId: string;
108
- events: {
109
- at: number;
110
- phase: "connecting" | "waiting_for_app" | "flows_found" | "flow_started" | "flow_finished" | "grading" | "pushed";
111
- name?: string | undefined;
112
- ok?: boolean | undefined;
113
- total?: number | undefined;
114
- index?: number | undefined;
115
- }[];
116
- }, {
117
- runId: string;
118
- events: {
119
- at: number;
120
- phase: "connecting" | "waiting_for_app" | "flows_found" | "flow_started" | "flow_finished" | "grading" | "pushed";
121
- name?: string | undefined;
122
- ok?: boolean | undefined;
123
- total?: number | undefined;
124
- index?: number | undefined;
125
- }[];
126
- }>;
83
+ }, z.core.$strip>>;
84
+ }, z.core.$strip>;
127
85
  export type VerifyProgressBatch = z.infer<typeof verifyProgressBatchSchema>;
128
86
  /** Truncate a user-supplied flow name to the wire bound, so a caller cannot overflow the schema. */
129
87
  export declare const boundFlowName: (name: string) => string;
@@ -19,7 +19,7 @@
19
19
  * - **`total` is known before the loop starts**, because "step 3" without "of 12" tells a reader
20
20
  * nothing about whether to keep waiting, which is the entire question they are asking.
21
21
  */
22
- import { z } from 'zod';
22
+ import * as z from 'zod';
23
23
  /** The phases a run passes through, in the order they occur. */
24
24
  export const VerifyPhase = {
25
25
  /** Opening the bridge connection. Fast, and the first thing that can fail. */
@@ -96,6 +96,8 @@ export declare const EventType: {
96
96
  * matching in-page NET_REQUEST so the driven view never loses fidelity to an outside-in tool.
97
97
  */
98
98
  readonly NET_DETAIL: "net.detail";
99
+ /** SDK response body captured after headers. Matched to its NET_REQUEST by id, method and URL. */
100
+ readonly NET_RESPONSE_BODY: "net.response-body";
99
101
  /**
100
102
  * Live-control: browser → bridge. A human acted on the presenter panel.
101
103
  * `data: { kind: HumanControlKind; text?: string }`. Rides the existing EventMessage.
@@ -96,6 +96,8 @@ export const EventType = {
96
96
  * matching in-page NET_REQUEST so the driven view never loses fidelity to an outside-in tool.
97
97
  */
98
98
  NET_DETAIL: 'net.detail',
99
+ /** SDK response body captured after headers. Matched to its NET_REQUEST by id, method and URL. */
100
+ NET_RESPONSE_BODY: 'net.response-body',
99
101
  /**
100
102
  * Live-control: browser → bridge. A human acted on the presenter panel.
101
103
  * `data: { kind: HumanControlKind; text?: string }`. Rides the existing EventMessage.
@@ -1,19 +1,19 @@
1
1
  /**
2
2
  * Why a NET_REQUEST's `responseBody` is absent, or present when the app never asked for bodies.
3
3
  *
4
- * `ERROR_STATUS` marks a body recorded only because the call failed. The other three mark a body
5
- * the SDK skipped ON PURPOSE while body capture was on (#1520). Without them, a skipped body looked
4
+ * `ERROR_STATUS` marks a body recorded only because the call failed. The other three explain why a
5
+ * body is not available while capture is on (#1520). Without them, a skipped body looked
6
6
  * like capture switched off, so a body clause answered `no` and told the caller to enable a setting
7
7
  * that was already on. No reason on a body-less call means capture was off, or the SDK predates this.
8
8
  */
9
9
  export declare const ResponseBodyReason: {
10
10
  /** Recorded only because the response was an error; the app did not ask for bodies. */
11
11
  readonly ERROR_STATUS: "error-status";
12
- /** A stream (`text/event-stream`, ndjson): never read, because reading it would hang the app. */
12
+ /** An unsupported stream format, such as ndjson, which the SDK does not read. */
13
13
  readonly STREAMING: "streaming";
14
14
  /** A binary or other non-text type, which is not recorded. */
15
15
  readonly NOT_TEXT: "not-text";
16
- /** A text body that could not be read before the read deadline, or at all. */
16
+ /** A body still being captured, or one that could not be read before its deadline or at all. */
17
17
  readonly UNREADABLE: "unreadable";
18
18
  };
19
19
  export type ResponseBodyReason = (typeof ResponseBodyReason)[keyof typeof ResponseBodyReason];
@@ -1,18 +1,18 @@
1
1
  /**
2
2
  * Why a NET_REQUEST's `responseBody` is absent, or present when the app never asked for bodies.
3
3
  *
4
- * `ERROR_STATUS` marks a body recorded only because the call failed. The other three mark a body
5
- * the SDK skipped ON PURPOSE while body capture was on (#1520). Without them, a skipped body looked
4
+ * `ERROR_STATUS` marks a body recorded only because the call failed. The other three explain why a
5
+ * body is not available while capture is on (#1520). Without them, a skipped body looked
6
6
  * like capture switched off, so a body clause answered `no` and told the caller to enable a setting
7
7
  * that was already on. No reason on a body-less call means capture was off, or the SDK predates this.
8
8
  */
9
9
  export const ResponseBodyReason = {
10
10
  /** Recorded only because the response was an error; the app did not ask for bodies. */
11
11
  ERROR_STATUS: 'error-status',
12
- /** A stream (`text/event-stream`, ndjson): never read, because reading it would hang the app. */
12
+ /** An unsupported stream format, such as ndjson, which the SDK does not read. */
13
13
  STREAMING: 'streaming',
14
14
  /** A binary or other non-text type, which is not recorded. */
15
15
  NOT_TEXT: 'not-text',
16
- /** A text body that could not be read before the read deadline, or at all. */
16
+ /** A body still being captured, or one that could not be read before its deadline or at all. */
17
17
  UNREADABLE: 'unreadable',
18
18
  };
@@ -135,4 +135,6 @@ export declare const ReticleEnv: {
135
135
  readonly PROMPT_CAPTURE: "RETICLE_PROMPT_CAPTURE";
136
136
  /** "0"/"false"/"off" stops the daemon's background sync, on this whole machine. */
137
137
  readonly BACKGROUND_SYNC: "RETICLE_BACKGROUND_SYNC";
138
+ /** Set by the parent that starts the daemon: how it started it. A `DaemonSpawnMethod`. */
139
+ readonly SPAWN_METHOD: "RETICLE_SPAWN_METHOD";
138
140
  };
@@ -135,4 +135,6 @@ export const ReticleEnv = {
135
135
  PROMPT_CAPTURE: 'RETICLE_PROMPT_CAPTURE',
136
136
  /** "0"/"false"/"off" stops the daemon's background sync, on this whole machine. */
137
137
  BACKGROUND_SYNC: 'RETICLE_BACKGROUND_SYNC',
138
+ /** Set by the parent that starts the daemon: how it started it. A `DaemonSpawnMethod`. */
139
+ SPAWN_METHOD: 'RETICLE_SPAWN_METHOD',
138
140
  };