@sixb/core 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1582) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +470 -0
  3. package/dist/actions/builders/define-action.d.ts +7 -0
  4. package/dist/actions/builders/define-action.d.ts.map +1 -0
  5. package/dist/actions/builders/params.d.ts +23 -0
  6. package/dist/actions/builders/params.d.ts.map +1 -0
  7. package/dist/actions/builders.d.ts +3 -0
  8. package/dist/actions/builders.d.ts.map +1 -0
  9. package/dist/actions/commit-edits.d.ts +54 -0
  10. package/dist/actions/commit-edits.d.ts.map +1 -0
  11. package/dist/actions/errors.d.ts +9 -0
  12. package/dist/actions/errors.d.ts.map +1 -0
  13. package/dist/actions/index.d.ts +14 -0
  14. package/dist/actions/index.d.ts.map +1 -0
  15. package/dist/actions/index.js +73 -0
  16. package/dist/actions/index.js.map +9 -0
  17. package/dist/actions/read-facade.d.ts +56 -0
  18. package/dist/actions/read-facade.d.ts.map +1 -0
  19. package/dist/actions/registry.d.ts +17 -0
  20. package/dist/actions/registry.d.ts.map +1 -0
  21. package/dist/actions/request.d.ts +37 -0
  22. package/dist/actions/request.d.ts.map +1 -0
  23. package/dist/actions/run-id.d.ts +3 -0
  24. package/dist/actions/run-id.d.ts.map +1 -0
  25. package/dist/actions/runtime.d.ts +11 -0
  26. package/dist/actions/runtime.d.ts.map +1 -0
  27. package/dist/actions/types/context.d.ts +147 -0
  28. package/dist/actions/types/context.d.ts.map +1 -0
  29. package/dist/actions/types/definitions.d.ts +67 -0
  30. package/dist/actions/types/definitions.d.ts.map +1 -0
  31. package/dist/actions/types/handlers.d.ts +19 -0
  32. package/dist/actions/types/handlers.d.ts.map +1 -0
  33. package/dist/actions/types/params.d.ts +45 -0
  34. package/dist/actions/types/params.d.ts.map +1 -0
  35. package/dist/actions/types.d.ts +5 -0
  36. package/dist/actions/types.d.ts.map +1 -0
  37. package/dist/actions/validation.d.ts +33 -0
  38. package/dist/actions/validation.d.ts.map +1 -0
  39. package/dist/actions/validators.d.ts +8 -0
  40. package/dist/actions/validators.d.ts.map +1 -0
  41. package/dist/actions/worker.d.ts +3 -0
  42. package/dist/actions/worker.d.ts.map +1 -0
  43. package/dist/actions/worker.js +324 -0
  44. package/dist/actions/worker.js.map +11 -0
  45. package/dist/agents/adapters.d.ts +185 -0
  46. package/dist/agents/adapters.d.ts.map +1 -0
  47. package/dist/agents/api-gateway.d.ts +21 -0
  48. package/dist/agents/api-gateway.d.ts.map +1 -0
  49. package/dist/agents/builders.d.ts +10 -0
  50. package/dist/agents/builders.d.ts.map +1 -0
  51. package/dist/agents/context-model.d.ts +4 -0
  52. package/dist/agents/context-model.d.ts.map +1 -0
  53. package/dist/agents/context-resolution.d.ts +5 -0
  54. package/dist/agents/context-resolution.d.ts.map +1 -0
  55. package/dist/agents/context.d.ts +57 -0
  56. package/dist/agents/context.d.ts.map +1 -0
  57. package/dist/agents/context.js +23 -0
  58. package/dist/agents/context.js.map +9 -0
  59. package/dist/agents/dispatch.d.ts +36 -0
  60. package/dist/agents/dispatch.d.ts.map +1 -0
  61. package/dist/agents/errors.d.ts +27 -0
  62. package/dist/agents/errors.d.ts.map +1 -0
  63. package/dist/agents/ids.d.ts +11 -0
  64. package/dist/agents/ids.d.ts.map +1 -0
  65. package/dist/agents/index.d.ts +24 -0
  66. package/dist/agents/index.d.ts.map +1 -0
  67. package/dist/agents/index.js +121 -0
  68. package/dist/agents/index.js.map +9 -0
  69. package/dist/agents/message.d.ts +78 -0
  70. package/dist/agents/message.d.ts.map +1 -0
  71. package/dist/agents/prompt.d.ts +15 -0
  72. package/dist/agents/prompt.d.ts.map +1 -0
  73. package/dist/agents/request.d.ts +42 -0
  74. package/dist/agents/request.d.ts.map +1 -0
  75. package/dist/agents/runtime.d.ts +41 -0
  76. package/dist/agents/runtime.d.ts.map +1 -0
  77. package/dist/agents/streams.d.ts +72 -0
  78. package/dist/agents/streams.d.ts.map +1 -0
  79. package/dist/agents/streams.js +32 -0
  80. package/dist/agents/streams.js.map +9 -0
  81. package/dist/agents/types.d.ts +52 -0
  82. package/dist/agents/types.d.ts.map +1 -0
  83. package/dist/agents/validation.d.ts +10 -0
  84. package/dist/agents/validation.d.ts.map +1 -0
  85. package/dist/auth/access-tokens.d.ts +19 -0
  86. package/dist/auth/access-tokens.d.ts.map +1 -0
  87. package/dist/auth/audience.d.ts +8 -0
  88. package/dist/auth/audience.d.ts.map +1 -0
  89. package/dist/auth/cookies.d.ts +50 -0
  90. package/dist/auth/cookies.d.ts.map +1 -0
  91. package/dist/auth/csrf.d.ts +8 -0
  92. package/dist/auth/csrf.d.ts.map +1 -0
  93. package/dist/auth/errors.d.ts +7 -0
  94. package/dist/auth/errors.d.ts.map +1 -0
  95. package/dist/auth/index.d.ts +15 -0
  96. package/dist/auth/index.d.ts.map +1 -0
  97. package/dist/auth/index.js +101 -0
  98. package/dist/auth/index.js.map +9 -0
  99. package/dist/auth/runtime.d.ts +129 -0
  100. package/dist/auth/runtime.d.ts.map +1 -0
  101. package/dist/auth/session-cache.d.ts +44 -0
  102. package/dist/auth/session-cache.d.ts.map +1 -0
  103. package/dist/auth/sessions.d.ts +16 -0
  104. package/dist/auth/sessions.d.ts.map +1 -0
  105. package/dist/auth/strategy.d.ts +11 -0
  106. package/dist/auth/strategy.d.ts.map +1 -0
  107. package/dist/auth/strategy.js +14 -0
  108. package/dist/auth/strategy.js.map +9 -0
  109. package/dist/auth/types.d.ts +460 -0
  110. package/dist/auth/types.d.ts.map +1 -0
  111. package/dist/auth/validation.d.ts +26 -0
  112. package/dist/auth/validation.d.ts.map +1 -0
  113. package/dist/authorization/application-access.d.ts +18 -0
  114. package/dist/authorization/application-access.d.ts.map +1 -0
  115. package/dist/authorization/decision.d.ts +104 -0
  116. package/dist/authorization/decision.d.ts.map +1 -0
  117. package/dist/authorization/errors.d.ts +10 -0
  118. package/dist/authorization/errors.d.ts.map +1 -0
  119. package/dist/authorization/event-visibility.d.ts +16 -0
  120. package/dist/authorization/event-visibility.d.ts.map +1 -0
  121. package/dist/authorization/grant-kinds.d.ts +48 -0
  122. package/dist/authorization/grant-kinds.d.ts.map +1 -0
  123. package/dist/authorization/index.d.ts +11 -0
  124. package/dist/authorization/index.d.ts.map +1 -0
  125. package/dist/authorization/index.js +48 -0
  126. package/dist/authorization/index.js.map +9 -0
  127. package/dist/authorization/resolve.d.ts +28 -0
  128. package/dist/authorization/resolve.d.ts.map +1 -0
  129. package/dist/authorization/run-visibility.d.ts +15 -0
  130. package/dist/authorization/run-visibility.d.ts.map +1 -0
  131. package/dist/authorization/types.d.ts +46 -0
  132. package/dist/authorization/types.d.ts.map +1 -0
  133. package/dist/blob-storage/browser.d.ts +14 -0
  134. package/dist/blob-storage/browser.d.ts.map +1 -0
  135. package/dist/blob-storage/browser.js +22 -0
  136. package/dist/blob-storage/browser.js.map +9 -0
  137. package/dist/blob-storage/constants.d.ts +10 -0
  138. package/dist/blob-storage/constants.d.ts.map +1 -0
  139. package/dist/blob-storage/derive.d.ts +4 -0
  140. package/dist/blob-storage/derive.d.ts.map +1 -0
  141. package/dist/blob-storage/errors.d.ts +7 -0
  142. package/dist/blob-storage/errors.d.ts.map +1 -0
  143. package/dist/blob-storage/in-memory.d.ts +10 -0
  144. package/dist/blob-storage/in-memory.d.ts.map +1 -0
  145. package/dist/blob-storage/index.d.ts +8 -0
  146. package/dist/blob-storage/index.d.ts.map +1 -0
  147. package/dist/blob-storage/index.js +44 -0
  148. package/dist/blob-storage/index.js.map +9 -0
  149. package/dist/blob-storage/types.d.ts +126 -0
  150. package/dist/blob-storage/types.d.ts.map +1 -0
  151. package/dist/blob-storage/utils.d.ts +9 -0
  152. package/dist/blob-storage/utils.d.ts.map +1 -0
  153. package/dist/blob-storage/validation.d.ts +6 -0
  154. package/dist/blob-storage/validation.d.ts.map +1 -0
  155. package/dist/bootstrap/discovery.d.ts +34 -0
  156. package/dist/bootstrap/discovery.d.ts.map +1 -0
  157. package/dist/bootstrap/index.d.ts +4 -0
  158. package/dist/bootstrap/index.d.ts.map +1 -0
  159. package/dist/bootstrap/index.js +80 -0
  160. package/dist/bootstrap/index.js.map +9 -0
  161. package/dist/bootstrap/ontology-type-manifest.d.ts +22 -0
  162. package/dist/bootstrap/ontology-type-manifest.d.ts.map +1 -0
  163. package/dist/broker/errors.d.ts +12 -0
  164. package/dist/broker/errors.d.ts.map +1 -0
  165. package/dist/broker/in-memory.d.ts +53 -0
  166. package/dist/broker/in-memory.d.ts.map +1 -0
  167. package/dist/broker/index.d.ts +5 -0
  168. package/dist/broker/index.d.ts.map +1 -0
  169. package/dist/broker/index.js +15 -0
  170. package/dist/broker/index.js.map +9 -0
  171. package/dist/broker/types.d.ts +119 -0
  172. package/dist/broker/types.d.ts.map +1 -0
  173. package/dist/chunk-04b07a9q.js +89 -0
  174. package/dist/chunk-04b07a9q.js.map +10 -0
  175. package/dist/chunk-0fygrz37.js +354 -0
  176. package/dist/chunk-0fygrz37.js.map +17 -0
  177. package/dist/chunk-0psb6kdw.js +989 -0
  178. package/dist/chunk-0psb6kdw.js.map +15 -0
  179. package/dist/chunk-1evzqhks.js +76 -0
  180. package/dist/chunk-1evzqhks.js.map +10 -0
  181. package/dist/chunk-1vffvydj.js +109 -0
  182. package/dist/chunk-1vffvydj.js.map +10 -0
  183. package/dist/chunk-2ab72m2h.js +59 -0
  184. package/dist/chunk-2ab72m2h.js.map +10 -0
  185. package/dist/chunk-2gpr6jsz.js +1968 -0
  186. package/dist/chunk-2gpr6jsz.js.map +13 -0
  187. package/dist/chunk-2s6sydsh.js +368 -0
  188. package/dist/chunk-2s6sydsh.js.map +12 -0
  189. package/dist/chunk-45tw90k7.js +72 -0
  190. package/dist/chunk-45tw90k7.js.map +11 -0
  191. package/dist/chunk-4pycxcj3.js +35 -0
  192. package/dist/chunk-4pycxcj3.js.map +11 -0
  193. package/dist/chunk-50kv63vj.js +523 -0
  194. package/dist/chunk-50kv63vj.js.map +12 -0
  195. package/dist/chunk-51fjndv0.js +17 -0
  196. package/dist/chunk-51fjndv0.js.map +11 -0
  197. package/dist/chunk-590dejbp.js +49 -0
  198. package/dist/chunk-590dejbp.js.map +10 -0
  199. package/dist/chunk-5yny9z0e.js +60 -0
  200. package/dist/chunk-5yny9z0e.js.map +10 -0
  201. package/dist/chunk-6wetht33.js +89 -0
  202. package/dist/chunk-6wetht33.js.map +10 -0
  203. package/dist/chunk-74drx9gd.js +362 -0
  204. package/dist/chunk-74drx9gd.js.map +11 -0
  205. package/dist/chunk-867jxh7c.js +1156 -0
  206. package/dist/chunk-867jxh7c.js.map +19 -0
  207. package/dist/chunk-88ppkr54.js +257 -0
  208. package/dist/chunk-88ppkr54.js.map +12 -0
  209. package/dist/chunk-8r8cw2xw.js +373 -0
  210. package/dist/chunk-8r8cw2xw.js.map +11 -0
  211. package/dist/chunk-8ydjhh27.js +95 -0
  212. package/dist/chunk-8ydjhh27.js.map +11 -0
  213. package/dist/chunk-9dzba0f2.js +43 -0
  214. package/dist/chunk-9dzba0f2.js.map +10 -0
  215. package/dist/chunk-aebzcsxr.js +5272 -0
  216. package/dist/chunk-aebzcsxr.js.map +48 -0
  217. package/dist/chunk-b49dgvsj.js +49 -0
  218. package/dist/chunk-b49dgvsj.js.map +10 -0
  219. package/dist/chunk-btpe64e4.js +554 -0
  220. package/dist/chunk-btpe64e4.js.map +13 -0
  221. package/dist/chunk-c3zd880g.js +629 -0
  222. package/dist/chunk-c3zd880g.js.map +14 -0
  223. package/dist/chunk-dcgrzj1t.js +2954 -0
  224. package/dist/chunk-dcgrzj1t.js.map +36 -0
  225. package/dist/chunk-dhmj53mx.js +501 -0
  226. package/dist/chunk-dhmj53mx.js.map +16 -0
  227. package/dist/chunk-dktq02ne.js +16 -0
  228. package/dist/chunk-dktq02ne.js.map +10 -0
  229. package/dist/chunk-f2b5e2gf.js +141 -0
  230. package/dist/chunk-f2b5e2gf.js.map +11 -0
  231. package/dist/chunk-gqdd7508.js +273 -0
  232. package/dist/chunk-gqdd7508.js.map +11 -0
  233. package/dist/chunk-hsv43v58.js +1390 -0
  234. package/dist/chunk-hsv43v58.js.map +21 -0
  235. package/dist/chunk-jdwx7vzs.js +454 -0
  236. package/dist/chunk-jdwx7vzs.js.map +14 -0
  237. package/dist/chunk-k25jm1x5.js +102 -0
  238. package/dist/chunk-k25jm1x5.js.map +10 -0
  239. package/dist/chunk-k41ajtz7.js +352 -0
  240. package/dist/chunk-k41ajtz7.js.map +13 -0
  241. package/dist/chunk-k6j72mtt.js +9 -0
  242. package/dist/chunk-k6j72mtt.js.map +10 -0
  243. package/dist/chunk-mx84y05q.js +426 -0
  244. package/dist/chunk-mx84y05q.js.map +11 -0
  245. package/dist/chunk-nvamz5dv.js +819 -0
  246. package/dist/chunk-nvamz5dv.js.map +21 -0
  247. package/dist/chunk-p6r5g77m.js +113 -0
  248. package/dist/chunk-p6r5g77m.js.map +10 -0
  249. package/dist/chunk-pv1yad91.js +1165 -0
  250. package/dist/chunk-pv1yad91.js.map +27 -0
  251. package/dist/chunk-q4qzq0ea.js +832 -0
  252. package/dist/chunk-q4qzq0ea.js.map +14 -0
  253. package/dist/chunk-r65yscvk.js +187 -0
  254. package/dist/chunk-r65yscvk.js.map +11 -0
  255. package/dist/chunk-ry24jbr1.js +50 -0
  256. package/dist/chunk-ry24jbr1.js.map +10 -0
  257. package/dist/chunk-t358gywy.js +991 -0
  258. package/dist/chunk-t358gywy.js.map +34 -0
  259. package/dist/chunk-t72dvahb.js +167 -0
  260. package/dist/chunk-t72dvahb.js.map +12 -0
  261. package/dist/chunk-tsk2bxs3.js +1254 -0
  262. package/dist/chunk-tsk2bxs3.js.map +17 -0
  263. package/dist/chunk-v5c085yp.js +49 -0
  264. package/dist/chunk-v5c085yp.js.map +10 -0
  265. package/dist/chunk-vj723r3p.js +146 -0
  266. package/dist/chunk-vj723r3p.js.map +12 -0
  267. package/dist/chunk-wj01s5hr.js +363 -0
  268. package/dist/chunk-wj01s5hr.js.map +11 -0
  269. package/dist/chunk-wxhdnwh4.js +37 -0
  270. package/dist/chunk-wxhdnwh4.js.map +10 -0
  271. package/dist/chunk-xqbtf4wn.js +170 -0
  272. package/dist/chunk-xqbtf4wn.js.map +10 -0
  273. package/dist/chunk-xwnf87e1.js +324 -0
  274. package/dist/chunk-xwnf87e1.js.map +13 -0
  275. package/dist/chunk-xz5g49bp.js +239 -0
  276. package/dist/chunk-xz5g49bp.js.map +11 -0
  277. package/dist/chunk-y64skrwp.js +19 -0
  278. package/dist/chunk-y64skrwp.js.map +9 -0
  279. package/dist/chunk-ya6brh8a.js +136 -0
  280. package/dist/chunk-ya6brh8a.js.map +11 -0
  281. package/dist/chunk-yt8wphsx.js +12 -0
  282. package/dist/chunk-yt8wphsx.js.map +10 -0
  283. package/dist/chunk-yvef9xwc.js +3842 -0
  284. package/dist/chunk-yvef9xwc.js.map +44 -0
  285. package/dist/chunk-yxss87qa.js +821 -0
  286. package/dist/chunk-yxss87qa.js.map +14 -0
  287. package/dist/connectors/builders.d.ts +10 -0
  288. package/dist/connectors/builders.d.ts.map +1 -0
  289. package/dist/connectors/errors.d.ts +14 -0
  290. package/dist/connectors/errors.d.ts.map +1 -0
  291. package/dist/connectors/index.d.ts +5 -0
  292. package/dist/connectors/index.d.ts.map +1 -0
  293. package/dist/connectors/runtime.d.ts +13 -0
  294. package/dist/connectors/runtime.d.ts.map +1 -0
  295. package/dist/connectors/types.d.ts +39 -0
  296. package/dist/connectors/types.d.ts.map +1 -0
  297. package/dist/datasets/builders.d.ts +54 -0
  298. package/dist/datasets/builders.d.ts.map +1 -0
  299. package/dist/datasets/errors.d.ts +4 -0
  300. package/dist/datasets/errors.d.ts.map +1 -0
  301. package/dist/datasets/index.d.ts +5 -0
  302. package/dist/datasets/index.d.ts.map +1 -0
  303. package/dist/datasets/types.d.ts +23 -0
  304. package/dist/datasets/types.d.ts.map +1 -0
  305. package/dist/datasets/validation.d.ts +8 -0
  306. package/dist/datasets/validation.d.ts.map +1 -0
  307. package/dist/edits/errors.d.ts +4 -0
  308. package/dist/edits/errors.d.ts.map +1 -0
  309. package/dist/edits/index.d.ts +4 -0
  310. package/dist/edits/index.d.ts.map +1 -0
  311. package/dist/edits/index.js +14 -0
  312. package/dist/edits/index.js.map +9 -0
  313. package/dist/edits/normalize.d.ts +14 -0
  314. package/dist/edits/normalize.d.ts.map +1 -0
  315. package/dist/edits/properties.d.ts +25 -0
  316. package/dist/edits/properties.d.ts.map +1 -0
  317. package/dist/edits/recorder.d.ts +4 -0
  318. package/dist/edits/recorder.d.ts.map +1 -0
  319. package/dist/edits/types.d.ts +159 -0
  320. package/dist/edits/types.d.ts.map +1 -0
  321. package/dist/error-reporting/capability.d.ts +57 -0
  322. package/dist/error-reporting/capability.d.ts.map +1 -0
  323. package/dist/error-reporting/internal.d.ts +4 -0
  324. package/dist/error-reporting/internal.d.ts.map +1 -0
  325. package/dist/error-reporting/internal.js +24 -0
  326. package/dist/error-reporting/internal.js.map +9 -0
  327. package/dist/error-reporting/normalize.d.ts +3 -0
  328. package/dist/error-reporting/normalize.d.ts.map +1 -0
  329. package/dist/error-reporting/reporter.d.ts +10 -0
  330. package/dist/error-reporting/reporter.d.ts.map +1 -0
  331. package/dist/error-reporting/types.d.ts +112 -0
  332. package/dist/error-reporting/types.d.ts.map +1 -0
  333. package/dist/events/definitions.d.ts +76 -0
  334. package/dist/events/definitions.d.ts.map +1 -0
  335. package/dist/events/envelope.d.ts +56 -0
  336. package/dist/events/envelope.d.ts.map +1 -0
  337. package/dist/events/errors.d.ts +8 -0
  338. package/dist/events/errors.d.ts.map +1 -0
  339. package/dist/events/index.d.ts +11 -0
  340. package/dist/events/index.d.ts.map +1 -0
  341. package/dist/events/index.js +68 -0
  342. package/dist/events/index.js.map +9 -0
  343. package/dist/events/outbox-dispatcher.d.ts +82 -0
  344. package/dist/events/outbox-dispatcher.d.ts.map +1 -0
  345. package/dist/events/property-changes.d.ts +16 -0
  346. package/dist/events/property-changes.d.ts.map +1 -0
  347. package/dist/events/runtime.d.ts +87 -0
  348. package/dist/events/runtime.d.ts.map +1 -0
  349. package/dist/events/scope.d.ts +25 -0
  350. package/dist/events/scope.d.ts.map +1 -0
  351. package/dist/events/scope.js +10 -0
  352. package/dist/events/scope.js.map +9 -0
  353. package/dist/events/selectors/builder.d.ts +64 -0
  354. package/dist/events/selectors/builder.d.ts.map +1 -0
  355. package/dist/events/selectors/index.d.ts +5 -0
  356. package/dist/events/selectors/index.d.ts.map +1 -0
  357. package/dist/events/selectors/index.js +15 -0
  358. package/dist/events/selectors/index.js.map +9 -0
  359. package/dist/events/selectors/predicate.d.ts +5 -0
  360. package/dist/events/selectors/predicate.d.ts.map +1 -0
  361. package/dist/events/selectors/types.d.ts +141 -0
  362. package/dist/events/selectors/types.d.ts.map +1 -0
  363. package/dist/events/toStoredEvent.d.ts +10 -0
  364. package/dist/events/toStoredEvent.d.ts.map +1 -0
  365. package/dist/events/types/actions.d.ts +39 -0
  366. package/dist/events/types/actions.d.ts.map +1 -0
  367. package/dist/events/types/datasets.d.ts +20 -0
  368. package/dist/events/types/datasets.d.ts.map +1 -0
  369. package/dist/events/types/index.d.ts +137 -0
  370. package/dist/events/types/index.d.ts.map +1 -0
  371. package/dist/events/types/links.d.ts +37 -0
  372. package/dist/events/types/links.d.ts.map +1 -0
  373. package/dist/events/types/objects.d.ts +33 -0
  374. package/dist/events/types/objects.d.ts.map +1 -0
  375. package/dist/events/types/pipelines.d.ts +59 -0
  376. package/dist/events/types/pipelines.d.ts.map +1 -0
  377. package/dist/events/types/rules.d.ts +28 -0
  378. package/dist/events/types/rules.d.ts.map +1 -0
  379. package/dist/events/types/schedules.d.ts +14 -0
  380. package/dist/events/types/schedules.d.ts.map +1 -0
  381. package/dist/events/types/syncs.d.ts +25 -0
  382. package/dist/events/types/syncs.d.ts.map +1 -0
  383. package/dist/events/types/telemetry.d.ts +17 -0
  384. package/dist/events/types/telemetry.d.ts.map +1 -0
  385. package/dist/events/types/workflows.d.ts +150 -0
  386. package/dist/events/types/workflows.d.ts.map +1 -0
  387. package/dist/http/api-routes.d.ts +24 -0
  388. package/dist/http/api-routes.d.ts.map +1 -0
  389. package/dist/http/index.d.ts +4 -0
  390. package/dist/http/index.d.ts.map +1 -0
  391. package/dist/http/index.js +16 -0
  392. package/dist/http/index.js.map +9 -0
  393. package/dist/http/route-pattern.d.ts +14 -0
  394. package/dist/http/route-pattern.d.ts.map +1 -0
  395. package/dist/index.d.ts +70 -0
  396. package/dist/index.d.ts.map +1 -0
  397. package/dist/index.js +430 -0
  398. package/dist/index.js.map +9 -0
  399. package/dist/json.d.ts +14 -0
  400. package/dist/json.d.ts.map +1 -0
  401. package/dist/lake-storage/definition-updates.d.ts +40 -0
  402. package/dist/lake-storage/definition-updates.d.ts.map +1 -0
  403. package/dist/lake-storage/errors.d.ts +7 -0
  404. package/dist/lake-storage/errors.d.ts.map +1 -0
  405. package/dist/lake-storage/in-memory.d.ts +25 -0
  406. package/dist/lake-storage/in-memory.d.ts.map +1 -0
  407. package/dist/lake-storage/index.d.ts +9 -0
  408. package/dist/lake-storage/index.d.ts.map +1 -0
  409. package/dist/lake-storage/index.js +24 -0
  410. package/dist/lake-storage/index.js.map +9 -0
  411. package/dist/lake-storage/sql-transforms.d.ts +45 -0
  412. package/dist/lake-storage/sql-transforms.d.ts.map +1 -0
  413. package/dist/lake-storage/types.d.ts +114 -0
  414. package/dist/lake-storage/types.d.ts.map +1 -0
  415. package/dist/logging/console-logger.d.ts +17 -0
  416. package/dist/logging/console-logger.d.ts.map +1 -0
  417. package/dist/logging/index.d.ts +5 -0
  418. package/dist/logging/index.d.ts.map +1 -0
  419. package/dist/logging/index.js +45 -0
  420. package/dist/logging/index.js.map +9 -0
  421. package/dist/logging/record.d.ts +10 -0
  422. package/dist/logging/record.d.ts.map +1 -0
  423. package/dist/logging/run-logger.d.ts +61 -0
  424. package/dist/logging/run-logger.d.ts.map +1 -0
  425. package/dist/logging/runtime.d.ts +87 -0
  426. package/dist/logging/runtime.d.ts.map +1 -0
  427. package/dist/logging/stream.d.ts +24 -0
  428. package/dist/logging/stream.d.ts.map +1 -0
  429. package/dist/logging/types.d.ts +82 -0
  430. package/dist/logging/types.d.ts.map +1 -0
  431. package/dist/logging/types.js +27 -0
  432. package/dist/logging/types.js.map +9 -0
  433. package/dist/maintenance/index.d.ts +3 -0
  434. package/dist/maintenance/index.d.ts.map +1 -0
  435. package/dist/maintenance/ontology-maintenance.d.ts +48 -0
  436. package/dist/maintenance/ontology-maintenance.d.ts.map +1 -0
  437. package/dist/maintenance/types.d.ts +53 -0
  438. package/dist/maintenance/types.d.ts.map +1 -0
  439. package/dist/materialization/dataset-watermark.d.ts +5 -0
  440. package/dist/materialization/dataset-watermark.d.ts.map +1 -0
  441. package/dist/materialization/errors.d.ts +37 -0
  442. package/dist/materialization/errors.d.ts.map +1 -0
  443. package/dist/materialization/events.d.ts +57 -0
  444. package/dist/materialization/events.d.ts.map +1 -0
  445. package/dist/materialization/identity.d.ts +8 -0
  446. package/dist/materialization/identity.d.ts.map +1 -0
  447. package/dist/materialization/index.d.ts +13 -0
  448. package/dist/materialization/index.d.ts.map +1 -0
  449. package/dist/materialization/index.js +56 -0
  450. package/dist/materialization/index.js.map +9 -0
  451. package/dist/materialization/model.d.ts +342 -0
  452. package/dist/materialization/model.d.ts.map +1 -0
  453. package/dist/materialization/refs.d.ts +24 -0
  454. package/dist/materialization/refs.d.ts.map +1 -0
  455. package/dist/materializer/context.d.ts +34 -0
  456. package/dist/materializer/context.d.ts.map +1 -0
  457. package/dist/materializer/edits/apply.d.ts +35 -0
  458. package/dist/materializer/edits/apply.d.ts.map +1 -0
  459. package/dist/materializer/edits/commit.d.ts +4 -0
  460. package/dist/materializer/edits/commit.d.ts.map +1 -0
  461. package/dist/materializer/edits/execution-units.d.ts +14 -0
  462. package/dist/materializer/edits/execution-units.d.ts.map +1 -0
  463. package/dist/materializer/edits/load-state.d.ts +6 -0
  464. package/dist/materializer/edits/load-state.d.ts.map +1 -0
  465. package/dist/materializer/edits/operations.d.ts +32 -0
  466. package/dist/materializer/edits/operations.d.ts.map +1 -0
  467. package/dist/materializer/edits/plan.d.ts +18 -0
  468. package/dist/materializer/edits/plan.d.ts.map +1 -0
  469. package/dist/materializer/edits/read-set.d.ts +8 -0
  470. package/dist/materializer/edits/read-set.d.ts.map +1 -0
  471. package/dist/materializer/edits/working-state.d.ts +30 -0
  472. package/dist/materializer/edits/working-state.d.ts.map +1 -0
  473. package/dist/materializer/effective/build-events.d.ts +26 -0
  474. package/dist/materializer/effective/build-events.d.ts.map +1 -0
  475. package/dist/materializer/effective/diff.d.ts +15 -0
  476. package/dist/materializer/effective/diff.d.ts.map +1 -0
  477. package/dist/materializer/effective/load-state.d.ts +7 -0
  478. package/dist/materializer/effective/load-state.d.ts.map +1 -0
  479. package/dist/materializer/effective/resolve.d.ts +26 -0
  480. package/dist/materializer/effective/resolve.d.ts.map +1 -0
  481. package/dist/materializer/effective/validate.d.ts +11 -0
  482. package/dist/materializer/effective/validate.d.ts.map +1 -0
  483. package/dist/materializer/execution/commit-lifecycle.d.ts +8 -0
  484. package/dist/materializer/execution/commit-lifecycle.d.ts.map +1 -0
  485. package/dist/materializer/execution/plan-stream.d.ts +8 -0
  486. package/dist/materializer/execution/plan-stream.d.ts.map +1 -0
  487. package/dist/materializer/execution/run-correlation.d.ts +19 -0
  488. package/dist/materializer/execution/run-correlation.d.ts.map +1 -0
  489. package/dist/materializer/execution/work-executor.d.ts +13 -0
  490. package/dist/materializer/execution/work-executor.d.ts.map +1 -0
  491. package/dist/materializer/execution/work-records.d.ts +15 -0
  492. package/dist/materializer/execution/work-records.d.ts.map +1 -0
  493. package/dist/materializer/index.d.ts +15 -0
  494. package/dist/materializer/index.d.ts.map +1 -0
  495. package/dist/materializer/index.js +134 -0
  496. package/dist/materializer/index.js.map +9 -0
  497. package/dist/materializer/materializer.d.ts +27 -0
  498. package/dist/materializer/materializer.d.ts.map +1 -0
  499. package/dist/materializer/projections/entry-validator.d.ts +8 -0
  500. package/dist/materializer/projections/entry-validator.d.ts.map +1 -0
  501. package/dist/materializer/projections/finish-run.d.ts +4 -0
  502. package/dist/materializer/projections/finish-run.d.ts.map +1 -0
  503. package/dist/materializer/projections/replace.d.ts +4 -0
  504. package/dist/materializer/projections/replace.d.ts.map +1 -0
  505. package/dist/materializer/projections/replacement-plan.d.ts +14 -0
  506. package/dist/materializer/projections/replacement-plan.d.ts.map +1 -0
  507. package/dist/materializer/projections/source-materialization.d.ts +27 -0
  508. package/dist/materializer/projections/source-materialization.d.ts.map +1 -0
  509. package/dist/materializer/shared/abort.d.ts +2 -0
  510. package/dist/materializer/shared/abort.d.ts.map +1 -0
  511. package/dist/materializer/shared/batching.d.ts +11 -0
  512. package/dist/materializer/shared/batching.d.ts.map +1 -0
  513. package/dist/materializer/shared/chunking.d.ts +6 -0
  514. package/dist/materializer/shared/chunking.d.ts.map +1 -0
  515. package/dist/materializer/shared/identity.d.ts +38 -0
  516. package/dist/materializer/shared/identity.d.ts.map +1 -0
  517. package/dist/materializer/shared/normalize.d.ts +10 -0
  518. package/dist/materializer/shared/normalize.d.ts.map +1 -0
  519. package/dist/materializer/shared/projection-run.d.ts +19 -0
  520. package/dist/materializer/shared/projection-run.d.ts.map +1 -0
  521. package/dist/materializer/telemetry/append.d.ts +4 -0
  522. package/dist/materializer/telemetry/append.d.ts.map +1 -0
  523. package/dist/materializer/telemetry/plan.d.ts +12 -0
  524. package/dist/materializer/telemetry/plan.d.ts.map +1 -0
  525. package/dist/objects/action/errors.d.ts +39 -0
  526. package/dist/objects/action/errors.d.ts.map +1 -0
  527. package/dist/objects/action/index.d.ts +4 -0
  528. package/dist/objects/action/index.d.ts.map +1 -0
  529. package/dist/objects/action/request.d.ts +23 -0
  530. package/dist/objects/action/request.d.ts.map +1 -0
  531. package/dist/objects/context/index.d.ts +3 -0
  532. package/dist/objects/context/index.d.ts.map +1 -0
  533. package/dist/objects/context/resolve.d.ts +27 -0
  534. package/dist/objects/context/resolve.d.ts.map +1 -0
  535. package/dist/objects/context/types.d.ts +28 -0
  536. package/dist/objects/context/types.d.ts.map +1 -0
  537. package/dist/objects/contexts.d.ts +45 -0
  538. package/dist/objects/contexts.d.ts.map +1 -0
  539. package/dist/objects/errors.d.ts +8 -0
  540. package/dist/objects/errors.d.ts.map +1 -0
  541. package/dist/objects/helpers.d.ts +7 -0
  542. package/dist/objects/helpers.d.ts.map +1 -0
  543. package/dist/objects/index.d.ts +18 -0
  544. package/dist/objects/index.d.ts.map +1 -0
  545. package/dist/objects/index.js +71 -0
  546. package/dist/objects/index.js.map +9 -0
  547. package/dist/objects/link/authorization.d.ts +25 -0
  548. package/dist/objects/link/authorization.d.ts.map +1 -0
  549. package/dist/objects/link/endpoints.d.ts +28 -0
  550. package/dist/objects/link/endpoints.d.ts.map +1 -0
  551. package/dist/objects/link/index.d.ts +4 -0
  552. package/dist/objects/link/index.d.ts.map +1 -0
  553. package/dist/objects/link/remove.d.ts +8 -0
  554. package/dist/objects/link/remove.d.ts.map +1 -0
  555. package/dist/objects/link/upsert-batch.d.ts +11 -0
  556. package/dist/objects/link/upsert-batch.d.ts.map +1 -0
  557. package/dist/objects/link/upsert.d.ts +12 -0
  558. package/dist/objects/link/upsert.d.ts.map +1 -0
  559. package/dist/objects/materializer-adapter.d.ts +114 -0
  560. package/dist/objects/materializer-adapter.d.ts.map +1 -0
  561. package/dist/objects/object/delete.d.ts +17 -0
  562. package/dist/objects/object/delete.d.ts.map +1 -0
  563. package/dist/objects/object/index.d.ts +4 -0
  564. package/dist/objects/object/index.d.ts.map +1 -0
  565. package/dist/objects/object/upsert-batch.d.ts +7 -0
  566. package/dist/objects/object/upsert-batch.d.ts.map +1 -0
  567. package/dist/objects/object/upsert.d.ts +7 -0
  568. package/dist/objects/object/upsert.d.ts.map +1 -0
  569. package/dist/objects/query/errors.d.ts +23 -0
  570. package/dist/objects/query/errors.d.ts.map +1 -0
  571. package/dist/objects/query/executor.d.ts +63 -0
  572. package/dist/objects/query/executor.d.ts.map +1 -0
  573. package/dist/objects/query/explain-format.d.ts +10 -0
  574. package/dist/objects/query/explain-format.d.ts.map +1 -0
  575. package/dist/objects/query/explain.d.ts +26 -0
  576. package/dist/objects/query/explain.d.ts.map +1 -0
  577. package/dist/objects/query/index.d.ts +14 -0
  578. package/dist/objects/query/index.d.ts.map +1 -0
  579. package/dist/objects/query/index.js +54 -0
  580. package/dist/objects/query/index.js.map +9 -0
  581. package/dist/objects/query/ir.d.ts +166 -0
  582. package/dist/objects/query/ir.d.ts.map +1 -0
  583. package/dist/objects/query/normalize.d.ts +12 -0
  584. package/dist/objects/query/normalize.d.ts.map +1 -0
  585. package/dist/objects/query/planner.d.ts +32 -0
  586. package/dist/objects/query/planner.d.ts.map +1 -0
  587. package/dist/objects/query/scalar-values.d.ts +6 -0
  588. package/dist/objects/query/scalar-values.d.ts.map +1 -0
  589. package/dist/objects/query/validate.d.ts +23 -0
  590. package/dist/objects/query/validate.d.ts.map +1 -0
  591. package/dist/objects/runtime-batch.d.ts +29 -0
  592. package/dist/objects/runtime-batch.d.ts.map +1 -0
  593. package/dist/objects/sdk/index.d.ts +3 -0
  594. package/dist/objects/sdk/index.d.ts.map +1 -0
  595. package/dist/objects/sdk/object-handle.d.ts +6 -0
  596. package/dist/objects/sdk/object-handle.d.ts.map +1 -0
  597. package/dist/objects/sdk/object-set.d.ts +14 -0
  598. package/dist/objects/sdk/object-set.d.ts.map +1 -0
  599. package/dist/objects/sdk/query-builder.d.ts +20 -0
  600. package/dist/objects/sdk/query-builder.d.ts.map +1 -0
  601. package/dist/objects/sdk/query-executor.d.ts +51 -0
  602. package/dist/objects/sdk/query-executor.d.ts.map +1 -0
  603. package/dist/objects/sdk/runtime-query-executor.d.ts +16 -0
  604. package/dist/objects/sdk/runtime-query-executor.d.ts.map +1 -0
  605. package/dist/objects/sdk/telemetry-channel.d.ts +6 -0
  606. package/dist/objects/sdk/telemetry-channel.d.ts.map +1 -0
  607. package/dist/objects/sdk/where.d.ts +15 -0
  608. package/dist/objects/sdk/where.d.ts.map +1 -0
  609. package/dist/objects/service/action-service.d.ts +12 -0
  610. package/dist/objects/service/action-service.d.ts.map +1 -0
  611. package/dist/objects/service/index.d.ts +7 -0
  612. package/dist/objects/service/index.d.ts.map +1 -0
  613. package/dist/objects/service/link-service.d.ts +26 -0
  614. package/dist/objects/service/link-service.d.ts.map +1 -0
  615. package/dist/objects/service/list-service.d.ts +24 -0
  616. package/dist/objects/service/list-service.d.ts.map +1 -0
  617. package/dist/objects/service/object-service.d.ts +12 -0
  618. package/dist/objects/service/object-service.d.ts.map +1 -0
  619. package/dist/objects/service/telemetry-service.d.ts +12 -0
  620. package/dist/objects/service/telemetry-service.d.ts.map +1 -0
  621. package/dist/objects/telemetry/append-batch.d.ts +10 -0
  622. package/dist/objects/telemetry/append-batch.d.ts.map +1 -0
  623. package/dist/objects/telemetry/history.d.ts +8 -0
  624. package/dist/objects/telemetry/history.d.ts.map +1 -0
  625. package/dist/objects/telemetry/index.d.ts +5 -0
  626. package/dist/objects/telemetry/index.d.ts.map +1 -0
  627. package/dist/objects/telemetry/write-batch.d.ts +8 -0
  628. package/dist/objects/telemetry/write-batch.d.ts.map +1 -0
  629. package/dist/ontology/builders.d.ts +323 -0
  630. package/dist/ontology/builders.d.ts.map +1 -0
  631. package/dist/ontology/decimal.d.ts +28 -0
  632. package/dist/ontology/decimal.d.ts.map +1 -0
  633. package/dist/ontology/errors.d.ts +20 -0
  634. package/dist/ontology/errors.d.ts.map +1 -0
  635. package/dist/ontology/index.d.ts +23 -0
  636. package/dist/ontology/index.d.ts.map +1 -0
  637. package/dist/ontology/index.js +120 -0
  638. package/dist/ontology/index.js.map +9 -0
  639. package/dist/ontology/inference/index.d.ts +112 -0
  640. package/dist/ontology/inference/index.d.ts.map +1 -0
  641. package/dist/ontology/internal.d.ts +4 -0
  642. package/dist/ontology/internal.d.ts.map +1 -0
  643. package/dist/ontology/internal.js +118 -0
  644. package/dist/ontology/internal.js.map +10 -0
  645. package/dist/ontology/json-schema.d.ts +9 -0
  646. package/dist/ontology/json-schema.d.ts.map +1 -0
  647. package/dist/ontology/refs.d.ts +16 -0
  648. package/dist/ontology/refs.d.ts.map +1 -0
  649. package/dist/ontology/registry.d.ts +82 -0
  650. package/dist/ontology/registry.d.ts.map +1 -0
  651. package/dist/ontology/tokens.d.ts +54 -0
  652. package/dist/ontology/tokens.d.ts.map +1 -0
  653. package/dist/ontology/types.d.ts +402 -0
  654. package/dist/ontology/types.d.ts.map +1 -0
  655. package/dist/ontology/units/index.d.ts +74 -0
  656. package/dist/ontology/units/index.d.ts.map +1 -0
  657. package/dist/ontology/units/quantitative-types.d.ts +1605 -0
  658. package/dist/ontology/units/quantitative-types.d.ts.map +1 -0
  659. package/dist/ontology/units/types.d.ts +26 -0
  660. package/dist/ontology/units/types.d.ts.map +1 -0
  661. package/dist/ontology/validation/index.d.ts +7 -0
  662. package/dist/ontology/validation/index.d.ts.map +1 -0
  663. package/dist/ontology/validation/links.d.ts +18 -0
  664. package/dist/ontology/validation/links.d.ts.map +1 -0
  665. package/dist/ontology/validation/normalize.d.ts +21 -0
  666. package/dist/ontology/validation/normalize.d.ts.map +1 -0
  667. package/dist/ontology/validation/properties.d.ts +19 -0
  668. package/dist/ontology/validation/properties.d.ts.map +1 -0
  669. package/dist/ontology/validation/query.d.ts +3 -0
  670. package/dist/ontology/validation/query.d.ts.map +1 -0
  671. package/dist/ontology/validation/schema.d.ts +7 -0
  672. package/dist/ontology/validation/schema.d.ts.map +1 -0
  673. package/dist/ontology/validation/telemetry.d.ts +7 -0
  674. package/dist/ontology/validation/telemetry.d.ts.map +1 -0
  675. package/dist/pipelines/builders.d.ts +14 -0
  676. package/dist/pipelines/builders.d.ts.map +1 -0
  677. package/dist/pipelines/errors.d.ts +4 -0
  678. package/dist/pipelines/errors.d.ts.map +1 -0
  679. package/dist/pipelines/index.d.ts +7 -0
  680. package/dist/pipelines/index.d.ts.map +1 -0
  681. package/dist/pipelines/request.d.ts +31 -0
  682. package/dist/pipelines/request.d.ts.map +1 -0
  683. package/dist/pipelines/types.d.ts +84 -0
  684. package/dist/pipelines/types.d.ts.map +1 -0
  685. package/dist/predicates/builders.d.ts +24 -0
  686. package/dist/predicates/builders.d.ts.map +1 -0
  687. package/dist/predicates/evaluate.d.ts +8 -0
  688. package/dist/predicates/evaluate.d.ts.map +1 -0
  689. package/dist/predicates/index.d.ts +5 -0
  690. package/dist/predicates/index.d.ts.map +1 -0
  691. package/dist/predicates/types.d.ts +69 -0
  692. package/dist/predicates/types.d.ts.map +1 -0
  693. package/dist/predicates/validation.d.ts +15 -0
  694. package/dist/predicates/validation.d.ts.map +1 -0
  695. package/dist/projections/builders.d.ts +212 -0
  696. package/dist/projections/builders.d.ts.map +1 -0
  697. package/dist/projections/errors.d.ts +4 -0
  698. package/dist/projections/errors.d.ts.map +1 -0
  699. package/dist/projections/index.d.ts +5 -0
  700. package/dist/projections/index.d.ts.map +1 -0
  701. package/dist/projections/internal.d.ts +24 -0
  702. package/dist/projections/internal.d.ts.map +1 -0
  703. package/dist/projections/internal.js +26 -0
  704. package/dist/projections/internal.js.map +9 -0
  705. package/dist/projections/ownership.d.ts +9 -0
  706. package/dist/projections/ownership.d.ts.map +1 -0
  707. package/dist/projections/registry.d.ts +30 -0
  708. package/dist/projections/registry.d.ts.map +1 -0
  709. package/dist/projections/revision.d.ts +7 -0
  710. package/dist/projections/revision.d.ts.map +1 -0
  711. package/dist/projections/types.d.ts +153 -0
  712. package/dist/projections/types.d.ts.map +1 -0
  713. package/dist/projections/validation.d.ts +97 -0
  714. package/dist/projections/validation.d.ts.map +1 -0
  715. package/dist/provider-scope.d.ts +12 -0
  716. package/dist/provider-scope.d.ts.map +1 -0
  717. package/dist/query.d.ts +17 -0
  718. package/dist/query.d.ts.map +1 -0
  719. package/dist/query.js +21 -0
  720. package/dist/query.js.map +9 -0
  721. package/dist/queues/errors.d.ts +7 -0
  722. package/dist/queues/errors.d.ts.map +1 -0
  723. package/dist/queues/in-memory.d.ts +73 -0
  724. package/dist/queues/in-memory.d.ts.map +1 -0
  725. package/dist/queues/index.d.ts +5 -0
  726. package/dist/queues/index.d.ts.map +1 -0
  727. package/dist/queues/index.js +12 -0
  728. package/dist/queues/index.js.map +9 -0
  729. package/dist/queues/types.d.ts +182 -0
  730. package/dist/queues/types.d.ts.map +1 -0
  731. package/dist/rules/builders.d.ts +10 -0
  732. package/dist/rules/builders.d.ts.map +1 -0
  733. package/dist/rules/dependencies.d.ts +9 -0
  734. package/dist/rules/dependencies.d.ts.map +1 -0
  735. package/dist/rules/errors.d.ts +11 -0
  736. package/dist/rules/errors.d.ts.map +1 -0
  737. package/dist/rules/index.d.ts +6 -0
  738. package/dist/rules/index.d.ts.map +1 -0
  739. package/dist/rules/internal.d.ts +9 -0
  740. package/dist/rules/internal.d.ts.map +1 -0
  741. package/dist/rules/internal.js +10 -0
  742. package/dist/rules/internal.js.map +9 -0
  743. package/dist/rules/types.d.ts +72 -0
  744. package/dist/rules/types.d.ts.map +1 -0
  745. package/dist/rules/validation.d.ts +23 -0
  746. package/dist/rules/validation.d.ts.map +1 -0
  747. package/dist/runtime/create.d.ts +68 -0
  748. package/dist/runtime/create.d.ts.map +1 -0
  749. package/dist/runtime/errors.d.ts +9 -0
  750. package/dist/runtime/errors.d.ts.map +1 -0
  751. package/dist/runtime/index.d.ts +26 -0
  752. package/dist/runtime/index.d.ts.map +1 -0
  753. package/dist/runtime/internal.d.ts +3 -0
  754. package/dist/runtime/internal.d.ts.map +1 -0
  755. package/dist/runtime/internal.js +16 -0
  756. package/dist/runtime/internal.js.map +9 -0
  757. package/dist/runtime/ontology-mutations.d.ts +16 -0
  758. package/dist/runtime/ontology-mutations.d.ts.map +1 -0
  759. package/dist/runtime/scoped.d.ts +158 -0
  760. package/dist/runtime/scoped.d.ts.map +1 -0
  761. package/dist/runtime/sixb.d.ts +226 -0
  762. package/dist/runtime/sixb.d.ts.map +1 -0
  763. package/dist/runtime/storage-readiness.d.ts +20 -0
  764. package/dist/runtime/storage-readiness.d.ts.map +1 -0
  765. package/dist/runtime/types.d.ts +840 -0
  766. package/dist/runtime/types.d.ts.map +1 -0
  767. package/dist/sandboxes/errors.d.ts +20 -0
  768. package/dist/sandboxes/errors.d.ts.map +1 -0
  769. package/dist/sandboxes/exec.d.ts +17 -0
  770. package/dist/sandboxes/exec.d.ts.map +1 -0
  771. package/dist/sandboxes/index.d.ts +5 -0
  772. package/dist/sandboxes/index.d.ts.map +1 -0
  773. package/dist/sandboxes/index.js +18 -0
  774. package/dist/sandboxes/index.js.map +9 -0
  775. package/dist/sandboxes/sandbox.d.ts +110 -0
  776. package/dist/sandboxes/sandbox.d.ts.map +1 -0
  777. package/dist/scheduler/errors.d.ts +7 -0
  778. package/dist/scheduler/errors.d.ts.map +1 -0
  779. package/dist/scheduler/index.d.ts +4 -0
  780. package/dist/scheduler/index.d.ts.map +1 -0
  781. package/dist/scheduler/index.js +18 -0
  782. package/dist/scheduler/index.js.map +9 -0
  783. package/dist/scheduler/runtime.d.ts +32 -0
  784. package/dist/scheduler/runtime.d.ts.map +1 -0
  785. package/dist/schedules/builders.d.ts +4 -0
  786. package/dist/schedules/builders.d.ts.map +1 -0
  787. package/dist/schedules/cron.d.ts +14 -0
  788. package/dist/schedules/cron.d.ts.map +1 -0
  789. package/dist/schedules/errors.d.ts +7 -0
  790. package/dist/schedules/errors.d.ts.map +1 -0
  791. package/dist/schedules/index.d.ts +12 -0
  792. package/dist/schedules/index.d.ts.map +1 -0
  793. package/dist/schedules/index.js +37 -0
  794. package/dist/schedules/index.js.map +9 -0
  795. package/dist/schedules/next-occurrence.d.ts +11 -0
  796. package/dist/schedules/next-occurrence.d.ts.map +1 -0
  797. package/dist/schedules/runtime.d.ts +17 -0
  798. package/dist/schedules/runtime.d.ts.map +1 -0
  799. package/dist/schedules/types.d.ts +99 -0
  800. package/dist/schedules/types.d.ts.map +1 -0
  801. package/dist/schedules/validation.d.ts +13 -0
  802. package/dist/schedules/validation.d.ts.map +1 -0
  803. package/dist/security/applications.d.ts +15 -0
  804. package/dist/security/applications.d.ts.map +1 -0
  805. package/dist/security/builders.d.ts +20 -0
  806. package/dist/security/builders.d.ts.map +1 -0
  807. package/dist/security/errors.d.ts +4 -0
  808. package/dist/security/errors.d.ts.map +1 -0
  809. package/dist/security/every.d.ts +68 -0
  810. package/dist/security/every.d.ts.map +1 -0
  811. package/dist/security/grants.d.ts +40 -0
  812. package/dist/security/grants.d.ts.map +1 -0
  813. package/dist/security/index.d.ts +12 -0
  814. package/dist/security/index.d.ts.map +1 -0
  815. package/dist/security/membership-policies.d.ts +17 -0
  816. package/dist/security/membership-policies.d.ts.map +1 -0
  817. package/dist/security/runtime.d.ts +16 -0
  818. package/dist/security/runtime.d.ts.map +1 -0
  819. package/dist/security/types.d.ts +133 -0
  820. package/dist/security/types.d.ts.map +1 -0
  821. package/dist/security/validation.d.ts +36 -0
  822. package/dist/security/validation.d.ts.map +1 -0
  823. package/dist/storage/action-runs/errors.d.ts +10 -0
  824. package/dist/storage/action-runs/errors.d.ts.map +1 -0
  825. package/dist/storage/action-runs/idempotency.d.ts +10 -0
  826. package/dist/storage/action-runs/idempotency.d.ts.map +1 -0
  827. package/dist/storage/action-runs/in-memory.d.ts +28 -0
  828. package/dist/storage/action-runs/in-memory.d.ts.map +1 -0
  829. package/dist/storage/action-runs/index.d.ts +6 -0
  830. package/dist/storage/action-runs/index.d.ts.map +1 -0
  831. package/dist/storage/action-runs/types.d.ts +138 -0
  832. package/dist/storage/action-runs/types.d.ts.map +1 -0
  833. package/dist/storage/agents/errors.d.ts +11 -0
  834. package/dist/storage/agents/errors.d.ts.map +1 -0
  835. package/dist/storage/agents/in-memory.d.ts +70 -0
  836. package/dist/storage/agents/in-memory.d.ts.map +1 -0
  837. package/dist/storage/agents/index.d.ts +7 -0
  838. package/dist/storage/agents/index.d.ts.map +1 -0
  839. package/dist/storage/agents/types.d.ts +295 -0
  840. package/dist/storage/agents/types.d.ts.map +1 -0
  841. package/dist/storage/auth/errors.d.ts +10 -0
  842. package/dist/storage/auth/errors.d.ts.map +1 -0
  843. package/dist/storage/auth/in-memory/access-tokens.d.ts +32 -0
  844. package/dist/storage/auth/in-memory/access-tokens.d.ts.map +1 -0
  845. package/dist/storage/auth/in-memory/auth-storage.d.ts +36 -0
  846. package/dist/storage/auth/in-memory/auth-storage.d.ts.map +1 -0
  847. package/dist/storage/auth/in-memory/group-memberships.d.ts +21 -0
  848. package/dist/storage/auth/in-memory/group-memberships.d.ts.map +1 -0
  849. package/dist/storage/auth/in-memory/identities.d.ts +17 -0
  850. package/dist/storage/auth/in-memory/identities.d.ts.map +1 -0
  851. package/dist/storage/auth/in-memory/index.d.ts +2 -0
  852. package/dist/storage/auth/in-memory/index.d.ts.map +1 -0
  853. package/dist/storage/auth/in-memory/invitations.d.ts +28 -0
  854. package/dist/storage/auth/in-memory/invitations.d.ts.map +1 -0
  855. package/dist/storage/auth/in-memory/magic-links.d.ts +28 -0
  856. package/dist/storage/auth/in-memory/magic-links.d.ts.map +1 -0
  857. package/dist/storage/auth/in-memory/oidc-attempts.d.ts +18 -0
  858. package/dist/storage/auth/in-memory/oidc-attempts.d.ts.map +1 -0
  859. package/dist/storage/auth/in-memory/service-account-group-memberships.d.ts +17 -0
  860. package/dist/storage/auth/in-memory/service-account-group-memberships.d.ts.map +1 -0
  861. package/dist/storage/auth/in-memory/service-accounts.d.ts +14 -0
  862. package/dist/storage/auth/in-memory/service-accounts.d.ts.map +1 -0
  863. package/dist/storage/auth/in-memory/sessions.d.ts +55 -0
  864. package/dist/storage/auth/in-memory/sessions.d.ts.map +1 -0
  865. package/dist/storage/auth/in-memory/shared.d.ts +71 -0
  866. package/dist/storage/auth/in-memory/shared.d.ts.map +1 -0
  867. package/dist/storage/auth/in-memory/users.d.ts +19 -0
  868. package/dist/storage/auth/in-memory/users.d.ts.map +1 -0
  869. package/dist/storage/auth/in-memory.d.ts +2 -0
  870. package/dist/storage/auth/in-memory.d.ts.map +1 -0
  871. package/dist/storage/auth/index.d.ts +5 -0
  872. package/dist/storage/auth/index.d.ts.map +1 -0
  873. package/dist/storage/auth/types.d.ts +584 -0
  874. package/dist/storage/auth/types.d.ts.map +1 -0
  875. package/dist/storage/errors.d.ts +27 -0
  876. package/dist/storage/errors.d.ts.map +1 -0
  877. package/dist/storage/file-upload-sessions/errors.d.ts +15 -0
  878. package/dist/storage/file-upload-sessions/errors.d.ts.map +1 -0
  879. package/dist/storage/file-upload-sessions/in-memory.d.ts +27 -0
  880. package/dist/storage/file-upload-sessions/in-memory.d.ts.map +1 -0
  881. package/dist/storage/file-upload-sessions/index.d.ts +6 -0
  882. package/dist/storage/file-upload-sessions/index.d.ts.map +1 -0
  883. package/dist/storage/file-upload-sessions/types.d.ts +53 -0
  884. package/dist/storage/file-upload-sessions/types.d.ts.map +1 -0
  885. package/dist/storage/file-upload-sessions/utils.d.ts +11 -0
  886. package/dist/storage/file-upload-sessions/utils.d.ts.map +1 -0
  887. package/dist/storage/in-memory/index.d.ts +105 -0
  888. package/dist/storage/in-memory/index.d.ts.map +1 -0
  889. package/dist/storage/in-memory/testing.d.ts +8 -0
  890. package/dist/storage/in-memory/testing.d.ts.map +1 -0
  891. package/dist/storage/index.d.ts +44 -0
  892. package/dist/storage/index.d.ts.map +1 -0
  893. package/dist/storage/index.js +144 -0
  894. package/dist/storage/index.js.map +9 -0
  895. package/dist/storage/migrations/check-schema.d.ts +19 -0
  896. package/dist/storage/migrations/check-schema.d.ts.map +1 -0
  897. package/dist/storage/migrations/index.d.ts +5 -0
  898. package/dist/storage/migrations/index.d.ts.map +1 -0
  899. package/dist/storage/migrations/migrate-storage.d.ts +6 -0
  900. package/dist/storage/migrations/migrate-storage.d.ts.map +1 -0
  901. package/dist/storage/migrations/migration-set.d.ts +27 -0
  902. package/dist/storage/migrations/migration-set.d.ts.map +1 -0
  903. package/dist/storage/migrations/types.d.ts +115 -0
  904. package/dist/storage/migrations/types.d.ts.map +1 -0
  905. package/dist/storage/objects/in-memory.d.ts +126 -0
  906. package/dist/storage/objects/in-memory.d.ts.map +1 -0
  907. package/dist/storage/objects/index.d.ts +2 -0
  908. package/dist/storage/objects/index.d.ts.map +1 -0
  909. package/dist/storage/objects/types.d.ts +222 -0
  910. package/dist/storage/objects/types.d.ts.map +1 -0
  911. package/dist/storage/ontology/commits.d.ts +117 -0
  912. package/dist/storage/ontology/commits.d.ts.map +1 -0
  913. package/dist/storage/ontology/in-memory/commits.d.ts +12 -0
  914. package/dist/storage/ontology/in-memory/commits.d.ts.map +1 -0
  915. package/dist/storage/ontology/in-memory/index.d.ts +36 -0
  916. package/dist/storage/ontology/in-memory/index.d.ts.map +1 -0
  917. package/dist/storage/ontology/in-memory/materializations-finalization.d.ts +5 -0
  918. package/dist/storage/ontology/in-memory/materializations-finalization.d.ts.map +1 -0
  919. package/dist/storage/ontology/in-memory/materializations-state.d.ts +20 -0
  920. package/dist/storage/ontology/in-memory/materializations-state.d.ts.map +1 -0
  921. package/dist/storage/ontology/in-memory/materializations-work.d.ts +6 -0
  922. package/dist/storage/ontology/in-memory/materializations-work.d.ts.map +1 -0
  923. package/dist/storage/ontology/in-memory/materializations.d.ts +101 -0
  924. package/dist/storage/ontology/in-memory/materializations.d.ts.map +1 -0
  925. package/dist/storage/ontology/in-memory/outbox.d.ts +19 -0
  926. package/dist/storage/ontology/in-memory/outbox.d.ts.map +1 -0
  927. package/dist/storage/ontology/in-memory/shared-state.d.ts +48 -0
  928. package/dist/storage/ontology/in-memory/shared-state.d.ts.map +1 -0
  929. package/dist/storage/ontology/in-memory/sources.d.ts +23 -0
  930. package/dist/storage/ontology/in-memory/sources.d.ts.map +1 -0
  931. package/dist/storage/ontology/in-memory/testing.d.ts +11 -0
  932. package/dist/storage/ontology/in-memory/testing.d.ts.map +1 -0
  933. package/dist/storage/ontology/index.d.ts +16 -0
  934. package/dist/storage/ontology/index.d.ts.map +1 -0
  935. package/dist/storage/ontology/materializations.d.ts +333 -0
  936. package/dist/storage/ontology/materializations.d.ts.map +1 -0
  937. package/dist/storage/ontology/outbox.d.ts +66 -0
  938. package/dist/storage/ontology/outbox.d.ts.map +1 -0
  939. package/dist/storage/ontology/provider-header-validation.d.ts +4 -0
  940. package/dist/storage/ontology/provider-header-validation.d.ts.map +1 -0
  941. package/dist/storage/ontology/provider-validation.d.ts +6 -0
  942. package/dist/storage/ontology/provider-validation.d.ts.map +1 -0
  943. package/dist/storage/ontology/provider-work.d.ts +12 -0
  944. package/dist/storage/ontology/provider-work.d.ts.map +1 -0
  945. package/dist/storage/ontology/provider.d.ts +191 -0
  946. package/dist/storage/ontology/provider.d.ts.map +1 -0
  947. package/dist/storage/ontology/provider.js +115 -0
  948. package/dist/storage/ontology/provider.js.map +9 -0
  949. package/dist/storage/ontology/sources.d.ts +151 -0
  950. package/dist/storage/ontology/sources.d.ts.map +1 -0
  951. package/dist/storage/operation-scope.d.ts +32 -0
  952. package/dist/storage/operation-scope.d.ts.map +1 -0
  953. package/dist/storage/operation-scope.js +22 -0
  954. package/dist/storage/operation-scope.js.map +9 -0
  955. package/dist/storage/pagination.d.ts +11 -0
  956. package/dist/storage/pagination.d.ts.map +1 -0
  957. package/dist/storage/pipeline-runs/errors.d.ts +7 -0
  958. package/dist/storage/pipeline-runs/errors.d.ts.map +1 -0
  959. package/dist/storage/pipeline-runs/in-memory.d.ts +26 -0
  960. package/dist/storage/pipeline-runs/in-memory.d.ts.map +1 -0
  961. package/dist/storage/pipeline-runs/index.d.ts +4 -0
  962. package/dist/storage/pipeline-runs/index.d.ts.map +1 -0
  963. package/dist/storage/pipeline-runs/types.d.ts +133 -0
  964. package/dist/storage/pipeline-runs/types.d.ts.map +1 -0
  965. package/dist/storage/projection-runs/errors.d.ts +9 -0
  966. package/dist/storage/projection-runs/errors.d.ts.map +1 -0
  967. package/dist/storage/projection-runs/in-memory.d.ts +42 -0
  968. package/dist/storage/projection-runs/in-memory.d.ts.map +1 -0
  969. package/dist/storage/projection-runs/index.d.ts +5 -0
  970. package/dist/storage/projection-runs/index.d.ts.map +1 -0
  971. package/dist/storage/projection-runs/lifecycle.d.ts +93 -0
  972. package/dist/storage/projection-runs/lifecycle.d.ts.map +1 -0
  973. package/dist/storage/projection-runs/lifecycle.js +64 -0
  974. package/dist/storage/projection-runs/lifecycle.js.map +9 -0
  975. package/dist/storage/projection-runs/types.d.ts +175 -0
  976. package/dist/storage/projection-runs/types.d.ts.map +1 -0
  977. package/dist/storage/rules/in-memory.d.ts +26 -0
  978. package/dist/storage/rules/in-memory.d.ts.map +1 -0
  979. package/dist/storage/rules/index.d.ts +3 -0
  980. package/dist/storage/rules/index.d.ts.map +1 -0
  981. package/dist/storage/rules/types.d.ts +60 -0
  982. package/dist/storage/rules/types.d.ts.map +1 -0
  983. package/dist/storage/run-listing.d.ts +36 -0
  984. package/dist/storage/run-listing.d.ts.map +1 -0
  985. package/dist/storage/sync-runs/errors.d.ts +8 -0
  986. package/dist/storage/sync-runs/errors.d.ts.map +1 -0
  987. package/dist/storage/sync-runs/in-memory.d.ts +16 -0
  988. package/dist/storage/sync-runs/in-memory.d.ts.map +1 -0
  989. package/dist/storage/sync-runs/index.d.ts +4 -0
  990. package/dist/storage/sync-runs/index.d.ts.map +1 -0
  991. package/dist/storage/sync-runs/types.d.ts +85 -0
  992. package/dist/storage/sync-runs/types.d.ts.map +1 -0
  993. package/dist/storage/timeseries/index.d.ts +2 -0
  994. package/dist/storage/timeseries/index.d.ts.map +1 -0
  995. package/dist/storage/timeseries/store.d.ts +46 -0
  996. package/dist/storage/timeseries/store.d.ts.map +1 -0
  997. package/dist/storage/timeseries/types.d.ts +50 -0
  998. package/dist/storage/timeseries/types.d.ts.map +1 -0
  999. package/dist/storage/transaction.d.ts +4 -0
  1000. package/dist/storage/transaction.d.ts.map +1 -0
  1001. package/dist/storage/types.d.ts +78 -0
  1002. package/dist/storage/types.d.ts.map +1 -0
  1003. package/dist/storage/webhook-deliveries/in-memory.d.ts +18 -0
  1004. package/dist/storage/webhook-deliveries/in-memory.d.ts.map +1 -0
  1005. package/dist/storage/webhook-deliveries/index.d.ts +3 -0
  1006. package/dist/storage/webhook-deliveries/index.d.ts.map +1 -0
  1007. package/dist/storage/webhook-deliveries/types.d.ts +43 -0
  1008. package/dist/storage/webhook-deliveries/types.d.ts.map +1 -0
  1009. package/dist/storage/webhook-runs/errors.d.ts +7 -0
  1010. package/dist/storage/webhook-runs/errors.d.ts.map +1 -0
  1011. package/dist/storage/webhook-runs/in-memory.d.ts +16 -0
  1012. package/dist/storage/webhook-runs/in-memory.d.ts.map +1 -0
  1013. package/dist/storage/webhook-runs/index.d.ts +4 -0
  1014. package/dist/storage/webhook-runs/index.d.ts.map +1 -0
  1015. package/dist/storage/webhook-runs/types.d.ts +66 -0
  1016. package/dist/storage/webhook-runs/types.d.ts.map +1 -0
  1017. package/dist/storage/workflow-interventions/errors.d.ts +7 -0
  1018. package/dist/storage/workflow-interventions/errors.d.ts.map +1 -0
  1019. package/dist/storage/workflow-interventions/in-memory.d.ts +18 -0
  1020. package/dist/storage/workflow-interventions/in-memory.d.ts.map +1 -0
  1021. package/dist/storage/workflow-interventions/index.d.ts +4 -0
  1022. package/dist/storage/workflow-interventions/index.d.ts.map +1 -0
  1023. package/dist/storage/workflow-interventions/types.d.ts +94 -0
  1024. package/dist/storage/workflow-interventions/types.d.ts.map +1 -0
  1025. package/dist/storage/workflow-runs/errors.d.ts +7 -0
  1026. package/dist/storage/workflow-runs/errors.d.ts.map +1 -0
  1027. package/dist/storage/workflow-runs/in-memory.d.ts +83 -0
  1028. package/dist/storage/workflow-runs/in-memory.d.ts.map +1 -0
  1029. package/dist/storage/workflow-runs/index.d.ts +4 -0
  1030. package/dist/storage/workflow-runs/index.d.ts.map +1 -0
  1031. package/dist/storage/workflow-runs/types.d.ts +305 -0
  1032. package/dist/storage/workflow-runs/types.d.ts.map +1 -0
  1033. package/dist/syncs/builders.d.ts +9 -0
  1034. package/dist/syncs/builders.d.ts.map +1 -0
  1035. package/dist/syncs/errors.d.ts +4 -0
  1036. package/dist/syncs/errors.d.ts.map +1 -0
  1037. package/dist/syncs/index.d.ts +7 -0
  1038. package/dist/syncs/index.d.ts.map +1 -0
  1039. package/dist/syncs/request.d.ts +41 -0
  1040. package/dist/syncs/request.d.ts.map +1 -0
  1041. package/dist/syncs/types.d.ts +76 -0
  1042. package/dist/syncs/types.d.ts.map +1 -0
  1043. package/dist/testing/agent-storage-contract.d.ts +16 -0
  1044. package/dist/testing/agent-storage-contract.d.ts.map +1 -0
  1045. package/dist/testing/auth-storage-contract.d.ts +16 -0
  1046. package/dist/testing/auth-storage-contract.d.ts.map +1 -0
  1047. package/dist/testing/blob-storage-contract.d.ts +10 -0
  1048. package/dist/testing/blob-storage-contract.d.ts.map +1 -0
  1049. package/dist/testing/broker-contract.d.ts +39 -0
  1050. package/dist/testing/broker-contract.d.ts.map +1 -0
  1051. package/dist/testing/effective-storage-contract.d.ts +7 -0
  1052. package/dist/testing/effective-storage-contract.d.ts.map +1 -0
  1053. package/dist/testing/index.d.ts +15 -0
  1054. package/dist/testing/index.d.ts.map +1 -0
  1055. package/dist/testing/index.js +7000 -0
  1056. package/dist/testing/index.js.map +24 -0
  1057. package/dist/testing/lake-storage-contract.d.ts +29 -0
  1058. package/dist/testing/lake-storage-contract.d.ts.map +1 -0
  1059. package/dist/testing/materialization-failure-contract.d.ts +26 -0
  1060. package/dist/testing/materialization-failure-contract.d.ts.map +1 -0
  1061. package/dist/testing/materializer-fixture.d.ts +35 -0
  1062. package/dist/testing/materializer-fixture.d.ts.map +1 -0
  1063. package/dist/testing/materializer-storage-contract.d.ts +7 -0
  1064. package/dist/testing/materializer-storage-contract.d.ts.map +1 -0
  1065. package/dist/testing/object-query-contract.d.ts +21 -0
  1066. package/dist/testing/object-query-contract.d.ts.map +1 -0
  1067. package/dist/testing/ontology-contract-fixture.d.ts +33 -0
  1068. package/dist/testing/ontology-contract-fixture.d.ts.map +1 -0
  1069. package/dist/testing/ontology-storage-contract.d.ts +21 -0
  1070. package/dist/testing/ontology-storage-contract.d.ts.map +1 -0
  1071. package/dist/testing/projection-run-storage-contract.d.ts +10 -0
  1072. package/dist/testing/projection-run-storage-contract.d.ts.map +1 -0
  1073. package/dist/testing/queues-contract.d.ts +31 -0
  1074. package/dist/testing/queues-contract.d.ts.map +1 -0
  1075. package/dist/testing/sandboxes-contract.d.ts +31 -0
  1076. package/dist/testing/sandboxes-contract.d.ts.map +1 -0
  1077. package/dist/tsconfig.json +5 -0
  1078. package/dist/webhooks/builders.d.ts +41 -0
  1079. package/dist/webhooks/builders.d.ts.map +1 -0
  1080. package/dist/webhooks/connector.d.ts +10 -0
  1081. package/dist/webhooks/connector.d.ts.map +1 -0
  1082. package/dist/webhooks/errors.d.ts +4 -0
  1083. package/dist/webhooks/errors.d.ts.map +1 -0
  1084. package/dist/webhooks/index.d.ts +9 -0
  1085. package/dist/webhooks/index.d.ts.map +1 -0
  1086. package/dist/webhooks/registry.d.ts +7 -0
  1087. package/dist/webhooks/registry.d.ts.map +1 -0
  1088. package/dist/webhooks/types.d.ts +79 -0
  1089. package/dist/webhooks/types.d.ts.map +1 -0
  1090. package/dist/webhooks/unverified.d.ts +57 -0
  1091. package/dist/webhooks/unverified.d.ts.map +1 -0
  1092. package/dist/workers/errors.d.ts +17 -0
  1093. package/dist/workers/errors.d.ts.map +1 -0
  1094. package/dist/workers/index.d.ts +7 -0
  1095. package/dist/workers/index.d.ts.map +1 -0
  1096. package/dist/workers/index.js +506 -0
  1097. package/dist/workers/index.js.map +13 -0
  1098. package/dist/workers/queue-delivery.d.ts +38 -0
  1099. package/dist/workers/queue-delivery.d.ts.map +1 -0
  1100. package/dist/workers/queue-worker.d.ts +30 -0
  1101. package/dist/workers/queue-worker.d.ts.map +1 -0
  1102. package/dist/workers/worker.d.ts +14 -0
  1103. package/dist/workers/worker.d.ts.map +1 -0
  1104. package/dist/workflows/builders.d.ts +27 -0
  1105. package/dist/workflows/builders.d.ts.map +1 -0
  1106. package/dist/workflows/errors.d.ts +11 -0
  1107. package/dist/workflows/errors.d.ts.map +1 -0
  1108. package/dist/workflows/index.d.ts +9 -0
  1109. package/dist/workflows/index.d.ts.map +1 -0
  1110. package/dist/workflows/index.js +108 -0
  1111. package/dist/workflows/index.js.map +9 -0
  1112. package/dist/workflows/request.d.ts +29 -0
  1113. package/dist/workflows/request.d.ts.map +1 -0
  1114. package/dist/workflows/runtime.d.ts +33 -0
  1115. package/dist/workflows/runtime.d.ts.map +1 -0
  1116. package/dist/workflows/snapshot.d.ts +55 -0
  1117. package/dist/workflows/snapshot.d.ts.map +1 -0
  1118. package/dist/workflows/types.d.ts +288 -0
  1119. package/dist/workflows/types.d.ts.map +1 -0
  1120. package/dist/workflows/validation.d.ts +66 -0
  1121. package/dist/workflows/validation.d.ts.map +1 -0
  1122. package/package.json +312 -0
  1123. package/src/actions/builders/define-action.ts +243 -0
  1124. package/src/actions/builders/params.ts +48 -0
  1125. package/src/actions/builders.ts +2 -0
  1126. package/src/actions/commit-edits.ts +110 -0
  1127. package/src/actions/errors.ts +15 -0
  1128. package/src/actions/index.ts +75 -0
  1129. package/src/actions/read-facade.ts +224 -0
  1130. package/src/actions/registry.ts +135 -0
  1131. package/src/actions/request.ts +407 -0
  1132. package/src/actions/run-id.ts +17 -0
  1133. package/src/actions/runtime.ts +31 -0
  1134. package/src/actions/types/context.ts +224 -0
  1135. package/src/actions/types/definitions.ts +181 -0
  1136. package/src/actions/types/handlers.ts +68 -0
  1137. package/src/actions/types/params.ts +82 -0
  1138. package/src/actions/types.ts +4 -0
  1139. package/src/actions/validation.ts +186 -0
  1140. package/src/actions/validators.ts +56 -0
  1141. package/src/actions/worker.ts +2 -0
  1142. package/src/agents/adapters.ts +647 -0
  1143. package/src/agents/api-gateway.ts +57 -0
  1144. package/src/agents/builders.ts +46 -0
  1145. package/src/agents/context-model.ts +41 -0
  1146. package/src/agents/context-resolution.ts +43 -0
  1147. package/src/agents/context.ts +185 -0
  1148. package/src/agents/dispatch.ts +107 -0
  1149. package/src/agents/errors.ts +40 -0
  1150. package/src/agents/ids.ts +24 -0
  1151. package/src/agents/index.ts +122 -0
  1152. package/src/agents/message.ts +91 -0
  1153. package/src/agents/prompt.ts +45 -0
  1154. package/src/agents/request.ts +198 -0
  1155. package/src/agents/runtime.ts +124 -0
  1156. package/src/agents/streams.ts +194 -0
  1157. package/src/agents/types.ts +70 -0
  1158. package/src/agents/validation.ts +151 -0
  1159. package/src/auth/access-tokens.ts +125 -0
  1160. package/src/auth/audience.ts +28 -0
  1161. package/src/auth/cookies.ts +263 -0
  1162. package/src/auth/csrf.ts +41 -0
  1163. package/src/auth/errors.ts +19 -0
  1164. package/src/auth/index.ts +149 -0
  1165. package/src/auth/runtime.ts +1642 -0
  1166. package/src/auth/session-cache.ts +112 -0
  1167. package/src/auth/sessions.ts +55 -0
  1168. package/src/auth/strategy.ts +46 -0
  1169. package/src/auth/types.ts +573 -0
  1170. package/src/auth/validation.ts +241 -0
  1171. package/src/authorization/application-access.ts +34 -0
  1172. package/src/authorization/decision.ts +215 -0
  1173. package/src/authorization/errors.ts +12 -0
  1174. package/src/authorization/event-visibility.ts +99 -0
  1175. package/src/authorization/grant-kinds.ts +149 -0
  1176. package/src/authorization/index.ts +24 -0
  1177. package/src/authorization/resolve.ts +101 -0
  1178. package/src/authorization/run-visibility.ts +78 -0
  1179. package/src/authorization/types.ts +52 -0
  1180. package/src/blob-storage/browser.ts +28 -0
  1181. package/src/blob-storage/constants.ts +9 -0
  1182. package/src/blob-storage/derive.ts +13 -0
  1183. package/src/blob-storage/errors.ts +6 -0
  1184. package/src/blob-storage/in-memory.ts +74 -0
  1185. package/src/blob-storage/index.ts +37 -0
  1186. package/src/blob-storage/types.ts +143 -0
  1187. package/src/blob-storage/utils.ts +126 -0
  1188. package/src/blob-storage/validation.ts +58 -0
  1189. package/src/bootstrap/discovery.ts +507 -0
  1190. package/src/bootstrap/index.ts +26 -0
  1191. package/src/bootstrap/ontology-type-manifest.ts +316 -0
  1192. package/src/broker/errors.ts +15 -0
  1193. package/src/broker/in-memory.ts +511 -0
  1194. package/src/broker/index.ts +12 -0
  1195. package/src/broker/types.ts +129 -0
  1196. package/src/connectors/builders.ts +33 -0
  1197. package/src/connectors/errors.ts +15 -0
  1198. package/src/connectors/index.ts +9 -0
  1199. package/src/connectors/runtime.ts +100 -0
  1200. package/src/connectors/types.ts +64 -0
  1201. package/src/datasets/builders.ts +233 -0
  1202. package/src/datasets/errors.ts +3 -0
  1203. package/src/datasets/index.ts +13 -0
  1204. package/src/datasets/types.ts +52 -0
  1205. package/src/datasets/validation.ts +251 -0
  1206. package/src/edits/errors.ts +6 -0
  1207. package/src/edits/index.ts +24 -0
  1208. package/src/edits/normalize.ts +87 -0
  1209. package/src/edits/properties.ts +153 -0
  1210. package/src/edits/recorder.ts +312 -0
  1211. package/src/edits/types.ts +275 -0
  1212. package/src/error-reporting/capability.ts +160 -0
  1213. package/src/error-reporting/internal.ts +13 -0
  1214. package/src/error-reporting/normalize.ts +35 -0
  1215. package/src/error-reporting/reporter.ts +65 -0
  1216. package/src/error-reporting/types.ts +125 -0
  1217. package/src/events/definitions.ts +241 -0
  1218. package/src/events/envelope.ts +68 -0
  1219. package/src/events/errors.ts +7 -0
  1220. package/src/events/index.ts +167 -0
  1221. package/src/events/outbox-dispatcher.ts +534 -0
  1222. package/src/events/property-changes.ts +9 -0
  1223. package/src/events/runtime.ts +401 -0
  1224. package/src/events/scope.ts +71 -0
  1225. package/src/events/selectors/builder.ts +531 -0
  1226. package/src/events/selectors/index.ts +42 -0
  1227. package/src/events/selectors/predicate.ts +91 -0
  1228. package/src/events/selectors/types.ts +258 -0
  1229. package/src/events/toStoredEvent.ts +35 -0
  1230. package/src/events/types/actions.ts +42 -0
  1231. package/src/events/types/datasets.ts +21 -0
  1232. package/src/events/types/index.ts +206 -0
  1233. package/src/events/types/links.ts +42 -0
  1234. package/src/events/types/objects.ts +38 -0
  1235. package/src/events/types/pipelines.ts +67 -0
  1236. package/src/events/types/rules.ts +31 -0
  1237. package/src/events/types/schedules.ts +15 -0
  1238. package/src/events/types/syncs.ts +27 -0
  1239. package/src/events/types/telemetry.ts +19 -0
  1240. package/src/events/types/workflows.ts +172 -0
  1241. package/src/http/api-routes.ts +384 -0
  1242. package/src/http/index.ts +3 -0
  1243. package/src/http/route-pattern.ts +37 -0
  1244. package/src/index.ts +916 -0
  1245. package/src/json.ts +137 -0
  1246. package/src/lake-storage/definition-updates.ts +263 -0
  1247. package/src/lake-storage/errors.ts +6 -0
  1248. package/src/lake-storage/in-memory.ts +348 -0
  1249. package/src/lake-storage/index.ts +48 -0
  1250. package/src/lake-storage/sql-transforms.ts +67 -0
  1251. package/src/lake-storage/types.ts +135 -0
  1252. package/src/logging/console-logger.ts +63 -0
  1253. package/src/logging/index.ts +43 -0
  1254. package/src/logging/record.ts +126 -0
  1255. package/src/logging/run-logger.ts +350 -0
  1256. package/src/logging/runtime.ts +341 -0
  1257. package/src/logging/stream.ts +38 -0
  1258. package/src/logging/types.ts +156 -0
  1259. package/src/maintenance/index.ts +9 -0
  1260. package/src/maintenance/ontology-maintenance.ts +351 -0
  1261. package/src/maintenance/types.ts +57 -0
  1262. package/src/materialization/dataset-watermark.ts +52 -0
  1263. package/src/materialization/errors.ts +73 -0
  1264. package/src/materialization/events.ts +92 -0
  1265. package/src/materialization/identity.ts +36 -0
  1266. package/src/materialization/index.ts +75 -0
  1267. package/src/materialization/model.ts +394 -0
  1268. package/src/materialization/refs.ts +134 -0
  1269. package/src/materializer/README.md +130 -0
  1270. package/src/materializer/context.ts +75 -0
  1271. package/src/materializer/edits/apply.ts +241 -0
  1272. package/src/materializer/edits/commit.ts +311 -0
  1273. package/src/materializer/edits/execution-units.ts +32 -0
  1274. package/src/materializer/edits/load-state.ts +148 -0
  1275. package/src/materializer/edits/operations.ts +298 -0
  1276. package/src/materializer/edits/plan.ts +192 -0
  1277. package/src/materializer/edits/read-set.ts +79 -0
  1278. package/src/materializer/edits/working-state.ts +171 -0
  1279. package/src/materializer/effective/build-events.ts +197 -0
  1280. package/src/materializer/effective/diff.ts +169 -0
  1281. package/src/materializer/effective/load-state.ts +75 -0
  1282. package/src/materializer/effective/resolve.ts +96 -0
  1283. package/src/materializer/effective/validate.ts +180 -0
  1284. package/src/materializer/execution/commit-lifecycle.ts +57 -0
  1285. package/src/materializer/execution/plan-stream.ts +97 -0
  1286. package/src/materializer/execution/run-correlation.ts +73 -0
  1287. package/src/materializer/execution/work-executor.ts +143 -0
  1288. package/src/materializer/execution/work-records.ts +186 -0
  1289. package/src/materializer/index.ts +109 -0
  1290. package/src/materializer/materializer.ts +64 -0
  1291. package/src/materializer/projections/entry-validator.ts +162 -0
  1292. package/src/materializer/projections/finish-run.ts +194 -0
  1293. package/src/materializer/projections/replace.ts +447 -0
  1294. package/src/materializer/projections/replacement-plan.ts +376 -0
  1295. package/src/materializer/projections/source-materialization.ts +99 -0
  1296. package/src/materializer/shared/abort.ts +7 -0
  1297. package/src/materializer/shared/batching.ts +32 -0
  1298. package/src/materializer/shared/chunking.ts +27 -0
  1299. package/src/materializer/shared/identity.ts +141 -0
  1300. package/src/materializer/shared/normalize.ts +527 -0
  1301. package/src/materializer/shared/projection-run.ts +61 -0
  1302. package/src/materializer/telemetry/append.ts +503 -0
  1303. package/src/materializer/telemetry/plan.ts +363 -0
  1304. package/src/objects/action/errors.ts +56 -0
  1305. package/src/objects/action/index.ts +3 -0
  1306. package/src/objects/action/request.ts +63 -0
  1307. package/src/objects/context/index.ts +6 -0
  1308. package/src/objects/context/resolve.ts +51 -0
  1309. package/src/objects/context/types.ts +31 -0
  1310. package/src/objects/contexts.ts +64 -0
  1311. package/src/objects/errors.ts +7 -0
  1312. package/src/objects/helpers.ts +18 -0
  1313. package/src/objects/index.ts +26 -0
  1314. package/src/objects/link/authorization.ts +26 -0
  1315. package/src/objects/link/endpoints.ts +66 -0
  1316. package/src/objects/link/index.ts +3 -0
  1317. package/src/objects/link/remove.ts +42 -0
  1318. package/src/objects/link/upsert-batch.ts +80 -0
  1319. package/src/objects/link/upsert.ts +56 -0
  1320. package/src/objects/materializer-adapter.ts +307 -0
  1321. package/src/objects/object/delete.ts +47 -0
  1322. package/src/objects/object/index.ts +3 -0
  1323. package/src/objects/object/upsert-batch.ts +57 -0
  1324. package/src/objects/object/upsert.ts +38 -0
  1325. package/src/objects/query/errors.ts +55 -0
  1326. package/src/objects/query/executor.ts +1345 -0
  1327. package/src/objects/query/explain-format.ts +34 -0
  1328. package/src/objects/query/explain.ts +215 -0
  1329. package/src/objects/query/index.ts +77 -0
  1330. package/src/objects/query/ir.ts +211 -0
  1331. package/src/objects/query/normalize.ts +245 -0
  1332. package/src/objects/query/planner.ts +538 -0
  1333. package/src/objects/query/scalar-values.ts +100 -0
  1334. package/src/objects/query/validate.ts +1276 -0
  1335. package/src/objects/runtime-batch.ts +105 -0
  1336. package/src/objects/sdk/index.ts +2 -0
  1337. package/src/objects/sdk/object-handle.ts +139 -0
  1338. package/src/objects/sdk/object-set.ts +224 -0
  1339. package/src/objects/sdk/query-builder.ts +386 -0
  1340. package/src/objects/sdk/query-executor.ts +62 -0
  1341. package/src/objects/sdk/runtime-query-executor.ts +88 -0
  1342. package/src/objects/sdk/telemetry-channel.ts +81 -0
  1343. package/src/objects/sdk/where.ts +87 -0
  1344. package/src/objects/service/action-service.ts +40 -0
  1345. package/src/objects/service/index.ts +6 -0
  1346. package/src/objects/service/link-service.ts +74 -0
  1347. package/src/objects/service/list-service.ts +89 -0
  1348. package/src/objects/service/object-service.ts +28 -0
  1349. package/src/objects/service/telemetry-service.ts +17 -0
  1350. package/src/objects/telemetry/append-batch.ts +74 -0
  1351. package/src/objects/telemetry/history.ts +32 -0
  1352. package/src/objects/telemetry/index.ts +4 -0
  1353. package/src/objects/telemetry/write-batch.ts +52 -0
  1354. package/src/ontology/builders.ts +695 -0
  1355. package/src/ontology/decimal.ts +120 -0
  1356. package/src/ontology/errors.ts +25 -0
  1357. package/src/ontology/index.ts +80 -0
  1358. package/src/ontology/inference/index.ts +215 -0
  1359. package/src/ontology/internal.ts +3 -0
  1360. package/src/ontology/json-schema.ts +123 -0
  1361. package/src/ontology/refs.ts +80 -0
  1362. package/src/ontology/registry.ts +417 -0
  1363. package/src/ontology/tokens.ts +113 -0
  1364. package/src/ontology/types.ts +436 -0
  1365. package/src/ontology/units/index.ts +115 -0
  1366. package/src/ontology/units/quantitative-types.ts +608 -0
  1367. package/src/ontology/units/types.ts +27 -0
  1368. package/src/ontology/validation/index.ts +36 -0
  1369. package/src/ontology/validation/links.ts +126 -0
  1370. package/src/ontology/validation/normalize.ts +215 -0
  1371. package/src/ontology/validation/properties.ts +235 -0
  1372. package/src/ontology/validation/query.ts +300 -0
  1373. package/src/ontology/validation/schema.ts +174 -0
  1374. package/src/ontology/validation/telemetry.ts +53 -0
  1375. package/src/pipelines/builders.ts +155 -0
  1376. package/src/pipelines/errors.ts +3 -0
  1377. package/src/pipelines/index.ts +26 -0
  1378. package/src/pipelines/request.ts +71 -0
  1379. package/src/pipelines/types.ts +199 -0
  1380. package/src/predicates/builders.ts +152 -0
  1381. package/src/predicates/evaluate.ts +107 -0
  1382. package/src/predicates/index.ts +28 -0
  1383. package/src/predicates/types.ts +124 -0
  1384. package/src/predicates/validation.ts +152 -0
  1385. package/src/projections/builders.ts +770 -0
  1386. package/src/projections/errors.ts +3 -0
  1387. package/src/projections/index.ts +32 -0
  1388. package/src/projections/internal.ts +75 -0
  1389. package/src/projections/ownership.ts +134 -0
  1390. package/src/projections/registry.ts +269 -0
  1391. package/src/projections/revision.ts +245 -0
  1392. package/src/projections/types.ts +165 -0
  1393. package/src/projections/validation.ts +531 -0
  1394. package/src/provider-scope.ts +11 -0
  1395. package/src/query.ts +75 -0
  1396. package/src/queues/errors.ts +6 -0
  1397. package/src/queues/in-memory.ts +364 -0
  1398. package/src/queues/index.ts +23 -0
  1399. package/src/queues/types.ts +230 -0
  1400. package/src/rules/builders.ts +126 -0
  1401. package/src/rules/dependencies.ts +76 -0
  1402. package/src/rules/errors.ts +11 -0
  1403. package/src/rules/index.ts +30 -0
  1404. package/src/rules/internal.ts +8 -0
  1405. package/src/rules/types.ts +113 -0
  1406. package/src/rules/validation.ts +153 -0
  1407. package/src/runtime/create.ts +163 -0
  1408. package/src/runtime/errors.ts +8 -0
  1409. package/src/runtime/index.ts +67 -0
  1410. package/src/runtime/internal.ts +7 -0
  1411. package/src/runtime/ontology-mutations.ts +90 -0
  1412. package/src/runtime/scoped.ts +436 -0
  1413. package/src/runtime/sixb.ts +822 -0
  1414. package/src/runtime/storage-readiness.ts +91 -0
  1415. package/src/runtime/types.ts +1401 -0
  1416. package/src/sandboxes/errors.ts +22 -0
  1417. package/src/sandboxes/exec.ts +102 -0
  1418. package/src/sandboxes/index.ts +19 -0
  1419. package/src/sandboxes/sandbox.ts +124 -0
  1420. package/src/scheduler/errors.ts +7 -0
  1421. package/src/scheduler/index.ts +3 -0
  1422. package/src/scheduler/runtime.ts +174 -0
  1423. package/src/schedules/builders.ts +257 -0
  1424. package/src/schedules/cron.ts +166 -0
  1425. package/src/schedules/errors.ts +7 -0
  1426. package/src/schedules/index.ts +44 -0
  1427. package/src/schedules/next-occurrence.ts +217 -0
  1428. package/src/schedules/runtime.ts +241 -0
  1429. package/src/schedules/types.ts +212 -0
  1430. package/src/schedules/validation.ts +398 -0
  1431. package/src/security/applications.ts +11 -0
  1432. package/src/security/builders.ts +128 -0
  1433. package/src/security/errors.ts +3 -0
  1434. package/src/security/every.ts +108 -0
  1435. package/src/security/grants.ts +215 -0
  1436. package/src/security/index.ts +51 -0
  1437. package/src/security/membership-policies.ts +101 -0
  1438. package/src/security/runtime.ts +101 -0
  1439. package/src/security/types.ts +156 -0
  1440. package/src/security/validation.ts +430 -0
  1441. package/src/storage/action-runs/errors.ts +13 -0
  1442. package/src/storage/action-runs/idempotency.ts +68 -0
  1443. package/src/storage/action-runs/in-memory.ts +420 -0
  1444. package/src/storage/action-runs/index.ts +31 -0
  1445. package/src/storage/action-runs/types.ts +169 -0
  1446. package/src/storage/agents/errors.ts +22 -0
  1447. package/src/storage/agents/in-memory.ts +498 -0
  1448. package/src/storage/agents/index.ts +42 -0
  1449. package/src/storage/agents/types.ts +348 -0
  1450. package/src/storage/auth/errors.ts +40 -0
  1451. package/src/storage/auth/in-memory/access-tokens.ts +123 -0
  1452. package/src/storage/auth/in-memory/auth-storage.ts +559 -0
  1453. package/src/storage/auth/in-memory/group-memberships.ts +46 -0
  1454. package/src/storage/auth/in-memory/identities.ts +66 -0
  1455. package/src/storage/auth/in-memory/index.ts +1 -0
  1456. package/src/storage/auth/in-memory/invitations.ts +165 -0
  1457. package/src/storage/auth/in-memory/magic-links.ts +98 -0
  1458. package/src/storage/auth/in-memory/oidc-attempts.ts +75 -0
  1459. package/src/storage/auth/in-memory/service-account-group-memberships.ts +102 -0
  1460. package/src/storage/auth/in-memory/service-accounts.ts +80 -0
  1461. package/src/storage/auth/in-memory/sessions.ts +177 -0
  1462. package/src/storage/auth/in-memory/shared.ts +602 -0
  1463. package/src/storage/auth/in-memory/users.ts +139 -0
  1464. package/src/storage/auth/in-memory.ts +1 -0
  1465. package/src/storage/auth/index.ts +58 -0
  1466. package/src/storage/auth/types.ts +639 -0
  1467. package/src/storage/errors.ts +45 -0
  1468. package/src/storage/file-upload-sessions/errors.ts +24 -0
  1469. package/src/storage/file-upload-sessions/in-memory.ts +161 -0
  1470. package/src/storage/file-upload-sessions/index.ts +19 -0
  1471. package/src/storage/file-upload-sessions/types.ts +61 -0
  1472. package/src/storage/file-upload-sessions/utils.ts +49 -0
  1473. package/src/storage/in-memory/index.ts +297 -0
  1474. package/src/storage/in-memory/testing.ts +21 -0
  1475. package/src/storage/index.ts +489 -0
  1476. package/src/storage/migrations/check-schema.ts +49 -0
  1477. package/src/storage/migrations/index.ts +23 -0
  1478. package/src/storage/migrations/migrate-storage.ts +24 -0
  1479. package/src/storage/migrations/migration-set.ts +270 -0
  1480. package/src/storage/migrations/types.ts +129 -0
  1481. package/src/storage/objects/in-memory.ts +1154 -0
  1482. package/src/storage/objects/index.ts +24 -0
  1483. package/src/storage/objects/types.ts +244 -0
  1484. package/src/storage/ontology/commits.ts +132 -0
  1485. package/src/storage/ontology/in-memory/commits.ts +122 -0
  1486. package/src/storage/ontology/in-memory/index.ts +94 -0
  1487. package/src/storage/ontology/in-memory/materializations-finalization.ts +484 -0
  1488. package/src/storage/ontology/in-memory/materializations-state.ts +183 -0
  1489. package/src/storage/ontology/in-memory/materializations-work.ts +62 -0
  1490. package/src/storage/ontology/in-memory/materializations.ts +1192 -0
  1491. package/src/storage/ontology/in-memory/outbox.ts +227 -0
  1492. package/src/storage/ontology/in-memory/shared-state.ts +161 -0
  1493. package/src/storage/ontology/in-memory/sources.ts +566 -0
  1494. package/src/storage/ontology/in-memory/testing.ts +29 -0
  1495. package/src/storage/ontology/index.ts +119 -0
  1496. package/src/storage/ontology/materializations.ts +414 -0
  1497. package/src/storage/ontology/outbox.ts +79 -0
  1498. package/src/storage/ontology/provider-header-validation.ts +173 -0
  1499. package/src/storage/ontology/provider-validation.ts +36 -0
  1500. package/src/storage/ontology/provider-work.ts +330 -0
  1501. package/src/storage/ontology/provider.ts +852 -0
  1502. package/src/storage/ontology/sources.ts +195 -0
  1503. package/src/storage/operation-scope.ts +248 -0
  1504. package/src/storage/pagination.ts +23 -0
  1505. package/src/storage/pipeline-runs/errors.ts +6 -0
  1506. package/src/storage/pipeline-runs/in-memory.ts +307 -0
  1507. package/src/storage/pipeline-runs/index.ts +19 -0
  1508. package/src/storage/pipeline-runs/types.ts +148 -0
  1509. package/src/storage/projection-runs/errors.ts +15 -0
  1510. package/src/storage/projection-runs/in-memory.ts +321 -0
  1511. package/src/storage/projection-runs/index.ts +36 -0
  1512. package/src/storage/projection-runs/lifecycle.ts +793 -0
  1513. package/src/storage/projection-runs/types.ts +254 -0
  1514. package/src/storage/rules/in-memory.ts +191 -0
  1515. package/src/storage/rules/index.ts +12 -0
  1516. package/src/storage/rules/types.ts +80 -0
  1517. package/src/storage/run-listing.ts +107 -0
  1518. package/src/storage/sync-runs/errors.ts +7 -0
  1519. package/src/storage/sync-runs/in-memory.ts +181 -0
  1520. package/src/storage/sync-runs/index.ts +14 -0
  1521. package/src/storage/sync-runs/types.ts +93 -0
  1522. package/src/storage/timeseries/index.ts +7 -0
  1523. package/src/storage/timeseries/store.ts +214 -0
  1524. package/src/storage/timeseries/types.ts +57 -0
  1525. package/src/storage/transaction.ts +56 -0
  1526. package/src/storage/types.ts +299 -0
  1527. package/src/storage/webhook-deliveries/in-memory.ts +108 -0
  1528. package/src/storage/webhook-deliveries/index.ts +9 -0
  1529. package/src/storage/webhook-deliveries/types.ts +41 -0
  1530. package/src/storage/webhook-runs/errors.ts +6 -0
  1531. package/src/storage/webhook-runs/in-memory.ts +131 -0
  1532. package/src/storage/webhook-runs/index.ts +12 -0
  1533. package/src/storage/webhook-runs/types.ts +69 -0
  1534. package/src/storage/workflow-interventions/errors.ts +6 -0
  1535. package/src/storage/workflow-interventions/in-memory.ts +192 -0
  1536. package/src/storage/workflow-interventions/index.ts +14 -0
  1537. package/src/storage/workflow-interventions/types.ts +100 -0
  1538. package/src/storage/workflow-runs/errors.ts +6 -0
  1539. package/src/storage/workflow-runs/in-memory.ts +777 -0
  1540. package/src/storage/workflow-runs/index.ts +45 -0
  1541. package/src/storage/workflow-runs/types.ts +344 -0
  1542. package/src/syncs/builders.ts +101 -0
  1543. package/src/syncs/errors.ts +3 -0
  1544. package/src/syncs/index.ts +22 -0
  1545. package/src/syncs/request.ts +91 -0
  1546. package/src/syncs/types.ts +136 -0
  1547. package/src/testing/agent-storage-contract.ts +824 -0
  1548. package/src/testing/auth-storage-contract.ts +1932 -0
  1549. package/src/testing/blob-storage-contract.ts +108 -0
  1550. package/src/testing/broker-contract.ts +819 -0
  1551. package/src/testing/effective-storage-contract.ts +182 -0
  1552. package/src/testing/index.ts +65 -0
  1553. package/src/testing/lake-storage-contract.ts +699 -0
  1554. package/src/testing/materialization-failure-contract.ts +66 -0
  1555. package/src/testing/materializer-fixture.ts +119 -0
  1556. package/src/testing/materializer-storage-contract.ts +389 -0
  1557. package/src/testing/object-query-contract.ts +1205 -0
  1558. package/src/testing/ontology-contract-fixture.ts +192 -0
  1559. package/src/testing/ontology-storage-contract.ts +922 -0
  1560. package/src/testing/projection-run-storage-contract.ts +372 -0
  1561. package/src/testing/queues-contract.ts +634 -0
  1562. package/src/testing/sandboxes-contract.ts +404 -0
  1563. package/src/webhooks/builders.ts +154 -0
  1564. package/src/webhooks/connector.ts +19 -0
  1565. package/src/webhooks/errors.ts +3 -0
  1566. package/src/webhooks/index.ts +25 -0
  1567. package/src/webhooks/registry.ts +127 -0
  1568. package/src/webhooks/types.ts +98 -0
  1569. package/src/webhooks/unverified.ts +82 -0
  1570. package/src/workers/errors.ts +25 -0
  1571. package/src/workers/index.ts +6 -0
  1572. package/src/workers/queue-delivery.ts +309 -0
  1573. package/src/workers/queue-worker.ts +260 -0
  1574. package/src/workers/worker.ts +87 -0
  1575. package/src/workflows/builders.ts +471 -0
  1576. package/src/workflows/errors.ts +13 -0
  1577. package/src/workflows/index.ts +94 -0
  1578. package/src/workflows/request.ts +161 -0
  1579. package/src/workflows/runtime.ts +68 -0
  1580. package/src/workflows/snapshot.ts +383 -0
  1581. package/src/workflows/types.ts +781 -0
  1582. package/src/workflows/validation.ts +572 -0
@@ -0,0 +1,1401 @@
1
+ /**
2
+ * Core type definitions for the runtime layer.
3
+ *
4
+ * Hierarchy: Broker + Storage + Queues → Sixb → ObjectSet → ObjectByIdHandle
5
+ * Each level narrows generic parameters so downstream code stays type-safe.
6
+ */
7
+
8
+ import type {
9
+ ActionDefinition,
10
+ ActionParamsConfig,
11
+ ActionRegistry,
12
+ ActionsRuntime,
13
+ InferActionParams,
14
+ RequestActionAndWaitInput,
15
+ RequestActionInput,
16
+ RequestActionResult,
17
+ } from "../actions"
18
+ import type { AgentsRuntime, RequestAgentRunInput, RequestAgentRunResult } from "../agents"
19
+ import type { AuthRuntime } from "../auth"
20
+ import type { AuthorizationContext } from "../authorization"
21
+ import type { BlobStorage } from "../blob-storage"
22
+ import type { Broker } from "../broker"
23
+ import type { ConnectorAdapter, ConnectorClient, ConnectorDefinition } from "../connectors"
24
+ import type { DatasetDefinition } from "../datasets"
25
+ import type { DomainEventLog } from "../events"
26
+ import type { LakeStorage } from "../lake-storage"
27
+ import type { LogsRuntime } from "../logging"
28
+ import type {
29
+ OntologyMaintenanceHandle,
30
+ OntologyOperationalStatus,
31
+ SixbReadiness,
32
+ } from "../maintenance"
33
+ import type {
34
+ ObjectQuery,
35
+ ObjectQueryExplanation,
36
+ ObjectQueryPredicateComparison,
37
+ ObjectQueryPredicateContains,
38
+ ObjectQueryPredicateExists,
39
+ ObjectQueryPredicateGroup,
40
+ ObjectQueryPredicateIn,
41
+ ObjectQueryPredicateNot,
42
+ ObjectQuerySortDirection,
43
+ ValidatedObjectQuery,
44
+ } from "../objects/query"
45
+ import type { ObjectLinkTargetType, ObjectRef, ObjectType, Property, ValueType } from "../ontology"
46
+ import type {
47
+ InferObjectProperties,
48
+ InferPropertyUnit,
49
+ InferPropertyValue,
50
+ InferTelemetryBatchProperties,
51
+ InferTelemetryPropertyIds,
52
+ } from "../ontology/inference"
53
+ import type { OntologyDocumentInput, OntologyRegistry, OntologySource } from "../ontology/registry"
54
+ import type { LinkToken, ObjectTypeWithPropertyTokens, PropertyToken } from "../ontology/tokens"
55
+ import type { PipelineRunRequestResult, RequestPipelineRunInput } from "../pipelines/request"
56
+ import type { PipelineDefinition } from "../pipelines/types"
57
+ import type {
58
+ LinkProjectionDefinition,
59
+ ObjectProjectionDefinition,
60
+ ProjectionDefinition,
61
+ TelemetryProjectionDefinition,
62
+ } from "../projections/types"
63
+ import type { Queues } from "../queues"
64
+ import type { RuleDefinition } from "../rules"
65
+ import type { SandboxFactory } from "../sandboxes"
66
+ import type { ScheduleDefinition } from "../schedules"
67
+ import type { SecurityRegistry } from "../security"
68
+ import type { ActionRunRecord, ObjectLinkRow, ObjectRow, Storage } from "../storage"
69
+ import type { RequestSyncRunInput, SyncDefinition, SyncRunRequestResult } from "../syncs"
70
+ import type { RegisteredWebhook } from "../webhooks"
71
+ import type {
72
+ RequestWorkflowRunInput,
73
+ WorkflowRunRequestResult,
74
+ WorkflowsRuntime,
75
+ } from "../workflows"
76
+ import type { ScopedSixb } from "./scoped"
77
+
78
+ // ── Shared runtime context ──────────────────────────────────
79
+
80
+ /**
81
+ * Shared runtime context holding infrastructure + ontology registry.
82
+ *
83
+ * Built once by `Sixb` at construction time and threaded to `objects/`
84
+ * service and leaf functions.
85
+ *
86
+ * `Sixb` satisfies this structurally — callers can pass `sixb` directly
87
+ * wherever a `SixbRuntimeContext` is expected.
88
+ */
89
+ export interface SixbRuntimeContext {
90
+ readonly projectId: string
91
+ readonly ontology: OntologyRegistry
92
+ readonly actionRegistry: ActionRegistry
93
+ readonly events: DomainEventLog
94
+ readonly storage: Storage
95
+ readonly lakeStorage: LakeStorage
96
+ readonly blobStorage: BlobStorage
97
+ readonly queues: Queues
98
+ readonly sandboxes?: SandboxFactory
99
+ readonly rules?: readonly RuleDefinition[]
100
+ /**
101
+ * Principal scope for this context. Absent on privileged runtimes (raw
102
+ * `sixb`, syncs, workers, tests); present on contexts created by
103
+ * `sixb.as(context)`, where data operations enforce default-deny grants.
104
+ */
105
+ readonly authorization?: AuthorizationContext
106
+ }
107
+
108
+ // ── Batch result envelopes ──────────────────────────────────
109
+
110
+ /**
111
+ * Per-item result for batch operations.
112
+ *
113
+ * Allows batch ops to report successes and failures per item without throwing,
114
+ * so callers (e.g. projection executors) can map failures to per-row issues.
115
+ */
116
+ export type BatchItemResult<T> =
117
+ | { readonly ok: true; readonly value: T }
118
+ | { readonly ok: false; readonly error: Error }
119
+
120
+ // Re-export for backward compatibility — canonical definitions live in ontology/registry.ts
121
+ export type { OntologyDocumentInput, OntologySource }
122
+
123
+ type ObjectTypeFromSource<TSource> = TSource extends {
124
+ objectTypes: infer TObjectTypes extends readonly ObjectTypeWithPropertyTokens[]
125
+ }
126
+ ? TObjectTypes[number]
127
+ : TSource extends ObjectTypeWithPropertyTokens
128
+ ? TSource
129
+ : never
130
+
131
+ type ValueTypeFromSource<TSource> = TSource extends {
132
+ valueTypes: infer TValueTypes extends readonly ValueType[]
133
+ }
134
+ ? TValueTypes[number]
135
+ : never
136
+
137
+ export type RegisteredObjectType<TOntologySources extends readonly OntologySource[]> =
138
+ ObjectTypeFromSource<TOntologySources[number]>
139
+
140
+ export type RegisteredValueTypes<TOntologySources extends readonly OntologySource[]> =
141
+ readonly ValueTypeFromSource<TOntologySources[number]>[]
142
+
143
+ // A type alias, not an interface: relating two generic-interface
144
+ // instantiations makes TypeScript measure the interface's variance by probing
145
+ // it with marker types, and `InferObjectProperties<marker>` overflows its
146
+ // recursion limits (TS2589) in consumers like `rows.map(...)`. The alias
147
+ // relates structurally, which stays within limits.
148
+ export type TwinObject<TObjectType extends ObjectType, TValueTypes extends readonly ValueType[]> = {
149
+ primaryId: string
150
+ objectTypeId: TObjectType["id"]
151
+ properties: InferObjectProperties<TObjectType, TValueTypes>
152
+ createdAt: Date
153
+ updatedAt: Date
154
+ }
155
+
156
+ type MaterializedObjectRow<
157
+ TObjectType extends Pick<ObjectType, "id" | "properties">,
158
+ TValueTypes extends readonly ValueType[],
159
+ > = {
160
+ primaryId: string
161
+ objectTypeId: TObjectType["id"]
162
+ properties: InferObjectProperties<TObjectType, TValueTypes>
163
+ createdAt: Date
164
+ updatedAt: Date
165
+ }
166
+
167
+ type Simplify<T> = { [K in keyof T]: T[K] } & {}
168
+
169
+ export type { ObjectRef }
170
+
171
+ /**
172
+ * Resolve link target type id for ObjectRef:
173
+ * - `string[]` → union of elements
174
+ * - `"*"` → any string
175
+ * - `string` → literal
176
+ */
177
+ type ResolveTargetTypeId<T> = T extends readonly string[] ? T[number] : T extends "*" ? string : T
178
+
179
+ /**
180
+ * Link token constrained to the given object type.
181
+ *
182
+ * This powers `byId(...).link(Room.l.hasThermostat, target)` style APIs.
183
+ */
184
+ type LinkTokenForObjectType<TObjectType extends ObjectTypeWithPropertyTokens> = LinkToken<
185
+ TObjectType["id"],
186
+ TObjectType["links"][number]["id"],
187
+ TObjectType["links"][number]["targetObjectTypeId"],
188
+ TObjectType["links"][number]
189
+ >
190
+
191
+ type PropertyById<
192
+ TObjectType extends ObjectTypeWithPropertyTokens,
193
+ TPropertyId extends TObjectType["properties"][number]["id"],
194
+ > = Extract<TObjectType["properties"][number], { id: TPropertyId }>
195
+
196
+ type PropertyWhereValue<
197
+ TObjectType extends ObjectTypeWithPropertyTokens,
198
+ TPropertyId extends TObjectType["properties"][number]["id"],
199
+ TValueTypes extends readonly ValueType[],
200
+ > = InferPropertyValue<PropertyById<TObjectType, TPropertyId>, TValueTypes>
201
+
202
+ type PropertyWhereContainsValue<
203
+ TObjectType extends ObjectTypeWithPropertyTokens,
204
+ TPropertyId extends TObjectType["properties"][number]["id"],
205
+ TValueTypes extends readonly ValueType[],
206
+ > =
207
+ NonNullable<PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>> extends string
208
+ ? string
209
+ : NonNullable<
210
+ PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>
211
+ > extends readonly (infer TItem)[]
212
+ ? TItem
213
+ : NonNullable<PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>> extends Record<
214
+ string,
215
+ unknown
216
+ >
217
+ ? string
218
+ : never
219
+
220
+ type PropertyWhereComparisonClause<
221
+ TObjectType extends ObjectTypeWithPropertyTokens,
222
+ TPropertyId extends TObjectType["properties"][number]["id"],
223
+ TValueTypes extends readonly ValueType[],
224
+ > = Omit<ObjectQueryPredicateComparison, "propertyId" | "value"> & {
225
+ propertyId: TPropertyId
226
+ value: PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>
227
+ }
228
+
229
+ type PropertyWhereInClause<
230
+ TObjectType extends ObjectTypeWithPropertyTokens,
231
+ TPropertyId extends TObjectType["properties"][number]["id"],
232
+ TValueTypes extends readonly ValueType[],
233
+ > = Omit<ObjectQueryPredicateIn, "propertyId" | "values"> & {
234
+ propertyId: TPropertyId
235
+ values: readonly PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>[]
236
+ }
237
+
238
+ type PropertyWhereExistsClause<
239
+ TObjectType extends ObjectTypeWithPropertyTokens,
240
+ TPropertyId extends TObjectType["properties"][number]["id"],
241
+ > = Omit<ObjectQueryPredicateExists, "propertyId"> & {
242
+ propertyId: TPropertyId
243
+ }
244
+
245
+ type PropertyWhereContainsClause<
246
+ TObjectType extends ObjectTypeWithPropertyTokens,
247
+ TPropertyId extends TObjectType["properties"][number]["id"],
248
+ TValueTypes extends readonly ValueType[],
249
+ > = Omit<ObjectQueryPredicateContains, "propertyId" | "value"> & {
250
+ propertyId: TPropertyId
251
+ value: PropertyWhereContainsValue<TObjectType, TPropertyId, TValueTypes>
252
+ }
253
+
254
+ /** Predicate operators exposed on `where` builder properties. */
255
+ type PropertyPredicate<
256
+ TObjectType extends ObjectTypeWithPropertyTokens,
257
+ TPropertyId extends TObjectType["properties"][number]["id"],
258
+ TValueTypes extends readonly ValueType[],
259
+ > = {
260
+ eq(
261
+ value: PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>
262
+ ): PropertyWhereComparisonClause<TObjectType, TPropertyId, TValueTypes> & { op: "eq" }
263
+ neq(
264
+ value: PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>
265
+ ): PropertyWhereComparisonClause<TObjectType, TPropertyId, TValueTypes> & { op: "neq" }
266
+ lt(
267
+ value: PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>
268
+ ): PropertyWhereComparisonClause<TObjectType, TPropertyId, TValueTypes> & { op: "lt" }
269
+ lte(
270
+ value: PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>
271
+ ): PropertyWhereComparisonClause<TObjectType, TPropertyId, TValueTypes> & { op: "lte" }
272
+ gt(
273
+ value: PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>
274
+ ): PropertyWhereComparisonClause<TObjectType, TPropertyId, TValueTypes> & { op: "gt" }
275
+ gte(
276
+ value: PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>
277
+ ): PropertyWhereComparisonClause<TObjectType, TPropertyId, TValueTypes> & { op: "gte" }
278
+ in(
279
+ values: readonly PropertyWhereValue<TObjectType, TPropertyId, TValueTypes>[]
280
+ ): PropertyWhereInClause<TObjectType, TPropertyId, TValueTypes>
281
+ exists(value?: boolean): PropertyWhereExistsClause<TObjectType, TPropertyId>
282
+ contains(
283
+ value: PropertyWhereContainsValue<TObjectType, TPropertyId, TValueTypes>
284
+ ): PropertyWhereContainsClause<TObjectType, TPropertyId, TValueTypes>
285
+ }
286
+
287
+ type PropertyWhereClause<
288
+ TObjectType extends ObjectTypeWithPropertyTokens,
289
+ TValueTypes extends readonly ValueType[],
290
+ > =
291
+ HasKnownPropertyIds<TObjectType> extends false
292
+ ?
293
+ | ObjectQueryPredicateComparison
294
+ | ObjectQueryPredicateIn
295
+ | ObjectQueryPredicateExists
296
+ | ObjectQueryPredicateContains
297
+ : {
298
+ [TPropertyId in TObjectType["properties"][number]["id"]]:
299
+ | PropertyWhereComparisonClause<TObjectType, TPropertyId, TValueTypes>
300
+ | PropertyWhereInClause<TObjectType, TPropertyId, TValueTypes>
301
+ | PropertyWhereExistsClause<TObjectType, TPropertyId>
302
+ | PropertyWhereContainsClause<TObjectType, TPropertyId, TValueTypes>
303
+ }[TObjectType["properties"][number]["id"]]
304
+
305
+ /**
306
+ * Predicate operators for an object type whose properties are not statically
307
+ * known, such as after traversing a link whose target type is unresolved.
308
+ * Mirrors `PropertyPredicate` with IR-level value types, and keeps the type
309
+ * shallow — instantiating the typed predicate map over the broad `Property`
310
+ * union overflows TypeScript's recursion limits.
311
+ */
312
+ type UntypedPropertyPredicate = {
313
+ eq(value: unknown): ObjectQueryPredicateComparison & { op: "eq" }
314
+ neq(value: unknown): ObjectQueryPredicateComparison & { op: "neq" }
315
+ lt(value: unknown): ObjectQueryPredicateComparison & { op: "lt" }
316
+ lte(value: unknown): ObjectQueryPredicateComparison & { op: "lte" }
317
+ gt(value: unknown): ObjectQueryPredicateComparison & { op: "gt" }
318
+ gte(value: unknown): ObjectQueryPredicateComparison & { op: "gte" }
319
+ in(values: readonly unknown[]): ObjectQueryPredicateIn
320
+ exists(value?: boolean): ObjectQueryPredicateExists
321
+ contains(value: unknown): ObjectQueryPredicateContains
322
+ }
323
+
324
+ /** True when the object type's property ids are statically known literals. */
325
+ type HasKnownPropertyIds<TObjectType extends ObjectTypeWithPropertyTokens> =
326
+ string extends TObjectType["properties"][number]["id"] ? false : true
327
+
328
+ /** Typed ObjectSet where predicate. Serialized shape matches object query IR predicates. */
329
+ export type ObjectWhereClause<
330
+ TObjectType extends ObjectTypeWithPropertyTokens,
331
+ TValueTypes extends readonly ValueType[],
332
+ > =
333
+ | PropertyWhereClause<TObjectType, TValueTypes>
334
+ | (Omit<ObjectQueryPredicateGroup, "items"> & {
335
+ items: readonly ObjectWhereClause<TObjectType, TValueTypes>[]
336
+ })
337
+ | (Omit<ObjectQueryPredicateNot, "item"> & {
338
+ item: ObjectWhereClause<TObjectType, TValueTypes>
339
+ })
340
+
341
+ /**
342
+ * Builder object passed to object query `where` callbacks.
343
+ *
344
+ * Example: `(r) => r.p.externalId.eq("RM-101")`
345
+ */
346
+ export type ObjectWhereBuilder<
347
+ TObjectType extends ObjectTypeWithPropertyTokens,
348
+ TValueTypes extends readonly ValueType[],
349
+ > = {
350
+ p: HasKnownPropertyIds<TObjectType> extends false
351
+ ? Record<string, UntypedPropertyPredicate>
352
+ : {
353
+ [TPropertyId in TObjectType["properties"][number]["id"]]: PropertyPredicate<
354
+ TObjectType,
355
+ TPropertyId,
356
+ TValueTypes
357
+ >
358
+ }
359
+ and(
360
+ ...items: readonly ObjectWhereClause<TObjectType, TValueTypes>[]
361
+ ): ObjectWhereClause<TObjectType, TValueTypes>
362
+ or(
363
+ ...items: readonly ObjectWhereClause<TObjectType, TValueTypes>[]
364
+ ): ObjectWhereClause<TObjectType, TValueTypes>
365
+ not(
366
+ item: ObjectWhereClause<TObjectType, TValueTypes>
367
+ ): ObjectWhereClause<TObjectType, TValueTypes>
368
+ }
369
+
370
+ export type TelemetryPropertyToken<TObjectType extends ObjectTypeWithPropertyTokens> =
371
+ TObjectType["p"][InferTelemetryPropertyIds<TObjectType>]
372
+
373
+ type AnyPropertyToken = PropertyToken<string, string, Property>
374
+
375
+ type ObjectSetPropertyId<TObjectType extends ObjectTypeWithPropertyTokens> =
376
+ TObjectType["properties"][number]["id"]
377
+
378
+ export type ObjectSetQueryPropertyToken<TObjectType extends ObjectTypeWithPropertyTokens> =
379
+ TObjectType["p"][ObjectSetPropertyId<TObjectType>]
380
+
381
+ /**
382
+ * Unit requirement is conditional:
383
+ * - if property has a semantic type, unit is required
384
+ * - otherwise unit is disallowed
385
+ */
386
+ type TelemetryUnitField<TToken extends AnyPropertyToken, TValueTypes extends readonly ValueType[]> =
387
+ // If a property does not map to a semantic type, units are disallowed.
388
+ InferPropertyUnit<TToken["property"], TValueTypes> extends never
389
+ ? { unit?: never }
390
+ : { unit: InferPropertyUnit<TToken["property"], TValueTypes> }
391
+
392
+ export type TelemetryAppendInput<
393
+ TToken extends AnyPropertyToken,
394
+ TValueTypes extends readonly ValueType[],
395
+ > = {
396
+ value: InferPropertyValue<TToken["property"], TValueTypes>
397
+ at: Date
398
+ } & TelemetryUnitField<TToken, TValueTypes>
399
+
400
+ export interface TelemetryHistoryInput {
401
+ readonly from?: Date
402
+ readonly to?: Date
403
+ readonly limit?: number
404
+ readonly order?: "asc" | "desc"
405
+ }
406
+
407
+ /**
408
+ * One object's telemetry for one property, readable and writable.
409
+ *
410
+ * Named a channel rather than an appender because telemetry is not write-only: `history()` reads the
411
+ * same series back, typed through the same token, instead of sending the caller under the typed
412
+ * surface to `sixb.storage.timeseries`.
413
+ */
414
+ // A type alias for the same reason as `TwinObject` above: `history()` puts
415
+ // `InferPropertyValue` in an output position, and probing a generic interface's variance there
416
+ // overflows TS's recursion limits (TS2589) in consumers as ordinary as `points.map(...)`.
417
+ export type TelemetryChannel<
418
+ TToken extends AnyPropertyToken,
419
+ TValueTypes extends readonly ValueType[],
420
+ > = {
421
+ append(input: TelemetryAppendInput<TToken, TValueTypes>): Promise<void>
422
+ /**
423
+ * Points for this series, oldest first unless `order: "desc"`.
424
+ *
425
+ * The default matches `storage.timeseries.getHistoryBatch`, deliberately: a typed read that ordered
426
+ * differently from the contract underneath it would be its own trap.
427
+ *
428
+ * The point shape is written inline rather than extracted into a named alias. One more level of
429
+ * alias indirection around `InferPropertyValue` in this output position overflows TS's instantiation
430
+ * depth (TS2589) in consumers as ordinary as `points.map(...)` — the same budget the note on
431
+ * `TwinObject` describes. `unit` is inferred through the same token as `append` writes it, rather
432
+ * than widened to `string`: a read that kept `value` precise and gave up on `unit` would be an
433
+ * arbitrary line, and both are the current ontology's view of a series it validated on write.
434
+ */
435
+ history(input?: TelemetryHistoryInput): Promise<
436
+ readonly {
437
+ readonly value: InferPropertyValue<TToken["property"], TValueTypes>
438
+ readonly at: Date
439
+ readonly unit?: InferPropertyUnit<TToken["property"], TValueTypes>
440
+ }[]
441
+ >
442
+ }
443
+
444
+ type TypedActionReference<TParams extends ActionParamsConfig = ActionParamsConfig> = {
445
+ readonly id: string
446
+ readonly params: TParams
447
+ }
448
+
449
+ type TypedActionParams<TAction extends TypedActionReference> =
450
+ TAction extends TypedActionReference<infer TParams> ? InferActionParams<TParams> : never
451
+
452
+ export type ListResult<T> = {
453
+ objects: T[]
454
+ hasMore: boolean
455
+ nextPageToken?: string
456
+ total: number
457
+ }
458
+
459
+ export type ListResultWithoutTotal<T> = {
460
+ objects: T[]
461
+ hasMore: boolean
462
+ nextPageToken?: string
463
+ total?: undefined
464
+ }
465
+
466
+ export type ObjectQueryListOptions = {
467
+ includeTotal?: boolean
468
+ }
469
+
470
+ export type ObjectQueryFacetInput<TObjectType extends ObjectTypeWithPropertyTokens> = {
471
+ property: ObjectSetQueryPropertyToken<TObjectType>
472
+ limit: number
473
+ }
474
+
475
+ export type ObjectQueryFacetBucket = {
476
+ value: unknown
477
+ count: number
478
+ }
479
+
480
+ export type ObjectQueryFacetResult = {
481
+ propertyId: string
482
+ buckets: ObjectQueryFacetBucket[]
483
+ }
484
+
485
+ export type ObjectSetListInput = {
486
+ idPrefix?: string
487
+ idSuffix?: string
488
+ updatedAfter?: Date
489
+ updatedBefore?: Date
490
+ createdAfter?: Date
491
+ createdBefore?: Date
492
+ limit?: number
493
+ offset?: number
494
+ orderBy?: "createdAt" | "updatedAt" | "primaryId"
495
+ order?: "asc" | "desc"
496
+ }
497
+
498
+ type LinkTargetObjectTypeIdValue = string | readonly string[]
499
+
500
+ type LinkTargetObjectTypeId<TLinkToken> =
501
+ TLinkToken extends LinkToken<string, string, infer TTargetObjectTypeId>
502
+ ? TTargetObjectTypeId extends readonly (infer TTargetId extends string)[]
503
+ ? TTargetId
504
+ : TTargetObjectTypeId extends string
505
+ ? TTargetObjectTypeId
506
+ : never
507
+ : never
508
+
509
+ type ObjectTypeForId<
510
+ TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens,
511
+ TObjectTypeId extends string,
512
+ > = [Extract<TRegisteredObjectTypes, { id: TObjectTypeId }>] extends [never]
513
+ ? ObjectTypeWithPropertyTokens
514
+ : Extract<TRegisteredObjectTypes, { id: TObjectTypeId }>
515
+
516
+ type DirectObjectTypeForLink<TLinkToken> =
517
+ TLinkToken extends LinkToken<string, string, LinkTargetObjectTypeIdValue, infer TLink>
518
+ ? Extract<ObjectLinkTargetType<TLink>, ObjectTypeWithPropertyTokens>
519
+ : never
520
+
521
+ type ObjectTypeForLinkTarget<
522
+ TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens,
523
+ TLinkToken,
524
+ > = [DirectObjectTypeForLink<TLinkToken>] extends [never]
525
+ ? ObjectTypeForId<TRegisteredObjectTypes, LinkTargetObjectTypeId<TLinkToken>>
526
+ : DirectObjectTypeForLink<TLinkToken>
527
+
528
+ /**
529
+ * True when the target type is a concrete ontology type rather than the degraded
530
+ * generic base. Direct ObjectType links resolve before this point; unresolved
531
+ * id-only refs fall back to the base type, whose property ids are `string`.
532
+ * Instantiating the typed token map over the broad `Property` union there
533
+ * overflows TypeScript (the same reason `UntypedPropertyPredicate` exists). The
534
+ * expand option/sort types degrade to a loose shape in that case so unresolved
535
+ * client paths stay shallow instead of failing.
536
+ */
537
+ type HasKnownObjectType<TObjectType extends ObjectTypeWithPropertyTokens> =
538
+ string extends TObjectType["id"] ? false : true
539
+
540
+ /** Deterministic top-N ordering for a bounded `"many"` expansion, typed against the target type. */
541
+ export type ObjectExpansionSort<TObjectType extends ObjectTypeWithPropertyTokens> =
542
+ HasKnownObjectType<TObjectType> extends false
543
+ ? { property: PropertyToken; direction?: ObjectQuerySortDirection }
544
+ : { property: ObjectSetQueryPropertyToken<TObjectType>; direction?: ObjectQuerySortDirection }
545
+
546
+ /** Options for a single `.expand(...)` of an outgoing link. */
547
+ export type ObjectExpandOptions<TObjectType extends ObjectTypeWithPropertyTokens> = {
548
+ /** Bound a `"many"` expansion to the top-N target objects per parent. */
549
+ limit?: number
550
+ /** Order the target objects of a bounded `"many"` expansion. */
551
+ orderBy?: readonly ObjectExpansionSort<TObjectType>[]
552
+ }
553
+
554
+ // ── Expansion shape accumulation (the typed `.links` row) ───────────────────
555
+ //
556
+ // Each `.expand(link, …)` widens an accumulator type, keyed by link id, with a
557
+ // branded {@link ExpansionNode} capturing the resolved target type, cardinality,
558
+ // and the nested expansions. The accumulator materializes into the row's `links`
559
+ // via {@link ObjectQueryRow}. The discipline that keeps this within TypeScript's
560
+ // recursion limits (proven on the real ADN graph): recursion lives ONLY in the
561
+ // lazily-evaluated row types below, never in constraints (which are eager); the
562
+ // builders are type aliases; targets resolve through direct metadata first and
563
+ // the id registry second; and the row is read through a direct conditional
564
+ // `infer` (see `BuiltRow`).
565
+
566
+ /**
567
+ * Cardinality declared on a link token's underlying link; absent cardinality is
568
+ * treated as `"many"`, matching the executor (`link.cardinality ?? "many"`) and
569
+ * the ontology default.
570
+ */
571
+ type LinkTokenCardinality<TLinkToken> =
572
+ TLinkToken extends LinkToken<string, string, LinkTargetObjectTypeIdValue, infer TLink>
573
+ ? TLink extends { cardinality: infer TCardinality extends string }
574
+ ? TCardinality
575
+ : "many"
576
+ : "many"
577
+
578
+ type LinkTokenId<TLinkToken> =
579
+ TLinkToken extends LinkToken<string, infer TLinkId, LinkTargetObjectTypeIdValue> ? TLinkId : never
580
+
581
+ type LinkTokenSourceObjectTypeId<TLinkToken> =
582
+ TLinkToken extends LinkToken<infer TObjectTypeId, string, LinkTargetObjectTypeIdValue>
583
+ ? TObjectTypeId
584
+ : string
585
+
586
+ type ObjectLinkCardinality<TLink> = TLink extends { cardinality: infer TCardinality extends string }
587
+ ? TCardinality
588
+ : "many"
589
+
590
+ type ObjectLinkTarget<TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens, TLink> = [
591
+ Extract<ObjectLinkTargetType<TLink>, ObjectTypeWithPropertyTokens>,
592
+ ] extends [never]
593
+ ? TLink extends {
594
+ targetObjectTypeId: infer TTargetObjectTypeId extends LinkTargetObjectTypeIdValue
595
+ }
596
+ ? ObjectTypeForId<TRegisteredObjectTypes, ResolveTargetTypeId<TTargetObjectTypeId>>
597
+ : ObjectTypeWithPropertyTokens
598
+ : Extract<ObjectLinkTargetType<TLink>, ObjectTypeWithPropertyTokens>
599
+
600
+ type ObjectLinkById<
601
+ TObjectType extends Pick<ObjectType, "links">,
602
+ TLinkId extends string,
603
+ > = Extract<TObjectType["links"][number], { id: TLinkId }>
604
+
605
+ type HasKnownObjectLinkIds<TObjectType extends Pick<ObjectType, "links">> =
606
+ string extends TObjectType["links"][number]["id"] ? false : true
607
+
608
+ /**
609
+ * A branded accumulator entry for one expanded link. Unconstrained on purpose —
610
+ * keeping recursion out of constraints is what avoids TS2589.
611
+ */
612
+ type ExpansionNode<TLinkToken, TRegisteredObjectTypes, TTarget, TCardinality, TChildren> = {
613
+ readonly __linkToken: TLinkToken
614
+ readonly __registeredObjectTypes: TRegisteredObjectTypes
615
+ readonly __target: TTarget
616
+ readonly __cardinality: TCardinality
617
+ readonly __children: TChildren
618
+ }
619
+
620
+ /** The single-key accumulator contribution of one `.expand(link, …)` call. */
621
+ type ExpansionEntry<
622
+ TLinkToken extends LinkToken<string, string, LinkTargetObjectTypeIdValue>,
623
+ TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens,
624
+ TChild,
625
+ > = {
626
+ [K in TLinkToken["id"]]: ExpansionNode<
627
+ TLinkToken,
628
+ TRegisteredObjectTypes,
629
+ ObjectTypeForLinkTarget<TRegisteredObjectTypes, TLinkToken>,
630
+ LinkTokenCardinality<TLinkToken>,
631
+ TChild
632
+ >
633
+ }
634
+
635
+ type ExpansionNodeForSource<TNode, TObjectType extends Pick<ObjectType, "id" | "links">> =
636
+ TNode extends ExpansionNode<
637
+ infer TLinkToken,
638
+ infer TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens,
639
+ infer TTarget,
640
+ infer TCardinality,
641
+ infer TChildren
642
+ >
643
+ ? LinkTokenId<TLinkToken> extends infer TLinkId extends string
644
+ ? HasKnownObjectLinkIds<TObjectType> extends true
645
+ ? [ObjectLinkById<TObjectType, TLinkId>] extends [never]
646
+ ? never
647
+ : ExpansionNode<
648
+ TLinkToken,
649
+ TRegisteredObjectTypes,
650
+ ObjectLinkTarget<TRegisteredObjectTypes, ObjectLinkById<TObjectType, TLinkId>>,
651
+ ObjectLinkCardinality<ObjectLinkById<TObjectType, TLinkId>>,
652
+ TChildren
653
+ >
654
+ : LinkTokenSourceObjectTypeId<TLinkToken> extends TObjectType["id"]
655
+ ? ExpansionNode<TLinkToken, TRegisteredObjectTypes, TTarget, TCardinality, TChildren>
656
+ : never
657
+ : never
658
+ : never
659
+
660
+ type ExpansionLinksForSource<TLinks, TObjectType extends Pick<ObjectType, "id" | "links">> = {
661
+ [K in keyof TLinks as [ExpansionNodeForSource<TLinks[K], TObjectType>] extends [never]
662
+ ? never
663
+ : K]: ExpansionNodeForSource<TLinks[K], TObjectType>
664
+ }
665
+
666
+ /** Materialize one accumulated expansion entry into its row value. */
667
+ type ExpandedLinkType<TNode, TValueTypes extends readonly ValueType[]> =
668
+ TNode extends ExpansionNode<
669
+ unknown,
670
+ infer TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens,
671
+ infer TTarget,
672
+ infer TCardinality,
673
+ infer TChildren
674
+ >
675
+ ? TCardinality extends "one"
676
+ ? ExpandedRowType<TTarget, TChildren, TValueTypes, TRegisteredObjectTypes> | null
677
+ : ExpandedRowType<TTarget, TChildren, TValueTypes, TRegisteredObjectTypes>[]
678
+ : never
679
+
680
+ /**
681
+ * An expanded child row: the target object, optional edge `linkProperties` (the
682
+ * executor attaches it only when the relationship carries metadata), and its own
683
+ * nested `links` (present only when the child was itself expanded). The recursion
684
+ * is confined to this lazily-evaluated position.
685
+ */
686
+ /**
687
+ * Loud row substituted for a `.expand()` whose target type is MISSING from an
688
+ * otherwise-present ontology manifest (a stale manifest, or a wrong link target
689
+ * id). Reading a real property is then a compile error pointing at the fix,
690
+ * instead of the old silent `Record<string, unknown>`. The no-manifest loose
691
+ * default stays graceful — this only fires when the registry is concrete yet the
692
+ * target id is absent, i.e. precision was expected but lost.
693
+ */
694
+ type UnresolvedExpansionRow = {
695
+ primaryId: string
696
+ objectTypeId: string
697
+ properties: {
698
+ readonly sixb_unresolvedExpansionTarget: "This expansion target is not in the generated ontology manifest. Run `sixb build` / `dev` / `check` to regenerate types, or fix the link's target id."
699
+ }
700
+ createdAt: Date
701
+ updatedAt: Date
702
+ }
703
+
704
+ type ExpandedRowType<
705
+ TTarget,
706
+ TChildren,
707
+ TValueTypes extends readonly ValueType[],
708
+ TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens,
709
+ > =
710
+ TTarget extends Pick<ObjectType, "id" | "properties" | "links">
711
+ ? string extends TTarget["id"]
712
+ ? // Target degraded to the loose base. Distinguish the two causes:
713
+ string extends TRegisteredObjectTypes["id"]
714
+ ? // No manifest at all → graceful loose default (unchanged, non-breaking).
715
+ ExpandedRowForSource<
716
+ TTarget,
717
+ TValueTypes,
718
+ ExpansionLinksForSource<TChildren, TTarget>,
719
+ { linkProperties?: Record<string, unknown> }
720
+ >
721
+ : // Manifest present but this target id is absent → loud (was silent).
722
+ UnresolvedExpansionRow
723
+ : ExpandedRowForSource<
724
+ TTarget,
725
+ TValueTypes,
726
+ ExpansionLinksForSource<TChildren, TTarget>,
727
+ { linkProperties?: Record<string, unknown> }
728
+ >
729
+ : never
730
+
731
+ type ExpandedRowForSource<
732
+ TObjectType extends Pick<ObjectType, "id" | "properties" | "links">,
733
+ TValueTypes extends readonly ValueType[],
734
+ TLinks,
735
+ TExtra = unknown,
736
+ > = Simplify<
737
+ MaterializedObjectRow<TObjectType, TValueTypes> &
738
+ TExtra &
739
+ ([keyof TLinks] extends [never]
740
+ ? unknown
741
+ : { links: { [K in keyof TLinks]: ExpandedLinkType<TLinks[K], TValueTypes> } })
742
+ >
743
+
744
+ /**
745
+ * The terminal row of a query: the matched object, plus a typed `links` map once
746
+ * the query accumulated expansions. A query with no `.expand(...)` returns the
747
+ * plain materialized row, so existing `list`/`first` consumers are unchanged.
748
+ */
749
+ export type ObjectQueryRow<
750
+ TObjectType extends ObjectTypeWithPropertyTokens,
751
+ TValueTypes extends readonly ValueType[],
752
+ TLinks,
753
+ > = TObjectType extends ObjectTypeWithPropertyTokens
754
+ ? ExpandedRowForSource<TObjectType, TValueTypes, ExpansionLinksForSource<TLinks, TObjectType>>
755
+ : never
756
+
757
+ /**
758
+ * Builder passed to the nested `.expand(..., (e) => …)` callback. Exposes only
759
+ * `expand`, resolving the next target type from direct metadata or the id
760
+ * registry so deeper hops stay typed and accumulating `TAccumulated` so the
761
+ * nested `.links` shape is recovered from the callback's return.
762
+ *
763
+ * A type alias (not an interface) so relating two instantiations stays
764
+ * structural — the same discipline `TwinObject` follows to avoid TS2589
765
+ * (see the note above `TwinObject`). The only recursion is in the lazily
766
+ * evaluated return/callback positions.
767
+ *
768
+ * When the target type is the degraded base (an unresolved id-only target), the
769
+ * builder collapses to the untyped, non-generic {@link UntypedExpandBuilder}:
770
+ * nested expansion still works, just without target-specific link/property
771
+ * checking, and — crucially — without the self-referential generic instantiation
772
+ * over the broad base type that would otherwise overflow TypeScript.
773
+ */
774
+ export type ObjectExpandBuilder<
775
+ TObjectType extends ObjectTypeWithPropertyTokens,
776
+ TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens,
777
+ TAccumulated = unknown,
778
+ > =
779
+ HasKnownObjectType<TObjectType> extends false
780
+ ? UntypedExpandBuilder
781
+ : {
782
+ // Phantom accumulator — never set at runtime. It is the only direct,
783
+ // covariant site `TAccumulated` appears in, so the nested callback's
784
+ // `TChild` is inferable from the returned builder even after the
785
+ // degradation conditional above resolves (which otherwise buries the
786
+ // accumulator inside `expand`'s return and defeats inference).
787
+ readonly __links?: TAccumulated
788
+ expand<
789
+ TLinkToken extends LinkToken<TObjectType["id"], string, LinkTargetObjectTypeIdValue>,
790
+ TChild = unknown,
791
+ >(
792
+ link: TLinkToken,
793
+ build: ObjectExpandNested<TLinkToken, TRegisteredObjectTypes, TChild>
794
+ ): ObjectExpandBuilder<
795
+ TObjectType,
796
+ TRegisteredObjectTypes,
797
+ TAccumulated & ExpansionEntry<TLinkToken, TRegisteredObjectTypes, TChild>
798
+ >
799
+ expand<
800
+ TLinkToken extends LinkToken<TObjectType["id"], string, LinkTargetObjectTypeIdValue>,
801
+ TChild = unknown,
802
+ >(
803
+ link: TLinkToken,
804
+ options?: ObjectExpandOptions<
805
+ ObjectTypeForLinkTarget<TRegisteredObjectTypes, TLinkToken>
806
+ >,
807
+ build?: ObjectExpandNested<TLinkToken, TRegisteredObjectTypes, TChild>
808
+ ): ObjectExpandBuilder<
809
+ TObjectType,
810
+ TRegisteredObjectTypes,
811
+ TAccumulated & ExpansionEntry<TLinkToken, TRegisteredObjectTypes, TChild>
812
+ >
813
+ }
814
+
815
+ /**
816
+ * Loose expand builder for degraded targets. Non-generic and self-referential,
817
+ * so it never instantiates the typed token machinery over the broad base type.
818
+ * Nested expansions still run; their shape simply degrades to the loose row.
819
+ */
820
+ type UntypedExpandBuilder = {
821
+ expand(
822
+ link: LinkToken,
823
+ optionsOrBuild?:
824
+ | ObjectExpandOptions<ObjectTypeWithPropertyTokens>
825
+ | ((nested: UntypedExpandBuilder) => UntypedExpandBuilder),
826
+ build?: (nested: UntypedExpandBuilder) => UntypedExpandBuilder
827
+ ): UntypedExpandBuilder
828
+ }
829
+
830
+ /**
831
+ * The nested-expansion callback for a link token's resolved target type. `TChild`
832
+ * is inferred from the returned builder's accumulator, recovering the nested
833
+ * `.links` shape; on the degraded path the builder collapses and `TChild` stays
834
+ * its `unknown` default.
835
+ *
836
+ * Kept a plain (non-conditional) function type on purpose: wrapping the callback
837
+ * in a `TLinkToken extends … ? … : never` conditional blocks inference of
838
+ * `TChild` from the argument, so it would silently fall back to `unknown`.
839
+ */
840
+ type ObjectExpandNested<
841
+ TLinkToken extends LinkToken<string, string, LinkTargetObjectTypeIdValue>,
842
+ TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens,
843
+ TChild,
844
+ > = (
845
+ nested: ObjectExpandBuilder<
846
+ ObjectTypeForLinkTarget<TRegisteredObjectTypes, TLinkToken>,
847
+ TRegisteredObjectTypes
848
+ >
849
+ ) => ObjectExpandBuilder<
850
+ ObjectTypeForLinkTarget<TRegisteredObjectTypes, TLinkToken>,
851
+ TRegisteredObjectTypes,
852
+ TChild
853
+ >
854
+
855
+ export interface ObjectQueryBuilder<
856
+ TObjectType extends ObjectTypeWithPropertyTokens,
857
+ TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens,
858
+ TValueTypes extends readonly ValueType[],
859
+ // Accumulated expansion shape, widened by each `.expand(...)` and materialized
860
+ // into the row's `links` by the `list`/`first` terminals. Empty `{}` until the
861
+ // first expand; `traverse` resets it (the new result type has its own links).
862
+ TLinks = unknown,
863
+ > {
864
+ /** Normalized provider-neutral query IR. */
865
+ readonly ir: ObjectQuery
866
+
867
+ /** Add a typed property predicate at the current object type. */
868
+ where(
869
+ where: (
870
+ builder: ObjectWhereBuilder<TObjectType, TValueTypes>
871
+ ) =>
872
+ | ObjectWhereClause<TObjectType, TValueTypes>
873
+ | readonly ObjectWhereClause<TObjectType, TValueTypes>[]
874
+ ): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes, TLinks>
875
+
876
+ /** Search configured text fields at the current object type. */
877
+ search(
878
+ query: string,
879
+ options?: { fields?: readonly ObjectSetQueryPropertyToken<TObjectType>[] }
880
+ ): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes, TLinks>
881
+
882
+ /** Search a vector property at the current object type. */
883
+ vector(
884
+ property: ObjectSetQueryPropertyToken<TObjectType>,
885
+ vector: readonly number[],
886
+ options: { k: number }
887
+ ): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes, TLinks>
888
+
889
+ /** Follow an outgoing link and make the linked object type the current result type. */
890
+ traverse<TLinkToken extends LinkToken<TObjectType["id"], string, LinkTargetObjectTypeIdValue>>(
891
+ link: TLinkToken,
892
+ options?: { direction?: "outgoing" }
893
+ ): ObjectQueryBuilder<
894
+ ObjectTypeForLinkTarget<TRegisteredObjectTypes, TLinkToken>,
895
+ TRegisteredObjectTypes,
896
+ TValueTypes
897
+ >
898
+
899
+ /** Follow an incoming link and make the link source object type the current result type. */
900
+ traverse<TLinkToken extends LinkToken<string, string, TObjectType["id"] | readonly string[]>>(
901
+ link: TLinkToken,
902
+ options: { direction: "incoming" }
903
+ ): ObjectQueryBuilder<
904
+ ObjectTypeForId<TRegisteredObjectTypes, TLinkToken["objectTypeId"]>,
905
+ TRegisteredObjectTypes,
906
+ TValueTypes
907
+ >
908
+
909
+ /**
910
+ * Attach an outgoing link's target objects to each row under `.links`, without
911
+ * changing the result type — the additive counterpart to `traverse` (which
912
+ * replaces the set). The callback nests deeper hops.
913
+ *
914
+ * Each call widens `TLinks`, so `list`/`first` rows gain a typed `.links` entry
915
+ * for this link (cardinality `"one"` → `Target | null`, `"many"` → `Target[]`,
916
+ * each carrying optional `linkProperties` and its own nested `.links`). Nested
917
+ * targets stay precise when the link uses direct object targets or when the id
918
+ * target resolves through the registry, and otherwise degrade to the loose base.
919
+ */
920
+ expand<
921
+ TLinkToken extends LinkToken<TObjectType["id"], string, LinkTargetObjectTypeIdValue>,
922
+ TChild = unknown,
923
+ >(
924
+ link: TLinkToken,
925
+ build: ObjectExpandNested<TLinkToken, TRegisteredObjectTypes, TChild>
926
+ ): ObjectQueryBuilder<
927
+ TObjectType,
928
+ TRegisteredObjectTypes,
929
+ TValueTypes,
930
+ TLinks & ExpansionEntry<TLinkToken, TRegisteredObjectTypes, TChild>
931
+ >
932
+ expand<
933
+ TLinkToken extends LinkToken<TObjectType["id"], string, LinkTargetObjectTypeIdValue>,
934
+ TChild = unknown,
935
+ >(
936
+ link: TLinkToken,
937
+ options?: ObjectExpandOptions<ObjectTypeForLinkTarget<TRegisteredObjectTypes, TLinkToken>>,
938
+ build?: ObjectExpandNested<TLinkToken, TRegisteredObjectTypes, TChild>
939
+ ): ObjectQueryBuilder<
940
+ TObjectType,
941
+ TRegisteredObjectTypes,
942
+ TValueTypes,
943
+ TLinks & ExpansionEntry<TLinkToken, TRegisteredObjectTypes, TChild>
944
+ >
945
+
946
+ /** Add property ordering at the current object type. */
947
+ orderBy(
948
+ property: ObjectSetQueryPropertyToken<TObjectType>,
949
+ direction?: ObjectQuerySortDirection
950
+ ): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes, TLinks>
951
+
952
+ /** Add relevance ordering for providers that support ranked search. */
953
+ orderByRelevance(
954
+ direction?: ObjectQuerySortDirection
955
+ ): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes, TLinks>
956
+
957
+ /** Bound the result count. */
958
+ limit(limit: number): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes, TLinks>
959
+
960
+ /** Request one page of results. */
961
+ page(input: {
962
+ pageSize: number
963
+ pageToken?: string
964
+ }): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes, TLinks>
965
+
966
+ /** Validate this query against the registered ontology. */
967
+ validate(): ValidatedObjectQuery
968
+
969
+ /** Return a provider-neutral explanation tree for this query. */
970
+ explain(): ObjectQueryExplanation
971
+
972
+ /** Format `explain()` as a compact diagnostic string. */
973
+ formatExplanation(): string
974
+
975
+ /** Execute this query and return matching objects (rows carry `.links` when expanded). */
976
+ list(): Promise<ListResult<ObjectQueryRow<TObjectType, TValueTypes, TLinks>>>
977
+ list(options: {
978
+ includeTotal: false
979
+ }): Promise<ListResultWithoutTotal<ObjectQueryRow<TObjectType, TValueTypes, TLinks>>>
980
+ list(options: {
981
+ includeTotal?: true
982
+ }): Promise<ListResult<ObjectQueryRow<TObjectType, TValueTypes, TLinks>>>
983
+ list(
984
+ options?: ObjectQueryListOptions
985
+ ): Promise<
986
+ | ListResult<ObjectQueryRow<TObjectType, TValueTypes, TLinks>>
987
+ | ListResultWithoutTotal<ObjectQueryRow<TObjectType, TValueTypes, TLinks>>
988
+ >
989
+
990
+ /** Count the matching objects without returning rows. */
991
+ count(): Promise<number>
992
+
993
+ /** Check whether any object matches without returning rows. */
994
+ exists(): Promise<boolean>
995
+
996
+ /** Count matching objects by configured facetable properties. */
997
+ facets(input: readonly ObjectQueryFacetInput<TObjectType>[]): Promise<ObjectQueryFacetResult[]>
998
+
999
+ /** Execute this query with an outer limit of one and return the first object. */
1000
+ first(): Promise<ObjectQueryRow<TObjectType, TValueTypes, TLinks> | null>
1001
+ }
1002
+
1003
+ export interface ObjectByIdHandle<
1004
+ TObjectType extends ObjectTypeWithPropertyTokens,
1005
+ TValueTypes extends readonly ValueType[],
1006
+ > {
1007
+ /** Get the object at this id, or null if it doesn't exist. */
1008
+ get(): Promise<TwinObject<TObjectType, TValueTypes> | null>
1009
+
1010
+ /** List links from this object, optionally filtered by link token. */
1011
+ listLinks(link?: LinkTokenForObjectType<TObjectType>): Promise<readonly ObjectLinkRow[]>
1012
+
1013
+ /** Create or update a link from the current object to a target object. */
1014
+ link<TLinkToken extends LinkTokenForObjectType<TObjectType>>(
1015
+ link: TLinkToken,
1016
+ target: ObjectRef<ResolveTargetTypeId<TLinkToken["targetObjectTypeId"]>>,
1017
+ options?: {
1018
+ properties?: Record<string, unknown>
1019
+ }
1020
+ ): Promise<void>
1021
+
1022
+ /** Remove a link from the current object to a target object. */
1023
+ unlink<TLinkToken extends LinkTokenForObjectType<TObjectType>>(
1024
+ link: TLinkToken,
1025
+ target: ObjectRef<ResolveTargetTypeId<TLinkToken["targetObjectTypeId"]>>
1026
+ ): Promise<void>
1027
+
1028
+ /** Request an action on this object by id (dynamic / server contexts). */
1029
+ requestAction(input: {
1030
+ actionId: string
1031
+ params?: Record<string, unknown>
1032
+ runId?: string
1033
+ }): Promise<RequestActionResult>
1034
+
1035
+ /**
1036
+ * Request an action on this object using a typed action reference.
1037
+ * Params are inferred from the action's declared shape.
1038
+ */
1039
+ requestAction<const TAction extends TypedActionReference>(input: {
1040
+ action: TAction
1041
+ params: NoInfer<TypedActionParams<TAction>>
1042
+ runId?: string
1043
+ }): Promise<RequestActionResult>
1044
+
1045
+ /** Request an action and wait for the terminal lifecycle event. */
1046
+ requestActionAndWait(input: {
1047
+ actionId: string
1048
+ params?: Record<string, unknown>
1049
+ timeoutMs?: number
1050
+ signal?: AbortSignal
1051
+ }): Promise<ActionRunRecord>
1052
+
1053
+ /** Request a typed action and wait for the terminal lifecycle event. */
1054
+ requestActionAndWait<const TAction extends TypedActionReference>(input: {
1055
+ action: TAction
1056
+ params: NoInfer<TypedActionParams<TAction>>
1057
+ timeoutMs?: number
1058
+ signal?: AbortSignal
1059
+ }): Promise<ActionRunRecord>
1060
+
1061
+ /**
1062
+ * Delete this object, cascading over its links in the same commit.
1063
+ *
1064
+ * For an object written only from code this is not reversible — the identity ceases to exist, and
1065
+ * `restore()` has nothing to bring back. For an object a projection also writes, the delete records
1066
+ * a managed override: the object stays hidden even while the projection keeps asserting it, until
1067
+ * `restore()` withdraws the override.
1068
+ *
1069
+ * Deleting a missing object is a no-op.
1070
+ */
1071
+ delete(): Promise<void>
1072
+
1073
+ /** Withdraw a previous `delete()`. A no-op unless a projection still asserts this object. */
1074
+ restore(): Promise<void>
1075
+
1076
+ /** Read and write telemetry for one telemetry-mode property token. */
1077
+ telemetry<TToken extends TelemetryPropertyToken<TObjectType>>(
1078
+ property: TToken
1079
+ ): TelemetryChannel<TToken, TValueTypes>
1080
+ }
1081
+
1082
+ /**
1083
+ * Public API surface of a Sixb runtime instance.
1084
+ *
1085
+ * The class `Sixb<T>` implements this interface so the contract is
1086
+ * enforced at compile time and easy to scan in one place.
1087
+ */
1088
+ export interface SixbInstance<_ extends readonly OntologySource[]> {
1089
+ readonly id: string
1090
+ readonly ontology: OntologyRegistry
1091
+ readonly broker: Broker
1092
+ readonly events: DomainEventLog
1093
+ readonly logs: LogsRuntime
1094
+ readonly storage: Storage
1095
+ readonly lakeStorage: LakeStorage
1096
+ readonly blobStorage: BlobStorage
1097
+ readonly queues: Queues
1098
+ readonly sandboxes?: SandboxFactory
1099
+ readonly rules?: readonly RuleDefinition[]
1100
+ readonly security: SecurityRegistry
1101
+ readonly auth: AuthRuntime
1102
+ readonly actions: ActionsRuntime
1103
+ readonly workflows: WorkflowsRuntime
1104
+ readonly agents: AgentsRuntime
1105
+
1106
+ /** Create a principal-scoped runtime surface that enforces authorization grants. */
1107
+ as(context: AuthorizationContext): ScopedSixb<_>
1108
+
1109
+ /** All registered object types. */
1110
+ listObjectTypes(): readonly ObjectTypeWithPropertyTokens[]
1111
+
1112
+ /** Lookup an object type by id. */
1113
+ getObjectTypeById(objectTypeId: string): ObjectTypeWithPropertyTokens | null
1114
+
1115
+ /** Resolve an object type by id, or throw if it is unknown. */
1116
+ resolveObjectType(objectTypeId: string): ObjectTypeWithPropertyTokens
1117
+
1118
+ /** Value types registered in the runtime ontology, keyed by id. */
1119
+ getValueTypesById(): ReadonlyMap<string, ValueType>
1120
+
1121
+ /** All registered action definitions. */
1122
+ listActions(): readonly ActionDefinition[]
1123
+
1124
+ /** Lookup an action definition by id. */
1125
+ getActionById(actionId: string): ActionDefinition | null
1126
+
1127
+ /** All registered global actions. */
1128
+ listGlobalActions(): readonly ActionDefinition[]
1129
+
1130
+ /** All actions valid for an object type, including inherited actions. */
1131
+ listActionsForType(objectType: ObjectType): readonly ActionDefinition[]
1132
+
1133
+ /** All registered dataset definitions. */
1134
+ listDatasets(): readonly DatasetDefinition[]
1135
+
1136
+ /** Lookup a dataset definition by id. */
1137
+ getDatasetById(datasetId: string): DatasetDefinition | null
1138
+
1139
+ /** All registered sync definitions. */
1140
+ listSyncs(): readonly SyncDefinition[]
1141
+
1142
+ /** Lookup a sync definition by id. */
1143
+ getSyncById(syncId: string): SyncDefinition | null
1144
+
1145
+ /** All registered pipeline definitions. */
1146
+ listPipelines(): readonly PipelineDefinition[]
1147
+
1148
+ /** Lookup a pipeline definition by id. */
1149
+ getPipelineById(pipelineId: string): PipelineDefinition | null
1150
+
1151
+ /**
1152
+ * Request an action run by id. Queued, not run inline — see `requestActionAndWait`.
1153
+ *
1154
+ * Every start verb on this runtime is `request*` for that reason: `run*` implied inline execution
1155
+ * that never happened.
1156
+ */
1157
+ requestAction(input: RequestActionInput): Promise<RequestActionResult>
1158
+
1159
+ /** Request an action run and wait for it to reach a terminal state. */
1160
+ requestActionAndWait(input: RequestActionAndWaitInput): Promise<ActionRunRecord>
1161
+
1162
+ /** Queue a workflow run by id. */
1163
+ requestWorkflowRun(input: RequestWorkflowRunInput): Promise<WorkflowRunRequestResult>
1164
+
1165
+ /** Queue a sync run by id. */
1166
+ requestSyncRun(input: RequestSyncRunInput): Promise<SyncRunRequestResult>
1167
+
1168
+ /** Queue a pipeline run by id. */
1169
+ requestPipelineRun(input: RequestPipelineRunInput): Promise<PipelineRunRequestResult>
1170
+
1171
+ /** Queue an agent turn by id. */
1172
+ requestAgentRun(input: RequestAgentRunInput): Promise<RequestAgentRunResult>
1173
+
1174
+ /** All registered schedule definitions. */
1175
+ listSchedules(): readonly ScheduleDefinition[]
1176
+
1177
+ /** Lookup a schedule definition by id. */
1178
+ getScheduleById(scheduleId: string): ScheduleDefinition | null
1179
+
1180
+ /** All registered rule definitions. */
1181
+ listRules(): readonly RuleDefinition[]
1182
+
1183
+ /** Lookup a rule definition by id. */
1184
+ getRuleById(ruleId: string): RuleDefinition | null
1185
+
1186
+ /** All registered connector definitions. */
1187
+ listConnectors(): readonly ConnectorDefinition[]
1188
+
1189
+ /** Lookup a connector definition by id. */
1190
+ getConnectorById(connectorId: string): ConnectorDefinition | null
1191
+
1192
+ /** All webhook endpoints registered through connector adapters. */
1193
+ listWebhooks(): readonly RegisteredWebhook[]
1194
+
1195
+ /** Lookup a registered connector webhook by connector id and webhook id. */
1196
+ getWebhookById(connectorId: string, webhookId: string): RegisteredWebhook | null
1197
+
1198
+ /**
1199
+ * Resolve a connector definition to its connected client.
1200
+ *
1201
+ * The first call connects lazily and caches the result for reuse within the runtime.
1202
+ */
1203
+ connector<TAdapter extends ConnectorAdapter>(
1204
+ definition: ConnectorDefinition<string, TAdapter>
1205
+ ): Promise<ConnectorClient<TAdapter>>
1206
+
1207
+ /** Start the scheduler runtime for all registered schedules. */
1208
+ startScheduler(): Promise<void>
1209
+
1210
+ /** Stop the scheduler runtime. */
1211
+ stopScheduler(): Promise<void>
1212
+
1213
+ /** Start durable outbox recovery and bounded ontology retention. */
1214
+ startOntologyMaintenance(): Promise<OntologyMaintenanceHandle>
1215
+
1216
+ /** Latest cached asynchronous delivery and cleanup status. */
1217
+ getOntologyOperationalStatus(): OntologyOperationalStatus
1218
+
1219
+ /** Verify required storage reachability and migration state. */
1220
+ checkReadiness(): Promise<SixbReadiness>
1221
+
1222
+ /** Disconnect all currently connected connector clients. */
1223
+ disconnectConnectors(): Promise<void>
1224
+
1225
+ /** Close the runtime broker provider if it owns external resources. */
1226
+ closeBroker(): Promise<void>
1227
+
1228
+ /** Close the process logger provider, flushing buffered output. */
1229
+ closeLogger(): Promise<void>
1230
+
1231
+ /**
1232
+ * Type-safe ObjectSet for a registered object type.
1233
+ *
1234
+ * Not part of this interface because `ObjectSet` triggers deep type
1235
+ * instantiation when the generic parameter is the widened base
1236
+ * `ObjectTypeWithPropertyTokens`. Use `sixb.objects(MyConcreteType)`
1237
+ * directly — TypeScript infers the narrow type from the literal.
1238
+ *
1239
+ * Signature: `objects<T>(objectType: T): ObjectSet<T, RegisteredValueTypes>`
1240
+ */
1241
+
1242
+ /** Get the primary property id for a given object type. */
1243
+ getPrimaryPropertyId(objectTypeId: string): string
1244
+
1245
+ /** Upsert an object by type id (for server / dynamic contexts). */
1246
+ upsertObject(objectTypeId: string, properties: Record<string, unknown>): Promise<ObjectRow>
1247
+
1248
+ /** Append telemetry for multiple objects of a given type. */
1249
+ appendTelemetry(
1250
+ objectTypeId: string,
1251
+ items: readonly { id: string; properties: Record<string, unknown>; at?: Date }[]
1252
+ ): Promise<void>
1253
+
1254
+ /** Create or update a link from source to target. */
1255
+ upsertLink(
1256
+ objectTypeId: string,
1257
+ sourceId: string,
1258
+ linkId: string,
1259
+ target: { targetTypeId: string; targetId: string; properties?: Record<string, unknown> }
1260
+ ): Promise<void>
1261
+
1262
+ /** Remove a link from source to target. */
1263
+ removeLink(
1264
+ objectTypeId: string,
1265
+ sourceId: string,
1266
+ linkId: string,
1267
+ target: { targetTypeId: string; targetId: string }
1268
+ ): Promise<void>
1269
+
1270
+ /** Batch upsert objects of a single type. Returns per-item results. */
1271
+ upsertObjectBatch(
1272
+ objectTypeId: string,
1273
+ items: readonly { properties: Record<string, unknown> }[]
1274
+ ): Promise<readonly BatchItemResult<ObjectRow>[]>
1275
+
1276
+ /** Batch upsert links. Returns per-item results. */
1277
+ upsertLinkBatch(
1278
+ items: readonly {
1279
+ objectTypeId: string
1280
+ sourceId: string
1281
+ linkId: string
1282
+ target: { targetTypeId: string; targetId: string; properties?: Record<string, unknown> }
1283
+ }[]
1284
+ ): Promise<readonly BatchItemResult<void>[]>
1285
+
1286
+ /** Cross-type object listing for dashboards and search. */
1287
+ list(params: {
1288
+ objectTypeIds?: readonly string[]
1289
+ idPrefix?: string
1290
+ idSuffix?: string
1291
+ updatedAfter?: Date
1292
+ updatedBefore?: Date
1293
+ createdAfter?: Date
1294
+ createdBefore?: Date
1295
+ limit?: number
1296
+ offset?: number
1297
+ orderBy?: "createdAt" | "updatedAt" | "primaryId"
1298
+ order?: "asc" | "desc"
1299
+ }): Promise<ListResult<ObjectRow>>
1300
+
1301
+ /** Collect all transitive sub-types of the given object type id. */
1302
+ listSubTypes(objectTypeId: string): string[]
1303
+
1304
+ /** All registered object projection definitions. */
1305
+ listObjectProjections(): readonly ObjectProjectionDefinition[]
1306
+
1307
+ /** All registered link projection definitions. */
1308
+ listLinkProjections(): readonly LinkProjectionDefinition[]
1309
+
1310
+ /** All registered telemetry projection definitions. */
1311
+ listTelemetryProjections(): readonly TelemetryProjectionDefinition[]
1312
+
1313
+ /** Lookup a registered projection by id. */
1314
+ getProjectionById(projectionId: string): ProjectionDefinition | null
1315
+ }
1316
+
1317
+ export interface ObjectSet<
1318
+ TObjectType extends ObjectTypeWithPropertyTokens,
1319
+ TValueTypes extends readonly ValueType[],
1320
+ TRegisteredObjectTypes extends ObjectTypeWithPropertyTokens = TObjectType,
1321
+ > {
1322
+ /** Get an object by id, or null if it doesn't exist. */
1323
+ get(id: string): Promise<TwinObject<TObjectType, TValueTypes> | null>
1324
+
1325
+ /** Upsert object state facts (latest projection). */
1326
+ upsert(input: {
1327
+ properties: InferObjectProperties<TObjectType, TValueTypes>
1328
+ }): Promise<TwinObject<TObjectType, TValueTypes>>
1329
+
1330
+ /** Build an executable provider-neutral object query rooted at this object type. */
1331
+ query(): ObjectQueryBuilder<TObjectType, TRegisteredObjectTypes, TValueTypes>
1332
+
1333
+ /** Bind operations to a specific object id. */
1334
+ byId(id: string): ObjectByIdHandle<TObjectType, TValueTypes>
1335
+
1336
+ /** List stored objects of this type with storage-system filtering and pagination. */
1337
+ list(input?: ObjectSetListInput): Promise<ListResult<TwinObject<TObjectType, TValueTypes>>>
1338
+
1339
+ /** Append telemetry for multiple objects in a single batch. */
1340
+ appendTelemetryBatch(
1341
+ items: readonly {
1342
+ id: string
1343
+ properties: InferTelemetryBatchProperties<TObjectType, TValueTypes>
1344
+ at?: Date
1345
+ }[]
1346
+ ): Promise<void>
1347
+
1348
+ /** Request an action on an object of this type by id (dynamic / server contexts). */
1349
+ requestAction(input: {
1350
+ id: string
1351
+ actionId: string
1352
+ params?: Record<string, unknown>
1353
+ runId?: string
1354
+ }): Promise<RequestActionResult>
1355
+
1356
+ /**
1357
+ * Request an action on an object of this type using a typed action reference.
1358
+ * Params are inferred from the action's declared shape.
1359
+ */
1360
+ requestAction<const TAction extends TypedActionReference>(input: {
1361
+ id: string
1362
+ action: TAction
1363
+ params: NoInfer<TypedActionParams<TAction>>
1364
+ runId?: string
1365
+ }): Promise<RequestActionResult>
1366
+
1367
+ /** Request an action on an object and wait for the terminal lifecycle event. */
1368
+ requestActionAndWait(input: {
1369
+ id: string
1370
+ actionId: string
1371
+ params?: Record<string, unknown>
1372
+ timeoutMs?: number
1373
+ signal?: AbortSignal
1374
+ }): Promise<ActionRunRecord>
1375
+
1376
+ /** Request a typed action and wait for the terminal lifecycle event. */
1377
+ requestActionAndWait<const TAction extends TypedActionReference>(input: {
1378
+ id: string
1379
+ action: TAction
1380
+ params: NoInfer<TypedActionParams<TAction>>
1381
+ timeoutMs?: number
1382
+ signal?: AbortSignal
1383
+ }): Promise<ActionRunRecord>
1384
+
1385
+ /** Create or update a link (string-based, for server/dynamic usage). */
1386
+ upsertLink(input: {
1387
+ sourceId: string
1388
+ linkId: string
1389
+ targetTypeId: string
1390
+ targetId: string
1391
+ properties?: Record<string, unknown>
1392
+ }): Promise<void>
1393
+
1394
+ /** Remove a link (string-based, for server/dynamic usage). */
1395
+ removeLink(input: {
1396
+ sourceId: string
1397
+ linkId: string
1398
+ targetTypeId: string
1399
+ targetId: string
1400
+ }): Promise<void>
1401
+ }