@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
@@ -0,0 +1,12 @@
1
+ import { type CandidateConfig } from "../recipes/config.js";
2
+ import { CapabilityContribution, OutputDeclaration } from "./graph.js";
3
+ import type { VerifiedReleaseContext } from "./context.js";
4
+ export declare const contributeSourceArtifacts: (config: CandidateConfig, _context: VerifiedReleaseContext) => CapabilityContribution;
5
+ export declare const contributePackages: (config: CandidateConfig, artifacts: ReadonlyArray<OutputDeclaration>, _context: VerifiedReleaseContext) => CapabilityContribution;
6
+ export declare const contributeCatalogRendering: (config: CandidateConfig, artifacts: ReadonlyArray<OutputDeclaration>, kind: "homebrew" | "scoop") => CapabilityContribution;
7
+ export declare const contributeCatalogPublications: (config: CandidateConfig, artifacts: ReadonlyArray<OutputDeclaration>) => CapabilityContribution;
8
+ export declare const contributeNpmPublication: (config: CandidateConfig, context: VerifiedReleaseContext) => CapabilityContribution;
9
+ export declare const contributeGitHubPublication: (config: CandidateConfig, artifacts: ReadonlyArray<OutputDeclaration>) => CapabilityContribution;
10
+ export declare const contributePyPiPublication: (config: CandidateConfig, context: VerifiedReleaseContext, artifacts: ReadonlyArray<OutputDeclaration>) => CapabilityContribution;
11
+ export declare const contributeRelease: (config: CandidateConfig, context: VerifiedReleaseContext) => ReadonlyArray<CapabilityContribution>;
12
+ //# sourceMappingURL=capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/release/capabilities.ts"],"names":[],"mappings":"AAkBA,OAAO,EAIL,KAAK,eAAe,EAGrB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,sBAAsB,EAEsC,iBAAiB,EAEb,MAAM,YAAY,CAAA;AAC3F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAgB1D,eAAO,MAAM,yBAAyB,GACpC,QAAQ,eAAe,EACvB,UAAU,sBAAsB,KAC/B,sBAoFF,CAAA;AAED,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,eAAe,EACvB,WAAW,aAAa,CAAC,iBAAiB,CAAC,EAC3C,UAAU,sBAAsB,KAC/B,sBA8BF,CAAA;AAkFD,eAAO,MAAM,0BAA0B,GACrC,QAAQ,eAAe,EACvB,WAAW,aAAa,CAAC,iBAAiB,CAAC,EAC3C,MAAM,UAAU,GAAG,OAAO,KACzB,sBAWD,CAAA;AAEF,eAAO,MAAM,6BAA6B,GACxC,QAAQ,eAAe,EACvB,WAAW,aAAa,CAAC,iBAAiB,CAAC,KAC1C,sBAoDF,CAAA;AAED,eAAO,MAAM,wBAAwB,GACnC,QAAQ,eAAe,EACvB,SAAS,sBAAsB,KAC9B,sBA4BF,CAAA;AAED,eAAO,MAAM,2BAA2B,GACtC,QAAQ,eAAe,EACvB,WAAW,aAAa,CAAC,iBAAiB,CAAC,KAC1C,sBA0BF,CAAA;AAED,eAAO,MAAM,yBAAyB,GACpC,QAAQ,eAAe,EACvB,SAAS,sBAAsB,EAC/B,WAAW,aAAa,CAAC,iBAAiB,CAAC,KAC1C,sBAuCF,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,QAAQ,eAAe,EAAE,SAAS,sBAAsB,KAAG,aAAa,CAAC,sBAAsB,CAkBhI,CAAA"}
@@ -0,0 +1,395 @@
1
+ import { basename } from "node:path";
2
+ import * as Schema from "effect/Schema";
3
+ import { ArtifactCardinality, ArtifactCollectionContract, ArtifactCollectionId, ArtifactCollectionSelector } from "../model/artifact-collection.js";
4
+ import { NonEmptyName, OperationId, OutputId, SafeRelativePath } from "../model/primitives.js";
5
+ import { CatalogRenderSource, HomebrewRenderer, ScoopRenderer, GitHubRepositoryCoordinate, canonicalCatalogVersion } from "../model/catalog.js";
6
+ import { bunArtifactTarget } from "../capabilities/bun-targets.js";
7
+ import { NpmAuthentication, PyPiAuthentication, pypiRepositoryEndpoints } from "../recipes/config.js";
8
+ import { CapabilityContribution, GraphArchive, GraphChecksum, GraphCommandArtifact, GraphCommandCollection, GraphLinkError, GraphCommandCheck, GraphGitHubPublication, GraphNpmPackageBuild, GraphNpmPublication, GraphPyPiDistribution, GraphPyPiPublication, GraphCatalogRender, GraphCatalogPublication, OutputDeclaration, makeCatalogPublicationAuthorityIntent, makeGitHubPublicationAuthorityIntent, makeNpmPublicationAuthorityIntent, makePyPiPublicationAuthorityIntent } from "./graph.js";
9
+ const output = (id, location, kind, mediaType) => OutputDeclaration.make({ id: OutputId.make(id.toString()), path: SafeRelativePath.make(location), kind,
10
+ ...(mediaType === undefined ? {} : { mediaType }) });
11
+ const compact = (name) => name.replace(/^@/u, "").replaceAll("/", "-").replace(/[^A-Za-z0-9._-]+/gu, "-")
12
+ .replace(/^-+|-+$/gu, "");
13
+ const decodeCardinality = Schema.decodeUnknownSync(ArtifactCardinality, { onExcessProperty: "error" });
14
+ const decodeCollectionSelector = Schema.decodeUnknownSync(ArtifactCollectionSelector, { onExcessProperty: "error" });
15
+ const render = (value, config, target = "", binary = compact(config.project.name)) => {
16
+ const [os = "", arch = ""] = target.split("-");
17
+ return value.replaceAll("{name}", compact(config.project.name)).replaceAll("{version}", config.project.version)
18
+ .replaceAll("{tag}", config.project.tag).replaceAll("{targetTriple}", target).replaceAll("{target}", target)
19
+ .replaceAll("{os}", os).replaceAll("{arch}", arch).replaceAll("{binary}", binary)
20
+ .replaceAll("{ext}", os === "windows" ? ".exe" : "");
21
+ };
22
+ export const contributeSourceArtifacts = (config, _context) => {
23
+ const artifacts = [];
24
+ const preparations = [];
25
+ for (const artifact of config.artifacts ?? []) {
26
+ artifacts.push(output(artifact.id, render(artifact.path, config), artifact.format === "zip" || artifact.format === "tarball" ? "archive" : artifact.format));
27
+ }
28
+ if (config.npmPackage !== undefined) {
29
+ const declaration = output("npm-package", config.npmPackage.path ?? ".", "package");
30
+ artifacts.push(declaration);
31
+ if (config.npmPackage.build !== undefined) {
32
+ const packageRoot = config.npmPackage.path?.toString() ?? ".";
33
+ const rooted = (path) => SafeRelativePath.make(packageRoot === "." ? path.toString() : `${packageRoot}/${path}`);
34
+ preparations.push(GraphNpmPackageBuild.make({
35
+ id: OperationId.make("build:npm-package"),
36
+ argv: config.npmPackage.build.run,
37
+ cwd: SafeRelativePath.make(packageRoot),
38
+ inputs: [],
39
+ outputRoots: config.npmPackage.build.outputRoots.map(rooted)
40
+ }));
41
+ }
42
+ preparations.push(GraphCommandCheck.make({
43
+ id: OperationId.make("declare:npm-package"), argv: ["test", "-d", declaration.path], cwd: SafeRelativePath.make("."),
44
+ inputs: [declaration.id]
45
+ }));
46
+ }
47
+ for (const build of config.builds ?? []) {
48
+ for (const target of build.targets) {
49
+ const binary = build.binary ?? compact(config.project.name);
50
+ const id = `${build.id ?? build.builder}-${target}`;
51
+ const location = render(build.output ?? `.release/artifacts/${binary}-${config.project.version}-${target}${target.startsWith("windows-") ? ".exe" : ""}`, config, target, binary);
52
+ const declaration = output(id, location, "executable");
53
+ if (build.builder === "prebuilt") {
54
+ artifacts.push(declaration);
55
+ preparations.push(GraphCommandCheck.make({
56
+ id: OperationId.make(`build:prebuilt:${id}:exists`), argv: ["test", "-f", location], cwd: SafeRelativePath.make("."),
57
+ inputs: [declaration.id]
58
+ }));
59
+ }
60
+ else {
61
+ const argv = build.builder === "command" ? build.run.map((part) => render(part, config, target, binary)) : [
62
+ "bun", "build", render(build.entry, config, target, binary), "--compile", "--target", bunArtifactTarget(target).bunTarget,
63
+ "--outfile", location, ...(build.minify === true ? ["--minify"] : [])
64
+ ];
65
+ preparations.push(GraphCommandArtifact.make({
66
+ id: OperationId.make(`build:${build.builder}:${id}`), argv: [argv[0], ...argv.slice(1)], cwd: SafeRelativePath.make("."),
67
+ inputs: [], outputs: [declaration]
68
+ }));
69
+ }
70
+ }
71
+ }
72
+ for (const preparation of config.preparations ?? []) {
73
+ const inputs = preparation.inputs ?? [];
74
+ const cwd = preparation.cwd ?? SafeRelativePath.make(".");
75
+ if (preparation.kind === "check")
76
+ preparations.push(GraphCommandCheck.make({
77
+ id: OperationId.make(`preparation:${preparation.id}`), argv: preparation.run,
78
+ cwd, inputs
79
+ }));
80
+ else {
81
+ const id = OperationId.make(`preparation:${preparation.id}`);
82
+ if ("outputs" in preparation)
83
+ preparations.push(GraphCommandArtifact.make({
84
+ id, argv: preparation.run,
85
+ cwd, inputs,
86
+ outputs: [
87
+ output(preparation.outputs[0].id, preparation.outputs[0].path, preparation.outputs[0].kind ?? "file", preparation.outputs[0].mediaType),
88
+ ...preparation.outputs.slice(1).map((item) => output(item.id, item.path, item.kind ?? "file", item.mediaType))
89
+ ]
90
+ }));
91
+ else
92
+ preparations.push(GraphCommandCollection.make({
93
+ id, argv: preparation.run, cwd, inputs,
94
+ collection: ArtifactCollectionContract.make({
95
+ id: ArtifactCollectionId.make(preparation.id.toString()),
96
+ producer: id,
97
+ root: preparation.collection.root,
98
+ artifactKind: preparation.collection.artifactKind,
99
+ pathSuffix: preparation.collection.pathSuffix,
100
+ mediaType: preparation.collection.mediaType,
101
+ cardinality: decodeCardinality(preparation.collection.cardinality)
102
+ })
103
+ }));
104
+ }
105
+ }
106
+ return CapabilityContribution.make({ artifacts, preparations, publications: [] });
107
+ };
108
+ export const contributePackages = (config, artifacts, _context) => {
109
+ const preparations = [];
110
+ const packageOutputs = [];
111
+ for (const archive of config.archives ?? []) {
112
+ const inputs = archive.ids === undefined
113
+ ? artifacts.filter((item) => item.kind !== "package").map((item) => item.id)
114
+ : archive.ids;
115
+ for (const format of archive.formats ?? ["tar.gz"]) {
116
+ const base = render(archive.nameTemplate ?? `${compact(config.project.name)}_{version}`, config);
117
+ const id = `${archive.id ?? "archive"}${(archive.formats ?? ["tar.gz"]).length > 1 ? `-${format.replaceAll(".", "-")}` : ""}`;
118
+ const declaration = output(id, `.release/artifacts/${base}.${format}`, "archive");
119
+ packageOutputs.push(declaration);
120
+ preparations.push(GraphArchive.make({ id: OperationId.make(`archive:${id}`), inputs, output: declaration, format }));
121
+ }
122
+ }
123
+ const checksumInputs = [...artifacts, ...packageOutputs].filter((item) => item.kind !== "package" && item.kind !== "digest");
124
+ if (config.checksum !== undefined) {
125
+ const algorithm = config.checksum.algorithm;
126
+ if (checksumInputs.length === 0) {
127
+ throw new GraphLinkError({
128
+ kind: "reference",
129
+ value: "checksum",
130
+ reason: "Checksum configuration requires at least one capturable artifact."
131
+ });
132
+ }
133
+ preparations.push(GraphChecksum.make({ id: OperationId.make("checksum:digest"), inputs: [checksumInputs[0].id, ...checksumInputs.slice(1).map((item) => item.id)],
134
+ output: output("checksum-digests", `.release/facts/checksum-${algorithm}`, "digest"), algorithm }));
135
+ }
136
+ return CapabilityContribution.make({ artifacts: [], preparations, publications: [] });
137
+ };
138
+ const catalogRows = (config, artifacts, selected = "all") => {
139
+ const repository = config.publish?.github?.repository ?? config.project.repository;
140
+ const rows = [];
141
+ const build = (kind, catalog) => {
142
+ if (repository === undefined || !/^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/u.test(repository)) {
143
+ throw new GraphLinkError({
144
+ kind: "reference", value: `catalogs.${kind}`,
145
+ reason: "Catalog download URLs require one exact GitHub source repository."
146
+ });
147
+ }
148
+ const sources = catalog.sources.map((source) => {
149
+ const artifact = artifacts.find((candidate) => candidate.id.toString() === source.artifact.toString());
150
+ if (artifact === undefined || artifact.kind !== "archive")
151
+ throw new GraphLinkError({
152
+ kind: "reference", value: source.artifact.toString(),
153
+ reason: `${kind} catalogs require declared archive artifacts.`
154
+ });
155
+ const filename = NonEmptyName.make(basename(artifact.path.toString()));
156
+ return CatalogRenderSource.make({
157
+ artifactId: source.artifact,
158
+ architecture: source.architecture,
159
+ filename,
160
+ url: `https://github.com/${repository}/releases/download/${encodeURIComponent(config.project.tag)}/${encodeURIComponent(filename)}`
161
+ });
162
+ }).sort((left, right) => left.architecture < right.architecture ? -1 : left.architecture > right.architecture ? 1 : 0);
163
+ if (new Set(sources.map((source) => source.architecture)).size !== sources.length)
164
+ throw new GraphLinkError({
165
+ kind: "duplicate", value: catalog.id.toString(), reason: `${kind} catalog repeats one architecture.`
166
+ });
167
+ if (kind === "scoop" && sources.some((source) => !source.filename.toString().endsWith(".zip")))
168
+ throw new GraphLinkError({
169
+ kind: "reference", value: catalog.id.toString(), reason: "Scoop catalogs support ZIP archives only."
170
+ });
171
+ const renderer = kind === "homebrew"
172
+ ? HomebrewRenderer.make({
173
+ name: catalog.formulaName,
174
+ description: catalog.description,
175
+ homepage: catalog.homepage,
176
+ ...(catalog.license === undefined ? {} : { license: catalog.license }),
177
+ installPath: catalog.installPath
178
+ })
179
+ : ScoopRenderer.make({
180
+ name: catalog.manifestName,
181
+ description: catalog.description,
182
+ homepage: catalog.homepage,
183
+ ...(catalog.license === undefined ? {} : { license: catalog.license }),
184
+ bin: catalog.bin
185
+ });
186
+ return {
187
+ id: catalog.id.toString(),
188
+ renderer,
189
+ sources: sources,
190
+ output: output(`catalog-${catalog.id}`, `.release/catalogs/${catalog.id}.${kind === "homebrew" ? "rb" : "json"}`, "file", kind === "homebrew" ? "text/x-ruby" : "application/json")
191
+ };
192
+ };
193
+ if (selected !== "scoop")
194
+ for (const catalog of config.catalogs?.homebrew ?? [])
195
+ rows.push(build("homebrew", catalog));
196
+ if (selected !== "homebrew")
197
+ for (const catalog of config.catalogs?.scoop ?? [])
198
+ rows.push(build("scoop", catalog));
199
+ if (new Set(rows.map((row) => row.id)).size !== rows.length)
200
+ throw new GraphLinkError({
201
+ kind: "duplicate", value: "catalogs", reason: "Catalog renderer ids must be unique across Homebrew and Scoop."
202
+ });
203
+ if (rows.length > 0)
204
+ canonicalCatalogVersion(config.project.version.toString());
205
+ return rows;
206
+ };
207
+ export const contributeCatalogRendering = (config, artifacts, kind) => CapabilityContribution.make({
208
+ artifacts: [],
209
+ preparations: catalogRows(config, artifacts, kind).map((row) => GraphCatalogRender.make({
210
+ id: OperationId.make(`catalog:render:${row.id}`),
211
+ inputs: row.sources.map((source) => source.artifactId),
212
+ output: row.output,
213
+ version: config.project.version,
214
+ renderer: row.renderer,
215
+ sources: row.sources
216
+ })),
217
+ publications: []
218
+ });
219
+ export const contributeCatalogPublications = (config, artifacts) => {
220
+ const destinations = config.publish?.catalogGit;
221
+ if (destinations === undefined)
222
+ return CapabilityContribution.make({ artifacts: [], preparations: [], publications: [] });
223
+ const rows = catalogRows(config, artifacts);
224
+ const sourceRepository = config.publish?.github?.repository ?? config.project.repository;
225
+ if (config.publish?.github === undefined || sourceRepository === undefined)
226
+ throw new GraphLinkError({
227
+ kind: "reference", value: "publish.catalogGit",
228
+ reason: "Catalog delivery requires an installed GitHub release publication for every referenced download."
229
+ });
230
+ const selectedGithubIds = config.publish.github.ids ?? artifacts.filter((artifact) => ["archive", "executable", "file", "digest"].includes(artifact.kind)).map((artifact) => artifact.id);
231
+ const publications = destinations.map((destination) => {
232
+ const row = rows.find((candidate) => candidate.id === destination.catalog.toString());
233
+ if (row === undefined)
234
+ throw new GraphLinkError({
235
+ kind: "missing", value: destination.catalog.toString(), reason: "Catalog delivery references no typed renderer."
236
+ });
237
+ if (row.sources.some((source) => !selectedGithubIds.some((id) => id.toString() === source.artifactId.toString()))) {
238
+ throw new GraphLinkError({
239
+ kind: "reference", value: destination.catalog.toString(),
240
+ reason: "Catalog delivery is blocked unless every download artifact belongs to the exact GitHub release publication."
241
+ });
242
+ }
243
+ const targetPath = destination.targetPath.toString();
244
+ const statePath = destination.statePath.toString();
245
+ if (targetPath === statePath || targetPath.startsWith(`${statePath}/`) || statePath.startsWith(`${targetPath}/`)) {
246
+ throw new GraphLinkError({
247
+ kind: "path", value: targetPath, reason: "Catalog target and managed-state paths must be disjoint files."
248
+ });
249
+ }
250
+ return GraphCatalogPublication.make({
251
+ id: OperationId.make(`zz:catalog-git:${row.id}`),
252
+ catalogId: NonEmptyName.make(row.id),
253
+ targetArtifact: row.output.id,
254
+ repository: destination.repository,
255
+ branch: destination.branch,
256
+ targetPath: destination.targetPath,
257
+ statePath: destination.statePath,
258
+ version: config.project.version,
259
+ sourceRepository: GitHubRepositoryCoordinate.make(sourceRepository),
260
+ sourceTag: config.project.tag,
261
+ renderer: row.renderer,
262
+ sources: row.sources,
263
+ authority: makeCatalogPublicationAuthorityIntent({
264
+ repository: destination.repository,
265
+ branch: destination.branch,
266
+ targetPath: destination.targetPath,
267
+ statePath: destination.statePath,
268
+ tokenEnv: destination.tokenEnv
269
+ })
270
+ });
271
+ });
272
+ return CapabilityContribution.make({ artifacts: [], preparations: [], publications });
273
+ };
274
+ export const contributeNpmPublication = (config, context) => {
275
+ const intent = config.publish?.npm;
276
+ if (intent === undefined)
277
+ return CapabilityContribution.make({ artifacts: [], preparations: [], publications: [] });
278
+ // Resolution is intentionally plain durable data. Decode the nested variant
279
+ // exactly once as it enters the class-backed graph IR.
280
+ const authentication = Schema.decodeUnknownSync(NpmAuthentication, {
281
+ onExcessProperty: "error"
282
+ })(intent.authentication);
283
+ const publication = GraphNpmPublication.make({
284
+ id: OperationId.make("npm:npm-release"),
285
+ packageArtifact: intent.packageArtifact,
286
+ packageName: intent.packageName,
287
+ version: config.project.version,
288
+ registryUrl: intent.registry,
289
+ distTag: intent.distTag,
290
+ access: intent.access,
291
+ authentication,
292
+ provenance: intent.provenance,
293
+ authority: makeNpmPublicationAuthorityIntent({
294
+ packageName: intent.packageName.toString(),
295
+ version: config.project.version.toString(),
296
+ registryUrl: intent.registry,
297
+ distTag: intent.distTag,
298
+ authentication,
299
+ sourceCommit: context.source.commit.toString()
300
+ })
301
+ });
302
+ return CapabilityContribution.make({ artifacts: [], preparations: [], publications: [publication] });
303
+ };
304
+ export const contributeGitHubPublication = (config, artifacts) => {
305
+ const authored = config.publish?.github;
306
+ const repository = authored?.repository ?? config.project.repository;
307
+ if (authored === undefined || repository === undefined)
308
+ return CapabilityContribution.make({ artifacts: [], preparations: [], publications: [] });
309
+ const publication = GraphGitHubPublication.make({
310
+ id: OperationId.make("github:github-release"),
311
+ repository,
312
+ tag: config.project.tag,
313
+ draft: authored.draft ?? true,
314
+ prerelease: authored.prerelease === "auto"
315
+ ? config.project.version.includes("-")
316
+ : authored.prerelease ?? false,
317
+ title: NonEmptyName.make(`${config.project.name} ${config.project.version}`),
318
+ ...(authored.bodyArtifact === undefined
319
+ ? authored.body === undefined ? {} : { body: authored.body }
320
+ : { bodyArtifact: authored.bodyArtifact }),
321
+ assetIds: authored.ids ?? artifacts.filter((item) => ["archive", "executable", "file", "digest"].includes(item.kind)).map((item) => item.id),
322
+ assetCollections: (authored.collections ?? []).map(decodeCollectionSelector),
323
+ authority: makeGitHubPublicationAuthorityIntent({
324
+ repository,
325
+ tag: config.project.tag.toString(),
326
+ ...(authored.tokenEnv === undefined ? {} : { tokenEnv: authored.tokenEnv })
327
+ })
328
+ });
329
+ return CapabilityContribution.make({ artifacts: [], preparations: [], publications: [publication] });
330
+ };
331
+ export const contributePyPiPublication = (config, context, artifacts) => {
332
+ const intent = config.publish?.pypi;
333
+ if (intent === undefined)
334
+ return CapabilityContribution.make({ artifacts: [], preparations: [], publications: [] });
335
+ const authentication = Schema.decodeUnknownSync(PyPiAuthentication, {
336
+ onExcessProperty: "error"
337
+ })(intent.authentication);
338
+ const endpoints = pypiRepositoryEndpoints(intent.repository);
339
+ const files = intent.artifacts.map((id) => {
340
+ const declaration = artifacts.find((artifact) => artifact.id.toString() === id.toString());
341
+ if (declaration === undefined)
342
+ throw new GraphLinkError({
343
+ kind: "missing", value: id.toString(), reason: "PyPI publication references no declared artifact."
344
+ });
345
+ const filename = basename(declaration.path.toString());
346
+ return GraphPyPiDistribution.make({
347
+ artifactId: id,
348
+ filename: NonEmptyName.make(filename),
349
+ authority: makePyPiPublicationAuthorityIntent({
350
+ project: intent.project,
351
+ version: intent.version,
352
+ filename,
353
+ repository: intent.repository,
354
+ authentication,
355
+ sourceCommit: context.source.commit.toString()
356
+ })
357
+ });
358
+ });
359
+ return CapabilityContribution.make({
360
+ artifacts: [], preparations: [], publications: [GraphPyPiPublication.make({
361
+ id: OperationId.make("pypi:pypi-release"),
362
+ project: intent.project,
363
+ version: intent.version,
364
+ repository: intent.repository,
365
+ simpleBaseUrl: endpoints.simpleBaseUrl,
366
+ projectUrl: `${endpoints.simpleBaseUrl}${encodeURIComponent(intent.project)}/`,
367
+ uploadUrl: endpoints.uploadUrl,
368
+ authentication,
369
+ files
370
+ })]
371
+ });
372
+ };
373
+ export const contributeRelease = (config, context) => {
374
+ const build = contributeSourceArtifacts(config, context);
375
+ const buildOutputs = [...build.artifacts, ...build.preparations.flatMap(preparationOutputs)];
376
+ const packaged = contributePackages(config, buildOutputs, context);
377
+ const allArtifacts = [...buildOutputs, ...packaged.preparations.flatMap(preparationOutputs)];
378
+ const homebrew = contributeCatalogRendering(config, allArtifacts, "homebrew");
379
+ const scoop = contributeCatalogRendering(config, allArtifacts, "scoop");
380
+ const renderedArtifacts = [...allArtifacts, ...homebrew.preparations.flatMap(preparationOutputs), ...scoop.preparations.flatMap(preparationOutputs)];
381
+ return [
382
+ build,
383
+ packaged,
384
+ homebrew,
385
+ scoop,
386
+ contributeNpmPublication(config, context),
387
+ contributePyPiPublication(config, context, renderedArtifacts),
388
+ contributeGitHubPublication(config, renderedArtifacts),
389
+ contributeCatalogPublications(config, renderedArtifacts)
390
+ ];
391
+ };
392
+ const preparationOutputs = (preparation) => preparation._tag === "GraphCommandArtifact" ? preparation.outputs
393
+ : preparation._tag === "GraphArchive" || preparation._tag === "GraphChecksum" || preparation._tag === "GraphCatalogRender"
394
+ ? [preparation.output] : [];
395
+ //# sourceMappingURL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W,CAAC,IAAI,KAAK,cAAc,IAAI,WAAW,CAAC,IAAI,KAAK,eAAe,IAAI,WAAW,CAAC,IAAI,KAAK,oBAAoB;QAC1H,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { ReleaseIntent } from "./config.js";
2
+ import type { VerifiedReleaseContext } from "./context.js";
3
+ import { ReleaseGraph } from "./graph.js";
4
+ export declare const compileReleaseGraph: (intent: ReleaseIntent, context: VerifiedReleaseContext) => ReleaseGraph;
5
+ //# sourceMappingURL=compiler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../../src/release/compiler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAM1D,OAAO,EAAqB,YAAY,EAAE,MAAM,YAAY,CAAA;AAI5D,eAAO,MAAM,mBAAmB,GAC9B,QAAQ,aAAa,EACrB,SAAS,sBAAsB,KAC9B,YAaF,CAAA"}
@@ -0,0 +1,19 @@
1
+ import { preparationCapabilities, publicationCapabilities } from "../capabilities/registry.js";
2
+ import { linkContributions } from "./graph.js";
3
+ // Pure internal IR compiler. It reads only its arguments; the source observer
4
+ // and prepared store are deliberately outside this function.
5
+ export const compileReleaseGraph = (intent, context) => {
6
+ const contributions = [];
7
+ let artifacts = [];
8
+ for (const phase of ["source", "package", "render"]) {
9
+ for (const module of preparationCapabilities.filter((candidate) => candidate.phase === phase)) {
10
+ contributions.push(module.contribute({ config: intent, context, availableArtifacts: artifacts }));
11
+ }
12
+ artifacts = linkContributions(contributions).artifacts;
13
+ }
14
+ for (const module of publicationCapabilities) {
15
+ contributions.push(module.contribute({ config: intent, context, availableArtifacts: artifacts }));
16
+ }
17
+ return linkContributions(contributions);
18
+ };
19
+ //# sourceMappingURL=compiler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compiler.js","sourceRoot":"","sources":["../../src/release/compiler.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAAE,iBAAiB,EAAgB,MAAM,YAAY,CAAA;AAE5D,8EAA8E;AAC9E,6DAA6D;AAC7D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,MAAqB,EACrB,OAA+B,EACjB,EAAE;IAChB,MAAM,aAAa,GAAkC,EAAE,CAAA;IACvD,IAAI,SAAS,GAA8B,EAAE,CAAA;IAC7C,KAAK,MAAM,KAAK,IAAI,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAU,EAAE,CAAC;QAC7D,KAAK,MAAM,MAAM,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,KAAK,KAAK,CAAC,EAAE,CAAC;YAC9F,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;QACnG,CAAC;QACD,SAAS,GAAG,iBAAiB,CAAC,aAAa,CAAC,CAAC,SAAS,CAAA;IACxD,CAAC;IACD,KAAK,MAAM,MAAM,IAAI,uBAAuB,EAAE,CAAC;QAC7C,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;IACnG,CAAC;IACD,OAAO,iBAAiB,CAAC,aAAa,CAAC,CAAA;AACzC,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { CandidateConfig } from "../recipes/config.js";
2
+ export declare const ReleaseIntent: typeof CandidateConfig;
3
+ export type ReleaseIntent = typeof CandidateConfig.Type;
4
+ export declare const decodeReleaseIntent: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => CandidateConfig;
5
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/release/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAKtD,eAAO,MAAM,aAAa,wBAAkB,CAAA;AAC5C,MAAM,MAAM,aAAa,GAAG,OAAO,eAAe,CAAC,IAAI,CAAA;AAEvD,eAAO,MAAM,mBAAmB,wFAE9B,CAAA"}
@@ -0,0 +1,10 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { CandidateConfig } from "../recipes/config.js";
3
+ // The graph kernel consumes the already-decoded candidate value. Keeping this
4
+ // alias at the new owner makes the migration boundary explicit; public input
5
+ // decoding is cut over by plan 217, while no second semantic schema is added.
6
+ export const ReleaseIntent = CandidateConfig;
7
+ export const decodeReleaseIntent = Schema.decodeUnknownSync(ReleaseIntent, {
8
+ onExcessProperty: "error"
9
+ });
10
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/release/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAA;AAG5C,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,iBAAiB,CAAC,aAAa,EAAE;IACzE,gBAAgB,EAAE,OAAO;CAC1B,CAAC,CAAA"}
@@ -0,0 +1,96 @@
1
+ import * as Context from "effect/Context";
2
+ import * as Effect from "effect/Effect";
3
+ import * as Schema from "effect/Schema";
4
+ import { Sha256Digest } from "../model/digest.js";
5
+ import { NonEmptyName, SafeRelativePath, WorkspaceRoot } from "../model/primitives.js";
6
+ declare const VerifiedSource_base: Schema.Class<VerifiedSource, Schema.Struct<{
7
+ readonly commit: Schema.brand<Schema.NonEmptyString, "NonEmptyName">;
8
+ readonly tree: Schema.brand<Schema.NonEmptyString, "NonEmptyName">;
9
+ readonly clean: Schema.Literal<true>;
10
+ readonly packageManifestPath: Schema.brand<Schema.String, "SafeRelativePath">;
11
+ readonly packageManifestDigest: typeof Sha256Digest;
12
+ readonly repository: Schema.optionalKey<Schema.NonEmptyString>;
13
+ readonly headTags: Schema.$Array<Schema.brand<Schema.NonEmptyString, "NonEmptyName">>;
14
+ }>, {}>;
15
+ export declare class VerifiedSource extends VerifiedSource_base {
16
+ }
17
+ declare const VerifiedPackage_base: Schema.Class<VerifiedPackage, Schema.Struct<{
18
+ readonly name: Schema.brand<Schema.NonEmptyString, "NonEmptyName">;
19
+ readonly version: Schema.brand<Schema.NonEmptyString, "Version">;
20
+ readonly path: Schema.brand<Schema.String, "SafeRelativePath">;
21
+ readonly digest: typeof Sha256Digest;
22
+ readonly repository: Schema.optionalKey<Schema.NonEmptyString>;
23
+ }>, {}>;
24
+ export declare class VerifiedPackage extends VerifiedPackage_base {
25
+ }
26
+ declare const VerifiedReleaseContext_base: Schema.Class<VerifiedReleaseContext, Schema.Struct<{
27
+ readonly workspace: Schema.brand<Schema.String, "WorkspaceRoot">;
28
+ readonly source: typeof VerifiedSource;
29
+ readonly package: typeof VerifiedPackage;
30
+ }>, {}>;
31
+ export declare class VerifiedReleaseContext extends VerifiedReleaseContext_base {
32
+ }
33
+ declare const StagingEntry_base: Schema.Class<StagingEntry, Schema.Struct<{
34
+ readonly path: Schema.brand<Schema.String, "SafeRelativePath">;
35
+ readonly kind: Schema.Literals<readonly ["file", "executable", "directory", "symlink"]>;
36
+ readonly mode: Schema.Number;
37
+ readonly size: Schema.Number;
38
+ readonly digest: typeof Sha256Digest;
39
+ }>, {}>;
40
+ export declare class StagingEntry extends StagingEntry_base {
41
+ }
42
+ declare const StagingSnapshot_base: Schema.Class<StagingSnapshot, Schema.Struct<{
43
+ readonly entries: Schema.$Array<typeof StagingEntry>;
44
+ readonly digest: typeof Sha256Digest;
45
+ }>, {}>;
46
+ /** Canonical path/type/digest manifest of materialized private bytes. */
47
+ export declare class StagingSnapshot extends StagingSnapshot_base {
48
+ }
49
+ declare const ExplicitInputSnapshot_base: Schema.Class<ExplicitInputSnapshot, Schema.Struct<{
50
+ readonly id: Schema.NonEmptyString;
51
+ readonly path: Schema.brand<Schema.String, "SafeRelativePath">;
52
+ readonly kind: Schema.Literals<readonly ["file", "directory"]>;
53
+ readonly size: Schema.Number;
54
+ readonly digest: typeof Sha256Digest;
55
+ /** The closed operation that copied or derived these bytes. */
56
+ readonly materializer: Schema.NonEmptyString;
57
+ /** Exact source/tool digests that governed materialization. */
58
+ readonly materializationBasis: Schema.$Array<typeof Sha256Digest>;
59
+ }>, {}>;
60
+ /** A non-Git input admitted explicitly and copied into private staging. */
61
+ export declare class ExplicitInputSnapshot extends ExplicitInputSnapshot_base {
62
+ }
63
+ declare const SourceMaterializationError_base: Schema.Class<SourceMaterializationError, Schema.TaggedStruct<"SourceMaterializationError", {
64
+ readonly field: Schema.String;
65
+ readonly reason: Schema.String;
66
+ }>, import("effect/Cause").YieldableError>;
67
+ export declare class SourceMaterializationError extends SourceMaterializationError_base {
68
+ }
69
+ declare const ReleaseContextError_base: Schema.Class<ReleaseContextError, Schema.TaggedStruct<"ReleaseContextError", {
70
+ readonly field: Schema.String;
71
+ readonly reason: Schema.String;
72
+ }>, import("effect/Cause").YieldableError>;
73
+ export declare class ReleaseContextError extends ReleaseContextError_base {
74
+ }
75
+ export interface SourceObserverShape {
76
+ readonly observe: (workspace: WorkspaceRoot, packageManifestPath: SafeRelativePath, expectedCommit?: NonEmptyName) => Effect.Effect<VerifiedReleaseContext, ReleaseContextError>;
77
+ /** Writes only blobs/modes/symlinks from the exact verified Git commit. */
78
+ readonly materialize: (workspace: WorkspaceRoot, source: VerifiedSource, destination: WorkspaceRoot) => Effect.Effect<StagingSnapshot, SourceMaterializationError>;
79
+ }
80
+ /** Runtime operations are the only imperative seam. The compiler and linker
81
+ * never receive this service; they consume the verified value it returns. */
82
+ export interface SourceObserverRuntime {
83
+ readonly canonicalRoot: (workspace: WorkspaceRoot) => Effect.Effect<string, unknown>;
84
+ readonly read: (workspace: WorkspaceRoot, path: SafeRelativePath) => Effect.Effect<Uint8Array, unknown>;
85
+ readonly command: (workspace: WorkspaceRoot, argv: ReadonlyArray<string>) => Effect.Effect<string, unknown>;
86
+ readonly digest: (bytes: Uint8Array) => Effect.Effect<Sha256Digest, unknown>;
87
+ readonly materialize: (workspace: WorkspaceRoot, source: VerifiedSource, destination: WorkspaceRoot) => Effect.Effect<StagingSnapshot, unknown>;
88
+ }
89
+ declare const SourceObserver_base: Context.ServiceClass<SourceObserver, "SourceObserver", SourceObserverShape>;
90
+ export declare class SourceObserver extends SourceObserver_base {
91
+ }
92
+ /** Shared Git/package observation used by both host entrypoints. */
93
+ export declare const makeSourceObserver: (runtime: SourceObserverRuntime) => SourceObserverShape;
94
+ export declare const verifySource: (context: VerifiedReleaseContext, expectedCommit?: (string & import("effect/Brand").Brand<"NonEmptyName">) | undefined) => Effect.Effect<VerifiedReleaseContext, ReleaseContextError, never>;
95
+ export {};
96
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/release/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAW,aAAa,EAAE,MAAM,wBAAwB,CAAA;;;;;;;;;;AAI/F,qBAAa,cAAe,SAAQ,mBA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