rivetkit 3.0.4 → 3.0.6

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 (107) hide show
  1. package/dist/browser/client.d.ts +34 -28
  2. package/dist/browser/client.js +2 -2
  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-SIVNBXKO.js → chunk-5FQNTE3U.js} +2 -2
  7. package/dist/tsup/{chunk-NXAFFMGH.cjs → chunk-6EH5WPVT.cjs} +145 -145
  8. package/dist/tsup/chunk-6EH5WPVT.cjs.map +1 -0
  9. package/dist/tsup/{chunk-UTNZZOMF.cjs → chunk-6HXQONU5.cjs} +4 -4
  10. package/dist/tsup/{chunk-UTNZZOMF.cjs.map → chunk-6HXQONU5.cjs.map} +1 -1
  11. package/dist/tsup/{chunk-4YUA7CTJ.js → chunk-AETY7X4G.js} +2 -2
  12. package/dist/tsup/{chunk-ZT7GZRFQ.js → chunk-CJSADDKT.js} +4 -4
  13. package/dist/tsup/{chunk-F5VDYHOA.js → chunk-FERZDKVR.js} +3 -3
  14. package/dist/tsup/{chunk-T5Z3FG5Y.cjs → chunk-JU6RP3LW.cjs} +3 -3
  15. package/dist/tsup/{chunk-T5Z3FG5Y.cjs.map → chunk-JU6RP3LW.cjs.map} +1 -1
  16. package/dist/tsup/{chunk-4L27QRHE.cjs → chunk-NPA2A53S.cjs} +3 -3
  17. package/dist/tsup/{chunk-4L27QRHE.cjs.map → chunk-NPA2A53S.cjs.map} +1 -1
  18. package/dist/tsup/{chunk-UYBLHHFG.cjs → chunk-NUCUZGIV.cjs} +7 -7
  19. package/dist/tsup/{chunk-UYBLHHFG.cjs.map → chunk-NUCUZGIV.cjs.map} +1 -1
  20. package/dist/tsup/{chunk-A7Q5DJ2P.js → chunk-PBIQPYE5.js} +12 -15
  21. package/dist/tsup/chunk-PBIQPYE5.js.map +1 -0
  22. package/dist/tsup/{chunk-L3LCIZBH.js → chunk-SAR7BMVU.js} +2 -2
  23. package/dist/tsup/{chunk-NRTL2RDM.js → chunk-VNMBEXJH.js} +2 -2
  24. package/dist/tsup/{chunk-LW57U7VQ.cjs → chunk-WMAHPIFS.cjs} +10 -10
  25. package/dist/tsup/{chunk-LW57U7VQ.cjs.map → chunk-WMAHPIFS.cjs.map} +1 -1
  26. package/dist/tsup/{chunk-SVEL5ZO3.cjs → chunk-YNVGOPSK.cjs} +2 -2
  27. package/dist/tsup/{chunk-SVEL5ZO3.cjs.map → chunk-YNVGOPSK.cjs.map} +1 -1
  28. package/dist/tsup/{chunk-INFADXXI.cjs → chunk-YWWDUC6D.cjs} +12 -15
  29. package/dist/tsup/chunk-YWWDUC6D.cjs.map +1 -0
  30. package/dist/tsup/{chunk-2PHT2DGL.js → chunk-ZJ2UXLEE.js} +7 -7
  31. package/dist/tsup/chunk-ZJ2UXLEE.js.map +1 -0
  32. package/dist/tsup/{chunk-3WZJFRCB.cjs → chunk-ZPTATOYB.cjs} +3 -3
  33. package/dist/tsup/{chunk-3WZJFRCB.cjs.map → chunk-ZPTATOYB.cjs.map} +1 -1
  34. package/dist/tsup/{chunk-IIB4ZPZI.js → chunk-ZWNTOFM3.js} +2 -2
  35. package/dist/tsup/{chunk-IIB4ZPZI.js.map → chunk-ZWNTOFM3.js.map} +1 -1
  36. package/dist/tsup/client/mod.cjs +5 -5
  37. package/dist/tsup/client/mod.d.cts +2 -2
  38. package/dist/tsup/client/mod.d.ts +2 -2
  39. package/dist/tsup/client/mod.js +4 -4
  40. package/dist/tsup/common/log.cjs +2 -2
  41. package/dist/tsup/common/log.js +1 -1
  42. package/dist/tsup/common/websocket.cjs +3 -3
  43. package/dist/tsup/common/websocket.js +2 -2
  44. package/dist/tsup/{config-CM_AlRlT.d.cts → config-BDJltifk.d.cts} +36 -32
  45. package/dist/tsup/{config-DcUqgwcz.d.ts → config-DXC7qzme.d.ts} +36 -32
  46. package/dist/tsup/{context-Bws3ikEx.d.ts → context-DgPsVbw6.d.ts} +4 -1
  47. package/dist/tsup/{context-1BFHhiTs.d.cts → context-osC4Q1ax.d.cts} +4 -1
  48. package/dist/tsup/db/drizzle.cjs +2 -2
  49. package/dist/tsup/db/drizzle.js +1 -1
  50. package/dist/tsup/db/mod.cjs +3 -3
  51. package/dist/tsup/db/mod.js +2 -2
  52. package/dist/tsup/dynamic/mod.cjs +2 -2
  53. package/dist/tsup/dynamic/mod.d.cts +1 -1
  54. package/dist/tsup/dynamic/mod.d.ts +1 -1
  55. package/dist/tsup/dynamic/mod.js +1 -1
  56. package/dist/tsup/inspector/mod.cjs +5 -5
  57. package/dist/tsup/inspector/mod.js +4 -4
  58. package/dist/tsup/inspector/workflow.cjs +4 -4
  59. package/dist/tsup/inspector/workflow.js +3 -3
  60. package/dist/tsup/inspector-tab/mod.cjs +2 -2
  61. package/dist/tsup/inspector-tab/mod.d.cts +2 -2
  62. package/dist/tsup/inspector-tab/mod.d.ts +2 -2
  63. package/dist/tsup/inspector-tab/mod.js +1 -1
  64. package/dist/tsup/mod.cjs +129 -134
  65. package/dist/tsup/mod.cjs.map +1 -1
  66. package/dist/tsup/mod.d.cts +5 -3
  67. package/dist/tsup/mod.d.ts +5 -3
  68. package/dist/tsup/mod.js +26 -31
  69. package/dist/tsup/mod.js.map +1 -1
  70. package/dist/tsup/test/mod.cjs +6 -6
  71. package/dist/tsup/test/mod.d.cts +1 -1
  72. package/dist/tsup/test/mod.d.ts +1 -1
  73. package/dist/tsup/test/mod.js +4 -4
  74. package/dist/tsup/utils.cjs +2 -2
  75. package/dist/tsup/utils.js +1 -1
  76. package/dist/tsup/workflow/mod.cjs +13 -10
  77. package/dist/tsup/workflow/mod.cjs.map +1 -1
  78. package/dist/tsup/workflow/mod.d.cts +3 -3
  79. package/dist/tsup/workflow/mod.d.ts +3 -3
  80. package/dist/tsup/workflow/mod.js +8 -5
  81. package/dist/tsup/workflow/mod.js.map +1 -1
  82. package/package.json +9 -9
  83. package/src/actor/config.ts +35 -37
  84. package/src/actor/contexts/index.ts +2 -0
  85. package/src/actor/definition.ts +33 -1
  86. package/src/actor/schema.ts +4 -0
  87. package/src/client/actor-common.ts +4 -0
  88. package/src/client/actor-conn.ts +2 -0
  89. package/src/client/actor-handle.ts +2 -0
  90. package/src/client/config.ts +1 -1
  91. package/src/client/queue.ts +2 -0
  92. package/src/registry/napi-runtime.ts +0 -4
  93. package/src/registry/native.ts +4 -11
  94. package/src/registry/runtime.ts +0 -8
  95. package/src/registry/wasm-runtime.ts +0 -14
  96. package/src/workflow/context.ts +3 -0
  97. package/dist/tsup/chunk-2PHT2DGL.js.map +0 -1
  98. package/dist/tsup/chunk-A7Q5DJ2P.js.map +0 -1
  99. package/dist/tsup/chunk-INFADXXI.cjs.map +0 -1
  100. package/dist/tsup/chunk-NXAFFMGH.cjs.map +0 -1
  101. package/src/common/bare/generated/actor-runtime-socket-protocol/v1.ts +0 -848
  102. /package/dist/tsup/{chunk-SIVNBXKO.js.map → chunk-5FQNTE3U.js.map} +0 -0
  103. /package/dist/tsup/{chunk-4YUA7CTJ.js.map → chunk-AETY7X4G.js.map} +0 -0
  104. /package/dist/tsup/{chunk-ZT7GZRFQ.js.map → chunk-CJSADDKT.js.map} +0 -0
  105. /package/dist/tsup/{chunk-F5VDYHOA.js.map → chunk-FERZDKVR.js.map} +0 -0
  106. /package/dist/tsup/{chunk-L3LCIZBH.js.map → chunk-SAR7BMVU.js.map} +0 -0
  107. /package/dist/tsup/{chunk-NRTL2RDM.js.map → chunk-VNMBEXJH.js.map} +0 -0
@@ -319,6 +319,7 @@ interface EventTypeToken<T, TContext = any> {
319
319
  interface QueueTypeToken<TMessage, TComplete = never, TContext = any> {
320
320
  readonly _queueMessage?: TMessage;
321
321
  readonly _queueComplete?: TComplete;
322
+ /** @deprecated Queues were deprecated in 3.0 and will be removed in a future version. Use actions and store pending work in SQLite (`c.db`). See https://rivet.dev/actors/docs/deprecated/queues */
322
323
  readonly canPublish?: SchemaHook<TContext>;
323
324
  readonly message?: PrimitiveSchema;
324
325
  readonly complete?: PrimitiveSchema;
@@ -331,6 +332,7 @@ interface EventSchemaDefinition<TContext = any> {
331
332
  interface QueueSchemaDefinition<TContext = any> {
332
333
  message: PrimitiveSchema;
333
334
  complete?: PrimitiveSchema;
335
+ /** @deprecated Queues were deprecated in 3.0 and will be removed in a future version. Use actions and store pending work in SQLite (`c.db`). See https://rivet.dev/actors/docs/deprecated/queues */
334
336
  canPublish?: SchemaHook<TContext>;
335
337
  }
336
338
  type EventSchema<TContext = any> = PrimitiveSchema | EventSchemaDefinition<TContext>;
@@ -714,9 +716,6 @@ type RuntimeSqlBindParam = ({
714
716
  blobValue: RuntimeBytes;
715
717
  };
716
718
  type RuntimeSqlBindParams = RuntimeSqlBindParam[] | null;
717
- interface RuntimeActorRuntimeSocketEndpointInfo {
718
- path: string;
719
- }
720
719
  interface RuntimeSqlQueryResult {
721
720
  columns: string[];
722
721
  rows: unknown[][];
@@ -746,7 +745,6 @@ interface RuntimeActorConfig {
746
745
  remoteSqlite?: boolean;
747
746
  sqliteProfiling?: SqliteProfilingOptions;
748
747
  tracing?: RuntimeActorTracingConfig;
749
- enableActorRuntimeSocket?: boolean;
750
748
  hasState?: boolean;
751
749
  canHibernateWebsocket?: boolean;
752
750
  stateSaveIntervalMs?: number;
@@ -988,7 +986,6 @@ interface CoreRuntime {
988
986
  actorSqlMetrics(ctx: ActorContextHandle): SqliteNativeMetrics | null;
989
987
  actorSqlTakeLastKvError(ctx: ActorContextHandle): string | null;
990
988
  actorSqlClose(ctx: ActorContextHandle): Promise<void>;
991
- actorRuntimeSocketProvision(ctx: ActorContextHandle): Promise<RuntimeActorRuntimeSocketEndpointInfo>;
992
989
  actorQueueSend(ctx: ActorContextHandle, name: string, body: RuntimeBytes): Promise<RuntimeQueueMessage>;
993
990
  actorQueueNextBatch(ctx: ActorContextHandle, options?: RuntimeQueueNextBatchOptions | undefined | null, signal?: CancellationTokenHandle | undefined | null): Promise<RuntimeQueueMessage[]>;
994
991
  actorQueueWaitForNames(ctx: ActorContextHandle, names: string[], options?: RuntimeQueueWaitOptions | undefined | null, signal?: CancellationTokenHandle | undefined | null): Promise<RuntimeQueueMessage>;
@@ -1069,9 +1066,13 @@ type ActorWebSocketOptions = ActorGatewayOptions;
1069
1066
  */
1070
1067
  type ActorDefinitionActions<AD extends AnyActorDefinition> = IsAny<AD> extends true ? Record<string, ActorActionFunction<any[], any>> : ActorActionMap<ActionsOf<AD>>;
1071
1068
  type ActorQueueSend<TQueues extends QueueSchemaConfig> = {
1069
+ /** @deprecated Queues were deprecated in 3.0 and will be removed in a future version. Use actions and store pending work in SQLite (`c.db`). See https://rivet.dev/actors/docs/deprecated/queues */
1072
1070
  <K extends keyof TQueues & string>(name: K, body: InferSchemaMap<TQueues>[K], options: QueueSendWaitOptions): Promise<QueueSendResult<InferQueueCompleteMap<TQueues>[K]>>;
1071
+ /** @deprecated Queues were deprecated in 3.0 and will be removed in a future version. Use actions and store pending work in SQLite (`c.db`). See https://rivet.dev/actors/docs/deprecated/queues */
1073
1072
  <K extends keyof TQueues & string>(name: K, body: InferSchemaMap<TQueues>[K], options?: QueueSendNoWaitOptions): Promise<void>;
1073
+ /** @deprecated Queues were deprecated in 3.0 and will be removed in a future version. Use actions and store pending work in SQLite (`c.db`). See https://rivet.dev/actors/docs/deprecated/queues */
1074
1074
  (name: keyof TQueues extends never ? string : never, body: unknown, options: QueueSendWaitOptions): Promise<QueueSendResult>;
1075
+ /** @deprecated Queues were deprecated in 3.0 and will be removed in a future version. Use actions and store pending work in SQLite (`c.db`). See https://rivet.dev/actors/docs/deprecated/queues */
1075
1076
  (name: keyof TQueues extends never ? string : never, body: unknown, options?: QueueSendNoWaitOptions): Promise<void>;
1076
1077
  };
1077
1078
  type ActorEventSubscribe<TEvents extends EventSchemaConfig> = {
@@ -1168,7 +1169,9 @@ declare class ActorConnRaw {
1168
1169
  * @protected
1169
1170
  */
1170
1171
  constructor(client: ClientRaw, driver: EngineControlClient, params: unknown, getParams: (() => Promise<unknown>) | undefined, encoding: Encoding, actorResolutionState: ActorResolutionState, gatewayOptions?: ActorGatewayOptions, currentActorInvocation?: CurrentActorInvocation);
1172
+ /** @deprecated Queues were deprecated in 3.0 and will be removed in a future version. Use actions and store pending work in SQLite (`c.db`). See https://rivet.dev/actors/docs/deprecated/queues */
1171
1173
  send(name: string, body: unknown, options: QueueSendWaitOptions): Promise<QueueSendResult>;
1174
+ /** @deprecated Queues were deprecated in 3.0 and will be removed in a future version. Use actions and store pending work in SQLite (`c.db`). See https://rivet.dev/actors/docs/deprecated/queues */
1172
1175
  send(name: string, body: unknown, options?: QueueSendNoWaitOptions): Promise<void>;
1173
1176
  /**
1174
1177
  * Call a raw action connection. See {@link ActorConn} for type-safe action calls.
@@ -1325,7 +1328,9 @@ declare class ActorHandleRaw {
1325
1328
  * @protected
1326
1329
  */
1327
1330
  constructor(client: any, driver: EngineControlClient, params: unknown, getParams: (() => Promise<unknown>) | undefined, encoding: Encoding, actorResolutionState: ActorResolutionState, gatewayOptions?: ActorGatewayOptions, signal?: AbortSignal, currentActorInvocation?: CurrentActorInvocation, startCallSpan?: StartCallSpan, retryBudget?: RetryBudget);
1331
+ /** @deprecated Queues were deprecated in 3.0 and will be removed in a future version. Use actions and store pending work in SQLite (`c.db`). See https://rivet.dev/actors/docs/deprecated/queues */
1328
1332
  send(name: string, body: unknown, options: QueueSendWaitOptions): Promise<QueueSendResult>;
1333
+ /** @deprecated Queues were deprecated in 3.0 and will be removed in a future version. Use actions and store pending work in SQLite (`c.db`). See https://rivet.dev/actors/docs/deprecated/queues */
1329
1334
  send(name: string, body: unknown, options?: QueueSendNoWaitOptions): Promise<void>;
1330
1335
  /**
1331
1336
  * Call a raw action. This method sends an HTTP request to invoke the named action.
@@ -1726,10 +1731,7 @@ type ActorKvListOptions<T extends ActorKvValueType = "text", K extends ActorKvKe
1726
1731
  limit?: number;
1727
1732
  };
1728
1733
  type ActorClientFor<T> = T extends Registry<any> ? Client<T> : T;
1729
- /**
1730
- * @deprecated Actor KV is deprecated. Use embedded SQLite (`c.db`)
1731
- * or actor state instead.
1732
- */
1734
+ /** @deprecated Actor KV was deprecated in 3.0 and will be removed in a future version. Store data in SQLite (`c.db`). See https://rivet.dev/actors/docs/deprecated/kv */
1733
1735
  interface ActorKv {
1734
1736
  get<T extends ActorKvValueType = "text">(key: Uint8Array | string, options?: ActorKvValueOptions<T>): Promise<ActorKvValueTypeMap[T] | null>;
1735
1737
  put<T extends ActorKvValueType = "text">(key: Uint8Array | string, value: Uint8Array | string | ArrayBuffer, options?: ActorKvValueOptions<T>): Promise<void>;
@@ -1870,6 +1872,7 @@ interface QueueIterOptions<TName extends string = string, TCompletable extends b
1870
1872
  signal?: AbortSignal;
1871
1873
  completable?: TCompletable;
1872
1874
  }
1875
+ /** @deprecated Queues were deprecated in 3.0 and will be removed in a future version. Use actions and store pending work in SQLite (`c.db`). See https://rivet.dev/actors/docs/deprecated/queues */
1873
1876
  interface ActorQueue<TQueues extends QueueSchemaConfig = Record<never, never>> {
1874
1877
  send<TName extends QueueFilterName<TQueues>>(name: TName, body: QueueMessageForName<TQueues, TName>["body"]): Promise<any>;
1875
1878
  next<const TName extends QueueFilterName<TQueues>, const TCompletable extends boolean = false>(opts?: QueueNextOptions<TName, TCompletable>): Promise<any>;
@@ -1891,7 +1894,7 @@ interface ActorQueue<TQueues extends QueueSchemaConfig = Record<never, never>> {
1891
1894
  interface Conn<_TState = unknown, TConnParams = unknown, TConnState = unknown, _TVars = unknown, _TInput = unknown, _TDatabase extends AnyDatabaseProvider = AnyDatabaseProvider, _TEvents extends EventSchemaConfig = Record<never, never>, _TQueues extends QueueSchemaConfig = Record<never, never>> {
1892
1895
  id: string;
1893
1896
  params: TConnParams;
1894
- /** @deprecated Connection state is deprecated and will be removed in a future version. Track live connections in `c.vars` from `onConnect` and `onDisconnect`, and store durable per-connection data in SQLite. See https://rivet.dev/actors/docs/deprecated/state#connection-state */
1897
+ /** @deprecated Connection state was deprecated in 3.0 and will be removed in a future version. Track live connections in `c.vars` from `onConnect` and `onDisconnect`, and store durable per-connection data in SQLite. See https://rivet.dev/actors/docs/deprecated/state#connection-state */
1895
1898
  state: TConnState;
1896
1899
  isHibernatable: boolean;
1897
1900
  send(name: string, ...args: any[]): void;
@@ -1902,17 +1905,15 @@ interface ActorContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase
1902
1905
  [ACTOR_CONTEXT_INTERNAL_SYMBOL]?: unknown;
1903
1906
  /** Returns the raw unwrapped state without the write-through proxy. */
1904
1907
  [RAW_STATE_SYMBOL](): TState;
1905
- /** @deprecated Actor state is deprecated and will be removed in a future version. Store durable data in SQLite (`c.db`) and in-memory data in `c.vars`. See https://rivet.dev/actors/docs/deprecated/state */
1908
+ /** @deprecated Actor state was deprecated in 3.0 and will be removed in a future version. Store durable data in SQLite (`c.db`) and in-memory data in `c.vars`. See https://rivet.dev/actors/docs/deprecated/state */
1906
1909
  state: TState;
1907
1910
  vars: TVars;
1908
- /**
1909
- * @deprecated Actor KV is deprecated. Use embedded SQLite (`c.db`)
1910
- * or actor state instead.
1911
- */
1911
+ /** @deprecated Actor KV was deprecated in 3.0 and will be removed in a future version. Store data in SQLite (`c.db`). See https://rivet.dev/actors/docs/deprecated/kv */
1912
1912
  readonly kv: ActorKv;
1913
1913
  readonly db: InferDatabaseClient<TDatabase>;
1914
1914
  readonly schedule: ActorSchedule;
1915
1915
  readonly cron: ActorCron;
1916
+ /** @deprecated Queues were deprecated in 3.0 and will be removed in a future version. Use actions and store pending work in SQLite (`c.db`). See https://rivet.dev/actors/docs/deprecated/queues */
1916
1917
  readonly queue: ActorQueue<TQueues>;
1917
1918
  /** @experimental */
1918
1919
  readonly run: ActorRun;
@@ -1920,26 +1921,22 @@ interface ActorContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase
1920
1921
  readonly name: string;
1921
1922
  readonly key: string[];
1922
1923
  readonly region: string;
1923
- /** Provisions the experimental Actor Runtime Socket for this actor generation. */
1924
- actorRuntimeSocket(): Promise<{
1925
- path: string;
1926
- }>;
1927
1924
  readonly conns: Map<string, Conn<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues>>;
1928
1925
  readonly log: ActorLogger;
1929
1926
  readonly abortSignal: AbortSignal;
1930
1927
  readonly aborted: boolean;
1931
1928
  readonly request?: Request;
1932
- /** @deprecated No-op. Always returns `false`. Use `keepAwake(promise)` or `waitUntil(promise)` instead. Will be removed in 2.2.0. */
1929
+ /** @deprecated `preventSleep` was deprecated in 3.0 and will be removed in a future version. It is a no-op that always returns `false`. Use `c.keepAwake(promise)` or `c.waitUntil(promise)`. See https://rivet.dev/actors/docs/deprecated/prevent-sleep */
1933
1930
  readonly preventSleep: boolean;
1934
1931
  broadcast(name: string, ...args: any[]): void;
1935
- /** @deprecated Actor state is deprecated and will be removed in a future version. Store durable data in SQLite (`c.db`) and in-memory data in `c.vars`. See https://rivet.dev/actors/docs/deprecated/state */
1932
+ /** @deprecated Actor state was deprecated in 3.0 and will be removed in a future version. Store durable data in SQLite (`c.db`) and in-memory data in `c.vars`. See https://rivet.dev/actors/docs/deprecated/state */
1936
1933
  saveState(opts?: {
1937
1934
  immediate?: boolean;
1938
1935
  maxWait?: number;
1939
1936
  }): Promise<void>;
1940
1937
  keepAwake<T>(promise: Promise<T>): Promise<T>;
1941
1938
  waitUntil(promise: Promise<unknown>): void;
1942
- /** @deprecated No-op. Use `keepAwake(promise)` to hold the actor awake for a specific promise. Will be removed in 2.2.0. */
1939
+ /** @deprecated `setPreventSleep` was deprecated in 3.0 and will be removed in a future version. It is a no-op. Use `c.keepAwake(promise)` or `c.waitUntil(promise)`. See https://rivet.dev/actors/docs/deprecated/prevent-sleep */
1943
1940
  setPreventSleep(preventSleep: boolean): void;
1944
1941
  sleep(): void;
1945
1942
  destroy(): void;
@@ -1991,6 +1988,7 @@ type ActionContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase ext
1991
1988
  type BeforeActionResponseContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> = ActionContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues>;
1992
1989
  type BeforeConnectContext<TState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> = ActorContext<TState, unknown, unknown, TVars, TInput, TDatabase, TEvents, TQueues>;
1993
1990
  type ConnectContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> = ActionContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues>;
1991
+ /** @deprecated Connection state was deprecated in 3.0 and will be removed in a future version. Track live connections in `c.vars` from `onConnect` and `onDisconnect`, and store durable per-connection data in SQLite. See https://rivet.dev/actors/docs/deprecated/state#connection-state */
1994
1992
  type CreateConnStateContext<TState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> = ActorContext<TState, unknown, unknown, TVars, TInput, TDatabase, TEvents, TQueues>;
1995
1993
  type CreateContext<TState, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> = ActorContext<TState, unknown, unknown, unknown, TInput, TDatabase, TEvents, TQueues>;
1996
1994
  type CreateVarsContext<TState, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> = CreateContext<TState, TInput, TDatabase, TEvents, TQueues>;
@@ -1999,6 +1997,7 @@ type DisconnectContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase
1999
1997
  type RequestContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> = ActionContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues>;
2000
1998
  type RunContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> = ActorContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues>;
2001
1999
  type SleepContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> = RunContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues>;
2000
+ /** @deprecated Actor state was deprecated in 3.0 and will be removed in a future version. See https://rivet.dev/actors/docs/deprecated/state */
2002
2001
  type StateChangeContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> = RunContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues>;
2003
2002
  type WakeContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> = RunContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues>;
2004
2003
  type MigrateContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> = WakeContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues>;
@@ -2066,7 +2065,6 @@ declare const ActorConfigSchema: z.ZodObject<{
2066
2065
  options: z.ZodPrefault<z.ZodObject<{
2067
2066
  name: z.ZodOptional<z.ZodString>;
2068
2067
  icon: z.ZodOptional<z.ZodString>;
2069
- enableActorRuntimeSocket: z.ZodDefault<z.ZodBoolean>;
2070
2068
  canHibernateWebSocket: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodCustom<(request: Request) => boolean, (request: Request) => boolean>]>>;
2071
2069
  createVarsTimeout: z.ZodDefault<z.ZodNumber>;
2072
2070
  createConnStateTimeout: z.ZodDefault<z.ZodNumber>;
@@ -2110,17 +2108,17 @@ declare const ActorConfigSchema: z.ZodObject<{
2110
2108
  }, z.core.$strict>>;
2111
2109
  }, z.core.$strict>;
2112
2110
  type CreateState<TState, _TConnParams, _TConnState, _TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig, TQueues extends QueueSchemaConfig> = {
2113
- /** @deprecated Actor state is deprecated and will be removed in a future version. Store durable data in SQLite (`c.db`) and in-memory data in `c.vars`. See https://rivet.dev/actors/docs/deprecated/state */
2111
+ /** @deprecated Actor state was deprecated in 3.0 and will be removed in a future version. Store durable data in SQLite (`c.db`) and in-memory data in `c.vars`. See https://rivet.dev/actors/docs/deprecated/state */
2114
2112
  state: TState;
2115
2113
  } | {
2116
- /** @deprecated Actor state is deprecated and will be removed in a future version. Store durable data in SQLite (`c.db`) and in-memory data in `c.vars`. See https://rivet.dev/actors/docs/deprecated/state */
2114
+ /** @deprecated Actor state was deprecated in 3.0 and will be removed in a future version. Store durable data in SQLite (`c.db`) and in-memory data in `c.vars`. See https://rivet.dev/actors/docs/deprecated/state */
2117
2115
  createState: (c: CreateContext<TState, TInput, TDatabase, TEvents, TQueues>, input: TInput) => TState | Promise<TState>;
2118
2116
  } | Record<never, never>;
2119
2117
  type CreateConnState<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig, TQueues extends QueueSchemaConfig> = {
2120
- /** @deprecated Connection state is deprecated and will be removed in a future version. Track live connections in `c.vars` from `onConnect` and `onDisconnect`, and store durable per-connection data in SQLite. See https://rivet.dev/actors/docs/deprecated/state#connection-state */
2118
+ /** @deprecated Connection state was deprecated in 3.0 and will be removed in a future version. Track live connections in `c.vars` from `onConnect` and `onDisconnect`, and store durable per-connection data in SQLite. See https://rivet.dev/actors/docs/deprecated/state#connection-state */
2121
2119
  connState: TConnState;
2122
2120
  } | {
2123
- /** @deprecated Connection state is deprecated and will be removed in a future version. Track live connections in `c.vars` from `onConnect` and `onDisconnect`, and store durable per-connection data in SQLite. See https://rivet.dev/actors/docs/deprecated/state#connection-state */
2121
+ /** @deprecated Connection state was deprecated in 3.0 and will be removed in a future version. Track live connections in `c.vars` from `onConnect` and `onDisconnect`, and store durable per-connection data in SQLite. See https://rivet.dev/actors/docs/deprecated/state#connection-state */
2124
2122
  createConnState: (c: CreateConnStateContext<TState, TVars, TInput, TDatabase, TEvents, TQueues>, params: TConnParams) => TConnState | Promise<TConnState>;
2125
2123
  } | Record<never, never>;
2126
2124
  /**
@@ -2207,6 +2205,12 @@ interface BaseActorConfig<TState, TConnParams, TConnState, TVars, TInput, TDatab
2207
2205
  *
2208
2206
  * Can be either a function or a RunConfig object with optional name/icon metadata.
2209
2207
  *
2208
+ * Passing a plain function was deprecated in 3.0 and will be removed in a
2209
+ * future version; it logs a warning at startup. Start background work from
2210
+ * `onWake` with `c.keepAwake` and track it in `c.vars` instead.
2211
+ * `run: workflow(...)` is not deprecated. See
2212
+ * https://rivet.dev/actors/docs/deprecated/run
2213
+ *
2210
2214
  * @returns Void or a Promise.
2211
2215
  */
2212
2216
  run?: ((c: RunContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues>) => void | Promise<void>) | RunConfig<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues>;
@@ -2220,7 +2224,7 @@ interface BaseActorConfig<TState, TConnParams, TConnState, TVars, TInput, TDatab
2220
2224
  * another onStateChange call, preventing infinite recursion.
2221
2225
  *
2222
2226
  * @param newState The updated state
2223
- * @deprecated Actor state is deprecated and will be removed in a future version. Store durable data in SQLite (`c.db`) and in-memory data in `c.vars`. See https://rivet.dev/actors/docs/deprecated/state
2227
+ * @deprecated Actor state was deprecated in 3.0 and will be removed in a future version. Store durable data in SQLite (`c.db`) and in-memory data in `c.vars`. See https://rivet.dev/actors/docs/deprecated/state
2224
2228
  */
2225
2229
  onStateChange?: (c: StateChangeContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues>, newState: TState) => void;
2226
2230
  /**
@@ -2313,6 +2317,8 @@ interface BaseActorConfig<TState, TConnParams, TConnState, TVars, TInput, TDatab
2313
2317
  events?: TEvents;
2314
2318
  /**
2315
2319
  * Schema map for queue payloads sent by this actor.
2320
+ *
2321
+ * @deprecated Queues were deprecated in 3.0 and will be removed in a future version. Use actions and store pending work in SQLite (`c.db`). See https://rivet.dev/actors/docs/deprecated/queues
2316
2322
  */
2317
2323
  queues?: TQueues;
2318
2324
  }
@@ -230,7 +230,7 @@ function noopNext() {
230
230
  // package.json
231
231
  var package_default = {
232
232
  name: "rivetkit",
233
- version: "3.0.4",
233
+ version: "3.0.6",
234
234
  description: "Lightweight libraries for building stateful actors on edge platforms",
235
235
  license: "Apache-2.0",
236
236
  keywords: [
@@ -1459,7 +1459,7 @@ var ClientConfigSchemaBase = z3.object({
1459
1459
  if (!resolved && !hasWarnedMissingEndpoint) {
1460
1460
  hasWarnedMissingEndpoint = true;
1461
1461
  console.warn(
1462
- `[rivetkit] No endpoint provided to client. Defaulting to ${DEFAULT_ENDPOINT}. Starting in 2.2.0, an explicit endpoint will be required. Pass an endpoint to createClient() or createRivetKit(), or set the RIVET_ENDPOINT environment variable.`
1462
+ `[rivetkit] No endpoint provided to client. Defaulting to ${DEFAULT_ENDPOINT}. Starting in 3.2.0, an explicit endpoint will be required. Pass an endpoint to createClient() or createRivetKit(), or set the RIVET_ENDPOINT environment variable.`
1463
1463
  );
1464
1464
  }
1465
1465
  return resolved ?? DEFAULT_ENDPOINT;