@reticlehq/core 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/artifacts/flow-constants.d.ts +19 -0
- package/dist/artifacts/flow-constants.js +36 -1
- package/dist/artifacts/flow-expect-flat.d.ts +16 -16
- package/dist/artifacts/flow-expect-flat.js +2 -2
- package/dist/artifacts/flow-mutation-target.js +4 -0
- package/dist/artifacts/flow-types.d.ts +393 -297
- package/dist/artifacts/flow-types.js +17 -2
- package/dist/artifacts/journal.d.ts +3 -2
- package/dist/hooks/hook-events.d.ts +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/registry/daemon-registry.d.ts +14 -4
- package/dist/registry/daemon-registry.js +20 -4
- package/dist/schema/event-payloads.json +3 -0
- package/dist/telemetry-refusal.d.ts +3 -2
- package/dist/telemetry.d.ts +11 -10
- package/dist/verdict/compare-source.d.ts +80 -0
- package/dist/verdict/compare-source.js +93 -0
- package/dist/verdict/consequence.d.ts +2 -0
- package/dist/verdict/consequence.js +2 -0
- package/dist/verdict/instrumentation-gap.js +1 -1
- package/dist/verdict/intent.d.ts +12 -12
- package/dist/verdict/predicate-tree.d.ts +35 -0
- package/dist/verdict/predicate-tree.js +40 -0
- package/dist/verdict/predicate.d.ts +11 -2
- package/dist/verdict/predicate.js +38 -2
- package/dist/verdict/verification-run.d.ts +261 -28
- package/dist/verdict/verification-run.js +36 -0
- package/dist/wire/channel.d.ts +10 -0
- package/dist/wire/channel.js +25 -0
- package/dist/wire/constants/constants.d.ts +45 -4
- package/dist/wire/constants/constants.js +57 -4
- package/dist/wire/event-payloads.d.ts +12 -9
- package/dist/wire/event-payloads.js +8 -3
- package/dist/wire/messages.d.ts +24 -24
- package/dist/wire/net.d.ts +17 -0
- package/dist/wire/net.js +17 -0
- package/dist/wire/redaction.js +17 -0
- package/dist/wire/toon.d.ts +1 -1
- package/dist/wire/toon.js +2 -1
- package/dist/wire/types.d.ts +44 -44
- package/dist/words/no-session-reason.d.ts +7 -0
- package/dist/words/no-session-reason.js +7 -0
- package/dist/words/notices.d.ts +7 -0
- package/dist/words/notices.js +9 -2
- package/package.json +3 -2
|
@@ -197,6 +197,61 @@ export declare const RunChangedFileSchema: z.ZodObject<{
|
|
|
197
197
|
risk?: ("auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external")[] | undefined;
|
|
198
198
|
}>;
|
|
199
199
|
export type RunChangedFile = z.infer<typeof RunChangedFileSchema>;
|
|
200
|
+
/**
|
|
201
|
+
* How much of a replay a synced run carries, so a teammate can replay it from the cloud without the
|
|
202
|
+
* artifact growing with the flow: past these, the per-step list stops and the recording is omitted
|
|
203
|
+
* (said so by `recordingOmitted`), never cut mid-flow into a journey nobody drove.
|
|
204
|
+
*/
|
|
205
|
+
export declare const RUN_STEP_RESULTS_MAX = 200;
|
|
206
|
+
export declare const RUN_TEXT_MAX = 300;
|
|
207
|
+
export declare const RUN_RECORDING_MAX_BYTES: number;
|
|
208
|
+
/** One step of a replayed flow, as synced: its outcome and the pages it ran on and led to. */
|
|
209
|
+
export declare const RunStepResultSchema: z.ZodObject<{
|
|
210
|
+
step: z.ZodNumber;
|
|
211
|
+
anchor: z.ZodString;
|
|
212
|
+
ok: z.ZodBoolean;
|
|
213
|
+
page: z.ZodOptional<z.ZodString>;
|
|
214
|
+
endPage: z.ZodOptional<z.ZodString>;
|
|
215
|
+
consequence: z.ZodOptional<z.ZodString>;
|
|
216
|
+
error: z.ZodOptional<z.ZodString>;
|
|
217
|
+
/** The drift's reason kind, when the step drifted. */
|
|
218
|
+
drift: z.ZodOptional<z.ZodString>;
|
|
219
|
+
}, "strip", z.ZodTypeAny, {
|
|
220
|
+
ok: boolean;
|
|
221
|
+
step: number;
|
|
222
|
+
anchor: string;
|
|
223
|
+
drift?: string | undefined;
|
|
224
|
+
error?: string | undefined;
|
|
225
|
+
page?: string | undefined;
|
|
226
|
+
endPage?: string | undefined;
|
|
227
|
+
consequence?: string | undefined;
|
|
228
|
+
}, {
|
|
229
|
+
ok: boolean;
|
|
230
|
+
step: number;
|
|
231
|
+
anchor: string;
|
|
232
|
+
drift?: string | undefined;
|
|
233
|
+
error?: string | undefined;
|
|
234
|
+
page?: string | undefined;
|
|
235
|
+
endPage?: string | undefined;
|
|
236
|
+
consequence?: string | undefined;
|
|
237
|
+
}>;
|
|
238
|
+
export type RunStepResult = z.infer<typeof RunStepResultSchema>;
|
|
239
|
+
/**
|
|
240
|
+
* The flow a run replayed, as recorded: enough to replay it again somewhere else.
|
|
241
|
+
*
|
|
242
|
+
* `steps` are FlowSteps, left opaque here: this module loads before the flow schema, and importing
|
|
243
|
+
* it made a cycle that crashed the built CLI at startup while every source-level test passed.
|
|
244
|
+
*/
|
|
245
|
+
export declare const RunFlowRecordingSchema: z.ZodObject<{
|
|
246
|
+
startPath: z.ZodOptional<z.ZodString>;
|
|
247
|
+
steps: z.ZodArray<z.ZodUnknown, "many">;
|
|
248
|
+
}, "strip", z.ZodTypeAny, {
|
|
249
|
+
steps: unknown[];
|
|
250
|
+
startPath?: string | undefined;
|
|
251
|
+
}, {
|
|
252
|
+
steps: unknown[];
|
|
253
|
+
startPath?: string | undefined;
|
|
254
|
+
}>;
|
|
200
255
|
/** A flow that was replayed as part of the run. */
|
|
201
256
|
export declare const RunFlowResultSchema: z.ZodObject<{
|
|
202
257
|
name: z.ZodString;
|
|
@@ -224,11 +279,58 @@ export declare const RunFlowResultSchema: z.ZodObject<{
|
|
|
224
279
|
}>>;
|
|
225
280
|
evidenceRef: z.ZodOptional<z.ZodString>;
|
|
226
281
|
failureReason: z.ZodOptional<z.ZodString>;
|
|
282
|
+
/** Each step's result and page — see RUN_STEP_RESULTS_MAX. */
|
|
283
|
+
stepResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
284
|
+
step: z.ZodNumber;
|
|
285
|
+
anchor: z.ZodString;
|
|
286
|
+
ok: z.ZodBoolean;
|
|
287
|
+
page: z.ZodOptional<z.ZodString>;
|
|
288
|
+
endPage: z.ZodOptional<z.ZodString>;
|
|
289
|
+
consequence: z.ZodOptional<z.ZodString>;
|
|
290
|
+
error: z.ZodOptional<z.ZodString>;
|
|
291
|
+
/** The drift's reason kind, when the step drifted. */
|
|
292
|
+
drift: z.ZodOptional<z.ZodString>;
|
|
293
|
+
}, "strip", z.ZodTypeAny, {
|
|
294
|
+
ok: boolean;
|
|
295
|
+
step: number;
|
|
296
|
+
anchor: string;
|
|
297
|
+
drift?: string | undefined;
|
|
298
|
+
error?: string | undefined;
|
|
299
|
+
page?: string | undefined;
|
|
300
|
+
endPage?: string | undefined;
|
|
301
|
+
consequence?: string | undefined;
|
|
302
|
+
}, {
|
|
303
|
+
ok: boolean;
|
|
304
|
+
step: number;
|
|
305
|
+
anchor: string;
|
|
306
|
+
drift?: string | undefined;
|
|
307
|
+
error?: string | undefined;
|
|
308
|
+
page?: string | undefined;
|
|
309
|
+
endPage?: string | undefined;
|
|
310
|
+
consequence?: string | undefined;
|
|
311
|
+
}>, "many">>;
|
|
312
|
+
/** The flow as recorded, when it fits in RUN_RECORDING_MAX_BYTES. */
|
|
313
|
+
recording: z.ZodOptional<z.ZodObject<{
|
|
314
|
+
startPath: z.ZodOptional<z.ZodString>;
|
|
315
|
+
steps: z.ZodArray<z.ZodUnknown, "many">;
|
|
316
|
+
}, "strip", z.ZodTypeAny, {
|
|
317
|
+
steps: unknown[];
|
|
318
|
+
startPath?: string | undefined;
|
|
319
|
+
}, {
|
|
320
|
+
steps: unknown[];
|
|
321
|
+
startPath?: string | undefined;
|
|
322
|
+
}>>;
|
|
323
|
+
/** True when the recording was too large to carry. */
|
|
324
|
+
recordingOmitted: z.ZodOptional<z.ZodBoolean>;
|
|
227
325
|
}, "strip", z.ZodTypeAny, {
|
|
228
326
|
status: "pass" | "fail" | "healed" | "skipped";
|
|
229
|
-
name: string;
|
|
230
327
|
steps: number;
|
|
328
|
+
name: string;
|
|
231
329
|
durationMs: number;
|
|
330
|
+
recording?: {
|
|
331
|
+
steps: unknown[];
|
|
332
|
+
startPath?: string | undefined;
|
|
333
|
+
} | undefined;
|
|
232
334
|
healed?: {
|
|
233
335
|
from: string;
|
|
234
336
|
to: string;
|
|
@@ -237,11 +339,26 @@ export declare const RunFlowResultSchema: z.ZodObject<{
|
|
|
237
339
|
oracle?: string | undefined;
|
|
238
340
|
evidenceRef?: string | undefined;
|
|
239
341
|
failureReason?: string | undefined;
|
|
342
|
+
stepResults?: {
|
|
343
|
+
ok: boolean;
|
|
344
|
+
step: number;
|
|
345
|
+
anchor: string;
|
|
346
|
+
drift?: string | undefined;
|
|
347
|
+
error?: string | undefined;
|
|
348
|
+
page?: string | undefined;
|
|
349
|
+
endPage?: string | undefined;
|
|
350
|
+
consequence?: string | undefined;
|
|
351
|
+
}[] | undefined;
|
|
352
|
+
recordingOmitted?: boolean | undefined;
|
|
240
353
|
}, {
|
|
241
354
|
status: "pass" | "fail" | "healed" | "skipped";
|
|
242
|
-
name: string;
|
|
243
355
|
steps: number;
|
|
356
|
+
name: string;
|
|
244
357
|
durationMs: number;
|
|
358
|
+
recording?: {
|
|
359
|
+
steps: unknown[];
|
|
360
|
+
startPath?: string | undefined;
|
|
361
|
+
} | undefined;
|
|
245
362
|
healed?: {
|
|
246
363
|
from: string;
|
|
247
364
|
to: string;
|
|
@@ -250,6 +367,17 @@ export declare const RunFlowResultSchema: z.ZodObject<{
|
|
|
250
367
|
oracle?: string | undefined;
|
|
251
368
|
evidenceRef?: string | undefined;
|
|
252
369
|
failureReason?: string | undefined;
|
|
370
|
+
stepResults?: {
|
|
371
|
+
ok: boolean;
|
|
372
|
+
step: number;
|
|
373
|
+
anchor: string;
|
|
374
|
+
drift?: string | undefined;
|
|
375
|
+
error?: string | undefined;
|
|
376
|
+
page?: string | undefined;
|
|
377
|
+
endPage?: string | undefined;
|
|
378
|
+
consequence?: string | undefined;
|
|
379
|
+
}[] | undefined;
|
|
380
|
+
recordingOmitted?: boolean | undefined;
|
|
253
381
|
}>;
|
|
254
382
|
export type RunFlowResult = z.infer<typeof RunFlowResultSchema>;
|
|
255
383
|
/** A standalone assertion not tied to a flow. `evidence` is opaque (narrowed per kind by the caller). */
|
|
@@ -271,10 +399,11 @@ export declare const RunCheckSchema: z.ZodObject<{
|
|
|
271
399
|
readonly CONSOLE: "console";
|
|
272
400
|
readonly ANIMATION: "animation";
|
|
273
401
|
readonly SETTLED: "settled";
|
|
402
|
+
readonly COMPARE: "compare";
|
|
274
403
|
readonly ALL_OF: "allOf";
|
|
275
404
|
readonly ANY_OF: "anyOf";
|
|
276
405
|
readonly NOT: "not";
|
|
277
|
-
}>>, "signal" | "
|
|
406
|
+
}>>, "signal" | "net" | "state" | "element" | "text" | "route" | "console" | "animation" | "settled" | "compare" | "allOf" | "anyOf" | "not" | undefined, unknown>;
|
|
278
407
|
predicate: z.ZodString;
|
|
279
408
|
status: z.ZodEffects<z.ZodNativeEnum<{
|
|
280
409
|
readonly YES: "yes";
|
|
@@ -328,7 +457,7 @@ export declare const RunCheckSchema: z.ZodObject<{
|
|
|
328
457
|
}, "strip", z.ZodTypeAny, {
|
|
329
458
|
status: "yes" | "no" | "unknown" | "no-fault";
|
|
330
459
|
predicate: string;
|
|
331
|
-
kind?: "signal" | "
|
|
460
|
+
kind?: "signal" | "net" | "state" | "element" | "text" | "route" | "console" | "animation" | "settled" | "compare" | "allOf" | "anyOf" | "not" | undefined;
|
|
332
461
|
evidence?: unknown;
|
|
333
462
|
declaredBeforeActing?: boolean | undefined;
|
|
334
463
|
grade?: string | undefined;
|
|
@@ -338,8 +467,8 @@ export declare const RunCheckSchema: z.ZodObject<{
|
|
|
338
467
|
supersedes?: string | undefined;
|
|
339
468
|
}, {
|
|
340
469
|
predicate: string;
|
|
341
|
-
status?: unknown;
|
|
342
470
|
kind?: unknown;
|
|
471
|
+
status?: unknown;
|
|
343
472
|
evidence?: unknown;
|
|
344
473
|
declaredBeforeActing?: boolean | undefined;
|
|
345
474
|
grade?: string | undefined;
|
|
@@ -459,12 +588,12 @@ export declare const VerificationEvidenceSchema: z.ZodObject<{
|
|
|
459
588
|
kind: z.ZodString;
|
|
460
589
|
summary: z.ZodString;
|
|
461
590
|
}, "strip", z.ZodTypeAny, {
|
|
462
|
-
at: number;
|
|
463
591
|
kind: string;
|
|
592
|
+
at: number;
|
|
464
593
|
summary: string;
|
|
465
594
|
}, {
|
|
466
|
-
at: number;
|
|
467
595
|
kind: string;
|
|
596
|
+
at: number;
|
|
468
597
|
summary: string;
|
|
469
598
|
}>, "many">>;
|
|
470
599
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -487,8 +616,8 @@ export declare const VerificationEvidenceSchema: z.ZodObject<{
|
|
|
487
616
|
actual?: unknown;
|
|
488
617
|
}[];
|
|
489
618
|
timeline: {
|
|
490
|
-
at: number;
|
|
491
619
|
kind: string;
|
|
620
|
+
at: number;
|
|
492
621
|
summary: string;
|
|
493
622
|
}[];
|
|
494
623
|
}, {
|
|
@@ -511,8 +640,8 @@ export declare const VerificationEvidenceSchema: z.ZodObject<{
|
|
|
511
640
|
actual?: unknown;
|
|
512
641
|
}[] | undefined;
|
|
513
642
|
timeline?: {
|
|
514
|
-
at: number;
|
|
515
643
|
kind: string;
|
|
644
|
+
at: number;
|
|
516
645
|
summary: string;
|
|
517
646
|
}[] | undefined;
|
|
518
647
|
}>;
|
|
@@ -681,12 +810,12 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
681
810
|
}>;
|
|
682
811
|
model: z.ZodOptional<z.ZodString>;
|
|
683
812
|
}, "strip", z.ZodTypeAny, {
|
|
684
|
-
id: string;
|
|
685
813
|
kind: "coding-agent" | "oem-pipeline" | "human";
|
|
814
|
+
id: string;
|
|
686
815
|
model?: string | undefined;
|
|
687
816
|
}, {
|
|
688
|
-
id: string;
|
|
689
817
|
kind: "coding-agent" | "oem-pipeline" | "human";
|
|
818
|
+
id: string;
|
|
690
819
|
model?: string | undefined;
|
|
691
820
|
}>;
|
|
692
821
|
trigger: z.ZodObject<{
|
|
@@ -807,11 +936,58 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
807
936
|
}>>;
|
|
808
937
|
evidenceRef: z.ZodOptional<z.ZodString>;
|
|
809
938
|
failureReason: z.ZodOptional<z.ZodString>;
|
|
939
|
+
/** Each step's result and page — see RUN_STEP_RESULTS_MAX. */
|
|
940
|
+
stepResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
941
|
+
step: z.ZodNumber;
|
|
942
|
+
anchor: z.ZodString;
|
|
943
|
+
ok: z.ZodBoolean;
|
|
944
|
+
page: z.ZodOptional<z.ZodString>;
|
|
945
|
+
endPage: z.ZodOptional<z.ZodString>;
|
|
946
|
+
consequence: z.ZodOptional<z.ZodString>;
|
|
947
|
+
error: z.ZodOptional<z.ZodString>;
|
|
948
|
+
/** The drift's reason kind, when the step drifted. */
|
|
949
|
+
drift: z.ZodOptional<z.ZodString>;
|
|
950
|
+
}, "strip", z.ZodTypeAny, {
|
|
951
|
+
ok: boolean;
|
|
952
|
+
step: number;
|
|
953
|
+
anchor: string;
|
|
954
|
+
drift?: string | undefined;
|
|
955
|
+
error?: string | undefined;
|
|
956
|
+
page?: string | undefined;
|
|
957
|
+
endPage?: string | undefined;
|
|
958
|
+
consequence?: string | undefined;
|
|
959
|
+
}, {
|
|
960
|
+
ok: boolean;
|
|
961
|
+
step: number;
|
|
962
|
+
anchor: string;
|
|
963
|
+
drift?: string | undefined;
|
|
964
|
+
error?: string | undefined;
|
|
965
|
+
page?: string | undefined;
|
|
966
|
+
endPage?: string | undefined;
|
|
967
|
+
consequence?: string | undefined;
|
|
968
|
+
}>, "many">>;
|
|
969
|
+
/** The flow as recorded, when it fits in RUN_RECORDING_MAX_BYTES. */
|
|
970
|
+
recording: z.ZodOptional<z.ZodObject<{
|
|
971
|
+
startPath: z.ZodOptional<z.ZodString>;
|
|
972
|
+
steps: z.ZodArray<z.ZodUnknown, "many">;
|
|
973
|
+
}, "strip", z.ZodTypeAny, {
|
|
974
|
+
steps: unknown[];
|
|
975
|
+
startPath?: string | undefined;
|
|
976
|
+
}, {
|
|
977
|
+
steps: unknown[];
|
|
978
|
+
startPath?: string | undefined;
|
|
979
|
+
}>>;
|
|
980
|
+
/** True when the recording was too large to carry. */
|
|
981
|
+
recordingOmitted: z.ZodOptional<z.ZodBoolean>;
|
|
810
982
|
}, "strip", z.ZodTypeAny, {
|
|
811
983
|
status: "pass" | "fail" | "healed" | "skipped";
|
|
812
|
-
name: string;
|
|
813
984
|
steps: number;
|
|
985
|
+
name: string;
|
|
814
986
|
durationMs: number;
|
|
987
|
+
recording?: {
|
|
988
|
+
steps: unknown[];
|
|
989
|
+
startPath?: string | undefined;
|
|
990
|
+
} | undefined;
|
|
815
991
|
healed?: {
|
|
816
992
|
from: string;
|
|
817
993
|
to: string;
|
|
@@ -820,11 +996,26 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
820
996
|
oracle?: string | undefined;
|
|
821
997
|
evidenceRef?: string | undefined;
|
|
822
998
|
failureReason?: string | undefined;
|
|
999
|
+
stepResults?: {
|
|
1000
|
+
ok: boolean;
|
|
1001
|
+
step: number;
|
|
1002
|
+
anchor: string;
|
|
1003
|
+
drift?: string | undefined;
|
|
1004
|
+
error?: string | undefined;
|
|
1005
|
+
page?: string | undefined;
|
|
1006
|
+
endPage?: string | undefined;
|
|
1007
|
+
consequence?: string | undefined;
|
|
1008
|
+
}[] | undefined;
|
|
1009
|
+
recordingOmitted?: boolean | undefined;
|
|
823
1010
|
}, {
|
|
824
1011
|
status: "pass" | "fail" | "healed" | "skipped";
|
|
825
|
-
name: string;
|
|
826
1012
|
steps: number;
|
|
1013
|
+
name: string;
|
|
827
1014
|
durationMs: number;
|
|
1015
|
+
recording?: {
|
|
1016
|
+
steps: unknown[];
|
|
1017
|
+
startPath?: string | undefined;
|
|
1018
|
+
} | undefined;
|
|
828
1019
|
healed?: {
|
|
829
1020
|
from: string;
|
|
830
1021
|
to: string;
|
|
@@ -833,6 +1024,17 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
833
1024
|
oracle?: string | undefined;
|
|
834
1025
|
evidenceRef?: string | undefined;
|
|
835
1026
|
failureReason?: string | undefined;
|
|
1027
|
+
stepResults?: {
|
|
1028
|
+
ok: boolean;
|
|
1029
|
+
step: number;
|
|
1030
|
+
anchor: string;
|
|
1031
|
+
drift?: string | undefined;
|
|
1032
|
+
error?: string | undefined;
|
|
1033
|
+
page?: string | undefined;
|
|
1034
|
+
endPage?: string | undefined;
|
|
1035
|
+
consequence?: string | undefined;
|
|
1036
|
+
}[] | undefined;
|
|
1037
|
+
recordingOmitted?: boolean | undefined;
|
|
836
1038
|
}>, "many">>;
|
|
837
1039
|
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
838
1040
|
/**
|
|
@@ -852,10 +1054,11 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
852
1054
|
readonly CONSOLE: "console";
|
|
853
1055
|
readonly ANIMATION: "animation";
|
|
854
1056
|
readonly SETTLED: "settled";
|
|
1057
|
+
readonly COMPARE: "compare";
|
|
855
1058
|
readonly ALL_OF: "allOf";
|
|
856
1059
|
readonly ANY_OF: "anyOf";
|
|
857
1060
|
readonly NOT: "not";
|
|
858
|
-
}>>, "signal" | "
|
|
1061
|
+
}>>, "signal" | "net" | "state" | "element" | "text" | "route" | "console" | "animation" | "settled" | "compare" | "allOf" | "anyOf" | "not" | undefined, unknown>;
|
|
859
1062
|
predicate: z.ZodString;
|
|
860
1063
|
status: z.ZodEffects<z.ZodNativeEnum<{
|
|
861
1064
|
readonly YES: "yes";
|
|
@@ -909,7 +1112,7 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
909
1112
|
}, "strip", z.ZodTypeAny, {
|
|
910
1113
|
status: "yes" | "no" | "unknown" | "no-fault";
|
|
911
1114
|
predicate: string;
|
|
912
|
-
kind?: "signal" | "
|
|
1115
|
+
kind?: "signal" | "net" | "state" | "element" | "text" | "route" | "console" | "animation" | "settled" | "compare" | "allOf" | "anyOf" | "not" | undefined;
|
|
913
1116
|
evidence?: unknown;
|
|
914
1117
|
declaredBeforeActing?: boolean | undefined;
|
|
915
1118
|
grade?: string | undefined;
|
|
@@ -919,8 +1122,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
919
1122
|
supersedes?: string | undefined;
|
|
920
1123
|
}, {
|
|
921
1124
|
predicate: string;
|
|
922
|
-
status?: unknown;
|
|
923
1125
|
kind?: unknown;
|
|
1126
|
+
status?: unknown;
|
|
924
1127
|
evidence?: unknown;
|
|
925
1128
|
declaredBeforeActing?: boolean | undefined;
|
|
926
1129
|
grade?: string | undefined;
|
|
@@ -1036,12 +1239,12 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1036
1239
|
kind: z.ZodString;
|
|
1037
1240
|
summary: z.ZodString;
|
|
1038
1241
|
}, "strip", z.ZodTypeAny, {
|
|
1039
|
-
at: number;
|
|
1040
1242
|
kind: string;
|
|
1243
|
+
at: number;
|
|
1041
1244
|
summary: string;
|
|
1042
1245
|
}, {
|
|
1043
|
-
at: number;
|
|
1044
1246
|
kind: string;
|
|
1247
|
+
at: number;
|
|
1045
1248
|
summary: string;
|
|
1046
1249
|
}>, "many">>;
|
|
1047
1250
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1064,8 +1267,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1064
1267
|
actual?: unknown;
|
|
1065
1268
|
}[];
|
|
1066
1269
|
timeline: {
|
|
1067
|
-
at: number;
|
|
1068
1270
|
kind: string;
|
|
1271
|
+
at: number;
|
|
1069
1272
|
summary: string;
|
|
1070
1273
|
}[];
|
|
1071
1274
|
}, {
|
|
@@ -1088,8 +1291,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1088
1291
|
actual?: unknown;
|
|
1089
1292
|
}[] | undefined;
|
|
1090
1293
|
timeline?: {
|
|
1091
|
-
at: number;
|
|
1092
1294
|
kind: string;
|
|
1295
|
+
at: number;
|
|
1093
1296
|
summary: string;
|
|
1094
1297
|
}[] | undefined;
|
|
1095
1298
|
}>;
|
|
@@ -1233,9 +1436,13 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1233
1436
|
}, "strip", z.ZodTypeAny, {
|
|
1234
1437
|
flows: {
|
|
1235
1438
|
status: "pass" | "fail" | "healed" | "skipped";
|
|
1236
|
-
name: string;
|
|
1237
1439
|
steps: number;
|
|
1440
|
+
name: string;
|
|
1238
1441
|
durationMs: number;
|
|
1442
|
+
recording?: {
|
|
1443
|
+
steps: unknown[];
|
|
1444
|
+
startPath?: string | undefined;
|
|
1445
|
+
} | undefined;
|
|
1239
1446
|
healed?: {
|
|
1240
1447
|
from: string;
|
|
1241
1448
|
to: string;
|
|
@@ -1244,6 +1451,17 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1244
1451
|
oracle?: string | undefined;
|
|
1245
1452
|
evidenceRef?: string | undefined;
|
|
1246
1453
|
failureReason?: string | undefined;
|
|
1454
|
+
stepResults?: {
|
|
1455
|
+
ok: boolean;
|
|
1456
|
+
step: number;
|
|
1457
|
+
anchor: string;
|
|
1458
|
+
drift?: string | undefined;
|
|
1459
|
+
error?: string | undefined;
|
|
1460
|
+
page?: string | undefined;
|
|
1461
|
+
endPage?: string | undefined;
|
|
1462
|
+
consequence?: string | undefined;
|
|
1463
|
+
}[] | undefined;
|
|
1464
|
+
recordingOmitted?: boolean | undefined;
|
|
1247
1465
|
}[];
|
|
1248
1466
|
durationMs: number;
|
|
1249
1467
|
evidence: {
|
|
@@ -1266,8 +1484,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1266
1484
|
actual?: unknown;
|
|
1267
1485
|
}[];
|
|
1268
1486
|
timeline: {
|
|
1269
|
-
at: number;
|
|
1270
1487
|
kind: string;
|
|
1488
|
+
at: number;
|
|
1271
1489
|
summary: string;
|
|
1272
1490
|
}[];
|
|
1273
1491
|
};
|
|
@@ -1283,8 +1501,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1283
1501
|
previewUrl?: string | undefined;
|
|
1284
1502
|
};
|
|
1285
1503
|
agent: {
|
|
1286
|
-
id: string;
|
|
1287
1504
|
kind: "coding-agent" | "oem-pipeline" | "human";
|
|
1505
|
+
id: string;
|
|
1288
1506
|
model?: string | undefined;
|
|
1289
1507
|
};
|
|
1290
1508
|
trigger: {
|
|
@@ -1300,7 +1518,7 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1300
1518
|
checks: {
|
|
1301
1519
|
status: "yes" | "no" | "unknown" | "no-fault";
|
|
1302
1520
|
predicate: string;
|
|
1303
|
-
kind?: "signal" | "
|
|
1521
|
+
kind?: "signal" | "net" | "state" | "element" | "text" | "route" | "console" | "animation" | "settled" | "compare" | "allOf" | "anyOf" | "not" | undefined;
|
|
1304
1522
|
evidence?: unknown;
|
|
1305
1523
|
declaredBeforeActing?: boolean | undefined;
|
|
1306
1524
|
grade?: string | undefined;
|
|
@@ -1377,8 +1595,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1377
1595
|
actual?: unknown;
|
|
1378
1596
|
}[] | undefined;
|
|
1379
1597
|
timeline?: {
|
|
1380
|
-
at: number;
|
|
1381
1598
|
kind: string;
|
|
1599
|
+
at: number;
|
|
1382
1600
|
summary: string;
|
|
1383
1601
|
}[] | undefined;
|
|
1384
1602
|
};
|
|
@@ -1394,8 +1612,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1394
1612
|
previewUrl?: string | undefined;
|
|
1395
1613
|
};
|
|
1396
1614
|
agent: {
|
|
1397
|
-
id: string;
|
|
1398
1615
|
kind: "coding-agent" | "oem-pipeline" | "human";
|
|
1616
|
+
id: string;
|
|
1399
1617
|
model?: string | undefined;
|
|
1400
1618
|
};
|
|
1401
1619
|
trigger: {
|
|
@@ -1413,9 +1631,13 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1413
1631
|
};
|
|
1414
1632
|
flows?: {
|
|
1415
1633
|
status: "pass" | "fail" | "healed" | "skipped";
|
|
1416
|
-
name: string;
|
|
1417
1634
|
steps: number;
|
|
1635
|
+
name: string;
|
|
1418
1636
|
durationMs: number;
|
|
1637
|
+
recording?: {
|
|
1638
|
+
steps: unknown[];
|
|
1639
|
+
startPath?: string | undefined;
|
|
1640
|
+
} | undefined;
|
|
1419
1641
|
healed?: {
|
|
1420
1642
|
from: string;
|
|
1421
1643
|
to: string;
|
|
@@ -1424,6 +1646,17 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1424
1646
|
oracle?: string | undefined;
|
|
1425
1647
|
evidenceRef?: string | undefined;
|
|
1426
1648
|
failureReason?: string | undefined;
|
|
1649
|
+
stepResults?: {
|
|
1650
|
+
ok: boolean;
|
|
1651
|
+
step: number;
|
|
1652
|
+
anchor: string;
|
|
1653
|
+
drift?: string | undefined;
|
|
1654
|
+
error?: string | undefined;
|
|
1655
|
+
page?: string | undefined;
|
|
1656
|
+
endPage?: string | undefined;
|
|
1657
|
+
consequence?: string | undefined;
|
|
1658
|
+
}[] | undefined;
|
|
1659
|
+
recordingOmitted?: boolean | undefined;
|
|
1427
1660
|
}[] | undefined;
|
|
1428
1661
|
editEpoch?: number | undefined;
|
|
1429
1662
|
subject?: {
|
|
@@ -1440,8 +1673,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
|
|
|
1440
1673
|
}[] | undefined;
|
|
1441
1674
|
checks?: {
|
|
1442
1675
|
predicate: string;
|
|
1443
|
-
status?: unknown;
|
|
1444
1676
|
kind?: unknown;
|
|
1677
|
+
status?: unknown;
|
|
1445
1678
|
evidence?: unknown;
|
|
1446
1679
|
declaredBeforeActing?: boolean | undefined;
|
|
1447
1680
|
grade?: string | undefined;
|
|
@@ -187,6 +187,36 @@ export const RunChangedFileSchema = z.object({
|
|
|
187
187
|
changeKind: z.nativeEnum(RunChangeKind),
|
|
188
188
|
risk: z.array(z.nativeEnum(RiskSurface)).default([]),
|
|
189
189
|
});
|
|
190
|
+
/**
|
|
191
|
+
* How much of a replay a synced run carries, so a teammate can replay it from the cloud without the
|
|
192
|
+
* artifact growing with the flow: past these, the per-step list stops and the recording is omitted
|
|
193
|
+
* (said so by `recordingOmitted`), never cut mid-flow into a journey nobody drove.
|
|
194
|
+
*/
|
|
195
|
+
export const RUN_STEP_RESULTS_MAX = 200;
|
|
196
|
+
export const RUN_TEXT_MAX = 300;
|
|
197
|
+
export const RUN_RECORDING_MAX_BYTES = 64 * 1024;
|
|
198
|
+
/** One step of a replayed flow, as synced: its outcome and the pages it ran on and led to. */
|
|
199
|
+
export const RunStepResultSchema = z.object({
|
|
200
|
+
step: z.number(),
|
|
201
|
+
anchor: z.string(),
|
|
202
|
+
ok: z.boolean(),
|
|
203
|
+
page: z.string().optional(),
|
|
204
|
+
endPage: z.string().optional(),
|
|
205
|
+
consequence: z.string().optional(),
|
|
206
|
+
error: z.string().optional(),
|
|
207
|
+
/** The drift's reason kind, when the step drifted. */
|
|
208
|
+
drift: z.string().optional(),
|
|
209
|
+
});
|
|
210
|
+
/**
|
|
211
|
+
* The flow a run replayed, as recorded: enough to replay it again somewhere else.
|
|
212
|
+
*
|
|
213
|
+
* `steps` are FlowSteps, left opaque here: this module loads before the flow schema, and importing
|
|
214
|
+
* it made a cycle that crashed the built CLI at startup while every source-level test passed.
|
|
215
|
+
*/
|
|
216
|
+
export const RunFlowRecordingSchema = z.object({
|
|
217
|
+
startPath: z.string().optional(),
|
|
218
|
+
steps: z.array(z.unknown()),
|
|
219
|
+
});
|
|
190
220
|
/** A flow that was replayed as part of the run. */
|
|
191
221
|
export const RunFlowResultSchema = z.object({
|
|
192
222
|
name: z.string(),
|
|
@@ -199,6 +229,12 @@ export const RunFlowResultSchema = z.object({
|
|
|
199
229
|
.optional(),
|
|
200
230
|
evidenceRef: z.string().optional(),
|
|
201
231
|
failureReason: z.string().optional(),
|
|
232
|
+
/** Each step's result and page — see RUN_STEP_RESULTS_MAX. */
|
|
233
|
+
stepResults: z.array(RunStepResultSchema).optional(),
|
|
234
|
+
/** The flow as recorded, when it fits in RUN_RECORDING_MAX_BYTES. */
|
|
235
|
+
recording: RunFlowRecordingSchema.optional(),
|
|
236
|
+
/** True when the recording was too large to carry. */
|
|
237
|
+
recordingOmitted: z.boolean().optional(),
|
|
202
238
|
});
|
|
203
239
|
/** A standalone assertion not tied to a flow. `evidence` is opaque (narrowed per kind by the caller). */
|
|
204
240
|
export const RunCheckSchema = z.object({
|
package/dist/wire/channel.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CHANNEL_DEFAULTS, ChannelId, Independence } from 'open-verification';
|
|
2
2
|
import { PredicateKind } from '../verdict/consequence.js';
|
|
3
|
+
import type { Predicate } from '../verdict/predicate.js';
|
|
3
4
|
/**
|
|
4
5
|
* The sources of truth a verdict can be built from.
|
|
5
6
|
*
|
|
@@ -21,6 +22,15 @@ import { PredicateKind } from '../verdict/consequence.js';
|
|
|
21
22
|
export { ChannelId };
|
|
22
23
|
/** The channels a claim of this kind needs to look at. */
|
|
23
24
|
export declare function channelsRead(kind: PredicateKind): readonly ChannelId[];
|
|
25
|
+
/**
|
|
26
|
+
* The channels this claim needs, reading a composite's members rather than its kind (#1116).
|
|
27
|
+
*
|
|
28
|
+
* The union of the members is exactly as strict as the table: a wrapped `state` clause still needs
|
|
29
|
+
* `state`. What the table cannot do is tell `allOf[net, text]` from one that holds a state clause, so
|
|
30
|
+
* it refused every composite on a page without a store. A composite with no members keeps the
|
|
31
|
+
* table's answer, the whole set, so it can never read as needing nothing.
|
|
32
|
+
*/
|
|
33
|
+
export declare function channelsReadBy(predicate: Predicate): readonly ChannelId[];
|
|
24
34
|
/**
|
|
25
35
|
* The independence rule, and where it lives.
|
|
26
36
|
*
|
package/dist/wire/channel.js
CHANGED
|
@@ -39,6 +39,9 @@ const CHANNELS_OF = {
|
|
|
39
39
|
[PredicateKind.ANIMATION]: [ChannelId.UI, ChannelId.TIME],
|
|
40
40
|
// "Has everything gone quiet" is a question about time, and about the traffic being waited on.
|
|
41
41
|
[PredicateKind.SETTLED]: [ChannelId.TIME, ChannelId.NET],
|
|
42
|
+
// Every channel a value can be read off. The table cannot see which two a given comparison names;
|
|
43
|
+
// `channelsReadBy` can, and answers with exactly those.
|
|
44
|
+
[PredicateKind.COMPARE]: [ChannelId.UI, ChannelId.NET, ChannelId.STATE, ChannelId.SIGNAL],
|
|
42
45
|
// A claim made of other claims can contain any of them. Reporting only its own channels would
|
|
43
46
|
// make `allOf` a way to wrap a claim and escape the rule entirely.
|
|
44
47
|
[PredicateKind.ALL_OF]: ANY_CHANNEL_A_CLAIM_CAN_READ(),
|
|
@@ -68,6 +71,28 @@ function ANY_CHANNEL_A_CLAIM_CAN_READ() {
|
|
|
68
71
|
export function channelsRead(kind) {
|
|
69
72
|
return CHANNELS_OF[kind];
|
|
70
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* The channels this claim needs, reading a composite's members rather than its kind (#1116).
|
|
76
|
+
*
|
|
77
|
+
* The union of the members is exactly as strict as the table: a wrapped `state` clause still needs
|
|
78
|
+
* `state`. What the table cannot do is tell `allOf[net, text]` from one that holds a state clause, so
|
|
79
|
+
* it refused every composite on a page without a store. A composite with no members keeps the
|
|
80
|
+
* table's answer, the whole set, so it can never read as needing nothing.
|
|
81
|
+
*/
|
|
82
|
+
export function channelsReadBy(predicate) {
|
|
83
|
+
if (PredicateKind.NOT === predicate.kind)
|
|
84
|
+
return channelsReadBy(predicate.predicate);
|
|
85
|
+
// A source's `from` IS the kind whose channel it reads, so the table already knows the answer.
|
|
86
|
+
if (PredicateKind.COMPARE === predicate.kind) {
|
|
87
|
+
return [...new Set([predicate.left, predicate.right].flatMap((s) => CHANNELS_OF[s.from]))];
|
|
88
|
+
}
|
|
89
|
+
if (PredicateKind.ALL_OF !== predicate.kind && PredicateKind.ANY_OF !== predicate.kind) {
|
|
90
|
+
return CHANNELS_OF[predicate.kind];
|
|
91
|
+
}
|
|
92
|
+
if (0 === predicate.predicates.length)
|
|
93
|
+
return CHANNELS_OF[predicate.kind];
|
|
94
|
+
return [...new Set(predicate.predicates.flatMap(channelsReadBy))];
|
|
95
|
+
}
|
|
71
96
|
/**
|
|
72
97
|
* The independence rule, and where it lives.
|
|
73
98
|
*
|