@sixb/core 0.2.4 → 0.2.6
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 +41 -40
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/validation.d.ts.map +1 -1
- package/dist/agents/errors.d.ts +1 -1
- package/dist/agents/errors.d.ts.map +1 -1
- package/dist/agents/execution.d.ts +50 -3
- package/dist/agents/execution.d.ts.map +1 -1
- package/dist/agents/ids.d.ts +2 -0
- package/dist/agents/ids.d.ts.map +1 -1
- package/dist/agents/index.d.ts +7 -5
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +74 -50
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/model-routing.d.ts +5 -2
- package/dist/agents/model-routing.d.ts.map +1 -1
- package/dist/agents/queued-turn.d.ts +16 -0
- package/dist/agents/queued-turn.d.ts.map +1 -0
- package/dist/agents/request.d.ts +120 -1
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/run-after-finish.d.ts +10 -0
- package/dist/agents/run-after-finish.d.ts.map +1 -1
- package/dist/agents/run-artifacts.d.ts +0 -38
- package/dist/agents/run-artifacts.d.ts.map +1 -1
- package/dist/agents/run-events.d.ts +10 -1
- package/dist/agents/run-events.d.ts.map +1 -1
- package/dist/agents/run-session-children.d.ts.map +1 -1
- package/dist/agents/run-session-http.d.ts.map +1 -1
- package/dist/agents/run-session-serve.d.ts.map +1 -1
- package/dist/agents/run-session.d.ts +14 -1
- package/dist/agents/run-session.d.ts.map +1 -1
- package/dist/agents/run-turn.d.ts +9 -1
- package/dist/agents/run-turn.d.ts.map +1 -1
- package/dist/agents/streams/index.d.ts +1 -1
- package/dist/agents/streams/index.d.ts.map +1 -1
- package/dist/agents/streams/index.js +1 -1
- package/dist/agents/streams/internal.d.ts +2 -1
- package/dist/agents/streams/internal.d.ts.map +1 -1
- package/dist/agents/streams/internal.js +22 -2
- package/dist/agents/streams/internal.js.map +1 -1
- package/dist/agents/streams/protocol.d.ts +53 -0
- package/dist/agents/streams/protocol.d.ts.map +1 -1
- package/dist/agents/streams/steps.d.ts +24 -0
- package/dist/agents/streams/steps.d.ts.map +1 -0
- package/dist/agents/thread-access.d.ts +44 -2
- package/dist/agents/thread-access.d.ts.map +1 -1
- package/dist/agents/turn-answered.d.ts +7 -0
- package/dist/agents/turn-answered.d.ts.map +1 -0
- package/dist/agents/validation.d.ts +1 -1
- package/dist/agents/validation.d.ts.map +1 -1
- package/dist/artifacts/canvas-display.d.ts +3 -5
- package/dist/artifacts/canvas-display.d.ts.map +1 -1
- package/dist/artifacts/comments.d.ts +14 -3
- package/dist/artifacts/comments.d.ts.map +1 -1
- package/dist/artifacts/document-fill.d.ts +18 -0
- package/dist/artifacts/document-fill.d.ts.map +1 -0
- package/dist/artifacts/errors.d.ts +1 -1
- package/dist/artifacts/errors.d.ts.map +1 -1
- package/dist/artifacts/events.d.ts +3 -2
- package/dist/artifacts/events.d.ts.map +1 -1
- package/dist/artifacts/execution.d.ts +40 -4
- package/dist/artifacts/execution.d.ts.map +1 -1
- package/dist/artifacts/frames/assets.d.ts +8 -1
- package/dist/artifacts/frames/assets.d.ts.map +1 -1
- package/dist/artifacts/frames/document-data.d.ts +98 -0
- package/dist/artifacts/frames/document-data.d.ts.map +1 -0
- package/dist/artifacts/frames/entries.d.ts +12 -7
- package/dist/artifacts/frames/entries.d.ts.map +1 -1
- package/dist/artifacts/frames/index.d.ts +2 -1
- package/dist/artifacts/frames/index.d.ts.map +1 -1
- package/dist/artifacts/frames/index.js +22 -13
- package/dist/artifacts/frames/index.js.map +4 -4
- package/dist/artifacts/frames/kit.d.ts +15 -0
- package/dist/artifacts/frames/kit.d.ts.map +1 -1
- package/dist/artifacts/frames/protocol.d.ts +12 -1
- package/dist/artifacts/frames/protocol.d.ts.map +1 -1
- package/dist/artifacts/frames/runtime.d.ts +24 -4
- package/dist/artifacts/frames/runtime.d.ts.map +1 -1
- package/dist/artifacts/index.d.ts +3 -1
- package/dist/artifacts/index.d.ts.map +1 -1
- package/dist/artifacts/index.js +9 -3
- package/dist/artifacts/index.js.map +3 -3
- package/dist/artifacts/live/blocks.d.ts +62 -0
- package/dist/artifacts/live/blocks.d.ts.map +1 -0
- package/dist/artifacts/live/board.d.ts +6 -0
- package/dist/artifacts/live/board.d.ts.map +1 -1
- package/dist/artifacts/live/document.d.ts +12 -0
- package/dist/artifacts/live/document.d.ts.map +1 -1
- package/dist/artifacts/live/index.d.ts +2 -0
- package/dist/artifacts/live/index.d.ts.map +1 -1
- package/dist/artifacts/live/index.js +148 -44
- package/dist/artifacts/live/index.js.map +3 -3
- package/dist/artifacts/live/page.d.ts +49 -0
- package/dist/artifacts/live/page.d.ts.map +1 -0
- package/dist/artifacts/live/protocol.d.ts +5 -0
- package/dist/artifacts/live/protocol.d.ts.map +1 -1
- package/dist/artifacts/live/server.d.ts +2 -2
- package/dist/artifacts/live/server.d.ts.map +1 -1
- package/dist/artifacts/live/server.js +29 -24
- package/dist/artifacts/live/server.js.map +1 -1
- package/dist/artifacts/live/state.d.ts +4 -1
- package/dist/artifacts/live/state.d.ts.map +1 -1
- package/dist/artifacts/outline.d.ts +16 -0
- package/dist/artifacts/outline.d.ts.map +1 -1
- package/dist/artifacts/paper.d.ts +22 -0
- package/dist/artifacts/paper.d.ts.map +1 -0
- package/dist/artifacts/pdf-job.d.ts +9 -0
- package/dist/artifacts/pdf-job.d.ts.map +1 -0
- package/dist/artifacts/publish/fields.d.ts +25 -0
- package/dist/artifacts/publish/fields.d.ts.map +1 -0
- package/dist/artifacts/publish/index.d.ts +2 -1
- package/dist/artifacts/publish/index.d.ts.map +1 -1
- package/dist/artifacts/publish/index.js +32 -23
- package/dist/artifacts/publish/index.js.map +1 -1
- package/dist/artifacts/publish/merge.d.ts +7 -6
- package/dist/artifacts/publish/merge.d.ts.map +1 -1
- package/dist/artifacts/publish/pdf.d.ts +28 -0
- package/dist/artifacts/publish/pdf.d.ts.map +1 -0
- package/dist/artifacts/publish/previews.d.ts +12 -20
- package/dist/artifacts/publish/previews.d.ts.map +1 -1
- package/dist/artifacts/publish/publish.d.ts.map +1 -1
- package/dist/artifacts/publish/queries.d.ts +6 -1
- package/dist/artifacts/publish/queries.d.ts.map +1 -1
- package/dist/artifacts/publish/query-answers.d.ts +5 -2
- package/dist/artifacts/publish/query-answers.d.ts.map +1 -1
- package/dist/artifacts/publish/validate/document-html.d.ts +24 -0
- package/dist/artifacts/publish/validate/document-html.d.ts.map +1 -0
- package/dist/artifacts/publish/validate/document.d.ts +5 -3
- package/dist/artifacts/publish/validate/document.d.ts.map +1 -1
- package/dist/artifacts/queries.d.ts +16 -2
- package/dist/artifacts/queries.d.ts.map +1 -1
- package/dist/artifacts/run-query.d.ts.map +1 -1
- package/dist/auth/index.js +6 -6
- package/dist/authorization/event-visibility.d.ts.map +1 -1
- package/dist/authorization/index.js +2 -2
- package/dist/blob-storage/index.js +1 -1
- package/dist/bootstrap/index.js +50 -48
- package/dist/bootstrap/index.js.map +2 -2
- package/dist/calendar.d.ts +55 -0
- package/dist/calendar.d.ts.map +1 -0
- package/dist/calendar.js +19 -0
- package/dist/calendar.js.map +9 -0
- package/dist/{chunk-5a4a52tq.js → chunk-0pmpwn3g.js} +18 -2
- package/dist/chunk-0pmpwn3g.js.map +10 -0
- package/dist/{chunk-0k3r5kb3.js → chunk-394zjzjs.js} +20 -10
- package/dist/{chunk-0k3r5kb3.js.map → chunk-394zjzjs.js.map} +5 -5
- package/dist/{chunk-stmxh0hv.js → chunk-3neam1y5.js} +2 -2
- package/dist/{chunk-zeykm8my.js → chunk-3qtk0070.js} +16 -42
- package/dist/chunk-3qtk0070.js.map +14 -0
- package/dist/{chunk-p8pgnq8d.js → chunk-425ydk65.js} +5 -5
- package/dist/{chunk-p351afzm.js → chunk-5sswe5ej.js} +2 -2
- package/dist/{chunk-a6fjkcne.js → chunk-60662fyv.js} +54 -28
- package/dist/{chunk-a6fjkcne.js.map → chunk-60662fyv.js.map} +7 -6
- package/dist/{chunk-e0hnbb1m.js → chunk-61zptves.js} +1 -1
- package/dist/chunk-6hfbz4d0.js +98 -0
- package/dist/chunk-6hfbz4d0.js.map +10 -0
- package/dist/{chunk-3zagkr6w.js → chunk-7mhbs9yy.js} +4 -4
- package/dist/{chunk-3zagkr6w.js.map → chunk-7mhbs9yy.js.map} +1 -1
- package/dist/{chunk-gxwy4c3s.js → chunk-7r9mqpva.js} +570 -104
- package/dist/chunk-7r9mqpva.js.map +47 -0
- package/dist/{chunk-3014rfjz.js → chunk-88xeh6zx.js} +28 -8
- package/dist/{chunk-3014rfjz.js.map → chunk-88xeh6zx.js.map} +4 -4
- package/dist/{chunk-9nsjjd44.js → chunk-8tv3qd65.js} +2 -1
- package/dist/chunk-8tv3qd65.js.map +12 -0
- package/dist/chunk-90nqenq8.js +386 -0
- package/dist/chunk-90nqenq8.js.map +14 -0
- package/dist/{chunk-fe6r7yhg.js → chunk-92wrka15.js} +1 -1
- package/dist/{chunk-w1wq7gfr.js → chunk-9c9yknwt.js} +464 -29
- package/dist/{chunk-w1wq7gfr.js.map → chunk-9c9yknwt.js.map} +7 -7
- package/dist/{chunk-q9nkpr8k.js → chunk-9tpmfh3n.js} +1 -1
- package/dist/chunk-9wr3yajk.js.map +2 -2
- package/dist/{chunk-rtm1jq00.js → chunk-ats8y3d9.js} +1202 -246
- package/dist/{chunk-rtm1jq00.js.map → chunk-ats8y3d9.js.map} +16 -14
- package/dist/{chunk-td26wjr5.js → chunk-bcz9dxtf.js} +17 -47
- package/dist/chunk-bcz9dxtf.js.map +12 -0
- package/dist/chunk-bqr703h4.js +1799 -0
- package/dist/chunk-bqr703h4.js.map +13 -0
- package/dist/{chunk-sysnvjce.js → chunk-brhp9d97.js} +2 -2
- package/dist/{chunk-8a8k38tz.js → chunk-brybqw5k.js} +1 -1
- package/dist/{chunk-rsxb14an.js → chunk-bs1sd0e0.js} +12 -8
- package/dist/chunk-bs1sd0e0.js.map +18 -0
- package/dist/{chunk-eptrvnby.js → chunk-c29729me.js} +42 -3
- package/dist/chunk-c29729me.js.map +12 -0
- package/dist/{chunk-855w9nvw.js → chunk-cg7cygfj.js} +1 -1
- package/dist/chunk-dq3t5sr3.js +114 -0
- package/dist/chunk-dq3t5sr3.js.map +11 -0
- package/dist/{chunk-t24yktqr.js → chunk-dvgc56n2.js} +20 -4
- package/dist/{chunk-t24yktqr.js.map → chunk-dvgc56n2.js.map} +5 -5
- package/dist/{chunk-r2psmn42.js → chunk-eg6xqef7.js} +1 -1
- package/dist/{chunk-7kpqntgw.js → chunk-f05994as.js} +1 -1
- package/dist/{chunk-msyevpp3.js → chunk-fmgf9h5e.js} +38 -14
- package/dist/chunk-fmgf9h5e.js.map +22 -0
- package/dist/{chunk-b9qfh2ya.js → chunk-fzbhybya.js} +29 -2
- package/dist/chunk-fzbhybya.js.map +11 -0
- package/dist/{chunk-t0s7b3d1.js → chunk-gaj8djsw.js} +251 -6
- package/dist/chunk-gaj8djsw.js.map +13 -0
- package/dist/{chunk-2bn6813a.js → chunk-grt2j5vp.js} +2 -2
- package/dist/{chunk-s7xqfxs9.js → chunk-hkbks1xm.js} +3 -1
- package/dist/{chunk-s7xqfxs9.js.map → chunk-hkbks1xm.js.map} +3 -3
- package/dist/chunk-hn2r7z41.js.map +1 -1
- package/dist/{chunk-rtdrm592.js → chunk-htdzx40w.js} +2 -2
- package/dist/{chunk-bc3y6gff.js → chunk-jka26v8c.js} +1 -1
- package/dist/{chunk-yy914zfr.js → chunk-jt012fxq.js} +772 -98
- package/dist/chunk-jt012fxq.js.map +34 -0
- package/dist/{chunk-48c1z8nj.js → chunk-kft7mp7z.js} +28 -3
- package/dist/chunk-kft7mp7z.js.map +10 -0
- package/dist/chunk-mbwsgjn7.js +40 -0
- package/dist/chunk-mbwsgjn7.js.map +11 -0
- package/dist/{chunk-wa05txmk.js → chunk-n1hbwc6y.js} +51 -8
- package/dist/chunk-n1hbwc6y.js.map +12 -0
- package/dist/{chunk-n4zzaf6q.js → chunk-nxysqbt0.js} +4 -2
- package/dist/chunk-nxysqbt0.js.map +10 -0
- package/dist/{chunk-6ef4esq4.js → chunk-pqj8vff9.js} +4 -4
- package/dist/chunk-pvpq483h.js.map +2 -2
- package/dist/{chunk-mzx71snp.js → chunk-q7g9cqwt.js} +7 -2
- package/dist/{chunk-mzx71snp.js.map → chunk-q7g9cqwt.js.map} +3 -3
- package/dist/{chunk-n68vz95m.js → chunk-qbd282aa.js} +2 -2
- package/dist/{chunk-e91fmg6t.js → chunk-qsa7nw6f.js} +2 -1
- package/dist/{chunk-e91fmg6t.js.map → chunk-qsa7nw6f.js.map} +3 -3
- package/dist/{chunk-rsrc7vtw.js → chunk-s8xxef60.js} +240 -46
- package/dist/chunk-s8xxef60.js.map +50 -0
- package/dist/{chunk-r9rtavg9.js → chunk-t19wjmnc.js} +7 -7
- package/dist/{chunk-vzkxqf8h.js → chunk-tapdssb5.js} +50 -6
- package/dist/chunk-tapdssb5.js.map +23 -0
- package/dist/{chunk-dhkc9b23.js → chunk-v8a1qjzp.js} +1 -1
- package/dist/{chunk-hvbvq7p4.js → chunk-vs2s3p8n.js} +731 -10
- package/dist/chunk-vs2s3p8n.js.map +20 -0
- package/dist/chunk-vtjzwymr.js.map +2 -2
- package/dist/{chunk-8t2ynwg0.js → chunk-wzcjhv54.js} +31 -1
- package/dist/{chunk-8t2ynwg0.js.map → chunk-wzcjhv54.js.map} +3 -3
- package/dist/{chunk-8tqnsx3q.js → chunk-xavet0qs.js} +5 -3
- package/dist/{chunk-8tqnsx3q.js.map → chunk-xavet0qs.js.map} +3 -3
- package/dist/{chunk-8bns0y68.js → chunk-xf76csps.js} +5 -5
- package/dist/{chunk-cwdzcv37.js → chunk-xrmbhap8.js} +2 -2
- package/dist/{chunk-cwdzcv37.js.map → chunk-xrmbhap8.js.map} +2 -2
- package/dist/{chunk-f6ahf5gf.js → chunk-xxfj0rr2.js} +20 -5
- package/dist/chunk-xxfj0rr2.js.map +13 -0
- package/dist/{chunk-3hzhcfsv.js → chunk-y8fwm3z2.js} +2 -2
- package/dist/{chunk-3hzhcfsv.js.map → chunk-y8fwm3z2.js.map} +3 -3
- package/dist/{chunk-smnt672s.js → chunk-ygvay56w.js} +20 -4
- package/dist/chunk-ygvay56w.js.map +10 -0
- package/dist/{chunk-evj5jxz3.js → chunk-ykchk644.js} +63 -15
- package/dist/{chunk-evj5jxz3.js.map → chunk-ykchk644.js.map} +7 -7
- package/dist/{chunk-vepea5c3.js → chunk-ym1bqd98.js} +6 -6
- package/dist/{chunk-yv8hv4wq.js → chunk-z4jqb44a.js} +3 -1
- package/dist/chunk-z4jqb44a.js.map +10 -0
- package/dist/connectors/connection-handles.d.ts +9 -0
- package/dist/connectors/connection-handles.d.ts.map +1 -0
- package/dist/connectors/connections/authorizations.d.ts +9 -0
- package/dist/connectors/connections/authorizations.d.ts.map +1 -1
- package/dist/connectors/connections/capability.d.ts +11 -0
- package/dist/connectors/connections/capability.d.ts.map +1 -1
- package/dist/connectors/connections/events.d.ts +17 -0
- package/dist/connectors/connections/events.d.ts.map +1 -0
- package/dist/connectors/connections/internal.d.ts +2 -1
- package/dist/connectors/connections/internal.d.ts.map +1 -1
- package/dist/connectors/connections/internal.js +8 -4
- package/dist/connectors/connections/internal.js.map +1 -1
- package/dist/connectors/connections/runs.d.ts +3 -0
- package/dist/connectors/connections/runs.d.ts.map +1 -1
- package/dist/connectors/connections/service.d.ts +13 -1
- package/dist/connectors/connections/service.d.ts.map +1 -1
- package/dist/connectors/execution.d.ts +14 -2
- 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 +5 -1
- package/dist/connectors/service.d.ts.map +1 -1
- package/dist/connectors/types.d.ts +22 -1
- package/dist/connectors/types.d.ts.map +1 -1
- package/dist/datasets/write.js +1 -1
- package/dist/deploy/index.d.ts +1 -1
- package/dist/deploy/index.d.ts.map +1 -1
- package/dist/deploy/internal.js +3 -2
- package/dist/deploy/internal.js.map +3 -3
- package/dist/deploy/services.d.ts.map +1 -1
- package/dist/deploy/types.d.ts +22 -2
- package/dist/deploy/types.d.ts.map +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 +8 -1
- package/dist/events/execution.d.ts.map +1 -1
- package/dist/events/index.d.ts +2 -2
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +3 -3
- package/dist/events/outbox-dispatcher.d.ts +7 -0
- package/dist/events/outbox-dispatcher.d.ts.map +1 -1
- package/dist/events/scope.d.ts +1 -0
- package/dist/events/scope.d.ts.map +1 -1
- package/dist/events/scope.js +1 -1
- package/dist/events/selectors/builder.d.ts +9 -1
- package/dist/events/selectors/builder.d.ts.map +1 -1
- package/dist/events/selectors/index.d.ts +2 -2
- package/dist/events/selectors/index.d.ts.map +1 -1
- package/dist/events/selectors/index.js +2 -2
- package/dist/events/selectors/predicate.d.ts.map +1 -1
- package/dist/events/selectors/types.d.ts +18 -3
- package/dist/events/selectors/types.d.ts.map +1 -1
- package/dist/events/types/artifacts.d.ts +7 -1
- package/dist/events/types/artifacts.d.ts.map +1 -1
- package/dist/events/types/connectors.d.ts +32 -0
- package/dist/events/types/connectors.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/syncs.d.ts +4 -0
- package/dist/events/types/syncs.d.ts.map +1 -1
- package/dist/execution/agent.js +43 -42
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/authorization.d.ts +5 -0
- package/dist/execution/authorization.d.ts.map +1 -1
- package/dist/execution/authorized-object-reader.d.ts +4 -0
- package/dist/execution/authorized-object-reader.d.ts.map +1 -1
- package/dist/execution/object-reader-ontology.d.ts +3 -0
- package/dist/execution/object-reader-ontology.d.ts.map +1 -1
- package/dist/execution/primitive.js +41 -40
- package/dist/execution/primitive.js.map +1 -1
- package/dist/execution/request.d.ts +1 -1
- package/dist/execution/request.d.ts.map +1 -1
- package/dist/execution/request.js +39 -38
- package/dist/execution/request.js.map +3 -3
- package/dist/execution/scopes.d.ts +8 -0
- package/dist/execution/scopes.d.ts.map +1 -1
- package/dist/execution/script.d.ts +7 -0
- package/dist/execution/script.d.ts.map +1 -0
- package/dist/execution/types.d.ts +16 -1
- package/dist/execution/types.d.ts.map +1 -1
- package/dist/http/api-routes.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/index.d.ts +13 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +74 -70
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/index.js +1 -1
- package/dist/lineage/executors.d.ts +1 -1
- package/dist/lineage/executors.d.ts.map +1 -1
- package/dist/maintenance/index.js +2 -2
- package/dist/materialization/event-envelopes.d.ts +3 -3
- package/dist/materialization/event-envelopes.d.ts.map +1 -1
- package/dist/materialization/events.d.ts +6 -0
- package/dist/materialization/events.d.ts.map +1 -1
- package/dist/materialization/index.js +1 -1
- package/dist/materialization/model.d.ts +6 -0
- package/dist/materialization/model.d.ts.map +1 -1
- package/dist/materializer/index.js +24 -23
- package/dist/materializer/index.js.map +1 -1
- package/dist/materializer/projections/replace.d.ts.map +1 -1
- package/dist/materializer/projections/replacement-plan.d.ts +2 -0
- package/dist/materializer/projections/replacement-plan.d.ts.map +1 -1
- package/dist/materializer/shared/normalize.d.ts +1 -0
- package/dist/materializer/shared/normalize.d.ts.map +1 -1
- package/dist/models/audio/runtime.d.ts.map +1 -1
- package/dist/models/audio/types.d.ts +19 -0
- package/dist/models/audio/types.d.ts.map +1 -1
- package/dist/models/execution/index.js +22 -21
- package/dist/models/execution/index.js.map +1 -1
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/objects/index.js +41 -40
- package/dist/objects/index.js.map +1 -1
- package/dist/objects/query/executor.d.ts +3 -1
- package/dist/objects/query/executor.d.ts.map +1 -1
- package/dist/objects/query/explain.d.ts +3 -1
- package/dist/objects/query/explain.d.ts.map +1 -1
- package/dist/objects/query/index.d.ts +1 -1
- package/dist/objects/query/index.d.ts.map +1 -1
- package/dist/objects/query/index.js +21 -20
- package/dist/objects/query/index.js.map +1 -1
- package/dist/objects/query/link-query-clearance.d.ts +3 -0
- package/dist/objects/query/link-query-clearance.d.ts.map +1 -1
- package/dist/objects/query/links.d.ts +1 -1
- package/dist/objects/query/links.d.ts.map +1 -1
- package/dist/objects/query/validate.d.ts +17 -0
- package/dist/objects/query/validate.d.ts.map +1 -1
- package/dist/objects/sdk/runtime-query-executor.d.ts +1 -1
- package/dist/objects/sdk/runtime-query-executor.d.ts.map +1 -1
- package/dist/ontology/index.js +3 -3
- package/dist/ontology/internal.js +3 -3
- package/dist/pipelines/index.js +27 -26
- package/dist/pipelines/index.js.map +1 -1
- package/dist/projections/builders.d.ts +7 -1
- package/dist/projections/builders.d.ts.map +1 -1
- package/dist/projections/index.d.ts +1 -1
- package/dist/projections/index.d.ts.map +1 -1
- package/dist/projections/internal.js +22 -21
- package/dist/projections/internal.js.map +1 -1
- package/dist/projections/types.d.ts +10 -0
- package/dist/projections/types.d.ts.map +1 -1
- package/dist/projections/validation.d.ts.map +1 -1
- package/dist/queues/in-memory.d.ts +3 -2
- 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 +40 -13
- package/dist/queues/types.d.ts.map +1 -1
- package/dist/runtime/host.d.ts +13 -0
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/internal.d.ts +1 -0
- package/dist/runtime/internal.d.ts.map +1 -1
- package/dist/runtime/internal.js +47 -25
- package/dist/runtime/internal.js.map +4 -3
- package/dist/runtime/locale.d.ts +0 -2
- package/dist/runtime/locale.d.ts.map +1 -1
- package/dist/runtime/resolve-definitions.d.ts +1 -1
- package/dist/runtime/resolve-definitions.d.ts.map +1 -1
- package/dist/runtime/script.d.ts +39 -0
- package/dist/runtime/script.d.ts.map +1 -0
- package/dist/runtime/sixb.d.ts +2 -2
- package/dist/runtime/sixb.d.ts.map +1 -1
- package/dist/sandboxes/auth.d.ts +26 -4
- package/dist/sandboxes/auth.d.ts.map +1 -1
- package/dist/sandboxes/index.d.ts +3 -1
- package/dist/sandboxes/index.d.ts.map +1 -1
- package/dist/sandboxes/index.js +5 -5
- package/dist/schedules/builders.d.ts.map +1 -1
- package/dist/schedules/index.js +3 -3
- package/dist/schedules/runtime.d.ts.map +1 -1
- package/dist/schedules/validation.d.ts +2 -0
- package/dist/schedules/validation.d.ts.map +1 -1
- package/dist/security/view-conditions.d.ts.map +1 -1
- package/dist/shares/internal.js +19 -18
- package/dist/shares/internal.js.map +2 -2
- package/dist/storage/agents/errors.d.ts +1 -1
- package/dist/storage/agents/errors.d.ts.map +1 -1
- package/dist/storage/agents/in-memory.d.ts +43 -1
- package/dist/storage/agents/in-memory.d.ts.map +1 -1
- package/dist/storage/agents/index.d.ts +2 -2
- package/dist/storage/agents/index.d.ts.map +1 -1
- package/dist/storage/agents/provider.d.ts +54 -11
- package/dist/storage/agents/provider.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +41 -5
- package/dist/storage/agents/provider.js.map +1 -1
- package/dist/storage/agents/types.d.ts +291 -3
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/ai-cost/analytics.d.ts +3 -2
- package/dist/storage/ai-cost/analytics.d.ts.map +1 -1
- package/dist/storage/ai-cost/provider.js +4 -3
- package/dist/storage/ai-cost/provider.js.map +1 -1
- package/dist/storage/ai-cost/types.d.ts +5 -1
- package/dist/storage/ai-cost/types.d.ts.map +1 -1
- package/dist/storage/artifacts/in-memory.d.ts +7 -1
- 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 +5 -2
- package/dist/storage/artifacts/record.d.ts.map +1 -1
- package/dist/storage/artifacts/types.d.ts +41 -0
- package/dist/storage/artifacts/types.d.ts.map +1 -1
- package/dist/storage/executions/provider.d.ts +3 -3
- package/dist/storage/executions/provider.d.ts.map +1 -1
- package/dist/storage/executions/provider.js +1 -1
- package/dist/storage/executions/types.d.ts +6 -0
- package/dist/storage/executions/types.d.ts.map +1 -1
- package/dist/storage/executions/validation.d.ts.map +1 -1
- package/dist/storage/file-upload-sessions/provider.js +7 -7
- package/dist/storage/index.d.ts +4 -4
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +30 -25
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.d.ts +1 -1
- package/dist/storage/internal.d.ts.map +1 -1
- package/dist/storage/internal.js +12 -10
- package/dist/storage/internal.js.map +2 -2
- package/dist/storage/ontology/in-memory/replacement-plans.d.ts +2 -0
- package/dist/storage/ontology/in-memory/replacement-plans.d.ts.map +1 -1
- package/dist/storage/ontology/provider.js +1 -1
- package/dist/storage/ontology/replacement-plans.d.ts +8 -0
- package/dist/storage/ontology/replacement-plans.d.ts.map +1 -1
- package/dist/storage/operation-scope.d.ts.map +1 -1
- package/dist/storage/operation-scope.js +1 -1
- package/dist/storage/sync-runs/idempotency.d.ts.map +1 -1
- package/dist/storage/sync-runs/in-memory.d.ts +2 -1
- 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/types.d.ts +27 -2
- package/dist/storage/sync-runs/types.d.ts.map +1 -1
- package/dist/storage/workflow-runs/provider.js +7 -7
- package/dist/syncs/accounts.d.ts +36 -0
- package/dist/syncs/accounts.d.ts.map +1 -0
- package/dist/syncs/builders.d.ts.map +1 -1
- package/dist/syncs/connections.d.ts +36 -0
- package/dist/syncs/connections.d.ts.map +1 -0
- package/dist/syncs/execution.d.ts +14 -4
- package/dist/syncs/execution.d.ts.map +1 -1
- package/dist/syncs/index.d.ts +2 -1
- package/dist/syncs/index.d.ts.map +1 -1
- package/dist/syncs/index.js +28 -27
- package/dist/syncs/index.js.map +1 -1
- package/dist/syncs/request.d.ts +16 -2
- package/dist/syncs/request.d.ts.map +1 -1
- package/dist/syncs/run-dispatch.d.ts +14 -2
- package/dist/syncs/run-dispatch.d.ts.map +1 -1
- package/dist/testing/agent-approval-storage-contract.d.ts.map +1 -1
- package/dist/testing/agent-execution.d.ts +3 -0
- package/dist/testing/agent-execution.d.ts.map +1 -1
- package/dist/testing/agent-inbox-storage-contract.d.ts +15 -0
- package/dist/testing/agent-inbox-storage-contract.d.ts.map +1 -0
- package/dist/testing/agent-storage-contract.d.ts.map +1 -1
- package/dist/testing/ai-cost-storage-contract.d.ts.map +1 -1
- package/dist/testing/artifact-storage-contract.d.ts.map +1 -1
- package/dist/testing/execution-storage-contract.d.ts.map +1 -1
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +6589 -4627
- package/dist/testing/index.js.map +13 -12
- package/dist/testing/materializer-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.map +1 -1
- package/dist/webhooks/connections.d.ts +3 -4
- package/dist/webhooks/connections.d.ts.map +1 -1
- package/dist/webhooks/index.d.ts +1 -1
- package/dist/webhooks/index.d.ts.map +1 -1
- package/dist/webhooks/internal.js +22 -54
- package/dist/webhooks/internal.js.map +3 -3
- package/dist/webhooks/types.d.ts +2 -11
- package/dist/webhooks/types.d.ts.map +1 -1
- package/dist/workers/index.js +66 -13
- package/dist/workers/index.js.map +4 -4
- package/dist/workers/queue-worker.d.ts +5 -0
- package/dist/workers/queue-worker.d.ts.map +1 -1
- package/dist/workers/queued-run-dispatch.d.ts.map +1 -1
- package/dist/workers/worker.d.ts +8 -0
- package/dist/workers/worker.d.ts.map +1 -1
- package/dist/workflows/index.js +50 -48
- package/dist/workflows/index.js.map +1 -1
- package/package.json +12 -1
- package/src/actions/validation.ts +3 -1
- package/src/agents/README.md +6 -2
- package/src/agents/children.ts +6 -0
- package/src/agents/errors.ts +3 -0
- package/src/agents/execution.ts +331 -43
- package/src/agents/ids.ts +5 -0
- package/src/agents/index.ts +22 -4
- package/src/agents/model-routing.ts +25 -9
- package/src/agents/queued-turn.ts +46 -0
- package/src/agents/request.ts +1444 -210
- package/src/agents/run-after-finish.ts +259 -2
- package/src/agents/run-artifacts.ts +3 -93
- package/src/agents/run-events.ts +256 -34
- package/src/agents/run-session-children.ts +13 -2
- package/src/agents/run-session-http.ts +9 -2
- package/src/agents/run-session-serve.ts +2 -8
- package/src/agents/run-session.ts +142 -3
- package/src/agents/run-turn.ts +148 -23
- package/src/agents/streams/index.ts +3 -0
- package/src/agents/streams/internal.ts +12 -0
- package/src/agents/streams/protocol.ts +109 -1
- package/src/agents/streams/steps.ts +131 -0
- package/src/agents/thread-access.ts +57 -2
- package/src/agents/turn-answered.ts +31 -0
- package/src/agents/validation.ts +2 -0
- package/src/artifacts/canvas-display.ts +4 -6
- package/src/artifacts/comments.ts +70 -17
- package/src/artifacts/document-fill.ts +103 -0
- package/src/artifacts/errors.ts +2 -0
- package/src/artifacts/events.ts +4 -1
- package/src/artifacts/execution.ts +265 -31
- package/src/artifacts/frames/assets.ts +42 -7
- package/src/artifacts/frames/document-data.ts +353 -0
- package/src/artifacts/frames/entries.ts +22 -16
- package/src/artifacts/frames/grants.ts +2 -2
- package/src/artifacts/frames/index.ts +3 -0
- package/src/artifacts/frames/kit.ts +102 -0
- package/src/artifacts/frames/protocol.ts +12 -1
- package/src/artifacts/frames/runtime.ts +413 -6
- package/src/artifacts/index.ts +3 -0
- package/src/artifacts/live/blocks.ts +889 -0
- package/src/artifacts/live/board.ts +195 -42
- package/src/artifacts/live/document.ts +170 -5
- package/src/artifacts/live/index.ts +7 -0
- package/src/artifacts/live/page.ts +807 -0
- package/src/artifacts/live/protocol.ts +5 -0
- package/src/artifacts/live/server.ts +2 -2
- package/src/artifacts/live/state.ts +9 -4
- package/src/artifacts/outline.ts +17 -0
- package/src/artifacts/paper.ts +173 -0
- package/src/artifacts/pdf-job.ts +11 -0
- package/src/artifacts/publish/fields.ts +177 -0
- package/src/artifacts/publish/index.ts +6 -1
- package/src/artifacts/publish/merge.ts +28 -15
- package/src/artifacts/publish/pdf.ts +82 -0
- package/src/artifacts/publish/previews.ts +24 -34
- package/src/artifacts/publish/publish.ts +26 -3
- package/src/artifacts/publish/queries.ts +20 -4
- package/src/artifacts/publish/query-answers.ts +14 -3
- package/src/artifacts/publish/validate/document-html.ts +245 -0
- package/src/artifacts/publish/validate/document.ts +34 -3
- package/src/artifacts/queries.ts +59 -13
- package/src/artifacts/run-query.ts +5 -2
- package/src/authorization/event-visibility.ts +13 -0
- package/src/calendar.ts +195 -0
- package/src/connectors/connection-handles.ts +71 -0
- package/src/connectors/connections/authorizations.ts +50 -2
- package/src/connectors/connections/capability.ts +40 -0
- package/src/connectors/connections/events.ts +57 -0
- package/src/connectors/connections/internal.ts +3 -0
- package/src/connectors/connections/runs.ts +5 -0
- package/src/connectors/connections/service.ts +93 -6
- package/src/connectors/execution.ts +35 -8
- package/src/connectors/index.ts +3 -0
- package/src/connectors/service.ts +23 -0
- package/src/connectors/types.ts +29 -1
- package/src/deploy/index.ts +1 -0
- package/src/deploy/services.ts +1 -0
- package/src/deploy/types.ts +30 -2
- package/src/events/definitions.ts +14 -0
- package/src/events/execution.ts +51 -4
- package/src/events/index.ts +8 -0
- package/src/events/outbox-dispatcher.ts +12 -2
- package/src/events/scope.ts +3 -0
- package/src/events/selectors/builder.ts +49 -0
- package/src/events/selectors/index.ts +5 -0
- package/src/events/selectors/predicate.ts +2 -0
- package/src/events/selectors/types.ts +30 -1
- package/src/events/types/artifacts.ts +7 -1
- package/src/events/types/connectors.ts +36 -0
- package/src/events/types/index.ts +7 -0
- package/src/events/types/syncs.ts +4 -0
- package/src/execution/authorization.ts +45 -0
- package/src/execution/authorized-object-reader.ts +33 -5
- package/src/execution/durable.ts +2 -0
- package/src/execution/object-reader-ontology.ts +6 -0
- package/src/execution/request.ts +1 -0
- package/src/execution/scopes.ts +24 -0
- package/src/execution/script.ts +27 -0
- package/src/execution/types.ts +7 -1
- package/src/http/api-routes.ts +33 -0
- package/src/index.ts +39 -4
- package/src/lineage/executors.ts +3 -1
- package/src/materialization/event-envelopes.ts +10 -5
- package/src/materialization/events.ts +2 -0
- package/src/materialization/model.ts +6 -0
- package/src/materializer/README.md +10 -0
- package/src/materializer/projections/replace.ts +42 -1
- package/src/materializer/projections/replacement-plan.ts +44 -4
- package/src/materializer/shared/normalize.ts +4 -0
- package/src/models/audio/runtime.ts +57 -14
- package/src/models/audio/types.ts +20 -0
- package/src/models/index.ts +1 -0
- package/src/objects/query/executor.ts +4 -0
- package/src/objects/query/explain.ts +5 -0
- package/src/objects/query/index.ts +1 -0
- package/src/objects/query/link-query-clearance.ts +4 -1
- package/src/objects/query/links.ts +5 -1
- package/src/objects/query/validate.ts +33 -1
- package/src/objects/sdk/runtime-query-executor.ts +7 -3
- package/src/projections/builders.ts +20 -0
- package/src/projections/index.ts +1 -0
- package/src/projections/registry.ts +1 -0
- package/src/projections/revision.ts +2 -0
- package/src/projections/types.ts +11 -0
- package/src/projections/validation.ts +6 -0
- package/src/queues/in-memory.ts +5 -0
- package/src/queues/index.ts +3 -1
- package/src/queues/types.ts +45 -14
- package/src/runtime/host.ts +125 -11
- package/src/runtime/internal.ts +1 -0
- package/src/runtime/locale.ts +0 -10
- package/src/runtime/resolve-definitions.ts +4 -1
- package/src/runtime/script.ts +62 -0
- package/src/runtime/sixb.ts +15 -5
- package/src/sandboxes/README.md +3 -1
- package/src/sandboxes/auth.ts +32 -4
- package/src/sandboxes/index.ts +15 -1
- package/src/schedules/builders.ts +4 -1
- package/src/schedules/runtime.ts +3 -0
- package/src/schedules/validation.ts +20 -2
- package/src/security/view-conditions.ts +2 -1
- package/src/storage/agents/errors.ts +1 -0
- package/src/storage/agents/in-memory.ts +500 -7
- package/src/storage/agents/index.ts +26 -0
- package/src/storage/agents/provider.ts +454 -15
- package/src/storage/agents/types.ts +315 -3
- package/src/storage/ai-cost/analytics.ts +22 -43
- package/src/storage/ai-cost/types.ts +5 -1
- package/src/storage/artifacts/in-memory.ts +52 -6
- package/src/storage/artifacts/index.ts +2 -0
- package/src/storage/artifacts/record.ts +33 -4
- package/src/storage/artifacts/types.ts +44 -0
- package/src/storage/executions/provider.ts +22 -2
- package/src/storage/executions/types.ts +2 -0
- package/src/storage/executions/validation.ts +27 -0
- package/src/storage/index.ts +29 -0
- package/src/storage/internal.ts +1 -0
- package/src/storage/ontology/in-memory/replacement-plans.ts +22 -0
- package/src/storage/ontology/replacement-plans.ts +6 -0
- package/src/storage/operation-scope.ts +2 -0
- package/src/storage/sync-runs/idempotency.ts +1 -0
- package/src/storage/sync-runs/in-memory.ts +43 -1
- package/src/storage/sync-runs/index.ts +1 -0
- package/src/storage/sync-runs/types.ts +30 -1
- package/src/syncs/accounts.ts +85 -0
- package/src/syncs/builders.ts +18 -1
- package/src/syncs/connections.ts +123 -0
- package/src/syncs/execution.ts +64 -22
- package/src/syncs/index.ts +3 -0
- package/src/syncs/request.ts +81 -23
- package/src/syncs/run-dispatch.ts +69 -7
- package/src/testing/agent-approval-storage-contract.ts +123 -0
- package/src/testing/agent-execution.ts +45 -2
- package/src/testing/agent-inbox-storage-contract.ts +874 -0
- package/src/testing/agent-storage-contract.ts +965 -103
- package/src/testing/ai-cost-storage-contract.ts +80 -0
- package/src/testing/artifact-storage-contract.ts +201 -4
- package/src/testing/execution-storage-contract.ts +31 -0
- package/src/testing/index.ts +5 -0
- package/src/testing/materializer-storage-contract.ts +139 -1
- package/src/testing/queues-contract.ts +22 -0
- package/src/testing/run-claim-storage-contract.ts +116 -0
- package/src/webhooks/connections.ts +9 -50
- package/src/webhooks/index.ts +0 -2
- package/src/webhooks/types.ts +2 -13
- package/src/workers/README.md +4 -1
- package/src/workers/lost-runs.ts +1 -0
- package/src/workers/queue-worker.ts +16 -5
- package/src/workers/queued-run-dispatch.ts +8 -1
- package/src/workers/worker.ts +67 -7
- package/dist/chunk-3z1vxzcm.js +0 -234
- package/dist/chunk-3z1vxzcm.js.map +0 -12
- package/dist/chunk-48c1z8nj.js.map +0 -10
- package/dist/chunk-58geavnf.js +0 -29
- package/dist/chunk-58geavnf.js.map +0 -10
- package/dist/chunk-5a4a52tq.js.map +0 -10
- package/dist/chunk-9nsjjd44.js.map +0 -12
- package/dist/chunk-b9qfh2ya.js.map +0 -11
- package/dist/chunk-eptrvnby.js.map +0 -12
- package/dist/chunk-f6ahf5gf.js.map +0 -13
- package/dist/chunk-gxwy4c3s.js.map +0 -47
- package/dist/chunk-hvbvq7p4.js.map +0 -18
- package/dist/chunk-m2jerfef.js +0 -474
- package/dist/chunk-m2jerfef.js.map +0 -11
- package/dist/chunk-msyevpp3.js.map +0 -22
- package/dist/chunk-n4zzaf6q.js.map +0 -10
- package/dist/chunk-rsrc7vtw.js.map +0 -49
- package/dist/chunk-rsxb14an.js.map +0 -18
- package/dist/chunk-smnt672s.js.map +0 -10
- package/dist/chunk-t0s7b3d1.js.map +0 -13
- package/dist/chunk-td26wjr5.js.map +0 -13
- package/dist/chunk-vzkxqf8h.js.map +0 -23
- package/dist/chunk-wa05txmk.js.map +0 -11
- package/dist/chunk-yv8hv4wq.js.map +0 -10
- package/dist/chunk-yy914zfr.js.map +0 -30
- package/dist/chunk-zeykm8my.js.map +0 -14
- /package/dist/{chunk-stmxh0hv.js.map → chunk-3neam1y5.js.map} +0 -0
- /package/dist/{chunk-p8pgnq8d.js.map → chunk-425ydk65.js.map} +0 -0
- /package/dist/{chunk-p351afzm.js.map → chunk-5sswe5ej.js.map} +0 -0
- /package/dist/{chunk-e0hnbb1m.js.map → chunk-61zptves.js.map} +0 -0
- /package/dist/{chunk-fe6r7yhg.js.map → chunk-92wrka15.js.map} +0 -0
- /package/dist/{chunk-q9nkpr8k.js.map → chunk-9tpmfh3n.js.map} +0 -0
- /package/dist/{chunk-sysnvjce.js.map → chunk-brhp9d97.js.map} +0 -0
- /package/dist/{chunk-8a8k38tz.js.map → chunk-brybqw5k.js.map} +0 -0
- /package/dist/{chunk-855w9nvw.js.map → chunk-cg7cygfj.js.map} +0 -0
- /package/dist/{chunk-r2psmn42.js.map → chunk-eg6xqef7.js.map} +0 -0
- /package/dist/{chunk-7kpqntgw.js.map → chunk-f05994as.js.map} +0 -0
- /package/dist/{chunk-2bn6813a.js.map → chunk-grt2j5vp.js.map} +0 -0
- /package/dist/{chunk-rtdrm592.js.map → chunk-htdzx40w.js.map} +0 -0
- /package/dist/{chunk-bc3y6gff.js.map → chunk-jka26v8c.js.map} +0 -0
- /package/dist/{chunk-6ef4esq4.js.map → chunk-pqj8vff9.js.map} +0 -0
- /package/dist/{chunk-n68vz95m.js.map → chunk-qbd282aa.js.map} +0 -0
- /package/dist/{chunk-r9rtavg9.js.map → chunk-t19wjmnc.js.map} +0 -0
- /package/dist/{chunk-dhkc9b23.js.map → chunk-v8a1qjzp.js.map} +0 -0
- /package/dist/{chunk-8bns0y68.js.map → chunk-xf76csps.js.map} +0 -0
- /package/dist/{chunk-vepea5c3.js.map → chunk-ym1bqd98.js.map} +0 -0
|
@@ -106,6 +106,7 @@ export class OntologyOutboxDispatcher {
|
|
|
106
106
|
private stopping: Promise<void> | null = null
|
|
107
107
|
private closing = false
|
|
108
108
|
private stopRequested = false
|
|
109
|
+
private relinquished = false
|
|
109
110
|
private readonly forcedStop = new AbortController()
|
|
110
111
|
|
|
111
112
|
constructor(options: OntologyOutboxDispatcherOptions) {
|
|
@@ -167,7 +168,7 @@ export class OntologyOutboxDispatcher {
|
|
|
167
168
|
* mutation.
|
|
168
169
|
*/
|
|
169
170
|
drain(): Promise<void> {
|
|
170
|
-
if (this.closing || this.stopRequested) return Promise.resolve()
|
|
171
|
+
if (this.closing || this.stopRequested || this.relinquished) return Promise.resolve()
|
|
171
172
|
if (!this.draining) return this.startDrainPass()
|
|
172
173
|
|
|
173
174
|
this.pendingDrain ??= settled(this.draining).then(() => {
|
|
@@ -179,10 +180,19 @@ export class OntologyOutboxDispatcher {
|
|
|
179
180
|
|
|
180
181
|
/** Starts a tracked, best-effort drain without extending mutation latency. */
|
|
181
182
|
notify(): void {
|
|
182
|
-
if (this.closing || this.stopRequested) return
|
|
183
|
+
if (this.closing || this.stopRequested || this.relinquished) return
|
|
183
184
|
void this.drain().catch((error) => this.reportError(error))
|
|
184
185
|
}
|
|
185
186
|
|
|
187
|
+
/**
|
|
188
|
+
* Never publish from this process again, not even the final drain on `stop()`: another process
|
|
189
|
+
* owns the broker's subscribers and publishes these rows. The claim is scoped by project only, so
|
|
190
|
+
* a drain here would also publish that process's rows into a broker nobody here listens to.
|
|
191
|
+
*/
|
|
192
|
+
relinquish(): void {
|
|
193
|
+
this.relinquished = true
|
|
194
|
+
}
|
|
195
|
+
|
|
186
196
|
stop(): Promise<void> {
|
|
187
197
|
this.stopping ??= this.stopOnce()
|
|
188
198
|
return this.stopping
|
package/src/events/scope.ts
CHANGED
|
@@ -20,6 +20,7 @@ export interface EventScopeKeys {
|
|
|
20
20
|
readonly datasetId?: string
|
|
21
21
|
readonly syncId?: string
|
|
22
22
|
readonly pipelineId?: string
|
|
23
|
+
readonly connectorId?: string
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export function scopeKeysForEvent(event: DomainEvent): EventScopeKeys {
|
|
@@ -54,6 +55,8 @@ export function scopeKeysForEvent(event: DomainEvent): EventScopeKeys {
|
|
|
54
55
|
return {}
|
|
55
56
|
case "artifacts":
|
|
56
57
|
return {}
|
|
58
|
+
case "connectors":
|
|
59
|
+
return { connectorId: event.payload.connectorId }
|
|
57
60
|
default: {
|
|
58
61
|
// Exhaustiveness guard: a new topic must extend the switch above.
|
|
59
62
|
const _exhaustive: never = event
|
|
@@ -2,6 +2,9 @@ import type { LinkToken, ObjectTypeWithTokens, Property, PropertyToken } from ".
|
|
|
2
2
|
import type { RuleDefinition } from "../../rules"
|
|
3
3
|
import type { DomainEvent } from "../types"
|
|
4
4
|
import type {
|
|
5
|
+
ConnectorEventSelectorContext,
|
|
6
|
+
ConnectorEventSelectorOperation,
|
|
7
|
+
ConnectorEventToken,
|
|
5
8
|
DatasetEventSelectorContext,
|
|
6
9
|
DatasetEventToken,
|
|
7
10
|
EventSelectorSpec,
|
|
@@ -107,6 +110,15 @@ export interface UserEventSelectorBuilder extends EventSelectorSpec<UserEventSel
|
|
|
107
110
|
profileUpdated(): EventSelectorSpec<UserEventSelectorContext<"profileUpdated">>
|
|
108
111
|
}
|
|
109
112
|
|
|
113
|
+
/** Connection events of one OAuth connector: people connecting, reconnecting and leaving. */
|
|
114
|
+
export interface ConnectorEventSelectorBuilder<TConnector extends ConnectorEventToken>
|
|
115
|
+
extends EventSelectorSpec<ConnectorEventSelectorContext<TConnector>> {
|
|
116
|
+
/** A connection became usable: connected, its slot's account replaced, or reconnected. */
|
|
117
|
+
connected(): EventSelectorSpec<ConnectorEventSelectorContext<TConnector, "connected">>
|
|
118
|
+
/** Sixb can no longer use a connection: disconnected, revoked, or its owner suspended. */
|
|
119
|
+
disconnected(): EventSelectorSpec<ConnectorEventSelectorContext<TConnector, "disconnected">>
|
|
120
|
+
}
|
|
121
|
+
|
|
110
122
|
abstract class EventSelectorSpecView<TContext> implements EventSelectorSpec<TContext> {
|
|
111
123
|
constructor(protected readonly spec: EventSelectorSpec<TContext>) {}
|
|
112
124
|
|
|
@@ -154,6 +166,10 @@ abstract class EventSelectorSpecView<TContext> implements EventSelectorSpec<TCon
|
|
|
154
166
|
return this.spec.pipelineId
|
|
155
167
|
}
|
|
156
168
|
|
|
169
|
+
get connectorId(): EventSelectorSpec["connectorId"] {
|
|
170
|
+
return this.spec.connectorId
|
|
171
|
+
}
|
|
172
|
+
|
|
157
173
|
get runStatus(): EventSelectorSpec["runStatus"] {
|
|
158
174
|
return this.spec.runStatus
|
|
159
175
|
}
|
|
@@ -405,6 +421,28 @@ class PipelineEventSelectorBuilderImpl<TPipeline extends PipelineEventToken>
|
|
|
405
421
|
}
|
|
406
422
|
}
|
|
407
423
|
|
|
424
|
+
class ConnectorEventSelectorBuilderImpl<TConnector extends ConnectorEventToken>
|
|
425
|
+
extends EventSelectorSpecView<ConnectorEventSelectorContext<TConnector>>
|
|
426
|
+
implements ConnectorEventSelectorBuilder<TConnector>
|
|
427
|
+
{
|
|
428
|
+
connected(): EventSelectorSpec<ConnectorEventSelectorContext<TConnector, "connected">> {
|
|
429
|
+
return this.withOperation("connected")
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
disconnected(): EventSelectorSpec<ConnectorEventSelectorContext<TConnector, "disconnected">> {
|
|
433
|
+
return this.withOperation("disconnected")
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
private withOperation<TOperation extends ConnectorEventSelectorOperation>(
|
|
437
|
+
operation: TOperation
|
|
438
|
+
): EventSelectorSpec<ConnectorEventSelectorContext<TConnector, TOperation>> {
|
|
439
|
+
return {
|
|
440
|
+
...this.spec,
|
|
441
|
+
types: [`connector.connection.${operation}`],
|
|
442
|
+
} as EventSelectorSpec<ConnectorEventSelectorContext<TConnector, TOperation>>
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
408
446
|
class UserEventSelectorBuilderImpl
|
|
409
447
|
extends EventSelectorSpecView<UserEventSelectorContext>
|
|
410
448
|
implements UserEventSelectorBuilder
|
|
@@ -451,6 +489,9 @@ export interface EventSelectors {
|
|
|
451
489
|
pipeline: TPipeline
|
|
452
490
|
): PipelineEventSelectorBuilder<TPipeline>
|
|
453
491
|
users(): UserEventSelectorBuilder
|
|
492
|
+
connector<TConnector extends ConnectorEventToken>(
|
|
493
|
+
connector: TConnector
|
|
494
|
+
): ConnectorEventSelectorBuilder<TConnector>
|
|
454
495
|
}
|
|
455
496
|
|
|
456
497
|
export const events: EventSelectors = {
|
|
@@ -490,6 +531,14 @@ export const events: EventSelectors = {
|
|
|
490
531
|
users(): UserEventSelectorBuilder {
|
|
491
532
|
return new UserEventSelectorBuilderImpl({ topic: "users" })
|
|
492
533
|
},
|
|
534
|
+
connector<TConnector extends ConnectorEventToken>(
|
|
535
|
+
connector: TConnector
|
|
536
|
+
): ConnectorEventSelectorBuilder<TConnector> {
|
|
537
|
+
return new ConnectorEventSelectorBuilderImpl({
|
|
538
|
+
topic: "connectors",
|
|
539
|
+
connectorId: connector.id,
|
|
540
|
+
} as EventSelectorSpec<ConnectorEventSelectorContext<TConnector>>)
|
|
541
|
+
},
|
|
493
542
|
}
|
|
494
543
|
|
|
495
544
|
function createPropertySelectorMap(
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type {
|
|
2
|
+
ConnectorEventSelectorBuilder,
|
|
2
3
|
DatasetEventSelectorBuilder,
|
|
3
4
|
EventPropertySelector,
|
|
4
5
|
EventSelectors,
|
|
@@ -12,6 +13,10 @@ export type {
|
|
|
12
13
|
export { events } from "./builder"
|
|
13
14
|
export { buildEventSelectorPredicate, eventSelectorSpec } from "./predicate"
|
|
14
15
|
export type {
|
|
16
|
+
ConnectorEventSelectorContext,
|
|
17
|
+
ConnectorEventSelectorEvent,
|
|
18
|
+
ConnectorEventSelectorOperation,
|
|
19
|
+
ConnectorEventToken,
|
|
15
20
|
DatasetEventSelectorContext,
|
|
16
21
|
DatasetEventSelectorEvent,
|
|
17
22
|
DatasetEventToken,
|
|
@@ -17,6 +17,7 @@ export function eventSelectorSpec(selector: EventSelectorSpec<unknown>): EventSe
|
|
|
17
17
|
...(selector.datasetId !== undefined ? { datasetId: selector.datasetId } : {}),
|
|
18
18
|
...(selector.syncId !== undefined ? { syncId: selector.syncId } : {}),
|
|
19
19
|
...(selector.pipelineId !== undefined ? { pipelineId: selector.pipelineId } : {}),
|
|
20
|
+
...(selector.connectorId !== undefined ? { connectorId: selector.connectorId } : {}),
|
|
20
21
|
...(selector.runStatus !== undefined ? { runStatus: selector.runStatus } : {}),
|
|
21
22
|
...(selector.runId !== undefined ? { runId: selector.runId } : {}),
|
|
22
23
|
}
|
|
@@ -42,6 +43,7 @@ export function buildEventSelectorPredicate(
|
|
|
42
43
|
if (filter.datasetId !== undefined && scope.datasetId !== filter.datasetId) return false
|
|
43
44
|
if (filter.syncId !== undefined && scope.syncId !== filter.syncId) return false
|
|
44
45
|
if (filter.pipelineId !== undefined && scope.pipelineId !== filter.pipelineId) return false
|
|
46
|
+
if (filter.connectorId !== undefined && scope.connectorId !== filter.connectorId) return false
|
|
45
47
|
if (filter.runStatus !== undefined && !matchesRunStatus(event, filter.runStatus)) return false
|
|
46
48
|
|
|
47
49
|
if (!matchesPropertyChange(event, filter)) return false
|
|
@@ -3,6 +3,7 @@ import type { InferPropertyValue } from "../../ontology/inference"
|
|
|
3
3
|
import type { RuleDefinition } from "../../rules"
|
|
4
4
|
import type { PropertyChangeOperation } from "../property-changes"
|
|
5
5
|
import type {
|
|
6
|
+
ConnectorEvent,
|
|
6
7
|
DatasetVersionCommittedEvent,
|
|
7
8
|
DomainEvent,
|
|
8
9
|
PipelineRunFinishedEvent,
|
|
@@ -54,6 +55,11 @@ export type PipelineEventToken<TId extends string = string> = {
|
|
|
54
55
|
readonly id: TId
|
|
55
56
|
}
|
|
56
57
|
|
|
58
|
+
export type ConnectorEventToken<TId extends string = string> = {
|
|
59
|
+
readonly kind: "connector"
|
|
60
|
+
readonly id: TId
|
|
61
|
+
}
|
|
62
|
+
|
|
57
63
|
export type DatasetEventSelectorContext<TDataset extends DatasetEventToken = DatasetEventToken> = {
|
|
58
64
|
readonly kind: "dataset"
|
|
59
65
|
readonly dataset: TDataset
|
|
@@ -93,6 +99,17 @@ export type UserEventSelectorContext<
|
|
|
93
99
|
readonly operation: TOperation
|
|
94
100
|
}
|
|
95
101
|
|
|
102
|
+
export type ConnectorEventSelectorOperation = "connected" | "disconnected"
|
|
103
|
+
|
|
104
|
+
export type ConnectorEventSelectorContext<
|
|
105
|
+
TConnector extends ConnectorEventToken = ConnectorEventToken,
|
|
106
|
+
TOperation extends ConnectorEventSelectorOperation = ConnectorEventSelectorOperation,
|
|
107
|
+
> = {
|
|
108
|
+
readonly kind: "connector"
|
|
109
|
+
readonly connector: TConnector
|
|
110
|
+
readonly operation: TOperation
|
|
111
|
+
}
|
|
112
|
+
|
|
96
113
|
export type EventSelectorContext =
|
|
97
114
|
| ObjectEventSelectorContext
|
|
98
115
|
| LinkEventSelectorContext
|
|
@@ -101,6 +118,7 @@ export type EventSelectorContext =
|
|
|
101
118
|
| SyncEventSelectorContext
|
|
102
119
|
| PipelineEventSelectorContext
|
|
103
120
|
| UserEventSelectorContext
|
|
121
|
+
| ConnectorEventSelectorContext
|
|
104
122
|
|
|
105
123
|
export type InferEventSelectorContext<TSelector> = TSelector extends {
|
|
106
124
|
readonly [eventSelectorContextType]?: infer TContext
|
|
@@ -127,7 +145,12 @@ export type EventSelectorEvent<TContext> =
|
|
|
127
145
|
? PipelineEventSelectorEvent<TPipeline, TOperation>
|
|
128
146
|
: TContext extends UserEventSelectorContext<infer TOperation>
|
|
129
147
|
? UserEventSelectorEvent<TOperation>
|
|
130
|
-
:
|
|
148
|
+
: TContext extends ConnectorEventSelectorContext<
|
|
149
|
+
infer _TConnector,
|
|
150
|
+
infer TOperation
|
|
151
|
+
>
|
|
152
|
+
? ConnectorEventSelectorEvent<TOperation>
|
|
153
|
+
: never
|
|
131
154
|
|
|
132
155
|
export interface ObjectEventSelectorEvent<TObjectType extends ObjectTypeWithTokens> {
|
|
133
156
|
readonly object: {
|
|
@@ -191,6 +214,11 @@ export type UserEventSelectorEvent<
|
|
|
191
214
|
TOperation extends UserEventSelectorOperation = UserEventSelectorOperation,
|
|
192
215
|
> = Extract<UserEvent, { type: UserEventTypeOf[TOperation] }>["payload"]
|
|
193
216
|
|
|
217
|
+
/** The payload of the connection event an operation selects. */
|
|
218
|
+
export type ConnectorEventSelectorEvent<
|
|
219
|
+
TOperation extends ConnectorEventSelectorOperation = ConnectorEventSelectorOperation,
|
|
220
|
+
> = Extract<ConnectorEvent, { type: `connector.connection.${TOperation}` }>["payload"]
|
|
221
|
+
|
|
194
222
|
export interface EventSelectorSpec<TContext = EventSelectorContext> {
|
|
195
223
|
readonly [eventSelectorContextType]?: TContext
|
|
196
224
|
readonly topic?: DomainEvent["topic"]
|
|
@@ -204,6 +232,7 @@ export interface EventSelectorSpec<TContext = EventSelectorContext> {
|
|
|
204
232
|
readonly datasetId?: string
|
|
205
233
|
readonly syncId?: string
|
|
206
234
|
readonly pipelineId?: string
|
|
235
|
+
readonly connectorId?: string
|
|
207
236
|
readonly runStatus?: RunEventSelectorOperation
|
|
208
237
|
readonly runId?: string
|
|
209
238
|
}
|
|
@@ -22,7 +22,8 @@ export interface ArtifactUpdatedEvent extends EventEnvelope {
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* A comment on an artifact was added, resolved, opened again, or deleted. Whoever reads the
|
|
25
|
-
* artifact receives it, and reads the comments again
|
|
25
|
+
* artifact receives it, and reads the comments again; a shared link's guest, only for a thread
|
|
26
|
+
* started by a guest of the same link.
|
|
26
27
|
*/
|
|
27
28
|
export interface ArtifactCommentedEvent extends EventEnvelope {
|
|
28
29
|
type: "artifact.commented"
|
|
@@ -33,6 +34,11 @@ export interface ArtifactCommentedEvent extends EventEnvelope {
|
|
|
33
34
|
commentId: string
|
|
34
35
|
/** The comment it replies to, for a reply. */
|
|
35
36
|
parentId?: string
|
|
37
|
+
/**
|
|
38
|
+
* For a thread a guest started, the shared link they came through, by its grant: its guests
|
|
39
|
+
* receive the event too. Without it, the thread is the team's, and no guest receives it.
|
|
40
|
+
*/
|
|
41
|
+
shareGrantId?: string
|
|
36
42
|
action: "created" | "resolved" | "reopened" | "deleted"
|
|
37
43
|
}
|
|
38
44
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ConnectorConnectionMetadata } from "../../connectors/types"
|
|
2
|
+
import type { EventEnvelope } from "../envelope"
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A connection became usable: someone selected an account for it, replaced the account in its
|
|
6
|
+
* slot, or reconnected it after Sixb could no longer use it.
|
|
7
|
+
*/
|
|
8
|
+
export interface ConnectorConnectionConnectedEvent extends EventEnvelope {
|
|
9
|
+
type: "connector.connection.connected"
|
|
10
|
+
topic: "connectors"
|
|
11
|
+
partitionKey: string
|
|
12
|
+
payload: {
|
|
13
|
+
connectorId: string
|
|
14
|
+
connection: ConnectorConnectionMetadata
|
|
15
|
+
reason: "connected" | "replaced" | "reconnected"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Sixb can no longer use a connection: it was disconnected, its grant was revoked, or the member
|
|
21
|
+
* who owns it was suspended. A revoked connection's record stays; its grant does not.
|
|
22
|
+
*/
|
|
23
|
+
export interface ConnectorConnectionDisconnectedEvent extends EventEnvelope {
|
|
24
|
+
type: "connector.connection.disconnected"
|
|
25
|
+
topic: "connectors"
|
|
26
|
+
partitionKey: string
|
|
27
|
+
payload: {
|
|
28
|
+
connectorId: string
|
|
29
|
+
connection: ConnectorConnectionMetadata
|
|
30
|
+
reason: "disconnected" | "revoked" | "suspended"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type ConnectorEvent =
|
|
35
|
+
| ConnectorConnectionConnectedEvent
|
|
36
|
+
| ConnectorConnectionDisconnectedEvent
|
|
@@ -2,6 +2,7 @@ import type { JsonValue } from "../../json"
|
|
|
2
2
|
import type { OntologyMaterializationEvent } from "../../materialization/events"
|
|
3
3
|
import type { EventOrigin } from "../envelope"
|
|
4
4
|
import type { ArtifactEvent } from "./artifacts"
|
|
5
|
+
import type { ConnectorEvent } from "./connectors"
|
|
5
6
|
import type { DatasetEvent } from "./datasets"
|
|
6
7
|
import type { LinkEvent } from "./links"
|
|
7
8
|
import type { ObjectEvent } from "./objects"
|
|
@@ -30,6 +31,11 @@ export type {
|
|
|
30
31
|
PropertyChangeOperation,
|
|
31
32
|
} from "../property-changes"
|
|
32
33
|
export type { ArtifactCommentedEvent, ArtifactEvent, ArtifactUpdatedEvent } from "./artifacts"
|
|
34
|
+
export type {
|
|
35
|
+
ConnectorConnectionConnectedEvent,
|
|
36
|
+
ConnectorConnectionDisconnectedEvent,
|
|
37
|
+
ConnectorEvent,
|
|
38
|
+
} from "./connectors"
|
|
33
39
|
export type { DatasetEvent, DatasetVersionCommittedEvent } from "./datasets"
|
|
34
40
|
export type {
|
|
35
41
|
LinkCreatedEvent,
|
|
@@ -94,6 +100,7 @@ export type DomainEvent =
|
|
|
94
100
|
| DatasetEvent
|
|
95
101
|
| UserEvent
|
|
96
102
|
| ArtifactEvent
|
|
103
|
+
| ConnectorEvent
|
|
97
104
|
|
|
98
105
|
export type OntologyDomainEvent = ObjectEvent | LinkEvent | TelemetryEvent
|
|
99
106
|
export type AuthorableDomainEvent = Exclude<DomainEvent, OntologyDomainEvent>
|
|
@@ -9,6 +9,8 @@ export interface SyncRunStartedEvent extends EventEnvelope {
|
|
|
9
9
|
payload: {
|
|
10
10
|
syncId: string
|
|
11
11
|
runId: string
|
|
12
|
+
/** The connection the run reads, on a sync of an OAuth connector. */
|
|
13
|
+
connectionId?: string
|
|
12
14
|
startedAt: string
|
|
13
15
|
}
|
|
14
16
|
}
|
|
@@ -20,6 +22,8 @@ export interface SyncRunFinishedEvent extends EventEnvelope {
|
|
|
20
22
|
payload: {
|
|
21
23
|
syncId: string
|
|
22
24
|
runId: string
|
|
25
|
+
/** The connection the run reads, on a sync of an OAuth connector. */
|
|
26
|
+
connectionId?: string
|
|
23
27
|
status: "succeeded" | "failed" | "cancelled"
|
|
24
28
|
datasetId?: string
|
|
25
29
|
versionId?: string
|
|
@@ -21,6 +21,7 @@ import type {
|
|
|
21
21
|
SelectedObjectReadScope,
|
|
22
22
|
} from "../storage/objects/types"
|
|
23
23
|
import { kernelOperationFromId, kernelOperationId } from "./kernel-operation"
|
|
24
|
+
import { assertScriptPath } from "./script"
|
|
24
25
|
import {
|
|
25
26
|
type AuthorizablePrincipal,
|
|
26
27
|
type AuthorizationRef,
|
|
@@ -225,6 +226,23 @@ export function createKernelRuntimeAuthorization(input: {
|
|
|
225
226
|
})
|
|
226
227
|
}
|
|
227
228
|
|
|
229
|
+
/**
|
|
230
|
+
* Register unrestricted authority for one script run. Whoever runs a script loads the project with
|
|
231
|
+
* its storage credentials, so this grants nothing that process does not already hold.
|
|
232
|
+
*/
|
|
233
|
+
export function createScriptRuntimeAuthorization(
|
|
234
|
+
execution: ExecutionContext
|
|
235
|
+
): RuntimeAuthorization {
|
|
236
|
+
if (execution.executor.type !== "script") {
|
|
237
|
+
throw new Error("[Sixb] Script runtime authorization requires a script execution.")
|
|
238
|
+
}
|
|
239
|
+
return register(execution, {
|
|
240
|
+
type: "unrestricted",
|
|
241
|
+
projectId: execution.projectId,
|
|
242
|
+
ref: Object.freeze({ type: "script", runId: execution.executor.runId }),
|
|
243
|
+
})
|
|
244
|
+
}
|
|
245
|
+
|
|
228
246
|
export function resolveRuntimeAuthorization(authorization: unknown): ResolvedRuntimeAuthorization {
|
|
229
247
|
if (!isRuntimeAuthorizationCapability(authorization)) {
|
|
230
248
|
return { type: "denied" }
|
|
@@ -365,6 +383,10 @@ function assertResolvedAuthorizationMatchesExecution(
|
|
|
365
383
|
resolved: RegisteredRuntimeAuthorization,
|
|
366
384
|
execution: ExecutionContext
|
|
367
385
|
): void {
|
|
386
|
+
if (execution.source.type === "script" && execution.executor.type !== "script") {
|
|
387
|
+
throw invalidExecutionAuthority(execution.id, "only a script execution has a script source")
|
|
388
|
+
}
|
|
389
|
+
|
|
368
390
|
switch (execution.executor.type) {
|
|
369
391
|
case "request":
|
|
370
392
|
if (
|
|
@@ -459,6 +481,21 @@ function assertResolvedAuthorizationMatchesExecution(
|
|
|
459
481
|
)
|
|
460
482
|
}
|
|
461
483
|
return
|
|
484
|
+
|
|
485
|
+
case "script":
|
|
486
|
+
if (
|
|
487
|
+
resolved.type !== "unrestricted" ||
|
|
488
|
+
resolved.ref.type !== "script" ||
|
|
489
|
+
resolved.ref.runId !== execution.executor.runId ||
|
|
490
|
+
execution.requestedBy !== undefined ||
|
|
491
|
+
execution.source.type !== "script"
|
|
492
|
+
) {
|
|
493
|
+
throw invalidExecutionAuthority(
|
|
494
|
+
execution.id,
|
|
495
|
+
"script authority does not match its executor"
|
|
496
|
+
)
|
|
497
|
+
}
|
|
498
|
+
return
|
|
462
499
|
}
|
|
463
500
|
}
|
|
464
501
|
|
|
@@ -546,6 +583,9 @@ function snapshotExecutionExecutor(
|
|
|
546
583
|
type: "kernel",
|
|
547
584
|
operation: snapshotKernelOperation(executor.operation),
|
|
548
585
|
})
|
|
586
|
+
case "script":
|
|
587
|
+
assertNonEmpty(executor.runId, "Execution script run id")
|
|
588
|
+
return Object.freeze({ type: "script", runId: executor.runId })
|
|
549
589
|
}
|
|
550
590
|
throw new Error(
|
|
551
591
|
`[Sixb] Unknown execution executor type '${String((executor as { type?: unknown }).type)}'.`
|
|
@@ -578,6 +618,9 @@ function snapshotExecutionSource(source: ExecutionContext["source"]): ExecutionC
|
|
|
578
618
|
case "execution":
|
|
579
619
|
assertNonEmpty(source.executionId, "Execution source execution id")
|
|
580
620
|
return Object.freeze({ type: "execution", executionId: source.executionId })
|
|
621
|
+
case "script":
|
|
622
|
+
assertScriptPath(source.path)
|
|
623
|
+
return Object.freeze({ type: "script", path: source.path })
|
|
581
624
|
}
|
|
582
625
|
throw new Error(
|
|
583
626
|
`[Sixb] Unknown execution source type '${String((source as { type?: unknown }).type)}'.`
|
|
@@ -879,6 +922,8 @@ function cloneAuthorizationRef(ref: AuthorizationRef): AuthorizationRef {
|
|
|
879
922
|
return { type: "delegated", delegation: { ...ref.delegation } }
|
|
880
923
|
case "kernel":
|
|
881
924
|
return { type: "kernel", operation: { ...ref.operation } }
|
|
925
|
+
case "script":
|
|
926
|
+
return { type: "script", runId: ref.runId }
|
|
882
927
|
case "disabled":
|
|
883
928
|
return { type: "disabled" }
|
|
884
929
|
}
|
|
@@ -37,6 +37,7 @@ import { userExpansionPlan } from "../objects/query/user-expansions"
|
|
|
37
37
|
import {
|
|
38
38
|
type AdmittedObjectQuery,
|
|
39
39
|
composeObjectQueryAdmissions,
|
|
40
|
+
type ObjectQueryDiscovery,
|
|
40
41
|
type ObjectQuerySemanticAdmission,
|
|
41
42
|
validateObjectQuery,
|
|
42
43
|
validateObjectQueryWithAdmission,
|
|
@@ -195,6 +196,10 @@ class AuthorizedObjectReaderImpl {
|
|
|
195
196
|
return reader.#ontology.view()
|
|
196
197
|
}
|
|
197
198
|
|
|
199
|
+
static queryDiscovery(reader: AuthorizedObjectReaderImpl): ObjectQueryDiscovery {
|
|
200
|
+
return reader.#ontology.discovery
|
|
201
|
+
}
|
|
202
|
+
|
|
198
203
|
/** Project identity carried by this nominal reader capability. */
|
|
199
204
|
get projectId(): string {
|
|
200
205
|
return this.#security.runtime.projectId
|
|
@@ -445,11 +450,15 @@ class AuthorizedObjectReaderImpl {
|
|
|
445
450
|
if (admission) {
|
|
446
451
|
const preflight = preflightObjectQueryLinks(
|
|
447
452
|
{ query, ...request, projectId: this.#security.runtime.projectId },
|
|
448
|
-
{ ontology: this.#ontology.registry }
|
|
453
|
+
{ ontology: this.#ontology.registry, discovery: this.#ontology.discovery }
|
|
449
454
|
)
|
|
450
455
|
const admitted = validateObjectQueryWithAdmission(
|
|
451
456
|
preflight.validated.query,
|
|
452
|
-
{
|
|
457
|
+
{
|
|
458
|
+
ontology: this.#ontology.registry,
|
|
459
|
+
discovery: this.#ontology.discovery,
|
|
460
|
+
normalize: false,
|
|
461
|
+
},
|
|
453
462
|
admission
|
|
454
463
|
)
|
|
455
464
|
admission.assertIncidentEdgeSelected({
|
|
@@ -465,6 +474,7 @@ class AuthorizedObjectReaderImpl {
|
|
|
465
474
|
if (clearance) {
|
|
466
475
|
assertLinkQueryReadable({
|
|
467
476
|
ontology: this.#ontology.registry,
|
|
477
|
+
discovery: this.#ontology.discovery,
|
|
468
478
|
clearance,
|
|
469
479
|
query,
|
|
470
480
|
request: { ...request, projectId: this.#security.runtime.projectId },
|
|
@@ -537,13 +547,20 @@ class AuthorizedObjectReaderImpl {
|
|
|
537
547
|
if (admission) {
|
|
538
548
|
// Terminal arguments are ordinary validation errors, not an authorization oracle. Validate
|
|
539
549
|
// them against the canonical result shape before raising any delegated-scope denial.
|
|
540
|
-
const validated = validateObjectQuery(query, {
|
|
550
|
+
const validated = validateObjectQuery(query, {
|
|
551
|
+
ontology: this.#ontology.registry,
|
|
552
|
+
discovery: this.#ontology.discovery,
|
|
553
|
+
})
|
|
541
554
|
const normalizedFacets = validateObjectFacetRequests(facets, validated.result.objectTypeIds, {
|
|
542
555
|
ontology: this.#ontology.registry,
|
|
543
556
|
})
|
|
544
557
|
const admitted = validateObjectQueryWithAdmission(
|
|
545
558
|
validated.query,
|
|
546
|
-
{
|
|
559
|
+
{
|
|
560
|
+
ontology: this.#ontology.registry,
|
|
561
|
+
discovery: this.#ontology.discovery,
|
|
562
|
+
normalize: false,
|
|
563
|
+
},
|
|
547
564
|
admission
|
|
548
565
|
)
|
|
549
566
|
normalizedFacets.forEach((facet, index) => {
|
|
@@ -657,6 +674,7 @@ class AuthorizedObjectReaderImpl {
|
|
|
657
674
|
// forgeable bypass flag; neither is needed at this nominal boundary.
|
|
658
675
|
return {
|
|
659
676
|
ontology: this.#ontology.registry,
|
|
677
|
+
discovery: this.#ontology.discovery,
|
|
660
678
|
storage: this.#storage,
|
|
661
679
|
embeddingModels: this.#models.embedding,
|
|
662
680
|
rerankingModels: this.#models.reranking,
|
|
@@ -666,6 +684,7 @@ class AuthorizedObjectReaderImpl {
|
|
|
666
684
|
}
|
|
667
685
|
return {
|
|
668
686
|
ontology: this.#ontology.registry,
|
|
687
|
+
discovery: this.#ontology.discovery,
|
|
669
688
|
embeddingModels: this.#models.embedding,
|
|
670
689
|
rerankingModels: this.#models.reranking,
|
|
671
690
|
storage: this.#storage,
|
|
@@ -775,7 +794,11 @@ class AuthorizedObjectReaderImpl {
|
|
|
775
794
|
#admitDelegatedQuery(query: ObjectQuery): AdmittedObjectQuery | undefined {
|
|
776
795
|
const admission = this.#security.delegation?.queryAdmission
|
|
777
796
|
if (!admission) return undefined
|
|
778
|
-
return validateObjectQueryWithAdmission(
|
|
797
|
+
return validateObjectQueryWithAdmission(
|
|
798
|
+
query,
|
|
799
|
+
{ ontology: this.#ontology.registry, discovery: this.#ontology.discovery },
|
|
800
|
+
admission
|
|
801
|
+
)
|
|
779
802
|
}
|
|
780
803
|
|
|
781
804
|
#resolveListObjectTypes(
|
|
@@ -868,6 +891,11 @@ export function getAuthorizedOntologyView(reader: AuthorizedObjectReader): Autho
|
|
|
868
891
|
return AuthorizedObjectReaderImpl.ontologyView(reader)
|
|
869
892
|
}
|
|
870
893
|
|
|
894
|
+
/** The reader's view as query validation reads it, built only when an issue reads it. */
|
|
895
|
+
export function getQueryDiscovery(reader: AuthorizedObjectReader): ObjectQueryDiscovery {
|
|
896
|
+
return AuthorizedObjectReaderImpl.queryDiscovery(reader)
|
|
897
|
+
}
|
|
898
|
+
|
|
871
899
|
/**
|
|
872
900
|
* What a reader resolved for this authority cannot read now. Events redact with it: an event of an
|
|
873
901
|
* object type the reader cannot read is not delivered, and the others are redacted like rows.
|
package/src/execution/durable.ts
CHANGED
|
@@ -168,6 +168,8 @@ function durableExecutor(execution: ExecutionContext): CreateExecutionInput["exe
|
|
|
168
168
|
return { type: "agent", runId: execution.executor.runId }
|
|
169
169
|
case "kernel":
|
|
170
170
|
return { type: "kernel", operation: structuredClone(execution.executor.operation) }
|
|
171
|
+
case "script":
|
|
172
|
+
return { type: "script", runId: execution.executor.runId }
|
|
171
173
|
}
|
|
172
174
|
}
|
|
173
175
|
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
type AuthorizedOntologyView,
|
|
4
4
|
createAuthorizedOntologyView,
|
|
5
5
|
} from "../objects/authorized-ontology-view"
|
|
6
|
+
import type { ObjectQueryDiscovery } from "../objects/query/validate"
|
|
6
7
|
import type { OntologyRegistry } from "../ontology"
|
|
7
8
|
import { assertObjectReadOutputWithinLimit } from "../storage"
|
|
8
9
|
import type { ObjectReaderSecurity } from "./object-reader-security"
|
|
@@ -10,11 +11,16 @@ import type { ObjectReaderSecurity } from "./object-reader-security"
|
|
|
10
11
|
/** The ontology a reader resolves against, and the part of it its authority may describe. */
|
|
11
12
|
export class ObjectReaderOntology {
|
|
12
13
|
readonly registry: OntologyRegistry
|
|
14
|
+
/** The view as query validation reads it, building the view only when an issue reads it. */
|
|
15
|
+
readonly discovery: ObjectQueryDiscovery
|
|
13
16
|
readonly #security: ObjectReaderSecurity
|
|
14
17
|
#view?: AuthorizedOntologyView
|
|
15
18
|
|
|
16
19
|
constructor(registry: OntologyRegistry, security: ObjectReaderSecurity) {
|
|
17
20
|
this.registry = registry
|
|
21
|
+
this.discovery = {
|
|
22
|
+
getObjectTypeById: (objectTypeId) => this.view().getObjectTypeById(objectTypeId),
|
|
23
|
+
}
|
|
18
24
|
this.#security = security
|
|
19
25
|
Object.freeze(this)
|
|
20
26
|
}
|
package/src/execution/request.ts
CHANGED
package/src/execution/scopes.ts
CHANGED
|
@@ -6,8 +6,10 @@ import {
|
|
|
6
6
|
createDisabledRuntimeAuthorization,
|
|
7
7
|
createKernelRuntimeAuthorization,
|
|
8
8
|
createPrincipalRuntimeAuthorization,
|
|
9
|
+
createScriptRuntimeAuthorization,
|
|
9
10
|
type DelegatedActionApplyTarget,
|
|
10
11
|
} from "./authorization"
|
|
12
|
+
import { assertScriptPath } from "./script"
|
|
11
13
|
import type {
|
|
12
14
|
AuthorizablePrincipal,
|
|
13
15
|
AuthorizationRef,
|
|
@@ -121,6 +123,26 @@ function assertNestedProvenance(source: ExecutionSource, correlationId: string |
|
|
|
121
123
|
}
|
|
122
124
|
}
|
|
123
125
|
|
|
126
|
+
/**
|
|
127
|
+
* The scope of one `sixb run`: unrestricted, requested by nobody, and recorded under the script's
|
|
128
|
+
* project-relative path. Only the CLI creates one; there is no public way to.
|
|
129
|
+
*/
|
|
130
|
+
export function createScriptScope(input: {
|
|
131
|
+
readonly projectId: string
|
|
132
|
+
readonly path: string
|
|
133
|
+
}): ExecutionScope {
|
|
134
|
+
assertNonEmpty(input.projectId, "Execution project id")
|
|
135
|
+
assertScriptPath(input.path)
|
|
136
|
+
const execution = freezeExecution({
|
|
137
|
+
id: `exec_${randomUUID()}`,
|
|
138
|
+
projectId: input.projectId,
|
|
139
|
+
executor: Object.freeze({ type: "script", runId: `script_${randomUUID()}` }),
|
|
140
|
+
source: Object.freeze({ type: "script", path: input.path }),
|
|
141
|
+
correlationId: `corr_${randomUUID()}`,
|
|
142
|
+
})
|
|
143
|
+
return Object.freeze({ execution, authorization: createScriptRuntimeAuthorization(execution) })
|
|
144
|
+
}
|
|
145
|
+
|
|
124
146
|
export function createTestingScope(input: {
|
|
125
147
|
readonly projectId: string
|
|
126
148
|
readonly context?: AuthorizationContext
|
|
@@ -206,6 +228,8 @@ function sourceIdentifier(source: ExecutionSource): {
|
|
|
206
228
|
return { label: "Execution source dataset version id", value: source.versionId }
|
|
207
229
|
case "execution":
|
|
208
230
|
return { label: "Execution source execution id", value: source.executionId }
|
|
231
|
+
case "script":
|
|
232
|
+
return { label: "Execution source script path", value: source.path }
|
|
209
233
|
}
|
|
210
234
|
}
|
|
211
235
|
|