rivetkit 0.0.0-sqlite-sync-3x-release.a00b07f → 0.0.0-sqlite-query-metrics-v2.f5d3605
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 +59 -99
- package/dist/browser/client.js +20 -193
- package/dist/browser/client.js.map +1 -1
- package/dist/browser/inspector/client.js +2 -1
- package/dist/browser/inspector/client.js.map +1 -1
- package/dist/tsup/{chunk-D5WUPE47.js → chunk-3URZ4UV5.js} +2 -2
- package/dist/tsup/{chunk-TSQTI6H6.js → chunk-D4G35VTO.js} +4 -4
- package/dist/tsup/{chunk-OTVJYZ2L.cjs → chunk-DDS7OOVF.cjs} +166 -326
- package/dist/tsup/chunk-DDS7OOVF.cjs.map +1 -0
- package/dist/tsup/{chunk-6KXVLIXL.cjs → chunk-DHL2M2E2.cjs} +3 -3
- package/dist/tsup/{chunk-6KXVLIXL.cjs.map → chunk-DHL2M2E2.cjs.map} +1 -1
- package/dist/tsup/{chunk-ZYK4B5WV.js → chunk-E2CUROR3.js} +2 -2
- package/dist/tsup/{chunk-JUWMP5O3.js → chunk-EPRA2TCT.js} +2 -2
- package/dist/tsup/{chunk-3DONDAMG.js → chunk-F7IGTKGM.js} +2 -2
- package/dist/tsup/{chunk-BTSDFFDC.cjs → chunk-FYDB45YU.cjs} +10 -10
- package/dist/tsup/{chunk-BTSDFFDC.cjs.map → chunk-FYDB45YU.cjs.map} +1 -1
- package/dist/tsup/{chunk-73RNTXHB.cjs → chunk-HO76AEDH.cjs} +3 -3
- package/dist/tsup/{chunk-73RNTXHB.cjs.map → chunk-HO76AEDH.cjs.map} +1 -1
- package/dist/tsup/{chunk-A2CF6PFH.js → chunk-JI6GZ2C2.js} +1 -18
- package/dist/tsup/chunk-JI6GZ2C2.js.map +1 -0
- package/dist/tsup/{chunk-Z7E2G3JZ.cjs → chunk-JW2WPE6Z.cjs} +4 -4
- package/dist/tsup/{chunk-Z7E2G3JZ.cjs.map → chunk-JW2WPE6Z.cjs.map} +1 -1
- package/dist/tsup/{chunk-2MOLY6AM.cjs → chunk-KDT56V3Y.cjs} +11 -10
- package/dist/tsup/chunk-KDT56V3Y.cjs.map +1 -0
- package/dist/tsup/{chunk-DJUBJQEQ.js → chunk-KSP3NXGY.js} +3 -3
- package/dist/tsup/{chunk-JUHXV3HF.cjs → chunk-L3Z3W44Q.cjs} +3 -3
- package/dist/tsup/{chunk-JUHXV3HF.cjs.map → chunk-L3Z3W44Q.cjs.map} +1 -1
- package/dist/tsup/{chunk-RTWH3AX3.cjs → chunk-MYWZCDML.cjs} +2 -19
- package/dist/tsup/chunk-MYWZCDML.cjs.map +1 -0
- package/dist/tsup/{chunk-TRUHDXOU.js → chunk-PJ5EXY6F.js} +25 -185
- package/dist/tsup/chunk-PJ5EXY6F.js.map +1 -0
- package/dist/tsup/{chunk-TM76Z7XT.cjs → chunk-QR6EAWEC.cjs} +7 -7
- package/dist/tsup/{chunk-TM76Z7XT.cjs.map → chunk-QR6EAWEC.cjs.map} +1 -1
- package/dist/tsup/{chunk-BRH4PQS5.js → chunk-USKGKQZM.js} +11 -10
- package/dist/tsup/chunk-USKGKQZM.js.map +1 -0
- package/dist/tsup/client/mod.cjs +6 -6
- package/dist/tsup/client/mod.d.cts +3 -15
- package/dist/tsup/client/mod.d.ts +3 -15
- package/dist/tsup/client/mod.js +5 -5
- 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-DK144OAw.d.cts → config-CkmVg2fG.d.cts} +12 -58
- package/dist/tsup/{config-B4erdavw.d.ts → config-Cw_BwH_G.d.ts} +12 -58
- package/dist/tsup/{config-BfG1qpYz.d.cts → config-D4clT6mq.d.cts} +52 -34
- package/dist/tsup/{config-BfG1qpYz.d.ts → config-D4clT6mq.d.ts} +52 -34
- package/dist/tsup/{context-Oxi6YWcG.d.ts → context-BYOKTQJi.d.ts} +2 -2
- package/dist/tsup/{context-Cvnf3BRe.d.cts → context-_xIcgBnE.d.cts} +2 -2
- package/dist/tsup/db/drizzle.cjs +2 -2
- package/dist/tsup/db/drizzle.d.cts +1 -1
- package/dist/tsup/db/drizzle.d.ts +1 -1
- package/dist/tsup/db/drizzle.js +1 -1
- package/dist/tsup/db/mod.cjs +3 -3
- package/dist/tsup/db/mod.d.cts +2 -2
- package/dist/tsup/db/mod.d.ts +2 -2
- package/dist/tsup/db/mod.js +2 -2
- package/dist/tsup/dynamic/mod.d.cts +2 -2
- package/dist/tsup/dynamic/mod.d.ts +2 -2
- package/dist/tsup/inspector/mod.cjs +5 -5
- package/dist/tsup/inspector/mod.js +4 -4
- package/dist/tsup/inspector/workflow.cjs +4 -4
- package/dist/tsup/inspector/workflow.js +3 -3
- package/dist/tsup/inspector-tab/mod.d.cts +3 -3
- package/dist/tsup/inspector-tab/mod.d.ts +3 -3
- package/dist/tsup/mod.cjs +201 -548
- 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 +116 -463
- package/dist/tsup/mod.js.map +1 -1
- package/dist/tsup/test/mod.cjs +7 -7
- package/dist/tsup/test/mod.d.cts +2 -2
- package/dist/tsup/test/mod.d.ts +2 -2
- package/dist/tsup/test/mod.js +5 -5
- package/dist/tsup/unstable/migrations.d.cts +1 -1
- package/dist/tsup/unstable/migrations.d.ts +1 -1
- package/dist/tsup/utils.cjs +2 -2
- package/dist/tsup/utils.js +1 -1
- package/dist/tsup/workflow/mod.cjs +17 -17
- package/dist/tsup/workflow/mod.cjs.map +1 -1
- package/dist/tsup/workflow/mod.d.cts +4 -4
- package/dist/tsup/workflow/mod.d.ts +4 -4
- package/dist/tsup/workflow/mod.js +5 -5
- package/package.json +10 -9
- package/src/actor/config.test.ts +78 -0
- package/src/actor/keys.test.ts +275 -0
- package/src/actor/keys.ts +0 -86
- package/src/actor/utils.test.ts +48 -0
- package/src/client/actor-conn.ts +6 -92
- package/src/client/actor-handle.ts +3 -21
- package/src/client/client.ts +0 -6
- package/src/client/config.ts +1 -12
- package/src/client/lifecycle-errors.ts +1 -16
- package/src/client/test.ts +44 -0
- package/src/client/token-provider.test.ts +86 -0
- package/src/client/utils.ts +2 -13
- package/src/common/database/config.ts +52 -46
- package/src/common/database/mod.test.ts +364 -0
- package/src/common/database/native-database.test.ts +220 -0
- package/src/common/database/native-database.ts +27 -247
- package/src/common/inline-websocket-adapter.test.ts +51 -0
- package/src/common/router.ts +1 -1
- package/src/db/drizzle.test.ts +164 -0
- package/src/db/mod.ts +1 -0
- package/src/engine-api/actors.ts +3 -3
- package/src/engine-client/actor-websocket-client.ts +2 -4
- package/src/engine-client/api-endpoints.ts +14 -44
- package/src/engine-client/mod.ts +2 -2
- package/src/registry/config/envoy.ts +1 -1
- package/src/registry/config/index.test.ts +25 -0
- package/src/registry/config/index.ts +31 -28
- package/src/registry/index.ts +19 -51
- package/src/registry/napi-runtime.ts +2 -81
- package/src/registry/native.ts +51 -183
- package/src/registry/run-handler-coordinator.test.ts +252 -0
- package/src/registry/runtime.test.ts +124 -0
- package/src/registry/runtime.ts +10 -79
- package/src/registry/wasm-runtime.ts +3 -94
- package/src/unstable/migrations.test.ts +170 -0
- package/src/utils/endpoint-parser.test.ts +206 -0
- package/src/utils/env-vars.ts +10 -15
- package/src/utils.test.ts +34 -0
- package/src/workflow/driver.test.ts +62 -0
- package/dist/tsup/chunk-2MOLY6AM.cjs.map +0 -1
- package/dist/tsup/chunk-A2CF6PFH.js.map +0 -1
- package/dist/tsup/chunk-BRH4PQS5.js.map +0 -1
- package/dist/tsup/chunk-OTVJYZ2L.cjs.map +0 -1
- package/dist/tsup/chunk-RTWH3AX3.cjs.map +0 -1
- package/dist/tsup/chunk-TRUHDXOU.js.map +0 -1
- package/src/client/retry-budget.ts +0 -78
- /package/dist/tsup/{chunk-D5WUPE47.js.map → chunk-3URZ4UV5.js.map} +0 -0
- /package/dist/tsup/{chunk-TSQTI6H6.js.map → chunk-D4G35VTO.js.map} +0 -0
- /package/dist/tsup/{chunk-ZYK4B5WV.js.map → chunk-E2CUROR3.js.map} +0 -0
- /package/dist/tsup/{chunk-JUWMP5O3.js.map → chunk-EPRA2TCT.js.map} +0 -0
- /package/dist/tsup/{chunk-3DONDAMG.js.map → chunk-F7IGTKGM.js.map} +0 -0
- /package/dist/tsup/{chunk-DJUBJQEQ.js.map → chunk-KSP3NXGY.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
|
-
import { A as AnyDatabaseProvider, a as SqliteProfilingOptions, f as SqliteNativeMetrics, I as InferDatabaseClient } from './config-
|
|
2
|
+
import { A as AnyDatabaseProvider, a as SqliteProfilingOptions, f as SqliteNativeMetrics, I as InferDatabaseClient } from './config-D4clT6mq.cjs';
|
|
3
3
|
import * as _rivetkit_rivetkit_wasm from '@rivetkit/rivetkit-wasm';
|
|
4
4
|
import { z as z$1 } from 'zod';
|
|
5
5
|
import { Logger } from 'pino';
|
|
@@ -182,11 +182,11 @@ declare const RegistryConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
182
182
|
publicEndpoint: z$1.ZodPipe<z$1.ZodOptional<z$1.ZodString>, z$1.ZodTransform<string | undefined, string | undefined>>;
|
|
183
183
|
publicToken: z$1.ZodPipe<z$1.ZodOptional<z$1.ZodString>, z$1.ZodTransform<string | undefined, string | undefined>>;
|
|
184
184
|
}, z$1.core.$strip>>>;
|
|
185
|
-
|
|
185
|
+
envoy: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodObject<{
|
|
186
186
|
poolName: z$1.ZodDefault<z$1.ZodString>;
|
|
187
187
|
version: z$1.ZodDefault<z$1.ZodNumber>;
|
|
188
188
|
totalSlots: z$1.ZodDefault<z$1.ZodNumber>;
|
|
189
|
-
|
|
189
|
+
envoyKey: z$1.ZodOptional<z$1.ZodString>;
|
|
190
190
|
}, z$1.core.$strip>>>;
|
|
191
191
|
shutdown: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodObject<{
|
|
192
192
|
gracePeriodMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
@@ -197,7 +197,6 @@ declare const RegistryConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
197
197
|
backend: "local" | "remote";
|
|
198
198
|
} | undefined;
|
|
199
199
|
endpoint: string | undefined;
|
|
200
|
-
engineSpawn: boolean;
|
|
201
200
|
startServices: boolean;
|
|
202
201
|
namespace: string;
|
|
203
202
|
token: string | undefined;
|
|
@@ -235,11 +234,11 @@ declare const RegistryConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
235
234
|
engineHost: string;
|
|
236
235
|
enginePort: number;
|
|
237
236
|
engineVersion: string;
|
|
238
|
-
|
|
237
|
+
envoy: {
|
|
239
238
|
poolName: string;
|
|
240
239
|
version: number;
|
|
241
240
|
totalSlots: number;
|
|
242
|
-
|
|
241
|
+
envoyKey?: string | undefined;
|
|
243
242
|
};
|
|
244
243
|
shutdown: {
|
|
245
244
|
disableSignalHandlers: boolean;
|
|
@@ -294,11 +293,11 @@ declare const RegistryConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
294
293
|
publicEndpoint: string | undefined;
|
|
295
294
|
publicToken: string | undefined;
|
|
296
295
|
};
|
|
297
|
-
|
|
296
|
+
envoy: {
|
|
298
297
|
poolName: string;
|
|
299
298
|
version: number;
|
|
300
299
|
totalSlots: number;
|
|
301
|
-
|
|
300
|
+
envoyKey?: string | undefined;
|
|
302
301
|
};
|
|
303
302
|
shutdown: {
|
|
304
303
|
disableSignalHandlers: boolean;
|
|
@@ -344,7 +343,7 @@ declare const DocServerlessConfigSchema: z$1.ZodObject<{
|
|
|
344
343
|
declare const DocEnvoyConfigSchema: z$1.ZodObject<{
|
|
345
344
|
totalSlots: z$1.ZodOptional<z$1.ZodNumber>;
|
|
346
345
|
poolName: z$1.ZodOptional<z$1.ZodString>;
|
|
347
|
-
|
|
346
|
+
envoyKey: z$1.ZodOptional<z$1.ZodString>;
|
|
348
347
|
version: z$1.ZodOptional<z$1.ZodNumber>;
|
|
349
348
|
}, z$1.core.$strip>;
|
|
350
349
|
declare const DocSqliteConfigSchema: z$1.ZodOptional<z$1.ZodObject<{
|
|
@@ -402,10 +401,10 @@ declare const DocRegistryConfigSchema: z$1.ZodObject<{
|
|
|
402
401
|
publicEndpoint: z$1.ZodOptional<z$1.ZodString>;
|
|
403
402
|
publicToken: z$1.ZodOptional<z$1.ZodString>;
|
|
404
403
|
}, z$1.core.$strip>>;
|
|
405
|
-
|
|
404
|
+
envoy: z$1.ZodOptional<z$1.ZodObject<{
|
|
406
405
|
totalSlots: z$1.ZodOptional<z$1.ZodNumber>;
|
|
407
406
|
poolName: z$1.ZodOptional<z$1.ZodString>;
|
|
408
|
-
|
|
407
|
+
envoyKey: z$1.ZodOptional<z$1.ZodString>;
|
|
409
408
|
version: z$1.ZodOptional<z$1.ZodNumber>;
|
|
410
409
|
}, z$1.core.$strip>>;
|
|
411
410
|
}, z$1.core.$strip>;
|
|
@@ -816,7 +815,6 @@ interface RuntimeActorConfig {
|
|
|
816
815
|
icon?: string;
|
|
817
816
|
hasDatabase?: boolean;
|
|
818
817
|
remoteSqlite?: boolean;
|
|
819
|
-
sqliteDeferredCommits?: boolean;
|
|
820
818
|
sqliteProfiling?: SqliteProfilingOptions;
|
|
821
819
|
tracing?: RuntimeActorTracingConfig;
|
|
822
820
|
enableActorRuntimeSocket?: boolean;
|
|
@@ -874,8 +872,6 @@ interface RuntimeServeConfig {
|
|
|
874
872
|
engineBinaryPath?: string;
|
|
875
873
|
startServices?: boolean;
|
|
876
874
|
servicesBinaryPath?: string;
|
|
877
|
-
/** Whether config resolution selected a managed local development engine. */
|
|
878
|
-
engineSpawn?: boolean;
|
|
879
875
|
engineHost?: string;
|
|
880
876
|
enginePort?: number;
|
|
881
877
|
handleInspectorHttpInRuntime?: boolean;
|
|
@@ -964,12 +960,7 @@ interface CoreRuntime {
|
|
|
964
960
|
createCancellationToken(): CancellationTokenHandle;
|
|
965
961
|
cancellationTokenAborted(token: CancellationTokenHandle): boolean;
|
|
966
962
|
cancelCancellationToken(token: CancellationTokenHandle): void;
|
|
967
|
-
|
|
968
|
-
* Calls `callback` once when `token` is cancelled. Returns a release
|
|
969
|
-
* function that drops the registration without calling `callback`; call it
|
|
970
|
-
* once cancellation no longer matters so the native listener is freed.
|
|
971
|
-
*/
|
|
972
|
-
onCancellationTokenCancelled(token: CancellationTokenHandle, callback: (...args: unknown[]) => unknown): () => void;
|
|
963
|
+
onCancellationTokenCancelled(token: CancellationTokenHandle, callback: (...args: unknown[]) => unknown): void;
|
|
973
964
|
actorState(ctx: ActorContextHandle): RuntimeBytes;
|
|
974
965
|
actorBeginOnStateChange(ctx: ActorContextHandle): void;
|
|
975
966
|
actorEndOnStateChange(ctx: ActorContextHandle): void;
|
|
@@ -1043,20 +1034,13 @@ interface CoreRuntime {
|
|
|
1043
1034
|
actorKvBatchPut(ctx: ActorContextHandle, entries: RuntimeKvEntry[]): Promise<void>;
|
|
1044
1035
|
actorKvBatchDelete(ctx: ActorContextHandle, keys: RuntimeBytes[]): Promise<void>;
|
|
1045
1036
|
actorSqlExec(ctx: ActorContextHandle, sql: string): Promise<RuntimeSqlExecResult>;
|
|
1046
|
-
actorSqlExecSync(ctx: ActorContextHandle, sql: string): RuntimeSqlExecResult;
|
|
1047
1037
|
actorSqlExecute(ctx: ActorContextHandle, sql: string, params?: RuntimeSqlBindParams): Promise<RuntimeSqlExecuteResult>;
|
|
1048
|
-
actorSqlExecuteSync(ctx: ActorContextHandle, sql: string, params?: RuntimeSqlBindParams): RuntimeSqlExecuteResult;
|
|
1049
1038
|
actorSqlExecuteBatch(ctx: ActorContextHandle, statements: RuntimeSqlBatchStatement[]): Promise<RuntimeSqlExecuteResult[]>;
|
|
1050
1039
|
actorSqlBeginTransaction(ctx: ActorContextHandle, timeoutMs?: number, name?: string): Promise<SqliteTransactionHandle>;
|
|
1051
|
-
actorSqlBeginTransactionSync(ctx: ActorContextHandle, timeoutMs?: number, name?: string): SqliteTransactionHandle;
|
|
1052
1040
|
actorSqlTransactionExec(transaction: SqliteTransactionHandle, sql: string): Promise<RuntimeSqlExecResult>;
|
|
1053
|
-
actorSqlTransactionExecSync(transaction: SqliteTransactionHandle, sql: string): RuntimeSqlExecResult;
|
|
1054
1041
|
actorSqlTransactionExecute(transaction: SqliteTransactionHandle, sql: string, params?: RuntimeSqlBindParams): Promise<RuntimeSqlExecuteResult>;
|
|
1055
|
-
actorSqlTransactionExecuteSync(transaction: SqliteTransactionHandle, sql: string, params?: RuntimeSqlBindParams): RuntimeSqlExecuteResult;
|
|
1056
1042
|
actorSqlTransactionCommit(transaction: SqliteTransactionHandle): Promise<void>;
|
|
1057
|
-
actorSqlTransactionCommitSync(transaction: SqliteTransactionHandle): void;
|
|
1058
1043
|
actorSqlTransactionRollback(transaction: SqliteTransactionHandle): Promise<void>;
|
|
1059
|
-
actorSqlTransactionRollbackSync(transaction: SqliteTransactionHandle): void;
|
|
1060
1044
|
actorBeginStateTransaction(ctx: ActorContextHandle, timeoutMs?: number): Promise<ActorStateTransactionHandle>;
|
|
1061
1045
|
actorStateTransactionExecute(transaction: ActorStateTransactionHandle, sql: string, params?: RuntimeSqlBindParams): Promise<RuntimeSqlExecuteResult>;
|
|
1062
1046
|
actorStateTransactionCommit(transaction: ActorStateTransactionHandle, payload: RuntimeStateDeltaPayload): Promise<void>;
|
|
@@ -1065,13 +1049,6 @@ interface CoreRuntime {
|
|
|
1065
1049
|
actorSqlRun(ctx: ActorContextHandle, sql: string, params?: RuntimeSqlBindParams): Promise<RuntimeSqlRunResult>;
|
|
1066
1050
|
actorSqlMetrics(ctx: ActorContextHandle): SqliteNativeMetrics | null;
|
|
1067
1051
|
actorSqlTakeLastKvError(ctx: ActorContextHandle): string | null;
|
|
1068
|
-
/** Opens the actor database so later synchronous calls never fetch its first pages. */
|
|
1069
|
-
actorSqlOpen(ctx: ActorContextHandle): Promise<void>;
|
|
1070
|
-
/** Returns the ticket of the latest local commit. */
|
|
1071
|
-
actorSqlCommitTicket(ctx: ActorContextHandle): number;
|
|
1072
|
-
/** Resolves once the commit `ticket` names and every earlier commit are durable. */
|
|
1073
|
-
actorSqlWhenDurable(ctx: ActorContextHandle, ticket: number): Promise<void>;
|
|
1074
|
-
actorSqlAbortGeneration(ctx: ActorContextHandle, reason: string): void;
|
|
1075
1052
|
actorSqlClose(ctx: ActorContextHandle): Promise<void>;
|
|
1076
1053
|
actorRuntimeSocketProvision(ctx: ActorContextHandle): Promise<RuntimeActorRuntimeSocketEndpointInfo>;
|
|
1077
1054
|
actorQueueSend(ctx: ActorContextHandle, name: string, body: RuntimeBytes): Promise<RuntimeQueueMessage>;
|
|
@@ -1486,27 +1463,6 @@ declare class ActorConnRaw {
|
|
|
1486
1463
|
*/
|
|
1487
1464
|
type ActorConn<AD extends AnyActorDefinition> = Omit<ActorConnRaw, "send" | "on" | "once"> & ActorDefinitionQueueSend<AD> & ActorDefinitionEventSubscriptions<AD> & ActorDefinitionActions<AD>;
|
|
1488
1465
|
|
|
1489
|
-
/** How many retries a client may spend, as a share of the requests it sends. */
|
|
1490
|
-
interface RetryBudgetOptions {
|
|
1491
|
-
/** Retries allowed per 100 requests (default 10). */
|
|
1492
|
-
percent?: number;
|
|
1493
|
-
/** Retries the client can bank for a burst of refusals; the budget starts full (default 100). */
|
|
1494
|
-
maxTokens?: number;
|
|
1495
|
-
}
|
|
1496
|
-
/**
|
|
1497
|
-
* Bounds the client's retries of refused requests. Each request adds a fraction of a token and
|
|
1498
|
-
* each retry spends one, so retries stay a fixed share of traffic while the service sheds load
|
|
1499
|
-
* instead of multiplying it.
|
|
1500
|
-
*/
|
|
1501
|
-
declare class RetryBudget {
|
|
1502
|
-
#private;
|
|
1503
|
-
constructor(options?: RetryBudgetOptions);
|
|
1504
|
-
/** Credits one request sent. */
|
|
1505
|
-
deposit(): void;
|
|
1506
|
-
/** Spends one token. Returns `false` when the budget is spent. */
|
|
1507
|
-
tryWithdraw(): boolean;
|
|
1508
|
-
}
|
|
1509
|
-
|
|
1510
1466
|
/**
|
|
1511
1467
|
* Provides underlying functions for stateless {@link ActorHandle} for action calls.
|
|
1512
1468
|
* Similar to ActorConnRaw but doesn't maintain a connection.
|
|
@@ -1522,7 +1478,7 @@ declare class ActorHandleRaw {
|
|
|
1522
1478
|
*
|
|
1523
1479
|
* @protected
|
|
1524
1480
|
*/
|
|
1525
|
-
constructor(client: any, driver: EngineControlClient, params: unknown, getParams: (() => Promise<unknown>) | undefined, encoding: Encoding, actorResolutionState: ActorResolutionState, gatewayOptions?: ActorGatewayOptions, signal?: AbortSignal, currentActorInvocation?: CurrentActorInvocation, startCallSpan?: StartCallSpan
|
|
1481
|
+
constructor(client: any, driver: EngineControlClient, params: unknown, getParams: (() => Promise<unknown>) | undefined, encoding: Encoding, actorResolutionState: ActorResolutionState, gatewayOptions?: ActorGatewayOptions, signal?: AbortSignal, currentActorInvocation?: CurrentActorInvocation, startCallSpan?: StartCallSpan);
|
|
1526
1482
|
send(name: string, body: unknown, options: QueueSendWaitOptions): Promise<QueueSendResult>;
|
|
1527
1483
|
send(name: string, body: unknown, options?: QueueSendNoWaitOptions): Promise<void>;
|
|
1528
1484
|
/**
|
|
@@ -1729,8 +1685,6 @@ declare const CREATE_ACTOR_CONN_PROXY: unique symbol;
|
|
|
1729
1685
|
interface ClientRawOptions {
|
|
1730
1686
|
encoding?: Encoding;
|
|
1731
1687
|
gateway?: ActorGatewayOptions;
|
|
1732
|
-
/** Bounds retries of refused requests across every handle of this client. */
|
|
1733
|
-
retryBudget?: RetryBudgetOptions;
|
|
1734
1688
|
}
|
|
1735
1689
|
/** Runtime-supplied wiring for clients created inside an actor. Set only by the native runtime. */
|
|
1736
1690
|
interface ActorClientRuntimeOptions {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
|
-
import { A as AnyDatabaseProvider, a as SqliteProfilingOptions, f as SqliteNativeMetrics, I as InferDatabaseClient } from './config-
|
|
2
|
+
import { A as AnyDatabaseProvider, a as SqliteProfilingOptions, f as SqliteNativeMetrics, I as InferDatabaseClient } from './config-D4clT6mq.js';
|
|
3
3
|
import * as _rivetkit_rivetkit_wasm from '@rivetkit/rivetkit-wasm';
|
|
4
4
|
import { z as z$1 } from 'zod';
|
|
5
5
|
import { Logger } from 'pino';
|
|
@@ -182,11 +182,11 @@ declare const RegistryConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
182
182
|
publicEndpoint: z$1.ZodPipe<z$1.ZodOptional<z$1.ZodString>, z$1.ZodTransform<string | undefined, string | undefined>>;
|
|
183
183
|
publicToken: z$1.ZodPipe<z$1.ZodOptional<z$1.ZodString>, z$1.ZodTransform<string | undefined, string | undefined>>;
|
|
184
184
|
}, z$1.core.$strip>>>;
|
|
185
|
-
|
|
185
|
+
envoy: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodObject<{
|
|
186
186
|
poolName: z$1.ZodDefault<z$1.ZodString>;
|
|
187
187
|
version: z$1.ZodDefault<z$1.ZodNumber>;
|
|
188
188
|
totalSlots: z$1.ZodDefault<z$1.ZodNumber>;
|
|
189
|
-
|
|
189
|
+
envoyKey: z$1.ZodOptional<z$1.ZodString>;
|
|
190
190
|
}, z$1.core.$strip>>>;
|
|
191
191
|
shutdown: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodObject<{
|
|
192
192
|
gracePeriodMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
@@ -197,7 +197,6 @@ declare const RegistryConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
197
197
|
backend: "local" | "remote";
|
|
198
198
|
} | undefined;
|
|
199
199
|
endpoint: string | undefined;
|
|
200
|
-
engineSpawn: boolean;
|
|
201
200
|
startServices: boolean;
|
|
202
201
|
namespace: string;
|
|
203
202
|
token: string | undefined;
|
|
@@ -235,11 +234,11 @@ declare const RegistryConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
235
234
|
engineHost: string;
|
|
236
235
|
enginePort: number;
|
|
237
236
|
engineVersion: string;
|
|
238
|
-
|
|
237
|
+
envoy: {
|
|
239
238
|
poolName: string;
|
|
240
239
|
version: number;
|
|
241
240
|
totalSlots: number;
|
|
242
|
-
|
|
241
|
+
envoyKey?: string | undefined;
|
|
243
242
|
};
|
|
244
243
|
shutdown: {
|
|
245
244
|
disableSignalHandlers: boolean;
|
|
@@ -294,11 +293,11 @@ declare const RegistryConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
294
293
|
publicEndpoint: string | undefined;
|
|
295
294
|
publicToken: string | undefined;
|
|
296
295
|
};
|
|
297
|
-
|
|
296
|
+
envoy: {
|
|
298
297
|
poolName: string;
|
|
299
298
|
version: number;
|
|
300
299
|
totalSlots: number;
|
|
301
|
-
|
|
300
|
+
envoyKey?: string | undefined;
|
|
302
301
|
};
|
|
303
302
|
shutdown: {
|
|
304
303
|
disableSignalHandlers: boolean;
|
|
@@ -344,7 +343,7 @@ declare const DocServerlessConfigSchema: z$1.ZodObject<{
|
|
|
344
343
|
declare const DocEnvoyConfigSchema: z$1.ZodObject<{
|
|
345
344
|
totalSlots: z$1.ZodOptional<z$1.ZodNumber>;
|
|
346
345
|
poolName: z$1.ZodOptional<z$1.ZodString>;
|
|
347
|
-
|
|
346
|
+
envoyKey: z$1.ZodOptional<z$1.ZodString>;
|
|
348
347
|
version: z$1.ZodOptional<z$1.ZodNumber>;
|
|
349
348
|
}, z$1.core.$strip>;
|
|
350
349
|
declare const DocSqliteConfigSchema: z$1.ZodOptional<z$1.ZodObject<{
|
|
@@ -402,10 +401,10 @@ declare const DocRegistryConfigSchema: z$1.ZodObject<{
|
|
|
402
401
|
publicEndpoint: z$1.ZodOptional<z$1.ZodString>;
|
|
403
402
|
publicToken: z$1.ZodOptional<z$1.ZodString>;
|
|
404
403
|
}, z$1.core.$strip>>;
|
|
405
|
-
|
|
404
|
+
envoy: z$1.ZodOptional<z$1.ZodObject<{
|
|
406
405
|
totalSlots: z$1.ZodOptional<z$1.ZodNumber>;
|
|
407
406
|
poolName: z$1.ZodOptional<z$1.ZodString>;
|
|
408
|
-
|
|
407
|
+
envoyKey: z$1.ZodOptional<z$1.ZodString>;
|
|
409
408
|
version: z$1.ZodOptional<z$1.ZodNumber>;
|
|
410
409
|
}, z$1.core.$strip>>;
|
|
411
410
|
}, z$1.core.$strip>;
|
|
@@ -816,7 +815,6 @@ interface RuntimeActorConfig {
|
|
|
816
815
|
icon?: string;
|
|
817
816
|
hasDatabase?: boolean;
|
|
818
817
|
remoteSqlite?: boolean;
|
|
819
|
-
sqliteDeferredCommits?: boolean;
|
|
820
818
|
sqliteProfiling?: SqliteProfilingOptions;
|
|
821
819
|
tracing?: RuntimeActorTracingConfig;
|
|
822
820
|
enableActorRuntimeSocket?: boolean;
|
|
@@ -874,8 +872,6 @@ interface RuntimeServeConfig {
|
|
|
874
872
|
engineBinaryPath?: string;
|
|
875
873
|
startServices?: boolean;
|
|
876
874
|
servicesBinaryPath?: string;
|
|
877
|
-
/** Whether config resolution selected a managed local development engine. */
|
|
878
|
-
engineSpawn?: boolean;
|
|
879
875
|
engineHost?: string;
|
|
880
876
|
enginePort?: number;
|
|
881
877
|
handleInspectorHttpInRuntime?: boolean;
|
|
@@ -964,12 +960,7 @@ interface CoreRuntime {
|
|
|
964
960
|
createCancellationToken(): CancellationTokenHandle;
|
|
965
961
|
cancellationTokenAborted(token: CancellationTokenHandle): boolean;
|
|
966
962
|
cancelCancellationToken(token: CancellationTokenHandle): void;
|
|
967
|
-
|
|
968
|
-
* Calls `callback` once when `token` is cancelled. Returns a release
|
|
969
|
-
* function that drops the registration without calling `callback`; call it
|
|
970
|
-
* once cancellation no longer matters so the native listener is freed.
|
|
971
|
-
*/
|
|
972
|
-
onCancellationTokenCancelled(token: CancellationTokenHandle, callback: (...args: unknown[]) => unknown): () => void;
|
|
963
|
+
onCancellationTokenCancelled(token: CancellationTokenHandle, callback: (...args: unknown[]) => unknown): void;
|
|
973
964
|
actorState(ctx: ActorContextHandle): RuntimeBytes;
|
|
974
965
|
actorBeginOnStateChange(ctx: ActorContextHandle): void;
|
|
975
966
|
actorEndOnStateChange(ctx: ActorContextHandle): void;
|
|
@@ -1043,20 +1034,13 @@ interface CoreRuntime {
|
|
|
1043
1034
|
actorKvBatchPut(ctx: ActorContextHandle, entries: RuntimeKvEntry[]): Promise<void>;
|
|
1044
1035
|
actorKvBatchDelete(ctx: ActorContextHandle, keys: RuntimeBytes[]): Promise<void>;
|
|
1045
1036
|
actorSqlExec(ctx: ActorContextHandle, sql: string): Promise<RuntimeSqlExecResult>;
|
|
1046
|
-
actorSqlExecSync(ctx: ActorContextHandle, sql: string): RuntimeSqlExecResult;
|
|
1047
1037
|
actorSqlExecute(ctx: ActorContextHandle, sql: string, params?: RuntimeSqlBindParams): Promise<RuntimeSqlExecuteResult>;
|
|
1048
|
-
actorSqlExecuteSync(ctx: ActorContextHandle, sql: string, params?: RuntimeSqlBindParams): RuntimeSqlExecuteResult;
|
|
1049
1038
|
actorSqlExecuteBatch(ctx: ActorContextHandle, statements: RuntimeSqlBatchStatement[]): Promise<RuntimeSqlExecuteResult[]>;
|
|
1050
1039
|
actorSqlBeginTransaction(ctx: ActorContextHandle, timeoutMs?: number, name?: string): Promise<SqliteTransactionHandle>;
|
|
1051
|
-
actorSqlBeginTransactionSync(ctx: ActorContextHandle, timeoutMs?: number, name?: string): SqliteTransactionHandle;
|
|
1052
1040
|
actorSqlTransactionExec(transaction: SqliteTransactionHandle, sql: string): Promise<RuntimeSqlExecResult>;
|
|
1053
|
-
actorSqlTransactionExecSync(transaction: SqliteTransactionHandle, sql: string): RuntimeSqlExecResult;
|
|
1054
1041
|
actorSqlTransactionExecute(transaction: SqliteTransactionHandle, sql: string, params?: RuntimeSqlBindParams): Promise<RuntimeSqlExecuteResult>;
|
|
1055
|
-
actorSqlTransactionExecuteSync(transaction: SqliteTransactionHandle, sql: string, params?: RuntimeSqlBindParams): RuntimeSqlExecuteResult;
|
|
1056
1042
|
actorSqlTransactionCommit(transaction: SqliteTransactionHandle): Promise<void>;
|
|
1057
|
-
actorSqlTransactionCommitSync(transaction: SqliteTransactionHandle): void;
|
|
1058
1043
|
actorSqlTransactionRollback(transaction: SqliteTransactionHandle): Promise<void>;
|
|
1059
|
-
actorSqlTransactionRollbackSync(transaction: SqliteTransactionHandle): void;
|
|
1060
1044
|
actorBeginStateTransaction(ctx: ActorContextHandle, timeoutMs?: number): Promise<ActorStateTransactionHandle>;
|
|
1061
1045
|
actorStateTransactionExecute(transaction: ActorStateTransactionHandle, sql: string, params?: RuntimeSqlBindParams): Promise<RuntimeSqlExecuteResult>;
|
|
1062
1046
|
actorStateTransactionCommit(transaction: ActorStateTransactionHandle, payload: RuntimeStateDeltaPayload): Promise<void>;
|
|
@@ -1065,13 +1049,6 @@ interface CoreRuntime {
|
|
|
1065
1049
|
actorSqlRun(ctx: ActorContextHandle, sql: string, params?: RuntimeSqlBindParams): Promise<RuntimeSqlRunResult>;
|
|
1066
1050
|
actorSqlMetrics(ctx: ActorContextHandle): SqliteNativeMetrics | null;
|
|
1067
1051
|
actorSqlTakeLastKvError(ctx: ActorContextHandle): string | null;
|
|
1068
|
-
/** Opens the actor database so later synchronous calls never fetch its first pages. */
|
|
1069
|
-
actorSqlOpen(ctx: ActorContextHandle): Promise<void>;
|
|
1070
|
-
/** Returns the ticket of the latest local commit. */
|
|
1071
|
-
actorSqlCommitTicket(ctx: ActorContextHandle): number;
|
|
1072
|
-
/** Resolves once the commit `ticket` names and every earlier commit are durable. */
|
|
1073
|
-
actorSqlWhenDurable(ctx: ActorContextHandle, ticket: number): Promise<void>;
|
|
1074
|
-
actorSqlAbortGeneration(ctx: ActorContextHandle, reason: string): void;
|
|
1075
1052
|
actorSqlClose(ctx: ActorContextHandle): Promise<void>;
|
|
1076
1053
|
actorRuntimeSocketProvision(ctx: ActorContextHandle): Promise<RuntimeActorRuntimeSocketEndpointInfo>;
|
|
1077
1054
|
actorQueueSend(ctx: ActorContextHandle, name: string, body: RuntimeBytes): Promise<RuntimeQueueMessage>;
|
|
@@ -1486,27 +1463,6 @@ declare class ActorConnRaw {
|
|
|
1486
1463
|
*/
|
|
1487
1464
|
type ActorConn<AD extends AnyActorDefinition> = Omit<ActorConnRaw, "send" | "on" | "once"> & ActorDefinitionQueueSend<AD> & ActorDefinitionEventSubscriptions<AD> & ActorDefinitionActions<AD>;
|
|
1488
1465
|
|
|
1489
|
-
/** How many retries a client may spend, as a share of the requests it sends. */
|
|
1490
|
-
interface RetryBudgetOptions {
|
|
1491
|
-
/** Retries allowed per 100 requests (default 10). */
|
|
1492
|
-
percent?: number;
|
|
1493
|
-
/** Retries the client can bank for a burst of refusals; the budget starts full (default 100). */
|
|
1494
|
-
maxTokens?: number;
|
|
1495
|
-
}
|
|
1496
|
-
/**
|
|
1497
|
-
* Bounds the client's retries of refused requests. Each request adds a fraction of a token and
|
|
1498
|
-
* each retry spends one, so retries stay a fixed share of traffic while the service sheds load
|
|
1499
|
-
* instead of multiplying it.
|
|
1500
|
-
*/
|
|
1501
|
-
declare class RetryBudget {
|
|
1502
|
-
#private;
|
|
1503
|
-
constructor(options?: RetryBudgetOptions);
|
|
1504
|
-
/** Credits one request sent. */
|
|
1505
|
-
deposit(): void;
|
|
1506
|
-
/** Spends one token. Returns `false` when the budget is spent. */
|
|
1507
|
-
tryWithdraw(): boolean;
|
|
1508
|
-
}
|
|
1509
|
-
|
|
1510
1466
|
/**
|
|
1511
1467
|
* Provides underlying functions for stateless {@link ActorHandle} for action calls.
|
|
1512
1468
|
* Similar to ActorConnRaw but doesn't maintain a connection.
|
|
@@ -1522,7 +1478,7 @@ declare class ActorHandleRaw {
|
|
|
1522
1478
|
*
|
|
1523
1479
|
* @protected
|
|
1524
1480
|
*/
|
|
1525
|
-
constructor(client: any, driver: EngineControlClient, params: unknown, getParams: (() => Promise<unknown>) | undefined, encoding: Encoding, actorResolutionState: ActorResolutionState, gatewayOptions?: ActorGatewayOptions, signal?: AbortSignal, currentActorInvocation?: CurrentActorInvocation, startCallSpan?: StartCallSpan
|
|
1481
|
+
constructor(client: any, driver: EngineControlClient, params: unknown, getParams: (() => Promise<unknown>) | undefined, encoding: Encoding, actorResolutionState: ActorResolutionState, gatewayOptions?: ActorGatewayOptions, signal?: AbortSignal, currentActorInvocation?: CurrentActorInvocation, startCallSpan?: StartCallSpan);
|
|
1526
1482
|
send(name: string, body: unknown, options: QueueSendWaitOptions): Promise<QueueSendResult>;
|
|
1527
1483
|
send(name: string, body: unknown, options?: QueueSendNoWaitOptions): Promise<void>;
|
|
1528
1484
|
/**
|
|
@@ -1729,8 +1685,6 @@ declare const CREATE_ACTOR_CONN_PROXY: unique symbol;
|
|
|
1729
1685
|
interface ClientRawOptions {
|
|
1730
1686
|
encoding?: Encoding;
|
|
1731
1687
|
gateway?: ActorGatewayOptions;
|
|
1732
|
-
/** Bounds retries of refused requests across every handle of this client. */
|
|
1733
|
-
retryBudget?: RetryBudgetOptions;
|
|
1734
1688
|
}
|
|
1735
1689
|
/** Runtime-supplied wiring for clients created inside an actor. Set only by the native runtime. */
|
|
1736
1690
|
interface ActorClientRuntimeOptions {
|
|
@@ -41,13 +41,18 @@ interface SqliteTransactionOptions {
|
|
|
41
41
|
* to change without notice.
|
|
42
42
|
*/
|
|
43
43
|
interface SqliteProfilingOptions {
|
|
44
|
-
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
/** Existing v2 switch. Default: true. */
|
|
45
|
+
enabled?: boolean;
|
|
46
|
+
/** Exact SQL filter. Union with filterQueryFingerprints; both empty means all queries. */
|
|
47
|
+
filterQueries?: string[];
|
|
48
|
+
/** Fingerprint filter, including transaction fingerprints. Filters metrics, not diagnostic logs. */
|
|
49
|
+
filterQueryFingerprints?: string[];
|
|
50
|
+
/** Metric defaults apply even when omitted. Disabled metrics allocate no series. */
|
|
51
|
+
metrics?: SqliteProfilingMetricsOptions;
|
|
52
|
+
/** Duration buckets in seconds. Default [0.01, 0.1, 1]. Positive, finite, strictly increasing.
|
|
53
|
+
* All actors in a process enabling the duration histogram must use identical buckets. */
|
|
54
|
+
durationHistogramBucketsSeconds?: number[];
|
|
55
|
+
/** Maximum distinct statement fingerprints per process. Default: 512. */
|
|
51
56
|
maxTrackedStatementFingerprints?: number;
|
|
52
57
|
maxTrackedTransactionFingerprints?: number;
|
|
53
58
|
maxPrometheusSeries?: number;
|
|
@@ -59,6 +64,45 @@ interface SqliteProfilingOptions {
|
|
|
59
64
|
maxDiagnosticEventsPerMinute?: number;
|
|
60
65
|
diagnosticEventQueueCapacity?: number;
|
|
61
66
|
}
|
|
67
|
+
/** SQLite profiling metrics. Physical-request metrics and gauges have no query labels. */
|
|
68
|
+
interface SqliteProfilingMetricsOptions {
|
|
69
|
+
/** Execution count and cumulative seconds. Uses histogram count/sum when enabled, otherwise counters. Default: true. */
|
|
70
|
+
duration?: boolean;
|
|
71
|
+
/** Execution duration histogram. Only applies when duration is enabled. Default: true. */
|
|
72
|
+
durationHistogram?: boolean;
|
|
73
|
+
/** Outcome counters, including success and errors. Default: true. */
|
|
74
|
+
outcomes?: boolean;
|
|
75
|
+
/** Per-query timing phase histograms. Default: false. */
|
|
76
|
+
phaseDurationHistogram?: boolean;
|
|
77
|
+
/** Storage round trips per operation histogram. Default: false. */
|
|
78
|
+
getPagesRoundTripsHistogram?: boolean;
|
|
79
|
+
/** Statements per transaction histogram. Default: false. */
|
|
80
|
+
transactionStatementCountHistogram?: boolean;
|
|
81
|
+
/** Per-query pages returned from storage, including returned prefetch pages. Default: true. */
|
|
82
|
+
pagesFetched?: boolean;
|
|
83
|
+
/** Actor-level page counters by page kind (no query labels). Default: false. */
|
|
84
|
+
localPages?: boolean;
|
|
85
|
+
/** Actor-level byte counters by byte kind (no query labels). Default: false. */
|
|
86
|
+
localBytes?: boolean;
|
|
87
|
+
/** Actor-level physical storage request duration histogram. Default: false. */
|
|
88
|
+
getPagesDurationHistogram?: boolean;
|
|
89
|
+
/** Actor-level pages per storage request histograms, by page kind. Default: false. */
|
|
90
|
+
getPagesPagesHistogram?: boolean;
|
|
91
|
+
/** Actor-level storage response byte histogram. Default: false. */
|
|
92
|
+
getPagesResponseBytesHistogram?: boolean;
|
|
93
|
+
/** Actor-level missing response page counter. Default: false. */
|
|
94
|
+
getPagesMissingPages?: boolean;
|
|
95
|
+
/** Queued SQLite work, aggregated by actor name. Default: true. */
|
|
96
|
+
workerQueueDepth?: boolean;
|
|
97
|
+
/** Executing SQLite work, aggregated by actor name. Default: true. */
|
|
98
|
+
workerInflight?: boolean;
|
|
99
|
+
/** Transaction waiters, aggregated by actor name. Default: true. */
|
|
100
|
+
coordinatorQueueDepth?: boolean;
|
|
101
|
+
/** Counts observations exceeding fingerprint or series limits. Default: true. */
|
|
102
|
+
fingerprintOverflow?: boolean;
|
|
103
|
+
/** Counts diagnostic events dropped by rate limits or backpressure. Default: true. */
|
|
104
|
+
eventDropped?: boolean;
|
|
105
|
+
}
|
|
62
106
|
interface SqliteNativeMetrics {
|
|
63
107
|
requestBuildNs: number;
|
|
64
108
|
serializeNs: number;
|
|
@@ -74,46 +118,20 @@ interface SqliteNativeMetrics {
|
|
|
74
118
|
}
|
|
75
119
|
interface SqliteDatabase {
|
|
76
120
|
exec(sql: string, callback?: (row: unknown[], columns: string[]) => void): Promise<void>;
|
|
77
|
-
execSync?(sql: string, callback?: (row: unknown[], columns: string[]) => void): void;
|
|
78
121
|
execute(sql: string, params?: SqliteBindings): Promise<SqliteExecuteResult>;
|
|
79
|
-
executeSync?(sql: string, params?: SqliteBindings): SqliteExecuteResult;
|
|
80
122
|
executeBatch(statements: SqliteBatchStatement[]): Promise<SqliteExecuteResult[]>;
|
|
81
123
|
beginTransaction(timeoutMs?: number, name?: string): Promise<SqliteTransactionDatabase>;
|
|
82
|
-
beginTransactionSync?(timeoutMs?: number, name?: string): SynchronousSqliteTransactionDatabase;
|
|
83
124
|
run(sql: string, params?: SqliteBindings): Promise<void>;
|
|
84
125
|
query(sql: string, params?: SqliteBindings): Promise<SqliteQueryResult>;
|
|
85
126
|
nativeMetrics?(): SqliteNativeMetrics | Promise<SqliteNativeMetrics | null> | null;
|
|
86
|
-
/**
|
|
87
|
-
* Returns the ticket of the latest local commit. Synchronous writes return before they are
|
|
88
|
-
* durable; pass the ticket to `whenDurable` before releasing output that depends on them.
|
|
89
|
-
*/
|
|
90
|
-
commitTicket?(): number;
|
|
91
|
-
/**
|
|
92
|
-
* Resolves once the commit `ticket` names and every earlier commit are durable. Rejects with
|
|
93
|
-
* `sqlite.durability_failed` once the database broke and the actor is restarting.
|
|
94
|
-
*/
|
|
95
|
-
whenDurable?(ticket: number): Promise<void>;
|
|
96
|
-
/**
|
|
97
|
-
* Restarts the owning actor from durable state. Every later write fails, including the final
|
|
98
|
-
* state save. For native database providers whose in-memory state can no longer be trusted.
|
|
99
|
-
*/
|
|
100
|
-
abortGeneration?(reason: string): void;
|
|
101
127
|
close(): Promise<void>;
|
|
102
128
|
}
|
|
103
129
|
interface SqliteTransactionDatabase {
|
|
104
130
|
exec(sql: string, callback?: (row: unknown[], columns: string[]) => void): Promise<void>;
|
|
105
|
-
execSync?(sql: string, callback?: (row: unknown[], columns: string[]) => void): void;
|
|
106
131
|
execute(sql: string, params?: SqliteBindings): Promise<SqliteExecuteResult>;
|
|
107
|
-
executeSync?(sql: string, params?: SqliteBindings): SqliteExecuteResult;
|
|
108
132
|
commit(): Promise<void>;
|
|
109
133
|
rollback(): Promise<void>;
|
|
110
134
|
}
|
|
111
|
-
type SynchronousSqliteTransactionDatabase = SqliteTransactionDatabase & {
|
|
112
|
-
execSync(sql: string, callback?: (row: unknown[], columns: string[]) => void): void;
|
|
113
|
-
executeSync(sql: string, params?: SqliteBindings): SqliteExecuteResult;
|
|
114
|
-
commitSync(): void;
|
|
115
|
-
rollbackSync(): void;
|
|
116
|
-
};
|
|
117
135
|
/**
|
|
118
136
|
* Provider for opening native databases from the active runtime.
|
|
119
137
|
*/
|
|
@@ -205,4 +223,4 @@ type RawAccess = {
|
|
|
205
223
|
close: () => Promise<void>;
|
|
206
224
|
};
|
|
207
225
|
|
|
208
|
-
export type { AnyDatabaseProvider as A, DatabaseProvider as D, InferDatabaseClient as I, NativeDatabaseProvider as N, RawAccess as R, SqliteTransactionOptions as S, SqliteProfilingOptions as a, DatabaseProviderContext as b, RawDatabaseClient as c, SqliteBindings as d, SqliteDatabase as e, SqliteNativeMetrics as f,
|
|
226
|
+
export type { AnyDatabaseProvider as A, DatabaseProvider as D, InferDatabaseClient as I, NativeDatabaseProvider as N, RawAccess as R, SqliteTransactionOptions as S, SqliteProfilingOptions as a, DatabaseProviderContext as b, RawDatabaseClient as c, SqliteBindings as d, SqliteDatabase as e, SqliteNativeMetrics as f, SqliteProfilingMetricsOptions as g, SqliteQueryResult as h };
|
|
@@ -41,13 +41,18 @@ interface SqliteTransactionOptions {
|
|
|
41
41
|
* to change without notice.
|
|
42
42
|
*/
|
|
43
43
|
interface SqliteProfilingOptions {
|
|
44
|
-
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
/** Existing v2 switch. Default: true. */
|
|
45
|
+
enabled?: boolean;
|
|
46
|
+
/** Exact SQL filter. Union with filterQueryFingerprints; both empty means all queries. */
|
|
47
|
+
filterQueries?: string[];
|
|
48
|
+
/** Fingerprint filter, including transaction fingerprints. Filters metrics, not diagnostic logs. */
|
|
49
|
+
filterQueryFingerprints?: string[];
|
|
50
|
+
/** Metric defaults apply even when omitted. Disabled metrics allocate no series. */
|
|
51
|
+
metrics?: SqliteProfilingMetricsOptions;
|
|
52
|
+
/** Duration buckets in seconds. Default [0.01, 0.1, 1]. Positive, finite, strictly increasing.
|
|
53
|
+
* All actors in a process enabling the duration histogram must use identical buckets. */
|
|
54
|
+
durationHistogramBucketsSeconds?: number[];
|
|
55
|
+
/** Maximum distinct statement fingerprints per process. Default: 512. */
|
|
51
56
|
maxTrackedStatementFingerprints?: number;
|
|
52
57
|
maxTrackedTransactionFingerprints?: number;
|
|
53
58
|
maxPrometheusSeries?: number;
|
|
@@ -59,6 +64,45 @@ interface SqliteProfilingOptions {
|
|
|
59
64
|
maxDiagnosticEventsPerMinute?: number;
|
|
60
65
|
diagnosticEventQueueCapacity?: number;
|
|
61
66
|
}
|
|
67
|
+
/** SQLite profiling metrics. Physical-request metrics and gauges have no query labels. */
|
|
68
|
+
interface SqliteProfilingMetricsOptions {
|
|
69
|
+
/** Execution count and cumulative seconds. Uses histogram count/sum when enabled, otherwise counters. Default: true. */
|
|
70
|
+
duration?: boolean;
|
|
71
|
+
/** Execution duration histogram. Only applies when duration is enabled. Default: true. */
|
|
72
|
+
durationHistogram?: boolean;
|
|
73
|
+
/** Outcome counters, including success and errors. Default: true. */
|
|
74
|
+
outcomes?: boolean;
|
|
75
|
+
/** Per-query timing phase histograms. Default: false. */
|
|
76
|
+
phaseDurationHistogram?: boolean;
|
|
77
|
+
/** Storage round trips per operation histogram. Default: false. */
|
|
78
|
+
getPagesRoundTripsHistogram?: boolean;
|
|
79
|
+
/** Statements per transaction histogram. Default: false. */
|
|
80
|
+
transactionStatementCountHistogram?: boolean;
|
|
81
|
+
/** Per-query pages returned from storage, including returned prefetch pages. Default: true. */
|
|
82
|
+
pagesFetched?: boolean;
|
|
83
|
+
/** Actor-level page counters by page kind (no query labels). Default: false. */
|
|
84
|
+
localPages?: boolean;
|
|
85
|
+
/** Actor-level byte counters by byte kind (no query labels). Default: false. */
|
|
86
|
+
localBytes?: boolean;
|
|
87
|
+
/** Actor-level physical storage request duration histogram. Default: false. */
|
|
88
|
+
getPagesDurationHistogram?: boolean;
|
|
89
|
+
/** Actor-level pages per storage request histograms, by page kind. Default: false. */
|
|
90
|
+
getPagesPagesHistogram?: boolean;
|
|
91
|
+
/** Actor-level storage response byte histogram. Default: false. */
|
|
92
|
+
getPagesResponseBytesHistogram?: boolean;
|
|
93
|
+
/** Actor-level missing response page counter. Default: false. */
|
|
94
|
+
getPagesMissingPages?: boolean;
|
|
95
|
+
/** Queued SQLite work, aggregated by actor name. Default: true. */
|
|
96
|
+
workerQueueDepth?: boolean;
|
|
97
|
+
/** Executing SQLite work, aggregated by actor name. Default: true. */
|
|
98
|
+
workerInflight?: boolean;
|
|
99
|
+
/** Transaction waiters, aggregated by actor name. Default: true. */
|
|
100
|
+
coordinatorQueueDepth?: boolean;
|
|
101
|
+
/** Counts observations exceeding fingerprint or series limits. Default: true. */
|
|
102
|
+
fingerprintOverflow?: boolean;
|
|
103
|
+
/** Counts diagnostic events dropped by rate limits or backpressure. Default: true. */
|
|
104
|
+
eventDropped?: boolean;
|
|
105
|
+
}
|
|
62
106
|
interface SqliteNativeMetrics {
|
|
63
107
|
requestBuildNs: number;
|
|
64
108
|
serializeNs: number;
|
|
@@ -74,46 +118,20 @@ interface SqliteNativeMetrics {
|
|
|
74
118
|
}
|
|
75
119
|
interface SqliteDatabase {
|
|
76
120
|
exec(sql: string, callback?: (row: unknown[], columns: string[]) => void): Promise<void>;
|
|
77
|
-
execSync?(sql: string, callback?: (row: unknown[], columns: string[]) => void): void;
|
|
78
121
|
execute(sql: string, params?: SqliteBindings): Promise<SqliteExecuteResult>;
|
|
79
|
-
executeSync?(sql: string, params?: SqliteBindings): SqliteExecuteResult;
|
|
80
122
|
executeBatch(statements: SqliteBatchStatement[]): Promise<SqliteExecuteResult[]>;
|
|
81
123
|
beginTransaction(timeoutMs?: number, name?: string): Promise<SqliteTransactionDatabase>;
|
|
82
|
-
beginTransactionSync?(timeoutMs?: number, name?: string): SynchronousSqliteTransactionDatabase;
|
|
83
124
|
run(sql: string, params?: SqliteBindings): Promise<void>;
|
|
84
125
|
query(sql: string, params?: SqliteBindings): Promise<SqliteQueryResult>;
|
|
85
126
|
nativeMetrics?(): SqliteNativeMetrics | Promise<SqliteNativeMetrics | null> | null;
|
|
86
|
-
/**
|
|
87
|
-
* Returns the ticket of the latest local commit. Synchronous writes return before they are
|
|
88
|
-
* durable; pass the ticket to `whenDurable` before releasing output that depends on them.
|
|
89
|
-
*/
|
|
90
|
-
commitTicket?(): number;
|
|
91
|
-
/**
|
|
92
|
-
* Resolves once the commit `ticket` names and every earlier commit are durable. Rejects with
|
|
93
|
-
* `sqlite.durability_failed` once the database broke and the actor is restarting.
|
|
94
|
-
*/
|
|
95
|
-
whenDurable?(ticket: number): Promise<void>;
|
|
96
|
-
/**
|
|
97
|
-
* Restarts the owning actor from durable state. Every later write fails, including the final
|
|
98
|
-
* state save. For native database providers whose in-memory state can no longer be trusted.
|
|
99
|
-
*/
|
|
100
|
-
abortGeneration?(reason: string): void;
|
|
101
127
|
close(): Promise<void>;
|
|
102
128
|
}
|
|
103
129
|
interface SqliteTransactionDatabase {
|
|
104
130
|
exec(sql: string, callback?: (row: unknown[], columns: string[]) => void): Promise<void>;
|
|
105
|
-
execSync?(sql: string, callback?: (row: unknown[], columns: string[]) => void): void;
|
|
106
131
|
execute(sql: string, params?: SqliteBindings): Promise<SqliteExecuteResult>;
|
|
107
|
-
executeSync?(sql: string, params?: SqliteBindings): SqliteExecuteResult;
|
|
108
132
|
commit(): Promise<void>;
|
|
109
133
|
rollback(): Promise<void>;
|
|
110
134
|
}
|
|
111
|
-
type SynchronousSqliteTransactionDatabase = SqliteTransactionDatabase & {
|
|
112
|
-
execSync(sql: string, callback?: (row: unknown[], columns: string[]) => void): void;
|
|
113
|
-
executeSync(sql: string, params?: SqliteBindings): SqliteExecuteResult;
|
|
114
|
-
commitSync(): void;
|
|
115
|
-
rollbackSync(): void;
|
|
116
|
-
};
|
|
117
135
|
/**
|
|
118
136
|
* Provider for opening native databases from the active runtime.
|
|
119
137
|
*/
|
|
@@ -205,4 +223,4 @@ type RawAccess = {
|
|
|
205
223
|
close: () => Promise<void>;
|
|
206
224
|
};
|
|
207
225
|
|
|
208
|
-
export type { AnyDatabaseProvider as A, DatabaseProvider as D, InferDatabaseClient as I, NativeDatabaseProvider as N, RawAccess as R, SqliteTransactionOptions as S, SqliteProfilingOptions as a, DatabaseProviderContext as b, RawDatabaseClient as c, SqliteBindings as d, SqliteDatabase as e, SqliteNativeMetrics as f,
|
|
226
|
+
export type { AnyDatabaseProvider as A, DatabaseProvider as D, InferDatabaseClient as I, NativeDatabaseProvider as N, RawAccess as R, SqliteTransactionOptions as S, SqliteProfilingOptions as a, DatabaseProviderContext as b, RawDatabaseClient as c, SqliteBindings as d, SqliteDatabase as e, SqliteNativeMetrics as f, SqliteProfilingMetricsOptions as g, SqliteQueryResult as h };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext, H as ActorLogger, ax as QueueFilterName, aC as QueueNextOptions, aD as QueueResultMessageForName, aB as QueueNextBatchOptions, aI as Registry, a6 as Client, ap as InferEventArgs, aq as InferSchemaMap } from './config-
|
|
1
|
+
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext, H as ActorLogger, ax as QueueFilterName, aC as QueueNextOptions, aD as QueueResultMessageForName, aB as QueueNextBatchOptions, aI as Registry, a6 as Client, ap as InferEventArgs, aq as InferSchemaMap } from './config-Cw_BwH_G.js';
|
|
2
2
|
import { WorkflowContextInterface, StepConfig, TryStepResult, TryStepConfig, TryBlockResult, TryBlockConfig, LoopResult, LoopConfig, BranchConfig, BranchOutput, EntryKindType } from '@rivetkit/workflow-engine';
|
|
3
|
-
import { A as AnyDatabaseProvider, I as InferDatabaseClient } from './config-
|
|
3
|
+
import { A as AnyDatabaseProvider, I as InferDatabaseClient } from './config-D4clT6mq.js';
|
|
4
4
|
|
|
5
5
|
type WorkflowActorQueueNextOptions<TName extends string, TCompletable extends boolean> = Omit<QueueNextOptions<TName, TCompletable>, "signal">;
|
|
6
6
|
type WorkflowActorQueueNextOptionsFallback<TCompletable extends boolean> = Omit<QueueNextOptions<string, TCompletable>, "signal">;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext, H as ActorLogger, ax as QueueFilterName, aC as QueueNextOptions, aD as QueueResultMessageForName, aB as QueueNextBatchOptions, aI as Registry, a6 as Client, ap as InferEventArgs, aq as InferSchemaMap } from './config-
|
|
1
|
+
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext, H as ActorLogger, ax as QueueFilterName, aC as QueueNextOptions, aD as QueueResultMessageForName, aB as QueueNextBatchOptions, aI as Registry, a6 as Client, ap as InferEventArgs, aq as InferSchemaMap } from './config-CkmVg2fG.cjs';
|
|
2
2
|
import { WorkflowContextInterface, StepConfig, TryStepResult, TryStepConfig, TryBlockResult, TryBlockConfig, LoopResult, LoopConfig, BranchConfig, BranchOutput, EntryKindType } from '@rivetkit/workflow-engine';
|
|
3
|
-
import { A as AnyDatabaseProvider, I as InferDatabaseClient } from './config-
|
|
3
|
+
import { A as AnyDatabaseProvider, I as InferDatabaseClient } from './config-D4clT6mq.cjs';
|
|
4
4
|
|
|
5
5
|
type WorkflowActorQueueNextOptions<TName extends string, TCompletable extends boolean> = Omit<QueueNextOptions<TName, TCompletable>, "signal">;
|
|
6
6
|
type WorkflowActorQueueNextOptionsFallback<TCompletable extends boolean> = Omit<QueueNextOptions<string, TCompletable>, "signal">;
|