devcontour-harness 0.1.0-alpha.34 → 0.1.0-alpha.35
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/contracts.md +54 -8
- package/docs/release-notes/0.1.0-alpha.35.md +27 -0
- package/docs/upgrade.md +35 -0
- package/lib/agents/cli-adapter.d.ts +10 -1
- package/lib/agents/cli-adapter.js +38 -7
- package/lib/agents/usage.d.ts +9 -0
- package/lib/agents/usage.js +22 -1
- package/lib/contracts/cli.d.ts +49 -1
- package/lib/contracts/cli.js +1 -0
- package/lib/contracts/diagnosis.d.ts +3 -1
- package/lib/contracts/diagnosis.js +1 -0
- package/lib/contracts/errors.d.ts +3 -1
- package/lib/contracts/errors.js +2 -0
- package/lib/contracts/events.d.ts +15 -0
- package/lib/contracts/execution.d.ts +32 -1
- package/lib/contracts/execution.js +19 -0
- package/lib/contracts/failure.d.ts +7 -3
- package/lib/contracts/failure.js +6 -2
- package/lib/contracts/handoff.d.ts +9 -0
- package/lib/contracts/planning.d.ts +2 -0
- package/lib/contracts/ports.d.ts +10 -2
- package/lib/contracts/published.d.ts +28 -0
- package/lib/contracts/repair-policy.d.ts +10 -1
- package/lib/contracts/repair-policy.js +18 -0
- package/lib/contracts/report.d.ts +2 -0
- package/lib/contracts/result.d.ts +2 -0
- package/lib/control/harness.d.ts +10 -10
- package/lib/control/recovery.d.ts +1 -1
- package/lib/control/status.d.ts +8 -8
- package/lib/engine/classify.js +1 -1
- package/lib/engine/engine.d.ts +9 -7
- package/lib/engine/engine.js +3 -0
- package/lib/engine/failure.d.ts +1 -1
- package/lib/engine/failure.js +1 -1
- package/lib/engine/prompt.js +11 -1
- package/lib/engine/property-recovery.js +2 -0
- package/lib/engine/repair.js +4 -2
- package/lib/engine/reuse.js +2 -0
- package/lib/engine/runner.js +9 -0
- package/lib/explain/state.d.ts +1 -1
- package/lib/explain/state.js +10 -4
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/projections/stop.d.ts +3 -1
- package/lib/projections/stop.js +30 -2
- package/lib/report/compute.js +1 -0
- package/lib/report/document.js +1 -1
- package/lib/storage/document.d.ts +8 -6
- package/package.json +1 -1
- package/schemas/execution-document.schema.json +11 -0
- package/schemas/handoff-pack.schema.json +9 -0
- package/schemas/result-envelope.schema.json +1 -0
- package/schemas/run-event.schema.json +3 -0
- package/schemas/run-result.schema.json +1 -0
- package/schemas/stop-diagnosis.schema.json +2 -0
- package/schemas/value-report.schema.json +1 -0
package/lib/contracts/cli.d.ts
CHANGED
|
@@ -117,7 +117,7 @@ export declare const cliCommands: {
|
|
|
117
117
|
readonly required: false;
|
|
118
118
|
readonly description: "Автор графа для ревью плана; по умолчанию external";
|
|
119
119
|
}];
|
|
120
|
-
readonly refusals: ["APPROVAL_REQUIRED", "APPROVAL_STALE", "PAUSED", "CONTROLLER_BUSY", "REVISION_CONFLICT", "GATE_FAILED", "REVIEW_REJECTED", "SCOPE_VIOLATION", "BUDGET_EXHAUSTED", "BUDGET_UNKNOWN", "ATTEMPTS_EXHAUSTED"];
|
|
120
|
+
readonly refusals: ["APPROVAL_REQUIRED", "APPROVAL_STALE", "PAUSED", "CONTROLLER_BUSY", "REVISION_CONFLICT", "GATE_FAILED", "REVIEW_REJECTED", "SCOPE_VIOLATION", "BUDGET_EXHAUSTED", "BUDGET_UNKNOWN", "ATTEMPTS_EXHAUSTED", "CONTEXT_EXHAUSTED"];
|
|
121
121
|
};
|
|
122
122
|
readonly status: {
|
|
123
123
|
readonly description: "Состояние очереди, графов и поручений с причинами блокировки";
|
|
@@ -641,6 +641,7 @@ export declare const queueViewSchema: z.ZodObject<{
|
|
|
641
641
|
timeout: "timeout";
|
|
642
642
|
"provider-auth": "provider-auth";
|
|
643
643
|
stalled: "stalled";
|
|
644
|
+
"context-exhausted": "context-exhausted";
|
|
644
645
|
"stale-base": "stale-base";
|
|
645
646
|
"empty-result": "empty-result";
|
|
646
647
|
unfinished: "unfinished";
|
|
@@ -674,6 +675,7 @@ export declare const queueViewSchema: z.ZodObject<{
|
|
|
674
675
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
675
676
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
676
677
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
678
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
677
679
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
678
680
|
CANCELLED: "CANCELLED";
|
|
679
681
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -696,6 +698,7 @@ export declare const queueViewSchema: z.ZodObject<{
|
|
|
696
698
|
timeout: "timeout";
|
|
697
699
|
"provider-auth": "provider-auth";
|
|
698
700
|
stalled: "stalled";
|
|
701
|
+
"context-exhausted": "context-exhausted";
|
|
699
702
|
"stale-base": "stale-base";
|
|
700
703
|
"empty-result": "empty-result";
|
|
701
704
|
unfinished: "unfinished";
|
|
@@ -753,6 +756,7 @@ export declare const statusDataSchema: z.ZodObject<{
|
|
|
753
756
|
timeout: "timeout";
|
|
754
757
|
"provider-auth": "provider-auth";
|
|
755
758
|
stalled: "stalled";
|
|
759
|
+
"context-exhausted": "context-exhausted";
|
|
756
760
|
"stale-base": "stale-base";
|
|
757
761
|
"empty-result": "empty-result";
|
|
758
762
|
unfinished: "unfinished";
|
|
@@ -847,6 +851,7 @@ export declare const statusDataSchema: z.ZodObject<{
|
|
|
847
851
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
848
852
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
849
853
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
854
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
850
855
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
851
856
|
CANCELLED: "CANCELLED";
|
|
852
857
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -923,6 +928,7 @@ export declare const statusDataSchema: z.ZodObject<{
|
|
|
923
928
|
timeout: "timeout";
|
|
924
929
|
"provider-auth": "provider-auth";
|
|
925
930
|
stalled: "stalled";
|
|
931
|
+
"context-exhausted": "context-exhausted";
|
|
926
932
|
"stale-base": "stale-base";
|
|
927
933
|
"empty-result": "empty-result";
|
|
928
934
|
unfinished: "unfinished";
|
|
@@ -956,6 +962,7 @@ export declare const statusDataSchema: z.ZodObject<{
|
|
|
956
962
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
957
963
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
958
964
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
965
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
959
966
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
960
967
|
CANCELLED: "CANCELLED";
|
|
961
968
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -978,6 +985,7 @@ export declare const statusDataSchema: z.ZodObject<{
|
|
|
978
985
|
timeout: "timeout";
|
|
979
986
|
"provider-auth": "provider-auth";
|
|
980
987
|
stalled: "stalled";
|
|
988
|
+
"context-exhausted": "context-exhausted";
|
|
981
989
|
"stale-base": "stale-base";
|
|
982
990
|
"empty-result": "empty-result";
|
|
983
991
|
unfinished: "unfinished";
|
|
@@ -1242,6 +1250,7 @@ export declare const eventsDataSchema: z.ZodObject<{
|
|
|
1242
1250
|
timeout: "timeout";
|
|
1243
1251
|
"provider-auth": "provider-auth";
|
|
1244
1252
|
stalled: "stalled";
|
|
1253
|
+
"context-exhausted": "context-exhausted";
|
|
1245
1254
|
"stale-base": "stale-base";
|
|
1246
1255
|
"empty-result": "empty-result";
|
|
1247
1256
|
unfinished: "unfinished";
|
|
@@ -1263,6 +1272,7 @@ export declare const eventsDataSchema: z.ZodObject<{
|
|
|
1263
1272
|
timeout: "timeout";
|
|
1264
1273
|
"provider-auth": "provider-auth";
|
|
1265
1274
|
stalled: "stalled";
|
|
1275
|
+
"context-exhausted": "context-exhausted";
|
|
1266
1276
|
"stale-base": "stale-base";
|
|
1267
1277
|
"empty-result": "empty-result";
|
|
1268
1278
|
unfinished: "unfinished";
|
|
@@ -1336,6 +1346,7 @@ export declare const eventsDataSchema: z.ZodObject<{
|
|
|
1336
1346
|
timeout: "timeout";
|
|
1337
1347
|
"provider-auth": "provider-auth";
|
|
1338
1348
|
stalled: "stalled";
|
|
1349
|
+
"context-exhausted": "context-exhausted";
|
|
1339
1350
|
"stale-base": "stale-base";
|
|
1340
1351
|
"empty-result": "empty-result";
|
|
1341
1352
|
unfinished: "unfinished";
|
|
@@ -1654,6 +1665,7 @@ export declare const eventsDataSchema: z.ZodObject<{
|
|
|
1654
1665
|
timeout: "timeout";
|
|
1655
1666
|
"provider-auth": "provider-auth";
|
|
1656
1667
|
stalled: "stalled";
|
|
1668
|
+
"context-exhausted": "context-exhausted";
|
|
1657
1669
|
"stale-base": "stale-base";
|
|
1658
1670
|
"empty-result": "empty-result";
|
|
1659
1671
|
unfinished: "unfinished";
|
|
@@ -1675,6 +1687,7 @@ export declare const eventsDataSchema: z.ZodObject<{
|
|
|
1675
1687
|
timeout: "timeout";
|
|
1676
1688
|
"provider-auth": "provider-auth";
|
|
1677
1689
|
stalled: "stalled";
|
|
1690
|
+
"context-exhausted": "context-exhausted";
|
|
1678
1691
|
"stale-base": "stale-base";
|
|
1679
1692
|
"empty-result": "empty-result";
|
|
1680
1693
|
unfinished: "unfinished";
|
|
@@ -1748,6 +1761,7 @@ export declare const eventsDataSchema: z.ZodObject<{
|
|
|
1748
1761
|
timeout: "timeout";
|
|
1749
1762
|
"provider-auth": "provider-auth";
|
|
1750
1763
|
stalled: "stalled";
|
|
1764
|
+
"context-exhausted": "context-exhausted";
|
|
1751
1765
|
"stale-base": "stale-base";
|
|
1752
1766
|
"empty-result": "empty-result";
|
|
1753
1767
|
unfinished: "unfinished";
|
|
@@ -1969,6 +1983,7 @@ export declare const runDataSchema: z.ZodObject<{
|
|
|
1969
1983
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
1970
1984
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
1971
1985
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
1986
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
1972
1987
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
1973
1988
|
CANCELLED: "CANCELLED";
|
|
1974
1989
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -2029,6 +2044,7 @@ export declare const controlDataSchema: z.ZodObject<{
|
|
|
2029
2044
|
timeout: "timeout";
|
|
2030
2045
|
"provider-auth": "provider-auth";
|
|
2031
2046
|
stalled: "stalled";
|
|
2047
|
+
"context-exhausted": "context-exhausted";
|
|
2032
2048
|
"stale-base": "stale-base";
|
|
2033
2049
|
"empty-result": "empty-result";
|
|
2034
2050
|
unfinished: "unfinished";
|
|
@@ -2743,6 +2759,7 @@ export declare const explainDataSchema: z.ZodObject<{
|
|
|
2743
2759
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
2744
2760
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
2745
2761
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
2762
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
2746
2763
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
2747
2764
|
CANCELLED: "CANCELLED";
|
|
2748
2765
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -2765,6 +2782,7 @@ export declare const explainDataSchema: z.ZodObject<{
|
|
|
2765
2782
|
timeout: "timeout";
|
|
2766
2783
|
"provider-auth": "provider-auth";
|
|
2767
2784
|
stalled: "stalled";
|
|
2785
|
+
"context-exhausted": "context-exhausted";
|
|
2768
2786
|
"stale-base": "stale-base";
|
|
2769
2787
|
"empty-result": "empty-result";
|
|
2770
2788
|
unfinished: "unfinished";
|
|
@@ -2984,6 +3002,7 @@ export declare const cliDataSchemas: {
|
|
|
2984
3002
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
2985
3003
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
2986
3004
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
3005
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
2987
3006
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
2988
3007
|
CANCELLED: "CANCELLED";
|
|
2989
3008
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -3045,6 +3064,7 @@ export declare const cliDataSchemas: {
|
|
|
3045
3064
|
timeout: "timeout";
|
|
3046
3065
|
"provider-auth": "provider-auth";
|
|
3047
3066
|
stalled: "stalled";
|
|
3067
|
+
"context-exhausted": "context-exhausted";
|
|
3048
3068
|
"stale-base": "stale-base";
|
|
3049
3069
|
"empty-result": "empty-result";
|
|
3050
3070
|
unfinished: "unfinished";
|
|
@@ -3139,6 +3159,7 @@ export declare const cliDataSchemas: {
|
|
|
3139
3159
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
3140
3160
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
3141
3161
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
3162
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
3142
3163
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
3143
3164
|
CANCELLED: "CANCELLED";
|
|
3144
3165
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -3215,6 +3236,7 @@ export declare const cliDataSchemas: {
|
|
|
3215
3236
|
timeout: "timeout";
|
|
3216
3237
|
"provider-auth": "provider-auth";
|
|
3217
3238
|
stalled: "stalled";
|
|
3239
|
+
"context-exhausted": "context-exhausted";
|
|
3218
3240
|
"stale-base": "stale-base";
|
|
3219
3241
|
"empty-result": "empty-result";
|
|
3220
3242
|
unfinished: "unfinished";
|
|
@@ -3248,6 +3270,7 @@ export declare const cliDataSchemas: {
|
|
|
3248
3270
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
3249
3271
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
3250
3272
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
3273
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
3251
3274
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
3252
3275
|
CANCELLED: "CANCELLED";
|
|
3253
3276
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -3270,6 +3293,7 @@ export declare const cliDataSchemas: {
|
|
|
3270
3293
|
timeout: "timeout";
|
|
3271
3294
|
"provider-auth": "provider-auth";
|
|
3272
3295
|
stalled: "stalled";
|
|
3296
|
+
"context-exhausted": "context-exhausted";
|
|
3273
3297
|
"stale-base": "stale-base";
|
|
3274
3298
|
"empty-result": "empty-result";
|
|
3275
3299
|
unfinished: "unfinished";
|
|
@@ -3534,6 +3558,7 @@ export declare const cliDataSchemas: {
|
|
|
3534
3558
|
timeout: "timeout";
|
|
3535
3559
|
"provider-auth": "provider-auth";
|
|
3536
3560
|
stalled: "stalled";
|
|
3561
|
+
"context-exhausted": "context-exhausted";
|
|
3537
3562
|
"stale-base": "stale-base";
|
|
3538
3563
|
"empty-result": "empty-result";
|
|
3539
3564
|
unfinished: "unfinished";
|
|
@@ -3555,6 +3580,7 @@ export declare const cliDataSchemas: {
|
|
|
3555
3580
|
timeout: "timeout";
|
|
3556
3581
|
"provider-auth": "provider-auth";
|
|
3557
3582
|
stalled: "stalled";
|
|
3583
|
+
"context-exhausted": "context-exhausted";
|
|
3558
3584
|
"stale-base": "stale-base";
|
|
3559
3585
|
"empty-result": "empty-result";
|
|
3560
3586
|
unfinished: "unfinished";
|
|
@@ -3628,6 +3654,7 @@ export declare const cliDataSchemas: {
|
|
|
3628
3654
|
timeout: "timeout";
|
|
3629
3655
|
"provider-auth": "provider-auth";
|
|
3630
3656
|
stalled: "stalled";
|
|
3657
|
+
"context-exhausted": "context-exhausted";
|
|
3631
3658
|
"stale-base": "stale-base";
|
|
3632
3659
|
"empty-result": "empty-result";
|
|
3633
3660
|
unfinished: "unfinished";
|
|
@@ -3946,6 +3973,7 @@ export declare const cliDataSchemas: {
|
|
|
3946
3973
|
timeout: "timeout";
|
|
3947
3974
|
"provider-auth": "provider-auth";
|
|
3948
3975
|
stalled: "stalled";
|
|
3976
|
+
"context-exhausted": "context-exhausted";
|
|
3949
3977
|
"stale-base": "stale-base";
|
|
3950
3978
|
"empty-result": "empty-result";
|
|
3951
3979
|
unfinished: "unfinished";
|
|
@@ -3967,6 +3995,7 @@ export declare const cliDataSchemas: {
|
|
|
3967
3995
|
timeout: "timeout";
|
|
3968
3996
|
"provider-auth": "provider-auth";
|
|
3969
3997
|
stalled: "stalled";
|
|
3998
|
+
"context-exhausted": "context-exhausted";
|
|
3970
3999
|
"stale-base": "stale-base";
|
|
3971
4000
|
"empty-result": "empty-result";
|
|
3972
4001
|
unfinished: "unfinished";
|
|
@@ -4040,6 +4069,7 @@ export declare const cliDataSchemas: {
|
|
|
4040
4069
|
timeout: "timeout";
|
|
4041
4070
|
"provider-auth": "provider-auth";
|
|
4042
4071
|
stalled: "stalled";
|
|
4072
|
+
"context-exhausted": "context-exhausted";
|
|
4043
4073
|
"stale-base": "stale-base";
|
|
4044
4074
|
"empty-result": "empty-result";
|
|
4045
4075
|
unfinished: "unfinished";
|
|
@@ -4233,6 +4263,7 @@ export declare const cliDataSchemas: {
|
|
|
4233
4263
|
timeout: "timeout";
|
|
4234
4264
|
"provider-auth": "provider-auth";
|
|
4235
4265
|
stalled: "stalled";
|
|
4266
|
+
"context-exhausted": "context-exhausted";
|
|
4236
4267
|
"stale-base": "stale-base";
|
|
4237
4268
|
"empty-result": "empty-result";
|
|
4238
4269
|
unfinished: "unfinished";
|
|
@@ -4289,6 +4320,7 @@ export declare const cliDataSchemas: {
|
|
|
4289
4320
|
timeout: "timeout";
|
|
4290
4321
|
"provider-auth": "provider-auth";
|
|
4291
4322
|
stalled: "stalled";
|
|
4323
|
+
"context-exhausted": "context-exhausted";
|
|
4292
4324
|
"stale-base": "stale-base";
|
|
4293
4325
|
"empty-result": "empty-result";
|
|
4294
4326
|
unfinished: "unfinished";
|
|
@@ -4573,6 +4605,7 @@ export declare const cliDataSchemas: {
|
|
|
4573
4605
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
4574
4606
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
4575
4607
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
4608
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
4576
4609
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
4577
4610
|
CANCELLED: "CANCELLED";
|
|
4578
4611
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -4995,6 +5028,7 @@ export declare const cliDataSchemas: {
|
|
|
4995
5028
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
4996
5029
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
4997
5030
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
5031
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
4998
5032
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
4999
5033
|
CANCELLED: "CANCELLED";
|
|
5000
5034
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -5646,6 +5680,7 @@ export declare const cliDataSchemas: {
|
|
|
5646
5680
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
5647
5681
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
5648
5682
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
5683
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
5649
5684
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
5650
5685
|
CANCELLED: "CANCELLED";
|
|
5651
5686
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -5668,6 +5703,7 @@ export declare const cliDataSchemas: {
|
|
|
5668
5703
|
timeout: "timeout";
|
|
5669
5704
|
"provider-auth": "provider-auth";
|
|
5670
5705
|
stalled: "stalled";
|
|
5706
|
+
"context-exhausted": "context-exhausted";
|
|
5671
5707
|
"stale-base": "stale-base";
|
|
5672
5708
|
"empty-result": "empty-result";
|
|
5673
5709
|
unfinished: "unfinished";
|
|
@@ -5983,6 +6019,7 @@ export declare const cliDataSchemas: {
|
|
|
5983
6019
|
timeout: "timeout";
|
|
5984
6020
|
"provider-auth": "provider-auth";
|
|
5985
6021
|
stalled: "stalled";
|
|
6022
|
+
"context-exhausted": "context-exhausted";
|
|
5986
6023
|
"stale-base": "stale-base";
|
|
5987
6024
|
"empty-result": "empty-result";
|
|
5988
6025
|
unfinished: "unfinished";
|
|
@@ -6374,6 +6411,7 @@ export declare const cliDataSchemas: {
|
|
|
6374
6411
|
timeout: "timeout";
|
|
6375
6412
|
"provider-auth": "provider-auth";
|
|
6376
6413
|
stalled: "stalled";
|
|
6414
|
+
"context-exhausted": "context-exhausted";
|
|
6377
6415
|
"stale-base": "stale-base";
|
|
6378
6416
|
"empty-result": "empty-result";
|
|
6379
6417
|
unfinished: "unfinished";
|
|
@@ -6408,6 +6446,7 @@ export declare const cliDataSchemas: {
|
|
|
6408
6446
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
6409
6447
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
6410
6448
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
6449
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
6411
6450
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
6412
6451
|
CANCELLED: "CANCELLED";
|
|
6413
6452
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -6528,6 +6567,7 @@ export declare const cliDataSchemas: {
|
|
|
6528
6567
|
timeout: "timeout";
|
|
6529
6568
|
"provider-auth": "provider-auth";
|
|
6530
6569
|
stalled: "stalled";
|
|
6570
|
+
"context-exhausted": "context-exhausted";
|
|
6531
6571
|
"stale-base": "stale-base";
|
|
6532
6572
|
"empty-result": "empty-result";
|
|
6533
6573
|
unfinished: "unfinished";
|
|
@@ -6573,6 +6613,7 @@ export declare const cliDataSchemas: {
|
|
|
6573
6613
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
6574
6614
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
6575
6615
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
6616
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
6576
6617
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
6577
6618
|
CANCELLED: "CANCELLED";
|
|
6578
6619
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -6661,6 +6702,7 @@ export declare const cliDataSchemas: {
|
|
|
6661
6702
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
6662
6703
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
6663
6704
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
6705
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
6664
6706
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
6665
6707
|
CANCELLED: "CANCELLED";
|
|
6666
6708
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -6683,6 +6725,7 @@ export declare const cliDataSchemas: {
|
|
|
6683
6725
|
timeout: "timeout";
|
|
6684
6726
|
"provider-auth": "provider-auth";
|
|
6685
6727
|
stalled: "stalled";
|
|
6728
|
+
"context-exhausted": "context-exhausted";
|
|
6686
6729
|
"stale-base": "stale-base";
|
|
6687
6730
|
"empty-result": "empty-result";
|
|
6688
6731
|
unfinished: "unfinished";
|
|
@@ -6784,6 +6827,7 @@ export declare const cliDataSchemas: {
|
|
|
6784
6827
|
timeout: "timeout";
|
|
6785
6828
|
"provider-auth": "provider-auth";
|
|
6786
6829
|
stalled: "stalled";
|
|
6830
|
+
"context-exhausted": "context-exhausted";
|
|
6787
6831
|
"stale-base": "stale-base";
|
|
6788
6832
|
"empty-result": "empty-result";
|
|
6789
6833
|
unfinished: "unfinished";
|
|
@@ -6817,6 +6861,7 @@ export declare const cliDataSchemas: {
|
|
|
6817
6861
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
6818
6862
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
6819
6863
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
6864
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
6820
6865
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
6821
6866
|
CANCELLED: "CANCELLED";
|
|
6822
6867
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -6940,6 +6985,7 @@ export declare const cliDataSchemas: {
|
|
|
6940
6985
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
6941
6986
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
6942
6987
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
6988
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
6943
6989
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
6944
6990
|
CANCELLED: "CANCELLED";
|
|
6945
6991
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -7043,6 +7089,7 @@ export declare const cliDataSchemas: {
|
|
|
7043
7089
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
7044
7090
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
7045
7091
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
7092
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
7046
7093
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
7047
7094
|
CANCELLED: "CANCELLED";
|
|
7048
7095
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -7376,6 +7423,7 @@ export declare const cliErrorSchema: z.ZodObject<{
|
|
|
7376
7423
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
7377
7424
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
7378
7425
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
7426
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
7379
7427
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
7380
7428
|
CANCELLED: "CANCELLED";
|
|
7381
7429
|
NOT_FOUND: "NOT_FOUND";
|
package/lib/contracts/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const diagnosisActors: readonly ["controller", "lead", "user"];
|
|
3
3
|
export declare const diagnosisActions: readonly ["none", "wait", "review-plan", "retry", "diagnose-failure", "reset-attempts", "raise-budget", "replan-dependents", "recovery-decision", "user-decision", "resume-queue", "fix-environment", "fix-access"];
|
|
4
|
-
export declare const diagnosisCauses: readonly ["provider-auth", "environment", "timeout", "stalled", "stale-base", "empty-result", "unfinished", "scope-violation", "gate", "review", "review-protocol", "merge", "cancelled", "budget", "needs-lead", "unknown", "runtime-missing", "controller-busy", "operator-pause", "approval-required", "not-ready"];
|
|
4
|
+
export declare const diagnosisCauses: readonly ["provider-auth", "environment", "timeout", "stalled", "context-exhausted", "stale-base", "empty-result", "unfinished", "scope-violation", "gate", "review", "review-protocol", "merge", "cancelled", "budget", "needs-lead", "unknown", "runtime-missing", "controller-busy", "operator-pause", "approval-required", "not-ready"];
|
|
5
5
|
export declare const diagnosisPhases: readonly ["preflight", "claim", "implementation", "gates", "review", "integration", "delivery"];
|
|
6
6
|
/** Объяснение остановки: код, причина, фаза, кто действует и что допустимо. */
|
|
7
7
|
export declare const stopDiagnosisSchema: z.ZodObject<{
|
|
@@ -29,6 +29,7 @@ export declare const stopDiagnosisSchema: z.ZodObject<{
|
|
|
29
29
|
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
30
30
|
BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
|
|
31
31
|
ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
|
|
32
|
+
CONTEXT_EXHAUSTED: "CONTEXT_EXHAUSTED";
|
|
32
33
|
REVISION_CONFLICT: "REVISION_CONFLICT";
|
|
33
34
|
CANCELLED: "CANCELLED";
|
|
34
35
|
NOT_FOUND: "NOT_FOUND";
|
|
@@ -51,6 +52,7 @@ export declare const stopDiagnosisSchema: z.ZodObject<{
|
|
|
51
52
|
timeout: "timeout";
|
|
52
53
|
"provider-auth": "provider-auth";
|
|
53
54
|
stalled: "stalled";
|
|
55
|
+
"context-exhausted": "context-exhausted";
|
|
54
56
|
"stale-base": "stale-base";
|
|
55
57
|
"empty-result": "empty-result";
|
|
56
58
|
unfinished: "unfinished";
|
|
@@ -37,6 +37,8 @@ export declare const errorCodes: {
|
|
|
37
37
|
readonly BUDGET_EXHAUSTED: "refused";
|
|
38
38
|
readonly BUDGET_UNKNOWN: "refused";
|
|
39
39
|
readonly ATTEMPTS_EXHAUSTED: "refused";
|
|
40
|
+
/** Задача или её контекст не помещаются в окно контекста модели (`context-exhausted`). */
|
|
41
|
+
readonly CONTEXT_EXHAUSTED: "refused";
|
|
40
42
|
readonly REVISION_CONFLICT: "refused";
|
|
41
43
|
readonly CANCELLED: "refused";
|
|
42
44
|
readonly NOT_FOUND: "refused";
|
|
@@ -67,7 +69,7 @@ export declare class HarnessError extends Error {
|
|
|
67
69
|
readonly class: ErrorClass;
|
|
68
70
|
constructor(code: ErrorCode, message: string, issues?: ErrorIssue[]);
|
|
69
71
|
toJSON(): {
|
|
70
|
-
code: "INVALID_INPUT" | "UNSUPPORTED_COMMAND" | "UNSUPPORTED_VERSION" | "GRAPH_CYCLE" | "GRAPH_UNKNOWN_DEPENDENCY" | "GRAPH_DUPLICATE_ID" | "GATE_UNKNOWN" | "GATE_GROUP_CYCLE" | "REVIEWER_SAME_VENDOR" | "REVIEWER_MISSING" | "RESPONSE_TOO_LARGE" | "APPROVAL_STALE" | "APPROVAL_REQUIRED" | "LEASE_STALE" | "CONTROLLER_BUSY" | "PAUSED" | "NOT_READY" | "SCOPE_VIOLATION" | "GATE_FAILED" | "REVIEW_REJECTED" | "BUDGET_EXHAUSTED" | "BUDGET_UNKNOWN" | "ATTEMPTS_EXHAUSTED" | "REVISION_CONFLICT" | "CANCELLED" | "NOT_FOUND" | "PATH_CONFLICT" | "STATE_VERSION_UNSUPPORTED" | "RUNTIME_UNAVAILABLE" | "REVIEW_PROTOCOL_INVALID" | "SANDBOX_UNAVAILABLE" | "GIT_FAILED" | "STORAGE_FAILED" | "DELIVERY_FAILED" | "INTERNAL";
|
|
72
|
+
code: "INVALID_INPUT" | "UNSUPPORTED_COMMAND" | "UNSUPPORTED_VERSION" | "GRAPH_CYCLE" | "GRAPH_UNKNOWN_DEPENDENCY" | "GRAPH_DUPLICATE_ID" | "GATE_UNKNOWN" | "GATE_GROUP_CYCLE" | "REVIEWER_SAME_VENDOR" | "REVIEWER_MISSING" | "RESPONSE_TOO_LARGE" | "APPROVAL_STALE" | "APPROVAL_REQUIRED" | "LEASE_STALE" | "CONTROLLER_BUSY" | "PAUSED" | "NOT_READY" | "SCOPE_VIOLATION" | "GATE_FAILED" | "REVIEW_REJECTED" | "BUDGET_EXHAUSTED" | "BUDGET_UNKNOWN" | "ATTEMPTS_EXHAUSTED" | "CONTEXT_EXHAUSTED" | "REVISION_CONFLICT" | "CANCELLED" | "NOT_FOUND" | "PATH_CONFLICT" | "STATE_VERSION_UNSUPPORTED" | "RUNTIME_UNAVAILABLE" | "REVIEW_PROTOCOL_INVALID" | "SANDBOX_UNAVAILABLE" | "GIT_FAILED" | "STORAGE_FAILED" | "DELIVERY_FAILED" | "INTERNAL";
|
|
71
73
|
class: "input" | "refused" | "infrastructure";
|
|
72
74
|
message: string;
|
|
73
75
|
issues: ErrorIssue[];
|
package/lib/contracts/errors.js
CHANGED
|
@@ -36,6 +36,8 @@ export const errorCodes = {
|
|
|
36
36
|
BUDGET_EXHAUSTED: 'refused',
|
|
37
37
|
BUDGET_UNKNOWN: 'refused',
|
|
38
38
|
ATTEMPTS_EXHAUSTED: 'refused',
|
|
39
|
+
/** Задача или её контекст не помещаются в окно контекста модели (`context-exhausted`). */
|
|
40
|
+
CONTEXT_EXHAUSTED: 'refused',
|
|
39
41
|
REVISION_CONFLICT: 'refused',
|
|
40
42
|
CANCELLED: 'refused',
|
|
41
43
|
NOT_FOUND: 'refused',
|
|
@@ -213,6 +213,7 @@ export declare const eventPayloads: {
|
|
|
213
213
|
timeout: "timeout";
|
|
214
214
|
"provider-auth": "provider-auth";
|
|
215
215
|
stalled: "stalled";
|
|
216
|
+
"context-exhausted": "context-exhausted";
|
|
216
217
|
"stale-base": "stale-base";
|
|
217
218
|
"empty-result": "empty-result";
|
|
218
219
|
unfinished: "unfinished";
|
|
@@ -240,6 +241,7 @@ export declare const eventPayloads: {
|
|
|
240
241
|
timeout: "timeout";
|
|
241
242
|
"provider-auth": "provider-auth";
|
|
242
243
|
stalled: "stalled";
|
|
244
|
+
"context-exhausted": "context-exhausted";
|
|
243
245
|
"stale-base": "stale-base";
|
|
244
246
|
"empty-result": "empty-result";
|
|
245
247
|
unfinished: "unfinished";
|
|
@@ -331,6 +333,7 @@ export declare const eventPayloads: {
|
|
|
331
333
|
timeout: "timeout";
|
|
332
334
|
"provider-auth": "provider-auth";
|
|
333
335
|
stalled: "stalled";
|
|
336
|
+
"context-exhausted": "context-exhausted";
|
|
334
337
|
"stale-base": "stale-base";
|
|
335
338
|
"empty-result": "empty-result";
|
|
336
339
|
unfinished: "unfinished";
|
|
@@ -701,6 +704,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
701
704
|
timeout: "timeout";
|
|
702
705
|
"provider-auth": "provider-auth";
|
|
703
706
|
stalled: "stalled";
|
|
707
|
+
"context-exhausted": "context-exhausted";
|
|
704
708
|
"stale-base": "stale-base";
|
|
705
709
|
"empty-result": "empty-result";
|
|
706
710
|
unfinished: "unfinished";
|
|
@@ -722,6 +726,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
722
726
|
timeout: "timeout";
|
|
723
727
|
"provider-auth": "provider-auth";
|
|
724
728
|
stalled: "stalled";
|
|
729
|
+
"context-exhausted": "context-exhausted";
|
|
725
730
|
"stale-base": "stale-base";
|
|
726
731
|
"empty-result": "empty-result";
|
|
727
732
|
unfinished: "unfinished";
|
|
@@ -795,6 +800,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
795
800
|
timeout: "timeout";
|
|
796
801
|
"provider-auth": "provider-auth";
|
|
797
802
|
stalled: "stalled";
|
|
803
|
+
"context-exhausted": "context-exhausted";
|
|
798
804
|
"stale-base": "stale-base";
|
|
799
805
|
"empty-result": "empty-result";
|
|
800
806
|
unfinished: "unfinished";
|
|
@@ -1113,6 +1119,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1113
1119
|
timeout: "timeout";
|
|
1114
1120
|
"provider-auth": "provider-auth";
|
|
1115
1121
|
stalled: "stalled";
|
|
1122
|
+
"context-exhausted": "context-exhausted";
|
|
1116
1123
|
"stale-base": "stale-base";
|
|
1117
1124
|
"empty-result": "empty-result";
|
|
1118
1125
|
unfinished: "unfinished";
|
|
@@ -1134,6 +1141,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1134
1141
|
timeout: "timeout";
|
|
1135
1142
|
"provider-auth": "provider-auth";
|
|
1136
1143
|
stalled: "stalled";
|
|
1144
|
+
"context-exhausted": "context-exhausted";
|
|
1137
1145
|
"stale-base": "stale-base";
|
|
1138
1146
|
"empty-result": "empty-result";
|
|
1139
1147
|
unfinished: "unfinished";
|
|
@@ -1207,6 +1215,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1207
1215
|
timeout: "timeout";
|
|
1208
1216
|
"provider-auth": "provider-auth";
|
|
1209
1217
|
stalled: "stalled";
|
|
1218
|
+
"context-exhausted": "context-exhausted";
|
|
1210
1219
|
"stale-base": "stale-base";
|
|
1211
1220
|
"empty-result": "empty-result";
|
|
1212
1221
|
unfinished: "unfinished";
|
|
@@ -1555,6 +1564,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1555
1564
|
timeout: "timeout";
|
|
1556
1565
|
"provider-auth": "provider-auth";
|
|
1557
1566
|
stalled: "stalled";
|
|
1567
|
+
"context-exhausted": "context-exhausted";
|
|
1558
1568
|
"stale-base": "stale-base";
|
|
1559
1569
|
"empty-result": "empty-result";
|
|
1560
1570
|
unfinished: "unfinished";
|
|
@@ -1576,6 +1586,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1576
1586
|
timeout: "timeout";
|
|
1577
1587
|
"provider-auth": "provider-auth";
|
|
1578
1588
|
stalled: "stalled";
|
|
1589
|
+
"context-exhausted": "context-exhausted";
|
|
1579
1590
|
"stale-base": "stale-base";
|
|
1580
1591
|
"empty-result": "empty-result";
|
|
1581
1592
|
unfinished: "unfinished";
|
|
@@ -1649,6 +1660,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1649
1660
|
timeout: "timeout";
|
|
1650
1661
|
"provider-auth": "provider-auth";
|
|
1651
1662
|
stalled: "stalled";
|
|
1663
|
+
"context-exhausted": "context-exhausted";
|
|
1652
1664
|
"stale-base": "stale-base";
|
|
1653
1665
|
"empty-result": "empty-result";
|
|
1654
1666
|
unfinished: "unfinished";
|
|
@@ -1967,6 +1979,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1967
1979
|
timeout: "timeout";
|
|
1968
1980
|
"provider-auth": "provider-auth";
|
|
1969
1981
|
stalled: "stalled";
|
|
1982
|
+
"context-exhausted": "context-exhausted";
|
|
1970
1983
|
"stale-base": "stale-base";
|
|
1971
1984
|
"empty-result": "empty-result";
|
|
1972
1985
|
unfinished: "unfinished";
|
|
@@ -1988,6 +2001,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1988
2001
|
timeout: "timeout";
|
|
1989
2002
|
"provider-auth": "provider-auth";
|
|
1990
2003
|
stalled: "stalled";
|
|
2004
|
+
"context-exhausted": "context-exhausted";
|
|
1991
2005
|
"stale-base": "stale-base";
|
|
1992
2006
|
"empty-result": "empty-result";
|
|
1993
2007
|
unfinished: "unfinished";
|
|
@@ -2061,6 +2075,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2061
2075
|
timeout: "timeout";
|
|
2062
2076
|
"provider-auth": "provider-auth";
|
|
2063
2077
|
stalled: "stalled";
|
|
2078
|
+
"context-exhausted": "context-exhausted";
|
|
2064
2079
|
"stale-base": "stale-base";
|
|
2065
2080
|
"empty-result": "empty-result";
|
|
2066
2081
|
unfinished: "unfinished";
|