@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
@@ -16,7 +16,7 @@
16
16
  * controls. `hook-payload-carries-no-secret.test.ts` is the check, and it reads this file's schemas
17
17
  * rather than a hand-kept list.
18
18
  */
19
- import { z } from 'zod';
19
+ import * as z from 'zod';
20
20
  /**
21
21
  * The events a hook can attach to.
22
22
  *
@@ -58,37 +58,17 @@ export declare const HOOK_EVENT_NAMES: readonly HookEventName[];
58
58
  export declare const VerdictHookPayloadSchema: z.ZodObject<{
59
59
  at: z.ZodString;
60
60
  projectId: z.ZodOptional<z.ZodString>;
61
- } & {
62
61
  event: z.ZodLiteral<"verdict">;
63
62
  tool: z.ZodString;
64
63
  verified: z.ZodString;
65
64
  because: z.ZodOptional<z.ZodString>;
66
65
  sessionId: z.ZodOptional<z.ZodString>;
67
66
  url: z.ZodOptional<z.ZodString>;
68
- }, "strip", z.ZodTypeAny, {
69
- at: string;
70
- event: "verdict";
71
- verified: string;
72
- tool: string;
73
- url?: string | undefined;
74
- projectId?: string | undefined;
75
- sessionId?: string | undefined;
76
- because?: string | undefined;
77
- }, {
78
- at: string;
79
- event: "verdict";
80
- verified: string;
81
- tool: string;
82
- url?: string | undefined;
83
- projectId?: string | undefined;
84
- sessionId?: string | undefined;
85
- because?: string | undefined;
86
- }>;
67
+ }, z.core.$strip>;
87
68
  export type VerdictHookPayload = z.infer<typeof VerdictHookPayloadSchema>;
88
69
  export declare const BugFoundHookPayloadSchema: z.ZodObject<{
89
70
  at: z.ZodString;
90
71
  projectId: z.ZodOptional<z.ZodString>;
91
- } & {
92
72
  event: z.ZodLiteral<"bug_found">;
93
73
  kind: z.ZodString;
94
74
  source: z.ZodOptional<z.ZodString>;
@@ -97,111 +77,42 @@ export declare const BugFoundHookPayloadSchema: z.ZodObject<{
97
77
  route: z.ZodOptional<z.ZodString>;
98
78
  tool: z.ZodString;
99
79
  sessionId: z.ZodOptional<z.ZodString>;
100
- }, "strip", z.ZodTypeAny, {
101
- repeat: boolean;
102
- at: string;
103
- kind: string;
104
- event: "bug_found";
105
- tool: string;
106
- route?: string | undefined;
107
- source?: string | undefined;
108
- projectId?: string | undefined;
109
- sessionId?: string | undefined;
110
- fingerprint?: string | undefined;
111
- }, {
112
- repeat: boolean;
113
- at: string;
114
- kind: string;
115
- event: "bug_found";
116
- tool: string;
117
- route?: string | undefined;
118
- source?: string | undefined;
119
- projectId?: string | undefined;
120
- sessionId?: string | undefined;
121
- fingerprint?: string | undefined;
122
- }>;
80
+ }, z.core.$strip>;
123
81
  export type BugFoundHookPayload = z.infer<typeof BugFoundHookPayloadSchema>;
124
82
  export declare const SessionHookPayloadSchema: z.ZodObject<{
125
83
  at: z.ZodString;
126
84
  projectId: z.ZodOptional<z.ZodString>;
127
- } & {
128
- event: z.ZodEnum<["session_started", "session_ended"]>;
85
+ event: z.ZodEnum<{
86
+ session_started: "session_started";
87
+ session_ended: "session_ended";
88
+ }>;
129
89
  sessionId: z.ZodString;
130
90
  url: z.ZodOptional<z.ZodString>;
131
91
  runtime: z.ZodOptional<z.ZodString>;
132
- }, "strip", z.ZodTypeAny, {
133
- at: string;
134
- event: "session_started" | "session_ended";
135
- sessionId: string;
136
- url?: string | undefined;
137
- projectId?: string | undefined;
138
- runtime?: string | undefined;
139
- }, {
140
- at: string;
141
- event: "session_started" | "session_ended";
142
- sessionId: string;
143
- url?: string | undefined;
144
- projectId?: string | undefined;
145
- runtime?: string | undefined;
146
- }>;
92
+ }, z.core.$strip>;
147
93
  export type SessionHookPayload = z.infer<typeof SessionHookPayloadSchema>;
148
94
  export declare const SyncHookPayloadSchema: z.ZodObject<{
149
95
  at: z.ZodString;
150
96
  projectId: z.ZodOptional<z.ZodString>;
151
- } & {
152
97
  event: z.ZodLiteral<"sync_completed">;
153
98
  runsPushed: z.ZodNumber;
154
99
  ok: z.ZodBoolean;
155
100
  error: z.ZodOptional<z.ZodString>;
156
- }, "strip", z.ZodTypeAny, {
157
- at: string;
158
- ok: boolean;
159
- event: "sync_completed";
160
- runsPushed: number;
161
- error?: string | undefined;
162
- projectId?: string | undefined;
163
- }, {
164
- at: string;
165
- ok: boolean;
166
- event: "sync_completed";
167
- runsPushed: number;
168
- error?: string | undefined;
169
- projectId?: string | undefined;
170
- }>;
101
+ }, z.core.$strip>;
171
102
  export type SyncHookPayload = z.infer<typeof SyncHookPayloadSchema>;
172
103
  /** Any hook payload. A consumer narrows on `event`, which every variant carries as a literal. */
173
- export declare const HookPayloadSchema: z.ZodDiscriminatedUnion<"event", [z.ZodObject<{
104
+ export declare const HookPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
174
105
  at: z.ZodString;
175
106
  projectId: z.ZodOptional<z.ZodString>;
176
- } & {
177
107
  event: z.ZodLiteral<"verdict">;
178
108
  tool: z.ZodString;
179
109
  verified: z.ZodString;
180
110
  because: z.ZodOptional<z.ZodString>;
181
111
  sessionId: z.ZodOptional<z.ZodString>;
182
112
  url: z.ZodOptional<z.ZodString>;
183
- }, "strip", z.ZodTypeAny, {
184
- at: string;
185
- event: "verdict";
186
- verified: string;
187
- tool: string;
188
- url?: string | undefined;
189
- projectId?: string | undefined;
190
- sessionId?: string | undefined;
191
- because?: string | undefined;
192
- }, {
193
- at: string;
194
- event: "verdict";
195
- verified: string;
196
- tool: string;
197
- url?: string | undefined;
198
- projectId?: string | undefined;
199
- sessionId?: string | undefined;
200
- because?: string | undefined;
201
- }>, z.ZodObject<{
113
+ }, z.core.$strip>, z.ZodObject<{
202
114
  at: z.ZodString;
203
115
  projectId: z.ZodOptional<z.ZodString>;
204
- } & {
205
116
  event: z.ZodLiteral<"bug_found">;
206
117
  kind: z.ZodString;
207
118
  source: z.ZodOptional<z.ZodString>;
@@ -210,95 +121,28 @@ export declare const HookPayloadSchema: z.ZodDiscriminatedUnion<"event", [z.ZodO
210
121
  route: z.ZodOptional<z.ZodString>;
211
122
  tool: z.ZodString;
212
123
  sessionId: z.ZodOptional<z.ZodString>;
213
- }, "strip", z.ZodTypeAny, {
214
- repeat: boolean;
215
- at: string;
216
- kind: string;
217
- event: "bug_found";
218
- tool: string;
219
- route?: string | undefined;
220
- source?: string | undefined;
221
- projectId?: string | undefined;
222
- sessionId?: string | undefined;
223
- fingerprint?: string | undefined;
224
- }, {
225
- repeat: boolean;
226
- at: string;
227
- kind: string;
228
- event: "bug_found";
229
- tool: string;
230
- route?: string | undefined;
231
- source?: string | undefined;
232
- projectId?: string | undefined;
233
- sessionId?: string | undefined;
234
- fingerprint?: string | undefined;
235
- }>, z.ZodObject<{
124
+ }, z.core.$strip>, z.ZodObject<{
236
125
  at: z.ZodString;
237
126
  projectId: z.ZodOptional<z.ZodString>;
238
127
  sessionId: z.ZodString;
239
128
  url: z.ZodOptional<z.ZodString>;
240
129
  runtime: z.ZodOptional<z.ZodString>;
241
- } & {
242
130
  event: z.ZodLiteral<"session_started">;
243
- }, "strip", z.ZodTypeAny, {
244
- at: string;
245
- event: "session_started";
246
- sessionId: string;
247
- url?: string | undefined;
248
- projectId?: string | undefined;
249
- runtime?: string | undefined;
250
- }, {
251
- at: string;
252
- event: "session_started";
253
- sessionId: string;
254
- url?: string | undefined;
255
- projectId?: string | undefined;
256
- runtime?: string | undefined;
257
- }>, z.ZodObject<{
131
+ }, z.core.$strip>, z.ZodObject<{
258
132
  at: z.ZodString;
259
133
  projectId: z.ZodOptional<z.ZodString>;
260
134
  sessionId: z.ZodString;
261
135
  url: z.ZodOptional<z.ZodString>;
262
136
  runtime: z.ZodOptional<z.ZodString>;
263
- } & {
264
137
  event: z.ZodLiteral<"session_ended">;
265
- }, "strip", z.ZodTypeAny, {
266
- at: string;
267
- event: "session_ended";
268
- sessionId: string;
269
- url?: string | undefined;
270
- projectId?: string | undefined;
271
- runtime?: string | undefined;
272
- }, {
273
- at: string;
274
- event: "session_ended";
275
- sessionId: string;
276
- url?: string | undefined;
277
- projectId?: string | undefined;
278
- runtime?: string | undefined;
279
- }>, z.ZodObject<{
138
+ }, z.core.$strip>, z.ZodObject<{
280
139
  at: z.ZodString;
281
140
  projectId: z.ZodOptional<z.ZodString>;
282
- } & {
283
141
  event: z.ZodLiteral<"sync_completed">;
284
142
  runsPushed: z.ZodNumber;
285
143
  ok: z.ZodBoolean;
286
144
  error: z.ZodOptional<z.ZodString>;
287
- }, "strip", z.ZodTypeAny, {
288
- at: string;
289
- ok: boolean;
290
- event: "sync_completed";
291
- runsPushed: number;
292
- error?: string | undefined;
293
- projectId?: string | undefined;
294
- }, {
295
- at: string;
296
- ok: boolean;
297
- event: "sync_completed";
298
- runsPushed: number;
299
- error?: string | undefined;
300
- projectId?: string | undefined;
301
- }>]>;
145
+ }, z.core.$strip>], "event">;
302
146
  export type HookPayload = z.infer<typeof HookPayloadSchema>;
303
147
  /**
304
148
  * The file a user writes: event name to command.
@@ -16,7 +16,7 @@
16
16
  * controls. `hook-payload-carries-no-secret.test.ts` is the check, and it reads this file's schemas
17
17
  * rather than a hand-kept list.
18
18
  */
19
- import { z } from 'zod';
19
+ import * as z from 'zod';
20
20
  /**
21
21
  * The events a hook can attach to.
22
22
  *
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod';
2
2
  /**
3
3
  * The three phases between "never heard of Reticle" and "it produced a verdict on my app".
4
4
  *
@@ -60,7 +60,7 @@ export declare const NextStepOffered: {
60
60
  };
61
61
  export type NextStepOffered = (typeof NextStepOffered)[keyof typeof NextStepOffered];
62
62
  export declare const OnboardingStepSchema: z.ZodObject<{
63
- phase: z.ZodNativeEnum<{
63
+ phase: z.ZodEnum<{
64
64
  /** Getting the CLI onto the machine and the MCP registered with the agents that are there. */
65
65
  readonly INSTALL: "install";
66
66
  /** Being shown what Reticle is and how it is driven, before being asked to drive anything. */
@@ -68,19 +68,10 @@ export declare const OnboardingStepSchema: z.ZodObject<{
68
68
  /** Instrumenting a real project and driving it until something is actually proved. */
69
69
  readonly FIRST_RUN: "first_run";
70
70
  }>;
71
- /**
72
- * Our name for the step, and ONLY one of ours.
73
- *
74
- * This was `z.string().max(48)`, with a comment promising it was never user text — and a cap is
75
- * not a promise. `/Users/someone/secret/project` is 28 characters and validated cleanly, which is
76
- * a rule-3 leak (names, never values) reaching the wire from the one payload a person can edit:
77
- * the installer's breadcrumb file, on disk, in their own home directory.
78
- *
79
- * A closed set makes the promise enforceable instead of aspirational. Found by the test written
80
- * for that file, not by reading this line.
81
- */
82
- step: z.ZodEnum<[string, ...string[]]>;
83
- status: z.ZodNativeEnum<{
71
+ step: z.ZodEnum<{
72
+ [x: string]: string;
73
+ }>;
74
+ status: z.ZodEnum<{
84
75
  readonly STARTED: "started";
85
76
  readonly COMPLETED: "completed";
86
77
  readonly FAILED: "failed";
@@ -88,56 +79,15 @@ export declare const OnboardingStepSchema: z.ZodObject<{
88
79
  /** Nothing to do — already installed, already instrumented. Not a loss, and not a win either. */
89
80
  readonly SKIPPED: "skipped";
90
81
  }>;
91
- /**
92
- * Milliseconds this step took. Absent when the step is instantaneous or not timed — absent means
93
- * NOT MEASURED, never zero, because a zero would pull every average toward a duration nobody had.
94
- */
95
82
  elapsedMs: z.ZodOptional<z.ZodNumber>;
96
- /** Classified cause when it failed — our vocabulary, never a raw error or a path. */
97
83
  reason: z.ZodOptional<z.ZodString>;
98
- /** The stack it was detected on, so a phase that only fails on one framework is visible. */
99
84
  stack: z.ZodOptional<z.ZodString>;
100
- /**
101
- * True when nobody was asked anything — the zero-human-input path an agent takes from a link.
102
- *
103
- * Recorded because the two audiences fail differently and a funnel that mixes them explains
104
- * neither: a human abandons a step, an agent's run exits.
105
- */
106
85
  unattended: z.ZodOptional<z.ZodBoolean>;
107
- /**
108
- * The first time this machine + project crossed this step, ever. The daemon's "first" steps are
109
- * claimed on disk and fire once; absent on a step that is not a first, and on one reported from a
110
- * home that could not be written (which fires once per process instead).
111
- */
112
86
  firstEver: z.ZodOptional<z.ZodBoolean>;
113
- /** Only on `next_step_offered`: the step the first session call offered. */
114
- offered: z.ZodOptional<z.ZodNativeEnum<{
87
+ offered: z.ZodOptional<z.ZodEnum<{
115
88
  readonly LEASE: "lease";
116
89
  readonly INIT_CONSENT: "init_consent";
117
90
  }>>;
118
- /** Only on a `completed` `next_step_offered`: the agent's next call did the offered step. */
119
91
  nextFollowed: z.ZodOptional<z.ZodBoolean>;
120
- }, "strip", z.ZodTypeAny, {
121
- step: string;
122
- status: "skipped" | "completed" | "failed" | "started" | "abandoned";
123
- phase: "install" | "onboard" | "first_run";
124
- reason?: string | undefined;
125
- stack?: string | undefined;
126
- elapsedMs?: number | undefined;
127
- unattended?: boolean | undefined;
128
- firstEver?: boolean | undefined;
129
- offered?: "lease" | "init_consent" | undefined;
130
- nextFollowed?: boolean | undefined;
131
- }, {
132
- step: string;
133
- status: "skipped" | "completed" | "failed" | "started" | "abandoned";
134
- phase: "install" | "onboard" | "first_run";
135
- reason?: string | undefined;
136
- stack?: string | undefined;
137
- elapsedMs?: number | undefined;
138
- unattended?: boolean | undefined;
139
- firstEver?: boolean | undefined;
140
- offered?: "lease" | "init_consent" | undefined;
141
- nextFollowed?: boolean | undefined;
142
- }>;
92
+ }, z.core.$strip>;
143
93
  export type OnboardingStep = z.infer<typeof OnboardingStepSchema>;
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod';
2
2
  /**
3
3
  * The three phases between "never heard of Reticle" and "it produced a verdict on my app".
4
4
  *
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod';
2
2
  /** The registry filename for a daemon on `port` (sibling of daemon-<port>.pid /.log). */
3
3
  export declare function daemonRegistryFileName(port: number): string;
4
4
  /** Extract the port from a registry filename, or null when the name isn't a registry entry. */
@@ -10,19 +10,7 @@ export declare const DaemonRegistryEntrySchema: z.ZodObject<{
10
10
  cwd: z.ZodString;
11
11
  projectId: z.ZodOptional<z.ZodString>;
12
12
  startedAt: z.ZodNumber;
13
- }, "strip", z.ZodTypeAny, {
14
- port: number;
15
- pid: number;
16
- cwd: string;
17
- startedAt: number;
18
- projectId?: string | undefined;
19
- }, {
20
- port: number;
21
- pid: number;
22
- cwd: string;
23
- startedAt: number;
24
- projectId?: string | undefined;
25
- }>;
13
+ }, z.core.$strip>;
26
14
  export type DaemonRegistryEntry = z.infer<typeof DaemonRegistryEntrySchema>;
27
15
  /**
28
16
  * Pick the daemon port an app should connect to, given the registry entries, the app's projectId, and
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod';
2
2
  /**
3
3
  * The daemon discovery registry: each live daemon drops a `daemon-<port>.json` in ~/.reticle so a
4
4
  * build-time tool (vite/next plugin) can find the RIGHT daemon by projectId instead of forcing the
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod';
2
2
  /** The registry filename for a dev server listening on `port`. */
3
3
  export declare function devServerRegistryFileName(port: number): string;
4
4
  /**
@@ -13,41 +13,12 @@ export declare function devServerRegistryPort(fileName: string): number | null;
13
13
  export declare const DevServerEntrySchema: z.ZodObject<{
14
14
  port: z.ZodNumber;
15
15
  pid: z.ZodNumber;
16
- /** The project directory the dev server is serving — how a monorepo tells its apps apart. */
17
16
  root: z.ZodString;
18
- /** Where the app is actually served, as the dev server itself reports it. Never assembled here. */
19
17
  url: z.ZodString;
20
- /**
21
- * The SDK version in the bundle, so a skew can be named rather than guessed at.
22
- *
23
- * Optional, and ABSENT rather than empty when it cannot be resolved. `""` reads as "the version is
24
- * empty"; a missing field reads as "not known", which is the true statement — and the difference
25
- * matters to the one reader who exists for this field, a skew diagnosis.
26
- */
27
18
  sdkVersion: z.ZodOptional<z.ZodString>;
28
19
  startedAt: z.ZodNumber;
29
- /**
30
- * Optional because an app can be running before `init` has ever named it — which is exactly the
31
- * state this signal has to be able to describe.
32
- */
33
20
  projectId: z.ZodOptional<z.ZodString>;
34
- }, "strip", z.ZodTypeAny, {
35
- url: string;
36
- root: string;
37
- port: number;
38
- pid: number;
39
- startedAt: number;
40
- projectId?: string | undefined;
41
- sdkVersion?: string | undefined;
42
- }, {
43
- url: string;
44
- root: string;
45
- port: number;
46
- pid: number;
47
- startedAt: number;
48
- projectId?: string | undefined;
49
- sdkVersion?: string | undefined;
50
- }>;
21
+ }, z.core.$strip>;
51
22
  export type DevServerEntry = z.infer<typeof DevServerEntrySchema>;
52
23
  /**
53
24
  * The entries whose process is still running, lowest port first.
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod';
2
2
  /**
3
3
  * The dev-server discovery registry — the return leg of `daemon-registry.ts`.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod';
2
2
  /**
3
3
  * Which directory a projectId lives in, on this machine.
4
4
  *
@@ -24,45 +24,17 @@ import { z } from 'zod';
24
24
  /** Sibling of `daemon-<port>.json` in `~/.reticle`. One file, all projects. */
25
25
  export declare const PROJECT_REGISTRY_FILE = "projects.json";
26
26
  export declare const ProjectRegistryEntrySchema: z.ZodObject<{
27
- /** Absolute path to the directory whose `.reticle.json` declares this project. */
28
27
  directory: z.ZodString;
29
- /** When this pairing was last confirmed. Lets a future prune drop entries nobody has opened. */
30
28
  lastSeenAt: z.ZodNumber;
31
- }, "strip", z.ZodTypeAny, {
32
- directory: string;
33
- lastSeenAt: number;
34
- }, {
35
- directory: string;
36
- lastSeenAt: number;
37
- }>;
29
+ }, z.core.$strip>;
38
30
  export type ProjectRegistryEntry = z.infer<typeof ProjectRegistryEntrySchema>;
39
31
  export declare const ProjectRegistrySchema: z.ZodObject<{
40
32
  version: z.ZodLiteral<1>;
41
33
  projects: z.ZodRecord<z.ZodString, z.ZodObject<{
42
- /** Absolute path to the directory whose `.reticle.json` declares this project. */
43
34
  directory: z.ZodString;
44
- /** When this pairing was last confirmed. Lets a future prune drop entries nobody has opened. */
45
35
  lastSeenAt: z.ZodNumber;
46
- }, "strip", z.ZodTypeAny, {
47
- directory: string;
48
- lastSeenAt: number;
49
- }, {
50
- directory: string;
51
- lastSeenAt: number;
52
- }>>;
53
- }, "strip", z.ZodTypeAny, {
54
- version: 1;
55
- projects: Record<string, {
56
- directory: string;
57
- lastSeenAt: number;
58
- }>;
59
- }, {
60
- version: 1;
61
- projects: Record<string, {
62
- directory: string;
63
- lastSeenAt: number;
64
- }>;
65
- }>;
36
+ }, z.core.$strip>>;
37
+ }, z.core.$strip>;
66
38
  export type ProjectRegistry = z.infer<typeof ProjectRegistrySchema>;
67
39
  /** A project the resolver may consider. Structurally identical to config discovery's `FoundConfig`
68
40
  * on purpose: both sources feed one code path, so neither becomes the privileged one. */
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod';
2
2
  /**
3
3
  * Which directory a projectId lives in, on this machine.
4
4
  *
@@ -1,77 +1,74 @@
1
1
  {
2
- "$ref": "#/definitions/CommandMessage",
3
- "definitions": {
4
- "CommandMessage": {
2
+ "title": "CommandMessage",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "object",
5
+ "properties": {
6
+ "kind": {
7
+ "type": "string",
8
+ "const": "command"
9
+ },
10
+ "id": {
11
+ "type": "string",
12
+ "minLength": 1,
13
+ "maxLength": 128
14
+ },
15
+ "sessionId": {
16
+ "type": "string",
17
+ "minLength": 1,
18
+ "maxLength": 128
19
+ },
20
+ "name": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "maxLength": 128
24
+ },
25
+ "args": {
26
+ "default": {},
27
+ "type": "object",
28
+ "propertyNames": {
29
+ "type": "string"
30
+ },
31
+ "additionalProperties": {}
32
+ },
33
+ "by": {
34
+ "type": "string",
35
+ "enum": [
36
+ "harness"
37
+ ]
38
+ },
39
+ "outward": {
5
40
  "type": "object",
6
41
  "properties": {
7
- "kind": {
8
- "type": "string",
9
- "const": "command"
10
- },
11
- "id": {
12
- "type": "string",
13
- "minLength": 1,
14
- "maxLength": 128
15
- },
16
- "sessionId": {
17
- "type": "string",
18
- "minLength": 1,
19
- "maxLength": 128
20
- },
21
- "name": {
22
- "type": "string",
23
- "minLength": 1,
24
- "maxLength": 128
25
- },
26
- "args": {
27
- "type": "object",
28
- "additionalProperties": {},
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
42
+ "allowed": {
43
+ "maxItems": 16,
44
+ "type": "array",
45
+ "items": {
46
+ "type": "string",
47
+ "enum": [
48
+ "invite",
49
+ "send",
50
+ "share",
51
+ "delete",
52
+ "pay",
53
+ "publish",
54
+ "revoke",
55
+ "transfer",
56
+ "sign out",
57
+ "change role",
58
+ "create key",
59
+ "change state"
60
+ ]
61
+ }
66
62
  }
67
63
  },
68
64
  "required": [
69
- "kind",
70
- "id",
71
- "name"
72
- ],
73
- "additionalProperties": false
65
+ "allowed"
66
+ ]
74
67
  }
75
68
  },
76
- "$schema": "http://json-schema.org/draft-07/schema#"
69
+ "required": [
70
+ "kind",
71
+ "id",
72
+ "name"
73
+ ]
77
74
  }