@astrale-os/kernel-protocol 0.5.0-beta.7 → 0.5.0-beta.71

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 (559) 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 +3 -3
  21. package/dist/errors/protocol-error.d.ts +0 -1
  22. package/dist/errors/protocol-error.js +4 -3
  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 +3 -2
  28. package/dist/index.js +3 -2
  29. package/dist/invocation/admission.d.ts +2 -3
  30. package/dist/invocation/admission.js +7 -11
  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 +1 -2
  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 +4 -36
  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 +6 -4
  58. package/dist/invocation/index.js +5 -4
  59. package/dist/invocation/legacy/delegate.d.ts +17 -0
  60. package/dist/invocation/legacy/delegate.js +37 -0
  61. package/dist/invocation/legacy/index.d.ts +29 -0
  62. package/dist/invocation/legacy/index.js +28 -0
  63. package/dist/invocation/legacy/route.d.ts +14 -0
  64. package/dist/invocation/legacy/route.js +25 -0
  65. package/dist/invocation/legacy/via.d.ts +30 -0
  66. package/dist/invocation/legacy/via.js +15 -0
  67. package/dist/invocation/miss.d.ts +0 -1
  68. package/dist/invocation/miss.js +0 -1
  69. package/dist/invocation/redirect.d.ts +15 -13
  70. package/dist/invocation/redirect.js +9 -22
  71. package/dist/invocation/request.d.ts +0 -1
  72. package/dist/invocation/request.js +2 -3
  73. package/dist/invocation/response.d.ts +0 -1
  74. package/dist/invocation/response.js +0 -1
  75. package/dist/invocation/routing.d.ts +19 -6
  76. package/dist/invocation/routing.js +50 -21
  77. package/dist/invocation/schema.d.ts +6 -5
  78. package/dist/invocation/schema.js +5 -12
  79. package/dist/invocation/service-reason.d.ts +21 -17
  80. package/dist/invocation/service-reason.js +27 -20
  81. package/dist/invocation/stale-route.d.ts +1 -2
  82. package/dist/invocation/stale-route.js +0 -1
  83. package/dist/invocation/stream.d.ts +0 -1
  84. package/dist/invocation/stream.js +0 -1
  85. package/dist/invocation/target.d.ts +5 -3
  86. package/dist/invocation/target.js +25 -4
  87. package/dist/invocation/trace.d.ts +0 -1
  88. package/dist/invocation/trace.js +0 -1
  89. package/dist/invocation/version.d.ts +0 -1
  90. package/dist/invocation/version.js +0 -1
  91. package/dist/invocation/websocket/binary.d.ts +0 -1
  92. package/dist/invocation/websocket/binary.js +1 -1
  93. package/dist/invocation/websocket/index.d.ts +1 -2
  94. package/dist/invocation/websocket/index.js +1 -2
  95. package/dist/invocation/websocket/subprotocol.d.ts +1 -3
  96. package/dist/invocation/websocket/subprotocol.js +3 -5
  97. package/dist/issuer/claims.d.ts +7 -0
  98. package/dist/issuer/claims.js +7 -0
  99. package/dist/issuer/configuration.d.ts +0 -1
  100. package/dist/issuer/configuration.js +0 -1
  101. package/dist/issuer/error.d.ts +0 -1
  102. package/dist/issuer/error.js +0 -1
  103. package/dist/issuer/exchange.d.ts +0 -1
  104. package/dist/issuer/exchange.js +0 -1
  105. package/dist/issuer/hosted.d.ts +0 -1
  106. package/dist/issuer/hosted.js +0 -1
  107. package/dist/issuer/index.d.ts +2 -1
  108. package/dist/issuer/index.js +2 -1
  109. package/dist/issuer/key-set.d.ts +0 -1
  110. package/dist/issuer/key-set.js +0 -1
  111. package/dist/issuer/paths.d.ts +2 -1
  112. package/dist/issuer/paths.js +1 -1
  113. package/dist/issuer/url.d.ts +0 -1
  114. package/dist/issuer/url.js +0 -1
  115. package/dist/issuer/workflow-engine.d.ts +18 -0
  116. package/dist/issuer/workflow-engine.js +59 -0
  117. package/dist/{publication → release}/bindings/callable.d.ts +0 -1
  118. package/dist/release/bindings/callable.js +34 -0
  119. package/dist/{publication → release}/bindings/index.d.ts +1 -2
  120. package/dist/{publication → release}/bindings/index.js +0 -1
  121. package/dist/{publication → release}/bindings/invocation.d.ts +0 -1
  122. package/dist/release/bindings/invocation.js +13 -0
  123. package/dist/release/bindings/view.d.ts +16 -0
  124. package/dist/release/bindings/view.js +148 -0
  125. package/dist/release/build.d.ts +6 -0
  126. package/dist/release/build.js +7 -0
  127. package/dist/release/bundle-admission.d.ts +21 -0
  128. package/dist/release/bundle-admission.js +66 -0
  129. package/dist/{publication → release}/bundle-descriptor.d.ts +0 -1
  130. package/dist/release/bundle-descriptor.js +19 -0
  131. package/dist/release/bundle-evidence.d.ts +3 -0
  132. package/dist/release/bundle-evidence.js +13 -0
  133. package/dist/release/bundle.d.ts +12 -0
  134. package/dist/{publication → release}/bundle.js +16 -11
  135. package/dist/{publication → release}/declaration.d.ts +0 -1
  136. package/dist/release/declaration.js +1 -0
  137. package/dist/{publication → release}/delivery/attestation.d.ts +1 -1
  138. package/dist/{publication → release}/delivery/attestation.js +0 -1
  139. package/dist/release/delivery/claims.d.ts +21 -0
  140. package/dist/release/delivery/claims.js +68 -0
  141. package/dist/release/delivery/delivery.d.ts +11 -0
  142. package/dist/release/delivery/delivery.js +24 -0
  143. package/dist/{publication → release}/delivery/error.d.ts +2 -1
  144. package/dist/{publication → release}/delivery/error.js +1 -1
  145. package/dist/{publication → release}/delivery/index.d.ts +6 -2
  146. package/dist/{publication → release}/delivery/index.js +5 -1
  147. package/dist/{publication → release}/delivery/limits.d.ts +2 -2
  148. package/dist/release/delivery/limits.js +5 -0
  149. package/dist/release/delivery/request.d.ts +21 -0
  150. package/dist/release/delivery/request.js +60 -0
  151. package/dist/{publication → release}/delivery-declaration.d.ts +0 -1
  152. package/dist/{publication → release}/delivery-declaration.js +4 -5
  153. package/dist/{publication → release}/delivery-endpoint.d.ts +0 -1
  154. package/dist/release/delivery-endpoint.js +22 -0
  155. package/dist/release/digest.d.ts +13 -0
  156. package/dist/{publication/etag.js → release/digest.js} +1 -7
  157. package/dist/release/error.d.ts +7 -0
  158. package/dist/release/error.js +11 -0
  159. package/dist/release/index.d.ts +21 -0
  160. package/dist/release/index.js +14 -0
  161. package/dist/release/issuer.d.ts +5 -0
  162. package/dist/release/issuer.js +34 -0
  163. package/dist/release/legacy/bindings.d.ts +14 -0
  164. package/dist/release/legacy/bindings.js +11 -0
  165. package/dist/release/legacy/bundle-admission.d.ts +6 -0
  166. package/dist/release/legacy/bundle-admission.js +10 -0
  167. package/dist/release/legacy/bundle-evidence.d.ts +8 -0
  168. package/dist/release/legacy/bundle-evidence.js +11 -0
  169. package/dist/release/legacy/bundle.d.ts +24 -0
  170. package/dist/release/legacy/bundle.js +31 -0
  171. package/dist/release/legacy/delivery/attestation.d.ts +6 -0
  172. package/dist/release/legacy/delivery/attestation.js +1 -0
  173. package/dist/{publication → release/legacy}/delivery/claims.d.ts +10 -2
  174. package/dist/{publication → release/legacy}/delivery/claims.js +7 -3
  175. package/dist/release/legacy/delivery/delivery.d.ts +18 -0
  176. package/dist/{publication → release/legacy}/delivery/delivery.js +6 -3
  177. package/dist/release/legacy/delivery/error.d.ts +16 -0
  178. package/dist/release/legacy/delivery/error.js +6 -0
  179. package/dist/release/legacy/delivery/index.d.ts +13 -0
  180. package/dist/release/legacy/delivery/index.js +13 -0
  181. package/dist/release/legacy/delivery/limits.d.ts +21 -0
  182. package/dist/release/legacy/delivery/limits.js +22 -0
  183. package/dist/release/legacy/delivery/request.d.ts +26 -0
  184. package/dist/{publication → release/legacy}/delivery/request.js +8 -4
  185. package/dist/release/legacy/delivery-declaration.d.ts +9 -0
  186. package/dist/release/legacy/delivery-declaration.js +11 -0
  187. package/dist/release/legacy/error.d.ts +26 -0
  188. package/dist/release/legacy/error.js +114 -0
  189. package/dist/release/legacy/etag.d.ts +12 -0
  190. package/dist/release/legacy/etag.js +14 -0
  191. package/dist/release/legacy/index.d.ts +75 -0
  192. package/dist/release/legacy/index.js +15 -0
  193. package/dist/release/legacy/profiles.d.ts +23 -0
  194. package/dist/release/legacy/profiles.js +36 -0
  195. package/dist/release/legacy/projection.d.ts +13 -0
  196. package/dist/release/legacy/projection.js +25 -0
  197. package/dist/release/legacy/publication.d.ts +90 -0
  198. package/dist/release/legacy/publication.js +124 -0
  199. package/dist/release/legacy/reference.d.ts +47 -0
  200. package/dist/{publication → release/legacy}/reference.js +27 -4
  201. package/dist/release/legacy/requirements.d.ts +30 -0
  202. package/dist/release/legacy/requirements.js +20 -0
  203. package/dist/release/manifest.d.ts +10 -0
  204. package/dist/release/manifest.js +66 -0
  205. package/dist/release/reference.d.ts +26 -0
  206. package/dist/release/reference.js +70 -0
  207. package/dist/release/release.d.ts +60 -0
  208. package/dist/release/release.js +123 -0
  209. package/dist/release/requirements.d.ts +41 -0
  210. package/dist/release/requirements.js +306 -0
  211. package/dist/{publication → release}/route.d.ts +0 -1
  212. package/dist/{publication → release}/route.js +24 -25
  213. package/dist/{publication → release}/schema.d.ts +1 -2
  214. package/dist/{publication → release}/schema.js +4 -5
  215. package/dist/release/served.d.ts +26 -0
  216. package/dist/release/served.js +65 -0
  217. package/dist/release/shape.d.ts +8 -0
  218. package/dist/{publication/content.js → release/shape.js} +0 -1
  219. package/dist/routes/admission.d.ts +1 -2
  220. package/dist/routes/admission.js +7 -86
  221. package/dist/routes/binding.d.ts +4 -5
  222. package/dist/routes/binding.js +11 -22
  223. package/dist/routes/collision.d.ts +0 -1
  224. package/dist/routes/collision.js +0 -1
  225. package/dist/routes/compiler.d.ts +4 -5
  226. package/dist/routes/compiler.js +20 -13
  227. package/dist/routes/credential.d.ts +12 -2
  228. package/dist/routes/credential.js +11 -4
  229. package/dist/routes/decode.d.ts +6 -4
  230. package/dist/routes/decode.js +32 -30
  231. package/dist/routes/deployment-retired.d.ts +30 -0
  232. package/dist/routes/deployment-retired.js +96 -0
  233. package/dist/routes/encode.d.ts +2 -3
  234. package/dist/routes/encode.js +22 -20
  235. package/dist/routes/entries.d.ts +23 -0
  236. package/dist/routes/entries.js +150 -0
  237. package/dist/routes/error-response.d.ts +0 -1
  238. package/dist/routes/error-response.js +0 -1
  239. package/dist/routes/error.d.ts +0 -1
  240. package/dist/routes/error.js +0 -1
  241. package/dist/routes/evidence.d.ts +4 -5
  242. package/dist/routes/evidence.js +8 -34
  243. package/dist/routes/header.d.ts +9 -0
  244. package/dist/routes/header.js +34 -0
  245. package/dist/routes/index.d.ts +5 -3
  246. package/dist/routes/index.js +5 -3
  247. package/dist/routes/legacy/index.d.ts +29 -0
  248. package/dist/routes/legacy/index.js +29 -0
  249. package/dist/routes/legacy/routing.d.ts +24 -0
  250. package/dist/routes/legacy/routing.js +45 -0
  251. package/dist/routes/legacy/table.d.ts +34 -0
  252. package/dist/routes/legacy/table.js +50 -0
  253. package/dist/routes/mapping.d.ts +1 -2
  254. package/dist/routes/mapping.js +4 -5
  255. package/dist/routes/match.d.ts +1 -2
  256. package/dist/routes/match.js +0 -1
  257. package/dist/routes/placement.d.ts +2 -3
  258. package/dist/routes/placement.js +1 -2
  259. package/dist/routes/plan.d.ts +6 -6
  260. package/dist/routes/plan.js +0 -1
  261. package/dist/routes/request.d.ts +5 -4
  262. package/dist/routes/request.js +0 -1
  263. package/dist/routes/reservation.d.ts +4 -3
  264. package/dist/routes/reservation.js +10 -4
  265. package/dist/routes/routing.d.ts +30 -7
  266. package/dist/routes/routing.js +34 -50
  267. package/dist/routes/scalar.d.ts +3 -4
  268. package/dist/routes/scalar.js +5 -6
  269. package/dist/routes/select.d.ts +1 -2
  270. package/dist/routes/select.js +0 -1
  271. package/dist/routes/stream.d.ts +0 -1
  272. package/dist/routes/stream.js +0 -1
  273. package/dist/routes/table.d.ts +3 -3
  274. package/dist/routes/table.js +0 -1
  275. package/dist/routes/target.d.ts +5 -1
  276. package/dist/routes/target.js +16 -1
  277. package/dist/routes/template.d.ts +0 -1
  278. package/dist/routes/template.js +0 -1
  279. package/dist/runtime/artifact.d.ts +8 -7
  280. package/dist/runtime/artifact.js +23 -11
  281. package/dist/runtime/index.d.ts +1 -2
  282. package/dist/runtime/index.js +1 -2
  283. package/dist/schema/index.d.ts +0 -1
  284. package/dist/schema/index.js +0 -1
  285. package/dist/schema/installation/codec.d.ts +9 -0
  286. package/dist/schema/installation/codec.js +74 -0
  287. package/dist/schema/installation/index.d.ts +2 -1
  288. package/dist/schema/installation/index.js +1 -1
  289. package/dist/schema/installation/introspection/codec.d.ts +14 -3
  290. package/dist/schema/installation/introspection/codec.js +323 -194
  291. package/dist/schema/installation/introspection/index.d.ts +2 -3
  292. package/dist/schema/installation/introspection/index.js +1 -2
  293. package/dist/schema/installation/introspection/result.d.ts +96 -23
  294. package/dist/schema/installation/introspection/result.js +0 -1
  295. package/dist/schema/installation/legacy/index.d.ts +39 -0
  296. package/dist/schema/installation/legacy/index.js +39 -0
  297. package/dist/schema/installation/legacy/installation.d.ts +9 -0
  298. package/dist/schema/installation/legacy/installation.js +28 -0
  299. package/dist/schema/installation/legacy/introspection.d.ts +10 -0
  300. package/dist/schema/installation/legacy/introspection.js +70 -0
  301. package/dist/schema/installation/legacy/msgpack.d.ts +1 -0
  302. package/dist/schema/installation/legacy/msgpack.js +143 -0
  303. package/dist/schema/installation/result.d.ts +9 -0
  304. package/dist/schema/installation/result.js +1 -0
  305. package/package.json +78 -37
  306. package/dist/artifact/index.d.ts.map +0 -1
  307. package/dist/artifact/index.js.map +0 -1
  308. package/dist/artifact/ref.d.ts.map +0 -1
  309. package/dist/artifact/ref.js.map +0 -1
  310. package/dist/codecs/codec.d.ts.map +0 -1
  311. package/dist/codecs/codec.js.map +0 -1
  312. package/dist/codecs/index.d.ts.map +0 -1
  313. package/dist/codecs/index.js.map +0 -1
  314. package/dist/codecs/json.d.ts.map +0 -1
  315. package/dist/codecs/json.js.map +0 -1
  316. package/dist/codecs/media-types.d.ts.map +0 -1
  317. package/dist/codecs/media-types.js.map +0 -1
  318. package/dist/codecs/msgpack.d.ts +0 -5
  319. package/dist/codecs/msgpack.d.ts.map +0 -1
  320. package/dist/codecs/msgpack.js +0 -51
  321. package/dist/codecs/msgpack.js.map +0 -1
  322. package/dist/errors/codes.d.ts.map +0 -1
  323. package/dist/errors/codes.js.map +0 -1
  324. package/dist/errors/http-status.d.ts.map +0 -1
  325. package/dist/errors/http-status.js.map +0 -1
  326. package/dist/errors/index.d.ts.map +0 -1
  327. package/dist/errors/index.js.map +0 -1
  328. package/dist/errors/payload.d.ts.map +0 -1
  329. package/dist/errors/payload.js.map +0 -1
  330. package/dist/errors/protocol-error.d.ts.map +0 -1
  331. package/dist/errors/protocol-error.js.map +0 -1
  332. package/dist/errors/reason.d.ts.map +0 -1
  333. package/dist/errors/reason.js.map +0 -1
  334. package/dist/index.d.ts.map +0 -1
  335. package/dist/index.js.map +0 -1
  336. package/dist/invocation/admission.d.ts.map +0 -1
  337. package/dist/invocation/admission.js.map +0 -1
  338. package/dist/invocation/binary.d.ts.map +0 -1
  339. package/dist/invocation/binary.js.map +0 -1
  340. package/dist/invocation/binding-codecs.d.ts.map +0 -1
  341. package/dist/invocation/binding-codecs.js.map +0 -1
  342. package/dist/invocation/cancellation.d.ts.map +0 -1
  343. package/dist/invocation/cancellation.js.map +0 -1
  344. package/dist/invocation/correlation.d.ts.map +0 -1
  345. package/dist/invocation/correlation.js.map +0 -1
  346. package/dist/invocation/delegate.d.ts.map +0 -1
  347. package/dist/invocation/delegate.js.map +0 -1
  348. package/dist/invocation/http/binary.d.ts.map +0 -1
  349. package/dist/invocation/http/binary.js.map +0 -1
  350. package/dist/invocation/http/index.d.ts.map +0 -1
  351. package/dist/invocation/http/index.js.map +0 -1
  352. package/dist/invocation/http/negotiation.d.ts.map +0 -1
  353. package/dist/invocation/http/negotiation.js.map +0 -1
  354. package/dist/invocation/http/stream.d.ts.map +0 -1
  355. package/dist/invocation/http/stream.js.map +0 -1
  356. package/dist/invocation/http/trace.d.ts.map +0 -1
  357. package/dist/invocation/http/trace.js.map +0 -1
  358. package/dist/invocation/idempotency.d.ts.map +0 -1
  359. package/dist/invocation/idempotency.js.map +0 -1
  360. package/dist/invocation/identity.d.ts.map +0 -1
  361. package/dist/invocation/identity.js.map +0 -1
  362. package/dist/invocation/index.d.ts.map +0 -1
  363. package/dist/invocation/index.js.map +0 -1
  364. package/dist/invocation/miss.d.ts.map +0 -1
  365. package/dist/invocation/miss.js.map +0 -1
  366. package/dist/invocation/redirect.d.ts.map +0 -1
  367. package/dist/invocation/redirect.js.map +0 -1
  368. package/dist/invocation/request.d.ts.map +0 -1
  369. package/dist/invocation/request.js.map +0 -1
  370. package/dist/invocation/response.d.ts.map +0 -1
  371. package/dist/invocation/response.js.map +0 -1
  372. package/dist/invocation/routing.d.ts.map +0 -1
  373. package/dist/invocation/routing.js.map +0 -1
  374. package/dist/invocation/schema.d.ts.map +0 -1
  375. package/dist/invocation/schema.js.map +0 -1
  376. package/dist/invocation/service-reason.d.ts.map +0 -1
  377. package/dist/invocation/service-reason.js.map +0 -1
  378. package/dist/invocation/stale-route.d.ts.map +0 -1
  379. package/dist/invocation/stale-route.js.map +0 -1
  380. package/dist/invocation/stream.d.ts.map +0 -1
  381. package/dist/invocation/stream.js.map +0 -1
  382. package/dist/invocation/target.d.ts.map +0 -1
  383. package/dist/invocation/target.js.map +0 -1
  384. package/dist/invocation/trace.d.ts.map +0 -1
  385. package/dist/invocation/trace.js.map +0 -1
  386. package/dist/invocation/version.d.ts.map +0 -1
  387. package/dist/invocation/version.js.map +0 -1
  388. package/dist/invocation/websocket/binary.d.ts.map +0 -1
  389. package/dist/invocation/websocket/binary.js.map +0 -1
  390. package/dist/invocation/websocket/index.d.ts.map +0 -1
  391. package/dist/invocation/websocket/index.js.map +0 -1
  392. package/dist/invocation/websocket/subprotocol.d.ts.map +0 -1
  393. package/dist/invocation/websocket/subprotocol.js.map +0 -1
  394. package/dist/issuer/configuration.d.ts.map +0 -1
  395. package/dist/issuer/configuration.js.map +0 -1
  396. package/dist/issuer/error.d.ts.map +0 -1
  397. package/dist/issuer/error.js.map +0 -1
  398. package/dist/issuer/exchange.d.ts.map +0 -1
  399. package/dist/issuer/exchange.js.map +0 -1
  400. package/dist/issuer/hosted.d.ts.map +0 -1
  401. package/dist/issuer/hosted.js.map +0 -1
  402. package/dist/issuer/index.d.ts.map +0 -1
  403. package/dist/issuer/index.js.map +0 -1
  404. package/dist/issuer/key-set.d.ts.map +0 -1
  405. package/dist/issuer/key-set.js.map +0 -1
  406. package/dist/issuer/paths.d.ts.map +0 -1
  407. package/dist/issuer/paths.js.map +0 -1
  408. package/dist/issuer/url.d.ts.map +0 -1
  409. package/dist/issuer/url.js.map +0 -1
  410. package/dist/publication/bindings/callable.d.ts.map +0 -1
  411. package/dist/publication/bindings/callable.js +0 -32
  412. package/dist/publication/bindings/callable.js.map +0 -1
  413. package/dist/publication/bindings/index.d.ts.map +0 -1
  414. package/dist/publication/bindings/index.js.map +0 -1
  415. package/dist/publication/bindings/invocation.d.ts.map +0 -1
  416. package/dist/publication/bindings/invocation.js +0 -14
  417. package/dist/publication/bindings/invocation.js.map +0 -1
  418. package/dist/publication/bindings/view.d.ts +0 -8
  419. package/dist/publication/bindings/view.d.ts.map +0 -1
  420. package/dist/publication/bindings/view.js +0 -29
  421. package/dist/publication/bindings/view.js.map +0 -1
  422. package/dist/publication/bundle-admission.d.ts +0 -5
  423. package/dist/publication/bundle-admission.d.ts.map +0 -1
  424. package/dist/publication/bundle-admission.js +0 -66
  425. package/dist/publication/bundle-admission.js.map +0 -1
  426. package/dist/publication/bundle-descriptor.d.ts.map +0 -1
  427. package/dist/publication/bundle-descriptor.js +0 -20
  428. package/dist/publication/bundle-descriptor.js.map +0 -1
  429. package/dist/publication/bundle-evidence.d.ts +0 -4
  430. package/dist/publication/bundle-evidence.d.ts.map +0 -1
  431. package/dist/publication/bundle-evidence.js +0 -14
  432. package/dist/publication/bundle-evidence.js.map +0 -1
  433. package/dist/publication/bundle.d.ts +0 -10
  434. package/dist/publication/bundle.d.ts.map +0 -1
  435. package/dist/publication/bundle.js.map +0 -1
  436. package/dist/publication/content.d.ts +0 -11
  437. package/dist/publication/content.d.ts.map +0 -1
  438. package/dist/publication/content.js.map +0 -1
  439. package/dist/publication/declaration.d.ts.map +0 -1
  440. package/dist/publication/declaration.js +0 -2
  441. package/dist/publication/declaration.js.map +0 -1
  442. package/dist/publication/delivery/attestation.d.ts.map +0 -1
  443. package/dist/publication/delivery/attestation.js.map +0 -1
  444. package/dist/publication/delivery/claims.d.ts.map +0 -1
  445. package/dist/publication/delivery/claims.js.map +0 -1
  446. package/dist/publication/delivery/delivery.d.ts +0 -10
  447. package/dist/publication/delivery/delivery.d.ts.map +0 -1
  448. package/dist/publication/delivery/delivery.js.map +0 -1
  449. package/dist/publication/delivery/error.d.ts.map +0 -1
  450. package/dist/publication/delivery/error.js.map +0 -1
  451. package/dist/publication/delivery/index.d.ts.map +0 -1
  452. package/dist/publication/delivery/index.js.map +0 -1
  453. package/dist/publication/delivery/limits.d.ts.map +0 -1
  454. package/dist/publication/delivery/limits.js +0 -5
  455. package/dist/publication/delivery/limits.js.map +0 -1
  456. package/dist/publication/delivery/request.d.ts +0 -16
  457. package/dist/publication/delivery/request.d.ts.map +0 -1
  458. package/dist/publication/delivery/request.js.map +0 -1
  459. package/dist/publication/delivery-declaration.d.ts.map +0 -1
  460. package/dist/publication/delivery-declaration.js.map +0 -1
  461. package/dist/publication/delivery-endpoint.d.ts.map +0 -1
  462. package/dist/publication/delivery-endpoint.js +0 -23
  463. package/dist/publication/delivery-endpoint.js.map +0 -1
  464. package/dist/publication/error.d.ts +0 -8
  465. package/dist/publication/error.d.ts.map +0 -1
  466. package/dist/publication/error.js +0 -12
  467. package/dist/publication/error.js.map +0 -1
  468. package/dist/publication/etag.d.ts +0 -7
  469. package/dist/publication/etag.d.ts.map +0 -1
  470. package/dist/publication/etag.js.map +0 -1
  471. package/dist/publication/index.d.ts +0 -18
  472. package/dist/publication/index.d.ts.map +0 -1
  473. package/dist/publication/index.js +0 -11
  474. package/dist/publication/index.js.map +0 -1
  475. package/dist/publication/manifest.d.ts +0 -7
  476. package/dist/publication/manifest.d.ts.map +0 -1
  477. package/dist/publication/manifest.js +0 -26
  478. package/dist/publication/manifest.js.map +0 -1
  479. package/dist/publication/publication.d.ts +0 -37
  480. package/dist/publication/publication.d.ts.map +0 -1
  481. package/dist/publication/publication.js +0 -131
  482. package/dist/publication/publication.js.map +0 -1
  483. package/dist/publication/reference.d.ts +0 -18
  484. package/dist/publication/reference.d.ts.map +0 -1
  485. package/dist/publication/reference.js.map +0 -1
  486. package/dist/publication/requirements.d.ts +0 -27
  487. package/dist/publication/requirements.d.ts.map +0 -1
  488. package/dist/publication/requirements.js +0 -185
  489. package/dist/publication/requirements.js.map +0 -1
  490. package/dist/publication/route.d.ts.map +0 -1
  491. package/dist/publication/route.js.map +0 -1
  492. package/dist/publication/schema.d.ts.map +0 -1
  493. package/dist/publication/schema.js.map +0 -1
  494. package/dist/routes/admission.d.ts.map +0 -1
  495. package/dist/routes/admission.js.map +0 -1
  496. package/dist/routes/binding.d.ts.map +0 -1
  497. package/dist/routes/binding.js.map +0 -1
  498. package/dist/routes/collision.d.ts.map +0 -1
  499. package/dist/routes/collision.js.map +0 -1
  500. package/dist/routes/compiler.d.ts.map +0 -1
  501. package/dist/routes/compiler.js.map +0 -1
  502. package/dist/routes/credential.d.ts.map +0 -1
  503. package/dist/routes/credential.js.map +0 -1
  504. package/dist/routes/decode.d.ts.map +0 -1
  505. package/dist/routes/decode.js.map +0 -1
  506. package/dist/routes/encode.d.ts.map +0 -1
  507. package/dist/routes/encode.js.map +0 -1
  508. package/dist/routes/error-response.d.ts.map +0 -1
  509. package/dist/routes/error-response.js.map +0 -1
  510. package/dist/routes/error.d.ts.map +0 -1
  511. package/dist/routes/error.js.map +0 -1
  512. package/dist/routes/evidence.d.ts.map +0 -1
  513. package/dist/routes/evidence.js.map +0 -1
  514. package/dist/routes/index.d.ts.map +0 -1
  515. package/dist/routes/index.js.map +0 -1
  516. package/dist/routes/mapping.d.ts.map +0 -1
  517. package/dist/routes/mapping.js.map +0 -1
  518. package/dist/routes/match.d.ts.map +0 -1
  519. package/dist/routes/match.js.map +0 -1
  520. package/dist/routes/placement.d.ts.map +0 -1
  521. package/dist/routes/placement.js.map +0 -1
  522. package/dist/routes/plan.d.ts.map +0 -1
  523. package/dist/routes/plan.js.map +0 -1
  524. package/dist/routes/release-unavailable.d.ts +0 -9
  525. package/dist/routes/release-unavailable.d.ts.map +0 -1
  526. package/dist/routes/release-unavailable.js +0 -33
  527. package/dist/routes/release-unavailable.js.map +0 -1
  528. package/dist/routes/request.d.ts.map +0 -1
  529. package/dist/routes/request.js.map +0 -1
  530. package/dist/routes/reservation.d.ts.map +0 -1
  531. package/dist/routes/reservation.js.map +0 -1
  532. package/dist/routes/routing.d.ts.map +0 -1
  533. package/dist/routes/routing.js.map +0 -1
  534. package/dist/routes/scalar.d.ts.map +0 -1
  535. package/dist/routes/scalar.js.map +0 -1
  536. package/dist/routes/select.d.ts.map +0 -1
  537. package/dist/routes/select.js.map +0 -1
  538. package/dist/routes/stream.d.ts.map +0 -1
  539. package/dist/routes/stream.js.map +0 -1
  540. package/dist/routes/table.d.ts.map +0 -1
  541. package/dist/routes/table.js.map +0 -1
  542. package/dist/routes/target.d.ts.map +0 -1
  543. package/dist/routes/target.js.map +0 -1
  544. package/dist/routes/template.d.ts.map +0 -1
  545. package/dist/routes/template.js.map +0 -1
  546. package/dist/runtime/artifact.d.ts.map +0 -1
  547. package/dist/runtime/artifact.js.map +0 -1
  548. package/dist/runtime/index.d.ts.map +0 -1
  549. package/dist/runtime/index.js.map +0 -1
  550. package/dist/schema/index.d.ts.map +0 -1
  551. package/dist/schema/index.js.map +0 -1
  552. package/dist/schema/installation/index.d.ts.map +0 -1
  553. package/dist/schema/installation/index.js.map +0 -1
  554. package/dist/schema/installation/introspection/codec.d.ts.map +0 -1
  555. package/dist/schema/installation/introspection/codec.js.map +0 -1
  556. package/dist/schema/installation/introspection/index.d.ts.map +0 -1
  557. package/dist/schema/installation/introspection/index.js.map +0 -1
  558. package/dist/schema/installation/introspection/result.d.ts.map +0 -1
  559. package/dist/schema/installation/introspection/result.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { CONTENT_TYPE_JSON, CONTENT_TYPE_MSGPACK } from '../../codecs/index.js';
1
+ import { CONTENT_TYPE_JSON } from '../../codecs/index.js';
2
2
  import { admitSupportedCodecs } from '../binding-codecs.js';
3
3
  const TOKEN = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u;
4
4
  const QVALUE = /^(?:0(?:\.\d{0,3})?|1(?:\.0{0,3})?)$/u;
@@ -9,11 +9,7 @@ export function codecForContentType(contentType, supported) {
9
9
  const mediaType = parseContentType(contentType);
10
10
  if (mediaType === undefined)
11
11
  return undefined;
12
- const profile = mediaType === CONTENT_TYPE_JSON
13
- ? 'json'
14
- : mediaType === CONTENT_TYPE_MSGPACK
15
- ? 'msgpack'
16
- : undefined;
12
+ const profile = mediaType === CONTENT_TYPE_JSON ? 'json' : undefined;
17
13
  return admitted.find((entry) => entry.profile === profile)?.codec;
18
14
  }
19
15
  export function negotiateResponseCodec(accept, requestCodec, supported) {
@@ -27,7 +23,7 @@ export function negotiateResponseCodec(accept, requestCodec, supported) {
27
23
  if (ranges.length === 0)
28
24
  return undefined;
29
25
  const candidates = admitted.flatMap((entry) => {
30
- const [type, subtype] = contentTypeOf(entry.profile).split('/');
26
+ const [type, subtype] = CONTENT_TYPE_JSON.split('/');
31
27
  const governing = ranges
32
28
  .filter((range) => range.mediaParameters === 0 &&
33
29
  (range.type === '*' || range.type === type) &&
@@ -56,9 +52,6 @@ export function negotiateResponseCodec(accept, requestCodec, supported) {
56
52
  });
57
53
  return candidates[0]?.codec;
58
54
  }
59
- function contentTypeOf(profile) {
60
- return profile === 'json' ? CONTENT_TYPE_JSON : CONTENT_TYPE_MSGPACK;
61
- }
62
55
  function parseContentType(input) {
63
56
  if (splitOutsideQuotes(input, ',')?.length !== 1)
64
57
  return undefined;
@@ -205,4 +198,3 @@ function splitOutsideQuotes(input, separator) {
205
198
  parts.push(input.slice(start));
206
199
  return parts;
207
200
  }
208
- //# sourceMappingURL=negotiation.js.map
@@ -0,0 +1,11 @@
1
+ import { type Request } from '../request.js';
2
+ export declare const REQUEST_ENVELOPE_FIELD: 'x-astrale-request';
3
+ export declare const BINARY_LENGTH_FIELD: 'x-astrale-binary-length';
4
+ export declare const BINARY_REQUEST_CONTENT_TYPE: 'application/octet-stream';
5
+ export declare const MAXIMUM_REQUEST_ENVELOPE_BYTES = 8192;
6
+ /** Decode one declared byte count: a canonical unsigned decimal within the safe integer range. */
7
+ export declare function decodeBinaryLength(input: string): number | undefined;
8
+ /** Encode one canonical V2 Request into the binary-request HTTP field. */
9
+ export declare function encodeBinaryRequestEnvelope(input: Request): string;
10
+ /** Decode one bounded base64url JSON V2 Request from the binary-request HTTP field. */
11
+ export declare function decodeBinaryRequestEnvelope(input: string | null): Request;
@@ -0,0 +1,69 @@
1
+ import { json } from '../../codecs/index.js';
2
+ import { CODES, ProtocolError } from '../../errors/index.js';
3
+ import { decodeRequest } from '../request.js';
4
+ export const REQUEST_ENVELOPE_FIELD = 'x-astrale-request';
5
+ export const BINARY_LENGTH_FIELD = 'x-astrale-binary-length';
6
+ export const BINARY_REQUEST_CONTENT_TYPE = 'application/octet-stream';
7
+ export const MAXIMUM_REQUEST_ENVELOPE_BYTES = 8_192;
8
+ const BASE64URL = /^[A-Za-z0-9_-]+$/u;
9
+ const MAXIMUM_ENCODED_BYTES = Math.ceil(MAXIMUM_REQUEST_ENVELOPE_BYTES / 3) * 4;
10
+ const DECIMAL = /^(?:0|[1-9][0-9]*)$/u;
11
+ /** Decode one declared byte count: a canonical unsigned decimal within the safe integer range. */
12
+ export function decodeBinaryLength(input) {
13
+ if (!DECIMAL.test(input))
14
+ return undefined;
15
+ const length = Number(input);
16
+ return Number.isSafeInteger(length) ? length : undefined;
17
+ }
18
+ /** Encode one canonical V2 Request into the binary-request HTTP field. */
19
+ export function encodeBinaryRequestEnvelope(input) {
20
+ const request = decodeRequest(input);
21
+ const encoded = json.encode(request);
22
+ if (typeof encoded !== 'string')
23
+ throw new TypeError('JSON Request codec returned non-text output.');
24
+ const bytes = new TextEncoder().encode(encoded);
25
+ if (bytes.byteLength > MAXIMUM_REQUEST_ENVELOPE_BYTES)
26
+ return invalid();
27
+ return btoa(String.fromCharCode(...bytes))
28
+ .replaceAll('+', '-')
29
+ .replaceAll('/', '_')
30
+ .replace(/=+$/u, '');
31
+ }
32
+ /** Decode one bounded base64url JSON V2 Request from the binary-request HTTP field. */
33
+ export function decodeBinaryRequestEnvelope(input) {
34
+ if (input === null ||
35
+ input.length === 0 ||
36
+ input.length > MAXIMUM_ENCODED_BYTES ||
37
+ !BASE64URL.test(input)) {
38
+ return invalid();
39
+ }
40
+ let bytes;
41
+ try {
42
+ const binary = atob(input.replaceAll('-', '+').replaceAll('_', '/') + '='.repeat((4 - (input.length % 4)) % 4));
43
+ bytes = Uint8Array.from(binary, (character) => character.charCodeAt(0));
44
+ }
45
+ catch {
46
+ return invalid();
47
+ }
48
+ if (bytes.byteLength > MAXIMUM_REQUEST_ENVELOPE_BYTES)
49
+ return invalid();
50
+ try {
51
+ // Require canonical base64url so alternate encodings cannot name the same envelope.
52
+ const canonical = btoa(String.fromCharCode(...bytes))
53
+ .replaceAll('+', '-')
54
+ .replaceAll('/', '_')
55
+ .replace(/=+$/u, '');
56
+ if (canonical !== input)
57
+ return invalid();
58
+ return decodeRequest(json.decode(bytes));
59
+ }
60
+ catch {
61
+ return invalid();
62
+ }
63
+ }
64
+ function invalid() {
65
+ throw new ProtocolError({
66
+ code: CODES.INVALID_REQUEST,
67
+ message: 'HTTP binary Request envelope is invalid.',
68
+ });
69
+ }
@@ -3,4 +3,3 @@ import type { StreamFrame } from '../stream.js';
3
3
  export declare const STREAM_FRAMING_FIELD: 'x-astrale-stream-framing';
4
4
  export declare const LENGTH_PREFIX_V1: 'length-prefix-v1';
5
5
  export declare function encodeStreamFrame(codec: Codec, frame: StreamFrame): Uint8Array;
6
- //# sourceMappingURL=stream.d.ts.map
@@ -13,4 +13,3 @@ export function encodeStreamFrame(codec, frame) {
13
13
  output.set(payload, 4);
14
14
  return output;
15
15
  }
16
- //# sourceMappingURL=stream.js.map
@@ -4,4 +4,3 @@ export declare const TRACESTATE_FIELD = "tracestate";
4
4
  export declare const BAGGAGE_FIELD = "baggage";
5
5
  export declare function decodeTraceHeaders(traceparent: string | null, tracestate: string | null): Trace | undefined;
6
6
  export declare function encodeTraceHeaders(carrier: Trace | undefined): Readonly<Record<string, string>>;
7
- //# sourceMappingURL=trace.d.ts.map
@@ -22,4 +22,3 @@ export function encodeTraceHeaders(carrier) {
22
22
  ...(admitted.tracestate === undefined ? {} : { [TRACESTATE_FIELD]: admitted.tracestate }),
23
23
  });
24
24
  }
25
- //# sourceMappingURL=trace.js.map
@@ -8,4 +8,3 @@ export declare const MAXIMUM_IDEMPOTENCY_KEY_LENGTH = 128;
8
8
  /** Admit an opaque URL-safe ASCII key without assigning it semantic structure. */
9
9
  export declare function acceptIdempotencyKey(input: unknown, label?: string): IdempotencyKey;
10
10
  export {};
11
- //# sourceMappingURL=idempotency.d.ts.map
@@ -11,4 +11,3 @@ export function acceptIdempotencyKey(input, label = 'idempotency key') {
11
11
  }
12
12
  return input;
13
13
  }
14
- //# sourceMappingURL=idempotency.js.map
@@ -14,4 +14,3 @@ export declare class InvocationError extends TypeError {
14
14
  export declare function acceptInvocationId(input: unknown): InvocationId;
15
15
  /** Compare both canonical coordinate fields exactly. */
16
16
  export declare function sameInvocationId(left: InvocationId, right: InvocationId): boolean;
17
- //# sourceMappingURL=identity.d.ts.map
@@ -53,4 +53,3 @@ function isLocalInvocationId(input) {
53
53
  function invalid(input) {
54
54
  throw new InvocationError(input);
55
55
  }
56
- //# sourceMappingURL=identity.js.map
@@ -5,17 +5,19 @@ export { acceptIdempotencyKey, HTTP_IDEMPOTENCY_KEY, MAXIMUM_IDEMPOTENCY_KEY_LEN
5
5
  export { acceptInvocationId, InvocationError, MAXIMUM_INVOCATION_ID_LENGTH, sameInvocationId, type InvocationId, } from './identity.js';
6
6
  export * as http from './http/index.js';
7
7
  export { acceptDelegate, type Delegate } from './delegate.js';
8
+ export type { PublicationBindingInput, PublicationVia } from './legacy/index.js';
9
+ /** @deprecated The legacy routed witness every Kernel emits until the breaking release (AM-1). */
10
+ export * as legacy from './legacy/index.js';
8
11
  export { decodeMiss, miss, type Miss } from './miss.js';
9
12
  export { acceptRoute, acceptRedirection, decodeRedirectResponse, remoteRoute, type RemoteBindingInput, type Redirection, type RedirectResponse, type Route, } from './redirect.js';
10
13
  export { decodeRequest, type Request } from './request.js';
11
14
  export { admitTrace, MAXIMUM_TRACEPARENT_BYTES, MAXIMUM_TRACESTATE_BYTES, MAXIMUM_TRACESTATE_MEMBERS, type Trace, } from './trace.js';
12
- export { acceptRouting, type Refresh, type Routing, type Via } from './routing.js';
15
+ export { acceptRouting, routedDigest, routedRevision, type Refresh, type Routing, type Via, } from './routing.js';
13
16
  export { acceptSchemaTarget, type SchemaTarget } from './schema.js';
14
17
  export { decodeResponse, type ErrorResponse, type Response, type ResponseContext, type SuccessResponse, } from './response.js';
15
- export { SCHEMA_UPGRADE_REQUIRED, SCHEMA_REVISION_MISMATCH, SERVICE_CANDIDATE_INVALID, SERVICE_TRUST_REQUIRED, SERVICE_UNAVAILABLE, serviceErrorOf, type SchemaUpgradeRequiredDetails, type SchemaUpgradeRequiredReason, type SchemaRevisionMismatchDetails, type SchemaRevisionMismatchReason, type ServiceCandidateInvalidDetails, type ServiceCandidateInvalidReason, type ServiceErrorPayload, type ServiceReason, type ServiceTrustRequiredDetails, type ServiceTrustRequiredReason, type ServiceUnavailableDetails, type ServiceUnavailableReason, } from './service-reason.js';
18
+ export { CALLABLE_FINGERPRINT_MISMATCH, DEPLOYMENT_RETIRED, SERVICE_CANDIDATE_INVALID, SERVICE_TRUST_REQUIRED, SERVICE_UNAVAILABLE, serviceErrorOf, type CallableFingerprintMismatchDetails, type CallableFingerprintMismatchReason, type DeploymentRetiredDetails, type DeploymentRetiredReason, type ServiceCandidateInvalidDetails, type ServiceCandidateInvalidReason, type ServiceErrorPayload, type ServiceReason, type ServiceTrustRequiredDetails, type ServiceTrustRequiredReason, type ServiceUnavailableDetails, type ServiceUnavailableReason, } from './service-reason.js';
16
19
  export { decodeStale, stale, type Stale } from './stale-route.js';
17
20
  export { decodeStreamFrame, type StreamEndFrame, type StreamErrorFrame, type StreamFrame, type StreamItemFrame, type StreamStartFrame, } from './stream.js';
18
- export { acceptCall, type Call } from './target.js';
21
+ export { Target, targetPath, acceptCall, type Call } from './target.js';
19
22
  export { VERSION, type Version } from './version.js';
20
23
  export * as websocket from './websocket/index.js';
21
- //# sourceMappingURL=index.d.ts.map
@@ -5,17 +5,18 @@ export { acceptIdempotencyKey, HTTP_IDEMPOTENCY_KEY, MAXIMUM_IDEMPOTENCY_KEY_LEN
5
5
  export { acceptInvocationId, InvocationError, MAXIMUM_INVOCATION_ID_LENGTH, sameInvocationId, } from './identity.js';
6
6
  export * as http from './http/index.js';
7
7
  export { acceptDelegate } from './delegate.js';
8
+ /** @deprecated The legacy routed witness every Kernel emits until the breaking release (AM-1). */
9
+ export * as legacy from './legacy/index.js';
8
10
  export { decodeMiss, miss } from './miss.js';
9
11
  export { acceptRoute, acceptRedirection, decodeRedirectResponse, remoteRoute, } from './redirect.js';
10
12
  export { decodeRequest } from './request.js';
11
13
  export { admitTrace, MAXIMUM_TRACEPARENT_BYTES, MAXIMUM_TRACESTATE_BYTES, MAXIMUM_TRACESTATE_MEMBERS, } from './trace.js';
12
- export { acceptRouting } from './routing.js';
14
+ export { acceptRouting, routedDigest, routedRevision, } from './routing.js';
13
15
  export { acceptSchemaTarget } from './schema.js';
14
16
  export { decodeResponse, } from './response.js';
15
- export { SCHEMA_UPGRADE_REQUIRED, SCHEMA_REVISION_MISMATCH, SERVICE_CANDIDATE_INVALID, SERVICE_TRUST_REQUIRED, SERVICE_UNAVAILABLE, serviceErrorOf, } from './service-reason.js';
17
+ export { CALLABLE_FINGERPRINT_MISMATCH, DEPLOYMENT_RETIRED, SERVICE_CANDIDATE_INVALID, SERVICE_TRUST_REQUIRED, SERVICE_UNAVAILABLE, serviceErrorOf, } from './service-reason.js';
16
18
  export { decodeStale, stale } from './stale-route.js';
17
19
  export { decodeStreamFrame, } from './stream.js';
18
- export { acceptCall } from './target.js';
20
+ export { Target, targetPath, acceptCall } from './target.js';
19
21
  export { VERSION } from './version.js';
20
22
  export * as websocket from './websocket/index.js';
21
- //# sourceMappingURL=index.js.map
@@ -0,0 +1,17 @@
1
+ /**
2
+ * A source `Delegate` may still carry `attenuation` with the self expression
3
+ * `{ kind: 'identity', self: true }`, the one value published Clients and SDK Workers send. It names
4
+ * the caller every Delegate preserves anyway, so `acceptDelegate` drops it and returns the same
5
+ * `Delegate` as without it. Every other value, `undefined` and `null` included, stays refused.
6
+ *
7
+ * @deprecated Omit `attenuation`; a Delegate always preserves the authenticated caller (ADR-3).
8
+ *
9
+ * Short-term consumers: Domain Workers built with `@astrale-os/sdk` 0.6.0-beta.0 to beta.3, whose
10
+ * `Function.admit` callback sends it (the Shell v3 Worker included), and callers that pass it in
11
+ * `delegate` to `@astrale-os/kernel-client` 0.6.0-beta.85 or earlier.
12
+ *
13
+ * Removal, in a separate breaking release, once those Workers are redeployed with a later SDK and
14
+ * every consumer runs a Client that omits the field: delete this file, its call in `../delegate.ts`
15
+ * and its vectors in INVOCATION-DELEGATE-OMISSION-EVIDENCE.
16
+ */
17
+ export declare function withoutSelfAttenuation(object: Record<string, unknown>): Record<string, unknown>;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * A source `Delegate` may still carry `attenuation` with the self expression
3
+ * `{ kind: 'identity', self: true }`, the one value published Clients and SDK Workers send. It names
4
+ * the caller every Delegate preserves anyway, so `acceptDelegate` drops it and returns the same
5
+ * `Delegate` as without it. Every other value, `undefined` and `null` included, stays refused.
6
+ *
7
+ * @deprecated Omit `attenuation`; a Delegate always preserves the authenticated caller (ADR-3).
8
+ *
9
+ * Short-term consumers: Domain Workers built with `@astrale-os/sdk` 0.6.0-beta.0 to beta.3, whose
10
+ * `Function.admit` callback sends it (the Shell v3 Worker included), and callers that pass it in
11
+ * `delegate` to `@astrale-os/kernel-client` 0.6.0-beta.85 or earlier.
12
+ *
13
+ * Removal, in a separate breaking release, once those Workers are redeployed with a later SDK and
14
+ * every consumer runs a Client that omits the field: delete this file, its call in `../delegate.ts`
15
+ * and its vectors in INVOCATION-DELEGATE-OMISSION-EVIDENCE.
16
+ */
17
+ export function withoutSelfAttenuation(object) {
18
+ if (!Object.hasOwn(object, 'attenuation') || !isSelf(object.attenuation))
19
+ return object;
20
+ const { attenuation: _self, ...rest } = object;
21
+ return rest;
22
+ }
23
+ function isSelf(value) {
24
+ if (value === null || typeof value !== 'object' || Array.isArray(value))
25
+ return false;
26
+ const prototype = Object.getPrototypeOf(value);
27
+ if (prototype !== Object.prototype && prototype !== null)
28
+ return false;
29
+ if (Reflect.ownKeys(value).length !== 2)
30
+ return false;
31
+ const kind = Object.getOwnPropertyDescriptor(value, 'kind');
32
+ const self = Object.getOwnPropertyDescriptor(value, 'self');
33
+ return (kind?.enumerable === true &&
34
+ kind.value === 'identity' &&
35
+ self?.enumerable === true &&
36
+ self.value === true);
37
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Publication-based routing, retained for v2/v3 pins and frozen v3 projections of v4 pins.
3
+ * The Kernel emits this shape while decoders also accept release-based `Via`.
4
+ * Superseded by `Via` and `remoteRoute` from `@astrale-os/kernel-protocol/invocation`.
5
+ *
6
+ * Short-term consumers:
7
+ * - the Runtime redirect (`runtime/functions/runtime.ts`), the Kernel's only emitter until the
8
+ * breaking release (AM-1, CT5-E), because every client and View built before K5 decodes only
9
+ * this shape: the pinned document's own reference for a v2/v3 pin, the frozen v3 projection's
10
+ * for a v4 pin. The breaking release switches v4 pins to `remoteRoute`; v2/v3 pins keep this;
11
+ * - servers built from a v2/v3 Publication, which admit only this shape (the SDK's `requireVia`,
12
+ * the Server's `HandlerRequest.via`).
13
+ *
14
+ * Removal, in a separate breaking release: the conditions of `protocol/release/legacy/index.ts`
15
+ * hold (no installation pins a v2/v3 document) and every supported client relays `Via`. Then
16
+ * delete, in the same PR:
17
+ * - this folder, the `legacy` namespace of `invocation/index.ts` and its `PublicationVia` and
18
+ * `PublicationBindingInput` type exports;
19
+ * - the `publication` branch of `acceptVia` and of `routedRevision`/`routedDigest` in `routing.ts`;
20
+ * - the `PublicationVia` member of `Routing` (`routing.ts`) and of `Route.via` (`redirect.ts`);
21
+ * - the `PublicationVia` member of `routes.Invocation.routing` (`routes/request.ts`) and of the
22
+ * Server's `HandlerRequest.via` (`server/invocation/types.ts`), with the refusal of a release
23
+ * `Via` at a Publication-backed destination (law SV-PUBLICATION-ADMITS-LEGACY-VIA);
24
+ * - the legacy vectors of TEST-VIA-NAMES-EXACTLY-ONE-REFERENCE, and the Runtime redirect's last
25
+ * `legacy.remoteRoute` call with its dispatch test;
26
+ * - `PublicationVia` and `Route.via` from law PROTOCOL-LEGACY-WIRE-FIELDS and its test.
27
+ */
28
+ export { remoteRoute } from './route.js';
29
+ export type { PublicationBindingInput, PublicationVia } from './via.js';
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Publication-based routing, retained for v2/v3 pins and frozen v3 projections of v4 pins.
3
+ * The Kernel emits this shape while decoders also accept release-based `Via`.
4
+ * Superseded by `Via` and `remoteRoute` from `@astrale-os/kernel-protocol/invocation`.
5
+ *
6
+ * Short-term consumers:
7
+ * - the Runtime redirect (`runtime/functions/runtime.ts`), the Kernel's only emitter until the
8
+ * breaking release (AM-1, CT5-E), because every client and View built before K5 decodes only
9
+ * this shape: the pinned document's own reference for a v2/v3 pin, the frozen v3 projection's
10
+ * for a v4 pin. The breaking release switches v4 pins to `remoteRoute`; v2/v3 pins keep this;
11
+ * - servers built from a v2/v3 Publication, which admit only this shape (the SDK's `requireVia`,
12
+ * the Server's `HandlerRequest.via`).
13
+ *
14
+ * Removal, in a separate breaking release: the conditions of `protocol/release/legacy/index.ts`
15
+ * hold (no installation pins a v2/v3 document) and every supported client relays `Via`. Then
16
+ * delete, in the same PR:
17
+ * - this folder, the `legacy` namespace of `invocation/index.ts` and its `PublicationVia` and
18
+ * `PublicationBindingInput` type exports;
19
+ * - the `publication` branch of `acceptVia` and of `routedRevision`/`routedDigest` in `routing.ts`;
20
+ * - the `PublicationVia` member of `Routing` (`routing.ts`) and of `Route.via` (`redirect.ts`);
21
+ * - the `PublicationVia` member of `routes.Invocation.routing` (`routes/request.ts`) and of the
22
+ * Server's `HandlerRequest.via` (`server/invocation/types.ts`), with the refusal of a release
23
+ * `Via` at a Publication-backed destination (law SV-PUBLICATION-ADMITS-LEGACY-VIA);
24
+ * - the legacy vectors of TEST-VIA-NAMES-EXACTLY-ONE-REFERENCE, and the Runtime redirect's last
25
+ * `legacy.remoteRoute` call with its dispatch test;
26
+ * - `PublicationVia` and `Route.via` from law PROTOCOL-LEGACY-WIRE-FIELDS and its test.
27
+ */
28
+ export { remoteRoute } from './route.js';
@@ -0,0 +1,14 @@
1
+ import type { IssuerId } from '@astrale-os/kernel-core/auth/issuer';
2
+ import type { Key } from '@astrale-os/kernel-dsl/v1';
3
+ import type { Route } from '../redirect.js';
4
+ import type { PublicationBindingInput } from './via.js';
5
+ /**
6
+ * Project one remote binding into the route every Kernel emits until the breaking release (AM-1):
7
+ * a `PublicationVia` naming the v3 reference, the pinned document's own for a legacy pin and the
8
+ * frozen projection's for a v4 pin. It reads only the binding's Publication coordinates, so a
9
+ * binding that also carries a release digest still projects to its v3 reference.
10
+ *
11
+ * @deprecated Successor: `remoteRoute`, which projects a release binding to `Via`; the breaking
12
+ * release calls it instead.
13
+ */
14
+ export declare function remoteRoute(origin: Key.Origin, binding: PublicationBindingInput, issuer: IssuerId): Route;
@@ -0,0 +1,25 @@
1
+ import { acceptRoute } from '../redirect.js';
2
+ /**
3
+ * Project one remote binding into the route every Kernel emits until the breaking release (AM-1):
4
+ * a `PublicationVia` naming the v3 reference, the pinned document's own for a legacy pin and the
5
+ * frozen projection's for a v4 pin. It reads only the binding's Publication coordinates, so a
6
+ * binding that also carries a release digest still projects to its v3 reference.
7
+ *
8
+ * @deprecated Successor: `remoteRoute`, which projects a release binding to `Via`; the breaking
9
+ * release calls it instead.
10
+ */
11
+ export function remoteRoute(origin, binding, issuer) {
12
+ return acceptRoute({
13
+ endpoint: binding.endpoint,
14
+ via: {
15
+ kind: 'via',
16
+ publication: {
17
+ origin,
18
+ identity: { issuer: binding.issuer, subject: binding.subject },
19
+ revision: binding.revision,
20
+ etag: binding.etag,
21
+ },
22
+ issuer,
23
+ },
24
+ });
25
+ }
@@ -0,0 +1,30 @@
1
+ import type { IssuerId } from '@astrale-os/kernel-core/auth/issuer';
2
+ import type { InvocationEndpoints } from '../../release/bindings/invocation.js';
3
+ import type { Etag } from '../../release/legacy/etag.js';
4
+ import type { PublicationRef } from '../../release/legacy/reference.js';
5
+ /**
6
+ * Routed witness of a legacy pin, or of the v3 projection of a v4 pin: the reference keeps its
7
+ * Publication meaning (origin, identity, schema revision, Publication ETag).
8
+ *
9
+ * @deprecated Successor: `Via.release`, emitted by the breaking release (AM-1).
10
+ */
11
+ export interface PublicationVia {
12
+ readonly kind: 'via';
13
+ readonly publication: PublicationRef;
14
+ readonly issuer: IssuerId;
15
+ }
16
+ /**
17
+ * Remote binding of a legacy pin, or of a v4 pin projected to its v3 Publication: the endpoint
18
+ * and the Publication reference coordinates the Kernel routes it with.
19
+ *
20
+ * @deprecated Successor: `RemoteBindingInput`, which carries the release digest.
21
+ */
22
+ export interface PublicationBindingInput {
23
+ readonly endpoint: InvocationEndpoints;
24
+ readonly issuer: IssuerId;
25
+ readonly subject: string;
26
+ readonly revision: PublicationRef['revision'];
27
+ readonly etag: Etag;
28
+ }
29
+ /** Admit the Publication reference of one received `PublicationVia`. */
30
+ export declare function acceptPublicationReference(input: unknown, label: string): PublicationRef;
@@ -0,0 +1,15 @@
1
+ import { PublicationError } from '../../release/legacy/error.js';
2
+ import { acceptReference } from '../../release/legacy/reference.js';
3
+ import { invalid } from '../admission.js';
4
+ /** Admit the Publication reference of one received `PublicationVia`. */
5
+ export function acceptPublicationReference(input, label) {
6
+ try {
7
+ return acceptReference(input);
8
+ }
9
+ catch (cause) {
10
+ if (cause instanceof PublicationError) {
11
+ return invalid(`${label} is invalid: ${cause.message}`);
12
+ }
13
+ throw cause;
14
+ }
15
+ }
@@ -7,4 +7,3 @@ export interface Miss {
7
7
  }
8
8
  export declare function decodeMiss(input: unknown): Miss;
9
9
  export declare function miss(requestId: RequestId, assigned: InvocationId): Miss;
10
- //# sourceMappingURL=miss.d.ts.map
@@ -15,4 +15,3 @@ export function decodeMiss(input) {
15
15
  export function miss(requestId, assigned) {
16
16
  return decodeMiss({ kind: 'miss', requestId, invocation: assigned });
17
17
  }
18
- //# sourceMappingURL=miss.js.map
@@ -1,18 +1,20 @@
1
1
  import type { IssuerId } from '@astrale-os/kernel-core/auth/issuer';
2
- import type { Key } from '@astrale-os/kernel-dsl/v1';
3
- import type { InvocationEndpoints } from '../publication/bindings/invocation.js';
4
- import type { Etag } from '../publication/etag.js';
5
- import type { PublicationRef } from '../publication/reference.js';
2
+ import type { Key, Revision } from '@astrale-os/kernel-dsl/v1';
3
+ import type { InvocationEndpoints } from '../release/bindings/invocation.js';
4
+ import type { ReleaseDigest } from '../release/digest.js';
6
5
  import type { RequestId } from './correlation.js';
7
6
  import type { InvocationId } from './identity.js';
7
+ import type { PublicationVia } from './legacy/via.js';
8
+ import type { Via } from './routing.js';
8
9
  import type { Trace } from './trace.js';
9
10
  export interface Route {
10
11
  readonly endpoint: InvocationEndpoints;
11
- readonly via: {
12
- readonly kind: 'via';
13
- readonly publication: PublicationRef;
14
- readonly issuer: IssuerId;
15
- };
12
+ /**
13
+ * Routed witness of the installed release. Its `PublicationVia` shape is deprecated (legacy
14
+ * pins and the v3 projection of v4 pins); successor: `Via`, emitted by the breaking release
15
+ * (AM-1).
16
+ */
17
+ readonly via: Via | PublicationVia;
16
18
  }
17
19
  export interface Redirection {
18
20
  readonly route: Route;
@@ -26,16 +28,16 @@ export interface RedirectResponse {
26
28
  readonly invocation: InvocationId;
27
29
  readonly redirect: Redirection;
28
30
  }
31
+ /** Remote binding of one installed release: the endpoint and the release it routes to. */
29
32
  export interface RemoteBindingInput {
30
33
  readonly endpoint: InvocationEndpoints;
31
34
  readonly issuer: IssuerId;
32
35
  readonly subject: string;
33
- readonly revision: PublicationRef['revision'];
34
- readonly etag: Etag;
36
+ readonly revision: Revision;
37
+ readonly release: ReleaseDigest;
35
38
  }
36
39
  export declare function acceptRoute(input: unknown): Route;
37
- /** Project one semantic remote binding into its admitted protocol route representation. */
40
+ /** Project an installed release binding into a release `Via`; legacy emitters use `legacy.remoteRoute`. */
38
41
  export declare function remoteRoute(origin: Key.Origin, binding: RemoteBindingInput, issuer: IssuerId): Route;
39
42
  export declare function acceptRedirection(input: unknown): Redirection;
40
43
  export declare function decodeRedirectResponse(input: unknown): RedirectResponse;
41
- //# sourceMappingURL=redirect.d.ts.map
@@ -1,30 +1,18 @@
1
- import { acceptInvocationEndpoints } from '../publication/bindings/invocation.js';
2
- import { PublicationError } from '../publication/error.js';
3
- import { acceptReference } from '../publication/reference.js';
4
- import { exactFields, invalid, issuerId, invocation, portableObject, requestId, required, string, } from './admission.js';
1
+ import { acceptInvocationEndpoints } from '../release/legacy/bindings.js';
2
+ import { PublicationError } from '../release/legacy/error.js';
3
+ import { exactFields, invalid, invocation, portableObject, requestId, required, string, } from './admission.js';
4
+ import { acceptVia } from './routing.js';
5
5
  import { admitTrace } from './trace.js';
6
6
  const ROUTE_FIELDS = new Set(['endpoint', 'via']);
7
- const VIA_FIELDS = new Set(['kind', 'publication', 'issuer']);
8
7
  const REDIRECTION_FIELDS = new Set(['route', 'credential', 'trace']);
9
8
  const REDIRECT_RESPONSE_FIELDS = new Set(['kind', 'requestId', 'invocation', 'redirect']);
10
9
  export function acceptRoute(input) {
11
10
  const object = portableObject(input, 'route');
12
11
  exactFields(object, ROUTE_FIELDS, 'route');
13
12
  required(object, ['endpoint', 'via'], 'route');
13
+ const via = acceptVia(portableObject(object.via, 'route.via'), 'route.via');
14
14
  try {
15
- const via = portableObject(object.via, 'route.via');
16
- exactFields(via, VIA_FIELDS, 'route.via');
17
- required(via, ['kind', 'publication', 'issuer'], 'route.via');
18
- if (via.kind !== 'via')
19
- invalid('route.via.kind must be "via"');
20
- return Object.freeze({
21
- endpoint: acceptInvocationEndpoints(object.endpoint),
22
- via: Object.freeze({
23
- kind: 'via',
24
- publication: acceptReference(via.publication),
25
- issuer: issuerId(via.issuer, 'route.via.issuer'),
26
- }),
27
- });
15
+ return Object.freeze({ endpoint: acceptInvocationEndpoints(object.endpoint), via });
28
16
  }
29
17
  catch (cause) {
30
18
  if (cause instanceof PublicationError) {
@@ -33,17 +21,17 @@ export function acceptRoute(input) {
33
21
  throw cause;
34
22
  }
35
23
  }
36
- /** Project one semantic remote binding into its admitted protocol route representation. */
24
+ /** Project an installed release binding into a release `Via`; legacy emitters use `legacy.remoteRoute`. */
37
25
  export function remoteRoute(origin, binding, issuer) {
38
26
  return acceptRoute({
39
27
  endpoint: binding.endpoint,
40
28
  via: {
41
29
  kind: 'via',
42
- publication: {
30
+ release: {
43
31
  origin,
44
32
  identity: { issuer: binding.issuer, subject: binding.subject },
45
33
  revision: binding.revision,
46
- etag: binding.etag,
34
+ digest: binding.release,
47
35
  },
48
36
  issuer,
49
37
  },
@@ -79,4 +67,3 @@ export function decodeRedirectResponse(input) {
79
67
  redirect: acceptRedirection(object.redirect),
80
68
  });
81
69
  }
82
- //# sourceMappingURL=redirect.js.map
@@ -19,4 +19,3 @@ export interface Request {
19
19
  readonly trace?: Trace;
20
20
  }
21
21
  export declare function decodeRequest(input: unknown): Request;
22
- //# sourceMappingURL=request.d.ts.map
@@ -3,7 +3,7 @@ import { acceptDelegate } from './delegate.js';
3
3
  import { acceptIdempotencyKey } from './idempotency.js';
4
4
  import { acceptRouting } from './routing.js';
5
5
  import { acceptSchemaTarget } from './schema.js';
6
- import { acceptCall } from './target.js';
6
+ import { callFromSnapshot } from './target.js';
7
7
  import { admitTrace } from './trace.js';
8
8
  const REQUEST_FIELDS = new Set([
9
9
  'version',
@@ -39,7 +39,7 @@ export function decodeRequest(input) {
39
39
  return Object.freeze({
40
40
  version: 2,
41
41
  requestId: requestId(object.requestId, 'request.requestId'),
42
- call: acceptCall(object.call),
42
+ call: callFromSnapshot(object.call),
43
43
  ...(credential === undefined ? {} : { credential }),
44
44
  ...(delegate === undefined ? {} : { delegate }),
45
45
  ...(routing === undefined ? {} : { routing }),
@@ -52,4 +52,3 @@ export function decodeRequest(input) {
52
52
  ...(trace === undefined ? {} : { trace }),
53
53
  });
54
54
  }
55
- //# sourceMappingURL=request.js.map
@@ -17,4 +17,3 @@ export interface ErrorResponse extends ResponseContext {
17
17
  }
18
18
  export type Response<Result extends Value = Value> = SuccessResponse<Result> | ErrorResponse | RedirectResponse | Stale | Miss;
19
19
  export declare function decodeResponse(input: unknown): Response;
20
- //# sourceMappingURL=response.d.ts.map
@@ -36,4 +36,3 @@ export function decodeResponse(input) {
36
36
  return decodeMiss(object);
37
37
  return invalid('response must contain a result, error, redirect, stale, or miss control');
38
38
  }
39
- //# sourceMappingURL=response.js.map