@astrale-os/kernel-client 0.6.0-beta.2 → 0.6.0-beta.21

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 (455) hide show
  1. package/dist/auth/auth.d.ts +1 -2
  2. package/dist/auth/auth.js +0 -1
  3. package/dist/auth/authorization.d.ts +2 -3
  4. package/dist/auth/authorization.js +3 -4
  5. package/dist/auth/credential.d.ts +1 -2
  6. package/dist/auth/credential.js +5 -6
  7. package/dist/auth/identity.d.ts +2 -3
  8. package/dist/auth/identity.js +4 -5
  9. package/dist/auth/index.d.ts +1 -2
  10. package/dist/auth/index.js +0 -1
  11. package/dist/auth/provision.d.ts +0 -1
  12. package/dist/auth/provision.js +2 -3
  13. package/dist/client/admission.d.ts +0 -1
  14. package/dist/client/admission.js +0 -1
  15. package/dist/client/client.d.ts +4 -5
  16. package/dist/client/client.js +2 -3
  17. package/dist/client/credential.d.ts +4 -5
  18. package/dist/client/credential.js +0 -1
  19. package/dist/client/index.d.ts +1 -1
  20. package/dist/client/index.js +0 -1
  21. package/dist/client/request.d.ts +2 -3
  22. package/dist/client/request.js +1 -2
  23. package/dist/client/result.d.ts +35 -5
  24. package/dist/client/result.js +6 -4
  25. package/dist/client/routing-control.d.ts +3 -4
  26. package/dist/client/routing-control.js +4 -5
  27. package/dist/errors/client-error.d.ts +0 -1
  28. package/dist/errors/client-error.js +2 -1
  29. package/dist/errors/index.d.ts +7 -7
  30. package/dist/errors/index.js +7 -7
  31. package/dist/errors/miss-error.d.ts +3 -2
  32. package/dist/errors/miss-error.js +3 -2
  33. package/dist/errors/protocol-error.d.ts +6 -2
  34. package/dist/errors/protocol-error.js +2 -1
  35. package/dist/errors/response-error.d.ts +4 -3
  36. package/dist/errors/response-error.js +4 -3
  37. package/dist/errors/session-error.d.ts +9 -0
  38. package/dist/errors/session-error.js +9 -0
  39. package/dist/errors/stale-route-error.d.ts +3 -3
  40. package/dist/errors/stale-route-error.js +3 -2
  41. package/dist/errors/transport-error.d.ts +20 -5
  42. package/dist/errors/transport-error.js +11 -5
  43. package/dist/graph/domain/binding.d.ts +22 -0
  44. package/dist/graph/domain/binding.js +123 -0
  45. package/dist/graph/domain/domain.typecheck.d.ts +1 -0
  46. package/dist/graph/domain/domain.typecheck.js +139 -0
  47. package/dist/graph/domain/index.d.ts +3 -0
  48. package/dist/graph/domain/index.js +1 -0
  49. package/dist/graph/domain/model.d.ts +18 -0
  50. package/dist/graph/domain/model.js +1 -0
  51. package/dist/graph/domain/page.d.ts +23 -0
  52. package/dist/graph/domain/page.js +42 -0
  53. package/dist/graph/domain/project.d.ts +8 -0
  54. package/dist/graph/domain/project.js +120 -0
  55. package/dist/graph/domain/provenance.d.ts +6 -0
  56. package/dist/graph/domain/provenance.js +11 -0
  57. package/dist/graph/errors.d.ts +2 -3
  58. package/dist/graph/errors.js +2 -2
  59. package/dist/graph/expectation.d.ts +3 -0
  60. package/dist/graph/expectation.js +6 -0
  61. package/dist/graph/graph.d.ts +14 -11
  62. package/dist/graph/graph.js +0 -1
  63. package/dist/graph/index.d.ts +3 -2
  64. package/dist/graph/index.js +1 -1
  65. package/dist/graph/mutation.d.ts +2 -4
  66. package/dist/graph/mutation.js +12 -4
  67. package/dist/graph/page/index.d.ts +0 -1
  68. package/dist/graph/page/index.js +0 -1
  69. package/dist/graph/page/neighbors.d.ts +4 -5
  70. package/dist/graph/page/neighbors.js +6 -7
  71. package/dist/graph/page/page.d.ts +6 -3
  72. package/dist/graph/page/page.js +0 -1
  73. package/dist/graph/page-contract.d.ts +13 -0
  74. package/dist/graph/page-contract.js +1 -0
  75. package/dist/graph/provenance.d.ts +14 -0
  76. package/dist/graph/provenance.js +42 -0
  77. package/dist/graph/query.d.ts +1 -2
  78. package/dist/graph/query.js +21 -13
  79. package/dist/graph/read.d.ts +3 -4
  80. package/dist/graph/read.js +1 -2
  81. package/dist/index.d.ts +2 -3
  82. package/dist/index.js +1 -2
  83. package/dist/pacer/batcher/batcher.d.ts +0 -1
  84. package/dist/pacer/batcher/batcher.js +0 -1
  85. package/dist/pacer/batcher/defaults.d.ts +0 -1
  86. package/dist/pacer/batcher/defaults.js +0 -1
  87. package/dist/pacer/batcher/index.d.ts +0 -1
  88. package/dist/pacer/batcher/index.js +0 -1
  89. package/dist/pacer/index.d.ts +0 -1
  90. package/dist/pacer/index.js +0 -1
  91. package/dist/pacer/limiter/defaults.d.ts +0 -1
  92. package/dist/pacer/limiter/defaults.js +0 -1
  93. package/dist/pacer/limiter/index.d.ts +0 -1
  94. package/dist/pacer/limiter/index.js +0 -1
  95. package/dist/pacer/limiter/limiter.d.ts +0 -1
  96. package/dist/pacer/limiter/limiter.js +0 -1
  97. package/dist/pacer/queue/defaults.d.ts +0 -1
  98. package/dist/pacer/queue/defaults.js +0 -1
  99. package/dist/pacer/queue/index.d.ts +0 -1
  100. package/dist/pacer/queue/index.js +0 -1
  101. package/dist/pacer/queue/queue.d.ts +0 -1
  102. package/dist/pacer/queue/queue.js +0 -1
  103. package/dist/pacer/retry/defaults.d.ts +0 -1
  104. package/dist/pacer/retry/defaults.js +0 -1
  105. package/dist/pacer/retry/index.d.ts +0 -1
  106. package/dist/pacer/retry/index.js +0 -1
  107. package/dist/pacer/retry/retry.d.ts +0 -1
  108. package/dist/pacer/retry/retry.js +0 -1
  109. package/dist/pool/index.d.ts +0 -1
  110. package/dist/pool/index.js +0 -1
  111. package/dist/pool/pool.d.ts +0 -1
  112. package/dist/pool/pool.js +0 -1
  113. package/dist/pool/target.d.ts +0 -1
  114. package/dist/pool/target.js +0 -1
  115. package/dist/schema/admission.d.ts +9 -7
  116. package/dist/schema/admission.js +6 -12
  117. package/dist/schema/contracts.d.ts +12 -0
  118. package/dist/schema/contracts.js +1 -0
  119. package/dist/schema/index.d.ts +3 -4
  120. package/dist/schema/index.js +1 -1
  121. package/dist/schema/introspection.d.ts +1 -2
  122. package/dist/schema/introspection.js +7 -4
  123. package/dist/schema/operation.d.ts +5 -0
  124. package/dist/schema/operation.js +9 -0
  125. package/dist/schema/schema.d.ts +10 -12
  126. package/dist/schema/schema.js +47 -10
  127. package/dist/session/bound.d.ts +41 -0
  128. package/dist/session/bound.js +72 -0
  129. package/dist/session/context/control.d.ts +0 -1
  130. package/dist/session/context/control.js +0 -1
  131. package/dist/session/context/index.d.ts +0 -1
  132. package/dist/session/context/index.js +0 -1
  133. package/dist/session/context/limits.d.ts +0 -1
  134. package/dist/session/context/limits.js +0 -1
  135. package/dist/session/context/operation.d.ts +0 -1
  136. package/dist/session/context/operation.js +19 -17
  137. package/dist/session/context/policy.d.ts +1 -2
  138. package/dist/session/context/policy.js +2 -3
  139. package/dist/session/discovery/bundle.d.ts +0 -1
  140. package/dist/session/discovery/bundle.js +6 -6
  141. package/dist/session/discovery/discovery.d.ts +1 -2
  142. package/dist/session/discovery/discovery.js +0 -1
  143. package/dist/session/discovery/index.d.ts +1 -2
  144. package/dist/session/discovery/index.js +0 -1
  145. package/dist/session/discovery/publication.d.ts +1 -2
  146. package/dist/session/discovery/publication.js +6 -5
  147. package/dist/session/discovery/snapshot.d.ts +1 -2
  148. package/dist/session/discovery/snapshot.js +0 -1
  149. package/dist/session/discovery/transport.d.ts +6 -0
  150. package/dist/session/discovery/transport.js +13 -0
  151. package/dist/session/index.d.ts +6 -4
  152. package/dist/session/index.js +3 -2
  153. package/dist/session/reference.d.ts +36 -0
  154. package/dist/session/reference.js +74 -0
  155. package/dist/session/routing/auth.d.ts +1 -2
  156. package/dist/session/routing/auth.js +1 -2
  157. package/dist/session/routing/cache.d.ts +2 -3
  158. package/dist/session/routing/cache.js +1 -13
  159. package/dist/session/routing/dispatch.d.ts +4 -9
  160. package/dist/session/routing/dispatch.js +14 -22
  161. package/dist/session/routing/envelope.d.ts +0 -1
  162. package/dist/session/routing/envelope.js +0 -1
  163. package/dist/session/routing/expectation.d.ts +6 -0
  164. package/dist/session/routing/expectation.js +1 -0
  165. package/dist/session/routing/index.d.ts +1 -2
  166. package/dist/session/routing/index.js +0 -1
  167. package/dist/session/routing/request.d.ts +1 -2
  168. package/dist/session/routing/request.js +1 -2
  169. package/dist/session/session.d.ts +16 -13
  170. package/dist/session/session.js +49 -35
  171. package/dist/session/session.typecheck.d.ts +0 -1
  172. package/dist/session/session.typecheck.js +23 -2
  173. package/dist/session/views/catalog.d.ts +2 -3
  174. package/dist/session/views/catalog.js +14 -7
  175. package/dist/session/views/index.d.ts +0 -1
  176. package/dist/session/views/index.js +0 -1
  177. package/dist/session/views/resolve.d.ts +1 -3
  178. package/dist/session/views/resolve.js +4 -3
  179. package/dist/store/entity-index.d.ts +0 -1
  180. package/dist/store/entity-index.js +0 -1
  181. package/dist/store/index.d.ts +0 -1
  182. package/dist/store/index.js +0 -1
  183. package/dist/store/memory.d.ts +3 -3
  184. package/dist/store/memory.js +24 -13
  185. package/dist/store/mutation.d.ts +0 -1
  186. package/dist/store/mutation.js +0 -1
  187. package/dist/store/observe.d.ts +0 -1
  188. package/dist/store/observe.js +0 -1
  189. package/dist/store/optimistic.d.ts +0 -1
  190. package/dist/store/optimistic.js +0 -1
  191. package/dist/store/query-key.d.ts +3 -3
  192. package/dist/store/query-key.js +7 -3
  193. package/dist/store/shape.d.ts +4 -3
  194. package/dist/store/shape.js +3 -2
  195. package/dist/store/store.d.ts +3 -5
  196. package/dist/store/store.js +5 -4
  197. package/dist/store/store.typecheck.d.ts +0 -1
  198. package/dist/store/store.typecheck.js +3 -4
  199. package/dist/transport/auto/decision.d.ts +0 -1
  200. package/dist/transport/auto/decision.js +0 -1
  201. package/dist/transport/auto/fallback.d.ts +0 -1
  202. package/dist/transport/auto/fallback.js +8 -10
  203. package/dist/transport/auto/index.d.ts +0 -1
  204. package/dist/transport/auto/index.js +0 -1
  205. package/dist/transport/auto/transport.d.ts +0 -1
  206. package/dist/transport/auto/transport.js +5 -6
  207. package/dist/transport/auto/warning.d.ts +0 -1
  208. package/dist/transport/auto/warning.js +0 -1
  209. package/dist/transport/deadline.d.ts +0 -1
  210. package/dist/transport/deadline.js +0 -1
  211. package/dist/transport/failure.d.ts +7 -0
  212. package/dist/transport/failure.js +9 -0
  213. package/dist/transport/http/byte-stream.d.ts +17 -0
  214. package/dist/transport/http/byte-stream.js +86 -0
  215. package/dist/transport/http/index.d.ts +0 -1
  216. package/dist/transport/http/index.js +0 -1
  217. package/dist/transport/http/response.d.ts +2 -2
  218. package/dist/transport/http/response.js +2 -2
  219. package/dist/transport/http/stream.d.ts +6 -5
  220. package/dist/transport/http/stream.js +29 -12
  221. package/dist/transport/http/transport.d.ts +0 -1
  222. package/dist/transport/http/transport.js +65 -40
  223. package/dist/transport/index.d.ts +0 -1
  224. package/dist/transport/index.js +0 -1
  225. package/dist/transport/transport.d.ts +3 -2
  226. package/dist/transport/transport.js +0 -1
  227. package/dist/transport/websocket/connection.d.ts +3 -3
  228. package/dist/transport/websocket/connection.js +21 -34
  229. package/dist/transport/websocket/exchange.d.ts +7 -7
  230. package/dist/transport/websocket/exchange.js +50 -39
  231. package/dist/transport/websocket/index.d.ts +0 -1
  232. package/dist/transport/websocket/index.js +0 -1
  233. package/dist/transport/websocket/transport.d.ts +0 -1
  234. package/dist/transport/websocket/transport.js +9 -21
  235. package/package.json +21 -19
  236. package/dist/auth/auth.d.ts.map +0 -1
  237. package/dist/auth/auth.js.map +0 -1
  238. package/dist/auth/authorization.d.ts.map +0 -1
  239. package/dist/auth/authorization.js.map +0 -1
  240. package/dist/auth/credential.d.ts.map +0 -1
  241. package/dist/auth/credential.js.map +0 -1
  242. package/dist/auth/identity.d.ts.map +0 -1
  243. package/dist/auth/identity.js.map +0 -1
  244. package/dist/auth/index.d.ts.map +0 -1
  245. package/dist/auth/index.js.map +0 -1
  246. package/dist/auth/provision.d.ts.map +0 -1
  247. package/dist/auth/provision.js.map +0 -1
  248. package/dist/client/admission.d.ts.map +0 -1
  249. package/dist/client/admission.js.map +0 -1
  250. package/dist/client/client.d.ts.map +0 -1
  251. package/dist/client/client.js.map +0 -1
  252. package/dist/client/credential.d.ts.map +0 -1
  253. package/dist/client/credential.js.map +0 -1
  254. package/dist/client/index.d.ts.map +0 -1
  255. package/dist/client/index.js.map +0 -1
  256. package/dist/client/request.d.ts.map +0 -1
  257. package/dist/client/request.js.map +0 -1
  258. package/dist/client/result.d.ts.map +0 -1
  259. package/dist/client/result.js.map +0 -1
  260. package/dist/client/routing-control.d.ts.map +0 -1
  261. package/dist/client/routing-control.js.map +0 -1
  262. package/dist/domain/binding.d.ts +0 -24
  263. package/dist/domain/binding.d.ts.map +0 -1
  264. package/dist/domain/binding.js +0 -69
  265. package/dist/domain/binding.js.map +0 -1
  266. package/dist/domain/callable.d.ts +0 -25
  267. package/dist/domain/callable.d.ts.map +0 -1
  268. package/dist/domain/callable.js +0 -70
  269. package/dist/domain/callable.js.map +0 -1
  270. package/dist/domain/domain.typecheck.d.ts +0 -2
  271. package/dist/domain/domain.typecheck.d.ts.map +0 -1
  272. package/dist/domain/domain.typecheck.js +0 -69
  273. package/dist/domain/domain.typecheck.js.map +0 -1
  274. package/dist/domain/index.d.ts +0 -4
  275. package/dist/domain/index.d.ts.map +0 -1
  276. package/dist/domain/index.js +0 -2
  277. package/dist/domain/index.js.map +0 -1
  278. package/dist/domain/node.d.ts +0 -10
  279. package/dist/domain/node.d.ts.map +0 -1
  280. package/dist/domain/node.js +0 -6
  281. package/dist/domain/node.js.map +0 -1
  282. package/dist/errors/client-error.d.ts.map +0 -1
  283. package/dist/errors/client-error.js.map +0 -1
  284. package/dist/errors/index.d.ts.map +0 -1
  285. package/dist/errors/index.js.map +0 -1
  286. package/dist/errors/miss-error.d.ts.map +0 -1
  287. package/dist/errors/miss-error.js.map +0 -1
  288. package/dist/errors/protocol-error.d.ts.map +0 -1
  289. package/dist/errors/protocol-error.js.map +0 -1
  290. package/dist/errors/response-error.d.ts.map +0 -1
  291. package/dist/errors/response-error.js.map +0 -1
  292. package/dist/errors/stale-route-error.d.ts.map +0 -1
  293. package/dist/errors/stale-route-error.js.map +0 -1
  294. package/dist/errors/transport-error.d.ts.map +0 -1
  295. package/dist/errors/transport-error.js.map +0 -1
  296. package/dist/graph/errors.d.ts.map +0 -1
  297. package/dist/graph/errors.js.map +0 -1
  298. package/dist/graph/graph.d.ts.map +0 -1
  299. package/dist/graph/graph.js.map +0 -1
  300. package/dist/graph/index.d.ts.map +0 -1
  301. package/dist/graph/index.js.map +0 -1
  302. package/dist/graph/mutation.d.ts.map +0 -1
  303. package/dist/graph/mutation.js.map +0 -1
  304. package/dist/graph/page/index.d.ts.map +0 -1
  305. package/dist/graph/page/index.js.map +0 -1
  306. package/dist/graph/page/neighbors.d.ts.map +0 -1
  307. package/dist/graph/page/neighbors.js.map +0 -1
  308. package/dist/graph/page/page.d.ts.map +0 -1
  309. package/dist/graph/page/page.js.map +0 -1
  310. package/dist/graph/query.d.ts.map +0 -1
  311. package/dist/graph/query.js.map +0 -1
  312. package/dist/graph/read.d.ts.map +0 -1
  313. package/dist/graph/read.js.map +0 -1
  314. package/dist/index.d.ts.map +0 -1
  315. package/dist/index.js.map +0 -1
  316. package/dist/pacer/batcher/batcher.d.ts.map +0 -1
  317. package/dist/pacer/batcher/batcher.js.map +0 -1
  318. package/dist/pacer/batcher/defaults.d.ts.map +0 -1
  319. package/dist/pacer/batcher/defaults.js.map +0 -1
  320. package/dist/pacer/batcher/index.d.ts.map +0 -1
  321. package/dist/pacer/batcher/index.js.map +0 -1
  322. package/dist/pacer/index.d.ts.map +0 -1
  323. package/dist/pacer/index.js.map +0 -1
  324. package/dist/pacer/limiter/defaults.d.ts.map +0 -1
  325. package/dist/pacer/limiter/defaults.js.map +0 -1
  326. package/dist/pacer/limiter/index.d.ts.map +0 -1
  327. package/dist/pacer/limiter/index.js.map +0 -1
  328. package/dist/pacer/limiter/limiter.d.ts.map +0 -1
  329. package/dist/pacer/limiter/limiter.js.map +0 -1
  330. package/dist/pacer/queue/defaults.d.ts.map +0 -1
  331. package/dist/pacer/queue/defaults.js.map +0 -1
  332. package/dist/pacer/queue/index.d.ts.map +0 -1
  333. package/dist/pacer/queue/index.js.map +0 -1
  334. package/dist/pacer/queue/queue.d.ts.map +0 -1
  335. package/dist/pacer/queue/queue.js.map +0 -1
  336. package/dist/pacer/retry/defaults.d.ts.map +0 -1
  337. package/dist/pacer/retry/defaults.js.map +0 -1
  338. package/dist/pacer/retry/index.d.ts.map +0 -1
  339. package/dist/pacer/retry/index.js.map +0 -1
  340. package/dist/pacer/retry/retry.d.ts.map +0 -1
  341. package/dist/pacer/retry/retry.js.map +0 -1
  342. package/dist/pool/index.d.ts.map +0 -1
  343. package/dist/pool/index.js.map +0 -1
  344. package/dist/pool/pool.d.ts.map +0 -1
  345. package/dist/pool/pool.js.map +0 -1
  346. package/dist/pool/target.d.ts.map +0 -1
  347. package/dist/pool/target.js.map +0 -1
  348. package/dist/schema/admission.d.ts.map +0 -1
  349. package/dist/schema/admission.js.map +0 -1
  350. package/dist/schema/index.d.ts.map +0 -1
  351. package/dist/schema/index.js.map +0 -1
  352. package/dist/schema/introspection.d.ts.map +0 -1
  353. package/dist/schema/introspection.js.map +0 -1
  354. package/dist/schema/schema.d.ts.map +0 -1
  355. package/dist/schema/schema.js.map +0 -1
  356. package/dist/session/context/control.d.ts.map +0 -1
  357. package/dist/session/context/control.js.map +0 -1
  358. package/dist/session/context/index.d.ts.map +0 -1
  359. package/dist/session/context/index.js.map +0 -1
  360. package/dist/session/context/limits.d.ts.map +0 -1
  361. package/dist/session/context/limits.js.map +0 -1
  362. package/dist/session/context/operation.d.ts.map +0 -1
  363. package/dist/session/context/operation.js.map +0 -1
  364. package/dist/session/context/policy.d.ts.map +0 -1
  365. package/dist/session/context/policy.js.map +0 -1
  366. package/dist/session/discovery/bundle.d.ts.map +0 -1
  367. package/dist/session/discovery/bundle.js.map +0 -1
  368. package/dist/session/discovery/discovery.d.ts.map +0 -1
  369. package/dist/session/discovery/discovery.js.map +0 -1
  370. package/dist/session/discovery/index.d.ts.map +0 -1
  371. package/dist/session/discovery/index.js.map +0 -1
  372. package/dist/session/discovery/publication.d.ts.map +0 -1
  373. package/dist/session/discovery/publication.js.map +0 -1
  374. package/dist/session/discovery/snapshot.d.ts.map +0 -1
  375. package/dist/session/discovery/snapshot.js.map +0 -1
  376. package/dist/session/index.d.ts.map +0 -1
  377. package/dist/session/index.js.map +0 -1
  378. package/dist/session/routing/auth.d.ts.map +0 -1
  379. package/dist/session/routing/auth.js.map +0 -1
  380. package/dist/session/routing/bound.d.ts +0 -7
  381. package/dist/session/routing/bound.d.ts.map +0 -1
  382. package/dist/session/routing/bound.js +0 -2
  383. package/dist/session/routing/bound.js.map +0 -1
  384. package/dist/session/routing/cache.d.ts.map +0 -1
  385. package/dist/session/routing/cache.js.map +0 -1
  386. package/dist/session/routing/dispatch.d.ts.map +0 -1
  387. package/dist/session/routing/dispatch.js.map +0 -1
  388. package/dist/session/routing/envelope.d.ts.map +0 -1
  389. package/dist/session/routing/envelope.js.map +0 -1
  390. package/dist/session/routing/index.d.ts.map +0 -1
  391. package/dist/session/routing/index.js.map +0 -1
  392. package/dist/session/routing/request.d.ts.map +0 -1
  393. package/dist/session/routing/request.js.map +0 -1
  394. package/dist/session/session.d.ts.map +0 -1
  395. package/dist/session/session.js.map +0 -1
  396. package/dist/session/session.typecheck.d.ts.map +0 -1
  397. package/dist/session/session.typecheck.js.map +0 -1
  398. package/dist/session/views/catalog.d.ts.map +0 -1
  399. package/dist/session/views/catalog.js.map +0 -1
  400. package/dist/session/views/index.d.ts.map +0 -1
  401. package/dist/session/views/index.js.map +0 -1
  402. package/dist/session/views/resolve.d.ts.map +0 -1
  403. package/dist/session/views/resolve.js.map +0 -1
  404. package/dist/store/entity-index.d.ts.map +0 -1
  405. package/dist/store/entity-index.js.map +0 -1
  406. package/dist/store/index.d.ts.map +0 -1
  407. package/dist/store/index.js.map +0 -1
  408. package/dist/store/memory.d.ts.map +0 -1
  409. package/dist/store/memory.js.map +0 -1
  410. package/dist/store/mutation.d.ts.map +0 -1
  411. package/dist/store/mutation.js.map +0 -1
  412. package/dist/store/observe.d.ts.map +0 -1
  413. package/dist/store/observe.js.map +0 -1
  414. package/dist/store/optimistic.d.ts.map +0 -1
  415. package/dist/store/optimistic.js.map +0 -1
  416. package/dist/store/query-key.d.ts.map +0 -1
  417. package/dist/store/query-key.js.map +0 -1
  418. package/dist/store/shape.d.ts.map +0 -1
  419. package/dist/store/shape.js.map +0 -1
  420. package/dist/store/store.d.ts.map +0 -1
  421. package/dist/store/store.js.map +0 -1
  422. package/dist/store/store.typecheck.d.ts.map +0 -1
  423. package/dist/store/store.typecheck.js.map +0 -1
  424. package/dist/transport/auto/decision.d.ts.map +0 -1
  425. package/dist/transport/auto/decision.js.map +0 -1
  426. package/dist/transport/auto/fallback.d.ts.map +0 -1
  427. package/dist/transport/auto/fallback.js.map +0 -1
  428. package/dist/transport/auto/index.d.ts.map +0 -1
  429. package/dist/transport/auto/index.js.map +0 -1
  430. package/dist/transport/auto/transport.d.ts.map +0 -1
  431. package/dist/transport/auto/transport.js.map +0 -1
  432. package/dist/transport/auto/warning.d.ts.map +0 -1
  433. package/dist/transport/auto/warning.js.map +0 -1
  434. package/dist/transport/deadline.d.ts.map +0 -1
  435. package/dist/transport/deadline.js.map +0 -1
  436. package/dist/transport/http/index.d.ts.map +0 -1
  437. package/dist/transport/http/index.js.map +0 -1
  438. package/dist/transport/http/response.d.ts.map +0 -1
  439. package/dist/transport/http/response.js.map +0 -1
  440. package/dist/transport/http/stream.d.ts.map +0 -1
  441. package/dist/transport/http/stream.js.map +0 -1
  442. package/dist/transport/http/transport.d.ts.map +0 -1
  443. package/dist/transport/http/transport.js.map +0 -1
  444. package/dist/transport/index.d.ts.map +0 -1
  445. package/dist/transport/index.js.map +0 -1
  446. package/dist/transport/transport.d.ts.map +0 -1
  447. package/dist/transport/transport.js.map +0 -1
  448. package/dist/transport/websocket/connection.d.ts.map +0 -1
  449. package/dist/transport/websocket/connection.js.map +0 -1
  450. package/dist/transport/websocket/exchange.d.ts.map +0 -1
  451. package/dist/transport/websocket/exchange.js.map +0 -1
  452. package/dist/transport/websocket/index.d.ts.map +0 -1
  453. package/dist/transport/websocket/index.js.map +0 -1
  454. package/dist/transport/websocket/transport.d.ts.map +0 -1
  455. package/dist/transport/websocket/transport.js.map +0 -1
@@ -0,0 +1,6 @@
1
+ import type { TransportPhase } from '../../errors/index.js';
2
+ import type { SessionOperation } from '../context/index.js';
3
+ type AcquisitionResource = 'publication' | 'bundle';
4
+ /** Normalize only unknown failures from one injected acquisition capability. */
5
+ export declare function runAcquisition<Result>(operation: SessionOperation, resource: AcquisitionResource, phase: Extract<TransportPhase, 'receive' | 'unknown'>, message: string, task: (signal: AbortSignal) => Result | PromiseLike<Result>): Promise<Result>;
6
+ export {};
@@ -0,0 +1,13 @@
1
+ import { ClientError, TransportError } from '../../errors/index.js';
2
+ import { runSessionOperation } from '../context/index.js';
3
+ /** Normalize only unknown failures from one injected acquisition capability. */
4
+ export async function runAcquisition(operation, resource, phase, message, task) {
5
+ try {
6
+ return await runSessionOperation(operation, task);
7
+ }
8
+ catch (cause) {
9
+ if (cause instanceof ClientError)
10
+ throw cause;
11
+ throw TransportError.acquisition(message, { cause, phase, resource });
12
+ }
13
+ }
@@ -1,7 +1,9 @@
1
1
  export type { SessionControlOptions, SessionPolicy } from './context/index.js';
2
- export type { ReadyInstallation as InstalledDomain } from '../schema/index.js';
2
+ export { bindSession, type BoundClientSession, type BoundSessionControls, type BoundSessionSource, } from './bound.js';
3
3
  export type { SessionSnapshot } from './discovery/index.js';
4
- export type { Auth, BoundTarget, SessionAuth, SessionEnvelopeTransport, SessionRequestOptions, } from './routing/index.js';
5
- export { ClientSession, connect, dispatchBound, type ClientSessionOptions, type ConnectOptions, } from './session.js';
4
+ export type { Auth, SessionAuth, SessionEnvelopeTransport, SessionRequestOptions, } from './routing/index.js';
5
+ export { ClientSession, connect, type ClientSessionOptions, type ConnectOptions, } from './session.js';
6
+ export type { CallableReference, InputOfReference, InstanceCallableReference, OutputOfReference, } from './reference.js';
7
+ export { reference } from './reference.js';
6
8
  export type { ResolvedView, ViewCatalog } from './views/index.js';
7
- //# sourceMappingURL=index.d.ts.map
9
+ export type { DomainBinding } from '../graph/domain/index.js';
@@ -1,2 +1,3 @@
1
- export { ClientSession, connect, dispatchBound, } from './session.js';
2
- //# sourceMappingURL=index.js.map
1
+ export { bindSession, } from './bound.js';
2
+ export { ClientSession, connect, } from './session.js';
3
+ export { reference } from './reference.js';
@@ -0,0 +1,36 @@
1
+ import type { Path as PathValue, PathLike } from '@astrale-os/kernel-core/path';
2
+ import type { CallableInputOf, CallableOutputOf, CallableResultOf, Domain, MethodInheritance, ResolvedFunction, ResolvedMethod } from '@astrale-os/kernel-dsl/v1';
3
+ import type { Revision } from '@astrale-os/kernel-dsl/v1/addressing';
4
+ import { type Key as KeyType } from '@astrale-os/kernel-dsl/v1/addressing';
5
+ import type { Binary, Input } from '../client/index.js';
6
+ declare const REFERENCE_INPUT: unique symbol;
7
+ declare const REFERENCE_OUTPUT: unique symbol;
8
+ export interface CallableReference<InputValue extends Input = Input, Output = unknown> {
9
+ readonly origin: KeyType.Origin;
10
+ readonly revision: Revision;
11
+ readonly callable: KeyType.Callable;
12
+ readonly target: PathValue;
13
+ readonly outputMode: 'value' | 'stream' | 'binary';
14
+ readonly [REFERENCE_INPUT]?: InputValue;
15
+ readonly [REFERENCE_OUTPUT]?: Output;
16
+ }
17
+ export interface InstanceCallableReference<InputValue extends Input = Input, Output = unknown> {
18
+ (receiver: PathLike): CallableReference<InputValue, Output>;
19
+ readonly origin: KeyType.Origin;
20
+ readonly revision: Revision;
21
+ readonly callable: KeyType.Callable;
22
+ readonly outputMode: 'value' | 'stream' | 'binary';
23
+ }
24
+ export type InputOfReference<Reference extends CallableReference> = Reference extends CallableReference<infer InputValue, unknown> ? InputValue : never;
25
+ export type OutputOfReference<Reference extends CallableReference> = Reference extends CallableReference<infer _Input, infer Output> ? Output : never;
26
+ type ReferenceInput<Callable> = unknown extends CallableInputOf<Callable> ? Input : Extract<CallableInputOf<Callable>, Input>;
27
+ type ReferenceOutput<Callable> = unknown extends CallableOutputOf<Callable> ? unknown : CallableResultOf<Callable, Binary>;
28
+ type ExecutableMethodInheritance = Exclude<MethodInheritance, 'abstract'>;
29
+ type ExecutableStaticMethod = ResolvedMethod<unknown, unknown, true, ExecutableMethodInheritance>;
30
+ type ExecutableInstanceMethod = ResolvedMethod<unknown, unknown, false, ExecutableMethodInheritance>;
31
+ /** Project one exact resolved Function or static Method into a typed Client reference. */
32
+ export declare function reference<const Callable extends ResolvedFunction | ExecutableStaticMethod>(domain: Pick<Domain, 'origin' | 'revision'>, callable: Callable): CallableReference<ReferenceInput<Callable>, ReferenceOutput<Callable>>;
33
+ /** Project one exact resolved instance Method into a receiver-bound typed Client reference. */
34
+ export declare function reference<const Callable extends ExecutableInstanceMethod>(domain: Pick<Domain, 'origin' | 'revision'>, callable: Callable): InstanceCallableReference<ReferenceInput<Callable>, ReferenceOutput<Callable>>;
35
+ export declare function admitReference(input: CallableReference): CallableReference;
36
+ export {};
@@ -0,0 +1,74 @@
1
+ import { Path } from '@astrale-os/kernel-core/path';
2
+ import { callableAddress, Key, patterns, } from '@astrale-os/kernel-dsl/v1/addressing';
3
+ export function reference(domain, callable) {
4
+ if ('owner' in callable && callable.inheritance === 'abstract')
5
+ invalid();
6
+ const common = Object.freeze({
7
+ origin: domain.origin,
8
+ revision: domain.revision,
9
+ callable: callable.key,
10
+ outputMode: callable.output.mode,
11
+ });
12
+ if ('owner' in callable && !callable.static) {
13
+ const bind = (receiver) => admitReference({
14
+ ...common,
15
+ target: Path.instanceMethod(Path.from(receiver), callable.name),
16
+ });
17
+ return Object.assign(bind, common);
18
+ }
19
+ const target = 'owner' in callable
20
+ ? Path.staticMethod(Path.project(callable.owner.ref), callable.name)
21
+ : Path.project(callable.ref);
22
+ return admitReference({ ...common, target });
23
+ }
24
+ export function admitReference(input) {
25
+ if (input === null || typeof input !== 'object')
26
+ invalid();
27
+ if (typeof input.origin !== 'string' ||
28
+ !patterns.origin.test(input.origin) ||
29
+ typeof input.revision !== 'string' ||
30
+ !patterns.revision.test(input.revision) ||
31
+ typeof input.callable !== 'string' ||
32
+ !Key.is(input.callable) ||
33
+ Key.origin(input.callable) !== input.origin ||
34
+ !['value', 'stream', 'binary'].includes(input.outputMode))
35
+ invalid();
36
+ const target = Path.from(input.target);
37
+ if (!matchesCallable(target, input.callable))
38
+ invalid();
39
+ return Object.freeze({
40
+ origin: input.origin,
41
+ revision: input.revision,
42
+ callable: input.callable,
43
+ target,
44
+ outputMode: input.outputMode,
45
+ });
46
+ }
47
+ function matchesCallable(target, callable) {
48
+ const coordinate = callableAddress(callable);
49
+ const { anchor, steps } = target.ast;
50
+ const last = steps.at(-1);
51
+ if (coordinate.kind === 'method') {
52
+ if (last?.kind !== 'method' || last.name !== coordinate.name)
53
+ return false;
54
+ if (last.dispatch === 'instance')
55
+ return true;
56
+ const owner = steps.at(-2);
57
+ return (anchor.kind === 'domain' &&
58
+ anchor.origin === Key.origin(callable) &&
59
+ steps.length === 2 &&
60
+ owner?.kind === 'projection' &&
61
+ owner.projection.kind === 'class' &&
62
+ owner.projection.name === coordinate.owner.name);
63
+ }
64
+ const projection = steps[0];
65
+ return (anchor.kind === 'domain' &&
66
+ anchor.origin === Key.origin(callable) &&
67
+ steps.length === 1 &&
68
+ projection?.kind === 'projection' &&
69
+ projection.projection.kind === 'function' &&
70
+ projection.projection.name === coordinate.name);
71
+ }
72
+ function invalid() {
73
+ throw new TypeError('Callable reference is invalid.');
74
+ }
@@ -1,4 +1,4 @@
1
- import type { invocation } from '@astrale-os/kernel-protocol';
1
+ import type * as invocation from '@astrale-os/kernel-protocol/invocation';
2
2
  import type { SessionOperation } from '../context/index.js';
3
3
  export interface Auth {
4
4
  readonly credential?: string;
@@ -16,4 +16,3 @@ export interface EffectiveAuth {
16
16
  }
17
17
  export declare function admitSessionAuth(input: SessionAuth | undefined): SessionAuth | undefined;
18
18
  export declare function resolveAuth(resolver: SessionAuth | undefined, call: invocation.Call, operation: SessionOperation): Promise<EffectiveAuth>;
19
- //# sourceMappingURL=auth.d.ts.map
@@ -1,4 +1,4 @@
1
- import { invocation as protocol } from '@astrale-os/kernel-protocol';
1
+ import * as protocol from '@astrale-os/kernel-protocol/invocation';
2
2
  import { ClientError } from '../../errors/index.js';
3
3
  import { runSessionOperation } from '../context/index.js';
4
4
  export function admitSessionAuth(input) {
@@ -37,4 +37,3 @@ export async function resolveAuth(resolver, call, operation) {
37
37
  : protocol.acceptDelegate(input.delegate);
38
38
  return Object.freeze({ credential, delegate });
39
39
  }
40
- //# sourceMappingURL=auth.js.map
@@ -1,6 +1,6 @@
1
1
  import type { invocation } from '@astrale-os/kernel-protocol';
2
2
  import type { EffectiveAuth } from './auth.js';
3
- import type { BoundTarget } from './bound.js';
3
+ import type { SchemaExpectation } from './expectation.js';
4
4
  export interface LearnedRoute {
5
5
  readonly route: invocation.Route;
6
6
  readonly credential?: string;
@@ -12,10 +12,9 @@ export declare class RouteCache {
12
12
  private readonly maximumSize;
13
13
  private readonly entries;
14
14
  constructor(maximumAgeMs: number, maximumSize?: number);
15
- key(source: string, call: invocation.Call, auth: EffectiveAuth, expected?: BoundTarget): Promise<string>;
15
+ key(source: string, call: invocation.Call, auth: EffectiveAuth, expected?: SchemaExpectation): Promise<string>;
16
16
  get(key: string, now?: number): LearnedRoute | undefined;
17
17
  learn(key: string, route: invocation.Route, credential: string | undefined, now?: number): LearnedRoute;
18
18
  delete(key: string): void;
19
19
  clear(): void;
20
20
  }
21
- //# sourceMappingURL=cache.d.ts.map
@@ -16,18 +16,7 @@ export class RouteCache {
16
16
  call.target,
17
17
  credential,
18
18
  delegate,
19
- expected === undefined
20
- ? null
21
- : [
22
- expected.schema,
23
- expected.publication === undefined
24
- ? null
25
- : [
26
- expected.publication.origin,
27
- expected.publication.revision,
28
- expected.publication.etag,
29
- ],
30
- ],
19
+ expected === undefined ? null : [expected.origin, expected.revision],
31
20
  ]);
32
21
  }
33
22
  get(key, now = Date.now()) {
@@ -124,4 +113,3 @@ function decodeBase64(input) {
124
113
  }
125
114
  throw new TypeError('Session route caching requires base64 decoding support.');
126
115
  }
127
- //# sourceMappingURL=cache.js.map
@@ -1,12 +1,10 @@
1
- import type { IssuerId } from '@astrale-os/kernel-core/auth';
2
- import type { Result } from '@astrale-os/kernel-ports/functions';
3
- import type { Call } from '../../client/index.js';
1
+ import type { IssuerId } from '@astrale-os/kernel-core/auth/issuer';
2
+ import type { Call, Result } from '../../client/index.js';
4
3
  import type { SessionOperation, SessionPolicy } from '../context/index.js';
5
- import type { SessionDiscovery } from '../discovery/index.js';
6
4
  import type { SessionAuth } from './auth.js';
7
- import type { BoundTarget } from './bound.js';
8
5
  import type { RouteCache } from './cache.js';
9
6
  import type { ClientPoolCapability } from './envelope.js';
7
+ import type { SchemaExpectation } from './expectation.js';
10
8
  import type { SessionEnvelopeTransport, SessionRequestOptions } from './request.js';
11
9
  export interface SessionDispatcherOptions {
12
10
  readonly kernel: IssuerId;
@@ -17,20 +15,17 @@ export interface SessionDispatcherOptions {
17
15
  readonly cache: RouteCache;
18
16
  readonly policy: Readonly<SessionPolicy>;
19
17
  readonly envelopeTransport: SessionEnvelopeTransport;
20
- readonly discovery: SessionDiscovery;
21
18
  readonly requireOpen: () => void;
22
19
  }
23
20
  export declare class SessionDispatcher {
24
21
  private readonly state;
25
22
  constructor(state: SessionDispatcherOptions);
26
- dispatch(input: Call, options: SessionRequestOptions, operation: SessionOperation, expected?: BoundTarget): Promise<Result>;
23
+ dispatch(input: Call, options: SessionRequestOptions, operation: SessionOperation, expected?: SchemaExpectation): Promise<Result>;
27
24
  private dispatchSource;
28
25
  private followSource;
29
26
  private dispatchDestinationWithRecovery;
30
27
  private dispatchDestination;
31
- private sourceKernel;
32
28
  }
33
29
  export declare function requireResultKind<Kind extends 'value' | 'stream' | 'binary'>(expected: Kind, result: Result): Extract<Result, {
34
30
  kind: Kind;
35
31
  }>;
36
- //# sourceMappingURL=dispatch.d.ts.map
@@ -1,4 +1,4 @@
1
- import { invocation as invocationProtocol, publication as publications, } from '@astrale-os/kernel-protocol';
1
+ import * as invocationProtocol from '@astrale-os/kernel-protocol/invocation';
2
2
  import { acceptCall, dispatchTrace, isAdmittedMissError, isAdmittedStaleRouteError, } from '../../client/index.js';
3
3
  import { ClientError, ResponseError } from '../../errors/index.js';
4
4
  import { runSessionOperation, sessionTransportOptions, allowEndpoint } from '../context/index.js';
@@ -15,8 +15,8 @@ export class SessionDispatcher {
15
15
  // Authority is resolved before warm lookup so changed credentials or delegation cannot reuse a
16
16
  // carrier minted for a different caller partition.
17
17
  const auth = await resolveAuth(this.state.auth, call, operation);
18
- const source = await this.sourceKernel(operation);
19
- const cacheKey = await this.state.cache.key(source.issuer, call, auth, expected);
18
+ const source = this.state.kernel;
19
+ const cacheKey = await this.state.cache.key(source, call, auth, expected);
20
20
  const dispatch = Object.freeze({
21
21
  call,
22
22
  auth,
@@ -39,14 +39,14 @@ export class SessionDispatcher {
39
39
  ...sessionTransportOptions(operation, options.idempotencyKey),
40
40
  ...(state.auth.delegate === undefined ? {} : { delegate: state.auth.delegate }),
41
41
  ...(routing === undefined ? {} : { routing }),
42
- ...(state.expected === undefined ? {} : { schema: state.expected.schema }),
42
+ ...(state.expected === undefined ? {} : { schema: { revision: state.expected.revision } }),
43
43
  }));
44
44
  }
45
45
  async followSource(result, state, options, operation) {
46
46
  if (result.kind !== 'redirect')
47
47
  return result;
48
48
  const redirect = result.redirect;
49
- if (redirect.route.via.issuer !== state.source.issuer) {
49
+ if (redirect.route.via.issuer !== state.source) {
50
50
  throw new ClientError('Redirect issuer differs from the session-pinned source Kernel identity.');
51
51
  }
52
52
  requireExpectedPublication(redirect.route, state.expected);
@@ -55,7 +55,7 @@ export class SessionDispatcher {
55
55
  }
56
56
  async dispatchDestinationWithRecovery(learned, state, options, operation, trace) {
57
57
  try {
58
- return await this.dispatchDestination(learned, state.call, options, operation, state.expected, trace);
58
+ return await this.dispatchDestination(learned, state.call, options, operation, state.source, state.expected, trace);
59
59
  }
60
60
  catch (cause) {
61
61
  const stale = isAdmittedStaleRouteError(cause);
@@ -79,8 +79,8 @@ export class SessionDispatcher {
79
79
  return this.followSource(refreshed, state, options, operation);
80
80
  }
81
81
  }
82
- async dispatchDestination(learned, call, options, operation, expected, trace) {
83
- if (learned.route.via.issuer !== (await this.sourceKernel(operation)).issuer) {
82
+ async dispatchDestination(learned, call, options, operation, source, expected, trace) {
83
+ if (learned.route.via.issuer !== source) {
84
84
  throw new ClientError('Learned route issuer differs from the session-pinned source Kernel.');
85
85
  }
86
86
  requireExpectedPublication(learned.route, expected);
@@ -97,13 +97,6 @@ export class SessionDispatcher {
97
97
  }
98
98
  return result;
99
99
  }
100
- async sourceKernel(operation) {
101
- const snapshot = await this.state.discovery.snapshot(operation);
102
- if (snapshot.kernel !== this.state.kernel) {
103
- throw new ClientError('Session discovery returned another Kernel identity.');
104
- }
105
- return Object.freeze({ issuer: snapshot.publication.identity.issuer });
106
- }
107
100
  }
108
101
  function isRouteCompatibilityConflict(input) {
109
102
  if (!(input instanceof ResponseError))
@@ -114,18 +107,15 @@ function isRouteCompatibilityConflict(input) {
114
107
  ...(input.data === undefined ? {} : { data: input.data }),
115
108
  });
116
109
  return (failure?.data.code === invocationProtocol.SCHEMA_UPGRADE_REQUIRED ||
110
+ failure?.data.code === invocationProtocol.SCHEMA_REVISION_MISMATCH ||
117
111
  failure?.data.code === invocationProtocol.SERVICE_TRUST_REQUIRED);
118
112
  }
119
113
  function requireExpectedPublication(route, expected) {
120
114
  if (expected === undefined)
121
115
  return;
122
- if (expected.publication === undefined) {
123
- throw new ClientError('A local bound installation cannot resolve to a remote route.');
124
- }
125
116
  const actual = route.via.publication;
126
- const relation = publications.compareReferences(actual, expected.publication);
127
- if (relation !== 'exact' && relation !== 'same-schema') {
128
- throw new ClientError('Resolved route does not match the bound installed Publication.');
117
+ if (actual.origin !== expected.origin || actual.revision !== expected.revision) {
118
+ throw new ClientError('Resolved route does not match the expected Schema revision.');
129
119
  }
130
120
  }
131
121
  export function requireResultKind(expected, result) {
@@ -133,9 +123,11 @@ export function requireResultKind(expected, result) {
133
123
  return result;
134
124
  if (result.kind === 'stream')
135
125
  void result.stream.cancel(`Expected ${expected} result.`);
126
+ if (result.kind === 'binary' && !(result.value.body instanceof Uint8Array)) {
127
+ void result.value.body[Symbol.asyncIterator]().return?.();
128
+ }
136
129
  throw new ClientError(`Function returned ${result.kind}; ${expected} was required.`);
137
130
  }
138
131
  function authenticated(client, credential) {
139
132
  return credential === undefined ? client : client.as(credential);
140
133
  }
141
- //# sourceMappingURL=dispatch.js.map
@@ -11,4 +11,3 @@ export interface EnvelopeSelection {
11
11
  readonly destination: ClientTarget;
12
12
  }
13
13
  export declare function selectEnvelope(endpoints: publication.InvocationEndpoints, preference: SessionEnvelopeTransport, websocketAvailable: boolean, pool: ClientPoolCapability, policy: Readonly<SessionPolicy>): EnvelopeSelection;
14
- //# sourceMappingURL=envelope.d.ts.map
@@ -33,4 +33,3 @@ export function selectEnvelope(endpoints, preference, websocketAvailable, pool,
33
33
  }
34
34
  return Object.freeze({ client, destination });
35
35
  }
36
- //# sourceMappingURL=envelope.js.map
@@ -0,0 +1,6 @@
1
+ import type { Key, Revision } from '@astrale-os/kernel-dsl/v1';
2
+ /** Private static-consumer expectation carried only by ClientSession.invoke. */
3
+ export interface SchemaExpectation {
4
+ readonly origin: Key.Origin;
5
+ readonly revision: Revision;
6
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,6 @@
1
1
  export { admitSessionAuth, resolveAuth, type Auth, type EffectiveAuth, type SessionAuth, } from './auth.js';
2
- export type { BoundTarget } from './bound.js';
2
+ export type { SchemaExpectation } from './expectation.js';
3
3
  export { RouteCache, type LearnedRoute } from './cache.js';
4
4
  export { requireResultKind, SessionDispatcher, type SessionDispatcherOptions } from './dispatch.js';
5
5
  export { type ClientPoolCapability, type EnvelopeSelection } from './envelope.js';
6
6
  export { admitEnvelopeTransport, admitRequestOptions, type SessionEnvelopeTransport, type SessionRequestOptions, } from './request.js';
7
- //# sourceMappingURL=index.d.ts.map
@@ -3,4 +3,3 @@ export { RouteCache } from './cache.js';
3
3
  export { requireResultKind, SessionDispatcher } from './dispatch.js';
4
4
  export {} from './envelope.js';
5
5
  export { admitEnvelopeTransport, admitRequestOptions, } from './request.js';
6
- //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import type { invocation } from '@astrale-os/kernel-protocol';
1
+ import type * as invocation from '@astrale-os/kernel-protocol/invocation';
2
2
  import type { SessionControlOptions } from '../context/index.js';
3
3
  export type SessionEnvelopeTransport = 'auto' | 'http' | 'websocket';
4
4
  export interface SessionRequestOptions extends SessionControlOptions {
@@ -6,4 +6,3 @@ export interface SessionRequestOptions extends SessionControlOptions {
6
6
  }
7
7
  export declare function admitRequestOptions(input?: SessionRequestOptions): Readonly<SessionRequestOptions>;
8
8
  export declare function admitEnvelopeTransport(input: SessionEnvelopeTransport): SessionEnvelopeTransport;
9
- //# sourceMappingURL=request.d.ts.map
@@ -1,4 +1,4 @@
1
- import { invocation as invocationProtocol } from '@astrale-os/kernel-protocol';
1
+ import * as invocationProtocol from '@astrale-os/kernel-protocol/invocation';
2
2
  import { admitControlOptions } from '../context/index.js';
3
3
  export function admitRequestOptions(input = {}) {
4
4
  if (input === null || typeof input !== 'object' || Array.isArray(input)) {
@@ -23,4 +23,3 @@ export function admitEnvelopeTransport(input) {
23
23
  }
24
24
  return input;
25
25
  }
26
- //# sourceMappingURL=request.js.map
@@ -1,16 +1,17 @@
1
- import type { IssuerId } from '@astrale-os/kernel-core/auth';
1
+ import type { IssuerId } from '@astrale-os/kernel-core/auth/issuer';
2
2
  import type { PathLike } from '@astrale-os/kernel-core/path';
3
- import type { Key } from '@astrale-os/kernel-dsl/v1';
4
- import type { Input, Result } from '@astrale-os/kernel-ports/functions';
5
- import type { Call } from '../client/index.js';
3
+ import type { Domain } from '@astrale-os/kernel-dsl/v1/domain';
4
+ import type { Call, Input, Result } from '../client/index.js';
5
+ import type { DomainBinding, GraphApi } from '../graph/index.js';
6
6
  import type { ClientFactory, ClientPool as ClientPoolType } from '../pool/index.js';
7
- import type { ReadyInstallation, SchemaApi } from '../schema/index.js';
7
+ import type { SchemaApi } from '../schema/index.js';
8
8
  import type { ClientWarning } from '../transport/auto/index.js';
9
9
  import type { Fetch } from '../transport/http/index.js';
10
10
  import type { WebSocketConstructor } from '../transport/websocket/index.js';
11
11
  import type { SessionControlOptions, SessionPolicy } from './context/index.js';
12
12
  import type { SessionSnapshot } from './discovery/index.js';
13
- import type { SessionAuth, BoundTarget, SessionEnvelopeTransport, SessionRequestOptions } from './routing/index.js';
13
+ import type { CallableReference, InputOfReference, OutputOfReference } from './reference.js';
14
+ import type { SessionAuth, SessionEnvelopeTransport, SessionRequestOptions } from './routing/index.js';
14
15
  import type { ViewCatalog } from './views/index.js';
15
16
  export interface ClientSessionOptions {
16
17
  /** Exact canonical source Kernel identity; its invocation and discovery endpoints are derived. */
@@ -28,15 +29,15 @@ export interface ClientSessionOptions {
28
29
  readonly maximumResponseBytes?: number;
29
30
  readonly timeoutMs?: number;
30
31
  }
31
- export type ConnectOptions = Omit<ClientSessionOptions, 'policy'> & {
32
+ export type ConnectOptions = Omit<ClientSessionOptions, 'kernel' | 'policy'> & {
33
+ readonly url: string;
32
34
  readonly policy?: SessionPolicy;
33
35
  };
34
- /** Package-private exact-Publication dispatch used by Domain bindings. */
35
- export declare function dispatchBound(session: ClientSession, call: Call, expected: BoundTarget, options?: SessionRequestOptions): Promise<Result>;
36
36
  /** Caller-owned discovery and redirect-following conversation with one exact source Kernel. */
37
37
  export declare class ClientSession {
38
38
  readonly kernel: IssuerId;
39
39
  readonly schema: SchemaApi;
40
+ readonly graph: GraphApi;
40
41
  private readonly ownedPool?;
41
42
  private readonly discovery;
42
43
  private readonly dispatcher;
@@ -46,17 +47,19 @@ export declare class ClientSession {
46
47
  private readonly admitTargetViews;
47
48
  private closed;
48
49
  constructor(options: ClientSessionOptions);
50
+ /** Bind one admitted DSL Domain to authenticated graph projection and Method dispatch. */
51
+ bind<const DomainValue extends Domain>(domain: DomainValue): DomainBinding<DomainValue>;
49
52
  snapshot(options?: SessionControlOptions): Promise<SessionSnapshot>;
50
53
  viewsFor(target: PathLike, options?: SessionControlOptions): Promise<ViewCatalog>;
51
- installed(origin: Key.Origin, options?: SessionControlOptions): Promise<ReadyInstallation>;
52
54
  dispatch(call: Call, options?: SessionRequestOptions): Promise<Result>;
53
55
  call(call: Call, options?: SessionRequestOptions): Promise<Input>;
54
- stream(call: Call, options?: SessionRequestOptions): Promise<import("@astrale-os/kernel-ports/functions").Stream>;
55
- binary(call: Call, options?: SessionRequestOptions): Promise<import("@astrale-os/kernel-ports/functions").Binary>;
56
+ invoke<const Reference extends CallableReference>(reference: Reference, input: InputOfReference<Reference>, options?: SessionRequestOptions): Promise<OutputOfReference<Reference>>;
57
+ stream(call: Call, options?: SessionRequestOptions): Promise<import("../client/result.js").Stream>;
58
+ binary(call: Call, options?: SessionRequestOptions): Promise<import("@astrale-os/kernel-core/callable").BinaryOutput>;
56
59
  close(): void;
57
60
  private requireOpen;
61
+ private invokeDomainMethod;
58
62
  private operation;
59
63
  }
60
64
  /** Open one caller-owned conversation with a Kernel using secure defaults. */
61
65
  export declare function connect(options: ConnectOptions): ClientSession;
62
- //# sourceMappingURL=session.d.ts.map