rivetkit 0.0.0-sqlite-profiling-compat.4a9a623 → 0.0.0-sqlite-sync-3-0-0-release.14341d0
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 +1317 -765
- package/dist/browser/client.js +1433 -692
- package/dist/browser/client.js.map +1 -1
- package/dist/browser/inspector/client.d.ts +252 -129
- package/dist/browser/inspector/client.js +2042 -228
- package/dist/browser/inspector/client.js.map +1 -1
- package/dist/tsup/actor/errors.cjs +6 -2
- package/dist/tsup/actor/errors.cjs.map +1 -1
- package/dist/tsup/actor/errors.d.cts +1 -1
- package/dist/tsup/actor/errors.d.ts +1 -1
- package/dist/tsup/actor/errors.js +5 -1
- package/dist/tsup/agent-os/index.cjs +3 -2367
- package/dist/tsup/agent-os/index.cjs.map +1 -1
- package/dist/tsup/agent-os/index.d.cts +1 -2277
- package/dist/tsup/agent-os/index.d.ts +1 -2277
- package/dist/tsup/agent-os/index.js +3 -2367
- package/dist/tsup/agent-os/index.js.map +1 -1
- package/dist/tsup/{chunk-AGDY6TKH.js → chunk-2EQ2WCO7.js} +1054 -364
- package/dist/tsup/chunk-2EQ2WCO7.js.map +1 -0
- package/dist/tsup/{chunk-7QKCGUTJ.cjs → chunk-4H2LT2WB.cjs} +444 -29
- package/dist/tsup/chunk-4H2LT2WB.cjs.map +1 -0
- package/dist/tsup/{chunk-XIX5DOZN.js → chunk-6FEYCVZC.js} +196 -20
- package/dist/tsup/chunk-6FEYCVZC.js.map +1 -0
- package/dist/tsup/{chunk-QAVN4QNO.cjs → chunk-6WYQ3NJI.cjs} +7 -7
- package/dist/tsup/chunk-6WYQ3NJI.cjs.map +1 -0
- package/dist/tsup/{chunk-75UE45DE.js → chunk-6ZJX3KXW.js} +436 -21
- package/dist/tsup/chunk-6ZJX3KXW.js.map +1 -0
- package/dist/tsup/{chunk-HXUEHHJF.js → chunk-A2CF6PFH.js} +19 -11
- package/dist/tsup/chunk-A2CF6PFH.js.map +1 -0
- package/dist/tsup/{chunk-RIT7N3TX.js → chunk-AIGW2SKA.js} +50 -3
- package/dist/tsup/chunk-AIGW2SKA.js.map +1 -0
- package/dist/tsup/{chunk-3MHDOUD7.cjs → chunk-HDVZ6YZG.cjs} +197 -21
- package/dist/tsup/chunk-HDVZ6YZG.cjs.map +1 -0
- package/dist/tsup/{chunk-2CICCOBL.cjs → chunk-HU4F7H3F.cjs} +52 -5
- package/dist/tsup/chunk-HU4F7H3F.cjs.map +1 -0
- package/dist/tsup/{chunk-4PX3ZKJR.js → chunk-JNJEWQZL.js} +3 -3
- package/dist/tsup/chunk-JNJEWQZL.js.map +1 -0
- package/dist/tsup/{chunk-JZ7TWV65.js → chunk-JTHHCZCZ.js} +24 -1
- package/dist/tsup/chunk-JTHHCZCZ.js.map +1 -0
- package/dist/tsup/{chunk-ZA7FLHKH.cjs → chunk-KVFIONKQ.cjs} +25 -2
- package/dist/tsup/chunk-KVFIONKQ.cjs.map +1 -0
- package/dist/tsup/{chunk-4FC7TVS6.cjs → chunk-MGI2VVF6.cjs} +39 -7
- package/dist/tsup/chunk-MGI2VVF6.cjs.map +1 -0
- package/dist/tsup/{chunk-NHUTYWKU.cjs → chunk-NE5CUQRN.cjs} +1173 -483
- package/dist/tsup/chunk-NE5CUQRN.cjs.map +1 -0
- package/dist/tsup/{chunk-IICIOTML.js → chunk-OX5MX7TO.js} +2 -2
- package/dist/tsup/{chunk-ND567FR5.cjs → chunk-PSIBTOAR.cjs} +3 -3
- package/dist/tsup/chunk-PSIBTOAR.cjs.map +1 -0
- package/dist/tsup/chunk-PW6FYEIV.cjs +14 -0
- package/dist/tsup/chunk-PW6FYEIV.cjs.map +1 -0
- package/dist/tsup/{chunk-VE2X4KMG.cjs → chunk-RTWH3AX3.cjs} +18 -10
- package/dist/tsup/chunk-RTWH3AX3.cjs.map +1 -0
- package/dist/tsup/chunk-SLICBKAU.js +14 -0
- package/dist/tsup/chunk-SLICBKAU.js.map +1 -0
- package/dist/tsup/{chunk-XFYEVYHG.js → chunk-WCVYMFWJ.js} +16 -9
- package/dist/tsup/chunk-WCVYMFWJ.js.map +1 -0
- package/dist/tsup/chunk-WX3JS4XU.cjs +243 -0
- package/dist/tsup/chunk-WX3JS4XU.cjs.map +1 -0
- package/dist/tsup/chunk-X32L7FDD.js +243 -0
- package/dist/tsup/chunk-X32L7FDD.js.map +1 -0
- package/dist/tsup/{chunk-2WMYYG4R.cjs → chunk-XAY2HIZN.cjs} +18 -11
- package/dist/tsup/chunk-XAY2HIZN.cjs.map +1 -0
- package/dist/tsup/{chunk-ZZ3WBRPD.js → chunk-ZOVJDAOW.js} +38 -6
- package/dist/tsup/chunk-ZOVJDAOW.js.map +1 -0
- package/dist/tsup/client/mod.cjs +8 -9
- package/dist/tsup/client/mod.cjs.map +1 -1
- package/dist/tsup/client/mod.d.cts +32 -6
- package/dist/tsup/client/mod.d.ts +32 -6
- package/dist/tsup/client/mod.js +7 -8
- package/dist/tsup/common/log.cjs +5 -3
- package/dist/tsup/common/log.cjs.map +1 -1
- package/dist/tsup/common/log.d.cts +5 -1
- package/dist/tsup/common/log.d.ts +5 -1
- package/dist/tsup/common/log.js +6 -4
- package/dist/tsup/common/websocket.cjs +4 -4
- package/dist/tsup/common/websocket.cjs.map +1 -1
- package/dist/tsup/common/websocket.js +3 -3
- package/dist/tsup/{config-BR1Nn0QQ.d.ts → config-B4erdavw.d.ts} +571 -65
- package/dist/tsup/{config-B0LNDrLY.d.ts → config-BfG1qpYz.d.cts} +80 -14
- package/dist/tsup/{config-B0LNDrLY.d.cts → config-BfG1qpYz.d.ts} +80 -14
- package/dist/tsup/{config-tCvkwzyN.d.cts → config-DK144OAw.d.cts} +571 -65
- package/dist/tsup/{context-oc9zhA3x.d.ts → context-Cvnf3BRe.d.cts} +3 -2
- package/dist/tsup/{context-D4WDwf9m.d.cts → context-Oxi6YWcG.d.ts} +3 -2
- package/dist/tsup/db/drizzle.cjs +127 -67
- package/dist/tsup/db/drizzle.cjs.map +1 -1
- package/dist/tsup/db/drizzle.d.cts +8 -4
- package/dist/tsup/db/drizzle.d.ts +8 -4
- package/dist/tsup/db/drizzle.js +127 -67
- package/dist/tsup/db/drizzle.js.map +1 -1
- package/dist/tsup/db/mod.cjs +6 -126
- package/dist/tsup/db/mod.cjs.map +1 -1
- package/dist/tsup/db/mod.d.cts +8 -4
- package/dist/tsup/db/mod.d.ts +8 -4
- package/dist/tsup/db/mod.js +5 -125
- package/dist/tsup/db/mod.js.map +1 -1
- package/dist/tsup/dynamic/mod.cjs +2 -2
- package/dist/tsup/dynamic/mod.cjs.map +1 -1
- package/dist/tsup/dynamic/mod.d.cts +6 -4
- package/dist/tsup/dynamic/mod.d.ts +6 -4
- package/dist/tsup/dynamic/mod.js +1 -1
- package/dist/tsup/inspector/mod.cjs +47 -12
- package/dist/tsup/inspector/mod.cjs.map +1 -1
- package/dist/tsup/inspector/mod.d.cts +26 -136
- package/dist/tsup/inspector/mod.d.ts +26 -136
- package/dist/tsup/inspector/mod.js +46 -11
- package/dist/tsup/inspector/mod.js.map +1 -1
- package/dist/tsup/inspector/workflow.cjs +21 -0
- package/dist/tsup/inspector/workflow.cjs.map +1 -0
- package/dist/tsup/inspector/workflow.d.cts +144 -0
- package/dist/tsup/inspector/workflow.d.ts +144 -0
- package/dist/tsup/inspector/workflow.js +21 -0
- package/dist/tsup/inspector/workflow.js.map +1 -0
- package/dist/tsup/inspector-tab/mod.cjs +2 -13
- package/dist/tsup/inspector-tab/mod.cjs.map +1 -1
- package/dist/tsup/inspector-tab/mod.d.cts +9 -17
- package/dist/tsup/inspector-tab/mod.d.ts +9 -17
- package/dist/tsup/inspector-tab/mod.js +1 -12
- package/dist/tsup/inspector-tab/mod.js.map +1 -1
- package/dist/tsup/mod.cjs +2728 -611
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.d.cts +9 -7
- package/dist/tsup/mod.d.ts +9 -7
- package/dist/tsup/mod.js +2645 -528
- package/dist/tsup/mod.js.map +1 -1
- package/dist/tsup/test/mod.cjs +19 -17
- package/dist/tsup/test/mod.cjs.map +1 -1
- package/dist/tsup/test/mod.d.cts +6 -4
- package/dist/tsup/test/mod.d.ts +6 -4
- package/dist/tsup/test/mod.js +18 -16
- package/dist/tsup/test/mod.js.map +1 -1
- package/dist/tsup/unstable/migrations.cjs +101 -0
- package/dist/tsup/unstable/migrations.cjs.map +1 -0
- package/dist/tsup/unstable/migrations.d.cts +29 -0
- package/dist/tsup/unstable/migrations.d.ts +29 -0
- package/dist/tsup/unstable/migrations.js +101 -0
- package/dist/tsup/unstable/migrations.js.map +1 -0
- package/dist/tsup/{utils-CqDnC_PS.d.cts → utils-3rsE0JvI.d.cts} +25 -2
- package/dist/tsup/{utils-CqDnC_PS.d.ts → utils-3rsE0JvI.d.ts} +25 -2
- package/dist/tsup/utils-C1O-SklO.d.ts +162 -0
- package/dist/tsup/utils-C6b0aYUM.d.cts +162 -0
- package/dist/tsup/utils.cjs +7 -3
- package/dist/tsup/utils.cjs.map +1 -1
- package/dist/tsup/utils.d.cts +4 -147
- package/dist/tsup/utils.d.ts +4 -147
- package/dist/tsup/utils.js +6 -2
- package/dist/tsup/workflow/mod.cjs +260 -200
- package/dist/tsup/workflow/mod.cjs.map +1 -1
- package/dist/tsup/workflow/mod.d.cts +8 -6
- package/dist/tsup/workflow/mod.d.ts +8 -6
- package/dist/tsup/workflow/mod.js +249 -189
- package/dist/tsup/workflow/mod.js.map +1 -1
- package/package.json +34 -14
- package/src/actor/actions.ts +155 -0
- package/src/actor/config.ts +403 -43
- package/src/actor/definition.ts +26 -7
- package/src/actor/errors.ts +87 -5
- package/src/actor/keys.ts +86 -0
- package/src/actor/mod.ts +15 -1
- package/src/actor/tracing.ts +28 -0
- package/src/agent-os/index.ts +5 -65
- package/src/client/actor-common.ts +8 -15
- package/src/client/actor-conn.ts +178 -25
- package/src/client/actor-handle.ts +180 -42
- package/src/client/actor-query.ts +8 -1
- package/src/client/auth.ts +37 -0
- package/src/client/client.ts +89 -21
- package/src/client/config.ts +27 -2
- package/src/client/errors.ts +2 -1
- package/src/client/lifecycle-errors.ts +29 -1
- package/src/client/mod.ts +9 -0
- package/src/client/outbound-telemetry.ts +66 -0
- package/src/client/query.ts +2 -0
- package/src/client/queue.ts +3 -0
- package/src/client/raw-utils.ts +37 -8
- package/src/client/resolve-gateway-target.ts +2 -0
- package/src/client/retry-budget.ts +78 -0
- package/src/client/token-provider.ts +93 -0
- package/src/client/utils.ts +16 -2
- package/src/common/actor-router-consts.ts +5 -0
- package/src/common/actor-telemetry-context.ts +19 -0
- package/src/common/bare/generated/actor-runtime-socket-protocol/v1.ts +848 -0
- package/src/common/bare/generated/inspector/v5.ts +1016 -0
- package/src/common/bare/generated/inspector/v6.ts +1367 -0
- package/src/common/bare/transport/v1.ts +36 -0
- package/src/common/database/config.ts +108 -15
- package/src/common/database/mod.ts +247 -76
- package/src/common/database/native-database.ts +433 -23
- package/src/common/database/shared.ts +24 -0
- package/src/common/encoding.ts +31 -21
- package/src/common/fetch-like.ts +63 -0
- package/src/common/inspector-transport.ts +12 -2
- package/src/common/log.ts +14 -8
- package/src/common/otel-context.ts +99 -0
- package/src/common/router.ts +1 -1
- package/src/common/utils.ts +7 -19
- package/src/db/drizzle.ts +182 -80
- package/src/db/mod.ts +2 -0
- package/src/dynamic/isolate-runtime.ts +0 -2
- package/src/engine-api/actors.ts +3 -3
- package/src/engine-client/actor-http-client.ts +29 -20
- package/src/engine-client/actor-websocket-client.ts +6 -3
- package/src/engine-client/api-endpoints.ts +72 -14
- package/src/engine-client/driver.ts +8 -15
- package/src/engine-client/mod.ts +248 -112
- package/src/inspector/client.browser.ts +134 -16
- package/src/inspector/mod.ts +1 -1
- package/src/inspector/workflow.ts +61 -0
- package/src/inspector-tab/mod.ts +1 -15
- package/src/registry/config/envoy.ts +2 -18
- package/src/registry/config/index.ts +54 -61
- package/src/registry/index.ts +324 -21
- package/src/registry/napi-runtime.ts +583 -39
- package/src/registry/native-http.ts +225 -0
- package/src/registry/native.ts +1365 -414
- package/src/registry/run-handler-coordinator.ts +219 -0
- package/src/registry/runtime.ts +372 -7
- package/src/registry/wasm-runtime.ts +490 -21
- package/src/registry/write-through-proxy.ts +101 -0
- package/src/test/mod.ts +1 -19
- package/src/test/ready.ts +22 -0
- package/src/unstable/migrations.ts +141 -0
- package/src/utils/env-vars.ts +15 -6
- package/src/utils/node.ts +44 -28
- package/src/utils.ts +3 -0
- package/src/workflow/context.ts +9 -27
- package/src/workflow/driver.ts +253 -116
- package/src/workflow/inspector.ts +23 -24
- package/src/workflow/mod.ts +50 -72
- package/dist/tsup/chunk-2CICCOBL.cjs.map +0 -1
- package/dist/tsup/chunk-2WMYYG4R.cjs.map +0 -1
- package/dist/tsup/chunk-3MHDOUD7.cjs.map +0 -1
- package/dist/tsup/chunk-4FC7TVS6.cjs.map +0 -1
- package/dist/tsup/chunk-4PX3ZKJR.js.map +0 -1
- package/dist/tsup/chunk-75UE45DE.js.map +0 -1
- package/dist/tsup/chunk-7QKCGUTJ.cjs.map +0 -1
- package/dist/tsup/chunk-AGDY6TKH.js.map +0 -1
- package/dist/tsup/chunk-HXUEHHJF.js.map +0 -1
- package/dist/tsup/chunk-JZ7TWV65.js.map +0 -1
- package/dist/tsup/chunk-ND567FR5.cjs.map +0 -1
- package/dist/tsup/chunk-NHUTYWKU.cjs.map +0 -1
- package/dist/tsup/chunk-QAVN4QNO.cjs.map +0 -1
- package/dist/tsup/chunk-RIT7N3TX.js.map +0 -1
- package/dist/tsup/chunk-RV5MAFDT.cjs +0 -382
- package/dist/tsup/chunk-RV5MAFDT.cjs.map +0 -1
- package/dist/tsup/chunk-VE2X4KMG.cjs.map +0 -1
- package/dist/tsup/chunk-XFYEVYHG.js.map +0 -1
- package/dist/tsup/chunk-XHGDS3DZ.js +0 -382
- package/dist/tsup/chunk-XHGDS3DZ.js.map +0 -1
- package/dist/tsup/chunk-XIX5DOZN.js.map +0 -1
- package/dist/tsup/chunk-ZA7FLHKH.cjs.map +0 -1
- package/dist/tsup/chunk-ZZ3WBRPD.js.map +0 -1
- package/src/actor/driver.ts +0 -141
- package/src/actor/instance/mod.ts +0 -2484
- package/src/actor/keys.test.ts +0 -275
- package/src/actor/utils.test.ts +0 -48
- package/src/agent-os/actor/cron.ts +0 -84
- package/src/agent-os/actor/db.ts +0 -54
- package/src/agent-os/actor/filesystem.ts +0 -131
- package/src/agent-os/actor/index.ts +0 -285
- package/src/agent-os/actor/network.ts +0 -58
- package/src/agent-os/actor/preview.ts +0 -190
- package/src/agent-os/actor/process.ts +0 -177
- package/src/agent-os/actor/session.ts +0 -518
- package/src/agent-os/actor/shell.ts +0 -60
- package/src/agent-os/config.ts +0 -79
- package/src/agent-os/fs/database-vfs.ts +0 -624
- package/src/agent-os/types.ts +0 -148
- package/src/client/test.ts +0 -44
- package/src/common/database/mod.test.ts +0 -137
- package/src/common/database/native-database.test.ts +0 -211
- package/src/common/inline-websocket-adapter.test.ts +0 -51
- package/src/drivers/engine/actor-driver.ts +0 -2473
- package/src/registry/process-metrics.ts +0 -250
- package/src/registry/runtime.test.ts +0 -50
- package/src/utils/endpoint-parser.test.ts +0 -206
- package/src/utils.test.ts +0 -34
- /package/dist/tsup/{chunk-IICIOTML.js.map → chunk-OX5MX7TO.js.map} +0 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { AnyActorDefinition } from "@/actor/definition";
|
|
2
|
-
import type
|
|
2
|
+
import { type ActorSpecifier, encodeErrorForBridge } from "@/actor/errors";
|
|
3
|
+
import type { ActorInvocationSpanContext } from "@/common/actor-telemetry-context";
|
|
3
4
|
import {
|
|
4
5
|
HEADER_CONN_PARAMS,
|
|
5
6
|
HEADER_ENCODING,
|
|
6
7
|
} from "@/common/actor-router-consts";
|
|
8
|
+
import { isRequestLike } from "@/common/fetch-like";
|
|
7
9
|
import type * as protocol from "@/common/client-protocol";
|
|
8
10
|
import {
|
|
9
11
|
CURRENT_VERSION as CLIENT_PROTOCOL_CURRENT_VERSION,
|
|
@@ -23,6 +25,14 @@ import { AsyncMutex } from "@/common/database/shared";
|
|
|
23
25
|
import type { Encoding, JsonCompatValue } from "@/common/encoding";
|
|
24
26
|
import { deconstructError } from "@/common/utils";
|
|
25
27
|
import type { EngineControlClient } from "@/engine-client/driver";
|
|
28
|
+
import type {
|
|
29
|
+
ActorIssueTokenOptions,
|
|
30
|
+
ActorTokenPermissions,
|
|
31
|
+
ActorTokenResource,
|
|
32
|
+
IssuedToken,
|
|
33
|
+
TokenGrant,
|
|
34
|
+
} from "@/client/auth";
|
|
35
|
+
import type { StartCallSpan, CurrentActorInvocation } from "@/registry/runtime";
|
|
26
36
|
import {
|
|
27
37
|
decodeCborCompat,
|
|
28
38
|
deserializeWithEncoding,
|
|
@@ -51,7 +61,9 @@ import {
|
|
|
51
61
|
import { type ClientRaw, CREATE_ACTOR_CONN_PROXY } from "./client";
|
|
52
62
|
import { ActorError, isSchedulingError } from "./errors";
|
|
53
63
|
import { retryOnLifecycleBoundary } from "./lifecycle-errors";
|
|
64
|
+
import { RetryBudget, retryAfterMs, retryDelayMs } from "./retry-budget";
|
|
54
65
|
import { logger } from "./log";
|
|
66
|
+
import { outboundTelemetryHeaders } from "./outbound-telemetry";
|
|
55
67
|
import {
|
|
56
68
|
createQueueSender,
|
|
57
69
|
type QueueSendNoWaitOptions,
|
|
@@ -59,7 +71,7 @@ import {
|
|
|
59
71
|
type QueueSendResult,
|
|
60
72
|
type QueueSendWaitOptions,
|
|
61
73
|
} from "./queue";
|
|
62
|
-
import { rawHttpFetch, rawWebSocket } from "./raw-utils";
|
|
74
|
+
import { prepareRetryableInit, rawHttpFetch, rawWebSocket } from "./raw-utils";
|
|
63
75
|
import { resolveGatewayTarget } from "./resolve-gateway-target";
|
|
64
76
|
import { sendHttpRequest } from "./utils";
|
|
65
77
|
|
|
@@ -77,9 +89,13 @@ export class ActorHandleRaw {
|
|
|
77
89
|
#gatewayOptions: ActorGatewayOptions;
|
|
78
90
|
#params: unknown;
|
|
79
91
|
#getParams?: () => Promise<unknown>;
|
|
92
|
+
#signal?: AbortSignal;
|
|
80
93
|
#resolvedActorId?: string;
|
|
81
94
|
#resolvingActorId?: Promise<string>;
|
|
82
95
|
#queueSendMutex = new AsyncMutex();
|
|
96
|
+
#currentActorInvocation?: CurrentActorInvocation;
|
|
97
|
+
#startCallSpan?: StartCallSpan;
|
|
98
|
+
#retryBudget: RetryBudget;
|
|
83
99
|
|
|
84
100
|
/**
|
|
85
101
|
* Do not call this directly.
|
|
@@ -96,6 +112,10 @@ export class ActorHandleRaw {
|
|
|
96
112
|
encoding: Encoding,
|
|
97
113
|
actorResolutionState: ActorResolutionState,
|
|
98
114
|
gatewayOptions: ActorGatewayOptions = {},
|
|
115
|
+
signal?: AbortSignal,
|
|
116
|
+
currentActorInvocation?: CurrentActorInvocation,
|
|
117
|
+
startCallSpan?: StartCallSpan,
|
|
118
|
+
retryBudget: RetryBudget = new RetryBudget(),
|
|
99
119
|
) {
|
|
100
120
|
this.#client = client;
|
|
101
121
|
this.#driver = driver;
|
|
@@ -104,6 +124,10 @@ export class ActorHandleRaw {
|
|
|
104
124
|
this.#gatewayOptions = gatewayOptions;
|
|
105
125
|
this.#params = params;
|
|
106
126
|
this.#getParams = getParams;
|
|
127
|
+
this.#signal = signal;
|
|
128
|
+
this.#currentActorInvocation = currentActorInvocation;
|
|
129
|
+
this.#startCallSpan = startCallSpan;
|
|
130
|
+
this.#retryBudget = retryBudget;
|
|
107
131
|
}
|
|
108
132
|
|
|
109
133
|
async #resolveConnectionParams(): Promise<unknown> {
|
|
@@ -139,8 +163,14 @@ export class ActorHandleRaw {
|
|
|
139
163
|
): Promise<QueueSendResult | void> {
|
|
140
164
|
return await this.#queueSendMutex.run(async () => {
|
|
141
165
|
const maxAttempts = this.#getDynamicQueryMaxAttempts();
|
|
142
|
-
|
|
166
|
+
// Dynamic (get/getOrCreate) handles resolve at the gateway per
|
|
167
|
+
// request so cross-datacenter queries forward to the reserved dc,
|
|
168
|
+
// rather than pre-resolving via the non-forwarding PUT /actors path.
|
|
169
|
+
let useQueryTarget = isDynamicActorQuery(
|
|
170
|
+
this.#actorResolutionState,
|
|
171
|
+
);
|
|
143
172
|
|
|
173
|
+
this.#retryBudget.deposit();
|
|
144
174
|
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
145
175
|
let actorId: string | undefined;
|
|
146
176
|
try {
|
|
@@ -157,6 +187,10 @@ export class ActorHandleRaw {
|
|
|
157
187
|
return await createQueueSender({
|
|
158
188
|
encoding: this.#encoding,
|
|
159
189
|
params: this.#params,
|
|
190
|
+
telemetryHeaders: () =>
|
|
191
|
+
outboundTelemetryHeaders(
|
|
192
|
+
this.#currentActorInvocation?.(),
|
|
193
|
+
),
|
|
160
194
|
customFetch: async (request: Request) => {
|
|
161
195
|
return await this.#driver.sendRequest(
|
|
162
196
|
target,
|
|
@@ -166,7 +200,7 @@ export class ActorHandleRaw {
|
|
|
166
200
|
},
|
|
167
201
|
}).send(name, body, options as any);
|
|
168
202
|
} catch (err) {
|
|
169
|
-
const { group, code, message, metadata, actor } =
|
|
203
|
+
const { group, code, message, metadata, rayId, actor } =
|
|
170
204
|
deconstructError(err, true);
|
|
171
205
|
|
|
172
206
|
if (
|
|
@@ -176,9 +210,19 @@ export class ActorHandleRaw {
|
|
|
176
210
|
metadata,
|
|
177
211
|
attempt,
|
|
178
212
|
maxAttempts,
|
|
179
|
-
)
|
|
213
|
+
) &&
|
|
214
|
+
this.#retryBudget.tryWithdraw()
|
|
180
215
|
) {
|
|
181
|
-
await
|
|
216
|
+
await new Promise((resolve) =>
|
|
217
|
+
setTimeout(
|
|
218
|
+
resolve,
|
|
219
|
+
retryDelayMs(attempt, {
|
|
220
|
+
initialDelayMs: 25,
|
|
221
|
+
maxDelayMs: 1_000,
|
|
222
|
+
hintMs: retryAfterMs(err),
|
|
223
|
+
}),
|
|
224
|
+
),
|
|
225
|
+
);
|
|
182
226
|
continue;
|
|
183
227
|
}
|
|
184
228
|
|
|
@@ -189,6 +233,7 @@ export class ActorHandleRaw {
|
|
|
189
233
|
actorId,
|
|
190
234
|
attempt,
|
|
191
235
|
maxAttempts,
|
|
236
|
+
rayId,
|
|
192
237
|
)
|
|
193
238
|
) {
|
|
194
239
|
useQueryTarget = true;
|
|
@@ -215,11 +260,12 @@ export class ActorHandleRaw {
|
|
|
215
260
|
code,
|
|
216
261
|
);
|
|
217
262
|
if (invalidated && attempt < maxAttempts - 1) {
|
|
218
|
-
|
|
263
|
+
const waitForReady =
|
|
219
264
|
code === "starting" ||
|
|
220
265
|
code === "stopping" ||
|
|
221
266
|
code.startsWith("destroyed_");
|
|
222
|
-
|
|
267
|
+
useQueryTarget = useQueryTarget || waitForReady;
|
|
268
|
+
if (waitForReady) {
|
|
223
269
|
await this.#waitForRetryWindow();
|
|
224
270
|
}
|
|
225
271
|
continue;
|
|
@@ -227,6 +273,7 @@ export class ActorHandleRaw {
|
|
|
227
273
|
|
|
228
274
|
throw new ActorError(group, code, message, {
|
|
229
275
|
metadata,
|
|
276
|
+
rayId,
|
|
230
277
|
actor,
|
|
231
278
|
});
|
|
232
279
|
}
|
|
@@ -259,22 +306,51 @@ export class ActorHandleRaw {
|
|
|
259
306
|
`Invalid action call: expected an options object { name, args }, got ${typeof opts}. Use handle.actionName(...args) for the shorthand API.`,
|
|
260
307
|
);
|
|
261
308
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
309
|
+
// Fall back to the handle-level signal from `get`/`getOrCreate`/etc.
|
|
310
|
+
// when no per-call signal is provided.
|
|
311
|
+
const signal = opts.signal ?? this.#signal;
|
|
312
|
+
const optsWithSignal = { ...opts, signal };
|
|
313
|
+
// Open before retries so all attempts share one span and parent context.
|
|
314
|
+
const call = this.#startCallSpan?.(
|
|
315
|
+
getActorNameFromQuery(this.#actorResolutionState),
|
|
316
|
+
opts.name,
|
|
317
|
+
);
|
|
318
|
+
const run = async () =>
|
|
319
|
+
(await this.#sendActionAttempts(
|
|
320
|
+
optsWithSignal,
|
|
321
|
+
call?.span,
|
|
322
|
+
)) as Response;
|
|
323
|
+
const send = async () => {
|
|
324
|
+
if (opts.name === "destroy") {
|
|
325
|
+
return await run();
|
|
326
|
+
}
|
|
327
|
+
return await retryOnLifecycleBoundary(run, {
|
|
328
|
+
signal,
|
|
329
|
+
budget: this.#retryBudget,
|
|
330
|
+
});
|
|
331
|
+
};
|
|
332
|
+
if (!call) {
|
|
333
|
+
return await send();
|
|
334
|
+
}
|
|
335
|
+
try {
|
|
336
|
+
const output = await send();
|
|
337
|
+
call.finish();
|
|
338
|
+
return output;
|
|
339
|
+
} catch (error) {
|
|
340
|
+
call.finish(encodeErrorForBridge(error));
|
|
341
|
+
throw error;
|
|
265
342
|
}
|
|
266
|
-
|
|
267
|
-
return await retryOnLifecycleBoundary(run, { signal: opts.signal });
|
|
268
343
|
}
|
|
269
344
|
|
|
270
|
-
async #
|
|
345
|
+
async #sendActionAttempts(
|
|
271
346
|
opts: {
|
|
272
347
|
name: string;
|
|
273
348
|
args: unknown[];
|
|
274
349
|
} & ActorActionOptions,
|
|
350
|
+
callSpan?: ActorInvocationSpanContext,
|
|
275
351
|
): Promise<unknown> {
|
|
276
352
|
const maxAttempts = this.#getDynamicQueryMaxAttempts();
|
|
277
|
-
let useQueryTarget =
|
|
353
|
+
let useQueryTarget = isDynamicActorQuery(this.#actorResolutionState);
|
|
278
354
|
const gatewayOptions = resolveActorGatewayOptions(
|
|
279
355
|
this.#gatewayOptions,
|
|
280
356
|
opts,
|
|
@@ -303,6 +379,16 @@ export class ActorHandleRaw {
|
|
|
303
379
|
name: opts.name,
|
|
304
380
|
encoding: this.#encoding,
|
|
305
381
|
});
|
|
382
|
+
const headers: Record<string, string> = {
|
|
383
|
+
[HEADER_ENCODING]: this.#encoding,
|
|
384
|
+
...outboundTelemetryHeaders(
|
|
385
|
+
this.#currentActorInvocation?.(),
|
|
386
|
+
callSpan,
|
|
387
|
+
),
|
|
388
|
+
};
|
|
389
|
+
if (this.#params !== undefined) {
|
|
390
|
+
headers[HEADER_CONN_PARAMS] = JSON.stringify(this.#params);
|
|
391
|
+
}
|
|
306
392
|
const output = await sendHttpRequest<
|
|
307
393
|
protocol.HttpActionRequest,
|
|
308
394
|
protocol.HttpActionResponse,
|
|
@@ -313,16 +399,7 @@ export class ActorHandleRaw {
|
|
|
313
399
|
>({
|
|
314
400
|
url: `http://actor/action/${encodeURIComponent(opts.name)}`,
|
|
315
401
|
method: "POST",
|
|
316
|
-
headers
|
|
317
|
-
[HEADER_ENCODING]: this.#encoding,
|
|
318
|
-
...(this.#params !== undefined
|
|
319
|
-
? {
|
|
320
|
-
[HEADER_CONN_PARAMS]: JSON.stringify(
|
|
321
|
-
this.#params,
|
|
322
|
-
),
|
|
323
|
-
}
|
|
324
|
-
: {}),
|
|
325
|
-
},
|
|
402
|
+
headers,
|
|
326
403
|
body: opts.args,
|
|
327
404
|
encoding: this.#encoding,
|
|
328
405
|
customFetch: async (request) =>
|
|
@@ -357,7 +434,7 @@ export class ActorHandleRaw {
|
|
|
357
434
|
}
|
|
358
435
|
return output;
|
|
359
436
|
} catch (err) {
|
|
360
|
-
const { group, code, message, metadata, actor } =
|
|
437
|
+
const { group, code, message, metadata, rayId, actor } =
|
|
361
438
|
deconstructError(err, true);
|
|
362
439
|
|
|
363
440
|
if (
|
|
@@ -367,6 +444,7 @@ export class ActorHandleRaw {
|
|
|
367
444
|
actorId,
|
|
368
445
|
attempt,
|
|
369
446
|
maxAttempts,
|
|
447
|
+
rayId,
|
|
370
448
|
)
|
|
371
449
|
) {
|
|
372
450
|
useQueryTarget = true;
|
|
@@ -398,7 +476,7 @@ export class ActorHandleRaw {
|
|
|
398
476
|
"actor",
|
|
399
477
|
"not_found",
|
|
400
478
|
"The actor does not exist or was destroyed.",
|
|
401
|
-
{ metadata, actor },
|
|
479
|
+
{ metadata, rayId, actor },
|
|
402
480
|
);
|
|
403
481
|
}
|
|
404
482
|
|
|
@@ -419,7 +497,11 @@ export class ActorHandleRaw {
|
|
|
419
497
|
continue;
|
|
420
498
|
}
|
|
421
499
|
|
|
422
|
-
throw new ActorError(group, code, message, {
|
|
500
|
+
throw new ActorError(group, code, message, {
|
|
501
|
+
metadata,
|
|
502
|
+
rayId,
|
|
503
|
+
actor,
|
|
504
|
+
});
|
|
423
505
|
}
|
|
424
506
|
}
|
|
425
507
|
|
|
@@ -514,6 +596,7 @@ export class ActorHandleRaw {
|
|
|
514
596
|
actorId: string | undefined,
|
|
515
597
|
attempt: number,
|
|
516
598
|
maxAttempts: number,
|
|
599
|
+
rayId?: string,
|
|
517
600
|
): Promise<boolean> {
|
|
518
601
|
if (
|
|
519
602
|
!isDynamicActorQuery(this.#actorResolutionState) ||
|
|
@@ -530,6 +613,7 @@ export class ActorHandleRaw {
|
|
|
530
613
|
actorId,
|
|
531
614
|
this.#actorResolutionState,
|
|
532
615
|
this.#driver,
|
|
616
|
+
rayId,
|
|
533
617
|
);
|
|
534
618
|
if (schedulingError) {
|
|
535
619
|
throw schedulingError;
|
|
@@ -619,6 +703,7 @@ export class ActorHandleRaw {
|
|
|
619
703
|
this.#encoding,
|
|
620
704
|
this.#actorResolutionState,
|
|
621
705
|
resolveActorGatewayOptions(this.#gatewayOptions, options),
|
|
706
|
+
this.#currentActorInvocation,
|
|
622
707
|
);
|
|
623
708
|
|
|
624
709
|
return this.#client[CREATE_ACTOR_CONN_PROXY](
|
|
@@ -638,15 +723,27 @@ export class ActorHandleRaw {
|
|
|
638
723
|
input: string | URL | Request,
|
|
639
724
|
init?: ActorFetchInit,
|
|
640
725
|
) {
|
|
726
|
+
const { skipReadyWait, ...restInit } = init ?? {};
|
|
641
727
|
const maxAttempts = this.#getDynamicQueryMaxAttempts();
|
|
642
|
-
|
|
643
|
-
const
|
|
728
|
+
// Buffer a streaming init body before the loop, but only when retries are possible.
|
|
729
|
+
const requestInit =
|
|
730
|
+
maxAttempts > 1 ? await prepareRetryableInit(restInit) : restInit;
|
|
731
|
+
// Clone the input Request only when its own body is the one being sent.
|
|
732
|
+
// If init replaces the body, cloning a consumed input would throw.
|
|
733
|
+
const clonesInputBody =
|
|
734
|
+
requestInit.body === undefined &&
|
|
735
|
+
isRequestLike(input) &&
|
|
736
|
+
input.body !== null;
|
|
737
|
+
let useQueryTarget = isDynamicActorQuery(this.#actorResolutionState);
|
|
644
738
|
const gatewayOptions = resolveActorGatewayOptions(
|
|
645
739
|
this.#gatewayOptions,
|
|
646
740
|
{
|
|
647
741
|
skipReadyWait,
|
|
648
742
|
},
|
|
649
743
|
);
|
|
744
|
+
const telemetryHeaders = outboundTelemetryHeaders(
|
|
745
|
+
this.#currentActorInvocation?.(),
|
|
746
|
+
);
|
|
650
747
|
|
|
651
748
|
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
652
749
|
let actorId: string | undefined;
|
|
@@ -660,9 +757,12 @@ export class ActorHandleRaw {
|
|
|
660
757
|
this.#driver,
|
|
661
758
|
target,
|
|
662
759
|
this.#params,
|
|
663
|
-
|
|
760
|
+
// Clone a body-bearing Request so retries don't reuse a consumed stream.
|
|
761
|
+
// NOTE: This holds the body in memory until GC (unavoidable).
|
|
762
|
+
clonesInputBody ? input.clone() : input,
|
|
664
763
|
requestInit,
|
|
665
764
|
gatewayOptions,
|
|
765
|
+
telemetryHeaders,
|
|
666
766
|
);
|
|
667
767
|
const retry = await this.#shouldRetryRawFetchResponse(
|
|
668
768
|
response,
|
|
@@ -679,7 +779,7 @@ export class ActorHandleRaw {
|
|
|
679
779
|
}
|
|
680
780
|
return response;
|
|
681
781
|
} catch (err) {
|
|
682
|
-
const { group, code, message, metadata, actor } =
|
|
782
|
+
const { group, code, message, metadata, rayId, actor } =
|
|
683
783
|
deconstructError(err, true);
|
|
684
784
|
|
|
685
785
|
if (
|
|
@@ -689,6 +789,7 @@ export class ActorHandleRaw {
|
|
|
689
789
|
actorId,
|
|
690
790
|
attempt,
|
|
691
791
|
maxAttempts,
|
|
792
|
+
rayId,
|
|
692
793
|
)
|
|
693
794
|
) {
|
|
694
795
|
useQueryTarget = true;
|
|
@@ -715,17 +816,22 @@ export class ActorHandleRaw {
|
|
|
715
816
|
code,
|
|
716
817
|
);
|
|
717
818
|
if (invalidated && attempt < maxAttempts - 1) {
|
|
718
|
-
|
|
819
|
+
const waitForReady =
|
|
719
820
|
code === "starting" ||
|
|
720
821
|
code === "stopping" ||
|
|
721
822
|
code.startsWith("destroyed_");
|
|
722
|
-
|
|
823
|
+
useQueryTarget = useQueryTarget || waitForReady;
|
|
824
|
+
if (waitForReady) {
|
|
723
825
|
await this.#waitForRetryWindow();
|
|
724
826
|
}
|
|
725
827
|
continue;
|
|
726
828
|
}
|
|
727
829
|
|
|
728
|
-
throw new ActorError(group, code, message, {
|
|
830
|
+
throw new ActorError(group, code, message, {
|
|
831
|
+
metadata,
|
|
832
|
+
rayId,
|
|
833
|
+
actor,
|
|
834
|
+
});
|
|
729
835
|
}
|
|
730
836
|
}
|
|
731
837
|
|
|
@@ -750,7 +856,7 @@ export class ActorHandleRaw {
|
|
|
750
856
|
return null;
|
|
751
857
|
}
|
|
752
858
|
|
|
753
|
-
const { group, code } = error;
|
|
859
|
+
const { group, code, rayId } = error;
|
|
754
860
|
|
|
755
861
|
if (
|
|
756
862
|
await this.#shouldRetrySchedulingError(
|
|
@@ -759,6 +865,7 @@ export class ActorHandleRaw {
|
|
|
759
865
|
actorId,
|
|
760
866
|
attempt,
|
|
761
867
|
maxAttempts,
|
|
868
|
+
rayId,
|
|
762
869
|
)
|
|
763
870
|
) {
|
|
764
871
|
return {
|
|
@@ -784,13 +891,13 @@ export class ActorHandleRaw {
|
|
|
784
891
|
|
|
785
892
|
const invalidated = this.#invalidateResolvedActorId(group, code);
|
|
786
893
|
if (invalidated && attempt < maxAttempts - 1) {
|
|
787
|
-
const
|
|
894
|
+
const waitForReady =
|
|
788
895
|
code === "starting" ||
|
|
789
896
|
code === "stopping" ||
|
|
790
897
|
code.startsWith("destroyed_");
|
|
791
898
|
return {
|
|
792
|
-
useQueryTarget,
|
|
793
|
-
waitForRetryWindow:
|
|
899
|
+
useQueryTarget: true,
|
|
900
|
+
waitForRetryWindow: waitForReady,
|
|
794
901
|
};
|
|
795
902
|
}
|
|
796
903
|
|
|
@@ -802,6 +909,7 @@ export class ActorHandleRaw {
|
|
|
802
909
|
code: string;
|
|
803
910
|
message: string;
|
|
804
911
|
metadata?: unknown;
|
|
912
|
+
rayId?: string;
|
|
805
913
|
actor?: ActorSpecifier;
|
|
806
914
|
} | null> {
|
|
807
915
|
if (response.ok) {
|
|
@@ -814,7 +922,7 @@ export class ActorHandleRaw {
|
|
|
814
922
|
: this.#encoding;
|
|
815
923
|
|
|
816
924
|
try {
|
|
817
|
-
|
|
925
|
+
const error = deserializeWithEncoding<
|
|
818
926
|
protocol.HttpResponseError,
|
|
819
927
|
HttpResponseErrorJson,
|
|
820
928
|
{
|
|
@@ -822,6 +930,7 @@ export class ActorHandleRaw {
|
|
|
822
930
|
code: string;
|
|
823
931
|
message: string;
|
|
824
932
|
metadata?: unknown;
|
|
933
|
+
rayId?: string;
|
|
825
934
|
actor?: ActorSpecifier;
|
|
826
935
|
}
|
|
827
936
|
>(
|
|
@@ -854,6 +963,10 @@ export class ActorHandleRaw {
|
|
|
854
963
|
: undefined,
|
|
855
964
|
}),
|
|
856
965
|
);
|
|
966
|
+
return {
|
|
967
|
+
...error,
|
|
968
|
+
rayId: response.headers.get("x-rivet-ray-id") ?? undefined,
|
|
969
|
+
};
|
|
857
970
|
} catch {
|
|
858
971
|
return null;
|
|
859
972
|
}
|
|
@@ -905,6 +1018,29 @@ export class ActorHandleRaw {
|
|
|
905
1018
|
);
|
|
906
1019
|
}
|
|
907
1020
|
|
|
1021
|
+
/** Issue a token scoped to this actor. Defaults to actor gateway read access. */
|
|
1022
|
+
async issueToken(
|
|
1023
|
+
options: ActorIssueTokenOptions = {},
|
|
1024
|
+
): Promise<IssuedToken> {
|
|
1025
|
+
const actorId = await this.resolve();
|
|
1026
|
+
const permissions: ActorTokenPermissions = options.permissions ?? {
|
|
1027
|
+
actor_gateway: ["read"],
|
|
1028
|
+
};
|
|
1029
|
+
const grants: TokenGrant[] = (
|
|
1030
|
+
Object.keys(permissions) as ActorTokenResource[]
|
|
1031
|
+
).flatMap((resource) => {
|
|
1032
|
+
const operations = permissions[resource];
|
|
1033
|
+
return operations
|
|
1034
|
+
? [{ resource, target: { id: actorId }, operations }]
|
|
1035
|
+
: [];
|
|
1036
|
+
});
|
|
1037
|
+
return this.#driver.issueToken({
|
|
1038
|
+
subject: options.subject,
|
|
1039
|
+
expiresIn: options.expiresIn,
|
|
1040
|
+
grants,
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
1043
|
+
|
|
908
1044
|
/**
|
|
909
1045
|
* Returns the raw URL for routing traffic to the actor.
|
|
910
1046
|
*/
|
|
@@ -927,7 +1063,9 @@ export class ActorHandleRaw {
|
|
|
927
1063
|
"actor",
|
|
928
1064
|
"reload_failed",
|
|
929
1065
|
`reload failed with status ${response.status}: ${body}`,
|
|
930
|
-
{
|
|
1066
|
+
{
|
|
1067
|
+
rayId: response.headers.get("x-rivet-ray-id") ?? undefined,
|
|
1068
|
+
},
|
|
931
1069
|
);
|
|
932
1070
|
}
|
|
933
1071
|
}
|
|
@@ -958,4 +1096,4 @@ export type ActorHandle<AD extends AnyActorDefinition> = Omit<
|
|
|
958
1096
|
// Resolve method returns the actor ID
|
|
959
1097
|
resolve(): Promise<string>;
|
|
960
1098
|
} & ActorDefinitionQueueSend<AD> &
|
|
961
|
-
ActorDefinitionActions<AD>;
|
|
1099
|
+
Omit<ActorDefinitionActions<AD>, keyof ActorHandleRaw>;
|
|
@@ -67,6 +67,7 @@ export async function checkForSchedulingError(
|
|
|
67
67
|
actorId: string,
|
|
68
68
|
query: ActorQuery,
|
|
69
69
|
driver: EngineControlClient,
|
|
70
|
+
rayId?: string,
|
|
70
71
|
): Promise<ActorSchedulingError | null> {
|
|
71
72
|
const name = getActorNameFromQuery(query);
|
|
72
73
|
|
|
@@ -79,7 +80,13 @@ export async function checkForSchedulingError(
|
|
|
79
80
|
actorId,
|
|
80
81
|
error: actor.error,
|
|
81
82
|
});
|
|
82
|
-
return actorSchedulingError(
|
|
83
|
+
return actorSchedulingError(
|
|
84
|
+
group,
|
|
85
|
+
code,
|
|
86
|
+
actorId,
|
|
87
|
+
actor.error,
|
|
88
|
+
rayId,
|
|
89
|
+
);
|
|
83
90
|
}
|
|
84
91
|
} catch (err) {
|
|
85
92
|
logger().warn({
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Rivet } from "@rivetkit/engine-api-full";
|
|
2
|
+
|
|
3
|
+
/** A namespace-scoped Engine grant. The caller must provide every grant explicitly. */
|
|
4
|
+
export type TokenGrant = Rivet.AuthTokenGrant;
|
|
5
|
+
|
|
6
|
+
/** Options for `client.auth.issueToken()`. `expiresIn` is in seconds. */
|
|
7
|
+
export type IssueTokenOptions = Pick<
|
|
8
|
+
Rivet.AuthTokenCreateRequest,
|
|
9
|
+
"subject" | "grants"
|
|
10
|
+
> & {
|
|
11
|
+
expiresIn?: Rivet.AuthTokenCreateRequest["duration"];
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** Token timestamps are Unix milliseconds. */
|
|
15
|
+
export interface IssuedToken {
|
|
16
|
+
token: Rivet.AuthTokenCreateResponse["token"];
|
|
17
|
+
issuedAt: Rivet.AuthTokenCreateResponse["issuedTs"];
|
|
18
|
+
expiresAt: Rivet.AuthTokenCreateResponse["expiresTs"];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Resources that can be scoped to a single actor ID. */
|
|
22
|
+
export type ActorTokenResource = Extract<
|
|
23
|
+
Rivet.AuthTokenGrant["resource"],
|
|
24
|
+
"actor_gateway" | "actor" | "actor_kv"
|
|
25
|
+
>;
|
|
26
|
+
|
|
27
|
+
export type ActorTokenPermissions = Partial<
|
|
28
|
+
Record<ActorTokenResource, Rivet.AuthTokenGrant["operations"]>
|
|
29
|
+
>;
|
|
30
|
+
|
|
31
|
+
/** Options for `actor.issueToken()`. Omit permissions for gateway read access only. */
|
|
32
|
+
export type ActorIssueTokenOptions = Pick<
|
|
33
|
+
IssueTokenOptions,
|
|
34
|
+
"subject" | "expiresIn"
|
|
35
|
+
> & {
|
|
36
|
+
permissions?: ActorTokenPermissions;
|
|
37
|
+
};
|