@intentius/chant 0.90.0 → 0.93.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (402) hide show
  1. package/dist/cli/commands/build.d.ts.map +1 -1
  2. package/dist/cli/commands/lint.d.ts.map +1 -1
  3. package/dist/cli/handlers/components.d.ts +8 -0
  4. package/dist/cli/handlers/components.d.ts.map +1 -1
  5. package/dist/cli/handlers/graph.d.ts.map +1 -1
  6. package/dist/cli/handlers/operator.d.ts +20 -0
  7. package/dist/cli/handlers/operator.d.ts.map +1 -1
  8. package/dist/cli/handlers/run.d.ts.map +1 -1
  9. package/dist/cli/main.d.ts.map +1 -1
  10. package/dist/cli/mcp/workspace-tools.d.ts +7 -4
  11. package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
  12. package/dist/cli/plugins.d.ts.map +1 -1
  13. package/dist/cli/registry.d.ts +42 -1
  14. package/dist/cli/registry.d.ts.map +1 -1
  15. package/dist/codegen/pinned-upgrade.d.ts.map +1 -1
  16. package/dist/components/verbs/vuln-scan.d.ts +72 -0
  17. package/dist/components/verbs/vuln-scan.d.ts.map +1 -1
  18. package/dist/config.d.ts +22 -0
  19. package/dist/config.d.ts.map +1 -1
  20. package/dist/lexicon-module.d.ts +22 -0
  21. package/dist/lexicon-module.d.ts.map +1 -1
  22. package/dist/lifecycle/converge-ledger.d.ts +19 -0
  23. package/dist/lifecycle/converge-ledger.d.ts.map +1 -1
  24. package/dist/lifecycle/git.d.ts +40 -5
  25. package/dist/lifecycle/git.d.ts.map +1 -1
  26. package/dist/lifecycle/lease.d.ts +72 -16
  27. package/dist/lifecycle/lease.d.ts.map +1 -1
  28. package/dist/lifecycle/member-ledger.d.ts +3 -2
  29. package/dist/lifecycle/member-ledger.d.ts.map +1 -1
  30. package/dist/lifecycle/plan-ledger.d.ts +114 -0
  31. package/dist/lifecycle/plan-ledger.d.ts.map +1 -0
  32. package/dist/lifecycle/run-ledger.d.ts +2 -0
  33. package/dist/lifecycle/run-ledger.d.ts.map +1 -1
  34. package/dist/lifecycle/symptoms.d.ts +51 -0
  35. package/dist/lifecycle/symptoms.d.ts.map +1 -1
  36. package/dist/lifecycle/work-lease.d.ts +140 -0
  37. package/dist/lifecycle/work-lease.d.ts.map +1 -0
  38. package/dist/lint/rules/index.d.ts +4 -2
  39. package/dist/lint/rules/index.d.ts.map +1 -1
  40. package/dist/lint/rules/op/index.d.ts +14 -3
  41. package/dist/lint/rules/op/index.d.ts.map +1 -1
  42. package/dist/lint/rules/op/ops014-converge-rule-refusals.d.ts.map +1 -1
  43. package/dist/lint/rules/op/sys010-key-over-plain-http.d.ts +29 -0
  44. package/dist/lint/rules/op/sys010-key-over-plain-http.d.ts.map +1 -0
  45. package/dist/lint/rules/sys001-no-literal-key.d.ts +3 -0
  46. package/dist/lint/rules/sys001-no-literal-key.d.ts.map +1 -0
  47. package/dist/op/__fixtures__/decide-stub-backend.d.ts +53 -0
  48. package/dist/op/__fixtures__/decide-stub-backend.d.ts.map +1 -0
  49. package/dist/op/activities/activity-contracts.d.ts +203 -2
  50. package/dist/op/activities/activity-contracts.d.ts.map +1 -1
  51. package/dist/op/activities/apply.d.ts.map +1 -1
  52. package/dist/op/activities/change-coverage.d.ts +44 -0
  53. package/dist/op/activities/change-coverage.d.ts.map +1 -0
  54. package/dist/op/activities/converge.d.ts +24 -1
  55. package/dist/op/activities/converge.d.ts.map +1 -1
  56. package/dist/op/activities/decide.d.ts +107 -0
  57. package/dist/op/activities/decide.d.ts.map +1 -0
  58. package/dist/op/activities/index.d.ts +10 -0
  59. package/dist/op/activities/index.d.ts.map +1 -1
  60. package/dist/op/activities/shell.d.ts +32 -0
  61. package/dist/op/activities/shell.d.ts.map +1 -1
  62. package/dist/op/activities/source-release.d.ts +86 -0
  63. package/dist/op/activities/source-release.d.ts.map +1 -0
  64. package/dist/op/activities/source-rollback.d.ts +100 -0
  65. package/dist/op/activities/source-rollback.d.ts.map +1 -0
  66. package/dist/op/activities/work-evidence.d.ts +42 -0
  67. package/dist/op/activities/work-evidence.d.ts.map +1 -0
  68. package/dist/op/activity-contract.d.ts +1 -0
  69. package/dist/op/activity-contract.d.ts.map +1 -1
  70. package/dist/op/activity-profiles.d.ts +16 -0
  71. package/dist/op/activity-profiles.d.ts.map +1 -1
  72. package/dist/op/builders.d.ts +84 -2
  73. package/dist/op/builders.d.ts.map +1 -1
  74. package/dist/op/composites/converge-op.d.ts +31 -4
  75. package/dist/op/composites/converge-op.d.ts.map +1 -1
  76. package/dist/op/decide-backend.d.ts +116 -0
  77. package/dist/op/decide-backend.d.ts.map +1 -0
  78. package/dist/op/decide-config.d.ts +120 -0
  79. package/dist/op/decide-config.d.ts.map +1 -0
  80. package/dist/op/decide-read-inputs.d.ts +40 -0
  81. package/dist/op/decide-read-inputs.d.ts.map +1 -0
  82. package/dist/op/discover.d.ts +25 -0
  83. package/dist/op/discover.d.ts.map +1 -1
  84. package/dist/op/gate-wait.d.ts +43 -0
  85. package/dist/op/gate-wait.d.ts.map +1 -0
  86. package/dist/op/gate.d.ts +5 -2
  87. package/dist/op/gate.d.ts.map +1 -1
  88. package/dist/op/index.d.ts +18 -5
  89. package/dist/op/index.d.ts.map +1 -1
  90. package/dist/op/lifecycle-receipt-store.d.ts +34 -0
  91. package/dist/op/lifecycle-receipt-store.d.ts.map +1 -0
  92. package/dist/op/local-executor.d.ts +48 -4
  93. package/dist/op/local-executor.d.ts.map +1 -1
  94. package/dist/op/local-output.d.ts +2 -0
  95. package/dist/op/local-output.d.ts.map +1 -1
  96. package/dist/op/op-ir.d.ts +12 -1
  97. package/dist/op/op-ir.d.ts.map +1 -1
  98. package/dist/op/op-verb-class.d.ts.map +1 -1
  99. package/dist/op/operator.d.ts +126 -1
  100. package/dist/op/operator.d.ts.map +1 -1
  101. package/dist/op/runtime.d.ts +46 -5
  102. package/dist/op/runtime.d.ts.map +1 -1
  103. package/dist/op/runtimes/local.d.ts.map +1 -1
  104. package/dist/op/source-archive.d.ts +63 -0
  105. package/dist/op/source-archive.d.ts.map +1 -0
  106. package/dist/op/step-output-ref.d.ts +2 -2
  107. package/dist/op/step-output-ref.d.ts.map +1 -1
  108. package/dist/op/steward-points.d.ts +136 -0
  109. package/dist/op/steward-points.d.ts.map +1 -0
  110. package/dist/op/steward-turn.d.ts +53 -0
  111. package/dist/op/steward-turn.d.ts.map +1 -0
  112. package/dist/op/steward.d.ts +161 -0
  113. package/dist/op/steward.d.ts.map +1 -0
  114. package/dist/op/types.d.ts +58 -0
  115. package/dist/op/types.d.ts.map +1 -1
  116. package/dist/op/work-lease-decl.d.ts +18 -0
  117. package/dist/op/work-lease-decl.d.ts.map +1 -0
  118. package/dist/op/work-lease-run.d.ts +173 -0
  119. package/dist/op/work-lease-run.d.ts.map +1 -0
  120. package/dist/workspace/__fixtures__/decide-workspace.d.ts +100 -0
  121. package/dist/workspace/__fixtures__/decide-workspace.d.ts.map +1 -0
  122. package/dist/workspace/answers-ledger.d.ts +76 -0
  123. package/dist/workspace/answers-ledger.d.ts.map +1 -0
  124. package/dist/workspace/box-isolation.d.ts +99 -0
  125. package/dist/workspace/box-isolation.d.ts.map +1 -0
  126. package/dist/workspace/changes-cli.d.ts +16 -0
  127. package/dist/workspace/changes-cli.d.ts.map +1 -0
  128. package/dist/workspace/changes.d.ts +200 -0
  129. package/dist/workspace/changes.d.ts.map +1 -0
  130. package/dist/workspace/chant-migrations/chud-lexicon-exit-fly-site.d.ts +59 -0
  131. package/dist/workspace/chant-migrations/chud-lexicon-exit-fly-site.d.ts.map +1 -0
  132. package/dist/workspace/chant-migrations/chud-lexicon-exit-live-names.d.ts +51 -0
  133. package/dist/workspace/chant-migrations/chud-lexicon-exit-live-names.d.ts.map +1 -0
  134. package/dist/workspace/chant-migrations/chud-lexicon-exit-rollback.d.ts +26 -0
  135. package/dist/workspace/chant-migrations/chud-lexicon-exit-rollback.d.ts.map +1 -0
  136. package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-inputs.d.ts +59 -0
  137. package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-inputs.d.ts.map +1 -0
  138. package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-policy.d.ts +22 -0
  139. package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-policy.d.ts.map +1 -0
  140. package/dist/workspace/chant-migrations/chud-lexicon-exit.d.ts +71 -0
  141. package/dist/workspace/chant-migrations/chud-lexicon-exit.d.ts.map +1 -0
  142. package/dist/workspace/chant-migrations.d.ts +99 -0
  143. package/dist/workspace/chant-migrations.d.ts.map +1 -0
  144. package/dist/workspace/checks/box-isolation.d.ts +18 -0
  145. package/dist/workspace/checks/box-isolation.d.ts.map +1 -0
  146. package/dist/workspace/checks/boxes.d.ts +104 -0
  147. package/dist/workspace/checks/boxes.d.ts.map +1 -0
  148. package/dist/workspace/checks/diagrams.d.ts +31 -0
  149. package/dist/workspace/checks/diagrams.d.ts.map +1 -0
  150. package/dist/workspace/checks/records.d.ts +8 -0
  151. package/dist/workspace/checks/records.d.ts.map +1 -1
  152. package/dist/workspace/checks.d.ts +13 -1
  153. package/dist/workspace/checks.d.ts.map +1 -1
  154. package/dist/workspace/compose-graph.d.ts +2 -0
  155. package/dist/workspace/compose-graph.d.ts.map +1 -1
  156. package/dist/workspace/conformance/index.d.ts.map +1 -1
  157. package/dist/workspace/decide.d.ts +229 -0
  158. package/dist/workspace/decide.d.ts.map +1 -0
  159. package/dist/workspace/decision-points.schema.json +137 -0
  160. package/dist/workspace/declaration.d.ts +103 -0
  161. package/dist/workspace/declaration.d.ts.map +1 -1
  162. package/dist/workspace/declaration.schema.json +285 -0
  163. package/dist/workspace/declared-kinds.d.ts +32 -0
  164. package/dist/workspace/declared-kinds.d.ts.map +1 -1
  165. package/dist/workspace/generated-files.d.ts +7 -0
  166. package/dist/workspace/generated-files.d.ts.map +1 -1
  167. package/dist/workspace/intent.d.ts.map +1 -1
  168. package/dist/workspace/lineage-check.d.ts +3 -0
  169. package/dist/workspace/lineage-check.d.ts.map +1 -1
  170. package/dist/workspace/lineage-upgrade.d.ts +6 -1
  171. package/dist/workspace/lineage-upgrade.d.ts.map +1 -1
  172. package/dist/workspace/ls.d.ts +39 -1
  173. package/dist/workspace/ls.d.ts.map +1 -1
  174. package/dist/workspace/point-answer.schema.json +95 -0
  175. package/dist/workspace/points-cli.d.ts +113 -0
  176. package/dist/workspace/points-cli.d.ts.map +1 -0
  177. package/dist/workspace/points.d.ts +320 -0
  178. package/dist/workspace/points.d.ts.map +1 -0
  179. package/dist/workspace/reason-codes.d.ts +38 -0
  180. package/dist/workspace/reason-codes.d.ts.map +1 -1
  181. package/dist/workspace/record-assets.d.ts.map +1 -1
  182. package/dist/workspace/records-cli.d.ts +23 -1
  183. package/dist/workspace/records-cli.d.ts.map +1 -1
  184. package/dist/workspace/records-close.d.ts +1 -1
  185. package/dist/workspace/records-close.d.ts.map +1 -1
  186. package/dist/workspace/records-write.d.ts +11 -5
  187. package/dist/workspace/records-write.d.ts.map +1 -1
  188. package/dist/workspace/records.d.ts +42 -6
  189. package/dist/workspace/records.d.ts.map +1 -1
  190. package/dist/workspace/status-gates.d.ts +7 -2
  191. package/dist/workspace/status-gates.d.ts.map +1 -1
  192. package/dist/workspace/status-stewards.d.ts +179 -0
  193. package/dist/workspace/status-stewards.d.ts.map +1 -0
  194. package/dist/workspace/status.d.ts +68 -1
  195. package/dist/workspace/status.d.ts.map +1 -1
  196. package/dist/workspace/work-cli.d.ts +189 -0
  197. package/dist/workspace/work-cli.d.ts.map +1 -0
  198. package/dist/workspace/work-evidence.d.ts +74 -0
  199. package/dist/workspace/work-evidence.d.ts.map +1 -0
  200. package/dist/workspace/work.d.ts +43 -1
  201. package/dist/workspace/work.d.ts.map +1 -1
  202. package/package.json +1 -1
  203. package/src/cli/commands/audit.test.ts +9 -1
  204. package/src/cli/commands/build.ts +3 -2
  205. package/src/cli/commands/lint.ts +7 -1
  206. package/src/cli/handlers/components.test.ts +93 -0
  207. package/src/cli/handlers/components.ts +44 -3
  208. package/src/cli/handlers/graph.test.ts +20 -0
  209. package/src/cli/handlers/graph.ts +16 -2
  210. package/src/cli/handlers/operator.ts +141 -4
  211. package/src/cli/handlers/run.test.ts +173 -2
  212. package/src/cli/handlers/run.ts +174 -3
  213. package/src/cli/main.test.ts +50 -0
  214. package/src/cli/main.ts +97 -2
  215. package/src/cli/mcp/workspace-tools.test.ts +48 -19
  216. package/src/cli/mcp/workspace-tools.ts +110 -8
  217. package/src/cli/plugins.ts +11 -3
  218. package/src/cli/registry.ts +42 -1
  219. package/src/codegen/pinned-upgrade.ts +2 -1
  220. package/src/codegen/release-wiring.test.ts +49 -2
  221. package/src/components/capability-plugin-loader.ts +3 -3
  222. package/src/components/cli-support.ts +2 -2
  223. package/src/components/verbs/vuln-scan.test.ts +124 -1
  224. package/src/components/verbs/vuln-scan.ts +142 -1
  225. package/src/config.ts +11 -0
  226. package/src/lexicon-module.ts +56 -1
  227. package/src/lexicon-package.test.ts +96 -0
  228. package/src/lifecycle/converge-ledger.ts +20 -0
  229. package/src/lifecycle/git.ts +65 -15
  230. package/src/lifecycle/lease.test.ts +22 -0
  231. package/src/lifecycle/lease.ts +133 -29
  232. package/src/lifecycle/member-ledger.ts +3 -2
  233. package/src/lifecycle/plan-ledger.test.ts +148 -0
  234. package/src/lifecycle/plan-ledger.ts +158 -0
  235. package/src/lifecycle/run-ledger.ts +6 -0
  236. package/src/lifecycle/symptoms.ts +95 -0
  237. package/src/lifecycle/work-lease.test.ts +236 -0
  238. package/src/lifecycle/work-lease.ts +426 -0
  239. package/src/lint/rules/index.ts +6 -2
  240. package/src/lint/rules/op/index.ts +17 -4
  241. package/src/lint/rules/op/ops014-converge-rule-refusals.test.ts +23 -1
  242. package/src/lint/rules/op/ops014-converge-rule-refusals.ts +10 -6
  243. package/src/lint/rules/op/sys010-key-over-plain-http.test.ts +52 -0
  244. package/src/lint/rules/op/sys010-key-over-plain-http.ts +100 -0
  245. package/src/lint/rules/sys001-no-literal-key.test.ts +31 -0
  246. package/src/lint/rules/sys001-no-literal-key.ts +67 -0
  247. package/src/op/__fixtures__/decide-stub-backend.ts +143 -0
  248. package/src/op/activities/activity-contracts.ts +190 -1
  249. package/src/op/activities/apply.ts +7 -6
  250. package/src/op/activities/change-coverage.ts +60 -0
  251. package/src/op/activities/converge.test.ts +55 -1
  252. package/src/op/activities/converge.ts +208 -29
  253. package/src/op/activities/decide.live.test.ts +78 -0
  254. package/src/op/activities/decide.test.ts +300 -0
  255. package/src/op/activities/decide.ts +267 -0
  256. package/src/op/activities/index.ts +21 -0
  257. package/src/op/activities/shell.test.ts +91 -1
  258. package/src/op/activities/shell.ts +91 -2
  259. package/src/op/activities/source-release.test.ts +118 -0
  260. package/src/op/activities/source-release.ts +168 -0
  261. package/src/op/activities/source-rollback.test.ts +131 -0
  262. package/src/op/activities/source-rollback.ts +239 -0
  263. package/src/op/activities/work-evidence.ts +62 -0
  264. package/src/op/activity-contract-registry.test.ts +2 -0
  265. package/src/op/activity-contract-registry.ts +2 -2
  266. package/src/op/activity-contract.test.ts +12 -0
  267. package/src/op/activity-contract.ts +6 -1
  268. package/src/op/activity-profiles.ts +29 -0
  269. package/src/op/activity-registry.test.ts +1 -1
  270. package/src/op/activity-registry.ts +2 -2
  271. package/src/op/builders.ts +124 -5
  272. package/src/op/command-gate.test.ts +192 -0
  273. package/src/op/composites/converge-op.test.ts +27 -1
  274. package/src/op/composites/converge-op.ts +69 -15
  275. package/src/op/decide-backend.test.ts +44 -0
  276. package/src/op/decide-backend.ts +212 -0
  277. package/src/op/decide-config.test.ts +52 -0
  278. package/src/op/decide-config.ts +80 -0
  279. package/src/op/decide-read-inputs.ts +117 -0
  280. package/src/op/discover.ts +71 -0
  281. package/src/op/gate-approval.ts +2 -2
  282. package/src/op/gate-wait.ts +57 -0
  283. package/src/op/gate.ts +8 -3
  284. package/src/op/generate-pipeline.ts +2 -2
  285. package/src/op/index.ts +34 -6
  286. package/src/op/lifecycle-receipt-store.test.ts +60 -0
  287. package/src/op/lifecycle-receipt-store.ts +61 -0
  288. package/src/op/local-executor.ts +367 -33
  289. package/src/op/local-output.test.ts +33 -0
  290. package/src/op/local-output.ts +33 -2
  291. package/src/op/op-ir.test.ts +10 -0
  292. package/src/op/op-ir.ts +18 -0
  293. package/src/op/op-verb-class.ts +1 -0
  294. package/src/op/operator.ts +360 -10
  295. package/src/op/runtime.ts +37 -8
  296. package/src/op/runtimes/local.ts +6 -1
  297. package/src/op/source-archive.ts +161 -0
  298. package/src/op/step-output-ref.ts +6 -2
  299. package/src/op/steward-points.test.ts +313 -0
  300. package/src/op/steward-points.ts +194 -0
  301. package/src/op/steward-turn.ts +79 -0
  302. package/src/op/steward.test.ts +296 -0
  303. package/src/op/steward.ts +277 -0
  304. package/src/op/types.ts +60 -0
  305. package/src/op/work-lease-decl.ts +80 -0
  306. package/src/op/work-lease-run.test.ts +345 -0
  307. package/src/op/work-lease-run.ts +395 -0
  308. package/src/workspace/__fixtures__/decide-workspace.ts +129 -0
  309. package/src/workspace/__fixtures__/studio-template-84c8b21.json +67 -0
  310. package/src/workspace/answers-ledger.ts +118 -0
  311. package/src/workspace/box-isolation.test.ts +261 -0
  312. package/src/workspace/box-isolation.ts +205 -0
  313. package/src/workspace/changes-cli.ts +56 -0
  314. package/src/workspace/changes.schema.json +472 -0
  315. package/src/workspace/changes.test.ts +315 -0
  316. package/src/workspace/changes.ts +512 -0
  317. package/src/workspace/chant-migrations/chud-lexicon-exit-fly-site.ts +234 -0
  318. package/src/workspace/chant-migrations/chud-lexicon-exit-live-names.ts +164 -0
  319. package/src/workspace/chant-migrations/chud-lexicon-exit-rollback.ts +223 -0
  320. package/src/workspace/chant-migrations/chud-lexicon-exit-ship-inputs.ts +195 -0
  321. package/src/workspace/chant-migrations/chud-lexicon-exit-ship-policy.ts +108 -0
  322. package/src/workspace/chant-migrations/chud-lexicon-exit.ts +882 -0
  323. package/src/workspace/chant-migrations.e2e.test.ts +1089 -0
  324. package/src/workspace/chant-migrations.ts +164 -0
  325. package/src/workspace/check-contract.test.ts +5 -1
  326. package/src/workspace/check.schema.json +25 -7
  327. package/src/workspace/checks/box-isolation.ts +68 -0
  328. package/src/workspace/checks/boxes.test.ts +276 -0
  329. package/src/workspace/checks/boxes.ts +442 -0
  330. package/src/workspace/checks/diagrams.test.ts +134 -0
  331. package/src/workspace/checks/diagrams.ts +108 -0
  332. package/src/workspace/checks/records.ts +72 -0
  333. package/src/workspace/checks.test.ts +7 -0
  334. package/src/workspace/checks.ts +27 -3
  335. package/src/workspace/compose-graph.ts +2 -0
  336. package/src/workspace/conformance/__fixture__/decisions/decision.kind.mjs +10 -0
  337. package/src/workspace/conformance/__fixture__/decisions/decision.schema.json +26 -0
  338. package/src/workspace/conformance/index.ts +5 -0
  339. package/src/workspace/decide.test.ts +224 -0
  340. package/src/workspace/decide.ts +709 -0
  341. package/src/workspace/decision-points.schema.json +137 -0
  342. package/src/workspace/declaration.schema.json +285 -0
  343. package/src/workspace/declaration.test.ts +58 -0
  344. package/src/workspace/declaration.ts +241 -0
  345. package/src/workspace/declared-kinds.test.ts +5 -5
  346. package/src/workspace/declared-kinds.ts +71 -3
  347. package/src/workspace/generated-files.ts +14 -0
  348. package/src/workspace/graph-cli.ts +1 -1
  349. package/src/workspace/graph.schema.json +9 -1
  350. package/src/workspace/intent.schema.json +12 -3
  351. package/src/workspace/intent.ts +3 -10
  352. package/src/workspace/lineage-check.ts +16 -1
  353. package/src/workspace/lineage-upgrade-cli.ts +1 -1
  354. package/src/workspace/lineage-upgrade.test.ts +70 -0
  355. package/src/workspace/lineage-upgrade.ts +81 -10
  356. package/src/workspace/ls-contract.test.ts +57 -0
  357. package/src/workspace/ls.schema.json +46 -1
  358. package/src/workspace/ls.ts +62 -3
  359. package/src/workspace/point-answer.schema.json +95 -0
  360. package/src/workspace/points-cli.ts +284 -0
  361. package/src/workspace/points-write.schema.json +499 -0
  362. package/src/workspace/points.schema.json +743 -0
  363. package/src/workspace/points.test.ts +264 -0
  364. package/src/workspace/points.ts +564 -0
  365. package/src/workspace/read-contract.test.ts +18 -1
  366. package/src/workspace/reason-codes.test.ts +24 -1
  367. package/src/workspace/reason-codes.ts +49 -0
  368. package/src/workspace/record-assets.test.ts +3 -2
  369. package/src/workspace/record-assets.ts +4 -1
  370. package/src/workspace/records-amend.schema.json +2 -0
  371. package/src/workspace/records-cli.ts +28 -5
  372. package/src/workspace/records-close.schema.json +2 -0
  373. package/src/workspace/records-contract.test.ts +3 -2
  374. package/src/workspace/records-new.schema.json +2 -0
  375. package/src/workspace/records-review.schema.json +2 -0
  376. package/src/workspace/records-sessions-write.e2e.test.ts +77 -0
  377. package/src/workspace/records-sessions-write.test.ts +2 -34
  378. package/src/workspace/records-write.e2e.test.ts +108 -0
  379. package/src/workspace/records-write.test.ts +32 -41
  380. package/src/workspace/records-write.ts +33 -15
  381. package/src/workspace/records.schema.json +53 -2
  382. package/src/workspace/records.test.ts +48 -3
  383. package/src/workspace/records.ts +142 -6
  384. package/src/workspace/status-contract.test.ts +189 -6
  385. package/src/workspace/status-gates.ts +9 -4
  386. package/src/workspace/status-stewards.ts +329 -0
  387. package/src/workspace/status.schema.json +335 -5
  388. package/src/workspace/status.ts +142 -6
  389. package/src/workspace/work-acceptance.test.ts +274 -0
  390. package/src/workspace/work-cli.e2e.test.ts +180 -0
  391. package/src/workspace/work-cli.ts +429 -0
  392. package/src/workspace/work-evidence.schema.json +212 -0
  393. package/src/workspace/work-evidence.ts +169 -0
  394. package/src/workspace/work-history.schema.json +349 -0
  395. package/src/workspace/work-history.test.ts +156 -0
  396. package/src/workspace/work-lease.schema.json +233 -0
  397. package/src/workspace/work-readiness-chud.test.ts +145 -0
  398. package/src/workspace/work.test.ts +3 -2
  399. package/src/workspace/work.ts +100 -1
  400. /package/src/cli/{discovery-skip.test.ts → discovery-skip.e2e.test.ts} +0 -0
  401. /package/src/workspace/conformance/{conformance.test.ts → conformance.e2e.test.ts} +0 -0
  402. /package/src/workspace/{which-chant.test.ts → which-chant.e2e.test.ts} +0 -0
@@ -0,0 +1,743 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://intentius.io/chant/schemas/workspace/points/v1/points.schema.json",
4
+ "title": "chant workspace points output",
5
+ "description": "What `chant workspace points --json` prints (ws-058, #2739): the decision points each declared answer kind's points file declares, and the questions asked of them, each an answer record. A question is open while it is escalated to people, or proposed by a model and not yet confirmed; it carries any model's answer with its confidence and threshold, so a reader can prompt a person. With --open only open questions are listed. chant never calls a model to print this. Readers ignore fields they do not know; a field is only ever added within a version. The reason and error codes are closed lists, each in the one closed list of `reason-codes.ts`. Contract version 1 is written by chant 0.81.0 and newer, and this document was added to it by #2739; a chant without it refuses the command.",
6
+ "oneOf": [
7
+ {
8
+ "$ref": "#/$defs/result"
9
+ },
10
+ {
11
+ "$ref": "#/$defs/failure"
12
+ }
13
+ ],
14
+ "$defs": {
15
+ "result": {
16
+ "description": "The declaration was read. Exit code 0; an answer kind whose points or records could not be read is listed in sources with its reason.",
17
+ "type": "object",
18
+ "required": [
19
+ "$schema",
20
+ "contract",
21
+ "chant",
22
+ "at",
23
+ "workspace",
24
+ "open",
25
+ "sources",
26
+ "points",
27
+ "questions",
28
+ "summary"
29
+ ],
30
+ "properties": {
31
+ "$schema": {
32
+ "const": "https://intentius.io/chant/schemas/workspace/points/v1/points.schema.json"
33
+ },
34
+ "contract": {
35
+ "const": 1
36
+ },
37
+ "chant": {
38
+ "type": "string",
39
+ "description": "The chant that wrote the document."
40
+ },
41
+ "at": {
42
+ "description": "The full commit id read (--at), or null for the working tree.",
43
+ "type": [
44
+ "string",
45
+ "null"
46
+ ],
47
+ "pattern": "^[0-9a-f]{40,64}$"
48
+ },
49
+ "workspace": {
50
+ "type": "object",
51
+ "required": [
52
+ "name",
53
+ "root"
54
+ ],
55
+ "properties": {
56
+ "name": {
57
+ "type": "string"
58
+ },
59
+ "root": {
60
+ "type": "string"
61
+ }
62
+ }
63
+ },
64
+ "error": false,
65
+ "open": {
66
+ "type": "boolean",
67
+ "description": "Whether only open questions are listed (--open)."
68
+ },
69
+ "sources": {
70
+ "type": "array",
71
+ "description": "Each answer kind read, declared or given with --kind.",
72
+ "items": {
73
+ "$ref": "#/$defs/source"
74
+ }
75
+ },
76
+ "points": {
77
+ "type": "array",
78
+ "description": "Every point the points files declare, in file order.",
79
+ "items": {
80
+ "$ref": "#/$defs/point"
81
+ }
82
+ },
83
+ "questions": {
84
+ "type": "array",
85
+ "description": "The answer records, in path order; with --open, only the open ones.",
86
+ "items": {
87
+ "$ref": "#/$defs/question"
88
+ }
89
+ },
90
+ "summary": {
91
+ "type": "object",
92
+ "required": [
93
+ "points",
94
+ "questions",
95
+ "open",
96
+ "escalated",
97
+ "proposed",
98
+ "answered"
99
+ ],
100
+ "properties": {
101
+ "points": {
102
+ "type": "integer",
103
+ "minimum": 0
104
+ },
105
+ "questions": {
106
+ "type": "integer",
107
+ "minimum": 0
108
+ },
109
+ "open": {
110
+ "type": "integer",
111
+ "minimum": 0
112
+ },
113
+ "escalated": {
114
+ "type": "integer",
115
+ "minimum": 0
116
+ },
117
+ "proposed": {
118
+ "type": "integer",
119
+ "minimum": 0
120
+ },
121
+ "answered": {
122
+ "type": "integer",
123
+ "minimum": 0
124
+ }
125
+ }
126
+ }
127
+ }
128
+ },
129
+ "source": {
130
+ "type": "object",
131
+ "required": [
132
+ "kind",
133
+ "points",
134
+ "reason"
135
+ ],
136
+ "properties": {
137
+ "kind": {
138
+ "type": "string",
139
+ "description": "The answer kind file, from the workspace root as declared, or as given with --kind."
140
+ },
141
+ "points": {
142
+ "type": [
143
+ "string",
144
+ "null"
145
+ ],
146
+ "description": "The points file from the repository root, or null when the kind could not be loaded."
147
+ },
148
+ "reason": {
149
+ "oneOf": [
150
+ {
151
+ "type": "null"
152
+ },
153
+ {
154
+ "$ref": "#/$defs/reason"
155
+ }
156
+ ]
157
+ }
158
+ }
159
+ },
160
+ "reason": {
161
+ "type": "object",
162
+ "required": [
163
+ "code",
164
+ "message"
165
+ ],
166
+ "properties": {
167
+ "code": {
168
+ "enum": [
169
+ "kind-unreadable",
170
+ "kind-invalid",
171
+ "schema-unreadable",
172
+ "schema-id-mismatch",
173
+ "schema-invalid",
174
+ "location-missing",
175
+ "points-invalid"
176
+ ]
177
+ },
178
+ "message": {
179
+ "type": "string"
180
+ }
181
+ }
182
+ },
183
+ "point": {
184
+ "type": "object",
185
+ "required": [
186
+ "name",
187
+ "title",
188
+ "kind",
189
+ "file",
190
+ "version",
191
+ "questionType",
192
+ "instructions",
193
+ "candidates",
194
+ "inputs",
195
+ "deciders",
196
+ "quorum"
197
+ ],
198
+ "properties": {
199
+ "name": {
200
+ "type": "string"
201
+ },
202
+ "title": {
203
+ "type": "string"
204
+ },
205
+ "kind": {
206
+ "type": "string"
207
+ },
208
+ "file": {
209
+ "type": "string"
210
+ },
211
+ "version": {
212
+ "type": "string",
213
+ "pattern": "^[0-9a-f]{64}$",
214
+ "description": "sha256 of the point's declaration."
215
+ },
216
+ "questionType": {
217
+ "enum": [
218
+ "noul",
219
+ "choice",
220
+ "score"
221
+ ]
222
+ },
223
+ "instructions": {
224
+ "type": "string"
225
+ },
226
+ "candidates": {
227
+ "type": "array",
228
+ "items": {
229
+ "oneOf": [
230
+ {
231
+ "type": "string"
232
+ },
233
+ {
234
+ "type": "boolean"
235
+ }
236
+ ]
237
+ }
238
+ },
239
+ "inputs": {
240
+ "type": "array",
241
+ "items": {
242
+ "type": "object",
243
+ "required": [
244
+ "name",
245
+ "output",
246
+ "description"
247
+ ],
248
+ "properties": {
249
+ "name": {
250
+ "type": "string"
251
+ },
252
+ "output": {
253
+ "type": "string",
254
+ "description": "The read-contract output the input names: record, decision, work-item, finding, region, commit, member, gate, release, environment or component."
255
+ },
256
+ "description": {
257
+ "type": "string"
258
+ }
259
+ }
260
+ }
261
+ },
262
+ "deciders": {
263
+ "type": "array",
264
+ "description": "The chain as declared: table, model and quorum deciders, the quorum last.",
265
+ "items": {
266
+ "type": "object",
267
+ "required": [
268
+ "kind"
269
+ ],
270
+ "properties": {
271
+ "kind": {
272
+ "enum": [
273
+ "table",
274
+ "model",
275
+ "quorum"
276
+ ]
277
+ }
278
+ }
279
+ }
280
+ },
281
+ "quorum": {
282
+ "type": "object",
283
+ "required": [
284
+ "count"
285
+ ],
286
+ "properties": {
287
+ "count": {
288
+ "type": "integer",
289
+ "minimum": 1
290
+ },
291
+ "roles": {
292
+ "type": "array",
293
+ "items": {
294
+ "type": "string"
295
+ }
296
+ }
297
+ }
298
+ }
299
+ }
300
+ },
301
+ "question": {
302
+ "type": "object",
303
+ "required": [
304
+ "id",
305
+ "path",
306
+ "point",
307
+ "title",
308
+ "subject",
309
+ "state",
310
+ "open",
311
+ "questionType",
312
+ "candidates",
313
+ "inputs",
314
+ "inputsHash",
315
+ "pointVersion",
316
+ "current",
317
+ "answer",
318
+ "decider",
319
+ "probabilities",
320
+ "confidence",
321
+ "threshold",
322
+ "model",
323
+ "escalations",
324
+ "answeredBy",
325
+ "askedOn",
326
+ "answeredOn",
327
+ "valid",
328
+ "warnings"
329
+ ],
330
+ "properties": {
331
+ "id": {
332
+ "type": "string"
333
+ },
334
+ "path": {
335
+ "type": "string"
336
+ },
337
+ "point": {
338
+ "type": "string"
339
+ },
340
+ "title": {
341
+ "type": "string"
342
+ },
343
+ "subject": {
344
+ "type": [
345
+ "string",
346
+ "null"
347
+ ],
348
+ "description": "What the question is about, such as a work item's id."
349
+ },
350
+ "state": {
351
+ "enum": [
352
+ "escalated",
353
+ "proposed",
354
+ "answered"
355
+ ]
356
+ },
357
+ "open": {
358
+ "type": "boolean",
359
+ "description": "Escalated to people, or proposed by a model and not yet confirmed."
360
+ },
361
+ "questionType": {
362
+ "type": "string"
363
+ },
364
+ "candidates": {
365
+ "type": "array",
366
+ "items": {
367
+ "oneOf": [
368
+ {
369
+ "type": "string"
370
+ },
371
+ {
372
+ "type": "boolean"
373
+ }
374
+ ]
375
+ }
376
+ },
377
+ "inputs": {
378
+ "type": "object"
379
+ },
380
+ "inputsHash": {
381
+ "type": "string"
382
+ },
383
+ "pointVersion": {
384
+ "type": "string"
385
+ },
386
+ "current": {
387
+ "type": [
388
+ "boolean",
389
+ "null"
390
+ ],
391
+ "description": "The point is still declared as it was when asked; null when the points file no longer declares it."
392
+ },
393
+ "answer": {
394
+ "oneOf": [
395
+ {
396
+ "type": "string"
397
+ },
398
+ {
399
+ "type": "boolean"
400
+ },
401
+ {
402
+ "type": "null"
403
+ }
404
+ ]
405
+ },
406
+ "decider": {
407
+ "type": "object",
408
+ "description": "Who answered: a table row, a model with its backend and model id, or a quorum, with who answered once people did. For an escalated question, the quorum it waits on."
409
+ },
410
+ "probabilities": {
411
+ "oneOf": [
412
+ {
413
+ "type": "null"
414
+ },
415
+ {
416
+ "type": "object",
417
+ "additionalProperties": {
418
+ "type": "number",
419
+ "minimum": 0,
420
+ "maximum": 1
421
+ }
422
+ }
423
+ ]
424
+ },
425
+ "confidence": {
426
+ "oneOf": [
427
+ {
428
+ "type": "null"
429
+ },
430
+ {
431
+ "type": "number",
432
+ "minimum": 0,
433
+ "maximum": 1
434
+ }
435
+ ]
436
+ },
437
+ "threshold": {
438
+ "oneOf": [
439
+ {
440
+ "type": "null"
441
+ },
442
+ {
443
+ "type": "number",
444
+ "minimum": 0,
445
+ "maximum": 1
446
+ }
447
+ ]
448
+ },
449
+ "model": {
450
+ "description": "Any model answer: the proposal (observed), or the last answer below a model decider's threshold (not observed). null when no model answered.",
451
+ "oneOf": [
452
+ {
453
+ "type": "null"
454
+ },
455
+ {
456
+ "type": "object",
457
+ "required": [
458
+ "answer",
459
+ "confidence",
460
+ "threshold",
461
+ "model",
462
+ "backend",
463
+ "observed"
464
+ ],
465
+ "properties": {
466
+ "answer": {
467
+ "oneOf": [
468
+ {
469
+ "type": "string"
470
+ },
471
+ {
472
+ "type": "boolean"
473
+ },
474
+ {
475
+ "type": "null"
476
+ }
477
+ ]
478
+ },
479
+ "confidence": {
480
+ "oneOf": [
481
+ {
482
+ "type": "null"
483
+ },
484
+ {
485
+ "type": "number",
486
+ "minimum": 0,
487
+ "maximum": 1
488
+ }
489
+ ]
490
+ },
491
+ "threshold": {
492
+ "oneOf": [
493
+ {
494
+ "type": "null"
495
+ },
496
+ {
497
+ "type": "number",
498
+ "minimum": 0,
499
+ "maximum": 1
500
+ }
501
+ ]
502
+ },
503
+ "model": {
504
+ "type": [
505
+ "string",
506
+ "null"
507
+ ]
508
+ },
509
+ "backend": {
510
+ "type": [
511
+ "string",
512
+ "null"
513
+ ]
514
+ },
515
+ "observed": {
516
+ "type": "boolean"
517
+ }
518
+ }
519
+ }
520
+ ]
521
+ },
522
+ "escalations": {
523
+ "type": "array",
524
+ "items": {
525
+ "type": "object",
526
+ "required": [
527
+ "kind",
528
+ "reason"
529
+ ],
530
+ "properties": {
531
+ "kind": {
532
+ "enum": [
533
+ "table",
534
+ "model"
535
+ ]
536
+ },
537
+ "reason": {
538
+ "type": "string"
539
+ },
540
+ "backend": {
541
+ "type": "string"
542
+ },
543
+ "model": {
544
+ "type": "string"
545
+ },
546
+ "answer": {
547
+ "oneOf": [
548
+ {
549
+ "type": "string"
550
+ },
551
+ {
552
+ "type": "boolean"
553
+ },
554
+ {
555
+ "type": "null"
556
+ }
557
+ ]
558
+ },
559
+ "probabilities": {
560
+ "type": "object",
561
+ "additionalProperties": {
562
+ "type": "number",
563
+ "minimum": 0,
564
+ "maximum": 1
565
+ }
566
+ },
567
+ "confidence": {
568
+ "type": "number",
569
+ "minimum": 0,
570
+ "maximum": 1
571
+ },
572
+ "threshold": {
573
+ "type": "number",
574
+ "minimum": 0,
575
+ "maximum": 1
576
+ }
577
+ }
578
+ }
579
+ },
580
+ "answeredBy": {
581
+ "type": "array",
582
+ "items": {
583
+ "type": "string"
584
+ }
585
+ },
586
+ "askedBy": {
587
+ "description": "The steward whose turn asked the question (#2749), and the run it was in, or null. The steward waits on the question and never answers it: a person does.",
588
+ "oneOf": [
589
+ {
590
+ "type": "null"
591
+ },
592
+ {
593
+ "type": "object",
594
+ "required": [
595
+ "steward",
596
+ "run"
597
+ ],
598
+ "properties": {
599
+ "steward": {
600
+ "type": "string"
601
+ },
602
+ "run": {
603
+ "type": [
604
+ "string",
605
+ "null"
606
+ ]
607
+ }
608
+ }
609
+ }
610
+ ]
611
+ },
612
+ "ledger": {
613
+ "type": [
614
+ "string",
615
+ "null"
616
+ ],
617
+ "description": "Where the record is held when it is on the lifecycle ledger rather than in the working tree (#2786): chant/lifecycle:<path>, which git show reads. A question asked in a steward's turn is held there, since a steward never writes the checkout; people's answer to it is written there too. null for a record in the working tree. path is where the record reads as being either way."
618
+ },
619
+ "askedOn": {
620
+ "type": [
621
+ "string",
622
+ "null"
623
+ ]
624
+ },
625
+ "answeredOn": {
626
+ "type": [
627
+ "string",
628
+ "null"
629
+ ]
630
+ },
631
+ "valid": {
632
+ "type": "boolean"
633
+ },
634
+ "warnings": {
635
+ "type": "array",
636
+ "items": {
637
+ "type": "object",
638
+ "required": [
639
+ "code",
640
+ "message"
641
+ ],
642
+ "properties": {
643
+ "code": {
644
+ "enum": [
645
+ "asset-drift",
646
+ "asset-missing",
647
+ "asset-stale",
648
+ "record-supersedes-pending",
649
+ "record-no-evidence",
650
+ "review-undigested",
651
+ "source-transcript-drift",
652
+ "answer-points-unreadable",
653
+ "answer-point-unknown",
654
+ "answer-point-changed",
655
+ "record-unattested"
656
+ ]
657
+ },
658
+ "message": {
659
+ "type": "string"
660
+ }
661
+ }
662
+ }
663
+ }
664
+ }
665
+ },
666
+ "failure": {
667
+ "description": "The declaration could not be read, and nothing was read. Exit code 1.",
668
+ "type": "object",
669
+ "required": [
670
+ "$schema",
671
+ "contract",
672
+ "chant",
673
+ "error"
674
+ ],
675
+ "properties": {
676
+ "$schema": {
677
+ "const": "https://intentius.io/chant/schemas/workspace/points/v1/points.schema.json"
678
+ },
679
+ "contract": {
680
+ "const": 1
681
+ },
682
+ "chant": {
683
+ "type": "string"
684
+ },
685
+ "error": {
686
+ "type": "object",
687
+ "required": [
688
+ "code",
689
+ "message",
690
+ "location"
691
+ ],
692
+ "properties": {
693
+ "code": {
694
+ "enum": [
695
+ "declaration-missing",
696
+ "declaration-ambiguous",
697
+ "declaration-unparseable",
698
+ "declaration-invalid",
699
+ "placement-invalid",
700
+ "reader-too-old",
701
+ "root-chant-required",
702
+ "not-a-git-repository",
703
+ "revision-unknown"
704
+ ]
705
+ },
706
+ "message": {
707
+ "type": "string"
708
+ },
709
+ "location": {
710
+ "oneOf": [
711
+ {
712
+ "type": "null"
713
+ },
714
+ {
715
+ "type": "object",
716
+ "required": [
717
+ "file",
718
+ "line",
719
+ "column"
720
+ ],
721
+ "properties": {
722
+ "file": {
723
+ "type": "string"
724
+ },
725
+ "line": {
726
+ "type": "integer",
727
+ "minimum": 1
728
+ },
729
+ "column": {
730
+ "type": "integer",
731
+ "minimum": 1
732
+ }
733
+ }
734
+ }
735
+ ]
736
+ }
737
+ }
738
+ },
739
+ "points": false
740
+ }
741
+ }
742
+ }
743
+ }