devcontour-harness 0.1.0-alpha.26 → 0.1.0-alpha.28

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 (69) hide show
  1. package/README.md +15 -2
  2. package/docs/architecture.md +59 -0
  3. package/docs/compatibility.md +25 -12
  4. package/docs/connectors.md +5 -2
  5. package/docs/contracts.md +80 -25
  6. package/docs/release-notes/0.1.0-alpha.27.md +36 -0
  7. package/docs/release-notes/0.1.0-alpha.28.md +37 -0
  8. package/docs/review-protocol.md +10 -4
  9. package/docs/toolchains.md +83 -0
  10. package/docs/upgrade.md +22 -0
  11. package/lib/cli.js +13 -0
  12. package/lib/contracts/cli.d.ts +147 -19
  13. package/lib/contracts/cli.js +66 -0
  14. package/lib/contracts/diagnosis.d.ts +1 -1
  15. package/lib/contracts/events.d.ts +6 -6
  16. package/lib/contracts/execution.d.ts +268 -16
  17. package/lib/contracts/execution.js +3 -1
  18. package/lib/contracts/policy.d.ts +37 -5
  19. package/lib/contracts/policy.js +42 -2
  20. package/lib/contracts/profiles.d.ts +2 -0
  21. package/lib/contracts/published.d.ts +226 -20
  22. package/lib/contracts/result.d.ts +268 -12
  23. package/lib/contracts/result.js +66 -0
  24. package/lib/control/harness.d.ts +64 -7
  25. package/lib/control/harness.js +4 -0
  26. package/lib/control/recovery.d.ts +1 -1
  27. package/lib/control/review.js +6 -1
  28. package/lib/engine/engine.d.ts +117 -12
  29. package/lib/engine/joint-runner.d.ts +96 -6
  30. package/lib/engine/joint-runner.js +47 -1
  31. package/lib/engine/runner.d.ts +29 -0
  32. package/lib/engine/runner.js +200 -2
  33. package/lib/engine/worktree-cleanup.d.ts +131 -0
  34. package/lib/engine/worktree-cleanup.js +520 -0
  35. package/lib/environment/isolation.d.ts +1 -0
  36. package/lib/environment/isolation.js +2 -1
  37. package/lib/environment/os-tools.d.ts +4 -2
  38. package/lib/environment/os-tools.js +4 -2
  39. package/lib/environment/process.d.ts +5 -0
  40. package/lib/environment/process.js +40 -17
  41. package/lib/environment/resources.d.ts +9 -0
  42. package/lib/environment/resources.js +24 -0
  43. package/lib/index.d.ts +1 -0
  44. package/lib/index.js +1 -0
  45. package/lib/integrations/connector/commands.d.ts +2 -1
  46. package/lib/integrations/connector/commands.js +10 -2
  47. package/lib/integrations/connector/store.d.ts +1 -1
  48. package/lib/integrations/connector/store.js +11 -6
  49. package/lib/profiles/resolve.d.ts +8 -0
  50. package/lib/storage/document.d.ts +132 -12
  51. package/lib/toolchains/inspect.d.ts +1 -1
  52. package/lib/toolchains/inspect.js +29 -1
  53. package/lib/toolchains/probe.d.ts +16 -0
  54. package/lib/toolchains/probe.js +20 -0
  55. package/lib/verification/confirm.d.ts +3 -1
  56. package/lib/verification/confirm.js +16 -2
  57. package/lib/verification/dependencies.d.ts +3 -0
  58. package/lib/verification/dependencies.js +11 -0
  59. package/lib/verification/dependency-store.d.ts +117 -0
  60. package/lib/verification/dependency-store.js +811 -0
  61. package/lib/verification/gate-artifacts.d.ts +34 -0
  62. package/lib/verification/gate-artifacts.js +303 -0
  63. package/lib/verification/gates-at.js +18 -0
  64. package/lib/verification/gates.js +15 -0
  65. package/lib/verification/joint.d.ts +48 -3
  66. package/package.json +1 -1
  67. package/schemas/execution-document.schema.json +372 -0
  68. package/schemas/execution-policy.schema.json +56 -0
  69. package/schemas/joint-verification.schema.json +279 -0
@@ -29,8 +29,8 @@ export declare const failureKindSchema: z.ZodEnum<{
29
29
  gate: "gate";
30
30
  unknown: "unknown";
31
31
  review: "review";
32
- environment: "environment";
33
32
  cancelled: "cancelled";
33
+ environment: "environment";
34
34
  timeout: "timeout";
35
35
  "provider-auth": "provider-auth";
36
36
  "stale-base": "stale-base";
@@ -472,6 +472,34 @@ export declare const evidenceRecordSchema: z.ZodObject<{
472
472
  }, z.core.$strict>>;
473
473
  coverage: z.ZodOptional<z.ZodArray<z.ZodString>>;
474
474
  }, z.core.$strict>>;
475
+ artifactFiles: z.ZodOptional<z.ZodObject<{
476
+ dir: z.ZodString;
477
+ files: z.ZodArray<z.ZodObject<{
478
+ path: z.ZodString;
479
+ sha256: z.ZodString;
480
+ bytes: z.ZodNumber;
481
+ redacted: z.ZodOptional<z.ZodLiteral<true>>;
482
+ }, z.core.$strict>>;
483
+ skipped: z.ZodArray<z.ZodObject<{
484
+ path: z.ZodString;
485
+ reason: z.ZodEnum<{
486
+ missing: "missing";
487
+ symlink: "symlink";
488
+ outside: "outside";
489
+ "not-regular": "not-regular";
490
+ hardlink: "hardlink";
491
+ secret: "secret";
492
+ extension: "extension";
493
+ "file-limit": "file-limit";
494
+ "total-limit": "total-limit";
495
+ "count-limit": "count-limit";
496
+ "scan-limit": "scan-limit";
497
+ "copy-failed": "copy-failed";
498
+ }>;
499
+ detail: z.ZodOptional<z.ZodString>;
500
+ }, z.core.$strict>>;
501
+ skippedMore: z.ZodOptional<z.ZodNumber>;
502
+ }, z.core.$strict>>;
475
503
  checks: z.ZodOptional<z.ZodString>;
476
504
  alreadySatisfied: z.ZodOptional<z.ZodObject<{
477
505
  gates: z.ZodArray<z.ZodString>;
@@ -569,8 +597,8 @@ export declare const continuationSchema: z.ZodObject<{
569
597
  gate: "gate";
570
598
  unknown: "unknown";
571
599
  review: "review";
572
- environment: "environment";
573
600
  cancelled: "cancelled";
601
+ environment: "environment";
574
602
  timeout: "timeout";
575
603
  "provider-auth": "provider-auth";
576
604
  "stale-base": "stale-base";
@@ -654,8 +682,8 @@ export declare const attemptStateSchema: z.ZodObject<{
654
682
  gate: "gate";
655
683
  unknown: "unknown";
656
684
  review: "review";
657
- environment: "environment";
658
685
  cancelled: "cancelled";
686
+ environment: "environment";
659
687
  timeout: "timeout";
660
688
  "provider-auth": "provider-auth";
661
689
  "stale-base": "stale-base";
@@ -766,8 +794,8 @@ export declare const attemptStateSchema: z.ZodObject<{
766
794
  gate: "gate";
767
795
  unknown: "unknown";
768
796
  review: "review";
769
- environment: "environment";
770
797
  cancelled: "cancelled";
798
+ environment: "environment";
771
799
  timeout: "timeout";
772
800
  "provider-auth": "provider-auth";
773
801
  "stale-base": "stale-base";
@@ -1040,6 +1068,34 @@ export declare const attemptStateSchema: z.ZodObject<{
1040
1068
  }, z.core.$strict>>;
1041
1069
  coverage: z.ZodOptional<z.ZodArray<z.ZodString>>;
1042
1070
  }, z.core.$strict>>;
1071
+ artifactFiles: z.ZodOptional<z.ZodObject<{
1072
+ dir: z.ZodString;
1073
+ files: z.ZodArray<z.ZodObject<{
1074
+ path: z.ZodString;
1075
+ sha256: z.ZodString;
1076
+ bytes: z.ZodNumber;
1077
+ redacted: z.ZodOptional<z.ZodLiteral<true>>;
1078
+ }, z.core.$strict>>;
1079
+ skipped: z.ZodArray<z.ZodObject<{
1080
+ path: z.ZodString;
1081
+ reason: z.ZodEnum<{
1082
+ missing: "missing";
1083
+ symlink: "symlink";
1084
+ outside: "outside";
1085
+ "not-regular": "not-regular";
1086
+ hardlink: "hardlink";
1087
+ secret: "secret";
1088
+ extension: "extension";
1089
+ "file-limit": "file-limit";
1090
+ "total-limit": "total-limit";
1091
+ "count-limit": "count-limit";
1092
+ "scan-limit": "scan-limit";
1093
+ "copy-failed": "copy-failed";
1094
+ }>;
1095
+ detail: z.ZodOptional<z.ZodString>;
1096
+ }, z.core.$strict>>;
1097
+ skippedMore: z.ZodOptional<z.ZodNumber>;
1098
+ }, z.core.$strict>>;
1043
1099
  checks: z.ZodOptional<z.ZodString>;
1044
1100
  alreadySatisfied: z.ZodOptional<z.ZodObject<{
1045
1101
  gates: z.ZodArray<z.ZodString>;
@@ -1204,8 +1260,8 @@ export declare const workStateSchema: z.ZodObject<{
1204
1260
  gate: "gate";
1205
1261
  unknown: "unknown";
1206
1262
  review: "review";
1207
- environment: "environment";
1208
1263
  cancelled: "cancelled";
1264
+ environment: "environment";
1209
1265
  timeout: "timeout";
1210
1266
  "provider-auth": "provider-auth";
1211
1267
  "stale-base": "stale-base";
@@ -1480,8 +1536,8 @@ export declare const controlStateSchema: z.ZodObject<{
1480
1536
  gate: "gate";
1481
1537
  unknown: "unknown";
1482
1538
  review: "review";
1483
- environment: "environment";
1484
1539
  cancelled: "cancelled";
1540
+ environment: "environment";
1485
1541
  timeout: "timeout";
1486
1542
  "provider-auth": "provider-auth";
1487
1543
  "stale-base": "stale-base";
@@ -2478,8 +2534,8 @@ export declare const jointVerificationStateSchema: z.ZodDiscriminatedUnion<[z.Zo
2478
2534
  affected: z.ZodArray<z.ZodString>;
2479
2535
  gateIds: z.ZodArray<z.ZodString>;
2480
2536
  mode: z.ZodEnum<{
2481
- all: "all";
2482
2537
  affected: "affected";
2538
+ all: "all";
2483
2539
  }>;
2484
2540
  reason: z.ZodString;
2485
2541
  baseline: z.ZodOptional<z.ZodString>;
@@ -2496,6 +2552,34 @@ export declare const jointVerificationStateSchema: z.ZodDiscriminatedUnion<[z.Zo
2496
2552
  path: z.ZodString;
2497
2553
  digest: z.ZodString;
2498
2554
  }, z.core.$strict>>;
2555
+ artifactFiles: z.ZodOptional<z.ZodObject<{
2556
+ dir: z.ZodString;
2557
+ files: z.ZodArray<z.ZodObject<{
2558
+ path: z.ZodString;
2559
+ sha256: z.ZodString;
2560
+ bytes: z.ZodNumber;
2561
+ redacted: z.ZodOptional<z.ZodLiteral<true>>;
2562
+ }, z.core.$strict>>;
2563
+ skipped: z.ZodArray<z.ZodObject<{
2564
+ path: z.ZodString;
2565
+ reason: z.ZodEnum<{
2566
+ missing: "missing";
2567
+ symlink: "symlink";
2568
+ outside: "outside";
2569
+ "not-regular": "not-regular";
2570
+ hardlink: "hardlink";
2571
+ secret: "secret";
2572
+ extension: "extension";
2573
+ "file-limit": "file-limit";
2574
+ "total-limit": "total-limit";
2575
+ "count-limit": "count-limit";
2576
+ "scan-limit": "scan-limit";
2577
+ "copy-failed": "copy-failed";
2578
+ }>;
2579
+ detail: z.ZodOptional<z.ZodString>;
2580
+ }, z.core.$strict>>;
2581
+ skippedMore: z.ZodOptional<z.ZodNumber>;
2582
+ }, z.core.$strict>>;
2499
2583
  durationMs: z.ZodOptional<z.ZodNumber>;
2500
2584
  }, z.core.$strict>>;
2501
2585
  token: z.ZodString;
@@ -2521,8 +2605,8 @@ export declare const jointVerificationStateSchema: z.ZodDiscriminatedUnion<[z.Zo
2521
2605
  affected: z.ZodArray<z.ZodString>;
2522
2606
  gateIds: z.ZodArray<z.ZodString>;
2523
2607
  mode: z.ZodEnum<{
2524
- all: "all";
2525
2608
  affected: "affected";
2609
+ all: "all";
2526
2610
  }>;
2527
2611
  reason: z.ZodString;
2528
2612
  baseline: z.ZodOptional<z.ZodString>;
@@ -2539,6 +2623,34 @@ export declare const jointVerificationStateSchema: z.ZodDiscriminatedUnion<[z.Zo
2539
2623
  path: z.ZodString;
2540
2624
  digest: z.ZodString;
2541
2625
  }, z.core.$strict>>;
2626
+ artifactFiles: z.ZodOptional<z.ZodObject<{
2627
+ dir: z.ZodString;
2628
+ files: z.ZodArray<z.ZodObject<{
2629
+ path: z.ZodString;
2630
+ sha256: z.ZodString;
2631
+ bytes: z.ZodNumber;
2632
+ redacted: z.ZodOptional<z.ZodLiteral<true>>;
2633
+ }, z.core.$strict>>;
2634
+ skipped: z.ZodArray<z.ZodObject<{
2635
+ path: z.ZodString;
2636
+ reason: z.ZodEnum<{
2637
+ missing: "missing";
2638
+ symlink: "symlink";
2639
+ outside: "outside";
2640
+ "not-regular": "not-regular";
2641
+ hardlink: "hardlink";
2642
+ secret: "secret";
2643
+ extension: "extension";
2644
+ "file-limit": "file-limit";
2645
+ "total-limit": "total-limit";
2646
+ "count-limit": "count-limit";
2647
+ "scan-limit": "scan-limit";
2648
+ "copy-failed": "copy-failed";
2649
+ }>;
2650
+ detail: z.ZodOptional<z.ZodString>;
2651
+ }, z.core.$strict>>;
2652
+ skippedMore: z.ZodOptional<z.ZodNumber>;
2653
+ }, z.core.$strict>>;
2542
2654
  durationMs: z.ZodOptional<z.ZodNumber>;
2543
2655
  }, z.core.$strict>>;
2544
2656
  token: z.ZodString;
@@ -2563,8 +2675,8 @@ export declare const jointVerificationStateSchema: z.ZodDiscriminatedUnion<[z.Zo
2563
2675
  affected: z.ZodArray<z.ZodString>;
2564
2676
  gateIds: z.ZodArray<z.ZodString>;
2565
2677
  mode: z.ZodEnum<{
2566
- all: "all";
2567
2678
  affected: "affected";
2679
+ all: "all";
2568
2680
  }>;
2569
2681
  reason: z.ZodString;
2570
2682
  baseline: z.ZodOptional<z.ZodString>;
@@ -2581,6 +2693,34 @@ export declare const jointVerificationStateSchema: z.ZodDiscriminatedUnion<[z.Zo
2581
2693
  path: z.ZodString;
2582
2694
  digest: z.ZodString;
2583
2695
  }, z.core.$strict>>;
2696
+ artifactFiles: z.ZodOptional<z.ZodObject<{
2697
+ dir: z.ZodString;
2698
+ files: z.ZodArray<z.ZodObject<{
2699
+ path: z.ZodString;
2700
+ sha256: z.ZodString;
2701
+ bytes: z.ZodNumber;
2702
+ redacted: z.ZodOptional<z.ZodLiteral<true>>;
2703
+ }, z.core.$strict>>;
2704
+ skipped: z.ZodArray<z.ZodObject<{
2705
+ path: z.ZodString;
2706
+ reason: z.ZodEnum<{
2707
+ missing: "missing";
2708
+ symlink: "symlink";
2709
+ outside: "outside";
2710
+ "not-regular": "not-regular";
2711
+ hardlink: "hardlink";
2712
+ secret: "secret";
2713
+ extension: "extension";
2714
+ "file-limit": "file-limit";
2715
+ "total-limit": "total-limit";
2716
+ "count-limit": "count-limit";
2717
+ "scan-limit": "scan-limit";
2718
+ "copy-failed": "copy-failed";
2719
+ }>;
2720
+ detail: z.ZodOptional<z.ZodString>;
2721
+ }, z.core.$strict>>;
2722
+ skippedMore: z.ZodOptional<z.ZodNumber>;
2723
+ }, z.core.$strict>>;
2584
2724
  durationMs: z.ZodOptional<z.ZodNumber>;
2585
2725
  }, z.core.$strict>>;
2586
2726
  token: z.ZodString;
@@ -2739,8 +2879,8 @@ export declare const executionDocumentSchema: z.ZodObject<{
2739
2879
  gate: "gate";
2740
2880
  unknown: "unknown";
2741
2881
  review: "review";
2742
- environment: "environment";
2743
2882
  cancelled: "cancelled";
2883
+ environment: "environment";
2744
2884
  timeout: "timeout";
2745
2885
  "provider-auth": "provider-auth";
2746
2886
  "stale-base": "stale-base";
@@ -2955,8 +3095,8 @@ export declare const executionDocumentSchema: z.ZodObject<{
2955
3095
  gate: "gate";
2956
3096
  unknown: "unknown";
2957
3097
  review: "review";
2958
- environment: "environment";
2959
3098
  cancelled: "cancelled";
3099
+ environment: "environment";
2960
3100
  timeout: "timeout";
2961
3101
  "provider-auth": "provider-auth";
2962
3102
  "stale-base": "stale-base";
@@ -3067,8 +3207,8 @@ export declare const executionDocumentSchema: z.ZodObject<{
3067
3207
  gate: "gate";
3068
3208
  unknown: "unknown";
3069
3209
  review: "review";
3070
- environment: "environment";
3071
3210
  cancelled: "cancelled";
3211
+ environment: "environment";
3072
3212
  timeout: "timeout";
3073
3213
  "provider-auth": "provider-auth";
3074
3214
  "stale-base": "stale-base";
@@ -3341,6 +3481,34 @@ export declare const executionDocumentSchema: z.ZodObject<{
3341
3481
  }, z.core.$strict>>;
3342
3482
  coverage: z.ZodOptional<z.ZodArray<z.ZodString>>;
3343
3483
  }, z.core.$strict>>;
3484
+ artifactFiles: z.ZodOptional<z.ZodObject<{
3485
+ dir: z.ZodString;
3486
+ files: z.ZodArray<z.ZodObject<{
3487
+ path: z.ZodString;
3488
+ sha256: z.ZodString;
3489
+ bytes: z.ZodNumber;
3490
+ redacted: z.ZodOptional<z.ZodLiteral<true>>;
3491
+ }, z.core.$strict>>;
3492
+ skipped: z.ZodArray<z.ZodObject<{
3493
+ path: z.ZodString;
3494
+ reason: z.ZodEnum<{
3495
+ missing: "missing";
3496
+ symlink: "symlink";
3497
+ outside: "outside";
3498
+ "not-regular": "not-regular";
3499
+ hardlink: "hardlink";
3500
+ secret: "secret";
3501
+ extension: "extension";
3502
+ "file-limit": "file-limit";
3503
+ "total-limit": "total-limit";
3504
+ "count-limit": "count-limit";
3505
+ "scan-limit": "scan-limit";
3506
+ "copy-failed": "copy-failed";
3507
+ }>;
3508
+ detail: z.ZodOptional<z.ZodString>;
3509
+ }, z.core.$strict>>;
3510
+ skippedMore: z.ZodOptional<z.ZodNumber>;
3511
+ }, z.core.$strict>>;
3344
3512
  checks: z.ZodOptional<z.ZodString>;
3345
3513
  alreadySatisfied: z.ZodOptional<z.ZodObject<{
3346
3514
  gates: z.ZodArray<z.ZodString>;
@@ -3375,8 +3543,8 @@ export declare const executionDocumentSchema: z.ZodObject<{
3375
3543
  affected: z.ZodArray<z.ZodString>;
3376
3544
  gateIds: z.ZodArray<z.ZodString>;
3377
3545
  mode: z.ZodEnum<{
3378
- all: "all";
3379
3546
  affected: "affected";
3547
+ all: "all";
3380
3548
  }>;
3381
3549
  reason: z.ZodString;
3382
3550
  baseline: z.ZodOptional<z.ZodString>;
@@ -3393,6 +3561,34 @@ export declare const executionDocumentSchema: z.ZodObject<{
3393
3561
  path: z.ZodString;
3394
3562
  digest: z.ZodString;
3395
3563
  }, z.core.$strict>>;
3564
+ artifactFiles: z.ZodOptional<z.ZodObject<{
3565
+ dir: z.ZodString;
3566
+ files: z.ZodArray<z.ZodObject<{
3567
+ path: z.ZodString;
3568
+ sha256: z.ZodString;
3569
+ bytes: z.ZodNumber;
3570
+ redacted: z.ZodOptional<z.ZodLiteral<true>>;
3571
+ }, z.core.$strict>>;
3572
+ skipped: z.ZodArray<z.ZodObject<{
3573
+ path: z.ZodString;
3574
+ reason: z.ZodEnum<{
3575
+ missing: "missing";
3576
+ symlink: "symlink";
3577
+ outside: "outside";
3578
+ "not-regular": "not-regular";
3579
+ hardlink: "hardlink";
3580
+ secret: "secret";
3581
+ extension: "extension";
3582
+ "file-limit": "file-limit";
3583
+ "total-limit": "total-limit";
3584
+ "count-limit": "count-limit";
3585
+ "scan-limit": "scan-limit";
3586
+ "copy-failed": "copy-failed";
3587
+ }>;
3588
+ detail: z.ZodOptional<z.ZodString>;
3589
+ }, z.core.$strict>>;
3590
+ skippedMore: z.ZodOptional<z.ZodNumber>;
3591
+ }, z.core.$strict>>;
3396
3592
  durationMs: z.ZodOptional<z.ZodNumber>;
3397
3593
  }, z.core.$strict>>;
3398
3594
  token: z.ZodString;
@@ -3418,8 +3614,8 @@ export declare const executionDocumentSchema: z.ZodObject<{
3418
3614
  affected: z.ZodArray<z.ZodString>;
3419
3615
  gateIds: z.ZodArray<z.ZodString>;
3420
3616
  mode: z.ZodEnum<{
3421
- all: "all";
3422
3617
  affected: "affected";
3618
+ all: "all";
3423
3619
  }>;
3424
3620
  reason: z.ZodString;
3425
3621
  baseline: z.ZodOptional<z.ZodString>;
@@ -3436,6 +3632,34 @@ export declare const executionDocumentSchema: z.ZodObject<{
3436
3632
  path: z.ZodString;
3437
3633
  digest: z.ZodString;
3438
3634
  }, z.core.$strict>>;
3635
+ artifactFiles: z.ZodOptional<z.ZodObject<{
3636
+ dir: z.ZodString;
3637
+ files: z.ZodArray<z.ZodObject<{
3638
+ path: z.ZodString;
3639
+ sha256: z.ZodString;
3640
+ bytes: z.ZodNumber;
3641
+ redacted: z.ZodOptional<z.ZodLiteral<true>>;
3642
+ }, z.core.$strict>>;
3643
+ skipped: z.ZodArray<z.ZodObject<{
3644
+ path: z.ZodString;
3645
+ reason: z.ZodEnum<{
3646
+ missing: "missing";
3647
+ symlink: "symlink";
3648
+ outside: "outside";
3649
+ "not-regular": "not-regular";
3650
+ hardlink: "hardlink";
3651
+ secret: "secret";
3652
+ extension: "extension";
3653
+ "file-limit": "file-limit";
3654
+ "total-limit": "total-limit";
3655
+ "count-limit": "count-limit";
3656
+ "scan-limit": "scan-limit";
3657
+ "copy-failed": "copy-failed";
3658
+ }>;
3659
+ detail: z.ZodOptional<z.ZodString>;
3660
+ }, z.core.$strict>>;
3661
+ skippedMore: z.ZodOptional<z.ZodNumber>;
3662
+ }, z.core.$strict>>;
3439
3663
  durationMs: z.ZodOptional<z.ZodNumber>;
3440
3664
  }, z.core.$strict>>;
3441
3665
  token: z.ZodString;
@@ -3460,8 +3684,8 @@ export declare const executionDocumentSchema: z.ZodObject<{
3460
3684
  affected: z.ZodArray<z.ZodString>;
3461
3685
  gateIds: z.ZodArray<z.ZodString>;
3462
3686
  mode: z.ZodEnum<{
3463
- all: "all";
3464
3687
  affected: "affected";
3688
+ all: "all";
3465
3689
  }>;
3466
3690
  reason: z.ZodString;
3467
3691
  baseline: z.ZodOptional<z.ZodString>;
@@ -3478,6 +3702,34 @@ export declare const executionDocumentSchema: z.ZodObject<{
3478
3702
  path: z.ZodString;
3479
3703
  digest: z.ZodString;
3480
3704
  }, z.core.$strict>>;
3705
+ artifactFiles: z.ZodOptional<z.ZodObject<{
3706
+ dir: z.ZodString;
3707
+ files: z.ZodArray<z.ZodObject<{
3708
+ path: z.ZodString;
3709
+ sha256: z.ZodString;
3710
+ bytes: z.ZodNumber;
3711
+ redacted: z.ZodOptional<z.ZodLiteral<true>>;
3712
+ }, z.core.$strict>>;
3713
+ skipped: z.ZodArray<z.ZodObject<{
3714
+ path: z.ZodString;
3715
+ reason: z.ZodEnum<{
3716
+ missing: "missing";
3717
+ symlink: "symlink";
3718
+ outside: "outside";
3719
+ "not-regular": "not-regular";
3720
+ hardlink: "hardlink";
3721
+ secret: "secret";
3722
+ extension: "extension";
3723
+ "file-limit": "file-limit";
3724
+ "total-limit": "total-limit";
3725
+ "count-limit": "count-limit";
3726
+ "scan-limit": "scan-limit";
3727
+ "copy-failed": "copy-failed";
3728
+ }>;
3729
+ detail: z.ZodOptional<z.ZodString>;
3730
+ }, z.core.$strict>>;
3731
+ skippedMore: z.ZodOptional<z.ZodNumber>;
3732
+ }, z.core.$strict>>;
3481
3733
  durationMs: z.ZodOptional<z.ZodNumber>;
3482
3734
  }, z.core.$strict>>;
3483
3735
  token: z.ZodString;
@@ -3499,8 +3751,8 @@ export declare const executionDocumentSchema: z.ZodObject<{
3499
3751
  gate: "gate";
3500
3752
  unknown: "unknown";
3501
3753
  review: "review";
3502
- environment: "environment";
3503
3754
  cancelled: "cancelled";
3755
+ environment: "environment";
3504
3756
  timeout: "timeout";
3505
3757
  "provider-auth": "provider-auth";
3506
3758
  "stale-base": "stale-base";
@@ -3,7 +3,7 @@ import { STATE_VERSION } from "./version.js";
3
3
  import { digestSchema, gitShaSchema, idSchema, isoTimeSchema, relativePathSchema, runtimeNameSchema, trimmedText, gateScopeSchema, } from "./primitives.js";
4
4
  import { workGraphSchema, workOrderSchema } from "./work.js";
5
5
  import { contextPinSchema, contextSnapshotSchema } from "./context.js";
6
- import { deliveryStateSchema, jointActiveSchema, jointFailedSchema, jointPassedSchema, } from "./result.js";
6
+ import { deliveryStateSchema, gateArtifactFilesSchema, jointActiveSchema, jointFailedSchema, jointPassedSchema, } from "./result.js";
7
7
  import { findingStatuses, reviewRecordSchema, reviewRoundSchema } from "./review.js";
8
8
  import { contractDocumentSchema, spikeSchema } from "./checks.js";
9
9
  /**
@@ -265,6 +265,8 @@ export const evidenceRecordSchema = z.strictObject({
265
265
  .optional(),
266
266
  testsTruncated: z.boolean().optional(),
267
267
  property: propertyEvidenceSchema.optional(),
268
+ /** Копии `gate.artifacts` (нет у прежних записей и у gate без поля). */
269
+ artifactFiles: gateArtifactFilesSchema.optional(),
268
270
  /** Действующая версия проверок, под которой получено evidence. */
269
271
  checks: digestSchema.optional(),
270
272
  /**
@@ -28,16 +28,13 @@ export declare const lifecycleSchema: z.ZodObject<{
28
28
  timeoutMs: z.ZodDefault<z.ZodNumber>;
29
29
  }, z.core.$strict>>;
30
30
  }, z.core.$strict>;
31
- /**
32
- * Gate. У `test` JUnit-отчёт обязателен: exit 0 без свежего непустого
33
- * отчёта на точном SHA не принимается. `check` — проверка без testcases.
34
- */
35
31
  export declare const gateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
36
32
  kind: z.ZodLiteral<"test">;
37
33
  report: z.ZodObject<{
38
34
  type: z.ZodLiteral<"junit">;
39
35
  path: z.ZodString;
40
36
  }, z.core.$strict>;
37
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
38
  id: z.ZodString;
42
39
  command: z.ZodArray<z.ZodString>;
43
40
  timeoutMs: z.ZodDefault<z.ZodNumber>;
@@ -53,6 +50,7 @@ export declare const gateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
53
50
  type: z.ZodLiteral<"junit">;
54
51
  path: z.ZodString;
55
52
  }, z.core.$strict>>;
53
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
56
54
  id: z.ZodString;
57
55
  command: z.ZodArray<z.ZodString>;
58
56
  timeoutMs: z.ZodDefault<z.ZodNumber>;
@@ -217,6 +215,20 @@ export declare const roleBindingSchema: z.ZodObject<{
217
215
  }, z.core.$strict>>;
218
216
  requiresContract: z.ZodDefault<z.ZodBoolean>;
219
217
  }, z.core.$strict>;
218
+ /**
219
+ * Хранилище зависимостей репозитория: harness сам держит seed менеджера пакетов
220
+ * по lockfile целевой ветки и разворачивает его в каждый checkout (см.
221
+ * `verification/dependency-store.ts`). Нет поля — поведение и digest прежние.
222
+ */
223
+ export declare const dependencyStoreSchema: z.ZodObject<{
224
+ manager: z.ZodEnum<{
225
+ pnpm: "pnpm";
226
+ }>;
227
+ lockfile: z.ZodDefault<z.ZodString>;
228
+ maxBytes: z.ZodDefault<z.ZodNumber>;
229
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
230
+ }, z.core.$strict>;
231
+ export type DependencyStorePolicy = z.infer<typeof dependencyStoreSchema>;
220
232
  export declare const repositoryPolicySchema: z.ZodObject<{
221
233
  id: z.ZodString;
222
234
  roles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -323,6 +335,7 @@ export declare const repositoryPolicySchema: z.ZodObject<{
323
335
  type: z.ZodLiteral<"junit">;
324
336
  path: z.ZodString;
325
337
  }, z.core.$strict>;
338
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
326
339
  id: z.ZodString;
327
340
  command: z.ZodArray<z.ZodString>;
328
341
  timeoutMs: z.ZodDefault<z.ZodNumber>;
@@ -338,6 +351,7 @@ export declare const repositoryPolicySchema: z.ZodObject<{
338
351
  type: z.ZodLiteral<"junit">;
339
352
  path: z.ZodString;
340
353
  }, z.core.$strict>>;
354
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
341
355
  id: z.ZodString;
342
356
  command: z.ZodArray<z.ZodString>;
343
357
  timeoutMs: z.ZodDefault<z.ZodNumber>;
@@ -378,6 +392,14 @@ export declare const repositoryPolicySchema: z.ZodObject<{
378
392
  command: z.ZodArray<z.ZodString>;
379
393
  timeoutMs: z.ZodDefault<z.ZodNumber>;
380
394
  }, z.core.$strict>>>;
395
+ dependencyStore: z.ZodOptional<z.ZodObject<{
396
+ manager: z.ZodEnum<{
397
+ pnpm: "pnpm";
398
+ }>;
399
+ lockfile: z.ZodDefault<z.ZodString>;
400
+ maxBytes: z.ZodDefault<z.ZodNumber>;
401
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
402
+ }, z.core.$strict>>;
381
403
  dependencyBuild: z.ZodDefault<z.ZodArray<z.ZodObject<{
382
404
  id: z.ZodString;
383
405
  command: z.ZodArray<z.ZodString>;
@@ -575,6 +597,7 @@ export declare const executionPolicySchema: z.ZodObject<{
575
597
  type: z.ZodLiteral<"junit">;
576
598
  path: z.ZodString;
577
599
  }, z.core.$strict>;
600
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
578
601
  id: z.ZodString;
579
602
  command: z.ZodArray<z.ZodString>;
580
603
  timeoutMs: z.ZodDefault<z.ZodNumber>;
@@ -590,6 +613,7 @@ export declare const executionPolicySchema: z.ZodObject<{
590
613
  type: z.ZodLiteral<"junit">;
591
614
  path: z.ZodString;
592
615
  }, z.core.$strict>>;
616
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
593
617
  id: z.ZodString;
594
618
  command: z.ZodArray<z.ZodString>;
595
619
  timeoutMs: z.ZodDefault<z.ZodNumber>;
@@ -630,6 +654,14 @@ export declare const executionPolicySchema: z.ZodObject<{
630
654
  command: z.ZodArray<z.ZodString>;
631
655
  timeoutMs: z.ZodDefault<z.ZodNumber>;
632
656
  }, z.core.$strict>>>;
657
+ dependencyStore: z.ZodOptional<z.ZodObject<{
658
+ manager: z.ZodEnum<{
659
+ pnpm: "pnpm";
660
+ }>;
661
+ lockfile: z.ZodDefault<z.ZodString>;
662
+ maxBytes: z.ZodDefault<z.ZodNumber>;
663
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
664
+ }, z.core.$strict>>;
633
665
  dependencyBuild: z.ZodDefault<z.ZodArray<z.ZodObject<{
634
666
  id: z.ZodString;
635
667
  command: z.ZodArray<z.ZodString>;
@@ -871,8 +903,8 @@ export declare const executionPolicySchema: z.ZodObject<{
871
903
  }, z.core.$strict>>;
872
904
  }, z.core.$strict>>;
873
905
  verificationMode: z.ZodDefault<z.ZodEnum<{
874
- all: "all";
875
906
  affected: "affected";
907
+ all: "all";
876
908
  }>>;
877
909
  approvalMode: z.ZodDefault<z.ZodEnum<{
878
910
  agent: "agent";
@@ -3,6 +3,7 @@ import { POLICY_VERSION } from "./version.js";
3
3
  import { gateRefSchema, idSchema, relativePathSchema, roleIdSchema, runtimeNameSchema, targetRefSchema, vendorOf, trimmedText, } from "./primitives.js";
4
4
  import { digestOf } from "./digest.js";
5
5
  import { toolchainSchema } from "./toolchain.js";
6
+ import { gateArtifactLimits } from "./result.js";
6
7
  const envName = z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/);
7
8
  /** Переменные `HARNESS_*` и исторические `DEVCONTOUR_*` задаёт сам harness, не политика. */
8
9
  const envKey = z
@@ -40,9 +41,25 @@ const junitReport = z.strictObject({ type: z.literal('junit'), path: relativePat
40
41
  * Gate. У `test` JUnit-отчёт обязателен: exit 0 без свежего непустого
41
42
  * отчёта на точном SHA не принимается. `check` — проверка без testcases.
42
43
  */
44
+ /**
45
+ * Файлы и каталоги gate задачи, сохраняемые как evidence при любом исходе
46
+ * (например, снимки экрана визуального теста), относительно корня дерева.
47
+ * Необязательное поле без умолчания: политика без него сохраняет digest.
48
+ */
49
+ const gateArtifacts = z.array(relativePathSchema).min(1).max(gateArtifactLimits.paths).optional();
43
50
  export const gateSchema = z.discriminatedUnion('kind', [
44
- z.strictObject({ ...gateCommon, kind: z.literal('test'), report: junitReport }),
45
- z.strictObject({ ...gateCommon, kind: z.literal('check'), report: junitReport.optional() }),
51
+ z.strictObject({
52
+ ...gateCommon,
53
+ kind: z.literal('test'),
54
+ report: junitReport,
55
+ artifacts: gateArtifacts,
56
+ }),
57
+ z.strictObject({
58
+ ...gateCommon,
59
+ kind: z.literal('check'),
60
+ report: junitReport.optional(),
61
+ artifacts: gateArtifacts,
62
+ }),
46
63
  ]);
47
64
  /** Группы gates: не больше 100 групп по 100 ссылок, члены — gates или группы (`@имя`). */
48
65
  export const gateGroupsSchema = z
@@ -98,6 +115,27 @@ export const roleBindingSchema = z.strictObject({
98
115
  review: reviewRuleSchema.optional(),
99
116
  requiresContract: z.boolean().default(false),
100
117
  });
118
+ /**
119
+ * Хранилище зависимостей репозитория: harness сам держит seed менеджера пакетов
120
+ * по lockfile целевой ветки и разворачивает его в каждый checkout (см.
121
+ * `verification/dependency-store.ts`). Нет поля — поведение и digest прежние.
122
+ */
123
+ export const dependencyStoreSchema = z.strictObject({
124
+ manager: z.enum(['pnpm']),
125
+ /** Lockfile относительно корня репозитория. */
126
+ lockfile: relativePathSchema.default('pnpm-lock.yaml'),
127
+ /** Предел логического размера seeds репозитория на диске. */
128
+ maxBytes: z
129
+ .number()
130
+ .int()
131
+ .min(1024 * 1024)
132
+ .default(8 * 1024 * 1024 * 1024),
133
+ /**
134
+ * Верхний предел сборки seed вместе с ожиданием чужой сборки. Действует ещё и
135
+ * доля остатка времени фазы: хранилище не расходует время попытки до отказа.
136
+ */
137
+ timeoutMs: z.number().int().positive().max(3_600_000).default(600000),
138
+ });
101
139
  export const repositoryPolicySchema = z.strictObject({
102
140
  id: idSchema,
103
141
  /**
@@ -119,6 +157,8 @@ export const repositoryPolicySchema = z.strictObject({
119
157
  environment: environmentSchema.optional(),
120
158
  lifecycle: lifecycleSchema.optional(),
121
159
  prepare: z.array(stepSchema).default([]),
160
+ /** Необязательное поле без умолчания: политика без него сохраняет digest. */
161
+ dependencyStore: dependencyStoreSchema.optional(),
122
162
  dependencyBuild: z.array(stepSchema).default([]),
123
163
  dependencyArtifacts: z.array(relativePathSchema).default([]),
124
164
  preflight: z.array(stepSchema).default([]),