@rikalabs/akter 0.1.0-alpha.0
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/CHANGELOG.md +15 -0
- package/LICENSE +202 -0
- package/NOTICE +8 -0
- package/README.md +116 -0
- package/dist/actor/codecs.d.ts +77 -0
- package/dist/actor/codecs.js +87 -0
- package/dist/actor/connections.d.ts +34 -0
- package/dist/actor/connections.js +145 -0
- package/dist/actor/definition.d.ts +893 -0
- package/dist/actor/definition.js +147 -0
- package/dist/actor/descriptor.d.ts +172 -0
- package/dist/actor/descriptor.js +367 -0
- package/dist/actor/handles.d.ts +77 -0
- package/dist/actor/handles.js +265 -0
- package/dist/actor/jobs.d.ts +10 -0
- package/dist/actor/jobs.js +137 -0
- package/dist/actor/layers.d.ts +41 -0
- package/dist/actor/layers.js +177 -0
- package/dist/actor/reads.d.ts +47 -0
- package/dist/actor/reads.js +224 -0
- package/dist/actor/served.d.ts +120 -0
- package/dist/actor/served.js +72 -0
- package/dist/actor/turns.d.ts +13 -0
- package/dist/actor/turns.js +332 -0
- package/dist/actor/workflows.d.ts +16 -0
- package/dist/actor/workflows.js +37 -0
- package/dist/client/calls.d.ts +47 -0
- package/dist/client/calls.js +425 -0
- package/dist/client/clock.d.ts +56 -0
- package/dist/client/clock.js +119 -0
- package/dist/client/fleet-page.d.ts +15 -0
- package/dist/client/fleet-page.js +13 -0
- package/dist/client/fleet.d.ts +29 -0
- package/dist/client/fleet.js +51 -0
- package/dist/client/index.d.ts +17 -0
- package/dist/client/index.js +6 -0
- package/dist/client/make.d.ts +157 -0
- package/dist/client/make.js +221 -0
- package/dist/client/offline/queue.d.ts +118 -0
- package/dist/client/offline/queue.js +292 -0
- package/dist/client/offline/store.d.ts +74 -0
- package/dist/client/offline/store.js +78 -0
- package/dist/client/optimistic.d.ts +57 -0
- package/dist/client/optimistic.js +136 -0
- package/dist/client/report.d.ts +2 -0
- package/dist/client/report.js +8 -0
- package/dist/client/sessions/connection.d.ts +118 -0
- package/dist/client/sessions/connection.js +162 -0
- package/dist/client/sessions/feed.d.ts +42 -0
- package/dist/client/sessions/feed.js +43 -0
- package/dist/client/sessions/sse.d.ts +47 -0
- package/dist/client/sessions/sse.js +112 -0
- package/dist/client/sessions/stream.d.ts +28 -0
- package/dist/client/sessions/stream.js +35 -0
- package/dist/client/sessions/watch.d.ts +34 -0
- package/dist/client/sessions/watch.js +40 -0
- package/dist/client/transport.d.ts +37 -0
- package/dist/client/transport.js +66 -0
- package/dist/contexts/command.d.ts +132 -0
- package/dist/contexts/command.js +20 -0
- package/dist/contexts/connection.d.ts +68 -0
- package/dist/contexts/connection.js +0 -0
- package/dist/contexts/job.d.ts +49 -0
- package/dist/contexts/job.js +0 -0
- package/dist/contexts/workflow.d.ts +147 -0
- package/dist/contexts/workflow.js +22 -0
- package/dist/errors/actor.d.ts +200 -0
- package/dist/errors/actor.js +271 -0
- package/dist/errors/content.d.ts +19 -0
- package/dist/errors/content.js +14 -0
- package/dist/errors/database.d.ts +22 -0
- package/dist/errors/database.js +23 -0
- package/dist/errors/events.d.ts +17 -0
- package/dist/errors/events.js +14 -0
- package/dist/errors/subscription.d.ts +12 -0
- package/dist/errors/subscription.js +8 -0
- package/dist/errors/workflow.d.ts +28 -0
- package/dist/errors/workflow.js +17 -0
- package/dist/handles/actors.d.ts +17 -0
- package/dist/handles/actors.js +7 -0
- package/dist/handles/content.d.ts +59 -0
- package/dist/handles/content.js +36 -0
- package/dist/handles/intents.d.ts +164 -0
- package/dist/handles/intents.js +214 -0
- package/dist/handles/run.d.ts +31 -0
- package/dist/handles/run.js +21 -0
- package/dist/handles/workflow.d.ts +27 -0
- package/dist/handles/workflow.js +23 -0
- package/dist/identity/caller.d.ts +105 -0
- package/dist/identity/caller.js +68 -0
- package/dist/identity/child.d.ts +18 -0
- package/dist/identity/child.js +39 -0
- package/dist/identity/command.d.ts +19 -0
- package/dist/identity/command.js +21 -0
- package/dist/identity/connection.d.ts +24 -0
- package/dist/identity/connection.js +29 -0
- package/dist/identity/content.d.ts +18 -0
- package/dist/identity/content.js +12 -0
- package/dist/identity/digest.d.ts +4 -0
- package/dist/identity/digest.js +5 -0
- package/dist/identity/execution.d.ts +32 -0
- package/dist/identity/execution.js +63 -0
- package/dist/identity/mint.d.ts +51 -0
- package/dist/identity/mint.js +76 -0
- package/dist/identity/version.d.ts +2 -0
- package/dist/identity/version.js +3 -0
- package/dist/index.d.ts +159 -0
- package/dist/index.js +97 -0
- package/dist/members/blob.d.ts +43 -0
- package/dist/members/blob.js +29 -0
- package/dist/members/command.d.ts +109 -0
- package/dist/members/command.js +61 -0
- package/dist/members/connection.d.ts +55 -0
- package/dist/members/connection.js +49 -0
- package/dist/members/event.d.ts +36 -0
- package/dist/members/event.js +24 -0
- package/dist/members/job.d.ts +157 -0
- package/dist/members/job.js +67 -0
- package/dist/members/payload.d.ts +93 -0
- package/dist/members/payload.js +145 -0
- package/dist/members/reducer.d.ts +64 -0
- package/dist/members/reducer.js +27 -0
- package/dist/members/stream.d.ts +36 -0
- package/dist/members/stream.js +14 -0
- package/dist/members/subscription.d.ts +182 -0
- package/dist/members/subscription.js +91 -0
- package/dist/members/workflow.d.ts +99 -0
- package/dist/members/workflow.js +2 -0
- package/dist/policies/access.d.ts +35 -0
- package/dist/policies/access.js +6 -0
- package/dist/policies/command.d.ts +127 -0
- package/dist/policies/command.js +45 -0
- package/dist/policies/job.d.ts +28 -0
- package/dist/policies/job.js +60 -0
- package/dist/policies/schedules.d.ts +33 -0
- package/dist/policies/schedules.js +131 -0
- package/dist/protocol/frames.d.ts +66 -0
- package/dist/protocol/frames.js +55 -0
- package/dist/protocol/inspection.d.ts +807 -0
- package/dist/protocol/inspection.js +243 -0
- package/dist/protocol/wire.d.ts +184 -0
- package/dist/protocol/wire.js +150 -0
- package/dist/runtime/actors.d.ts +155 -0
- package/dist/runtime/actors.js +4 -0
- package/dist/runtime/admission.d.ts +34 -0
- package/dist/runtime/admission.js +72 -0
- package/dist/runtime/adoption/backfill.d.ts +27 -0
- package/dist/runtime/adoption/backfill.js +144 -0
- package/dist/runtime/adoption/enforce.d.ts +55 -0
- package/dist/runtime/adoption/enforce.js +241 -0
- package/dist/runtime/adoption/observe.d.ts +43 -0
- package/dist/runtime/adoption/observe.js +139 -0
- package/dist/runtime/adoption/plan.d.ts +45 -0
- package/dist/runtime/adoption/plan.js +192 -0
- package/dist/runtime/adoption/startup.d.ts +32 -0
- package/dist/runtime/adoption/startup.js +76 -0
- package/dist/runtime/adoption/status.d.ts +23 -0
- package/dist/runtime/adoption/status.js +47 -0
- package/dist/runtime/adoption/target.d.ts +33 -0
- package/dist/runtime/adoption/target.js +49 -0
- package/dist/runtime/connections/holder.d.ts +221 -0
- package/dist/runtime/connections/holder.js +816 -0
- package/dist/runtime/connections/owner.d.ts +263 -0
- package/dist/runtime/connections/owner.js +896 -0
- package/dist/runtime/connections/protocol.d.ts +441 -0
- package/dist/runtime/connections/protocol.js +222 -0
- package/dist/runtime/connections/reads.d.ts +24 -0
- package/dist/runtime/connections/reads.js +19 -0
- package/dist/runtime/connections/streams.d.ts +62 -0
- package/dist/runtime/connections/streams.js +128 -0
- package/dist/runtime/connections/transport.d.ts +40 -0
- package/dist/runtime/connections/transport.js +68 -0
- package/dist/runtime/connections/watch.d.ts +52 -0
- package/dist/runtime/connections/watch.js +159 -0
- package/dist/runtime/content/grant.d.ts +34 -0
- package/dist/runtime/content/grant.js +58 -0
- package/dist/runtime/content/store.d.ts +63 -0
- package/dist/runtime/content/store.js +294 -0
- package/dist/runtime/cron/key.d.ts +2 -0
- package/dist/runtime/cron/key.js +2 -0
- package/dist/runtime/cron/schedule.d.ts +69 -0
- package/dist/runtime/cron/schedule.js +144 -0
- package/dist/runtime/database/bounded.d.ts +43 -0
- package/dist/runtime/database/bounded.js +108 -0
- package/dist/runtime/database/connection.d.ts +8 -0
- package/dist/runtime/database/connection.js +18 -0
- package/dist/runtime/database/coordination.d.ts +19 -0
- package/dist/runtime/database/coordination.js +72 -0
- package/dist/runtime/database/flock.d.ts +10 -0
- package/dist/runtime/database/flock.js +60 -0
- package/dist/runtime/database/gate.d.ts +26 -0
- package/dist/runtime/database/gate.js +54 -0
- package/dist/runtime/database/keepalive.d.ts +11 -0
- package/dist/runtime/database/keepalive.js +22 -0
- package/dist/runtime/database/migrations.d.ts +177 -0
- package/dist/runtime/database/migrations.js +1018 -0
- package/dist/runtime/database/neki/migrations.d.ts +31 -0
- package/dist/runtime/database/neki/migrations.js +276 -0
- package/dist/runtime/database/neki/session.d.ts +23 -0
- package/dist/runtime/database/neki/session.js +31 -0
- package/dist/runtime/database/pglite.d.ts +21 -0
- package/dist/runtime/database/pglite.js +74 -0
- package/dist/runtime/database/replica.d.ts +41 -0
- package/dist/runtime/database/replica.js +51 -0
- package/dist/runtime/database/shards.d.ts +21 -0
- package/dist/runtime/database/shards.js +37 -0
- package/dist/runtime/database/snapshot.d.ts +7 -0
- package/dist/runtime/database/snapshot.js +7 -0
- package/dist/runtime/database/tenancy.d.ts +69 -0
- package/dist/runtime/database/tenancy.js +145 -0
- package/dist/runtime/database/transient.d.ts +10 -0
- package/dist/runtime/database/transient.js +25 -0
- package/dist/runtime/drain.d.ts +132 -0
- package/dist/runtime/drain.js +109 -0
- package/dist/runtime/entity/mailbox.d.ts +86 -0
- package/dist/runtime/entity/mailbox.js +121 -0
- package/dist/runtime/entity/register.d.ts +424 -0
- package/dist/runtime/entity/register.js +669 -0
- package/dist/runtime/events/append.d.ts +192 -0
- package/dist/runtime/events/append.js +128 -0
- package/dist/runtime/events/cursor.d.ts +2 -0
- package/dist/runtime/events/cursor.js +5 -0
- package/dist/runtime/events/replay.d.ts +20 -0
- package/dist/runtime/events/replay.js +45 -0
- package/dist/runtime/feeds.d.ts +26 -0
- package/dist/runtime/feeds.js +100 -0
- package/dist/runtime/fleet/checks.d.ts +17 -0
- package/dist/runtime/fleet/checks.js +106 -0
- package/dist/runtime/fleet/maintainer.d.ts +38 -0
- package/dist/runtime/fleet/maintainer.js +383 -0
- package/dist/runtime/fleet/pgoutput.d.ts +41 -0
- package/dist/runtime/fleet/pgoutput.js +102 -0
- package/dist/runtime/fleet/setup.d.ts +36 -0
- package/dist/runtime/fleet/setup.js +58 -0
- package/dist/runtime/fleet/subscribe.d.ts +42 -0
- package/dist/runtime/fleet/subscribe.js +147 -0
- package/dist/runtime/index.d.ts +66 -0
- package/dist/runtime/index.js +37 -0
- package/dist/runtime/inspector/http.d.ts +19 -0
- package/dist/runtime/inspector/http.js +36 -0
- package/dist/runtime/inspector/layer.d.ts +46 -0
- package/dist/runtime/inspector/layer.js +180 -0
- package/dist/runtime/inspector/queries.d.ts +711 -0
- package/dist/runtime/inspector/queries.js +494 -0
- package/dist/runtime/jobs/attempt.d.ts +254 -0
- package/dist/runtime/jobs/attempt.js +413 -0
- package/dist/runtime/jobs/isolation.d.ts +20 -0
- package/dist/runtime/jobs/isolation.js +10 -0
- package/dist/runtime/jobs/progress.d.ts +95 -0
- package/dist/runtime/jobs/progress.js +144 -0
- package/dist/runtime/layer.d.ts +260 -0
- package/dist/runtime/layer.js +876 -0
- package/dist/runtime/members.d.ts +381 -0
- package/dist/runtime/members.js +8 -0
- package/dist/runtime/operators/audit.d.ts +64 -0
- package/dist/runtime/operators/audit.js +56 -0
- package/dist/runtime/operators/auth.d.ts +29 -0
- package/dist/runtime/operators/auth.js +42 -0
- package/dist/runtime/operators/export.d.ts +68 -0
- package/dist/runtime/operators/export.js +137 -0
- package/dist/runtime/operators/grants.d.ts +45 -0
- package/dist/runtime/operators/grants.js +40 -0
- package/dist/runtime/operators/repair.d.ts +206 -0
- package/dist/runtime/operators/repair.js +226 -0
- package/dist/runtime/operators/routes.d.ts +35 -0
- package/dist/runtime/operators/routes.js +190 -0
- package/dist/runtime/operators/seed.d.ts +123 -0
- package/dist/runtime/operators/seed.js +123 -0
- package/dist/runtime/payloads/versions.d.ts +65 -0
- package/dist/runtime/payloads/versions.js +240 -0
- package/dist/runtime/peering/authority.d.ts +42 -0
- package/dist/runtime/peering/authority.js +132 -0
- package/dist/runtime/peering/credentials.d.ts +21 -0
- package/dist/runtime/peering/credentials.js +13 -0
- package/dist/runtime/peering/transport.d.ts +51 -0
- package/dist/runtime/peering/transport.js +175 -0
- package/dist/runtime/queries.d.ts +18 -0
- package/dist/runtime/queries.js +169 -0
- package/dist/runtime/readiness.d.ts +36 -0
- package/dist/runtime/readiness.js +44 -0
- package/dist/runtime/registration.d.ts +58 -0
- package/dist/runtime/registration.js +186 -0
- package/dist/runtime/request.d.ts +158 -0
- package/dist/runtime/request.js +102 -0
- package/dist/runtime/retry.d.ts +8 -0
- package/dist/runtime/retry.js +11 -0
- package/dist/runtime/runner.d.ts +93 -0
- package/dist/runtime/runner.js +122 -0
- package/dist/runtime/storage/codec.d.ts +39 -0
- package/dist/runtime/storage/codec.js +41 -0
- package/dist/runtime/storage/generation.d.ts +69 -0
- package/dist/runtime/storage/generation.js +49 -0
- package/dist/runtime/storage/placements.d.ts +15 -0
- package/dist/runtime/storage/placements.js +38 -0
- package/dist/runtime/storage/platform.d.ts +6 -0
- package/dist/runtime/storage/platform.js +9 -0
- package/dist/runtime/storage/retention.d.ts +73 -0
- package/dist/runtime/storage/retention.js +158 -0
- package/dist/runtime/subscriptions/identity.d.ts +31 -0
- package/dist/runtime/subscriptions/identity.js +45 -0
- package/dist/runtime/subscriptions/relay.d.ts +175 -0
- package/dist/runtime/subscriptions/relay.js +763 -0
- package/dist/runtime/subscriptions/storage.d.ts +40 -0
- package/dist/runtime/subscriptions/storage.js +98 -0
- package/dist/runtime/sweeps.d.ts +39 -0
- package/dist/runtime/sweeps.js +54 -0
- package/dist/runtime/telemetry/defects.d.ts +57 -0
- package/dist/runtime/telemetry/defects.js +43 -0
- package/dist/runtime/telemetry/metrics.d.ts +52 -0
- package/dist/runtime/telemetry/metrics.js +138 -0
- package/dist/runtime/telemetry/routes.d.ts +19 -0
- package/dist/runtime/telemetry/routes.js +18 -0
- package/dist/runtime/telemetry/sampler.d.ts +26 -0
- package/dist/runtime/telemetry/sampler.js +101 -0
- package/dist/runtime/telemetry/spans.d.ts +38 -0
- package/dist/runtime/telemetry/spans.js +44 -0
- package/dist/runtime/telemetry/usage.d.ts +52 -0
- package/dist/runtime/telemetry/usage.js +30 -0
- package/dist/runtime/topology/admission.d.ts +13 -0
- package/dist/runtime/topology/admission.js +36 -0
- package/dist/runtime/topology/locks.d.ts +56 -0
- package/dist/runtime/topology/locks.js +81 -0
- package/dist/runtime/topology/messages.d.ts +15 -0
- package/dist/runtime/topology/messages.js +32 -0
- package/dist/runtime/turn/admission.d.ts +22 -0
- package/dist/runtime/turn/admission.js +41 -0
- package/dist/runtime/turn/blobs.d.ts +38 -0
- package/dist/runtime/turn/blobs.js +215 -0
- package/dist/runtime/turn/execute.d.ts +208 -0
- package/dist/runtime/turn/execute.js +972 -0
- package/dist/runtime/turn/group.d.ts +165 -0
- package/dist/runtime/turn/group.js +326 -0
- package/dist/runtime/turn/hooks.d.ts +44 -0
- package/dist/runtime/turn/hooks.js +28 -0
- package/dist/runtime/turn/outbox.d.ts +159 -0
- package/dist/runtime/turn/outbox.js +269 -0
- package/dist/runtime/turn/pipeline.d.ts +68 -0
- package/dist/runtime/turn/pipeline.js +83 -0
- package/dist/runtime/turn/receipt.d.ts +81 -0
- package/dist/runtime/turn/receipt.js +32 -0
- package/dist/runtime/turn/relay.d.ts +179 -0
- package/dist/runtime/turn/relay.js +685 -0
- package/dist/runtime/turn/rows.d.ts +43 -0
- package/dist/runtime/turn/rows.js +592 -0
- package/dist/runtime/workflows/compatibility.d.ts +125 -0
- package/dist/runtime/workflows/compatibility.js +285 -0
- package/dist/runtime/workflows/engine.d.ts +107 -0
- package/dist/runtime/workflows/engine.js +826 -0
- package/dist/runtime/workflows/manifest.d.ts +34 -0
- package/dist/runtime/workflows/manifest.js +39 -0
- package/dist/runtime/workflows/steps.d.ts +33 -0
- package/dist/runtime/workflows/steps.js +152 -0
- package/dist/serve/api.d.ts +99 -0
- package/dist/serve/api.js +403 -0
- package/dist/serve/assertion/binding.d.ts +41 -0
- package/dist/serve/assertion/binding.js +92 -0
- package/dist/serve/assertion/verify.d.ts +93 -0
- package/dist/serve/assertion/verify.js +189 -0
- package/dist/serve/auth.d.ts +200 -0
- package/dist/serve/auth.js +92 -0
- package/dist/serve/clock.d.ts +10 -0
- package/dist/serve/clock.js +25 -0
- package/dist/serve/jwt.d.ts +65 -0
- package/dist/serve/jwt.js +202 -0
- package/dist/serve/layer.d.ts +98 -0
- package/dist/serve/layer.js +809 -0
- package/dist/serve/mcp/endpoint.d.ts +39 -0
- package/dist/serve/mcp/endpoint.js +187 -0
- package/dist/serve/mcp/tools.d.ts +37 -0
- package/dist/serve/mcp/tools.js +125 -0
- package/dist/serve/origin.d.ts +6 -0
- package/dist/serve/origin.js +21 -0
- package/dist/serve/sessions/feed.d.ts +79 -0
- package/dist/serve/sessions/feed.js +115 -0
- package/dist/serve/sessions/socket.d.ts +56 -0
- package/dist/serve/sessions/socket.js +212 -0
- package/dist/serve/sessions/sse.d.ts +27 -0
- package/dist/serve/sessions/sse.js +26 -0
- package/dist/serve/sessions/stream.d.ts +9 -0
- package/dist/serve/sessions/stream.js +9 -0
- package/dist/serve/sessions/watch.d.ts +12 -0
- package/dist/serve/sessions/watch.js +11 -0
- package/dist/serve/wire.d.ts +16 -0
- package/dist/serve/wire.js +50 -0
- package/dist/state/blob.d.ts +71 -0
- package/dist/state/blob.js +0 -0
- package/dist/state/migration.d.ts +53 -0
- package/dist/state/migration.js +29 -0
- package/dist/tables/fleet.d.ts +170 -0
- package/dist/tables/fleet.js +214 -0
- package/dist/tables/owned.d.ts +250 -0
- package/dist/tables/owned.js +233 -0
- package/dist/testing/actor-test.d.ts +360 -0
- package/dist/testing/actor-test.js +337 -0
- package/dist/testing/cluster.d.ts +93 -0
- package/dist/testing/cluster.js +296 -0
- package/dist/testing/conformance/access.d.ts +5 -0
- package/dist/testing/conformance/access.js +531 -0
- package/dist/testing/conformance/admission.d.ts +11 -0
- package/dist/testing/conformance/admission.js +182 -0
- package/dist/testing/conformance/adoption.d.ts +2 -0
- package/dist/testing/conformance/adoption.js +1019 -0
- package/dist/testing/conformance/assertions.d.ts +202 -0
- package/dist/testing/conformance/assertions.js +849 -0
- package/dist/testing/conformance/batches.d.ts +41 -0
- package/dist/testing/conformance/batches.js +388 -0
- package/dist/testing/conformance/blobs.d.ts +14 -0
- package/dist/testing/conformance/blobs.js +405 -0
- package/dist/testing/conformance/capacity.d.ts +8 -0
- package/dist/testing/conformance/capacity.js +433 -0
- package/dist/testing/conformance/client.d.ts +5 -0
- package/dist/testing/conformance/client.js +719 -0
- package/dist/testing/conformance/cold-serve.d.ts +16 -0
- package/dist/testing/conformance/cold-serve.js +254 -0
- package/dist/testing/conformance/connections/actors.d.ts +1143 -0
- package/dist/testing/conformance/connections/actors.js +180 -0
- package/dist/testing/conformance/connections/harness.d.ts +1754 -0
- package/dist/testing/conformance/connections/harness.js +142 -0
- package/dist/testing/conformance/connections/holders.d.ts +4 -0
- package/dist/testing/conformance/connections/holders.js +165 -0
- package/dist/testing/conformance/connections/lifecycle.d.ts +4 -0
- package/dist/testing/conformance/connections/lifecycle.js +113 -0
- package/dist/testing/conformance/connections/limits.d.ts +4 -0
- package/dist/testing/conformance/connections/limits.js +127 -0
- package/dist/testing/conformance/connections/reauthorization.d.ts +4 -0
- package/dist/testing/conformance/connections/reauthorization.js +170 -0
- package/dist/testing/conformance/connections/resync.d.ts +4 -0
- package/dist/testing/conformance/connections/resync.js +360 -0
- package/dist/testing/conformance/connections/takeover.d.ts +4 -0
- package/dist/testing/conformance/connections/takeover.js +287 -0
- package/dist/testing/conformance/connections.d.ts +4 -0
- package/dist/testing/conformance/connections.js +15 -0
- package/dist/testing/conformance/content-blobs.d.ts +16 -0
- package/dist/testing/conformance/content-blobs.js +534 -0
- package/dist/testing/conformance/counter.d.ts +16 -0
- package/dist/testing/conformance/counter.js +813 -0
- package/dist/testing/conformance/cron.d.ts +5 -0
- package/dist/testing/conformance/cron.js +665 -0
- package/dist/testing/conformance/drain.d.ts +26 -0
- package/dist/testing/conformance/drain.js +540 -0
- package/dist/testing/conformance/effect-control.d.ts +38 -0
- package/dist/testing/conformance/effect-control.js +1059 -0
- package/dist/testing/conformance/effects.d.ts +23 -0
- package/dist/testing/conformance/effects.js +432 -0
- package/dist/testing/conformance/events.d.ts +28 -0
- package/dist/testing/conformance/events.js +335 -0
- package/dist/testing/conformance/export.d.ts +2 -0
- package/dist/testing/conformance/export.js +368 -0
- package/dist/testing/conformance/fleet.d.ts +444 -0
- package/dist/testing/conformance/fleet.js +1009 -0
- package/dist/testing/conformance/groups.d.ts +7 -0
- package/dist/testing/conformance/groups.js +353 -0
- package/dist/testing/conformance/heap.d.ts +3 -0
- package/dist/testing/conformance/heap.js +149 -0
- package/dist/testing/conformance/http.d.ts +2809 -0
- package/dist/testing/conformance/http.js +1234 -0
- package/dist/testing/conformance/inspection-views.d.ts +8 -0
- package/dist/testing/conformance/inspection-views.js +272 -0
- package/dist/testing/conformance/inspector.d.ts +7 -0
- package/dist/testing/conformance/inspector.js +650 -0
- package/dist/testing/conformance/mint.d.ts +58 -0
- package/dist/testing/conformance/mint.js +692 -0
- package/dist/testing/conformance/multi-runner.d.ts +8 -0
- package/dist/testing/conformance/multi-runner.js +403 -0
- package/dist/testing/conformance/neki/plan.d.ts +19 -0
- package/dist/testing/conformance/neki/plan.js +30 -0
- package/dist/testing/conformance/observability.d.ts +3 -0
- package/dist/testing/conformance/observability.js +343 -0
- package/dist/testing/conformance/offline.d.ts +4 -0
- package/dist/testing/conformance/offline.js +474 -0
- package/dist/testing/conformance/operator-harness.d.ts +57 -0
- package/dist/testing/conformance/operator-harness.js +78 -0
- package/dist/testing/conformance/operator.d.ts +3 -0
- package/dist/testing/conformance/operator.js +379 -0
- package/dist/testing/conformance/outbox-cross-shard.d.ts +14 -0
- package/dist/testing/conformance/outbox-cross-shard.js +160 -0
- package/dist/testing/conformance/outbox.d.ts +36 -0
- package/dist/testing/conformance/outbox.js +437 -0
- package/dist/testing/conformance/payload-migrations.d.ts +3 -0
- package/dist/testing/conformance/payload-migrations.js +612 -0
- package/dist/testing/conformance/pipeline.d.ts +3 -0
- package/dist/testing/conformance/pipeline.js +1040 -0
- package/dist/testing/conformance/placement.d.ts +22 -0
- package/dist/testing/conformance/placement.js +539 -0
- package/dist/testing/conformance/platform.d.ts +40 -0
- package/dist/testing/conformance/platform.js +101 -0
- package/dist/testing/conformance/progress.d.ts +39 -0
- package/dist/testing/conformance/progress.js +666 -0
- package/dist/testing/conformance/properties.d.ts +6 -0
- package/dist/testing/conformance/properties.js +295 -0
- package/dist/testing/conformance/protocols.d.ts +4 -0
- package/dist/testing/conformance/protocols.js +618 -0
- package/dist/testing/conformance/provider/advertise.d.ts +21 -0
- package/dist/testing/conformance/provider/advertise.js +44 -0
- package/dist/testing/conformance/read-your-writes.d.ts +20 -0
- package/dist/testing/conformance/read-your-writes.js +192 -0
- package/dist/testing/conformance/reducers.d.ts +8 -0
- package/dist/testing/conformance/reducers.js +258 -0
- package/dist/testing/conformance/relay.d.ts +42 -0
- package/dist/testing/conformance/relay.js +1115 -0
- package/dist/testing/conformance/restore.d.ts +43 -0
- package/dist/testing/conformance/restore.js +341 -0
- package/dist/testing/conformance/retention.d.ts +14 -0
- package/dist/testing/conformance/retention.js +463 -0
- package/dist/testing/conformance/rls.d.ts +24 -0
- package/dist/testing/conformance/rls.js +576 -0
- package/dist/testing/conformance/simulation.d.ts +31 -0
- package/dist/testing/conformance/simulation.js +167 -0
- package/dist/testing/conformance/single-shard.d.ts +2 -0
- package/dist/testing/conformance/single-shard.js +125 -0
- package/dist/testing/conformance/singleton.d.ts +3 -0
- package/dist/testing/conformance/singleton.js +293 -0
- package/dist/testing/conformance/statements.d.ts +60 -0
- package/dist/testing/conformance/statements.js +108 -0
- package/dist/testing/conformance/streams.d.ts +7 -0
- package/dist/testing/conformance/streams.js +280 -0
- package/dist/testing/conformance/subscriptions/access.d.ts +4 -0
- package/dist/testing/conformance/subscriptions/access.js +98 -0
- package/dist/testing/conformance/subscriptions/actors.d.ts +4910 -0
- package/dist/testing/conformance/subscriptions/actors.js +372 -0
- package/dist/testing/conformance/subscriptions/cluster.d.ts +4 -0
- package/dist/testing/conformance/subscriptions/cluster.js +89 -0
- package/dist/testing/conformance/subscriptions/delivery.d.ts +4 -0
- package/dist/testing/conformance/subscriptions/delivery.js +253 -0
- package/dist/testing/conformance/subscriptions/deploys.d.ts +4 -0
- package/dist/testing/conformance/subscriptions/deploys.js +162 -0
- package/dist/testing/conformance/subscriptions/epochs.d.ts +4 -0
- package/dist/testing/conformance/subscriptions/epochs.js +169 -0
- package/dist/testing/conformance/subscriptions/failures.d.ts +4 -0
- package/dist/testing/conformance/subscriptions/failures.js +108 -0
- package/dist/testing/conformance/subscriptions/feeds.d.ts +4 -0
- package/dist/testing/conformance/subscriptions/feeds.js +218 -0
- package/dist/testing/conformance/subscriptions/harness.d.ts +124 -0
- package/dist/testing/conformance/subscriptions/harness.js +143 -0
- package/dist/testing/conformance/subscriptions/operator.d.ts +4 -0
- package/dist/testing/conformance/subscriptions/operator.js +128 -0
- package/dist/testing/conformance/subscriptions/retention.d.ts +4 -0
- package/dist/testing/conformance/subscriptions/retention.js +288 -0
- package/dist/testing/conformance/subscriptions/routing.d.ts +4 -0
- package/dist/testing/conformance/subscriptions/routing.js +179 -0
- package/dist/testing/conformance/subscriptions.d.ts +4 -0
- package/dist/testing/conformance/subscriptions.js +19 -0
- package/dist/testing/conformance/tables.d.ts +125 -0
- package/dist/testing/conformance/tables.js +664 -0
- package/dist/testing/conformance/transports/actors.d.ts +1907 -0
- package/dist/testing/conformance/transports/actors.js +163 -0
- package/dist/testing/conformance/transports/client.d.ts +3 -0
- package/dist/testing/conformance/transports/client.js +237 -0
- package/dist/testing/conformance/transports/feeds.d.ts +3 -0
- package/dist/testing/conformance/transports/feeds.js +232 -0
- package/dist/testing/conformance/transports/harness.d.ts +93 -0
- package/dist/testing/conformance/transports/harness.js +84 -0
- package/dist/testing/conformance/transports/streams.d.ts +3 -0
- package/dist/testing/conformance/transports/streams.js +96 -0
- package/dist/testing/conformance/transports/websocket.d.ts +3 -0
- package/dist/testing/conformance/transports/websocket.js +384 -0
- package/dist/testing/conformance/transports/wire.d.ts +141 -0
- package/dist/testing/conformance/transports/wire.js +204 -0
- package/dist/testing/conformance/transports.d.ts +3 -0
- package/dist/testing/conformance/transports.js +11 -0
- package/dist/testing/conformance/watch.d.ts +59 -0
- package/dist/testing/conformance/watch.js +879 -0
- package/dist/testing/conformance/workflow-engine.d.ts +97 -0
- package/dist/testing/conformance/workflow-engine.js +253 -0
- package/dist/testing/conformance/workflow-versions.d.ts +3 -0
- package/dist/testing/conformance/workflow-versions.js +545 -0
- package/dist/testing/conformance/workflows/access.d.ts +4 -0
- package/dist/testing/conformance/workflows/access.js +147 -0
- package/dist/testing/conformance/workflows/actors.d.ts +2317 -0
- package/dist/testing/conformance/workflows/actors.js +305 -0
- package/dist/testing/conformance/workflows/basics.d.ts +4 -0
- package/dist/testing/conformance/workflows/basics.js +144 -0
- package/dist/testing/conformance/workflows/engine.d.ts +4 -0
- package/dist/testing/conformance/workflows/engine.js +80 -0
- package/dist/testing/conformance/workflows/guards.d.ts +4 -0
- package/dist/testing/conformance/workflows/guards.js +172 -0
- package/dist/testing/conformance/workflows/harness.d.ts +14 -0
- package/dist/testing/conformance/workflows/harness.js +44 -0
- package/dist/testing/conformance/workflows/recovery.d.ts +4 -0
- package/dist/testing/conformance/workflows/recovery.js +181 -0
- package/dist/testing/conformance/workflows/starts.d.ts +4 -0
- package/dist/testing/conformance/workflows/starts.js +57 -0
- package/dist/testing/conformance/workflows/suspension.d.ts +4 -0
- package/dist/testing/conformance/workflows/suspension.js +106 -0
- package/dist/testing/conformance/workflows/waits.d.ts +4 -0
- package/dist/testing/conformance/workflows/waits.js +284 -0
- package/dist/testing/conformance/workflows.d.ts +4 -0
- package/dist/testing/conformance/workflows.js +19 -0
- package/dist/testing/conformance.d.ts +330 -0
- package/dist/testing/conformance.js +364 -0
- package/dist/testing/database.d.ts +31 -0
- package/dist/testing/database.js +70 -0
- package/dist/testing/foundation.d.ts +41 -0
- package/dist/testing/foundation.js +517 -0
- package/dist/testing/index.d.ts +20 -0
- package/dist/testing/index.js +12 -0
- package/dist/testing/property.d.ts +40 -0
- package/dist/testing/property.js +95 -0
- package/dist/testing/simulate-cluster.d.ts +112 -0
- package/dist/testing/simulate-cluster.js +257 -0
- package/dist/testing/simulate.d.ts +90 -0
- package/dist/testing/simulate.js +127 -0
- package/package.json +1 -0
|
@@ -0,0 +1,711 @@
|
|
|
1
|
+
import { Effect, Option, Schema } from "effect";
|
|
2
|
+
import { SqlClient } from "effect/sql";
|
|
3
|
+
import type * as Inspection from "../../protocol/inspection.ts";
|
|
4
|
+
export type { Decoded } from "../../protocol/inspection.ts";
|
|
5
|
+
/** Decodes a JSON `text` column such as a payload, caller, or outcome. */
|
|
6
|
+
export declare const decodeText: (text: string | null) => Inspection.Decoded | null;
|
|
7
|
+
/** Decodes a zstd-compressed JSON `bytea` column such as state, an event, or a step exit. */
|
|
8
|
+
export declare const decodeBytes: (bytes: Uint8Array | null) => Inspection.Decoded | null;
|
|
9
|
+
/** The widest page any list returns. */
|
|
10
|
+
export declare const MAX_LIMIT = 500;
|
|
11
|
+
/** Every read below is scoped to `tenant`, which comes from the authenticated principal only. */
|
|
12
|
+
interface Page {
|
|
13
|
+
readonly tenant: string;
|
|
14
|
+
readonly limit: number;
|
|
15
|
+
}
|
|
16
|
+
/** The `(actor type, actor id)` pair that names an actor within a tenant. */
|
|
17
|
+
type ActorIdentity = Pick<Inspection.ActorRow, "actorType" | "actorId">;
|
|
18
|
+
/**
|
|
19
|
+
* Runs `effect` in a read-only snapshot that names `tenant`, so when
|
|
20
|
+
* row-level security owns the views they return no other tenant's rows,
|
|
21
|
+
* whatever a read's own filter says.
|
|
22
|
+
*/
|
|
23
|
+
export declare const readOnly: (tenant: string) => <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E | import("effect/sql/SqlError").SqlError, R | SqlClient.SqlClient>;
|
|
24
|
+
/** The view catalog and the tenant's row count in each view, from one snapshot. */
|
|
25
|
+
export declare const overview: ({ tenant }: {
|
|
26
|
+
readonly tenant: string;
|
|
27
|
+
}) => Effect.Effect<{
|
|
28
|
+
tenant: string;
|
|
29
|
+
views: readonly {
|
|
30
|
+
view: string;
|
|
31
|
+
version: number;
|
|
32
|
+
}[];
|
|
33
|
+
counts: {
|
|
34
|
+
readonly actors: number;
|
|
35
|
+
readonly receipts: number;
|
|
36
|
+
readonly events: number;
|
|
37
|
+
readonly outbox: number;
|
|
38
|
+
readonly timers: number;
|
|
39
|
+
readonly jobs: number;
|
|
40
|
+
readonly deadLetters: number;
|
|
41
|
+
readonly workflows: number;
|
|
42
|
+
readonly openWorkflows: number;
|
|
43
|
+
};
|
|
44
|
+
nextTimerDueAtMs: number | null;
|
|
45
|
+
}, import("effect/sql/SqlError").SqlError, SqlClient.SqlClient>;
|
|
46
|
+
/** One keyset page of actors, optionally of a single type or under an address prefix. */
|
|
47
|
+
interface ActorsPage extends Page {
|
|
48
|
+
readonly actorType?: string | undefined;
|
|
49
|
+
/** Keeps only actors whose address, `type/id`, starts with it. */
|
|
50
|
+
readonly prefix?: string | undefined;
|
|
51
|
+
/** Keyset cursor: the last actor of the previous page. */
|
|
52
|
+
readonly after?: ActorIdentity | undefined;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The tenant's actors in `(actor_type, actor_id)` order, one page after `after`. The cursor
|
|
56
|
+
* comparison uses the same `C` collation as the ORDER BY, or a cursor could skip or repeat actors.
|
|
57
|
+
* A prefix that names a whole type, `type/` and more, matches that type's ids by their own prefix,
|
|
58
|
+
* so it reads one type rather than every actor of the tenant.
|
|
59
|
+
*/
|
|
60
|
+
export declare const actors: (page: ActorsPage) => Effect.Effect<{
|
|
61
|
+
actors: readonly {
|
|
62
|
+
readonly actorType: string;
|
|
63
|
+
readonly actorId: string;
|
|
64
|
+
readonly placement: string | null;
|
|
65
|
+
readonly generation: number;
|
|
66
|
+
readonly created: boolean;
|
|
67
|
+
readonly lastEventSequence: number;
|
|
68
|
+
}[];
|
|
69
|
+
next: {
|
|
70
|
+
actorType: string;
|
|
71
|
+
actorId: string;
|
|
72
|
+
} | null;
|
|
73
|
+
}, import("effect/sql/SqlError").SqlError, SqlClient.SqlClient>;
|
|
74
|
+
type ReceiptRow = Omit<Inspection.ReceiptRow, "callerKey" | "outcome" | "events"> & {
|
|
75
|
+
readonly callerKey: string;
|
|
76
|
+
readonly outcome: string;
|
|
77
|
+
readonly events: string | null;
|
|
78
|
+
};
|
|
79
|
+
/** The actor whose detail to read, with the row limit for each list in it. */
|
|
80
|
+
interface ActorPage extends Page, ActorIdentity {
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* One actor as the inspector shows it, read through the actor's routing key:
|
|
84
|
+
* its generation, decoded state, newest receipts with the events each
|
|
85
|
+
* committed, newest events, pending outbox rows and jobs, dead letters, and
|
|
86
|
+
* workflow executions with their recorded steps. `None` when the tenant has
|
|
87
|
+
* no such actor. Every runtime index leads with `routing_key`, so each read is
|
|
88
|
+
* a key lookup, and the steps read for the same page of executions give each
|
|
89
|
+
* listed execution all its steps.
|
|
90
|
+
*/
|
|
91
|
+
export declare const actor: (page: ActorPage) => Effect.Effect<Option.None<{
|
|
92
|
+
actor: {
|
|
93
|
+
actorType: string;
|
|
94
|
+
actorId: string;
|
|
95
|
+
placement: string | null;
|
|
96
|
+
generation: number;
|
|
97
|
+
created: boolean;
|
|
98
|
+
lastEventSequence: number;
|
|
99
|
+
};
|
|
100
|
+
state: {
|
|
101
|
+
key: string;
|
|
102
|
+
bytes: number;
|
|
103
|
+
value: {
|
|
104
|
+
readonly json: Schema.Json;
|
|
105
|
+
} | {
|
|
106
|
+
readonly undecodable: string;
|
|
107
|
+
} | null;
|
|
108
|
+
}[];
|
|
109
|
+
receipts: (Omit<ReceiptRow, "callerKey" | "events" | "outcome"> & {
|
|
110
|
+
callerKey: {
|
|
111
|
+
readonly json: Schema.Json;
|
|
112
|
+
} | {
|
|
113
|
+
readonly undecodable: string;
|
|
114
|
+
} | null;
|
|
115
|
+
outcome: {
|
|
116
|
+
readonly json: Schema.Json;
|
|
117
|
+
} | {
|
|
118
|
+
readonly undecodable: string;
|
|
119
|
+
} | null;
|
|
120
|
+
events: number[];
|
|
121
|
+
})[];
|
|
122
|
+
events: {
|
|
123
|
+
sequence: number;
|
|
124
|
+
event: string;
|
|
125
|
+
commandId: string | null;
|
|
126
|
+
bytes: number;
|
|
127
|
+
emittedAtMs: number;
|
|
128
|
+
value: {
|
|
129
|
+
readonly json: Schema.Json;
|
|
130
|
+
} | {
|
|
131
|
+
readonly undecodable: string;
|
|
132
|
+
} | null;
|
|
133
|
+
}[];
|
|
134
|
+
outbox: {
|
|
135
|
+
actorType: string;
|
|
136
|
+
actorId: string;
|
|
137
|
+
intentId: string;
|
|
138
|
+
timerKey: string | null;
|
|
139
|
+
targetType: string;
|
|
140
|
+
targetId: string;
|
|
141
|
+
command: string;
|
|
142
|
+
attempts: number;
|
|
143
|
+
lastError: string | null;
|
|
144
|
+
dueAtMs: number;
|
|
145
|
+
payload: {
|
|
146
|
+
readonly json: Schema.Json;
|
|
147
|
+
} | {
|
|
148
|
+
readonly undecodable: string;
|
|
149
|
+
} | null;
|
|
150
|
+
caller: {
|
|
151
|
+
readonly json: Schema.Json;
|
|
152
|
+
} | {
|
|
153
|
+
readonly undecodable: string;
|
|
154
|
+
} | null;
|
|
155
|
+
}[];
|
|
156
|
+
jobs: {
|
|
157
|
+
actorType: string;
|
|
158
|
+
actorId: string;
|
|
159
|
+
jobId: string;
|
|
160
|
+
job: string;
|
|
161
|
+
attempts: number;
|
|
162
|
+
lastError: string | null;
|
|
163
|
+
ambiguous: boolean;
|
|
164
|
+
dueAtMs: number;
|
|
165
|
+
payload: {
|
|
166
|
+
readonly json: Schema.Json;
|
|
167
|
+
} | {
|
|
168
|
+
readonly undecodable: string;
|
|
169
|
+
} | null;
|
|
170
|
+
caller: {
|
|
171
|
+
readonly json: Schema.Json;
|
|
172
|
+
} | {
|
|
173
|
+
readonly undecodable: string;
|
|
174
|
+
} | null;
|
|
175
|
+
}[];
|
|
176
|
+
deadLetters: {
|
|
177
|
+
actorType: string;
|
|
178
|
+
actorId: string;
|
|
179
|
+
jobId: string;
|
|
180
|
+
job: string;
|
|
181
|
+
attempts: number;
|
|
182
|
+
cause: string;
|
|
183
|
+
ambiguous: boolean;
|
|
184
|
+
deadAtMs: number;
|
|
185
|
+
payload: {
|
|
186
|
+
readonly json: Schema.Json;
|
|
187
|
+
} | {
|
|
188
|
+
readonly undecodable: string;
|
|
189
|
+
} | null;
|
|
190
|
+
}[];
|
|
191
|
+
workflows: {
|
|
192
|
+
actorType: string;
|
|
193
|
+
actorId: string;
|
|
194
|
+
executionId: string;
|
|
195
|
+
workflow: string;
|
|
196
|
+
workflowKey: string;
|
|
197
|
+
manifestHash: string;
|
|
198
|
+
status: string;
|
|
199
|
+
interrupt: boolean;
|
|
200
|
+
payloadBytes: number;
|
|
201
|
+
resultBytes: number | null;
|
|
202
|
+
startedAtMs: number;
|
|
203
|
+
finishedAtMs: number | null;
|
|
204
|
+
caller: {
|
|
205
|
+
readonly json: Schema.Json;
|
|
206
|
+
} | {
|
|
207
|
+
readonly undecodable: string;
|
|
208
|
+
} | null;
|
|
209
|
+
payload: {
|
|
210
|
+
readonly json: Schema.Json;
|
|
211
|
+
} | {
|
|
212
|
+
readonly undecodable: string;
|
|
213
|
+
} | null;
|
|
214
|
+
result: {
|
|
215
|
+
readonly json: Schema.Json;
|
|
216
|
+
} | {
|
|
217
|
+
readonly undecodable: string;
|
|
218
|
+
} | null;
|
|
219
|
+
steps: {
|
|
220
|
+
step: string;
|
|
221
|
+
attempt: number;
|
|
222
|
+
kind: string;
|
|
223
|
+
exit: {
|
|
224
|
+
readonly json: Schema.Json;
|
|
225
|
+
} | {
|
|
226
|
+
readonly undecodable: string;
|
|
227
|
+
} | null;
|
|
228
|
+
waitEvent: string | null;
|
|
229
|
+
version: number | null;
|
|
230
|
+
dueAtMs: number | null;
|
|
231
|
+
startedAtMs: number;
|
|
232
|
+
settledAtMs: number | null;
|
|
233
|
+
}[];
|
|
234
|
+
}[];
|
|
235
|
+
totals: {
|
|
236
|
+
readonly receipts: number;
|
|
237
|
+
readonly events: number;
|
|
238
|
+
readonly outbox: number;
|
|
239
|
+
readonly jobs: number;
|
|
240
|
+
readonly deadLetters: number;
|
|
241
|
+
readonly workflows: number;
|
|
242
|
+
};
|
|
243
|
+
}> | Option.Some<{
|
|
244
|
+
actor: {
|
|
245
|
+
actorType: string;
|
|
246
|
+
actorId: string;
|
|
247
|
+
placement: string | null;
|
|
248
|
+
generation: number;
|
|
249
|
+
created: boolean;
|
|
250
|
+
lastEventSequence: number;
|
|
251
|
+
};
|
|
252
|
+
state: {
|
|
253
|
+
key: string;
|
|
254
|
+
bytes: number;
|
|
255
|
+
value: {
|
|
256
|
+
readonly json: Schema.Json;
|
|
257
|
+
} | {
|
|
258
|
+
readonly undecodable: string;
|
|
259
|
+
} | null;
|
|
260
|
+
}[];
|
|
261
|
+
receipts: (Omit<ReceiptRow, "callerKey" | "events" | "outcome"> & {
|
|
262
|
+
callerKey: {
|
|
263
|
+
readonly json: Schema.Json;
|
|
264
|
+
} | {
|
|
265
|
+
readonly undecodable: string;
|
|
266
|
+
} | null;
|
|
267
|
+
outcome: {
|
|
268
|
+
readonly json: Schema.Json;
|
|
269
|
+
} | {
|
|
270
|
+
readonly undecodable: string;
|
|
271
|
+
} | null;
|
|
272
|
+
events: number[];
|
|
273
|
+
})[];
|
|
274
|
+
events: {
|
|
275
|
+
sequence: number;
|
|
276
|
+
event: string;
|
|
277
|
+
commandId: string | null;
|
|
278
|
+
bytes: number;
|
|
279
|
+
emittedAtMs: number;
|
|
280
|
+
value: {
|
|
281
|
+
readonly json: Schema.Json;
|
|
282
|
+
} | {
|
|
283
|
+
readonly undecodable: string;
|
|
284
|
+
} | null;
|
|
285
|
+
}[];
|
|
286
|
+
outbox: {
|
|
287
|
+
actorType: string;
|
|
288
|
+
actorId: string;
|
|
289
|
+
intentId: string;
|
|
290
|
+
timerKey: string | null;
|
|
291
|
+
targetType: string;
|
|
292
|
+
targetId: string;
|
|
293
|
+
command: string;
|
|
294
|
+
attempts: number;
|
|
295
|
+
lastError: string | null;
|
|
296
|
+
dueAtMs: number;
|
|
297
|
+
payload: {
|
|
298
|
+
readonly json: Schema.Json;
|
|
299
|
+
} | {
|
|
300
|
+
readonly undecodable: string;
|
|
301
|
+
} | null;
|
|
302
|
+
caller: {
|
|
303
|
+
readonly json: Schema.Json;
|
|
304
|
+
} | {
|
|
305
|
+
readonly undecodable: string;
|
|
306
|
+
} | null;
|
|
307
|
+
}[];
|
|
308
|
+
jobs: {
|
|
309
|
+
actorType: string;
|
|
310
|
+
actorId: string;
|
|
311
|
+
jobId: string;
|
|
312
|
+
job: string;
|
|
313
|
+
attempts: number;
|
|
314
|
+
lastError: string | null;
|
|
315
|
+
ambiguous: boolean;
|
|
316
|
+
dueAtMs: number;
|
|
317
|
+
payload: {
|
|
318
|
+
readonly json: Schema.Json;
|
|
319
|
+
} | {
|
|
320
|
+
readonly undecodable: string;
|
|
321
|
+
} | null;
|
|
322
|
+
caller: {
|
|
323
|
+
readonly json: Schema.Json;
|
|
324
|
+
} | {
|
|
325
|
+
readonly undecodable: string;
|
|
326
|
+
} | null;
|
|
327
|
+
}[];
|
|
328
|
+
deadLetters: {
|
|
329
|
+
actorType: string;
|
|
330
|
+
actorId: string;
|
|
331
|
+
jobId: string;
|
|
332
|
+
job: string;
|
|
333
|
+
attempts: number;
|
|
334
|
+
cause: string;
|
|
335
|
+
ambiguous: boolean;
|
|
336
|
+
deadAtMs: number;
|
|
337
|
+
payload: {
|
|
338
|
+
readonly json: Schema.Json;
|
|
339
|
+
} | {
|
|
340
|
+
readonly undecodable: string;
|
|
341
|
+
} | null;
|
|
342
|
+
}[];
|
|
343
|
+
workflows: {
|
|
344
|
+
actorType: string;
|
|
345
|
+
actorId: string;
|
|
346
|
+
executionId: string;
|
|
347
|
+
workflow: string;
|
|
348
|
+
workflowKey: string;
|
|
349
|
+
manifestHash: string;
|
|
350
|
+
status: string;
|
|
351
|
+
interrupt: boolean;
|
|
352
|
+
payloadBytes: number;
|
|
353
|
+
resultBytes: number | null;
|
|
354
|
+
startedAtMs: number;
|
|
355
|
+
finishedAtMs: number | null;
|
|
356
|
+
caller: {
|
|
357
|
+
readonly json: Schema.Json;
|
|
358
|
+
} | {
|
|
359
|
+
readonly undecodable: string;
|
|
360
|
+
} | null;
|
|
361
|
+
payload: {
|
|
362
|
+
readonly json: Schema.Json;
|
|
363
|
+
} | {
|
|
364
|
+
readonly undecodable: string;
|
|
365
|
+
} | null;
|
|
366
|
+
result: {
|
|
367
|
+
readonly json: Schema.Json;
|
|
368
|
+
} | {
|
|
369
|
+
readonly undecodable: string;
|
|
370
|
+
} | null;
|
|
371
|
+
steps: {
|
|
372
|
+
step: string;
|
|
373
|
+
attempt: number;
|
|
374
|
+
kind: string;
|
|
375
|
+
exit: {
|
|
376
|
+
readonly json: Schema.Json;
|
|
377
|
+
} | {
|
|
378
|
+
readonly undecodable: string;
|
|
379
|
+
} | null;
|
|
380
|
+
waitEvent: string | null;
|
|
381
|
+
version: number | null;
|
|
382
|
+
dueAtMs: number | null;
|
|
383
|
+
startedAtMs: number;
|
|
384
|
+
settledAtMs: number | null;
|
|
385
|
+
}[];
|
|
386
|
+
}[];
|
|
387
|
+
totals: {
|
|
388
|
+
readonly receipts: number;
|
|
389
|
+
readonly events: number;
|
|
390
|
+
readonly outbox: number;
|
|
391
|
+
readonly jobs: number;
|
|
392
|
+
readonly deadLetters: number;
|
|
393
|
+
readonly workflows: number;
|
|
394
|
+
};
|
|
395
|
+
}>, import("effect/sql/SqlError").SqlError, SqlClient.SqlClient>;
|
|
396
|
+
/** The tenant's pending intents and timers, soonest first. */
|
|
397
|
+
export declare const outbox: ({ tenant, limit }: Page) => Effect.Effect<{
|
|
398
|
+
outbox: {
|
|
399
|
+
actorType: string;
|
|
400
|
+
actorId: string;
|
|
401
|
+
intentId: string;
|
|
402
|
+
timerKey: string | null;
|
|
403
|
+
targetType: string;
|
|
404
|
+
targetId: string;
|
|
405
|
+
command: string;
|
|
406
|
+
attempts: number;
|
|
407
|
+
lastError: string | null;
|
|
408
|
+
dueAtMs: number;
|
|
409
|
+
payload: {
|
|
410
|
+
readonly json: Schema.Json;
|
|
411
|
+
} | {
|
|
412
|
+
readonly undecodable: string;
|
|
413
|
+
} | null;
|
|
414
|
+
caller: {
|
|
415
|
+
readonly json: Schema.Json;
|
|
416
|
+
} | {
|
|
417
|
+
readonly undecodable: string;
|
|
418
|
+
} | null;
|
|
419
|
+
}[];
|
|
420
|
+
}, import("effect/sql/SqlError").SqlError, SqlClient.SqlClient>;
|
|
421
|
+
/** The tenant's enqueued jobs not yet settled, soonest first. */
|
|
422
|
+
export declare const jobs: ({ tenant, limit }: Page) => Effect.Effect<{
|
|
423
|
+
jobs: {
|
|
424
|
+
actorType: string;
|
|
425
|
+
actorId: string;
|
|
426
|
+
jobId: string;
|
|
427
|
+
job: string;
|
|
428
|
+
attempts: number;
|
|
429
|
+
lastError: string | null;
|
|
430
|
+
ambiguous: boolean;
|
|
431
|
+
dueAtMs: number;
|
|
432
|
+
payload: {
|
|
433
|
+
readonly json: Schema.Json;
|
|
434
|
+
} | {
|
|
435
|
+
readonly undecodable: string;
|
|
436
|
+
} | null;
|
|
437
|
+
caller: {
|
|
438
|
+
readonly json: Schema.Json;
|
|
439
|
+
} | {
|
|
440
|
+
readonly undecodable: string;
|
|
441
|
+
} | null;
|
|
442
|
+
}[];
|
|
443
|
+
}, import("effect/sql/SqlError").SqlError, SqlClient.SqlClient>;
|
|
444
|
+
/** A tenant-wide keyset page of dead letters. */
|
|
445
|
+
interface DeadLettersPage extends Page {
|
|
446
|
+
/** Keyset cursor: the last dead letter of the previous page. */
|
|
447
|
+
readonly after?: {
|
|
448
|
+
readonly deadAtMs: number;
|
|
449
|
+
readonly jobId: string;
|
|
450
|
+
} | undefined;
|
|
451
|
+
}
|
|
452
|
+
/** The tenant's dead letters, newest first, one page after `after`. */
|
|
453
|
+
export declare const deadLetters: ({ tenant, limit, after }: DeadLettersPage) => Effect.Effect<{
|
|
454
|
+
deadLetters: {
|
|
455
|
+
actorType: string;
|
|
456
|
+
actorId: string;
|
|
457
|
+
jobId: string;
|
|
458
|
+
job: string;
|
|
459
|
+
attempts: number;
|
|
460
|
+
cause: string;
|
|
461
|
+
ambiguous: boolean;
|
|
462
|
+
deadAtMs: number;
|
|
463
|
+
payload: {
|
|
464
|
+
readonly json: Schema.Json;
|
|
465
|
+
} | {
|
|
466
|
+
readonly undecodable: string;
|
|
467
|
+
} | null;
|
|
468
|
+
}[];
|
|
469
|
+
next: {
|
|
470
|
+
deadAtMs: number;
|
|
471
|
+
jobId: string;
|
|
472
|
+
} | null;
|
|
473
|
+
}, import("effect/sql/SqlError").SqlError, SqlClient.SqlClient>;
|
|
474
|
+
/** A tenant-wide keyset page of workflow executions. */
|
|
475
|
+
interface WorkflowsPage extends Page {
|
|
476
|
+
/**
|
|
477
|
+
* `open` is every execution not yet finished; `running`, `suspended` and
|
|
478
|
+
* `finished` name one stored status; `completed` and `failed` are finished
|
|
479
|
+
* executions whose result is, or is not, a success.
|
|
480
|
+
*/
|
|
481
|
+
readonly status: "open" | "all" | "running" | "suspended" | "finished" | "completed" | "failed";
|
|
482
|
+
/** Keyset cursor: the last execution of the previous page. */
|
|
483
|
+
readonly after?: {
|
|
484
|
+
readonly startedAtMs: number;
|
|
485
|
+
readonly executionId: string;
|
|
486
|
+
} | undefined;
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* The tenant's workflow executions, newest first, one page after `after`, each
|
|
490
|
+
* with its recorded steps. The steps are read for the same page of executions,
|
|
491
|
+
* so each listed execution has all its steps. A finished execution's result
|
|
492
|
+
* is compressed, so `completed` and `failed` read finished executions
|
|
493
|
+
* `MAX_LIMIT` at a time and keep those whose result matches until the page is
|
|
494
|
+
* full; a result that does not decode matches neither.
|
|
495
|
+
*/
|
|
496
|
+
export declare const workflows: ({ tenant, limit, status, after }: WorkflowsPage) => Effect.Effect<{
|
|
497
|
+
workflows: {
|
|
498
|
+
actorType: string;
|
|
499
|
+
actorId: string;
|
|
500
|
+
executionId: string;
|
|
501
|
+
workflow: string;
|
|
502
|
+
workflowKey: string;
|
|
503
|
+
manifestHash: string;
|
|
504
|
+
status: string;
|
|
505
|
+
interrupt: boolean;
|
|
506
|
+
payloadBytes: number;
|
|
507
|
+
resultBytes: number | null;
|
|
508
|
+
startedAtMs: number;
|
|
509
|
+
finishedAtMs: number | null;
|
|
510
|
+
caller: {
|
|
511
|
+
readonly json: Schema.Json;
|
|
512
|
+
} | {
|
|
513
|
+
readonly undecodable: string;
|
|
514
|
+
} | null;
|
|
515
|
+
payload: {
|
|
516
|
+
readonly json: Schema.Json;
|
|
517
|
+
} | {
|
|
518
|
+
readonly undecodable: string;
|
|
519
|
+
} | null;
|
|
520
|
+
result: {
|
|
521
|
+
readonly json: Schema.Json;
|
|
522
|
+
} | {
|
|
523
|
+
readonly undecodable: string;
|
|
524
|
+
} | null;
|
|
525
|
+
steps: {
|
|
526
|
+
step: string;
|
|
527
|
+
attempt: number;
|
|
528
|
+
kind: string;
|
|
529
|
+
exit: {
|
|
530
|
+
readonly json: Schema.Json;
|
|
531
|
+
} | {
|
|
532
|
+
readonly undecodable: string;
|
|
533
|
+
} | null;
|
|
534
|
+
waitEvent: string | null;
|
|
535
|
+
version: number | null;
|
|
536
|
+
dueAtMs: number | null;
|
|
537
|
+
startedAtMs: number;
|
|
538
|
+
settledAtMs: number | null;
|
|
539
|
+
}[];
|
|
540
|
+
}[];
|
|
541
|
+
next: {
|
|
542
|
+
startedAtMs: number;
|
|
543
|
+
executionId: string;
|
|
544
|
+
} | null;
|
|
545
|
+
}, import("effect/sql/SqlError").SqlError, SqlClient.SqlClient>;
|
|
546
|
+
/** A keyset page of names, optionally one name only or those starting with a prefix. */
|
|
547
|
+
interface NamesPage extends Page {
|
|
548
|
+
/** Reads only this name. */
|
|
549
|
+
readonly name?: string | undefined;
|
|
550
|
+
/** Reads only names starting with it. */
|
|
551
|
+
readonly prefix?: string | undefined;
|
|
552
|
+
/** Keyset cursor: the last name of the previous page. */
|
|
553
|
+
readonly after?: string | undefined;
|
|
554
|
+
}
|
|
555
|
+
/** The tenant's actor types by name, each with how many actors it has, one page after `after`. */
|
|
556
|
+
export declare const actorTypes: ({ tenant, limit, name, prefix, after }: NamesPage) => Effect.Effect<{
|
|
557
|
+
actorTypes: {
|
|
558
|
+
readonly actorType: string;
|
|
559
|
+
readonly actors: number;
|
|
560
|
+
}[];
|
|
561
|
+
next: string | null;
|
|
562
|
+
}, import("effect/sql/SqlError").SqlError, SqlClient.SqlClient>;
|
|
563
|
+
/**
|
|
564
|
+
* The tenant's job names, each with its pending jobs split by whether an
|
|
565
|
+
* attempt has failed, and its dead letters, one page after `after`.
|
|
566
|
+
*/
|
|
567
|
+
export declare const jobTypes: ({ tenant, limit, after }: NamesPage) => Effect.Effect<{
|
|
568
|
+
jobTypes: {
|
|
569
|
+
readonly job: string;
|
|
570
|
+
readonly queued: number;
|
|
571
|
+
readonly retrying: number;
|
|
572
|
+
readonly deadLetters: number;
|
|
573
|
+
}[];
|
|
574
|
+
next: string | null;
|
|
575
|
+
}, import("effect/sql/SqlError").SqlError, SqlClient.SqlClient>;
|
|
576
|
+
/** A keyset page of receipts: one actor's, one type's or the whole tenant's. */
|
|
577
|
+
interface ReceiptsPage extends Page {
|
|
578
|
+
readonly actorType?: string | undefined;
|
|
579
|
+
/** Reads one actor, of `actorType`. */
|
|
580
|
+
readonly actorId?: string | undefined;
|
|
581
|
+
readonly outcomeTag?: "Success" | "Failure" | undefined;
|
|
582
|
+
/** Keyset cursor: the last receipt of the previous page. */
|
|
583
|
+
readonly after?: (ActorIdentity & {
|
|
584
|
+
readonly expiresAtMs: number;
|
|
585
|
+
readonly commandId: string;
|
|
586
|
+
}) | undefined;
|
|
587
|
+
}
|
|
588
|
+
type TenantReceiptRow = ReceiptRow & ActorIdentity;
|
|
589
|
+
/**
|
|
590
|
+
* Receipts, the latest expiry first, one page after `after`, each with the
|
|
591
|
+
* events it committed. A receipt's expiry is the one its command id carries,
|
|
592
|
+
* so this is the order the command ids were issued in, not the order the
|
|
593
|
+
* turns committed. `None` when the page names one actor the tenant does not
|
|
594
|
+
* have.
|
|
595
|
+
*/
|
|
596
|
+
export declare const receipts: (page: ReceiptsPage) => Effect.Effect<Option.None<{
|
|
597
|
+
receipts: (Omit<TenantReceiptRow, "callerKey" | "events" | "outcome"> & {
|
|
598
|
+
callerKey: {
|
|
599
|
+
readonly json: Schema.Json;
|
|
600
|
+
} | {
|
|
601
|
+
readonly undecodable: string;
|
|
602
|
+
} | null;
|
|
603
|
+
outcome: {
|
|
604
|
+
readonly json: Schema.Json;
|
|
605
|
+
} | {
|
|
606
|
+
readonly undecodable: string;
|
|
607
|
+
} | null;
|
|
608
|
+
events: number[];
|
|
609
|
+
})[];
|
|
610
|
+
next: {
|
|
611
|
+
actorType: string;
|
|
612
|
+
actorId: string;
|
|
613
|
+
expiresAtMs: number;
|
|
614
|
+
commandId: string;
|
|
615
|
+
} | null;
|
|
616
|
+
}> | Option.Some<{
|
|
617
|
+
receipts: (Omit<TenantReceiptRow, "callerKey" | "events" | "outcome"> & {
|
|
618
|
+
callerKey: {
|
|
619
|
+
readonly json: Schema.Json;
|
|
620
|
+
} | {
|
|
621
|
+
readonly undecodable: string;
|
|
622
|
+
} | null;
|
|
623
|
+
outcome: {
|
|
624
|
+
readonly json: Schema.Json;
|
|
625
|
+
} | {
|
|
626
|
+
readonly undecodable: string;
|
|
627
|
+
} | null;
|
|
628
|
+
events: number[];
|
|
629
|
+
})[];
|
|
630
|
+
next: {
|
|
631
|
+
actorType: string;
|
|
632
|
+
actorId: string;
|
|
633
|
+
expiresAtMs: number;
|
|
634
|
+
commandId: string;
|
|
635
|
+
} | null;
|
|
636
|
+
}>, import("effect/sql/SqlError").SqlError, SqlClient.SqlClient>;
|
|
637
|
+
/** A keyset page of one actor's event names. */
|
|
638
|
+
interface LatestEventsPage extends ActorPage {
|
|
639
|
+
/** Keyset cursor: the last event name of the previous page. */
|
|
640
|
+
readonly after?: string | undefined;
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* The newest retained event of each name one actor emitted, by name, one page
|
|
644
|
+
* after `after`. `None` when the tenant has no such actor.
|
|
645
|
+
*/
|
|
646
|
+
export declare const latestEvents: (page: LatestEventsPage) => Effect.Effect<Option.None<{
|
|
647
|
+
events: {
|
|
648
|
+
readonly event: string;
|
|
649
|
+
readonly sequence: number;
|
|
650
|
+
readonly emittedAtMs: number;
|
|
651
|
+
}[];
|
|
652
|
+
next: string | null;
|
|
653
|
+
}> | Option.Some<{
|
|
654
|
+
events: {
|
|
655
|
+
readonly event: string;
|
|
656
|
+
readonly sequence: number;
|
|
657
|
+
readonly emittedAtMs: number;
|
|
658
|
+
}[];
|
|
659
|
+
next: string | null;
|
|
660
|
+
}>, import("effect/sql/SqlError").SqlError, SqlClient.SqlClient>;
|
|
661
|
+
/** A keyset page of one actor's timeline. */
|
|
662
|
+
interface TimelinePage extends ActorPage {
|
|
663
|
+
/** Keyset cursor: the last entry of the previous page. */
|
|
664
|
+
readonly before?: {
|
|
665
|
+
readonly sequence: number;
|
|
666
|
+
readonly kind: "command" | "event";
|
|
667
|
+
} | undefined;
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* One actor's timeline, newest first, one page after `before`: every retained
|
|
671
|
+
* event at its emission time, and every retained receipt whose turn emitted
|
|
672
|
+
* events, at that turn's emission time and placed after its own events. A
|
|
673
|
+
* receipt whose turn emitted nothing has no recorded time, so it is not on the
|
|
674
|
+
* timeline. Event sequences only grow, so they order the timeline exactly.
|
|
675
|
+
* `None` when the tenant has no such actor.
|
|
676
|
+
*/
|
|
677
|
+
export declare const timeline: (page: TimelinePage) => Effect.Effect<Option.None<{
|
|
678
|
+
entries: {
|
|
679
|
+
kind: "command" | "event";
|
|
680
|
+
sequence: number;
|
|
681
|
+
name: string;
|
|
682
|
+
commandId: string;
|
|
683
|
+
atMs: number;
|
|
684
|
+
callerKey: {
|
|
685
|
+
readonly json: Schema.Json;
|
|
686
|
+
} | {
|
|
687
|
+
readonly undecodable: string;
|
|
688
|
+
} | null;
|
|
689
|
+
}[];
|
|
690
|
+
next: {
|
|
691
|
+
sequence: number;
|
|
692
|
+
kind: "command" | "event";
|
|
693
|
+
} | null;
|
|
694
|
+
}> | Option.Some<{
|
|
695
|
+
entries: {
|
|
696
|
+
kind: "command" | "event";
|
|
697
|
+
sequence: number;
|
|
698
|
+
name: string;
|
|
699
|
+
commandId: string;
|
|
700
|
+
atMs: number;
|
|
701
|
+
callerKey: {
|
|
702
|
+
readonly json: Schema.Json;
|
|
703
|
+
} | {
|
|
704
|
+
readonly undecodable: string;
|
|
705
|
+
} | null;
|
|
706
|
+
}[];
|
|
707
|
+
next: {
|
|
708
|
+
sequence: number;
|
|
709
|
+
kind: "command" | "event";
|
|
710
|
+
} | null;
|
|
711
|
+
}>, import("effect/sql/SqlError").SqlError, SqlClient.SqlClient>;
|