@sixb/core 0.2.1 → 0.2.3
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 +60 -54
- 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.map +1 -1
- package/dist/agents/execution.d.ts +2 -1
- package/dist/agents/execution.d.ts.map +1 -1
- package/dist/agents/fork.d.ts.map +1 -1
- package/dist/agents/index.d.ts +6 -4
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +95 -82
- package/dist/agents/index.js.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-plan.d.ts +15 -1
- package/dist/agents/run-plan.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 +17 -2
- package/dist/agents/run-session.d.ts.map +1 -1
- package/dist/agents/skills.d.ts +3 -0
- package/dist/agents/skills.d.ts.map +1 -1
- package/dist/agents/step-limits.d.ts +6 -0
- package/dist/agents/step-limits.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 +8 -2
- package/dist/agents/streams/protocol.d.ts.map +1 -1
- package/dist/agents/tool-files.d.ts +3 -1
- package/dist/agents/tool-files.d.ts.map +1 -1
- package/dist/agents/validation.d.ts +1 -1
- package/dist/agents/validation.d.ts.map +1 -1
- package/dist/agents/web.d.ts +47 -0
- package/dist/agents/web.d.ts.map +1 -0
- 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 +78 -0
- package/dist/artifacts/frames/protocol.d.ts.map +1 -1
- package/dist/artifacts/frames/runtime.d.ts +17 -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 +108 -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 +67 -39
- 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/authorization/resolve.d.ts +4 -3
- package/dist/authorization/resolve.d.ts.map +1 -1
- package/dist/authorization/types.d.ts +5 -5
- package/dist/authorization/types.d.ts.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 +70 -64
- 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-3x3bebz7.js → chunk-0k3r5kb3.js} +414 -101
- package/dist/chunk-0k3r5kb3.js.map +51 -0
- package/dist/{chunk-e5wf5vz0.js → chunk-0kgrghqx.js} +13 -1
- package/dist/chunk-0kgrghqx.js.map +10 -0
- package/dist/{chunk-2pk5hjj9.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-8yzhjawq.js → chunk-26qet7wh.js} +64 -23
- package/dist/{chunk-8yzhjawq.js.map → chunk-26qet7wh.js.map} +5 -5
- package/dist/{chunk-cb21tx14.js → chunk-2by73sm2.js} +1055 -201
- package/dist/chunk-2by73sm2.js.map +75 -0
- 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-nghc7eq0.js → chunk-3723kgba.js} +1 -1
- package/dist/chunk-38yvdqzd.js +70 -0
- package/dist/chunk-38yvdqzd.js.map +10 -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-djs3hw9p.js → chunk-3zagkr6w.js} +73 -6
- package/dist/chunk-3zagkr6w.js.map +21 -0
- package/dist/{chunk-fg1db9xx.js → chunk-48c1z8nj.js} +10 -10
- package/dist/chunk-48c1z8nj.js.map +10 -0
- package/dist/{chunk-rjeeyssy.js → chunk-4j0sagwv.js} +134 -19
- package/dist/{chunk-rjeeyssy.js.map → chunk-4j0sagwv.js.map} +11 -10
- package/dist/{chunk-qsg8rw04.js → chunk-5qqmndhm.js} +2 -2
- package/dist/{chunk-scyq22td.js → chunk-5rqqp8cr.js} +19 -4
- package/dist/chunk-5rqqp8cr.js.map +12 -0
- package/dist/{chunk-ax10ft8d.js → chunk-6gtxshcc.js} +6 -6
- package/dist/{chunk-ax10ft8d.js.map → chunk-6gtxshcc.js.map} +1 -1
- package/dist/{chunk-jspskey0.js → chunk-7j4yydm2.js} +67 -45
- package/dist/chunk-7j4yydm2.js.map +11 -0
- package/dist/{chunk-8wsjr52f.js → chunk-7qe46788.js} +1 -1
- package/dist/{chunk-edx8xcsm.js → chunk-7z5rkf0m.js} +29 -6
- package/dist/chunk-7z5rkf0m.js.map +13 -0
- package/dist/{chunk-23s66j86.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-tvbmh7tj.js → chunk-8p7bze4c.js} +14 -10
- package/dist/chunk-8p7bze4c.js.map +18 -0
- package/dist/{chunk-jftd33rc.js → chunk-8t2ynwg0.js} +105 -9
- package/dist/chunk-8t2ynwg0.js.map +11 -0
- package/dist/{chunk-qbrmpgvv.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-tvefbgvw.js → chunk-az95tsh3.js} +4 -2
- package/dist/chunk-az95tsh3.js.map +11 -0
- 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-ks87m383.js → chunk-bkmnd7zq.js} +556 -262
- package/dist/chunk-bkmnd7zq.js.map +49 -0
- package/dist/chunk-bz5bnjjt.js +358 -0
- package/dist/chunk-bz5bnjjt.js.map +12 -0
- package/dist/{chunk-7hd2ez3q.js → chunk-c4nrycdy.js} +1 -1
- 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-z3evap21.js → chunk-e9w4mgdh.js} +314 -225
- package/dist/{chunk-z3evap21.js.map → chunk-e9w4mgdh.js.map} +22 -20
- 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-hgj98cbb.js +22 -0
- package/dist/chunk-hgj98cbb.js.map +10 -0
- package/dist/{chunk-nqnfz3jg.js → chunk-hkaa807g.js} +18 -7
- package/dist/{chunk-nqnfz3jg.js.map → chunk-hkaa807g.js.map} +3 -3
- package/dist/chunk-hn2r7z41.js.map +3 -3
- 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-b7a97n8b.js → chunk-k66rp2hr.js} +7 -7
- package/dist/{chunk-b7a97n8b.js.map → chunk-k66rp2hr.js.map} +2 -2
- package/dist/chunk-kr6dx38r.js +25 -0
- package/dist/chunk-kr6dx38r.js.map +10 -0
- package/dist/{chunk-w53trr0c.js → chunk-kv0kvknv.js} +14 -14
- package/dist/{chunk-w53trr0c.js.map → chunk-kv0kvknv.js.map} +1 -1
- package/dist/chunk-m2jerfef.js +474 -0
- package/dist/chunk-m2jerfef.js.map +11 -0
- package/dist/chunk-m7b9q5dk.js +234 -0
- package/dist/chunk-m7b9q5dk.js.map +12 -0
- 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-jk97v21j.js → chunk-n4zzaf6q.js} +3 -2
- package/dist/chunk-n4zzaf6q.js.map +10 -0
- package/dist/{chunk-cgznz22f.js → chunk-n68vz95m.js} +5 -5
- package/dist/{chunk-cgznz22f.js.map → chunk-n68vz95m.js.map} +3 -3
- package/dist/{chunk-neftrg0n.js → chunk-p351afzm.js} +14 -14
- package/dist/{chunk-neftrg0n.js.map → chunk-p351afzm.js.map} +4 -4
- 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-jhbk10wf.js → chunk-q9nkpr8k.js} +1 -1
- package/dist/chunk-qafng88v.js +225 -0
- package/dist/chunk-qafng88v.js.map +11 -0
- package/dist/chunk-qds484t8.js +1363 -0
- package/dist/chunk-qds484t8.js.map +18 -0
- package/dist/{chunk-47e09r7z.js → chunk-qttqe1ah.js} +86 -6
- package/dist/{chunk-47e09r7z.js.map → chunk-qttqe1ah.js.map} +5 -4
- package/dist/{chunk-4zm1k3xj.js → chunk-r2psmn42.js} +1 -1
- package/dist/{chunk-31khg3g0.js → chunk-rt9deb92.js} +76 -4
- package/dist/{chunk-31khg3g0.js.map → chunk-rt9deb92.js.map} +3 -3
- package/dist/{chunk-r1cxq7vv.js → chunk-rtdrm592.js} +2 -2
- package/dist/{chunk-t5daew4g.js → chunk-s5n9617r.js} +18 -18
- package/dist/{chunk-t5daew4g.js.map → chunk-s5n9617r.js.map} +1 -1
- package/dist/{chunk-m3qe54bb.js → chunk-smnt672s.js} +1 -1
- package/dist/{chunk-21q0j5f2.js → chunk-stmxh0hv.js} +2 -2
- package/dist/{chunk-y2x2935j.js → chunk-sysnvjce.js} +5 -5
- package/dist/{chunk-y2x2935j.js.map → chunk-sysnvjce.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-ff5xkv0p.js → chunk-tfzvjdms.js} +1 -1
- package/dist/chunk-tqa68kj7.js +1322 -0
- package/dist/chunk-tqa68kj7.js.map +25 -0
- package/dist/chunk-vtjzwymr.js +37 -0
- package/dist/chunk-vtjzwymr.js.map +10 -0
- package/dist/{chunk-dz7a4t3a.js → chunk-vzkxqf8h.js} +26 -21
- package/dist/{chunk-dz7a4t3a.js.map → chunk-vzkxqf8h.js.map} +8 -8
- package/dist/{chunk-6b61s40c.js → chunk-w3t94hm6.js} +1 -1
- package/dist/{chunk-t9xyr7y9.js → chunk-w9s23r24.js} +1218 -101
- package/dist/chunk-w9s23r24.js.map +30 -0
- package/dist/{chunk-9rh8ncs5.js → chunk-wa05txmk.js} +20 -7
- package/dist/{chunk-9rh8ncs5.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-agn8d8ys.js → chunk-xtztwpkh.js} +1 -1
- 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-ratj7t3t.js → chunk-z0t4p2sk.js} +465 -76
- package/dist/chunk-z0t4p2sk.js.map +47 -0
- package/dist/{chunk-0g5nyx0k.js → chunk-zeykm8my.js} +2 -2
- 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 +13 -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 +61 -55
- 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 +60 -54
- package/dist/execution/primitive.js.map +1 -1
- package/dist/execution/request.js +57 -51
- 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 +12 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +101 -93
- 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 +33 -30
- 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/catalog.d.ts +16 -0
- package/dist/models/catalog.d.ts.map +1 -1
- package/dist/models/definitions.d.ts +1 -1
- package/dist/models/definitions.d.ts.map +1 -1
- package/dist/models/execution/index.js +36 -33
- package/dist/models/execution/index.js.map +1 -1
- package/dist/models/execution/model-call-recorder.d.ts +1 -1
- package/dist/models/execution/model-call-recorder.d.ts.map +1 -1
- package/dist/models/execution/web-search.d.ts +7 -0
- package/dist/models/execution/web-search.d.ts.map +1 -0
- package/dist/models/index.d.ts +3 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +5 -3
- package/dist/models/index.js.map +1 -1
- package/dist/models/language-model.d.ts +12 -0
- package/dist/models/language-model.d.ts.map +1 -1
- package/dist/models/web-search-model.d.ts +66 -0
- package/dist/models/web-search-model.d.ts.map +1 -0
- package/dist/objects/artifact-refs.d.ts +5 -0
- package/dist/objects/artifact-refs.d.ts.map +1 -0
- package/dist/objects/index.js +63 -58
- 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/executor.d.ts.map +1 -1
- package/dist/objects/query/index.d.ts +1 -0
- package/dist/objects/query/index.d.ts.map +1 -1
- package/dist/objects/query/index.js +35 -29
- 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/query/sort-ties.d.ts +11 -0
- package/dist/objects/query/sort-ties.d.ts.map +1 -0
- 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 +40 -37
- 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 +33 -30
- 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 +4 -1
- 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 +57 -36
- package/dist/runtime/internal.js.map +1 -1
- package/dist/runtime/resolve-definitions.d.ts.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/index.d.ts +1 -0
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/internal.js +1 -1
- package/dist/security/registry.d.ts +2 -0
- package/dist/security/registry.d.ts.map +1 -1
- package/dist/security/view-conditions.d.ts.map +1 -1
- package/dist/security/visibility-keys.d.ts +19 -0
- package/dist/security/visibility-keys.d.ts.map +1 -0
- 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 +74 -33
- 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/in-memory.d.ts +8 -2
- package/dist/storage/agents/in-memory.d.ts.map +1 -1
- package/dist/storage/agents/index.d.ts +1 -1
- package/dist/storage/agents/index.d.ts.map +1 -1
- package/dist/storage/agents/provider.d.ts +8 -2
- package/dist/storage/agents/provider.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +12 -6
- package/dist/storage/agents/provider.js.map +1 -1
- package/dist/storage/agents/types.d.ts +42 -2
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/ai-cost/provider.js +4 -4
- package/dist/storage/ai-limits/enforcement.js +4 -4
- package/dist/storage/ai-limits/provider.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 +23 -7
- package/dist/storage/connector-connections/provider.js.map +6 -6
- 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 +20 -13
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +61 -51
- 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 +83 -7
- 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/migrations/types.d.ts +6 -0
- package/dist/storage/migrations/types.d.ts.map +1 -1
- 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/index.d.ts +1 -1
- package/dist/storage/objects/index.d.ts.map +1 -1
- package/dist/storage/objects/query-preparation.d.ts +13 -0
- package/dist/storage/objects/query-preparation.d.ts.map +1 -1
- package/dist/storage/objects/read-scope.d.ts.map +1 -1
- package/dist/storage/objects/types.d.ts +70 -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 +41 -38
- 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/agent-storage-contract.d.ts.map +1 -1
- package/dist/testing/ai-limit-storage-contract.d.ts.map +1 -1
- package/dist/testing/ai-model-call-groups-contract.d.ts.map +1 -1
- package/dist/testing/ai-usage-storage-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 +6497 -3090
- package/dist/testing/index.js.map +32 -23
- 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-conditional-read-scope-contract.d.ts.map +1 -1
- 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 +72 -40
- 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 +68 -62
- 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/README.md +2 -1
- package/src/agents/cancel.ts +7 -1
- package/src/agents/execution.ts +10 -2
- package/src/agents/fork.ts +12 -4
- package/src/agents/index.ts +16 -2
- package/src/agents/request.ts +42 -31
- package/src/agents/run-artifacts.ts +290 -46
- package/src/agents/run-plan.ts +31 -0
- package/src/agents/run-session-http.ts +19 -12
- package/src/agents/run-session-serve.ts +18 -2
- package/src/agents/run-session.ts +39 -12
- package/src/agents/skills.ts +3 -0
- package/src/agents/step-limits.ts +6 -0
- package/src/agents/streams/protocol.ts +14 -14
- package/src/agents/tool-files.ts +11 -3
- package/src/agents/validation.ts +12 -0
- package/src/agents/web.ts +218 -0
- 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 +149 -0
- package/src/artifacts/frames/runtime.ts +317 -29
- package/src/artifacts/holders.ts +120 -0
- package/src/artifacts/ids.ts +8 -0
- package/src/artifacts/index.ts +28 -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/authorization/resolve.ts +9 -11
- package/src/authorization/types.ts +5 -5
- 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 +93 -7
- 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 +37 -22
- package/src/http/api-routes.ts +105 -4
- package/src/index.ts +24 -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/catalog.ts +52 -3
- package/src/models/definitions.ts +2 -0
- package/src/models/execution/README.md +22 -2
- package/src/models/execution/model-call-recorder.ts +1 -1
- package/src/models/execution/web-search.ts +186 -0
- package/src/models/index.ts +12 -0
- package/src/models/language-model.ts +12 -0
- package/src/models/web-search-model.ts +152 -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/executor.ts +7 -3
- package/src/objects/query/index.ts +1 -0
- package/src/objects/query/ir.ts +2 -0
- package/src/objects/query/scalar-values.ts +5 -3
- package/src/objects/query/sort-ties.ts +16 -0
- 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 +7 -2
- 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/resolve-definitions.ts +4 -0
- package/src/runtime/sixb.ts +14 -5
- package/src/scheduler/index.ts +0 -2
- package/src/security/index.ts +1 -0
- package/src/security/registry.ts +2 -0
- package/src/security/view-conditions.ts +4 -3
- package/src/security/visibility-keys.ts +144 -0
- 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/in-memory.ts +29 -2
- package/src/storage/agents/index.ts +2 -0
- package/src/storage/agents/provider.ts +57 -1
- package/src/storage/agents/types.ts +45 -2
- 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 +6 -3
- package/src/storage/connector-connections/index.ts +1 -0
- package/src/storage/connector-connections/provider/connections.ts +2 -2
- 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 +69 -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/migrations/types.ts +6 -0
- package/src/storage/objects/in-memory/query.ts +6 -2
- package/src/storage/objects/in-memory/storage.ts +81 -0
- package/src/storage/objects/index.ts +2 -0
- package/src/storage/objects/query-preparation.ts +59 -1
- package/src/storage/objects/read-scope.ts +109 -2
- package/src/storage/objects/types.ts +59 -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/agent-storage-contract.ts +70 -0
- package/src/testing/ai-limit-storage-contract.ts +11 -1
- package/src/testing/ai-model-call-groups-contract.ts +2 -1
- package/src/testing/ai-usage-storage-contract.ts +15 -2
- 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 +117 -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-conditional-read-scope-contract.ts +267 -5
- package/src/testing/object-query-contract.ts +168 -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-3x3bebz7.js.map +0 -49
- 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-aqyjb86c.js +0 -587
- package/dist/chunk-aqyjb86c.js.map +0 -18
- package/dist/chunk-az47zep4.js +0 -41
- package/dist/chunk-az47zep4.js.map +0 -10
- package/dist/chunk-cb21tx14.js.map +0 -71
- package/dist/chunk-djs3hw9p.js.map +0 -20
- 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-edx8xcsm.js.map +0 -13
- package/dist/chunk-epyfm23v.js +0 -299
- package/dist/chunk-epyfm23v.js.map +0 -11
- package/dist/chunk-fb3feg1e.js +0 -298
- package/dist/chunk-fb3feg1e.js.map +0 -12
- package/dist/chunk-fg1db9xx.js.map +0 -10
- package/dist/chunk-h05rg3bx.js +0 -314
- package/dist/chunk-h05rg3bx.js.map +0 -12
- package/dist/chunk-hz5d43gn.js.map +0 -10
- package/dist/chunk-jbw70d6t.js.map +0 -10
- package/dist/chunk-jftd33rc.js.map +0 -11
- package/dist/chunk-jk97v21j.js.map +0 -10
- package/dist/chunk-jspskey0.js.map +0 -10
- package/dist/chunk-kfee1h52.js.map +0 -13
- package/dist/chunk-ks87m383.js.map +0 -44
- 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-ratj7t3t.js.map +0 -45
- package/dist/chunk-s3we74h8.js.map +0 -12
- package/dist/chunk-scyq22td.js.map +0 -12
- package/dist/chunk-t9xyr7y9.js.map +0 -22
- package/dist/chunk-tvbmh7tj.js.map +0 -18
- package/dist/chunk-tvefbgvw.js.map +0 -11
- package/dist/chunk-w976a4me.js.map +0 -10
- 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-2pk5hjj9.js.map → chunk-186k5yz3.js.map} +0 -0
- /package/dist/{chunk-nghc7eq0.js.map → chunk-3723kgba.js.map} +0 -0
- /package/dist/{chunk-ytzcxtpt.js.map → chunk-3ba89vm7.js.map} +0 -0
- /package/dist/{chunk-qsg8rw04.js.map → chunk-5qqmndhm.js.map} +0 -0
- /package/dist/{chunk-8wsjr52f.js.map → chunk-7qe46788.js.map} +0 -0
- /package/dist/{chunk-23s66j86.js.map → chunk-855w9nvw.js.map} +0 -0
- /package/dist/{chunk-qbrmpgvv.js.map → chunk-8tqnsx3q.js.map} +0 -0
- /package/dist/{chunk-s038wa5v.js.map → chunk-b9qfh2ya.js.map} +0 -0
- /package/dist/{chunk-7hd2ez3q.js.map → chunk-c4nrycdy.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-jhbk10wf.js.map → chunk-q9nkpr8k.js.map} +0 -0
- /package/dist/{chunk-4zm1k3xj.js.map → chunk-r2psmn42.js.map} +0 -0
- /package/dist/{chunk-r1cxq7vv.js.map → chunk-rtdrm592.js.map} +0 -0
- /package/dist/{chunk-m3qe54bb.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
- /package/dist/{chunk-agn8d8ys.js.map → chunk-xtztwpkh.js.map} +0 -0
- /package/dist/{chunk-0g5nyx0k.js.map → chunk-zeykm8my.js.map} +0 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import type { AuthStorage, DirectoryVerdict, UserIdentityRecord, UserRecord } from "../storage/auth"
|
|
2
|
+
import { AuthRuntimeError } from "./errors"
|
|
3
|
+
import type { AuthStrategyDirectory } from "./types"
|
|
4
|
+
|
|
5
|
+
const DEFAULT_INTERVAL_MS = 60 * 60_000
|
|
6
|
+
const MIN_INTERVAL_MS = 60_000
|
|
7
|
+
const DEFAULT_CONFIRM_AFTER_MS = 60_000
|
|
8
|
+
// The confirming read must fit in the pass's budget with the two reads around it.
|
|
9
|
+
const MAX_CONFIRM_AFTER_MS = 5 * 60_000
|
|
10
|
+
// Users read per storage call while a pass resolves its identities.
|
|
11
|
+
const USER_BATCH = 500
|
|
12
|
+
|
|
13
|
+
export interface DirectorySchedule {
|
|
14
|
+
readonly intervalMs: number
|
|
15
|
+
readonly confirmAfterMs: number
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface DirectoryChange {
|
|
19
|
+
readonly user: UserRecord
|
|
20
|
+
readonly verdict: DirectoryVerdict
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** The directory's timing, checked once when auth starts. */
|
|
24
|
+
export function directorySchedule(directory: AuthStrategyDirectory): DirectorySchedule {
|
|
25
|
+
const intervalMs = directory.intervalMs ?? DEFAULT_INTERVAL_MS
|
|
26
|
+
if (!Number.isFinite(intervalMs) || intervalMs < MIN_INTERVAL_MS) {
|
|
27
|
+
throw new AuthRuntimeError(
|
|
28
|
+
"invalid_auth_config",
|
|
29
|
+
"[Sixb] The auth strategy's directory intervalMs must be at least 60000 (one minute)."
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
const confirmAfterMs = directory.confirmAfterMs ?? DEFAULT_CONFIRM_AFTER_MS
|
|
33
|
+
if (
|
|
34
|
+
!Number.isFinite(confirmAfterMs) ||
|
|
35
|
+
confirmAfterMs < 0 ||
|
|
36
|
+
confirmAfterMs > MAX_CONFIRM_AFTER_MS
|
|
37
|
+
) {
|
|
38
|
+
throw new AuthRuntimeError(
|
|
39
|
+
"invalid_auth_config",
|
|
40
|
+
"[Sixb] The auth strategy's directory confirmAfterMs must be from 0 to 300000 (five minutes)."
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
return { intervalMs, confirmAfterMs }
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Reads the directory's verdict on every identity one strategy linked, and decides what to apply:
|
|
48
|
+
*
|
|
49
|
+
* - A directory can answer from before a recent change for a while, and an administrator may
|
|
50
|
+
* unassign someone a moment before assigning them a new role. So a pass that would suspend or
|
|
51
|
+
* reactivate someone reads again `confirmAfterMs` later, and keeps only the status changes both
|
|
52
|
+
* reads agree on. One the second read doesn't confirm waits for the next pass.
|
|
53
|
+
* - A pass that would suspend more than a quarter of the active members it checked, and more than
|
|
54
|
+
* two, throws instead: that looks like a misconfigured directory, not a wave of departures.
|
|
55
|
+
*
|
|
56
|
+
* Returns only verdicts that change something: a status, or the groups the directory grants.
|
|
57
|
+
*/
|
|
58
|
+
export async function planDirectoryPass(input: {
|
|
59
|
+
readonly projectId: string
|
|
60
|
+
readonly storage: AuthStorage
|
|
61
|
+
readonly strategyId: string
|
|
62
|
+
readonly directory: AuthStrategyDirectory
|
|
63
|
+
readonly confirmAfterMs: number
|
|
64
|
+
readonly signal: AbortSignal
|
|
65
|
+
}): Promise<readonly DirectoryChange[]> {
|
|
66
|
+
const { projectId, storage, directory, signal } = input
|
|
67
|
+
const identities = await storage.identities.listForStrategy({
|
|
68
|
+
projectId,
|
|
69
|
+
strategyId: input.strategyId,
|
|
70
|
+
})
|
|
71
|
+
if (identities.length === 0) return []
|
|
72
|
+
|
|
73
|
+
const read = async () => {
|
|
74
|
+
const verdicts = await directory.check({ identities, signal })
|
|
75
|
+
const users = await usersById(storage, projectId, identities)
|
|
76
|
+
return changesFrom(identities, verdicts, users)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
let changes = await read()
|
|
80
|
+
if (changes.some(changesStatus)) {
|
|
81
|
+
await delay(input.confirmAfterMs, signal)
|
|
82
|
+
const first = new Map(changes.map(({ user, verdict }) => [user.id, verdict.status]))
|
|
83
|
+
changes = (await read()).filter(
|
|
84
|
+
(change) => !changesStatus(change) || first.get(change.user.id) === change.verdict.status
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const activeMembers = changes.filter(({ user }) => user.status === "active").length
|
|
89
|
+
const suspensions = changes.filter(
|
|
90
|
+
({ user, verdict }) => verdict.status === "inactive" && user.status === "active"
|
|
91
|
+
).length
|
|
92
|
+
if (suspensions > Math.max(2, activeMembers / 4)) {
|
|
93
|
+
throw new Error(
|
|
94
|
+
`[Sixb] The directory check would suspend ${suspensions} members at once, so it suspended ` +
|
|
95
|
+
"no one. Check the directory's configuration, or suspend them in Settings › Members."
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return changes.filter(
|
|
100
|
+
(change) =>
|
|
101
|
+
changesStatus(change) ||
|
|
102
|
+
(change.verdict.status === "active" && change.verdict.groupIds !== undefined)
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Whether applying this verdict would suspend or reactivate the member. */
|
|
107
|
+
function changesStatus({ user, verdict }: DirectoryChange): boolean {
|
|
108
|
+
return verdict.status === "inactive"
|
|
109
|
+
? user.status === "active"
|
|
110
|
+
: user.status === "suspended" && user.suspensionSource === "directory"
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* One verdict per member the directory answered for. A member with several identities stays
|
|
115
|
+
* active while any of them is.
|
|
116
|
+
*/
|
|
117
|
+
function changesFrom(
|
|
118
|
+
identities: readonly UserIdentityRecord[],
|
|
119
|
+
verdicts: ReadonlyMap<string, DirectoryVerdict>,
|
|
120
|
+
users: ReadonlyMap<string, UserRecord>
|
|
121
|
+
): readonly DirectoryChange[] {
|
|
122
|
+
const changes = new Map<string, DirectoryChange>()
|
|
123
|
+
for (const identity of identities) {
|
|
124
|
+
const verdict = verdicts.get(identity.subject)
|
|
125
|
+
const user = users.get(identity.userId)
|
|
126
|
+
if (!verdict || !user) continue
|
|
127
|
+
const existing = changes.get(user.id)
|
|
128
|
+
if (!existing || (existing.verdict.status === "inactive" && verdict.status === "active")) {
|
|
129
|
+
changes.set(user.id, { user, verdict })
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return [...changes.values()]
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
async function usersById(
|
|
136
|
+
storage: AuthStorage,
|
|
137
|
+
projectId: string,
|
|
138
|
+
identities: readonly UserIdentityRecord[]
|
|
139
|
+
): Promise<ReadonlyMap<string, UserRecord>> {
|
|
140
|
+
const ids = [...new Set(identities.map((identity) => identity.userId))]
|
|
141
|
+
const users = new Map<string, UserRecord>()
|
|
142
|
+
for (let start = 0; start < ids.length; start += USER_BATCH) {
|
|
143
|
+
const batch = await storage.users.getByIds({
|
|
144
|
+
projectId,
|
|
145
|
+
ids: ids.slice(start, start + USER_BATCH),
|
|
146
|
+
})
|
|
147
|
+
for (const user of batch) users.set(user.id, user)
|
|
148
|
+
}
|
|
149
|
+
return users
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function delay(ms: number, signal: AbortSignal): Promise<void> {
|
|
153
|
+
signal.throwIfAborted()
|
|
154
|
+
if (ms === 0) return Promise.resolve()
|
|
155
|
+
return new Promise((resolve, reject) => {
|
|
156
|
+
const abort = () => {
|
|
157
|
+
clearTimeout(timer)
|
|
158
|
+
reject(signal.reason)
|
|
159
|
+
}
|
|
160
|
+
const timer = setTimeout(() => {
|
|
161
|
+
signal.removeEventListener("abort", abort)
|
|
162
|
+
resolve()
|
|
163
|
+
}, ms)
|
|
164
|
+
signal.addEventListener("abort", abort, { once: true })
|
|
165
|
+
})
|
|
166
|
+
}
|
|
@@ -48,17 +48,24 @@ export function profileUpdatedEvents(
|
|
|
48
48
|
]
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* A member was suspended or reactivated. Without a caller, no one asked: the identity provider's
|
|
53
|
+
* directory or server code did it, and the event carries no `requestedBy`.
|
|
54
|
+
*/
|
|
51
55
|
export function statusChangedEvents(
|
|
52
|
-
caller: AuthenticatedUserRequestSession,
|
|
53
56
|
previousUser: UserRecord,
|
|
54
|
-
user: UserRecord
|
|
57
|
+
user: UserRecord,
|
|
58
|
+
caller?: AuthenticatedUserRequestSession
|
|
55
59
|
): readonly EventDraft[] {
|
|
56
60
|
if (previousUser.status === user.status) return []
|
|
57
61
|
|
|
58
62
|
return [
|
|
59
63
|
{
|
|
60
64
|
type: user.status === "suspended" ? "user.suspended" : "user.reactivated",
|
|
61
|
-
payload: {
|
|
65
|
+
payload: {
|
|
66
|
+
user: toUserProfile(user),
|
|
67
|
+
...(caller === undefined ? {} : { requestedBy: requester(caller) }),
|
|
68
|
+
},
|
|
62
69
|
},
|
|
63
70
|
]
|
|
64
71
|
}
|
package/src/auth/runtime.ts
CHANGED
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
} from "./access-tokens"
|
|
35
35
|
import { getRequestClientAddress } from "./client-address"
|
|
36
36
|
import { getCookie, type ResolvedAuthCookieOptions } from "./cookies"
|
|
37
|
+
import { type DirectorySchedule, directorySchedule, planDirectoryPass } from "./directory"
|
|
37
38
|
import { AuthRuntimeError } from "./errors"
|
|
38
39
|
import {
|
|
39
40
|
invitedEvents,
|
|
@@ -150,6 +151,12 @@ export interface AuthRuntimeOptions {
|
|
|
150
151
|
readonly config?: SixbAuthConfig
|
|
151
152
|
/** Where member events go: joined, suspended, reactivated, invited, profile updated. */
|
|
152
153
|
readonly events: DomainEventLog
|
|
154
|
+
/**
|
|
155
|
+
* Runs after any suspension, by an administrator, server code or the directory, to end what the
|
|
156
|
+
* person still holds outside auth: the host revokes their own connector connections. A failure
|
|
157
|
+
* is logged; it never undoes the suspension.
|
|
158
|
+
*/
|
|
159
|
+
readonly onUserSuspended?: (userId: string) => Promise<void>
|
|
153
160
|
}
|
|
154
161
|
|
|
155
162
|
export class AuthRuntime {
|
|
@@ -159,13 +166,18 @@ export class AuthRuntime {
|
|
|
159
166
|
private readonly config: ResolvedAuthConfig
|
|
160
167
|
private readonly sessionCache: SessionCache | null
|
|
161
168
|
private readonly events: DomainEventLog
|
|
169
|
+
private readonly onUserSuspended?: (userId: string) => Promise<void>
|
|
170
|
+
private readonly directorySchedule?: DirectorySchedule
|
|
162
171
|
|
|
163
172
|
constructor(options: AuthRuntimeOptions) {
|
|
164
173
|
this.projectId = options.projectId
|
|
165
174
|
this.storage = options.storage
|
|
166
175
|
this.security = options.security
|
|
167
176
|
this.events = options.events
|
|
177
|
+
this.onUserSuspended = options.onUserSuspended
|
|
168
178
|
this.config = resolveAuthConfig(options.config)
|
|
179
|
+
const directory = this.config.strategy?.directory
|
|
180
|
+
if (directory && this.isEnabled()) this.directorySchedule = directorySchedule(directory)
|
|
169
181
|
this.sessionCache =
|
|
170
182
|
this.config.session.cacheTtlMs > 0 ? new SessionCache(this.config.session.cacheTtlMs) : null
|
|
171
183
|
|
|
@@ -1229,18 +1241,106 @@ export class AuthRuntime {
|
|
|
1229
1241
|
)
|
|
1230
1242
|
}
|
|
1231
1243
|
|
|
1232
|
-
const
|
|
1244
|
+
const suspended = await this.suspend(user.id, caller)
|
|
1245
|
+
return { user: suspended, groupIds, managedGroupIds }
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
/** Suspends a member for server code. Trusted code decides who may ask. */
|
|
1249
|
+
suspendUser(userId: string): Promise<UserRecord> {
|
|
1250
|
+
this.requireAuthStorage()
|
|
1251
|
+
return this.suspend(assertNonEmpty(userId, "User id"))
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
/** Reactivates a member for server code, whoever suspended them. Sessions stay ended. */
|
|
1255
|
+
async reactivateUser(userId: string): Promise<UserRecord> {
|
|
1256
|
+
const { user, previousUser } = await this.requireAuthStorage().users.updateStatus({
|
|
1233
1257
|
projectId: this.projectId,
|
|
1234
|
-
|
|
1258
|
+
id: assertNonEmpty(userId, "User id"),
|
|
1259
|
+
status: "active",
|
|
1260
|
+
updatedAt: new Date(),
|
|
1261
|
+
})
|
|
1262
|
+
await this.afterStatusChange(previousUser, user)
|
|
1263
|
+
return user
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
private async suspend(
|
|
1267
|
+
userId: string,
|
|
1268
|
+
caller?: AuthenticatedUserRequestSession
|
|
1269
|
+
): Promise<UserRecord> {
|
|
1270
|
+
const { user, previousUser } = await this.requireAuthStorage().suspendUserAndRevokeSessions({
|
|
1271
|
+
projectId: this.projectId,
|
|
1272
|
+
userId,
|
|
1235
1273
|
suspendedAt: new Date(),
|
|
1236
1274
|
})
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1275
|
+
await this.afterStatusChange(previousUser, user, caller)
|
|
1276
|
+
return user
|
|
1277
|
+
}
|
|
1240
1278
|
|
|
1241
|
-
|
|
1279
|
+
/** How often the orchestrator checks the directory. Undefined when the strategy has none. */
|
|
1280
|
+
get directoryIntervalMs(): number | undefined {
|
|
1281
|
+
return this.directorySchedule?.intervalMs
|
|
1282
|
+
}
|
|
1242
1283
|
|
|
1243
|
-
|
|
1284
|
+
/**
|
|
1285
|
+
* Runs one pass of the directory check (see `planDirectoryPass`) and applies what it decided.
|
|
1286
|
+
* Throws, once every other member is updated, when any could not be.
|
|
1287
|
+
*/
|
|
1288
|
+
async checkDirectory(signal: AbortSignal): Promise<void> {
|
|
1289
|
+
const strategy = this.config.strategy
|
|
1290
|
+
const directory = strategy?.directory
|
|
1291
|
+
if (!strategy || !directory || !this.directorySchedule) return
|
|
1292
|
+
|
|
1293
|
+
const storage = this.requireAuthStorage()
|
|
1294
|
+
const changes = await planDirectoryPass({
|
|
1295
|
+
projectId: this.projectId,
|
|
1296
|
+
storage,
|
|
1297
|
+
strategyId: strategy.id,
|
|
1298
|
+
directory,
|
|
1299
|
+
confirmAfterMs: this.directorySchedule.confirmAfterMs,
|
|
1300
|
+
signal,
|
|
1301
|
+
})
|
|
1302
|
+
|
|
1303
|
+
const failures: unknown[] = []
|
|
1304
|
+
for (const { user, verdict } of changes) {
|
|
1305
|
+
signal.throwIfAborted()
|
|
1306
|
+
try {
|
|
1307
|
+
const applied = await storage.applyDirectoryVerdict({
|
|
1308
|
+
projectId: this.projectId,
|
|
1309
|
+
userId: user.id,
|
|
1310
|
+
verdict,
|
|
1311
|
+
appliedAt: new Date(),
|
|
1312
|
+
})
|
|
1313
|
+
await this.afterStatusChange(applied.previousUser, applied.user)
|
|
1314
|
+
} catch (error) {
|
|
1315
|
+
failures.push(error)
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
if (failures.length > 0) {
|
|
1319
|
+
throw new AggregateError(
|
|
1320
|
+
failures,
|
|
1321
|
+
`[Sixb] Directory check could not update ${failures.length} of ${changes.length} members.`
|
|
1322
|
+
)
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
// Ends what a changed status leaves behind: cached sessions, which carry the old status and
|
|
1327
|
+
// groups, and, for a suspension, the person's own connections. Then tells the project.
|
|
1328
|
+
private async afterStatusChange(
|
|
1329
|
+
previousUser: UserRecord,
|
|
1330
|
+
user: UserRecord,
|
|
1331
|
+
caller?: AuthenticatedUserRequestSession
|
|
1332
|
+
): Promise<void> {
|
|
1333
|
+
this.sessionCache?.invalidateUser(user.id)
|
|
1334
|
+
if (previousUser.status === "active" && user.status === "suspended") {
|
|
1335
|
+
await this.onUserSuspended?.(user.id).catch((error: unknown) => {
|
|
1336
|
+
console.error(
|
|
1337
|
+
`[Sixb] Could not revoke the connections of suspended member '${user.id}'. Syncs ` +
|
|
1338
|
+
"already skip them; disconnect them from the connections page to delete their tokens.",
|
|
1339
|
+
error
|
|
1340
|
+
)
|
|
1341
|
+
})
|
|
1342
|
+
}
|
|
1343
|
+
await this.emitMemberEvents(statusChangedEvents(previousUser, user, caller))
|
|
1244
1344
|
}
|
|
1245
1345
|
|
|
1246
1346
|
async reactivateMember(
|
|
@@ -1265,7 +1365,7 @@ export class AuthRuntime {
|
|
|
1265
1365
|
updatedAt: new Date(),
|
|
1266
1366
|
})
|
|
1267
1367
|
|
|
1268
|
-
await this.
|
|
1368
|
+
await this.afterStatusChange(previousUser, reactivated, caller)
|
|
1269
1369
|
|
|
1270
1370
|
return { user: reactivated, groupIds, managedGroupIds }
|
|
1271
1371
|
}
|
package/src/auth/strategy.ts
CHANGED
|
@@ -7,17 +7,19 @@
|
|
|
7
7
|
* entry plus the storage contracts from `@sixb/core/storage`.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
export type { UserIdentityRecord } from "../storage/auth"
|
|
10
|
+
export type { DirectoryVerdict, UserIdentityRecord } from "../storage/auth"
|
|
11
11
|
export type { SignInRefusalReason } from "./errors"
|
|
12
12
|
export { SignInRefusedError } from "./errors"
|
|
13
13
|
export { signInAvatarUrl, signInDisplayName } from "./profile"
|
|
14
14
|
export type {
|
|
15
|
+
AuthDirectoryCheckInput,
|
|
15
16
|
AuthEmailDeliveryStatus,
|
|
16
17
|
AuthInvitationRecipientInput,
|
|
17
18
|
AuthInvitationRecipientResult,
|
|
18
19
|
AuthInvitationRecipientStatus,
|
|
19
20
|
AuthRequestResult,
|
|
20
21
|
AuthStrategy,
|
|
22
|
+
AuthStrategyDirectory,
|
|
21
23
|
AuthStrategyKind,
|
|
22
24
|
InvitationDeliveryAuthStrategy,
|
|
23
25
|
InvitationDeliveryInput,
|
package/src/auth/types.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type {
|
|
|
4
4
|
AuthStorage,
|
|
5
5
|
CompleteAuthSessionInput,
|
|
6
6
|
CompleteSignInResult,
|
|
7
|
+
DirectoryVerdict,
|
|
7
8
|
InvitationRecord,
|
|
8
9
|
InvitationStatus,
|
|
9
10
|
ServiceAccountGroupMembershipRecord,
|
|
@@ -50,6 +51,49 @@ export interface AuthStrategy {
|
|
|
50
51
|
* `identity`, so people cannot edit them in Sixb. Omitted, the strategy manages none.
|
|
51
52
|
*/
|
|
52
53
|
providerProfileFields?(identity: UserIdentityRecord): readonly ProfileField[]
|
|
54
|
+
/**
|
|
55
|
+
* Checks the people this strategy signed in against the identity provider's directory on a
|
|
56
|
+
* schedule, so someone who leaves is suspended without waiting for an administrator.
|
|
57
|
+
*/
|
|
58
|
+
readonly directory?: AuthStrategyDirectory
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The identity provider's directory, as a strategy reads it. The orchestrator's maintenance loop
|
|
63
|
+
* runs `check` every `intervalMs` and applies the verdicts:
|
|
64
|
+
*
|
|
65
|
+
* Suspending or reactivating someone takes two reads that agree, `confirmAfterMs` apart.
|
|
66
|
+
*
|
|
67
|
+
* - `inactive` suspends the person and ends their sessions, unless more than a quarter of the
|
|
68
|
+
* active members checked (and more than two) would be suspended at once. That pass applies
|
|
69
|
+
* nothing and fails, since it looks like a misconfigured directory rather than a wave of
|
|
70
|
+
* departures.
|
|
71
|
+
* - `active` lifts a suspension the directory made (never an administrator's) and, with
|
|
72
|
+
* `groupIds`, syncs the person's directory groups as sign-in does.
|
|
73
|
+
*/
|
|
74
|
+
export interface AuthStrategyDirectory {
|
|
75
|
+
/** How often to check, at least one minute. Defaults to one hour. */
|
|
76
|
+
readonly intervalMs?: number
|
|
77
|
+
/**
|
|
78
|
+
* How long after a change the directory may still answer from before it. A pass that would
|
|
79
|
+
* suspend or reactivate someone reads again this long after its first read, and applies only
|
|
80
|
+
* the changes both reads agree on. Defaults to one minute; at most five. Use 0 for a directory
|
|
81
|
+
* that always answers with its latest state.
|
|
82
|
+
*/
|
|
83
|
+
readonly confirmAfterMs?: number
|
|
84
|
+
/**
|
|
85
|
+
* The directory's verdict on each identity, keyed by subject. Leave out an identity the
|
|
86
|
+
* directory cannot answer for, and nothing changes for it. Throw when the check as a whole
|
|
87
|
+
* fails; nothing is applied, and the next pass tries again.
|
|
88
|
+
*/
|
|
89
|
+
check(input: AuthDirectoryCheckInput): Promise<ReadonlyMap<string, DirectoryVerdict>>
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface AuthDirectoryCheckInput {
|
|
93
|
+
/** Every identity the strategy linked, with the claims of its last sign-in. */
|
|
94
|
+
readonly identities: readonly UserIdentityRecord[]
|
|
95
|
+
/** Aborted when the pass runs out of time or the server stops. */
|
|
96
|
+
readonly signal: AbortSignal
|
|
53
97
|
}
|
|
54
98
|
|
|
55
99
|
export interface InvitationRecipientInput {
|
|
@@ -218,12 +218,13 @@ export function assertCanManageConnector(runtime: AuthorizedRuntime, connectorId
|
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
/**
|
|
221
|
-
* Fail closed for operations that have no grant semantics yet.
|
|
221
|
+
* Fail closed for operations that have no grant semantics yet, so only trusted code may run them.
|
|
222
222
|
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
223
|
+
* Its callers: `listLinks`, whose rows reveal target types that no read grant covers, and
|
|
224
|
+
* `users.suspend`/`users.reactivate`, which no grant may hand to a person or to the agent acting
|
|
225
|
+
* for one. Object, link, and telemetry writes moved to {@link assertCanEdit} /
|
|
226
|
+
* {@link assertCanAppendTelemetry}. Keeps unsupported surfaces denied even if a principal-bound
|
|
227
|
+
* runtime context reaches a code path the execution SDK does not expose.
|
|
227
228
|
*/
|
|
228
229
|
export function assertPrivileged(runtime: AuthorizedRuntime, operation: string): void {
|
|
229
230
|
const resolved = assertRuntimeAuthorizationBound(runtime)
|
|
@@ -81,6 +81,10 @@ export function canViewEvent(
|
|
|
81
81
|
case "users":
|
|
82
82
|
// Member events carry profiles and invitee emails: the member directory's grant.
|
|
83
83
|
return isAllowed(authorization, { kind: "users.view" })
|
|
84
|
+
case "artifacts":
|
|
85
|
+
// No grant reads an artifact: its owner and the conversations that share it decide, which
|
|
86
|
+
// the events runtime asks per artifact. Grants alone show none.
|
|
87
|
+
return false
|
|
84
88
|
default:
|
|
85
89
|
// Fail closed: an unmodeled topic may carry a subject we don't yet gate.
|
|
86
90
|
return false
|
|
@@ -53,8 +53,9 @@ export function resolveRoleGrants(role: RoleDefinition, universe: GrantUniverse)
|
|
|
53
53
|
* Resolve a role's conditional view grants once at startup, from their validated conditions.
|
|
54
54
|
*
|
|
55
55
|
* A condition applies to the type its grant names and to each subtype, as a view grant does.
|
|
56
|
-
* Several conditions on one type
|
|
57
|
-
*
|
|
56
|
+
* Several conditions on one type stay apart: the role shows what any of them matches, and each
|
|
57
|
+
* keeps the index storage prepared for it. A type the role also views without a condition drops
|
|
58
|
+
* them: the role shows every object of it.
|
|
58
59
|
*/
|
|
59
60
|
export function resolveRoleViewConditions(
|
|
60
61
|
conditions: readonly {
|
|
@@ -63,7 +64,7 @@ export function resolveRoleViewConditions(
|
|
|
63
64
|
}[],
|
|
64
65
|
grants: GrantIndex,
|
|
65
66
|
universe: GrantUniverse
|
|
66
|
-
): ReadonlyMap<string, ObjectQueryPredicate> {
|
|
67
|
+
): ReadonlyMap<string, readonly ObjectQueryPredicate[]> {
|
|
67
68
|
const byType = new Map<string, ObjectQueryPredicate[]>()
|
|
68
69
|
|
|
69
70
|
for (const condition of conditions) {
|
|
@@ -79,15 +80,12 @@ export function resolveRoleViewConditions(
|
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
return new Map(
|
|
82
|
-
[...byType].map(
|
|
83
|
+
[...byType].map(
|
|
84
|
+
([objectTypeId, predicates]) => [objectTypeId, Object.freeze(predicates)] as const
|
|
85
|
+
)
|
|
83
86
|
)
|
|
84
87
|
}
|
|
85
88
|
|
|
86
|
-
function anyOf(predicates: readonly ObjectQueryPredicate[]): ObjectQueryPredicate {
|
|
87
|
-
if (predicates.length === 1) return predicates[0]!
|
|
88
|
-
return Object.freeze({ op: "or", items: Object.freeze([...predicates]) })
|
|
89
|
-
}
|
|
90
|
-
|
|
91
89
|
function expandSelection(
|
|
92
90
|
selection: Selection,
|
|
93
91
|
universe: ReadonlySet<string>,
|
|
@@ -153,8 +151,8 @@ export function resolveAuthorizationContext(input: {
|
|
|
153
151
|
for (const markingId of role.clearances ?? []) {
|
|
154
152
|
clearances.add(markingId)
|
|
155
153
|
}
|
|
156
|
-
for (const [objectTypeId,
|
|
157
|
-
viewConditions.set(objectTypeId, [...(viewConditions.get(objectTypeId) ?? []),
|
|
154
|
+
for (const [objectTypeId, predicates] of role.viewConditions ?? []) {
|
|
155
|
+
viewConditions.set(objectTypeId, [...(viewConditions.get(objectTypeId) ?? []), ...predicates])
|
|
158
156
|
}
|
|
159
157
|
}
|
|
160
158
|
|
|
@@ -45,10 +45,10 @@ export interface ResolvedRole {
|
|
|
45
45
|
readonly grants: GrantIndex
|
|
46
46
|
/**
|
|
47
47
|
* What the role's `can.view(Type).where(...)` grants show, per concrete type: the type's
|
|
48
|
-
* conditions,
|
|
49
|
-
* `grants["view:object"]` and not here. Absent means none.
|
|
48
|
+
* conditions, any of which shows an object. A type the role also views without a condition is
|
|
49
|
+
* in `grants["view:object"]` and not here. Absent means none.
|
|
50
50
|
*/
|
|
51
|
-
readonly viewConditions?: ReadonlyMap<string, ObjectQueryPredicate>
|
|
51
|
+
readonly viewConditions?: ReadonlyMap<string, readonly ObjectQueryPredicate[]>
|
|
52
52
|
/** Marking ids this role clears. Absent means none. */
|
|
53
53
|
readonly clearances?: ReadonlySet<string>
|
|
54
54
|
}
|
|
@@ -61,8 +61,8 @@ export interface AuthorizationContext {
|
|
|
61
61
|
readonly roleIds: readonly string[]
|
|
62
62
|
readonly grants: GrantIndex
|
|
63
63
|
/**
|
|
64
|
-
* The object types the principal views only where a condition matches, with
|
|
65
|
-
*
|
|
64
|
+
* The object types the principal views only where a condition matches, with every condition
|
|
65
|
+
* its roles put on each. A type in `grants["view:object"]` is never here, so a check on that grant
|
|
66
66
|
* denies these types; only the authorized object reader reads them, through these conditions.
|
|
67
67
|
* Absent means none.
|
|
68
68
|
*/
|
package/src/broker/in-memory.ts
CHANGED
|
@@ -11,6 +11,9 @@ import type {
|
|
|
11
11
|
BrokerStreamRetention,
|
|
12
12
|
} from "./types"
|
|
13
13
|
|
|
14
|
+
/** As long as Redis and NATS remember a key by default. */
|
|
15
|
+
const DEDUPE_WINDOW_MS = 120_000
|
|
16
|
+
|
|
14
17
|
// Payloads are validated by assertBrokerPayload above the call site, so we can
|
|
15
18
|
// skip the redundant validity walk that cloneJsonValue performs.
|
|
16
19
|
function cloneValidatedPayload(value: JsonValue): JsonValue {
|
|
@@ -30,6 +33,8 @@ interface StoredStream {
|
|
|
30
33
|
nextSequence: bigint
|
|
31
34
|
records: StoredRecord[]
|
|
32
35
|
retainedBytes: number
|
|
36
|
+
/** The record each recent idempotency key stored, oldest first. */
|
|
37
|
+
readonly deduped: Map<string, StoredRecord>
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
interface Subscription {
|
|
@@ -80,9 +85,18 @@ export class InMemoryBroker implements Broker {
|
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
const storedStream = this.getEnsuredStream(params.projectId, params.streamId)
|
|
88
|
+
forgetExpiredKeys(storedStream)
|
|
89
|
+
|
|
83
90
|
const stored: StoredRecord[] = []
|
|
91
|
+
const appended: StoredRecord[] = []
|
|
84
92
|
|
|
85
93
|
for (const record of params.records) {
|
|
94
|
+
const duplicate = storedStream.deduped.get(record.idempotencyKey ?? "")
|
|
95
|
+
if (duplicate) {
|
|
96
|
+
appended.push(duplicate)
|
|
97
|
+
continue
|
|
98
|
+
}
|
|
99
|
+
|
|
86
100
|
const cursor = storedStream.nextSequence.toString()
|
|
87
101
|
storedStream.nextSequence += 1n
|
|
88
102
|
const publishedAtMs = Date.now()
|
|
@@ -95,17 +109,20 @@ export class InMemoryBroker implements Broker {
|
|
|
95
109
|
publishedAt: new Date(publishedAtMs).toISOString(),
|
|
96
110
|
publishedAtMs,
|
|
97
111
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
112
|
+
const sized = { ...storedRecord, byteSize: utf8Bytes(JSON.stringify(storedRecord)) }
|
|
113
|
+
|
|
114
|
+
stored.push(sized)
|
|
115
|
+
appended.push(sized)
|
|
116
|
+
if (record.idempotencyKey !== undefined) {
|
|
117
|
+
storedStream.deduped.set(record.idempotencyKey, sized)
|
|
118
|
+
}
|
|
102
119
|
}
|
|
103
120
|
|
|
104
121
|
storedStream.records.push(...stored)
|
|
105
122
|
storedStream.retainedBytes += stored.reduce((total, record) => total + record.byteSize, 0)
|
|
106
123
|
this.applyRetention(storedStream)
|
|
107
|
-
const records =
|
|
108
|
-
this.notify(params.projectId, params.streamId)
|
|
124
|
+
const records = appended.map(toBrokerRecord)
|
|
125
|
+
if (stored.length > 0) this.notify(params.projectId, params.streamId)
|
|
109
126
|
return records
|
|
110
127
|
}
|
|
111
128
|
|
|
@@ -240,6 +257,7 @@ export class InMemoryBroker implements Broker {
|
|
|
240
257
|
nextSequence: 1n,
|
|
241
258
|
records: [],
|
|
242
259
|
retainedBytes: 0,
|
|
260
|
+
deduped: new Map(),
|
|
243
261
|
}
|
|
244
262
|
this.streams.set(key, storedStream)
|
|
245
263
|
}
|
|
@@ -494,6 +512,15 @@ function streamKey(projectId: string, streamId: string): string {
|
|
|
494
512
|
return `${projectId}\0${streamId}`
|
|
495
513
|
}
|
|
496
514
|
|
|
515
|
+
function forgetExpiredKeys(stream: StoredStream): void {
|
|
516
|
+
const expiredBefore = Date.now() - DEDUPE_WINDOW_MS
|
|
517
|
+
|
|
518
|
+
for (const [key, record] of stream.deduped) {
|
|
519
|
+
if (record.publishedAtMs > expiredBefore) return
|
|
520
|
+
stream.deduped.delete(key)
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
497
524
|
function toBrokerRecord(record: StoredRecord): BrokerRecord {
|
|
498
525
|
return {
|
|
499
526
|
streamId: record.streamId,
|
package/src/broker/types.ts
CHANGED
|
@@ -28,6 +28,10 @@ export interface BrokerRecordInput {
|
|
|
28
28
|
readonly name?: string
|
|
29
29
|
readonly key?: string
|
|
30
30
|
readonly payload: JsonValue
|
|
31
|
+
/**
|
|
32
|
+
* Makes retries and racing publishers safe. A record whose key a stream saw within the provider's
|
|
33
|
+
* window, two minutes by default, is not stored again: the append returns the first one.
|
|
34
|
+
*/
|
|
31
35
|
readonly idempotencyKey?: string
|
|
32
36
|
}
|
|
33
37
|
|