devcontour-harness 0.1.0-alpha.27 → 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.
- package/README.md +8 -2
- package/docs/compatibility.md +1 -0
- package/docs/contracts.md +33 -0
- package/docs/release-notes/0.1.0-alpha.28.md +37 -0
- package/docs/upgrade.md +12 -0
- package/lib/contracts/cli.d.ts +25 -21
- package/lib/contracts/diagnosis.d.ts +1 -1
- package/lib/contracts/events.d.ts +6 -6
- package/lib/contracts/execution.d.ts +268 -16
- package/lib/contracts/execution.js +3 -1
- package/lib/contracts/policy.d.ts +7 -5
- package/lib/contracts/policy.js +19 -2
- package/lib/contracts/profiles.d.ts +2 -0
- package/lib/contracts/published.d.ts +218 -20
- package/lib/contracts/result.d.ts +268 -12
- package/lib/contracts/result.js +66 -0
- package/lib/control/harness.d.ts +52 -7
- package/lib/control/recovery.d.ts +1 -1
- package/lib/engine/engine.d.ts +117 -12
- package/lib/engine/joint-runner.d.ts +96 -6
- package/lib/engine/joint-runner.js +13 -0
- package/lib/profiles/resolve.d.ts +2 -0
- package/lib/storage/document.d.ts +132 -12
- package/lib/verification/gate-artifacts.d.ts +34 -0
- package/lib/verification/gate-artifacts.js +303 -0
- package/lib/verification/gates.js +15 -0
- package/lib/verification/joint.d.ts +48 -3
- package/package.json +1 -1
- package/schemas/execution-document.schema.json +372 -0
- package/schemas/execution-policy.schema.json +22 -0
- 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>;
|
|
@@ -337,6 +335,7 @@ export declare const repositoryPolicySchema: z.ZodObject<{
|
|
|
337
335
|
type: z.ZodLiteral<"junit">;
|
|
338
336
|
path: z.ZodString;
|
|
339
337
|
}, z.core.$strict>;
|
|
338
|
+
artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
340
339
|
id: z.ZodString;
|
|
341
340
|
command: z.ZodArray<z.ZodString>;
|
|
342
341
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
@@ -352,6 +351,7 @@ export declare const repositoryPolicySchema: z.ZodObject<{
|
|
|
352
351
|
type: z.ZodLiteral<"junit">;
|
|
353
352
|
path: z.ZodString;
|
|
354
353
|
}, z.core.$strict>>;
|
|
354
|
+
artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
355
355
|
id: z.ZodString;
|
|
356
356
|
command: z.ZodArray<z.ZodString>;
|
|
357
357
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
@@ -597,6 +597,7 @@ export declare const executionPolicySchema: z.ZodObject<{
|
|
|
597
597
|
type: z.ZodLiteral<"junit">;
|
|
598
598
|
path: z.ZodString;
|
|
599
599
|
}, z.core.$strict>;
|
|
600
|
+
artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
600
601
|
id: z.ZodString;
|
|
601
602
|
command: z.ZodArray<z.ZodString>;
|
|
602
603
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
@@ -612,6 +613,7 @@ export declare const executionPolicySchema: z.ZodObject<{
|
|
|
612
613
|
type: z.ZodLiteral<"junit">;
|
|
613
614
|
path: z.ZodString;
|
|
614
615
|
}, z.core.$strict>>;
|
|
616
|
+
artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
615
617
|
id: z.ZodString;
|
|
616
618
|
command: z.ZodArray<z.ZodString>;
|
|
617
619
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
@@ -901,8 +903,8 @@ export declare const executionPolicySchema: z.ZodObject<{
|
|
|
901
903
|
}, z.core.$strict>>;
|
|
902
904
|
}, z.core.$strict>>;
|
|
903
905
|
verificationMode: z.ZodDefault<z.ZodEnum<{
|
|
904
|
-
all: "all";
|
|
905
906
|
affected: "affected";
|
|
907
|
+
all: "all";
|
|
906
908
|
}>>;
|
|
907
909
|
approvalMode: z.ZodDefault<z.ZodEnum<{
|
|
908
910
|
agent: "agent";
|
package/lib/contracts/policy.js
CHANGED
|
@@ -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({
|
|
45
|
-
|
|
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
|
|
@@ -222,6 +222,7 @@ export declare const resolvedProfileSchema: z.ZodObject<{
|
|
|
222
222
|
type: z.ZodLiteral<"junit">;
|
|
223
223
|
path: z.ZodString;
|
|
224
224
|
}, z.core.$strict>;
|
|
225
|
+
artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
225
226
|
id: z.ZodString;
|
|
226
227
|
command: z.ZodArray<z.ZodString>;
|
|
227
228
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
@@ -237,6 +238,7 @@ export declare const resolvedProfileSchema: z.ZodObject<{
|
|
|
237
238
|
type: z.ZodLiteral<"junit">;
|
|
238
239
|
path: z.ZodString;
|
|
239
240
|
}, z.core.$strict>>;
|
|
241
|
+
artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
240
242
|
id: z.ZodString;
|
|
241
243
|
command: z.ZodArray<z.ZodString>;
|
|
242
244
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|