@nice-code/action 0.24.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +54 -6
  2. package/build/{AcceptorHandler-11-QMdx2.d.mts → AcceptorHandler-BizUtq4u.d.mts} +118 -15
  3. package/build/{AcceptorHandler-CxD0c1BE.d.cts → AcceptorHandler-CxPfZtIl.d.cts} +118 -15
  4. package/build/{ActionDevtoolsCore-37JP4bOG.d.cts → ActionDevtoolsCore-D9KBBI2V.d.cts} +2 -2
  5. package/build/{ActionDevtoolsCore-Cgq-go1R.d.mts → ActionDevtoolsCore-xZjAtB4H.d.mts} +2 -2
  6. package/build/advanced/index.cjs +1 -1
  7. package/build/advanced/index.d.cts +1 -96
  8. package/build/advanced/index.d.mts +1 -96
  9. package/build/advanced/index.mjs +1 -1
  10. package/build/{createHibernatableWsServerAdapter-C07RfUTH.mjs → createHibernatableWsServerAdapter-BkjESd01.mjs} +11 -9
  11. package/build/createHibernatableWsServerAdapter-BkjESd01.mjs.map +1 -0
  12. package/build/{createHibernatableWsServerAdapter-BNi4k9j3.cjs → createHibernatableWsServerAdapter-FSDWrxoF.cjs} +11 -9
  13. package/build/createHibernatableWsServerAdapter-FSDWrxoF.cjs.map +1 -0
  14. package/build/devtools/browser/index.d.cts +1 -1
  15. package/build/devtools/browser/index.d.mts +1 -1
  16. package/build/devtools/server/index.d.cts +1 -1
  17. package/build/devtools/server/index.d.mts +1 -1
  18. package/build/{httpAcceptorCarrier-C3S_bDkL.cjs → httpAcceptorCarrier-BQYaXI9j.cjs} +2 -2
  19. package/build/{httpAcceptorCarrier-C3S_bDkL.cjs.map → httpAcceptorCarrier-BQYaXI9j.cjs.map} +1 -1
  20. package/build/{httpAcceptorCarrier-DPBEuewS.mjs → httpAcceptorCarrier-DWqsCz3h.mjs} +2 -2
  21. package/build/{httpAcceptorCarrier-DPBEuewS.mjs.map → httpAcceptorCarrier-DWqsCz3h.mjs.map} +1 -1
  22. package/build/index.cjs +6 -2
  23. package/build/index.d.cts +2 -2
  24. package/build/index.d.mts +2 -2
  25. package/build/index.mjs +3 -3
  26. package/build/platform/cloudflare/index.cjs +45 -1
  27. package/build/platform/cloudflare/index.cjs.map +1 -1
  28. package/build/platform/cloudflare/index.d.cts +40 -2
  29. package/build/platform/cloudflare/index.d.mts +40 -2
  30. package/build/platform/cloudflare/index.mjs +45 -2
  31. package/build/platform/cloudflare/index.mjs.map +1 -1
  32. package/build/react-query/index.d.cts +1 -1
  33. package/build/react-query/index.d.mts +1 -1
  34. package/package.json +4 -4
  35. package/build/createHibernatableWsServerAdapter-BNi4k9j3.cjs.map +0 -1
  36. package/build/createHibernatableWsServerAdapter-C07RfUTH.mjs.map +0 -1
package/README.md CHANGED
@@ -234,9 +234,17 @@ const server = serveChannel(runtime, appChannel, {
234
234
  - **`handlers`** — the acceptor handlers it built, one per duplex carrier (reach for these for per-handler
235
235
  `broadcast`).
236
236
 
237
- Key options: `clientEnv` (required), `storage` (required only when a carrier is secure — the default),
238
- `carriers`, `handlers`, `channelCases` (connection-aware cases — see below), plus `securityLevel` /
239
- `link` / `verifyKeyResolver` / `defaultTimeout`.
237
+ Key options: `clientEnv` (optional — see below), `storage` (required only when a carrier is secure — the
238
+ default), `carriers`, `handlers`, `channelCases` (connection-aware cases — see below), plus
239
+ `securityLevel` / `link` / `verifyKeyResolver` / `defaultTimeout`.
240
+
241
+ > **One server, several client envs (multi-role).** `clientEnv` is **optional**. A result or push to a
242
+ > *connected* client always routes back over the carrier it actually connected on (the acceptor knows each
243
+ > client's exact coordinate from its handshake), so a single `serveChannel` accepts clients of *different*
244
+ > envs — e.g. a `wallet` role and a `partner` role on one bridge — over one acceptor. Omit `clientEnv`
245
+ > entirely for a multi-role server; only set it if you want a scoring fallback for returning to a client
246
+ > that is *no longer connected* (the offline case). This replaces the old workaround of standing up a
247
+ > second `serveChannel` per role.
240
248
 
241
249
  > On Cloudflare, [`@nice-code/action/platform/cloudflare`](#cloudflare-durable-objects) collapses the
242
250
  > Durable Object carrier + storage + lifecycle boilerplate into a single `serveDurableObject` call.
@@ -453,7 +461,7 @@ export class MyDurableObject extends DurableObject {
453
461
  }
454
462
  ```
455
463
 
456
- `serveDurableObject(ctx, channel, options)` takes the same `serveChannel` surface (`clientEnv`,
464
+ `serveDurableObject(ctx, channel, options)` takes the same `serveChannel` surface (`clientEnv` — optional,
457
465
  `handlers`, `channelCases`, `connectionState`, …) plus the host knobs:
458
466
 
459
467
  - **`runtime`** — this DO's runtime.
@@ -466,6 +474,45 @@ For finer control the lower-level pieces are still exported: `cloudflareDurableO
466
474
  builds just the `{ carriers, storage, onServed }` host adapter (hand it to `serveHost`), and
467
475
  `durableObjectWsCarrier` / `durableObjectStorage` build the individual carrier / storage adapter.
468
476
 
477
+ ### Fanning HTTP out to a per-id Durable Object — `forwardExchangeToDurableObject`
478
+
479
+ When each DO instance is one *thing* (a bridge, a room, a game) and the Worker has to pick the right one
480
+ per request, route by the **URL** — a secure exchange body is opaque to the Worker (handshake / encrypted
481
+ frames), so it can't choose by inspecting the body. `forwardExchangeToDurableObject` picks the stub, hands
482
+ the request to its `fetch` (where `serveDurableObject` serves the exchange), and answers the CORS
483
+ `OPTIONS` preflight *at the edge* so a per-id DO is never woken (or billed) just to reply to a preflight:
484
+
485
+ ```ts
486
+ import { forwardExchangeToDurableObject } from "@nice-code/action/platform/cloudflare";
487
+
488
+ export default {
489
+ fetch(request: Request, env: Env) {
490
+ return forwardExchangeToDurableObject(request, (req, url) => {
491
+ const bridgeId = url.pathname.split("/")[2]; // e.g. /bridge/:id/action
492
+ return env.BRIDGE.get(env.BRIDGE.idFromName(bridgeId));
493
+ });
494
+ },
495
+ };
496
+ ```
497
+
498
+ Inside the DO, serve the exchange (and the WS upgrade) exactly as above — make the HTTP fallback secure so
499
+ the whole path is handshake-protected:
500
+
501
+ ```ts
502
+ this._server = serveDurableObject(this.ctx, bridgeChannel, { runtime, httpFallback: "secure" });
503
+ // fetch(request) => this._server.fetch(request)
504
+ ```
505
+
506
+ The matching connector points its `httpCarrier` at `/bridge/:id/action`. `pickStub` may be async (e.g. to
507
+ resolve an id first) and receives the parsed `URL` alongside the request.
508
+
509
+ > Need to handle the exchange yourself instead of handing the endpoint to `serveChannel`? The secure
510
+ > exchange acceptor and its plain `{k:"act",w}` envelope codec are exported from the **main** entry:
511
+ > `ExchangeAcceptor` (drive the handshake + token sessions + decrypt over your own `fetch`), and
512
+ > `encodeExchange` / `decodeExchangeRequest` / `decodeExchangeReply` (read/write the plain envelope when
513
+ > you must inspect or rewrite the wire before running it). Secure bodies are only decodable through an
514
+ > `ExchangeAcceptor` session — route-before-decode by URL, as above.
515
+
469
516
  ### Per-connection state + broadcast (stateful DOs)
470
517
 
471
518
  A presence/room DO that tracks who's on each socket and fans messages out adds two knobs —
@@ -696,9 +743,10 @@ routing that isn't a single channel.
696
743
  `connectChannel`'s `transports` (the `secure` flag picks the policy) and in `serveChannel`'s `carriers`;
697
744
  the transport wrapping happens internally, so there's no separate transport-builder to call.
698
745
 
699
- - **`acceptChannel(runtime, channel, { clientEnv, storage, send, ... })`** — build the secure
746
+ - **`acceptChannel(runtime, channel, { storage, send, clientEnv?, ... })`** — build the secure
700
747
  `AcceptorHandler` for a channel by hand (the accept-in counterpart to a single transport), when you're
701
- not using `serveChannel`. Pair it with **`acceptChannelConnections(handler, channel, cases)`** to
748
+ not using `serveChannel`. `clientEnv` is optional here too (one acceptor serves several client envs — a
749
+ live connection always wins the return path). Pair it with **`acceptChannelConnections(handler, channel, cases)`** to
702
750
  register connection-aware execution — each case receives the request *and* the originating connection:
703
751
 
704
752
  ```ts
@@ -820,9 +820,10 @@ interface ISecureAcceptorHandlerOptions<TConn> {
820
820
  channel: IActionChannel;
821
821
  /**
822
822
  * Coordinate of the *connecting clients* (typically env-only, e.g. `RuntimeCoordinate.env("web_app")`),
823
- * used to route results/pushes back over this handler.
823
+ * used as the offline-return scoring fallback (a live connection always wins regardless). Optional —
824
+ * omit it for a multi-role server accepting several client envs over one acceptor.
824
825
  */
825
- clientEnv: RuntimeCoordinate;
826
+ clientEnv?: RuntimeCoordinate;
826
827
  /** This server's runtime — its coordinate is the server identity presented in the handshake. */
827
828
  runtime: ActionRuntime;
828
829
  /**
@@ -1832,9 +1833,12 @@ interface IConnectionContext<TConn, TApp = unknown> {
1832
1833
  interface IServeChannelOptions<TO_ACCEPTOR extends readonly ActionDomain<any>[], TConn, TApp = unknown> {
1833
1834
  /**
1834
1835
  * Coordinate of the *connecting clients* (typically env-only, e.g. `RuntimeCoordinate.env("web_app")`),
1835
- * used to score return-path dispatch back to the right connection.
1836
+ * used only as the offline-return scoring fallback — a result/push to a live client always routes over
1837
+ * the carrier it connected on regardless of this. Optional: omit it for a multi-role server that accepts
1838
+ * clients of several envs over one acceptor (it then scores 0 against every client, so the live
1839
+ * connection always decides).
1836
1840
  */
1837
- clientEnv: RuntimeCoordinate;
1841
+ clientEnv?: RuntimeCoordinate;
1838
1842
  /**
1839
1843
  * One backing store for the server's crypto identity *and* its trust-on-first-use verify-key pins
1840
1844
  * (their keys don't collide). It is built once and shared across every carrier, so the WebSocket and the
@@ -2265,6 +2269,101 @@ declare const err_nice_transport: import("@nice-code/error").NiceErrorDomain<{
2265
2269
  };
2266
2270
  }>;
2267
2271
  //#endregion
2272
+ //#region src/ActionRuntime/Transport/SecureSession/exchangeAcceptor.d.ts
2273
+ /** Acceptor secure config for the exchange (HTTP) endpoint — same identity an `AcceptorHandler` uses. */
2274
+ interface IExchangeAcceptorSecurity {
2275
+ /** This acceptor's crypto identity (verify + exchange key pairs, optionally persisted). */
2276
+ link: ClientCryptoKeyLink;
2277
+ /** This acceptor's coordinate — its identity to clients during the handshake. */
2278
+ localCoordinate: IRuntimeCoordinate;
2279
+ /** Wire dictionary version; the handshake rejects a client on a mismatch. */
2280
+ dictionaryVersion: string;
2281
+ /** Accepted level(s) — a single level is strict, an array is a negotiable allowed set. */
2282
+ securityLevel: ESecurityLevel | readonly ESecurityLevel[];
2283
+ /** Trust decision for a client's verify key (defaults to in-memory TOFU inside the handshake). */
2284
+ verifyKeyResolver?: IClientVerifyKeyResolver;
2285
+ }
2286
+ interface IExchangeAcceptorConfig {
2287
+ security: IExchangeAcceptorSecurity;
2288
+ /** The runtime that executes an inbound action wire and produces its result. */
2289
+ runtime: ActionRuntime;
2290
+ }
2291
+ /**
2292
+ * Acceptor (accept-in) side of the secure exchange protocol — the HTTP counterpart to
2293
+ * {@link AcceptorSecureSession}. Each POST body is one {@link decodeExchangeRequest} envelope; the
2294
+ * acceptor drives the server handshake over the two `hs` POSTs (correlated by `hsid`, since stateless
2295
+ * requests can't rely on channel ordering), mints a session **token** on accept, and on every later `act`
2296
+ * POST resolves the session by token, decrypts the body (at `encrypted`), routes it through the runtime,
2297
+ * and returns the (encrypted) result inline as the reply.
2298
+ *
2299
+ * Sessions and in-flight handshakes are held in memory — fine for a single-instance server. (Surviving a
2300
+ * Durable-Object eviction would persist each token's `keyMaterial` and re-derive the key on a miss, the
2301
+ * same primitive `AcceptorSecureSession.rehydrate` uses; left as a follow-up.)
2302
+ */
2303
+ declare class ExchangeAcceptor {
2304
+ private readonly _security;
2305
+ private readonly _runtime;
2306
+ private readonly _allowedLevels;
2307
+ private readonly _noneAllowed;
2308
+ private readonly _pendingHandshakes;
2309
+ private readonly _sessions;
2310
+ constructor(config: IExchangeAcceptorConfig);
2311
+ /** Process one POST body (an exchange envelope), returning the reply body to send back. */
2312
+ handlePost(body: string): Promise<string>;
2313
+ private _handleHandshake;
2314
+ private _handleAction;
2315
+ private _err;
2316
+ }
2317
+ //#endregion
2318
+ //#region src/ActionRuntime/Transport/SecureSession/exchangeProtocol.d.ts
2319
+ /**
2320
+ * The application-level envelope for secure action traffic over an {@link IExchangeCarrier} (HTTP). An
2321
+ * exchange carrier only moves one request frame → one reply frame with no unsolicited push, so the
2322
+ * handshake and the per-action token + crypto all ride in this envelope (a JSON string body) rather than
2323
+ * on a persistent channel. The three security levels share it:
2324
+ *
2325
+ * - `none` — no handshake, no token: an `act` envelope carries the plaintext wire both ways.
2326
+ * - `authenticated` — a one-time handshake yields a session `token`; each later `act` carries it +
2327
+ * the plaintext wire.
2328
+ * - `encrypted` — same, but the wire is AES-GCM ciphertext, base64 in the `c` field.
2329
+ *
2330
+ * The handshake runs as two `hs` exchanges (hello→welcome, prove→accept) correlated by a client-chosen
2331
+ * `hsid`, since stateless requests can't rely on channel ordering. The `accept` reply carries the token.
2332
+ */
2333
+ type TWireJson = TActionPayload_Any_JsonObject<any, any>;
2334
+ /** Connector → acceptor request envelope. */
2335
+ type TExchangeRequest = {
2336
+ k: "hs";
2337
+ hsid: string;
2338
+ m: string;
2339
+ } | {
2340
+ k: "act";
2341
+ t?: string;
2342
+ w: TWireJson;
2343
+ } | {
2344
+ k: "act";
2345
+ t?: string;
2346
+ c: string;
2347
+ };
2348
+ /** Acceptor → connector reply envelope. */
2349
+ type TExchangeReply = {
2350
+ k: "hs";
2351
+ m: string;
2352
+ t?: string;
2353
+ } | {
2354
+ k: "act";
2355
+ w: TWireJson;
2356
+ } | {
2357
+ k: "act";
2358
+ c: string;
2359
+ } | {
2360
+ k: "err";
2361
+ message: string;
2362
+ };
2363
+ declare function encodeExchange(envelope: TExchangeRequest | TExchangeReply): string;
2364
+ declare function decodeExchangeRequest(raw: string): TExchangeRequest | undefined;
2365
+ declare function decodeExchangeReply(raw: string): TExchangeReply | undefined;
2366
+ //#endregion
2268
2367
  //#region src/errors/err_nice_action.d.ts
2269
2368
  declare enum EErrId_NiceAction {
2270
2369
  not_implemented = "not_implemented",
@@ -2646,11 +2745,13 @@ declare class ActionRuntime {
2646
2745
  * Used to locate the return-path channel for dispatching results back to the action origin.
2647
2746
  * Returns `undefined` if no handler matches (score > 0 required, i.e. at least id must match).
2648
2747
  *
2649
- * A handler that currently holds the origin's *live* connection always wins over a mere coordinate
2650
- * matchso with several duplex acceptors (e.g. WS + WebRTC) a result/push routes back over the carrier
2651
- * the client actually connected on, never a same-coordinate sibling that lacks the socket. Only when no
2652
- * handler owns a live connection do we fall back to the plain best-coordinate-score pick (the
2653
- * single-acceptor and connector-only cases, unchanged).
2748
+ * A handler that currently holds the origin's *live* connection always wins, regardless of its
2749
+ * coordinate score owning the live socket bound to the origin's exact coordinate (set from the
2750
+ * handshake) is a strictly more precise match than any env-level `peerClient` score. This lets one
2751
+ * server accept clients of *several* envs over a single acceptor (a multi-role Durable Object): the
2752
+ * result/push routes back over the carrier the client actually connected on even when the handler's
2753
+ * `clientEnv` is unset or names a different env. Only when no handler owns a live connection do we fall
2754
+ * back to the plain best-coordinate-score pick (the offline-return and connector-only cases).
2654
2755
  */
2655
2756
  getReturnHandlerForOrigin(originClient: RuntimeCoordinate): PeerLinkHandler | undefined;
2656
2757
  resetRuntime(): void;
@@ -2788,11 +2889,13 @@ interface IAcceptorSecurity {
2788
2889
  }
2789
2890
  interface IAcceptorHandlerBaseOptions<TConn> {
2790
2891
  /**
2791
- * Coordinate of the *connecting clients* (typically env-only, e.g. `RuntimeCoordinate.env("web_app")`).
2792
- * The runtime's return-path dispatch scores incoming actions' `originClient` against this to pick
2793
- * this handler for sending results/pushes back over the right channel.
2892
+ * Coordinate of the *connecting clients* (typically env-only, e.g. `RuntimeCoordinate.env("web_app")`),
2893
+ * scored against an action's `originClient` to pick this handler when *no* handler holds the client's
2894
+ * live connection (the offline-return fallback). A handler that currently owns the live socket always
2895
+ * wins regardless, so this is optional: omit it for a multi-role server that accepts several client envs
2896
+ * over one acceptor — it then defaults to `RuntimeCoordinate.unknown` (scores 0 against every client).
2794
2897
  */
2795
- clientEnv: RuntimeCoordinate;
2898
+ clientEnv?: RuntimeCoordinate;
2796
2899
  /** Write an encoded frame to a specific live connection (e.g. `(ws, frame) => ws.send(frame)`). */
2797
2900
  send: (connection: TConn, frame: string | Uint8Array | ArrayBuffer) => void;
2798
2901
  /**
@@ -2993,5 +3096,5 @@ declare class AcceptorHandler<TConn = unknown> extends PeerLinkHandler {
2993
3096
  }
2994
3097
  declare const createAcceptorHandler: <TConn = unknown>(options: IAcceptorHandlerOptions<TConn>) => AcceptorHandler<TConn>;
2995
3098
  //#endregion
2996
- export { rtcCarrier as $, MaybePromise as $n, IActionTransportInitialized as $t, TActionResultOutcome as A, TransportConnection as An, TInferOutputFromSchema as Ar, IConnectChannelOptions as At, IHttpCarrierOptions as B, IHandshakeEncryptionKeyMaterial as Bn, IActionWireFormat as Bt, IActionProgress_Custom as C, TSendActionDataMethod as Cn, IActionDomain as Cr, createHibernatableWsServerAdapter as Ct, TActionPayload_Any_Instance as D, TTransportStatusInfo as Dn, TActionDomainSchema as Dr, createConnectionStateStore as Dt, IActionRouteItemHandler as E, TTransportInitializationFinishedInfo as En, TActionDomainChildDef as Er, IConnectionStateStoreOptions as Et, decodeActionFrame as F, EHandshakeMessageType as Fn, TInferActionError as Fr, acceptChannelConnections as Ft, httpAcceptorCarrier as G, createInMemoryTofuVerifyKeyResolver as Gn, TCarrier as Gt, TCarrierFetch as H, IServerHandshakeConfig as Hn, IDuplexCarrierSource as Ht, EErrId_NiceAction as I, ESecurityLevel as In, actionSchema as Ir, connectChannel as It, IWsAcceptorCarrierOptions as J, decodeHandshakeMessage as Jn, createConnectorHandler as Jt, IWsCarrierOptions as K, createServerHandshake as Kn, TFrame$1 as Kt, err_nice_action as L, IClientHandshakeConfig as Ln, TActionSchemaOptions as Lr, defineChannel as Lt, isActionPayload_Request_JsonObject as M, Transport as Mn, TPossibleDomainIdList as Mr, TChannelAcceptorCases as Mt, isActionPayload_Any_JsonObject as N, ISecureAcceptorHandlerOptions as Nn, ActionSchema as Nr, TChannelPushHandlers as Nt, TActionPayload_Any_JsonObject as O, TTransportStatusInfo_GetTransport_Output as On, TDomainActionId as Or, IAcceptChannelOptions as Ot, IActionFrameDecoder as P, createSecureAcceptorHandler as Pn, EActionResponseMode as Pr, acceptChannel as Pt, IRtcCarrierOptions as Q, createLocalHandler as Qn, IActionTransportDef as Qt, EErrId_NiceTransport as R, IClientVerifyKeyResolveInput as Rn, TActionSerializationDefinition as Rr, IBinaryWireSessionOptions as Rt, IActionPayload_Result_JsonObject as S, TOnResolveIncomingResponseJson as Sn, IActionCore_JsonObject as Sr, IHibernatableWsServerAdapterOptions as St, IActionProgress_Percentage as T, TTransportCache as Tn, IActionRootDomain as Tr, IConnectionAttachment as Tt, httpCarrier as U, THandshakeMessage as Un, IExchangeCarrier as Ut, IHttpCarrierRequest as V, IHandshakeResult as Vn, IDuplexCarrier as Vt, IHttpAcceptorCarrierOptions as W, createClientHandshake as Wn, IExchangeCarrierSource as Wt, EErrId_NiceTransport_WebSocket as X, runtimeLinkId as Xn, ETransportShape as Xt, wsAcceptorCarrier as Y, encodeHandshakeMessage as Yn, PeerLinkHandler as Yt, err_nice_transport_ws as Z, ActionLocalHandler as Zn, ETransportStatus as Zt, IActionPayload_Data_Base as _, TOnResolveAnyIncomingActionData as _n, IRuntimeFullCoordinates as _r, IDuplexAcceptorCarrier as _t, TAcceptorConnectionCaseFn as a, ITransportDispatchAction as an, ERunningActionUpdateType as ar, IInMemoryServerEndpoint as at, IActionPayload_Request_JsonObject as b, TOnResolveIncomingRequestJson as bn, TRuntimeCoordinateStringId as br, isExchangeAcceptorCarrier as bt, createAcceptorHandler as c, ITransportRouteClientParams as cn, IRunningActionUpdate_Started as cr, IChannelHostAdapter as ct, ActionCore as d, ITransportStatusInfo_Failed as dn, TRunningActionUpdateFinished as dr, IChannelServer as dt, IActionTransportReady as en, createActionRootDomain as er, IRtcDataChannelLike as et, ActionPayload_Request as f, ITransportStatusInfo_Initializing as fn, TRunningActionUpdateListener as fr, IConnectionContext as ft, IActionPayload_Base_JsonObject as g, TGetTransportFn as gn, IRuntimeCoordinateSpecifics as gr, IAcceptorAttachmentStore as gt, IActionPayload_Base as h, IUpdateActionRunConfig_Output as hn, IRuntimeCoordinate as hr, serveChannel as ht, TAcceptorCaseFn as i, ISecureClientConfig as in, ERunningActionState as ir, IInMemoryChannelPair as it, isActionPayload_Result_JsonObject as j, ITransportConnectionContext as jn, TPossibleDomainId as jr, IConnectTransport as jt, TActionProgress as k, TUpdateActionRunConfig as kn, TInferInputFromSchema as kr, IActionChannel as kt, ActionDomain as l, ITransportRouteInfo as ln, IRunningActionUpdate_Success as lr, TServeHostOptions as lt, EActionProgressType as m, ITransportStatusInfo_Unsupported as mn, ActionPayload_Progress as mr, IServeConnectionStateOptions as mt, IAcceptorConnectionBinding as n, IActionTransportReadyData_Methods as nn, RunningAction as nr, IInMemoryCarrier as nt, TActionChannelFormatMessage as o, ITransportMethod_SendActionData_Input as on, IRunningActionUpdate_Abort as or, createInMemoryChannelPair as ot, EActionPayloadType as p, ITransportStatusInfo_Ready as pn, ActionPayload_Result as pr, IServeChannelOptions as pt, wsCarrier as q, createStorageTofuVerifyKeyResolver as qn, ConnectorHandler as qt, IAcceptorHandlerOptions as r, IActionTransportResolvers as rn, ERunningActionFinishedType as rr, inMemoryCarrier as rt, TActionConnectionEncoding as s, ITransportRouteActionParams as sn, IRunningActionUpdate_Progress as sr, err_nice_external_client as st, AcceptorHandler as t, IActionTransportReadyData_Base as tn, ActionRootDomain as tr, rtcDataChannelByteChannel as tt, ActionRuntime as u, ITransportStatusInfo_Base as un, TRunningActionUpdate as ur, serveHost as ut, IActionPayload_Progress as v, TOnResolveAnyIncomingActionData_Json as vn, RuntimeCoordinate as vr, IExchangeAcceptorCarrier as vt, IActionProgress_None as w, TSendReturnDataMethod as wn, IActionDomainChildOptions as wr, ConnectionStateStore as wt, IActionPayload_Result as x, TOnResolveIncomingResponse as xn, IActionCore as xr, IDuplexConnectionRouter as xt, IActionPayload_Progress_JsonObject as y, TOnResolveIncomingRequest as yn, TRuntimeCoordinateEnvId as yr, TAcceptorCarrier as yt, err_nice_transport as z, IClientVerifyKeyResolver as zn, TTransportedValue as zr, createBinaryWireSessionFactory as zt };
2997
- //# sourceMappingURL=AcceptorHandler-11-QMdx2.d.mts.map
3099
+ export { httpAcceptorCarrier as $, createInMemoryTofuVerifyKeyResolver as $n, TCarrier as $t, TActionResultOutcome as A, TOnResolveIncomingResponseJson as An, IActionCore_JsonObject as Ar, IHibernatableWsServerAdapterOptions as At, decodeExchangeReply as B, Transport as Bn, TPossibleDomainIdList as Br, TChannelAcceptorCases as Bt, IActionProgress_Custom as C, IUpdateActionRunConfig_Output as Cn, IRuntimeCoordinate as Cr, serveChannel as Ct, TActionPayload_Any_Instance as D, TOnResolveIncomingRequest as Dn, TRuntimeCoordinateEnvId as Dr, TAcceptorCarrier as Dt, IActionRouteItemHandler as E, TOnResolveAnyIncomingActionData_Json as En, RuntimeCoordinate as Er, IExchangeAcceptorCarrier as Et, decodeActionFrame as F, TTransportStatusInfo as Fn, TActionDomainSchema as Fr, createConnectionStateStore as Ft, IExchangeAcceptorSecurity as G, IClientHandshakeConfig as Gn, TActionSchemaOptions as Gr, defineChannel as Gt, encodeExchange as H, createSecureAcceptorHandler as Hn, EActionResponseMode as Hr, acceptChannel as Ht, EErrId_NiceAction as I, TTransportStatusInfo_GetTransport_Output as In, TDomainActionId as Ir, IAcceptChannelOptions as It, IHttpCarrierOptions as J, IHandshakeEncryptionKeyMaterial as Jn, IActionWireFormat as Jt, EErrId_NiceTransport as K, IClientVerifyKeyResolveInput as Kn, TActionSerializationDefinition as Kr, IBinaryWireSessionOptions as Kt, err_nice_action as L, TUpdateActionRunConfig as Ln, TInferInputFromSchema as Lr, IActionChannel as Lt, isActionPayload_Request_JsonObject as M, TSendReturnDataMethod as Mn, IActionDomainChildOptions as Mr, ConnectionStateStore as Mt, isActionPayload_Any_JsonObject as N, TTransportCache as Nn, IActionRootDomain as Nr, IConnectionAttachment as Nt, TActionPayload_Any_JsonObject as O, TOnResolveIncomingRequestJson as On, TRuntimeCoordinateStringId as Or, isExchangeAcceptorCarrier as Ot, IActionFrameDecoder as P, TTransportInitializationFinishedInfo as Pn, TActionDomainChildDef as Pr, IConnectionStateStoreOptions as Pt, IHttpAcceptorCarrierOptions as Q, createClientHandshake as Qn, IExchangeCarrierSource as Qt, TExchangeReply as R, TransportConnection as Rn, TInferOutputFromSchema as Rr, IConnectChannelOptions as Rt, IActionPayload_Result_JsonObject as S, ITransportStatusInfo_Unsupported as Sn, ActionPayload_Progress as Sr, IServeConnectionStateOptions as St, IActionProgress_Percentage as T, TOnResolveAnyIncomingActionData as Tn, IRuntimeFullCoordinates as Tr, IDuplexAcceptorCarrier as Tt, ExchangeAcceptor as U, EHandshakeMessageType as Un, TInferActionError as Ur, acceptChannelConnections as Ut, decodeExchangeRequest as V, ISecureAcceptorHandlerOptions as Vn, ActionSchema as Vr, TChannelPushHandlers as Vt, IExchangeAcceptorConfig as W, ESecurityLevel as Wn, actionSchema as Wr, connectChannel as Wt, TCarrierFetch as X, IServerHandshakeConfig as Xn, IDuplexCarrierSource as Xt, IHttpCarrierRequest as Y, IHandshakeResult as Yn, IDuplexCarrier as Yt, httpCarrier as Z, THandshakeMessage as Zn, IExchangeCarrier as Zt, IActionPayload_Data_Base as _, ITransportRouteInfo as _n, IRunningActionUpdate_Success as _r, TServeHostOptions as _t, TAcceptorConnectionCaseFn as a, ETransportStatus as an, ActionLocalHandler as ar, err_nice_transport_ws as at, IActionPayload_Request_JsonObject as b, ITransportStatusInfo_Initializing as bn, TRunningActionUpdateListener as br, IConnectionContext as bt, createAcceptorHandler as c, IActionTransportReady as cn, createActionRootDomain as cr, IRtcDataChannelLike as ct, ActionCore as d, IActionTransportResolvers as dn, ERunningActionFinishedType as dr, inMemoryCarrier as dt, TFrame$1 as en, createServerHandshake as er, IWsCarrierOptions as et, ActionPayload_Request as f, ISecureClientConfig as fn, ERunningActionState as fr, IInMemoryChannelPair as ft, IActionPayload_Base_JsonObject as g, ITransportRouteClientParams as gn, IRunningActionUpdate_Started as gr, IChannelHostAdapter as gt, IActionPayload_Base as h, ITransportRouteActionParams as hn, IRunningActionUpdate_Progress as hr, err_nice_external_client as ht, TAcceptorCaseFn as i, ETransportShape as in, runtimeLinkId as ir, EErrId_NiceTransport_WebSocket as it, isActionPayload_Result_JsonObject as j, TSendActionDataMethod as jn, IActionDomain as jr, createHibernatableWsServerAdapter as jt, TActionProgress as k, TOnResolveIncomingResponse as kn, IActionCore as kr, IDuplexConnectionRouter as kt, ActionDomain as l, IActionTransportReadyData_Base as ln, ActionRootDomain as lr, rtcDataChannelByteChannel as lt, EActionProgressType as m, ITransportMethod_SendActionData_Input as mn, IRunningActionUpdate_Abort as mr, createInMemoryChannelPair as mt, IAcceptorConnectionBinding as n, createConnectorHandler as nn, decodeHandshakeMessage as nr, IWsAcceptorCarrierOptions as nt, TActionChannelFormatMessage as o, IActionTransportDef as on, createLocalHandler as or, IRtcCarrierOptions as ot, EActionPayloadType as p, ITransportDispatchAction as pn, ERunningActionUpdateType as pr, IInMemoryServerEndpoint as pt, err_nice_transport as q, IClientVerifyKeyResolver as qn, TTransportedValue as qr, createBinaryWireSessionFactory as qt, IAcceptorHandlerOptions as r, PeerLinkHandler as rn, encodeHandshakeMessage as rr, wsAcceptorCarrier as rt, TActionConnectionEncoding as s, IActionTransportInitialized as sn, MaybePromise as sr, rtcCarrier as st, AcceptorHandler as t, ConnectorHandler as tn, createStorageTofuVerifyKeyResolver as tr, wsCarrier as tt, ActionRuntime as u, IActionTransportReadyData_Methods as un, RunningAction as ur, IInMemoryCarrier as ut, IActionPayload_Progress as v, ITransportStatusInfo_Base as vn, TRunningActionUpdate as vr, serveHost as vt, IActionProgress_None as w, TGetTransportFn as wn, IRuntimeCoordinateSpecifics as wr, IAcceptorAttachmentStore as wt, IActionPayload_Result as x, ITransportStatusInfo_Ready as xn, ActionPayload_Result as xr, IServeChannelOptions as xt, IActionPayload_Progress_JsonObject as y, ITransportStatusInfo_Failed as yn, TRunningActionUpdateFinished as yr, IChannelServer as yt, TExchangeRequest as z, ITransportConnectionContext as zn, TPossibleDomainId as zr, IConnectTransport as zt };
3100
+ //# sourceMappingURL=AcceptorHandler-BizUtq4u.d.mts.map
@@ -820,9 +820,10 @@ interface ISecureAcceptorHandlerOptions<TConn> {
820
820
  channel: IActionChannel;
821
821
  /**
822
822
  * Coordinate of the *connecting clients* (typically env-only, e.g. `RuntimeCoordinate.env("web_app")`),
823
- * used to route results/pushes back over this handler.
823
+ * used as the offline-return scoring fallback (a live connection always wins regardless). Optional —
824
+ * omit it for a multi-role server accepting several client envs over one acceptor.
824
825
  */
825
- clientEnv: RuntimeCoordinate;
826
+ clientEnv?: RuntimeCoordinate;
826
827
  /** This server's runtime — its coordinate is the server identity presented in the handshake. */
827
828
  runtime: ActionRuntime;
828
829
  /**
@@ -1832,9 +1833,12 @@ interface IConnectionContext<TConn, TApp = unknown> {
1832
1833
  interface IServeChannelOptions<TO_ACCEPTOR extends readonly ActionDomain<any>[], TConn, TApp = unknown> {
1833
1834
  /**
1834
1835
  * Coordinate of the *connecting clients* (typically env-only, e.g. `RuntimeCoordinate.env("web_app")`),
1835
- * used to score return-path dispatch back to the right connection.
1836
+ * used only as the offline-return scoring fallback — a result/push to a live client always routes over
1837
+ * the carrier it connected on regardless of this. Optional: omit it for a multi-role server that accepts
1838
+ * clients of several envs over one acceptor (it then scores 0 against every client, so the live
1839
+ * connection always decides).
1836
1840
  */
1837
- clientEnv: RuntimeCoordinate;
1841
+ clientEnv?: RuntimeCoordinate;
1838
1842
  /**
1839
1843
  * One backing store for the server's crypto identity *and* its trust-on-first-use verify-key pins
1840
1844
  * (their keys don't collide). It is built once and shared across every carrier, so the WebSocket and the
@@ -2265,6 +2269,101 @@ declare const err_nice_transport: import("@nice-code/error").NiceErrorDomain<{
2265
2269
  };
2266
2270
  }>;
2267
2271
  //#endregion
2272
+ //#region src/ActionRuntime/Transport/SecureSession/exchangeAcceptor.d.ts
2273
+ /** Acceptor secure config for the exchange (HTTP) endpoint — same identity an `AcceptorHandler` uses. */
2274
+ interface IExchangeAcceptorSecurity {
2275
+ /** This acceptor's crypto identity (verify + exchange key pairs, optionally persisted). */
2276
+ link: ClientCryptoKeyLink;
2277
+ /** This acceptor's coordinate — its identity to clients during the handshake. */
2278
+ localCoordinate: IRuntimeCoordinate;
2279
+ /** Wire dictionary version; the handshake rejects a client on a mismatch. */
2280
+ dictionaryVersion: string;
2281
+ /** Accepted level(s) — a single level is strict, an array is a negotiable allowed set. */
2282
+ securityLevel: ESecurityLevel | readonly ESecurityLevel[];
2283
+ /** Trust decision for a client's verify key (defaults to in-memory TOFU inside the handshake). */
2284
+ verifyKeyResolver?: IClientVerifyKeyResolver;
2285
+ }
2286
+ interface IExchangeAcceptorConfig {
2287
+ security: IExchangeAcceptorSecurity;
2288
+ /** The runtime that executes an inbound action wire and produces its result. */
2289
+ runtime: ActionRuntime;
2290
+ }
2291
+ /**
2292
+ * Acceptor (accept-in) side of the secure exchange protocol — the HTTP counterpart to
2293
+ * {@link AcceptorSecureSession}. Each POST body is one {@link decodeExchangeRequest} envelope; the
2294
+ * acceptor drives the server handshake over the two `hs` POSTs (correlated by `hsid`, since stateless
2295
+ * requests can't rely on channel ordering), mints a session **token** on accept, and on every later `act`
2296
+ * POST resolves the session by token, decrypts the body (at `encrypted`), routes it through the runtime,
2297
+ * and returns the (encrypted) result inline as the reply.
2298
+ *
2299
+ * Sessions and in-flight handshakes are held in memory — fine for a single-instance server. (Surviving a
2300
+ * Durable-Object eviction would persist each token's `keyMaterial` and re-derive the key on a miss, the
2301
+ * same primitive `AcceptorSecureSession.rehydrate` uses; left as a follow-up.)
2302
+ */
2303
+ declare class ExchangeAcceptor {
2304
+ private readonly _security;
2305
+ private readonly _runtime;
2306
+ private readonly _allowedLevels;
2307
+ private readonly _noneAllowed;
2308
+ private readonly _pendingHandshakes;
2309
+ private readonly _sessions;
2310
+ constructor(config: IExchangeAcceptorConfig);
2311
+ /** Process one POST body (an exchange envelope), returning the reply body to send back. */
2312
+ handlePost(body: string): Promise<string>;
2313
+ private _handleHandshake;
2314
+ private _handleAction;
2315
+ private _err;
2316
+ }
2317
+ //#endregion
2318
+ //#region src/ActionRuntime/Transport/SecureSession/exchangeProtocol.d.ts
2319
+ /**
2320
+ * The application-level envelope for secure action traffic over an {@link IExchangeCarrier} (HTTP). An
2321
+ * exchange carrier only moves one request frame → one reply frame with no unsolicited push, so the
2322
+ * handshake and the per-action token + crypto all ride in this envelope (a JSON string body) rather than
2323
+ * on a persistent channel. The three security levels share it:
2324
+ *
2325
+ * - `none` — no handshake, no token: an `act` envelope carries the plaintext wire both ways.
2326
+ * - `authenticated` — a one-time handshake yields a session `token`; each later `act` carries it +
2327
+ * the plaintext wire.
2328
+ * - `encrypted` — same, but the wire is AES-GCM ciphertext, base64 in the `c` field.
2329
+ *
2330
+ * The handshake runs as two `hs` exchanges (hello→welcome, prove→accept) correlated by a client-chosen
2331
+ * `hsid`, since stateless requests can't rely on channel ordering. The `accept` reply carries the token.
2332
+ */
2333
+ type TWireJson = TActionPayload_Any_JsonObject<any, any>;
2334
+ /** Connector → acceptor request envelope. */
2335
+ type TExchangeRequest = {
2336
+ k: "hs";
2337
+ hsid: string;
2338
+ m: string;
2339
+ } | {
2340
+ k: "act";
2341
+ t?: string;
2342
+ w: TWireJson;
2343
+ } | {
2344
+ k: "act";
2345
+ t?: string;
2346
+ c: string;
2347
+ };
2348
+ /** Acceptor → connector reply envelope. */
2349
+ type TExchangeReply = {
2350
+ k: "hs";
2351
+ m: string;
2352
+ t?: string;
2353
+ } | {
2354
+ k: "act";
2355
+ w: TWireJson;
2356
+ } | {
2357
+ k: "act";
2358
+ c: string;
2359
+ } | {
2360
+ k: "err";
2361
+ message: string;
2362
+ };
2363
+ declare function encodeExchange(envelope: TExchangeRequest | TExchangeReply): string;
2364
+ declare function decodeExchangeRequest(raw: string): TExchangeRequest | undefined;
2365
+ declare function decodeExchangeReply(raw: string): TExchangeReply | undefined;
2366
+ //#endregion
2268
2367
  //#region src/errors/err_nice_action.d.ts
2269
2368
  declare enum EErrId_NiceAction {
2270
2369
  not_implemented = "not_implemented",
@@ -2646,11 +2745,13 @@ declare class ActionRuntime {
2646
2745
  * Used to locate the return-path channel for dispatching results back to the action origin.
2647
2746
  * Returns `undefined` if no handler matches (score > 0 required, i.e. at least id must match).
2648
2747
  *
2649
- * A handler that currently holds the origin's *live* connection always wins over a mere coordinate
2650
- * matchso with several duplex acceptors (e.g. WS + WebRTC) a result/push routes back over the carrier
2651
- * the client actually connected on, never a same-coordinate sibling that lacks the socket. Only when no
2652
- * handler owns a live connection do we fall back to the plain best-coordinate-score pick (the
2653
- * single-acceptor and connector-only cases, unchanged).
2748
+ * A handler that currently holds the origin's *live* connection always wins, regardless of its
2749
+ * coordinate score owning the live socket bound to the origin's exact coordinate (set from the
2750
+ * handshake) is a strictly more precise match than any env-level `peerClient` score. This lets one
2751
+ * server accept clients of *several* envs over a single acceptor (a multi-role Durable Object): the
2752
+ * result/push routes back over the carrier the client actually connected on even when the handler's
2753
+ * `clientEnv` is unset or names a different env. Only when no handler owns a live connection do we fall
2754
+ * back to the plain best-coordinate-score pick (the offline-return and connector-only cases).
2654
2755
  */
2655
2756
  getReturnHandlerForOrigin(originClient: RuntimeCoordinate): PeerLinkHandler | undefined;
2656
2757
  resetRuntime(): void;
@@ -2788,11 +2889,13 @@ interface IAcceptorSecurity {
2788
2889
  }
2789
2890
  interface IAcceptorHandlerBaseOptions<TConn> {
2790
2891
  /**
2791
- * Coordinate of the *connecting clients* (typically env-only, e.g. `RuntimeCoordinate.env("web_app")`).
2792
- * The runtime's return-path dispatch scores incoming actions' `originClient` against this to pick
2793
- * this handler for sending results/pushes back over the right channel.
2892
+ * Coordinate of the *connecting clients* (typically env-only, e.g. `RuntimeCoordinate.env("web_app")`),
2893
+ * scored against an action's `originClient` to pick this handler when *no* handler holds the client's
2894
+ * live connection (the offline-return fallback). A handler that currently owns the live socket always
2895
+ * wins regardless, so this is optional: omit it for a multi-role server that accepts several client envs
2896
+ * over one acceptor — it then defaults to `RuntimeCoordinate.unknown` (scores 0 against every client).
2794
2897
  */
2795
- clientEnv: RuntimeCoordinate;
2898
+ clientEnv?: RuntimeCoordinate;
2796
2899
  /** Write an encoded frame to a specific live connection (e.g. `(ws, frame) => ws.send(frame)`). */
2797
2900
  send: (connection: TConn, frame: string | Uint8Array | ArrayBuffer) => void;
2798
2901
  /**
@@ -2993,5 +3096,5 @@ declare class AcceptorHandler<TConn = unknown> extends PeerLinkHandler {
2993
3096
  }
2994
3097
  declare const createAcceptorHandler: <TConn = unknown>(options: IAcceptorHandlerOptions<TConn>) => AcceptorHandler<TConn>;
2995
3098
  //#endregion
2996
- export { rtcCarrier as $, MaybePromise as $n, IActionTransportInitialized as $t, TActionResultOutcome as A, TransportConnection as An, TInferOutputFromSchema as Ar, IConnectChannelOptions as At, IHttpCarrierOptions as B, IHandshakeEncryptionKeyMaterial as Bn, IActionWireFormat as Bt, IActionProgress_Custom as C, TSendActionDataMethod as Cn, IActionDomain as Cr, createHibernatableWsServerAdapter as Ct, TActionPayload_Any_Instance as D, TTransportStatusInfo as Dn, TActionDomainSchema as Dr, createConnectionStateStore as Dt, IActionRouteItemHandler as E, TTransportInitializationFinishedInfo as En, TActionDomainChildDef as Er, IConnectionStateStoreOptions as Et, decodeActionFrame as F, EHandshakeMessageType as Fn, TInferActionError as Fr, acceptChannelConnections as Ft, httpAcceptorCarrier as G, createInMemoryTofuVerifyKeyResolver as Gn, TCarrier as Gt, TCarrierFetch as H, IServerHandshakeConfig as Hn, IDuplexCarrierSource as Ht, EErrId_NiceAction as I, ESecurityLevel as In, actionSchema as Ir, connectChannel as It, IWsAcceptorCarrierOptions as J, decodeHandshakeMessage as Jn, createConnectorHandler as Jt, IWsCarrierOptions as K, createServerHandshake as Kn, TFrame$1 as Kt, err_nice_action as L, IClientHandshakeConfig as Ln, TActionSchemaOptions as Lr, defineChannel as Lt, isActionPayload_Request_JsonObject as M, Transport as Mn, TPossibleDomainIdList as Mr, TChannelAcceptorCases as Mt, isActionPayload_Any_JsonObject as N, ISecureAcceptorHandlerOptions as Nn, ActionSchema as Nr, TChannelPushHandlers as Nt, TActionPayload_Any_JsonObject as O, TTransportStatusInfo_GetTransport_Output as On, TDomainActionId as Or, IAcceptChannelOptions as Ot, IActionFrameDecoder as P, createSecureAcceptorHandler as Pn, EActionResponseMode as Pr, acceptChannel as Pt, IRtcCarrierOptions as Q, createLocalHandler as Qn, IActionTransportDef as Qt, EErrId_NiceTransport as R, IClientVerifyKeyResolveInput as Rn, TActionSerializationDefinition as Rr, IBinaryWireSessionOptions as Rt, IActionPayload_Result_JsonObject as S, TOnResolveIncomingResponseJson as Sn, IActionCore_JsonObject as Sr, IHibernatableWsServerAdapterOptions as St, IActionProgress_Percentage as T, TTransportCache as Tn, IActionRootDomain as Tr, IConnectionAttachment as Tt, httpCarrier as U, THandshakeMessage as Un, IExchangeCarrier as Ut, IHttpCarrierRequest as V, IHandshakeResult as Vn, IDuplexCarrier as Vt, IHttpAcceptorCarrierOptions as W, createClientHandshake as Wn, IExchangeCarrierSource as Wt, EErrId_NiceTransport_WebSocket as X, runtimeLinkId as Xn, ETransportShape as Xt, wsAcceptorCarrier as Y, encodeHandshakeMessage as Yn, PeerLinkHandler as Yt, err_nice_transport_ws as Z, ActionLocalHandler as Zn, ETransportStatus as Zt, IActionPayload_Data_Base as _, TOnResolveAnyIncomingActionData as _n, IRuntimeFullCoordinates as _r, IDuplexAcceptorCarrier as _t, TAcceptorConnectionCaseFn as a, ITransportDispatchAction as an, ERunningActionUpdateType as ar, IInMemoryServerEndpoint as at, IActionPayload_Request_JsonObject as b, TOnResolveIncomingRequestJson as bn, TRuntimeCoordinateStringId as br, isExchangeAcceptorCarrier as bt, createAcceptorHandler as c, ITransportRouteClientParams as cn, IRunningActionUpdate_Started as cr, IChannelHostAdapter as ct, ActionCore as d, ITransportStatusInfo_Failed as dn, TRunningActionUpdateFinished as dr, IChannelServer as dt, IActionTransportReady as en, createActionRootDomain as er, IRtcDataChannelLike as et, ActionPayload_Request as f, ITransportStatusInfo_Initializing as fn, TRunningActionUpdateListener as fr, IConnectionContext as ft, IActionPayload_Base_JsonObject as g, TGetTransportFn as gn, IRuntimeCoordinateSpecifics as gr, IAcceptorAttachmentStore as gt, IActionPayload_Base as h, IUpdateActionRunConfig_Output as hn, IRuntimeCoordinate as hr, serveChannel as ht, TAcceptorCaseFn as i, ISecureClientConfig as in, ERunningActionState as ir, IInMemoryChannelPair as it, isActionPayload_Result_JsonObject as j, ITransportConnectionContext as jn, TPossibleDomainId as jr, IConnectTransport as jt, TActionProgress as k, TUpdateActionRunConfig as kn, TInferInputFromSchema as kr, IActionChannel as kt, ActionDomain as l, ITransportRouteInfo as ln, IRunningActionUpdate_Success as lr, TServeHostOptions as lt, EActionProgressType as m, ITransportStatusInfo_Unsupported as mn, ActionPayload_Progress as mr, IServeConnectionStateOptions as mt, IAcceptorConnectionBinding as n, IActionTransportReadyData_Methods as nn, RunningAction as nr, IInMemoryCarrier as nt, TActionChannelFormatMessage as o, ITransportMethod_SendActionData_Input as on, IRunningActionUpdate_Abort as or, createInMemoryChannelPair as ot, EActionPayloadType as p, ITransportStatusInfo_Ready as pn, ActionPayload_Result as pr, IServeChannelOptions as pt, wsCarrier as q, createStorageTofuVerifyKeyResolver as qn, ConnectorHandler as qt, IAcceptorHandlerOptions as r, IActionTransportResolvers as rn, ERunningActionFinishedType as rr, inMemoryCarrier as rt, TActionConnectionEncoding as s, ITransportRouteActionParams as sn, IRunningActionUpdate_Progress as sr, err_nice_external_client as st, AcceptorHandler as t, IActionTransportReadyData_Base as tn, ActionRootDomain as tr, rtcDataChannelByteChannel as tt, ActionRuntime as u, ITransportStatusInfo_Base as un, TRunningActionUpdate as ur, serveHost as ut, IActionPayload_Progress as v, TOnResolveAnyIncomingActionData_Json as vn, RuntimeCoordinate as vr, IExchangeAcceptorCarrier as vt, IActionProgress_None as w, TSendReturnDataMethod as wn, IActionDomainChildOptions as wr, ConnectionStateStore as wt, IActionPayload_Result as x, TOnResolveIncomingResponse as xn, IActionCore as xr, IDuplexConnectionRouter as xt, IActionPayload_Progress_JsonObject as y, TOnResolveIncomingRequest as yn, TRuntimeCoordinateEnvId as yr, TAcceptorCarrier as yt, err_nice_transport as z, IClientVerifyKeyResolver as zn, TTransportedValue as zr, createBinaryWireSessionFactory as zt };
2997
- //# sourceMappingURL=AcceptorHandler-CxD0c1BE.d.cts.map
3099
+ export { httpAcceptorCarrier as $, createInMemoryTofuVerifyKeyResolver as $n, TCarrier as $t, TActionResultOutcome as A, TOnResolveIncomingResponseJson as An, IActionCore_JsonObject as Ar, IHibernatableWsServerAdapterOptions as At, decodeExchangeReply as B, Transport as Bn, TPossibleDomainIdList as Br, TChannelAcceptorCases as Bt, IActionProgress_Custom as C, IUpdateActionRunConfig_Output as Cn, IRuntimeCoordinate as Cr, serveChannel as Ct, TActionPayload_Any_Instance as D, TOnResolveIncomingRequest as Dn, TRuntimeCoordinateEnvId as Dr, TAcceptorCarrier as Dt, IActionRouteItemHandler as E, TOnResolveAnyIncomingActionData_Json as En, RuntimeCoordinate as Er, IExchangeAcceptorCarrier as Et, decodeActionFrame as F, TTransportStatusInfo as Fn, TActionDomainSchema as Fr, createConnectionStateStore as Ft, IExchangeAcceptorSecurity as G, IClientHandshakeConfig as Gn, TActionSchemaOptions as Gr, defineChannel as Gt, encodeExchange as H, createSecureAcceptorHandler as Hn, EActionResponseMode as Hr, acceptChannel as Ht, EErrId_NiceAction as I, TTransportStatusInfo_GetTransport_Output as In, TDomainActionId as Ir, IAcceptChannelOptions as It, IHttpCarrierOptions as J, IHandshakeEncryptionKeyMaterial as Jn, IActionWireFormat as Jt, EErrId_NiceTransport as K, IClientVerifyKeyResolveInput as Kn, TActionSerializationDefinition as Kr, IBinaryWireSessionOptions as Kt, err_nice_action as L, TUpdateActionRunConfig as Ln, TInferInputFromSchema as Lr, IActionChannel as Lt, isActionPayload_Request_JsonObject as M, TSendReturnDataMethod as Mn, IActionDomainChildOptions as Mr, ConnectionStateStore as Mt, isActionPayload_Any_JsonObject as N, TTransportCache as Nn, IActionRootDomain as Nr, IConnectionAttachment as Nt, TActionPayload_Any_JsonObject as O, TOnResolveIncomingRequestJson as On, TRuntimeCoordinateStringId as Or, isExchangeAcceptorCarrier as Ot, IActionFrameDecoder as P, TTransportInitializationFinishedInfo as Pn, TActionDomainChildDef as Pr, IConnectionStateStoreOptions as Pt, IHttpAcceptorCarrierOptions as Q, createClientHandshake as Qn, IExchangeCarrierSource as Qt, TExchangeReply as R, TransportConnection as Rn, TInferOutputFromSchema as Rr, IConnectChannelOptions as Rt, IActionPayload_Result_JsonObject as S, ITransportStatusInfo_Unsupported as Sn, ActionPayload_Progress as Sr, IServeConnectionStateOptions as St, IActionProgress_Percentage as T, TOnResolveAnyIncomingActionData as Tn, IRuntimeFullCoordinates as Tr, IDuplexAcceptorCarrier as Tt, ExchangeAcceptor as U, EHandshakeMessageType as Un, TInferActionError as Ur, acceptChannelConnections as Ut, decodeExchangeRequest as V, ISecureAcceptorHandlerOptions as Vn, ActionSchema as Vr, TChannelPushHandlers as Vt, IExchangeAcceptorConfig as W, ESecurityLevel as Wn, actionSchema as Wr, connectChannel as Wt, TCarrierFetch as X, IServerHandshakeConfig as Xn, IDuplexCarrierSource as Xt, IHttpCarrierRequest as Y, IHandshakeResult as Yn, IDuplexCarrier as Yt, httpCarrier as Z, THandshakeMessage as Zn, IExchangeCarrier as Zt, IActionPayload_Data_Base as _, ITransportRouteInfo as _n, IRunningActionUpdate_Success as _r, TServeHostOptions as _t, TAcceptorConnectionCaseFn as a, ETransportStatus as an, ActionLocalHandler as ar, err_nice_transport_ws as at, IActionPayload_Request_JsonObject as b, ITransportStatusInfo_Initializing as bn, TRunningActionUpdateListener as br, IConnectionContext as bt, createAcceptorHandler as c, IActionTransportReady as cn, createActionRootDomain as cr, IRtcDataChannelLike as ct, ActionCore as d, IActionTransportResolvers as dn, ERunningActionFinishedType as dr, inMemoryCarrier as dt, TFrame$1 as en, createServerHandshake as er, IWsCarrierOptions as et, ActionPayload_Request as f, ISecureClientConfig as fn, ERunningActionState as fr, IInMemoryChannelPair as ft, IActionPayload_Base_JsonObject as g, ITransportRouteClientParams as gn, IRunningActionUpdate_Started as gr, IChannelHostAdapter as gt, IActionPayload_Base as h, ITransportRouteActionParams as hn, IRunningActionUpdate_Progress as hr, err_nice_external_client as ht, TAcceptorCaseFn as i, ETransportShape as in, runtimeLinkId as ir, EErrId_NiceTransport_WebSocket as it, isActionPayload_Result_JsonObject as j, TSendActionDataMethod as jn, IActionDomain as jr, createHibernatableWsServerAdapter as jt, TActionProgress as k, TOnResolveIncomingResponse as kn, IActionCore as kr, IDuplexConnectionRouter as kt, ActionDomain as l, IActionTransportReadyData_Base as ln, ActionRootDomain as lr, rtcDataChannelByteChannel as lt, EActionProgressType as m, ITransportMethod_SendActionData_Input as mn, IRunningActionUpdate_Abort as mr, createInMemoryChannelPair as mt, IAcceptorConnectionBinding as n, createConnectorHandler as nn, decodeHandshakeMessage as nr, IWsAcceptorCarrierOptions as nt, TActionChannelFormatMessage as o, IActionTransportDef as on, createLocalHandler as or, IRtcCarrierOptions as ot, EActionPayloadType as p, ITransportDispatchAction as pn, ERunningActionUpdateType as pr, IInMemoryServerEndpoint as pt, err_nice_transport as q, IClientVerifyKeyResolver as qn, TTransportedValue as qr, createBinaryWireSessionFactory as qt, IAcceptorHandlerOptions as r, PeerLinkHandler as rn, encodeHandshakeMessage as rr, wsAcceptorCarrier as rt, TActionConnectionEncoding as s, IActionTransportInitialized as sn, MaybePromise as sr, rtcCarrier as st, AcceptorHandler as t, ConnectorHandler as tn, createStorageTofuVerifyKeyResolver as tr, wsCarrier as tt, ActionRuntime as u, IActionTransportReadyData_Methods as un, RunningAction as ur, IInMemoryCarrier as ut, IActionPayload_Progress as v, ITransportStatusInfo_Base as vn, TRunningActionUpdate as vr, serveHost as vt, IActionProgress_None as w, TGetTransportFn as wn, IRuntimeCoordinateSpecifics as wr, IAcceptorAttachmentStore as wt, IActionPayload_Result as x, ITransportStatusInfo_Ready as xn, ActionPayload_Result as xr, IServeChannelOptions as xt, IActionPayload_Progress_JsonObject as y, ITransportStatusInfo_Failed as yn, TRunningActionUpdateFinished as yr, IChannelServer as yt, TExchangeRequest as z, ITransportConnectionContext as zn, TPossibleDomainId as zr, IConnectTransport as zt };
3100
+ //# sourceMappingURL=AcceptorHandler-CxPfZtIl.d.cts.map
@@ -1,4 +1,4 @@
1
- import { hr as IRuntimeCoordinate, k as TActionProgress } from "./AcceptorHandler-CxD0c1BE.cjs";
1
+ import { Cr as IRuntimeCoordinate, k as TActionProgress } from "./AcceptorHandler-CxPfZtIl.cjs";
2
2
  //#region ../nice-devtools-shared/src/components/PanelChrome.d.ts
3
3
  /** Where a devtools panel is docked. */
4
4
  type TDevtoolsPosition = "dock-bottom" | "dock-top" | "dock-left" | "dock-right";
@@ -76,4 +76,4 @@ declare class ActionDevtoolsCore {
76
76
  }
77
77
  //#endregion
78
78
  export { TDevtoolsActionStatus as a, IDevtoolsObservableDomain as i, IActionDevtoolsCoreOptions as n, TDevtoolsListener as o, IDevtoolsActionEntry as r, TDevtoolsPosition as s, ActionDevtoolsCore as t };
79
- //# sourceMappingURL=ActionDevtoolsCore-37JP4bOG.d.cts.map
79
+ //# sourceMappingURL=ActionDevtoolsCore-D9KBBI2V.d.cts.map
@@ -1,4 +1,4 @@
1
- import { hr as IRuntimeCoordinate, k as TActionProgress } from "./AcceptorHandler-11-QMdx2.mjs";
1
+ import { Cr as IRuntimeCoordinate, k as TActionProgress } from "./AcceptorHandler-BizUtq4u.mjs";
2
2
  //#region ../nice-devtools-shared/src/components/PanelChrome.d.ts
3
3
  /** Where a devtools panel is docked. */
4
4
  type TDevtoolsPosition = "dock-bottom" | "dock-top" | "dock-left" | "dock-right";
@@ -76,4 +76,4 @@ declare class ActionDevtoolsCore {
76
76
  }
77
77
  //#endregion
78
78
  export { TDevtoolsActionStatus as a, IDevtoolsObservableDomain as i, IActionDevtoolsCoreOptions as n, TDevtoolsListener as o, IDevtoolsActionEntry as r, TDevtoolsPosition as s, ActionDevtoolsCore as t };
79
- //# sourceMappingURL=ActionDevtoolsCore-Cgq-go1R.d.mts.map
79
+ //# sourceMappingURL=ActionDevtoolsCore-xZjAtB4H.d.mts.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_createHibernatableWsServerAdapter = require("../createHibernatableWsServerAdapter-BNi4k9j3.cjs");
2
+ const require_createHibernatableWsServerAdapter = require("../createHibernatableWsServerAdapter-FSDWrxoF.cjs");
3
3
  let msgpackr = require("msgpackr");
4
4
  //#region src/ActionRuntime/Transport/codec/createBinaryWireAdapter.ts
5
5
  /**