rivetkit 2.3.0-rc.12 → 2.3.0-rc.13

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 (113) hide show
  1. package/dist/browser/client.d.ts +50 -0
  2. package/dist/browser/client.js +98 -84
  3. package/dist/browser/client.js.map +1 -1
  4. package/dist/browser/inspector/client.js +12 -2
  5. package/dist/browser/inspector/client.js.map +1 -1
  6. package/dist/tsup/actor/errors.d.cts +1 -1
  7. package/dist/tsup/actor/errors.d.ts +1 -1
  8. package/dist/tsup/agent-os/index.cjs +66 -3
  9. package/dist/tsup/agent-os/index.cjs.map +1 -1
  10. package/dist/tsup/agent-os/index.d.cts +50 -0
  11. package/dist/tsup/agent-os/index.d.ts +50 -0
  12. package/dist/tsup/agent-os/index.js +66 -3
  13. package/dist/tsup/agent-os/index.js.map +1 -1
  14. package/dist/tsup/{chunk-EWVOWEMD.js → chunk-33YE6XCI.js} +4 -4
  15. package/dist/tsup/{chunk-2ZTBRZRS.cjs → chunk-7OR3CHD5.cjs} +10 -10
  16. package/dist/tsup/{chunk-2ZTBRZRS.cjs.map → chunk-7OR3CHD5.cjs.map} +1 -1
  17. package/dist/tsup/{chunk-UETC5RF7.cjs → chunk-7XQCARVY.cjs} +3 -3
  18. package/dist/tsup/{chunk-UETC5RF7.cjs.map → chunk-7XQCARVY.cjs.map} +1 -1
  19. package/dist/tsup/{chunk-SS56HFM2.cjs → chunk-BSPS6NSN.cjs} +5 -5
  20. package/dist/tsup/{chunk-SS56HFM2.cjs.map → chunk-BSPS6NSN.cjs.map} +1 -1
  21. package/dist/tsup/{chunk-WIMUFZVJ.js → chunk-DPIMKYNB.js} +61 -2
  22. package/dist/tsup/chunk-DPIMKYNB.js.map +1 -0
  23. package/dist/tsup/{chunk-2U6RLFKX.cjs → chunk-E5CLYAUZ.cjs} +144 -142
  24. package/dist/tsup/chunk-E5CLYAUZ.cjs.map +1 -0
  25. package/dist/tsup/{chunk-VNMIAPPF.cjs → chunk-EBWOJRCC.cjs} +21 -4
  26. package/dist/tsup/chunk-EBWOJRCC.cjs.map +1 -0
  27. package/dist/tsup/{chunk-OLIJHKLL.js → chunk-HHNYEQD3.js} +6 -6
  28. package/dist/tsup/chunk-HHNYEQD3.js.map +1 -0
  29. package/dist/tsup/{chunk-3EVVOYFD.js → chunk-IOUSQVXI.js} +20 -3
  30. package/dist/tsup/chunk-IOUSQVXI.js.map +1 -0
  31. package/dist/tsup/{chunk-C7AAIILH.cjs → chunk-ISDKSSYR.cjs} +4 -4
  32. package/dist/tsup/{chunk-C7AAIILH.cjs.map → chunk-ISDKSSYR.cjs.map} +1 -1
  33. package/dist/tsup/{chunk-7UZF56RS.js → chunk-J72WHUBC.js} +10 -8
  34. package/dist/tsup/{chunk-7UZF56RS.js.map → chunk-J72WHUBC.js.map} +1 -1
  35. package/dist/tsup/{chunk-6KTMKPNU.cjs → chunk-KWABEUUA.cjs} +10 -10
  36. package/dist/tsup/chunk-KWABEUUA.cjs.map +1 -0
  37. package/dist/tsup/{chunk-WHYBAEWG.cjs → chunk-NIY3RSPX.cjs} +62 -3
  38. package/dist/tsup/chunk-NIY3RSPX.cjs.map +1 -0
  39. package/dist/tsup/{chunk-VLXRFJ7P.js → chunk-T44AVAGW.js} +2 -2
  40. package/dist/tsup/{chunk-QKSGGKGQ.js → chunk-TCXEM6PA.js} +2 -2
  41. package/dist/tsup/{chunk-OOB32JVG.js → chunk-ZI5CNA2Z.js} +2 -2
  42. package/dist/tsup/client/mod.cjs +7 -7
  43. package/dist/tsup/client/mod.cjs.map +1 -1
  44. package/dist/tsup/client/mod.d.cts +3 -3
  45. package/dist/tsup/client/mod.d.ts +3 -3
  46. package/dist/tsup/client/mod.js +6 -6
  47. package/dist/tsup/common/log.cjs +2 -2
  48. package/dist/tsup/common/log.js +1 -1
  49. package/dist/tsup/common/websocket.cjs +3 -3
  50. package/dist/tsup/common/websocket.js +2 -2
  51. package/dist/tsup/{config-DKgPGC0f.d.ts → config-BxWAw3iH.d.ts} +121 -2
  52. package/dist/tsup/{config-BtAh7oBu.d.cts → config-CZQQ-mso.d.cts} +121 -2
  53. package/dist/tsup/{context-Cfjl5pgz.d.cts → context-Bw7xq8w3.d.cts} +1 -1
  54. package/dist/tsup/{context-C-6dGebY.d.ts → context-D8QA76sV.d.ts} +1 -1
  55. package/dist/tsup/dynamic/mod.cjs +2 -2
  56. package/dist/tsup/dynamic/mod.d.cts +2 -2
  57. package/dist/tsup/dynamic/mod.d.ts +2 -2
  58. package/dist/tsup/dynamic/mod.js +1 -1
  59. package/dist/tsup/inspector/mod.cjs +5 -5
  60. package/dist/tsup/inspector/mod.js +4 -4
  61. package/dist/tsup/inspector-tab/mod.cjs +173 -0
  62. package/dist/tsup/inspector-tab/mod.cjs.map +1 -0
  63. package/dist/tsup/inspector-tab/mod.d.cts +250 -0
  64. package/dist/tsup/inspector-tab/mod.d.ts +250 -0
  65. package/dist/tsup/inspector-tab/mod.js +173 -0
  66. package/dist/tsup/inspector-tab/mod.js.map +1 -0
  67. package/dist/tsup/mod.cjs +189 -81
  68. package/dist/tsup/mod.cjs.map +1 -1
  69. package/dist/tsup/mod.d.cts +4 -4
  70. package/dist/tsup/mod.d.ts +4 -4
  71. package/dist/tsup/mod.js +124 -16
  72. package/dist/tsup/mod.js.map +1 -1
  73. package/dist/tsup/test/mod.cjs +10 -10
  74. package/dist/tsup/test/mod.d.cts +2 -2
  75. package/dist/tsup/test/mod.d.ts +2 -2
  76. package/dist/tsup/test/mod.js +6 -6
  77. package/dist/tsup/{utils-DVekpm4I.d.cts → utils-DQosb24I.d.cts} +1 -1
  78. package/dist/tsup/{utils-DVekpm4I.d.ts → utils-DQosb24I.d.ts} +1 -1
  79. package/dist/tsup/utils.cjs +2 -2
  80. package/dist/tsup/utils.d.cts +1 -1
  81. package/dist/tsup/utils.d.ts +1 -1
  82. package/dist/tsup/utils.js +1 -1
  83. package/dist/tsup/workflow/mod.cjs +11 -11
  84. package/dist/tsup/workflow/mod.cjs.map +1 -1
  85. package/dist/tsup/workflow/mod.d.cts +4 -4
  86. package/dist/tsup/workflow/mod.d.ts +4 -4
  87. package/dist/tsup/workflow/mod.js +5 -5
  88. package/package.json +19 -9
  89. package/src/actor/config.ts +91 -0
  90. package/src/actor/instance/mod.ts +4 -4
  91. package/src/actor/mod.ts +2 -0
  92. package/src/common/engine.ts +28 -1
  93. package/src/devtools-loader/index.ts +4 -7
  94. package/src/devtools-loader/serve-devtools.ts +26 -0
  95. package/src/engine-client/actor-http-client.ts +2 -2
  96. package/src/engine-client/ws-proxy.ts +5 -0
  97. package/src/inspector-tab/mod.ts +315 -0
  98. package/src/registry/config/index.ts +37 -7
  99. package/src/registry/index.ts +4 -2
  100. package/src/registry/native.ts +118 -7
  101. package/src/registry/runtime.ts +20 -0
  102. package/src/utils/env-vars.ts +6 -0
  103. package/dist/tsup/chunk-2U6RLFKX.cjs.map +0 -1
  104. package/dist/tsup/chunk-3EVVOYFD.js.map +0 -1
  105. package/dist/tsup/chunk-6KTMKPNU.cjs.map +0 -1
  106. package/dist/tsup/chunk-OLIJHKLL.js.map +0 -1
  107. package/dist/tsup/chunk-VNMIAPPF.cjs.map +0 -1
  108. package/dist/tsup/chunk-WHYBAEWG.cjs.map +0 -1
  109. package/dist/tsup/chunk-WIMUFZVJ.js.map +0 -1
  110. /package/dist/tsup/{chunk-EWVOWEMD.js.map → chunk-33YE6XCI.js.map} +0 -0
  111. /package/dist/tsup/{chunk-VLXRFJ7P.js.map → chunk-T44AVAGW.js.map} +0 -0
  112. /package/dist/tsup/{chunk-QKSGGKGQ.js.map → chunk-TCXEM6PA.js.map} +0 -0
  113. /package/dist/tsup/{chunk-OOB32JVG.js.map → chunk-ZI5CNA2Z.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-BtAh7oBu.cjs';
2
- export { k as ACTOR_CONTEXT_INTERNAL_SYMBOL, l as Actions, m as ActorConfig, n as ActorConfigInput, o as ActorConfigSchema, p as ActorContext, q as ActorContextOf, r as ActorDefinition, s as ActorKey, t as ActorKv, u as ActorLogger, v as ActorOptions, w as ActorOptionsInput, x as ActorOptionsSchema, y as ActorQuery, z as ActorQueue, F as ActorSchedule, G as ActorTypes, H as ActorsSchema, I as AnyActorInstance, J as AnyClient, K as AnyConn, L as AnyStaticActorDefinition, N as AnyStaticActorInstance, O as AuthIntent, P as BaseActorInstance, T as CONN_DRIVER_SYMBOL, U as CONN_STATE_MANAGER_SYMBOL, V as Client, X as Conn, Y as DEFAULT_SLEEP_GRACE_PERIOD, Z as DocActorConfigSchema, _ as DocActorOptionsSchema, $ as DocConfigurePoolSchema, a0 as DocEnvoyConfigSchema, a1 as DocRegistryConfigSchema, a2 as DocServerlessConfigSchema, a3 as DocSqliteConfigSchema, a4 as Encoding, a5 as FetchHandler, a6 as GlobalActorOptions, a7 as GlobalActorOptionsInput, a8 as GlobalActorOptionsSchema, a9 as InspectorUnsubscribe, aa as InstanceActorOptions, ab as InstanceActorOptionsInput, ac as InstanceActorOptionsSchema, ad as QueueEnqueueAndWaitOptions, ae as QueueFilterName, af as QueueIterOptions, ag as QueueMessageOf, ah as QueueName, ai as QueueNextBatchOptions, aj as QueueNextOptions, ak as QueueResultMessageForName, al as QueueTryNextBatchOptions, am as QueueTryNextOptions, an as QueueWaitOptions, ao as RAW_STATE_SYMBOL, ap as RUN_FUNCTION_CONFIG_SYMBOL, aq as Registry, ar as RegistryActors, as as RegistryConfig, at as RegistryConfigInput, au as RegistryConfigSchema, av as RegistryDeps, aw as RegistryRoutes, ax as RunConfig, ay as RunConfigSchema, az as RunInspectorConfig, aA as RuntimeKind, aB as RuntimeKindSchema, aC as ServerlessHandler, aD as SqliteBackend, aE as SqliteBackendSchema, aF as SqliteConfig, aG as SqliteConfigSchema, aH as TestConfig, aI as TestConfigSchema, aJ as Type, aK as WasmRuntimeBindings, aL as WasmRuntimeConfig, aM as WasmRuntimeConfigSchema, aN as WasmRuntimeInitInput, aO as WorkflowInspectorConfig, aP as actor, aQ as buildActorNames, aR as createClientWithDriver, aS as event, aT as getRunFunction, aU as getRunInspectorConfig, aV as getRunMetadata, aW as isStaticActorDefinition, aX as isStaticActorInstance, aY as lookupInRegistry, aZ as queue, a_ as setup, a$ as test } from './config-BtAh7oBu.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-CZQQ-mso.cjs';
2
+ export { k as ACTOR_CONTEXT_INTERNAL_SYMBOL, l as Actions, m as ActorConfig, n as ActorConfigInput, o as ActorConfigSchema, p as ActorContext, q as ActorContextOf, r as ActorDefinition, s as ActorInspectorConfig, t as ActorInspectorConfigSchema, u as ActorKey, v as ActorKv, w as ActorLogger, x as ActorOptions, y as ActorOptionsInput, z as ActorOptionsSchema, F as ActorQuery, G as ActorQueue, H as ActorSchedule, I as ActorTypes, J as ActorsSchema, K as AnyActorInstance, L as AnyClient, N as AnyConn, O as AnyStaticActorDefinition, P as AnyStaticActorInstance, T as AuthIntent, U as BUILTIN_INSPECTOR_TAB_IDS, V as BaseActorInstance, X as BuiltinInspectorTabIdSchema, Y as CONN_DRIVER_SYMBOL, Z as CONN_STATE_MANAGER_SYMBOL, _ as Client, $ as Conn, a0 as CustomInspectorTabEntrySchema, a1 as DEFAULT_SLEEP_GRACE_PERIOD, a2 as DocActorConfigSchema, a3 as DocActorOptionsSchema, a4 as DocConfigurePoolSchema, a5 as DocEnvoyConfigSchema, a6 as DocRegistryConfigSchema, a7 as DocServerlessConfigSchema, a8 as DocSqliteConfigSchema, a9 as Encoding, aa as FetchHandler, ab as GlobalActorOptions, ac as GlobalActorOptionsInput, ad as GlobalActorOptionsSchema, ae as HideInspectorTabEntrySchema, af as InspectorTabEntrySchema, ag as InspectorUnsubscribe, ah as InstanceActorOptions, ai as InstanceActorOptionsInput, aj as InstanceActorOptionsSchema, ak as QueueEnqueueAndWaitOptions, al as QueueFilterName, am as QueueIterOptions, an as QueueMessageOf, ao as QueueName, ap as QueueNextBatchOptions, aq as QueueNextOptions, ar as QueueResultMessageForName, as as QueueTryNextBatchOptions, at as QueueTryNextOptions, au as QueueWaitOptions, av as RAW_STATE_SYMBOL, aw as RUN_FUNCTION_CONFIG_SYMBOL, ax as Registry, ay as RegistryActors, az as RegistryConfig, aA as RegistryConfigInput, aB as RegistryConfigSchema, aC as RegistryDeps, aD as RegistryRoutes, aE as RunConfig, aF as RunConfigSchema, aG as RunInspectorConfig, aH as RuntimeKind, aI as RuntimeKindSchema, aJ as ServerlessHandler, aK as SqliteBackend, aL as SqliteBackendSchema, aM as SqliteConfig, aN as SqliteConfigSchema, aO as TestConfig, aP as TestConfigSchema, aQ as Type, aR as WasmRuntimeBindings, aS as WasmRuntimeConfig, aT as WasmRuntimeConfigSchema, aU as WasmRuntimeInitInput, aV as WorkflowInspectorConfig, aW as actor, aX as buildActorNames, aY as createClientWithDriver, aZ as event, a_ as getRunFunction, a$ as getRunInspectorConfig, b0 as getRunMetadata, b1 as isStaticActorDefinition, b2 as isStaticActorInstance, b3 as lookupInRegistry, b4 as queue, b5 as setup, b6 as test } from './config-CZQQ-mso.cjs';
3
3
  import { UniversalWebSocket } from '@rivetkit/virtual-websocket';
4
4
  export { RivetCloseEvent, RivetEvent, RivetMessageEvent, UniversalWebSocket } from '@rivetkit/virtual-websocket';
5
5
  import { A as AnyDatabaseProvider } from './config-D49x8NpL.cjs';
6
- export { R as ActorError, R as RivetError, U as UserError, a as UserErrorOptions, n as noopNext } from './utils-DVekpm4I.cjs';
6
+ export { R as ActorError, R as RivetError, a as RivetErrorLike, b as RivetErrorOptions, U as UserError, c as UserErrorOptions, n as noopNext } from './utils-DQosb24I.cjs';
7
7
  import { WSContext } from 'hono/ws';
8
8
  export { toUint8Array } from './utils.cjs';
9
- export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-Cfjl5pgz.cjs';
9
+ export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-Bw7xq8w3.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-DKgPGC0f.js';
2
- export { k as ACTOR_CONTEXT_INTERNAL_SYMBOL, l as Actions, m as ActorConfig, n as ActorConfigInput, o as ActorConfigSchema, p as ActorContext, q as ActorContextOf, r as ActorDefinition, s as ActorKey, t as ActorKv, u as ActorLogger, v as ActorOptions, w as ActorOptionsInput, x as ActorOptionsSchema, y as ActorQuery, z as ActorQueue, F as ActorSchedule, G as ActorTypes, H as ActorsSchema, I as AnyActorInstance, J as AnyClient, K as AnyConn, L as AnyStaticActorDefinition, N as AnyStaticActorInstance, O as AuthIntent, P as BaseActorInstance, T as CONN_DRIVER_SYMBOL, U as CONN_STATE_MANAGER_SYMBOL, V as Client, X as Conn, Y as DEFAULT_SLEEP_GRACE_PERIOD, Z as DocActorConfigSchema, _ as DocActorOptionsSchema, $ as DocConfigurePoolSchema, a0 as DocEnvoyConfigSchema, a1 as DocRegistryConfigSchema, a2 as DocServerlessConfigSchema, a3 as DocSqliteConfigSchema, a4 as Encoding, a5 as FetchHandler, a6 as GlobalActorOptions, a7 as GlobalActorOptionsInput, a8 as GlobalActorOptionsSchema, a9 as InspectorUnsubscribe, aa as InstanceActorOptions, ab as InstanceActorOptionsInput, ac as InstanceActorOptionsSchema, ad as QueueEnqueueAndWaitOptions, ae as QueueFilterName, af as QueueIterOptions, ag as QueueMessageOf, ah as QueueName, ai as QueueNextBatchOptions, aj as QueueNextOptions, ak as QueueResultMessageForName, al as QueueTryNextBatchOptions, am as QueueTryNextOptions, an as QueueWaitOptions, ao as RAW_STATE_SYMBOL, ap as RUN_FUNCTION_CONFIG_SYMBOL, aq as Registry, ar as RegistryActors, as as RegistryConfig, at as RegistryConfigInput, au as RegistryConfigSchema, av as RegistryDeps, aw as RegistryRoutes, ax as RunConfig, ay as RunConfigSchema, az as RunInspectorConfig, aA as RuntimeKind, aB as RuntimeKindSchema, aC as ServerlessHandler, aD as SqliteBackend, aE as SqliteBackendSchema, aF as SqliteConfig, aG as SqliteConfigSchema, aH as TestConfig, aI as TestConfigSchema, aJ as Type, aK as WasmRuntimeBindings, aL as WasmRuntimeConfig, aM as WasmRuntimeConfigSchema, aN as WasmRuntimeInitInput, aO as WorkflowInspectorConfig, aP as actor, aQ as buildActorNames, aR as createClientWithDriver, aS as event, aT as getRunFunction, aU as getRunInspectorConfig, aV as getRunMetadata, aW as isStaticActorDefinition, aX as isStaticActorInstance, aY as lookupInRegistry, aZ as queue, a_ as setup, a$ as test } from './config-DKgPGC0f.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-BxWAw3iH.js';
2
+ export { k as ACTOR_CONTEXT_INTERNAL_SYMBOL, l as Actions, m as ActorConfig, n as ActorConfigInput, o as ActorConfigSchema, p as ActorContext, q as ActorContextOf, r as ActorDefinition, s as ActorInspectorConfig, t as ActorInspectorConfigSchema, u as ActorKey, v as ActorKv, w as ActorLogger, x as ActorOptions, y as ActorOptionsInput, z as ActorOptionsSchema, F as ActorQuery, G as ActorQueue, H as ActorSchedule, I as ActorTypes, J as ActorsSchema, K as AnyActorInstance, L as AnyClient, N as AnyConn, O as AnyStaticActorDefinition, P as AnyStaticActorInstance, T as AuthIntent, U as BUILTIN_INSPECTOR_TAB_IDS, V as BaseActorInstance, X as BuiltinInspectorTabIdSchema, Y as CONN_DRIVER_SYMBOL, Z as CONN_STATE_MANAGER_SYMBOL, _ as Client, $ as Conn, a0 as CustomInspectorTabEntrySchema, a1 as DEFAULT_SLEEP_GRACE_PERIOD, a2 as DocActorConfigSchema, a3 as DocActorOptionsSchema, a4 as DocConfigurePoolSchema, a5 as DocEnvoyConfigSchema, a6 as DocRegistryConfigSchema, a7 as DocServerlessConfigSchema, a8 as DocSqliteConfigSchema, a9 as Encoding, aa as FetchHandler, ab as GlobalActorOptions, ac as GlobalActorOptionsInput, ad as GlobalActorOptionsSchema, ae as HideInspectorTabEntrySchema, af as InspectorTabEntrySchema, ag as InspectorUnsubscribe, ah as InstanceActorOptions, ai as InstanceActorOptionsInput, aj as InstanceActorOptionsSchema, ak as QueueEnqueueAndWaitOptions, al as QueueFilterName, am as QueueIterOptions, an as QueueMessageOf, ao as QueueName, ap as QueueNextBatchOptions, aq as QueueNextOptions, ar as QueueResultMessageForName, as as QueueTryNextBatchOptions, at as QueueTryNextOptions, au as QueueWaitOptions, av as RAW_STATE_SYMBOL, aw as RUN_FUNCTION_CONFIG_SYMBOL, ax as Registry, ay as RegistryActors, az as RegistryConfig, aA as RegistryConfigInput, aB as RegistryConfigSchema, aC as RegistryDeps, aD as RegistryRoutes, aE as RunConfig, aF as RunConfigSchema, aG as RunInspectorConfig, aH as RuntimeKind, aI as RuntimeKindSchema, aJ as ServerlessHandler, aK as SqliteBackend, aL as SqliteBackendSchema, aM as SqliteConfig, aN as SqliteConfigSchema, aO as TestConfig, aP as TestConfigSchema, aQ as Type, aR as WasmRuntimeBindings, aS as WasmRuntimeConfig, aT as WasmRuntimeConfigSchema, aU as WasmRuntimeInitInput, aV as WorkflowInspectorConfig, aW as actor, aX as buildActorNames, aY as createClientWithDriver, aZ as event, a_ as getRunFunction, a$ as getRunInspectorConfig, b0 as getRunMetadata, b1 as isStaticActorDefinition, b2 as isStaticActorInstance, b3 as lookupInRegistry, b4 as queue, b5 as setup, b6 as test } from './config-BxWAw3iH.js';
3
3
  import { UniversalWebSocket } from '@rivetkit/virtual-websocket';
4
4
  export { RivetCloseEvent, RivetEvent, RivetMessageEvent, UniversalWebSocket } from '@rivetkit/virtual-websocket';
5
5
  import { A as AnyDatabaseProvider } from './config-D49x8NpL.js';
6
- export { R as ActorError, R as RivetError, U as UserError, a as UserErrorOptions, n as noopNext } from './utils-DVekpm4I.js';
6
+ export { R as ActorError, R as RivetError, a as RivetErrorLike, b as RivetErrorOptions, U as UserError, c as UserErrorOptions, n as noopNext } from './utils-DQosb24I.js';
7
7
  import { WSContext } from 'hono/ws';
8
8
  export { toUint8Array } from './utils.js';
9
- export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-C-6dGebY.js';
9
+ export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-D8QA76sV.js';
10
10
  import 'zod/v4';
11
11
  import '@rivetkit/rivetkit-wasm';
12
12
  import 'zod';
package/dist/tsup/mod.js CHANGED
@@ -1,3 +1,6 @@
1
+ import {
2
+ decodeWorkflowHistoryTransport
3
+ } from "./chunk-TCXEM6PA.js";
1
4
  import {
2
5
  ACTOR_CONTEXT_INTERNAL_SYMBOL,
3
6
  ActorConfigSchema,
@@ -6,10 +9,7 @@ import {
6
9
  getRunFunction,
7
10
  getRunInspectorConfig,
8
11
  getRunMetadata
9
- } from "./chunk-WIMUFZVJ.js";
10
- import {
11
- decodeWorkflowHistoryTransport
12
- } from "./chunk-QKSGGKGQ.js";
12
+ } from "./chunk-DPIMKYNB.js";
13
13
  import {
14
14
  ALLOWED_PUBLIC_HEADERS,
15
15
  HEADER_CONN_PARAMS,
@@ -19,7 +19,7 @@ import {
19
19
  getDatacenters,
20
20
  tryParseEndpoint,
21
21
  updateRunnerConfig
22
- } from "./chunk-7UZF56RS.js";
22
+ } from "./chunk-J72WHUBC.js";
23
23
  import {
24
24
  KEYS,
25
25
  makePrefixedKey,
@@ -32,9 +32,8 @@ import {
32
32
  assertJsonCompatValue,
33
33
  decodeCborCompat,
34
34
  encodeCborCompat
35
- } from "./chunk-OOB32JVG.js";
36
- import "./chunk-JZ7TWV65.js";
37
- import "./chunk-VLXRFJ7P.js";
35
+ } from "./chunk-ZI5CNA2Z.js";
36
+ import "./chunk-T44AVAGW.js";
38
37
  import {
39
38
  LogLevelSchema,
40
39
  VERSION,
@@ -51,6 +50,8 @@ import {
51
50
  getRivetPublicEndpoint,
52
51
  getRivetPublicToken,
53
52
  getRivetRunEngine,
53
+ getRivetRunEngineHost,
54
+ getRivetRunEnginePort,
54
55
  getRivetRunEngineVersion,
55
56
  getRivetToken,
56
57
  getRivetTotalSlots,
@@ -59,7 +60,7 @@ import {
59
60
  noopNext,
60
61
  stringifyError,
61
62
  toUint8Array
62
- } from "./chunk-3EVVOYFD.js";
63
+ } from "./chunk-IOUSQVXI.js";
63
64
  import {
64
65
  INTERNAL_ERROR_CODE,
65
66
  RivetError,
@@ -71,6 +72,7 @@ import {
71
72
  toRivetError,
72
73
  unsupportedFeature
73
74
  } from "./chunk-BRP62GZC.js";
75
+ import "./chunk-JZ7TWV65.js";
74
76
 
75
77
  // src/actor/log.ts
76
78
  function loggerWithoutContext() {
@@ -360,8 +362,23 @@ var InlineWebSocketAdapter = class {
360
362
  import { Hono } from "hono";
361
363
 
362
364
  // src/common/engine.ts
365
+ var ENGINE_HOST = "127.0.0.1";
363
366
  var ENGINE_PORT = 6420;
364
- var ENGINE_ENDPOINT = `http://127.0.0.1:${ENGINE_PORT}`;
367
+ var ENGINE_ENDPOINT = buildEngineEndpoint(ENGINE_HOST, ENGINE_PORT);
368
+ function buildEngineEndpoint(host, port) {
369
+ const urlHost = host.includes(":") && !host.startsWith("[") ? `[${host}]` : host;
370
+ return `http://${urlHost}:${port}`;
371
+ }
372
+ function isLocalEngineEndpoint(endpoint) {
373
+ let url;
374
+ try {
375
+ url = new URL(endpoint);
376
+ } catch {
377
+ return false;
378
+ }
379
+ const hostname = url.hostname.toLowerCase();
380
+ return hostname === "localhost" || hostname === "0.0.0.0" || hostname === "::" || hostname === "[::]" || hostname === "::1" || hostname === "[::1]" || /^127(?:\.\d{1,3}){0,3}$/.test(hostname);
381
+ }
365
382
 
366
383
  // src/registry/log.ts
367
384
  function logger2() {
@@ -821,6 +838,18 @@ var RegistryConfigSchema = z3.object({
821
838
  * Starts the full Rust engine process locally.
822
839
  */
823
840
  startEngine: z3.boolean().default(() => getRivetRunEngine()),
841
+ /**
842
+ * @experimental
843
+ *
844
+ * Host to bind the spawned local engine process to.
845
+ */
846
+ engineHost: z3.string().optional().default(() => getRivetRunEngineHost() ?? ENGINE_HOST),
847
+ /**
848
+ * @experimental
849
+ *
850
+ * Port to bind the spawned local engine process to.
851
+ */
852
+ enginePort: z3.number().int().min(1).max(65535).optional().default(() => getRivetRunEnginePort() ?? ENGINE_PORT),
824
853
  /** @experimental */
825
854
  engineVersion: z3.string().optional().default(() => getRivetRunEngineVersion() ?? VERSION),
826
855
  /**
@@ -898,7 +927,11 @@ var RegistryConfigSchema = z3.object({
898
927
  message: "configurePool requires either endpoint or startEngine"
899
928
  });
900
929
  }
901
- const endpoint = config.startEngine ? ENGINE_ENDPOINT : (parsedEndpoint == null ? void 0 : parsedEndpoint.endpoint) ?? (isDevEnv ? ENGINE_ENDPOINT : void 0);
930
+ const localEngineEndpoint = buildEngineEndpoint(
931
+ config.engineHost,
932
+ config.enginePort
933
+ );
934
+ const endpoint = config.startEngine ? localEngineEndpoint : (parsedEndpoint == null ? void 0 : parsedEndpoint.endpoint) ?? (isDevEnv ? buildEngineEndpoint(ENGINE_HOST, ENGINE_PORT) : void 0);
902
935
  const validateServerlessEndpoint = Boolean(
903
936
  config.startEngine || parsedEndpoint
904
937
  );
@@ -915,7 +948,7 @@ var RegistryConfigSchema = z3.object({
915
948
  path: ["serverless", "publicEndpoint"]
916
949
  });
917
950
  }
918
- const publicEndpoint = (parsedPublicEndpoint == null ? void 0 : parsedPublicEndpoint.endpoint) ?? (isDevEnv && config.startEngine ? ENGINE_ENDPOINT : void 0);
951
+ const publicEndpoint = (parsedPublicEndpoint == null ? void 0 : parsedPublicEndpoint.endpoint) ?? (isDevEnv && config.startEngine ? endpoint : void 0);
919
952
  const publicNamespace = parsedPublicEndpoint == null ? void 0 : parsedPublicEndpoint.namespace;
920
953
  const publicToken = (parsedPublicEndpoint == null ? void 0 : parsedPublicEndpoint.token) ?? config.serverless.publicToken;
921
954
  return {
@@ -2418,6 +2451,10 @@ async function loadWasmRuntime(config) {
2418
2451
  };
2419
2452
  }
2420
2453
 
2454
+ // src/registry/native.ts
2455
+ import nodeFs from "fs";
2456
+ import nodePath from "path";
2457
+
2421
2458
  // src/registry/write-through-proxy.ts
2422
2459
  import onChange from "@rivetkit/on-change";
2423
2460
  function createWriteThroughProxy(value, commit, beforeChange) {
@@ -2779,6 +2816,9 @@ function decodeValue(value) {
2779
2816
  function encodeValue(value) {
2780
2817
  return encodeCborCompat(value);
2781
2818
  }
2819
+ function normalizeArgs(value) {
2820
+ return Array.isArray(value) ? value : value === void 0 || value === null ? [] : [value];
2821
+ }
2782
2822
  function unwrapTsfnPayload(error, payload) {
2783
2823
  if (error !== null && error !== void 0) {
2784
2824
  throw error;
@@ -3041,7 +3081,7 @@ function wrapNativeCallback(callback) {
3041
3081
  }
3042
3082
  function decodeArgs(value) {
3043
3083
  const decoded = decodeValue(value);
3044
- return Array.isArray(decoded) ? decoded : decoded === void 0 ? [] : [decoded];
3084
+ return normalizeArgs(decoded);
3045
3085
  }
3046
3086
  function buildRequest(init) {
3047
3087
  const url = init.uri.startsWith("http") ? init.uri : new URL(init.uri, "http://127.0.0.1").toString();
@@ -4703,9 +4743,62 @@ function buildActorConfig(definition, registryConfig) {
4703
4743
  maxOutgoingMessageSize: registryConfig.maxOutgoingMessageSize,
4704
4744
  preloadMaxWorkflowBytes: options.preloadMaxWorkflowBytes,
4705
4745
  preloadMaxConnectionsBytes: options.preloadMaxConnectionsBytes,
4706
- actions: Object.keys(config.actions ?? {}).sort().map((name) => ({ name }))
4746
+ actions: Object.keys(config.actions ?? {}).sort().map((name) => ({ name })),
4747
+ inspectorTabs: buildInspectorTabs(config.inspector)
4707
4748
  };
4708
4749
  }
4750
+ function buildInspectorTabs(inspector) {
4751
+ if (!inspector || typeof inspector !== "object") return void 0;
4752
+ const tabs = inspector.tabs;
4753
+ if (!Array.isArray(tabs) || tabs.length === 0) return void 0;
4754
+ return tabs.map((raw) => {
4755
+ const entry = raw;
4756
+ if (entry.hidden === true) {
4757
+ return { id: entry.id, hidden: true };
4758
+ }
4759
+ const resolved = entry.source !== void 0 ? nodePath.resolve(entry.source) : void 0;
4760
+ if (resolved !== void 0) {
4761
+ validateInspectorTabSource(entry.id, resolved);
4762
+ }
4763
+ return {
4764
+ id: entry.id,
4765
+ label: entry.label,
4766
+ icon: entry.icon,
4767
+ source: resolved
4768
+ };
4769
+ });
4770
+ }
4771
+ function validateInspectorTabSource(tabId, resolved) {
4772
+ if (resolved === nodePath.parse(resolved).root) {
4773
+ throw new Error(
4774
+ `inspector.tabs[id="${tabId}"].source resolves to the filesystem root (${resolved}). Point it at the tab's own static-asset directory instead.`
4775
+ );
4776
+ }
4777
+ let stat;
4778
+ try {
4779
+ stat = nodeFs.statSync(resolved);
4780
+ } catch (err) {
4781
+ const code = err == null ? void 0 : err.code;
4782
+ if (code === "ENOENT") {
4783
+ throw new Error(
4784
+ `inspector.tabs[id="${tabId}"].source (${resolved}) does not exist.`
4785
+ );
4786
+ }
4787
+ if (code === "EACCES") {
4788
+ throw new Error(
4789
+ `inspector.tabs[id="${tabId}"].source (${resolved}) is not readable (EACCES).`
4790
+ );
4791
+ }
4792
+ throw new Error(
4793
+ `inspector.tabs[id="${tabId}"].source (${resolved}) could not be stat'd: ${(err == null ? void 0 : err.message) ?? err}`
4794
+ );
4795
+ }
4796
+ if (!stat.isDirectory()) {
4797
+ throw new Error(
4798
+ `inspector.tabs[id="${tabId}"].source (${resolved}) must be a directory, got ${stat.isFile() ? "file" : "non-directory"}.`
4799
+ );
4800
+ }
4801
+ }
4709
4802
  function buildNativeFactory(runtime, registryConfig, definition) {
4710
4803
  var _a;
4711
4804
  const config = definition.config;
@@ -5038,13 +5131,26 @@ function buildNativeFactory(runtime, registryConfig, definition) {
5038
5131
  );
5039
5132
  }
5040
5133
  const body = await jsRequest.json();
5134
+ if (body.args !== void 0 && body.properties !== void 0) {
5135
+ return jsonResponse(
5136
+ { error: "use either args or properties, not both" },
5137
+ { status: 400 }
5138
+ );
5139
+ }
5140
+ if (body.properties !== void 0 && (body.properties === null || typeof body.properties !== "object" || Array.isArray(body.properties))) {
5141
+ return jsonResponse(
5142
+ { error: "properties must be an object" },
5143
+ { status: 400 }
5144
+ );
5145
+ }
5146
+ const args = body.properties !== void 0 ? [body.properties] : normalizeArgs(body.args);
5041
5147
  try {
5042
5148
  const output = await action(
5043
5149
  actorCtx,
5044
5150
  ...validateActionArgs(
5045
5151
  schemaConfig.actionInputSchemas,
5046
5152
  actionName,
5047
- body.args ?? []
5153
+ args
5048
5154
  )
5049
5155
  );
5050
5156
  return jsonResponse({ output });
@@ -5663,6 +5769,8 @@ async function buildServeConfig(config) {
5663
5769
  if (config.startEngine) {
5664
5770
  const { getEnginePath } = await loadEngineCli();
5665
5771
  serveConfig.engineBinaryPath = getEnginePath();
5772
+ serveConfig.engineHost = config.engineHost;
5773
+ serveConfig.enginePort = config.enginePort;
5666
5774
  }
5667
5775
  if ((_a = config.test) == null ? void 0 : _a.enabled) {
5668
5776
  serveConfig.inspectorTestToken = getEnvUniversal("_RIVET_TEST_INSPECTOR_TOKEN") ?? "token";
@@ -6225,7 +6333,7 @@ var Registry = class {
6225
6333
  logLine("Namespace", config.namespace);
6226
6334
  }
6227
6335
  if (config.endpoint) {
6228
- const endpointType = config.endpoint === ENGINE_ENDPOINT ? "local native" : "remote";
6336
+ const endpointType = config.startEngine || isLocalEngineEndpoint(config.endpoint) ? "local native" : "remote";
6229
6337
  logLine("Endpoint", `${config.endpoint} (${endpointType})`);
6230
6338
  }
6231
6339
  if (kind === "serverless" && config.publicEndpoint) {