@mannyc1/ts-release 0.0.6 → 0.2.2

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 (639) hide show
  1. package/ARCHITECTURE.md +124 -87
  2. package/CHANGELOG.md +115 -0
  3. package/LICENSE +21 -0
  4. package/README.md +272 -540
  5. package/SPEC.md +206 -305
  6. package/apps/release-ts/README.md +32 -0
  7. package/apps/release-ts/src/cli/command.ts +164 -0
  8. package/apps/release-ts/src/cli/commands.ts +351 -0
  9. package/apps/release-ts/src/cli/main.ts +43 -0
  10. package/apps/release-ts/src/cli/node-main.ts +49 -0
  11. package/apps/ts-release-agents/LICENSE +21 -0
  12. package/apps/ts-release-agents/README.md +21 -0
  13. package/apps/ts-release-agents/evals/cases.json +11 -0
  14. package/apps/ts-release-agents/manifests/claude.json +5 -0
  15. package/apps/ts-release-agents/manifests/codex.json +5 -0
  16. package/apps/ts-release-agents/package.json +11 -0
  17. package/apps/ts-release-agents/skills/release/SKILL.md +48 -0
  18. package/apps/ts-release-agents/skills/release/references/configuration.md +18 -0
  19. package/apps/ts-release-agents/skills/release/references/recovery.md +10 -0
  20. package/apps/ts-release-agents/skills/release/references/staged-workflow.md +12 -0
  21. package/apps/ts-release-agents/skills/release/references/target-selection.md +13 -0
  22. package/apps/ts-release-agents/skills/release/references/verification.md +14 -0
  23. package/apps/ts-release-agents/src/build.ts +105 -0
  24. package/apps/ts-release-agents/src/check.ts +117 -0
  25. package/apps/ts-release-agents/src/install.ts +121 -0
  26. package/apps/ts-release-agents/test/contract.test.ts +56 -0
  27. package/apps/ts-release-agents/tsconfig.json +5 -0
  28. package/dist/api/api.d.ts +15 -0
  29. package/dist/api/api.d.ts.map +1 -0
  30. package/dist/api/api.js +244 -0
  31. package/dist/api/api.js.map +1 -0
  32. package/dist/api/errors.d.ts +39 -0
  33. package/dist/api/errors.d.ts.map +1 -0
  34. package/dist/api/errors.js +32 -0
  35. package/dist/api/errors.js.map +1 -0
  36. package/dist/api/input.d.ts +10 -0
  37. package/dist/api/input.d.ts.map +1 -0
  38. package/dist/api/input.js +73 -0
  39. package/dist/api/input.js.map +1 -0
  40. package/dist/api/runtime.d.ts +18 -0
  41. package/dist/api/runtime.d.ts.map +1 -0
  42. package/dist/api/runtime.js +7 -0
  43. package/dist/api/runtime.js.map +1 -0
  44. package/dist/api/types.d.ts +76 -0
  45. package/dist/api/types.d.ts.map +1 -0
  46. package/dist/api/types.js +17 -0
  47. package/dist/api/types.js.map +1 -0
  48. package/dist/bin/ts-release.js +39239 -0
  49. package/dist/capabilities/bun-targets.d.ts +3 -0
  50. package/dist/capabilities/bun-targets.d.ts.map +1 -0
  51. package/dist/capabilities/bun-targets.js +3 -0
  52. package/dist/capabilities/bun-targets.js.map +1 -0
  53. package/dist/capabilities/field-ownership.d.ts +17 -0
  54. package/dist/capabilities/field-ownership.d.ts.map +1 -0
  55. package/dist/capabilities/field-ownership.js +40 -0
  56. package/dist/capabilities/field-ownership.js.map +1 -0
  57. package/dist/capabilities/module.d.ts +91 -0
  58. package/dist/capabilities/module.d.ts.map +1 -0
  59. package/dist/capabilities/module.js +2 -0
  60. package/dist/capabilities/module.js.map +1 -0
  61. package/dist/capabilities/registry.d.ts +829 -0
  62. package/dist/capabilities/registry.d.ts.map +1 -0
  63. package/dist/capabilities/registry.js +291 -0
  64. package/dist/capabilities/registry.js.map +1 -0
  65. package/dist/config/config.d.ts +6 -0
  66. package/dist/config/config.d.ts.map +1 -0
  67. package/dist/config/config.js +42 -0
  68. package/dist/config/config.js.map +1 -0
  69. package/dist/correction/coordinator.d.ts +248 -0
  70. package/dist/correction/coordinator.d.ts.map +1 -0
  71. package/dist/correction/coordinator.js +274 -0
  72. package/dist/correction/coordinator.js.map +1 -0
  73. package/dist/correction/index.d.ts +3 -0
  74. package/dist/correction/index.d.ts.map +1 -0
  75. package/dist/correction/index.js +3 -0
  76. package/dist/correction/index.js.map +1 -0
  77. package/dist/correction/intent.d.ts +111 -0
  78. package/dist/correction/intent.d.ts.map +1 -0
  79. package/dist/correction/intent.js +146 -0
  80. package/dist/correction/intent.js.map +1 -0
  81. package/dist/drivers/archive.d.ts +8 -0
  82. package/dist/drivers/archive.d.ts.map +1 -0
  83. package/dist/drivers/archive.js +101 -0
  84. package/dist/drivers/archive.js.map +1 -0
  85. package/dist/drivers/contain.d.ts +6 -0
  86. package/dist/drivers/contain.d.ts.map +1 -0
  87. package/dist/drivers/contain.js +17 -0
  88. package/dist/drivers/contain.js.map +1 -0
  89. package/dist/drivers/environment.d.ts +4 -0
  90. package/dist/drivers/environment.d.ts.map +1 -0
  91. package/dist/drivers/environment.js +18 -0
  92. package/dist/drivers/environment.js.map +1 -0
  93. package/dist/drivers/errors.d.ts +9 -0
  94. package/dist/drivers/errors.d.ts.map +1 -0
  95. package/dist/drivers/errors.js +6 -0
  96. package/dist/drivers/errors.js.map +1 -0
  97. package/dist/drivers/glob.d.ts +2 -0
  98. package/dist/drivers/glob.d.ts.map +1 -0
  99. package/dist/drivers/glob.js +162 -0
  100. package/dist/drivers/glob.js.map +1 -0
  101. package/dist/drivers/process.d.ts +48 -0
  102. package/dist/drivers/process.d.ts.map +1 -0
  103. package/dist/drivers/process.js +257 -0
  104. package/dist/drivers/process.js.map +1 -0
  105. package/dist/drivers/redact.d.ts +4 -0
  106. package/dist/drivers/redact.d.ts.map +1 -0
  107. package/dist/drivers/redact.js +24 -0
  108. package/dist/drivers/redact.js.map +1 -0
  109. package/dist/drivers/seccomp-helper-source.d.ts +7 -0
  110. package/dist/drivers/seccomp-helper-source.d.ts.map +1 -0
  111. package/dist/drivers/seccomp-helper-source.js +121 -0
  112. package/dist/drivers/seccomp-helper-source.js.map +1 -0
  113. package/dist/drivers/utils.d.ts +4 -0
  114. package/dist/drivers/utils.d.ts.map +1 -0
  115. package/dist/drivers/utils.js +5 -0
  116. package/dist/drivers/utils.js.map +1 -0
  117. package/dist/drivers/workspace.d.ts +6 -0
  118. package/dist/drivers/workspace.d.ts.map +1 -0
  119. package/dist/drivers/workspace.js +49 -0
  120. package/dist/drivers/workspace.js.map +1 -0
  121. package/dist/extensions/provider-adapter.d.ts +48 -0
  122. package/dist/extensions/provider-adapter.d.ts.map +1 -0
  123. package/dist/extensions/provider-adapter.js +64 -0
  124. package/dist/extensions/provider-adapter.js.map +1 -0
  125. package/dist/host.d.ts +33 -0
  126. package/dist/host.d.ts.map +1 -0
  127. package/dist/host.js +20 -0
  128. package/dist/host.js.map +1 -0
  129. package/dist/index.d.ts +19 -1
  130. package/dist/index.d.ts.map +1 -1
  131. package/dist/index.js +12 -1
  132. package/dist/index.js.map +1 -1
  133. package/dist/model/artifact-collection.d.ts +84 -0
  134. package/dist/model/artifact-collection.d.ts.map +1 -0
  135. package/dist/model/artifact-collection.js +185 -0
  136. package/dist/model/artifact-collection.js.map +1 -0
  137. package/dist/model/authority.d.ts +89 -0
  138. package/dist/model/authority.d.ts.map +1 -0
  139. package/dist/model/authority.js +80 -0
  140. package/dist/model/authority.js.map +1 -0
  141. package/dist/model/bun-targets.d.ts +34 -0
  142. package/dist/model/bun-targets.d.ts.map +1 -0
  143. package/dist/model/bun-targets.js +17 -0
  144. package/dist/model/bun-targets.js.map +1 -0
  145. package/dist/model/canonical.d.ts +8 -0
  146. package/dist/model/canonical.d.ts.map +1 -0
  147. package/dist/model/canonical.js +205 -0
  148. package/dist/model/canonical.js.map +1 -0
  149. package/dist/model/catalog.d.ts +76 -0
  150. package/dist/model/catalog.d.ts.map +1 -0
  151. package/dist/model/catalog.js +174 -0
  152. package/dist/model/catalog.js.map +1 -0
  153. package/dist/model/digest.d.ts +53 -0
  154. package/dist/model/digest.d.ts.map +1 -0
  155. package/dist/model/digest.js +127 -0
  156. package/dist/model/digest.js.map +1 -0
  157. package/dist/model/errors.d.ts +14 -0
  158. package/dist/model/errors.d.ts.map +1 -0
  159. package/dist/model/errors.js +8 -0
  160. package/dist/model/errors.js.map +1 -0
  161. package/dist/model/primitives.d.ts +19 -0
  162. package/dist/model/primitives.d.ts.map +1 -0
  163. package/dist/model/primitives.js +18 -0
  164. package/dist/model/primitives.js.map +1 -0
  165. package/dist/model/pypi.d.ts +12 -0
  166. package/dist/model/pypi.d.ts.map +1 -0
  167. package/dist/model/pypi.js +20 -0
  168. package/dist/model/pypi.js.map +1 -0
  169. package/dist/model/python-distribution.d.ts +33 -0
  170. package/dist/model/python-distribution.d.ts.map +1 -0
  171. package/dist/model/python-distribution.js +367 -0
  172. package/dist/model/python-distribution.js.map +1 -0
  173. package/dist/model/secret-patterns.d.ts +2 -0
  174. package/dist/model/secret-patterns.d.ts.map +1 -0
  175. package/dist/model/secret-patterns.js +12 -0
  176. package/dist/model/secret-patterns.js.map +1 -0
  177. package/dist/platform/bun.d.ts +7 -0
  178. package/dist/platform/bun.d.ts.map +1 -0
  179. package/dist/platform/bun.js +15 -0
  180. package/dist/platform/bun.js.map +1 -0
  181. package/dist/platform/credentials.d.ts +32 -0
  182. package/dist/platform/credentials.d.ts.map +1 -0
  183. package/dist/platform/credentials.js +772 -0
  184. package/dist/platform/credentials.js.map +1 -0
  185. package/dist/platform/host-support.d.ts +2 -0
  186. package/dist/platform/host-support.d.ts.map +1 -0
  187. package/dist/platform/host-support.js +4 -0
  188. package/dist/platform/host-support.js.map +1 -0
  189. package/dist/platform/node.d.ts +7 -0
  190. package/dist/platform/node.d.ts.map +1 -0
  191. package/dist/platform/node.js +15 -0
  192. package/dist/platform/node.js.map +1 -0
  193. package/dist/platform/release-runtime.d.ts +11 -0
  194. package/dist/platform/release-runtime.d.ts.map +1 -0
  195. package/dist/platform/release-runtime.js +34 -0
  196. package/dist/platform/release-runtime.js.map +1 -0
  197. package/dist/platform/services.d.ts +15 -0
  198. package/dist/platform/services.d.ts.map +1 -0
  199. package/dist/platform/services.js +30 -0
  200. package/dist/platform/services.js.map +1 -0
  201. package/dist/platform/source-observer.d.ts +5 -0
  202. package/dist/platform/source-observer.d.ts.map +1 -0
  203. package/dist/platform/source-observer.js +159 -0
  204. package/dist/platform/source-observer.js.map +1 -0
  205. package/dist/provider-sdk.d.ts +14 -0
  206. package/dist/provider-sdk.d.ts.map +1 -0
  207. package/dist/provider-sdk.js +10 -0
  208. package/dist/provider-sdk.js.map +1 -0
  209. package/dist/publication/adapter.d.ts +212 -0
  210. package/dist/publication/adapter.d.ts.map +1 -0
  211. package/dist/publication/adapter.js +83 -0
  212. package/dist/publication/adapter.js.map +1 -0
  213. package/dist/publication/authority.d.ts +137 -0
  214. package/dist/publication/authority.d.ts.map +1 -0
  215. package/dist/publication/authority.js +233 -0
  216. package/dist/publication/authority.js.map +1 -0
  217. package/dist/publication/catalog-git.d.ts +37 -0
  218. package/dist/publication/catalog-git.d.ts.map +1 -0
  219. package/dist/publication/catalog-git.js +451 -0
  220. package/dist/publication/catalog-git.js.map +1 -0
  221. package/dist/publication/claim.d.ts +39 -0
  222. package/dist/publication/claim.d.ts.map +1 -0
  223. package/dist/publication/claim.js +31 -0
  224. package/dist/publication/claim.js.map +1 -0
  225. package/dist/publication/coordinator.d.ts +246 -0
  226. package/dist/publication/coordinator.d.ts.map +1 -0
  227. package/dist/publication/coordinator.js +370 -0
  228. package/dist/publication/coordinator.js.map +1 -0
  229. package/dist/publication/github.d.ts +36 -0
  230. package/dist/publication/github.d.ts.map +1 -0
  231. package/dist/publication/github.js +644 -0
  232. package/dist/publication/github.js.map +1 -0
  233. package/dist/publication/http.d.ts +69 -0
  234. package/dist/publication/http.d.ts.map +1 -0
  235. package/dist/publication/http.js +29 -0
  236. package/dist/publication/http.js.map +1 -0
  237. package/dist/publication/index.d.ts +5 -0
  238. package/dist/publication/index.d.ts.map +1 -0
  239. package/dist/publication/index.js +5 -0
  240. package/dist/publication/index.js.map +1 -0
  241. package/dist/publication/npm.d.ts +40 -0
  242. package/dist/publication/npm.d.ts.map +1 -0
  243. package/dist/publication/npm.js +359 -0
  244. package/dist/publication/npm.js.map +1 -0
  245. package/dist/publication/profiles.d.ts +136 -0
  246. package/dist/publication/profiles.d.ts.map +1 -0
  247. package/dist/publication/profiles.js +90 -0
  248. package/dist/publication/profiles.js.map +1 -0
  249. package/dist/publication/publisher.d.ts +82 -0
  250. package/dist/publication/publisher.d.ts.map +1 -0
  251. package/dist/publication/publisher.js +53 -0
  252. package/dist/publication/publisher.js.map +1 -0
  253. package/dist/publication/pypi.d.ts +45 -0
  254. package/dist/publication/pypi.d.ts.map +1 -0
  255. package/dist/publication/pypi.js +369 -0
  256. package/dist/publication/pypi.js.map +1 -0
  257. package/dist/publication/recovery.d.ts +663 -0
  258. package/dist/publication/recovery.d.ts.map +1 -0
  259. package/dist/publication/recovery.js +252 -0
  260. package/dist/publication/recovery.js.map +1 -0
  261. package/dist/publication/report.d.ts +1061 -0
  262. package/dist/publication/report.d.ts.map +1 -0
  263. package/dist/publication/report.js +441 -0
  264. package/dist/publication/report.js.map +1 -0
  265. package/dist/recipes/config.d.ts +296 -0
  266. package/dist/recipes/config.d.ts.map +1 -0
  267. package/dist/recipes/config.js +325 -0
  268. package/dist/recipes/config.js.map +1 -0
  269. package/dist/release/capabilities.d.ts +12 -0
  270. package/dist/release/capabilities.d.ts.map +1 -0
  271. package/dist/release/capabilities.js +395 -0
  272. package/dist/release/capabilities.js.map +1 -0
  273. package/dist/release/compiler.d.ts +5 -0
  274. package/dist/release/compiler.d.ts.map +1 -0
  275. package/dist/release/compiler.js +19 -0
  276. package/dist/release/compiler.js.map +1 -0
  277. package/dist/release/config.d.ts +5 -0
  278. package/dist/release/config.d.ts.map +1 -0
  279. package/dist/release/config.js +10 -0
  280. package/dist/release/config.js.map +1 -0
  281. package/dist/release/context.d.ts +96 -0
  282. package/dist/release/context.d.ts.map +1 -0
  283. package/dist/release/context.js +168 -0
  284. package/dist/release/context.js.map +1 -0
  285. package/dist/release/graph.d.ts +271 -0
  286. package/dist/release/graph.d.ts.map +1 -0
  287. package/dist/release/graph.js +766 -0
  288. package/dist/release/graph.js.map +1 -0
  289. package/dist/release/inspect.d.ts +88 -0
  290. package/dist/release/inspect.d.ts.map +1 -0
  291. package/dist/release/inspect.js +75 -0
  292. package/dist/release/inspect.js.map +1 -0
  293. package/dist/release/prepare.d.ts +24 -0
  294. package/dist/release/prepare.d.ts.map +1 -0
  295. package/dist/release/prepare.js +1116 -0
  296. package/dist/release/prepare.js.map +1 -0
  297. package/dist/release/prepared-ref.d.ts +60 -0
  298. package/dist/release/prepared-ref.d.ts.map +1 -0
  299. package/dist/release/prepared-ref.js +131 -0
  300. package/dist/release/prepared-ref.js.map +1 -0
  301. package/dist/release/prepared-store.d.ts +90 -0
  302. package/dist/release/prepared-store.d.ts.map +1 -0
  303. package/dist/release/prepared-store.js +337 -0
  304. package/dist/release/prepared-store.js.map +1 -0
  305. package/dist/release/prepared.d.ts +172 -0
  306. package/dist/release/prepared.d.ts.map +1 -0
  307. package/dist/release/prepared.js +268 -0
  308. package/dist/release/prepared.js.map +1 -0
  309. package/dist/release/staging.d.ts +31 -0
  310. package/dist/release/staging.d.ts.map +1 -0
  311. package/dist/release/staging.js +218 -0
  312. package/dist/release/staging.js.map +1 -0
  313. package/dist/resolve/authored.d.ts +53 -0
  314. package/dist/resolve/authored.d.ts.map +1 -0
  315. package/dist/resolve/authored.js +55 -0
  316. package/dist/resolve/authored.js.map +1 -0
  317. package/dist/resolve/encode.d.ts +3 -0
  318. package/dist/resolve/encode.d.ts.map +1 -0
  319. package/dist/resolve/encode.js +21 -0
  320. package/dist/resolve/encode.js.map +1 -0
  321. package/dist/resolve/errors.d.ts +7 -0
  322. package/dist/resolve/errors.d.ts.map +1 -0
  323. package/dist/resolve/errors.js +17 -0
  324. package/dist/resolve/errors.js.map +1 -0
  325. package/dist/resolve/facts.d.ts +12 -0
  326. package/dist/resolve/facts.d.ts.map +1 -0
  327. package/dist/resolve/facts.js +18 -0
  328. package/dist/resolve/facts.js.map +1 -0
  329. package/dist/resolve/resolve.d.ts +10 -0
  330. package/dist/resolve/resolve.d.ts.map +1 -0
  331. package/dist/resolve/resolve.js +242 -0
  332. package/dist/resolve/resolve.js.map +1 -0
  333. package/dist/store.d.ts +11 -0
  334. package/dist/store.d.ts.map +1 -0
  335. package/dist/store.js +9 -0
  336. package/dist/store.js.map +1 -0
  337. package/examples/README.md +20 -30
  338. package/examples/github-release/release.config.json +11 -18
  339. package/examples/homebrew-tap/README.md +11 -0
  340. package/examples/homebrew-tap/release.config.json +40 -28
  341. package/examples/multi-target/release.config.json +28 -53
  342. package/examples/npm-first-publish/release.config.json +23 -25
  343. package/examples/npm-only/release.config.json +22 -30
  344. package/examples/portable-cli/README.md +17 -0
  345. package/examples/portable-cli/artifacts/portable-example-0.1.0-darwin-arm64 +1 -0
  346. package/examples/portable-cli/artifacts/portable-example-0.1.0-darwin-x64 +1 -0
  347. package/examples/portable-cli/artifacts/portable-example-0.1.0-linux-arm64 +1 -0
  348. package/examples/portable-cli/artifacts/portable-example-0.1.0-linux-x64 +1 -0
  349. package/examples/portable-cli/artifacts/portable-example-0.1.0-windows-x64.exe +1 -0
  350. package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-macosx_10_15_x86_64.whl +1 -0
  351. package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-macosx_11_0_arm64.whl +1 -0
  352. package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-manylinux2014_aarch64.whl +1 -0
  353. package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-manylinux2014_x86_64.whl +1 -0
  354. package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-win_amd64.whl +1 -0
  355. package/examples/portable-cli/package.json +9 -0
  356. package/examples/portable-cli/release.config.json +53 -0
  357. package/examples/portable-cli/src/cli.ts +3 -0
  358. package/examples/pypi-registry/README.md +8 -0
  359. package/examples/scoop-bucket/README.md +10 -0
  360. package/examples/scoop-bucket/release.config.json +40 -30
  361. package/package.json +61 -154
  362. package/src/api/api.ts +365 -0
  363. package/src/api/errors.ts +36 -0
  364. package/src/api/input.ts +92 -0
  365. package/src/api/runtime.ts +14 -0
  366. package/src/api/types.ts +103 -0
  367. package/src/capabilities/bun-targets.ts +2 -0
  368. package/src/capabilities/field-ownership.ts +60 -0
  369. package/src/capabilities/module.ts +158 -0
  370. package/src/capabilities/registry.ts +333 -0
  371. package/src/config/config.ts +48 -0
  372. package/src/correction/coordinator.ts +336 -0
  373. package/src/correction/index.ts +2 -0
  374. package/src/correction/intent.ts +172 -0
  375. package/src/drivers/archive.ts +102 -0
  376. package/src/drivers/contain.ts +20 -0
  377. package/src/drivers/environment.ts +28 -0
  378. package/src/drivers/errors.ts +6 -0
  379. package/src/drivers/glob.ts +137 -0
  380. package/src/drivers/process.ts +340 -0
  381. package/src/drivers/redact.ts +31 -0
  382. package/src/drivers/seccomp-helper-source.ts +121 -0
  383. package/src/drivers/utils.ts +10 -0
  384. package/src/drivers/workspace.ts +40 -0
  385. package/src/extensions/provider-adapter.ts +99 -0
  386. package/src/host.ts +140 -0
  387. package/src/index.ts +64 -0
  388. package/src/model/artifact-collection.ts +237 -0
  389. package/src/model/authority.ts +116 -0
  390. package/src/model/bun-targets.ts +34 -0
  391. package/src/model/canonical.ts +205 -0
  392. package/src/model/catalog.ts +220 -0
  393. package/src/model/digest.ts +172 -0
  394. package/src/model/errors.ts +6 -0
  395. package/src/model/primitives.ts +37 -0
  396. package/src/model/pypi.ts +30 -0
  397. package/src/model/python-distribution.ts +360 -0
  398. package/src/model/secret-patterns.ts +11 -0
  399. package/src/platform/bun.ts +38 -0
  400. package/src/platform/credentials.ts +1083 -0
  401. package/src/platform/host-support.ts +4 -0
  402. package/src/platform/node.ts +38 -0
  403. package/src/platform/release-runtime.ts +47 -0
  404. package/src/platform/services.ts +57 -0
  405. package/src/platform/source-observer.ts +193 -0
  406. package/src/provider-sdk.ts +48 -0
  407. package/src/publication/adapter.ts +132 -0
  408. package/src/publication/authority.ts +397 -0
  409. package/src/publication/catalog-git.ts +603 -0
  410. package/src/publication/claim.ts +51 -0
  411. package/src/publication/coordinator.ts +578 -0
  412. package/src/publication/github.ts +954 -0
  413. package/src/publication/http.ts +101 -0
  414. package/src/publication/index.ts +4 -0
  415. package/src/publication/npm.ts +525 -0
  416. package/src/publication/profiles.ts +94 -0
  417. package/src/publication/publisher.ts +130 -0
  418. package/src/publication/pypi.ts +463 -0
  419. package/src/publication/recovery.ts +349 -0
  420. package/src/publication/report.ts +628 -0
  421. package/src/recipes/config.ts +395 -0
  422. package/src/release/capabilities.ts +459 -0
  423. package/src/release/compiler.ts +28 -0
  424. package/src/release/config.ts +12 -0
  425. package/src/release/context.ts +223 -0
  426. package/src/release/graph.ts +866 -0
  427. package/src/release/inspect.ts +83 -0
  428. package/src/release/prepare.ts +1331 -0
  429. package/src/release/prepared-ref.ts +193 -0
  430. package/src/release/prepared-store.ts +377 -0
  431. package/src/release/prepared.ts +299 -0
  432. package/src/release/staging.ts +257 -0
  433. package/src/resolve/authored.ts +64 -0
  434. package/src/resolve/encode.ts +22 -0
  435. package/src/resolve/errors.ts +15 -0
  436. package/src/resolve/facts.ts +18 -0
  437. package/src/resolve/resolve.ts +328 -0
  438. package/src/store.ts +28 -0
  439. package/templates/README.md +55 -59
  440. package/templates/bun-cli-github/README.md +12 -0
  441. package/templates/bun-cli-github/release.config.json +51 -0
  442. package/templates/github-actions/release.yml +57 -0
  443. package/templates/github-actions/reviewed-release.yml +80 -0
  444. package/templates/multi-target-homebrew/README.md +10 -0
  445. package/templates/multi-target-homebrew/release.config.json +43 -60
  446. package/templates/multi-target-scoop/README.md +10 -0
  447. package/templates/multi-target-scoop/release.config.json +43 -62
  448. package/templates/npm-github/release.config.json +25 -38
  449. package/templates/npm-github/reviewed-release.config.json +37 -0
  450. package/templates/npm-only/README.md +10 -0
  451. package/templates/npm-only/release.config.json +15 -30
  452. package/templates/portable-cli/README.md +13 -0
  453. package/templates/portable-cli/release.config.json +53 -0
  454. package/dist/config/errors.d.ts +0 -24
  455. package/dist/config/errors.d.ts.map +0 -1
  456. package/dist/config/errors.js +0 -19
  457. package/dist/config/errors.js.map +0 -1
  458. package/dist/config/load.d.ts +0 -9
  459. package/dist/config/load.d.ts.map +0 -1
  460. package/dist/config/load.js +0 -29
  461. package/dist/config/load.js.map +0 -1
  462. package/dist/config/schema.d.ts +0 -12
  463. package/dist/config/schema.d.ts.map +0 -1
  464. package/dist/config/schema.js +0 -19
  465. package/dist/config/schema.js.map +0 -1
  466. package/dist/domain/artifact.d.ts +0 -36
  467. package/dist/domain/artifact.d.ts.map +0 -1
  468. package/dist/domain/artifact.js +0 -29
  469. package/dist/domain/artifact.js.map +0 -1
  470. package/dist/domain/evidence.d.ts +0 -108
  471. package/dist/domain/evidence.d.ts.map +0 -1
  472. package/dist/domain/evidence.js +0 -96
  473. package/dist/domain/evidence.js.map +0 -1
  474. package/dist/domain/operation.d.ts +0 -153
  475. package/dist/domain/operation.d.ts.map +0 -1
  476. package/dist/domain/operation.js +0 -320
  477. package/dist/domain/operation.js.map +0 -1
  478. package/dist/domain/release.d.ts +0 -141
  479. package/dist/domain/release.d.ts.map +0 -1
  480. package/dist/domain/release.js +0 -127
  481. package/dist/domain/release.js.map +0 -1
  482. package/dist/domain/remote-state.d.ts +0 -85
  483. package/dist/domain/remote-state.d.ts.map +0 -1
  484. package/dist/domain/remote-state.js +0 -77
  485. package/dist/domain/remote-state.js.map +0 -1
  486. package/dist/domain/status.d.ts +0 -43
  487. package/dist/domain/status.d.ts.map +0 -1
  488. package/dist/domain/status.js +0 -51
  489. package/dist/domain/status.js.map +0 -1
  490. package/dist/domain/target.d.ts +0 -135
  491. package/dist/domain/target.d.ts.map +0 -1
  492. package/dist/domain/target.js +0 -137
  493. package/dist/domain/target.js.map +0 -1
  494. package/dist/host/host.d.ts +0 -32
  495. package/dist/host/host.d.ts.map +0 -1
  496. package/dist/host/host.js +0 -24
  497. package/dist/host/host.js.map +0 -1
  498. package/dist/host/http-live.d.ts +0 -6
  499. package/dist/host/http-live.d.ts.map +0 -1
  500. package/dist/host/http-live.js +0 -86
  501. package/dist/host/http-live.js.map +0 -1
  502. package/dist/host/http.d.ts +0 -43
  503. package/dist/host/http.d.ts.map +0 -1
  504. package/dist/host/http.js +0 -59
  505. package/dist/host/http.js.map +0 -1
  506. package/dist/host/platform.d.ts +0 -10
  507. package/dist/host/platform.d.ts.map +0 -1
  508. package/dist/host/platform.js +0 -114
  509. package/dist/host/platform.js.map +0 -1
  510. package/dist/host/test.d.ts +0 -23
  511. package/dist/host/test.d.ts.map +0 -1
  512. package/dist/host/test.js +0 -222
  513. package/dist/host/test.js.map +0 -1
  514. package/dist/internal/workflow-phases.d.ts +0 -3
  515. package/dist/internal/workflow-phases.d.ts.map +0 -1
  516. package/dist/internal/workflow-phases.js +0 -2
  517. package/dist/internal/workflow-phases.js.map +0 -1
  518. package/dist/internal/workspace-path.d.ts +0 -15
  519. package/dist/internal/workspace-path.d.ts.map +0 -1
  520. package/dist/internal/workspace-path.js +0 -36
  521. package/dist/internal/workspace-path.js.map +0 -1
  522. package/dist/planner/artifact-inventory.d.ts +0 -9
  523. package/dist/planner/artifact-inventory.d.ts.map +0 -1
  524. package/dist/planner/artifact-inventory.js +0 -84
  525. package/dist/planner/artifact-inventory.js.map +0 -1
  526. package/dist/planner/create-release-plan.d.ts +0 -5
  527. package/dist/planner/create-release-plan.d.ts.map +0 -1
  528. package/dist/planner/create-release-plan.js +0 -25
  529. package/dist/planner/create-release-plan.js.map +0 -1
  530. package/dist/planner/errors.d.ts +0 -81
  531. package/dist/planner/errors.d.ts.map +0 -1
  532. package/dist/planner/errors.js +0 -70
  533. package/dist/planner/errors.js.map +0 -1
  534. package/dist/planner/evidence-recorder.d.ts +0 -26
  535. package/dist/planner/evidence-recorder.d.ts.map +0 -1
  536. package/dist/planner/evidence-recorder.js +0 -330
  537. package/dist/planner/evidence-recorder.js.map +0 -1
  538. package/dist/planner/executor.d.ts +0 -58
  539. package/dist/planner/executor.d.ts.map +0 -1
  540. package/dist/planner/executor.js +0 -159
  541. package/dist/planner/executor.js.map +0 -1
  542. package/dist/planner/normalize-release.d.ts +0 -16
  543. package/dist/planner/normalize-release.d.ts.map +0 -1
  544. package/dist/planner/normalize-release.js +0 -218
  545. package/dist/planner/normalize-release.js.map +0 -1
  546. package/dist/planner/reconcile.d.ts +0 -17
  547. package/dist/planner/reconcile.d.ts.map +0 -1
  548. package/dist/planner/reconcile.js +0 -261
  549. package/dist/planner/reconcile.js.map +0 -1
  550. package/dist/planner/release-eligibility.d.ts +0 -39
  551. package/dist/planner/release-eligibility.d.ts.map +0 -1
  552. package/dist/planner/release-eligibility.js +0 -578
  553. package/dist/planner/release-eligibility.js.map +0 -1
  554. package/dist/planner/render-plan.d.ts +0 -15
  555. package/dist/planner/render-plan.d.ts.map +0 -1
  556. package/dist/planner/render-plan.js +0 -238
  557. package/dist/planner/render-plan.js.map +0 -1
  558. package/dist/planner/status.d.ts +0 -40
  559. package/dist/planner/status.d.ts.map +0 -1
  560. package/dist/planner/status.js +0 -313
  561. package/dist/planner/status.js.map +0 -1
  562. package/dist/targets/adapter-helpers.d.ts +0 -64
  563. package/dist/targets/adapter-helpers.d.ts.map +0 -1
  564. package/dist/targets/adapter-helpers.js +0 -124
  565. package/dist/targets/adapter-helpers.js.map +0 -1
  566. package/dist/targets/adapter.d.ts +0 -17
  567. package/dist/targets/adapter.d.ts.map +0 -1
  568. package/dist/targets/adapter.js +0 -2
  569. package/dist/targets/adapter.js.map +0 -1
  570. package/dist/targets/github-release.d.ts +0 -25
  571. package/dist/targets/github-release.d.ts.map +0 -1
  572. package/dist/targets/github-release.js +0 -82
  573. package/dist/targets/github-release.js.map +0 -1
  574. package/dist/targets/github.d.ts +0 -11
  575. package/dist/targets/github.d.ts.map +0 -1
  576. package/dist/targets/github.js +0 -125
  577. package/dist/targets/github.js.map +0 -1
  578. package/dist/targets/homebrew.d.ts +0 -11
  579. package/dist/targets/homebrew.d.ts.map +0 -1
  580. package/dist/targets/homebrew.js +0 -97
  581. package/dist/targets/homebrew.js.map +0 -1
  582. package/dist/targets/live.d.ts +0 -5
  583. package/dist/targets/live.d.ts.map +0 -1
  584. package/dist/targets/live.js +0 -50
  585. package/dist/targets/live.js.map +0 -1
  586. package/dist/targets/npm.d.ts +0 -10
  587. package/dist/targets/npm.d.ts.map +0 -1
  588. package/dist/targets/npm.js +0 -118
  589. package/dist/targets/npm.js.map +0 -1
  590. package/dist/targets/pypi.d.ts +0 -11
  591. package/dist/targets/pypi.d.ts.map +0 -1
  592. package/dist/targets/pypi.js +0 -103
  593. package/dist/targets/pypi.js.map +0 -1
  594. package/dist/targets/registry.d.ts +0 -25
  595. package/dist/targets/registry.d.ts.map +0 -1
  596. package/dist/targets/registry.js +0 -34
  597. package/dist/targets/registry.js.map +0 -1
  598. package/dist/targets/scoop.d.ts +0 -11
  599. package/dist/targets/scoop.d.ts.map +0 -1
  600. package/dist/targets/scoop.js +0 -78
  601. package/dist/targets/scoop.js.map +0 -1
  602. package/dist/types/effect-internal.d.ts +0 -5
  603. package/dist/types/effect-internal.d.ts.map +0 -1
  604. package/dist/types/effect-internal.js +0 -2
  605. package/dist/types/effect-internal.js.map +0 -1
  606. package/dist/workflows/config.d.ts +0 -252
  607. package/dist/workflows/config.d.ts.map +0 -1
  608. package/dist/workflows/config.js +0 -465
  609. package/dist/workflows/config.js.map +0 -1
  610. package/dist/workflows/diagnostics.d.ts +0 -62
  611. package/dist/workflows/diagnostics.d.ts.map +0 -1
  612. package/dist/workflows/diagnostics.js +0 -527
  613. package/dist/workflows/diagnostics.js.map +0 -1
  614. package/dist/workflows/evidence.d.ts +0 -26
  615. package/dist/workflows/evidence.d.ts.map +0 -1
  616. package/dist/workflows/evidence.js +0 -44
  617. package/dist/workflows/evidence.js.map +0 -1
  618. package/dist/workflows/index.d.ts +0 -7
  619. package/dist/workflows/index.d.ts.map +0 -1
  620. package/dist/workflows/index.js +0 -6
  621. package/dist/workflows/index.js.map +0 -1
  622. package/dist/workflows/init.d.ts +0 -84
  623. package/dist/workflows/init.d.ts.map +0 -1
  624. package/dist/workflows/init.js +0 -441
  625. package/dist/workflows/init.js.map +0 -1
  626. package/dist/workflows/live.d.ts +0 -9
  627. package/dist/workflows/live.d.ts.map +0 -1
  628. package/dist/workflows/live.js +0 -7
  629. package/dist/workflows/live.js.map +0 -1
  630. package/dist/workflows/options.d.ts +0 -30
  631. package/dist/workflows/options.d.ts.map +0 -1
  632. package/dist/workflows/options.js +0 -16
  633. package/dist/workflows/options.js.map +0 -1
  634. package/examples/non-strict-skips/artifacts/release-example-skips-0.1.0.tgz +0 -1
  635. package/examples/non-strict-skips/release.config.json +0 -31
  636. package/examples/pypi-registry/release.config.json +0 -31
  637. package/templates/github-actions/plan-and-approved-execute.yml +0 -58
  638. package/templates/github-actions/plan-only.yml +0 -33
  639. package/templates/github-actions/trusted-publishing.yml +0 -61
package/SPEC.md CHANGED
@@ -1,305 +1,206 @@
1
- # Release Package Spec
2
-
3
- ## Purpose
4
-
5
- The `release` package is a small TypeScript library for turning release intent into explicit, inspectable, and repeatable publishing operations.
6
-
7
- It should not be a build system, a package-manager wrapper, or a generic task runner. Its job is to model what is being released, where it is being published, what must be true before publication, and which irreversible actions require deliberate approval.
8
-
9
- The package should make release work boring: the same inputs should produce the same plan, the same validations should produce auditable evidence, and the same publish operation should be understandable before anything is executed.
10
-
11
- ## Core Idea
12
-
13
- A release is a data flow:
14
-
15
- ```text
16
- release intent
17
- -> normalized release model
18
- -> target-specific operations
19
- -> optional generated files
20
- -> validation evidence
21
- -> gated execution
22
- -> post-publish verification
23
- -> status and conservative resume
24
- ```
25
-
26
- The package owns the model and the orchestration. Ecosystem tools remain the source of truth for ecosystem-specific behavior.
27
-
28
- For example, npm, PyPI, GitHub Releases, Homebrew taps, OCI registries, app stores, or other targets may each need different commands, credentials, artifacts, and validators. The release package should describe those differences directly instead of hiding them behind one fake universal publish abstraction.
29
-
30
- ## Current Shape
31
-
32
- The root package is the reusable library. It exposes explicit subpaths for domain data, config loading, planners, target adapters, host services, and high-level workflows. The official Bun CLI lives in `apps/release-ts`, and the GitHub Action lives in `apps/ts-release-action`; both are runtime adapters over the same TypeScript workflows.
33
-
34
- Current first-party workflows cover:
35
-
36
- - config validation and plan rendering
37
- - data-first init/scaffolding previews with approved writes
38
- - static doctor/auth/CI diagnostics
39
- - render, validation, execution, verification, and workflow evidence
40
- - status reporting from existing evidence
41
- - conservative resume after interrupted work
42
- - narrow GitHub release reconciliation without republishing npm versions
43
-
44
- Reusable configs live in `templates/`, runnable fixtures live in `examples/`, and publish operations remain data until an execute approval and any irreversible approval are supplied.
45
-
46
- ## Design Goals
47
-
48
- ### Plan-first
49
-
50
- The primary output of the package is a release plan, not a side effect.
51
-
52
- A plan should be serializable, reviewable, and suitable for CI artifacts. It should explain:
53
-
54
- - release identity: name, version, commit, tag, notes, source metadata, and the strategy that resolved it
55
- - artifact inventory: files, checksums, sizes, formats, and intended consumers
56
- - target operations: what each target will do and what inputs it needs
57
- - validation steps: which checks must run before publishing
58
- - execution gates: which operations are irreversible or require explicit approval
59
- - evidence paths: where validation and publish results will be recorded
60
-
61
- ### Explicit target semantics
62
-
63
- Different distribution targets have different shapes. The package should model those shapes instead of flattening them.
64
-
65
- Examples:
66
-
67
- - A release host publish creates or updates a release record and uploads assets.
68
- - A registry publish creates immutable package versions.
69
- - A catalog update changes a repository or index that points at artifacts.
70
- - A deployment promotes already-built assets into an environment.
71
-
72
- Each target should declare its required inputs, auth requirements, dry-run support, validation strategy, mutability rules, and recovery behavior. When auth cannot be proven locally, the target should also model the expected execution context, provider-specific setup, and setup prerequisites.
73
-
74
- ### Evidence-driven validation
75
-
76
- Validation should produce structured evidence, not just console output.
77
-
78
- Evidence should be machine-readable enough for CI and human-readable enough for debugging. It should include command invocations, tool versions where practical, exit statuses, important paths, skipped checks, warnings, failures, and timestamps.
79
-
80
- Evidence should also support status reporting and conservative resume after failed or interrupted releases.
81
-
82
- Strict mode should fail on missing required validators. Non-strict mode may record skips, but skips must be visible in the evidence.
83
-
84
- ### Gated irreversible actions
85
-
86
- Operations that publish immutable versions, create public releases, overwrite indexes, or otherwise affect users must be marked as irreversible or externally visible.
87
-
88
- The default behavior should be dry-run or print-only. Execution should require an explicit execute flag, and irreversible operations should require a second confirmation flag or equivalent programmatic approval.
89
-
90
- Failed publish evidence must not be treated as proof that nothing was published.
91
-
92
- The package should make it hard to accidentally publish and easy to see exactly what would be published.
93
-
94
- ### Library-first, CLI-second
95
-
96
- The core package should be a reusable library. A CLI can exist as an adapter, but it should not contain the release logic.
97
-
98
- The library should expose APIs for:
99
-
100
- - loading and normalizing config
101
- - constructing a release plan
102
- - scaffolding starter configs and CI workflows as proposed files
103
- - rendering config schemas and validation results
104
- - rendering target files or generated metadata
105
- - validating plans and artifacts
106
- - reporting static auth and CI readiness with confidence levels
107
- - preparing executable operations
108
- - running approved operations through an injected host interface
109
- - recording evidence
110
- - reporting release status from evidence
111
- - conservatively resuming safe unfinished work
112
- - reconciling narrowly modeled remote state without replaying immutable publishes
113
-
114
- The CLI and GitHub Action should mainly parse host inputs, call the library, format host-specific output, and persist evidence.
115
-
116
- ### Host abstraction without pretending the world is pure
117
-
118
- The package should isolate filesystem, environment, process execution, network calls, and time behind a narrow host interface where that improves testability and portability.
119
-
120
- The host boundary should not become a full application framework. It exists so core planning logic can be deterministic and so execution can be tested without touching real registries or release hosts.
121
-
122
- ### Composable, not magical
123
-
124
- The package should compose with existing tools rather than replace them.
125
-
126
- Builders, packagers, changelog generators, signing tools, registry CLIs, provenance tools, and ecosystem validators should be treated as inputs or adapters. The release package should coordinate them, capture their evidence, and enforce release policy around them.
127
-
128
- ## Non-goals
129
-
130
- The package should not try to:
131
-
132
- - build every artifact itself
133
- - replace ecosystem-native publishing tools
134
- - invent a universal package format
135
- - hide target-specific auth requirements
136
- - guarantee semantic versioning policy for the project using it
137
- - own changelog generation as a core requirement
138
- - require a monorepo
139
- - require a specific CI provider
140
- - treat dry-run output as equivalent to successful publication
141
-
142
- These may be integrated through adapters, but they should not define the core.
143
-
144
- ## Core Concepts
145
-
146
- ### Release Intent
147
-
148
- User-authored input describing what should be released.
149
-
150
- It should be concise but complete enough to identify the release, locate artifacts, choose targets, and declare policy.
151
-
152
- Identity may be static config data or may be derived from a package manifest. Decision strategies may then decide whether a release should be attempted from explicit remote-state config, the current Git tag, conventional commits since the latest matching tag, or first-party intent files. These strategies choose the intended identity and skipped/ready/complete/partial eligibility result; they do not publish.
153
-
154
- Intent files are a small first-party reviewed-intent format, not a promise of full Changesets compatibility. An empty/no-release intent can satisfy CI while producing a skipped release decision.
155
-
156
- ### Release Model
157
-
158
- A normalized internal representation with defaults resolved, paths normalized, targets expanded, and invalid combinations rejected.
159
-
160
- The model should be deterministic and independent of terminal formatting or CLI flags.
161
-
162
- ### Release Plan
163
-
164
- A serializable plan derived from the release model.
165
-
166
- The plan is the contract between planning, validation, execution, and CI review. It should be stable enough to diff in tests and inspect in logs.
167
-
168
- ### Target Adapter
169
-
170
- A module that knows how to plan, validate, and execute operations for one distribution target.
171
-
172
- Adapters should expose capabilities clearly: dry-run support, required credentials, validation commands, generated files, publish commands, and expected evidence.
173
-
174
- ### Operation
175
-
176
- A concrete action that may be rendered, validated, executed, or skipped.
177
-
178
- Operations should carry enough metadata to explain their risk level, inputs, outputs, and execution requirements.
179
-
180
- ### Evidence
181
-
182
- Structured records produced by validation, rendering, execution, and verification.
183
-
184
- Evidence should survive outside the process as JSON or another stable format. It should be useful for CI summaries, release audits, and debugging failed publishes.
185
-
186
- ## Expected Public Surface
187
-
188
- The package should make these workflows straightforward:
189
-
190
- - initialize a starter config and optional CI workflow from templates
191
- - validate config JSON and schema shape
192
- - create a plan from config
193
- - inspect the plan without executing anything
194
- - render target-specific files
195
- - validate artifacts and target readiness
196
- - report static auth and CI readiness
197
- - produce evidence artifacts
198
- - print publish operations
199
- - execute approved operations
200
- - verify published state after execution
201
- - inspect status and resume only safe unfinished work
202
- - reconcile a matching GitHub draft release without republishing immutable registries
203
-
204
- The API should favor explicit functions and typed data over hidden global state.
205
-
206
- ## Configuration Principles
207
-
208
- Configuration should be declarative and boring.
209
-
210
- It should describe release facts and target policy, not arbitrary scripts. Escape hatches can exist, but they should be visible in the plan and evidence.
211
-
212
- Good config answers:
213
-
214
- - What is the release?
215
- - Which artifacts are part of it?
216
- - Which targets receive it?
217
- - What credentials or environment are required?
218
- - What must be validated first?
219
- - Which generated files or indexes will change?
220
- - Which operations are allowed to execute in this environment?
221
-
222
- Release strategies should stay declarative:
223
-
224
- - static config is for manually audited release identity
225
- - package manifest identity is for package releases with one version source
226
- - Git tag decisions are for tag-triggered workflows
227
- - conventional commit decisions are for automated SemVer from commit messages
228
- - intent-file decisions are for release intent reviewed in PRs
229
-
230
- Artifact path templates may interpolate only named release data such as `{version}`, `{name}`, and `{normalizedName}`. They must be expanded before path safety and artifact inventory checks.
231
-
232
- ## Testing Strategy
233
-
234
- The core should be heavily testable without real external services.
235
-
236
- Important test categories:
237
-
238
- - config parsing and normalization
239
- - invalid config diagnostics
240
- - deterministic plan generation
241
- - adapter capability modeling
242
- - dry-run behavior
243
- - irreversible-operation gating
244
- - evidence recording
245
- - command construction without execution
246
- - execution through fake host implementations
247
- - target adapter contract tests
248
-
249
- Real integration tests can exist for official validators and sandbox registries, but the core should not depend on live services to prove its behavior.
250
-
251
- ## Success Criteria
252
-
253
- The rewrite is successful when:
254
-
255
- - a user can define release intent in a small config
256
- - the package produces a reviewable release plan with no side effects
257
- - target differences are explicit in the plan
258
- - validation emits structured evidence
259
- - publish operations are blocked by default
260
- - irreversible operations require deliberate approval
261
- - core behavior is covered with deterministic tests
262
- - a CLI can be rebuilt as a thin adapter over the library
263
- - a GitHub Action can run the same workflows without embedding CLI behavior
264
- - starter templates can be checked by the same workflow path as examples
265
- - adding a new target does not require rewriting the core planner
266
-
267
- ## Biases
268
-
269
- Prefer:
270
-
271
- - explicit data over implicit conventions
272
- - small target adapters over a large universal abstraction
273
- - official ecosystem validators over homegrown approximations
274
- - deterministic planning over clever runtime discovery
275
- - evidence artifacts over terminal-only output
276
- - hard failures for unsafe ambiguity
277
- - dry-run as the default mode
278
-
279
- Avoid:
280
-
281
- - hook-runner architecture as the core design
282
- - hidden publish side effects during validation
283
- - target adapters that silently shell out without modeling risk
284
- - global process state in the planning layer
285
- - special cases that only work for one repository shape
286
- - abstractions that erase important ecosystem differences
287
-
288
- ## Implementation Direction
289
-
290
- Continue from the data model.
291
-
292
- Keep the smallest set of types needed to represent release identity, artifacts, targets, operations, validation results, execution gates, and evidence. Add target adapters end to end only when they prove the abstractions carry real differences without becoming generic mush.
293
-
294
- The implementation should stay narrow but honest:
295
-
296
- 1. Load config.
297
- 2. Normalize into a release model.
298
- 3. Generate a serializable plan.
299
- 4. Render generated files only through explicit render operations.
300
- 5. Validate with structured evidence.
301
- 6. Print executable operations.
302
- 7. Execute only when explicitly approved.
303
- 8. Verify remote state and report status from evidence.
304
-
305
- Everything else should be added only after it has a clear place in that flow.
1
+ # ts-release specification
2
+
3
+ ## 1. Public operations
4
+
5
+ The root package exports `inspect`, `prepare`, `observe`, `publish`, `release`,
6
+ and `correct`, plus `makeReleaseApi`, durable-reference codecs, configuration helpers, and
7
+ tagged input/runtime errors. The total observation and release report schemas,
8
+ transient credential acquisition errors, and their secret-free durable causes
9
+ are also public. The constructed API adds `dispose` for its host runtime. CLI
10
+ and Action boundaries call these same operations.
11
+
12
+ ## 2. Authored and verified forms
13
+
14
+ Authored configuration is decoded strictly. Resolution combines it with
15
+ observed package and Git facts; disagreement is an error. Verified context
16
+ records the clean source commit/tree and package-manifest digest. Preparation
17
+ materializes that exact commit into a fresh private staging root. Changed,
18
+ ignored, or untracked workspace bytes are never implicit inputs.
19
+
20
+ ## 3. Derived graph
21
+
22
+ The graph contains imported artifacts, build, archive, checksum, command check,
23
+ command artifact, typed Homebrew/Scoop rendering, npm publication, exact-file
24
+ PyPI publication, GitHub Release publication, and catalog Git publication
25
+ primitives. It is
26
+ sorted and linked inside one process. It is never serialized as authority and
27
+ never crosses a runner boundary.
28
+
29
+ ## 4. Prepared release
30
+
31
+ `prepared-release/v2` is canonical JSON plus content-addressed blobs. A
32
+ `CompletePreparedReleaseRef` is the only public cross-process locator and
33
+ contains content identity, never a local path. The complete manifest records
34
+ materialized source identity, project coordinates, artifact IDs, exact
35
+ sizes/digests/media types, input basis, execution provenance, and provider
36
+ subjects. A prepared store refuses missing, altered, extra, symlinked,
37
+ non-canonical, or producer-mismatched content.
38
+
39
+ An npm trusted-publishing subject also binds the exact verified source commit
40
+ and a versioned GitHub/npm provenance-environment contract. The host validates
41
+ all npm-consumed GitHub run facts before reading OIDC authority, snapshots them
42
+ privately onto the issued workload grant, and projects only that snapshot plus
43
+ the two OIDC request values into the closed npm child.
44
+
45
+ A PyPI publication records one independent subject per prebuilt wheel or gzip
46
+ sdist. Preparation parses archive structure and embedded metadata and requires
47
+ project/version/filename agreement before the file can enter a prepared
48
+ manifest. Each subject binds the closed PyPI/TestPyPI Simple and upload
49
+ endpoints, exact filename, size, SHA-256, media type, and distribution tags.
50
+
51
+ ## 5. Observation
52
+
53
+ Publication is subject-based. `observe` uses a read-only report algebra.
54
+ `publish` observes every subject before mutation and again afterward.
55
+ Equivalent subjects are idempotent skips; only a typed provider decision may
56
+ authorize mutation; conflict or inconclusive state blocks. Provider correction
57
+ intent is typed and bound to the prepared digest. npm and GitHub Release
58
+ requests produce external proposals; catalog Git admits one SemVer-forward
59
+ conditional replacement of its exact target/state pair. Credential unavailability
60
+ and unsupported authentication remain total report data with distinct tagged,
61
+ secret-free causes; they do not escape as publication control flow.
62
+
63
+ PyPI observation accepts only a standards-shaped JSON Simple response with
64
+ API major 1 and the API 1.1 equality fields. A visible project page that omits
65
+ the exact filename can authorize token upload only after the host atomically
66
+ creates a shared, durable, terminal claim for the prepared subject. Claim
67
+ unavailability or occupation blocks before credential acquisition. A project
68
+ 404 never authorizes first creation. Yanked files conflict; no yank mutation
69
+ is installed. Trusted publishing is an external PyPA Action path and is
70
+ rejected by the stock coordinator before dispatch.
71
+
72
+ Catalog observation reads the exact branch ref, commit, complete untruncated
73
+ recursive tree, and both managed blobs. Mutation creates exact blobs and a tree
74
+ with the observed root as `base_tree`, verifies every unrelated object and mode
75
+ in the proposed full tree, creates a commit with the observed commit as its
76
+ sole parent, and updates the ref with `force: false`. A catalog subject depends
77
+ on convergence of its configured GitHub release asset subjects.
78
+
79
+ ## 6. Native preparation
80
+
81
+ `CommandCheck` runs trusted argv code against declared inputs. `CommandArtifact`
82
+ generates or transforms declared regular-file outputs. `builder: "command"`
83
+ lowers to the same primitive. Generic preparation children inherit no host
84
+ environment. A nonempty authored environment request is rejected unless a
85
+ future dedicated capability certifies its safe build-time contract. There is
86
+ no generic hook or remote-publisher escape hatch. The public API recognizes
87
+ reserved partition and merge preparation modes and rejects them with
88
+ `PreparationModeUnsupported`; it creates no partial durable object.
89
+
90
+ ## 7. Hosts
91
+
92
+ The capability registry owns separate execution-host, artifact-target, and
93
+ native-tool-host axes. Linux is the only installed execution host. The exact
94
+ advertised artifact targets are Linux x64/arm64 and macOS x64/arm64; macOS
95
+ binaries are cross-compiled artifacts, not execution-host evidence. Windows is
96
+ neither an execution host nor an advertised artifact target, and the
97
+ self-release does not distribute a Windows ts-release binary. WSL is Linux for
98
+ this contract.
99
+
100
+ The checked-in Action is a Linux workflow boundary: its composite step
101
+ requires Bash and a workflow-installed, pinned Bun runtime. The distributed
102
+ package and CLI run under the declared Node engine, but preparation and
103
+ network-denied command execution delegate to an external Bun executable whose
104
+ Linux child loads `libseccomp.so.2`. The standalone CLI is therefore not a
105
+ self-contained preparation sandbox. These declared axes still require the
106
+ clean-candidate public-entrypoint smoke matrix before release certification.
107
+
108
+ ## 8. Error and safety contract
109
+
110
+ Structured Effect errors cross the library boundary. A pre-commit preparation
111
+ failure proves no remote mutation; a post-commit abort carries the exact
112
+ durable reference. Filesystem paths are contained and symlink-checked. Public
113
+ inputs contain no credential values. Secrets are acquired through host layers,
114
+ consumed only by audience- and purpose-checking sinks, and redacted at process
115
+ output boundaries. Host credential error text never enters durable reports;
116
+ only request-derived, secret-free cause data does. The Action validates its
117
+ inputs before calling the library.
118
+
119
+ ## 9. Recovery limits
120
+
121
+ Rerun the same prepared bytes. A partial release is possible; atomic rollback,
122
+ deletion, exactly-once publication, and universal correction are not claimed.
123
+ PyPI filenames remain consumed after deletion and uncertain token uploads are
124
+ never blindly replayed; the required terminal claim survives process loss and
125
+ must be shared by every runner capable of dispatching that subject.
126
+ Read-convergence timing defaults are conservative assumed bounds until live
127
+ post-write evidence measures them. Announcements and unsupported providers
128
+ remain outside the retained product.
129
+
130
+ ## 10. Product evidence
131
+
132
+ In the source distribution, the generated capability inventory is joined
133
+ one-to-one from executable module values and dated evidence. Evidence records
134
+ contain sanitized references only and cannot configure runtime support. A
135
+ source checkout, configuration field, detached test, or protocol double is not
136
+ release certification.
137
+
138
+ ## 11. Distribution
139
+
140
+ The canonical package identity is `@mannyc1/ts-release`. The canonical Action
141
+ is the monorepo subpath `mannyc2/ts-release/apps/ts-release-action`. Public
142
+ consumer documents bind an immutable version only when its tag targets the
143
+ exact certified result commit before the package README becomes visible.
144
+ Installed Node package consumers require
145
+ `^22.22.2 || ^24.15.0 || >=26.0.0`. The checked-in Action declares a composite
146
+ runtime and runs `dist/index.js` with the pinned Bun installed earlier in each
147
+ advertised Linux workflow. Its entrypoint evidence is separate from installed
148
+ package evidence and does not alter the package's Node engine. The packaged
149
+ Node CLI still requires external Bun and, for network-denied commands on its
150
+ Linux execution host, `libseccomp.so.2`.
151
+
152
+ ## 12. Non-goals
153
+
154
+ The engine does not transport host-gate identity or persist execution history as authority,
155
+ provide generic lifecycle hooks, or claim to be a language-specific clone of
156
+ another release product. Arbitrary catalog templates, engine-owned downstream
157
+ announcements, dynamic adapter discovery, and command publishers are not
158
+ capabilities installed in the stock kernel.
159
+
160
+ ## 13. Root export audit
161
+
162
+ The root runtime exports are exactly:
163
+
164
+ - `AuthoredGithubReleaseAmendment`
165
+ - `AuthoredCatalogForwardCorrection`
166
+ - `AuthoredNpmDeprecation`
167
+ - `CompletePreparedReleaseRef`
168
+ - `CorrectionReport`
169
+ - `CredentialFailureCause`
170
+ - `CredentialStrategyUnsupported`
171
+ - `CredentialStrategyUnsupportedCause`
172
+ - `CredentialUnavailable`
173
+ - `CredentialUnavailableCause`
174
+ - `GitHubActionsCompletePreparedReleaseRef`
175
+ - `LocalCompletePreparedReleaseRef`
176
+ - `ObservationReport`
177
+ - `PreparationModeUnsupported`
178
+ - `PreparedReleaseRefCodecError`
179
+ - `PreparedReleaseRefMalformedError`
180
+ - `PreparedReleaseRefUnknownSchemeError`
181
+ - `ReleaseAbortedError`
182
+ - `ReleaseIncompleteError`
183
+ - `ReleasePreparationError`
184
+ - `ReleaseReport`
185
+ - `correct`
186
+ - `decodeAuthoredCorrection`
187
+ - `decodeCompletePreparedReleaseRef`
188
+ - `defineRelease`
189
+ - `encodeCompletePreparedReleaseRef`
190
+ - `encodeResolvedConfig`
191
+ - `inspect`
192
+ - `makeGitHubActionsCompletePreparedReleaseRef`
193
+ - `makeLocalCompletePreparedReleaseRef`
194
+ - `makeReleaseApi`
195
+ - `observe`
196
+ - `prepare`
197
+ - `publish`
198
+ - `release`
199
+ - `ReleaseInputError`
200
+ - `ReleaseRuntime`
201
+ - `resolveConfig`
202
+ - `unsupportedExecutionHost`
203
+
204
+ ## 14. License
205
+
206
+ MIT.
@@ -0,0 +1,32 @@
1
+ # ts-release CLI
2
+
3
+ The CLI exposes exactly seven commands:
4
+
5
+ - `init` writes an explicit preset only after that preset passes strict
6
+ authored-config inspection.
7
+ - `inspect` observes authored configuration or reads a prepared bundle.
8
+ - `prepare` stages native preparations and stores an exact bundle.
9
+ - `observe` reads the remote subjects for one prepared bundle without mutation.
10
+ - `publish` observes and publishes one prepared bundle.
11
+ - `release` composes preparation and publication automatically.
12
+ - `correct` binds one provider-specific correction proposal to the exact
13
+ prepared subject; the installed kernel has no corrective mutation adapter.
14
+
15
+ ```sh
16
+ bun run cli init --preset bun-npm-github
17
+ bun run cli inspect --config release.config.json
18
+ bun run cli release --config release.config.json
19
+ ```
20
+
21
+ The published Node bundle is built from `src/cli/node-main.ts`; development
22
+ uses the Bun host entrypoint.
23
+
24
+ The publishing preset first discovers the canonical owner/repository, then
25
+ writes explicit trusted-publishing and GitHub intent and strictly inspects the
26
+ exact generated object. It refuses to guess when repository discovery is
27
+ ambiguous or absent.
28
+
29
+ The preset binds trusted publication to `.github/workflows/release.yml` at
30
+ `refs/heads/main`. Change both `workflow` and `workflowRef` when another exact
31
+ workflow/ref is the intended host; a mismatch is rejected before OIDC request
32
+ material is read.