durable-actors 0.15.0 → 0.16.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/client-runtime/settings.d.ts.map +1 -1
- package/dist/client-runtime/settings.js +3 -1
- package/dist/client-runtime/settings.js.map +1 -1
- package/dist/generated/client-runtime.d.ts.map +1 -1
- package/dist/generated/client-runtime.js +1 -1
- package/dist/generated/client-runtime.js.map +1 -1
- package/dist/host/actor-runtime.d.ts +2 -0
- package/dist/host/actor-runtime.d.ts.map +1 -1
- package/dist/host/actor-runtime.js +24 -7
- package/dist/host/actor-runtime.js.map +1 -1
- package/dist/host/database.d.ts +2 -1
- package/dist/host/database.d.ts.map +1 -1
- package/dist/host/database.js +3 -2
- package/dist/host/database.js.map +1 -1
- package/dist/templates/actor/package.json +1 -1
- package/dist/templates/ai-chat/package.json +1 -1
- package/dist/templates/chat/package.json +1 -1
- package/dist/templates/documents/package.json +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/client-runtime/settings.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,0BAA0B;IACvC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;CACnC;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;AAE5D,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO;;;;;EAoBhD;AAED,wBAAgB,mBAAmB,CAAC,WAAW,GAAE,WAAkC,GAAG,0BAA0B,
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/client-runtime/settings.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,0BAA0B;IACvC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;CACnC;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;AAE5D,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO;;;;;EAoBhD;AAED,wBAAgB,mBAAmB,CAAC,WAAW,GAAE,WAAkC,GAAG,0BAA0B,CAU/G;AAED,wBAAgB,kBAAkB,IAAI,WAAW,CAEhD;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAkBrD;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAM1E;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAE9F;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE3F"}
|
|
@@ -20,7 +20,9 @@ export function configuredSettings(value) {
|
|
|
20
20
|
export function environmentSettings(environment = runtimeEnvironment()) {
|
|
21
21
|
return {
|
|
22
22
|
projectId: environment.DURABLE_ACTORS_PROJECT_ID,
|
|
23
|
-
apiKey: environment.DURABLE_ACTORS_SECRET ??
|
|
23
|
+
apiKey: environment.DURABLE_ACTORS_SECRET ??
|
|
24
|
+
environment.DURABLE_ACTORS_API_KEY ??
|
|
25
|
+
environment.DURABLE_ACTORS_INVOKE_API_KEY,
|
|
24
26
|
homeRegion: environment.DURABLE_ACTORS_HOME_REGION,
|
|
25
27
|
controlPlaneUrl: environment.DURABLE_ACTORS_CONTROL_PLANE_URL ?? "http://127.0.0.1:7100"
|
|
26
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/client-runtime/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAW3E,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC7C,IACI,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,iBAAiB,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAEvG,MAAM,IAAI,uBAAuB,CAAC,4CAA4C,CAAC,CAAA;IACnF,MAAM,OAAO,GAAG,KAAmC,CAAA;IACnD,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;IAC/D,MAAM,KAAK,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAA;IAC7F,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;IACpE,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC9G,MAAM,IAAI,uBAAuB,CAC7B,kGAAkG,CACrG,CAAA;IACL,IAAI,OAAO,CAA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OAAO,CAAC,CAAC,EAAE,CAAA;AACjP,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,UAA8B;IAC/D,OAAO,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,UAAU,EAAE,EAAE,CAAA;AACpF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-runtime.d.ts","sourceRoot":"","sources":["../../src/generated/client-runtime.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"client-runtime.d.ts","sourceRoot":"","sources":["../../src/generated/client-runtime.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAA82wC,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const runtimeFiles = { "runtime/errors.js": "class ActorConfigurationError extends Error {\n constructor(message, options) {\n super(message, options);\n this.name = \"ActorConfigurationError\";\n }\n}\nclass ActorDefinitionError extends Error {\n constructor(message) {\n super(message);\n this.name = \"ActorDefinitionError\";\n }\n}\n/** Remote failure. Retrying an `outcome_unknown` operation may run it twice; `unavailable` never ran. */\nclass ActorInvocationError extends Error {\n /** Error category, such as `actor_error` or `outcome_unknown`. New codes may be added. */\n code;\n /** Identifies this caller attempt; it is not an application idempotency key. */\n requestId;\n constructor(code, requestId, message) {\n super(message);\n this.name = \"ActorInvocationError\";\n this.code = code;\n this.requestId = requestId;\n }\n}\n/** Signals that the authorization service explicitly revoked or denied access. */\nclass ActorSessionRejectedError extends Error {\n name = \"ActorSessionRejectedError\";\n}\nclass ActorSessionError extends Error {\n constructor(message, options) {\n super(message, options);\n this.name = \"ActorSessionError\";\n }\n}\nclass ActorProtocolError extends Error {\n constructor(message, options) {\n super(message, options);\n this.name = \"ActorProtocolError\";\n }\n}\nclass ActorSerializationError extends Error {\n constructor(message, options) {\n super(message, options);\n this.name = \"ActorSerializationError\";\n }\n}\nclass ActorValidationError extends Error {\n constructor(message) {\n super(message);\n this.name = \"ActorValidationError\";\n }\n}\nexport { ActorConfigurationError, ActorDefinitionError, ActorInvocationError, ActorProtocolError, ActorSerializationError, ActorSessionError, ActorSessionRejectedError, ActorValidationError };\nfunction errorMessage(error) {\n return error instanceof Error ? error.message : String(error);\n}\nexport { errorMessage };\n", "runtime/errors.d.ts": "declare class ActorConfigurationError extends Error {\n constructor(message: string, options?: ErrorOptions);\n}\ndeclare class ActorDefinitionError extends Error {\n constructor(message: string);\n}\n/** Remote failure. Retrying an `outcome_unknown` operation may run it twice; `unavailable` never ran. */\ndeclare class ActorInvocationError extends Error {\n /** Error category, such as `actor_error` or `outcome_unknown`. New codes may be added. */\n readonly code: string;\n /** Identifies this caller attempt; it is not an application idempotency key. */\n readonly requestId: string;\n constructor(code: string, requestId: string, message: string);\n}\n/** Signals that the authorization service explicitly revoked or denied access. */\ndeclare class ActorSessionRejectedError extends Error {\n readonly name = \"ActorSessionRejectedError\";\n}\ndeclare class ActorSessionError extends Error {\n constructor(message: string, options?: ErrorOptions);\n}\ndeclare class ActorProtocolError extends Error {\n constructor(message: string, options?: ErrorOptions);\n}\ndeclare class ActorSerializationError extends Error {\n constructor(message: string, options?: ErrorOptions);\n}\ndeclare class ActorValidationError extends Error {\n constructor(message: string);\n}\nexport { ActorConfigurationError, ActorDefinitionError, ActorInvocationError, ActorProtocolError, ActorSerializationError, ActorSessionError, ActorSessionRejectedError, ActorValidationError };\ndeclare function errorMessage(error: unknown): string;\nexport { errorMessage };\n", "runtime/json.js": "import { ActorSerializationError } from \"./errors.js\";\nfunction cloneJson(value, label) {\n try {\n const encoded = JSON.stringify(value);\n if (encoded === undefined)\n throw new ActorSerializationError(`${label} must be JSON serializable`);\n return JSON.parse(encoded);\n }\n catch (error) {\n if (error instanceof ActorSerializationError)\n throw error;\n throw new ActorSerializationError(`${label} must be JSON serializable`, { cause: error });\n }\n}\nexport { cloneJson };\n", "runtime/json.d.ts": "type JsonPrimitive = string | number | boolean | null;\ntype JsonObject = {\n readonly [key: string]: JsonValue;\n};\ntype JsonValue = JsonPrimitive | JsonObject | readonly JsonValue[];\ndeclare function cloneJson(value: unknown, label: string): JsonValue;\nexport { cloneJson };\nexport type { JsonValue };\n", "runtime/http.js": "import { ActorProtocolError } from \"./errors.js\";\nexport function parseActorHostReply(reply) {\n if (isRecord(reply)) {\n const metadata = parseMetadata(reply);\n if (reply.type === \"completed\" && Object.hasOwn(reply, \"result\"))\n return { type: \"completed\", result: reply.result, ...metadata };\n if (reply.type === \"failed\" &&\n typeof reply.code === \"string\" &&\n reply.code.length > 0 &&\n typeof reply.message === \"string\")\n return { type: \"failed\", code: reply.code, message: reply.message, ...metadata };\n if (reply.type === \"not_executed\" && rejectionReason(reply.reason))\n return { type: \"not_executed\", reason: reply.reason, ...metadata };\n }\n throw new ActorProtocolError(\"actor host response did not contain a valid outcome\");\n}\nfunction parseMetadata(reply) {\n if (!Object.hasOwn(reply, \"metadata\"))\n return {};\n const metadata = reply.metadata;\n if (!isRecord(metadata) ||\n !nonnegativeFiniteNumber(metadata.routingMs) ||\n !nonnegativeFiniteNumber(metadata.durationMs) ||\n (metadata.queueWaitMs !== null &&\n (!nonnegativeFiniteNumber(metadata.queueWaitMs) || metadata.queueWaitMs > metadata.durationMs)) ||\n (metadata.hostState !== \"cold\" && metadata.hostState !== \"warm\"))\n throw new ActorProtocolError(\"actor host response contained invalid latency metadata\");\n return {\n metadata: {\n routingMs: metadata.routingMs,\n durationMs: metadata.durationMs,\n queueWaitMs: metadata.queueWaitMs,\n hostState: metadata.hostState\n }\n };\n}\nfunction nonnegativeFiniteNumber(value) {\n return typeof value === \"number\" && Number.isFinite(value) && value >= 0;\n}\nfunction rejectionReason(value) {\n return value === \"host_unavailable\" || value === \"upstream_not_reached\";\n}\nexport function connectionRefused(error, ancestors = new Set()) {\n if (!isRecord(error) || ancestors.has(error))\n return false;\n const visited = new Set(ancestors).add(error);\n if (error.code !== undefined && error.code !== \"ECONNREFUSED\")\n return false;\n if (error.errors !== undefined)\n return (Array.isArray(error.errors) &&\n error.errors.length > 0 &&\n error.errors.every(cause => connectionRefused(cause, visited)));\n if (error.code === \"ECONNREFUSED\")\n return error.syscall === \"connect\";\n return connectionRefused(error.cause, visited);\n}\nexport async function responseDocument(response) {\n try {\n return await response.json();\n }\n catch (error) {\n throw new ActorProtocolError(`HTTP ${response.status} response was not valid JSON`, { cause: error });\n }\n}\nexport function isRecord(value) {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n", "runtime/http.d.ts": "import type { JsonValue } from \"./json.js\";\nexport declare function parseActorHostReply(reply: unknown): ActorHostReply;\nexport declare function connectionRefused(error: unknown, ancestors?: Set<unknown>): boolean;\nexport declare function responseDocument(response: Response): Promise<unknown>;\nexport declare function isRecord(value: unknown): value is Record<string, unknown>;\nexport interface ActorAddress {\n readonly projectId: string;\n readonly actorName: string;\n readonly actorId: string;\n}\nexport interface ActorInvocation extends ActorAddress {\n readonly requestId: string;\n readonly method: string;\n readonly args: readonly JsonValue[];\n}\ntype ActorRejectionReason = \"host_unavailable\" | \"upstream_not_reached\";\nexport interface ActorResponseMetadata {\n readonly routingMs: number;\n readonly durationMs: number;\n readonly queueWaitMs: number | null;\n readonly hostState: \"cold\" | \"warm\";\n}\nexport type ActorHostReply = ({\n readonly type: \"completed\";\n readonly result: unknown;\n} | {\n readonly type: \"failed\";\n readonly code: string;\n readonly message: string;\n} | {\n readonly type: \"unauthenticated\";\n} | {\n readonly type: \"not_executed\";\n readonly reason: ActorRejectionReason;\n}) & {\n readonly metadata?: ActorResponseMetadata;\n};\nexport {};\n", "runtime/settings.js": "import { ActorConfigurationError, ActorValidationError } from \"./errors.js\";\nexport function configuredSettings(value) {\n if (typeof value !== \"object\" ||\n value === null ||\n Array.isArray(value) ||\n Object.keys(value).some(key => ![\"projectId\", \"apiKey\", \"homeRegion\", \"controlPlaneUrl\"].includes(key)))\n throw new ActorConfigurationError(\"durable-actors client settings are invalid\");\n const options = value;\n const controlPlaneUrl = validateOrigin(options.controlPlaneUrl);\n const local = [\"localhost\", \"127.0.0.1\", \"[::1]\"].includes(new URL(controlPlaneUrl).hostname);\n const projectId = options.projectId ?? (local ? \"local\" : undefined);\n if (typeof projectId !== \"string\" || !/^[A-Za-z0-9._-]{1,64}$/u.test(projectId) || [\".\", \"..\"].includes(projectId))\n throw new ActorConfigurationError(\"durable-actors client settings are invalid: a valid projectId is required for remote connections\");\n if (options.apiKey !== undefined && (typeof options.apiKey !== \"string\" || !options.apiKey.trim()))\n throw new ActorConfigurationError(\"durable-actors client settings are invalid: apiKey must not be empty\");\n if (options.homeRegion !== undefined)\n validateActorComponent(\"home region\", options.homeRegion);\n return { projectId, credential: options.apiKey?.trim(), homeRegion: options.homeRegion, controlPlaneUrl };\n}\nexport function environmentSettings(environment = runtimeEnvironment()) {\n return {\n projectId: environment.DURABLE_ACTORS_PROJECT_ID,\n apiKey: environment.DURABLE_ACTORS_SECRET ?? environment.DURABLE_ACTORS_API_KEY,\n homeRegion: environment.DURABLE_ACTORS_HOME_REGION,\n controlPlaneUrl: environment.DURABLE_ACTORS_CONTROL_PLANE_URL ?? \"http://127.0.0.1:7100\"\n };\n}\nexport function runtimeEnvironment() {\n return globalThis.process?.env ?? {};\n}\nexport function validateOrigin(origin) {\n let url;\n try {\n url = new URL(origin);\n }\n catch (error) {\n throw new ActorConfigurationError(`actor HTTP origin is invalid: ${origin}`, { cause: error });\n }\n if (!/^https?:$/u.test(url.protocol) ||\n !url.hostname ||\n url.username ||\n url.password ||\n url.pathname !== \"/\" ||\n url.search ||\n url.hash)\n throw new ActorConfigurationError(`actor URL must be an HTTP or HTTPS origin: ${origin}`);\n return url.origin;\n}\nexport function validateActorComponent(name, value) {\n if (typeof value !== \"string\" || !/^[A-Za-z0-9._-]+$/u.test(value) || value === \".\" || value === \"..\")\n throw new ActorValidationError(`${name} may contain only ASCII letters, digits, '.', '-', and '_' and must not be a path segment`);\n return value;\n}\nexport function projectActorPath(projectId, actorName, actorId) {\n return `/v1/projects/${encodeURIComponent(validateActorComponent(\"project ID\", projectId))}/actors/${encodeURIComponent(validateActorComponent(\"actor name\", actorName))}/${encodeURIComponent(validateActorComponent(\"actor ID\", actorId))}`;\n}\nexport function authorizationHeaders(credential) {\n return credential === undefined ? {} : { authorization: `Bearer ${credential}` };\n}\n", "runtime/settings.d.ts": "export interface DurableActorsClientOptions {\n readonly projectId?: string;\n readonly apiKey?: string;\n readonly homeRegion?: string;\n readonly controlPlaneUrl: string;\n}\nexport type Environment = Record<string, string | undefined>;\nexport declare function configuredSettings(value: unknown): {\n projectId: string;\n credential: string | undefined;\n homeRegion: string | undefined;\n controlPlaneUrl: string;\n};\nexport declare function environmentSettings(environment?: Environment): DurableActorsClientOptions;\nexport declare function runtimeEnvironment(): Environment;\nexport declare function validateOrigin(origin: string): string;\nexport declare function validateActorComponent(name: string, value: string): string;\nexport declare function projectActorPath(projectId: string, actorName: string, actorId: string): string;\nexport declare function authorizationHeaders(credential: string | undefined): Record<string, string>;\n", "runtime/telemetry.js": "class LatencyTimeline {\n now;\n origin;\n milestones = { started_at_ms: 0 };\n constructor(now = () => performance.now()) {\n this.now = now;\n this.origin = this.now();\n }\n mark(name) {\n this.milestones[`${name}_at_ms`] = Math.max(0, Math.round(this.now() - this.origin));\n }\n finish() {\n this.mark(\"completed\");\n return { ...this.milestones };\n }\n}\nexport { LatencyTimeline };\n", "runtime/telemetry.d.ts": "type TelemetryEvent = Record<string, boolean | number | string | undefined>;\ntype TelemetrySink = (event: TelemetryEvent) => void;\ndeclare class LatencyTimeline {\n private readonly now;\n private readonly origin;\n private readonly milestones;\n constructor(now?: () => number);\n mark(name: string): void;\n finish(): Record<string, number>;\n}\nexport { LatencyTimeline };\nexport type { TelemetryEvent, TelemetrySink };\n", "runtime/client.js": "import { ActorInvocationError, ActorProtocolError } from \"./errors.js\";\nimport { connectionRefused, isRecord, parseActorHostReply, responseDocument } from \"./http.js\";\nimport { cloneJson } from \"./json.js\";\nimport { authorizationHeaders, configuredSettings, environmentSettings, projectActorPath, runtimeEnvironment, validateActorComponent } from \"./settings.js\";\nimport { LatencyTimeline } from \"./telemetry.js\";\nexport class HttpActorClient {\n settingsValue;\n environment;\n fetchRequest;\n requestId;\n monotonicNow;\n telemetry;\n constructor(options, dependencies = {}) {\n this.environment = dependencies.environment ?? runtimeEnvironment();\n this.fetchRequest = dependencies.fetch ?? globalThis.fetch;\n this.requestId = dependencies.requestId ?? (() => globalThis.crypto.randomUUID());\n this.monotonicNow = dependencies.monotonicNow ?? (() => performance.now());\n this.telemetry = dependencies.telemetry ?? (() => { });\n this.settingsValue = options === undefined ? undefined : configuredSettings(options);\n }\n async invoke(actorName, actorId, method, args) {\n const requestId = validateActorComponent(\"request ID\", this.requestId());\n const timeline = new LatencyTimeline(this.monotonicNow);\n let outcome = \"failed\";\n try {\n const invocation = this.invocation(requestId, actorName, actorId, method, args);\n timeline.mark(\"invocation_built\");\n const result = await this.invokeAttempt(invocation, true, timeline);\n outcome = \"completed\";\n return result;\n }\n finally {\n this.telemetry({\n event: \"actor_client_invocation\",\n request_id: requestId,\n actor_name: actorName,\n actor_id: actorId,\n method,\n ...timeline.finish(),\n outcome\n });\n }\n }\n async invokeAttempt(invocation, retryAvailable, timeline) {\n const reply = await this.resolveAndInvoke(invocation);\n timeline.mark(\"control_plane_invocation_completed\");\n if (reply.type === \"completed\")\n return reply.result;\n if (reply.type === \"failed\")\n throw new ActorInvocationError(reply.code, invocation.requestId, reply.message);\n if (!retryAvailable)\n throw new ActorInvocationError(reply.type === \"unauthenticated\" ? \"unauthenticated\" : \"unavailable\", invocation.requestId, \"actor host rejected the invocation before execution after recovery\");\n return this.invokeAttempt(invocation, false, timeline);\n }\n async resolveAndInvoke(invocation) {\n let response;\n try {\n response = await this.fetchRequest(`${this.settings.controlPlaneUrl}${projectActorPath(this.settings.projectId, invocation.actorName, invocation.actorId)}/invoke`, {\n method: \"POST\",\n redirect: \"manual\",\n headers: {\n accept: \"application/json\",\n ...authorizationHeaders(this.settings.credential),\n \"x-request-id\": invocation.requestId,\n \"content-type\": \"application/json\"\n },\n body: JSON.stringify({\n requestId: invocation.requestId,\n method: invocation.method,\n args: invocation.args,\n homeRegion: this.settings.homeRegion\n })\n });\n }\n catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n if (connectionRefused(error))\n throw new ActorInvocationError(\"unavailable\", invocation.requestId, `could not connect to ${this.settings.controlPlaneUrl}: ${message}`);\n throw new ActorInvocationError(\"outcome_unknown\", invocation.requestId, `control-plane invocation failed after it may have been dispatched: ${message}`);\n }\n const document = await responseDocument(response);\n if (!response.ok)\n this.throwResponseFailure(response, document, invocation.requestId);\n if (!isRecord(document))\n throw new ActorProtocolError(\"control-plane response did not contain an invocation outcome\");\n const reply = isRecord(document.outcome) && document.outcome.type === \"unauthenticated\"\n ? { type: \"unauthenticated\" }\n : parseActorHostReply(document.outcome);\n return reply;\n }\n throwResponseFailure(response, document, requestId) {\n if (response.status === 401 || response.status === 403)\n throw new ActorInvocationError(\"unauthenticated\", requestId, \"the durable-actors application credential was rejected\");\n const failure = isRecord(document) ? document.error : undefined;\n if (!isRecord(failure) ||\n typeof failure.code !== \"string\" ||\n !failure.code ||\n typeof failure.message !== \"string\")\n throw new ActorProtocolError(`control-plane HTTP ${response.status} response did not contain a valid error`);\n throw new ActorInvocationError(failure.code, typeof failure.requestId === \"string\" ? failure.requestId : requestId, failure.message);\n }\n invocation(requestId, actorName, actorId, method, args) {\n return {\n requestId,\n projectId: this.settings.projectId,\n actorName: validateActorComponent(\"actor name\", actorName),\n actorId: validateActorComponent(\"actor ID\", actorId),\n method: validateActorComponent(\"actor method\", method),\n args: this.jsonArguments(args)\n };\n }\n get settings() {\n if (this.settingsValue !== undefined)\n return this.settingsValue;\n this.settingsValue = configuredSettings(environmentSettings(this.environment));\n return this.settingsValue;\n }\n jsonArguments(args) {\n const value = cloneJson(args, \"actor arguments\");\n if (!Array.isArray(value))\n throw new ActorProtocolError(\"actor arguments must be a JSON array\");\n return value;\n }\n}\n", "runtime/client.d.ts": "import { configuredSettings } from \"./settings.js\";\nimport type { DurableActorsClientOptions, Environment } from \"./settings.js\";\nimport type { TelemetrySink } from \"./telemetry.js\";\nexport declare class HttpActorClient {\n private settingsValue;\n protected readonly environment: Environment;\n protected readonly fetchRequest: typeof globalThis.fetch;\n protected readonly requestId: () => string;\n protected readonly monotonicNow: () => number;\n protected readonly telemetry: TelemetrySink;\n constructor(options?: DurableActorsClientOptions, dependencies?: HttpActorClientDependencies);\n invoke(actorName: string, actorId: string, method: string, args: readonly unknown[]): Promise<unknown>;\n private invokeAttempt;\n private resolveAndInvoke;\n private throwResponseFailure;\n private invocation;\n protected get settings(): RemoteActorSettings;\n private jsonArguments;\n}\ntype RemoteActorSettings = ReturnType<typeof configuredSettings>;\nexport interface HttpActorClientDependencies {\n readonly environment?: Environment;\n readonly fetch?: typeof globalThis.fetch;\n readonly requestId?: () => string;\n readonly monotonicNow?: () => number;\n readonly telemetry?: TelemetrySink;\n}\nexport type { DurableActorsClientOptions };\n", "runtime/proxy.js": "import { ActorProtocolError, ActorSerializationError, ActorValidationError } from \"./errors.js\";\nimport { isRecord } from \"./http.js\";\nimport { authorizationHeaders, configuredSettings, environmentSettings, projectActorPath, validateActorComponent } from \"./settings.js\";\n/** Issues browser connection URLs from your backend. */\nclass SocketProxy {\n actors;\n projectId;\n origin;\n apiKey;\n setupTimeoutMs;\n fetchRequest;\n constructor(actors, options = {}, dependencies = {}) {\n this.actors = actors;\n this.setupTimeoutMs = options.setupTimeoutMs ?? 180000;\n if (!Number.isSafeInteger(this.setupTimeoutMs) || this.setupTimeoutMs < 1000 || this.setupTimeoutMs > 600000)\n throw new Error(\"Socket setup timeout must be between one second and ten minutes\");\n const settings = configuredSettings(proxySettings(options));\n this.origin = settings.controlPlaneUrl;\n this.apiKey = settings.credential;\n this.projectId = settings.projectId;\n this.fetchRequest = dependencies.fetch ?? globalThis.fetch;\n }\n /**\n * Call after authenticating the user and checking actor access.\n * Pass `websocketUrl` to the browser's `new WebSocket()`.\n */\n async handle(authorization) {\n const actorName = validateActorComponent(\"actor name\", authorization.actorName);\n const actorId = validateActorComponent(\"actor ID\", authorization.actorId);\n if (!Object.hasOwn(this.actors, actorName))\n throw new Error(`Unknown actor name: ${actorName}`);\n const metadata = socketMetadata(authorization.metadata);\n const homeRegion = authorization.homeRegion === undefined\n ? undefined\n : validateActorComponent(\"home region\", authorization.homeRegion);\n const response = await this.fetchRequest(`${this.origin}${projectActorPath(this.projectId, actorName, actorId)}/find-websocket`, {\n method: \"POST\",\n redirect: \"manual\",\n headers: { ...authorizationHeaders(this.apiKey), \"content-type\": \"application/json\" },\n body: JSON.stringify({ metadata, homeRegion }),\n signal: AbortSignal.timeout(this.setupTimeoutMs)\n });\n if (!response.ok)\n throw new Error(`WebSocket authorization could not be issued (HTTP ${response.status})`);\n return socketGrant(await response.json());\n }\n}\nfunction proxySettings(options) {\n const environment = environmentSettings();\n const controlPlaneUrl = options.controlPlaneUrl ?? environment.controlPlaneUrl;\n const apiKey = options.apiKey ?? environment.apiKey;\n return {\n projectId: options.projectId ?? environment.projectId,\n controlPlaneUrl: controlPlaneUrl ?? \"http://127.0.0.1:7100\",\n apiKey\n };\n}\nexport { SocketProxy };\nfunction socketGrant(value) {\n if (!isRecord(value) ||\n typeof value.websocketUrl !== \"string\" ||\n !URL.canParse(value.websocketUrl) ||\n !/^wss?:$/u.test(new URL(value.websocketUrl).protocol) ||\n typeof value.homeRegion !== \"string\" ||\n !value.homeRegion ||\n !Number.isSafeInteger(value.connectByMs))\n throw new ActorProtocolError(\"invalid WebSocket authorization response\");\n return {\n websocketUrl: value.websocketUrl,\n homeRegion: value.homeRegion,\n connectByMs: value.connectByMs\n };\n}\nfunction socketMetadata(value) {\n let encoded;\n try {\n encoded = JSON.stringify(value);\n if (!isJsonValue(value))\n throw new Error(\"invalid JSON value\");\n }\n catch (error) {\n throw new ActorSerializationError(\"socket metadata must be a JSON value\", { cause: error });\n }\n if (new TextEncoder().encode(encoded).length > 16 * 1024)\n throw new ActorValidationError(\"socket metadata exceeds 16384 bytes\");\n return value;\n}\nfunction isJsonValue(value) {\n if (value === null || typeof value === \"string\" || typeof value === \"boolean\")\n return true;\n if (typeof value === \"number\")\n return Number.isFinite(value);\n if (Array.isArray(value))\n return Array.from(value).every(isJsonValue);\n return (isRecord(value) &&\n [Object.prototype, null].includes(Object.getPrototypeOf(value)) &&\n Object.values(value).every(isJsonValue));\n}\n", "runtime/proxy.d.ts": "/** Overrides for the backend's DURABLE_ACTORS environment settings. */\ninterface SocketProxyOptions {\n readonly projectId?: string;\n readonly controlPlaneUrl?: string;\n readonly apiKey?: string;\n /** Defaults to 180000 ms; accepts 1000–600000 ms. */\n readonly setupTimeoutMs?: number;\n}\ninterface SocketProxyDependencies {\n readonly fetch?: typeof globalThis.fetch;\n}\ninterface ProxyActor<Metadata = unknown> {\n readonly types?: Metadata;\n}\n/** Actor access your backend has already authorized. */\ntype SocketAuthorization<Actors extends Record<string, ProxyActor>> = {\n [Name in keyof Actors & string]: {\n readonly actorName: Name;\n readonly actorId: string;\n readonly metadata: Actors[Name] extends ProxyActor<infer Metadata> ? Metadata : never;\n readonly homeRegion?: string;\n };\n}[keyof Actors & string];\n/** Browser connection URL and admission deadline in Unix milliseconds. Treat the URL as a credential. */\ninterface SocketGrant {\n websocketUrl: string;\n homeRegion: string;\n connectByMs: number;\n}\n/** Issues browser connection URLs from your backend. */\ndeclare class SocketProxy<Actors extends Record<string, ProxyActor>> {\n private readonly actors;\n private readonly projectId;\n private readonly origin;\n private readonly apiKey;\n private readonly setupTimeoutMs;\n private readonly fetchRequest;\n constructor(actors: Actors, options?: SocketProxyOptions, dependencies?: SocketProxyDependencies);\n /**\n * Call after authenticating the user and checking actor access.\n * Pass `websocketUrl` to the browser's `new WebSocket()`.\n */\n handle(authorization: SocketAuthorization<Actors>): Promise<SocketGrant>;\n}\nexport { SocketProxy };\nexport type { ProxyActor, SocketAuthorization, SocketGrant, SocketProxyDependencies, SocketProxyOptions };\n", "runtime/stub.js": "import { HttpActorClient } from \"./client.js\";\nimport { ActorDefinitionError, ActorSerializationError } from \"./errors.js\";\nimport { validateActorComponent } from \"./settings.js\";\n/** Creates a backend client from generated method definitions. */\nfunction createActorStub(actorName, actorId, methods, transport) {\n validateActorComponent(\"actor name\", actorName);\n validateActorComponent(\"actor ID\", actorId);\n const stub = Object.create(null);\n for (const method of methods) {\n validateActorComponent(\"actor method\", method.name);\n if ([\n \"then\",\n \"connect\",\n \"broadcast\",\n \"db\",\n \"alarm\",\n \"onConnect\",\n \"onMessage\",\n \"onDisconnect\",\n \"onAlarm\"\n ].includes(method.name))\n throw new ActorDefinitionError(`actor method ${actorName}.${method.name} is reserved`);\n if (Object.hasOwn(stub, method.name))\n throw new ActorDefinitionError(`duplicate actor method ${actorName}.${method.name}`);\n Object.defineProperty(stub, method.name, {\n enumerable: true,\n value: async (...args) => {\n const parameters = invocationArguments(args);\n const client = transport ?? defaultTransport();\n const result = await client.invoke(actorName, actorId, method.name, parameters);\n return method.result === \"void\" ? undefined : result;\n }\n });\n }\n return stub;\n}\nexport { createActorStub };\nlet shared;\nexport function createActorTransport(options) {\n return new HttpActorClient(options);\n}\nfunction defaultTransport() {\n return (shared ??= new HttpActorClient());\n}\nfunction invocationArguments(args) {\n let end = args.length;\n while (end > 0 && args[end - 1] === undefined)\n end--;\n const parameters = args.slice(0, end);\n if (parameters.includes(undefined))\n throw new ActorSerializationError(\"undefined cannot precede a supplied RPC argument in JSON transport\");\n return parameters;\n}\n", "runtime/stub.d.ts": "import type { DurableActorsClientOptions } from \"./settings.js\";\ninterface ActorRpcTransport {\n invoke(actorName: string, actorId: string, method: string, args: readonly unknown[]): Promise<unknown>;\n}\ninterface ActorRpcMethod {\n readonly name: string;\n readonly result: \"void\" | \"value\";\n}\n/** Creates a backend client from generated method definitions. */\ndeclare function createActorStub<Stub extends object>(actorName: string, actorId: string, methods: readonly ActorRpcMethod[], transport?: ActorRpcTransport): Stub;\nexport { createActorStub };\nexport type { ActorRpcMethod, ActorRpcTransport };\nexport declare function createActorTransport(options: DurableActorsClientOptions): ActorRpcTransport;\nexport type { DurableActorsClientOptions };\n", "runtime/session.js": "import { HttpActorClient } from \"./client.js\";\nimport { ActorSessionRejectedError } from \"./errors.js\";\nimport { validateActorComponent, validateOrigin } from \"./settings.js\";\nexport { ActorSessionRejectedError } from \"./errors.js\";\n/**\n * Reuses actor targets and renews runtime-issued sessions through a trusted backend.\n * Sessions require an HTTPS origin (except localhost) and at most five minutes of validity.\n * Renewal stops after a minute without invocations; dispose cancels it immediately.\n */\nexport class ActorSessionTransport {\n options;\n transport;\n expiresAtMs = 0;\n lastUsedAt = 0;\n pending;\n cancel;\n closed = false;\n now;\n createTransport;\n schedule;\n constructor(options, dependencies = {}) {\n this.options = options;\n validateActorComponent(\"project ID\", options.projectId);\n this.now = dependencies.now ?? (() => performance.timeOrigin + performance.now());\n this.createTransport = dependencies.createTransport ?? (settings => new HttpActorClient(settings));\n this.schedule = dependencies.schedule ?? scheduleRefresh;\n }\n async invoke(actorName, actorId, method, args) {\n if (this.closed)\n throw new Error(\"Actor session transport is disposed\");\n this.lastUsedAt = this.now();\n const transport = this.transport && this.expiresAtMs > this.now() + 5_000 ? this.transport : await this.refresh();\n return transport.invoke(actorName, actorId, method, args);\n }\n dispose() {\n this.closed = true;\n this.cancel?.();\n this.transport = undefined;\n }\n refresh() {\n if (this.pending)\n return this.pending;\n this.cancel?.();\n this.pending = this.exchange().finally(() => {\n this.pending = undefined;\n });\n return this.pending;\n }\n async exchange() {\n let session;\n try {\n session = await this.options.getSession();\n }\n catch (error) {\n if (error instanceof ActorSessionRejectedError) {\n this.transport = undefined;\n this.expiresAtMs = 0;\n }\n throw error;\n }\n const remaining = this.validateSession(session);\n if (this.closed)\n throw new Error(\"Actor session transport is disposed\");\n const transport = this.createTransport({\n projectId: session.projectId,\n controlPlaneUrl: session.controlPlaneUrl,\n apiKey: session.token\n });\n this.transport = transport;\n this.expiresAtMs = session.expiresAtMs;\n this.scheduleRenewal(remaining * (0.75 + Math.random() * 0.05));\n return transport;\n }\n validateSession(session) {\n if (!session ||\n session.projectId !== this.options.projectId ||\n typeof session.token !== \"string\" ||\n !session.token.trim() ||\n !Number.isSafeInteger(session.expiresAtMs))\n throw new Error(\"Invalid actor session\");\n const origin = new URL(validateOrigin(session.controlPlaneUrl));\n if (origin.protocol !== \"https:\" && ![\"localhost\", \"127.0.0.1\", \"[::1]\"].includes(origin.hostname))\n throw new Error(\"Actor sessions require HTTPS outside localhost\");\n const remaining = session.expiresAtMs - this.now();\n if (remaining <= 5_000 || remaining > 305_000)\n throw new Error(\"Actor session is expired or invalid\");\n return remaining;\n }\n scheduleRenewal(delayMs) {\n this.cancel = this.schedule(() => {\n if (this.closed || this.now() - this.lastUsedAt >= 60_000)\n return;\n void this.refresh().catch(() => {\n if (!this.closed && this.expiresAtMs > this.now() + 5_000)\n this.scheduleRenewal(5_000);\n });\n }, delayMs);\n }\n}\nexport function createActorSessionTransport(options) {\n return new ActorSessionTransport(options);\n}\nfunction scheduleRefresh(callback, delayMs) {\n const timer = setTimeout(callback, delayMs);\n timer.unref?.();\n return () => clearTimeout(timer);\n}\n", "runtime/session.d.ts": "import type { DurableActorsClientOptions } from \"./settings.js\";\nimport type { ActorRpcTransport } from \"./stub.js\";\nexport interface ActorSession {\n readonly projectId: string;\n readonly controlPlaneUrl: string;\n readonly token: string;\n readonly expiresAtMs: number;\n}\nexport interface ActorSessionTransportOptions {\n readonly projectId: string;\n /** Reauthenticate with your application backend. Throw ActorSessionRejectedError on an explicit denial. */\n readonly getSession: () => Promise<ActorSession>;\n}\nexport interface ActorSessionTransportDependencies {\n readonly now?: () => number;\n readonly createTransport?: (options: DurableActorsClientOptions) => ActorRpcTransport;\n readonly schedule?: (callback: () => void, delayMs: number) => () => void;\n}\nexport { ActorSessionRejectedError } from \"./errors.js\";\n/**\n * Reuses actor targets and renews runtime-issued sessions through a trusted backend.\n * Sessions require an HTTPS origin (except localhost) and at most five minutes of validity.\n * Renewal stops after a minute without invocations; dispose cancels it immediately.\n */\nexport declare class ActorSessionTransport implements ActorRpcTransport {\n private readonly options;\n private transport;\n private expiresAtMs;\n private lastUsedAt;\n private pending;\n private cancel;\n private closed;\n private readonly now;\n private readonly createTransport;\n private readonly schedule;\n constructor(options: ActorSessionTransportOptions, dependencies?: ActorSessionTransportDependencies);\n invoke(actorName: string, actorId: string, method: string, args: readonly unknown[]): Promise<unknown>;\n dispose(): void;\n private refresh;\n private exchange;\n private validateSession;\n private scheduleRenewal;\n}\nexport declare function createActorSessionTransport(options: ActorSessionTransportOptions): ActorSessionTransport;\n", "runtime/index.browser.js": "const createActorStub = () => {\n throw new Error(\"actors must be used on the server\");\n};\nconst createActorTransport = () => {\n throw new Error(\"actors must be used on the server\");\n};\nconst createActorSessionTransport = () => {\n throw new Error(\"actors must be used on the server\");\n};\nconst SocketProxy = class {\n constructor() {\n throw new Error(\"ActorProxy must be used on the server\");\n }\n};\nexport { createActorStub, createActorTransport, createActorSessionTransport, SocketProxy };\nexport { ActorInvocationError, ActorSessionRejectedError } from \"./errors.js\";\n", "runtime/index.browser.d.ts": "import type { SocketProxy as ServerProxy } from \"./proxy.js\";\nimport type { createActorSessionTransport as ServerSessionTransport } from \"./session.js\";\nimport type { createActorStub as ServerStub, createActorTransport as ServerTransport } from \"./stub.js\";\ndeclare const createActorStub: typeof ServerStub;\ndeclare const createActorTransport: typeof ServerTransport;\ndeclare const createActorSessionTransport: typeof ServerSessionTransport;\ndeclare const SocketProxy: typeof ServerProxy;\nexport { createActorStub, createActorTransport, createActorSessionTransport, SocketProxy };\nexport { ActorInvocationError, ActorSessionRejectedError } from \"./errors.js\";\nexport type { ActorSession, ActorSessionTransportOptions, ActorSessionTransport } from \"./session.js\";\n", "runtime/index.js": "export { createActorStub, createActorTransport } from \"./stub.js\";\nexport { createActorSessionTransport, ActorSessionRejectedError } from \"./session.js\";\nexport { ActorInvocationError } from \"./errors.js\";\nexport { SocketProxy } from \"./proxy.js\";\n", "runtime/index.d.ts": "export { createActorStub, createActorTransport } from \"./stub.js\";\nexport { createActorSessionTransport, ActorSessionRejectedError } from \"./session.js\";\nexport type { ActorSession, ActorSessionTransportOptions, ActorSessionTransport } from \"./session.js\";\nexport type { ActorRpcTransport, DurableActorsClientOptions } from \"./stub.js\";\nexport { ActorInvocationError } from \"./errors.js\";\nexport { SocketProxy } from \"./proxy.js\";\nexport type { ProxyActor, SocketGrant, SocketProxyDependencies, SocketProxyOptions } from \"./proxy.js\";\n", "runtime/package.json": "{\n \"private\": true,\n \"type\": \"module\",\n \"sideEffects\": false,\n \"browser\": {\n \"./index.js\": \"./index.browser.js\"\n }\n}\n", "runtime/LICENSE.md": "MIT License\n\nCopyright (c) 2026 Terse\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" };
|
|
1
|
+
export const runtimeFiles = { "runtime/errors.js": "class ActorConfigurationError extends Error {\n constructor(message, options) {\n super(message, options);\n this.name = \"ActorConfigurationError\";\n }\n}\nclass ActorDefinitionError extends Error {\n constructor(message) {\n super(message);\n this.name = \"ActorDefinitionError\";\n }\n}\n/** Remote failure. Retrying an `outcome_unknown` operation may run it twice; `unavailable` never ran. */\nclass ActorInvocationError extends Error {\n /** Error category, such as `actor_error` or `outcome_unknown`. New codes may be added. */\n code;\n /** Identifies this caller attempt; it is not an application idempotency key. */\n requestId;\n constructor(code, requestId, message) {\n super(message);\n this.name = \"ActorInvocationError\";\n this.code = code;\n this.requestId = requestId;\n }\n}\n/** Signals that the authorization service explicitly revoked or denied access. */\nclass ActorSessionRejectedError extends Error {\n name = \"ActorSessionRejectedError\";\n}\nclass ActorSessionError extends Error {\n constructor(message, options) {\n super(message, options);\n this.name = \"ActorSessionError\";\n }\n}\nclass ActorProtocolError extends Error {\n constructor(message, options) {\n super(message, options);\n this.name = \"ActorProtocolError\";\n }\n}\nclass ActorSerializationError extends Error {\n constructor(message, options) {\n super(message, options);\n this.name = \"ActorSerializationError\";\n }\n}\nclass ActorValidationError extends Error {\n constructor(message) {\n super(message);\n this.name = \"ActorValidationError\";\n }\n}\nexport { ActorConfigurationError, ActorDefinitionError, ActorInvocationError, ActorProtocolError, ActorSerializationError, ActorSessionError, ActorSessionRejectedError, ActorValidationError };\nfunction errorMessage(error) {\n return error instanceof Error ? error.message : String(error);\n}\nexport { errorMessage };\n", "runtime/errors.d.ts": "declare class ActorConfigurationError extends Error {\n constructor(message: string, options?: ErrorOptions);\n}\ndeclare class ActorDefinitionError extends Error {\n constructor(message: string);\n}\n/** Remote failure. Retrying an `outcome_unknown` operation may run it twice; `unavailable` never ran. */\ndeclare class ActorInvocationError extends Error {\n /** Error category, such as `actor_error` or `outcome_unknown`. New codes may be added. */\n readonly code: string;\n /** Identifies this caller attempt; it is not an application idempotency key. */\n readonly requestId: string;\n constructor(code: string, requestId: string, message: string);\n}\n/** Signals that the authorization service explicitly revoked or denied access. */\ndeclare class ActorSessionRejectedError extends Error {\n readonly name = \"ActorSessionRejectedError\";\n}\ndeclare class ActorSessionError extends Error {\n constructor(message: string, options?: ErrorOptions);\n}\ndeclare class ActorProtocolError extends Error {\n constructor(message: string, options?: ErrorOptions);\n}\ndeclare class ActorSerializationError extends Error {\n constructor(message: string, options?: ErrorOptions);\n}\ndeclare class ActorValidationError extends Error {\n constructor(message: string);\n}\nexport { ActorConfigurationError, ActorDefinitionError, ActorInvocationError, ActorProtocolError, ActorSerializationError, ActorSessionError, ActorSessionRejectedError, ActorValidationError };\ndeclare function errorMessage(error: unknown): string;\nexport { errorMessage };\n", "runtime/json.js": "import { ActorSerializationError } from \"./errors.js\";\nfunction cloneJson(value, label) {\n try {\n const encoded = JSON.stringify(value);\n if (encoded === undefined)\n throw new ActorSerializationError(`${label} must be JSON serializable`);\n return JSON.parse(encoded);\n }\n catch (error) {\n if (error instanceof ActorSerializationError)\n throw error;\n throw new ActorSerializationError(`${label} must be JSON serializable`, { cause: error });\n }\n}\nexport { cloneJson };\n", "runtime/json.d.ts": "type JsonPrimitive = string | number | boolean | null;\ntype JsonObject = {\n readonly [key: string]: JsonValue;\n};\ntype JsonValue = JsonPrimitive | JsonObject | readonly JsonValue[];\ndeclare function cloneJson(value: unknown, label: string): JsonValue;\nexport { cloneJson };\nexport type { JsonValue };\n", "runtime/http.js": "import { ActorProtocolError } from \"./errors.js\";\nexport function parseActorHostReply(reply) {\n if (isRecord(reply)) {\n const metadata = parseMetadata(reply);\n if (reply.type === \"completed\" && Object.hasOwn(reply, \"result\"))\n return { type: \"completed\", result: reply.result, ...metadata };\n if (reply.type === \"failed\" &&\n typeof reply.code === \"string\" &&\n reply.code.length > 0 &&\n typeof reply.message === \"string\")\n return { type: \"failed\", code: reply.code, message: reply.message, ...metadata };\n if (reply.type === \"not_executed\" && rejectionReason(reply.reason))\n return { type: \"not_executed\", reason: reply.reason, ...metadata };\n }\n throw new ActorProtocolError(\"actor host response did not contain a valid outcome\");\n}\nfunction parseMetadata(reply) {\n if (!Object.hasOwn(reply, \"metadata\"))\n return {};\n const metadata = reply.metadata;\n if (!isRecord(metadata) ||\n !nonnegativeFiniteNumber(metadata.routingMs) ||\n !nonnegativeFiniteNumber(metadata.durationMs) ||\n (metadata.queueWaitMs !== null &&\n (!nonnegativeFiniteNumber(metadata.queueWaitMs) || metadata.queueWaitMs > metadata.durationMs)) ||\n (metadata.hostState !== \"cold\" && metadata.hostState !== \"warm\"))\n throw new ActorProtocolError(\"actor host response contained invalid latency metadata\");\n return {\n metadata: {\n routingMs: metadata.routingMs,\n durationMs: metadata.durationMs,\n queueWaitMs: metadata.queueWaitMs,\n hostState: metadata.hostState\n }\n };\n}\nfunction nonnegativeFiniteNumber(value) {\n return typeof value === \"number\" && Number.isFinite(value) && value >= 0;\n}\nfunction rejectionReason(value) {\n return value === \"host_unavailable\" || value === \"upstream_not_reached\";\n}\nexport function connectionRefused(error, ancestors = new Set()) {\n if (!isRecord(error) || ancestors.has(error))\n return false;\n const visited = new Set(ancestors).add(error);\n if (error.code !== undefined && error.code !== \"ECONNREFUSED\")\n return false;\n if (error.errors !== undefined)\n return (Array.isArray(error.errors) &&\n error.errors.length > 0 &&\n error.errors.every(cause => connectionRefused(cause, visited)));\n if (error.code === \"ECONNREFUSED\")\n return error.syscall === \"connect\";\n return connectionRefused(error.cause, visited);\n}\nexport async function responseDocument(response) {\n try {\n return await response.json();\n }\n catch (error) {\n throw new ActorProtocolError(`HTTP ${response.status} response was not valid JSON`, { cause: error });\n }\n}\nexport function isRecord(value) {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n", "runtime/http.d.ts": "import type { JsonValue } from \"./json.js\";\nexport declare function parseActorHostReply(reply: unknown): ActorHostReply;\nexport declare function connectionRefused(error: unknown, ancestors?: Set<unknown>): boolean;\nexport declare function responseDocument(response: Response): Promise<unknown>;\nexport declare function isRecord(value: unknown): value is Record<string, unknown>;\nexport interface ActorAddress {\n readonly projectId: string;\n readonly actorName: string;\n readonly actorId: string;\n}\nexport interface ActorInvocation extends ActorAddress {\n readonly requestId: string;\n readonly method: string;\n readonly args: readonly JsonValue[];\n}\ntype ActorRejectionReason = \"host_unavailable\" | \"upstream_not_reached\";\nexport interface ActorResponseMetadata {\n readonly routingMs: number;\n readonly durationMs: number;\n readonly queueWaitMs: number | null;\n readonly hostState: \"cold\" | \"warm\";\n}\nexport type ActorHostReply = ({\n readonly type: \"completed\";\n readonly result: unknown;\n} | {\n readonly type: \"failed\";\n readonly code: string;\n readonly message: string;\n} | {\n readonly type: \"unauthenticated\";\n} | {\n readonly type: \"not_executed\";\n readonly reason: ActorRejectionReason;\n}) & {\n readonly metadata?: ActorResponseMetadata;\n};\nexport {};\n", "runtime/settings.js": "import { ActorConfigurationError, ActorValidationError } from \"./errors.js\";\nexport function configuredSettings(value) {\n if (typeof value !== \"object\" ||\n value === null ||\n Array.isArray(value) ||\n Object.keys(value).some(key => ![\"projectId\", \"apiKey\", \"homeRegion\", \"controlPlaneUrl\"].includes(key)))\n throw new ActorConfigurationError(\"durable-actors client settings are invalid\");\n const options = value;\n const controlPlaneUrl = validateOrigin(options.controlPlaneUrl);\n const local = [\"localhost\", \"127.0.0.1\", \"[::1]\"].includes(new URL(controlPlaneUrl).hostname);\n const projectId = options.projectId ?? (local ? \"local\" : undefined);\n if (typeof projectId !== \"string\" || !/^[A-Za-z0-9._-]{1,64}$/u.test(projectId) || [\".\", \"..\"].includes(projectId))\n throw new ActorConfigurationError(\"durable-actors client settings are invalid: a valid projectId is required for remote connections\");\n if (options.apiKey !== undefined && (typeof options.apiKey !== \"string\" || !options.apiKey.trim()))\n throw new ActorConfigurationError(\"durable-actors client settings are invalid: apiKey must not be empty\");\n if (options.homeRegion !== undefined)\n validateActorComponent(\"home region\", options.homeRegion);\n return { projectId, credential: options.apiKey?.trim(), homeRegion: options.homeRegion, controlPlaneUrl };\n}\nexport function environmentSettings(environment = runtimeEnvironment()) {\n return {\n projectId: environment.DURABLE_ACTORS_PROJECT_ID,\n apiKey: environment.DURABLE_ACTORS_SECRET ??\n environment.DURABLE_ACTORS_API_KEY ??\n environment.DURABLE_ACTORS_INVOKE_API_KEY,\n homeRegion: environment.DURABLE_ACTORS_HOME_REGION,\n controlPlaneUrl: environment.DURABLE_ACTORS_CONTROL_PLANE_URL ?? \"http://127.0.0.1:7100\"\n };\n}\nexport function runtimeEnvironment() {\n return globalThis.process?.env ?? {};\n}\nexport function validateOrigin(origin) {\n let url;\n try {\n url = new URL(origin);\n }\n catch (error) {\n throw new ActorConfigurationError(`actor HTTP origin is invalid: ${origin}`, { cause: error });\n }\n if (!/^https?:$/u.test(url.protocol) ||\n !url.hostname ||\n url.username ||\n url.password ||\n url.pathname !== \"/\" ||\n url.search ||\n url.hash)\n throw new ActorConfigurationError(`actor URL must be an HTTP or HTTPS origin: ${origin}`);\n return url.origin;\n}\nexport function validateActorComponent(name, value) {\n if (typeof value !== \"string\" || !/^[A-Za-z0-9._-]+$/u.test(value) || value === \".\" || value === \"..\")\n throw new ActorValidationError(`${name} may contain only ASCII letters, digits, '.', '-', and '_' and must not be a path segment`);\n return value;\n}\nexport function projectActorPath(projectId, actorName, actorId) {\n return `/v1/projects/${encodeURIComponent(validateActorComponent(\"project ID\", projectId))}/actors/${encodeURIComponent(validateActorComponent(\"actor name\", actorName))}/${encodeURIComponent(validateActorComponent(\"actor ID\", actorId))}`;\n}\nexport function authorizationHeaders(credential) {\n return credential === undefined ? {} : { authorization: `Bearer ${credential}` };\n}\n", "runtime/settings.d.ts": "export interface DurableActorsClientOptions {\n readonly projectId?: string;\n readonly apiKey?: string;\n readonly homeRegion?: string;\n readonly controlPlaneUrl: string;\n}\nexport type Environment = Record<string, string | undefined>;\nexport declare function configuredSettings(value: unknown): {\n projectId: string;\n credential: string | undefined;\n homeRegion: string | undefined;\n controlPlaneUrl: string;\n};\nexport declare function environmentSettings(environment?: Environment): DurableActorsClientOptions;\nexport declare function runtimeEnvironment(): Environment;\nexport declare function validateOrigin(origin: string): string;\nexport declare function validateActorComponent(name: string, value: string): string;\nexport declare function projectActorPath(projectId: string, actorName: string, actorId: string): string;\nexport declare function authorizationHeaders(credential: string | undefined): Record<string, string>;\n", "runtime/telemetry.js": "class LatencyTimeline {\n now;\n origin;\n milestones = { started_at_ms: 0 };\n constructor(now = () => performance.now()) {\n this.now = now;\n this.origin = this.now();\n }\n mark(name) {\n this.milestones[`${name}_at_ms`] = Math.max(0, Math.round(this.now() - this.origin));\n }\n finish() {\n this.mark(\"completed\");\n return { ...this.milestones };\n }\n}\nexport { LatencyTimeline };\n", "runtime/telemetry.d.ts": "type TelemetryEvent = Record<string, boolean | number | string | undefined>;\ntype TelemetrySink = (event: TelemetryEvent) => void;\ndeclare class LatencyTimeline {\n private readonly now;\n private readonly origin;\n private readonly milestones;\n constructor(now?: () => number);\n mark(name: string): void;\n finish(): Record<string, number>;\n}\nexport { LatencyTimeline };\nexport type { TelemetryEvent, TelemetrySink };\n", "runtime/client.js": "import { ActorInvocationError, ActorProtocolError } from \"./errors.js\";\nimport { connectionRefused, isRecord, parseActorHostReply, responseDocument } from \"./http.js\";\nimport { cloneJson } from \"./json.js\";\nimport { authorizationHeaders, configuredSettings, environmentSettings, projectActorPath, runtimeEnvironment, validateActorComponent } from \"./settings.js\";\nimport { LatencyTimeline } from \"./telemetry.js\";\nexport class HttpActorClient {\n settingsValue;\n environment;\n fetchRequest;\n requestId;\n monotonicNow;\n telemetry;\n constructor(options, dependencies = {}) {\n this.environment = dependencies.environment ?? runtimeEnvironment();\n this.fetchRequest = dependencies.fetch ?? globalThis.fetch;\n this.requestId = dependencies.requestId ?? (() => globalThis.crypto.randomUUID());\n this.monotonicNow = dependencies.monotonicNow ?? (() => performance.now());\n this.telemetry = dependencies.telemetry ?? (() => { });\n this.settingsValue = options === undefined ? undefined : configuredSettings(options);\n }\n async invoke(actorName, actorId, method, args) {\n const requestId = validateActorComponent(\"request ID\", this.requestId());\n const timeline = new LatencyTimeline(this.monotonicNow);\n let outcome = \"failed\";\n try {\n const invocation = this.invocation(requestId, actorName, actorId, method, args);\n timeline.mark(\"invocation_built\");\n const result = await this.invokeAttempt(invocation, true, timeline);\n outcome = \"completed\";\n return result;\n }\n finally {\n this.telemetry({\n event: \"actor_client_invocation\",\n request_id: requestId,\n actor_name: actorName,\n actor_id: actorId,\n method,\n ...timeline.finish(),\n outcome\n });\n }\n }\n async invokeAttempt(invocation, retryAvailable, timeline) {\n const reply = await this.resolveAndInvoke(invocation);\n timeline.mark(\"control_plane_invocation_completed\");\n if (reply.type === \"completed\")\n return reply.result;\n if (reply.type === \"failed\")\n throw new ActorInvocationError(reply.code, invocation.requestId, reply.message);\n if (!retryAvailable)\n throw new ActorInvocationError(reply.type === \"unauthenticated\" ? \"unauthenticated\" : \"unavailable\", invocation.requestId, \"actor host rejected the invocation before execution after recovery\");\n return this.invokeAttempt(invocation, false, timeline);\n }\n async resolveAndInvoke(invocation) {\n let response;\n try {\n response = await this.fetchRequest(`${this.settings.controlPlaneUrl}${projectActorPath(this.settings.projectId, invocation.actorName, invocation.actorId)}/invoke`, {\n method: \"POST\",\n redirect: \"manual\",\n headers: {\n accept: \"application/json\",\n ...authorizationHeaders(this.settings.credential),\n \"x-request-id\": invocation.requestId,\n \"content-type\": \"application/json\"\n },\n body: JSON.stringify({\n requestId: invocation.requestId,\n method: invocation.method,\n args: invocation.args,\n homeRegion: this.settings.homeRegion\n })\n });\n }\n catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n if (connectionRefused(error))\n throw new ActorInvocationError(\"unavailable\", invocation.requestId, `could not connect to ${this.settings.controlPlaneUrl}: ${message}`);\n throw new ActorInvocationError(\"outcome_unknown\", invocation.requestId, `control-plane invocation failed after it may have been dispatched: ${message}`);\n }\n const document = await responseDocument(response);\n if (!response.ok)\n this.throwResponseFailure(response, document, invocation.requestId);\n if (!isRecord(document))\n throw new ActorProtocolError(\"control-plane response did not contain an invocation outcome\");\n const reply = isRecord(document.outcome) && document.outcome.type === \"unauthenticated\"\n ? { type: \"unauthenticated\" }\n : parseActorHostReply(document.outcome);\n return reply;\n }\n throwResponseFailure(response, document, requestId) {\n if (response.status === 401 || response.status === 403)\n throw new ActorInvocationError(\"unauthenticated\", requestId, \"the durable-actors application credential was rejected\");\n const failure = isRecord(document) ? document.error : undefined;\n if (!isRecord(failure) ||\n typeof failure.code !== \"string\" ||\n !failure.code ||\n typeof failure.message !== \"string\")\n throw new ActorProtocolError(`control-plane HTTP ${response.status} response did not contain a valid error`);\n throw new ActorInvocationError(failure.code, typeof failure.requestId === \"string\" ? failure.requestId : requestId, failure.message);\n }\n invocation(requestId, actorName, actorId, method, args) {\n return {\n requestId,\n projectId: this.settings.projectId,\n actorName: validateActorComponent(\"actor name\", actorName),\n actorId: validateActorComponent(\"actor ID\", actorId),\n method: validateActorComponent(\"actor method\", method),\n args: this.jsonArguments(args)\n };\n }\n get settings() {\n if (this.settingsValue !== undefined)\n return this.settingsValue;\n this.settingsValue = configuredSettings(environmentSettings(this.environment));\n return this.settingsValue;\n }\n jsonArguments(args) {\n const value = cloneJson(args, \"actor arguments\");\n if (!Array.isArray(value))\n throw new ActorProtocolError(\"actor arguments must be a JSON array\");\n return value;\n }\n}\n", "runtime/client.d.ts": "import { configuredSettings } from \"./settings.js\";\nimport type { DurableActorsClientOptions, Environment } from \"./settings.js\";\nimport type { TelemetrySink } from \"./telemetry.js\";\nexport declare class HttpActorClient {\n private settingsValue;\n protected readonly environment: Environment;\n protected readonly fetchRequest: typeof globalThis.fetch;\n protected readonly requestId: () => string;\n protected readonly monotonicNow: () => number;\n protected readonly telemetry: TelemetrySink;\n constructor(options?: DurableActorsClientOptions, dependencies?: HttpActorClientDependencies);\n invoke(actorName: string, actorId: string, method: string, args: readonly unknown[]): Promise<unknown>;\n private invokeAttempt;\n private resolveAndInvoke;\n private throwResponseFailure;\n private invocation;\n protected get settings(): RemoteActorSettings;\n private jsonArguments;\n}\ntype RemoteActorSettings = ReturnType<typeof configuredSettings>;\nexport interface HttpActorClientDependencies {\n readonly environment?: Environment;\n readonly fetch?: typeof globalThis.fetch;\n readonly requestId?: () => string;\n readonly monotonicNow?: () => number;\n readonly telemetry?: TelemetrySink;\n}\nexport type { DurableActorsClientOptions };\n", "runtime/proxy.js": "import { ActorProtocolError, ActorSerializationError, ActorValidationError } from \"./errors.js\";\nimport { isRecord } from \"./http.js\";\nimport { authorizationHeaders, configuredSettings, environmentSettings, projectActorPath, validateActorComponent } from \"./settings.js\";\n/** Issues browser connection URLs from your backend. */\nclass SocketProxy {\n actors;\n projectId;\n origin;\n apiKey;\n setupTimeoutMs;\n fetchRequest;\n constructor(actors, options = {}, dependencies = {}) {\n this.actors = actors;\n this.setupTimeoutMs = options.setupTimeoutMs ?? 180000;\n if (!Number.isSafeInteger(this.setupTimeoutMs) || this.setupTimeoutMs < 1000 || this.setupTimeoutMs > 600000)\n throw new Error(\"Socket setup timeout must be between one second and ten minutes\");\n const settings = configuredSettings(proxySettings(options));\n this.origin = settings.controlPlaneUrl;\n this.apiKey = settings.credential;\n this.projectId = settings.projectId;\n this.fetchRequest = dependencies.fetch ?? globalThis.fetch;\n }\n /**\n * Call after authenticating the user and checking actor access.\n * Pass `websocketUrl` to the browser's `new WebSocket()`.\n */\n async handle(authorization) {\n const actorName = validateActorComponent(\"actor name\", authorization.actorName);\n const actorId = validateActorComponent(\"actor ID\", authorization.actorId);\n if (!Object.hasOwn(this.actors, actorName))\n throw new Error(`Unknown actor name: ${actorName}`);\n const metadata = socketMetadata(authorization.metadata);\n const homeRegion = authorization.homeRegion === undefined\n ? undefined\n : validateActorComponent(\"home region\", authorization.homeRegion);\n const response = await this.fetchRequest(`${this.origin}${projectActorPath(this.projectId, actorName, actorId)}/find-websocket`, {\n method: \"POST\",\n redirect: \"manual\",\n headers: { ...authorizationHeaders(this.apiKey), \"content-type\": \"application/json\" },\n body: JSON.stringify({ metadata, homeRegion }),\n signal: AbortSignal.timeout(this.setupTimeoutMs)\n });\n if (!response.ok)\n throw new Error(`WebSocket authorization could not be issued (HTTP ${response.status})`);\n return socketGrant(await response.json());\n }\n}\nfunction proxySettings(options) {\n const environment = environmentSettings();\n const controlPlaneUrl = options.controlPlaneUrl ?? environment.controlPlaneUrl;\n const apiKey = options.apiKey ?? environment.apiKey;\n return {\n projectId: options.projectId ?? environment.projectId,\n controlPlaneUrl: controlPlaneUrl ?? \"http://127.0.0.1:7100\",\n apiKey\n };\n}\nexport { SocketProxy };\nfunction socketGrant(value) {\n if (!isRecord(value) ||\n typeof value.websocketUrl !== \"string\" ||\n !URL.canParse(value.websocketUrl) ||\n !/^wss?:$/u.test(new URL(value.websocketUrl).protocol) ||\n typeof value.homeRegion !== \"string\" ||\n !value.homeRegion ||\n !Number.isSafeInteger(value.connectByMs))\n throw new ActorProtocolError(\"invalid WebSocket authorization response\");\n return {\n websocketUrl: value.websocketUrl,\n homeRegion: value.homeRegion,\n connectByMs: value.connectByMs\n };\n}\nfunction socketMetadata(value) {\n let encoded;\n try {\n encoded = JSON.stringify(value);\n if (!isJsonValue(value))\n throw new Error(\"invalid JSON value\");\n }\n catch (error) {\n throw new ActorSerializationError(\"socket metadata must be a JSON value\", { cause: error });\n }\n if (new TextEncoder().encode(encoded).length > 16 * 1024)\n throw new ActorValidationError(\"socket metadata exceeds 16384 bytes\");\n return value;\n}\nfunction isJsonValue(value) {\n if (value === null || typeof value === \"string\" || typeof value === \"boolean\")\n return true;\n if (typeof value === \"number\")\n return Number.isFinite(value);\n if (Array.isArray(value))\n return Array.from(value).every(isJsonValue);\n return (isRecord(value) &&\n [Object.prototype, null].includes(Object.getPrototypeOf(value)) &&\n Object.values(value).every(isJsonValue));\n}\n", "runtime/proxy.d.ts": "/** Overrides for the backend's DURABLE_ACTORS environment settings. */\ninterface SocketProxyOptions {\n readonly projectId?: string;\n readonly controlPlaneUrl?: string;\n readonly apiKey?: string;\n /** Defaults to 180000 ms; accepts 1000–600000 ms. */\n readonly setupTimeoutMs?: number;\n}\ninterface SocketProxyDependencies {\n readonly fetch?: typeof globalThis.fetch;\n}\ninterface ProxyActor<Metadata = unknown> {\n readonly types?: Metadata;\n}\n/** Actor access your backend has already authorized. */\ntype SocketAuthorization<Actors extends Record<string, ProxyActor>> = {\n [Name in keyof Actors & string]: {\n readonly actorName: Name;\n readonly actorId: string;\n readonly metadata: Actors[Name] extends ProxyActor<infer Metadata> ? Metadata : never;\n readonly homeRegion?: string;\n };\n}[keyof Actors & string];\n/** Browser connection URL and admission deadline in Unix milliseconds. Treat the URL as a credential. */\ninterface SocketGrant {\n websocketUrl: string;\n homeRegion: string;\n connectByMs: number;\n}\n/** Issues browser connection URLs from your backend. */\ndeclare class SocketProxy<Actors extends Record<string, ProxyActor>> {\n private readonly actors;\n private readonly projectId;\n private readonly origin;\n private readonly apiKey;\n private readonly setupTimeoutMs;\n private readonly fetchRequest;\n constructor(actors: Actors, options?: SocketProxyOptions, dependencies?: SocketProxyDependencies);\n /**\n * Call after authenticating the user and checking actor access.\n * Pass `websocketUrl` to the browser's `new WebSocket()`.\n */\n handle(authorization: SocketAuthorization<Actors>): Promise<SocketGrant>;\n}\nexport { SocketProxy };\nexport type { ProxyActor, SocketAuthorization, SocketGrant, SocketProxyDependencies, SocketProxyOptions };\n", "runtime/stub.js": "import { HttpActorClient } from \"./client.js\";\nimport { ActorDefinitionError, ActorSerializationError } from \"./errors.js\";\nimport { validateActorComponent } from \"./settings.js\";\n/** Creates a backend client from generated method definitions. */\nfunction createActorStub(actorName, actorId, methods, transport) {\n validateActorComponent(\"actor name\", actorName);\n validateActorComponent(\"actor ID\", actorId);\n const stub = Object.create(null);\n for (const method of methods) {\n validateActorComponent(\"actor method\", method.name);\n if ([\n \"then\",\n \"connect\",\n \"broadcast\",\n \"db\",\n \"alarm\",\n \"onConnect\",\n \"onMessage\",\n \"onDisconnect\",\n \"onAlarm\"\n ].includes(method.name))\n throw new ActorDefinitionError(`actor method ${actorName}.${method.name} is reserved`);\n if (Object.hasOwn(stub, method.name))\n throw new ActorDefinitionError(`duplicate actor method ${actorName}.${method.name}`);\n Object.defineProperty(stub, method.name, {\n enumerable: true,\n value: async (...args) => {\n const parameters = invocationArguments(args);\n const client = transport ?? defaultTransport();\n const result = await client.invoke(actorName, actorId, method.name, parameters);\n return method.result === \"void\" ? undefined : result;\n }\n });\n }\n return stub;\n}\nexport { createActorStub };\nlet shared;\nexport function createActorTransport(options) {\n return new HttpActorClient(options);\n}\nfunction defaultTransport() {\n return (shared ??= new HttpActorClient());\n}\nfunction invocationArguments(args) {\n let end = args.length;\n while (end > 0 && args[end - 1] === undefined)\n end--;\n const parameters = args.slice(0, end);\n if (parameters.includes(undefined))\n throw new ActorSerializationError(\"undefined cannot precede a supplied RPC argument in JSON transport\");\n return parameters;\n}\n", "runtime/stub.d.ts": "import type { DurableActorsClientOptions } from \"./settings.js\";\ninterface ActorRpcTransport {\n invoke(actorName: string, actorId: string, method: string, args: readonly unknown[]): Promise<unknown>;\n}\ninterface ActorRpcMethod {\n readonly name: string;\n readonly result: \"void\" | \"value\";\n}\n/** Creates a backend client from generated method definitions. */\ndeclare function createActorStub<Stub extends object>(actorName: string, actorId: string, methods: readonly ActorRpcMethod[], transport?: ActorRpcTransport): Stub;\nexport { createActorStub };\nexport type { ActorRpcMethod, ActorRpcTransport };\nexport declare function createActorTransport(options: DurableActorsClientOptions): ActorRpcTransport;\nexport type { DurableActorsClientOptions };\n", "runtime/session.js": "import { HttpActorClient } from \"./client.js\";\nimport { ActorSessionRejectedError } from \"./errors.js\";\nimport { validateActorComponent, validateOrigin } from \"./settings.js\";\nexport { ActorSessionRejectedError } from \"./errors.js\";\n/**\n * Reuses actor targets and renews runtime-issued sessions through a trusted backend.\n * Sessions require an HTTPS origin (except localhost) and at most five minutes of validity.\n * Renewal stops after a minute without invocations; dispose cancels it immediately.\n */\nexport class ActorSessionTransport {\n options;\n transport;\n expiresAtMs = 0;\n lastUsedAt = 0;\n pending;\n cancel;\n closed = false;\n now;\n createTransport;\n schedule;\n constructor(options, dependencies = {}) {\n this.options = options;\n validateActorComponent(\"project ID\", options.projectId);\n this.now = dependencies.now ?? (() => performance.timeOrigin + performance.now());\n this.createTransport = dependencies.createTransport ?? (settings => new HttpActorClient(settings));\n this.schedule = dependencies.schedule ?? scheduleRefresh;\n }\n async invoke(actorName, actorId, method, args) {\n if (this.closed)\n throw new Error(\"Actor session transport is disposed\");\n this.lastUsedAt = this.now();\n const transport = this.transport && this.expiresAtMs > this.now() + 5_000 ? this.transport : await this.refresh();\n return transport.invoke(actorName, actorId, method, args);\n }\n dispose() {\n this.closed = true;\n this.cancel?.();\n this.transport = undefined;\n }\n refresh() {\n if (this.pending)\n return this.pending;\n this.cancel?.();\n this.pending = this.exchange().finally(() => {\n this.pending = undefined;\n });\n return this.pending;\n }\n async exchange() {\n let session;\n try {\n session = await this.options.getSession();\n }\n catch (error) {\n if (error instanceof ActorSessionRejectedError) {\n this.transport = undefined;\n this.expiresAtMs = 0;\n }\n throw error;\n }\n const remaining = this.validateSession(session);\n if (this.closed)\n throw new Error(\"Actor session transport is disposed\");\n const transport = this.createTransport({\n projectId: session.projectId,\n controlPlaneUrl: session.controlPlaneUrl,\n apiKey: session.token\n });\n this.transport = transport;\n this.expiresAtMs = session.expiresAtMs;\n this.scheduleRenewal(remaining * (0.75 + Math.random() * 0.05));\n return transport;\n }\n validateSession(session) {\n if (!session ||\n session.projectId !== this.options.projectId ||\n typeof session.token !== \"string\" ||\n !session.token.trim() ||\n !Number.isSafeInteger(session.expiresAtMs))\n throw new Error(\"Invalid actor session\");\n const origin = new URL(validateOrigin(session.controlPlaneUrl));\n if (origin.protocol !== \"https:\" && ![\"localhost\", \"127.0.0.1\", \"[::1]\"].includes(origin.hostname))\n throw new Error(\"Actor sessions require HTTPS outside localhost\");\n const remaining = session.expiresAtMs - this.now();\n if (remaining <= 5_000 || remaining > 305_000)\n throw new Error(\"Actor session is expired or invalid\");\n return remaining;\n }\n scheduleRenewal(delayMs) {\n this.cancel = this.schedule(() => {\n if (this.closed || this.now() - this.lastUsedAt >= 60_000)\n return;\n void this.refresh().catch(() => {\n if (!this.closed && this.expiresAtMs > this.now() + 5_000)\n this.scheduleRenewal(5_000);\n });\n }, delayMs);\n }\n}\nexport function createActorSessionTransport(options) {\n return new ActorSessionTransport(options);\n}\nfunction scheduleRefresh(callback, delayMs) {\n const timer = setTimeout(callback, delayMs);\n timer.unref?.();\n return () => clearTimeout(timer);\n}\n", "runtime/session.d.ts": "import type { DurableActorsClientOptions } from \"./settings.js\";\nimport type { ActorRpcTransport } from \"./stub.js\";\nexport interface ActorSession {\n readonly projectId: string;\n readonly controlPlaneUrl: string;\n readonly token: string;\n readonly expiresAtMs: number;\n}\nexport interface ActorSessionTransportOptions {\n readonly projectId: string;\n /** Reauthenticate with your application backend. Throw ActorSessionRejectedError on an explicit denial. */\n readonly getSession: () => Promise<ActorSession>;\n}\nexport interface ActorSessionTransportDependencies {\n readonly now?: () => number;\n readonly createTransport?: (options: DurableActorsClientOptions) => ActorRpcTransport;\n readonly schedule?: (callback: () => void, delayMs: number) => () => void;\n}\nexport { ActorSessionRejectedError } from \"./errors.js\";\n/**\n * Reuses actor targets and renews runtime-issued sessions through a trusted backend.\n * Sessions require an HTTPS origin (except localhost) and at most five minutes of validity.\n * Renewal stops after a minute without invocations; dispose cancels it immediately.\n */\nexport declare class ActorSessionTransport implements ActorRpcTransport {\n private readonly options;\n private transport;\n private expiresAtMs;\n private lastUsedAt;\n private pending;\n private cancel;\n private closed;\n private readonly now;\n private readonly createTransport;\n private readonly schedule;\n constructor(options: ActorSessionTransportOptions, dependencies?: ActorSessionTransportDependencies);\n invoke(actorName: string, actorId: string, method: string, args: readonly unknown[]): Promise<unknown>;\n dispose(): void;\n private refresh;\n private exchange;\n private validateSession;\n private scheduleRenewal;\n}\nexport declare function createActorSessionTransport(options: ActorSessionTransportOptions): ActorSessionTransport;\n", "runtime/index.browser.js": "const createActorStub = () => {\n throw new Error(\"actors must be used on the server\");\n};\nconst createActorTransport = () => {\n throw new Error(\"actors must be used on the server\");\n};\nconst createActorSessionTransport = () => {\n throw new Error(\"actors must be used on the server\");\n};\nconst SocketProxy = class {\n constructor() {\n throw new Error(\"ActorProxy must be used on the server\");\n }\n};\nexport { createActorStub, createActorTransport, createActorSessionTransport, SocketProxy };\nexport { ActorInvocationError, ActorSessionRejectedError } from \"./errors.js\";\n", "runtime/index.browser.d.ts": "import type { SocketProxy as ServerProxy } from \"./proxy.js\";\nimport type { createActorSessionTransport as ServerSessionTransport } from \"./session.js\";\nimport type { createActorStub as ServerStub, createActorTransport as ServerTransport } from \"./stub.js\";\ndeclare const createActorStub: typeof ServerStub;\ndeclare const createActorTransport: typeof ServerTransport;\ndeclare const createActorSessionTransport: typeof ServerSessionTransport;\ndeclare const SocketProxy: typeof ServerProxy;\nexport { createActorStub, createActorTransport, createActorSessionTransport, SocketProxy };\nexport { ActorInvocationError, ActorSessionRejectedError } from \"./errors.js\";\nexport type { ActorSession, ActorSessionTransportOptions, ActorSessionTransport } from \"./session.js\";\n", "runtime/index.js": "export { createActorStub, createActorTransport } from \"./stub.js\";\nexport { createActorSessionTransport, ActorSessionRejectedError } from \"./session.js\";\nexport { ActorInvocationError } from \"./errors.js\";\nexport { SocketProxy } from \"./proxy.js\";\n", "runtime/index.d.ts": "export { createActorStub, createActorTransport } from \"./stub.js\";\nexport { createActorSessionTransport, ActorSessionRejectedError } from \"./session.js\";\nexport type { ActorSession, ActorSessionTransportOptions, ActorSessionTransport } from \"./session.js\";\nexport type { ActorRpcTransport, DurableActorsClientOptions } from \"./stub.js\";\nexport { ActorInvocationError } from \"./errors.js\";\nexport { SocketProxy } from \"./proxy.js\";\nexport type { ProxyActor, SocketGrant, SocketProxyDependencies, SocketProxyOptions } from \"./proxy.js\";\n", "runtime/package.json": "{\n \"private\": true,\n \"type\": \"module\",\n \"sideEffects\": false,\n \"browser\": {\n \"./index.js\": \"./index.browser.js\"\n }\n}\n", "runtime/LICENSE.md": "MIT License\n\nCopyright (c) 2026 Terse\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" };
|
|
2
2
|
//# sourceMappingURL=client-runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-runtime.js","sourceRoot":"","sources":["../../src/generated/client-runtime.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAA2B,EAAC,mBAAmB,EAAC,qgEAAqgE,EAAC,qBAAqB,EAAC,gjDAAgjD,EAAC,iBAAiB,EAAC,4iBAA4iB,EAAC,mBAAmB,EAAC,0TAA0T,EAAC,iBAAiB,EAAC,06FAA06F,EAAC,mBAAmB,EAAC,01CAA01C,EAAC,qBAAqB,EAAC,
|
|
1
|
+
{"version":3,"file":"client-runtime.js","sourceRoot":"","sources":["../../src/generated/client-runtime.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAA2B,EAAC,mBAAmB,EAAC,qgEAAqgE,EAAC,qBAAqB,EAAC,gjDAAgjD,EAAC,iBAAiB,EAAC,4iBAA4iB,EAAC,mBAAmB,EAAC,0TAA0T,EAAC,iBAAiB,EAAC,06FAA06F,EAAC,mBAAmB,EAAC,01CAA01C,EAAC,qBAAqB,EAAC,6yGAA6yG,EAAC,uBAAuB,EAAC,08BAA08B,EAAC,sBAAsB,EAAC,ycAAyc,EAAC,wBAAwB,EAAC,+bAA+b,EAAC,mBAAmB,EAAC,kuMAAkuM,EAAC,qBAAqB,EAAC,gyCAAgyC,EAAC,kBAAkB,EAAC,62IAA62I,EAAC,oBAAoB,EAAC,62DAA62D,EAAC,iBAAiB,EAAC,onEAAonE,EAAC,mBAAmB,EAAC,0wBAA0wB,EAAC,oBAAoB,EAAC,6rIAA6rI,EAAC,sBAAsB,EAAC,m6DAAm6D,EAAC,0BAA0B,EAAC,0mBAA0mB,EAAC,4BAA4B,EAAC,ixBAAixB,EAAC,kBAAkB,EAAC,sQAAsQ,EAAC,oBAAoB,EAAC,8iBAA8iB,EAAC,sBAAsB,EAAC,qJAAqJ,EAAC,oBAAoB,EAAC,ijCAAijC,EAAC,CAAA"}
|
|
@@ -15,6 +15,7 @@ declare class ActorRuntime {
|
|
|
15
15
|
private sequence;
|
|
16
16
|
private lastCompletedState;
|
|
17
17
|
private fatal;
|
|
18
|
+
private readonly emitted;
|
|
18
19
|
constructor(definition: ActorDefinition, allowNextInvocation: () => void, database: DatabaseProxy, publish?: SocketPublisher | undefined, connections?: SocketSource);
|
|
19
20
|
handle(command: ActorWorkerCommand): Promise<ActorExecutorReply>;
|
|
20
21
|
close(isGracefuleShutdown: boolean): Promise<void>;
|
|
@@ -28,6 +29,7 @@ declare class ActorRuntime {
|
|
|
28
29
|
private restoreInstance;
|
|
29
30
|
private stateUpdates;
|
|
30
31
|
private reset;
|
|
32
|
+
private socketState;
|
|
31
33
|
private createInstance;
|
|
32
34
|
}
|
|
33
35
|
declare function snapshotActorState(instance: object, schema: ActorSchema): JsonObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actor-runtime.d.ts","sourceRoot":"","sources":["../../src/host/actor-runtime.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAY,MAAM,mBAAmB,CAAA;AAKlE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,C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QAAQ,EAAE,aAAa,EACvB,OAAO,CAAC,EAAE,eAAe,YAAA,EACzB,WAAW,GAAE,YAE7B;IAUC,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAwBhE,KAAK,CAAC,mBAAmB,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAKlD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAa/B,OAAO,KAAK,WAAW,GAEtB;IAED,OAAO,CAAC,eAAe;YAIT,MAAM;YAuDN,iBAAiB;IAwD/B,OAAO,CAAC,SAAS;YAIH,OAAO;YAKP,eAAe;IAK7B,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,WAAW;YAIL,cAAc;CAqB/B;AAiHD,iBAAS,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,UAAU,CAQ7E;AAED,iBAAS,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAczF;AAgBD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -19,6 +19,7 @@ class ActorRuntime {
|
|
|
19
19
|
sequence = 0;
|
|
20
20
|
lastCompletedState;
|
|
21
21
|
fatal;
|
|
22
|
+
emitted;
|
|
22
23
|
constructor(definition, allowNextInvocation, database, publish, connections = async () => {
|
|
23
24
|
throw new Error("actor connection lookup is unavailable");
|
|
24
25
|
}) {
|
|
@@ -28,6 +29,7 @@ class ActorRuntime {
|
|
|
28
29
|
this.publish = publish;
|
|
29
30
|
this.connections = connections;
|
|
30
31
|
this.schemas = { ...definition.schemas, contract: definition.state.contract };
|
|
32
|
+
this.emitted = emittableFields(definition.state).map(field => field.name);
|
|
31
33
|
if (this.interleaved)
|
|
32
34
|
database.rejectTransactions(`${definition.actorName} uses @Interleave, so overlapping calls cannot share an explicit database transaction`);
|
|
33
35
|
}
|
|
@@ -89,7 +91,7 @@ class ActorRuntime {
|
|
|
89
91
|
if (typeof method !== "function") {
|
|
90
92
|
return failedReply("method_not_callable", `actor method ${this.definition.actorName}.${command.method} is not callable`);
|
|
91
93
|
}
|
|
92
|
-
const before = this.
|
|
94
|
+
const before = this.socketState();
|
|
93
95
|
try {
|
|
94
96
|
this.admitNext(command.method);
|
|
95
97
|
const execution = await runWithActorSockets(instance, this.connections, async () => runWithActorDatabase(instance, async () => Reflect.apply(method, instance, command.args)), this.publish, this.schemas);
|
|
@@ -97,7 +99,7 @@ class ActorRuntime {
|
|
|
97
99
|
if (this.fatal !== undefined)
|
|
98
100
|
return this.fatal;
|
|
99
101
|
validateActorState(instance, this.definition.state);
|
|
100
|
-
const state = this.
|
|
102
|
+
const state = this.socketState();
|
|
101
103
|
const effects = [...execution.effects, ...this.stateUpdates(before, state)];
|
|
102
104
|
this.database.commit();
|
|
103
105
|
return {
|
|
@@ -122,7 +124,7 @@ class ActorRuntime {
|
|
|
122
124
|
const instance = await this.prepare(command);
|
|
123
125
|
const methodName = lifecycleMethod(command);
|
|
124
126
|
const method = Reflect.get(instance, methodName);
|
|
125
|
-
const before = this.
|
|
127
|
+
const before = this.socketState();
|
|
126
128
|
try {
|
|
127
129
|
this.admitNext(methodName);
|
|
128
130
|
const execution = await runWithActorSockets(instance, this.connections, async (scope) => {
|
|
@@ -136,7 +138,7 @@ class ActorRuntime {
|
|
|
136
138
|
if (this.fatal !== undefined)
|
|
137
139
|
return this.fatal;
|
|
138
140
|
validateActorState(instance, this.definition.state);
|
|
139
|
-
const state = this.
|
|
141
|
+
const state = this.socketState();
|
|
140
142
|
const effects = [
|
|
141
143
|
...execution.effects,
|
|
142
144
|
...this.stateUpdates(before, state, command.event.type === "connect" ? command.event.connection.id : undefined)
|
|
@@ -181,16 +183,23 @@ class ActorRuntime {
|
|
|
181
183
|
reset() {
|
|
182
184
|
this.instance = undefined;
|
|
183
185
|
}
|
|
186
|
+
// Socket effects only compare and send emitted fields, so only those are read per call.
|
|
187
|
+
socketState() {
|
|
188
|
+
return this.emitted.length === 0 ? {} : this.database.fields(this.emitted);
|
|
189
|
+
}
|
|
184
190
|
async createInstance(identity, state) {
|
|
185
191
|
const context = RuntimeActorContext.runtime(identity.actor_id, this.database);
|
|
186
192
|
const instance = context.construct(this.definition.actorClass);
|
|
187
193
|
validateActorState(instance, this.definition.state);
|
|
194
|
+
const stored = state === null ? {} : persistedState(state);
|
|
188
195
|
if (state !== null)
|
|
189
|
-
hydrateActorState(instance,
|
|
190
|
-
|
|
196
|
+
hydrateActorState(instance, stored, this.definition.state);
|
|
197
|
+
const unsaved = unsavedState(instance, stored, this.definition.state);
|
|
198
|
+
if (Object.keys(unsaved).length > 0)
|
|
199
|
+
this.database.initializeFields(unsaved);
|
|
191
200
|
bindPersistedFields(instance, context, this.definition.state, this.database);
|
|
192
201
|
if (this.interleaved)
|
|
193
|
-
this.lastCompletedState = this.
|
|
202
|
+
this.lastCompletedState = this.socketState();
|
|
194
203
|
this.instance = instance;
|
|
195
204
|
const resources = this.definition.state.fields.filter(field => field.resource);
|
|
196
205
|
await runWithActorDatabase(instance, async () => {
|
|
@@ -272,6 +281,14 @@ function persistedState(value) {
|
|
|
272
281
|
}
|
|
273
282
|
return value;
|
|
274
283
|
}
|
|
284
|
+
// Fields the database doesn't hold yet, such as a default for a field added since the last write.
|
|
285
|
+
function unsavedState(instance, stored, schema) {
|
|
286
|
+
return cloneJsonObject(Object.fromEntries(schema.fields
|
|
287
|
+
.filter(field => field.persistence === Persistence.Persisted &&
|
|
288
|
+
Object.hasOwn(instance, field.name) &&
|
|
289
|
+
!Object.hasOwn(stored, field.name))
|
|
290
|
+
.map(field => [field.name, Reflect.get(instance, field.name)])), "actor state");
|
|
291
|
+
}
|
|
275
292
|
function snapshotActorState(instance, schema) {
|
|
276
293
|
validateActorState(instance, schema);
|
|
277
294
|
const state = Object.fromEntries(schema.fields
|
|
@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ts
CHANGED
|
@@ -23,6 +23,7 @@ type DatabaseCall = {
|
|
|
23
23
|
readonly immediate: boolean;
|
|
24
24
|
} | {
|
|
25
25
|
readonly op: "fields";
|
|
26
|
+
readonly names?: readonly string[];
|
|
26
27
|
} | {
|
|
27
28
|
readonly op: "initialize_fields";
|
|
28
29
|
readonly fields: JsonObject;
|
|
@@ -81,7 +82,7 @@ declare class DatabaseProxy implements RuntimeActorDatabase, ActorAlarmStorage {
|
|
|
81
82
|
transaction<T>(operation: () => Promise<T>): Promise<T>;
|
|
82
83
|
rejectTransactions(reason: string): void;
|
|
83
84
|
onFieldRestore(name: string, restore: FieldRestore): void;
|
|
84
|
-
fields(): JsonObject;
|
|
85
|
+
fields(names?: readonly string[]): JsonObject;
|
|
85
86
|
getAlarmState(): ActorAlarmState;
|
|
86
87
|
setAlarm(timestampMs: number): void;
|
|
87
88
|
deleteAlarm(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/host/database.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAE/F,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEvD,KAAK,aAAa,GACZ;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAA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,EAAE,MAAM,GAAG,IAAI;IAIxC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI;IAKzD,MAAM,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,UAAU;IAM7C,aAAa,IAAI,eAAe;IAMhC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAInC,WAAW,IAAI,IAAI;IAInB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAI1C,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,IAAI;IAS9D,MAAM,IAAI,IAAI;IASd,QAAQ,IAAI,IAAI;IAMhB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,UAAU;IAgBlB,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,aAAa;CAKxB;AAmCD,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,CAAA;AAC7C,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAA"}
|
package/dist/host/database.js
CHANGED
|
@@ -52,8 +52,9 @@ class DatabaseProxy {
|
|
|
52
52
|
onFieldRestore(name, restore) {
|
|
53
53
|
this.fieldRestores.set(name, restore);
|
|
54
54
|
}
|
|
55
|
-
fields
|
|
56
|
-
|
|
55
|
+
// With names, only those fields cross from the host: a field read moves its whole value.
|
|
56
|
+
fields(names) {
|
|
57
|
+
const result = this.transport(names === undefined ? { op: "fields" } : { op: "fields", names });
|
|
57
58
|
if (result.type !== "fields")
|
|
58
59
|
throw unexpected(result);
|
|
59
60
|
return result.fields;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.js","sourceRoot":"","sources":["../../src/host/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,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I,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAA;IACjE,CAAC;AACL,CAAC;AAED,SAAS,UAAU,CAAC,MAAsB;IACtC,OAAO,IAAI,KAAK,CAAC,oCAAoC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;AACvE,CAAC;AAED,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "durable-actors",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Provider-neutral actors for sandbox compute",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"@types/json-schema": "^7.0.15",
|
|
105
105
|
"ajv": "^8.20.0",
|
|
106
106
|
"commander": "^14.0.3",
|
|
107
|
-
"durable-actors-observer": "0.
|
|
107
|
+
"durable-actors-observer": "0.16.0",
|
|
108
108
|
"esbuild": "^0.28.2",
|
|
109
109
|
"import-meta-resolve": "^4.2.0",
|
|
110
110
|
"open": "^10.2.0",
|