@intentius/chant 0.91.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 (344) 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-tools.d.ts +2 -1
  9. package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
  10. package/dist/cli/plugins.d.ts.map +1 -1
  11. package/dist/cli/registry.d.ts +12 -2
  12. package/dist/cli/registry.d.ts.map +1 -1
  13. package/dist/codegen/pinned-upgrade.d.ts.map +1 -1
  14. package/dist/config.d.ts +22 -0
  15. package/dist/config.d.ts.map +1 -1
  16. package/dist/lexicon-module.d.ts +22 -0
  17. package/dist/lexicon-module.d.ts.map +1 -1
  18. package/dist/lifecycle/converge-ledger.d.ts +19 -0
  19. package/dist/lifecycle/converge-ledger.d.ts.map +1 -1
  20. package/dist/lifecycle/run-ledger.d.ts +2 -0
  21. package/dist/lifecycle/run-ledger.d.ts.map +1 -1
  22. package/dist/lifecycle/symptoms.d.ts +51 -0
  23. package/dist/lifecycle/symptoms.d.ts.map +1 -1
  24. package/dist/lint/rules/index.d.ts +4 -2
  25. package/dist/lint/rules/index.d.ts.map +1 -1
  26. package/dist/lint/rules/op/index.d.ts +14 -3
  27. package/dist/lint/rules/op/index.d.ts.map +1 -1
  28. package/dist/lint/rules/op/ops014-converge-rule-refusals.d.ts.map +1 -1
  29. package/dist/lint/rules/op/sys010-key-over-plain-http.d.ts +29 -0
  30. package/dist/lint/rules/op/sys010-key-over-plain-http.d.ts.map +1 -0
  31. package/dist/lint/rules/sys001-no-literal-key.d.ts +3 -0
  32. package/dist/lint/rules/sys001-no-literal-key.d.ts.map +1 -0
  33. package/dist/op/__fixtures__/decide-stub-backend.d.ts +53 -0
  34. package/dist/op/__fixtures__/decide-stub-backend.d.ts.map +1 -0
  35. package/dist/op/activities/activity-contracts.d.ts +201 -0
  36. package/dist/op/activities/activity-contracts.d.ts.map +1 -1
  37. package/dist/op/activities/apply.d.ts.map +1 -1
  38. package/dist/op/activities/change-coverage.d.ts +44 -0
  39. package/dist/op/activities/change-coverage.d.ts.map +1 -0
  40. package/dist/op/activities/converge.d.ts +24 -1
  41. package/dist/op/activities/converge.d.ts.map +1 -1
  42. package/dist/op/activities/decide.d.ts +107 -0
  43. package/dist/op/activities/decide.d.ts.map +1 -0
  44. package/dist/op/activities/index.d.ts +10 -0
  45. package/dist/op/activities/index.d.ts.map +1 -1
  46. package/dist/op/activities/shell.d.ts +32 -0
  47. package/dist/op/activities/shell.d.ts.map +1 -1
  48. package/dist/op/activities/source-release.d.ts +86 -0
  49. package/dist/op/activities/source-release.d.ts.map +1 -0
  50. package/dist/op/activities/source-rollback.d.ts +100 -0
  51. package/dist/op/activities/source-rollback.d.ts.map +1 -0
  52. package/dist/op/activities/work-evidence.d.ts +42 -0
  53. package/dist/op/activities/work-evidence.d.ts.map +1 -0
  54. package/dist/op/activity-contract.d.ts +1 -0
  55. package/dist/op/activity-contract.d.ts.map +1 -1
  56. package/dist/op/activity-profiles.d.ts +16 -0
  57. package/dist/op/activity-profiles.d.ts.map +1 -1
  58. package/dist/op/builders.d.ts +84 -2
  59. package/dist/op/builders.d.ts.map +1 -1
  60. package/dist/op/composites/converge-op.d.ts +31 -4
  61. package/dist/op/composites/converge-op.d.ts.map +1 -1
  62. package/dist/op/decide-backend.d.ts +116 -0
  63. package/dist/op/decide-backend.d.ts.map +1 -0
  64. package/dist/op/decide-config.d.ts +120 -0
  65. package/dist/op/decide-config.d.ts.map +1 -0
  66. package/dist/op/decide-read-inputs.d.ts +40 -0
  67. package/dist/op/decide-read-inputs.d.ts.map +1 -0
  68. package/dist/op/gate-wait.d.ts +43 -0
  69. package/dist/op/gate-wait.d.ts.map +1 -0
  70. package/dist/op/gate.d.ts +5 -2
  71. package/dist/op/gate.d.ts.map +1 -1
  72. package/dist/op/index.d.ts +11 -4
  73. package/dist/op/index.d.ts.map +1 -1
  74. package/dist/op/local-executor.d.ts +29 -4
  75. package/dist/op/local-executor.d.ts.map +1 -1
  76. package/dist/op/local-output.d.ts +2 -0
  77. package/dist/op/local-output.d.ts.map +1 -1
  78. package/dist/op/op-ir.d.ts +2 -0
  79. package/dist/op/op-ir.d.ts.map +1 -1
  80. package/dist/op/op-verb-class.d.ts.map +1 -1
  81. package/dist/op/operator.d.ts +97 -1
  82. package/dist/op/operator.d.ts.map +1 -1
  83. package/dist/op/runtime.d.ts +37 -5
  84. package/dist/op/runtime.d.ts.map +1 -1
  85. package/dist/op/runtimes/local.d.ts.map +1 -1
  86. package/dist/op/source-archive.d.ts +63 -0
  87. package/dist/op/source-archive.d.ts.map +1 -0
  88. package/dist/op/steward-points.d.ts +136 -0
  89. package/dist/op/steward-points.d.ts.map +1 -0
  90. package/dist/op/steward-turn.d.ts +53 -0
  91. package/dist/op/steward-turn.d.ts.map +1 -0
  92. package/dist/op/steward.d.ts +22 -1
  93. package/dist/op/steward.d.ts.map +1 -1
  94. package/dist/op/types.d.ts +7 -0
  95. package/dist/op/types.d.ts.map +1 -1
  96. package/dist/op/work-lease-run.d.ts +1 -1
  97. package/dist/op/work-lease-run.d.ts.map +1 -1
  98. package/dist/workspace/__fixtures__/decide-workspace.d.ts +100 -0
  99. package/dist/workspace/__fixtures__/decide-workspace.d.ts.map +1 -0
  100. package/dist/workspace/answers-ledger.d.ts +76 -0
  101. package/dist/workspace/answers-ledger.d.ts.map +1 -0
  102. package/dist/workspace/changes-cli.d.ts +16 -0
  103. package/dist/workspace/changes-cli.d.ts.map +1 -0
  104. package/dist/workspace/changes.d.ts +200 -0
  105. package/dist/workspace/changes.d.ts.map +1 -0
  106. package/dist/workspace/chant-migrations/chud-lexicon-exit-fly-site.d.ts +59 -0
  107. package/dist/workspace/chant-migrations/chud-lexicon-exit-fly-site.d.ts.map +1 -0
  108. package/dist/workspace/chant-migrations/chud-lexicon-exit-live-names.d.ts +51 -0
  109. package/dist/workspace/chant-migrations/chud-lexicon-exit-live-names.d.ts.map +1 -0
  110. package/dist/workspace/chant-migrations/chud-lexicon-exit-rollback.d.ts +26 -0
  111. package/dist/workspace/chant-migrations/chud-lexicon-exit-rollback.d.ts.map +1 -0
  112. package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-inputs.d.ts +59 -0
  113. package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-inputs.d.ts.map +1 -0
  114. package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-policy.d.ts +22 -0
  115. package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-policy.d.ts.map +1 -0
  116. package/dist/workspace/chant-migrations/chud-lexicon-exit.d.ts +71 -0
  117. package/dist/workspace/chant-migrations/chud-lexicon-exit.d.ts.map +1 -0
  118. package/dist/workspace/chant-migrations.d.ts +99 -0
  119. package/dist/workspace/chant-migrations.d.ts.map +1 -0
  120. package/dist/workspace/checks/boxes.d.ts +34 -1
  121. package/dist/workspace/checks/boxes.d.ts.map +1 -1
  122. package/dist/workspace/checks/diagrams.d.ts +31 -0
  123. package/dist/workspace/checks/diagrams.d.ts.map +1 -0
  124. package/dist/workspace/checks/records.d.ts +7 -0
  125. package/dist/workspace/checks/records.d.ts.map +1 -1
  126. package/dist/workspace/checks.d.ts +3 -0
  127. package/dist/workspace/checks.d.ts.map +1 -1
  128. package/dist/workspace/compose-graph.d.ts +2 -0
  129. package/dist/workspace/compose-graph.d.ts.map +1 -1
  130. package/dist/workspace/conformance/index.d.ts.map +1 -1
  131. package/dist/workspace/decide.d.ts +49 -4
  132. package/dist/workspace/decide.d.ts.map +1 -1
  133. package/dist/workspace/declaration.d.ts +52 -0
  134. package/dist/workspace/declaration.d.ts.map +1 -1
  135. package/dist/workspace/declaration.schema.json +114 -1
  136. package/dist/workspace/declared-kinds.d.ts +20 -0
  137. package/dist/workspace/declared-kinds.d.ts.map +1 -1
  138. package/dist/workspace/generated-files.d.ts +7 -0
  139. package/dist/workspace/generated-files.d.ts.map +1 -1
  140. package/dist/workspace/intent.d.ts.map +1 -1
  141. package/dist/workspace/lineage-check.d.ts +3 -0
  142. package/dist/workspace/lineage-check.d.ts.map +1 -1
  143. package/dist/workspace/lineage-upgrade.d.ts +6 -1
  144. package/dist/workspace/lineage-upgrade.d.ts.map +1 -1
  145. package/dist/workspace/ls.d.ts +39 -1
  146. package/dist/workspace/ls.d.ts.map +1 -1
  147. package/dist/workspace/point-answer.schema.json +95 -0
  148. package/dist/workspace/points-cli.d.ts.map +1 -1
  149. package/dist/workspace/points.d.ts +1 -1
  150. package/dist/workspace/reason-codes.d.ts +14 -2
  151. package/dist/workspace/reason-codes.d.ts.map +1 -1
  152. package/dist/workspace/records-cli.d.ts +11 -1
  153. package/dist/workspace/records-cli.d.ts.map +1 -1
  154. package/dist/workspace/records-close.d.ts +1 -1
  155. package/dist/workspace/records-close.d.ts.map +1 -1
  156. package/dist/workspace/records-write.d.ts +11 -5
  157. package/dist/workspace/records-write.d.ts.map +1 -1
  158. package/dist/workspace/records.d.ts +34 -4
  159. package/dist/workspace/records.d.ts.map +1 -1
  160. package/dist/workspace/status-gates.d.ts +7 -2
  161. package/dist/workspace/status-gates.d.ts.map +1 -1
  162. package/dist/workspace/status-stewards.d.ts +59 -1
  163. package/dist/workspace/status-stewards.d.ts.map +1 -1
  164. package/dist/workspace/status.d.ts +16 -0
  165. package/dist/workspace/status.d.ts.map +1 -1
  166. package/dist/workspace/work-cli.d.ts +113 -2
  167. package/dist/workspace/work-cli.d.ts.map +1 -1
  168. package/dist/workspace/work-evidence.d.ts +74 -0
  169. package/dist/workspace/work-evidence.d.ts.map +1 -0
  170. package/dist/workspace/work.d.ts +43 -1
  171. package/dist/workspace/work.d.ts.map +1 -1
  172. package/package.json +1 -1
  173. package/src/cli/commands/audit.test.ts +9 -1
  174. package/src/cli/commands/build.ts +3 -2
  175. package/src/cli/commands/lint.ts +7 -1
  176. package/src/cli/handlers/graph.test.ts +20 -0
  177. package/src/cli/handlers/graph.ts +16 -2
  178. package/src/cli/handlers/operator.ts +34 -2
  179. package/src/cli/handlers/run.test.ts +154 -2
  180. package/src/cli/handlers/run.ts +121 -2
  181. package/src/cli/main.test.ts +10 -0
  182. package/src/cli/main.ts +19 -0
  183. package/src/cli/mcp/workspace-tools.test.ts +35 -19
  184. package/src/cli/mcp/workspace-tools.ts +62 -4
  185. package/src/cli/plugins.ts +11 -3
  186. package/src/cli/registry.ts +12 -2
  187. package/src/codegen/pinned-upgrade.ts +2 -1
  188. package/src/codegen/release-wiring.test.ts +49 -2
  189. package/src/components/capability-plugin-loader.ts +3 -3
  190. package/src/components/cli-support.ts +2 -2
  191. package/src/config.ts +11 -0
  192. package/src/lexicon-module.ts +56 -1
  193. package/src/lexicon-package.test.ts +96 -0
  194. package/src/lifecycle/converge-ledger.ts +20 -0
  195. package/src/lifecycle/run-ledger.ts +6 -0
  196. package/src/lifecycle/symptoms.ts +95 -0
  197. package/src/lint/rules/index.ts +6 -2
  198. package/src/lint/rules/op/index.ts +17 -4
  199. package/src/lint/rules/op/ops014-converge-rule-refusals.test.ts +23 -1
  200. package/src/lint/rules/op/ops014-converge-rule-refusals.ts +10 -6
  201. package/src/lint/rules/op/sys010-key-over-plain-http.test.ts +52 -0
  202. package/src/lint/rules/op/sys010-key-over-plain-http.ts +100 -0
  203. package/src/lint/rules/sys001-no-literal-key.test.ts +31 -0
  204. package/src/lint/rules/sys001-no-literal-key.ts +67 -0
  205. package/src/op/__fixtures__/decide-stub-backend.ts +143 -0
  206. package/src/op/activities/activity-contracts.ts +190 -1
  207. package/src/op/activities/apply.ts +7 -6
  208. package/src/op/activities/change-coverage.ts +60 -0
  209. package/src/op/activities/converge.test.ts +55 -1
  210. package/src/op/activities/converge.ts +208 -29
  211. package/src/op/activities/decide.live.test.ts +78 -0
  212. package/src/op/activities/decide.test.ts +300 -0
  213. package/src/op/activities/decide.ts +267 -0
  214. package/src/op/activities/index.ts +21 -0
  215. package/src/op/activities/shell.test.ts +91 -1
  216. package/src/op/activities/shell.ts +91 -2
  217. package/src/op/activities/source-release.test.ts +118 -0
  218. package/src/op/activities/source-release.ts +168 -0
  219. package/src/op/activities/source-rollback.test.ts +131 -0
  220. package/src/op/activities/source-rollback.ts +239 -0
  221. package/src/op/activities/work-evidence.ts +62 -0
  222. package/src/op/activity-contract-registry.test.ts +2 -0
  223. package/src/op/activity-contract-registry.ts +2 -2
  224. package/src/op/activity-contract.test.ts +12 -0
  225. package/src/op/activity-contract.ts +6 -1
  226. package/src/op/activity-profiles.ts +29 -0
  227. package/src/op/activity-registry.test.ts +1 -1
  228. package/src/op/activity-registry.ts +2 -2
  229. package/src/op/builders.ts +119 -5
  230. package/src/op/command-gate.test.ts +192 -0
  231. package/src/op/composites/converge-op.test.ts +27 -1
  232. package/src/op/composites/converge-op.ts +69 -15
  233. package/src/op/decide-backend.test.ts +44 -0
  234. package/src/op/decide-backend.ts +212 -0
  235. package/src/op/decide-config.test.ts +52 -0
  236. package/src/op/decide-config.ts +80 -0
  237. package/src/op/decide-read-inputs.ts +117 -0
  238. package/src/op/gate-approval.ts +2 -2
  239. package/src/op/gate-wait.ts +57 -0
  240. package/src/op/gate.ts +8 -3
  241. package/src/op/generate-pipeline.ts +2 -2
  242. package/src/op/index.ts +18 -3
  243. package/src/op/local-executor.ts +151 -15
  244. package/src/op/local-output.test.ts +33 -0
  245. package/src/op/local-output.ts +20 -2
  246. package/src/op/op-ir.test.ts +10 -0
  247. package/src/op/op-ir.ts +4 -0
  248. package/src/op/op-verb-class.ts +1 -0
  249. package/src/op/operator.ts +290 -11
  250. package/src/op/runtime.ts +31 -8
  251. package/src/op/runtimes/local.ts +3 -1
  252. package/src/op/source-archive.ts +161 -0
  253. package/src/op/steward-points.test.ts +313 -0
  254. package/src/op/steward-points.ts +194 -0
  255. package/src/op/steward-turn.ts +79 -0
  256. package/src/op/steward.test.ts +87 -3
  257. package/src/op/steward.ts +25 -1
  258. package/src/op/types.ts +7 -0
  259. package/src/op/work-lease-run.test.ts +20 -1
  260. package/src/op/work-lease-run.ts +2 -2
  261. package/src/workspace/__fixtures__/decide-workspace.ts +129 -0
  262. package/src/workspace/__fixtures__/studio-template-84c8b21.json +67 -0
  263. package/src/workspace/answers-ledger.ts +118 -0
  264. package/src/workspace/changes-cli.ts +56 -0
  265. package/src/workspace/changes.schema.json +472 -0
  266. package/src/workspace/changes.test.ts +315 -0
  267. package/src/workspace/changes.ts +512 -0
  268. package/src/workspace/chant-migrations/chud-lexicon-exit-fly-site.ts +234 -0
  269. package/src/workspace/chant-migrations/chud-lexicon-exit-live-names.ts +164 -0
  270. package/src/workspace/chant-migrations/chud-lexicon-exit-rollback.ts +223 -0
  271. package/src/workspace/chant-migrations/chud-lexicon-exit-ship-inputs.ts +195 -0
  272. package/src/workspace/chant-migrations/chud-lexicon-exit-ship-policy.ts +108 -0
  273. package/src/workspace/chant-migrations/chud-lexicon-exit.ts +882 -0
  274. package/src/workspace/chant-migrations.e2e.test.ts +1089 -0
  275. package/src/workspace/chant-migrations.ts +164 -0
  276. package/src/workspace/check-contract.test.ts +4 -2
  277. package/src/workspace/check.schema.json +15 -5
  278. package/src/workspace/checks/boxes.test.ts +80 -1
  279. package/src/workspace/checks/boxes.ts +136 -1
  280. package/src/workspace/checks/diagrams.test.ts +134 -0
  281. package/src/workspace/checks/diagrams.ts +108 -0
  282. package/src/workspace/checks/records.ts +47 -0
  283. package/src/workspace/checks.ts +8 -1
  284. package/src/workspace/compose-graph.ts +2 -0
  285. package/src/workspace/conformance/__fixture__/decisions/decision.kind.mjs +10 -0
  286. package/src/workspace/conformance/__fixture__/decisions/decision.schema.json +26 -0
  287. package/src/workspace/conformance/index.ts +5 -0
  288. package/src/workspace/decide.test.ts +1 -1
  289. package/src/workspace/decide.ts +156 -23
  290. package/src/workspace/declaration.schema.json +114 -1
  291. package/src/workspace/declaration.test.ts +58 -0
  292. package/src/workspace/declaration.ts +104 -0
  293. package/src/workspace/declared-kinds.test.ts +5 -5
  294. package/src/workspace/declared-kinds.ts +46 -1
  295. package/src/workspace/generated-files.ts +14 -0
  296. package/src/workspace/graph-cli.ts +1 -1
  297. package/src/workspace/graph.schema.json +9 -1
  298. package/src/workspace/intent.schema.json +8 -2
  299. package/src/workspace/intent.ts +3 -10
  300. package/src/workspace/lineage-check.ts +16 -1
  301. package/src/workspace/lineage-upgrade-cli.ts +1 -1
  302. package/src/workspace/lineage-upgrade.test.ts +70 -0
  303. package/src/workspace/lineage-upgrade.ts +81 -10
  304. package/src/workspace/ls-contract.test.ts +57 -0
  305. package/src/workspace/ls.schema.json +46 -1
  306. package/src/workspace/ls.ts +62 -3
  307. package/src/workspace/points-cli.ts +14 -3
  308. package/src/workspace/points-write.schema.json +11 -1
  309. package/src/workspace/points.schema.json +33 -0
  310. package/src/workspace/points.test.ts +1 -1
  311. package/src/workspace/points.ts +1 -1
  312. package/src/workspace/read-contract.test.ts +1 -1
  313. package/src/workspace/reason-codes.test.ts +11 -1
  314. package/src/workspace/reason-codes.ts +18 -2
  315. package/src/workspace/records-amend.schema.json +2 -0
  316. package/src/workspace/records-cli.ts +13 -3
  317. package/src/workspace/records-close.schema.json +2 -0
  318. package/src/workspace/records-new.schema.json +2 -0
  319. package/src/workspace/records-review.schema.json +2 -0
  320. package/src/workspace/records-sessions-write.e2e.test.ts +77 -0
  321. package/src/workspace/records-sessions-write.test.ts +2 -34
  322. package/src/workspace/records-write.e2e.test.ts +108 -0
  323. package/src/workspace/records-write.test.ts +32 -41
  324. package/src/workspace/records-write.ts +33 -15
  325. package/src/workspace/records.schema.json +36 -2
  326. package/src/workspace/records.test.ts +48 -3
  327. package/src/workspace/records.ts +109 -3
  328. package/src/workspace/status-contract.test.ts +13 -8
  329. package/src/workspace/status-gates.ts +9 -4
  330. package/src/workspace/status-stewards.ts +108 -4
  331. package/src/workspace/status.schema.json +111 -7
  332. package/src/workspace/status.ts +36 -1
  333. package/src/workspace/work-acceptance.test.ts +274 -0
  334. package/src/workspace/{work-cli.test.ts → work-cli.e2e.test.ts} +1 -1
  335. package/src/workspace/work-cli.ts +193 -10
  336. package/src/workspace/work-evidence.schema.json +212 -0
  337. package/src/workspace/work-evidence.ts +169 -0
  338. package/src/workspace/work-history.schema.json +349 -0
  339. package/src/workspace/work-history.test.ts +156 -0
  340. package/src/workspace/work.test.ts +3 -2
  341. package/src/workspace/work.ts +100 -1
  342. /package/src/cli/{discovery-skip.test.ts → discovery-skip.e2e.test.ts} +0 -0
  343. /package/src/workspace/conformance/{conformance.test.ts → conformance.e2e.test.ts} +0 -0
  344. /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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAiBH,OAAO,EAA+B,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAAsB,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,wFAAwF;AACxF,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,kEAAkE;AAClE,eAAO,MAAM,kBAAkB,gBAAgB,CAAC;AAEhD,iFAAiF;AACjF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;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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,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,CAAC,CAAC;AAExE,qHAAqH;AACrH,eAAO,MAAM,mBAAmB,gWASU,CAAC;AAC3C,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,eAAO,MAAM,iBAAiB,kCAAuE,CAAC;AActG,+EAA+E;AAC/E,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,cAAc,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE3F,MAAM,WAAW,WAAW;IAC1B,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,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+FAA+F;IAC/F,KAAK,EAAE,MAAM,CAAC;IACd,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,kFAAkF;IAClF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,eAAe,CAAC;IACrB,mEAAmE;IACnE,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,mJAAmJ;AACnJ,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IAAE,OAAO,EAAE,kBAAkB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAElI;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,CAAC,EACvE,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,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"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * `chud-lexicon-exit-rollback` (#2800): give a repo `chud-lexicon-exit`
3
+ * migrated the rollback Op chud had, on chant's own steps.
4
+ *
5
+ * `chud-lexicon-exit` shipped in 0.92.0 with a release Op that ships the app
6
+ * member to Fly as a source tree (#2782), and it deleted chud's rollback Op
7
+ * because nothing in chant could take that site back yet. This migration
8
+ * writes `ops/rollback.op.ts` beside the release Op, and a `rollback` script.
9
+ * A repo `chud-lexicon-exit` migrates from now on gets both, since this
10
+ * migration is planned after it in the same upgrade.
11
+ *
12
+ * The rollback is an Op rather than `chant components rollback` because the
13
+ * release is one: the release Op archives, plans, gates, ships and records,
14
+ * and the app component only runs the supply chain. Rolling back through the
15
+ * component would put publish and rollback in two places, which the boundary
16
+ * between Ops and components says not to do (components/backends-reference).
17
+ *
18
+ * The plan is empty unless the member's release Op is the one
19
+ * `chud-lexicon-exit` wrote, and once the rollback Op is there. A file at
20
+ * `ops/rollback.op.ts` that is not this one is a conflict.
21
+ */
22
+ import type { ChantMigration } from "../chant-migrations.js";
23
+ export declare const CHUD_LEXICON_EXIT_ROLLBACK = "chud-lexicon-exit-rollback";
24
+ export declare function rollbackOp(pointsRel: string): string;
25
+ export declare const chudLexiconExitRollback: ChantMigration;
26
+ //# sourceMappingURL=chud-lexicon-exit-rollback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chud-lexicon-exit-rollback.d.ts","sourceRoot":"","sources":["../../../src/workspace/chant-migrations/chud-lexicon-exit-rollback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,OAAO,KAAK,EAAE,cAAc,EAA0E,MAAM,qBAAqB,CAAC;AAGlI,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AASvE,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAiFpD;AAqGD,eAAO,MAAM,uBAAuB,EAAE,cAIrC,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * `chud-lexicon-exit-ship-inputs` (#2811): the release Op asks the ship-skip
3
+ * point with the inputs the point declares.
4
+ *
5
+ * The release Op `chud-lexicon-exit` (0.92.0) wrote asks `ship-skip` with no
6
+ * inputs, so the point's table can only give its default row. This migration
7
+ * makes the Op compute the point's `release.*` inputs when it loads, from the
8
+ * diff between the commit the `fly` site serves (the last release in its
9
+ * ledger) and HEAD, and pass the ones the point declares to `decide`:
10
+ *
11
+ * - `first_release`: no release in the ledger;
12
+ * - `new_migrations`: `.sql` files added or changed under the app's
13
+ * migrations folder;
14
+ * - `files_changed`: paths changed;
15
+ * - `app_changed`: a path under the app member;
16
+ * - `work_changed`: a path under the directory a declared work kind keeps its
17
+ * items in (chud's `contracts_changed`);
18
+ * - `units`: work item files added or changed.
19
+ *
20
+ * A first release, or one whose serving commit this clone lacks, counts every
21
+ * file on HEAD, as chud's release plan did. The inputs are not part of the
22
+ * release plan, which keeps the answer and its decider, so a retry of a
23
+ * shipped commit plans the same digest.
24
+ *
25
+ * The plan is empty unless the member's release Op is the one
26
+ * `chud-lexicon-exit` wrote and still asks `ship-skip` with no inputs. A
27
+ * release Op the project changed so that an anchor is gone is a conflict.
28
+ */
29
+ import type { ChantMigration } from "../chant-migrations.js";
30
+ export declare const CHUD_LEXICON_EXIT_SHIP_INPUTS = "chud-lexicon-exit-ship-inputs";
31
+ /** Where a declared work kind keeps its items, from the workspace root: what `release.work_changed` and `release.units` count. */
32
+ export interface WorkItems {
33
+ dir: string;
34
+ /** The kind's `location.match`, a regular expression over a file's name. */
35
+ match: string;
36
+ }
37
+ interface Declaration {
38
+ members?: Array<{
39
+ name?: string;
40
+ dir?: string;
41
+ kind?: string;
42
+ records?: Array<{
43
+ kind?: string;
44
+ }>;
45
+ }>;
46
+ records?: Array<{
47
+ kind?: string;
48
+ }>;
49
+ }
50
+ /**
51
+ * Where each declared work kind keeps its items, read from the kind file's
52
+ * text: a kind with a `work` block, its `location.dir` and `location.match`.
53
+ */
54
+ export declare function workItemsOf(dir: string, decl: Declaration | null): WorkItems[];
55
+ /** The code that computes the inputs and asks the point with them, in place of {@link ASKED_BARE}. */
56
+ export declare function askedWithInputs(rootRel: string, appDir: string, work: WorkItems[]): string;
57
+ export declare const chudLexiconExitShipInputs: ChantMigration;
58
+ export {};
59
+ //# sourceMappingURL=chud-lexicon-exit-ship-inputs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chud-lexicon-exit-ship-inputs.d.ts","sourceRoot":"","sources":["../../../src/workspace/chant-migrations/chud-lexicon-exit-ship-inputs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAIH,OAAO,KAAK,EAAE,cAAc,EAA0E,MAAM,qBAAqB,CAAC;AAGlI,eAAO,MAAM,6BAA6B,kCAAkC,CAAC;AAO7E,kIAAkI;AAClI,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,WAAW;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC,CAAC;IACpG,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACpC;AAOD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,EAAE,CAgB9E;AAED,sGAAsG;AACtG,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,MAAM,CA6C1F;AAgED,eAAO,MAAM,yBAAyB,EAAE,cAIvC,CAAC"}