@sixb/core 0.1.1 → 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 +31 -20
- 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 +35 -24
- 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 +7 -7
- 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/context.js +2 -2
- package/dist/agents/dispatch.d.ts.map +1 -1
- package/dist/agents/errors.d.ts +1 -1
- package/dist/agents/errors.d.ts.map +1 -1
- package/dist/agents/execution.d.ts +45 -0
- package/dist/agents/execution.d.ts.map +1 -0
- package/dist/agents/index.d.ts +6 -6
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +64 -16
- 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/types.d.ts +2 -2
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/validation.d.ts +3 -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 +2 -2
- 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 +3 -3
- 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 +60 -60
- 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-y2ygpd0m.js → chunk-3j7573mj.js} +2 -2
- package/dist/{chunk-y2ygpd0m.js.map → chunk-3j7573mj.js.map} +2 -2
- package/dist/{chunk-md9jbrm9.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-nbywkytr.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-63te770v.js.map +1 -1
- 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-sb0shdvv.js → chunk-85j5ybfj.js} +1 -1
- package/dist/{chunk-sb0shdvv.js.map → chunk-85j5ybfj.js.map} +2 -2
- package/dist/{chunk-6rzdtvn5.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-r82k4z7z.js → chunk-a31h57d5.js} +2 -2
- 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-avppcgt6.js → chunk-c6qd89g5.js} +241 -144
- package/dist/chunk-c6qd89g5.js.map +15 -0
- package/dist/{chunk-qzyemcj7.js → chunk-ckxfnx7f.js} +2 -2
- 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-yn947ck3.js → chunk-f2rt4vkh.js} +48 -29
- package/dist/chunk-f2rt4vkh.js.map +14 -0
- package/dist/{chunk-hb9xcx9c.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-f6kyyeef.js → chunk-ghteq96b.js} +8 -8
- package/dist/{chunk-f6kyyeef.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-xt6qx9sh.js → chunk-jaj13078.js} +121 -9
- package/dist/chunk-jaj13078.js.map +38 -0
- package/dist/{chunk-p7vj8xgb.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-b1bqvhpe.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-53s4asfm.js → chunk-rnshztfq.js} +2 -2
- package/dist/chunk-sa4340y1.js +607 -0
- package/dist/chunk-sa4340y1.js.map +14 -0
- package/dist/{chunk-rjqm6ksg.js → chunk-st4xgxey.js} +583 -251
- package/dist/chunk-st4xgxey.js.map +45 -0
- package/dist/{chunk-be9vm29v.js → chunk-t8t39h7v.js} +1 -1
- package/dist/{chunk-be9vm29v.js.map → chunk-t8t39h7v.js.map} +3 -3
- 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-8kv2sez0.js → chunk-vybf6pkp.js} +1 -1
- package/dist/{chunk-4tvj3ate.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-raq0x6bd.js → chunk-ys1nse2v.js} +2175 -381
- package/dist/chunk-ys1nse2v.js.map +56 -0
- package/dist/{chunk-6zrpewy4.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-hz8m927w.js → chunk-zqysyfjt.js} +1 -1
- 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/execution.d.ts +8 -0
- package/dist/datasets/execution.d.ts.map +1 -0
- 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/index.d.ts +30 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +130 -105
- package/dist/index.js.map +1 -1
- package/dist/json.d.ts +0 -1
- package/dist/json.d.ts.map +1 -1
- package/dist/lake-storage/index.js +5 -5
- 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 +4 -4
- package/dist/ontology/registry.d.ts +15 -2
- package/dist/ontology/registry.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 +92 -29
- 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 +28 -11
- 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 +28 -30
- package/dist/storage/workflow-runs/types.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 +16 -9
- package/dist/syncs/types.d.ts.map +1 -1
- 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 +12 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +4088 -1556
- package/dist/testing/index.js.map +25 -13
- 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 +64 -36
- 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 +7 -3
- package/src/agents/authority.ts +189 -0
- package/src/agents/dispatch.ts +1 -6
- package/src/agents/errors.ts +2 -0
- package/src/agents/execution.ts +254 -0
- package/src/agents/index.ts +15 -3
- package/src/agents/prompt.ts +15 -3
- package/src/agents/request.ts +153 -13
- package/src/agents/streams.ts +150 -3
- package/src/agents/types.ts +2 -4
- package/src/agents/validation.ts +3 -3
- 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/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/execution.ts +24 -0
- 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 +3 -3
- package/src/index.ts +109 -9
- package/src/json.ts +0 -4
- 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/registry.ts +16 -2
- 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 -822
- 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 +154 -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 +90 -7
- package/src/storage/sync-runs/index.ts +4 -1
- package/src/storage/sync-runs/provider.ts +25 -0
- package/src/storage/sync-runs/types.ts +35 -11
- package/src/storage/types.ts +44 -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 +89 -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 +36 -25
- package/src/syncs/builders.ts +2 -2
- package/src/syncs/execution.ts +78 -0
- package/src/syncs/index.ts +13 -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 +32 -8
- 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 +52 -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/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-4hwxq5e6.js +0 -49
- package/dist/chunk-4hwxq5e6.js.map +0 -10
- package/dist/chunk-4tvj3ate.js.map +0 -11
- package/dist/chunk-50kv63vj.js.map +0 -12
- package/dist/chunk-86459jn0.js +0 -1091
- package/dist/chunk-86459jn0.js.map +0 -22
- package/dist/chunk-867jxh7c.js.map +0 -19
- package/dist/chunk-9k3hgv8h.js +0 -352
- package/dist/chunk-9k3hgv8h.js.map +0 -13
- package/dist/chunk-avppcgt6.js.map +0 -14
- package/dist/chunk-b1bqvhpe.js.map +0 -13
- package/dist/chunk-b5dp7gaf.js +0 -1092
- package/dist/chunk-b5dp7gaf.js.map +0 -26
- package/dist/chunk-bh8bwma3.js +0 -37
- package/dist/chunk-bh8bwma3.js.map +0 -10
- package/dist/chunk-btcsywk4.js +0 -985
- package/dist/chunk-btcsywk4.js.map +0 -15
- package/dist/chunk-exrfbt2d.js +0 -354
- package/dist/chunk-exrfbt2d.js.map +0 -17
- package/dist/chunk-hb9xcx9c.js.map +0 -14
- package/dist/chunk-k25jm1x5.js +0 -102
- package/dist/chunk-k25jm1x5.js.map +0 -10
- package/dist/chunk-k6j72mtt.js +0 -9
- package/dist/chunk-k6j72mtt.js.map +0 -10
- package/dist/chunk-m9w0artv.js +0 -554
- package/dist/chunk-m9w0artv.js.map +0 -13
- package/dist/chunk-nbywkytr.js.map +0 -16
- package/dist/chunk-p7vj8xgb.js.map +0 -34
- package/dist/chunk-raq0x6bd.js.map +0 -48
- package/dist/chunk-rgzed50y.js +0 -1445
- package/dist/chunk-rgzed50y.js.map +0 -22
- package/dist/chunk-rjqm6ksg.js.map +0 -44
- package/dist/chunk-t72dvahb.js.map +0 -12
- package/dist/chunk-v5c085yp.js.map +0 -10
- package/dist/chunk-xt6qx9sh.js.map +0 -36
- package/dist/chunk-xz5g49bp.js.map +0 -11
- package/dist/chunk-ya6brh8a.js.map +0 -11
- package/dist/chunk-yn947ck3.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-md9jbrm9.js.map → chunk-4gz41why.js.map} +0 -0
- /package/dist/{chunk-6rzdtvn5.js.map → chunk-8b55ygje.js.map} +0 -0
- /package/dist/{chunk-r82k4z7z.js.map → chunk-a31h57d5.js.map} +0 -0
- /package/dist/{chunk-qzyemcj7.js.map → chunk-ckxfnx7f.js.map} +0 -0
- /package/dist/{chunk-53s4asfm.js.map → chunk-rnshztfq.js.map} +0 -0
- /package/dist/{chunk-8kv2sez0.js.map → chunk-vybf6pkp.js.map} +0 -0
- /package/dist/{chunk-6zrpewy4.js.map → chunk-z3zp0bj1.js.map} +0 -0
- /package/dist/{chunk-hz8m927w.js.map → chunk-zqysyfjt.js.map} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/storage/ontology/outbox.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import type { SixbErrorCode, SixbFailure } from \"../../errors/types\"\nimport type { OntologyMaterializationEvent } from \"../../materialization/events\"\n\nexport type {\n OntologyMaterializationEvent,\n OntologyMaterializationEventDraft,\n} from \"../../materialization/events\"\n\nexport interface OntologyOutboxWrite {\n /** Providers may index envelope identity fields, but the envelope remains authoritative. */\n readonly envelope: OntologyMaterializationEvent\n readonly availableAt: string\n readonly createdAt: string\n}\n\n/** Error codes a durable ontology outbox delivery can persist. */\nexport const ONTOLOGY_OUTBOX_FAILURE_CODES = [\"event.delivery_failed\"] as const satisfies readonly [\n SixbErrorCode,\n ...SixbErrorCode[],\n]\n\nexport type OntologyOutboxFailureCode = (typeof ONTOLOGY_OUTBOX_FAILURE_CODES)[number]\nexport type OntologyOutboxFailure = SixbFailure<OntologyOutboxFailureCode>\n\nexport interface OntologyOutboxRecord {\n readonly envelope: OntologyMaterializationEvent\n readonly availableAt: string\n readonly attempts: number\n readonly leaseId: string | null\n readonly leaseExpiresAt: string | null\n readonly publishedAt: string | null\n readonly lastFailure: OntologyOutboxFailure | null\n readonly createdAt: string\n}\n\nexport interface ClaimOntologyOutboxInput {\n readonly projectId: string\n readonly now: string\n readonly limit: number\n readonly leaseId: string\n readonly leaseExpiresAt: string\n}\n\nexport interface ClaimedOntologyOutboxRow extends OntologyOutboxRecord {\n readonly leaseId: string\n readonly leaseExpiresAt: string\n}\n\nexport interface CompleteOntologyOutboxLeaseInput {\n readonly projectId: string\n readonly ids: readonly string[]\n readonly leaseId: string\n readonly publishedAt: string\n}\n\nexport interface RescheduleOntologyOutboxLeaseInput {\n readonly projectId: string\n readonly ids: readonly string[]\n readonly leaseId: string\n readonly availableAt: string\n /** The delivery failure that caused this retry. Omitted for lifecycle-only rescheduling. */\n readonly failure?: OntologyOutboxFailure\n}\n\nexport interface PurgePublishedOntologyOutboxInput {\n readonly projectId: string\n readonly publishedBefore: string\n readonly limit: number\n}\n\nexport interface SummarizeOntologyOutboxInput {\n readonly projectId: string\n}\n\nexport interface OntologyOutboxSummary {\n readonly pendingCount: number\n readonly oldestPendingAt: string | null\n /** Pending rows that have already been claimed at least once. */\n readonly retryingCount: number\n readonly maxAttempts: number\n}\n\nexport interface OntologyOutboxStorage {\n /** Selects each claimed batch deterministically; concurrent publishers may complete out of order. */\n claim(input: ClaimOntologyOutboxInput): Promise<readonly ClaimedOntologyOutboxRow[]>\n markPublished(input: CompleteOntologyOutboxLeaseInput): Promise<void>\n reschedule(input: RescheduleOntologyOutboxLeaseInput): Promise<void>\n purgePublished(input: PurgePublishedOntologyOutboxInput): Promise<number>\n summarize(input: SummarizeOntologyOutboxInput): Promise<OntologyOutboxSummary>\n}\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;AAgBO,IAAM,gCAAgC,CAAC,uBAAuB;",
|
|
8
|
+
"debugId": "68A4A6A822D3D56964756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
createPrimitiveExecutionRecord,
|
|
4
|
+
ensureExecutionRecord,
|
|
5
|
+
executionRecordInputFromRuntime
|
|
6
|
+
} from "./chunk-8ryen3p3.js";
|
|
7
|
+
import {
|
|
8
|
+
PIPELINE_RUN_FAILURE_CODES
|
|
9
|
+
} from "./chunk-ys1nse2v.js";
|
|
10
|
+
import {
|
|
11
|
+
PipelineRunError
|
|
12
|
+
} from "./chunk-cy0n5dms.js";
|
|
13
|
+
import {
|
|
14
|
+
reportRunFailure
|
|
15
|
+
} from "./chunk-dsrkgtnh.js";
|
|
16
|
+
import {
|
|
17
|
+
assertAuthorized
|
|
18
|
+
} from "./chunk-34bqh420.js";
|
|
19
|
+
import {
|
|
20
|
+
createSixbError,
|
|
21
|
+
toSixbFailure
|
|
22
|
+
} from "./chunk-0172wgm9.js";
|
|
23
|
+
|
|
24
|
+
// src/pipelines/errors.ts
|
|
25
|
+
class PipelineError extends Error {
|
|
26
|
+
name = "PipelineError";
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// src/pipelines/run-dispatch.ts
|
|
30
|
+
import { randomUUID } from "crypto";
|
|
31
|
+
class PipelineRunDispatcher {
|
|
32
|
+
dependencies;
|
|
33
|
+
constructor(dependencies) {
|
|
34
|
+
this.dependencies = dependencies;
|
|
35
|
+
}
|
|
36
|
+
async dispatch(input) {
|
|
37
|
+
assertAutomaticDispatchInput(input);
|
|
38
|
+
const pipeline = this.dependencies.definitions.pipelines.getById(input.pipelineId);
|
|
39
|
+
if (!pipeline)
|
|
40
|
+
throw new PipelineError(`[Sixb] Unknown pipeline '${input.pipelineId}'`);
|
|
41
|
+
return dispatchPipelineRun({
|
|
42
|
+
errorReporterHost: this.dependencies,
|
|
43
|
+
projectId: this.dependencies.id,
|
|
44
|
+
pipeline,
|
|
45
|
+
storage: this.dependencies.storage,
|
|
46
|
+
queue: this.dependencies.queues.pipelines,
|
|
47
|
+
runId: input.runId,
|
|
48
|
+
metadata: input.metadata,
|
|
49
|
+
validateExistingRun: (run, storage) => assertAutomaticExecutionIdentity(storage, this.dependencies.id, input, run),
|
|
50
|
+
createExecution: async (executionId, runId) => createPrimitiveExecutionRecord({
|
|
51
|
+
id: executionId,
|
|
52
|
+
primitive: { kind: "pipeline", id: pipeline.id, runId },
|
|
53
|
+
origin: {
|
|
54
|
+
type: "automatic",
|
|
55
|
+
projectId: this.dependencies.id,
|
|
56
|
+
source: input.source,
|
|
57
|
+
correlationId: input.correlationId
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
async function dispatchPipelineRun(input) {
|
|
64
|
+
const runId = createPipelineRunId(input.runId);
|
|
65
|
+
const persisted = await persistPipelineRun(input, runId);
|
|
66
|
+
if (!persisted.publish)
|
|
67
|
+
return existingPipelineRunResult(persisted.run);
|
|
68
|
+
return publishPipelineRun(input, persisted);
|
|
69
|
+
}
|
|
70
|
+
async function persistPipelineRun(input, runId) {
|
|
71
|
+
const pipelineRuns = requirePipelineRunStorage(input.storage);
|
|
72
|
+
const existing = await pipelineRuns.getById({ projectId: input.projectId, id: runId });
|
|
73
|
+
if (existing)
|
|
74
|
+
return reusePipelineRun(input, existing);
|
|
75
|
+
const execution = await input.createExecution(`exec_${randomUUID()}`, runId);
|
|
76
|
+
const queuedAt = new Date;
|
|
77
|
+
try {
|
|
78
|
+
return await input.storage.transaction(async (tx) => {
|
|
79
|
+
const transactionalRuns = requirePipelineRunStorage(tx);
|
|
80
|
+
const raced = await transactionalRuns.getById({ projectId: input.projectId, id: runId });
|
|
81
|
+
if (raced) {
|
|
82
|
+
assertExistingRunMatchesRequest(raced, input);
|
|
83
|
+
await input.validateExistingRun?.(raced, tx);
|
|
84
|
+
return { publish: false, run: raced };
|
|
85
|
+
}
|
|
86
|
+
await tx.executions.create(execution);
|
|
87
|
+
const run = await transactionalRuns.queue({
|
|
88
|
+
projectId: input.projectId,
|
|
89
|
+
id: runId,
|
|
90
|
+
executionId: execution.id,
|
|
91
|
+
pipelineId: input.pipeline.id,
|
|
92
|
+
queuedAt
|
|
93
|
+
});
|
|
94
|
+
return { publish: true, run, execution, queuedAt, created: true };
|
|
95
|
+
}, { isolation: "serializable" });
|
|
96
|
+
} catch (error) {
|
|
97
|
+
if (!(error instanceof PipelineRunError))
|
|
98
|
+
throw error;
|
|
99
|
+
const raced = await pipelineRuns.getById({ projectId: input.projectId, id: runId });
|
|
100
|
+
if (!raced)
|
|
101
|
+
throw error;
|
|
102
|
+
assertExistingRunMatchesRequest(raced, input);
|
|
103
|
+
await input.validateExistingRun?.(raced, input.storage);
|
|
104
|
+
return { publish: false, run: raced };
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
async function reusePipelineRun(input, existing) {
|
|
108
|
+
assertExistingRunMatchesRequest(existing, input);
|
|
109
|
+
await input.validateExistingRun?.(existing, input.storage);
|
|
110
|
+
if (existing.status !== "failed" || existing.error?.code !== "queue.enqueue_failed" || !existing.error.retryable) {
|
|
111
|
+
return { publish: false, run: existing };
|
|
112
|
+
}
|
|
113
|
+
const execution = await input.storage.executions.getById({
|
|
114
|
+
projectId: input.projectId,
|
|
115
|
+
id: existing.executionId
|
|
116
|
+
});
|
|
117
|
+
if (!execution) {
|
|
118
|
+
throw new PipelineRunError(`[Sixb] Execution '${existing.executionId}' for Pipeline run '${existing.id}' was not found.`);
|
|
119
|
+
}
|
|
120
|
+
const queuedAt = new Date;
|
|
121
|
+
const run = await requirePipelineRunStorage(input.storage).queue({
|
|
122
|
+
projectId: input.projectId,
|
|
123
|
+
id: existing.id,
|
|
124
|
+
executionId: existing.executionId,
|
|
125
|
+
pipelineId: existing.pipelineId,
|
|
126
|
+
queuedAt
|
|
127
|
+
});
|
|
128
|
+
return { publish: true, run, execution, queuedAt, created: false };
|
|
129
|
+
}
|
|
130
|
+
async function publishPipelineRun(input, persisted) {
|
|
131
|
+
try {
|
|
132
|
+
const [job] = await input.queue.enqueue({
|
|
133
|
+
projectId: input.projectId,
|
|
134
|
+
jobs: [
|
|
135
|
+
{
|
|
136
|
+
id: persisted.run.id,
|
|
137
|
+
type: "pipeline.run.requested",
|
|
138
|
+
payload: { runId: persisted.run.id },
|
|
139
|
+
...input.metadata === undefined ? {} : { metadata: input.metadata }
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
});
|
|
143
|
+
return {
|
|
144
|
+
pipelineId: persisted.run.pipelineId,
|
|
145
|
+
runId: persisted.run.id,
|
|
146
|
+
queuedAt: persisted.queuedAt.toISOString(),
|
|
147
|
+
...job?.id ? { jobId: job.id } : {},
|
|
148
|
+
created: persisted.created
|
|
149
|
+
};
|
|
150
|
+
} catch (error) {
|
|
151
|
+
const failedAt = new Date;
|
|
152
|
+
const failure = toEnqueueFailure(error, persisted.run, failedAt);
|
|
153
|
+
const failed = await requirePipelineRunStorage(input.storage).finish({
|
|
154
|
+
projectId: input.projectId,
|
|
155
|
+
id: persisted.run.id,
|
|
156
|
+
status: "failed",
|
|
157
|
+
finishedAt: failedAt,
|
|
158
|
+
error: failure
|
|
159
|
+
});
|
|
160
|
+
reportRunFailure(input.errorReporterHost, error, {
|
|
161
|
+
projectId: input.projectId,
|
|
162
|
+
runKind: "pipeline",
|
|
163
|
+
run: { runId: failed.id, pipelineId: failed.pipelineId },
|
|
164
|
+
failure
|
|
165
|
+
});
|
|
166
|
+
throw error;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
function assertExistingRunMatchesRequest(existing, input) {
|
|
170
|
+
if (existing.pipelineId !== input.pipeline.id) {
|
|
171
|
+
throw new PipelineRunError(`[Sixb] Pipeline run '${existing.id}' already exists with a different request payload.`);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function existingPipelineRunResult(existing) {
|
|
175
|
+
return {
|
|
176
|
+
pipelineId: existing.pipelineId,
|
|
177
|
+
runId: existing.id,
|
|
178
|
+
queuedAt: existing.queuedAt.toISOString(),
|
|
179
|
+
created: false
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function requirePipelineRunStorage(storage) {
|
|
183
|
+
if (!storage.pipelineRuns) {
|
|
184
|
+
throw new PipelineError("[Sixb] Pipeline run storage is not configured.");
|
|
185
|
+
}
|
|
186
|
+
return storage.pipelineRuns;
|
|
187
|
+
}
|
|
188
|
+
function createPipelineRunId(runId) {
|
|
189
|
+
if (runId === undefined)
|
|
190
|
+
return `run_${randomUUID()}`;
|
|
191
|
+
if (!runId.trim())
|
|
192
|
+
throw new PipelineError("[Sixb] Pipeline run id must not be empty");
|
|
193
|
+
return runId;
|
|
194
|
+
}
|
|
195
|
+
function assertAutomaticDispatchInput(input) {
|
|
196
|
+
assertNonBlank(input.pipelineId, "Pipeline id");
|
|
197
|
+
assertNonBlank(input.runId, "Pipeline run id");
|
|
198
|
+
assertNonBlank(input.source.eventId, "Pipeline source event id");
|
|
199
|
+
assertNonBlank(input.correlationId, "Pipeline correlation id");
|
|
200
|
+
}
|
|
201
|
+
async function assertAutomaticExecutionIdentity(storage, projectId, input, run) {
|
|
202
|
+
const execution = await storage.executions.getById({ projectId, id: run.executionId });
|
|
203
|
+
if (!execution || execution.source.type !== input.source.type || execution.source.eventId !== input.source.eventId || execution.correlationId !== input.correlationId || execution.requestedBy !== undefined) {
|
|
204
|
+
throw new PipelineError(`[Sixb] Pipeline run '${run.id}' already exists with different automatic provenance.`);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
function toEnqueueFailure(error, run, at) {
|
|
208
|
+
const enqueueError = createSixbError("queue.enqueue_failed", `[Sixb] Could not enqueue Pipeline run '${run.id}'.`, {
|
|
209
|
+
cause: error,
|
|
210
|
+
details: { pipelineId: run.pipelineId, runId: run.id, phase: "enqueue" }
|
|
211
|
+
});
|
|
212
|
+
return toSixbFailure(enqueueError, { allowedCodes: PIPELINE_RUN_FAILURE_CODES, at });
|
|
213
|
+
}
|
|
214
|
+
function assertNonBlank(value, label) {
|
|
215
|
+
if (!value.trim())
|
|
216
|
+
throw new PipelineError(`[Sixb] ${label} must not be empty.`);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// src/pipelines/request.ts
|
|
220
|
+
async function requestPipelineRun(runtime, execution, pipeline, options = {}) {
|
|
221
|
+
assertAuthorized(runtime, { kind: "pipeline.run", pipelineId: pipeline.id });
|
|
222
|
+
if (!runtime.storage.pipelineRuns) {
|
|
223
|
+
throw new PipelineError("[Sixb] Pipeline run storage is not configured.");
|
|
224
|
+
}
|
|
225
|
+
const queue = runtime.queues.pipelines;
|
|
226
|
+
if (!queue) {
|
|
227
|
+
throw new PipelineError("[Sixb] Pipeline run queue is not configured.");
|
|
228
|
+
}
|
|
229
|
+
return dispatchPipelineRun({
|
|
230
|
+
errorReporterHost: runtime,
|
|
231
|
+
projectId: runtime.projectId,
|
|
232
|
+
pipeline,
|
|
233
|
+
storage: runtime.storage,
|
|
234
|
+
queue,
|
|
235
|
+
...options,
|
|
236
|
+
createExecution: async (executionId, runId) => {
|
|
237
|
+
const caller = await ensureExecutionRecord(runtime.storage.executions, executionRecordInputFromRuntime({
|
|
238
|
+
execution,
|
|
239
|
+
runtimeAuthorization: runtime.runtimeAuthorization
|
|
240
|
+
}));
|
|
241
|
+
return createPrimitiveExecutionRecord({
|
|
242
|
+
id: executionId,
|
|
243
|
+
primitive: { kind: "pipeline", id: pipeline.id, runId },
|
|
244
|
+
origin: { type: "execution", parent: caller }
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export { PipelineError, PipelineRunDispatcher, requestPipelineRun };
|
|
251
|
+
|
|
252
|
+
//# debugId=80B62AEE05E80FC964756E2164756E21
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/pipelines/errors.ts", "../src/pipelines/run-dispatch.ts", "../src/pipelines/request.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"export class PipelineError extends Error {\n readonly name = \"PipelineError\"\n}\n",
|
|
6
|
+
"import { randomUUID } from \"node:crypto\"\nimport { reportRunFailure } from \"../error-reporting/capability\"\nimport { createSixbError, toSixbFailure } from \"../errors/internal\"\nimport type { SixbFailure } from \"../errors/types\"\nimport type { RunDispatcher } from \"../execution/dispatch\"\nimport { createPrimitiveExecutionRecord } from \"../execution/durable\"\nimport type { Queues } from \"../queues\"\nimport type { SixbDefinitions } from \"../runtime/definitions\"\nimport type {\n CreateExecutionInput,\n PipelineRunFailureCode,\n PipelineRunRecord,\n Storage,\n} from \"../storage\"\nimport { PIPELINE_RUN_FAILURE_CODES, PipelineRunError } from \"../storage\"\nimport { PipelineError } from \"./errors\"\nimport type { PipelineRunRequestOptions, PipelineRunRequestResult } from \"./request\"\nimport type { PipelineDefinition } from \"./types\"\n\nexport type AutomaticPipelineExecutionSource =\n | { readonly type: \"schedule\"; readonly eventId: string }\n | { readonly type: \"event\"; readonly eventId: string }\n\nexport interface AutomaticPipelineRunDispatchInput extends PipelineRunRequestOptions {\n readonly pipelineId: string\n readonly runId: string\n readonly source: AutomaticPipelineExecutionSource\n readonly correlationId: string\n readonly metadata?: Readonly<Record<string, string>>\n}\n\nexport type PipelineRunDispatchPort = RunDispatcher<\n AutomaticPipelineRunDispatchInput,\n PipelineRunRequestResult\n>\n\nexport interface PipelineRunDispatcherDependencies {\n readonly id: string\n readonly definitions: Pick<SixbDefinitions, \"pipelines\">\n readonly storage: Storage\n readonly queues: Pick<Queues, \"pipelines\">\n}\n\ninterface DispatchPipelineRunInput extends PipelineRunRequestOptions {\n readonly errorReporterHost: object\n readonly projectId: string\n readonly pipeline: PipelineDefinition\n readonly storage: Storage\n readonly queue: Queues[\"pipelines\"]\n readonly metadata?: Readonly<Record<string, string>>\n readonly createExecution: (executionId: string, runId: string) => Promise<CreateExecutionInput>\n readonly validateExistingRun?: (run: PipelineRunRecord, storage: Storage) => Promise<void>\n}\n\ntype PersistedPipelineRun =\n | { readonly publish: false; readonly run: PipelineRunRecord }\n | {\n readonly publish: true\n readonly run: PipelineRunRecord\n readonly execution: CreateExecutionInput\n readonly queuedAt: Date\n readonly created: boolean\n }\n\n/** Core-owned durable dispatch boundary used by automatic Pipeline triggers. */\nexport class PipelineRunDispatcher implements PipelineRunDispatchPort {\n constructor(private readonly dependencies: PipelineRunDispatcherDependencies) {}\n\n async dispatch(input: AutomaticPipelineRunDispatchInput): Promise<PipelineRunRequestResult> {\n assertAutomaticDispatchInput(input)\n const pipeline = this.dependencies.definitions.pipelines.getById(input.pipelineId)\n if (!pipeline) throw new PipelineError(`[Sixb] Unknown pipeline '${input.pipelineId}'`)\n\n return dispatchPipelineRun({\n errorReporterHost: this.dependencies,\n projectId: this.dependencies.id,\n pipeline,\n storage: this.dependencies.storage,\n queue: this.dependencies.queues.pipelines,\n runId: input.runId,\n metadata: input.metadata,\n validateExistingRun: (run, storage) =>\n assertAutomaticExecutionIdentity(storage, this.dependencies.id, input, run),\n createExecution: async (executionId, runId) =>\n createPrimitiveExecutionRecord({\n id: executionId,\n primitive: { kind: \"pipeline\", id: pipeline.id, runId },\n origin: {\n type: \"automatic\",\n projectId: this.dependencies.id,\n source: input.source,\n correlationId: input.correlationId,\n },\n }),\n })\n }\n}\n\n/** Persist a Pipeline execution and queued run before publishing its queue job. */\nexport async function dispatchPipelineRun(\n input: DispatchPipelineRunInput\n): Promise<PipelineRunRequestResult> {\n const runId = createPipelineRunId(input.runId)\n const persisted = await persistPipelineRun(input, runId)\n if (!persisted.publish) return existingPipelineRunResult(persisted.run)\n return publishPipelineRun(input, persisted)\n}\n\nasync function persistPipelineRun(\n input: DispatchPipelineRunInput,\n runId: string\n): Promise<PersistedPipelineRun> {\n const pipelineRuns = requirePipelineRunStorage(input.storage)\n const existing = await pipelineRuns.getById({ projectId: input.projectId, id: runId })\n if (existing) return reusePipelineRun(input, existing)\n\n const execution = await input.createExecution(`exec_${randomUUID()}`, runId)\n const queuedAt = new Date()\n try {\n return await input.storage.transaction(\n async (tx): Promise<PersistedPipelineRun> => {\n const transactionalRuns = requirePipelineRunStorage(tx)\n const raced = await transactionalRuns.getById({ projectId: input.projectId, id: runId })\n if (raced) {\n assertExistingRunMatchesRequest(raced, input)\n await input.validateExistingRun?.(raced, tx)\n return { publish: false, run: raced }\n }\n\n await tx.executions.create(execution)\n const run = await transactionalRuns.queue({\n projectId: input.projectId,\n id: runId,\n executionId: execution.id,\n pipelineId: input.pipeline.id,\n queuedAt,\n })\n return { publish: true, run, execution, queuedAt, created: true }\n },\n { isolation: \"serializable\" }\n )\n } catch (error) {\n if (!(error instanceof PipelineRunError)) throw error\n const raced = await pipelineRuns.getById({ projectId: input.projectId, id: runId })\n if (!raced) throw error\n assertExistingRunMatchesRequest(raced, input)\n await input.validateExistingRun?.(raced, input.storage)\n return { publish: false, run: raced }\n }\n}\n\nasync function reusePipelineRun(\n input: DispatchPipelineRunInput,\n existing: PipelineRunRecord\n): Promise<PersistedPipelineRun> {\n assertExistingRunMatchesRequest(existing, input)\n await input.validateExistingRun?.(existing, input.storage)\n if (\n existing.status !== \"failed\" ||\n existing.error?.code !== \"queue.enqueue_failed\" ||\n !existing.error.retryable\n ) {\n return { publish: false, run: existing }\n }\n\n const execution = await input.storage.executions.getById({\n projectId: input.projectId,\n id: existing.executionId,\n })\n if (!execution) {\n throw new PipelineRunError(\n `[Sixb] Execution '${existing.executionId}' for Pipeline run '${existing.id}' was not found.`\n )\n }\n\n const queuedAt = new Date()\n const run = await requirePipelineRunStorage(input.storage).queue({\n projectId: input.projectId,\n id: existing.id,\n executionId: existing.executionId,\n pipelineId: existing.pipelineId,\n queuedAt,\n })\n return { publish: true, run, execution, queuedAt, created: false }\n}\n\nasync function publishPipelineRun(\n input: DispatchPipelineRunInput,\n persisted: Extract<PersistedPipelineRun, { readonly publish: true }>\n): Promise<PipelineRunRequestResult> {\n try {\n const [job] = await input.queue.enqueue({\n projectId: input.projectId,\n jobs: [\n {\n id: persisted.run.id,\n type: \"pipeline.run.requested\",\n payload: { runId: persisted.run.id },\n ...(input.metadata === undefined ? {} : { metadata: input.metadata }),\n },\n ],\n })\n return {\n pipelineId: persisted.run.pipelineId,\n runId: persisted.run.id,\n queuedAt: persisted.queuedAt.toISOString(),\n ...(job?.id ? { jobId: job.id } : {}),\n created: persisted.created,\n }\n } catch (error) {\n const failedAt = new Date()\n const failure = toEnqueueFailure(error, persisted.run, failedAt)\n const failed = await requirePipelineRunStorage(input.storage).finish({\n projectId: input.projectId,\n id: persisted.run.id,\n status: \"failed\",\n finishedAt: failedAt,\n error: failure,\n })\n reportRunFailure(input.errorReporterHost, error, {\n projectId: input.projectId,\n runKind: \"pipeline\",\n run: { runId: failed.id, pipelineId: failed.pipelineId },\n failure,\n })\n throw error\n }\n}\n\nfunction assertExistingRunMatchesRequest(\n existing: PipelineRunRecord,\n input: Pick<DispatchPipelineRunInput, \"pipeline\">\n): void {\n if (existing.pipelineId !== input.pipeline.id) {\n throw new PipelineRunError(\n `[Sixb] Pipeline run '${existing.id}' already exists with a different request payload.`\n )\n }\n}\n\nfunction existingPipelineRunResult(existing: PipelineRunRecord): PipelineRunRequestResult {\n return {\n pipelineId: existing.pipelineId,\n runId: existing.id,\n queuedAt: existing.queuedAt.toISOString(),\n created: false,\n }\n}\n\nfunction requirePipelineRunStorage(storage: Storage): NonNullable<Storage[\"pipelineRuns\"]> {\n if (!storage.pipelineRuns) {\n throw new PipelineError(\"[Sixb] Pipeline run storage is not configured.\")\n }\n return storage.pipelineRuns\n}\n\nfunction createPipelineRunId(runId: string | undefined): string {\n if (runId === undefined) return `run_${randomUUID()}`\n if (!runId.trim()) throw new PipelineError(\"[Sixb] Pipeline run id must not be empty\")\n return runId\n}\n\nfunction assertAutomaticDispatchInput(input: AutomaticPipelineRunDispatchInput): void {\n assertNonBlank(input.pipelineId, \"Pipeline id\")\n assertNonBlank(input.runId, \"Pipeline run id\")\n assertNonBlank(input.source.eventId, \"Pipeline source event id\")\n assertNonBlank(input.correlationId, \"Pipeline correlation id\")\n}\n\nasync function assertAutomaticExecutionIdentity(\n storage: Storage,\n projectId: string,\n input: AutomaticPipelineRunDispatchInput,\n run: PipelineRunRecord\n): Promise<void> {\n const execution = await storage.executions.getById({ projectId, id: run.executionId })\n if (\n !execution ||\n execution.source.type !== input.source.type ||\n execution.source.eventId !== input.source.eventId ||\n execution.correlationId !== input.correlationId ||\n execution.requestedBy !== undefined\n ) {\n throw new PipelineError(\n `[Sixb] Pipeline run '${run.id}' already exists with different automatic provenance.`\n )\n }\n}\n\nfunction toEnqueueFailure(\n error: unknown,\n run: PipelineRunRecord,\n at: Date\n): SixbFailure<PipelineRunFailureCode> {\n const enqueueError = createSixbError(\n \"queue.enqueue_failed\",\n `[Sixb] Could not enqueue Pipeline run '${run.id}'.`,\n {\n cause: error,\n details: { pipelineId: run.pipelineId, runId: run.id, phase: \"enqueue\" },\n }\n )\n return toSixbFailure(enqueueError, { allowedCodes: PIPELINE_RUN_FAILURE_CODES, at })\n}\n\nfunction assertNonBlank(value: string, label: string): void {\n if (!value.trim()) throw new PipelineError(`[Sixb] ${label} must not be empty.`)\n}\n",
|
|
7
|
+
"import { assertAuthorized } from \"../authorization\"\nimport {\n createPrimitiveExecutionRecord,\n ensureExecutionRecord,\n executionRecordInputFromRuntime,\n} from \"../execution/durable\"\nimport type { ExecutionContext } from \"../execution/types\"\nimport type { SixbRuntimeContext } from \"../runtime/types\"\nimport { PipelineError } from \"./errors\"\nimport { dispatchPipelineRun } from \"./run-dispatch\"\nimport type { PipelineDefinition } from \"./types\"\n\nexport interface PipelineRunRequestOptions {\n /** Stable identity used to make dispatch idempotent. */\n readonly runId?: string\n}\n\nexport interface RequestPipelineRunInput extends PipelineRunRequestOptions {\n readonly pipelineId: string\n}\n\nexport interface PipelineRunRequestResult {\n readonly pipelineId: string\n readonly runId: string\n /** Durable time at which the run entered the queue. */\n readonly queuedAt: string\n readonly jobId?: string\n readonly created: boolean\n}\n\n/**\n * Authorize and queue a pipeline run request.\n *\n * Operates on an already-resolved definition and the shared runtime context, so the HTTP route and\n * the runtime verb cannot drift apart.\n *\n * The immutable child execution and queued run are persisted before queue publication.\n */\nexport async function requestPipelineRun(\n runtime: SixbRuntimeContext,\n execution: ExecutionContext,\n pipeline: PipelineDefinition,\n options: PipelineRunRequestOptions = {}\n): Promise<PipelineRunRequestResult> {\n assertAuthorized(runtime, { kind: \"pipeline.run\", pipelineId: pipeline.id })\n if (!runtime.storage.pipelineRuns) {\n throw new PipelineError(\"[Sixb] Pipeline run storage is not configured.\")\n }\n\n const queue = runtime.queues.pipelines\n if (!queue) {\n throw new PipelineError(\"[Sixb] Pipeline run queue is not configured.\")\n }\n\n return dispatchPipelineRun({\n errorReporterHost: runtime,\n projectId: runtime.projectId,\n pipeline,\n storage: runtime.storage,\n queue,\n ...options,\n createExecution: async (executionId, runId) => {\n const caller = await ensureExecutionRecord(\n runtime.storage.executions,\n executionRecordInputFromRuntime({\n execution,\n runtimeAuthorization: runtime.runtimeAuthorization,\n })\n )\n return createPrimitiveExecutionRecord({\n id: executionId,\n primitive: { kind: \"pipeline\", id: pipeline.id, runId },\n origin: { type: \"execution\", parent: caller },\n })\n },\n })\n}\n"
|
|
8
|
+
],
|
|
9
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,sBAAsB,MAAM;AAAA,EAC9B,OAAO;AAClB;;;ACFA;AAiEO,MAAM,sBAAyD;AAAA,EACvC;AAAA,EAA7B,WAAW,CAAkB,cAAiD;AAAA,IAAjD;AAAA;AAAA,OAEvB,SAAQ,CAAC,OAA6E;AAAA,IAC1F,6BAA6B,KAAK;AAAA,IAClC,MAAM,WAAW,KAAK,aAAa,YAAY,UAAU,QAAQ,MAAM,UAAU;AAAA,IACjF,IAAI,CAAC;AAAA,MAAU,MAAM,IAAI,cAAc,4BAA4B,MAAM,aAAa;AAAA,IAEtF,OAAO,oBAAoB;AAAA,MACzB,mBAAmB,KAAK;AAAA,MACxB,WAAW,KAAK,aAAa;AAAA,MAC7B;AAAA,MACA,SAAS,KAAK,aAAa;AAAA,MAC3B,OAAO,KAAK,aAAa,OAAO;AAAA,MAChC,OAAO,MAAM;AAAA,MACb,UAAU,MAAM;AAAA,MAChB,qBAAqB,CAAC,KAAK,YACzB,iCAAiC,SAAS,KAAK,aAAa,IAAI,OAAO,GAAG;AAAA,MAC5E,iBAAiB,OAAO,aAAa,UACnC,+BAA+B;AAAA,QAC7B,IAAI;AAAA,QACJ,WAAW,EAAE,MAAM,YAAY,IAAI,SAAS,IAAI,MAAM;AAAA,QACtD,QAAQ;AAAA,UACN,MAAM;AAAA,U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
|
|
|
1
|
-
import type { ConnectorAdapter, ConnectorDefinition } from "./types";
|
|
1
|
+
import type { ConnectorAdapter, ConnectorDefinition, OAuthConnectorAdapter } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Define a connector instance for an external system.
|
|
4
4
|
*
|
|
@@ -6,5 +6,6 @@ import type { ConnectorAdapter, ConnectorDefinition } from "./types";
|
|
|
6
6
|
* `connectors/` module. Use `await sixb.connector(definition)` at runtime to
|
|
7
7
|
* resolve it to a connected client.
|
|
8
8
|
*/
|
|
9
|
+
export declare function defineConnector<TId extends string, TAdapter extends OAuthConnectorAdapter>(id: TId, adapter: TAdapter): ConnectorDefinition<TId, TAdapter>;
|
|
9
10
|
export declare function defineConnector<TId extends string, TAdapter extends ConnectorAdapter>(id: TId, adapter: TAdapter): ConnectorDefinition<TId, TAdapter>;
|
|
10
11
|
//# sourceMappingURL=builders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../src/connectors/builders.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../src/connectors/builders.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAShB;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,SAAS,MAAM,EAAE,QAAQ,SAAS,qBAAqB,EACxF,EAAE,EAAE,GAAG,EACP,OAAO,EAAE,QAAQ,GAChB,mBAAmB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;AACrC,wBAAgB,eAAe,CAAC,GAAG,SAAS,MAAM,EAAE,QAAQ,SAAS,gBAAgB,EACnF,EAAE,EAAE,GAAG,EACP,OAAO,EAAE,QAAQ,GAChB,mBAAmB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { AuthorizablePrincipal } from "../../execution";
|
|
2
|
+
import type { ConnectorAuthorizationRecord, ConnectorConnectionRecord, ConnectorConnectionStorage } from "../../storage";
|
|
3
|
+
import type { ConnectorCredentialProtector } from "../credentials";
|
|
4
|
+
import type { ConnectorDefinition, ConnectorTokenSource, OAuthConnectorAdapter } from "../types";
|
|
5
|
+
import type { CompleteConnectorReauthorizationInput, CompleteNewConnectorAuthorizationInput, ConnectorAuthorizationLifecycle, PrepareConnectorReauthorizationInput, PreparedConnectorReauthorization } from "./request";
|
|
6
|
+
export type OAuthConnectorDefinition = ConnectorDefinition<string, OAuthConnectorAdapter>;
|
|
7
|
+
export interface ConnectorAuthorizationLifecycleOptions {
|
|
8
|
+
readonly projectId: string;
|
|
9
|
+
readonly storage: ConnectorConnectionStorage;
|
|
10
|
+
readonly credentialProtector: ConnectorCredentialProtector;
|
|
11
|
+
readonly resolveDefinition: (connectorId: string) => OAuthConnectorDefinition;
|
|
12
|
+
readonly hostSignal: () => AbortSignal;
|
|
13
|
+
readonly accountSelectionTtlMs: number;
|
|
14
|
+
readonly credentialMutationLeaseMs: number;
|
|
15
|
+
readonly providerOperationTimeoutMs: number;
|
|
16
|
+
readonly refreshSkewMs: number;
|
|
17
|
+
readonly now: () => Date;
|
|
18
|
+
}
|
|
19
|
+
export interface RevokeConnectorAuthorizationInput {
|
|
20
|
+
readonly definition: OAuthConnectorDefinition;
|
|
21
|
+
readonly authorizationId: string;
|
|
22
|
+
readonly principal: AuthorizablePrincipal;
|
|
23
|
+
}
|
|
24
|
+
export interface ConnectorAuthorizationRevocation {
|
|
25
|
+
readonly disconnected: readonly ConnectorConnectionRecord[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Owns OAuth grants and their encrypted credentials.
|
|
29
|
+
*
|
|
30
|
+
* Request authorization and attempt persistence stay in `request.ts`; provider-side mutations are
|
|
31
|
+
* fenced here through one shared coordinator. The host owns cancellation and exposes its current
|
|
32
|
+
* signal through a callback, so closing and restarting a host never leaves this lifecycle attached
|
|
33
|
+
* to a stale controller.
|
|
34
|
+
*/
|
|
35
|
+
export declare class DefaultConnectorAuthorizationLifecycle implements ConnectorAuthorizationLifecycle {
|
|
36
|
+
private readonly projectId;
|
|
37
|
+
private readonly storage;
|
|
38
|
+
private readonly resolveDefinition;
|
|
39
|
+
private readonly accountSelectionTtlMs;
|
|
40
|
+
private readonly mutations;
|
|
41
|
+
private readonly credentials;
|
|
42
|
+
private readonly tokens;
|
|
43
|
+
constructor(options: ConnectorAuthorizationLifecycleOptions);
|
|
44
|
+
prepareReauthorization(input: PrepareConnectorReauthorizationInput): Promise<PreparedConnectorReauthorization>;
|
|
45
|
+
completeNewAuthorization(input: CompleteNewConnectorAuthorizationInput): Promise<ConnectorAuthorizationRecord>;
|
|
46
|
+
completeReauthorization(input: CompleteConnectorReauthorizationInput): Promise<ConnectorAuthorizationRecord>;
|
|
47
|
+
revokeAuthorization(input: RevokeConnectorAuthorizationInput): Promise<ConnectorAuthorizationRevocation>;
|
|
48
|
+
/** Continues cleanup only after storage has already fenced the authorization from new usage. */
|
|
49
|
+
continuePendingRevocation(definition: OAuthConnectorDefinition, authorizationId: string): Promise<ConnectorAuthorizationRevocation>;
|
|
50
|
+
requireStableActiveAuthorization(definition: OAuthConnectorDefinition, authorizationId: string): Promise<ConnectorAuthorizationRecord>;
|
|
51
|
+
createTokenSource(definition: OAuthConnectorDefinition, authorizationId: string): ConnectorTokenSource;
|
|
52
|
+
requireAuthorization(connectorId: string, authorizationId: string): Promise<ConnectorAuthorizationRecord>;
|
|
53
|
+
private revokeAuthorizationRecord;
|
|
54
|
+
private revokeAbandonedAuthorization;
|
|
55
|
+
private completeReauthorizationMutation;
|
|
56
|
+
private exchangeAuthorizationCode;
|
|
57
|
+
private discoverAccounts;
|
|
58
|
+
private adapterContext;
|
|
59
|
+
private authorizationAdapterContext;
|
|
60
|
+
private definitionFor;
|
|
61
|
+
private assertRegistered;
|
|
62
|
+
}
|
|
63
|
+
export declare function assertConnectorAuthorizationActor(authorization: ConnectorAuthorizationRecord, principal: AuthorizablePrincipal): void;
|
|
64
|
+
//# sourceMappingURL=authorizations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorizations.d.ts","sourceRoot":"","sources":["../../../src/connectors/connections/authorizations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAC5D,OAAO,KAAK,EACV,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAA;AAQlE,OAAO,KAAK,EAEV,mBAAmB,EAEnB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,UAAU,CAAA;AAMjB,OAAO,KAAK,EACV,qCAAqC,EACrC,sCAAsC,EACtC,+BAA+B,EAC/B,oCAAoC,EACpC,gCAAgC,EACjC,MAAM,WAAW,CAAA;AAKlB,MAAM,MAAM,wBAAwB,GAAG,mBAAmB,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAA;AAEzF,MAAM,WAAW,sCAAsC;IACrD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,0BAA0B,CAAA;IAC5C,QAAQ,CAAC,mBAAmB,EAAE,4BAA4B,CAAA;IAC1D,QAAQ,CAAC,iBAAiB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,wBAAwB,CAAA;IAC7E,QAAQ,CAAC,UAAU,EAAE,MAAM,WAAW,CAAA;IACtC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAA;IACtC,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAA;IAC1C,QAAQ,CAAC,0BAA0B,EAAE,MAAM,CAAA;IAC3C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,GAAG,EAAE,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EAAE,wBAAwB,EACpC,eAAe,EAAE,MAAM,GACtB,oBAAoB;IAKjB,oBAAoB,CACxB,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,4BAA4B,CAAC;YAmB1B,yBAAyB;YA6FzB,4BAA4B;YAuB5B,+BAA+B;YA4G/B,yBAAyB;YAwBzB,gBAAgB;IAoB9B,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,2BAA2B;IAQnC,OAAO,CAAC,aAAa;IAWrB,OAAO,CAAC,gBAAgB;CAQzB;AAED,wBAAgB,iCAAiC,CAC/C,aAAa,EAAE,4BAA4B,EAC3C,SAAS,EAAE,qBAAqB,GAC/B,IAAI,CAUN"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ConnectorConnectionCallbackProcess } from "./contracts";
|
|
2
|
+
import type { ConnectorConnectionsRuntime } from "./execution";
|
|
3
|
+
export declare function registerConnectorConnectionsRuntime(owner: object, runtime: ConnectorConnectionsRuntime): void;
|
|
4
|
+
export declare function getConnectorConnectionsRuntime(owner: object): ConnectorConnectionsRuntime;
|
|
5
|
+
export declare function registerConnectorConnectionCallbackProcess(owner: object, process: ConnectorConnectionCallbackProcess): void;
|
|
6
|
+
export declare function getConnectorConnectionCallbackProcess(owner: object): ConnectorConnectionCallbackProcess;
|
|
7
|
+
//# sourceMappingURL=capability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../../src/connectors/connections/capability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,aAAa,CAAA;AACrE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAa9D,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,2BAA2B,GACnC,IAAI,CAWN;AAED,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,MAAM,GAAG,2BAA2B,CAIzF;AAED,wBAAgB,0CAA0C,CACxD,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,kCAAkC,GAC1C,IAAI,CAWN;AAED,wBAAgB,qCAAqC,CACnD,KAAK,EAAE,MAAM,GACZ,kCAAkC,CAIpC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AuthorizablePrincipal } from "../../execution";
|
|
2
|
+
import type { CreateExecutionInput, ExecutionRecord } from "../../storage/executions";
|
|
3
|
+
export interface ConnectorConnectionCommandActor {
|
|
4
|
+
readonly principal: AuthorizablePrincipal;
|
|
5
|
+
readonly credential: {
|
|
6
|
+
readonly type: "session";
|
|
7
|
+
readonly id: string;
|
|
8
|
+
} | {
|
|
9
|
+
readonly type: "accessToken";
|
|
10
|
+
readonly id: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/** Validate and recover the authenticated actor carried by one durable request execution. */
|
|
14
|
+
export declare function requireConnectorConnectionCommandActor(execution: CreateExecutionInput, projectId: string): ConnectorConnectionCommandActor;
|
|
15
|
+
/**
|
|
16
|
+
* Bind an OAuth callback to the same principal and credential that initiated its attempt.
|
|
17
|
+
*
|
|
18
|
+
* The storage error intentionally shares the regular invalid-attempt path: callers must not learn
|
|
19
|
+
* whether a valid state belongs to another authenticated actor.
|
|
20
|
+
*/
|
|
21
|
+
export declare function assertConnectorAuthorizationAttemptInitiator(execution: ExecutionRecord | null, current: ConnectorConnectionCommandActor): asserts execution is ExecutionRecord;
|
|
22
|
+
export declare function assertConnectorConnectionRunInitiator(execution: ExecutionRecord | null, current: ConnectorConnectionCommandActor, connectorId: string): asserts execution is ExecutionRecord;
|
|
23
|
+
//# sourceMappingURL=command-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-context.d.ts","sourceRoot":"","sources":["../../../src/connectors/connections/command-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAE5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAErF,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,SAAS,EAAE,qBAAqB,CAAA;IACzC,QAAQ,CAAC,UAAU,EACf;QAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GACjD;QAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;QAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;CAC1D;AAED,6FAA6F;AAC7F,wBAAgB,sCAAsC,CACpD,SAAS,EAAE,oBAAoB,EAC/B,SAAS,EAAE,MAAM,GAChB,+BAA+B,CAQjC;AAED;;;;;GAKG;AACH,wBAAgB,4CAA4C,CAC1D,SAAS,EAAE,eAAe,GAAG,IAAI,EACjC,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,SAAS,IAAI,eAAe,CAUtC;AAED,wBAAgB,qCAAqC,CACnD,SAAS,EAAE,eAAe,GAAG,IAAI,EACjC,OAAO,EAAE,+BAA+B,EACxC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,SAAS,IAAI,eAAe,CAUtC"}
|
|
@@ -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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