@sixb/core 0.1.0 → 0.1.2
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/README.md +54 -23
- package/dist/actions/commit-edits.d.ts +0 -2
- package/dist/actions/commit-edits.d.ts.map +1 -1
- package/dist/actions/execution.d.ts +21 -0
- package/dist/actions/execution.d.ts.map +1 -0
- package/dist/actions/index.d.ts +1 -1
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +34 -23
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/registry.d.ts +16 -7
- package/dist/actions/registry.d.ts.map +1 -1
- package/dist/actions/request.d.ts +3 -2
- package/dist/actions/request.d.ts.map +1 -1
- package/dist/actions/run-dispatch.d.ts +21 -0
- package/dist/actions/run-dispatch.d.ts.map +1 -0
- package/dist/actions/types/context.d.ts +2 -2
- package/dist/actions/types/context.d.ts.map +1 -1
- package/dist/actions/validation.d.ts +1 -1
- package/dist/actions/validation.d.ts.map +1 -1
- package/dist/actions/worker.js +4 -4
- package/dist/actions/worker.js.map +1 -1
- package/dist/agents/adapters.d.ts +10 -0
- package/dist/agents/adapters.d.ts.map +1 -1
- package/dist/agents/authority.d.ts +31 -0
- package/dist/agents/authority.d.ts.map +1 -0
- package/dist/agents/builders.d.ts +8 -1
- package/dist/agents/builders.d.ts.map +1 -1
- package/dist/agents/context.js +2 -2
- package/dist/agents/dispatch.d.ts.map +1 -1
- package/dist/agents/errors.d.ts +16 -1
- package/dist/agents/errors.d.ts.map +1 -1
- package/dist/agents/execution.d.ts +45 -0
- package/dist/agents/execution.d.ts.map +1 -0
- package/dist/agents/index.d.ts +10 -10
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +81 -14
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/prompt.d.ts.map +1 -1
- package/dist/agents/request.d.ts +6 -2
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/streams.d.ts +29 -3
- package/dist/agents/streams.d.ts.map +1 -1
- package/dist/agents/streams.js +22 -3
- package/dist/agents/streams.js.map +1 -1
- package/dist/agents/tool-definition.d.ts +9 -0
- package/dist/agents/tool-definition.d.ts.map +1 -0
- package/dist/agents/types.d.ts +64 -0
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/validation.d.ts +16 -3
- package/dist/agents/validation.d.ts.map +1 -1
- package/dist/auth/attribution.d.ts +17 -0
- package/dist/auth/attribution.d.ts.map +1 -0
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +9 -5
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/runtime.d.ts +4 -4
- package/dist/auth/runtime.d.ts.map +1 -1
- package/dist/authorization/decision.d.ts +24 -11
- package/dist/authorization/decision.d.ts.map +1 -1
- package/dist/authorization/grant-kinds.d.ts +2 -1
- package/dist/authorization/grant-kinds.d.ts.map +1 -1
- package/dist/authorization/index.d.ts +1 -1
- package/dist/authorization/index.d.ts.map +1 -1
- package/dist/authorization/index.js +8 -4
- package/dist/authorization/index.js.map +1 -1
- package/dist/blob-storage/browser.js +3 -2
- package/dist/blob-storage/browser.js.map +1 -1
- package/dist/blob-storage/execution.d.ts +16 -0
- package/dist/blob-storage/execution.d.ts.map +1 -0
- package/dist/blob-storage/index.js +4 -3
- package/dist/blob-storage/index.js.map +1 -1
- package/dist/blob-storage/validation.d.ts.map +1 -1
- package/dist/bootstrap/discovery.d.ts +90 -24
- package/dist/bootstrap/discovery.d.ts.map +1 -1
- package/dist/bootstrap/index.d.ts +2 -1
- package/dist/bootstrap/index.d.ts.map +1 -1
- package/dist/bootstrap/index.js +59 -59
- package/dist/bootstrap/index.js.map +1 -1
- package/dist/broker/in-memory.d.ts.map +1 -1
- package/dist/broker/index.js +2 -2
- package/dist/broker/types.d.ts +5 -0
- package/dist/broker/types.d.ts.map +1 -1
- package/dist/chunk-0172wgm9.js +333 -0
- package/dist/chunk-0172wgm9.js.map +11 -0
- package/dist/chunk-0k4avqr2.js +317 -0
- package/dist/chunk-0k4avqr2.js.map +11 -0
- package/dist/chunk-0mbx247x.js +2922 -0
- package/dist/chunk-0mbx247x.js.map +43 -0
- package/dist/chunk-34bqh420.js +1168 -0
- package/dist/chunk-34bqh420.js.map +23 -0
- package/dist/{chunk-mx84y05q.js → chunk-3j7573mj.js} +2 -2
- package/dist/{chunk-mx84y05q.js.map → chunk-3j7573mj.js.map} +2 -2
- package/dist/{chunk-45tw90k7.js → chunk-4gz41why.js} +1 -1
- package/dist/chunk-4x43bkbp.js +55 -0
- package/dist/chunk-4x43bkbp.js.map +11 -0
- package/dist/{chunk-xqbtf4wn.js → chunk-57r1cpxx.js} +3 -2
- package/dist/{chunk-xqbtf4wn.js.map → chunk-57r1cpxx.js.map} +3 -3
- package/dist/chunk-57zpb99z.js +194 -0
- package/dist/chunk-57zpb99z.js.map +10 -0
- package/dist/{chunk-dhmj53mx.js → chunk-5egfka8j.js} +13 -33
- package/dist/chunk-5egfka8j.js.map +15 -0
- package/dist/chunk-5gd7tpv6.js +28 -0
- package/dist/chunk-5gd7tpv6.js.map +11 -0
- package/dist/{chunk-867jxh7c.js → chunk-5sz8ta9r.js} +6 -295
- package/dist/chunk-5sz8ta9r.js.map +16 -0
- package/dist/chunk-62c7t4jc.js +27 -0
- package/dist/chunk-62c7t4jc.js.map +11 -0
- package/dist/{chunk-8r8cw2xw.js → chunk-63te770v.js} +40 -5
- package/dist/{chunk-8r8cw2xw.js.map → chunk-63te770v.js.map} +3 -3
- package/dist/chunk-663csy96.js +34 -0
- package/dist/chunk-663csy96.js.map +10 -0
- package/dist/{chunk-xz5g49bp.js → chunk-6gjqgd3d.js} +3 -1
- package/dist/chunk-6gjqgd3d.js.map +11 -0
- package/dist/chunk-7pc8b818.js +128 -0
- package/dist/chunk-7pc8b818.js.map +13 -0
- package/dist/{chunk-f2b5e2gf.js → chunk-85j5ybfj.js} +18 -3
- package/dist/{chunk-f2b5e2gf.js.map → chunk-85j5ybfj.js.map} +3 -3
- package/dist/{chunk-vj723r3p.js → chunk-8b55ygje.js} +1 -1
- package/dist/chunk-8m5ejdpn.js +33 -0
- package/dist/chunk-8m5ejdpn.js.map +10 -0
- package/dist/chunk-8ryen3p3.js +118 -0
- package/dist/chunk-8ryen3p3.js.map +10 -0
- package/dist/chunk-979ww6b3.js +298 -0
- package/dist/chunk-979ww6b3.js.map +12 -0
- package/dist/{chunk-ya6brh8a.js → chunk-9t8f5xfx.js} +10 -5
- package/dist/chunk-9t8f5xfx.js.map +11 -0
- package/dist/{chunk-r65yscvk.js → chunk-a31h57d5.js} +131 -13
- package/dist/chunk-a31h57d5.js.map +13 -0
- package/dist/chunk-bct7hmfc.js +402 -0
- package/dist/chunk-bct7hmfc.js.map +14 -0
- package/dist/chunk-bh6k3nc6.js +164 -0
- package/dist/chunk-bh6k3nc6.js.map +12 -0
- package/dist/{chunk-t72dvahb.js → chunk-bhxaq2nn.js} +61 -44
- package/dist/chunk-bhxaq2nn.js.map +12 -0
- package/dist/{chunk-jdwx7vzs.js → chunk-c6qd89g5.js} +240 -143
- package/dist/chunk-c6qd89g5.js.map +15 -0
- package/dist/{chunk-2s6sydsh.js → chunk-ckxfnx7f.js} +294 -4
- package/dist/chunk-ckxfnx7f.js.map +13 -0
- package/dist/chunk-cy0n5dms.js +27 -0
- package/dist/chunk-cy0n5dms.js.map +11 -0
- package/dist/chunk-dsrkgtnh.js +50 -0
- package/dist/chunk-dsrkgtnh.js.map +10 -0
- package/dist/{chunk-50kv63vj.js → chunk-dysw7nsm.js} +118 -26
- package/dist/chunk-dysw7nsm.js.map +14 -0
- package/dist/chunk-ezake7g1.js +32 -0
- package/dist/chunk-ezake7g1.js.map +11 -0
- package/dist/{chunk-yxss87qa.js → chunk-f2rt4vkh.js} +48 -29
- package/dist/chunk-f2rt4vkh.js.map +14 -0
- package/dist/{chunk-q4qzq0ea.js → chunk-fmx1sz2h.js} +117 -56
- package/dist/chunk-fmx1sz2h.js.map +15 -0
- package/dist/chunk-g9t3kdtx.js +90 -0
- package/dist/chunk-g9t3kdtx.js.map +10 -0
- package/dist/{chunk-c3zd880g.js → chunk-ghteq96b.js} +8 -8
- package/dist/{chunk-c3zd880g.js.map → chunk-ghteq96b.js.map} +4 -4
- package/dist/chunk-h9kxd41f.js +271 -0
- package/dist/chunk-h9kxd41f.js.map +11 -0
- package/dist/chunk-htq0qh7z.js +59 -0
- package/dist/chunk-htq0qh7z.js.map +11 -0
- package/dist/{chunk-dcgrzj1t.js → chunk-jaj13078.js} +121 -9
- package/dist/chunk-jaj13078.js.map +38 -0
- package/dist/{chunk-t358gywy.js → chunk-k9pts48t.js} +81 -58
- package/dist/chunk-k9pts48t.js.map +35 -0
- package/dist/chunk-n8herkry.js +3294 -0
- package/dist/chunk-n8herkry.js.map +35 -0
- package/dist/chunk-nf4r78r4.js +44 -0
- package/dist/chunk-nf4r78r4.js.map +10 -0
- package/dist/{chunk-2gpr6jsz.js → chunk-nnyp53zt.js} +14 -34
- package/dist/chunk-nnyp53zt.js.map +13 -0
- package/dist/chunk-nten49ta.js +404 -0
- package/dist/chunk-nten49ta.js.map +12 -0
- package/dist/chunk-qvybnnpe.js +137 -0
- package/dist/chunk-qvybnnpe.js.map +10 -0
- package/dist/{chunk-tsk2bxs3.js → chunk-rnshztfq.js} +13 -13
- package/dist/{chunk-tsk2bxs3.js.map → chunk-rnshztfq.js.map} +3 -3
- package/dist/chunk-sa4340y1.js +607 -0
- package/dist/chunk-sa4340y1.js.map +14 -0
- package/dist/{chunk-yvef9xwc.js → chunk-st4xgxey.js} +583 -251
- package/dist/chunk-st4xgxey.js.map +45 -0
- package/dist/{chunk-1vffvydj.js → chunk-t8t39h7v.js} +6 -6
- package/dist/chunk-t8t39h7v.js.map +10 -0
- package/dist/chunk-t9xghkva.js +28 -0
- package/dist/chunk-t9xghkva.js.map +10 -0
- package/dist/chunk-vp1vc6ee.js +35 -0
- package/dist/chunk-vp1vc6ee.js.map +11 -0
- package/dist/{chunk-p6r5g77m.js → chunk-vybf6pkp.js} +1 -1
- package/dist/{chunk-wj01s5hr.js → chunk-wtmzkcht.js} +4 -3
- package/dist/chunk-wtmzkcht.js.map +11 -0
- package/dist/{chunk-v5c085yp.js → chunk-xhy826cz.js} +3 -2
- package/dist/chunk-xhy826cz.js.map +10 -0
- package/dist/chunk-xkthy56g.js +33 -0
- package/dist/chunk-xkthy56g.js.map +11 -0
- package/dist/{chunk-aebzcsxr.js → chunk-ys1nse2v.js} +2178 -382
- package/dist/chunk-ys1nse2v.js.map +56 -0
- package/dist/{chunk-5yny9z0e.js → chunk-z3zp0bj1.js} +1 -1
- package/dist/chunk-zcnhxkvd.js +7 -0
- package/dist/chunk-zcnhxkvd.js.map +10 -0
- package/dist/chunk-zg9yryhz.js +252 -0
- package/dist/chunk-zg9yryhz.js.map +12 -0
- package/dist/chunk-zqqz8052.js +3 -0
- package/dist/{storage/projection-runs/lifecycle.js.map → chunk-zqqz8052.js.map} +1 -1
- package/dist/{chunk-4pycxcj3.js → chunk-zqysyfjt.js} +6 -9
- package/dist/{chunk-4pycxcj3.js.map → chunk-zqysyfjt.js.map} +3 -3
- package/dist/connectors/builders.d.ts +2 -1
- package/dist/connectors/builders.d.ts.map +1 -1
- package/dist/connectors/connections/authorizations.d.ts +64 -0
- package/dist/connectors/connections/authorizations.d.ts.map +1 -0
- package/dist/connectors/connections/capability.d.ts +7 -0
- package/dist/connectors/connections/capability.d.ts.map +1 -0
- package/dist/connectors/connections/command-context.d.ts +23 -0
- package/dist/connectors/connections/command-context.d.ts.map +1 -0
- package/dist/connectors/connections/contracts.d.ts +127 -0
- package/dist/connectors/connections/contracts.d.ts.map +1 -0
- package/dist/connectors/connections/credential-codec.d.ts +15 -0
- package/dist/connectors/connections/credential-codec.d.ts.map +1 -0
- package/dist/connectors/connections/credential-mutations.d.ts +63 -0
- package/dist/connectors/connections/credential-mutations.d.ts.map +1 -0
- package/dist/connectors/connections/execution.d.ts +20 -0
- package/dist/connectors/connections/execution.d.ts.map +1 -0
- package/dist/connectors/connections/internal.d.ts +5 -0
- package/dist/connectors/connections/internal.d.ts.map +1 -0
- package/dist/connectors/connections/internal.js +16 -0
- package/dist/connectors/connections/internal.js.map +9 -0
- package/dist/connectors/connections/provider-operation.d.ts +7 -0
- package/dist/connectors/connections/provider-operation.d.ts.map +1 -0
- package/dist/connectors/connections/request.d.ts +84 -0
- package/dist/connectors/connections/request.d.ts.map +1 -0
- package/dist/connectors/connections/runs.d.ts +51 -0
- package/dist/connectors/connections/runs.d.ts.map +1 -0
- package/dist/connectors/connections/service.d.ts +52 -0
- package/dist/connectors/connections/service.d.ts.map +1 -0
- package/dist/connectors/connections/storage-boundary.d.ts +3 -0
- package/dist/connectors/connections/storage-boundary.d.ts.map +1 -0
- package/dist/connectors/connections/tokens.d.ts +32 -0
- package/dist/connectors/connections/tokens.d.ts.map +1 -0
- package/dist/connectors/connections/validation.d.ts +27 -0
- package/dist/connectors/connections/validation.d.ts.map +1 -0
- package/dist/connectors/connections/views.d.ts +7 -0
- package/dist/connectors/connections/views.d.ts.map +1 -0
- package/dist/connectors/credentials.d.ts +25 -0
- package/dist/connectors/credentials.d.ts.map +1 -0
- package/dist/connectors/errors.d.ts +35 -3
- package/dist/connectors/errors.d.ts.map +1 -1
- package/dist/connectors/execution.d.ts +19 -0
- package/dist/connectors/execution.d.ts.map +1 -0
- package/dist/connectors/index.d.ts +5 -3
- package/dist/connectors/index.d.ts.map +1 -1
- package/dist/connectors/service.d.ts +23 -0
- package/dist/connectors/service.d.ts.map +1 -0
- package/dist/connectors/types.d.ts +94 -2
- package/dist/connectors/types.d.ts.map +1 -1
- package/dist/datasets/builders.d.ts +18 -5
- package/dist/datasets/builders.d.ts.map +1 -1
- package/dist/datasets/changes.d.ts +18 -0
- package/dist/datasets/changes.d.ts.map +1 -0
- package/dist/datasets/execution.d.ts +8 -0
- package/dist/datasets/execution.d.ts.map +1 -0
- package/dist/datasets/index.d.ts +3 -1
- package/dist/datasets/index.d.ts.map +1 -1
- package/dist/datasets/types.d.ts +2 -0
- package/dist/datasets/types.d.ts.map +1 -1
- package/dist/datasets/validation.d.ts.map +1 -1
- package/dist/error-reporting/capability.d.ts +4 -49
- package/dist/error-reporting/capability.d.ts.map +1 -1
- package/dist/error-reporting/internal.d.ts +2 -2
- package/dist/error-reporting/internal.d.ts.map +1 -1
- package/dist/error-reporting/internal.js +10 -4
- package/dist/error-reporting/internal.js.map +1 -1
- package/dist/error-reporting/reporter.d.ts +4 -1
- package/dist/error-reporting/reporter.d.ts.map +1 -1
- package/dist/error-reporting/reports.d.ts +64 -0
- package/dist/error-reporting/reports.d.ts.map +1 -0
- package/dist/error-reporting/types.d.ts +88 -34
- package/dist/error-reporting/types.d.ts.map +1 -1
- package/dist/errors/catalog.d.ts +141 -0
- package/dist/errors/catalog.d.ts.map +1 -0
- package/dist/errors/internal.d.ts +68 -0
- package/dist/errors/internal.d.ts.map +1 -0
- package/dist/errors/internal.js +29 -0
- package/dist/errors/internal.js.map +9 -0
- package/dist/errors/types.d.ts +20 -0
- package/dist/errors/types.d.ts.map +1 -0
- package/dist/events/definitions.d.ts +0 -1
- package/dist/events/definitions.d.ts.map +1 -1
- package/dist/events/execution.d.ts +13 -0
- package/dist/events/execution.d.ts.map +1 -0
- package/dist/events/index.d.ts +3 -2
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +10 -8
- package/dist/events/index.js.map +1 -1
- package/dist/events/outbox-dispatcher.d.ts +4 -2
- package/dist/events/outbox-dispatcher.d.ts.map +1 -1
- package/dist/events/{runtime.d.ts → service.d.ts} +13 -14
- package/dist/events/service.d.ts.map +1 -0
- package/dist/events/types/pipelines.d.ts +4 -1
- package/dist/events/types/pipelines.d.ts.map +1 -1
- package/dist/events/types/syncs.d.ts +3 -0
- package/dist/events/types/syncs.d.ts.map +1 -1
- package/dist/events/types/workflows.d.ts +4 -2
- package/dist/events/types/workflows.d.ts.map +1 -1
- package/dist/execution/agent.d.ts +42 -0
- package/dist/execution/agent.d.ts.map +1 -0
- package/dist/execution/agent.js +70 -0
- package/dist/execution/agent.js.map +9 -0
- package/dist/execution/authorization.d.ts +60 -0
- package/dist/execution/authorization.d.ts.map +1 -0
- package/dist/execution/dispatch.d.ts +8 -0
- package/dist/execution/dispatch.d.ts.map +1 -0
- package/dist/execution/durable.d.ts +37 -0
- package/dist/execution/durable.d.ts.map +1 -0
- package/dist/execution/index.d.ts +2 -0
- package/dist/execution/index.d.ts.map +1 -0
- package/dist/execution/primitive.d.ts +21 -0
- package/dist/execution/primitive.d.ts.map +1 -0
- package/dist/execution/primitive.js +88 -0
- package/dist/execution/primitive.js.map +10 -0
- package/dist/execution/request.d.ts +38 -0
- package/dist/execution/request.d.ts.map +1 -0
- package/dist/execution/request.js +97 -0
- package/dist/execution/request.js.map +10 -0
- package/dist/execution/scopes.d.ts +30 -0
- package/dist/execution/scopes.d.ts.map +1 -0
- package/dist/execution/types.d.ts +111 -0
- package/dist/execution/types.d.ts.map +1 -0
- package/dist/http/api-routes.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/index.d.ts +35 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +142 -111
- package/dist/index.js.map +1 -1
- package/dist/json.d.ts +8 -2
- package/dist/json.d.ts.map +1 -1
- package/dist/lake-storage/definition-updates.d.ts.map +1 -1
- package/dist/lake-storage/in-memory.d.ts +15 -1
- package/dist/lake-storage/in-memory.d.ts.map +1 -1
- package/dist/lake-storage/index.d.ts +3 -1
- package/dist/lake-storage/index.d.ts.map +1 -1
- package/dist/lake-storage/index.js +15 -7
- package/dist/lake-storage/index.js.map +1 -1
- package/dist/lake-storage/merge-validation.d.ts +10 -0
- package/dist/lake-storage/merge-validation.d.ts.map +1 -0
- package/dist/lake-storage/merge.d.ts +32 -0
- package/dist/lake-storage/merge.d.ts.map +1 -0
- package/dist/lake-storage/types.d.ts +3 -1
- package/dist/lake-storage/types.d.ts.map +1 -1
- package/dist/logging/execution.d.ts +9 -0
- package/dist/logging/execution.d.ts.map +1 -0
- package/dist/logging/index.d.ts +1 -1
- package/dist/logging/index.d.ts.map +1 -1
- package/dist/logging/index.js +8 -8
- package/dist/logging/index.js.map +1 -1
- package/dist/logging/{runtime.d.ts → service.d.ts} +7 -7
- package/dist/logging/{runtime.d.ts.map → service.d.ts.map} +1 -1
- package/dist/logging/types.js +2 -2
- package/dist/materialization/events.d.ts +1 -0
- package/dist/materialization/events.d.ts.map +1 -1
- package/dist/materialization/index.d.ts +1 -1
- package/dist/materialization/index.d.ts.map +1 -1
- package/dist/materialization/index.js +2 -2
- package/dist/materialization/model.d.ts +26 -17
- package/dist/materialization/model.d.ts.map +1 -1
- package/dist/materializer/edits/commit.d.ts +2 -1
- package/dist/materializer/edits/commit.d.ts.map +1 -1
- package/dist/materializer/edits/load-state.d.ts +1 -1
- package/dist/materializer/edits/load-state.d.ts.map +1 -1
- package/dist/materializer/edits/operations.d.ts +1 -13
- package/dist/materializer/edits/operations.d.ts.map +1 -1
- package/dist/materializer/edits/plan.d.ts +2 -1
- package/dist/materializer/edits/plan.d.ts.map +1 -1
- package/dist/materializer/edits/working-state.d.ts +36 -8
- package/dist/materializer/edits/working-state.d.ts.map +1 -1
- package/dist/materializer/effective/build-events.d.ts +1 -0
- package/dist/materializer/effective/build-events.d.ts.map +1 -1
- package/dist/materializer/effective/diff.d.ts +7 -0
- package/dist/materializer/effective/diff.d.ts.map +1 -1
- package/dist/materializer/effective/load-state.d.ts +0 -2
- package/dist/materializer/effective/load-state.d.ts.map +1 -1
- package/dist/materializer/effective/resolve.d.ts +17 -2
- package/dist/materializer/effective/resolve.d.ts.map +1 -1
- package/dist/materializer/execution/commit-lifecycle.d.ts +2 -2
- package/dist/materializer/execution/commit-lifecycle.d.ts.map +1 -1
- package/dist/materializer/execution/plan-stream.d.ts.map +1 -1
- package/dist/materializer/execution/scope.d.ts +26 -0
- package/dist/materializer/execution/scope.d.ts.map +1 -0
- package/dist/materializer/execution/work-executor.d.ts.map +1 -1
- package/dist/materializer/execution/work-records.d.ts +6 -5
- package/dist/materializer/execution/work-records.d.ts.map +1 -1
- package/dist/materializer/index.d.ts +2 -2
- package/dist/materializer/index.d.ts.map +1 -1
- package/dist/materializer/index.js +30 -18
- package/dist/materializer/index.js.map +1 -1
- package/dist/materializer/materializer.d.ts +37 -5
- package/dist/materializer/materializer.d.ts.map +1 -1
- package/dist/materializer/projections/finish-run.d.ts +2 -1
- package/dist/materializer/projections/finish-run.d.ts.map +1 -1
- package/dist/materializer/projections/replace.d.ts +2 -1
- package/dist/materializer/projections/replace.d.ts.map +1 -1
- package/dist/materializer/projections/replacement-plan.d.ts +1 -0
- package/dist/materializer/projections/replacement-plan.d.ts.map +1 -1
- package/dist/materializer/shared/batching.d.ts.map +1 -1
- package/dist/materializer/shared/normalize.d.ts.map +1 -1
- package/dist/materializer/telemetry/append.d.ts +2 -1
- package/dist/materializer/telemetry/append.d.ts.map +1 -1
- package/dist/materializer/telemetry/plan.d.ts +7 -1
- package/dist/materializer/telemetry/plan.d.ts.map +1 -1
- package/dist/objects/action/request.d.ts +3 -3
- package/dist/objects/action/request.d.ts.map +1 -1
- package/dist/objects/context/index.d.ts +1 -1
- package/dist/objects/context/index.d.ts.map +1 -1
- package/dist/objects/context/types.d.ts +5 -0
- package/dist/objects/context/types.d.ts.map +1 -1
- package/dist/objects/execution.d.ts +100 -0
- package/dist/objects/execution.d.ts.map +1 -0
- package/dist/objects/index.js +37 -24
- package/dist/objects/index.js.map +1 -1
- package/dist/objects/materializer-adapter.d.ts +1 -1
- package/dist/objects/materializer-adapter.d.ts.map +1 -1
- package/dist/objects/query/executor.d.ts +3 -8
- package/dist/objects/query/executor.d.ts.map +1 -1
- package/dist/objects/query/index.d.ts +2 -2
- package/dist/objects/query/index.d.ts.map +1 -1
- package/dist/objects/query/index.js +9 -13
- package/dist/objects/query/index.js.map +1 -1
- package/dist/objects/query/planner.d.ts +0 -3
- package/dist/objects/query/planner.d.ts.map +1 -1
- package/dist/objects/sdk/object-handle.d.ts +2 -2
- package/dist/objects/sdk/object-handle.d.ts.map +1 -1
- package/dist/objects/sdk/object-set.d.ts +2 -0
- package/dist/objects/sdk/object-set.d.ts.map +1 -1
- package/dist/objects/sdk/runtime-query-executor.d.ts +2 -0
- package/dist/objects/sdk/runtime-query-executor.d.ts.map +1 -1
- package/dist/objects/sdk/telemetry-channel.d.ts.map +1 -1
- package/dist/objects/service/action-service.d.ts +3 -2
- package/dist/objects/service/action-service.d.ts.map +1 -1
- package/dist/objects/service/list-service.d.ts +1 -1
- package/dist/objects/telemetry/history.d.ts +2 -0
- package/dist/objects/telemetry/history.d.ts.map +1 -1
- package/dist/objects/telemetry/write-batch.d.ts.map +1 -1
- package/dist/ontology/index.d.ts +1 -1
- package/dist/ontology/index.d.ts.map +1 -1
- package/dist/ontology/index.js +5 -5
- package/dist/ontology/internal.js +7 -6
- package/dist/ontology/internal.js.map +3 -3
- package/dist/ontology/registry.d.ts +15 -2
- package/dist/ontology/registry.d.ts.map +1 -1
- package/dist/ontology/validation/normalize.d.ts.map +1 -1
- package/dist/pipelines/execution.d.ts +19 -0
- package/dist/pipelines/execution.d.ts.map +1 -0
- package/dist/pipelines/index.d.ts +1 -0
- package/dist/pipelines/index.d.ts.map +1 -1
- package/dist/pipelines/index.js +66 -0
- package/dist/pipelines/index.js.map +9 -0
- package/dist/pipelines/request.d.ts +6 -9
- package/dist/pipelines/request.d.ts.map +1 -1
- package/dist/pipelines/run-dispatch.d.ts +47 -0
- package/dist/pipelines/run-dispatch.d.ts.map +1 -0
- package/dist/projections/builders.d.ts +0 -2
- package/dist/projections/builders.d.ts.map +1 -1
- package/dist/projections/capability.d.ts +7 -0
- package/dist/projections/capability.d.ts.map +1 -0
- package/dist/projections/execution.d.ts +19 -0
- package/dist/projections/execution.d.ts.map +1 -0
- package/dist/projections/index.d.ts +3 -1
- package/dist/projections/index.d.ts.map +1 -1
- package/dist/projections/internal.d.ts +4 -10
- package/dist/projections/internal.d.ts.map +1 -1
- package/dist/projections/internal.js +42 -6
- package/dist/projections/internal.js.map +1 -1
- package/dist/projections/ownership.d.ts +2 -2
- package/dist/projections/ownership.d.ts.map +1 -1
- package/dist/projections/registry.d.ts +21 -11
- package/dist/projections/registry.d.ts.map +1 -1
- package/dist/projections/revision.d.ts +2 -2
- package/dist/projections/revision.d.ts.map +1 -1
- package/dist/projections/run-dispatch.d.ts +37 -0
- package/dist/projections/run-dispatch.d.ts.map +1 -0
- package/dist/projections/run-id.d.ts +3 -0
- package/dist/projections/run-id.d.ts.map +1 -0
- package/dist/projections/types.d.ts +3 -0
- package/dist/projections/types.d.ts.map +1 -1
- package/dist/projections/validation.d.ts +2 -2
- package/dist/projections/validation.d.ts.map +1 -1
- package/dist/queues/in-memory.d.ts +11 -10
- 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 +52 -42
- package/dist/queues/types.d.ts.map +1 -1
- package/dist/rules/execution.d.ts +14 -0
- package/dist/rules/execution.d.ts.map +1 -0
- package/dist/rules/index.d.ts +1 -1
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/validation.d.ts +1 -2
- package/dist/rules/validation.d.ts.map +1 -1
- package/dist/runtime/ai-usage.d.ts +8 -0
- package/dist/runtime/ai-usage.d.ts.map +1 -0
- package/dist/runtime/create.d.ts +7 -5
- package/dist/runtime/create.d.ts.map +1 -1
- package/dist/runtime/definitions.d.ts +35 -0
- package/dist/runtime/definitions.d.ts.map +1 -0
- package/dist/runtime/host.d.ts +123 -0
- package/dist/runtime/host.d.ts.map +1 -0
- package/dist/runtime/index.d.ts +6 -5
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/internal.d.ts +4 -0
- package/dist/runtime/internal.d.ts.map +1 -1
- package/dist/runtime/internal.js +6 -2
- package/dist/runtime/internal.js.map +1 -1
- package/dist/runtime/ontology-mutations.d.ts +4 -2
- package/dist/runtime/ontology-mutations.d.ts.map +1 -1
- package/dist/runtime/resolve-definitions.d.ts +42 -0
- package/dist/runtime/resolve-definitions.d.ts.map +1 -0
- package/dist/runtime/sixb.d.ts +43 -219
- package/dist/runtime/sixb.d.ts.map +1 -1
- package/dist/runtime/types.d.ts +16 -216
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/scheduler/index.d.ts +1 -1
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/index.js +3 -6
- package/dist/scheduler/index.js.map +1 -1
- package/dist/scheduler/runtime.d.ts +7 -2
- package/dist/scheduler/runtime.d.ts.map +1 -1
- package/dist/schedules/execution.d.ts +6 -0
- package/dist/schedules/execution.d.ts.map +1 -0
- package/dist/schedules/index.js +9 -7
- package/dist/schedules/index.js.map +1 -1
- package/dist/schedules/types.d.ts +1 -3
- package/dist/schedules/types.d.ts.map +1 -1
- package/dist/security/every.d.ts +4 -1
- package/dist/security/every.d.ts.map +1 -1
- package/dist/security/grants.d.ts +4 -1
- package/dist/security/grants.d.ts.map +1 -1
- package/dist/security/index.d.ts +3 -1
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/registry.d.ts +42 -0
- package/dist/security/registry.d.ts.map +1 -0
- package/dist/security/types.d.ts +7 -12
- package/dist/security/types.d.ts.map +1 -1
- package/dist/security/validation.d.ts +2 -0
- package/dist/security/validation.d.ts.map +1 -1
- package/dist/storage/action-runs/failure.d.ts +7 -0
- package/dist/storage/action-runs/failure.d.ts.map +1 -0
- package/dist/storage/action-runs/failure.js +14 -0
- package/dist/storage/action-runs/failure.js.map +9 -0
- package/dist/storage/action-runs/idempotency.d.ts.map +1 -1
- package/dist/storage/action-runs/in-memory.d.ts +3 -1
- package/dist/storage/action-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/action-runs/index.d.ts +2 -1
- package/dist/storage/action-runs/index.d.ts.map +1 -1
- package/dist/storage/action-runs/provider.d.ts +10 -0
- package/dist/storage/action-runs/provider.d.ts.map +1 -0
- package/dist/storage/action-runs/provider.js +13 -0
- package/dist/storage/action-runs/provider.js.map +9 -0
- package/dist/storage/action-runs/types.d.ts +37 -18
- package/dist/storage/action-runs/types.d.ts.map +1 -1
- 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 +4 -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 +10 -0
- package/dist/storage/agents/provider.d.ts.map +1 -0
- package/dist/storage/agents/provider.js +17 -0
- package/dist/storage/agents/provider.js.map +9 -0
- package/dist/storage/agents/types.d.ts +13 -22
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/ai-usage/errors.d.ts +8 -0
- package/dist/storage/ai-usage/errors.d.ts.map +1 -0
- package/dist/storage/ai-usage/in-memory.d.ts +28 -0
- package/dist/storage/ai-usage/in-memory.d.ts.map +1 -0
- package/dist/storage/ai-usage/index.d.ts +8 -0
- package/dist/storage/ai-usage/index.d.ts.map +1 -0
- package/dist/storage/ai-usage/record.d.ts +6 -0
- package/dist/storage/ai-usage/record.d.ts.map +1 -0
- package/dist/storage/ai-usage/types.d.ts +89 -0
- package/dist/storage/ai-usage/types.d.ts.map +1 -0
- package/dist/storage/ai-usage/usage.d.ts +11 -0
- package/dist/storage/ai-usage/usage.d.ts.map +1 -0
- package/dist/storage/auth/types.d.ts +1 -0
- package/dist/storage/auth/types.d.ts.map +1 -1
- package/dist/storage/connector-connections/errors.d.ts +12 -0
- package/dist/storage/connector-connections/errors.d.ts.map +1 -0
- package/dist/storage/connector-connections/in-memory.d.ts +81 -0
- package/dist/storage/connector-connections/in-memory.d.ts.map +1 -0
- package/dist/storage/connector-connections/index.d.ts +7 -0
- package/dist/storage/connector-connections/index.d.ts.map +1 -0
- package/dist/storage/connector-connections/provider/authorizations.d.ts +20 -0
- package/dist/storage/connector-connections/provider/authorizations.d.ts.map +1 -0
- package/dist/storage/connector-connections/provider/connections.d.ts +17 -0
- package/dist/storage/connector-connections/provider/connections.d.ts.map +1 -0
- package/dist/storage/connector-connections/provider/runs.d.ts +14 -0
- package/dist/storage/connector-connections/provider/runs.d.ts.map +1 -0
- package/dist/storage/connector-connections/provider/shared.d.ts +74 -0
- package/dist/storage/connector-connections/provider/shared.d.ts.map +1 -0
- package/dist/storage/connector-connections/provider.d.ts +49 -0
- package/dist/storage/connector-connections/provider.d.ts.map +1 -0
- package/dist/storage/connector-connections/provider.js +1025 -0
- package/dist/storage/connector-connections/provider.js.map +14 -0
- package/dist/storage/connector-connections/types.d.ts +402 -0
- package/dist/storage/connector-connections/types.d.ts.map +1 -0
- package/dist/storage/executions/errors.d.ts +8 -0
- package/dist/storage/executions/errors.d.ts.map +1 -0
- package/dist/storage/executions/in-memory.d.ts +21 -0
- package/dist/storage/executions/in-memory.d.ts.map +1 -0
- package/dist/storage/executions/index.d.ts +5 -0
- package/dist/storage/executions/index.d.ts.map +1 -0
- package/dist/storage/executions/provider.d.ts +29 -0
- package/dist/storage/executions/provider.d.ts.map +1 -0
- package/dist/storage/executions/provider.js +208 -0
- package/dist/storage/executions/provider.js.map +10 -0
- package/dist/storage/executions/run-link.d.ts +24 -0
- package/dist/storage/executions/run-link.d.ts.map +1 -0
- package/dist/storage/executions/types.d.ts +62 -0
- package/dist/storage/executions/types.d.ts.map +1 -0
- package/dist/storage/executions/validation.d.ts +13 -0
- package/dist/storage/executions/validation.d.ts.map +1 -0
- package/dist/storage/in-memory/index.d.ts +20 -5
- package/dist/storage/in-memory/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +28 -17
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +90 -27
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/ontology/commits.d.ts +1 -0
- package/dist/storage/ontology/commits.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/index.d.ts +1 -0
- package/dist/storage/ontology/in-memory/index.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/materializations-state.d.ts +3 -2
- package/dist/storage/ontology/in-memory/materializations-state.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/materializations-work.d.ts +2 -2
- package/dist/storage/ontology/in-memory/materializations-work.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/materializations.d.ts +3 -1
- package/dist/storage/ontology/in-memory/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/shared-state.d.ts +7 -2
- package/dist/storage/ontology/in-memory/shared-state.d.ts.map +1 -1
- package/dist/storage/ontology/index.d.ts +3 -2
- package/dist/storage/ontology/index.d.ts.map +1 -1
- package/dist/storage/ontology/materializations.d.ts +50 -5
- package/dist/storage/ontology/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/outbox.d.ts +8 -2
- package/dist/storage/ontology/outbox.d.ts.map +1 -1
- package/dist/storage/ontology/provider-work.d.ts.map +1 -1
- package/dist/storage/ontology/provider.d.ts +5 -22
- package/dist/storage/ontology/provider.d.ts.map +1 -1
- package/dist/storage/ontology/provider.js +6 -7
- package/dist/storage/ontology/provider.js.map +1 -1
- package/dist/storage/operation-scope.d.ts.map +1 -1
- package/dist/storage/operation-scope.js +1 -1
- package/dist/storage/pipeline-runs/idempotency.d.ts +3 -0
- package/dist/storage/pipeline-runs/idempotency.d.ts.map +1 -0
- package/dist/storage/pipeline-runs/in-memory.d.ts +5 -1
- package/dist/storage/pipeline-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/pipeline-runs/index.d.ts +3 -1
- package/dist/storage/pipeline-runs/index.d.ts.map +1 -1
- package/dist/storage/pipeline-runs/provider.d.ts +10 -0
- package/dist/storage/pipeline-runs/provider.d.ts.map +1 -0
- package/dist/storage/pipeline-runs/provider.js +11 -0
- package/dist/storage/pipeline-runs/provider.js.map +9 -0
- package/dist/storage/pipeline-runs/types.d.ts +30 -14
- package/dist/storage/pipeline-runs/types.d.ts.map +1 -1
- package/dist/storage/projection-runs/in-memory.d.ts +8 -3
- package/dist/storage/projection-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/projection-runs/index.d.ts +2 -2
- package/dist/storage/projection-runs/index.d.ts.map +1 -1
- package/dist/storage/projection-runs/lifecycle.d.ts +14 -8
- package/dist/storage/projection-runs/lifecycle.d.ts.map +1 -1
- package/dist/storage/projection-runs/provider.d.ts +13 -0
- package/dist/storage/projection-runs/provider.d.ts.map +1 -0
- package/dist/storage/projection-runs/{lifecycle.js → provider.js} +15 -4
- package/dist/storage/projection-runs/provider.js.map +9 -0
- package/dist/storage/projection-runs/types.d.ts +28 -11
- package/dist/storage/projection-runs/types.d.ts.map +1 -1
- package/dist/storage/run-listing.d.ts +8 -9
- package/dist/storage/run-listing.d.ts.map +1 -1
- package/dist/storage/sync-runs/idempotency.d.ts +3 -0
- package/dist/storage/sync-runs/idempotency.d.ts.map +1 -0
- package/dist/storage/sync-runs/in-memory.d.ts +5 -1
- package/dist/storage/sync-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/sync-runs/index.d.ts +3 -1
- package/dist/storage/sync-runs/index.d.ts.map +1 -1
- package/dist/storage/sync-runs/provider.d.ts +10 -0
- package/dist/storage/sync-runs/provider.d.ts.map +1 -0
- package/dist/storage/sync-runs/provider.js +11 -0
- package/dist/storage/sync-runs/provider.js.map +9 -0
- package/dist/storage/sync-runs/types.d.ts +35 -14
- package/dist/storage/sync-runs/types.d.ts.map +1 -1
- package/dist/storage/types.d.ts +20 -15
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/storage/webhook-runs/errors.d.ts +3 -0
- package/dist/storage/webhook-runs/errors.d.ts.map +1 -1
- package/dist/storage/webhook-runs/in-memory.d.ts +13 -1
- package/dist/storage/webhook-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/webhook-runs/index.d.ts +3 -2
- package/dist/storage/webhook-runs/index.d.ts.map +1 -1
- package/dist/storage/webhook-runs/provider.d.ts +10 -0
- package/dist/storage/webhook-runs/provider.d.ts.map +1 -0
- package/dist/storage/webhook-runs/provider.js +11 -0
- package/dist/storage/webhook-runs/provider.js.map +9 -0
- package/dist/storage/webhook-runs/types.d.ts +37 -11
- package/dist/storage/webhook-runs/types.d.ts.map +1 -1
- package/dist/storage/workflow-runs/in-memory.d.ts +6 -2
- package/dist/storage/workflow-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/workflow-runs/index.d.ts +2 -1
- package/dist/storage/workflow-runs/index.d.ts.map +1 -1
- package/dist/storage/workflow-runs/provider.d.ts +19 -0
- package/dist/storage/workflow-runs/provider.d.ts.map +1 -0
- package/dist/storage/workflow-runs/provider.js +19 -0
- package/dist/storage/workflow-runs/provider.js.map +9 -0
- package/dist/storage/workflow-runs/types.d.ts +30 -30
- package/dist/storage/workflow-runs/types.d.ts.map +1 -1
- package/dist/syncs/builders.d.ts +11 -3
- package/dist/syncs/builders.d.ts.map +1 -1
- package/dist/syncs/execution.d.ts +18 -0
- package/dist/syncs/execution.d.ts.map +1 -0
- package/dist/syncs/index.d.ts +3 -1
- package/dist/syncs/index.d.ts.map +1 -1
- package/dist/syncs/index.js +65 -0
- package/dist/syncs/index.js.map +9 -0
- package/dist/syncs/request.d.ts +6 -16
- package/dist/syncs/request.d.ts.map +1 -1
- package/dist/syncs/run-dispatch.d.ts +47 -0
- package/dist/syncs/run-dispatch.d.ts.map +1 -0
- package/dist/syncs/sources.d.ts +8 -0
- package/dist/syncs/sources.d.ts.map +1 -0
- package/dist/syncs/types.d.ts +34 -22
- package/dist/syncs/types.d.ts.map +1 -1
- package/dist/syncs/validation.d.ts +14 -0
- package/dist/syncs/validation.d.ts.map +1 -0
- package/dist/testing/action-execution.d.ts +12 -0
- package/dist/testing/action-execution.d.ts.map +1 -0
- package/dist/testing/agent-execution.d.ts +14 -0
- package/dist/testing/agent-execution.d.ts.map +1 -0
- package/dist/testing/agent-storage-contract.d.ts +10 -3
- package/dist/testing/agent-storage-contract.d.ts.map +1 -1
- package/dist/testing/ai-usage-storage-contract.d.ts +13 -0
- package/dist/testing/ai-usage-storage-contract.d.ts.map +1 -0
- package/dist/testing/auth-storage-contract.d.ts.map +1 -1
- package/dist/testing/broker-contract.d.ts.map +1 -1
- package/dist/testing/connector-connection-storage-contract.d.ts +16 -0
- package/dist/testing/connector-connection-storage-contract.d.ts.map +1 -0
- package/dist/testing/execution-storage-contract.d.ts +15 -0
- package/dist/testing/execution-storage-contract.d.ts.map +1 -0
- package/dist/testing/execution.d.ts +23 -0
- package/dist/testing/execution.d.ts.map +1 -0
- package/dist/testing/index.d.ts +13 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +4270 -1484
- package/dist/testing/index.js.map +27 -14
- package/dist/testing/lake-merge-storage-contract.d.ts +7 -0
- package/dist/testing/lake-merge-storage-contract.d.ts.map +1 -0
- package/dist/testing/lake-storage-contract.d.ts.map +1 -1
- package/dist/testing/materializer-fixture.d.ts +2 -2
- package/dist/testing/materializer-fixture.d.ts.map +1 -1
- package/dist/testing/materializer-storage-contract.d.ts.map +1 -1
- package/dist/testing/ontology-contract-fixture.d.ts +1 -0
- package/dist/testing/ontology-contract-fixture.d.ts.map +1 -1
- package/dist/testing/ontology-storage-contract.d.ts.map +1 -1
- package/dist/testing/pipeline-execution.d.ts +16 -0
- package/dist/testing/pipeline-execution.d.ts.map +1 -0
- package/dist/testing/projection-execution.d.ts +20 -0
- package/dist/testing/projection-execution.d.ts.map +1 -0
- package/dist/testing/projection-run-storage-contract.d.ts +9 -4
- package/dist/testing/projection-run-storage-contract.d.ts.map +1 -1
- package/dist/testing/queues-contract.d.ts.map +1 -1
- package/dist/testing/sync-execution.d.ts +16 -0
- package/dist/testing/sync-execution.d.ts.map +1 -0
- package/dist/testing/webhook-execution.d.ts +12 -0
- package/dist/testing/webhook-execution.d.ts.map +1 -0
- package/dist/testing/webhook-run-storage-contract.d.ts +11 -0
- package/dist/testing/webhook-run-storage-contract.d.ts.map +1 -0
- package/dist/testing/workflow-execution.d.ts +23 -0
- package/dist/testing/workflow-execution.d.ts.map +1 -0
- package/dist/webhooks/index.d.ts +2 -1
- package/dist/webhooks/index.d.ts.map +1 -1
- package/dist/webhooks/internal.d.ts +2 -0
- package/dist/webhooks/internal.d.ts.map +1 -0
- package/dist/webhooks/internal.js +150 -0
- package/dist/webhooks/internal.js.map +10 -0
- package/dist/webhooks/registry.d.ts +18 -4
- package/dist/webhooks/registry.d.ts.map +1 -1
- package/dist/webhooks/run-admission.d.ts +25 -0
- package/dist/webhooks/run-admission.d.ts.map +1 -0
- package/dist/webhooks/types.d.ts +8 -5
- package/dist/webhooks/types.d.ts.map +1 -1
- package/dist/workers/index.js +18 -19
- package/dist/workers/index.js.map +4 -4
- package/dist/workers/queue-delivery.d.ts +7 -7
- package/dist/workers/queue-delivery.d.ts.map +1 -1
- package/dist/workers/queue-worker.d.ts +30 -11
- package/dist/workers/queue-worker.d.ts.map +1 -1
- package/dist/workflows/execution.d.ts +49 -0
- package/dist/workflows/execution.d.ts.map +1 -0
- package/dist/workflows/failure.d.ts +28 -0
- package/dist/workflows/failure.d.ts.map +1 -0
- package/dist/workflows/index.d.ts +4 -2
- package/dist/workflows/index.d.ts.map +1 -1
- package/dist/workflows/index.js +63 -35
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/request.d.ts +2 -1
- package/dist/workflows/request.d.ts.map +1 -1
- package/dist/workflows/run-dispatch.d.ts +59 -0
- package/dist/workflows/run-dispatch.d.ts.map +1 -0
- package/dist/workflows/types.d.ts +38 -8
- package/dist/workflows/types.d.ts.map +1 -1
- package/package.json +107 -5
- package/src/actions/commit-edits.ts +0 -3
- package/src/actions/execution.ts +83 -0
- package/src/actions/index.ts +1 -1
- package/src/actions/registry.ts +22 -10
- package/src/actions/request.ts +55 -177
- package/src/actions/run-dispatch.ts +276 -0
- package/src/actions/types/context.ts +2 -4
- package/src/actions/validation.ts +2 -2
- package/src/agents/adapters.ts +8 -12
- package/src/agents/authority.ts +189 -0
- package/src/agents/builders.ts +53 -3
- package/src/agents/dispatch.ts +1 -6
- package/src/agents/errors.ts +24 -0
- package/src/agents/execution.ts +254 -0
- package/src/agents/index.ts +37 -5
- package/src/agents/prompt.ts +17 -5
- package/src/agents/request.ts +153 -13
- package/src/agents/streams.ts +150 -3
- package/src/agents/tool-definition.ts +93 -0
- package/src/agents/types.ts +99 -0
- package/src/agents/validation.ts +289 -5
- package/src/auth/attribution.ts +48 -0
- package/src/auth/index.ts +1 -0
- package/src/auth/runtime.ts +5 -5
- package/src/authorization/decision.ts +75 -14
- package/src/authorization/grant-kinds.ts +9 -0
- package/src/authorization/index.ts +2 -0
- package/src/blob-storage/execution.ts +78 -0
- package/src/blob-storage/validation.ts +2 -10
- package/src/bootstrap/discovery.ts +88 -268
- package/src/bootstrap/index.ts +2 -13
- package/src/broker/in-memory.ts +8 -1
- package/src/broker/types.ts +5 -0
- package/src/connectors/builders.ts +37 -2
- package/src/connectors/connections/authorizations.ts +646 -0
- package/src/connectors/connections/capability.ts +59 -0
- package/src/connectors/connections/command-context.ts +98 -0
- package/src/connectors/connections/contracts.ts +208 -0
- package/src/connectors/connections/credential-codec.ts +48 -0
- package/src/connectors/connections/credential-mutations.ts +574 -0
- package/src/connectors/connections/execution.ts +138 -0
- package/src/connectors/connections/internal.ts +17 -0
- package/src/connectors/connections/provider-operation.ts +41 -0
- package/src/connectors/connections/request.ts +447 -0
- package/src/connectors/connections/runs.ts +702 -0
- package/src/connectors/connections/service.ts +644 -0
- package/src/connectors/connections/storage-boundary.ts +13 -0
- package/src/connectors/connections/tokens.ts +292 -0
- package/src/connectors/connections/validation.ts +316 -0
- package/src/connectors/connections/views.ts +37 -0
- package/src/connectors/credentials.ts +149 -0
- package/src/connectors/errors.ts +111 -3
- package/src/connectors/execution.ts +157 -0
- package/src/connectors/index.ts +26 -2
- package/src/connectors/service.ts +142 -0
- package/src/connectors/types.ts +156 -7
- package/src/datasets/builders.ts +49 -5
- package/src/datasets/changes.ts +13 -0
- package/src/datasets/execution.ts +24 -0
- package/src/datasets/index.ts +3 -0
- package/src/datasets/types.ts +5 -0
- package/src/datasets/validation.ts +53 -11
- package/src/error-reporting/capability.ts +33 -106
- package/src/error-reporting/internal.ts +3 -1
- package/src/error-reporting/reporter.ts +19 -3
- package/src/error-reporting/reports.ts +172 -0
- package/src/error-reporting/types.ts +97 -43
- package/src/errors/catalog.ts +149 -0
- package/src/errors/internal.ts +322 -0
- package/src/errors/types.ts +21 -0
- package/src/events/definitions.ts +0 -4
- package/src/events/execution.ts +45 -0
- package/src/events/index.ts +15 -14
- package/src/events/outbox-dispatcher.ts +53 -18
- package/src/events/{runtime.ts → service.ts} +19 -23
- package/src/events/types/pipelines.ts +4 -1
- package/src/events/types/syncs.ts +3 -0
- package/src/events/types/workflows.ts +4 -2
- package/src/execution/agent.ts +130 -0
- package/src/execution/authorization.ts +409 -0
- package/src/execution/dispatch.ts +7 -0
- package/src/execution/durable.ts +193 -0
- package/src/execution/index.ts +12 -0
- package/src/execution/primitive.ts +50 -0
- package/src/execution/request.ts +109 -0
- package/src/execution/scopes.ts +198 -0
- package/src/execution/types.ts +113 -0
- package/src/http/api-routes.ts +42 -7
- package/src/index.ts +127 -10
- package/src/json.ts +11 -8
- package/src/lake-storage/definition-updates.ts +21 -0
- package/src/lake-storage/in-memory.ts +284 -2
- package/src/lake-storage/index.ts +14 -0
- package/src/lake-storage/merge-validation.ts +117 -0
- package/src/lake-storage/merge.ts +35 -0
- package/src/lake-storage/types.ts +3 -1
- package/src/logging/execution.ts +28 -0
- package/src/logging/index.ts +4 -4
- package/src/logging/{runtime.ts → service.ts} +7 -7
- package/src/materialization/events.ts +1 -0
- package/src/materialization/index.ts +2 -0
- package/src/materialization/model.ts +30 -18
- package/src/materializer/README.md +9 -13
- package/src/materializer/edits/commit.ts +85 -28
- package/src/materializer/edits/load-state.ts +79 -16
- package/src/materializer/edits/operations.ts +72 -36
- package/src/materializer/edits/plan.ts +95 -22
- package/src/materializer/edits/working-state.ts +86 -55
- package/src/materializer/effective/build-events.ts +2 -0
- package/src/materializer/effective/diff.ts +22 -0
- package/src/materializer/effective/load-state.ts +0 -31
- package/src/materializer/effective/resolve.ts +62 -0
- package/src/materializer/execution/commit-lifecycle.ts +9 -1
- package/src/materializer/execution/plan-stream.ts +33 -9
- package/src/materializer/execution/scope.ts +95 -0
- package/src/materializer/execution/work-executor.ts +6 -2
- package/src/materializer/execution/work-records.ts +39 -6
- package/src/materializer/index.ts +9 -1
- package/src/materializer/materializer.ts +67 -5
- package/src/materializer/projections/finish-run.ts +29 -11
- package/src/materializer/projections/replace.ts +55 -22
- package/src/materializer/projections/replacement-plan.ts +37 -7
- package/src/materializer/shared/batching.ts +4 -1
- package/src/materializer/shared/normalize.ts +0 -19
- package/src/materializer/telemetry/append.ts +57 -26
- package/src/materializer/telemetry/plan.ts +15 -6
- package/src/objects/action/request.ts +5 -5
- package/src/objects/context/index.ts +1 -0
- package/src/objects/context/types.ts +6 -0
- package/src/objects/execution.ts +346 -0
- package/src/objects/materializer-adapter.ts +1 -23
- package/src/objects/query/executor.ts +15 -29
- package/src/objects/query/index.ts +1 -2
- package/src/objects/query/planner.ts +0 -6
- package/src/objects/sdk/object-handle.ts +2 -2
- package/src/objects/sdk/object-set.ts +17 -7
- package/src/objects/sdk/runtime-query-executor.ts +9 -2
- package/src/objects/sdk/telemetry-channel.ts +5 -1
- package/src/objects/service/action-service.ts +5 -2
- package/src/objects/service/list-service.ts +1 -1
- package/src/objects/telemetry/history.ts +8 -3
- package/src/objects/telemetry/write-batch.ts +0 -2
- package/src/ontology/index.ts +6 -1
- package/src/ontology/json-schema.ts +2 -1
- package/src/ontology/registry.ts +16 -2
- package/src/ontology/validation/normalize.ts +9 -15
- package/src/pipelines/execution.ts +105 -0
- package/src/pipelines/index.ts +7 -0
- package/src/pipelines/request.ts +32 -26
- package/src/pipelines/run-dispatch.ts +308 -0
- package/src/projections/builders.ts +0 -9
- package/src/projections/capability.ts +37 -0
- package/src/projections/execution.ts +85 -0
- package/src/projections/index.ts +2 -1
- package/src/projections/internal.ts +17 -60
- package/src/projections/ownership.ts +2 -2
- package/src/projections/registry.ts +26 -11
- package/src/projections/revision.ts +7 -5
- package/src/projections/run-dispatch.ts +497 -0
- package/src/projections/run-id.ts +20 -0
- package/src/projections/types.ts +12 -0
- package/src/projections/validation.ts +3 -3
- package/src/queues/in-memory.ts +37 -11
- package/src/queues/index.ts +9 -2
- package/src/queues/types.ts +70 -45
- package/src/rules/execution.ts +49 -0
- package/src/rules/index.ts +0 -1
- package/src/rules/validation.ts +2 -6
- package/src/runtime/ai-usage.ts +17 -0
- package/src/runtime/create.ts +28 -68
- package/src/runtime/definitions.ts +44 -0
- package/src/runtime/host.ts +377 -0
- package/src/runtime/index.ts +5 -13
- package/src/runtime/internal.ts +12 -0
- package/src/runtime/ontology-mutations.ts +5 -3
- package/src/runtime/resolve-definitions.ts +238 -0
- package/src/runtime/sixb.ts +95 -807
- package/src/runtime/types.ts +17 -290
- package/src/scheduler/index.ts +1 -1
- package/src/scheduler/runtime.ts +37 -6
- package/src/schedules/execution.ts +14 -0
- package/src/schedules/types.ts +0 -8
- package/src/security/every.ts +4 -0
- package/src/security/grants.ts +13 -1
- package/src/security/index.ts +3 -1
- package/src/security/registry.ts +107 -0
- package/src/security/types.ts +8 -12
- package/src/security/validation.ts +7 -0
- package/src/storage/action-runs/failure.ts +64 -0
- package/src/storage/action-runs/idempotency.ts +3 -1
- package/src/storage/action-runs/in-memory.ts +39 -9
- package/src/storage/action-runs/index.ts +3 -0
- package/src/storage/action-runs/provider.ts +25 -0
- package/src/storage/action-runs/types.ts +61 -27
- package/src/storage/agents/errors.ts +1 -0
- package/src/storage/agents/in-memory.ts +49 -11
- package/src/storage/agents/index.ts +2 -1
- package/src/storage/agents/provider.ts +27 -0
- package/src/storage/agents/types.ts +19 -19
- package/src/storage/ai-usage/errors.ts +13 -0
- package/src/storage/ai-usage/in-memory.ts +162 -0
- package/src/storage/ai-usage/index.ts +21 -0
- package/src/storage/ai-usage/record.ts +74 -0
- package/src/storage/ai-usage/types.ts +102 -0
- package/src/storage/ai-usage/usage.ts +104 -0
- package/src/storage/auth/types.ts +1 -0
- package/src/storage/connector-connections/errors.ts +24 -0
- package/src/storage/connector-connections/in-memory.ts +1377 -0
- package/src/storage/connector-connections/index.ts +66 -0
- package/src/storage/connector-connections/provider/authorizations.ts +446 -0
- package/src/storage/connector-connections/provider/connections.ts +291 -0
- package/src/storage/connector-connections/provider/runs.ts +369 -0
- package/src/storage/connector-connections/provider/shared.ts +342 -0
- package/src/storage/connector-connections/provider.ts +219 -0
- package/src/storage/connector-connections/types.ts +546 -0
- package/src/storage/executions/errors.ts +21 -0
- package/src/storage/executions/in-memory.ts +75 -0
- package/src/storage/executions/index.ts +16 -0
- package/src/storage/executions/provider.ts +292 -0
- package/src/storage/executions/run-link.ts +70 -0
- package/src/storage/executions/types.ts +49 -0
- package/src/storage/executions/validation.ts +370 -0
- package/src/storage/in-memory/index.ts +50 -16
- package/src/storage/index.ts +155 -15
- package/src/storage/ontology/commits.ts +1 -0
- package/src/storage/ontology/in-memory/index.ts +2 -0
- package/src/storage/ontology/in-memory/materializations-finalization.ts +2 -1
- package/src/storage/ontology/in-memory/materializations-state.ts +10 -0
- package/src/storage/ontology/in-memory/materializations-work.ts +2 -1
- package/src/storage/ontology/in-memory/materializations.ts +131 -9
- package/src/storage/ontology/in-memory/outbox.ts +1 -1
- package/src/storage/ontology/in-memory/shared-state.ts +12 -1
- package/src/storage/ontology/index.ts +6 -0
- package/src/storage/ontology/materializations.ts +50 -4
- package/src/storage/ontology/outbox.ts +13 -2
- package/src/storage/ontology/provider-header-validation.ts +1 -0
- package/src/storage/ontology/provider-work.ts +33 -14
- package/src/storage/ontology/provider.ts +72 -52
- package/src/storage/operation-scope.ts +1 -0
- package/src/storage/pipeline-runs/idempotency.ts +14 -0
- package/src/storage/pipeline-runs/in-memory.ts +88 -8
- package/src/storage/pipeline-runs/index.ts +5 -1
- package/src/storage/pipeline-runs/provider.ts +25 -0
- package/src/storage/pipeline-runs/types.ts +37 -14
- package/src/storage/projection-runs/in-memory.ts +93 -24
- package/src/storage/projection-runs/index.ts +4 -0
- package/src/storage/projection-runs/lifecycle.ts +165 -36
- package/src/storage/projection-runs/provider.ts +34 -0
- package/src/storage/projection-runs/types.ts +34 -11
- package/src/storage/run-listing.ts +22 -13
- package/src/storage/sync-runs/idempotency.ts +18 -0
- package/src/storage/sync-runs/in-memory.ts +92 -9
- package/src/storage/sync-runs/index.ts +5 -1
- package/src/storage/sync-runs/provider.ts +25 -0
- package/src/storage/sync-runs/types.ts +44 -15
- package/src/storage/types.ts +45 -17
- package/src/storage/webhook-runs/errors.ts +14 -0
- package/src/storage/webhook-runs/in-memory.ts +84 -9
- package/src/storage/webhook-runs/index.ts +5 -1
- package/src/storage/webhook-runs/provider.ts +30 -0
- package/src/storage/webhook-runs/types.ts +52 -11
- package/src/storage/workflow-runs/in-memory.ts +91 -55
- package/src/storage/workflow-runs/index.ts +2 -0
- package/src/storage/workflow-runs/provider.ts +70 -0
- package/src/storage/workflow-runs/types.ts +38 -25
- package/src/syncs/builders.ts +33 -15
- package/src/syncs/execution.ts +78 -0
- package/src/syncs/index.ts +14 -0
- package/src/syncs/request.ts +32 -43
- package/src/syncs/run-dispatch.ts +312 -0
- package/src/syncs/sources.ts +20 -0
- package/src/syncs/types.ts +75 -25
- package/src/syncs/validation.ts +77 -0
- package/src/testing/action-execution.ts +61 -0
- package/src/testing/agent-execution.ts +81 -0
- package/src/testing/agent-storage-contract.ts +158 -63
- package/src/testing/ai-usage-storage-contract.ts +528 -0
- package/src/testing/auth-storage-contract.ts +17 -1
- package/src/testing/broker-contract.ts +16 -1
- package/src/testing/connector-connection-storage-contract.ts +1052 -0
- package/src/testing/execution-storage-contract.ts +435 -0
- package/src/testing/execution.ts +48 -0
- package/src/testing/index.ts +56 -0
- package/src/testing/lake-merge-storage-contract.ts +302 -0
- package/src/testing/lake-storage-contract.ts +23 -0
- package/src/testing/materializer-fixture.ts +11 -3
- package/src/testing/materializer-storage-contract.ts +213 -11
- package/src/testing/ontology-contract-fixture.ts +35 -2
- package/src/testing/ontology-storage-contract.ts +75 -14
- package/src/testing/pipeline-execution.ts +64 -0
- package/src/testing/projection-execution.ts +98 -0
- package/src/testing/projection-run-storage-contract.ts +215 -29
- package/src/testing/queues-contract.ts +40 -51
- package/src/testing/sync-execution.ts +61 -0
- package/src/testing/webhook-execution.ts +47 -0
- package/src/testing/webhook-run-storage-contract.ts +240 -0
- package/src/testing/workflow-execution.ts +77 -0
- package/src/webhooks/index.ts +2 -1
- package/src/webhooks/internal.ts +5 -0
- package/src/webhooks/registry.ts +60 -36
- package/src/webhooks/run-admission.ts +172 -0
- package/src/webhooks/types.ts +8 -5
- package/src/workers/queue-delivery.ts +25 -22
- package/src/workers/queue-worker.ts +62 -32
- package/src/workflows/execution.ts +292 -0
- package/src/workflows/failure.ts +63 -0
- package/src/workflows/index.ts +10 -1
- package/src/workflows/request.ts +39 -118
- package/src/workflows/run-dispatch.ts +359 -0
- package/src/workflows/snapshot.ts +1 -10
- package/src/workflows/types.ts +39 -8
- package/dist/actions/runtime.d.ts +0 -11
- package/dist/actions/runtime.d.ts.map +0 -1
- package/dist/agents/runtime.d.ts +0 -41
- package/dist/agents/runtime.d.ts.map +0 -1
- package/dist/chunk-0fygrz37.js +0 -354
- package/dist/chunk-0fygrz37.js.map +0 -17
- package/dist/chunk-0psb6kdw.js +0 -989
- package/dist/chunk-0psb6kdw.js.map +0 -15
- package/dist/chunk-1vffvydj.js.map +0 -10
- package/dist/chunk-2gpr6jsz.js.map +0 -13
- package/dist/chunk-2s6sydsh.js.map +0 -12
- package/dist/chunk-50kv63vj.js.map +0 -12
- package/dist/chunk-590dejbp.js +0 -49
- package/dist/chunk-590dejbp.js.map +0 -10
- package/dist/chunk-867jxh7c.js.map +0 -19
- package/dist/chunk-aebzcsxr.js.map +0 -48
- package/dist/chunk-btpe64e4.js +0 -554
- package/dist/chunk-btpe64e4.js.map +0 -13
- package/dist/chunk-dcgrzj1t.js.map +0 -36
- package/dist/chunk-dhmj53mx.js.map +0 -16
- package/dist/chunk-hsv43v58.js +0 -1390
- package/dist/chunk-hsv43v58.js.map +0 -21
- package/dist/chunk-jdwx7vzs.js.map +0 -14
- package/dist/chunk-k25jm1x5.js +0 -102
- package/dist/chunk-k25jm1x5.js.map +0 -10
- package/dist/chunk-k41ajtz7.js +0 -352
- package/dist/chunk-k41ajtz7.js.map +0 -13
- package/dist/chunk-k6j72mtt.js +0 -9
- package/dist/chunk-k6j72mtt.js.map +0 -10
- package/dist/chunk-nvamz5dv.js +0 -819
- package/dist/chunk-nvamz5dv.js.map +0 -21
- package/dist/chunk-pv1yad91.js +0 -1165
- package/dist/chunk-pv1yad91.js.map +0 -27
- package/dist/chunk-q4qzq0ea.js.map +0 -14
- package/dist/chunk-r65yscvk.js.map +0 -11
- package/dist/chunk-t358gywy.js.map +0 -34
- package/dist/chunk-t72dvahb.js.map +0 -12
- package/dist/chunk-v5c085yp.js.map +0 -10
- package/dist/chunk-wj01s5hr.js.map +0 -11
- package/dist/chunk-wxhdnwh4.js +0 -37
- package/dist/chunk-wxhdnwh4.js.map +0 -10
- package/dist/chunk-xz5g49bp.js.map +0 -11
- package/dist/chunk-ya6brh8a.js.map +0 -11
- package/dist/chunk-yvef9xwc.js.map +0 -44
- package/dist/chunk-yxss87qa.js.map +0 -14
- package/dist/connectors/runtime.d.ts +0 -13
- package/dist/connectors/runtime.d.ts.map +0 -1
- package/dist/events/runtime.d.ts.map +0 -1
- package/dist/objects/contexts.d.ts +0 -45
- package/dist/objects/contexts.d.ts.map +0 -1
- package/dist/objects/helpers.d.ts +0 -7
- package/dist/objects/helpers.d.ts.map +0 -1
- package/dist/runtime/scoped.d.ts +0 -158
- package/dist/runtime/scoped.d.ts.map +0 -1
- package/dist/security/runtime.d.ts +0 -16
- package/dist/security/runtime.d.ts.map +0 -1
- package/dist/storage/webhook-deliveries/in-memory.d.ts +0 -18
- package/dist/storage/webhook-deliveries/in-memory.d.ts.map +0 -1
- package/dist/storage/webhook-deliveries/index.d.ts +0 -3
- package/dist/storage/webhook-deliveries/index.d.ts.map +0 -1
- package/dist/storage/webhook-deliveries/types.d.ts +0 -43
- package/dist/storage/webhook-deliveries/types.d.ts.map +0 -1
- package/dist/workflows/runtime.d.ts +0 -33
- package/dist/workflows/runtime.d.ts.map +0 -1
- package/src/actions/runtime.ts +0 -31
- package/src/agents/runtime.ts +0 -124
- package/src/connectors/runtime.ts +0 -100
- package/src/objects/contexts.ts +0 -64
- package/src/objects/helpers.ts +0 -18
- package/src/runtime/scoped.ts +0 -436
- package/src/security/runtime.ts +0 -101
- package/src/storage/webhook-deliveries/in-memory.ts +0 -108
- package/src/storage/webhook-deliveries/index.ts +0 -9
- package/src/storage/webhook-deliveries/types.ts +0 -41
- package/src/workflows/runtime.ts +0 -68
- /package/dist/{chunk-45tw90k7.js.map → chunk-4gz41why.js.map} +0 -0
- /package/dist/{chunk-vj723r3p.js.map → chunk-8b55ygje.js.map} +0 -0
- /package/dist/{chunk-p6r5g77m.js.map → chunk-vybf6pkp.js.map} +0 -0
- /package/dist/{chunk-5yny9z0e.js.map → chunk-z3zp0bj1.js.map} +0 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import type { ConnectorConnectionRunFailure, ConnectorConnectionRunKind } from "../../storage/connector-connections/types";
|
|
2
|
+
import type { CreateExecutionInput } from "../../storage/executions/types";
|
|
3
|
+
import type { ConnectorAccountCandidate, ConnectorConnectionMetadata, ConnectorConnectionSelector } from "../types";
|
|
4
|
+
/** Durable, already-authorized request provenance carried into the process-owned OAuth service. */
|
|
5
|
+
export interface ConnectorConnectionCommandContext {
|
|
6
|
+
readonly execution: CreateExecutionInput;
|
|
7
|
+
}
|
|
8
|
+
export interface StartConnectorAuthorizationInput extends ConnectorConnectionSelector {
|
|
9
|
+
readonly redirectUri: string;
|
|
10
|
+
readonly reauthorizationId?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface StartConnectorAuthorizationResult {
|
|
13
|
+
readonly authorizationUrl: string;
|
|
14
|
+
readonly affectedConnections: readonly ConnectorConnectionView[];
|
|
15
|
+
}
|
|
16
|
+
export interface StartConnectorConnectionRunInput extends ConnectorConnectionSelector {
|
|
17
|
+
readonly redirectUri: string;
|
|
18
|
+
readonly returnTo: string;
|
|
19
|
+
readonly reauthorizationId?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface StartConnectorConnectionRunResult {
|
|
22
|
+
readonly runId: string;
|
|
23
|
+
readonly authorizationUrl: string;
|
|
24
|
+
readonly affectedConnections: readonly ConnectorConnectionView[];
|
|
25
|
+
/** One-shot browser proof set as an HttpOnly callback cookie by the HTTP boundary. */
|
|
26
|
+
readonly callbackBinding: {
|
|
27
|
+
readonly attemptId: string;
|
|
28
|
+
readonly secret: string;
|
|
29
|
+
readonly expiresAt: Date;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface CompleteConnectorAuthorizationInput {
|
|
33
|
+
readonly state: string;
|
|
34
|
+
readonly code: string;
|
|
35
|
+
readonly redirectUri: string;
|
|
36
|
+
}
|
|
37
|
+
export type CompleteConnectorConnectionRunInput = {
|
|
38
|
+
readonly state: string;
|
|
39
|
+
readonly code: string;
|
|
40
|
+
readonly redirectUri: string;
|
|
41
|
+
readonly callbackBinding: string;
|
|
42
|
+
} | {
|
|
43
|
+
readonly state: string;
|
|
44
|
+
readonly error: string;
|
|
45
|
+
readonly redirectUri: string;
|
|
46
|
+
readonly callbackBinding: string;
|
|
47
|
+
};
|
|
48
|
+
export interface CompleteConnectorConnectionRunResult {
|
|
49
|
+
readonly runId: string;
|
|
50
|
+
readonly connectorId: string;
|
|
51
|
+
readonly returnTo: string;
|
|
52
|
+
}
|
|
53
|
+
/** Internal selection result. The HTTP boundary maps it to a secret-free representation. */
|
|
54
|
+
export interface CompleteConnectorAuthorizationResult extends ConnectorConnectionSelector {
|
|
55
|
+
readonly authorizationId: string;
|
|
56
|
+
readonly accounts: readonly ConnectorAccountCandidate[];
|
|
57
|
+
}
|
|
58
|
+
export interface SelectConnectorAccountInput extends ConnectorConnectionSelector {
|
|
59
|
+
readonly authorizationId: string;
|
|
60
|
+
readonly accountId: string;
|
|
61
|
+
readonly replace?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface SelectConnectorConnectionRunAccountInput {
|
|
64
|
+
readonly runId: string;
|
|
65
|
+
readonly accountId: string;
|
|
66
|
+
readonly replace?: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface AddConnectorConnectionInput extends ConnectorConnectionSelector {
|
|
69
|
+
readonly fromConnectionId: string;
|
|
70
|
+
}
|
|
71
|
+
export interface ConnectorConnectionView extends ConnectorConnectionMetadata {
|
|
72
|
+
readonly status: "connected" | "needs_reauthorization" | "disconnected";
|
|
73
|
+
}
|
|
74
|
+
interface ConnectorConnectionRunViewBase extends ConnectorConnectionSelector {
|
|
75
|
+
readonly id: string;
|
|
76
|
+
readonly connectorId: string;
|
|
77
|
+
readonly kind: ConnectorConnectionRunKind;
|
|
78
|
+
readonly createdAt: Date;
|
|
79
|
+
readonly updatedAt: Date;
|
|
80
|
+
}
|
|
81
|
+
export type ConnectorConnectionRunView = (ConnectorConnectionRunViewBase & {
|
|
82
|
+
readonly status: "waiting";
|
|
83
|
+
readonly waitingFor: "provider_authorization";
|
|
84
|
+
readonly expiresAt: Date;
|
|
85
|
+
}) | (ConnectorConnectionRunViewBase & {
|
|
86
|
+
readonly status: "running";
|
|
87
|
+
}) | (ConnectorConnectionRunViewBase & {
|
|
88
|
+
readonly status: "waiting";
|
|
89
|
+
readonly waitingFor: "account_selection";
|
|
90
|
+
readonly accounts: readonly ConnectorAccountCandidate[];
|
|
91
|
+
readonly expiresAt: Date;
|
|
92
|
+
}) | (ConnectorConnectionRunViewBase & {
|
|
93
|
+
readonly status: "succeeded";
|
|
94
|
+
readonly connections: readonly ConnectorConnectionView[];
|
|
95
|
+
readonly finishedAt: Date;
|
|
96
|
+
}) | (ConnectorConnectionRunViewBase & {
|
|
97
|
+
readonly status: "failed";
|
|
98
|
+
readonly error: ConnectorConnectionRunFailure;
|
|
99
|
+
readonly finishedAt: Date;
|
|
100
|
+
}) | (ConnectorConnectionRunViewBase & {
|
|
101
|
+
readonly status: "cancelled" | "expired";
|
|
102
|
+
readonly finishedAt: Date;
|
|
103
|
+
});
|
|
104
|
+
export interface RevokeConnectorAuthorizationResult {
|
|
105
|
+
readonly affectedConnections: readonly ConnectorConnectionView[];
|
|
106
|
+
}
|
|
107
|
+
export interface ConnectorConnectionCallbackProcess {
|
|
108
|
+
completeConnectionRun(input: CompleteConnectorConnectionRunInput): Promise<CompleteConnectorConnectionRunResult>;
|
|
109
|
+
}
|
|
110
|
+
/** Process-owned OAuth lifecycle port. Connector definitions are resolved behind this boundary. */
|
|
111
|
+
export interface ConnectorConnectionProcess {
|
|
112
|
+
readonly callbackProcess: ConnectorConnectionCallbackProcess;
|
|
113
|
+
listConnections(context: ConnectorConnectionCommandContext, connectorId: string): Promise<readonly ConnectorConnectionView[]>;
|
|
114
|
+
startConnectionRun(context: ConnectorConnectionCommandContext, connectorId: string, input: StartConnectorConnectionRunInput): Promise<StartConnectorConnectionRunResult>;
|
|
115
|
+
addConnection(context: ConnectorConnectionCommandContext, connectorId: string, input: AddConnectorConnectionInput): Promise<ConnectorConnectionRunView>;
|
|
116
|
+
getConnectionRun(context: ConnectorConnectionCommandContext, connectorId: string, runId: string): Promise<ConnectorConnectionRunView | null>;
|
|
117
|
+
selectConnectionRunAccount(context: ConnectorConnectionCommandContext, connectorId: string, input: SelectConnectorConnectionRunAccountInput): Promise<ConnectorConnectionRunView>;
|
|
118
|
+
startReauthorization(context: ConnectorConnectionCommandContext, connectorId: string, connectionId: string, input: Pick<StartConnectorConnectionRunInput, "redirectUri" | "returnTo">): Promise<StartConnectorConnectionRunResult>;
|
|
119
|
+
revokeConnection(context: ConnectorConnectionCommandContext, connectorId: string, connectionId: string): Promise<RevokeConnectorAuthorizationResult>;
|
|
120
|
+
startAuthorization(context: ConnectorConnectionCommandContext, connectorId: string, input: StartConnectorAuthorizationInput): Promise<StartConnectorAuthorizationResult>;
|
|
121
|
+
completeAuthorization(context: ConnectorConnectionCommandContext, connectorId: string, input: CompleteConnectorAuthorizationInput): Promise<CompleteConnectorAuthorizationResult>;
|
|
122
|
+
selectAccount(context: ConnectorConnectionCommandContext, connectorId: string, input: SelectConnectorAccountInput): Promise<ConnectorConnectionView>;
|
|
123
|
+
disconnect(context: ConnectorConnectionCommandContext, connectorId: string, connectionId: string): Promise<ConnectorConnectionView | null>;
|
|
124
|
+
revokeAuthorization(context: ConnectorConnectionCommandContext, connectorId: string, authorizationId: string): Promise<RevokeConnectorAuthorizationResult>;
|
|
125
|
+
}
|
|
126
|
+
export {};
|
|
127
|
+
//# sourceMappingURL=contracts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../../src/connectors/connections/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,0BAA0B,EAC3B,MAAM,2CAA2C,CAAA;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAA;AAC1E,OAAO,KAAK,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC5B,MAAM,UAAU,CAAA;AAEjB,mGAAmG;AACnG,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAA;CACzC;AAED,MAAM,WAAW,gCAAiC,SAAQ,2BAA2B;IACnF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CACpC;AAED,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,mBAAmB,EAAE,SAAS,uBAAuB,EAAE,CAAA;CACjE;AAED,MAAM,WAAW,gCAAiC,SAAQ,2BAA2B;IACnF,QAAQ,CAAC,WA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,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAA;IAC1C,mBAAmB,CACjB,OAAO,EAAE,iCAAiC,EAC1C,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,kCAAkC,CAAC,CAAA;CAC/C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ConnectorCredentialProtector, SealedConnectorCredential } from "../credentials";
|
|
2
|
+
import type { ConnectorOAuthCredentials } from "../types";
|
|
3
|
+
export interface ConnectorCredentialCodecOptions {
|
|
4
|
+
readonly projectId: string;
|
|
5
|
+
readonly protector: ConnectorCredentialProtector;
|
|
6
|
+
}
|
|
7
|
+
/** Authenticated serialization boundary for one project's OAuth credential envelopes. */
|
|
8
|
+
export declare class ConnectorCredentialCodec {
|
|
9
|
+
private readonly options;
|
|
10
|
+
constructor(options: ConnectorCredentialCodecOptions);
|
|
11
|
+
seal(connectorId: string, authorizationId: string, credentials: ConnectorOAuthCredentials): Promise<SealedConnectorCredential>;
|
|
12
|
+
open(connectorId: string, authorizationId: string, credentials: SealedConnectorCredential): Promise<ConnectorOAuthCredentials>;
|
|
13
|
+
private context;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=credential-codec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-codec.d.ts","sourceRoot":"","sources":["../../../src/connectors/connections/credential-codec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAA;AAC7F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAA;AAMzD,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,SAAS,EAAE,4BAA4B,CAAA;CACjD;AAED,yFAAyF;AACzF,qBAAa,wBAAwB;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,+BAA+B;IAErE,IAAI,CACF,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,yBAAyB,GACrC,OAAO,CAAC,yBAAyB,CAAC;IAO/B,IAAI,CACR,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,yBAAyB,GACrC,OAAO,CAAC,yBAAyB,CAAC;IAQrC,OAAO,CAAC,OAAO;CAQhB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ClaimConnectorCredentialMutationResult, ConnectorAuthorizationRecord, ConnectorConnectionStorage, ConnectorCredentialMutationKind, ConnectorStagedCredentials } from "../../storage";
|
|
2
|
+
import type { SealedConnectorCredential } from "../credentials";
|
|
3
|
+
import { createConnectorCodedError } from "../errors";
|
|
4
|
+
import type { ConnectorAccountCandidate } from "../types";
|
|
5
|
+
export type ConnectorCredentialMutationClaimOutcome = {
|
|
6
|
+
readonly type: "claimed";
|
|
7
|
+
readonly claim: ClaimConnectorCredentialMutationResult;
|
|
8
|
+
} | {
|
|
9
|
+
readonly type: "superseded";
|
|
10
|
+
readonly authorization: ConnectorAuthorizationRecord;
|
|
11
|
+
};
|
|
12
|
+
export interface ConnectorCredentialMutationCoordinatorOptions {
|
|
13
|
+
readonly projectId: string;
|
|
14
|
+
readonly storage: ConnectorConnectionStorage;
|
|
15
|
+
readonly leaseDurationMs: number;
|
|
16
|
+
readonly operationTimeoutMs: number;
|
|
17
|
+
/** Returns the current host signal; the host may replace its controller after closing. */
|
|
18
|
+
readonly hostSignal: () => AbortSignal;
|
|
19
|
+
readonly discoverReauthorizationAccounts: (authorization: ConnectorAuthorizationRecord, staged: ConnectorStagedCredentials) => Promise<readonly ConnectorAccountCandidate[]>;
|
|
20
|
+
/** Injectable for deterministic tests. A unique value is generated in normal operation. */
|
|
21
|
+
readonly holderId?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface StageConnectorCredentialMutationInput {
|
|
24
|
+
readonly credentials: SealedConnectorCredential;
|
|
25
|
+
readonly credentialExpiresAt?: Date;
|
|
26
|
+
readonly scopes: readonly string[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Coordinates every provider-side OAuth credential mutation.
|
|
30
|
+
*
|
|
31
|
+
* Storage owns the durable fence and deadline. This coordinator owns process-local serialization,
|
|
32
|
+
* lease renewal, provider deadlines, ambiguous-outcome handling, and staged-result finalization.
|
|
33
|
+
*/
|
|
34
|
+
export declare class ConnectorCredentialMutationCoordinator {
|
|
35
|
+
private readonly projectId;
|
|
36
|
+
private readonly storage;
|
|
37
|
+
private readonly leaseDurationMs;
|
|
38
|
+
private readonly operationTimeoutMs;
|
|
39
|
+
private readonly hostSignal;
|
|
40
|
+
private readonly discoverReauthorizationAccounts;
|
|
41
|
+
private readonly holderId;
|
|
42
|
+
private readonly localMutationTails;
|
|
43
|
+
constructor(options: ConnectorCredentialMutationCoordinatorOptions);
|
|
44
|
+
claimCredentialMutation(connectorId: string, initial: ConnectorAuthorizationRecord, kind: ConnectorCredentialMutationKind, expectedConnectionIds?: readonly string[]): Promise<ConnectorCredentialMutationClaimOutcome>;
|
|
45
|
+
prepareAuthorizationForMutation(connectorId: string, initial: ConnectorAuthorizationRecord, requestedKind: ConnectorCredentialMutationKind): Promise<ConnectorAuthorizationRecord>;
|
|
46
|
+
recoverExpiredCredentialMutation(connectorId: string, authorizationId: string): Promise<ConnectorAuthorizationRecord | null>;
|
|
47
|
+
executeCredentialMutation<T>(authorization: ConnectorAuthorizationRecord, run: (executing: ConnectorAuthorizationRecord, signal: AbortSignal) => Promise<T>): Promise<T>;
|
|
48
|
+
stageCredentialMutationCredentials(executing: ConnectorAuthorizationRecord, signal: AbortSignal, input: StageConnectorCredentialMutationInput): Promise<ConnectorAuthorizationRecord>;
|
|
49
|
+
stageCredentialMutationRevocation(executing: ConnectorAuthorizationRecord, signal: AbortSignal): Promise<ConnectorAuthorizationRecord>;
|
|
50
|
+
withBoundedProviderSignal<T>(run: (signal: AbortSignal) => Promise<T> | T, interruptionError?: () => Error): Promise<T>;
|
|
51
|
+
finalizeStagedMutation(authorization: ConnectorAuthorizationRecord): Promise<ConnectorAuthorizationRecord>;
|
|
52
|
+
markNeedsReauthorization(authorization: ConnectorAuthorizationRecord): Promise<ConnectorAuthorizationRecord | null>;
|
|
53
|
+
releaseCredentialMutation(authorization: ConnectorAuthorizationRecord): Promise<boolean>;
|
|
54
|
+
requireStableActiveAuthorization(connectorId: string, authorizationId: string): Promise<ConnectorAuthorizationRecord>;
|
|
55
|
+
assertAttachedConnections(connectorId: string, authorizationId: string, expectedConnectionIds: readonly string[]): Promise<void>;
|
|
56
|
+
runLocallySerialized<T>(authorizationId: string, run: () => Promise<T>): Promise<T>;
|
|
57
|
+
isStagedMutation(authorization: ConnectorAuthorizationRecord, claimed: ConnectorAuthorizationRecord, kind: ConnectorCredentialMutationKind): boolean;
|
|
58
|
+
private withCredentialMutationSignal;
|
|
59
|
+
private requireAuthorization;
|
|
60
|
+
}
|
|
61
|
+
export declare function assertCredentialMutationOperationActive(signal: AbortSignal): void;
|
|
62
|
+
export declare function connectorAuthorizationStatusError(status: ConnectorAuthorizationRecord["status"]): ReturnType<typeof createConnectorCodedError>;
|
|
63
|
+
//# sourceMappingURL=credential-mutations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-mutations.d.ts","sourceRoot":"","sources":["../../../src/connectors/connections/credential-mutations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sCAAsC,EACtC,4BAA4B,EAC5B,0BAA0B,EAC1B,+BAA+B,EAC/B,0BAA0B,EAC3B,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAA;AAC/D,OAAO,EAEL,yBAAyB,EAK1B,MAAM,WAAW,CAAA;AAClB,OAAO,KAAK,EAAE,yBA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Aa,EAAE,4BAA4B,GAC1C,OAAO,CAAC,4BAA4B,GAAG,IAAI,CAAC;IAQzC,yBAAyB,CAAC,aAAa,EAAE,4BAA4B,GAAG,OAAO,CAAC,OAAO,CAAC;IAYxF,gCAAgC,CACpC,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,4BAA4B,CAAC;IA4BlC,yBAAyB,CAC7B,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,EACvB,qBAAqB,EAAE,SAAS,MAAM,EAAE,GACvC,OAAO,CAAC,IAAI,CAAC;IAoBV,oBAAoB,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAiBzF,gBAAgB,CACd,aAAa,EAAE,4BAA4B,EAC3C,OAAO,EAAE,4BAA4B,EACrC,IAAI,EAAE,+BAA+B,GACpC,OAAO;YAUI,4BAA4B;YAkD5B,oBAAoB;CAqBnC;AAED,wBAAgB,uCAAuC,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAEjF;AAED,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,4BAA4B,CAAC,QAAQ,CAAC,GAC7C,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAuB9C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ExecutionContext } from "../../execution/types";
|
|
2
|
+
import type { SixbRuntimeContext } from "../../runtime/types";
|
|
3
|
+
import type { AddConnectorConnectionInput, CompleteConnectorAuthorizationInput, CompleteConnectorAuthorizationResult, ConnectorConnectionProcess, ConnectorConnectionRunView, ConnectorConnectionView, RevokeConnectorAuthorizationResult, SelectConnectorAccountInput, SelectConnectorConnectionRunAccountInput, StartConnectorAuthorizationInput, StartConnectorAuthorizationResult, StartConnectorConnectionRunInput, StartConnectorConnectionRunResult } from "./contracts";
|
|
4
|
+
/** Internal connector-connection lifecycle API bound to one authenticated request execution. */
|
|
5
|
+
export interface ConnectorConnectionsRuntime {
|
|
6
|
+
listConnections(connectorId: string): Promise<readonly ConnectorConnectionView[]>;
|
|
7
|
+
startConnectionRun(connectorId: string, input: StartConnectorConnectionRunInput): Promise<StartConnectorConnectionRunResult>;
|
|
8
|
+
addConnection(connectorId: string, input: AddConnectorConnectionInput): Promise<ConnectorConnectionRunView>;
|
|
9
|
+
getConnectionRun(connectorId: string, runId: string): Promise<ConnectorConnectionRunView | null>;
|
|
10
|
+
selectConnectionRunAccount(connectorId: string, input: SelectConnectorConnectionRunAccountInput): Promise<ConnectorConnectionRunView>;
|
|
11
|
+
startReauthorization(connectorId: string, connectionId: string, input: Pick<StartConnectorConnectionRunInput, "redirectUri" | "returnTo">): Promise<StartConnectorConnectionRunResult>;
|
|
12
|
+
revokeConnection(connectorId: string, connectionId: string): Promise<RevokeConnectorAuthorizationResult>;
|
|
13
|
+
startAuthorization(connectorId: string, input: StartConnectorAuthorizationInput): Promise<StartConnectorAuthorizationResult>;
|
|
14
|
+
completeAuthorization(connectorId: string, input: CompleteConnectorAuthorizationInput): Promise<CompleteConnectorAuthorizationResult>;
|
|
15
|
+
selectAccount(connectorId: string, input: SelectConnectorAccountInput): Promise<ConnectorConnectionView>;
|
|
16
|
+
disconnect(connectorId: string, connectionId: string): Promise<ConnectorConnectionView | null>;
|
|
17
|
+
revokeAuthorization(connectorId: string, authorizationId: string): Promise<RevokeConnectorAuthorizationResult>;
|
|
18
|
+
}
|
|
19
|
+
export declare function createConnectorConnectionsRuntime(runtime: SixbRuntimeContext, execution: ExecutionContext, process: ConnectorConnectionProcess): ConnectorConnectionsRuntime;
|
|
20
|
+
//# sourceMappingURL=execution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../../src/connectors/connections/execution.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D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,CACnB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,mCAAmC,GACzC,OAAO,CAAC,oCAAoC,CAAC,CAAA;IAChD,aAAa,CACX,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,2BAA2B,GACjC,OAAO,CAAC,uBAAuB,CAAC,CAAA;IACnC,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAA;IAC9F,mBAAmB,CACjB,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,kCAAkC,CAAC,CAAA;CAC/C;AAED,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,0BAA0B,GAClC,2BAA2B,CA6B7B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { isOAuthConnectorDefinition } from "../types";
|
|
2
|
+
export { getConnectorConnectionCallbackProcess, getConnectorConnectionsRuntime, } from "./capability";
|
|
3
|
+
export type { AddConnectorConnectionInput, CompleteConnectorConnectionRunInput, CompleteConnectorConnectionRunResult, ConnectorConnectionRunView, ConnectorConnectionView, RevokeConnectorAuthorizationResult, SelectConnectorConnectionRunAccountInput, StartConnectorConnectionRunInput, StartConnectorConnectionRunResult, } from "./contracts";
|
|
4
|
+
export type { ConnectorConnectionsRuntime } from "./execution";
|
|
5
|
+
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/connectors/connections/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AACrD,OAAO,EACL,qCAAqC,EACrC,8BAA8B,GAC/B,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,2BAA2B,EAC3B,mCAAmC,EACnC,oCAAoC,EACpC,0BAA0B,EAC1B,uBAAuB,EACvB,kCAAkC,EAClC,wCAAwC,EACxC,gCAAgC,EAChC,iCAAiC,GAClC,MAAM,aAAa,CAAA;AACpB,YAAY,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
isOAuthConnectorDefinition
|
|
4
|
+
} from "../../chunk-8m5ejdpn.js";
|
|
5
|
+
import {
|
|
6
|
+
getConnectorConnectionCallbackProcess,
|
|
7
|
+
getConnectorConnectionsRuntime
|
|
8
|
+
} from "../../chunk-nf4r78r4.js";
|
|
9
|
+
import"../../chunk-y64skrwp.js";
|
|
10
|
+
export {
|
|
11
|
+
isOAuthConnectorDefinition,
|
|
12
|
+
getConnectorConnectionsRuntime,
|
|
13
|
+
getConnectorConnectionCallbackProcess
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//# debugId=EA5CF4070494D18664756E2164756E21
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface BoundedConnectorProviderOperationOptions {
|
|
2
|
+
readonly hostSignal: AbortSignal;
|
|
3
|
+
readonly timeoutMs: number;
|
|
4
|
+
}
|
|
5
|
+
/** Bound one provider call to both the current host lifetime and an explicit deadline. */
|
|
6
|
+
export declare function runBoundedConnectorProviderOperation<T>(options: BoundedConnectorProviderOperationOptions, run: (signal: AbortSignal) => Promise<T> | T, interruptionError?: () => Error): Promise<T>;
|
|
7
|
+
//# sourceMappingURL=provider-operation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-operation.d.ts","sourceRoot":"","sources":["../../../src/connectors/connections/provider-operation.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,wCAAwC;IACvD,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAA;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B;AAED,0FAA0F;AAC1F,wBAAsB,oCAAoC,CAAC,CAAC,EAC1D,OAAO,EAAE,wCAAwC,EACjD,GAAG,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAC5C,iBAAiB,GAAE,MAAM,KAA6C,GACrE,OAAO,CAAC,CAAC,CAAC,CAwBZ"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { AuthorizablePrincipal } from "../../execution";
|
|
2
|
+
import type { ConnectorAuthorizationAttemptRecord, ConnectorAuthorizationRecord, ConnectorConnectionRecord, CreateConnectorAuthorizationAttemptInput, Storage } from "../../storage";
|
|
3
|
+
import type { ConnectorCredentialProtector } from "../credentials";
|
|
4
|
+
import type { ConnectorDefinition, OAuthConnectorAdapter } from "../types";
|
|
5
|
+
import { type ConnectorConnectionCommandActor } from "./command-context";
|
|
6
|
+
import type { CompleteConnectorAuthorizationInput, CompleteConnectorAuthorizationResult, ConnectorConnectionCommandContext, ConnectorConnectionView, StartConnectorAuthorizationInput, StartConnectorAuthorizationResult } from "./contracts";
|
|
7
|
+
type OAuthConnectorDefinition = ConnectorDefinition<string, OAuthConnectorAdapter>;
|
|
8
|
+
export type ResolveOAuthConnectorDefinition = (connectorId: string) => OAuthConnectorDefinition;
|
|
9
|
+
export interface PrepareConnectorReauthorizationInput {
|
|
10
|
+
readonly definition: OAuthConnectorDefinition;
|
|
11
|
+
readonly authorizationId: string;
|
|
12
|
+
readonly principal: AuthorizablePrincipal;
|
|
13
|
+
}
|
|
14
|
+
export interface PreparedConnectorReauthorization {
|
|
15
|
+
readonly authorization: ConnectorAuthorizationRecord;
|
|
16
|
+
readonly connections: readonly ConnectorConnectionRecord[];
|
|
17
|
+
}
|
|
18
|
+
export interface CompleteNewConnectorAuthorizationInput {
|
|
19
|
+
readonly definition: OAuthConnectorDefinition;
|
|
20
|
+
readonly principal: AuthorizablePrincipal;
|
|
21
|
+
readonly code: string;
|
|
22
|
+
readonly codeVerifier: string;
|
|
23
|
+
readonly redirectUri: string;
|
|
24
|
+
/** Called immediately after the encrypted grant is durable, before account discovery. */
|
|
25
|
+
readonly onAuthorizationPersisted?: (authorization: ConnectorAuthorizationRecord) => Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
export interface CompleteConnectorReauthorizationInput extends CompleteNewConnectorAuthorizationInput {
|
|
28
|
+
readonly authorizationId: string;
|
|
29
|
+
readonly expectedRevision: number;
|
|
30
|
+
readonly expectedConnectionIds: readonly string[];
|
|
31
|
+
}
|
|
32
|
+
/** Grant lifecycle required after an OAuth request has proved its state and initiating actor. */
|
|
33
|
+
export interface ConnectorAuthorizationLifecycle {
|
|
34
|
+
prepareReauthorization(input: PrepareConnectorReauthorizationInput): Promise<PreparedConnectorReauthorization>;
|
|
35
|
+
completeNewAuthorization(input: CompleteNewConnectorAuthorizationInput): Promise<ConnectorAuthorizationRecord>;
|
|
36
|
+
completeReauthorization(input: CompleteConnectorReauthorizationInput): Promise<ConnectorAuthorizationRecord>;
|
|
37
|
+
}
|
|
38
|
+
export interface ConnectorAuthorizationRequestHandlerOptions {
|
|
39
|
+
readonly projectId: string;
|
|
40
|
+
readonly storage: Storage;
|
|
41
|
+
readonly credentialProtector: ConnectorCredentialProtector;
|
|
42
|
+
readonly authorizationAttemptTtlMs: number;
|
|
43
|
+
readonly providerOperationTimeoutMs: number;
|
|
44
|
+
readonly resolveDefinition: ResolveOAuthConnectorDefinition;
|
|
45
|
+
readonly lifecycle: ConnectorAuthorizationLifecycle;
|
|
46
|
+
/** Returns the current host signal; the host may replace its controller after closing. */
|
|
47
|
+
readonly hostSignal: () => AbortSignal;
|
|
48
|
+
}
|
|
49
|
+
export interface PreparedConnectorAuthorizationRequest {
|
|
50
|
+
readonly definition: OAuthConnectorDefinition;
|
|
51
|
+
readonly actor: ConnectorConnectionCommandActor;
|
|
52
|
+
readonly state: string;
|
|
53
|
+
readonly authorizationUrl: string;
|
|
54
|
+
readonly attempt: CreateConnectorAuthorizationAttemptInput;
|
|
55
|
+
readonly affectedConnections: readonly ConnectorConnectionView[];
|
|
56
|
+
}
|
|
57
|
+
/** Owns OAuth request state, PKCE, callback binding, and durable attempt provenance. */
|
|
58
|
+
export declare class ConnectorAuthorizationRequestHandler {
|
|
59
|
+
private readonly projectId;
|
|
60
|
+
private readonly storage;
|
|
61
|
+
private readonly credentialProtector;
|
|
62
|
+
private readonly authorizationAttemptTtlMs;
|
|
63
|
+
private readonly providerOperationTimeoutMs;
|
|
64
|
+
private readonly resolveDefinition;
|
|
65
|
+
private readonly lifecycle;
|
|
66
|
+
private readonly hostSignal;
|
|
67
|
+
constructor(options: ConnectorAuthorizationRequestHandlerOptions);
|
|
68
|
+
startAuthorization(command: ConnectorConnectionCommandContext, connectorId: string, input: StartConnectorAuthorizationInput): Promise<StartConnectorAuthorizationResult>;
|
|
69
|
+
prepareAuthorizationRequest(command: ConnectorConnectionCommandContext, connectorId: string, input: StartConnectorAuthorizationInput): Promise<PreparedConnectorAuthorizationRequest>;
|
|
70
|
+
completeAuthorization(command: ConnectorConnectionCommandContext, connectorId: string, input: CompleteConnectorAuthorizationInput): Promise<CompleteConnectorAuthorizationResult>;
|
|
71
|
+
completeAuthorizationAttempt(input: {
|
|
72
|
+
readonly definition: OAuthConnectorDefinition;
|
|
73
|
+
readonly attempt: ConnectorAuthorizationAttemptRecord;
|
|
74
|
+
readonly principal: AuthorizablePrincipal;
|
|
75
|
+
readonly code: string;
|
|
76
|
+
readonly redirectUri: string;
|
|
77
|
+
readonly onAuthorizationPersisted?: (authorization: ConnectorAuthorizationRecord) => Promise<void>;
|
|
78
|
+
}): Promise<ConnectorAuthorizationRecord>;
|
|
79
|
+
private prepareReauthorization;
|
|
80
|
+
private consumeAuthorizationAttempt;
|
|
81
|
+
private completeGrant;
|
|
82
|
+
}
|
|
83
|
+
export {};
|
|
84
|
+
//# sourceMappingURL=request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/connectors/connections/request.ts"],"names":[],"mapp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xC,OAAO,CAAC,IAAI,CAAC,CAAA;KACnB,GAAG,OAAO,CAAC,4BAA4B,CAAC;YAa3B,sBAAsB;YA6BtB,2BAA2B;IA0DzC,OAAO,CAAC,aAAa;CA0CtB"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type Storage } from "../../storage";
|
|
2
|
+
import { type DefaultConnectorAuthorizationLifecycle } from "./authorizations";
|
|
3
|
+
import type { CompleteConnectorConnectionRunInput, CompleteConnectorConnectionRunResult, ConnectorConnectionCommandContext, ConnectorConnectionRunView, SelectConnectorConnectionRunAccountInput, StartConnectorConnectionRunInput, StartConnectorConnectionRunResult } from "./contracts";
|
|
4
|
+
import type { ConnectorAuthorizationRequestHandler, ResolveOAuthConnectorDefinition } from "./request";
|
|
5
|
+
export interface ConnectorConnectionRunServiceOptions {
|
|
6
|
+
readonly projectId: string;
|
|
7
|
+
readonly storage: Storage;
|
|
8
|
+
readonly requestHandler: ConnectorAuthorizationRequestHandler;
|
|
9
|
+
readonly authorizations: DefaultConnectorAuthorizationLifecycle;
|
|
10
|
+
readonly resolveDefinition: ResolveOAuthConnectorDefinition;
|
|
11
|
+
readonly processingTtlMs: number;
|
|
12
|
+
readonly selectionTtlMs: number;
|
|
13
|
+
readonly now: () => Date;
|
|
14
|
+
}
|
|
15
|
+
/** Durable orchestration for the user-visible connector connection flow. */
|
|
16
|
+
export declare class ConnectorConnectionRunService {
|
|
17
|
+
private readonly projectId;
|
|
18
|
+
private readonly storage;
|
|
19
|
+
private readonly connectionStorage;
|
|
20
|
+
private readonly requests;
|
|
21
|
+
private readonly authorizations;
|
|
22
|
+
private readonly resolveDefinition;
|
|
23
|
+
private readonly processingTtlMs;
|
|
24
|
+
private readonly selectionTtlMs;
|
|
25
|
+
private readonly now;
|
|
26
|
+
private readonly maintenanceTimers;
|
|
27
|
+
constructor(options: ConnectorConnectionRunServiceOptions);
|
|
28
|
+
startSelection(command: ConnectorConnectionCommandContext, connectorId: string, input: {
|
|
29
|
+
readonly owner: StartConnectorConnectionRunInput["owner"];
|
|
30
|
+
readonly slot: string;
|
|
31
|
+
readonly authorizationId: string;
|
|
32
|
+
}): Promise<ConnectorConnectionRunView>;
|
|
33
|
+
start(command: ConnectorConnectionCommandContext, connectorId: string, input: StartConnectorConnectionRunInput): Promise<StartConnectorConnectionRunResult>;
|
|
34
|
+
complete(input: CompleteConnectorConnectionRunInput): Promise<CompleteConnectorConnectionRunResult>;
|
|
35
|
+
get(command: ConnectorConnectionCommandContext, connectorId: string, runId: string): Promise<ConnectorConnectionRunView | null>;
|
|
36
|
+
selectAccount(command: ConnectorConnectionCommandContext, connectorId: string, input: SelectConnectorConnectionRunAccountInput): Promise<ConnectorConnectionRunView>;
|
|
37
|
+
private claimCallback;
|
|
38
|
+
private finalizeCompletedRun;
|
|
39
|
+
private failRun;
|
|
40
|
+
private cancelRun;
|
|
41
|
+
private readRun;
|
|
42
|
+
private assertRunActor;
|
|
43
|
+
private view;
|
|
44
|
+
close(): void;
|
|
45
|
+
private continueRunCleanup;
|
|
46
|
+
private continuePendingRevocation;
|
|
47
|
+
private scheduleRunMaintenance;
|
|
48
|
+
private cancelRunMaintenance;
|
|
49
|
+
private maintainRun;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=runs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../../src/connectors/connections/runs.ts"],"names":[],"mappings":"AAGA,OAAO,EAML,KAAK,OAAO,EACb,MAAM,eAAe,CAAA;AAEtB,OAAO,EAEL,KAAK,sCAAsC,EAC5C,MAAM,kBAAkB,CAAA;AAKzB,OAAO,KAAK,EACV,mCAAmC,EACnC,oCAAoC,EACpC,iCAAiC,EACjC,0BAA0B,EAC1B,wCAAwC,EACxC,gCAAgC,EAChC,iCAAiC,EAClC,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EACV,oCAAoC,EACpC,+BAA+B,EAChC,MAAM,WAAW,CAAA;AAcl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AAW,EAAE,MAAM,EACnB,KAAK,EAAE,gCAAgC,GACtC,OAAO,CAAC,iCAAiC,CAAC;IAgDvC,QAAQ,CACZ,KAAK,EAAE,mCAAmC,GACzC,OAAO,CAAC,oCAAoC,CAAC;IAiE1C,GAAG,CACP,OAAO,EAAE,iCAAiC,EAC1C,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC;IAevC,aAAa,CACjB,OAAO,EAAE,iCAAiC,EAC1C,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,wCAAwC,GAC9C,OAAO,CAAC,0BAA0B,CAAC;YA8ExB,aAAa;YA2Db,oBAAoB;YA8DpB,OAAO;YAoCP,SAAS;YAwBT,OAAO;YAeP,cAAc;YAiBd,IAAI;IAgDlB,KAAK,IAAI,IAAI;YAKC,kBAAkB;YAiBlB,yBAAyB;IAgBvC,OAAO,CAAC,sBAAsB;IAe9B,OAAO,CAAC,oBAAoB;YAMd,WAAW;CAsB1B"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ConnectorConnectionRecord, Storage } from "../../storage";
|
|
2
|
+
import { type ConnectorCredentialProtector } from "../credentials";
|
|
3
|
+
import type { ConnectorClient, ConnectorConnectionSelector, ConnectorDefinition, OAuthConnectorAdapter } from "../types";
|
|
4
|
+
import type { AddConnectorConnectionInput, CompleteConnectorAuthorizationInput, CompleteConnectorAuthorizationResult, CompleteConnectorConnectionRunInput, CompleteConnectorConnectionRunResult, ConnectorConnectionCallbackProcess, ConnectorConnectionCommandContext, ConnectorConnectionProcess, ConnectorConnectionRunView, ConnectorConnectionView, RevokeConnectorAuthorizationResult, SelectConnectorAccountInput, SelectConnectorConnectionRunAccountInput, StartConnectorAuthorizationInput, StartConnectorAuthorizationResult, StartConnectorConnectionRunInput, StartConnectorConnectionRunResult } from "./contracts";
|
|
5
|
+
export interface ConnectorConnectionServiceOptions {
|
|
6
|
+
readonly storage?: Storage;
|
|
7
|
+
readonly credentialProtector?: ConnectorCredentialProtector;
|
|
8
|
+
readonly authorizationAttemptTtlMs?: number;
|
|
9
|
+
readonly accountSelectionTtlMs?: number;
|
|
10
|
+
readonly credentialMutationLeaseMs?: number;
|
|
11
|
+
readonly providerOperationTimeoutMs?: number;
|
|
12
|
+
readonly connectionRunProcessingTtlMs?: number;
|
|
13
|
+
readonly refreshSkewMs?: number;
|
|
14
|
+
readonly now?: () => Date;
|
|
15
|
+
}
|
|
16
|
+
/** Process-owned composition of connector connection lookup and OAuth lifecycle state. */
|
|
17
|
+
export declare class ConnectorConnectionService implements ConnectorConnectionProcess {
|
|
18
|
+
private readonly projectId;
|
|
19
|
+
private readonly definitionsById;
|
|
20
|
+
private abortController;
|
|
21
|
+
private readonly connectionStorage;
|
|
22
|
+
private readonly providerOperationTimeoutMs;
|
|
23
|
+
private readonly authorizations;
|
|
24
|
+
private readonly requests;
|
|
25
|
+
private readonly runs;
|
|
26
|
+
readonly callbackProcess: ConnectorConnectionCallbackProcess;
|
|
27
|
+
constructor(projectId: string, definitions: readonly ConnectorDefinition[], options?: ConnectorConnectionServiceOptions);
|
|
28
|
+
connectConnection<TAdapter extends OAuthConnectorAdapter>(definition: ConnectorDefinition<string, TAdapter>, selector: ConnectorConnectionSelector): Promise<ConnectorClient<TAdapter>>;
|
|
29
|
+
/** Snapshot the connected records that one trusted primitive execution may consume. */
|
|
30
|
+
listExecutionConnections<TAdapter extends OAuthConnectorAdapter>(definition: ConnectorDefinition<string, TAdapter>): Promise<readonly ConnectorConnectionRecord[]>;
|
|
31
|
+
/** Resolve a client from an immutable connection snapshot captured for one execution. */
|
|
32
|
+
connectExecutionConnection<TAdapter extends OAuthConnectorAdapter>(definition: ConnectorDefinition<string, TAdapter>, connection: ConnectorConnectionRecord, signal?: AbortSignal): Promise<ConnectorClient<TAdapter>>;
|
|
33
|
+
listConnections(command: ConnectorConnectionCommandContext, connectorId: string): Promise<readonly ConnectorConnectionView[]>;
|
|
34
|
+
startConnectionRun(command: ConnectorConnectionCommandContext, connectorId: string, input: StartConnectorConnectionRunInput): Promise<StartConnectorConnectionRunResult>;
|
|
35
|
+
addConnection(command: ConnectorConnectionCommandContext, connectorId: string, input: AddConnectorConnectionInput): Promise<ConnectorConnectionRunView>;
|
|
36
|
+
getConnectionRun(command: ConnectorConnectionCommandContext, connectorId: string, runId: string): Promise<ConnectorConnectionRunView | null>;
|
|
37
|
+
selectConnectionRunAccount(command: ConnectorConnectionCommandContext, connectorId: string, input: SelectConnectorConnectionRunAccountInput): Promise<ConnectorConnectionRunView>;
|
|
38
|
+
startReauthorization(command: ConnectorConnectionCommandContext, connectorId: string, connectionId: string, input: Pick<StartConnectorConnectionRunInput, "redirectUri" | "returnTo">): Promise<StartConnectorConnectionRunResult>;
|
|
39
|
+
revokeConnection(command: ConnectorConnectionCommandContext, connectorId: string, connectionId: string): Promise<RevokeConnectorAuthorizationResult>;
|
|
40
|
+
completeConnectionRun(input: CompleteConnectorConnectionRunInput): Promise<CompleteConnectorConnectionRunResult>;
|
|
41
|
+
startAuthorization(command: ConnectorConnectionCommandContext, connectorId: string, input: StartConnectorAuthorizationInput): Promise<StartConnectorAuthorizationResult>;
|
|
42
|
+
completeAuthorization(command: ConnectorConnectionCommandContext, connectorId: string, input: CompleteConnectorAuthorizationInput): Promise<CompleteConnectorAuthorizationResult>;
|
|
43
|
+
selectAccount(command: ConnectorConnectionCommandContext, connectorId: string, input: SelectConnectorAccountInput): Promise<ConnectorConnectionView>;
|
|
44
|
+
disconnect(command: ConnectorConnectionCommandContext, connectorId: string, connectionId: string): Promise<ConnectorConnectionView | null>;
|
|
45
|
+
revokeAuthorization(command: ConnectorConnectionCommandContext, connectorId: string, authorizationId: string): Promise<RevokeConnectorAuthorizationResult>;
|
|
46
|
+
close(): Promise<void>;
|
|
47
|
+
private assertOAuthRegistered;
|
|
48
|
+
private requireOAuthDefinition;
|
|
49
|
+
private continueRevocationIfPending;
|
|
50
|
+
private continuePendingRevocation;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/connectors/connections/service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,yBAAyB,EAGzB,OAAO,EACR,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,KAAK,4BAA4B,EAElC,MAAM,gBAAgB,CAAA;AAQvB,OAAO,KAAK,EACV,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,UAAU,CAAA;AAOjB,OAAO,KAAK,EACV,2BAA2B,EAC3B,mCAAmC,EACnC,oCAAoC,EACpC,mCAAmC,EACnC,oCAAoC,EACpC,kCAAkC,EAClC,iCAAiC,EACjC,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,kCAAkC,EAClC,2BAA2B,EAC3B,wCAAwC,EACxC,gCAAgC,EAChC,iCAAiC,EACjC,gCAAgC,EAChC,iCAAiC,EAClC,MAAM,aAAa,CAAA;AAepB,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,mBAAmB,CAAC,EAAE,4BAA4B,CAAA;IAC3D,QAAQ,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAC3C,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAA;IACvC,QAAQ,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAC3C,QAAQ,CAAC,0BAA0B,CAAC,EAAE,MAAM,CAAA;IAC5C,QAAQ,CAAC,4BAA4B,CAAC,EAAE,MAAM,CAAA;IAC9C,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,IAAI,CAAA;CAC1B;AAED,0FAA0F;AAC1F,qBAAa,0BAA2B,YAAW,0BAA0B;IAWzE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,iCAAiC,EAC1C,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC;IA8BpC,mBAAmB,CACvB,OAAO,EAAE,iCAAiC,EAC1C,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,kCAAkC,CAAC;IAmBxC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAM5B,OAAO,CAAC,qBAAqB;IAY7B,OAAO,CAAC,sBAAsB;YAgBhB,2BAA2B;YAY3B,yBAAyB;CAWxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-boundary.d.ts","sourceRoot":"","sources":["../../../src/connectors/connections/storage-boundary.ts"],"names":[],"mappings":"AAEA,qFAAqF;AACrF,wBAAsB,4BAA4B,CAAC,CAAC,EAClD,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAC1B,OAAO,CAAC,CAAC,CAAC,CAMZ"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ConnectorAuthorizationRecord, ConnectorConnectionStorage } from "../../storage";
|
|
2
|
+
import type { ConnectorDefinition, ConnectorTokenSource, OAuthConnectorAdapter } from "../types";
|
|
3
|
+
import type { ConnectorCredentialCodec } from "./credential-codec";
|
|
4
|
+
import { type ConnectorCredentialMutationCoordinator } from "./credential-mutations";
|
|
5
|
+
type OAuthConnectorDefinition = ConnectorDefinition<string, OAuthConnectorAdapter>;
|
|
6
|
+
export interface ConnectorTokenAccessOptions {
|
|
7
|
+
readonly projectId: string;
|
|
8
|
+
readonly storage: ConnectorConnectionStorage;
|
|
9
|
+
readonly credentials: ConnectorCredentialCodec;
|
|
10
|
+
readonly mutations: ConnectorCredentialMutationCoordinator;
|
|
11
|
+
readonly refreshSkewMs: number;
|
|
12
|
+
readonly now: () => Date;
|
|
13
|
+
}
|
|
14
|
+
/** Owns revision-aware access-token delivery and refresh. */
|
|
15
|
+
export declare class ConnectorTokenAccess {
|
|
16
|
+
private readonly projectId;
|
|
17
|
+
private readonly storage;
|
|
18
|
+
private readonly credentials;
|
|
19
|
+
private readonly mutations;
|
|
20
|
+
private readonly refreshSkewMs;
|
|
21
|
+
private readonly now;
|
|
22
|
+
constructor(options: ConnectorTokenAccessOptions);
|
|
23
|
+
requireStableActiveAuthorization(definition: OAuthConnectorDefinition, authorizationId: string): Promise<ConnectorAuthorizationRecord>;
|
|
24
|
+
createTokenSource(definition: OAuthConnectorDefinition, authorizationId: string): ConnectorTokenSource;
|
|
25
|
+
private open;
|
|
26
|
+
private getAccessToken;
|
|
27
|
+
private refreshAuthorization;
|
|
28
|
+
private requireAuthorization;
|
|
29
|
+
private adapterContext;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/connectors/connections/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAA;AAE7F,OAAO,KAAK,EAEV,mBAAmB,EAEnB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAClE,OAAO,EAEL,KAAK,sCAAsC,EAE5C,MAAM,wBAAwB,CAAA;AAI/B,KAAK,wBAAwB,GAAG,mBAAmB,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAA;AAElF,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,0BAA0B,CAAA;IAC5C,QAAQ,CAAC,WAAW,EAAE,wBAAwB,CAAA;IAC9C,QAAQ,CAAC,SAAS,EAAE,sCAAsC,CAAA;IAC1D,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,IAAI,CAAA;CACzB;AAED,6DAA6D;AAC7D,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAQ;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA4B;IACpD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA0B;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwC;IAClE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAQ;IACtC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAY;gBAEpB,OAAO,EAAE,2BAA2B;IAShD,gCAAgC,CAC9B,UAAU,EAAE,wBAAwB,EACpC,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,4BAA4B,CAAC;IAIxC,iBAAiB,CACf,UAAU,EAAE,wBAAwB,EACpC,eAAe,EAAE,MAAM,GACtB,oBAAoB;IAMvB,OAAO,CAAC,IAAI;YAaE,cAAc;YAuBd,oBAAoB;YA4IpB,oBAAoB;IAsBlC,OAAO,CAAC,cAAc;CAGvB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ConnectorAuthorizationRecord } from "../../storage";
|
|
2
|
+
import type { ConnectorAccountCandidate, ConnectorOAuthCredentials } from "../types";
|
|
3
|
+
/** Internal validation and normalization shared by the connector connection lifecycle. */
|
|
4
|
+
type ConnectorValidationErrorCode = "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.configuration_invalid";
|
|
5
|
+
export declare function validateCredentials(credentials: ConnectorOAuthCredentials): ConnectorOAuthCredentials;
|
|
6
|
+
export declare function validateAccounts(accounts: readonly ConnectorAccountCandidate[]): readonly ConnectorAccountCandidate[];
|
|
7
|
+
export declare function serializeCredentials(credentials: ConnectorOAuthCredentials): string;
|
|
8
|
+
export declare function parseCredentials(serialized: string): ConnectorOAuthCredentials;
|
|
9
|
+
export declare function shouldRefresh(authorization: ConnectorAuthorizationRecord, now: Date, skewMs: number): boolean;
|
|
10
|
+
export declare function tokenView(credentials: ConnectorOAuthCredentials): {
|
|
11
|
+
tokenType?: string | undefined;
|
|
12
|
+
accessToken: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function parseAttemptId(state: string): string;
|
|
15
|
+
export declare function hashSecret(value: string): string;
|
|
16
|
+
export declare function normalizedHttpUrl(value: string | URL, field: string, code?: ConnectorValidationErrorCode): string;
|
|
17
|
+
export declare function assertAuthorizationUrlParameters(authorizationUrl: string, expected: {
|
|
18
|
+
readonly state: string;
|
|
19
|
+
readonly codeChallenge: string;
|
|
20
|
+
}): void;
|
|
21
|
+
export declare function nonblank(value: unknown, field: string, code?: ConnectorValidationErrorCode): string;
|
|
22
|
+
export declare function positiveDuration(value: number, field: string): number;
|
|
23
|
+
export declare function nonNegativeDuration(value: number, field: string): number;
|
|
24
|
+
export declare function delay(milliseconds: number): Promise<void>;
|
|
25
|
+
export declare function sameIds(left: readonly string[], right: readonly string[]): boolean;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/connectors/connections/validation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AAEjE,OAAO,KAAK,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAA;AAEpF,0FAA0F;AAE1F,KAAK,4BAA4B,GAC7B,2BAA2B,GAC3B,iCAAiC,GACjC,iCAAiC,CAAA;AAErC,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,yBAAyB,GACrC,yBAAyB,CAiE3B;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,SAAS,yBAAyB,EAAE,GAC7C,SAAS,yBAAyB,EAAE,CA0CtC;AAED,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,yBAAyB,GAAG,M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