rivetkit 2.0.37 → 2.0.38
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/tsup/{chunk-XI335ZED.js → chunk-4U45T5KW.js} +6 -4
- package/dist/tsup/chunk-4U45T5KW.js.map +1 -0
- package/dist/tsup/{chunk-G4N7FZMM.cjs → chunk-6WLJW57U.cjs} +149 -93
- package/dist/tsup/chunk-6WLJW57U.cjs.map +1 -0
- package/dist/tsup/{chunk-ZQBSQ6H3.js → chunk-EEL32AJM.js} +140 -89
- package/dist/tsup/chunk-EEL32AJM.js.map +1 -0
- package/dist/tsup/{chunk-J6TX5EFW.js → chunk-FA6FGAEC.js} +62 -6
- package/dist/tsup/chunk-FA6FGAEC.js.map +1 -0
- package/dist/tsup/{chunk-22NKW7F5.cjs → chunk-FZQHTGQX.cjs} +9 -9
- package/dist/tsup/{chunk-22NKW7F5.cjs.map → chunk-FZQHTGQX.cjs.map} +1 -1
- package/dist/tsup/{chunk-4V7MS7SO.cjs → chunk-GFKZZG2A.cjs} +3 -3
- package/dist/tsup/{chunk-4V7MS7SO.cjs.map → chunk-GFKZZG2A.cjs.map} +1 -1
- package/dist/tsup/{chunk-LYYTV7DN.cjs → chunk-IRTVRBJA.cjs} +46 -46
- package/dist/tsup/{chunk-LYYTV7DN.cjs.map → chunk-IRTVRBJA.cjs.map} +1 -1
- package/dist/tsup/{chunk-B6BP74X3.cjs → chunk-IWXMFQDT.cjs} +113 -74
- package/dist/tsup/chunk-IWXMFQDT.cjs.map +1 -0
- package/dist/tsup/{chunk-RBA5AQTB.js → chunk-K2RNF2ZR.js} +5 -5
- package/dist/tsup/{chunk-5VVIFC6M.cjs → chunk-LULP6HM2.cjs} +381 -330
- package/dist/tsup/chunk-LULP6HM2.cjs.map +1 -0
- package/dist/tsup/{chunk-5XGZXH74.js → chunk-MIOU6BF3.js} +57 -18
- package/dist/tsup/chunk-MIOU6BF3.js.map +1 -0
- package/dist/tsup/{chunk-X5IX3YPO.cjs → chunk-O433HWWG.cjs} +6 -4
- package/dist/tsup/chunk-O433HWWG.cjs.map +1 -0
- package/dist/tsup/{chunk-FIUSIG6J.js → chunk-UUEZVDRL.js} +4 -4
- package/dist/tsup/{chunk-RXA3ZMCL.js → chunk-WIZ4JGP6.js} +2 -2
- package/dist/tsup/client/mod.cjs +5 -5
- package/dist/tsup/client/mod.d.cts +2 -2
- package/dist/tsup/client/mod.d.ts +2 -2
- package/dist/tsup/client/mod.js +4 -4
- package/dist/tsup/common/log.cjs +2 -2
- package/dist/tsup/common/log.js +1 -1
- package/dist/tsup/common/websocket.cjs +3 -3
- package/dist/tsup/common/websocket.js +2 -2
- package/dist/tsup/{config-CRuzI6n4.d.ts → config-CbIHPGKl.d.ts} +167 -56
- package/dist/tsup/{config--NjwiYlS.d.cts → config-CwJCQyP1.d.cts} +167 -56
- package/dist/tsup/{driver-BcmckRaF.d.ts → driver-CMN823Lc.d.ts} +1 -1
- package/dist/tsup/{driver-yKjYx9Yy.d.cts → driver-Lw_oORox.d.cts} +1 -1
- package/dist/tsup/driver-helpers/mod.cjs +3 -3
- package/dist/tsup/driver-helpers/mod.d.cts +2 -2
- package/dist/tsup/driver-helpers/mod.d.ts +2 -2
- package/dist/tsup/driver-helpers/mod.js +2 -2
- package/dist/tsup/driver-test-suite/mod.cjs +34 -34
- package/dist/tsup/driver-test-suite/mod.d.cts +2 -2
- package/dist/tsup/driver-test-suite/mod.d.ts +2 -2
- package/dist/tsup/driver-test-suite/mod.js +7 -7
- package/dist/tsup/mod.cjs +17 -7
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.d.cts +4 -4
- package/dist/tsup/mod.d.ts +4 -4
- package/dist/tsup/mod.js +16 -6
- package/dist/tsup/test/mod.cjs +7 -7
- 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 +2 -2
- package/dist/tsup/utils.js +1 -1
- package/package.json +6 -4
- package/src/actor/config.ts +47 -0
- package/src/client/actor-conn.ts +70 -81
- package/src/client/actor-handle.ts +22 -12
- package/src/client/actor-query.ts +47 -0
- package/src/client/errors.ts +22 -58
- package/src/client/utils.ts +33 -0
- package/src/manager/driver.ts +1 -3
- package/src/manager-api/actors.ts +1 -20
- package/src/registry/config/index.ts +68 -0
- package/src/remote-manager-driver/mod.ts +11 -1
- package/src/serverless/router.test.ts +166 -0
- package/src/serverless/router.ts +58 -5
- package/src/utils/env-vars.ts +4 -1
- package/dist/tsup/chunk-5VVIFC6M.cjs.map +0 -1
- package/dist/tsup/chunk-5XGZXH74.js.map +0 -1
- package/dist/tsup/chunk-B6BP74X3.cjs.map +0 -1
- package/dist/tsup/chunk-G4N7FZMM.cjs.map +0 -1
- package/dist/tsup/chunk-J6TX5EFW.js.map +0 -1
- package/dist/tsup/chunk-X5IX3YPO.cjs.map +0 -1
- package/dist/tsup/chunk-XI335ZED.js.map +0 -1
- package/dist/tsup/chunk-ZQBSQ6H3.js.map +0 -1
- /package/dist/tsup/{chunk-RBA5AQTB.js.map → chunk-K2RNF2ZR.js.map} +0 -0
- /package/dist/tsup/{chunk-FIUSIG6J.js.map → chunk-UUEZVDRL.js.map} +0 -0
- /package/dist/tsup/{chunk-RXA3ZMCL.js.map → chunk-WIZ4JGP6.js.map} +0 -0
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
noopNext,
|
|
32
32
|
promiseWithResolvers,
|
|
33
33
|
stringifyError
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-4U45T5KW.js";
|
|
35
35
|
import {
|
|
36
36
|
ConnStateNotEnabled,
|
|
37
37
|
Forbidden,
|
|
@@ -1981,6 +1981,55 @@ function buildActorNames(config6) {
|
|
|
1981
1981
|
Object.keys(config6.use).map((name) => [name, { metadata: {} }])
|
|
1982
1982
|
);
|
|
1983
1983
|
}
|
|
1984
|
+
var DocInspectorConfigSchema = z7.object({
|
|
1985
|
+
enabled: z7.boolean().optional().describe("Whether to enable the Rivet Inspector. Defaults to true in development mode."),
|
|
1986
|
+
token: z7.string().optional().describe("Token used to access the Inspector."),
|
|
1987
|
+
defaultEndpoint: z7.string().optional().describe("Default RivetKit server endpoint for Rivet Inspector to connect to.")
|
|
1988
|
+
}).optional().describe("Inspector configuration for debugging and development.");
|
|
1989
|
+
var DocConfigureRunnerPoolSchema = z7.object({
|
|
1990
|
+
name: z7.string().optional().describe("Name of the runner pool."),
|
|
1991
|
+
url: z7.string().describe("URL of the serverless platform to configure runners."),
|
|
1992
|
+
headers: z7.record(z7.string(), z7.string()).optional().describe("Headers to include in requests to the serverless platform."),
|
|
1993
|
+
maxRunners: z7.number().optional().describe("Maximum number of runners in the pool."),
|
|
1994
|
+
minRunners: z7.number().optional().describe("Minimum number of runners to keep warm."),
|
|
1995
|
+
requestLifespan: z7.number().optional().describe("Maximum lifespan of a request in milliseconds."),
|
|
1996
|
+
runnersMargin: z7.number().optional().describe("Buffer margin for scaling runners."),
|
|
1997
|
+
slotsPerRunner: z7.number().optional().describe("Number of actor slots per runner."),
|
|
1998
|
+
metadata: z7.record(z7.string(), z7.unknown()).optional().describe("Additional metadata to pass to the serverless platform.")
|
|
1999
|
+
}).optional();
|
|
2000
|
+
var DocServerlessConfigSchema = z7.object({
|
|
2001
|
+
spawnEngine: z7.boolean().optional().describe("Downloads and starts the full Rust engine process. Auto-enabled in development mode when no endpoint is provided. Default: false"),
|
|
2002
|
+
engineVersion: z7.string().optional().describe("Version of the engine to download. Defaults to the current RivetKit version."),
|
|
2003
|
+
configureRunnerPool: DocConfigureRunnerPoolSchema.describe("Automatically configure serverless runners in the engine."),
|
|
2004
|
+
basePath: z7.string().optional().describe("Base path for serverless API routes. Default: '/api/rivet'"),
|
|
2005
|
+
publicEndpoint: z7.string().optional().describe("The endpoint that clients should connect to. Supports URL auth syntax: https://namespace:token@api.rivet.dev"),
|
|
2006
|
+
publicToken: z7.string().optional().describe("Token that clients should use when connecting via the public endpoint.")
|
|
2007
|
+
}).describe("Configuration for serverless deployment mode.");
|
|
2008
|
+
var DocRunnerConfigSchema = z7.object({
|
|
2009
|
+
totalSlots: z7.number().optional().describe("Total number of actor slots available. Default: 100000"),
|
|
2010
|
+
runnerName: z7.string().optional().describe("Name of this runner. Default: 'default'"),
|
|
2011
|
+
runnerKey: z7.string().optional().describe("Authentication key for the runner."),
|
|
2012
|
+
version: z7.number().optional().describe("Version number of this runner. Default: 1")
|
|
2013
|
+
}).describe("Configuration for runner mode.");
|
|
2014
|
+
var DocRegistryConfigSchema = z7.object({
|
|
2015
|
+
use: z7.record(z7.string(), z7.unknown()).describe("Actor definitions. Keys are actor names, values are actor definitions."),
|
|
2016
|
+
maxIncomingMessageSize: z7.number().optional().describe("Maximum size of incoming WebSocket messages in bytes. Default: 65536"),
|
|
2017
|
+
maxOutgoingMessageSize: z7.number().optional().describe("Maximum size of outgoing WebSocket messages in bytes. Default: 1048576"),
|
|
2018
|
+
noWelcome: z7.boolean().optional().describe("Disable the welcome message on startup. Default: false"),
|
|
2019
|
+
logging: z7.object({
|
|
2020
|
+
level: LogLevelSchema.optional().describe("Log level for RivetKit. Default: 'warn'")
|
|
2021
|
+
}).optional().describe("Logging configuration."),
|
|
2022
|
+
endpoint: z7.string().optional().describe("Endpoint URL to connect to Rivet Engine. Supports URL auth syntax: https://namespace:token@api.rivet.dev. Can also be set via RIVET_ENDPOINT environment variable."),
|
|
2023
|
+
token: z7.string().optional().describe("Authentication token for Rivet Engine. Can also be set via RIVET_TOKEN environment variable."),
|
|
2024
|
+
namespace: z7.string().optional().describe("Namespace to use. Default: 'default'. Can also be set via RIVET_NAMESPACE environment variable."),
|
|
2025
|
+
headers: z7.record(z7.string(), z7.string()).optional().describe("Additional headers to include in requests to Rivet Engine."),
|
|
2026
|
+
serveManager: z7.boolean().optional().describe("Whether to start the local manager server. Auto-determined based on endpoint and NODE_ENV if not specified."),
|
|
2027
|
+
managerBasePath: z7.string().optional().describe("Base path for the manager API. Default: '/'"),
|
|
2028
|
+
managerPort: z7.number().optional().describe("Port to run the manager on. Default: 6420"),
|
|
2029
|
+
inspector: DocInspectorConfigSchema,
|
|
2030
|
+
serverless: DocServerlessConfigSchema.optional(),
|
|
2031
|
+
runner: DocRunnerConfigSchema.optional()
|
|
2032
|
+
}).describe("RivetKit registry configuration.");
|
|
1984
2033
|
|
|
1985
2034
|
// src/common/router.ts
|
|
1986
2035
|
function logger() {
|
|
@@ -2080,21 +2129,6 @@ import { z as z8 } from "zod";
|
|
|
2080
2129
|
var RivetIdSchema = z8.string();
|
|
2081
2130
|
|
|
2082
2131
|
// src/manager-api/actors.ts
|
|
2083
|
-
var ServerlessConnectionErrorSchema = z9.union([
|
|
2084
|
-
z9.object({ http_error: z9.object({ status_code: z9.number(), body: z9.string() }) }),
|
|
2085
|
-
z9.literal("stream_ended_early"),
|
|
2086
|
-
z9.object({ connection_error: z9.object({ message: z9.string() }) }),
|
|
2087
|
-
z9.literal("invalid_base64"),
|
|
2088
|
-
z9.object({ invalid_payload: z9.object({ message: z9.string() }) }),
|
|
2089
|
-
z9.literal("runner_config_not_found"),
|
|
2090
|
-
z9.literal("runner_config_not_serverless"),
|
|
2091
|
-
z9.literal("namespace_not_found")
|
|
2092
|
-
]);
|
|
2093
|
-
var ActorErrorDetailsSchema = z9.union([
|
|
2094
|
-
z9.object({ serverless_error: ServerlessConnectionErrorSchema }),
|
|
2095
|
-
z9.object({ no_capacity: z9.object({ runner_name: z9.string() }) }),
|
|
2096
|
-
z9.object({ runner_no_response: z9.object({ runner_id: z9.string() }) })
|
|
2097
|
-
]);
|
|
2098
2132
|
var ActorSchema = z9.object({
|
|
2099
2133
|
actor_id: RivetIdSchema,
|
|
2100
2134
|
name: z9.string(),
|
|
@@ -2106,7 +2140,7 @@ var ActorSchema = z9.object({
|
|
|
2106
2140
|
destroy_ts: z9.number().nullable().optional(),
|
|
2107
2141
|
sleep_ts: z9.number().nullable().optional(),
|
|
2108
2142
|
start_ts: z9.number().nullable().optional(),
|
|
2109
|
-
error:
|
|
2143
|
+
error: z9.unknown().nullable().optional()
|
|
2110
2144
|
});
|
|
2111
2145
|
var ActorNameSchema = z9.object({
|
|
2112
2146
|
metadata: z9.record(z9.string(), z9.unknown())
|
|
@@ -4948,6 +4982,11 @@ export {
|
|
|
4948
4982
|
TestConfigSchema,
|
|
4949
4983
|
RegistryConfigSchema,
|
|
4950
4984
|
buildActorNames,
|
|
4985
|
+
DocInspectorConfigSchema,
|
|
4986
|
+
DocConfigureRunnerPoolSchema,
|
|
4987
|
+
DocServerlessConfigSchema,
|
|
4988
|
+
DocRunnerConfigSchema,
|
|
4989
|
+
DocRegistryConfigSchema,
|
|
4951
4990
|
loggerMiddleware,
|
|
4952
4991
|
handleRouteNotFound,
|
|
4953
4992
|
handleRouteError,
|
|
@@ -4960,4 +4999,4 @@ export {
|
|
|
4960
4999
|
buildManagerRouter,
|
|
4961
5000
|
getInitialActorKvState
|
|
4962
5001
|
};
|
|
4963
|
-
//# sourceMappingURL=chunk-
|
|
5002
|
+
//# sourceMappingURL=chunk-MIOU6BF3.js.map
|