@astrale-os/sdk 0.6.0-beta.2 → 0.6.0-beta.21

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 (403) hide show
  1. package/README.md +74 -14
  2. package/dist/application/action/action.d.ts +6 -0
  3. package/dist/application/action/authoring.d.ts +1 -1
  4. package/dist/application/action/context.d.ts +17 -8
  5. package/dist/application/action/define.d.ts +3 -3
  6. package/dist/application/action/index.d.ts +1 -1
  7. package/dist/application/define.d.ts +5 -5
  8. package/dist/application/define.js +13 -13
  9. package/dist/application/dependency/index.d.ts +1 -1
  10. package/dist/application/dependency/invoker.d.ts +11 -6
  11. package/dist/application/domain.d.ts +28 -0
  12. package/dist/application/index.d.ts +3 -3
  13. package/dist/application/index.js +1 -1
  14. package/dist/application/mutation/authoring/properties.d.ts +5 -3
  15. package/dist/application/mutation/authoring/properties.js +35 -2
  16. package/dist/application/mutation/authoring/transition.js +4 -1
  17. package/dist/application/routes/admission.d.ts +2 -2
  18. package/dist/application/routes/admission.js +1 -1
  19. package/dist/application/routes/route.d.ts +2 -2
  20. package/dist/application/runtime/actions.js +3 -0
  21. package/dist/application/runtime/workflows.d.ts +2 -0
  22. package/dist/application/runtime/workflows.js +5 -0
  23. package/dist/application/workflow/authoring.d.ts +3 -2
  24. package/dist/application/workflow/context.d.ts +8 -2
  25. package/dist/application/workflow/define.d.ts +3 -3
  26. package/dist/application/workflow/define.js +19 -3
  27. package/dist/application/workflow/durable.d.ts +83 -0
  28. package/dist/application/workflow/index.d.ts +3 -2
  29. package/dist/application/workflow/runner/inline.js +3 -4
  30. package/dist/application/workflow/runner/runner.d.ts +2 -2
  31. package/dist/application/workflow/step/output.d.ts +2 -0
  32. package/dist/application/workflow/step/output.js +73 -0
  33. package/dist/application/workflow/workflow.d.ts +12 -0
  34. package/dist/deployment/adapter/adapter.d.ts +59 -11
  35. package/dist/deployment/adapter/bundle/bundle.d.ts +36 -0
  36. package/dist/deployment/adapter/bundle/file.d.ts +10 -0
  37. package/dist/deployment/adapter/bundle/index.d.ts +2 -0
  38. package/dist/deployment/adapter/define.d.ts +25 -3
  39. package/dist/deployment/adapter/define.js +101 -24
  40. package/dist/deployment/adapter/index.d.ts +6 -3
  41. package/dist/deployment/adapter/index.js +1 -0
  42. package/dist/deployment/adapter/legacy/adapter.d.ts +40 -0
  43. package/dist/deployment/adapter/{deploy → legacy/deploy}/context.d.ts +6 -2
  44. package/dist/deployment/adapter/legacy/deploy/index.d.ts +2 -0
  45. package/dist/deployment/adapter/legacy/deploy/index.js +1 -0
  46. package/dist/deployment/adapter/legacy/deploy/result.d.ts +89 -0
  47. package/dist/deployment/adapter/legacy/deploy/result.js +1 -0
  48. package/dist/deployment/adapter/legacy/index.d.ts +24 -0
  49. package/dist/deployment/adapter/legacy/index.js +1 -0
  50. package/dist/deployment/adapter/legacy/prepare/artifact.d.ts +43 -0
  51. package/dist/deployment/adapter/legacy/prepare/artifact.js +1 -0
  52. package/dist/deployment/adapter/legacy/prepare/context.d.ts +33 -0
  53. package/dist/deployment/adapter/legacy/prepare/context.js +1 -0
  54. package/dist/deployment/adapter/legacy/prepare/index.d.ts +2 -0
  55. package/dist/deployment/adapter/legacy/prepare/index.js +1 -0
  56. package/dist/deployment/adapter/release/context.d.ts +95 -0
  57. package/dist/deployment/adapter/release/context.js +1 -0
  58. package/dist/deployment/adapter/release/index.d.ts +3 -0
  59. package/dist/deployment/adapter/release/index.js +1 -0
  60. package/dist/deployment/adapter/release/list.d.ts +53 -0
  61. package/dist/deployment/adapter/release/list.js +1 -0
  62. package/dist/deployment/adapter/release/refusal.d.ts +10 -0
  63. package/dist/deployment/adapter/release/refusal.js +14 -0
  64. package/dist/deployment/adapter/release/result.d.ts +56 -0
  65. package/dist/deployment/adapter/release/result.js +1 -0
  66. package/dist/deployment/address/configuration.d.ts +83 -0
  67. package/dist/deployment/address/configuration.js +262 -0
  68. package/dist/deployment/address/fingerprint.d.ts +5 -0
  69. package/dist/deployment/address/fingerprint.js +27 -0
  70. package/dist/deployment/address/index.d.ts +5 -0
  71. package/dist/deployment/address/index.js +5 -0
  72. package/dist/deployment/address/label.d.ts +42 -0
  73. package/dist/deployment/address/label.js +80 -0
  74. package/dist/deployment/address/line.d.ts +29 -0
  75. package/dist/deployment/address/line.js +53 -0
  76. package/dist/deployment/address/record.d.ts +52 -0
  77. package/dist/deployment/address/record.js +104 -0
  78. package/dist/deployment/address/summary.d.ts +57 -0
  79. package/dist/deployment/address/summary.js +117 -0
  80. package/dist/deployment/address/vectors.d.ts +60 -0
  81. package/dist/deployment/address/vectors.js +517 -0
  82. package/dist/deployment/build/build.d.ts +2 -2
  83. package/dist/deployment/build/compile.d.ts +4 -4
  84. package/dist/deployment/build/compile.js +17 -17
  85. package/dist/deployment/build/index.d.ts +1 -0
  86. package/dist/deployment/build/index.js +1 -0
  87. package/dist/deployment/build/manifest.d.ts +59 -0
  88. package/dist/deployment/build/manifest.js +118 -0
  89. package/dist/deployment/build/material.js +2 -2
  90. package/dist/deployment/build/schema.d.ts +2 -2
  91. package/dist/deployment/deploy.d.ts +10 -10
  92. package/dist/deployment/deploy.js +3 -3
  93. package/dist/deployment/deployment.d.ts +9 -4
  94. package/dist/deployment/environment.d.ts +6 -0
  95. package/dist/deployment/environment.js +6 -0
  96. package/dist/deployment/index.d.ts +4 -4
  97. package/dist/deployment/index.js +1 -1
  98. package/dist/deployment/release/addressing.d.ts +9 -1
  99. package/dist/deployment/release/assemble.d.ts +6 -3
  100. package/dist/deployment/release/assemble.js +12 -10
  101. package/dist/deployment/release/index.d.ts +2 -0
  102. package/dist/deployment/release/index.js +2 -0
  103. package/dist/deployment/release/legacy/admission.d.ts +3 -0
  104. package/dist/deployment/release/legacy/admission.js +8 -0
  105. package/dist/deployment/release/legacy/assemble.d.ts +5 -0
  106. package/dist/deployment/release/legacy/assemble.js +20 -0
  107. package/dist/deployment/release/legacy/index.d.ts +35 -0
  108. package/dist/deployment/release/legacy/index.js +34 -0
  109. package/dist/deployment/release/legacy/release.d.ts +12 -0
  110. package/dist/deployment/release/legacy/release.js +1 -0
  111. package/dist/deployment/release/{publication → legacy}/seal.d.ts +3 -3
  112. package/dist/deployment/release/legacy/seal.js +17 -0
  113. package/dist/deployment/release/release.d.ts +16 -5
  114. package/dist/deployment/release/runtime.d.ts +2 -0
  115. package/dist/deployment/release/runtime.js +2 -0
  116. package/dist/deployment/release/seal.d.ts +14 -0
  117. package/dist/deployment/release/seal.js +22 -0
  118. package/dist/deployment/release/{publication → served}/callables.d.ts +2 -2
  119. package/dist/deployment/release/{publication → served}/callables.js +2 -2
  120. package/dist/deployment/release/served/index.d.ts +12 -0
  121. package/dist/deployment/release/served/index.js +22 -0
  122. package/dist/deployment/release/{publication → served}/views.d.ts +2 -2
  123. package/dist/deployment/runtime/admission.d.ts +2 -2
  124. package/dist/deployment/runtime/admission.js +5 -5
  125. package/dist/deployment/verify/index.d.ts +2 -1
  126. package/dist/deployment/verify/index.js +1 -0
  127. package/dist/deployment/verify/preflight/artifact.d.ts +1 -1
  128. package/dist/deployment/verify/preflight/bundle.d.ts +18 -0
  129. package/dist/deployment/verify/preflight/bundle.js +71 -0
  130. package/dist/deployment/verify/preflight/index.d.ts +2 -1
  131. package/dist/deployment/verify/preflight/index.js +1 -0
  132. package/dist/deployment/verify/preflight/publication.d.ts +2 -2
  133. package/dist/deployment/verify/preflight/publication.js +4 -3
  134. package/dist/deployment/verify/readiness/deployment.js +7 -15
  135. package/dist/deployment/verify/readiness/fetch.d.ts +13 -0
  136. package/dist/deployment/verify/readiness/fetch.js +26 -0
  137. package/dist/deployment/verify/readiness/identity.d.ts +3 -6
  138. package/dist/deployment/verify/readiness/identity.js +3 -3
  139. package/dist/deployment/verify/readiness/index.d.ts +11 -7
  140. package/dist/deployment/verify/readiness/index.js +15 -4
  141. package/dist/deployment/verify/readiness/legacy/index.d.ts +2 -0
  142. package/dist/deployment/verify/readiness/legacy/index.js +2 -0
  143. package/dist/deployment/verify/readiness/legacy/publication.d.ts +12 -0
  144. package/dist/deployment/verify/readiness/legacy/publication.js +23 -0
  145. package/dist/deployment/verify/readiness/release.d.ts +8 -0
  146. package/dist/deployment/verify/readiness/release.js +22 -0
  147. package/dist/execution/identity/authentication.d.ts +23 -2
  148. package/dist/execution/identity/authentication.js +64 -40
  149. package/dist/execution/identity/callback.d.ts +16 -15
  150. package/dist/execution/identity/callback.js +21 -16
  151. package/dist/execution/identity/delivery.d.ts +11 -4
  152. package/dist/execution/identity/delivery.js +47 -20
  153. package/dist/execution/identity/identity.d.ts +18 -3
  154. package/dist/execution/identity/identity.js +8 -4
  155. package/dist/execution/identity/jwks.js +57 -12
  156. package/dist/execution/index.d.ts +4 -2
  157. package/dist/execution/index.js +2 -1
  158. package/dist/execution/invocation/admission/authentication.d.ts +3 -8
  159. package/dist/execution/invocation/admission/authentication.js +10 -24
  160. package/dist/execution/invocation/admission/authority.d.ts +15 -8
  161. package/dist/execution/invocation/admission/authority.js +5 -0
  162. package/dist/execution/invocation/admission/input.d.ts +2 -2
  163. package/dist/execution/invocation/admission/input.js +16 -2
  164. package/dist/execution/invocation/dependency/bind.d.ts +1 -1
  165. package/dist/execution/invocation/dependency/bind.js +35 -14
  166. package/dist/execution/invocation/dispatch/context.d.ts +2 -1
  167. package/dist/execution/invocation/dispatch/context.js +1 -1
  168. package/dist/execution/invocation/invocation.js +58 -16
  169. package/dist/execution/invocation/result/project.js +41 -1
  170. package/dist/execution/node/serve.d.ts +2 -2
  171. package/dist/execution/node/serve.js +1 -1
  172. package/dist/execution/runtime/index.d.ts +1 -0
  173. package/dist/execution/runtime/index.js +1 -0
  174. package/dist/execution/runtime/load.d.ts +3 -3
  175. package/dist/execution/runtime/load.js +3 -2
  176. package/dist/execution/runtime/release.d.ts +22 -0
  177. package/dist/execution/runtime/release.js +14 -0
  178. package/dist/execution/serve.d.ts +10 -4
  179. package/dist/execution/serve.js +3 -0
  180. package/dist/execution/service/create.js +39 -7
  181. package/dist/execution/service/initialization.d.ts +4 -4
  182. package/dist/execution/service/initialization.js +23 -14
  183. package/dist/execution/service/release.d.ts +2 -2
  184. package/dist/execution/service/release.js +3 -2
  185. package/dist/execution/service/service.d.ts +15 -5
  186. package/dist/execution/service/serving/delivery.d.ts +6 -0
  187. package/dist/execution/service/{publication → serving}/delivery.js +5 -1
  188. package/dist/execution/service/{publication → serving}/index.d.ts +1 -1
  189. package/dist/execution/service/serving/installation.d.ts +4 -0
  190. package/dist/execution/service/serving/installation.js +9 -0
  191. package/dist/execution/service/serving/legacy/index.d.ts +15 -0
  192. package/dist/execution/service/serving/legacy/index.js +19 -0
  193. package/dist/execution/service/serving/source.d.ts +18 -0
  194. package/dist/execution/service/serving/source.js +19 -0
  195. package/dist/execution/workflows/discovery.d.ts +14 -0
  196. package/dist/execution/workflows/discovery.js +151 -0
  197. package/dist/execution/workflows/engine.d.ts +52 -0
  198. package/dist/execution/workflows/engine.js +1 -0
  199. package/dist/execution/workflows/envelope.d.ts +12 -0
  200. package/dist/execution/workflows/envelope.js +46 -0
  201. package/dist/execution/workflows/failure.d.ts +11 -0
  202. package/dist/execution/workflows/failure.js +43 -0
  203. package/dist/execution/workflows/index.d.ts +4 -0
  204. package/dist/execution/workflows/index.js +3 -0
  205. package/dist/execution/workflows/options.d.ts +40 -0
  206. package/dist/execution/workflows/options.js +83 -0
  207. package/dist/execution/workflows/receiver.d.ts +22 -0
  208. package/dist/execution/workflows/receiver.js +99 -0
  209. package/dist/execution/workflows/route.d.ts +14 -0
  210. package/dist/execution/workflows/route.js +40 -0
  211. package/dist/execution/workflows/run.d.ts +22 -0
  212. package/dist/execution/workflows/run.js +211 -0
  213. package/dist/index.d.ts +3 -3
  214. package/dist/index.js +1 -1
  215. package/dist/platform/release/index.d.ts +27 -0
  216. package/dist/platform/release/index.js +27 -0
  217. package/dist/platform/schema/index.d.ts +2 -1
  218. package/dist/platform/schema/property-input.d.ts +15 -0
  219. package/dist/platform/schema/property-input.js +1 -0
  220. package/dist/platform/schema/property.d.ts +5 -0
  221. package/dist/platform/versioning/dependents.d.ts +18 -0
  222. package/dist/platform/versioning/dependents.js +15 -0
  223. package/dist/platform/versioning/index.d.ts +5 -0
  224. package/dist/platform/versioning/index.js +5 -0
  225. package/dist/platform/versioning/name.d.ts +38 -0
  226. package/dist/platform/versioning/name.js +58 -0
  227. package/dist/platform/versioning/reference.d.ts +48 -0
  228. package/dist/platform/versioning/reference.js +95 -0
  229. package/dist/platform/versioning/version.d.ts +72 -0
  230. package/dist/platform/versioning/version.js +98 -0
  231. package/dist/project/admit.js +2 -2
  232. package/dist/project/define.d.ts +4 -4
  233. package/dist/project/define.js +55 -35
  234. package/dist/project/index.d.ts +1 -1
  235. package/dist/project/install-command.d.ts +10 -0
  236. package/dist/project/install-command.js +13 -0
  237. package/dist/project/project.d.ts +10 -8
  238. package/dist/testing/dataset/builder.d.ts +3 -3
  239. package/dist/testing/dataset/define.d.ts +1 -1
  240. package/dist/testing/load.js +1 -1
  241. package/dist/tooling/cli/arguments.d.ts +10 -5
  242. package/dist/tooling/cli/arguments.js +123 -52
  243. package/dist/tooling/cli/build.d.ts +55 -0
  244. package/dist/tooling/cli/build.js +77 -0
  245. package/dist/tooling/cli/bun.d.ts +0 -1
  246. package/dist/tooling/cli/bun.js +0 -7
  247. package/dist/tooling/cli/commit.d.ts +35 -0
  248. package/dist/tooling/cli/commit.js +235 -0
  249. package/dist/tooling/cli/deploy-mode.d.ts +82 -0
  250. package/dist/tooling/cli/deploy-mode.js +135 -0
  251. package/dist/tooling/cli/deploy-result.d.ts +85 -0
  252. package/dist/tooling/cli/deploy-result.js +64 -0
  253. package/dist/tooling/cli/diff/declared.d.ts +7 -0
  254. package/dist/tooling/cli/diff/declared.js +27 -0
  255. package/dist/tooling/cli/diff/index.d.ts +30 -0
  256. package/dist/tooling/cli/diff/index.js +58 -0
  257. package/dist/tooling/cli/diff/render.d.ts +15 -0
  258. package/dist/tooling/cli/diff/render.js +131 -0
  259. package/dist/tooling/cli/diff/report.d.ts +88 -0
  260. package/dist/tooling/cli/diff/report.js +154 -0
  261. package/dist/tooling/cli/dotenv.d.ts +2 -2
  262. package/dist/tooling/cli/dotenv.js +3 -33
  263. package/dist/tooling/cli/help.js +176 -59
  264. package/dist/tooling/cli/immutable-deployment.d.ts +83 -0
  265. package/dist/tooling/cli/immutable-deployment.js +135 -0
  266. package/dist/tooling/cli/index.d.ts +10 -4
  267. package/dist/tooling/cli/index.js +5 -3
  268. package/dist/tooling/cli/installed-on.d.ts +83 -0
  269. package/dist/tooling/cli/installed-on.js +156 -0
  270. package/dist/tooling/cli/legacy/deploy-result.d.ts +28 -0
  271. package/dist/tooling/cli/legacy/deploy-result.js +37 -0
  272. package/dist/tooling/cli/legacy/stable-target-adapter.d.ts +21 -0
  273. package/dist/tooling/cli/legacy/stable-target-adapter.js +14 -0
  274. package/dist/tooling/cli/legacy/stable-target-deploy.d.ts +40 -0
  275. package/dist/tooling/cli/legacy/stable-target-deploy.js +102 -0
  276. package/dist/tooling/cli/legacy/uploaded-build.d.ts +11 -0
  277. package/dist/tooling/cli/legacy/uploaded-build.js +22 -0
  278. package/dist/tooling/cli/list.d.ts +154 -0
  279. package/dist/tooling/cli/list.js +381 -0
  280. package/dist/tooling/cli/log.d.ts +5 -0
  281. package/dist/tooling/cli/log.js +9 -0
  282. package/dist/tooling/cli/orchestrate.d.ts +0 -6
  283. package/dist/tooling/cli/orchestrate.js +236 -88
  284. package/dist/tooling/cli/project.d.ts +3 -3
  285. package/dist/tooling/cli/publish/index.d.ts +73 -0
  286. package/dist/tooling/cli/publish/index.js +346 -0
  287. package/dist/tooling/cli/publish/report.d.ts +49 -0
  288. package/dist/tooling/cli/publish/report.js +15 -0
  289. package/dist/tooling/cli/registry/client.d.ts +114 -0
  290. package/dist/tooling/cli/registry/client.js +346 -0
  291. package/dist/tooling/cli/registry/error.d.ts +11 -0
  292. package/dist/tooling/cli/registry/error.js +17 -0
  293. package/dist/tooling/cli/registry/executable.d.ts +29 -0
  294. package/dist/tooling/cli/registry/executable.js +90 -0
  295. package/dist/tooling/cli/registry/index.d.ts +9 -0
  296. package/dist/tooling/cli/registry/index.js +8 -0
  297. package/dist/tooling/cli/registry/installations.d.ts +67 -0
  298. package/dist/tooling/cli/registry/installations.js +108 -0
  299. package/dist/tooling/cli/registry/process.d.ts +36 -0
  300. package/dist/tooling/cli/registry/process.js +119 -0
  301. package/dist/tooling/cli/secrets.d.ts +9 -0
  302. package/dist/tooling/cli/secrets.js +19 -0
  303. package/dist/tooling/cli/yank.d.ts +34 -0
  304. package/dist/tooling/cli/yank.js +32 -0
  305. package/dist/tooling/linter/implementations/source/callable-requirements.d.ts +1 -1
  306. package/dist/tooling/linter/implementations/source/callable-requirements.js +10 -10
  307. package/dist/tooling/linter/implementations/source/dependencies.js +12 -10
  308. package/dist/tooling/linter/implementations/source/global.js +1 -1
  309. package/dist/tooling/linter/implementations/source/mutations.js +17 -17
  310. package/dist/tooling/linter/implementations/source/providers.js +5 -5
  311. package/dist/tooling/linter/implementations/source/views.js +2 -2
  312. package/dist/tooling/linter/policy/generated.js +16 -16
  313. package/dist/tooling/packaging/declarations/ownership.js +1 -1
  314. package/dist/tooling/packaging/finalize.d.ts +1 -1
  315. package/dist/tooling/packaging/finalize.js +1 -1
  316. package/package.json +32 -11
  317. package/dist/application/application.d.ts +0 -28
  318. package/dist/deployment/adapter/deploy/index.d.ts +0 -2
  319. package/dist/deployment/adapter/deploy/result.d.ts +0 -50
  320. package/dist/deployment/adapter/prepare/artifact.d.ts +0 -33
  321. package/dist/deployment/adapter/prepare/context.d.ts +0 -23
  322. package/dist/deployment/adapter/prepare/index.d.ts +0 -2
  323. package/dist/deployment/release/publication/index.d.ts +0 -6
  324. package/dist/deployment/release/publication/index.js +0 -6
  325. package/dist/deployment/release/publication/manifest.d.ts +0 -3
  326. package/dist/deployment/release/publication/manifest.js +0 -5
  327. package/dist/deployment/release/publication/requirements.d.ts +0 -3
  328. package/dist/deployment/release/publication/requirements.js +0 -3
  329. package/dist/deployment/release/publication/seal.js +0 -39
  330. package/dist/deployment/verify/readiness/publication.d.ts +0 -11
  331. package/dist/deployment/verify/readiness/publication.js +0 -41
  332. package/dist/execution/service/publication/delivery.d.ts +0 -2
  333. package/dist/execution/service/publication/installation.d.ts +0 -3
  334. package/dist/execution/service/publication/installation.js +0 -8
  335. package/dist/execution/service/publication/source.d.ts +0 -3
  336. package/dist/execution/service/publication/source.js +0 -11
  337. package/dist/platform/publication/index.d.ts +0 -2
  338. package/dist/platform/publication/index.js +0 -2
  339. package/dist/tooling/cli/astrale/authority.d.ts +0 -5
  340. package/dist/tooling/cli/astrale/authority.js +0 -11
  341. package/dist/tooling/cli/astrale/executable.d.ts +0 -2
  342. package/dist/tooling/cli/astrale/executable.js +0 -47
  343. package/dist/tooling/cli/astrale/failure.d.ts +0 -6
  344. package/dist/tooling/cli/astrale/failure.js +0 -48
  345. package/dist/tooling/cli/astrale/instance.d.ts +0 -11
  346. package/dist/tooling/cli/astrale/instance.js +0 -52
  347. package/dist/tooling/cli/astrale/process.d.ts +0 -13
  348. package/dist/tooling/cli/astrale/process.js +0 -94
  349. package/dist/tooling/cli/astrale/version.d.ts +0 -18
  350. package/dist/tooling/cli/astrale/version.js +0 -55
  351. package/dist/tooling/cli/credential.d.ts +0 -2
  352. package/dist/tooling/cli/credential.js +0 -57
  353. package/dist/tooling/cli/development/candidate.d.ts +0 -25
  354. package/dist/tooling/cli/development/candidate.js +0 -176
  355. package/dist/tooling/cli/development/deployment.d.ts +0 -16
  356. package/dist/tooling/cli/development/deployment.js +0 -39
  357. package/dist/tooling/cli/development/develop.d.ts +0 -11
  358. package/dist/tooling/cli/development/develop.js +0 -243
  359. package/dist/tooling/cli/development/lease.d.ts +0 -18
  360. package/dist/tooling/cli/development/lease.js +0 -163
  361. package/dist/tooling/cli/development/lifecycle.d.ts +0 -9
  362. package/dist/tooling/cli/development/lifecycle.js +0 -43
  363. package/dist/tooling/cli/development/project-imports.d.ts +0 -22
  364. package/dist/tooling/cli/development/project-imports.js +0 -39
  365. package/dist/tooling/cli/development/project-lock.d.ts +0 -16
  366. package/dist/tooling/cli/development/project-lock.js +0 -41
  367. package/dist/tooling/cli/development/rebuild.d.ts +0 -13
  368. package/dist/tooling/cli/development/rebuild.js +0 -58
  369. package/dist/tooling/cli/development/release-evidence.d.ts +0 -4
  370. package/dist/tooling/cli/development/release-evidence.js +0 -10
  371. package/dist/tooling/cli/development/report.d.ts +0 -6
  372. package/dist/tooling/cli/development/report.js +0 -14
  373. package/dist/tooling/cli/development/session-file.d.ts +0 -53
  374. package/dist/tooling/cli/development/session-file.js +0 -337
  375. package/dist/tooling/cli/development/source-watch.d.ts +0 -14
  376. package/dist/tooling/cli/development/source-watch.js +0 -140
  377. package/dist/tooling/cli/development/sources.d.ts +0 -7
  378. package/dist/tooling/cli/development/sources.js +0 -48
  379. package/dist/tooling/cli/development/target-lock.d.ts +0 -16
  380. package/dist/tooling/cli/development/target-lock.js +0 -68
  381. package/dist/tooling/cli/development/view.d.ts +0 -28
  382. package/dist/tooling/cli/development/view.js +0 -151
  383. package/dist/tooling/cli/environment-release.d.ts +0 -21
  384. package/dist/tooling/cli/environment-release.js +0 -46
  385. package/dist/tooling/cli/evidence.d.ts +0 -11
  386. package/dist/tooling/cli/evidence.js +0 -53
  387. package/dist/tooling/cli/installation/index.d.ts +0 -2
  388. package/dist/tooling/cli/installation/index.js +0 -1
  389. package/dist/tooling/cli/installation/observation.d.ts +0 -10
  390. package/dist/tooling/cli/installation/observation.js +0 -44
  391. package/dist/tooling/cli/installation/reconcile.d.ts +0 -32
  392. package/dist/tooling/cli/installation/reconcile.js +0 -122
  393. /package/dist/application/{application.js → domain.js} +0 -0
  394. /package/dist/{deployment/adapter/deploy/context.js → application/workflow/durable.js} +0 -0
  395. /package/dist/deployment/adapter/{deploy/index.js → bundle/bundle.js} +0 -0
  396. /package/dist/deployment/adapter/{deploy/result.js → bundle/file.js} +0 -0
  397. /package/dist/deployment/adapter/{prepare → bundle}/index.js +0 -0
  398. /package/dist/deployment/adapter/{prepare/artifact.js → legacy/adapter.js} +0 -0
  399. /package/dist/deployment/adapter/{prepare → legacy/deploy}/context.js +0 -0
  400. /package/dist/deployment/release/{publication → served}/routes.d.ts +0 -0
  401. /package/dist/deployment/release/{publication → served}/routes.js +0 -0
  402. /package/dist/deployment/release/{publication → served}/views.js +0 -0
  403. /package/dist/execution/service/{publication → serving}/index.js +0 -0
@@ -7,6 +7,8 @@
7
7
  * runtime in dev, pushed to a secret store in prod). No `process.env` mutation,
8
8
  * no interpolation magic beyond `${VAR}` against earlier keys in the same file.
9
9
  */
10
+ /** Parse one dotenv document into a flat record; `${VAR}` reads only earlier keys. */
11
+ export declare function parseDotenv(contents: string): Record<string, string>;
10
12
  /**
11
13
  * Read + parse a dotenv file the preset explicitly DECLARED (`secrets:`).
12
14
  * Declared-but-absent is a wiring error (the gitignored file was never created
@@ -15,5 +17,3 @@
15
17
  * that exists but holds no keys is legitimate (a domain with no secrets yet).
16
18
  */
17
19
  export declare function loadDeclaredSecrets(path: string, declaration: string): Record<string, string>;
18
- /** Load one explicit development-session secret snapshot without following a leaf symlink. */
19
- export declare function loadPrivateSecretsFile(path: string, platform?: NodeJS.Platform): Record<string, string>;
@@ -7,8 +7,9 @@
7
7
  * runtime in dev, pushed to a secret store in prod). No `process.env` mutation,
8
8
  * no interpolation magic beyond `${VAR}` against earlier keys in the same file.
9
9
  */
10
- import { closeSync, constants, fstatSync, openSync, readFileSync } from 'node:fs';
11
- function parseDotenv(contents) {
10
+ import { readFileSync } from 'node:fs';
11
+ /** Parse one dotenv document into a flat record; `${VAR}` reads only earlier keys. */
12
+ export function parseDotenv(contents) {
12
13
  const out = {};
13
14
  for (const raw of contents.split('\n')) {
14
15
  const line = raw.trim();
@@ -52,34 +53,3 @@ export function loadDeclaredSecrets(path, declaration) {
52
53
  }
53
54
  return parseDotenv(contents);
54
55
  }
55
- /** Load one explicit development-session secret snapshot without following a leaf symlink. */
56
- export function loadPrivateSecretsFile(path, platform = process.platform) {
57
- if (platform === 'win32') {
58
- throw new Error('--secrets-file is unavailable on Windows until private no-reparse file admission is supported.');
59
- }
60
- let descriptor;
61
- try {
62
- descriptor = openSync(path, constants.O_RDONLY | constants.O_NOFOLLOW);
63
- }
64
- catch (cause) {
65
- if (cause instanceof Error && 'code' in cause && cause.code === 'ENOENT') {
66
- throw new Error(`Secrets file '${path}' is missing.`, { cause });
67
- }
68
- if (cause instanceof Error && 'code' in cause && cause.code === 'ELOOP') {
69
- throw new Error(`Secrets file '${path}' must be a regular file and not a symlink.`, { cause });
70
- }
71
- throw cause;
72
- }
73
- try {
74
- const info = fstatSync(descriptor);
75
- if (!info.isFile())
76
- throw new Error(`Secrets file '${path}' must be a regular file.`);
77
- if ((info.mode & 0o077) !== 0) {
78
- throw new Error(`Secrets file '${path}' must not be accessible by group or other users.`);
79
- }
80
- return parseDotenv(readFileSync(descriptor, 'utf8'));
81
- }
82
- finally {
83
- closeSync(descriptor);
84
- }
85
- }
@@ -1,4 +1,6 @@
1
+ import { installCommand } from '../../project/install-command.js';
1
2
  import { COMMANDS } from './arguments.js';
3
+ import { MINIMUM_INSTALLATIONS_CLI_VERSION } from './registry/executable.js';
2
4
  /** Resolve help without parsing a project or performing any command effects. */
3
5
  export function helpRequest(argv) {
4
6
  if (!argv.some((argument) => argument === '--help' || argument === '-h'))
@@ -12,19 +14,22 @@ export function helpText(command) {
12
14
  export const ERROR_USAGE = `Usage: astrale-domain <command> [options]
13
15
  Run "astrale-domain --help" for available commands.
14
16
  `;
15
- const GLOBAL_HELP = `Build, develop, deploy, test, lint, and package Astrale Domains.
17
+ const GLOBAL_HELP = `Build, deploy, list, test, lint, and package Astrale Domains.
16
18
 
17
19
  Usage:
18
20
  astrale-domain <command> [options]
19
21
 
20
22
  Commands:
21
- dev [environment] Remotely deploy and watch one Project Environment.
22
- build Build and verify without deploying.
23
- deploy <environment> Deploy and optionally install one Environment.
23
+ build Build, verify and print the build digest.
24
+ deploy <environment> Deploy one Environment; never installs.
25
+ diff Show the changes since the published version and the minimum.
26
+ list List the deployments of the Project's Environments.
27
+ publish <environment> Deploy, verify and publish the package.json version; never installs.
24
28
  test Run Project tests, optionally against one Environment.
25
29
  lint Check Domain source and architecture.
26
30
  package Prepare public declarations for publication.
27
31
  upgrade Update Astrale dependencies through pnpm (default: beta).
32
+ yank <version> Take a published version out of resolution, or put it back.
28
33
 
29
34
  Options:
30
35
  -h, --help Show help.
@@ -51,88 +56,178 @@ Behavior:
51
56
  unchanged with a warning.
52
57
  Local links, catalogs, aliases, peers, and overrides are not rewritten.
53
58
  Does not load astrale.config.ts, require Bun, run project checks, commit, or deploy.
54
- Stop development watchers before upgrading. Review changes and run your project's
55
- checks afterwards. Failed installations leave local changes available for repair.
59
+ Review changes and run your project's checks afterwards. Failed installations leave
60
+ local changes available for repair.
56
61
  For an older SDK without this command: pnpm dlx @astrale-os/sdk@beta upgrade.
57
62
  `,
58
- dev: `Build, verify, remotely deploy, and watch one Project Environment.
63
+ build: `Build and verify a Domain without deploying it, and print its build digest.
59
64
 
60
65
  Usage:
61
- astrale-domain dev [environment] [options]
66
+ astrale-domain build [--json]
67
+
68
+ Options:
69
+ --json Print one BuildResultV1 document on stdout.
70
+ -h, --help Show help for build.
71
+
72
+ Behavior:
73
+ Compiles the Domain and verifies that the conventional or configured Runtime
74
+ module exports the exact Runtime owned by it. Then bundles it once per distinct
75
+ bundler of the Project's adapters and prints each build digest: the hash of the
76
+ produced modules, assets, Schema and requirements. It does not select an Environment,
77
+ load secrets, deploy, or install the Domain, so every Environment whose adapter
78
+ shares a bundler deploys the code of that one digest.
79
+ `,
80
+ deploy: `Build, verify, and deploy a Domain through its configured adapter.
81
+
82
+ Usage:
83
+ astrale-domain deploy <environment> [--json]
84
+ astrale-domain deploy --environment <name> [--json]
62
85
 
63
86
  Arguments:
64
- environment Project Environment name; defaults to development.
87
+ environment Required adapter environment key.
65
88
 
66
89
  Options:
67
90
  --environment <name> Select the environment without a positional argument.
68
- --deploy-only Suppress this run's configured Kernel installation.
69
- --as <identity> Select the Astrale identity for Services and installation calls.
70
- --session-file <path> Write one retained DevelopmentSessionFileV1 snapshot at an
71
- absolute path in a caller-owned private directory.
72
- --credential-file <path>
73
- Use one private operator credential for provider and Kernel
74
- calls without exposing it in Project configuration.
75
- --secrets-file <path> Load one private, absolute secrets file for this development
76
- session instead of the adapter-declared secrets file.
77
- -h, --help Show help for dev.
91
+ --json Print one DeployResultV1 on stdout; progress goes to stderr.
92
+ --as <identity> Select the Astrale identity for the adapter's provider calls.
93
+ -h, --help Show help for deploy.
78
94
 
79
95
  Behavior:
80
- The selected Environment must exist; no other Environment is chosen as a fallback.
81
- Builds and verifies the Application, Runtime, frontend, and adapter artifact, then
82
- deploys it through the selected Environment. It never starts a local Worker,
83
- Vite server, or tunnel. Imported source changes produce serialized remote updates;
84
- configuration changes require restarting the command.
85
- A shared direct-provider target additionally requires an external single-writer
86
- boundary such as a CI/CD concurrency group.
87
- The session file is machine-readable and authoritative when requested; human
88
- stdout/stderr remains diagnostic. It requires an adapter that reports exact
89
- installed Release evidence, so it is rejected for an Environment without an
90
- installation and when --deploy-only suppresses installation.
91
- A credential file is admitted and read once. Its value is passed only to the
92
- deployment adapter, configured Kernel installation, and default View; it never
93
- enters Domain Runtime secrets, diagnostics, deployment evidence, or the session
94
- file. It is currently unavailable on Windows because private no-reparse file
95
- admission is absent.
96
- A secrets-file override is read once, passed to the Domain runtime as secrets,
97
- never mutates the authored project, and is not watched for later changes. It is
98
- also unavailable on Windows because private no-reparse admission is absent.
99
-
100
- Stopping the watcher stops only local build orchestration. The remote deployment
101
- and optional Kernel installation remain available.
96
+ Builds and verifies the Domain and Runtime, rebuilds the Bundle exactly as build
97
+ does, loads declared secrets, and deploys through the selected adapter. It never
98
+ installs the Domain: install the URL it prints with
99
+ ${installCommand()}.
100
+ The Environment's configuration selects how it deploys. An adapter that implements
101
+ deployRelease makes one immutable deployment per release and calls no instance: the
102
+ SDK seals the release for the deployment's URL, records the commit it was built
103
+ from, and the adapter creates that deployment or reuses it (adapter-astrale on
104
+ Admin's Services, through astrale call --admin). A new deployment binds the
105
+ Environment's current secrets; a reused one has its own secrets updated in place,
106
+ served once propagated; no other deployment's secrets change. Any other Environment
107
+ replaces its stable target in place (legacy direct mode, deprecated), warns on
108
+ stderr, serves a v3 Publication only, and warns when the uploaded code has another
109
+ build digest than the Bundle.
110
+ With --json, stdout holds only one DeployResultV1: the deployment's URL, which
111
+ astrale domain install takes, its digests, adapter and state. Exit status: 0 deployed,
112
+ 1 failed or refused, 2 usage error; a failed run prints nothing on stdout.
102
113
  `,
103
- build: `Build and verify a Domain without deploying it.
114
+ list: `List the deployments of the Project's Environments, their versions and where they run.
104
115
 
105
116
  Usage:
106
- astrale-domain build
117
+ astrale-domain list [--environment <name>] [--instance <name>]... [--json]
107
118
 
108
119
  Options:
109
- -h, --help Show help for build.
120
+ --environment <name> List one Environment instead of every Environment.
121
+ --instance <name> Ask this instance what it runs, for INSTALLED ON (repeatable).
122
+ --json Print one ListResultV1 on stdout; notices go to stderr.
123
+ --as <identity> Select the Astrale identity for the hosts, the registry and the
124
+ instances.
125
+ -h, --help Show help for list.
110
126
 
111
127
  Behavior:
112
- Compiles the Application and verifies that the conventional or configured Runtime
113
- module exports the exact Runtime owned by it. It does not select an Environment,
114
- load secrets, deploy, or install the Domain.
128
+ Asks the adapter of each Environment that deploys immutable deployments for the
129
+ deployments its host keeps for the caller, and prints each one's release, its version
130
+ or name, Environment and state, the instances it is installed on, its last call and
131
+ its expiry, and the URL ${installCommand()} takes.
132
+ A deployment is named by the registry's version of its release (1.5.0) or of its build
133
+ (1.5.0 · staging), else from its record's commit, such as 1.4.2 + 7 commits · a1b2c3d ·
134
+ staging. Names are computed, never stored, and printed whole.
135
+ INSTALLED ON names each --instance whose Kernel pins the deployment. ? marks what is
136
+ unknown: no instance was asked, an instance could not tell (such as one whose Kernel
137
+ does not list installed releases), or its listing shows only what you can read there;
138
+ stderr says which and why. An unknown instance is never shown as running nothing; —
139
+ means every instance asked listed all it runs and none runs it.
140
+ The registry and the instances are read through the Astrale CLI (${MINIMUM_INSTALLATIONS_CLI_VERSION} or
141
+ newer) with the caller's identity, only once a deployment is listed.
142
+ A registry that cannot be read fails the listing; an unknown instance never does.
143
+ A preview expires 30 days after its activation or its last call, whichever is
144
+ later; a published deployment never does. Last calls are read from the host as it
145
+ counts them, so a host whose last calls cannot be read is not listed. A platform
146
+ dispatch namespace reads them from its calls dataset, and without Account Analytics
147
+ Read lists its deployments without last calls or expiries.
148
+ Listing changes nothing, at any host, registry or instance.
149
+ An Environment in legacy direct mode, refused by deploy, or whose adapter lists no
150
+ deployments is reported on stderr and, with --json, under unlisted. A deployment
151
+ whose record this SDK does not admit is still listed, from what its host knows.
152
+ With --json, each deployment carries its installedOn and its call target: the path of
153
+ its node on Admin's Services, for astrale call "<path>.method.setSecret" --admin, or the
154
+ namespace and script of a platform dispatch namespace, which its operator tooling
155
+ takes; installations says what of INSTALLED ON is unknown.
156
+ Exit status: 0 listed, 1 a host or the registry could not be read (with --json,
157
+ nothing on stdout), 2 usage error.
115
158
  `,
116
- deploy: `Build, verify, and deploy a Domain through its configured adapter.
159
+ diff: `Show the changes since the last published version and the version they require.
160
+
161
+ Usage:
162
+ astrale-domain diff [--as <identity>] [--json]
163
+
164
+ Options:
165
+ --as <identity> Select the Astrale identity that reads the Domain registry.
166
+ --json Print one DiffReportV1 on stdout; the summary goes to stderr.
167
+ -h, --help Show help for diff.
168
+
169
+ Behavior:
170
+ Reads the declared version from package.json and compares the Domain with the
171
+ highest published stable version up to it, yanked versions included. The level
172
+ the changes require is a floor: removing or changing a member is major, adding
173
+ one minor, anything else (code, descriptions) patch; below 1.0.0 a breaking
174
+ change raises the minor. Callable authorization is outside the floor: raise the
175
+ version yourself when you narrow it.
176
+ When package.json still names a published version, as on a feature branch, the
177
+ report is informational and exits 0. Otherwise the declared version must reach
178
+ the minimum: a version that is too low exits 1 and names what requires more, as
179
+ on a release PR, where Release-As: 2.0.0 or a feat!: commit raises the number.
180
+ Nothing to compare (no published stable version, or a Domain absent from the
181
+ registry or not readable by the caller) exits 0.
182
+ Reads the registry through the Astrale CLI (domain versions) with the caller's
183
+ own credential, and the stored bundle of the compared version only when its
184
+ Schema differs. Builds the Domain when the Schema is unchanged, to compare build
185
+ digests. Deploys, publishes and installs nothing.
186
+ Exit status: 0 accepted, published or nothing to compare; 1 too low or failed
187
+ (with --json, a failure prints nothing on stdout); 2 usage error.
188
+ `,
189
+ publish: `Deploy one Environment, verify it, and publish the version package.json declares.
117
190
 
118
191
  Usage:
119
- astrale-domain deploy <environment>
120
- astrale-domain deploy --environment <name>
192
+ astrale-domain publish <environment> [--allow-dirty] [--as <identity>] [--json]
121
193
 
122
194
  Arguments:
123
- environment Required adapter environment key.
195
+ environment Required adapter environment key, usually production.
124
196
 
125
197
  Options:
126
- --environment <name> Select the environment without a positional argument.
127
- --deploy-only Suppress this run's configured Kernel installation.
128
- --as <identity> Select the Astrale identity for Services and installation calls.
129
- -h, --help Show help for deploy.
198
+ --allow-dirty Publish from a working tree with changes, or outside git; the
199
+ Publication is marked dirty.
200
+ --as <identity> Select the Astrale identity that reads and writes the Domain
201
+ registry and deploys.
202
+ --json Print one PublishReportV1 on stdout; progress goes to stderr.
203
+ -h, --help Show help for publish.
130
204
 
131
205
  Behavior:
132
- Builds and verifies the Application, Runtime, and provider artifact, loads declared
133
- secrets, and invokes the selected adapter. It then verifies the resulting Release.
134
- When the Environment declares installation, reconciles it after provider readiness.
135
- An Environment without installation performs zero Kernel calls.
206
+ Names one immutable deployment's release with the version in package.json, in
207
+ this order, deploying only once the registry allows the version:
208
+ 1. Before any effect: refuses an Environment that does not deploy immutable
209
+ deployments, a working tree with changes or no git commit (unless
210
+ --allow-dirty), and warns when no remote branch holds the commit; then builds,
211
+ freezes the configuration, places the deployment and seals its release.
212
+ 2. Reads the version from package.json and the registry through the Astrale CLI.
213
+ A version already published with this release succeeds without effect; with
214
+ another release it is refused: a published version never changes.
215
+ 3. Compares with the highest stable version below it, yanked versions included,
216
+ as diff does, and refuses a version that is too low.
217
+ 4. Deploys the release, or reuses its deployment, as deploy does.
218
+ 5. Verifies that the deployment serves the sealed release, within 60 seconds.
219
+ 6. Asks Admin for the Publication, which Admin creates under the Domain's lock. A
220
+ version published meanwhile with another release is refused, and this
221
+ deployment stays a preview. On a platform dispatch namespace the published
222
+ deployment is then kept from expiry; Admin keeps those of its Services itself.
223
+ A failure leaves at most a deployment without a version, and says whether a rerun
224
+ can help: when it can, rerun publish, which reuses it; a refusal Admin repeats
225
+ (a missing domain_admin right, a release it will not name) names its cause.
226
+ Admin unavailable or the Domain absent from the registry: nothing is deployed.
227
+ It never installs the Domain: install the URL it prints with
228
+ ${installCommand()}.
229
+ Exit status: 0 published or already published; 1 refused or failed (with --json,
230
+ a failure prints nothing on stdout); 2 usage error.
136
231
  `,
137
232
  test: `Run Project tests locally or against one selected Environment.
138
233
 
@@ -160,6 +255,28 @@ Options:
160
255
  --fix Apply supported fixes.
161
256
  --format <format> Select stylish or json output (default: stylish).
162
257
  -h, --help Show help for lint.
258
+ `,
259
+ yank: `Take one published version of the Domain out of resolution, or put it back.
260
+
261
+ Usage:
262
+ astrale-domain yank <version> [--undo] [--json]
263
+
264
+ Arguments:
265
+ version One published version of this Project's Domain, e.g. 1.5.0.
266
+
267
+ Options:
268
+ --undo Let line references choose the version again.
269
+ --json Print one YankReportV1 on stdout.
270
+ -h, --help Show help for yank.
271
+
272
+ Behavior:
273
+ Changes the version in the Admin registry through the Astrale CLI, with its configured
274
+ Admin target and identity; yanking requires administering the Domain. A line reference
275
+ such as @1.5 never chooses a yanked version, and an exact reference installs it with a
276
+ warning. Installations keep running and the deployment keeps serving: yanking only
277
+ changes resolution. A version already in the requested state answers unchanged, so a
278
+ rerun is safe. Exit status: 0 done, 1 refused or failed, 2 usage error; a refused or
279
+ failed run prints nothing on stdout.
163
280
  `,
164
281
  package: `Prepare public TypeScript declarations for package publication.
165
282
 
@@ -0,0 +1,83 @@
1
+ import type { DeploymentCommitV1, FrozenConfigurationV1 } from '../../deployment/address/index.js';
2
+ import type { Adapter, Build, Bundle, LegacyAdapter, Placement, Release, ResolvedRuntimeReference } from '../../deployment/index.js';
3
+ import type { DeployResultV1 } from './deploy-result.js';
4
+ /**
5
+ * Everything the deploy of one canonical Environment derives before its only effectful call: the
6
+ * Bundle, the Environment's current secrets, the frozen configuration, where the host places the
7
+ * deployment, its label, the sealed release it serves and the commit it is built from. Planning has
8
+ * no effect at the host: `placement` only reads, and nothing is created, reused or written.
9
+ */
10
+ export interface ImmutableDeploymentPlan {
11
+ readonly projectDir: string;
12
+ readonly environment: string;
13
+ readonly adapter: Adapter<object>;
14
+ readonly parameters: object;
15
+ readonly identity?: string;
16
+ readonly bundle: Bundle;
17
+ readonly secrets: Readonly<Record<string, string>>;
18
+ readonly configuration: FrozenConfigurationV1;
19
+ readonly placement: Placement;
20
+ /** `<line>-<content>`: the deployment's DNS label and provider script. */
21
+ readonly label: string;
22
+ /** The `DomainRelease` v4 the deployment serves at its URL, `release.url`. */
23
+ readonly release: Release;
24
+ /** The commit this deploy runs from, which a deployment it creates declares. */
25
+ readonly commit: DeploymentCommitV1 | null;
26
+ }
27
+ /**
28
+ * Plan the immutable deployment of one canonical Environment (CT33), without any effect.
29
+ *
30
+ * The SDK bundles exactly as `astrale-domain build` does, asks the adapter to freeze the
31
+ * Environment's configuration and say where its host places deployments, derives the deployment
32
+ * label and URL from them (S3), seals the `DomainRelease` v4 the deployment serves at that URL
33
+ * (S4a), and reads the commit it is built from. `deploy` deploys the plan at once; `publish`
34
+ * checks the registry against the sealed release first, and deploys only when it may name it.
35
+ */
36
+ export declare function planImmutableDeployment(input: {
37
+ readonly projectDir: string;
38
+ readonly environment: string;
39
+ /** A canonical Environment's adapter (CT33), which implements adapter interface v2. */
40
+ readonly adapter: Adapter<object> | LegacyAdapter<object>;
41
+ readonly parameters: object;
42
+ readonly build: Build;
43
+ readonly runtime: ResolvedRuntimeReference;
44
+ readonly identity?: string;
45
+ /** The commit provenance the caller already read (`publish` checks it first); read otherwise. */
46
+ readonly commit?: DeploymentCommitV1 | null;
47
+ readonly signal: AbortSignal;
48
+ }): Promise<ImmutableDeploymentPlan>;
49
+ /**
50
+ * The commit the Project's runtime module is built from, as a deployment declares it (CT18
51
+ * `commit`): its sha, whether the tree holds changes it does not, and the last release tag before
52
+ * it. `null` outside git.
53
+ */
54
+ export declare function runtimeCommit(projectDir: string, runtime: ResolvedRuntimeReference, signal: AbortSignal): Promise<DeploymentCommitV1 | null>;
55
+ /**
56
+ * Create, or reuse, the immutable deployment a plan describes: the adapter's `deployRelease` is
57
+ * its only effectful call. The SDK makes no Kernel call, the deploy calls no instance and installs
58
+ * nothing: `astrale domain install <url>` installs the URL it prints.
59
+ *
60
+ * Returns the deploy result, or nothing once a failure is reported on stderr.
61
+ */
62
+ export declare function deployPlannedRelease(plan: ImmutableDeploymentPlan, input: {
63
+ readonly signal: AbortSignal;
64
+ readonly report: (line: string) => void;
65
+ }): Promise<DeployResultV1 | undefined>;
66
+ /**
67
+ * Deploy one canonical Environment (CT33) as the immutable deployment of one sealed release: plan
68
+ * it without effect, then make the adapter's one effectful call.
69
+ *
70
+ * Returns the deploy result, or nothing once a failure is reported on stderr.
71
+ */
72
+ export declare function deployImmutable(input: {
73
+ readonly projectDir: string;
74
+ readonly environment: string;
75
+ /** A canonical Environment's adapter (CT33), which implements adapter interface v2. */
76
+ readonly adapter: Adapter<object> | LegacyAdapter<object>;
77
+ readonly parameters: object;
78
+ readonly build: Build;
79
+ readonly runtime: ResolvedRuntimeReference;
80
+ readonly identity?: string;
81
+ readonly signal: AbortSignal;
82
+ readonly report: (line: string) => void;
83
+ }): Promise<DeployResultV1 | undefined>;
@@ -0,0 +1,135 @@
1
+ import { resolve } from 'node:path';
2
+ import { deploymentContent, deploymentLabel, deploymentLine, deploymentUrl, } from '../../deployment/address/index.js';
3
+ import { assemble } from '../../deployment/index.js';
4
+ import { bundleBuild } from './build.js';
5
+ import { deploymentCommit } from './commit.js';
6
+ import { deployResult } from './deploy-result.js';
7
+ import { error } from './log.js';
8
+ import { environmentSecrets } from './secrets.js';
9
+ /**
10
+ * Plan the immutable deployment of one canonical Environment (CT33), without any effect.
11
+ *
12
+ * The SDK bundles exactly as `astrale-domain build` does, asks the adapter to freeze the
13
+ * Environment's configuration and say where its host places deployments, derives the deployment
14
+ * label and URL from them (S3), seals the `DomainRelease` v4 the deployment serves at that URL
15
+ * (S4a), and reads the commit it is built from. `deploy` deploys the plan at once; `publish`
16
+ * checks the registry against the sealed release first, and deploys only when it may name it.
17
+ */
18
+ export async function planImmutableDeployment(input) {
19
+ const { parameters, environment, build, signal } = input;
20
+ const adapter = releaseAdapter(input.adapter);
21
+ const identity = input.identity === undefined ? {} : { identity: input.identity };
22
+ const bundle = await bundleBuild({
23
+ bundler: adapter.bundler,
24
+ projectDir: input.projectDir,
25
+ build,
26
+ runtime: input.runtime,
27
+ signal,
28
+ });
29
+ const secrets = environmentSecrets(adapter, parameters, input.projectDir, input.runtime.runtime);
30
+ const configuration = adapter.configure(parameters, {
31
+ environment,
32
+ secrets: Object.freeze(Object.keys(secrets).sort()),
33
+ });
34
+ const placement = await adapter.placement(parameters, { environment, signal, ...identity });
35
+ const origin = build.schema.compiled.root.origin;
36
+ const label = deploymentLabel(deploymentLine({ origin, environment, addressing: placement.addressing }), deploymentContent(bundle.digest, configuration));
37
+ const release = assemble(build, bundle.digest, deploymentUrl(label, placement.routingDomain));
38
+ const commit = input.commit !== undefined
39
+ ? input.commit
40
+ : await runtimeCommit(input.projectDir, input.runtime, signal);
41
+ return Object.freeze({
42
+ projectDir: input.projectDir,
43
+ environment,
44
+ adapter,
45
+ parameters,
46
+ ...identity,
47
+ bundle,
48
+ secrets,
49
+ configuration,
50
+ placement,
51
+ label,
52
+ release,
53
+ commit,
54
+ });
55
+ }
56
+ /**
57
+ * The commit the Project's runtime module is built from, as a deployment declares it (CT18
58
+ * `commit`): its sha, whether the tree holds changes it does not, and the last release tag before
59
+ * it. `null` outside git.
60
+ */
61
+ export function runtimeCommit(projectDir, runtime, signal) {
62
+ return deploymentCommit({
63
+ projectDir,
64
+ // The configuration sits in the Project directory, and names its runtime relative to it.
65
+ runtimeModule: resolve(projectDir, runtime.reference.path),
66
+ signal,
67
+ });
68
+ }
69
+ /**
70
+ * Create, or reuse, the immutable deployment a plan describes: the adapter's `deployRelease` is
71
+ * its only effectful call. The SDK makes no Kernel call, the deploy calls no instance and installs
72
+ * nothing: `astrale domain install <url>` installs the URL it prints.
73
+ *
74
+ * Returns the deploy result, or nothing once a failure is reported on stderr.
75
+ */
76
+ export async function deployPlannedRelease(plan, input) {
77
+ const { adapter, environment, label, release } = plan;
78
+ const deployed = await adapter.deployRelease(plan.parameters, {
79
+ projectDir: plan.projectDir,
80
+ environment,
81
+ ...(plan.identity === undefined ? {} : { identity: plan.identity }),
82
+ secrets: plan.secrets,
83
+ bundle: plan.bundle,
84
+ configuration: plan.configuration,
85
+ placement: plan.placement,
86
+ label,
87
+ release,
88
+ commit: plan.commit,
89
+ signal: input.signal,
90
+ });
91
+ if (deployed.status !== 'ready') {
92
+ error(`Deployment failed during ${deployed.phase}: ${deployed.error.message}`);
93
+ return undefined;
94
+ }
95
+ const result = deployResult({ environment, adapter, release, deployment: deployed });
96
+ input.report(`Domain: ${result.origin}`);
97
+ input.report(`Environment: ${environment}`);
98
+ input.report(`Adapter: ${result.deployment.adapter}`);
99
+ input.report(`Deployment: ${label} · ${result.deployment.state}`);
100
+ input.report(`URL: ${result.url}`);
101
+ input.report(`Release: ${release.document.digest}`);
102
+ input.report(`Build: ${release.buildDigest}`);
103
+ input.report(secretsLine(label, result.secrets.state));
104
+ input.report('Ready: deployment verified');
105
+ return result;
106
+ }
107
+ /**
108
+ * Deploy one canonical Environment (CT33) as the immutable deployment of one sealed release: plan
109
+ * it without effect, then make the adapter's one effectful call.
110
+ *
111
+ * Returns the deploy result, or nothing once a failure is reported on stderr.
112
+ */
113
+ export async function deployImmutable(input) {
114
+ const plan = await planImmutableDeployment(input);
115
+ return deployPlannedRelease(plan, { signal: input.signal, report: input.report });
116
+ }
117
+ /**
118
+ * What the deploy did to the secrets of the one deployment it made or reused: `bound` to the new
119
+ * deployment, or `updated` or left `unchanged` in place on the reused one. No other deployment's
120
+ * secrets are ever written. A value rewritten in place is served once the host propagated it,
121
+ * which is eventually consistent (about 4 s on Workers for Platforms, AM-114).
122
+ */
123
+ function secretsLine(label, state) {
124
+ return state === 'updated'
125
+ ? `Secrets: updated in place on ${label}; the new values are served once propagated ` +
126
+ '(eventually consistent, about 4 s)'
127
+ : `Secrets: ${state}`;
128
+ }
129
+ /** The adapter of a canonical Environment: CT33 selects canonical only beside `deployRelease`. */
130
+ function releaseAdapter(adapter) {
131
+ if (!('deployRelease' in adapter) || typeof adapter.deployRelease !== 'function') {
132
+ throw new TypeError(`Adapter ${adapter.name}@${adapter.version} implements no deployRelease and deploys no immutable deployment.`);
133
+ }
134
+ return adapter;
135
+ }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * `@astrale-os/sdk/cli` — the `astrale-domain` CLI
3
- * (dev | build | deploy | test | lint | package), explicit dotenv boundary, and admitted
4
- * development-session file representation.
3
+ * (build | deploy | diff | list | publish | test | lint | package | upgrade | yank), its JSON results,
4
+ * the deploy mode each command selects for an Environment (CT33), and the explicit dotenv boundary.
5
5
  *
6
6
  * Node-only: the CLI imports `node:fs`/`node:module`/`node:url` and runs under
7
7
  * Bun (it imports the project's `astrale.config.ts` directly). This subpath is
@@ -11,6 +11,12 @@
11
11
  * The bin lives at `./bin`.
12
12
  */
13
13
  export { run } from './run.js';
14
+ export type { BuildResultV1 } from './build.js';
15
+ export type { DeployResultV1, DeploymentSecretsState } from './deploy-result.js';
16
+ export type { DiffChangeV1, DiffReportV1 } from './diff/index.js';
17
+ export type { InstallationSourcesV1, InstallationUnknownReason, InstalledOnV1, InstanceSourceV1, ListedDeploymentV1, ListResultV1, UnlistedEnvironmentV1, } from './list.js';
18
+ export type { PublishReportV1 } from './publish/index.js';
19
+ export type { YankReportV1 } from './yank.js';
20
+ export { selectDeployMode } from './deploy-mode.js';
21
+ export type { CloudflareDirectParameter, DeployMode, DeployModeCommand, DeployRefusal, LegacyDirectReason, } from './deploy-mode.js';
14
22
  export { loadDeclaredSecrets } from './dotenv.js';
15
- export { DEVELOPMENT_SESSION_FILE_VERSION, acceptDevelopmentSessionFileV1, } from './development/session-file.js';
16
- export type { DevelopmentSessionFileV1, DevelopmentSessionPhaseV1, DevelopmentSessionProjectV1, DevelopmentSessionReleaseV1, } from './development/session-file.js';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * `@astrale-os/sdk/cli` — the `astrale-domain` CLI
3
- * (dev | build | deploy | test | lint | package), explicit dotenv boundary, and admitted
4
- * development-session file representation.
3
+ * (build | deploy | diff | list | publish | test | lint | package | upgrade | yank), its JSON results,
4
+ * the deploy mode each command selects for an Environment (CT33), and the explicit dotenv boundary.
5
5
  *
6
6
  * Node-only: the CLI imports `node:fs`/`node:module`/`node:url` and runs under
7
7
  * Bun (it imports the project's `astrale.config.ts` directly). This subpath is
@@ -11,5 +11,7 @@
11
11
  * The bin lives at `./bin`.
12
12
  */
13
13
  export { run } from './run.js';
14
+ // The domain-publish Action asks the selection `publish` makes before it runs it, to skip an
15
+ // Environment that is not canonical with a notice instead of failing on its refusal.
16
+ export { selectDeployMode } from './deploy-mode.js';
14
17
  export { loadDeclaredSecrets } from './dotenv.js';
15
- export { DEVELOPMENT_SESSION_FILE_VERSION, acceptDevelopmentSessionFileV1, } from './development/session-file.js';