@nice-code/action 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +699 -637
- package/build/{ActionDevtoolsCore-C5XrQI1K.d.mts → ActionDevtoolsCore-D_JvgPmz.d.mts} +2 -2
- package/build/{ActionDevtoolsCore-Dd1qJAwK.d.cts → ActionDevtoolsCore-dV-IVPcP.d.cts} +2 -2
- package/build/{ActionPayload.types-BchJrBIX.d.mts → ActionPayload.types-CnfWlkA1.d.cts} +252 -106
- package/build/{ActionPayload.types-snDlSIF-.d.cts → ActionPayload.types-D0DM-g65.d.mts} +252 -106
- package/build/devtools/browser/index.d.cts +1 -1
- package/build/devtools/browser/index.d.mts +1 -1
- package/build/devtools/server/index.d.cts +1 -1
- package/build/devtools/server/index.d.mts +1 -1
- package/build/index.cjs +169 -138
- package/build/index.cjs.map +1 -1
- package/build/index.d.cts +2 -2
- package/build/index.d.mts +2 -2
- package/build/index.mjs +167 -139
- package/build/index.mjs.map +1 -1
- package/build/platform/cloudflare/index.cjs +8 -4
- package/build/platform/cloudflare/index.cjs.map +1 -1
- package/build/platform/cloudflare/index.d.cts +8 -3
- package/build/platform/cloudflare/index.d.mts +8 -3
- package/build/platform/cloudflare/index.mjs +8 -4
- package/build/platform/cloudflare/index.mjs.map +1 -1
- package/build/react-query/index.d.cts +1 -1
- package/build/react-query/index.d.mts +1 -1
- package/build/{wsAcceptorCarrier-DHRbsY1X.cjs → wsAcceptorCarrier-BDJRIPfu.cjs} +2 -2
- package/build/wsAcceptorCarrier-BDJRIPfu.cjs.map +1 -0
- package/build/{wsAcceptorCarrier-CXGlQU_f.mjs → wsAcceptorCarrier-CW2qX25W.mjs} +2 -2
- package/build/wsAcceptorCarrier-CW2qX25W.mjs.map +1 -0
- package/package.json +4 -4
- package/build/wsAcceptorCarrier-CXGlQU_f.mjs.map +0 -1
- package/build/wsAcceptorCarrier-DHRbsY1X.cjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { INiceErrorDomainProps, InferNiceError, NiceError, NiceErrorDomain, err_cast_not_nice } from "@nice-code/error";
|
|
2
|
-
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
3
2
|
import { RuntimeName } from "std-env";
|
|
4
3
|
import { ClientCryptoKeyLink, StorageAdapter, TSerializedCryptoKeyData_Ed25519_Raw, TSerializedCryptoKeyData_X25519_Raw, TTypeAndId } from "@nice-code/util";
|
|
5
4
|
import * as v from "valibot";
|
|
5
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
6
6
|
|
|
7
7
|
//#region src/ActionDefinition/Schema/ActionSchema.types.d.ts
|
|
8
8
|
type TTransportedValue<RAW_VAL, SERDE_VAL> = [RAW_VAL] | [RAW_VAL, SERDE_VAL];
|
|
@@ -1027,6 +1027,13 @@ declare abstract class TransportConnection<T extends ETransportShape = ETranspor
|
|
|
1027
1027
|
protected _finalizeReady(readyData: RD): IActionTransportReadyData_Methods | Promise<IActionTransportReadyData_Methods>;
|
|
1028
1028
|
protected _getCacheKey(input: RP): string | null;
|
|
1029
1029
|
getCacheKey(input: RP): string | null;
|
|
1030
|
+
/**
|
|
1031
|
+
* Whether this transport can serve the given action right now. Consulted by the manager before
|
|
1032
|
+
* cache-key resolution and `getTransport`; a `false` result skips this transport (treated as
|
|
1033
|
+
* `unsupported`) and the manager falls through to the next in preference order. Defaults to `true`
|
|
1034
|
+
* when the transport declares no gate.
|
|
1035
|
+
*/
|
|
1036
|
+
isAvailable(input: RP): boolean;
|
|
1030
1037
|
getTransport(input: RP): TTransportStatusInfo<IActionTransportReadyData_Methods>;
|
|
1031
1038
|
protected _processTransportStatus(input: RP): TTransportStatusInfo<IActionTransportReadyData_Methods>;
|
|
1032
1039
|
/** Await carrier readiness, then finalize (possibly running a handshake) into the live methods. */
|
|
@@ -1174,6 +1181,15 @@ interface IActionTransportResolvers {
|
|
|
1174
1181
|
type TGetTransportFn<IN extends ITransportRouteActionParams, READY extends IActionTransportReadyData_Base> = (input: IN) => TTransportStatusInfo_GetTransport_Output<READY>;
|
|
1175
1182
|
interface IActionTransportInitialized<IN extends ITransportRouteActionParams, READY extends IActionTransportReadyData_Base> {
|
|
1176
1183
|
getTransportCacheKey?: (input: IN) => string[];
|
|
1184
|
+
/**
|
|
1185
|
+
* Optional availability gate, consulted by {@link ConnectionTransportManager} *before* cache-key
|
|
1186
|
+
* resolution and `getTransport`. When it returns `false`, this transport is treated as `unsupported`
|
|
1187
|
+
* for that action and the manager falls through to the next transport in preference order — without
|
|
1188
|
+
* opening the carrier or computing its cache key. Re-evaluated per action dispatch, so a transport can
|
|
1189
|
+
* become available later (e.g. once a session/connection precondition is met) with no reconnect. Omit =
|
|
1190
|
+
* always available.
|
|
1191
|
+
*/
|
|
1192
|
+
isAvailable?: (input: IN) => boolean;
|
|
1177
1193
|
getTransport: TGetTransportFn<IN, READY>;
|
|
1178
1194
|
}
|
|
1179
1195
|
interface IActionTransportDef<TYPE extends ETransportShape, INIT extends IActionTransportInitialized<any, any>> {
|
|
@@ -1862,6 +1878,88 @@ interface IAcceptChannelOptions<TConn> {
|
|
|
1862
1878
|
*/
|
|
1863
1879
|
declare function acceptChannel<TO_ACCEPTOR extends readonly ActionDomain<any>[], TO_CONNECTOR extends readonly ActionDomain<any>[], TConn = unknown>(runtime: ActionRuntime, channel: ISecureChannel<TO_ACCEPTOR, TO_CONNECTOR>, options: IAcceptChannelOptions<TConn>): AcceptorHandler<TConn>;
|
|
1864
1880
|
//#endregion
|
|
1881
|
+
//#region src/ActionRuntime/Handler/PeerLink/Acceptor/Hibernation/ConnectionStateStore.d.ts
|
|
1882
|
+
/**
|
|
1883
|
+
* The composite value persisted to a connection's attachment: the consumer's own app state plus the
|
|
1884
|
+
* {@link AcceptorHandler} routing binding. Co-storing them in one slot means a transport whose
|
|
1885
|
+
* sockets outlive process eviction (e.g. a Durable Object's hibernatable WebSocket) recovers both the
|
|
1886
|
+
* application identity *and* the action routing from a single attachment after a wake — no storage reads.
|
|
1887
|
+
*/
|
|
1888
|
+
interface IConnectionAttachment<TApp> {
|
|
1889
|
+
app?: TApp;
|
|
1890
|
+
binding?: IAcceptorConnectionBinding;
|
|
1891
|
+
}
|
|
1892
|
+
interface IConnectionStateStoreOptions<TConn, TApp> {
|
|
1893
|
+
/** Read a connection's raw attachment (e.g. `(ws) => ws.deserializeAttachment()`). */
|
|
1894
|
+
read: (connection: TConn) => unknown;
|
|
1895
|
+
/** Persist a connection's attachment (e.g. `(ws, value) => ws.serializeAttachment(value)`). */
|
|
1896
|
+
write: (connection: TConn, value: IConnectionAttachment<TApp>) => void;
|
|
1897
|
+
/**
|
|
1898
|
+
* All currently-live connections (e.g. `() => ctx.getWebSockets()`). Used to replay routing bindings
|
|
1899
|
+
* after a wake (via {@link createConnectionStateStore}) and to enumerate app state in
|
|
1900
|
+
* {@link ConnectionStateStore.entries}.
|
|
1901
|
+
*/
|
|
1902
|
+
getConnections: () => TConn[];
|
|
1903
|
+
/**
|
|
1904
|
+
* Optional Standard Schema (valibot, zod, …) validating the *app* portion on read. A value that
|
|
1905
|
+
* fails validation reads back as `null` — the same lenient behavior as a hand-written safeParse
|
|
1906
|
+
* helper. The binding is the library's own shape and is never validated.
|
|
1907
|
+
*/
|
|
1908
|
+
schema?: StandardSchemaV1<unknown, TApp>;
|
|
1909
|
+
}
|
|
1910
|
+
/**
|
|
1911
|
+
* A typed per-connection state store that co-owns the app state and the acceptor handler's routing
|
|
1912
|
+
* binding in one attachment, so neither the consumer nor the handler has to hand-merge the two. Create
|
|
1913
|
+
* it through {@link createConnectionStateStore} (which also wires binding persistence and replays
|
|
1914
|
+
* surviving connections after a wake), then `get`/`set`/`clearApp` the app state directly.
|
|
1915
|
+
*
|
|
1916
|
+
* The mechanism is carrier-neutral — it only needs read/write/enumerate callbacks for the connection's
|
|
1917
|
+
* attachment — but it pays off on transports whose connections outlive process eviction (e.g. a
|
|
1918
|
+
* Durable Object's hibernatable WebSockets), which is why it lives beside the hibernation adapter.
|
|
1919
|
+
*
|
|
1920
|
+
* ```ts
|
|
1921
|
+
* const players = createConnectionStateStore(serverHandler, {
|
|
1922
|
+
* schema: vs_player,
|
|
1923
|
+
* read: (ws) => ws.deserializeAttachment(),
|
|
1924
|
+
* write: (ws, v) => ws.serializeAttachment(v),
|
|
1925
|
+
* getConnections: () => ctx.getWebSockets(),
|
|
1926
|
+
* });
|
|
1927
|
+
* players.set(ws, player); // binding is preserved automatically
|
|
1928
|
+
* const player = players.get(ws);
|
|
1929
|
+
* ```
|
|
1930
|
+
*/
|
|
1931
|
+
declare class ConnectionStateStore<TConn, TApp> {
|
|
1932
|
+
private readonly options;
|
|
1933
|
+
constructor(options: IConnectionStateStoreOptions<TConn, TApp>);
|
|
1934
|
+
/** The validated app state for a connection, or `null` if unset / invalid. */
|
|
1935
|
+
get(connection: TConn): TApp | null;
|
|
1936
|
+
/** Set the app state, preserving the runtime binding already pinned to the connection. */
|
|
1937
|
+
set(connection: TConn, app: TApp): void;
|
|
1938
|
+
/** Clear the app state but keep the binding (e.g. a spectator that stopped watching). */
|
|
1939
|
+
clearApp(connection: TConn): void;
|
|
1940
|
+
/** Every live connection paired with its (validated) app state — for rebuilding in-memory state after a wake. */
|
|
1941
|
+
entries(): [TConn, TApp | null][];
|
|
1942
|
+
/** @internal Persist a freshly-bound connection's binding, preserving any app state already stored. */
|
|
1943
|
+
_persistBinding(connection: TConn, binding: IAcceptorConnectionBinding): void;
|
|
1944
|
+
/** @internal The persisted binding for a connection, if any (used to replay routing after a wake). */
|
|
1945
|
+
_readBinding(connection: TConn): IAcceptorConnectionBinding | undefined;
|
|
1946
|
+
private _readAttachment;
|
|
1947
|
+
private _validateApp;
|
|
1948
|
+
}
|
|
1949
|
+
/**
|
|
1950
|
+
* Build a per-connection {@link ConnectionStateStore} bound to an {@link AcceptorHandler}: it registers
|
|
1951
|
+
* itself as the handler's connection-bound persistence callback (so bindings are written without
|
|
1952
|
+
* overwriting app state) and immediately replays every live connection's stored binding via
|
|
1953
|
+
* {@link AcceptorHandler.rehydrateConnection} — so on a transport that resumes after eviction (e.g. a
|
|
1954
|
+
* Durable Object waking from hibernation) both the app identity and the action routing come back from a
|
|
1955
|
+
* single attachment, with no storage reads and no hand-rolled merge.
|
|
1956
|
+
*
|
|
1957
|
+
* Lives outside the handler so the generic {@link AcceptorHandler} stays free of any attachment/
|
|
1958
|
+
* hibernation concern — it exposes only the neutral `setOnConnectionBound` + `rehydrateConnection`
|
|
1959
|
+
* hooks this builder drives.
|
|
1960
|
+
*/
|
|
1961
|
+
declare function createConnectionStateStore<TConn, TApp>(handler: AcceptorHandler<TConn>, options: IConnectionStateStoreOptions<TConn, TApp>): ConnectionStateStore<TConn, TApp>;
|
|
1962
|
+
//#endregion
|
|
1865
1963
|
//#region src/ActionRuntime/Handler/PeerLink/Acceptor/Hibernation/createHibernatableWsServerAdapter.d.ts
|
|
1866
1964
|
interface IHibernatableWsServerAdapterOptions<TConn> {
|
|
1867
1965
|
/** The handler to drive (from `createSecureAcceptorHandler` or `createAcceptorHandler`). */
|
|
@@ -2013,17 +2111,21 @@ interface IExchangeCarrierSource {
|
|
|
2013
2111
|
* upgrade.
|
|
2014
2112
|
*/
|
|
2015
2113
|
/**
|
|
2016
|
-
*
|
|
2017
|
-
* Durable Object's hibernatable WebSockets). Optional — omit for a
|
|
2018
|
-
*
|
|
2114
|
+
* Raw read/write access to a connection's persisted attachment, for a duplex carrier whose connections
|
|
2115
|
+
* outlive process eviction (e.g. a Durable Object's hibernatable WebSockets). Optional — omit for a
|
|
2116
|
+
* transport that never hibernates (per-connection state is then in-memory only).
|
|
2117
|
+
*
|
|
2118
|
+
* `serveChannel` owns the attachment *layout*: it co-stores the routing binding and (when
|
|
2119
|
+
* `connectionState` is requested) per-connection app state as one composite in this single slot, so both
|
|
2120
|
+
* survive a wake. The carrier only has to say how to read/write the slot and enumerate live connections.
|
|
2019
2121
|
*/
|
|
2020
|
-
interface
|
|
2021
|
-
/** All currently-live connections —
|
|
2122
|
+
interface IAcceptorAttachmentStore<TConn> {
|
|
2123
|
+
/** All currently-live connections — enumerated on build to replay binding + app state after a wake. */
|
|
2022
2124
|
getConnections: () => TConn[];
|
|
2023
|
-
/** Read a connection's persisted
|
|
2024
|
-
|
|
2025
|
-
/** Persist a connection's
|
|
2026
|
-
|
|
2125
|
+
/** Read a connection's persisted attachment (e.g. `(ws) => ws.deserializeAttachment()`). */
|
|
2126
|
+
read: (connection: TConn) => unknown;
|
|
2127
|
+
/** Persist a connection's attachment (e.g. `(ws, value) => ws.serializeAttachment(value)`). */
|
|
2128
|
+
write: (connection: TConn, value: unknown) => void;
|
|
2027
2129
|
}
|
|
2028
2130
|
/**
|
|
2029
2131
|
* A duplex carrier is also its own lifecycle handle: once it has been passed to `serveChannel`, feed each
|
|
@@ -2070,8 +2172,12 @@ interface IDuplexAcceptorCarrier<TConn = unknown> extends IDuplexCarrierLifecycl
|
|
|
2070
2172
|
* Only consulted when {@link upgrade} is present.
|
|
2071
2173
|
*/
|
|
2072
2174
|
isUpgrade?: (request: Request, url: URL) => boolean;
|
|
2073
|
-
/**
|
|
2074
|
-
|
|
2175
|
+
/**
|
|
2176
|
+
* Optional attachment read/write for connections that survive eviction (Durable Object hibernation).
|
|
2177
|
+
* Present → `serveChannel` persists the routing binding (and any `connectionState`) here and replays it
|
|
2178
|
+
* on wake. Absent → per-connection state is in-memory only.
|
|
2179
|
+
*/
|
|
2180
|
+
attachmentStore?: IAcceptorAttachmentStore<TConn>;
|
|
2075
2181
|
/** Short carrier-kind label for the devtools chip (e.g. `"ws"`, `"webrtc"`). */
|
|
2076
2182
|
readonly carrierLabel: string;
|
|
2077
2183
|
}
|
|
@@ -2113,7 +2219,15 @@ type TAcceptorCarrier<TConn = unknown> = IDuplexAcceptorCarrier<TConn> | IExchan
|
|
|
2113
2219
|
declare function isExchangeAcceptorCarrier<TConn>(carrier: TAcceptorCarrier<TConn>): carrier is IExchangeAcceptorCarrier;
|
|
2114
2220
|
//#endregion
|
|
2115
2221
|
//#region src/ActionRuntime/Channel/serveChannel.d.ts
|
|
2116
|
-
|
|
2222
|
+
/** Per-connection app-state config for {@link serveChannel}'s `connectionState`. */
|
|
2223
|
+
interface IServeConnectionStateOptions<TApp> {
|
|
2224
|
+
/**
|
|
2225
|
+
* Optional Standard Schema (valibot, zod, …) validating the app state on read — a value that fails
|
|
2226
|
+
* validation reads back as `null`. Omit to store the app state untyped.
|
|
2227
|
+
*/
|
|
2228
|
+
schema?: StandardSchemaV1<unknown, TApp>;
|
|
2229
|
+
}
|
|
2230
|
+
interface IServeChannelOptions<TO_ACCEPTOR extends readonly ActionDomain<any>[], TConn, TApp = unknown> {
|
|
2117
2231
|
/**
|
|
2118
2232
|
* Coordinate of the *connecting clients* (typically env-only, e.g. `RuntimeCoordinate.env("web_app")`),
|
|
2119
2233
|
* used to score return-path dispatch back to the right connection.
|
|
@@ -2150,12 +2264,25 @@ interface IServeChannelOptions<TConn> {
|
|
|
2150
2264
|
verifyKeyResolver?: IClientVerifyKeyResolver;
|
|
2151
2265
|
/** Timeout (ms) applied to server-initiated actions awaiting a client response. */
|
|
2152
2266
|
defaultTimeout?: number;
|
|
2267
|
+
/**
|
|
2268
|
+
* Co-store per-connection app state alongside the routing binding in the sole duplex carrier's connection
|
|
2269
|
+
* attachment, so both survive a wake from eviction. Reach the typed store back on `server.connections`.
|
|
2270
|
+
* Requires the carrier to expose an attachment store (the Cloudflare `durableObjectWsCarrier` does) and
|
|
2271
|
+
* exactly one duplex carrier.
|
|
2272
|
+
*/
|
|
2273
|
+
connectionState?: IServeConnectionStateOptions<TApp>;
|
|
2274
|
+
/**
|
|
2275
|
+
* Connection-aware action cases for the channel's acceptor (`toAcceptor`) domains — each case receives the
|
|
2276
|
+
* primed request *and* the originating connection (the connection-aware dual of `handlers`). Registered on
|
|
2277
|
+
* the runtime for you. Requires exactly one duplex carrier.
|
|
2278
|
+
*/
|
|
2279
|
+
channelCases?: TChannelAcceptorCases<TO_ACCEPTOR, TConn>;
|
|
2153
2280
|
}
|
|
2154
2281
|
/**
|
|
2155
2282
|
* One server serving a secure channel over several carriers — the accept-in dual of `connectChannel`,
|
|
2156
2283
|
* returned by {@link serveChannel}. Wire its surface straight to the host's request/socket events.
|
|
2157
2284
|
*/
|
|
2158
|
-
interface IChannelServer<TConn> {
|
|
2285
|
+
interface IChannelServer<TConn, TApp = unknown> {
|
|
2159
2286
|
/**
|
|
2160
2287
|
* The duplex acceptor handlers — one per duplex carrier, in carrier order (empty if none). For pushing,
|
|
2161
2288
|
* prefer {@link pushToClient} (it resolves the owning handler); reach for these for cross-carrier work
|
|
@@ -2181,6 +2308,23 @@ interface IChannelServer<TConn> {
|
|
|
2181
2308
|
pushToClient: <DOM extends IActionDomain, ID extends keyof DOM["actionSchema"] & string>(target: TConn | RuntimeCoordinate, request: ActionPayload_Request<DOM, ID>, options?: {
|
|
2182
2309
|
timeout?: number;
|
|
2183
2310
|
}) => RunningAction<DOM, ID>;
|
|
2311
|
+
/**
|
|
2312
|
+
* Fan a server-initiated action out to every connection on the sole duplex carrier (skip the origin with
|
|
2313
|
+
* `except`, filter with `where`). The push-to-many counterpart of {@link pushToClient}. Throws if there
|
|
2314
|
+
* isn't exactly one duplex carrier (with several, broadcast over a specific `handlers[i]`).
|
|
2315
|
+
*/
|
|
2316
|
+
broadcast: <DOM extends IActionDomain, ID extends keyof DOM["actionSchema"] & string>(makeRequest: () => ActionPayload_Request<DOM, ID>, options?: {
|
|
2317
|
+
except?: TConn | null;
|
|
2318
|
+
where?: (connection: TConn) => boolean;
|
|
2319
|
+
timeout?: number;
|
|
2320
|
+
onError?: (error: unknown, connection: TConn) => void;
|
|
2321
|
+
}) => void;
|
|
2322
|
+
/**
|
|
2323
|
+
* The per-connection app-state store co-stored with the routing binding in the connection attachment —
|
|
2324
|
+
* present only when `connectionState` was passed. `get`/`set`/`clearApp`/`entries` it directly; it
|
|
2325
|
+
* survives hibernation alongside the binding.
|
|
2326
|
+
*/
|
|
2327
|
+
connections?: ConnectionStateStore<TConn, TApp>;
|
|
2184
2328
|
}
|
|
2185
2329
|
/**
|
|
2186
2330
|
* Serve a secure channel over one or more carriers from a single call — the accept-in dual of
|
|
@@ -2188,24 +2332,33 @@ interface IChannelServer<TConn> {
|
|
|
2188
2332
|
* resolver) and the security block (coordinate, dictionary version, accepted levels) *once* from
|
|
2189
2333
|
* `(runtime, channel)` and fans them across every carrier, so the WebSocket and the secure-HTTP endpoint
|
|
2190
2334
|
* can never drift apart. It registers your handlers (plus the duplex acceptor it builds) on the runtime,
|
|
2191
|
-
* wires hibernation when the duplex carrier
|
|
2192
|
-
* `fetch` / `duplex` / `pushToClient` you forward straight to
|
|
2335
|
+
* wires hibernation when the duplex carrier exposes an attachment store, and returns a single
|
|
2336
|
+
* {@link IChannelServer} whose `fetch` / `duplex` / `pushToClient` / `broadcast` you forward straight to
|
|
2337
|
+
* the host:
|
|
2193
2338
|
* ```ts
|
|
2194
2339
|
* const server = serveChannel(runtime, channel, {
|
|
2195
2340
|
* clientEnv, storage,
|
|
2196
|
-
* carriers: [wsAcceptorCarrier({ send, upgrade,
|
|
2197
|
-
*
|
|
2341
|
+
* carriers: [wsAcceptorCarrier({ send, upgrade, attachmentStore }), httpAcceptorCarrier()],
|
|
2342
|
+
* connectionState: { schema: vs_player }, // optional: co-store per-connection app state (survives hibernation)
|
|
2343
|
+
* channelCases: { join: (action, conn) => { … } }, // optional: connection-aware action cases
|
|
2198
2344
|
* });
|
|
2199
2345
|
* // fetch(req) => server.fetch(req)
|
|
2200
2346
|
* // webSocketMessage(conn, m) => server.duplex?.receive(conn, m)
|
|
2201
2347
|
* // webSocketClose/Error(conn) => server.duplex?.drop(conn)
|
|
2348
|
+
* // server.connections.get(conn) / server.broadcast(() => push.request(…), { except: conn })
|
|
2202
2349
|
* ```
|
|
2203
2350
|
*
|
|
2204
2351
|
* `TConn` (the live-connection token a duplex carrier hands back through `send`/`receive`/`drop`) is
|
|
2205
2352
|
* inferred from the carriers — `WebSocket` for `wsAcceptorCarrier`, the data-channel type for a WebRTC
|
|
2206
|
-
* carrier, and so on — so it stays carrier-agnostic.
|
|
2353
|
+
* carrier, and so on — so it stays carrier-agnostic. Passing `connectionState` narrows the return so
|
|
2354
|
+
* `server.connections` is non-optional.
|
|
2207
2355
|
*/
|
|
2208
|
-
declare function serveChannel<TO_ACCEPTOR extends readonly ActionDomain<any>[]
|
|
2356
|
+
declare function serveChannel<TO_ACCEPTOR extends readonly ActionDomain<any>[], TO_CONNECTOR extends readonly ActionDomain<any>[], TConn, TApp>(runtime: ActionRuntime, channel: ISecureChannel<TO_ACCEPTOR, TO_CONNECTOR>, options: IServeChannelOptions<TO_ACCEPTOR, TConn, TApp> & {
|
|
2357
|
+
connectionState: IServeConnectionStateOptions<TApp>;
|
|
2358
|
+
}): IChannelServer<TConn, TApp> & {
|
|
2359
|
+
connections: ConnectionStateStore<TConn, TApp>;
|
|
2360
|
+
};
|
|
2361
|
+
declare function serveChannel<TO_ACCEPTOR extends readonly ActionDomain<any>[] = readonly ActionDomain<any>[], TO_CONNECTOR extends readonly ActionDomain<any>[] = readonly ActionDomain<any>[], TConn = unknown, TApp = unknown>(runtime: ActionRuntime, channel: ISecureChannel<TO_ACCEPTOR, TO_CONNECTOR>, options: IServeChannelOptions<TO_ACCEPTOR, TConn, TApp>): IChannelServer<TConn, TApp>;
|
|
2209
2362
|
//#endregion
|
|
2210
2363
|
//#region src/ActionRuntime/Transport/SecureSession/exchangeAcceptor.d.ts
|
|
2211
2364
|
/** Acceptor secure config for the exchange (HTTP) endpoint — same identity an `AcceptorHandler` uses. */
|
|
@@ -2352,88 +2505,6 @@ interface ISecureAcceptorHandlerOptions<TConn> {
|
|
|
2352
2505
|
*/
|
|
2353
2506
|
declare function createSecureAcceptorHandler<TConn = unknown>(options: ISecureAcceptorHandlerOptions<TConn>): AcceptorHandler<TConn>;
|
|
2354
2507
|
//#endregion
|
|
2355
|
-
//#region src/ActionRuntime/Handler/PeerLink/Acceptor/Hibernation/ConnectionStateStore.d.ts
|
|
2356
|
-
/**
|
|
2357
|
-
* The composite value persisted to a connection's attachment: the consumer's own app state plus the
|
|
2358
|
-
* {@link AcceptorHandler} routing binding. Co-storing them in one slot means a transport whose
|
|
2359
|
-
* sockets outlive process eviction (e.g. a Durable Object's hibernatable WebSocket) recovers both the
|
|
2360
|
-
* application identity *and* the action routing from a single attachment after a wake — no storage reads.
|
|
2361
|
-
*/
|
|
2362
|
-
interface IConnectionAttachment<TApp> {
|
|
2363
|
-
app?: TApp;
|
|
2364
|
-
binding?: IAcceptorConnectionBinding;
|
|
2365
|
-
}
|
|
2366
|
-
interface IConnectionStateStoreOptions<TConn, TApp> {
|
|
2367
|
-
/** Read a connection's raw attachment (e.g. `(ws) => ws.deserializeAttachment()`). */
|
|
2368
|
-
read: (connection: TConn) => unknown;
|
|
2369
|
-
/** Persist a connection's attachment (e.g. `(ws, value) => ws.serializeAttachment(value)`). */
|
|
2370
|
-
write: (connection: TConn, value: IConnectionAttachment<TApp>) => void;
|
|
2371
|
-
/**
|
|
2372
|
-
* All currently-live connections (e.g. `() => ctx.getWebSockets()`). Used to replay routing bindings
|
|
2373
|
-
* after a wake (via {@link createConnectionStateStore}) and to enumerate app state in
|
|
2374
|
-
* {@link ConnectionStateStore.entries}.
|
|
2375
|
-
*/
|
|
2376
|
-
getConnections: () => TConn[];
|
|
2377
|
-
/**
|
|
2378
|
-
* Optional Standard Schema (valibot, zod, …) validating the *app* portion on read. A value that
|
|
2379
|
-
* fails validation reads back as `null` — the same lenient behavior as a hand-written safeParse
|
|
2380
|
-
* helper. The binding is the library's own shape and is never validated.
|
|
2381
|
-
*/
|
|
2382
|
-
schema?: StandardSchemaV1<unknown, TApp>;
|
|
2383
|
-
}
|
|
2384
|
-
/**
|
|
2385
|
-
* A typed per-connection state store that co-owns the app state and the acceptor handler's routing
|
|
2386
|
-
* binding in one attachment, so neither the consumer nor the handler has to hand-merge the two. Create
|
|
2387
|
-
* it through {@link createConnectionStateStore} (which also wires binding persistence and replays
|
|
2388
|
-
* surviving connections after a wake), then `get`/`set`/`clearApp` the app state directly.
|
|
2389
|
-
*
|
|
2390
|
-
* The mechanism is carrier-neutral — it only needs read/write/enumerate callbacks for the connection's
|
|
2391
|
-
* attachment — but it pays off on transports whose connections outlive process eviction (e.g. a
|
|
2392
|
-
* Durable Object's hibernatable WebSockets), which is why it lives beside the hibernation adapter.
|
|
2393
|
-
*
|
|
2394
|
-
* ```ts
|
|
2395
|
-
* const players = createConnectionStateStore(serverHandler, {
|
|
2396
|
-
* schema: vs_player,
|
|
2397
|
-
* read: (ws) => ws.deserializeAttachment(),
|
|
2398
|
-
* write: (ws, v) => ws.serializeAttachment(v),
|
|
2399
|
-
* getConnections: () => ctx.getWebSockets(),
|
|
2400
|
-
* });
|
|
2401
|
-
* players.set(ws, player); // binding is preserved automatically
|
|
2402
|
-
* const player = players.get(ws);
|
|
2403
|
-
* ```
|
|
2404
|
-
*/
|
|
2405
|
-
declare class ConnectionStateStore<TConn, TApp> {
|
|
2406
|
-
private readonly options;
|
|
2407
|
-
constructor(options: IConnectionStateStoreOptions<TConn, TApp>);
|
|
2408
|
-
/** The validated app state for a connection, or `null` if unset / invalid. */
|
|
2409
|
-
get(connection: TConn): TApp | null;
|
|
2410
|
-
/** Set the app state, preserving the runtime binding already pinned to the connection. */
|
|
2411
|
-
set(connection: TConn, app: TApp): void;
|
|
2412
|
-
/** Clear the app state but keep the binding (e.g. a spectator that stopped watching). */
|
|
2413
|
-
clearApp(connection: TConn): void;
|
|
2414
|
-
/** Every live connection paired with its (validated) app state — for rebuilding in-memory state after a wake. */
|
|
2415
|
-
entries(): [TConn, TApp | null][];
|
|
2416
|
-
/** @internal Persist a freshly-bound connection's binding, preserving any app state already stored. */
|
|
2417
|
-
_persistBinding(connection: TConn, binding: IAcceptorConnectionBinding): void;
|
|
2418
|
-
/** @internal The persisted binding for a connection, if any (used to replay routing after a wake). */
|
|
2419
|
-
_readBinding(connection: TConn): IAcceptorConnectionBinding | undefined;
|
|
2420
|
-
private _readAttachment;
|
|
2421
|
-
private _validateApp;
|
|
2422
|
-
}
|
|
2423
|
-
/**
|
|
2424
|
-
* Build a per-connection {@link ConnectionStateStore} bound to an {@link AcceptorHandler}: it registers
|
|
2425
|
-
* itself as the handler's connection-bound persistence callback (so bindings are written without
|
|
2426
|
-
* overwriting app state) and immediately replays every live connection's stored binding via
|
|
2427
|
-
* {@link AcceptorHandler.rehydrateConnection} — so on a transport that resumes after eviction (e.g. a
|
|
2428
|
-
* Durable Object waking from hibernation) both the app identity and the action routing come back from a
|
|
2429
|
-
* single attachment, with no storage reads and no hand-rolled merge.
|
|
2430
|
-
*
|
|
2431
|
-
* Lives outside the handler so the generic {@link AcceptorHandler} stays free of any attachment/
|
|
2432
|
-
* hibernation concern — it exposes only the neutral `setOnConnectionBound` + `rehydrateConnection`
|
|
2433
|
-
* hooks this builder drives.
|
|
2434
|
-
*/
|
|
2435
|
-
declare function createConnectionStateStore<TConn, TApp>(handler: AcceptorHandler<TConn>, options: IConnectionStateStoreOptions<TConn, TApp>): ConnectionStateStore<TConn, TApp>;
|
|
2436
|
-
//#endregion
|
|
2437
2508
|
//#region src/ActionRuntime/Handler/PeerLink/Connector/err_nice_external_client.d.ts
|
|
2438
2509
|
declare const err_nice_external_client: import("@nice-code/error").NiceErrorDomain<{
|
|
2439
2510
|
domain: string;
|
|
@@ -2559,8 +2630,8 @@ interface IWsAcceptorCarrierOptions<TConn> {
|
|
|
2559
2630
|
upgrade?: (request: Request, url: URL) => Response | Promise<Response>;
|
|
2560
2631
|
/** Whether an inbound request is a WS upgrade. Defaults to an `Upgrade: websocket` header. */
|
|
2561
2632
|
isUpgrade?: (request: Request, url: URL) => boolean;
|
|
2562
|
-
/**
|
|
2563
|
-
|
|
2633
|
+
/** Attachment read/write for hibernatable sockets (e.g. a Durable Object); `serveChannel` persists here. */
|
|
2634
|
+
attachmentStore?: IAcceptorAttachmentStore<TConn>;
|
|
2564
2635
|
/** Override the devtools carrier-kind label (defaults to `"ws"`). */
|
|
2565
2636
|
carrierLabel?: string;
|
|
2566
2637
|
}
|
|
@@ -2735,6 +2806,12 @@ interface IExchangeTransportOptions {
|
|
|
2735
2806
|
updateRunConfig?: TUpdateActionRunConfig;
|
|
2736
2807
|
/** Keys identifying a reusable session, so one carrier is shared across actions to the same peer. */
|
|
2737
2808
|
getTransportCacheKey?: (input: ITransportRouteActionParams) => string[];
|
|
2809
|
+
/**
|
|
2810
|
+
* Optional availability gate. When it returns `false`, the manager skips this transport for that action
|
|
2811
|
+
* (reporting `unsupported`) and falls through to the next — without opening the carrier or computing its
|
|
2812
|
+
* cache key. Re-evaluated per dispatch, so the transport can become available later with no reconnect.
|
|
2813
|
+
*/
|
|
2814
|
+
available?: (input: ITransportRouteActionParams) => boolean;
|
|
2738
2815
|
/** Short label for the devtools chip (defaults to "exchange"). */
|
|
2739
2816
|
label?: string;
|
|
2740
2817
|
getRouteInfo?: (input: ITransportRouteActionParams) => ITransportRouteInfo;
|
|
@@ -2841,6 +2918,12 @@ interface ILinkTransportOptions {
|
|
|
2841
2918
|
updateRunConfig?: TUpdateActionRunConfig;
|
|
2842
2919
|
/** Keys identifying a reusable channel, so one carrier is shared across actions to the same peer. */
|
|
2843
2920
|
getTransportCacheKey?: (input: ITransportRouteActionParams) => string[];
|
|
2921
|
+
/**
|
|
2922
|
+
* Optional availability gate. When it returns `false`, the manager skips this transport for that action
|
|
2923
|
+
* (reporting `unsupported`) and falls through to the next — without opening the carrier or computing its
|
|
2924
|
+
* cache key. Re-evaluated per dispatch, so the transport can become available later with no reconnect.
|
|
2925
|
+
*/
|
|
2926
|
+
available?: (input: ITransportRouteActionParams) => boolean;
|
|
2844
2927
|
/** Short label for the devtools chip (defaults to "link"). */
|
|
2845
2928
|
label?: string;
|
|
2846
2929
|
getRouteInfo?: (input: ITransportRouteActionParams) => ITransportRouteInfo;
|
|
@@ -2875,6 +2958,13 @@ interface IPlainTransportOptions {
|
|
|
2875
2958
|
formatMessage?: TLinkFormatMessage;
|
|
2876
2959
|
/** Per-channel codec factory for stateful duplex codecs (e.g. the binary session). */
|
|
2877
2960
|
createFormatMessage?: () => TLinkFormatMessage;
|
|
2961
|
+
/**
|
|
2962
|
+
* Optional availability gate. When it returns `false`, this transport reports as `unsupported` for that
|
|
2963
|
+
* action and the manager falls through to the next transport in preference order — without opening the
|
|
2964
|
+
* carrier or computing its cache key. Re-evaluated per dispatch, so a transport can become available
|
|
2965
|
+
* later (e.g. once a session/connection precondition holds) with no reconnect. Omit = always available.
|
|
2966
|
+
*/
|
|
2967
|
+
available?: (input: ITransportRouteActionParams) => boolean;
|
|
2878
2968
|
updateRunConfig?: TUpdateActionRunConfig;
|
|
2879
2969
|
/** Override the devtools chip label (defaults to the carrier's `carrierLabel`). */
|
|
2880
2970
|
label?: string;
|
|
@@ -2894,6 +2984,55 @@ declare function plainTransport(options: IPlainTransportOptions & {
|
|
|
2894
2984
|
carrier: IDuplexCarrierSource;
|
|
2895
2985
|
}): LinkTransport;
|
|
2896
2986
|
//#endregion
|
|
2987
|
+
//#region src/ActionRuntime/Transport/SecureSession/exchangeProtocol.d.ts
|
|
2988
|
+
/**
|
|
2989
|
+
* The application-level envelope for secure action traffic over an {@link IExchangeCarrier} (HTTP). An
|
|
2990
|
+
* exchange carrier only moves one request frame → one reply frame with no unsolicited push, so the
|
|
2991
|
+
* handshake and the per-action token + crypto all ride in this envelope (a JSON string body) rather than
|
|
2992
|
+
* on a persistent channel. The three security levels share it:
|
|
2993
|
+
*
|
|
2994
|
+
* - `none` — no handshake, no token: an `act` envelope carries the plaintext wire both ways.
|
|
2995
|
+
* - `authenticated` — a one-time handshake yields a session `token`; each later `act` carries it +
|
|
2996
|
+
* the plaintext wire.
|
|
2997
|
+
* - `encrypted` — same, but the wire is AES-GCM ciphertext, base64 in the `c` field.
|
|
2998
|
+
*
|
|
2999
|
+
* The handshake runs as two `hs` exchanges (hello→welcome, prove→accept) correlated by a client-chosen
|
|
3000
|
+
* `hsid`, since stateless requests can't rely on channel ordering. The `accept` reply carries the token.
|
|
3001
|
+
*/
|
|
3002
|
+
type TWireJson = TActionPayload_Any_JsonObject<any, any>;
|
|
3003
|
+
/** Connector → acceptor request envelope. */
|
|
3004
|
+
type TExchangeRequest = {
|
|
3005
|
+
k: "hs";
|
|
3006
|
+
hsid: string;
|
|
3007
|
+
m: string;
|
|
3008
|
+
} | {
|
|
3009
|
+
k: "act";
|
|
3010
|
+
t?: string;
|
|
3011
|
+
w: TWireJson;
|
|
3012
|
+
} | {
|
|
3013
|
+
k: "act";
|
|
3014
|
+
t?: string;
|
|
3015
|
+
c: string;
|
|
3016
|
+
};
|
|
3017
|
+
/** Acceptor → connector reply envelope. */
|
|
3018
|
+
type TExchangeReply = {
|
|
3019
|
+
k: "hs";
|
|
3020
|
+
m: string;
|
|
3021
|
+
t?: string;
|
|
3022
|
+
} | {
|
|
3023
|
+
k: "act";
|
|
3024
|
+
w: TWireJson;
|
|
3025
|
+
} | {
|
|
3026
|
+
k: "act";
|
|
3027
|
+
c: string;
|
|
3028
|
+
} | {
|
|
3029
|
+
k: "err";
|
|
3030
|
+
message: string;
|
|
3031
|
+
};
|
|
3032
|
+
declare function encodeExchange(envelope: TExchangeRequest | TExchangeReply): string;
|
|
3033
|
+
declare function decodeExchangeRequest(raw: string): TExchangeRequest | undefined;
|
|
3034
|
+
declare function decodeExchangeReply(raw: string): TExchangeReply | undefined;
|
|
3035
|
+
//#endregion
|
|
2897
3036
|
//#region src/ActionRuntime/Transport/secureTransport.d.ts
|
|
2898
3037
|
interface ISecureTransportOptions {
|
|
2899
3038
|
/** The shared channel identity (per-connection codec + dictionary version) — same one both ends use. */
|
|
@@ -2904,6 +3043,13 @@ interface ISecureTransportOptions {
|
|
|
2904
3043
|
storageAdapter: StorageAdapter;
|
|
2905
3044
|
/** The level this client requests; the peer must allow it. */
|
|
2906
3045
|
securityLevel: ESecurityLevel;
|
|
3046
|
+
/**
|
|
3047
|
+
* Optional availability gate. When it returns `false`, this transport reports as `unsupported` for that
|
|
3048
|
+
* action and the manager falls through to the next transport in preference order — without opening the
|
|
3049
|
+
* carrier or computing its cache key. Re-evaluated per dispatch, so a transport can become available
|
|
3050
|
+
* later (e.g. once a session/connection precondition holds) with no reconnect. Omit = always available.
|
|
3051
|
+
*/
|
|
3052
|
+
available?: (input: ITransportRouteActionParams) => boolean;
|
|
2907
3053
|
/**
|
|
2908
3054
|
* How to reach the peer. A duplex carrier (`wsCarrier(url)`, `rtcCarrier(dc)`,
|
|
2909
3055
|
* `inMemoryCarrier().carrier`) runs the push-capable session; an exchange carrier (`httpCarrier(...)`)
|
|
@@ -3151,5 +3297,5 @@ interface IActionPayload_Result_JsonObject<DOM extends IActionDomain = IActionDo
|
|
|
3151
3297
|
type TActionPayload_Any_Instance<DOM extends IActionDomain = IActionDomain, ID extends keyof DOM["actionSchema"] & string = keyof DOM["actionSchema"] & string> = ActionPayload_Request<DOM, ID> | ActionPayload_Result<DOM, ID> | ActionPayload_Progress<DOM, ID>;
|
|
3152
3298
|
type TActionPayload_Any_JsonObject<DOM extends IActionDomain = IActionDomain, ID extends keyof DOM["actionSchema"] & string = keyof DOM["actionSchema"] & string> = IActionPayload_Request_JsonObject<DOM, ID> | IActionPayload_Progress_JsonObject<DOM, ID> | IActionPayload_Result_JsonObject<DOM, ID>;
|
|
3153
3299
|
//#endregion
|
|
3154
|
-
export {
|
|
3155
|
-
//# sourceMappingURL=ActionPayload.types-
|
|
3300
|
+
export { httpAcceptorCarrier as $, ITransportConnectionContext as $n, ActionSchema as $r, defineChannel as $t, decodeExchangeReply as A, ITransportRouteActionParams as An, IRunningActionUpdate_Progress as Ar, TAcceptorCarrier as At, err_nice_transport as B, TOnResolveAnyIncomingActionData as Bn, RuntimeCoordinate as Br, createHibernatableWsServerAdapter as Bt, decodeActionFrame as C, IActionTransportReady as Cn, ActionPayload_Request as Cr, IChannelServer as Ct, secureTransport as D, ISecureClientConfig as Dn, ERunningActionState as Dr, IAcceptorAttachmentStore as Dt, ISecureTransportOptions as E, IActionTransportResolvers as En, ERunningActionFinishedType as Er, serveChannel as Et, ILinkTransportOptions as F, ITransportStatusInfo_Initializing as Fn, TRunningActionUpdateListener as Fr, IExchangeCarrierSource as Ft, IActionFrameCryptoConfig as G, TOnResolveIncomingResponseJson as Gn, IActionRootDomain as Gr, IAcceptChannelOptions as Gt, IExchangeTransportOptions as H, TOnResolveIncomingRequest as Hn, TRuntimeCoordinateStringId as Hr, IConnectionAttachment as Ht, LinkTransport as I, ITransportStatusInfo_Ready as In, ActionPayload_Result as Ir, TCarrier as It, IHttpCarrierOptions as J, TTransportCache as Jn, TDomainActionId as Jr, TChannelAcceptorCases as Jt, createActionFrameCrypto as K, TSendActionDataMethod as Kn, TActionDomainChildDef as Kr, IActionChannel as Kt, IActionTransportReadyData_Link as L, ITransportStatusInfo_Unsupported as Ln, IRuntimeCoordinate as Lr, TFrame$1 as Lt, encodeExchange as M, ITransportRouteInfo as Mn, IRunningActionUpdate_Success as Mr, IDuplexCarrier as Mt, IPlainTransportOptions as N, ITransportStatusInfo_Base as Nn, TRunningActionUpdate as Nr, IDuplexCarrierSource as Nt, TExchangeReply as O, ITransportDispatchAction as On, ERunningActionUpdateType as Or, IDuplexAcceptorCarrier as Ot, plainTransport as P, ITransportStatusInfo_Failed as Pn, TRunningActionUpdateFinished as Pr, IExchangeCarrier as Pt, IHttpAcceptorCarrierOptions as Q, TUpdateActionRunConfig as Qn, TPossibleDomainIdList as Qr, connectChannel as Qt, TLinkFormatMessage as R, IUpdateActionRunConfig_Output as Rn, IRuntimeCoordinateSpecifics as Rr, IDuplexConnectionRouter as Rt, IActionFrameDecoder as S, IActionTransportInitialized as Sn, ActionPayload_Progress as Sr, IExchangeAcceptorSecurity as St, err_nice_action as T, IActionTransportReadyData_Methods as Tn, IActionCore_JsonObject as Tr, IServeConnectionStateOptions as Tt, IActionTransportReadyData_Exchange as U, TOnResolveIncomingRequestJson as Un, IActionDomain as Ur, IConnectionStateStoreOptions as Ut, ExchangeTransport as V, TOnResolveAnyIncomingActionData_Json as Vn, TRuntimeCoordinateEnvId as Vr, ConnectionStateStore as Vt, IActionFrameCrypto as W, TOnResolveIncomingResponse as Wn, IActionDomainChildOptions as Wr, createConnectionStateStore as Wt, TCarrierFetch as X, TTransportStatusInfo as Xn, TInferOutputFromSchema as Xr, acceptChannel as Xt, IHttpCarrierRequest as Y, TTransportInitializationFinishedInfo as Yn, TInferInputFromSchema as Yr, TChannelPushHandlers as Yt, httpCarrier as Z, TTransportStatusInfo_GetTransport_Output as Zn, TPossibleDomainId as Zr, acceptChannelConnections as Zt, TActionProgress as _, ConnectorHandler as _n, PeerLinkHandler as _r, createSecureAcceptorHandler as _t, IActionPayload_Data_Base as a, TTransportedValue as ai, IAcceptorConnectionBinding as an, IClientVerifyKeyResolver as ar, err_nice_transport_ws as at, isActionPayload_Request_JsonObject as b, ETransportStatus as bn, MaybePromise as br, ExchangeAcceptor as bt, IActionPayload_Request_JsonObject as c, TActionChannelFormatMessage as cn, IServerHandshakeConfig as cr, IRtcDataChannelLike as ct, IActionProgress_Custom as d, IActionWireFormat as dn, createInMemoryTofuVerifyKeyResolver as dr, inMemoryCarrier as dt, EActionResponseMode as ei, ISecureChannel as en, Transport as er, IWsCarrierOptions as et, IActionProgress_None as f, createActionRootDomain as fn, createServerHandshake as fr, IInMemoryChannelPair as ft, TActionPayload_Any_JsonObject as g, ActionRuntime as gn, runtimeLinkId as gr, ISecureAcceptorHandlerOptions as gt, TActionPayload_Any_Instance as h, ActionRootDomain as hn, encodeHandshakeMessage as hr, err_nice_external_client as ht, IActionPayload_Base_JsonObject as i, TActionSerializationDefinition as ii, AcceptorHandler as in, IClientVerifyKeyResolveInput as ir, EErrId_NiceTransport_WebSocket as it, decodeExchangeRequest as j, ITransportRouteClientParams as jn, IRunningActionUpdate_Started as jr, isExchangeAcceptorCarrier as jt, TExchangeRequest as k, ITransportMethod_SendActionData_Input as kn, IRunningActionUpdate_Abort as kr, IExchangeAcceptorCarrier as kt, IActionPayload_Result as l, TActionConnectionEncoding as ln, THandshakeMessage as lr, rtcDataChannelByteChannel as lt, IActionRouteItemHandler as m, ActionDomain as mn, decodeHandshakeMessage as mr, createInMemoryChannelPair as mt, EActionProgressType as n, actionSchema as ni, IBinaryWireSessionOptions as nn, ESecurityLevel as nr, IWsAcceptorCarrierOptions as nt, IActionPayload_Progress as o, IAcceptorHandlerOptions as on, IHandshakeEncryptionKeyMaterial as or, IRtcCarrierOptions as ot, IActionProgress_Percentage as p, ActionCore as pn, createStorageTofuVerifyKeyResolver as pr, IInMemoryServerEndpoint as pt, createBinaryWireAdapter as q, TSendReturnDataMethod as qn, TActionDomainSchema as qr, IConnectChannelOptions as qt, IActionPayload_Base as r, TActionSchemaOptions as ri, createBinaryWireSessionFactory as rn, IClientHandshakeConfig as rr, wsAcceptorCarrier as rt, IActionPayload_Progress_JsonObject as s, TAcceptorConnectionCaseFn as sn, IHandshakeResult as sr, rtcCarrier as st, EActionPayloadType as t, TInferActionError as ti, defineSecureChannel as tn, EHandshakeMessageType as tr, wsCarrier as tt, IActionPayload_Result_JsonObject as u, createAcceptorHandler as un, createClientHandshake as ur, IInMemoryCarrier as ut, TActionResultOutcome as v, createConnectorHandler as vn, ActionLocalHandler as vr, IActionFetchHandlerOptions as vt, EErrId_NiceAction as w, IActionTransportReadyData_Base as wn, IActionCore as wr, IServeChannelOptions as wt, isActionPayload_Any_JsonObject as x, IActionTransportDef as xn, RunningAction as xr, IExchangeAcceptorConfig as xt, isActionPayload_Result_JsonObject as y, ETransportShape as yn, createLocalHandler as yr, createActionFetchHandler as yt, EErrId_NiceTransport as z, TGetTransportFn as zn, IRuntimeFullCoordinates as zr, IHibernatableWsServerAdapterOptions as zt };
|
|
3301
|
+
//# sourceMappingURL=ActionPayload.types-D0DM-g65.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as TDevtoolsActionStatus, i as IDevtoolsObservableDomain, n as IActionDevtoolsCoreOptions, o as TDevtoolsListener, r as IDevtoolsActionEntry, s as TDevtoolsPosition, t as ActionDevtoolsCore } from "../../ActionDevtoolsCore-
|
|
1
|
+
import { a as TDevtoolsActionStatus, i as IDevtoolsObservableDomain, n as IActionDevtoolsCoreOptions, o as TDevtoolsListener, r as IDevtoolsActionEntry, s as TDevtoolsPosition, t as ActionDevtoolsCore } from "../../ActionDevtoolsCore-dV-IVPcP.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/devtools/browser/NiceActionDevtools.d.ts
|
|
4
4
|
interface INiceActionDevtoolsProps {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as TDevtoolsActionStatus, i as IDevtoolsObservableDomain, n as IActionDevtoolsCoreOptions, o as TDevtoolsListener, r as IDevtoolsActionEntry, s as TDevtoolsPosition, t as ActionDevtoolsCore } from "../../ActionDevtoolsCore-
|
|
1
|
+
import { a as TDevtoolsActionStatus, i as IDevtoolsObservableDomain, n as IActionDevtoolsCoreOptions, o as TDevtoolsListener, r as IDevtoolsActionEntry, s as TDevtoolsPosition, t as ActionDevtoolsCore } from "../../ActionDevtoolsCore-D_JvgPmz.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/devtools/browser/NiceActionDevtools.d.ts
|
|
4
4
|
interface INiceActionDevtoolsProps {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as TDevtoolsActionStatus, i as IDevtoolsObservableDomain, n as IActionDevtoolsCoreOptions, o as TDevtoolsListener, r as IDevtoolsActionEntry, t as ActionDevtoolsCore } from "../../ActionDevtoolsCore-
|
|
1
|
+
import { a as TDevtoolsActionStatus, i as IDevtoolsObservableDomain, n as IActionDevtoolsCoreOptions, o as TDevtoolsListener, r as IDevtoolsActionEntry, t as ActionDevtoolsCore } from "../../ActionDevtoolsCore-dV-IVPcP.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/devtools/server/NiceActionServerDevtools.d.ts
|
|
4
4
|
type TServerDevtoolsLogFn = (message: string, data?: Record<string, unknown>) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as TDevtoolsActionStatus, i as IDevtoolsObservableDomain, n as IActionDevtoolsCoreOptions, o as TDevtoolsListener, r as IDevtoolsActionEntry, t as ActionDevtoolsCore } from "../../ActionDevtoolsCore-
|
|
1
|
+
import { a as TDevtoolsActionStatus, i as IDevtoolsObservableDomain, n as IActionDevtoolsCoreOptions, o as TDevtoolsListener, r as IDevtoolsActionEntry, t as ActionDevtoolsCore } from "../../ActionDevtoolsCore-D_JvgPmz.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/devtools/server/NiceActionServerDevtools.d.ts
|
|
4
4
|
type TServerDevtoolsLogFn = (message: string, data?: Record<string, unknown>) => void;
|