opencode-plugin-flow 5.0.0 → 5.1.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.
@@ -1,6 +1,12 @@
1
1
  import { z } from "zod";
2
+ import { type Session } from "../domain/session.js";
2
3
  export { hasCandidateExecutionEvidence, hasVerifierExecutionEvidence, isCandidateShapedDecision, } from "../domain/orchestration-policy.js";
3
4
  export declare const FeatureIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<import("../domain/session.js").FeatureId, string>>;
5
+ export declare const DigestSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
6
+ export declare const SnapshotIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
7
+ export declare const EvidenceIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
8
+ export declare const OperationIdSchema: z.ZodString;
9
+ export declare const CausalRevisionSchema: z.ZodNumber;
4
10
  export declare const FeatureStatusSchema: z.ZodEnum<{
5
11
  blocked: "blocked";
6
12
  completed: "completed";
@@ -18,6 +24,24 @@ export declare const ReviewStatusSchema: z.ZodEnum<{
18
24
  failed: "failed";
19
25
  passed: "passed";
20
26
  }>;
27
+ export declare const ReviewFindingTaxonomySchema: z.ZodEnum<{
28
+ advisory: "advisory";
29
+ evidence_gap: "evidence_gap";
30
+ implementation_defect: "implementation_defect";
31
+ regression_coverage_gap: "regression_coverage_gap";
32
+ }>;
33
+ export declare const ReviewKindSchema: z.ZodEnum<{
34
+ feature: "feature";
35
+ final: "final";
36
+ }>;
37
+ export declare const ReviewVerdictSchema: z.ZodEnum<{
38
+ failed: "failed";
39
+ passed: "passed";
40
+ }>;
41
+ export declare const ReviewTerminalDispositionSchema: z.ZodEnum<{
42
+ observed_unsubmitted: "observed_unsubmitted";
43
+ submitted: "submitted";
44
+ }>;
21
45
  export declare const ValidationStatusSchema: z.ZodEnum<{
22
46
  failed: "failed";
23
47
  passed: "passed";
@@ -272,6 +296,113 @@ export declare const ReviewFindingSchema: z.ZodObject<{
272
296
  blocking: "blocking";
273
297
  }>>;
274
298
  }, z.core.$strict>;
299
+ export declare const ReviewSnapshotIdSchema: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>>;
300
+ export declare const ReviewExecutionFindingInputSchema: z.ZodObject<{
301
+ taxonomy: z.ZodEnum<{
302
+ advisory: "advisory";
303
+ evidence_gap: "evidence_gap";
304
+ implementation_defect: "implementation_defect";
305
+ regression_coverage_gap: "regression_coverage_gap";
306
+ }>;
307
+ subject: z.ZodString;
308
+ requirementOrRisk: z.ZodString;
309
+ evidenceLocator: z.ZodString;
310
+ summary: z.ZodString;
311
+ severity: z.ZodEnum<{
312
+ advisory: "advisory";
313
+ blocking: "blocking";
314
+ }>;
315
+ }, z.core.$strict>;
316
+ export declare const ReviewExecutionFindingSchema: z.ZodObject<{
317
+ taxonomy: z.ZodEnum<{
318
+ advisory: "advisory";
319
+ evidence_gap: "evidence_gap";
320
+ implementation_defect: "implementation_defect";
321
+ regression_coverage_gap: "regression_coverage_gap";
322
+ }>;
323
+ subject: z.ZodString;
324
+ requirementOrRisk: z.ZodString;
325
+ evidenceLocator: z.ZodString;
326
+ summary: z.ZodString;
327
+ severity: z.ZodEnum<{
328
+ advisory: "advisory";
329
+ blocking: "blocking";
330
+ }>;
331
+ fingerprint: z.ZodString;
332
+ }, z.core.$strict>;
333
+ export declare const ReviewExecutionInputSchema: z.ZodObject<{
334
+ attemptId: z.ZodString;
335
+ logicalPassId: z.ZodString;
336
+ featureId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../domain/session.js").FeatureId, string>>;
337
+ reviewKind: z.ZodEnum<{
338
+ feature: "feature";
339
+ final: "final";
340
+ }>;
341
+ reviewSnapshotId: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>>;
342
+ verdict: z.ZodEnum<{
343
+ failed: "failed";
344
+ passed: "passed";
345
+ }>;
346
+ startedAt: z.ZodString;
347
+ completedAt: z.ZodString;
348
+ terminalDisposition: z.ZodEnum<{
349
+ observed_unsubmitted: "observed_unsubmitted";
350
+ submitted: "submitted";
351
+ }>;
352
+ findings: z.ZodArray<z.ZodObject<{
353
+ taxonomy: z.ZodEnum<{
354
+ advisory: "advisory";
355
+ evidence_gap: "evidence_gap";
356
+ implementation_defect: "implementation_defect";
357
+ regression_coverage_gap: "regression_coverage_gap";
358
+ }>;
359
+ subject: z.ZodString;
360
+ requirementOrRisk: z.ZodString;
361
+ evidenceLocator: z.ZodString;
362
+ summary: z.ZodString;
363
+ severity: z.ZodEnum<{
364
+ advisory: "advisory";
365
+ blocking: "blocking";
366
+ }>;
367
+ }, z.core.$strict>>;
368
+ }, z.core.$strict>;
369
+ export declare const ReviewExecutionSchema: z.ZodObject<{
370
+ attemptId: z.ZodString;
371
+ logicalPassId: z.ZodString;
372
+ featureId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../domain/session.js").FeatureId, string>>;
373
+ reviewKind: z.ZodEnum<{
374
+ feature: "feature";
375
+ final: "final";
376
+ }>;
377
+ reviewSnapshotId: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>>;
378
+ verdict: z.ZodEnum<{
379
+ failed: "failed";
380
+ passed: "passed";
381
+ }>;
382
+ startedAt: z.ZodString;
383
+ completedAt: z.ZodString;
384
+ terminalDisposition: z.ZodEnum<{
385
+ observed_unsubmitted: "observed_unsubmitted";
386
+ submitted: "submitted";
387
+ }>;
388
+ findings: z.ZodArray<z.ZodObject<{
389
+ taxonomy: z.ZodEnum<{
390
+ advisory: "advisory";
391
+ evidence_gap: "evidence_gap";
392
+ implementation_defect: "implementation_defect";
393
+ regression_coverage_gap: "regression_coverage_gap";
394
+ }>;
395
+ subject: z.ZodString;
396
+ requirementOrRisk: z.ZodString;
397
+ evidenceLocator: z.ZodString;
398
+ summary: z.ZodString;
399
+ severity: z.ZodEnum<{
400
+ advisory: "advisory";
401
+ blocking: "blocking";
402
+ }>;
403
+ fingerprint: z.ZodString;
404
+ }, z.core.$strict>>;
405
+ }, z.core.$strict>;
275
406
  export declare const ReviewSchema: z.ZodObject<{
276
407
  status: z.ZodEnum<{
277
408
  failed: "failed";
@@ -312,6 +443,204 @@ export declare const ValidationRunSchema: z.ZodObject<{
312
443
  }>;
313
444
  summary: z.ZodString;
314
445
  }, z.core.$strict>;
446
+ export declare const ValidationEvidenceSchema: z.ZodObject<{
447
+ evidenceId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
448
+ snapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
449
+ sourceDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
450
+ startedAt: z.ZodString;
451
+ completedAt: z.ZodString;
452
+ commandClass: z.ZodEnum<{
453
+ build: "build";
454
+ format: "format";
455
+ lint: "lint";
456
+ other: "other";
457
+ smoke: "smoke";
458
+ test: "test";
459
+ typecheck: "typecheck";
460
+ }>;
461
+ exitCode: z.ZodNumber;
462
+ outputDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
463
+ artifactRef: z.ZodOptional<z.ZodObject<{
464
+ kind: z.ZodLiteral<"restricted_evidence_v1">;
465
+ digest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
466
+ byteLength: z.ZodNumber;
467
+ }, z.core.$strict>>;
468
+ environmentKeys: z.ZodArray<z.ZodString>;
469
+ kind: z.ZodLiteral<"validation">;
470
+ }, z.core.$strict>;
471
+ export declare const ReviewEvidenceSchema: z.ZodObject<{
472
+ evidenceId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
473
+ snapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
474
+ sourceDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
475
+ startedAt: z.ZodString;
476
+ completedAt: z.ZodString;
477
+ kind: z.ZodLiteral<"review">;
478
+ attemptId: z.ZodString;
479
+ packetDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
480
+ }, z.core.$strict>;
481
+ export declare const EvidenceRecordSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
482
+ evidenceId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
483
+ snapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
484
+ sourceDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
485
+ startedAt: z.ZodString;
486
+ completedAt: z.ZodString;
487
+ commandClass: z.ZodEnum<{
488
+ build: "build";
489
+ format: "format";
490
+ lint: "lint";
491
+ other: "other";
492
+ smoke: "smoke";
493
+ test: "test";
494
+ typecheck: "typecheck";
495
+ }>;
496
+ exitCode: z.ZodNumber;
497
+ outputDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
498
+ artifactRef: z.ZodOptional<z.ZodObject<{
499
+ kind: z.ZodLiteral<"restricted_evidence_v1">;
500
+ digest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
501
+ byteLength: z.ZodNumber;
502
+ }, z.core.$strict>>;
503
+ environmentKeys: z.ZodArray<z.ZodString>;
504
+ kind: z.ZodLiteral<"validation">;
505
+ }, z.core.$strict>, z.ZodObject<{
506
+ evidenceId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
507
+ snapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
508
+ sourceDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
509
+ startedAt: z.ZodString;
510
+ completedAt: z.ZodString;
511
+ kind: z.ZodLiteral<"review">;
512
+ attemptId: z.ZodString;
513
+ packetDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
514
+ }, z.core.$strict>], "kind">;
515
+ export declare const ValidationObservationSchema: z.ZodObject<{
516
+ startedAt: z.ZodString;
517
+ completedAt: z.ZodString;
518
+ command: z.ZodString;
519
+ summary: z.ZodString;
520
+ exitCode: z.ZodNumber;
521
+ outputDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
522
+ artifactRef: z.ZodOptional<z.ZodObject<{
523
+ kind: z.ZodLiteral<"restricted_evidence_v1">;
524
+ digest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
525
+ byteLength: z.ZodNumber;
526
+ }, z.core.$strict>>;
527
+ environmentKeys: z.ZodArray<z.ZodString>;
528
+ }, z.core.$strict>;
529
+ export declare const CausalMutationRecordSchema: z.ZodObject<{
530
+ operationId: z.ZodString;
531
+ operationKind: z.ZodEnum<{
532
+ evidence_record: "evidence_record";
533
+ feature_complete: "feature_complete";
534
+ feature_reset: "feature_reset";
535
+ plan_approve: "plan_approve";
536
+ plan_save: "plan_save";
537
+ review_record: "review_record";
538
+ run_start: "run_start";
539
+ session_close: "session_close";
540
+ }>;
541
+ requestDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
542
+ priorMutationDigest: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>>;
543
+ mutationDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
544
+ priorRevision: z.ZodNumber;
545
+ revision: z.ZodNumber;
546
+ priorSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
547
+ currentSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
548
+ changedEntity: z.ZodObject<{
549
+ kind: z.ZodEnum<{
550
+ closure: "closure";
551
+ evidence: "evidence";
552
+ feature: "feature";
553
+ plan: "plan";
554
+ review: "review";
555
+ session: "session";
556
+ }>;
557
+ id: z.ZodString;
558
+ }, z.core.$strict>;
559
+ changedFields: z.ZodArray<z.ZodString>;
560
+ blockerDelta: z.ZodObject<{
561
+ added: z.ZodArray<z.ZodString>;
562
+ removed: z.ZodArray<z.ZodString>;
563
+ }, z.core.$strict>;
564
+ evidenceRefs: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>>;
565
+ recordedAt: z.ZodString;
566
+ }, z.core.$strict>;
567
+ export declare const CausalStateSchema: z.ZodObject<{
568
+ revision: z.ZodNumber;
569
+ genesisSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
570
+ snapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
571
+ mutations: z.ZodArray<z.ZodObject<{
572
+ operationId: z.ZodString;
573
+ operationKind: z.ZodEnum<{
574
+ evidence_record: "evidence_record";
575
+ feature_complete: "feature_complete";
576
+ feature_reset: "feature_reset";
577
+ plan_approve: "plan_approve";
578
+ plan_save: "plan_save";
579
+ review_record: "review_record";
580
+ run_start: "run_start";
581
+ session_close: "session_close";
582
+ }>;
583
+ requestDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
584
+ priorMutationDigest: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>>;
585
+ mutationDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
586
+ priorRevision: z.ZodNumber;
587
+ revision: z.ZodNumber;
588
+ priorSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
589
+ currentSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
590
+ changedEntity: z.ZodObject<{
591
+ kind: z.ZodEnum<{
592
+ closure: "closure";
593
+ evidence: "evidence";
594
+ feature: "feature";
595
+ plan: "plan";
596
+ review: "review";
597
+ session: "session";
598
+ }>;
599
+ id: z.ZodString;
600
+ }, z.core.$strict>;
601
+ changedFields: z.ZodArray<z.ZodString>;
602
+ blockerDelta: z.ZodObject<{
603
+ added: z.ZodArray<z.ZodString>;
604
+ removed: z.ZodArray<z.ZodString>;
605
+ }, z.core.$strict>;
606
+ evidenceRefs: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>>;
607
+ recordedAt: z.ZodString;
608
+ }, z.core.$strict>>;
609
+ evidence: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
610
+ evidenceId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
611
+ snapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
612
+ sourceDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
613
+ startedAt: z.ZodString;
614
+ completedAt: z.ZodString;
615
+ commandClass: z.ZodEnum<{
616
+ build: "build";
617
+ format: "format";
618
+ lint: "lint";
619
+ other: "other";
620
+ smoke: "smoke";
621
+ test: "test";
622
+ typecheck: "typecheck";
623
+ }>;
624
+ exitCode: z.ZodNumber;
625
+ outputDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
626
+ artifactRef: z.ZodOptional<z.ZodObject<{
627
+ kind: z.ZodLiteral<"restricted_evidence_v1">;
628
+ digest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
629
+ byteLength: z.ZodNumber;
630
+ }, z.core.$strict>>;
631
+ environmentKeys: z.ZodArray<z.ZodString>;
632
+ kind: z.ZodLiteral<"validation">;
633
+ }, z.core.$strict>, z.ZodObject<{
634
+ evidenceId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
635
+ snapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
636
+ sourceDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
637
+ startedAt: z.ZodString;
638
+ completedAt: z.ZodString;
639
+ kind: z.ZodLiteral<"review">;
640
+ attemptId: z.ZodString;
641
+ packetDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
642
+ }, z.core.$strict>], "kind">>;
643
+ }, z.core.$strict>;
315
644
  export declare const ArtifactSchema: z.ZodObject<{
316
645
  path: z.ZodString;
317
646
  }, z.core.$strict>;
@@ -421,19 +750,23 @@ export declare const WorkerOutcomeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
421
750
  }, z.core.$strict>], "kind">;
422
751
  export declare const WorkerResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
423
752
  status: z.ZodLiteral<"ok">;
753
+ operationId: z.ZodString;
754
+ expectedRevision: z.ZodNumber;
755
+ expectedSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
756
+ requestDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
424
757
  featureId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../domain/session.js").FeatureId, string>>;
425
758
  summary: z.ZodString;
426
759
  artifactsChanged: z.ZodDefault<z.ZodArray<z.ZodObject<{
427
760
  path: z.ZodString;
428
761
  }, z.core.$strict>>>;
429
- validationRun: z.ZodDefault<z.ZodArray<z.ZodObject<{
762
+ validationRun: z.ZodArray<z.ZodObject<{
430
763
  command: z.ZodString;
431
764
  status: z.ZodEnum<{
432
765
  failed: "failed";
433
766
  passed: "passed";
434
767
  }>;
435
768
  summary: z.ZodString;
436
- }, z.core.$strict>>>;
769
+ }, z.core.$strict>>;
437
770
  validationScope: z.ZodEnum<{
438
771
  broad: "broad";
439
772
  targeted: "targeted";
@@ -480,6 +813,76 @@ export declare const WorkerResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
480
813
  summary: z.ZodOptional<z.ZodString>;
481
814
  resolutionHint: z.ZodOptional<z.ZodString>;
482
815
  }, z.core.$strict>>;
816
+ reviewExecutions: z.ZodArray<z.ZodObject<{
817
+ attemptId: z.ZodString;
818
+ logicalPassId: z.ZodString;
819
+ featureId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../domain/session.js").FeatureId, string>>;
820
+ reviewKind: z.ZodEnum<{
821
+ feature: "feature";
822
+ final: "final";
823
+ }>;
824
+ reviewSnapshotId: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>>;
825
+ verdict: z.ZodEnum<{
826
+ failed: "failed";
827
+ passed: "passed";
828
+ }>;
829
+ startedAt: z.ZodString;
830
+ completedAt: z.ZodString;
831
+ terminalDisposition: z.ZodEnum<{
832
+ observed_unsubmitted: "observed_unsubmitted";
833
+ submitted: "submitted";
834
+ }>;
835
+ findings: z.ZodArray<z.ZodObject<{
836
+ taxonomy: z.ZodEnum<{
837
+ advisory: "advisory";
838
+ evidence_gap: "evidence_gap";
839
+ implementation_defect: "implementation_defect";
840
+ regression_coverage_gap: "regression_coverage_gap";
841
+ }>;
842
+ subject: z.ZodString;
843
+ requirementOrRisk: z.ZodString;
844
+ evidenceLocator: z.ZodString;
845
+ summary: z.ZodString;
846
+ severity: z.ZodEnum<{
847
+ advisory: "advisory";
848
+ blocking: "blocking";
849
+ }>;
850
+ }, z.core.$strict>>;
851
+ }, z.core.$strict>>;
852
+ evidence: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
853
+ evidenceId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
854
+ snapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
855
+ sourceDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
856
+ startedAt: z.ZodString;
857
+ completedAt: z.ZodString;
858
+ commandClass: z.ZodEnum<{
859
+ build: "build";
860
+ format: "format";
861
+ lint: "lint";
862
+ other: "other";
863
+ smoke: "smoke";
864
+ test: "test";
865
+ typecheck: "typecheck";
866
+ }>;
867
+ exitCode: z.ZodNumber;
868
+ outputDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
869
+ artifactRef: z.ZodOptional<z.ZodObject<{
870
+ kind: z.ZodLiteral<"restricted_evidence_v1">;
871
+ digest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
872
+ byteLength: z.ZodNumber;
873
+ }, z.core.$strict>>;
874
+ environmentKeys: z.ZodArray<z.ZodString>;
875
+ kind: z.ZodLiteral<"validation">;
876
+ }, z.core.$strict>, z.ZodObject<{
877
+ evidenceId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
878
+ snapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
879
+ sourceDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
880
+ startedAt: z.ZodString;
881
+ completedAt: z.ZodString;
882
+ kind: z.ZodLiteral<"review">;
883
+ attemptId: z.ZodString;
884
+ packetDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
885
+ }, z.core.$strict>], "kind">>;
483
886
  orchestrationPasses: z.ZodDefault<z.ZodArray<z.ZodObject<{
484
887
  id: z.ZodString;
485
888
  kind: z.ZodEnum<{
@@ -559,6 +962,10 @@ export declare const WorkerResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
559
962
  }, z.core.$strict>>>;
560
963
  }, z.core.$strict>, z.ZodObject<{
561
964
  status: z.ZodLiteral<"needs_input">;
965
+ operationId: z.ZodString;
966
+ expectedRevision: z.ZodNumber;
967
+ expectedSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
968
+ requestDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
562
969
  featureId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../domain/session.js").FeatureId, string>>;
563
970
  summary: z.ZodString;
564
971
  artifactsChanged: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -622,6 +1029,76 @@ export declare const WorkerResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
622
1029
  summary: z.ZodString;
623
1030
  resolutionHint: z.ZodOptional<z.ZodString>;
624
1031
  }, z.core.$strict>;
1032
+ reviewExecutions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1033
+ attemptId: z.ZodString;
1034
+ logicalPassId: z.ZodString;
1035
+ featureId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../domain/session.js").FeatureId, string>>;
1036
+ reviewKind: z.ZodEnum<{
1037
+ feature: "feature";
1038
+ final: "final";
1039
+ }>;
1040
+ reviewSnapshotId: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>>;
1041
+ verdict: z.ZodEnum<{
1042
+ failed: "failed";
1043
+ passed: "passed";
1044
+ }>;
1045
+ startedAt: z.ZodString;
1046
+ completedAt: z.ZodString;
1047
+ terminalDisposition: z.ZodEnum<{
1048
+ observed_unsubmitted: "observed_unsubmitted";
1049
+ submitted: "submitted";
1050
+ }>;
1051
+ findings: z.ZodArray<z.ZodObject<{
1052
+ taxonomy: z.ZodEnum<{
1053
+ advisory: "advisory";
1054
+ evidence_gap: "evidence_gap";
1055
+ implementation_defect: "implementation_defect";
1056
+ regression_coverage_gap: "regression_coverage_gap";
1057
+ }>;
1058
+ subject: z.ZodString;
1059
+ requirementOrRisk: z.ZodString;
1060
+ evidenceLocator: z.ZodString;
1061
+ summary: z.ZodString;
1062
+ severity: z.ZodEnum<{
1063
+ advisory: "advisory";
1064
+ blocking: "blocking";
1065
+ }>;
1066
+ }, z.core.$strict>>;
1067
+ }, z.core.$strict>>>;
1068
+ evidence: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1069
+ evidenceId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1070
+ snapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1071
+ sourceDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1072
+ startedAt: z.ZodString;
1073
+ completedAt: z.ZodString;
1074
+ commandClass: z.ZodEnum<{
1075
+ build: "build";
1076
+ format: "format";
1077
+ lint: "lint";
1078
+ other: "other";
1079
+ smoke: "smoke";
1080
+ test: "test";
1081
+ typecheck: "typecheck";
1082
+ }>;
1083
+ exitCode: z.ZodNumber;
1084
+ outputDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1085
+ artifactRef: z.ZodOptional<z.ZodObject<{
1086
+ kind: z.ZodLiteral<"restricted_evidence_v1">;
1087
+ digest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1088
+ byteLength: z.ZodNumber;
1089
+ }, z.core.$strict>>;
1090
+ environmentKeys: z.ZodArray<z.ZodString>;
1091
+ kind: z.ZodLiteral<"validation">;
1092
+ }, z.core.$strict>, z.ZodObject<{
1093
+ evidenceId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1094
+ snapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1095
+ sourceDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1096
+ startedAt: z.ZodString;
1097
+ completedAt: z.ZodString;
1098
+ kind: z.ZodLiteral<"review">;
1099
+ attemptId: z.ZodString;
1100
+ packetDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1101
+ }, z.core.$strict>], "kind">>>;
625
1102
  orchestrationPasses: z.ZodDefault<z.ZodArray<z.ZodObject<{
626
1103
  id: z.ZodString;
627
1104
  kind: z.ZodEnum<{
@@ -856,6 +1333,59 @@ export declare const BudgetTelemetrySchema: z.ZodObject<{
856
1333
  reviewCount: z.ZodDefault<z.ZodNumber>;
857
1334
  failedReviewCount: z.ZodDefault<z.ZodNumber>;
858
1335
  failedReviewAttemptsByFeature: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1336
+ reviewExecutions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1337
+ attemptId: z.ZodString;
1338
+ logicalPassId: z.ZodString;
1339
+ featureId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../domain/session.js").FeatureId, string>>;
1340
+ reviewKind: z.ZodEnum<{
1341
+ feature: "feature";
1342
+ final: "final";
1343
+ }>;
1344
+ reviewSnapshotId: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>>;
1345
+ verdict: z.ZodEnum<{
1346
+ failed: "failed";
1347
+ passed: "passed";
1348
+ }>;
1349
+ startedAt: z.ZodString;
1350
+ completedAt: z.ZodString;
1351
+ terminalDisposition: z.ZodEnum<{
1352
+ observed_unsubmitted: "observed_unsubmitted";
1353
+ submitted: "submitted";
1354
+ }>;
1355
+ findings: z.ZodArray<z.ZodObject<{
1356
+ taxonomy: z.ZodEnum<{
1357
+ advisory: "advisory";
1358
+ evidence_gap: "evidence_gap";
1359
+ implementation_defect: "implementation_defect";
1360
+ regression_coverage_gap: "regression_coverage_gap";
1361
+ }>;
1362
+ subject: z.ZodString;
1363
+ requirementOrRisk: z.ZodString;
1364
+ evidenceLocator: z.ZodString;
1365
+ summary: z.ZodString;
1366
+ severity: z.ZodEnum<{
1367
+ advisory: "advisory";
1368
+ blocking: "blocking";
1369
+ }>;
1370
+ fingerprint: z.ZodString;
1371
+ }, z.core.$strict>>;
1372
+ }, z.core.$strict>>>;
1373
+ reviewLifecycle: z.ZodPrefault<z.ZodObject<{
1374
+ featureAttemptCount: z.ZodDefault<z.ZodNumber>;
1375
+ finalAttemptCount: z.ZodDefault<z.ZodNumber>;
1376
+ passedVerdictCount: z.ZodDefault<z.ZodNumber>;
1377
+ failedVerdictCount: z.ZodDefault<z.ZodNumber>;
1378
+ retryConsumedCount: z.ZodDefault<z.ZodNumber>;
1379
+ }, z.core.$strict>>;
1380
+ observedReviewWorkers: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
1381
+ source: z.ZodLiteral<"unavailable">;
1382
+ reconciliationStatus: z.ZodLiteral<"unreconciled">;
1383
+ observedExecutionCount: z.ZodNull;
1384
+ }, z.core.$strict>, z.ZodObject<{
1385
+ source: z.ZodLiteral<"host_observed">;
1386
+ reconciliationStatus: z.ZodLiteral<"reconciled">;
1387
+ observedExecutionCount: z.ZodNumber;
1388
+ }, z.core.$strict>], "source">>;
859
1389
  orchestration: z.ZodPrefault<z.ZodObject<{
860
1390
  passCount: z.ZodDefault<z.ZodNumber>;
861
1391
  workerCount: z.ZodDefault<z.ZodNumber>;
@@ -944,7 +1474,7 @@ export declare const BudgetTelemetrySchema: z.ZodObject<{
944
1474
  }, z.core.$strict>>>;
945
1475
  }, z.core.$strict>>;
946
1476
  }, z.core.$strict>;
947
- export declare const SessionSchema: z.ZodObject<{
1477
+ export declare const SessionSchema: z.ZodPipe<z.ZodObject<{
948
1478
  version: z.ZodLiteral<3>;
949
1479
  id: z.ZodPipe<z.ZodString, z.ZodTransform<import("../domain/session.js").SessionId, string>>;
950
1480
  goal: z.ZodString;
@@ -1145,6 +1675,59 @@ export declare const SessionSchema: z.ZodObject<{
1145
1675
  reviewCount: z.ZodDefault<z.ZodNumber>;
1146
1676
  failedReviewCount: z.ZodDefault<z.ZodNumber>;
1147
1677
  failedReviewAttemptsByFeature: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1678
+ reviewExecutions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1679
+ attemptId: z.ZodString;
1680
+ logicalPassId: z.ZodString;
1681
+ featureId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../domain/session.js").FeatureId, string>>;
1682
+ reviewKind: z.ZodEnum<{
1683
+ feature: "feature";
1684
+ final: "final";
1685
+ }>;
1686
+ reviewSnapshotId: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>>;
1687
+ verdict: z.ZodEnum<{
1688
+ failed: "failed";
1689
+ passed: "passed";
1690
+ }>;
1691
+ startedAt: z.ZodString;
1692
+ completedAt: z.ZodString;
1693
+ terminalDisposition: z.ZodEnum<{
1694
+ observed_unsubmitted: "observed_unsubmitted";
1695
+ submitted: "submitted";
1696
+ }>;
1697
+ findings: z.ZodArray<z.ZodObject<{
1698
+ taxonomy: z.ZodEnum<{
1699
+ advisory: "advisory";
1700
+ evidence_gap: "evidence_gap";
1701
+ implementation_defect: "implementation_defect";
1702
+ regression_coverage_gap: "regression_coverage_gap";
1703
+ }>;
1704
+ subject: z.ZodString;
1705
+ requirementOrRisk: z.ZodString;
1706
+ evidenceLocator: z.ZodString;
1707
+ summary: z.ZodString;
1708
+ severity: z.ZodEnum<{
1709
+ advisory: "advisory";
1710
+ blocking: "blocking";
1711
+ }>;
1712
+ fingerprint: z.ZodString;
1713
+ }, z.core.$strict>>;
1714
+ }, z.core.$strict>>>;
1715
+ reviewLifecycle: z.ZodPrefault<z.ZodObject<{
1716
+ featureAttemptCount: z.ZodDefault<z.ZodNumber>;
1717
+ finalAttemptCount: z.ZodDefault<z.ZodNumber>;
1718
+ passedVerdictCount: z.ZodDefault<z.ZodNumber>;
1719
+ failedVerdictCount: z.ZodDefault<z.ZodNumber>;
1720
+ retryConsumedCount: z.ZodDefault<z.ZodNumber>;
1721
+ }, z.core.$strict>>;
1722
+ observedReviewWorkers: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
1723
+ source: z.ZodLiteral<"unavailable">;
1724
+ reconciliationStatus: z.ZodLiteral<"unreconciled">;
1725
+ observedExecutionCount: z.ZodNull;
1726
+ }, z.core.$strict>, z.ZodObject<{
1727
+ source: z.ZodLiteral<"host_observed">;
1728
+ reconciliationStatus: z.ZodLiteral<"reconciled">;
1729
+ observedExecutionCount: z.ZodNumber;
1730
+ }, z.core.$strict>], "source">>;
1148
1731
  orchestration: z.ZodPrefault<z.ZodObject<{
1149
1732
  passCount: z.ZodDefault<z.ZodNumber>;
1150
1733
  workerCount: z.ZodDefault<z.ZodNumber>;
@@ -1233,6 +1816,83 @@ export declare const SessionSchema: z.ZodObject<{
1233
1816
  }, z.core.$strict>>>;
1234
1817
  }, z.core.$strict>>;
1235
1818
  }, z.core.$strict>>;
1819
+ causal: z.ZodOptional<z.ZodObject<{
1820
+ revision: z.ZodNumber;
1821
+ genesisSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1822
+ snapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1823
+ mutations: z.ZodArray<z.ZodObject<{
1824
+ operationId: z.ZodString;
1825
+ operationKind: z.ZodEnum<{
1826
+ evidence_record: "evidence_record";
1827
+ feature_complete: "feature_complete";
1828
+ feature_reset: "feature_reset";
1829
+ plan_approve: "plan_approve";
1830
+ plan_save: "plan_save";
1831
+ review_record: "review_record";
1832
+ run_start: "run_start";
1833
+ session_close: "session_close";
1834
+ }>;
1835
+ requestDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1836
+ priorMutationDigest: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>>;
1837
+ mutationDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1838
+ priorRevision: z.ZodNumber;
1839
+ revision: z.ZodNumber;
1840
+ priorSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1841
+ currentSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1842
+ changedEntity: z.ZodObject<{
1843
+ kind: z.ZodEnum<{
1844
+ closure: "closure";
1845
+ evidence: "evidence";
1846
+ feature: "feature";
1847
+ plan: "plan";
1848
+ review: "review";
1849
+ session: "session";
1850
+ }>;
1851
+ id: z.ZodString;
1852
+ }, z.core.$strict>;
1853
+ changedFields: z.ZodArray<z.ZodString>;
1854
+ blockerDelta: z.ZodObject<{
1855
+ added: z.ZodArray<z.ZodString>;
1856
+ removed: z.ZodArray<z.ZodString>;
1857
+ }, z.core.$strict>;
1858
+ evidenceRefs: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>>;
1859
+ recordedAt: z.ZodString;
1860
+ }, z.core.$strict>>;
1861
+ evidence: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1862
+ evidenceId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1863
+ snapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1864
+ sourceDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1865
+ startedAt: z.ZodString;
1866
+ completedAt: z.ZodString;
1867
+ commandClass: z.ZodEnum<{
1868
+ build: "build";
1869
+ format: "format";
1870
+ lint: "lint";
1871
+ other: "other";
1872
+ smoke: "smoke";
1873
+ test: "test";
1874
+ typecheck: "typecheck";
1875
+ }>;
1876
+ exitCode: z.ZodNumber;
1877
+ outputDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1878
+ artifactRef: z.ZodOptional<z.ZodObject<{
1879
+ kind: z.ZodLiteral<"restricted_evidence_v1">;
1880
+ digest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1881
+ byteLength: z.ZodNumber;
1882
+ }, z.core.$strict>>;
1883
+ environmentKeys: z.ZodArray<z.ZodString>;
1884
+ kind: z.ZodLiteral<"validation">;
1885
+ }, z.core.$strict>, z.ZodObject<{
1886
+ evidenceId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1887
+ snapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1888
+ sourceDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1889
+ startedAt: z.ZodString;
1890
+ completedAt: z.ZodString;
1891
+ kind: z.ZodLiteral<"review">;
1892
+ attemptId: z.ZodString;
1893
+ packetDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
1894
+ }, z.core.$strict>], "kind">>;
1895
+ }, z.core.$strict>>;
1236
1896
  closure: z.ZodNullable<z.ZodObject<{
1237
1897
  kind: z.ZodEnum<{
1238
1898
  abandoned: "abandoned";
@@ -1253,5 +1913,231 @@ export declare const SessionSchema: z.ZodObject<{
1253
1913
  updatedAt: z.ZodString;
1254
1914
  completedAt: z.ZodNullable<z.ZodString>;
1255
1915
  }, z.core.$strict>;
1256
- }, z.core.$strict>;
1257
- export type { Artifact, BudgetTelemetry, ExecutionHistoryEntry, Feature, FeatureReviewDepth, FinalReview, OrchestrationPassRecord, OrchestrationTelemetry, Plan, PlanInput, Review, Session, ValidationRun, WorkerResult, } from "../domain/session.js";
1916
+ }, z.core.$strict>, z.ZodTransform<Session, {
1917
+ version: 3;
1918
+ id: import("../domain/session.js").SessionId;
1919
+ goal: string;
1920
+ status: "blocked" | "completed" | "planning" | "ready" | "running";
1921
+ approval: "approved" | "pending";
1922
+ plan: {
1923
+ summary: string;
1924
+ overview: string;
1925
+ requirements: string[];
1926
+ decisions: string[];
1927
+ finalReviewPolicy: "broad" | "detailed";
1928
+ features: {
1929
+ id: import("../domain/session.js").FeatureId;
1930
+ title: string;
1931
+ summary: string;
1932
+ status: "blocked" | "completed" | "in_progress" | "pending";
1933
+ reviewDepth: "detailed" | "quick" | "standard";
1934
+ targets: string[];
1935
+ validation: string[];
1936
+ dependsOn: import("../domain/session.js").FeatureId[];
1937
+ }[];
1938
+ } | null;
1939
+ activeFeatureId: import("../domain/session.js").FeatureId | null;
1940
+ history: {
1941
+ featureId: import("../domain/session.js").FeatureId;
1942
+ status: "blocked" | "completed" | "needs_input";
1943
+ summary: string;
1944
+ recordedAt: string;
1945
+ artifactsChanged: {
1946
+ path: string;
1947
+ }[];
1948
+ validationRun: {
1949
+ command: string;
1950
+ status: "failed" | "passed";
1951
+ summary: string;
1952
+ }[];
1953
+ validationScope?: "broad" | "targeted" | undefined;
1954
+ featureReviewDepth?: "detailed" | "quick" | "standard" | undefined;
1955
+ featureReview?: {
1956
+ status: "failed" | "passed";
1957
+ summary: string;
1958
+ blockingFindings: {
1959
+ summary: string;
1960
+ severity: "advisory" | "blocking";
1961
+ }[];
1962
+ } | undefined;
1963
+ finalReview?: {
1964
+ status: "failed" | "passed";
1965
+ summary: string;
1966
+ blockingFindings: {
1967
+ summary: string;
1968
+ severity: "advisory" | "blocking";
1969
+ }[];
1970
+ reviewDepth: "broad" | "detailed";
1971
+ } | undefined;
1972
+ outcome?: {
1973
+ kind: "completed";
1974
+ summary?: string | undefined;
1975
+ resolutionHint?: string | undefined;
1976
+ } | {
1977
+ kind: "blocked" | "needs_input" | "replan_required";
1978
+ summary: string;
1979
+ resolutionHint?: string | undefined;
1980
+ } | undefined;
1981
+ orchestrationPasses: {
1982
+ id: string;
1983
+ kind: "audit" | "candidate" | "discovery" | "implementation-decision" | "review" | "validation" | "verification";
1984
+ decision?: "candidate-exact-path" | "candidate-worktree" | "parallel" | "serial" | "skipped" | "tournament" | undefined;
1985
+ decisionReason?: string | undefined;
1986
+ candidateEligibility: "eligible" | "not_eligible" | "unknown";
1987
+ candidateDecision?: "serial_required" | "skipped" | "used" | undefined;
1988
+ decisionFactors: ("independent_surface" | "needs_manager_judgment" | "overlapping_files" | "shared_state" | "small_slice" | "validation_available")[];
1989
+ modes: ("audit" | "candidate-implementation" | "evidence" | "review" | "validation" | "verifier")[];
1990
+ workerCount: number;
1991
+ candidateWorkerCount: number;
1992
+ verifierWorkerCount: number;
1993
+ sliceIds: string[];
1994
+ dependsOn: string[];
1995
+ writeScope: "exact-path" | "isolated-worktree" | "manager-serial" | "mixed" | "none";
1996
+ handoffRefs: string[];
1997
+ verificationStatus: "downgraded" | "failed" | "mixed" | "not-needed" | "passed" | "pending";
1998
+ outcome: "accepted" | "modified" | "not-covered" | "partial" | "rejected" | "superseded";
1999
+ synthesisRef?: string | undefined;
2000
+ }[];
2001
+ }[];
2002
+ budget: {
2003
+ reviewCount: number;
2004
+ failedReviewCount: number;
2005
+ failedReviewAttemptsByFeature: Record<string, number>;
2006
+ reviewExecutions: {
2007
+ attemptId: string;
2008
+ logicalPassId: string;
2009
+ featureId: import("../domain/session.js").FeatureId;
2010
+ reviewKind: "feature" | "final";
2011
+ reviewSnapshotId: `sha256:${string}`;
2012
+ verdict: "failed" | "passed";
2013
+ startedAt: string;
2014
+ completedAt: string;
2015
+ terminalDisposition: "observed_unsubmitted" | "submitted";
2016
+ findings: {
2017
+ taxonomy: "advisory" | "evidence_gap" | "implementation_defect" | "regression_coverage_gap";
2018
+ subject: string;
2019
+ requirementOrRisk: string;
2020
+ evidenceLocator: string;
2021
+ summary: string;
2022
+ severity: "advisory" | "blocking";
2023
+ fingerprint: string;
2024
+ }[];
2025
+ }[];
2026
+ reviewLifecycle: {
2027
+ featureAttemptCount: number;
2028
+ finalAttemptCount: number;
2029
+ passedVerdictCount: number;
2030
+ failedVerdictCount: number;
2031
+ retryConsumedCount: number;
2032
+ };
2033
+ observedReviewWorkers: {
2034
+ source: "unavailable";
2035
+ reconciliationStatus: "unreconciled";
2036
+ observedExecutionCount: null;
2037
+ } | {
2038
+ source: "host_observed";
2039
+ reconciliationStatus: "reconciled";
2040
+ observedExecutionCount: number;
2041
+ };
2042
+ orchestration: {
2043
+ passCount: number;
2044
+ workerCount: number;
2045
+ candidatePassCount: number;
2046
+ verifierPassCount: number;
2047
+ candidateEligibleCount: number;
2048
+ candidateUsedDecisionCount: number;
2049
+ candidateSerialRequiredDecisionCount: number;
2050
+ skippedCandidateDecisionCount: number;
2051
+ latestPasses: {
2052
+ id: string;
2053
+ kind: "audit" | "candidate" | "discovery" | "implementation-decision" | "review" | "validation" | "verification";
2054
+ decision?: "candidate-exact-path" | "candidate-worktree" | "parallel" | "serial" | "skipped" | "tournament" | undefined;
2055
+ decisionReason?: string | undefined;
2056
+ candidateEligibility: "eligible" | "not_eligible" | "unknown";
2057
+ candidateDecision?: "serial_required" | "skipped" | "used" | undefined;
2058
+ decisionFactors: ("independent_surface" | "needs_manager_judgment" | "overlapping_files" | "shared_state" | "small_slice" | "validation_available")[];
2059
+ modes: ("audit" | "candidate-implementation" | "evidence" | "review" | "validation" | "verifier")[];
2060
+ workerCount: number;
2061
+ candidateWorkerCount: number;
2062
+ verifierWorkerCount: number;
2063
+ sliceIds: string[];
2064
+ dependsOn: string[];
2065
+ writeScope: "exact-path" | "isolated-worktree" | "manager-serial" | "mixed" | "none";
2066
+ handoffRefs: string[];
2067
+ verificationStatus: "downgraded" | "failed" | "mixed" | "not-needed" | "passed" | "pending";
2068
+ outcome: "accepted" | "modified" | "not-covered" | "partial" | "rejected" | "superseded";
2069
+ synthesisRef?: string | undefined;
2070
+ }[];
2071
+ };
2072
+ };
2073
+ causal?: {
2074
+ revision: number;
2075
+ genesisSnapshotId: `sha256:${string}`;
2076
+ snapshotId: `sha256:${string}`;
2077
+ mutations: {
2078
+ operationId: string;
2079
+ operationKind: "evidence_record" | "feature_complete" | "feature_reset" | "plan_approve" | "plan_save" | "review_record" | "run_start" | "session_close";
2080
+ requestDigest: `sha256:${string}`;
2081
+ priorMutationDigest: `sha256:${string}` | null;
2082
+ mutationDigest: `sha256:${string}`;
2083
+ priorRevision: number;
2084
+ revision: number;
2085
+ priorSnapshotId: `sha256:${string}`;
2086
+ currentSnapshotId: `sha256:${string}`;
2087
+ changedEntity: {
2088
+ kind: "closure" | "evidence" | "feature" | "plan" | "review" | "session";
2089
+ id: string;
2090
+ };
2091
+ changedFields: string[];
2092
+ blockerDelta: {
2093
+ added: string[];
2094
+ removed: string[];
2095
+ };
2096
+ evidenceRefs: `sha256:${string}`[];
2097
+ recordedAt: string;
2098
+ }[];
2099
+ evidence: ({
2100
+ evidenceId: `sha256:${string}`;
2101
+ snapshotId: `sha256:${string}`;
2102
+ sourceDigest: `sha256:${string}`;
2103
+ startedAt: string;
2104
+ completedAt: string;
2105
+ commandClass: "build" | "format" | "lint" | "other" | "smoke" | "test" | "typecheck";
2106
+ exitCode: number;
2107
+ outputDigest: `sha256:${string}`;
2108
+ artifactRef?: {
2109
+ kind: "restricted_evidence_v1";
2110
+ digest: `sha256:${string}`;
2111
+ byteLength: number;
2112
+ } | undefined;
2113
+ environmentKeys: string[];
2114
+ kind: "validation";
2115
+ } | {
2116
+ evidenceId: `sha256:${string}`;
2117
+ snapshotId: `sha256:${string}`;
2118
+ sourceDigest: `sha256:${string}`;
2119
+ startedAt: string;
2120
+ completedAt: string;
2121
+ kind: "review";
2122
+ attemptId: string;
2123
+ packetDigest: `sha256:${string}`;
2124
+ })[];
2125
+ } | undefined;
2126
+ closure: {
2127
+ kind: "abandoned" | "completed" | "deferred";
2128
+ summary: string;
2129
+ recordedAt: string;
2130
+ } | null;
2131
+ lastError: {
2132
+ tool: string;
2133
+ summary: string;
2134
+ recovery?: string | undefined;
2135
+ recordedAt: string;
2136
+ } | null;
2137
+ timestamps: {
2138
+ createdAt: string;
2139
+ updatedAt: string;
2140
+ completedAt: string | null;
2141
+ };
2142
+ }>>;
2143
+ export type { Artifact, BudgetTelemetry, CausalMutationRecord, CausalState, EvidenceId, EvidenceRecord, ExecutionHistoryEntry, Feature, FeatureReviewDepth, FinalReview, ObservedReviewWorkerLedger, OrchestrationPassRecord, OrchestrationTelemetry, Plan, PlanInput, Review, ReviewExecution, ReviewExecutionFinding, ReviewExecutionFindingInput, ReviewExecutionInput, ReviewFindingTaxonomy, ReviewLifecycleTelemetry, Session, SnapshotId, ValidationRun, WorkerResult, } from "../domain/session.js";