devcontour-harness 0.1.0-alpha.35 → 0.1.0-alpha.42

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 (129) hide show
  1. package/README.md +56 -2
  2. package/docs/architecture.md +28 -4
  3. package/docs/contracts.md +294 -51
  4. package/docs/release-notes/0.1.0-alpha.36.md +26 -0
  5. package/docs/release-notes/0.1.0-alpha.37.md +40 -0
  6. package/docs/release-notes/0.1.0-alpha.38.md +31 -0
  7. package/docs/release-notes/0.1.0-alpha.39.md +38 -0
  8. package/docs/release-notes/0.1.0-alpha.40.md +27 -0
  9. package/docs/release-notes/0.1.0-alpha.41.md +49 -0
  10. package/docs/release-notes/0.1.0-alpha.42.md +44 -0
  11. package/docs/standalone.md +20 -0
  12. package/docs/toolchains.md +57 -2
  13. package/docs/upgrade.md +240 -0
  14. package/lib/agents/review-probe.d.ts +3 -1
  15. package/lib/agents/review-probe.js +8 -4
  16. package/lib/agents/schemas.d.ts +84 -2
  17. package/lib/agents/schemas.js +49 -1
  18. package/lib/cli.js +149 -1
  19. package/lib/contracts/cli.d.ts +1495 -170
  20. package/lib/contracts/cli.js +232 -2
  21. package/lib/contracts/diagnosis.d.ts +8 -4
  22. package/lib/contracts/diagnosis.js +3 -0
  23. package/lib/contracts/errors.d.ts +7 -1
  24. package/lib/contracts/errors.js +6 -0
  25. package/lib/contracts/events.d.ts +453 -60
  26. package/lib/contracts/events.js +79 -0
  27. package/lib/contracts/execution.d.ts +270 -50
  28. package/lib/contracts/execution.js +45 -3
  29. package/lib/contracts/failure.d.ts +14 -1
  30. package/lib/contracts/failure.js +9 -1
  31. package/lib/contracts/handoff.d.ts +70 -20
  32. package/lib/contracts/handoff.js +42 -1
  33. package/lib/contracts/index.d.ts +1 -0
  34. package/lib/contracts/index.js +1 -0
  35. package/lib/contracts/input-state.d.ts +13 -0
  36. package/lib/contracts/input-state.js +32 -0
  37. package/lib/contracts/input.d.ts +442 -0
  38. package/lib/contracts/input.js +321 -0
  39. package/lib/contracts/planning.d.ts +2 -0
  40. package/lib/contracts/policy.d.ts +36 -2
  41. package/lib/contracts/policy.js +61 -2
  42. package/lib/contracts/ports.d.ts +54 -0
  43. package/lib/contracts/project.d.ts +127 -0
  44. package/lib/contracts/project.js +99 -0
  45. package/lib/contracts/published.d.ts +604 -92
  46. package/lib/contracts/published.js +4 -1
  47. package/lib/contracts/repair-policy.d.ts +20 -0
  48. package/lib/contracts/repair-policy.js +34 -0
  49. package/lib/contracts/report.d.ts +53 -21
  50. package/lib/contracts/report.js +33 -2
  51. package/lib/contracts/result.d.ts +26 -24
  52. package/lib/contracts/review.d.ts +47 -8
  53. package/lib/contracts/review.js +21 -1
  54. package/lib/control/harness.d.ts +2555 -51
  55. package/lib/control/harness.js +112 -6
  56. package/lib/control/recovery.d.ts +2 -2
  57. package/lib/control/report.js +1 -0
  58. package/lib/control/status.d.ts +30 -22
  59. package/lib/control/status.js +11 -1
  60. package/lib/control/workflow.d.ts +8 -8
  61. package/lib/engine/budget.d.ts +86 -3
  62. package/lib/engine/budget.js +45 -10
  63. package/lib/engine/engine.d.ts +3091 -85
  64. package/lib/engine/engine.js +1229 -106
  65. package/lib/engine/input-policy.d.ts +68 -0
  66. package/lib/engine/input-policy.js +285 -0
  67. package/lib/engine/input-requests.d.ts +64 -0
  68. package/lib/engine/input-requests.js +187 -0
  69. package/lib/engine/joint-runner.js +2 -2
  70. package/lib/engine/measured.d.ts +6 -1
  71. package/lib/engine/measured.js +12 -1
  72. package/lib/engine/prompt.d.ts +4 -2
  73. package/lib/engine/prompt.js +3 -1
  74. package/lib/engine/property-recovery.js +2 -0
  75. package/lib/engine/repair.d.ts +2 -0
  76. package/lib/engine/repair.js +10 -3
  77. package/lib/engine/runner.d.ts +44 -4
  78. package/lib/engine/runner.js +347 -35
  79. package/lib/environment/isolation.d.ts +41 -1
  80. package/lib/environment/isolation.js +167 -5
  81. package/lib/environment/lifecycle.d.ts +54 -2
  82. package/lib/environment/lifecycle.js +96 -4
  83. package/lib/explain/state.d.ts +16 -2
  84. package/lib/explain/state.js +254 -77
  85. package/lib/handoff/markdown.js +10 -0
  86. package/lib/handoff/pack.js +42 -1
  87. package/lib/index.d.ts +10 -0
  88. package/lib/index.js +10 -0
  89. package/lib/init/inspect.d.ts +34 -0
  90. package/lib/init/inspect.js +292 -0
  91. package/lib/init/project.js +14 -31
  92. package/lib/integrations/connector/commands.d.ts +12 -12
  93. package/lib/integrations/connector/config.d.ts +4 -4
  94. package/lib/integrations/connector/delivery.d.ts +1 -1
  95. package/lib/integrations/relay-v2/protocol.d.ts +4 -4
  96. package/lib/profiles/resolve.d.ts +2 -1
  97. package/lib/projections/enums.d.ts +1 -1
  98. package/lib/projections/enums.js +4 -0
  99. package/lib/projections/index.d.ts +1 -0
  100. package/lib/projections/index.js +1 -0
  101. package/lib/projections/input.d.ts +17 -0
  102. package/lib/projections/input.js +28 -0
  103. package/lib/projections/stop.d.ts +40 -1
  104. package/lib/projections/stop.js +87 -4
  105. package/lib/report/compute.d.ts +4 -1
  106. package/lib/report/compute.js +41 -6
  107. package/lib/report/document.js +3 -2
  108. package/lib/storage/document.d.ts +66 -28
  109. package/lib/testing/index.d.ts +1 -1
  110. package/lib/testing/index.js +1 -1
  111. package/lib/testing/store-contract.d.ts +8 -1
  112. package/lib/testing/store-contract.js +194 -1
  113. package/lib/verification/confirm.d.ts +3 -3
  114. package/lib/verification/confirm.js +6 -4
  115. package/lib/verification/corpus.d.ts +9 -9
  116. package/lib/verification/gates-at.js +3 -1
  117. package/lib/verification/gates.d.ts +154 -1
  118. package/lib/verification/gates.js +378 -11
  119. package/package.json +1 -1
  120. package/schemas/execution-document.schema.json +130 -0
  121. package/schemas/execution-policy.schema.json +31 -0
  122. package/schemas/handoff-pack.schema.json +146 -4
  123. package/schemas/input-request.schema.json +665 -0
  124. package/schemas/project-facts.schema.json +393 -0
  125. package/schemas/result-envelope.schema.json +1 -0
  126. package/schemas/run-event.schema.json +625 -0
  127. package/schemas/run-result.schema.json +1 -0
  128. package/schemas/stop-diagnosis.schema.json +5 -1
  129. package/schemas/value-report.schema.json +78 -7
@@ -733,6 +733,9 @@
733
733
  ],
734
734
  "additionalProperties": false
735
735
  },
736
+ "writerDependencies": {
737
+ "type": "boolean"
738
+ },
736
739
  "dependencyBuild": {
737
740
  "default": [],
738
741
  "type": "array",
@@ -2039,6 +2042,11 @@
2039
2042
  "minimum": 0,
2040
2043
  "maximum": 2
2041
2044
  },
2045
+ "gateTimeoutFloorMs": {
2046
+ "type": "integer",
2047
+ "minimum": 1000,
2048
+ "maximum": 600000
2049
+ },
2042
2050
  "stallSweep": {
2043
2051
  "type": "object",
2044
2052
  "properties": {
@@ -2071,6 +2079,29 @@
2071
2079
  },
2072
2080
  "additionalProperties": false
2073
2081
  },
2082
+ "inputPolicy": {
2083
+ "type": "object",
2084
+ "properties": {
2085
+ "threshold": {
2086
+ "default": 7,
2087
+ "type": "integer",
2088
+ "minimum": 1,
2089
+ "maximum": 11
2090
+ },
2091
+ "criticalPaths": {
2092
+ "default": [],
2093
+ "maxItems": 50,
2094
+ "type": "array",
2095
+ "items": {
2096
+ "type": "string",
2097
+ "minLength": 1,
2098
+ "maxLength": 500,
2099
+ "pattern": "^(?!\\/)(?!.*[\\\\:*?\\[\\]\\x00])(?!(?:.*\\/)?\\.{1,2}(?:\\/|$))(?=.{1,500}$).+$"
2100
+ }
2101
+ }
2102
+ },
2103
+ "additionalProperties": false
2104
+ },
2074
2105
  "maxAttempts": {
2075
2106
  "default": 3,
2076
2107
  "type": "integer",
@@ -152,6 +152,7 @@
152
152
  "cancelled",
153
153
  "budget",
154
154
  "needs-lead",
155
+ "needs-input",
155
156
  "unknown"
156
157
  ]
157
158
  }
@@ -187,6 +188,7 @@
187
188
  "BUDGET_UNKNOWN",
188
189
  "ATTEMPTS_EXHAUSTED",
189
190
  "CONTEXT_EXHAUSTED",
191
+ "INPUT_REQUIRED",
190
192
  "REVISION_CONFLICT",
191
193
  "CANCELLED",
192
194
  "NOT_FOUND",
@@ -231,7 +233,9 @@
231
233
  "user-decision",
232
234
  "resume-queue",
233
235
  "fix-environment",
234
- "fix-access"
236
+ "fix-access",
237
+ "answer-input",
238
+ "apply-input"
235
239
  ]
236
240
  }
237
241
  },
@@ -511,6 +515,7 @@
511
515
  "cancelled",
512
516
  "budget",
513
517
  "needs-lead",
518
+ "needs-input",
514
519
  "unknown"
515
520
  ]
516
521
  },
@@ -594,6 +599,7 @@
594
599
  "BUDGET_UNKNOWN",
595
600
  "ATTEMPTS_EXHAUSTED",
596
601
  "CONTEXT_EXHAUSTED",
602
+ "INPUT_REQUIRED",
597
603
  "REVISION_CONFLICT",
598
604
  "CANCELLED",
599
605
  "NOT_FOUND",
@@ -658,7 +664,9 @@
658
664
  "user-decision",
659
665
  "resume-queue",
660
666
  "fix-environment",
661
- "fix-access"
667
+ "fix-access",
668
+ "answer-input",
669
+ "apply-input"
662
670
  ]
663
671
  },
664
672
  "step": {
@@ -749,6 +757,7 @@
749
757
  "BUDGET_UNKNOWN",
750
758
  "ATTEMPTS_EXHAUSTED",
751
759
  "CONTEXT_EXHAUSTED",
760
+ "INPUT_REQUIRED",
752
761
  "REVISION_CONFLICT",
753
762
  "CANCELLED",
754
763
  "NOT_FOUND",
@@ -782,6 +791,7 @@
782
791
  "cancelled",
783
792
  "budget",
784
793
  "needs-lead",
794
+ "needs-input",
785
795
  "unknown",
786
796
  "runtime-missing",
787
797
  "controller-busy",
@@ -832,7 +842,9 @@
832
842
  "user-decision",
833
843
  "resume-queue",
834
844
  "fix-environment",
835
- "fix-access"
845
+ "fix-access",
846
+ "answer-input",
847
+ "apply-input"
836
848
  ]
837
849
  },
838
850
  "retryPlanned": {
@@ -989,6 +1001,7 @@
989
1001
  "cancelled",
990
1002
  "budget",
991
1003
  "needs-lead",
1004
+ "needs-input",
992
1005
  "unknown"
993
1006
  ]
994
1007
  },
@@ -1019,6 +1032,7 @@
1019
1032
  "BUDGET_UNKNOWN",
1020
1033
  "ATTEMPTS_EXHAUSTED",
1021
1034
  "CONTEXT_EXHAUSTED",
1035
+ "INPUT_REQUIRED",
1022
1036
  "REVISION_CONFLICT",
1023
1037
  "CANCELLED",
1024
1038
  "NOT_FOUND",
@@ -1213,6 +1227,125 @@
1213
1227
  "additionalProperties": false
1214
1228
  }
1215
1229
  },
1230
+ "inputs": {
1231
+ "maxItems": 10,
1232
+ "type": "array",
1233
+ "items": {
1234
+ "type": "object",
1235
+ "properties": {
1236
+ "requestId": {
1237
+ "type": "string",
1238
+ "maxLength": 201
1239
+ },
1240
+ "workId": {
1241
+ "type": "string",
1242
+ "pattern": "^[A-Za-z0-9_-]{1,80}$"
1243
+ },
1244
+ "kind": {
1245
+ "type": "string",
1246
+ "enum": [
1247
+ "question",
1248
+ "follow-up"
1249
+ ]
1250
+ },
1251
+ "state": {
1252
+ "type": "string",
1253
+ "enum": [
1254
+ "awaiting-answer",
1255
+ "answered-not-applied",
1256
+ "applied-awaiting-claim",
1257
+ "carry-stale"
1258
+ ]
1259
+ },
1260
+ "severity": {
1261
+ "type": "integer",
1262
+ "minimum": 1,
1263
+ "maximum": 10
1264
+ },
1265
+ "question": {
1266
+ "type": "string",
1267
+ "maxLength": 301
1268
+ },
1269
+ "options": {
1270
+ "maxItems": 6,
1271
+ "type": "array",
1272
+ "items": {
1273
+ "type": "string",
1274
+ "maxLength": 201
1275
+ }
1276
+ },
1277
+ "answer": {
1278
+ "type": "object",
1279
+ "properties": {
1280
+ "revision": {
1281
+ "type": "integer",
1282
+ "exclusiveMinimum": 0,
1283
+ "maximum": 9007199254740991
1284
+ },
1285
+ "digest": {
1286
+ "type": "string",
1287
+ "pattern": "^[a-f0-9]{64}$"
1288
+ },
1289
+ "excerpt": {
1290
+ "type": "string",
1291
+ "maxLength": 501
1292
+ }
1293
+ },
1294
+ "required": [
1295
+ "revision",
1296
+ "digest",
1297
+ "excerpt"
1298
+ ],
1299
+ "additionalProperties": false
1300
+ },
1301
+ "origin": {
1302
+ "type": "object",
1303
+ "properties": {
1304
+ "graphDigest": {
1305
+ "type": "string",
1306
+ "pattern": "^[a-f0-9]{64}$"
1307
+ },
1308
+ "orderDigest": {
1309
+ "type": "string",
1310
+ "pattern": "^[a-f0-9]{64}$"
1311
+ },
1312
+ "contextDigest": {
1313
+ "anyOf": [
1314
+ {
1315
+ "type": "string",
1316
+ "pattern": "^[a-f0-9]{64}$"
1317
+ },
1318
+ {
1319
+ "type": "null"
1320
+ }
1321
+ ]
1322
+ }
1323
+ },
1324
+ "required": [
1325
+ "graphDigest",
1326
+ "orderDigest",
1327
+ "contextDigest"
1328
+ ],
1329
+ "additionalProperties": false
1330
+ },
1331
+ "targetDigest": {
1332
+ "type": "string",
1333
+ "pattern": "^[a-f0-9]{64}$"
1334
+ }
1335
+ },
1336
+ "required": [
1337
+ "requestId",
1338
+ "workId",
1339
+ "kind",
1340
+ "state",
1341
+ "severity",
1342
+ "question",
1343
+ "options",
1344
+ "origin"
1345
+ ],
1346
+ "additionalProperties": false
1347
+ }
1348
+ },
1216
1349
  "next": {
1217
1350
  "type": "object",
1218
1351
  "properties": {
@@ -1246,7 +1379,9 @@
1246
1379
  "user-decision",
1247
1380
  "resume-queue",
1248
1381
  "fix-environment",
1249
- "fix-access"
1382
+ "fix-access",
1383
+ "answer-input",
1384
+ "apply-input"
1250
1385
  ]
1251
1386
  },
1252
1387
  "step": {
@@ -1316,6 +1451,7 @@
1316
1451
  "BUDGET_UNKNOWN",
1317
1452
  "ATTEMPTS_EXHAUSTED",
1318
1453
  "CONTEXT_EXHAUSTED",
1454
+ "INPUT_REQUIRED",
1319
1455
  "REVISION_CONFLICT",
1320
1456
  "CANCELLED",
1321
1457
  "NOT_FOUND",
@@ -1390,6 +1526,12 @@
1390
1526
  "minimum": 0,
1391
1527
  "maximum": 9007199254740991
1392
1528
  },
1529
+ "inputs": {
1530
+ "default": 0,
1531
+ "type": "integer",
1532
+ "minimum": 0,
1533
+ "maximum": 9007199254740991
1534
+ },
1393
1535
  "intentions": {
1394
1536
  "type": "integer",
1395
1537
  "minimum": 0,