@sixb/core 0.2.2 → 0.2.4
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.
- package/dist/actions/index.js +56 -50
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/request.d.ts.map +1 -1
- package/dist/actions/run/executor.d.ts +0 -2
- package/dist/actions/run/executor.d.ts.map +1 -1
- package/dist/actions/types/context.d.ts +5 -1
- package/dist/actions/types/context.d.ts.map +1 -1
- package/dist/agents/cancel.d.ts +1 -1
- package/dist/agents/cancel.d.ts.map +1 -1
- package/dist/agents/child-question.d.ts +35 -2
- package/dist/agents/child-question.d.ts.map +1 -1
- package/dist/agents/execution.d.ts +3 -2
- package/dist/agents/execution.d.ts.map +1 -1
- package/dist/agents/fork.d.ts.map +1 -1
- package/dist/agents/ids.d.ts +2 -0
- package/dist/agents/ids.d.ts.map +1 -1
- package/dist/agents/index.d.ts +4 -4
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +91 -76
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/model-loop.d.ts.map +1 -1
- package/dist/agents/request.d.ts +7 -1
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/run-artifacts.d.ts +73 -10
- package/dist/agents/run-artifacts.d.ts.map +1 -1
- package/dist/agents/run-session-children.d.ts +9 -0
- package/dist/agents/run-session-children.d.ts.map +1 -1
- package/dist/agents/run-session-http.d.ts.map +1 -1
- package/dist/agents/run-session-serve.d.ts.map +1 -1
- package/dist/agents/run-session.d.ts +3 -0
- package/dist/agents/run-session.d.ts.map +1 -1
- package/dist/agents/streams/index.js +2 -2
- package/dist/agents/streams/internal.js +2 -2
- package/dist/agents/streams/protocol.d.ts.map +1 -1
- package/dist/agents/tool-files.d.ts +1 -1
- package/dist/agents/tool-files.d.ts.map +1 -1
- package/dist/agents/tool-input-coercion.d.ts +20 -0
- package/dist/agents/tool-input-coercion.d.ts.map +1 -0
- package/dist/agents/validation.d.ts +1 -1
- package/dist/agents/validation.d.ts.map +1 -1
- package/dist/artifacts/access.d.ts +37 -17
- package/dist/artifacts/access.d.ts.map +1 -1
- package/dist/artifacts/canvas-display.d.ts +65 -0
- package/dist/artifacts/canvas-display.d.ts.map +1 -0
- package/dist/artifacts/canvas.d.ts +6 -1
- package/dist/artifacts/canvas.d.ts.map +1 -1
- package/dist/artifacts/comment-text.d.ts +19 -0
- package/dist/artifacts/comment-text.d.ts.map +1 -0
- package/dist/artifacts/comments.d.ts +52 -0
- package/dist/artifacts/comments.d.ts.map +1 -0
- package/dist/artifacts/errors.d.ts +3 -3
- package/dist/artifacts/errors.d.ts.map +1 -1
- package/dist/artifacts/events.d.ts +14 -0
- package/dist/artifacts/events.d.ts.map +1 -0
- package/dist/artifacts/execution.d.ts +129 -22
- package/dist/artifacts/execution.d.ts.map +1 -1
- package/dist/artifacts/frames/assets.d.ts +12 -1
- package/dist/artifacts/frames/assets.d.ts.map +1 -1
- package/dist/artifacts/frames/grants.d.ts +8 -5
- package/dist/artifacts/frames/grants.d.ts.map +1 -1
- package/dist/artifacts/frames/index.d.ts +1 -1
- package/dist/artifacts/frames/index.d.ts.map +1 -1
- package/dist/artifacts/frames/index.js +32 -964
- package/dist/artifacts/frames/index.js.map +4 -8
- package/dist/artifacts/frames/kit.d.ts.map +1 -1
- package/dist/artifacts/frames/protocol.d.ts +129 -0
- package/dist/artifacts/frames/protocol.d.ts.map +1 -1
- package/dist/artifacts/frames/runtime.d.ts +24 -7
- package/dist/artifacts/frames/runtime.d.ts.map +1 -1
- package/dist/artifacts/holders.d.ts +23 -0
- package/dist/artifacts/holders.d.ts.map +1 -0
- package/dist/artifacts/ids.d.ts +2 -0
- package/dist/artifacts/ids.d.ts.map +1 -1
- package/dist/artifacts/index.d.ts +6 -4
- package/dist/artifacts/index.d.ts.map +1 -1
- package/dist/artifacts/index.js +134 -13
- package/dist/artifacts/index.js.map +5 -4
- package/dist/artifacts/limits.d.ts +24 -3
- package/dist/artifacts/limits.d.ts.map +1 -1
- package/dist/artifacts/live/board.d.ts +103 -0
- package/dist/artifacts/live/board.d.ts.map +1 -0
- package/dist/artifacts/live/diff.d.ts +43 -0
- package/dist/artifacts/live/diff.d.ts.map +1 -0
- package/dist/artifacts/live/document.d.ts +55 -0
- package/dist/artifacts/live/document.d.ts.map +1 -0
- package/dist/artifacts/live/files.d.ts +16 -0
- package/dist/artifacts/live/files.d.ts.map +1 -0
- package/dist/artifacts/live/index.d.ts +9 -0
- package/dist/artifacts/live/index.d.ts.map +1 -0
- package/dist/artifacts/live/index.js +593 -0
- package/dist/artifacts/live/index.js.map +10 -0
- package/dist/artifacts/live/presence.d.ts +55 -0
- package/dist/artifacts/live/presence.d.ts.map +1 -0
- package/dist/artifacts/live/protocol.d.ts +109 -0
- package/dist/artifacts/live/protocol.d.ts.map +1 -0
- package/dist/artifacts/live/protocol.js +21 -0
- package/dist/artifacts/live/protocol.js.map +9 -0
- package/dist/artifacts/live/server.d.ts +10 -0
- package/dist/artifacts/live/server.d.ts.map +1 -0
- package/dist/artifacts/live/server.js +86 -0
- package/dist/artifacts/live/server.js.map +9 -0
- package/dist/artifacts/live/state.d.ts +26 -0
- package/dist/artifacts/live/state.d.ts.map +1 -0
- package/dist/artifacts/outline.d.ts +11 -0
- package/dist/artifacts/outline.d.ts.map +1 -1
- package/dist/artifacts/publish/index.d.ts +8 -1
- package/dist/artifacts/publish/index.d.ts.map +1 -1
- package/dist/artifacts/publish/index.js +62 -34
- package/dist/artifacts/publish/index.js.map +1 -1
- package/dist/artifacts/publish/merge.d.ts +75 -0
- package/dist/artifacts/publish/merge.d.ts.map +1 -0
- package/dist/artifacts/publish/previews.d.ts +153 -0
- package/dist/artifacts/publish/previews.d.ts.map +1 -0
- package/dist/artifacts/publish/publish.d.ts +29 -8
- package/dist/artifacts/publish/publish.d.ts.map +1 -1
- package/dist/artifacts/publish/query-answers.d.ts +20 -0
- package/dist/artifacts/publish/query-answers.d.ts.map +1 -0
- package/dist/artifacts/publish/references.d.ts +4 -3
- package/dist/artifacts/publish/references.d.ts.map +1 -1
- package/dist/artifacts/publish/validate/canvas.d.ts.map +1 -1
- package/dist/artifacts/theme.d.ts +5 -1
- package/dist/artifacts/theme.d.ts.map +1 -1
- package/dist/auth/directory.d.ts +33 -0
- package/dist/auth/directory.d.ts.map +1 -0
- package/dist/auth/index.js +13 -12
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/member-events.d.ts +5 -1
- package/dist/auth/member-events.d.ts.map +1 -1
- package/dist/auth/runtime.d.ts +22 -1
- package/dist/auth/runtime.d.ts.map +1 -1
- package/dist/auth/strategy.d.ts +2 -2
- package/dist/auth/strategy.d.ts.map +1 -1
- package/dist/auth/types.d.ts +42 -1
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/authorization/decision.d.ts +6 -5
- package/dist/authorization/decision.d.ts.map +1 -1
- package/dist/authorization/event-visibility.d.ts.map +1 -1
- package/dist/authorization/index.js +7 -6
- package/dist/authorization/index.js.map +1 -1
- package/dist/blob-storage/index.js +4 -4
- package/dist/blob-storage/index.js.map +1 -1
- package/dist/bootstrap/index.js +63 -57
- package/dist/bootstrap/index.js.map +2 -2
- package/dist/broker/in-memory.d.ts.map +1 -1
- package/dist/broker/index.js +1 -1
- package/dist/broker/types.d.ts +4 -0
- package/dist/broker/types.d.ts.map +1 -1
- package/dist/{chunk-s7j8ewqv.js → chunk-0k3r5kb3.js} +257 -43
- package/dist/{chunk-s7j8ewqv.js.map → chunk-0k3r5kb3.js.map} +14 -13
- package/dist/{chunk-e5wf5vz0.js → chunk-0kgrghqx.js} +13 -1
- package/dist/chunk-0kgrghqx.js.map +10 -0
- package/dist/{chunk-80gym75n.js → chunk-186k5yz3.js} +1 -1
- package/dist/chunk-191jz8a6.js +61 -0
- package/dist/chunk-191jz8a6.js.map +10 -0
- package/dist/{chunk-mmagke4x.js → chunk-22d3qg4x.js} +2 -2
- package/dist/{chunk-mmagke4x.js.map → chunk-22d3qg4x.js.map} +3 -3
- package/dist/{chunk-ga63a3dz.js → chunk-2bn6813a.js} +3 -3
- package/dist/chunk-2c4j899j.js.map +2 -2
- package/dist/{chunk-e6xgz4h4.js → chunk-3014rfjz.js} +197 -18
- package/dist/chunk-3014rfjz.js.map +21 -0
- package/dist/{chunk-ytzcxtpt.js → chunk-3ba89vm7.js} +1 -1
- package/dist/chunk-3hzhcfsv.js +139 -0
- package/dist/chunk-3hzhcfsv.js.map +10 -0
- package/dist/chunk-3sgvd10b.js +69 -0
- package/dist/chunk-3sgvd10b.js.map +10 -0
- package/dist/chunk-3z1vxzcm.js +234 -0
- package/dist/chunk-3z1vxzcm.js.map +12 -0
- package/dist/{chunk-djs3hw9p.js → chunk-3zagkr6w.js} +73 -6
- package/dist/chunk-3zagkr6w.js.map +21 -0
- package/dist/{chunk-wkq3kvzd.js → chunk-48c1z8nj.js} +6 -6
- package/dist/chunk-48c1z8nj.js.map +10 -0
- package/dist/{chunk-d04g36fw.js → chunk-5qqmndhm.js} +1 -1
- package/dist/{chunk-scyq22td.js → chunk-5rqqp8cr.js} +19 -4
- package/dist/chunk-5rqqp8cr.js.map +12 -0
- package/dist/chunk-6ef4esq4.js +225 -0
- package/dist/chunk-6ef4esq4.js.map +11 -0
- package/dist/{chunk-jspskey0.js → chunk-7j4yydm2.js} +67 -45
- package/dist/chunk-7j4yydm2.js.map +11 -0
- package/dist/chunk-7kpqntgw.js +70 -0
- package/dist/chunk-7kpqntgw.js.map +10 -0
- package/dist/{chunk-5wtnmpze.js → chunk-7qe46788.js} +1 -1
- package/dist/{chunk-31kcqmhf.js → chunk-855w9nvw.js} +1 -1
- package/dist/{chunk-e7v3trpz.js → chunk-8a8k38tz.js} +4 -3
- package/dist/chunk-8a8k38tz.js.map +10 -0
- package/dist/chunk-8bns0y68.js +1322 -0
- package/dist/chunk-8bns0y68.js.map +25 -0
- package/dist/{chunk-jftd33rc.js → chunk-8t2ynwg0.js} +105 -9
- package/dist/chunk-8t2ynwg0.js.map +11 -0
- package/dist/{chunk-9whfmsfk.js → chunk-8tqnsx3q.js} +1 -1
- package/dist/{chunk-s3we74h8.js → chunk-9nsjjd44.js} +38 -5
- package/dist/chunk-9nsjjd44.js.map +12 -0
- package/dist/{chunk-hz5d43gn.js → chunk-9vsc919v.js} +14 -6
- package/dist/chunk-9vsc919v.js.map +10 -0
- package/dist/{chunk-waqk73p1.js → chunk-a6fjkcne.js} +185 -341
- package/dist/{chunk-waqk73p1.js.map → chunk-a6fjkcne.js.map} +6 -7
- package/dist/chunk-az95tsh3.js.map +2 -2
- package/dist/{chunk-s038wa5v.js → chunk-b9qfh2ya.js} +1 -1
- package/dist/{chunk-5taem5aw.js → chunk-bc3y6gff.js} +13 -4
- package/dist/chunk-bc3y6gff.js.map +10 -0
- package/dist/chunk-bz5bnjjt.js +358 -0
- package/dist/chunk-bz5bnjjt.js.map +12 -0
- package/dist/{chunk-w976a4me.js → chunk-czct88ht.js} +28 -4
- package/dist/chunk-czct88ht.js.map +10 -0
- package/dist/{chunk-5kyvrtjh.js → chunk-d9xbwh3h.js} +131 -32
- package/dist/chunk-d9xbwh3h.js.map +13 -0
- package/dist/{chunk-kfee1h52.js → chunk-dfveegqq.js} +28 -8
- package/dist/chunk-dfveegqq.js.map +13 -0
- package/dist/{chunk-2g0r46hy.js → chunk-dhkc9b23.js} +15 -2
- package/dist/chunk-dhkc9b23.js.map +12 -0
- package/dist/chunk-dmnd9ea6.js +106 -0
- package/dist/chunk-dmnd9ea6.js.map +10 -0
- package/dist/{chunk-nz7815t3.js → chunk-e0hnbb1m.js} +27 -2
- package/dist/chunk-e0hnbb1m.js.map +14 -0
- package/dist/chunk-e91fmg6t.js +288 -0
- package/dist/chunk-e91fmg6t.js.map +11 -0
- package/dist/{chunk-3sqqhpr7.js → chunk-evj5jxz3.js} +134 -19
- package/dist/{chunk-3sqqhpr7.js.map → chunk-evj5jxz3.js.map} +11 -10
- package/dist/{chunk-w122ymx4.js → chunk-f6ahf5gf.js} +15 -4
- package/dist/{chunk-w122ymx4.js.map → chunk-f6ahf5gf.js.map} +3 -3
- package/dist/{chunk-jjmggm9a.js → chunk-fe6r7yhg.js} +1 -1
- package/dist/{chunk-165c9wm6.js → chunk-g2ph4873.js} +1 -1
- package/dist/{chunk-dsv783c3.js → chunk-gxwy4c3s.js} +203 -57
- package/dist/chunk-gxwy4c3s.js.map +47 -0
- package/dist/chunk-hgj98cbb.js +22 -0
- package/dist/chunk-hgj98cbb.js.map +10 -0
- package/dist/chunk-hn2r7z41.js.map +3 -3
- package/dist/chunk-hvbvq7p4.js +1553 -0
- package/dist/chunk-hvbvq7p4.js.map +18 -0
- package/dist/chunk-j0wgh8gv.js +250 -0
- package/dist/chunk-j0wgh8gv.js.map +10 -0
- package/dist/{chunk-z8fx5cgb.js → chunk-j2zm215x.js} +37 -3
- package/dist/chunk-j2zm215x.js.map +12 -0
- package/dist/{chunk-j1ny5fwh.js → chunk-k1g14kk3.js} +11 -83
- package/dist/{chunk-j1ny5fwh.js.map → chunk-k1g14kk3.js.map} +4 -5
- package/dist/chunk-kr6dx38r.js +25 -0
- package/dist/chunk-kr6dx38r.js.map +10 -0
- package/dist/chunk-m2jerfef.js +474 -0
- package/dist/chunk-m2jerfef.js.map +11 -0
- package/dist/{chunk-m2vh8gh0.js → chunk-msyevpp3.js} +62 -15
- package/dist/{chunk-m2vh8gh0.js.map → chunk-msyevpp3.js.map} +5 -5
- package/dist/{chunk-escedwyt.js → chunk-mvz89age.js} +6 -1
- package/dist/{chunk-escedwyt.js.map → chunk-mvz89age.js.map} +3 -3
- package/dist/chunk-mwcqz3e3.js +30 -0
- package/dist/chunk-mwcqz3e3.js.map +10 -0
- package/dist/chunk-n2ay51px.js +21 -0
- package/dist/chunk-n2ay51px.js.map +10 -0
- package/dist/chunk-n4zzaf6q.js.map +1 -1
- package/dist/{chunk-gkv8r794.js → chunk-n68vz95m.js} +5 -5
- package/dist/{chunk-gkv8r794.js.map → chunk-n68vz95m.js.map} +3 -3
- package/dist/{chunk-0j3crh1w.js → chunk-p351afzm.js} +14 -14
- package/dist/{chunk-0j3crh1w.js.map → chunk-p351afzm.js.map} +4 -4
- package/dist/{chunk-c7cfe31p.js → chunk-p8pgnq8d.js} +16 -16
- package/dist/{chunk-c7cfe31p.js.map → chunk-p8pgnq8d.js.map} +1 -1
- package/dist/chunk-pk539cwv.js +370 -0
- package/dist/chunk-pk539cwv.js.map +11 -0
- package/dist/{chunk-jbw70d6t.js → chunk-ppxf7gw2.js} +52 -10
- package/dist/chunk-ppxf7gw2.js.map +11 -0
- package/dist/{chunk-9x8dybsb.js → chunk-pvpq483h.js} +10 -2
- package/dist/chunk-pvpq483h.js.map +10 -0
- package/dist/{chunk-4zm1k3xj.js → chunk-r2psmn42.js} +1 -1
- package/dist/{chunk-a7aa0nzj.js → chunk-r9rtavg9.js} +14 -14
- package/dist/{chunk-a7aa0nzj.js.map → chunk-r9rtavg9.js.map} +1 -1
- package/dist/{chunk-w1btn96n.js → chunk-rsrc7vtw.js} +523 -254
- package/dist/chunk-rsrc7vtw.js.map +49 -0
- package/dist/{chunk-2ajw5rz0.js → chunk-rsxb14an.js} +3 -3
- package/dist/{chunk-kkjfve0t.js → chunk-rt9deb92.js} +4 -3
- package/dist/{chunk-kkjfve0t.js.map → chunk-rt9deb92.js.map} +3 -3
- package/dist/{chunk-r1cxq7vv.js → chunk-rtdrm592.js} +2 -2
- package/dist/{chunk-a5v4gjdx.js → chunk-rtm1jq00.js} +460 -227
- package/dist/{chunk-a5v4gjdx.js.map → chunk-rtm1jq00.js.map} +25 -22
- package/dist/{chunk-4bm0caep.js → chunk-smnt672s.js} +1 -1
- package/dist/{chunk-21q0j5f2.js → chunk-stmxh0hv.js} +2 -2
- package/dist/{chunk-nh26e7c5.js → chunk-sysnvjce.js} +5 -5
- package/dist/{chunk-nh26e7c5.js.map → chunk-sysnvjce.js.map} +3 -3
- package/dist/{chunk-7z5rkf0m.js → chunk-t0s7b3d1.js} +4 -3
- package/dist/{chunk-7z5rkf0m.js.map → chunk-t0s7b3d1.js.map} +3 -3
- package/dist/{chunk-57g0215c.js → chunk-t24yktqr.js} +296 -7
- package/dist/{chunk-57g0215c.js.map → chunk-t24yktqr.js.map} +6 -3
- package/dist/{chunk-mbc5hvnj.js → chunk-td26wjr5.js} +18 -7
- package/dist/{chunk-mbc5hvnj.js.map → chunk-td26wjr5.js.map} +3 -3
- package/dist/{chunk-ff5xkv0p.js → chunk-tfzvjdms.js} +1 -1
- package/dist/{chunk-f1h34y3r.js → chunk-vepea5c3.js} +6 -6
- package/dist/{chunk-f1h34y3r.js.map → chunk-vepea5c3.js.map} +1 -1
- package/dist/chunk-vtjzwymr.js +37 -0
- package/dist/chunk-vtjzwymr.js.map +10 -0
- package/dist/{chunk-twfreyxr.js → chunk-vzkxqf8h.js} +23 -13
- package/dist/{chunk-twfreyxr.js.map → chunk-vzkxqf8h.js.map} +6 -6
- package/dist/{chunk-eqgr6nsa.js → chunk-w1wq7gfr.js} +983 -185
- package/dist/chunk-w1wq7gfr.js.map +75 -0
- package/dist/{chunk-6b61s40c.js → chunk-w3t94hm6.js} +1 -1
- package/dist/{chunk-fwsvshr5.js → chunk-wa05txmk.js} +20 -7
- package/dist/{chunk-fwsvshr5.js.map → chunk-wa05txmk.js.map} +3 -3
- package/dist/chunk-whbwf3np.js +12 -0
- package/dist/chunk-whbwf3np.js.map +10 -0
- package/dist/{chunk-t5608tkq.js → chunk-yv8hv4wq.js} +3 -1
- package/dist/{chunk-t5608tkq.js.map → chunk-yv8hv4wq.js.map} +3 -3
- package/dist/{chunk-j8thxj7w.js → chunk-yy914zfr.js} +1218 -101
- package/dist/chunk-yy914zfr.js.map +30 -0
- package/dist/connectors/builders.d.ts +2 -2
- package/dist/connectors/builders.d.ts.map +1 -1
- package/dist/connectors/connections/access.d.ts +11 -0
- package/dist/connectors/connections/access.d.ts.map +1 -0
- package/dist/connectors/connections/contracts.d.ts +6 -1
- package/dist/connectors/connections/contracts.d.ts.map +1 -1
- package/dist/connectors/connections/internal.js +1 -1
- package/dist/connectors/connections/runs.d.ts +6 -0
- package/dist/connectors/connections/runs.d.ts.map +1 -1
- package/dist/connectors/connections/service.d.ts +25 -0
- package/dist/connectors/connections/service.d.ts.map +1 -1
- package/dist/connectors/connections/views.d.ts +1 -1
- package/dist/connectors/connections/views.d.ts.map +1 -1
- package/dist/connectors/execution.d.ts.map +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.d.ts.map +1 -1
- package/dist/connectors/service.d.ts +3 -0
- package/dist/connectors/service.d.ts.map +1 -1
- package/dist/connectors/types.d.ts +21 -2
- package/dist/connectors/types.d.ts.map +1 -1
- package/dist/datasets/execution.d.ts +12 -6
- package/dist/datasets/execution.d.ts.map +1 -1
- package/dist/datasets/ingest-flush-batch.d.ts +59 -0
- package/dist/datasets/ingest-flush-batch.d.ts.map +1 -0
- package/dist/datasets/ingest-flush-job.d.ts +33 -0
- package/dist/datasets/ingest-flush-job.d.ts.map +1 -0
- package/dist/datasets/ingest-flush.d.ts +66 -0
- package/dist/datasets/ingest-flush.d.ts.map +1 -0
- package/dist/datasets/produced-version.d.ts +21 -0
- package/dist/datasets/produced-version.d.ts.map +1 -0
- package/dist/datasets/write.d.ts +22 -1
- package/dist/datasets/write.d.ts.map +1 -1
- package/dist/datasets/write.js +8 -4
- package/dist/datasets/write.js.map +1 -1
- package/dist/deploy/internal.js +5 -4
- package/dist/deploy/internal.js.map +4 -4
- package/dist/deploy/types.d.ts +2 -3
- package/dist/deploy/types.d.ts.map +1 -1
- package/dist/error-reporting/capability.d.ts +8 -2
- package/dist/error-reporting/capability.d.ts.map +1 -1
- package/dist/error-reporting/internal.d.ts +1 -1
- package/dist/error-reporting/internal.d.ts.map +1 -1
- package/dist/error-reporting/internal.js +17 -5
- package/dist/error-reporting/internal.js.map +1 -1
- package/dist/error-reporting/reporter.d.ts.map +1 -1
- package/dist/error-reporting/reports.d.ts +55 -0
- package/dist/error-reporting/reports.d.ts.map +1 -1
- package/dist/error-reporting/types.d.ts +82 -1
- package/dist/error-reporting/types.d.ts.map +1 -1
- package/dist/errors/catalog.d.ts +5 -0
- package/dist/errors/catalog.d.ts.map +1 -1
- package/dist/errors/internal.js +1 -1
- package/dist/events/definitions.d.ts +4 -0
- package/dist/events/definitions.d.ts.map +1 -1
- package/dist/events/execution.d.ts +1 -0
- package/dist/events/execution.d.ts.map +1 -1
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +5 -5
- package/dist/events/scope.d.ts.map +1 -1
- package/dist/events/scope.js +1 -1
- package/dist/events/selectors/index.js +2 -2
- package/dist/events/types/artifacts.d.ts +38 -0
- package/dist/events/types/artifacts.d.ts.map +1 -0
- package/dist/events/types/index.d.ts +3 -1
- package/dist/events/types/index.d.ts.map +1 -1
- package/dist/events/types/users.d.ts +5 -2
- package/dist/events/types/users.d.ts.map +1 -1
- package/dist/execution/agent.js +58 -52
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/authorized-object-reader.d.ts +10 -0
- package/dist/execution/authorized-object-reader.d.ts.map +1 -1
- package/dist/execution/object-reader-clearance.d.ts +6 -0
- package/dist/execution/object-reader-clearance.d.ts.map +1 -1
- package/dist/execution/object-reader-security.d.ts +9 -2
- package/dist/execution/object-reader-security.d.ts.map +1 -1
- package/dist/execution/primitive.js +56 -50
- package/dist/execution/primitive.js.map +1 -1
- package/dist/execution/request.js +50 -44
- package/dist/execution/request.js.map +2 -2
- package/dist/http/api-routes.d.ts +1 -1
- package/dist/http/api-routes.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +96 -88
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/errors.d.ts +15 -0
- package/dist/lake-storage/errors.d.ts.map +1 -1
- package/dist/lake-storage/index.d.ts +3 -2
- package/dist/lake-storage/index.d.ts.map +1 -1
- package/dist/lake-storage/index.js +16 -10
- package/dist/lake-storage/index.js.map +1 -1
- package/dist/lake-storage/maintenance.d.ts +88 -0
- package/dist/lake-storage/maintenance.d.ts.map +1 -0
- package/dist/lake-storage/merge.d.ts +3 -1
- package/dist/lake-storage/merge.d.ts.map +1 -1
- package/dist/lake-storage/source-ordering.d.ts +23 -0
- package/dist/lake-storage/source-ordering.d.ts.map +1 -1
- package/dist/lake-storage/types.d.ts +10 -0
- package/dist/lake-storage/types.d.ts.map +1 -1
- package/dist/maintenance/heartbeat.d.ts +5 -0
- package/dist/maintenance/heartbeat.d.ts.map +1 -0
- package/dist/maintenance/index.d.ts +4 -2
- package/dist/maintenance/index.d.ts.map +1 -1
- package/dist/maintenance/index.js +515 -0
- package/dist/maintenance/index.js.map +16 -0
- package/dist/maintenance/lake-retention-status.d.ts +36 -0
- package/dist/maintenance/lake-retention-status.d.ts.map +1 -0
- package/dist/maintenance/lake-retention.d.ts +84 -0
- package/dist/maintenance/lake-retention.d.ts.map +1 -0
- package/dist/maintenance/loop.d.ts +95 -0
- package/dist/maintenance/loop.d.ts.map +1 -0
- package/dist/maintenance/ontology-maintenance.d.ts +17 -16
- package/dist/maintenance/ontology-maintenance.d.ts.map +1 -1
- package/dist/maintenance/passes/cron-pass.d.ts +21 -0
- package/dist/maintenance/passes/cron-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/directory-pass.d.ts +12 -0
- package/dist/maintenance/passes/directory-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/ingest-pass.d.ts +26 -0
- package/dist/maintenance/passes/ingest-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/lake-change-feed.d.ts +38 -0
- package/dist/maintenance/passes/lake-change-feed.d.ts.map +1 -0
- package/dist/maintenance/passes/lake-retention-pass.d.ts +20 -0
- package/dist/maintenance/passes/lake-retention-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/ontology-pass.d.ts +8 -0
- package/dist/maintenance/passes/ontology-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/projections-pass.d.ts +26 -0
- package/dist/maintenance/passes/projections-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/recovery-pass.d.ts +6 -0
- package/dist/maintenance/passes/recovery-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/recovery-passes.d.ts +24 -0
- package/dist/maintenance/passes/recovery-passes.d.ts.map +1 -0
- package/dist/maintenance/passes/runs-pass.d.ts +6 -0
- package/dist/maintenance/passes/runs-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/triggers-pass.d.ts +41 -0
- package/dist/maintenance/passes/triggers-pass.d.ts.map +1 -0
- package/dist/maintenance/status.d.ts +19 -0
- package/dist/maintenance/status.d.ts.map +1 -0
- package/dist/maintenance/types.d.ts +25 -24
- package/dist/maintenance/types.d.ts.map +1 -1
- package/dist/materialization/model.d.ts +11 -2
- package/dist/materialization/model.d.ts.map +1 -1
- package/dist/materializer/edits/artifact-refs.d.ts +33 -0
- package/dist/materializer/edits/artifact-refs.d.ts.map +1 -0
- package/dist/materializer/edits/commit.d.ts.map +1 -1
- package/dist/materializer/edits/operations.d.ts +7 -1
- package/dist/materializer/edits/operations.d.ts.map +1 -1
- package/dist/materializer/edits/plan.d.ts.map +1 -1
- package/dist/materializer/execution/work-records.d.ts +6 -0
- package/dist/materializer/execution/work-records.d.ts.map +1 -1
- package/dist/materializer/index.js +31 -28
- package/dist/materializer/index.js.map +1 -1
- package/dist/materializer/projections/replacement-plan.d.ts.map +1 -1
- package/dist/materializer/shared/normalize.d.ts.map +1 -1
- package/dist/materializer/telemetry/plan.d.ts.map +1 -1
- package/dist/models/execution/index.js +30 -27
- package/dist/models/execution/index.js.map +1 -1
- package/dist/models/language-model.d.ts +6 -0
- package/dist/models/language-model.d.ts.map +1 -1
- package/dist/models/tools.d.ts +2 -0
- package/dist/models/tools.d.ts.map +1 -1
- package/dist/objects/artifact-refs.d.ts +5 -0
- package/dist/objects/artifact-refs.d.ts.map +1 -0
- package/dist/objects/index.js +59 -54
- package/dist/objects/index.js.map +1 -1
- package/dist/objects/materializer-adapter.d.ts +4 -3
- package/dist/objects/materializer-adapter.d.ts.map +1 -1
- package/dist/objects/object/upsert-batch.d.ts.map +1 -1
- package/dist/objects/object/upsert.d.ts.map +1 -1
- package/dist/objects/query/index.js +29 -26
- package/dist/objects/query/index.js.map +1 -1
- package/dist/objects/query/ir.d.ts +3 -1
- package/dist/objects/query/ir.d.ts.map +1 -1
- package/dist/objects/query/scalar-values.d.ts.map +1 -1
- package/dist/objects/runtime-batch.d.ts +2 -0
- package/dist/objects/runtime-batch.d.ts.map +1 -1
- package/dist/ontology/artifact-ref.d.ts +36 -0
- package/dist/ontology/artifact-ref.d.ts.map +1 -0
- package/dist/ontology/docs-markdown.d.ts.map +1 -1
- package/dist/ontology/index.d.ts +3 -1
- package/dist/ontology/index.d.ts.map +1 -1
- package/dist/ontology/index.js +8 -5
- package/dist/ontology/index.js.map +1 -1
- package/dist/ontology/inference/index.d.ts +2 -0
- package/dist/ontology/inference/index.d.ts.map +1 -1
- package/dist/ontology/internal.js +7 -6
- package/dist/ontology/internal.js.map +1 -1
- package/dist/ontology/json-schema.d.ts.map +1 -1
- package/dist/ontology/primitives.d.ts.map +1 -1
- package/dist/ontology/reference-values.d.ts +10 -0
- package/dist/ontology/reference-values.d.ts.map +1 -0
- package/dist/ontology/refs.d.ts +6 -1
- package/dist/ontology/refs.d.ts.map +1 -1
- package/dist/ontology/registry.d.ts +9 -1
- package/dist/ontology/registry.d.ts.map +1 -1
- package/dist/ontology/types.d.ts +2 -1
- package/dist/ontology/types.d.ts.map +1 -1
- package/dist/ontology/user-ref.d.ts +16 -0
- package/dist/ontology/user-ref.d.ts.map +1 -1
- package/dist/ontology/validation/normalize.d.ts.map +1 -1
- package/dist/ontology/validation/properties.d.ts.map +1 -1
- package/dist/ontology/validation/schema.d.ts.map +1 -1
- package/dist/pending-tasks.d.ts +17 -0
- package/dist/pending-tasks.d.ts.map +1 -0
- package/dist/pipelines/index.js +37 -34
- package/dist/pipelines/index.js.map +1 -1
- package/dist/pipelines/run-dispatch.d.ts +6 -0
- package/dist/pipelines/run-dispatch.d.ts.map +1 -1
- package/dist/predicates/types.d.ts +4 -0
- package/dist/predicates/types.d.ts.map +1 -1
- package/dist/projections/builders.d.ts +13 -11
- package/dist/projections/builders.d.ts.map +1 -1
- package/dist/projections/internal.js +30 -27
- package/dist/projections/internal.js.map +1 -1
- package/dist/projections/types.d.ts +1 -1
- package/dist/projections/types.d.ts.map +1 -1
- package/dist/projections/validation.d.ts +2 -2
- package/dist/projections/validation.d.ts.map +1 -1
- package/dist/queues/in-memory.d.ts +6 -1
- package/dist/queues/in-memory.d.ts.map +1 -1
- package/dist/queues/index.d.ts +1 -1
- package/dist/queues/index.d.ts.map +1 -1
- package/dist/queues/index.js +1 -1
- package/dist/queues/types.d.ts +55 -2
- package/dist/queues/types.d.ts.map +1 -1
- package/dist/runtime/create.d.ts +3 -0
- package/dist/runtime/create.d.ts.map +1 -1
- package/dist/runtime/host.d.ts +22 -5
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +0 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/internal.d.ts +6 -0
- package/dist/runtime/internal.d.ts.map +1 -1
- package/dist/runtime/internal.js +52 -31
- package/dist/runtime/internal.js.map +1 -1
- package/dist/runtime/sixb.d.ts +6 -1
- package/dist/runtime/sixb.d.ts.map +1 -1
- package/dist/sandboxes/index.js +8 -7
- package/dist/sandboxes/index.js.map +1 -1
- package/dist/scheduler/index.d.ts +0 -2
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/index.js +3 -6
- package/dist/scheduler/index.js.map +1 -1
- package/dist/schedules/index.js +9 -11
- package/dist/schedules/index.js.map +1 -1
- package/dist/security/internal.js +1 -1
- package/dist/shared/backoff.d.ts +12 -0
- package/dist/shared/backoff.d.ts.map +1 -0
- package/dist/shared/duration.d.ts +3 -0
- package/dist/shared/duration.d.ts.map +1 -0
- package/dist/shared/params/artifact-refs.d.ts +19 -0
- package/dist/shared/params/artifact-refs.d.ts.map +1 -0
- package/dist/shares/guest-name.d.ts +8 -0
- package/dist/shares/guest-name.d.ts.map +1 -0
- package/dist/shares/internal.d.ts +1 -0
- package/dist/shares/internal.d.ts.map +1 -1
- package/dist/shares/internal.js +69 -28
- package/dist/shares/internal.js.map +3 -3
- package/dist/shares/session-protocol.d.ts +13 -0
- package/dist/shares/session-protocol.d.ts.map +1 -1
- package/dist/storage/action-runs/failure.js +2 -2
- package/dist/storage/agents/provider.js +1 -1
- package/dist/storage/agents/types.d.ts +1 -1
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/ai-limits/enforcement.js +2 -2
- package/dist/storage/artifacts/errors.d.ts +9 -4
- package/dist/storage/artifacts/errors.d.ts.map +1 -1
- package/dist/storage/artifacts/in-memory.d.ts +27 -4
- package/dist/storage/artifacts/in-memory.d.ts.map +1 -1
- package/dist/storage/artifacts/index.d.ts +1 -1
- package/dist/storage/artifacts/index.d.ts.map +1 -1
- package/dist/storage/artifacts/record.d.ts +39 -2
- package/dist/storage/artifacts/record.d.ts.map +1 -1
- package/dist/storage/artifacts/types.d.ts +328 -39
- package/dist/storage/artifacts/types.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/auth-storage.d.ts +2 -1
- package/dist/storage/auth/in-memory/auth-storage.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/identities.d.ts +4 -0
- package/dist/storage/auth/in-memory/identities.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/shared.d.ts +3 -1
- package/dist/storage/auth/in-memory/shared.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/users.d.ts.map +1 -1
- package/dist/storage/auth/index.d.ts +1 -1
- package/dist/storage/auth/index.d.ts.map +1 -1
- package/dist/storage/auth/types.d.ts +39 -0
- package/dist/storage/auth/types.d.ts.map +1 -1
- package/dist/storage/connector-connections/in-memory.d.ts +1 -1
- package/dist/storage/connector-connections/in-memory.d.ts.map +1 -1
- package/dist/storage/connector-connections/index.d.ts +1 -1
- package/dist/storage/connector-connections/index.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider/runs.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider/shared.d.ts +12 -2
- package/dist/storage/connector-connections/provider/shared.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider.d.ts +1 -0
- package/dist/storage/connector-connections/provider.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider.js +21 -5
- package/dist/storage/connector-connections/provider.js.map +5 -5
- package/dist/storage/connector-connections/types.d.ts +1 -1
- package/dist/storage/connector-connections/types.d.ts.map +1 -1
- package/dist/storage/dataset-ingest/codec.d.ts +6 -0
- package/dist/storage/dataset-ingest/codec.d.ts.map +1 -0
- package/dist/storage/dataset-ingest/in-memory.d.ts +28 -0
- package/dist/storage/dataset-ingest/in-memory.d.ts.map +1 -0
- package/dist/storage/dataset-ingest/index.d.ts +4 -0
- package/dist/storage/dataset-ingest/index.d.ts.map +1 -0
- package/dist/storage/dataset-ingest/provider.d.ts +157 -0
- package/dist/storage/dataset-ingest/provider.d.ts.map +1 -0
- package/dist/storage/dataset-ingest/provider.js +17 -0
- package/dist/storage/dataset-ingest/provider.js.map +9 -0
- package/dist/storage/dataset-ingest/types.d.ts +188 -0
- package/dist/storage/dataset-ingest/types.d.ts.map +1 -0
- package/dist/storage/file-upload-sessions/provider.js +12 -11
- package/dist/storage/file-upload-sessions/provider.js.map +1 -1
- package/dist/storage/in-memory/index.d.ts +12 -0
- package/dist/storage/in-memory/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +18 -11
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +56 -46
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.d.ts +4 -1
- package/dist/storage/internal.d.ts.map +1 -1
- package/dist/storage/internal.js +81 -5
- package/dist/storage/internal.js.map +4 -3
- package/dist/storage/lake-retention-runs/in-memory.d.ts +11 -0
- package/dist/storage/lake-retention-runs/in-memory.d.ts.map +1 -0
- package/dist/storage/lake-retention-runs/index.d.ts +3 -0
- package/dist/storage/lake-retention-runs/index.d.ts.map +1 -0
- package/dist/storage/lake-retention-runs/types.d.ts +21 -0
- package/dist/storage/lake-retention-runs/types.d.ts.map +1 -0
- package/dist/storage/maintenance-heartbeats/in-memory.d.ts +11 -0
- package/dist/storage/maintenance-heartbeats/in-memory.d.ts.map +1 -0
- package/dist/storage/maintenance-heartbeats/index.d.ts +3 -0
- package/dist/storage/maintenance-heartbeats/index.d.ts.map +1 -0
- package/dist/storage/maintenance-heartbeats/record.d.ts +11 -0
- package/dist/storage/maintenance-heartbeats/record.d.ts.map +1 -0
- package/dist/storage/maintenance-heartbeats/types.d.ts +30 -0
- package/dist/storage/maintenance-heartbeats/types.d.ts.map +1 -0
- package/dist/storage/objects/in-memory/query.d.ts.map +1 -1
- package/dist/storage/objects/in-memory/storage.d.ts +15 -1
- package/dist/storage/objects/in-memory/storage.d.ts.map +1 -1
- package/dist/storage/objects/read-scope.d.ts.map +1 -1
- package/dist/storage/objects/types.d.ts +18 -1
- package/dist/storage/objects/types.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/replacement-plans.d.ts.map +1 -1
- package/dist/storage/ontology/index.d.ts +1 -1
- package/dist/storage/ontology/index.d.ts.map +1 -1
- package/dist/storage/ontology/materializations.d.ts +20 -0
- package/dist/storage/ontology/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/provider-work.d.ts +7 -1
- package/dist/storage/ontology/provider-work.d.ts.map +1 -1
- package/dist/storage/ontology/provider.js +1 -1
- package/dist/storage/pipeline-runs/in-memory.d.ts +8 -2
- package/dist/storage/pipeline-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/pipeline-runs/index.d.ts +1 -1
- package/dist/storage/pipeline-runs/index.d.ts.map +1 -1
- package/dist/storage/pipeline-runs/provider.js +1 -1
- package/dist/storage/pipeline-runs/transitions.d.ts +2 -2
- package/dist/storage/pipeline-runs/transitions.d.ts.map +1 -1
- package/dist/storage/pipeline-runs/types.d.ts +26 -6
- package/dist/storage/pipeline-runs/types.d.ts.map +1 -1
- package/dist/storage/projection-runs/errors.d.ts +6 -0
- package/dist/storage/projection-runs/errors.d.ts.map +1 -1
- package/dist/storage/projection-runs/in-memory.d.ts +5 -1
- package/dist/storage/projection-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/projection-runs/index.d.ts +2 -2
- package/dist/storage/projection-runs/index.d.ts.map +1 -1
- package/dist/storage/projection-runs/lifecycle.d.ts +1 -0
- package/dist/storage/projection-runs/lifecycle.d.ts.map +1 -1
- package/dist/storage/projection-runs/provider.js +2 -2
- package/dist/storage/projection-runs/types.d.ts +16 -0
- package/dist/storage/projection-runs/types.d.ts.map +1 -1
- package/dist/storage/run-claim.d.ts +132 -0
- package/dist/storage/run-claim.d.ts.map +1 -0
- package/dist/storage/share-grants/provider.js +3 -3
- package/dist/storage/share-sessions/in-memory.d.ts +2 -1
- package/dist/storage/share-sessions/in-memory.d.ts.map +1 -1
- package/dist/storage/share-sessions/index.d.ts +1 -1
- package/dist/storage/share-sessions/index.d.ts.map +1 -1
- package/dist/storage/share-sessions/provider.d.ts +1 -1
- package/dist/storage/share-sessions/provider.d.ts.map +1 -1
- package/dist/storage/share-sessions/provider.js +4 -2
- package/dist/storage/share-sessions/provider.js.map +1 -1
- package/dist/storage/share-sessions/record.d.ts +2 -1
- package/dist/storage/share-sessions/record.d.ts.map +1 -1
- package/dist/storage/share-sessions/types.d.ts +17 -1
- package/dist/storage/share-sessions/types.d.ts.map +1 -1
- package/dist/storage/sync-runs/in-memory.d.ts +10 -2
- package/dist/storage/sync-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/sync-runs/index.d.ts +1 -1
- package/dist/storage/sync-runs/index.d.ts.map +1 -1
- package/dist/storage/sync-runs/transitions.d.ts +2 -2
- package/dist/storage/sync-runs/transitions.d.ts.map +1 -1
- package/dist/storage/sync-runs/types.d.ts +29 -3
- package/dist/storage/sync-runs/types.d.ts.map +1 -1
- package/dist/storage/types.d.ts +12 -6
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/storage/webhook-runs/in-memory.d.ts +2 -1
- package/dist/storage/webhook-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/webhook-runs/index.d.ts +2 -2
- package/dist/storage/webhook-runs/index.d.ts.map +1 -1
- package/dist/storage/webhook-runs/types.d.ts +33 -2
- package/dist/storage/webhook-runs/types.d.ts.map +1 -1
- package/dist/storage/workflow-runs/in-memory.d.ts +6 -3
- package/dist/storage/workflow-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/workflow-runs/index.d.ts +1 -1
- package/dist/storage/workflow-runs/index.d.ts.map +1 -1
- package/dist/storage/workflow-runs/provider.js +12 -11
- package/dist/storage/workflow-runs/provider.js.map +1 -1
- package/dist/storage/workflow-runs/types.d.ts +11 -28
- package/dist/storage/workflow-runs/types.d.ts.map +1 -1
- package/dist/syncs/index.js +38 -35
- package/dist/syncs/index.js.map +1 -1
- package/dist/syncs/run-dispatch.d.ts +2 -0
- package/dist/syncs/run-dispatch.d.ts.map +1 -1
- package/dist/testing/ai-model-call-groups-contract.d.ts.map +1 -1
- package/dist/testing/artifact-holders-contract.d.ts +15 -0
- package/dist/testing/artifact-holders-contract.d.ts.map +1 -0
- package/dist/testing/artifact-storage-contract.d.ts.map +1 -1
- package/dist/testing/auth-storage-contract.d.ts.map +1 -1
- package/dist/testing/broker-contract.d.ts.map +1 -1
- package/dist/testing/connector-connection-storage-contract.d.ts +1 -1
- package/dist/testing/connector-connection-storage-contract.d.ts.map +1 -1
- package/dist/testing/dataset-ingest-storage-contract.d.ts +11 -0
- package/dist/testing/dataset-ingest-storage-contract.d.ts.map +1 -0
- package/dist/testing/dataset-sequence-contract.d.ts +1 -1
- package/dist/testing/dataset-sequence-contract.d.ts.map +1 -1
- package/dist/testing/execution.d.ts.map +1 -1
- package/dist/testing/index.d.ts +8 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +6245 -3192
- package/dist/testing/index.js.map +28 -19
- package/dist/testing/lake-retention-run-storage-contract.d.ts +9 -0
- package/dist/testing/lake-retention-run-storage-contract.d.ts.map +1 -0
- package/dist/testing/maintenance-heartbeat-storage-contract.d.ts +9 -0
- package/dist/testing/maintenance-heartbeat-storage-contract.d.ts.map +1 -0
- package/dist/testing/object-query-contract.d.ts.map +1 -1
- package/dist/testing/pipeline-execution.d.ts.map +1 -1
- package/dist/testing/pipeline-run-read-contract.d.ts +13 -0
- package/dist/testing/pipeline-run-read-contract.d.ts.map +1 -0
- package/dist/testing/projection-run-storage-contract.d.ts.map +1 -1
- package/dist/testing/queues-contract.d.ts.map +1 -1
- package/dist/testing/run-claim-storage-contract.d.ts +12 -0
- package/dist/testing/run-claim-storage-contract.d.ts.map +1 -0
- package/dist/testing/run-claim.d.ts +30 -0
- package/dist/testing/run-claim.d.ts.map +1 -0
- package/dist/testing/run-recovery-contract.d.ts +49 -0
- package/dist/testing/run-recovery-contract.d.ts.map +1 -0
- package/dist/testing/share-session-storage-contract.d.ts.map +1 -1
- package/dist/testing/stored-artifacts.d.ts +10 -0
- package/dist/testing/stored-artifacts.d.ts.map +1 -0
- package/dist/testing/sync-execution.d.ts.map +1 -1
- package/dist/testing/webhook-execution.d.ts +1 -1
- package/dist/testing/webhook-execution.d.ts.map +1 -1
- package/dist/testing/webhook-run-storage-contract.d.ts.map +1 -1
- package/dist/users/execution.d.ts +18 -1
- package/dist/users/execution.d.ts.map +1 -1
- package/dist/users/index.d.ts +1 -1
- package/dist/users/index.d.ts.map +1 -1
- package/dist/webhooks/delivery-lease.d.ts +13 -0
- package/dist/webhooks/delivery-lease.d.ts.map +1 -0
- package/dist/webhooks/internal.d.ts +2 -0
- package/dist/webhooks/internal.d.ts.map +1 -1
- package/dist/webhooks/internal.js +68 -36
- package/dist/webhooks/internal.js.map +5 -4
- package/dist/webhooks/run-admission.d.ts.map +1 -1
- package/dist/workers/index.d.ts +5 -1
- package/dist/workers/index.d.ts.map +1 -1
- package/dist/workers/index.js +193 -58
- package/dist/workers/index.js.map +8 -7
- package/dist/workers/job-ids.d.ts +17 -0
- package/dist/workers/job-ids.d.ts.map +1 -0
- package/dist/workers/lost-projection-runs.d.ts +26 -0
- package/dist/workers/lost-projection-runs.d.ts.map +1 -0
- package/dist/workers/lost-runs.d.ts +51 -0
- package/dist/workers/lost-runs.d.ts.map +1 -0
- package/dist/workers/queue-delivery.d.ts.map +1 -1
- package/dist/workers/queue-worker.d.ts +1 -2
- package/dist/workers/queue-worker.d.ts.map +1 -1
- package/dist/workers/queued-run-dispatch.d.ts +90 -0
- package/dist/workers/queued-run-dispatch.d.ts.map +1 -0
- package/dist/workers/run-lease.d.ts +25 -0
- package/dist/workers/run-lease.d.ts.map +1 -0
- package/dist/workers/run-worker.d.ts +95 -0
- package/dist/workers/run-worker.d.ts.map +1 -0
- package/dist/workflows/index.js +64 -58
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/request.d.ts.map +1 -1
- package/dist/workflows/run-dispatch.d.ts +6 -1
- package/dist/workflows/run-dispatch.d.ts.map +1 -1
- package/package.json +41 -3
- package/src/actions/request.ts +24 -7
- package/src/actions/run/executor.ts +9 -42
- package/src/actions/types/context.ts +8 -3
- package/src/agents/approval-outcome.ts +2 -2
- package/src/agents/cancel.ts +2 -2
- package/src/agents/child-question.ts +76 -8
- package/src/agents/execution.ts +11 -3
- package/src/agents/fork.ts +12 -4
- package/src/agents/ids.ts +4 -1
- package/src/agents/index.ts +16 -3
- package/src/agents/model-loop.ts +3 -1
- package/src/agents/request.ts +42 -31
- package/src/agents/run-artifacts.ts +290 -46
- package/src/agents/run-session-children.ts +33 -0
- package/src/agents/run-session-http.ts +5 -0
- package/src/agents/run-session-serve.ts +11 -0
- package/src/agents/run-session.ts +8 -1
- package/src/agents/streams/protocol.ts +5 -10
- package/src/agents/tool-files.ts +1 -1
- package/src/agents/tool-input-coercion.ts +140 -0
- package/src/agents/validation.ts +12 -1
- package/src/artifacts/access.ts +71 -28
- package/src/artifacts/canvas-display.ts +160 -0
- package/src/artifacts/canvas.ts +26 -1
- package/src/artifacts/comment-text.ts +32 -0
- package/src/artifacts/comments.ts +275 -0
- package/src/artifacts/errors.ts +6 -1
- package/src/artifacts/events.ts +58 -0
- package/src/artifacts/execution.ts +496 -53
- package/src/artifacts/frames/assets.ts +20 -1
- package/src/artifacts/frames/grants.ts +31 -10
- package/src/artifacts/frames/index.ts +2 -0
- package/src/artifacts/frames/kit.ts +8 -5
- package/src/artifacts/frames/protocol.ts +231 -0
- package/src/artifacts/frames/runtime.ts +600 -29
- package/src/artifacts/holders.ts +120 -0
- package/src/artifacts/ids.ts +8 -0
- package/src/artifacts/index.ts +31 -2
- package/src/artifacts/limits.ts +28 -4
- package/src/artifacts/live/board.ts +759 -0
- package/src/artifacts/live/diff.ts +297 -0
- package/src/artifacts/live/document.ts +354 -0
- package/src/artifacts/live/files.ts +82 -0
- package/src/artifacts/live/index.ts +50 -0
- package/src/artifacts/live/presence.ts +144 -0
- package/src/artifacts/live/protocol.ts +134 -0
- package/src/artifacts/live/server.ts +16 -0
- package/src/artifacts/live/state.ts +115 -0
- package/src/artifacts/outline.ts +12 -0
- package/src/artifacts/publish/index.ts +26 -1
- package/src/artifacts/publish/merge.ts +271 -0
- package/src/artifacts/publish/previews.ts +485 -0
- package/src/artifacts/publish/publish.ts +92 -39
- package/src/artifacts/publish/query-answers.ts +85 -0
- package/src/artifacts/publish/references.ts +10 -4
- package/src/artifacts/publish/validate/canvas.ts +133 -1
- package/src/artifacts/theme.ts +9 -1
- package/src/auth/directory.ts +166 -0
- package/src/auth/member-events.ts +10 -3
- package/src/auth/runtime.ts +108 -8
- package/src/auth/strategy.ts +3 -1
- package/src/auth/types.ts +44 -0
- package/src/authorization/decision.ts +6 -5
- package/src/authorization/event-visibility.ts +4 -0
- package/src/broker/in-memory.ts +33 -6
- package/src/broker/types.ts +4 -0
- package/src/connectors/builders.ts +34 -2
- package/src/connectors/connections/access.ts +83 -0
- package/src/connectors/connections/contracts.ts +6 -1
- package/src/connectors/connections/execution.ts +2 -2
- package/src/connectors/connections/runs.ts +51 -2
- package/src/connectors/connections/service.ts +208 -41
- package/src/connectors/connections/views.ts +11 -4
- package/src/connectors/execution.ts +27 -3
- package/src/connectors/index.ts +2 -0
- package/src/connectors/service.ts +12 -0
- package/src/connectors/types.ts +37 -2
- package/src/datasets/execution.ts +74 -37
- package/src/datasets/ingest-flush-batch.ts +289 -0
- package/src/datasets/ingest-flush-job.ts +112 -0
- package/src/datasets/ingest-flush.ts +377 -0
- package/src/datasets/produced-version.ts +55 -0
- package/src/datasets/write.ts +65 -11
- package/src/deploy/services.ts +1 -1
- package/src/deploy/types.ts +2 -3
- package/src/deploy/validation.ts +1 -0
- package/src/error-reporting/capability.ts +66 -0
- package/src/error-reporting/internal.ts +12 -0
- package/src/error-reporting/reporter.ts +11 -35
- package/src/error-reporting/reports.ts +167 -0
- package/src/error-reporting/types.ts +99 -0
- package/src/errors/catalog.ts +6 -0
- package/src/events/definitions.ts +14 -0
- package/src/events/execution.ts +77 -28
- package/src/events/index.ts +3 -0
- package/src/events/scope.ts +2 -0
- package/src/events/types/artifacts.ts +40 -0
- package/src/events/types/index.ts +3 -0
- package/src/events/types/users.ts +5 -2
- package/src/execution/authorized-object-reader.ts +34 -0
- package/src/execution/object-reader-clearance.ts +31 -0
- package/src/execution/object-reader-security.ts +33 -13
- package/src/http/api-routes.ts +106 -5
- package/src/index.ts +22 -4
- package/src/lake-storage/errors.ts +21 -0
- package/src/lake-storage/index.ts +9 -1
- package/src/lake-storage/maintenance.ts +93 -0
- package/src/lake-storage/merge.ts +3 -1
- package/src/lake-storage/source-ordering.ts +28 -2
- package/src/lake-storage/types.ts +14 -0
- package/src/maintenance/heartbeat.ts +14 -0
- package/src/maintenance/index.ts +5 -3
- package/src/maintenance/lake-retention-status.ts +81 -0
- package/src/maintenance/lake-retention.ts +347 -0
- package/src/maintenance/loop.ts +365 -0
- package/src/maintenance/ontology-maintenance.ts +76 -229
- package/src/maintenance/passes/cron-pass.ts +217 -0
- package/src/maintenance/passes/directory-pass.ts +22 -0
- package/src/maintenance/passes/ingest-pass.ts +94 -0
- package/src/maintenance/passes/lake-change-feed.ts +112 -0
- package/src/maintenance/passes/lake-retention-pass.ts +71 -0
- package/src/maintenance/passes/ontology-pass.ts +19 -0
- package/src/maintenance/passes/projections-pass.ts +238 -0
- package/src/maintenance/passes/recovery-pass.ts +17 -0
- package/src/maintenance/passes/recovery-passes.ts +39 -0
- package/src/maintenance/passes/runs-pass.ts +12 -0
- package/src/maintenance/passes/triggers-pass.ts +332 -0
- package/src/maintenance/status.ts +75 -0
- package/src/maintenance/types.ts +27 -25
- package/src/materialization/model.ts +33 -21
- package/src/materializer/README.md +13 -2
- package/src/materializer/edits/artifact-refs.ts +140 -0
- package/src/materializer/edits/commit.ts +20 -7
- package/src/materializer/edits/operations.ts +23 -7
- package/src/materializer/edits/plan.ts +2 -0
- package/src/materializer/execution/work-records.ts +61 -0
- package/src/materializer/projections/replacement-plan.ts +2 -0
- package/src/materializer/shared/normalize.ts +14 -0
- package/src/materializer/telemetry/plan.ts +2 -0
- package/src/models/language-model.ts +6 -0
- package/src/models/tools.ts +2 -0
- package/src/objects/artifact-refs.ts +34 -0
- package/src/objects/materializer-adapter.ts +8 -3
- package/src/objects/object/upsert-batch.ts +7 -0
- package/src/objects/object/upsert.ts +11 -2
- package/src/objects/query/ir.ts +2 -0
- package/src/objects/query/scalar-values.ts +5 -3
- package/src/objects/runtime-batch.ts +8 -1
- package/src/objects/vectors/README.md +4 -4
- package/src/ontology/artifact-ref.ts +83 -0
- package/src/ontology/docs-markdown.ts +17 -0
- package/src/ontology/index.ts +3 -1
- package/src/ontology/inference/index.ts +2 -0
- package/src/ontology/json-schema.ts +13 -0
- package/src/ontology/primitives.ts +14 -0
- package/src/ontology/reference-values.ts +62 -0
- package/src/ontology/refs.ts +7 -1
- package/src/ontology/registry.ts +26 -1
- package/src/ontology/types.ts +2 -0
- package/src/ontology/user-ref.ts +35 -45
- package/src/ontology/validation/normalize.ts +13 -0
- package/src/ontology/validation/properties.ts +9 -0
- package/src/ontology/validation/schema.ts +12 -0
- package/src/pending-tasks.ts +51 -0
- package/src/pipelines/run-dispatch.ts +120 -238
- package/src/predicates/types.ts +2 -1
- package/src/projections/builders.ts +28 -13
- package/src/projections/run-dispatch.ts +1 -1
- package/src/projections/types.ts +1 -1
- package/src/projections/validation.ts +22 -8
- package/src/queues/in-memory.ts +50 -3
- package/src/queues/index.ts +4 -0
- package/src/queues/types.ts +68 -1
- package/src/runtime/create.ts +4 -0
- package/src/runtime/host.ts +118 -13
- package/src/runtime/index.ts +0 -1
- package/src/runtime/internal.ts +13 -0
- package/src/runtime/ontology-mutations.ts +1 -1
- package/src/runtime/sixb.ts +14 -5
- package/src/scheduler/index.ts +0 -2
- package/src/shared/backoff.ts +34 -0
- package/src/shared/duration.ts +15 -0
- package/src/shared/params/artifact-refs.ts +42 -0
- package/src/shares/compiler.ts +1 -1
- package/src/shares/guest-name.ts +20 -0
- package/src/shares/internal.ts +1 -0
- package/src/shares/session-protocol.ts +63 -0
- package/src/storage/agents/types.ts +1 -1
- package/src/storage/artifacts/errors.ts +10 -2
- package/src/storage/artifacts/in-memory.ts +579 -96
- package/src/storage/artifacts/index.ts +22 -1
- package/src/storage/artifacts/record.ts +255 -11
- package/src/storage/artifacts/types.ts +343 -40
- package/src/storage/auth/in-memory/auth-storage.ts +42 -5
- package/src/storage/auth/in-memory/identities.ts +16 -0
- package/src/storage/auth/in-memory/shared.ts +15 -0
- package/src/storage/auth/in-memory/users.ts +17 -16
- package/src/storage/auth/index.ts +3 -0
- package/src/storage/auth/types.ts +38 -0
- package/src/storage/connector-connections/in-memory.ts +4 -1
- package/src/storage/connector-connections/index.ts +1 -0
- package/src/storage/connector-connections/provider/runs.ts +3 -0
- package/src/storage/connector-connections/provider/shared.ts +30 -0
- package/src/storage/connector-connections/provider.ts +4 -0
- package/src/storage/connector-connections/types.ts +1 -0
- package/src/storage/dataset-ingest/codec.ts +90 -0
- package/src/storage/dataset-ingest/in-memory.ts +277 -0
- package/src/storage/dataset-ingest/index.ts +16 -0
- package/src/storage/dataset-ingest/provider.ts +592 -0
- package/src/storage/dataset-ingest/types.ts +191 -0
- package/src/storage/in-memory/index.ts +33 -0
- package/src/storage/index.ts +65 -5
- package/src/storage/internal.ts +20 -0
- package/src/storage/lake-retention-runs/in-memory.ts +22 -0
- package/src/storage/lake-retention-runs/index.ts +2 -0
- package/src/storage/lake-retention-runs/types.ts +19 -0
- package/src/storage/maintenance-heartbeats/in-memory.ts +24 -0
- package/src/storage/maintenance-heartbeats/index.ts +7 -0
- package/src/storage/maintenance-heartbeats/record.ts +50 -0
- package/src/storage/maintenance-heartbeats/types.ts +30 -0
- package/src/storage/objects/in-memory/query.ts +1 -0
- package/src/storage/objects/in-memory/storage.ts +81 -0
- package/src/storage/objects/read-scope.ts +1 -0
- package/src/storage/objects/types.ts +16 -1
- package/src/storage/ontology/in-memory/materializations.ts +8 -0
- package/src/storage/ontology/in-memory/replacement-plans.ts +4 -1
- package/src/storage/ontology/index.ts +2 -0
- package/src/storage/ontology/materializations.ts +18 -0
- package/src/storage/ontology/provider-work.ts +39 -0
- package/src/storage/pipeline-runs/in-memory.ts +97 -24
- package/src/storage/pipeline-runs/index.ts +0 -1
- package/src/storage/pipeline-runs/provider.ts +1 -1
- package/src/storage/pipeline-runs/transitions.ts +7 -4
- package/src/storage/pipeline-runs/types.ts +33 -7
- package/src/storage/projection-runs/errors.ts +10 -0
- package/src/storage/projection-runs/in-memory.ts +56 -1
- package/src/storage/projection-runs/index.ts +2 -1
- package/src/storage/projection-runs/lifecycle.ts +9 -1
- package/src/storage/projection-runs/types.ts +20 -1
- package/src/storage/run-claim.ts +224 -0
- package/src/storage/share-sessions/in-memory.ts +21 -0
- package/src/storage/share-sessions/index.ts +1 -0
- package/src/storage/share-sessions/provider.ts +1 -0
- package/src/storage/share-sessions/record.ts +28 -0
- package/src/storage/share-sessions/types.ts +19 -1
- package/src/storage/sync-runs/in-memory.ts +109 -29
- package/src/storage/sync-runs/index.ts +1 -1
- package/src/storage/sync-runs/transitions.ts +7 -4
- package/src/storage/sync-runs/types.ts +36 -3
- package/src/storage/types.ts +15 -5
- package/src/storage/webhook-runs/in-memory.ts +26 -2
- package/src/storage/webhook-runs/index.ts +3 -1
- package/src/storage/webhook-runs/types.ts +44 -3
- package/src/storage/workflow-runs/in-memory.ts +50 -36
- package/src/storage/workflow-runs/index.ts +0 -2
- package/src/storage/workflow-runs/types.ts +18 -30
- package/src/syncs/run-dispatch.ts +118 -239
- package/src/testing/ai-model-call-groups-contract.ts +2 -1
- package/src/testing/artifact-holders-contract.ts +392 -0
- package/src/testing/artifact-storage-contract.ts +1205 -151
- package/src/testing/auth-storage-contract.ts +228 -1
- package/src/testing/broker-contract.ts +56 -0
- package/src/testing/connector-connection-storage-contract.ts +94 -5
- package/src/testing/dataset-ingest-storage-contract.ts +480 -0
- package/src/testing/dataset-sequence-contract.ts +97 -12
- package/src/testing/execution.ts +23 -0
- package/src/testing/index.ts +31 -0
- package/src/testing/lake-retention-run-storage-contract.ts +75 -0
- package/src/testing/maintenance-heartbeat-storage-contract.ts +99 -0
- package/src/testing/object-query-contract.ts +93 -0
- package/src/testing/pipeline-execution.ts +3 -1
- package/src/testing/pipeline-run-read-contract.ts +123 -0
- package/src/testing/projection-run-storage-contract.ts +113 -0
- package/src/testing/queues-contract.ts +112 -0
- package/src/testing/run-claim-storage-contract.ts +736 -0
- package/src/testing/run-claim.ts +69 -0
- package/src/testing/run-recovery-contract.ts +176 -0
- package/src/testing/share-session-storage-contract.ts +43 -0
- package/src/testing/stored-artifacts.ts +43 -0
- package/src/testing/sync-execution.ts +3 -1
- package/src/testing/webhook-execution.ts +7 -2
- package/src/testing/webhook-run-storage-contract.ts +102 -5
- package/src/users/execution.ts +50 -2
- package/src/users/index.ts +1 -0
- package/src/webhooks/delivery-lease.ts +40 -0
- package/src/webhooks/internal.ts +2 -0
- package/src/webhooks/run-admission.ts +22 -9
- package/src/workers/README.md +169 -0
- package/src/workers/index.ts +9 -1
- package/src/workers/job-ids.ts +31 -0
- package/src/workers/lost-projection-runs.ts +114 -0
- package/src/workers/lost-runs.ts +397 -0
- package/src/workers/queue-delivery.ts +2 -14
- package/src/workers/queue-worker.ts +9 -17
- package/src/workers/queued-run-dispatch.ts +308 -0
- package/src/workers/run-lease.ts +46 -0
- package/src/workers/run-worker.ts +312 -0
- package/src/workers/worker.ts +4 -17
- package/src/workflows/request.ts +2 -0
- package/src/workflows/run-dispatch.ts +22 -4
- package/src/workflows/snapshot.ts +1 -0
- package/dist/chunk-2g0r46hy.js.map +0 -12
- package/dist/chunk-3fqxbn31.js +0 -107
- package/dist/chunk-3fqxbn31.js.map +0 -11
- package/dist/chunk-4s753g3k.js +0 -314
- package/dist/chunk-4s753g3k.js.map +0 -12
- package/dist/chunk-5kyvrtjh.js.map +0 -12
- package/dist/chunk-5taem5aw.js.map +0 -10
- package/dist/chunk-65abf64x.js +0 -13
- package/dist/chunk-65abf64x.js.map +0 -10
- package/dist/chunk-9x8dybsb.js.map +0 -10
- package/dist/chunk-az47zep4.js +0 -41
- package/dist/chunk-az47zep4.js.map +0 -10
- package/dist/chunk-c706qvyc.js +0 -299
- package/dist/chunk-c706qvyc.js.map +0 -11
- package/dist/chunk-djs3hw9p.js.map +0 -20
- package/dist/chunk-dsv783c3.js.map +0 -47
- package/dist/chunk-e5wf5vz0.js.map +0 -10
- package/dist/chunk-e6xgz4h4.js.map +0 -21
- package/dist/chunk-e7v3trpz.js.map +0 -10
- package/dist/chunk-eqgr6nsa.js.map +0 -72
- package/dist/chunk-fb3feg1e.js +0 -298
- package/dist/chunk-fb3feg1e.js.map +0 -12
- package/dist/chunk-hz5d43gn.js.map +0 -10
- package/dist/chunk-j8thxj7w.js.map +0 -22
- package/dist/chunk-jbw70d6t.js.map +0 -10
- package/dist/chunk-jftd33rc.js.map +0 -11
- package/dist/chunk-jspskey0.js.map +0 -10
- package/dist/chunk-kfee1h52.js.map +0 -13
- package/dist/chunk-kwfhd1g0.js +0 -144
- package/dist/chunk-kwfhd1g0.js.map +0 -13
- package/dist/chunk-nz7815t3.js.map +0 -14
- package/dist/chunk-s3we74h8.js.map +0 -12
- package/dist/chunk-scyq22td.js.map +0 -12
- package/dist/chunk-w1btn96n.js.map +0 -44
- package/dist/chunk-w976a4me.js.map +0 -10
- package/dist/chunk-wkq3kvzd.js.map +0 -10
- package/dist/chunk-wrjx1fqz.js +0 -587
- package/dist/chunk-wrjx1fqz.js.map +0 -18
- package/dist/chunk-yw9pyg66.js +0 -143
- package/dist/chunk-yw9pyg66.js.map +0 -11
- package/dist/chunk-z8fx5cgb.js.map +0 -11
- package/dist/scheduler/runtime.d.ts +0 -40
- package/dist/scheduler/runtime.d.ts.map +0 -1
- package/dist/workers/unstarted-run.d.ts +0 -10
- package/dist/workers/unstarted-run.d.ts.map +0 -1
- package/src/scheduler/runtime.ts +0 -214
- package/src/workers/unstarted-run.ts +0 -18
- /package/dist/{chunk-80gym75n.js.map → chunk-186k5yz3.js.map} +0 -0
- /package/dist/{chunk-ga63a3dz.js.map → chunk-2bn6813a.js.map} +0 -0
- /package/dist/{chunk-ytzcxtpt.js.map → chunk-3ba89vm7.js.map} +0 -0
- /package/dist/{chunk-d04g36fw.js.map → chunk-5qqmndhm.js.map} +0 -0
- /package/dist/{chunk-5wtnmpze.js.map → chunk-7qe46788.js.map} +0 -0
- /package/dist/{chunk-31kcqmhf.js.map → chunk-855w9nvw.js.map} +0 -0
- /package/dist/{chunk-9whfmsfk.js.map → chunk-8tqnsx3q.js.map} +0 -0
- /package/dist/{chunk-s038wa5v.js.map → chunk-b9qfh2ya.js.map} +0 -0
- /package/dist/{chunk-jjmggm9a.js.map → chunk-fe6r7yhg.js.map} +0 -0
- /package/dist/{chunk-165c9wm6.js.map → chunk-g2ph4873.js.map} +0 -0
- /package/dist/{chunk-4zm1k3xj.js.map → chunk-r2psmn42.js.map} +0 -0
- /package/dist/{chunk-2ajw5rz0.js.map → chunk-rsxb14an.js.map} +0 -0
- /package/dist/{chunk-r1cxq7vv.js.map → chunk-rtdrm592.js.map} +0 -0
- /package/dist/{chunk-4bm0caep.js.map → chunk-smnt672s.js.map} +0 -0
- /package/dist/{chunk-21q0j5f2.js.map → chunk-stmxh0hv.js.map} +0 -0
- /package/dist/{chunk-ff5xkv0p.js.map → chunk-tfzvjdms.js.map} +0 -0
- /package/dist/{chunk-6b61s40c.js.map → chunk-w3t94hm6.js.map} +0 -0
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test"
|
|
2
|
+
import {
|
|
3
|
+
type DatasetIngestChange,
|
|
4
|
+
type DatasetIngestLease,
|
|
5
|
+
DatasetIngestLeaseLostError,
|
|
6
|
+
type DatasetIngestStorage,
|
|
7
|
+
} from "../storage/dataset-ingest"
|
|
8
|
+
|
|
9
|
+
export interface DatasetIngestStorageContractSuiteOptions<
|
|
10
|
+
TStorage extends DatasetIngestStorage = DatasetIngestStorage,
|
|
11
|
+
> {
|
|
12
|
+
readonly createStorage: () => TStorage | Promise<TStorage>
|
|
13
|
+
readonly cleanup?: (storage: TStorage) => void | Promise<void>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const projectId = "dataset-ingest-contract"
|
|
17
|
+
const datasetId = "crm.people"
|
|
18
|
+
const LEASE_MS = 60_000
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Provider-neutral contract for the inbox of ingested changes: what a delivery stores, how flush
|
|
22
|
+
* requests open and close, and how one lease at a time takes whole deliveries in inbox order.
|
|
23
|
+
*/
|
|
24
|
+
export function runDatasetIngestStorageContractSuite<TStorage extends DatasetIngestStorage>(
|
|
25
|
+
label: string,
|
|
26
|
+
options: DatasetIngestStorageContractSuiteOptions<TStorage>
|
|
27
|
+
): void {
|
|
28
|
+
const withStorage = async (run: (storage: TStorage) => Promise<void>): Promise<void> => {
|
|
29
|
+
const storage = await options.createStorage()
|
|
30
|
+
try {
|
|
31
|
+
await run(storage)
|
|
32
|
+
} finally {
|
|
33
|
+
await options.cleanup?.(storage)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
describe(label, () => {
|
|
38
|
+
test("stores each change as ingest validated it, dates included, in delivery order", () =>
|
|
39
|
+
withStorage(async (storage) => {
|
|
40
|
+
const updatedAt = new Date("2026-09-09T10:00:00.123Z")
|
|
41
|
+
const first = await append(storage, [
|
|
42
|
+
{
|
|
43
|
+
kind: "upsert",
|
|
44
|
+
row: { id: "42", name: "Sam", updatedAt, birthday: new Date("1990-05-01T00:00:00Z") },
|
|
45
|
+
},
|
|
46
|
+
{ kind: "delete", key: { id: "9" }, sequence: new Date("2026-09-09T10:01:00.000Z") },
|
|
47
|
+
])
|
|
48
|
+
const second = await append(storage, [
|
|
49
|
+
{ kind: "upsert", row: { id: "43", name: "Ada", updatedAt: "2026-09-09T10:02:00Z" } },
|
|
50
|
+
{ kind: "delete", key: { id: "10" }, sequence: "17" },
|
|
51
|
+
{ kind: "delete", key: { id: "11" } },
|
|
52
|
+
])
|
|
53
|
+
|
|
54
|
+
expect(first).toMatchObject({ datasetId, changeCount: 2, executionId: "exec-1" })
|
|
55
|
+
expect(first.receivedAt).toBeInstanceOf(Date)
|
|
56
|
+
|
|
57
|
+
const lease = await acquire(storage, "owner-a")
|
|
58
|
+
const batch = await storage.takeBatch({ lease, flushId: "flush-1", maxChanges: 100 })
|
|
59
|
+
expect(batch?.deliveries.map((delivery) => delivery.id)).toEqual([first.id, second.id])
|
|
60
|
+
|
|
61
|
+
const read = await readAll(storage, lease, "flush-1")
|
|
62
|
+
expect(read.map(({ delivery }) => delivery.id)).toEqual([first.id, second.id])
|
|
63
|
+
expect(read.flatMap(({ changes }) => changes)).toEqual([
|
|
64
|
+
{
|
|
65
|
+
kind: "upsert",
|
|
66
|
+
row: {
|
|
67
|
+
id: "42",
|
|
68
|
+
name: "Sam",
|
|
69
|
+
updatedAt,
|
|
70
|
+
birthday: new Date("1990-05-01T00:00:00Z"),
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{ kind: "delete", key: { id: "9" }, sequence: new Date("2026-09-09T10:01:00.000Z") },
|
|
74
|
+
{ kind: "upsert", row: { id: "43", name: "Ada", updatedAt: "2026-09-09T10:02:00Z" } },
|
|
75
|
+
{ kind: "delete", key: { id: "10" }, sequence: "17" },
|
|
76
|
+
{ kind: "delete", key: { id: "11" } },
|
|
77
|
+
])
|
|
78
|
+
}))
|
|
79
|
+
|
|
80
|
+
// A sender that truncates text in the middle of an emoji leaves half a surrogate pair. Reproduce
|
|
81
|
+
// on PostgreSQL: make `changes` jsonb in the migration, which refuses it.
|
|
82
|
+
test("stores a lone surrogate, which is a valid string but not valid Unicode", () =>
|
|
83
|
+
withStorage(async (storage) => {
|
|
84
|
+
const changes: DatasetIngestChange[] = [
|
|
85
|
+
{ kind: "upsert", row: { id: "1", name: "caf\ud83d" } },
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
await storage.append(deliveryInput(changes))
|
|
89
|
+
|
|
90
|
+
const lease = await acquire(storage, "owner-a")
|
|
91
|
+
await storage.takeBatch({ lease, flushId: "flush-1", maxChanges: 100 })
|
|
92
|
+
const [read] = await readAll(storage, lease, "flush-1")
|
|
93
|
+
|
|
94
|
+
expect(read?.changes).toEqual(changes)
|
|
95
|
+
}))
|
|
96
|
+
|
|
97
|
+
test("keeps the definition a delivery was validated against, on every way to read it", () =>
|
|
98
|
+
withStorage(async (storage) => {
|
|
99
|
+
await storage.append({ ...deliveryInput([upsert("1")]), definitionHash: "definition-v2" })
|
|
100
|
+
|
|
101
|
+
const dead = await acquire(storage, "owner-a", 0)
|
|
102
|
+
const batch = await storage.takeBatch({ lease: dead, flushId: "flush-1", maxChanges: 100 })
|
|
103
|
+
expect(batch?.deliveries[0]?.definitionHash).toBe("definition-v2")
|
|
104
|
+
|
|
105
|
+
const lease = await acquire(storage, "owner-b")
|
|
106
|
+
expect(lease.inFlight?.deliveries[0]?.definitionHash).toBe("definition-v2")
|
|
107
|
+
|
|
108
|
+
const [read] = await readAll(storage, lease, "flush-1")
|
|
109
|
+
expect(read?.delivery.definitionHash).toBe("definition-v2")
|
|
110
|
+
}))
|
|
111
|
+
|
|
112
|
+
test("stores strings holding U+0000 and backslashes exactly, in values and JSON keys", () =>
|
|
113
|
+
withStorage(async (storage) => {
|
|
114
|
+
// Reproduce: drop the escaping in `encodeDatasetIngestChanges`; PostgreSQL's jsonb refuses
|
|
115
|
+
// the delivery, which `ingest` accepted before it had an inbox.
|
|
116
|
+
const changes: DatasetIngestChange[] = [
|
|
117
|
+
{
|
|
118
|
+
kind: "upsert",
|
|
119
|
+
row: {
|
|
120
|
+
id: "nul\u0000id",
|
|
121
|
+
name: "a\u0000b \\0 \\\\ end\\",
|
|
122
|
+
payload: { "key\u0000": ["\u0000", "\\0"], plain: "\\u0000" },
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
{ kind: "delete", key: { id: "\u0000" }, sequence: "\\0" },
|
|
126
|
+
]
|
|
127
|
+
const delivery = await append(storage, changes)
|
|
128
|
+
|
|
129
|
+
const lease = await acquire(storage, "owner-a")
|
|
130
|
+
await storage.takeBatch({ lease, flushId: "flush-1", maxChanges: 10 })
|
|
131
|
+
|
|
132
|
+
const read = await readAll(storage, lease, "flush-1")
|
|
133
|
+
expect(read.map(({ delivery }) => delivery.id)).toEqual([delivery.id])
|
|
134
|
+
expect(read[0]?.changes).toEqual(changes)
|
|
135
|
+
}))
|
|
136
|
+
|
|
137
|
+
test("reads a batch past one page of deliveries", () =>
|
|
138
|
+
withStorage(async (storage) => {
|
|
139
|
+
// Pages hold 50 deliveries: 51 cross the boundary once.
|
|
140
|
+
const appended = []
|
|
141
|
+
for (let index = 0; index < 51; index += 1) {
|
|
142
|
+
appended.push(await append(storage, [upsert(String(index))]))
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const lease = await acquire(storage, "owner-a")
|
|
146
|
+
await storage.takeBatch({ lease, flushId: "flush-1", maxChanges: 1_000 })
|
|
147
|
+
|
|
148
|
+
const read = await readAll(storage, lease, "flush-1")
|
|
149
|
+
expect(read.map(({ delivery }) => delivery.id)).toEqual(appended.map(({ id }) => id))
|
|
150
|
+
}))
|
|
151
|
+
|
|
152
|
+
test("a hand-over releases the dataset under a request no job used, even with one open", () =>
|
|
153
|
+
withStorage(async (storage) => {
|
|
154
|
+
const { request } = (await storage.append(deliveryInput([upsert("1")]))).flush
|
|
155
|
+
|
|
156
|
+
const lease = await acquire(storage, "owner-a")
|
|
157
|
+
const handed = await storage.handOver({ lease })
|
|
158
|
+
|
|
159
|
+
expect(handed.request).toBeGreaterThan(request)
|
|
160
|
+
expect(await storage.summarize({ projectId })).toMatchObject([
|
|
161
|
+
{ datasetId, pendingDeliveries: 1, request: handed.request, leaseExpiresAt: null },
|
|
162
|
+
])
|
|
163
|
+
|
|
164
|
+
// The request it opened covers the next delivery: nothing asks twice.
|
|
165
|
+
const covered = (await storage.append(deliveryInput([upsert("2")]))).flush
|
|
166
|
+
expect(covered).toEqual({ request: handed.request, requested: false })
|
|
167
|
+
|
|
168
|
+
await acquire(storage, "owner-b")
|
|
169
|
+
}))
|
|
170
|
+
|
|
171
|
+
test("a hand-over refuses a lease another flush took", () =>
|
|
172
|
+
withStorage(async (storage) => {
|
|
173
|
+
await storage.append(deliveryInput([upsert("1")]))
|
|
174
|
+
|
|
175
|
+
const lost = await acquire(storage, "owner-a", 0)
|
|
176
|
+
await acquire(storage, "owner-b")
|
|
177
|
+
|
|
178
|
+
const failure = await storage.handOver({ lease: lost }).catch((error) => error)
|
|
179
|
+
expect(failure).toBeInstanceOf(DatasetIngestLeaseLostError)
|
|
180
|
+
}))
|
|
181
|
+
|
|
182
|
+
test("asks for a flush with the first delivery of a request, and a batch opens the next", () =>
|
|
183
|
+
withStorage(async (storage) => {
|
|
184
|
+
const opened = (await storage.append(deliveryInput([upsert("1")]))).flush
|
|
185
|
+
const covered = (await storage.append(deliveryInput([upsert("2")]))).flush
|
|
186
|
+
|
|
187
|
+
expect(opened.requested).toBe(true)
|
|
188
|
+
expect(covered).toEqual({ request: opened.request, requested: false })
|
|
189
|
+
|
|
190
|
+
// Both deliveries are in the batch, whichever asked.
|
|
191
|
+
const lease = await acquire(storage, "owner-a")
|
|
192
|
+
const batch = await storage.takeBatch({ lease, flushId: "flush-1", maxChanges: 100 })
|
|
193
|
+
expect(batch?.deliveries).toHaveLength(2)
|
|
194
|
+
|
|
195
|
+
// One appended after the batch asks again, under a request no job used yet.
|
|
196
|
+
const next = (await storage.append(deliveryInput([upsert("3")]))).flush
|
|
197
|
+
expect(next.requested).toBe(true)
|
|
198
|
+
expect(next.request).toBeGreaterThan(opened.request)
|
|
199
|
+
}))
|
|
200
|
+
|
|
201
|
+
test("takes whole deliveries in inbox order up to the bound, and always one", () =>
|
|
202
|
+
withStorage(async (storage) => {
|
|
203
|
+
const three = await append(storage, [upsert("1"), upsert("2"), upsert("3")])
|
|
204
|
+
const two = await append(storage, [upsert("4"), upsert("5")])
|
|
205
|
+
const one = await append(storage, [upsert("6")])
|
|
206
|
+
|
|
207
|
+
const lease = await acquire(storage, "owner-a")
|
|
208
|
+
|
|
209
|
+
// The first delivery alone holds more than the bound: it is taken alone.
|
|
210
|
+
const first = await storage.takeBatch({ lease, flushId: "flush-1", maxChanges: 2 })
|
|
211
|
+
expect(first?.deliveries.map((delivery) => delivery.id)).toEqual([three.id])
|
|
212
|
+
await storage.complete({ lease, flushId: "flush-1" })
|
|
213
|
+
|
|
214
|
+
const second = await storage.takeBatch({ lease, flushId: "flush-2", maxChanges: 3 })
|
|
215
|
+
expect(second?.deliveries.map((delivery) => delivery.id)).toEqual([two.id, one.id])
|
|
216
|
+
}))
|
|
217
|
+
|
|
218
|
+
test("refuses a second batch while one is in flight", () =>
|
|
219
|
+
withStorage(async (storage) => {
|
|
220
|
+
await append(storage, [upsert("1")])
|
|
221
|
+
await append(storage, [upsert("2")])
|
|
222
|
+
const lease = await acquire(storage, "owner-a")
|
|
223
|
+
await storage.takeBatch({ lease, flushId: "flush-1", maxChanges: 1 })
|
|
224
|
+
|
|
225
|
+
const refused = await storage
|
|
226
|
+
.takeBatch({ lease, flushId: "flush-2", maxChanges: 1 })
|
|
227
|
+
.catch((error) => error)
|
|
228
|
+
expect(refused).toBeInstanceOf(Error)
|
|
229
|
+
expect(String(refused)).toContain("still in flight")
|
|
230
|
+
}))
|
|
231
|
+
|
|
232
|
+
test("releases the lease when nothing is pending", () =>
|
|
233
|
+
withStorage(async (storage) => {
|
|
234
|
+
const lease = await acquire(storage, "owner-a")
|
|
235
|
+
|
|
236
|
+
expect(await storage.takeBatch({ lease, flushId: "flush-1", maxChanges: 10 })).toBeNull()
|
|
237
|
+
expect((await storage.acquire(acquireInput("owner-b"))).acquired).toBe(true)
|
|
238
|
+
}))
|
|
239
|
+
|
|
240
|
+
test("gives the dataset to one owner while its lease is live", () =>
|
|
241
|
+
withStorage(async (storage) => {
|
|
242
|
+
const lease = await acquire(storage, "owner-a")
|
|
243
|
+
const busy = await storage.acquire(acquireInput("owner-b"))
|
|
244
|
+
|
|
245
|
+
expect(busy).toEqual({ acquired: false, busyUntil: lease.expiresAt })
|
|
246
|
+
|
|
247
|
+
// The holder may take it again, which renews it.
|
|
248
|
+
expect((await storage.acquire(acquireInput("owner-a"))).acquired).toBe(true)
|
|
249
|
+
|
|
250
|
+
const renewed = await storage.renew({ lease, leaseMs: LEASE_MS })
|
|
251
|
+
expect(renewed?.owner).toBe("owner-a")
|
|
252
|
+
|
|
253
|
+
await storage.release({ lease })
|
|
254
|
+
expect((await storage.acquire(acquireInput("owner-b"))).acquired).toBe(true)
|
|
255
|
+
}))
|
|
256
|
+
|
|
257
|
+
test("hands an expired lease's batch to the next owner, and fences the old one", () =>
|
|
258
|
+
withStorage(async (storage) => {
|
|
259
|
+
const delivery = await append(storage, [upsert("1")])
|
|
260
|
+
const expired = await acquire(storage, "owner-a", 0)
|
|
261
|
+
const batch = await storage.takeBatch({
|
|
262
|
+
lease: expired,
|
|
263
|
+
flushId: "flush-1",
|
|
264
|
+
maxChanges: 10,
|
|
265
|
+
})
|
|
266
|
+
|
|
267
|
+
const taken = await storage.acquire(acquireInput("owner-b"))
|
|
268
|
+
if (!taken.acquired) throw new Error("expected the expired lease to be taken over")
|
|
269
|
+
|
|
270
|
+
expect(taken.lease.inFlight).toEqual({
|
|
271
|
+
flushId: "flush-1",
|
|
272
|
+
startedAt: batch?.startedAt ?? new Date(0),
|
|
273
|
+
deliveries: [delivery],
|
|
274
|
+
})
|
|
275
|
+
|
|
276
|
+
expect(await storage.renew({ lease: expired, leaseMs: LEASE_MS })).toBeNull()
|
|
277
|
+
|
|
278
|
+
const lost = await storage
|
|
279
|
+
.complete({ lease: expired, flushId: "flush-1" })
|
|
280
|
+
.catch((error) => error)
|
|
281
|
+
expect(lost).toBeInstanceOf(DatasetIngestLeaseLostError)
|
|
282
|
+
|
|
283
|
+
// A failure the old owner reports is not counted: the lease is the new owner's.
|
|
284
|
+
expect(await storage.fail({ lease: expired })).toEqual({ failureStreak: 0 })
|
|
285
|
+
|
|
286
|
+
await storage.complete({ lease: taken.lease, flushId: "flush-1" })
|
|
287
|
+
expect(await storage.summarize({ projectId })).toMatchObject([
|
|
288
|
+
{ datasetId, pendingDeliveries: 0 },
|
|
289
|
+
])
|
|
290
|
+
}))
|
|
291
|
+
|
|
292
|
+
test("keeps a refused delivery whole, out of every batch, and purges it by age", () =>
|
|
293
|
+
withStorage(async (storage) => {
|
|
294
|
+
const changes = [upsert("2"), upsert("3")]
|
|
295
|
+
await append(storage, [upsert("1")])
|
|
296
|
+
const refused = await append(storage, changes)
|
|
297
|
+
|
|
298
|
+
const lease = await acquire(storage, "owner-a")
|
|
299
|
+
await storage.takeBatch({ lease, flushId: "flush-1", maxChanges: 10 })
|
|
300
|
+
await storage.reject({
|
|
301
|
+
lease,
|
|
302
|
+
flushId: "flush-1",
|
|
303
|
+
deliveryId: refused.id,
|
|
304
|
+
reason: "Column 'name' cannot hold the value.",
|
|
305
|
+
})
|
|
306
|
+
await storage.complete({ lease, flushId: "flush-1" })
|
|
307
|
+
|
|
308
|
+
expect(await storage.takeBatch({ lease, flushId: "flush-2", maxChanges: 10 })).toBeNull()
|
|
309
|
+
expect(await storage.summarize({ projectId })).toMatchObject([
|
|
310
|
+
{ datasetId, pendingDeliveries: 0, pendingChanges: 0, rejectedDeliveries: 1 },
|
|
311
|
+
])
|
|
312
|
+
|
|
313
|
+
const listed = [
|
|
314
|
+
await storage.listRejected({ projectId, datasetId, limit: 10 }),
|
|
315
|
+
await storage.listRejected({ projectId, limit: 10 }),
|
|
316
|
+
]
|
|
317
|
+
for (const rejected of listed) {
|
|
318
|
+
expect(rejected).toEqual([
|
|
319
|
+
{
|
|
320
|
+
delivery: refused,
|
|
321
|
+
rejectedAt: expect.any(Date),
|
|
322
|
+
reason: "Column 'name' cannot hold the value.",
|
|
323
|
+
changes,
|
|
324
|
+
},
|
|
325
|
+
])
|
|
326
|
+
}
|
|
327
|
+
expect(await storage.listRejected({ projectId, datasetId: "other", limit: 10 })).toEqual([])
|
|
328
|
+
|
|
329
|
+
await storage.purgeRejected({ projectId, olderThanMs: 60_000 })
|
|
330
|
+
expect(await storage.listRejected({ projectId, limit: 10 })).toHaveLength(1)
|
|
331
|
+
|
|
332
|
+
await Bun.sleep(5)
|
|
333
|
+
await storage.purgeRejected({ projectId, olderThanMs: 0 })
|
|
334
|
+
expect(await storage.listRejected({ projectId, limit: 10 })).toEqual([])
|
|
335
|
+
expect(await storage.summarize({ projectId })).toEqual([])
|
|
336
|
+
}))
|
|
337
|
+
|
|
338
|
+
test("rejects chosen deliveries, completes the rest, and counts failures in a row", () =>
|
|
339
|
+
withStorage(async (storage) => {
|
|
340
|
+
const kept = await append(storage, [upsert("1")])
|
|
341
|
+
const refused = await append(storage, [upsert("2"), upsert("3")])
|
|
342
|
+
const lease = await acquire(storage, "owner-a")
|
|
343
|
+
await storage.takeBatch({ lease, flushId: "flush-1", maxChanges: 10 })
|
|
344
|
+
|
|
345
|
+
await storage.reject({ lease, flushId: "flush-1", deliveryId: refused.id, reason: "No." })
|
|
346
|
+
const read = await readAll(storage, lease, "flush-1")
|
|
347
|
+
expect(read.map(({ delivery }) => delivery.id)).toEqual([kept.id])
|
|
348
|
+
|
|
349
|
+
expect(await storage.fail({ lease })).toEqual({ failureStreak: 1 })
|
|
350
|
+
|
|
351
|
+
const again = await acquire(storage, "owner-b")
|
|
352
|
+
expect(again.inFlight?.deliveries).toEqual([kept])
|
|
353
|
+
expect(await storage.fail({ lease: again })).toEqual({ failureStreak: 2 })
|
|
354
|
+
|
|
355
|
+
const last = await acquire(storage, "owner-c")
|
|
356
|
+
await storage.complete({ lease: last, flushId: "flush-1" })
|
|
357
|
+
|
|
358
|
+
expect(await storage.summarize({ projectId })).toEqual([
|
|
359
|
+
{
|
|
360
|
+
datasetId,
|
|
361
|
+
pendingDeliveries: 0,
|
|
362
|
+
pendingChanges: 0,
|
|
363
|
+
oldestReceivedAt: null,
|
|
364
|
+
flushStartedAt: null,
|
|
365
|
+
request: 1,
|
|
366
|
+
leaseExpiresAt: last.expiresAt,
|
|
367
|
+
failureStreak: 0,
|
|
368
|
+
rejectedDeliveries: 1,
|
|
369
|
+
lastFlushedAt: expect.any(Date),
|
|
370
|
+
},
|
|
371
|
+
])
|
|
372
|
+
}))
|
|
373
|
+
|
|
374
|
+
test("summarizes when a flush took its batch, until it completes, across a resume", () =>
|
|
375
|
+
withStorage(async (storage) => {
|
|
376
|
+
await append(storage, [upsert("1")])
|
|
377
|
+
|
|
378
|
+
const lease = await acquire(storage, "owner-a", 0)
|
|
379
|
+
const batch = await storage.takeBatch({ lease, flushId: "flush-1", maxChanges: 10 })
|
|
380
|
+
const startedAt = batch?.startedAt ?? null
|
|
381
|
+
|
|
382
|
+
expect(startedAt).toBeInstanceOf(Date)
|
|
383
|
+
expect(await storage.summarize({ projectId })).toMatchObject([
|
|
384
|
+
{ datasetId, flushStartedAt: startedAt },
|
|
385
|
+
])
|
|
386
|
+
|
|
387
|
+
const resumed = await acquire(storage, "owner-b")
|
|
388
|
+
expect(resumed.inFlight?.startedAt).toEqual(startedAt as Date)
|
|
389
|
+
expect(await storage.summarize({ projectId })).toMatchObject([
|
|
390
|
+
{ datasetId, flushStartedAt: startedAt },
|
|
391
|
+
])
|
|
392
|
+
|
|
393
|
+
await storage.complete({ lease: resumed, flushId: "flush-1" })
|
|
394
|
+
expect(await storage.summarize({ projectId })).toMatchObject([
|
|
395
|
+
{ datasetId, flushStartedAt: null },
|
|
396
|
+
])
|
|
397
|
+
}))
|
|
398
|
+
|
|
399
|
+
test("summarizes what waits per dataset and keeps projects apart", () =>
|
|
400
|
+
withStorage(async (storage) => {
|
|
401
|
+
const oldest = await append(storage, [upsert("1"), upsert("2")])
|
|
402
|
+
await append(storage, [upsert("3")])
|
|
403
|
+
await storage.append({ ...deliveryInput([upsert("1")]), datasetId: "crm.orgs" })
|
|
404
|
+
await storage.append({ ...deliveryInput([upsert("1")]), projectId: "another-project" })
|
|
405
|
+
|
|
406
|
+
expect(await storage.summarize({ projectId, datasetIds: [datasetId] })).toEqual([
|
|
407
|
+
{
|
|
408
|
+
datasetId,
|
|
409
|
+
pendingDeliveries: 2,
|
|
410
|
+
pendingChanges: 3,
|
|
411
|
+
oldestReceivedAt: oldest.receivedAt,
|
|
412
|
+
flushStartedAt: null,
|
|
413
|
+
request: 0,
|
|
414
|
+
leaseExpiresAt: null,
|
|
415
|
+
failureStreak: 0,
|
|
416
|
+
rejectedDeliveries: 0,
|
|
417
|
+
lastFlushedAt: null,
|
|
418
|
+
},
|
|
419
|
+
])
|
|
420
|
+
|
|
421
|
+
const all = await storage.summarize({ projectId })
|
|
422
|
+
expect(all.map((summary) => summary.datasetId)).toEqual(["crm.orgs", datasetId])
|
|
423
|
+
|
|
424
|
+
const lease = await acquire(storage, "owner-a")
|
|
425
|
+
const otherProject = await storage.acquire({
|
|
426
|
+
...acquireInput("owner-b"),
|
|
427
|
+
projectId: "another-project",
|
|
428
|
+
})
|
|
429
|
+
expect(otherProject.acquired).toBe(true)
|
|
430
|
+
expect(
|
|
431
|
+
await storage.takeBatch({ lease, flushId: "flush-1", maxChanges: 10 })
|
|
432
|
+
).not.toBeNull()
|
|
433
|
+
}))
|
|
434
|
+
|
|
435
|
+
test("refuses an empty delivery", () =>
|
|
436
|
+
withStorage(async (storage) => {
|
|
437
|
+
const refused = await storage.append(deliveryInput([])).catch((error) => error)
|
|
438
|
+
expect(String(refused)).toContain("at least one change")
|
|
439
|
+
}))
|
|
440
|
+
})
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
function upsert(id: string): DatasetIngestChange {
|
|
444
|
+
return { kind: "upsert", row: { id, name: `Person ${id}` } }
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
function deliveryInput(changes: readonly DatasetIngestChange[]) {
|
|
448
|
+
return {
|
|
449
|
+
projectId,
|
|
450
|
+
datasetId,
|
|
451
|
+
executionId: "exec-1",
|
|
452
|
+
correlationId: "corr-1",
|
|
453
|
+
definitionHash: "definition-1",
|
|
454
|
+
changes,
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
async function append(storage: DatasetIngestStorage, changes: readonly DatasetIngestChange[]) {
|
|
459
|
+
return (await storage.append(deliveryInput(changes))).delivery
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
function acquireInput(owner: string, leaseMs = LEASE_MS) {
|
|
463
|
+
return { projectId, datasetId, owner, leaseMs }
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
async function acquire(
|
|
467
|
+
storage: DatasetIngestStorage,
|
|
468
|
+
owner: string,
|
|
469
|
+
leaseMs = LEASE_MS
|
|
470
|
+
): Promise<DatasetIngestLease> {
|
|
471
|
+
const result = await storage.acquire(acquireInput(owner, leaseMs))
|
|
472
|
+
if (!result.acquired) throw new Error(`expected ${owner} to acquire the dataset`)
|
|
473
|
+
return result.lease
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
async function readAll(storage: DatasetIngestStorage, lease: DatasetIngestLease, flushId: string) {
|
|
477
|
+
const read = []
|
|
478
|
+
for await (const delivery of storage.readChanges({ lease, flushId })) read.push(delivery)
|
|
479
|
+
return read
|
|
480
|
+
}
|
|
@@ -2,8 +2,16 @@ import { describe, expect, test } from "bun:test"
|
|
|
2
2
|
import { InMemoryBlobStorage } from "../blob-storage"
|
|
3
3
|
import { InMemoryBroker } from "../broker"
|
|
4
4
|
import { change, col, type DatasetDefinition, defineDataset, type MergeChange } from "../datasets"
|
|
5
|
+
import { getDatasetIngestRuntime } from "../datasets/ingest-flush"
|
|
5
6
|
import { writeDataset } from "../datasets/write"
|
|
6
|
-
import
|
|
7
|
+
import { createTestingScope } from "../execution/scopes"
|
|
8
|
+
import {
|
|
9
|
+
type DatasetMergeCommitResult,
|
|
10
|
+
type DatasetRow,
|
|
11
|
+
DatasetSequenceConflictError,
|
|
12
|
+
datasetSequenceChange,
|
|
13
|
+
type LakeStorage,
|
|
14
|
+
} from "../lake-storage"
|
|
7
15
|
import { InMemoryQueues } from "../queues"
|
|
8
16
|
import { SixbHost } from "../runtime/host"
|
|
9
17
|
import { InMemoryStorage } from "../storage"
|
|
@@ -44,6 +52,26 @@ async function rows(storage: LakeStorage, definition: DatasetDefinition = datase
|
|
|
44
52
|
return result
|
|
45
53
|
}
|
|
46
54
|
|
|
55
|
+
/**
|
|
56
|
+
* A tie refuses the merge with a DatasetSequenceConflictError naming the change it refused, so a
|
|
57
|
+
* caller holding many changes refuses exactly that one.
|
|
58
|
+
*
|
|
59
|
+
* Reproduce: throw a plain LakeStorageError, or leave out the content, in
|
|
60
|
+
* `reconcileDatasetSequences`; every tie assertion below fails.
|
|
61
|
+
*/
|
|
62
|
+
async function expectConflict(
|
|
63
|
+
storage: LakeStorage,
|
|
64
|
+
changes: readonly MergeChange<DatasetRow, DatasetRow>[],
|
|
65
|
+
refused: MergeChange<DatasetRow, DatasetRow>
|
|
66
|
+
) {
|
|
67
|
+
const error = await merge(storage, changes).catch((caught) => caught)
|
|
68
|
+
const { key, sequence, content } = datasetSequenceChange(dataset, refused)
|
|
69
|
+
|
|
70
|
+
expect(error).toBeInstanceOf(DatasetSequenceConflictError)
|
|
71
|
+
expect(error).toMatchObject({ datasetId: dataset.id, key, sequence, content })
|
|
72
|
+
expect(String(error)).toContain("conflicting content")
|
|
73
|
+
}
|
|
74
|
+
|
|
47
75
|
export function runDatasetSequenceContract<TStorage extends LakeStorage>(
|
|
48
76
|
options: LakeMergeStorageContractSuiteOptions<TStorage>
|
|
49
77
|
): void {
|
|
@@ -144,8 +172,10 @@ export function runDatasetSequenceContract<TStorage extends LakeStorage>(
|
|
|
144
172
|
)
|
|
145
173
|
}))
|
|
146
174
|
|
|
147
|
-
test("ingests through the
|
|
175
|
+
test("ingests through the test SDK and preserves execution and flush provenance", async () => {
|
|
148
176
|
// Regression proof: remove ingest from DuckLake's producer parser; reopen loses provenance.
|
|
177
|
+
// The flush id must survive too: a flush that resumes finds its version by it. Drop
|
|
178
|
+
// \`flushIngestionInline\` from createTestSixb, and nothing is written.
|
|
149
179
|
let storage = await options.createStorage()
|
|
150
180
|
const broker = new InMemoryBroker()
|
|
151
181
|
try {
|
|
@@ -160,21 +190,68 @@ export function runDatasetSequenceContract<TStorage extends LakeStorage>(
|
|
|
160
190
|
blobStorage: new InMemoryBlobStorage(),
|
|
161
191
|
})
|
|
162
192
|
const sixb = createTestSixb(host)
|
|
163
|
-
|
|
164
|
-
|
|
193
|
+
await sixb.datasets.ingest(dataset, { changes: [upsert(8)] })
|
|
194
|
+
|
|
195
|
+
const committed = await storage.getLatestVersion(dataset.id)
|
|
165
196
|
if (options.reopen) storage = await options.reopen(storage)
|
|
166
197
|
expect((await storage.getLatestVersion(dataset.id))?.producer).toEqual({
|
|
167
198
|
kind: "ingest",
|
|
168
199
|
id: sixb.execution.id,
|
|
200
|
+
runId: expect.stringMatching(/^flush_/),
|
|
169
201
|
})
|
|
170
202
|
expect((await rows(storage)).map((row) => row.name)).toEqual(["Sam"])
|
|
171
203
|
expect(await host.events.read()).toMatchObject([
|
|
172
|
-
{ type: "dataset.version.committed", payload: { versionId:
|
|
204
|
+
{ type: "dataset.version.committed", payload: { versionId: committed?.versionId } },
|
|
173
205
|
])
|
|
174
206
|
} finally {
|
|
175
207
|
await options.teardown?.(storage)
|
|
176
208
|
}
|
|
177
209
|
})
|
|
210
|
+
test("writes many deliveries as one version, and resumes a flush that died after it", async () => {
|
|
211
|
+
// Regression proof: start a resumed batch as a new one in `DatasetIngestFlush.commit`; the
|
|
212
|
+
// resumed flush writes the batch again as no change, and the version is never announced.
|
|
213
|
+
const storage = await options.createStorage()
|
|
214
|
+
try {
|
|
215
|
+
const inbox = new InMemoryStorage()
|
|
216
|
+
const host = new SixbHost({
|
|
217
|
+
id: "ingest-flush-contract",
|
|
218
|
+
ontology: [],
|
|
219
|
+
datasets: [dataset],
|
|
220
|
+
lakeStorage: storage,
|
|
221
|
+
broker: new InMemoryBroker(),
|
|
222
|
+
storage: inbox,
|
|
223
|
+
queues: new InMemoryQueues(),
|
|
224
|
+
blobStorage: new InMemoryBlobStorage(),
|
|
225
|
+
})
|
|
226
|
+
// Not the test SDK, which writes each call at once: these wait for one flush.
|
|
227
|
+
const sixb = host.withScope(createTestingScope({ projectId: host.id }))
|
|
228
|
+
for (let index = 0; index < 50; index += 1) {
|
|
229
|
+
await sixb.datasets.ingest(dataset, { changes: [upsert(index + 1, `Sam ${index}`)] })
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// The flush commits, then dies before it deletes its batch.
|
|
233
|
+
const complete = inbox.datasetIngest.complete
|
|
234
|
+
inbox.datasetIngest.complete = async () => {
|
|
235
|
+
throw new Error("worker stopped")
|
|
236
|
+
}
|
|
237
|
+
const died = await getDatasetIngestRuntime(host)
|
|
238
|
+
.flush(dataset.id, new AbortController().signal)
|
|
239
|
+
.catch((error) => error)
|
|
240
|
+
inbox.datasetIngest.complete = complete
|
|
241
|
+
expect(died).toBeInstanceOf(Error)
|
|
242
|
+
|
|
243
|
+
const resumed = await getDatasetIngestRuntime(host).flush(
|
|
244
|
+
dataset.id,
|
|
245
|
+
new AbortController().signal
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
expect(resumed).toEqual({ kind: "flushed", versions: 1, deliveries: 50 })
|
|
249
|
+
expect(await storage.listVersions(dataset.id)).toHaveLength(1)
|
|
250
|
+
expect((await rows(storage)).map((row) => row.name)).toEqual(["Sam 49"])
|
|
251
|
+
} finally {
|
|
252
|
+
await options.teardown?.(storage)
|
|
253
|
+
}
|
|
254
|
+
})
|
|
178
255
|
test("rebases retained changes while preserving explicit version guards", () =>
|
|
179
256
|
withStorage(async (storage) => {
|
|
180
257
|
// Regression proof: disable retryOnConflict in retryDatasetMergeCommit; the second commit fails.
|
|
@@ -210,9 +287,11 @@ export function runDatasetSequenceContract<TStorage extends LakeStorage>(
|
|
|
210
287
|
"unchanged"
|
|
211
288
|
)
|
|
212
289
|
expect((await merge(storage, [upsert("09007199254740993")])).outcome).toBe("unchanged")
|
|
213
|
-
await
|
|
214
|
-
|
|
215
|
-
|
|
290
|
+
await expectConflict(
|
|
291
|
+
storage,
|
|
292
|
+
[upsert("1", "other", "other"), upsert("9007199254740993", "conflict")],
|
|
293
|
+
upsert("9007199254740993", "conflict")
|
|
294
|
+
)
|
|
216
295
|
expect((await storage.getLatestVersion(dataset.id))?.versionId).toBe(
|
|
217
296
|
first.version?.versionId
|
|
218
297
|
)
|
|
@@ -222,9 +301,11 @@ export function runDatasetSequenceContract<TStorage extends LakeStorage>(
|
|
|
222
301
|
upsert("9007199254740994", "stale"),
|
|
223
302
|
])
|
|
224
303
|
expect((await rows(storage))[0]?.name).toBe("newest")
|
|
225
|
-
await
|
|
226
|
-
|
|
227
|
-
|
|
304
|
+
await expectConflict(
|
|
305
|
+
storage,
|
|
306
|
+
[upsert("9007199254740996", "a"), upsert("9007199254740996", "b")],
|
|
307
|
+
upsert("9007199254740996", "b")
|
|
308
|
+
)
|
|
228
309
|
expect((await rows(storage))[0]?.name).toBe("newest")
|
|
229
310
|
}))
|
|
230
311
|
|
|
@@ -240,9 +321,13 @@ export function runDatasetSequenceContract<TStorage extends LakeStorage>(
|
|
|
240
321
|
expect(
|
|
241
322
|
(await merge(storage, [change.delete({ id: "42" }, { sequence: "9" })])).outcome
|
|
242
323
|
).toBe("unchanged")
|
|
243
|
-
await
|
|
324
|
+
await expectConflict(storage, [upsert(9)], upsert(9))
|
|
244
325
|
await merge(storage, [upsert(10)])
|
|
245
326
|
expect(await rows(storage)).toHaveLength(1)
|
|
327
|
+
// A delete at an upsert's sequence is refused with no content.
|
|
328
|
+
const tombstone = change.delete({ id: "42" }, { sequence: 10 })
|
|
329
|
+
await expectConflict(storage, [tombstone], tombstone)
|
|
330
|
+
expect(await rows(storage)).toHaveLength(1)
|
|
246
331
|
expect((await merge(storage, [change.delete({ id: "42" }, { sequence: 9 })])).outcome).toBe(
|
|
247
332
|
"unchanged"
|
|
248
333
|
)
|
package/src/testing/execution.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AuthorizationContext } from "../authorization"
|
|
2
|
+
import { findDatasetIngestRuntime } from "../datasets/ingest-flush"
|
|
2
3
|
import { createTestingScope } from "../execution/scopes"
|
|
3
4
|
import type { ExecutionScope } from "../execution/types"
|
|
4
5
|
import { bindModelExecutionAttempt } from "../models/execution/binding"
|
|
@@ -47,5 +48,27 @@ export function createTestSixb(
|
|
|
47
48
|
attempt: 1,
|
|
48
49
|
signal: options.signal ?? new AbortController().signal,
|
|
49
50
|
})
|
|
51
|
+
flushIngestionInline(host, sixb)
|
|
50
52
|
return sixb
|
|
51
53
|
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* `ingest` stores changes for a worker to write. A test reads them right after, so the test SDK
|
|
57
|
+
* writes them itself, as it runs actions: the call returns once its version is committed. A
|
|
58
|
+
* worker running beside the test may write them instead.
|
|
59
|
+
*/
|
|
60
|
+
function flushIngestionInline(host: TestExecutionHost, sixb: Sixb): void {
|
|
61
|
+
const runtime = findDatasetIngestRuntime(host)
|
|
62
|
+
if (!runtime) return
|
|
63
|
+
|
|
64
|
+
const { datasets } = sixb
|
|
65
|
+
const ingest = datasets.ingest.bind(datasets)
|
|
66
|
+
|
|
67
|
+
datasets.ingest = async (dataset, input) => {
|
|
68
|
+
const result = await ingest(dataset, input)
|
|
69
|
+
if (result.changes > 0) {
|
|
70
|
+
await runtime.flush(dataset.id, input.signal ?? new AbortController().signal)
|
|
71
|
+
}
|
|
72
|
+
return result
|
|
73
|
+
}
|
|
74
|
+
}
|