@astrale-os/kernel-protocol 0.5.0-beta.8 → 1.0.0-beta.1

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 (494) hide show
  1. package/dist/artifact/index.d.ts +1 -2
  2. package/dist/artifact/index.js +1 -2
  3. package/dist/artifact/ref.d.ts +2 -1
  4. package/dist/artifact/ref.js +4 -4
  5. package/dist/codecs/codec.d.ts +0 -1
  6. package/dist/codecs/codec.js +0 -1
  7. package/dist/codecs/index.d.ts +1 -3
  8. package/dist/codecs/index.js +1 -3
  9. package/dist/codecs/json.d.ts +0 -1
  10. package/dist/codecs/json.js +0 -1
  11. package/dist/codecs/media-types.d.ts +0 -2
  12. package/dist/codecs/media-types.js +0 -2
  13. package/dist/errors/codes.d.ts +0 -1
  14. package/dist/errors/codes.js +0 -1
  15. package/dist/errors/http-status.d.ts +0 -1
  16. package/dist/errors/http-status.js +0 -1
  17. package/dist/errors/index.d.ts +1 -1
  18. package/dist/errors/index.js +1 -1
  19. package/dist/errors/payload.d.ts +0 -1
  20. package/dist/errors/payload.js +0 -1
  21. package/dist/errors/protocol-error.d.ts +0 -1
  22. package/dist/errors/protocol-error.js +0 -1
  23. package/dist/errors/reason.d.ts +0 -1
  24. package/dist/errors/reason.js +0 -1
  25. package/dist/errors/retry.d.ts +23 -0
  26. package/dist/errors/retry.js +44 -0
  27. package/dist/index.d.ts +1 -2
  28. package/dist/index.js +1 -2
  29. package/dist/invocation/admission.d.ts +2 -3
  30. package/dist/invocation/admission.js +5 -6
  31. package/dist/invocation/binary.d.ts +1 -1
  32. package/dist/invocation/binary.js +21 -5
  33. package/dist/invocation/binding-codecs.d.ts +3 -3
  34. package/dist/invocation/binding-codecs.js +1 -7
  35. package/dist/invocation/cancellation.d.ts +0 -1
  36. package/dist/invocation/cancellation.js +0 -1
  37. package/dist/invocation/correlation.d.ts +0 -1
  38. package/dist/invocation/correlation.js +0 -1
  39. package/dist/invocation/delegate.d.ts +0 -21
  40. package/dist/invocation/delegate.js +2 -35
  41. package/dist/invocation/http/binary.d.ts +3 -2
  42. package/dist/invocation/http/binary.js +6 -2
  43. package/dist/invocation/http/index.d.ts +2 -2
  44. package/dist/invocation/http/index.js +2 -2
  45. package/dist/invocation/http/negotiation.d.ts +0 -1
  46. package/dist/invocation/http/negotiation.js +3 -11
  47. package/dist/invocation/http/request.d.ts +11 -0
  48. package/dist/invocation/http/request.js +69 -0
  49. package/dist/invocation/http/stream.d.ts +0 -1
  50. package/dist/invocation/http/stream.js +0 -1
  51. package/dist/invocation/http/trace.d.ts +0 -1
  52. package/dist/invocation/http/trace.js +0 -1
  53. package/dist/invocation/idempotency.d.ts +0 -1
  54. package/dist/invocation/idempotency.js +0 -1
  55. package/dist/invocation/identity.d.ts +0 -1
  56. package/dist/invocation/identity.js +0 -1
  57. package/dist/invocation/index.d.ts +3 -4
  58. package/dist/invocation/index.js +3 -4
  59. package/dist/invocation/miss.d.ts +0 -1
  60. package/dist/invocation/miss.js +0 -1
  61. package/dist/invocation/redirect.d.ts +10 -13
  62. package/dist/invocation/redirect.js +10 -23
  63. package/dist/invocation/request.d.ts +0 -1
  64. package/dist/invocation/request.js +2 -3
  65. package/dist/invocation/response.d.ts +0 -1
  66. package/dist/invocation/response.js +0 -1
  67. package/dist/invocation/routing.d.ts +14 -5
  68. package/dist/invocation/routing.js +35 -21
  69. package/dist/invocation/schema.d.ts +6 -5
  70. package/dist/invocation/schema.js +5 -12
  71. package/dist/invocation/service-reason.d.ts +20 -16
  72. package/dist/invocation/service-reason.js +27 -20
  73. package/dist/invocation/stale-route.d.ts +3 -4
  74. package/dist/invocation/stale-route.js +0 -1
  75. package/dist/invocation/stream.d.ts +0 -1
  76. package/dist/invocation/stream.js +0 -1
  77. package/dist/invocation/target.d.ts +5 -3
  78. package/dist/invocation/target.js +25 -4
  79. package/dist/invocation/trace.d.ts +0 -1
  80. package/dist/invocation/trace.js +0 -1
  81. package/dist/invocation/version.d.ts +0 -1
  82. package/dist/invocation/version.js +0 -1
  83. package/dist/invocation/websocket/binary.d.ts +0 -1
  84. package/dist/invocation/websocket/binary.js +1 -1
  85. package/dist/invocation/websocket/index.d.ts +1 -2
  86. package/dist/invocation/websocket/index.js +1 -2
  87. package/dist/invocation/websocket/subprotocol.d.ts +1 -3
  88. package/dist/invocation/websocket/subprotocol.js +3 -5
  89. package/dist/issuer/claims.d.ts +7 -0
  90. package/dist/issuer/claims.js +7 -0
  91. package/dist/issuer/configuration.d.ts +0 -1
  92. package/dist/issuer/configuration.js +0 -1
  93. package/dist/issuer/error.d.ts +0 -1
  94. package/dist/issuer/error.js +0 -1
  95. package/dist/issuer/exchange.d.ts +0 -1
  96. package/dist/issuer/exchange.js +0 -1
  97. package/dist/issuer/hosted.d.ts +0 -1
  98. package/dist/issuer/hosted.js +0 -1
  99. package/dist/issuer/index.d.ts +2 -1
  100. package/dist/issuer/index.js +2 -1
  101. package/dist/issuer/key-set.d.ts +0 -1
  102. package/dist/issuer/key-set.js +0 -1
  103. package/dist/issuer/paths.d.ts +2 -1
  104. package/dist/issuer/paths.js +1 -1
  105. package/dist/issuer/url.d.ts +0 -1
  106. package/dist/issuer/url.js +0 -1
  107. package/dist/issuer/workflow-engine.d.ts +18 -0
  108. package/dist/issuer/workflow-engine.js +59 -0
  109. package/dist/{publication → release}/bindings/callable.d.ts +0 -1
  110. package/dist/{publication → release}/bindings/callable.js +6 -7
  111. package/dist/{publication → release}/bindings/index.d.ts +0 -1
  112. package/dist/{publication → release}/bindings/index.js +0 -1
  113. package/dist/{publication → release}/bindings/invocation.d.ts +0 -1
  114. package/dist/release/bindings/invocation.js +13 -0
  115. package/dist/release/bindings/view.d.ts +11 -0
  116. package/dist/release/bindings/view.js +54 -0
  117. package/dist/release/build.d.ts +6 -0
  118. package/dist/release/build.js +7 -0
  119. package/dist/release/bundle-admission.d.ts +21 -0
  120. package/dist/{publication → release}/bundle-admission.js +15 -21
  121. package/dist/{publication → release}/bundle-descriptor.d.ts +0 -1
  122. package/dist/release/bundle-descriptor.js +19 -0
  123. package/dist/release/bundle-evidence.d.ts +3 -0
  124. package/dist/release/bundle-evidence.js +13 -0
  125. package/dist/{publication → release}/bundle.d.ts +5 -3
  126. package/dist/{publication → release}/bundle.js +13 -8
  127. package/dist/{publication → release}/declaration.d.ts +0 -1
  128. package/dist/release/declaration.js +1 -0
  129. package/dist/{publication → release}/delivery/attestation.d.ts +1 -1
  130. package/dist/{publication → release}/delivery/attestation.js +0 -1
  131. package/dist/{publication → release}/delivery/claims.d.ts +7 -3
  132. package/dist/{publication → release}/delivery/claims.js +20 -14
  133. package/dist/release/delivery/delivery.d.ts +11 -0
  134. package/dist/{publication → release}/delivery/delivery.js +7 -13
  135. package/dist/{publication → release}/delivery/error.d.ts +2 -1
  136. package/dist/{publication → release}/delivery/error.js +1 -1
  137. package/dist/{publication → release}/delivery/index.d.ts +5 -2
  138. package/dist/{publication → release}/delivery/index.js +4 -1
  139. package/dist/{publication → release}/delivery/limits.d.ts +2 -2
  140. package/dist/release/delivery/limits.js +5 -0
  141. package/dist/{publication → release}/delivery/request.d.ts +10 -10
  142. package/dist/{publication → release}/delivery/request.js +9 -11
  143. package/dist/{publication → release}/delivery-declaration.d.ts +0 -1
  144. package/dist/{publication → release}/delivery-declaration.js +4 -5
  145. package/dist/{publication → release}/delivery-endpoint.d.ts +0 -1
  146. package/dist/release/delivery-endpoint.js +22 -0
  147. package/dist/release/digest.d.ts +13 -0
  148. package/dist/{publication/etag.js → release/digest.js} +1 -7
  149. package/dist/release/error.d.ts +7 -0
  150. package/dist/release/error.js +11 -0
  151. package/dist/release/index.d.ts +17 -0
  152. package/dist/release/index.js +10 -0
  153. package/dist/release/issuer.d.ts +5 -0
  154. package/dist/release/issuer.js +34 -0
  155. package/dist/release/manifest.d.ts +6 -0
  156. package/dist/release/manifest.js +22 -0
  157. package/dist/release/reference.d.ts +26 -0
  158. package/dist/release/reference.js +70 -0
  159. package/dist/release/release.d.ts +60 -0
  160. package/dist/release/release.js +125 -0
  161. package/dist/release/requirements.d.ts +41 -0
  162. package/dist/release/requirements.js +306 -0
  163. package/dist/{publication → release}/route.d.ts +0 -1
  164. package/dist/{publication → release}/route.js +24 -25
  165. package/dist/{publication → release}/schema.d.ts +0 -1
  166. package/dist/{publication → release}/schema.js +4 -5
  167. package/dist/release/served.d.ts +27 -0
  168. package/dist/release/served.js +56 -0
  169. package/dist/release/shape.d.ts +8 -0
  170. package/dist/{publication/content.js → release/shape.js} +0 -1
  171. package/dist/routes/admission.d.ts +1 -2
  172. package/dist/routes/admission.js +7 -86
  173. package/dist/routes/binding.d.ts +3 -4
  174. package/dist/routes/binding.js +11 -22
  175. package/dist/routes/collision.d.ts +0 -1
  176. package/dist/routes/collision.js +0 -1
  177. package/dist/routes/compiler.d.ts +2 -3
  178. package/dist/routes/compiler.js +7 -4
  179. package/dist/routes/credential.d.ts +12 -3
  180. package/dist/routes/credential.js +9 -5
  181. package/dist/routes/decode.d.ts +5 -3
  182. package/dist/routes/decode.js +24 -18
  183. package/dist/routes/deployment-retired.d.ts +30 -0
  184. package/dist/routes/deployment-retired.js +96 -0
  185. package/dist/routes/encode.d.ts +0 -1
  186. package/dist/routes/encode.js +12 -6
  187. package/dist/routes/entries.d.ts +23 -0
  188. package/dist/routes/entries.js +150 -0
  189. package/dist/routes/error-response.d.ts +0 -1
  190. package/dist/routes/error-response.js +0 -1
  191. package/dist/routes/error.d.ts +0 -1
  192. package/dist/routes/error.js +0 -1
  193. package/dist/routes/evidence.d.ts +3 -4
  194. package/dist/routes/evidence.js +7 -34
  195. package/dist/routes/header.d.ts +9 -0
  196. package/dist/routes/header.js +34 -0
  197. package/dist/routes/index.d.ts +2 -3
  198. package/dist/routes/index.js +2 -3
  199. package/dist/routes/mapping.d.ts +1 -2
  200. package/dist/routes/mapping.js +4 -5
  201. package/dist/routes/match.d.ts +1 -2
  202. package/dist/routes/match.js +0 -1
  203. package/dist/routes/placement.d.ts +2 -3
  204. package/dist/routes/placement.js +0 -1
  205. package/dist/routes/plan.d.ts +1 -2
  206. package/dist/routes/plan.js +0 -1
  207. package/dist/routes/request.d.ts +3 -2
  208. package/dist/routes/request.js +0 -1
  209. package/dist/routes/reservation.d.ts +4 -3
  210. package/dist/routes/reservation.js +14 -9
  211. package/dist/routes/routing.d.ts +18 -7
  212. package/dist/routes/routing.js +28 -50
  213. package/dist/routes/scalar.d.ts +0 -1
  214. package/dist/routes/scalar.js +0 -1
  215. package/dist/routes/select.d.ts +1 -2
  216. package/dist/routes/select.js +0 -1
  217. package/dist/routes/stream.d.ts +0 -1
  218. package/dist/routes/stream.js +0 -1
  219. package/dist/routes/table.d.ts +3 -3
  220. package/dist/routes/table.js +0 -1
  221. package/dist/routes/target.d.ts +5 -1
  222. package/dist/routes/target.js +16 -1
  223. package/dist/routes/template.d.ts +0 -2
  224. package/dist/routes/template.js +0 -4
  225. package/dist/runtime/artifact.d.ts +5 -5
  226. package/dist/runtime/artifact.js +7 -5
  227. package/dist/runtime/index.d.ts +1 -2
  228. package/dist/runtime/index.js +1 -2
  229. package/dist/schema/index.d.ts +0 -1
  230. package/dist/schema/index.js +0 -1
  231. package/dist/schema/installation/codec.d.ts +4 -0
  232. package/dist/schema/installation/codec.js +70 -0
  233. package/dist/schema/installation/index.d.ts +2 -1
  234. package/dist/schema/installation/index.js +1 -1
  235. package/dist/schema/installation/introspection/codec.d.ts +5 -3
  236. package/dist/schema/installation/introspection/codec.js +307 -196
  237. package/dist/schema/installation/introspection/index.d.ts +2 -3
  238. package/dist/schema/installation/introspection/index.js +1 -2
  239. package/dist/schema/installation/introspection/result.d.ts +72 -26
  240. package/dist/schema/installation/introspection/result.js +0 -1
  241. package/dist/schema/installation/result.d.ts +9 -0
  242. package/dist/schema/installation/result.js +1 -0
  243. package/package.json +23 -78
  244. package/dist/artifact/index.d.ts.map +0 -1
  245. package/dist/artifact/index.js.map +0 -1
  246. package/dist/artifact/ref.d.ts.map +0 -1
  247. package/dist/artifact/ref.js.map +0 -1
  248. package/dist/codecs/codec.d.ts.map +0 -1
  249. package/dist/codecs/codec.js.map +0 -1
  250. package/dist/codecs/index.d.ts.map +0 -1
  251. package/dist/codecs/index.js.map +0 -1
  252. package/dist/codecs/json.d.ts.map +0 -1
  253. package/dist/codecs/json.js.map +0 -1
  254. package/dist/codecs/media-types.d.ts.map +0 -1
  255. package/dist/codecs/media-types.js.map +0 -1
  256. package/dist/codecs/msgpack.d.ts +0 -5
  257. package/dist/codecs/msgpack.d.ts.map +0 -1
  258. package/dist/codecs/msgpack.js +0 -51
  259. package/dist/codecs/msgpack.js.map +0 -1
  260. package/dist/errors/codes.d.ts.map +0 -1
  261. package/dist/errors/codes.js.map +0 -1
  262. package/dist/errors/http-status.d.ts.map +0 -1
  263. package/dist/errors/http-status.js.map +0 -1
  264. package/dist/errors/index.d.ts.map +0 -1
  265. package/dist/errors/index.js.map +0 -1
  266. package/dist/errors/payload.d.ts.map +0 -1
  267. package/dist/errors/payload.js.map +0 -1
  268. package/dist/errors/protocol-error.d.ts.map +0 -1
  269. package/dist/errors/protocol-error.js.map +0 -1
  270. package/dist/errors/reason.d.ts.map +0 -1
  271. package/dist/errors/reason.js.map +0 -1
  272. package/dist/index.d.ts.map +0 -1
  273. package/dist/index.js.map +0 -1
  274. package/dist/invocation/admission.d.ts.map +0 -1
  275. package/dist/invocation/admission.js.map +0 -1
  276. package/dist/invocation/binary.d.ts.map +0 -1
  277. package/dist/invocation/binary.js.map +0 -1
  278. package/dist/invocation/binding-codecs.d.ts.map +0 -1
  279. package/dist/invocation/binding-codecs.js.map +0 -1
  280. package/dist/invocation/cancellation.d.ts.map +0 -1
  281. package/dist/invocation/cancellation.js.map +0 -1
  282. package/dist/invocation/correlation.d.ts.map +0 -1
  283. package/dist/invocation/correlation.js.map +0 -1
  284. package/dist/invocation/delegate.d.ts.map +0 -1
  285. package/dist/invocation/delegate.js.map +0 -1
  286. package/dist/invocation/http/binary.d.ts.map +0 -1
  287. package/dist/invocation/http/binary.js.map +0 -1
  288. package/dist/invocation/http/index.d.ts.map +0 -1
  289. package/dist/invocation/http/index.js.map +0 -1
  290. package/dist/invocation/http/negotiation.d.ts.map +0 -1
  291. package/dist/invocation/http/negotiation.js.map +0 -1
  292. package/dist/invocation/http/stream.d.ts.map +0 -1
  293. package/dist/invocation/http/stream.js.map +0 -1
  294. package/dist/invocation/http/trace.d.ts.map +0 -1
  295. package/dist/invocation/http/trace.js.map +0 -1
  296. package/dist/invocation/idempotency.d.ts.map +0 -1
  297. package/dist/invocation/idempotency.js.map +0 -1
  298. package/dist/invocation/identity.d.ts.map +0 -1
  299. package/dist/invocation/identity.js.map +0 -1
  300. package/dist/invocation/index.d.ts.map +0 -1
  301. package/dist/invocation/index.js.map +0 -1
  302. package/dist/invocation/miss.d.ts.map +0 -1
  303. package/dist/invocation/miss.js.map +0 -1
  304. package/dist/invocation/redirect.d.ts.map +0 -1
  305. package/dist/invocation/redirect.js.map +0 -1
  306. package/dist/invocation/request.d.ts.map +0 -1
  307. package/dist/invocation/request.js.map +0 -1
  308. package/dist/invocation/response.d.ts.map +0 -1
  309. package/dist/invocation/response.js.map +0 -1
  310. package/dist/invocation/routing.d.ts.map +0 -1
  311. package/dist/invocation/routing.js.map +0 -1
  312. package/dist/invocation/schema.d.ts.map +0 -1
  313. package/dist/invocation/schema.js.map +0 -1
  314. package/dist/invocation/service-reason.d.ts.map +0 -1
  315. package/dist/invocation/service-reason.js.map +0 -1
  316. package/dist/invocation/stale-route.d.ts.map +0 -1
  317. package/dist/invocation/stale-route.js.map +0 -1
  318. package/dist/invocation/stream.d.ts.map +0 -1
  319. package/dist/invocation/stream.js.map +0 -1
  320. package/dist/invocation/target.d.ts.map +0 -1
  321. package/dist/invocation/target.js.map +0 -1
  322. package/dist/invocation/trace.d.ts.map +0 -1
  323. package/dist/invocation/trace.js.map +0 -1
  324. package/dist/invocation/version.d.ts.map +0 -1
  325. package/dist/invocation/version.js.map +0 -1
  326. package/dist/invocation/websocket/binary.d.ts.map +0 -1
  327. package/dist/invocation/websocket/binary.js.map +0 -1
  328. package/dist/invocation/websocket/index.d.ts.map +0 -1
  329. package/dist/invocation/websocket/index.js.map +0 -1
  330. package/dist/invocation/websocket/subprotocol.d.ts.map +0 -1
  331. package/dist/invocation/websocket/subprotocol.js.map +0 -1
  332. package/dist/issuer/configuration.d.ts.map +0 -1
  333. package/dist/issuer/configuration.js.map +0 -1
  334. package/dist/issuer/error.d.ts.map +0 -1
  335. package/dist/issuer/error.js.map +0 -1
  336. package/dist/issuer/exchange.d.ts.map +0 -1
  337. package/dist/issuer/exchange.js.map +0 -1
  338. package/dist/issuer/hosted.d.ts.map +0 -1
  339. package/dist/issuer/hosted.js.map +0 -1
  340. package/dist/issuer/index.d.ts.map +0 -1
  341. package/dist/issuer/index.js.map +0 -1
  342. package/dist/issuer/key-set.d.ts.map +0 -1
  343. package/dist/issuer/key-set.js.map +0 -1
  344. package/dist/issuer/paths.d.ts.map +0 -1
  345. package/dist/issuer/paths.js.map +0 -1
  346. package/dist/issuer/url.d.ts.map +0 -1
  347. package/dist/issuer/url.js.map +0 -1
  348. package/dist/publication/bindings/callable.d.ts.map +0 -1
  349. package/dist/publication/bindings/callable.js.map +0 -1
  350. package/dist/publication/bindings/index.d.ts.map +0 -1
  351. package/dist/publication/bindings/index.js.map +0 -1
  352. package/dist/publication/bindings/invocation.d.ts.map +0 -1
  353. package/dist/publication/bindings/invocation.js +0 -14
  354. package/dist/publication/bindings/invocation.js.map +0 -1
  355. package/dist/publication/bindings/view.d.ts +0 -8
  356. package/dist/publication/bindings/view.d.ts.map +0 -1
  357. package/dist/publication/bindings/view.js +0 -29
  358. package/dist/publication/bindings/view.js.map +0 -1
  359. package/dist/publication/bundle-admission.d.ts +0 -5
  360. package/dist/publication/bundle-admission.d.ts.map +0 -1
  361. package/dist/publication/bundle-admission.js.map +0 -1
  362. package/dist/publication/bundle-descriptor.d.ts.map +0 -1
  363. package/dist/publication/bundle-descriptor.js +0 -20
  364. package/dist/publication/bundle-descriptor.js.map +0 -1
  365. package/dist/publication/bundle-evidence.d.ts +0 -4
  366. package/dist/publication/bundle-evidence.d.ts.map +0 -1
  367. package/dist/publication/bundle-evidence.js +0 -14
  368. package/dist/publication/bundle-evidence.js.map +0 -1
  369. package/dist/publication/bundle.d.ts.map +0 -1
  370. package/dist/publication/bundle.js.map +0 -1
  371. package/dist/publication/content.d.ts +0 -11
  372. package/dist/publication/content.d.ts.map +0 -1
  373. package/dist/publication/content.js.map +0 -1
  374. package/dist/publication/declaration.d.ts.map +0 -1
  375. package/dist/publication/declaration.js +0 -2
  376. package/dist/publication/declaration.js.map +0 -1
  377. package/dist/publication/delivery/attestation.d.ts.map +0 -1
  378. package/dist/publication/delivery/attestation.js.map +0 -1
  379. package/dist/publication/delivery/claims.d.ts.map +0 -1
  380. package/dist/publication/delivery/claims.js.map +0 -1
  381. package/dist/publication/delivery/delivery.d.ts +0 -10
  382. package/dist/publication/delivery/delivery.d.ts.map +0 -1
  383. package/dist/publication/delivery/delivery.js.map +0 -1
  384. package/dist/publication/delivery/error.d.ts.map +0 -1
  385. package/dist/publication/delivery/error.js.map +0 -1
  386. package/dist/publication/delivery/index.d.ts.map +0 -1
  387. package/dist/publication/delivery/index.js.map +0 -1
  388. package/dist/publication/delivery/limits.d.ts.map +0 -1
  389. package/dist/publication/delivery/limits.js +0 -5
  390. package/dist/publication/delivery/limits.js.map +0 -1
  391. package/dist/publication/delivery/request.d.ts.map +0 -1
  392. package/dist/publication/delivery/request.js.map +0 -1
  393. package/dist/publication/delivery-declaration.d.ts.map +0 -1
  394. package/dist/publication/delivery-declaration.js.map +0 -1
  395. package/dist/publication/delivery-endpoint.d.ts.map +0 -1
  396. package/dist/publication/delivery-endpoint.js +0 -23
  397. package/dist/publication/delivery-endpoint.js.map +0 -1
  398. package/dist/publication/error.d.ts +0 -8
  399. package/dist/publication/error.d.ts.map +0 -1
  400. package/dist/publication/error.js +0 -12
  401. package/dist/publication/error.js.map +0 -1
  402. package/dist/publication/etag.d.ts +0 -7
  403. package/dist/publication/etag.d.ts.map +0 -1
  404. package/dist/publication/etag.js.map +0 -1
  405. package/dist/publication/index.d.ts +0 -18
  406. package/dist/publication/index.d.ts.map +0 -1
  407. package/dist/publication/index.js +0 -11
  408. package/dist/publication/index.js.map +0 -1
  409. package/dist/publication/manifest.d.ts +0 -7
  410. package/dist/publication/manifest.d.ts.map +0 -1
  411. package/dist/publication/manifest.js +0 -31
  412. package/dist/publication/manifest.js.map +0 -1
  413. package/dist/publication/publication.d.ts +0 -37
  414. package/dist/publication/publication.d.ts.map +0 -1
  415. package/dist/publication/publication.js +0 -134
  416. package/dist/publication/publication.js.map +0 -1
  417. package/dist/publication/reference.d.ts +0 -18
  418. package/dist/publication/reference.d.ts.map +0 -1
  419. package/dist/publication/reference.js +0 -69
  420. package/dist/publication/reference.js.map +0 -1
  421. package/dist/publication/requirements.d.ts +0 -27
  422. package/dist/publication/requirements.d.ts.map +0 -1
  423. package/dist/publication/requirements.js +0 -181
  424. package/dist/publication/requirements.js.map +0 -1
  425. package/dist/publication/route.d.ts.map +0 -1
  426. package/dist/publication/route.js.map +0 -1
  427. package/dist/publication/schema.d.ts.map +0 -1
  428. package/dist/publication/schema.js.map +0 -1
  429. package/dist/routes/admission.d.ts.map +0 -1
  430. package/dist/routes/admission.js.map +0 -1
  431. package/dist/routes/binding.d.ts.map +0 -1
  432. package/dist/routes/binding.js.map +0 -1
  433. package/dist/routes/collision.d.ts.map +0 -1
  434. package/dist/routes/collision.js.map +0 -1
  435. package/dist/routes/compiler.d.ts.map +0 -1
  436. package/dist/routes/compiler.js.map +0 -1
  437. package/dist/routes/credential.d.ts.map +0 -1
  438. package/dist/routes/credential.js.map +0 -1
  439. package/dist/routes/decode.d.ts.map +0 -1
  440. package/dist/routes/decode.js.map +0 -1
  441. package/dist/routes/encode.d.ts.map +0 -1
  442. package/dist/routes/encode.js.map +0 -1
  443. package/dist/routes/error-response.d.ts.map +0 -1
  444. package/dist/routes/error-response.js.map +0 -1
  445. package/dist/routes/error.d.ts.map +0 -1
  446. package/dist/routes/error.js.map +0 -1
  447. package/dist/routes/evidence.d.ts.map +0 -1
  448. package/dist/routes/evidence.js.map +0 -1
  449. package/dist/routes/index.d.ts.map +0 -1
  450. package/dist/routes/index.js.map +0 -1
  451. package/dist/routes/mapping.d.ts.map +0 -1
  452. package/dist/routes/mapping.js.map +0 -1
  453. package/dist/routes/match.d.ts.map +0 -1
  454. package/dist/routes/match.js.map +0 -1
  455. package/dist/routes/placement.d.ts.map +0 -1
  456. package/dist/routes/placement.js.map +0 -1
  457. package/dist/routes/plan.d.ts.map +0 -1
  458. package/dist/routes/plan.js.map +0 -1
  459. package/dist/routes/release-unavailable.d.ts +0 -9
  460. package/dist/routes/release-unavailable.d.ts.map +0 -1
  461. package/dist/routes/release-unavailable.js +0 -33
  462. package/dist/routes/release-unavailable.js.map +0 -1
  463. package/dist/routes/request.d.ts.map +0 -1
  464. package/dist/routes/request.js.map +0 -1
  465. package/dist/routes/reservation.d.ts.map +0 -1
  466. package/dist/routes/reservation.js.map +0 -1
  467. package/dist/routes/routing.d.ts.map +0 -1
  468. package/dist/routes/routing.js.map +0 -1
  469. package/dist/routes/scalar.d.ts.map +0 -1
  470. package/dist/routes/scalar.js.map +0 -1
  471. package/dist/routes/select.d.ts.map +0 -1
  472. package/dist/routes/select.js.map +0 -1
  473. package/dist/routes/stream.d.ts.map +0 -1
  474. package/dist/routes/stream.js.map +0 -1
  475. package/dist/routes/table.d.ts.map +0 -1
  476. package/dist/routes/table.js.map +0 -1
  477. package/dist/routes/target.d.ts.map +0 -1
  478. package/dist/routes/target.js.map +0 -1
  479. package/dist/routes/template.d.ts.map +0 -1
  480. package/dist/routes/template.js.map +0 -1
  481. package/dist/runtime/artifact.d.ts.map +0 -1
  482. package/dist/runtime/artifact.js.map +0 -1
  483. package/dist/runtime/index.d.ts.map +0 -1
  484. package/dist/runtime/index.js.map +0 -1
  485. package/dist/schema/index.d.ts.map +0 -1
  486. package/dist/schema/index.js.map +0 -1
  487. package/dist/schema/installation/index.d.ts.map +0 -1
  488. package/dist/schema/installation/index.js.map +0 -1
  489. package/dist/schema/installation/introspection/codec.d.ts.map +0 -1
  490. package/dist/schema/installation/introspection/codec.js.map +0 -1
  491. package/dist/schema/installation/introspection/index.d.ts.map +0 -1
  492. package/dist/schema/installation/introspection/index.js.map +0 -1
  493. package/dist/schema/installation/introspection/result.d.ts.map +0 -1
  494. package/dist/schema/installation/introspection/result.js.map +0 -1
@@ -1,24 +1,21 @@
1
1
  import { AuthValueError } from '@astrale-os/kernel-core/auth/error';
2
2
  import { accept as acceptIssuer } from '@astrale-os/kernel-core/auth/issuer';
3
- import { patterns } from '@astrale-os/kernel-dsl/v1/addressing';
3
+ import { Key, patterns } from '@astrale-os/kernel-dsl/v1/addressing';
4
4
  import { CODES, reasonOf } from '../errors/index.js';
5
- export const SCHEMA_UPGRADE_REQUIRED = 'SCHEMA_UPGRADE_REQUIRED';
6
- export const SCHEMA_REVISION_MISMATCH = 'SCHEMA_REVISION_MISMATCH';
5
+ export const CALLABLE_FINGERPRINT_MISMATCH = 'CALLABLE_FINGERPRINT_MISMATCH';
7
6
  export const SERVICE_TRUST_REQUIRED = 'SERVICE_TRUST_REQUIRED';
8
7
  export const SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE';
9
8
  export const SERVICE_CANDIDATE_INVALID = 'SERVICE_CANDIDATE_INVALID';
9
+ /** A deployment answers that it no longer serves: it runs no other code in its place. */
10
+ export const DEPLOYMENT_RETIRED = 'DEPLOYMENT_RETIRED';
10
11
  /** Recognize only exact outer-code, reason-code, and detail-shape combinations. */
11
12
  export function serviceErrorOf(input) {
12
13
  const reason = reasonOf(input.data);
13
14
  if (reason === undefined)
14
15
  return undefined;
15
16
  switch (reason.code) {
16
- case SCHEMA_REVISION_MISMATCH:
17
- return input.code === CODES.CONFLICT && schemaRevisionMismatchDetails(reason.details)
18
- ? input
19
- : undefined;
20
- case SCHEMA_UPGRADE_REQUIRED:
21
- return input.code === CODES.CONFLICT && schemaUpgradeDetails(reason.details)
17
+ case CALLABLE_FINGERPRINT_MISMATCH:
18
+ return input.code === CODES.CONFLICT && callableFingerprintMismatchDetails(reason.details)
22
19
  ? input
23
20
  : undefined;
24
21
  case SERVICE_TRUST_REQUIRED:
@@ -33,21 +30,22 @@ export function serviceErrorOf(input) {
33
30
  return input.code === CODES.BACKEND_UNAVAILABLE && candidateInvalidDetails(reason.details)
34
31
  ? input
35
32
  : undefined;
33
+ case DEPLOYMENT_RETIRED:
34
+ return input.code === CODES.NOT_FOUND && deploymentRetiredDetails(reason.details)
35
+ ? input
36
+ : undefined;
36
37
  default:
37
38
  return undefined;
38
39
  }
39
40
  }
40
- function schemaRevisionMismatchDetails(input) {
41
- return (exact(input, ['origin', 'expectedRevision', 'installedRevision']) &&
41
+ function callableFingerprintMismatchDetails(input) {
42
+ return (exact(input, ['origin', 'callable', 'expectedFingerprint', 'installedFingerprint']) &&
42
43
  isOrigin(input.origin) &&
43
- isRevision(input.expectedRevision) &&
44
- isRevision(input.installedRevision));
45
- }
46
- function schemaUpgradeDetails(input) {
47
- return (exact(input, ['origin', 'installedRevision', 'candidateRevision']) &&
48
- isOrigin(input.origin) &&
49
- isRevision(input.installedRevision) &&
50
- isRevision(input.candidateRevision));
44
+ typeof input.callable === 'string' &&
45
+ Key.is(input.callable) &&
46
+ Key.origin(input.callable) === input.origin &&
47
+ isDigest(input.expectedFingerprint) &&
48
+ isDigest(input.installedFingerprint));
51
49
  }
52
50
  function serviceTrustDetails(input) {
53
51
  return (exact(input, ['origin', 'installedIssuer', 'candidateIssuer']) &&
@@ -61,6 +59,13 @@ function serviceUnavailableDetails(input) {
61
59
  function candidateInvalidDetails(input) {
62
60
  return exact(input, ['origin']) && isOrigin(input.origin);
63
61
  }
62
+ function deploymentRetiredDetails(input) {
63
+ return Object.hasOwn(input, 'release')
64
+ ? exact(input, ['deployment', 'release']) &&
65
+ isIssuer(input.deployment) &&
66
+ isDigest(input.release)
67
+ : exact(input, ['deployment']) && isIssuer(input.deployment);
68
+ }
64
69
  function exact(input, fields) {
65
70
  return (Object.keys(input).length === fields.length &&
66
71
  fields.every((field) => Object.hasOwn(input, field)));
@@ -71,6 +76,9 @@ function isOrigin(input) {
71
76
  function isRevision(input) {
72
77
  return typeof input === 'string' && patterns.revision.test(input);
73
78
  }
79
+ function isDigest(input) {
80
+ return typeof input === 'string' && /^sha256:[0-9a-f]{64}$/u.test(input);
81
+ }
74
82
  function isIssuer(input) {
75
83
  if (typeof input !== 'string')
76
84
  return false;
@@ -83,4 +91,3 @@ function isIssuer(input) {
83
91
  throw cause;
84
92
  }
85
93
  }
86
- //# sourceMappingURL=service-reason.js.map
@@ -1,4 +1,4 @@
1
- import type { Etag } from '../publication/index.js';
1
+ import type { ReleaseDigest } from '../release/digest.js';
2
2
  import type { RequestId } from './correlation.js';
3
3
  import type { InvocationId } from './identity.js';
4
4
  /** Reserved pre-handler routing control; never an application ErrorResponse. */
@@ -6,8 +6,7 @@ export interface Stale {
6
6
  readonly kind: 'stale';
7
7
  readonly requestId: RequestId;
8
8
  readonly invocation: InvocationId;
9
- readonly current: Etag;
9
+ readonly current: ReleaseDigest;
10
10
  }
11
11
  export declare function decodeStale(input: unknown): Stale;
12
- export declare function stale(requestId: RequestId, assigned: InvocationId, current: Etag): Stale;
13
- //# sourceMappingURL=stale-route.d.ts.map
12
+ export declare function stale(requestId: RequestId, assigned: InvocationId, current: ReleaseDigest): Stale;
@@ -17,4 +17,3 @@ export function decodeStale(input) {
17
17
  export function stale(requestId, assigned, current) {
18
18
  return decodeStale({ kind: 'stale', requestId, invocation: assigned, current });
19
19
  }
20
- //# sourceMappingURL=stale-route.js.map
@@ -25,4 +25,3 @@ export interface StreamErrorFrame {
25
25
  }
26
26
  export type StreamFrame = StreamStartFrame | StreamItemFrame | StreamEndFrame | StreamErrorFrame;
27
27
  export declare function decodeStreamFrame(input: unknown): StreamFrame;
28
- //# sourceMappingURL=stream.d.ts.map
@@ -42,4 +42,3 @@ export function decodeStreamFrame(input) {
42
42
  return invalid(`unsupported stream frame kind ${JSON.stringify(kind)}`);
43
43
  }
44
44
  }
45
- //# sourceMappingURL=stream.js.map
@@ -1,4 +1,6 @@
1
- import type { Call } from '@astrale-os/kernel-core/callable';
2
- export type { Call } from '@astrale-os/kernel-core/callable';
1
+ import type { Value } from '@astrale-os/kernel-dsl/value';
2
+ import { type Call } from '@astrale-os/kernel-core/callable';
3
+ export { Target, targetPath, type Call } from '@astrale-os/kernel-core/callable';
3
4
  export declare function acceptCall(input: unknown): Call;
4
- //# sourceMappingURL=target.d.ts.map
5
+ /** Package-private: consume the detached portable subtree captured by request admission. */
6
+ export declare function callFromSnapshot(input: Value): Call;
@@ -1,12 +1,33 @@
1
- import { exactFields, nodePath, portableObject, required } from './admission.js';
1
+ import { Target } from '@astrale-os/kernel-core/callable';
2
+ import { PathError } from '@astrale-os/kernel-core/path';
3
+ import { exactFields, invalid, nodePath, portableObject, required } from './admission.js';
4
+ export { Target, targetPath } from '@astrale-os/kernel-core/callable';
2
5
  const CALL_FIELDS = new Set(['target', 'input']);
3
6
  export function acceptCall(input) {
4
- const object = portableObject(input, 'call');
7
+ return callFromSnapshot(portableObject(input, 'call'));
8
+ }
9
+ /** Package-private: consume the detached portable subtree captured by request admission. */
10
+ export function callFromSnapshot(input) {
11
+ if (input === null || typeof input !== 'object' || Array.isArray(input)) {
12
+ invalid('call must be an object');
13
+ }
14
+ const object = input;
5
15
  exactFields(object, CALL_FIELDS, 'call');
6
16
  required(object, ['target', 'input'], 'call');
7
17
  return Object.freeze({
8
- target: nodePath(object.target, 'call.target'),
18
+ target: acceptTarget(object.target),
9
19
  input: object.input,
10
20
  });
11
21
  }
12
- //# sourceMappingURL=target.js.map
22
+ function acceptTarget(input) {
23
+ if (typeof input === 'string')
24
+ return nodePath(input, 'call.target');
25
+ try {
26
+ return Target(input);
27
+ }
28
+ catch (cause) {
29
+ if (cause instanceof TypeError || cause instanceof PathError)
30
+ return invalid('call.target must be a canonical NodePath or declaration Target');
31
+ throw cause;
32
+ }
33
+ }
@@ -7,4 +7,3 @@ export interface Trace {
7
7
  }
8
8
  /** Admit portable correlation syntax without making it an invocation validity condition. */
9
9
  export declare function admitTrace(input: unknown): Trace | undefined;
10
- //# sourceMappingURL=trace.d.ts.map
@@ -84,4 +84,3 @@ function validStateKey(input) {
84
84
  return false;
85
85
  return TENANT_ID.test(input.slice(0, separator)) && SYSTEM_ID.test(input.slice(separator + 1));
86
86
  }
87
- //# sourceMappingURL=trace.js.map
@@ -1,3 +1,2 @@
1
1
  export declare const VERSION: 2;
2
2
  export type Version = typeof VERSION;
3
- //# sourceMappingURL=version.d.ts.map
@@ -1,2 +1 @@
1
1
  export const VERSION = 2;
2
- //# sourceMappingURL=version.js.map
@@ -1,4 +1,3 @@
1
1
  import type { BinaryResponse } from '../binary.js';
2
2
  export declare function encodeBinary(response: BinaryResponse): Uint8Array;
3
3
  export declare function decodeBinary(input: Uint8Array): BinaryResponse | undefined;
4
- //# sourceMappingURL=binary.d.ts.map
@@ -14,6 +14,7 @@ export function encodeBinary(response) {
14
14
  requestId: response.requestId,
15
15
  invocation: response.invocation,
16
16
  mediaType: response.mediaType,
17
+ status: response.status,
17
18
  ...(headers === undefined ? {} : { headers }),
18
19
  }));
19
20
  if (metadata.byteLength > MAXIMUM_METADATA_BYTES)
@@ -69,4 +70,3 @@ function invalid() {
69
70
  message: 'WebSocket binary response is invalid.',
70
71
  });
71
72
  }
72
- //# sourceMappingURL=binary.js.map
@@ -1,3 +1,2 @@
1
1
  export { decodeBinary, encodeBinary } from './binary.js';
2
- export { JSON_SUBPROTOCOL, MSGPACK_SUBPROTOCOL, selectSubprotocol, subprotocolFor, type Subprotocol, type SubprotocolSelection, } from './subprotocol.js';
3
- //# sourceMappingURL=index.d.ts.map
2
+ export { JSON_SUBPROTOCOL, selectSubprotocol, subprotocolFor, type Subprotocol, type SubprotocolSelection, } from './subprotocol.js';
@@ -1,3 +1,2 @@
1
1
  export { decodeBinary, encodeBinary } from './binary.js';
2
- export { JSON_SUBPROTOCOL, MSGPACK_SUBPROTOCOL, selectSubprotocol, subprotocolFor, } from './subprotocol.js';
3
- //# sourceMappingURL=index.js.map
2
+ export { JSON_SUBPROTOCOL, selectSubprotocol, subprotocolFor, } from './subprotocol.js';
@@ -1,11 +1,9 @@
1
1
  import type { Codec } from '../../codecs/index.js';
2
2
  export declare const JSON_SUBPROTOCOL: 'astrale.invocation.v2.json';
3
- export declare const MSGPACK_SUBPROTOCOL: 'astrale.invocation.v2.msgpack';
4
- export type Subprotocol = typeof JSON_SUBPROTOCOL | typeof MSGPACK_SUBPROTOCOL;
3
+ export type Subprotocol = typeof JSON_SUBPROTOCOL;
5
4
  export interface SubprotocolSelection {
6
5
  readonly subprotocol: Subprotocol;
7
6
  readonly codec: Codec;
8
7
  }
9
8
  export declare function subprotocolFor(codec: Codec): Subprotocol;
10
9
  export declare function selectSubprotocol(offered: string | null, supported: readonly Codec[]): SubprotocolSelection | undefined;
11
- //# sourceMappingURL=subprotocol.d.ts.map
@@ -1,12 +1,11 @@
1
1
  import { admitSupportedCodecs, codecProfile } from '../binding-codecs.js';
2
2
  export const JSON_SUBPROTOCOL = 'astrale.invocation.v2.json';
3
- export const MSGPACK_SUBPROTOCOL = 'astrale.invocation.v2.msgpack';
4
3
  const TOKEN = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u;
5
4
  export function subprotocolFor(codec) {
6
- const profile = codecProfile(codec);
7
- if (profile === undefined)
5
+ if (codecProfile(codec) === undefined) {
8
6
  throw new TypeError('codec is not a canonical Invocation codec.');
9
- return profile === 'json' ? JSON_SUBPROTOCOL : MSGPACK_SUBPROTOCOL;
7
+ }
8
+ return JSON_SUBPROTOCOL;
10
9
  }
11
10
  export function selectSubprotocol(offered, supported) {
12
11
  const admitted = admitSupportedCodecs(supported);
@@ -27,4 +26,3 @@ export function selectSubprotocol(offered, supported) {
27
26
  }
28
27
  return undefined;
29
28
  }
30
- //# sourceMappingURL=subprotocol.js.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Private JWT claim of the self credential a durable step's Domain signs for the Kernel: the id of
3
+ * the Execution the step belongs to. After a consented issuer change, the Kernel accepts the
4
+ * replaced issuer past its window only for a credential naming an unfinished run of its Domain
5
+ * that was in flight at that change.
6
+ */
7
+ export declare const EXECUTION_CLAIM = "execution";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Private JWT claim of the self credential a durable step's Domain signs for the Kernel: the id of
3
+ * the Execution the step belongs to. After a consented issuer change, the Kernel accepts the
4
+ * replaced issuer past its window only for a credential naming an unfinished run of its Domain
5
+ * that was in flight at that change.
6
+ */
7
+ export const EXECUTION_CLAIM = 'execution';
@@ -12,4 +12,3 @@ export interface ConfigurationOptions {
12
12
  export declare function configuration(issuer: string, algorithms: readonly [string, ...string[]], options?: ConfigurationOptions): Configuration;
13
13
  export declare function acceptConfiguration(input: unknown, expectedIssuer?: string): Configuration;
14
14
  export declare function acceptAlgorithms(input: unknown): readonly [string, ...string[]];
15
- //# sourceMappingURL=configuration.d.ts.map
@@ -84,4 +84,3 @@ function deepFreeze(input) {
84
84
  deepFreeze(value);
85
85
  return Object.freeze(input);
86
86
  }
87
- //# sourceMappingURL=configuration.js.map
@@ -5,4 +5,3 @@ export declare class DiscoveryError extends Error {
5
5
  constructor(code: DiscoveryErrorCode, message: string, options?: ErrorOptions);
6
6
  }
7
7
  export declare function fail(code: DiscoveryErrorCode, message: string, cause?: unknown): never;
8
- //# sourceMappingURL=error.d.ts.map
@@ -9,4 +9,3 @@ export class DiscoveryError extends Error {
9
9
  export function fail(code, message, cause) {
10
10
  throw new DiscoveryError(code, message, cause === undefined ? undefined : { cause });
11
11
  }
12
- //# sourceMappingURL=error.js.map
@@ -23,4 +23,3 @@ export declare function acceptResponse(input: unknown): Response;
23
23
  export declare function acceptErrorResponse(input: unknown): ErrorResponse;
24
24
  export declare function acceptHttpRequest(input: HttpRequest): Request;
25
25
  export declare function responseHeaders(): Readonly<Record<string, string>>;
26
- //# sourceMappingURL=exchange.d.ts.map
@@ -127,4 +127,3 @@ function nonEmptyText(input, label) {
127
127
  }
128
128
  return input;
129
129
  }
130
- //# sourceMappingURL=exchange.js.map
@@ -1,3 +1,2 @@
1
1
  import type { IssuerId } from '@astrale-os/kernel-core/auth/issuer';
2
2
  export declare function hosted(base: string, thumbprint: string): IssuerId | undefined;
3
- //# sourceMappingURL=hosted.d.ts.map
@@ -5,4 +5,3 @@ export function hosted(base, thumbprint) {
5
5
  return undefined;
6
6
  return acceptIssuer(`${acceptIssuer(base)}/iss/${thumbprint}`);
7
7
  }
8
- //# sourceMappingURL=hosted.js.map
@@ -1,7 +1,8 @@
1
+ export { EXECUTION_CLAIM } from './claims.js';
1
2
  export { acceptConfiguration, configuration, type Configuration, type ConfigurationOptions, } from './configuration.js';
2
3
  export { DiscoveryError, type DiscoveryErrorCode } from './error.js';
3
4
  export { hosted } from './hosted.js';
4
5
  export { acceptKeySet, keySet, type KeySet } from './key-set.js';
5
6
  export { paths, type Paths } from './paths.js';
7
+ export { acceptWorkflowEngine, acceptWorkflowEngineIdentityKey, workflowEngine, type WorkflowEngine, } from './workflow-engine.js';
6
8
  export * as exchange from './exchange.js';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,8 @@
1
+ export { EXECUTION_CLAIM } from './claims.js';
1
2
  export { acceptConfiguration, configuration, } from './configuration.js';
2
3
  export { DiscoveryError } from './error.js';
3
4
  export { hosted } from './hosted.js';
4
5
  export { acceptKeySet, keySet } from './key-set.js';
5
6
  export { paths } from './paths.js';
7
+ export { acceptWorkflowEngine, acceptWorkflowEngineIdentityKey, workflowEngine, } from './workflow-engine.js';
6
8
  export * as exchange from './exchange.js';
7
- //# sourceMappingURL=index.js.map
@@ -4,4 +4,3 @@ export interface KeySet {
4
4
  }
5
5
  export declare function keySet(keys: readonly JsonWebKey[], algorithms: readonly [string, ...string[]]): KeySet;
6
6
  export declare function acceptKeySet(input: unknown, algorithms: readonly [string, ...string[]]): KeySet;
7
- //# sourceMappingURL=key-set.d.ts.map
@@ -46,4 +46,3 @@ function deepFreeze(input) {
46
46
  deepFreeze(value);
47
47
  return Object.freeze(input);
48
48
  }
49
- //# sourceMappingURL=key-set.js.map
@@ -2,6 +2,7 @@ export interface Paths {
2
2
  readonly configuration: string;
3
3
  readonly keys: string;
4
4
  readonly tokenExchange: string;
5
+ /** Where Domains discover the workflow engine of a Kernel that drives one. */
6
+ readonly workflowEngine: string;
5
7
  }
6
8
  export declare function paths(issuer: string): Paths;
7
- //# sourceMappingURL=paths.d.ts.map
@@ -6,6 +6,6 @@ export function paths(issuer) {
6
6
  configuration: `${pathname}/.well-known/openid-configuration`,
7
7
  keys: `${pathname}/.well-known/jwks.json`,
8
8
  tokenExchange: `${pathname}/.well-known/astrale/token`,
9
+ workflowEngine: `${pathname}/.well-known/astrale/workflow-engine.json`,
9
10
  });
10
11
  }
11
- //# sourceMappingURL=paths.js.map
@@ -1,3 +1,2 @@
1
1
  import { type IssuerId } from '@astrale-os/kernel-core/auth/issuer';
2
2
  export declare function acceptIssuer(input: unknown): IssuerId;
3
- //# sourceMappingURL=url.d.ts.map
@@ -32,4 +32,3 @@ export function acceptIssuer(input) {
32
32
  throw cause;
33
33
  }
34
34
  }
35
- //# sourceMappingURL=url.js.map
@@ -0,0 +1,18 @@
1
+ import type { IssuerId } from '@astrale-os/kernel-core/auth/issuer';
2
+ /**
3
+ * The workflow engine a Kernel drives, as Domains discover it at
4
+ * `<issuer>/.well-known/astrale/workflow-engine.json`: the engine signs every request to a Domain with
5
+ * one of these Restate request identity keys. Several keys let the Host rotate without a gap.
6
+ */
7
+ export interface WorkflowEngine {
8
+ readonly issuer: IssuerId;
9
+ readonly identity_keys: readonly [string, ...string[]];
10
+ }
11
+ /** Admit one Restate request identity key without imposing a key-set policy. */
12
+ export declare function acceptWorkflowEngineIdentityKey(input: unknown): string;
13
+ export declare function workflowEngine(issuer: string, identityKeys: readonly string[]): WorkflowEngine;
14
+ /**
15
+ * Admit a discovered engine for the expected issuer. Unlike issuer configuration, unknown fields are
16
+ * ignored: the Kernel may add some without breaking deployed Domains.
17
+ */
18
+ export declare function acceptWorkflowEngine(input: unknown, expectedIssuer?: string): WorkflowEngine;
@@ -0,0 +1,59 @@
1
+ import { fail } from './error.js';
2
+ import { acceptIssuer } from './url.js';
3
+ /** Restate's `publickeyv1_` id: base58btc of a raw Ed25519 public key. */
4
+ const IDENTITY_KEY = /^publickeyv1_[1-9A-HJ-NP-Za-km-z]{32,64}$/u;
5
+ const BASE58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
6
+ const MAXIMUM_IDENTITY_KEYS = 8;
7
+ /** Admit one Restate request identity key without imposing a key-set policy. */
8
+ export function acceptWorkflowEngineIdentityKey(input) {
9
+ if (typeof input !== 'string' || !IDENTITY_KEY.test(input) || decodedKeyBytes(input) !== 32) {
10
+ fail('ISSUER_DISCOVERY_INVALID', 'Workflow engine identity keys are invalid.');
11
+ }
12
+ return input;
13
+ }
14
+ export function workflowEngine(issuer, identityKeys) {
15
+ return Object.freeze({
16
+ issuer: acceptIssuer(issuer),
17
+ identity_keys: acceptIdentityKeys(identityKeys),
18
+ });
19
+ }
20
+ /**
21
+ * Admit a discovered engine for the expected issuer. Unlike issuer configuration, unknown fields are
22
+ * ignored: the Kernel may add some without breaking deployed Domains.
23
+ */
24
+ export function acceptWorkflowEngine(input, expectedIssuer) {
25
+ if (input === null || typeof input !== 'object' || Array.isArray(input)) {
26
+ fail('ISSUER_DISCOVERY_INVALID', 'Workflow engine discovery is invalid.');
27
+ }
28
+ const value = input;
29
+ const admitted = acceptIssuer(value.issuer);
30
+ if (expectedIssuer !== undefined && admitted !== acceptIssuer(expectedIssuer)) {
31
+ fail('ISSUER_DISCOVERY_MISMATCH', 'Workflow engine discovery does not match the issuer.');
32
+ }
33
+ return Object.freeze({ issuer: admitted, identity_keys: acceptIdentityKeys(value.identity_keys) });
34
+ }
35
+ function acceptIdentityKeys(input) {
36
+ if (!Array.isArray(input) ||
37
+ input.length === 0 ||
38
+ input.length > MAXIMUM_IDENTITY_KEYS ||
39
+ new Set(input).size !== input.length) {
40
+ fail('ISSUER_DISCOVERY_INVALID', 'Workflow engine identity keys are invalid.');
41
+ }
42
+ return Object.freeze(Array.from(input, acceptWorkflowEngineIdentityKey));
43
+ }
44
+ /** Base58 leading '1' digits represent zero bytes omitted by the integer value. */
45
+ function decodedKeyBytes(key) {
46
+ const encoded = key.slice('publickeyv1_'.length);
47
+ let value = 0n;
48
+ for (const digit of encoded)
49
+ value = value * 58n + BigInt(BASE58.indexOf(digit));
50
+ let bytes = 0;
51
+ for (; value > 0n; value >>= 8n)
52
+ bytes++;
53
+ for (const digit of encoded) {
54
+ if (digit !== '1')
55
+ break;
56
+ bytes++;
57
+ }
58
+ return bytes;
59
+ }
@@ -6,4 +6,3 @@ export interface CallableBinding {
6
6
  }
7
7
  export declare function admitCallableBinding(input: unknown, origin: string): CallableBinding;
8
8
  export declare function admitCallableKey(input: unknown, origin: string): Key.Callable;
9
- //# sourceMappingURL=callable.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { callableAddress, Key } from '@astrale-os/kernel-dsl/v1/addressing';
2
- import { exact, record } from '../content.js';
3
2
  import { fail } from '../error.js';
3
+ import { exact, record } from '../shape.js';
4
4
  import { acceptInvocationEndpoints } from './invocation.js';
5
5
  export function admitCallableBinding(input, origin) {
6
- const value = record(input, 'PUBLICATION_BINDING_INVALID', 'Callable binding is invalid.');
7
- exact(value, ['callable', 'endpoint'], 'PUBLICATION_BINDING_INVALID');
6
+ const value = record(input, 'RELEASE_BINDING_INVALID', 'Callable binding is invalid.');
7
+ exact(value, ['callable', 'endpoint'], 'RELEASE_BINDING_INVALID');
8
8
  return Object.freeze({
9
9
  callable: admitCallableKey(value.callable, origin),
10
10
  endpoint: acceptInvocationEndpoints(value.endpoint),
@@ -17,19 +17,18 @@ export function admitCallableKey(input, origin) {
17
17
  }
18
18
  catch (cause) {
19
19
  if (cause instanceof TypeError) {
20
- return fail('PUBLICATION_BINDING_INVALID', 'Callable key is invalid.', cause);
20
+ return fail('RELEASE_BINDING_INVALID', 'Callable key is invalid.', cause);
21
21
  }
22
22
  throw cause;
23
23
  }
24
24
  if (Key.origin(callable) !== origin) {
25
- fail('PUBLICATION_BINDING_INVALID', 'Binding must name one callable owned by the root Domain.');
25
+ fail('RELEASE_BINDING_INVALID', 'Binding must name one callable owned by the root Domain.');
26
26
  }
27
27
  try {
28
28
  callableAddress(callable);
29
29
  }
30
30
  catch (cause) {
31
- return fail('PUBLICATION_BINDING_INVALID', 'Binding must name one callable owned by the root Domain.', cause);
31
+ return fail('RELEASE_BINDING_INVALID', 'Binding must name one callable owned by the root Domain.', cause);
32
32
  }
33
33
  return callable;
34
34
  }
35
- //# sourceMappingURL=callable.js.map
@@ -1,4 +1,3 @@
1
1
  export { admitCallableBinding, admitCallableKey, type CallableBinding } from './callable.js';
2
2
  export { acceptInvocationEndpoints, type InvocationEndpoints } from './invocation.js';
3
3
  export { admitViewBinding, type ViewBinding } from './view.js';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,3 @@
1
1
  export { admitCallableBinding, admitCallableKey } from './callable.js';
2
2
  export { acceptInvocationEndpoints } from './invocation.js';
3
3
  export { admitViewBinding } from './view.js';
4
- //# sourceMappingURL=index.js.map
@@ -3,4 +3,3 @@ export interface InvocationEndpoints {
3
3
  readonly websocket?: string;
4
4
  }
5
5
  export declare function acceptInvocationEndpoints(input: unknown): InvocationEndpoints;
6
- //# sourceMappingURL=invocation.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { absoluteHttpUrl, absoluteUrl, exact, record } from '../shape.js';
2
+ export function acceptInvocationEndpoints(input) {
3
+ const value = record(input, 'RELEASE_BINDING_INVALID', 'Invocation endpoints are invalid.');
4
+ exact(value, ['http', 'websocket'], 'RELEASE_BINDING_INVALID');
5
+ const http = absoluteHttpUrl(value.http, true, 'RELEASE_BINDING_INVALID');
6
+ const websocket = value.websocket === undefined
7
+ ? undefined
8
+ : absoluteUrl(value.websocket, ['ws:', 'wss:'], true, 'RELEASE_BINDING_INVALID');
9
+ return Object.freeze({
10
+ http,
11
+ ...(websocket === undefined ? {} : { websocket }),
12
+ });
13
+ }
@@ -0,0 +1,11 @@
1
+ import { type ViewHostRequirements } from '@astrale-os/kernel-core/schema/kernel/syscalls/view-resolution';
2
+ import { Key } from '@astrale-os/kernel-dsl/v1/addressing';
3
+ export interface ViewBinding {
4
+ readonly view: Key.View;
5
+ readonly href: string;
6
+ readonly handshake: 'shell' | 'none';
7
+ readonly host?: ViewHostRequirements;
8
+ }
9
+ export declare function admitViewBinding(input: unknown, origin: string): ViewBinding;
10
+ /** Authoring-only normalization used before a release document is sealed. */
11
+ export declare function canonicalizeViewBinding(input: unknown, origin: string): ViewBinding;
@@ -0,0 +1,54 @@
1
+ import { acceptViewHostRequirements, } from '@astrale-os/kernel-core/schema/kernel/syscalls/view-resolution';
2
+ import { Key } from '@astrale-os/kernel-dsl/v1/addressing';
3
+ import { fail } from '../error.js';
4
+ import { absoluteHttpUrl, exact, record } from '../shape.js';
5
+ export function admitViewBinding(input, origin) {
6
+ return readViewBinding(input, origin, false);
7
+ }
8
+ /** Authoring-only normalization used before a release document is sealed. */
9
+ export function canonicalizeViewBinding(input, origin) {
10
+ return readViewBinding(input, origin, true);
11
+ }
12
+ function readViewBinding(input, origin, canonicalize) {
13
+ const value = record(input, 'RELEASE_VIEW_INVALID', 'Release View binding is invalid.');
14
+ exact(value, ['view', 'href', 'handshake', 'host'], 'RELEASE_VIEW_INVALID');
15
+ let view;
16
+ try {
17
+ view = Key(String(value.view));
18
+ }
19
+ catch (cause) {
20
+ if (cause instanceof TypeError) {
21
+ return fail('RELEASE_VIEW_INVALID', 'View key is invalid.', cause);
22
+ }
23
+ throw cause;
24
+ }
25
+ if (Key.origin(view) !== origin || !view.slice(view.indexOf(':') + 1).startsWith('view.')) {
26
+ fail('RELEASE_VIEW_INVALID', 'View binding must name a root View.');
27
+ }
28
+ if (value.handshake !== 'shell' && value.handshake !== 'none') {
29
+ fail('RELEASE_VIEW_INVALID', 'View handshake is invalid.');
30
+ }
31
+ let host;
32
+ try {
33
+ host = acceptViewHostRequirements(dataValue(value, 'host'), value.handshake, canonicalize);
34
+ }
35
+ catch (cause) {
36
+ if (cause instanceof TypeError)
37
+ return fail('RELEASE_VIEW_INVALID', 'View host requirements are invalid.', cause);
38
+ throw cause;
39
+ }
40
+ return Object.freeze({
41
+ view,
42
+ href: absoluteHttpUrl(value.href, true, 'RELEASE_VIEW_INVALID'),
43
+ handshake: value.handshake,
44
+ ...(host === undefined ? {} : { host }),
45
+ });
46
+ }
47
+ function dataValue(input, key) {
48
+ const descriptor = Object.getOwnPropertyDescriptor(input, key);
49
+ if (descriptor === undefined)
50
+ return undefined;
51
+ if (!('value' in descriptor))
52
+ fail('RELEASE_VIEW_INVALID', 'View requirements must be data fields.');
53
+ return descriptor.value;
54
+ }
@@ -0,0 +1,6 @@
1
+ import type { BuildDigest } from './digest.js';
2
+ /** Identity of the code a release runs: the digest of the bytes its build produced. */
3
+ export interface Build {
4
+ readonly digest: BuildDigest;
5
+ }
6
+ export declare function admitBuild(input: unknown): Build;