rivetkit 2.0.2 → 2.0.4-rc.1
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 +3 -5
- package/dist/browser/client.d.ts +2485 -0
- package/dist/browser/client.js +5182 -0
- package/dist/browser/client.js.map +1 -0
- package/dist/browser/inspector/client.d.ts +130 -0
- package/dist/browser/inspector/client.js +2854 -0
- package/dist/browser/inspector/client.js.map +1 -0
- package/dist/browser/v3-DnYObHH3.d.ts +279 -0
- package/dist/inspector.tar.gz +0 -0
- package/dist/schemas/actor-inspector/v1.ts +784 -0
- package/dist/schemas/actor-inspector/v2.ts +796 -0
- package/dist/schemas/actor-inspector/v3.ts +899 -0
- package/dist/schemas/actor-persist/v1.ts +225 -0
- package/dist/schemas/actor-persist/v2.ts +268 -0
- package/dist/schemas/actor-persist/v3.ts +280 -0
- package/dist/schemas/actor-persist/v4.ts +406 -0
- package/dist/schemas/client-protocol/v1.ts +441 -0
- package/dist/schemas/client-protocol/v2.ts +438 -0
- package/dist/schemas/client-protocol/v3.ts +554 -0
- package/dist/schemas/file-system-driver/v1.ts +108 -0
- package/dist/schemas/file-system-driver/v2.ts +142 -0
- package/dist/schemas/file-system-driver/v3.ts +167 -0
- package/dist/schemas/persist/v1.ts +781 -0
- package/dist/schemas/transport/v1.ts +697 -0
- package/dist/tsup/actor/errors.cjs +106 -0
- package/dist/tsup/actor/errors.cjs.map +1 -0
- package/dist/tsup/actor/errors.d.cts +188 -0
- package/dist/tsup/actor/errors.d.ts +188 -0
- package/dist/tsup/actor/errors.js +106 -0
- package/dist/tsup/actor/errors.js.map +1 -0
- package/dist/tsup/actor-router-consts-D29T1Z-K.d.cts +24 -0
- package/dist/tsup/actor-router-consts-D29T1Z-K.d.ts +24 -0
- package/dist/tsup/chunk-325TLXJT.js +1060 -0
- package/dist/tsup/chunk-325TLXJT.js.map +1 -0
- package/dist/tsup/chunk-424PT5DM.js +23 -0
- package/dist/tsup/chunk-424PT5DM.js.map +1 -0
- package/dist/tsup/chunk-4JVIG3SS.cjs +6289 -0
- package/dist/tsup/chunk-4JVIG3SS.cjs.map +1 -0
- package/dist/tsup/chunk-6LJAZ5R4.cjs +96 -0
- package/dist/tsup/chunk-6LJAZ5R4.cjs.map +1 -0
- package/dist/tsup/chunk-6XU3FMCB.cjs +534 -0
- package/dist/tsup/chunk-6XU3FMCB.cjs.map +1 -0
- package/dist/tsup/chunk-7HTNH26M.js +509 -0
- package/dist/tsup/chunk-7HTNH26M.js.map +1 -0
- package/dist/tsup/chunk-AUVH72RE.cjs +5977 -0
- package/dist/tsup/chunk-AUVH72RE.cjs.map +1 -0
- package/dist/tsup/chunk-D4BYUPNQ.js +645 -0
- package/dist/tsup/chunk-D4BYUPNQ.js.map +1 -0
- package/dist/tsup/chunk-HDQ2JUQT.cjs +23 -0
- package/dist/tsup/chunk-HDQ2JUQT.cjs.map +1 -0
- package/dist/tsup/chunk-HHXX2VRM.js +6289 -0
- package/dist/tsup/chunk-HHXX2VRM.js.map +1 -0
- package/dist/tsup/chunk-JEAEA2PB.js +49 -0
- package/dist/tsup/chunk-JEAEA2PB.js.map +1 -0
- package/dist/tsup/chunk-JYSEG3VF.cjs +642 -0
- package/dist/tsup/chunk-JYSEG3VF.cjs.map +1 -0
- package/dist/tsup/chunk-K6DGYILQ.js +2657 -0
- package/dist/tsup/chunk-K6DGYILQ.js.map +1 -0
- package/dist/tsup/chunk-KJSYAUOM.js +96 -0
- package/dist/tsup/chunk-KJSYAUOM.js.map +1 -0
- package/dist/tsup/chunk-L47L3ZWJ.cjs +509 -0
- package/dist/tsup/chunk-L47L3ZWJ.cjs.map +1 -0
- package/dist/tsup/chunk-LXUQ667X.js +2006 -0
- package/dist/tsup/chunk-LXUQ667X.js.map +1 -0
- package/dist/tsup/chunk-MXNPAB5W.js +5977 -0
- package/dist/tsup/chunk-MXNPAB5W.js.map +1 -0
- package/dist/tsup/chunk-N4KRDJ56.js +72 -0
- package/dist/tsup/chunk-N4KRDJ56.js.map +1 -0
- package/dist/tsup/chunk-NIYZDWMW.cjs +2006 -0
- package/dist/tsup/chunk-NIYZDWMW.cjs.map +1 -0
- package/dist/tsup/chunk-PQZHDKRW.cjs +1060 -0
- package/dist/tsup/chunk-PQZHDKRW.cjs.map +1 -0
- package/dist/tsup/chunk-PVOE6BU7.cjs +1050 -0
- package/dist/tsup/chunk-PVOE6BU7.cjs.map +1 -0
- package/dist/tsup/chunk-Q4UD2GA4.cjs +1810 -0
- package/dist/tsup/chunk-Q4UD2GA4.cjs.map +1 -0
- package/dist/tsup/chunk-QUD664YZ.js +1810 -0
- package/dist/tsup/chunk-QUD664YZ.js.map +1 -0
- package/dist/tsup/chunk-RTOCTWME.js +1050 -0
- package/dist/tsup/chunk-RTOCTWME.js.map +1 -0
- package/dist/tsup/chunk-SAZZ4SB2.cjs +2657 -0
- package/dist/tsup/chunk-SAZZ4SB2.cjs.map +1 -0
- package/dist/tsup/chunk-SR3KQE7Q.cjs +72 -0
- package/dist/tsup/chunk-SR3KQE7Q.cjs.map +1 -0
- package/dist/tsup/chunk-V2GHLYC6.cjs +49 -0
- package/dist/tsup/chunk-V2GHLYC6.cjs.map +1 -0
- package/dist/tsup/chunk-V3WG7XTW.cjs +645 -0
- package/dist/tsup/chunk-V3WG7XTW.cjs.map +1 -0
- package/dist/tsup/chunk-VKVNIQRQ.js +257 -0
- package/dist/tsup/chunk-VKVNIQRQ.js.map +1 -0
- package/dist/tsup/chunk-WMPW7JYC.js +642 -0
- package/dist/tsup/chunk-WMPW7JYC.js.map +1 -0
- package/dist/tsup/chunk-Z7HNQ2WF.js +534 -0
- package/dist/tsup/chunk-Z7HNQ2WF.js.map +1 -0
- package/dist/tsup/chunk-ZFY5J2EP.cjs +257 -0
- package/dist/tsup/chunk-ZFY5J2EP.cjs.map +1 -0
- package/dist/tsup/client/mod.cjs +33 -0
- package/dist/tsup/client/mod.cjs.map +1 -0
- package/dist/tsup/client/mod.d.cts +64 -0
- package/dist/tsup/client/mod.d.ts +64 -0
- package/dist/tsup/client/mod.js +33 -0
- package/dist/tsup/client/mod.js.map +1 -0
- package/dist/tsup/common/log.cjs +21 -0
- package/dist/tsup/common/log.cjs.map +1 -0
- package/dist/tsup/common/log.d.cts +34 -0
- package/dist/tsup/common/log.d.ts +34 -0
- package/dist/tsup/common/log.js +21 -0
- package/dist/tsup/common/log.js.map +1 -0
- package/dist/tsup/common/websocket.cjs +10 -0
- package/dist/tsup/common/websocket.cjs.map +1 -0
- package/dist/tsup/common/websocket.d.cts +3 -0
- package/dist/tsup/common/websocket.d.ts +3 -0
- package/dist/tsup/common/websocket.js +10 -0
- package/dist/tsup/common/websocket.js.map +1 -0
- package/dist/tsup/config-BiNoIHRs.d.cts +80 -0
- package/dist/tsup/config-BiNoIHRs.d.ts +80 -0
- package/dist/tsup/config-P3XujgRr.d.ts +2594 -0
- package/dist/tsup/config-_gfywqqI.d.cts +2594 -0
- package/dist/tsup/context-Bxd8Cx4H.d.cts +75 -0
- package/dist/tsup/context-uNA4TRn3.d.ts +75 -0
- package/dist/tsup/db/drizzle/mod.cjs +49 -0
- package/dist/tsup/db/drizzle/mod.cjs.map +1 -0
- package/dist/tsup/db/drizzle/mod.d.cts +17 -0
- package/dist/tsup/db/drizzle/mod.d.ts +17 -0
- package/dist/tsup/db/drizzle/mod.js +49 -0
- package/dist/tsup/db/drizzle/mod.js.map +1 -0
- package/dist/tsup/db/mod.cjs +9 -0
- package/dist/tsup/db/mod.cjs.map +1 -0
- package/dist/tsup/db/mod.d.cts +9 -0
- package/dist/tsup/db/mod.d.ts +9 -0
- package/dist/tsup/db/mod.js +9 -0
- package/dist/tsup/db/mod.js.map +1 -0
- package/dist/tsup/driver-BcLvZcKl.d.cts +13 -0
- package/dist/tsup/driver-CPGHKXyh.d.ts +13 -0
- package/dist/tsup/driver-helpers/mod.cjs +53 -0
- package/dist/tsup/driver-helpers/mod.cjs.map +1 -0
- package/dist/tsup/driver-helpers/mod.d.cts +47 -0
- package/dist/tsup/driver-helpers/mod.d.ts +47 -0
- package/dist/tsup/driver-helpers/mod.js +53 -0
- package/dist/tsup/driver-helpers/mod.js.map +1 -0
- package/dist/tsup/driver-test-suite/mod.cjs +4974 -0
- package/dist/tsup/driver-test-suite/mod.cjs.map +1 -0
- package/dist/tsup/driver-test-suite/mod.d.cts +73 -0
- package/dist/tsup/driver-test-suite/mod.d.ts +73 -0
- package/dist/tsup/driver-test-suite/mod.js +4974 -0
- package/dist/tsup/driver-test-suite/mod.js.map +1 -0
- package/dist/tsup/inspector/mod.cjs +164 -0
- package/dist/tsup/inspector/mod.cjs.map +1 -0
- package/dist/tsup/inspector/mod.d.cts +130 -0
- package/dist/tsup/inspector/mod.d.ts +130 -0
- package/dist/tsup/inspector/mod.js +164 -0
- package/dist/tsup/inspector/mod.js.map +1 -0
- package/dist/tsup/keys-CydblqMh.d.cts +13 -0
- package/dist/tsup/keys-CydblqMh.d.ts +13 -0
- package/dist/tsup/mod.cjs +82 -0
- package/dist/tsup/mod.cjs.map +1 -0
- package/dist/tsup/mod.d.cts +126 -0
- package/dist/tsup/mod.d.ts +126 -0
- package/dist/tsup/mod.js +82 -0
- package/dist/tsup/mod.js.map +1 -0
- package/dist/tsup/serve-test-suite/mod.cjs +2601 -0
- package/dist/tsup/serve-test-suite/mod.cjs.map +1 -0
- package/dist/tsup/serve-test-suite/mod.d.cts +9 -0
- package/dist/tsup/serve-test-suite/mod.d.ts +9 -0
- package/dist/tsup/serve-test-suite/mod.js +2601 -0
- package/dist/tsup/serve-test-suite/mod.js.map +1 -0
- package/dist/tsup/test/mod.cjs +90 -0
- package/dist/tsup/test/mod.cjs.map +1 -0
- package/dist/tsup/test/mod.d.cts +26 -0
- package/dist/tsup/test/mod.d.ts +26 -0
- package/dist/tsup/test/mod.js +90 -0
- package/dist/tsup/test/mod.js.map +1 -0
- package/dist/tsup/utils-fwx3o3K9.d.cts +18 -0
- package/dist/tsup/utils-fwx3o3K9.d.ts +18 -0
- package/dist/tsup/utils.cjs +43 -0
- package/dist/tsup/utils.cjs.map +1 -0
- package/dist/tsup/utils.d.cts +148 -0
- package/dist/tsup/utils.d.ts +148 -0
- package/dist/tsup/utils.js +43 -0
- package/dist/tsup/utils.js.map +1 -0
- package/dist/tsup/v3-DnYObHH3.d.cts +279 -0
- package/dist/tsup/v3-DnYObHH3.d.ts +279 -0
- package/dist/tsup/workflow/mod.cjs +16 -0
- package/dist/tsup/workflow/mod.cjs.map +1 -0
- package/dist/tsup/workflow/mod.d.cts +25 -0
- package/dist/tsup/workflow/mod.d.ts +25 -0
- package/dist/tsup/workflow/mod.js +16 -0
- package/dist/tsup/workflow/mod.js.map +1 -0
- package/package.json +293 -5
- package/src/actor/config.ts +1221 -0
- package/src/actor/conn/driver.ts +61 -0
- package/src/actor/conn/drivers/http.ts +17 -0
- package/src/actor/conn/drivers/raw-request.ts +24 -0
- package/src/actor/conn/drivers/raw-websocket.ts +65 -0
- package/src/actor/conn/drivers/websocket.ts +144 -0
- package/src/actor/conn/mod.ts +288 -0
- package/src/actor/conn/persisted.ts +81 -0
- package/src/actor/conn/state-manager.ts +196 -0
- package/src/actor/contexts/action.ts +47 -0
- package/src/actor/contexts/base/actor.ts +347 -0
- package/src/actor/contexts/base/conn-init.ts +68 -0
- package/src/actor/contexts/base/conn.ts +73 -0
- package/src/actor/contexts/before-action-response.ts +42 -0
- package/src/actor/contexts/before-connect.ts +31 -0
- package/src/actor/contexts/connect.ts +42 -0
- package/src/actor/contexts/create-conn-state.ts +32 -0
- package/src/actor/contexts/create-vars.ts +39 -0
- package/src/actor/contexts/create.ts +39 -0
- package/src/actor/contexts/destroy.ts +42 -0
- package/src/actor/contexts/disconnect.ts +43 -0
- package/src/actor/contexts/index.ts +33 -0
- package/src/actor/contexts/request.ts +80 -0
- package/src/actor/contexts/run.ts +47 -0
- package/src/actor/contexts/sleep.ts +42 -0
- package/src/actor/contexts/state-change.ts +42 -0
- package/src/actor/contexts/wake.ts +42 -0
- package/src/actor/contexts/websocket.ts +80 -0
- package/src/actor/database.ts +13 -0
- package/src/actor/definition.ts +64 -0
- package/src/actor/driver.ts +114 -0
- package/src/actor/errors.ts +556 -0
- package/src/actor/instance/connection-manager.ts +574 -0
- package/src/actor/instance/event-manager.ts +314 -0
- package/src/actor/instance/keys.ts +146 -0
- package/src/actor/instance/kv.ts +241 -0
- package/src/actor/instance/mod.ts +1658 -0
- package/src/actor/instance/persisted.ts +67 -0
- package/src/actor/instance/queue-manager.ts +603 -0
- package/src/actor/instance/queue.ts +345 -0
- package/src/actor/instance/schedule-manager.ts +392 -0
- package/src/actor/instance/state-manager.ts +542 -0
- package/src/actor/instance/traces-driver.ts +128 -0
- package/src/actor/keys.test.ts +275 -0
- package/src/actor/keys.ts +89 -0
- package/src/actor/log.ts +6 -0
- package/src/actor/mod.ts +110 -0
- package/src/actor/protocol/old.ts +416 -0
- package/src/actor/protocol/serde.ts +222 -0
- package/src/actor/router-endpoints.ts +400 -0
- package/src/actor/router-websocket-endpoints.test.ts +54 -0
- package/src/actor/router-websocket-endpoints.ts +405 -0
- package/src/actor/router.ts +380 -0
- package/src/actor/schedule.ts +17 -0
- package/src/actor/schema.ts +291 -0
- package/src/actor/utils.test.ts +48 -0
- package/src/actor/utils.ts +158 -0
- package/src/client/actor-common.ts +32 -0
- package/src/client/actor-conn.ts +1262 -0
- package/src/client/actor-handle.ts +344 -0
- package/src/client/actor-query.ts +112 -0
- package/src/client/client.ts +558 -0
- package/src/client/config.ts +151 -0
- package/src/client/errors.ts +76 -0
- package/src/client/log.ts +5 -0
- package/src/client/mod.browser.ts +2 -0
- package/src/client/mod.ts +70 -0
- package/src/client/queue.ts +146 -0
- package/src/client/raw-utils.ts +149 -0
- package/src/client/test.ts +44 -0
- package/src/client/utils.ts +252 -0
- package/src/common/actor-router-consts.ts +59 -0
- package/src/common/cors.ts +57 -0
- package/src/common/eventsource-interface.ts +47 -0
- package/src/common/eventsource.ts +44 -0
- package/src/common/inline-websocket-adapter.ts +154 -0
- package/src/common/log-levels.ts +27 -0
- package/src/common/log.ts +229 -0
- package/src/common/logfmt.ts +221 -0
- package/src/common/network.ts +2 -0
- package/src/common/router.ts +174 -0
- package/src/common/utils.ts +339 -0
- package/src/common/websocket-interface.ts +7 -0
- package/src/common/websocket.ts +43 -0
- package/src/db/config.ts +100 -0
- package/src/db/drizzle/mod.ts +226 -0
- package/src/db/drizzle/sqlite-core.ts +22 -0
- package/src/db/mod.ts +125 -0
- package/src/db/shared.ts +92 -0
- package/src/db/sqlite-vfs.ts +12 -0
- package/src/devtools-loader/index.ts +33 -0
- package/src/devtools-loader/log.ts +5 -0
- package/src/driver-helpers/mod.ts +33 -0
- package/src/driver-helpers/utils.ts +54 -0
- package/src/driver-test-suite/log.ts +5 -0
- package/src/driver-test-suite/mod.ts +293 -0
- package/src/driver-test-suite/test-inline-client-driver.ts +307 -0
- package/src/driver-test-suite/tests/access-control.ts +218 -0
- package/src/driver-test-suite/tests/action-features.ts +203 -0
- package/src/driver-test-suite/tests/actor-conn-hibernation.ts +152 -0
- package/src/driver-test-suite/tests/actor-conn-state.ts +300 -0
- package/src/driver-test-suite/tests/actor-conn.ts +596 -0
- package/src/driver-test-suite/tests/actor-db-raw.ts +73 -0
- package/src/driver-test-suite/tests/actor-db.ts +477 -0
- package/src/driver-test-suite/tests/actor-destroy.ts +294 -0
- package/src/driver-test-suite/tests/actor-driver.ts +18 -0
- package/src/driver-test-suite/tests/actor-error-handling.ts +150 -0
- package/src/driver-test-suite/tests/actor-handle.ts +312 -0
- package/src/driver-test-suite/tests/actor-inline-client.ts +163 -0
- package/src/driver-test-suite/tests/actor-inspector.ts +264 -0
- package/src/driver-test-suite/tests/actor-kv.ts +65 -0
- package/src/driver-test-suite/tests/actor-metadata.ts +116 -0
- package/src/driver-test-suite/tests/actor-onstatechange.ts +95 -0
- package/src/driver-test-suite/tests/actor-queue.ts +325 -0
- package/src/driver-test-suite/tests/actor-run.ts +181 -0
- package/src/driver-test-suite/tests/actor-schedule.ts +97 -0
- package/src/driver-test-suite/tests/actor-sleep.ts +415 -0
- package/src/driver-test-suite/tests/actor-state.ts +54 -0
- package/src/driver-test-suite/tests/actor-stateless.ts +70 -0
- package/src/driver-test-suite/tests/actor-vars.ts +97 -0
- package/src/driver-test-suite/tests/actor-workflow.ts +118 -0
- package/src/driver-test-suite/tests/manager-driver.ts +388 -0
- package/src/driver-test-suite/tests/raw-http-direct-registry.ts +227 -0
- package/src/driver-test-suite/tests/raw-http-request-properties.ts +454 -0
- package/src/driver-test-suite/tests/raw-http.ts +359 -0
- package/src/driver-test-suite/tests/raw-websocket-direct-registry.ts +393 -0
- package/src/driver-test-suite/tests/raw-websocket.ts +513 -0
- package/src/driver-test-suite/tests/request-access.ts +240 -0
- package/src/driver-test-suite/utils.ts +80 -0
- package/src/drivers/default.ts +38 -0
- package/src/drivers/engine/actor-driver.ts +1027 -0
- package/src/drivers/engine/config.ts +43 -0
- package/src/drivers/engine/log.ts +5 -0
- package/src/drivers/engine/mod.ts +36 -0
- package/src/drivers/file-system/actor.ts +102 -0
- package/src/drivers/file-system/global-state.ts +1445 -0
- package/src/drivers/file-system/kv-limits.ts +70 -0
- package/src/drivers/file-system/log.ts +5 -0
- package/src/drivers/file-system/manager.ts +300 -0
- package/src/drivers/file-system/mod.ts +78 -0
- package/src/drivers/file-system/sqlite-runtime.ts +210 -0
- package/src/drivers/file-system/utils.ts +125 -0
- package/src/engine-process/constants.ts +2 -0
- package/src/engine-process/log.ts +5 -0
- package/src/engine-process/mod.ts +464 -0
- package/src/globals.d.ts +35 -0
- package/src/inspector/actor-inspector.ts +352 -0
- package/src/inspector/config.ts +49 -0
- package/src/inspector/handler.ts +273 -0
- package/src/inspector/log.ts +5 -0
- package/src/inspector/mod.browser.ts +8 -0
- package/src/inspector/mod.ts +4 -0
- package/src/inspector/serve-ui.ts +40 -0
- package/src/inspector/transport.ts +18 -0
- package/src/inspector/utils.ts +32 -0
- package/src/manager/driver.ts +106 -0
- package/src/manager/gateway.ts +668 -0
- package/src/manager/log.ts +5 -0
- package/src/manager/mod.ts +2 -0
- package/src/manager/protocol/mod.ts +22 -0
- package/src/manager/protocol/query.ts +85 -0
- package/src/manager/router-schema.ts +22 -0
- package/src/manager/router.ts +660 -0
- package/src/manager-api/actors.ts +83 -0
- package/src/manager-api/common.ts +4 -0
- package/src/mod.ts +24 -0
- package/src/registry/config/driver.ts +21 -0
- package/src/registry/config/index.ts +510 -0
- package/src/registry/config/legacy-runner.ts +157 -0
- package/src/registry/config/runner.ts +21 -0
- package/src/registry/config/serverless.ts +94 -0
- package/src/registry/index.ts +194 -0
- package/src/registry/log.ts +5 -0
- package/src/remote-manager-driver/actor-http-client.ts +84 -0
- package/src/remote-manager-driver/actor-websocket-client.ts +81 -0
- package/src/remote-manager-driver/api-endpoints.ts +159 -0
- package/src/remote-manager-driver/api-utils.ts +69 -0
- package/src/remote-manager-driver/log.ts +5 -0
- package/src/remote-manager-driver/metadata.ts +64 -0
- package/src/remote-manager-driver/mod.ts +414 -0
- package/src/remote-manager-driver/ws-proxy.ts +189 -0
- package/src/schemas/actor-inspector/mod.ts +1 -0
- package/src/schemas/actor-inspector/versioned.ts +233 -0
- package/src/schemas/actor-persist/mod.ts +1 -0
- package/src/schemas/actor-persist/versioned.ts +217 -0
- package/src/schemas/client-protocol/mod.ts +1 -0
- package/src/schemas/client-protocol/versioned.ts +330 -0
- package/src/schemas/client-protocol-zod/mod.ts +118 -0
- package/src/schemas/file-system-driver/mod.ts +1 -0
- package/src/schemas/file-system-driver/versioned.ts +135 -0
- package/src/schemas/persist/mod.ts +1 -0
- package/src/schemas/transport/mod.ts +1 -0
- package/src/serde.ts +138 -0
- package/src/serve-test-suite/mod.ts +148 -0
- package/src/serverless/configure.ts +82 -0
- package/src/serverless/log.ts +5 -0
- package/src/serverless/router.test.ts +299 -0
- package/src/serverless/router.ts +215 -0
- package/src/test/log.ts +5 -0
- package/src/test/mod.ts +99 -0
- package/src/utils/crypto.ts +24 -0
- package/src/utils/endpoint-parser.test.ts +202 -0
- package/src/utils/endpoint-parser.ts +124 -0
- package/src/utils/env-vars.ts +78 -0
- package/src/utils/node.ts +178 -0
- package/src/utils/router.ts +83 -0
- package/src/utils/serve.ts +212 -0
- package/src/utils.test.ts +34 -0
- package/src/utils.ts +437 -0
- package/src/workflow/constants.ts +2 -0
- package/src/workflow/context.ts +597 -0
- package/src/workflow/driver.ts +194 -0
- package/src/workflow/inspector.ts +268 -0
- package/src/workflow/mod.ts +128 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunk6XU3FMCBcjs = require('../chunk-6XU3FMCB.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
var _chunkNIYZDWMWcjs = require('../chunk-NIYZDWMW.cjs');
|
|
82
|
+
require('../chunk-PQZHDKRW.cjs');
|
|
83
|
+
require('../chunk-L47L3ZWJ.cjs');
|
|
84
|
+
require('../chunk-HDQ2JUQT.cjs');
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
exports.CURRENT_VERSION = _chunkNIYZDWMWcjs.CURRENT_VERSION; exports.TO_CLIENT_VERSIONED = _chunkNIYZDWMWcjs.TO_CLIENT_VERSIONED; exports.TO_SERVER_VERSIONED = _chunkNIYZDWMWcjs.TO_SERVER_VERSIONED; exports.decodeToClient = _chunkNIYZDWMWcjs.decodeToClient; exports.decodeToServer = _chunkNIYZDWMWcjs.decodeToServer; exports.decodeWorkflowHistoryTransport = _chunk6XU3FMCBcjs.decodeWorkflowHistoryTransport; exports.encodeToClient = _chunkNIYZDWMWcjs.encodeToClient; exports.encodeToServer = _chunkNIYZDWMWcjs.encodeToServer; exports.encodeWorkflowHistoryTransport = _chunk6XU3FMCBcjs.encodeWorkflowHistoryTransport; exports.readActionRequest = _chunkNIYZDWMWcjs.readActionRequest; exports.readActionResponse = _chunkNIYZDWMWcjs.readActionResponse; exports.readConnection = _chunkNIYZDWMWcjs.readConnection; exports.readConnectionsRequest = _chunkNIYZDWMWcjs.readConnectionsRequest; exports.readConnectionsResponse = _chunkNIYZDWMWcjs.readConnectionsResponse; exports.readConnectionsUpdated = _chunkNIYZDWMWcjs.readConnectionsUpdated; exports.readDatabaseSchemaRequest = _chunkNIYZDWMWcjs.readDatabaseSchemaRequest; exports.readDatabaseSchemaResponse = _chunkNIYZDWMWcjs.readDatabaseSchemaResponse; exports.readDatabaseTableRowsRequest = _chunkNIYZDWMWcjs.readDatabaseTableRowsRequest; exports.readDatabaseTableRowsResponse = _chunkNIYZDWMWcjs.readDatabaseTableRowsResponse; exports.readError = _chunkNIYZDWMWcjs.readError; exports.readInit = _chunkNIYZDWMWcjs.readInit; exports.readPatchStateRequest = _chunkNIYZDWMWcjs.readPatchStateRequest; exports.readQueueMessageSummary = _chunkNIYZDWMWcjs.readQueueMessageSummary; exports.readQueueRequest = _chunkNIYZDWMWcjs.readQueueRequest; exports.readQueueResponse = _chunkNIYZDWMWcjs.readQueueResponse; exports.readQueueStatus = _chunkNIYZDWMWcjs.readQueueStatus; exports.readQueueUpdated = _chunkNIYZDWMWcjs.readQueueUpdated; exports.readRpcsListRequest = _chunkNIYZDWMWcjs.readRpcsListRequest; exports.readRpcsListResponse = _chunkNIYZDWMWcjs.readRpcsListResponse; exports.readState = _chunkNIYZDWMWcjs.readState; exports.readStateRequest = _chunkNIYZDWMWcjs.readStateRequest; exports.readStateResponse = _chunkNIYZDWMWcjs.readStateResponse; exports.readStateUpdated = _chunkNIYZDWMWcjs.readStateUpdated; exports.readToClient = _chunkNIYZDWMWcjs.readToClient; exports.readToClientBody = _chunkNIYZDWMWcjs.readToClientBody; exports.readToServer = _chunkNIYZDWMWcjs.readToServer; exports.readToServerBody = _chunkNIYZDWMWcjs.readToServerBody; exports.readTraceQueryRequest = _chunkNIYZDWMWcjs.readTraceQueryRequest; exports.readTraceQueryResponse = _chunkNIYZDWMWcjs.readTraceQueryResponse; exports.readWorkflowHistory = _chunkNIYZDWMWcjs.readWorkflowHistory; exports.readWorkflowHistoryRequest = _chunkNIYZDWMWcjs.readWorkflowHistoryRequest; exports.readWorkflowHistoryResponse = _chunkNIYZDWMWcjs.readWorkflowHistoryResponse; exports.readWorkflowHistoryUpdated = _chunkNIYZDWMWcjs.readWorkflowHistoryUpdated; exports.writeActionRequest = _chunkNIYZDWMWcjs.writeActionRequest; exports.writeActionResponse = _chunkNIYZDWMWcjs.writeActionResponse; exports.writeConnection = _chunkNIYZDWMWcjs.writeConnection; exports.writeConnectionsRequest = _chunkNIYZDWMWcjs.writeConnectionsRequest; exports.writeConnectionsResponse = _chunkNIYZDWMWcjs.writeConnectionsResponse; exports.writeConnectionsUpdated = _chunkNIYZDWMWcjs.writeConnectionsUpdated; exports.writeDatabaseSchemaRequest = _chunkNIYZDWMWcjs.writeDatabaseSchemaRequest; exports.writeDatabaseSchemaResponse = _chunkNIYZDWMWcjs.writeDatabaseSchemaResponse; exports.writeDatabaseTableRowsRequest = _chunkNIYZDWMWcjs.writeDatabaseTableRowsRequest; exports.writeDatabaseTableRowsResponse = _chunkNIYZDWMWcjs.writeDatabaseTableRowsResponse; exports.writeError = _chunkNIYZDWMWcjs.writeError; exports.writeInit = _chunkNIYZDWMWcjs.writeInit; exports.writePatchStateRequest = _chunkNIYZDWMWcjs.writePatchStateRequest; exports.writeQueueMessageSummary = _chunkNIYZDWMWcjs.writeQueueMessageSummary; exports.writeQueueRequest = _chunkNIYZDWMWcjs.writeQueueRequest; exports.writeQueueResponse = _chunkNIYZDWMWcjs.writeQueueResponse; exports.writeQueueStatus = _chunkNIYZDWMWcjs.writeQueueStatus; exports.writeQueueUpdated = _chunkNIYZDWMWcjs.writeQueueUpdated; exports.writeRpcsListRequest = _chunkNIYZDWMWcjs.writeRpcsListRequest; exports.writeRpcsListResponse = _chunkNIYZDWMWcjs.writeRpcsListResponse; exports.writeState = _chunkNIYZDWMWcjs.writeState; exports.writeStateRequest = _chunkNIYZDWMWcjs.writeStateRequest; exports.writeStateResponse = _chunkNIYZDWMWcjs.writeStateResponse; exports.writeStateUpdated = _chunkNIYZDWMWcjs.writeStateUpdated; exports.writeToClient = _chunkNIYZDWMWcjs.writeToClient; exports.writeToClientBody = _chunkNIYZDWMWcjs.writeToClientBody; exports.writeToServer = _chunkNIYZDWMWcjs.writeToServer; exports.writeToServerBody = _chunkNIYZDWMWcjs.writeToServerBody; exports.writeTraceQueryRequest = _chunkNIYZDWMWcjs.writeTraceQueryRequest; exports.writeTraceQueryResponse = _chunkNIYZDWMWcjs.writeTraceQueryResponse; exports.writeWorkflowHistory = _chunkNIYZDWMWcjs.writeWorkflowHistory; exports.writeWorkflowHistoryRequest = _chunkNIYZDWMWcjs.writeWorkflowHistoryRequest; exports.writeWorkflowHistoryResponse = _chunkNIYZDWMWcjs.writeWorkflowHistoryResponse; exports.writeWorkflowHistoryUpdated = _chunkNIYZDWMWcjs.writeWorkflowHistoryUpdated;
|
|
164
|
+
//# sourceMappingURL=mod.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/rivet/rivet/rivetkit-typescript/packages/rivetkit/dist/tsup/inspector/mod.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,ovKAAC","file":"/home/runner/work/rivet/rivet/rivetkit-typescript/packages/rivetkit/dist/tsup/inspector/mod.cjs"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { T as ToClient, a as ToServer } from '../v3-DnYObHH3.cjs';
|
|
2
|
+
export { A as ActionRequest, b as ActionResponse, C as Connection, c as ConnectionsRequest, d as ConnectionsResponse, e as ConnectionsUpdated, D as DatabaseSchemaRequest, f as DatabaseSchemaResponse, g as DatabaseTableRowsRequest, h as DatabaseTableRowsResponse, E as Error, I as Init, P as PatchStateRequest, Q as QueueMessageSummary, i as QueueRequest, j as QueueResponse, k as QueueStatus, l as QueueUpdated, R as RpcsListRequest, m as RpcsListResponse, S as State, n as StateRequest, o as StateResponse, p as StateUpdated, q as ToClientBody, r as ToServerBody, s as TraceQueryRequest, t as TraceQueryResponse, W as WorkflowHistory, u as WorkflowHistoryRequest, v as WorkflowHistoryResponse, w as WorkflowHistoryUpdated, x as decodeToClient, y as decodeToServer, z as encodeToClient, B as encodeToServer, F as readActionRequest, G as readActionResponse, H as readConnection, J as readConnectionsRequest, K as readConnectionsResponse, L as readConnectionsUpdated, M as readDatabaseSchemaRequest, N as readDatabaseSchemaResponse, O as readDatabaseTableRowsRequest, U as readDatabaseTableRowsResponse, V as readError, X as readInit, Y as readPatchStateRequest, Z as readQueueMessageSummary, _ as readQueueRequest, $ as readQueueResponse, a0 as readQueueStatus, a1 as readQueueUpdated, a2 as readRpcsListRequest, a3 as readRpcsListResponse, a4 as readState, a5 as readStateRequest, a6 as readStateResponse, a7 as readStateUpdated, a8 as readToClient, a9 as readToClientBody, aa as readToServer, ab as readToServerBody, ac as readTraceQueryRequest, ad as readTraceQueryResponse, ae as readWorkflowHistory, af as readWorkflowHistoryRequest, ag as readWorkflowHistoryResponse, ah as readWorkflowHistoryUpdated, ai as uint, aj as writeActionRequest, ak as writeActionResponse, al as writeConnection, am as writeConnectionsRequest, an as writeConnectionsResponse, ao as writeConnectionsUpdated, ap as writeDatabaseSchemaRequest, aq as writeDatabaseSchemaResponse, ar as writeDatabaseTableRowsRequest, as as writeDatabaseTableRowsResponse, at as writeError, au as writeInit, av as writePatchStateRequest, aw as writeQueueMessageSummary, ax as writeQueueRequest, ay as writeQueueResponse, az as writeQueueStatus, aA as writeQueueUpdated, aB as writeRpcsListRequest, aC as writeRpcsListResponse, aD as writeState, aE as writeStateRequest, aF as writeStateResponse, aG as writeStateUpdated, aH as writeToClient, aI as writeToClientBody, aJ as writeToServer, aK as writeToServerBody, aL as writeTraceQueryRequest, aM as writeTraceQueryResponse, aN as writeWorkflowHistory, aO as writeWorkflowHistoryRequest, aP as writeWorkflowHistoryResponse, aQ as writeWorkflowHistoryUpdated } from '../v3-DnYObHH3.cjs';
|
|
3
|
+
import * as vbare from 'vbare';
|
|
4
|
+
import '@rivetkit/bare-ts';
|
|
5
|
+
|
|
6
|
+
declare const CURRENT_VERSION = 3;
|
|
7
|
+
declare const TO_SERVER_VERSIONED: vbare.VersionedDataHandler<ToServer>;
|
|
8
|
+
declare const TO_CLIENT_VERSIONED: vbare.VersionedDataHandler<ToClient>;
|
|
9
|
+
|
|
10
|
+
type u32 = number;
|
|
11
|
+
type u64 = bigint;
|
|
12
|
+
type WorkflowCbor = ArrayBuffer;
|
|
13
|
+
type WorkflowNameIndex = u32;
|
|
14
|
+
type WorkflowLoopIterationMarker = {
|
|
15
|
+
readonly loop: WorkflowNameIndex;
|
|
16
|
+
readonly iteration: u32;
|
|
17
|
+
};
|
|
18
|
+
type WorkflowPathSegment = {
|
|
19
|
+
readonly tag: "WorkflowNameIndex";
|
|
20
|
+
readonly val: WorkflowNameIndex;
|
|
21
|
+
} | {
|
|
22
|
+
readonly tag: "WorkflowLoopIterationMarker";
|
|
23
|
+
readonly val: WorkflowLoopIterationMarker;
|
|
24
|
+
};
|
|
25
|
+
type WorkflowLocation = readonly WorkflowPathSegment[];
|
|
26
|
+
declare enum WorkflowEntryStatus {
|
|
27
|
+
PENDING = "PENDING",
|
|
28
|
+
RUNNING = "RUNNING",
|
|
29
|
+
COMPLETED = "COMPLETED",
|
|
30
|
+
FAILED = "FAILED",
|
|
31
|
+
EXHAUSTED = "EXHAUSTED"
|
|
32
|
+
}
|
|
33
|
+
declare enum WorkflowSleepState {
|
|
34
|
+
PENDING = "PENDING",
|
|
35
|
+
COMPLETED = "COMPLETED",
|
|
36
|
+
INTERRUPTED = "INTERRUPTED"
|
|
37
|
+
}
|
|
38
|
+
declare enum WorkflowBranchStatusType {
|
|
39
|
+
PENDING = "PENDING",
|
|
40
|
+
RUNNING = "RUNNING",
|
|
41
|
+
COMPLETED = "COMPLETED",
|
|
42
|
+
FAILED = "FAILED",
|
|
43
|
+
CANCELLED = "CANCELLED"
|
|
44
|
+
}
|
|
45
|
+
type WorkflowStepEntry = {
|
|
46
|
+
readonly output: WorkflowCbor | null;
|
|
47
|
+
readonly error: string | null;
|
|
48
|
+
};
|
|
49
|
+
type WorkflowLoopEntry = {
|
|
50
|
+
readonly state: WorkflowCbor;
|
|
51
|
+
readonly iteration: u32;
|
|
52
|
+
readonly output: WorkflowCbor | null;
|
|
53
|
+
};
|
|
54
|
+
type WorkflowSleepEntry = {
|
|
55
|
+
readonly deadline: u64;
|
|
56
|
+
readonly state: WorkflowSleepState;
|
|
57
|
+
};
|
|
58
|
+
type WorkflowMessageEntry = {
|
|
59
|
+
readonly name: string;
|
|
60
|
+
readonly messageData: WorkflowCbor;
|
|
61
|
+
};
|
|
62
|
+
type WorkflowRollbackCheckpointEntry = {
|
|
63
|
+
readonly name: string;
|
|
64
|
+
};
|
|
65
|
+
type WorkflowBranchStatus = {
|
|
66
|
+
readonly status: WorkflowBranchStatusType;
|
|
67
|
+
readonly output: WorkflowCbor | null;
|
|
68
|
+
readonly error: string | null;
|
|
69
|
+
};
|
|
70
|
+
type WorkflowJoinEntry = {
|
|
71
|
+
readonly branches: ReadonlyMap<string, WorkflowBranchStatus>;
|
|
72
|
+
};
|
|
73
|
+
type WorkflowRaceEntry = {
|
|
74
|
+
readonly winner: string | null;
|
|
75
|
+
readonly branches: ReadonlyMap<string, WorkflowBranchStatus>;
|
|
76
|
+
};
|
|
77
|
+
type WorkflowRemovedEntry = {
|
|
78
|
+
readonly originalType: string;
|
|
79
|
+
readonly originalName: string | null;
|
|
80
|
+
};
|
|
81
|
+
type WorkflowEntryKind = {
|
|
82
|
+
readonly tag: "WorkflowStepEntry";
|
|
83
|
+
readonly val: WorkflowStepEntry;
|
|
84
|
+
} | {
|
|
85
|
+
readonly tag: "WorkflowLoopEntry";
|
|
86
|
+
readonly val: WorkflowLoopEntry;
|
|
87
|
+
} | {
|
|
88
|
+
readonly tag: "WorkflowSleepEntry";
|
|
89
|
+
readonly val: WorkflowSleepEntry;
|
|
90
|
+
} | {
|
|
91
|
+
readonly tag: "WorkflowMessageEntry";
|
|
92
|
+
readonly val: WorkflowMessageEntry;
|
|
93
|
+
} | {
|
|
94
|
+
readonly tag: "WorkflowRollbackCheckpointEntry";
|
|
95
|
+
readonly val: WorkflowRollbackCheckpointEntry;
|
|
96
|
+
} | {
|
|
97
|
+
readonly tag: "WorkflowJoinEntry";
|
|
98
|
+
readonly val: WorkflowJoinEntry;
|
|
99
|
+
} | {
|
|
100
|
+
readonly tag: "WorkflowRaceEntry";
|
|
101
|
+
readonly val: WorkflowRaceEntry;
|
|
102
|
+
} | {
|
|
103
|
+
readonly tag: "WorkflowRemovedEntry";
|
|
104
|
+
readonly val: WorkflowRemovedEntry;
|
|
105
|
+
};
|
|
106
|
+
type WorkflowEntry = {
|
|
107
|
+
readonly id: string;
|
|
108
|
+
readonly location: WorkflowLocation;
|
|
109
|
+
readonly kind: WorkflowEntryKind;
|
|
110
|
+
};
|
|
111
|
+
type WorkflowEntryMetadata = {
|
|
112
|
+
readonly status: WorkflowEntryStatus;
|
|
113
|
+
readonly error: string | null;
|
|
114
|
+
readonly attempts: u32;
|
|
115
|
+
readonly lastAttemptAt: u64;
|
|
116
|
+
readonly createdAt: u64;
|
|
117
|
+
readonly completedAt: u64 | null;
|
|
118
|
+
readonly rollbackCompletedAt: u64 | null;
|
|
119
|
+
readonly rollbackError: string | null;
|
|
120
|
+
};
|
|
121
|
+
type WorkflowHistory = {
|
|
122
|
+
readonly nameRegistry: readonly string[];
|
|
123
|
+
readonly entries: readonly WorkflowEntry[];
|
|
124
|
+
readonly entryMetadata: ReadonlyMap<string, WorkflowEntryMetadata>;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
declare function encodeWorkflowHistoryTransport(history: WorkflowHistory): ArrayBuffer;
|
|
128
|
+
declare function decodeWorkflowHistoryTransport(data: ArrayBuffer | ArrayBufferView): WorkflowHistory;
|
|
129
|
+
|
|
130
|
+
export { CURRENT_VERSION, TO_CLIENT_VERSIONED, TO_SERVER_VERSIONED, ToClient, ToServer, type WorkflowHistory as TransportWorkflowHistory, decodeWorkflowHistoryTransport, encodeWorkflowHistoryTransport };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { T as ToClient, a as ToServer } from '../v3-DnYObHH3.js';
|
|
2
|
+
export { A as ActionRequest, b as ActionResponse, C as Connection, c as ConnectionsRequest, d as ConnectionsResponse, e as ConnectionsUpdated, D as DatabaseSchemaRequest, f as DatabaseSchemaResponse, g as DatabaseTableRowsRequest, h as DatabaseTableRowsResponse, E as Error, I as Init, P as PatchStateRequest, Q as QueueMessageSummary, i as QueueRequest, j as QueueResponse, k as QueueStatus, l as QueueUpdated, R as RpcsListRequest, m as RpcsListResponse, S as State, n as StateRequest, o as StateResponse, p as StateUpdated, q as ToClientBody, r as ToServerBody, s as TraceQueryRequest, t as TraceQueryResponse, W as WorkflowHistory, u as WorkflowHistoryRequest, v as WorkflowHistoryResponse, w as WorkflowHistoryUpdated, x as decodeToClient, y as decodeToServer, z as encodeToClient, B as encodeToServer, F as readActionRequest, G as readActionResponse, H as readConnection, J as readConnectionsRequest, K as readConnectionsResponse, L as readConnectionsUpdated, M as readDatabaseSchemaRequest, N as readDatabaseSchemaResponse, O as readDatabaseTableRowsRequest, U as readDatabaseTableRowsResponse, V as readError, X as readInit, Y as readPatchStateRequest, Z as readQueueMessageSummary, _ as readQueueRequest, $ as readQueueResponse, a0 as readQueueStatus, a1 as readQueueUpdated, a2 as readRpcsListRequest, a3 as readRpcsListResponse, a4 as readState, a5 as readStateRequest, a6 as readStateResponse, a7 as readStateUpdated, a8 as readToClient, a9 as readToClientBody, aa as readToServer, ab as readToServerBody, ac as readTraceQueryRequest, ad as readTraceQueryResponse, ae as readWorkflowHistory, af as readWorkflowHistoryRequest, ag as readWorkflowHistoryResponse, ah as readWorkflowHistoryUpdated, ai as uint, aj as writeActionRequest, ak as writeActionResponse, al as writeConnection, am as writeConnectionsRequest, an as writeConnectionsResponse, ao as writeConnectionsUpdated, ap as writeDatabaseSchemaRequest, aq as writeDatabaseSchemaResponse, ar as writeDatabaseTableRowsRequest, as as writeDatabaseTableRowsResponse, at as writeError, au as writeInit, av as writePatchStateRequest, aw as writeQueueMessageSummary, ax as writeQueueRequest, ay as writeQueueResponse, az as writeQueueStatus, aA as writeQueueUpdated, aB as writeRpcsListRequest, aC as writeRpcsListResponse, aD as writeState, aE as writeStateRequest, aF as writeStateResponse, aG as writeStateUpdated, aH as writeToClient, aI as writeToClientBody, aJ as writeToServer, aK as writeToServerBody, aL as writeTraceQueryRequest, aM as writeTraceQueryResponse, aN as writeWorkflowHistory, aO as writeWorkflowHistoryRequest, aP as writeWorkflowHistoryResponse, aQ as writeWorkflowHistoryUpdated } from '../v3-DnYObHH3.js';
|
|
3
|
+
import * as vbare from 'vbare';
|
|
4
|
+
import '@rivetkit/bare-ts';
|
|
5
|
+
|
|
6
|
+
declare const CURRENT_VERSION = 3;
|
|
7
|
+
declare const TO_SERVER_VERSIONED: vbare.VersionedDataHandler<ToServer>;
|
|
8
|
+
declare const TO_CLIENT_VERSIONED: vbare.VersionedDataHandler<ToClient>;
|
|
9
|
+
|
|
10
|
+
type u32 = number;
|
|
11
|
+
type u64 = bigint;
|
|
12
|
+
type WorkflowCbor = ArrayBuffer;
|
|
13
|
+
type WorkflowNameIndex = u32;
|
|
14
|
+
type WorkflowLoopIterationMarker = {
|
|
15
|
+
readonly loop: WorkflowNameIndex;
|
|
16
|
+
readonly iteration: u32;
|
|
17
|
+
};
|
|
18
|
+
type WorkflowPathSegment = {
|
|
19
|
+
readonly tag: "WorkflowNameIndex";
|
|
20
|
+
readonly val: WorkflowNameIndex;
|
|
21
|
+
} | {
|
|
22
|
+
readonly tag: "WorkflowLoopIterationMarker";
|
|
23
|
+
readonly val: WorkflowLoopIterationMarker;
|
|
24
|
+
};
|
|
25
|
+
type WorkflowLocation = readonly WorkflowPathSegment[];
|
|
26
|
+
declare enum WorkflowEntryStatus {
|
|
27
|
+
PENDING = "PENDING",
|
|
28
|
+
RUNNING = "RUNNING",
|
|
29
|
+
COMPLETED = "COMPLETED",
|
|
30
|
+
FAILED = "FAILED",
|
|
31
|
+
EXHAUSTED = "EXHAUSTED"
|
|
32
|
+
}
|
|
33
|
+
declare enum WorkflowSleepState {
|
|
34
|
+
PENDING = "PENDING",
|
|
35
|
+
COMPLETED = "COMPLETED",
|
|
36
|
+
INTERRUPTED = "INTERRUPTED"
|
|
37
|
+
}
|
|
38
|
+
declare enum WorkflowBranchStatusType {
|
|
39
|
+
PENDING = "PENDING",
|
|
40
|
+
RUNNING = "RUNNING",
|
|
41
|
+
COMPLETED = "COMPLETED",
|
|
42
|
+
FAILED = "FAILED",
|
|
43
|
+
CANCELLED = "CANCELLED"
|
|
44
|
+
}
|
|
45
|
+
type WorkflowStepEntry = {
|
|
46
|
+
readonly output: WorkflowCbor | null;
|
|
47
|
+
readonly error: string | null;
|
|
48
|
+
};
|
|
49
|
+
type WorkflowLoopEntry = {
|
|
50
|
+
readonly state: WorkflowCbor;
|
|
51
|
+
readonly iteration: u32;
|
|
52
|
+
readonly output: WorkflowCbor | null;
|
|
53
|
+
};
|
|
54
|
+
type WorkflowSleepEntry = {
|
|
55
|
+
readonly deadline: u64;
|
|
56
|
+
readonly state: WorkflowSleepState;
|
|
57
|
+
};
|
|
58
|
+
type WorkflowMessageEntry = {
|
|
59
|
+
readonly name: string;
|
|
60
|
+
readonly messageData: WorkflowCbor;
|
|
61
|
+
};
|
|
62
|
+
type WorkflowRollbackCheckpointEntry = {
|
|
63
|
+
readonly name: string;
|
|
64
|
+
};
|
|
65
|
+
type WorkflowBranchStatus = {
|
|
66
|
+
readonly status: WorkflowBranchStatusType;
|
|
67
|
+
readonly output: WorkflowCbor | null;
|
|
68
|
+
readonly error: string | null;
|
|
69
|
+
};
|
|
70
|
+
type WorkflowJoinEntry = {
|
|
71
|
+
readonly branches: ReadonlyMap<string, WorkflowBranchStatus>;
|
|
72
|
+
};
|
|
73
|
+
type WorkflowRaceEntry = {
|
|
74
|
+
readonly winner: string | null;
|
|
75
|
+
readonly branches: ReadonlyMap<string, WorkflowBranchStatus>;
|
|
76
|
+
};
|
|
77
|
+
type WorkflowRemovedEntry = {
|
|
78
|
+
readonly originalType: string;
|
|
79
|
+
readonly originalName: string | null;
|
|
80
|
+
};
|
|
81
|
+
type WorkflowEntryKind = {
|
|
82
|
+
readonly tag: "WorkflowStepEntry";
|
|
83
|
+
readonly val: WorkflowStepEntry;
|
|
84
|
+
} | {
|
|
85
|
+
readonly tag: "WorkflowLoopEntry";
|
|
86
|
+
readonly val: WorkflowLoopEntry;
|
|
87
|
+
} | {
|
|
88
|
+
readonly tag: "WorkflowSleepEntry";
|
|
89
|
+
readonly val: WorkflowSleepEntry;
|
|
90
|
+
} | {
|
|
91
|
+
readonly tag: "WorkflowMessageEntry";
|
|
92
|
+
readonly val: WorkflowMessageEntry;
|
|
93
|
+
} | {
|
|
94
|
+
readonly tag: "WorkflowRollbackCheckpointEntry";
|
|
95
|
+
readonly val: WorkflowRollbackCheckpointEntry;
|
|
96
|
+
} | {
|
|
97
|
+
readonly tag: "WorkflowJoinEntry";
|
|
98
|
+
readonly val: WorkflowJoinEntry;
|
|
99
|
+
} | {
|
|
100
|
+
readonly tag: "WorkflowRaceEntry";
|
|
101
|
+
readonly val: WorkflowRaceEntry;
|
|
102
|
+
} | {
|
|
103
|
+
readonly tag: "WorkflowRemovedEntry";
|
|
104
|
+
readonly val: WorkflowRemovedEntry;
|
|
105
|
+
};
|
|
106
|
+
type WorkflowEntry = {
|
|
107
|
+
readonly id: string;
|
|
108
|
+
readonly location: WorkflowLocation;
|
|
109
|
+
readonly kind: WorkflowEntryKind;
|
|
110
|
+
};
|
|
111
|
+
type WorkflowEntryMetadata = {
|
|
112
|
+
readonly status: WorkflowEntryStatus;
|
|
113
|
+
readonly error: string | null;
|
|
114
|
+
readonly attempts: u32;
|
|
115
|
+
readonly lastAttemptAt: u64;
|
|
116
|
+
readonly createdAt: u64;
|
|
117
|
+
readonly completedAt: u64 | null;
|
|
118
|
+
readonly rollbackCompletedAt: u64 | null;
|
|
119
|
+
readonly rollbackError: string | null;
|
|
120
|
+
};
|
|
121
|
+
type WorkflowHistory = {
|
|
122
|
+
readonly nameRegistry: readonly string[];
|
|
123
|
+
readonly entries: readonly WorkflowEntry[];
|
|
124
|
+
readonly entryMetadata: ReadonlyMap<string, WorkflowEntryMetadata>;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
declare function encodeWorkflowHistoryTransport(history: WorkflowHistory): ArrayBuffer;
|
|
128
|
+
declare function decodeWorkflowHistoryTransport(data: ArrayBuffer | ArrayBufferView): WorkflowHistory;
|
|
129
|
+
|
|
130
|
+
export { CURRENT_VERSION, TO_CLIENT_VERSIONED, TO_SERVER_VERSIONED, ToClient, ToServer, type WorkflowHistory as TransportWorkflowHistory, decodeWorkflowHistoryTransport, encodeWorkflowHistoryTransport };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import {
|
|
2
|
+
decodeWorkflowHistoryTransport,
|
|
3
|
+
encodeWorkflowHistoryTransport
|
|
4
|
+
} from "../chunk-Z7HNQ2WF.js";
|
|
5
|
+
import {
|
|
6
|
+
CURRENT_VERSION,
|
|
7
|
+
TO_CLIENT_VERSIONED,
|
|
8
|
+
TO_SERVER_VERSIONED,
|
|
9
|
+
decodeToClient,
|
|
10
|
+
decodeToServer,
|
|
11
|
+
encodeToClient,
|
|
12
|
+
encodeToServer,
|
|
13
|
+
readActionRequest,
|
|
14
|
+
readActionResponse,
|
|
15
|
+
readConnection,
|
|
16
|
+
readConnectionsRequest,
|
|
17
|
+
readConnectionsResponse,
|
|
18
|
+
readConnectionsUpdated,
|
|
19
|
+
readDatabaseSchemaRequest,
|
|
20
|
+
readDatabaseSchemaResponse,
|
|
21
|
+
readDatabaseTableRowsRequest,
|
|
22
|
+
readDatabaseTableRowsResponse,
|
|
23
|
+
readError,
|
|
24
|
+
readInit,
|
|
25
|
+
readPatchStateRequest,
|
|
26
|
+
readQueueMessageSummary,
|
|
27
|
+
readQueueRequest,
|
|
28
|
+
readQueueResponse,
|
|
29
|
+
readQueueStatus,
|
|
30
|
+
readQueueUpdated,
|
|
31
|
+
readRpcsListRequest,
|
|
32
|
+
readRpcsListResponse,
|
|
33
|
+
readState,
|
|
34
|
+
readStateRequest,
|
|
35
|
+
readStateResponse,
|
|
36
|
+
readStateUpdated,
|
|
37
|
+
readToClient,
|
|
38
|
+
readToClientBody,
|
|
39
|
+
readToServer,
|
|
40
|
+
readToServerBody,
|
|
41
|
+
readTraceQueryRequest,
|
|
42
|
+
readTraceQueryResponse,
|
|
43
|
+
readWorkflowHistory,
|
|
44
|
+
readWorkflowHistoryRequest,
|
|
45
|
+
readWorkflowHistoryResponse,
|
|
46
|
+
readWorkflowHistoryUpdated,
|
|
47
|
+
writeActionRequest,
|
|
48
|
+
writeActionResponse,
|
|
49
|
+
writeConnection,
|
|
50
|
+
writeConnectionsRequest,
|
|
51
|
+
writeConnectionsResponse,
|
|
52
|
+
writeConnectionsUpdated,
|
|
53
|
+
writeDatabaseSchemaRequest,
|
|
54
|
+
writeDatabaseSchemaResponse,
|
|
55
|
+
writeDatabaseTableRowsRequest,
|
|
56
|
+
writeDatabaseTableRowsResponse,
|
|
57
|
+
writeError,
|
|
58
|
+
writeInit,
|
|
59
|
+
writePatchStateRequest,
|
|
60
|
+
writeQueueMessageSummary,
|
|
61
|
+
writeQueueRequest,
|
|
62
|
+
writeQueueResponse,
|
|
63
|
+
writeQueueStatus,
|
|
64
|
+
writeQueueUpdated,
|
|
65
|
+
writeRpcsListRequest,
|
|
66
|
+
writeRpcsListResponse,
|
|
67
|
+
writeState,
|
|
68
|
+
writeStateRequest,
|
|
69
|
+
writeStateResponse,
|
|
70
|
+
writeStateUpdated,
|
|
71
|
+
writeToClient,
|
|
72
|
+
writeToClientBody,
|
|
73
|
+
writeToServer,
|
|
74
|
+
writeToServerBody,
|
|
75
|
+
writeTraceQueryRequest,
|
|
76
|
+
writeTraceQueryResponse,
|
|
77
|
+
writeWorkflowHistory,
|
|
78
|
+
writeWorkflowHistoryRequest,
|
|
79
|
+
writeWorkflowHistoryResponse,
|
|
80
|
+
writeWorkflowHistoryUpdated
|
|
81
|
+
} from "../chunk-LXUQ667X.js";
|
|
82
|
+
import "../chunk-325TLXJT.js";
|
|
83
|
+
import "../chunk-7HTNH26M.js";
|
|
84
|
+
import "../chunk-424PT5DM.js";
|
|
85
|
+
export {
|
|
86
|
+
CURRENT_VERSION,
|
|
87
|
+
TO_CLIENT_VERSIONED,
|
|
88
|
+
TO_SERVER_VERSIONED,
|
|
89
|
+
decodeToClient,
|
|
90
|
+
decodeToServer,
|
|
91
|
+
decodeWorkflowHistoryTransport,
|
|
92
|
+
encodeToClient,
|
|
93
|
+
encodeToServer,
|
|
94
|
+
encodeWorkflowHistoryTransport,
|
|
95
|
+
readActionRequest,
|
|
96
|
+
readActionResponse,
|
|
97
|
+
readConnection,
|
|
98
|
+
readConnectionsRequest,
|
|
99
|
+
readConnectionsResponse,
|
|
100
|
+
readConnectionsUpdated,
|
|
101
|
+
readDatabaseSchemaRequest,
|
|
102
|
+
readDatabaseSchemaResponse,
|
|
103
|
+
readDatabaseTableRowsRequest,
|
|
104
|
+
readDatabaseTableRowsResponse,
|
|
105
|
+
readError,
|
|
106
|
+
readInit,
|
|
107
|
+
readPatchStateRequest,
|
|
108
|
+
readQueueMessageSummary,
|
|
109
|
+
readQueueRequest,
|
|
110
|
+
readQueueResponse,
|
|
111
|
+
readQueueStatus,
|
|
112
|
+
readQueueUpdated,
|
|
113
|
+
readRpcsListRequest,
|
|
114
|
+
readRpcsListResponse,
|
|
115
|
+
readState,
|
|
116
|
+
readStateRequest,
|
|
117
|
+
readStateResponse,
|
|
118
|
+
readStateUpdated,
|
|
119
|
+
readToClient,
|
|
120
|
+
readToClientBody,
|
|
121
|
+
readToServer,
|
|
122
|
+
readToServerBody,
|
|
123
|
+
readTraceQueryRequest,
|
|
124
|
+
readTraceQueryResponse,
|
|
125
|
+
readWorkflowHistory,
|
|
126
|
+
readWorkflowHistoryRequest,
|
|
127
|
+
readWorkflowHistoryResponse,
|
|
128
|
+
readWorkflowHistoryUpdated,
|
|
129
|
+
writeActionRequest,
|
|
130
|
+
writeActionResponse,
|
|
131
|
+
writeConnection,
|
|
132
|
+
writeConnectionsRequest,
|
|
133
|
+
writeConnectionsResponse,
|
|
134
|
+
writeConnectionsUpdated,
|
|
135
|
+
writeDatabaseSchemaRequest,
|
|
136
|
+
writeDatabaseSchemaResponse,
|
|
137
|
+
writeDatabaseTableRowsRequest,
|
|
138
|
+
writeDatabaseTableRowsResponse,
|
|
139
|
+
writeError,
|
|
140
|
+
writeInit,
|
|
141
|
+
writePatchStateRequest,
|
|
142
|
+
writeQueueMessageSummary,
|
|
143
|
+
writeQueueRequest,
|
|
144
|
+
writeQueueResponse,
|
|
145
|
+
writeQueueStatus,
|
|
146
|
+
writeQueueUpdated,
|
|
147
|
+
writeRpcsListRequest,
|
|
148
|
+
writeRpcsListResponse,
|
|
149
|
+
writeState,
|
|
150
|
+
writeStateRequest,
|
|
151
|
+
writeStateResponse,
|
|
152
|
+
writeStateUpdated,
|
|
153
|
+
writeToClient,
|
|
154
|
+
writeToClientBody,
|
|
155
|
+
writeToServer,
|
|
156
|
+
writeToServerBody,
|
|
157
|
+
writeTraceQueryRequest,
|
|
158
|
+
writeTraceQueryResponse,
|
|
159
|
+
writeWorkflowHistory,
|
|
160
|
+
writeWorkflowHistoryRequest,
|
|
161
|
+
writeWorkflowHistoryResponse,
|
|
162
|
+
writeWorkflowHistoryUpdated
|
|
163
|
+
};
|
|
164
|
+
//# sourceMappingURL=mod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const KEYS: {
|
|
2
|
+
PERSIST_DATA: Uint8Array<ArrayBuffer>;
|
|
3
|
+
CONN_PREFIX: Uint8Array<ArrayBuffer>;
|
|
4
|
+
INSPECTOR_TOKEN: Uint8Array<ArrayBuffer>;
|
|
5
|
+
KV: Uint8Array<ArrayBuffer>;
|
|
6
|
+
QUEUE_PREFIX: Uint8Array<ArrayBuffer>;
|
|
7
|
+
WORKFLOW_PREFIX: Uint8Array<ArrayBuffer>;
|
|
8
|
+
TRACES_PREFIX: Uint8Array<ArrayBuffer>;
|
|
9
|
+
SQLITE_PREFIX: Uint8Array<ArrayBuffer>;
|
|
10
|
+
};
|
|
11
|
+
declare function makeConnKey(connId: string): Uint8Array;
|
|
12
|
+
|
|
13
|
+
export { KEYS as K, makeConnKey as m };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const KEYS: {
|
|
2
|
+
PERSIST_DATA: Uint8Array<ArrayBuffer>;
|
|
3
|
+
CONN_PREFIX: Uint8Array<ArrayBuffer>;
|
|
4
|
+
INSPECTOR_TOKEN: Uint8Array<ArrayBuffer>;
|
|
5
|
+
KV: Uint8Array<ArrayBuffer>;
|
|
6
|
+
QUEUE_PREFIX: Uint8Array<ArrayBuffer>;
|
|
7
|
+
WORKFLOW_PREFIX: Uint8Array<ArrayBuffer>;
|
|
8
|
+
TRACES_PREFIX: Uint8Array<ArrayBuffer>;
|
|
9
|
+
SQLITE_PREFIX: Uint8Array<ArrayBuffer>;
|
|
10
|
+
};
|
|
11
|
+
declare function makeConnKey(connId: string): Uint8Array;
|
|
12
|
+
|
|
13
|
+
export { KEYS as K, makeConnKey as m };
|