@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,695 @@
1
+ /**
2
+ * Builder helpers for ontology modeling.
3
+ *
4
+ * These functions provide shorthand for constructing `ObjectType`, `ValueType`,
5
+ * `Interface`, `Property`, `ObjectLink`, and `EnumSchema` values with sensible
6
+ * defaults so you can focus on the semantics rather than boilerplate.
7
+ *
8
+ * ```ts
9
+ * import { defineObjectType, prop, link, stringEnum } from "@sixb/core"
10
+ *
11
+ * const thermostat = defineObjectType({
12
+ * id: "thermostat",
13
+ * name: "Thermostat",
14
+ * properties: [
15
+ * prop("currentTemperature", "double", {
16
+ * name: "Current Temperature",
17
+ * semanticType: "Temperature",
18
+ * required: true,
19
+ * }),
20
+ * prop("mode", stringEnum(["off", "heat", "cool", "auto"])),
21
+ * ],
22
+ * links: [
23
+ * link.ref("controls", "hvacZone", { cardinality: "one" }),
24
+ * ],
25
+ * })
26
+ * ```
27
+ */
28
+
29
+ import type { ObjectTypeWithPropertyTokens, ObjectTypeWithTokens, PropertyTokenMap } from "./tokens"
30
+ import { createLinkTokenMap, createPropertyTokenMap } from "./tokens"
31
+ import type {
32
+ EnumSchema,
33
+ Interface,
34
+ LinkCardinality,
35
+ ObjectLink,
36
+ ObjectLinkTargetMetadata,
37
+ ObjectType,
38
+ Ontology,
39
+ Property,
40
+ PropertyMode,
41
+ PropertyQueryMetadata,
42
+ Schema,
43
+ ValueType,
44
+ ValueTypeRefSchema,
45
+ } from "./types"
46
+ import type { QuantitativeTypeId } from "./units"
47
+
48
+ type NameFromOptions<TId extends string, TOptions> = TOptions extends {
49
+ name: infer TName extends string
50
+ }
51
+ ? TName
52
+ : TId
53
+
54
+ /**
55
+ * Preserve literal option values when an option key is provided.
56
+ *
57
+ * Why this exists:
58
+ * - `prop("x", "string", { required: true })` should keep `required` as literal `true`
59
+ * (not widen to `boolean`) so downstream inference can treat the field as required.
60
+ */
61
+ type FieldFromOptions<TOptions, TKey extends string, TFallback> =
62
+ TOptions extends Record<TKey, infer TValue>
63
+ ? { [K in TKey]: TValue }
64
+ : { [K in TKey]?: TFallback }
65
+
66
+ const selfLinkTargetObjectTypeId = "__sixb.self__"
67
+ type SelfLinkTargetObjectTypeId = typeof selfLinkTargetObjectTypeId
68
+
69
+ type NormalizeSelfLink<TObjectTypeId extends string, TLink> = TLink extends {
70
+ targetObjectTypeId: SelfLinkTargetObjectTypeId
71
+ }
72
+ ? Omit<TLink, "targetObjectTypeId"> & { targetObjectTypeId: TObjectTypeId }
73
+ : TLink
74
+
75
+ type NormalizeSelfLinks<TObjectTypeId extends string, TLinks extends readonly ObjectLink[]> = {
76
+ -readonly [K in keyof TLinks]: NormalizeSelfLink<TObjectTypeId, TLinks[K]>
77
+ }
78
+
79
+ // ── Extends type utilities ───────────────────────────────────
80
+
81
+ /**
82
+ * Merge parent + child collections by id. Uses built-in `Exclude` on
83
+ * the element union — no recursion, no "excessively deep" errors.
84
+ */
85
+ type MergedCollection<
86
+ TParent extends readonly { id: string }[],
87
+ TChild extends readonly { id: string }[],
88
+ > = Array<Exclude<TParent[number], { id: TChild[number]["id"] }> | TChild[number]>
89
+
90
+ /**
91
+ * Extract child's own collection, normalized as a mutable tuple. Falls back to [].
92
+ */
93
+ type OwnCollection<TInput, TKey extends string, TItem> =
94
+ TInput extends Record<TKey, infer T extends readonly TItem[]> ? [...T] : []
95
+
96
+ type OwnLinks<TInput> = TInput extends { id: infer TObjectTypeId extends string }
97
+ ? TInput extends Record<"links", infer TLinks extends readonly ObjectLink[]>
98
+ ? NormalizeSelfLinks<TObjectTypeId, TLinks>
99
+ : []
100
+ : []
101
+
102
+ /**
103
+ * Merge two arrays by id: parent items first, child items override by id.
104
+ */
105
+ function mergeById<T extends { id: string }>(parent: readonly T[], child: readonly T[]): T[] {
106
+ const childIds = new Set(child.map((item) => item.id))
107
+ const fromParent = parent.filter((item) => !childIds.has(item.id))
108
+ return [...fromParent, ...child]
109
+ }
110
+
111
+ // ── Object Type ─────────────────────────────────────────────
112
+
113
+ type DefineObjectTypeBase = Omit<ObjectType, "properties" | "links" | "extends" | "parents">
114
+
115
+ /**
116
+ * Structural constraint for the `extends` field.
117
+ *
118
+ * We require only the data needed for merge (id + collections), not the
119
+ * full `ObjectTypeWithTokens<ObjectType>`. The latter requires
120
+ * `LinkTokenMap<ObjectType>` with a `{ [id: string]: LinkToken }` index
121
+ * signature, which is incompatible with the literal-keyed maps produced by
122
+ * concrete `defineObjectType()` calls.
123
+ */
124
+ type DefineObjectTypeInput = DefineObjectTypeBase & {
125
+ extends?:
126
+ | string
127
+ | {
128
+ readonly id: string
129
+ readonly properties: readonly Property[]
130
+ readonly links: readonly ObjectLink[]
131
+ }
132
+ parents?: readonly string[]
133
+ properties?: readonly Property[]
134
+ links?: readonly ObjectLink[]
135
+ }
136
+
137
+ /**
138
+ * Normalize `parents` from readonly tuple to mutable `string[] | undefined`.
139
+ */
140
+ type NormalizeParents<TInput> = TInput extends { parents: infer P extends readonly string[] }
141
+ ? { parents: [...P] }
142
+ : { parents?: undefined }
143
+
144
+ type DefineObjectTypeResult<TInput extends DefineObjectTypeInput> = Omit<
145
+ TInput,
146
+ "properties" | "links" | "extends" | "parents"
147
+ > &
148
+ (TInput extends {
149
+ extends: infer TParent extends {
150
+ id: string
151
+ properties: readonly Property[]
152
+ links: readonly ObjectLink[]
153
+ }
154
+ }
155
+ ? NormalizeParents<TInput> & {
156
+ extends: TParent["id"]
157
+ properties: MergedCollection<
158
+ TParent["properties"],
159
+ OwnCollection<TInput, "properties", Property>
160
+ >
161
+ links: MergedCollection<TParent["links"], OwnLinks<TInput>>
162
+ }
163
+ : TInput extends { extends: infer TParentId extends string }
164
+ ? {
165
+ extends: TParentId
166
+ parents: string[]
167
+ properties: OwnCollection<TInput, "properties", Property>
168
+ links: OwnLinks<TInput>
169
+ }
170
+ : NormalizeParents<TInput> & {
171
+ extends: undefined
172
+ properties: OwnCollection<TInput, "properties", Property>
173
+ links: OwnLinks<TInput>
174
+ })
175
+
176
+ type DefineObjectTypeWithTokensResult<TInput extends DefineObjectTypeInput> = ObjectTypeWithTokens<
177
+ DefineObjectTypeResult<TInput>
178
+ >
179
+
180
+ /**
181
+ * Define an object type with sensible defaults.
182
+ *
183
+ * `properties` and `links` default to `[]` so you can define
184
+ * a bare object type with just `id` and `name`.
185
+ */
186
+ export function defineObjectType<const TInput extends DefineObjectTypeInput>(
187
+ input: TInput
188
+ ): DefineObjectTypeWithTokensResult<TInput>
189
+ export function defineObjectType(input: DefineObjectTypeInput): ObjectTypeWithTokens<ObjectType> {
190
+ const ext = input.extends
191
+
192
+ const ownProperties = input.properties ? [...input.properties] : []
193
+ const ownLinks = input.links
194
+ ? input.links.map((link) => normalizeSelfLinkTarget(input.id, link))
195
+ : []
196
+
197
+ let extendsId: string | undefined
198
+ let parentIds: string[] | undefined
199
+ let properties: Property[]
200
+ let links: ObjectLink[]
201
+
202
+ if (typeof ext === "string") {
203
+ // Pre-flattened: string extends — no merge, properties/links taken as-is
204
+ extendsId = ext
205
+ parentIds = [ext, ...(input.parents ?? []).filter((id) => id !== ext)]
206
+ properties = ownProperties
207
+ links = ownLinks
208
+ } else if (ext != null) {
209
+ // Object extends — merge parent collections
210
+ extendsId = ext.id
211
+ parentIds = [ext.id, ...(input.parents ?? []).filter((id) => id !== ext.id)]
212
+ properties = mergeById(ext.properties, ownProperties)
213
+ links = mergeById([...ext.links], ownLinks)
214
+ } else {
215
+ // No extends
216
+ extendsId = undefined
217
+ parentIds = input.parents ? [...input.parents] : undefined
218
+ properties = ownProperties
219
+ links = ownLinks
220
+ }
221
+
222
+ const objectType: ObjectType = {
223
+ id: input.id,
224
+ name: input.name,
225
+ description: input.description,
226
+ quantityKind: input.quantityKind,
227
+ seeAlso: input.seeAlso,
228
+ extends: extendsId,
229
+ parents: parentIds,
230
+ implements: input.implements,
231
+ properties,
232
+ links,
233
+ search: input.search,
234
+ }
235
+
236
+ return {
237
+ ...objectType,
238
+ l: createLinkTokenMap(objectType),
239
+ p: createPropertyTokenMap(objectType),
240
+ }
241
+ }
242
+
243
+ function normalizeSelfLinkTarget(objectTypeId: string, link: ObjectLink): ObjectLink {
244
+ if (link.targetObjectTypeId !== selfLinkTargetObjectTypeId) {
245
+ return link
246
+ }
247
+
248
+ return {
249
+ ...link,
250
+ targetObjectTypeId: objectTypeId,
251
+ }
252
+ }
253
+
254
+ // ── Ontology ────────────────────────────────────────────────
255
+
256
+ type DefineOntologyBase = Omit<Ontology, "objectTypes" | "valueTypes" | "interfaces">
257
+
258
+ type DefineOntologyInput = DefineOntologyBase & {
259
+ objectTypes?: readonly ObjectType[]
260
+ valueTypes?: readonly ValueType[]
261
+ interfaces?: readonly Interface[]
262
+ }
263
+
264
+ type DefineOntologyResult<TInput extends DefineOntologyInput> = Omit<
265
+ TInput,
266
+ "objectTypes" | "valueTypes" | "interfaces"
267
+ > & {
268
+ objectTypes: TInput extends { objectTypes: infer TObjectTypes extends readonly ObjectType[] }
269
+ ? [...TObjectTypes]
270
+ : []
271
+ valueTypes: TInput extends { valueTypes: infer TValueTypes extends readonly ValueType[] }
272
+ ? [...TValueTypes]
273
+ : []
274
+ interfaces: TInput extends { interfaces: infer TInterfaces extends readonly Interface[] }
275
+ ? [...TInterfaces]
276
+ : []
277
+ }
278
+
279
+ /**
280
+ * Define a complete ontology document.
281
+ *
282
+ * `objectTypes`, `valueTypes`, and `interfaces` default to `[]`.
283
+ */
284
+ export function defineOntology<const TInput extends DefineOntologyInput>(
285
+ input: TInput
286
+ ): DefineOntologyResult<TInput>
287
+ export function defineOntology(input: DefineOntologyInput): Ontology {
288
+ return {
289
+ ...input,
290
+ objectTypes: input.objectTypes ? [...input.objectTypes] : [],
291
+ valueTypes: input.valueTypes ? [...input.valueTypes] : [],
292
+ interfaces: input.interfaces ? [...input.interfaces] : [],
293
+ }
294
+ }
295
+
296
+ // ── Value Type ──────────────────────────────────────────────
297
+
298
+ /**
299
+ * Define a reusable value type.
300
+ *
301
+ * Identity function for type inference and discoverability — the `define*`
302
+ * prefix makes it easy to find all ontology builders.
303
+ */
304
+ export function defineValueType<const TValueType extends ValueType>(input: TValueType): TValueType {
305
+ return input
306
+ }
307
+
308
+ // ── Interface ───────────────────────────────────────────────
309
+
310
+ type DefineInterfaceBase = Omit<Interface, "properties" | "links">
311
+
312
+ type DefineInterfaceInput = DefineInterfaceBase & {
313
+ properties?: readonly Property[]
314
+ links?: readonly ObjectLink[]
315
+ }
316
+
317
+ type DefineInterfaceResult<TInput extends DefineInterfaceInput> = Omit<
318
+ TInput,
319
+ "properties" | "links"
320
+ > & {
321
+ properties: TInput extends { properties: infer TProperties extends readonly Property[] }
322
+ ? [...TProperties]
323
+ : []
324
+ links: TInput extends { links: infer TLinks extends readonly ObjectLink[] } ? [...TLinks] : []
325
+ }
326
+
327
+ /**
328
+ * Define a reusable interface contract.
329
+ *
330
+ * `properties` and `links` default to `[]`.
331
+ */
332
+ export function defineInterface<const TInput extends DefineInterfaceInput>(
333
+ input: TInput
334
+ ): DefineInterfaceResult<TInput>
335
+ export function defineInterface(input: DefineInterfaceInput): Interface {
336
+ return {
337
+ ...input,
338
+ properties: input.properties ? [...input.properties] : [],
339
+ links: input.links ? [...input.links] : [],
340
+ }
341
+ }
342
+
343
+ // ── Property shorthand ──────────────────────────────────────
344
+
345
+ type PropertyOptions = {
346
+ name?: string
347
+ description?: string
348
+ required?: boolean
349
+ nullable?: boolean
350
+ primary?: true
351
+ mode?: PropertyMode
352
+ semanticType?: QuantitativeTypeId
353
+ query?: PropertyQueryMetadata
354
+ }
355
+
356
+ type PropertyResult<
357
+ TId extends string,
358
+ TSchema extends Schema,
359
+ TOptions extends PropertyOptions | undefined,
360
+ > = {
361
+ id: TId
362
+ name: NameFromOptions<TId, TOptions>
363
+ schema: TSchema
364
+ } & FieldFromOptions<TOptions, "description", string> &
365
+ FieldFromOptions<TOptions, "required", boolean> &
366
+ FieldFromOptions<TOptions, "nullable", boolean> &
367
+ FieldFromOptions<TOptions, "primary", true> &
368
+ FieldFromOptions<TOptions, "mode", PropertyMode> &
369
+ FieldFromOptions<TOptions, "semanticType", QuantitativeTypeId> &
370
+ FieldFromOptions<TOptions, "query", PropertyQueryMetadata>
371
+
372
+ /**
373
+ * Shorthand for creating a {@link Property}.
374
+ *
375
+ * `name` defaults to `id` — override via `options.name` when you need
376
+ * a separate display name.
377
+ *
378
+ * ```ts
379
+ * prop("currentTemperature", "double", {
380
+ * name: "Current Temperature",
381
+ * semanticType: "Temperature",
382
+ * required: true,
383
+ * })
384
+ * ```
385
+ */
386
+ // Overloads keep option literals (e.g. `required: true`, `mode: "telemetry"`) intact.
387
+ export function prop<const TId extends string, const TSchema extends Schema>(
388
+ id: TId,
389
+ schema: TSchema
390
+ ): PropertyResult<TId, TSchema, undefined>
391
+ export function prop<
392
+ const TId extends string,
393
+ const TSchema extends Schema,
394
+ const TOptions extends PropertyOptions,
395
+ >(id: TId, schema: TSchema, options: TOptions): PropertyResult<TId, TSchema, TOptions>
396
+ export function prop(id: string, schema: Schema, options?: PropertyOptions): Property {
397
+ return {
398
+ id,
399
+ name: options?.name ?? id,
400
+ schema,
401
+ ...options,
402
+ }
403
+ }
404
+
405
+ // ── Link shorthand ──────────────────────────────────────────
406
+
407
+ /**
408
+ * Runtime check: does a value look like an ObjectType?
409
+ *
410
+ * Discriminates ObjectType from LinkOptions by checking for `properties` and `links`
411
+ * arrays — ObjectType always has them, LinkOptions never does.
412
+ */
413
+ function isObjectTypeLike(value: unknown): value is ObjectType {
414
+ return (
415
+ typeof value === "object" &&
416
+ value !== null &&
417
+ Array.isArray((value as Record<string, unknown>).properties) &&
418
+ Array.isArray((value as Record<string, unknown>).links)
419
+ )
420
+ }
421
+
422
+ type LinkOptions = {
423
+ name?: string
424
+ description?: string
425
+ cardinality?: LinkCardinality
426
+ properties?: Property[]
427
+ }
428
+
429
+ type LinkResult<
430
+ TId extends string,
431
+ TTargetObjectTypeId,
432
+ TOptions extends LinkOptions | undefined,
433
+ > = {
434
+ id: TId
435
+ name: NameFromOptions<TId, TOptions>
436
+ targetObjectTypeId: TTargetObjectTypeId
437
+ } & FieldFromOptions<TOptions, "description", string> &
438
+ FieldFromOptions<TOptions, "cardinality", LinkCardinality> &
439
+ FieldFromOptions<TOptions, "properties", Property[]>
440
+
441
+ export type DirectLinkResult<
442
+ TId extends string,
443
+ TTargetObjectTypeId,
444
+ TOptions extends LinkOptions | undefined,
445
+ TTarget,
446
+ > = LinkResult<TId, TTargetObjectTypeId, TOptions> & ObjectLinkTargetMetadata<TTarget>
447
+
448
+ type ObjectTypeIdArray<TTargets extends readonly ObjectType[]> = Array<TTargets[number]["id"]>
449
+ export type DirectLinkTarget<
450
+ TId extends string,
451
+ TName extends string,
452
+ TProperties extends Property[],
453
+ > = {
454
+ id: TId
455
+ name: TName
456
+ properties: TProperties
457
+ links: ObjectLink[]
458
+ readonly p: PropertyTokenMap<{
459
+ id: TId
460
+ name: TName
461
+ properties: TProperties
462
+ links: ObjectLink[]
463
+ }>
464
+ }
465
+
466
+ type DirectLinkTargetFor<TTarget extends ObjectType> = TTarget extends ObjectTypeWithPropertyTokens
467
+ ? DirectLinkTarget<TTarget["id"], TTarget["name"], TTarget["properties"]>
468
+ : TTarget
469
+
470
+ /**
471
+ * Shorthand for creating an {@link ObjectLink}.
472
+ *
473
+ * `link(...)` accepts direct ObjectType targets and preserves their type for
474
+ * query authoring. Use `link.ref(...)` for id-only references, `link.self(...)`
475
+ * for recursive links, and `link.any(...)` for wildcard links.
476
+ *
477
+ * ```ts
478
+ * // ObjectType target — extracts .id at runtime and preserves the target type
479
+ * link("controls", HVACZone, { cardinality: "one" })
480
+ *
481
+ * // Id target — resolved by the generated ontology type manifest
482
+ * link.ref("controls", "hvacZone", { cardinality: "one" })
483
+ *
484
+ * // Self target — normalized to the source object type id by defineObjectType()
485
+ * link.self("parent", { cardinality: "one" })
486
+ *
487
+ * // Multiple targets
488
+ * link("rel", [TypeA, TypeB])
489
+ *
490
+ * // Wildcard — accepts any target type
491
+ * link.any("anything")
492
+ * link.any("anything", { cardinality: "many" })
493
+ * ```
494
+ */
495
+ interface LinkCallable {
496
+ <const TId extends string, const TTarget extends ObjectType>(
497
+ id: TId,
498
+ target: TTarget
499
+ ): DirectLinkResult<TId, TTarget["id"], undefined, DirectLinkTargetFor<TTarget>>
500
+
501
+ <const TId extends string, const TTarget extends ObjectType, const TOptions extends LinkOptions>(
502
+ id: TId,
503
+ target: TTarget,
504
+ options: TOptions
505
+ ): DirectLinkResult<TId, TTarget["id"], TOptions, DirectLinkTargetFor<TTarget>>
506
+
507
+ <const TId extends string, const TTargets extends readonly ObjectType[]>(
508
+ id: TId,
509
+ targets: TTargets
510
+ ): DirectLinkResult<
511
+ TId,
512
+ ObjectTypeIdArray<TTargets>,
513
+ undefined,
514
+ DirectLinkTargetFor<TTargets[number]>
515
+ >
516
+
517
+ <
518
+ const TId extends string,
519
+ const TTargets extends readonly ObjectType[],
520
+ const TOptions extends LinkOptions,
521
+ >(
522
+ id: TId,
523
+ targets: TTargets,
524
+ options: TOptions
525
+ ): DirectLinkResult<
526
+ TId,
527
+ ObjectTypeIdArray<TTargets>,
528
+ TOptions,
529
+ DirectLinkTargetFor<TTargets[number]>
530
+ >
531
+ }
532
+
533
+ interface LinkBuilder extends LinkCallable {
534
+ ref: typeof linkRef
535
+ self: typeof linkSelf
536
+ any: typeof linkAny
537
+ }
538
+
539
+ const linkImpl = ((
540
+ id: string,
541
+ targetOrTargets: ObjectType | readonly ObjectType[],
542
+ options?: LinkOptions
543
+ ): ObjectLink => {
544
+ if (Array.isArray(targetOrTargets)) {
545
+ return {
546
+ id,
547
+ name: options?.name ?? id,
548
+ targetObjectTypeId: targetOrTargets.map((target) => target.id),
549
+ ...options,
550
+ }
551
+ }
552
+
553
+ if (isObjectTypeLike(targetOrTargets)) {
554
+ return {
555
+ id,
556
+ name: options?.name ?? id,
557
+ targetObjectTypeId: targetOrTargets.id,
558
+ ...options,
559
+ }
560
+ }
561
+
562
+ throw new Error(
563
+ `[Sixb] link("${id}", ...) requires an ObjectType target. Use link.ref(...) for id references, link.self(...) for self-links, or link.any(...) for wildcard links.`
564
+ )
565
+ }) as LinkCallable
566
+
567
+ function linkRef<
568
+ const TId extends string,
569
+ const TTargetObjectTypeId extends string | readonly string[],
570
+ >(id: TId, targetObjectTypeId: TTargetObjectTypeId): LinkResult<TId, TTargetObjectTypeId, undefined>
571
+ function linkRef<
572
+ const TId extends string,
573
+ const TTargetObjectTypeId extends string | readonly string[],
574
+ const TOptions extends LinkOptions,
575
+ >(
576
+ id: TId,
577
+ targetObjectTypeId: TTargetObjectTypeId,
578
+ options: TOptions
579
+ ): LinkResult<TId, TTargetObjectTypeId, TOptions>
580
+ function linkRef(
581
+ id: string,
582
+ targetObjectTypeId: string | readonly string[],
583
+ options?: LinkOptions
584
+ ): ObjectLink {
585
+ return {
586
+ id,
587
+ name: options?.name ?? id,
588
+ targetObjectTypeId:
589
+ typeof targetObjectTypeId === "string" ? targetObjectTypeId : [...targetObjectTypeId],
590
+ ...options,
591
+ }
592
+ }
593
+
594
+ function linkSelf<
595
+ const TId extends string,
596
+ const TOptions extends LinkOptions | undefined = undefined,
597
+ >(id: TId, options?: TOptions): LinkResult<TId, SelfLinkTargetObjectTypeId, TOptions> {
598
+ return {
599
+ id,
600
+ name: options?.name ?? id,
601
+ targetObjectTypeId: selfLinkTargetObjectTypeId,
602
+ ...options,
603
+ } as LinkResult<TId, SelfLinkTargetObjectTypeId, TOptions>
604
+ }
605
+
606
+ function linkAny<
607
+ const TId extends string,
608
+ const TOptions extends LinkOptions | undefined = undefined,
609
+ >(id: TId, options?: TOptions): LinkResult<TId, "*", TOptions> {
610
+ return {
611
+ id,
612
+ name: options?.name ?? id,
613
+ targetObjectTypeId: "*",
614
+ ...options,
615
+ } as LinkResult<TId, "*", TOptions>
616
+ }
617
+
618
+ export const link: LinkBuilder = Object.assign(linkImpl, {
619
+ ref: linkRef,
620
+ self: linkSelf,
621
+ any: linkAny,
622
+ })
623
+
624
+ // ── ValueType ref shorthand ─────────────────────────────────
625
+
626
+ /**
627
+ * Create a value-type reference schema.
628
+ *
629
+ * ```ts
630
+ * prop("azimuth", valueTypeRef("bsh:AzimuthShape"))
631
+ * prop("area", valueTypeRef(AreaShape)) // self-contained, no tuple needed
632
+ * ```
633
+ */
634
+ // 1. String id only (existing behavior, no resolution)
635
+ export function valueTypeRef<const TId extends string>(
636
+ valueTypeId: TId
637
+ ): ValueTypeRefSchema & { valueTypeId: TId }
638
+ // 2. ValueType object (concise, self-contained)
639
+ export function valueTypeRef<const TVT extends ValueType>(
640
+ valueType: TVT
641
+ ): { type: "valueTypeRef"; valueTypeId: TVT["id"]; _resolved: TVT["schema"] }
642
+ // 3. String id + explicit schema (escape hatch)
643
+ export function valueTypeRef<const TId extends string, const TResolved extends Schema>(
644
+ valueTypeId: TId,
645
+ resolved: TResolved
646
+ ): { type: "valueTypeRef"; valueTypeId: TId; _resolved: TResolved }
647
+ // Implementation
648
+ export function valueTypeRef(
649
+ idOrValueType: string | ValueType,
650
+ resolved?: Schema
651
+ ): ValueTypeRefSchema {
652
+ if (typeof idOrValueType === "string") {
653
+ if (resolved !== undefined) {
654
+ return { type: "valueTypeRef", valueTypeId: idOrValueType, _resolved: resolved }
655
+ }
656
+ return { type: "valueTypeRef", valueTypeId: idOrValueType }
657
+ }
658
+ return {
659
+ type: "valueTypeRef",
660
+ valueTypeId: idOrValueType.id,
661
+ _resolved: idOrValueType.schema,
662
+ }
663
+ }
664
+
665
+ // ── Enum helpers ────────────────────────────────────────────
666
+
667
+ /**
668
+ * Create a string enum schema.
669
+ *
670
+ * ```ts
671
+ * prop("mode", stringEnum(["off", "heat", "cool", "auto"]))
672
+ * ```
673
+ */
674
+ export function stringEnum<const V extends readonly string[]>(
675
+ values: V
676
+ ): EnumSchema & {
677
+ values: [...V]
678
+ } {
679
+ return { type: "enum", valueType: "string", values: [...values] }
680
+ }
681
+
682
+ /**
683
+ * Create an integer enum schema.
684
+ *
685
+ * ```ts
686
+ * prop("fanSpeed", integerEnum([1, 2, 3]))
687
+ * ```
688
+ */
689
+ export function integerEnum<const V extends readonly number[]>(
690
+ values: V
691
+ ): EnumSchema & {
692
+ values: [...V]
693
+ } {
694
+ return { type: "enum", valueType: "integer", values: [...values] }
695
+ }