rivetkit 2.3.0-rc.6 → 2.3.0-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.
- package/dist/browser/client.d.ts +37 -8
- package/dist/browser/client.js +64 -34
- package/dist/browser/client.js.map +1 -1
- package/dist/browser/inspector/client.js +4 -3
- package/dist/browser/inspector/client.js.map +1 -1
- package/dist/tsup/actor/errors.cjs +2 -2
- package/dist/tsup/actor/errors.js +1 -1
- package/dist/tsup/agent-os/index.cjs +7 -5
- package/dist/tsup/agent-os/index.cjs.map +1 -1
- package/dist/tsup/agent-os/index.d.cts +26 -5
- package/dist/tsup/agent-os/index.d.ts +26 -5
- package/dist/tsup/agent-os/index.js +7 -5
- package/dist/tsup/agent-os/index.js.map +1 -1
- package/dist/tsup/{chunk-2G64KSZQ.cjs → chunk-2H4ISA4Y.cjs} +10 -10
- package/dist/tsup/chunk-2H4ISA4Y.cjs.map +1 -0
- package/dist/tsup/{chunk-ZI5QJMKO.js → chunk-4DJMFOSU.js} +2 -2
- package/dist/tsup/{chunk-RTC2AZGB.js → chunk-4LTY5TOO.js} +132 -4
- package/dist/tsup/chunk-4LTY5TOO.js.map +1 -0
- package/dist/tsup/{chunk-DEO7MMWQ.js → chunk-52TPEKEC.js} +2 -2
- package/dist/tsup/{chunk-HTR4YLNT.cjs → chunk-55E7IR6D.cjs} +4 -4
- package/dist/tsup/{chunk-HTR4YLNT.cjs.map → chunk-55E7IR6D.cjs.map} +1 -1
- package/dist/tsup/{chunk-QAZLM4WT.cjs → chunk-63WNTDRC.cjs} +3 -3
- package/dist/tsup/{chunk-QAZLM4WT.cjs.map → chunk-63WNTDRC.cjs.map} +1 -1
- package/dist/tsup/{chunk-EMO6E3PJ.js → chunk-CMV6N5OX.js} +3 -3
- package/dist/tsup/{chunk-T6YVRM4K.js → chunk-D5G75T7J.js} +3 -1
- package/dist/tsup/chunk-D5G75T7J.js.map +1 -0
- package/dist/tsup/{chunk-LIXXFXVR.cjs → chunk-FEOG44WH.cjs} +137 -9
- package/dist/tsup/chunk-FEOG44WH.cjs.map +1 -0
- package/dist/tsup/{chunk-M5C7YNI5.cjs → chunk-G5HUSWP4.cjs} +8 -8
- package/dist/tsup/{chunk-M5C7YNI5.cjs.map → chunk-G5HUSWP4.cjs.map} +1 -1
- package/dist/tsup/{chunk-6S25NVAP.js → chunk-HERL2VQ2.js} +7 -5
- package/dist/tsup/chunk-HERL2VQ2.js.map +1 -0
- package/dist/tsup/{chunk-JALSAX7Z.cjs → chunk-SJLPZEA3.cjs} +3 -3
- package/dist/tsup/{chunk-JALSAX7Z.cjs.map → chunk-SJLPZEA3.cjs.map} +1 -1
- package/dist/tsup/{chunk-WQ4HNA4W.cjs → chunk-SRNOPUC6.cjs} +4 -2
- package/dist/tsup/chunk-SRNOPUC6.cjs.map +1 -0
- package/dist/tsup/{chunk-KIWH5H3K.js → chunk-TMLOKTRB.js} +3 -3
- package/dist/tsup/chunk-TMLOKTRB.js.map +1 -0
- package/dist/tsup/{chunk-CAF6JDJE.js → chunk-VFIY6GWO.js} +4 -4
- package/dist/tsup/chunk-VFIY6GWO.js.map +1 -0
- package/dist/tsup/{chunk-FLODVLYW.js → chunk-VJ4Y4WBT.js} +10 -34
- package/dist/tsup/chunk-VJ4Y4WBT.js.map +1 -0
- package/dist/tsup/{chunk-K5BA2LEO.cjs → chunk-X6HIFXNK.cjs} +14 -12
- package/dist/tsup/chunk-X6HIFXNK.cjs.map +1 -0
- package/dist/tsup/{chunk-ENK7C66G.cjs → chunk-ZGPX6KAH.cjs} +169 -193
- package/dist/tsup/chunk-ZGPX6KAH.cjs.map +1 -0
- package/dist/tsup/client/mod.cjs +7 -7
- package/dist/tsup/client/mod.d.cts +2 -2
- package/dist/tsup/client/mod.d.ts +2 -2
- package/dist/tsup/client/mod.js +6 -6
- package/dist/tsup/common/log.cjs +3 -3
- package/dist/tsup/common/log.js +2 -2
- package/dist/tsup/common/websocket.cjs +4 -4
- package/dist/tsup/common/websocket.js +3 -3
- package/dist/tsup/{config-0Ta55UV0.d.ts → config-Ak1lv4gF.d.ts} +27 -6
- package/dist/tsup/{config-Ca8dN4cS.d.cts → config-DU_xj4qZ.d.cts} +27 -6
- package/dist/tsup/{context-B_IWbWne.d.ts → context-DAAp4Lpg.d.ts} +1 -1
- package/dist/tsup/{context-CUrQ9MHc.d.cts → context-Dt_L55q8.d.cts} +1 -1
- package/dist/tsup/inspector/mod.cjs +6 -6
- package/dist/tsup/inspector/mod.js +5 -5
- package/dist/tsup/mod.cjs +470 -316
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.d.cts +3 -3
- package/dist/tsup/mod.d.ts +3 -3
- package/dist/tsup/mod.js +391 -237
- package/dist/tsup/mod.js.map +1 -1
- package/dist/tsup/process-metrics-NW754INA.js +118 -0
- package/dist/tsup/process-metrics-NW754INA.js.map +1 -0
- package/dist/tsup/process-metrics-TYAGKCEJ.cjs +118 -0
- package/dist/tsup/process-metrics-TYAGKCEJ.cjs.map +1 -0
- package/dist/tsup/test/mod.cjs +10 -10
- package/dist/tsup/test/mod.d.cts +1 -1
- package/dist/tsup/test/mod.d.ts +1 -1
- package/dist/tsup/test/mod.js +6 -6
- package/dist/tsup/utils.cjs +3 -3
- package/dist/tsup/utils.js +2 -2
- package/dist/tsup/workflow/mod.cjs +41 -16
- package/dist/tsup/workflow/mod.cjs.map +1 -1
- package/dist/tsup/workflow/mod.d.cts +3 -3
- package/dist/tsup/workflow/mod.d.ts +3 -3
- package/dist/tsup/workflow/mod.js +35 -10
- package/dist/tsup/workflow/mod.js.map +1 -1
- package/package.json +11 -10
- package/src/actor/config.ts +3 -0
- package/src/actor/errors.ts +2 -2
- package/src/agent-os/actor/session.ts +2 -2
- package/src/client/actor-conn.ts +6 -34
- package/src/client/actor-handle.ts +2 -1
- package/src/client/queue.ts +2 -1
- package/src/client/utils.ts +0 -1
- package/src/common/encoding.ts +243 -5
- package/src/common/inline-websocket-adapter.ts +12 -12
- package/src/common/log.ts +1 -0
- package/src/common/router.ts +2 -2
- package/src/common/utils.ts +0 -148
- package/src/drivers/engine/actor-driver.ts +11 -11
- package/src/engine-client/actor-websocket-client.ts +2 -1
- package/src/engine-client/mod.ts +3 -2
- package/src/registry/index.ts +46 -109
- package/src/registry/napi-runtime.ts +11 -34
- package/src/registry/native.ts +193 -104
- package/src/registry/process-metrics.ts +183 -0
- package/src/registry/runtime.ts +5 -12
- package/src/registry/wasm-runtime.ts +2 -13
- package/src/registry/write-through-proxy.ts +40 -0
- package/src/serde.ts +2 -2
- package/src/workflow/context.ts +32 -5
- package/src/workflow/inspector.ts +2 -1
- package/dist/tsup/chunk-2G64KSZQ.cjs.map +0 -1
- package/dist/tsup/chunk-6S25NVAP.js.map +0 -1
- package/dist/tsup/chunk-CAF6JDJE.js.map +0 -1
- package/dist/tsup/chunk-ENK7C66G.cjs.map +0 -1
- package/dist/tsup/chunk-FLODVLYW.js.map +0 -1
- package/dist/tsup/chunk-K5BA2LEO.cjs.map +0 -1
- package/dist/tsup/chunk-KIWH5H3K.js.map +0 -1
- package/dist/tsup/chunk-LIXXFXVR.cjs.map +0 -1
- package/dist/tsup/chunk-RTC2AZGB.js.map +0 -1
- package/dist/tsup/chunk-T6YVRM4K.js.map +0 -1
- package/dist/tsup/chunk-WQ4HNA4W.cjs.map +0 -1
- /package/dist/tsup/{chunk-ZI5QJMKO.js.map → chunk-4DJMFOSU.js.map} +0 -0
- /package/dist/tsup/{chunk-DEO7MMWQ.js.map → chunk-52TPEKEC.js.map} +0 -0
- /package/dist/tsup/{chunk-EMO6E3PJ.js.map → chunk-CMV6N5OX.js.map} +0 -0
package/dist/tsup/client/mod.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkG5HUSWP4cjs = require('../chunk-G5HUSWP4.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -8,16 +8,16 @@ var _chunkM5C7YNI5cjs = require('../chunk-M5C7YNI5.cjs');
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkZGPX6KAHcjs = require('../chunk-ZGPX6KAH.cjs');
|
|
12
12
|
require('../chunk-LD5YASJU.cjs');
|
|
13
|
-
require('../chunk-
|
|
13
|
+
require('../chunk-FEOG44WH.cjs');
|
|
14
14
|
require('../chunk-2NDZ7JCR.cjs');
|
|
15
|
-
require('../chunk-
|
|
16
|
-
require('../chunk-
|
|
15
|
+
require('../chunk-SJLPZEA3.cjs');
|
|
16
|
+
require('../chunk-X6HIFXNK.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunk63WNTDRCcjs = require('../chunk-63WNTDRC.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -29,5 +29,5 @@ var _chunkQAZLM4WTcjs = require('../chunk-QAZLM4WT.cjs');
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
exports.ActorClientError =
|
|
32
|
+
exports.ActorClientError = _chunkZGPX6KAHcjs.ActorClientError; exports.ActorConnDisposed = _chunkZGPX6KAHcjs.ActorConnDisposed; exports.ActorConnRaw = _chunkZGPX6KAHcjs.ActorConnRaw; exports.ActorError = _chunk63WNTDRCcjs.RivetError; exports.ActorHandleRaw = _chunkZGPX6KAHcjs.ActorHandleRaw; exports.MalformedResponseMessage = _chunkZGPX6KAHcjs.MalformedResponseMessage; exports.ManagerError = _chunkZGPX6KAHcjs.ManagerError; exports.RivetError = _chunk63WNTDRCcjs.RivetError; exports.UserError = _chunk63WNTDRCcjs.UserError; exports.createClient = _chunkG5HUSWP4cjs.createClient;
|
|
33
33
|
//# sourceMappingURL=mod.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { aq as Registry, V as Client } from '../config-DU_xj4qZ.cjs';
|
|
2
|
+
export { a$ as ActorAccessor, b0 as ActorActionFunction, b1 as ActorActionOptions, b2 as ActorConn, b3 as ActorConnRaw, b4 as ActorConnStatus, b5 as ActorConnectOptions, r as ActorDefinition, b6 as ActorGatewayOptions, b7 as ActorHandle, b8 as ActorHandleRaw, A as AnyActorDefinition, b9 as ClientRaw, ba as ConnectionStateCallback, bb as CreateOptions, bc as CreateRequest, a4 as Encoding, bd as EventUnsubscribe, be as ExtractActorsFromRegistry, bf as ExtractRegistryFromClient, bg as GetOptions, bh as GetWithIdOptions, bi as QueryOptions, bj as Region, bk as StatusChangeCallback } from '../config-DU_xj4qZ.cjs';
|
|
3
3
|
import z from 'zod/v4';
|
|
4
4
|
import { GetUpgradeWebSocket } from '../utils.cjs';
|
|
5
5
|
export { R as ActorError, R as RivetError, U as UserError } from '../utils-DVekpm4I.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { aq as Registry, V as Client } from '../config-Ak1lv4gF.js';
|
|
2
|
+
export { a$ as ActorAccessor, b0 as ActorActionFunction, b1 as ActorActionOptions, b2 as ActorConn, b3 as ActorConnRaw, b4 as ActorConnStatus, b5 as ActorConnectOptions, r as ActorDefinition, b6 as ActorGatewayOptions, b7 as ActorHandle, b8 as ActorHandleRaw, A as AnyActorDefinition, b9 as ClientRaw, ba as ConnectionStateCallback, bb as CreateOptions, bc as CreateRequest, a4 as Encoding, bd as EventUnsubscribe, be as ExtractActorsFromRegistry, bf as ExtractRegistryFromClient, bg as GetOptions, bh as GetWithIdOptions, bi as QueryOptions, bj as Region, bk as StatusChangeCallback } from '../config-Ak1lv4gF.js';
|
|
3
3
|
import z from 'zod/v4';
|
|
4
4
|
import { GetUpgradeWebSocket } from '../utils.js';
|
|
5
5
|
export { R as ActorError, R as RivetError, U as UserError } from '../utils-DVekpm4I.js';
|
package/dist/tsup/client/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createClient
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-CMV6N5OX.js";
|
|
4
4
|
import {
|
|
5
5
|
ActorClientError,
|
|
6
6
|
ActorConnDisposed,
|
|
@@ -8,16 +8,16 @@ import {
|
|
|
8
8
|
ActorHandleRaw,
|
|
9
9
|
MalformedResponseMessage,
|
|
10
10
|
ManagerError
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-VJ4Y4WBT.js";
|
|
12
12
|
import "../chunk-3YY5S6TV.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-4LTY5TOO.js";
|
|
14
14
|
import "../chunk-PCBNKI2J.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-4DJMFOSU.js";
|
|
16
|
+
import "../chunk-HERL2VQ2.js";
|
|
17
17
|
import {
|
|
18
18
|
RivetError,
|
|
19
19
|
UserError
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-TMLOKTRB.js";
|
|
21
21
|
export {
|
|
22
22
|
ActorClientError,
|
|
23
23
|
ActorConnDisposed,
|
package/dist/tsup/common/log.cjs
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
10
|
-
require('../chunk-
|
|
9
|
+
var _chunkX6HIFXNKcjs = require('../chunk-X6HIFXNK.cjs');
|
|
10
|
+
require('../chunk-63WNTDRC.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -16,5 +16,5 @@ require('../chunk-QAZLM4WT.cjs');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
exports.LogLevelSchema =
|
|
19
|
+
exports.LogLevelSchema = _chunkX6HIFXNKcjs.LogLevelSchema; exports.configureBaseLogger = _chunkX6HIFXNKcjs.configureBaseLogger; exports.configureDefaultLogger = _chunkX6HIFXNKcjs.configureDefaultLogger; exports.getBaseLogger = _chunkX6HIFXNKcjs.getBaseLogger; exports.getIncludeTarget = _chunkX6HIFXNKcjs.getIncludeTarget; exports.getLogger = _chunkX6HIFXNKcjs.getLogger; exports.getPinoLevel = _chunkX6HIFXNKcjs.getPinoLevel;
|
|
20
20
|
//# sourceMappingURL=log.cjs.map
|
package/dist/tsup/common/log.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
3
|
+
var _chunkSJLPZEA3cjs = require('../chunk-SJLPZEA3.cjs');
|
|
4
|
+
require('../chunk-X6HIFXNK.cjs');
|
|
5
|
+
require('../chunk-63WNTDRC.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.importWebSocket =
|
|
8
|
+
exports.importWebSocket = _chunkSJLPZEA3cjs.importWebSocket;
|
|
9
9
|
//# sourceMappingURL=websocket.cjs.map
|
|
@@ -561,14 +561,12 @@ type FetchHandler = (request: Request, ...args: any) => Response | Promise<Respo
|
|
|
561
561
|
interface ServerlessHandler {
|
|
562
562
|
fetch: FetchHandler;
|
|
563
563
|
}
|
|
564
|
-
interface
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
prometheusMetrics(request?: Request): Promise<Response>;
|
|
564
|
+
interface RegistryDiagnostics {
|
|
565
|
+
mode: string;
|
|
566
|
+
envoyActiveActorCount?: number | null;
|
|
568
567
|
}
|
|
569
568
|
declare class Registry<A extends RegistryActors> {
|
|
570
569
|
#private;
|
|
571
|
-
readonly routes: RegistryRoutes;
|
|
572
570
|
get config(): RegistryConfigInput<A>;
|
|
573
571
|
parseConfig(): RegistryConfig;
|
|
574
572
|
constructor(config: RegistryConfigInput<A>);
|
|
@@ -592,6 +590,26 @@ declare class Registry<A extends RegistryActors> {
|
|
|
592
590
|
* ```
|
|
593
591
|
*/
|
|
594
592
|
serve(): ServerlessHandler;
|
|
593
|
+
/**
|
|
594
|
+
* Starts an HTTP server that dispatches every request through the
|
|
595
|
+
* serverless handler. Uses `crossPlatformServe` to pick the right
|
|
596
|
+
* runtime (Node, Bun, Deno).
|
|
597
|
+
*
|
|
598
|
+
* @param opts.port Port to listen on. Defaults to 3000.
|
|
599
|
+
* @param opts.publicDir If set, serves static files from this directory
|
|
600
|
+
* before falling through to the registry handler.
|
|
601
|
+
*
|
|
602
|
+
* @example
|
|
603
|
+
* ```ts
|
|
604
|
+
* await registry.listen();
|
|
605
|
+
* await registry.listen({ port: 8080, publicDir: "./public" });
|
|
606
|
+
* ```
|
|
607
|
+
*/
|
|
608
|
+
listen(opts?: {
|
|
609
|
+
port?: number;
|
|
610
|
+
publicDir?: string;
|
|
611
|
+
}): Promise<void>;
|
|
612
|
+
diagnostics(): Promise<RegistryDiagnostics>;
|
|
595
613
|
startEnvoy(): void;
|
|
596
614
|
/**
|
|
597
615
|
* Starts the actor envoy for standalone server deployments.
|
|
@@ -1120,6 +1138,7 @@ declare function createClientWithDriver<A extends Registry<any>>(driver: EngineC
|
|
|
1120
1138
|
|
|
1121
1139
|
declare const DEFAULT_SLEEP_GRACE_PERIOD = 15000;
|
|
1122
1140
|
declare const ACTOR_CONTEXT_INTERNAL_SYMBOL: unique symbol;
|
|
1141
|
+
declare const RAW_STATE_SYMBOL: unique symbol;
|
|
1123
1142
|
declare const CONN_DRIVER_SYMBOL: unique symbol;
|
|
1124
1143
|
declare const CONN_STATE_MANAGER_SYMBOL: unique symbol;
|
|
1125
1144
|
interface ActorLogger {
|
|
@@ -1248,6 +1267,8 @@ interface Conn<TState = unknown, TConnParams = unknown, TConnState = unknown, TV
|
|
|
1248
1267
|
type AnyConn = Conn<any, any, any, any, any, any, any, any>;
|
|
1249
1268
|
interface ActorContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> {
|
|
1250
1269
|
[ACTOR_CONTEXT_INTERNAL_SYMBOL]?: unknown;
|
|
1270
|
+
/** Returns the raw unwrapped state without the write-through proxy. */
|
|
1271
|
+
[RAW_STATE_SYMBOL](): TState;
|
|
1251
1272
|
state: TState;
|
|
1252
1273
|
vars: TVars;
|
|
1253
1274
|
readonly kv: ActorKv;
|
|
@@ -1739,4 +1760,4 @@ declare const DocActorConfigSchema: z.ZodObject<{
|
|
|
1739
1760
|
}, z.core.$strip>>;
|
|
1740
1761
|
}, z.core.$strip>;
|
|
1741
1762
|
|
|
1742
|
-
export { DocConfigurePoolSchema as $, type AnyActorDefinition as A, type BaseActorDefinition as B, type ConnectContext as C, type DestroyContext as D, type EventSchemaConfig as E, type ActorSchedule as F, type ActorTypes as G, ActorsSchema as H, type AnyActorInstance as I, type AnyClient as J, type AnyConn as K, type AnyStaticActorDefinition as L, type MigrateContext as M, type AnyStaticActorInstance as N, type AuthIntent as O, type BaseActorInstance as P, type QueueSchemaConfig as Q, type RequestContext as R, type SleepContext as S, CONN_DRIVER_SYMBOL as T, CONN_STATE_MANAGER_SYMBOL as U, type Client as V, type WakeContext as W, type Conn as X, DEFAULT_SLEEP_GRACE_PERIOD as Y, DocActorConfigSchema as Z, DocActorOptionsSchema as _, type ActionContext as a, type
|
|
1763
|
+
export { DocConfigurePoolSchema as $, type AnyActorDefinition as A, type BaseActorDefinition as B, type ConnectContext as C, type DestroyContext as D, type EventSchemaConfig as E, type ActorSchedule as F, type ActorTypes as G, ActorsSchema as H, type AnyActorInstance as I, type AnyClient as J, type AnyConn as K, type AnyStaticActorDefinition as L, type MigrateContext as M, type AnyStaticActorInstance as N, type AuthIntent as O, type BaseActorInstance as P, type QueueSchemaConfig as Q, type RequestContext as R, type SleepContext as S, CONN_DRIVER_SYMBOL as T, CONN_STATE_MANAGER_SYMBOL as U, type Client as V, type WakeContext as W, type Conn as X, DEFAULT_SLEEP_GRACE_PERIOD as Y, DocActorConfigSchema as Z, DocActorOptionsSchema as _, type ActionContext as a, type ActorAccessor as a$, DocEnvoyConfigSchema as a0, DocRegistryConfigSchema as a1, DocServerlessConfigSchema as a2, DocSqliteConfigSchema as a3, type Encoding as a4, type FetchHandler as a5, type GlobalActorOptions as a6, type GlobalActorOptionsInput as a7, GlobalActorOptionsSchema as a8, type InspectorUnsubscribe as a9, RuntimeKindSchema as aA, type ServerlessHandler as aB, type SqliteBackend as aC, SqliteBackendSchema as aD, type SqliteConfig as aE, SqliteConfigSchema as aF, type TestConfig as aG, TestConfigSchema as aH, type Type as aI, type WasmRuntimeBindings as aJ, type WasmRuntimeConfig as aK, WasmRuntimeConfigSchema as aL, type WasmRuntimeInitInput as aM, type WorkflowInspectorConfig as aN, actor as aO, buildActorNames as aP, createClientWithDriver as aQ, event as aR, getRunFunction as aS, getRunInspectorConfig as aT, getRunMetadata as aU, isStaticActorDefinition as aV, isStaticActorInstance as aW, lookupInRegistry as aX, queue as aY, setup as aZ, test as a_, type InstanceActorOptions as aa, type InstanceActorOptionsInput as ab, InstanceActorOptionsSchema as ac, type QueueEnqueueAndWaitOptions as ad, type QueueFilterName as ae, type QueueIterOptions as af, type QueueMessageOf as ag, type QueueName as ah, type QueueNextBatchOptions as ai, type QueueNextOptions as aj, type QueueResultMessageForName as ak, type QueueTryNextBatchOptions as al, type QueueTryNextOptions as am, type QueueWaitOptions as an, RAW_STATE_SYMBOL as ao, RUN_FUNCTION_CONFIG_SYMBOL as ap, Registry as aq, type RegistryActors as ar, type RegistryConfig as as, type RegistryConfigInput as at, RegistryConfigSchema as au, type RegistryDiagnostics as av, type RunConfig as aw, RunConfigSchema as ax, type RunInspectorConfig as ay, type RuntimeKind as az, type BeforeActionResponseContext as b, type ActorActionFunction as b0, type ActorActionOptions as b1, type ActorConn as b2, ActorConnRaw as b3, type ActorConnStatus as b4, type ActorConnectOptions as b5, type ActorGatewayOptions as b6, type ActorHandle as b7, ActorHandleRaw as b8, ClientRaw as b9, type ConnectionStateCallback as ba, type CreateOptions as bb, type CreateRequest as bc, type EventUnsubscribe as bd, type ExtractActorsFromRegistry as be, type ExtractRegistryFromClient as bf, type GetOptions as bg, type GetWithIdOptions as bh, type QueryOptions as bi, type Region as bj, type StatusChangeCallback as bk, type InferSchemaMap as bl, type InferEventArgs as bm, type BeforeConnectContext as c, type CreateConnStateContext as d, type CreateContext as e, type CreateVarsContext as f, type DisconnectContext as g, type RunContext as h, type StateChangeContext as i, type WebSocketContext as j, ACTOR_CONTEXT_INTERNAL_SYMBOL as k, type Actions as l, type ActorConfig as m, type ActorConfigInput as n, ActorConfigSchema as o, type ActorContext as p, type ActorContextOf as q, ActorDefinition as r, type ActorKey as s, type ActorKv as t, type ActorLogger as u, type ActorOptions as v, type ActorOptionsInput as w, ActorOptionsSchema as x, type ActorQuery as y, type ActorQueue as z };
|
|
@@ -561,14 +561,12 @@ type FetchHandler = (request: Request, ...args: any) => Response | Promise<Respo
|
|
|
561
561
|
interface ServerlessHandler {
|
|
562
562
|
fetch: FetchHandler;
|
|
563
563
|
}
|
|
564
|
-
interface
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
prometheusMetrics(request?: Request): Promise<Response>;
|
|
564
|
+
interface RegistryDiagnostics {
|
|
565
|
+
mode: string;
|
|
566
|
+
envoyActiveActorCount?: number | null;
|
|
568
567
|
}
|
|
569
568
|
declare class Registry<A extends RegistryActors> {
|
|
570
569
|
#private;
|
|
571
|
-
readonly routes: RegistryRoutes;
|
|
572
570
|
get config(): RegistryConfigInput<A>;
|
|
573
571
|
parseConfig(): RegistryConfig;
|
|
574
572
|
constructor(config: RegistryConfigInput<A>);
|
|
@@ -592,6 +590,26 @@ declare class Registry<A extends RegistryActors> {
|
|
|
592
590
|
* ```
|
|
593
591
|
*/
|
|
594
592
|
serve(): ServerlessHandler;
|
|
593
|
+
/**
|
|
594
|
+
* Starts an HTTP server that dispatches every request through the
|
|
595
|
+
* serverless handler. Uses `crossPlatformServe` to pick the right
|
|
596
|
+
* runtime (Node, Bun, Deno).
|
|
597
|
+
*
|
|
598
|
+
* @param opts.port Port to listen on. Defaults to 3000.
|
|
599
|
+
* @param opts.publicDir If set, serves static files from this directory
|
|
600
|
+
* before falling through to the registry handler.
|
|
601
|
+
*
|
|
602
|
+
* @example
|
|
603
|
+
* ```ts
|
|
604
|
+
* await registry.listen();
|
|
605
|
+
* await registry.listen({ port: 8080, publicDir: "./public" });
|
|
606
|
+
* ```
|
|
607
|
+
*/
|
|
608
|
+
listen(opts?: {
|
|
609
|
+
port?: number;
|
|
610
|
+
publicDir?: string;
|
|
611
|
+
}): Promise<void>;
|
|
612
|
+
diagnostics(): Promise<RegistryDiagnostics>;
|
|
595
613
|
startEnvoy(): void;
|
|
596
614
|
/**
|
|
597
615
|
* Starts the actor envoy for standalone server deployments.
|
|
@@ -1120,6 +1138,7 @@ declare function createClientWithDriver<A extends Registry<any>>(driver: EngineC
|
|
|
1120
1138
|
|
|
1121
1139
|
declare const DEFAULT_SLEEP_GRACE_PERIOD = 15000;
|
|
1122
1140
|
declare const ACTOR_CONTEXT_INTERNAL_SYMBOL: unique symbol;
|
|
1141
|
+
declare const RAW_STATE_SYMBOL: unique symbol;
|
|
1123
1142
|
declare const CONN_DRIVER_SYMBOL: unique symbol;
|
|
1124
1143
|
declare const CONN_STATE_MANAGER_SYMBOL: unique symbol;
|
|
1125
1144
|
interface ActorLogger {
|
|
@@ -1248,6 +1267,8 @@ interface Conn<TState = unknown, TConnParams = unknown, TConnState = unknown, TV
|
|
|
1248
1267
|
type AnyConn = Conn<any, any, any, any, any, any, any, any>;
|
|
1249
1268
|
interface ActorContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> {
|
|
1250
1269
|
[ACTOR_CONTEXT_INTERNAL_SYMBOL]?: unknown;
|
|
1270
|
+
/** Returns the raw unwrapped state without the write-through proxy. */
|
|
1271
|
+
[RAW_STATE_SYMBOL](): TState;
|
|
1251
1272
|
state: TState;
|
|
1252
1273
|
vars: TVars;
|
|
1253
1274
|
readonly kv: ActorKv;
|
|
@@ -1739,4 +1760,4 @@ declare const DocActorConfigSchema: z.ZodObject<{
|
|
|
1739
1760
|
}, z.core.$strip>>;
|
|
1740
1761
|
}, z.core.$strip>;
|
|
1741
1762
|
|
|
1742
|
-
export { DocConfigurePoolSchema as $, type AnyActorDefinition as A, type BaseActorDefinition as B, type ConnectContext as C, type DestroyContext as D, type EventSchemaConfig as E, type ActorSchedule as F, type ActorTypes as G, ActorsSchema as H, type AnyActorInstance as I, type AnyClient as J, type AnyConn as K, type AnyStaticActorDefinition as L, type MigrateContext as M, type AnyStaticActorInstance as N, type AuthIntent as O, type BaseActorInstance as P, type QueueSchemaConfig as Q, type RequestContext as R, type SleepContext as S, CONN_DRIVER_SYMBOL as T, CONN_STATE_MANAGER_SYMBOL as U, type Client as V, type WakeContext as W, type Conn as X, DEFAULT_SLEEP_GRACE_PERIOD as Y, DocActorConfigSchema as Z, DocActorOptionsSchema as _, type ActionContext as a, type
|
|
1763
|
+
export { DocConfigurePoolSchema as $, type AnyActorDefinition as A, type BaseActorDefinition as B, type ConnectContext as C, type DestroyContext as D, type EventSchemaConfig as E, type ActorSchedule as F, type ActorTypes as G, ActorsSchema as H, type AnyActorInstance as I, type AnyClient as J, type AnyConn as K, type AnyStaticActorDefinition as L, type MigrateContext as M, type AnyStaticActorInstance as N, type AuthIntent as O, type BaseActorInstance as P, type QueueSchemaConfig as Q, type RequestContext as R, type SleepContext as S, CONN_DRIVER_SYMBOL as T, CONN_STATE_MANAGER_SYMBOL as U, type Client as V, type WakeContext as W, type Conn as X, DEFAULT_SLEEP_GRACE_PERIOD as Y, DocActorConfigSchema as Z, DocActorOptionsSchema as _, type ActionContext as a, type ActorAccessor as a$, DocEnvoyConfigSchema as a0, DocRegistryConfigSchema as a1, DocServerlessConfigSchema as a2, DocSqliteConfigSchema as a3, type Encoding as a4, type FetchHandler as a5, type GlobalActorOptions as a6, type GlobalActorOptionsInput as a7, GlobalActorOptionsSchema as a8, type InspectorUnsubscribe as a9, RuntimeKindSchema as aA, type ServerlessHandler as aB, type SqliteBackend as aC, SqliteBackendSchema as aD, type SqliteConfig as aE, SqliteConfigSchema as aF, type TestConfig as aG, TestConfigSchema as aH, type Type as aI, type WasmRuntimeBindings as aJ, type WasmRuntimeConfig as aK, WasmRuntimeConfigSchema as aL, type WasmRuntimeInitInput as aM, type WorkflowInspectorConfig as aN, actor as aO, buildActorNames as aP, createClientWithDriver as aQ, event as aR, getRunFunction as aS, getRunInspectorConfig as aT, getRunMetadata as aU, isStaticActorDefinition as aV, isStaticActorInstance as aW, lookupInRegistry as aX, queue as aY, setup as aZ, test as a_, type InstanceActorOptions as aa, type InstanceActorOptionsInput as ab, InstanceActorOptionsSchema as ac, type QueueEnqueueAndWaitOptions as ad, type QueueFilterName as ae, type QueueIterOptions as af, type QueueMessageOf as ag, type QueueName as ah, type QueueNextBatchOptions as ai, type QueueNextOptions as aj, type QueueResultMessageForName as ak, type QueueTryNextBatchOptions as al, type QueueTryNextOptions as am, type QueueWaitOptions as an, RAW_STATE_SYMBOL as ao, RUN_FUNCTION_CONFIG_SYMBOL as ap, Registry as aq, type RegistryActors as ar, type RegistryConfig as as, type RegistryConfigInput as at, RegistryConfigSchema as au, type RegistryDiagnostics as av, type RunConfig as aw, RunConfigSchema as ax, type RunInspectorConfig as ay, type RuntimeKind as az, type BeforeActionResponseContext as b, type ActorActionFunction as b0, type ActorActionOptions as b1, type ActorConn as b2, ActorConnRaw as b3, type ActorConnStatus as b4, type ActorConnectOptions as b5, type ActorGatewayOptions as b6, type ActorHandle as b7, ActorHandleRaw as b8, ClientRaw as b9, type ConnectionStateCallback as ba, type CreateOptions as bb, type CreateRequest as bc, type EventUnsubscribe as bd, type ExtractActorsFromRegistry as be, type ExtractRegistryFromClient as bf, type GetOptions as bg, type GetWithIdOptions as bh, type QueryOptions as bi, type Region as bj, type StatusChangeCallback as bk, type InferSchemaMap as bl, type InferEventArgs as bm, type BeforeConnectContext as c, type CreateConnStateContext as d, type CreateContext as e, type CreateVarsContext as f, type DisconnectContext as g, type RunContext as h, type StateChangeContext as i, type WebSocketContext as j, ACTOR_CONTEXT_INTERNAL_SYMBOL as k, type Actions as l, type ActorConfig as m, type ActorConfigInput as n, ActorConfigSchema as o, type ActorContext as p, type ActorContextOf as q, ActorDefinition as r, type ActorKey as s, type ActorKv as t, type ActorLogger as u, type ActorOptions as v, type ActorOptionsInput as w, ActorOptionsSchema as x, type ActorQuery as y, type ActorQueue as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext, ae as QueueFilterName, aj as QueueNextOptions, ak as QueueResultMessageForName, ai as QueueNextBatchOptions,
|
|
1
|
+
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext, ae as QueueFilterName, aj as QueueNextOptions, ak as QueueResultMessageForName, ai as QueueNextBatchOptions, bl as InferSchemaMap, aq as Registry, V as Client, u as ActorLogger, bm as InferEventArgs } from './config-Ak1lv4gF.js';
|
|
2
2
|
import { A as AnyDatabaseProvider, I as InferDatabaseClient } from './config-CxjGYf4K.js';
|
|
3
3
|
import { WorkflowContextInterface, TryStepResult, TryBlockResult, LoopResult, LoopConfig, BranchConfig, BranchOutput, EntryKindType } from '@rivetkit/workflow-engine';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext, ae as QueueFilterName, aj as QueueNextOptions, ak as QueueResultMessageForName, ai as QueueNextBatchOptions,
|
|
1
|
+
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext, ae as QueueFilterName, aj as QueueNextOptions, ak as QueueResultMessageForName, ai as QueueNextBatchOptions, bl as InferSchemaMap, aq as Registry, V as Client, u as ActorLogger, bm as InferEventArgs } from './config-DU_xj4qZ.cjs';
|
|
2
2
|
import { A as AnyDatabaseProvider, I as InferDatabaseClient } from './config-CxjGYf4K.cjs';
|
|
3
3
|
import { WorkflowContextInterface, TryStepResult, TryBlockResult, LoopResult, LoopConfig, BranchConfig, BranchOutput, EntryKindType } from '@rivetkit/workflow-engine';
|
|
4
4
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2H4ISA4Ycjs = require('../chunk-2H4ISA4Y.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
10
|
-
require('../chunk-
|
|
7
|
+
var _chunk55E7IR6Dcjs = require('../chunk-55E7IR6D.cjs');
|
|
8
|
+
require('../chunk-FEOG44WH.cjs');
|
|
9
|
+
require('../chunk-X6HIFXNK.cjs');
|
|
10
|
+
require('../chunk-63WNTDRC.cjs');
|
|
11
11
|
|
|
12
12
|
// src/common/bare/generated/inspector/v4.ts
|
|
13
13
|
var _barets = require('@rivetkit/bare-ts'); var bare = _interopRequireWildcard(_barets);
|
|
@@ -761,5 +761,5 @@ function decodeToClient(bytes) {
|
|
|
761
761
|
|
|
762
762
|
|
|
763
763
|
|
|
764
|
-
exports.createWorkflowInspectorAdapter =
|
|
764
|
+
exports.createWorkflowInspectorAdapter = _chunk2H4ISA4Ycjs.createWorkflowInspectorAdapter; exports.decodeToClient = decodeToClient; exports.decodeToServer = decodeToServer; exports.decodeWorkflowHistoryTransport = _chunk55E7IR6Dcjs.decodeWorkflowHistoryTransport; exports.encodeToClient = encodeToClient; exports.encodeToServer = encodeToServer; exports.encodeWorkflowHistoryTransport = _chunk55E7IR6Dcjs.encodeWorkflowHistoryTransport; exports.readActionRequest = readActionRequest; exports.readActionResponse = readActionResponse; exports.readConnection = readConnection; exports.readConnectionsRequest = readConnectionsRequest; exports.readConnectionsResponse = readConnectionsResponse; exports.readConnectionsUpdated = readConnectionsUpdated; exports.readDatabaseSchemaRequest = readDatabaseSchemaRequest; exports.readDatabaseSchemaResponse = readDatabaseSchemaResponse; exports.readDatabaseTableRowsRequest = readDatabaseTableRowsRequest; exports.readDatabaseTableRowsResponse = readDatabaseTableRowsResponse; exports.readError = readError; exports.readInit = readInit; exports.readPatchStateRequest = readPatchStateRequest; exports.readQueueMessageSummary = readQueueMessageSummary; exports.readQueueRequest = readQueueRequest; exports.readQueueResponse = readQueueResponse; exports.readQueueStatus = readQueueStatus; exports.readQueueUpdated = readQueueUpdated; exports.readRpcsListRequest = readRpcsListRequest; exports.readRpcsListResponse = readRpcsListResponse; exports.readState = readState; exports.readStateRequest = readStateRequest; exports.readStateResponse = readStateResponse; exports.readStateUpdated = readStateUpdated; exports.readToClient = readToClient; exports.readToClientBody = readToClientBody; exports.readToServer = readToServer; exports.readToServerBody = readToServerBody; exports.readTraceQueryRequest = readTraceQueryRequest; exports.readTraceQueryResponse = readTraceQueryResponse; exports.readWorkflowHistory = readWorkflowHistory; exports.readWorkflowHistoryRequest = readWorkflowHistoryRequest; exports.readWorkflowHistoryResponse = readWorkflowHistoryResponse; exports.readWorkflowHistoryUpdated = readWorkflowHistoryUpdated; exports.readWorkflowReplayRequest = readWorkflowReplayRequest; exports.readWorkflowReplayResponse = readWorkflowReplayResponse; exports.writeActionRequest = writeActionRequest; exports.writeActionResponse = writeActionResponse; exports.writeConnection = writeConnection; exports.writeConnectionsRequest = writeConnectionsRequest; exports.writeConnectionsResponse = writeConnectionsResponse; exports.writeConnectionsUpdated = writeConnectionsUpdated; exports.writeDatabaseSchemaRequest = writeDatabaseSchemaRequest; exports.writeDatabaseSchemaResponse = writeDatabaseSchemaResponse; exports.writeDatabaseTableRowsRequest = writeDatabaseTableRowsRequest; exports.writeDatabaseTableRowsResponse = writeDatabaseTableRowsResponse; exports.writeError = writeError; exports.writeInit = writeInit; exports.writePatchStateRequest = writePatchStateRequest; exports.writeQueueMessageSummary = writeQueueMessageSummary; exports.writeQueueRequest = writeQueueRequest; exports.writeQueueResponse = writeQueueResponse; exports.writeQueueStatus = writeQueueStatus; exports.writeQueueUpdated = writeQueueUpdated; exports.writeRpcsListRequest = writeRpcsListRequest; exports.writeRpcsListResponse = writeRpcsListResponse; exports.writeState = writeState; exports.writeStateRequest = writeStateRequest; exports.writeStateResponse = writeStateResponse; exports.writeStateUpdated = writeStateUpdated; exports.writeToClient = writeToClient; exports.writeToClientBody = writeToClientBody; exports.writeToServer = writeToServer; exports.writeToServerBody = writeToServerBody; exports.writeTraceQueryRequest = writeTraceQueryRequest; exports.writeTraceQueryResponse = writeTraceQueryResponse; exports.writeWorkflowHistory = writeWorkflowHistory; exports.writeWorkflowHistoryRequest = writeWorkflowHistoryRequest; exports.writeWorkflowHistoryResponse = writeWorkflowHistoryResponse; exports.writeWorkflowHistoryUpdated = writeWorkflowHistoryUpdated; exports.writeWorkflowReplayRequest = writeWorkflowReplayRequest; exports.writeWorkflowReplayResponse = writeWorkflowReplayResponse;
|
|
765
765
|
//# sourceMappingURL=mod.cjs.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createWorkflowInspectorAdapter
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-VFIY6GWO.js";
|
|
4
4
|
import {
|
|
5
5
|
decodeWorkflowHistoryTransport,
|
|
6
6
|
encodeWorkflowHistoryTransport
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-52TPEKEC.js";
|
|
8
|
+
import "../chunk-4LTY5TOO.js";
|
|
9
|
+
import "../chunk-HERL2VQ2.js";
|
|
10
|
+
import "../chunk-TMLOKTRB.js";
|
|
11
11
|
|
|
12
12
|
// src/common/bare/generated/inspector/v4.ts
|
|
13
13
|
import * as bare from "@rivetkit/bare-ts";
|