@astrale-os/sdk 0.4.19 → 0.5.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1048) hide show
  1. package/README.md +5 -3
  2. package/dist/auth/exchange.d.ts +11 -0
  3. package/dist/auth/exchange.d.ts.map +1 -0
  4. package/dist/auth/exchange.js +8 -0
  5. package/dist/auth/exchange.js.map +1 -0
  6. package/dist/auth/index.d.ts +4 -15
  7. package/dist/auth/index.d.ts.map +1 -1
  8. package/dist/auth/index.js +3 -10
  9. package/dist/auth/index.js.map +1 -1
  10. package/dist/capability/client.d.ts +25 -0
  11. package/dist/capability/client.d.ts.map +1 -0
  12. package/dist/capability/client.js +147 -0
  13. package/dist/capability/client.js.map +1 -0
  14. package/dist/capability/contract.d.ts +70 -0
  15. package/dist/capability/contract.d.ts.map +1 -0
  16. package/dist/capability/contract.js +3 -0
  17. package/dist/capability/contract.js.map +1 -0
  18. package/dist/capability/define.d.ts +14 -0
  19. package/dist/capability/define.d.ts.map +1 -0
  20. package/dist/capability/define.js +145 -0
  21. package/dist/capability/define.js.map +1 -0
  22. package/dist/capability/index.d.ts +3 -0
  23. package/dist/capability/index.d.ts.map +1 -0
  24. package/dist/capability/index.js +2 -0
  25. package/dist/capability/index.js.map +1 -0
  26. package/dist/cli/arguments.d.ts +21 -0
  27. package/dist/cli/arguments.d.ts.map +1 -0
  28. package/dist/cli/arguments.js +220 -0
  29. package/dist/cli/arguments.js.map +1 -0
  30. package/dist/cli/dotenv.d.ts +1 -4
  31. package/dist/cli/dotenv.d.ts.map +1 -1
  32. package/dist/cli/dotenv.js +6 -15
  33. package/dist/cli/dotenv.js.map +1 -1
  34. package/dist/cli/index.d.ts +4 -5
  35. package/dist/cli/index.d.ts.map +1 -1
  36. package/dist/cli/index.js +4 -5
  37. package/dist/cli/index.js.map +1 -1
  38. package/dist/cli/run.d.ts +4 -79
  39. package/dist/cli/run.d.ts.map +1 -1
  40. package/dist/cli/run.js +47 -326
  41. package/dist/cli/run.js.map +1 -1
  42. package/dist/deployment/artifact/bindings.d.ts +7 -0
  43. package/dist/deployment/artifact/bindings.d.ts.map +1 -0
  44. package/dist/deployment/artifact/bindings.js +44 -0
  45. package/dist/deployment/artifact/bindings.js.map +1 -0
  46. package/dist/deployment/artifact/deployment.d.ts +35 -0
  47. package/dist/deployment/artifact/deployment.d.ts.map +1 -0
  48. package/dist/deployment/artifact/deployment.js +91 -0
  49. package/dist/deployment/artifact/deployment.js.map +1 -0
  50. package/dist/deployment/artifact/index.d.ts +5 -0
  51. package/dist/deployment/artifact/index.d.ts.map +1 -0
  52. package/dist/deployment/artifact/index.js +4 -0
  53. package/dist/deployment/artifact/index.js.map +1 -0
  54. package/dist/deployment/check/check.d.ts +8 -0
  55. package/dist/deployment/check/check.d.ts.map +1 -0
  56. package/dist/deployment/check/check.js +94 -0
  57. package/dist/deployment/check/check.js.map +1 -0
  58. package/dist/deployment/check/contract.d.ts +29 -0
  59. package/dist/deployment/check/contract.d.ts.map +1 -0
  60. package/dist/deployment/check/contract.js +2 -0
  61. package/dist/deployment/check/contract.js.map +1 -0
  62. package/dist/deployment/check/index.d.ts +3 -0
  63. package/dist/deployment/check/index.d.ts.map +1 -0
  64. package/dist/deployment/check/index.js +2 -0
  65. package/dist/deployment/check/index.js.map +1 -0
  66. package/dist/deployment/index.d.ts +7 -0
  67. package/dist/deployment/index.d.ts.map +1 -0
  68. package/dist/deployment/index.js +4 -0
  69. package/dist/deployment/index.js.map +1 -0
  70. package/dist/deployment/provider/adapter.d.ts +56 -0
  71. package/dist/deployment/provider/adapter.d.ts.map +1 -0
  72. package/dist/deployment/provider/adapter.js +84 -0
  73. package/dist/deployment/provider/adapter.js.map +1 -0
  74. package/dist/deployment/provider/config.d.ts +10 -0
  75. package/dist/deployment/provider/config.d.ts.map +1 -0
  76. package/dist/deployment/provider/config.js +8 -0
  77. package/dist/deployment/provider/config.js.map +1 -0
  78. package/dist/deployment/provider/index.d.ts +5 -0
  79. package/dist/deployment/provider/index.d.ts.map +1 -0
  80. package/dist/deployment/provider/index.js +3 -0
  81. package/dist/deployment/provider/index.js.map +1 -0
  82. package/dist/domain/app.d.ts +34 -0
  83. package/dist/domain/app.d.ts.map +1 -0
  84. package/dist/domain/app.js +2 -0
  85. package/dist/domain/app.js.map +1 -0
  86. package/dist/domain/context.d.ts +68 -0
  87. package/dist/domain/context.d.ts.map +1 -0
  88. package/dist/domain/context.js +2 -0
  89. package/dist/domain/context.js.map +1 -0
  90. package/dist/domain/define.d.ts +99 -65
  91. package/dist/domain/define.d.ts.map +1 -1
  92. package/dist/domain/define.js +78 -60
  93. package/dist/domain/define.js.map +1 -1
  94. package/dist/domain/handlers.d.ts +53 -0
  95. package/dist/domain/handlers.d.ts.map +1 -0
  96. package/dist/domain/handlers.js +88 -0
  97. package/dist/domain/handlers.js.map +1 -0
  98. package/dist/domain/implement.d.ts +5 -0
  99. package/dist/domain/implement.d.ts.map +1 -0
  100. package/dist/domain/implement.js +23 -0
  101. package/dist/domain/implement.js.map +1 -0
  102. package/dist/domain/index.d.ts +13 -4
  103. package/dist/domain/index.d.ts.map +1 -1
  104. package/dist/domain/index.js +7 -3
  105. package/dist/domain/index.js.map +1 -1
  106. package/dist/domain/requirements.d.ts +26 -0
  107. package/dist/domain/requirements.d.ts.map +1 -0
  108. package/dist/domain/requirements.js +98 -0
  109. package/dist/domain/requirements.js.map +1 -0
  110. package/dist/graph/class/index.d.ts +3 -0
  111. package/dist/graph/class/index.d.ts.map +1 -0
  112. package/dist/graph/class/index.js +3 -0
  113. package/dist/graph/class/index.js.map +1 -0
  114. package/dist/graph/edge/index.d.ts +3 -0
  115. package/dist/graph/edge/index.d.ts.map +1 -0
  116. package/dist/graph/edge/index.js +3 -0
  117. package/dist/graph/edge/index.js.map +1 -0
  118. package/dist/graph/index.d.ts +10 -0
  119. package/dist/graph/index.d.ts.map +1 -0
  120. package/dist/graph/index.js +9 -0
  121. package/dist/graph/index.js.map +1 -0
  122. package/dist/graph/model/index.d.ts +3 -0
  123. package/dist/graph/model/index.d.ts.map +1 -0
  124. package/dist/graph/model/index.js +3 -0
  125. package/dist/graph/model/index.js.map +1 -0
  126. package/dist/graph/node/index.d.ts +3 -0
  127. package/dist/graph/node/index.d.ts.map +1 -0
  128. package/dist/graph/node/index.js +3 -0
  129. package/dist/graph/node/index.js.map +1 -0
  130. package/dist/graph/path/index.d.ts +3 -0
  131. package/dist/graph/path/index.d.ts.map +1 -0
  132. package/dist/graph/path/index.js +3 -0
  133. package/dist/graph/path/index.js.map +1 -0
  134. package/dist/graph/properties/index.d.ts +3 -0
  135. package/dist/graph/properties/index.d.ts.map +1 -0
  136. package/dist/graph/properties/index.js +3 -0
  137. package/dist/graph/properties/index.js.map +1 -0
  138. package/dist/index.d.ts +20 -27
  139. package/dist/index.d.ts.map +1 -1
  140. package/dist/index.js +10 -47
  141. package/dist/index.js.map +1 -1
  142. package/dist/invocation/handler.d.ts +51 -0
  143. package/dist/invocation/handler.d.ts.map +1 -0
  144. package/dist/invocation/handler.js +289 -0
  145. package/dist/invocation/handler.js.map +1 -0
  146. package/dist/invocation/index.d.ts +3 -0
  147. package/dist/invocation/index.d.ts.map +1 -0
  148. package/dist/invocation/index.js +2 -0
  149. package/dist/invocation/index.js.map +1 -0
  150. package/dist/invocation/receiver.d.ts +5 -0
  151. package/dist/invocation/receiver.d.ts.map +1 -0
  152. package/dist/invocation/receiver.js +70 -0
  153. package/dist/invocation/receiver.js.map +1 -0
  154. package/dist/invocation/result.d.ts +5 -0
  155. package/dist/invocation/result.d.ts.map +1 -0
  156. package/dist/invocation/result.js +146 -0
  157. package/dist/invocation/result.js.map +1 -0
  158. package/dist/invocation/selection.d.ts +21 -0
  159. package/dist/invocation/selection.d.ts.map +1 -0
  160. package/dist/invocation/selection.js +107 -0
  161. package/dist/invocation/selection.js.map +1 -0
  162. package/dist/linter/adapters/typescript/discover.d.ts +4 -0
  163. package/dist/linter/adapters/typescript/discover.d.ts.map +1 -0
  164. package/dist/linter/adapters/typescript/discover.js +412 -0
  165. package/dist/linter/adapters/typescript/discover.js.map +1 -0
  166. package/dist/linter/adapters/typescript/evidence-admission.d.ts +5 -0
  167. package/dist/linter/adapters/typescript/evidence-admission.d.ts.map +1 -0
  168. package/dist/linter/adapters/typescript/evidence-admission.js +22 -0
  169. package/dist/linter/adapters/typescript/evidence-admission.js.map +1 -0
  170. package/dist/linter/adapters/typescript/imports.d.ts +7 -0
  171. package/dist/linter/adapters/typescript/imports.d.ts.map +1 -0
  172. package/dist/linter/adapters/typescript/imports.js +171 -0
  173. package/dist/linter/adapters/typescript/imports.js.map +1 -0
  174. package/dist/linter/adapters/typescript/index.d.ts +48 -0
  175. package/dist/linter/adapters/typescript/index.d.ts.map +1 -0
  176. package/dist/linter/adapters/typescript/index.js +8 -0
  177. package/dist/linter/adapters/typescript/index.js.map +1 -0
  178. package/dist/linter/adapters/typescript/query-observation.d.ts +4 -0
  179. package/dist/linter/adapters/typescript/query-observation.d.ts.map +1 -0
  180. package/dist/linter/adapters/typescript/query-observation.js +172 -0
  181. package/dist/linter/adapters/typescript/query-observation.js.map +1 -0
  182. package/dist/linter/adapters/typescript/suppression-directives.d.ts +5 -0
  183. package/dist/linter/adapters/typescript/suppression-directives.d.ts.map +1 -0
  184. package/dist/linter/adapters/typescript/suppression-directives.js +85 -0
  185. package/dist/linter/adapters/typescript/suppression-directives.js.map +1 -0
  186. package/dist/linter/adapters/typescript/syntax.d.ts +39 -0
  187. package/dist/linter/adapters/typescript/syntax.d.ts.map +1 -0
  188. package/dist/linter/adapters/typescript/syntax.js +183 -0
  189. package/dist/linter/adapters/typescript/syntax.js.map +1 -0
  190. package/dist/linter/adapters/typescript/type-universe.d.ts +2 -0
  191. package/dist/linter/adapters/typescript/type-universe.d.ts.map +1 -0
  192. package/dist/linter/adapters/typescript/type-universe.js +265 -0
  193. package/dist/linter/adapters/typescript/type-universe.js.map +1 -0
  194. package/dist/linter/catalog/compile.d.ts +3 -0
  195. package/dist/linter/catalog/compile.d.ts.map +1 -0
  196. package/dist/linter/catalog/compile.js +111 -0
  197. package/dist/linter/catalog/compile.js.map +1 -0
  198. package/dist/linter/catalog/index.d.ts +19 -0
  199. package/dist/linter/catalog/index.d.ts.map +1 -0
  200. package/dist/linter/catalog/index.js +3 -0
  201. package/dist/linter/catalog/index.js.map +1 -0
  202. package/dist/linter/catalog/revision.d.ts +7 -0
  203. package/dist/linter/catalog/revision.d.ts.map +1 -0
  204. package/dist/linter/catalog/revision.js +13 -0
  205. package/dist/linter/catalog/revision.js.map +1 -0
  206. package/dist/linter/diagnostics/error.d.ts +10 -0
  207. package/dist/linter/diagnostics/error.d.ts.map +1 -0
  208. package/dist/linter/diagnostics/error.js +10 -0
  209. package/dist/linter/diagnostics/error.js.map +1 -0
  210. package/dist/linter/diagnostics/index.d.ts +29 -0
  211. package/dist/linter/diagnostics/index.d.ts.map +1 -0
  212. package/dist/linter/diagnostics/index.js +3 -0
  213. package/dist/linter/diagnostics/index.js.map +1 -0
  214. package/dist/linter/diagnostics/sort.d.ts +3 -0
  215. package/dist/linter/diagnostics/sort.d.ts.map +1 -0
  216. package/dist/linter/diagnostics/sort.js +27 -0
  217. package/dist/linter/diagnostics/sort.js.map +1 -0
  218. package/dist/linter/evaluation/binding/bind.d.ts +5 -0
  219. package/dist/linter/evaluation/binding/bind.d.ts.map +1 -0
  220. package/dist/linter/evaluation/binding/bind.js +356 -0
  221. package/dist/linter/evaluation/binding/bind.js.map +1 -0
  222. package/dist/linter/evaluation/binding/diagnostic.d.ts +5 -0
  223. package/dist/linter/evaluation/binding/diagnostic.d.ts.map +1 -0
  224. package/dist/linter/evaluation/binding/diagnostic.js +17 -0
  225. package/dist/linter/evaluation/binding/diagnostic.js.map +1 -0
  226. package/dist/linter/evaluation/binding/index.d.ts +2 -0
  227. package/dist/linter/evaluation/binding/index.d.ts.map +1 -0
  228. package/dist/linter/evaluation/binding/index.js +2 -0
  229. package/dist/linter/evaluation/binding/index.js.map +1 -0
  230. package/dist/linter/evaluation/contract/availability.d.ts +28 -0
  231. package/dist/linter/evaluation/contract/availability.d.ts.map +1 -0
  232. package/dist/linter/evaluation/contract/availability.js +2 -0
  233. package/dist/linter/evaluation/contract/availability.js.map +1 -0
  234. package/dist/linter/evaluation/contract/decision.d.ts +26 -0
  235. package/dist/linter/evaluation/contract/decision.d.ts.map +1 -0
  236. package/dist/linter/evaluation/contract/decision.js +2 -0
  237. package/dist/linter/evaluation/contract/decision.js.map +1 -0
  238. package/dist/linter/evaluation/contract/evidence.d.ts +12 -0
  239. package/dist/linter/evaluation/contract/evidence.d.ts.map +1 -0
  240. package/dist/linter/evaluation/contract/evidence.js +2 -0
  241. package/dist/linter/evaluation/contract/evidence.js.map +1 -0
  242. package/dist/linter/evaluation/contract/implementation.d.ts +22 -0
  243. package/dist/linter/evaluation/contract/implementation.d.ts.map +1 -0
  244. package/dist/linter/evaluation/contract/implementation.js +2 -0
  245. package/dist/linter/evaluation/contract/implementation.js.map +1 -0
  246. package/dist/linter/evaluation/contract/index.d.ts +5 -0
  247. package/dist/linter/evaluation/contract/index.d.ts.map +1 -0
  248. package/dist/linter/evaluation/contract/index.js +2 -0
  249. package/dist/linter/evaluation/contract/index.js.map +1 -0
  250. package/dist/linter/evaluation/index.d.ts +3 -0
  251. package/dist/linter/evaluation/index.d.ts.map +1 -0
  252. package/dist/linter/evaluation/index.js +2 -0
  253. package/dist/linter/evaluation/index.js.map +1 -0
  254. package/dist/linter/implementations/source/capabilities.d.ts +3 -0
  255. package/dist/linter/implementations/source/capabilities.d.ts.map +1 -0
  256. package/dist/linter/implementations/source/capabilities.js +41 -0
  257. package/dist/linter/implementations/source/capabilities.js.map +1 -0
  258. package/dist/linter/implementations/source/contract.d.ts +17 -0
  259. package/dist/linter/implementations/source/contract.d.ts.map +1 -0
  260. package/dist/linter/implementations/source/contract.js +53 -0
  261. package/dist/linter/implementations/source/contract.js.map +1 -0
  262. package/dist/linter/implementations/source/functions.d.ts +3 -0
  263. package/dist/linter/implementations/source/functions.d.ts.map +1 -0
  264. package/dist/linter/implementations/source/functions.js +102 -0
  265. package/dist/linter/implementations/source/functions.js.map +1 -0
  266. package/dist/linter/implementations/source/global.d.ts +3 -0
  267. package/dist/linter/implementations/source/global.d.ts.map +1 -0
  268. package/dist/linter/implementations/source/global.js +812 -0
  269. package/dist/linter/implementations/source/global.js.map +1 -0
  270. package/dist/linter/implementations/source/index.d.ts +4 -0
  271. package/dist/linter/implementations/source/index.d.ts.map +1 -0
  272. package/dist/linter/implementations/source/index.js +4 -0
  273. package/dist/linter/implementations/source/index.js.map +1 -0
  274. package/dist/linter/implementations/source/integrations.d.ts +3 -0
  275. package/dist/linter/implementations/source/integrations.d.ts.map +1 -0
  276. package/dist/linter/implementations/source/integrations.js +186 -0
  277. package/dist/linter/implementations/source/integrations.js.map +1 -0
  278. package/dist/linter/implementations/source/migrations.d.ts +3 -0
  279. package/dist/linter/implementations/source/migrations.d.ts.map +1 -0
  280. package/dist/linter/implementations/source/migrations.js +115 -0
  281. package/dist/linter/implementations/source/migrations.js.map +1 -0
  282. package/dist/linter/implementations/source/mutations.d.ts +3 -0
  283. package/dist/linter/implementations/source/mutations.d.ts.map +1 -0
  284. package/dist/linter/implementations/source/mutations.js +185 -0
  285. package/dist/linter/implementations/source/mutations.js.map +1 -0
  286. package/dist/linter/implementations/source/queries.d.ts +3 -0
  287. package/dist/linter/implementations/source/queries.d.ts.map +1 -0
  288. package/dist/linter/implementations/source/queries.js +1000 -0
  289. package/dist/linter/implementations/source/queries.js.map +1 -0
  290. package/dist/linter/implementations/source/rules.d.ts +3 -0
  291. package/dist/linter/implementations/source/rules.d.ts.map +1 -0
  292. package/dist/linter/implementations/source/rules.js +141 -0
  293. package/dist/linter/implementations/source/rules.js.map +1 -0
  294. package/dist/linter/implementations/source/schema.d.ts +3 -0
  295. package/dist/linter/implementations/source/schema.d.ts.map +1 -0
  296. package/dist/linter/implementations/source/schema.js +105 -0
  297. package/dist/linter/implementations/source/schema.js.map +1 -0
  298. package/dist/linter/implementations/source/shared.d.ts +42 -0
  299. package/dist/linter/implementations/source/shared.d.ts.map +1 -0
  300. package/dist/linter/implementations/source/shared.js +239 -0
  301. package/dist/linter/implementations/source/shared.js.map +1 -0
  302. package/dist/linter/implementations/source/states.d.ts +3 -0
  303. package/dist/linter/implementations/source/states.d.ts.map +1 -0
  304. package/dist/linter/implementations/source/states.js +2 -0
  305. package/dist/linter/implementations/source/states.js.map +1 -0
  306. package/dist/linter/implementations/source/tests.d.ts +3 -0
  307. package/dist/linter/implementations/source/tests.d.ts.map +1 -0
  308. package/dist/linter/implementations/source/tests.js +28 -0
  309. package/dist/linter/implementations/source/tests.js.map +1 -0
  310. package/dist/linter/implementations/source/ui.d.ts +3 -0
  311. package/dist/linter/implementations/source/ui.d.ts.map +1 -0
  312. package/dist/linter/implementations/source/ui.js +21 -0
  313. package/dist/linter/implementations/source/ui.js.map +1 -0
  314. package/dist/linter/implementations/source/utils.d.ts +3 -0
  315. package/dist/linter/implementations/source/utils.d.ts.map +1 -0
  316. package/dist/linter/implementations/source/utils.js +29 -0
  317. package/dist/linter/implementations/source/utils.js.map +1 -0
  318. package/dist/linter/implementations/source/verifiers.d.ts +3 -0
  319. package/dist/linter/implementations/source/verifiers.d.ts.map +1 -0
  320. package/dist/linter/implementations/source/verifiers.js +33 -0
  321. package/dist/linter/implementations/source/verifiers.js.map +1 -0
  322. package/dist/linter/implementations/source/views.d.ts +3 -0
  323. package/dist/linter/implementations/source/views.d.ts.map +1 -0
  324. package/dist/linter/implementations/source/views.js +36 -0
  325. package/dist/linter/implementations/source/views.js.map +1 -0
  326. package/dist/linter/implementations/source/workflows.d.ts +3 -0
  327. package/dist/linter/implementations/source/workflows.d.ts.map +1 -0
  328. package/dist/linter/implementations/source/workflows.js +308 -0
  329. package/dist/linter/implementations/source/workflows.js.map +1 -0
  330. package/dist/linter/index.d.ts +7 -8
  331. package/dist/linter/index.d.ts.map +1 -1
  332. package/dist/linter/index.js +2 -4
  333. package/dist/linter/index.js.map +1 -1
  334. package/dist/linter/lint.d.ts +22 -8
  335. package/dist/linter/lint.d.ts.map +1 -1
  336. package/dist/linter/lint.js +58 -15
  337. package/dist/linter/lint.js.map +1 -1
  338. package/dist/linter/oxlint/index.d.ts +4 -0
  339. package/dist/linter/oxlint/index.d.ts.map +1 -0
  340. package/dist/linter/oxlint/index.js +2 -0
  341. package/dist/linter/oxlint/index.js.map +1 -0
  342. package/dist/linter/oxlint/process.d.ts +6 -6
  343. package/dist/linter/oxlint/process.d.ts.map +1 -1
  344. package/dist/linter/oxlint/process.js +1 -1
  345. package/dist/linter/oxlint/process.js.map +1 -1
  346. package/dist/linter/oxlint/run.d.ts +5 -5
  347. package/dist/linter/oxlint/run.d.ts.map +1 -1
  348. package/dist/linter/oxlint/run.js +140 -20
  349. package/dist/linter/oxlint/run.js.map +1 -1
  350. package/dist/linter/oxlint-config/ignore-patterns.d.ts +6 -0
  351. package/dist/linter/oxlint-config/ignore-patterns.d.ts.map +1 -0
  352. package/dist/linter/oxlint-config/ignore-patterns.js +10 -0
  353. package/dist/linter/oxlint-config/ignore-patterns.js.map +1 -0
  354. package/dist/linter/oxlint-config/index.d.ts +5 -0
  355. package/dist/linter/oxlint-config/index.d.ts.map +1 -0
  356. package/dist/linter/oxlint-config/index.js +18 -0
  357. package/dist/linter/oxlint-config/index.js.map +1 -0
  358. package/dist/linter/packs/domain.d.ts +3 -0
  359. package/dist/linter/packs/domain.d.ts.map +1 -0
  360. package/dist/linter/packs/domain.js +8 -0
  361. package/dist/linter/packs/domain.js.map +1 -0
  362. package/dist/linter/packs/index.d.ts +9 -0
  363. package/dist/linter/packs/index.d.ts.map +1 -0
  364. package/dist/linter/packs/index.js +2 -0
  365. package/dist/linter/packs/index.js.map +1 -0
  366. package/dist/linter/policy/compile.d.ts +3 -0
  367. package/dist/linter/policy/compile.d.ts.map +1 -0
  368. package/dist/linter/policy/compile.js +256 -0
  369. package/dist/linter/policy/compile.js.map +1 -0
  370. package/dist/linter/policy/generated.d.ts +5 -0
  371. package/dist/linter/policy/generated.d.ts.map +1 -0
  372. package/dist/linter/policy/generated.js +764 -0
  373. package/dist/linter/policy/generated.js.map +1 -0
  374. package/dist/linter/policy/index.d.ts +43 -0
  375. package/dist/linter/policy/index.d.ts.map +1 -0
  376. package/dist/linter/policy/index.js +3 -0
  377. package/dist/linter/policy/index.js.map +1 -0
  378. package/dist/linter/qualification/index.d.ts +11 -0
  379. package/dist/linter/qualification/index.d.ts.map +1 -0
  380. package/dist/linter/qualification/index.js +3 -0
  381. package/dist/linter/qualification/index.js.map +1 -0
  382. package/dist/linter/qualification/query-fixtures.d.ts +3 -0
  383. package/dist/linter/qualification/query-fixtures.d.ts.map +1 -0
  384. package/dist/linter/qualification/query-fixtures.js +69 -0
  385. package/dist/linter/qualification/query-fixtures.js.map +1 -0
  386. package/dist/linter/qualification/runner.d.ts +4 -0
  387. package/dist/linter/qualification/runner.d.ts.map +1 -0
  388. package/dist/linter/qualification/runner.js +7 -0
  389. package/dist/linter/qualification/runner.js.map +1 -0
  390. package/dist/linter/report/format.d.ts +4 -0
  391. package/dist/linter/report/format.d.ts.map +1 -0
  392. package/dist/linter/report/format.js +33 -0
  393. package/dist/linter/report/format.js.map +1 -0
  394. package/dist/linter/report/index.d.ts +3 -0
  395. package/dist/linter/report/index.d.ts.map +1 -0
  396. package/dist/linter/report/index.js +2 -0
  397. package/dist/linter/report/index.js.map +1 -0
  398. package/dist/linter/requirements/index.d.ts +3 -0
  399. package/dist/linter/requirements/index.d.ts.map +1 -0
  400. package/dist/linter/requirements/index.js +2 -0
  401. package/dist/linter/requirements/index.js.map +1 -0
  402. package/dist/linter/requirements/model.d.ts +9 -0
  403. package/dist/linter/requirements/model.d.ts.map +1 -0
  404. package/dist/linter/requirements/model.js +2 -0
  405. package/dist/linter/requirements/model.js.map +1 -0
  406. package/dist/linter/requirements/registry.d.ts +4 -0
  407. package/dist/linter/requirements/registry.d.ts.map +1 -0
  408. package/dist/linter/requirements/registry.js +188 -0
  409. package/dist/linter/requirements/registry.js.map +1 -0
  410. package/dist/linter/semantics/query/decision.d.ts +5 -0
  411. package/dist/linter/semantics/query/decision.d.ts.map +1 -0
  412. package/dist/linter/semantics/query/decision.js +74 -0
  413. package/dist/linter/semantics/query/decision.js.map +1 -0
  414. package/dist/linter/semantics/query/index.d.ts +4 -0
  415. package/dist/linter/semantics/query/index.d.ts.map +1 -0
  416. package/dist/linter/semantics/query/index.js +3 -0
  417. package/dist/linter/semantics/query/index.js.map +1 -0
  418. package/dist/linter/semantics/query/observation.d.ts +36 -0
  419. package/dist/linter/semantics/query/observation.d.ts.map +1 -0
  420. package/dist/linter/semantics/query/observation.js +13 -0
  421. package/dist/linter/semantics/query/observation.js.map +1 -0
  422. package/dist/linter/suppression/apply.d.ts +4 -0
  423. package/dist/linter/suppression/apply.d.ts.map +1 -0
  424. package/dist/linter/suppression/apply.js +48 -0
  425. package/dist/linter/suppression/apply.js.map +1 -0
  426. package/dist/linter/suppression/directive.d.ts +11 -0
  427. package/dist/linter/suppression/directive.d.ts.map +1 -0
  428. package/dist/linter/suppression/directive.js +2 -0
  429. package/dist/linter/suppression/directive.js.map +1 -0
  430. package/dist/linter/suppression/index.d.ts +14 -0
  431. package/dist/linter/suppression/index.d.ts.map +1 -0
  432. package/dist/linter/suppression/index.js +2 -0
  433. package/dist/linter/suppression/index.js.map +1 -0
  434. package/dist/mutation/contract.d.ts +134 -0
  435. package/dist/mutation/contract.d.ts.map +1 -0
  436. package/dist/mutation/contract.js +2 -0
  437. package/dist/mutation/contract.js.map +1 -0
  438. package/dist/mutation/define.d.ts +9 -0
  439. package/dist/mutation/define.d.ts.map +1 -0
  440. package/dist/mutation/define.js +24 -0
  441. package/dist/mutation/define.js.map +1 -0
  442. package/dist/mutation/errors.d.ts +3 -0
  443. package/dist/mutation/errors.d.ts.map +1 -0
  444. package/dist/mutation/errors.js +30 -0
  445. package/dist/mutation/errors.js.map +1 -0
  446. package/dist/mutation/execute.d.ts +11 -0
  447. package/dist/mutation/execute.d.ts.map +1 -0
  448. package/dist/mutation/execute.js +24 -0
  449. package/dist/mutation/execute.js.map +1 -0
  450. package/dist/mutation/index.d.ts +8 -0
  451. package/dist/mutation/index.d.ts.map +1 -0
  452. package/dist/mutation/index.js +5 -0
  453. package/dist/mutation/index.js.map +1 -0
  454. package/dist/mutation/rich.d.ts +4 -0
  455. package/dist/mutation/rich.d.ts.map +1 -0
  456. package/dist/mutation/rich.js +147 -0
  457. package/dist/mutation/rich.js.map +1 -0
  458. package/dist/query/composite/contract.d.ts +37 -0
  459. package/dist/query/composite/contract.d.ts.map +1 -0
  460. package/dist/query/composite/contract.js +2 -0
  461. package/dist/query/composite/contract.js.map +1 -0
  462. package/dist/query/composite/errors.d.ts +8 -0
  463. package/dist/query/composite/errors.d.ts.map +1 -0
  464. package/dist/query/composite/errors.js +9 -0
  465. package/dist/query/composite/errors.js.map +1 -0
  466. package/dist/query/composite/index.d.ts +6 -0
  467. package/dist/query/composite/index.d.ts.map +1 -0
  468. package/dist/query/composite/index.js +3 -0
  469. package/dist/query/composite/index.js.map +1 -0
  470. package/dist/query/composite/plan.d.ts +38 -0
  471. package/dist/query/composite/plan.d.ts.map +1 -0
  472. package/dist/query/composite/plan.js +225 -0
  473. package/dist/query/composite/plan.js.map +1 -0
  474. package/dist/query/contract.d.ts +58 -0
  475. package/dist/query/contract.d.ts.map +1 -0
  476. package/dist/query/contract.js +2 -0
  477. package/dist/query/contract.js.map +1 -0
  478. package/dist/query/define.d.ts +3 -0
  479. package/dist/query/define.d.ts.map +1 -0
  480. package/dist/query/define.js +90 -0
  481. package/dist/query/define.js.map +1 -0
  482. package/dist/query/definition.d.ts +29 -0
  483. package/dist/query/definition.d.ts.map +1 -0
  484. package/dist/query/definition.js +2 -0
  485. package/dist/query/definition.js.map +1 -0
  486. package/dist/query/errors.d.ts +9 -0
  487. package/dist/query/errors.d.ts.map +1 -0
  488. package/dist/query/errors.js +15 -0
  489. package/dist/query/errors.js.map +1 -0
  490. package/dist/query/execute.d.ts +20 -0
  491. package/dist/query/execute.d.ts.map +1 -0
  492. package/dist/query/execute.js +97 -0
  493. package/dist/query/execute.js.map +1 -0
  494. package/dist/query/index.d.ts +15 -0
  495. package/dist/query/index.d.ts.map +1 -0
  496. package/dist/query/index.js +8 -0
  497. package/dist/query/index.js.map +1 -0
  498. package/dist/query/node.d.ts +109 -0
  499. package/dist/query/node.d.ts.map +1 -0
  500. package/dist/query/node.js +164 -0
  501. package/dist/query/node.js.map +1 -0
  502. package/dist/query/result/contract.d.ts +23 -0
  503. package/dist/query/result/contract.d.ts.map +1 -0
  504. package/dist/query/result/contract.js +2 -0
  505. package/dist/query/result/contract.js.map +1 -0
  506. package/dist/query/result/index.d.ts +3 -0
  507. package/dist/query/result/index.d.ts.map +1 -0
  508. package/dist/query/result/index.js +2 -0
  509. package/dist/query/result/index.js.map +1 -0
  510. package/dist/query/result/projection.d.ts +3 -0
  511. package/dist/query/result/projection.d.ts.map +1 -0
  512. package/dist/query/result/projection.js +100 -0
  513. package/dist/query/result/projection.js.map +1 -0
  514. package/dist/query/selection.d.ts +4 -0
  515. package/dist/query/selection.d.ts.map +1 -0
  516. package/dist/query/selection.js +25 -0
  517. package/dist/query/selection.js.map +1 -0
  518. package/dist/react/compile.d.ts +9 -0
  519. package/dist/react/compile.d.ts.map +1 -0
  520. package/dist/react/compile.js +64 -0
  521. package/dist/react/compile.js.map +1 -0
  522. package/dist/react/define.d.ts +8 -0
  523. package/dist/react/define.d.ts.map +1 -0
  524. package/dist/react/define.js +89 -0
  525. package/dist/react/define.js.map +1 -0
  526. package/dist/react/definition.d.ts +69 -0
  527. package/dist/react/definition.d.ts.map +1 -0
  528. package/dist/react/definition.js +2 -0
  529. package/dist/react/definition.js.map +1 -0
  530. package/dist/react/index.d.ts +4 -0
  531. package/dist/react/index.d.ts.map +1 -0
  532. package/dist/react/index.js +3 -0
  533. package/dist/react/index.js.map +1 -0
  534. package/dist/result/index.d.ts +3 -0
  535. package/dist/result/index.d.ts.map +1 -0
  536. package/dist/result/index.js +2 -0
  537. package/dist/result/index.js.map +1 -0
  538. package/dist/result/result.d.ts +10 -0
  539. package/dist/result/result.d.ts.map +1 -0
  540. package/dist/result/result.js +7 -0
  541. package/dist/result/result.js.map +1 -0
  542. package/dist/schema/index.d.ts +3 -0
  543. package/dist/schema/index.d.ts.map +1 -0
  544. package/dist/schema/index.js +3 -0
  545. package/dist/schema/index.js.map +1 -0
  546. package/dist/schema/kernel/index.d.ts +3 -0
  547. package/dist/schema/kernel/index.d.ts.map +1 -0
  548. package/dist/schema/kernel/index.js +3 -0
  549. package/dist/schema/kernel/index.js.map +1 -0
  550. package/dist/schema/v1/index.d.ts +3 -0
  551. package/dist/schema/v1/index.d.ts.map +1 -0
  552. package/dist/schema/v1/index.js +3 -0
  553. package/dist/schema/v1/index.js.map +1 -0
  554. package/dist/server/application.d.ts +36 -0
  555. package/dist/server/application.d.ts.map +1 -0
  556. package/dist/server/application.js +126 -0
  557. package/dist/server/application.js.map +1 -0
  558. package/dist/server/index.d.ts +4 -13
  559. package/dist/server/index.d.ts.map +1 -1
  560. package/dist/server/index.js +2 -8
  561. package/dist/server/index.js.map +1 -1
  562. package/dist/server/node/index.d.ts +3 -0
  563. package/dist/server/node/index.d.ts.map +1 -0
  564. package/dist/server/node/index.js +2 -0
  565. package/dist/server/node/index.js.map +1 -0
  566. package/dist/server/node/server.d.ts +14 -0
  567. package/dist/server/node/server.d.ts.map +1 -0
  568. package/dist/server/node/server.js +71 -0
  569. package/dist/server/node/server.js.map +1 -0
  570. package/dist/server/remote.d.ts +56 -0
  571. package/dist/server/remote.d.ts.map +1 -0
  572. package/dist/server/remote.js +798 -0
  573. package/dist/server/remote.js.map +1 -0
  574. package/dist/server/source.d.ts +13 -0
  575. package/dist/server/source.d.ts.map +1 -0
  576. package/dist/server/source.js +38 -0
  577. package/dist/server/source.js.map +1 -0
  578. package/dist/state/index.d.ts +4 -0
  579. package/dist/state/index.d.ts.map +1 -0
  580. package/dist/state/index.js +2 -0
  581. package/dist/state/index.js.map +1 -0
  582. package/dist/state/machine.d.ts +28 -0
  583. package/dist/state/machine.d.ts.map +1 -0
  584. package/dist/state/machine.js +32 -0
  585. package/dist/state/machine.js.map +1 -0
  586. package/dist/state/relation.d.ts +28 -0
  587. package/dist/state/relation.d.ts.map +1 -0
  588. package/dist/state/relation.js +48 -0
  589. package/dist/state/relation.js.map +1 -0
  590. package/dist/value/index.d.ts +3 -0
  591. package/dist/value/index.d.ts.map +1 -0
  592. package/dist/value/index.js +3 -0
  593. package/dist/value/index.js.map +1 -0
  594. package/dist/view/admission.d.ts +6 -0
  595. package/dist/view/admission.d.ts.map +1 -0
  596. package/dist/view/admission.js +43 -0
  597. package/dist/view/admission.js.map +1 -0
  598. package/dist/view/compile.d.ts +15 -0
  599. package/dist/view/compile.d.ts.map +1 -0
  600. package/dist/view/compile.js +189 -0
  601. package/dist/view/compile.js.map +1 -0
  602. package/dist/view/define.d.ts +20 -0
  603. package/dist/view/define.d.ts.map +1 -0
  604. package/dist/view/define.js +236 -0
  605. package/dist/view/define.js.map +1 -0
  606. package/dist/view/definition.d.ts +96 -0
  607. package/dist/view/definition.d.ts.map +1 -0
  608. package/dist/view/definition.js +2 -0
  609. package/dist/view/definition.js.map +1 -0
  610. package/dist/view/index.d.ts +4 -0
  611. package/dist/view/index.d.ts.map +1 -0
  612. package/dist/view/index.js +3 -0
  613. package/dist/view/index.js.map +1 -0
  614. package/dist/workflow/binding.d.ts +43 -0
  615. package/dist/workflow/binding.d.ts.map +1 -0
  616. package/dist/workflow/binding.js +32 -0
  617. package/dist/workflow/binding.js.map +1 -0
  618. package/dist/workflow/contract.d.ts +57 -0
  619. package/dist/workflow/contract.d.ts.map +1 -0
  620. package/dist/workflow/contract.js +2 -0
  621. package/dist/workflow/contract.js.map +1 -0
  622. package/dist/workflow/define.d.ts +4 -0
  623. package/dist/workflow/define.d.ts.map +1 -0
  624. package/dist/workflow/define.js +57 -0
  625. package/dist/workflow/define.js.map +1 -0
  626. package/dist/workflow/index.d.ts +7 -0
  627. package/dist/workflow/index.d.ts.map +1 -0
  628. package/dist/workflow/index.js +4 -0
  629. package/dist/workflow/index.js.map +1 -0
  630. package/dist/workflow/runner.d.ts +4 -0
  631. package/dist/workflow/runner.d.ts.map +1 -0
  632. package/dist/workflow/runner.js +24 -0
  633. package/dist/workflow/runner.js.map +1 -0
  634. package/dist/workflow/step/index.d.ts +3 -0
  635. package/dist/workflow/step/index.d.ts.map +1 -0
  636. package/dist/workflow/step/index.js +2 -0
  637. package/dist/workflow/step/index.js.map +1 -0
  638. package/dist/workflow/step/inline.d.ts +6 -0
  639. package/dist/workflow/step/inline.d.ts.map +1 -0
  640. package/dist/workflow/step/inline.js +44 -0
  641. package/dist/workflow/step/inline.js.map +1 -0
  642. package/dist/workflow/step/step.d.ts +5 -0
  643. package/dist/workflow/step/step.d.ts.map +1 -0
  644. package/dist/workflow/step/step.js +2 -0
  645. package/dist/workflow/step/step.js.map +1 -0
  646. package/package.json +117 -24
  647. package/dist/auth/authenticate.d.ts +0 -24
  648. package/dist/auth/authenticate.d.ts.map +0 -1
  649. package/dist/auth/authenticate.js +0 -29
  650. package/dist/auth/authenticate.js.map +0 -1
  651. package/dist/auth/check.d.ts +0 -38
  652. package/dist/auth/check.d.ts.map +0 -1
  653. package/dist/auth/check.js +0 -50
  654. package/dist/auth/check.js.map +0 -1
  655. package/dist/auth/compose.d.ts +0 -41
  656. package/dist/auth/compose.d.ts.map +0 -1
  657. package/dist/auth/compose.js +0 -45
  658. package/dist/auth/compose.js.map +0 -1
  659. package/dist/auth/errors.d.ts +0 -16
  660. package/dist/auth/errors.d.ts.map +0 -1
  661. package/dist/auth/errors.js +0 -26
  662. package/dist/auth/errors.js.map +0 -1
  663. package/dist/auth/function-context.d.ts +0 -28
  664. package/dist/auth/function-context.d.ts.map +0 -1
  665. package/dist/auth/function-context.js +0 -47
  666. package/dist/auth/function-context.js.map +0 -1
  667. package/dist/auth/identity.d.ts +0 -18
  668. package/dist/auth/identity.d.ts.map +0 -1
  669. package/dist/auth/identity.js +0 -2
  670. package/dist/auth/identity.js.map +0 -1
  671. package/dist/auth/issuer-mint.d.ts +0 -53
  672. package/dist/auth/issuer-mint.d.ts.map +0 -1
  673. package/dist/auth/issuer-mint.js +0 -35
  674. package/dist/auth/issuer-mint.js.map +0 -1
  675. package/dist/auth/kernel-client.d.ts +0 -37
  676. package/dist/auth/kernel-client.d.ts.map +0 -1
  677. package/dist/auth/kernel-client.js +0 -111
  678. package/dist/auth/kernel-client.js.map +0 -1
  679. package/dist/auth/resolve.d.ts +0 -19
  680. package/dist/auth/resolve.d.ts.map +0 -1
  681. package/dist/auth/resolve.js +0 -43
  682. package/dist/auth/resolve.js.map +0 -1
  683. package/dist/auth/sign.d.ts +0 -15
  684. package/dist/auth/sign.d.ts.map +0 -1
  685. package/dist/auth/sign.js +0 -24
  686. package/dist/auth/sign.js.map +0 -1
  687. package/dist/auth/verify.d.ts +0 -28
  688. package/dist/auth/verify.d.ts.map +0 -1
  689. package/dist/auth/verify.js +0 -151
  690. package/dist/auth/verify.js.map +0 -1
  691. package/dist/cli/spec.d.ts +0 -19
  692. package/dist/cli/spec.d.ts.map +0 -1
  693. package/dist/cli/spec.js +0 -33
  694. package/dist/cli/spec.js.map +0 -1
  695. package/dist/config/adapter.d.ts +0 -148
  696. package/dist/config/adapter.d.ts.map +0 -1
  697. package/dist/config/adapter.js +0 -40
  698. package/dist/config/adapter.js.map +0 -1
  699. package/dist/config/define-domain.d.ts +0 -177
  700. package/dist/config/define-domain.d.ts.map +0 -1
  701. package/dist/config/define-domain.js +0 -145
  702. package/dist/config/define-domain.js.map +0 -1
  703. package/dist/config/deploy.d.ts +0 -28
  704. package/dist/config/deploy.d.ts.map +0 -1
  705. package/dist/config/deploy.js +0 -24
  706. package/dist/config/deploy.js.map +0 -1
  707. package/dist/config/index.d.ts +0 -21
  708. package/dist/config/index.d.ts.map +0 -1
  709. package/dist/config/index.js +0 -18
  710. package/dist/config/index.js.map +0 -1
  711. package/dist/define/index.d.ts +0 -5
  712. package/dist/define/index.d.ts.map +0 -1
  713. package/dist/define/index.js +0 -3
  714. package/dist/define/index.js.map +0 -1
  715. package/dist/define/remote-function.d.ts +0 -120
  716. package/dist/define/remote-function.d.ts.map +0 -1
  717. package/dist/define/remote-function.js +0 -26
  718. package/dist/define/remote-function.js.map +0 -1
  719. package/dist/define/view.d.ts +0 -104
  720. package/dist/define/view.d.ts.map +0 -1
  721. package/dist/define/view.js +0 -30
  722. package/dist/define/view.js.map +0 -1
  723. package/dist/deploy/check.d.ts +0 -30
  724. package/dist/deploy/check.d.ts.map +0 -1
  725. package/dist/deploy/check.js +0 -82
  726. package/dist/deploy/check.js.map +0 -1
  727. package/dist/deploy/index.d.ts +0 -3
  728. package/dist/deploy/index.d.ts.map +0 -1
  729. package/dist/deploy/index.js +0 -3
  730. package/dist/deploy/index.js.map +0 -1
  731. package/dist/deploy/meta.d.ts +0 -29
  732. package/dist/deploy/meta.d.ts.map +0 -1
  733. package/dist/deploy/meta.js +0 -45
  734. package/dist/deploy/meta.js.map +0 -1
  735. package/dist/dispatch/authorize.d.ts +0 -14
  736. package/dist/dispatch/authorize.d.ts.map +0 -1
  737. package/dist/dispatch/authorize.js +0 -24
  738. package/dist/dispatch/authorize.js.map +0 -1
  739. package/dist/dispatch/dispatcher.d.ts +0 -59
  740. package/dist/dispatch/dispatcher.d.ts.map +0 -1
  741. package/dist/dispatch/dispatcher.js +0 -237
  742. package/dist/dispatch/dispatcher.js.map +0 -1
  743. package/dist/dispatch/errors.d.ts +0 -47
  744. package/dist/dispatch/errors.d.ts.map +0 -1
  745. package/dist/dispatch/errors.js +0 -76
  746. package/dist/dispatch/errors.js.map +0 -1
  747. package/dist/dispatch/execute.d.ts +0 -44
  748. package/dist/dispatch/execute.d.ts.map +0 -1
  749. package/dist/dispatch/execute.js +0 -29
  750. package/dist/dispatch/execute.js.map +0 -1
  751. package/dist/dispatch/identity.d.ts +0 -75
  752. package/dist/dispatch/identity.d.ts.map +0 -1
  753. package/dist/dispatch/identity.js +0 -101
  754. package/dist/dispatch/identity.js.map +0 -1
  755. package/dist/dispatch/index.d.ts +0 -7
  756. package/dist/dispatch/index.d.ts.map +0 -1
  757. package/dist/dispatch/index.js +0 -7
  758. package/dist/dispatch/index.js.map +0 -1
  759. package/dist/dispatch/resolve.d.ts +0 -27
  760. package/dist/dispatch/resolve.d.ts.map +0 -1
  761. package/dist/dispatch/resolve.js +0 -65
  762. package/dist/dispatch/resolve.js.map +0 -1
  763. package/dist/dispatch/self.d.ts +0 -51
  764. package/dist/dispatch/self.d.ts.map +0 -1
  765. package/dist/dispatch/self.js +0 -116
  766. package/dist/dispatch/self.js.map +0 -1
  767. package/dist/dispatch/validate.d.ts +0 -35
  768. package/dist/dispatch/validate.d.ts.map +0 -1
  769. package/dist/dispatch/validate.js +0 -27
  770. package/dist/dispatch/validate.js.map +0 -1
  771. package/dist/domain/binding.d.ts +0 -18
  772. package/dist/domain/binding.d.ts.map +0 -1
  773. package/dist/domain/binding.js +0 -29
  774. package/dist/domain/binding.js.map +0 -1
  775. package/dist/domain/build-spec.d.ts +0 -37
  776. package/dist/domain/build-spec.d.ts.map +0 -1
  777. package/dist/domain/build-spec.js +0 -114
  778. package/dist/domain/build-spec.js.map +0 -1
  779. package/dist/domain/contract.d.ts +0 -17
  780. package/dist/domain/contract.d.ts.map +0 -1
  781. package/dist/domain/contract.js +0 -26
  782. package/dist/domain/contract.js.map +0 -1
  783. package/dist/domain/extend-functions.d.ts +0 -48
  784. package/dist/domain/extend-functions.d.ts.map +0 -1
  785. package/dist/domain/extend-functions.js +0 -85
  786. package/dist/domain/extend-functions.js.map +0 -1
  787. package/dist/domain/extend-views.d.ts +0 -45
  788. package/dist/domain/extend-views.d.ts.map +0 -1
  789. package/dist/domain/extend-views.js +0 -116
  790. package/dist/domain/extend-views.js.map +0 -1
  791. package/dist/linter/analyze.d.ts +0 -6
  792. package/dist/linter/analyze.d.ts.map +0 -1
  793. package/dist/linter/analyze.js +0 -12
  794. package/dist/linter/analyze.js.map +0 -1
  795. package/dist/linter/diagnostic.d.ts +0 -38
  796. package/dist/linter/diagnostic.d.ts.map +0 -1
  797. package/dist/linter/diagnostic.js +0 -37
  798. package/dist/linter/diagnostic.js.map +0 -1
  799. package/dist/linter/oxlint/config.d.ts +0 -15
  800. package/dist/linter/oxlint/config.d.ts.map +0 -1
  801. package/dist/linter/oxlint/config.js +0 -23
  802. package/dist/linter/oxlint/config.js.map +0 -1
  803. package/dist/linter/oxlint/ignore-patterns.d.ts +0 -9
  804. package/dist/linter/oxlint/ignore-patterns.d.ts.map +0 -1
  805. package/dist/linter/oxlint/ignore-patterns.js +0 -18
  806. package/dist/linter/oxlint/ignore-patterns.js.map +0 -1
  807. package/dist/linter/oxlint/plugin.d.ts +0 -13
  808. package/dist/linter/oxlint/plugin.d.ts.map +0 -1
  809. package/dist/linter/oxlint/plugin.js +0 -14
  810. package/dist/linter/oxlint/plugin.js.map +0 -1
  811. package/dist/linter/preflight.d.ts +0 -2
  812. package/dist/linter/preflight.d.ts.map +0 -1
  813. package/dist/linter/preflight.js +0 -162
  814. package/dist/linter/preflight.js.map +0 -1
  815. package/dist/linter/project.d.ts +0 -18
  816. package/dist/linter/project.d.ts.map +0 -1
  817. package/dist/linter/project.js +0 -150
  818. package/dist/linter/project.js.map +0 -1
  819. package/dist/linter/report.d.ts +0 -4
  820. package/dist/linter/report.d.ts.map +0 -1
  821. package/dist/linter/report.js +0 -22
  822. package/dist/linter/report.js.map +0 -1
  823. package/dist/linter/rules/catalog.d.ts +0 -56
  824. package/dist/linter/rules/catalog.d.ts.map +0 -1
  825. package/dist/linter/rules/catalog.js +0 -53
  826. package/dist/linter/rules/catalog.js.map +0 -1
  827. package/dist/linter/rules/core-has-no-async.d.ts +0 -3
  828. package/dist/linter/rules/core-has-no-async.d.ts.map +0 -1
  829. package/dist/linter/rules/core-has-no-async.js +0 -43
  830. package/dist/linter/rules/core-has-no-async.js.map +0 -1
  831. package/dist/linter/rules/core-is-pure.d.ts +0 -3
  832. package/dist/linter/rules/core-is-pure.d.ts.map +0 -1
  833. package/dist/linter/rules/core-is-pure.js +0 -74
  834. package/dist/linter/rules/core-is-pure.js.map +0 -1
  835. package/dist/linter/rules/no-nested-steps.d.ts +0 -3
  836. package/dist/linter/rules/no-nested-steps.d.ts.map +0 -1
  837. package/dist/linter/rules/no-nested-steps.js +0 -32
  838. package/dist/linter/rules/no-nested-steps.js.map +0 -1
  839. package/dist/linter/rules/no-read-inside-mutate.d.ts +0 -3
  840. package/dist/linter/rules/no-read-inside-mutate.d.ts.map +0 -1
  841. package/dist/linter/rules/no-read-inside-mutate.js +0 -64
  842. package/dist/linter/rules/no-read-inside-mutate.js.map +0 -1
  843. package/dist/linter/rules/one-remote-definition-per-file.d.ts +0 -3
  844. package/dist/linter/rules/one-remote-definition-per-file.d.ts.map +0 -1
  845. package/dist/linter/rules/one-remote-definition-per-file.js +0 -23
  846. package/dist/linter/rules/one-remote-definition-per-file.js.map +0 -1
  847. package/dist/linter/rules/oxlint-ast.d.ts +0 -30
  848. package/dist/linter/rules/oxlint-ast.d.ts.map +0 -1
  849. package/dist/linter/rules/oxlint-ast.js +0 -104
  850. package/dist/linter/rules/oxlint-ast.js.map +0 -1
  851. package/dist/linter/rules/oxlint-rule.d.ts +0 -45
  852. package/dist/linter/rules/oxlint-rule.d.ts.map +0 -1
  853. package/dist/linter/rules/oxlint-rule.js +0 -2
  854. package/dist/linter/rules/oxlint-rule.js.map +0 -1
  855. package/dist/linter/rules/project-rule.d.ts +0 -10
  856. package/dist/linter/rules/project-rule.d.ts.map +0 -1
  857. package/dist/linter/rules/project-rule.js +0 -24
  858. package/dist/linter/rules/project-rule.js.map +0 -1
  859. package/dist/linter/rules/thin-schema-composition-root.d.ts +0 -3
  860. package/dist/linter/rules/thin-schema-composition-root.d.ts.map +0 -1
  861. package/dist/linter/rules/thin-schema-composition-root.js +0 -23
  862. package/dist/linter/rules/thin-schema-composition-root.js.map +0 -1
  863. package/dist/linter/source.d.ts +0 -24
  864. package/dist/linter/source.d.ts.map +0 -1
  865. package/dist/linter/source.js +0 -279
  866. package/dist/linter/source.js.map +0 -1
  867. package/dist/linter/suppression.d.ts +0 -3
  868. package/dist/linter/suppression.d.ts.map +0 -1
  869. package/dist/linter/suppression.js +0 -11
  870. package/dist/linter/suppression.js.map +0 -1
  871. package/dist/method/class.d.ts +0 -71
  872. package/dist/method/class.d.ts.map +0 -1
  873. package/dist/method/class.js +0 -26
  874. package/dist/method/class.js.map +0 -1
  875. package/dist/method/context.d.ts +0 -99
  876. package/dist/method/context.d.ts.map +0 -1
  877. package/dist/method/context.js +0 -11
  878. package/dist/method/context.js.map +0 -1
  879. package/dist/method/index.d.ts +0 -6
  880. package/dist/method/index.d.ts.map +0 -1
  881. package/dist/method/index.js +0 -3
  882. package/dist/method/index.js.map +0 -1
  883. package/dist/method/single.d.ts +0 -81
  884. package/dist/method/single.d.ts.map +0 -1
  885. package/dist/method/single.js +0 -8
  886. package/dist/method/single.js.map +0 -1
  887. package/dist/server/auxiliary-routes.d.ts +0 -48
  888. package/dist/server/auxiliary-routes.d.ts.map +0 -1
  889. package/dist/server/auxiliary-routes.js +0 -322
  890. package/dist/server/auxiliary-routes.js.map +0 -1
  891. package/dist/server/config.d.ts +0 -83
  892. package/dist/server/config.d.ts.map +0 -1
  893. package/dist/server/config.js +0 -8
  894. package/dist/server/config.js.map +0 -1
  895. package/dist/server/create.d.ts +0 -8
  896. package/dist/server/create.d.ts.map +0 -1
  897. package/dist/server/create.js +0 -171
  898. package/dist/server/create.js.map +0 -1
  899. package/dist/server/domain-entry.d.ts +0 -77
  900. package/dist/server/domain-entry.d.ts.map +0 -1
  901. package/dist/server/domain-entry.js +0 -60
  902. package/dist/server/domain-entry.js.map +0 -1
  903. package/dist/server/handle.d.ts +0 -35
  904. package/dist/server/handle.d.ts.map +0 -1
  905. package/dist/server/handle.js +0 -9
  906. package/dist/server/handle.js.map +0 -1
  907. package/dist/server/jwks.d.ts +0 -11
  908. package/dist/server/jwks.d.ts.map +0 -1
  909. package/dist/server/jwks.js +0 -15
  910. package/dist/server/jwks.js.map +0 -1
  911. package/dist/server/require-env.d.ts +0 -15
  912. package/dist/server/require-env.d.ts.map +0 -1
  913. package/dist/server/require-env.js +0 -21
  914. package/dist/server/require-env.js.map +0 -1
  915. package/dist/server/service-entry.d.ts +0 -32
  916. package/dist/server/service-entry.d.ts.map +0 -1
  917. package/dist/server/service-entry.js +0 -150
  918. package/dist/server/service-entry.js.map +0 -1
  919. package/dist/server/serving-url.d.ts +0 -14
  920. package/dist/server/serving-url.d.ts.map +0 -1
  921. package/dist/server/serving-url.js +0 -28
  922. package/dist/server/serving-url.js.map +0 -1
  923. package/dist/server/start.d.ts +0 -11
  924. package/dist/server/start.d.ts.map +0 -1
  925. package/dist/server/start.js +0 -34
  926. package/dist/server/start.js.map +0 -1
  927. package/dist/server/worker-entry.d.ts +0 -157
  928. package/dist/server/worker-entry.d.ts.map +0 -1
  929. package/dist/server/worker-entry.js +0 -201
  930. package/dist/server/worker-entry.js.map +0 -1
  931. package/dist/service/functions.d.ts +0 -148
  932. package/dist/service/functions.d.ts.map +0 -1
  933. package/dist/service/functions.js +0 -115
  934. package/dist/service/functions.js.map +0 -1
  935. package/dist/service/index.d.ts +0 -3
  936. package/dist/service/index.d.ts.map +0 -1
  937. package/dist/service/index.js +0 -2
  938. package/dist/service/index.js.map +0 -1
  939. package/dist/step/index.d.ts +0 -5
  940. package/dist/step/index.d.ts.map +0 -1
  941. package/dist/step/index.js +0 -3
  942. package/dist/step/index.js.map +0 -1
  943. package/dist/step/inline.d.ts +0 -8
  944. package/dist/step/inline.d.ts.map +0 -1
  945. package/dist/step/inline.js +0 -22
  946. package/dist/step/inline.js.map +0 -1
  947. package/dist/step/step.d.ts +0 -28
  948. package/dist/step/step.d.ts.map +0 -1
  949. package/dist/step/step.js +0 -53
  950. package/dist/step/step.js.map +0 -1
  951. package/src/auth/authenticate.ts +0 -51
  952. package/src/auth/check.ts +0 -69
  953. package/src/auth/compose.ts +0 -56
  954. package/src/auth/errors.ts +0 -32
  955. package/src/auth/function-context.ts +0 -108
  956. package/src/auth/identity.ts +0 -17
  957. package/src/auth/index.ts +0 -19
  958. package/src/auth/issuer-mint.ts +0 -76
  959. package/src/auth/kernel-client.ts +0 -153
  960. package/src/auth/resolve.ts +0 -63
  961. package/src/auth/sign.ts +0 -36
  962. package/src/auth/verify.ts +0 -199
  963. package/src/cli/bin.ts +0 -15
  964. package/src/cli/dotenv.ts +0 -65
  965. package/src/cli/index.ts +0 -15
  966. package/src/cli/log.ts +0 -18
  967. package/src/cli/publish.ts +0 -341
  968. package/src/cli/run.ts +0 -769
  969. package/src/cli/spec.ts +0 -44
  970. package/src/config/adapter.ts +0 -177
  971. package/src/config/define-domain.ts +0 -354
  972. package/src/config/deploy.ts +0 -35
  973. package/src/config/index.ts +0 -31
  974. package/src/define/index.ts +0 -10
  975. package/src/define/remote-function.ts +0 -184
  976. package/src/define/view.ts +0 -112
  977. package/src/deploy/check.ts +0 -124
  978. package/src/deploy/index.ts +0 -2
  979. package/src/deploy/meta.ts +0 -50
  980. package/src/dispatch/authorize.ts +0 -29
  981. package/src/dispatch/dispatcher.ts +0 -321
  982. package/src/dispatch/errors.ts +0 -94
  983. package/src/dispatch/execute.ts +0 -67
  984. package/src/dispatch/identity.ts +0 -143
  985. package/src/dispatch/index.ts +0 -16
  986. package/src/dispatch/resolve.ts +0 -78
  987. package/src/dispatch/self.ts +0 -198
  988. package/src/dispatch/validate.ts +0 -41
  989. package/src/domain/binding.ts +0 -37
  990. package/src/domain/build-spec.ts +0 -156
  991. package/src/domain/contract.ts +0 -41
  992. package/src/domain/define.ts +0 -162
  993. package/src/domain/extend-functions.ts +0 -110
  994. package/src/domain/extend-views.ts +0 -151
  995. package/src/domain/index.ts +0 -4
  996. package/src/index.ts +0 -165
  997. package/src/linter/analyze.ts +0 -17
  998. package/src/linter/diagnostic.ts +0 -85
  999. package/src/linter/docs/DIAGNOSTICS.md +0 -47
  1000. package/src/linter/docs/JUDGMENT.md +0 -81
  1001. package/src/linter/docs/PRINCIPLES.md +0 -97
  1002. package/src/linter/docs/README.md +0 -38
  1003. package/src/linter/docs/RULE-AUTHORING.md +0 -144
  1004. package/src/linter/docs/RULES.md +0 -153
  1005. package/src/linter/index.ts +0 -15
  1006. package/src/linter/lint.ts +0 -34
  1007. package/src/linter/oxlint/astrale-ox.d.ts +0 -5
  1008. package/src/linter/oxlint/config.ts +0 -24
  1009. package/src/linter/oxlint/ignore-patterns.ts +0 -17
  1010. package/src/linter/oxlint/plugin.js +0 -16
  1011. package/src/linter/oxlint/process.ts +0 -219
  1012. package/src/linter/oxlint/run.ts +0 -175
  1013. package/src/linter/preflight.ts +0 -182
  1014. package/src/linter/project.ts +0 -190
  1015. package/src/linter/report.ts +0 -25
  1016. package/src/linter/rules/catalog.ts +0 -67
  1017. package/src/linter/rules/core-has-no-async.js +0 -43
  1018. package/src/linter/rules/core-is-pure.ts +0 -103
  1019. package/src/linter/rules/no-nested-steps.js +0 -37
  1020. package/src/linter/rules/no-read-inside-mutate.js +0 -72
  1021. package/src/linter/rules/one-remote-definition-per-file.ts +0 -29
  1022. package/src/linter/rules/oxlint-ast.js +0 -110
  1023. package/src/linter/rules/oxlint-rule.ts +0 -35
  1024. package/src/linter/rules/project-rule.ts +0 -37
  1025. package/src/linter/rules/thin-schema-composition-root.ts +0 -26
  1026. package/src/linter/source.ts +0 -323
  1027. package/src/linter/suppression.ts +0 -11
  1028. package/src/method/class.ts +0 -163
  1029. package/src/method/context.ts +0 -135
  1030. package/src/method/index.ts +0 -19
  1031. package/src/method/single.ts +0 -166
  1032. package/src/server/auxiliary-routes.ts +0 -456
  1033. package/src/server/config.ts +0 -85
  1034. package/src/server/create.ts +0 -210
  1035. package/src/server/domain-entry.ts +0 -125
  1036. package/src/server/handle.ts +0 -37
  1037. package/src/server/index.ts +0 -19
  1038. package/src/server/jwks.ts +0 -18
  1039. package/src/server/require-env.ts +0 -19
  1040. package/src/server/service-entry.ts +0 -209
  1041. package/src/server/serving-url.ts +0 -28
  1042. package/src/server/start.ts +0 -42
  1043. package/src/server/worker-entry.ts +0 -286
  1044. package/src/service/functions.ts +0 -164
  1045. package/src/service/index.ts +0 -18
  1046. package/src/step/index.ts +0 -4
  1047. package/src/step/inline.ts +0 -38
  1048. package/src/step/step.ts +0 -95
package/src/cli/spec.ts DELETED
@@ -1,44 +0,0 @@
1
- /**
2
- * Build a diagnostic spec (wire graph + schema hash) from the project's
3
- * `defineDomain` definition. This mirrors what the codegen'd worker assembles —
4
- * but only for inspection / `/meta` provenance. The live install bundle is
5
- * always produced by the worker at request time, so a failure here is non-fatal
6
- * for dev/deploy (the CLI logs and continues) and fatal only for
7
- * `astrale-domain build`, where the spec IS the product.
8
- *
9
- * The modules (`schema` / `methods` / `views` / `functions`) come straight off
10
- * the definition — the SAME values the author wired into `defineDomain`, which
11
- * the adapter codegen also assembles. One source, no second filesystem probe to
12
- * drift from it.
13
- */
14
-
15
- import type { Schema } from '@astrale-os/kernel-dsl'
16
-
17
- import { hashInstallGraph } from '@astrale-os/kernel-core/domain'
18
-
19
- import type { DomainDefinition } from '../config/define-domain.js'
20
- import type { RemoteDomainConfig } from '../domain/index.js'
21
-
22
- import { buildInstallGraph, defineRemoteDomain } from '../domain/index.js'
23
-
24
- export async function buildProjectSpec(
25
- def: DomainDefinition,
26
- url: string,
27
- ): Promise<{ wire: Record<string, unknown>; schemaHash: string }> {
28
- // The definition's module values are untyped against `RemoteDomainConfig` by
29
- // nature (deps/schema generics erased on `DomainDefinition`); funnel them
30
- // through ONE cast into the config shape `defineRemoteDomain` validates.
31
- const config = {
32
- schema: def.schema,
33
- methods: def.methods,
34
- ...(def.core ? { core: def.core } : {}),
35
- ...(def.views ? { views: def.views } : {}),
36
- ...(def.functions ? { remoteFunctions: def.functions } : {}),
37
- ...(def.path ? { path: def.path } : {}),
38
- } as RemoteDomainConfig<Schema, unknown>
39
-
40
- const domain = defineRemoteDomain<unknown>()(config)
41
- const wire = buildInstallGraph(domain, url)
42
- const schemaHash = await hashInstallGraph(wire)
43
- return { wire: wire as unknown as Record<string, unknown>, schemaHash }
44
- }
@@ -1,177 +0,0 @@
1
- /**
2
- * The deployment-adapter contract.
3
- *
4
- * A deployment target = one npm package implementing `DomainAdapter<Params>`.
5
- * The adapter is GENERIC over its own `Params` so envs AND provider settings
6
- * stay 100% adapter-specific (a Cloudflare adapter's `{ route, secrets }` is
7
- * nothing like a Node adapter's `{ port }`). The CLI resolves
8
- * `envs[<env>] → Params` via `adapter.params(env)` and then drives the adapter
9
- * with the resolved params — install of the resulting URL and the `requires`
10
- * check are generic and live in the CLI, never in the adapter.
11
- *
12
- * The central guarantee: `watch()` and `deploy()` both return a `url` — that's
13
- * what the CLI prints, what `astrale domain install <url>` consumes, and
14
- * the worker's `iss` identity. The URL is an OUTPUT of watch/deploy; nothing
15
- * in the contract asks an adapter to predict it ahead of time.
16
- */
17
-
18
- /**
19
- * Generic, target-independent domain metadata the CLI hands every adapter so
20
- * it can codegen the worker entry. (Extends the bare `WatchCtx`/`DeployCtx` of
21
- * the spec with the fields a real codegen needs.)
22
- */
23
- export interface DomainInfo {
24
- /**
25
- * The domain's addressing name — the graph slug it mounts under (e.g.
26
- * `'crm.acme.dev'`). NOT the cryptographic identity: the JWT `iss` is the
27
- * worker's serving URL, pinned by the kernel at install time.
28
- */
29
- origin: string
30
- /** Cross-domain deps by origin — verified at install (CLI/kernel), not here. */
31
- requires: readonly string[]
32
- /** Optional Astrale Path called by the kernel after install (as __SYSTEM__). */
33
- postInstall?: string
34
- /**
35
- * Whether the domain declares Views / standalone Functions — read from the
36
- * `defineDomain` definition, NOT probed from the filesystem. The adapter
37
- * codegen imports the corresponding module only when true.
38
- */
39
- hasViews: boolean
40
- hasFunctions: boolean
41
- /**
42
- * Views whose binding is backed by a worker-relative SPA mount. This is domain
43
- * contract metadata (`defineView({ mount })`), not a frontend source folder:
44
- * adapters decide, per env, which client assets serve these mounts.
45
- */
46
- mountedViews: Array<{ slug: string; mount: string }>
47
- /**
48
- * Whether the domain declares a `deps` mapper (`defineDomain({ deps })`).
49
- * When true the adapter codegen imports it from the domain's fixed `deps`
50
- * module and passes it to the worker entry; when false the worker passes the
51
- * raw env straight through as `ctx.deps`. Read from the definition, never
52
- * probed from the filesystem.
53
- */
54
- hasDeps: boolean
55
- }
56
-
57
- export interface WatchCtx {
58
- /** Absolute path to the domain project root. */
59
- projectDir: string
60
- /** Absolute path where the CLI writes the diagnostic `spec.json`. */
61
- specPath: string
62
- /** Flat secret map loaded from the env's `secrets` file — injected locally in dev. */
63
- secrets: Record<string, string>
64
- /** Domain metadata for codegen. */
65
- domain: DomainInfo
66
- /** The env key being watched (e.g. 'dev'). */
67
- env: string
68
- /** Invoked by the adapter on every hot-reload so the CLI can re-log. */
69
- onReload(): void
70
- }
71
-
72
- export interface DeployCtx {
73
- projectDir: string
74
- specPath: string
75
- /** Flat secret map loaded from the env's `secrets` file (gitignored). */
76
- secrets: Record<string, string>
77
- domain: DomainInfo
78
- /** The env key being deployed (e.g. 'dev' | 'prod' | 'canary'). */
79
- env: string
80
- /**
81
- * Build the expected install-graph hash for a concrete serving URL from the
82
- * current domain definition. Adapters that must verify live drift during
83
- * deploy should use this instead of reading `.astrale/spec.json`, which is a
84
- * post-deploy diagnostic artifact and may be stale.
85
- */
86
- schemaHashForUrl?(url: string): Promise<string | undefined>
87
- }
88
-
89
- /** A running local watch — exposes its URL and a stop handle. */
90
- export interface WatchHandle {
91
- /** Local URL the worker is reachable at (e.g. http://localhost:8787). */
92
- url: string
93
- stop(): Promise<void>
94
- }
95
-
96
- /** A completed deploy — the authoritative public URL. */
97
- export interface DeployResult {
98
- url: string
99
- /**
100
- * Adapter-specific next-steps block printed INSTEAD of the CLI's default
101
- * "install on an instance" footer — managed deploys already installed the
102
- * domain, so the default hint is wrong there. Pre-indented plain lines.
103
- */
104
- nextSteps?: string
105
- }
106
-
107
- export interface DomainAdapter<Params> {
108
- /** 'astrale-host' | 'cloudflare' | 'node' | … */
109
- name: string
110
-
111
- /** Resolve an env key to this adapter's typed params. Throws on unknown key. */
112
- params(env: string): Params
113
-
114
- /** Local + hot-reload (watch) → controllable handle. Orthogonal to env. */
115
- watch(params: Params, ctx: WatchCtx): Promise<WatchHandle>
116
-
117
- /**
118
- * Optional: re-run codegen for an ALREADY-RUNNING `watch` after
119
- * `astrale.config.ts` changed — same shape as `watch` but it must NOT spawn
120
- * anything: it only rewrites the generated files, and the running dev server
121
- * (which watches them, e.g. `wrangler dev` on its `--config`) picks them up.
122
- * Adapters without it fall back to "restart to apply config changes".
123
- */
124
- regenerate?(params: Params, ctx: WatchCtx): Promise<void>
125
-
126
- /** Build + bundle + ship (the adapter owns ITS build) → authoritative URL. */
127
- deploy(params: Params, ctx: DeployCtx): Promise<DeployResult>
128
-
129
- /**
130
- * Optional: the path (relative to the project root) of the gitignored secrets
131
- * file for these params. The CLI loads it and passes the parsed map as
132
- * `ctx.secrets` — keeping secret-file loading generic while the path stays
133
- * provider-typed. Return `undefined` for "no secrets file".
134
- */
135
- secretsFile?(params: Params): string | undefined
136
- }
137
-
138
- /**
139
- * Spec passed to `defineAdapter` — identical to `DomainAdapter` minus the
140
- * `params(env)` resolver, which the helper attaches from `envs`. Custom adapter
141
- * authors use this so they never re-implement env→params resolution.
142
- */
143
- export interface AdapterSpec<Params> {
144
- name: string
145
- /** The provider-typed env map (`{ dev: {...}, prod: {...}, … }`). */
146
- envs: Record<string, Params>
147
- watch(params: Params, ctx: WatchCtx): Promise<WatchHandle>
148
- regenerate?(params: Params, ctx: WatchCtx): Promise<void>
149
- deploy(params: Params, ctx: DeployCtx): Promise<DeployResult>
150
- secretsFile?(params: Params): string | undefined
151
- }
152
-
153
- /**
154
- * Build a `DomainAdapter` from a spec + an env map, attaching a `params(env)`
155
- * resolver that throws a clear error on an unknown key (listing the valid ones).
156
- */
157
- export function defineAdapter<Params>(spec: AdapterSpec<Params>): DomainAdapter<Params> {
158
- const keys = Object.keys(spec.envs)
159
- return {
160
- name: spec.name,
161
- params(env: string): Params {
162
- const params = spec.envs[env]
163
- if (params === undefined) {
164
- const known = keys.length ? keys.join(', ') : '(none)'
165
- throw new Error(
166
- `Adapter "${spec.name}": unknown env "${env}". Known envs: ${known}. ` +
167
- `Add it to the adapter's env map in astrale.config.ts.`,
168
- )
169
- }
170
- return params
171
- },
172
- watch: spec.watch,
173
- deploy: spec.deploy,
174
- ...(spec.regenerate ? { regenerate: spec.regenerate } : {}),
175
- ...(spec.secretsFile ? { secretsFile: spec.secretsFile } : {}),
176
- }
177
- }
@@ -1,354 +0,0 @@
1
- /**
2
- * `defineDomain` — the WORKER-SAFE definition of a domain: what the domain *is*
3
- * (its `schema`, `methods`, `deps`, `views`, standalone `functions`) plus its
4
- * addressing identity (`origin`, `requires`, `postInstall`). It
5
- * deliberately carries NO deployment adapter — the adapter (`cloudflare(...)`,
6
- * `astrale(...)`) is node-only code (filesystem, wrangler) that must never enter
7
- * the worker bundle. The author wires this in a `domain.ts` the generated worker
8
- * imports directly, then attaches the adapter separately with `deploy(domain,
9
- * adapter)` in `astrale.config.ts` (see `./deploy`).
10
- *
11
- * The modules are wired EXPLICITLY here — imported and passed in — not
12
- * discovered from magic folder names. A renamed or mistyped module is a compile
13
- * error at this call site, never a silently-missing worker route. The adapter
14
- * reads this one definition for domain-side codegen; frontend source folders
15
- * live in adapter env config. `defineDomain` itself builds no server and boots
16
- * no kernel — it validates and packages the declaration.
17
- */
18
-
19
- import type { Core, Schema } from '@astrale-os/kernel-dsl'
20
-
21
- import { DomainOrigin } from '@astrale-os/kernel-core/domain'
22
-
23
- import type { AnyRemoteFunctionDef, ViewDef } from '../define/index.js'
24
- import type { SchemaMethodsImpl } from '../method/index.js'
25
-
26
- // A registry holds views / functions of every deps + param/result shape. Their
27
- // per-entry typing is enforced at the `defineView` / `defineRemoteFunction` call
28
- // site; here they're held loosely and, crucially, kept OUT of `TDeps` inference
29
- // — so `TDeps` is fixed by `methods` alone (the authoritative deps source) and a
30
- // view authored with the default `unknown` deps can't fight `methods`'s `Env`.
31
- // oxlint-disable-next-line no-explicit-any
32
- type AnyViewDef = ViewDef<any>
33
- // The function bag is the canonical, variance-correct one from `../define` (it
34
- // must accept functions of any auth policy — see the note there). Aliased to
35
- // keep the local usages below terse.
36
- type AnyFunctionDef = AnyRemoteFunctionDef
37
-
38
- /**
39
- * Optional presentation metadata for the domain, served verbatim on the
40
- * worker's `/meta` endpoint (see `../deploy/meta`) so a host UI can brand a
41
- * freshly-installed domain. Both the block and every field are optional.
42
- */
43
- export interface DomainManifest {
44
- /** Domain logo — an inline SVG string or a `data:` URL (no extra validation). */
45
- logo?: string
46
- /**
47
- * Slug of one of THIS domain's own views to open first — the domain's entry
48
- * surface. This is the SERVED form: a plain slug, stamped verbatim onto
49
- * `/meta`. Authors don't write the slug directly — they pass the view OBJECT
50
- * to `defineDomain` (see {@link DomainManifestConfig.entrypoint}), which
51
- * resolves it to this slug. Pinned at app install to the `View` node at
52
- * `/<origin>/views/<slug>` via the app's `entrypoint` edge.
53
- */
54
- entrypoint?: string
55
- /**
56
- * The ROLES this domain declares — named capability identities a workspace
57
- * registers when an app for this domain is installed, then assigns to users
58
- * (`default: true` roles are auto-assigned to the installing user). The
59
- * domain itself grants each role its resource permissions (typically in its
60
- * `postInstall`); declaring a role here only names it. Slugs are validated
61
- * (lowercase slug charset, unique) at `defineDomain`.
62
- */
63
- roles?: readonly DomainRoleDecl[]
64
- }
65
-
66
- /** One declared role of the domain (see {@link DomainManifest.roles}). */
67
- export interface DomainRoleDecl {
68
- /** Stable role slug, unique within the domain (e.g. `"editor"`). */
69
- slug: string
70
- /** Display name; defaults to the slug. */
71
- name?: string
72
- /** What holding this role means — shown in permission UIs. */
73
- description?: string
74
- /** Auto-assign this role to the user installing an app for this domain. */
75
- default?: boolean
76
- }
77
-
78
- /**
79
- * The author-facing manifest accepted by {@link defineDomain} — identical to the
80
- * served {@link DomainManifest} except `entrypoint` is the view OBJECT (a value
81
- * of the `views` map) rather than its slug. `defineDomain` resolves it to the
82
- * slug by identity, so a renamed or dropped view is a compile error at the
83
- * reference site, never a stale string (the same guarantee `postInstall` gives
84
- * for functions).
85
- */
86
- export interface DomainManifestConfig extends Omit<DomainManifest, 'entrypoint'> {
87
- /**
88
- * The view to open first — the domain's entry surface. Pass the view OBJECT
89
- * from this domain's own `views` map (e.g. `entrypoint: views.welcome`).
90
- * Resolved to its slug here and served as {@link DomainManifest.entrypoint}.
91
- */
92
- entrypoint?: AnyViewDef
93
- }
94
-
95
- export interface DefineDomainConfig<S extends Schema, TDeps, TEnv = unknown> {
96
- /** The domain schema (from `schema/`). Its `.domain` seeds the default origin. */
97
- schema: S
98
- /**
99
- * The domain's method implementations (from `methods/`), one per schema
100
- * method. Typed against `schema` — an unimplemented or misnamed method is a
101
- * compile error here.
102
- */
103
- methods: SchemaMethodsImpl<S, TDeps>
104
- /** Declarative genesis nodes and edges materialized with the domain at install time. */
105
- core?: Core<S>
106
- /**
107
- * Map the worker `env` to the handler dependency container (`ctx.deps`).
108
- * Run ONCE per cold isolate per serving URL (the built app is cached), NOT
109
- * per request — so it's the place to construct ports/clients once instead of
110
- * re-deriving them in every handler. Its return type IS `TDeps`: type it the
111
- * shape your `methods` read (e.g. `(env) => ({ platform: buildPlatform(env) })`)
112
- * and the methods get the rich container, not raw env. The same value reaches
113
- * view/function handlers and the `install.authorize` hook.
114
- *
115
- * Omit for the common case: `env` is passed straight through (`TDeps = TEnv`),
116
- * so existing domains are unaffected. The function itself is imported by the
117
- * generated worker from a fixed `deps` module, mirroring `methods` — wire it
118
- * here so the type check binds `env → TDeps` and the adapter knows to emit it.
119
- */
120
- deps?: (env: TEnv, url: string) => TDeps
121
- /**
122
- * The domain's Views (iframe-mountable UIs), keyed by slug. Omit when the
123
- * domain has none. Each becomes a `View` node + a worker route.
124
- */
125
- views?: Record<string, AnyViewDef>
126
- /**
127
- * The domain's standalone Functions (callables not bound to a class), keyed
128
- * by slug. Omit when the domain has none.
129
- */
130
- functions?: Record<string, AnyFunctionDef>
131
- /**
132
- * Optional presentation metadata stamped onto `/meta`. When `manifest.entrypoint`
133
- * is set it MUST be a view from this domain's own `views` map — passed as the
134
- * OBJECT (`entrypoint: views.welcome`), resolved to its slug here. A view that
135
- * isn't in `views` is a compile error at the reference site, and the
136
- * resolution throws loudly if it's somehow absent — so a typo can never dangle
137
- * to a NOT_FOUND view path at install.
138
- */
139
- manifest?: DomainManifestConfig
140
- /**
141
- * The domain's **addressing name** (the graph slug it mounts under, e.g.
142
- * `'crm.acme.dev'`). Defaults to `schema.domain`. Must be a name, never a
143
- * URL. This is **NOT** the cryptographic identity: the `iss` is the worker's
144
- * **serving URL**, pinned by the kernel to the URL it fetched the domain at
145
- * during install (and verified against that URL's JWKS). `origin` is a free
146
- * addressing label, only required to be unique in the graph.
147
- */
148
- origin?: string
149
- /** Cross-domain deps, by origin. Verified present on the instance at install. */
150
- requires?: readonly string[]
151
- /**
152
- * Where the Domain node physically lives in the graph TREE — an absolute tree
153
- * path whose LAST segment is the origin (e.g. `'/domains/crm.acme.dev'`).
154
- * Optional; defaults to `/domains/<origin>`. This moves ONLY the physical
155
- * `has_parent` position: the domain's `installed_in` edge and EVERY typed
156
- * address (`/:<origin>`, `/:<origin>:Class`, …) stay ROOT-mounted, so
157
- * addressing is unchanged. A platform domain that must stay top-level sets its
158
- * own origin path (e.g. `'/shell.astrale.ai'`).
159
- */
160
- path?: string
161
- /**
162
- * The function the kernel runs once after install, as __SYSTEM__ — where the
163
- * domain seeds itself / posts its own grants. Reference it from the `functions`
164
- * map: `postInstall: functions.seed`. The SDK derives its path by identity, so a
165
- * typo or a renamed key is a compile error here, never a stale string. It is
166
- * always a standalone function (a domain bootstrap belongs to the domain, not to
167
- * a class) under THIS domain — you never write the origin, and the kernel
168
- * resolves it relative to wherever the domain is installed.
169
- */
170
- postInstall?: AnyFunctionDef
171
- }
172
-
173
- export interface DomainDefinition {
174
- schema: Schema
175
- // oxlint-disable-next-line no-explicit-any -- erased at the consumption casts in spec/codegen
176
- methods: SchemaMethodsImpl<Schema, any>
177
- /** Declarative genesis nodes and edges, preserved through codegen and diagnostic builds. */
178
- core?: Core<Schema>
179
- /**
180
- * env → deps mapper, when the author supplied one. Held loosely (the worker
181
- * imports the real function from its own `deps` module); the CLI reads only
182
- * its PRESENCE to set `DomainInfo.hasDeps`, the codegen signal.
183
- */
184
- // oxlint-disable-next-line no-explicit-any -- presence is what the CLI consumes; the typed binding lives at the call site
185
- deps?: (env: any, url: string) => any
186
- views?: Record<string, ViewDef>
187
- functions?: Record<string, AnyFunctionDef>
188
- /** Presentation metadata for `/meta`, validated at definition time. */
189
- manifest?: DomainManifest
190
- origin: string
191
- requires: readonly string[]
192
- postInstall?: string
193
- /** Physical tree path for the Domain node; default `/domains/<origin>`. */
194
- path?: string
195
- }
196
-
197
- export function defineDomain<S extends Schema, TDeps, TEnv = unknown>(
198
- config: DefineDomainConfig<S, TDeps, TEnv>,
199
- ): DomainDefinition {
200
- const rawOrigin = config.origin ?? schemaDomain(config.schema)
201
- if (!rawOrigin) {
202
- throw new Error(
203
- 'defineDomain: could not resolve `origin`. Set it explicitly or give the ' +
204
- 'schema a base domain (`defineSchema("crm.acme.dev", …)`).',
205
- )
206
- }
207
- if (/^[a-z][a-z0-9+.-]*:\/\//i.test(rawOrigin)) {
208
- throw new Error(
209
- `defineDomain: \`origin\` must be a stable name (e.g. "crm.acme.dev"), not a URL — got "${rawOrigin}". ` +
210
- 'The deployment URL is an output of deploy, not the identity.',
211
- )
212
- }
213
- // Canonicalize + validate the origin exactly as the kernel does (lowercased,
214
- // FQDN-like, matches DOMAIN_ORIGIN_RE). Failing HERE gives a clear authoring-
215
- // time error instead of a cryptic failure deep in codegen / install, and makes
216
- // `origin` the same lowercased form the kernel stores graph nodes under.
217
- let origin: string
218
- try {
219
- origin = DomainOrigin(rawOrigin)
220
- } catch {
221
- throw new Error(
222
- `defineDomain: invalid \`origin\` "${rawOrigin}". Use a lowercase FQDN-like slug ` +
223
- '(letters, digits, ".", "_", "-"), e.g. "crm.acme.dev".',
224
- )
225
- }
226
-
227
- // `requires` entries are domain origins — validate them with the same rule as
228
- // `origin` so a URL or mixed-case entry fails at authoring time, not install.
229
- const requires = (config.requires ?? []).map((dep) => {
230
- try {
231
- return DomainOrigin(dep)
232
- } catch {
233
- throw new Error(
234
- `defineDomain: invalid \`requires\` entry "${dep}". Use the dependency's origin slug ` +
235
- '(lowercase FQDN-like, e.g. "example.astrale.ai"), not a URL.',
236
- )
237
- }
238
- })
239
-
240
- // `path`, when set, is the Domain's physical tree path. Validate the
241
- // two invariants the serializer/kernel rely on, string-only (no AbsolutePath
242
- // import — this module must stay worker-safe): it is absolute with at least one
243
- // segment, and its LAST segment equals the origin (the kernel derives origin
244
- // from the mount basename in a few places, e.g. has_parent slug + get-access-
245
- // token origin recovery). Full structural parse happens at build time.
246
- if (config.path !== undefined) {
247
- const loc = config.path
248
- if (!loc.startsWith('/') || loc === '/') {
249
- throw new Error(
250
- `defineDomain: \`path\` must be an absolute graph path with at least ` +
251
- `one segment (e.g. "/domains/${origin}"), not "${loc}".`,
252
- )
253
- }
254
- if (loc.split('/').pop() !== origin) {
255
- throw new Error(
256
- `defineDomain: \`path\` last segment must equal the origin "${origin}" ` +
257
- `(e.g. "/domains/${origin}" or "/${origin}"), got "${loc}".`,
258
- )
259
- }
260
- }
261
-
262
- // A `manifest.entrypoint` view is resolved to its slug below (in the return),
263
- // where a view absent from `views` throws — see `resolveManifest`.
264
-
265
- // Declared roles must carry valid, unique slugs — a role slug becomes a graph
266
- // path segment and an identity subject, so the kernel's reserved separators
267
- // (`/`, `:`, `@`) can never appear in one. Fail at authoring time.
268
- if (config.manifest?.roles !== undefined) {
269
- const seen = new Set<string>()
270
- for (const role of config.manifest.roles) {
271
- if (!/^[a-z0-9][a-z0-9_-]*$/.test(role.slug)) {
272
- throw new Error(
273
- `defineDomain: invalid \`manifest.roles\` slug "${role.slug}". ` +
274
- 'Use a lowercase slug (letters, digits, "_", "-"), e.g. "editor".',
275
- )
276
- }
277
- if (seen.has(role.slug)) {
278
- throw new Error(`defineDomain: duplicate \`manifest.roles\` slug "${role.slug}".`)
279
- }
280
- seen.add(role.slug)
281
- }
282
- }
283
-
284
- return {
285
- schema: config.schema,
286
- methods: config.methods as DomainDefinition['methods'],
287
- ...(config.core ? { core: config.core as DomainDefinition['core'] } : {}),
288
- ...(config.deps ? { deps: config.deps as DomainDefinition['deps'] } : {}),
289
- ...(config.views ? { views: config.views as Record<string, ViewDef> } : {}),
290
- ...(config.functions ? { functions: config.functions } : {}),
291
- ...(config.manifest ? { manifest: resolveManifest(config.manifest, config.views) } : {}),
292
- origin,
293
- requires,
294
- ...(config.path ? { path: config.path } : {}),
295
- ...(config.postInstall !== undefined
296
- ? { postInstall: normalizePostInstall(config.postInstall, origin, config.functions) }
297
- : {}),
298
- }
299
- }
300
-
301
- /**
302
- * Lower the author-facing manifest (view OBJECT for `entrypoint`) to the served
303
- * {@link DomainManifest} (slug for `entrypoint`). The entrypoint view is matched
304
- * to its `views`-map key by IDENTITY — the same mechanism `normalizePostInstall`
305
- * uses for functions — so a view absent from `views` (one from another domain,
306
- * or dropped) throws here instead of dangling to a NOT_FOUND view path at install.
307
- */
308
- function resolveManifest(
309
- manifest: DomainManifestConfig,
310
- views: Record<string, AnyViewDef> | undefined,
311
- ): DomainManifest {
312
- const { entrypoint, ...rest } = manifest
313
- if (entrypoint === undefined) return rest
314
- const slug = views ? Object.entries(views).find(([, def]) => def === entrypoint)?.[0] : undefined
315
- if (slug === undefined) {
316
- const viewKeys = Object.keys(views ?? {})
317
- throw new Error(
318
- "defineDomain: `manifest.entrypoint` must be one of this domain's own views " +
319
- '(pass the view object, e.g. `entrypoint: views.welcome`). ' +
320
- `Available views: ${viewKeys.length > 0 ? viewKeys.map((k) => `"${k}"`).join(', ') : '(none)'}.`,
321
- )
322
- }
323
- return { ...rest, entrypoint: slug }
324
- }
325
-
326
- /**
327
- * Resolve a `postInstall` function reference to the colon-path the bundle carries.
328
- * The slug is the `functions` map key the reference is registered under (found by
329
- * identity), so a renamed key is a compile error at the reference site AND the
330
- * derived path follows the rename. The origin is never the author's to supply
331
- * (postInstall is always a standalone function of THIS domain) and the path is
332
- * mount-agnostic — the kernel resolves it wherever the domain is installed.
333
- */
334
- function normalizePostInstall(
335
- postInstall: AnyFunctionDef,
336
- origin: string,
337
- functions: Record<string, AnyFunctionDef> | undefined,
338
- ): string {
339
- const slug = functions
340
- ? Object.entries(functions).find(([, def]) => def === postInstall)?.[0]
341
- : undefined
342
- if (slug === undefined) {
343
- throw new Error(
344
- "defineDomain: `postInstall` must reference a function from this domain's `functions` map " +
345
- '(e.g. `postInstall: functions.seed`).',
346
- )
347
- }
348
- return `/:${origin}:function.${slug}`
349
- }
350
-
351
- function schemaDomain(schema: Schema): string | undefined {
352
- const value = (schema as unknown as { domain?: unknown }).domain
353
- return typeof value === 'string' && value.length > 0 ? value : undefined
354
- }
@@ -1,35 +0,0 @@
1
- /**
2
- * `deploy` — bind a worker-safe `DomainDefinition` to a deployment adapter,
3
- * producing the value `astrale.config.ts` default-exports for the CLI.
4
- *
5
- * The split exists to keep the worker bundle clean: `defineDomain` (in the
6
- * author's `domain.ts`) carries only worker-safe modules and is what the
7
- * generated worker imports; the adapter (`cloudflare(...)` / `astrale(...)`) is
8
- * node-only code that the worker must never pull in. `deploy(domain, adapter)`
9
- * is authored in `astrale.config.ts` — a Node-only module the CLI loads but the
10
- * worker never imports — so the adapter stays out of the bundle.
11
- *
12
- * export const domain = defineDomain({ schema, methods, deps, views })
13
- *
14
- * import { domain } from './domain'
15
- * export default deploy(domain, cloudflare({ dev, prod }))
16
- *
17
- * The returned shape is just the definition with `adapter` attached — exactly
18
- * what the CLI already reads (`def.adapter`, `def.origin`, `def.schema`, …), so
19
- * the loader is unchanged.
20
- */
21
-
22
- import type { DomainAdapter } from './adapter.js'
23
- import type { DomainDefinition } from './define-domain.js'
24
-
25
- /** A domain definition bound to its deployment adapter — the CLI's input. */
26
- export interface DeployConfig<Params = unknown> extends DomainDefinition {
27
- adapter: DomainAdapter<Params>
28
- }
29
-
30
- export function deploy<Params>(
31
- domain: DomainDefinition,
32
- adapter: DomainAdapter<Params>,
33
- ): DeployConfig<Params> {
34
- return { ...domain, adapter }
35
- }
@@ -1,31 +0,0 @@
1
- /**
2
- * `@astrale-os/sdk` config surface — the author-facing declaration of a
3
- * standalone domain (`astrale.config.ts`) and the deployment-adapter contract.
4
- *
5
- * import { defineDomain, deploy } from '@astrale-os/sdk'
6
- * import { cloudflare } from '@astrale-os/adapter-cloudflare'
7
- *
8
- * `defineDomain` (in `domain.ts`) declares the WORKER-SAFE domain — what it is +
9
- * its identity, no adapter. `deploy(domain, adapter)` (in `astrale.config.ts`)
10
- * binds it to a deployment target; the `astrale-domain` bin (folded into this
11
- * package — see `../cli`) reads that default export and drives the adapter.
12
- * Neither builds a server nor boots a kernel — they validate and package the
13
- * declaration.
14
- */
15
-
16
- export { defineDomain } from './define-domain.js'
17
- export type { DefineDomainConfig, DomainDefinition, DomainManifest } from './define-domain.js'
18
-
19
- export { deploy } from './deploy.js'
20
- export type { DeployConfig } from './deploy.js'
21
-
22
- export { defineAdapter } from './adapter.js'
23
- export type {
24
- AdapterSpec,
25
- DeployCtx,
26
- DeployResult,
27
- DomainAdapter,
28
- DomainInfo,
29
- WatchCtx,
30
- WatchHandle,
31
- } from './adapter.js'
@@ -1,10 +0,0 @@
1
- export { defineView } from './view.js'
2
- export type { ViewDef, ViewRenderContext } from './view.js'
3
-
4
- export { defineRemoteFunction } from './remote-function.js'
5
- export type {
6
- AnyRemoteFunctionDef,
7
- RemoteFunctionAuthorizeContext,
8
- RemoteFunctionContext,
9
- RemoteFunctionDef,
10
- } from './remote-function.js'