rivetkit 3.1.2-rc.5 → 3.1.2-rc.7

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.
Files changed (91) hide show
  1. package/dist/browser/client.d.ts +0 -14
  2. package/dist/browser/client.js +9 -22
  3. package/dist/browser/client.js.map +1 -1
  4. package/dist/browser/inspector/client.js +1 -1
  5. package/dist/browser/inspector/client.js.map +1 -1
  6. package/dist/tsup/{chunk-6JRISJJK.cjs → chunk-4QYXOAW5.cjs} +4 -4
  7. package/dist/tsup/{chunk-6JRISJJK.cjs.map → chunk-4QYXOAW5.cjs.map} +1 -1
  8. package/dist/tsup/{chunk-62HCCSWY.cjs → chunk-AH3SB6EE.cjs} +3 -3
  9. package/dist/tsup/{chunk-62HCCSWY.cjs.map → chunk-AH3SB6EE.cjs.map} +1 -1
  10. package/dist/tsup/{chunk-ITW5YHD2.cjs → chunk-BEXWAJ6U.cjs} +7 -7
  11. package/dist/tsup/{chunk-ITW5YHD2.cjs.map → chunk-BEXWAJ6U.cjs.map} +1 -1
  12. package/dist/tsup/{chunk-CKNOZ3G3.cjs → chunk-DOJBNDVS.cjs} +5 -3
  13. package/dist/tsup/chunk-DOJBNDVS.cjs.map +1 -0
  14. package/dist/tsup/{chunk-GSS3YRUD.cjs → chunk-EBFFGWLN.cjs} +3 -3
  15. package/dist/tsup/{chunk-GSS3YRUD.cjs.map → chunk-EBFFGWLN.cjs.map} +1 -1
  16. package/dist/tsup/{chunk-W7R5OF2Y.cjs → chunk-ER6SIYWL.cjs} +150 -165
  17. package/dist/tsup/chunk-ER6SIYWL.cjs.map +1 -0
  18. package/dist/tsup/{chunk-J7FZTBPN.js → chunk-FWPWI7QL.js} +2 -2
  19. package/dist/tsup/{chunk-2BOGDAXY.cjs → chunk-GQKAGJK5.cjs} +3 -3
  20. package/dist/tsup/{chunk-2BOGDAXY.cjs.map → chunk-GQKAGJK5.cjs.map} +1 -1
  21. package/dist/tsup/{chunk-3T3EMLZW.js → chunk-HRSJKLCU.js} +5 -3
  22. package/dist/tsup/{chunk-3T3EMLZW.js.map → chunk-HRSJKLCU.js.map} +1 -1
  23. package/dist/tsup/{chunk-6KETXN6K.js → chunk-IOQREPUK.js} +11 -26
  24. package/dist/tsup/chunk-IOQREPUK.js.map +1 -0
  25. package/dist/tsup/{chunk-OLOQ3NAM.js → chunk-L4UTSVE3.js} +3 -3
  26. package/dist/tsup/{chunk-MFJDJ2X6.cjs → chunk-LE3YMWAP.cjs} +10 -10
  27. package/dist/tsup/{chunk-MFJDJ2X6.cjs.map → chunk-LE3YMWAP.cjs.map} +1 -1
  28. package/dist/tsup/{chunk-URACKJQW.js → chunk-LJ6SZFME.js} +2 -2
  29. package/dist/tsup/{chunk-4M2YYW5C.js → chunk-N6GT7FYD.js} +2 -2
  30. package/dist/tsup/{chunk-2PPPGFWJ.js → chunk-NWQJIAG4.js} +4 -4
  31. package/dist/tsup/{chunk-KRUDOIRE.js → chunk-XGN6KETJ.js} +2 -2
  32. package/dist/tsup/client/mod.cjs +5 -5
  33. package/dist/tsup/client/mod.d.cts +4 -4
  34. package/dist/tsup/client/mod.d.ts +4 -4
  35. package/dist/tsup/client/mod.js +4 -4
  36. package/dist/tsup/common/log.cjs +2 -2
  37. package/dist/tsup/common/log.js +1 -1
  38. package/dist/tsup/common/websocket.cjs +3 -3
  39. package/dist/tsup/common/websocket.js +2 -2
  40. package/dist/tsup/{config-BbRMYCV8.d.cts → config-CyOAiV6S.d.cts} +1 -15
  41. package/dist/tsup/{config-CW3AWqHa.d.ts → config-TS1eu7w9.d.ts} +1 -15
  42. package/dist/tsup/{context-NuwP8HjQ.d.cts → context-Cq5UEIVG.d.cts} +1 -1
  43. package/dist/tsup/{context-Cp64yaMW.d.ts → context-CxYw0sLz.d.ts} +1 -1
  44. package/dist/tsup/db/drizzle.cjs +2 -2
  45. package/dist/tsup/db/drizzle.js +1 -1
  46. package/dist/tsup/db/mod.cjs +3 -3
  47. package/dist/tsup/db/mod.js +2 -2
  48. package/dist/tsup/dynamic/mod.d.cts +2 -2
  49. package/dist/tsup/dynamic/mod.d.ts +2 -2
  50. package/dist/tsup/inspector/mod.cjs +5 -5
  51. package/dist/tsup/inspector/mod.js +4 -4
  52. package/dist/tsup/inspector/workflow.cjs +4 -4
  53. package/dist/tsup/inspector/workflow.js +3 -3
  54. package/dist/tsup/inspector-tab/mod.d.cts +3 -3
  55. package/dist/tsup/inspector-tab/mod.d.ts +3 -3
  56. package/dist/tsup/mod.cjs +86 -86
  57. package/dist/tsup/mod.cjs.map +1 -1
  58. package/dist/tsup/mod.d.cts +4 -4
  59. package/dist/tsup/mod.d.ts +4 -4
  60. package/dist/tsup/mod.js +5 -5
  61. package/dist/tsup/test/mod.cjs +6 -6
  62. package/dist/tsup/test/mod.d.cts +2 -2
  63. package/dist/tsup/test/mod.d.ts +2 -2
  64. package/dist/tsup/test/mod.js +4 -4
  65. package/dist/tsup/{utils-C6b0aYUM.d.cts → utils-BctYATXG.d.cts} +4 -1
  66. package/dist/tsup/{utils-C1O-SklO.d.ts → utils-CR1Y49t6.d.ts} +4 -1
  67. package/dist/tsup/utils.cjs +2 -2
  68. package/dist/tsup/utils.d.cts +1 -1
  69. package/dist/tsup/utils.d.ts +1 -1
  70. package/dist/tsup/utils.js +1 -1
  71. package/dist/tsup/workflow/mod.cjs +7 -7
  72. package/dist/tsup/workflow/mod.d.cts +4 -4
  73. package/dist/tsup/workflow/mod.d.ts +4 -4
  74. package/dist/tsup/workflow/mod.js +4 -4
  75. package/package.json +9 -9
  76. package/src/client/actor-conn.ts +6 -7
  77. package/src/client/lifecycle-errors.ts +2 -1
  78. package/src/client/query.ts +4 -4
  79. package/src/engine-api/actors.ts +0 -2
  80. package/src/engine-client/driver.ts +1 -3
  81. package/src/engine-client/mod.ts +1 -11
  82. package/src/utils.ts +7 -2
  83. package/dist/tsup/chunk-6KETXN6K.js.map +0 -1
  84. package/dist/tsup/chunk-CKNOZ3G3.cjs.map +0 -1
  85. package/dist/tsup/chunk-W7R5OF2Y.cjs.map +0 -1
  86. /package/dist/tsup/{chunk-J7FZTBPN.js.map → chunk-FWPWI7QL.js.map} +0 -0
  87. /package/dist/tsup/{chunk-OLOQ3NAM.js.map → chunk-L4UTSVE3.js.map} +0 -0
  88. /package/dist/tsup/{chunk-URACKJQW.js.map → chunk-LJ6SZFME.js.map} +0 -0
  89. /package/dist/tsup/{chunk-4M2YYW5C.js.map → chunk-N6GT7FYD.js.map} +0 -0
  90. /package/dist/tsup/{chunk-2PPPGFWJ.js.map → chunk-NWQJIAG4.js.map} +0 -0
  91. /package/dist/tsup/{chunk-KRUDOIRE.js.map → chunk-XGN6KETJ.js.map} +0 -0
@@ -1,12 +1,12 @@
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-BbRMYCV8.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 ActorFork, z as ActorForkLink, F as ActorInspectorConfig, G as ActorInspectorConfigSchema, H as ActorKey, I as ActorKv, J as ActorLogger, K as ActorOptions, L as ActorOptionsInput, N as ActorOptionsSchema, O as ActorQuery, P as ActorQueue, T as ActorRun, U as ActorSchedule, V as ActorTracingOptions, X as ActorTypes, Y as ActorsSchema, Z as AnyActorInstance, _ as AnyClient, $ as AnyConn, a0 as AnyStaticActorDefinition, a1 as AnyStaticActorInstance, a2 as AuthIntent, a3 as BUILTIN_INSPECTOR_TAB_IDS, a4 as BaseActorInstance, a5 as BuiltinInspectorTabIdSchema, a6 as CONN_DRIVER_SYMBOL, a7 as CONN_STATE_MANAGER_SYMBOL, a8 as Client, a9 as Conn, aa as CronFire, ab as CronJobInfo, ac as CustomInspectorTabEntrySchema, ad as DEFAULT_SLEEP_GRACE_PERIOD, ae as DefineRunHandlerOptions, af as DocActorConfigSchema, ag as DocActorOptionsSchema, ah as DocConfigurePoolSchema, ai as DocEnvoyConfigSchema, aj as DocRegistryConfigSchema, ak as DocServerlessConfigSchema, al as DocSqliteConfigSchema, am as FetchHandler, an as GlobalActorOptions, ao as GlobalActorOptionsInput, ap as GlobalActorOptionsSchema, aq as HideInspectorTabEntrySchema, ar as InferEventArgs, as as InferSchemaMap, at as InspectorTabEntrySchema, au as InspectorUnsubscribe, av as InstanceActorOptions, aw as InstanceActorOptionsInput, ax as InstanceActorOptionsSchema, ay as QueueEnqueueAndWaitOptions, az as QueueFilterName, aA as QueueIterOptions, aB as QueueMessageOf, aC as QueueName, aD as QueueNextBatchOptions, aE as QueueNextOptions, aF as QueueResultMessageForName, aG as QueueTryNextBatchOptions, aH as QueueTryNextOptions, aI as QueueWaitOptions, aJ as RAW_STATE_SYMBOL, aK as Registry, aL as RegistryActors, aM as RegistryApplication, aN as RegistryConfig, aO as RegistryConfigInput, aP as RegistryConfigSchema, aQ as RegistryDeps, aR as RegistryListenOptions, aS as RegistryRoutes, aT as RunConfig, aU as RunConfigSchema, aV as RunControl, aW as RunInspectorConfig, aX as RunInspectorFactoryContext, aY as RunInspectorFactoryResult, aZ as RunInspectorKind, a_ as RunWithInactiveOptions, a$ as RuntimeKind, b0 as RuntimeKindSchema, b1 as ScheduledEventInfo, b2 as ScheduledFireInfo, b3 as ServerlessHandler, b4 as SqliteBackend, b5 as SqliteBackendSchema, b6 as SqliteConfig, b7 as SqliteConfigSchema, b8 as TestConfig, b9 as TestConfigSchema, ba as Type, bb as WasmRuntimeBindings, bc as WasmRuntimeConfig, bd as WasmRuntimeConfigSchema, be as WasmRuntimeInitInput, bf as WorkflowInspectorConfig, bg as WorkflowOutcome, bh as WorkflowSpan, bi as WorkflowStepOutcome, bj as WorkflowStepSpan, bk as actor, bl as buildActorNames, bm as createClientWithDriver, bn as defineRunHandler, bo as disposeRunInspector, bp as event, bq as getRunFunction, br as getRunInspectorConfig, bs as getRunMetadata, bt as isStaticActorDefinition, bu as isStaticActorInstance, bv as lookupInRegistry, bw as queue, bx as setup, by as test } from './config-BbRMYCV8.cjs';
3
- export { E as Encoding, t as toUint8Array } from './utils-C6b0aYUM.cjs';
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-CyOAiV6S.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 ActorFork, z as ActorForkLink, F as ActorInspectorConfig, G as ActorInspectorConfigSchema, H as ActorKey, I as ActorKv, J as ActorLogger, K as ActorOptions, L as ActorOptionsInput, N as ActorOptionsSchema, O as ActorQuery, P as ActorQueue, T as ActorRun, U as ActorSchedule, V as ActorTracingOptions, X as ActorTypes, Y as ActorsSchema, Z as AnyActorInstance, _ as AnyClient, $ as AnyConn, a0 as AnyStaticActorDefinition, a1 as AnyStaticActorInstance, a2 as AuthIntent, a3 as BUILTIN_INSPECTOR_TAB_IDS, a4 as BaseActorInstance, a5 as BuiltinInspectorTabIdSchema, a6 as CONN_DRIVER_SYMBOL, a7 as CONN_STATE_MANAGER_SYMBOL, a8 as Client, a9 as Conn, aa as CronFire, ab as CronJobInfo, ac as CustomInspectorTabEntrySchema, ad as DEFAULT_SLEEP_GRACE_PERIOD, ae as DefineRunHandlerOptions, af as DocActorConfigSchema, ag as DocActorOptionsSchema, ah as DocConfigurePoolSchema, ai as DocEnvoyConfigSchema, aj as DocRegistryConfigSchema, ak as DocServerlessConfigSchema, al as DocSqliteConfigSchema, am as FetchHandler, an as GlobalActorOptions, ao as GlobalActorOptionsInput, ap as GlobalActorOptionsSchema, aq as HideInspectorTabEntrySchema, ar as InferEventArgs, as as InferSchemaMap, at as InspectorTabEntrySchema, au as InspectorUnsubscribe, av as InstanceActorOptions, aw as InstanceActorOptionsInput, ax as InstanceActorOptionsSchema, ay as QueueEnqueueAndWaitOptions, az as QueueFilterName, aA as QueueIterOptions, aB as QueueMessageOf, aC as QueueName, aD as QueueNextBatchOptions, aE as QueueNextOptions, aF as QueueResultMessageForName, aG as QueueTryNextBatchOptions, aH as QueueTryNextOptions, aI as QueueWaitOptions, aJ as RAW_STATE_SYMBOL, aK as Registry, aL as RegistryActors, aM as RegistryApplication, aN as RegistryConfig, aO as RegistryConfigInput, aP as RegistryConfigSchema, aQ as RegistryDeps, aR as RegistryListenOptions, aS as RegistryRoutes, aT as RunConfig, aU as RunConfigSchema, aV as RunControl, aW as RunInspectorConfig, aX as RunInspectorFactoryContext, aY as RunInspectorFactoryResult, aZ as RunInspectorKind, a_ as RunWithInactiveOptions, a$ as RuntimeKind, b0 as RuntimeKindSchema, b1 as ScheduledEventInfo, b2 as ScheduledFireInfo, b3 as ServerlessHandler, b4 as SqliteBackend, b5 as SqliteBackendSchema, b6 as SqliteConfig, b7 as SqliteConfigSchema, b8 as TestConfig, b9 as TestConfigSchema, ba as Type, bb as WasmRuntimeBindings, bc as WasmRuntimeConfig, bd as WasmRuntimeConfigSchema, be as WasmRuntimeInitInput, bf as WorkflowInspectorConfig, bg as WorkflowOutcome, bh as WorkflowSpan, bi as WorkflowStepOutcome, bj as WorkflowStepSpan, bk as actor, bl as buildActorNames, bm as createClientWithDriver, bn as defineRunHandler, bo as disposeRunInspector, bp as event, bq as getRunFunction, br as getRunInspectorConfig, bs as getRunMetadata, bt as isStaticActorDefinition, bu as isStaticActorInstance, bv as lookupInRegistry, bw as queue, bx as setup, by as test } from './config-CyOAiV6S.cjs';
3
+ export { E as Encoding, t as toUint8Array } from './utils-BctYATXG.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-CBTr4IhE.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-3rsE0JvI.cjs';
8
8
  import { WSContext } from 'hono/ws';
9
- export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-NuwP8HjQ.cjs';
9
+ export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-Cq5UEIVG.cjs';
10
10
  import 'zod/v4';
11
11
  import '@rivetkit/rivetkit-wasm';
12
12
  import 'zod';
@@ -1,12 +1,12 @@
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-CW3AWqHa.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 ActorFork, z as ActorForkLink, F as ActorInspectorConfig, G as ActorInspectorConfigSchema, H as ActorKey, I as ActorKv, J as ActorLogger, K as ActorOptions, L as ActorOptionsInput, N as ActorOptionsSchema, O as ActorQuery, P as ActorQueue, T as ActorRun, U as ActorSchedule, V as ActorTracingOptions, X as ActorTypes, Y as ActorsSchema, Z as AnyActorInstance, _ as AnyClient, $ as AnyConn, a0 as AnyStaticActorDefinition, a1 as AnyStaticActorInstance, a2 as AuthIntent, a3 as BUILTIN_INSPECTOR_TAB_IDS, a4 as BaseActorInstance, a5 as BuiltinInspectorTabIdSchema, a6 as CONN_DRIVER_SYMBOL, a7 as CONN_STATE_MANAGER_SYMBOL, a8 as Client, a9 as Conn, aa as CronFire, ab as CronJobInfo, ac as CustomInspectorTabEntrySchema, ad as DEFAULT_SLEEP_GRACE_PERIOD, ae as DefineRunHandlerOptions, af as DocActorConfigSchema, ag as DocActorOptionsSchema, ah as DocConfigurePoolSchema, ai as DocEnvoyConfigSchema, aj as DocRegistryConfigSchema, ak as DocServerlessConfigSchema, al as DocSqliteConfigSchema, am as FetchHandler, an as GlobalActorOptions, ao as GlobalActorOptionsInput, ap as GlobalActorOptionsSchema, aq as HideInspectorTabEntrySchema, ar as InferEventArgs, as as InferSchemaMap, at as InspectorTabEntrySchema, au as InspectorUnsubscribe, av as InstanceActorOptions, aw as InstanceActorOptionsInput, ax as InstanceActorOptionsSchema, ay as QueueEnqueueAndWaitOptions, az as QueueFilterName, aA as QueueIterOptions, aB as QueueMessageOf, aC as QueueName, aD as QueueNextBatchOptions, aE as QueueNextOptions, aF as QueueResultMessageForName, aG as QueueTryNextBatchOptions, aH as QueueTryNextOptions, aI as QueueWaitOptions, aJ as RAW_STATE_SYMBOL, aK as Registry, aL as RegistryActors, aM as RegistryApplication, aN as RegistryConfig, aO as RegistryConfigInput, aP as RegistryConfigSchema, aQ as RegistryDeps, aR as RegistryListenOptions, aS as RegistryRoutes, aT as RunConfig, aU as RunConfigSchema, aV as RunControl, aW as RunInspectorConfig, aX as RunInspectorFactoryContext, aY as RunInspectorFactoryResult, aZ as RunInspectorKind, a_ as RunWithInactiveOptions, a$ as RuntimeKind, b0 as RuntimeKindSchema, b1 as ScheduledEventInfo, b2 as ScheduledFireInfo, b3 as ServerlessHandler, b4 as SqliteBackend, b5 as SqliteBackendSchema, b6 as SqliteConfig, b7 as SqliteConfigSchema, b8 as TestConfig, b9 as TestConfigSchema, ba as Type, bb as WasmRuntimeBindings, bc as WasmRuntimeConfig, bd as WasmRuntimeConfigSchema, be as WasmRuntimeInitInput, bf as WorkflowInspectorConfig, bg as WorkflowOutcome, bh as WorkflowSpan, bi as WorkflowStepOutcome, bj as WorkflowStepSpan, bk as actor, bl as buildActorNames, bm as createClientWithDriver, bn as defineRunHandler, bo as disposeRunInspector, bp as event, bq as getRunFunction, br as getRunInspectorConfig, bs as getRunMetadata, bt as isStaticActorDefinition, bu as isStaticActorInstance, bv as lookupInRegistry, bw as queue, bx as setup, by as test } from './config-CW3AWqHa.js';
3
- export { E as Encoding, t as toUint8Array } from './utils-C1O-SklO.js';
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-TS1eu7w9.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 ActorFork, z as ActorForkLink, F as ActorInspectorConfig, G as ActorInspectorConfigSchema, H as ActorKey, I as ActorKv, J as ActorLogger, K as ActorOptions, L as ActorOptionsInput, N as ActorOptionsSchema, O as ActorQuery, P as ActorQueue, T as ActorRun, U as ActorSchedule, V as ActorTracingOptions, X as ActorTypes, Y as ActorsSchema, Z as AnyActorInstance, _ as AnyClient, $ as AnyConn, a0 as AnyStaticActorDefinition, a1 as AnyStaticActorInstance, a2 as AuthIntent, a3 as BUILTIN_INSPECTOR_TAB_IDS, a4 as BaseActorInstance, a5 as BuiltinInspectorTabIdSchema, a6 as CONN_DRIVER_SYMBOL, a7 as CONN_STATE_MANAGER_SYMBOL, a8 as Client, a9 as Conn, aa as CronFire, ab as CronJobInfo, ac as CustomInspectorTabEntrySchema, ad as DEFAULT_SLEEP_GRACE_PERIOD, ae as DefineRunHandlerOptions, af as DocActorConfigSchema, ag as DocActorOptionsSchema, ah as DocConfigurePoolSchema, ai as DocEnvoyConfigSchema, aj as DocRegistryConfigSchema, ak as DocServerlessConfigSchema, al as DocSqliteConfigSchema, am as FetchHandler, an as GlobalActorOptions, ao as GlobalActorOptionsInput, ap as GlobalActorOptionsSchema, aq as HideInspectorTabEntrySchema, ar as InferEventArgs, as as InferSchemaMap, at as InspectorTabEntrySchema, au as InspectorUnsubscribe, av as InstanceActorOptions, aw as InstanceActorOptionsInput, ax as InstanceActorOptionsSchema, ay as QueueEnqueueAndWaitOptions, az as QueueFilterName, aA as QueueIterOptions, aB as QueueMessageOf, aC as QueueName, aD as QueueNextBatchOptions, aE as QueueNextOptions, aF as QueueResultMessageForName, aG as QueueTryNextBatchOptions, aH as QueueTryNextOptions, aI as QueueWaitOptions, aJ as RAW_STATE_SYMBOL, aK as Registry, aL as RegistryActors, aM as RegistryApplication, aN as RegistryConfig, aO as RegistryConfigInput, aP as RegistryConfigSchema, aQ as RegistryDeps, aR as RegistryListenOptions, aS as RegistryRoutes, aT as RunConfig, aU as RunConfigSchema, aV as RunControl, aW as RunInspectorConfig, aX as RunInspectorFactoryContext, aY as RunInspectorFactoryResult, aZ as RunInspectorKind, a_ as RunWithInactiveOptions, a$ as RuntimeKind, b0 as RuntimeKindSchema, b1 as ScheduledEventInfo, b2 as ScheduledFireInfo, b3 as ServerlessHandler, b4 as SqliteBackend, b5 as SqliteBackendSchema, b6 as SqliteConfig, b7 as SqliteConfigSchema, b8 as TestConfig, b9 as TestConfigSchema, ba as Type, bb as WasmRuntimeBindings, bc as WasmRuntimeConfig, bd as WasmRuntimeConfigSchema, be as WasmRuntimeInitInput, bf as WorkflowInspectorConfig, bg as WorkflowOutcome, bh as WorkflowSpan, bi as WorkflowStepOutcome, bj as WorkflowStepSpan, bk as actor, bl as buildActorNames, bm as createClientWithDriver, bn as defineRunHandler, bo as disposeRunInspector, bp as event, bq as getRunFunction, br as getRunInspectorConfig, bs as getRunMetadata, bt as isStaticActorDefinition, bu as isStaticActorInstance, bv as lookupInRegistry, bw as queue, bx as setup, by as test } from './config-TS1eu7w9.js';
3
+ export { E as Encoding, t as toUint8Array } from './utils-CR1Y49t6.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-CBTr4IhE.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-3rsE0JvI.js';
8
8
  import { WSContext } from 'hono/ws';
9
- export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-Cp64yaMW.js';
9
+ export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-CxYw0sLz.js';
10
10
  import 'zod/v4';
11
11
  import '@rivetkit/rivetkit-wasm';
12
12
  import 'zod';
package/dist/tsup/mod.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  decodeWorkflowHistoryTransport
3
- } from "./chunk-KRUDOIRE.js";
3
+ } from "./chunk-XGN6KETJ.js";
4
4
  import {
5
5
  ACTOR_CONTEXT_INTERNAL_SYMBOL,
6
6
  ActorConfigSchema,
@@ -35,18 +35,18 @@ import {
35
35
  runWithActorInvocationSpan,
36
36
  tryParseEndpoint,
37
37
  updateRunnerConfig
38
- } from "./chunk-6KETXN6K.js";
38
+ } from "./chunk-IOQREPUK.js";
39
39
  import {
40
40
  makePrefixedKey,
41
41
  removePrefixFromKey
42
42
  } from "./chunk-A2CF6PFH.js";
43
+ import "./chunk-FWPWI7QL.js";
43
44
  import {
44
45
  bindNativeStateTransactionContext,
45
46
  db,
46
47
  registerNativeStateTransactionOpener
47
- } from "./chunk-4M2YYW5C.js";
48
+ } from "./chunk-N6GT7FYD.js";
48
49
  import "./chunk-JTHHCZCZ.js";
49
- import "./chunk-J7FZTBPN.js";
50
50
  import {
51
51
  LogLevelSchema,
52
52
  VERSION,
@@ -80,7 +80,7 @@ import {
80
80
  parsePortEnv,
81
81
  stringifyError,
82
82
  toUint8Array
83
- } from "./chunk-3T3EMLZW.js";
83
+ } from "./chunk-HRSJKLCU.js";
84
84
  import {
85
85
  INTERNAL_ERROR_CODE,
86
86
  RivetError,
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
- var _chunkITW5YHD2cjs = require('../chunk-ITW5YHD2.cjs');
3
+ var _chunkBEXWAJ6Ucjs = require('../chunk-BEXWAJ6U.cjs');
4
4
 
5
5
 
6
- var _chunkW7R5OF2Ycjs = require('../chunk-W7R5OF2Y.cjs');
6
+ var _chunkER6SIYWLcjs = require('../chunk-ER6SIYWL.cjs');
7
7
  require('../chunk-RTWH3AX3.cjs');
8
+ require('../chunk-EBFFGWLN.cjs');
8
9
  require('../chunk-KVFIONKQ.cjs');
9
- require('../chunk-GSS3YRUD.cjs');
10
- require('../chunk-CKNOZ3G3.cjs');
10
+ require('../chunk-DOJBNDVS.cjs');
11
11
  require('../chunk-MGI2VVF6.cjs');
12
12
 
13
13
  // src/test/ready.ts
@@ -36,8 +36,8 @@ async function setupTest(c, registry) {
36
36
  registry.config.noWelcome = true;
37
37
  registry.start();
38
38
  await waitForRegistryReady(registry);
39
- const client = _chunkITW5YHD2cjs.createClient.call(void 0, {
40
- ..._chunkW7R5OF2Ycjs.convertRegistryConfigToClientConfig.call(void 0, registry.parseConfig()),
39
+ const client = _chunkBEXWAJ6Ucjs.createClient.call(void 0, {
40
+ ..._chunkER6SIYWLcjs.convertRegistryConfigToClientConfig.call(void 0, registry.parseConfig()),
41
41
  disableMetadataLookup: false
42
42
  });
43
43
  c.onTestFinished(async () => {
@@ -1,5 +1,5 @@
1
1
  import { TestContext } from 'vitest';
2
- import { aK as Registry, a8 as Client } from '../config-BbRMYCV8.cjs';
2
+ import { aK as Registry, a8 as Client } from '../config-CyOAiV6S.cjs';
3
3
  import 'zod/v4';
4
4
  import '../config-CBTr4IhE.cjs';
5
5
  import '@rivetkit/rivetkit-wasm';
@@ -9,7 +9,7 @@ import '@rivetkit/virtual-websocket';
9
9
  import '../inspector/workflow.cjs';
10
10
  import '@standard-schema/spec';
11
11
  import '@rivetkit/engine-api-full';
12
- import '../utils-C6b0aYUM.cjs';
12
+ import '../utils-BctYATXG.cjs';
13
13
  import 'hono';
14
14
  import '../utils-3rsE0JvI.cjs';
15
15
  import 'hono/utils/http-status';
@@ -1,5 +1,5 @@
1
1
  import { TestContext } from 'vitest';
2
- import { aK as Registry, a8 as Client } from '../config-CW3AWqHa.js';
2
+ import { aK as Registry, a8 as Client } from '../config-TS1eu7w9.js';
3
3
  import 'zod/v4';
4
4
  import '../config-CBTr4IhE.js';
5
5
  import '@rivetkit/rivetkit-wasm';
@@ -9,7 +9,7 @@ import '@rivetkit/virtual-websocket';
9
9
  import '../inspector/workflow.js';
10
10
  import '@standard-schema/spec';
11
11
  import '@rivetkit/engine-api-full';
12
- import '../utils-C1O-SklO.js';
12
+ import '../utils-CR1Y49t6.js';
13
13
  import 'hono';
14
14
  import '../utils-3rsE0JvI.js';
15
15
  import 'hono/utils/http-status';
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createClient
3
- } from "../chunk-OLOQ3NAM.js";
3
+ } from "../chunk-L4UTSVE3.js";
4
4
  import {
5
5
  convertRegistryConfigToClientConfig
6
- } from "../chunk-6KETXN6K.js";
6
+ } from "../chunk-IOQREPUK.js";
7
7
  import "../chunk-A2CF6PFH.js";
8
+ import "../chunk-FWPWI7QL.js";
8
9
  import "../chunk-JTHHCZCZ.js";
9
- import "../chunk-J7FZTBPN.js";
10
- import "../chunk-3T3EMLZW.js";
10
+ import "../chunk-HRSJKLCU.js";
11
11
  import "../chunk-ZOVJDAOW.js";
12
12
 
13
13
  // src/test/ready.ts
@@ -84,9 +84,12 @@ type LongTimeoutHandle = {
84
84
  *
85
85
  * This is specifically for Cloudflare Workers. Their implementation of Promise.withResolvers does not work correctly.
86
86
  *
87
+ * `onReject` runs on every rejection, so a promise given one never reports as unhandled. Omit it when the
88
+ * caller awaits the promise and handles its rejection.
89
+ *
87
90
  * @experimental
88
91
  */
89
- declare function promiseWithResolvers<T>(onReject: (reason?: any) => void): {
92
+ declare function promiseWithResolvers<T>(onReject?: (reason?: any) => void): {
90
93
  promise: Promise<T>;
91
94
  resolve: (value: T | PromiseLike<T>) => void;
92
95
  reject: (reason?: any) => void;
@@ -84,9 +84,12 @@ type LongTimeoutHandle = {
84
84
  *
85
85
  * This is specifically for Cloudflare Workers. Their implementation of Promise.withResolvers does not work correctly.
86
86
  *
87
+ * `onReject` runs on every rejection, so a promise given one never reports as unhandled. Omit it when the
88
+ * caller awaits the promise and handles its rejection.
89
+ *
87
90
  * @experimental
88
91
  */
89
- declare function promiseWithResolvers<T>(onReject: (reason?: any) => void): {
92
+ declare function promiseWithResolvers<T>(onReject?: (reason?: any) => void): {
90
93
  promise: Promise<T>;
91
94
  resolve: (value: T | PromiseLike<T>) => void;
92
95
  reject: (reason?: any) => void;
@@ -19,7 +19,7 @@
19
19
 
20
20
 
21
21
 
22
- var _chunkCKNOZ3G3cjs = require('./chunk-CKNOZ3G3.cjs');
22
+ var _chunkDOJBNDVScjs = require('./chunk-DOJBNDVS.cjs');
23
23
  require('./chunk-MGI2VVF6.cjs');
24
24
 
25
25
 
@@ -42,5 +42,5 @@ require('./chunk-MGI2VVF6.cjs');
42
42
 
43
43
 
44
44
 
45
- exports.EXTRA_ERROR_LOG = _chunkCKNOZ3G3cjs.EXTRA_ERROR_LOG; exports.SinglePromiseQueue = _chunkCKNOZ3G3cjs.SinglePromiseQueue; exports.VERSION = _chunkCKNOZ3G3cjs.VERSION; exports.arrayBuffersEqual = _chunkCKNOZ3G3cjs.arrayBuffersEqual; exports.assertUnreachable = _chunkCKNOZ3G3cjs.assertUnreachable; exports.bufferToArrayBuffer = _chunkCKNOZ3G3cjs.bufferToArrayBuffer; exports.combineUrlPath = _chunkCKNOZ3G3cjs.combineUrlPath; exports.dbg = _chunkCKNOZ3G3cjs.dbg; exports.detectRuntime = _chunkCKNOZ3G3cjs.detectRuntime; exports.getEnvUniversal = _chunkCKNOZ3G3cjs.getEnvUniversal; exports.httpUserAgent = _chunkCKNOZ3G3cjs.httpUserAgent; exports.interval = _chunkCKNOZ3G3cjs.interval; exports.joinSignals = _chunkCKNOZ3G3cjs.joinSignals; exports.jsonParseCompat = _chunkCKNOZ3G3cjs.jsonParseCompat; exports.jsonStringifyCompat = _chunkCKNOZ3G3cjs.jsonStringifyCompat; exports.promiseWithResolvers = _chunkCKNOZ3G3cjs.promiseWithResolvers; exports.setLongTimeout = _chunkCKNOZ3G3cjs.setLongTimeout; exports.sleep = _chunkCKNOZ3G3cjs.sleep; exports.stringifyError = _chunkCKNOZ3G3cjs.stringifyError; exports.toUint8Array = _chunkCKNOZ3G3cjs.toUint8Array;
45
+ exports.EXTRA_ERROR_LOG = _chunkDOJBNDVScjs.EXTRA_ERROR_LOG; exports.SinglePromiseQueue = _chunkDOJBNDVScjs.SinglePromiseQueue; exports.VERSION = _chunkDOJBNDVScjs.VERSION; exports.arrayBuffersEqual = _chunkDOJBNDVScjs.arrayBuffersEqual; exports.assertUnreachable = _chunkDOJBNDVScjs.assertUnreachable; exports.bufferToArrayBuffer = _chunkDOJBNDVScjs.bufferToArrayBuffer; exports.combineUrlPath = _chunkDOJBNDVScjs.combineUrlPath; exports.dbg = _chunkDOJBNDVScjs.dbg; exports.detectRuntime = _chunkDOJBNDVScjs.detectRuntime; exports.getEnvUniversal = _chunkDOJBNDVScjs.getEnvUniversal; exports.httpUserAgent = _chunkDOJBNDVScjs.httpUserAgent; exports.interval = _chunkDOJBNDVScjs.interval; exports.joinSignals = _chunkDOJBNDVScjs.joinSignals; exports.jsonParseCompat = _chunkDOJBNDVScjs.jsonParseCompat; exports.jsonStringifyCompat = _chunkDOJBNDVScjs.jsonStringifyCompat; exports.promiseWithResolvers = _chunkDOJBNDVScjs.promiseWithResolvers; exports.setLongTimeout = _chunkDOJBNDVScjs.setLongTimeout; exports.sleep = _chunkDOJBNDVScjs.sleep; exports.stringifyError = _chunkDOJBNDVScjs.stringifyError; exports.toUint8Array = _chunkDOJBNDVScjs.toUint8Array;
46
46
  //# sourceMappingURL=utils.cjs.map
@@ -1,5 +1,5 @@
1
1
  import 'hono';
2
2
  export { d as assertUnreachable, s as stringifyError } from './utils-3rsE0JvI.cjs';
3
- export { D as DeepMutable, a as DeepReadonly, b as EXTRA_ERROR_LOG, G as GetUpgradeWebSocket, L as LongTimeoutHandle, R as Runtime, S as SinglePromiseQueue, U as UpgradeWebSocket, V as VERSION, c as arrayBuffersEqual, d as bufferToArrayBuffer, e as combineUrlPath, f as dbg, g as detectRuntime, h as getEnvUniversal, i as httpUserAgent, j as interval, k as joinSignals, l as jsonParseCompat, m as jsonStringifyCompat, p as promiseWithResolvers, s as setLongTimeout, n as sleep, t as toUint8Array } from './utils-C6b0aYUM.cjs';
3
+ export { D as DeepMutable, a as DeepReadonly, b as EXTRA_ERROR_LOG, G as GetUpgradeWebSocket, L as LongTimeoutHandle, R as Runtime, S as SinglePromiseQueue, U as UpgradeWebSocket, V as VERSION, c as arrayBuffersEqual, d as bufferToArrayBuffer, e as combineUrlPath, f as dbg, g as detectRuntime, h as getEnvUniversal, i as httpUserAgent, j as interval, k as joinSignals, l as jsonParseCompat, m as jsonStringifyCompat, p as promiseWithResolvers, s as setLongTimeout, n as sleep, t as toUint8Array } from './utils-BctYATXG.cjs';
4
4
  import 'hono/utils/http-status';
5
5
  import 'zod/v4';
@@ -1,5 +1,5 @@
1
1
  import 'hono';
2
2
  export { d as assertUnreachable, s as stringifyError } from './utils-3rsE0JvI.js';
3
- export { D as DeepMutable, a as DeepReadonly, b as EXTRA_ERROR_LOG, G as GetUpgradeWebSocket, L as LongTimeoutHandle, R as Runtime, S as SinglePromiseQueue, U as UpgradeWebSocket, V as VERSION, c as arrayBuffersEqual, d as bufferToArrayBuffer, e as combineUrlPath, f as dbg, g as detectRuntime, h as getEnvUniversal, i as httpUserAgent, j as interval, k as joinSignals, l as jsonParseCompat, m as jsonStringifyCompat, p as promiseWithResolvers, s as setLongTimeout, n as sleep, t as toUint8Array } from './utils-C1O-SklO.js';
3
+ export { D as DeepMutable, a as DeepReadonly, b as EXTRA_ERROR_LOG, G as GetUpgradeWebSocket, L as LongTimeoutHandle, R as Runtime, S as SinglePromiseQueue, U as UpgradeWebSocket, V as VERSION, c as arrayBuffersEqual, d as bufferToArrayBuffer, e as combineUrlPath, f as dbg, g as detectRuntime, h as getEnvUniversal, i as httpUserAgent, j as interval, k as joinSignals, l as jsonParseCompat, m as jsonStringifyCompat, p as promiseWithResolvers, s as setLongTimeout, n as sleep, t as toUint8Array } from './utils-CR1Y49t6.js';
4
4
  import 'hono/utils/http-status';
5
5
  import 'zod/v4';
@@ -19,7 +19,7 @@ import {
19
19
  sleep,
20
20
  stringifyError,
21
21
  toUint8Array
22
- } from "./chunk-3T3EMLZW.js";
22
+ } from "./chunk-HRSJKLCU.js";
23
23
  import "./chunk-ZOVJDAOW.js";
24
24
  export {
25
25
  EXTRA_ERROR_LOG,
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } var _class; var _class2;
2
2
 
3
- var _chunkMFJDJ2X6cjs = require('../chunk-MFJDJ2X6.cjs');
4
- require('../chunk-2BOGDAXY.cjs');
5
- require('../chunk-6JRISJJK.cjs');
3
+ var _chunkLE3YMWAPcjs = require('../chunk-LE3YMWAP.cjs');
4
+ require('../chunk-GQKAGJK5.cjs');
5
+ require('../chunk-4QYXOAW5.cjs');
6
6
 
7
7
 
8
8
 
@@ -13,7 +13,7 @@ var _chunkAQJFKHBKcjs = require('../chunk-AQJFKHBK.cjs');
13
13
  var _chunkRTWH3AX3cjs = require('../chunk-RTWH3AX3.cjs');
14
14
 
15
15
 
16
- var _chunkCKNOZ3G3cjs = require('../chunk-CKNOZ3G3.cjs');
16
+ var _chunkDOJBNDVScjs = require('../chunk-DOJBNDVS.cjs');
17
17
 
18
18
 
19
19
 
@@ -769,7 +769,7 @@ function workflow(fn, options = {}) {
769
769
  function getWorkflowInspector(actorId) {
770
770
  let workflowInspector = workflowInspectors.get(actorId);
771
771
  if (!workflowInspector) {
772
- workflowInspector = _chunkMFJDJ2X6cjs.createWorkflowInspectorAdapter.call(void 0, );
772
+ workflowInspector = _chunkLE3YMWAPcjs.createWorkflowInspectorAdapter.call(void 0, );
773
773
  workflowInspectors.set(actorId, workflowInspector);
774
774
  }
775
775
  return workflowInspector;
@@ -842,13 +842,13 @@ function workflow(fn, options = {}) {
842
842
  if (shouldRethrowWorkflowError(error)) {
843
843
  runCtx.log.error({
844
844
  msg: "workflow run failed",
845
- error: _chunkCKNOZ3G3cjs.stringifyError.call(void 0, error)
845
+ error: _chunkDOJBNDVScjs.stringifyError.call(void 0, error)
846
846
  });
847
847
  throw error;
848
848
  }
849
849
  runCtx.log.warn({
850
850
  msg: "workflow failed and will sleep until woken",
851
- error: _chunkCKNOZ3G3cjs.stringifyError.call(void 0, error)
851
+ error: _chunkDOJBNDVScjs.stringifyError.call(void 0, error)
852
852
  });
853
853
  } finally {
854
854
  runCtx.abortSignal.removeEventListener("abort", onAbort);
@@ -1,9 +1,9 @@
1
1
  import { WorkflowErrorEvent } from '@rivetkit/workflow-engine';
2
2
  export { Loop, TryBlockCatchKind, TryBlockConfig, TryBlockFailure, TryBlockResult, TryStepCatchKind, TryStepConfig, TryStepFailure, TryStepResult, WorkflowError, WorkflowErrorEvent } from '@rivetkit/workflow-engine';
3
- import { E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext } from '../config-BbRMYCV8.cjs';
3
+ import { E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext } from '../config-CyOAiV6S.cjs';
4
4
  import { A as AnyDatabaseProvider } from '../config-CBTr4IhE.cjs';
5
- import { d as WorkflowContext } from '../context-NuwP8HjQ.cjs';
6
- export { e as WorkflowBranchConfig, W as WorkflowBranchContextOf, a as WorkflowContextOf, f as WorkflowLoopConfig, b as WorkflowLoopContextOf, g as WorkflowStepConfig, h as WorkflowStepContext, c as WorkflowStepContextOf, i as WorkflowTryConfig, j as WorkflowTryStepConfig } from '../context-NuwP8HjQ.cjs';
5
+ import { d as WorkflowContext } from '../context-Cq5UEIVG.cjs';
6
+ export { e as WorkflowBranchConfig, W as WorkflowBranchContextOf, a as WorkflowContextOf, f as WorkflowLoopConfig, b as WorkflowLoopContextOf, g as WorkflowStepConfig, h as WorkflowStepContext, c as WorkflowStepContextOf, i as WorkflowTryConfig, j as WorkflowTryStepConfig } from '../context-Cq5UEIVG.cjs';
7
7
  import 'zod/v4';
8
8
  import '@rivetkit/rivetkit-wasm';
9
9
  import 'zod';
@@ -12,7 +12,7 @@ import '@rivetkit/virtual-websocket';
12
12
  import '../inspector/workflow.cjs';
13
13
  import '@standard-schema/spec';
14
14
  import '@rivetkit/engine-api-full';
15
- import '../utils-C6b0aYUM.cjs';
15
+ import '../utils-BctYATXG.cjs';
16
16
  import 'hono';
17
17
  import '../utils-3rsE0JvI.cjs';
18
18
  import 'hono/utils/http-status';
@@ -1,9 +1,9 @@
1
1
  import { WorkflowErrorEvent } from '@rivetkit/workflow-engine';
2
2
  export { Loop, TryBlockCatchKind, TryBlockConfig, TryBlockFailure, TryBlockResult, TryStepCatchKind, TryStepConfig, TryStepFailure, TryStepResult, WorkflowError, WorkflowErrorEvent } from '@rivetkit/workflow-engine';
3
- import { E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext } from '../config-CW3AWqHa.js';
3
+ import { E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext } from '../config-TS1eu7w9.js';
4
4
  import { A as AnyDatabaseProvider } from '../config-CBTr4IhE.js';
5
- import { d as WorkflowContext } from '../context-Cp64yaMW.js';
6
- export { e as WorkflowBranchConfig, W as WorkflowBranchContextOf, a as WorkflowContextOf, f as WorkflowLoopConfig, b as WorkflowLoopContextOf, g as WorkflowStepConfig, h as WorkflowStepContext, c as WorkflowStepContextOf, i as WorkflowTryConfig, j as WorkflowTryStepConfig } from '../context-Cp64yaMW.js';
5
+ import { d as WorkflowContext } from '../context-CxYw0sLz.js';
6
+ export { e as WorkflowBranchConfig, W as WorkflowBranchContextOf, a as WorkflowContextOf, f as WorkflowLoopConfig, b as WorkflowLoopContextOf, g as WorkflowStepConfig, h as WorkflowStepContext, c as WorkflowStepContextOf, i as WorkflowTryConfig, j as WorkflowTryStepConfig } from '../context-CxYw0sLz.js';
7
7
  import 'zod/v4';
8
8
  import '@rivetkit/rivetkit-wasm';
9
9
  import 'zod';
@@ -12,7 +12,7 @@ import '@rivetkit/virtual-websocket';
12
12
  import '../inspector/workflow.js';
13
13
  import '@standard-schema/spec';
14
14
  import '@rivetkit/engine-api-full';
15
- import '../utils-C1O-SklO.js';
15
+ import '../utils-CR1Y49t6.js';
16
16
  import 'hono';
17
17
  import '../utils-3rsE0JvI.js';
18
18
  import 'hono/utils/http-status';
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createWorkflowInspectorAdapter
3
- } from "../chunk-2PPPGFWJ.js";
4
- import "../chunk-URACKJQW.js";
5
- import "../chunk-KRUDOIRE.js";
3
+ } from "../chunk-NWQJIAG4.js";
4
+ import "../chunk-LJ6SZFME.js";
5
+ import "../chunk-XGN6KETJ.js";
6
6
  import {
7
7
  ACTOR_CONTEXT_INTERNAL_SYMBOL,
8
8
  defineRunHandler
@@ -13,7 +13,7 @@ import {
13
13
  } from "../chunk-A2CF6PFH.js";
14
14
  import {
15
15
  stringifyError
16
- } from "../chunk-3T3EMLZW.js";
16
+ } from "../chunk-HRSJKLCU.js";
17
17
  import {
18
18
  RivetError,
19
19
  isActorAbortedError
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rivetkit",
3
- "version": "3.1.2-rc.5",
3
+ "version": "3.1.2-rc.7",
4
4
  "description": "Lightweight libraries for building stateful actors on edge platforms",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -211,15 +211,15 @@
211
211
  "@hono/zod-openapi": "^1.1.5",
212
212
  "@opentelemetry/api": "^1.1.0",
213
213
  "@rivetkit/bare-ts": "^0.6.2",
214
- "@rivetkit/engine-api-full": "3.1.2-rc.5",
215
- "@rivetkit/engine-cli": "3.1.2-rc.5",
216
- "@rivetkit/engine-envoy-protocol": "3.1.2-rc.5",
214
+ "@rivetkit/engine-api-full": "3.1.2-rc.7",
215
+ "@rivetkit/engine-cli": "3.1.2-rc.7",
216
+ "@rivetkit/engine-envoy-protocol": "3.1.2-rc.7",
217
217
  "@rivetkit/on-change": "6.0.1",
218
- "@rivetkit/rivetkit-napi": "3.1.2-rc.5",
219
- "@rivetkit/rivetkit-wasm": "3.1.2-rc.5",
220
- "@rivetkit/traces": "3.1.2-rc.5",
221
- "@rivetkit/virtual-websocket": "3.1.2-rc.5",
222
- "@rivetkit/workflow-engine": "3.1.2-rc.5",
218
+ "@rivetkit/rivetkit-napi": "3.1.2-rc.7",
219
+ "@rivetkit/rivetkit-wasm": "3.1.2-rc.7",
220
+ "@rivetkit/traces": "3.1.2-rc.7",
221
+ "@rivetkit/virtual-websocket": "3.1.2-rc.7",
222
+ "@rivetkit/workflow-engine": "3.1.2-rc.7",
223
223
  "cbor-x": "^1.6.0",
224
224
  "drizzle-orm": "0.45.2",
225
225
  "hono": "^4.7.0",
@@ -381,12 +381,7 @@ export class ActorConnRaw {
381
381
  const { promise, resolve, reject } = promiseWithResolvers<{
382
382
  id: bigint;
383
383
  output: unknown;
384
- }>((reason) =>
385
- logger().warn({
386
- msg: "unhandled action promise rejection",
387
- reason,
388
- }),
389
- );
384
+ }>();
390
385
  this.#actionsInFlight.set(actionId, {
391
386
  name: opts.name,
392
387
  resolve,
@@ -1069,7 +1064,11 @@ export class ActorConnRaw {
1069
1064
  error = new errors.ActorError(
1070
1065
  group,
1071
1066
  code,
1072
- `Connection closed: ${reason}`,
1067
+ group === "guard" &&
1068
+ code === "service_unavailable" &&
1069
+ retryAfterMs !== undefined
1070
+ ? `The gateway could not open the actor connection. RivetKit will retry automatically after at least ${retryAfterMs} ms. If connection failures increase with load, reduce concurrent connection attempts and ramp up gradually. If they persist at low load, ask your cluster operator to check gateway and storage health.`
1071
+ : `Connection closed: ${reason}`,
1073
1072
  closeOptions,
1074
1073
  );
1075
1074
  }
@@ -345,7 +345,8 @@ export function isRetryableCreateRefusal(error: unknown): boolean {
345
345
  }
346
346
  return (
347
347
  (error.group === "depot" &&
348
- (error.code === "overloaded" || error.code === "read_interrupted")) ||
348
+ (error.code === "overloaded" ||
349
+ error.code === "read_interrupted")) ||
349
350
  (error.group === "guard" && error.code === "service_unavailable") ||
350
351
  (error.group === "namespace" && error.code === "creating")
351
352
  );
@@ -17,12 +17,12 @@ export const ActorKeySchema = z.array(z.string().max(MAX_ACTOR_KEY_SIZE));
17
17
  export type ActorKey = z.infer<typeof ActorKeySchema>;
18
18
 
19
19
  /**
20
- * Crash policy for actor lifecycle management.
20
+ * Crash policy sent as `rvt-crash-policy` when a gateway query creates an actor.
21
21
  *
22
- * This schema is only used by the engine driver for actor creation. The manager
23
- * driver ignores crash policy and passes it through to the engine unchanged.
22
+ * The engine supports only `sleep`: a crashed actor sleeps and wakes on its next
23
+ * request. The gateway rejects any other value.
24
24
  */
25
- export const CrashPolicySchema = z.enum(["restart", "sleep", "destroy"]);
25
+ export const CrashPolicySchema = z.enum(["sleep"]);
26
26
 
27
27
  export type CrashPolicy = z.infer<typeof CrashPolicySchema>;
28
28
 
@@ -32,7 +32,6 @@ export const ActorsCreateRequestSchema = z.object({
32
32
  datacenter: z.string().optional(),
33
33
  name: z.string(),
34
34
  pool: z.string(),
35
- crash_policy: z.string(),
36
35
  key: z.string().nullable().optional(),
37
36
  input: z.string().nullable().optional(),
38
37
  });
@@ -61,7 +60,6 @@ export const ActorsGetOrCreateRequestSchema = z.object({
61
60
  name: z.string(),
62
61
  key: z.string(),
63
62
  pool: z.string(),
64
- crash_policy: z.string(),
65
63
  input: z.string().nullable().optional(),
66
64
  });
67
65
  export type ActorsGetOrCreateRequest = z.infer<
@@ -1,6 +1,6 @@
1
1
  import type { Hono, Context as HonoContext } from "hono";
2
2
  import type { ActorKey, Encoding, UniversalWebSocket } from "@/actor/mod";
3
- import type { ActorQuery, CrashPolicy } from "@/client/query";
3
+ import type { ActorQuery } from "@/client/query";
4
4
  import type { IssuedToken, IssueTokenOptions } from "@/client/auth";
5
5
  import type { RegistryConfig } from "@/registry/config";
6
6
  import type { GetUpgradeWebSocket } from "@/utils";
@@ -91,7 +91,6 @@ export interface GetOrCreateWithKeyInput {
91
91
  key: ActorKey;
92
92
  input?: unknown;
93
93
  region?: string;
94
- crashPolicy?: CrashPolicy;
95
94
  /** Overrides the client's configured pool name for this actor. */
96
95
  poolName?: string;
97
96
  }
@@ -102,7 +101,6 @@ export interface CreateInput {
102
101
  key: ActorKey;
103
102
  input?: unknown;
104
103
  region?: string;
105
- crashPolicy?: CrashPolicy;
106
104
  /** Overrides the client's configured pool name for this actor. */
107
105
  poolName?: string;
108
106
  }
@@ -235,14 +235,7 @@ export class RemoteEngineControlClient implements EngineControlClient {
235
235
  ): Promise<ActorOutput> {
236
236
  await this.#metadataPromise;
237
237
 
238
- const {
239
- name,
240
- key,
241
- input: actorInput,
242
- region,
243
- crashPolicy,
244
- poolName,
245
- } = input;
238
+ const { name, key, input: actorInput, region, poolName } = input;
246
239
 
247
240
  logger().info({
248
241
  msg: "getOrCreateWithKey: getting or creating actor via engine api",
@@ -262,7 +255,6 @@ export class RemoteEngineControlClient implements EngineControlClient {
262
255
  encodeCborCompat(actorInput as JsonCompatValue),
263
256
  )
264
257
  : undefined,
265
- crash_policy: crashPolicy ?? "sleep",
266
258
  }),
267
259
  );
268
260
 
@@ -315,7 +307,6 @@ export class RemoteEngineControlClient implements EngineControlClient {
315
307
  key,
316
308
  input,
317
309
  region,
318
- crashPolicy,
319
310
  poolName,
320
311
  }: CreateInput): Promise<ActorOutput> {
321
312
  await this.#metadataPromise;
@@ -334,7 +325,6 @@ export class RemoteEngineControlClient implements EngineControlClient {
334
325
  encodeCborCompat(input as JsonCompatValue),
335
326
  )
336
327
  : undefined,
337
- crash_policy: crashPolicy ?? "sleep",
338
328
  }),
339
329
  );
340
330
 
package/src/utils.ts CHANGED
@@ -205,9 +205,12 @@ export type LongTimeoutHandle = { abort: () => void };
205
205
  *
206
206
  * This is specifically for Cloudflare Workers. Their implementation of Promise.withResolvers does not work correctly.
207
207
  *
208
+ * `onReject` runs on every rejection, so a promise given one never reports as unhandled. Omit it when the
209
+ * caller awaits the promise and handles its rejection.
210
+ *
208
211
  * @experimental
209
212
  */
210
- export function promiseWithResolvers<T>(onReject: (reason?: any) => void): {
213
+ export function promiseWithResolvers<T>(onReject?: (reason?: any) => void): {
211
214
  promise: Promise<T>;
212
215
  resolve: (value: T | PromiseLike<T>) => void;
213
216
  reject: (reason?: any) => void;
@@ -218,7 +221,9 @@ export function promiseWithResolvers<T>(onReject: (reason?: any) => void): {
218
221
  resolve = res;
219
222
  reject = rej;
220
223
  });
221
- promise.catch(onReject);
224
+ if (onReject) {
225
+ promise.catch(onReject);
226
+ }
222
227
  return { promise, resolve, reject };
223
228
  }
224
229