@dbx-tools/dbx-model-catalog 0.1.0 → 0.1.1

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 CHANGED
@@ -14,11 +14,10 @@ await using remote = await connectModelCatalog("wss://catalog.example.com");
14
14
  const catalog = await remote.client.catalog();
15
15
  ```
16
16
 
17
- Pass `{ python: "/path/to/python" }` to select the Python executable used for
18
- the local worker. The npm artifact includes the Python service source; Pynect
19
- uses uv to provision its isolated environment on the first local connection.
20
- Generated catalog types are re-exported from this package. The package does not
21
- contain a separate JavaScript schema implementation.
17
+ The npm artifact includes the Python service source. Pynect uses uv to
18
+ provision its isolated environment on the first local connection. Generated
19
+ catalog types are re-exported from this package. The package does not contain a
20
+ separate JavaScript schema implementation.
22
21
 
23
22
  For direct public ingestion without the service client, fetch:
24
23
  <https://reggie-db.github.io/dbx-model-catalog/catalog.json>.
package/dist/browser.js CHANGED
@@ -1,4 +1,4 @@
1
- // node_modules/.bun/@chanx-js+client@2.3.2+a3a949af4499b2f6/node_modules/@chanx-js/client/dist/controller-ydLgWB7k.mjs
1
+ // ../../../node_modules/.bun/@chanx-js+client@2.3.2+a3a949af4499b2f6/node_modules/@chanx-js/client/dist/controller-ydLgWB7k.mjs
2
2
  var ENVELOPE_FIELDS = [
3
3
  "version",
4
4
  "topic",
@@ -1035,7 +1035,7 @@ function createClient(options = {}) {
1035
1035
  };
1036
1036
  }
1037
1037
 
1038
- // node_modules/.bun/@chanx-js+client@2.3.2+a3a949af4499b2f6/node_modules/@chanx-js/client/dist/index.mjs
1038
+ // ../../../node_modules/.bun/@chanx-js+client@2.3.2+a3a949af4499b2f6/node_modules/@chanx-js/client/dist/index.mjs
1039
1039
  function defineChannel() {
1040
1040
  return (spec) => ({
1041
1041
  kind: "channel",
@@ -1047,7 +1047,7 @@ function defineChannel() {
1047
1047
  });
1048
1048
  }
1049
1049
 
1050
- // node_modules/.bun/pynect@0.8.17+ced0be74735a1623/node_modules/pynect/dist/client.js
1050
+ // ../../../node_modules/.bun/pynect@1.0.0+ced0be74735a1623/node_modules/pynect/dist/client.js
1051
1051
  function createPynectClient(options = {}) {
1052
1052
  const client = createClient(options);
1053
1053
  return {
@@ -1144,7 +1144,7 @@ function createResponseStream(connection) {
1144
1144
  };
1145
1145
  return stream;
1146
1146
  }
1147
- // packages/js/client/src/_generated/channels.ts
1147
+ // src/_generated/channels.ts
1148
1148
  var modelsChannel = defineChannel()({
1149
1149
  name: "models",
1150
1150
  address: "/ws/models"
@@ -1153,7 +1153,7 @@ var models = Object.assign(modelsChannel, {
1153
1153
  streamActions: ["stream_models"]
1154
1154
  });
1155
1155
 
1156
- // packages/js/client/src/client.ts
1156
+ // src/client.ts
1157
1157
  function createCatalogClientFromOptions(options) {
1158
1158
  const connection = createPynectClient(options).connect(models);
1159
1159
  return {
@@ -1196,7 +1196,7 @@ function createCatalogClientFromOptions(options) {
1196
1196
  };
1197
1197
  }
1198
1198
 
1199
- // packages/js/client/src/browser.ts
1199
+ // src/browser.ts
1200
1200
  function createCatalogClient(options) {
1201
1201
  return createCatalogClientFromOptions(options);
1202
1202
  }
@@ -1204,4 +1204,4 @@ export {
1204
1204
  createCatalogClient
1205
1205
  };
1206
1206
 
1207
- //# debugId=8956481CC65742DA64756E2164756E21
1207
+ //# debugId=4D61C2117733156364756E2164756E21
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../node_modules/.bun/@chanx-js+client@2.3.2+a3a949af4499b2f6/node_modules/@chanx-js/client/dist/controller-ydLgWB7k.mjs", "../../../../node_modules/.bun/@chanx-js+client@2.3.2+a3a949af4499b2f6/node_modules/@chanx-js/client/dist/index.mjs", "../../../../node_modules/.bun/pynect@0.8.17+ced0be74735a1623/node_modules/pynect/dist/client.js", "../src/_generated/channels.ts", "../src/client.ts", "../src/browser.ts"],
3
+ "sources": ["../../../../node_modules/.bun/@chanx-js+client@2.3.2+a3a949af4499b2f6/node_modules/@chanx-js/client/dist/controller-ydLgWB7k.mjs", "../../../../node_modules/.bun/@chanx-js+client@2.3.2+a3a949af4499b2f6/node_modules/@chanx-js/client/dist/index.mjs", "../../../../node_modules/.bun/pynect@1.0.0+ced0be74735a1623/node_modules/pynect/dist/client.js", "../src/_generated/channels.ts", "../src/client.ts", "../src/browser.ts"],
4
4
  "sourcesContent": [
5
5
  "//#region ../protocol/src/envelope.ts\nconst ENVELOPE_VERSION = 1;\n/** Reserved frame keys that carry routing rather than message content. */\nconst ENVELOPE_FIELDS = [\n\t\"version\",\n\t\"topic\",\n\t\"ref\",\n\t\"seq\"\n];\n/** Frames the runtime absorbs: they signal handling finished, not a message. */\nconst COMPLETE_ACTIONS = [\n\t\"complete\",\n\t\"event_complete\",\n\t\"group_complete\"\n];\n/** Subscription acks. Answers to a subscribe/unsubscribe request, not a topic's message. */\nconst SUBSCRIPTION_ACTIONS = [\"subscribed\", \"unsubscribed\"];\nconst ERROR_ACTION = \"error\";\nconst ABSORBED = /* @__PURE__ */ new Set([\n\t...COMPLETE_ACTIONS,\n\t...SUBSCRIPTION_ACTIONS,\n\tERROR_ACTION\n]);\n/** Whether the runtime handles this action itself rather than passing it to user code. */\nfunction isFrameworkAction(action) {\n\treturn ABSORBED.has(action);\n}\n/** Drop reserved keys so the rest validates as a plain chanx message. */\nfunction stripEnvelope(frame) {\n\tconst message = {};\n\tfor (const key of Object.keys(frame)) if (!ENVELOPE_FIELDS.includes(key)) message[key] = frame[key];\n\treturn message;\n}\n/** The envelope fields a frame carries, for handlers that need `seq` or `ref`. */\nfunction envelopeOf(frame) {\n\tconst envelope = {};\n\tfor (const key of ENVELOPE_FIELDS) if (frame[key] !== void 0) envelope[key] = frame[key];\n\treturn envelope;\n}\nfunction withEnvelope(message, envelope) {\n\tconst frame = {\n\t\tversion: 1,\n\t\t...stripEnvelope(message)\n\t};\n\tif (envelope.topic !== void 0) frame.topic = envelope.topic;\n\tif (envelope.ref !== void 0) frame.ref = envelope.ref;\n\tif (envelope.seq !== void 0) frame.seq = envelope.seq;\n\treturn frame;\n}\n//#endregion\n//#region ../protocol/src/pattern.ts\nconst PLACEHOLDER = /\\{(\\w+)\\}/g;\n/**\n* Fill a pattern's `{placeholder}`s.\n*\n* Pass `encode` for URLs; topic strings stay raw because the server compares them verbatim.\n*/\nfunction formatPattern(pattern, params = {}, encode = (value) => value) {\n\treturn pattern.replace(PLACEHOLDER, (_match, name) => {\n\t\tconst value = params[name];\n\t\tif (value === void 0) throw new Error(`Missing parameter \"${name}\" for pattern \"${pattern}\"`);\n\t\treturn encode(String(value));\n\t});\n}\n//#endregion\n//#region src/core/report.ts\n/**\n* Surface an error from user code without unwinding the caller.\n*\n* Listeners run in a loop over every consumer of a shared socket, so a throw must not\n* skip the ones after it. This is how `EventTarget` treats a throwing listener: the\n* error reaches `reportError` (the console and `window.onerror` in a browser), or is\n* rethrown on a fresh task where `reportError` does not exist, as in Node.\n*/\nfunction reportError(error) {\n\tconst report = globalThis.reportError;\n\tif (typeof report === \"function\") {\n\t\treport(error);\n\t\treturn;\n\t}\n\tqueueMicrotask(() => {\n\t\tthrow error;\n\t});\n}\n/** Call a listener, reporting rather than propagating what it throws. */\nfunction safely(listener, ...args) {\n\ttry {\n\t\tlistener(...args);\n\t} catch (error) {\n\t\treportError(error);\n\t}\n}\n//#endregion\n//#region src/core/emitter.ts\n/** Routes messages to handlers registered per `action`, with catch-alls. */\nvar ActionEmitter = class {\n\tbyAction = /* @__PURE__ */ new Map();\n\tanyHandlers = /* @__PURE__ */ new Set();\n\tunhandledHandlers = /* @__PURE__ */ new Set();\n\ton(action, handler) {\n\t\tlet handlers = this.byAction.get(action);\n\t\tif (!handlers) {\n\t\t\thandlers = /* @__PURE__ */ new Set();\n\t\t\tthis.byAction.set(action, handlers);\n\t\t}\n\t\thandlers.add(handler);\n\t\treturn () => {\n\t\t\thandlers.delete(handler);\n\t\t\tif (handlers.size === 0) this.byAction.delete(action);\n\t\t};\n\t}\n\tonAny(handler) {\n\t\tthis.anyHandlers.add(handler);\n\t\treturn () => this.anyHandlers.delete(handler);\n\t}\n\t/** Called for messages no `on(action)` handler claimed. */\n\tonUnhandled(handler) {\n\t\tthis.unhandledHandlers.add(handler);\n\t\treturn () => this.unhandledHandlers.delete(handler);\n\t}\n\temit(message, envelope = {}) {\n\t\tconst handlers = this.byAction.get(message.action);\n\t\tif (handlers) for (const handler of [...handlers]) safely(handler, message, envelope);\n\t\tfor (const handler of [...this.anyHandlers]) safely(handler, message, envelope);\n\t\tconst claimed = Boolean(handlers?.size) || this.anyHandlers.size > 0;\n\t\tif (!claimed) for (const handler of [...this.unhandledHandlers]) safely(handler, message, envelope);\n\t\treturn claimed;\n\t}\n\tclear() {\n\t\tthis.byAction.clear();\n\t\tthis.anyHandlers.clear();\n\t\tthis.unhandledHandlers.clear();\n\t}\n};\n//#endregion\n//#region src/core/stream.ts\nconst DEFAULT_LIMIT = 1024;\n/**\n* Turn a callback subscription into something `for await` can consume.\n*\n* The natural shape for a script: no framework, no handler registration, just a loop\n* that ends when the connection closes or the caller aborts.\n*/\nfunction createMessageStream(subscribe, options = {}) {\n\tconst limit = options.limit ?? DEFAULT_LIMIT;\n\tconst queue = [];\n\tconst waiting = [];\n\tlet finished = false;\n\tconst unsubscribe = subscribe((message) => {\n\t\tif (finished) return;\n\t\tconst next = waiting.shift();\n\t\tif (next) {\n\t\t\tnext({\n\t\t\t\tvalue: message,\n\t\t\t\tdone: false\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tqueue.push(message);\n\t\tif (queue.length > limit) queue.shift();\n\t});\n\tconst close = () => {\n\t\tif (finished) return;\n\t\tfinished = true;\n\t\tunsubscribe();\n\t\toptions.signal?.removeEventListener(\"abort\", close);\n\t\twhile (waiting.length > 0) waiting.shift()?.({\n\t\t\tvalue: void 0,\n\t\t\tdone: true\n\t\t});\n\t};\n\tif (options.signal) {\n\t\tif (options.signal.aborted) close();\n\t\telse options.signal.addEventListener(\"abort\", close, { once: true });\n\t}\n\tconst stream = {\n\t\tnext() {\n\t\t\tconst queued = queue.shift();\n\t\t\tif (queued !== void 0) return Promise.resolve({\n\t\t\t\tvalue: queued,\n\t\t\t\tdone: false\n\t\t\t});\n\t\t\tif (finished) return Promise.resolve({\n\t\t\t\tvalue: void 0,\n\t\t\t\tdone: true\n\t\t\t});\n\t\t\treturn new Promise((resolve) => waiting.push(resolve));\n\t\t},\n\t\treturn() {\n\t\t\tclose();\n\t\t\treturn Promise.resolve({\n\t\t\t\tvalue: void 0,\n\t\t\t\tdone: true\n\t\t\t});\n\t\t},\n\t\tclose,\n\t\tget pending() {\n\t\t\treturn queue.length;\n\t\t},\n\t\t[Symbol.asyncIterator]() {\n\t\t\treturn stream;\n\t\t}\n\t};\n\treturn stream;\n}\n/**\n* A stream its owner can end, and that leaves `streams` by itself once closed, so a\n* long-lived owner does not collect finished streams.\n*/\nfunction trackStream(streams, subscribe, options = {}) {\n\tconst entry = { ended: false };\n\tconst stream = createMessageStream((handler) => {\n\t\tconst unsubscribe = subscribe(handler);\n\t\treturn () => {\n\t\t\tentry.ended = true;\n\t\t\tunsubscribe();\n\t\t\tif (entry.stream) streams.delete(entry.stream);\n\t\t};\n\t}, options);\n\tentry.stream = stream;\n\tif (!entry.ended) streams.add(stream);\n\treturn stream;\n}\n/** Resolve with the first message a subscription delivers, or reject on timeout. */\nfunction firstMessage(subscribe, options = {}) {\n\treturn new Promise((resolve, reject) => {\n\t\tlet settled = false;\n\t\tlet timer;\n\t\tconst finish = () => {\n\t\t\tsettled = true;\n\t\t\tif (timer) clearTimeout(timer);\n\t\t\toptions.signal?.removeEventListener(\"abort\", onAbort);\n\t\t\tunsubscribe();\n\t\t};\n\t\tconst onAbort = () => {\n\t\t\tif (settled) return;\n\t\t\tfinish();\n\t\t\treject(/* @__PURE__ */ new Error(`Aborted while waiting for ${options.label ?? \"a message\"}`));\n\t\t};\n\t\tconst unsubscribe = subscribe((message) => {\n\t\t\tif (settled) return;\n\t\t\tfinish();\n\t\t\tresolve(message);\n\t\t});\n\t\tif (options.timeout !== void 0) timer = setTimeout(() => {\n\t\t\tif (settled) return;\n\t\t\tfinish();\n\t\t\treject(/* @__PURE__ */ new Error(`Timed out after ${options.timeout}ms waiting for ${options.label ?? \"a message\"}`));\n\t\t}, options.timeout);\n\t\tif (options.signal?.aborted) onAbort();\n\t\telse options.signal?.addEventListener(\"abort\", onAbort, { once: true });\n\t});\n}\n//#endregion\n//#region src/core/topic.ts\n/**\n* A typed view of one topic on a shared connection.\n*\n* Mirrors chanx's `BaseTopicHandle`: the topic string travels on the envelope, so\n* several handles multiplex over the single socket their channel opened.\n*/\nvar TopicHandle = class {\n\thost;\n\ttopic;\n\tisSubscribed = false;\n\t/**\n\t* Set by an explicit `unsubscribe()`. On a shared socket the server subscription may\n\t* outlive it for another consumer, so frames keep arriving; this handle must stop\n\t* delivering them regardless.\n\t*/\n\tmuted = false;\n\tsubscribedListeners = /* @__PURE__ */ new Set();\n\tsubscribeErrorListeners = /* @__PURE__ */ new Set();\n\tstreams = /* @__PURE__ */ new Set();\n\t/**\n\t* Whether the server has confirmed this subscription on the current socket and it has\n\t* not since been dropped by `unsubscribe`, release, or the socket being terminated.\n\t*/\n\tget subscribed() {\n\t\treturn this.isSubscribed;\n\t}\n\tset subscribed(value) {\n\t\tif (this.isSubscribed === value) return;\n\t\tthis.isSubscribed = value;\n\t\tfor (const listener of [...this.subscribedListeners]) safely(listener, value);\n\t}\n\t/** Follow `subscribed` as it changes, so view state cannot drift from it. */\n\tonSubscribedChange(listener) {\n\t\tthis.subscribedListeners.add(listener);\n\t\treturn () => this.subscribedListeners.delete(listener);\n\t}\n\t/**\n\t* Every failed subscribe, including the automatic resubscribe after a reconnect,\n\t* which has no caller to reject.\n\t*/\n\tonSubscribeError(listener) {\n\t\tthis.subscribeErrorListeners.add(listener);\n\t\treturn () => this.subscribeErrorListeners.delete(listener);\n\t}\n\temitter = new ActionEmitter();\n\tvalidateInbound;\n\tvalidateOutbound;\n\tconstructor(host, ref, validate) {\n\t\tthis.host = host;\n\t\tconst descriptor = ref.descriptor;\n\t\tthis.topic = ref.topic;\n\t\tthis.validateInbound = validate.inbound ? descriptor.validators?.toClient : void 0;\n\t\tthis.validateOutbound = validate.outbound ? descriptor.validators?.toServer : void 0;\n\t}\n\tasync subscribe(options = {}) {\n\t\tthis.muted = false;\n\t\tlet reply;\n\t\ttry {\n\t\t\treply = await this.host.requestTopic(this.topic, {\n\t\t\t\taction: \"subscribe\",\n\t\t\t\tpayload: null\n\t\t\t}, options.timeout);\n\t\t} catch (error) {\n\t\t\tif (this.subscribed) {\n\t\t\t\tthis.subscribed = false;\n\t\t\t\tthis.host.releaseSubscription(this.topic);\n\t\t\t}\n\t\t\tfor (const listener of [...this.subscribeErrorListeners]) safely(listener, error);\n\t\t\tthrow error;\n\t\t}\n\t\tif (!this.subscribed) {\n\t\t\tthis.subscribed = true;\n\t\t\tthis.host.claimSubscription(this.topic);\n\t\t}\n\t\treturn reply;\n\t}\n\t/**\n\t* Stop receiving this topic on this handle.\n\t*\n\t* Other consumers of the same socket are unaffected: the server is only told to\n\t* unsubscribe once no handle on the socket still holds the topic. Within one\n\t* connection, `topic()` hands every caller the same handle, so this stops it for all of\n\t* them; use `release()` to drop just one caller's claim.\n\t*/\n\tasync unsubscribe(options = {}) {\n\t\tconst acknowledged = { action: \"unsubscribed\" };\n\t\tthis.muted = true;\n\t\tif (!this.subscribed) return acknowledged;\n\t\tthis.subscribed = false;\n\t\tif (!this.host.releaseSubscription(this.topic)) return acknowledged;\n\t\treturn this.host.requestTopic(this.topic, {\n\t\t\taction: \"unsubscribe\",\n\t\t\tpayload: null\n\t\t}, options.timeout);\n\t}\n\tsend(message) {\n\t\tthis.validateOutbound?.(message);\n\t\tthis.host.sendTopic(this.topic, message);\n\t}\n\t/** Send and wait for the frame carrying the same `ref`, typed by the action sent. */\n\trequest(message, options = {}) {\n\t\tthis.validateOutbound?.(message);\n\t\treturn this.host.requestTopic(this.topic, message, options.timeout);\n\t}\n\t/** `envelope.seq` orders a topic's events, e.g. a replay overlapping live ones. */\n\ton(action, handler) {\n\t\treturn this.emitter.on(action, handler);\n\t}\n\tonAny(handler) {\n\t\treturn this.emitter.onAny(handler);\n\t}\n\tonUnhandled(handler) {\n\t\treturn this.emitter.onUnhandled(handler);\n\t}\n\t/** Resolve with the next message on this topic carrying this action. */\n\tonce(action, options = {}) {\n\t\treturn firstMessage((handler) => this.on(action, handler), {\n\t\t\t...options,\n\t\t\tlabel: `action \"${action}\" on topic \"${this.topic}\"`\n\t\t});\n\t}\n\t/**\n\t* Iterate this topic's messages with `for await`. Ends when the last consumer\n\t* releases the topic, the connection closes, or the socket is terminated.\n\t*/\n\tstream(options = {}) {\n\t\treturn trackStream(this.streams, (handler) => this.emitter.onAny(handler), options);\n\t}\n\t[Symbol.asyncIterator]() {\n\t\treturn this.stream();\n\t}\n\t/**\n\t* Drop one consumer's claim. Handlers registered through `on()` are torn down by the\n\t* disposer it returned, not here: this handle may still be serving other consumers.\n\t* Each `connection.topic()` call must be matched by exactly one `release()`.\n\t*/\n\trelease() {\n\t\tthis.host.releaseTopic(this.topic);\n\t}\n\t/** @internal Called by the connection once the last consumer has released. */\n\tclearHandlers() {\n\t\tthis.endStreams();\n\t\tthis.emitter.clear();\n\t\tthis.subscribedListeners.clear();\n\t\tthis.subscribeErrorListeners.clear();\n\t}\n\t/** @internal End open streams, so no `for await` waits on a topic that is gone. */\n\tendStreams() {\n\t\tfor (const stream of [...this.streams]) stream.close();\n\t}\n\t/** @internal */\n\tdispatch(frame) {\n\t\tif (this.muted) return;\n\t\tconst message = stripEnvelope(frame);\n\t\tif (isFrameworkAction(message.action)) return;\n\t\ttry {\n\t\t\tthis.validateInbound?.(message);\n\t\t} catch (error) {\n\t\t\treportError(error);\n\t\t\treturn;\n\t\t}\n\t\tthis.emitter.emit(message, envelopeOf(frame));\n\t}\n};\n//#endregion\n//#region src/core/connection.ts\nconst DEFAULT_REQUEST_TIMEOUT = 1e4;\n/**\n* Connections sharing a socket must not share ref numbers, or one consumer's reply would\n* resolve another's request. Each connection prefixes its refs with its own id.\n*/\nlet connectionCounter = 0;\n/**\n* A typed channel riding a shared socket.\n*\n* Routes each inbound frame exactly once: a pending request claims it by `ref`, else a\n* topic claims it by `topic`, else it belongs to the channel itself. Framework frames\n* (`complete`, `subscribed`, `error`) are absorbed here so they never reach user code.\n*/\nvar ChannelConnection = class {\n\tsocket;\n\tdescriptor;\n\tvalidate;\n\temitter = new ActionEmitter();\n\terrorHandlers = /* @__PURE__ */ new Set();\n\tcompleteHandlers = /* @__PURE__ */ new Set();\n\ttopics = /* @__PURE__ */ new Map();\n\tpending = /* @__PURE__ */ new Map();\n\tunsubscribers = [];\n\tstreams = /* @__PURE__ */ new Set();\n\tvalidateInbound;\n\tvalidateOutbound;\n\trefPrefix = `${connectionCounter += 1}.`;\n\trefCounter = 0;\n\tclosed = false;\n\tconstructor(socket, descriptor, validate) {\n\t\tthis.socket = socket;\n\t\tthis.descriptor = descriptor;\n\t\tthis.validate = validate;\n\t\tthis.validateInbound = validate.inbound ? descriptor.validators?.toClient : void 0;\n\t\tthis.validateOutbound = validate.outbound ? descriptor.validators?.toServer : void 0;\n\t\tthis.unsubscribers.push(socket.onFrame((frame) => this.route(frame)));\n\t\tthis.unsubscribers.push(socket.onOpen(() => void this.resubscribe()));\n\t\tthis.unsubscribers.push(socket.onTerminate(() => this.handleTerminated()));\n\t\tthis.unsubscribers.push(socket.onStatus((status) => {\n\t\t\tif (status === \"closed\") this.endStreams();\n\t\t}));\n\t}\n\tget status() {\n\t\treturn this.socket.status;\n\t}\n\tget url() {\n\t\treturn this.socket.url;\n\t}\n\tonStatus(handler) {\n\t\treturn this.socket.onStatus(handler);\n\t}\n\t/**\n\t* Resolve once the socket is open; reject once it has given up, after its reconnect\n\t* attempts, or was refused or terminated.\n\t*\n\t* Sends are queued until then, so this is only needed when a script wants to fail\n\t* fast on an unreachable server rather than buffer.\n\t*/\n\tready(options = {}) {\n\t\tconst failed = () => /* @__PURE__ */ new Error(`Channel \"${this.descriptor.name}\" closed before it opened`);\n\t\tif (this.socket.status === \"open\") return Promise.resolve();\n\t\tif (this.socket.status === \"closed\") return Promise.reject(failed());\n\t\treturn firstMessage((handler) => this.socket.onStatus((status) => {\n\t\t\tif (status === \"open\" || status === \"closed\") handler(status);\n\t\t}), {\n\t\t\t...options,\n\t\t\tlabel: `channel \"${this.descriptor.name}\" to open`\n\t\t}).then((status) => {\n\t\t\tif (status === \"closed\") throw failed();\n\t\t});\n\t}\n\t/** Resolve with the next message carrying this action. */\n\tonce(action, options = {}) {\n\t\treturn firstMessage((handler) => this.on(action, handler), {\n\t\t\t...options,\n\t\t\tlabel: `action \"${action}\"`\n\t\t});\n\t}\n\t/**\n\t* Iterate messages with `for await`. Ends when the connection closes or the signal\n\t* aborts.\n\t*/\n\tstream(options = {}) {\n\t\treturn trackStream(this.streams, (handler) => this.emitter.onAny(handler), options);\n\t}\n\t[Symbol.asyncIterator]() {\n\t\treturn this.stream();\n\t}\n\t/** `envelope` holds the frame's routing fields, such as a broadcast's `seq`. */\n\ton(action, handler) {\n\t\treturn this.emitter.on(action, handler);\n\t}\n\tonAny(handler) {\n\t\treturn this.emitter.onAny(handler);\n\t}\n\t/** Messages that arrived with no handler for their action. */\n\tonUnhandled(handler) {\n\t\treturn this.emitter.onUnhandled(handler);\n\t}\n\t/** Server-side `error` frames, which chanx sends in place of the expected reply. */\n\tonError(handler) {\n\t\tthis.errorHandlers.add(handler);\n\t\treturn () => this.errorHandlers.delete(handler);\n\t}\n\t/** `complete` / `event_complete` / `group_complete`, if the server sends them. */\n\tonComplete(handler) {\n\t\tthis.completeHandlers.add(handler);\n\t\treturn () => this.completeHandlers.delete(handler);\n\t}\n\t/** Throws when outbound validation rejects the message: that is a caller bug. */\n\tsend(message) {\n\t\tthis.validateOutbound?.(message);\n\t\tthis.socket.send(withEnvelope(message, {}));\n\t}\n\t/**\n\t* Send and wait for the frame carrying the same `ref`.\n\t*\n\t* Resolves on the first matching frame. Needs chanx 2.11.2+, the first release to\n\t* echo the ref on replies to untopiced frames; earlier servers time out here.\n\t*/\n\trequest(message, options = {}) {\n\t\tthis.validateOutbound?.(message);\n\t\treturn this.dispatchRequest(message, void 0, options.timeout);\n\t}\n\t/**\n\t* Take a handle on a topic: `connection.topic(roomTopic.with({ room_name: 'lobby' }))`.\n\t* Handles are shared per resolved topic string and reference counted, so two\n\t* components wanting `room:lobby` get one subscription.\n\t*/\n\ttopic(ref) {\n\t\tconst existing = this.topics.get(ref.topic);\n\t\tif (existing) {\n\t\t\texisting.refs += 1;\n\t\t\treturn existing.handle;\n\t\t}\n\t\tconst handle = new TopicHandle(this, ref, this.validate);\n\t\tthis.topics.set(ref.topic, {\n\t\t\thandle,\n\t\t\trefs: 1\n\t\t});\n\t\treturn handle;\n\t}\n\t/** @internal TopicHost */\n\tsendTopic(topic, message) {\n\t\tthis.socket.send(withEnvelope(message, { topic }));\n\t}\n\t/** @internal TopicHost */\n\trequestTopic(topic, message, timeout) {\n\t\treturn this.dispatchRequest(message, topic, timeout);\n\t}\n\t/** @internal TopicHost */\n\treleaseTopic(topic) {\n\t\tconst entry = this.topics.get(topic);\n\t\tif (!entry) return;\n\t\tentry.refs -= 1;\n\t\tif (entry.refs > 0) return;\n\t\tthis.topics.delete(topic);\n\t\tthis.dropSubscription(entry.handle);\n\t\tentry.handle.clearHandlers();\n\t}\n\t/** @internal TopicHost */\n\tclaimSubscription(topic) {\n\t\tthis.socket.claimTopic(topic);\n\t}\n\t/** @internal TopicHost */\n\treleaseSubscription(topic) {\n\t\treturn this.socket.releaseTopic(topic);\n\t}\n\t/** Give up a handle's subscription, telling the server only if nobody else holds it. */\n\tdropSubscription(handle) {\n\t\tif (!handle.subscribed) return;\n\t\thandle.subscribed = false;\n\t\tif (this.socket.releaseTopic(handle.topic) && this.socket.status === \"open\") this.sendTopic(handle.topic, {\n\t\t\taction: \"unsubscribe\",\n\t\t\tpayload: null\n\t\t});\n\t}\n\t/**\n\t* Close the socket for every consumer sharing it, not just this one.\n\t*\n\t* `close()` gives up this consumer's claim and leaves the socket to the others;\n\t* this ends it outright, e.g. on logout or when the server-side identity changed.\n\t* The next `connect()` to the same URL opens a fresh socket.\n\t*/\n\tterminate(code = 1e3, reason = \"\") {\n\t\tthis.socket.terminate(code, reason);\n\t}\n\tclose() {\n\t\tif (this.closed) return;\n\t\tthis.closed = true;\n\t\tfor (const { reject, timer } of this.pending.values()) {\n\t\t\tclearTimeout(timer);\n\t\t\treject(/* @__PURE__ */ new Error(\"Connection closed before the reply arrived\"));\n\t\t}\n\t\tthis.pending.clear();\n\t\tfor (const { handle } of this.topics.values()) {\n\t\t\tthis.dropSubscription(handle);\n\t\t\thandle.clearHandlers();\n\t\t}\n\t\tthis.topics.clear();\n\t\tfor (const stream of [...this.streams]) stream.close();\n\t\tthis.emitter.clear();\n\t\tthis.errorHandlers.clear();\n\t\tthis.completeHandlers.clear();\n\t\tfor (const unsubscribe of this.unsubscribers) unsubscribe();\n\t\tthis.socket.release();\n\t}\n\tdispatchRequest(message, topic, timeout = DEFAULT_REQUEST_TIMEOUT) {\n\t\tthis.refCounter += 1;\n\t\tconst ref = `${this.refPrefix}${this.refCounter}`;\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst timer = setTimeout(() => {\n\t\t\t\tthis.pending.delete(ref);\n\t\t\t\tconst target = topic ? `topic \"${topic}\"` : `channel \"${this.descriptor.name}\"`;\n\t\t\t\treject(/* @__PURE__ */ new Error(`Request on ${target} timed out after ${timeout}ms`));\n\t\t\t}, timeout);\n\t\t\tthis.pending.set(ref, {\n\t\t\t\tresolve,\n\t\t\t\treject,\n\t\t\t\ttimer\n\t\t\t});\n\t\t\tthis.socket.send(withEnvelope(message, topic === void 0 ? { ref } : {\n\t\t\t\ttopic,\n\t\t\t\tref\n\t\t\t}));\n\t\t});\n\t}\n\troute(frame) {\n\t\tconst ref = frame.ref;\n\t\tif (ref !== void 0) {\n\t\t\tconst waiter = this.pending.get(String(ref));\n\t\t\tif (waiter) {\n\t\t\t\tthis.pending.delete(String(ref));\n\t\t\t\tclearTimeout(waiter.timer);\n\t\t\t\tconst message = stripEnvelope(frame);\n\t\t\t\tif (message.action === \"error\") waiter.reject(new ChanxRequestError(message));\n\t\t\t\telse waiter.resolve(message);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!String(ref).startsWith(this.refPrefix)) return;\n\t\t}\n\t\tif (frame.topic !== void 0) {\n\t\t\tthis.topics.get(String(frame.topic))?.handle.dispatch(frame);\n\t\t\treturn;\n\t\t}\n\t\tconst message = stripEnvelope(frame);\n\t\tif (isFrameworkAction(message.action)) {\n\t\t\tthis.absorb(message);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tthis.validateInbound?.(message);\n\t\t} catch (error) {\n\t\t\treportError(error);\n\t\t\treturn;\n\t\t}\n\t\tthis.emitter.emit(message, envelopeOf(frame));\n\t}\n\tabsorb(message) {\n\t\tif (message.action === \"error\") {\n\t\t\tconst error = message;\n\t\t\tfor (const handler of [...this.errorHandlers]) safely(handler, error);\n\t\t\treturn;\n\t\t}\n\t\tif (COMPLETE_ACTIONS.includes(message.action)) for (const handler of [...this.completeHandlers]) safely(handler, message);\n\t}\n\t/** The socket was terminated under this connection: fail fast rather than hang. */\n\thandleTerminated() {\n\t\tfor (const { reject, timer } of this.pending.values()) {\n\t\t\tclearTimeout(timer);\n\t\t\treject(/* @__PURE__ */ new Error(\"Socket was terminated before the reply arrived\"));\n\t\t}\n\t\tthis.pending.clear();\n\t\tfor (const { handle } of this.topics.values()) handle.subscribed = false;\n\t\tthis.endStreams();\n\t}\n\tendStreams() {\n\t\tfor (const { handle } of this.topics.values()) handle.endStreams();\n\t\tfor (const stream of [...this.streams]) stream.close();\n\t}\n\tasync resubscribe() {\n\t\tfor (const { handle } of this.topics.values()) {\n\t\t\tif (!handle.subscribed) continue;\n\t\t\ttry {\n\t\t\t\tawait handle.subscribe();\n\t\t\t} catch {}\n\t\t}\n\t}\n};\n/** Thrown from `request()` when the server answered with an `error` frame. */\nvar ChanxRequestError = class extends Error {\n\tframe;\n\tconstructor(frame) {\n\t\tsuper(`chanx error: ${JSON.stringify(frame.payload)}`);\n\t\tthis.name = \"ChanxRequestError\";\n\t\tthis.frame = frame;\n\t}\n};\n//#endregion\n//#region src/core/socket.ts\nconst DEFAULTS = {\n\treconnectAttempts: 10,\n\treconnectInterval: (attempt) => Math.min(1e3 * 2 ** attempt, 3e4),\n\tmaxQueuedFrames: 100,\n\tcloseDelay: 100,\n\theartbeatInterval: 25e3,\n\theartbeatTimeout: 1e4\n};\nconst reconnectUnlessRefused = ({ code }) => code === void 0 || code < 4400 || code >= 4500;\nconst defaultFactory = (url, protocols, options) => {\n\tif (typeof WebSocket === \"undefined\") throw new Error(\"No global WebSocket. Pass `socketFactory` when running outside a browser.\");\n\tif (!options) return new WebSocket(url, protocols);\n\tif (\"document\" in globalThis) throw new Error(\"A browser WebSocket cannot send headers: put credentials in queryParams.\");\n\tconst init = {\n\t\theaders: options.headers,\n\t\tprotocols\n\t};\n\treturn new WebSocket(url, init);\n};\n/**\n* One WebSocket, shared by every consumer that resolved the same URL.\n*\n* Owns reconnection, the heartbeat and the pre-open send queue. It knows nothing about\n* channels or topics; it moves frames and reports status.\n*/\nvar SharedSocket = class {\n\toptions;\n\tonDispose;\n\turl;\n\tstatus = \"connecting\";\n\tsocket = null;\n\trefs = 0;\n\tattempt = 0;\n\tclosedByUs = false;\n\tqueue = [];\n\t/** Subscribed handles per topic, across every connection sharing this socket. */\n\ttopicClaims = /* @__PURE__ */ new Map();\n\tframeListeners = /* @__PURE__ */ new Set();\n\tstatusListeners = /* @__PURE__ */ new Set();\n\topenListeners = /* @__PURE__ */ new Set();\n\trawListeners = /* @__PURE__ */ new Set();\n\tterminateListeners = /* @__PURE__ */ new Set();\n\tdisposed = false;\n\treconnectTimer = null;\n\tcloseTimer = null;\n\theartbeatTimer = null;\n\tlivenessTimer = null;\n\tconstructor(url, options, onDispose) {\n\t\tthis.options = options;\n\t\tthis.onDispose = onDispose;\n\t\tthis.url = url;\n\t}\n\tretain() {\n\t\tthis.refs += 1;\n\t\tif (this.closeTimer) {\n\t\t\tclearTimeout(this.closeTimer);\n\t\t\tthis.closeTimer = null;\n\t\t}\n\t\tif (this.status === \"closed\" && !this.disposed) {\n\t\t\tthis.attempt = 0;\n\t\t\tthis.open();\n\t\t}\n\t}\n\trelease() {\n\t\tif (this.disposed || this.refs === 0) return;\n\t\tthis.refs -= 1;\n\t\tif (this.refs > 0) return;\n\t\tconst delay = this.options.closeDelay ?? DEFAULTS.closeDelay;\n\t\tthis.closeTimer = setTimeout(() => {\n\t\t\tif (this.refs === 0) this.destroy();\n\t\t}, delay);\n\t}\n\tonFrame(listener) {\n\t\tthis.frameListeners.add(listener);\n\t\treturn () => this.frameListeners.delete(listener);\n\t}\n\tonStatus(listener) {\n\t\tthis.statusListeners.add(listener);\n\t\treturn () => this.statusListeners.delete(listener);\n\t}\n\t/** Fires on every open, including reconnects, which is where topics resubscribe. */\n\tonOpen(listener) {\n\t\tthis.openListeners.add(listener);\n\t\treturn () => this.openListeners.delete(listener);\n\t}\n\t/**\n\t* Fires when the socket is torn down for good: `terminate()`, or the last consumer\n\t* leaving. Connections still attached at that point were cut off by a terminate.\n\t*/\n\tonTerminate(listener) {\n\t\tthis.terminateListeners.add(listener);\n\t\treturn () => this.terminateListeners.delete(listener);\n\t}\n\t/**\n\t* Close the socket for every consumer at once, regardless of how many still hold it.\n\t*\n\t* It does not reconnect, and it leaves the registry so the next `connect()` to this\n\t* URL opens a fresh socket. Consumers still attached see `closed`, have pending\n\t* requests rejected and open streams ended.\n\t*/\n\tterminate(code = 1e3, reason = \"\") {\n\t\tthis.destroy(code, reason);\n\t}\n\t/** Non-JSON payloads, which chanx never sends but a proxy might. */\n\tonRaw(listener) {\n\t\tthis.rawListeners.add(listener);\n\t\treturn () => this.rawListeners.delete(listener);\n\t}\n\t/** Record that one more handle on this socket holds a subscription to `topic`. */\n\tclaimTopic(topic) {\n\t\tthis.topicClaims.set(topic, (this.topicClaims.get(topic) ?? 0) + 1);\n\t}\n\t/**\n\t* Drop one claim. Returns true when it was the last, meaning the server should be\n\t* told to unsubscribe. The server tracks subscriptions per socket, so an earlier\n\t* unsubscribe would cut off every other consumer of the topic too.\n\t*/\n\treleaseTopic(topic) {\n\t\tconst claims = (this.topicClaims.get(topic) ?? 0) - 1;\n\t\tif (claims > 0) {\n\t\t\tthis.topicClaims.set(topic, claims);\n\t\t\treturn false;\n\t\t}\n\t\tthis.topicClaims.delete(topic);\n\t\treturn true;\n\t}\n\tsend(frame) {\n\t\tif (this.disposed) return;\n\t\tconst data = JSON.stringify(frame);\n\t\tif (this.socket && this.status === \"open\") {\n\t\t\tthis.socket.send(data);\n\t\t\treturn;\n\t\t}\n\t\tconst max = this.options.maxQueuedFrames ?? DEFAULTS.maxQueuedFrames;\n\t\tif (this.queue.length >= max) this.queue.shift();\n\t\tthis.queue.push(data);\n\t}\n\topen() {\n\t\tif (this.disposed) return;\n\t\tthis.closedByUs = false;\n\t\tthis.setStatus(this.attempt === 0 ? \"connecting\" : \"reconnecting\");\n\t\tconst factory = this.options.socketFactory ?? defaultFactory;\n\t\tlet socket;\n\t\ttry {\n\t\t\tconst { headers } = this.options;\n\t\t\tsocket = headers ? factory(this.url, this.options.protocols, { headers }) : factory(this.url, this.options.protocols);\n\t\t} catch (error) {\n\t\t\treportError(error);\n\t\t\tthis.scheduleReconnect({\n\t\t\t\tcode: 1006,\n\t\t\t\treason: \"factory threw\"\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tthis.socket = socket;\n\t\tconst current = () => this.socket === socket;\n\t\tsocket.onopen = () => {\n\t\t\tif (!current()) return;\n\t\t\tthis.attempt = 0;\n\t\t\tthis.setStatus(\"open\");\n\t\t\tthis.startHeartbeat();\n\t\t\tfor (const listener of [...this.openListeners]) safely(listener);\n\t\t\tconst pending = this.queue;\n\t\t\tthis.queue = [];\n\t\t\tfor (const data of pending) socket.send(data);\n\t\t};\n\t\tsocket.onmessage = (event) => {\n\t\t\tif (!current()) return;\n\t\t\tthis.noteLiveness();\n\t\t\tif (typeof event.data !== \"string\") {\n\t\t\t\tfor (const listener of [...this.rawListeners]) safely(listener, event.data);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet frame;\n\t\t\ttry {\n\t\t\t\tframe = JSON.parse(event.data);\n\t\t\t} catch {\n\t\t\t\tfor (const listener of [...this.rawListeners]) safely(listener, event.data);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfor (const listener of [...this.frameListeners]) safely(listener, frame);\n\t\t};\n\t\tsocket.onerror = () => {\n\t\t\tif (current() && this.options.retryOnError) socket.close();\n\t\t};\n\t\tsocket.onclose = (event) => {\n\t\t\tif (!current()) return;\n\t\t\tthis.stopHeartbeat();\n\t\t\tthis.socket = null;\n\t\t\tif (this.closedByUs) {\n\t\t\t\tthis.setStatus(\"closed\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.scheduleReconnect(event);\n\t\t};\n\t}\n\tscheduleReconnect(event) {\n\t\tconst shouldReconnect = this.options.shouldReconnect ?? reconnectUnlessRefused;\n\t\tconst max = this.options.reconnectAttempts ?? DEFAULTS.reconnectAttempts;\n\t\tif (this.refs === 0 || !shouldReconnect(event)) {\n\t\t\tthis.setStatus(\"closed\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.attempt >= max) {\n\t\t\tthis.setStatus(\"closed\");\n\t\t\tthis.options.onReconnectStop?.(this.attempt);\n\t\t\treturn;\n\t\t}\n\t\tconst interval = this.options.reconnectInterval ?? DEFAULTS.reconnectInterval;\n\t\tconst delay = typeof interval === \"function\" ? interval(this.attempt) : interval;\n\t\tthis.attempt += 1;\n\t\tthis.setStatus(\"reconnecting\");\n\t\tthis.reconnectTimer = setTimeout(() => this.open(), delay);\n\t}\n\tstartHeartbeat() {\n\t\tconst settings = this.options.heartbeat;\n\t\tif (!settings) return;\n\t\tconst interval = settings.interval ?? DEFAULTS.heartbeatInterval;\n\t\tconst build = settings.message ?? (() => ({\n\t\t\taction: \"ping\",\n\t\t\tpayload: null\n\t\t}));\n\t\tthis.heartbeatTimer = setInterval(() => {\n\t\t\tthis.send({\n\t\t\t\tversion: 1,\n\t\t\t\t...build()\n\t\t\t});\n\t\t\tif (!this.livenessTimer) this.armLiveness(settings.timeout ?? DEFAULTS.heartbeatTimeout);\n\t\t}, interval);\n\t}\n\t/** Any inbound frame proves the connection is alive, not just a pong. */\n\tnoteLiveness() {\n\t\tif (this.livenessTimer) {\n\t\t\tclearTimeout(this.livenessTimer);\n\t\t\tthis.livenessTimer = null;\n\t\t}\n\t}\n\tarmLiveness(timeout) {\n\t\tthis.livenessTimer = setTimeout(() => {\n\t\t\tthis.livenessTimer = null;\n\t\t\tthis.socket?.close(4e3, \"heartbeat timeout\");\n\t\t}, timeout);\n\t}\n\tstopHeartbeat() {\n\t\tif (this.heartbeatTimer) clearInterval(this.heartbeatTimer);\n\t\tif (this.livenessTimer) clearTimeout(this.livenessTimer);\n\t\tthis.heartbeatTimer = null;\n\t\tthis.livenessTimer = null;\n\t}\n\tsetStatus(status) {\n\t\tif (this.status === status) return;\n\t\tthis.status = status;\n\t\tfor (const listener of [...this.statusListeners]) safely(listener, status);\n\t}\n\tdestroy(code = 1e3, reason = \"\") {\n\t\tif (this.disposed) return;\n\t\tthis.disposed = true;\n\t\tthis.closedByUs = true;\n\t\tthis.refs = 0;\n\t\tthis.stopHeartbeat();\n\t\tif (this.reconnectTimer) clearTimeout(this.reconnectTimer);\n\t\tif (this.closeTimer) clearTimeout(this.closeTimer);\n\t\tthis.reconnectTimer = null;\n\t\tthis.closeTimer = null;\n\t\tthis.socket?.close(code, reason);\n\t\tthis.socket = null;\n\t\tthis.queue = [];\n\t\tthis.topicClaims.clear();\n\t\tthis.setStatus(\"closed\");\n\t\tfor (const listener of [...this.terminateListeners]) safely(listener);\n\t\tthis.terminateListeners.clear();\n\t\tthis.frameListeners.clear();\n\t\tthis.statusListeners.clear();\n\t\tthis.openListeners.clear();\n\t\tthis.rawListeners.clear();\n\t\tthis.onDispose();\n\t}\n};\n/**\n* Shared sockets, the same model as react-use-websocket's `sharedWebSockets`.\n* Module-global on purpose: two components asking for the same channel must land on\n* one connection.\n*/\nconst registry = /* @__PURE__ */ new Map();\nlet keyCounter = 0;\nconst factoryIds = /* @__PURE__ */ new WeakMap();\n/**\n* What makes two connections interchangeable: the URL, and what the socket is opened\n* with. Subprotocols and headers often carry credentials, so a connection must never join\n* a socket opened under different ones.\n*/\nfunction registryKey(url, options) {\n\tkeyCounter += 1;\n\tif (options.share === false) return `private:${keyCounter}`;\n\tlet factoryId = 0;\n\tif (options.socketFactory) {\n\t\tfactoryId = factoryIds.get(options.socketFactory) ?? keyCounter;\n\t\tfactoryIds.set(options.socketFactory, factoryId);\n\t}\n\treturn JSON.stringify([\n\t\turl,\n\t\toptions.protocols ?? null,\n\t\toptions.headers ?? null,\n\t\tfactoryId\n\t]);\n}\nfunction acquireSocket(url, options) {\n\tconst key = registryKey(url, options);\n\tlet socket = registry.get(key);\n\tif (!socket) {\n\t\tconst created = new SharedSocket(url, options, () => {\n\t\t\tif (registry.get(key) === created) registry.delete(key);\n\t\t});\n\t\tsocket = created;\n\t\tregistry.set(key, socket);\n\t\tsocket.retain();\n\t\tsocket.open();\n\t\treturn socket;\n\t}\n\tsocket.retain();\n\treturn socket;\n}\n/**\n* Close every socket in the process, whichever client opened it: on logout, say, when\n* nothing should stay connected. Prefer `client.closeAll()` to close only one client's.\n*/\nfunction terminateAllSockets(code = 1e3, reason = \"\") {\n\tfor (const socket of [...registry.values()]) socket.terminate(code, reason);\n}\n//#endregion\n//#region src/core/client.ts\n/** The convention bundlers replace at build time; false when nothing defines it. */\nfunction isDev() {\n\ttry {\n\t\treturn process.env.NODE_ENV !== \"production\";\n\t} catch {\n\t\treturn false;\n\t}\n}\nfunction resolveValidate(clientConfig, callConfig) {\n\tconst merged = {\n\t\t...clientConfig,\n\t\t...callConfig\n\t};\n\treturn {\n\t\toutbound: merged.outbound ?? true,\n\t\tinbound: merged.inbound ?? isDev()\n\t};\n}\nfunction buildUrl(baseUrl, address, params, queryParams) {\n\tconst path = formatPattern(address, params, encodeURIComponent);\n\tlet url;\n\tif (/^wss?:\\/\\//.test(path)) url = path;\n\telse if (baseUrl) url = `${baseUrl.replace(/\\/+$/, \"\").replace(/^http/, \"ws\")}/${path.replace(/^\\/+/, \"\")}`;\n\telse if (typeof location !== \"undefined\") url = new URL(path, location.href).toString().replace(/^http/, \"ws\");\n\telse throw new Error(\"No `baseUrl` and no `location` to resolve a relative address against\");\n\tif (queryParams && Object.keys(queryParams).length > 0) {\n\t\tconst query = new URLSearchParams(Object.entries(queryParams).map(([key, value]) => [key, String(value)]));\n\t\turl += (url.includes(\"?\") ? \"&\" : \"?\") + query.toString();\n\t}\n\treturn url;\n}\n/**\n* Decide whether a connection runs a heartbeat.\n*\n* A per-connection setting is explicit and wins. A client-wide `false` turns it off\n* everywhere, and client-wide options only tune it. Otherwise it runs exactly on channels\n* that declare ping/pong, since a chanx consumer without a ping handler answers each ping\n* with an `error` frame.\n*/\nfunction resolveHeartbeat(clientOptions, connectOptions, descriptor) {\n\tif (connectOptions.heartbeat !== void 0) return connectOptions.heartbeat;\n\tif (clientOptions.heartbeat === false) return false;\n\tif (!descriptor.heartbeat) return false;\n\treturn clientOptions.heartbeat ?? {};\n}\n/**\n* Decide whether a connection shares its socket.\n*\n* An explicit setting wins, per connection first, then client-wide. Otherwise only a\n* channel carrying topics shares: topics route each frame to the consumer that asked for\n* it, while a plain channel's shared socket is one inbox, so a reply to one consumer's\n* `send()` would reach every other consumer too.\n*/\nfunction resolveShare(clientOptions, connectOptions, descriptor) {\n\tif (connectOptions.share !== void 0) return connectOptions.share;\n\tif (clientOptions.share !== void 0) return clientOptions.share;\n\treturn Object.keys(descriptor.topics).length > 0;\n}\n/**\n* Create a client holding the connection defaults for a server.\n*\n* For a channel carrying topics, connections are shared per resolved URL: calling\n* `connect` twice with the same descriptor and params yields two independent typed views\n* onto one socket. Plain channels get a socket each unless `share` is set.\n*/\nfunction createClient(options = {}) {\n\tconst urlFor = (descriptor, connectOptions = {}) => buildUrl(options.baseUrl, descriptor.address, connectOptions.params ?? {}, {\n\t\t...options.queryParams,\n\t\t...connectOptions.queryParams\n\t});\n\tconst opened = /* @__PURE__ */ new Set();\n\treturn {\n\t\toptions,\n\t\turlFor,\n\t\tcloseAll(code = 1e3, reason = \"\") {\n\t\t\tfor (const socket of [...opened]) socket.terminate(code, reason);\n\t\t},\n\t\tconnect(descriptor, connectOptions = {}) {\n\t\t\tconst headers = options.headers || connectOptions.headers ? {\n\t\t\t\t...options.headers,\n\t\t\t\t...connectOptions.headers\n\t\t\t} : void 0;\n\t\t\tconst socketOptions = {\n\t\t\t\t...options,\n\t\t\t\t...connectOptions,\n\t\t\t\theaders,\n\t\t\t\theartbeat: resolveHeartbeat(options, connectOptions, descriptor),\n\t\t\t\tshare: resolveShare(options, connectOptions, descriptor)\n\t\t\t};\n\t\t\tconst socket = acquireSocket(urlFor(descriptor, connectOptions), socketOptions);\n\t\t\tif (!opened.has(socket)) {\n\t\t\t\topened.add(socket);\n\t\t\t\tsocket.onTerminate(() => opened.delete(socket));\n\t\t\t}\n\t\t\treturn new ChannelConnection(socket, descriptor, resolveValidate(options.validate, connectOptions.validate));\n\t\t}\n\t};\n}\n//#endregion\n//#region src/core/batch.ts\n/**\n* Coalesces frames so a token stream renders once per frame instead of once per token.\n*\n* React batches updates within a tick, but consecutive frames arrive in separate ticks,\n* so cross-tick coalescing is still needed for a high-rate action.\n*/\nvar BatchQueue = class {\n\tflushAction;\n\tpending = /* @__PURE__ */ new Map();\n\ttimers = /* @__PURE__ */ new Map();\n\tconstructor(flushAction) {\n\t\tthis.flushAction = flushAction;\n\t}\n\tpush(action, message, envelope, window) {\n\t\tconst queued = this.pending.get(action);\n\t\tif (queued) {\n\t\t\tqueued.messages.push(message);\n\t\t\tqueued.envelopes.push(envelope);\n\t\t\treturn;\n\t\t}\n\t\tthis.pending.set(action, {\n\t\t\tmessages: [message],\n\t\t\tenvelopes: [envelope]\n\t\t});\n\t\tconst flush = () => {\n\t\t\tthis.timers.delete(action);\n\t\t\tconst queued = this.pending.get(action);\n\t\t\tthis.pending.delete(action);\n\t\t\tif (queued) this.flushAction(action, queued.messages, queued.envelopes);\n\t\t};\n\t\tif (window === \"raf\" && typeof requestAnimationFrame === \"function\") this.timers.set(action, {\n\t\t\tkind: \"raf\",\n\t\t\tid: requestAnimationFrame(flush)\n\t\t});\n\t\telse {\n\t\t\tconst delay = window === \"raf\" ? 16 : window;\n\t\t\tthis.timers.set(action, {\n\t\t\t\tkind: \"timeout\",\n\t\t\t\tid: setTimeout(flush, delay)\n\t\t\t});\n\t\t}\n\t}\n\tdispose() {\n\t\tfor (const timer of this.timers.values()) if (timer.kind === \"raf\") cancelAnimationFrame(timer.id);\n\t\telse clearTimeout(timer.id);\n\t\tthis.timers.clear();\n\t\tthis.pending.clear();\n\t}\n};\n//#endregion\n//#region src/core/controller.ts\nconst CONTROLLER_KEYS = [\n\t\"enabled\",\n\t\"buffer\",\n\t\"only\",\n\t\"on\",\n\t\"onError\",\n\t\"onUnhandled\",\n\t\"topics\",\n\t\"onSubscribeError\",\n\t\"client\"\n];\n/** The options that shape the connection, without the controller's own. */\nfunction connectOptionsOf(options) {\n\tconst connect = { ...options };\n\tfor (const key of CONTROLLER_KEYS) delete connect[key];\n\treturn connect;\n}\n/**\n* Identity of the connection an options object asks for. Bindings rebuild when it\n* changes, so a new token in `queryParams` reconnects just like new `params` do.\n*/\nfunction connectionKey(options) {\n\treturn JSON.stringify([\n\t\toptions.enabled ?? true,\n\t\toptions.params ?? {},\n\t\toptions.queryParams ?? {},\n\t\toptions.headers ?? null,\n\t\toptions.protocols ?? null,\n\t\toptions.share ?? null\n\t]);\n}\nconst CLOSED_SNAPSHOT = {\n\tstatus: \"closed\",\n\tlastMessage: null,\n\tmessages: []\n};\n/**\n* Everything a framework binding needs, with no framework in it.\n*\n* Bindings adapt `subscribe`/`getSnapshot` to their own reactivity and call\n* `start`/`stop` on mount and unmount. Keeping the behaviour here means buffering,\n* filtering and batching work identically in React, Vue, Svelte and Solid, and can be\n* tested once without mounting anything.\n*/\nfunction createChannelController(client, descriptor, initialOptions = {}) {\n\tlet options = initialOptions;\n\tlet connection = null;\n\tlet disposers = [];\n\tlet queue = null;\n\tconst listeners = /* @__PURE__ */ new Set();\n\tlet snapshot = {\n\t\tstatus: initialOptions.enabled === false ? \"closed\" : \"connecting\",\n\t\tlastMessage: null,\n\t\tmessages: []\n\t};\n\tconst url = initialOptions.enabled === false ? null : client.urlFor(descriptor, connectOptionsOf(initialOptions));\n\tconst publish = (next) => {\n\t\tsnapshot = {\n\t\t\t...snapshot,\n\t\t\t...next\n\t\t};\n\t\tfor (const listener of [...listeners]) listener();\n\t};\n\tconst handle = (message, envelope) => {\n\t\tconst handler = options.on?.[message.action];\n\t\tif (typeof handler === \"function\") handler(message, envelope);\n\t\telse if (handler) queue?.push(message.action, message, envelope, handler.batch);\n\t\tconst mode = options.buffer ?? \"latest\";\n\t\tif (!(mode !== \"none\" && (!options.only || options.only.includes(message.action)))) {\n\t\t\tif (!handler) options.onUnhandled?.(message, envelope);\n\t\t\treturn;\n\t\t}\n\t\tif (mode === \"latest\") publish({ lastMessage: message });\n\t\telse publish({ messages: [...snapshot.messages, message] });\n\t};\n\treturn {\n\t\turl,\n\t\tsubscribe(listener) {\n\t\t\tlisteners.add(listener);\n\t\t\treturn () => listeners.delete(listener);\n\t\t},\n\t\tgetSnapshot: () => snapshot,\n\t\tsetOptions(next) {\n\t\t\toptions = next;\n\t\t},\n\t\tgetConnection: () => connection,\n\t\tterminate(code, reason) {\n\t\t\tconnection?.terminate(code, reason);\n\t\t},\n\t\tsend(message) {\n\t\t\tconnection?.send(message);\n\t\t},\n\t\trequest(message, requestOptions) {\n\t\t\tif (!connection) return Promise.reject(/* @__PURE__ */ new Error(\"Channel is not connected\"));\n\t\t\treturn connection.request(message, requestOptions);\n\t\t},\n\t\tclearMessages() {\n\t\t\tpublish({ messages: [] });\n\t\t},\n\t\tstart() {\n\t\t\tif (url === null || connection) {\n\t\t\t\tif (url === null) publish(CLOSED_SNAPSHOT);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst opened = client.connect(descriptor, connectOptionsOf(options));\n\t\t\tconnection = opened;\n\t\t\tqueue = new BatchQueue((action, batched, envelopes) => {\n\t\t\t\tconst handler = options.on?.[action];\n\t\t\t\tif (handler && typeof handler === \"object\") handler.handler(batched, envelopes);\n\t\t\t});\n\t\t\tdisposers = [\n\t\t\t\topened.onStatus((status) => publish({ status })),\n\t\t\t\topened.onError((error) => options.onError?.(error)),\n\t\t\t\topened.onAny(handle)\n\t\t\t];\n\t\t\tpublish({ status: opened.status });\n\t\t},\n\t\tstop() {\n\t\t\tfor (const dispose of disposers) dispose();\n\t\t\tdisposers = [];\n\t\t\tqueue?.dispose();\n\t\t\tqueue = null;\n\t\t\tconnection?.close();\n\t\t\tconnection = null;\n\t\t}\n\t};\n}\n/** Identity of a topic set, so bindings resubscribe only when it really changes. */\nfunction topicsKey(topics) {\n\treturn JSON.stringify(topics.map((ref) => ref.topic));\n}\n/**\n* Joins a set of topics over one connection.\n*\n* Subscriptions are reference counted per resolved topic by the connection, so two\n* controllers wanting `room:lobby` share one subscription. Messages on the channel\n* itself are not topic messages and stay out of this controller's buffer and handlers.\n*/\nfunction createTopicsController(client, descriptor, initialOptions) {\n\tlet options = initialOptions;\n\tconst channelOptions = (next) => ({\n\t\t...next,\n\t\tbuffer: \"none\",\n\t\ton: void 0\n\t});\n\tconst channel = createChannelController(client, descriptor, channelOptions(options));\n\tconst listeners = /* @__PURE__ */ new Set();\n\tlet snapshot = {\n\t\tstatus: channel.getSnapshot().status,\n\t\tlastMessage: null,\n\t\tmessages: [],\n\t\tsubscribed: [],\n\t\thandles: {}\n\t};\n\tlet topicDisposers = [];\n\tlet queue = null;\n\tlet cancelled = false;\n\tconst publish = (next) => {\n\t\tsnapshot = {\n\t\t\t...snapshot,\n\t\t\t...next\n\t\t};\n\t\tfor (const listener of [...listeners]) listener();\n\t};\n\tchannel.subscribe(() => publish({ status: channel.getSnapshot().status }));\n\tconst handlerFor = (action) => options.on?.[action];\n\treturn {\n\t\turl: channel.url,\n\t\ttopicKey: topicsKey(initialOptions.topics),\n\t\tsubscribe(listener) {\n\t\t\tlisteners.add(listener);\n\t\t\treturn () => listeners.delete(listener);\n\t\t},\n\t\tgetSnapshot: () => snapshot,\n\t\tsetOptions(next) {\n\t\t\toptions = next;\n\t\t\tchannel.setOptions(channelOptions(next));\n\t\t},\n\t\tsend: (message) => channel.send(message),\n\t\tterminate: (code, reason) => channel.terminate(code, reason),\n\t\trequest: (message, requestOptions) => channel.request(message, requestOptions),\n\t\tsendTopic(topic, message) {\n\t\t\tsnapshot.handles[topic]?.send(message);\n\t\t},\n\t\tclearMessages() {\n\t\t\tpublish({ messages: [] });\n\t\t},\n\t\tstart() {\n\t\t\tcancelled = false;\n\t\t\tchannel.start();\n\t\t\tconst connection = channel.getConnection();\n\t\t\tif (!connection) return;\n\t\t\tqueue = new BatchQueue((action, batched, envelopes) => {\n\t\t\t\tconst handler = handlerFor(action);\n\t\t\t\tif (handler && typeof handler === \"object\") handler.handler(batched, envelopes);\n\t\t\t});\n\t\t\tconst handles = {};\n\t\t\tconst syncSubscribed = () => publish({ subscribed: Object.values(handles).filter((handle) => handle.subscribed).map((handle) => handle.topic) });\n\t\t\tfor (const ref of options.topics) {\n\t\t\t\tif (handles[ref.topic]) continue;\n\t\t\t\tconst handle = connection.topic(ref);\n\t\t\t\thandles[handle.topic] = handle;\n\t\t\t\ttopicDisposers.push(handle.onSubscribedChange(syncSubscribed));\n\t\t\t\ttopicDisposers.push(handle.onSubscribeError((error) => {\n\t\t\t\t\tif (!cancelled) options.onSubscribeError?.(handle.topic, error);\n\t\t\t\t}));\n\t\t\t\ttopicDisposers.push(handle.onAny((message, envelope) => {\n\t\t\t\t\tconst handler = handlerFor(message.action);\n\t\t\t\t\tif (typeof handler === \"function\") handler(message, envelope);\n\t\t\t\t\telse if (handler) queue?.push(message.action, message, envelope, handler.batch);\n\t\t\t\t\tconst mode = options.buffer ?? \"latest\";\n\t\t\t\t\tif (mode === \"none\") return;\n\t\t\t\t\tconst withTopic = {\n\t\t\t\t\t\t...message,\n\t\t\t\t\t\ttopic: handle.topic,\n\t\t\t\t\t\t...envelope.seq === void 0 ? {} : { seq: envelope.seq }\n\t\t\t\t\t};\n\t\t\t\t\tif (mode === \"latest\") publish({ lastMessage: withTopic });\n\t\t\t\t\telse publish({ messages: [...snapshot.messages, withTopic] });\n\t\t\t\t}));\n\t\t\t\thandle.subscribe().catch(() => void 0);\n\t\t\t}\n\t\t\tpublish({ handles });\n\t\t},\n\t\tstop() {\n\t\t\tcancelled = true;\n\t\t\tfor (const dispose of topicDisposers) dispose();\n\t\t\ttopicDisposers = [];\n\t\t\tqueue?.dispose();\n\t\t\tqueue = null;\n\t\t\tfor (const handle of Object.values(snapshot.handles)) handle.release();\n\t\t\tpublish({\n\t\t\t\thandles: {},\n\t\t\t\tsubscribed: []\n\t\t\t});\n\t\t\tchannel.stop();\n\t\t}\n\t};\n}\n/**\n* Joins one topic. The common case, with the topic's own message types throughout: no\n* union to narrow and no topic name to pass when sending.\n*/\nfunction createTopicController(client, descriptor, topic, initialOptions = {}) {\n\tconst inner = createTopicsController(client, descriptor, {\n\t\t...initialOptions,\n\t\ttopics: [topic]\n\t});\n\tconst derive = (from) => ({\n\t\tstatus: from.status,\n\t\tsubscribed: from.subscribed.includes(topic.topic),\n\t\tlastMessage: from.lastMessage,\n\t\tmessages: from.messages\n\t});\n\tconst listeners = /* @__PURE__ */ new Set();\n\tlet snapshot = derive(inner.getSnapshot());\n\tinner.subscribe(() => {\n\t\tsnapshot = derive(inner.getSnapshot());\n\t\tfor (const listener of [...listeners]) listener();\n\t});\n\tconst handle = () => inner.getSnapshot().handles[topic.topic] ?? null;\n\treturn {\n\t\turl: inner.url,\n\t\ttopicKey: inner.topicKey,\n\t\tsubscribe(listener) {\n\t\t\tlisteners.add(listener);\n\t\t\treturn () => listeners.delete(listener);\n\t\t},\n\t\tgetSnapshot: () => snapshot,\n\t\tsend(message) {\n\t\t\thandle()?.send(message);\n\t\t},\n\t\trequest(message, requestOptions) {\n\t\t\tconst joined = handle();\n\t\t\tif (!joined) return Promise.reject(/* @__PURE__ */ new Error(`Topic \"${topic.topic}\" is not joined`));\n\t\t\treturn joined.request(message, requestOptions);\n\t\t},\n\t\tclearMessages: () => inner.clearMessages(),\n\t\tterminate: (code, reason) => inner.terminate(code, reason),\n\t\tsetOptions: (next) => inner.setOptions({\n\t\t\t...next,\n\t\t\ttopics: [topic]\n\t\t}),\n\t\tgetHandle: handle,\n\t\tstart: () => inner.start(),\n\t\tstop: () => inner.stop()\n\t};\n}\n//#endregion\nexport { isFrameworkAction as _, topicsKey as a, ChannelConnection as c, formatPattern as d, COMPLETE_ACTIONS as f, SUBSCRIPTION_ACTIONS as g, ERROR_ACTION as h, createTopicsController as i, ChanxRequestError as l, ENVELOPE_VERSION as m, createChannelController as n, createClient as o, ENVELOPE_FIELDS as p, createTopicController as r, terminateAllSockets as s, connectionKey as t, TopicHandle as u, stripEnvelope as v, withEnvelope as y };\n",
6
6
  "import { _ as isFrameworkAction, c as ChannelConnection, d as formatPattern, f as COMPLETE_ACTIONS, g as SUBSCRIPTION_ACTIONS, h as ERROR_ACTION, i as createTopicsController, l as ChanxRequestError, m as ENVELOPE_VERSION, n as createChannelController, o as createClient, p as ENVELOPE_FIELDS, r as createTopicController, s as terminateAllSockets, u as TopicHandle, v as stripEnvelope, y as withEnvelope } from \"./controller-ydLgWB7k.mjs\";\n//#region src/core/descriptor.ts\n/**\n* Declare a channel.\n*\n* Curried so the message types can be given explicitly while the address literal and\n* topic map are still inferred: TypeScript has no partial type-argument inference.\n*\n* ```ts\n* export const chat = defineChannel<ChatToServer, ChatToClient, ChatReplies>()({\n* name: 'chat',\n* address: '/ws/chat/{room}/',\n* });\n* ```\n*/\nfunction defineChannel() {\n\treturn (spec) => ({\n\t\tkind: \"channel\",\n\t\tname: spec.name,\n\t\taddress: spec.address,\n\t\ttopics: spec.topics ?? {},\n\t\t...spec.heartbeat ? { heartbeat: true } : {},\n\t\t...spec.validators ? { validators: spec.validators } : {}\n\t});\n}\n/** Declare a topic carried on a channel's connection. Curried for the same reason. */\nfunction defineTopic() {\n\treturn (spec) => {\n\t\tconst descriptor = {\n\t\t\tkind: \"topic\",\n\t\t\tname: spec.name,\n\t\t\tpattern: spec.pattern,\n\t\t\t...spec.validators ? { validators: spec.validators } : {},\n\t\t\twith(...[params = {}]) {\n\t\t\t\tconst values = params;\n\t\t\t\treturn {\n\t\t\t\t\tdescriptor,\n\t\t\t\t\tparams: values,\n\t\t\t\t\ttopic: formatPattern(spec.pattern, values)\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\treturn descriptor;\n\t};\n}\n//#endregion\nexport { COMPLETE_ACTIONS, ChannelConnection, ChanxRequestError, ENVELOPE_FIELDS, ENVELOPE_VERSION, ERROR_ACTION, SUBSCRIPTION_ACTIONS, TopicHandle, createChannelController, createClient, createTopicController, createTopicsController, defineChannel, defineTopic, formatPattern, isFrameworkAction, stripEnvelope, terminateAllSockets, withEnvelope };\n",
@@ -10,6 +10,6 @@
10
10
  "import { createCatalogClientFromOptions } from \"./client.js\";\nimport type { CatalogClient } from \"./types.js\";\n\nexport type * from \"./_generated/schemas.js\";\nexport type * from \"./types.js\";\n\nexport interface CatalogClientOptions {\n baseUrl: string;\n}\n\nexport function createCatalogClient(options: CatalogClientOptions): CatalogClient {\n return createCatalogClientFromOptions(options);\n}\n"
11
11
  ],
12
12
  "mappings": ";AAGA,IAAM,kBAAkB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAEA,IAAM,mBAAmB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AACD;AAEA,IAAM,uBAAuB,CAAC,cAAc,cAAc;AAC1D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