rivetkit 2.3.20 → 2.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/client.d.ts +43 -5
- package/dist/browser/client.js +302 -60
- package/dist/browser/client.js.map +1 -1
- package/dist/browser/inspector/client.js +2 -1
- package/dist/browser/inspector/client.js.map +1 -1
- package/dist/tsup/actor/errors.cjs.map +1 -1
- package/dist/tsup/agent-os/index.cjs +2 -1
- package/dist/tsup/agent-os/index.cjs.map +1 -1
- package/dist/tsup/agent-os/index.d.cts +32 -4
- package/dist/tsup/agent-os/index.d.ts +32 -4
- package/dist/tsup/agent-os/index.js +2 -1
- package/dist/tsup/agent-os/index.js.map +1 -1
- package/dist/tsup/{chunk-553CIQJY.js → chunk-2CI2IEVN.js} +2 -2
- package/dist/tsup/{chunk-W2PXGWMR.js → chunk-5EGLHQJJ.js} +2 -2
- package/dist/tsup/{chunk-DMQUERRN.js → chunk-5IBUZFLP.js} +2 -2
- package/dist/tsup/{chunk-76YTS32R.cjs → chunk-6LRPYB4Q.cjs} +4 -4
- package/dist/tsup/chunk-6LRPYB4Q.cjs.map +1 -0
- package/dist/tsup/{chunk-WAISW7KR.cjs → chunk-APOANSDG.cjs} +10 -10
- package/dist/tsup/chunk-APOANSDG.cjs.map +1 -0
- package/dist/tsup/{chunk-IHKDFKM4.cjs → chunk-ARGNQGYG.cjs} +3 -3
- package/dist/tsup/chunk-ARGNQGYG.cjs.map +1 -0
- package/dist/tsup/{chunk-A36FMKOV.cjs → chunk-B5SNXPSS.cjs} +448 -199
- package/dist/tsup/chunk-B5SNXPSS.cjs.map +1 -0
- package/dist/tsup/{chunk-SNNVRHLX.js → chunk-CJXBGTVT.js} +2 -2
- package/dist/tsup/{chunk-CVLNRT7O.cjs → chunk-GHKQC4PD.cjs} +3 -3
- package/dist/tsup/chunk-GHKQC4PD.cjs.map +1 -0
- package/dist/tsup/chunk-JX2ITWAV.cjs.map +1 -1
- package/dist/tsup/chunk-KVFIONKQ.cjs.map +1 -1
- package/dist/tsup/{chunk-2CE5UNWK.cjs → chunk-KWGN2ZBJ.cjs} +3 -2
- package/dist/tsup/chunk-KWGN2ZBJ.cjs.map +1 -0
- package/dist/tsup/{chunk-3WS7Z64U.cjs → chunk-LWSLKKZ5.cjs} +3 -3
- package/dist/tsup/chunk-LWSLKKZ5.cjs.map +1 -0
- package/dist/tsup/chunk-MYWZCDML.cjs.map +1 -1
- package/dist/tsup/{chunk-RSIOGT2U.cjs → chunk-NL2EIKK6.cjs} +7 -7
- package/dist/tsup/chunk-NL2EIKK6.cjs.map +1 -0
- package/dist/tsup/chunk-NWCAIWHL.cjs.map +1 -1
- package/dist/tsup/{chunk-5G2J26VM.js → chunk-PYRI75DL.js} +314 -65
- package/dist/tsup/chunk-PYRI75DL.js.map +1 -0
- package/dist/tsup/{chunk-2NXLTFWI.js → chunk-RFN3BG6D.js} +3 -3
- package/dist/tsup/chunk-RFN3BG6D.js.map +1 -0
- package/dist/tsup/{chunk-DHWZTUKA.js → chunk-RGIZNZYO.js} +3 -2
- package/dist/tsup/chunk-RGIZNZYO.js.map +1 -0
- package/dist/tsup/{chunk-TZVAVPGJ.js → chunk-VMMXXVDO.js} +4 -4
- package/dist/tsup/client/mod.cjs +5 -5
- package/dist/tsup/client/mod.cjs.map +1 -1
- package/dist/tsup/client/mod.d.cts +12 -3
- package/dist/tsup/client/mod.d.ts +12 -3
- package/dist/tsup/client/mod.js +4 -4
- package/dist/tsup/common/log.cjs +2 -2
- package/dist/tsup/common/log.cjs.map +1 -1
- package/dist/tsup/common/log.js +1 -1
- package/dist/tsup/common/websocket.cjs +3 -3
- package/dist/tsup/common/websocket.cjs.map +1 -1
- package/dist/tsup/common/websocket.js +2 -2
- package/dist/tsup/{config-Be-VOHaX.d.ts → config-Bc1nnvUl.d.ts} +35 -5
- package/dist/tsup/{config-Ct5uXxXk.d.cts → config-Do_0guSS.d.cts} +35 -5
- package/dist/tsup/{context-Cw-11Q-B.d.cts → context-CgNkhjdY.d.cts} +1 -1
- package/dist/tsup/{context-CXLa0BIM.d.ts → context-oGQxZDPz.d.ts} +1 -1
- package/dist/tsup/db/drizzle.cjs +2 -2
- package/dist/tsup/db/drizzle.cjs.map +1 -1
- package/dist/tsup/db/drizzle.js +1 -1
- package/dist/tsup/db/mod.cjs +3 -3
- package/dist/tsup/db/mod.cjs.map +1 -1
- package/dist/tsup/db/mod.js +2 -2
- package/dist/tsup/dynamic/mod.cjs.map +1 -1
- package/dist/tsup/dynamic/mod.d.cts +2 -1
- package/dist/tsup/dynamic/mod.d.ts +2 -1
- package/dist/tsup/inspector/mod.cjs +5 -5
- package/dist/tsup/inspector/mod.cjs.map +1 -1
- package/dist/tsup/inspector/mod.js +4 -4
- package/dist/tsup/inspector/workflow.cjs +4 -4
- package/dist/tsup/inspector/workflow.cjs.map +1 -1
- package/dist/tsup/inspector/workflow.js +3 -3
- package/dist/tsup/inspector-tab/mod.cjs.map +1 -1
- package/dist/tsup/inspector-tab/mod.d.cts +3 -2
- package/dist/tsup/inspector-tab/mod.d.ts +3 -2
- package/dist/tsup/mod.cjs +105 -115
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.d.cts +4 -3
- package/dist/tsup/mod.d.ts +4 -3
- package/dist/tsup/mod.js +29 -39
- package/dist/tsup/mod.js.map +1 -1
- package/dist/tsup/test/mod.cjs +6 -6
- package/dist/tsup/test/mod.cjs.map +1 -1
- package/dist/tsup/test/mod.d.cts +2 -1
- package/dist/tsup/test/mod.d.ts +2 -1
- package/dist/tsup/test/mod.js +4 -4
- package/dist/tsup/unstable/migrations.cjs.map +1 -1
- package/dist/tsup/utils.cjs +2 -2
- package/dist/tsup/utils.cjs.map +1 -1
- package/dist/tsup/utils.js +1 -1
- package/dist/tsup/workflow/mod.cjs +7 -7
- package/dist/tsup/workflow/mod.cjs.map +1 -1
- package/dist/tsup/workflow/mod.d.cts +4 -3
- package/dist/tsup/workflow/mod.d.ts +4 -3
- package/dist/tsup/workflow/mod.js +4 -4
- package/package.json +10 -9
- package/src/client/actor-conn.ts +34 -1
- package/src/client/actor-handle.ts +29 -1
- package/src/client/auth.ts +37 -0
- package/src/client/client.ts +10 -2
- package/src/client/config.ts +12 -1
- package/src/client/mod.ts +9 -0
- package/src/client/token-provider.test.ts +86 -0
- package/src/client/token-provider.ts +93 -0
- package/src/client/utils.ts +1 -0
- package/src/engine-client/actor-websocket-client.ts +2 -1
- package/src/engine-client/api-endpoints.ts +28 -0
- package/src/engine-client/driver.ts +4 -0
- package/src/engine-client/mod.ts +201 -64
- package/src/registry/config/envoy.ts +1 -17
- package/src/registry/config/index.test.ts +2 -2
- package/src/registry/config/index.ts +7 -2
- package/src/registry/index.ts +28 -0
- package/dist/tsup/chunk-2CE5UNWK.cjs.map +0 -1
- package/dist/tsup/chunk-2NXLTFWI.js.map +0 -1
- package/dist/tsup/chunk-3WS7Z64U.cjs.map +0 -1
- package/dist/tsup/chunk-5G2J26VM.js.map +0 -1
- package/dist/tsup/chunk-76YTS32R.cjs.map +0 -1
- package/dist/tsup/chunk-A36FMKOV.cjs.map +0 -1
- package/dist/tsup/chunk-CVLNRT7O.cjs.map +0 -1
- package/dist/tsup/chunk-DHWZTUKA.js.map +0 -1
- package/dist/tsup/chunk-IHKDFKM4.cjs.map +0 -1
- package/dist/tsup/chunk-RSIOGT2U.cjs.map +0 -1
- package/dist/tsup/chunk-WAISW7KR.cjs.map +0 -1
- /package/dist/tsup/{chunk-553CIQJY.js.map → chunk-2CI2IEVN.js.map} +0 -0
- /package/dist/tsup/{chunk-W2PXGWMR.js.map → chunk-5EGLHQJJ.js.map} +0 -0
- /package/dist/tsup/{chunk-DMQUERRN.js.map → chunk-5IBUZFLP.js.map} +0 -0
- /package/dist/tsup/{chunk-SNNVRHLX.js.map → chunk-CJXBGTVT.js.map} +0 -0
- /package/dist/tsup/{chunk-TZVAVPGJ.js.map → chunk-VMMXXVDO.js.map} +0 -0
package/dist/tsup/mod.d.cts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, a as ActionContext, b as BeforeActionResponseContext, c as BeforeConnectContext, C as ConnectContext, d as CreateConnStateContext, e as CreateContext, f as CreateVarsContext, D as DestroyContext, g as DisconnectContext, M as MigrateContext, R as RequestContext, h as RunContext, S as SleepContext, i as StateChangeContext, W as WakeContext, j as WebSocketContext } from './config-
|
|
2
|
-
export { k as ACTOR_CONTEXT_INTERNAL_SYMBOL, l as ActionInputSchemas, m as ActionSampleRates, n as ActionTraceSamplers, o as Actions, p as ActorConfig, q as ActorConfigInput, r as ActorConfigSchema, s as ActorContext, t as ActorContextOf, u as ActorCron, v as ActorCronEveryOptions, w as ActorCronSetOptions, x as ActorDefinition, y as ActorInspectorConfig, z as ActorInspectorConfigSchema, F as ActorKey, G as ActorKv, H as ActorLogger, I as ActorOptions, J as ActorOptionsInput, K as ActorOptionsSchema, L as ActorQuery, N as ActorQueue, O as ActorRun, P as ActorSchedule, T as ActorTracingOptions, U as ActorTypes, V as ActorsSchema, X as AnyActorInstance, Y as AnyClient, Z as AnyConn, _ as AnyStaticActorDefinition, $ as AnyStaticActorInstance, a0 as AuthIntent, a1 as BUILTIN_INSPECTOR_TAB_IDS, a2 as BaseActorInstance, a3 as BuiltinInspectorTabIdSchema, a4 as CONN_DRIVER_SYMBOL, a5 as CONN_STATE_MANAGER_SYMBOL, a6 as Client, a7 as Conn, a8 as CronFire, a9 as CronJobInfo, aa as CustomInspectorTabEntrySchema, ab as DEFAULT_SLEEP_GRACE_PERIOD, ac as DefineRunHandlerOptions, ad as DocActorConfigSchema, ae as DocActorOptionsSchema, af as DocConfigurePoolSchema, ag as DocEnvoyConfigSchema, ah as DocRegistryConfigSchema, ai as DocServerlessConfigSchema, aj as DocSqliteConfigSchema, ak as FetchHandler, al as GlobalActorOptions, am as GlobalActorOptionsInput, an as GlobalActorOptionsSchema, ao as HideInspectorTabEntrySchema, ap as InferEventArgs, aq as InferSchemaMap, ar as InspectorTabEntrySchema, as as InspectorUnsubscribe, at as InstanceActorOptions, au as InstanceActorOptionsInput, av as InstanceActorOptionsSchema, aw as QueueEnqueueAndWaitOptions, ax as QueueFilterName, ay as QueueIterOptions, az as QueueMessageOf, aA as QueueName, aB as QueueNextBatchOptions, aC as QueueNextOptions, aD as QueueResultMessageForName, aE as QueueTryNextBatchOptions, aF as QueueTryNextOptions, aG as QueueWaitOptions, aH as RAW_STATE_SYMBOL, aI as Registry, aJ as RegistryActors, aK as RegistryApplication, aL as RegistryConfig, aM as RegistryConfigInput, aN as RegistryConfigSchema, aO as RegistryDeps, aP as RegistryListenOptions, aQ as RegistryRoutes, aR as RunConfig, aS as RunConfigSchema, aT as RunControl, aU as RunInspectorConfig, aV as RunInspectorFactoryContext, aW as RunInspectorFactoryResult, aX as RunInspectorKind, aY as RunWithInactiveOptions, aZ as RuntimeKind, a_ as RuntimeKindSchema, a$ as ScheduledEventInfo, b0 as ScheduledFireInfo, b1 as ServerlessHandler, b2 as SqliteBackend, b3 as SqliteBackendSchema, b4 as SqliteConfig, b5 as SqliteConfigSchema, b6 as TestConfig, b7 as TestConfigSchema, b8 as Type, b9 as WasmRuntimeBindings, ba as WasmRuntimeConfig, bb as WasmRuntimeConfigSchema, bc as WasmRuntimeInitInput, bd as WorkflowInspectorConfig, be as WorkflowOutcome, bf as WorkflowSpan, bg as WorkflowStepOutcome, bh as WorkflowStepSpan, bi as actor, bj as buildActorNames, bk as createClientWithDriver, bl as defineRunHandler, bm as disposeRunInspector, bn as event, bo as getRunFunction, bp as getRunInspectorConfig, bq as getRunMetadata, br as isStaticActorDefinition, bs as isStaticActorInstance, bt as lookupInRegistry, bu as queue, bv as setup, bw as test } from './config-
|
|
1
|
+
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, a as ActionContext, b as BeforeActionResponseContext, c as BeforeConnectContext, C as ConnectContext, d as CreateConnStateContext, e as CreateContext, f as CreateVarsContext, D as DestroyContext, g as DisconnectContext, M as MigrateContext, R as RequestContext, h as RunContext, S as SleepContext, i as StateChangeContext, W as WakeContext, j as WebSocketContext } from './config-Do_0guSS.cjs';
|
|
2
|
+
export { k as ACTOR_CONTEXT_INTERNAL_SYMBOL, l as ActionInputSchemas, m as ActionSampleRates, n as ActionTraceSamplers, o as Actions, p as ActorConfig, q as ActorConfigInput, r as ActorConfigSchema, s as ActorContext, t as ActorContextOf, u as ActorCron, v as ActorCronEveryOptions, w as ActorCronSetOptions, x as ActorDefinition, y as ActorInspectorConfig, z as ActorInspectorConfigSchema, F as ActorKey, G as ActorKv, H as ActorLogger, I as ActorOptions, J as ActorOptionsInput, K as ActorOptionsSchema, L as ActorQuery, N as ActorQueue, O as ActorRun, P as ActorSchedule, T as ActorTracingOptions, U as ActorTypes, V as ActorsSchema, X as AnyActorInstance, Y as AnyClient, Z as AnyConn, _ as AnyStaticActorDefinition, $ as AnyStaticActorInstance, a0 as AuthIntent, a1 as BUILTIN_INSPECTOR_TAB_IDS, a2 as BaseActorInstance, a3 as BuiltinInspectorTabIdSchema, a4 as CONN_DRIVER_SYMBOL, a5 as CONN_STATE_MANAGER_SYMBOL, a6 as Client, a7 as Conn, a8 as CronFire, a9 as CronJobInfo, aa as CustomInspectorTabEntrySchema, ab as DEFAULT_SLEEP_GRACE_PERIOD, ac as DefineRunHandlerOptions, ad as DocActorConfigSchema, ae as DocActorOptionsSchema, af as DocConfigurePoolSchema, ag as DocEnvoyConfigSchema, ah as DocRegistryConfigSchema, ai as DocServerlessConfigSchema, aj as DocSqliteConfigSchema, ak as FetchHandler, al as GlobalActorOptions, am as GlobalActorOptionsInput, an as GlobalActorOptionsSchema, ao as HideInspectorTabEntrySchema, ap as InferEventArgs, aq as InferSchemaMap, ar as InspectorTabEntrySchema, as as InspectorUnsubscribe, at as InstanceActorOptions, au as InstanceActorOptionsInput, av as InstanceActorOptionsSchema, aw as QueueEnqueueAndWaitOptions, ax as QueueFilterName, ay as QueueIterOptions, az as QueueMessageOf, aA as QueueName, aB as QueueNextBatchOptions, aC as QueueNextOptions, aD as QueueResultMessageForName, aE as QueueTryNextBatchOptions, aF as QueueTryNextOptions, aG as QueueWaitOptions, aH as RAW_STATE_SYMBOL, aI as Registry, aJ as RegistryActors, aK as RegistryApplication, aL as RegistryConfig, aM as RegistryConfigInput, aN as RegistryConfigSchema, aO as RegistryDeps, aP as RegistryListenOptions, aQ as RegistryRoutes, aR as RunConfig, aS as RunConfigSchema, aT as RunControl, aU as RunInspectorConfig, aV as RunInspectorFactoryContext, aW as RunInspectorFactoryResult, aX as RunInspectorKind, aY as RunWithInactiveOptions, aZ as RuntimeKind, a_ as RuntimeKindSchema, a$ as ScheduledEventInfo, b0 as ScheduledFireInfo, b1 as ServerlessHandler, b2 as SqliteBackend, b3 as SqliteBackendSchema, b4 as SqliteConfig, b5 as SqliteConfigSchema, b6 as TestConfig, b7 as TestConfigSchema, b8 as Type, b9 as WasmRuntimeBindings, ba as WasmRuntimeConfig, bb as WasmRuntimeConfigSchema, bc as WasmRuntimeInitInput, bd as WorkflowInspectorConfig, be as WorkflowOutcome, bf as WorkflowSpan, bg as WorkflowStepOutcome, bh as WorkflowStepSpan, bi as actor, bj as buildActorNames, bk as createClientWithDriver, bl as defineRunHandler, bm as disposeRunInspector, bn as event, bo as getRunFunction, bp as getRunInspectorConfig, bq as getRunMetadata, br as isStaticActorDefinition, bs as isStaticActorInstance, bt as lookupInRegistry, bu as queue, bv as setup, bw as test } from './config-Do_0guSS.cjs';
|
|
3
3
|
export { E as Encoding, t as toUint8Array } from './utils-CNFeS-Dk.cjs';
|
|
4
4
|
import { UniversalWebSocket } from '@rivetkit/virtual-websocket';
|
|
5
5
|
export { RivetCloseEvent, RivetEvent, RivetMessageEvent, UniversalWebSocket } from '@rivetkit/virtual-websocket';
|
|
6
6
|
import { A as AnyDatabaseProvider } from './config-ey2I2zz5.cjs';
|
|
7
7
|
export { R as ActorError, R as RivetError, a as RivetErrorLike, b as RivetErrorOptions, U as UserError, c as UserErrorOptions, n as noopNext } from './utils-DsoDinPz.cjs';
|
|
8
8
|
import { WSContext } from 'hono/ws';
|
|
9
|
-
export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-
|
|
9
|
+
export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-CgNkhjdY.cjs';
|
|
10
10
|
import 'zod/v4';
|
|
11
11
|
import '@rivetkit/rivetkit-wasm';
|
|
12
12
|
import 'zod';
|
|
13
13
|
import 'pino';
|
|
14
14
|
import './inspector/workflow.cjs';
|
|
15
15
|
import '@standard-schema/spec';
|
|
16
|
+
import '@rivetkit/engine-api-full';
|
|
16
17
|
import 'hono';
|
|
17
18
|
import 'hono/utils/http-status';
|
|
18
19
|
import '@rivetkit/workflow-engine';
|
package/dist/tsup/mod.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, a as ActionContext, b as BeforeActionResponseContext, c as BeforeConnectContext, C as ConnectContext, d as CreateConnStateContext, e as CreateContext, f as CreateVarsContext, D as DestroyContext, g as DisconnectContext, M as MigrateContext, R as RequestContext, h as RunContext, S as SleepContext, i as StateChangeContext, W as WakeContext, j as WebSocketContext } from './config-
|
|
2
|
-
export { k as ACTOR_CONTEXT_INTERNAL_SYMBOL, l as ActionInputSchemas, m as ActionSampleRates, n as ActionTraceSamplers, o as Actions, p as ActorConfig, q as ActorConfigInput, r as ActorConfigSchema, s as ActorContext, t as ActorContextOf, u as ActorCron, v as ActorCronEveryOptions, w as ActorCronSetOptions, x as ActorDefinition, y as ActorInspectorConfig, z as ActorInspectorConfigSchema, F as ActorKey, G as ActorKv, H as ActorLogger, I as ActorOptions, J as ActorOptionsInput, K as ActorOptionsSchema, L as ActorQuery, N as ActorQueue, O as ActorRun, P as ActorSchedule, T as ActorTracingOptions, U as ActorTypes, V as ActorsSchema, X as AnyActorInstance, Y as AnyClient, Z as AnyConn, _ as AnyStaticActorDefinition, $ as AnyStaticActorInstance, a0 as AuthIntent, a1 as BUILTIN_INSPECTOR_TAB_IDS, a2 as BaseActorInstance, a3 as BuiltinInspectorTabIdSchema, a4 as CONN_DRIVER_SYMBOL, a5 as CONN_STATE_MANAGER_SYMBOL, a6 as Client, a7 as Conn, a8 as CronFire, a9 as CronJobInfo, aa as CustomInspectorTabEntrySchema, ab as DEFAULT_SLEEP_GRACE_PERIOD, ac as DefineRunHandlerOptions, ad as DocActorConfigSchema, ae as DocActorOptionsSchema, af as DocConfigurePoolSchema, ag as DocEnvoyConfigSchema, ah as DocRegistryConfigSchema, ai as DocServerlessConfigSchema, aj as DocSqliteConfigSchema, ak as FetchHandler, al as GlobalActorOptions, am as GlobalActorOptionsInput, an as GlobalActorOptionsSchema, ao as HideInspectorTabEntrySchema, ap as InferEventArgs, aq as InferSchemaMap, ar as InspectorTabEntrySchema, as as InspectorUnsubscribe, at as InstanceActorOptions, au as InstanceActorOptionsInput, av as InstanceActorOptionsSchema, aw as QueueEnqueueAndWaitOptions, ax as QueueFilterName, ay as QueueIterOptions, az as QueueMessageOf, aA as QueueName, aB as QueueNextBatchOptions, aC as QueueNextOptions, aD as QueueResultMessageForName, aE as QueueTryNextBatchOptions, aF as QueueTryNextOptions, aG as QueueWaitOptions, aH as RAW_STATE_SYMBOL, aI as Registry, aJ as RegistryActors, aK as RegistryApplication, aL as RegistryConfig, aM as RegistryConfigInput, aN as RegistryConfigSchema, aO as RegistryDeps, aP as RegistryListenOptions, aQ as RegistryRoutes, aR as RunConfig, aS as RunConfigSchema, aT as RunControl, aU as RunInspectorConfig, aV as RunInspectorFactoryContext, aW as RunInspectorFactoryResult, aX as RunInspectorKind, aY as RunWithInactiveOptions, aZ as RuntimeKind, a_ as RuntimeKindSchema, a$ as ScheduledEventInfo, b0 as ScheduledFireInfo, b1 as ServerlessHandler, b2 as SqliteBackend, b3 as SqliteBackendSchema, b4 as SqliteConfig, b5 as SqliteConfigSchema, b6 as TestConfig, b7 as TestConfigSchema, b8 as Type, b9 as WasmRuntimeBindings, ba as WasmRuntimeConfig, bb as WasmRuntimeConfigSchema, bc as WasmRuntimeInitInput, bd as WorkflowInspectorConfig, be as WorkflowOutcome, bf as WorkflowSpan, bg as WorkflowStepOutcome, bh as WorkflowStepSpan, bi as actor, bj as buildActorNames, bk as createClientWithDriver, bl as defineRunHandler, bm as disposeRunInspector, bn as event, bo as getRunFunction, bp as getRunInspectorConfig, bq as getRunMetadata, br as isStaticActorDefinition, bs as isStaticActorInstance, bt as lookupInRegistry, bu as queue, bv as setup, bw as test } from './config-
|
|
1
|
+
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, a as ActionContext, b as BeforeActionResponseContext, c as BeforeConnectContext, C as ConnectContext, d as CreateConnStateContext, e as CreateContext, f as CreateVarsContext, D as DestroyContext, g as DisconnectContext, M as MigrateContext, R as RequestContext, h as RunContext, S as SleepContext, i as StateChangeContext, W as WakeContext, j as WebSocketContext } from './config-Bc1nnvUl.js';
|
|
2
|
+
export { k as ACTOR_CONTEXT_INTERNAL_SYMBOL, l as ActionInputSchemas, m as ActionSampleRates, n as ActionTraceSamplers, o as Actions, p as ActorConfig, q as ActorConfigInput, r as ActorConfigSchema, s as ActorContext, t as ActorContextOf, u as ActorCron, v as ActorCronEveryOptions, w as ActorCronSetOptions, x as ActorDefinition, y as ActorInspectorConfig, z as ActorInspectorConfigSchema, F as ActorKey, G as ActorKv, H as ActorLogger, I as ActorOptions, J as ActorOptionsInput, K as ActorOptionsSchema, L as ActorQuery, N as ActorQueue, O as ActorRun, P as ActorSchedule, T as ActorTracingOptions, U as ActorTypes, V as ActorsSchema, X as AnyActorInstance, Y as AnyClient, Z as AnyConn, _ as AnyStaticActorDefinition, $ as AnyStaticActorInstance, a0 as AuthIntent, a1 as BUILTIN_INSPECTOR_TAB_IDS, a2 as BaseActorInstance, a3 as BuiltinInspectorTabIdSchema, a4 as CONN_DRIVER_SYMBOL, a5 as CONN_STATE_MANAGER_SYMBOL, a6 as Client, a7 as Conn, a8 as CronFire, a9 as CronJobInfo, aa as CustomInspectorTabEntrySchema, ab as DEFAULT_SLEEP_GRACE_PERIOD, ac as DefineRunHandlerOptions, ad as DocActorConfigSchema, ae as DocActorOptionsSchema, af as DocConfigurePoolSchema, ag as DocEnvoyConfigSchema, ah as DocRegistryConfigSchema, ai as DocServerlessConfigSchema, aj as DocSqliteConfigSchema, ak as FetchHandler, al as GlobalActorOptions, am as GlobalActorOptionsInput, an as GlobalActorOptionsSchema, ao as HideInspectorTabEntrySchema, ap as InferEventArgs, aq as InferSchemaMap, ar as InspectorTabEntrySchema, as as InspectorUnsubscribe, at as InstanceActorOptions, au as InstanceActorOptionsInput, av as InstanceActorOptionsSchema, aw as QueueEnqueueAndWaitOptions, ax as QueueFilterName, ay as QueueIterOptions, az as QueueMessageOf, aA as QueueName, aB as QueueNextBatchOptions, aC as QueueNextOptions, aD as QueueResultMessageForName, aE as QueueTryNextBatchOptions, aF as QueueTryNextOptions, aG as QueueWaitOptions, aH as RAW_STATE_SYMBOL, aI as Registry, aJ as RegistryActors, aK as RegistryApplication, aL as RegistryConfig, aM as RegistryConfigInput, aN as RegistryConfigSchema, aO as RegistryDeps, aP as RegistryListenOptions, aQ as RegistryRoutes, aR as RunConfig, aS as RunConfigSchema, aT as RunControl, aU as RunInspectorConfig, aV as RunInspectorFactoryContext, aW as RunInspectorFactoryResult, aX as RunInspectorKind, aY as RunWithInactiveOptions, aZ as RuntimeKind, a_ as RuntimeKindSchema, a$ as ScheduledEventInfo, b0 as ScheduledFireInfo, b1 as ServerlessHandler, b2 as SqliteBackend, b3 as SqliteBackendSchema, b4 as SqliteConfig, b5 as SqliteConfigSchema, b6 as TestConfig, b7 as TestConfigSchema, b8 as Type, b9 as WasmRuntimeBindings, ba as WasmRuntimeConfig, bb as WasmRuntimeConfigSchema, bc as WasmRuntimeInitInput, bd as WorkflowInspectorConfig, be as WorkflowOutcome, bf as WorkflowSpan, bg as WorkflowStepOutcome, bh as WorkflowStepSpan, bi as actor, bj as buildActorNames, bk as createClientWithDriver, bl as defineRunHandler, bm as disposeRunInspector, bn as event, bo as getRunFunction, bp as getRunInspectorConfig, bq as getRunMetadata, br as isStaticActorDefinition, bs as isStaticActorInstance, bt as lookupInRegistry, bu as queue, bv as setup, bw as test } from './config-Bc1nnvUl.js';
|
|
3
3
|
export { E as Encoding, t as toUint8Array } from './utils-OQHBjfcM.js';
|
|
4
4
|
import { UniversalWebSocket } from '@rivetkit/virtual-websocket';
|
|
5
5
|
export { RivetCloseEvent, RivetEvent, RivetMessageEvent, UniversalWebSocket } from '@rivetkit/virtual-websocket';
|
|
6
6
|
import { A as AnyDatabaseProvider } from './config-ey2I2zz5.js';
|
|
7
7
|
export { R as ActorError, R as RivetError, a as RivetErrorLike, b as RivetErrorOptions, U as UserError, c as UserErrorOptions, n as noopNext } from './utils-DsoDinPz.js';
|
|
8
8
|
import { WSContext } from 'hono/ws';
|
|
9
|
-
export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-
|
|
9
|
+
export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-oGQxZDPz.js';
|
|
10
10
|
import 'zod/v4';
|
|
11
11
|
import '@rivetkit/rivetkit-wasm';
|
|
12
12
|
import 'zod';
|
|
13
13
|
import 'pino';
|
|
14
14
|
import './inspector/workflow.js';
|
|
15
15
|
import '@standard-schema/spec';
|
|
16
|
+
import '@rivetkit/engine-api-full';
|
|
16
17
|
import 'hono';
|
|
17
18
|
import 'hono/utils/http-status';
|
|
18
19
|
import '@rivetkit/workflow-engine';
|
package/dist/tsup/mod.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
decodeWorkflowHistoryTransport
|
|
3
|
+
} from "./chunk-CJXBGTVT.js";
|
|
1
4
|
import {
|
|
2
5
|
ACTOR_CONTEXT_INTERNAL_SYMBOL,
|
|
3
6
|
ActorConfigSchema,
|
|
@@ -15,33 +18,34 @@ import {
|
|
|
15
18
|
getRunMetadata,
|
|
16
19
|
hasRunInspectorConfig
|
|
17
20
|
} from "./chunk-CSOHAAZK.js";
|
|
18
|
-
import {
|
|
19
|
-
decodeWorkflowHistoryTransport
|
|
20
|
-
} from "./chunk-SNNVRHLX.js";
|
|
21
21
|
import {
|
|
22
22
|
ALLOWED_PUBLIC_HEADERS,
|
|
23
|
+
ENGINE_HOST,
|
|
24
|
+
ENGINE_PORT,
|
|
23
25
|
HEADER_CONN_PARAMS,
|
|
24
26
|
HEADER_ORIGINAL_REQUEST_URL,
|
|
25
27
|
RemoteEngineControlClient,
|
|
28
|
+
buildEngineEndpoint,
|
|
26
29
|
convertRegistryConfigToClientConfig,
|
|
27
30
|
createClientWithDriver,
|
|
28
31
|
getDatacenters,
|
|
32
|
+
isLocalEngineEndpoint,
|
|
29
33
|
isResponseLike,
|
|
30
34
|
readActiveTraceHeaders,
|
|
31
35
|
runWithActorInvocationSpan,
|
|
32
36
|
tryParseEndpoint,
|
|
33
37
|
updateRunnerConfig
|
|
34
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-PYRI75DL.js";
|
|
35
39
|
import {
|
|
36
40
|
makePrefixedKey,
|
|
37
41
|
removePrefixFromKey
|
|
38
42
|
} from "./chunk-JI6GZ2C2.js";
|
|
39
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-2CI2IEVN.js";
|
|
40
44
|
import {
|
|
41
45
|
bindNativeStateTransactionContext,
|
|
42
46
|
db,
|
|
43
47
|
registerNativeStateTransactionOpener
|
|
44
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-5EGLHQJJ.js";
|
|
45
49
|
import "./chunk-JTHHCZCZ.js";
|
|
46
50
|
import {
|
|
47
51
|
LogLevelSchema,
|
|
@@ -76,7 +80,7 @@ import {
|
|
|
76
80
|
parsePortEnv,
|
|
77
81
|
stringifyError,
|
|
78
82
|
toUint8Array
|
|
79
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-RGIZNZYO.js";
|
|
80
84
|
import {
|
|
81
85
|
INTERNAL_ERROR_CODE,
|
|
82
86
|
RivetError,
|
|
@@ -385,25 +389,6 @@ var InlineWebSocketAdapter = class {
|
|
|
385
389
|
}
|
|
386
390
|
};
|
|
387
391
|
|
|
388
|
-
// src/common/engine.ts
|
|
389
|
-
var ENGINE_HOST = "127.0.0.1";
|
|
390
|
-
var ENGINE_PORT = 6420;
|
|
391
|
-
var ENGINE_ENDPOINT = buildEngineEndpoint(ENGINE_HOST, ENGINE_PORT);
|
|
392
|
-
function buildEngineEndpoint(host, port) {
|
|
393
|
-
const urlHost = host.includes(":") && !host.startsWith("[") ? `[${host}]` : host;
|
|
394
|
-
return `http://${urlHost}:${port}`;
|
|
395
|
-
}
|
|
396
|
-
function isLocalEngineEndpoint(endpoint) {
|
|
397
|
-
let url;
|
|
398
|
-
try {
|
|
399
|
-
url = new URL(endpoint);
|
|
400
|
-
} catch {
|
|
401
|
-
return false;
|
|
402
|
-
}
|
|
403
|
-
const hostname = url.hostname.toLowerCase();
|
|
404
|
-
return hostname === "localhost" || hostname === "0.0.0.0" || hostname === "::" || hostname === "[::]" || hostname === "::1" || hostname === "[::1]" || /^127(?:\.\d{1,3}){0,3}$/.test(hostname);
|
|
405
|
-
}
|
|
406
|
-
|
|
407
392
|
// src/registry/log.ts
|
|
408
393
|
function logger2() {
|
|
409
394
|
return getLogger("registry");
|
|
@@ -510,20 +495,9 @@ import { z as z3 } from "zod";
|
|
|
510
495
|
|
|
511
496
|
// src/registry/config/envoy.ts
|
|
512
497
|
import { z } from "zod/v4";
|
|
513
|
-
var warnedMissingVersion = false;
|
|
514
498
|
var EnvoyConfigSchema = z.object({
|
|
515
499
|
poolName: z.string().default(() => getRivetPool() ?? "default"),
|
|
516
|
-
version: z.number().default(() =>
|
|
517
|
-
const version = getRivetEnvoyVersion();
|
|
518
|
-
if (version !== void 0) return version;
|
|
519
|
-
if (getNodeEnv() === "production" && !warnedMissingVersion) {
|
|
520
|
-
warnedMissingVersion = true;
|
|
521
|
-
getLogger("rivetkit").error(
|
|
522
|
-
"RIVET_ENVOY_VERSION is not set. Actors will not be versioned, which means they won't be drained on deploy. This is only needed when self-hosting or using a custom envoy (not needed for Rivet Compute). Set this as a build arg in your Dockerfile. See https://rivet.dev/docs/actors/versions"
|
|
523
|
-
);
|
|
524
|
-
}
|
|
525
|
-
return 1;
|
|
526
|
-
}),
|
|
500
|
+
version: z.number().default(() => getRivetEnvoyVersion() ?? 1),
|
|
527
501
|
// Deprecated.
|
|
528
502
|
totalSlots: z.number().default(() => getRivetTotalSlots() ?? 1e5),
|
|
529
503
|
envoyKey: z.string().optional()
|
|
@@ -828,7 +802,7 @@ var RegistryConfigSchema = z3.object({
|
|
|
828
802
|
config.startEngine || parsedEndpoint
|
|
829
803
|
);
|
|
830
804
|
const namespace = (parsedEndpoint == null ? void 0 : parsedEndpoint.namespace) ?? config.namespace ?? "default";
|
|
831
|
-
const token = (parsedEndpoint == null ? void 0 : parsedEndpoint.token) ?? config.token ?? "
|
|
805
|
+
const token = (parsedEndpoint == null ? void 0 : parsedEndpoint.token) ?? config.token ?? (endpoint && isLocalEngineEndpoint(endpoint) ? "default" : void 0);
|
|
832
806
|
const parsedPublicEndpoint = config.serverless.publicEndpoint ? tryParseEndpoint(ctx, {
|
|
833
807
|
endpoint: config.serverless.publicEndpoint,
|
|
834
808
|
path: ["serverless", "publicEndpoint"]
|
|
@@ -7820,7 +7794,23 @@ var Registry = class {
|
|
|
7820
7794
|
* Starts an actor envoy for standalone server deployments.
|
|
7821
7795
|
*/
|
|
7822
7796
|
#startEnvoy(config, printWelcome) {
|
|
7797
|
+
var _a;
|
|
7823
7798
|
if (!this.#runtimeServePromise) {
|
|
7799
|
+
const configuredEnvoyVersion = (_a = this.#config.envoy) == null ? void 0 : _a.version;
|
|
7800
|
+
const envoyVersionSource = configuredEnvoyVersion !== void 0 ? "config" : getRivetEnvoyVersion() !== void 0 ? "environment" : "default";
|
|
7801
|
+
logger2().info({
|
|
7802
|
+
msg: "starting rivetkit envoy",
|
|
7803
|
+
rivetkitVersion: VERSION,
|
|
7804
|
+
envoyVersion: config.envoy.version,
|
|
7805
|
+
envoyVersionSource
|
|
7806
|
+
});
|
|
7807
|
+
if (envoyVersionSource === "default" && getNodeEnv() === "production") {
|
|
7808
|
+
logger2().error({
|
|
7809
|
+
msg: "envoy version defaulted because neither config.envoy.version nor RIVET_ENVOY_VERSION is set; actors will not drain automatically across deploys. See https://rivet.dev/docs/actors/versions",
|
|
7810
|
+
envoyVersion: config.envoy.version,
|
|
7811
|
+
envoyVersionSource
|
|
7812
|
+
});
|
|
7813
|
+
}
|
|
7824
7814
|
const configuredRegistryPromise = this.#buildConfiguredRegistry(config);
|
|
7825
7815
|
this.#runtimeServeConfiguredPromise = configuredRegistryPromise;
|
|
7826
7816
|
this.#runtimeServeLifecyclePromise = configuredRegistryPromise.then(
|