@astrale-os/cli 1.0.0-beta.3 → 1.0.0-beta.31

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 (345) hide show
  1. package/README.md +84 -6
  2. package/dist/astrale.js +57586 -60753
  3. package/dist/public/connect-core.js +2158 -30706
  4. package/dist/public/keys/index.js +1016 -29541
  5. package/dist/public/paths/index.js +370 -28654
  6. package/dist/types/admin/contract.d.ts +26 -0
  7. package/dist/types/admin/instance/client.d.ts +20 -0
  8. package/dist/types/admin/instance/index.d.ts +2 -0
  9. package/dist/types/admin/instance/model.d.ts +6 -10
  10. package/dist/types/connection/auth.d.ts +3 -0
  11. package/dist/types/connection/call.d.ts +3 -0
  12. package/dist/types/connection/command.d.ts +27 -0
  13. package/dist/types/connection/credential.d.ts +14 -0
  14. package/dist/types/connection/errors.d.ts +1 -0
  15. package/dist/types/connection/exchange.d.ts +9 -0
  16. package/dist/types/connection/failure/classify.d.ts +2 -0
  17. package/dist/types/connection/failure/index.d.ts +5 -0
  18. package/dist/types/connection/failure/model.d.ts +25 -0
  19. package/dist/types/connection/failure/render.d.ts +3 -0
  20. package/dist/types/connection/index.d.ts +8 -0
  21. package/dist/types/connection/reasons.d.ts +37 -0
  22. package/dist/types/connection/self.d.ts +37 -0
  23. package/dist/types/connection/session.d.ts +31 -0
  24. package/dist/types/connection/target.d.ts +38 -0
  25. package/dist/types/errors.d.ts +1 -1
  26. package/dist/types/lib/admin-instance.d.ts +17 -0
  27. package/dist/types/lib/admin-target.d.ts +11 -36
  28. package/dist/types/lib/config.d.ts +13 -59
  29. package/dist/types/lib/failure-debug.d.ts +1 -0
  30. package/dist/types/lib/idp.d.ts +25 -173
  31. package/dist/types/lib/instance-target.d.ts +1 -1
  32. package/dist/types/lib/instance.d.ts +30 -88
  33. package/dist/types/lib/log.d.ts +5 -3
  34. package/dist/types/lib/output.d.ts +1 -1
  35. package/dist/types/lib/proc.d.ts +43 -0
  36. package/dist/types/lib/self.d.ts +9 -0
  37. package/dist/types/lib/update.d.ts +109 -0
  38. package/dist/types/lib/validation.d.ts +4 -1
  39. package/dist/types/state/exchange-credentials.d.ts +6 -2
  40. package/dist/types/state/files.d.ts +2 -0
  41. package/dist/types/state/index.d.ts +3 -2
  42. package/dist/types/state/paths.d.ts +2 -0
  43. package/dist/types/state/session-routes.d.ts +10 -0
  44. package/package.json +16 -19
  45. package/src/__tests__/fixtures/publication.ts +20 -0
  46. package/src/admin/.spec/architecture.md +12 -5
  47. package/src/admin/__tests__/fixture.ts +25 -0
  48. package/src/admin/catalog/.spec/api.d.ts +1 -3
  49. package/src/admin/catalog/.spec/architecture.md +5 -4
  50. package/src/admin/catalog/__tests__/client.test.ts +143 -69
  51. package/src/admin/catalog/client.ts +40 -54
  52. package/src/admin/catalog/model.ts +3 -4
  53. package/src/admin/contract.ts +47 -0
  54. package/src/admin/graph/.spec/api.d.ts +4 -10
  55. package/src/admin/graph/nodes.ts +1 -1
  56. package/src/admin/instance/.spec/api.d.ts +5 -9
  57. package/src/admin/instance/.spec/architecture.md +7 -7
  58. package/src/admin/instance/__tests__/client.test.ts +157 -175
  59. package/src/admin/instance/client.ts +39 -128
  60. package/src/admin/instance/index.ts +1 -2
  61. package/src/admin/instance/model.ts +12 -18
  62. package/src/commands/__tests__/admin-instance.test.ts +11 -8
  63. package/src/commands/__tests__/call-describe.test.ts +46 -33
  64. package/src/commands/__tests__/call.test.ts +34 -0
  65. package/src/commands/__tests__/domain-install-operation.test.ts +30 -22
  66. package/src/commands/__tests__/domain-install-owned.test.ts +1 -1
  67. package/src/commands/__tests__/domain-list.test.ts +5 -25
  68. package/src/commands/__tests__/install-direct.test.ts +115 -8
  69. package/src/commands/__tests__/install-identity-override.test.ts +6 -17
  70. package/src/commands/__tests__/instance-list-rows.test.ts +1 -1
  71. package/src/commands/__tests__/instance-status.test.ts +139 -0
  72. package/src/commands/__tests__/introspect-parse.test.ts +80 -1
  73. package/src/commands/__tests__/logs.test.ts +250 -2
  74. package/src/commands/__tests__/read-commands.test.ts +119 -11
  75. package/src/commands/__tests__/token-ttl.test.ts +49 -4
  76. package/src/commands/__tests__/update.test.ts +25 -3
  77. package/src/commands/__tests__/view.test.ts +50 -2
  78. package/src/commands/auth/logout.ts +2 -1
  79. package/src/commands/browser.ts +29 -0
  80. package/src/commands/call-describe.ts +60 -68
  81. package/src/commands/call.ts +71 -59
  82. package/src/commands/domain/install.ts +73 -46
  83. package/src/commands/domain/list.ts +1 -1
  84. package/src/commands/domain/publish.ts +14 -11
  85. package/src/commands/domain/uninstall.ts +2 -2
  86. package/src/commands/get.ts +15 -16
  87. package/src/commands/identity/__tests__/register.test.ts +3 -3
  88. package/src/commands/identity/register.ts +8 -8
  89. package/src/commands/instance/create.ts +8 -16
  90. package/src/commands/instance/delete.ts +12 -9
  91. package/src/commands/instance/list.ts +2 -2
  92. package/src/commands/instance/status.ts +66 -20
  93. package/src/commands/instance/use.ts +16 -12
  94. package/src/commands/introspect.ts +53 -41
  95. package/src/commands/logs.ts +123 -36
  96. package/src/commands/mutate.ts +6 -5
  97. package/src/commands/query.ts +39 -36
  98. package/src/commands/session/analyze.ts +26 -4
  99. package/src/commands/token.ts +42 -27
  100. package/src/commands/ui/__tests__/commands.test.ts +152 -0
  101. package/src/commands/ui/add.ts +51 -0
  102. package/src/commands/ui/doctor.ts +21 -0
  103. package/src/commands/ui/init.ts +38 -0
  104. package/src/commands/ui/list.ts +26 -0
  105. package/src/commands/ui/preset-apply.ts +19 -0
  106. package/src/commands/ui/preset-list.ts +12 -0
  107. package/src/commands/ui/shared.ts +25 -0
  108. package/src/commands/update.ts +90 -48
  109. package/src/commands/view.ts +82 -37
  110. package/src/connection/.spec/api.d.ts +7 -8
  111. package/src/connection/.spec/architecture.md +14 -5
  112. package/src/connection/.spec/flows/session.ts +2 -2
  113. package/src/connection/.spec/laws/connection.ts +6 -2
  114. package/src/connection/.spec/layout.ts +1 -0
  115. package/src/connection/__tests__/auth.test.ts +1 -0
  116. package/src/connection/__tests__/credential.test.ts +21 -1
  117. package/src/connection/__tests__/errors.test.ts +27 -20
  118. package/src/connection/__tests__/exchange.test.ts +64 -11
  119. package/src/connection/__tests__/failure-fixtures.ts +39 -0
  120. package/src/connection/__tests__/failure-safety.test.ts +75 -0
  121. package/src/connection/__tests__/self.test.ts +31 -11
  122. package/src/connection/__tests__/session.test.ts +8 -4
  123. package/src/connection/__tests__/target.test.ts +2 -0
  124. package/src/connection/auth.ts +13 -0
  125. package/src/connection/call.ts +1 -1
  126. package/src/connection/credential.ts +2 -2
  127. package/src/connection/errors.ts +1 -355
  128. package/src/connection/exchange.ts +110 -61
  129. package/src/connection/failure/classify.ts +110 -0
  130. package/src/connection/failure/index.ts +18 -0
  131. package/src/connection/failure/model.ts +28 -0
  132. package/src/connection/failure/render.ts +116 -0
  133. package/src/connection/reasons.ts +16 -0
  134. package/src/connection/self.ts +39 -21
  135. package/src/connection/session.ts +27 -9
  136. package/src/errors.ts +3 -2
  137. package/src/graph/.spec/api.d.ts +13 -6
  138. package/src/graph/.spec/laws/documents.ts +7 -7
  139. package/src/graph/.spec/layout.ts +9 -1
  140. package/src/graph/__tests__/mutation.test.ts +2 -2
  141. package/src/graph/__tests__/query.test.ts +35 -9
  142. package/src/graph/class.ts +30 -0
  143. package/src/graph/index.ts +1 -0
  144. package/src/graph/query.ts +27 -40
  145. package/src/identity/.spec/api.d.ts +2 -2
  146. package/src/identity/__tests__/fixtures/registry-journey.ts +13 -1
  147. package/src/identity/__tests__/registration.test.ts +1 -1
  148. package/src/identity/__tests__/registry.test.ts +4 -0
  149. package/src/identity/registration.ts +3 -3
  150. package/src/identity/registry.ts +2 -0
  151. package/src/keys/__tests__/keys.test.ts +4 -0
  152. package/src/keys/credential.ts +1 -0
  153. package/src/lib/__tests__/admin-target.test.ts +12 -0
  154. package/src/lib/__tests__/binary.test.ts +16 -1
  155. package/src/lib/__tests__/browser-retention.test.ts +212 -0
  156. package/src/lib/__tests__/command-dx.test.ts +1 -1
  157. package/src/lib/__tests__/config.test.ts +27 -0
  158. package/src/lib/__tests__/domain-publication.test.ts +10 -16
  159. package/src/lib/__tests__/idp.test.ts +34 -4
  160. package/src/lib/__tests__/instance-candidates.test.ts +1 -3
  161. package/src/lib/__tests__/instance-target.test.ts +7 -39
  162. package/src/lib/__tests__/log-errors.test.ts +64 -0
  163. package/src/lib/__tests__/skills.test.ts +834 -0
  164. package/src/lib/__tests__/studio-server-deps.test.ts +1 -1
  165. package/src/lib/__tests__/update.test.ts +264 -11
  166. package/src/lib/__tests__/view-assets.test.ts +25 -0
  167. package/src/lib/__tests__/view-external-open-intent.test.ts +150 -0
  168. package/src/lib/__tests__/view-external-open-origins.test.ts +27 -0
  169. package/src/lib/__tests__/view-open-intent.test.ts +0 -2
  170. package/src/lib/__tests__/view-server.test.ts +26 -3
  171. package/src/lib/__tests__/view-session.test.ts +2 -1
  172. package/src/lib/admin-instance.ts +14 -8
  173. package/src/lib/admin-target.ts +21 -2
  174. package/src/lib/binary.ts +22 -5
  175. package/src/lib/browser-retention.ts +210 -0
  176. package/src/lib/command-dx.ts +9 -9
  177. package/src/lib/config.ts +12 -1
  178. package/src/lib/domain-publication.ts +9 -7
  179. package/src/lib/failure-debug.ts +26 -0
  180. package/src/lib/idp.ts +34 -3
  181. package/src/lib/instance-candidates.ts +2 -2
  182. package/src/lib/instance-target.ts +3 -14
  183. package/src/lib/instance.ts +16 -11
  184. package/src/lib/log.ts +16 -9
  185. package/src/lib/output.ts +1 -1
  186. package/src/lib/proc.ts +7 -2
  187. package/src/lib/provision-instance.ts +34 -57
  188. package/src/lib/skills/lock.ts +117 -0
  189. package/src/lib/skills/sync.ts +878 -0
  190. package/src/lib/skills.ts +1 -52
  191. package/src/lib/update.ts +298 -45
  192. package/src/lib/validation.ts +2 -2
  193. package/src/lib/view/assets.ts +11 -2
  194. package/src/lib/view/external-open-intent.ts +41 -0
  195. package/src/lib/view/external-open-origins.ts +37 -0
  196. package/src/lib/view/host-capabilities.ts +17 -0
  197. package/src/lib/view/resolve.ts +1 -1
  198. package/src/lib/view/server.ts +18 -3
  199. package/src/lib/view/session.ts +2 -0
  200. package/src/program/.spec/api.d.ts +1 -0
  201. package/src/program/__tests__/program.test.ts +201 -7
  202. package/src/program/argv.ts +14 -0
  203. package/src/program/build.ts +26 -4
  204. package/src/program/command.ts +1 -0
  205. package/src/program/index.ts +1 -0
  206. package/src/program/registry.ts +2 -1
  207. package/src/setup/__tests__/instance-step.test.ts +27 -10
  208. package/src/setup/steps/instance.ts +22 -15
  209. package/src/setup/steps/skills.ts +40 -38
  210. package/src/state/.spec/api.d.ts +21 -2
  211. package/src/state/.spec/architecture.md +18 -4
  212. package/src/state/.spec/layout.ts +1 -0
  213. package/src/state/__tests__/exchange-credentials.test.ts +88 -42
  214. package/src/state/__tests__/files.test.ts +24 -1
  215. package/src/state/__tests__/fixtures/session-route-process.ts +93 -0
  216. package/src/state/__tests__/paths.test.ts +1 -0
  217. package/src/state/__tests__/session-routes.test.ts +138 -0
  218. package/src/state/exchange-credentials.ts +22 -9
  219. package/src/state/files.ts +41 -0
  220. package/src/state/index.ts +3 -1
  221. package/src/state/paths.ts +3 -0
  222. package/src/state/session-routes.ts +34 -0
  223. package/src/telemetry/__tests__/analyze-log.test.ts +38 -0
  224. package/src/telemetry/__tests__/recorder.test.ts +1 -0
  225. package/src/telemetry/__tests__/retention.test.ts +267 -0
  226. package/src/telemetry/__tests__/settings.test.ts +102 -0
  227. package/src/telemetry/__tests__/store-scan.test.ts +128 -0
  228. package/src/telemetry/__tests__/trigger.test.ts +33 -4
  229. package/src/telemetry/analyze.ts +24 -2
  230. package/src/telemetry/recorder.ts +15 -4
  231. package/src/telemetry/retention.ts +176 -0
  232. package/src/telemetry/session.ts +18 -12
  233. package/src/telemetry/settings.ts +64 -11
  234. package/src/telemetry/store.ts +92 -9
  235. package/src/telemetry/trigger.ts +16 -28
  236. package/src/ui/.spec/api.d.ts +14 -0
  237. package/src/ui/.spec/architecture.md +14 -0
  238. package/src/ui/.spec/laws.ts +50 -0
  239. package/src/ui/.spec/layout.ts +16 -0
  240. package/src/ui/__tests__/ui.test.ts +1742 -0
  241. package/src/ui/index.ts +13 -0
  242. package/src/ui/lock.ts +89 -0
  243. package/src/ui/model.ts +83 -0
  244. package/src/ui/operations.ts +1044 -0
  245. package/src/ui/project.ts +333 -0
  246. package/src/ui/release.ts +398 -0
  247. package/src/ui/runner.ts +18 -0
  248. package/studio/client/dist/assets/elk-api-DjmKsHXc.js +1 -0
  249. package/studio/client/dist/assets/index-BFVFs_8x.js +81 -0
  250. package/studio/client/dist/assets/index-DuB9iUdu.css +2 -0
  251. package/studio/client/dist/assets/rolldown-runtime-Dd_uD5pT.js +1 -0
  252. package/studio/client/dist/assets/schema-studio--a0kX3QU.css +1 -0
  253. package/studio/client/dist/assets/schema-studio-DH6oEWME.js +8 -0
  254. package/studio/client/dist/index.html +4 -3
  255. package/studio/package.json +8 -14
  256. package/studio/server/agent/ask.test.ts +1 -1
  257. package/studio/server/agent/bridge/grant.test.ts +1 -1
  258. package/studio/server/agent/bridge/routes.test.ts +1 -1
  259. package/studio/server/agent/harness/claude/adapter.test.ts +15 -5
  260. package/studio/server/agent/harness/gateway/token.test.ts +1 -1
  261. package/studio/server/agent/harness/gateway/token.ts +3 -3
  262. package/studio/server/agent/prompts/anchors.test.ts +41 -32
  263. package/studio/server/agent/prompts/anchors.ts +23 -51
  264. package/studio/server/agent/prompts/system.test.ts +4 -4
  265. package/studio/server/agent/prompts/system.ts +5 -5
  266. package/studio/server/agent/routes.test.ts +1 -1
  267. package/studio/server/agent/run/coordinator.test.ts +1 -1
  268. package/studio/server/agent/run/preparation.ts +1 -1
  269. package/studio/server/api/canvas.ts +0 -1
  270. package/studio/server/api/context.ts +1 -1
  271. package/studio/server/api/deployment.ts +1 -1
  272. package/studio/server/api/views.ts +2 -2
  273. package/studio/server/api/workspace.ts +1 -1
  274. package/studio/server/api-agent-loadout.test.ts +1 -1
  275. package/studio/server/api.test.ts +1 -1
  276. package/studio/server/cache.test.ts +24 -18
  277. package/studio/server/cache.ts +10 -54
  278. package/studio/server/cli-consumers.test.ts +32 -4
  279. package/studio/server/cli.test.ts +2 -2
  280. package/studio/server/domain.test.ts +50 -68
  281. package/studio/server/domain.ts +82 -63
  282. package/studio/server/handoff/copy.ts +2 -2
  283. package/studio/server/index.ts +1 -1
  284. package/studio/server/instances/probe.test.ts +1 -1
  285. package/studio/server/introspect/anatomy/views/routes.ts +46 -37
  286. package/studio/server/introspect/anatomy/views.ts +10 -16
  287. package/studio/server/introspect/anatomy-extras.test.ts +29 -56
  288. package/studio/server/introspect/anatomy.test.ts +22 -14
  289. package/studio/server/introspect/anatomy.ts +6 -9
  290. package/studio/server/introspect/bundle.ts +0 -3
  291. package/studio/server/introspect/canonical-schema.test.ts +155 -424
  292. package/studio/server/introspect/canonical-schema.ts +248 -601
  293. package/studio/server/introspect/core.ts +14 -22
  294. package/studio/server/introspect/diff.test.ts +21 -9
  295. package/studio/server/introspect/diff.ts +19 -64
  296. package/studio/server/introspect/extractor.ts +23 -122
  297. package/studio/server/introspect/overlay-tsmorph.test.ts +116 -241
  298. package/studio/server/introspect/overlay-tsmorph.ts +0 -1
  299. package/studio/server/introspect/overlay.ts +3 -51
  300. package/studio/server/introspect/revision.test.ts +24 -28
  301. package/studio/server/introspect/revision.ts +11 -22
  302. package/studio/server/introspect/runtime.test.ts +77 -195
  303. package/studio/server/introspect/runtime.ts +5 -67
  304. package/studio/server/introspect/schema-ir-json.test.ts +81 -0
  305. package/studio/server/introspect/schema-ir-json.ts +39 -69
  306. package/studio/server/introspect/schema-refs.test.ts +43 -88
  307. package/studio/server/introspect/schema-refs.ts +14 -49
  308. package/studio/server/introspect/source-overlay/handlers.ts +116 -636
  309. package/studio/server/introspect/source-overlay/kernel-calls.ts +0 -3
  310. package/studio/server/introspect/source-overlay/spans.ts +15 -45
  311. package/studio/server/lifecycle.ts +4 -1
  312. package/studio/server/state/baseline.test.ts +14 -9
  313. package/studio/server/state/baseline.ts +3 -5
  314. package/studio/server/state/documents.test.ts +69 -0
  315. package/studio/server/state/documents.ts +57 -10
  316. package/studio/server/state/visibility.ts +1 -5
  317. package/studio/server/views/model.ts +3 -3
  318. package/studio/server/views/target.test.ts +18 -76
  319. package/studio/server/views/target.ts +25 -51
  320. package/studio/server/watch.test.ts +11 -11
  321. package/studio/server/watch.ts +8 -4
  322. package/studio/server/workspace/updates.ts +23 -1
  323. package/studio/server/workspace-watch.ts +2 -2
  324. package/studio/shared/contracts/runtime.ts +4 -0
  325. package/studio/shared/contracts/schema.ts +44 -131
  326. package/studio/shared/contracts/surface.test.ts +15 -17
  327. package/studio/shared/contracts/workspace.ts +5 -11
  328. package/studio/shared/schema/identity.test.ts +20 -44
  329. package/studio/shared/schema/identity.ts +9 -24
  330. package/studio/tsconfig.json +2 -1
  331. package/tsconfig.json +1 -1
  332. package/viewer/dist/index.html +21 -0
  333. package/viewer/dist/main.js +41 -62
  334. package/.check-workspace.cjs +0 -40
  335. package/src/admin/binding.ts +0 -168
  336. package/src/commands/__tests__/instance-create-hosts.test.ts +0 -29
  337. package/studio/client/dist/assets/elk-api-lwhFo7vB.js +0 -1
  338. package/studio/client/dist/assets/index-B-c-smo9.js +0 -8
  339. package/studio/client/dist/assets/index-BckHuAWk.js +0 -81
  340. package/studio/client/dist/assets/index-C4aNQ6dz.css +0 -1
  341. package/studio/client/dist/assets/index-ChOr3yP0.css +0 -1
  342. package/studio/server/introspect/anatomy/views/legacy.ts +0 -232
  343. package/studio/server/introspect/core-extractor.ts +0 -139
  344. package/studio/server/introspect/overlay.test.ts +0 -72
  345. package/studio/server/introspect/source-overlay/annotations.ts +0 -14
@@ -1,11 +1,12 @@
1
1
  <!doctype html>
2
- <html lang="en" class="dark">
2
+ <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Domain Studio</title>
7
- <script type="module" crossorigin src="/assets/index-BckHuAWk.js"></script>
8
- <link rel="stylesheet" crossorigin href="/assets/index-C4aNQ6dz.css">
7
+ <script type="module" crossorigin src="/assets/index-BFVFs_8x.js"></script>
8
+ <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-Dd_uD5pT.js">
9
+ <link rel="stylesheet" crossorigin href="/assets/index-DuB9iUdu.css">
9
10
  </head>
10
11
  <body>
11
12
  <div id="root"></div>
@@ -21,7 +21,8 @@
21
21
  "typecheck": "tsgo --noEmit"
22
22
  },
23
23
  "dependencies": {
24
- "@astrale-os/shell": "file:../vendor/astrale-os-shell-0.3.8-beta.2.tgz",
24
+ "@astrale-os/sdk": "0.5.0-beta.54",
25
+ "@astrale-os/shell": "0.4.2-beta.6",
25
26
  "@dagrejs/dagre": "^3.0.0",
26
27
  "@radix-ui/react-collapsible": "^1.1.0",
27
28
  "@radix-ui/react-dialog": "^1.1.6",
@@ -39,7 +40,7 @@
39
40
  "clsx": "^2.1.1",
40
41
  "cmdk": "^1.1.1",
41
42
  "elkjs": "^0.11.1",
42
- "lucide-react": "^0.475.0",
43
+ "lucide-react": "^1.31.0",
43
44
  "react": "^19.2.0",
44
45
  "react-dom": "^19.2.0",
45
46
  "react-markdown": "^10.1.0",
@@ -55,18 +56,11 @@
55
56
  "@types/node": "^20.19.43",
56
57
  "@types/react": "^19.2.0",
57
58
  "@types/react-dom": "^19.2.0",
58
- "@vitejs/plugin-react": "^5.0.0",
59
- "bun-types": "^1.4.0",
59
+ "@typescript/native-preview": "7.0.0-dev.20260707.2",
60
+ "@vitejs/plugin-react": "^6.0.5",
61
+ "bun-types": "1.4.0",
60
62
  "tailwindcss": "^4.0.6",
61
- "typescript": "^5.7.3",
62
- "vite": "^7.0.0"
63
- },
64
- "overrides": {
65
- "@astrale-os/kernel-client": "file:../vendor/kernel/astrale-os-kernel-client-0.6.0-beta.3.tgz",
66
- "@astrale-os/kernel-core": "file:../vendor/kernel/astrale-os-kernel-core-0.9.0-beta.2.tgz",
67
- "@astrale-os/kernel-dsl": "file:../vendor/kernel/astrale-os-kernel-dsl-0.2.0-beta.2.tgz",
68
- "@astrale-os/kernel-protocol": "file:../vendor/kernel/astrale-os-kernel-protocol-0.5.0-beta.2.tgz",
69
- "@astrale-os/kernel-server": "file:../vendor/kernel/astrale-os-kernel-server-0.5.0-beta.3.tgz",
70
- "@astrale-os/sdk": "file:../vendor/astrale-os-sdk-0.5.0-beta.3.tgz"
63
+ "typescript": "~6.0.3",
64
+ "vite": "^8.2.1"
71
65
  }
72
66
  }
@@ -35,7 +35,7 @@ test('Ask uses the active harness model and matching per-harness conversation',
35
35
  roots.push(root)
36
36
  mkdirSync(join(root, 'schema'))
37
37
  writeFileSync(join(root, 'astrale.config.ts'), 'export default {}\n')
38
- writeFileSync(join(root, 'domain.ts'), 'export default {}\n')
38
+ writeFileSync(join(root, 'application.ts'), 'export default {}\n')
39
39
  writeFileSync(join(root, 'schema/index.ts'), 'export const Test = {}\n')
40
40
  const handle = registerDomain(root)!
41
41
  domainIds.push(handle.id)
@@ -18,7 +18,7 @@ function domain(root: string, id: string): DomainHandle {
18
18
  id,
19
19
  root,
20
20
  configFile: join(root, 'astrale.config.ts'),
21
- domainFile: join(root, 'domain.ts'),
21
+ applicationFile: join(root, 'application.ts'),
22
22
  schemaDirName: 'schema',
23
23
  schemaDir: join(root, 'schema'),
24
24
  schemaIndex: join(root, 'schema/index.ts'),
@@ -20,7 +20,7 @@ function domain(root: string, id: string): DomainHandle {
20
20
  id,
21
21
  root,
22
22
  configFile: join(root, 'astrale.config.ts'),
23
- domainFile: join(root, 'domain.ts'),
23
+ applicationFile: join(root, 'application.ts'),
24
24
  schemaDirName: 'schema',
25
25
  schemaDir: join(root, 'schema'),
26
26
  schemaIndex: join(root, 'schema/index.ts'),
@@ -323,10 +323,20 @@ test('Claude Ask cancellation kills the entire stubborn subprocess group', async
323
323
  onDelta: () => {},
324
324
  })
325
325
 
326
- await waitFor(() => existsSync(pidLog))
327
- const pids = JSON.parse(readFileSync(pidLog, 'utf8')) as { parent: number; child: number }
328
- expect(processExists(pids.parent)).toBe(true)
329
- expect(processExists(pids.child)).toBe(true)
326
+ let pids: { parent: number; child: number } | undefined
327
+ await waitFor(() => {
328
+ if (!existsSync(pidLog)) return false
329
+ try {
330
+ pids = JSON.parse(readFileSync(pidLog, 'utf8')) as { parent: number; child: number }
331
+ return Number.isInteger(pids.parent) && Number.isInteger(pids.child)
332
+ } catch {
333
+ return false
334
+ }
335
+ })
336
+ if (!pids) throw new Error('fake Claude did not publish complete process evidence')
337
+ const processIds = pids
338
+ expect(processExists(processIds.parent)).toBe(true)
339
+ expect(processExists(processIds.child)).toBe(true)
330
340
  controller.abort()
331
341
 
332
342
  expect(await resultPromise).toEqual({
@@ -334,5 +344,5 @@ test('Claude Ask cancellation kills the entire stubborn subprocess group', async
334
344
  isError: true,
335
345
  errorMessage: 'canceled',
336
346
  })
337
- await waitFor(() => !processExists(pids.parent) && !processExists(pids.child))
347
+ await waitFor(() => !processExists(processIds.parent) && !processExists(processIds.child))
338
348
  })
@@ -79,7 +79,7 @@ test('mints with the exact audience and instance, caches, and coalesces concurre
79
79
  expect(await broker.acquireGatewayToken(config, audience)).toBe(token)
80
80
  expect(calls).toEqual([
81
81
  {
82
- args: ['token', '--audience', audience, '--ttl', '3600', '--raw', '-i', 'prod'],
82
+ args: ['token', '--audience', audience, '--ttl', '240', '--raw', '-i', 'prod'],
83
83
  timeoutMs: 12_000,
84
84
  },
85
85
  ])
@@ -12,8 +12,8 @@ import type { HarnessGatewayConfig } from '../../../../shared/types'
12
12
 
13
13
  import { captureCommand, type CapturedCommand, type CaptureOptions } from '../process'
14
14
 
15
- const MINT_TTL_SECONDS = 3600
16
- const REFRESH_SKEW_MS = 5 * 60_000
15
+ const MINT_TTL_SECONDS = 4 * 60
16
+ const REFRESH_SKEW_MS = 60_000
17
17
 
18
18
  interface CachedToken {
19
19
  token: string
@@ -141,7 +141,7 @@ export class HarnessTokenBroker {
141
141
  (claims.expiresAtMs !== undefined && claims.expiresAtMs <= this.now())
142
142
  )
143
143
  throw new HarnessTokenError(
144
- 'could not mint a delegation token — is the instance reachable and are you signed in? (try `astrale login` / `astrale use <instance>`)',
144
+ 'could not mint a delegation token — is the instance reachable and are you signed in? (try `astrale auth login` / `astrale instance use <instance>`)',
145
145
  'mint-failed',
146
146
  )
147
147
  this.mintCache.set(key, {
@@ -4,30 +4,35 @@ import type { SchemaIR } from '../../../shared/types'
4
4
 
5
5
  import { describeAnchor } from './anchors'
6
6
 
7
- const importedKey = 'directory.example.dev:interface.Named' as const
8
-
7
+ const importedKey = 'directory.example.dev:class.Named' as const
9
8
  const ir: SchemaIR = {
10
9
  format: 'astrale.dsl',
11
10
  version: 'v1',
12
11
  domain: 'example.dev',
13
- types: {},
14
- interfaces: {},
15
- classes: {},
16
- imports: {},
12
+ classes: {
13
+ Item: {
14
+ type: 'node',
15
+ name: 'Item',
16
+ origin: 'example.dev',
17
+ ref: { origin: 'example.dev', kind: 'class', name: 'Item' },
18
+ properties: { count: { type: 'integer' } },
19
+ required: ['count'],
20
+ methods: {},
21
+ },
22
+ },
17
23
  importsByKey: {
18
24
  [importedKey]: {
19
25
  origin: 'directory.example.dev',
20
- definition: 'interface',
21
26
  key: importedKey,
22
- ref: { origin: 'directory.example.dev', kind: 'interface', name: 'Named' },
27
+ ref: { origin: 'directory.example.dev', kind: 'class', name: 'Named' },
23
28
  },
24
29
  },
25
- importedInterfacesByKey: {
30
+ importedClassesByKey: {
26
31
  [importedKey]: {
27
- type: 'interface',
32
+ type: 'node',
28
33
  name: 'Named',
29
34
  origin: 'directory.example.dev',
30
- ref: { origin: 'directory.example.dev', kind: 'interface', name: 'Named' },
35
+ ref: { origin: 'directory.example.dev', kind: 'class', name: 'Named' },
31
36
  properties: { label: { type: 'string' } },
32
37
  required: [],
33
38
  methods: {},
@@ -38,37 +43,41 @@ const ir: SchemaIR = {
38
43
  name: 'inspect',
39
44
  input: {
40
45
  type: 'object',
41
- properties: { cursor: { type: 'string' } },
46
+ properties: {
47
+ cursor: {
48
+ $ref: 'https://schemas.astrale.ai/graph/1/node-path',
49
+ 'x-astrale-path': {
50
+ target: 'node',
51
+ cardinality: 'one',
52
+ accepts: [{ origin: 'example.dev', kind: 'class', name: 'Item' }],
53
+ },
54
+ },
55
+ },
42
56
  required: [],
43
57
  },
44
- params: { cursor: { type: 'string' } },
45
- requiredParams: [],
46
58
  output: { mode: 'stream', item: { type: 'integer' } },
47
- returns: { type: 'integer' },
48
- static: true,
49
- inheritance: 'default',
50
59
  auth: 'authenticated',
51
60
  },
52
61
  },
62
+ views: {},
63
+ policies: {},
64
+ dependencies: [],
65
+ core: {},
53
66
  }
54
67
 
55
- describe('canonical anchor descriptions', () => {
56
- test('describes standalone Functions with exact input, output mode, and auth', () => {
57
- expect(describeAnchor('function.inspect', ir, undefined)).toContain(
58
- 'inspect(cursor:string?)→stream<int> [static,authenticated]',
68
+ describe('anchor descriptions', () => {
69
+ test('describes local and exact imported Class properties', () => {
70
+ expect(describeAnchor('class.Item.property.count', ir, undefined)).toContain(
71
+ '**Item.count** : int',
72
+ )
73
+ expect(describeAnchor(`class.${importedKey}.property.label`, ir, undefined)).toContain(
74
+ '**Named.label** : string?',
59
75
  )
60
76
  })
61
77
 
62
- test('resolves an imported interface member by its qualified identity', () => {
63
- expect(
64
- describeAnchor(
65
- 'interface.directory.example.dev:interface.Named.property.label',
66
- ir,
67
- undefined,
68
- ),
69
- ).toBe('**Named.label** : string?')
70
- expect(
71
- describeAnchor('interface.directory.example.dev:interface.Named', ir, undefined),
72
- ).toContain('from directory.example.dev')
78
+ test('describes standalone Functions with output mode and authentication', () => {
79
+ const description = describeAnchor('function.inspect', ir, undefined)
80
+ expect(description).toContain('inspect(cursor:→node?)')
81
+ expect(description).toContain('stream<int> [authenticated]')
73
82
  })
74
83
  })
@@ -5,15 +5,17 @@
5
5
  */
6
6
  import type {
7
7
  Comment,
8
- IrDefinitionKey,
8
+ IrClass,
9
+ IrClassKey,
9
10
  IrFunction,
10
- IrInterface,
11
11
  IrMethod,
12
12
  JsonSchema,
13
13
  SchemaIR,
14
14
  SchemaOverlay,
15
15
  } from '../../../shared/types'
16
16
 
17
+ import { isNodePathSchema } from '../../../shared/types'
18
+
17
19
  /** Terse JSON-Schema type label (mirrors the client's format.tsx describe/typeLabel). */
18
20
  function propType(s: JsonSchema | undefined, optionalOverride?: boolean): string {
19
21
  if (!s) return 'any'
@@ -22,8 +24,7 @@ function propType(s: JsonSchema | undefined, optionalOverride?: boolean): string
22
24
  const base = Array.isArray(t) ? t.find((x) => x !== 'null') : t
23
25
  let label: string
24
26
  if (s.enum) label = `enum(${s.enum.map(String).join('|')})`
25
- else if (s.$nodeRef) label = '→node'
26
- else if (s.$dataRef) label = '→data'
27
+ else if (isNodePathSchema(s)) label = '→node'
27
28
  else if (base === 'array') label = `${propType(s.items)}[]`
28
29
  else if (base === 'object') label = `{${Object.keys(s.properties ?? {}).join(',')}}`
29
30
  else if (base === 'integer') label = 'int'
@@ -33,32 +34,30 @@ function propType(s: JsonSchema | undefined, optionalOverride?: boolean): string
33
34
  }
34
35
 
35
36
  function methodSig(name: string, m: IrMethod | IrFunction): string {
36
- const params = Object.entries(m.params ?? {})
37
- .map(
38
- ([p, s]) =>
39
- `${p}:${propType(s, m.requiredParams ? !m.requiredParams.includes(p) : undefined)}`,
40
- )
37
+ const required = new Set(m.input.required ?? [])
38
+ const params = Object.entries(m.input.properties ?? {})
39
+ .map(([p, s]) => `${p}:${propType(s, !required.has(p))}`)
41
40
  .join(', ')
42
41
  const output =
43
- m.output?.mode === 'stream'
42
+ m.output.mode === 'stream'
44
43
  ? `stream<${propType(m.output.item)}>`
45
- : m.output?.mode === 'binary'
44
+ : m.output.mode === 'binary'
46
45
  ? 'binary'
47
- : propType(m.output?.mode === 'value' ? m.output.schema : m.returns)
46
+ : propType(m.output.schema)
48
47
  const tags = [
49
- m.static ? 'static' : '',
50
- m.inheritance === 'abstract' ? 'abstract' : '',
48
+ 'static' in m && m.static ? 'static' : '',
49
+ 'inheritance' in m && m.inheritance === 'abstract' ? 'abstract' : '',
51
50
  m.auth ?? '',
52
51
  ].filter(Boolean)
53
52
  return `${name}(${params})→${output}${tags.length ? ` [${tags.join(',')}]` : ''}`
54
53
  }
55
54
 
56
- function interfaceByToken(ir: SchemaIR, token: string): IrInterface | undefined {
57
- const exact = /^(.+):interface\.([A-Za-z_$][\w$]*)$/.exec(token)
58
- if (!exact) return ir.interfaces?.[token]
55
+ function classByToken(ir: SchemaIR, token: string): IrClass | undefined {
56
+ const exact = /^(.+):class\.([A-Za-z_$][\w$]*)$/.exec(token)
57
+ if (!exact) return ir.classes[token]
59
58
  const [, origin, name] = exact
60
- if (origin === ir.domain) return ir.interfaces?.[name]
61
- return ir.importedInterfacesByKey?.[`${origin}:interface.${name}` as IrDefinitionKey]
59
+ if (origin === ir.domain) return ir.classes[name]
60
+ return ir.importedClassesByKey[`${origin}:class.${name}` as IrClassKey]
62
61
  }
63
62
 
64
63
  /**
@@ -77,20 +76,20 @@ export function describeAnchor(
77
76
  const doc = span?.doc ? ` — ${span.doc.replace(/\s+/g, ' ').trim().slice(0, 160)}` : ''
78
77
 
79
78
  // class.X.property.y / class.X.method.m
80
- const member = ref.match(/^class\.([^.]+)\.(property|method)\.(.+)$/)
79
+ const member = ref.match(/^class\.(.+)\.(property|method)\.([^.]+)$/)
81
80
  if (member && ir) {
82
81
  const [, cls, kind, name] = member
83
- const c = ir.classes?.[cls]
82
+ const c = classByToken(ir, cls)
84
83
  if (c && kind === 'property' && c.properties?.[name])
85
- return `**${cls}.${name}** : ${propType(c.properties[name], c.required ? !c.required.includes(name) : undefined)}${loc ? ` (${loc})` : ''}${doc}`
84
+ return `**${c.name}.${name}** : ${propType(c.properties[name], c.required ? !c.required.includes(name) : undefined)}${loc ? ` (${loc})` : ''}${doc}`
86
85
  if (c && kind === 'method' && c.methods?.[name])
87
- return `**${cls}.${name}** — ${methodSig(name, c.methods[name])}${loc ? ` (${loc})` : ''}${doc}`
86
+ return `**${c.name}.${name}** — ${methodSig(name, c.methods[name])}${loc ? ` (${loc})` : ''}${doc}`
88
87
  }
89
88
 
90
89
  // class.X / edge.X (edges live in ir.classes too)
91
90
  const cm = ref.match(/^(?:class|edge)\.(.+)$/)
92
91
  if (cm && ir) {
93
- const c = ir.classes?.[cm[1]]
92
+ const c = classByToken(ir, cm[1])
94
93
  if (c) {
95
94
  const L = [`**${c.name}** (${c.type})${loc ? ` (${loc})` : ''}${doc}`]
96
95
  const props = Object.entries(c.properties ?? {})
@@ -121,33 +120,6 @@ export function describeAnchor(
121
120
  }
122
121
  }
123
122
 
124
- // interface.X.property.y / interface.<origin>:interface.X.method.m
125
- const interfaceMember = ref.match(/^interface\.(.+)\.(property|method)\.([^.]+)$/)
126
- if (interfaceMember && ir) {
127
- const [, token, kind, name] = interfaceMember
128
- const iface = interfaceByToken(ir, token)
129
- if (iface && kind === 'property' && iface.properties?.[name]) {
130
- return `**${iface.name}.${name}** : ${propType(iface.properties[name], iface.required ? !iface.required.includes(name) : undefined)}${loc ? ` (${loc})` : ''}${doc}`
131
- }
132
- if (iface && kind === 'method' && iface.methods?.[name]) {
133
- return `**${iface.name}.${name}** — ${methodSig(name, iface.methods[name])}${loc ? ` (${loc})` : ''}${doc}`
134
- }
135
- }
136
-
137
- // interface.X or exact interface.<origin>:interface.X
138
- const im = ref.match(/^interface\.(.+)$/)
139
- if (im && ir) {
140
- const i = interfaceByToken(ir, im[1])
141
- if (i) {
142
- const props = Object.entries(i.properties ?? {}).map(
143
- ([name, schema]) =>
144
- `${name}:${propType(schema, i.required ? !i.required.includes(name) : undefined)}`,
145
- )
146
- const ms = Object.entries(i.methods ?? {}).map(([n, m]) => methodSig(n, m))
147
- return `**${i.name}** (interface)${i.origin && i.origin !== ir.domain ? ` from ${i.origin}` : ''}${loc ? ` (${loc})` : ''}${doc}${props.length ? `\n props: ${props.join(' · ')}` : ''}${ms.length ? `\n methods: ${ms.join(' · ')}` : ''}`
148
- }
149
- }
150
-
151
123
  // Standalone canonical Function.
152
124
  const fm = ref.match(/^function\.([A-Za-z_$][\w$]*)$/)
153
125
  if (fm && ir) {
@@ -2,11 +2,11 @@ import { expect, test } from 'bun:test'
2
2
 
3
3
  import { buildSystemPrompt } from './system'
4
4
 
5
- test('embedded agents receive the current SDK layout contract', () => {
5
+ test('embedded agents receive the current SDK and frontend skill contracts', () => {
6
6
  const prompt = buildSystemPrompt({ bridge: false })
7
7
 
8
- expect(prompt).toContain('implementation.ts')
9
- expect(prompt).toContain('pre-Kernel-V2 APIs or layouts')
10
- expect(prompt).toContain('domain.ts/runtime only when this is already a legacy project')
8
+ expect(prompt).toContain('modular Actions and Workflows')
9
+ expect(prompt).toContain('astrale-frontend-design')
10
+ expect(prompt).toContain('Runtime/Application entries')
11
11
  expect(prompt).not.toContain('schema/ runtime/ views/')
12
12
  })
@@ -25,12 +25,12 @@ export function buildSystemPrompt(options: { bridge: boolean }): string {
25
25
  'Operating rules (when a thread genuinely calls for a code change):',
26
26
  '- Read the skills under `.agents/skills/` FIRST and follow them: **astrale-domain**',
27
27
  ' (schema modeling, handlers, views, deploy/install) before editing schema/handlers,',
28
- ' and **astrale-cli** when you run the `astrale` CLI. Treat those current skills and',
29
- ' the project itself as authoritative; do not restore pre-Kernel-V2 APIs or layouts.',
28
+ ' **astrale-frontend-design** before editing a Domain UI, and **astrale-cli** when you',
29
+ ' run the `astrale` CLI. Treat those current skills and the project itself as authoritative.',
30
30
  '- Prefer the project’s existing semantic modules over inventing new structure. Current',
31
- ' SDK projects compose schema, handlers, and frontend metadata in implementation.ts;',
32
- ' wire new modules explicitly through their layer facades and that entry. Preserve',
33
- ' domain.ts/runtime only when this is already a legacy project (no folder magic).',
31
+ ' SDK projects author Schema definitions, modular Actions and Workflows, a Runtime,',
32
+ ' and an Application. Wire modules through their semantic SDK facades and explicit',
33
+ ' Runtime/Application entries.',
34
34
  '- The studio re-renders automatically as you save files — never start, build, or refresh',
35
35
  ' anything for the UI to update.',
36
36
  '- Sanity-check schema/handler edits with `pnpm typecheck` (or `tsgo --noEmit`).',
@@ -26,7 +26,7 @@ function fixture() {
26
26
  roots.push(root)
27
27
  mkdirSync(join(root, 'schema'))
28
28
  writeFileSync(join(root, 'astrale.config.ts'), 'export default {}\n')
29
- writeFileSync(join(root, 'domain.ts'), 'export default {}\n')
29
+ writeFileSync(join(root, 'application.ts'), 'export default {}\n')
30
30
  writeFileSync(join(root, 'schema/index.ts'), 'export const Test = {}\n')
31
31
  const handle = registerDomain(root)!
32
32
  domainIds.push(handle.id)
@@ -58,7 +58,7 @@ function fixture(): DomainHandle {
58
58
  roots.push(root)
59
59
  mkdirSync(join(root, 'schema'))
60
60
  writeFileSync(join(root, 'astrale.config.ts'), 'export default {}\n')
61
- writeFileSync(join(root, 'domain.ts'), 'export default {}\n')
61
+ writeFileSync(join(root, 'application.ts'), 'export default {}\n')
62
62
  writeFileSync(join(root, 'schema/index.ts'), 'export const Test = {}\n')
63
63
  const handle = registerDomain(root)!
64
64
  domainIds.push(handle.id)
@@ -94,7 +94,7 @@ export async function prepareRun(
94
94
  bareResume && !firstTurn
95
95
  ? buildResumePrompt()
96
96
  : buildTurnPrompt({
97
- origin: bundle?.overlay.origin ?? domainId,
97
+ origin: bundle?.ir?.domain ?? handle.origin ?? domainId,
98
98
  root,
99
99
  renderFingerprint,
100
100
  schemaRevision: bundle?.schemaRevision,
@@ -32,7 +32,6 @@ export async function handleCanvasRoute(context: DomainRouteContext): Promise<Re
32
32
  saveVisibility(root, {
33
33
  hidden: body.hidden ?? {},
34
34
  showInheritedEdges: body.showInheritedEdges ?? true,
35
- materializedInterfaces: body.materializedInterfaces ?? {},
36
35
  }),
37
36
  )
38
37
  }
@@ -43,7 +43,7 @@ export async function handleContextRoute(context: DomainRouteContext): Promise<R
43
43
  const storedContext = readContext(root)
44
44
  const openComments = readComments(root).comments.filter((comment) => comment.status === 'open')
45
45
  const markdown = buildCopyMarkdown({
46
- origin: bundle?.overlay.origin ?? id,
46
+ origin: bundle?.ir?.domain ?? handle.origin ?? id,
47
47
  root,
48
48
  renderFingerprint: bundle?.renderFingerprint ?? '',
49
49
  schemaRevision: bundle?.schemaRevision,
@@ -24,7 +24,7 @@ export async function handleDeploymentRoute(context: DomainRouteContext): Promis
24
24
  await instanceStatus(
25
25
  handle,
26
26
  target,
27
- bundle?.overlay.origin ?? null,
27
+ bundle?.ir?.domain ?? handle.origin ?? null,
28
28
  bundle?.schemaRevision ?? null,
29
29
  ),
30
30
  )
@@ -24,7 +24,7 @@ export async function handleViewRoute(context: DomainRouteContext): Promise<Resp
24
24
  const view = anatomy?.views.find((candidate) => candidate.slug === slug)
25
25
  if (!view) return notFound()
26
26
  const bundle = await getBundle(id)
27
- const origin = bundle?.overlay.origin || anatomy?.overview.origin
27
+ const origin = bundle?.ir?.domain || anatomy?.overview.origin
28
28
  if (!origin) return badRequest('domain origin is unavailable')
29
29
  return json(
30
30
  await getViewRuntime(root, origin, view, bundle, readSettings(root).viewProbeTimeoutMs),
@@ -39,7 +39,7 @@ export async function handleViewRoute(context: DomainRouteContext): Promise<Resp
39
39
  const view = anatomy?.views.find((candidate) => candidate.slug === slug)
40
40
  if (!view) return notFound()
41
41
  const bundle = await getBundle(id)
42
- const origin = bundle?.overlay.origin || anatomy?.overview.origin
42
+ const origin = bundle?.ir?.domain || anatomy?.overview.origin
43
43
  if (!origin) return badRequest('domain origin is unavailable')
44
44
  return json(
45
45
  await launchViewSession(
@@ -18,7 +18,7 @@ export async function handleWorkspaceRoute(
18
18
  const bundle = await getBundle(handle.id)
19
19
  return {
20
20
  id: handle.id,
21
- origin: bundle?.overlay.origin || handle.origin || handle.id,
21
+ origin: bundle?.ir?.domain || handle.origin || handle.id,
22
22
  path: handle.root,
23
23
  schemaDir: handle.schemaDirName,
24
24
  depsInstalled: depsInstalled(handle.root),
@@ -27,7 +27,7 @@ test('loadout fails closed instead of probing ambient Claude when gateway auth f
27
27
  roots.push(root)
28
28
  mkdirSync(join(root, 'schema'))
29
29
  writeFileSync(join(root, 'astrale.config.ts'), 'export default {}\n')
30
- writeFileSync(join(root, 'domain.ts'), 'export default {}\n')
30
+ writeFileSync(join(root, 'application.ts'), 'export default {}\n')
31
31
  writeFileSync(join(root, 'schema/index.ts'), 'export const Test = {}\n')
32
32
  const handle = registerDomain(root)!
33
33
  domainIds.push(handle.id)
@@ -19,7 +19,7 @@ function fixture() {
19
19
  roots.push(root)
20
20
  mkdirSync(join(root, 'schema'))
21
21
  writeFileSync(join(root, 'astrale.config.ts'), 'export default {}\n')
22
- writeFileSync(join(root, 'domain.ts'), 'export default {}\n')
22
+ writeFileSync(join(root, 'application.ts'), 'export default {}\n')
23
23
  writeFileSync(join(root, 'schema/index.ts'), 'export const Test = {}\n')
24
24
  const handle = registerDomain(root)!
25
25
  domainIds.push(handle.id)
@@ -4,34 +4,37 @@ import { decodeBundleCacheEntry } from './cache'
4
4
 
5
5
  function entry(): Record<string, unknown> {
6
6
  return {
7
- version: 4,
7
+ version: 6,
8
8
  key: 'cache-key',
9
- futureEntryField: { version: 5 },
9
+ futureEntryField: { version: 6 },
10
10
  bundle: {
11
11
  domainId: 'notes',
12
12
  renderFingerprint: 'render-hash',
13
- schemaMode: 'legacy',
13
+ schemaMode: 'canonical-preview',
14
14
  extractedBy: 'runtime-bun',
15
15
  depsInstalled: true,
16
16
  ir: {
17
- version: 'legacy',
17
+ format: 'astrale.dsl',
18
+ version: 'v1',
18
19
  domain: 'notes.example.dev',
19
- types: {},
20
- interfaces: {},
21
20
  classes: {},
22
- imports: {},
21
+ importsByKey: {},
22
+ importedClassesByKey: {},
23
23
  functions: {},
24
+ views: {},
25
+ policies: {},
26
+ dependencies: [],
27
+ core: {},
24
28
  },
25
29
  overlay: {
26
- origin: 'notes.example.dev',
27
- requires: [],
28
- crossDomainImports: [],
29
- mixins: [],
30
30
  handlerLinks: [],
31
31
  sourceSpans: {},
32
- annotations: [],
33
32
  },
34
- importedInterfaces: {},
33
+ schemaRoot: {
34
+ format: 'astrale.dsl',
35
+ version: 'v1',
36
+ origin: 'notes.example.dev',
37
+ },
35
38
  error: null,
36
39
  extractedAt: '2026-08-20T00:00:00.000Z',
37
40
  futureBundleField: true,
@@ -43,9 +46,9 @@ test('bundle cache admits known structure while ignoring future fields', () => {
43
46
  const decoded = decodeBundleCacheEntry(entry())
44
47
 
45
48
  expect(decoded).toMatchObject({
46
- version: 4,
49
+ version: 6,
47
50
  key: 'cache-key',
48
- bundle: { domainId: 'notes', schemaMode: 'legacy' },
51
+ bundle: { domainId: 'notes', schemaMode: 'canonical-preview' },
49
52
  })
50
53
  expect(decoded && 'futureEntryField' in decoded).toBe(false)
51
54
  expect(decoded && 'futureBundleField' in decoded.bundle).toBe(false)
@@ -60,11 +63,14 @@ function canonicalEntry(): Record<string, unknown> {
60
63
  format: 'astrale.dsl',
61
64
  version: 'v1',
62
65
  domain: 'notes.example.dev',
63
- types: {},
64
- interfaces: {},
65
66
  classes: {},
66
- imports: {},
67
+ importsByKey: {},
68
+ importedClassesByKey: {},
67
69
  functions: {},
70
+ views: {},
71
+ policies: {},
72
+ dependencies: [],
73
+ core: {},
68
74
  }
69
75
  bundle.schemaRoot = {
70
76
  format: 'astrale.dsl',