@intentius/chant 0.91.0 → 0.94.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 (361) 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/graph.d.ts.map +1 -1
  4. package/dist/cli/handlers/operator.d.ts +6 -0
  5. package/dist/cli/handlers/operator.d.ts.map +1 -1
  6. package/dist/cli/handlers/run.d.ts.map +1 -1
  7. package/dist/cli/main.d.ts.map +1 -1
  8. package/dist/cli/mcp/workspace-plugins.d.ts +6 -6
  9. package/dist/cli/mcp/workspace-tools.d.ts +2 -1
  10. package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
  11. package/dist/cli/plugins.d.ts.map +1 -1
  12. package/dist/cli/registry.d.ts +12 -2
  13. package/dist/cli/registry.d.ts.map +1 -1
  14. package/dist/codegen/pinned-upgrade.d.ts.map +1 -1
  15. package/dist/config.d.ts +22 -0
  16. package/dist/config.d.ts.map +1 -1
  17. package/dist/lexicon-module.d.ts +22 -0
  18. package/dist/lexicon-module.d.ts.map +1 -1
  19. package/dist/lifecycle/converge-ledger.d.ts +19 -0
  20. package/dist/lifecycle/converge-ledger.d.ts.map +1 -1
  21. package/dist/lifecycle/run-ledger.d.ts +2 -0
  22. package/dist/lifecycle/run-ledger.d.ts.map +1 -1
  23. package/dist/lifecycle/symptoms.d.ts +51 -0
  24. package/dist/lifecycle/symptoms.d.ts.map +1 -1
  25. package/dist/lint/rules/index.d.ts +4 -2
  26. package/dist/lint/rules/index.d.ts.map +1 -1
  27. package/dist/lint/rules/op/index.d.ts +14 -3
  28. package/dist/lint/rules/op/index.d.ts.map +1 -1
  29. package/dist/lint/rules/op/ops014-converge-rule-refusals.d.ts.map +1 -1
  30. package/dist/lint/rules/op/sys010-key-over-plain-http.d.ts +29 -0
  31. package/dist/lint/rules/op/sys010-key-over-plain-http.d.ts.map +1 -0
  32. package/dist/lint/rules/sys001-no-literal-key.d.ts +3 -0
  33. package/dist/lint/rules/sys001-no-literal-key.d.ts.map +1 -0
  34. package/dist/op/__fixtures__/decide-stub-backend.d.ts +53 -0
  35. package/dist/op/__fixtures__/decide-stub-backend.d.ts.map +1 -0
  36. package/dist/op/activities/activity-contracts.d.ts +201 -0
  37. package/dist/op/activities/activity-contracts.d.ts.map +1 -1
  38. package/dist/op/activities/apply.d.ts.map +1 -1
  39. package/dist/op/activities/change-coverage.d.ts +44 -0
  40. package/dist/op/activities/change-coverage.d.ts.map +1 -0
  41. package/dist/op/activities/converge.d.ts +24 -1
  42. package/dist/op/activities/converge.d.ts.map +1 -1
  43. package/dist/op/activities/decide.d.ts +107 -0
  44. package/dist/op/activities/decide.d.ts.map +1 -0
  45. package/dist/op/activities/index.d.ts +10 -0
  46. package/dist/op/activities/index.d.ts.map +1 -1
  47. package/dist/op/activities/shell.d.ts +32 -0
  48. package/dist/op/activities/shell.d.ts.map +1 -1
  49. package/dist/op/activities/source-release.d.ts +86 -0
  50. package/dist/op/activities/source-release.d.ts.map +1 -0
  51. package/dist/op/activities/source-rollback.d.ts +100 -0
  52. package/dist/op/activities/source-rollback.d.ts.map +1 -0
  53. package/dist/op/activities/work-evidence.d.ts +42 -0
  54. package/dist/op/activities/work-evidence.d.ts.map +1 -0
  55. package/dist/op/activity-contract.d.ts +1 -0
  56. package/dist/op/activity-contract.d.ts.map +1 -1
  57. package/dist/op/activity-profiles.d.ts +16 -0
  58. package/dist/op/activity-profiles.d.ts.map +1 -1
  59. package/dist/op/builders.d.ts +84 -2
  60. package/dist/op/builders.d.ts.map +1 -1
  61. package/dist/op/composites/converge-op.d.ts +31 -4
  62. package/dist/op/composites/converge-op.d.ts.map +1 -1
  63. package/dist/op/decide-backend.d.ts +116 -0
  64. package/dist/op/decide-backend.d.ts.map +1 -0
  65. package/dist/op/decide-config.d.ts +120 -0
  66. package/dist/op/decide-config.d.ts.map +1 -0
  67. package/dist/op/decide-read-inputs.d.ts +40 -0
  68. package/dist/op/decide-read-inputs.d.ts.map +1 -0
  69. package/dist/op/gate-wait.d.ts +43 -0
  70. package/dist/op/gate-wait.d.ts.map +1 -0
  71. package/dist/op/gate.d.ts +5 -2
  72. package/dist/op/gate.d.ts.map +1 -1
  73. package/dist/op/index.d.ts +11 -4
  74. package/dist/op/index.d.ts.map +1 -1
  75. package/dist/op/local-executor.d.ts +29 -4
  76. package/dist/op/local-executor.d.ts.map +1 -1
  77. package/dist/op/local-output.d.ts +2 -0
  78. package/dist/op/local-output.d.ts.map +1 -1
  79. package/dist/op/op-ir.d.ts +2 -0
  80. package/dist/op/op-ir.d.ts.map +1 -1
  81. package/dist/op/op-verb-class.d.ts.map +1 -1
  82. package/dist/op/operator.d.ts +97 -1
  83. package/dist/op/operator.d.ts.map +1 -1
  84. package/dist/op/runtime.d.ts +37 -5
  85. package/dist/op/runtime.d.ts.map +1 -1
  86. package/dist/op/runtimes/local.d.ts.map +1 -1
  87. package/dist/op/source-archive.d.ts +63 -0
  88. package/dist/op/source-archive.d.ts.map +1 -0
  89. package/dist/op/steward-points.d.ts +136 -0
  90. package/dist/op/steward-points.d.ts.map +1 -0
  91. package/dist/op/steward-turn.d.ts +53 -0
  92. package/dist/op/steward-turn.d.ts.map +1 -0
  93. package/dist/op/steward.d.ts +22 -1
  94. package/dist/op/steward.d.ts.map +1 -1
  95. package/dist/op/types.d.ts +7 -0
  96. package/dist/op/types.d.ts.map +1 -1
  97. package/dist/op/work-lease-run.d.ts +1 -1
  98. package/dist/op/work-lease-run.d.ts.map +1 -1
  99. package/dist/workspace/__fixtures__/decide-workspace.d.ts +100 -0
  100. package/dist/workspace/__fixtures__/decide-workspace.d.ts.map +1 -0
  101. package/dist/workspace/answers-ledger.d.ts +76 -0
  102. package/dist/workspace/answers-ledger.d.ts.map +1 -0
  103. package/dist/workspace/box-intent.d.ts +85 -0
  104. package/dist/workspace/box-intent.d.ts.map +1 -0
  105. package/dist/workspace/changes-cli.d.ts +16 -0
  106. package/dist/workspace/changes-cli.d.ts.map +1 -0
  107. package/dist/workspace/changes.d.ts +200 -0
  108. package/dist/workspace/changes.d.ts.map +1 -0
  109. package/dist/workspace/chant-migrations/chud-lexicon-exit-fly-site.d.ts +59 -0
  110. package/dist/workspace/chant-migrations/chud-lexicon-exit-fly-site.d.ts.map +1 -0
  111. package/dist/workspace/chant-migrations/chud-lexicon-exit-live-names.d.ts +51 -0
  112. package/dist/workspace/chant-migrations/chud-lexicon-exit-live-names.d.ts.map +1 -0
  113. package/dist/workspace/chant-migrations/chud-lexicon-exit-rollback.d.ts +26 -0
  114. package/dist/workspace/chant-migrations/chud-lexicon-exit-rollback.d.ts.map +1 -0
  115. package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-inputs.d.ts +59 -0
  116. package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-inputs.d.ts.map +1 -0
  117. package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-policy.d.ts +22 -0
  118. package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-policy.d.ts.map +1 -0
  119. package/dist/workspace/chant-migrations/chud-lexicon-exit.d.ts +71 -0
  120. package/dist/workspace/chant-migrations/chud-lexicon-exit.d.ts.map +1 -0
  121. package/dist/workspace/chant-migrations.d.ts +104 -0
  122. package/dist/workspace/chant-migrations.d.ts.map +1 -0
  123. package/dist/workspace/checks/boxes.d.ts +47 -1
  124. package/dist/workspace/checks/boxes.d.ts.map +1 -1
  125. package/dist/workspace/checks/diagrams.d.ts +31 -0
  126. package/dist/workspace/checks/diagrams.d.ts.map +1 -0
  127. package/dist/workspace/checks/records.d.ts +7 -0
  128. package/dist/workspace/checks/records.d.ts.map +1 -1
  129. package/dist/workspace/checks.d.ts +7 -0
  130. package/dist/workspace/checks.d.ts.map +1 -1
  131. package/dist/workspace/compose-graph.d.ts +2 -0
  132. package/dist/workspace/compose-graph.d.ts.map +1 -1
  133. package/dist/workspace/conformance/index.d.ts.map +1 -1
  134. package/dist/workspace/decide.d.ts +49 -4
  135. package/dist/workspace/decide.d.ts.map +1 -1
  136. package/dist/workspace/decision-points.schema.json +3 -3
  137. package/dist/workspace/declaration.d.ts +58 -0
  138. package/dist/workspace/declaration.d.ts.map +1 -1
  139. package/dist/workspace/declaration.schema.json +119 -1
  140. package/dist/workspace/declared-kinds.d.ts +20 -0
  141. package/dist/workspace/declared-kinds.d.ts.map +1 -1
  142. package/dist/workspace/generated-files.d.ts +7 -0
  143. package/dist/workspace/generated-files.d.ts.map +1 -1
  144. package/dist/workspace/intent-joins.d.ts +5 -5
  145. package/dist/workspace/intent.d.ts.map +1 -1
  146. package/dist/workspace/lineage-check.d.ts +3 -0
  147. package/dist/workspace/lineage-check.d.ts.map +1 -1
  148. package/dist/workspace/lineage-upgrade.d.ts +6 -1
  149. package/dist/workspace/lineage-upgrade.d.ts.map +1 -1
  150. package/dist/workspace/ls.d.ts +39 -1
  151. package/dist/workspace/ls.d.ts.map +1 -1
  152. package/dist/workspace/point-answer.schema.json +95 -0
  153. package/dist/workspace/points-cli.d.ts +2 -0
  154. package/dist/workspace/points-cli.d.ts.map +1 -1
  155. package/dist/workspace/points.d.ts +4 -6
  156. package/dist/workspace/points.d.ts.map +1 -1
  157. package/dist/workspace/reason-codes.d.ts +16 -2
  158. package/dist/workspace/reason-codes.d.ts.map +1 -1
  159. package/dist/workspace/records-cli.d.ts +11 -1
  160. package/dist/workspace/records-cli.d.ts.map +1 -1
  161. package/dist/workspace/records-close.d.ts +1 -1
  162. package/dist/workspace/records-close.d.ts.map +1 -1
  163. package/dist/workspace/records-write.d.ts +11 -5
  164. package/dist/workspace/records-write.d.ts.map +1 -1
  165. package/dist/workspace/records.d.ts +34 -4
  166. package/dist/workspace/records.d.ts.map +1 -1
  167. package/dist/workspace/status-gates.d.ts +7 -2
  168. package/dist/workspace/status-gates.d.ts.map +1 -1
  169. package/dist/workspace/status-stewards.d.ts +65 -1
  170. package/dist/workspace/status-stewards.d.ts.map +1 -1
  171. package/dist/workspace/status.d.ts +24 -0
  172. package/dist/workspace/status.d.ts.map +1 -1
  173. package/dist/workspace/work-cli.d.ts +113 -2
  174. package/dist/workspace/work-cli.d.ts.map +1 -1
  175. package/dist/workspace/work-evidence.d.ts +74 -0
  176. package/dist/workspace/work-evidence.d.ts.map +1 -0
  177. package/dist/workspace/work.d.ts +43 -1
  178. package/dist/workspace/work.d.ts.map +1 -1
  179. package/package.json +1 -1
  180. package/src/cli/commands/audit.test.ts +9 -1
  181. package/src/cli/commands/build.ts +3 -2
  182. package/src/cli/commands/lint.ts +7 -1
  183. package/src/cli/handlers/graph.test.ts +20 -0
  184. package/src/cli/handlers/graph.ts +16 -2
  185. package/src/cli/handlers/operator.ts +34 -2
  186. package/src/cli/handlers/run.test.ts +154 -2
  187. package/src/cli/handlers/run.ts +121 -2
  188. package/src/cli/main.test.ts +10 -0
  189. package/src/cli/main.ts +23 -3
  190. package/src/cli/mcp/workspace-plugins.ts +6 -6
  191. package/src/cli/mcp/workspace-tools.test.ts +35 -19
  192. package/src/cli/mcp/workspace-tools.ts +62 -4
  193. package/src/cli/plugins.ts +11 -3
  194. package/src/cli/registry.ts +12 -2
  195. package/src/cli/serve-mcp-workspace.test.ts +6 -6
  196. package/src/codegen/pinned-upgrade.ts +2 -1
  197. package/src/codegen/release-wiring.test.ts +49 -2
  198. package/src/components/capability-plugin-loader.ts +3 -3
  199. package/src/components/cli-support.ts +2 -2
  200. package/src/config.ts +11 -0
  201. package/src/lexicon-module.ts +56 -1
  202. package/src/lexicon-package.test.ts +96 -0
  203. package/src/lifecycle/converge-ledger.ts +20 -0
  204. package/src/lifecycle/run-ledger.ts +6 -0
  205. package/src/lifecycle/symptoms.ts +95 -0
  206. package/src/lint/rules/index.ts +6 -2
  207. package/src/lint/rules/op/index.ts +17 -4
  208. package/src/lint/rules/op/ops014-converge-rule-refusals.test.ts +23 -1
  209. package/src/lint/rules/op/ops014-converge-rule-refusals.ts +10 -6
  210. package/src/lint/rules/op/sys010-key-over-plain-http.test.ts +52 -0
  211. package/src/lint/rules/op/sys010-key-over-plain-http.ts +100 -0
  212. package/src/lint/rules/sys001-no-literal-key.test.ts +31 -0
  213. package/src/lint/rules/sys001-no-literal-key.ts +67 -0
  214. package/src/op/__fixtures__/decide-stub-backend.ts +143 -0
  215. package/src/op/activities/activity-contracts.ts +190 -1
  216. package/src/op/activities/apply.ts +7 -6
  217. package/src/op/activities/change-coverage.ts +60 -0
  218. package/src/op/activities/converge.test.ts +55 -1
  219. package/src/op/activities/converge.ts +208 -29
  220. package/src/op/activities/decide.live.test.ts +78 -0
  221. package/src/op/activities/decide.test.ts +308 -0
  222. package/src/op/activities/decide.ts +267 -0
  223. package/src/op/activities/index.ts +21 -0
  224. package/src/op/activities/shell.test.ts +91 -1
  225. package/src/op/activities/shell.ts +91 -2
  226. package/src/op/activities/source-release.test.ts +118 -0
  227. package/src/op/activities/source-release.ts +168 -0
  228. package/src/op/activities/source-rollback.test.ts +131 -0
  229. package/src/op/activities/source-rollback.ts +239 -0
  230. package/src/op/activities/work-evidence.ts +62 -0
  231. package/src/op/activity-contract-registry.test.ts +2 -0
  232. package/src/op/activity-contract-registry.ts +2 -2
  233. package/src/op/activity-contract.test.ts +12 -0
  234. package/src/op/activity-contract.ts +6 -1
  235. package/src/op/activity-profiles.ts +29 -0
  236. package/src/op/activity-registry.test.ts +1 -1
  237. package/src/op/activity-registry.ts +2 -2
  238. package/src/op/builders.ts +119 -5
  239. package/src/op/command-gate.test.ts +192 -0
  240. package/src/op/composites/converge-op.test.ts +27 -1
  241. package/src/op/composites/converge-op.ts +69 -15
  242. package/src/op/decide-backend.test.ts +44 -0
  243. package/src/op/decide-backend.ts +212 -0
  244. package/src/op/decide-config.test.ts +52 -0
  245. package/src/op/decide-config.ts +80 -0
  246. package/src/op/decide-read-inputs.ts +117 -0
  247. package/src/op/gate-approval.ts +2 -2
  248. package/src/op/gate-wait.ts +57 -0
  249. package/src/op/gate.ts +8 -3
  250. package/src/op/generate-pipeline.ts +2 -2
  251. package/src/op/index.ts +18 -3
  252. package/src/op/local-executor.ts +151 -15
  253. package/src/op/local-output.test.ts +33 -0
  254. package/src/op/local-output.ts +20 -2
  255. package/src/op/op-ir.test.ts +10 -0
  256. package/src/op/op-ir.ts +4 -0
  257. package/src/op/op-verb-class.ts +1 -0
  258. package/src/op/operator.ts +290 -11
  259. package/src/op/runtime.ts +31 -8
  260. package/src/op/runtimes/local.ts +3 -1
  261. package/src/op/source-archive.ts +161 -0
  262. package/src/op/steward-points.test.ts +364 -0
  263. package/src/op/steward-points.ts +194 -0
  264. package/src/op/steward-turn.ts +79 -0
  265. package/src/op/steward.test.ts +87 -3
  266. package/src/op/steward.ts +25 -1
  267. package/src/op/types.ts +7 -0
  268. package/src/op/work-lease-run.test.ts +20 -1
  269. package/src/op/work-lease-run.ts +2 -2
  270. package/src/workspace/__fixtures__/decide-workspace.ts +129 -0
  271. package/src/workspace/__fixtures__/studio-template-84c8b21.json +67 -0
  272. package/src/workspace/answers-ledger.ts +118 -0
  273. package/src/workspace/box-intent.test.ts +205 -0
  274. package/src/workspace/box-intent.ts +159 -0
  275. package/src/workspace/changes-cli.ts +56 -0
  276. package/src/workspace/changes.schema.json +472 -0
  277. package/src/workspace/changes.test.ts +315 -0
  278. package/src/workspace/changes.ts +512 -0
  279. package/src/workspace/chant-migrations/chud-lexicon-exit-fly-site.ts +234 -0
  280. package/src/workspace/chant-migrations/chud-lexicon-exit-live-names.ts +164 -0
  281. package/src/workspace/chant-migrations/chud-lexicon-exit-rollback.ts +223 -0
  282. package/src/workspace/chant-migrations/chud-lexicon-exit-ship-inputs.ts +195 -0
  283. package/src/workspace/chant-migrations/chud-lexicon-exit-ship-policy.ts +108 -0
  284. package/src/workspace/chant-migrations/chud-lexicon-exit.ts +882 -0
  285. package/src/workspace/chant-migrations.e2e.test.ts +1089 -0
  286. package/src/workspace/chant-migrations.ts +169 -0
  287. package/src/workspace/check-contract.test.ts +4 -2
  288. package/src/workspace/check.schema.json +19 -5
  289. package/src/workspace/checks/boxes.test.ts +82 -2
  290. package/src/workspace/checks/boxes.ts +202 -1
  291. package/src/workspace/checks/diagrams.test.ts +134 -0
  292. package/src/workspace/checks/diagrams.ts +108 -0
  293. package/src/workspace/checks/records.ts +47 -0
  294. package/src/workspace/checks.ts +20 -2
  295. package/src/workspace/compose-graph.ts +2 -0
  296. package/src/workspace/conformance/__fixture__/decisions/decision.kind.mjs +10 -0
  297. package/src/workspace/conformance/__fixture__/decisions/decision.schema.json +26 -0
  298. package/src/workspace/conformance/index.ts +5 -0
  299. package/src/workspace/decide.test.ts +1 -1
  300. package/src/workspace/decide.ts +156 -23
  301. package/src/workspace/decision-points.schema.json +3 -3
  302. package/src/workspace/declaration.schema.json +119 -1
  303. package/src/workspace/declaration.test.ts +58 -0
  304. package/src/workspace/declaration.ts +112 -0
  305. package/src/workspace/declared-kinds.test.ts +31 -5
  306. package/src/workspace/declared-kinds.ts +46 -1
  307. package/src/workspace/generated-files.ts +14 -0
  308. package/src/workspace/graph-cli.ts +1 -1
  309. package/src/workspace/graph.schema.json +9 -1
  310. package/src/workspace/intent-joins.test.ts +5 -5
  311. package/src/workspace/intent-joins.ts +5 -5
  312. package/src/workspace/intent.schema.json +8 -2
  313. package/src/workspace/intent.ts +3 -10
  314. package/src/workspace/lineage-check.ts +16 -1
  315. package/src/workspace/lineage-upgrade-cli.ts +1 -1
  316. package/src/workspace/lineage-upgrade.test.ts +70 -0
  317. package/src/workspace/lineage-upgrade.ts +81 -10
  318. package/src/workspace/ls-contract.test.ts +57 -0
  319. package/src/workspace/ls.schema.json +46 -1
  320. package/src/workspace/ls.ts +62 -3
  321. package/src/workspace/points-cli.ts +17 -3
  322. package/src/workspace/points-write.schema.json +11 -1
  323. package/src/workspace/points.schema.json +51 -0
  324. package/src/workspace/points.test.ts +16 -15
  325. package/src/workspace/points.ts +5 -17
  326. package/src/workspace/read-contract.test.ts +9 -1
  327. package/src/workspace/reason-codes.test.ts +18 -8
  328. package/src/workspace/reason-codes.ts +21 -2
  329. package/src/workspace/records-amend.schema.json +2 -0
  330. package/src/workspace/records-cli.ts +27 -4
  331. package/src/workspace/records-close.schema.json +2 -0
  332. package/src/workspace/records-formats.test.ts +15 -15
  333. package/src/workspace/records-new.schema.json +2 -0
  334. package/src/workspace/records-review.schema.json +2 -0
  335. package/src/workspace/records-sessions-write.e2e.test.ts +77 -0
  336. package/src/workspace/records-sessions-write.test.ts +2 -34
  337. package/src/workspace/records-since.test.ts +8 -7
  338. package/src/workspace/records-write.e2e.test.ts +108 -0
  339. package/src/workspace/records-write.test.ts +32 -41
  340. package/src/workspace/records-write.ts +33 -15
  341. package/src/workspace/records.schema.json +36 -2
  342. package/src/workspace/records.test.ts +49 -4
  343. package/src/workspace/records.ts +109 -3
  344. package/src/workspace/status-contract.test.ts +14 -8
  345. package/src/workspace/status-gates.ts +9 -4
  346. package/src/workspace/status-stewards.ts +155 -5
  347. package/src/workspace/status.schema.json +129 -8
  348. package/src/workspace/status.ts +46 -1
  349. package/src/workspace/work-acceptance.test.ts +274 -0
  350. package/src/workspace/{work-cli.test.ts → work-cli.e2e.test.ts} +1 -1
  351. package/src/workspace/work-cli.ts +193 -10
  352. package/src/workspace/work-evidence.schema.json +212 -0
  353. package/src/workspace/work-evidence.ts +169 -0
  354. package/src/workspace/work-history.schema.json +349 -0
  355. package/src/workspace/work-history.test.ts +156 -0
  356. package/src/workspace/{work-readiness-chud.test.ts → work-readiness.test.ts} +30 -32
  357. package/src/workspace/work.test.ts +20 -2
  358. package/src/workspace/work.ts +100 -1
  359. /package/src/cli/{discovery-skip.test.ts → discovery-skip.e2e.test.ts} +0 -0
  360. /package/src/workspace/conformance/{conformance.test.ts → conformance.e2e.test.ts} +0 -0
  361. /package/src/workspace/{which-chant.test.ts → which-chant.e2e.test.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"work-lease-run.d.ts","sourceRoot":"","sources":["../../src/op/work-lease-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;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,iFAAiF;IACjF,OAAO,CAAC,UAAU;IAclB;;;;;OAKG;IACG,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAwCjF;;;;OAIG;YACW,YAAY;IAqB1B,OAAO,CAAC,IAAI;IAOZ,wFAAwF;YAC1E,KAAK;IAyBnB,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,aAAa;IAKrB;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;IAgB/B;;;;OAIG;IACG,MAAM,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,EAAE,WAAW,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAkClI"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * A throwaway workspace for the decide tests: a git repository with an answer
3
+ * kind (the reference workspace's), a task kind the points read through the
4
+ * read contract, three points (a noul, a choice and a score), and a box member
5
+ * that declares one brokered capability and one without a broker.
6
+ */
7
+ /** The chant checkout the tests run in. */
8
+ export declare const REPO: string;
9
+ export declare const MODEL = "jev-1.13.0";
10
+ export declare const POINTS: {
11
+ points: {
12
+ triage: {
13
+ title: string;
14
+ question: {
15
+ type: string;
16
+ instructions: string;
17
+ criteria: {
18
+ true: string;
19
+ false: string;
20
+ };
21
+ };
22
+ inputs: {
23
+ "record.size": string;
24
+ "record.risky": string;
25
+ };
26
+ deciders: ({
27
+ kind: string;
28
+ backend: string;
29
+ model: string;
30
+ threshold: number;
31
+ } | {
32
+ kind: string;
33
+ rows: {
34
+ when: {
35
+ "record.size": number;
36
+ };
37
+ answer: boolean;
38
+ }[];
39
+ count?: undefined;
40
+ } | {
41
+ kind: string;
42
+ count: number;
43
+ rows?: undefined;
44
+ })[];
45
+ };
46
+ route: {
47
+ title: string;
48
+ question: {
49
+ type: string;
50
+ instructions: string;
51
+ criteria: {
52
+ platform: string;
53
+ app: string;
54
+ docs: string;
55
+ };
56
+ };
57
+ inputs: {
58
+ "record.title": string;
59
+ "record.size": string;
60
+ };
61
+ deciders: ({
62
+ kind: string;
63
+ backend: string;
64
+ model: string;
65
+ threshold: number;
66
+ } | {
67
+ kind: string;
68
+ count: number;
69
+ })[];
70
+ };
71
+ effort: {
72
+ title: string;
73
+ question: {
74
+ type: string;
75
+ instructions: string;
76
+ criteria: string[];
77
+ };
78
+ inputs: {
79
+ "record.size": string;
80
+ "member.kind": string;
81
+ };
82
+ deciders: ({
83
+ kind: string;
84
+ backend: string;
85
+ model: string;
86
+ threshold: number;
87
+ } | {
88
+ kind: string;
89
+ count: number;
90
+ })[];
91
+ };
92
+ };
93
+ };
94
+ export declare function cleanScratch(): void;
95
+ export declare function git(cwd: string, ...args: string[]): string;
96
+ /** Make the workspace and commit it. Returns its root. */
97
+ export declare function workspace(points?: unknown): string;
98
+ /** The front matter text of a written record. */
99
+ export declare const recordText: (root: string, path: string) => string;
100
+ //# sourceMappingURL=decide-workspace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decide-workspace.d.ts","sourceRoot":"","sources":["../../../src/workspace/__fixtures__/decide-workspace.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,2CAA2C;AAC3C,eAAO,MAAM,IAAI,QAAwE,CAAC;AAG1F,eAAO,MAAM,KAAK,eAAe,CAAC;AAIlC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBlB,CAAC;AAkCF,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAE1D;AAED,0DAA0D;AAC1D,wBAAgB,SAAS,CAAC,MAAM,GAAE,OAAgB,GAAG,MAAM,CAyC1D;AAED,iDAAiD;AACjD,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,KAAG,MAAiD,CAAC"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Answer records held on the lifecycle ledger (#2786).
3
+ *
4
+ * A steward's writes never touch the checkout's index or working tree
5
+ * (`../op/steward.ts`): the working tree is the coding agent's. A decision
6
+ * point asked in a steward's turn still has to leave its question somewhere a
7
+ * person finds it after the turn ends, and an Op's leased worktree is removed
8
+ * with the run. So a question asked in a steward's turn is written to
9
+ * `chant/lifecycle`, beside the lease histories and run records, under
10
+ * `_answers/<kind name>/<id>.md` in the ledger of the member that owns the
11
+ * answer kind. The file is the same Markdown record the kind's directory
12
+ * would hold, and it is written with git plumbing, like every ledger write.
13
+ *
14
+ * Readers see the ledger's answers as if they sat in the kind's directory:
15
+ * {@link withLedgerAnswers} lays them over the working tree, so `points`,
16
+ * `points --open`, a later `points ask` of the same question and `points
17
+ * answer` all find them. A record on the ledger wins over a file of the same
18
+ * name in the tree, because the ledger copy is the one a steward rewrote.
19
+ * People's answer to a question held on the ledger is written back there, so
20
+ * answering through hud in a box does not touch the checkout either.
21
+ *
22
+ * `points --at <rev>` reads a revision of the working branch, which the
23
+ * ledger is not part of, so it lists the tree's records only.
24
+ */
25
+ import type { RecordSource } from "./record-source.js";
26
+ /** The directory on `chant/lifecycle`, under the member's prefix, that holds answer records. */
27
+ export declare const ANSWERS_LEDGER_DIR = "_answers";
28
+ /** One answer record on the ledger. */
29
+ export interface LedgerAnswer {
30
+ /** Where the record reads as being: the kind's directory, from the repository root. */
31
+ path: string;
32
+ /** Where it is: `chant/lifecycle:<path on the branch>`, which `git show` reads. */
33
+ ledger: string;
34
+ text: string;
35
+ /** Its blob sha, for a compare-and-set rewrite. */
36
+ sha: string;
37
+ }
38
+ /** The answer records one kind holds on the ledger. */
39
+ export interface LedgerAnswers {
40
+ /** Where the ledger is resolved from: the kind file's directory, so the member owning the kind owns its answers. */
41
+ cwd: string;
42
+ /** The directory on the branch, relative to the member's prefix. */
43
+ dir: string;
44
+ /** The kind's records directory, from the repository root. */
45
+ dirRel: string;
46
+ /** By the path each record reads as. */
47
+ byPath: Map<string, LedgerAnswer>;
48
+ }
49
+ /** The ledger directory of the kind named `kindName`. */
50
+ export declare function answersLedgerDir(kindName: string): string;
51
+ /**
52
+ * Read the answer records the kind at `kindFile` holds on the ledger. Empty
53
+ * when there are none, when there is no ledger branch, and outside a git
54
+ * repository.
55
+ */
56
+ export declare function readLedgerAnswers(kind: {
57
+ file: string;
58
+ name: string;
59
+ dirRel: string;
60
+ }): Promise<LedgerAnswers>;
61
+ /** `base` with each ledger answer at the path it reads as, over any file of the same name. */
62
+ export declare function withLedgerAnswers(base: RecordSource, answers: LedgerAnswers): RecordSource;
63
+ /** Fetch `chant/lifecycle` before a ledger write when it fast-forwards, so a question another clone asked is found. Best effort. */
64
+ export declare function refreshLedger(kindFile: string): Promise<void>;
65
+ /**
66
+ * Write the record read as `path` to the ledger, expecting the blob it had
67
+ * when it was read (`prior`, null for a new record), then push the branch.
68
+ * A changed blob throws `RefCASConflictError` from `../lifecycle/git`. The
69
+ * push is best effort: a question that did not reach the remote is still
70
+ * open here. Returns where the record went.
71
+ */
72
+ export declare function writeLedgerAnswer(answers: LedgerAnswers, path: string, text: string, message: string, prior: string | null): Promise<{
73
+ ledger: string;
74
+ pushed: boolean;
75
+ }>;
76
+ //# sourceMappingURL=answers-ledger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"answers-ledger.d.ts","sourceRoot":"","sources":["../../src/workspace/answers-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,gGAAgG;AAChG,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAI7C,uCAAuC;AACvC,MAAM,WAAW,YAAY;IAC3B,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,GAAG,EAAE,MAAM,CAAC;CACb;AAED,uDAAuD;AACvD,MAAM,WAAW,aAAa;IAC5B,oHAAoH;IACpH,GAAG,EAAE,MAAM,CAAC;IACZ,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;IACZ,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CACnC;AAED,yDAAyD;AACzD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzD;AAMD;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAmBpH;AAED,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,GAAG,YAAY,CAI1F;AAED,oIAAoI;AACpI,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnE;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC,CAK/K"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * A box's intent (#2850): the decision record its box block names.
3
+ *
4
+ * A new box starts as a question, and the first answer to it is what the box
5
+ * is for. That answer is a decision record, so the intent graph, hud and a
6
+ * box's runtime all read the same thing. The box block names the record's
7
+ * id in `intent`; the record is looked for among the records of every
8
+ * declared kind named `decision` (the entry's `name`, or the kind file's
9
+ * `recordKind.name`), read from the working tree through the same reader as
10
+ * `chant workspace records`.
11
+ *
12
+ * `chant workspace status --json` reports the record's state and answer
13
+ * under the member's `box.intent`, and `chant workspace check` fails when no
14
+ * decision record has the id (WSP126) and warns when the record constrains
15
+ * no member or path of this workspace at all (WSP127, #2857): the member it
16
+ * names need not be the box's own, since a decision naming another member
17
+ * can be what the box is for, such as the app it runs.
18
+ */
19
+ import { type DeclaredKind } from "./declared-kinds.js";
20
+ import type { Declaration } from "./declaration.js";
21
+ /** The declared kind name a box's intent is looked for in. */
22
+ export declare const INTENT_KIND_NAME = "decision";
23
+ /** A box's intent as `status --json` reports it: the record's id, state and answer. */
24
+ export interface BoxIntent {
25
+ id: string;
26
+ /** The record's state, such as proposed or decided, or null when no decision record has the id. */
27
+ state: string | null;
28
+ question: string | null;
29
+ /** The record's choice as written, such as `{ option, reason }`, or null while it is proposed. */
30
+ choice: unknown;
31
+ /** The chosen option's label, from `options[]`, or null while no option is chosen. */
32
+ answer: string | null;
33
+ decided_by: string | null;
34
+ decided_on: string | null;
35
+ }
36
+ /** The decision record a box's intent names, as the checks read it. */
37
+ export interface ResolvedBoxIntent {
38
+ member: string;
39
+ id: string;
40
+ /** The `intent` field's JSON Pointer in the declaration. */
41
+ pointer: string;
42
+ /** The record, or null when no decision record has the id. */
43
+ record: {
44
+ /** The kind file that holds it, from the workspace root. */
45
+ kind: string;
46
+ /** The record file, from the repository root. */
47
+ path: string;
48
+ /** The record's constrains entries, as written. */
49
+ constrains: string[];
50
+ intent: BoxIntent;
51
+ } | null;
52
+ /** Why no record was found when none was, such as no declared decision kind. Empty when one was found. */
53
+ why: string;
54
+ }
55
+ /** The intent of `id` with no record: every field but the id null. */
56
+ export declare function unresolvedIntent(id: string): BoxIntent;
57
+ /**
58
+ * Resolve the intent of every box that names one, reading the records of each
59
+ * declared decision kind once. `kinds` are the declared kinds already loaded,
60
+ * when the caller has them. Only the working tree is read.
61
+ */
62
+ export declare function resolveBoxIntents(declaration: Declaration, root: string, kinds?: readonly DeclaredKind[]): Promise<ResolvedBoxIntent[]>;
63
+ /**
64
+ * Whether a constrains entry covers something of the box: `member:<name>`, or
65
+ * a `path:` entry that is the member's directory, a directory above it or a
66
+ * path inside it.
67
+ */
68
+ export declare function constrainsBox(entry: string, member: {
69
+ name: string;
70
+ dir: string;
71
+ }): boolean;
72
+ /**
73
+ * Whether a constrains entry names a member or path of this workspace at
74
+ * all: `member:<name>` for any declared member, or a `path:` entry that is
75
+ * some member's directory, a directory above it or a path inside it. An
76
+ * intent's constrains can govern a member other than the one whose box
77
+ * names it (a box run by one member can be what a decision about another
78
+ * member's app is for), so this asks only whether the entry is real, not
79
+ * whether it reaches a particular member.
80
+ */
81
+ export declare function constrainsWorkspace(entry: string, members: readonly {
82
+ name: string;
83
+ dir: string;
84
+ }[]): boolean;
85
+ //# sourceMappingURL=box-intent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"box-intent.d.ts","sourceRoot":"","sources":["../../src/workspace/box-intent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAU,MAAM,eAAe,CAAC;AAIzD,8DAA8D;AAC9D,eAAO,MAAM,gBAAgB,aAAa,CAAC;AAE3C,uFAAuF;AACvF,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,mGAAmG;IACnG,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,kGAAkG;IAClG,MAAM,EAAE,OAAO,CAAC;IAChB,sFAAsF;IACtF,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,uEAAuE;AACvE,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,MAAM,EAAE;QACN,4DAA4D;QAC5D,IAAI,EAAE,MAAM,CAAC;QACb,iDAAiD;QACjD,IAAI,EAAE,MAAM,CAAC;QACb,mDAAmD;QACnD,UAAU,EAAE,MAAM,EAAE,CAAC;QACrB,MAAM,EAAE,SAAS,CAAC;KACnB,GAAG,IAAI,CAAC;IACT,0GAA0G;IAC1G,GAAG,EAAE,MAAM,CAAC;CACb;AAYD,sEAAsE;AACtE,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,CAEtD;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,YAAY,EAAE,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAiD7I;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAQ3F;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,OAAO,CAE7G"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * `chant workspace check --changes <base>..<head> [--work <id>] [--severity
3
+ * off|warn|fail] [--kind <kind file>...] [--json]` (#2773): the forward
4
+ * coverage check (`changes.ts`), printed as JSON with `--json` or as one line
5
+ * per changed path, then the findings.
6
+ */
7
+ import type { CommandContext } from "../cli/registry.js";
8
+ import { type ChangesDocument } from "./changes.js";
9
+ type Result = Exclude<ChangesDocument, {
10
+ error: unknown;
11
+ }>;
12
+ /** One line per changed path, then the findings and a summary. */
13
+ export declare function formatChanges(doc: Result): string;
14
+ export declare function runWorkspaceChanges(ctx: CommandContext, cwd: string): Promise<number>;
15
+ export {};
16
+ //# sourceMappingURL=changes-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changes-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/changes-cli.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAmC,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAKlF,KAAK,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAE3D,kEAAkE;AAClE,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAmBjD;AAED,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAgB3F"}
@@ -0,0 +1,200 @@
1
+ /**
2
+ * The forward coverage check: `chant workspace check --changes
3
+ * <base>..<head>` (#2773).
4
+ *
5
+ * `graph --intent` reads the join between records and code backwards, from a
6
+ * region to the decisions and work items whose `constrains` cover it. This
7
+ * reads it forwards. Each path a diff changes is mapped to the current
8
+ * records whose `constrains` cover it, and two gaps are findings with closed
9
+ * codes:
10
+ *
11
+ * - `change-uncovered`: no current decided record and no open work item
12
+ * covers the path, by a `path:` entry that is the path or a directory
13
+ * above it, or by the `member:` of the member holding it.
14
+ * - `change-out-of-scope`: a record in hand for the change lists the path in
15
+ * its `out_of_scope` (the field its kind names in `outOfScope`). With
16
+ * `--work <id>`, the records in hand are that work item and the decisions it
17
+ * implements; without it, every current record that covers some path the
18
+ * diff changes.
19
+ *
20
+ * A path the declaration's `changes.ignore` globs match is listed as
21
+ * `ignored`, and a record file of a kind read as `record`: a change to the
22
+ * records is the coverage itself. The declaration's `changes.severity` says
23
+ * what a finding does: `off` reports none, `warn` (the default) reports them
24
+ * and passes, `fail` reports them and fails. Nothing here runs unless the
25
+ * check is asked for, so a workspace that never asks pays nothing.
26
+ *
27
+ * Records are read at `<head>`, so a change that adds the work item covering
28
+ * it is covered. Each finding carries `triage`, the `{ finding, region }` a
29
+ * work item's `source` takes (`work.schema.json`'s `sourceGap`), so the
30
+ * finding-triage decision point (#2741) can seed a work item or a decision
31
+ * from it; see {@link changeFindingSource}. When a work kind is read, each
32
+ * finding also says whether a work item already addresses it, the way `graph
33
+ * --intent` says it for its own findings (#2683), and
34
+ * {@link changeFindingTriageInputs} turns a finding into that point's inputs
35
+ * (#2794). Git is read through a local `git` subprocess only: no fetch, no
36
+ * network.
37
+ */
38
+ import { type ChangeSeverity } from "./declaration.js";
39
+ /** The version of the `changes` document this chant writes. */
40
+ export declare const CHANGES_CONTRACT_VERSION = 1;
41
+ /** `$id` of the JSON Schema for the document, shipped beside this file. */
42
+ export declare const CHANGES_OUTPUT_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/changes/v1/changes.schema.json";
43
+ /** The finding codes. Closed: a reader may switch on them. */
44
+ export declare const CHANGES_FINDING_CODES: readonly ["change-uncovered", "change-out-of-scope"];
45
+ export type ChangesFindingCode = (typeof CHANGES_FINDING_CODES)[number];
46
+ /** Why the check failed as a whole: the declaration's codes, the record kind's, or a `--work` item no record has. */
47
+ export declare const CHANGES_ERROR_CODES: readonly ["declaration-missing", "declaration-ambiguous", "declaration-unparseable", "declaration-invalid", "placement-invalid", "reader-too-old", "root-chant-required", "not-a-git-repository", "revision-unknown", "kind-unreadable", "kind-invalid", "schema-unreadable", "schema-id-mismatch", "schema-invalid", "location-missing", "work-item-unknown"];
48
+ export type ChangesErrorCode = (typeof CHANGES_ERROR_CODES)[number];
49
+ export declare const CHANGE_SEVERITIES: readonly ["off", "warn", "fail"];
50
+ /** A record, as `<kind name>/<id>`, and the entry that ties it to the path. */
51
+ export interface ChangeRecordRef {
52
+ record: string;
53
+ state: string | null;
54
+ /** The constrains or out_of_scope entry. */
55
+ entry: string;
56
+ }
57
+ export type ChangeStatus = "covered" | "uncovered" | "out-of-scope" | "ignored" | "record";
58
+ export interface ChangedPath {
59
+ /** From the workspace root. */
60
+ path: string;
61
+ change: "added" | "modified" | "deleted" | "renamed";
62
+ /** For a rename, the path it had at base. */
63
+ from: string | null;
64
+ /** The member whose directory holds the path, or null. */
65
+ member: string | null;
66
+ /** Whether the path is a generated file, as `graph --intent` reads a region's `generated` (#2794). */
67
+ generated: boolean;
68
+ status: ChangeStatus;
69
+ /** The current records covering the path, with the entry that covers it. */
70
+ coveredBy: ChangeRecordRef[];
71
+ /** The records in hand that put the path out of scope. */
72
+ outOfScopeBy: ChangeRecordRef[];
73
+ /** For an ignored path, the first glob that matched it. */
74
+ ignoredBy: string | null;
75
+ }
76
+ export interface ChangeFinding {
77
+ /** `finding:<code>:<path>`: one finding per path. */
78
+ id: string;
79
+ code: ChangesFindingCode;
80
+ path: string;
81
+ message: string;
82
+ severity: "warn" | "fail";
83
+ /** The records the finding concerns, as `<kind name>/<id>`: for out-of-scope, the records that put the path out. */
84
+ records: string[];
85
+ /** What a work item's `source` takes to name this gap (#2741): `{ finding, region }`. */
86
+ triage: {
87
+ finding: ChangesFindingCode;
88
+ region: string;
89
+ };
90
+ /**
91
+ * Present when a work kind was read (#2794): whether a work item addresses
92
+ * the finding, because its `source.finding` is this code and its
93
+ * `source.region` is this path or a directory above it.
94
+ */
95
+ addressed?: boolean;
96
+ /** Present when a work kind was read: the work items addressing the finding, as `<kind name>/<id>`, each with its state. */
97
+ addressedBy?: {
98
+ record: string;
99
+ state: string | null;
100
+ }[];
101
+ }
102
+ /** The inputs of the finding-triage decision point (#2741), by the names `decisions/points.json` declares. */
103
+ export type ChangeFindingTriageInputs = {
104
+ "finding.code": ChangesFindingCode;
105
+ "finding.message": string;
106
+ "finding.addressed": boolean;
107
+ "region.path": string;
108
+ "region.member": string | null;
109
+ "region.generated": boolean;
110
+ };
111
+ interface Head {
112
+ $schema: string;
113
+ contract: number;
114
+ chant: string;
115
+ }
116
+ export type ChangesDocument = (Head & {
117
+ workspace: {
118
+ name: string;
119
+ root: string;
120
+ };
121
+ range: {
122
+ spec: string;
123
+ base: string;
124
+ head: string;
125
+ };
126
+ severity: ChangeSeverity;
127
+ ignore: string[];
128
+ /** The work item in hand, from `--work`, or null. */
129
+ work: {
130
+ record: string;
131
+ state: string | null;
132
+ } | null;
133
+ kinds: {
134
+ file: string;
135
+ name: string;
136
+ role: "decision" | "work" | "other";
137
+ }[];
138
+ paths: ChangedPath[];
139
+ findings: ChangeFinding[];
140
+ summary: {
141
+ paths: number;
142
+ covered: number;
143
+ uncovered: number;
144
+ outOfScope: number;
145
+ ignored: number;
146
+ records: number;
147
+ };
148
+ /** False only when severity is fail and there are findings. */
149
+ ok: boolean;
150
+ }) | (Head & {
151
+ error: {
152
+ code: ChangesErrorCode;
153
+ message: string;
154
+ };
155
+ });
156
+ export interface ChangesQuery {
157
+ /** Where the walk up to the declaration starts. */
158
+ cwd: string;
159
+ /** `<base>..<head>`, `<base>...<head>` (from their merge base), or `<base>` alone, to HEAD. */
160
+ range: string;
161
+ /** Kind files, relative to `cwd`. Left out, every record kind the declaration names. */
162
+ kinds?: string[];
163
+ /** The id of the work item in hand, such as the item an Op's work lease holds. */
164
+ work?: string;
165
+ /** In place of the declaration's `changes.severity`. */
166
+ severity?: ChangeSeverity;
167
+ }
168
+ export interface ChangesResult {
169
+ doc: ChangesDocument;
170
+ /** The read failed, or severity is fail and there are findings. */
171
+ failed: boolean;
172
+ }
173
+ /** The `source` a work item seeded from this finding carries (`work.schema.json`'s `sourceGap`): the seam for the finding-triage point (#2741). */
174
+ export declare function changeFindingSource(finding: Pick<ChangeFinding, "code" | "path">): {
175
+ finding: ChangesFindingCode;
176
+ region: string;
177
+ };
178
+ /**
179
+ * The finding-triage point's inputs for a change finding and the entry in
180
+ * `paths` it fired on (#2794), for `askPoint` or the `decide` activity. The
181
+ * same names a caller fills from `graph --intent`'s finding and region nodes.
182
+ * The region is the changed file, so `region.generated` is never null. A
183
+ * document that read no work kind has no `addressed`, and it is passed as
184
+ * false: nothing that was read addresses the finding.
185
+ */
186
+ export declare function changeFindingTriageInputs(finding: Pick<ChangeFinding, "code" | "message" | "path" | "addressed">, path: Pick<ChangedPath, "path" | "member" | "generated">): ChangeFindingTriageInputs;
187
+ /** Run the check and build the document. Never throws a {@link WorkspaceReadError} or {@link RecordReadError}. */
188
+ export declare function checkChanges(query: ChangesQuery): Promise<ChangesResult>;
189
+ /**
190
+ * For a checkout on a work branch, `chant/work/[<member>/]<id>`, as an Op
191
+ * with `changesCheckout` works in (#2748): the range from where the branch
192
+ * left the main worktree's HEAD to its own HEAD, and the item's id. Undefined
193
+ * on any other branch.
194
+ */
195
+ export declare function workBranchChanges(cwd: string): {
196
+ range: string;
197
+ work: string;
198
+ } | undefined;
199
+ export {};
200
+ //# sourceMappingURL=changes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../src/workspace/changes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAMH,OAAO,EAAkG,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAYpJ,+DAA+D;AAC/D,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB,gFAAgF,CAAC;AAEtH,8DAA8D;AAC9D,eAAO,MAAM,qBAAqB,sDAKQ,CAAC;AAC3C,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,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,GAAG,QAAQ,GAAG,WAAW,CAAC,GACvD,yBAAyB,CAU3B;AA+ED,kHAAkH;AAClH,wBAAsB,YAAY,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,CAW9E;AA2KD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAmB1F"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * `chud-lexicon-exit-fly-site` (#2809): declare a migrated repo's Fly site
3
+ * with the fly lexicon's `FlySite` composite.
4
+ *
5
+ * `chud-lexicon-exit` (0.92.0) deleted deploy/site.ts, chud's `ChudLocalSite`
6
+ * composite, and removed chud's `FlySite` marker from deploy/fly.ts, so the
7
+ * repo declared no composite instance: `chant workspace graph --composites`
8
+ * listed none, and nothing told a reader the app component deploys the site.
9
+ * Per ws-056 the Fly resources stay on the fly lexicon. This migration:
10
+ *
11
+ * - rewrites deploy/fly.ts as one `FlySite` instance (`flySite`) with the
12
+ * values deploy/fly.ts and deploy/fly-machine.ts declared, and deletes
13
+ * deploy/fly-machine.ts, when the two declare exactly the template's
14
+ * resources (comments aside). The build's plan has the same App, Volume,
15
+ * IP, Secret and one Machine, which the release Op's `flyRelease` finds;
16
+ * - names `FlySite` in the app component's `composites`, so the listing joins
17
+ * the instance to the component.
18
+ *
19
+ * A site the project changed keeps its files, and the plan lists the
20
+ * composite as not moved. The plan is empty unless the app component is the
21
+ * one `chud-lexicon-exit` wrote and names no composites yet.
22
+ */
23
+ import type { ChantMigration } from "../chant-migrations.js";
24
+ export declare const CHUD_LEXICON_EXIT_FLY_SITE = "chud-lexicon-exit-fly-site";
25
+ /** The template's Fly site, as deploy/fly.ts and deploy/fly-machine.ts declare it. */
26
+ export interface FlySiteValues {
27
+ /** The import that gives the app's name, kept as it is: `import { appSlug } from "../app-name.ts";`. */
28
+ nameImport: string | null;
29
+ /** The expression the App's name is, as written. */
30
+ app: string;
31
+ region: string;
32
+ machine: string;
33
+ image: string;
34
+ port: string;
35
+ env: string;
36
+ cpuKind: string;
37
+ cpus: string;
38
+ memoryMb: string;
39
+ volume: {
40
+ name: string;
41
+ sizeGb: string;
42
+ path: string;
43
+ };
44
+ ip: string;
45
+ secret: {
46
+ name: string;
47
+ value: string;
48
+ };
49
+ }
50
+ /**
51
+ * The Fly site's values when deploy/fly.ts and deploy/fly-machine.ts declare
52
+ * exactly the template's resources (their comments aside), or null. A site
53
+ * the project changed is left in its files, and the plan says so.
54
+ */
55
+ export declare function readFlySite(fly: string, machine: string): FlySiteValues | null;
56
+ /** deploy/fly.ts declaring the site with the fly lexicon's FlySite composite. */
57
+ export declare function flySiteFile(v: FlySiteValues): string;
58
+ export declare const chudLexiconExitFlySite: ChantMigration;
59
+ //# sourceMappingURL=chud-lexicon-exit-fly-site.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chud-lexicon-exit-fly-site.d.ts","sourceRoot":"","sources":["../../../src/workspace/chant-migrations/chud-lexicon-exit-fly-site.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAsE,MAAM,qBAAqB,CAAC;AAE9H,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AASvE,sFAAsF;AACtF,MAAM,WAAW,aAAa;IAC5B,wGAAwG;IACxG,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACvD,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACzC;AAgDD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAuB9E;AAED,iFAAiF;AACjF,wBAAgB,WAAW,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM,CA4CpD;AAqDD,eAAO,MAAM,sBAAsB,EAAE,cAIpC,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * `chud-lexicon-exit-live-names` (#2833): join the migrated `app` component
3
+ * to the Machine its release Op ships to, so `chant components status --live`
4
+ * reads it reconciled instead of stale.
5
+ *
6
+ * `chud-lexicon-exit` (0.92.0) rewrote `deploy/app.component.ts` off chud's
7
+ * app component, and wrote no `liveNames` on it. `components status --live`
8
+ * joins a component to live entities by name (`Component.liveNames`, falling
9
+ * back to the component's own name), and the component is `app` while the
10
+ * Machine the release Op ships to is some other entity. With no `liveNames`,
11
+ * the identity fallback looks for an entity named `app`, finds none, and the
12
+ * status reads `stale` even right after a release.
13
+ *
14
+ * This migration adds `liveNames: [<name>]` to the app component chant
15
+ * wrote, deriving `<name>` from what the member's Fly resources actually
16
+ * declare (#2839) rather than assuming one: while `deploy/fly-machine.ts`
17
+ * still declares the Machine directly, it is the entity `server`, its own
18
+ * top-level export. Once chant#2809's `FlySite` migration has taken over
19
+ * (deploy/fly.ts declares the site with the fly lexicon's `FlySite`
20
+ * composite and `fly-machine.ts` is gone), the composite expands its
21
+ * `machine` member under the site's own instance name, so the Machine is
22
+ * `<instance>Machine` — `flySiteMachine` for the instance name the FlySite
23
+ * migration writes (`flySite`), but read from the file rather than assumed,
24
+ * since a person may rename the export. The two migrations run in registry
25
+ * order (`FlySite` first), so a fresh upgrade that takes both always sees the
26
+ * post-`FlySite` shape by the time this one plans.
27
+ *
28
+ * It looks for the component `chud-lexicon-exit` left (by its own comment and
29
+ * shape) and inserts the field after `dependsOn: [],` rather than next to
30
+ * `archetype` — chant#2809's `FlySite` migration recognises the component by
31
+ * the exact, contiguous text `archetype: "service",\n dependsOn: [],\n`, so
32
+ * anything inserted between those two lines (by either migration, in either
33
+ * order) would stop it from finding a component whose `composites` a person
34
+ * later removes. Anchoring after `dependsOn` instead keeps that pair intact
35
+ * whichever of the two migrations plans first.
36
+ *
37
+ * The plan is empty once `liveNames` already names the Machine this would
38
+ * derive. A component whose `liveNames` is exactly `["server"]` — this
39
+ * migration's own hardcoded output before #2839 — is corrected once the
40
+ * Machine it names is gone (`FlySite` has since taken over); any other
41
+ * hand-set value is left alone, on the same "by any hand" rule the empty
42
+ * case follows. It is a conflict when the component still reads as
43
+ * chud-lexicon-exit's but the `dependsOn: [],` line the edit anchors on is
44
+ * gone, or neither `deploy/fly.ts` nor `deploy/fly-machine.ts` says what the
45
+ * Machine's live name is — either way a person needs to add the mapping by
46
+ * hand.
47
+ */
48
+ import type { ChantMigration } from "../chant-migrations.js";
49
+ export declare const CHUD_LEXICON_EXIT_LIVE_NAMES = "chud-lexicon-exit-live-names";
50
+ export declare const chudLexiconExitLiveNames: ChantMigration;
51
+ //# sourceMappingURL=chud-lexicon-exit-live-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chud-lexicon-exit-live-names.d.ts","sourceRoot":"","sources":["../../../src/workspace/chant-migrations/chud-lexicon-exit-live-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAGH,OAAO,KAAK,EAAE,cAAc,EAA0E,MAAM,qBAAqB,CAAC;AAGlI,eAAO,MAAM,4BAA4B,iCAAiC,CAAC;AA2G3E,eAAO,MAAM,wBAAwB,EAAE,cAItC,CAAC"}