@sixb/core 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/index.d.ts +2 -2
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +28 -26
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/read-facade.d.ts +14 -16
- package/dist/actions/read-facade.d.ts.map +1 -1
- package/dist/actions/request.d.ts.map +1 -1
- package/dist/actions/run-dispatch.d.ts +2 -0
- package/dist/actions/run-dispatch.d.ts.map +1 -1
- package/dist/actions/types/context.d.ts +18 -31
- package/dist/actions/types/context.d.ts.map +1 -1
- package/dist/actions/types/params.d.ts +2 -1
- package/dist/actions/types/params.d.ts.map +1 -1
- package/dist/actions/worker.js +1 -1
- package/dist/agents/index.js +41 -39
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/streams/index.js +2 -2
- package/dist/agents/streams/internal.js +2 -2
- package/dist/assert-never.d.ts +6 -0
- package/dist/assert-never.d.ts.map +1 -0
- package/dist/auth/client-address.d.ts +3 -0
- package/dist/auth/client-address.d.ts.map +1 -0
- package/dist/auth/csrf.d.ts +5 -1
- package/dist/auth/csrf.d.ts.map +1 -1
- package/dist/auth/errors.d.ts +12 -0
- package/dist/auth/errors.d.ts.map +1 -1
- package/dist/auth/index.d.ts +4 -3
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +16 -8
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/runtime.d.ts +58 -41
- package/dist/auth/runtime.d.ts.map +1 -1
- package/dist/auth/session-cache.d.ts +10 -3
- package/dist/auth/session-cache.d.ts.map +1 -1
- package/dist/auth/sessions.d.ts +12 -0
- package/dist/auth/sessions.d.ts.map +1 -1
- package/dist/auth/strategy.d.ts +2 -0
- package/dist/auth/strategy.d.ts.map +1 -1
- package/dist/auth/strategy.js +4 -2
- package/dist/auth/strategy.js.map +1 -1
- package/dist/auth/types.d.ts +16 -15
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/authorization/index.js +3 -3
- package/dist/bootstrap/index.d.ts +1 -1
- package/dist/bootstrap/index.d.ts.map +1 -1
- package/dist/bootstrap/index.js +45 -43
- package/dist/bootstrap/index.js.map +1 -1
- package/dist/bootstrap/ontology-type-manifest.d.ts +8 -0
- package/dist/bootstrap/ontology-type-manifest.d.ts.map +1 -1
- package/dist/{chunk-m7cx05vp.js → chunk-00pfcqh4.js} +126 -59
- package/dist/{chunk-m7cx05vp.js.map → chunk-00pfcqh4.js.map} +13 -12
- package/dist/{chunk-nzsy3xrp.js → chunk-16jenmzw.js} +69 -44
- package/dist/{chunk-nzsy3xrp.js.map → chunk-16jenmzw.js.map} +7 -7
- package/dist/{chunk-y3ev53cq.js → chunk-2fv8sajb.js} +2 -2
- package/dist/{chunk-q5gz3g2j.js → chunk-2jntasmh.js} +13 -16
- package/dist/{chunk-q5gz3g2j.js.map → chunk-2jntasmh.js.map} +3 -3
- package/dist/chunk-3a338wrp.js +191 -0
- package/dist/chunk-3a338wrp.js.map +11 -0
- package/dist/{chunk-ybhz3j9g.js → chunk-3fpgxpsq.js} +104 -148
- package/dist/{chunk-ybhz3j9g.js.map → chunk-3fpgxpsq.js.map} +7 -8
- package/dist/{chunk-eyjzgav0.js → chunk-3nx8vj5a.js} +6 -4
- package/dist/chunk-3nx8vj5a.js.map +12 -0
- package/dist/{chunk-5tetw4hn.js → chunk-4tnrzqqh.js} +1 -1
- package/dist/{chunk-3ghw2t5q.js → chunk-4ypbe95r.js} +10 -16
- package/dist/chunk-4ypbe95r.js.map +10 -0
- package/dist/{chunk-2cxv584m.js → chunk-6rzb1g6h.js} +358 -248
- package/dist/chunk-6rzb1g6h.js.map +44 -0
- package/dist/{chunk-7zgecwy1.js → chunk-6x0pqh32.js} +12 -1
- package/dist/{chunk-7zgecwy1.js.map → chunk-6x0pqh32.js.map} +3 -3
- package/dist/{chunk-6ma8dvzc.js → chunk-728fp090.js} +49 -42
- package/dist/chunk-728fp090.js.map +15 -0
- package/dist/chunk-96yw3pwd.js.map +2 -2
- package/dist/{chunk-4k53sm9e.js → chunk-a0073121.js} +59 -59
- package/dist/{chunk-4k53sm9e.js.map → chunk-a0073121.js.map} +5 -5
- package/dist/{chunk-y1ahv8b7.js → chunk-bdhfn0ww.js} +1 -1
- package/dist/{chunk-kept9cdd.js → chunk-bxx3ms5t.js} +1 -1
- package/dist/{chunk-xtfryrfb.js → chunk-cbn96bve.js} +2 -2
- package/dist/{chunk-vsg0g7h9.js → chunk-d8yes9yx.js} +304 -45
- package/dist/chunk-d8yes9yx.js.map +20 -0
- package/dist/{chunk-vpxss818.js → chunk-drz59ve0.js} +9 -8
- package/dist/chunk-drz59ve0.js.map +10 -0
- package/dist/{chunk-7c2g3sz9.js → chunk-dsfw1bdr.js} +5 -5
- package/dist/{chunk-7c2g3sz9.js.map → chunk-dsfw1bdr.js.map} +1 -1
- package/dist/{chunk-qm535afa.js → chunk-dv4ct8mp.js} +66 -24
- package/dist/chunk-dv4ct8mp.js.map +15 -0
- package/dist/{chunk-t7dzd1tm.js → chunk-e2c5yxfe.js} +2 -2
- package/dist/{chunk-p6r1ex7t.js → chunk-ffwvdgk1.js} +5 -13
- package/dist/chunk-ffwvdgk1.js.map +10 -0
- package/dist/{chunk-tg4g4zh0.js → chunk-gct3m1da.js} +9 -9
- package/dist/{chunk-tg4g4zh0.js.map → chunk-gct3m1da.js.map} +3 -3
- package/dist/chunk-h89wz928.js +42 -0
- package/dist/chunk-h89wz928.js.map +10 -0
- package/dist/{chunk-b768c93y.js → chunk-hj0n3c2p.js} +83 -28
- package/dist/{chunk-b768c93y.js.map → chunk-hj0n3c2p.js.map} +5 -5
- package/dist/{chunk-hkw8rykk.js → chunk-ht4a7mjg.js} +74 -4
- package/dist/chunk-ht4a7mjg.js.map +15 -0
- package/dist/{chunk-7qnvhtcd.js → chunk-hxgj4kzd.js} +17 -17
- package/dist/{chunk-7qnvhtcd.js.map → chunk-hxgj4kzd.js.map} +5 -5
- package/dist/{chunk-bg2bs62d.js → chunk-jfdggg1p.js} +5 -5
- package/dist/{chunk-f06sf7rr.js → chunk-k4kkp58d.js} +18 -5
- package/dist/chunk-k4kkp58d.js.map +11 -0
- package/dist/{chunk-e1f1sqba.js → chunk-kxea54yg.js} +3 -3
- package/dist/{chunk-2h63nrde.js → chunk-ky7zpbtt.js} +5 -7
- package/dist/{chunk-2h63nrde.js.map → chunk-ky7zpbtt.js.map} +3 -4
- package/dist/chunk-m4ehq95f.js +9 -0
- package/dist/chunk-m4ehq95f.js.map +10 -0
- package/dist/{chunk-0mza4xb2.js → chunk-m8zkvep1.js} +2 -2
- package/dist/{chunk-xn686q2e.js → chunk-ma1mhh7w.js} +75 -57
- package/dist/{chunk-xn686q2e.js.map → chunk-ma1mhh7w.js.map} +3 -3
- package/dist/{chunk-yxb4c62x.js → chunk-mr60an99.js} +3 -2
- package/dist/{chunk-yxb4c62x.js.map → chunk-mr60an99.js.map} +3 -3
- package/dist/{chunk-g50nxqs5.js → chunk-pvgpckm1.js} +63 -20
- package/dist/chunk-pvgpckm1.js.map +20 -0
- package/dist/{chunk-jjwhy3rs.js → chunk-q2xghyft.js} +5 -5
- package/dist/chunk-rdghfsss.js.map +2 -2
- package/dist/{chunk-bbaa1fet.js → chunk-rzcjp5m2.js} +7 -3
- package/dist/chunk-rzcjp5m2.js.map +25 -0
- package/dist/{chunk-hzw7yv5g.js → chunk-rzkr70gr.js} +5 -1
- package/dist/{chunk-hzw7yv5g.js.map → chunk-rzkr70gr.js.map} +3 -3
- package/dist/{chunk-axndsymr.js → chunk-tw03bsmb.js} +2 -2
- package/dist/{chunk-axndsymr.js.map → chunk-tw03bsmb.js.map} +3 -3
- package/dist/{chunk-y0v18c2j.js → chunk-vef6qa14.js} +2 -2
- package/dist/{chunk-gzt6v1ja.js → chunk-vn3yh259.js} +1 -1
- package/dist/{chunk-sfypc7mk.js → chunk-wn7mznxc.js} +4 -4
- package/dist/{chunk-r5zythxp.js → chunk-wnxabtn4.js} +7 -7
- package/dist/{chunk-4ph94nhd.js → chunk-ww185kt6.js} +2 -2
- package/dist/{chunk-3h7ctayx.js → chunk-xgptywp0.js} +4 -3
- package/dist/chunk-xgptywp0.js.map +11 -0
- package/dist/{chunk-gswwr35f.js → chunk-y487ywrv.js} +4 -4
- package/dist/{chunk-bet1rb9h.js → chunk-y6vnvayj.js} +1 -1
- package/dist/{chunk-x9tmx3fc.js → chunk-ypj2wqtj.js} +3 -6
- package/dist/{chunk-x9tmx3fc.js.map → chunk-ypj2wqtj.js.map} +4 -4
- package/dist/{chunk-3bnt2wna.js → chunk-yvf2jqj8.js} +1 -1
- package/dist/{chunk-g2gezsg5.js → chunk-z9h698s8.js} +1 -1
- package/dist/{chunk-wjffn5m4.js → chunk-zdkcdshk.js} +3 -36
- package/dist/{chunk-wjffn5m4.js.map → chunk-zdkcdshk.js.map} +3 -4
- package/dist/{chunk-bfjv1adk.js → chunk-znw0zvy4.js} +1 -1
- package/dist/edits/types.d.ts +19 -19
- package/dist/edits/types.d.ts.map +1 -1
- package/dist/error-reporting/internal.js +3 -3
- package/dist/errors/catalog.d.ts +4 -0
- package/dist/errors/catalog.d.ts.map +1 -1
- package/dist/errors/internal.js +1 -1
- package/dist/events/envelope.d.ts +0 -12
- package/dist/events/envelope.d.ts.map +1 -1
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +3 -3
- package/dist/events/service.d.ts +1 -2
- package/dist/events/service.d.ts.map +1 -1
- package/dist/events/toStoredEvent.d.ts +1 -2
- package/dist/events/toStoredEvent.d.ts.map +1 -1
- package/dist/events/types/index.d.ts +2 -1
- package/dist/events/types/index.d.ts.map +1 -1
- package/dist/execution/agent.d.ts +1 -2
- package/dist/execution/agent.d.ts.map +1 -1
- package/dist/execution/agent.js +39 -37
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/authorized-object-reader.d.ts.map +1 -1
- package/dist/execution/primitive.d.ts +1 -2
- package/dist/execution/primitive.d.ts.map +1 -1
- package/dist/execution/primitive.js +38 -36
- package/dist/execution/primitive.js.map +3 -3
- package/dist/execution/request.d.ts +1 -2
- package/dist/execution/request.d.ts.map +1 -1
- package/dist/execution/request.js +39 -37
- package/dist/execution/request.js.map +3 -3
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +56 -50
- package/dist/index.js.map +1 -1
- package/dist/maintenance/ontology-maintenance.d.ts +11 -1
- package/dist/maintenance/ontology-maintenance.d.ts.map +1 -1
- package/dist/materialization/errors.d.ts +3 -1
- package/dist/materialization/errors.d.ts.map +1 -1
- package/dist/materialization/events.d.ts +27 -2
- package/dist/materialization/events.d.ts.map +1 -1
- package/dist/materializer/edits/commit.d.ts.map +1 -1
- package/dist/materializer/edits/operations.d.ts +2 -1
- package/dist/materializer/edits/operations.d.ts.map +1 -1
- package/dist/materializer/edits/plan.d.ts +2 -2
- package/dist/materializer/edits/plan.d.ts.map +1 -1
- package/dist/materializer/edits/user-refs.d.ts +30 -0
- package/dist/materializer/edits/user-refs.d.ts.map +1 -0
- package/dist/materializer/effective/build-events.d.ts +2 -2
- package/dist/materializer/effective/build-events.d.ts.map +1 -1
- package/dist/materializer/execution/scope.d.ts +11 -3
- package/dist/materializer/execution/scope.d.ts.map +1 -1
- package/dist/materializer/index.js +23 -21
- package/dist/materializer/index.js.map +1 -1
- package/dist/materializer/projections/replacement-plan.d.ts +2 -0
- package/dist/materializer/projections/replacement-plan.d.ts.map +1 -1
- package/dist/materializer/telemetry/plan.d.ts +2 -2
- package/dist/materializer/telemetry/plan.d.ts.map +1 -1
- package/dist/models/execution/index.js +23 -21
- package/dist/models/execution/index.js.map +1 -1
- package/dist/models/index.js +1 -1
- package/dist/objects/execution.d.ts +21 -27
- package/dist/objects/execution.d.ts.map +1 -1
- package/dist/objects/index.js +28 -26
- package/dist/objects/index.js.map +1 -1
- package/dist/objects/query/executor.d.ts.map +1 -1
- package/dist/objects/query/index.js +27 -25
- package/dist/objects/query/index.js.map +1 -1
- package/dist/objects/query/ir.d.ts +8 -1
- package/dist/objects/query/ir.d.ts.map +1 -1
- package/dist/objects/query/scalar-values.d.ts.map +1 -1
- package/dist/objects/query/validate.d.ts.map +1 -1
- package/dist/objects/sdk/object-handle.d.ts +1 -2
- package/dist/objects/sdk/object-handle.d.ts.map +1 -1
- package/dist/objects/sdk/object-set.d.ts +2 -3
- package/dist/objects/sdk/object-set.d.ts.map +1 -1
- package/dist/objects/sdk/query-builder.d.ts +8 -10
- package/dist/objects/sdk/query-builder.d.ts.map +1 -1
- package/dist/objects/sdk/telemetry-channel.d.ts +1 -2
- package/dist/objects/sdk/telemetry-channel.d.ts.map +1 -1
- package/dist/objects/sdk/where.d.ts +2 -3
- package/dist/objects/sdk/where.d.ts.map +1 -1
- package/dist/ontology/builders.d.ts +11 -10
- package/dist/ontology/builders.d.ts.map +1 -1
- package/dist/ontology/index.d.ts +4 -2
- package/dist/ontology/index.d.ts.map +1 -1
- package/dist/ontology/index.js +6 -4
- package/dist/ontology/index.js.map +1 -1
- package/dist/ontology/inference/index.d.ts +34 -22
- package/dist/ontology/inference/index.d.ts.map +1 -1
- package/dist/ontology/internal.d.ts +1 -0
- package/dist/ontology/internal.d.ts.map +1 -1
- package/dist/ontology/internal.js +9 -7
- package/dist/ontology/internal.js.map +1 -1
- package/dist/ontology/primitives.d.ts +38 -0
- package/dist/ontology/primitives.d.ts.map +1 -0
- package/dist/ontology/query-capabilities.d.ts +38 -0
- package/dist/ontology/query-capabilities.d.ts.map +1 -0
- package/dist/ontology/refs.d.ts +23 -2
- package/dist/ontology/refs.d.ts.map +1 -1
- package/dist/ontology/registered.d.ts +16 -0
- package/dist/ontology/registered.d.ts.map +1 -0
- package/dist/ontology/registry.d.ts.map +1 -1
- package/dist/ontology/tokens.d.ts +35 -1
- package/dist/ontology/tokens.d.ts.map +1 -1
- package/dist/ontology/types.d.ts +18 -4
- package/dist/ontology/types.d.ts.map +1 -1
- package/dist/ontology/user-ref.d.ts +35 -0
- package/dist/ontology/user-ref.d.ts.map +1 -0
- package/dist/ontology/validation/definition.d.ts.map +1 -1
- package/dist/ontology/validation/index.d.ts +1 -1
- package/dist/ontology/validation/index.d.ts.map +1 -1
- package/dist/ontology/validation/normalize.d.ts.map +1 -1
- package/dist/ontology/validation/properties.d.ts +6 -1
- package/dist/ontology/validation/properties.d.ts.map +1 -1
- package/dist/ontology/validation/query.d.ts.map +1 -1
- package/dist/ontology/validation/schema.d.ts.map +1 -1
- package/dist/pipelines/index.js +26 -24
- package/dist/pipelines/index.js.map +1 -1
- package/dist/predicates/types.d.ts +53 -3
- package/dist/predicates/types.d.ts.map +1 -1
- package/dist/projections/builders.d.ts +19 -1
- package/dist/projections/builders.d.ts.map +1 -1
- package/dist/projections/internal.js +23 -21
- package/dist/projections/internal.js.map +1 -1
- package/dist/projections/validation.d.ts.map +1 -1
- package/dist/query.js +2 -2
- package/dist/queues/in-memory.d.ts +1 -1
- package/dist/queues/in-memory.d.ts.map +1 -1
- package/dist/runtime/create.d.ts +1 -1
- package/dist/runtime/create.d.ts.map +1 -1
- package/dist/runtime/host.d.ts +5 -5
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/internal.js +27 -25
- package/dist/runtime/internal.js.map +1 -1
- package/dist/runtime/sixb.d.ts +5 -5
- package/dist/runtime/sixb.d.ts.map +1 -1
- package/dist/runtime/types.d.ts +171 -188
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/sandboxes/index.js +5 -5
- package/dist/sandboxes/sandbox.d.ts +4 -1
- package/dist/sandboxes/sandbox.d.ts.map +1 -1
- package/dist/shared/params/types.d.ts +4 -3
- package/dist/shared/params/types.d.ts.map +1 -1
- package/dist/shared/params/user-refs.d.ts +19 -0
- package/dist/shared/params/user-refs.d.ts.map +1 -0
- package/dist/shares/compiler.d.ts.map +1 -1
- package/dist/shares/internal.js +24 -22
- package/dist/shares/internal.js.map +2 -2
- package/dist/storage/action-runs/failure.js +2 -2
- package/dist/storage/action-runs/types.d.ts +1 -1
- package/dist/storage/action-runs/types.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +1 -1
- package/dist/storage/ai-limits/enforcement.js +2 -2
- package/dist/storage/auth/errors.d.ts +1 -1
- package/dist/storage/auth/errors.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/access-tokens.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/auth-storage.d.ts +2 -1
- package/dist/storage/auth/in-memory/auth-storage.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/device-authorizations.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/sessions.d.ts +8 -1
- package/dist/storage/auth/in-memory/sessions.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/shared.d.ts.map +1 -1
- package/dist/storage/auth/index.d.ts +1 -1
- package/dist/storage/auth/index.d.ts.map +1 -1
- package/dist/storage/auth/types.d.ts +77 -20
- package/dist/storage/auth/types.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider.js +1 -1
- package/dist/storage/executions/provider.js +1 -1
- package/dist/storage/file-upload-sessions/in-memory.d.ts +9 -18
- package/dist/storage/file-upload-sessions/in-memory.d.ts.map +1 -1
- package/dist/storage/file-upload-sessions/index.d.ts +1 -1
- package/dist/storage/file-upload-sessions/index.d.ts.map +1 -1
- package/dist/storage/file-upload-sessions/provider.d.ts +52 -0
- package/dist/storage/file-upload-sessions/provider.d.ts.map +1 -0
- package/dist/storage/file-upload-sessions/provider.js +24 -0
- package/dist/storage/file-upload-sessions/provider.js.map +9 -0
- package/dist/storage/file-upload-sessions/types.d.ts +19 -1
- package/dist/storage/file-upload-sessions/types.d.ts.map +1 -1
- package/dist/storage/file-upload-sessions/utils.d.ts +8 -2
- package/dist/storage/file-upload-sessions/utils.d.ts.map +1 -1
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +29 -25
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.js +11 -9
- package/dist/storage/internal.js.map +1 -1
- package/dist/storage/objects/in-memory/query.d.ts.map +1 -1
- package/dist/storage/ontology/commits.d.ts +6 -2
- package/dist/storage/ontology/commits.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/provider-work.d.ts.map +1 -1
- package/dist/storage/ontology/provider.d.ts +14 -1
- package/dist/storage/ontology/provider.d.ts.map +1 -1
- package/dist/storage/ontology/provider.js +8 -2
- 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/projection-runs/provider.js +2 -2
- package/dist/storage/types.d.ts +1 -1
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/storage/workflow-interventions/index.d.ts +1 -1
- package/dist/storage/workflow-interventions/index.d.ts.map +1 -1
- package/dist/storage/workflow-interventions/types.d.ts +5 -8
- package/dist/storage/workflow-interventions/types.d.ts.map +1 -1
- package/dist/storage/workflow-runs/provider.js +8 -8
- package/dist/syncs/index.js +27 -25
- package/dist/syncs/index.js.map +1 -1
- package/dist/testing/action-execution.d.ts +4 -0
- package/dist/testing/action-execution.d.ts.map +1 -1
- package/dist/testing/auth-storage-contract.d.ts.map +1 -1
- package/dist/testing/execution.d.ts +1 -2
- package/dist/testing/execution.d.ts.map +1 -1
- package/dist/testing/file-upload-session-storage-contract.d.ts +12 -0
- package/dist/testing/file-upload-session-storage-contract.d.ts.map +1 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +2035 -1358
- package/dist/testing/index.js.map +15 -13
- package/dist/testing/materializer-storage-contract.d.ts.map +1 -1
- package/dist/testing/object-query-contract.d.ts.map +1 -1
- package/dist/testing/ontology-contract-fixture.d.ts +8 -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/sandboxes-contract.d.ts.map +1 -1
- package/dist/testing/workflow-intervention-storage-contract.d.ts +8 -0
- package/dist/testing/workflow-intervention-storage-contract.d.ts.map +1 -0
- package/dist/webhooks/internal.js +24 -22
- package/dist/webhooks/internal.js.map +2 -2
- package/dist/webhooks/types.d.ts +2 -2
- package/dist/webhooks/types.d.ts.map +1 -1
- package/dist/workers/index.js +1 -1
- package/dist/workflows/index.js +42 -40
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/run-dispatch.d.ts.map +1 -1
- package/dist/workflows/types.d.ts +2 -2
- package/dist/workflows/types.d.ts.map +1 -1
- package/package.json +7 -1
- package/src/actions/index.ts +0 -3
- package/src/actions/read-facade.ts +102 -62
- package/src/actions/request.ts +13 -0
- package/src/actions/run-dispatch.ts +3 -0
- package/src/actions/types/context.ts +17 -65
- package/src/actions/types/params.ts +2 -1
- package/src/agents/authority.ts +1 -1
- package/src/assert-never.ts +7 -0
- package/src/auth/client-address.ts +12 -0
- package/src/auth/csrf.ts +14 -5
- package/src/auth/errors.ts +23 -0
- package/src/auth/index.ts +4 -3
- package/src/auth/runtime.ts +353 -297
- package/src/auth/session-cache.ts +18 -6
- package/src/auth/sessions.ts +30 -0
- package/src/auth/strategy.ts +2 -0
- package/src/auth/types.ts +15 -17
- package/src/bootstrap/index.ts +1 -0
- package/src/bootstrap/ontology-type-manifest.ts +112 -60
- package/src/edits/types.ts +47 -63
- package/src/errors/catalog.ts +4 -0
- package/src/events/envelope.ts +0 -13
- package/src/events/index.ts +1 -1
- package/src/events/service.ts +1 -11
- package/src/events/toStoredEvent.ts +1 -3
- package/src/events/types/index.ts +1 -1
- package/src/execution/agent.ts +1 -2
- package/src/execution/authorized-object-reader.ts +5 -7
- package/src/execution/primitive.ts +1 -2
- package/src/execution/request.ts +1 -2
- package/src/index.ts +8 -7
- package/src/maintenance/ontology-maintenance.ts +77 -1
- package/src/materialization/errors.ts +2 -0
- package/src/materialization/events.ts +27 -2
- package/src/materializer/README.md +2 -0
- package/src/materializer/edits/commit.ts +21 -12
- package/src/materializer/edits/operations.ts +32 -4
- package/src/materializer/edits/plan.ts +4 -5
- package/src/materializer/edits/user-refs.ts +115 -0
- package/src/materializer/effective/build-events.ts +4 -5
- package/src/materializer/execution/scope.ts +40 -7
- package/src/materializer/projections/replace.ts +2 -0
- package/src/materializer/projections/replacement-plan.ts +4 -0
- package/src/materializer/telemetry/append.ts +4 -12
- package/src/materializer/telemetry/plan.ts +4 -5
- package/src/objects/execution.ts +33 -62
- package/src/objects/query/executor.ts +12 -3
- package/src/objects/query/ir.ts +7 -0
- package/src/objects/query/planner.ts +1 -0
- package/src/objects/query/scalar-values.ts +19 -0
- package/src/objects/query/validate.ts +55 -44
- package/src/objects/sdk/object-handle.ts +8 -8
- package/src/objects/sdk/object-set.ts +8 -15
- package/src/objects/sdk/query-builder.ts +59 -71
- package/src/objects/sdk/telemetry-channel.ts +6 -7
- package/src/objects/sdk/where.ts +6 -13
- package/src/ontology/builders.ts +15 -11
- package/src/ontology/index.ts +4 -0
- package/src/ontology/inference/index.ts +56 -36
- package/src/ontology/internal.ts +1 -0
- package/src/ontology/json-schema.ts +12 -0
- package/src/ontology/primitives.ts +91 -0
- package/src/ontology/query-capabilities.ts +136 -0
- package/src/ontology/refs.ts +33 -6
- package/src/ontology/registered.ts +22 -0
- package/src/ontology/registry.ts +6 -3
- package/src/ontology/tokens.ts +41 -2
- package/src/ontology/types.ts +19 -3
- package/src/ontology/user-ref.ts +120 -0
- package/src/ontology/validation/definition.ts +2 -13
- package/src/ontology/validation/index.ts +1 -0
- package/src/ontology/validation/normalize.ts +39 -3
- package/src/ontology/validation/properties.ts +95 -19
- package/src/ontology/validation/query.ts +11 -42
- package/src/ontology/validation/schema.ts +16 -0
- package/src/predicates/types.ts +43 -33
- package/src/projections/builders.ts +24 -3
- package/src/projections/validation.ts +15 -1
- package/src/runtime/create.ts +2 -2
- package/src/runtime/host.ts +10 -12
- package/src/runtime/index.ts +3 -2
- package/src/runtime/sixb.ts +13 -23
- package/src/runtime/types.ts +277 -479
- package/src/sandboxes/sandbox.ts +4 -1
- package/src/shared/params/types.ts +4 -3
- package/src/shared/params/user-refs.ts +48 -0
- package/src/shares/compiler.ts +6 -16
- package/src/storage/action-runs/types.ts +1 -0
- package/src/storage/auth/errors.ts +0 -1
- package/src/storage/auth/in-memory/access-tokens.ts +5 -2
- package/src/storage/auth/in-memory/auth-storage.ts +49 -73
- package/src/storage/auth/in-memory/device-authorizations.ts +0 -2
- package/src/storage/auth/in-memory/sessions.ts +69 -1
- package/src/storage/auth/in-memory/shared.ts +13 -7
- package/src/storage/auth/index.ts +2 -1
- package/src/storage/auth/types.ts +72 -20
- package/src/storage/executions/validation.ts +1 -1
- package/src/storage/file-upload-sessions/in-memory.ts +64 -113
- package/src/storage/file-upload-sessions/index.ts +1 -0
- package/src/storage/file-upload-sessions/provider.ts +258 -0
- package/src/storage/file-upload-sessions/types.ts +20 -1
- package/src/storage/file-upload-sessions/utils.ts +25 -9
- package/src/storage/index.ts +3 -2
- package/src/storage/objects/in-memory/query.ts +13 -3
- package/src/storage/ontology/commits.ts +6 -2
- package/src/storage/ontology/in-memory/materializations.ts +6 -34
- package/src/storage/ontology/provider-header-validation.ts +57 -0
- package/src/storage/ontology/provider-work.ts +15 -3
- package/src/storage/ontology/provider.ts +59 -1
- package/src/storage/operation-scope.ts +1 -0
- package/src/storage/types.ts +0 -1
- package/src/storage/workflow-interventions/index.ts +0 -1
- package/src/storage/workflow-interventions/types.ts +5 -9
- package/src/testing/action-execution.ts +13 -3
- package/src/testing/auth-storage-contract.ts +253 -192
- package/src/testing/execution-storage-contract.ts +1 -2
- package/src/testing/execution.ts +4 -7
- package/src/testing/file-upload-session-storage-contract.ts +335 -0
- package/src/testing/index.ts +8 -0
- package/src/testing/materializer-storage-contract.ts +86 -4
- package/src/testing/object-query-contract.ts +121 -2
- package/src/testing/ontology-contract-fixture.ts +23 -3
- package/src/testing/ontology-storage-contract.ts +58 -0
- package/src/testing/sandboxes-contract.ts +27 -0
- package/src/testing/workflow-intervention-storage-contract.ts +203 -0
- package/src/webhooks/types.ts +2 -2
- package/src/workflows/run-dispatch.ts +12 -1
- package/src/workflows/snapshot.ts +16 -7
- package/src/workflows/types.ts +2 -2
- package/dist/chunk-2cxv584m.js.map +0 -43
- package/dist/chunk-3ghw2t5q.js.map +0 -10
- package/dist/chunk-3h7ctayx.js.map +0 -11
- package/dist/chunk-6ma8dvzc.js.map +0 -15
- package/dist/chunk-bbaa1fet.js.map +0 -25
- package/dist/chunk-eyjzgav0.js.map +0 -12
- package/dist/chunk-f06sf7rr.js.map +0 -11
- package/dist/chunk-g50nxqs5.js.map +0 -18
- package/dist/chunk-hkw8rykk.js.map +0 -15
- package/dist/chunk-p6r1ex7t.js.map +0 -10
- package/dist/chunk-qm535afa.js.map +0 -15
- package/dist/chunk-vpxss818.js.map +0 -10
- package/dist/chunk-vsg0g7h9.js.map +0 -17
- /package/dist/{chunk-y3ev53cq.js.map → chunk-2fv8sajb.js.map} +0 -0
- /package/dist/{chunk-5tetw4hn.js.map → chunk-4tnrzqqh.js.map} +0 -0
- /package/dist/{chunk-y1ahv8b7.js.map → chunk-bdhfn0ww.js.map} +0 -0
- /package/dist/{chunk-kept9cdd.js.map → chunk-bxx3ms5t.js.map} +0 -0
- /package/dist/{chunk-xtfryrfb.js.map → chunk-cbn96bve.js.map} +0 -0
- /package/dist/{chunk-t7dzd1tm.js.map → chunk-e2c5yxfe.js.map} +0 -0
- /package/dist/{chunk-bg2bs62d.js.map → chunk-jfdggg1p.js.map} +0 -0
- /package/dist/{chunk-e1f1sqba.js.map → chunk-kxea54yg.js.map} +0 -0
- /package/dist/{chunk-0mza4xb2.js.map → chunk-m8zkvep1.js.map} +0 -0
- /package/dist/{chunk-jjwhy3rs.js.map → chunk-q2xghyft.js.map} +0 -0
- /package/dist/{chunk-y0v18c2j.js.map → chunk-vef6qa14.js.map} +0 -0
- /package/dist/{chunk-gzt6v1ja.js.map → chunk-vn3yh259.js.map} +0 -0
- /package/dist/{chunk-sfypc7mk.js.map → chunk-wn7mznxc.js.map} +0 -0
- /package/dist/{chunk-r5zythxp.js.map → chunk-wnxabtn4.js.map} +0 -0
- /package/dist/{chunk-4ph94nhd.js.map → chunk-ww185kt6.js.map} +0 -0
- /package/dist/{chunk-gswwr35f.js.map → chunk-y487ywrv.js.map} +0 -0
- /package/dist/{chunk-bet1rb9h.js.map → chunk-y6vnvayj.js.map} +0 -0
- /package/dist/{chunk-3bnt2wna.js.map → chunk-yvf2jqj8.js.map} +0 -0
- /package/dist/{chunk-g2gezsg5.js.map → chunk-z9h698s8.js.map} +0 -0
- /package/dist/{chunk-bfjv1adk.js.map → chunk-znw0zvy4.js.map} +0 -0
|
@@ -37,6 +37,24 @@ function sessionInput(
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
function bearerSessionInput(id: string) {
|
|
41
|
+
return {
|
|
42
|
+
id,
|
|
43
|
+
projectId,
|
|
44
|
+
userId: "usr_1",
|
|
45
|
+
strategyId: "magic-link",
|
|
46
|
+
audience: "atlas" as const,
|
|
47
|
+
tokenHash: "access-1",
|
|
48
|
+
createdAt: at("2026-05-14T10:00:00.000Z"),
|
|
49
|
+
expiresAt: at("2026-06-14T10:00:00.000Z"),
|
|
50
|
+
bearer: {
|
|
51
|
+
clientName: "sixb CLI",
|
|
52
|
+
accessExpiresAt: at("2026-05-14T10:15:00.000Z"),
|
|
53
|
+
refreshTokenHash: "refresh-1",
|
|
54
|
+
},
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
40
58
|
async function expectAuthError(
|
|
41
59
|
promise: Promise<unknown>,
|
|
42
60
|
code: AuthStorageErrorCode
|
|
@@ -63,6 +81,34 @@ async function createUser(
|
|
|
63
81
|
})
|
|
64
82
|
}
|
|
65
83
|
|
|
84
|
+
async function completeOidcSignInForAva(
|
|
85
|
+
storage: AuthStorage,
|
|
86
|
+
directoryGroupIds: readonly string[] | undefined
|
|
87
|
+
): Promise<void> {
|
|
88
|
+
await storage.oidcAuthorizationAttempts.create({
|
|
89
|
+
id: "oidc_directory",
|
|
90
|
+
projectId,
|
|
91
|
+
strategyId: "entra",
|
|
92
|
+
audience: "atlas",
|
|
93
|
+
stateHash: "directory-state",
|
|
94
|
+
nonceHash: "nonce-hash",
|
|
95
|
+
codeVerifier: "verifier",
|
|
96
|
+
createdAt: at("2026-05-14T10:00:00.000Z"),
|
|
97
|
+
expiresAt: at("2026-05-14T10:10:00.000Z"),
|
|
98
|
+
})
|
|
99
|
+
await storage.completeOidcSignIn({
|
|
100
|
+
projectId,
|
|
101
|
+
oidcAuthorizationAttemptId: "oidc_directory",
|
|
102
|
+
stateHash: "directory-state",
|
|
103
|
+
completedAt: at("2026-05-14T10:01:00.000Z"),
|
|
104
|
+
subject: "entra-ava",
|
|
105
|
+
email: "ava@acme.com",
|
|
106
|
+
directoryGroupIds,
|
|
107
|
+
newUserId: "usr_unused",
|
|
108
|
+
session: sessionInput("ses_directory"),
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
|
|
66
112
|
/**
|
|
67
113
|
* Runs the shared `AuthStorage` contract against any storage implementation.
|
|
68
114
|
*
|
|
@@ -851,8 +897,7 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
851
897
|
projectId,
|
|
852
898
|
name: "Local CLI",
|
|
853
899
|
kind: "personal",
|
|
854
|
-
|
|
855
|
-
subjectId: "usr_1",
|
|
900
|
+
subject: { type: "user", id: "usr_1" },
|
|
856
901
|
tokenHash: "hash-personal",
|
|
857
902
|
groupIds: ["commercial", "commercial", "finance"],
|
|
858
903
|
createdAt: at("2026-05-14T10:01:00.000Z"),
|
|
@@ -893,8 +938,7 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
893
938
|
projectId,
|
|
894
939
|
name: "Sandbox agent",
|
|
895
940
|
kind: "serviceAccount",
|
|
896
|
-
|
|
897
|
-
subjectId: "svc_ingest",
|
|
941
|
+
subject: { type: "serviceAccount", id: "svc_ingest" },
|
|
898
942
|
tokenHash: "hash-service",
|
|
899
943
|
createdAt: at("2026-05-14T10:04:00.000Z"),
|
|
900
944
|
expiresAt: at("2026-05-21T10:04:00.000Z"),
|
|
@@ -902,8 +946,7 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
902
946
|
await expect(
|
|
903
947
|
storage.accessTokens.list({
|
|
904
948
|
projectId,
|
|
905
|
-
|
|
906
|
-
subjectId: "svc_ingest",
|
|
949
|
+
subject: { type: "serviceAccount", id: "svc_ingest" },
|
|
907
950
|
})
|
|
908
951
|
).resolves.toMatchObject({
|
|
909
952
|
accessTokens: [{ id: "tok_service" }],
|
|
@@ -978,8 +1021,7 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
978
1021
|
projectId,
|
|
979
1022
|
name: `Token by ${principal.type}`,
|
|
980
1023
|
kind: "personal",
|
|
981
|
-
|
|
982
|
-
subjectId: "usr_creator",
|
|
1024
|
+
subject: { type: "user", id: "usr_creator" },
|
|
983
1025
|
tokenHash: `hash-${tokenId}`,
|
|
984
1026
|
createdByPrincipal: principal,
|
|
985
1027
|
createdBySessionId: "ses_creator",
|
|
@@ -1019,8 +1061,7 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
1019
1061
|
projectId,
|
|
1020
1062
|
name: "Touch token",
|
|
1021
1063
|
kind: "personal",
|
|
1022
|
-
|
|
1023
|
-
subjectId: "usr_1",
|
|
1064
|
+
subject: { type: "user", id: "usr_1" },
|
|
1024
1065
|
tokenHash: "hash-touch",
|
|
1025
1066
|
createdAt: at("2026-05-14T10:00:00.000Z"),
|
|
1026
1067
|
expiresAt: at("2026-05-21T10:00:00.000Z"),
|
|
@@ -1066,8 +1107,7 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
1066
1107
|
projectId,
|
|
1067
1108
|
name: `Token ${id}`,
|
|
1068
1109
|
kind: "personal",
|
|
1069
|
-
|
|
1070
|
-
subjectId: "usr_1",
|
|
1110
|
+
subject: { type: "user", id: "usr_1" },
|
|
1071
1111
|
tokenHash: `hash-${id}`,
|
|
1072
1112
|
createdAt: at(`2026-05-14T10:0${index}:00.000Z`),
|
|
1073
1113
|
expiresAt: at(`2026-05-21T10:0${index}:00.000Z`),
|
|
@@ -1182,8 +1222,7 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
1182
1222
|
projectId,
|
|
1183
1223
|
name: "Bad kind",
|
|
1184
1224
|
kind: "serviceAccount",
|
|
1185
|
-
|
|
1186
|
-
subjectId: "usr_1",
|
|
1225
|
+
subject: { type: "user", id: "usr_1" },
|
|
1187
1226
|
tokenHash: "hash",
|
|
1188
1227
|
createdAt: at("2026-05-14T10:00:00.000Z"),
|
|
1189
1228
|
expiresAt: at("2026-05-21T10:00:00.000Z"),
|
|
@@ -1196,8 +1235,7 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
1196
1235
|
projectId,
|
|
1197
1236
|
name: "Missing subject",
|
|
1198
1237
|
kind: "serviceAccount",
|
|
1199
|
-
|
|
1200
|
-
subjectId: "svc_missing",
|
|
1238
|
+
subject: { type: "serviceAccount", id: "svc_missing" },
|
|
1201
1239
|
tokenHash: "hash",
|
|
1202
1240
|
createdAt: at("2026-05-14T10:00:00.000Z"),
|
|
1203
1241
|
expiresAt: at("2026-05-21T10:00:00.000Z"),
|
|
@@ -1316,11 +1354,11 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
1316
1354
|
})
|
|
1317
1355
|
})
|
|
1318
1356
|
|
|
1319
|
-
test("authorizes a device and atomically
|
|
1357
|
+
test("authorizes a device and atomically starts its bearer session", async () => {
|
|
1320
1358
|
await withStorage(async (storage) => {
|
|
1321
1359
|
await createUser(storage)
|
|
1322
1360
|
await storage.sessions.create({
|
|
1323
|
-
id: "
|
|
1361
|
+
id: "ses_browser",
|
|
1324
1362
|
projectId,
|
|
1325
1363
|
userId: "usr_1",
|
|
1326
1364
|
strategyId: "magic-link",
|
|
@@ -1335,72 +1373,149 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
1335
1373
|
deviceCodeHash: "device-code-hash",
|
|
1336
1374
|
userCode: "BCDF-HJKM",
|
|
1337
1375
|
clientName: "sixb CLI",
|
|
1338
|
-
tokenName: "codex",
|
|
1339
|
-
tokenExpiresAt: at("2026-08-12T10:00:00.000Z"),
|
|
1340
1376
|
createdAt: at("2026-05-14T10:00:00.000Z"),
|
|
1341
1377
|
expiresAt: at("2026-05-14T10:10:00.000Z"),
|
|
1342
1378
|
})
|
|
1343
1379
|
|
|
1344
1380
|
await expect(
|
|
1345
1381
|
storage.deviceAuthorizations.getByUserCode({ projectId, userCode: "BCDF-HJKM" })
|
|
1346
|
-
).resolves.toMatchObject({ id: "dva_1", status: "pending" })
|
|
1382
|
+
).resolves.toMatchObject({ id: "dva_1", status: "pending", clientName: "sixb CLI" })
|
|
1347
1383
|
await storage.deviceAuthorizations.approve({
|
|
1348
1384
|
projectId,
|
|
1349
1385
|
id: "dva_1",
|
|
1350
1386
|
userId: "usr_1",
|
|
1351
|
-
sessionId: "
|
|
1387
|
+
sessionId: "ses_browser",
|
|
1352
1388
|
approvedAt: at("2026-05-14T10:01:00.000Z"),
|
|
1353
1389
|
})
|
|
1354
1390
|
|
|
1355
|
-
const
|
|
1356
|
-
projectId,
|
|
1357
|
-
id: "dva_1",
|
|
1358
|
-
deviceCodeHash: "device-code-hash",
|
|
1359
|
-
completedAt: at("2026-05-14T10:02:00.000Z"),
|
|
1360
|
-
accessToken: {
|
|
1361
|
-
id: "tok_device",
|
|
1362
|
-
projectId,
|
|
1363
|
-
name: "codex",
|
|
1364
|
-
kind: "personal",
|
|
1365
|
-
subjectType: "user",
|
|
1366
|
-
subjectId: "usr_1",
|
|
1367
|
-
tokenHash: "access-token-hash",
|
|
1368
|
-
createdByPrincipal: { type: "user", id: "usr_1" },
|
|
1369
|
-
createdBySessionId: "ses_device",
|
|
1370
|
-
createdAt: at("2026-05-14T10:02:00.000Z"),
|
|
1371
|
-
expiresAt: at("2026-08-12T10:00:00.000Z"),
|
|
1372
|
-
},
|
|
1373
|
-
})
|
|
1374
|
-
|
|
1375
|
-
expect(completed.authorization).toMatchObject({ status: "consumed" })
|
|
1376
|
-
expect(completed.accessToken).toMatchObject({ id: "tok_device", subjectId: "usr_1" })
|
|
1377
|
-
await expectAuthError(
|
|
1391
|
+
const complete = (id: string) =>
|
|
1378
1392
|
storage.completeDeviceAuthorization({
|
|
1379
1393
|
projectId,
|
|
1380
1394
|
id: "dva_1",
|
|
1381
1395
|
deviceCodeHash: "device-code-hash",
|
|
1382
|
-
completedAt: at("2026-05-14T10:
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1396
|
+
completedAt: at("2026-05-14T10:02:00.000Z"),
|
|
1397
|
+
session: bearerSessionInput(id),
|
|
1398
|
+
})
|
|
1399
|
+
const completed = await complete("ses_cli")
|
|
1400
|
+
|
|
1401
|
+
expect(completed.authorization).toMatchObject({ status: "consumed" })
|
|
1402
|
+
expect(completed.session).toMatchObject({
|
|
1403
|
+
id: "ses_cli",
|
|
1404
|
+
userId: "usr_1",
|
|
1405
|
+
bearer: { clientName: "sixb CLI", refreshTokenHash: "refresh-1" },
|
|
1406
|
+
})
|
|
1407
|
+
await expectAuthError(complete("ses_cli_2"), "invalid_device_authorization")
|
|
1408
|
+
await expect(storage.sessions.getById({ projectId, id: "ses_cli_2" })).resolves.toBeNull()
|
|
1409
|
+
})
|
|
1410
|
+
})
|
|
1411
|
+
|
|
1412
|
+
test("keeps bearer and cookie session credentials apart", async () => {
|
|
1413
|
+
await withStorage(async (storage) => {
|
|
1414
|
+
await createUser(storage)
|
|
1415
|
+
await storage.sessions.create(bearerSessionInput("ses_cli"))
|
|
1416
|
+
await storage.sessions.create({
|
|
1417
|
+
...bearerSessionInput("ses_cookie"),
|
|
1418
|
+
tokenHash: "cookie-hash",
|
|
1419
|
+
bearer: undefined,
|
|
1420
|
+
})
|
|
1421
|
+
const now = at("2026-05-14T10:05:00.000Z")
|
|
1422
|
+
|
|
1423
|
+
await expect(
|
|
1424
|
+
storage.sessions.findValidByAccessTokenHash({
|
|
1425
|
+
projectId,
|
|
1426
|
+
id: "ses_cli",
|
|
1427
|
+
tokenHash: "access-1",
|
|
1428
|
+
now,
|
|
1429
|
+
})
|
|
1430
|
+
).resolves.toMatchObject({ id: "ses_cli" })
|
|
1431
|
+
// A bearer access token never works as a cookie secret, and a cookie never as a token.
|
|
1432
|
+
await expect(
|
|
1433
|
+
storage.sessions.findValidByTokenHash({
|
|
1434
|
+
projectId,
|
|
1435
|
+
id: "ses_cli",
|
|
1436
|
+
audience: "atlas",
|
|
1437
|
+
tokenHash: "access-1",
|
|
1438
|
+
now,
|
|
1439
|
+
})
|
|
1440
|
+
).resolves.toBeNull()
|
|
1441
|
+
await expect(
|
|
1442
|
+
storage.sessions.findValidByAccessTokenHash({
|
|
1443
|
+
projectId,
|
|
1444
|
+
id: "ses_cookie",
|
|
1445
|
+
tokenHash: "cookie-hash",
|
|
1446
|
+
now,
|
|
1447
|
+
})
|
|
1448
|
+
).resolves.toBeNull()
|
|
1449
|
+
// The access token expires before its session.
|
|
1398
1450
|
await expect(
|
|
1399
|
-
storage.
|
|
1451
|
+
storage.sessions.findValidByAccessTokenHash({
|
|
1452
|
+
projectId,
|
|
1453
|
+
id: "ses_cli",
|
|
1454
|
+
tokenHash: "access-1",
|
|
1455
|
+
now: at("2026-05-14T10:15:00.000Z"),
|
|
1456
|
+
})
|
|
1400
1457
|
).resolves.toBeNull()
|
|
1401
1458
|
})
|
|
1402
1459
|
})
|
|
1403
1460
|
|
|
1461
|
+
test("rotates refresh tokens, tolerates a lost response, and revokes on reuse", async () => {
|
|
1462
|
+
await withStorage(async (storage) => {
|
|
1463
|
+
await createUser(storage)
|
|
1464
|
+
await storage.sessions.create({
|
|
1465
|
+
...bearerSessionInput("ses_cli"),
|
|
1466
|
+
absoluteExpiresAt: at("2026-06-20T00:00:00.000Z"),
|
|
1467
|
+
})
|
|
1468
|
+
const rotate = (refreshTokenHash: string, now: string, generation: number) =>
|
|
1469
|
+
storage.sessions.rotateRefreshToken({
|
|
1470
|
+
projectId,
|
|
1471
|
+
id: "ses_cli",
|
|
1472
|
+
refreshTokenHash,
|
|
1473
|
+
now: at(now),
|
|
1474
|
+
reuseGraceMs: 60_000,
|
|
1475
|
+
next: {
|
|
1476
|
+
tokenHash: `access-${generation}`,
|
|
1477
|
+
accessExpiresAt: new Date(at(now).getTime() + 15 * 60_000),
|
|
1478
|
+
refreshTokenHash: `refresh-${generation}`,
|
|
1479
|
+
expiresAt: at("2026-07-01T00:00:00.000Z"),
|
|
1480
|
+
},
|
|
1481
|
+
})
|
|
1482
|
+
|
|
1483
|
+
const rotated = await rotate("refresh-1", "2026-05-15T10:00:00.000Z", 2)
|
|
1484
|
+
expect(rotated).toMatchObject({
|
|
1485
|
+
status: "rotated",
|
|
1486
|
+
session: {
|
|
1487
|
+
tokenHash: "access-2",
|
|
1488
|
+
bearer: { refreshTokenHash: "refresh-2", previousRefreshTokenHash: "refresh-1" },
|
|
1489
|
+
},
|
|
1490
|
+
})
|
|
1491
|
+
// The idle deadline moves, but never past the absolute one.
|
|
1492
|
+
expect(rotated.status === "rotated" && rotated.session.expiresAt.toISOString()).toBe(
|
|
1493
|
+
"2026-06-20T00:00:00.000Z"
|
|
1494
|
+
)
|
|
1495
|
+
// The response was lost; the client retries with the token it still has.
|
|
1496
|
+
await expect(rotate("refresh-1", "2026-05-15T10:00:30.000Z", 3)).resolves.toMatchObject({
|
|
1497
|
+
status: "rotated",
|
|
1498
|
+
session: { bearer: { refreshTokenHash: "refresh-3" } },
|
|
1499
|
+
})
|
|
1500
|
+
// An unknown token fails without touching the session.
|
|
1501
|
+
await expect(rotate("guess", "2026-05-15T10:01:00.000Z", 4)).resolves.toEqual({
|
|
1502
|
+
status: "invalid",
|
|
1503
|
+
})
|
|
1504
|
+
expect((await storage.sessions.getById({ projectId, id: "ses_cli" }))?.revokedAt).toBe(
|
|
1505
|
+
undefined
|
|
1506
|
+
)
|
|
1507
|
+
// A replaced token after the grace window means a copy is in use: end the session.
|
|
1508
|
+
await expect(rotate("refresh-2", "2026-05-15T10:05:00.000Z", 4)).resolves.toEqual({
|
|
1509
|
+
status: "reused",
|
|
1510
|
+
})
|
|
1511
|
+
await expect(rotate("refresh-3", "2026-05-15T10:05:01.000Z", 5)).resolves.toEqual({
|
|
1512
|
+
status: "invalid",
|
|
1513
|
+
})
|
|
1514
|
+
const session = await storage.sessions.getById({ projectId, id: "ses_cli" })
|
|
1515
|
+
expect(session?.revokedAt).toBeInstanceOf(Date)
|
|
1516
|
+
})
|
|
1517
|
+
})
|
|
1518
|
+
|
|
1404
1519
|
test("completes magic-link sign-in for an existing user", async () => {
|
|
1405
1520
|
await withStorage(async (storage) => {
|
|
1406
1521
|
await createUser(storage)
|
|
@@ -1634,91 +1749,6 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
1634
1749
|
})
|
|
1635
1750
|
})
|
|
1636
1751
|
|
|
1637
|
-
test("closes bootstrap user creation when an active user already exists", async () => {
|
|
1638
|
-
await withStorage(async (storage) => {
|
|
1639
|
-
await createUser(storage, {
|
|
1640
|
-
id: "usr_existing",
|
|
1641
|
-
email: "existing@acme.com",
|
|
1642
|
-
})
|
|
1643
|
-
await storage.magicLinks.create({
|
|
1644
|
-
id: "ml_1",
|
|
1645
|
-
projectId,
|
|
1646
|
-
strategyId: "magic-link",
|
|
1647
|
-
audience: "atlas",
|
|
1648
|
-
email: "founder@acme.com",
|
|
1649
|
-
tokenHash: "link-hash",
|
|
1650
|
-
createdAt: at("2026-05-14T10:01:00.000Z"),
|
|
1651
|
-
expiresAt: at("2026-05-14T10:16:00.000Z"),
|
|
1652
|
-
})
|
|
1653
|
-
|
|
1654
|
-
await expectAuthError(
|
|
1655
|
-
storage.completeMagicLinkSignIn({
|
|
1656
|
-
projectId,
|
|
1657
|
-
magicLinkId: "ml_1",
|
|
1658
|
-
tokenHash: "link-hash",
|
|
1659
|
-
completedAt: at("2026-05-14T10:03:00.000Z"),
|
|
1660
|
-
newUserId: "usr_founder",
|
|
1661
|
-
allowUserCreationWithoutInvitation: true,
|
|
1662
|
-
requireNoActiveUsersForUserCreation: true,
|
|
1663
|
-
session: sessionInput("ses_founder"),
|
|
1664
|
-
}),
|
|
1665
|
-
"user_creation_not_allowed"
|
|
1666
|
-
)
|
|
1667
|
-
await expect(
|
|
1668
|
-
storage.users.getByEmail({ projectId, email: "founder@acme.com" })
|
|
1669
|
-
).resolves.toBeNull()
|
|
1670
|
-
await expect(storage.magicLinks.getById({ projectId, id: "ml_1" })).resolves.toMatchObject({
|
|
1671
|
-
consumedAt: at("2026-05-14T10:03:00.000Z"),
|
|
1672
|
-
})
|
|
1673
|
-
})
|
|
1674
|
-
})
|
|
1675
|
-
|
|
1676
|
-
test("does not apply the bootstrap closure guard to invited user creation", async () => {
|
|
1677
|
-
await withStorage(async (storage) => {
|
|
1678
|
-
await createUser(storage, {
|
|
1679
|
-
id: "usr_existing",
|
|
1680
|
-
email: "existing@acme.com",
|
|
1681
|
-
})
|
|
1682
|
-
await storage.invitations.createOrUpdateActive({
|
|
1683
|
-
id: "inv_1",
|
|
1684
|
-
projectId,
|
|
1685
|
-
email: "invited@acme.com",
|
|
1686
|
-
groupIds: ["commercial"],
|
|
1687
|
-
createdAt: at("2026-05-14T10:00:00.000Z"),
|
|
1688
|
-
expiresAt: at("2026-05-21T10:00:00.000Z"),
|
|
1689
|
-
})
|
|
1690
|
-
await storage.magicLinks.create({
|
|
1691
|
-
id: "ml_1",
|
|
1692
|
-
projectId,
|
|
1693
|
-
strategyId: "magic-link",
|
|
1694
|
-
audience: "atlas",
|
|
1695
|
-
email: "invited@acme.com",
|
|
1696
|
-
tokenHash: "link-hash",
|
|
1697
|
-
createdAt: at("2026-05-14T10:01:00.000Z"),
|
|
1698
|
-
expiresAt: at("2026-05-14T10:16:00.000Z"),
|
|
1699
|
-
})
|
|
1700
|
-
|
|
1701
|
-
const result = await storage.completeMagicLinkSignIn({
|
|
1702
|
-
projectId,
|
|
1703
|
-
magicLinkId: "ml_1",
|
|
1704
|
-
tokenHash: "link-hash",
|
|
1705
|
-
completedAt: at("2026-05-14T10:03:00.000Z"),
|
|
1706
|
-
newUserId: "usr_invited",
|
|
1707
|
-
requireNoActiveUsersForUserCreation: true,
|
|
1708
|
-
session: sessionInput("ses_invited"),
|
|
1709
|
-
})
|
|
1710
|
-
|
|
1711
|
-
expect(result.user).toMatchObject({
|
|
1712
|
-
id: "usr_invited",
|
|
1713
|
-
email: "invited@acme.com",
|
|
1714
|
-
})
|
|
1715
|
-
expect(result.invitation).toMatchObject({
|
|
1716
|
-
id: "inv_1",
|
|
1717
|
-
status: "accepted",
|
|
1718
|
-
})
|
|
1719
|
-
})
|
|
1720
|
-
})
|
|
1721
|
-
|
|
1722
1752
|
test("consumes valid magic links when an existing user is suspended", async () => {
|
|
1723
1753
|
await withStorage(async (storage) => {
|
|
1724
1754
|
await createUser(storage, { status: "suspended" })
|
|
@@ -1780,7 +1810,6 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
1780
1810
|
completedAt: at("2026-05-14T10:02:00.000Z"),
|
|
1781
1811
|
subject: "00u1",
|
|
1782
1812
|
email: "renamed@acme.com",
|
|
1783
|
-
emailVerified: true,
|
|
1784
1813
|
claims: { email: "renamed@acme.com" },
|
|
1785
1814
|
newUserId: "usr_unused",
|
|
1786
1815
|
session: sessionInput("ses_oidc"),
|
|
@@ -1798,65 +1827,35 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
1798
1827
|
})
|
|
1799
1828
|
})
|
|
1800
1829
|
|
|
1801
|
-
test("
|
|
1830
|
+
test("links a new OIDC identity to the existing user with its email", async () => {
|
|
1802
1831
|
await withStorage(async (storage) => {
|
|
1803
1832
|
await createUser(storage, { id: "usr_existing", email: "ava@acme.com" })
|
|
1804
1833
|
await storage.oidcAuthorizationAttempts.create({
|
|
1805
|
-
id: "
|
|
1834
|
+
id: "oidc_1",
|
|
1806
1835
|
projectId,
|
|
1807
1836
|
strategyId: "okta",
|
|
1808
1837
|
audience: "atlas",
|
|
1809
|
-
stateHash: "
|
|
1838
|
+
stateHash: "state-hash",
|
|
1810
1839
|
nonceHash: "nonce-hash",
|
|
1811
1840
|
codeVerifier: "verifier",
|
|
1812
1841
|
createdAt: at("2026-05-14T10:00:00.000Z"),
|
|
1813
1842
|
expiresAt: at("2026-05-14T10:10:00.000Z"),
|
|
1814
1843
|
})
|
|
1815
1844
|
|
|
1816
|
-
await expectAuthError(
|
|
1817
|
-
storage.completeOidcSignIn({
|
|
1818
|
-
projectId,
|
|
1819
|
-
oidcAuthorizationAttemptId: "oidc_blocked",
|
|
1820
|
-
stateHash: "blocked-state",
|
|
1821
|
-
completedAt: at("2026-05-14T10:01:00.000Z"),
|
|
1822
|
-
subject: "00u1",
|
|
1823
|
-
email: "ava@acme.com",
|
|
1824
|
-
emailVerified: false,
|
|
1825
|
-
autoLinkByVerifiedEmail: true,
|
|
1826
|
-
newUserId: "usr_unused",
|
|
1827
|
-
session: sessionInput("ses_blocked"),
|
|
1828
|
-
}),
|
|
1829
|
-
"email_link_not_allowed"
|
|
1830
|
-
)
|
|
1831
|
-
|
|
1832
|
-
await storage.oidcAuthorizationAttempts.create({
|
|
1833
|
-
id: "oidc_allowed",
|
|
1834
|
-
projectId,
|
|
1835
|
-
strategyId: "okta",
|
|
1836
|
-
audience: "atlas",
|
|
1837
|
-
stateHash: "allowed-state",
|
|
1838
|
-
nonceHash: "nonce-hash",
|
|
1839
|
-
codeVerifier: "verifier",
|
|
1840
|
-
createdAt: at("2026-05-14T10:02:00.000Z"),
|
|
1841
|
-
expiresAt: at("2026-05-14T10:12:00.000Z"),
|
|
1842
|
-
})
|
|
1843
1845
|
const result = await storage.completeOidcSignIn({
|
|
1844
1846
|
projectId,
|
|
1845
|
-
oidcAuthorizationAttemptId: "
|
|
1846
|
-
stateHash: "
|
|
1847
|
-
completedAt: at("2026-05-14T10:
|
|
1847
|
+
oidcAuthorizationAttemptId: "oidc_1",
|
|
1848
|
+
stateHash: "state-hash",
|
|
1849
|
+
completedAt: at("2026-05-14T10:01:00.000Z"),
|
|
1848
1850
|
subject: "00u1",
|
|
1849
1851
|
email: "ava@acme.com",
|
|
1850
|
-
emailVerified: true,
|
|
1851
|
-
autoLinkByVerifiedEmail: true,
|
|
1852
1852
|
newUserId: "usr_unused",
|
|
1853
|
-
session: sessionInput("
|
|
1853
|
+
session: sessionInput("ses_oidc"),
|
|
1854
1854
|
})
|
|
1855
1855
|
|
|
1856
1856
|
expect(result.user.id).toBe("usr_existing")
|
|
1857
|
-
expect(result.identity).toMatchObject({
|
|
1858
|
-
|
|
1859
|
-
})
|
|
1857
|
+
expect(result.identity).toMatchObject({ subject: "00u1", userId: "usr_existing" })
|
|
1858
|
+
await expect(storage.users.getById({ projectId, id: "usr_unused" })).resolves.toBeNull()
|
|
1860
1859
|
})
|
|
1861
1860
|
})
|
|
1862
1861
|
|
|
@@ -1890,7 +1889,6 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
1890
1889
|
subject: "00u1",
|
|
1891
1890
|
email: "ava@acme.com",
|
|
1892
1891
|
displayName: "Ava Chen",
|
|
1893
|
-
emailVerified: true,
|
|
1894
1892
|
newUserId: "usr_oidc",
|
|
1895
1893
|
session: sessionInput("ses_oidc"),
|
|
1896
1894
|
})
|
|
@@ -1937,7 +1935,6 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
1937
1935
|
completedAt: at("2026-05-14T10:01:00.000Z"),
|
|
1938
1936
|
subject: "00u1",
|
|
1939
1937
|
email: "ava@acme.com",
|
|
1940
|
-
emailVerified: true,
|
|
1941
1938
|
newUserId: "usr_oidc",
|
|
1942
1939
|
session: sessionInput("ses_oidc"),
|
|
1943
1940
|
}),
|
|
@@ -1949,7 +1946,7 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
1949
1946
|
})
|
|
1950
1947
|
})
|
|
1951
1948
|
|
|
1952
|
-
test("allows
|
|
1949
|
+
test("allows OIDC bootstrap user creation with manual groups", async () => {
|
|
1953
1950
|
await withStorage(async (storage) => {
|
|
1954
1951
|
await storage.oidcAuthorizationAttempts.create({
|
|
1955
1952
|
id: "oidc_bootstrap",
|
|
@@ -1970,9 +1967,7 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
1970
1967
|
completedAt: at("2026-05-14T10:01:00.000Z"),
|
|
1971
1968
|
subject: "00u1",
|
|
1972
1969
|
email: "founder@acme.com",
|
|
1973
|
-
emailVerified: true,
|
|
1974
1970
|
allowUserCreationWithoutInvitation: true,
|
|
1975
|
-
requireNoActiveUsersForUserCreation: true,
|
|
1976
1971
|
manualGroupIds: ["security-admins"],
|
|
1977
1972
|
newUserId: "usr_founder",
|
|
1978
1973
|
session: sessionInput("ses_oidc_bootstrap"),
|
|
@@ -1988,6 +1983,72 @@ export function runAuthStorageContractSuite<TStorage extends AuthStorage>(
|
|
|
1988
1983
|
})
|
|
1989
1984
|
})
|
|
1990
1985
|
|
|
1986
|
+
test("syncs directory memberships to exactly the groups the provider grants", async () => {
|
|
1987
|
+
await withStorage(async (storage) => {
|
|
1988
|
+
await createUser(storage)
|
|
1989
|
+
for (const [groupId, source] of [
|
|
1990
|
+
["security-admins", "manual"],
|
|
1991
|
+
["commercial", "invitation"],
|
|
1992
|
+
["legacy-team", "directory"],
|
|
1993
|
+
] as const) {
|
|
1994
|
+
await storage.groupMemberships.upsert({ projectId, userId: "usr_1", groupId, source })
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
await completeOidcSignInForAva(storage, ["security-admins", "field-ops"])
|
|
1998
|
+
|
|
1999
|
+
// legacy-team is no longer granted; security-admins keeps its manual source.
|
|
2000
|
+
await expect(
|
|
2001
|
+
storage.groupMemberships.listForUser({ projectId, userId: "usr_1" })
|
|
2002
|
+
).resolves.toMatchObject([
|
|
2003
|
+
{ groupId: "commercial", source: "invitation" },
|
|
2004
|
+
{ groupId: "field-ops", source: "directory" },
|
|
2005
|
+
{ groupId: "security-admins", source: "manual" },
|
|
2006
|
+
])
|
|
2007
|
+
})
|
|
2008
|
+
})
|
|
2009
|
+
|
|
2010
|
+
test("removes every directory membership when the provider grants no groups", async () => {
|
|
2011
|
+
await withStorage(async (storage) => {
|
|
2012
|
+
await createUser(storage)
|
|
2013
|
+
await storage.groupMemberships.upsert({
|
|
2014
|
+
projectId,
|
|
2015
|
+
userId: "usr_1",
|
|
2016
|
+
groupId: "security-admins",
|
|
2017
|
+
source: "manual",
|
|
2018
|
+
})
|
|
2019
|
+
await storage.groupMemberships.upsert({
|
|
2020
|
+
projectId,
|
|
2021
|
+
userId: "usr_1",
|
|
2022
|
+
groupId: "field-ops",
|
|
2023
|
+
source: "directory",
|
|
2024
|
+
})
|
|
2025
|
+
|
|
2026
|
+
await completeOidcSignInForAva(storage, [])
|
|
2027
|
+
|
|
2028
|
+
await expect(
|
|
2029
|
+
storage.groupMemberships.listForUser({ projectId, userId: "usr_1" })
|
|
2030
|
+
).resolves.toMatchObject([{ groupId: "security-admins", source: "manual" }])
|
|
2031
|
+
})
|
|
2032
|
+
})
|
|
2033
|
+
|
|
2034
|
+
test("leaves directory memberships alone when sign-in syncs no groups", async () => {
|
|
2035
|
+
await withStorage(async (storage) => {
|
|
2036
|
+
await createUser(storage)
|
|
2037
|
+
await storage.groupMemberships.upsert({
|
|
2038
|
+
projectId,
|
|
2039
|
+
userId: "usr_1",
|
|
2040
|
+
groupId: "field-ops",
|
|
2041
|
+
source: "directory",
|
|
2042
|
+
})
|
|
2043
|
+
|
|
2044
|
+
await completeOidcSignInForAva(storage, undefined)
|
|
2045
|
+
|
|
2046
|
+
await expect(
|
|
2047
|
+
storage.groupMemberships.listForUser({ projectId, userId: "usr_1" })
|
|
2048
|
+
).resolves.toMatchObject([{ groupId: "field-ops", source: "directory" }])
|
|
2049
|
+
})
|
|
2050
|
+
})
|
|
2051
|
+
|
|
1991
2052
|
test("suspends users and revokes active sessions immediately", async () => {
|
|
1992
2053
|
await withStorage(async (storage) => {
|
|
1993
2054
|
await createUser(storage)
|
|
@@ -402,8 +402,7 @@ async function seedAuth(auth: AuthStorage): Promise<void> {
|
|
|
402
402
|
projectId,
|
|
403
403
|
name: "Service token",
|
|
404
404
|
kind: "serviceAccount",
|
|
405
|
-
|
|
406
|
-
subjectId: "service-one",
|
|
405
|
+
subject: { type: "serviceAccount", id: "service-one" },
|
|
407
406
|
tokenHash: "service-token-hash",
|
|
408
407
|
createdAt,
|
|
409
408
|
expiresAt,
|
package/src/testing/execution.ts
CHANGED
|
@@ -2,7 +2,6 @@ import type { AuthorizationContext } from "../authorization"
|
|
|
2
2
|
import { createTestingScope } from "../execution/scopes"
|
|
3
3
|
import type { ExecutionScope } from "../execution/types"
|
|
4
4
|
import { bindModelExecutionAttempt } from "../models/execution/binding"
|
|
5
|
-
import type { OntologySource } from "../ontology"
|
|
6
5
|
import { SixbHost, type SixbHostOptions } from "../runtime/host"
|
|
7
6
|
import { isBoundSixb, type Sixb } from "../runtime/sixb"
|
|
8
7
|
|
|
@@ -26,12 +25,10 @@ export interface TestExecutionHost {
|
|
|
26
25
|
withScope(scope: ExecutionScope): object
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
export function createTestSixb
|
|
30
|
-
|
|
31
|
-
>(
|
|
32
|
-
hostOrOptions: TestExecutionHost | SixbHostOptions<TOntologySources>,
|
|
28
|
+
export function createTestSixb(
|
|
29
|
+
hostOrOptions: TestExecutionHost | SixbHostOptions,
|
|
33
30
|
options: TestExecutionOptions = {}
|
|
34
|
-
): Sixb
|
|
31
|
+
): Sixb {
|
|
35
32
|
const host: TestExecutionHost =
|
|
36
33
|
"withScope" in hostOrOptions ? hostOrOptions : new SixbHost(hostOrOptions)
|
|
37
34
|
const sixb = host.withScope(
|
|
@@ -43,7 +40,7 @@ export function createTestSixb<
|
|
|
43
40
|
...(options.correlationId === undefined ? {} : { correlationId: options.correlationId }),
|
|
44
41
|
})
|
|
45
42
|
)
|
|
46
|
-
if (!isBoundSixb
|
|
43
|
+
if (!isBoundSixb(sixb)) {
|
|
47
44
|
throw new Error("[Sixb] Test host did not return an execution-bound Sixb SDK.")
|
|
48
45
|
}
|
|
49
46
|
bindModelExecutionAttempt(sixb.models, {
|