@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
package/src/runtime/host.ts
CHANGED
|
@@ -23,8 +23,13 @@ import {
|
|
|
23
23
|
} from "../auth"
|
|
24
24
|
import type { BlobStorage } from "../blob-storage"
|
|
25
25
|
import type { Broker } from "../broker"
|
|
26
|
-
import {
|
|
26
|
+
import { canonicalTimeZone } from "../calendar"
|
|
27
|
+
import {
|
|
28
|
+
registerConnectorConnectionCallbackProcess,
|
|
29
|
+
registerSandboxConnectionTokenAccess,
|
|
30
|
+
} from "../connectors/connections/capability"
|
|
27
31
|
import { createConnectorCredentialProtectorFromKey } from "../connectors/credentials"
|
|
32
|
+
import { assertPersonalConnectionRequester } from "../connectors/execution"
|
|
28
33
|
import { ConnectorService } from "../connectors/service"
|
|
29
34
|
import {
|
|
30
35
|
type ConnectorConnectionOptions,
|
|
@@ -38,6 +43,7 @@ import {
|
|
|
38
43
|
} from "../datasets/ingest-flush"
|
|
39
44
|
import type { DatasetDefinition } from "../datasets/types"
|
|
40
45
|
import { attachSixbErrorReporter, shareSixbErrorReporter } from "../error-reporting/capability"
|
|
46
|
+
import type { ErrorReporter } from "../error-reporting/reporter"
|
|
41
47
|
import {
|
|
42
48
|
reportEventDeliveryFailure,
|
|
43
49
|
reportMaintenancePassFailure,
|
|
@@ -47,6 +53,7 @@ import {
|
|
|
47
53
|
createDomainEventService,
|
|
48
54
|
type DomainEventLog,
|
|
49
55
|
type DomainEventService,
|
|
56
|
+
type EventsAppendInput,
|
|
50
57
|
OntologyOutboxDispatcher,
|
|
51
58
|
} from "../events"
|
|
52
59
|
import {
|
|
@@ -118,17 +125,13 @@ import type { ParamsConfig } from "../shared/params/types"
|
|
|
118
125
|
import type { ShareDefinition } from "../shares"
|
|
119
126
|
import type { Storage } from "../storage"
|
|
120
127
|
import type { SyncDefinition } from "../syncs"
|
|
128
|
+
import { createSyncConnections, registerSyncConnections } from "../syncs/connections"
|
|
121
129
|
import type { RegisteredWebhook } from "../webhooks"
|
|
122
130
|
import { WebhookRegistry, WebhookValidationError } from "../webhooks"
|
|
123
131
|
import type { WorkflowDefinition } from "../workflows"
|
|
124
132
|
import type { SixbDefinitions } from "./definitions"
|
|
125
133
|
import { RuntimeError } from "./errors"
|
|
126
|
-
import {
|
|
127
|
-
canonicalLocale,
|
|
128
|
-
canonicalTimeZone,
|
|
129
|
-
DEFAULT_PROJECT_LOCALE,
|
|
130
|
-
DEFAULT_PROJECT_TIME_ZONE,
|
|
131
|
-
} from "./locale"
|
|
134
|
+
import { canonicalLocale, DEFAULT_PROJECT_LOCALE, DEFAULT_PROJECT_TIME_ZONE } from "./locale"
|
|
132
135
|
import {
|
|
133
136
|
createOntologyMutationRuntime,
|
|
134
137
|
registerOntologyMutationRuntime,
|
|
@@ -225,10 +228,15 @@ export class SixbHost<in out TParams extends ParamsConfig = ParamsConfig> {
|
|
|
225
228
|
readonly sandboxes?: Pick<SandboxFactory, "create" | "resume">
|
|
226
229
|
readonly projectRoot: string
|
|
227
230
|
private readonly cron: MaintenancePass
|
|
231
|
+
private readonly errorReporter: ErrorReporter
|
|
232
|
+
/** What every execution in this process runs on once it has bound a script; see `withScope`. */
|
|
233
|
+
private scriptProcess: { readonly context: SixbHostContext; readonly enqueues: boolean } | null =
|
|
234
|
+
null
|
|
228
235
|
readonly auth: AuthRuntime
|
|
229
236
|
|
|
230
237
|
constructor(options: SixbHostOptions<TParams>) {
|
|
231
238
|
const errorReporter = attachSixbErrorReporter(this, options.onError)
|
|
239
|
+
this.errorReporter = errorReporter
|
|
232
240
|
this.projectId = options.id ?? "default"
|
|
233
241
|
this.locale = resolveProjectLocale(options.locale)
|
|
234
242
|
this.timeZone = resolveProjectTimeZone(options.timeZone)
|
|
@@ -306,13 +314,19 @@ export class SixbHost<in out TParams extends ParamsConfig = ParamsConfig> {
|
|
|
306
314
|
this.connectorService = new ConnectorService(this.projectId, connectors, {
|
|
307
315
|
storage: this.storage,
|
|
308
316
|
credentialProtector,
|
|
317
|
+
events: this.eventService,
|
|
309
318
|
})
|
|
310
319
|
if (this.connectorService.connectionProcess) {
|
|
311
320
|
registerConnectorConnectionCallbackProcess(
|
|
312
321
|
this,
|
|
313
322
|
this.connectorService.connectionProcess.callbackProcess
|
|
314
323
|
)
|
|
324
|
+
registerSyncConnections(this, createSyncConnections(this.connectorService))
|
|
315
325
|
}
|
|
326
|
+
registerSandboxConnectionTokenAccess(this, ({ connector, selector, requestedBy }) => {
|
|
327
|
+
assertPersonalConnectionRequester(connector, requestedBy, selector)
|
|
328
|
+
return this.connectorService.createConnectionTokenSource(connector, selector)
|
|
329
|
+
})
|
|
316
330
|
assertWebhookRunStorage(connectors, this.storage)
|
|
317
331
|
this.webhookRegistry = new WebhookRegistry({ connectors })
|
|
318
332
|
|
|
@@ -421,8 +435,12 @@ export class SixbHost<in out TParams extends ParamsConfig = ParamsConfig> {
|
|
|
421
435
|
throw new Error("[Sixb] Kernel authority cannot be bound to the domain SDK.")
|
|
422
436
|
}
|
|
423
437
|
|
|
438
|
+
if (capturedScope.execution.executor.type === "script") this.enterScriptProcess()
|
|
439
|
+
const hostContext = this.scriptProcess?.context ?? this.hostContext
|
|
440
|
+
const enqueues = this.scriptProcess?.enqueues ?? true
|
|
441
|
+
|
|
424
442
|
const modelExecution = new ModelExecutionSession(
|
|
425
|
-
{ ...
|
|
443
|
+
{ ...hostContext, runtimeAuthorization: capturedScope.authorization },
|
|
426
444
|
capturedScope.execution
|
|
427
445
|
)
|
|
428
446
|
const embeddingModels = bindEmbeddingModels(this.hostContext.embeddingModels, modelExecution)
|
|
@@ -438,7 +456,7 @@ export class SixbHost<in out TParams extends ParamsConfig = ParamsConfig> {
|
|
|
438
456
|
})
|
|
439
457
|
|
|
440
458
|
const runtime: SixbRuntimeContext = {
|
|
441
|
-
...
|
|
459
|
+
...hostContext,
|
|
442
460
|
embeddingModels,
|
|
443
461
|
rerankingModels,
|
|
444
462
|
modelExecution,
|
|
@@ -452,7 +470,8 @@ export class SixbHost<in out TParams extends ParamsConfig = ParamsConfig> {
|
|
|
452
470
|
materializer: this.materializer.withScope(capturedScope),
|
|
453
471
|
notifyCommittedFacts: () => {
|
|
454
472
|
this.committedFacts.notify()
|
|
455
|
-
|
|
473
|
+
// Pending indexing waits for the instance's maintenance pass to dispatch it.
|
|
474
|
+
if (enqueues) this.vectorIndexing?.notify()
|
|
456
475
|
},
|
|
457
476
|
// A projection this process applies is visible to its next read.
|
|
458
477
|
onProjectionApplied: () => this.appliedMarkings.invalidate(),
|
|
@@ -465,6 +484,32 @@ export class SixbHost<in out TParams extends ParamsConfig = ParamsConfig> {
|
|
|
465
484
|
)
|
|
466
485
|
}
|
|
467
486
|
|
|
487
|
+
/**
|
|
488
|
+
* A script runs in a process of its own, beside the project's running instance, and everything
|
|
489
|
+
* this process runs from now on, such as an action the script applies, is the script's doing.
|
|
490
|
+
*
|
|
491
|
+
* With a process-scoped broker, the instance holds the subscribers: ontology changes stay in the
|
|
492
|
+
* outbox for it to publish, and appending any other event is refused rather than delivered to
|
|
493
|
+
* nobody. With process-scoped queues, nothing here would ever claim a job, so enqueueing is
|
|
494
|
+
* refused.
|
|
495
|
+
*/
|
|
496
|
+
private enterScriptProcess(): void {
|
|
497
|
+
if (this.scriptProcess) return
|
|
498
|
+
const publishes = this.broker.scope !== "process"
|
|
499
|
+
const enqueues = this.queues.scope !== "process"
|
|
500
|
+
if (!publishes) this.committedFacts.relinquish()
|
|
501
|
+
this.scriptProcess = {
|
|
502
|
+
enqueues,
|
|
503
|
+
context: {
|
|
504
|
+
...this.hostContext,
|
|
505
|
+
...(publishes
|
|
506
|
+
? {}
|
|
507
|
+
: { events: refuseScriptEvents(this.eventService, this.projectId, this.errorReporter) }),
|
|
508
|
+
...(enqueues ? {} : { queues: refuseScriptEnqueues(this.queues) }),
|
|
509
|
+
},
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
468
513
|
get id(): string {
|
|
469
514
|
return this.projectId
|
|
470
515
|
}
|
|
@@ -574,7 +619,7 @@ export class SixbHost<in out TParams extends ParamsConfig = ParamsConfig> {
|
|
|
574
619
|
definition: this.sandboxDefinition,
|
|
575
620
|
supportsPersistence: typeof this.sandboxes?.resume === "function",
|
|
576
621
|
},
|
|
577
|
-
|
|
622
|
+
rendersInSandboxes: this.sandboxes !== undefined,
|
|
578
623
|
logging: this.logging,
|
|
579
624
|
activity: this.activity,
|
|
580
625
|
connectorService: this.connectorService,
|
|
@@ -671,3 +716,72 @@ function assertSandboxCredentials<TParams extends ParamsConfig>(
|
|
|
671
716
|
})
|
|
672
717
|
if (issue) throw new SandboxError(`[Sixb] ${issue}`)
|
|
673
718
|
}
|
|
719
|
+
|
|
720
|
+
const QUEUE_LANES = [
|
|
721
|
+
"vectorIndexing",
|
|
722
|
+
"lake",
|
|
723
|
+
"syncRuns",
|
|
724
|
+
"pipelines",
|
|
725
|
+
"projections",
|
|
726
|
+
"workflows",
|
|
727
|
+
"agents",
|
|
728
|
+
] as const satisfies readonly Exclude<keyof Queues, "scope" | "health" | "close">[]
|
|
729
|
+
|
|
730
|
+
/** The event log with appends refused, for a script whose broker nobody else here listens to. */
|
|
731
|
+
function refuseScriptEvents(
|
|
732
|
+
events: DomainEventService,
|
|
733
|
+
projectId: string,
|
|
734
|
+
errorReporter: ErrorReporter
|
|
735
|
+
): DomainEventService {
|
|
736
|
+
const refusal = () =>
|
|
737
|
+
new Error(
|
|
738
|
+
"[Sixb] A script cannot append events on this project's broker: it only works inside one " +
|
|
739
|
+
"process. Append them from the app or the API, or configure a shared broker."
|
|
740
|
+
)
|
|
741
|
+
return delegate(events, (property) => {
|
|
742
|
+
if (property === "append") {
|
|
743
|
+
return async (): Promise<never> => {
|
|
744
|
+
throw refusal()
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
if (property === "emit") {
|
|
748
|
+
// `emit` never rejects: the work behind it already succeeded, so the loss is reported.
|
|
749
|
+
return async (input: EventsAppendInput): Promise<void> => {
|
|
750
|
+
reportEventDeliveryFailure(errorReporter, refusal(), {
|
|
751
|
+
projectId,
|
|
752
|
+
eventTypes: input.events.map((event) => event.type),
|
|
753
|
+
})
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
return undefined
|
|
757
|
+
})
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
/** The project's queues with every `enqueue` refused, for a script that cannot reach their workers. */
|
|
761
|
+
function refuseScriptEnqueues(queues: Queues): Queues {
|
|
762
|
+
const refused = async (): Promise<never> => {
|
|
763
|
+
throw new Error(
|
|
764
|
+
"[Sixb] A script cannot start work on this project's queues: they only work inside one " +
|
|
765
|
+
"process. Start it from the app or the API, or configure shared queues."
|
|
766
|
+
)
|
|
767
|
+
}
|
|
768
|
+
const lanes = new Map<PropertyKey, unknown>(
|
|
769
|
+
QUEUE_LANES.map((lane) => [
|
|
770
|
+
lane,
|
|
771
|
+
delegate(queues[lane], (property) => (property === "enqueue" ? refused : undefined)),
|
|
772
|
+
])
|
|
773
|
+
)
|
|
774
|
+
return delegate(queues, (property) => lanes.get(property))
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
/** `target`, with the members `override` returns replaced and every other method bound to it. */
|
|
778
|
+
function delegate<T extends object>(target: T, override: (property: PropertyKey) => unknown): T {
|
|
779
|
+
return new Proxy(target, {
|
|
780
|
+
get(object, property) {
|
|
781
|
+
const replaced = override(property)
|
|
782
|
+
if (replaced !== undefined) return replaced
|
|
783
|
+
const value: unknown = Reflect.get(object, property, object)
|
|
784
|
+
return typeof value === "function" ? value.bind(object) : value
|
|
785
|
+
},
|
|
786
|
+
})
|
|
787
|
+
}
|
package/src/runtime/internal.ts
CHANGED
package/src/runtime/locale.ts
CHANGED
|
@@ -14,13 +14,3 @@ export function canonicalLocale(value: unknown): string | undefined {
|
|
|
14
14
|
return undefined
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
/** The canonical IANA name of a time zone (`europe/paris` → `Europe/Paris`), or `undefined`. */
|
|
19
|
-
export function canonicalTimeZone(value: unknown): string | undefined {
|
|
20
|
-
if (typeof value !== "string" || value.trim() !== value || value === "") return undefined
|
|
21
|
-
try {
|
|
22
|
-
return new Intl.DateTimeFormat("en-US", { timeZone: value }).resolvedOptions().timeZone
|
|
23
|
-
} catch {
|
|
24
|
-
return undefined
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -7,7 +7,7 @@ import { createAgentSkillCatalog } from "../agents/skills"
|
|
|
7
7
|
import { assertMaxSteps } from "../agents/step-limits"
|
|
8
8
|
import { createAgentToolCatalog } from "../agents/tool-catalog"
|
|
9
9
|
import { assertNoProviderWebTools, resolveAgentWebOptions } from "../agents/web"
|
|
10
|
-
import type
|
|
10
|
+
import { type ConnectorDefinition, isOAuthConnectorDefinition } from "../connectors"
|
|
11
11
|
import { isDatasetPick } from "../datasets/builders"
|
|
12
12
|
import { columnsByName } from "../datasets/column-index"
|
|
13
13
|
import type { DatasetDefinition } from "../datasets/types"
|
|
@@ -163,6 +163,9 @@ export function resolveDefinitions(options: DefinitionOptions): ResolvedDefiniti
|
|
|
163
163
|
registeredDatasetIds: new Set(datasetsById.keys()),
|
|
164
164
|
registeredSyncIds: new Set(syncsById.keys()),
|
|
165
165
|
registeredPipelineIds: new Set(pipelinesById.keys()),
|
|
166
|
+
registeredOAuthConnectorIds: new Set(
|
|
167
|
+
[...connectorsById.values()].filter(isOAuthConnectorDefinition).map(({ id }) => id)
|
|
168
|
+
),
|
|
166
169
|
})
|
|
167
170
|
for (const sync of syncs) {
|
|
168
171
|
validateScheduleReferences("Sync", sync.id, sync.triggers, schedulesById)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { createScriptScope } from "../execution/scopes"
|
|
2
|
+
import type { SixbHostView } from "./host"
|
|
3
|
+
import type { Sixb } from "./sixb"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* What `sixb run` passes a script's default export.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import type { ScriptContext } from "@sixb/core"
|
|
10
|
+
*
|
|
11
|
+
* export default async function ({ sixb, args, signal }: ScriptContext) {
|
|
12
|
+
* // ...
|
|
13
|
+
* }
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export interface ScriptContext {
|
|
17
|
+
/** The project's SDK, with full access. Its writes are attributed to this script. */
|
|
18
|
+
readonly sixb: Sixb
|
|
19
|
+
/** Everything after the script's path on the command line, untouched. */
|
|
20
|
+
readonly args: readonly string[]
|
|
21
|
+
/**
|
|
22
|
+
* Aborts on Ctrl-C or SIGTERM, so the script can stop between steps; a second one exits at once.
|
|
23
|
+
* A closed SSH connection exits at once.
|
|
24
|
+
*/
|
|
25
|
+
readonly signal: AbortSignal
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Binds a new script execution, recorded under `path` (the script's path relative to the project),
|
|
30
|
+
* and returns what calls the script's default export with it. Call it as soon as the host loads:
|
|
31
|
+
* from then on this process leaves the outbox and queues to the project's instance, which matters
|
|
32
|
+
* even when the script never runs, since closing the broker would otherwise publish that
|
|
33
|
+
* instance's events here.
|
|
34
|
+
*/
|
|
35
|
+
export function bindScript(
|
|
36
|
+
host: SixbHostView,
|
|
37
|
+
path: string
|
|
38
|
+
): {
|
|
39
|
+
run(input: {
|
|
40
|
+
readonly main: unknown
|
|
41
|
+
readonly args: readonly string[]
|
|
42
|
+
readonly signal: AbortSignal
|
|
43
|
+
}): Promise<void>
|
|
44
|
+
} {
|
|
45
|
+
const sixb = host.withScope(createScriptScope({ projectId: host.id, path })) as Sixb
|
|
46
|
+
return {
|
|
47
|
+
async run({ main, args, signal }) {
|
|
48
|
+
if (typeof main !== "function") {
|
|
49
|
+
throw new Error(
|
|
50
|
+
`[Sixb] ${path} must export a function as its default export: ` +
|
|
51
|
+
"`export default async function ({ sixb, args, signal }: ScriptContext) { ... }`."
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
const context: ScriptContext = Object.freeze({
|
|
55
|
+
sixb,
|
|
56
|
+
args: Object.freeze([...args]),
|
|
57
|
+
signal,
|
|
58
|
+
})
|
|
59
|
+
await main(context)
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
}
|
package/src/runtime/sixb.ts
CHANGED
|
@@ -38,6 +38,7 @@ import type { SandboxDefinition } from "../sandboxes/configuration"
|
|
|
38
38
|
import { createSchedulesRuntime, type SchedulesRuntime } from "../schedules/execution"
|
|
39
39
|
import type { DatasetVersionMarkings } from "../security/dataset-version-markings"
|
|
40
40
|
import { createSharesRuntime, type SharesRuntime } from "../shares/execution"
|
|
41
|
+
import { createSyncConnections, visibleSyncConnectionIds } from "../syncs/connections"
|
|
41
42
|
import { createSyncsRuntime, type SyncsRuntime } from "../syncs/execution"
|
|
42
43
|
import { createUsersRuntime, type MemberStatusRuntime, type UsersRuntime } from "../users"
|
|
43
44
|
import { createWorkflowsRuntime, type WorkflowsRuntime } from "../workflows/execution"
|
|
@@ -77,8 +78,8 @@ export interface SixbDependencies {
|
|
|
77
78
|
readonly definition: SandboxDefinition
|
|
78
79
|
readonly supportsPersistence: boolean
|
|
79
80
|
}
|
|
80
|
-
/** The project has sandboxes, where
|
|
81
|
-
readonly
|
|
81
|
+
/** The project has sandboxes, where canvas boards are pictured and documents print to PDF. */
|
|
82
|
+
readonly rendersInSandboxes: boolean
|
|
82
83
|
readonly definitions: SixbDefinitions
|
|
83
84
|
readonly logging: LoggingService
|
|
84
85
|
readonly activity: ActivityService
|
|
@@ -135,6 +136,7 @@ function createExecutionFacades<TParams extends Record<string, unknown>>(
|
|
|
135
136
|
dependencies: SixbDependencies
|
|
136
137
|
): Omit<Sixb<TParams>, "execution"> {
|
|
137
138
|
const actions = createActionsRuntime(runtime, execution)
|
|
139
|
+
const syncConnections = createSyncConnections(dependencies.connectorService)
|
|
138
140
|
const workflows = createWorkflowsRuntime(runtime, execution, dependencies.definitions.workflows)
|
|
139
141
|
// One session per execution: the facade's model calls and the Agent's decisions share its
|
|
140
142
|
// accounting, AI limits and cancellation.
|
|
@@ -170,13 +172,13 @@ function createExecutionFacades<TParams extends Record<string, unknown>>(
|
|
|
170
172
|
dependencies.datasetIngest
|
|
171
173
|
),
|
|
172
174
|
workflows,
|
|
173
|
-
syncs: createSyncsRuntime(runtime, execution, dependencies.definitions.syncs),
|
|
175
|
+
syncs: createSyncsRuntime(runtime, execution, dependencies.definitions.syncs, syncConnections),
|
|
174
176
|
pipelines: createPipelinesRuntime(runtime, execution, dependencies.definitions.pipelines),
|
|
175
177
|
projections: createProjectionsRuntime(runtime, dependencies.definitions.projections),
|
|
176
178
|
rules: createRulesRuntime(runtime, dependencies.definitions.rules),
|
|
177
179
|
agent,
|
|
178
180
|
artifacts: createArtifactsRuntime(runtime, dependencies.blobStorage, {
|
|
179
|
-
|
|
181
|
+
rendersInSandboxes: dependencies.rendersInSandboxes,
|
|
180
182
|
}),
|
|
181
183
|
models: createModelsRuntime(
|
|
182
184
|
runtime,
|
|
@@ -191,7 +193,15 @@ function createExecutionFacades<TParams extends Record<string, unknown>>(
|
|
|
191
193
|
dependencies.blobStorage
|
|
192
194
|
),
|
|
193
195
|
aiUsage: createAiUsageRuntime(runtime, dependencies.definitions.security),
|
|
194
|
-
events: createEventsRuntime(runtime
|
|
196
|
+
events: createEventsRuntime(runtime, {
|
|
197
|
+
visibleSyncConnectionIds: (syncIds) =>
|
|
198
|
+
visibleSyncConnectionIds(
|
|
199
|
+
runtime,
|
|
200
|
+
execution,
|
|
201
|
+
syncIds.map((syncId) => dependencies.definitions.syncs.getById(syncId)),
|
|
202
|
+
syncConnections
|
|
203
|
+
),
|
|
204
|
+
}),
|
|
195
205
|
logs: createLogsRuntime(runtime, dependencies.logging),
|
|
196
206
|
activity: createActivityRuntime(runtime, dependencies.activity),
|
|
197
207
|
schedules: createSchedulesRuntime(runtime, dependencies.definitions.schedules),
|
package/src/sandboxes/README.md
CHANGED
|
@@ -49,7 +49,9 @@ Vercel requests can outlive their worker: storage fencing cannot cancel provider
|
|
|
49
49
|
Uncertain sandboxes stay blocked; explicit recreation uses a new name without deleting old state.
|
|
50
50
|
Saved files remain subject to provider retention.
|
|
51
51
|
|
|
52
|
-
Source `auth` stays host-side
|
|
52
|
+
Source `auth` stays host-side and receives the run's `requestedBy` principal and a host-only
|
|
53
|
+
`connectionToken` resolver for OAuth connector connections, enforcing the same personal-connection
|
|
54
|
+
ownership and member-suspension rules as `sixb.connector()`. Providers advertising `supportsRequestCredentials`, as every
|
|
53
55
|
agent's provider must, apply execution-prepared credentials; direct create/resume never invoke `auth` implicitly. They apply
|
|
54
56
|
initial credentials before setup and expose session-scoped renewal, for ephemeral and named
|
|
55
57
|
sandboxes alike. Unsupported providers reject credentials before provisioning. During initial
|
package/src/sandboxes/auth.ts
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
|
+
import type { ConnectorAccessToken, ConnectorConnectionSelector } from "../connectors/types"
|
|
2
|
+
import type { AuthorizablePrincipal } from "../execution/types"
|
|
1
3
|
import type { SandboxSource } from "./configuration"
|
|
2
4
|
import type { SandboxRequestCredential } from "./sandbox"
|
|
3
5
|
|
|
6
|
+
/** Registered OAuth connector accepted by host-side sandbox source authentication. */
|
|
7
|
+
export interface SandboxOAuthConnector {
|
|
8
|
+
readonly kind: "connector"
|
|
9
|
+
readonly id: string
|
|
10
|
+
readonly adapter: {
|
|
11
|
+
readonly authentication: {
|
|
12
|
+
readonly type: "oauth2"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Resolve a live token from an OAuth connector connection on the host. */
|
|
18
|
+
export type SandboxConnectionTokenResolver = (
|
|
19
|
+
connector: SandboxOAuthConnector,
|
|
20
|
+
selector: ConnectorConnectionSelector
|
|
21
|
+
) => Promise<ConnectorAccessToken>
|
|
22
|
+
|
|
23
|
+
export interface SandboxSourceAuthInput {
|
|
24
|
+
readonly source: SandboxSource
|
|
25
|
+
readonly signal: AbortSignal
|
|
26
|
+
/** Who requested the run, when a person or service account started it. */
|
|
27
|
+
readonly requestedBy?: AuthorizablePrincipal
|
|
28
|
+
/**
|
|
29
|
+
* Resolve a live access token from an OAuth connector connection on the host.
|
|
30
|
+
* Enforces the same requester and member-status rules as `sixb.connector()`.
|
|
31
|
+
*/
|
|
32
|
+
readonly connectionToken?: SandboxConnectionTokenResolver
|
|
33
|
+
}
|
|
34
|
+
|
|
4
35
|
/** Per-run source access. Never persist these grants or expose them to the guest. */
|
|
5
36
|
export interface SandboxSourceCredentials {
|
|
6
37
|
/**
|
|
@@ -26,8 +57,5 @@ export interface SandboxSourceCredentials {
|
|
|
26
57
|
/** Integration-owned authentication; grant source.access (read by default), or reject. */
|
|
27
58
|
export interface SandboxSourceAuth {
|
|
28
59
|
/** A thrown error is reported to onError: it and its causes must never contain a credential. */
|
|
29
|
-
authorize(input:
|
|
30
|
-
readonly source: SandboxSource
|
|
31
|
-
readonly signal: AbortSignal
|
|
32
|
-
}): Promise<SandboxSourceCredentials>
|
|
60
|
+
authorize(input: SandboxSourceAuthInput): Promise<SandboxSourceCredentials>
|
|
33
61
|
}
|
package/src/sandboxes/index.ts
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
|
+
export type {
|
|
2
|
+
ConnectorAccessToken,
|
|
3
|
+
ConnectorConnectionOwner,
|
|
4
|
+
ConnectorConnectionSelector,
|
|
5
|
+
ProjectConnectorConnectionOwner,
|
|
6
|
+
UserConnectorConnectionOwner,
|
|
7
|
+
} from "../connectors/types"
|
|
8
|
+
export type { AuthorizablePrincipal } from "../execution/types"
|
|
1
9
|
export type { InferParams, ParamsConfig } from "../shared/params/types"
|
|
2
|
-
export type {
|
|
10
|
+
export type {
|
|
11
|
+
SandboxConnectionTokenResolver,
|
|
12
|
+
SandboxOAuthConnector,
|
|
13
|
+
SandboxSourceAuth,
|
|
14
|
+
SandboxSourceAuthInput,
|
|
15
|
+
SandboxSourceCredentials,
|
|
16
|
+
} from "./auth"
|
|
3
17
|
export { sandboxConfig } from "./config"
|
|
4
18
|
export type {
|
|
5
19
|
SandboxConfig,
|
|
@@ -180,9 +180,12 @@ function assertEventSource(source: EventSelectorSpec): void {
|
|
|
180
180
|
return
|
|
181
181
|
case "users":
|
|
182
182
|
return
|
|
183
|
+
case "connectors":
|
|
184
|
+
assertNonEmpty(source.connectorId ?? "", "event source connectorId")
|
|
185
|
+
return
|
|
183
186
|
default:
|
|
184
187
|
throw new ScheduleValidationError(
|
|
185
|
-
"Schedule event source must select object, link, rule, dataset, sync, pipeline, or
|
|
188
|
+
"Schedule event source must select object, link, rule, dataset, sync, pipeline, member, or connection events."
|
|
186
189
|
)
|
|
187
190
|
}
|
|
188
191
|
}
|
package/src/schedules/runtime.ts
CHANGED
|
@@ -112,6 +112,9 @@ export function buildEventScheduleContext(event: DomainEvent): RuntimeEventSched
|
|
|
112
112
|
case "user.invited":
|
|
113
113
|
case "user.profile.updated":
|
|
114
114
|
return { ...event.payload }
|
|
115
|
+
case "connector.connection.connected":
|
|
116
|
+
case "connector.connection.disconnected":
|
|
117
|
+
return { ...event.payload }
|
|
115
118
|
default:
|
|
116
119
|
return null
|
|
117
120
|
}
|
|
@@ -18,6 +18,10 @@ const userEventTypes = new Set([
|
|
|
18
18
|
"user.invited",
|
|
19
19
|
"user.profile.updated",
|
|
20
20
|
])
|
|
21
|
+
const connectorEventTypes = new Set([
|
|
22
|
+
"connector.connection.connected",
|
|
23
|
+
"connector.connection.disconnected",
|
|
24
|
+
])
|
|
21
25
|
const runStatuses = new Set(["succeeded", "failed", "cancelled"])
|
|
22
26
|
const linkIdentityFields = new Set(["target.objectTypeId", "target.primaryId"])
|
|
23
27
|
|
|
@@ -26,6 +30,8 @@ export interface ValidateSchedulesAtStartupOptions {
|
|
|
26
30
|
readonly registeredDatasetIds?: ReadonlySet<string>
|
|
27
31
|
readonly registeredSyncIds?: ReadonlySet<string>
|
|
28
32
|
readonly registeredPipelineIds?: ReadonlySet<string>
|
|
33
|
+
/** OAuth connectors only: a static connector has no connections, so no connection events. */
|
|
34
|
+
readonly registeredOAuthConnectorIds?: ReadonlySet<string>
|
|
29
35
|
}
|
|
30
36
|
|
|
31
37
|
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
@@ -156,9 +162,12 @@ function assertEventSourceShape(
|
|
|
156
162
|
return
|
|
157
163
|
case "users":
|
|
158
164
|
return
|
|
165
|
+
case "connectors":
|
|
166
|
+
assertNonEmptyString(value.connectorId, `${path} connectorId`, createError)
|
|
167
|
+
return
|
|
159
168
|
default:
|
|
160
169
|
throw createError(
|
|
161
|
-
`${path} must select object, link, rule, dataset, sync, pipeline, or
|
|
170
|
+
`${path} must select object, link, rule, dataset, sync, pipeline, member, or connection events.`
|
|
162
171
|
)
|
|
163
172
|
}
|
|
164
173
|
}
|
|
@@ -246,6 +255,15 @@ function validateEventSchedule(
|
|
|
246
255
|
case "users":
|
|
247
256
|
validateMemberSource(schedule)
|
|
248
257
|
return
|
|
258
|
+
case "connectors":
|
|
259
|
+
validateRegisteredSource(
|
|
260
|
+
schedule,
|
|
261
|
+
source.connectorId,
|
|
262
|
+
options.registeredOAuthConnectorIds,
|
|
263
|
+
connectorEventTypes,
|
|
264
|
+
"OAuth connector"
|
|
265
|
+
)
|
|
266
|
+
return
|
|
249
267
|
}
|
|
250
268
|
}
|
|
251
269
|
|
|
@@ -292,7 +310,7 @@ function validateRegisteredSource(
|
|
|
292
310
|
sourceId: string | undefined,
|
|
293
311
|
registeredIds: ReadonlySet<string> | undefined,
|
|
294
312
|
supportedTypes: ReadonlySet<string>,
|
|
295
|
-
sourceKind: "rule" | "dataset" | "sync" | "pipeline"
|
|
313
|
+
sourceKind: "rule" | "dataset" | "sync" | "pipeline" | "OAuth connector"
|
|
296
314
|
): void {
|
|
297
315
|
validateEventTypes(schedule, supportedTypes, sourceKind)
|
|
298
316
|
if (!registeredIds?.has(sourceId ?? "")) {
|
|
@@ -61,7 +61,8 @@ export function resolveViewCondition(
|
|
|
61
61
|
input: { kind: "start", objectTypeId, includeSubtypes: true },
|
|
62
62
|
predicate: grant.condition,
|
|
63
63
|
},
|
|
64
|
-
|
|
64
|
+
// The author writes the role, so the issue may name every property of the type.
|
|
65
|
+
{ ontology, discovery: ontology },
|
|
65
66
|
unmarkedPropertiesOnly(subject, objectTypeIds, ontology)
|
|
66
67
|
)
|
|
67
68
|
|