@mannyc1/ts-release 0.0.7 → 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 (635) hide show
  1. package/ARCHITECTURE.md +124 -92
  2. package/CHANGELOG.md +115 -0
  3. package/LICENSE +21 -0
  4. package/README.md +278 -324
  5. package/SPEC.md +206 -310
  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 +60 -156
  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 -72
  440. package/templates/bun-cli-github/README.md +7 -9
  441. package/templates/bun-cli-github/release.config.json +35 -73
  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/artifacts/adapter.d.ts +0 -39
  455. package/dist/artifacts/adapter.d.ts.map +0 -1
  456. package/dist/artifacts/adapter.js +0 -23
  457. package/dist/artifacts/adapter.js.map +0 -1
  458. package/dist/artifacts/registry.d.ts +0 -21
  459. package/dist/artifacts/registry.d.ts.map +0 -1
  460. package/dist/artifacts/registry.js +0 -21
  461. package/dist/artifacts/registry.js.map +0 -1
  462. package/dist/config/errors.d.ts +0 -24
  463. package/dist/config/errors.d.ts.map +0 -1
  464. package/dist/config/errors.js +0 -19
  465. package/dist/config/errors.js.map +0 -1
  466. package/dist/config/load.d.ts +0 -9
  467. package/dist/config/load.d.ts.map +0 -1
  468. package/dist/config/load.js +0 -29
  469. package/dist/config/load.js.map +0 -1
  470. package/dist/config/schema.d.ts +0 -12
  471. package/dist/config/schema.d.ts.map +0 -1
  472. package/dist/config/schema.js +0 -19
  473. package/dist/config/schema.js.map +0 -1
  474. package/dist/domain/artifact.d.ts +0 -118
  475. package/dist/domain/artifact.d.ts.map +0 -1
  476. package/dist/domain/artifact.js +0 -197
  477. package/dist/domain/artifact.js.map +0 -1
  478. package/dist/domain/evidence.d.ts +0 -59
  479. package/dist/domain/evidence.d.ts.map +0 -1
  480. package/dist/domain/evidence.js +0 -51
  481. package/dist/domain/evidence.js.map +0 -1
  482. package/dist/domain/operation.d.ts +0 -143
  483. package/dist/domain/operation.d.ts.map +0 -1
  484. package/dist/domain/operation.js +0 -198
  485. package/dist/domain/operation.js.map +0 -1
  486. package/dist/domain/release.d.ts +0 -93
  487. package/dist/domain/release.d.ts.map +0 -1
  488. package/dist/domain/release.js +0 -82
  489. package/dist/domain/release.js.map +0 -1
  490. package/dist/domain/remote-state.d.ts +0 -58
  491. package/dist/domain/remote-state.d.ts.map +0 -1
  492. package/dist/domain/remote-state.js +0 -55
  493. package/dist/domain/remote-state.js.map +0 -1
  494. package/dist/domain/target.d.ts +0 -148
  495. package/dist/domain/target.d.ts.map +0 -1
  496. package/dist/domain/target.js +0 -151
  497. package/dist/domain/target.js.map +0 -1
  498. package/dist/host/host.d.ts +0 -32
  499. package/dist/host/host.d.ts.map +0 -1
  500. package/dist/host/host.js +0 -24
  501. package/dist/host/host.js.map +0 -1
  502. package/dist/host/http-live.d.ts +0 -6
  503. package/dist/host/http-live.d.ts.map +0 -1
  504. package/dist/host/http-live.js +0 -86
  505. package/dist/host/http-live.js.map +0 -1
  506. package/dist/host/http.d.ts +0 -43
  507. package/dist/host/http.d.ts.map +0 -1
  508. package/dist/host/http.js +0 -59
  509. package/dist/host/http.js.map +0 -1
  510. package/dist/host/platform.d.ts +0 -10
  511. package/dist/host/platform.d.ts.map +0 -1
  512. package/dist/host/platform.js +0 -114
  513. package/dist/host/platform.js.map +0 -1
  514. package/dist/host/test.d.ts +0 -23
  515. package/dist/host/test.d.ts.map +0 -1
  516. package/dist/host/test.js +0 -222
  517. package/dist/host/test.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 -86
  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 -67
  531. package/dist/planner/errors.d.ts.map +0 -1
  532. package/dist/planner/errors.js +0 -58
  533. package/dist/planner/errors.js.map +0 -1
  534. package/dist/planner/evidence-recorder.d.ts +0 -28
  535. package/dist/planner/evidence-recorder.d.ts.map +0 -1
  536. package/dist/planner/evidence-recorder.js +0 -362
  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 -147
  541. package/dist/planner/executor.js.map +0 -1
  542. package/dist/planner/normalize-release.d.ts +0 -19
  543. package/dist/planner/normalize-release.d.ts.map +0 -1
  544. package/dist/planner/normalize-release.js +0 -342
  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 -259
  549. package/dist/planner/reconcile.js.map +0 -1
  550. package/dist/planner/render-plan.d.ts +0 -15
  551. package/dist/planner/render-plan.d.ts.map +0 -1
  552. package/dist/planner/render-plan.js +0 -231
  553. package/dist/planner/render-plan.js.map +0 -1
  554. package/dist/targets/adapter-helpers.d.ts +0 -79
  555. package/dist/targets/adapter-helpers.d.ts.map +0 -1
  556. package/dist/targets/adapter-helpers.js +0 -194
  557. package/dist/targets/adapter-helpers.js.map +0 -1
  558. package/dist/targets/adapter.d.ts +0 -17
  559. package/dist/targets/adapter.d.ts.map +0 -1
  560. package/dist/targets/adapter.js +0 -2
  561. package/dist/targets/adapter.js.map +0 -1
  562. package/dist/targets/github-release.d.ts +0 -25
  563. package/dist/targets/github-release.d.ts.map +0 -1
  564. package/dist/targets/github-release.js +0 -82
  565. package/dist/targets/github-release.js.map +0 -1
  566. package/dist/targets/github.d.ts +0 -11
  567. package/dist/targets/github.d.ts.map +0 -1
  568. package/dist/targets/github.js +0 -117
  569. package/dist/targets/github.js.map +0 -1
  570. package/dist/targets/homebrew.d.ts +0 -11
  571. package/dist/targets/homebrew.d.ts.map +0 -1
  572. package/dist/targets/homebrew.js +0 -210
  573. package/dist/targets/homebrew.js.map +0 -1
  574. package/dist/targets/live.d.ts +0 -5
  575. package/dist/targets/live.d.ts.map +0 -1
  576. package/dist/targets/live.js +0 -50
  577. package/dist/targets/live.js.map +0 -1
  578. package/dist/targets/npm.d.ts +0 -10
  579. package/dist/targets/npm.d.ts.map +0 -1
  580. package/dist/targets/npm.js +0 -112
  581. package/dist/targets/npm.js.map +0 -1
  582. package/dist/targets/pypi.d.ts +0 -11
  583. package/dist/targets/pypi.d.ts.map +0 -1
  584. package/dist/targets/pypi.js +0 -141
  585. package/dist/targets/pypi.js.map +0 -1
  586. package/dist/targets/registry.d.ts +0 -25
  587. package/dist/targets/registry.d.ts.map +0 -1
  588. package/dist/targets/registry.js +0 -34
  589. package/dist/targets/registry.js.map +0 -1
  590. package/dist/targets/scoop.d.ts +0 -11
  591. package/dist/targets/scoop.d.ts.map +0 -1
  592. package/dist/targets/scoop.js +0 -88
  593. package/dist/targets/scoop.js.map +0 -1
  594. package/dist/types/effect-internal.d.ts +0 -5
  595. package/dist/types/effect-internal.d.ts.map +0 -1
  596. package/dist/types/effect-internal.js +0 -2
  597. package/dist/types/effect-internal.js.map +0 -1
  598. package/dist/workflows/config.d.ts +0 -202
  599. package/dist/workflows/config.d.ts.map +0 -1
  600. package/dist/workflows/config.js +0 -420
  601. package/dist/workflows/config.js.map +0 -1
  602. package/dist/workflows/diagnostics.d.ts +0 -62
  603. package/dist/workflows/diagnostics.d.ts.map +0 -1
  604. package/dist/workflows/diagnostics.js +0 -530
  605. package/dist/workflows/diagnostics.js.map +0 -1
  606. package/dist/workflows/distribution.d.ts +0 -25
  607. package/dist/workflows/distribution.d.ts.map +0 -1
  608. package/dist/workflows/distribution.js +0 -24
  609. package/dist/workflows/distribution.js.map +0 -1
  610. package/dist/workflows/evidence.d.ts +0 -17
  611. package/dist/workflows/evidence.d.ts.map +0 -1
  612. package/dist/workflows/evidence.js +0 -32
  613. package/dist/workflows/evidence.js.map +0 -1
  614. package/dist/workflows/index.d.ts +0 -8
  615. package/dist/workflows/index.d.ts.map +0 -1
  616. package/dist/workflows/index.js +0 -7
  617. package/dist/workflows/index.js.map +0 -1
  618. package/dist/workflows/init.d.ts +0 -84
  619. package/dist/workflows/init.d.ts.map +0 -1
  620. package/dist/workflows/init.js +0 -487
  621. package/dist/workflows/init.js.map +0 -1
  622. package/dist/workflows/live.d.ts +0 -9
  623. package/dist/workflows/live.d.ts.map +0 -1
  624. package/dist/workflows/live.js +0 -7
  625. package/dist/workflows/live.js.map +0 -1
  626. package/dist/workflows/options.d.ts +0 -30
  627. package/dist/workflows/options.d.ts.map +0 -1
  628. package/dist/workflows/options.js +0 -16
  629. package/dist/workflows/options.js.map +0 -1
  630. package/examples/non-strict-skips/artifacts/release-example-skips-0.1.0.tgz +0 -1
  631. package/examples/non-strict-skips/release.config.json +0 -31
  632. package/examples/pypi-registry/release.config.json +0 -31
  633. package/templates/github-actions/plan-and-approved-execute.yml +0 -58
  634. package/templates/github-actions/plan-only.yml +0 -33
  635. package/templates/github-actions/trusted-publishing.yml +0 -61
package/README.md CHANGED
@@ -1,382 +1,336 @@
1
- # @mannyc1/ts-release
1
+ # ts-release
2
2
 
3
- Portable artifact and package-manager distribution planning for TypeScript projects.
3
+ Automate multi-artifact releases and safely resume partial publication.
4
4
 
5
- `@mannyc1/ts-release` helps you declare the thing you want to distribute, stage
6
- platform-specific artifacts when needed, and feed those artifacts into
7
- target-specific package managers, catalogs, release hosts, and install surfaces.
8
- Publish operations still stay reviewable and approval-gated, but the product
9
- center is portable distribution data.
5
+ ## Release locally
10
6
 
11
- Use it when you need to answer:
12
-
13
- - Which binaries, archives, packages, or generated files make up this release?
14
- - Which package managers or install channels consume each artifact variant?
15
- - What target-specific files or commands will be generated?
16
- - Which operations are only rendering data, and which ones publish externally?
17
- - What evidence proves what was staged, rendered, validated, or executed?
18
-
19
- The root package is the reusable TypeScript library. This repo also contains the
20
- first-party Bun CLI app in `apps/release-ts` and the bundled GitHub Action in
21
- `apps/ts-release-action`.
22
-
23
- ## What It Does
24
-
25
- `ts-release` models distribution as data:
26
-
27
- ```text
28
- release config
29
- -> normalized release identity
30
- -> artifact recipes and inventory
31
- -> installable artifact variants
32
- -> target-specific distribution operations
33
- -> generated package-manager files
34
- -> explicit execution evidence
35
- -> verification or reconciliation
36
- ```
37
-
38
- The library currently plans, stages, and validates these distribution surfaces:
39
-
40
- | Surface | What ts-release models |
41
- |---|---|
42
- | npm | package publish, native dry-run validation, provenance, trusted publishing |
43
- | GitHub Releases | release creation, asset uploads, REST API verification, draft reconciliation |
44
- | Homebrew taps | generated formula files, macOS artifact variants, and approved tap pushes |
45
- | PyPI | already-built distributions and platform CLI wrapper wheels published through Twine |
46
- | Scoop buckets | generated manifest files, Windows binary shims, and approved bucket pushes |
47
- | Bun executables | optional binary artifact recipe staging before target planning |
48
-
49
- It is not a fake universal package manager and does not hide each ecosystem's
50
- manifest rules. It can stage declared artifacts through adapters, but it does
51
- not replace full build pipelines, compilers, signing, or installer toolchains.
52
- The job is to keep shared artifact inventory and target-specific distribution
53
- data in one typed plan.
54
-
55
- ## Quick Start
56
-
57
- Inside this repository, the CLI script runs the first-party Bun app:
58
-
59
- ```sh
60
- bun run cli init --template bun-cli-github --package @scope/pkg --repo owner/repo --github-actions --write
61
- bun run cli validate-config --config release.config.json
62
- bun run cli stage-artifacts --config release.config.json --format text
63
- bun run cli plan --config release.config.json --format text
64
- bun run cli render --config release.config.json
65
- ```
66
-
67
- The first useful path is artifact-first: write or scaffold a config, stage any
68
- declared artifact recipes, plan the target distribution work, then render
69
- package-manager files or release metadata. These commands do not publish
70
- anything unless an execution command receives explicit approval.
71
-
72
- To publish through the full ordered workflow, pass both execution approvals:
73
-
74
- ```sh
75
- bun run cli run --config release.config.json --execute --approve-irreversible
76
- ```
77
-
78
- `run` renders generated files, validates preflights, executes approved publish
79
- operations, and verifies remote state. The lower-level commands are available
80
- when you want a manual pause between phases:
7
+ The normal path is one command from a clean Git checkout:
81
8
 
82
9
  ```sh
83
- bun run cli render --config release.config.json --execute
84
- bun run cli validate --config release.config.json
85
- bun run cli print --config release.config.json
86
- bun run cli execute --config release.config.json --execute --approve-irreversible
87
- bun run cli verify --config release.config.json
88
- ```
89
-
90
- ## GitHub Actions
91
-
92
- The bundled action is the intended CI adapter:
93
-
94
- ```yaml
95
- - uses: mannyc2/ts-release-action@v1
96
- with:
97
- command: plan
98
- config: release.config.json
99
- format: markdown
100
- upload-evidence: true
10
+ ts-release release --config release.config.json
101
11
  ```
102
12
 
103
- Supported action commands are `plan`, `validate-config`, `doctor`, `check-auth`,
104
- `check-ci`, `validate`, `run`, and `reconcile`. Artifact recipe staging remains
105
- owned by the Bun CLI/runtime because the bundled action runs on Node.
13
+ `release` resolves observed package and Git facts, materializes the exact
14
+ verified commit, runs declared local preparation, commits one complete
15
+ `prepared-release/v2` bundle, observes every configured destination, and
16
+ publishes only after a provider-specific decision authorizes that exact
17
+ subject. The command prints the durable prepared reference and correlated
18
+ report. A blocked or uncertain report is preserved and exits nonzero.
106
19
 
107
- Publishing still needs explicit approval:
20
+ npm authentication is always explicit. A GitHub-hosted npm and GitHub release
21
+ can use this authored configuration:
108
22
 
109
- ```yaml
110
- - uses: mannyc2/ts-release-action@v1
111
- with:
112
- command: run
113
- config: release.config.json
114
- execute: "true"
115
- approve-irreversible: "true"
116
- upload-evidence: true
23
+ ```json
24
+ {
25
+ "project": { "repository": "owner/repo" },
26
+ "versionFrom": "manifest",
27
+ "npmPackage": { "path": "." },
28
+ "publish": {
29
+ "npm": {
30
+ "authentication": {
31
+ "strategy": "trusted-publishing",
32
+ "attestation": {
33
+ "provider": "github-actions",
34
+ "runner": "github-hosted",
35
+ "repository": "owner/repo",
36
+ "workflow": "release.yml",
37
+ "workflowRef": "refs/heads/main",
38
+ "allowedAction": "npm-publish-direct"
39
+ }
40
+ }
41
+ },
42
+ "github": {}
43
+ }
44
+ }
117
45
  ```
118
46
 
119
- For npm trusted publishing, configure npmjs for the GitHub repository and
120
- workflow, grant `id-token: write`, and keep `trustedPublishing` in the npm
121
- target. Trusted publishing uses OIDC during `npm publish`; it does not use
122
- `NPM_TOKEN`.
123
-
124
- For PyPI trusted publishing, configure a pending or existing PyPI Trusted
125
- Publisher for the GitHub repository, workflow, and release environment, then
126
- keep `trustedPublishing` in the PyPI target. Twine uses OIDC during
127
- `twine upload`; it does not require `TWINE_USERNAME` or `TWINE_PASSWORD` in CI.
128
-
129
- ## Config
130
-
131
- A release config declares identity, artifacts, target policy, and evidence
132
- location.
47
+ `workflow` and `workflowRef` are local host-admission constraints, not claims
48
+ about fields exposed by npm's trusted-publisher configuration. They must name
49
+ the workflow that actually invokes publication: use `release.yml` with the
50
+ automatic template and `reviewed-release.yml` with the reviewed template. The
51
+ host must observe that exact repository/path/ref on a GitHub-hosted runner
52
+ before it reads either OIDC request value. Public npm metadata reads are always
53
+ anonymous; private or custom-registry authenticated reads are unsupported
54
+ until configured with a distinct read credential.
55
+
56
+ The resolver fills package name, version, tag, commit, and repository only
57
+ when observed facts agree with authored intent. For a non-OIDC host, use
58
+ `{ "strategy": "token", "credential": "NPM_TOKEN" }` instead. The value of
59
+ that environment variable remains host-owned and never enters configuration,
60
+ prepared bytes, reports, or logs.
61
+
62
+ Prebuilt Python distributions can be published to the closed `pypi` or
63
+ `testpypi` destination. Each named artifact must be a valid wheel or gzip
64
+ sdist whose filename and embedded metadata agree with the configured project
65
+ and version:
133
66
 
134
67
  ```json
135
68
  {
136
- "$schema": "https://mannyc2.github.io/ts-release/schema/release-config.schema.json",
137
- "identity": {
138
- "_tag": "PackageManifestReleaseIdentitySource",
139
- "packagePath": "package.json",
140
- "commit": "HEAD",
141
- "tagTemplate": "v{version}"
142
- },
69
+ "project": { "name": "fixture", "version": "1.0.0", "tag": "v1.0.0" },
143
70
  "artifacts": [
144
- {
145
- "id": "package",
146
- "path": ".",
147
- "format": "directory",
148
- "consumers": ["npm"]
149
- }
71
+ { "id": "wheel", "path": "dist/fixture-1.0.0-py3-none-any.whl", "format": "file" }
150
72
  ],
151
- "targets": [
152
- {
153
- "_tag": "NpmRegistryTarget",
154
- "id": "npm",
155
- "registry": "https://registry.npmjs.org",
156
- "packageName": "@scope/pkg",
157
- "packagePath": ".",
158
- "trustedPublishing": {
159
- "provider": "github-actions",
160
- "workflow": "release.yml",
161
- "packageExists": true,
162
- "verifyPackageExists": true
163
- },
164
- "access": "public",
165
- "provenance": true,
166
- "dryRunSupport": "native",
167
- "mutability": "immutable",
168
- "recovery": "publish-new-version"
73
+ "publish": {
74
+ "pypi": {
75
+ "artifacts": ["wheel"],
76
+ "repository": "pypi",
77
+ "authentication": {
78
+ "strategy": "token",
79
+ "credential": "PYPI_TOKEN",
80
+ "scope": "project"
81
+ }
169
82
  }
170
- ],
171
- "strict": true,
172
- "evidenceDirectory": ".release/evidence/{version}"
83
+ }
173
84
  }
174
85
  ```
175
86
 
176
- Useful config commands:
87
+ PyPI token upload additionally requires the host to install a shared,
88
+ durable terminal `PublicationClaimStore`; runner-local files and memory do not
89
+ satisfy that contract. The stock CLI and Action deliberately fail closed
90
+ without one. Library hosts can pass it to `makeNodeReleaseLayer`,
91
+ `makeBunReleaseLayer`, or `makeCustomReleaseLayer`. The token is projected as
92
+ PyPI Basic authentication only inside the authorized HTTP sink. PyPI trusted
93
+ publishing is represented as an external, host-owned
94
+ `pypa/gh-action-pypi-publish@release/v1` path; the stock coordinator neither
95
+ exchanges its OIDC token nor claims to recover that external upload.
96
+
97
+ With the canonical GitHub origin or package repository configured, `init` can
98
+ discover the exact owner/repository coordinate and write this explicit shape:
177
99
 
178
100
  ```sh
179
- bun run cli schema --out release-config.schema.json
180
- bun run cli validate-config --config release.config.json --format text
181
- bun run cli plan --config release.config.json --format summary
182
- bun run cli explain npm:npm-publish --config release.config.json
101
+ ts-release init --preset bun-npm-github
183
102
  ```
184
103
 
185
- Paths are release-workspace relative. Artifact paths can interpolate
186
- `{version}`, `{name}`, and `{normalizedName}`. Evidence directories can
187
- interpolate `{version}`.
104
+ It refuses to guess when no repository coordinate is observable and strictly
105
+ inspects the exact generated configuration before writing it.
188
106
 
189
- ## Artifact Variants
107
+ ## Automatic GitHub Actions release
190
108
 
191
- Artifact recipes can produce installable variants for different operating
192
- systems and architectures. Bun executable recipes derive variant metadata from
193
- their compile target, so the release plan can carry facts such as `linux`/`x64`
194
- or `windows`/`x64` before any package-manager adapter consumes the artifact.
109
+ The default workflow is one job and one Action invocation. Copy the exact
110
+ [automatic workflow template](templates/github-actions/release.yml). It is
111
+ manual-only and requires `candidate_sha` to equal the current commit on
112
+ `refs/heads/main` before the job can reach checkout. Its
113
+ mutation job grants `contents: write` for the same-repository tag, release, and
114
+ assets, `id-token: write` for npm trusted publishing, and `actions: read` for
115
+ prepared-artifact recovery. It installs the publisher boundary explicitly,
116
+ uses the job-scoped `GITHUB_TOKEN`, and uploads the redacted report as a
117
+ recovery artifact.
195
118
 
196
- ```json
197
- {
198
- "id": "cli-linux-x64",
199
- "target": "bun-linux-x64-baseline",
200
- "path": "artifacts/pkg-{version}-linux-x64",
201
- "consumers": ["github"]
202
- }
203
- ```
204
-
205
- The planned artifact inventory for that output includes an executable artifact
206
- with a variant like:
207
-
208
- ```json
209
- {
210
- "os": "linux",
211
- "arch": "x64",
212
- "libc": "glibc",
213
- "targetTriple": "bun-linux-x64-baseline"
214
- }
119
+ ```yaml
120
+ - id: release
121
+ uses: mannyc2/ts-release/apps/ts-release-action@v0.2.2
122
+ env:
123
+ GITHUB_TOKEN: ${{ github.token }}
124
+ with:
125
+ command: ${{ inputs.prepared_ref == '' && 'release' || 'publish' }}
126
+ config: ${{ inputs.prepared_ref == '' && 'release.config.json' || '' }}
127
+ prepared: ${{ inputs.prepared_ref }}
215
128
  ```
216
129
 
217
- Direct artifact declarations can also include `variant` when an artifact was
218
- built outside `ts-release`. Homebrew formulas can consume macOS `darwin` x64
219
- and arm64 variants from one target, and Scoop manifests can derive a stable shim
220
- from a Windows executable variant. Future package-manager adapters should follow
221
- that pattern instead of guessing platform support from filenames.
222
-
223
- ## Diagnostics
224
-
225
- Static diagnostics help catch missing auth and unsafe workflow setup before an
226
- approved run:
130
+ Leave `prepared_ref` empty for a fresh release. To resume after durable
131
+ preparation, dispatch the same candidate with the exact emitted
132
+ `prepared:gha:` reference; the job selects `publish`, loads and verifies the
133
+ original bundle, and does not rebuild.
134
+
135
+ `v0.2.2` is the immutable monorepo-subpath coordinate intended for this
136
+ candidate. Packaging and release certification must stop unless that tag is
137
+ created from the exact certified result commit before consumers can see a
138
+ README that names it. A floating Action branch is never an alternative.
139
+
140
+ ## Optional environment-gated publication
141
+
142
+ When a host policy requires a protected environment, use the
143
+ [two-job workflow template](templates/github-actions/reviewed-release.yml).
144
+ Copy its paired
145
+ [reviewed configuration](templates/npm-github/reviewed-release.config.json)
146
+ to the repository root with the same filename; the workflow loads that exact
147
+ file.
148
+ Its prepare job has read-only repository authority and no OIDC permission. It
149
+ uploads one complete prepared bundle and passes only its content-addressed
150
+ hosted reference. The environment-gated publish job installs the publisher
151
+ toolchain, receives mutation permissions, reloads and verifies the bundle, and
152
+ then observes destinations before any write. The environment gate remains a workflow
153
+ fact; it is not release-engine identity or data.
154
+
155
+ The reviewed configuration attests `workflow: "reviewed-release.yml"` and
156
+ `workflowRef: "refs/heads/main"`. Keep the workflow filename and dispatch it
157
+ from that ref with `candidate_sha` equal to the current commit, or deliberately
158
+ update both constraints. Reusing an automatic configuration that attests
159
+ `release.yml` fails before OIDC acquisition. Recover a failed reviewed
160
+ publication by rerunning the publish job in the same workflow run, not by
161
+ preparing again.
162
+
163
+ ## Prepare without publication
164
+
165
+ Use the split local path for build-only work or when bytes must cross an
166
+ explicit host boundary:
227
167
 
228
168
  ```sh
229
- bun run cli doctor --config release.config.json --format text
230
- bun run cli check-auth --config release.config.json --target npm --format text
231
- bun run cli check-ci --config release.config.json --workflow .github/workflows/release.yml --format markdown
169
+ prepared_ref="$(ts-release prepare --config release.config.json)"
170
+ ts-release inspect "$prepared_ref"
232
171
  ```
233
172
 
234
- Diagnostics report confidence levels instead of pretending local checks can
235
- prove provider-side setup. For example, npm trusted publishing can only be fully
236
- confirmed inside the configured GitHub Actions environment.
173
+ The value is a path-free `prepared:local:sha256-…` reference resolved against
174
+ the selected content-addressed store. `--store` selects another local store;
175
+ the reference itself never embeds a filesystem path. Publication accepts only
176
+ a complete reference and never rebuilds from source as a fallback.
177
+
178
+ Local extension work uses two primitives. `CommandCheck` is a pass/fail gate.
179
+ `CommandArtifact` generates or transforms declared regular-file bytes. Data
180
+ flow uses declared input and output IDs. Generic preparation children receive
181
+ no authored host environment values, and the runner may retain only `PATH` as
182
+ argv execution plumbing. Trusted commands are not a sandbox or a generic
183
+ remote-effect mechanism.
237
184
 
238
- ## Programmatic API
185
+ ## Observe and recover
239
186
 
240
- Install the library and provide platform services at your application boundary:
187
+ Observation is read-only:
241
188
 
242
189
  ```sh
243
- bun add @mannyc1/ts-release effect@beta @effect/platform-bun@beta
190
+ ts-release observe "$prepared_ref"
244
191
  ```
245
192
 
246
- High-level workflows are available from the opt-in workflow facade:
193
+ To resume a partial or response-lost release, publish the same reference:
247
194
 
248
- ```ts
249
- import * as BunHttpClient from "@effect/platform-bun/BunHttpClient"
250
- import * as BunServices from "@effect/platform-bun/BunServices"
251
- import * as Effect from "effect/Effect"
252
- import * as Layer from "effect/Layer"
253
- import { Distribution, Live } from "@mannyc1/ts-release/workflows"
254
-
255
- const root = "/path/to/release-workspace"
256
- const RuntimeLayer = Live.makeLayer({ root }).pipe(
257
- Layer.provideMerge(BunServices.layer),
258
- Layer.provideMerge(BunHttpClient.layer)
259
- )
260
-
261
- const textPlan = await Effect.runPromise(
262
- Distribution.renderPlan({ root, configPath: "release.config.json", format: "text" }).pipe(
263
- Effect.provide(RuntimeLayer)
264
- )
265
- )
266
-
267
- const evidence = await Effect.runPromise(
268
- Distribution.run({
269
- root,
270
- configPath: "release.config.json",
271
- execute: true,
272
- approveIrreversible: true
273
- }).pipe(Effect.provide(RuntimeLayer))
274
- )
275
-
276
- console.log(textPlan)
277
- console.log(evidence.schemaVersion)
195
+ ```sh
196
+ ts-release publish "$prepared_ref"
278
197
  ```
279
198
 
280
- Use `@mannyc1/ts-release/workflows` for the curated `Distribution`, `Config`,
281
- `Init`, `Diagnostics`, `Evidence`, and `Live` namespaces. The `Distribution`
282
- namespace is the artifact-first facade; `Config` keeps the lower-level
283
- config-file workflow names. Use exact subpaths such as
284
- `@mannyc1/ts-release/workflows/distribution` or lower-level `domain/`,
285
- `planner/`, `targets/`, and `host/` modules when you need tighter control or
286
- maximum tree-shaking.
199
+ Every attempt verifies the manifest and blobs, then reobserves every subject.
200
+ Equivalent subjects are skipped. Conflict and pre-mutation uncertainty stop
201
+ without mutation. A post-dispatch unknown outcome stays uncertain until a new
202
+ exact observation converges. Publication is not an atomic transaction, so a
203
+ release may partially succeed and there is no universal rollback.
287
204
 
288
- The package root export is intentionally empty. Public API is the explicit
289
- subpath list in `package.json`.
205
+ ## Provider-specific correction
290
206
 
291
- ## Templates And Examples
292
-
293
- Config templates live in `templates/`:
294
-
295
- - `npm-only`
296
- - `npm-github`
297
- - `bun-cli-github`
298
- - `multi-target-homebrew`
299
- - `multi-target-scoop`
300
-
301
- Runnable fixtures live in `examples/` and are checked through the same workflow
302
- path as user configs.
207
+ Correction is deliberately separate from ordinary publication:
303
208
 
304
209
  ```sh
305
- bun run build
306
- cd examples/multi-target
307
- bun ../../apps/release-ts/src/cli/main.ts plan --config release.config.json --format text
210
+ ts-release correct "$prepared_ref" correction.json
308
211
  ```
309
212
 
310
- Templates with `artifactRecipes` need an explicit staging step before target
311
- planning expects the generated files to exist:
213
+ The command binds authored intent to the exact prepared provider subject. npm
214
+ and GitHub Release corrections remain canonical external operator proposals.
215
+ Catalog Git installs one conditional `forward-catalog-state` correction: it
216
+ requires a SemVer-newer replacement and changes both the consumer formula or
217
+ manifest and its managed-state record against the exact observed branch
218
+ generation. Deletion, arbitrary inverse operations, and announcements are not
219
+ release destinations.
220
+
221
+ ## Capability and platform boundary
222
+
223
+ A source checkout or accepted field is not support evidence. The generated
224
+ capability inventory must join each supported row to its strict decoder,
225
+ default-layer entrypoint, exact observation semantics, and vertical test, and
226
+ the release-candidate matrix must exercise every claimed execution host.
227
+
228
+ | Axis | Kernel candidate boundary |
229
+ | --- | --- |
230
+ | Local preparation | Bun compilation, prebuilt imports, command checks/artifacts, archives, and checksums are retained; final support requires the generated capability and clean-candidate gates to agree. |
231
+ | Remote publication | npm, prebuilt PyPI distributions, GitHub Releases, and typed Homebrew/Scoop catalog Git delivery are installed. npm uses explicit trusted-publishing or token authentication; PyPI token writes require a host-supplied shared terminal claim store, and its trusted-publishing strategy is external-host-owned. |
232
+ | Correction | npm and GitHub authored proposals are exact-bound; PyPI yanking is observation-only; catalog Git installs exact paired SemVer-forward correction. |
233
+ | Execution hosts | Linux is the only installed execution host. The checked-in Action is a native Node 24 launcher around a workflow-installed, pinned Bun runtime. macOS and Windows are not ts-release execution hosts. |
234
+ | Artifact targets | The Bun builder advertises Linux and macOS x64/arm64 targets. macOS binaries are cross-compiled artifacts, not host-execution evidence. The self-release does not distribute a Windows ts-release binary. |
235
+ | Native tools | Linux preparation requires an external Bun executable and `libseccomp.so.2`; network-denied commands record both identities. WSL, when used, is Linux. A standalone CLI binary is not a self-contained replacement for these tools. |
236
+
237
+ Installed Node consumers must satisfy the package engine
238
+ `^22.22.2 || ^24.15.0 || >=26.0.0`; Bun consumers require Bun 1.3.14 or newer.
239
+ The checked-in Action uses GitHub's native Node 24 Action handler so the runner
240
+ can inject its Actions-artifact transport credentials. Its tiny checked-in
241
+ launcher passes no credentials to the Bun 1.3.14 runtime preloader, then runs
242
+ the checked-in `dist/index.js` through the workflow-installed Bun runtime.
243
+ Preparation stays in Bun, while every Actions-artifact upload or download is
244
+ delegated to the checked-in Node 24 bridge so the official artifact client runs
245
+ on its native stream implementation. The Action does not change the Node
246
+ engine of the installed library or CLI package.
247
+
248
+ The current source tree is not a release certificate. A published support
249
+ claim exists only after the clean-candidate evidence records all required
250
+ gates green; skipped live facts remain `UNVERIFIED`.
251
+
252
+ ## Extension jobs and exclusions
253
+
254
+ The kernel translates extension requests to the owner that can enforce them:
255
+
256
+ | User job | Owner |
257
+ | --- | --- |
258
+ | Tests, policy checks, generated notes, and agent bundles | `CommandCheck` or declared `CommandArtifact` bytes |
259
+ | npm, prebuilt PyPI, GitHub Release, and catalog Git remote verification/publication | Installed provider modules; PyPI token mutation also requires the shared terminal claim boundary |
260
+ | Environment protection or human authorization | External workflow host |
261
+ | Downstream announcements | External workflow step after a complete report |
262
+
263
+ Homebrew and Scoop rendering/delivery use typed renderers and an exact paired
264
+ Git Data subject; arbitrary whole-file catalog templating remains excluded.
265
+ Wrapper wheels remain excluded from the prebuilt PyPI slice unless an explicit product decision reopens them. PyPI
266
+ support is contract-tested but has not been live-write-dogfooded in this wave.
267
+ Custom library applications may compose full provider subjects through the
268
+ [`provider-sdk`](https://github.com/mannyc2/ts-release/blob/main/docs/native-extensions.md)
269
+ subpath. The stock CLI and Action
270
+ do not discover packages or treat generic hooks as remote publishers.
271
+
272
+ ## Library API
273
+
274
+ The Promise API uses the same lifecycle as the CLI and Action:
312
275
 
313
- ```sh
314
- bun run cli stage-artifacts --config release.config.json --format text
315
- ```
316
-
317
- ## Evidence
318
-
319
- Validation, rendering, execution, reconciliation, and verification write JSON
320
- evidence bundles. Primitive commands write named files such as
321
- `validation.json`; the full `run` workflow writes `evidence.json`.
322
-
323
- ```json
324
- {
325
- "schemaVersion": "release-evidence/v1",
326
- "releaseName": "release",
327
- "releaseVersion": "0.1.0",
328
- "records": [
329
- {
330
- "id": "npm:npm-pack-dry-run:command",
331
- "operationId": "npm:npm-pack-dry-run",
332
- "phase": "validation",
333
- "targetId": "npm",
334
- "risk": "read-only",
335
- "status": "passed",
336
- "severity": "info",
337
- "message": "npm pack dry run passed.",
338
- "startedAt": "2026-01-01T00:00:00.000Z",
339
- "endedAt": "2026-01-01T00:00:00.100Z",
340
- "durationMillis": 100,
341
- "command": "npm pack --dry-run --json",
342
- "exitCode": 0
343
- }
344
- ]
276
+ ```ts
277
+ import {
278
+ defineRelease,
279
+ encodeCompletePreparedReleaseRef,
280
+ makeReleaseApi
281
+ } from "@mannyc1/ts-release"
282
+ import { NodeReleaseLayer } from "@mannyc1/ts-release/node"
283
+
284
+ const config = defineRelease({
285
+ project: { repository: "owner/repo" },
286
+ versionFrom: "manifest" as const,
287
+ npmPackage: { path: "." },
288
+ publish: {
289
+ npm: {
290
+ authentication: {
291
+ strategy: "trusted-publishing" as const,
292
+ attestation: {
293
+ provider: "github-actions" as const,
294
+ runner: "github-hosted" as const,
295
+ repository: "owner/repo",
296
+ workflow: "release.yml",
297
+ workflowRef: "refs/heads/main",
298
+ allowedAction: "npm-publish-direct" as const
299
+ }
300
+ }
301
+ },
302
+ github: {}
303
+ }
304
+ })
305
+
306
+ const api = makeReleaseApi(NodeReleaseLayer)
307
+ try {
308
+ const result = await api.release({ config, workspace: process.cwd() })
309
+ console.log(encodeCompletePreparedReleaseRef(result.prepared))
310
+ console.log(result.report.status)
311
+ } finally {
312
+ await api.dispose()
345
313
  }
346
314
  ```
347
315
 
348
- Failed commands preserve partial evidence when possible. Non-strict mode records
349
- missing validators as visible skipped evidence instead of silently dropping them.
350
-
351
- ## Reconciliation
352
-
353
- `reconcile` is a narrow repair path for GitHub Releases. It reads the release by
354
- tag, blocks on mismatched metadata or assets, skips an already matching
355
- published release, and can publish a matching draft with `--execute`.
356
-
357
- It does not replay immutable registry publishes:
358
-
359
- ```sh
360
- bun run cli reconcile --config release.config.json --execute
361
- ```
362
-
363
- ## Repository Checks
364
-
365
- Use Bun for package management, scripts, and tests:
316
+ The public operations are `inspect`, `prepare`, `observe`, `publish`,
317
+ `release`, and `correct`. Public inputs contain neither credential values nor
318
+ prepared paths. The derived graph is ephemeral; the verified prepared
319
+ manifest and blobs are the durable cross-process boundary.
366
320
 
367
- ```sh
368
- bun run check:release
369
- bun run check:examples
370
- bun run check:readme
371
- ```
321
+ ## Agent bundles and development
372
322
 
373
- Real-tool integration checks are opt-in:
323
+ The single tracked agent source owner is `apps/ts-release-agents`. Generated
324
+ Codex and Claude layouts are ignored build output and are captured by the
325
+ self-release as declared `CommandArtifact` outputs. No root marketplace tree
326
+ is a second canonical owner.
374
327
 
375
328
  ```sh
376
- bun run test:integration:tools
377
- RELEASE_INTEGRATION_GITHUB=1 bun run test:integration:tools
329
+ bun install --frozen-lockfile
330
+ bun run check:portable
331
+ bun test
378
332
  ```
379
333
 
380
- See `ARCHITECTURE.md` for module boundaries, `SPEC.md` for the design contract,
381
- `templates/README.md` for starter configs, and `examples/README.md` for runnable
382
- fixtures.
334
+ The durable model is documented in [ARCHITECTURE.md](ARCHITECTURE.md), and the
335
+ precise public contract is in [SPEC.md](SPEC.md). Both files are included with the npm
336
+ package; this README does not rely on an unpackaged relative document.