{"version":3,"file":"action-ByfetSqU.mjs","names":["ActionRouter","encodeExchange","decodeExchangeRequest"],"sources":["../../connect-core/build/validation-D2CnYD4a.mjs","../../connect-core/build/httpAcceptorCarrier-DY2vBLvO.mjs","../../connect-core/build/action/index.mjs"],"sourcesContent":["import { m as err, p as err_nice } from \"./error-BFAEkmpX.mjs\";\nimport { StatusCodes } from \"http-status-codes\";\n//#region src/common-errors/validation/standard_schema/extractMessageFromStandardSchema.ts\nfunction extractPathFromIssue(issue) {\n\tlet pathString = \"\";\n\tfor (const segment of issue) if (typeof segment === \"object\") {\n\t\tif (segment.key != null) if (typeof segment.key === \"number\") pathString += `[${String(segment.key)}]`;\n\t\telse if (typeof segment.key === \"symbol\") pathString += `[SYMBOL:${String(segment.key)}]`;\n\t\telse pathString += `.${String(segment.key)}`;\n\t} else pathString += `.${String(segment)}`;\n\treturn pathString.slice(1);\n}\nconst extractMessageFromStandardSchema = (failureResult) => {\n\tlet message = \"Data validation failed:\\n\";\n\tlet issueCount = 0;\n\tfor (const issue of failureResult.issues) {\n\t\tissueCount++;\n\t\tif (issue.path == null || issue.path.length === 0) message += ` (issue ${issueCount}) ${issue.message}\\n`;\n\t\telse message += ` (issue ${issueCount}) [${extractPathFromIssue(issue.path)}]: ${issue.message}\\n`;\n\t}\n\treturn message;\n};\n//#endregion\n//#region src/common-errors/validation/err_validation.ts\nlet EValidator = /* @__PURE__ */ function(EValidator) {\n\tEValidator[\"standard_schema\"] = \"standard_schema\";\n\treturn EValidator;\n}({});\nconst err_validation = err_nice.createChildDomain({\n\tdomain: \"err_validation\",\n\tdefaultHttpStatusCode: StatusCodes.BAD_REQUEST,\n\tschema: { [\"standard_schema\"]: err({ message: ({ issues }) => extractMessageFromStandardSchema({ issues }) }) }\n});\n//#endregion\nexport { err_validation as n, extractMessageFromStandardSchema as r, EValidator as t };\n\n//# sourceMappingURL=validation-D2CnYD4a.mjs.map","import { A as securityLevelMeets, D as establishSecureDuplexSession, E as establishPlainDuplexSession, O as WireClient, _ as decodeExchangeRequest, a as warnReliablePushUnsupportedOnce, c as ReliableInbox, d as WireExchangeAcceptor, h as establishSecureExchangeSession, i as warnReliablePeerUnsupportedOnce, j as ConnectionTransportManager$1, l as decodeControlFrame, m as establishPlainExchangeSession, n as reliableStreamId, o as warnReliableStreamKeyUnsupportedOnce, r as warnReliableDeliveryAbandonedOnce, s as warnReliableWireUnavailableOnce, u as encodeControlFrame, v as encodeExchange, w as TransportConnection$1, x as assembleWireConnectionParts } from \"./wire-D7Nv6hx_.mjs\";\nimport { b as NiceError, m as err, o as niceTryAsync, p as err_nice, s as castNiceError } from \"./error-BFAEkmpX.mjs\";\nimport { F as createStorageTofuVerifyKeyResolver, K as err_wire_connect, b as protocolsFromCaps, l as wireFrameByteSize, r as WireAcceptor, u as withExchangeTap, z as RuntimeCoordinate } from \"./ReliableLog-DudDQ2zp.mjs\";\nimport { D as ClientCryptoKeyLink } from \"./util-DiEla9R9.mjs\";\nimport { r as extractMessageFromStandardSchema } from \"./validation-D2CnYD4a.mjs\";\nimport \"./common-errors/index.mjs\";\nimport { nanoid } from \"nanoid\";\nimport { pack, unpack } from \"msgpackr\";\nimport { runtime } from \"std-env\";\n//#region src/action/ActionDefinition/Action/ActionBase.ts\nvar ActionBase = class {\n\tform;\n\t_domain;\n\tid;\n\tdomain;\n\tallDomains;\n\tschema;\n\tconstructor(form, _domain, id) {\n\t\tthis.form = form;\n\t\tthis._domain = _domain;\n\t\tthis.id = id;\n\t\tthis.domain = _domain.domain;\n\t\tthis.allDomains = _domain.allDomains;\n\t\tthis.schema = _domain.actionSchema[id];\n\t}\n\ttoJsonObject() {\n\t\treturn {\n\t\t\tform: this.form,\n\t\t\tdomain: this.domain,\n\t\t\tallDomains: this.allDomains,\n\t\t\tid: this.id\n\t\t};\n\t}\n\ttoJsonString() {\n\t\treturn JSON.stringify(this.toJsonObject());\n\t}\n};\n//#endregion\n//#region src/action/ActionDefinition/Action/Payload/ActionPayload.ts\nvar ActionPayload = class extends ActionBase {\n\tform = \"data\";\n\ttype;\n\tcontext;\n\ttime;\n\tconstructor(context, type, data) {\n\t\tsuper(\"data\", context._domain, context.id);\n\t\tthis.context = context;\n\t\tthis.type = type;\n\t\tthis.time = data.time;\n\t}\n\ttoBaseJsonObject() {\n\t\treturn {\n\t\t\t...super.toJsonObject(),\n\t\t\ttype: this.type,\n\t\t\tcontext: this.context.toContextDataJsonObject(),\n\t\t\ttime: this.time\n\t\t};\n\t}\n};\n//#endregion\n//#region src/action/utils/hashPayloadData.ts\nfunction stableStringify(value) {\n\tif (value === null || value === void 0) return String(value);\n\tif (typeof value !== \"object\") return JSON.stringify(value) ?? \"undefined\";\n\tif (Array.isArray(value)) return `[${value.map(stableStringify).join(\",\")}]`;\n\treturn \"{\" + Object.keys(value).sort().map((k) => `${JSON.stringify(k)}:${stableStringify(value[k])}`).join(\",\") + \"}\";\n}\nfunction fnv1a32(str) {\n\tlet hash = 2166136261;\n\tfor (let i = 0; i < str.length; i++) hash = (hash ^ str.charCodeAt(i)) * 16777619 >>> 0;\n\treturn hash.toString(16).padStart(8, \"0\");\n}\n/**\n* Produces a deterministic 8-char hex hash of any JSON-serializable value.\n* Useful for grouping/comparing action inputs, outputs, and progress payloads.\n*/\nfunction hashPayloadData(data) {\n\treturn fnv1a32(stableStringify(data));\n}\n//#endregion\n//#region src/action/ActionDefinition/Action/Payload/ActionPayload.types.ts\nlet EActionPayloadType = /* @__PURE__ */ function(EActionPayloadType) {\n\tEActionPayloadType[\"request\"] = \"request\";\n\tEActionPayloadType[\"progress\"] = \"progress\";\n\tEActionPayloadType[\"result\"] = \"result\";\n\tEActionPayloadType[\"stream\"] = \"stream\";\n\tEActionPayloadType[\"push\"] = \"push\";\n\treturn EActionPayloadType;\n}({});\n/**\n*\n*  [ PROGRESS ]\n*\n*/\nlet EActionProgressType = /* @__PURE__ */ function(EActionProgressType) {\n\tEActionProgressType[\"none\"] = \"none\";\n\tEActionProgressType[\"percentage\"] = \"percentage\";\n\tEActionProgressType[\"custom\"] = \"custom\";\n\treturn EActionProgressType;\n}({});\n//#endregion\n//#region src/action/ActionDefinition/Action/Payload/ActionPayload_Progress.ts\nvar ActionPayload_Progress = class extends ActionPayload {\n\tprogress;\n\tconstructor(params, progress, data) {\n\t\tsuper(params.context, \"progress\", data);\n\t\tthis.progress = progress;\n\t}\n\ttoJsonObject() {\n\t\treturn {\n\t\t\t...this.toBaseJsonObject(),\n\t\t\tprogress: this.progress\n\t\t};\n\t}\n\ttoJsonString() {\n\t\treturn JSON.stringify(this.toJsonObject());\n\t}\n\ttoHttpResponse() {\n\t\treturn new Response(this.toJsonString(), {\n\t\t\tstatus: 200,\n\t\t\theaders: { \"Content-Type\": \"application/json\" }\n\t\t});\n\t}\n};\n//#endregion\n//#region src/action/ActionDefinition/Action/Payload/ActionPayload_Result.ts\nvar ActionPayload_Result = class extends ActionPayload {\n\tresult;\n\toutputHash;\n\tconstructor(params, result, data) {\n\t\tsuper(params.context, \"result\", data);\n\t\tif (result.ok) {\n\t\t\tthis.result = result;\n\t\t\tthis.outputHash = hashPayloadData(this.context.schema.serializeOutput(result.output));\n\t\t} else {\n\t\t\tconst expected = this.context.schema.isExpectedError(result.error);\n\t\t\tthis.result = expected ? {\n\t\t\t\tok: false,\n\t\t\t\texpected: true,\n\t\t\t\terror: result.error\n\t\t\t} : {\n\t\t\t\tok: false,\n\t\t\t\texpected: false,\n\t\t\t\terror: result.error\n\t\t\t};\n\t\t\tthis.outputHash = hashPayloadData(result.error.message);\n\t\t}\n\t}\n\ttoJsonObject() {\n\t\tconst wireResult = this.result.ok ? {\n\t\t\tok: true,\n\t\t\toutput: this.context.schema.serializeOutput(this.result.output)\n\t\t} : {\n\t\t\tok: false,\n\t\t\texpected: this.result.expected,\n\t\t\terror: this.result.error.toJsonObject()\n\t\t};\n\t\treturn {\n\t\t\t...this.toBaseJsonObject(),\n\t\t\tresult: wireResult,\n\t\t\toutputHash: this.outputHash\n\t\t};\n\t}\n\ttoJsonString() {\n\t\treturn JSON.stringify(this.toJsonObject());\n\t}\n\ttoHttpResponse({ useErrorStatus = true } = {}) {\n\t\treturn new Response(this.toJsonString(), {\n\t\t\tstatus: this.result.ok ? 200 : useErrorStatus ? this.result.error.httpStatusCode : 500,\n\t\t\theaders: { \"Content-Type\": \"application/json\" }\n\t\t});\n\t}\n};\n//#endregion\n//#region src/action/ActionDefinition/Action/Payload/ActionPayload_Request.ts\nvar ActionPayload_Request = class extends ActionPayload {\n\tinput;\n\tinputHash;\n\t_callSite;\n\tconstructor(params, input, data) {\n\t\tsuper(params.context, \"request\", data);\n\t\tthis.input = input;\n\t\tthis.inputHash = hashPayloadData(this.context.schema.serializeInput(input));\n\t}\n\tsuccessResult(...args) {\n\t\tconst output = args[0];\n\t\tconst finalOutput = this.context.schema.validateOutput(output, {\n\t\t\tdomain: this.domain,\n\t\t\tactionId: this.id\n\t\t});\n\t\treturn new ActionPayload_Result(this, {\n\t\t\tok: true,\n\t\t\toutput: finalOutput\n\t\t}, { time: Date.now() });\n\t}\n\t/**\n\t* Build a failed result from any `NiceError`. The result's `expected` flag is\n\t* derived from the action's `.throws()` declarations during construction, so\n\t* declared errors surface as `expected: true` (typed) and everything else as\n\t* `expected: false`.\n\t*/\n\terrorResult(err) {\n\t\treturn new ActionPayload_Result(this, {\n\t\t\tok: false,\n\t\t\terror: err\n\t\t}, { time: Date.now() });\n\t}\n\tprogress(progress) {\n\t\treturn new ActionPayload_Progress(this, progress, { time: Date.now() });\n\t}\n\ttoJsonObject() {\n\t\treturn {\n\t\t\t...super.toBaseJsonObject(),\n\t\t\tinput: this.context.schema.serializeInput(this.input),\n\t\t\tinputHash: this.inputHash\n\t\t};\n\t}\n\ttoJsonString() {\n\t\treturn JSON.stringify(this.toJsonObject());\n\t}\n\tasync runToOutput(options) {\n\t\tconst result = await (await this.run(options)).waitForResultPayload();\n\t\tif (result.result.ok) return result.result.output;\n\t\tthrow result.result.error;\n\t}\n\tasync runToResultPayload(options) {\n\t\treturn (await this.run(options)).waitForResultPayload();\n\t}\n\t/**\n\t* Run and resolve to the bare result outcome (`{ ok } | { ok:false; expected; error }`)\n\t* — the ergonomic way to handle expected vs unexpected errors without throwing.\n\t*/\n\tasync runToResult(options) {\n\t\treturn (await this.runToResultPayload(options)).result;\n\t}\n\tasync run(options) {\n\t\treturn this._domain.runAction(this, options);\n\t}\n};\n//#endregion\n//#region src/action/ActionDefinition/Action/RunningAction.types.ts\nlet ERunningActionState = /* @__PURE__ */ function(ERunningActionState) {\n\tERunningActionState[\"running\"] = \"running\";\n\tERunningActionState[\"completed\"] = \"completed\";\n\treturn ERunningActionState;\n}({});\nlet ERunningActionUpdateType = /* @__PURE__ */ function(ERunningActionUpdateType) {\n\tERunningActionUpdateType[\"started\"] = \"started\";\n\tERunningActionUpdateType[\"progress\"] = \"progress\";\n\tERunningActionUpdateType[\"finished\"] = \"finished\";\n\t/**\n\t* A reliable action's sender-side delivery facts changed — today: the peer's cumulative ack covered\n\t* this frame (`reliability.acked` flipped to `true`). Fires *after* `finished` for a reply-less\n\t* reliable action (which settles on send while delivery continues in the background), so observers\n\t* (devtools) must not treat `finished` as the last update for those.\n\t*/\n\tERunningActionUpdateType[\"reliability\"] = \"reliability\";\n\treturn ERunningActionUpdateType;\n}({});\nlet ERunningActionFinishedType = /* @__PURE__ */ function(ERunningActionFinishedType) {\n\tERunningActionFinishedType[\"aborted\"] = \"aborted\";\n\tERunningActionFinishedType[\"failed\"] = \"failed\";\n\tERunningActionFinishedType[\"success\"] = \"success\";\n\treturn ERunningActionFinishedType;\n}({});\n//#endregion\n//#region src/action/ActionDefinition/Action/RunningAction.ts\nvar RunningAction = class {\n\t_state;\n\t/**\n\t* Reliability facts for a `.reliable()` action (tier + this frame's seq), stamped by the connector when it\n\t* assigns the outbox seq. `undefined` for a best-effort action. Read by devtools to surface a reliable chip;\n\t* the cumulative `ack` / `redelivered` are receiver-side facts (see the server serve-logger), not the\n\t* sender's to report.\n\t*/\n\treliability;\n\tcontext;\n\tcuid;\n\tid;\n\t_domain;\n\tdomain;\n\tallDomains;\n\tparentCuid;\n\tcallSite;\n\t_resultPayloadPromise;\n\t_resolveResult;\n\t_rejectResult;\n\t_isAborted = false;\n\t_updates = [];\n\t_updateListeners = [];\n\t/**\n\t* Delivery-settlement state for {@link waitForAck}, recorded even when nobody is waiting so a late\n\t* `waitForAck()` still settles correctly. The promise itself is created lazily on first call —\n\t* otherwise every abandoned reliable send would raise unhandled-rejection noise for the callers\n\t* (the overwhelming majority) that never ask.\n\t*/\n\t_ackOutcome;\n\t_ackPromise;\n\t_resolveAck;\n\t_rejectAck;\n\tconstructor(initialState) {\n\t\tthis.context = initialState.context;\n\t\tthis.cuid = initialState.context.cuid;\n\t\tthis.id = initialState.context.id;\n\t\tthis.domain = initialState.context.domain;\n\t\tthis.allDomains = initialState.context.allDomains;\n\t\tthis._domain = initialState.context._domain;\n\t\tthis.parentCuid = initialState.parentCuid;\n\t\tthis.callSite = initialState.callSite;\n\t\tthis._resultPayloadPromise = new Promise((resolve, reject) => {\n\t\t\tthis._resolveResult = resolve;\n\t\t\tthis._rejectResult = reject;\n\t\t});\n\t\tthis._resultPayloadPromise.catch(() => {});\n\t\tthis._state = {\n\t\t\trequest: initialState.request,\n\t\t\tprogress: initialState.progress ?? [],\n\t\t\tresult: initialState.result\n\t\t};\n\t\tthis._sendUpdate({\n\t\t\ttype: \"started\",\n\t\t\trunningAction: this,\n\t\t\ttime: Date.now()\n\t\t});\n\t}\n\tget state() {\n\t\treturn this._state;\n\t}\n\t/** Whether this action has reached a terminal state (resolved, aborted, or failed) — no more updates. */\n\tget isSettled() {\n\t\treturn this._state.result != null || this._isAborted;\n\t}\n\t/**\n\t* Whether this action was aborted (deadline, overflow, or an explicit abort) — as opposed to having\n\t* completed successfully. A reliable **reply-less** action completes *on send* (so it's `isSettled`), yet\n\t* the outbox must keep delivering it in the background until the peer acks; only an *abort* should stop\n\t* those resends. Resend/resync gating uses this, not {@link isSettled}.\n\t*/\n\tget isAborted() {\n\t\treturn this._isAborted;\n\t}\n\t/** Stamp this action's reliability facts (tier + seq) — the connector calls it when it assigns the seq. */\n\t_setReliability(reliability) {\n\t\tthis.reliability = reliability;\n\t}\n\t/**\n\t* Await this send's **delivery settlement** — the sender-side proof of what became of the frame,\n\t* distinct from the action's own promise (a reply-less reliable action resolves *on send* while\n\t* delivery continues in the background; this is how you await that delivery):\n\t*\n\t* - **Reliable action** — resolves when the peer's cumulative ack covers this frame; rejects with the\n\t*   abandon reason when the frame is dropped undelivered (delivery deadline, explicit `abort()`, a\n\t*   newer frame's cumulative sweep, or a `closeReliableStream`).\n\t* - **Best-effort action** — there is no ack concept, so it mirrors the action itself: resolves when\n\t*   the action settles successfully (for fire-and-forget: on send), rejects when it aborts/fails.\n\t*   Callers compose without branching on the tier.\n\t*\n\t* Note the at-least-once caveat: a *rejected* `waitForAck` means the sender stopped trying, not that\n\t* the frame provably never arrived (the ack itself may have been lost).\n\t*/\n\twaitForAck() {\n\t\tif (this._ackPromise == null) {\n\t\t\tthis._ackPromise = new Promise((resolve, reject) => {\n\t\t\t\tthis._resolveAck = resolve;\n\t\t\t\tthis._rejectAck = reject;\n\t\t\t});\n\t\t\tthis._ackPromise.catch(() => {});\n\t\t\tconst outcome = this._ackOutcome;\n\t\t\tif (outcome != null) if (outcome.ok) this._resolveAck?.();\n\t\t\telse this._rejectAck?.(outcome.reason);\n\t\t}\n\t\treturn this._ackPromise;\n\t}\n\t/** Record a delivery-settlement outcome (first one wins) and settle {@link waitForAck} if it exists. */\n\t_settleAck(outcome) {\n\t\tif (this._ackOutcome != null) return false;\n\t\tthis._ackOutcome = outcome;\n\t\tif (outcome.ok) this._resolveAck?.();\n\t\telse this._rejectAck?.(outcome.reason);\n\t\treturn true;\n\t}\n\t/**\n\t* The peer's cumulative ack covered this frame — the connector calls it when its outbox prunes the\n\t* send. Stamps `reliability.acked` and emits a {@link ERunningActionUpdateType.reliability} update so\n\t* observers (devtools) refresh, then settles {@link waitForAck}.\n\t*/\n\t_notifyAcked() {\n\t\tif (this.reliability != null && this.reliability.acked !== true) {\n\t\t\tthis.reliability.acked = true;\n\t\t\tthis._sendUpdate({\n\t\t\t\ttype: \"reliability\",\n\t\t\t\trunningAction: this,\n\t\t\t\ttime: Date.now()\n\t\t\t});\n\t\t}\n\t\tthis._settleAck({ ok: true });\n\t}\n\t/**\n\t* This frame was dropped undelivered (deadline / abort / sweep / stream close) — the connector calls\n\t* it from the outbox's drop hook. Rejects {@link waitForAck} with the abandon reason.\n\t*/\n\t_notifyAckAbandoned(reason) {\n\t\tthis._settleAck({\n\t\t\tok: false,\n\t\t\treason\n\t\t});\n\t}\n\tabort(reason) {\n\t\tthis._abort(reason);\n\t}\n\taddUpdateListeners(listeners) {\n\t\tthis._updateListeners.push(...listeners);\n\t\tfor (const event of this._updates) for (const listener of listeners) listener(event);\n\t\treturn () => {\n\t\t\tfor (const listener of listeners) {\n\t\t\t\tconst i = this._updateListeners.indexOf(listener);\n\t\t\t\tif (i !== -1) this._updateListeners.splice(i, 1);\n\t\t\t}\n\t\t};\n\t}\n\tasync *iterateUpdates() {\n\t\tconst queue = [];\n\t\tlet resolveWaiter = null;\n\t\tconst unsubscribe = this.addUpdateListeners([(event) => {\n\t\t\tqueue.push(event);\n\t\t\tif (resolveWaiter) {\n\t\t\t\tresolveWaiter();\n\t\t\t\tresolveWaiter = null;\n\t\t\t}\n\t\t}]);\n\t\ttry {\n\t\t\twhile (true) {\n\t\t\t\tif (queue.length === 0) await new Promise((resolve) => {\n\t\t\t\t\tresolveWaiter = resolve;\n\t\t\t\t});\n\t\t\t\tconst event = queue.shift();\n\t\t\t\tyield event;\n\t\t\t\tif (event.type === \"finished\") break;\n\t\t\t}\n\t\t} finally {\n\t\t\tunsubscribe();\n\t\t}\n\t}\n\t_sendUpdate(update) {\n\t\tthis._updates.push(update);\n\t\tfor (const listener of this._updateListeners) listener(update);\n\t}\n\t_completeWithResult(result) {\n\t\tif (this._state.result != null || this._isAborted) return false;\n\t\tthis._state = {\n\t\t\trequest: this._state.request,\n\t\t\tprogress: this._state.progress,\n\t\t\tresult\n\t\t};\n\t\tthis._resolveResult(result);\n\t\tthis._sendUpdate({\n\t\t\ttype: \"finished\",\n\t\t\tfinishType: \"success\",\n\t\t\trunningAction: this,\n\t\t\ttime: Date.now(),\n\t\t\tresponse: result\n\t\t});\n\t\tif (this.reliability == null) this._settleAck({ ok: true });\n\t\treturn true;\n\t}\n\t_abort(reason) {\n\t\tif (this._state.result != null || this._isAborted) return false;\n\t\tthis._isAborted = true;\n\t\tthis._rejectResult(reason);\n\t\tthis._sendUpdate({\n\t\t\ttype: \"finished\",\n\t\t\tfinishType: \"aborted\",\n\t\t\trunningAction: this,\n\t\t\ttime: Date.now(),\n\t\t\treason\n\t\t});\n\t\tif (this.reliability == null) this._settleAck({\n\t\t\tok: false,\n\t\t\treason\n\t\t});\n\t\treturn true;\n\t}\n\t_failWithError(error) {\n\t\tif (this._state.result != null || this._isAborted) return false;\n\t\tthis._isAborted = true;\n\t\tthis._rejectResult(error);\n\t\tthis._sendUpdate({\n\t\t\ttype: \"finished\",\n\t\t\tfinishType: \"failed\",\n\t\t\trunningAction: this,\n\t\t\ttime: Date.now(),\n\t\t\terror\n\t\t});\n\t\tif (this.reliability == null) this._settleAck({\n\t\t\tok: false,\n\t\t\treason: error\n\t\t});\n\t\treturn true;\n\t}\n\t_updateProgress(progress) {\n\t\tif (this._state.result != null || this._isAborted) return;\n\t\tthis._state.progress.push(progress);\n\t\tthis._sendUpdate({\n\t\t\ttype: \"progress\",\n\t\t\trunningAction: this,\n\t\t\ttime: Date.now(),\n\t\t\tprogress: progress.progress\n\t\t});\n\t}\n\twaitForResultPayload() {\n\t\treturn this._resultPayloadPromise;\n\t}\n\t_resolveFromJson(resultJson) {\n\t\tif (this._state.result != null || this._isAborted) return false;\n\t\tconst result = this._domain.hydrateResultPayload(resultJson);\n\t\treturn this._completeWithResult(result);\n\t}\n};\n//#endregion\n//#region src/action/errors/err_nice_action.ts\nlet EErrId_NiceAction = /* @__PURE__ */ function(EErrId_NiceAction) {\n\tEErrId_NiceAction[\"not_implemented\"] = \"not_implemented\";\n\tEErrId_NiceAction[\"action_id_not_in_domain\"] = \"action_id_not_in_domain\";\n\tEErrId_NiceAction[\"domain_already_exists_in_hierarchy\"] = \"domain_already_exists_in_hierarchy\";\n\tEErrId_NiceAction[\"domain_name_collision\"] = \"domain_name_collision\";\n\tEErrId_NiceAction[\"domain_no_handler\"] = \"domain_no_handler\";\n\tEErrId_NiceAction[\"hydration_domain_mismatch\"] = \"hydration_domain_mismatch\";\n\tEErrId_NiceAction[\"hydration_action_state_mismatch\"] = \"hydration_action_state_mismatch\";\n\tEErrId_NiceAction[\"hydration_action_id_not_found\"] = \"hydration_action_id_not_found\";\n\tEErrId_NiceAction[\"no_action_execution_handler\"] = \"no_action_execution_handler\";\n\tEErrId_NiceAction[\"wire_action_not_payload\"] = \"wire_action_not_payload\";\n\tEErrId_NiceAction[\"wire_not_action_data\"] = \"wire_not_action_data\";\n\tEErrId_NiceAction[\"runtime_reset\"] = \"runtime_reset\";\n\tEErrId_NiceAction[\"runtime_disposed\"] = \"runtime_disposed\";\n\tEErrId_NiceAction[\"ambiguous_action_runtime\"] = \"ambiguous_action_runtime\";\n\tEErrId_NiceAction[\"invalid_server_runtime_scope\"] = \"invalid_server_runtime_scope\";\n\tEErrId_NiceAction[\"conflicting_server_options\"] = \"conflicting_server_options\";\n\tEErrId_NiceAction[\"conflicting_connect_options\"] = \"conflicting_connect_options\";\n\tEErrId_NiceAction[\"duplicate_action_executor\"] = \"duplicate_action_executor\";\n\tEErrId_NiceAction[\"peer_handler_already_bound\"] = \"peer_handler_already_bound\";\n\tEErrId_NiceAction[\"no_client_runtimes_registered\"] = \"no_client_runtimes_registered\";\n\tEErrId_NiceAction[\"action_input_validation_failed\"] = \"action_input_validation_failed\";\n\tEErrId_NiceAction[\"action_input_validation_promise\"] = \"action_input_validation_promise\";\n\tEErrId_NiceAction[\"action_output_validation_failed\"] = \"action_output_validation_failed\";\n\tEErrId_NiceAction[\"action_output_validation_promise\"] = \"action_output_validation_promise\";\n\tEErrId_NiceAction[\"connection_required\"] = \"connection_required\";\n\treturn EErrId_NiceAction;\n}({});\nconst err_nice_action = err_nice.createChildDomain({\n\tdomain: \"err_nice_action\",\n\tdefaultHttpStatusCode: 500,\n\tschema: {\n\t\t[\"not_implemented\"]: err({ message: ({ label }) => `The \"${label}\" functionality is not implemented yet.` }),\n\t\t[\"action_id_not_in_domain\"]: err({ message: ({ actionId, domain }) => `Action with id \"${actionId}\" does not exist in domain \"${domain}\".` }),\n\t\t[\"domain_already_exists_in_hierarchy\"]: err({ message: ({ domain, allParentDomains, parentDomain }) => `Domain \"${domain}\" already exists in the hierarchy under the parent \"${parentDomain}\". All parent domains [\"${allParentDomains.join(\", \")}\"]` }),\n\t\t[\"domain_name_collision\"]: err({ message: ({ domain, existingParentDomains, incomingParentDomains }) => `Two different domain definitions named \"${domain}\" were registered on one runtime router (existing under [${existingParentDomains.join(\" > \")}], incoming under [${incomingParentDomains.join(\" > \")}]). Wire routing is by name only, so the later registration would silently shadow the earlier one — give the domains distinct names, or register the same instance.` }),\n\t\t[\"domain_no_handler\"]: err({ message: ({ domain }) => `Domain \"${domain}\" has no action handler registered.` }),\n\t\t[\"hydration_domain_mismatch\"]: err({ message: ({ expected, received }) => `Cannot hydrate action: domain mismatch. Expected \"${expected}\", got \"${received}\".` }),\n\t\t[\"hydration_action_state_mismatch\"]: err({ message: ({ expected, received }) => `Cannot hydrate action: action state type mismatch. Expected \"${expected}\", got \"${received}\".` }),\n\t\t[\"hydration_action_id_not_found\"]: err({ message: ({ domain, actionId }) => `Cannot hydrate action: id \"${actionId}\" does not exist in domain \"${domain}\".` }),\n\t\t[\"no_action_execution_handler\"]: err({ message: ({ domain, actionId, specifiedClient }) => `${specifiedClient ? ` The targeted client runtime [${specifiedClient.stringId}] has no` : \"No\"} action handler registered for \"${actionId}\" in domain \"${domain}\".` }),\n\t\t[\"wire_action_not_payload\"]: err({ message: ({ domain, actionId, actionState }) => `Cannot handle wire for action \"${actionId}\" in domain \"${domain}\": expected action form of \"data\" and type of \"request\", \"progress\" or \"result\", got \"${actionState}\".` }),\n\t\t[\"wire_not_action_data\"]: err({ message: () => `Cannot handle wire for action: expected an object with a \"domain\" property of type string, a \"form\" property of \"data\" and a \"type\" property of \"request\", \"progress\" or \"result\".` }),\n\t\t[\"connection_required\"]: err({ message: ({ operation }) => `Cannot ${operation}: this action did not arrive on a live duplex connection.` }),\n\t\t[\"runtime_reset\"]: err({ message: () => `Runtime has been reset.` }),\n\t\t[\"runtime_disposed\"]: err({ message: ({ runtime }) => `Action runtime [${runtime}] has been disposed and cannot be reused.` }),\n\t\t[\"ambiguous_action_runtime\"]: err({ message: ({ domain, actionId, runtimes }) => `Several runtimes can execute \"${domain}:${actionId}\" (${runtimes.join(\", \")}). Target one explicitly with runtime.run(request) or request.run({ targetLocalRuntime: runtime }).` }),\n\t\t[\"invalid_server_runtime_scope\"]: err({ message: ({ runtime, actualScope }) => `Server runtime [${runtime}] has scope \"${actualScope}\". Server hosts require new ActionRuntime(identity, { scope: \"instance\" }) so isolate-local instances never enter global dispatch.` }),\n\t\t[\"conflicting_server_options\"]: err({ message: ({ detail }) => `Invalid server construction options: ${detail}` }),\n\t\t[\"conflicting_connect_options\"]: err({ message: ({ detail }) => `Invalid connection options: ${detail}` }),\n\t\t[\"duplicate_action_executor\"]: err({ message: ({ route }) => `More than one local executor was registered for the same route priority (${route}). Keep one executor at that exact route; an action-specific executor may still override a domain fallback.` }),\n\t\t[\"peer_handler_already_bound\"]: err({ message: () => `A stateful peer handler is already bound to another runtime. Create one connector or acceptor per runtime.` }),\n\t\t[\"no_client_runtimes_registered\"]: err({ message: ({ context }) => `No runtimes registered${context?.domain ? ` on domain \"${context.domain}\"` : \"\"}. Add handlers to a runtime via runtime.addHandlers([handler]) before executing actions.` }),\n\t\t[\"action_input_validation_failed\"]: err({\n\t\t\tmessage: ({ domain, actionId, validationMessage }) => `Input validation failed for action \"${actionId}\" in domain \"${domain}\":\\n${validationMessage}`,\n\t\t\thttpStatusCode: 400\n\t\t}),\n\t\t[\"action_input_validation_promise\"]: err({\n\t\t\tmessage: ({ domain, actionId }) => `Input validation for action \"${actionId}\" in domain \"${domain}\" returned a promise, which is not supported.`,\n\t\t\thttpStatusCode: 400\n\t\t}),\n\t\t[\"action_output_validation_failed\"]: err({\n\t\t\tmessage: ({ domain, actionId, validationMessage }) => `Output validation failed for action \"${actionId}\" in domain \"${domain}\":\\n${validationMessage}`,\n\t\t\thttpStatusCode: 500\n\t\t}),\n\t\t[\"action_output_validation_promise\"]: err({\n\t\t\tmessage: ({ domain, actionId }) => `Output validation for action \"${actionId}\" in domain \"${domain}\" returned a promise, which is not supported.`,\n\t\t\thttpStatusCode: 500\n\t\t})\n\t}\n});\n//#endregion\n//#region src/action/utils/isAction_Base_JsonObject.ts\nconst isAction_Base_JsonObject = (obj) => {\n\treturn typeof obj === \"object\" && obj !== null && typeof obj.domain === \"string\" && typeof obj.id === \"string\" && typeof obj.form === \"string\";\n};\n//#endregion\n//#region src/action/utils/isActionPayload_Result_JsonObject.ts\nconst isActionPayload_Result_JsonObject = (obj) => {\n\treturn isAction_Base_JsonObject(obj) && obj.result != null && obj.form === \"data\" && obj.type === \"result\";\n};\n//#endregion\n//#region src/action/ActionDefinition/Schema/ActionSchema.ts\n/**\n* What a sender should expect back from an action — declared on its schema so both ends agree without\n* any wire flag (each derives the mode from the shared `domain:id`).\n*\n* - `payload` — a typed output (the action has `.output(...)`); the sender awaits it.\n* - `ack` — an empty success confirming receipt (no output); the sender may await it to know the\n*   receiver handled it (or to surface an error). This is the default for an action with no output.\n* - `none` — fire-and-forget: the receiver sends no reply and the sender doesn't wait. The sender's\n*   running action completes as soon as the frame is on the wire (no pending reply, no timeout).\n*/\nlet EActionResponseMode = /* @__PURE__ */ function(EActionResponseMode) {\n\tEActionResponseMode[\"payload\"] = \"payload\";\n\tEActionResponseMode[\"ack\"] = \"ack\";\n\tEActionResponseMode[\"none\"] = \"none\";\n\treturn EActionResponseMode;\n}({});\n/**\n* The delivery guarantee for an action, declared on its schema so both ends agree without a wire flag\n* (each derives the tier from the shared `domain:id`, exactly like {@link EActionResponseMode}). Opt-in;\n* the default is `none` (today's best-effort transport, unchanged).\n*\n* - `none` — best-effort (default). A dropped frame is lost; a reconnect does not replay it.\n* - `session` — ordered, at-least-once, dedup-by-seq **within a resumable session**; the client resends\n*   unacked frames on reconnect. Across a session reset (server eviction/restart) it degrades to\n*   at-least-once *with possible redelivery*, so a reliable handler **must be idempotent**.\n* - `persisted` — as `session`, but the server's dedup high-water is persisted (e.g. DO storage), so dedup\n*   and gap-free catch-up survive eviction too. Backed by the `ReliableLog` primitive.\n*\n* Orthogonal to {@link EActionResponseMode}: the reliability ack is a transport concern (it rides a\n* dedicated envelope slot), separate from the action's application-level reply. A reliable action with no\n* natural reply still gets a standalone transport ack.\n*/\nlet EReliabilityTier = /* @__PURE__ */ function(EReliabilityTier) {\n\tEReliabilityTier[\"none\"] = \"none\";\n\tEReliabilityTier[\"session\"] = \"session\";\n\tEReliabilityTier[\"persisted\"] = \"persisted\";\n\treturn EReliabilityTier;\n}({});\nvar ActionSchema = class {\n\t_errorDeclarations = [];\n\tinputOptions;\n\toutputOptions;\n\t_responseMode;\n\t_reliabilityTier = \"none\";\n\tget inputSchema() {\n\t\treturn this.inputOptions?.schema;\n\t}\n\tget outputSchema() {\n\t\treturn this.outputOptions?.schema;\n\t}\n\t/**\n\t* The response contract for this action. Defaults are inferred — `payload` when an output schema is\n\t* declared, otherwise `ack` — and made explicit by {@link ack} / {@link fireAndForget}.\n\t*/\n\tget responseMode() {\n\t\tif (this._responseMode != null) return this._responseMode;\n\t\treturn this.outputOptions != null ? \"payload\" : \"ack\";\n\t}\n\t/**\n\t* Mark this action as expecting only an acknowledgment (an empty success). Mostly for clarity — an\n\t* output-less action already acks by default — but it documents intent and reads as the deliberate\n\t* counterpart to {@link fireAndForget}.\n\t*/\n\tack() {\n\t\tthis._responseMode = \"ack\";\n\t\treturn this;\n\t}\n\t/**\n\t* Mark this action as fire-and-forget: the receiver sends no reply, and the sender's running action\n\t* completes the moment the frame is sent (no awaited reply, no timeout). Ideal for high-frequency\n\t* server→client pushes (presence, ticks) where an ack would only add wire chatter.\n\t*/\n\tfireAndForget() {\n\t\tthis._responseMode = \"none\";\n\t\treturn this;\n\t}\n\t/**\n\t* The reliability tier for this action (see {@link EReliabilityTier}). Both ends read it from the\n\t* shared schema, so no wire flag says \"this is reliable\" — the sender/receiver derive it from the\n\t* `domain:id`. Defaults to {@link EReliabilityTier.none} (best-effort).\n\t*/\n\tget reliabilityTier() {\n\t\treturn this._reliabilityTier;\n\t}\n\t/**\n\t* Opt this action into ordered, at-least-once delivery with resend-on-reconnect (see\n\t* {@link EReliabilityTier}). Pass `{ persist: true }` for the persisted tier whose dedup survives\n\t* server eviction. The `persist` flag is the *only* knob — reliability is deliberately un-parameterized\n\t* (no priorities/TTL/exactly-once-effect); those stay in app land.\n\t*\n\t* At-least-once means a reliable handler can see a redelivered frame after a session reset, so it\n\t* **must be idempotent**. The dedup-by-seq runtime makes that a non-issue within a live session.\n\t*/\n\treliable(options) {\n\t\tthis._reliabilityTier = options?.persist === true ? \"persisted\" : \"session\";\n\t\treturn this;\n\t}\n\t/**\n\t* Declare the input schema (JSON-native or with explicit SERDE type param).\n\t* For non-JSON-native inputs, prefer the 3-argument form below to avoid\n\t* needing explicit type parameters.\n\t*\n\t* The schema runs at `request()` AND again on the receiving runtime before the handler executes,\n\t* so it must accept its own validated output. Plain validators always do; a `transform` whose\n\t* output fails its own input schema will reject valid requests on arrival — type conversion\n\t* belongs in the SERDE pack/unpack arguments, not in schema transforms.\n\t*/\n\tinput(options) {\n\t\tthis.inputOptions = options;\n\t\treturn this;\n\t}\n\t/**\n\t* Declare the output schema (JSON-native or with explicit SERDE type param).\n\t* For non-JSON-native outputs, prefer the 3-argument form below to avoid\n\t* needing explicit type parameters.\n\t*/\n\toutput(options) {\n\t\tthis.outputOptions = options;\n\t\treturn this;\n\t}\n\tthrows(domain, ids) {\n\t\tthis._errorDeclarations.push({\n\t\t\t_domain: domain,\n\t\t\t_ids: ids\n\t\t});\n\t\treturn this;\n\t}\n\t/**\n\t* Runtime counterpart of {@link TInferActionError}: `true` when `error` is one of\n\t* the errors this action declared via `.throws()` (exact domain + id match). A\n\t* wrapped foreign throw (`err_cast_not_nice`) is never declared, so it returns\n\t* `false` automatically. Drives the `expected` flag on the action result.\n\t*/\n\tisExpectedError(error) {\n\t\treturn this._errorDeclarations.some((d) => d._domain.isExact(error) && (d._ids == null || d._ids.some((id) => error.hasId(id))));\n\t}\n\t/**\n\t* Serialize raw input to a JSON-serializable form.\n\t* Uses the schema's serialization.serialize if defined; otherwise the input\n\t* is already JSON-native and is returned as-is.\n\t*/\n\tserializeInput(rawInput) {\n\t\tif (this.inputOptions?.serialization) return this.inputOptions.serialization.serialize(rawInput);\n\t\treturn rawInput;\n\t}\n\t/**\n\t* Deserialize a JSON value back into the raw input type.\n\t* Uses serialization.deserialize if defined; otherwise the value is cast\n\t* directly (it's already in the correct shape).\n\t*/\n\tdeserializeInput(serialized) {\n\t\tif (this.inputOptions?.serialization) return this.inputOptions.serialization.deserialize(serialized);\n\t\treturn serialized;\n\t}\n\t/**\n\t* Validate raw input against the schema defined via `.input({ schema })`.\n\t* Throws `action_input_validation_failed` if validation fails.\n\t* Returns the validated (and possibly coerced) value on success.\n\t* If no input schema was declared, the value is passed through as-is.\n\t*/\n\tvalidateInput(value, meta) {\n\t\tif (this.inputOptions?.schema == null) return value;\n\t\tconst result = this.inputOptions.schema[\"~standard\"].validate(value);\n\t\tif (result instanceof Promise) throw err_nice_action.fromId(\"action_input_validation_promise\", {\n\t\t\tdomain: meta.domain,\n\t\t\tactionId: meta.actionId\n\t\t});\n\t\tif (result.issues != null) throw err_nice_action.fromId(\"action_input_validation_failed\", {\n\t\t\tdomain: meta.domain,\n\t\t\tactionId: meta.actionId,\n\t\t\tvalidationMessage: extractMessageFromStandardSchema(result)\n\t\t});\n\t\treturn result.value;\n\t}\n\tvalidateOutput(value, meta) {\n\t\tif (this.outputOptions?.schema == null) return value;\n\t\tconst result = this.outputOptions.schema[\"~standard\"].validate(value);\n\t\tif (result instanceof Promise) throw err_nice_action.fromId(\"action_output_validation_promise\", {\n\t\t\tdomain: meta.domain,\n\t\t\tactionId: meta.actionId\n\t\t});\n\t\tif (result.issues != null) throw err_nice_action.fromId(\"action_output_validation_failed\", {\n\t\t\tdomain: meta.domain,\n\t\t\tactionId: meta.actionId,\n\t\t\tvalidationMessage: extractMessageFromStandardSchema(result)\n\t\t});\n\t\treturn result.value;\n\t}\n\t/**\n\t* Serialize raw output to a JSON-serializable form.\n\t*/\n\tserializeOutput(rawOutput) {\n\t\tif (this.outputOptions?.serialization) return this.outputOptions.serialization.serialize(rawOutput);\n\t\treturn rawOutput;\n\t}\n\t/**\n\t* Deserialize a JSON value back into the raw output type.\n\t*/\n\tdeserializeOutput(serialized) {\n\t\tif (this.outputOptions?.serialization) return this.outputOptions.serialization.deserialize(serialized);\n\t\treturn serialized;\n\t}\n};\nconst actionSchema = () => {\n\treturn new ActionSchema();\n};\n//#endregion\n//#region src/action/diagnostics/callSite.ts\n/** Capture a diagnostic caller stack. Callers must apply the opt-in policy before invoking this. */\nfunction captureDiagnosticCallSite() {\n\treturn (/* @__PURE__ */ new Error()).stack;\n}\n//#endregion\n//#region src/action/utils/getAssumedRuntimeEnvironment.ts\nconst getAssumedRuntimeInfo = () => {\n\treturn {\n\t\tassumed: true,\n\t\truntimeName: runtime\n\t};\n};\n//#endregion\n//#region src/action/utils/isActionPayload_Progress_JsonObject.ts\nconst isActionPayload_Progress_JsonObject = (obj) => {\n\treturn isAction_Base_JsonObject(obj) && \"progress\" in obj && obj.form === \"data\" && obj.type === \"progress\";\n};\n//#endregion\n//#region src/action/utils/isActionPayload_Request_JsonObject.ts\nconst isActionPayload_Request_JsonObject = (obj) => {\n\treturn isAction_Base_JsonObject(obj) && obj.form === \"data\" && obj.type === \"request\";\n};\n//#endregion\n//#region src/action/utils/isActionPayload_Any_JsonObject.ts\nfunction isActionPayload_Any_JsonObject(obj) {\n\treturn isActionPayload_Request_JsonObject(obj) || isActionPayload_Result_JsonObject(obj) || isActionPayload_Progress_JsonObject(obj);\n}\n//#endregion\n//#region src/action/ActionRuntime/HandlerCallStack.ts\nconst _stack = [];\nfunction pushHandlerCuid(cuid) {\n\t_stack.push(cuid);\n}\nfunction popHandlerCuid() {\n\t_stack.pop();\n}\nfunction peekHandlerCuid() {\n\treturn _stack[_stack.length - 1];\n}\n//#endregion\n//#region src/action/ActionRuntime/Handler/PeerLink/Connector/err_nice_external_client.ts\nconst err_nice_external_client = err_nice_action.createChildDomain({\n\tdomain: \"err_nice_external_client\",\n\tschema: {}\n});\n//#endregion\n//#region src/action/ActionRuntime/Transport/err_nice_transport.ts\nlet EErrId_NiceTransport = /* @__PURE__ */ function(EErrId_NiceTransport) {\n\tEErrId_NiceTransport[\"timeout\"] = \"timeout\";\n\tEErrId_NiceTransport[\"not_found\"] = \"not_found\";\n\tEErrId_NiceTransport[\"unsupported\"] = \"unsupported\";\n\tEErrId_NiceTransport[\"initialization_failed\"] = \"initialization_failed\";\n\tEErrId_NiceTransport[\"send_failed\"] = \"send_failed\";\n\tEErrId_NiceTransport[\"invalid_action_response\"] = \"invalid_action_response\";\n\tEErrId_NiceTransport[\"reliable_outbox_overflow\"] = \"reliable_outbox_overflow\";\n\tEErrId_NiceTransport[\"reliable_delivery_abandoned\"] = \"reliable_delivery_abandoned\";\n\tEErrId_NiceTransport[\"reliable_stream_closed\"] = \"reliable_stream_closed\";\n\treturn EErrId_NiceTransport;\n}({});\nconst err_nice_transport = err_nice_external_client.createChildDomain({\n\tdomain: \"err_nice_transport\",\n\tschema: {\n\t\t[\"timeout\"]: err({ message: ({ timeout }) => `ActionConnect transport timed out after ${timeout}ms.` }),\n\t\t[\"not_found\"]: err({ message: ({ actionId }) => `No connected transport found for action \"${actionId}\".` }),\n\t\t[\"unsupported\"]: err({ message: ({ transportShapes }) => `${transportShapes.length} Transport(s) [${transportShapes.join(\", \")}] found but returned \"unsupported\" status.` }),\n\t\t[\"initialization_failed\"]: err({ message: ({ actionId, cause, endpoint }) => {\n\t\t\tconst head = `Could not connect any transport for action \"${actionId}\"${endpoint != null ? ` against ${endpoint}` : \"\"}`;\n\t\t\tif (cause == null) return `${head} (all transports failed to initialize).`;\n\t\t\treturn `${head}: ${cause}${cause.endsWith(\".\") ? \"\" : \".\"}`;\n\t\t} }),\n\t\t[\"send_failed\"]: err({\n\t\t\tmessage: ({ actionId, httpStatusCode, message }) => `Failed to send action \"${actionId}\" [${httpStatusCode ?? \"Unknown status\"}]: ${message ?? \"Unknown error\"}.`,\n\t\t\thttpStatusCode: ({ httpStatusCode }) => httpStatusCode ?? 500\n\t\t}),\n\t\t[\"invalid_action_response\"]: err({ message: ({ actionId }) => `Invalid action response JSON structure for action \"${actionId}\"` }),\n\t\t[\"reliable_outbox_overflow\"]: err({ message: ({ actionId, maxUnacked }) => `Reliable outbox for action \"${actionId}\" exceeded its unacked window (${maxUnacked}) — the peer is not acknowledging. Send rejected to bound memory.` }),\n\t\t[\"reliable_delivery_abandoned\"]: err({ message: ({ actionId, timeout }) => `Reliable action \"${actionId}\" was abandoned: not acknowledged within its ${timeout}ms delivery deadline (or swept with an aborted earlier frame on its stream). The stream skips past it and continues.` }),\n\t\t[\"reliable_stream_closed\"]: err({ message: ({ actionId, streamId }) => `Reliable action \"${actionId}\" was abandoned because its stream (\"${streamId}\") was closed (closeReliableStream) while the send was still unacknowledged.` })\n\t}\n});\n//#endregion\n//#region src/action/ActionRuntime/Transport/ConnectionTransportManager.ts\n/**\n* Preference-ordered transport selection for action dispatch — wire's generic\n* `ConnectionTransportManager` pinned to the action routing\n* params + methods, with the selection failures expressed in action's own `err_nice_transport`\n* vocabulary (the exact errors thrown before the move). An actionless dial\n* (`ChannelConnector.connect()`, the connection contract) reports as `\"connect()\"` in the failure messages.\n*/\nvar ConnectionTransportManager = class extends ConnectionTransportManager$1 {\n\tconstructor(cache) {\n\t\tsuper(cache, {\n\t\t\tunsupported: (transportShapes) => err_nice_transport.fromId(\"unsupported\", { transportShapes }),\n\t\t\tnotFound: (input) => err_nice_transport.fromId(\"not_found\", { actionId: input.action == null ? \"connect()\" : input.action.id }),\n\t\t\tinitializationFailed: (input, failure) => err_nice_transport.fromId(\"initialization_failed\", {\n\t\t\t\tactionId: input.action == null ? \"connect()\" : input.action.id,\n\t\t\t\tcause: failure.cause,\n\t\t\t\tendpoint: failure.endpoint,\n\t\t\t\tkind: failure.kind\n\t\t\t}).withOriginError(failure.origin)\n\t\t});\n\t}\n};\n//#endregion\n//#region src/action/ActionRuntime/ActionDomainManager.ts\nvar ActionDomainManager = class {\n\t_domains = /* @__PURE__ */ new Map();\n\tassertCanAddDomain(domain) {\n\t\tconst existing = this._domains.get(domain.domain);\n\t\tif (existing === domain || existing == null) return;\n\t\tif (existing != null) throw err_nice_action.fromId(\"domain_name_collision\", {\n\t\t\tdomain: domain.domain,\n\t\t\texistingParentDomains: existing.allDomains,\n\t\t\tincomingParentDomains: domain.allDomains\n\t\t});\n\t}\n\taddDomain(domain) {\n\t\tthis.assertCanAddDomain(domain);\n\t\tthis._domains.set(domain.domain, domain);\n\t}\n\tremoveDomain(domain) {\n\t\tif (this._domains.get(domain.domain) === domain) this._domains.delete(domain.domain);\n\t}\n\tgetDomains() {\n\t\treturn [...this._domains.values()];\n\t}\n\tverifyIsActionJson(action) {\n\t\tif (typeof action.domain !== \"string\" || typeof action.id !== \"string\") throw err_nice_action.fromId(\"wire_not_action_data\");\n\t}\n\tgetActionDomain(action) {\n\t\tthis.verifyIsActionJson(action);\n\t\tconst domain = this._domains.get(action.domain);\n\t\tif (!domain) return;\n\t\treturn domain;\n\t}\n\tgetActionDomainOrThrow(action) {\n\t\tthis.verifyIsActionJson(action);\n\t\tconst domain = this._domains.get(action.domain);\n\t\tif (!domain) throw err_nice_action.fromId(\"domain_no_handler\", { domain: action.domain });\n\t\treturn domain;\n\t}\n\thydrateActionPayload(actionJson) {\n\t\treturn this.getActionDomainOrThrow(actionJson).hydrateAnyAction(actionJson);\n\t}\n};\n//#endregion\n//#region src/action/ActionRuntime/Routing/ActionRouter.ts\nvar ActionRouter = class {\n\tdomainManager = new ActionDomainManager();\n\tactionRouteData = /* @__PURE__ */ new Map();\n\t_context;\n\tconstructor(context) {\n\t\tthis._context = context;\n\t}\n\t/** Copy all routes from another router into this one, replacing any overlapping keys. */\n\tmergeRouter(actionRouter) {\n\t\tfor (const domain of actionRouter.getDomains()) this.domainManager.addDomain(domain);\n\t\tfor (const [matchKey, routeDataEntries] of actionRouter.actionRouteData.entries()) this.actionRouteData.set(matchKey, [...routeDataEntries]);\n\t}\n\taddDomainsFromOther(actionRouter) {\n\t\tfor (const domain of actionRouter.getDomains()) this.domainManager.assertCanAddDomain(domain);\n\t\tfor (const domain of actionRouter.getDomains()) this.domainManager.addDomain(domain);\n\t}\n\t/** All FNs registered for an action, ID-specific entries first then domain wildcard. */\n\tgetRouteDataEntriesForAction(action) {\n\t\tconst idKey = `dom[${action.domain}]id[${action.id}]`;\n\t\tconst domKey = `dom[${action.domain}]id[_]`;\n\t\treturn [...this.actionRouteData.get(idKey) ?? [], ...this.actionRouteData.get(domKey) ?? []];\n\t}\n\t/** First FN registered for an action (ID-specific beats domain wildcard). */\n\tgetRouteDataForAction(action) {\n\t\treturn this.getRouteDataEntriesForAction(action)[0];\n\t}\n\tthrowNoHandlerForAction(action, context) {\n\t\tif (this._context.contextType === \"handler_route\") throw err_nice_action.fromId(\"no_action_execution_handler\", {\n\t\t\tdomain: action.domain,\n\t\t\tactionId: action.id,\n\t\t\tspecifiedClient: context.targetLocalRuntime?.coordinate\n\t\t});\n\t\tif (this._context.contextType === \"runtime_to_handler\") throw err_nice_action.fromId(\"no_action_execution_handler\", {\n\t\t\tdomain: action.domain,\n\t\t\tactionId: action.id,\n\t\t\tspecifiedClient: this._context.runtime.coordinate\n\t\t});\n\t\tthrow err_nice_action.fromId(\"no_action_execution_handler\", {\n\t\t\tdomain: action.domain,\n\t\t\tactionId: action.id\n\t\t});\n\t}\n\tgetRouteDataEntriesForActionOrThrow(action, context) {\n\t\tconst entries = this.getRouteDataEntriesForAction(action);\n\t\tif (entries.length === 0) this.throwNoHandlerForAction(action, context);\n\t\treturn entries;\n\t}\n\tgetRouteDataForActionOrThrow(action, context) {\n\t\tconst routeData = this.getRouteDataForAction(action);\n\t\tif (!routeData) this.throwNoHandlerForAction(action, context);\n\t\treturn routeData;\n\t}\n\t/** All FNs stored under an exact match key. */\n\tgetForKey(key) {\n\t\treturn this.actionRouteData.get(key) ?? [];\n\t}\n\t/** Every match key that has at least one registered FN. */\n\tgetRegisteredKeys() {\n\t\treturn [...this.actionRouteData.keys()];\n\t}\n\tgetDomains() {\n\t\treturn this.domainManager.getDomains();\n\t}\n\t/** Register a handler for all actions in a domain, replacing any existing one. */\n\tforDomain(domain, routeData) {\n\t\tthis.domainManager.addDomain(domain);\n\t\tthis.actionRouteData.set(`dom[${domain.domain}]id[_]`, [routeData]);\n\t\treturn this;\n\t}\n\tforAction(action, routeData) {\n\t\treturn this.forActionId(action._domain, action.id, routeData);\n\t}\n\t/** Register a handler for a specific action, replacing any existing one. */\n\tforActionId(domain, id, routeData) {\n\t\tthis.domainManager.addDomain(domain);\n\t\tthis.actionRouteData.set(`dom[${domain.domain}]id[${id}]`, [routeData]);\n\t\treturn this;\n\t}\n\t/** Register one handler for several action IDs, replacing any existing ones. */\n\tforActionIds(domain, ids, routeData) {\n\t\tthis.domainManager.addDomain(domain);\n\t\tfor (const id of ids) this.forActionId(domain, id, routeData);\n\t\treturn this;\n\t}\n\t/** Register per-action handlers from a cases map, replacing any existing ones. */\n\tforDomainActionCases(domain, cases) {\n\t\tthis.domainManager.addDomain(domain);\n\t\tfor (const id of Object.keys(cases)) {\n\t\t\tconst routeData = cases[id];\n\t\t\tif (routeData != null) this.actionRouteData.set(`dom[${domain.domain}]id[${id}]`, [routeData]);\n\t\t}\n\t\treturn this;\n\t}\n\t/** Append a handler for all actions in a domain (accumulates alongside existing). */\n\taddForDomain(domain, routeData) {\n\t\tthis.domainManager.addDomain(domain);\n\t\tthis._push(`dom[${domain.domain}]id[_]`, routeData);\n\t\treturn this;\n\t}\n\t/** Append a handler for a specific action (accumulates alongside existing). */\n\taddForAction(domain, id, routeData) {\n\t\tthis.domainManager.addDomain(domain);\n\t\tthis._push(`dom[${domain.domain}]id[${id}]`, routeData);\n\t\treturn this;\n\t}\n\t/** Append one handler for several action IDs (accumulates alongside existing). */\n\taddForActionIds(domain, ids, routeData) {\n\t\tthis.domainManager.addDomain(domain);\n\t\tfor (const id of ids) this.addForAction(domain, id, routeData);\n\t\treturn this;\n\t}\n\t/** Append per-action handlers from a cases map (accumulates alongside existing). */\n\taddForDomainActionCases(domain, cases) {\n\t\tthis.domainManager.addDomain(domain);\n\t\tfor (const id of Object.keys(cases)) {\n\t\t\tconst routeData = cases[id];\n\t\t\tif (routeData != null) this._push(`dom[${domain.domain}]id[${id}]`, routeData);\n\t\t}\n\t\treturn this;\n\t}\n\t/** Append a handler directly by its raw match key (used when the key is known ahead of time). */\n\taddForKey(key, routeData) {\n\t\tthis._push(key, routeData);\n\t\treturn this;\n\t}\n\t/** Remove one route-data object from every key; used by scoped installation teardown. */\n\tremoveRouteData(routeData) {\n\t\tfor (const [key, entries] of this.actionRouteData) {\n\t\t\tconst remaining = entries.filter((entry) => entry !== routeData);\n\t\t\tif (remaining.length === 0) this.actionRouteData.delete(key);\n\t\t\telse if (remaining.length !== entries.length) this.actionRouteData.set(key, remaining);\n\t\t}\n\t\tconst registeredKeys = [...this.actionRouteData.keys()];\n\t\tfor (const domain of this.domainManager.getDomains()) {\n\t\t\tconst prefix = `dom[${domain.domain}]id[`;\n\t\t\tif (!registeredKeys.some((key) => key.startsWith(prefix))) this.domainManager.removeDomain(domain);\n\t\t}\n\t}\n\t_push(key, routeData) {\n\t\tconst existing = this.actionRouteData.get(key);\n\t\tif (existing != null) existing.push(routeData);\n\t\telse this.actionRouteData.set(key, [routeData]);\n\t}\n};\n//#endregion\n//#region src/action/ActionRuntime/Handler/ActionHandler.ts\nvar ActionHandler = class {\n\t_cuid;\n\tget cuid() {\n\t\tthis._cuid ??= nanoid();\n\t\treturn this._cuid;\n\t}\n\tgetActionRouter() {\n\t\treturn this.actionRouter;\n\t}\n};\n//#endregion\n//#region src/action/ActionRuntime/Handler/PeerLink/PeerLink.ts\n/**\n* Shared base for every handler that routes a domain set to/from *another runtime* (a \"peer\") — the\n* unified peer-link concept. Both specializations extend this as siblings, differing only in *who\n* establishes the connection*, which is a transport trait, not a routing one:\n*\n* - {@link ChannelConnector} — **dial-out**: this runtime opens connection(s) to one peer\n*   over a transport stack (with caching + fallback). The classic \"client → backend\" link.\n* - {@link ChannelAcceptor} — **accept-in**: connections are accepted from many peers and fed in\n*   via `receive()`; it keeps a per-connection registry and can push to any of them.\n*\n* To the runtime there is no \"client\" vs \"server\" — both are peer-link handlers (`handlerType =\n* external`) keyed to a peer coordinate, chosen by the return-path dispatch via {@link sendReturnPayload}.\n*/\nvar PeerLink = class extends ActionHandler {\n\t/** The peer runtime this handler links to (an env-only coordinate for an accept-in handler). */\n\tpeer;\n\thandlerType = \"peer\";\n\tactionRouter = new ActionRouter({\n\t\tcontextType: \"handler_route\",\n\t\thandler: this\n\t});\n\t/** Listeners installed by the runtime (`resolveIncomingActionPayload`) for inbound peer frames. */\n\t_incomingRuntime;\n\t_incomingActionDataListener;\n\tconstructor(peerCoordinate) {\n\t\tsuper();\n\t\tthis.peer = peerCoordinate;\n\t}\n\t/** @deprecated Use {@link peer}. */\n\tget peerClient() {\n\t\treturn this.peer;\n\t}\n\tforDomain(domain) {\n\t\tthis.actionRouter.forDomain(domain, true);\n\t\treturn this;\n\t}\n\tforAction(action) {\n\t\tthis.actionRouter.forAction(action, true);\n\t\treturn this;\n\t}\n\tforActionIds(domain, ids) {\n\t\tthis.actionRouter.forActionIds(domain, ids, true);\n\t\treturn this;\n\t}\n\t_setIncomingActionDataListener(runtime, listener) {\n\t\tif (this._incomingRuntime != null && this._incomingRuntime !== runtime) throw err_nice_action.fromId(\"peer_handler_already_bound\");\n\t\tthis._incomingRuntime = runtime;\n\t\tthis._incomingActionDataListener = listener;\n\t\treturn () => {\n\t\t\tif (this._incomingRuntime !== runtime || this._incomingActionDataListener !== listener) return;\n\t\t\tthis._incomingRuntime = void 0;\n\t\t\tthis._incomingActionDataListener = void 0;\n\t\t};\n\t}\n\t/** Hand a decoded inbound frame to the runtime (called by each specialization's receive path). */\n\t_emitIncoming(json, metadata) {\n\t\tthis._incomingActionDataListener?.(json, metadata);\n\t}\n\t/**\n\t* Whether this handler currently holds a *live* connection bound to `origin`. The runtime's return-path\n\t* dispatch ({@link ActionRuntime.getReturnHandlerForOrigin}) prefers a handler that owns the origin's\n\t* connection over a mere coordinate match, so with several duplex acceptors a result/push routes back\n\t* over the carrier the client connected on. Defaults to `false`; an acceptor overrides it from its\n\t* connection registry.\n\t*/\n\townsLiveConnectionFor(_origin) {\n\t\treturn false;\n\t}\n\t/** Release any long-lived connections this handler owns (a teardown). No-op by default. */\n\tclearTransportCache() {}\n};\n//#endregion\n//#region src/action/ActionRuntime/Handler/PeerLink/Connector/ReliableOutbox.ts\nconst DEFAULT_MAX_UNACKED = 1024;\nvar ReliableOutbox = class {\n\t_streams = /* @__PURE__ */ new Map();\n\t_overflowed = /* @__PURE__ */ new Set();\n\t_maxUnacked;\n\t_onOverflow;\n\tconstructor(options) {\n\t\tthis._maxUnacked = options?.maxUnackedPerStream ?? DEFAULT_MAX_UNACKED;\n\t\tthis._onOverflow = options?.onOverflow;\n\t}\n\t/** The per-stream unacked cap (for surfacing in an overflow error). */\n\tget maxUnackedPerStream() {\n\t\treturn this._maxUnacked;\n\t}\n\t_stream(streamId) {\n\t\tlet state = this._streams.get(streamId);\n\t\tif (state == null) {\n\t\t\tstate = {\n\t\t\t\tnextSeq: 0,\n\t\t\t\tackedSeq: -1,\n\t\t\t\tunacked: /* @__PURE__ */ new Map()\n\t\t\t};\n\t\t\tthis._streams.set(streamId, state);\n\t\t}\n\t\treturn state;\n\t}\n\t/**\n\t* Assign the next `seq` for a stream and remember the send until it's acked. Returns `null` when the\n\t* stream is over its unacked window — the caller should fail the action with an overflow error rather\n\t* than grow memory. `dispatch` is stored so the outbox can resend the exact frame on reconnect.\n\t*/\n\tprepare(streamId, dispatch, streamKey, hooks) {\n\t\tconst state = this._stream(streamId);\n\t\tif (state.unacked.size >= this._maxUnacked) {\n\t\t\tif (!this._overflowed.has(streamId)) {\n\t\t\t\tthis._overflowed.add(streamId);\n\t\t\t\tthis._onOverflow?.(streamId);\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\tconst seq = state.nextSeq++;\n\t\tconst reliability = streamKey == null ? {\n\t\t\tstreamId,\n\t\t\tseq\n\t\t} : {\n\t\t\tstreamId,\n\t\t\tseq,\n\t\t\tstreamKey\n\t\t};\n\t\tstate.unacked.set(seq, {\n\t\t\tseq,\n\t\t\tpreparedAt: Date.now(),\n\t\t\treliability,\n\t\t\tdispatch,\n\t\t\tonDrop: hooks?.onDrop,\n\t\t\tonAck: hooks?.onAck\n\t\t});\n\t\treturn { reliability };\n\t}\n\t/**\n\t* Apply a cumulative ack for a stream: advance the high-water and drop every unacked send `<= ackSeq`.\n\t* Returns the pruned entries (so the caller can settle per-send bookkeeping, e.g. clear delivery\n\t* deadlines keyed by `entry.reliability`). A stale/duplicate ack (`<= ackedSeq`) is a no-op. Clears the\n\t* overflow latch once the window drains.\n\t*/\n\tack(streamId, ackSeq) {\n\t\tconst state = this._streams.get(streamId);\n\t\tif (state == null || ackSeq <= state.ackedSeq) return [];\n\t\tstate.ackedSeq = ackSeq;\n\t\tconst pruned = [];\n\t\tfor (const entry of state.unacked.values()) if (entry.seq <= ackSeq) pruned.push(entry);\n\t\tfor (const entry of pruned) state.unacked.delete(entry.seq);\n\t\tif (state.unacked.size < this._maxUnacked) this._overflowed.delete(streamId);\n\t\tfor (const entry of pruned) entry.onAck?.();\n\t\treturn pruned;\n\t}\n\t/**\n\t* Abandon delivery of every still-unacked send `<= seq` on a stream — the undeliverable-frame escape\n\t* hatch. Called when a reliable action **aborts** (deadline / explicit) while its frame is still\n\t* unacked: the frame will never legitimately resend (the dispatch guard skips aborted actions), so\n\t* leaving it would wedge the stream on a permanent seq gap. Dropping is **cumulative** (like an ack):\n\t* every older unacked frame goes with it — they could no longer be delivered in order anyway — and each\n\t* dropped entry's `onDrop` runs so its action fails loudly *now* rather than timing out serially.\n\t*\n\t* The caller then tells the receiver via an `rskip` control frame to advance past the abandoned seqs,\n\t* so the stream **continues** (later frames deliver in order) instead of stalling. Advances `ackedSeq`\n\t* (abandoned = settled) so a stale in-flight ack can't resurrect confusion, and clears the overflow\n\t* latch as the window drains. Returns the dropped entries; empty when nothing `<= seq` was pending.\n\t*/\n\tdropThrough(streamId, seq, reason) {\n\t\tconst state = this._streams.get(streamId);\n\t\tif (state == null) return [];\n\t\tconst dropped = [];\n\t\tfor (const entry of state.unacked.values()) if (entry.seq <= seq) dropped.push(entry);\n\t\tfor (const entry of dropped) state.unacked.delete(entry.seq);\n\t\tif (seq > state.ackedSeq) state.ackedSeq = seq;\n\t\tif (state.unacked.size < this._maxUnacked) this._overflowed.delete(streamId);\n\t\tfor (const entry of dropped) entry.onDrop?.(reason);\n\t\treturn dropped;\n\t}\n\t/** The unacked entries for one stream, in ascending seq order (Map preserves insertion = seq order). */\n\tpending(streamId) {\n\t\treturn [...this._streams.get(streamId)?.unacked.values() ?? []];\n\t}\n\t/** Unacked count for one stream — the cheap read `pending().length` would allocate for. */\n\tpendingCount(streamId) {\n\t\treturn this._streams.get(streamId)?.unacked.size ?? 0;\n\t}\n\t/**\n\t* `preparedAt` of the oldest unacked send on a stream (`undefined` when drained/unknown). Entries are\n\t* insertion-ordered ascending by seq, so the first is the oldest — no scan.\n\t*/\n\toldestPreparedAt(streamId) {\n\t\tconst state = this._streams.get(streamId);\n\t\tif (state == null) return void 0;\n\t\tfor (const entry of state.unacked.values()) return entry.preparedAt;\n\t}\n\t/**\n\t* The highest seq ever assigned on a stream (`nextSeq - 1`), or `undefined` for a stream this outbox\n\t* has never prepared a send on. `closeReliableStream` abandons *through* this seq — covering every\n\t* unacked send — without the caller holding any handle.\n\t*/\n\thighestSeq(streamId) {\n\t\tconst state = this._streams.get(streamId);\n\t\tif (state == null || state.nextSeq === 0) return void 0;\n\t\treturn state.nextSeq - 1;\n\t}\n\t/** Every unacked entry across all streams, grouped per stream in seq order — the reconnect flush set. */\n\tallPending() {\n\t\tconst out = [];\n\t\tfor (const state of this._streams.values()) out.push(...state.unacked.values());\n\t\treturn out;\n\t}\n\t/** Re-dispatch all unacked sends (call after a transport (re)connects). */\n\tresendAll() {\n\t\tfor (const entry of this.allPending()) entry.dispatch();\n\t}\n\t/**\n\t* Re-sync a stream after the receiver reset (an `rsync` control frame from an evicted/restarted server that\n\t* lost its in-memory high-water): renumber the still-unacked entries from seq 0 — **mutating each entry's\n\t* `reliability.seq` in place** so its stored dispatch closure resends the frame with the new seq — reset the\n\t* ack high-water, then resend them in order. The fresh receiver then delivers the in-flight tail from 0\n\t* instead of stalling on an unfillable gap. No-op when nothing is unacked or the stream is unknown;\n\t* renumbering an already-0-based stream is harmless (idempotent), so a duplicate `rsync` is safe.\n\t*/\n\tresync(streamId) {\n\t\tconst state = this._streams.get(streamId);\n\t\tif (state == null || state.unacked.size === 0) return;\n\t\tconst entries = [...state.unacked.values()];\n\t\tconst renumbered = /* @__PURE__ */ new Map();\n\t\tentries.forEach((entry, index) => {\n\t\t\tentry.seq = index;\n\t\t\tentry.reliability.seq = index;\n\t\t\trenumbered.set(index, entry);\n\t\t});\n\t\tstate.unacked = renumbered;\n\t\tstate.ackedSeq = -1;\n\t\tstate.nextSeq = entries.length;\n\t\tfor (const entry of renumbered.values()) entry.dispatch();\n\t}\n\t/** Total unacked sends held (across streams) — for tests / diagnostics. */\n\tget size() {\n\t\tlet n = 0;\n\t\tfor (const state of this._streams.values()) n += state.unacked.size;\n\t\treturn n;\n\t}\n};\n//#endregion\n//#region src/action/ActionRuntime/Handler/PeerLink/Connector/ChannelConnector.ts\n/**\n* Overall deadline for a reliable action, after which it aborts if still unacked. Reliability retries\n* across reconnects, but it must not retry *forever* — an unreachable peer has to surface as a failure\n* rather than a silent hang. Generous by default (tolerates a long reconnect) and overridable per\n* connector. (At-least-once + a deadline means a timed-out reliable action *may* still have been\n* delivered — the ack was simply lost; documented in the reliability contract.)\n*/\nconst DEFAULT_RELIABLE_ACTION_TIMEOUT = 6e4;\n/** Backoff between retries when a reliable action can't acquire a transport at all (initial connect fails). */\nconst RELIABLE_CONNECT_RETRY_MS = 1e3;\n/**\n* Dial-out peer link: this runtime opens connection(s) to one peer over a transport stack (cached, with\n* preference-ordered fallback). The classic \"client → backend\" handler — but to the runtime it's just a\n* {@link PeerLink} like the accept-in server one.\n*\n* The connection **lifecycle** — dial, keep-alive redial ladder, link events, park, teardown — lives on\n* the {@link WireClient} this handler holds ({@link _wire}); the handler keeps only the action *lane*:\n* routing, the reliable outbox, return-path dispatch, and delegates every lifecycle verb to the client\n* (so `connectChannel` and a realm-only `createWireClient` are one connection implementation).\n*/\nvar ChannelConnector = class extends PeerLink {\n\t/**\n\t* This connection's own identity when it was given one (`connectChannel`'s `connectionId`), used\n\t* in place of the local runtime's coordinate as the origin stamped on outgoing frames — matching\n\t* the identity the handshake bound, so the peer's return path finds *this* socket. `undefined` ⇒\n\t* the connection speaks as the runtime, which is the single-link default.\n\t*/\n\t_connectionIdentity;\n\t_defaultTimeout;\n\t_reliableTimeout;\n\t/**\n\t* The wire connection this handler binds the action lane onto — it owns the transport cache,\n\t* preference-ordered selection, the mux, and the whole connection **lifecycle** (dial, keep-alive\n\t* redial, link events, park, teardown). The handler delegates every connection-level verb +\n\t* property to it; `createWireClient` wraps the same class for a realm-only app.\n\t*/\n\t_wire;\n\t/** Whether any transport can push (duplex) — a realm reads it. */\n\tget canPush() {\n\t\treturn this._wire.canPush;\n\t}\n\t/** The local coordinate this connection dials out from — a realm defaults its identity from it. */\n\tget localCoordinate() {\n\t\treturn this._wire.localCoordinate;\n\t}\n\t/**\n\t* The negotiated wire security level this connection's frame protocols (a realm) ride at — a realm\n\t* client reads it via `realmConnection(connector)` and refuses to send below its required minimum.\n\t*/\n\tget securityLevel() {\n\t\treturn this._wire.securityLevel;\n\t}\n\t/**\n\t* The frame-protocol mux riding this connection's link — protocol modules (a realm client)\n\t* register here. Register protocols *before* {@link connect} / the first dispatch so the handshake\n\t* advertises them.\n\t*/\n\tget wireMux() {\n\t\treturn this._wire.wireMux;\n\t}\n\t/**\n\t* The re-dial hook a realm client rides:\n\t* `realmConnection(connector)` hands it to the engine as `requestReconnect`, invoked on an\n\t* unanswered staleness probe.\n\t*/\n\tget requestReconnect() {\n\t\treturn this._wire.requestReconnect;\n\t}\n\t/**\n\t* Chaos/QA surface — `connector.debug.dropLink(...)` forces the outages\n\t* page-level interception can't (never for production control flow). Delegated to the connection.\n\t*/\n\tget debug() {\n\t\treturn this._wire.debug;\n\t}\n\t/** Client-side send bookkeeping for `.reliable()` actions (seq/ack/resend). Inert until one is used. */\n\t_outbox = new ReliableOutbox();\n\t/** Transports we've already attached a resend-on-disconnect listener to (attach once per connection). */\n\t_resendHooked = /* @__PURE__ */ new WeakSet();\n\t/**\n\t* Per-send **delivery deadline** timers, keyed by each unacked send's reliability object (stable across\n\t* a re-sync, which renumbers `seq` by mutating that same object in place). Armed at `prepare`, cleared\n\t* when the send is **acked** (not when its action settles — a reply-less action settles on send while\n\t* its delivery is still pending). On expiry the frame is abandoned: its action aborts if still pending,\n\t* and the stream skips past it (see {@link _abandonReliableThrough}), so delivery is *bounded* for\n\t* reply-carrying and reply-less sends alike.\n\t*/\n\t_deliveryDeadlines = /* @__PURE__ */ new WeakMap();\n\t/**\n\t* The highest-abandoned-seq `rskip` per stream, kept (and re-flushed on every fresh connection) until\n\t* the peer's ack passes it — so a skip lost to a drop mid-send still lands, and the receiver never\n\t* waits forever on a seq the outbox abandoned. Cleared on an `rsync` (a fresh receiver has no gap to\n\t* skip; stale pre-reset seqs must not be replayed against the renumbered stream).\n\t*/\n\t_streamSkips = /* @__PURE__ */ new Map();\n\t/**\n\t* Pending `rclose` per closed stream, kept until sent once on a live control channel (then dropped —\n\t* `rclose` is a loss-tolerant memory reclaim, unlike an `rskip` it needs no ack retirement: delivery\n\t* was already settled by the close's retained `rskip`, and a receiver that misses it self-heals).\n\t*/\n\t_streamCloses = /* @__PURE__ */ new Map();\n\t/** Most recent live methods able to carry control frames — the immediate path for an `rskip`. */\n\t_controlMethods;\n\t/** Stream-level reliable-delivery observers (see {@link TReliableStreamEvent}). */\n\t_reliableEventListeners = /* @__PURE__ */ new Set();\n\tconstructor({ peer, runtimeCoordinate, transports, defaultTimeout, reliableActionTimeout, wireMux, localCoordinate, connectionIdentity, securityLevel, reconnect, keepLinkAlive }) {\n\t\tsuper(peer ?? runtimeCoordinate);\n\t\tthis._connectionIdentity = connectionIdentity;\n\t\tthis._defaultTimeout = defaultTimeout ?? 1e4;\n\t\tthis._reliableTimeout = reliableActionTimeout ?? DEFAULT_RELIABLE_ACTION_TIMEOUT;\n\t\tthis._wire = new WireClient({\n\t\t\tcreateManager: (cache) => new ConnectionTransportManager(cache),\n\t\t\tmux: wireMux,\n\t\t\tpeer: this.peer,\n\t\t\tlocalCoordinate: connectionIdentity ?? localCoordinate,\n\t\t\tsecurityLevel,\n\t\t\tcanPush: transports.some((transport) => transport.type === \"duplex\"),\n\t\t\treconnect: reconnect ?? keepLinkAlive,\n\t\t\tbuildConnectInput: (pair) => pair,\n\t\t\tdefaultLocalCoordinate: () => ActionRuntime.getDefault().coordinate\n\t\t});\n\t\tfor (const transport of transports) {\n\t\t\tconst securityLevel = transport._inboundSecurityLevel();\n\t\t\tconst connection = transport._createConnection({ resolvers: {\n\t\t\t\tonIncomingActionDataJson: (json, reliability) => {\n\t\t\t\t\tif (reliability?.ack != null) this._applyAck(reliableStreamId(this.peer, json.domain, json.id, reliability.streamKey), reliability.ack);\n\t\t\t\t\tthis._emitIncoming(json, {\n\t\t\t\t\t\treceiver: this,\n\t\t\t\t\t\tsecurityLevel\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tonControlMessage: (message) => {\n\t\t\t\t\tconst streamId = reliableStreamId(this.peer, message.domain, message.id, message.k);\n\t\t\t\t\tif (message.$c === \"rack\") this._applyAck(streamId, message.ack);\n\t\t\t\t\telse if (message.$c === \"rsync\") {\n\t\t\t\t\t\tthis._streamSkips.delete(streamId);\n\t\t\t\t\t\tthis._outbox.resync(streamId);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} });\n\t\t\tconnection.definition = transport;\n\t\t\tthis._wire.addTransport(connection);\n\t\t}\n\t}\n\t/**\n\t* Establish the connection without dispatching an action — so a realm-only\n\t* (actionless) client can exist. Idempotent; resolves when the handshake completes, rejects (and\n\t* arms/parks the keep-alive ladder) when the transport chain is exhausted. `targetLocalRuntime`\n\t* overrides the dial identity; otherwise the connection's configured coordinate, else the ambient\n\t* runtime's default — preserving the pre-descent behaviour.\n\t*\n\t* **Do not fire-and-forget the returned promise** — it is where handshake failures surface,\n\t* including `identity_pin_mismatch` (branch on it with `err.hasId(\"identity_pin_mismatch\")`; see\n\t* `err_wire_connect`).\n\t*/\n\tasync connect(config) {\n\t\tawait this._wire.connect({ localCoordinate: this._connectionIdentity ?? config?.targetLocalRuntime?.coordinate });\n\t}\n\t/**\n\t* Tear down the (possibly half-open) duplex link and immediately re-dial it (the reconnect contract / Phase\n\t* 8b) — surfaced to a realm client as `requestReconnect`, called by the staleness-probe\n\t* escalation. **Awaitable** — resolves when the fresh link's handshake completes.\n\t*/\n\treconnectLink() {\n\t\treturn this._wire.reconnectLink();\n\t}\n\t/**\n\t* Permanently stop this connector: cancel any pending auto-redial and drop the connection cache\n\t* (keep-alive never re-dials again — an explicit, final teardown, distinct from\n\t* {@link clearTransportCache}).\n\t*/\n\tdispose() {\n\t\tthis._wire.dispose();\n\t}\n\tasync handleActionRequest(action, config) {\n\t\tconst localRuntime = config?.targetLocalRuntime ?? ActionRuntime.getDefault();\n\t\tconst localClient = this._connectionIdentity ?? localRuntime.coordinate;\n\t\tif (this._connectionIdentity != null) action.context._setOriginClient(this._connectionIdentity);\n\t\tconst incomingTimeout = config?.timeout ?? this._defaultTimeout;\n\t\tconst parentCuid = peekHandlerCuid();\n\t\tconst callSite = localRuntime._captureActionCallSite(action, config?.captureCallSites);\n\t\tconst routeParams = {\n\t\t\taction,\n\t\t\tlocalClient,\n\t\t\texternalClient: this.peer\n\t\t};\n\t\tconst preferredTransport = this._wire.getPreferredTransport();\n\t\tconst routeItem = preferredTransport != null ? {\n\t\t\truntime: localClient,\n\t\t\thandler: this.toHandlerRouteItem(preferredTransport, routeParams),\n\t\t\ttime: Date.now()\n\t\t} : void 0;\n\t\tif (routeItem != null) action.context.addRouteItem(routeItem);\n\t\tconst runningAction = new RunningAction({\n\t\t\tcontext: action.context,\n\t\t\trequest: action,\n\t\t\tparentCuid,\n\t\t\tcallSite\n\t\t});\n\t\tlocalRuntime.registerRunningAction(runningAction);\n\t\tif (action.schema.reliabilityTier !== \"none\") {\n\t\t\tconst streamKey = config?.streamKey;\n\t\t\tconst streamId = reliableStreamId(this.peer, action.domain, action.id, streamKey);\n\t\t\tconst prepared = this._outbox.prepare(streamId, () => {\n\t\t\t\tif (runningAction.isAborted) return;\n\t\t\t\tthis._dispatchWhenTransportReady(runningAction, routeParams, routeItem, incomingTimeout);\n\t\t\t}, streamKey, {\n\t\t\t\tonDrop: (reason) => {\n\t\t\t\t\trunningAction._notifyAckAbandoned(reason);\n\t\t\t\t\trunningAction._abort(reason);\n\t\t\t\t},\n\t\t\t\tonAck: () => runningAction._notifyAcked()\n\t\t\t});\n\t\t\tif (prepared == null) {\n\t\t\t\tthis._emitReliableEvent(streamKey == null ? {\n\t\t\t\t\ttype: \"overflow\",\n\t\t\t\t\tdomain: action.domain,\n\t\t\t\t\tactionId: action.id\n\t\t\t\t} : {\n\t\t\t\t\ttype: \"overflow\",\n\t\t\t\t\tdomain: action.domain,\n\t\t\t\t\tactionId: action.id,\n\t\t\t\t\tstreamKey\n\t\t\t\t});\n\t\t\t\trunningAction._abort(err_nice_transport.fromId(\"reliable_outbox_overflow\", {\n\t\t\t\t\tactionId: action.id,\n\t\t\t\t\tstreamId,\n\t\t\t\t\tmaxUnacked: this._outbox.maxUnackedPerStream\n\t\t\t\t}));\n\t\t\t\treturn runningAction;\n\t\t\t}\n\t\t\trouteParams.reliability = prepared.reliability;\n\t\t\trunningAction._setReliability({\n\t\t\t\ttier: action.schema.reliabilityTier,\n\t\t\t\tseq: prepared.reliability.seq,\n\t\t\t\tstreamKey\n\t\t\t});\n\t\t\tthis._armDeliveryDeadline(streamId, prepared.reliability, runningAction);\n\t\t\tconst abandonOnAbort = runningAction.addUpdateListeners([(update) => {\n\t\t\t\tif (update.type !== \"finished\") return;\n\t\t\t\tabandonOnAbort();\n\t\t\t\tif (runningAction.isAborted) this._abandonReliableThrough(streamId, prepared.reliability, action.domain, action.id, streamKey);\n\t\t\t}]);\n\t\t}\n\t\tthis._dispatchWhenTransportReady(runningAction, routeParams, routeItem, incomingTimeout);\n\t\treturn runningAction;\n\t}\n\tasync _dispatchWhenTransportReady(runningAction, routeParams, routeItem, incomingTimeout) {\n\t\tconst action = routeParams.action;\n\t\ttry {\n\t\t\tconst { methods, transport } = await this._wire.getReadyTransport(routeParams);\n\t\t\tif (methods.addOnDisconnectListener != null && !this._resendHooked.has(methods)) {\n\t\t\t\tthis._resendHooked.add(methods);\n\t\t\t\tmethods.addOnDisconnectListener(() => {\n\t\t\t\t\tif (this._outbox.size > 0) setTimeout(() => this._outbox.resendAll(), 0);\n\t\t\t\t});\n\t\t\t\tif (methods.sendControlData != null) this._controlMethods = methods;\n\t\t\t\tif (this._outbox.size > 0) setTimeout(() => this._outbox.resendAll(), 0);\n\t\t\t}\n\t\t\tconst handlerRouteItem = this.toHandlerRouteItem(transport, routeParams);\n\t\t\tif (routeItem != null) {\n\t\t\t\trouteItem.handler = handlerRouteItem;\n\t\t\t\trouteItem.time = Date.now();\n\t\t\t} else action.context.addRouteItem({\n\t\t\t\truntime: routeParams.localClient,\n\t\t\t\thandler: handlerRouteItem,\n\t\t\t\ttime: Date.now()\n\t\t\t});\n\t\t\tconst sendInput = {\n\t\t\t\t...routeParams,\n\t\t\t\trunningAction,\n\t\t\t\ttimeout: incomingTimeout\n\t\t\t};\n\t\t\tif (action.type === \"request\" && methods.updateRunConfig != null) sendInput.timeout = methods.updateRunConfig(sendInput)?.timeout ?? incomingTimeout;\n\t\t\tmethods.sendActionData(sendInput);\n\t\t\tif (this._streamSkips.size > 0) this._flushStreamSkips();\n\t\t\tif (action.type === \"request\" && action.schema.responseMode === \"none\") runningAction._completeWithResult(action.successResult(void 0));\n\t\t} catch (err) {\n\t\t\tif (action.type === \"request\" && routeParams.reliability != null) {\n\t\t\t\tif (!runningAction.isAborted) setTimeout(() => {\n\t\t\t\t\tif (runningAction.isAborted) return;\n\t\t\t\t\tthis._dispatchWhenTransportReady(runningAction, routeParams, routeItem, incomingTimeout);\n\t\t\t\t}, RELIABLE_CONNECT_RETRY_MS);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\trunningAction._abort(err);\n\t\t}\n\t}\n\t/**\n\t* Apply a cumulative ack for a stream: prune the outbox, clear each acked send's delivery deadline, and\n\t* retire a pending `rskip` once the ack passes it (proof the skip — or the frames it covered — landed).\n\t* The single funnel for both ack paths (reply piggyback + standalone `rack` control frame).\n\t*/\n\t_applyAck(streamId, ack) {\n\t\tfor (const entry of this._outbox.ack(streamId, ack)) {\n\t\t\tconst deadline = this._deliveryDeadlines.get(entry.reliability);\n\t\t\tif (deadline != null) {\n\t\t\t\tclearTimeout(deadline);\n\t\t\t\tthis._deliveryDeadlines.delete(entry.reliability);\n\t\t\t}\n\t\t}\n\t\tconst skip = this._streamSkips.get(streamId);\n\t\tif (skip != null && ack >= skip.seq) this._streamSkips.delete(streamId);\n\t}\n\t/**\n\t* Arm one reliable send's **delivery deadline**: if the peer hasn't acked the frame within\n\t* {@link _reliableTimeout}, the frame is abandoned — the action aborts if still pending (its abort\n\t* listener then runs the abandonment), while an already-settled reply-less action abandons directly\n\t* (with a one-time route warning, since its caller was already told \"success on send\"). This is what\n\t* turns \"retry across reconnects\" from a potential infinite hang into a bounded, eventually-failing\n\t* operation for an unreachable peer — for *every* reliable send, reply-less included. Cleared by\n\t* {@link _applyAck} when the frame is acked.\n\t*/\n\t_armDeliveryDeadline(streamId, reliability, runningAction) {\n\t\tconst timer = setTimeout(() => {\n\t\t\tif (!runningAction._abort(err_nice_transport.fromId(\"reliable_delivery_abandoned\", {\n\t\t\t\tactionId: runningAction.state.request.id,\n\t\t\t\tstreamId,\n\t\t\t\ttimeout: this._reliableTimeout\n\t\t\t}))) {\n\t\t\t\tconst request = runningAction.state.request;\n\t\t\t\twarnReliableDeliveryAbandonedOnce(request.domain, request.id);\n\t\t\t\tthis._abandonReliableThrough(streamId, reliability, request.domain, request.id, reliability.streamKey);\n\t\t\t}\n\t\t}, this._reliableTimeout);\n\t\tthis._deliveryDeadlines.set(reliability, timer);\n\t}\n\t/**\n\t* Abandon a reliable send that will never deliver (its action aborted / its delivery deadline expired):\n\t* drop it — and, cumulatively, every older still-unacked send on its stream (they could no longer be\n\t* delivered in order; each fails loudly via its `onDrop`) — then record + send an `rskip` so the\n\t* receiver advances past the abandoned seqs and the stream **continues** instead of wedging on a\n\t* permanent gap. The skip is kept (and re-flushed on each fresh connection) until an ack passes it, so\n\t* a drop can't lose it. Idempotent: a second call for the same (or an older) seq drops nothing.\n\t*/\n\t_abandonReliableThrough(streamId, reliability, domain, actionId, streamKey, reasonOverride) {\n\t\tconst seq = reliability.seq;\n\t\tif (seq == null) return;\n\t\tconst reason = reasonOverride ?? err_nice_transport.fromId(\"reliable_delivery_abandoned\", {\n\t\t\tactionId,\n\t\t\tstreamId,\n\t\t\ttimeout: this._reliableTimeout\n\t\t});\n\t\tconst dropped = this._outbox.dropThrough(streamId, seq, reason);\n\t\tfor (const entry of dropped) {\n\t\t\tconst deadline = this._deliveryDeadlines.get(entry.reliability);\n\t\t\tif (deadline != null) {\n\t\t\t\tclearTimeout(deadline);\n\t\t\t\tthis._deliveryDeadlines.delete(entry.reliability);\n\t\t\t}\n\t\t}\n\t\tif (dropped.length > 0) this._emitReliableEvent({\n\t\t\ttype: \"abandoned\",\n\t\t\tdomain,\n\t\t\tactionId,\n\t\t\t...streamKey == null ? {} : { streamKey },\n\t\t\tfromSeq: dropped[0].seq,\n\t\t\ttoSeq: seq,\n\t\t\treason\n\t\t});\n\t\tif (dropped.length === 0 && (this._streamSkips.get(streamId)?.seq ?? -1) >= seq) return;\n\t\tconst previous = this._streamSkips.get(streamId);\n\t\tif (previous == null || seq > previous.seq) this._streamSkips.set(streamId, streamKey == null ? {\n\t\t\t$c: \"rskip\",\n\t\t\tdomain,\n\t\t\tid: actionId,\n\t\t\tseq\n\t\t} : {\n\t\t\t$c: \"rskip\",\n\t\t\tdomain,\n\t\t\tid: actionId,\n\t\t\tseq,\n\t\t\tk: streamKey\n\t\t});\n\t\tthis._flushStreamSkips();\n\t}\n\t/**\n\t* Send every pending `rskip` over the last live control-capable connection (kept until acked past),\n\t* then every pending `rclose` (dropped after one successful send — loss-tolerant reclaim).\n\t*/\n\t_flushStreamSkips() {\n\t\tconst methods = this._controlMethods;\n\t\tif (methods?.sendControlData == null) return;\n\t\tfor (const skip of this._streamSkips.values()) methods.sendControlData(skip);\n\t\tfor (const [streamId, close] of this._streamCloses) {\n\t\t\tmethods.sendControlData(close);\n\t\t\tthis._streamCloses.delete(streamId);\n\t\t}\n\t}\n\t/**\n\t* Observe stream-level reliable-delivery events — the handle-less settlement surface: `abandoned`\n\t* (frames `fromSeq..toSeq` dropped undelivered; the stream skipped past them) and `overflow` (a send\n\t* rejected at the unacked-window cap). Complements the per-send `RunningAction.waitForAck()`, which\n\t* requires holding the handle. Returns an unsubscribe. Wired by `connectChannel({ onReliableEvent })`.\n\t*/\n\taddReliableEventListener(listener) {\n\t\tthis._reliableEventListeners.add(listener);\n\t\treturn () => {\n\t\t\tthis._reliableEventListeners.delete(listener);\n\t\t};\n\t}\n\t_emitReliableEvent(event) {\n\t\tfor (const listener of this._reliableEventListeners) try {\n\t\t\tlistener(event);\n\t\t} catch (err) {\n\t\t\tconsole.error(\"[reliable] onReliableEvent listener threw\", err);\n\t\t}\n\t}\n\t/**\n\t* Observe transport link-state: `link_down`, `redial_scheduled`\n\t* (attempt + delay — truthful \"retrying in N s\" UX), `link_up` (with `downForMs`). Returns an\n\t* unsubscribe. Wired by `connectChannel({ onLinkEvent })`; see {@link TLinkEvent} for the\n\t* contract (a healthy heal is silent at the realm's sync layer — this is where it's visible).\n\t*/\n\taddLinkEventListener(listener) {\n\t\treturn this._wire.addLinkEventListener(listener);\n\t}\n\t/**\n\t* Close one logical reliable stream **for good** — the teardown verb for a stream whose real-world\n\t* subject is over (a finished game run, a departed room): abandon every still-unacked send on it\n\t* (each pending action aborts loudly with `reliable_stream_closed`; already-settled fire-and-forget\n\t* sends stop resending), tell the receiver to skip past them (retained `rskip` — survives drops), and\n\t* release both sides' stream state (an `rclose` reclaim frame; on a keyed stream it also frees the\n\t* key's `maxKeyedStreamsPerClient` slot).\n\t*\n\t* **Synchronous on the sender's state**: after it returns, nothing from this stream can resend — so\n\t* calling it at teardown *before* changing dial state (e.g. switching the active run whose URL a\n\t* multiplexed-peer transport derives) closes the cross-instance redelivery window entirely.\n\t*\n\t* The local seq counter is deliberately **kept** (a tiny tombstone): a reused key continues the seq\n\t* space, so a receiver that missed the `rclose` (dead-socket race) can never mistake new sends for\n\t* duplicates — and against a receiver that *did* forget, the first new send self-heals through the\n\t* normal mid-stream re-sync. Closing a stream this connection never sent on is a no-op.\n\t*/\n\tcloseReliableStream(action, streamKey) {\n\t\tconst streamId = reliableStreamId(this.peer, action.domain, action.id, streamKey);\n\t\tconst highest = this._outbox.highestSeq(streamId);\n\t\tif (highest == null) return;\n\t\tconst reason = err_nice_transport.fromId(\"reliable_stream_closed\", {\n\t\t\tactionId: action.id,\n\t\t\tstreamId\n\t\t});\n\t\tthis._abandonReliableThrough(streamId, {\n\t\t\tstreamId,\n\t\t\tseq: highest,\n\t\t\tstreamKey\n\t\t}, action.domain, action.id, streamKey, reason);\n\t\tthis._streamCloses.set(streamId, streamKey == null ? {\n\t\t\t$c: \"rclose\",\n\t\t\tdomain: action.domain,\n\t\t\tid: action.id\n\t\t} : {\n\t\t\t$c: \"rclose\",\n\t\t\tdomain: action.domain,\n\t\t\tid: action.id,\n\t\t\tk: streamKey\n\t\t});\n\t\tthis._flushStreamSkips();\n\t}\n\treliablePending(action, streamKey) {\n\t\tif (action == null) return this._outbox.size;\n\t\tconst streamId = reliableStreamId(this.peer, action.domain, action.id, streamKey);\n\t\tconst oldest = this._outbox.oldestPreparedAt(streamId);\n\t\treturn {\n\t\t\tunackedCount: this._outbox.pendingCount(streamId),\n\t\t\toldestUnackedAgeMs: oldest == null ? void 0 : Date.now() - oldest,\n\t\t\tmaxUnackedPerStream: this._outbox.maxUnackedPerStream\n\t\t};\n\t}\n\t/**\n\t* Dispatch a result or progress payload directly back to the external client via the best\n\t* available bidirectional transport (WebSocket / Custom). Used for return-path routing when the\n\t* local runtime recognises that it has a direct channel to the action's originClient.\n\t*\n\t* Returns `true` if the payload was sent, `false` if no suitable transport was available.\n\t*/\n\tasync sendReturnPayload(payload, config) {\n\t\tconst localClient = this._connectionIdentity ?? config.targetLocalRuntime.coordinate;\n\t\ttry {\n\t\t\tconst { methods } = await this._wire.getReadyTransport({\n\t\t\t\taction: payload,\n\t\t\t\tlocalClient,\n\t\t\t\texternalClient: this.peer\n\t\t\t});\n\t\t\tif (methods.sendReturnData == null) return false;\n\t\t\tmethods.sendReturnData(payload, {\n\t\t\t\tlocalClient,\n\t\t\t\texternalClient: this.peer\n\t\t\t});\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}\n\ttoJsonObject() {\n\t\treturn {\n\t\t\ttype: this.handlerType,\n\t\t\tclient: this.peer\n\t\t};\n\t}\n\ttoHandlerRouteItem(transport, input) {\n\t\treturn {\n\t\t\ttype: this.handlerType,\n\t\t\tclient: this.peer,\n\t\t\ttransOrd: transport.transOrd,\n\t\t\ttransShape: transport.type,\n\t\t\ttransInfo: transport.getRouteInfo(input)\n\t\t};\n\t}\n\t/**\n\t* Stop the keep-alive auto-redial and release the current link — the intention-revealing\n\t* teardown counterpart of `reconnect`. Call this when a session is\n\t* over (leaving a match, logging out): the link closes and stays closed until the next explicit\n\t* `connect()`/dispatch. Not terminal (unlike {@link dispose}) — the connector is reusable.\n\t*\n\t* For dynamic-endpoint carriers, pair with a `createRequest` that returns `null` once its dial\n\t* context is torn down — then even a mis-ordered teardown can't dial a garbage endpoint (the\n\t* redial loop parks on `dial_unavailable`).\n\t*/\n\treleaseLink() {\n\t\tthis._wire.releaseLink();\n\t}\n\tclearTransportCache() {\n\t\tthis._wire.clearTransportCache();\n\t}\n};\n//#endregion\n//#region src/action/ActionRuntime/ActionRuntime.ts\nvar ActionRuntime = class {\n\t_coordinate;\n\ttimeCreated;\n\truntimeInfo = getAssumedRuntimeInfo();\n\tactionRouter;\n\t_pendingRunningActions = /* @__PURE__ */ new Map();\n\t_registeredPeerHandlers = [];\n\t_registeredRoots = /* @__PURE__ */ new Set();\n\t_handlerOwnership = /* @__PURE__ */ new Map();\n\t_disposed = false;\n\tcaptureCallSites;\n\tscope;\n\tstatic getDefault() {\n\t\treturn getDefaultActionRuntime();\n\t}\n\tconstructor(coordinate, options = {}) {\n\t\tthis._coordinate = coordinate;\n\t\tthis.captureCallSites = options.captureCallSites ?? false;\n\t\tthis.scope = options.scope ?? \"global\";\n\t\tthis.timeCreated = Date.now();\n\t\tthis.actionRouter = new ActionRouter({\n\t\t\tcontextType: \"runtime_to_handler\",\n\t\t\truntime: this\n\t\t});\n\t}\n\tget coordinate() {\n\t\tif (this._coordinate.insId == null) this._coordinate = this._coordinate.specify({ insId: nanoid(14) });\n\t\treturn this._coordinate;\n\t}\n\tget disposed() {\n\t\treturn this._disposed;\n\t}\n\t/** @internal */\n\t_assertActive() {\n\t\tif (this._disposed) throw err_nice_action.fromId(\"runtime_disposed\", { runtime: this.coordinate.stringId });\n\t}\n\t/** @internal Apply the runtime/request diagnostic policy without replacing a supplied stack. */\n\t_captureActionCallSite(action, override) {\n\t\tif (action._callSite == null && (override ?? this.captureCallSites)) action._callSite = captureDiagnosticCallSite();\n\t\treturn action._callSite;\n\t}\n\tspecifyRuntimeCoordinate(specifics) {\n\t\tthis._assertActive();\n\t\tif (specifics.envId != null && this._coordinate.envId !== specifics.envId) throw err_nice_action.fromId(\"not_implemented\", { label: `updating RuntimeCoordinate with a different \"envId\" (\"${this._coordinate.envId}\" → \"${specifics.envId}\")` });\n\t\tthis._coordinate = this._coordinate.specify(specifics);\n\t}\n\tregisterRunningAction(ra) {\n\t\tthis._assertActive();\n\t\tthis._pendingRunningActions.set(ra.cuid, ra);\n\t\tra.addUpdateListeners([(update) => {\n\t\t\tif (update.type === \"finished\") this._pendingRunningActions.delete(ra.cuid);\n\t\t}]);\n\t}\n\tresolveIncomingActionPayload(json, metadata) {\n\t\tif (this._disposed) return;\n\t\tif (json.type === \"request\") {\n\t\t\tthis._handleActionPayloadWireFromReceiver(json, metadata).catch((err) => {\n\t\t\t\tconsole.error(`[ActionRuntime] Incoming action [${json.domain}:${json.id}:${json.form}:${json.type}] unhandled:`, err);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tthis._pendingRunningActions.get(json.context.cuid)?._resolveFromJson(json);\n\t}\n\t/** @internal Hydrate a wire request and attach receiver-owned metadata before application dispatch. */\n\tasync _handleActionPayloadWireFromReceiver(wire, metadata) {\n\t\tconst action = this._hydrateActionPayloadWire(wire);\n\t\tif (metadata != null) action.context._setReceiverMetadata(metadata);\n\t\treturn this.handleActionPayload(action);\n\t}\n\t_hydrateActionPayloadWire(wire) {\n\t\tif (isActionPayload_Any_JsonObject(wire)) return this.actionRouter.domainManager.getActionDomainOrThrow(wire).hydrateAnyAction(wire);\n\t\tthrow err_nice_action.fromId(\"wire_not_action_data\");\n\t}\n\tasync handleActionPayloadWire(wire) {\n\t\tthis._assertActive();\n\t\treturn this.handleActionPayload(this._hydrateActionPayloadWire(wire));\n\t}\n\t/**\n\t* The declared {@link EActionResponseMode} for a wire frame's action, looked up from its registered\n\t* domain — `undefined` if the route isn't registered. Lets a transport decide, without executing the\n\t* action, whether a reply will come back (so e.g. the reliable acceptor knows whether an ack must ride a\n\t* standalone control frame vs. piggyback a reply).\n\t*/\n\tresponseModeForWire(wire) {\n\t\ttry {\n\t\t\treturn this.actionRouter.domainManager.getActionDomainOrThrow(wire).actionSchema[wire.id]?.responseMode;\n\t\t} catch {\n\t\t\treturn;\n\t\t}\n\t}\n\t/**\n\t* The declared {@link EReliabilityTier} for a wire frame's action, looked up from its registered domain —\n\t* `undefined` if the route isn't registered. Lets the reliable acceptor route a `persisted` stream through\n\t* its persisted store (vs. the in-memory inbox for the `session` tier) without any wire flag: the tier is\n\t* derived from the shared `domain:id`, exactly as the connector derives it to opt a send into the outbox.\n\t*/\n\treliabilityTierForWire(wire) {\n\t\treturn this.reliabilityTierForRoute(wire.domain, wire.id);\n\t}\n\t/**\n\t* {@link reliabilityTierForWire} by bare `domain:id` route — for callers holding only a route, e.g. the\n\t* reliable acceptor resolving which receive store an `rskip` control message (no action payload) applies to.\n\t*/\n\treliabilityTierForRoute(domain, id) {\n\t\ttry {\n\t\t\treturn this.actionRouter.domainManager.getActionDomainOrThrow({\n\t\t\t\tdomain,\n\t\t\t\tid\n\t\t\t}).actionSchema[id]?.reliabilityTier;\n\t\t} catch {\n\t\t\treturn;\n\t\t}\n\t}\n\tasync handleActionPayload(action, options) {\n\t\tthis._assertActive();\n\t\tif (action.type === \"request\") {\n\t\t\tconst observers = action.context._domain._collectActionObservers();\n\t\t\tlet handlerForAction;\n\t\t\ttry {\n\t\t\t\thandlerForAction = this.getHandlerForActionOrThrow(action, options);\n\t\t\t} catch (err) {\n\t\t\t\tconst runningAction = new RunningAction({\n\t\t\t\t\tcontext: action.context,\n\t\t\t\t\trequest: action\n\t\t\t\t});\n\t\t\t\trunningAction.addUpdateListeners(observers);\n\t\t\t\trunningAction._completeWithResult(action.errorResult(castNiceError(err)));\n\t\t\t\treturn runningAction;\n\t\t\t}\n\t\t\tlet validatedAction;\n\t\t\ttry {\n\t\t\t\tvalidatedAction = new ActionPayload_Request({ context: action.context }, action.context.validateInput(action.input), { time: action.time });\n\t\t\t\tvalidatedAction._callSite = action._callSite;\n\t\t\t} catch (err) {\n\t\t\t\tconst runningAction = new RunningAction({\n\t\t\t\t\tcontext: action.context,\n\t\t\t\t\trequest: action\n\t\t\t\t});\n\t\t\t\trunningAction.addUpdateListeners(observers);\n\t\t\t\trunningAction._completeWithResult(action.errorResult(castNiceError(err)));\n\t\t\t\tthis._trySetupReturnDispatch(runningAction);\n\t\t\t\treturn runningAction;\n\t\t\t}\n\t\t\tconst runningAction = await handlerForAction.handleActionRequest(validatedAction, {\n\t\t\t\t...options,\n\t\t\t\ttargetLocalRuntime: this\n\t\t\t});\n\t\t\trunningAction.addUpdateListeners(observers);\n\t\t\tthis._trySetupReturnDispatch(runningAction);\n\t\t\treturn runningAction;\n\t\t}\n\t\tthrow err_nice_action.fromId(\"not_implemented\", { label: `Handling incoming action payloads of type \"${action.type}\"` });\n\t}\n\t/**\n\t* @internal\n\t*\n\t* Return the first handler registered for the given action, or `undefined`\n\t* if none has been registered (action-ID-specific beats domain-wildcard).\n\t*/\n\t_getHandlerForAction(action, _options) {\n\t\tconst possibleHandlers = this.actionRouter.getRouteDataEntriesForAction(action).filter((handler) => {\n\t\t\treturn handler.handlerType === \"peer\" || handler.handlerType === \"local\" && action.type === \"request\";\n\t\t});\n\t\tif (possibleHandlers.length === 0) return;\n\t\tlet handlerScore = -1;\n\t\tlet handler;\n\t\tfor (const possibleHandler of possibleHandlers) {\n\t\t\tif (possibleHandler.handlerType === \"local\") return possibleHandler;\n\t\t\tif (possibleHandler.handlerType === \"peer\") {\n\t\t\t\tconst score = RuntimeCoordinate.unknown.similarityLevel(possibleHandler.peer);\n\t\t\t\tif (score > handlerScore) {\n\t\t\t\t\thandlerScore = score;\n\t\t\t\t\thandler = possibleHandler;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn handler;\n\t}\n\tgetHandlerForActionOrThrow(action, options) {\n\t\tconst handler = this._getHandlerForAction(action, options);\n\t\tif (handler == null) throw err_nice_action.fromId(\"no_action_execution_handler\", {\n\t\t\tactionId: action.id,\n\t\t\tdomain: action.domain\n\t\t});\n\t\treturn handler;\n\t}\n\t/**\n\t* Register one or more handlers. Each handler's own `actionRouter` defines\n\t* which domains/actions it handles — those routing keys are mirrored into\n\t* this runtime's router so the same action can be served by multiple handlers.\n\t* Re-adding the same handler object is idempotent. Global runtimes register with the affected root\n\t* domains automatically; instance runtimes remain private and require explicit dispatch.\n\t*/\n\taddHandlers(handlers) {\n\t\tthis._addHandlers(handlers, {\n\t\t\tpersistent: true,\n\t\t\tregister: true\n\t\t});\n\t\treturn this;\n\t}\n\t/** @internal Install handlers for a host and return an idempotent ownership release. */\n\t_installHandlers(handlers, options = {}) {\n\t\tthis._assertActive();\n\t\tconst lease = Symbol(\"action-runtime-handler-installation\");\n\t\ttry {\n\t\t\tthis._addHandlers(handlers, {\n\t\t\t\tpersistent: false,\n\t\t\t\tregister: options.register ?? false,\n\t\t\t\tlease\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tthis._releaseHandlerLease(lease);\n\t\t\tthrow error;\n\t\t}\n\t\tlet released = false;\n\t\treturn () => {\n\t\t\tif (released) return;\n\t\t\treleased = true;\n\t\t\tthis._releaseHandlerLease(lease);\n\t\t};\n\t}\n\t_addHandlers(handlers, options) {\n\t\tthis._assertActive();\n\t\tthis._assertNoDuplicateLocalExecutors(handlers);\n\t\tconst installed = [];\n\t\tconst promoted = [];\n\t\ttry {\n\t\t\tfor (const handler of handlers) {\n\t\t\t\tlet ownership = this._handlerOwnership.get(handler);\n\t\t\t\tif (ownership == null) {\n\t\t\t\t\townership = this._installHandler(handler);\n\t\t\t\t\tinstalled.push(handler);\n\t\t\t\t}\n\t\t\t\tif (options.persistent && !ownership.persistent) {\n\t\t\t\t\townership.persistent = true;\n\t\t\t\t\tpromoted.push(ownership);\n\t\t\t\t}\n\t\t\t\tif (options.lease != null) ownership.leases.add(options.lease);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tfor (const ownership of promoted) ownership.persistent = false;\n\t\t\tfor (const handler of installed) {\n\t\t\t\tconst ownership = this._handlerOwnership.get(handler);\n\t\t\t\tif (ownership != null) this._uninstallHandler(handler, ownership);\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t\tif (options.register) this._registerWithRoutedRoots();\n\t}\n\t_installHandler(handler) {\n\t\tconst handlerRouter = handler.getActionRouter();\n\t\tconst ownership = {\n\t\t\tpersistent: false,\n\t\t\tleases: /* @__PURE__ */ new Set()\n\t\t};\n\t\ttry {\n\t\t\tthis.actionRouter.addDomainsFromOther(handlerRouter);\n\t\t\tif (handler.handlerType === \"peer\") {\n\t\t\t\townership.unbind = handler._setIncomingActionDataListener(this, (json, metadata) => this.resolveIncomingActionPayload(json, metadata));\n\t\t\t\tthis._registeredPeerHandlers.push(handler);\n\t\t\t}\n\t\t\tfor (const key of handlerRouter.getRegisteredKeys()) this.actionRouter.addForKey(key, handler);\n\t\t} catch (error) {\n\t\t\tthis._uninstallHandler(handler, ownership);\n\t\t\tthrow error;\n\t\t}\n\t\tthis._handlerOwnership.set(handler, ownership);\n\t\treturn ownership;\n\t}\n\t_uninstallHandler(handler, ownership) {\n\t\townership.unbind?.();\n\t\tthis.actionRouter.removeRouteData(handler);\n\t\tif (handler.handlerType === \"peer\") {\n\t\t\tconst peerIndex = this._registeredPeerHandlers.indexOf(handler);\n\t\t\tif (peerIndex >= 0) this._registeredPeerHandlers.splice(peerIndex, 1);\n\t\t}\n\t\tthis._handlerOwnership.delete(handler);\n\t}\n\t_assertNoDuplicateLocalExecutors(handlers) {\n\t\tfor (const handler of handlers) for (const domain of handler.getActionRouter().getDomains()) this.actionRouter.domainManager.assertCanAddDomain(domain);\n\t\tconst staged = /* @__PURE__ */ new Map();\n\t\tfor (const handler of handlers) {\n\t\t\tif (handler.handlerType !== \"local\" || this._handlerOwnership.has(handler)) continue;\n\t\t\tfor (const key of handler.getActionRouter().getRegisteredKeys()) {\n\t\t\t\tconst duplicate = this.actionRouter.getForKey(key).find((candidate) => candidate.handlerType === \"local\") ?? staged.get(key);\n\t\t\t\tif (duplicate != null && duplicate !== handler) throw err_nice_action.fromId(\"duplicate_action_executor\", { route: key });\n\t\t\t\tstaged.set(key, handler);\n\t\t\t}\n\t\t}\n\t}\n\t_releaseHandlerLease(lease) {\n\t\tfor (const [handler, ownership] of this._handlerOwnership) {\n\t\t\townership.leases.delete(lease);\n\t\t\tif (ownership.persistent || ownership.leases.size > 0) continue;\n\t\t\tthis._uninstallHandler(handler, ownership);\n\t\t}\n\t}\n\t/**\n\t* @internal Low-level primitive — the public way to open a connection is `connectChannel`, which\n\t* derives routing from a channel and binds the crypto identity for you. This stays as the raw building\n\t* block it sits on (it restates domain lists by hand) and is not part of the supported surface.\n\t*\n\t* Declare an external \"backend client\" in one call: build an\n\t* {@link ChannelConnector} for `peer` carrying the given\n\t* `transports`, route the listed `domains`/`actions` to it, register it (plus any\n\t* `localHandlers` — e.g. server→client push handlers that share the same channel)\n\t* on this runtime. Returns the external handler so the caller can\n\t* later `clearTransportCache()` it.\n\t*/\n\tconnectTo(peer, options) {\n\t\tconst handler = new ChannelConnector({\n\t\t\tpeer,\n\t\t\ttransports: options.transports,\n\t\t\tdefaultTimeout: options.defaultTimeout,\n\t\t\treliableActionTimeout: options.reliableActionTimeout,\n\t\t\twireMux: options.wireMux,\n\t\t\tlocalCoordinate: this.coordinate,\n\t\t\tconnectionIdentity: options.connectionIdentity,\n\t\t\tsecurityLevel: options.securityLevel,\n\t\t\treconnect: options.reconnect ?? options.keepLinkAlive\n\t\t});\n\t\tfor (const domain of options.domains ?? []) handler.forDomain(domain);\n\t\tfor (const action of options.actions ?? []) handler.forAction(action);\n\t\tthis.addHandlers([handler, ...options.localHandlers ?? []]);\n\t\treturn handler;\n\t}\n\tapplyRuntimeForDomain(domain) {\n\t\tconst rootDomain = domain.rootDomain;\n\t\tif (!rootDomain._hasRuntime(this)) {\n\t\t\trootDomain._registerRuntime(this);\n\t\t\tthis._registeredRoots.add(rootDomain);\n\t\t}\n\t}\n\t_registerWithRoutedRoots() {\n\t\tif (this.scope === \"instance\") return;\n\t\tfor (const domain of this.actionRouter.getDomains()) this.applyRuntimeForDomain(domain);\n\t}\n\t/**\n\t* @deprecated Handler installation registers global runtimes automatically. Retained as an\n\t* idempotent migration shim; it never registers an instance-scoped runtime.\n\t*/\n\tapply() {\n\t\tthis._assertActive();\n\t\tthis._registerWithRoutedRoots();\n\t\treturn this;\n\t}\n\tasync run(request, options) {\n\t\tthis._assertActive();\n\t\treturn request.run({\n\t\t\t...options,\n\t\t\ttargetLocalRuntime: this\n\t\t});\n\t}\n\t/**\n\t* Find the best registered external handler that can reach `originClient` directly.\n\t* Used to locate the return-path channel for dispatching results back to the action origin.\n\t* Returns `undefined` if no handler matches (score > 0 required, i.e. at least id must match).\n\t*\n\t* A handler that currently holds the origin's *live* connection always wins, regardless of its\n\t* coordinate score — owning the live socket bound to the origin's exact coordinate (set from the\n\t* handshake) is a strictly more precise match than a connector's declared `peer` score. This lets\n\t* one server accept clients of several environments over a single acceptor. Only when no handler owns a\n\t* live connection do we fall back to connector coordinate scoring.\n\t*/\n\tgetReturnHandlerForOrigin(originClient) {\n\t\tif (originClient.envId === \"_unset_\") return void 0;\n\t\tlet bestScore = -1;\n\t\tlet bestHandler;\n\t\tlet bestOwnedScore = -1;\n\t\tlet bestOwnedHandler;\n\t\tfor (const handler of this._registeredPeerHandlers) {\n\t\t\tif (!handler.canPush) continue;\n\t\t\tconst score = originClient.similarityLevel(handler.peer);\n\t\t\tif (score > bestScore) {\n\t\t\t\tbestScore = score;\n\t\t\t\tbestHandler = handler;\n\t\t\t}\n\t\t\tif (handler.ownsLiveConnectionFor(originClient) && score > bestOwnedScore) {\n\t\t\t\tbestOwnedScore = score;\n\t\t\t\tbestOwnedHandler = handler;\n\t\t\t}\n\t\t}\n\t\tif (bestOwnedHandler != null) return bestOwnedHandler;\n\t\treturn bestScore > 0 ? bestHandler : void 0;\n\t}\n\tresetRuntime() {\n\t\tthis._assertActive();\n\t\tfor (const ra of this._pendingRunningActions.values()) ra._abort(err_nice_action.fromId(\"runtime_reset\"));\n\t\tfor (const handler of this._registeredPeerHandlers) handler.clearTransportCache();\n\t}\n\tdispose() {\n\t\tif (this._disposed) return;\n\t\tthis._disposed = true;\n\t\tfor (const root of this._registeredRoots) root._unregisterRuntime(this);\n\t\tthis._registeredRoots.clear();\n\t\tif (this._pendingRunningActions.size > 0) {\n\t\t\tconst error = err_nice_action.fromId(\"runtime_disposed\", { runtime: this.coordinate.stringId });\n\t\t\tfor (const running of this._pendingRunningActions.values()) running._abort(error);\n\t\t}\n\t\tthis._pendingRunningActions.clear();\n\t\tfor (const handler of this._registeredPeerHandlers) {\n\t\t\tconst disposable = handler;\n\t\t\tif (typeof disposable.dispose === \"function\") disposable.dispose();\n\t\t\telse handler.clearTransportCache();\n\t\t}\n\t\tfor (const [handler, ownership] of this._handlerOwnership) {\n\t\t\townership.unbind?.();\n\t\t\tthis.actionRouter.removeRouteData(handler);\n\t\t}\n\t\tthis._handlerOwnership.clear();\n\t\tthis._registeredPeerHandlers.length = 0;\n\t}\n\t_trySetupReturnDispatch(runningAction) {\n\t\tif (runningAction.context.schema.responseMode === \"none\") return;\n\t\tconst originClient = runningAction.context.originClient;\n\t\tif (originClient.envId === \"_unset_\" || originClient.isSameFor(this._coordinate).id) return;\n\t\tconst arrival = runningAction.context._getReceiverMetadata();\n\t\tif (arrival != null && !(arrival.receiver instanceof PeerLink)) return;\n\t\tconst arrivalLink = arrival?.receiver instanceof PeerLink ? arrival.receiver : void 0;\n\t\trunningAction.addUpdateListeners([(update) => {\n\t\t\tif (update.type === \"finished\" && update.finishType === \"success\") {\n\t\t\t\tif (this._disposed) return;\n\t\t\t\tconst returnHandler = arrivalLink != null ? this._registeredPeerHandlers.includes(arrivalLink) && arrivalLink.canPush ? arrivalLink : void 0 : this.getReturnHandlerForOrigin(originClient);\n\t\t\t\tif (returnHandler == null) return;\n\t\t\t\treturnHandler.sendReturnPayload(update.response, {\n\t\t\t\t\ttargetLocalRuntime: this,\n\t\t\t\t\tarrival\n\t\t\t\t}).catch(() => {});\n\t\t\t}\n\t\t}]);\n\t}\n};\nconst runtimeState = {\n\tdefaultLocalRuntime: void 0,\n\tassumedRuntimeInfo: void 0\n};\nfunction getDefaultActionRuntime() {\n\tif (runtimeState.assumedRuntimeInfo == null) runtimeState.assumedRuntimeInfo = getAssumedRuntimeInfo();\n\tif (runtimeState.defaultLocalRuntime == null) runtimeState.defaultLocalRuntime = new ActionRuntime(RuntimeCoordinate.unknown.specify({ perId: `${runtimeState.assumedRuntimeInfo?.runtimeName ?? \"unknown\"}-runtime` }));\n\treturn runtimeState.defaultLocalRuntime;\n}\n//#endregion\n//#region src/action/ActionRuntime/Handler/Local/ActionLocalHandler.ts\nvar ActionLocalHandler = class extends ActionHandler {\n\thandlerType = \"local\";\n\tactionRouter = new ActionRouter({\n\t\tcontextType: \"handler_route\",\n\t\thandler: this\n\t});\n\tconstructor() {\n\t\tsuper();\n\t}\n\t/**\n\t* Register a handler for all actions in a domain.\n\t* Receives the full primed action — use `matchAction()` to narrow to a specific action id.\n\t* Useful for forwarding all domain actions to a remote endpoint.\n\t* Lower priority than `forAction`.\n\t*/\n\tforDomain(domain, handler) {\n\t\tthis.actionRouter.forDomain(domain, handler);\n\t\treturn this;\n\t}\n\t/**\n\t* Register a handler for a base action instance. Takes priority over domain-wide handlers.\n\t* Receives the full primed action with narrowed input type.\n\t* Useful for handling specific actions locally while forwarding the rest of the domain. For example, a local \"ping\" action that checks connectivity without needing a round trip.\n\t*/\n\tforAction(action, handler) {\n\t\tthis.actionRouter.forAction(action, handler);\n\t\treturn this;\n\t}\n\t/**\n\t* @deprecated Prefer `forAction`, `forDomainActionCases`, or an exhaustive\n\t* `domain.wrapAsLocalHandler` map. Retained for this migration release.\n\t*\n\t* Register a handler for multiple action IDs (first-match-wins among cases).\n\t* Receives the full primed action narrowed to the union of those IDs.\n\t* Use `act.coreAction.id` to branch on which action was dispatched.\n\t*/\n\tforActionIds(domain, ids, handler) {\n\t\tthis.actionRouter.forActionIds(domain, ids, handler);\n\t\treturn this;\n\t}\n\t/**\n\t* Register per-action handlers for a domain using a single map, without needing\n\t* separate `forAction` calls. Unregistered action IDs are unaffected.\n\t*\n\t* @example\n\t* ```ts\n\t* handler.forDomainActionCases(userDomain, {\n\t*   getUser:    (primed) => db.getUser(primed.input.userId),\n\t*   deleteUser: (primed) => db.deleteUser(primed.input.userId),\n\t* });\n\t* ```\n\t*/\n\tforDomainActionCases(domain, cases) {\n\t\tthis.actionRouter.forDomainActionCases(domain, cases);\n\t\treturn this;\n\t}\n\tasync handleActionRequest(action, config) {\n\t\tconst targetLocalRuntime = config?.targetLocalRuntime ?? ActionRuntime.getDefault();\n\t\tconst handler = this.actionRouter.getRouteDataForActionOrThrow(action, { targetLocalRuntime });\n\t\taction.context.addRouteItem({\n\t\t\truntime: targetLocalRuntime.coordinate,\n\t\t\thandler: this.toHandlerRouteItem(),\n\t\t\ttime: Date.now()\n\t\t});\n\t\tconst runningAction = new RunningAction({\n\t\t\tcontext: action.context,\n\t\t\trequest: action,\n\t\t\tparentCuid: peekHandlerCuid(),\n\t\t\tcallSite: targetLocalRuntime._captureActionCallSite(action, config?.captureCallSites)\n\t\t});\n\t\tthis._handleRunningAction(handler, runningAction, targetLocalRuntime);\n\t\treturn runningAction;\n\t}\n\tasync _handleRunningAction(handler, runningAction, runtime) {\n\t\tconst state = runningAction.state;\n\t\tif (state.result != null) return;\n\t\tawait Promise.resolve();\n\t\tpushHandlerCuid(runningAction.cuid);\n\t\ttry {\n\t\t\tconst ran = await niceTryAsync(async () => {\n\t\t\t\tconst metadata = state.request.context._getReceiverMetadata();\n\t\t\t\tconst context = {\n\t\t\t\t\truntime,\n\t\t\t\t\torigin: state.request.context.originClient,\n\t\t\t\t\tauthenticatedOrigin: metadata?.originAuthenticated === true ? state.request.context.originClient : void 0,\n\t\t\t\t\tsecurityLevel: metadata?.securityLevel,\n\t\t\t\t\treliability: state.request.context.reliability,\n\t\t\t\t\trun: (request, options) => runtime.run(request, options)\n\t\t\t\t};\n\t\t\t\tconst rawResult = await handler(state.request, context);\n\t\t\t\tif (rawResult instanceof ActionPayload_Result) return rawResult;\n\t\t\t\tif (rawResult != null && isActionPayload_Result_JsonObject(rawResult)) return this.actionRouter.domainManager.getActionDomainOrThrow(state.request).hydrateResultPayload(rawResult);\n\t\t\t\treturn state.request.successResult(rawResult);\n\t\t\t});\n\t\t\tconst result = ran.ok ? ran.output : state.request.errorResult(ran.error);\n\t\t\trunningAction._completeWithResult(result);\n\t\t} finally {\n\t\t\tpopHandlerCuid();\n\t\t}\n\t}\n\tasync handlePayloadWireOrThrow(wire, config) {\n\t\tconst hydratedAction = this.actionRouter.domainManager.hydrateActionPayload(wire);\n\t\tif (!(hydratedAction instanceof ActionPayload_Request)) throw err_nice_action.fromId(\"wire_action_not_payload\", {\n\t\t\tdomain: hydratedAction.domain,\n\t\t\tactionId: hydratedAction.id,\n\t\t\tactionState: hydratedAction.type ?? hydratedAction.form\n\t\t});\n\t\treturn await this.handleActionRequest(hydratedAction, config);\n\t}\n\ttoJsonObject() {\n\t\treturn { type: this.handlerType };\n\t}\n\ttoHandlerRouteItem() {\n\t\treturn { type: this.handlerType };\n\t}\n};\nconst createLocalHandler = () => {\n\treturn new ActionLocalHandler();\n};\n//#endregion\n//#region src/action/utils/decodeActionFrame.ts\n/**\n* Decode a single inbound channel frame (text or binary) into validated action wire JSON, or\n* `undefined` if it isn't a recognisable action payload.\n*\n* Shared by the WebSocket transport's message listener and the server-side `ChannelAcceptor` so\n* both decode identically: a binary `decoder.incoming` (e.g. msgpackr) takes precedence, and plain\n* text frames fall back to JSON — keeping binary and JSON clients interoperable on one channel.\n*/\nfunction decodeActionFrame(frame, decoder) {\n\tconst decoded = decoder?.incoming?.(frame) ?? (typeof frame === \"string\" ? parseJsonActionFrame(frame) : void 0);\n\treturn decoded != null && isActionPayload_Any_JsonObject(decoded) ? decoded : void 0;\n}\nfunction parseJsonActionFrame(message) {\n\ttry {\n\t\tconst json = JSON.parse(message);\n\t\treturn isActionPayload_Any_JsonObject(json) ? json : void 0;\n\t} catch {\n\t\treturn;\n\t}\n}\n//#endregion\n//#region src/action/ActionRuntime/Channel/serveLogger.ts\n/** Build the {@link IActionServeRequestInfo} for an inbound request wire, shared by every serving path. */\nfunction actionServeRequestInfo(wire, meta) {\n\tconst origin = meta.origin ?? (wire.context.originClient != null ? new RuntimeCoordinate(wire.context.originClient).stringId : \"unknown\");\n\treturn {\n\t\ttransport: meta.transport,\n\t\tdomain: wire.domain,\n\t\taction: wire.id,\n\t\tactionId: `${wire.domain}/${wire.id}`,\n\t\torigin,\n\t\tsecurityLevel: meta.securityLevel,\n\t\tinput: wire.input,\n\t\tbytes: meta.bytes,\n\t\treliability: meta.reliability\n\t};\n}\n/**\n* Reduce a result's failure error to the flat `{ id?, message }` a logger shows. Typed against the minimal\n* structural shape of a `NiceError` so {@link serveLogger} stays free of an `connect-core/error` import.\n*/\nfunction serveResultErrorInfo(error) {\n\tconst domain = error.def?.domain;\n\tconst ids = error.ids != null && error.ids.length > 0 ? error.ids.join(\",\") : void 0;\n\treturn {\n\t\tid: domain != null && ids != null ? `${domain}/${ids}` : ids ?? domain,\n\t\tmessage: error.cleanMessage ?? error.message\n\t};\n}\n/**\n* A ready-made {@link IActionServeLogger} that prints one line when a request arrives and one when it has\n* been served, to `console` (or any `sink` you pass). Drop it straight into `serveChannel` so a \"host and\n* forget\" backend gets request/response feedback with no extra wiring:\n* ```ts\n* serveChannel(channel, { identity, storage, carriers, logger: createDefaultServeLogger() });\n* // → [nice-action] ▶ demo_basic/greet  via http  from envId[web_app]…  [encrypted]\n* // ← [nice-action] ✓ demo_basic/greet  ok  via http  12ms\n* ```\n* Inputs are hidden by default (`logInputs: true` to include them).\n*/\nfunction createDefaultServeLogger(options = {}) {\n\tconst sink = options.sink ?? console;\n\tconst tag = options.tag ?? \"[nice-action]\";\n\tconst showSecurity = options.showSecurityLevel ?? true;\n\treturn { onRequest(info) {\n\t\tconst request = [\n\t\t\ttag,\n\t\t\t\"▶\",\n\t\t\tinfo.actionId,\n\t\t\t`via ${info.transport}`,\n\t\t\t`from ${info.origin}`\n\t\t];\n\t\tif (info.bytes != null) request.push(`${info.bytes}B`);\n\t\tif (showSecurity && info.securityLevel != null) request.push(`[${info.securityLevel}]`);\n\t\tif (info.reliability != null) {\n\t\t\tconst { seq, ack, redelivered } = info.reliability;\n\t\t\trequest.push(`reliable seq=${seq ?? \"-\"} ack=${ack ?? \"-\"}${redelivered ? \" (redelivered)\" : \"\"}`);\n\t\t}\n\t\tif (options.logInputs) request.push(`input=${safeJson(info.input)}`);\n\t\tsink.log(request.join(\"  \"));\n\t\treturn (result) => {\n\t\t\tconst line = [\n\t\t\t\ttag,\n\t\t\t\tresult.ok ? \"✓\" : \"✗\",\n\t\t\t\tinfo.actionId,\n\t\t\t\tresult.ok ? \"ok\" : \"FAIL\",\n\t\t\t\t`via ${result.returnedVia}`,\n\t\t\t\t`${result.durationMs}ms`\n\t\t\t];\n\t\t\tif (result.bytes != null) line.push(`${result.bytes}B`);\n\t\t\tif (!result.ok && result.error != null) {\n\t\t\t\tconst prefix = result.error.id != null ? `${result.error.id}: ` : \"\";\n\t\t\t\tline.push(`— ${prefix}${result.error.message}`);\n\t\t\t}\n\t\t\t(result.ok ? sink.log : sink.error)(line.join(\"  \"));\n\t\t};\n\t} };\n}\nfunction safeJson(value) {\n\ttry {\n\t\treturn JSON.stringify(value);\n\t} catch {\n\t\treturn String(value);\n\t}\n}\n//#endregion\n//#region src/action/ActionRuntime/Handler/PeerLink/Acceptor/ChannelAcceptor.ts\n/** Validate + read a rehydrated binding's opaque lane slot back into the lane's shape. */\nfunction readLaneBindingState(lane) {\n\tif (typeof lane !== \"object\" || lane == null || !(\"encoding\" in lane)) return void 0;\n\tconst channelTags = \"channelTags\" in lane && Array.isArray(lane.channelTags) ? lane.channelTags : void 0;\n\treturn {\n\t\tencoding: lane.encoding === \"json\" ? \"json\" : \"binary\",\n\t\tchannelTags\n\t};\n}\n/**\n* Server-side handler for backends that accept many client connections over a single open channel\n* (WebSockets, Durable Objects, …). It is transport-agnostic: you feed it inbound frames with\n* {@link receive} and tell it how to write outbound frames via the `send` option.\n*\n* Since the connection design this class is the **action lane** over a wire-owned {@link WireAcceptor}\n* (reachable as {@link wireAcceptor}): the backbone — handshake accept + secure sessions, security\n* levels, the client-identity registry, frame-protocol registration/dispatch/lifecycle, versioned\n* binding persistence + rehydrate, and keepalive — lives in wire; this handler keeps the action\n* half — codec negotiation, reliable receive (inbox/dedup/acks), request execution routing, and\n* the results/pushes going back out.\n*\n* Add it alongside your local execution handler:\n* ```ts\n* const serverHandler = createChannelAcceptor({ formatMessage, send: (ws, f) => ws.send(f) });\n* runtime.addHandlers([localHandler, serverHandler]);\n* // per inbound message (e.g. a Durable Object's webSocketMessage):\n* serverHandler.receive(ws, message);\n* ```\n*\n* Inbound requests route to your local handler; the runtime's return dispatch then calls this\n* handler back (it owns the originating live connection) to send the result to the originating\n* connection. It registers an empty action router, so it is never chosen to *execute* an inbound\n* request — only to ferry results/pushes back out.\n*/\nvar ChannelAcceptor = class extends PeerLink {\n\t/** Accept-in over a live (duplex) connection registry — it pushes results/broadcasts to bound sockets. */\n\tcanPush = true;\n\t/** The wire-owned acceptor backbone this lane composes on. */\n\twireAcceptor;\n\t_formatMessage;\n\t_createFormatMessage;\n\t_resolveCodec;\n\t_runtime;\n\t_serverTimeout;\n\t_connEncoding = /* @__PURE__ */ new Map();\n\t_codecByConn = /* @__PURE__ */ new Map();\n\t/** The channel tags each connection negotiated — drives its `resolveCodec` selection. */\n\t_connTags = /* @__PURE__ */ new Map();\n\t_inbox = new ReliableInbox();\n\t_persistedReceiver;\n\t/** Trusted arrival facts live beside decoded objects, never in attacker-controlled wire JSON. */\n\t_receiverMetadataByWire = /* @__PURE__ */ new WeakMap();\n\t/**\n\t* Reliable stores may reconstruct buffered JSON as a new object. Retain the matching trusted\n\t* arrival beside the receiver-owned stream/sequence address while this acceptor remains alive.\n\t* A wake deliberately loses this non-serializable socket fact, so restored frames execute with\n\t* no live connection context rather than borrowing whichever socket happened to fill the gap.\n\t*/\n\t_receiverMetadataByReliableStream = /* @__PURE__ */ new Map();\n\t/** A token per live binding prevents an in-flight handler from borrowing a dropped/rebound socket. */\n\t_bindingGenerationByConnection = /* @__PURE__ */ new Map();\n\t_keyedStreamsByClient = /* @__PURE__ */ new Map();\n\t_keyedCapWarned = /* @__PURE__ */ new Set();\n\t_maxKeyedStreams;\n\t_resyncRequested = /* @__PURE__ */ new Set();\n\t_logger;\n\t_transportLabel;\n\t_pendingReports = /* @__PURE__ */ new Map();\n\tconstructor(options) {\n\t\tsuper(RuntimeCoordinate.unknown);\n\t\tthis._formatMessage = options.formatMessage;\n\t\tthis._createFormatMessage = options.createFormatMessage;\n\t\tthis._resolveCodec = options.resolveCodec;\n\t\tthis._runtime = options.runtime;\n\t\tthis._serverTimeout = options.defaultTimeout ?? 1e4;\n\t\tthis._logger = options.logger;\n\t\tthis._transportLabel = options.transportLabel ?? \"ws\";\n\t\tthis._persistedReceiver = options.persistedReceiver;\n\t\tthis._maxKeyedStreams = options.maxKeyedStreamsPerClient ?? 256;\n\t\tconst security = options.security;\n\t\tthis.wireAcceptor = new WireAcceptor({\n\t\t\tsend: options.send,\n\t\t\tclose: options.close,\n\t\t\ttap: options.wireTap,\n\t\t\tsecurity: security == null ? void 0 : {\n\t\t\t\tsecurityLevel: security.securityLevel,\n\t\t\t\tlink: security.link,\n\t\t\t\tlocalCoordinate: security.localCoordinate,\n\t\t\t\tverifyKeyResolver: security.verifyKeyResolver\n\t\t\t},\n\t\t\tonConnectionBound: options.onConnectionBound,\n\t\t\tlane: {\n\t\t\t\tdictionaryVersion: security?.dictionaryVersion,\n\t\t\t\tonFrame: (connection, frame, level) => this._onLaneFrame(connection, frame, level),\n\t\t\t\tonAuthenticated: (connection, auth) => {\n\t\t\t\t\tthis._connEncoding.set(connection, \"binary\");\n\t\t\t\t\tthis._connTags.set(connection, auth.channelTags);\n\t\t\t\t},\n\t\t\t\tbindingState: (connection) => this._laneBindingState(connection),\n\t\t\t\trestoreBindingState: (connection, lane) => {\n\t\t\t\t\tconst state = readLaneBindingState(lane);\n\t\t\t\t\tif (state == null) return;\n\t\t\t\t\tthis._connEncoding.set(connection, state.encoding);\n\t\t\t\t\tthis._connTags.set(connection, state.channelTags);\n\t\t\t\t},\n\t\t\t\tonDrop: (connection, client) => this._onConnectionDropped(connection, client)\n\t\t\t}\n\t\t});\n\t}\n\t/** The lane's opaque binding slot for a connection — persisted by the wire acceptor. */\n\t_laneBindingState(connection) {\n\t\treturn {\n\t\t\tencoding: this._connEncoding.get(connection) ?? \"binary\",\n\t\t\tchannelTags: this._connTags.get(connection)\n\t\t};\n\t}\n\t/**\n\t* Admit (or refuse) a **keyed** reliable stream for a client — the allocation bound on receiver stream\n\t* state, since keys are client-chosen strings. Past the cap the caller serves the frame best-effort\n\t* (delivered, no state) and this warns once per client.\n\t*/\n\t_admitKeyedStream(client, streamId) {\n\t\tlet admitted = this._keyedStreamsByClient.get(client.stringId);\n\t\tif (admitted == null) {\n\t\t\tadmitted = /* @__PURE__ */ new Set();\n\t\t\tthis._keyedStreamsByClient.set(client.stringId, admitted);\n\t\t}\n\t\tif (admitted.has(streamId)) return true;\n\t\tif (admitted.size >= this._maxKeyedStreams) {\n\t\t\tif (!this._keyedCapWarned.has(client.stringId)) {\n\t\t\t\tthis._keyedCapWarned.add(client.stringId);\n\t\t\t\tconsole.warn(`[reliable] client \"${client.stringId}\" exceeded maxKeyedStreamsPerClient (${this._maxKeyedStreams}) — further keyed reliable streams from it are served best-effort (no ordering/dedup state). Raise the option if this is legitimate fan-out.`);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tadmitted.add(streamId);\n\t\treturn true;\n\t}\n\t_setIncomingActionDataListener(runtime, listener) {\n\t\truntime._assertActive();\n\t\tif (runtime.scope !== \"instance\") throw err_nice_action.fromId(\"invalid_server_runtime_scope\", {\n\t\t\truntime: runtime.coordinate.stringId,\n\t\t\tactualScope: runtime.scope\n\t\t});\n\t\treturn super._setIncomingActionDataListener(runtime, listener);\n\t}\n\t/**\n\t* Log an inbound request (basic action/transport/origin facts) before it executes, stashing the returned\n\t* reporter by `cuid` so {@link _reportServed} can pair it with the result. Only requests are logged;\n\t* result/progress frames replying to *our* pushes are not.\n\t*/\n\t_logRequestIn(connection, wire, securityLevel, reliability, bytes) {\n\t\tif (this._logger == null || wire.type !== \"request\") return;\n\t\tconst report = this._logger.onRequest(actionServeRequestInfo(wire, {\n\t\t\ttransport: this._transportLabel,\n\t\t\tsecurityLevel,\n\t\t\torigin: this.wireAcceptor.clientForConnection(connection)?.stringId,\n\t\t\treliability,\n\t\t\tbytes\n\t\t}));\n\t\tif (report != null && this._runtime?.responseModeForWire(wire) !== \"none\") this._pendingReports.set(wire.context.cuid, {\n\t\t\treport,\n\t\t\tstartedAt: Date.now()\n\t\t});\n\t}\n\t/** Report a served result back to the reporter stashed by {@link _logRequestIn} (no-op if none/not a result). */\n\t_reportServed(payload, bytes) {\n\t\tif (payload.type !== \"result\") return;\n\t\tconst entry = this._pendingReports.get(payload.context.cuid);\n\t\tif (entry == null) return;\n\t\tthis._pendingReports.delete(payload.context.cuid);\n\t\tconst durationMs = Date.now() - entry.startedAt;\n\t\tconst outcome = payload.result;\n\t\tentry.report(outcome.ok ? {\n\t\t\tok: true,\n\t\t\treturnedVia: this._transportLabel,\n\t\t\tdurationMs,\n\t\t\tbytes\n\t\t} : {\n\t\t\tok: false,\n\t\t\treturnedVia: this._transportLabel,\n\t\t\tdurationMs,\n\t\t\tbytes,\n\t\t\terror: serveResultErrorInfo(outcome.error)\n\t\t});\n\t}\n\t/**\n\t* The codec for a connection: a per-connection session (cached) when a factory was provided, else\n\t* the single shared `formatMessage`.\n\t*/\n\t_codecFor(connection) {\n\t\tif (this._resolveCodec != null) {\n\t\t\tlet codec = this._codecByConn.get(connection);\n\t\t\tif (codec == null) {\n\t\t\t\tconst factory = this._resolveCodec(this._connTags.get(connection));\n\t\t\t\tif (factory != null) {\n\t\t\t\t\tcodec = factory();\n\t\t\t\t\tthis._codecByConn.set(connection, codec);\n\t\t\t\t\treturn codec;\n\t\t\t\t}\n\t\t\t} else return codec;\n\t\t}\n\t\tif (this._createFormatMessage != null) {\n\t\t\tlet codec = this._codecByConn.get(connection);\n\t\t\tif (codec == null) {\n\t\t\t\tcodec = this._createFormatMessage();\n\t\t\t\tthis._codecByConn.set(connection, codec);\n\t\t\t}\n\t\t\treturn codec;\n\t\t}\n\t\tif (this._formatMessage != null) return this._formatMessage;\n\t\tthrow err_nice_transport.fromId(\"not_found\", { actionId: \"server-handler-codec (provide formatMessage, createFormatMessage, or resolveCodec)\" });\n\t}\n\t/**\n\t* Register (or replace) the connection-bound persistence callback after construction. Used by\n\t* lifecycle helpers like {@link createHibernatableWsServerAdapter} so persistence and replay are\n\t* owned by one place instead of being split across the constructor options.\n\t*/\n\tsetOnConnectionBound(onConnectionBound) {\n\t\tthis.wireAcceptor.setOnConnectionBound(onConnectionBound);\n\t}\n\t/**\n\t* Register a frame protocol (M1 multiplex seam) on the wire acceptor: every connection can then\n\t* exchange the protocol's prefixed frames beside action frames (subject to the wire security\n\t* gate, the connection contract). Register before serving; protocols are advertised in the handshake welcome.\n\t*/\n\tregisterFrameProtocol(protocol) {\n\t\tthis.wireAcceptor.registerProtocol(protocol);\n\t}\n\t/**\n\t* Feed one inbound frame from a connection into the wire acceptor. Prefixed protocol frames and\n\t* the handshake/keepalive are handled there; everything else — the lane's namespace — comes back\n\t* through {@link _onLaneFrame} to be decoded, identity-bound, and routed (requests execute\n\t* locally; results/progress resolve pending server-initiated actions).\n\t*/\n\treceive(connection, frame) {\n\t\tthis.wireAcceptor.receive(connection, frame);\n\t}\n\t/** One inbound lane frame (already decrypted), with the connection's negotiated level. */\n\t_onLaneFrame(connection, frame, level) {\n\t\tconst control = decodeControlFrame(frame);\n\t\tif (control != null) {\n\t\t\tthis._onControlMessage(connection, control);\n\t\t\treturn;\n\t\t}\n\t\tconst codec = this._codecFor(connection);\n\t\tconst wire = decodeActionFrame(frame, codec);\n\t\tif (wire == null) return;\n\t\tif (level === \"none\") {\n\t\t\tconst encoding = typeof frame === \"string\" ? \"json\" : \"binary\";\n\t\t\tthis._connEncoding.set(connection, encoding);\n\t\t\tif (wire.type === \"request\") this._resolveRequestIdentity(connection, wire);\n\t\t} else if (wire.type === \"request\") {\n\t\t\tconst bound = this.wireAcceptor.clientForConnection(connection);\n\t\t\tif (bound != null) wire.context.originClient = bound.toJsonObject();\n\t\t}\n\t\tthis._dispatchInbound(connection, wire, codec, frame, level);\n\t}\n\t/**\n\t* Route a decoded inbound frame to the runtime. A best-effort frame is logged + emitted as before. A\n\t* **reliable** request (its frame carries a `seq`) goes through the {@link ReliableInbox}: it's\n\t* dispatched only in contiguous order (out-of-order frames buffer), duplicates are suppressed, and a\n\t* duplicate/gap sends a standalone ack so the client's outbox drains. `frame` is the raw (decrypted)\n\t* encoded bytes the codec re-reads for the reliability slot.\n\t*/\n\t_dispatchInbound(connection, wire, codec, frame, level) {\n\t\tif (wire.type === \"request\") {\n\t\t\tlet bindingGeneration = this._bindingGenerationByConnection.get(connection);\n\t\t\tif (bindingGeneration == null) {\n\t\t\t\tbindingGeneration = {};\n\t\t\t\tthis._bindingGenerationByConnection.set(connection, bindingGeneration);\n\t\t\t}\n\t\t\tthis._receiverMetadataByWire.set(wire, {\n\t\t\t\treceiver: this,\n\t\t\t\tconnection,\n\t\t\t\tbindingGeneration,\n\t\t\t\tsecurityLevel: level\n\t\t\t});\n\t\t}\n\t\tconst reliability = wire.type === \"request\" ? codec.incomingReliability?.(frame) : void 0;\n\t\tconst bytes = this._logger != null ? wireFrameByteSize(frame) : void 0;\n\t\tif (reliability?.seq != null) {\n\t\t\tthis._dispatchReliableRequest(connection, wire, reliability.seq, level, reliability.streamKey, bytes);\n\t\t\treturn;\n\t\t}\n\t\tthis._logRequestIn(connection, wire, level, void 0, bytes);\n\t\tthis._emitIncomingFromReceiver(wire);\n\t}\n\t/** Ordered/dedup dispatch of one reliable request via the inbox (see {@link _dispatchInbound}). */\n\t_dispatchReliableRequest(connection, wire, seq, level, streamKey, bytes) {\n\t\tconst client = this.wireAcceptor.clientForConnection(connection);\n\t\tif (client == null) {\n\t\t\tthis._logRequestIn(connection, wire, level, void 0, bytes);\n\t\t\tthis._emitIncomingFromReceiver(wire);\n\t\t\treturn;\n\t\t}\n\t\tconst streamId = reliableStreamId(client, wire.domain, wire.id, streamKey);\n\t\tif (streamKey != null && !this._admitKeyedStream(client, streamId)) {\n\t\t\tthis._logRequestIn(connection, wire, level, void 0, bytes);\n\t\t\tthis._emitIncomingFromReceiver(wire);\n\t\t\treturn;\n\t\t}\n\t\tconst receiver = this._receiverForWire(wire);\n\t\tconst { deliver, duplicate, needsResync } = receiver.receive(streamId, seq, wire);\n\t\tif (needsResync) {\n\t\t\tthis._forgetReliableReceiverMetadata(streamId, seq);\n\t\t\tif (!this._resyncRequested.has(streamId)) {\n\t\t\t\tthis._resyncRequested.add(streamId);\n\t\t\t\tthis._sendControl(connection, streamKey == null ? {\n\t\t\t\t\t$c: \"rsync\",\n\t\t\t\t\tdomain: wire.domain,\n\t\t\t\t\tid: wire.id\n\t\t\t\t} : {\n\t\t\t\t\t$c: \"rsync\",\n\t\t\t\t\tdomain: wire.domain,\n\t\t\t\t\tid: wire.id,\n\t\t\t\t\tk: streamKey\n\t\t\t\t});\n\t\t\t\tconsole.warn(`[reliable] stream reset detected for \"${wire.domain}:${wire.id}\" (received seq ${seq} with no prior state) — requesting client re-sync of its in-flight frames. Use the persisted tier (.reliable({ persist: true })) to also survive eviction without a re-sync.`);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tthis._resyncRequested.delete(streamId);\n\t\tconst ack = receiver.contiguousSeq(streamId);\n\t\tconst receivedReliability = {\n\t\t\tseq,\n\t\t\tack,\n\t\t\tredelivered: duplicate\n\t\t};\n\t\tif (!duplicate && deliver.length === 0 && ack != null && seq > ack && seq - ack <= 1024) {\n\t\t\tconst arrival = this._receiverMetadataByWire.get(wire);\n\t\t\tif (arrival != null) this._rememberReliableReceiverMetadata(streamId, seq, arrival);\n\t\t}\n\t\tif (this._runtime?.responseModeForWire(wire) === \"none\") {\n\t\t\tthis._emitReliableDelivered(connection, deliver, level, receivedReliability, streamKey, bytes, this._receiverMetadataByWire.get(wire), streamId);\n\t\t\tthis._sendControl(connection, streamKey == null ? {\n\t\t\t\t$c: \"rack\",\n\t\t\t\tdomain: wire.domain,\n\t\t\t\tid: wire.id,\n\t\t\t\tack\n\t\t\t} : {\n\t\t\t\t$c: \"rack\",\n\t\t\t\tdomain: wire.domain,\n\t\t\t\tid: wire.id,\n\t\t\t\tack,\n\t\t\t\tk: streamKey\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (duplicate) {\n\t\t\tthis._logRequestIn(connection, wire, level, receivedReliability, bytes);\n\t\t\tthis._emitIncomingFromReceiver(wire, streamKey == null ? {\n\t\t\t\tseq,\n\t\t\t\tredelivered: true\n\t\t\t} : {\n\t\t\t\tseq,\n\t\t\t\tstreamKey,\n\t\t\t\tredelivered: true\n\t\t\t});\n\t\t\tthis._forgetReliableReceiverMetadata(streamId, seq);\n\t\t\treturn;\n\t\t}\n\t\tthis._emitReliableDelivered(connection, deliver, level, receivedReliability, streamKey, bytes, this._receiverMetadataByWire.get(wire), streamId);\n\t}\n\t/**\n\t* Stamp the receiver-side reliability facts onto a delivered frame's **local** context (the\n\t* `originClient`-overwrite pattern) so the executing handler reads them as `action.context.reliability`\n\t* — the free idempotency key. Local-only: `toJsonObject()` never writes the field, so a reply built off\n\t* this context is byte-identical with and without the stamp.\n\t*/\n\t_emitIncomingFromReceiver(wire, reliability, arrivalOverride) {\n\t\tconst arrival = arrivalOverride ?? this._receiverMetadataByWire.get(wire);\n\t\tthis._receiverMetadataByWire.delete(wire);\n\t\tconst securityLevel = arrival?.securityLevel;\n\t\tthis._emitIncoming(wire, {\n\t\t\treceiver: this,\n\t\t\tconnection: arrival?.connection,\n\t\t\tbindingGeneration: arrival?.bindingGeneration,\n\t\t\tsecurityLevel,\n\t\t\toriginAuthenticated: securityLevel != null && securityLevel !== \"none\",\n\t\t\treliability\n\t\t});\n\t}\n\t/**\n\t* Log + emit each frame the receiver decided to deliver in this receive. Only the **first** (the frame\n\t* actually received this call) carries the reliability facts for the *logger*; drained buffered frames\n\t* were logged/seq'd on their own earlier arrivals, so they log without a (stale) seq. Every delivered\n\t* frame is stamped with its **own** seq for the executing handler, though — delivered frames are a\n\t* contiguous run ending at the new high-water (`ack`), so frame `i` carries `ack - (length - 1 - i)`.\n\t*/\n\t_emitReliableDelivered(connection, deliver, level, receivedReliability, streamKey, bytes, receivedArrival, streamId) {\n\t\tconst ack = receivedReliability.ack;\n\t\tdeliver.forEach((delivered, index) => {\n\t\t\tconst deliveredSeq = ack != null ? ack - (deliver.length - 1 - index) : void 0;\n\t\t\tconst arrivalOverride = deliveredSeq != null && deliveredSeq === receivedReliability.seq ? receivedArrival : deliveredSeq != null && streamId != null ? this._takeReliableReceiverMetadata(streamId, deliveredSeq) : void 0;\n\t\t\tthis._logRequestIn(connection, delivered, level, index === 0 ? receivedReliability : void 0, index === 0 ? bytes : void 0);\n\t\t\tif (ack != null) {\n\t\t\t\tconst reliability = streamKey == null ? {\n\t\t\t\t\tseq: ack - (deliver.length - 1 - index),\n\t\t\t\t\tredelivered: false\n\t\t\t\t} : {\n\t\t\t\t\tseq: ack - (deliver.length - 1 - index),\n\t\t\t\t\tstreamKey,\n\t\t\t\t\tredelivered: false\n\t\t\t\t};\n\t\t\t\tthis._emitIncomingFromReceiver(delivered, reliability, arrivalOverride);\n\t\t\t} else this._emitIncomingFromReceiver(delivered, void 0, arrivalOverride);\n\t\t});\n\t}\n\t/**\n\t* The receive store a reliable frame's stream is served by: the persisted {@link _persistedReceiver} for a\n\t* `persisted`-tier action (when one is configured), else the in-memory {@link _inbox}. A persisted action with\n\t* no configured store degrades to the inbox (session-tier behavior) rather than failing.\n\t*/\n\t_receiverForWire(wire) {\n\t\treturn this._receiverForRoute(wire.domain, wire.id);\n\t}\n\t/** {@link _receiverForWire} by bare route — for control messages, which carry no action payload. */\n\t_receiverForRoute(domain, id) {\n\t\tif (this._persistedReceiver != null && this._runtime?.reliabilityTierForRoute(domain, id) === \"persisted\") return this._persistedReceiver;\n\t\treturn this._inbox;\n\t}\n\t/**\n\t* A sender-originated transport control message arrived on a connection. `rskip` and `rclose` are the\n\t* meaningful ones server-side (`rack`/`rsync` flow the other way — a decoded one here is simply\n\t* ignored). `rskip`: the client's outbox **abandoned** every undelivered frame `<= seq` of the stream\n\t* (their actions aborted / delivery deadlines expired), so advance the stream past the abandoned seqs\n\t* and deliver whatever was buffered behind the gap — the stream continues instead of wedging on frames\n\t* that will never arrive; the new high-water is re-acked so the client can retire the skip. `rclose`:\n\t* the client closed the stream for good — release its receiver state (a pure reclaim).\n\t*/\n\t_onControlMessage(connection, message) {\n\t\tif (message.$c === \"rclose\") {\n\t\t\tconst client = this.wireAcceptor.clientForConnection(connection);\n\t\t\tif (client == null) return;\n\t\t\tconst streamId = reliableStreamId(client, message.domain, message.id, message.k);\n\t\t\tthis._receiverForRoute(message.domain, message.id).forgetStream?.(streamId);\n\t\t\tthis._inbox.forget(streamId);\n\t\t\tthis._resyncRequested.delete(streamId);\n\t\t\tif (message.k != null) this._keyedStreamsByClient.get(client.stringId)?.delete(streamId);\n\t\t\tthis._receiverMetadataByReliableStream.delete(streamId);\n\t\t\treturn;\n\t\t}\n\t\tif (message.$c !== \"rskip\") return;\n\t\tconst client = this.wireAcceptor.clientForConnection(connection);\n\t\tif (client == null) return;\n\t\tconst streamId = reliableStreamId(client, message.domain, message.id, message.k);\n\t\tif (message.k != null && !this._admitKeyedStream(client, streamId)) return;\n\t\tconst { deliver, ack } = this._receiverForRoute(message.domain, message.id).skipTo(streamId, message.seq);\n\t\tthis._forgetReliableReceiverMetadataThrough(streamId, message.seq);\n\t\tthis._resyncRequested.delete(streamId);\n\t\tthis._emitReliableDelivered(connection, deliver, this.wireAcceptor.levelFor(connection), { ack }, message.k, void 0, void 0, streamId);\n\t\tthis._sendControl(connection, message.k == null ? {\n\t\t\t$c: \"rack\",\n\t\t\tdomain: message.domain,\n\t\t\tid: message.id,\n\t\t\tack\n\t\t} : {\n\t\t\t$c: \"rack\",\n\t\t\tdomain: message.domain,\n\t\t\tid: message.id,\n\t\t\tack,\n\t\t\tk: message.k\n\t\t});\n\t}\n\t_rememberReliableReceiverMetadata(streamId, seq, metadata) {\n\t\tlet bySeq = this._receiverMetadataByReliableStream.get(streamId);\n\t\tif (bySeq == null) {\n\t\t\tbySeq = /* @__PURE__ */ new Map();\n\t\t\tthis._receiverMetadataByReliableStream.set(streamId, bySeq);\n\t\t}\n\t\tif (!bySeq.has(seq)) bySeq.set(seq, metadata);\n\t}\n\t_takeReliableReceiverMetadata(streamId, seq) {\n\t\tconst bySeq = this._receiverMetadataByReliableStream.get(streamId);\n\t\tconst metadata = bySeq?.get(seq);\n\t\tbySeq?.delete(seq);\n\t\tif (bySeq?.size === 0) this._receiverMetadataByReliableStream.delete(streamId);\n\t\treturn metadata;\n\t}\n\t_forgetReliableReceiverMetadata(streamId, seq) {\n\t\tthis._takeReliableReceiverMetadata(streamId, seq);\n\t}\n\t_forgetReliableReceiverMetadataThrough(streamId, through) {\n\t\tconst bySeq = this._receiverMetadataByReliableStream.get(streamId);\n\t\tif (bySeq == null) return;\n\t\tfor (const seq of bySeq.keys()) if (seq <= through) bySeq.delete(seq);\n\t\tif (bySeq.size === 0) this._receiverMetadataByReliableStream.delete(streamId);\n\t}\n\t/** Encode + send a transport {@link TControlMessage} to a connection (through its secure session if any). */\n\t_sendControl(connection, message) {\n\t\tthis.wireAcceptor.sendTo(connection, encodeControlFrame(message));\n\t}\n\t/**\n\t* Ensure an inbound request carries the client's identity and that this connection is bound to it,\n\t* so its result can be routed back. A session codec omits `originClient` after the first request, so\n\t* when it's missing we restore it from the (possibly rehydrated) binding instead. (Plain mode only;\n\t* secure mode binds the authenticated coordinate at handshake time.)\n\t*/\n\t_resolveRequestIdentity(connection, wire) {\n\t\tconst wireOrigin = wire.context.originClient;\n\t\tif (wireOrigin != null && wireOrigin.envId !== \"_unset_\") {\n\t\t\tconst client = new RuntimeCoordinate(wireOrigin);\n\t\t\tconst previous = this.wireAcceptor.clientForConnection(connection);\n\t\t\tif (previous != null && previous.stringId !== client.stringId) this._bindingGenerationByConnection.delete(connection);\n\t\t\tthis.wireAcceptor.bindPlainConnection(connection, client);\n\t\t\treturn;\n\t\t}\n\t\tconst bound = this.wireAcceptor.clientForConnection(connection);\n\t\tif (bound != null) wire.context.originClient = bound.toJsonObject();\n\t}\n\t/**\n\t* Restore a connection→client binding without an inbound frame — for transports that resume after\n\t* eviction. Pair it with the {@link IChannelAcceptorOptions.onConnectionBound} hook: persist\n\t* the binding there, then replay each live connection here when the channel comes back (e.g. a\n\t* Durable Object iterating `ctx.getWebSockets()` as it wakes from hibernation). A binding persisted\n\t* before the versioned (`v: 1`) schema is ignored — the socket is treated as fresh.\n\t*/\n\trehydrate(connection, binding) {\n\t\tthis.wireAcceptor.rehydrate(connection, binding);\n\t}\n\ttoJsonObject() {\n\t\treturn {\n\t\t\ttype: this.handlerType,\n\t\t\tclient: this.peer\n\t\t};\n\t}\n\ttoHandlerRouteItem() {\n\t\treturn {\n\t\t\ttype: this.handlerType,\n\t\t\tclient: this.peer,\n\t\t\ttransShape: \"duplex\",\n\t\t\ttransOrd: 0\n\t\t};\n\t}\n\t/** Forget a connection (call on socket close) so stale entries don't misroute later results. */\n\tdrop(connection) {\n\t\tthis.wireAcceptor.drop(connection);\n\t}\n\t/** Permanently quiesce this acceptor and detach every live/rehydrated connection. */\n\tdispose() {\n\t\tthis.wireAcceptor.dispose();\n\t}\n\t/** Lane cleanup when the wire acceptor drops a connection (fired with the bound client, if any). */\n\t_onConnectionDropped(connection, client) {\n\t\tif (client != null) {\n\t\t\tconst prefix = `${client.stringId}::`;\n\t\t\tfor (const streamId of this._resyncRequested) if (streamId.startsWith(prefix)) this._resyncRequested.delete(streamId);\n\t\t}\n\t\tthis._connEncoding.delete(connection);\n\t\tthis._codecByConn.delete(connection);\n\t\tthis._connTags.delete(connection);\n\t\tthis._bindingGenerationByConnection.delete(connection);\n\t\tfor (const bySeq of this._receiverMetadataByReliableStream.values()) for (const metadata of bySeq.values()) {\n\t\t\tif (metadata.connection !== connection) continue;\n\t\t\tmetadata.connection = void 0;\n\t\t\tmetadata.bindingGeneration = void 0;\n\t\t}\n\t}\n\t_liveArrivalConnection(metadata) {\n\t\tconst connection = metadata.connection;\n\t\treturn metadata.receiver === this && connection != null && metadata.bindingGeneration != null && this._bindingGenerationByConnection.get(connection) === metadata.bindingGeneration && this.wireAcceptor.hasConnection(connection) ? connection : void 0;\n\t}\n\t/** Live connection for a client coordinate, if currently registered. */\n\tgetConnectionForClient(client) {\n\t\treturn this.wireAcceptor.connectionForClient(client.stringId);\n\t}\n\t/** This acceptor owns the origin's return path when it currently holds a live connection bound to it. */\n\townsLiveConnectionFor(origin) {\n\t\treturn this.wireAcceptor.ownsLiveConnectionFor(origin.stringId);\n\t}\n\t/** Whether this acceptor currently tracks `connection` — used to pick the owning handler among several. */\n\thasConnection(connection) {\n\t\treturn this.wireAcceptor.hasConnection(connection);\n\t}\n\t/**\n\t* Send (and optionally await) a server-initiated action to a specific connected client. Pass the\n\t* connection token directly (e.g. the `ws`) or a client `RuntimeCoordinate` to look one up.\n\t*/\n\tpushToClient(runtime, target, request, options) {\n\t\tconst connection = this._resolveConnection(target);\n\t\treturn this._dispatch(runtime, connection, request, options?.timeout);\n\t}\n\t/**\n\t* Build a local handler whose cases are connection-aware: each case receives the primed request and\n\t* the originating client's live connection (resolved from `originClient`), so handlers don't repeat\n\t* the `getConnectionForClient(action.context.originClient)` lookup. Cases may return raw output or\n\t* nothing, just like {@link ActionLocalHandler.forDomainActionCases}. Add the returned handler to the\n\t* runtime alongside this server handler:\n\t* ```ts\n\t* runtime.addHandlers([serverHandler.forConnectionDomainCases(domain, { … }), serverHandler]);\n\t* ```\n\t*/\n\tforConnectionDomainCases(domain, cases) {\n\t\treturn this.forConnectionDomainCasesMulti([domain], cases, (connection) => connection);\n\t}\n\t/**\n\t* Like {@link forConnectionDomainCases} but spanning several domains with one merged case map — used\n\t* by channel-derived wiring (`acceptChannelConnections` / `serveChannel`) where the channel's\n\t* `toAcceptor` domains are served together. Each domain takes only the cases whose ids it owns, so a\n\t* single map can cover several domains and unrelated ids are ignored.\n\t*\n\t* `mapContext` turns the resolved connection into whatever the case's second argument should be: the\n\t* raw connection for the low-level helper, or an enriched `IConnectionContext` for `serveChannel`. It's\n\t* called once per inbound action, after the originating connection is resolved.\n\t*/\n\tforConnectionDomainCasesMulti(domains, cases, mapContext) {\n\t\tconst handler = new ActionLocalHandler();\n\t\tfor (const domain of domains) {\n\t\t\tconst ownedIds = new Set(Object.keys(domain.actionsMap()));\n\t\t\tconst wrapped = {};\n\t\t\tfor (const id in cases) {\n\t\t\t\tif (!ownedIds.has(id)) continue;\n\t\t\t\tconst caseFn = cases[id];\n\t\t\t\tif (caseFn == null) continue;\n\t\t\t\twrapped[id] = (request, execution) => {\n\t\t\t\t\tconst metadata = request.context._getReceiverMetadata();\n\t\t\t\t\tconst connection = metadata == null ? void 0 : this._liveArrivalConnection(metadata);\n\t\t\t\t\tconst isConnectionLive = () => connection != null && this._bindingGenerationByConnection.get(connection) === metadata?.bindingGeneration && this.wireAcceptor.hasConnection(connection);\n\t\t\t\t\treturn caseFn(request, mapContext(connection, request, isConnectionLive, execution));\n\t\t\t\t};\n\t\t\t}\n\t\t\thandler.forDomainActionCases(domain, wrapped);\n\t\t}\n\t\treturn handler;\n\t}\n\t/**\n\t* Fan a server-initiated request out to every currently-bound connection. A fresh request is built\n\t* per connection (each push mutates its own action context) and dispatched fire-and-forget. Pass\n\t* `except` to skip the originating socket and `where` to filter by connection (e.g. read its\n\t* attachment for a role). Iterating bound connections (rather than every accepted socket) skips\n\t* sockets that are still mid-handshake and so can't yet receive a frame.\n\t*/\n\tbroadcast(makeRequest, options) {\n\t\tconst runtime = options?.runtime ?? this._runtime;\n\t\tif (runtime == null) throw err_nice_transport.fromId(\"not_found\", { actionId: \"server-handler-runtime (construct with `runtime` or pass `options.runtime`)\" });\n\t\tfor (const connection of this.wireAcceptor.connections()) {\n\t\t\tif (options?.except != null && connection === options.except) continue;\n\t\t\tif (options?.where != null && !options.where(connection)) continue;\n\t\t\ttry {\n\t\t\t\tthis.pushToClient(runtime, connection, makeRequest(), { timeout: options?.timeout });\n\t\t\t} catch (error) {\n\t\t\t\tif (options?.onError != null) options.onError(error, connection);\n\t\t\t\telse console.error(\"[ws-server] broadcast push failed\", error);\n\t\t\t}\n\t\t}\n\t}\n\tasync sendReturnPayload(payload, config) {\n\t\tconst arrival = config.arrival ?? payload.context._getReceiverMetadata();\n\t\tconst connection = arrival == null ? this.wireAcceptor.connectionForClient(payload.context.originClient.stringId) : arrival.receiver === this ? this._liveArrivalConnection(arrival) : void 0;\n\t\tif (connection == null) return false;\n\t\tconst bytes = this._sendPayload(connection, payload, config.targetLocalRuntime.coordinate, arrival?.reliability);\n\t\tthis._reportServed(payload, bytes);\n\t\treturn true;\n\t}\n\tasync handleActionRequest(action, config) {\n\t\tconst runtime = config?.targetLocalRuntime ?? ActionRuntime.getDefault();\n\t\tconst connection = this._resolveSingleConnection();\n\t\treturn this._dispatch(runtime, connection, action, config?.timeout);\n\t}\n\t_dispatch(runtime, connection, action, timeout) {\n\t\tconst timeoutMs = timeout ?? this._serverTimeout;\n\t\tif (action.schema.reliabilityTier !== \"none\") warnReliablePushUnsupportedOnce(action.domain, action.id);\n\t\taction.context._setOriginClient(runtime.coordinate);\n\t\taction.context.addRouteItem({\n\t\t\truntime: runtime.coordinate,\n\t\t\thandler: this.toHandlerRouteItem(),\n\t\t\ttime: Date.now()\n\t\t});\n\t\tconst runningAction = new RunningAction({\n\t\t\tcontext: action.context,\n\t\t\trequest: action,\n\t\t\tparentCuid: peekHandlerCuid(),\n\t\t\tcallSite: action._callSite\n\t\t});\n\t\truntime.registerRunningAction(runningAction);\n\t\tif (action.schema.responseMode === \"none\") {\n\t\t\ttry {\n\t\t\t\tthis._sendPayload(connection, action, runtime.coordinate);\n\t\t\t\trunningAction._completeWithResult(action.successResult(void 0));\n\t\t\t} catch (err) {\n\t\t\t\trunningAction._abort(this._pushSendError(action.id, err));\n\t\t\t}\n\t\t\treturn runningAction;\n\t\t}\n\t\tconst timeoutId = setTimeout(() => {\n\t\t\trunningAction._abort(err_nice_transport.fromId(\"timeout\", { timeout: timeoutMs }));\n\t\t}, timeoutMs);\n\t\trunningAction.addUpdateListeners([(update) => {\n\t\t\tif (update.type === \"finished\") clearTimeout(timeoutId);\n\t\t}]);\n\t\ttry {\n\t\t\tthis._sendPayload(connection, action, runtime.coordinate);\n\t\t} catch (err) {\n\t\t\trunningAction._abort(this._pushSendError(action.id, err));\n\t\t}\n\t\treturn runningAction;\n\t}\n\t/** A failed push send as a typed `send_failed`, keeping the carrier's error as the origin. */\n\t_pushSendError(actionId, cause) {\n\t\tif (err_nice_transport.isExact(cause)) return cause;\n\t\treturn err_nice_transport.fromId(\"send_failed\", {\n\t\t\tactionId,\n\t\t\tactionState: \"request\",\n\t\t\tmessage: cause instanceof Error ? cause.message : String(cause)\n\t\t}).withOriginError(cause);\n\t}\n\t/** Encode + send one payload; returns the encoded frame's size so a logger can report it. */\n\t_sendPayload(connection, payload, localClient, answered) {\n\t\tconst encoding = this._connEncoding.get(connection) ?? \"binary\";\n\t\tlet rel;\n\t\tif (payload.type === \"result\") {\n\t\t\tconst streamKey = (answered ?? payload.context.reliability)?.streamKey;\n\t\t\tconst streamId = reliableStreamId(payload.context.originClient, payload.domain, payload.id, streamKey);\n\t\t\tconst receiver = this._persistedReceiver?.hasStream(streamId) ? this._persistedReceiver : this._inbox.hasStream(streamId) ? this._inbox : void 0;\n\t\t\tif (receiver != null) {\n\t\t\t\tconst ack = receiver.contiguousSeq(streamId);\n\t\t\t\trel = streamKey == null ? {\n\t\t\t\t\tstreamId,\n\t\t\t\t\tack\n\t\t\t\t} : {\n\t\t\t\t\tstreamId,\n\t\t\t\t\tack,\n\t\t\t\t\tstreamKey\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\tconst frame = encoding === \"json\" ? JSON.stringify(payload.toJsonObject()) : this._codecFor(connection).outgoing({\n\t\t\taction: payload,\n\t\t\tlocalClient,\n\t\t\texternalClient: this.peer,\n\t\t\treliability: rel\n\t\t});\n\t\tthis.wireAcceptor.sendTo(connection, frame);\n\t\treturn wireFrameByteSize(frame);\n\t}\n\t_resolveConnection(target) {\n\t\tif (target instanceof RuntimeCoordinate) {\n\t\t\tconst connection = this.wireAcceptor.connectionForClient(target.stringId);\n\t\t\tif (connection == null) throw err_nice_transport.fromId(\"not_found\", { actionId: target.stringId });\n\t\t\treturn connection;\n\t\t}\n\t\treturn target;\n\t}\n\t_resolveSingleConnection() {\n\t\tif (this.wireAcceptor.connectionCount !== 1) throw err_nice_transport.fromId(\"not_found\", { actionId: \"server-handler-target (use pushToClient with an explicit connection or client coordinate)\" });\n\t\tconst first = this.wireAcceptor.connections().next();\n\t\tif (first.done === true) throw err_nice_transport.fromId(\"not_found\", { actionId: \"server-handler-target\" });\n\t\treturn first.value;\n\t}\n};\nconst createChannelAcceptor = (options) => {\n\treturn new ChannelAcceptor(options);\n};\n//#endregion\n//#region src/action/ActionRuntime/Handler/PeerLink/Acceptor/createSecureChannelAcceptor.ts\n/** Default accepted set: negotiate per connection to whatever the client picks. */\nconst DEFAULT_SERVER_SECURITY_LEVELS$1 = [\n\t\"none\",\n\t\"authenticated\",\n\t\"encrypted\"\n];\n/**\n* Build an {@link ChannelAcceptor} for the secure binary channel with the boilerplate folded in:\n* it creates the {@link ClientCryptoKeyLink} and the storage-backed TOFU resolver from a single\n* `storage`, installs the channel's per-connection codec, and assembles the `security` block\n* from the runtime coordinate + channel version (accepting all three levels by default).\n*\n* For a hibernatable transport (e.g. a Durable Object), pair it with\n* {@link createHibernatableWsServerAdapter} to wire persistence + replay.\n*/\nfunction createSecureChannelAcceptor(options) {\n\toptions.runtime._assertActive();\n\tif (options.runtime.scope !== \"instance\") throw err_nice_action.fromId(\"invalid_server_runtime_scope\", {\n\t\truntime: options.runtime.coordinate.stringId,\n\t\tactualScope: options.runtime.scope\n\t});\n\tconst link = options.link ?? new ClientCryptoKeyLink({ storageAdapter: options.storage });\n\tconst resolveChannel = options.resolveChannel;\n\tconst baseSecurity = {\n\t\tsecurityLevel: options.securityLevel ?? DEFAULT_SERVER_SECURITY_LEVELS$1,\n\t\tlink,\n\t\tlocalCoordinate: options.runtime.coordinate.toJsonObject(),\n\t\tverifyKeyResolver: options.verifyKeyResolver ?? createStorageTofuVerifyKeyResolver(options.storage)\n\t};\n\tconst baseOptions = {\n\t\tsend: options.send,\n\t\tclose: options.close,\n\t\truntime: options.runtime,\n\t\tdefaultTimeout: options.defaultTimeout,\n\t\tlogger: options.logger,\n\t\twireTap: options.wireTap,\n\t\ttransportLabel: options.transportLabel,\n\t\tpersistedReceiver: options.persistedReceiver,\n\t\tmaxKeyedStreamsPerClient: options.maxKeyedStreamsPerClient\n\t};\n\tif (resolveChannel != null) return new ChannelAcceptor({\n\t\t...baseOptions,\n\t\tresolveCodec: (tags) => resolveChannel(tags)?.createCodec,\n\t\tsecurity: {\n\t\t\t...baseSecurity,\n\t\t\tdictionaryVersion: (hello) => resolveChannel(hello.channels)?.dictionaryVersion ?? null\n\t\t}\n\t});\n\treturn new ChannelAcceptor({\n\t\t...baseOptions,\n\t\tcreateFormatMessage: options.channel.createCodec,\n\t\tsecurity: {\n\t\t\t...baseSecurity,\n\t\t\tdictionaryVersion: options.channel.dictionaryVersion\n\t\t}\n\t});\n}\n//#endregion\n//#region src/action/ActionRuntime/Transport/Carrier/Carrier.types.ts\n/**\n* Convert action routing data into wire's generic carrier dial shape. The routing fields also stay at\n* the top level, so a carrier source written for the older `open(input: TTransportRouteParams)` shape\n* still reads `input.action`.\n*/\nfunction toActionDialParams(input) {\n\treturn {\n\t\t...input,\n\t\tdialContext: input\n\t};\n}\n/**\n* Narrow a carrier source to the exchange shape via its `shape` discriminant — the one branch the\n* internal `transport()` factory uses to pick the duplex vs exchange transport. A duplex source carries\n* no `shape`, so the `else` branch is the duplex one.\n*/\nfunction isExchangeCarrierSource(carrier) {\n\treturn \"shape\" in carrier && carrier.shape === \"exchange\";\n}\n//#endregion\n//#region src/action/ActionRuntime/Transport/codec/actionWireCodec.ts\n/**\n* The single integer a reliable frame carries in its trailing envelope slot, chosen by direction:\n* a request carries its `seq`, any reply/progress carries the cumulative `ack`. Returns `undefined`\n* when there's nothing to stamp, so the codec keeps the frame at its best-effort length.\n*/\nfunction encodeReliabilitySlot(reliability, payloadType) {\n\tif (reliability == null) return void 0;\n\tconst value = payloadType === \"request\" ? reliability.seq : reliability.ack;\n\treturn value == null ? void 0 : value;\n}\n/**\n* Reconstruct the {@link IFrameReliabilityWire} from a decoded slot value, by payload direction — or\n* `undefined` when the slot isn't a well-formed reliability integer (a request's `seq` must be an integer\n* `>= 0`; a reply's cumulative `ack` an integer `>= -1`). The slot comes straight off the peer's wire, so\n* a malformed value from a buggy/hostile peer must degrade the frame to best-effort dispatch rather than\n* pollute stream state with a garbage seq.\n*/\nfunction decodeReliabilitySlot(value, payloadType) {\n\tconst min = payloadType === \"request\" ? 0 : -1;\n\tif (typeof value !== \"number\" || !Number.isInteger(value) || value < min) return void 0;\n\treturn payloadType === \"request\" ? { seq: value } : { ack: value };\n}\n/**\n* Tiny integer codes for the payload type, so the verbose `\"request\"`/`\"result\"`/`\"progress\"`\n* strings never hit the wire. The index in {@link ReversePayloadType} must line up with the value.\n*/\nconst PayloadTypeToInt = {\n\t[\"request\"]: 0,\n\t[\"result\"]: 1,\n\t[\"progress\"]: 2\n};\nconst ReversePayloadType = [\n\t\"request\",\n\t\"result\",\n\t\"progress\"\n];\n/**\n* Build the positional `domain:id` ↔ integer dictionary. Both ends of a channel MUST build it from\n* the same domains in the same order — the mapping is positional, so a mismatch routes to the wrong\n* action. Add new transported domains to the end of the list.\n*/\nfunction buildActionRouteDictionary(domains) {\n\tconst routeToInt = /* @__PURE__ */ new Map();\n\tconst intToRoute = [];\n\tfor (const dom of domains) for (const actionId of Object.keys(dom.actionSchema)) {\n\t\tconst routeKey = `${dom.domain}:${actionId}`;\n\t\tif (routeToInt.has(routeKey)) continue;\n\t\trouteToInt.set(routeKey, intToRoute.length);\n\t\tintToRoute.push({\n\t\t\tdomain: dom.domain,\n\t\t\tid: actionId,\n\t\t\tallDomains: dom.allDomains\n\t\t});\n\t}\n\treturn {\n\t\trouteToInt,\n\t\tintToRoute\n\t};\n}\n/** Pull the type-specific payload (`input` / `result` / `progress`) out of a wire JSON object. */\nfunction extractWirePayload(json) {\n\tif (json.type === \"request\") return json.input;\n\tif (json.type === \"result\") return json.result;\n\tif (json.type === \"progress\") return json.progress;\n}\n/**\n* Reassemble a full wire JSON object from its decoded parts. `inputHash`/`outputHash` are emitted\n* empty — the hydration constructors recompute them — and the result still satisfies\n* `isActionPayload_Any_JsonObject` so it flows through validation like a JSON frame.\n*/\nfunction assembleWireJson(routeMeta, payloadType, time, context, payloadData) {\n\tconst base = {\n\t\tform: \"data\",\n\t\tdomain: routeMeta.domain,\n\t\tid: routeMeta.id,\n\t\tallDomains: routeMeta.allDomains,\n\t\ttime,\n\t\tcontext\n\t};\n\tif (payloadType === \"request\") return {\n\t\t...base,\n\t\ttype: \"request\",\n\t\tinput: payloadData,\n\t\tinputHash: \"\"\n\t};\n\tif (payloadType === \"result\") return {\n\t\t...base,\n\t\ttype: \"result\",\n\t\tresult: payloadData,\n\t\toutputHash: \"\"\n\t};\n\treturn {\n\t\t...base,\n\t\ttype: \"progress\",\n\t\tprogress: payloadData\n\t};\n}\n//#endregion\n//#region src/action/ActionRuntime/Transport/codec/createBinaryWireSessionFactory.ts\n/**\n* Positional layout of the *session* binary envelope — the leanest frame. Compared to the stateless\n* adapter it replaces the 21-char `cuid` with a small per-connection integer and only carries\n* `originClient` on the very first request of each direction (the peer remembers it afterwards).\n*\n*   [ routeInt, typeInt, corrId, time, originClient?, payloadData ]\n*/\nconst ENVELOPE = {\n\troute: 0,\n\ttype: 1,\n\tcorr: 2,\n\ttime: 3,\n\toriginClient: 4,\n\tpayload: 5,\n\t/** Optional trailing slot — present only on a reliable frame (see {@link encodeReliabilitySlot}). */\n\treliability: 6,\n\t/** Optional streamKey slot (E3) — present only on a *keyed* reliable frame; makes the frame length 8. */\n\tstreamKey: 7\n};\n/**\n* Best-effort frame length. A reliable frame appends the seq/ack slot → {@link ENVELOPE_LENGTH_RELIABLE};\n* a *keyed* reliable frame appends one more (the streamKey) → {@link ENVELOPE_LENGTH_RELIABLE_KEYED}. The\n* distinct lengths are self-discriminating: a peer that predates a length rejects the frame wholesale\n* (never mis-decodes it), so keyless reliable frames stay byte-identical and an old peer drops a keyed one.\n*/\nconst ENVELOPE_LENGTH = 6;\nconst ENVELOPE_LENGTH_RELIABLE = 7;\nconst ENVELOPE_LENGTH_RELIABLE_KEYED = 8;\n/**\n* How long a pending correlation entry is kept before it's swept. A correlation only matters until its\n* action resolves or times out, so anything older than the longest realistic action timeout can be\n* dropped — this bounds memory when requests time out or a connection dies mid-flight (their replies\n* would never arrive, leaving the entry orphaned). Generous default so live correlations are never\n* pruned (the default transport timeout is 10s).\n*/\nconst DEFAULT_CORRELATION_TTL_MS = 5 * 6e4;\nfunction isKnownIdentity(coordinate) {\n\treturn coordinate != null && coordinate.envId !== \"_unset_\";\n}\n/**\n* Drop entries older than `ttlMs`. Maps keep insertion order and entries are inserted in time order,\n* so the oldest are first — stop sweeping at the first live entry.\n*/\nfunction pruneExpired(map, now, ttlMs) {\n\tfor (const [key, entry] of map) {\n\t\tif (now - entry.time <= ttlMs) break;\n\t\tmap.delete(key);\n\t}\n}\n/**\n* Builds a factory of *stateful, per-connection* codecs for {@link LinkTransport} /\n* `ChannelAcceptor` — the maximally compact binary wire. Call the returned factory once per live\n* connection (each socket on the client, each accepted connection on the server) so every channel\n* gets its own correlation + identity state.\n*\n* On top of everything {@link createBinaryWireAdapter} drops, a session also drops:\n* - **`cuid`** — replaced by a per-connection integer correlation id. The initiator maps it to its\n*   real cuid; the responder echoes it; each side reconstructs the cuid from its own map. Correlation\n*   only needs to be unique per socket, so a counter suffices.\n* - **`originClient` after the first request** — the first request each side sends carries its\n*   identity; the peer remembers it and injects it into later frames. Replies omit it entirely (a\n*   reply carries the initiator's own origin, which the initiator already knows).\n*\n* Both ends MUST build the factory from the same domains in the same order (positional dictionary).\n* Text frames still return `undefined` from `incoming`, so JSON clients remain interoperable.\n*\n* Hibernation note: after a server connection is evicted its session resets, so a still-connected\n* client (whose session persists) will keep omitting `originClient`. The server must therefore restore\n* the connection→client binding from its own store (see `ChannelAcceptor.rehydrate`) and\n* inject `originClient` from there — the session alone can't recover it.\n*/\nfunction createBinaryWireSessionFactory(domains, options) {\n\tconst { routeToInt, intToRoute } = buildActionRouteDictionary(domains);\n\tconst unknownIdentity = RuntimeCoordinate.unknown.toJsonObject();\n\tconst ttlMs = options?.correlationTtlMs ?? DEFAULT_CORRELATION_TTL_MS;\n\treturn () => {\n\t\tlet outCounter = 0;\n\t\tconst corrToCuid = /* @__PURE__ */ new Map();\n\t\tconst cuidToCorr = /* @__PURE__ */ new Map();\n\t\tlet selfIdentity;\n\t\tlet peerIdentity;\n\t\treturn {\n\t\t\toutgoing: (input) => {\n\t\t\t\tconst json = input.action.toJsonObject();\n\t\t\t\tconst routeKey = `${json.domain}:${json.id}`;\n\t\t\t\tconst routeInt = routeToInt.get(routeKey);\n\t\t\t\tif (routeInt == null) throw new Error(`[binary-wire] Cannot pack unregistered action route: ${routeKey}`);\n\t\t\t\tconst now = Date.now();\n\t\t\t\tpruneExpired(corrToCuid, now, ttlMs);\n\t\t\t\tpruneExpired(cuidToCorr, now, ttlMs);\n\t\t\t\tlet corr;\n\t\t\t\tlet wireIdentity;\n\t\t\t\tif (json.type === \"request\") {\n\t\t\t\t\tcorr = outCounter++;\n\t\t\t\t\tcorrToCuid.set(corr, {\n\t\t\t\t\t\tvalue: json.context.cuid,\n\t\t\t\t\t\ttime: now\n\t\t\t\t\t});\n\t\t\t\t\tif (selfIdentity == null && isKnownIdentity(json.context.originClient)) {\n\t\t\t\t\t\tselfIdentity = json.context.originClient;\n\t\t\t\t\t\twireIdentity = json.context.originClient;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcorr = cuidToCorr.get(json.context.cuid)?.value ?? -1;\n\t\t\t\t\tif (json.type === \"result\") cuidToCorr.delete(json.context.cuid);\n\t\t\t\t}\n\t\t\t\tconst reliabilitySlot = encodeReliabilitySlot(input.reliability, json.type);\n\t\t\t\tconst streamKey = input.reliability?.streamKey;\n\t\t\t\tconst envelope = new Array(streamKey != null ? ENVELOPE_LENGTH_RELIABLE_KEYED : reliabilitySlot == null ? ENVELOPE_LENGTH : ENVELOPE_LENGTH_RELIABLE);\n\t\t\t\tenvelope[ENVELOPE.route] = routeInt;\n\t\t\t\tenvelope[ENVELOPE.type] = PayloadTypeToInt[json.type];\n\t\t\t\tenvelope[ENVELOPE.corr] = corr;\n\t\t\t\tenvelope[ENVELOPE.time] = json.time;\n\t\t\t\tenvelope[ENVELOPE.originClient] = wireIdentity;\n\t\t\t\tenvelope[ENVELOPE.payload] = extractWirePayload(json);\n\t\t\t\tif (reliabilitySlot != null) envelope[ENVELOPE.reliability] = reliabilitySlot;\n\t\t\t\tif (streamKey != null) envelope[ENVELOPE.streamKey] = streamKey;\n\t\t\t\treturn pack(envelope);\n\t\t\t},\n\t\t\tincoming: (frame) => {\n\t\t\t\tlet buffer;\n\t\t\t\tif (frame instanceof ArrayBuffer) buffer = new Uint8Array(frame);\n\t\t\t\telse if (frame instanceof Uint8Array) buffer = frame;\n\t\t\t\telse return;\n\t\t\t\ttry {\n\t\t\t\t\tconst envelope = unpack(buffer);\n\t\t\t\t\tif (!isSessionEnvelope(envelope)) return void 0;\n\t\t\t\t\tconst routeMeta = intToRoute[envelope[ENVELOPE.route]];\n\t\t\t\t\tconst payloadType = ReversePayloadType[envelope[ENVELOPE.type]];\n\t\t\t\t\tif (routeMeta == null || payloadType == null) return void 0;\n\t\t\t\t\tconst now = Date.now();\n\t\t\t\t\tpruneExpired(corrToCuid, now, ttlMs);\n\t\t\t\t\tpruneExpired(cuidToCorr, now, ttlMs);\n\t\t\t\t\tconst corr = envelope[ENVELOPE.corr];\n\t\t\t\t\tconst time = envelope[ENVELOPE.time];\n\t\t\t\t\tconst wireIdentity = envelope[ENVELOPE.originClient];\n\t\t\t\t\tlet cuid;\n\t\t\t\t\tlet originClient;\n\t\t\t\t\tif (payloadType === \"request\") {\n\t\t\t\t\t\tcuid = nanoid();\n\t\t\t\t\t\tcuidToCorr.set(cuid, {\n\t\t\t\t\t\t\tvalue: corr,\n\t\t\t\t\t\t\ttime: now\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif (isKnownIdentity(wireIdentity)) peerIdentity = wireIdentity;\n\t\t\t\t\t\toriginClient = peerIdentity ?? unknownIdentity;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcuid = corrToCuid.get(corr)?.value ?? nanoid();\n\t\t\t\t\t\tif (payloadType === \"result\") corrToCuid.delete(corr);\n\t\t\t\t\t\toriginClient = selfIdentity ?? unknownIdentity;\n\t\t\t\t\t}\n\t\t\t\t\treturn assembleWireJson(routeMeta, payloadType, time, {\n\t\t\t\t\t\tcuid,\n\t\t\t\t\t\ttimeCreated: time,\n\t\t\t\t\t\trouting: [],\n\t\t\t\t\t\toriginClient\n\t\t\t\t\t}, envelope[ENVELOPE.payload]);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tconsole.error(\"[binary-wire] Failed to unpack binary action session frame\", e);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t},\n\t\t\tincomingReliability: (frame) => {\n\t\t\t\tlet buffer;\n\t\t\t\tif (frame instanceof ArrayBuffer) buffer = new Uint8Array(frame);\n\t\t\t\telse if (frame instanceof Uint8Array) buffer = frame;\n\t\t\t\telse return void 0;\n\t\t\t\ttry {\n\t\t\t\t\tconst envelope = unpack(buffer);\n\t\t\t\t\tif (!isSessionEnvelope(envelope) || envelope.length !== ENVELOPE_LENGTH_RELIABLE && envelope.length !== ENVELOPE_LENGTH_RELIABLE_KEYED) return;\n\t\t\t\t\tconst payloadType = ReversePayloadType[envelope[ENVELOPE.type]];\n\t\t\t\t\tif (payloadType == null) return void 0;\n\t\t\t\t\tconst wire = decodeReliabilitySlot(envelope[ENVELOPE.reliability], payloadType);\n\t\t\t\t\tif (wire == null) return void 0;\n\t\t\t\t\tif (envelope.length === ENVELOPE_LENGTH_RELIABLE_KEYED) {\n\t\t\t\t\t\tconst streamKey = envelope[ENVELOPE.streamKey];\n\t\t\t\t\t\tif (typeof streamKey !== \"string\") return void 0;\n\t\t\t\t\t\twire.streamKey = streamKey;\n\t\t\t\t\t}\n\t\t\t\t\treturn wire;\n\t\t\t\t} catch {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t};\n}\n/** A decoded session frame is one of ours iff it's an array of best-effort or reliable length. */\nfunction isSessionEnvelope(envelope) {\n\treturn Array.isArray(envelope) && (envelope.length === ENVELOPE_LENGTH || envelope.length === ENVELOPE_LENGTH_RELIABLE || envelope.length === ENVELOPE_LENGTH_RELIABLE_KEYED);\n}\n//#endregion\n//#region src/action/ActionRuntime/Transport/Transport.ts\n/**\n* Reusable transport definition. Built by the internal `transport({ carrier, secure })` factory (which\n* `connectChannel` / `serveChannel` drive) and passed to a `ChannelConnector`. A single\n* definition can be shared across multiple handlers — each handler builds its own live\n* {@link TransportConnection} via {@link TransportConnection._createConnection}.\n*/\nvar Transport = class {\n\t/** @internal The security level frames received over this transport were protected at. */\n\t_inboundSecurityLevel() {\n\t\treturn \"none\";\n\t}\n};\n//#endregion\n//#region src/action/ActionRuntime/Transport/SecureSession/establishExchangeSession.ts\n/** Plain path (no handshake/token): every action rides a bare `act` envelope, plaintext both ways. */\nfunction finalizePlainExchangeMethods(ctx) {\n\treturn buildExchangeMethods(ctx, establishPlainExchangeSession(ctx.carrier));\n}\n/** Secure path: run the handshake (two exchanges) once at bring-up, then reuse the token + crypto. */\nasync function finalizeSecureExchangeMethods(ctx) {\n\treturn buildExchangeMethods(ctx, await establishSecureExchangeSession({\n\t\tcarrier: ctx.carrier,\n\t\tsecure: ctx.secure,\n\t\tlane: {\n\t\t\tdictionaryVersion: ctx.secure.dictionaryVersion,\n\t\t\tchannels: ctx.secure.channelTags\n\t\t}\n\t}));\n}\nfunction buildExchangeMethods(ctx, session) {\n\tconst sendActionData = (inputs) => {\n\t\trunExchange(session, inputs).catch((err) => inputs.runningAction._abort(err));\n\t};\n\treturn {\n\t\tsendActionData,\n\t\tupdateRunConfig: ctx.updateRunConfig\n\t};\n}\nasync function runExchange(session, inputs) {\n\tconst { action, runningAction, timeout } = inputs;\n\tconst ac = new AbortController();\n\tlet timedOut = false;\n\tconst timeoutId = setTimeout(() => {\n\t\ttimedOut = true;\n\t\tac.abort();\n\t}, timeout);\n\tconst unsubscribe = runningAction.addUpdateListeners([(update) => {\n\t\tif (update.type === \"finished\") {\n\t\t\tclearTimeout(timeoutId);\n\t\t\tac.abort();\n\t\t}\n\t}]);\n\ttry {\n\t\tif (action.type !== \"request\") {\n\t\t\tawait session.send(action.toJsonObject(), { signal: ac.signal });\n\t\t\treturn;\n\t\t}\n\t\tconst outcome = await session.exchange(action.toJsonObject(), { signal: ac.signal });\n\t\tif (!outcome.ok && outcome.reason === \"peer_error\") throw err_nice_transport.fromId(\"send_failed\", {\n\t\t\tactionState: action.type,\n\t\t\tactionId: action.id,\n\t\t\tmessage: outcome.message\n\t\t});\n\t\tif (!outcome.ok || !isActionPayload_Result_JsonObject(outcome.wire)) throw err_nice_transport.fromId(\"invalid_action_response\", { actionId: action.id });\n\t\trunningAction._completeWithResult(action._domain.hydrateResultPayload(outcome.wire));\n\t} catch (err) {\n\t\tif (timedOut) throw err_nice_transport.fromId(\"timeout\", { timeout });\n\t\tthrow err;\n\t} finally {\n\t\tclearTimeout(timeoutId);\n\t\tunsubscribe();\n\t}\n}\n//#endregion\n//#region src/action/ActionRuntime/Transport/TransportConnection.ts\n/**\n* Live, per-handler transport runtime built from a reusable {@link Transport} definition — the\n* action instantiation of wire's generic `TransportConnection` (shared connection design,\n* Phase 2): routing params pinned to {@link ITransportRouteActionParams} and the finalized\n* methods to {@link IActionTransportReadyData_Methods}. The machinery (status processing, cache\n* keys, async bring-up hooks) lives in wire; subclasses (`LinkConnection`, `ExchangeConnection`)\n* are unchanged. Construct these via `definition._createConnection(...)`, never directly.\n*/\nvar TransportConnection = class extends TransportConnection$1 {};\n//#endregion\n//#region src/action/ActionRuntime/Transport/Exchange/ExchangeConnection.ts\n/**\n* Carrier-agnostic live connection for the exchange (request → single reply) shape — the HTTP\n* counterpart to {@link LinkConnection}. It owns only the bring-up (run the secure handshake on first\n* use); the request/reply lifecycle + crypto live in the shared `establishExchangeSession`.\n*/\nvar ExchangeConnection = class extends TransportConnection {\n\tconstructor(def) {\n\t\tsuper({\n\t\t\t...def,\n\t\t\ttype: \"exchange\"\n\t\t});\n\t}\n\t_getCacheKey(input) {\n\t\treturn this.initialized.getCacheKey?.(input).join(\"\\0\") ?? \"\";\n\t}\n\t_needsAsyncBringUp(data) {\n\t\treturn data.secureChannel != null && data.secureChannel.securityLevel !== \"none\";\n\t}\n\t_finalizeReady(data) {\n\t\tconst secure = data.secureChannel;\n\t\tif (secure != null && secure.securityLevel !== \"none\") return finalizeSecureExchangeMethods({\n\t\t\t...this._sessionContext(data),\n\t\t\tsecure\n\t\t});\n\t\treturn this._finalizeTransportMethods(data);\n\t}\n\t_finalizeTransportMethods(data) {\n\t\treturn finalizePlainExchangeMethods(this._sessionContext(data));\n\t}\n\t_sessionContext(data) {\n\t\treturn {\n\t\t\tcarrier: data.carrier,\n\t\t\tupdateRunConfig: data.updateRunConfig,\n\t\t\tsecure: data.secureChannel\n\t\t};\n\t}\n};\n//#endregion\n//#region src/action/ActionRuntime/Transport/Exchange/ExchangeTransport.ts\n/**\n* A carrier-agnostic exchange (request → single reply) transport: it drives nice-action's secure session\n* over any {@link IExchangeCarrier} (HTTP being the one built-in). The duplex counterpart is\n* {@link LinkTransport}; this is the no-push half — its reply rides the response to its own request, so it\n* can't deliver an unsolicited frame (the runtime never picks it for the return path).\n*/\nvar ExchangeTransport = class ExchangeTransport extends Transport {\n\ttype = \"exchange\";\n\toptions;\n\tconstructor(options) {\n\t\tsuper();\n\t\tif (options.getCacheKey != null && options.getTransportCacheKey != null) throw err_nice_action.fromId(\"conflicting_connect_options\", { detail: \"ExchangeTransport: pass only `getCacheKey`; `getTransportCacheKey` is deprecated\" });\n\t\tthis.options = {\n\t\t\t...options,\n\t\t\tgetCacheKey: options.getCacheKey ?? options.getTransportCacheKey\n\t\t};\n\t}\n\tstatic create(options) {\n\t\treturn new ExchangeTransport(options);\n\t}\n\t_createConnection(_ctx) {\n\t\tconst options = this.options;\n\t\treturn new ExchangeConnection({ initialize: () => ({\n\t\t\tgetCacheKey: options.getCacheKey,\n\t\t\tisAvailable: options.available,\n\t\t\tgetTransport: (input) => {\n\t\t\t\tassertProtocolsRideDuplex(options);\n\t\t\t\tconst carrier = options.openCarrier(input);\n\t\t\t\treturn {\n\t\t\t\t\tstatus: \"ready\",\n\t\t\t\t\treadyData: {\n\t\t\t\t\t\tcarrier: options.wireTap != null ? withExchangeTap(carrier, options.wireTap) : carrier,\n\t\t\t\t\t\tsecureChannel: options.security,\n\t\t\t\t\t\tupdateRunConfig: options.updateRunConfig\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t}) });\n\t}\n\tgetRouteInfo(input) {\n\t\tif (this.options.getRouteInfo != null) return this.options.getRouteInfo(input);\n\t\treturn {\n\t\t\tcarrierLabel: this.options.label ?? \"exchange\",\n\t\t\tsummary: this.options.label ?? \"exchange\"\n\t\t};\n\t}\n};\n/**\n* The D-11 guard: an exchange-only connection carries only the lane, so a registered prefixed\n* protocol is a configuration error surfaced clearly at bring-up (the first dispatch through this\n* transport) — after registration, which may legitimately happen later than `connectChannel`\n* (e.g. `realmConnection(connector)`), hence not at construction.\n*/\nfunction assertProtocolsRideDuplex(options) {\n\tif (options.exchangeOnlyConnection !== true || options.mux == null) return;\n\tfor (const protocolId of protocolsFromCaps(options.mux.localCaps())) throw err_wire_connect.fromId(\"protocol_on_exchange_only\", { protocolId });\n}\n//#endregion\n//#region src/action/ActionRuntime/Transport/helpers/createUnsetTransportResolvers.ts\nconst createUnsetTransportResolvers = (transportLabel) => ({ onIncomingActionDataJson: (json) => {\n\tconsole.warn(`Received incoming action JSON [${json.domain}:${json.id}] on Transport [${transportLabel}] but no incoming data listener has been set.`);\n} });\n//#endregion\n//#region src/action/ActionRuntime/Transport/SecureSession/establishLinkSession.ts\n/**\n* The action lane as a wire lane endpoint: every unprefixed frame decodes here (control frame →\n* action frame), and a lost connection aborts the in-flight best-effort sends.\n*/\nfunction connectorLaneEndpoint(ctx, abortSet) {\n\treturn {\n\t\tid: \"action\",\n\t\tonLaneFrame: (frame) => handleLaneFrame(ctx, frame),\n\t\tonDetach: () => abortInFlight(ctx, abortSet)\n\t};\n}\n/** Plain path (no handshake): route every inbound frame to the runtime; send without crypto. */\nfunction finalizePlainLinkMethods(ctx) {\n\tconst abortSet = /* @__PURE__ */ new Set();\n\treturn buildSendMethods(ctx, establishPlainDuplexSession({\n\t\tchannel: ctx.channel,\n\t\tlane: connectorLaneEndpoint(ctx, abortSet),\n\t\theartbeat: ctx.heartbeat,\n\t\ttap: ctx.wireTap\n\t}), abortSet);\n}\n/**\n* Secure path: the wire session runs the handshake (buffering frames that race ahead), then lane\n* frames flow here. The lane protocol supplies the handshake payload (E5 — `dictionaryVersion`/\n* `channelTags` come off the action channel via {@link ISecureClientConfig}, which is the lane's\n* own config surface; wire consumes only the neutral core). `remoteReliable`/`remoteStreamKey`\n* come off the negotiated caps.\n*/\nasync function finalizeSecureLinkMethods(ctx) {\n\tconst abortSet = /* @__PURE__ */ new Set();\n\tconst lane = {\n\t\t...connectorLaneEndpoint(ctx, abortSet),\n\t\thandshakeConfig: () => ({\n\t\t\tdictionaryVersion: ctx.secure.dictionaryVersion,\n\t\t\tchannels: ctx.secure.channelTags\n\t\t})\n\t};\n\tconst session = await establishSecureDuplexSession({\n\t\tchannel: ctx.channel,\n\t\tsecure: ctx.secure,\n\t\tlane,\n\t\tmux: ctx.secure.mux,\n\t\theartbeat: ctx.heartbeat,\n\t\ttap: ctx.wireTap\n\t});\n\treturn buildSendMethods(ctx, session, abortSet, session.remoteCaps?.includes(\"reliable\") ?? false, session.remoteCaps?.includes(\"reliable-streamkey\") ?? false);\n}\nfunction buildSendMethods(ctx, session, abortSet, remoteReliable, remoteStreamKey) {\n\tconst sendActionData = (inputs) => {\n\t\tconst { action, runningAction, timeout } = inputs;\n\t\tconst isReliableRequest = action.type === \"request\" && action.schema?.reliabilityTier != null && action.schema.reliabilityTier !== \"none\";\n\t\tif (!session.isOpen()) {\n\t\t\tif (action.type === \"request\" && !isReliableRequest) runningAction._abort(ctx.makeDisconnectError(action.id));\n\t\t\treturn;\n\t\t}\n\t\tif (action.type === \"request\" && !isReliableRequest) {\n\t\t\tabortSet.add(runningAction);\n\t\t\tconst timeoutId = setTimeout(() => {\n\t\t\t\trunningAction._abort(err_nice_transport.fromId(\"timeout\", { timeout }));\n\t\t\t}, timeout);\n\t\t\trunningAction.addUpdateListeners([(update) => {\n\t\t\t\tif (update.type === \"finished\") {\n\t\t\t\t\tclearTimeout(timeoutId);\n\t\t\t\t\tabortSet.delete(runningAction);\n\t\t\t\t}\n\t\t\t}]);\n\t\t}\n\t\tlet sendInputs = inputs;\n\t\tif (inputs.reliability != null) {\n\t\t\tif (ctx.formatMessage == null) warnReliableWireUnavailableOnce(action.domain, action.id);\n\t\t\telse if (remoteReliable === false) {\n\t\t\t\twarnReliablePeerUnsupportedOnce(action.domain, action.id);\n\t\t\t\tsendInputs = {\n\t\t\t\t\t...inputs,\n\t\t\t\t\treliability: void 0\n\t\t\t\t};\n\t\t\t} else if (inputs.reliability.streamKey != null && remoteStreamKey === false) warnReliableStreamKeyUnsupportedOnce(action.domain, action.id);\n\t\t}\n\t\tsession.send(ctx.formatMessage?.outgoing(sendInputs) ?? JSON.stringify(sendInputs.action.toJsonObject()));\n\t};\n\treturn {\n\t\tsendActionData,\n\t\tsendControlData: (message) => {\n\t\t\tif (!session.isOpen()) return;\n\t\t\tsession.send(encodeControlFrame(message));\n\t\t},\n\t\tupdateRunConfig: ctx.updateRunConfig,\n\t\taddOnDisconnectListener: (cb) => session.addOnDisconnectListener(cb),\n\t\tdisconnect: () => session.close(),\n\t\tsendReturnData: (payload, clients) => {\n\t\t\tconst formatted = clients != null ? ctx.formatMessage?.outgoing({\n\t\t\t\taction: payload,\n\t\t\t\t...clients\n\t\t\t}) : void 0;\n\t\t\tsession.send(formatted ?? JSON.stringify(payload.toJsonObject()));\n\t\t}\n\t};\n}\n/**\n* One inbound lane frame (already decrypted; the mux never saw it or didn't claim it): a control\n* frame or an action frame — the lane's whole receive vocabulary.\n*/\nfunction handleLaneFrame(ctx, frame) {\n\tconst control = decodeControlFrame(frame);\n\tif (control != null) {\n\t\tctx.resolvers.onControlMessage?.(control);\n\t\treturn;\n\t}\n\tconst rawJson = decodeActionFrame(frame, ctx.formatMessage);\n\tif (rawJson != null) {\n\t\tconst reliability = ctx.formatMessage?.incomingReliability?.(frame);\n\t\tif (reliability != null) ctx.resolvers.onIncomingActionDataJson(rawJson, reliability);\n\t\telse ctx.resolvers.onIncomingActionDataJson(rawJson);\n\t}\n}\nfunction abortInFlight(ctx, abortSet) {\n\tconst error = ctx.makeDisconnectError(\"—\");\n\tfor (const ra of [...abortSet]) ra._abort(error);\n}\n//#endregion\n//#region src/action/ActionRuntime/Transport/Link/LinkConnection.ts\n/** Abort error for a closed link channel (carrier-neutral — the carrier itself isn't named). */\nfunction linkDisconnectError(actionId) {\n\treturn err_nice_transport.fromId(\"send_failed\", {\n\t\tactionId,\n\t\tactionState: \"request\",\n\t\tmessage: \"link channel disconnected\"\n\t});\n}\n/**\n* Carrier-agnostic live connection. It owns only the *bring-up* (open the carrier, then run the secure\n* session); the session itself — handshake, frame crypto, codec, send/receive — lives in the shared\n* {@link finalizeSecureLinkMethods}/{@link finalizePlainLinkMethods}, so a WebSocket, a WebRTC data\n* channel, a Bluetooth characteristic, and an in-memory pipe all run the identical secure layer.\n*/\nvar LinkConnection = class extends TransportConnection {\n\tresolvers;\n\tconstructor(def, resolvers) {\n\t\tsuper({\n\t\t\t...def,\n\t\t\ttype: \"duplex\"\n\t\t});\n\t\tthis.resolvers = resolvers ?? createUnsetTransportResolvers(\"link\");\n\t}\n\t_getCacheKey(input) {\n\t\treturn this.initialized.getCacheKey?.(input).join(\"\\0\") ?? \"\";\n\t}\n\t_needsAsyncBringUp() {\n\t\treturn true;\n\t}\n\t_awaitCarrierReady(data) {\n\t\treturn data.channel.ready;\n\t}\n\t_finalizeReady(data) {\n\t\tconst secure = data.secureChannel;\n\t\tif (secure != null && secure.securityLevel !== \"none\") return finalizeSecureLinkMethods({\n\t\t\t...this._sessionContext(data),\n\t\t\tsecure\n\t\t});\n\t\treturn this._finalizeTransportMethods(data);\n\t}\n\t_sessionContext(data) {\n\t\treturn {\n\t\t\tchannel: data.channel,\n\t\t\tresolvers: this.resolvers,\n\t\t\tformatMessage: data.formatMessage,\n\t\t\tupdateRunConfig: data.updateRunConfig,\n\t\t\tmakeDisconnectError: linkDisconnectError,\n\t\t\theartbeat: data.heartbeat,\n\t\t\twireTap: data.wireTap\n\t\t};\n\t}\n\t_finalizeTransportMethods(data) {\n\t\treturn finalizePlainLinkMethods(this._sessionContext(data));\n\t}\n};\n//#endregion\n//#region src/action/ActionRuntime/Transport/Link/LinkTransport.ts\n/**\n* A carrier-agnostic transport: it drives nice-action's secure session + action routing over any\n* {@link IDuplexCarrier}. The WebSocket transport is the special case that opens a `WebSocket`;\n* this opens whatever `openChannel` returns, so the identical secure layer works over WebRTC, Bluetooth,\n* or an in-memory pipe. Reported with an overridable carrier label in the devtools (defaults to \"link\").\n*/\nvar LinkTransport = class LinkTransport extends Transport {\n\ttype = \"duplex\";\n\toptions;\n\tconstructor(options) {\n\t\tsuper();\n\t\tif (options.getCacheKey != null && options.getTransportCacheKey != null) throw err_nice_action.fromId(\"conflicting_connect_options\", { detail: \"LinkTransport: pass only `getCacheKey`; `getTransportCacheKey` is deprecated\" });\n\t\tif (options.heartbeat != null && options.linkKeepalive != null) throw err_nice_action.fromId(\"conflicting_connect_options\", { detail: \"LinkTransport: pass only `heartbeat`; `linkKeepalive` is deprecated\" });\n\t\tthis.options = {\n\t\t\t...options,\n\t\t\tgetCacheKey: options.getCacheKey ?? options.getTransportCacheKey,\n\t\t\theartbeat: options.heartbeat ?? options.linkKeepalive\n\t\t};\n\t}\n\tstatic create(options) {\n\t\treturn new LinkTransport(options);\n\t}\n\t_createConnection(ctx) {\n\t\tconst options = this.options;\n\t\treturn new LinkConnection({ initialize: () => ({\n\t\t\tgetCacheKey: options.getCacheKey,\n\t\t\tisAvailable: options.available,\n\t\t\tgetTransport: (input) => ({\n\t\t\t\tstatus: \"ready\",\n\t\t\t\treadyData: {\n\t\t\t\t\tchannel: options.openChannel(input),\n\t\t\t\t\tformatMessage: options.createFormatMessage?.() ?? options.formatMessage,\n\t\t\t\t\tupdateRunConfig: options.updateRunConfig,\n\t\t\t\t\tsecureChannel: options.security,\n\t\t\t\t\theartbeat: options.heartbeat?.(),\n\t\t\t\t\twireTap: options.wireTap\n\t\t\t\t}\n\t\t\t})\n\t\t}) }, ctx.resolvers);\n\t}\n\t_inboundSecurityLevel() {\n\t\treturn this.options.security?.securityLevel ?? \"none\";\n\t}\n\tgetRouteInfo(input) {\n\t\tif (this.options.getRouteInfo != null) return this.options.getRouteInfo(input);\n\t\treturn {\n\t\t\tcarrierLabel: this.options.label ?? \"link\",\n\t\t\tsummary: this.options.label ?? \"link\"\n\t\t};\n\t}\n};\n//#endregion\n//#region src/action/ActionRuntime/Transport/createTransport.ts\nfunction transport(options) {\n\tconst { carrier, channel, available, label } = options;\n\tconst labelFor = label ?? carrier.carrierLabel;\n\tconst carrierGetCacheKey = carrier.getCacheKey;\n\tconst carrierGetRouteInfo = carrier.getRouteInfo;\n\tlet security;\n\tif (options.secure) {\n\t\tconst link = options.link ?? (options.storage != null ? new ClientCryptoKeyLink({ storageAdapter: options.storage }) : void 0);\n\t\tif (link == null) throw new Error(\"transport: a secure transport requires `link` or `storage` for the crypto identity.\");\n\t\tsecurity = {\n\t\t\tsecurityLevel: options.securityLevel ?? \"authenticated\",\n\t\t\tlink,\n\t\t\tlocalCoordinate: (options.identity ?? options.runtime.coordinate).toJsonObject(),\n\t\t\texpectedPeer: options.expectedPeer?.toJsonObject(),\n\t\t\tdictionaryVersion: channel.dictionaryVersion,\n\t\t\tchannelTags: channel.tags,\n\t\t\tmux: options.mux\n\t\t};\n\t}\n\tif (isExchangeCarrierSource(carrier)) return ExchangeTransport.create({\n\t\topenCarrier: (input) => carrier.open(toActionDialParams(input)),\n\t\tgetCacheKey: carrierGetCacheKey == null ? void 0 : (input) => carrierGetCacheKey(toActionDialParams(input)),\n\t\tavailable: available ?? carrier.available,\n\t\tgetRouteInfo: carrierGetRouteInfo == null ? void 0 : (input) => carrierGetRouteInfo(toActionDialParams(input)),\n\t\tlabel: labelFor,\n\t\tsecurity,\n\t\tmux: options.mux,\n\t\texchangeOnlyConnection: options.exchangeOnlyConnection,\n\t\twireTap: options.wireTap\n\t});\n\treturn LinkTransport.create({\n\t\topenChannel: (input) => carrier.open(toActionDialParams(input)),\n\t\tcreateFormatMessage: channel.createCodec,\n\t\tgetCacheKey: carrierGetCacheKey == null ? void 0 : (input) => carrierGetCacheKey(toActionDialParams(input)),\n\t\tavailable: available ?? carrier.available,\n\t\tgetRouteInfo: carrierGetRouteInfo == null ? void 0 : (input) => carrierGetRouteInfo(toActionDialParams(input)),\n\t\tlabel: labelFor,\n\t\tsecurity,\n\t\theartbeat: options.heartbeat,\n\t\twireTap: options.wireTap\n\t});\n}\n//#endregion\n//#region src/action/ActionRuntime/Channel/ActionChannel.ts\n/**\n* Derive a stable channel tag from the domain *names* (not the action list), so the tag identifies the\n* channel across action-level changes — those move `dictionaryVersion` (the drift check), never the tag.\n*/\nfunction deriveChannelTag(domains) {\n\treturn domains.map((domain) => domain.domain).join(\"+\");\n}\n/**\n* Derive a stable wire-dictionary version from the ordered route list (FNV-1a over `domain:id,…`), so\n* the version moves automatically whenever the transported domains change — a stale peer is then\n* rejected by the handshake instead of silently misrouting a positionally-packed frame.\n*/\nfunction deriveDictionaryVersion(domains) {\n\tconst { intToRoute } = buildActionRouteDictionary(domains);\n\tconst signature = intToRoute.map((route) => `${route.domain}:${route.id}`).join(\",\");\n\tlet hash = 2166136261;\n\tfor (let i = 0; i < signature.length; i++) {\n\t\thash ^= signature.charCodeAt(i);\n\t\thash = Math.imul(hash, 16777619);\n\t}\n\treturn `auto:${(hash >>> 0).toString(16).padStart(8, \"0\")}`;\n}\n/**\n* Declare a transport-agnostic channel by role — the single source of truth both peers share. Each end\n* MUST call this with the same domains in the same order (the binary wire dictionary is positional); the\n* `dictionaryVersion` is derived from those domains unless you pin an explicit one. The wire dictionary\n* spans `[...toAcceptor, ...toConnector]` in that order. Any change to the domains or their actions moves\n* the derived version, and the handshake rejects a peer whose version differs, so deploy both ends\n* together. Appending stays compatible with older peers only under a hand-pinned `dictionaryVersion`\n* you leave unchanged, and only when the additions come last in the whole dictionary.\n*\n* Declare the domains *by role* — `toAcceptor` (connector→acceptor requests) and `toConnector`\n* (acceptor→connector pushes) — so the routing for both ends is derived from the channel (see\n* {@link connectChannel} and {@link serveChannel}) instead of being restated at each end. Security is a\n* per-transport concern, not a channel one, so this same definition is used whether a transport runs\n* plain or encrypted.\n*/\nfunction defineChannel(options = {}) {\n\tconst toAcceptor = options.toAcceptor ?? [];\n\tconst toConnector = options.toConnector ?? [];\n\tconst allDomains = [...toAcceptor, ...toConnector];\n\tconst tag = options.tag ?? deriveChannelTag(allDomains);\n\treturn {\n\t\ttoAcceptorDomains: toAcceptor,\n\t\ttoConnectorDomains: toConnector,\n\t\tdictionaryVersion: options.dictionaryVersion ?? deriveDictionaryVersion(allDomains),\n\t\tcreateCodec: createBinaryWireSessionFactory(allDomains, options.sessionOptions),\n\t\ttag,\n\t\ttags: [tag]\n\t};\n}\n/**\n* Identities already dialled per (runtime, peer) — the check behind the several-links-one-identity\n* warning below. Keyed off the runtime weakly so a torn-down runtime takes its entry with it.\n*/\nconst dialledIdentities = /* @__PURE__ */ new WeakMap();\n/**\n* The several-duplex-links trap (Vibenode feedback §1): a second `connectChannel` from one runtime to\n* one peer presenting the *same* identity is invisible to the acceptor — it binds connections by the\n* full coordinate string — so replies and pushes for both links go back over whichever bound first and\n* the other socket's traffic hangs until it times out. Silent, and it looks like a backend stall.\n*\n* Warn at dial time rather than at the misroute: this fires deterministically at setup, before any\n* traffic, and names the fix. Duplex connections only — the caller gates on that.\n*/\nfunction warnOnSharedConnectionIdentity(runtime, peer, identity) {\n\tlet byPeer = dialledIdentities.get(runtime);\n\tif (byPeer == null) {\n\t\tbyPeer = /* @__PURE__ */ new Map();\n\t\tdialledIdentities.set(runtime, byPeer);\n\t}\n\tconst identities = byPeer.get(peer.stringId) ?? /* @__PURE__ */ new Set();\n\tbyPeer.set(peer.stringId, identities);\n\tif (identities.has(identity.stringId)) {\n\t\tconsole.warn(`connectChannel: this runtime already has a connection to [${peer.stringId}] dialling as [${identity.stringId}]. The peer binds each connection by that identity, so it cannot tell the two apart: every reply and push for both goes back over whichever connected first, and the other link's traffic hangs until it times out. Give each connection its own \\`connectionId\\` (e.g. \\`connectChannel(runtime, jobsChannel, { connectionId: \"jobs\", … })\\`) — or, if they carry the same routes over one link, use \\`connectChannels\\`.`);\n\t\treturn;\n\t}\n\tidentities.add(identity.stringId);\n}\n/**\n* Open a connection to a peer from a single call — the dial-out dual of `serveChannel`. The channel is\n* the single source of truth for *what* is routed (`toAcceptor` domains forwarded to the peer,\n* `toConnector` pushes handled locally from `onPush`); the call binds the shared facts — the channel's\n* codec/dictionary version, the runtime, and one crypto identity (a {@link ClientCryptoKeyLink} over\n* `storage`) — into every carrier. List carriers in preference order (secure WS preferred, plain HTTP\n* fallback):\n* ```ts\n* const connector = connectChannel(runtime, lobbyChannel, {\n*   peer: runtime_coordinate_lobby_do,\n*   storage,\n*   carriers: [wsCarrier(url), httpCarrier(httpUrl, { secure: false })],\n*   onPush: { player_joined: (p) => { … } },\n* });\n* ```\n* Returns the {@link ChannelConnector} so the caller can later `clearTransportCache()` it.\n*/\nfunction connectChannel(runtime, channel, options) {\n\tif (options.carriers == null === (options.transports == null)) throw err_nice_action.fromId(\"conflicting_connect_options\", { detail: \"connectChannel requires exactly one of `carriers` or deprecated `transports`\" });\n\tif (options.reconnect != null && options.keepLinkAlive != null) throw err_nice_action.fromId(\"conflicting_connect_options\", { detail: \"connectChannel: pass only `reconnect`; `keepLinkAlive` is deprecated\" });\n\tif (options.heartbeat != null && options.linkKeepalive != null) throw err_nice_action.fromId(\"conflicting_connect_options\", { detail: \"connectChannel: pass only `heartbeat`; `linkKeepalive` is deprecated\" });\n\tconst transports = options.carriers?.map((carrier) => ({\n\t\tcarrier,\n\t\tsecure: carrier.secure,\n\t\tsecurityLevel: carrier.securityLevel,\n\t\tavailable: carrier.available,\n\t\tlabel: carrier.label\n\t})) ?? options.transports;\n\tconst securityLevel = options.securityLevel ?? \"authenticated\";\n\tconst anySecure = transports.some((transport) => transport.secure ?? true);\n\tconst connectionIdentity = options.connectionId != null ? runtime.coordinate.withConnectionId(options.connectionId) : void 0;\n\tif (transports.some((descriptor) => !isExchangeCarrierSource(descriptor.carrier))) warnOnSharedConnectionIdentity(runtime, options.peer, connectionIdentity ?? runtime.coordinate);\n\tconst { mux: wireMux, link, resolveHeartbeat, wireTap } = assembleWireConnectionParts({\n\t\tcallerName: \"connectChannel\",\n\t\tpeer: options.peer,\n\t\tidentity: connectionIdentity ?? runtime.coordinate,\n\t\tmux: options.wireMux,\n\t\tprotocols: options.protocols,\n\t\tanySecure,\n\t\tstorage: options.storage,\n\t\tlink: options.link,\n\t\tephemeralIdentity: options.ephemeralIdentity,\n\t\treconnect: options.reconnect,\n\t\theartbeat: options.heartbeat,\n\t\tkeepLinkAlive: options.keepLinkAlive,\n\t\tlinkKeepalive: options.linkKeepalive,\n\t\twireTap: options.wireTap\n\t});\n\tconst exchangeOnlyConnection = transports.every((descriptor) => isExchangeCarrierSource(descriptor.carrier));\n\tconst builtTransports = transports.map((descriptor) => transport({\n\t\tcarrier: descriptor.carrier,\n\t\tchannel,\n\t\truntime,\n\t\tidentity: connectionIdentity,\n\t\texpectedPeer: options.peer,\n\t\tsecure: descriptor.secure ?? true,\n\t\tlink,\n\t\tsecurityLevel: descriptor.securityLevel ?? securityLevel,\n\t\tavailable: descriptor.available,\n\t\tlabel: descriptor.label,\n\t\tmux: wireMux,\n\t\texchangeOnlyConnection,\n\t\theartbeat: resolveHeartbeat,\n\t\twireTap\n\t}));\n\tconst pushHandlers = options.onPush != null ? channel.toConnectorDomains.map((domain) => domain.wrapAsPartialLocalHandler(options.onPush)) : [];\n\tconst duplexSecurityLevels = transports.filter((descriptor) => !isExchangeCarrierSource(descriptor.carrier)).map((descriptor) => descriptor.secure ?? true ? descriptor.securityLevel ?? securityLevel : \"none\");\n\tconst connectionSecurityLevel = duplexSecurityLevels.length === 0 ? \"none\" : duplexSecurityLevels.reduce((floor, level) => securityLevelMeets(level, floor) ? floor : level);\n\tconst handler = runtime.connectTo(options.peer, {\n\t\ttransports: builtTransports,\n\t\tdomains: [...channel.toAcceptorDomains],\n\t\tlocalHandlers: pushHandlers,\n\t\tdefaultTimeout: options.defaultTimeout,\n\t\treliableActionTimeout: options.reliableActionTimeout,\n\t\twireMux,\n\t\tsecurityLevel: connectionSecurityLevel,\n\t\treconnect: options.reconnect ?? options.keepLinkAlive,\n\t\tconnectionIdentity\n\t});\n\tif (options.onReliableEvent != null) handler.addReliableEventListener(options.onReliableEvent);\n\tif (options.onLinkEvent != null) handler.addLinkEventListener(options.onLinkEvent);\n\treturn handler;\n}\n/**\n* Combine several channels into one whose domains are the **union** of theirs, in list order — so a set of\n* channels can ride a *single* connection / endpoint (one handshake, one crypto identity) yet stay\n* independent contracts (the runtime still routes each action by its domain). The positional wire\n* dictionary spans `[...each toAcceptor, ...each toConnector]`, and the derived `dictionaryVersion` covers\n* the whole union, so the handshake's drift check validates the exact combination with no new wire fields.\n*\n* Both ends MUST combine the **same channels in the same order** (exactly the per-channel `defineChannel`\n* contract, lifted to the set) — which is why {@link connectChannels} and {@link serveChannels} are exact\n* duals. A single-element list returns that channel unchanged.\n*/\nfunction combineChannels(channels) {\n\tif (channels.length === 1) return channels[0];\n\tconst toAcceptor = channels.flatMap((channel) => [...channel.toAcceptorDomains]);\n\tconst toConnector = channels.flatMap((channel) => [...channel.toConnectorDomains]);\n\tconst tags = channels.flatMap((channel) => [...channel.tags]);\n\treturn {\n\t\t...defineChannel({\n\t\t\ttoAcceptor,\n\t\t\ttoConnector\n\t\t}),\n\t\ttag: tags.join(\"+\"),\n\t\ttags\n\t};\n}\n/**\n* Connect several channels to a single backend over **one shared connection** — the connect-side dual of\n* {@link serveChannels} and the multi-channel form of {@link connectChannel}. One handshake, one crypto\n* identity, and one transport stack carry the union of the channels' domains; the runtime still dispatches\n* each action by its domain, so the channels stay independent. `onPush` is the merged set of every\n* channel's `toConnector` handlers.\n* ```ts\n* connectChannels(runtime, [mainChannel, notificationsChannel], {\n*   peer: backendCoord, storage,\n*   carriers: [httpCarrier(url)],\n*   onPush: { notified: (p) => { … } },\n* });\n* ```\n* For per-channel identities/transports (e.g. an ephemeral per-resource connection), keep using separate\n* {@link connectChannel} calls — `connectChannels` is purely additive for the \"several channels, one\n* backend\" case.\n*/\nfunction connectChannels(runtime, channels, options) {\n\treturn connectChannel(runtime, combineChannels(channels), options);\n}\n/**\n* Register an acceptor handler's execution for a channel straight from its definition: the channel's\n* `toAcceptor` domains are served together with one merged, connection-aware case map (each case gets\n* the primed request + the originating connection, as with\n* {@link ChannelAcceptor.forConnectionDomainCases}). The domain list is taken from the channel,\n* never restated. Add the returned handler to the runtime alongside the acceptor handler:\n* ```ts\n* runtime.addHandlers([acceptChannelConnections(serverHandler, channel, { … }), serverHandler]);\n* ```\n*\n* The case's second argument is the raw connection (`TConn | undefined`). For the richer state +\n* broadcast + pushBack context, serve the channel through `serveChannel`'s `channelCases` instead.\n*/\nfunction acceptChannelConnections(serverHandler, channel, cases) {\n\treturn serverHandler.forConnectionDomainCasesMulti(channel.toAcceptorDomains, cases, (connection) => connection);\n}\n/**\n* Build the secure {@link ChannelAcceptor} for a channel — the accept-in counterpart to\n* {@link connectChannel}. It folds in the boilerplate of {@link createSecureChannelAcceptor} (the\n* `ClientCryptoKeyLink` + storage-backed TOFU resolver from one `storage`, the channel's codec +\n* dictionary version, the `security` block from the runtime coordinate) but takes the `(runtime, channel,\n* options)` shape of the channel family. Pair it with {@link acceptChannelConnections} for execution:\n* ```ts\n* const runtime = new ActionRuntime(serverCoordinate, { scope: \"instance\" });\n* const acceptor = acceptChannel(runtime, gameChannel, { storage, send });\n* runtime.addHandlers([acceptChannelConnections(acceptor, gameChannel, { … }), acceptor]);\n* ```\n*/\nfunction acceptChannel(runtime, channel, options) {\n\treturn createSecureChannelAcceptor({\n\t\t...options,\n\t\tchannel,\n\t\truntime\n\t});\n}\n//#endregion\n//#region src/action/ActionRuntime/Transport/SecureSession/exchangeAcceptor.ts\n/**\n* The action lane over wire's {@link WireExchangeAcceptor} —\n* the HTTP counterpart to `ChannelAcceptor` composing on `WireAcceptor`. Wire owns the exchange\n* mechanics: the envelope, the server handshake over the two `hs` POSTs, the sealed `hsc`/`t`\n* tokens that make the whole endpoint **stateless** across isolates, and the per-session frame\n* crypto. What stays here is the lane: validating the opened wire as an action payload, binding\n* the handshake-authenticated identity onto it (never the wire's self-asserted one), routing it\n* through the runtime, logging, and returning the result wire for the same response.\n*\n* The public config is unchanged by the split — `dictionaryVersion` remains on\n* {@link IExchangeAcceptorSecurity} (it is the lane's own handshake payload, E5); internally it\n* feeds wire's exchange lane while the neutral core feeds wire's security block, mirroring how\n* `ChannelAcceptor` splits its `IAcceptorSecurity`.\n*/\nvar ExchangeAcceptor = class {\n\t_core;\n\t_runtime;\n\t_logger;\n\t_transportLabel;\n\tconstructor(config) {\n\t\tthis._runtime = config.runtime;\n\t\tthis._logger = config.logger;\n\t\tthis._transportLabel = config.transportLabel ?? \"http\";\n\t\tthis._core = new WireExchangeAcceptor({\n\t\t\tsecurity: {\n\t\t\t\tsecurityLevel: config.security.securityLevel,\n\t\t\t\tlink: config.security.link,\n\t\t\t\tlocalCoordinate: config.security.localCoordinate,\n\t\t\t\tverifyKeyResolver: config.security.verifyKeyResolver\n\t\t\t},\n\t\t\tlane: {\n\t\t\t\tdictionaryVersion: config.security.dictionaryVersion,\n\t\t\t\tonExchange: (request) => this._onExchange(request)\n\t\t\t},\n\t\t\tsessionTtlMs: config.sessionTtlMs\n\t\t});\n\t}\n\t/** Process one POST body (an exchange envelope), returning the reply body to send back. */\n\thandlePost(body) {\n\t\treturn this._core.handlePost(body);\n\t}\n\t/** Serve one opened `act` wire: validate → bind identity → log → run → return the result wire. */\n\tasync _onExchange(request) {\n\t\tif (!isActionPayload_Any_JsonObject(request.wire)) return {\n\t\t\tok: false,\n\t\t\tmessage: \"malformed action wire\"\n\t\t};\n\t\tconst wire = request.wire;\n\t\tconst client = request.client;\n\t\tif (client != null && wire.type === \"request\") wire.context.originClient = client.toJsonObject();\n\t\tconst report = this._logger != null && wire.type === \"request\" ? this._logger.onRequest(actionServeRequestInfo(wire, {\n\t\t\ttransport: this._transportLabel,\n\t\t\tsecurityLevel: request.securityLevel,\n\t\t\torigin: client?.stringId\n\t\t})) : void 0;\n\t\tconst startedAt = Date.now();\n\t\tconst result = await (await this._runtime._handleActionPayloadWireFromReceiver(wire, {\n\t\t\treceiver: this,\n\t\t\tsecurityLevel: request.securityLevel,\n\t\t\toriginAuthenticated: client != null && request.securityLevel !== \"none\"\n\t\t})).waitForResultPayload();\n\t\tconst resultWire = result.toJsonObject();\n\t\tif (report != null) {\n\t\t\tconst returnedVia = request.encrypted ? `${this._transportLabel} (encrypted)` : this._transportLabel;\n\t\t\treport(result.result.ok ? {\n\t\t\t\tok: true,\n\t\t\t\treturnedVia,\n\t\t\t\tdurationMs: Date.now() - startedAt\n\t\t\t} : {\n\t\t\t\tok: false,\n\t\t\t\treturnedVia,\n\t\t\t\tdurationMs: Date.now() - startedAt,\n\t\t\t\terror: serveResultErrorInfo(result.result.error)\n\t\t\t});\n\t\t}\n\t\treturn {\n\t\t\tok: true,\n\t\t\twire: resultWire\n\t\t};\n\t}\n};\n//#endregion\n//#region src/action/ActionRuntime/Handler/PeerLink/Acceptor/createActionFetchHandler.ts\n/** Permissive defaults — fine for a public action endpoint; override (or disable) via `cors`. */\nconst DEFAULT_CORS_HEADERS = {\n\t\"Access-Control-Allow-Origin\": \"*\",\n\t\"Access-Control-Allow-Methods\": \"GET, POST, OPTIONS\",\n\t\"Access-Control-Allow-Headers\": \"Content-Type\",\n\t\"Access-Control-Max-Age\": \"86400\"\n};\n/**\n* Build the `fetch` handler a server/Durable-Object exposes for action traffic, folding in the\n* boilerplate every endpoint repeats: CORS (incl. the `OPTIONS` preflight), routing the `/action`\n* `POST` body through the runtime (`handleActionPayloadWire` → `waitForResultPayload` →\n* `toHttpResponse`), an optional WebSocket-upgrade hook, and a `404` fallback.\n*\n* It only touches web-standard `Request`/`Response`, so it stays transport-agnostic — the one\n* environment-specific bit (the WS upgrade) is injected via {@link IActionFetchHandlerOptions.onWebSocketUpgrade}:\n* ```ts\n* this.fetchHandler = createActionFetchHandler(this.runtime, {\n*   onWebSocketUpgrade: () => {\n*     const pair = new WebSocketPair();\n*     this.ctx.acceptWebSocket(pair[1]);\n*     return new Response(null, { status: 101, webSocket: pair[0] });\n*   },\n* });\n* // async fetch(request) { return this.fetchHandler(request); }\n* ```\n*/\nfunction createActionFetchHandler(runtime, options = {}) {\n\tconst corsHeaders = options.cors === false ? {} : options.cors ?? DEFAULT_CORS_HEADERS;\n\tconst isActionPath = options.isActionPath ?? ((url) => url.pathname.endsWith(\"/action\"));\n\tconst isWebSocketPath = options.isWebSocketPath ?? ((url) => url.pathname.endsWith(\"/ws\"));\n\tconst transportLabel = options.transportLabel ?? \"http\";\n\tconst exchangeAcceptor = options.security != null ? new ExchangeAcceptor({\n\t\truntime,\n\t\tsecurity: options.security,\n\t\tlogger: options.logger,\n\t\ttransportLabel\n\t}) : void 0;\n\tconst withCors = (response) => {\n\t\tif (options.cors === false) return response;\n\t\tconst headers = new Headers(response.headers);\n\t\tfor (const [key, value] of Object.entries(corsHeaders)) headers.set(key, value);\n\t\treturn new Response(response.body, {\n\t\t\tstatus: response.status,\n\t\t\theaders\n\t\t});\n\t};\n\tconst badRequest = (message) => new Response(JSON.stringify({ error: message }), {\n\t\tstatus: 400,\n\t\theaders: { \"Content-Type\": \"application/json\" }\n\t});\n\tconst envelopeReply = (reply) => new Response(encodeExchange(reply), {\n\t\tstatus: 200,\n\t\theaders: { \"Content-Type\": \"application/json\" }\n\t});\n\tconst envelopeError = (message) => envelopeReply({\n\t\tk: \"err\",\n\t\tmessage\n\t});\n\treturn async (request) => {\n\t\tif (request.method === \"OPTIONS\") return withCors(new Response(null, { status: 204 }));\n\t\tconst url = new URL(request.url);\n\t\tconst isWebSocketUpgrade = options.isWebSocketUpgrade ?? ((req, u) => req.headers.get(\"Upgrade\") === \"websocket\" && isWebSocketPath(u));\n\t\tif (options.onWebSocketUpgrade != null && isWebSocketUpgrade(request, url)) return options.onWebSocketUpgrade(request, url);\n\t\tif (request.method === \"POST\" && isActionPath(url)) {\n\t\t\tif (exchangeAcceptor != null) {\n\t\t\t\tconst reply = await exchangeAcceptor.handlePost(await request.text());\n\t\t\t\treturn withCors(new Response(reply, {\n\t\t\t\t\tstatus: 200,\n\t\t\t\t\theaders: { \"Content-Type\": \"application/json\" }\n\t\t\t\t}));\n\t\t\t}\n\t\t\tconst text = await request.text();\n\t\t\tconst envelope = decodeExchangeRequest(text);\n\t\t\tif (envelope?.k === \"hs\") return withCors(envelopeError(\"plain endpoint: no handshake here — connect with `{ carrier: httpCarrier(...), secure: false }`\"));\n\t\t\tif (envelope != null && \"c\" in envelope) return withCors(envelopeError(\"plain endpoint: cannot open an encrypted frame\"));\n\t\t\tlet body;\n\t\t\tif (envelope != null) body = envelope.w;\n\t\t\telse try {\n\t\t\t\tbody = JSON.parse(text);\n\t\t\t} catch {\n\t\t\t\treturn withCors(badRequest(\"request body is not valid JSON\"));\n\t\t\t}\n\t\t\tconst answerError = (message) => envelope != null ? envelopeError(message) : badRequest(message);\n\t\t\tconst report = options.logger != null && isActionPayload_Any_JsonObject(body) && body.type === \"request\" ? options.logger.onRequest(actionServeRequestInfo(body, { transport: transportLabel })) : void 0;\n\t\t\tconst startedAt = Date.now();\n\t\t\tlet running;\n\t\t\ttry {\n\t\t\t\trunning = await runtime._handleActionPayloadWireFromReceiver(body, {\n\t\t\t\t\treceiver: runtime,\n\t\t\t\t\tsecurityLevel: \"none\"\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof NiceError && error.getIds().some((id) => id === \"wire_not_action_data\" || id === \"wire_action_not_payload\")) {\n\t\t\t\t\treport?.({\n\t\t\t\t\t\tok: false,\n\t\t\t\t\t\treturnedVia: transportLabel,\n\t\t\t\t\t\tdurationMs: Date.now() - startedAt,\n\t\t\t\t\t\terror: serveResultErrorInfo(error)\n\t\t\t\t\t});\n\t\t\t\t\treturn withCors(answerError(error.message));\n\t\t\t\t}\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tconst result = await running.waitForResultPayload();\n\t\t\treport?.(result.result.ok ? {\n\t\t\t\tok: true,\n\t\t\t\treturnedVia: transportLabel,\n\t\t\t\tdurationMs: Date.now() - startedAt\n\t\t\t} : {\n\t\t\t\tok: false,\n\t\t\t\treturnedVia: transportLabel,\n\t\t\t\tdurationMs: Date.now() - startedAt,\n\t\t\t\terror: serveResultErrorInfo(result.result.error)\n\t\t\t});\n\t\t\tif (envelope != null) return withCors(envelopeReply({\n\t\t\t\tk: \"act\",\n\t\t\t\tw: result.toJsonObject()\n\t\t\t}));\n\t\t\treturn withCors(result.toHttpResponse({ useErrorStatus: options.useErrorStatus }));\n\t\t}\n\t\treturn withCors(new Response(\"Not found\", { status: 404 }));\n\t};\n}\n//#endregion\n//#region src/action/ActionRuntime/Handler/PeerLink/Acceptor/Hibernation/ConnectionStateStore.ts\n/**\n* A typed per-connection state store that co-owns the app state and the acceptor handler's routing\n* binding in one attachment, so neither the consumer nor the handler has to hand-merge the two. Create\n* it through {@link createConnectionStateStore} (which also wires binding persistence and replays\n* surviving connections after a wake), then `get`/`set`/`clearApp` the app state directly.\n*\n* The mechanism is carrier-neutral — it only needs read/write/enumerate callbacks for the connection's\n* attachment — but it pays off on transports whose connections outlive process eviction (e.g. a\n* Durable Object's hibernatable WebSockets), which is why it lives beside the hibernation adapter.\n*\n* ```ts\n* const players = createConnectionStateStore(serverHandler, {\n*   schema: vs_player,\n*   read: (ws) => ws.deserializeAttachment(),\n*   write: (ws, v) => ws.serializeAttachment(v),\n*   getConnections: () => ctx.getWebSockets(),\n* });\n* players.set(ws, player); // binding is preserved automatically\n* const player = players.get(ws);\n* ```\n*/\nvar ConnectionStateStore = class {\n\toptions;\n\tconstructor(options) {\n\t\tthis.options = options;\n\t}\n\t/** The validated app state for a connection, or `null` if unset / invalid. */\n\tget(connection) {\n\t\treturn this._readAttachment(connection).app ?? null;\n\t}\n\t/** Set the app state, preserving the runtime binding already pinned to the connection. */\n\tset(connection, app) {\n\t\tconst existing = this._readAttachment(connection);\n\t\tthis.options.write(connection, {\n\t\t\tapp,\n\t\t\tbinding: existing.binding\n\t\t});\n\t}\n\t/** Clear the app state but keep the binding (e.g. a spectator that stopped watching). */\n\tclearApp(connection) {\n\t\tconst existing = this._readAttachment(connection);\n\t\tthis.options.write(connection, { binding: existing.binding });\n\t}\n\t/** Every live connection paired with its (validated) app state — for rebuilding in-memory state after a wake. */\n\tentries() {\n\t\treturn this.options.getConnections().map((connection) => [connection, this._readAttachment(connection).app ?? null]);\n\t}\n\t/** @internal Persist a freshly-bound connection's binding, preserving any app state already stored. */\n\t_persistBinding(connection, binding) {\n\t\tconst existing = this._readAttachment(connection);\n\t\tthis.options.write(connection, {\n\t\t\tapp: existing.app,\n\t\t\tbinding\n\t\t});\n\t}\n\t/** @internal The persisted binding for a connection, if any (used to replay routing after a wake). */\n\t_readBinding(connection) {\n\t\treturn this._readAttachment(connection).binding;\n\t}\n\t_readAttachment(connection) {\n\t\ttry {\n\t\t\tconst raw = this.options.read(connection);\n\t\t\tif (typeof raw !== \"object\" || raw === null) return {};\n\t\t\tconst attachment = raw;\n\t\t\tconst result = {};\n\t\t\tif (attachment.binding != null) result.binding = attachment.binding;\n\t\t\tif (attachment.app !== void 0) {\n\t\t\t\tconst app = this._validateApp(attachment.app);\n\t\t\t\tif (app !== void 0) result.app = app;\n\t\t\t}\n\t\t\treturn result;\n\t\t} catch {\n\t\t\treturn {};\n\t\t}\n\t}\n\t_validateApp(value) {\n\t\tconst schema = this.options.schema;\n\t\tif (schema == null) return value;\n\t\tconst result = schema[\"~standard\"].validate(value);\n\t\tif (result instanceof Promise) return void 0;\n\t\tif (result.issues != null) return void 0;\n\t\treturn result.value;\n\t}\n};\n/**\n* Build a per-connection {@link ConnectionStateStore} bound to an {@link ChannelAcceptor}: it registers\n* itself as the handler's connection-bound persistence callback (so bindings are written without\n* overwriting app state) and immediately replays every live connection's stored binding via\n* {@link ChannelAcceptor.rehydrate} — so on a transport that resumes after eviction (e.g. a\n* Durable Object waking from hibernation) both the app identity and the action routing come back from a\n* single attachment, with no storage reads and no hand-rolled merge.\n*\n* Lives outside the handler so the generic {@link ChannelAcceptor} stays free of any attachment/\n* hibernation concern — it exposes only the neutral `setOnConnectionBound` + `rehydrate`\n* hooks this builder drives.\n*/\nfunction createConnectionStateStore(handler, options) {\n\tconst store = new ConnectionStateStore(options);\n\thandler.setOnConnectionBound((connection, binding) => store._persistBinding(connection, binding));\n\tfor (const connection of options.getConnections()) {\n\t\tconst binding = store._readBinding(connection);\n\t\tif (binding != null) handler.rehydrate(connection, binding);\n\t}\n\treturn store;\n}\n//#endregion\n//#region src/action/ActionRuntime/Handler/PeerLink/Acceptor/Hibernation/createHibernatableWsServerAdapter.ts\n/**\n* Wire the hibernation lifecycle for an acceptor handler on a transport whose connections outlive process\n* eviction (e.g. a Durable Object's hibernatable WebSockets). It owns persistence end to end:\n* registers `setAttachment` as the handler's connection-bound callback and immediately replays every\n* live connection's stored binding via `getAttachment`, so results/pushes still route after a wake.\n*\n* Layered on top of the generic {@link ChannelAcceptor} — it touches only the handler's neutral\n* `setOnConnectionBound` / `rehydrate` / `receive` / `drop` surface, so no\n* hibernation concern leaks into the handler itself.\n*\n* Construct it once when the handler is built, then forward connection events:\n* ```ts\n* const duplex = createHibernatableWsServerAdapter({ handler, getConnections, getAttachment, setAttachment });\n* // webSocketMessage(ws, msg) => duplex.receive(ws, msg);\n* // webSocketClose/Error(ws)  => duplex.drop(ws);\n* ```\n*/\nfunction createHibernatableWsServerAdapter(options) {\n\tconst { handler, getConnections, getAttachment, setAttachment } = options;\n\thandler.setOnConnectionBound(setAttachment);\n\tfor (const connection of getConnections()) {\n\t\tconst binding = getAttachment(connection);\n\t\tif (binding != null) handler.rehydrate(connection, binding);\n\t}\n\treturn {\n\t\treceive: (connection, frame) => handler.receive(connection, frame),\n\t\tdrop: (connection) => handler.drop(connection)\n\t};\n}\n//#endregion\n//#region src/action/ActionRuntime/Transport/Carrier/AcceptorCarrier.types.ts\n/**\n* Narrow an acceptor carrier to the exchange shape via its `shape` discriminant — the one branch\n* `serveChannel` uses to pick the duplex (push-capable) vs exchange (request/reply) wiring. A duplex\n* carrier carries `shape: ETransportShape.duplex`, so the `else` branch is the duplex one.\n*/\nfunction isExchangeAcceptorCarrier(carrier) {\n\treturn carrier.shape === \"exchange\";\n}\n//#endregion\n//#region src/action/ActionRuntime/Channel/serveChannel.ts\n/**\n* Build the per-connection subset resolver a multi-channel acceptor uses: advertised `hello.channels`\n* tags → the channel that connection speaks (its own codec + dictionary version for a single tag, the\n* composed union for several, the combined `channel` for none). Returns `null` — the handshake then\n* rejects — for an unknown tag, and for a repeated tag: a repeat would compose the same channel twice\n* into the positional wire dictionary and desync every later route index.\n*\n* Throws immediately (setup time, not per connection) when two served channels share a tag — a\n* last-write-wins registry could never route that deterministically.\n*/\nfunction buildChannelSubsetResolver(combined, registry) {\n\tconst byTag = /* @__PURE__ */ new Map();\n\tfor (const entry of registry) {\n\t\tif (byTag.has(entry.tag)) throw new Error(`serveChannel: duplicate channel tag \"${entry.tag}\" in \\`channels\\` — every served channel needs a distinct tag, or subset selection cannot route deterministically.`);\n\t\tbyTag.set(entry.tag, entry);\n\t}\n\treturn (tags) => {\n\t\tif (tags == null || tags.length === 0) return combined;\n\t\tconst selected = [];\n\t\tconst seen = /* @__PURE__ */ new Set();\n\t\tfor (const tag of tags) {\n\t\t\tconst found = byTag.get(tag);\n\t\t\tif (found == null || seen.has(tag)) return null;\n\t\t\tseen.add(tag);\n\t\t\tselected.push(found);\n\t\t}\n\t\treturn selected.length === 1 ? selected[0] : combineChannels(selected);\n\t};\n}\n/** Default accepted set, shared by every carrier: negotiate per connection to whatever the client picks. */\nconst DEFAULT_SERVER_SECURITY_LEVELS = [\n\t\"none\",\n\t\"authenticated\",\n\t\"encrypted\"\n];\nfunction serveChannel(runtimeOrChannel, channelOrOptions, legacyOptions) {\n\tconst modern = !(runtimeOrChannel instanceof ActionRuntime);\n\tconst channel = modern ? runtimeOrChannel : channelOrOptions;\n\tconst rawOptions = modern ? channelOrOptions : legacyOptions;\n\tif (rawOptions == null) throw err_nice_action.fromId(\"conflicting_server_options\", { detail: \"serveChannel requires server options\" });\n\tconst suppliedRuntime = modern ? rawOptions.runtime : runtimeOrChannel;\n\tconst identity = modern ? rawOptions.identity : void 0;\n\tif (modern && suppliedRuntime == null === (identity == null)) throw err_nice_action.fromId(\"conflicting_server_options\", { detail: \"pass exactly one of `identity` or `runtime`\" });\n\tif (!modern && rawOptions.identity != null) throw err_nice_action.fromId(\"conflicting_server_options\", { detail: \"the deprecated `serveChannel(runtime, channel, options)` form cannot take `identity` — use `serveChannel(channel, { identity, … })`\" });\n\tconst ownsRuntime = suppliedRuntime == null;\n\tconst runtime = suppliedRuntime ?? new ActionRuntime(identity, { scope: \"instance\" });\n\tconst { identity: _identity, runtime: _runtime, ...options } = rawOptions;\n\truntime._assertActive();\n\tif (runtime.scope !== \"instance\") throw err_nice_action.fromId(\"invalid_server_runtime_scope\", {\n\t\truntime: runtime.coordinate.stringId,\n\t\tactualScope: runtime.scope\n\t});\n\ttry {\n\t\tconst duplexCarriers = options.carriers.filter((carrier) => !isExchangeAcceptorCarrier(carrier));\n\t\tconst exchangeCarriers = options.carriers.filter((carrier) => isExchangeAcceptorCarrier(carrier));\n\t\tif (exchangeCarriers.length > 1) throw new Error(\"serveChannel: at most one exchange carrier is supported\");\n\t\tconst exchangeCarrier = exchangeCarriers[0];\n\t\tconst singleDuplex = duplexCarriers.length === 1;\n\t\tif (options.connectionState != null && !singleDuplex) throw new Error(\"serveChannel: `connectionState` requires exactly one duplex carrier\");\n\t\tif (options.channelCases != null && !singleDuplex) throw new Error(\"serveChannel: `channelCases` requires exactly one duplex carrier\");\n\t\tconst exchangeSecure = exchangeCarrier != null && (exchangeCarrier.secure ?? true);\n\t\tconst anyDuplexSecure = duplexCarriers.some((carrier) => carrier.secure ?? true);\n\t\tconst securityLevel = options.securityLevel ?? DEFAULT_SERVER_SECURITY_LEVELS;\n\t\tconst registry = options.channels;\n\t\tconst resolveChannel = registry != null && registry.length > 1 ? buildChannelSubsetResolver(channel, registry) : void 0;\n\t\tlet secure;\n\t\tif (anyDuplexSecure || exchangeSecure) {\n\t\t\tconst storage = options.storage;\n\t\t\tif (storage == null) throw new Error(\"serveChannel: a secure carrier requires `storage`. Pass it, or set `secure: false` on the carrier for a plain endpoint.\");\n\t\t\tsecure = {\n\t\t\t\tstorage,\n\t\t\t\tlink: options.link ?? new ClientCryptoKeyLink({ storageAdapter: storage }),\n\t\t\t\tverifyKeyResolver: options.verifyKeyResolver ?? createStorageTofuVerifyKeyResolver(storage)\n\t\t\t};\n\t\t}\n\t\tconst plainRouter = (handler) => ({\n\t\t\treceive: (connection, frame) => handler.receive(connection, frame),\n\t\t\tdrop: (connection) => handler.drop(connection)\n\t\t});\n\t\tconst asObject = (value) => typeof value === \"object\" && value != null ? value : {};\n\t\tconst acceptors = [];\n\t\tlet connections;\n\t\tfor (const carrier of duplexCarriers) {\n\t\t\tconst handler = (carrier.secure ?? true) && secure != null ? acceptChannel(runtime, channel, {\n\t\t\t\tstorage: secure.storage,\n\t\t\t\tlink: secure.link,\n\t\t\t\tverifyKeyResolver: secure.verifyKeyResolver,\n\t\t\t\tsecurityLevel,\n\t\t\t\tsend: carrier.send,\n\t\t\t\tclose: carrier.close,\n\t\t\t\tdefaultTimeout: options.defaultTimeout,\n\t\t\t\tresolveChannel,\n\t\t\t\tlogger: options.logger,\n\t\t\t\twireTap: options.wireTap,\n\t\t\t\ttransportLabel: carrier.carrierLabel,\n\t\t\t\tpersistedReceiver: options.reliableStore,\n\t\t\t\tmaxKeyedStreamsPerClient: options.maxKeyedStreamsPerClient\n\t\t\t}) : createChannelAcceptor({\n\t\t\t\tcreateFormatMessage: channel.createCodec,\n\t\t\t\tsend: carrier.send,\n\t\t\t\tclose: carrier.close,\n\t\t\t\truntime,\n\t\t\t\tdefaultTimeout: options.defaultTimeout,\n\t\t\t\tlogger: options.logger,\n\t\t\t\twireTap: options.wireTap,\n\t\t\t\ttransportLabel: carrier.carrierLabel,\n\t\t\t\tpersistedReceiver: options.reliableStore,\n\t\t\t\tmaxKeyedStreamsPerClient: options.maxKeyedStreamsPerClient\n\t\t\t});\n\t\t\tfor (const protocol of options.protocols ?? []) handler.registerFrameProtocol(protocol);\n\t\t\tconst attach = carrier.attachmentStore;\n\t\t\tlet router;\n\t\t\tif (attach == null) router = plainRouter(handler);\n\t\t\telse if (options.connectionState != null) {\n\t\t\t\tconnections = createConnectionStateStore(handler, {\n\t\t\t\t\tschema: options.connectionState.schema,\n\t\t\t\t\tgetConnections: attach.getConnections,\n\t\t\t\t\tread: attach.read,\n\t\t\t\t\twrite: attach.write\n\t\t\t\t});\n\t\t\t\trouter = plainRouter(handler);\n\t\t\t} else router = createHibernatableWsServerAdapter({\n\t\t\t\thandler,\n\t\t\t\tgetConnections: attach.getConnections,\n\t\t\t\tgetAttachment: (connection) => attach.read(connection)?.binding,\n\t\t\t\tsetAttachment: (connection, binding) => attach.write(connection, {\n\t\t\t\t\t...asObject(attach.read(connection)),\n\t\t\t\t\tbinding\n\t\t\t\t})\n\t\t\t});\n\t\t\tcarrier._activate(router);\n\t\t\tacceptors.push(handler);\n\t\t}\n\t\tconst installedHandlers = [...options.handlers ?? [], ...acceptors];\n\t\tconst soleDuplex = singleDuplex ? duplexCarriers[0] : void 0;\n\t\tlet disposed = false;\n\t\tconst receive = (connection, frame) => {\n\t\t\tif (disposed) return;\n\t\t\tif (soleDuplex == null) throw new Error(duplexCarriers.length === 0 ? \"serveChannel: no duplex carrier to receive on (this server has no socket transport)\" : \"serveChannel: several duplex carriers — feed each carrier handle's receive() directly\");\n\t\t\tsoleDuplex.receive(connection, frame);\n\t\t};\n\t\tconst drop = (connection) => {\n\t\t\tif (disposed) return;\n\t\t\tsoleDuplex?.drop(connection);\n\t\t};\n\t\tconst pushToClient = (target, request, pushOptions) => {\n\t\t\tif (disposed) throw new Error(\"serveChannel: server disposed\");\n\t\t\tconst owner = target instanceof RuntimeCoordinate ? acceptors.find((acceptor) => acceptor.ownsLiveConnectionFor(target)) : acceptors.find((acceptor) => acceptor.hasConnection(target));\n\t\t\tif (owner == null) throw err_nice_transport.fromId(\"not_found\", { actionId: target instanceof RuntimeCoordinate ? target.stringId : \"push-target-connection\" });\n\t\t\treturn owner.pushToClient(runtime, target, request, pushOptions);\n\t\t};\n\t\tconst broadcast = (makeRequest, broadcastOptions) => {\n\t\t\tif (disposed) throw new Error(\"serveChannel: server disposed\");\n\t\t\tif (!singleDuplex) throw new Error(\"serveChannel: broadcast requires exactly one duplex carrier — broadcast over a specific acceptors[i] instead\");\n\t\t\tacceptors[0].broadcast(makeRequest, {\n\t\t\t\truntime,\n\t\t\t\t...broadcastOptions\n\t\t\t});\n\t\t};\n\t\tconst makeConnectionContext = (connection, _request, isConnectionLive, execution) => ({\n\t\t\t...execution,\n\t\t\tget connection() {\n\t\t\t\treturn connection != null && isConnectionLive() ? connection : null;\n\t\t\t},\n\t\t\tget state() {\n\t\t\t\treturn connection != null && isConnectionLive() && connections != null ? connections.get(connection) : null;\n\t\t\t},\n\t\t\tsetState(value) {\n\t\t\t\tif (connection == null || !isConnectionLive()) throw err_nice_action.fromId(\"connection_required\", { operation: \"set connection state\" });\n\t\t\t\tif (connections != null) connections.set(connection, value);\n\t\t\t},\n\t\t\tclearState() {\n\t\t\t\tif (connection == null || !isConnectionLive()) throw err_nice_action.fromId(\"connection_required\", { operation: \"clear connection state\" });\n\t\t\t\tif (connections != null) connections.clearApp(connection);\n\t\t\t},\n\t\t\tbroadcast(makeRequest, contextOptions) {\n\t\t\t\tbroadcast(makeRequest, {\n\t\t\t\t\texcept: contextOptions?.exceptSelf && isConnectionLive() ? connection ?? null : null,\n\t\t\t\t\twhere: contextOptions?.where,\n\t\t\t\t\ttimeout: contextOptions?.timeout,\n\t\t\t\t\tonError: contextOptions?.onError\n\t\t\t\t});\n\t\t\t},\n\t\t\tpushBack(pushRequest, pushOptions) {\n\t\t\t\tif (connection == null || !isConnectionLive()) throw err_nice_action.fromId(\"connection_required\", { operation: \"push back to the client\" });\n\t\t\t\treturn pushToClient(connection, pushRequest, pushOptions);\n\t\t\t}\n\t\t});\n\t\tif (options.channelCases != null) installedHandlers.push(acceptors[0].forConnectionDomainCasesMulti(channel.toAcceptorDomains, options.channelCases, makeConnectionContext));\n\t\tlet releaseRuntimeHandlers;\n\t\ttry {\n\t\t\treleaseRuntimeHandlers = runtime._installHandlers(installedHandlers);\n\t\t} catch (error) {\n\t\t\tfor (const carrier of duplexCarriers) carrier._dispose?.();\n\t\t\tfor (const acceptor of acceptors) acceptor.dispose();\n\t\t\tthrow error;\n\t\t}\n\t\tconst exchangeSecurity = exchangeSecure && secure != null ? {\n\t\t\tlink: secure.link,\n\t\t\tverifyKeyResolver: secure.verifyKeyResolver,\n\t\t\tlocalCoordinate: runtime.coordinate.toJsonObject(),\n\t\t\tdictionaryVersion: resolveChannel != null ? (hello) => resolveChannel(hello.channels)?.dictionaryVersion ?? null : channel.dictionaryVersion,\n\t\t\tsecurityLevel\n\t\t} : void 0;\n\t\tconst defaultIsUpgrade = (request) => request.headers.get(\"Upgrade\") === \"websocket\";\n\t\tconst upgraders = [];\n\t\tfor (const carrier of duplexCarriers) {\n\t\t\tif (carrier.upgrade == null) continue;\n\t\t\tupgraders.push({\n\t\t\t\tisUpgrade: carrier.isUpgrade ?? defaultIsUpgrade,\n\t\t\t\tupgrade: carrier.upgrade\n\t\t\t});\n\t\t}\n\t\tconst activeFetch = createActionFetchHandler(runtime, {\n\t\t\tcors: exchangeCarrier?.cors,\n\t\t\tonWebSocketUpgrade: upgraders.length === 0 ? void 0 : (request, url) => (upgraders.find((u) => u.isUpgrade(request, url)) ?? upgraders[0]).upgrade(request, url),\n\t\t\tisWebSocketUpgrade: upgraders.length === 0 ? void 0 : (request, url) => upgraders.some((u) => u.isUpgrade(request, url)),\n\t\t\tisActionPath: exchangeCarrier != null ? exchangeCarrier.isActionPath ?? (() => true) : () => false,\n\t\t\tsecurity: exchangeSecurity,\n\t\t\tuseErrorStatus: exchangeCarrier?.useErrorStatus,\n\t\t\tlogger: options.logger,\n\t\t\ttransportLabel: exchangeCarrier?.carrierLabel\n\t\t});\n\t\tconst fetch = (request) => disposed ? Promise.resolve(new Response(\"serveChannel: server disposed\", {\n\t\t\tstatus: 503,\n\t\t\theaders: { \"cache-control\": \"no-store\" }\n\t\t})) : activeFetch(request);\n\t\tconst dispose = () => {\n\t\t\tif (disposed) return;\n\t\t\tdisposed = true;\n\t\t\tfor (const carrier of duplexCarriers) carrier._dispose?.();\n\t\t\tfor (const acceptor of acceptors) acceptor.dispose();\n\t\t\treleaseRuntimeHandlers();\n\t\t\tif (ownsRuntime) runtime.dispose();\n\t\t};\n\t\treturn {\n\t\t\truntime,\n\t\t\tacceptors,\n\t\t\tfetch,\n\t\t\treceive,\n\t\t\tdrop,\n\t\t\tdispose,\n\t\t\tpushToClient,\n\t\t\tbroadcast,\n\t\t\tconnections\n\t\t};\n\t} catch (error) {\n\t\tfor (const carrier of options.carriers ?? []) if (!isExchangeAcceptorCarrier(carrier)) carrier._dispose?.();\n\t\tif (ownsRuntime) runtime.dispose();\n\t\tthrow error;\n\t}\n}\nfunction serveChannels(runtimeOrChannels, channelsOrOptions, legacyOptions) {\n\tconst legacy = runtimeOrChannels instanceof ActionRuntime;\n\tconst channels = legacy ? channelsOrOptions : runtimeOrChannels;\n\tconst options = legacy ? legacyOptions : channelsOrOptions;\n\tconst combined = combineChannels(channels);\n\treturn legacy ? serveChannel(runtimeOrChannels, combined, {\n\t\t...options,\n\t\tchannels\n\t}) : serveChannel(combined, {\n\t\t...options,\n\t\tchannels\n\t});\n}\n//#endregion\n//#region src/action/ActionRuntime/Channel/serveHost.ts\nfunction serveHost(runtimeOrChannel, channelOrHost, hostOrOptions, legacyOptions) {\n\tconst legacy = runtimeOrChannel instanceof ActionRuntime;\n\tconst channel = legacy ? channelOrHost : runtimeOrChannel;\n\tconst host = legacy ? hostOrOptions : channelOrHost;\n\tconst options = legacy ? legacyOptions : hostOrOptions;\n\tconst server = legacy ? serveChannel(runtimeOrChannel, channel, {\n\t\t...options,\n\t\tcarriers: host.carriers,\n\t\tstorage: host.storage\n\t}) : serveChannel(channel, {\n\t\t...options,\n\t\tcarriers: host.carriers,\n\t\tstorage: host.storage\n\t});\n\ttry {\n\t\thost.onServed?.(server);\n\t} catch (error) {\n\t\tserver.dispose();\n\t\tthrow error;\n\t}\n\treturn server;\n}\n//#endregion\n//#region src/action/ActionRuntime/Gateway/forwardTo.ts\n/**\n* Opaque action forwarding — the platform-neutral half of the front-door routing surface.\n*\n* Security in `connect-core/action` terminates at the *final runtime* (the acceptor that runs the secure\n* handshake). A forwarder therefore never reads, decrypts, or re-signs the body: it only picks a\n* destination and passes the request through. That keeps the channel end-to-end encrypted between the\n* origin client and whatever final runtime ultimately serves it — a Durable Object, a service binding, or\n* an entirely different HTTP server — while the forwarder in the middle stays a dumb, stateless, identity-\n* less relay. Because the body is opaque, the routing key must ride the URL/headers (which is why callers\n* encode it in the path, e.g. `/bridge/:id/...`).\n*\n* A `forwardTo(...)` is just an {@link IFetchHandler}, so it drops straight into any framework (Hono, raw\n* Workers) or the bundled {@link actionRouter}.\n*/\n/** Permissive CORS, matching the rest of the action HTTP surface. Override or disable per forwarder. */\nconst DEFAULT_FORWARD_CORS = {\n\t\"Access-Control-Allow-Origin\": \"*\",\n\t\"Access-Control-Allow-Methods\": \"GET, POST, OPTIONS\",\n\t\"Access-Control-Allow-Headers\": \"Content-Type\",\n\t\"Access-Control-Max-Age\": \"86400\"\n};\n/**\n* Build an opaque forwarder: pick a destination `{ fetch }` from the request (and matched params), then\n* pass the request straight through. `pickTarget` may be async (e.g. to look up which instance/region owns\n* a resource first). The CORS `OPTIONS` preflight is answered at the edge by default.\n*\n* ```ts\n* // to a per-id Durable Object (E2E client ↔ DO):\n* forwardTo(({ params }) => env.DO_BRIDGE.get(env.DO_BRIDGE.idFromString(params.id)))\n* // to a service binding:\n* forwardTo(() => env.OTHER_WORKER)\n* // to any HTTP server, stripping a prefix:\n* forwardTo(() => ({ fetch: (req) => fetch(UPSTREAM, req) }), { rewrite: (u) => u.pathname.replace(\"/up\", \"\") })\n* ```\n*/\nfunction forwardTo(pickTarget, options = {}) {\n\treturn { async fetch(request, route) {\n\t\tif (request.method === \"OPTIONS\" && options.cors !== false) return new Response(null, {\n\t\t\tstatus: 204,\n\t\t\theaders: options.cors ?? DEFAULT_FORWARD_CORS\n\t\t});\n\t\tconst url = route?.url ?? new URL(request.url);\n\t\tconst ctx = {\n\t\t\trequest,\n\t\t\turl,\n\t\t\tparams: route?.params ?? {}\n\t\t};\n\t\tconst target = await pickTarget(ctx);\n\t\tif (options.rewrite == null) return target.fetch(request);\n\t\tconst rewritten = options.rewrite(url, ctx);\n\t\tconst nextUrl = typeof rewritten === \"string\" ? rewritten : rewritten.toString();\n\t\treturn target.fetch(new Request(nextUrl, request));\n\t} };\n}\n//#endregion\n//#region src/action/ActionRuntime/Transport/Carrier/exchange/http/httpAcceptorCarrier.ts\n/**\n* An HTTP {@link IExchangeAcceptorCarrier}: the accept-in dual of {@link httpCarrier}. It serves the\n* secure exchange protocol (handshake → token session → encrypted frames) over web-standard\n* `Request`/`Response`. The crypto identity, runtime coordinate, dictionary version, and accepted security\n* levels are all supplied centrally by `serveChannel`, so this only needs to say which requests carry an\n* action envelope and how to answer CORS.\n*/\nfunction httpAcceptorCarrier(options = {}) {\n\treturn {\n\t\tshape: \"exchange\",\n\t\tcarrierLabel: options.carrierLabel ?? \"http\",\n\t\tsecure: options.secure,\n\t\tisActionPath: options.isActionPath,\n\t\tcors: options.cors,\n\t\tuseErrorStatus: options.useErrorStatus\n\t};\n}\n//#endregion\nexport { isAction_Base_JsonObject as A, EActionProgressType as B, isActionPayload_Any_JsonObject as C, EReliabilityTier as D, EActionResponseMode as E, ERunningActionState as F, ActionBase as H, ERunningActionUpdateType as I, ActionPayload_Request as L, err_nice_action as M, RunningAction as N, actionSchema as O, ERunningActionFinishedType as P, ActionPayload_Result as R, err_nice_external_client as S, ActionSchema as T, ActionPayload as V, ActionLocalHandler as _, serveChannel as a, EErrId_NiceTransport as b, ExchangeAcceptor as c, combineChannels as d, connectChannel as f, decodeActionFrame as g, createDefaultServeLogger as h, buildChannelSubsetResolver as i, EErrId_NiceAction as j, isActionPayload_Result_JsonObject as k, acceptChannel as l, defineChannel as m, forwardTo as n, serveChannels as o, connectChannels as p, serveHost as r, isExchangeAcceptorCarrier as s, httpAcceptorCarrier as t, acceptChannelConnections as u, createLocalHandler as v, isActionPayload_Request_JsonObject as w, err_nice_transport as x, ActionRuntime as y, EActionPayloadType as z };\n\n//# sourceMappingURL=httpAcceptorCarrier-DY2vBLvO.mjs.map","import { F as classifyConnectFailure, G as inMemoryCarrier$1, J as wsAcceptorCarrier, K as createInMemoryChannelPair, N as httpCarrier$1, P as EWireConnectFailureKind, R as wsCarrier$1, U as rtcCarrier$1, W as rtcDataChannelByteChannel } from \"../wire-D7Nv6hx_.mjs\";\nimport { b as NiceError, m as err, s as castNiceError } from \"../error-BFAEkmpX.mjs\";\nimport { F as createStorageTofuVerifyKeyResolver, N as createInMemoryTofuVerifyKeyResolver, R as runtimeLinkId, k as ESecurityLevel, z as RuntimeCoordinate } from \"../ReliableLog-DudDQ2zp.mjs\";\nimport \"../util-DiEla9R9.mjs\";\nimport { A as isAction_Base_JsonObject, B as EActionProgressType, C as isActionPayload_Any_JsonObject, D as EReliabilityTier, E as EActionResponseMode, F as ERunningActionState, H as ActionBase, I as ERunningActionUpdateType, L as ActionPayload_Request, M as err_nice_action, N as RunningAction, O as actionSchema, P as ERunningActionFinishedType, R as ActionPayload_Result, S as err_nice_external_client, T as ActionSchema, V as ActionPayload, _ as ActionLocalHandler, a as serveChannel, b as EErrId_NiceTransport, c as ExchangeAcceptor, d as combineChannels, f as connectChannel, g as decodeActionFrame, h as createDefaultServeLogger, i as buildChannelSubsetResolver, j as EErrId_NiceAction, k as isActionPayload_Result_JsonObject, l as acceptChannel, m as defineChannel, n as forwardTo, o as serveChannels, p as connectChannels, r as serveHost, s as isExchangeAcceptorCarrier, t as httpAcceptorCarrier, u as acceptChannelConnections, v as createLocalHandler, w as isActionPayload_Request_JsonObject, x as err_nice_transport, y as ActionRuntime, z as EActionPayloadType } from \"../httpAcceptorCarrier-DY2vBLvO.mjs\";\nimport { nanoid } from \"nanoid\";\n//#region src/action/ActionDefinition/Action/Context/ActionContext.ts\nvar ActionContext = class extends ActionBase {\n\t_domain;\n\tform = \"context\";\n\t_routing;\n\ttimeCreated;\n\tcuid;\n\toriginClient;\n\t/**\n\t* Local-only receiver-side reliable-delivery facts for the frame this context arrived on —\n\t* `(seq, streamKey, redelivered)`, the free idempotency key for exactly-once effects. Present only\n\t* inside the executing handler of a `.reliable()` action; `undefined` for best-effort actions and on\n\t* the sending side. Never serialized (see {@link IHandledReliability}).\n\t*/\n\treliability;\n\t_receiverMetadata;\n\tconstructor(_domain, id, hydrationData) {\n\t\tsuper(\"context\", _domain, id);\n\t\tthis._domain = _domain;\n\t\tthis.timeCreated = hydrationData.timeCreated;\n\t\tthis.cuid = hydrationData.cuid;\n\t\tthis._routing = hydrationData.routing;\n\t\tthis.originClient = hydrationData.originClient;\n\t\tthis.reliability = void 0;\n\t}\n\t/** @internal Installed by the receiving runtime from out-of-band transport facts. */\n\t_setReceiverMetadata(metadata) {\n\t\tObject.defineProperty(this, \"_receiverMetadata\", {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: metadata,\n\t\t\twritable: true\n\t\t});\n\t\tObject.defineProperty(this, \"reliability\", {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: metadata.reliability\n\t\t});\n\t}\n\t/** @internal Read only by the acceptor that owns the arrival. */\n\t_getReceiverMetadata() {\n\t\treturn this._receiverMetadata;\n\t}\n\t_setOriginClient(client) {\n\t\tthis.originClient = client;\n\t}\n\ttoJsonString() {\n\t\treturn JSON.stringify(this.toJsonObject());\n\t}\n\ttoContextDataJsonObject() {\n\t\treturn {\n\t\t\ttimeCreated: this.timeCreated,\n\t\t\tcuid: this.cuid,\n\t\t\trouting: this.routing.map((item) => ({\n\t\t\t\truntime: item.runtime.toJsonObject(),\n\t\t\t\thandler: item.handler,\n\t\t\t\ttime: item.time\n\t\t\t})),\n\t\t\toriginClient: this.originClient.toJsonObject()\n\t\t};\n\t}\n\ttoJsonObject() {\n\t\treturn {\n\t\t\t...super.toJsonObject(),\n\t\t\t...this.toContextDataJsonObject()\n\t\t};\n\t}\n\tget routing() {\n\t\treturn this._routing;\n\t}\n\taddRouteItem(item) {\n\t\tthis._routing.push(item);\n\t}\n\tdeserializeInput(serialized) {\n\t\treturn this.schema.deserializeInput(serialized);\n\t}\n\tserializeInput(raw) {\n\t\treturn this.schema.serializeInput(raw);\n\t}\n\tvalidateInput(input) {\n\t\treturn this.schema.validateInput(input, {\n\t\t\tdomain: this.domain,\n\t\t\tactionId: this.id\n\t\t});\n\t}\n\tvalidateOutput(output) {\n\t\treturn this.schema.validateOutput(output, {\n\t\t\tdomain: this.domain,\n\t\t\tactionId: this.id\n\t\t});\n\t}\n};\n//#endregion\n//#region src/action/ActionDefinition/Action/Core/ActionCore.ts\nvar ActionCore = class extends ActionBase {\n\t_domain;\n\tform = \"core\";\n\tconstructor(_domain, id) {\n\t\tsuper(\"core\", _domain, id);\n\t\tthis._domain = _domain;\n\t}\n\tis(action) {\n\t\treturn action instanceof ActionPayload && action.domain === this.domain && action.id === this.id;\n\t}\n\t/**\n\t* Type-guard for the throw-style path (`runToOutput` rethrows on failure):\n\t* narrows a caught value to this action's declared error union when it is one\n\t* the action declared via `.throws()`. Everything else (foreign throws,\n\t* undeclared `NiceError`s) returns `false`.\n\t*/\n\tisExpectedError(error) {\n\t\treturn error instanceof NiceError && this.schema.isExpectedError(error);\n\t}\n\ttoJsonObject() {\n\t\treturn {\n\t\t\tid: this.id,\n\t\t\tform: this.form,\n\t\t\tdomain: this.domain,\n\t\t\tallDomains: this.allDomains\n\t\t};\n\t}\n\trequest(...args) {\n\t\tconst input = args[0];\n\t\tconst validatedInput = this.schema.validateInput(input, {\n\t\t\tactionId: this.id,\n\t\t\tdomain: this.domain\n\t\t});\n\t\treturn new ActionPayload_Request({ context: new ActionContext(this._domain, this.id, {\n\t\t\tcuid: nanoid(),\n\t\t\ttimeCreated: Date.now(),\n\t\t\trouting: [],\n\t\t\toriginClient: RuntimeCoordinate.unknown\n\t\t}) }, validatedInput, { time: Date.now() });\n\t}\n\tdeserializeInput(serialized) {\n\t\treturn this.schema.deserializeInput(serialized);\n\t}\n\tserializeInput(raw) {\n\t\treturn this.schema.serializeInput(raw);\n\t}\n\tvalidateInput(input) {\n\t\treturn this.schema.validateInput(input, {\n\t\t\tdomain: this.domain,\n\t\t\tactionId: this.id\n\t\t});\n\t}\n\tvalidateOutput(output) {\n\t\treturn this.schema.validateOutput(output, {\n\t\t\tdomain: this.domain,\n\t\t\tactionId: this.id\n\t\t});\n\t}\n};\n//#endregion\n//#region src/action/utils/isAction_Context_JsonObject.ts\nconst isAction_Context_JsonObject = (obj) => {\n\treturn isAction_Base_JsonObject(obj) && obj.form === \"context\";\n};\n//#endregion\n//#region src/action/utils/isAction_Core_JsonObject.ts\nconst isAction_Core_JsonObject = (obj) => {\n\treturn isAction_Base_JsonObject(obj) && obj.form === \"core\";\n};\n//#endregion\n//#region src/action/utils/isAction_Any_JsonObject.ts\nfunction isAction_Any_JsonObject(obj) {\n\treturn isActionPayload_Any_JsonObject(obj) || isAction_Context_JsonObject(obj) || isAction_Core_JsonObject(obj);\n}\n//#endregion\n//#region src/action/utils/assertIsActionJson.ts\nfunction assertIsActionJson(obj) {\n\tif (!isAction_Any_JsonObject(obj)) throw err_nice_action.fromId(\"wire_not_action_data\");\n}\n//#endregion\n//#region src/action/utils/isAction_Any_Instance.ts\nfunction isAction_Any_Instance(value) {\n\treturn value instanceof ActionCore || value instanceof ActionPayload || value instanceof ActionContext;\n}\n//#endregion\n//#region src/action/ActionDefinition/Domain/ActionDomainBase.ts\nvar ActionDomainBase = class {\n\tdomain;\n\tallDomains;\n\tactionSchema;\n\t_listeners = [];\n\tconstructor(definition) {\n\t\tthis.domain = definition.domain;\n\t\tthis.allDomains = definition.allDomains;\n\t\tthis.actionSchema = definition.actionSchema;\n\t}\n\t/**\n\t* Add an observer that is called after every action dispatched through this domain.\n\t* Returns an unsubscribe function — call it to remove the listener.\n\t*/\n\taddActionListener(listener) {\n\t\tthis._listeners.push(listener);\n\t\treturn () => {\n\t\t\tthis._listeners = this._listeners.filter((l) => l !== listener);\n\t\t};\n\t}\n\t/**\n\t* @internal\n\t* Observers registered directly on this domain via {@link addActionListener}.\n\t* Used to wire observers (e.g. devtools) onto RunningActions that aren't created\n\t* through the local-dispatch path — notably inbound actions pushed from a backend\n\t* or another client over a bidirectional transport.\n\t*/\n\t_getActionObservers() {\n\t\treturn this._listeners;\n\t}\n};\n//#endregion\n//#region src/action/ActionRuntime/ActionRuntimeManager.ts\n/** Root-domain registry. Object identity is the key; coordinates may legitimately match. */\nvar ActionRuntimeManager = class {\n\t_runtimes = /* @__PURE__ */ new Set();\n\t_context;\n\tconstructor(context) {\n\t\tthis._context = context ?? {};\n\t}\n\tregisterRuntime(runtime) {\n\t\truntime._assertActive();\n\t\tthis._runtimes.add(runtime);\n\t}\n\tunregisterRuntime(runtime) {\n\t\tthis._runtimes.delete(runtime);\n\t}\n\tgetRuntimeAndHandlerForAction(action, options, throwOnIssue) {\n\t\tconst localRuntime = options?.targetLocalRuntime;\n\t\tif (localRuntime != null) {\n\t\t\tlocalRuntime._assertActive();\n\t\t\tconst handler = localRuntime._getHandlerForAction(action, options);\n\t\t\tif (handler != null) return {\n\t\t\t\thandler,\n\t\t\t\truntime: localRuntime\n\t\t\t};\n\t\t\tif (throwOnIssue) throw err_nice_action.fromId(\"no_action_execution_handler\", {\n\t\t\t\tdomain: action.domain,\n\t\t\t\tactionId: action.id,\n\t\t\t\tspecifiedClient: localRuntime.coordinate\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tlet selected;\n\t\tlet ambiguousRuntimeIds;\n\t\tfor (const runtime of this._runtimes) {\n\t\t\tif (runtime.disposed) continue;\n\t\t\tconst handler = runtime._getHandlerForAction(action);\n\t\t\tif (handler == null) continue;\n\t\t\tif (selected == null) selected = {\n\t\t\t\thandler,\n\t\t\t\truntime\n\t\t\t};\n\t\t\telse {\n\t\t\t\tambiguousRuntimeIds ??= [selected.runtime.coordinate.stringId];\n\t\t\t\tambiguousRuntimeIds.push(runtime.coordinate.stringId);\n\t\t\t}\n\t\t}\n\t\tif (ambiguousRuntimeIds != null) throw err_nice_action.fromId(\"ambiguous_action_runtime\", {\n\t\t\tdomain: action.domain,\n\t\t\tactionId: action.id,\n\t\t\truntimes: ambiguousRuntimeIds\n\t\t});\n\t\tif (selected != null) return selected;\n\t\tif (throwOnIssue && this._runtimes.size === 0) throw err_nice_action.fromId(\"no_client_runtimes_registered\", { context: this._context });\n\t\tif (throwOnIssue) throw err_nice_action.fromId(\"no_action_execution_handler\", {\n\t\t\tdomain: action.domain,\n\t\t\tactionId: action.id\n\t\t});\n\t}\n\tgetRuntimeAndHandlerForActionOrThrow(action, options) {\n\t\treturn this.getRuntimeAndHandlerForAction(action, options, true);\n\t}\n\thasRuntime(runtime) {\n\t\treturn this._runtimes.has(runtime);\n\t}\n};\n//#endregion\n//#region src/action/ActionDefinition/Domain/ActionRootDomain.ts\nvar ActionRootDomain = class extends ActionDomainBase {\n\tdomainDefinition;\n\t_actionRuntimeManager;\n\tconstructor(domainDefinition) {\n\t\tconst domainId = domainDefinition.domain;\n\t\tsuper({\n\t\t\tdomain: domainId,\n\t\t\tallDomains: [domainId],\n\t\t\tactionSchema: {}\n\t\t});\n\t\tthis.domainDefinition = domainDefinition;\n\t\tthis._actionRuntimeManager = new ActionRuntimeManager({ domain: domainId });\n\t}\n\tcreateChildDomain(subDomainDef) {\n\t\tif (this.allDomains.includes(subDomainDef.domain)) throw err_nice_action.fromId(\"domain_already_exists_in_hierarchy\", {\n\t\t\tdomain: subDomainDef.domain,\n\t\t\tallParentDomains: this.allDomains,\n\t\t\tparentDomain: this.domain\n\t\t});\n\t\treturn new ActionDomain({\n\t\t\tallDomains: [...this.allDomains, subDomainDef.domain],\n\t\t\tdomain: subDomainDef.domain,\n\t\t\tactionSchema: subDomainDef.actions\n\t\t}, { rootDomain: this });\n\t}\n\t_registerRuntime(runtime) {\n\t\tthis._actionRuntimeManager.registerRuntime(runtime);\n\t}\n\t_unregisterRuntime(runtime) {\n\t\tthis._actionRuntimeManager.unregisterRuntime(runtime);\n\t}\n\t_hasRuntime(runtime) {\n\t\treturn this._actionRuntimeManager.hasRuntime(runtime);\n\t}\n\tasync _runAction(actionPayload, options) {\n\t\tconst allListeners = [...this._listeners, ...options?.listeners ?? []];\n\t\tlet handlerAndRuntime;\n\t\ttry {\n\t\t\thandlerAndRuntime = this._actionRuntimeManager.getRuntimeAndHandlerForActionOrThrow(actionPayload, options);\n\t\t} catch (err) {\n\t\t\tconst runningAction = new RunningAction({\n\t\t\t\tcontext: actionPayload.context,\n\t\t\t\trequest: actionPayload,\n\t\t\t\tcallSite: actionPayload._callSite\n\t\t\t});\n\t\t\trunningAction.addUpdateListeners(allListeners);\n\t\t\trunningAction._failWithError(err);\n\t\t\tthrow err;\n\t\t}\n\t\tconst { handler, runtime } = handlerAndRuntime;\n\t\truntime._captureActionCallSite(actionPayload, options?.captureCallSites);\n\t\tactionPayload.context._setOriginClient(runtime.coordinate);\n\t\tconst runningAction = await handler.handleActionRequest(actionPayload, {\n\t\t\ttargetLocalRuntime: runtime,\n\t\t\ttimeout: options?.timeout,\n\t\t\tstreamKey: options?.streamKey,\n\t\t\tcaptureCallSites: options?.captureCallSites\n\t\t});\n\t\trunningAction.addUpdateListeners(allListeners);\n\t\treturn runningAction;\n\t}\n};\n//#endregion\n//#region src/action/ActionDefinition/Domain/ActionDomain.ts\nvar ActionDomain = class ActionDomain extends ActionDomainBase {\n\t_rootDomain;\n\t_actionMap;\n\tconstructor(definition, { rootDomain }) {\n\t\tsuper(definition);\n\t\tthis._rootDomain = rootDomain;\n\t\tthis._actionMap = this.createActionMap();\n\t}\n\tget rootDomain() {\n\t\treturn this._rootDomain;\n\t}\n\t/**\n\t* @internal\n\t* All action observers that should see actions on this domain: the root domain's\n\t* observers plus this subdomain's own. Mirrors the listener set the local-dispatch\n\t* path assembles in `runAction`/`_runAction`, so inbound actions (pushed from a\n\t* backend or another client) can be wired up identically and surface in devtools.\n\t*/\n\t_collectActionObservers() {\n\t\treturn [...this._rootDomain._getActionObservers(), ...this._getActionObservers()];\n\t}\n\t_registerRuntime(runtime) {\n\t\tthis._rootDomain._registerRuntime(runtime);\n\t}\n\tcreateChildDomain(subDomainDef) {\n\t\tif (this.allDomains.includes(subDomainDef.domain)) throw err_nice_action.fromId(\"domain_already_exists_in_hierarchy\", {\n\t\t\tdomain: subDomainDef.domain,\n\t\t\tallParentDomains: this.allDomains,\n\t\t\tparentDomain: this.domain\n\t\t});\n\t\treturn new ActionDomain({\n\t\t\tallDomains: [...this.allDomains, subDomainDef.domain],\n\t\t\tdomain: subDomainDef.domain,\n\t\t\tactionSchema: subDomainDef.actions\n\t\t}, { rootDomain: this._rootDomain });\n\t}\n\tget action() {\n\t\treturn this._actionMap;\n\t}\n\tactionsMap() {\n\t\treturn this._actionMap;\n\t}\n\tactionForId(id) {\n\t\tif (!this.actionSchema[id]) throw err_nice_action.fromId(\"action_id_not_in_domain\", {\n\t\t\tdomain: this.domain,\n\t\t\tactionId: id\n\t\t});\n\t\treturn new ActionCore(this, id);\n\t}\n\twrapAsPartialLocalHandler(wrappedActionExecutor) {\n\t\tconst _handler = new ActionLocalHandler();\n\t\tconst executor = wrappedActionExecutor;\n\t\tfor (const actionKey in wrappedActionExecutor) {\n\t\t\tif (!this.actionSchema[actionKey]) continue;\n\t\t\t_handler.forAction(this.actionForId(actionKey), (request, context) => executor[request.id](request.input, context));\n\t\t}\n\t\treturn _handler;\n\t}\n\twrapAsLocalHandler(wrappedActionExecutor) {\n\t\tconst _handler = new ActionLocalHandler();\n\t\tconst executor = wrappedActionExecutor;\n\t\treturn _handler.forDomain(this, (request, context) => executor[request.id](request.input, context));\n\t}\n\thydrateContext(id, contextData) {\n\t\treturn new ActionContext(this, id, {\n\t\t\ttimeCreated: contextData.timeCreated,\n\t\t\tcuid: contextData.cuid,\n\t\t\trouting: contextData.routing.map((item) => {\n\t\t\t\treturn {\n\t\t\t\t\truntime: new RuntimeCoordinate(item.runtime),\n\t\t\t\t\thandler: item.handler,\n\t\t\t\t\ttime: item.time\n\t\t\t\t};\n\t\t\t}),\n\t\t\toriginClient: contextData.originClient ? new RuntimeCoordinate(contextData.originClient) : RuntimeCoordinate.unknown\n\t\t});\n\t}\n\tisDomainAction(action) {\n\t\treturn isAction_Any_Instance(action) && action.domain === this.domain;\n\t}\n\thydrateRequestPayload(serialized) {\n\t\tif (serialized.type !== \"request\") throw err_nice_action.fromId(\"hydration_action_state_mismatch\", {\n\t\t\texpected: \"request\",\n\t\t\treceived: serialized.type\n\t\t});\n\t\tif (serialized.domain !== this.domain) throw err_nice_action.fromId(\"hydration_domain_mismatch\", {\n\t\t\texpected: this.domain,\n\t\t\treceived: serialized.domain\n\t\t});\n\t\tconst id = serialized.id;\n\t\tif (!this.actionSchema[id]) throw err_nice_action.fromId(\"hydration_action_id_not_found\", {\n\t\t\tdomain: this.domain,\n\t\t\tactionId: serialized.id\n\t\t});\n\t\tconst contextAction = this.hydrateContext(id, serialized.context);\n\t\treturn new ActionPayload_Request({ context: contextAction }, contextAction.deserializeInput(serialized.input), { time: serialized.time });\n\t}\n\thydrateResultPayload(serialized) {\n\t\tif (serialized.type !== \"result\") throw err_nice_action.fromId(\"hydration_action_state_mismatch\", {\n\t\t\texpected: \"result\",\n\t\t\treceived: serialized.type\n\t\t});\n\t\tif (serialized.domain !== this.domain) throw err_nice_action.fromId(\"hydration_domain_mismatch\", {\n\t\t\texpected: this.domain,\n\t\t\treceived: serialized.domain\n\t\t});\n\t\tconst id = serialized.id;\n\t\tif (!this.actionSchema[id]) throw err_nice_action.fromId(\"hydration_action_id_not_found\", {\n\t\t\tdomain: this.domain,\n\t\t\tactionId: serialized.id\n\t\t});\n\t\tconst contextAction = this.hydrateContext(id, serialized.context);\n\t\tconst result = serialized.result.ok ? {\n\t\t\tok: true,\n\t\t\toutput: contextAction.schema.deserializeOutput(serialized.result.output)\n\t\t} : {\n\t\t\tok: false,\n\t\t\terror: castNiceError(serialized.result.error)\n\t\t};\n\t\treturn new ActionPayload_Result({ context: contextAction }, result, { time: serialized.time });\n\t}\n\thydrateAnyAction(actionJson) {\n\t\tassertIsActionJson(actionJson);\n\t\tif (actionJson.form === \"data\") {\n\t\t\tif (actionJson.type === \"request\") return this.hydrateRequestPayload(actionJson);\n\t\t\tif (actionJson.type === \"result\") return this.hydrateResultPayload(actionJson);\n\t\t}\n\t\treturn this.actionForId(actionJson.id);\n\t}\n\tasync runAction(request, options) {\n\t\tconst allListeners = [...options?.listeners ?? [], ...this._listeners];\n\t\treturn this._rootDomain._runAction(request, {\n\t\t\t...options,\n\t\t\tlisteners: allListeners\n\t\t});\n\t}\n\tcreateActionMap() {\n\t\tconst map = {};\n\t\tfor (const id in this.actionSchema) map[id] = new ActionCore(this, id);\n\t\treturn map;\n\t}\n};\n//#endregion\n//#region src/action/ActionDefinition/Domain/helpers/createRootActionDomain.ts\nconst createActionRootDomain = (definition) => {\n\treturn new ActionRootDomain(definition);\n};\n//#endregion\n//#region src/action/ActionRuntime/Gateway/actionRouter.ts\n/**\n* The optional, framework-free multiplexer for a front-door entry. It matches a request path against an\n* ordered list of patterns and dispatches to the first match — where every entry is just an\n* {@link IFetchHandler}: a served channel-set (`serveChannels`/`serveWorker`), an opaque `forwardTo`, or\n* even a whole nested router/sub-app. It also answers the CORS `OPTIONS` preflight once at the edge.\n*\n* You don't need it if you already have a router — the helpers are `{ fetch }`, so in Hono you call them\n* straight from routes (Hono extracts params). `actionRouter` is the batteries-included option for a raw\n* Worker `export default { fetch }`.\n*\n* ```ts\n* const router = actionRouter()\n*   .route(\"/bridge/:id/*\", forwardToDurableObject(({ params }) => env.DO_BRIDGE.get(env.DO_BRIDGE.idFromString(params.id))))\n*   .route(\"/api/*\",        serveApi)         // local final-runtime (a serveWorker { fetch })\n*   .otherwise(restOfApp);                    // anything unmatched → an existing app\n* export default { fetch: (request: Request) => router.fetch(request) };\n* ```\n*/\n/** Permissive CORS, matching the rest of the action HTTP surface. */\nconst DEFAULT_ROUTER_CORS = {\n\t\"Access-Control-Allow-Origin\": \"*\",\n\t\"Access-Control-Allow-Methods\": \"GET, POST, OPTIONS\",\n\t\"Access-Control-Allow-Headers\": \"Content-Type\",\n\t\"Access-Control-Max-Age\": \"86400\"\n};\n/**\n* Match a path against a compiled pattern. Supports `:param` (captures one segment) and a `*` segment\n* (matches the remaining path, zero or more segments). Returns the captured params, or `null` on no match.\n*/\nfunction matchPath(segments, pathname) {\n\tconst pathSegments = pathname.split(\"/\").filter((segment) => segment.length > 0);\n\tconst params = {};\n\tfor (let i = 0; i < segments.length; i++) {\n\t\tconst patternSegment = segments[i];\n\t\tif (patternSegment === \"*\") return params;\n\t\tconst pathSegment = pathSegments[i];\n\t\tif (pathSegment == null) return null;\n\t\tif (patternSegment.startsWith(\":\")) params[patternSegment.slice(1)] = decodeURIComponent(pathSegment);\n\t\telse if (patternSegment !== pathSegment) return null;\n\t}\n\treturn pathSegments.length === segments.length ? params : null;\n}\nfunction dispatch(handler, request, route) {\n\treturn typeof handler === \"function\" ? handler(request, route) : handler.fetch(request, route);\n}\nvar ActionRouter = class {\n\toptions;\n\troutes = [];\n\tfallback;\n\tconstructor(options = {}) {\n\t\tthis.options = options;\n\t}\n\t/** Add a route. Patterns support `:param` and a trailing `*`. Matched in declaration order, first wins. */\n\troute(pattern, handler) {\n\t\tconst segments = pattern.split(\"/\").filter((segment) => segment.length > 0);\n\t\tthis.routes.push({\n\t\t\tsegments,\n\t\t\thandler\n\t\t});\n\t\treturn this;\n\t}\n\t/** The handler for any request no route matched (default: a `404`). */\n\totherwise(handler) {\n\t\tthis.fallback = handler;\n\t\treturn this;\n\t}\n\tasync fetch(request) {\n\t\tconst url = new URL(request.url);\n\t\tfor (const route of this.routes) {\n\t\t\tconst params = matchPath(route.segments, url.pathname);\n\t\t\tif (params == null) continue;\n\t\t\tif (request.method === \"OPTIONS\" && this.options.cors !== false) return new Response(null, {\n\t\t\t\tstatus: 204,\n\t\t\t\theaders: this.options.cors ?? DEFAULT_ROUTER_CORS\n\t\t\t});\n\t\t\treturn dispatch(route.handler, request, {\n\t\t\t\turl,\n\t\t\t\tparams\n\t\t\t});\n\t\t}\n\t\tif (this.fallback != null) return dispatch(this.fallback, request, {\n\t\t\turl,\n\t\t\tparams: {}\n\t\t});\n\t\treturn new Response(\"Not found\", { status: 404 });\n\t}\n};\n/** Create an {@link ActionRouter} — the optional framework-free front-door multiplexer. */\nfunction actionRouter(options) {\n\treturn new ActionRouter(options);\n}\n//#endregion\n//#region src/action/ActionRuntime/Transport/Carrier/duplex/inMemory/inMemoryCarrier.ts\n/**\n* A loopback duplex carrier with no socket — two cross-wired in-process ends, the action\n* instantiation of wire's `inMemoryCarrier`. The connector end is an\n* {@link IDuplexCarrierSource} for `connectChannel`; the acceptor end plugs into an\n* `ChannelAcceptor`. Ideal for tests and for running two runtimes in one process, or proving a\n* non-WS carrier end to end.\n*/\nfunction inMemoryCarrier(options = {}) {\n\tconst result = inMemoryCarrier$1(options);\n\treturn {\n\t\t...result,\n\t\tcarrier: {\n\t\t\t...result.carrier,\n\t\t\tavailable: options.available,\n\t\t\tlabel: options.label\n\t\t}\n\t};\n}\n//#endregion\n//#region src/action/ActionRuntime/Transport/Carrier/duplex/rtc/rtcCarrier.ts\n/**\n* A WebRTC {@link IDuplexCarrierSource} over an already-negotiated `RTCDataChannel` (signaling is\n* the app's concern) — the action instantiation of wire's `rtcCarrier`. Pass\n* it as a `carrier` to `connectChannel` so two browsers/apps linked peer-to-peer run the identical\n* secure session as a WebSocket.\n*/\nfunction rtcCarrier(dataChannel, options = {}) {\n\tif (options.getCacheKey != null && options.getTransportCacheKey != null) throw err_nice_action.fromId(\"conflicting_connect_options\", { detail: \"rtcCarrier: pass only `getCacheKey`; `getTransportCacheKey` is deprecated\" });\n\tconst getCacheKey = options.getCacheKey ?? options.getTransportCacheKey;\n\tconst getRouteInfo = options.getRouteInfo;\n\treturn {\n\t\t...rtcCarrier$1(dataChannel, {\n\t\t\tsecure: options.secure,\n\t\t\tgetCacheKey: getCacheKey == null ? void 0 : (params) => getCacheKey(params.dialContext),\n\t\t\tgetRouteInfo: getRouteInfo == null ? void 0 : (params) => getRouteInfo(params.dialContext)\n\t\t}),\n\t\tavailable: options.available,\n\t\tlabel: options.label\n\t};\n}\n//#endregion\n//#region src/action/ActionRuntime/Transport/Carrier/duplex/ws/err_nice_transport_ws.ts\nlet EErrId_NiceTransport_WebSocket = /* @__PURE__ */ function(EErrId_NiceTransport_WebSocket) {\n\tEErrId_NiceTransport_WebSocket[\"ws_disconnected\"] = \"ws_disconnected\";\n\tEErrId_NiceTransport_WebSocket[\"ws_create_failed\"] = \"ws_create_failed\";\n\tEErrId_NiceTransport_WebSocket[\"ws_error\"] = \"ws_error\";\n\treturn EErrId_NiceTransport_WebSocket;\n}({});\nconst err_nice_transport_ws = err_nice_transport.createChildDomain({\n\tdomain: \"err_nice_transport_ws\",\n\tschema: {\n\t\t[\"ws_disconnected\"]: err({ message: () => `WebSocket transport disconnected.` }),\n\t\t[\"ws_create_failed\"]: err({ message: ({ originalError }) => `Failed to create WebSocket transport.${originalError ? ` Original error: ${originalError.message}` : \"\"}` }),\n\t\t[\"ws_error\"]: err({ message: ({ originalError }) => `WebSocket transport error.${originalError ? ` Original error: ${originalError.message}` : \"\"}` })\n\t}\n});\n//#endregion\n//#region src/action/ActionRuntime/Transport/Carrier/duplex/ws/wsCarrier.ts\n/**\n* A WebSocket {@link IDuplexCarrierSource}: the action instantiation of wire's `wsCarrier`\n* — the dial context is the per-action routing params,\n* so `createRequest` still derives the socket URL per action exactly as before. Pass it as a\n* `carrier` to `connectChannel`.\n*\n* `createRequest` may return `null` for \"no valid endpoint right now\" —\n* the keep-alive redial then PARKS instead of dialing garbage, so a dynamic-endpoint teardown\n* (`_activeMatchId = undefined`) needs no careful ordering against `releaseLink()`.\n*/\nfunction wsCarrier(request, options = {}) {\n\tif (options.getCacheKey != null && options.getTransportCacheKey != null) throw err_nice_action.fromId(\"conflicting_connect_options\", { detail: \"wsCarrier: pass only `getCacheKey`; `getTransportCacheKey` is deprecated\" });\n\tconst getCacheKey = options.getCacheKey ?? options.getTransportCacheKey;\n\tconst getRouteInfo = options.getRouteInfo;\n\treturn {\n\t\t...wsCarrier$1(typeof request === \"string\" ? request : (params) => request(params.dialContext), {\n\t\t\tsecure: options.secure,\n\t\t\tgetCacheKey: getCacheKey == null ? void 0 : (params) => getCacheKey(params.dialContext),\n\t\t\tgetRouteInfo: getRouteInfo == null ? void 0 : (params) => getRouteInfo(params.dialContext),\n\t\t\tcreateWebSocket: options.createWebSocket\n\t\t}),\n\t\tavailable: options.available,\n\t\tlabel: options.label\n\t};\n}\n//#endregion\n//#region src/action/ActionRuntime/Transport/Carrier/exchange/http/httpCarrier.ts\n/**\n* An HTTP {@link IExchangeCarrierSource} — the action instantiation of wire's `httpCarrier`: each\n* `exchange` POSTs one frame body to the action endpoint and resolves with the\n* response body as the single correlated reply. Pass it as a `carrier` to `connectChannel` — a\n* secure HTTP transport then runs the *same* secure session as a duplex carrier.\n*/\nfunction httpCarrier(request, options = {}) {\n\tif (options.getCacheKey != null && options.getTransportCacheKey != null) throw err_nice_action.fromId(\"conflicting_connect_options\", { detail: \"httpCarrier: pass only `getCacheKey`; `getTransportCacheKey` is deprecated\" });\n\tconst getCacheKey = options.getCacheKey ?? options.getTransportCacheKey;\n\tconst getRouteInfo = options.getRouteInfo;\n\treturn {\n\t\t...httpCarrier$1(typeof request === \"string\" ? request : (params) => request(params.dialContext), {\n\t\t\tsecure: options.secure,\n\t\t\tgetCacheKey: getCacheKey == null ? void 0 : (params) => getCacheKey(params.dialContext),\n\t\t\tgetRouteInfo: getRouteInfo == null ? void 0 : (params) => getRouteInfo(params.dialContext),\n\t\t\tfetch: options.fetch\n\t\t}),\n\t\tavailable: options.available,\n\t\tlabel: options.label\n\t};\n}\n//#endregion\n//#region src/action/ActionRuntime/Transport/SecureSession/exchangeProtocol.ts\nfunction encodeExchange(envelope) {\n\treturn JSON.stringify(envelope);\n}\nfunction decodeExchangeRequest(raw) {\n\treturn parse(raw);\n}\nfunction decodeExchangeReply(raw) {\n\treturn parse(raw);\n}\nfunction parse(raw) {\n\ttry {\n\t\treturn JSON.parse(raw);\n\t} catch {\n\t\treturn;\n\t}\n}\n//#endregion\nexport { ActionCore, ActionDomain, ActionLocalHandler, ActionRootDomain, ActionRuntime, ActionSchema, EActionPayloadType, EActionProgressType, EActionResponseMode, EErrId_NiceAction, EErrId_NiceTransport, EErrId_NiceTransport_WebSocket, EReliabilityTier, ERunningActionFinishedType, ERunningActionState, ERunningActionUpdateType, ESecurityLevel, EWireConnectFailureKind, ExchangeAcceptor, RunningAction, RuntimeCoordinate, acceptChannel, acceptChannelConnections, actionRouter, actionSchema, buildChannelSubsetResolver, classifyConnectFailure, combineChannels, connectChannel, connectChannels, createActionRootDomain, createDefaultServeLogger, createInMemoryChannelPair, createInMemoryTofuVerifyKeyResolver, createLocalHandler, createStorageTofuVerifyKeyResolver, decodeActionFrame, decodeExchangeReply, decodeExchangeRequest, defineChannel, encodeExchange, err_nice_action, err_nice_external_client, err_nice_transport, err_nice_transport_ws, forwardTo, httpAcceptorCarrier, httpCarrier, inMemoryCarrier, isActionPayload_Any_JsonObject, isActionPayload_Request_JsonObject, isActionPayload_Result_JsonObject, isExchangeAcceptorCarrier, rtcCarrier, rtcDataChannelByteChannel, runtimeLinkId, serveChannel, serveChannels, serveHost, wsAcceptorCarrier, wsCarrier };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;AAGA,SAAS,qBAAqB,OAAO;CACpC,IAAI,aAAa;CACjB,KAAK,MAAM,WAAW,OAAO,IAAI,OAAO,YAAY,UAC/C;MAAA,QAAQ,OAAO,MAAM,IAAI,OAAO,QAAQ,QAAQ,UAAU,cAAc,IAAI,OAAO,QAAQ,GAAG,EAAE;OAC/F,IAAI,OAAO,QAAQ,QAAQ,UAAU,cAAc,WAAW,OAAO,QAAQ,GAAG,EAAE;OAClF,cAAc,IAAI,OAAO,QAAQ,GAAG;CAAA,OACnC,cAAc,IAAI,OAAO,OAAO;CACvC,OAAO,WAAW,MAAM,CAAC;AAC1B;AACA,MAAM,oCAAoC,kBAAkB;CAC3D,IAAI,UAAU;CACd,IAAI,aAAa;CACjB,KAAK,MAAM,SAAS,cAAc,QAAQ;EACzC;EACA,IAAI,MAAM,QAAQ,QAAQ,MAAM,KAAK,WAAW,GAAG,WAAW,WAAW,WAAW,IAAI,MAAM,QAAQ;OACjG,WAAW,WAAW,WAAW,KAAK,qBAAqB,MAAM,IAAI,EAAE,KAAK,MAAM,QAAQ;CAChG;CACA,OAAO;AACR;AAOuB,SAAS,kBAAkB;CACjD,QAAQ;CACR,uBAAuB,YAAY;CACnC,QAAQ,GAAG,oBAAoB,IAAI,EAAE,UAAU,EAAE,aAAa,iCAAiC,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE;AAC/G,CAAC;;;ACtBD,IAAI,aAAa,MAAM;CACtB;CACA;CACA;CACA;CACA;CACA;CACA,YAAY,MAAM,SAAS,IAAI;EAC9B,KAAK,OAAO;EACZ,KAAK,UAAU;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