devframe 0.9.7 → 0.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/{_shared-BM3PdYli.mjs → _shared-C08SdQRl.mjs} +15 -4
  2. package/dist/{_shared-BJ6AmwTu.d.mts → _shared-CK3czkH4.d.mts} +25 -2
  3. package/dist/adapters/build.d.mts +6 -6
  4. package/dist/adapters/build.mjs +32 -22
  5. package/dist/adapters/cac.d.mts +16 -1
  6. package/dist/adapters/cac.mjs +8 -7
  7. package/dist/adapters/dev.d.mts +13 -13
  8. package/dist/adapters/dev.mjs +2 -2
  9. package/dist/adapters/embedded.d.mts +1 -1
  10. package/dist/adapters/initiate.d.mts +28 -26
  11. package/dist/adapters/initiate.mjs +1 -1
  12. package/dist/adapters/mcp.d.mts +28 -14
  13. package/dist/adapters/mcp.mjs +75 -39
  14. package/dist/{agent-tool-name-EgfoFO8C.mjs → agent-tool-name-DGzeuWcO.mjs} +2 -2
  15. package/dist/cli/main.d.mts +1 -1
  16. package/dist/cli/main.mjs +41 -17
  17. package/dist/client/index.d.mts +36 -36
  18. package/dist/client/index.mjs +83 -51
  19. package/dist/client-assets-DNdhagGm.mjs +16 -0
  20. package/dist/constants.d.mts +8 -7
  21. package/dist/constants.mjs +7 -6
  22. package/dist/{context-BhBzOXVa.d.mts → context-4AIVRLYF.d.mts} +173 -122
  23. package/dist/{context-omlma_1n.mjs → context-CwPUinjn.mjs} +126 -88
  24. package/dist/{context-KUqAfawQ.mjs → context-DIUvJW4D.mjs} +3 -3
  25. package/dist/{context-HOnG-WvG.d.mts → context-rgBSPFHS.d.mts} +5 -5
  26. package/dist/{crypto-token-XCqTSMg9.mjs → crypto-token-TVbGGFuj.mjs} +1 -1
  27. package/dist/{dev-Czit5IP4.mjs → dev-Eqq5PX0k.mjs} +37 -18
  28. package/dist/{diagnostics-BXWW3VK-.mjs → diagnostics-BMfN8mb1.mjs} +30 -17
  29. package/dist/{diagnostics-CD8nlgll.mjs → diagnostics-D0EVm5M6.mjs} +2 -2
  30. package/dist/{events-4daw0uK9.mjs → events-BV4Dj59a.mjs} +2 -2
  31. package/dist/{host-h3-fRbF9yor.mjs → host-h3-BJ4siyz7.mjs} +1 -1
  32. package/dist/in-page-channel/index.d.mts +59 -22
  33. package/dist/in-page-channel/index.mjs +71 -56
  34. package/dist/{index-BzyopqxV.d.mts → index-pIVt92jP.d.mts} +9 -9
  35. package/dist/{index-DcKxIMoI.d.mts → index-pKl67H6w.d.mts} +4 -4
  36. package/dist/index.d.mts +11 -13
  37. package/dist/index.mjs +6 -7
  38. package/dist/{instance-registry-BjlMQbFB.mjs → instance-registry-C7-41RSp.mjs} +8 -8
  39. package/dist/{instance-shell-Bh4l9Vz_.d.mts → instance-shell-7Z52PE4_.d.mts} +18 -18
  40. package/dist/{instance-shell-CpVW4zG0.mjs → instance-shell-cdVETpfz.mjs} +227 -58
  41. package/dist/internal/index.d.mts +51 -21
  42. package/dist/internal/index.mjs +10 -9
  43. package/dist/node/auth.d.mts +2 -2
  44. package/dist/node/auth.mjs +2 -2
  45. package/dist/node/hub-internals.d.mts +2 -2
  46. package/dist/node/hub-internals.mjs +2 -2
  47. package/dist/node/index.d.mts +5 -5
  48. package/dist/node/index.mjs +2 -2
  49. package/dist/{nostics-SPGDgHEP.d.mts → nostics-0sKe5HIj.d.mts} +2 -2
  50. package/dist/{nostics-CzECRXpE.mjs → nostics-D0PvLZsn.mjs} +1 -1
  51. package/dist/origin-DGDH8BI9.d.mts +45 -0
  52. package/dist/origin-DZit9g29.mjs +80 -0
  53. package/dist/recipes/common-rpc-functions.d.mts +5 -5
  54. package/dist/recipes/common-rpc-functions.mjs +3 -3
  55. package/dist/recipes/interactive-auth.d.mts +6 -6
  56. package/dist/recipes/interactive-auth.mjs +6 -6
  57. package/dist/{remote-assets-DezQmPQU.mjs → remote-assets-BIFWOlBW.mjs} +26 -6
  58. package/dist/{remote-assets-B13_vRkJ.d.mts → remote-assets-eBvSKZMS.d.mts} +7 -7
  59. package/dist/{revoke-COLW0cOi.mjs → revoke-cqztiCX4.mjs} +1 -1
  60. package/dist/rpc/dump.d.mts +2 -11
  61. package/dist/rpc/dump.mjs +1 -1
  62. package/dist/rpc/index.d.mts +2 -2
  63. package/dist/rpc/index.mjs +3 -3
  64. package/dist/rpc/transports/sse-client.d.mts +1 -1
  65. package/dist/rpc/transports/sse-client.mjs +30 -14
  66. package/dist/rpc/transports/sse-server.d.mts +4 -4
  67. package/dist/rpc/transports/sse-server.mjs +7 -7
  68. package/dist/rpc/transports/ws-bun.d.mts +5 -5
  69. package/dist/rpc/transports/ws-bun.mjs +8 -2
  70. package/dist/rpc/transports/ws-client.d.mts +1 -1
  71. package/dist/rpc/transports/ws-client.mjs +2 -2
  72. package/dist/rpc/transports/ws-deno.d.mts +4 -4
  73. package/dist/rpc/transports/ws-deno.mjs +8 -2
  74. package/dist/rpc/transports/ws-server.d.mts +2 -1
  75. package/dist/rpc/transports/ws-server.mjs +232 -1
  76. package/dist/{rpc-core-BHUsDl7s.d.mts → rpc-core-Ceu6AUz8.d.mts} +4 -4
  77. package/dist/{rpc-core-DlHd276T.mjs → rpc-core-DVQ7xi89.mjs} +14 -2
  78. package/dist/{serialization-BGzEwAdr.mjs → serialization-DTZnPQ1-.mjs} +20 -18
  79. package/dist/{services-install-CqqQVls5.mjs → services-install-P_DV7VYL.mjs} +32 -21
  80. package/dist/session-DPfj6zQG.mjs +16 -0
  81. package/dist/{shared-state-DoXutg_U.mjs → shared-state-CaxB1q0h.mjs} +4 -3
  82. package/dist/{simple-schema-DQPZrAaZ.mjs → simple-schema-Bi40l-P6.mjs} +2 -2
  83. package/dist/{sse-client-DwX021ST.d.mts → sse-client-BQ4jS3eO.d.mts} +4 -4
  84. package/dist/{state-CK9LjrnT.mjs → state-CeQQWzM-.mjs} +4 -4
  85. package/dist/{static-DV_qUSRS.mjs → static-DZ8P2Kn7.mjs} +130 -135
  86. package/dist/{storage-BXNVhKyR.mjs → storage-Dccf_IyD.mjs} +1 -1
  87. package/dist/types/index.d.mts +6 -6
  88. package/dist/{types-CMdPYhOx.d.mts → types-Dq4i156u.d.mts} +17 -17
  89. package/dist/utils/agent-tool-name.d.mts +2 -2
  90. package/dist/utils/agent-tool-name.mjs +2 -2
  91. package/dist/utils/colors.d.mts +1 -1
  92. package/dist/utils/crypto-token.d.mts +1 -1
  93. package/dist/utils/crypto-token.mjs +1 -1
  94. package/dist/utils/events.d.mts +1 -1
  95. package/dist/utils/nostics.d.mts +1 -1
  96. package/dist/utils/nostics.mjs +1 -1
  97. package/dist/utils/open.mjs +1 -1
  98. package/dist/utils/origin.d.mts +2 -0
  99. package/dist/utils/origin.mjs +80 -0
  100. package/dist/utils/remote-assets.d.mts +2 -2
  101. package/dist/utils/remote-assets.mjs +1 -1
  102. package/dist/utils/serve-static.d.mts +4 -4
  103. package/dist/utils/serve-static.mjs +56 -19
  104. package/dist/utils/shared-state.d.mts +1 -1
  105. package/dist/utils/shared-state.mjs +1 -1
  106. package/dist/utils/simple-schema.d.mts +5 -5
  107. package/dist/utils/simple-schema.mjs +2 -2
  108. package/dist/utils/streaming-channel.d.mts +1 -1
  109. package/dist/utils/streaming-channel.mjs +2 -2
  110. package/dist/utils/when.d.mts +5 -5
  111. package/dist/{validation-YrZH6atx.mjs → validation-BOy8IoFZ.mjs} +2 -2
  112. package/dist/{wire-codec-0K-o5MYW.mjs → wire-codec-dcCeXcSo.mjs} +3 -3
  113. package/dist/{ws-client-7_lZi-B9.d.mts → ws-client-Xpxt0oPA.d.mts} +3 -3
  114. package/dist/{ws-server-Di2oqr4q.d.mts → ws-server-D2nv68Hg.d.mts} +13 -22
  115. package/package.json +6 -5
  116. package/dist/ws-server-BdSLrhxE.mjs +0 -267
@@ -1,7 +1,8 @@
1
1
  import "./constants.mjs";
2
- import { t as diagnostics } from "./diagnostics-BXWW3VK-.mjs";
3
- import { r as importServicePackage } from "./services-install-CqqQVls5.mjs";
4
- import { t as getInternalContext } from "./context-KUqAfawQ.mjs";
2
+ import { r as validateOriginCandidate } from "./origin-DZit9g29.mjs";
3
+ import { t as diagnostics } from "./diagnostics-BMfN8mb1.mjs";
4
+ import { r as importServicePackage } from "./services-install-P_DV7VYL.mjs";
5
+ import { t as getInternalContext } from "./context-DIUvJW4D.mjs";
5
6
  import { createInteractiveAuth } from "./recipes/interactive-auth.mjs";
6
7
  import { createServer } from "node:http";
7
8
  import process from "node:process";
@@ -20,6 +21,21 @@ async function importRuntimeModule(specifier) {
20
21
  return await importServicePackage(specifier, [import.meta.url]);
21
22
  }
22
23
  //#endregion
24
+ //#region src/node/runtime.ts
25
+ /**
26
+ * Detect the current server runtime from its runtime-specific global. The
27
+ * WebSocket binding branches on this: Bun and Deno expose their sockets as
28
+ * `fetch` upgrades through `Bun.serve` / `Deno.serve` (crossws's Bun/Deno
29
+ * adapters), while the `node:http` upgrade event (and crossws's Node adapter,
30
+ * which refuses to run anywhere else) is Node-only.
31
+ */
32
+ function detectServerRuntime() {
33
+ const g = globalThis;
34
+ if (typeof g.Deno !== "undefined") return "deno";
35
+ if (typeof g.Bun !== "undefined") return "bun";
36
+ return "node";
37
+ }
38
+ //#endregion
23
39
  //#region src/node/utils.ts
24
40
  const NON_DIALABLE_HOSTS = /* @__PURE__ */ new Set([
25
41
  "0.0.0.0",
@@ -42,8 +58,17 @@ function normalizeHttpServerUrl(host, port) {
42
58
  }
43
59
  //#endregion
44
60
  //#region src/node/instance-shell.ts
61
+ function websocketConnectionMeta(rpcHost, path) {
62
+ const jsonSerializableMethods = [];
63
+ for (const def of rpcHost.definitions.values()) if (def.jsonSerializable === true) jsonSerializableMethods.push(def.name);
64
+ return {
65
+ backend: "websocket",
66
+ websocket: { path },
67
+ jsonSerializableMethods
68
+ };
69
+ }
45
70
  /**
46
- * Compose an h3 + WebSocket RPC server for a devframe context — the low-level
71
+ * Compose an h3 + WebSocket RPC server for a devframe context: the low-level
47
72
  * "listen on a port (or share one) + attach the WS transport" binding the
48
73
  * side-car and shared-server tiers below are built on. Owns and listens on a
49
74
  * fresh `node:http` server unless `server` is supplied, in which case it only
@@ -97,22 +122,13 @@ async function bindHttpAndWs(options) {
97
122
  const internal = getInternalContext(context);
98
123
  const wsUrl = `ws://${formatHostForUrl(bindHost)}:${resolvedPort}${options.path ?? ""}`;
99
124
  if (websocket) internal.setWsEndpoint({ url: wsUrl });
100
- function connectionMeta() {
101
- const jsonSerializableMethods = [];
102
- for (const def of rpcHost.definitions.values()) if (def.jsonSerializable === true) jsonSerializableMethods.push(def.name);
103
- return {
104
- backend: "websocket",
105
- websocket: { path: options.path },
106
- jsonSerializableMethods
107
- };
108
- }
109
125
  return {
110
126
  origin,
111
127
  port: resolvedPort,
112
128
  app,
113
129
  ws,
114
130
  rpcGroup: core.rpcGroup,
115
- connectionMeta,
131
+ connectionMeta: () => websocketConnectionMeta(rpcHost, options.path),
116
132
  async close() {
117
133
  await closeWs();
118
134
  if (ownsHttpServer) await new Promise((r) => httpServer.close(() => r()));
@@ -121,6 +137,105 @@ async function bindHttpAndWs(options) {
121
137
  };
122
138
  }
123
139
  /**
140
+ * Whether a request is a WebSocket upgrade aimed at `path`: the `fetch`-side
141
+ * equivalent of the Node transport's `upgrade`-event path filter, used by the
142
+ * native ({@link bindNativeHttpAndWs}) tiers to route only the RPC route to
143
+ * the socket and leave every other request to the h3 app.
144
+ */
145
+ function isWsUpgradeRequest(request, path) {
146
+ if ((request.headers.get("upgrade") ?? "").toLowerCase() !== "websocket") return false;
147
+ if (!path) return true;
148
+ try {
149
+ return samePath(new URL(request.url).pathname, path);
150
+ } catch {
151
+ return false;
152
+ }
153
+ }
154
+ /**
155
+ * The Bun/Deno counterpart to {@link bindHttpAndWs}: own and listen on a
156
+ * native `fetch`-upgrade server (`Bun.serve` / `Deno.serve`) with crossws's
157
+ * Bun/Deno adapter driving the RPC socket, since crossws's Node adapter (and
158
+ * the `node:http` `upgrade` event it needs) refuses to run off Node. Only the
159
+ * owns-a-server tiers reach here; a shared foreign `node:http` server can't be
160
+ * re-hosted on a native runtime, so that path falls back to SSE instead.
161
+ */
162
+ async function bindNativeHttpAndWs(runtime, options) {
163
+ const { context, port, core } = options;
164
+ const bindHost = options.host;
165
+ const app = new H3();
166
+ const rpcHost = context.rpc;
167
+ const wsPath = options.path;
168
+ const fail = async (closeWs, error) => {
169
+ await closeWs().catch(() => {});
170
+ throw diagnostics.DF0052({
171
+ host: bindHost,
172
+ port,
173
+ reason: error instanceof Error ? error.message : String(error),
174
+ cause: error
175
+ });
176
+ };
177
+ let resolvedPort;
178
+ let closeWs;
179
+ let closeServer;
180
+ if (runtime === "bun") {
181
+ const { attachBunWsTransport } = await import("./rpc/transports/ws-bun.mjs");
182
+ const tier = await attachBunWsTransport(core, { allowedOrigins: options.allowedOrigins });
183
+ closeWs = tier.close;
184
+ const Bun = globalThis.Bun;
185
+ let server;
186
+ try {
187
+ server = Bun.serve({
188
+ port,
189
+ hostname: bindHost,
190
+ fetch: async (request, srv) => isWsUpgradeRequest(request, wsPath) ? await tier.handleUpgrade(request, srv) : await app.fetch(request),
191
+ websocket: tier.websocket
192
+ });
193
+ } catch (error) {
194
+ return await fail(closeWs, error);
195
+ }
196
+ resolvedPort = server.port;
197
+ closeServer = async () => {
198
+ await server.stop(true);
199
+ };
200
+ } else {
201
+ const { attachDenoWsTransport } = await import("./rpc/transports/ws-deno.mjs");
202
+ const tier = await attachDenoWsTransport(core, { allowedOrigins: options.allowedOrigins });
203
+ closeWs = tier.close;
204
+ const Deno = globalThis.Deno;
205
+ let server;
206
+ try {
207
+ server = Deno.serve({
208
+ port,
209
+ hostname: bindHost,
210
+ onListen: () => {}
211
+ }, async (request, info) => isWsUpgradeRequest(request, wsPath) ? await tier.handleUpgrade(request, info) : await app.fetch(request));
212
+ } catch (error) {
213
+ return await fail(closeWs, error);
214
+ }
215
+ resolvedPort = server.addr.port;
216
+ closeServer = async () => {
217
+ await server.shutdown();
218
+ };
219
+ }
220
+ const origin = normalizeHttpServerUrl(bindHost, resolvedPort);
221
+ const internal = getInternalContext(context);
222
+ const wsUrl = `ws://${formatHostForUrl(bindHost)}:${resolvedPort}${options.path ?? ""}`;
223
+ internal.setWsEndpoint({ url: wsUrl });
224
+ return {
225
+ origin,
226
+ port: resolvedPort,
227
+ app,
228
+ ws: void 0,
229
+ rpcGroup: core.rpcGroup,
230
+ connectionMeta: () => websocketConnectionMeta(rpcHost, options.path),
231
+ async close() {
232
+ await closeServer();
233
+ await closeWs();
234
+ if (getInternalContext(context).wsEndpoint?.url === wsUrl) getInternalContext(context).setWsEndpoint(void 0);
235
+ }
236
+ };
237
+ }
238
+ /**
124
239
  * Translate the public `register?: boolean | Partial<DevframeInstanceRecord>`
125
240
  * option into a shell {@link InstanceRegisterConfig}, or `undefined` when
126
241
  * registration is opted out. The object form supplies record overrides on top
@@ -141,8 +256,8 @@ function samePath(a, b) {
141
256
  }
142
257
  /**
143
258
  * Copy a web `Response` from a fetch-style transport handler onto the h3
144
- * event's response and return its body — mirroring the MCP route's bridge.
145
- * Returning the body (a `ReadableStream`, or `''` for an empty one — h3
259
+ * event's response and return its body, mirroring the MCP route's bridge.
260
+ * Returning the body (a `ReadableStream`, or `''` for an empty one, since h3
146
261
  * middleware only falls through on `undefined`) terminates the chain with
147
262
  * the status/headers set here instead of continuing to the SPA catch-all.
148
263
  */
@@ -158,8 +273,8 @@ function respondWith(event, response) {
158
273
  * The shared machinery behind `initDevframe` and `initHub`: one mount base,
159
274
  * one h3 app, one lazily-derived public origin (and the auth banner that waits
160
275
  * for it), one WebSocket binding, and the fetch / connect-middleware pair that
161
- * serves them. Each factory supplies only what makes it itself — its context,
162
- * its routes, its diagnostics — through `init` / `mount`.
276
+ * serves them. Each factory supplies only what makes it itself (its context,
277
+ * its routes, its diagnostics) through `init` / `mount`.
163
278
  *
164
279
  * Nothing here listens on a port unless a side-car was explicitly requested:
165
280
  * the default tier leaves the socket `unbound`, so a host chains it onto its
@@ -172,6 +287,8 @@ function createInstanceShell(options) {
172
287
  const base = options.base;
173
288
  const baseNoSlash = withoutTrailingSlash(base);
174
289
  const app = options.app ?? new H3();
290
+ const runtime = detectServerRuntime();
291
+ const nativeRuntime = runtime !== "node";
175
292
  const wsDisabled = options.ws === false;
176
293
  const ws = options.ws === false ? {} : options.ws ?? {};
177
294
  const route = withoutLeadingSlash(ws.route ?? "__ws");
@@ -186,8 +303,11 @@ function createInstanceShell(options) {
186
303
  const sseRoutePath = joinURL(base, sseRoute);
187
304
  const advertisedSsePath = options.absoluteWsPath ? sseRoutePath : sseRoute;
188
305
  let derivedOrigin;
306
+ function explicitOrigin() {
307
+ return typeof options.origin === "function" ? options.origin() : options.origin;
308
+ }
189
309
  function currentOrigin() {
190
- return (typeof options.origin === "function" ? options.origin() : options.origin) || derivedOrigin;
310
+ return explicitOrigin() || derivedOrigin;
191
311
  }
192
312
  let authHandler;
193
313
  let bannerPrinted = false;
@@ -201,7 +321,7 @@ function createInstanceShell(options) {
201
321
  let registerPromise;
202
322
  /**
203
323
  * Publish the instance in the global registry the moment both its origin
204
- * and connection meta are known — at init end for a pinned origin, or on
324
+ * and connection meta are known: at init end for a pinned origin, or on
205
325
  * the first request for a derived one. Registration never throws (the
206
326
  * registry writer degrades to a coded warning), so failures never surface.
207
327
  */
@@ -210,7 +330,7 @@ function createInstanceShell(options) {
210
330
  const origin = currentOrigin();
211
331
  if (!cfg || registerPromise || !origin || !meta) return;
212
332
  const resolvedMeta = meta;
213
- registerPromise = import("./instance-registry-BjlMQbFB.mjs").then((n) => n.t).then(({ registerDevframeInstance }) => {
333
+ registerPromise = import("./instance-registry-C7-41RSp.mjs").then((n) => n.t).then(({ registerDevframeInstance }) => {
214
334
  let port = 0;
215
335
  try {
216
336
  const url = new URL(origin);
@@ -230,8 +350,20 @@ function createInstanceShell(options) {
230
350
  });
231
351
  }).catch(() => {});
232
352
  }
233
- function noteOrigin(origin) {
234
- derivedOrigin ??= origin;
353
+ /**
354
+ * Consider a request-derived origin candidate for the advertised public
355
+ * origin (which backs the OTP magic link). {@link validateOriginCandidate}
356
+ * adopts only a loopback host or an exact `allowedOrigins` match, so a raw
357
+ * inbound `Host`/URL authority never redirects the credential-bearing link.
358
+ * First-valid-origin wins: an invalid candidate leaves `derivedOrigin` unset
359
+ * (printing/registering nothing) so a later valid one can still be adopted.
360
+ */
361
+ function noteOrigin(candidate) {
362
+ if (derivedOrigin === void 0 && !explicitOrigin()) {
363
+ const allowed = options.allowedOrigins;
364
+ const accepted = validateOriginCandidate(candidate, Array.isArray(allowed) ? allowed : void 0);
365
+ if (accepted !== void 0) derivedOrigin = accepted;
366
+ }
235
367
  maybePrintBanner();
236
368
  maybeRegister();
237
369
  }
@@ -248,7 +380,7 @@ function createInstanceShell(options) {
248
380
  /**
249
381
  * Auth resolution: gate by default, `false` opts out, a handler object
250
382
  * installs a custom scheme. The `external` tier has no local transport to
251
- * gate — the server behind `ws.url` owns auth — so it resolves to nothing.
383
+ * gate (the server behind `ws.url` owns auth) so it resolves to nothing.
252
384
  */
253
385
  function resolveAuth() {
254
386
  if (options.auth === false) return false;
@@ -260,7 +392,7 @@ function createInstanceShell(options) {
260
392
  return authHandler;
261
393
  }
262
394
  /**
263
- * The context's RPC core (birpc group, session lifecycle, auth gate) —
395
+ * The context's RPC core (birpc group, session lifecycle, auth gate) is
264
396
  * one per instance, shared by every transport binding (WS and SSE), so a
265
397
  * WS peer and an SSE session live in the same session/broadcast space.
266
398
  * Built lazily: an `unbound` host that never wires a transport pays
@@ -270,7 +402,7 @@ function createInstanceShell(options) {
270
402
  let resolvedAuth = false;
271
403
  let corePromise;
272
404
  function ensureCore() {
273
- corePromise ??= import("./rpc-core-DlHd276T.mjs").then((n) => n.n).then(({ createContextRpcServer }) => createContextRpcServer({
405
+ corePromise ??= import("./rpc-core-DVQ7xi89.mjs").then((n) => n.n).then(({ createContextRpcServer }) => createContextRpcServer({
274
406
  context: ctx,
275
407
  auth: resolvedAuth,
276
408
  onPeerConnect: options.onPeerConnect,
@@ -302,14 +434,17 @@ function createInstanceShell(options) {
302
434
  */
303
435
  async function startSidecar(core) {
304
436
  const sidecarHost = options.host ?? "localhost";
305
- const start = (port) => bindHttpAndWs({
306
- context: ctx,
307
- core,
308
- host: sidecarHost,
309
- port,
310
- path: withLeadingSlash(route),
311
- allowedOrigins: options.allowedOrigins
312
- });
437
+ const start = (port) => {
438
+ const bindOptions = {
439
+ context: ctx,
440
+ core,
441
+ host: sidecarHost,
442
+ port,
443
+ path: withLeadingSlash(route),
444
+ allowedOrigins: options.allowedOrigins
445
+ };
446
+ return nativeRuntime ? bindNativeHttpAndWs(runtime, bindOptions) : bindHttpAndWs(bindOptions);
447
+ };
313
448
  if (ws.port != null) return await start(ws.port);
314
449
  const { getPort } = await import("./dist-CZXfGEkd.mjs").then((n) => n.t);
315
450
  let lastError;
@@ -326,37 +461,70 @@ function createInstanceShell(options) {
326
461
  }
327
462
  throw lastError;
328
463
  }
464
+ async function startServerTier() {
465
+ if (nativeRuntime && !ws.url) {
466
+ const core = await ensureCore();
467
+ started = {
468
+ origin: currentOrigin() ?? "",
469
+ port: 0,
470
+ app,
471
+ ws: void 0,
472
+ rpcGroup: core.rpcGroup,
473
+ connectionMeta: () => meta ?? options.onMetaUnavailable(),
474
+ close: async () => {}
475
+ };
476
+ return { wsAvailable: false };
477
+ }
478
+ started = await bindHttpAndWs({
479
+ context: ctx,
480
+ core: await ensureCore(),
481
+ host: options.host ?? "localhost",
482
+ port: 0,
483
+ server: options.server,
484
+ path: routePath,
485
+ allowedOrigins: options.allowedOrigins,
486
+ destroyUnmatched: options.destroyUnmatchedUpgrades
487
+ });
488
+ return {
489
+ websocketMeta: { path: advertisedPath },
490
+ wsAvailable: !wsDisabled
491
+ };
492
+ }
493
+ async function resolveWebsocketBinding() {
494
+ if (tier === "sidecar") {
495
+ started = await startSidecar(await ensureCore());
496
+ return {
497
+ websocketMeta: {
498
+ port: started.port,
499
+ path: route
500
+ },
501
+ wsAvailable: !wsDisabled
502
+ };
503
+ }
504
+ if (tier === "server") return startServerTier();
505
+ if (tier === "external") return {
506
+ websocketMeta: ws.url,
507
+ wsAvailable: !wsDisabled
508
+ };
509
+ return {
510
+ websocketMeta: { path: advertisedPath },
511
+ wsAvailable: !wsDisabled
512
+ };
513
+ }
329
514
  async function init() {
330
515
  const result = await options.init(api);
331
516
  ctx = result.context;
332
517
  dispose = result.dispose;
333
518
  resolvedAuth = tier === "external" ? false : resolveAuth();
334
- let websocketMeta;
335
- if (tier === "sidecar") {
336
- started = await startSidecar(await ensureCore());
337
- websocketMeta = {
338
- port: started.port,
339
- path: route
340
- };
341
- } else if (tier === "server") {
342
- started = await bindHttpAndWs({
343
- context: ctx,
344
- core: await ensureCore(),
345
- host: options.host ?? "localhost",
346
- port: 0,
347
- server: options.server,
348
- path: routePath,
349
- allowedOrigins: options.allowedOrigins,
350
- destroyUnmatched: options.destroyUnmatchedUpgrades
351
- });
352
- websocketMeta = { path: advertisedPath };
353
- } else if (tier === "external") websocketMeta = ws.url;
354
- else if (tier === "unbound") websocketMeta = { path: advertisedPath };
519
+ const binding = await resolveWebsocketBinding();
520
+ const wsAvailable = binding.wsAvailable;
521
+ let websocketMeta = binding.websocketMeta;
355
522
  if (!wsDisabled && ws.url) websocketMeta = ws.url;
356
523
  if (sseEnabled) app.use(sseRoutePath, defineHandler(async (event) => respondWith(event, await (await ensureSse()).handler(event.req))));
524
+ if (!wsDisabled && !wsAvailable && !sseEnabled) diagnostics.DF0075({ runtime }, { method: "warn" });
357
525
  meta = {
358
- backend: wsDisabled ? sseEnabled ? "sse" : "none" : "websocket",
359
- ...websocketMeta !== void 0 ? { websocket: websocketMeta } : {},
526
+ backend: !wsDisabled && wsAvailable ? "websocket" : sseEnabled ? "sse" : "none",
527
+ ...wsAvailable && websocketMeta !== void 0 ? { websocket: websocketMeta } : {},
360
528
  ...sseEnabled ? { sse: { path: advertisedSsePath } } : {},
361
529
  ...result.mcp ? { mcp: result.mcp } : {}
362
530
  };
@@ -371,7 +539,7 @@ function createInstanceShell(options) {
371
539
  contextPromise.catch(() => {});
372
540
  /**
373
541
  * The `unbound` tier: the RPC core and its crossws adapter, bound to
374
- * nothing. Built on the first `attach` / `handleUpgrade` — a host that
542
+ * nothing. Built on the first `attach` / `handleUpgrade`; a host that
375
543
  * never wires the socket (or whose runtime brings its own WS transport)
376
544
  * pays nothing for it, not even the adapter's imports.
377
545
  */
@@ -437,6 +605,7 @@ function createInstanceShell(options) {
437
605
  if (tier === "disabled") throw diagnostics.DF0057();
438
606
  if (tier === "external") throw diagnostics.DF0056({ url: ws.url });
439
607
  if (tier !== "unbound") throw diagnostics.DF0055({ tier });
608
+ if (nativeRuntime) throw diagnostics.DF0076({ runtime });
440
609
  }
441
610
  /**
442
611
  * Publish the socket's absolute URL on the context, so surfaces that hand
@@ -1,17 +1,30 @@
1
- import { v as RpcFunctionDefinitionAny } from "../types-CMdPYhOx.mjs";
2
- import { At as AgentResource, Ft as AgentToolProvider, It as AgentToolProviderHandle, Lt as DevframeAgentHost$1, Mt as AgentResourceInput, Nt as AgentTool, Ot as AgentHandle, Pt as AgentToolInput, Rt as DevframeAgentHostEvents, jt as AgentResourceContent, kt as AgentManifest, o as DevframeNodeContext, yt as DevframeHost, zt as EventEmitter } from "../context-BhBzOXVa.mjs";
3
- import { a as RemoteAssetsStore } from "../remote-assets-B13_vRkJ.mjs";
4
- import { a as InstanceShellInit, c as StartedServer, d as samePath, f as DevframeInstanceRecord, h as registerDevframeInstance, i as InstanceShellApi, l as createInstanceShell, m as listLiveDevframeInstances, n as InstanceRegisterConfig, o as InstanceShellInternals, p as DevframeInstanceRegistration, r as InstanceShell, s as InstanceWsTier, t as CreateInstanceShellOptions, u as resolveInstanceRegister } from "../instance-shell-Bh4l9Vz_.mjs";
5
- import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-BJ6AmwTu.mjs";
6
- import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-BHUsDl7s.mjs";
1
+ import { v as RpcFunctionDefinitionAny } from "../types-Dq4i156u.mjs";
2
+ import { At as AgentManifest, Bt as EventEmitter, F as DevframeDefinition, Ft as AgentToolInput, It as AgentToolProvider, Lt as AgentToolProviderHandle, Mt as AgentResourceContent, Nt as AgentResourceInput, Pt as AgentTool, Rt as DevframeAgentHost$1, bt as DevframeHost, jt as AgentResource, kt as AgentHandle, o as DevframeNodeContext, zt as DevframeAgentHostEvents } from "../context-4AIVRLYF.mjs";
3
+ import { a as RemoteAssetsStore, o as StaticAssetsSource } from "../remote-assets-eBvSKZMS.mjs";
4
+ import { a as InstanceShellInit, c as StartedServer, d as samePath, f as DevframeInstanceRecord, h as registerDevframeInstance, i as InstanceShellApi, l as createInstanceShell, m as listLiveDevframeInstances, n as InstanceRegisterConfig, o as InstanceShellInternals, p as DevframeInstanceRegistration, r as InstanceShell, s as InstanceWsTier, t as CreateInstanceShellOptions, u as resolveInstanceRegister } from "../instance-shell-7Z52PE4_.mjs";
5
+ import { i as resolveBasePath, n as ResolvedMcpConfig, o as resolveMcpConfig, r as normalizeBasePath } from "../_shared-CK3czkH4.mjs";
6
+ import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-Ceu6AUz8.mjs";
7
+ //#region src/client-assets.d.ts
8
+ /**
9
+ * Resolve a definition's client assets source: the built SPA served as its
10
+ * UI. Prefers the top-level {@link DevframeDefinition.clientAssets} and falls
11
+ * back to the deprecated `cli.distDir`, so both the new and legacy shapes
12
+ * resolve. Returns `undefined` when neither is set (bridge mode, where the SPA is
13
+ * hosted elsewhere).
14
+ *
15
+ * Internal: exposed to first-party integrations via `devframe/internal`, not
16
+ * part of the stable public API.
17
+ */
18
+ declare function resolveClientAssets(d: DevframeDefinition): StaticAssetsSource | undefined;
19
+ //#endregion
7
20
  //#region src/node/agent-args.d.ts
8
21
  /**
9
22
  * How {@link coerceAgentPositionalArgs} treats an args object that carries
10
23
  * neither declared schemas nor `arg0`/`arg1`/… keys:
11
24
  *
12
- * - `'wrap'` — pass the object itself as the single positional argument.
25
+ * - `'wrap'`: pass the object itself as the single positional argument.
13
26
  * RPC-backed tools use this: an untyped RPC may take one raw object.
14
- * - `'drop'` — call with zero arguments. Command-backed tools use this:
27
+ * - `'drop'`: call with zero arguments. Command-backed tools use this:
15
28
  * a handler's positional parameters come solely from its declared
16
29
  * `agent.args` schemas, so undeclared payload is ignored.
17
30
  */
@@ -33,6 +46,11 @@ type AgentArgsFallback = 'wrap' | 'drop';
33
46
  declare function coerceAgentPositionalArgs(args: unknown, schemas: readonly unknown[] | undefined, fallback?: AgentArgsFallback): unknown[];
34
47
  //#endregion
35
48
  //#region src/node/diagnostics.d.ts
49
+ /**
50
+ * DF00xx codes are allocated across packages (e.g. @devframes/json-render
51
+ * owns DF0037–DF0041), so this file alone doesn't show the next free
52
+ * number; check `docs/content/6.errors/` for the full allocation before adding one.
53
+ */
36
54
  declare const diagnostics: import("nostics").Diagnostics<{
37
55
  readonly DF0006: {
38
56
  readonly why: (p: {
@@ -100,7 +118,7 @@ declare const diagnostics: import("nostics").Diagnostics<{
100
118
  channel: string;
101
119
  id: string;
102
120
  }) => string;
103
- readonly fix: "Track the producer lifecycle — guard writes with the `stream.signal.aborted` flag.";
121
+ readonly fix: "Track the producer lifecycle by guarding writes with the `stream.signal.aborted` flag.";
104
122
  };
105
123
  readonly DF0032: {
106
124
  readonly why: (p: {
@@ -132,7 +150,7 @@ declare const diagnostics: import("nostics").Diagnostics<{
132
150
  readonly why: (p: {
133
151
  name: string;
134
152
  }) => string;
135
- readonly fix: "Complete the auth handshake (or connect with a static/pre-shared token) before calling a trusted method. Untrusted callers may only call `anonymous:`-prefixed methods — see `isAnonymousRpcMethod`.";
153
+ readonly fix: "Complete the auth handshake (or connect with a static/pre-shared token) before calling a trusted method. Untrusted callers may only call `anonymous:`-prefixed methods; see `isAnonymousRpcMethod`.";
136
154
  };
137
155
  readonly DF0037: {
138
156
  readonly why: (p: {
@@ -181,7 +199,7 @@ declare const diagnostics: import("nostics").Diagnostics<{
181
199
  readonly why: (p: {
182
200
  port: number;
183
201
  }) => string;
184
- readonly fix: "Call devframe_connect_list-instances for the current instance list — the instance may have stopped or changed port.";
202
+ readonly fix: "Call devframe_connect_list-instances for the current instance list; the instance may have stopped or changed port.";
185
203
  };
186
204
  readonly DF0051: {
187
205
  readonly why: (p: {
@@ -201,7 +219,7 @@ declare const diagnostics: import("nostics").Diagnostics<{
201
219
  readonly why: (p: {
202
220
  id: string;
203
221
  }) => string;
204
- readonly fix: "Await `instance.ready` (or any request through `instance.handler`) before reading `connectionMeta()` — the WebSocket binding it describes is only known once initialization completes.";
222
+ readonly fix: "Await `instance.ready` (or any request through `instance.handler`) before reading `connectionMeta()`; the WebSocket binding it describes is only known once initialization completes.";
205
223
  };
206
224
  readonly DF0055: {
207
225
  readonly why: (p: {
@@ -217,7 +235,7 @@ declare const diagnostics: import("nostics").Diagnostics<{
217
235
  };
218
236
  readonly DF0057: {
219
237
  readonly why: () => string;
220
- readonly fix: "Clients connect over the SSE endpoint instead — no upgrade wiring is needed. Remove `ws: false` if the instance should serve a WebSocket after all.";
238
+ readonly fix: "Clients connect over the SSE endpoint instead, so no upgrade wiring is needed. Remove `ws: false` if the instance should serve a WebSocket after all.";
221
239
  };
222
240
  readonly DF0058: {
223
241
  readonly why: (p: {
@@ -248,7 +266,7 @@ declare const diagnostics: import("nostics").Diagnostics<{
248
266
  required: string;
249
267
  installed: string;
250
268
  }) => string;
251
- readonly fix: "Align the installed assets package with the version its node package declares — they are published in lockstep.";
269
+ readonly fix: "Align the installed assets package with the version its node package declares; they are published in lockstep.";
252
270
  };
253
271
  readonly DF0062: {
254
272
  readonly why: (p: {
@@ -278,7 +296,7 @@ declare const diagnostics: import("nostics").Diagnostics<{
278
296
  field: "package" | "version";
279
297
  value: string;
280
298
  }) => string;
281
- readonly fix: "A remote-assets `package` must be a valid npm package name and `version` an exact semver version (e.g. `1.2.3`) — they are interpolated into CDN URLs and the cache path.";
299
+ readonly fix: "A remote-assets `package` must be a valid npm package name and `version` an exact semver version (e.g. `1.2.3`); they are interpolated into CDN URLs and the cache path.";
282
300
  };
283
301
  readonly DF0066: {
284
302
  readonly why: (p: {
@@ -314,7 +332,7 @@ declare const diagnostics: import("nostics").Diagnostics<{
314
332
  package: string;
315
333
  reason: string;
316
334
  }) => string;
317
- readonly fix: "A service package's default export must be a factory returning a `DevframeServiceDefinition` — an object with `package`, `version`, `scope`, and a `setup` function.";
335
+ readonly fix: "A service package's default export must be a factory returning a `DevframeServiceDefinition`, an object with `package`, `version`, `scope`, and a `setup` function.";
318
336
  };
319
337
  readonly DF0072: {
320
338
  readonly why: (p: {
@@ -322,6 +340,18 @@ declare const diagnostics: import("nostics").Diagnostics<{
322
340
  }) => string;
323
341
  readonly fix: "Check the method id, and ensure the service/plugin that registers it is installed (e.g. declared in `services`) before the build collects the dump.";
324
342
  };
343
+ readonly DF0075: {
344
+ readonly why: (p: {
345
+ runtime: string;
346
+ }) => string;
347
+ readonly fix: "Keep the SSE endpoint enabled (drop `sse: false`) so clients connect over it on Bun/Deno, or move the socket to a side-car (`ws: { sidecar: true }`) which binds the native WebSocket adapter on its own port.";
348
+ };
349
+ readonly DF0076: {
350
+ readonly why: (p: {
351
+ runtime: string;
352
+ }) => string;
353
+ readonly fix: "On Bun/Deno, serve the advertised `__ws` route from `Bun.serve` / `Deno.serve` with `attachBunWsTransport` / `attachDenoWsTransport` (see the hub-deno-minimal example), or connect over the SSE endpoint instead.";
354
+ };
325
355
  }, readonly [(d: import("nostics").Diagnostic, { method }?: {
326
356
  method?: "log" | "warn" | "error";
327
357
  }) => void]>;
@@ -371,7 +401,7 @@ interface CreateH3DevframeHostOptions {
371
401
  */
372
402
  origin: string | (() => string);
373
403
  /**
374
- * Register a static-file handler at `base` serving files from `source` —
404
+ * Register a static-file handler at `base` serving files from `source`:
375
405
  * a local directory or a resolved remote-assets back-proxy store (both
376
406
  * accepted by `devframe/utils/serve-static`). `mountStatic` forwards to
377
407
  * it; when omitted the host serves no SPA (bridge mode, where the SPA is
@@ -394,7 +424,7 @@ interface CreateH3DevframeHostOptions {
394
424
  workspaceRoot?: string;
395
425
  }
396
426
  /**
397
- * h3-backed {@link DevframeHost} — used by the standalone CLI adapter.
427
+ * h3-backed {@link DevframeHost}, used by the standalone CLI adapter.
398
428
  */
399
429
  declare function createH3DevframeHost(options: CreateH3DevframeHostOptions): DevframeHost;
400
430
  //#endregion
@@ -427,7 +457,7 @@ interface RpcWireCodec {
427
457
  * JSON (methods declared `jsonSerializable: true`) and `s:`-prefixed
428
458
  * structured-clone (everything else, including all error envelopes), with a
429
459
  * request-id → method map so a response independently picks the same
430
- * encoder as its request. One codec per connection — request-id spaces
460
+ * encoder as its request. One codec per connection; request-id spaces
431
461
  * don't collide across connections.
432
462
  *
433
463
  * @internal
@@ -435,7 +465,7 @@ interface RpcWireCodec {
435
465
  declare function createRpcWireCodec(definitions?: ReadonlyMap<string, Pick<RpcFunctionDefinitionAny, 'jsonSerializable'>>): RpcWireCodec;
436
466
  /**
437
467
  * Peek at a wire frame's birpc envelope without engaging a codec's
438
- * request-id bookkeeping — used by the SSE transport to route a frame
468
+ * request-id bookkeeping; used by the SSE transport to route a frame
439
469
  * (park a POST for its response / answer with a bare 202) before it is
440
470
  * handed to birpc proper.
441
471
  *
@@ -446,4 +476,4 @@ declare function peekRpcWireFrame(raw: string): {
446
476
  i?: string;
447
477
  };
448
478
  //#endregion
449
- export { type AgentArgsFallback, type ContextRpcServer, type CreateContextRpcServerOptions, CreateH3DevframeHostOptions, type CreateInstanceShellOptions, DevframeAgentHost, type DevframeInstanceRecord, type DevframeInstanceRegistration, type InstanceRegisterConfig, type InstanceShell, type InstanceShellApi, type InstanceShellInit, type InstanceShellInternals, type InstanceWsTier, type RpcWireCodec, type StartedServer, coerceAgentPositionalArgs, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, diagnostics, importRuntimeModule, listLiveDevframeInstances, normalizeBasePath, normalizeHttpServerUrl, peekRpcWireFrame, registerDevframeInstance, resolveBasePath, resolveInstanceRegister, samePath };
479
+ export { type AgentArgsFallback, type ContextRpcServer, type CreateContextRpcServerOptions, CreateH3DevframeHostOptions, type CreateInstanceShellOptions, DevframeAgentHost, type DevframeInstanceRecord, type DevframeInstanceRegistration, type InstanceRegisterConfig, type InstanceShell, type InstanceShellApi, type InstanceShellInit, type InstanceShellInternals, type InstanceWsTier, type ResolvedMcpConfig, type RpcWireCodec, type StartedServer, coerceAgentPositionalArgs, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, diagnostics, importRuntimeModule, listLiveDevframeInstances, normalizeBasePath, normalizeHttpServerUrl, peekRpcWireFrame, registerDevframeInstance, resolveBasePath, resolveClientAssets, resolveInstanceRegister, resolveMcpConfig, samePath };
@@ -1,9 +1,10 @@
1
- import { n as peekRpcWireFrame, t as createRpcWireCodec } from "../wire-codec-0K-o5MYW.mjs";
2
- import { t as diagnostics } from "../diagnostics-BXWW3VK-.mjs";
3
- import { a as DevframeAgentHost, o as coerceAgentPositionalArgs } from "../services-install-CqqQVls5.mjs";
4
- import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-BM3PdYli.mjs";
5
- import { t as createH3DevframeHost } from "../host-h3-fRbF9yor.mjs";
6
- import { a as importRuntimeModule, i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-CpVW4zG0.mjs";
7
- import { i as registerDevframeInstance, n as listLiveDevframeInstances } from "../instance-registry-BjlMQbFB.mjs";
8
- import { t as createContextRpcServer } from "../rpc-core-DlHd276T.mjs";
9
- export { DevframeAgentHost, coerceAgentPositionalArgs, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, diagnostics, importRuntimeModule, listLiveDevframeInstances, normalizeBasePath, normalizeHttpServerUrl, peekRpcWireFrame, registerDevframeInstance, resolveBasePath, resolveInstanceRegister, samePath };
1
+ import { t as resolveClientAssets } from "../client-assets-DNdhagGm.mjs";
2
+ import { n as peekRpcWireFrame, t as createRpcWireCodec } from "../wire-codec-dcCeXcSo.mjs";
3
+ import { t as diagnostics } from "../diagnostics-BMfN8mb1.mjs";
4
+ import { a as DevframeAgentHost, o as coerceAgentPositionalArgs } from "../services-install-P_DV7VYL.mjs";
5
+ import { i as resolveMcpConfig, n as resolveBasePath, t as normalizeBasePath } from "../_shared-C08SdQRl.mjs";
6
+ import { t as createH3DevframeHost } from "../host-h3-BJ4siyz7.mjs";
7
+ import { a as importRuntimeModule, i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-cdVETpfz.mjs";
8
+ import { i as registerDevframeInstance, n as listLiveDevframeInstances } from "../instance-registry-C7-41RSp.mjs";
9
+ import { t as createContextRpcServer } from "../rpc-core-DVQ7xi89.mjs";
10
+ export { DevframeAgentHost, coerceAgentPositionalArgs, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, diagnostics, importRuntimeModule, listLiveDevframeInstances, normalizeBasePath, normalizeHttpServerUrl, peekRpcWireFrame, registerDevframeInstance, resolveBasePath, resolveClientAssets, resolveInstanceRegister, resolveMcpConfig, samePath };
@@ -1,3 +1,3 @@
1
- import { Ct as DevframeAuthHandler } from "../context-BhBzOXVa.mjs";
2
- import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, o as revokeActiveConnectionsForToken, r as getTempAuthCode, s as revokeAuthToken, t as buildOtpAuthUrl } from "../index-DcKxIMoI.mjs";
1
+ import { wt as DevframeAuthHandler } from "../context-4AIVRLYF.mjs";
2
+ import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, o as revokeActiveConnectionsForToken, r as getTempAuthCode, s as revokeAuthToken, t as buildOtpAuthUrl } from "../index-pKl67H6w.mjs";
3
3
  export { DevframeAuthHandler, buildOtpAuthUrl, exchangeTempAuthCode, getTempAuthCode, refreshTempAuthCode, revokeActiveConnectionsForToken, revokeAuthToken, verifyAuthToken };
@@ -1,3 +1,3 @@
1
- import { n as revokeAuthToken, t as revokeActiveConnectionsForToken } from "../revoke-COLW0cOi.mjs";
2
- import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, r as getTempAuthCode, t as buildOtpAuthUrl } from "../state-CK9LjrnT.mjs";
1
+ import { n as revokeAuthToken, t as revokeActiveConnectionsForToken } from "../revoke-cqztiCX4.mjs";
2
+ import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, r as getTempAuthCode, t as buildOtpAuthUrl } from "../state-CeQQWzM-.mjs";
3
3
  export { buildOtpAuthUrl, exchangeTempAuthCode, getTempAuthCode, refreshTempAuthCode, revokeActiveConnectionsForToken, revokeAuthToken, verifyAuthToken };
@@ -1,3 +1,3 @@
1
- import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-HOnG-WvG.mjs";
2
- import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-BJ6AmwTu.mjs";
1
+ import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-rgBSPFHS.mjs";
2
+ import { i as resolveBasePath, r as normalizeBasePath } from "../_shared-CK3czkH4.mjs";
3
3
  export { type DevframeInternalContext, type InternalAnonymousAuthStorage, type RemoteTokenRecord, getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
@@ -1,3 +1,3 @@
1
- import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-BM3PdYli.mjs";
2
- import { n as internalContextMap, t as getInternalContext } from "../context-KUqAfawQ.mjs";
1
+ import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-C08SdQRl.mjs";
2
+ import { n as internalContextMap, t as getInternalContext } from "../context-DIUvJW4D.mjs";
3
3
  export { getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };