@sixb/core 0.1.18 → 0.1.19
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/index.js +11 -11
- package/dist/auth/index.js.map +1 -1
- package/dist/authorization/event-visibility.d.ts.map +1 -1
- package/dist/authorization/index.js +3 -3
- package/dist/bootstrap/index.js +46 -49
- package/dist/bootstrap/index.js.map +2 -2
- package/dist/{chunk-d0eb5yy6.js → chunk-1f7wpmyp.js} +5 -5
- package/dist/{chunk-d0eb5yy6.js.map → chunk-1f7wpmyp.js.map} +1 -1
- package/dist/{chunk-vgk3hknm.js → chunk-1k89ecfr.js} +1 -1
- package/dist/{chunk-6h5m9xjx.js → chunk-3gnrh4ve.js} +6 -10
- package/dist/{chunk-6h5m9xjx.js.map → chunk-3gnrh4ve.js.map} +4 -4
- package/dist/{chunk-htr6wjmv.js → chunk-4tcx876c.js} +15 -15
- package/dist/{chunk-htr6wjmv.js.map → chunk-4tcx876c.js.map} +1 -1
- package/dist/{chunk-za5yd58j.js → chunk-52bk93x8.js} +2 -2
- package/dist/{chunk-22v5bpz3.js → chunk-5e43w60z.js} +1 -1
- package/dist/{chunk-zxawp1n2.js → chunk-7kg3k1m9.js} +1 -1
- package/dist/{chunk-ny3xyvcn.js → chunk-7mbzgd9m.js} +3 -3
- 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-s4jhg8a3.js → chunk-80mc0971.js} +13 -13
- package/dist/{chunk-s4jhg8a3.js.map → chunk-80mc0971.js.map} +1 -1
- package/dist/{chunk-1b1f2d5f.js → chunk-85yvv5n0.js} +8 -8
- package/dist/{chunk-1b1f2d5f.js.map → chunk-85yvv5n0.js.map} +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-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-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-vz3gc1tm.js → chunk-aff7cyea.js} +62 -64
- package/dist/{chunk-vz3gc1tm.js.map → chunk-aff7cyea.js.map} +4 -4
- 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-bs7sqkre.js → chunk-bpgy64fw.js} +1 -1
- package/dist/{chunk-vx2yp45y.js → chunk-c85m1hyj.js} +2 -2
- package/dist/{chunk-v6xpd60t.js → chunk-d2ync1v3.js} +5 -5
- package/dist/{chunk-fe52eczz.js → chunk-ey3pyej1.js} +6345 -2125
- package/dist/chunk-ey3pyej1.js.map +106 -0
- package/dist/{chunk-vjcd8d27.js → chunk-fa02jy15.js} +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-qq90g05n.js → chunk-j2bp5ryw.js} +53 -244
- package/dist/{chunk-qq90g05n.js.map → chunk-j2bp5ryw.js.map} +3 -3
- package/dist/{chunk-qmnnhde6.js → chunk-kg5j6fct.js} +1 -1
- package/dist/{chunk-de4z2bj6.js → chunk-kyzq4wy9.js} +6 -6
- 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-e1c18xjx.js → chunk-nq6gpjt7.js} +4 -45
- package/dist/{chunk-e1c18xjx.js.map → chunk-nq6gpjt7.js.map} +5 -5
- package/dist/{chunk-ex496vct.js → chunk-nre82s12.js} +1 -1
- 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-7hpdd6r9.js → chunk-q1vkr2ys.js} +4 -4
- package/dist/{chunk-zb77kjth.js → chunk-rhg02hxq.js} +3 -3
- package/dist/{chunk-y9jmd7e5.js → chunk-s16apyk9.js} +102 -16
- package/dist/chunk-s16apyk9.js.map +16 -0
- package/dist/{chunk-yv9czyfr.js → chunk-t6vq7bff.js} +5 -5
- package/dist/{chunk-qkvz64nd.js → chunk-tjb1mk5t.js} +2 -2
- package/dist/{chunk-p844e0rn.js → chunk-tpn40322.js} +2 -2
- package/dist/{chunk-rt9p8m9t.js → chunk-v9xd5wzd.js} +1 -1
- package/dist/{chunk-2vhg6ysa.js → chunk-vyf9kfqf.js} +1 -1
- package/dist/{chunk-k6hrnf35.js → chunk-wwdfe68s.js} +51 -4
- package/dist/chunk-wwdfe68s.js.map +11 -0
- package/dist/{chunk-f1zxad2t.js → chunk-wz0xs816.js} +6 -6
- package/dist/{chunk-f1zxad2t.js.map → chunk-wz0xs816.js.map} +1 -1
- package/dist/chunk-y0c4e6ex.js +16 -0
- package/dist/chunk-y0c4e6ex.js.map +10 -0
- package/dist/{chunk-qkbx3tf6.js → chunk-y7rqfrgg.js} +6 -13
- package/dist/{chunk-qkbx3tf6.js.map → chunk-y7rqfrgg.js.map} +4 -4
- 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-p0dqwj3n.js → chunk-zrmy8zvw.js} +66 -47
- package/dist/{chunk-p0dqwj3n.js.map → chunk-zrmy8zvw.js.map} +4 -4
- package/dist/deploy/index.d.ts +1 -1
- package/dist/deploy/index.d.ts.map +1 -1
- package/dist/deploy/internal.js +10 -8
- 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 +6 -5
- 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/primitive.js +57 -88
- package/dist/execution/primitive.js.map +3 -4
- package/dist/execution/request.js +35 -38
- package/dist/execution/request.js.map +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +111 -120
- package/dist/index.js.map +1 -1
- 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 +18 -18
- 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/ontology/index.js +5 -5
- 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 +24 -25
- 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/every.d.ts +1 -1
- package/dist/shares/internal.js +17 -17
- 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/ai-limits/enforcement.js +2 -2
- package/dist/storage/connector-connections/provider.js +1 -1
- package/dist/storage/file-upload-sessions/provider.js +9 -9
- package/dist/storage/index.d.ts +2 -2
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +30 -31
- 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 +9 -9
- 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/index.d.ts +2 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +3202 -2860
- package/dist/testing/index.js.map +7 -6
- 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 +23 -23
- 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 +1 -7
- 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/authorization/event-visibility.ts +0 -12
- package/src/deploy/index.ts +0 -1
- package/src/deploy/services.ts +2 -11
- package/src/deploy/types.ts +6 -6
- package/src/deploy/validation.ts +12 -6
- 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/index.ts +1 -19
- 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/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/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/every.ts +1 -1
- 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/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/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/chunk-1hqwggsn.js.map +0 -12
- package/dist/chunk-85cd7e8c.js +0 -51
- package/dist/chunk-85cd7e8c.js.map +0 -10
- package/dist/chunk-dfm066qg.js.map +0 -11
- 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-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-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/src/actions/run-dispatch.ts +0 -282
- package/src/actions/worker.ts +0 -2
- package/src/events/types/actions.ts +0 -42
- package/src/objects/service/action-service.ts +0 -43
- /package/dist/{chunk-vgk3hknm.js.map → chunk-1k89ecfr.js.map} +0 -0
- /package/dist/{chunk-za5yd58j.js.map → chunk-52bk93x8.js.map} +0 -0
- /package/dist/{chunk-22v5bpz3.js.map → chunk-5e43w60z.js.map} +0 -0
- /package/dist/{chunk-zxawp1n2.js.map → chunk-7kg3k1m9.js.map} +0 -0
- /package/dist/{chunk-ny3xyvcn.js.map → chunk-7mbzgd9m.js.map} +0 -0
- /package/dist/{chunk-kkqwzy6h.js.map → chunk-7t429e3f.js.map} +0 -0
- /package/dist/{chunk-48e3cn2d.js.map → chunk-9gyp8hg1.js.map} +0 -0
- /package/dist/{chunk-4wn7bxxa.js.map → chunk-9ybhtmg4.js.map} +0 -0
- /package/dist/{chunk-bs7sqkre.js.map → chunk-bpgy64fw.js.map} +0 -0
- /package/dist/{chunk-vx2yp45y.js.map → chunk-c85m1hyj.js.map} +0 -0
- /package/dist/{chunk-v6xpd60t.js.map → chunk-d2ync1v3.js.map} +0 -0
- /package/dist/{chunk-vjcd8d27.js.map → chunk-fa02jy15.js.map} +0 -0
- /package/dist/{chunk-qmnnhde6.js.map → chunk-kg5j6fct.js.map} +0 -0
- /package/dist/{chunk-de4z2bj6.js.map → chunk-kyzq4wy9.js.map} +0 -0
- /package/dist/{chunk-ex496vct.js.map → chunk-nre82s12.js.map} +0 -0
- /package/dist/{chunk-7hpdd6r9.js.map → chunk-q1vkr2ys.js.map} +0 -0
- /package/dist/{chunk-zb77kjth.js.map → chunk-rhg02hxq.js.map} +0 -0
- /package/dist/{chunk-yv9czyfr.js.map → chunk-t6vq7bff.js.map} +0 -0
- /package/dist/{chunk-qkvz64nd.js.map → chunk-tjb1mk5t.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/README.md
CHANGED
|
@@ -20,7 +20,7 @@ bun add @sixb/core
|
|
|
20
20
|
|
|
21
21
|
**Blob Storage** -- Durable immutable binary objects referenced by dataset `fileRef` values. In-memory core support is included for development and tests; durable providers can be configured separately.
|
|
22
22
|
|
|
23
|
-
**Events** -- All mutations are emitted to a bounded, retained event stream for live coordination and short replay. The runtime emits object/link mutation events such as `object.created`, `object.updated`, `object.deleted`, `link.created`, `link.updated`, and `link.deleted`, plus topic events like `telemetry.appended` and `
|
|
23
|
+
**Events** -- All mutations are emitted to a bounded, retained event stream for live coordination and short replay. The runtime emits object/link mutation events such as `object.created`, `object.updated`, `object.deleted`, `link.created`, `link.updated`, and `link.deleted`, plus topic events like `telemetry.appended` and `schedule.triggered`.
|
|
24
24
|
|
|
25
25
|
**Actions** -- Typed audited commands. Actions can run external writeback, declare local object/link edits, and run post-commit effects.
|
|
26
26
|
|
|
@@ -141,7 +141,8 @@ const found = await sixb
|
|
|
141
141
|
## Actions
|
|
142
142
|
|
|
143
143
|
Actions define typed commands that can be requested globally or for an object subject.
|
|
144
|
-
Local object/link mutations are declared in `.edits(...)` and committed
|
|
144
|
+
Local object/link mutations are declared in `.edits(...)` and committed together.
|
|
145
|
+
`sixb.actions.request(...)` runs the action in the calling process and returns its finished run.
|
|
145
146
|
|
|
146
147
|
```ts
|
|
147
148
|
const renameRoom = defineAction("renameRoom")
|
|
@@ -160,7 +161,7 @@ const renameRoom = defineAction("renameRoom")
|
|
|
160
161
|
})
|
|
161
162
|
})
|
|
162
163
|
|
|
163
|
-
await sixb.actions.request({
|
|
164
|
+
const run = await sixb.actions.request({
|
|
164
165
|
actionId: "renameRoom",
|
|
165
166
|
subject: { kind: "object", objectTypeId: "Room", primaryId: "room:101" },
|
|
166
167
|
params: { name: "Boardroom 101" },
|
|
@@ -435,7 +436,7 @@ src/
|
|
|
435
436
|
| `.list({ limit, offset, ... })` | List stored objects with storage-system filtering and pagination |
|
|
436
437
|
| `.byId(id)` | Get a handle for link/telemetry/action operations |
|
|
437
438
|
| `.appendTelemetryBatch(items)` | Batch append telemetry for multiple objects |
|
|
438
|
-
| `.requestAction({ actionId, params })` |
|
|
439
|
+
| `.requestAction({ id, actionId, params })` | Run an action on an object and return its finished run |
|
|
439
440
|
|
|
440
441
|
### ObjectByIdHandle API (`sixb.objects(Type).byId(id)`)
|
|
441
442
|
|
|
@@ -446,7 +447,7 @@ src/
|
|
|
446
447
|
| `.unlink(token, target)` | Remove a link |
|
|
447
448
|
| `.listLinks(token?)` | List links from this object |
|
|
448
449
|
| `.telemetry(token)` | Get a telemetry appender for a property |
|
|
449
|
-
| `.requestAction({ actionId, params })` |
|
|
450
|
+
| `.requestAction({ actionId, params })` | Run an action and return its finished run |
|
|
450
451
|
|
|
451
452
|
### Storage And Queue Interfaces
|
|
452
453
|
|
|
@@ -469,7 +470,7 @@ In-memory implementations included: `InMemoryBroker`, `InMemoryObjectStorage`,
|
|
|
469
470
|
|
|
470
471
|
### Events
|
|
471
472
|
|
|
472
|
-
Domain events include object/link mutations (`object.created`, `object.updated`, `object.deleted`, `link.created`, `link.updated`, `link.deleted`) and topic events such as `telemetry.appended`, `
|
|
473
|
+
Domain events include object/link mutations (`object.created`, `object.updated`, `object.deleted`, `link.created`, `link.updated`, `link.deleted`) and topic events such as `telemetry.appended`, `schedule.triggered`, `sync.run.finished`, `pipeline.run.finished`, and `dataset.version.committed`.
|
|
473
474
|
|
|
474
475
|
### Units
|
|
475
476
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { EditBatch } from "../edits";
|
|
2
2
|
import type { EffectiveLinkChange, EffectiveObjectChange, ExpectedLinkRevision, ExpectedLinkScopeRevision, ExpectedObjectRevision, OntologyOperationOutcome } from "../materializer";
|
|
3
3
|
import type { OntologyMutationRuntime } from "../runtime/ontology-mutations";
|
|
4
|
-
import type {
|
|
4
|
+
import type { RecordActionRunInput } from "../storage";
|
|
5
5
|
/** Exact reads an Action handler depended on, protected by row-level CAS at commit time. */
|
|
6
6
|
export interface ActionReadDependencies {
|
|
7
7
|
readonly objects: readonly ExpectedObjectRevision[];
|
|
@@ -10,9 +10,8 @@ export interface ActionReadDependencies {
|
|
|
10
10
|
}
|
|
11
11
|
export interface CommitActionEditsInput {
|
|
12
12
|
readonly mutations: Pick<OntologyMutationRuntime, "commitEdits">;
|
|
13
|
-
|
|
14
|
-
readonly
|
|
15
|
-
readonly actionId: string;
|
|
13
|
+
/** The run's terminal record, which the commit inserts with its edits. */
|
|
14
|
+
readonly run: RecordActionRunInput;
|
|
16
15
|
readonly batch: EditBatch;
|
|
17
16
|
readonly dependencies?: ActionReadDependencies;
|
|
18
17
|
}
|
|
@@ -28,25 +27,14 @@ export interface ActionEditCommitResult {
|
|
|
28
27
|
};
|
|
29
28
|
readonly committedAt: Date;
|
|
30
29
|
}
|
|
31
|
-
export interface FindActionEditCommitInput {
|
|
32
|
-
readonly storage: Pick<Storage, "ontology">;
|
|
33
|
-
readonly projectId: string;
|
|
34
|
-
readonly runId: string;
|
|
35
|
-
}
|
|
36
30
|
/**
|
|
37
31
|
* Commits one Action run's recorded edits as a single atomic ontology commit.
|
|
38
32
|
*
|
|
39
33
|
* The batch lowers to canonical Materializer operations and the Materializer validates the Action run
|
|
40
|
-
* identity, applies managed authority, resolves effective state, writes the authoritative commit,
|
|
41
|
-
* inserts outbox facts in one transaction. Repeating the call for the same run
|
|
42
|
-
* a divergent request for the same run is a typed
|
|
34
|
+
* identity, applies managed authority, resolves effective state, writes the authoritative commit,
|
|
35
|
+
* inserts outbox facts, and records the run in one transaction. Repeating the call for the same run
|
|
36
|
+
* replays that commit without recording anything; a divergent request for the same run is a typed
|
|
37
|
+
* idempotency conflict.
|
|
43
38
|
*/
|
|
44
39
|
export declare function commitActionEdits(input: CommitActionEditsInput): Promise<ActionEditCommitResult>;
|
|
45
|
-
/**
|
|
46
|
-
* Resolves the authoritative commit an Action run already produced, if any.
|
|
47
|
-
*
|
|
48
|
-
* Resume uses the exact `{ actionRunId }` origin instead of rerunning handlers, so a redelivered run
|
|
49
|
-
* returns the persisted result without recomputing an idempotency hash.
|
|
50
|
-
*/
|
|
51
|
-
export declare function findActionEditCommit(input: FindActionEditCommitInput): Promise<ActionEditCommitResult | null>;
|
|
52
40
|
//# sourceMappingURL=commit-edits.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commit-edits.d.ts","sourceRoot":"","sources":["../../src/actions/commit-edits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,OAAO,KAAK,EAEV,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAC5E,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"commit-edits.d.ts","sourceRoot":"","sources":["../../src/actions/commit-edits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,OAAO,KAAK,EAEV,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEtD,4FAA4F;AAC5F,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,OAAO,EAAE,SAAS,sBAAsB,EAAE,CAAA;IACnD,QAAQ,CAAC,KAAK,EAAE,SAAS,oBAAoB,EAAE,CAAA;IAC/C,QAAQ,CAAC,UAAU,EAAE,SAAS,yBAAyB,EAAE,CAAA;CAC1D;AAID,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,uBAAuB,EAAE,aAAa,CAAC,CAAA;IAChE,0EAA0E;IAC1E,QAAQ,CAAC,GAAG,EAAE,oBAAoB,CAAA;IAClC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;IACzB,QAAQ,CAAC,YAAY,CAAC,EAAE,sBAAsB,CAAA;CAC/C;AAED,gEAAgE;AAChE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,QAAQ,EAAE,SAAS,wBAAwB,EAAE,CAAA;IACtD,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,OAAO,EAAE,SAAS,qBAAqB,EAAE,CAAA;QAClD,QAAQ,CAAC,KAAK,EAAE,SAAS,mBAAmB,EAAE,CAAA;KAC/C,CAAA;IACD,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAA;CAC3B;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,sBAAsB,GAC5B,OAAO,CAAC,sBAAsB,CAAC,CAYjC"}
|
package/dist/actions/errors.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
export declare class ActionDefinitionError extends Error {
|
|
2
2
|
readonly name = "ActionDefinitionError";
|
|
3
3
|
}
|
|
4
|
-
export declare class ActionEditCommitError extends Error {
|
|
5
|
-
readonly name = "ActionEditCommitError";
|
|
6
|
-
}
|
|
7
4
|
export declare function missingActionMutationMessage(actionId: string): string;
|
|
8
5
|
export declare function effectsWithoutEditsMessage(actionId: string): string;
|
|
9
6
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/actions/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,2BAA0B;CACxC;AAED,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/actions/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,2BAA0B;CACxC;AAED,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEnE"}
|
|
@@ -3,7 +3,7 @@ import type { ObjectType } from "../ontology";
|
|
|
3
3
|
import type { SixbRuntimeContext } from "../runtime/types";
|
|
4
4
|
import type { ActionRunRecord, ListActionRunsInput, ListActionRunsResult } from "../storage/action-runs";
|
|
5
5
|
import { type ActionDescriptor } from "./descriptor";
|
|
6
|
-
import { type
|
|
6
|
+
import { type RequestActionInput } from "./request";
|
|
7
7
|
export interface ActionRunsRuntime {
|
|
8
8
|
getById(runId: string): Promise<ActionRunRecord | null>;
|
|
9
9
|
list(input?: Omit<ListActionRunsInput, "projectId" | "actionIds" | "objectTypeIds">): Promise<ListActionRunsResult>;
|
|
@@ -13,8 +13,15 @@ export interface ActionsRuntime {
|
|
|
13
13
|
getById(actionId: string): ActionDescriptor | null;
|
|
14
14
|
listGlobal(): readonly ActionDescriptor[];
|
|
15
15
|
listForType(objectType: ObjectType): readonly ActionDescriptor[];
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Run an Action in this process and return its terminal record, without waiting for its effects.
|
|
18
|
+
* A run that fails resolves with status `failed`. The call rejects when the request itself is
|
|
19
|
+
* refused (unknown action, invalid params, missing authority, a run id this process is still
|
|
20
|
+
* running, a stopping runtime), and with `internal.unexpected` when a run that started could not
|
|
21
|
+
* be recorded: requesting it again with the same run id returns its record if it was recorded, and
|
|
22
|
+
* runs it again otherwise.
|
|
23
|
+
*/
|
|
24
|
+
request(input: RequestActionInput): Promise<ActionRunRecord>;
|
|
18
25
|
readonly runs: ActionRunsRuntime;
|
|
19
26
|
}
|
|
20
27
|
export declare function createActionsRuntime(runtime: SixbRuntimeContext, execution: ExecutionContext): ActionsRuntime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../src/actions/execution.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAMpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAAE,KAAK,gBAAgB,EAA4B,MAAM,cAAc,CAAA;AAC9E,OAAO,
|
|
1
|
+
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../src/actions/execution.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAMpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAAE,KAAK,gBAAgB,EAA4B,MAAM,cAAc,CAAA;AAC9E,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,WAAW,CAAA;AAIlE,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAAA;IACvD,IAAI,CACF,KAAK,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,WAAW,GAAG,WAAW,GAAG,eAAe,CAAC,GAC7E,OAAO,CAAC,oBAAoB,CAAC,CAAA;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,IAAI,SAAS,gBAAgB,EAAE,CAAA;IACnC,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAAA;IAClD,UAAU,IAAI,SAAS,gBAAgB,EAAE,CAAA;IACzC,WAAW,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,gBAAgB,EAAE,CAAA;IAChE;;;;;;;OAOG;IACH,OAAO,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;IAC5D,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAA;CACjC;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,gBAAgB,GAC1B,cAAc,CA8GhB"}
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
export { defineAction, optional, param } from "./builders";
|
|
2
|
-
export
|
|
3
|
-
export { commitActionEdits, findActionEditCommit } from "./commit-edits";
|
|
4
|
-
export { ActionDefinitionError, ActionEditCommitError } from "./errors";
|
|
5
|
-
export type { ActionReadFacadeOptions, ActionTelemetryReadSource, } from "./read-facade";
|
|
6
|
-
export { ActionReadRecorder, createActionReadFacade } from "./read-facade";
|
|
2
|
+
export { ActionDefinitionError } from "./errors";
|
|
7
3
|
export type { ActionDefinitionCatalog, ActionRegistryOptions } from "./registry";
|
|
8
4
|
export { ActionRegistry } from "./registry";
|
|
9
|
-
export type {
|
|
10
|
-
export { requestAction
|
|
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";
|
|
11
9
|
export type { ActionBinding, ActionBlobContext, ActionBuilder, ActionDefinition, ActionEditsContext, ActionEditsHandler, ActionEffectsContext, ActionEffectsHandler, ActionObjectSubject, ActionParamConfig, ActionParamsConfig, ActionPhaseCommit, ActionReadFacade, ActionRunPhaseInfo, ActionRuntimeFacade, ActionSubject, ActionTargetObject, ActionTelemetryHistoryBatchInput, ActionTelemetryHistoryBatchResult, ActionTelemetryHistorySeriesInput, ActionTelemetryObjectSet, ActionTelemetryPropertyToken, ActionTelemetryReadFacade, ActionValidationContext, ActionValidator, ActionWritebackContext, ActionWritebackHandler, ActionWritebackValue, GlobalActionAfterEditsBuilder, GlobalActionAfterWritebackBuilder, GlobalActionDefinition, GlobalActionEditsContext, GlobalActionEditsHandler, GlobalActionEffectsContext, GlobalActionEffectsHandler, GlobalActionParamsBuilder, GlobalActionPhaseBuilder, GlobalActionValidationContext, GlobalActionValidator, GlobalActionWritebackContext, GlobalActionWritebackHandler, InferActionParams, ObjectActionAfterEditsBuilder, ObjectActionAfterWritebackBuilder, ObjectActionDefinition, ObjectActionParamsBuilder, ObjectActionPhaseBuilder, } from "./types";
|
|
12
|
-
export {
|
|
13
|
-
export { runActionValidators } from "./validators";
|
|
10
|
+
export { isActionDefinition, isGlobalActionDefinition, isObjectActionDefinition, } from "./validation";
|
|
14
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAC1D,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAChD,YAAY,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC3C,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAA;AAC3D,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,gCAAgC,EAChC,iCAAiC,EACjC,iCAAiC,EACjC,wBAAwB,EACxB,4BAA4B,EAC5B,yBAAyB,EACzB,uBAAuB,EACvB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,6BAA6B,EAC7B,iCAAiC,EACjC,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,6BAA6B,EAC7B,qBAAqB,EACrB,4BAA4B,EAC5B,4BAA4B,EAC5B,iBAAiB,EACjB,6BAA6B,EAC7B,iCAAiC,EACjC,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,cAAc,CAAA"}
|
package/dist/actions/index.js
CHANGED
|
@@ -3,88 +3,89 @@ import {
|
|
|
3
3
|
defineAction2,
|
|
4
4
|
param2,
|
|
5
5
|
optional2,
|
|
6
|
-
commitActionEdits2,
|
|
7
|
-
findActionEditCommit2,
|
|
8
|
-
ActionReadRecorder2,
|
|
9
|
-
createActionReadFacade2,
|
|
10
6
|
ActionRegistry2,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
import"../chunk-
|
|
19
|
-
import"../chunk-
|
|
20
|
-
import"../chunk-
|
|
21
|
-
import"../chunk-
|
|
22
|
-
import"../chunk-
|
|
7
|
+
ACTION_RUN_DRAIN_TIMEOUT_MS2,
|
|
8
|
+
drainActionRuns2,
|
|
9
|
+
requestAction3
|
|
10
|
+
} from "../chunk-ey3pyej1.js";
|
|
11
|
+
import"../chunk-t6vq7bff.js";
|
|
12
|
+
import"../chunk-wz0xs816.js";
|
|
13
|
+
import"../chunk-52bk93x8.js";
|
|
14
|
+
import"../chunk-wwdfe68s.js";
|
|
15
|
+
import"../chunk-zrmy8zvw.js";
|
|
16
|
+
import"../chunk-mfs23znk.js";
|
|
17
|
+
import"../chunk-7mbzgd9m.js";
|
|
18
|
+
import"../chunk-99nd4rc1.js";
|
|
19
|
+
import"../chunk-vyf9kfqf.js";
|
|
20
|
+
import"../chunk-4tcx876c.js";
|
|
21
|
+
import"../chunk-d2ync1v3.js";
|
|
22
|
+
import"../chunk-nre82s12.js";
|
|
23
|
+
import"../chunk-j2bp5ryw.js";
|
|
23
24
|
import"../chunk-br3k6qbf.js";
|
|
24
25
|
import"../chunk-jmfet9r4.js";
|
|
25
26
|
import"../chunk-qf954wje.js";
|
|
26
|
-
import"../chunk-
|
|
27
|
+
import"../chunk-1f7wpmyp.js";
|
|
27
28
|
import"../chunk-tw03bsmb.js";
|
|
28
|
-
import"../chunk-
|
|
29
|
-
import"../chunk-
|
|
30
|
-
import"../chunk-hn2r7z41.js";
|
|
29
|
+
import"../chunk-7kg3k1m9.js";
|
|
30
|
+
import"../chunk-s16apyk9.js";
|
|
31
31
|
import"../chunk-h89wz928.js";
|
|
32
|
-
import"../chunk-
|
|
32
|
+
import"../chunk-pbcbn83d.js";
|
|
33
33
|
import"../chunk-qczk96d9.js";
|
|
34
34
|
import"../chunk-mmagke4x.js";
|
|
35
|
-
import"../chunk-
|
|
36
|
-
import"../chunk-
|
|
35
|
+
import"../chunk-9ybhtmg4.js";
|
|
36
|
+
import"../chunk-hn2r7z41.js";
|
|
37
|
+
import"../chunk-b38szspf.js";
|
|
38
|
+
import"../chunk-a40ad1ft.js";
|
|
37
39
|
import"../chunk-s54c868q.js";
|
|
38
40
|
import"../chunk-ere85b8y.js";
|
|
39
41
|
import"../chunk-rj69qcrd.js";
|
|
40
42
|
import"../chunk-4as3wt1c.js";
|
|
41
|
-
import"../chunk-b9affek3.js";
|
|
42
43
|
import"../chunk-29yx306f.js";
|
|
43
44
|
import"../chunk-pqajwytd.js";
|
|
44
|
-
import"../chunk-
|
|
45
|
-
import"../chunk-
|
|
46
|
-
import"../chunk-
|
|
47
|
-
import"../chunk-
|
|
45
|
+
import"../chunk-bpgy64fw.js";
|
|
46
|
+
import"../chunk-3qms4nax.js";
|
|
47
|
+
import"../chunk-7n440zgt.js";
|
|
48
|
+
import"../chunk-m427qgq0.js";
|
|
49
|
+
import"../chunk-fa02jy15.js";
|
|
50
|
+
import"../chunk-7t429e3f.js";
|
|
51
|
+
import"../chunk-3zxk45er.js";
|
|
52
|
+
import"../chunk-5a4a52tq.js";
|
|
53
|
+
import"../chunk-6gmfggss.js";
|
|
54
|
+
import"../chunk-bwjcehza.js";
|
|
55
|
+
import"../chunk-rz53yb4v.js";
|
|
48
56
|
import"../chunk-gc4ntf7d.js";
|
|
49
57
|
import"../chunk-gfdh9kqa.js";
|
|
58
|
+
import"../chunk-pfp1txq2.js";
|
|
59
|
+
import"../chunk-5e43w60z.js";
|
|
50
60
|
import {
|
|
51
61
|
ActionDefinitionError2,
|
|
52
|
-
ActionEditCommitError2,
|
|
53
62
|
isActionDefinition2,
|
|
54
63
|
isGlobalActionDefinition2,
|
|
55
|
-
isObjectActionDefinition2
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
import"../chunk-
|
|
59
|
-
import"../chunk-rt9p8m9t.js";
|
|
60
|
-
import"../chunk-qkbx3tf6.js";
|
|
61
|
-
import"../chunk-v4jbb3rs.js";
|
|
64
|
+
isObjectActionDefinition2
|
|
65
|
+
} from "../chunk-3gnrh4ve.js";
|
|
66
|
+
import"../chunk-c85m1hyj.js";
|
|
67
|
+
import"../chunk-v9xd5wzd.js";
|
|
62
68
|
import"../chunk-xt1zt7gv.js";
|
|
69
|
+
import"../chunk-2jntasmh.js";
|
|
70
|
+
import"../chunk-y7rqfrgg.js";
|
|
71
|
+
import"../chunk-v4jbb3rs.js";
|
|
72
|
+
import"../chunk-hvsb78a1.js";
|
|
63
73
|
import"../chunk-enpsx8k5.js";
|
|
64
|
-
import"../chunk-y05543x6.js";
|
|
65
74
|
import"../chunk-jhm3zsa7.js";
|
|
66
|
-
import"../chunk-
|
|
75
|
+
import"../chunk-8mx7qw3y.js";
|
|
67
76
|
import"../chunk-z3y5kg1x.js";
|
|
68
|
-
import"../chunk-2jntasmh.js";
|
|
69
77
|
export {
|
|
78
|
+
ACTION_RUN_DRAIN_TIMEOUT_MS2 as ACTION_RUN_DRAIN_TIMEOUT_MS,
|
|
70
79
|
ActionDefinitionError2 as ActionDefinitionError,
|
|
71
|
-
ActionEditCommitError2 as ActionEditCommitError,
|
|
72
|
-
ActionReadRecorder2 as ActionReadRecorder,
|
|
73
80
|
ActionRegistry2 as ActionRegistry,
|
|
74
|
-
coerceActionParamsToTyped2 as coerceActionParamsToTyped,
|
|
75
|
-
commitActionEdits2 as commitActionEdits,
|
|
76
|
-
createActionReadFacade2 as createActionReadFacade,
|
|
77
81
|
defineAction2 as defineAction,
|
|
78
|
-
|
|
82
|
+
drainActionRuns2 as drainActionRuns,
|
|
79
83
|
isActionDefinition2 as isActionDefinition,
|
|
80
84
|
isGlobalActionDefinition2 as isGlobalActionDefinition,
|
|
81
85
|
isObjectActionDefinition2 as isObjectActionDefinition,
|
|
82
86
|
optional2 as optional,
|
|
83
87
|
param2 as param,
|
|
84
|
-
requestAction3 as requestAction
|
|
85
|
-
requestActionAndWait2 as requestActionAndWait,
|
|
86
|
-
runActionValidators2 as runActionValidators,
|
|
87
|
-
waitForActionRun2 as waitForActionRun
|
|
88
|
+
requestAction3 as requestAction
|
|
88
89
|
};
|
|
89
90
|
|
|
90
|
-
//# debugId=
|
|
91
|
+
//# debugId=65F1AC6613EA058064756E2164756E21
|
|
@@ -1,38 +1,27 @@
|
|
|
1
1
|
import type { ExecutionContext } from "../execution/types";
|
|
2
2
|
import type { SixbRuntimeContext } from "../runtime/types";
|
|
3
|
-
import {
|
|
3
|
+
import type { ActionRunRecord } from "../storage";
|
|
4
4
|
import type { ActionSubject } from "./types";
|
|
5
|
-
export interface RequestActionResult {
|
|
6
|
-
readonly runId: string;
|
|
7
|
-
readonly queuedAt: string;
|
|
8
|
-
readonly jobId?: string;
|
|
9
|
-
readonly created: boolean;
|
|
10
|
-
}
|
|
11
5
|
export interface RequestActionOptions {
|
|
12
6
|
readonly runId?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Cancels the run before its irreversible boundary: a succeeded writeback, or the commit of an
|
|
9
|
+
* Action without one. Past it, the run finishes whatever this signal does.
|
|
10
|
+
*/
|
|
13
11
|
readonly signal?: AbortSignal;
|
|
14
12
|
}
|
|
15
|
-
export interface
|
|
16
|
-
readonly timeoutMs?: number;
|
|
17
|
-
readonly onRequested?: (runId: string) => void | Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
export interface RequestActionInput {
|
|
13
|
+
export interface RequestActionInput extends RequestActionOptions {
|
|
20
14
|
readonly actionId: string;
|
|
21
15
|
readonly subject?: ActionSubject;
|
|
22
16
|
readonly params?: Record<string, unknown>;
|
|
23
|
-
|
|
24
|
-
readonly signal?: AbortSignal;
|
|
25
|
-
}
|
|
26
|
-
export interface RequestActionAndWaitInput extends RequestActionInput {
|
|
27
|
-
readonly timeoutMs?: number;
|
|
17
|
+
/** Called once the run's execution exists, before the run executes. A throw starts nothing. */
|
|
28
18
|
readonly onRequested?: (runId: string) => void | Promise<void>;
|
|
29
19
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
export declare function
|
|
37
|
-
export declare function waitForActionRun(runtime: SixbRuntimeContext, input: WaitForActionRunInput): Promise<ActionRunRecord>;
|
|
20
|
+
/**
|
|
21
|
+
* Request an Action run and execute it in this process, returning its terminal record.
|
|
22
|
+
*
|
|
23
|
+
* Admission, authorization and params are checked before anything is persisted. A run id that is
|
|
24
|
+
* already recorded returns that run's record, without running it again.
|
|
25
|
+
*/
|
|
26
|
+
export declare function requestAction(runtime: SixbRuntimeContext, execution: ExecutionContext, input: RequestActionInput): Promise<ActionRunRecord>;
|
|
38
27
|
//# sourceMappingURL=request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/actions/request.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/actions/request.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAG1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAE1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAUjD,OAAO,KAAK,EAAoB,aAAa,EAAE,MAAM,SAAS,CAAA;AAQ9D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;CAC9B;AAED,MAAM,WAAW,kBAAmB,SAAQ,oBAAoB;IAC9D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAA;IAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzC,+FAA+F;IAC/F,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC/D;AAUD;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,gBAAgB,EAC3B,KAAK,EAAE,kBAAkB,GACxB,OAAO,CAAC,eAAe,CAAC,CAuH1B"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Logger } from "../../logging";
|
|
2
|
+
import type { ObjectTypeWithPropertyTokens } from "../../ontology/tokens";
|
|
3
|
+
import type { ActionReadRecorder } from "../read-facade";
|
|
4
|
+
import type { ActionDefinition, ActionObjectSubject, ActionReadFacade, ActionRuntimeFacade, ActionSubject } from "../types";
|
|
5
|
+
import type { LoadedObjectTarget } from "./phase-types";
|
|
6
|
+
import type { ActionRunState } from "./state";
|
|
7
|
+
import type { ActionRunContext, PendingActionRun } from "./types";
|
|
8
|
+
export declare function toActionRuntimeFacade(runtime: ActionRunContext): ActionRuntimeFacade;
|
|
9
|
+
export declare function toActionReadFacade(runtime: ActionRunContext, recorder: ActionReadRecorder): ActionReadFacade;
|
|
10
|
+
/** The handler context every phase shares. Each phase adds the `signal` it runs under. */
|
|
11
|
+
export declare function createBasePhaseContext(input: {
|
|
12
|
+
readonly runtime: ActionRunContext;
|
|
13
|
+
readonly action: ActionDefinition;
|
|
14
|
+
readonly state: ActionRunState;
|
|
15
|
+
readonly logger: Logger;
|
|
16
|
+
}): {
|
|
17
|
+
run: {
|
|
18
|
+
id: string;
|
|
19
|
+
startedAt: Date;
|
|
20
|
+
idempotencyKey: string;
|
|
21
|
+
};
|
|
22
|
+
logger: Logger;
|
|
23
|
+
params: Record<string, unknown>;
|
|
24
|
+
subject: ActionSubject;
|
|
25
|
+
};
|
|
26
|
+
export type BasePhaseContext = ReturnType<typeof createBasePhaseContext>;
|
|
27
|
+
export declare function loadObjectTarget(input: {
|
|
28
|
+
readonly runtime: ActionRunContext;
|
|
29
|
+
readonly action: ActionDefinition;
|
|
30
|
+
readonly run: PendingActionRun;
|
|
31
|
+
}): Promise<LoadedObjectTarget | null>;
|
|
32
|
+
export declare function requireObjectSubject<TObjectType extends ObjectTypeWithPropertyTokens = ObjectTypeWithPropertyTokens>(subject: ActionSubject, input: {
|
|
33
|
+
readonly actionId: string;
|
|
34
|
+
readonly runId: string;
|
|
35
|
+
}): ActionObjectSubject<TObjectType>;
|
|
36
|
+
export declare function requireObjectTarget(target: LoadedObjectTarget | null, input: {
|
|
37
|
+
readonly actionId: string;
|
|
38
|
+
readonly runId: string;
|
|
39
|
+
}): LoadedObjectTarget;
|
|
40
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/actions/run/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAA;AAEzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAExD,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EAEd,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAEjE,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,gBAAgB,GAAG,mBAAmB,CA6BpF;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,kBAAkB,GAC3B,gBAAgB,CAUlB;AAqBD,0FAA0F;AAC1F,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAA;IAClC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;IACjC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAA;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;;;;;;;;;EAkBA;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAExE,wBAAsB,gBAAgB,CAAC,KAAK,EAAE;IAC5C,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAA;IAClC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;IACjC,QAAQ,CAAC,GAAG,EAAE,gBAAgB,CAAA;CAC/B,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CA8CrC;AAED,wBAAgB,oBAAoB,CAClC,WAAW,SAAS,4BAA4B,GAAG,4BAA4B,EAE/E,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC3D,mBAAmB,CAAC,WAAW,CAAC,CASlC;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,kBAAkB,GAAG,IAAI,EACjC,KAAK,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC3D,kBAAkB,CASpB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { RecordActionRunInput } from "../../storage";
|
|
2
|
+
import type { ActionEditCommitResult } from "../commit-edits";
|
|
3
|
+
import type { ActionReadRecorder } from "../read-facade";
|
|
4
|
+
import { type BasePhaseContext } from "./context";
|
|
5
|
+
import type { LoadedObjectTarget, PhaseExecutionBase } from "./phase-types";
|
|
6
|
+
import type { ActionRunState } from "./state";
|
|
7
|
+
/** The commit of a run's edits, which recorded the run with them. */
|
|
8
|
+
export interface CommittedActionRun {
|
|
9
|
+
readonly record: RecordActionRunInput;
|
|
10
|
+
readonly commit: ActionEditCommitResult;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Records the run's edits and commits them through the ontology Materializer, together with the
|
|
14
|
+
* run's terminal record. Resolves with `null` for an Action without edits, which commits nothing.
|
|
15
|
+
*
|
|
16
|
+
* Object and link-scope reads performed by the writeback and edits handlers, including every object
|
|
17
|
+
* a query or listing returned, are captured as expected revisions so a commit fails when that state
|
|
18
|
+
* changes. Query membership and telemetry history stay call-level snapshots. Domain events are
|
|
19
|
+
* durable outbox facts written inside the commit, so this phase never appends events itself.
|
|
20
|
+
*
|
|
21
|
+
* `signal` stops the edits handler and the step before the commit; the commit itself is never
|
|
22
|
+
* interrupted.
|
|
23
|
+
*/
|
|
24
|
+
export declare function runEditsAndCommitPhase(input: PhaseExecutionBase & {
|
|
25
|
+
readonly state: ActionRunState;
|
|
26
|
+
readonly baseContext: BasePhaseContext;
|
|
27
|
+
readonly objectTarget: LoadedObjectTarget | null;
|
|
28
|
+
/** Shared with the writeback phase so both phases' reads fence the same commit. */
|
|
29
|
+
readonly reads: ActionReadRecorder;
|
|
30
|
+
}): Promise<CommittedActionRun | null>;
|
|
31
|
+
//# sourceMappingURL=edits-commit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edits-commit.d.ts","sourceRoot":"","sources":["../../../src/actions/run/edits-commit.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAE7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAExD,OAAO,EAAE,KAAK,gBAAgB,EAA4C,MAAM,WAAW,CAAA;AAE3F,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAuB,MAAM,eAAe,CAAA;AAChG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,qEAAqE;AACrE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAA;IACrC,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAA;CACxC;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,kBAAkB,GAAG;IAC1B,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAA;IAC9B,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAA;IACtC,QAAQ,CAAC,YAAY,EAAE,kBAAkB,GAAG,IAAI,CAAA;IAChD,mFAAmF;IACnF,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAA;CACnC,GACA,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAgEpC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ActionEditCommitResult } from "../commit-edits";
|
|
2
|
+
import type { ActionDefinition } from "../types";
|
|
3
|
+
import type { ActionDeadline } from "./signals";
|
|
4
|
+
import type { ActionRunState } from "./state";
|
|
5
|
+
import type { ActionRunContext } from "./types";
|
|
6
|
+
export interface RunActionEffectsInput {
|
|
7
|
+
readonly runtime: ActionRunContext;
|
|
8
|
+
readonly action: ActionDefinition;
|
|
9
|
+
/** The run, recorded as succeeded with the commit its effects receive. */
|
|
10
|
+
readonly state: ActionRunState;
|
|
11
|
+
readonly commit: ActionEditCommitResult;
|
|
12
|
+
/** Starts the effects' deadline. */
|
|
13
|
+
readonly startDeadline: () => ActionDeadline;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Run a recorded run's effects and record their outcome on it.
|
|
17
|
+
*
|
|
18
|
+
* Effects run after the run's record is returned, and nothing waits for them but a stopping
|
|
19
|
+
* process. They are best-effort: their failure does not reject this, it is recorded on the run and
|
|
20
|
+
* reported to `onError`, and the run stays succeeded.
|
|
21
|
+
*/
|
|
22
|
+
export declare function runActionEffects(input: RunActionEffectsInput): Promise<void>;
|
|
23
|
+
//# sourceMappingURL=effects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effects.d.ts","sourceRoot":"","sources":["../../../src/actions/run/effects.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAIhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAA;IAClC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;IACjC,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAA;IAC9B,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAA;IACvC,oCAAoC;IACpC,QAAQ,CAAC,aAAa,EAAE,MAAM,cAAc,CAAA;CAC7C;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BlF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type PrimitiveExecutionHost } from "../../execution/primitive";
|
|
2
|
+
import type { LoggingService } from "../../logging/service";
|
|
3
|
+
import type { SixbDefinitions } from "../../runtime/definitions";
|
|
4
|
+
import type { Storage } from "../../storage";
|
|
5
|
+
import type { ExecutionRecord } from "../../storage/executions";
|
|
6
|
+
import type { ActionRunOutcome, PendingActionRun } from "./types";
|
|
7
|
+
/** What executing a stored Action run needs from its host. */
|
|
8
|
+
export interface ActionRunHost extends PrimitiveExecutionHost {
|
|
9
|
+
readonly storage: Storage;
|
|
10
|
+
readonly logging?: LoggingService;
|
|
11
|
+
readonly definitions: Pick<SixbDefinitions, "actions">;
|
|
12
|
+
}
|
|
13
|
+
export interface ExecuteActionRunInput {
|
|
14
|
+
readonly run: PendingActionRun;
|
|
15
|
+
/** The durable execution the run was requested under. */
|
|
16
|
+
readonly execution: ExecutionRecord;
|
|
17
|
+
/** Cancels the run before its irreversible boundary. */
|
|
18
|
+
readonly signal?: AbortSignal;
|
|
19
|
+
/** Test-only override of the 30-second deadlines of the run and of its effects. */
|
|
20
|
+
readonly timeoutMs?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Execute a requested Action run inside the durable execution it was requested under, and record it.
|
|
24
|
+
*
|
|
25
|
+
* Binds the Action's primitive scope to that execution, then runs the phases under the run's
|
|
26
|
+
* deadline and the caller's signal. Its effects, when it has any, are left to start: see
|
|
27
|
+
* {@link ActionRunOutcome.effects}.
|
|
28
|
+
*/
|
|
29
|
+
export declare function executeActionRun(host: ActionRunHost, input: ExecuteActionRunInput): Promise<ActionRunOutcome>;
|
|
30
|
+
//# sourceMappingURL=execute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../src/actions/run/execute.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,KAAK,EAAoB,OAAO,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAG/D,OAAO,KAAK,EAAoB,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAEnF,8DAA8D;AAC9D,MAAM,WAAW,aAAc,SAAQ,sBAAsB;IAC3D,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;IACjC,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,CAAA;CACvD;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,GAAG,EAAE,gBAAgB,CAAA;IAC9B,yDAAyD;IACzD,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAA;IACnC,wDAAwD;IACxD,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;IAC7B,mFAAmF;IACnF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAUD;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,aAAa,EACnB,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,gBAAgB,CAAC,CA2B3B"}
|