rivetkit 3.0.7 → 3.1.0
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 +115 -2
- package/dist/browser/client.js +145 -7
- package/dist/browser/client.js.map +1 -1
- package/dist/browser/inspector/client.js +1 -1
- package/dist/browser/inspector/client.js.map +1 -1
- package/dist/tsup/{chunk-RFJ4NNO3.js → chunk-AOBZYPOQ.js} +4 -4
- package/dist/tsup/{chunk-YWWDUC6D.cjs → chunk-AQJFKHBK.cjs} +5 -1
- package/dist/tsup/chunk-AQJFKHBK.cjs.map +1 -0
- package/dist/tsup/{chunk-U3CMQVMS.cjs → chunk-BADLJ4CM.cjs} +3 -3
- package/dist/tsup/{chunk-U3CMQVMS.cjs.map → chunk-BADLJ4CM.cjs.map} +1 -1
- package/dist/tsup/{chunk-5A2KUC5L.cjs → chunk-CUM3GALQ.cjs} +10 -10
- package/dist/tsup/{chunk-5A2KUC5L.cjs.map → chunk-CUM3GALQ.cjs.map} +1 -1
- package/dist/tsup/{chunk-S6ZMUE7Q.js → chunk-CVTQX3MI.js} +2 -2
- package/dist/tsup/{chunk-QTCX5KN3.js → chunk-F5FZ6NI4.js} +2 -2
- package/dist/tsup/{chunk-AY25XAXA.js → chunk-G3KFGH3I.js} +3 -3
- package/dist/tsup/{chunk-AY25XAXA.js.map → chunk-G3KFGH3I.js.map} +1 -1
- package/dist/tsup/{chunk-WBUHPDDM.cjs → chunk-HFE4VBQU.cjs} +2 -2
- package/dist/tsup/{chunk-WBUHPDDM.cjs.map → chunk-HFE4VBQU.cjs.map} +1 -1
- package/dist/tsup/{chunk-YO4TJ56P.js → chunk-IDJSGBVA.js} +2 -2
- package/dist/tsup/{chunk-PBIQPYE5.js → chunk-IHEO5OT3.js} +5 -1
- package/dist/tsup/chunk-IHEO5OT3.js.map +1 -0
- package/dist/tsup/{chunk-K6WETGBW.cjs → chunk-QM5MJLVC.cjs} +3 -3
- package/dist/tsup/{chunk-K6WETGBW.cjs.map → chunk-QM5MJLVC.cjs.map} +1 -1
- package/dist/tsup/{chunk-NMLZDHH2.js → chunk-RYGXJQWL.js} +2 -2
- package/dist/tsup/{chunk-HKD7AH4Z.cjs → chunk-T5YMCOWY.cjs} +286 -149
- package/dist/tsup/chunk-T5YMCOWY.cjs.map +1 -0
- package/dist/tsup/{chunk-7OXC5BQF.js → chunk-TY25ZHJV.js} +2 -2
- package/dist/tsup/{chunk-7OXC5BQF.js.map → chunk-TY25ZHJV.js.map} +1 -1
- package/dist/tsup/{chunk-YTELGNB3.cjs → chunk-UJNHLIIG.cjs} +7 -7
- package/dist/tsup/{chunk-YTELGNB3.cjs.map → chunk-UJNHLIIG.cjs.map} +1 -1
- package/dist/tsup/{chunk-YMCG4FCB.js → chunk-VCORVUP2.js} +146 -9
- package/dist/tsup/chunk-VCORVUP2.js.map +1 -0
- package/dist/tsup/{chunk-OEOODXVI.cjs → chunk-VGJXSQMF.cjs} +4 -4
- package/dist/tsup/{chunk-OEOODXVI.cjs.map → chunk-VGJXSQMF.cjs.map} +1 -1
- package/dist/tsup/{chunk-VM4SXQOC.cjs → chunk-YWWIVWBR.cjs} +3 -3
- package/dist/tsup/{chunk-VM4SXQOC.cjs.map → chunk-YWWIVWBR.cjs.map} +1 -1
- 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-BDJltifk.d.cts → config-BDdeBoxX.d.cts} +117 -3
- package/dist/tsup/{config-DXC7qzme.d.ts → config-Ch-SMJ-n.d.ts} +117 -3
- package/dist/tsup/{context-DgPsVbw6.d.ts → context-B-wRuYrf.d.ts} +5 -1
- package/dist/tsup/{context-osC4Q1ax.d.cts → context-NzsxAAoN.d.cts} +5 -1
- package/dist/tsup/db/drizzle.cjs +2 -2
- package/dist/tsup/db/drizzle.js +1 -1
- package/dist/tsup/db/mod.cjs +3 -3
- package/dist/tsup/db/mod.js +2 -2
- package/dist/tsup/dynamic/mod.cjs +2 -2
- package/dist/tsup/dynamic/mod.d.cts +1 -1
- package/dist/tsup/dynamic/mod.d.ts +1 -1
- package/dist/tsup/dynamic/mod.js +1 -1
- 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.cjs +2 -2
- package/dist/tsup/inspector-tab/mod.d.cts +2 -2
- package/dist/tsup/inspector-tab/mod.d.ts +2 -2
- package/dist/tsup/inspector-tab/mod.js +1 -1
- package/dist/tsup/mod.cjs +153 -110
- 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 +49 -6
- package/dist/tsup/mod.js.map +1 -1
- package/dist/tsup/test/mod.cjs +6 -6
- package/dist/tsup/test/mod.d.cts +1 -1
- package/dist/tsup/test/mod.d.ts +1 -1
- package/dist/tsup/test/mod.js +4 -4
- package/dist/tsup/utils.cjs +2 -2
- package/dist/tsup/utils.js +1 -1
- package/dist/tsup/workflow/mod.cjs +22 -10
- 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 +17 -5
- package/dist/tsup/workflow/mod.js.map +1 -1
- package/package.json +9 -9
- package/src/actor/config.ts +82 -0
- package/src/client/actor-conn.ts +43 -7
- package/src/client/client.ts +93 -0
- package/src/client/errors.ts +12 -0
- package/src/client/lifecycle-errors.ts +28 -1
- package/src/client/mod.ts +1 -0
- package/src/client/retry-budget.ts +4 -1
- package/src/common/actor-router-consts.ts +1 -0
- package/src/engine-api/actors.ts +12 -0
- package/src/engine-client/actor-http-client.ts +6 -0
- package/src/engine-client/actor-websocket-client.ts +25 -1
- package/src/engine-client/api-endpoints.ts +16 -0
- package/src/engine-client/driver.ts +12 -0
- package/src/engine-client/mod.ts +30 -0
- package/src/registry/napi-runtime.ts +8 -0
- package/src/registry/native.ts +49 -0
- package/src/registry/runtime.ts +11 -0
- package/src/registry/wasm-runtime.ts +9 -0
- package/src/workflow/context.ts +17 -0
- package/dist/tsup/chunk-HKD7AH4Z.cjs.map +0 -1
- package/dist/tsup/chunk-PBIQPYE5.js.map +0 -1
- package/dist/tsup/chunk-YMCG4FCB.js.map +0 -1
- package/dist/tsup/chunk-YWWDUC6D.cjs.map +0 -1
- /package/dist/tsup/{chunk-RFJ4NNO3.js.map → chunk-AOBZYPOQ.js.map} +0 -0
- /package/dist/tsup/{chunk-S6ZMUE7Q.js.map → chunk-CVTQX3MI.js.map} +0 -0
- /package/dist/tsup/{chunk-QTCX5KN3.js.map → chunk-F5FZ6NI4.js.map} +0 -0
- /package/dist/tsup/{chunk-YO4TJ56P.js.map → chunk-IDJSGBVA.js.map} +0 -0
- /package/dist/tsup/{chunk-NMLZDHH2.js.map → chunk-RYGXJQWL.js.map} +0 -0
package/dist/tsup/mod.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, a as ActionContext, b as BeforeActionResponseContext, c as BeforeConnectContext, C as ConnectContext, d as CreateConnStateContext, e as CreateContext, f as CreateVarsContext, D as DestroyContext, g as DisconnectContext, M as MigrateContext, R as RequestContext, h as RunContext, S as SleepContext, i as StateChangeContext, W as WakeContext, j as WebSocketContext } from './config-
|
|
2
|
-
export { k as ACTOR_CONTEXT_INTERNAL_SYMBOL, l as ActionInputSchemas, m as ActionSampleRates, n as ActionTraceSamplers, o as Actions, p as ActorConfig, q as ActorConfigInput, r as ActorConfigSchema, s as ActorContext, t as ActorContextOf, u as ActorCron, v as ActorCronEveryOptions, w as ActorCronSetOptions, x as ActorDefinition, y as
|
|
1
|
+
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, a as ActionContext, b as BeforeActionResponseContext, c as BeforeConnectContext, C as ConnectContext, d as CreateConnStateContext, e as CreateContext, f as CreateVarsContext, D as DestroyContext, g as DisconnectContext, M as MigrateContext, R as RequestContext, h as RunContext, S as SleepContext, i as StateChangeContext, W as WakeContext, j as WebSocketContext } from './config-BDdeBoxX.cjs';
|
|
2
|
+
export { k as ACTOR_CONTEXT_INTERNAL_SYMBOL, l as ActionInputSchemas, m as ActionSampleRates, n as ActionTraceSamplers, o as Actions, p as ActorConfig, q as ActorConfigInput, r as ActorConfigSchema, s as ActorContext, t as ActorContextOf, u as ActorCron, v as ActorCronEveryOptions, w as ActorCronSetOptions, x as ActorDefinition, y as ActorFork, z as ActorForkLink, F as ActorInspectorConfig, G as ActorInspectorConfigSchema, H as ActorKey, I as ActorKv, J as ActorLogger, K as ActorOptions, L as ActorOptionsInput, N as ActorOptionsSchema, O as ActorQuery, P as ActorQueue, T as ActorRun, U as ActorSchedule, V as ActorTracingOptions, X as ActorTypes, Y as ActorsSchema, Z as AnyActorInstance, _ as AnyClient, $ as AnyConn, a0 as AnyStaticActorDefinition, a1 as AnyStaticActorInstance, a2 as AuthIntent, a3 as BUILTIN_INSPECTOR_TAB_IDS, a4 as BaseActorInstance, a5 as BuiltinInspectorTabIdSchema, a6 as CONN_DRIVER_SYMBOL, a7 as CONN_STATE_MANAGER_SYMBOL, a8 as Client, a9 as Conn, aa as CronFire, ab as CronJobInfo, ac as CustomInspectorTabEntrySchema, ad as DEFAULT_SLEEP_GRACE_PERIOD, ae as DefineRunHandlerOptions, af as DocActorConfigSchema, ag as DocActorOptionsSchema, ah as DocConfigurePoolSchema, ai as DocEnvoyConfigSchema, aj as DocRegistryConfigSchema, ak as DocServerlessConfigSchema, al as DocSqliteConfigSchema, am as FetchHandler, an as GlobalActorOptions, ao as GlobalActorOptionsInput, ap as GlobalActorOptionsSchema, aq as HideInspectorTabEntrySchema, ar as InferEventArgs, as as InferSchemaMap, at as InspectorTabEntrySchema, au as InspectorUnsubscribe, av as InstanceActorOptions, aw as InstanceActorOptionsInput, ax as InstanceActorOptionsSchema, ay as QueueEnqueueAndWaitOptions, az as QueueFilterName, aA as QueueIterOptions, aB as QueueMessageOf, aC as QueueName, aD as QueueNextBatchOptions, aE as QueueNextOptions, aF as QueueResultMessageForName, aG as QueueTryNextBatchOptions, aH as QueueTryNextOptions, aI as QueueWaitOptions, aJ as RAW_STATE_SYMBOL, aK as Registry, aL as RegistryActors, aM as RegistryApplication, aN as RegistryConfig, aO as RegistryConfigInput, aP as RegistryConfigSchema, aQ as RegistryDeps, aR as RegistryListenOptions, aS as RegistryRoutes, aT as RunConfig, aU as RunConfigSchema, aV as RunControl, aW as RunInspectorConfig, aX as RunInspectorFactoryContext, aY as RunInspectorFactoryResult, aZ as RunInspectorKind, a_ as RunWithInactiveOptions, a$ as RuntimeKind, b0 as RuntimeKindSchema, b1 as ScheduledEventInfo, b2 as ScheduledFireInfo, b3 as ServerlessHandler, b4 as SqliteBackend, b5 as SqliteBackendSchema, b6 as SqliteConfig, b7 as SqliteConfigSchema, b8 as TestConfig, b9 as TestConfigSchema, ba as Type, bb as WasmRuntimeBindings, bc as WasmRuntimeConfig, bd as WasmRuntimeConfigSchema, be as WasmRuntimeInitInput, bf as WorkflowInspectorConfig, bg as WorkflowOutcome, bh as WorkflowSpan, bi as WorkflowStepOutcome, bj as WorkflowStepSpan, bk as actor, bl as buildActorNames, bm as createClientWithDriver, bn as defineRunHandler, bo as disposeRunInspector, bp as event, bq as getRunFunction, br as getRunInspectorConfig, bs as getRunMetadata, bt as isStaticActorDefinition, bu as isStaticActorInstance, bv as lookupInRegistry, bw as queue, bx as setup, by as test } from './config-BDdeBoxX.cjs';
|
|
3
3
|
export { E as Encoding, t as toUint8Array } from './utils-C6b0aYUM.cjs';
|
|
4
4
|
import { UniversalWebSocket } from '@rivetkit/virtual-websocket';
|
|
5
5
|
export { RivetCloseEvent, RivetEvent, RivetMessageEvent, UniversalWebSocket } from '@rivetkit/virtual-websocket';
|
|
6
6
|
import { A as AnyDatabaseProvider } from './config-CBTr4IhE.cjs';
|
|
7
7
|
export { R as ActorError, R as RivetError, a as RivetErrorLike, b as RivetErrorOptions, U as UserError, c as UserErrorOptions, n as noopNext } from './utils-3rsE0JvI.cjs';
|
|
8
8
|
import { WSContext } from 'hono/ws';
|
|
9
|
-
export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-
|
|
9
|
+
export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-NzsxAAoN.cjs';
|
|
10
10
|
import 'zod/v4';
|
|
11
11
|
import '@rivetkit/rivetkit-wasm';
|
|
12
12
|
import 'zod';
|
package/dist/tsup/mod.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, a as ActionContext, b as BeforeActionResponseContext, c as BeforeConnectContext, C as ConnectContext, d as CreateConnStateContext, e as CreateContext, f as CreateVarsContext, D as DestroyContext, g as DisconnectContext, M as MigrateContext, R as RequestContext, h as RunContext, S as SleepContext, i as StateChangeContext, W as WakeContext, j as WebSocketContext } from './config-
|
|
2
|
-
export { k as ACTOR_CONTEXT_INTERNAL_SYMBOL, l as ActionInputSchemas, m as ActionSampleRates, n as ActionTraceSamplers, o as Actions, p as ActorConfig, q as ActorConfigInput, r as ActorConfigSchema, s as ActorContext, t as ActorContextOf, u as ActorCron, v as ActorCronEveryOptions, w as ActorCronSetOptions, x as ActorDefinition, y as
|
|
1
|
+
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, a as ActionContext, b as BeforeActionResponseContext, c as BeforeConnectContext, C as ConnectContext, d as CreateConnStateContext, e as CreateContext, f as CreateVarsContext, D as DestroyContext, g as DisconnectContext, M as MigrateContext, R as RequestContext, h as RunContext, S as SleepContext, i as StateChangeContext, W as WakeContext, j as WebSocketContext } from './config-Ch-SMJ-n.js';
|
|
2
|
+
export { k as ACTOR_CONTEXT_INTERNAL_SYMBOL, l as ActionInputSchemas, m as ActionSampleRates, n as ActionTraceSamplers, o as Actions, p as ActorConfig, q as ActorConfigInput, r as ActorConfigSchema, s as ActorContext, t as ActorContextOf, u as ActorCron, v as ActorCronEveryOptions, w as ActorCronSetOptions, x as ActorDefinition, y as ActorFork, z as ActorForkLink, F as ActorInspectorConfig, G as ActorInspectorConfigSchema, H as ActorKey, I as ActorKv, J as ActorLogger, K as ActorOptions, L as ActorOptionsInput, N as ActorOptionsSchema, O as ActorQuery, P as ActorQueue, T as ActorRun, U as ActorSchedule, V as ActorTracingOptions, X as ActorTypes, Y as ActorsSchema, Z as AnyActorInstance, _ as AnyClient, $ as AnyConn, a0 as AnyStaticActorDefinition, a1 as AnyStaticActorInstance, a2 as AuthIntent, a3 as BUILTIN_INSPECTOR_TAB_IDS, a4 as BaseActorInstance, a5 as BuiltinInspectorTabIdSchema, a6 as CONN_DRIVER_SYMBOL, a7 as CONN_STATE_MANAGER_SYMBOL, a8 as Client, a9 as Conn, aa as CronFire, ab as CronJobInfo, ac as CustomInspectorTabEntrySchema, ad as DEFAULT_SLEEP_GRACE_PERIOD, ae as DefineRunHandlerOptions, af as DocActorConfigSchema, ag as DocActorOptionsSchema, ah as DocConfigurePoolSchema, ai as DocEnvoyConfigSchema, aj as DocRegistryConfigSchema, ak as DocServerlessConfigSchema, al as DocSqliteConfigSchema, am as FetchHandler, an as GlobalActorOptions, ao as GlobalActorOptionsInput, ap as GlobalActorOptionsSchema, aq as HideInspectorTabEntrySchema, ar as InferEventArgs, as as InferSchemaMap, at as InspectorTabEntrySchema, au as InspectorUnsubscribe, av as InstanceActorOptions, aw as InstanceActorOptionsInput, ax as InstanceActorOptionsSchema, ay as QueueEnqueueAndWaitOptions, az as QueueFilterName, aA as QueueIterOptions, aB as QueueMessageOf, aC as QueueName, aD as QueueNextBatchOptions, aE as QueueNextOptions, aF as QueueResultMessageForName, aG as QueueTryNextBatchOptions, aH as QueueTryNextOptions, aI as QueueWaitOptions, aJ as RAW_STATE_SYMBOL, aK as Registry, aL as RegistryActors, aM as RegistryApplication, aN as RegistryConfig, aO as RegistryConfigInput, aP as RegistryConfigSchema, aQ as RegistryDeps, aR as RegistryListenOptions, aS as RegistryRoutes, aT as RunConfig, aU as RunConfigSchema, aV as RunControl, aW as RunInspectorConfig, aX as RunInspectorFactoryContext, aY as RunInspectorFactoryResult, aZ as RunInspectorKind, a_ as RunWithInactiveOptions, a$ as RuntimeKind, b0 as RuntimeKindSchema, b1 as ScheduledEventInfo, b2 as ScheduledFireInfo, b3 as ServerlessHandler, b4 as SqliteBackend, b5 as SqliteBackendSchema, b6 as SqliteConfig, b7 as SqliteConfigSchema, b8 as TestConfig, b9 as TestConfigSchema, ba as Type, bb as WasmRuntimeBindings, bc as WasmRuntimeConfig, bd as WasmRuntimeConfigSchema, be as WasmRuntimeInitInput, bf as WorkflowInspectorConfig, bg as WorkflowOutcome, bh as WorkflowSpan, bi as WorkflowStepOutcome, bj as WorkflowStepSpan, bk as actor, bl as buildActorNames, bm as createClientWithDriver, bn as defineRunHandler, bo as disposeRunInspector, bp as event, bq as getRunFunction, br as getRunInspectorConfig, bs as getRunMetadata, bt as isStaticActorDefinition, bu as isStaticActorInstance, bv as lookupInRegistry, bw as queue, bx as setup, by as test } from './config-Ch-SMJ-n.js';
|
|
3
3
|
export { E as Encoding, t as toUint8Array } from './utils-C1O-SklO.js';
|
|
4
4
|
import { UniversalWebSocket } from '@rivetkit/virtual-websocket';
|
|
5
5
|
export { RivetCloseEvent, RivetEvent, RivetMessageEvent, UniversalWebSocket } from '@rivetkit/virtual-websocket';
|
|
6
6
|
import { A as AnyDatabaseProvider } from './config-CBTr4IhE.js';
|
|
7
7
|
export { R as ActorError, R as RivetError, a as RivetErrorLike, b as RivetErrorOptions, U as UserError, c as UserErrorOptions, n as noopNext } from './utils-3rsE0JvI.js';
|
|
8
8
|
import { WSContext } from 'hono/ws';
|
|
9
|
-
export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-
|
|
9
|
+
export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-B-wRuYrf.js';
|
|
10
10
|
import 'zod/v4';
|
|
11
11
|
import '@rivetkit/rivetkit-wasm';
|
|
12
12
|
import 'zod';
|
package/dist/tsup/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
decodeWorkflowHistoryTransport
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F5FZ6NI4.js";
|
|
4
4
|
import {
|
|
5
5
|
ACTOR_CONTEXT_INTERNAL_SYMBOL,
|
|
6
6
|
ActorConfigSchema,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
getRunInspectorKind,
|
|
18
18
|
getRunMetadata,
|
|
19
19
|
hasRunInspectorConfig
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-IHEO5OT3.js";
|
|
21
21
|
import {
|
|
22
22
|
ALLOWED_PUBLIC_HEADERS,
|
|
23
23
|
ENGINE_HOST,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
runWithActorInvocationSpan,
|
|
36
36
|
tryParseEndpoint,
|
|
37
37
|
updateRunnerConfig
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-VCORVUP2.js";
|
|
39
39
|
import {
|
|
40
40
|
makePrefixedKey,
|
|
41
41
|
removePrefixFromKey
|
|
@@ -44,9 +44,9 @@ import {
|
|
|
44
44
|
bindNativeStateTransactionContext,
|
|
45
45
|
db,
|
|
46
46
|
registerNativeStateTransactionOpener
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-IDJSGBVA.js";
|
|
48
48
|
import "./chunk-JTHHCZCZ.js";
|
|
49
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-RYGXJQWL.js";
|
|
50
50
|
import {
|
|
51
51
|
LogLevelSchema,
|
|
52
52
|
VERSION,
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
parsePortEnv,
|
|
81
81
|
stringifyError,
|
|
82
82
|
toUint8Array
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-TY25ZHJV.js";
|
|
84
84
|
import {
|
|
85
85
|
INTERNAL_ERROR_CODE,
|
|
86
86
|
RivetError,
|
|
@@ -1831,9 +1831,15 @@ var NapiCoreRuntime = class {
|
|
|
1831
1831
|
actorKey(ctx) {
|
|
1832
1832
|
return asNativeActorContext(ctx).key();
|
|
1833
1833
|
}
|
|
1834
|
+
actorForkChain(ctx) {
|
|
1835
|
+
return asNativeActorContext(ctx).forkChain();
|
|
1836
|
+
}
|
|
1834
1837
|
actorRegion(ctx) {
|
|
1835
1838
|
return asNativeActorContext(ctx).region();
|
|
1836
1839
|
}
|
|
1840
|
+
actorNamespace(ctx) {
|
|
1841
|
+
return asNativeActorContext(ctx).namespace();
|
|
1842
|
+
}
|
|
1837
1843
|
actorSleep(ctx) {
|
|
1838
1844
|
asNativeActorContext(ctx).sleep();
|
|
1839
1845
|
}
|
|
@@ -2869,9 +2875,15 @@ var WasmCoreRuntime = class {
|
|
|
2869
2875
|
actorKey(ctx) {
|
|
2870
2876
|
return callHandle(asWasmActorContext(ctx), "key");
|
|
2871
2877
|
}
|
|
2878
|
+
actorForkChain(ctx) {
|
|
2879
|
+
return callHandle(asWasmActorContext(ctx), "forkChain");
|
|
2880
|
+
}
|
|
2872
2881
|
actorRegion(ctx) {
|
|
2873
2882
|
return callHandle(asWasmActorContext(ctx), "region");
|
|
2874
2883
|
}
|
|
2884
|
+
actorNamespace(ctx) {
|
|
2885
|
+
return callHandle(asWasmActorContext(ctx), "namespace");
|
|
2886
|
+
}
|
|
2875
2887
|
actorSleep(ctx) {
|
|
2876
2888
|
callHandle(asWasmActorContext(ctx), "sleep");
|
|
2877
2889
|
}
|
|
@@ -5390,9 +5402,21 @@ var ActorContextHandleAdapter = class {
|
|
|
5390
5402
|
callNativeSync(() => this.#runtime.actorKey(this.#ctx))
|
|
5391
5403
|
);
|
|
5392
5404
|
}
|
|
5405
|
+
get forkChain() {
|
|
5406
|
+
return callNativeSync(
|
|
5407
|
+
() => this.#runtime.actorForkChain(this.#ctx)
|
|
5408
|
+
).map((link) => ({
|
|
5409
|
+
actorId: link.actorId,
|
|
5410
|
+
key: toActorKey(link.key),
|
|
5411
|
+
forkedAt: link.forkedAt
|
|
5412
|
+
}));
|
|
5413
|
+
}
|
|
5393
5414
|
get region() {
|
|
5394
5415
|
return callNativeSync(() => this.#runtime.actorRegion(this.#ctx));
|
|
5395
5416
|
}
|
|
5417
|
+
get namespace() {
|
|
5418
|
+
return callNativeSync(() => this.#runtime.actorNamespace(this.#ctx));
|
|
5419
|
+
}
|
|
5396
5420
|
get conns() {
|
|
5397
5421
|
if (!this.#connMap) {
|
|
5398
5422
|
this.#connMap = new NativeConnectionMap(
|
|
@@ -6758,6 +6782,25 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6758
6782
|
}
|
|
6759
6783
|
}
|
|
6760
6784
|
) : void 0,
|
|
6785
|
+
onFork: typeof config.onFork === "function" ? wrapNativeCallback(
|
|
6786
|
+
async (error, payload) => {
|
|
6787
|
+
const { ctx, fork } = unwrapTsfnPayload(
|
|
6788
|
+
error,
|
|
6789
|
+
payload
|
|
6790
|
+
);
|
|
6791
|
+
const actorCtx = makeActorCtx(ctx);
|
|
6792
|
+
try {
|
|
6793
|
+
await config.onFork(actorCtx, {
|
|
6794
|
+
actorId: fork.actorId,
|
|
6795
|
+
key: toActorKey(fork.key),
|
|
6796
|
+
forkedAt: fork.forkedAt,
|
|
6797
|
+
input: decodeValue(fork.input)
|
|
6798
|
+
});
|
|
6799
|
+
} finally {
|
|
6800
|
+
await actorCtx.dispose();
|
|
6801
|
+
}
|
|
6802
|
+
}
|
|
6803
|
+
) : void 0,
|
|
6761
6804
|
onWake: typeof config.onWake === "function" ? wrapNativeCallback(
|
|
6762
6805
|
async (error, payload) => {
|
|
6763
6806
|
const { ctx } = unwrapTsfnPayload(error, payload);
|