@sixb/core 0.1.18 → 0.1.20
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 +7 -6
- package/dist/actions/commit-edits.d.ts +7 -19
- package/dist/actions/commit-edits.d.ts.map +1 -1
- package/dist/actions/errors.d.ts +0 -3
- package/dist/actions/errors.d.ts.map +1 -1
- package/dist/actions/execution.d.ts +10 -3
- package/dist/actions/execution.d.ts.map +1 -1
- package/dist/actions/index.d.ts +6 -9
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +51 -50
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/request.d.ts +14 -25
- package/dist/actions/request.d.ts.map +1 -1
- package/dist/actions/run/context.d.ts +40 -0
- package/dist/actions/run/context.d.ts.map +1 -0
- package/dist/actions/run/edits-commit.d.ts +31 -0
- package/dist/actions/run/edits-commit.d.ts.map +1 -0
- package/dist/actions/run/effects.d.ts +23 -0
- package/dist/actions/run/effects.d.ts.map +1 -0
- package/dist/actions/run/execute.d.ts +30 -0
- package/dist/actions/run/execute.d.ts.map +1 -0
- package/dist/actions/run/executor.d.ts +95 -0
- package/dist/actions/run/executor.d.ts.map +1 -0
- package/dist/actions/run/normalize.d.ts +36 -0
- package/dist/actions/run/normalize.d.ts.map +1 -0
- package/dist/actions/run/phase-types.d.ts +18 -0
- package/dist/actions/run/phase-types.d.ts.map +1 -0
- package/dist/actions/run/phases.d.ts +20 -0
- package/dist/actions/run/phases.d.ts.map +1 -0
- package/dist/actions/run/run-action.d.ts +25 -0
- package/dist/actions/run/run-action.d.ts.map +1 -0
- package/dist/actions/run/signals.d.ts +67 -0
- package/dist/actions/run/signals.d.ts.map +1 -0
- package/dist/actions/run/state.d.ts +47 -0
- package/dist/actions/run/state.d.ts.map +1 -0
- package/dist/actions/run/types.d.ts +54 -0
- package/dist/actions/run/types.d.ts.map +1 -0
- package/dist/actions/run/writeback.d.ts +17 -0
- package/dist/actions/run/writeback.d.ts.map +1 -0
- package/dist/actions/run-authorization.d.ts +1 -1
- package/dist/actions/run-authorization.d.ts.map +1 -1
- package/dist/actions/run-persistence.d.ts +53 -0
- package/dist/actions/run-persistence.d.ts.map +1 -0
- package/dist/actions/types/context.d.ts +10 -0
- package/dist/actions/types/context.d.ts.map +1 -1
- package/dist/agents/index.js +52 -55
- 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/auth/cookies.d.ts +2 -4
- package/dist/auth/cookies.d.ts.map +1 -1
- package/dist/auth/index.d.ts +0 -2
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +15 -21
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/runtime.d.ts +8 -10
- package/dist/auth/runtime.d.ts.map +1 -1
- package/dist/auth/session-cache.d.ts +1 -5
- package/dist/auth/session-cache.d.ts.map +1 -1
- package/dist/auth/strategy.js +1 -1
- package/dist/auth/types.d.ts +4 -8
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/auth/validation.d.ts +0 -1
- package/dist/auth/validation.d.ts.map +1 -1
- package/dist/authorization/decision.d.ts +0 -4
- package/dist/authorization/decision.d.ts.map +1 -1
- package/dist/authorization/event-visibility.d.ts.map +1 -1
- package/dist/authorization/grant-kinds.d.ts +6 -8
- package/dist/authorization/grant-kinds.d.ts.map +1 -1
- package/dist/authorization/index.d.ts +0 -1
- package/dist/authorization/index.d.ts.map +1 -1
- package/dist/authorization/index.js +5 -9
- package/dist/authorization/index.js.map +1 -1
- package/dist/authorization/resolve.d.ts +1 -1
- package/dist/authorization/resolve.d.ts.map +1 -1
- package/dist/bootstrap/index.js +50 -53
- package/dist/bootstrap/index.js.map +2 -2
- package/dist/{chunk-vz3gc1tm.js → chunk-0rbyz4qy.js} +67 -69
- package/dist/{chunk-vz3gc1tm.js.map → chunk-0rbyz4qy.js.map} +4 -4
- package/dist/{chunk-rz53yb4v.js → chunk-0yh890a4.js} +1 -1
- package/dist/{chunk-vgk3hknm.js → chunk-1k89ecfr.js} +1 -1
- package/dist/{chunk-ny3xyvcn.js → chunk-1zq2p6g0.js} +3 -3
- package/dist/{chunk-dnmadg9k.js → chunk-3t2hgbgd.js} +2 -2
- package/dist/{chunk-k6hrnf35.js → chunk-4vyr1j8f.js} +51 -4
- package/dist/chunk-4vyr1j8f.js.map +11 -0
- package/dist/{chunk-22v5bpz3.js → chunk-5e43w60z.js} +1 -1
- package/dist/{chunk-de4z2bj6.js → chunk-5j58wjct.js} +17 -17
- package/dist/chunk-5j58wjct.js.map +18 -0
- package/dist/{chunk-fe52eczz.js → chunk-6c6sn0bh.js} +6352 -2127
- package/dist/chunk-6c6sn0bh.js.map +106 -0
- package/dist/{chunk-7hpdd6r9.js → chunk-6p49a5cq.js} +4 -4
- package/dist/{chunk-b9affek3.js → chunk-7n440zgt.js} +30 -30
- package/dist/{chunk-b9affek3.js.map → chunk-7n440zgt.js.map} +4 -4
- package/dist/{chunk-kkqwzy6h.js → chunk-7t429e3f.js} +1 -1
- package/dist/{chunk-6fsr7y93.js → chunk-8mx7qw3y.js} +14 -13
- package/dist/{chunk-6fsr7y93.js.map → chunk-8mx7qw3y.js.map} +4 -4
- package/dist/{chunk-kpx7jrmn.js → chunk-91mg3nj9.js} +59 -59
- package/dist/{chunk-kpx7jrmn.js.map → chunk-91mg3nj9.js.map} +5 -5
- package/dist/{chunk-ex496vct.js → chunk-9dmt152s.js} +1 -1
- package/dist/{chunk-48e3cn2d.js → chunk-9gyp8hg1.js} +2 -2
- package/dist/{chunk-ewqa58h9.js → chunk-9k93ah50.js} +4 -4
- package/dist/{chunk-ewqa58h9.js.map → chunk-9k93ah50.js.map} +1 -1
- package/dist/{chunk-zxawp1n2.js → chunk-9w055r5b.js} +1 -1
- package/dist/{chunk-4wn7bxxa.js → chunk-9ybhtmg4.js} +1 -1
- package/dist/{chunk-fc5zfxy1.js → chunk-a40ad1ft.js} +5 -13
- package/dist/chunk-a40ad1ft.js.map +10 -0
- package/dist/{chunk-y2aq6ag9.js → chunk-b38szspf.js} +5 -14
- package/dist/chunk-b38szspf.js.map +11 -0
- package/dist/{chunk-r2y23egw.js → chunk-bkpke1sg.js} +1 -10
- package/dist/chunk-bkpke1sg.js.map +10 -0
- package/dist/{chunk-htr6wjmv.js → chunk-bx9q3cwv.js} +22 -22
- package/dist/{chunk-htr6wjmv.js.map → chunk-bx9q3cwv.js.map} +1 -1
- package/dist/{chunk-vx2yp45y.js → chunk-c85m1hyj.js} +2 -2
- package/dist/{chunk-bs7sqkre.js → chunk-d09tj99x.js} +2 -2
- package/dist/{chunk-qkbx3tf6.js → chunk-d0bqz29d.js} +27 -47
- package/dist/chunk-d0bqz29d.js.map +23 -0
- package/dist/{chunk-zb77kjth.js → chunk-dk8tkk5f.js} +4 -4
- package/dist/{chunk-xt1zt7gv.js → chunk-es1gxsbf.js} +24 -15
- package/dist/chunk-es1gxsbf.js.map +13 -0
- package/dist/{chunk-vjcd8d27.js → chunk-fa02jy15.js} +1 -1
- package/dist/{chunk-za5yd58j.js → chunk-fkgc1wt8.js} +2 -2
- package/dist/{chunk-enpsx8k5.js → chunk-gsjm1wms.js} +16 -20
- package/dist/chunk-gsjm1wms.js.map +10 -0
- package/dist/{chunk-2jntasmh.js → chunk-hcbyfxbe.js} +25 -49
- package/dist/chunk-hcbyfxbe.js.map +12 -0
- package/dist/{chunk-p0dqwj3n.js → chunk-hjzdd750.js} +66 -47
- package/dist/{chunk-p0dqwj3n.js.map → chunk-hjzdd750.js.map} +4 -4
- package/dist/chunk-hkc3jct7.js.map +1 -1
- package/dist/{chunk-y05543x6.js → chunk-hvsb78a1.js} +4 -4
- package/dist/{chunk-y05543x6.js.map → chunk-hvsb78a1.js.map} +1 -1
- package/dist/{chunk-1b1f2d5f.js → chunk-k6q3n2sc.js} +9 -9
- package/dist/{chunk-1b1f2d5f.js.map → chunk-k6q3n2sc.js.map} +1 -1
- package/dist/{chunk-wr8qp979.js → chunk-m427qgq0.js} +9 -5
- package/dist/{chunk-wr8qp979.js.map → chunk-m427qgq0.js.map} +4 -3
- package/dist/{chunk-qq90g05n.js → chunk-n33z5bjw.js} +50 -240
- package/dist/{chunk-qq90g05n.js.map → chunk-n33z5bjw.js.map} +4 -4
- package/dist/{chunk-e1c18xjx.js → chunk-nq6gpjt7.js} +4 -45
- package/dist/{chunk-e1c18xjx.js.map → chunk-nq6gpjt7.js.map} +5 -5
- package/dist/{chunk-1hqwggsn.js → chunk-nzapm6p0.js} +1 -2
- package/dist/chunk-nzapm6p0.js.map +12 -0
- package/dist/{chunk-wt4szfec.js → chunk-pbcbn83d.js} +4 -4
- package/dist/{chunk-wt4szfec.js.map → chunk-pbcbn83d.js.map} +1 -1
- package/dist/{chunk-s4jhg8a3.js → chunk-ren4kg2j.js} +15 -15
- package/dist/{chunk-s4jhg8a3.js.map → chunk-ren4kg2j.js.map} +1 -1
- package/dist/{chunk-d0eb5yy6.js → chunk-rrzt8jdy.js} +5 -5
- package/dist/{chunk-d0eb5yy6.js.map → chunk-rrzt8jdy.js.map} +1 -1
- package/dist/{chunk-y9jmd7e5.js → chunk-s16apyk9.js} +102 -16
- package/dist/chunk-s16apyk9.js.map +16 -0
- package/dist/{chunk-6gmfggss.js → chunk-t7x8dmn0.js} +2 -2
- package/dist/{chunk-f1zxad2t.js → chunk-tg2cw67r.js} +6 -6
- package/dist/{chunk-f1zxad2t.js.map → chunk-tg2cw67r.js.map} +1 -1
- package/dist/{chunk-p844e0rn.js → chunk-tpn40322.js} +2 -2
- package/dist/{chunk-rt9p8m9t.js → chunk-v9xd5wzd.js} +1 -1
- package/dist/{chunk-6h5m9xjx.js → chunk-vpq4shxz.js} +49 -113
- package/dist/chunk-vpq4shxz.js.map +39 -0
- package/dist/{chunk-2vhg6ysa.js → chunk-vyf9kfqf.js} +1 -1
- package/dist/{chunk-bwjcehza.js → chunk-way52z4h.js} +1 -1
- package/dist/{chunk-qkvz64nd.js → chunk-x6m907x7.js} +3 -3
- package/dist/{chunk-yv9czyfr.js → chunk-xfs8x8m9.js} +5 -5
- package/dist/chunk-y0c4e6ex.js +16 -0
- package/dist/chunk-y0c4e6ex.js.map +10 -0
- package/dist/{chunk-v6xpd60t.js → chunk-yevzdx4y.js} +5 -5
- package/dist/{chunk-dfm066qg.js → chunk-yxd3nnqt.js} +2 -29
- package/dist/chunk-yxd3nnqt.js.map +11 -0
- package/dist/{chunk-70jmg2zx.js → chunk-yzwja0mj.js} +4 -19
- package/dist/{chunk-70jmg2zx.js.map → chunk-yzwja0mj.js.map} +3 -3
- package/dist/{chunk-qmnnhde6.js → chunk-z4m0yz8c.js} +1 -1
- package/dist/datasets/write.js +5 -5
- package/dist/deploy/index.d.ts +1 -1
- package/dist/deploy/index.d.ts.map +1 -1
- package/dist/deploy/internal.js +13 -10
- package/dist/deploy/internal.js.map +4 -4
- package/dist/deploy/services.d.ts +1 -2
- package/dist/deploy/services.d.ts.map +1 -1
- package/dist/deploy/types.d.ts +7 -7
- package/dist/deploy/types.d.ts.map +1 -1
- package/dist/deploy/validation.d.ts.map +1 -1
- package/dist/edits/index.js +3 -5
- package/dist/edits/index.js.map +1 -1
- package/dist/error-reporting/internal.js +3 -3
- package/dist/error-reporting/types.d.ts +2 -9
- package/dist/error-reporting/types.d.ts.map +1 -1
- package/dist/errors/catalog.d.ts +12 -0
- package/dist/errors/catalog.d.ts.map +1 -1
- package/dist/errors/internal.js +1 -1
- package/dist/events/definitions.d.ts +0 -5
- package/dist/events/definitions.d.ts.map +1 -1
- package/dist/events/index.d.ts +3 -3
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +6 -8
- package/dist/events/index.js.map +1 -1
- package/dist/events/scope.d.ts +0 -1
- package/dist/events/scope.d.ts.map +1 -1
- package/dist/events/scope.js +1 -1
- package/dist/events/selectors/builder.d.ts +1 -8
- package/dist/events/selectors/builder.d.ts.map +1 -1
- package/dist/events/selectors/index.d.ts +2 -2
- package/dist/events/selectors/index.d.ts.map +1 -1
- package/dist/events/selectors/index.js +2 -2
- package/dist/events/selectors/predicate.d.ts.map +1 -1
- package/dist/events/selectors/types.d.ts +2 -33
- package/dist/events/selectors/types.d.ts.map +1 -1
- package/dist/events/types/index.d.ts +1 -12
- package/dist/events/types/index.d.ts.map +1 -1
- package/dist/execution/agent.js +41 -44
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/authorization.d.ts.map +1 -1
- package/dist/execution/primitive.js +60 -91
- package/dist/execution/primitive.js.map +3 -4
- package/dist/execution/request.js +40 -43
- package/dist/execution/request.js.map +2 -2
- package/dist/index.d.ts +8 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +105 -127
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/index.js +5 -5
- package/dist/materialization/index.js +3 -3
- package/dist/materialization/index.js.map +1 -1
- package/dist/materialization/model.d.ts +19 -6
- package/dist/materialization/model.d.ts.map +1 -1
- package/dist/materializer/index.js +31 -31
- package/dist/materializer/index.js.map +1 -1
- package/dist/materializer/shared/normalize.d.ts.map +1 -1
- package/dist/models/execution/index.js +21 -21
- package/dist/objects/action/errors.d.ts +0 -9
- package/dist/objects/action/errors.d.ts.map +1 -1
- package/dist/objects/action/index.d.ts +3 -3
- package/dist/objects/action/index.d.ts.map +1 -1
- package/dist/objects/action/request.d.ts +2 -8
- package/dist/objects/action/request.d.ts.map +1 -1
- package/dist/objects/execution.d.ts +0 -2
- package/dist/objects/execution.d.ts.map +1 -1
- package/dist/objects/index.js +44 -29
- package/dist/objects/index.js.map +1 -1
- package/dist/objects/query/index.js +29 -29
- package/dist/objects/query/index.js.map +1 -1
- package/dist/objects/sdk/object-handle.d.ts.map +1 -1
- package/dist/objects/sdk/object-set.d.ts.map +1 -1
- package/dist/objects/service/index.d.ts +0 -1
- package/dist/objects/service/index.d.ts.map +1 -1
- package/dist/objects/vectors/handle.d.ts.map +1 -1
- package/dist/objects/vectors/profile.d.ts +5 -0
- package/dist/objects/vectors/profile.d.ts.map +1 -1
- package/dist/ontology/index.js +6 -6
- package/dist/ontology/index.js.map +1 -1
- package/dist/ontology/internal.js +2 -2
- package/dist/pipelines/index.js +28 -28
- package/dist/projections/internal.js +22 -22
- package/dist/projections/internal.js.map +1 -1
- package/dist/query.js +2 -2
- package/dist/queues/in-memory.d.ts +1 -2
- package/dist/queues/in-memory.d.ts.map +1 -1
- package/dist/queues/index.d.ts +1 -1
- package/dist/queues/index.d.ts.map +1 -1
- package/dist/queues/index.js +1 -1
- package/dist/queues/types.d.ts +0 -7
- package/dist/queues/types.d.ts.map +1 -1
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/internal.js +27 -28
- package/dist/runtime/internal.js.map +1 -1
- package/dist/runtime/resolve-definitions.d.ts.map +1 -1
- package/dist/runtime/types.d.ts +16 -36
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/sandboxes/index.js +5 -5
- package/dist/schedules/builders.d.ts.map +1 -1
- package/dist/schedules/index.js +3 -3
- package/dist/schedules/runtime.d.ts.map +1 -1
- package/dist/schedules/validation.d.ts +0 -1
- package/dist/schedules/validation.d.ts.map +1 -1
- package/dist/security/builders.d.ts.map +1 -1
- package/dist/security/every.d.ts +2 -5
- package/dist/security/every.d.ts.map +1 -1
- package/dist/security/grants.d.ts +2 -4
- package/dist/security/grants.d.ts.map +1 -1
- package/dist/security/index.d.ts +1 -2
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/membership-policies.d.ts.map +1 -1
- package/dist/security/public.d.ts +10 -0
- package/dist/security/public.d.ts.map +1 -0
- package/dist/security/public.js +10 -0
- package/dist/security/public.js.map +9 -0
- package/dist/security/registry.d.ts +0 -1
- package/dist/security/registry.d.ts.map +1 -1
- package/dist/security/types.d.ts +13 -18
- package/dist/security/types.d.ts.map +1 -1
- package/dist/security/validation.d.ts +0 -6
- package/dist/security/validation.d.ts.map +1 -1
- package/dist/shares/internal.js +20 -20
- package/dist/storage/action-runs/failure.js +2 -2
- package/dist/storage/action-runs/idempotency.d.ts +3 -4
- package/dist/storage/action-runs/idempotency.d.ts.map +1 -1
- package/dist/storage/action-runs/in-memory.d.ts +2 -9
- package/dist/storage/action-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/action-runs/index.d.ts +1 -3
- package/dist/storage/action-runs/index.d.ts.map +1 -1
- package/dist/storage/action-runs/provider.js +1 -1
- package/dist/storage/action-runs/record.d.ts +20 -0
- package/dist/storage/action-runs/record.d.ts.map +1 -0
- package/dist/storage/action-runs/types.d.ts +39 -68
- package/dist/storage/action-runs/types.d.ts.map +1 -1
- package/dist/storage/agents/types.d.ts +1 -1
- package/dist/storage/ai-limits/enforcement.js +2 -2
- package/dist/storage/auth/in-memory/auth-storage.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/magic-links.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/oidc-attempts.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/sessions.d.ts +0 -10
- package/dist/storage/auth/in-memory/sessions.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/shared.d.ts +1 -2
- package/dist/storage/auth/in-memory/shared.d.ts.map +1 -1
- package/dist/storage/auth/types.d.ts +1 -17
- package/dist/storage/auth/types.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider.js +1 -1
- package/dist/storage/file-upload-sessions/provider.js +10 -10
- package/dist/storage/index.d.ts +2 -2
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +21 -22
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.d.ts +1 -1
- package/dist/storage/internal.d.ts.map +1 -1
- package/dist/storage/internal.js +9 -12
- package/dist/storage/internal.js.map +1 -1
- package/dist/storage/objects/execution-limits.d.ts +1 -1
- package/dist/storage/objects/execution-limits.d.ts.map +1 -1
- package/dist/storage/ontology/provider.js +2 -2
- 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-runs/provider.js +10 -10
- package/dist/syncs/index.js +29 -29
- package/dist/testing/action-execution.d.ts +34 -4
- package/dist/testing/action-execution.d.ts.map +1 -1
- package/dist/testing/action-run-storage-contract.d.ts +11 -0
- package/dist/testing/action-run-storage-contract.d.ts.map +1 -0
- package/dist/testing/auth-storage-contract.d.ts.map +1 -1
- package/dist/testing/index.d.ts +2 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +3205 -2946
- package/dist/testing/index.js.map +9 -8
- package/dist/testing/materializer-storage-contract.d.ts.map +1 -1
- package/dist/testing/queues-contract.d.ts.map +1 -1
- package/dist/webhooks/internal.js +26 -26
- package/dist/webhooks/internal.js.map +1 -1
- package/dist/workers/index.js +1 -1
- package/dist/workflows/index.js +48 -51
- package/dist/workflows/index.js.map +1 -1
- package/package.json +8 -8
- package/src/actions/commit-edits.ts +9 -37
- package/src/actions/errors.ts +0 -4
- package/src/actions/execution.ts +10 -10
- package/src/actions/index.ts +5 -24
- package/src/actions/request.ts +157 -295
- package/src/actions/run/context.ts +193 -0
- package/src/actions/run/edits-commit.ts +102 -0
- package/src/actions/run/effects.ts +105 -0
- package/src/actions/run/execute.ts +113 -0
- package/src/actions/run/executor.ts +314 -0
- package/src/actions/run/normalize.ts +142 -0
- package/src/actions/run/phase-types.ts +20 -0
- package/src/actions/run/phases.ts +150 -0
- package/src/actions/run/run-action.ts +170 -0
- package/src/actions/run/signals.ts +118 -0
- package/src/actions/run/state.ts +95 -0
- package/src/actions/run/types.ts +61 -0
- package/src/actions/run/writeback.ts +79 -0
- package/src/actions/run-authorization.ts +1 -1
- package/src/actions/run-persistence.ts +105 -0
- package/src/actions/types/context.ts +10 -0
- package/src/auth/cookies.ts +3 -20
- package/src/auth/index.ts +0 -6
- package/src/auth/runtime.ts +59 -76
- package/src/auth/session-cache.ts +2 -9
- package/src/auth/types.ts +4 -8
- package/src/auth/validation.ts +0 -2
- package/src/authorization/decision.ts +8 -23
- package/src/authorization/event-visibility.ts +0 -12
- package/src/authorization/grant-kinds.ts +20 -27
- package/src/authorization/index.ts +0 -1
- package/src/authorization/resolve.ts +10 -6
- package/src/deploy/index.ts +0 -1
- package/src/deploy/services.ts +2 -12
- package/src/deploy/types.ts +7 -8
- package/src/deploy/validation.ts +15 -7
- package/src/error-reporting/types.ts +2 -10
- package/src/errors/catalog.ts +13 -0
- package/src/events/definitions.ts +0 -17
- package/src/events/index.ts +0 -14
- package/src/events/scope.ts +0 -12
- package/src/events/selectors/builder.ts +0 -51
- package/src/events/selectors/index.ts +0 -6
- package/src/events/selectors/predicate.ts +0 -2
- package/src/events/selectors/types.ts +7 -65
- package/src/events/types/index.ts +0 -11
- package/src/execution/authorization.ts +11 -5
- package/src/index.ts +2 -33
- package/src/materialization/model.ts +26 -9
- package/src/materializer/README.md +6 -1
- package/src/materializer/edits/commit.ts +42 -32
- package/src/materializer/shared/normalize.ts +25 -14
- package/src/models/execution/embedding.ts +6 -6
- package/src/objects/action/errors.ts +0 -12
- package/src/objects/action/index.ts +3 -3
- package/src/objects/action/request.ts +2 -29
- package/src/objects/execution.ts +2 -2
- package/src/objects/sdk/object-handle.ts +3 -29
- package/src/objects/sdk/object-set.ts +5 -30
- package/src/objects/service/index.ts +0 -1
- package/src/objects/vectors/README.md +4 -0
- package/src/objects/vectors/handle.ts +11 -2
- package/src/objects/vectors/indexing-generate.ts +2 -2
- package/src/objects/vectors/profile.ts +5 -0
- package/src/queues/in-memory.ts +0 -6
- package/src/queues/index.ts +0 -2
- package/src/queues/types.ts +0 -11
- package/src/runtime/host.ts +5 -0
- package/src/runtime/resolve-definitions.ts +0 -1
- package/src/runtime/types.ts +16 -45
- package/src/schedules/builders.ts +1 -4
- package/src/schedules/runtime.ts +0 -41
- package/src/schedules/validation.ts +2 -16
- package/src/security/builders.ts +7 -2
- package/src/security/every.ts +1 -5
- package/src/security/grants.ts +5 -25
- package/src/security/index.ts +0 -3
- package/src/security/membership-policies.ts +3 -1
- package/src/security/public.ts +10 -0
- package/src/security/registry.ts +0 -8
- package/src/security/types.ts +19 -25
- package/src/security/validation.ts +19 -17
- package/src/storage/action-runs/idempotency.ts +13 -41
- package/src/storage/action-runs/in-memory.ts +20 -311
- package/src/storage/action-runs/index.ts +1 -16
- package/src/storage/action-runs/record.ts +130 -0
- package/src/storage/action-runs/types.ts +37 -92
- package/src/storage/agents/types.ts +1 -1
- package/src/storage/auth/in-memory/auth-storage.ts +0 -18
- package/src/storage/auth/in-memory/magic-links.ts +0 -3
- package/src/storage/auth/in-memory/oidc-attempts.ts +0 -3
- package/src/storage/auth/in-memory/sessions.ts +1 -25
- package/src/storage/auth/in-memory/shared.ts +1 -10
- package/src/storage/auth/types.ts +2 -18
- package/src/storage/index.ts +1 -9
- package/src/storage/internal.ts +1 -7
- package/src/storage/objects/execution-limits.ts +3 -2
- package/src/storage/types.ts +2 -4
- package/src/testing/action-execution.ts +73 -13
- package/src/testing/action-run-storage-contract.ts +335 -0
- package/src/testing/auth-storage-contract.ts +14 -107
- package/src/testing/execution-storage-contract.ts +0 -2
- package/src/testing/index.ts +8 -1
- package/src/testing/materializer-storage-contract.ts +174 -18
- package/src/testing/queues-contract.ts +0 -18
- package/dist/actions/run-dispatch.d.ts +0 -25
- package/dist/actions/run-dispatch.d.ts.map +0 -1
- package/dist/actions/worker.d.ts +0 -3
- package/dist/actions/worker.d.ts.map +0 -1
- package/dist/actions/worker.js +0 -325
- package/dist/actions/worker.js.map +0 -11
- package/dist/auth/audience.d.ts +0 -8
- package/dist/auth/audience.d.ts.map +0 -1
- package/dist/authorization/application-access.d.ts +0 -18
- package/dist/authorization/application-access.d.ts.map +0 -1
- package/dist/chunk-1hqwggsn.js.map +0 -12
- package/dist/chunk-2jntasmh.js.map +0 -13
- package/dist/chunk-6h5m9xjx.js.map +0 -40
- package/dist/chunk-85cd7e8c.js +0 -51
- package/dist/chunk-85cd7e8c.js.map +0 -10
- package/dist/chunk-de4z2bj6.js.map +0 -18
- package/dist/chunk-dfm066qg.js.map +0 -11
- package/dist/chunk-enpsx8k5.js.map +0 -10
- package/dist/chunk-fc5zfxy1.js.map +0 -11
- package/dist/chunk-fe52eczz.js.map +0 -49
- package/dist/chunk-fx93hd2n.js +0 -1614
- package/dist/chunk-fx93hd2n.js.map +0 -20
- package/dist/chunk-k6hrnf35.js.map +0 -10
- package/dist/chunk-qkbx3tf6.js.map +0 -24
- package/dist/chunk-qxvp5epv.js +0 -1329
- package/dist/chunk-qxvp5epv.js.map +0 -36
- package/dist/chunk-r2y23egw.js.map +0 -10
- package/dist/chunk-tffvfy6s.js +0 -593
- package/dist/chunk-tffvfy6s.js.map +0 -15
- package/dist/chunk-xt1zt7gv.js.map +0 -13
- package/dist/chunk-y2aq6ag9.js.map +0 -11
- package/dist/chunk-y9jmd7e5.js.map +0 -15
- package/dist/chunk-zvx7h87b.js +0 -12
- package/dist/chunk-zvx7h87b.js.map +0 -10
- package/dist/events/types/actions.d.ts +0 -39
- package/dist/events/types/actions.d.ts.map +0 -1
- package/dist/objects/service/action-service.d.ts +0 -13
- package/dist/objects/service/action-service.d.ts.map +0 -1
- package/dist/security/applications.d.ts +0 -15
- package/dist/security/applications.d.ts.map +0 -1
- package/src/actions/run-dispatch.ts +0 -282
- package/src/actions/worker.ts +0 -2
- package/src/auth/audience.ts +0 -28
- package/src/authorization/application-access.ts +0 -34
- package/src/events/types/actions.ts +0 -42
- package/src/objects/service/action-service.ts +0 -43
- package/src/security/applications.ts +0 -11
- /package/dist/{chunk-rz53yb4v.js.map → chunk-0yh890a4.js.map} +0 -0
- /package/dist/{chunk-vgk3hknm.js.map → chunk-1k89ecfr.js.map} +0 -0
- /package/dist/{chunk-ny3xyvcn.js.map → chunk-1zq2p6g0.js.map} +0 -0
- /package/dist/{chunk-dnmadg9k.js.map → chunk-3t2hgbgd.js.map} +0 -0
- /package/dist/{chunk-22v5bpz3.js.map → chunk-5e43w60z.js.map} +0 -0
- /package/dist/{chunk-7hpdd6r9.js.map → chunk-6p49a5cq.js.map} +0 -0
- /package/dist/{chunk-kkqwzy6h.js.map → chunk-7t429e3f.js.map} +0 -0
- /package/dist/{chunk-ex496vct.js.map → chunk-9dmt152s.js.map} +0 -0
- /package/dist/{chunk-48e3cn2d.js.map → chunk-9gyp8hg1.js.map} +0 -0
- /package/dist/{chunk-zxawp1n2.js.map → chunk-9w055r5b.js.map} +0 -0
- /package/dist/{chunk-4wn7bxxa.js.map → chunk-9ybhtmg4.js.map} +0 -0
- /package/dist/{chunk-vx2yp45y.js.map → chunk-c85m1hyj.js.map} +0 -0
- /package/dist/{chunk-bs7sqkre.js.map → chunk-d09tj99x.js.map} +0 -0
- /package/dist/{chunk-zb77kjth.js.map → chunk-dk8tkk5f.js.map} +0 -0
- /package/dist/{chunk-vjcd8d27.js.map → chunk-fa02jy15.js.map} +0 -0
- /package/dist/{chunk-za5yd58j.js.map → chunk-fkgc1wt8.js.map} +0 -0
- /package/dist/{chunk-6gmfggss.js.map → chunk-t7x8dmn0.js.map} +0 -0
- /package/dist/{chunk-p844e0rn.js.map → chunk-tpn40322.js.map} +0 -0
- /package/dist/{chunk-rt9p8m9t.js.map → chunk-v9xd5wzd.js.map} +0 -0
- /package/dist/{chunk-2vhg6ysa.js.map → chunk-vyf9kfqf.js.map} +0 -0
- /package/dist/{chunk-bwjcehza.js.map → chunk-way52z4h.js.map} +0 -0
- /package/dist/{chunk-qkvz64nd.js.map → chunk-x6m907x7.js.map} +0 -0
- /package/dist/{chunk-yv9czyfr.js.map → chunk-xfs8x8m9.js.map} +0 -0
- /package/dist/{chunk-v6xpd60t.js.map → chunk-yevzdx4y.js.map} +0 -0
- /package/dist/{chunk-qmnnhde6.js.map → chunk-z4m0yz8c.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"materializer-storage-contract.d.ts","sourceRoot":"","sources":["../../src/testing/materializer-storage-contract.ts"],"names":[],"mappings":"AACA,OAAO,EASL,KAAK,OAAO,EACb,MAAM,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"materializer-storage-contract.d.ts","sourceRoot":"","sources":["../../src/testing/materializer-storage-contract.ts"],"names":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AK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5D;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B;;;OAGG;IACH,QAAQ,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAA;IACzC;;OAEG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CACpC;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,yBAAyB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"queues-contract.d.ts","sourceRoot":"","sources":["../../src/testing/queues-contract.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgD,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAU3F,MAAM,WAAW,yBAAyB;IACxC,0EAA0E;IAC1E,QAAQ,CAAC,YAAY,EAAE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACrD,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5D;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B;;;OAGG;IACH,QAAQ,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAA;IACzC;;OAEG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CACpC;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,yBAAyB,GAAG,IAAI,CAgrB7F"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"../chunk-
|
|
2
|
+
import"../chunk-8mx7qw3y.js";
|
|
3
3
|
import"../chunk-z3y5kg1x.js";
|
|
4
|
-
import"../chunk-
|
|
5
|
-
import"../chunk-
|
|
4
|
+
import"../chunk-gsjm1wms.js";
|
|
5
|
+
import"../chunk-d0bqz29d.js";
|
|
6
6
|
import"../chunk-v4jbb3rs.js";
|
|
7
7
|
import"../chunk-jhm3zsa7.js";
|
|
8
|
-
import"../chunk-
|
|
8
|
+
import"../chunk-hvsb78a1.js";
|
|
9
9
|
import {
|
|
10
10
|
createConnectorCodedError,
|
|
11
11
|
getConnectorExecutionSourceResolver
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import"../chunk-
|
|
14
|
-
import"../chunk-
|
|
15
|
-
import"../chunk-
|
|
16
|
-
import"../chunk-
|
|
17
|
-
import"../chunk-
|
|
18
|
-
import"../chunk-
|
|
12
|
+
} from "../chunk-tg2cw67r.js";
|
|
13
|
+
import"../chunk-a40ad1ft.js";
|
|
14
|
+
import"../chunk-b38szspf.js";
|
|
15
|
+
import"../chunk-vpq4shxz.js";
|
|
16
|
+
import"../chunk-es1gxsbf.js";
|
|
17
|
+
import"../chunk-v9xd5wzd.js";
|
|
18
|
+
import"../chunk-hcbyfxbe.js";
|
|
19
19
|
import"../chunk-pqajwytd.js";
|
|
20
20
|
import"../chunk-29yx306f.js";
|
|
21
21
|
import"../chunk-gfdh9kqa.js";
|
|
@@ -24,38 +24,38 @@ import"../chunk-s54c868q.js";
|
|
|
24
24
|
import"../chunk-ere85b8y.js";
|
|
25
25
|
import"../chunk-4as3wt1c.js";
|
|
26
26
|
import"../chunk-h89wz928.js";
|
|
27
|
-
import"../chunk-
|
|
27
|
+
import"../chunk-9w055r5b.js";
|
|
28
28
|
import {
|
|
29
29
|
ExecutionStorageError2
|
|
30
30
|
} from "../chunk-tw03bsmb.js";
|
|
31
|
-
import"../chunk-
|
|
32
|
-
import"../chunk-
|
|
31
|
+
import"../chunk-d09tj99x.js";
|
|
32
|
+
import"../chunk-7n440zgt.js";
|
|
33
33
|
import {
|
|
34
34
|
canRetryWebhookRun2
|
|
35
|
-
} from "../chunk-
|
|
36
|
-
import"../chunk-
|
|
35
|
+
} from "../chunk-n33z5bjw.js";
|
|
36
|
+
import"../chunk-pbcbn83d.js";
|
|
37
37
|
import"../chunk-qczk96d9.js";
|
|
38
38
|
import"../chunk-mmagke4x.js";
|
|
39
39
|
import"../chunk-hn2r7z41.js";
|
|
40
|
-
import"../chunk-
|
|
40
|
+
import"../chunk-9ybhtmg4.js";
|
|
41
41
|
import"../chunk-jmfet9r4.js";
|
|
42
42
|
import {
|
|
43
43
|
WebhookRunError2
|
|
44
44
|
} from "../chunk-qf954wje.js";
|
|
45
|
-
import"../chunk-
|
|
46
|
-
import {
|
|
47
|
-
isOAuthConnectorDefinition2,
|
|
48
|
-
isStaticConnectorDefinition2
|
|
49
|
-
} from "../chunk-9x8dybsb.js";
|
|
45
|
+
import"../chunk-rrzt8jdy.js";
|
|
50
46
|
import {
|
|
51
47
|
createPrimitiveExecutionRecord
|
|
52
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-9dmt152s.js";
|
|
53
49
|
import"../chunk-br3k6qbf.js";
|
|
54
50
|
import {
|
|
55
51
|
isStorageSerializationFailure2
|
|
56
|
-
} from "../chunk-
|
|
52
|
+
} from "../chunk-s16apyk9.js";
|
|
57
53
|
import"../chunk-rj69qcrd.js";
|
|
58
|
-
import
|
|
54
|
+
import {
|
|
55
|
+
isOAuthConnectorDefinition2,
|
|
56
|
+
isStaticConnectorDefinition2
|
|
57
|
+
} from "../chunk-9x8dybsb.js";
|
|
58
|
+
import"../chunk-c85m1hyj.js";
|
|
59
59
|
// src/webhooks/connections.ts
|
|
60
60
|
function createWebhookConnections(runtime, definition) {
|
|
61
61
|
return {
|
|
@@ -198,4 +198,4 @@ export {
|
|
|
198
198
|
isStaticConnectorDefinition2 as isStaticConnectorDefinition
|
|
199
199
|
};
|
|
200
200
|
|
|
201
|
-
//# debugId=
|
|
201
|
+
//# debugId=6A0B81958550879664756E2164756E21
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
"import { randomUUID } from \"node:crypto\"\nimport { createPrimitiveExecutionRecord } from \"../execution/durable\"\nimport type { ExecutionRecord, Storage, WebhookRunRecord } from \"../storage\"\nimport {\n canRetryWebhookRun,\n ExecutionStorageError,\n isStorageSerializationFailure,\n WebhookRunError,\n} from \"../storage\"\n\nconst MAX_ADMISSION_ATTEMPTS = 3\n\nexport interface AdmitWebhookRunInput {\n readonly projectId: string\n readonly storage: Storage\n readonly runId: string\n readonly connectorId: string\n readonly webhookId: string\n readonly method: string\n readonly route: string\n readonly requestBodyBytes: number\n readonly requestBodySha256: string\n readonly idempotencyKey?: string\n}\n\nexport type AdmitWebhookRunResult =\n | {\n readonly status: \"admitted\"\n readonly run: WebhookRunRecord\n readonly execution: ExecutionRecord\n readonly retried: boolean\n }\n | {\n readonly status: \"duplicate\" | \"in_progress\"\n readonly run: WebhookRunRecord\n }\n\n/** Persist or reclaim one verified Webhook delivery before its protected handler executes. */\nexport async function admitWebhookRun(input: AdmitWebhookRunInput): Promise<AdmitWebhookRunResult> {\n assertAdmissionInput(input)\n let attempt = 0\n\n // Concurrent deliveries may both observe no run before one transaction commits. Retry only\n // serialization and uniqueness races so the loser can reload the winning run; every other error\n // fails immediately, and repeated contention remains bounded by MAX_ADMISSION_ATTEMPTS.\n while (true) {\n attempt += 1\n try {\n return await input.storage.transaction((tx) => admitWebhookRunTransaction(tx, input), {\n isolation: \"serializable\",\n })\n } catch (error) {\n if (attempt >= MAX_ADMISSION_ATTEMPTS || !isConcurrentAdmissionConflict(error)) {\n throw error\n }\n }\n }\n}\n\nasync function admitWebhookRunTransaction(\n storage: Storage,\n input: AdmitWebhookRunInput\n): Promise<AdmitWebhookRunResult> {\n const runs = requireWebhookRunStorage(storage)\n const existing = input.idempotencyKey\n ? await runs.getByDelivery({\n projectId: input.projectId,\n connectorId: input.connectorId,\n webhookId: input.webhookId,\n idempotencyKey: input.idempotencyKey,\n })\n : null\n\n if (existing) {\n assertSameDelivery(existing, input)\n if (existing.status === \"running\") return { status: \"in_progress\", run: existing }\n if (!canRetryWebhookRun(existing)) return { status: \"duplicate\", run: existing }\n\n const execution = await requireWebhookExecution(storage, existing)\n const run = await runs.restart({\n projectId: input.projectId,\n id: existing.id,\n })\n return { status: \"admitted\", run, execution, retried: true }\n }\n\n const executionInput = createPrimitiveExecutionRecord({\n id: `exec_${randomUUID()}`,\n primitive: { kind: \"webhook\", id: input.route, runId: input.runId },\n origin: {\n type: \"automatic\",\n projectId: input.projectId,\n source: { type: \"webhook\", deliveryId: input.runId },\n correlationId: input.runId,\n },\n })\n const execution = await storage.executions.create(executionInput)\n const run = await runs.start({\n id: input.runId,\n projectId: input.projectId,\n executionId: execution.id,\n connectorId: input.connectorId,\n webhookId: input.webhookId,\n method: input.method,\n route: input.route,\n requestBodyBytes: input.requestBodyBytes,\n requestBodySha256: input.requestBodySha256,\n idempotencyKey: input.idempotencyKey,\n })\n return { status: \"admitted\", run, execution, retried: false }\n}\n\nfunction assertSameDelivery(existing: WebhookRunRecord, input: AdmitWebhookRunInput): void {\n if (\n existing.connectorId !== input.connectorId ||\n existing.webhookId !== input.webhookId ||\n existing.method !== input.method ||\n existing.route !== input.route ||\n existing.requestBodyBytes !== input.requestBodyBytes ||\n existing.requestBodySha256 !== input.requestBodySha256\n ) {\n throw new WebhookRunError(\n `[Sixb] Webhook delivery '${input.idempotencyKey}' conflicts with run '${existing.id}'.`,\n \"delivery_conflict\"\n )\n }\n}\n\nasync function requireWebhookExecution(\n storage: Storage,\n run: WebhookRunRecord\n): Promise<ExecutionRecord> {\n const execution = await storage.executions.getById({\n projectId: run.projectId,\n id: run.executionId,\n })\n if (!execution) {\n throw new WebhookRunError(\n `[Sixb] Execution '${run.executionId}' for Webhook run '${run.id}' was not found.`,\n \"invalid_execution\"\n )\n }\n return execution\n}\n\nfunction requireWebhookRunStorage(storage: Storage): NonNullable<Storage[\"webhookRuns\"]> {\n if (!storage.webhookRuns) {\n throw new WebhookRunError(\"[Sixb] Webhook run storage is not configured.\")\n }\n return storage.webhookRuns\n}\n\nfunction assertAdmissionInput(input: AdmitWebhookRunInput): void {\n if (input.idempotencyKey !== undefined && !input.idempotencyKey.trim()) {\n throw new WebhookRunError(\"[Sixb] Webhook idempotency key must not be empty.\")\n }\n if (!Number.isSafeInteger(input.requestBodyBytes) || input.requestBodyBytes < 0) {\n throw new WebhookRunError(\"[Sixb] Webhook request body bytes must be a non-negative integer.\")\n }\n if (!/^[a-f0-9]{64}$/.test(input.requestBodySha256)) {\n throw new WebhookRunError(\"[Sixb] Webhook request body SHA-256 must be lowercase hexadecimal.\")\n }\n}\n\nfunction isConcurrentAdmissionConflict(error: unknown): boolean {\n return (\n isStorageSerializationFailure(error) ||\n (error instanceof ExecutionStorageError && error.code === \"duplicate_execution\") ||\n (error instanceof WebhookRunError &&\n (error.code === \"duplicate_run\" || error.code === \"invalid_transition\"))\n )\n}\n"
|
|
7
7
|
],
|
|
8
8
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,SAAS,wBAAwB,CACtC,SACA,YACoB;AAAA,EACpB,OAAO;AAAA,SACC,WAAU,CAAC,WAAW;AAAA,MAC1B,IAAI,CAAC,4BAA2B,UAAU,GAAG;AAAA,QAC3C,MAAM,0BACJ,mCACA,sEACF;AAAA,MACF;AAAA,MACA,IAAI,OAAO,cAAc,YAAY,CAAC,UAAU,KAAK,GAAG;AAAA,QACtD,MAAM,0BACJ,mCACA,gDACF;AAAA,MACF;AAAA,MACA,MAAM,WAAW,oCAAoC,OAAO;AAAA,MAC5D,MAAM,UAAU,MAAM,SAAS,KAAK,UAAU;AAAA,MAC9C,OAAO,QAAQ,QAAQ,CAAC,WAAW;AAAA,QACjC,MAAM,aAAa,OAAO;AAAA,QAC1B,IAAI,CAAC,cAAc,WAAW,QAAQ,OAAO;AAAA,UAAW,OAAO,CAAC;AAAA,QAChE,MAAM,eAAe,WAAW;AAAA,QAChC,IAAI;AAAA,QACJ,OAAO;AAAA,UACL;AAAA,YACE;AAAA,YACA,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/workflows/index.js
CHANGED
|
@@ -8,13 +8,14 @@ import {
|
|
|
8
8
|
defineWorkflow2,
|
|
9
9
|
createWorkflowNodeFailure2,
|
|
10
10
|
unwrapWorkflowNodeFailure2
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import"../chunk-
|
|
11
|
+
} from "../chunk-k6q3n2sc.js";
|
|
12
|
+
import"../chunk-nq6gpjt7.js";
|
|
13
13
|
import"../chunk-fb3feg1e.js";
|
|
14
|
-
import"../chunk-
|
|
15
|
-
import"../chunk-
|
|
16
|
-
import"../chunk-
|
|
17
|
-
import"../chunk-
|
|
14
|
+
import"../chunk-yxd3nnqt.js";
|
|
15
|
+
import"../chunk-bkpke1sg.js";
|
|
16
|
+
import"../chunk-tpn40322.js";
|
|
17
|
+
import"../chunk-1k89ecfr.js";
|
|
18
|
+
import"../chunk-1sr8ryzk.js";
|
|
18
19
|
import {
|
|
19
20
|
WorkflowDefinitionError2,
|
|
20
21
|
WorkflowValidationError2,
|
|
@@ -44,72 +45,68 @@ import {
|
|
|
44
45
|
snapshotWorkflowActionInput2,
|
|
45
46
|
WorkflowRunDispatcher2,
|
|
46
47
|
requestWorkflowRun2
|
|
47
|
-
} from "../chunk-
|
|
48
|
-
import"../chunk-
|
|
49
|
-
import"../chunk-
|
|
50
|
-
import"../chunk-
|
|
51
|
-
import"../chunk-
|
|
52
|
-
import"../chunk-
|
|
48
|
+
} from "../chunk-6c6sn0bh.js";
|
|
49
|
+
import"../chunk-xfs8x8m9.js";
|
|
50
|
+
import"../chunk-tg2cw67r.js";
|
|
51
|
+
import"../chunk-fkgc1wt8.js";
|
|
52
|
+
import"../chunk-4vyr1j8f.js";
|
|
53
|
+
import"../chunk-hjzdd750.js";
|
|
53
54
|
import"../chunk-mfs23znk.js";
|
|
54
|
-
import"../chunk-
|
|
55
|
+
import"../chunk-1zq2p6g0.js";
|
|
55
56
|
import"../chunk-99nd4rc1.js";
|
|
56
|
-
import"../chunk-
|
|
57
|
-
import"../chunk-
|
|
58
|
-
import"../chunk-
|
|
59
|
-
import"../chunk-
|
|
60
|
-
import"../chunk-
|
|
61
|
-
import"../chunk-
|
|
62
|
-
import"../chunk-6gmfggss.js";
|
|
63
|
-
import"../chunk-bwjcehza.js";
|
|
64
|
-
import"../chunk-rz53yb4v.js";
|
|
65
|
-
import"../chunk-tffvfy6s.js";
|
|
66
|
-
import"../chunk-fx93hd2n.js";
|
|
67
|
-
import"../chunk-p0dqwj3n.js";
|
|
68
|
-
import"../chunk-ex496vct.js";
|
|
69
|
-
import"../chunk-htr6wjmv.js";
|
|
70
|
-
import"../chunk-qq90g05n.js";
|
|
71
|
-
import"../chunk-4wn7bxxa.js";
|
|
57
|
+
import"../chunk-vyf9kfqf.js";
|
|
58
|
+
import"../chunk-bx9q3cwv.js";
|
|
59
|
+
import"../chunk-yevzdx4y.js";
|
|
60
|
+
import"../chunk-9dmt152s.js";
|
|
61
|
+
import"../chunk-n33z5bjw.js";
|
|
62
|
+
import"../chunk-9ybhtmg4.js";
|
|
72
63
|
import"../chunk-br3k6qbf.js";
|
|
73
64
|
import"../chunk-jmfet9r4.js";
|
|
74
65
|
import"../chunk-qf954wje.js";
|
|
75
|
-
import"../chunk-
|
|
66
|
+
import"../chunk-rrzt8jdy.js";
|
|
76
67
|
import"../chunk-tw03bsmb.js";
|
|
77
|
-
import"../chunk-
|
|
78
|
-
import"../chunk-
|
|
68
|
+
import"../chunk-9w055r5b.js";
|
|
69
|
+
import"../chunk-s16apyk9.js";
|
|
79
70
|
import"../chunk-hn2r7z41.js";
|
|
80
71
|
import"../chunk-h89wz928.js";
|
|
81
|
-
import"../chunk-
|
|
72
|
+
import"../chunk-pbcbn83d.js";
|
|
82
73
|
import"../chunk-qczk96d9.js";
|
|
83
74
|
import"../chunk-mmagke4x.js";
|
|
84
|
-
import"../chunk-
|
|
85
|
-
import"../chunk-
|
|
75
|
+
import"../chunk-b38szspf.js";
|
|
76
|
+
import"../chunk-a40ad1ft.js";
|
|
86
77
|
import"../chunk-s54c868q.js";
|
|
87
78
|
import"../chunk-ere85b8y.js";
|
|
88
79
|
import"../chunk-rj69qcrd.js";
|
|
89
80
|
import"../chunk-4as3wt1c.js";
|
|
90
|
-
import"../chunk-b9affek3.js";
|
|
91
81
|
import"../chunk-29yx306f.js";
|
|
92
82
|
import"../chunk-pqajwytd.js";
|
|
93
|
-
import"../chunk-
|
|
94
|
-
import"../chunk-
|
|
95
|
-
import"../chunk-
|
|
96
|
-
import"../chunk-
|
|
83
|
+
import"../chunk-d09tj99x.js";
|
|
84
|
+
import"../chunk-3qms4nax.js";
|
|
85
|
+
import"../chunk-7n440zgt.js";
|
|
86
|
+
import"../chunk-m427qgq0.js";
|
|
87
|
+
import"../chunk-fa02jy15.js";
|
|
88
|
+
import"../chunk-7t429e3f.js";
|
|
89
|
+
import"../chunk-3zxk45er.js";
|
|
90
|
+
import"../chunk-5a4a52tq.js";
|
|
91
|
+
import"../chunk-t7x8dmn0.js";
|
|
92
|
+
import"../chunk-way52z4h.js";
|
|
93
|
+
import"../chunk-0yh890a4.js";
|
|
97
94
|
import"../chunk-gc4ntf7d.js";
|
|
98
95
|
import"../chunk-gfdh9kqa.js";
|
|
99
96
|
import"../chunk-pfp1txq2.js";
|
|
100
|
-
import"../chunk-
|
|
101
|
-
import"../chunk-
|
|
102
|
-
import"../chunk-
|
|
103
|
-
import"../chunk-
|
|
104
|
-
import"../chunk-
|
|
97
|
+
import"../chunk-5e43w60z.js";
|
|
98
|
+
import"../chunk-vpq4shxz.js";
|
|
99
|
+
import"../chunk-c85m1hyj.js";
|
|
100
|
+
import"../chunk-v9xd5wzd.js";
|
|
101
|
+
import"../chunk-es1gxsbf.js";
|
|
102
|
+
import"../chunk-hcbyfxbe.js";
|
|
103
|
+
import"../chunk-d0bqz29d.js";
|
|
105
104
|
import"../chunk-v4jbb3rs.js";
|
|
106
|
-
import"../chunk-
|
|
107
|
-
import"../chunk-
|
|
108
|
-
import"../chunk-y05543x6.js";
|
|
105
|
+
import"../chunk-hvsb78a1.js";
|
|
106
|
+
import"../chunk-gsjm1wms.js";
|
|
109
107
|
import"../chunk-jhm3zsa7.js";
|
|
110
|
-
import"../chunk-
|
|
108
|
+
import"../chunk-8mx7qw3y.js";
|
|
111
109
|
import"../chunk-z3y5kg1x.js";
|
|
112
|
-
import"../chunk-2jntasmh.js";
|
|
113
110
|
export {
|
|
114
111
|
WorkflowDefinitionError2 as WorkflowDefinitionError,
|
|
115
112
|
WorkflowRunDispatcher2 as WorkflowRunDispatcher,
|
|
@@ -149,4 +146,4 @@ export {
|
|
|
149
146
|
workflowAgentStepActorId2 as workflowAgentStepActorId
|
|
150
147
|
};
|
|
151
148
|
|
|
152
|
-
//# debugId=
|
|
149
|
+
//# debugId=26BA62DA2C73FF4764756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sixb/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"description": "The ontology-first runtime for Sixb — objects, links, telemetry, actions, and provider contracts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sixb",
|
|
@@ -77,12 +77,6 @@
|
|
|
77
77
|
"import": "./dist/events/selectors/index.js",
|
|
78
78
|
"default": "./dist/events/selectors/index.js"
|
|
79
79
|
},
|
|
80
|
-
"./internal/action-edits": {
|
|
81
|
-
"types": "./dist/actions/worker.d.ts",
|
|
82
|
-
"bun": "./src/actions/worker.ts",
|
|
83
|
-
"import": "./dist/actions/worker.js",
|
|
84
|
-
"default": "./dist/actions/worker.js"
|
|
85
|
-
},
|
|
86
80
|
"./internal/actions": {
|
|
87
81
|
"types": "./dist/actions/index.d.ts",
|
|
88
82
|
"bun": "./src/actions/index.ts",
|
|
@@ -461,6 +455,12 @@
|
|
|
461
455
|
"import": "./dist/sandboxes/index.js",
|
|
462
456
|
"default": "./dist/sandboxes/index.js"
|
|
463
457
|
},
|
|
458
|
+
"./security": {
|
|
459
|
+
"types": "./dist/security/public.d.ts",
|
|
460
|
+
"bun": "./src/security/public.ts",
|
|
461
|
+
"import": "./dist/security/public.js",
|
|
462
|
+
"default": "./dist/security/public.js"
|
|
463
|
+
},
|
|
464
464
|
"./storage": {
|
|
465
465
|
"types": "./dist/storage/index.d.ts",
|
|
466
466
|
"bun": "./src/storage/index.ts",
|
|
@@ -478,7 +478,7 @@
|
|
|
478
478
|
"build": "bun ../../scripts/build-package.ts",
|
|
479
479
|
"typecheck": "tsc --noEmit",
|
|
480
480
|
"test": "bun test",
|
|
481
|
-
"test:e2e": "bun ../../scripts/ci-guard.ts --stall 120 --max 600 bun test ./tests/published-artifacts.e2e.ts",
|
|
481
|
+
"test:e2e": "bun ../../scripts/ci-guard.ts --stall 120 --max 600 bun test ./tests/published-artifacts.e2e.ts ./tests/browser-entries.e2e.ts",
|
|
482
482
|
"prepack": "bun run build"
|
|
483
483
|
},
|
|
484
484
|
"devDependencies": {
|
|
@@ -10,8 +10,7 @@ import type {
|
|
|
10
10
|
OntologyOperationOutcome,
|
|
11
11
|
} from "../materializer"
|
|
12
12
|
import type { OntologyMutationRuntime } from "../runtime/ontology-mutations"
|
|
13
|
-
import type {
|
|
14
|
-
import { ActionEditCommitError } from "./errors"
|
|
13
|
+
import type { RecordActionRunInput } from "../storage"
|
|
15
14
|
|
|
16
15
|
/** Exact reads an Action handler depended on, protected by row-level CAS at commit time. */
|
|
17
16
|
export interface ActionReadDependencies {
|
|
@@ -24,9 +23,8 @@ const NO_READ_DEPENDENCIES: ActionReadDependencies = { objects: [], links: [], l
|
|
|
24
23
|
|
|
25
24
|
export interface CommitActionEditsInput {
|
|
26
25
|
readonly mutations: Pick<OntologyMutationRuntime, "commitEdits">
|
|
27
|
-
|
|
28
|
-
readonly
|
|
29
|
-
readonly actionId: string
|
|
26
|
+
/** The run's terminal record, which the commit inserts with its edits. */
|
|
27
|
+
readonly run: RecordActionRunInput
|
|
30
28
|
readonly batch: EditBatch
|
|
31
29
|
readonly dependencies?: ActionReadDependencies
|
|
32
30
|
}
|
|
@@ -44,19 +42,14 @@ export interface ActionEditCommitResult {
|
|
|
44
42
|
readonly committedAt: Date
|
|
45
43
|
}
|
|
46
44
|
|
|
47
|
-
export interface FindActionEditCommitInput {
|
|
48
|
-
readonly storage: Pick<Storage, "ontology">
|
|
49
|
-
readonly projectId: string
|
|
50
|
-
readonly runId: string
|
|
51
|
-
}
|
|
52
|
-
|
|
53
45
|
/**
|
|
54
46
|
* Commits one Action run's recorded edits as a single atomic ontology commit.
|
|
55
47
|
*
|
|
56
48
|
* The batch lowers to canonical Materializer operations and the Materializer validates the Action run
|
|
57
|
-
* identity, applies managed authority, resolves effective state, writes the authoritative commit,
|
|
58
|
-
* inserts outbox facts in one transaction. Repeating the call for the same run
|
|
59
|
-
* a divergent request for the same run is a typed
|
|
49
|
+
* identity, applies managed authority, resolves effective state, writes the authoritative commit,
|
|
50
|
+
* inserts outbox facts, and records the run in one transaction. Repeating the call for the same run
|
|
51
|
+
* replays that commit without recording anything; a divergent request for the same run is a typed
|
|
52
|
+
* idempotency conflict.
|
|
60
53
|
*/
|
|
61
54
|
export async function commitActionEdits(
|
|
62
55
|
input: CommitActionEditsInput
|
|
@@ -64,7 +57,8 @@ export async function commitActionEdits(
|
|
|
64
57
|
const dependencies = input.dependencies ?? NO_READ_DEPENDENCIES
|
|
65
58
|
const commit = await input.mutations.commitEdits({
|
|
66
59
|
mode: "atomic",
|
|
67
|
-
source: { kind: "action", actionId: input.actionId, runId: input.
|
|
60
|
+
source: { kind: "action", actionId: input.run.actionId, runId: input.run.id },
|
|
61
|
+
run: input.run,
|
|
68
62
|
operations: lowerEditBatch(input.batch),
|
|
69
63
|
expectedObjects: dependencies.objects,
|
|
70
64
|
expectedLinks: dependencies.links,
|
|
@@ -73,28 +67,6 @@ export async function commitActionEdits(
|
|
|
73
67
|
return toActionEditCommitResult(commit)
|
|
74
68
|
}
|
|
75
69
|
|
|
76
|
-
/**
|
|
77
|
-
* Resolves the authoritative commit an Action run already produced, if any.
|
|
78
|
-
*
|
|
79
|
-
* Resume uses the exact `{ actionRunId }` origin instead of rerunning handlers, so a redelivered run
|
|
80
|
-
* returns the persisted result without recomputing an idempotency hash.
|
|
81
|
-
*/
|
|
82
|
-
export async function findActionEditCommit(
|
|
83
|
-
input: FindActionEditCommitInput
|
|
84
|
-
): Promise<ActionEditCommitResult | null> {
|
|
85
|
-
const record = await input.storage.ontology.commits.getByOrigin({
|
|
86
|
-
projectId: input.projectId,
|
|
87
|
-
origin: { kind: "action", actionRunId: input.runId },
|
|
88
|
-
})
|
|
89
|
-
if (!record) return null
|
|
90
|
-
if (record.result.kind !== "edit") {
|
|
91
|
-
throw new ActionEditCommitError(
|
|
92
|
-
`[Sixb] Action run '${input.runId}' resolved a '${record.result.kind}' commit instead of an edit commit.`
|
|
93
|
-
)
|
|
94
|
-
}
|
|
95
|
-
return toActionEditCommitResult({ ...record.result, created: false })
|
|
96
|
-
}
|
|
97
|
-
|
|
98
70
|
function toActionEditCommitResult(commit: EditCommitResult): ActionEditCommitResult {
|
|
99
71
|
return {
|
|
100
72
|
commitId: commit.commitId,
|
package/src/actions/errors.ts
CHANGED
|
@@ -2,10 +2,6 @@ export class ActionDefinitionError extends Error {
|
|
|
2
2
|
readonly name = "ActionDefinitionError"
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
export class ActionEditCommitError extends Error {
|
|
6
|
-
readonly name = "ActionEditCommitError"
|
|
7
|
-
}
|
|
8
|
-
|
|
9
5
|
export function missingActionMutationMessage(actionId: string): string {
|
|
10
6
|
return `Action "${actionId}" must declare .writeback(...) or .edits(...).`
|
|
11
7
|
}
|
package/src/actions/execution.ts
CHANGED
|
@@ -14,13 +14,7 @@ import type {
|
|
|
14
14
|
} from "../storage/action-runs"
|
|
15
15
|
import { assertObjectReadOutputWithinLimit } from "../storage/objects/execution-limits"
|
|
16
16
|
import { type ActionDescriptor, snapshotActionDescriptor } from "./descriptor"
|
|
17
|
-
import {
|
|
18
|
-
type RequestActionAndWaitInput,
|
|
19
|
-
type RequestActionInput,
|
|
20
|
-
type RequestActionResult,
|
|
21
|
-
requestAction,
|
|
22
|
-
requestActionAndWait,
|
|
23
|
-
} from "./request"
|
|
17
|
+
import { type RequestActionInput, requestAction } from "./request"
|
|
24
18
|
import { canDelegationAccessActionRun } from "./run-authorization"
|
|
25
19
|
import type { ActionDefinition } from "./types"
|
|
26
20
|
|
|
@@ -36,8 +30,15 @@ export interface ActionsRuntime {
|
|
|
36
30
|
getById(actionId: string): ActionDescriptor | null
|
|
37
31
|
listGlobal(): readonly ActionDescriptor[]
|
|
38
32
|
listForType(objectType: ObjectType): readonly ActionDescriptor[]
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Run an Action in this process and return its terminal record, without waiting for its effects.
|
|
35
|
+
* A run that fails resolves with status `failed`. The call rejects when the request itself is
|
|
36
|
+
* refused (unknown action, invalid params, missing authority, a run id this process is still
|
|
37
|
+
* running, a stopping runtime), and with `internal.unexpected` when a run that started could not
|
|
38
|
+
* be recorded: requesting it again with the same run id returns its record if it was recorded, and
|
|
39
|
+
* runs it again otherwise.
|
|
40
|
+
*/
|
|
41
|
+
request(input: RequestActionInput): Promise<ActionRunRecord>
|
|
41
42
|
readonly runs: ActionRunsRuntime
|
|
42
43
|
}
|
|
43
44
|
|
|
@@ -107,7 +108,6 @@ export function createActionsRuntime(
|
|
|
107
108
|
)
|
|
108
109
|
),
|
|
109
110
|
request: (input) => requestAction(runtime, execution, input),
|
|
110
|
-
requestAndWait: (input) => requestActionAndWait(runtime, execution, input),
|
|
111
111
|
runs: {
|
|
112
112
|
getById: async (runId) => {
|
|
113
113
|
if (
|
package/src/actions/index.ts
CHANGED
|
@@ -1,28 +1,11 @@
|
|
|
1
1
|
export { defineAction, optional, param } from "./builders"
|
|
2
|
-
export
|
|
3
|
-
ActionEditCommitResult,
|
|
4
|
-
ActionReadDependencies,
|
|
5
|
-
CommitActionEditsInput,
|
|
6
|
-
FindActionEditCommitInput,
|
|
7
|
-
} from "./commit-edits"
|
|
8
|
-
export { commitActionEdits, findActionEditCommit } from "./commit-edits"
|
|
9
|
-
export { ActionDefinitionError, ActionEditCommitError } from "./errors"
|
|
10
|
-
export type {
|
|
11
|
-
ActionReadFacadeOptions,
|
|
12
|
-
ActionTelemetryReadSource,
|
|
13
|
-
} from "./read-facade"
|
|
14
|
-
export { ActionReadRecorder, createActionReadFacade } from "./read-facade"
|
|
2
|
+
export { ActionDefinitionError } from "./errors"
|
|
15
3
|
export type { ActionDefinitionCatalog, ActionRegistryOptions } from "./registry"
|
|
16
4
|
export { ActionRegistry } from "./registry"
|
|
17
|
-
export type {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
RequestActionOptions,
|
|
22
|
-
RequestActionResult,
|
|
23
|
-
WaitForActionRunInput,
|
|
24
|
-
} from "./request"
|
|
25
|
-
export { requestAction, requestActionAndWait, waitForActionRun } from "./request"
|
|
5
|
+
export type { RequestActionInput, RequestActionOptions } from "./request"
|
|
6
|
+
export { requestAction } from "./request"
|
|
7
|
+
export { drainActionRuns } from "./run/executor"
|
|
8
|
+
export { ACTION_RUN_DRAIN_TIMEOUT_MS } from "./run/signals"
|
|
26
9
|
export type {
|
|
27
10
|
ActionBinding,
|
|
28
11
|
ActionBlobContext,
|
|
@@ -73,9 +56,7 @@ export type {
|
|
|
73
56
|
ObjectActionPhaseBuilder,
|
|
74
57
|
} from "./types"
|
|
75
58
|
export {
|
|
76
|
-
coerceActionParamsToTyped,
|
|
77
59
|
isActionDefinition,
|
|
78
60
|
isGlobalActionDefinition,
|
|
79
61
|
isObjectActionDefinition,
|
|
80
62
|
} from "./validation"
|
|
81
|
-
export { runActionValidators } from "./validators"
|