@astrale-os/sdk 0.6.0-beta.3 → 0.6.0-beta.30

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 (444) hide show
  1. package/README.md +179 -58
  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 +44 -31
  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 +8 -6
  8. package/dist/application/define.js +28 -14
  9. package/dist/application/dependency/index.d.ts +1 -1
  10. package/dist/application/dependency/invoker.d.ts +14 -9
  11. package/dist/application/domain.d.ts +30 -0
  12. package/dist/application/index.d.ts +4 -4
  13. package/dist/application/index.js +1 -1
  14. package/dist/application/integration/operation.d.ts +2 -2
  15. package/dist/application/mutation/authoring/properties.d.ts +5 -3
  16. package/dist/application/mutation/authoring/properties.js +35 -2
  17. package/dist/application/mutation/authoring/transition.js +4 -1
  18. package/dist/application/mutation/index.d.ts +1 -1
  19. package/dist/application/query/composite/plan.d.ts +0 -4
  20. package/dist/application/query/composite/plan.js +0 -2
  21. package/dist/application/routes/admission.d.ts +2 -2
  22. package/dist/application/routes/admission.js +1 -1
  23. package/dist/application/routes/route.d.ts +2 -2
  24. package/dist/application/runtime/actions.js +3 -0
  25. package/dist/application/runtime/workflows.d.ts +3 -1
  26. package/dist/application/runtime/workflows.js +6 -4
  27. package/dist/application/view/define.js +4 -6
  28. package/dist/application/view/frontend.d.ts +2 -2
  29. package/dist/application/view/index.d.ts +1 -1
  30. package/dist/application/view/route.d.ts +0 -14
  31. package/dist/application/view/route.js +1 -64
  32. package/dist/application/workflow/authoring.d.ts +3 -2
  33. package/dist/application/workflow/context.d.ts +8 -2
  34. package/dist/application/workflow/define.d.ts +4 -4
  35. package/dist/application/workflow/define.js +20 -4
  36. package/dist/application/workflow/durable.d.ts +87 -0
  37. package/dist/application/workflow/index.d.ts +3 -2
  38. package/dist/application/workflow/runner/inline.js +3 -4
  39. package/dist/application/workflow/runner/runner.d.ts +2 -2
  40. package/dist/application/workflow/step/output.d.ts +2 -0
  41. package/dist/application/workflow/step/output.js +73 -0
  42. package/dist/application/workflow/workflow.d.ts +13 -3
  43. package/dist/deployment/adapter/adapter.d.ts +55 -13
  44. package/dist/deployment/adapter/bundle/bundle.d.ts +36 -0
  45. package/dist/deployment/adapter/bundle/file.d.ts +10 -0
  46. package/dist/deployment/adapter/bundle/index.d.ts +2 -0
  47. package/dist/deployment/adapter/define.d.ts +4 -3
  48. package/dist/deployment/adapter/define.js +107 -23
  49. package/dist/deployment/adapter/index.d.ts +4 -3
  50. package/dist/deployment/adapter/index.js +1 -0
  51. package/dist/deployment/adapter/release/command.d.ts +33 -0
  52. package/dist/deployment/adapter/release/context.d.ts +94 -0
  53. package/dist/deployment/adapter/release/index.d.ts +4 -0
  54. package/dist/deployment/adapter/release/index.js +1 -0
  55. package/dist/deployment/adapter/release/list.d.ts +53 -0
  56. package/dist/deployment/adapter/release/list.js +1 -0
  57. package/dist/deployment/adapter/release/refusal.d.ts +10 -0
  58. package/dist/deployment/adapter/release/refusal.js +14 -0
  59. package/dist/deployment/adapter/release/result.d.ts +56 -0
  60. package/dist/deployment/adapter/release/result.js +1 -0
  61. package/dist/deployment/address/configuration.d.ts +95 -0
  62. package/dist/deployment/address/configuration.js +273 -0
  63. package/dist/deployment/address/fingerprint.d.ts +5 -0
  64. package/dist/deployment/address/fingerprint.js +27 -0
  65. package/dist/deployment/address/index.d.ts +5 -0
  66. package/dist/deployment/address/index.js +4 -0
  67. package/dist/deployment/address/label.d.ts +42 -0
  68. package/dist/deployment/address/label.js +80 -0
  69. package/dist/deployment/address/line.d.ts +29 -0
  70. package/dist/deployment/address/line.js +53 -0
  71. package/dist/deployment/address/record.d.ts +73 -0
  72. package/dist/deployment/address/record.js +138 -0
  73. package/dist/deployment/address/summary.d.ts +30 -0
  74. package/dist/deployment/address/summary.js +1 -0
  75. package/dist/deployment/address/vectors.d.ts +60 -0
  76. package/dist/deployment/address/vectors.js +517 -0
  77. package/dist/deployment/authoring.d.ts +0 -2
  78. package/dist/deployment/authoring.js +0 -1
  79. package/dist/deployment/build/build.d.ts +8 -2
  80. package/dist/deployment/build/compile.d.ts +4 -4
  81. package/dist/deployment/build/compile.js +19 -17
  82. package/dist/deployment/build/frontend/compilation.d.ts +2 -4
  83. package/dist/deployment/build/frontend/compilation.js +0 -5
  84. package/dist/deployment/build/frontend/digest.js +1 -5
  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.d.ts +2 -2
  90. package/dist/deployment/build/material.js +28 -13
  91. package/dist/deployment/build/schema.d.ts +2 -2
  92. package/dist/deployment/deployment.d.ts +3 -2
  93. package/dist/deployment/environment.d.ts +6 -0
  94. package/dist/deployment/environment.js +6 -0
  95. package/dist/deployment/index.d.ts +4 -6
  96. package/dist/deployment/index.js +1 -2
  97. package/dist/deployment/release/addressing.d.ts +6 -5
  98. package/dist/deployment/release/addressing.js +2 -3
  99. package/dist/deployment/release/assemble.d.ts +6 -3
  100. package/dist/deployment/release/assemble.js +12 -10
  101. package/dist/deployment/release/release.d.ts +16 -5
  102. package/dist/deployment/release/seal.d.ts +14 -0
  103. package/dist/deployment/release/seal.js +22 -0
  104. package/dist/deployment/release/{publication → served}/callables.d.ts +2 -2
  105. package/dist/deployment/release/{publication → served}/callables.js +2 -2
  106. package/dist/deployment/release/served/index.d.ts +11 -0
  107. package/dist/deployment/release/served/index.js +26 -0
  108. package/dist/deployment/release/{publication → served}/views.d.ts +2 -2
  109. package/dist/deployment/release/{publication → served}/views.js +0 -1
  110. package/dist/deployment/runtime/admission.d.ts +2 -2
  111. package/dist/deployment/runtime/admission.js +5 -5
  112. package/dist/deployment/verify/index.d.ts +3 -4
  113. package/dist/deployment/verify/index.js +2 -3
  114. package/dist/deployment/verify/preflight/bundle.d.ts +18 -0
  115. package/dist/deployment/verify/preflight/bundle.js +71 -0
  116. package/dist/deployment/verify/preflight/index.d.ts +1 -12
  117. package/dist/deployment/verify/preflight/index.js +1 -12
  118. package/dist/deployment/verify/readiness/fetch.d.ts +13 -0
  119. package/dist/deployment/verify/readiness/fetch.js +26 -0
  120. package/dist/deployment/verify/readiness/identity.d.ts +3 -6
  121. package/dist/deployment/verify/readiness/identity.js +3 -3
  122. package/dist/deployment/verify/readiness/index.d.ts +15 -8
  123. package/dist/deployment/verify/readiness/index.js +25 -6
  124. package/dist/deployment/verify/readiness/release.d.ts +8 -0
  125. package/dist/deployment/verify/readiness/release.js +22 -0
  126. package/dist/deployment/worker/address.d.ts +26 -0
  127. package/dist/deployment/worker/address.js +43 -0
  128. package/dist/deployment/worker/build.d.ts +60 -0
  129. package/dist/deployment/worker/build.js +172 -0
  130. package/dist/deployment/worker/configuration.d.ts +73 -0
  131. package/dist/deployment/worker/configuration.js +165 -0
  132. package/dist/deployment/worker/content.d.ts +38 -0
  133. package/dist/deployment/worker/content.js +169 -0
  134. package/dist/deployment/worker/index.d.ts +29 -0
  135. package/dist/deployment/worker/index.js +29 -0
  136. package/dist/deployment/worker/limits.d.ts +30 -0
  137. package/dist/deployment/worker/limits.js +30 -0
  138. package/dist/deployment/worker/record.d.ts +29 -0
  139. package/dist/deployment/worker/record.js +69 -0
  140. package/dist/deployment/worker/request.d.ts +118 -0
  141. package/dist/deployment/worker/request.js +280 -0
  142. package/dist/deployment/worker/response.d.ts +101 -0
  143. package/dist/deployment/worker/response.js +207 -0
  144. package/dist/execution/identity/authentication.d.ts +33 -3
  145. package/dist/execution/identity/authentication.js +85 -40
  146. package/dist/execution/identity/callback.d.ts +16 -15
  147. package/dist/execution/identity/callback.js +21 -16
  148. package/dist/execution/identity/delivery.d.ts +6 -4
  149. package/dist/execution/identity/delivery.js +25 -20
  150. package/dist/execution/identity/identity.d.ts +17 -3
  151. package/dist/execution/identity/identity.js +12 -4
  152. package/dist/execution/identity/jwks.d.ts +5 -0
  153. package/dist/execution/identity/jwks.js +92 -102
  154. package/dist/execution/index.d.ts +4 -4
  155. package/dist/execution/index.js +2 -2
  156. package/dist/execution/invocation/admission/authentication.d.ts +11 -13
  157. package/dist/execution/invocation/admission/authentication.js +48 -44
  158. package/dist/execution/invocation/admission/authority.d.ts +28 -6
  159. package/dist/execution/invocation/admission/authority.js +9 -2
  160. package/dist/execution/invocation/admission/index.d.ts +2 -2
  161. package/dist/execution/invocation/admission/index.js +1 -1
  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 +3 -1
  165. package/dist/execution/invocation/dependency/bind.js +36 -16
  166. package/dist/execution/invocation/dispatch/context.d.ts +7 -6
  167. package/dist/execution/invocation/dispatch/context.js +17 -31
  168. package/dist/execution/invocation/dispatch/workflow.js +0 -4
  169. package/dist/execution/invocation/index.d.ts +2 -2
  170. package/dist/execution/invocation/index.js +1 -1
  171. package/dist/execution/invocation/integration/call.d.ts +2 -1
  172. package/dist/execution/invocation/integration/call.js +1 -1
  173. package/dist/execution/invocation/integration/clients.d.ts +1 -1
  174. package/dist/execution/invocation/invocation.js +49 -16
  175. package/dist/execution/invocation/result/errors.d.ts +0 -10
  176. package/dist/execution/invocation/result/errors.js +0 -17
  177. package/dist/execution/invocation/result/index.d.ts +2 -2
  178. package/dist/execution/invocation/result/index.js +1 -1
  179. package/dist/execution/invocation/result/project.js +41 -1
  180. package/dist/execution/node/serve.d.ts +2 -2
  181. package/dist/execution/node/serve.js +1 -1
  182. package/dist/execution/runtime/index.d.ts +1 -0
  183. package/dist/execution/runtime/index.js +1 -0
  184. package/dist/execution/runtime/load.d.ts +3 -3
  185. package/dist/execution/runtime/load.js +3 -2
  186. package/dist/execution/runtime/release.d.ts +17 -0
  187. package/dist/execution/runtime/release.js +7 -0
  188. package/dist/execution/serve.d.ts +10 -4
  189. package/dist/execution/serve.js +3 -0
  190. package/dist/execution/service/create.js +41 -7
  191. package/dist/execution/service/initialization.d.ts +4 -4
  192. package/dist/execution/service/initialization.js +23 -14
  193. package/dist/execution/service/release.d.ts +2 -2
  194. package/dist/execution/service/release.js +3 -2
  195. package/dist/execution/service/service.d.ts +14 -5
  196. package/dist/execution/service/serving/delivery.d.ts +5 -0
  197. package/dist/execution/service/{publication → serving}/delivery.js +4 -1
  198. package/dist/execution/service/{publication → serving}/index.d.ts +1 -1
  199. package/dist/execution/service/serving/installation.d.ts +4 -0
  200. package/dist/execution/service/serving/installation.js +9 -0
  201. package/dist/execution/service/serving/source.d.ts +11 -0
  202. package/dist/execution/service/serving/source.js +15 -0
  203. package/dist/execution/workflows/discovery.d.ts +14 -0
  204. package/dist/execution/workflows/discovery.js +151 -0
  205. package/dist/execution/workflows/engine.d.ts +52 -0
  206. package/dist/execution/workflows/engine.js +1 -0
  207. package/dist/execution/workflows/envelope.d.ts +12 -0
  208. package/dist/execution/workflows/envelope.js +46 -0
  209. package/dist/execution/workflows/failure.d.ts +11 -0
  210. package/dist/execution/workflows/failure.js +43 -0
  211. package/dist/execution/workflows/index.d.ts +4 -0
  212. package/dist/execution/workflows/index.js +3 -0
  213. package/dist/execution/workflows/options.d.ts +34 -0
  214. package/dist/execution/workflows/options.js +65 -0
  215. package/dist/execution/workflows/receiver.d.ts +21 -0
  216. package/dist/execution/workflows/receiver.js +92 -0
  217. package/dist/execution/workflows/route.d.ts +12 -0
  218. package/dist/execution/workflows/route.js +35 -0
  219. package/dist/execution/workflows/run.d.ts +22 -0
  220. package/dist/execution/workflows/run.js +223 -0
  221. package/dist/index.d.ts +4 -4
  222. package/dist/index.js +2 -2
  223. package/dist/platform/graph/alias.d.ts +1 -5
  224. package/dist/platform/graph/alias.js +1 -5
  225. package/dist/platform/graph/document/index.d.ts +1 -1
  226. package/dist/platform/graph/document/index.js +1 -1
  227. package/dist/platform/graph/index.d.ts +1 -1
  228. package/dist/platform/graph/index.js +1 -1
  229. package/dist/platform/release/index.d.ts +2 -0
  230. package/dist/platform/release/index.js +2 -0
  231. package/dist/platform/schema/callable-authoring.d.ts +21 -0
  232. package/dist/platform/schema/callable-authoring.js +27 -0
  233. package/dist/platform/schema/class-authoring.d.ts +61 -11
  234. package/dist/platform/schema/class-authoring.js +37 -4
  235. package/dist/platform/schema/class-icon-svg.d.ts +9 -0
  236. package/dist/platform/schema/class-icon-svg.js +29 -0
  237. package/dist/platform/schema/class-icon.d.ts +3 -8
  238. package/dist/platform/schema/class-icon.js +2 -29
  239. package/dist/platform/schema/index.d.ts +6 -4
  240. package/dist/platform/schema/index.js +2 -1
  241. package/dist/platform/schema/property.d.ts +5 -0
  242. package/dist/platform/schema/schema-authoring.d.ts +14 -7
  243. package/dist/platform/schema/schema-authoring.js +5 -1
  244. package/dist/platform/versioning/dependents.d.ts +18 -0
  245. package/dist/platform/versioning/dependents.js +15 -0
  246. package/dist/platform/versioning/index.d.ts +5 -0
  247. package/dist/platform/versioning/index.js +5 -0
  248. package/dist/platform/versioning/name.d.ts +38 -0
  249. package/dist/platform/versioning/name.js +58 -0
  250. package/dist/platform/versioning/reference.d.ts +48 -0
  251. package/dist/platform/versioning/reference.js +95 -0
  252. package/dist/platform/versioning/version.d.ts +72 -0
  253. package/dist/platform/versioning/version.js +98 -0
  254. package/dist/project/admit.js +1 -5
  255. package/dist/project/define.d.ts +4 -4
  256. package/dist/project/define.js +55 -35
  257. package/dist/project/index.d.ts +1 -1
  258. package/dist/project/install-command.d.ts +6 -0
  259. package/dist/project/install-command.js +9 -0
  260. package/dist/project/project.d.ts +10 -8
  261. package/dist/testing/dataset/define.d.ts +1 -1
  262. package/dist/testing/load.js +1 -1
  263. package/dist/tooling/cli/adapter-command.d.ts +35 -0
  264. package/dist/tooling/cli/adapter-command.js +66 -0
  265. package/dist/tooling/cli/arguments.d.ts +17 -6
  266. package/dist/tooling/cli/arguments.js +175 -52
  267. package/dist/tooling/cli/build.d.ts +55 -0
  268. package/dist/tooling/cli/build.js +77 -0
  269. package/dist/tooling/cli/bun.d.ts +0 -1
  270. package/dist/tooling/cli/bun.js +0 -7
  271. package/dist/tooling/cli/commit.d.ts +35 -0
  272. package/dist/tooling/cli/commit.js +235 -0
  273. package/dist/tooling/cli/deploy-mode.d.ts +26 -0
  274. package/dist/tooling/cli/deploy-mode.js +59 -0
  275. package/dist/tooling/cli/deploy-result.d.ts +80 -0
  276. package/dist/tooling/cli/deploy-result.js +64 -0
  277. package/dist/tooling/cli/diff/declared.d.ts +7 -0
  278. package/dist/tooling/cli/diff/declared.js +27 -0
  279. package/dist/tooling/cli/diff/index.d.ts +30 -0
  280. package/dist/tooling/cli/diff/index.js +58 -0
  281. package/dist/tooling/cli/diff/render.d.ts +15 -0
  282. package/dist/tooling/cli/diff/render.js +131 -0
  283. package/dist/tooling/cli/diff/report.d.ts +88 -0
  284. package/dist/tooling/cli/diff/report.js +154 -0
  285. package/dist/tooling/cli/dotenv.d.ts +2 -2
  286. package/dist/tooling/cli/dotenv.js +3 -33
  287. package/dist/tooling/cli/help.js +173 -60
  288. package/dist/tooling/cli/immutable-deployment.d.ts +83 -0
  289. package/dist/tooling/cli/immutable-deployment.js +135 -0
  290. package/dist/tooling/cli/index.d.ts +12 -4
  291. package/dist/tooling/cli/index.js +6 -3
  292. package/dist/tooling/cli/installed-on.d.ts +83 -0
  293. package/dist/tooling/cli/installed-on.js +156 -0
  294. package/dist/tooling/cli/list.d.ts +152 -0
  295. package/dist/tooling/cli/list.js +331 -0
  296. package/dist/tooling/cli/log.d.ts +5 -0
  297. package/dist/tooling/cli/log.js +9 -0
  298. package/dist/tooling/cli/orchestrate.d.ts +0 -6
  299. package/dist/tooling/cli/orchestrate.js +246 -90
  300. package/dist/tooling/cli/project.d.ts +3 -3
  301. package/dist/tooling/cli/publish/index.d.ts +81 -0
  302. package/dist/tooling/cli/publish/index.js +383 -0
  303. package/dist/tooling/cli/publish/report.d.ts +49 -0
  304. package/dist/tooling/cli/publish/report.js +15 -0
  305. package/dist/tooling/cli/registry/client.d.ts +121 -0
  306. package/dist/tooling/cli/registry/client.js +354 -0
  307. package/dist/tooling/cli/registry/error.d.ts +11 -0
  308. package/dist/tooling/cli/registry/error.js +17 -0
  309. package/dist/tooling/cli/registry/executable.d.ts +35 -0
  310. package/dist/tooling/cli/registry/executable.js +96 -0
  311. package/dist/tooling/cli/registry/index.d.ts +9 -0
  312. package/dist/tooling/cli/registry/index.js +8 -0
  313. package/dist/tooling/cli/registry/installations.d.ts +67 -0
  314. package/dist/tooling/cli/registry/installations.js +108 -0
  315. package/dist/tooling/cli/registry/process.d.ts +36 -0
  316. package/dist/tooling/cli/registry/process.js +119 -0
  317. package/dist/tooling/cli/secrets.d.ts +9 -0
  318. package/dist/tooling/cli/secrets.js +19 -0
  319. package/dist/tooling/cli/yank.d.ts +34 -0
  320. package/dist/tooling/cli/yank.js +32 -0
  321. package/dist/tooling/linter/implementations/source/callable-requirements.d.ts +1 -1
  322. package/dist/tooling/linter/implementations/source/callable-requirements.js +10 -10
  323. package/dist/tooling/linter/implementations/source/dependencies.js +12 -10
  324. package/dist/tooling/linter/implementations/source/global.js +1 -2
  325. package/dist/tooling/linter/implementations/source/mutations.js +17 -17
  326. package/dist/tooling/linter/implementations/source/providers.js +5 -5
  327. package/dist/tooling/linter/implementations/source/verifiers.js +0 -2
  328. package/dist/tooling/linter/implementations/source/views.js +2 -2
  329. package/dist/tooling/linter/policy/generated.js +14 -63
  330. package/dist/tooling/linter/requirements/registry.js +1 -6
  331. package/dist/tooling/packaging/declarations/ownership.js +1 -1
  332. package/dist/tooling/packaging/finalize.d.ts +1 -1
  333. package/dist/tooling/packaging/finalize.js +1 -1
  334. package/package.json +39 -13
  335. package/dist/application/application.d.ts +0 -28
  336. package/dist/application/query/execution/projection.d.ts +0 -3
  337. package/dist/application/query/execution/projection.js +0 -3
  338. package/dist/deployment/adapter/deploy/context.d.ts +0 -15
  339. package/dist/deployment/adapter/deploy/index.d.ts +0 -2
  340. package/dist/deployment/adapter/deploy/result.d.ts +0 -50
  341. package/dist/deployment/adapter/prepare/artifact.d.ts +0 -33
  342. package/dist/deployment/adapter/prepare/context.d.ts +0 -23
  343. package/dist/deployment/adapter/prepare/index.d.ts +0 -2
  344. package/dist/deployment/deploy.d.ts +0 -20
  345. package/dist/deployment/deploy.js +0 -31
  346. package/dist/deployment/release/publication/index.d.ts +0 -6
  347. package/dist/deployment/release/publication/index.js +0 -6
  348. package/dist/deployment/release/publication/manifest.d.ts +0 -3
  349. package/dist/deployment/release/publication/manifest.js +0 -5
  350. package/dist/deployment/release/publication/requirements.d.ts +0 -3
  351. package/dist/deployment/release/publication/requirements.js +0 -3
  352. package/dist/deployment/release/publication/seal.d.ts +0 -10
  353. package/dist/deployment/release/publication/seal.js +0 -39
  354. package/dist/deployment/verify/preflight/artifact.d.ts +0 -6
  355. package/dist/deployment/verify/preflight/artifact.js +0 -122
  356. package/dist/deployment/verify/preflight/publication.d.ts +0 -4
  357. package/dist/deployment/verify/preflight/publication.js +0 -14
  358. package/dist/deployment/verify/readiness/deployment.d.ts +0 -3
  359. package/dist/deployment/verify/readiness/deployment.js +0 -151
  360. package/dist/deployment/verify/readiness/publication.d.ts +0 -11
  361. package/dist/deployment/verify/readiness/publication.js +0 -41
  362. package/dist/execution/service/errors.d.ts +0 -3
  363. package/dist/execution/service/errors.js +0 -3
  364. package/dist/execution/service/publication/delivery.d.ts +0 -2
  365. package/dist/execution/service/publication/installation.d.ts +0 -3
  366. package/dist/execution/service/publication/installation.js +0 -8
  367. package/dist/execution/service/publication/source.d.ts +0 -3
  368. package/dist/execution/service/publication/source.js +0 -11
  369. package/dist/platform/publication/index.d.ts +0 -2
  370. package/dist/platform/publication/index.js +0 -2
  371. package/dist/tooling/cli/astrale/authority.d.ts +0 -5
  372. package/dist/tooling/cli/astrale/authority.js +0 -11
  373. package/dist/tooling/cli/astrale/executable.d.ts +0 -2
  374. package/dist/tooling/cli/astrale/executable.js +0 -47
  375. package/dist/tooling/cli/astrale/failure.d.ts +0 -6
  376. package/dist/tooling/cli/astrale/failure.js +0 -48
  377. package/dist/tooling/cli/astrale/instance.d.ts +0 -11
  378. package/dist/tooling/cli/astrale/instance.js +0 -52
  379. package/dist/tooling/cli/astrale/process.d.ts +0 -13
  380. package/dist/tooling/cli/astrale/process.js +0 -94
  381. package/dist/tooling/cli/astrale/version.d.ts +0 -18
  382. package/dist/tooling/cli/astrale/version.js +0 -55
  383. package/dist/tooling/cli/credential.d.ts +0 -2
  384. package/dist/tooling/cli/credential.js +0 -57
  385. package/dist/tooling/cli/deprecations.d.ts +0 -9
  386. package/dist/tooling/cli/deprecations.js +0 -15
  387. package/dist/tooling/cli/development/candidate.d.ts +0 -25
  388. package/dist/tooling/cli/development/candidate.js +0 -176
  389. package/dist/tooling/cli/development/deployment.d.ts +0 -16
  390. package/dist/tooling/cli/development/deployment.js +0 -39
  391. package/dist/tooling/cli/development/develop.d.ts +0 -11
  392. package/dist/tooling/cli/development/develop.js +0 -243
  393. package/dist/tooling/cli/development/lease.d.ts +0 -18
  394. package/dist/tooling/cli/development/lease.js +0 -163
  395. package/dist/tooling/cli/development/lifecycle.d.ts +0 -9
  396. package/dist/tooling/cli/development/lifecycle.js +0 -43
  397. package/dist/tooling/cli/development/project-imports.d.ts +0 -22
  398. package/dist/tooling/cli/development/project-imports.js +0 -39
  399. package/dist/tooling/cli/development/project-lock.d.ts +0 -16
  400. package/dist/tooling/cli/development/project-lock.js +0 -41
  401. package/dist/tooling/cli/development/rebuild.d.ts +0 -13
  402. package/dist/tooling/cli/development/rebuild.js +0 -58
  403. package/dist/tooling/cli/development/release-evidence.d.ts +0 -4
  404. package/dist/tooling/cli/development/release-evidence.js +0 -10
  405. package/dist/tooling/cli/development/report.d.ts +0 -6
  406. package/dist/tooling/cli/development/report.js +0 -14
  407. package/dist/tooling/cli/development/session-file.d.ts +0 -53
  408. package/dist/tooling/cli/development/session-file.js +0 -337
  409. package/dist/tooling/cli/development/source-watch.d.ts +0 -14
  410. package/dist/tooling/cli/development/source-watch.js +0 -140
  411. package/dist/tooling/cli/development/sources.d.ts +0 -7
  412. package/dist/tooling/cli/development/sources.js +0 -48
  413. package/dist/tooling/cli/development/target-lock.d.ts +0 -16
  414. package/dist/tooling/cli/development/target-lock.js +0 -68
  415. package/dist/tooling/cli/development/view.d.ts +0 -28
  416. package/dist/tooling/cli/development/view.js +0 -151
  417. package/dist/tooling/cli/environment-release.d.ts +0 -21
  418. package/dist/tooling/cli/environment-release.js +0 -46
  419. package/dist/tooling/cli/evidence.d.ts +0 -11
  420. package/dist/tooling/cli/evidence.js +0 -53
  421. package/dist/tooling/cli/installation/index.d.ts +0 -2
  422. package/dist/tooling/cli/installation/index.js +0 -1
  423. package/dist/tooling/cli/installation/observation.d.ts +0 -10
  424. package/dist/tooling/cli/installation/observation.js +0 -44
  425. package/dist/tooling/cli/installation/reconcile.d.ts +0 -32
  426. package/dist/tooling/cli/installation/reconcile.js +0 -122
  427. package/dist/tooling/linter/implementations/source/migrations.d.ts +0 -2
  428. package/dist/tooling/linter/implementations/source/migrations.js +0 -113
  429. package/dist/tooling/linter/qualification/index.d.ts +0 -10
  430. package/dist/tooling/linter/qualification/index.js +0 -2
  431. package/dist/tooling/linter/qualification/query-fixtures.d.ts +0 -2
  432. package/dist/tooling/linter/qualification/query-fixtures.js +0 -68
  433. package/dist/tooling/linter/qualification/runner.d.ts +0 -3
  434. package/dist/tooling/linter/qualification/runner.js +0 -6
  435. /package/dist/application/{application.js → domain.js} +0 -0
  436. /package/dist/{deployment/adapter/deploy/context.js → application/workflow/durable.js} +0 -0
  437. /package/dist/deployment/adapter/{deploy/index.js → bundle/bundle.js} +0 -0
  438. /package/dist/deployment/adapter/{deploy/result.js → bundle/file.js} +0 -0
  439. /package/dist/deployment/adapter/{prepare → bundle}/index.js +0 -0
  440. /package/dist/deployment/adapter/{prepare/artifact.js → release/command.js} +0 -0
  441. /package/dist/deployment/adapter/{prepare → release}/context.js +0 -0
  442. /package/dist/deployment/release/{publication → served}/routes.d.ts +0 -0
  443. /package/dist/deployment/release/{publication → served}/routes.js +0 -0
  444. /package/dist/execution/service/{publication → serving}/index.js +0 -0
@@ -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,24 +14,31 @@ 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.
33
+ <adapter> <command> <environment>
34
+ Run a command the Environment's adapter declares for its provider,
35
+ such as cloudflare plan production or cloudflare init production.
28
36
 
29
37
  Options:
30
38
  -h, --help Show help.
31
39
 
32
- Run "astrale-domain <command> --help" for command-specific help.
40
+ Run "astrale-domain <command> --help" for command-specific help. An adapter command that
41
+ does not exist names the commands and options the Environment's adapter declares.
33
42
  `;
34
43
  const COMMAND_HELP = Object.freeze({
35
44
  upgrade: `Update existing Astrale dependencies in a pnpm project or workspace.
@@ -51,88 +60,170 @@ Behavior:
51
60
  unchanged with a warning.
52
61
  Local links, catalogs, aliases, peers, and overrides are not rewritten.
53
62
  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.
63
+ Review changes and run your project's checks afterwards. Failed installations leave
64
+ local changes available for repair.
56
65
  For an older SDK without this command: pnpm dlx @astrale-os/sdk@beta upgrade.
57
66
  `,
58
- dev: `Build, verify, remotely deploy, and watch one Project Environment.
67
+ build: `Build and verify a Domain without deploying it, and print its build digest.
59
68
 
60
69
  Usage:
61
- astrale-domain dev [environment] [options]
70
+ astrale-domain build [--json]
71
+
72
+ Options:
73
+ --json Print one BuildResultV1 document on stdout.
74
+ -h, --help Show help for build.
75
+
76
+ Behavior:
77
+ Compiles the Domain and verifies that the conventional or configured Runtime
78
+ module exports the exact Runtime owned by it. Then bundles it once per distinct
79
+ bundler of the Project's adapters and prints each build digest: the hash of the
80
+ produced modules, assets, Schema and requirements. It does not select an Environment,
81
+ load secrets, deploy, or install the Domain, so every Environment whose adapter
82
+ shares a bundler deploys the code of that one digest.
83
+ `,
84
+ deploy: `Build, verify, and deploy a Domain through its configured adapter.
85
+
86
+ Usage:
87
+ astrale-domain deploy <environment> [--json]
88
+ astrale-domain deploy --environment <name> [--json]
62
89
 
63
90
  Arguments:
64
- environment Project Environment name; defaults to development.
91
+ environment Required adapter environment key.
65
92
 
66
93
  Options:
67
94
  --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.
95
+ --json Print one DeployResultV1 on stdout; progress goes to stderr.
96
+ --as <identity> Select the Astrale identity for the adapter's provider calls.
97
+ -h, --help Show help for deploy.
78
98
 
79
99
  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.
100
+ Builds and verifies the Domain and Runtime, rebuilds the Bundle exactly as build
101
+ does, loads declared secrets, and deploys through the selected adapter. It never
102
+ installs the Domain: install the URL it prints with
103
+ ${installCommand()}.
104
+ Each Environment deploys one immutable release through configure, placement and
105
+ deployRelease. The SDK seals the release at the deployment URL and records the
106
+ source commit. Its adapter creates that deployment or reuses it. A new deployment
107
+ binds the Environment's current secrets; reuse updates only that deployment's
108
+ secrets. Cloudflare requires a dispatch namespace; astrale() uses Admin's Services.
109
+ With --json, stdout holds only one DeployResultV1: the deployment's URL, which
110
+ astrale domain install takes, its digests, adapter and state. Exit status: 0 deployed,
111
+ 1 failed or refused, 2 usage error; a failed run prints nothing on stdout.
102
112
  `,
103
- build: `Build and verify a Domain without deploying it.
113
+ list: `List the deployments of the Project's Environments, their versions and where they run.
104
114
 
105
115
  Usage:
106
- astrale-domain build
116
+ astrale-domain list [--environment <name>] [--instance <name>]... [--json]
107
117
 
108
118
  Options:
109
- -h, --help Show help for build.
119
+ --environment <name> List one Environment instead of every Environment.
120
+ --instance <name> Ask this instance what it runs, for INSTALLED ON (repeatable).
121
+ --json Print one ListResultV1 on stdout; notices go to stderr.
122
+ --as <identity> Select the Astrale identity for the hosts, the registry and the
123
+ instances.
124
+ -h, --help Show help for list.
110
125
 
111
126
  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.
127
+ Asks the adapter of each Environment that deploys immutable deployments for the
128
+ deployments its host keeps for the caller, and prints each one's release, its version
129
+ or name, Environment and state, the instances it is installed on, and the URL ${installCommand()} takes.
130
+ A deployment is named by the registry's version of its release (1.5.0) or of its build
131
+ (1.5.0 · staging), else from its record's commit, such as 1.4.2 + 7 commits · a1b2c3d ·
132
+ staging. Names are computed, never stored, and printed whole.
133
+ INSTALLED ON names each --instance whose Kernel pins the deployment. ? marks what is
134
+ unknown: no instance was asked, an instance could not tell (such as one whose Kernel
135
+ does not list installed releases), or its listing shows only what you can read there;
136
+ stderr says which and why. An unknown instance is never shown as running nothing; —
137
+ means every instance asked listed all it runs and none runs it.
138
+ The registry and the instances are read through the Astrale CLI (${MINIMUM_INSTALLATIONS_CLI_VERSION} or
139
+ newer) with the caller's identity, only once a deployment is listed.
140
+ A registry that cannot be read fails the listing; an unknown instance never does.
141
+ Admin's Services and a Cloudflare dispatch namespace keep deployments until their
142
+ owner retires them.
143
+ Listing changes nothing, at any host, registry or instance.
144
+ An Environment refused by deploy, or whose adapter lists no
145
+ deployments is reported on stderr and, with --json, under unlisted. A deployment
146
+ whose record this SDK does not admit is still listed, from what its host knows.
147
+ With --json, each deployment carries its installedOn and its call target: the path of
148
+ its node on Admin's Services, for astrale call "<path>.method.setSecret" --admin, or the
149
+ namespace and script of a dispatch namespace, which the hosting kit
150
+ (@astrale-os/adapter-cloudflare/hosting) retires; installations says what of
151
+ INSTALLED ON is unknown.
152
+ Exit status: 0 listed, 1 a host or the registry could not be read (with --json,
153
+ nothing on stdout), 2 usage error.
115
154
  `,
116
- deploy: `Build, verify, and deploy a Domain through its configured adapter.
155
+ diff: `Show the changes since the last published version and the version they require.
156
+
157
+ Usage:
158
+ astrale-domain diff [--as <identity>] [--json]
159
+
160
+ Options:
161
+ --as <identity> Select the Astrale identity that reads the Domain registry.
162
+ --json Print one DiffReportV1 on stdout; the summary goes to stderr.
163
+ -h, --help Show help for diff.
164
+
165
+ Behavior:
166
+ Reads the declared version from package.json and compares the Domain with the
167
+ highest published stable version up to it, yanked versions included. The level
168
+ the changes require is a floor: removing or changing a member is major, adding
169
+ one minor, anything else (code, descriptions) patch; below 1.0.0 a breaking
170
+ change raises the minor. Callable authorization is outside the floor: raise the
171
+ version yourself when you narrow it.
172
+ When package.json still names a published version, as on a feature branch, the
173
+ report is informational and exits 0. Otherwise the declared version must reach
174
+ the minimum: a version that is too low exits 1 and names what requires more, as
175
+ on a release PR, where Release-As: 2.0.0 or a feat!: commit raises the number.
176
+ Nothing to compare (no published stable version, or a Domain absent from the
177
+ registry or not readable by the caller) exits 0.
178
+ Reads the registry through the Astrale CLI (domain versions) with the caller's
179
+ own credential, and the stored bundle of the compared version only when its
180
+ Schema differs. Builds the Domain when the Schema is unchanged, to compare build
181
+ digests. Deploys, publishes and installs nothing.
182
+ Exit status: 0 accepted, published or nothing to compare; 1 too low or failed
183
+ (with --json, a failure prints nothing on stdout); 2 usage error.
184
+ `,
185
+ publish: `Deploy one Environment, verify it, and publish the version package.json declares.
117
186
 
118
187
  Usage:
119
- astrale-domain deploy <environment>
120
- astrale-domain deploy --environment <name>
188
+ astrale-domain publish <environment> [--allow-dirty] [--as <identity>] [--json]
121
189
 
122
190
  Arguments:
123
- environment Required adapter environment key.
191
+ environment Required adapter environment key, usually production.
124
192
 
125
193
  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.
194
+ --allow-dirty Publish from a working tree with changes, or outside git; the
195
+ Publication is marked dirty.
196
+ --as <identity> Select the Astrale identity that reads and writes the Domain
197
+ registry and deploys.
198
+ --json Print one PublishReportV1 on stdout; progress goes to stderr.
199
+ -h, --help Show help for publish.
130
200
 
131
201
  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.
202
+ Names one immutable deployment's release with the version in package.json, in
203
+ this order, deploying only once the registry allows the version:
204
+ 1. Before any effect: refuses an Environment that does not deploy immutable
205
+ deployments, a working tree with changes or no git commit (unless
206
+ --allow-dirty), and warns when no remote branch holds the commit; then builds,
207
+ freezes the configuration, places the deployment and seals its release.
208
+ 2. Reads the version from package.json and the registry through the Astrale CLI.
209
+ A version already published with this release succeeds without effect; with
210
+ another release it is refused: a published version never changes.
211
+ 3. Compares with the highest stable version below it, yanked versions included,
212
+ as diff does, and refuses a version that is too low.
213
+ 4. Deploys the release, or reuses its deployment, as deploy does.
214
+ 5. Verifies that the deployment serves the sealed release, within 60 seconds.
215
+ 6. Asks Admin for the Publication, which Admin creates under the Domain's lock. A
216
+ version published meanwhile with another release is refused, and this
217
+ deployment stays a preview. On a platform dispatch namespace the published
218
+ deployment is then kept from expiry; Admin keeps those of its Services itself.
219
+ A failure leaves at most a deployment without a version, and says whether a rerun
220
+ can help: when it can, rerun publish, which reuses it; a refusal Admin repeats
221
+ (a missing domain_admin right, a release it will not name) names its cause.
222
+ Admin unavailable or the Domain absent from the registry: nothing is deployed.
223
+ It never installs the Domain: install the URL it prints with
224
+ ${installCommand()}.
225
+ Exit status: 0 published or already published; 1 refused or failed (with --json,
226
+ a failure prints nothing on stdout); 2 usage error.
136
227
  `,
137
228
  test: `Run Project tests locally or against one selected Environment.
138
229
 
@@ -160,6 +251,28 @@ Options:
160
251
  --fix Apply supported fixes.
161
252
  --format <format> Select stylish or json output (default: stylish).
162
253
  -h, --help Show help for lint.
254
+ `,
255
+ yank: `Take one published version of the Domain out of resolution, or put it back.
256
+
257
+ Usage:
258
+ astrale-domain yank <version> [--undo] [--json]
259
+
260
+ Arguments:
261
+ version One published version of this Project's Domain, e.g. 1.5.0.
262
+
263
+ Options:
264
+ --undo Let line references choose the version again.
265
+ --json Print one YankReportV1 on stdout.
266
+ -h, --help Show help for yank.
267
+
268
+ Behavior:
269
+ Changes the version in the Admin registry through the Astrale CLI, with its configured
270
+ Admin target and identity; yanking requires administering the Domain. A line reference
271
+ such as @1.5 never chooses a yanked version, and an exact reference installs it with a
272
+ warning. Installations keep running and the deployment keeps serving: yanking only
273
+ changes resolution. A version already in the requested state answers unchanged, so a
274
+ rerun is safe. Exit status: 0 done, 1 refused or failed, 2 usage error; a refused or
275
+ failed run prints nothing on stdout.
163
276
  `,
164
277
  package: `Prepare public TypeScript declarations for package publication.
165
278
 
@@ -0,0 +1,83 @@
1
+ import type { DeploymentCommitV1, DeploymentConfiguration } from '../../deployment/address/index.js';
2
+ import type { Adapter, Build, Bundle, 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: DeploymentConfiguration;
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>;
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>;
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,8 @@
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, and the
4
+ * provider commands adapters declare), its JSON results, the deploy mode each command selects for an Environment (CT33), and the explicit
5
+ * dotenv boundary.
5
6
  *
6
7
  * Node-only: the CLI imports `node:fs`/`node:module`/`node:url` and runs under
7
8
  * Bun (it imports the project's `astrale.config.ts` directly). This subpath is
@@ -11,6 +12,13 @@
11
12
  * The bin lives at `./bin`.
12
13
  */
13
14
  export { run } from './run.js';
15
+ export type { BuildResultV1 } from './build.js';
16
+ export type { DeployResultV1, DeploymentSecretsState } from './deploy-result.js';
17
+ export type { DiffChangeV1, DiffReportV1 } from './diff/index.js';
18
+ export type { AdapterCommandReportV1 } from './adapter-command.js';
19
+ export type { InstallationSourcesV1, InstallationUnknownReason, InstalledOnV1, InstanceSourceV1, ListedDeploymentV1, ListResultV1, UnlistedEnvironmentV1, } from './list.js';
20
+ export type { PublishReportV1 } from './publish/index.js';
21
+ export type { YankReportV1 } from './yank.js';
22
+ export { selectDeployMode } from './deploy-mode.js';
23
+ export type { DeployMode, DeployModeCommand, DeployRefusal } from './deploy-mode.js';
14
24
  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,8 @@
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, and the
4
+ * provider commands adapters declare), its JSON results, the deploy mode each command selects for an Environment (CT33), and the explicit
5
+ * dotenv boundary.
5
6
  *
6
7
  * Node-only: the CLI imports `node:fs`/`node:module`/`node:url` and runs under
7
8
  * Bun (it imports the project's `astrale.config.ts` directly). This subpath is
@@ -11,5 +12,7 @@
11
12
  * The bin lives at `./bin`.
12
13
  */
13
14
  export { run } from './run.js';
15
+ // The domain-publish Action asks the selection `publish` makes before it runs it, to skip an
16
+ // Environment that is not canonical with a notice instead of failing on its refusal.
17
+ export { selectDeployMode } from './deploy-mode.js';
14
18
  export { loadDeclaredSecrets } from './dotenv.js';
15
- export { DEVELOPMENT_SESSION_FILE_VERSION, acceptDevelopmentSessionFileV1, } from './development/session-file.js';
@@ -0,0 +1,83 @@
1
+ import type { DomainRegistry, InstallationUnknownReason, InstanceInstallation } from './registry/index.js';
2
+ /**
3
+ * One instance known to pin a deployment (INSTALLÉ SUR, DX [.83795]): an instance named with
4
+ * `--instance`, as its Kernel lists it (CT24). Admin does not say which instances pin a release
5
+ * (A15 is deferred, AM-241), so an instance is known only when it is asked.
6
+ */
7
+ export interface InstalledOnV1 {
8
+ readonly source: 'instance';
9
+ /** The instance as `--instance` named it. */
10
+ readonly instance: string;
11
+ /** The instance Kernel URL that answered. */
12
+ readonly kernel: string;
13
+ }
14
+ /**
15
+ * Where INSTALLÉ SUR comes from and what of it is unknown. An instance whose installations are
16
+ * unknown is partial, never "not installed" (AM-198); an instance is known only when `--instance`
17
+ * names it ([.59528], AM-241).
18
+ */
19
+ export interface InstallationSourcesV1 {
20
+ /**
21
+ * True when an instance may run a deployment that no source names: an `--instance` that could
22
+ * not say or whose listing is itself partial (a Kernel lists only what the caller reads, AM-83,
23
+ * AM-84), or no `--instance` at all. False only when every `--instance` listed all it runs.
24
+ */
25
+ readonly partial: boolean;
26
+ /** One entry per distinct `--instance`, in argument order. */
27
+ readonly instances: readonly InstanceSourceV1[];
28
+ }
29
+ /**
30
+ * One `--instance`: what its Kernel answered, why that is unknown, or that it was not asked. A
31
+ * `read` listing names the deployments it pins; with `partial` (always, from C7) one it does not
32
+ * name may still run there.
33
+ */
34
+ export type InstanceSourceV1 = {
35
+ readonly instance: string;
36
+ readonly state: 'read';
37
+ readonly kernel: string;
38
+ readonly partial: boolean;
39
+ } | {
40
+ readonly instance: string;
41
+ readonly state: 'unknown';
42
+ readonly reason: InstallationUnknownReason;
43
+ readonly code: string;
44
+ } | {
45
+ readonly instance: string;
46
+ readonly state: 'skipped';
47
+ };
48
+ /** What the sources answered, kept to join each listed deployment to the instances that pin it. */
49
+ export interface InstallationsRead {
50
+ readonly sources: InstallationSourcesV1;
51
+ readonly instances: readonly {
52
+ readonly instance: string;
53
+ readonly kernel: string;
54
+ readonly installations: readonly InstanceInstallation[];
55
+ }[];
56
+ }
57
+ /** Nothing was listed: no source is asked. */
58
+ export declare function skippedInstallations(instances: readonly string[]): InstallationsRead;
59
+ /**
60
+ * Ask every `--instance` whether it pins a deployment of the origin. An instance that cannot tell
61
+ * is recorded as unknown, with why, and the listing stays partial for it (AM-198); a refusal's
62
+ * message is never relayed, only its code. Only a stop of `signal`, the one every registry read
63
+ * follows, fails it: an interrupted listing is never printed as a partial one.
64
+ */
65
+ export declare function readInstallations(registry: Pick<DomainRegistry, 'instance'>, origin: string, instances: readonly string[], signal: AbortSignal): Promise<InstallationsRead>;
66
+ /**
67
+ * The instances known to pin the deployment served at `url`: an installation whose Kernel lists
68
+ * its pin under that deployment URL runs that deployment, since one immutable deployment has one
69
+ * URL. In `--instance` argument order.
70
+ */
71
+ export declare function installedOn(url: string, read: InstallationsRead): readonly InstalledOnV1[];
72
+ /**
73
+ * The INSTALLED ON cell: the instances known to pin the deployment, then `?` when an instance may
74
+ * run it unnamed (the notices say which); `—` only when every `--instance` listed all it runs and
75
+ * none pins it.
76
+ */
77
+ export declare function installedOnCell(installed: readonly InstalledOnV1[], sources: InstallationSourcesV1): string;
78
+ /**
79
+ * One line for stderr per source that could not tell, or one when no instance was asked: an
80
+ * unknown instance is partial, never "not installed" (AM-198). Only codes the CLI reported are
81
+ * named, never its messages.
82
+ */
83
+ export declare function installationNotices(sources: InstallationSourcesV1): readonly string[];