devframe 0.9.0-beta.9 → 0.9.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.
Files changed (72) hide show
  1. package/dist/_shared-BM3PdYli.mjs +68 -0
  2. package/dist/{_shared-BPmX9fqK.d.mts → _shared-DqbKCAew.d.mts} +1 -1
  3. package/dist/adapters/build.d.mts +1 -1
  4. package/dist/adapters/build.mjs +8 -6
  5. package/dist/adapters/cac.d.mts +1 -1
  6. package/dist/adapters/cac.mjs +4 -3
  7. package/dist/adapters/dev.d.mts +3 -3
  8. package/dist/adapters/dev.mjs +2 -2
  9. package/dist/adapters/embedded.d.mts +1 -1
  10. package/dist/adapters/embedded.mjs +1 -0
  11. package/dist/adapters/initiate.d.mts +2 -2
  12. package/dist/adapters/initiate.mjs +1 -1
  13. package/dist/adapters/mcp.d.mts +1 -1
  14. package/dist/adapters/mcp.mjs +1 -1
  15. package/dist/cli/main.mjs +2 -2
  16. package/dist/client/index.d.mts +48 -2
  17. package/dist/client/index.mjs +131 -22
  18. package/dist/constants.d.mts +74 -2
  19. package/dist/constants.mjs +9 -2
  20. package/dist/{context-CEe4PBz1.mjs → context-Bdkakk8S.mjs} +319 -21
  21. package/dist/{context-xdynGSLP.mjs → context-CXhjygJU.mjs} +2 -2
  22. package/dist/{context-B3YUu_95.d.mts → context-dqyXS6o3.d.mts} +1 -1
  23. package/dist/{dev-Chvlqs7I.mjs → dev-C8VHtuPP.mjs} +12 -9
  24. package/dist/{devframe-DJMg0WLe.d.mts → devframe-BlLEZR-x.d.mts} +741 -588
  25. package/dist/{diagnostics-DOQPnQmX.mjs → diagnostics-Di8ytitn.mjs} +24 -0
  26. package/dist/{_shared-CKZPvSrN.mjs → dist-CZXfGEkd.mjs} +2 -68
  27. package/dist/events-DKfSmoTj.mjs +65 -0
  28. package/dist/{host-agent-xLCSe65D.mjs → host-agent-BDdcOXhG.mjs} +14 -13
  29. package/dist/{http-8Kpkap4_.mjs → http-BbHCU5Zs.mjs} +9 -6
  30. package/dist/{index-CB-fSUyn.d.mts → index-BKFT9-jA.d.mts} +2 -2
  31. package/dist/index.d.mts +2 -2
  32. package/dist/{instance-registry-WvQkt42E.mjs → instance-registry-CHunhMi5.mjs} +4 -4
  33. package/dist/{instance-shell-CljiKq1c.d.mts → instance-shell-0iw-cQ5V.d.mts} +2 -2
  34. package/dist/{instance-shell-XvN5USg4.mjs → instance-shell-DbDoozNM.mjs} +5 -5
  35. package/dist/internal/index.d.mts +46 -7
  36. package/dist/internal/index.mjs +8 -8
  37. package/dist/node/auth.d.mts +2 -2
  38. package/dist/node/auth.mjs +2 -2
  39. package/dist/node/hub-internals.d.mts +2 -2
  40. package/dist/node/hub-internals.mjs +2 -2
  41. package/dist/node/index.d.mts +1 -1
  42. package/dist/node/index.mjs +2 -2
  43. package/dist/recipes/common-rpc-functions.d.mts +1 -1
  44. package/dist/recipes/interactive-auth.d.mts +2 -2
  45. package/dist/recipes/interactive-auth.mjs +2 -2
  46. package/dist/{remote-assets-nTTxY2MU.mjs → remote-assets-DRfY2RjX.mjs} +6 -5
  47. package/dist/{revoke-DZbJ7Cl0.mjs → revoke-3Q6aDKWk.mjs} +2 -1
  48. package/dist/{rolldown-runtime-JspESFgx.mjs → rolldown-runtime-B4iAMlE-.mjs} +1 -1
  49. package/dist/rpc/transports/sse-client.mjs +1 -1
  50. package/dist/rpc/transports/sse-server.mjs +2 -2
  51. package/dist/rpc/transports/ws-bun.d.mts +1 -1
  52. package/dist/rpc/transports/ws-bun.mjs +1 -1
  53. package/dist/rpc/transports/ws-client.mjs +1 -1
  54. package/dist/rpc/transports/ws-server.mjs +1 -1
  55. package/dist/{rpc-core-Cc4lucI0.d.mts → rpc-core-CR8o34O9.d.mts} +2 -2
  56. package/dist/{rpc-core-DMTe-hLo.mjs → rpc-core-Dru9uoM0.mjs} +11 -4
  57. package/dist/{state-Cc1IeSmQ.mjs → state-CK9LjrnT.mjs} +1 -1
  58. package/dist/{storage-CYye7P7L.mjs → storage-D4a99Ung.mjs} +3 -3
  59. package/dist/types/index.d.mts +2 -2
  60. package/dist/utils/events.d.mts +1 -1
  61. package/dist/utils/get-port.d.mts +17 -0
  62. package/dist/utils/get-port.mjs +2 -0
  63. package/dist/utils/launch-editor.mjs +12 -11
  64. package/dist/utils/open.mjs +1 -1
  65. package/dist/utils/remote-assets.mjs +1 -1
  66. package/dist/utils/serve-static.mjs +6 -5
  67. package/dist/utils/shared-state.d.mts +1 -1
  68. package/dist/utils/streaming-channel.d.mts +1 -1
  69. package/dist/{wire-codec-GsoRxIsD.mjs → wire-codec-0K-o5MYW.mjs} +0 -2
  70. package/dist/{ws-server-BiUne4K7.mjs → ws-server-BdSLrhxE.mjs} +1 -1
  71. package/package.json +2 -1
  72. package/dist/{host-h3-Crkzm42q.mjs → host-h3-fRbF9yor.mjs} +1 -1
@@ -137,6 +137,30 @@ const diagnostics = defineDiagnostics({
137
137
  DF0065: {
138
138
  why: (p) => `Invalid remote-assets ${p.field} "${p.value}".`,
139
139
  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."
140
+ },
141
+ DF0066: {
142
+ why: (p) => `Service "${p.package}" is already installed — keeping the first installation and ignoring this one's options.`,
143
+ fix: "Option sets only merge before `ctx.services.ready()` fires. Install the service (or declare it in `DevframeDefinition.services`) before the barrier so its options join the merge."
144
+ },
145
+ DF0067: {
146
+ why: (p) => `Failed to import the required service package "${p.package}": ${p.reason}`,
147
+ fix: "Install the service package next to whoever declares it (a plugin declaring it in `services` should list it in its own dependencies), or drop `required: true` to degrade gracefully when it is absent."
148
+ },
149
+ DF0068: {
150
+ why: (p) => `The installed service "${p.package}@${p.installed}" does not satisfy the required range "${p.required}".`,
151
+ fix: "Align the installed service package with the range its declarer requires, or drop `required: true` to downgrade the mismatch to a warning."
152
+ },
153
+ DF0069: {
154
+ why: (p) => `The installed service "${p.package}@${p.installed}" does not satisfy the declared range "${p.required}" — installing it anyway.`,
155
+ fix: "The advertised meta carries the real version, so clients can gate on it. Align the installed service package with the declared range to silence this warning."
156
+ },
157
+ DF0070: {
158
+ why: (p) => `Invalid service "${p.package}": ${p.reason}`,
159
+ fix: "A service package's default export must be a factory returning a `DevframeServiceDefinition` — an object with `package`, `version`, `scope`, and a `setup` function."
160
+ },
161
+ DF0071: {
162
+ why: (p) => `Deferred service installation failed while flushing on the first client connection: ${p.reason}`,
163
+ fix: "Call `ctx.services.ready()` explicitly after every devframe's setup has run (the first-party adapters do) so installation errors surface at startup instead of at connect time."
140
164
  }
141
165
  }
142
166
  });
@@ -1,9 +1,7 @@
1
- import { n as __exportAll } from "./rolldown-runtime-JspESFgx.mjs";
2
- import "./constants.mjs";
1
+ import { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.mjs";
3
2
  import "node:fs/promises";
4
3
  import { createServer } from "node:net";
5
4
  import { networkInterfaces } from "node:os";
6
- import { cleanDoubleSlashes, withLeadingSlash, withTrailingSlash, withoutLeadingSlash } from "ufo";
7
5
  //#region ../../node_modules/.pnpm/get-port-please@3.2.0/node_modules/get-port-please/dist/index.mjs
8
6
  var dist_exports = /* @__PURE__ */ __exportAll({
9
7
  checkPort: () => checkPort,
@@ -227,68 +225,4 @@ async function checkPort(port, host = process.env.HOST, verbose) {
227
225
  return port;
228
226
  }
229
227
  //#endregion
230
- //#region src/adapters/_shared.ts
231
- const DEFAULT_PORT = 9999;
232
- /**
233
- * Resolve the mount base path for a devframe's SPA. Hosted adapters
234
- * (`vite`, `embedded`) default to `/__<id>/` so they don't collide
235
- * with the host app; standalone adapters (`cli`, `build`)
236
- * default to `/` because they own the origin.
237
- *
238
- * The devframe author can override with `basePath` on the definition.
239
- */
240
- function resolveBasePath(def, kind) {
241
- if (def.basePath) return normalizeBasePath(def.basePath);
242
- return kind === "standalone" ? "/" : `/__${def.id}/`;
243
- }
244
- function normalizeBasePath(base) {
245
- return cleanDoubleSlashes(withTrailingSlash(withLeadingSlash(base)));
246
- }
247
- /**
248
- * Resolve the listening port for `createDevServer` (and `createHandler`'s
249
- * side-car tiers), honoring the definition's `cli.port` / `cli.portRange` /
250
- * `cli.random` settings. Exposed separately so authors who run their own
251
- * argv parsing can resolve a port up-front (to print it, log it, etc.)
252
- * before starting the server.
253
- */
254
- async function resolveDevServerPort(def, options = {}) {
255
- const host = options.host ?? def.cli?.host ?? "localhost";
256
- const portOptions = {
257
- port: options.defaultPort ?? def.cli?.port ?? DEFAULT_PORT,
258
- host
259
- };
260
- if (def.cli?.portRange) portOptions.portRange = def.cli.portRange;
261
- if (def.cli?.random) portOptions.random = def.cli.random;
262
- return getPort(portOptions);
263
- }
264
- /**
265
- * Normalize the `cli.mcp` / `mcp` option (`boolean | McpRouteOptions`) into
266
- * concrete options, or `undefined` when the MCP route is disabled.
267
- */
268
- function resolveMcpConfig(mcp) {
269
- if (!mcp) return void 0;
270
- return mcp === true ? {} : mcp;
271
- }
272
- /**
273
- * Resolve the `mcp` entry a `__connection.json` should advertise for a dev
274
- * server started with the given `mcp` option (falling back to `def.cli?.mcp`,
275
- * exactly like `createDevServer`), or `undefined` when the route is
276
- * disabled.
277
- *
278
- * Hosted bridges that hand-roll their connection meta pass the side-car
279
- * `port`: the advertised path becomes absolute (the side-car mounts at `/`)
280
- * and the client dials `<page-host>:<port><path>`. Without `port` the path
281
- * stays relative, resolved against `__connection.json`'s own location (the
282
- * same-server default).
283
- */
284
- function resolveMcpConnectionMeta(def, mcp, port) {
285
- const config = resolveMcpConfig(mcp ?? def.cli?.mcp);
286
- if (!config) return void 0;
287
- const route = withoutLeadingSlash(config.path ?? "__mcp");
288
- return port != null ? {
289
- path: withLeadingSlash(route),
290
- port
291
- } : { path: route };
292
- }
293
- //#endregion
294
- export { dist_exports as a, resolveMcpConnectionMeta as i, resolveBasePath as n, resolveDevServerPort as r, normalizeBasePath as t };
228
+ export { getPort as n, dist_exports as t };
@@ -0,0 +1,65 @@
1
+ //#region src/events.ts
2
+ /**
3
+ * Centralized registry of the core devframe event names — the node-side host
4
+ * bus events, the client RPC connection events, and the server→client
5
+ * broadcast notifications — so these names live in one place instead of
6
+ * scattered string literals.
7
+ *
8
+ * **Keep this in sync with [`docs/guide/events.md`](../../../docs/guide/events.md)**
9
+ * (the "Core devframe events" section): every name here appears in that page's
10
+ * tables, and every name there resolves to an entry here. Add, rename, or
11
+ * remove a name in both places in the same change, and reference
12
+ * `DEVFRAME_EVENTS.*` from call sites instead of re-typing a literal.
13
+ *
14
+ * This map covers **notifications** (events, broadcasts). The request/response
15
+ * RPC endpoints of the shared-state, streaming, and auth-handshake protocols
16
+ * (`devframe:rpc:server-state:*`, `devframe:streaming:subscribe`,
17
+ * `anonymous:devframe:auth`, …) are defined at their handlers and typed in
18
+ * `types/rpc-augments.ts`; they aren't events and stay out of this map.
19
+ *
20
+ * The `EventEmitter` maps (`RpcClientEvents`, `DevframeAgentHostEvents`) and the
21
+ * `DevframeRpcClientFunctions` augmentation declare these names as type-level
22
+ * keys (a literal is unavoidable in a type position); those declarations mirror
23
+ * this map and move with it.
24
+ */
25
+ const DEVFRAME_EVENTS = {
26
+ /**
27
+ * Node-side host `EventEmitter` events. The agent host (`ctx.agent.events`)
28
+ * emits these as its tool/resource surface changes; protocol adapters (e.g.
29
+ * MCP) subscribe to re-publish their manifest.
30
+ */
31
+ bus: {
32
+ agentManifestChanged: "agent:manifest:changed",
33
+ agentToolRegistered: "agent:tool:registered",
34
+ agentToolUnregistered: "agent:tool:unregistered",
35
+ agentResourceRegistered: "agent:resource:registered",
36
+ agentResourceUnregistered: "agent:resource:unregistered"
37
+ },
38
+ /**
39
+ * Client-side RPC connection `EventEmitter` events (`rpc.events`) a UI
40
+ * subscribes to for connection lifecycle and error surfacing.
41
+ */
42
+ client: {
43
+ isTrustedUpdated: "rpc:is-trusted:updated",
44
+ error: "rpc:error",
45
+ connectionStatus: "connection:status",
46
+ connectionError: "connection:error"
47
+ },
48
+ /**
49
+ * Broadcast notifications the server pushes to clients (server → client),
50
+ * `devframe:` prefix. The paired request methods (subscribe/get/set/…) are
51
+ * RPC endpoints, not events, and are omitted deliberately.
52
+ */
53
+ broadcast: {
54
+ authRevoked: "devframe:auth:revoked",
55
+ clientStateUpdated: "devframe:rpc:client-state:updated",
56
+ clientStatePatch: "devframe:rpc:client-state:patch",
57
+ streamingChunk: "devframe:streaming:chunk",
58
+ streamingEnd: "devframe:streaming:end",
59
+ streamingUploadCancel: "devframe:streaming:upload-cancel"
60
+ },
61
+ /** `postMessage` channels the runtime posts across window boundaries. */
62
+ postMessage: { remoteAssetsError: "devframe:remote-assets-error" }
63
+ };
64
+ //#endregion
65
+ export { DEVFRAME_EVENTS as t };
@@ -1,4 +1,5 @@
1
- import { t as diagnostics } from "./diagnostics-DOQPnQmX.mjs";
1
+ import { t as DEVFRAME_EVENTS } from "./events-DKfSmoTj.mjs";
2
+ import { t as diagnostics } from "./diagnostics-Di8ytitn.mjs";
2
3
  //#region src/utils/events.ts
3
4
  /**
4
5
  * Create event emitter.
@@ -90,7 +91,7 @@ var DevframeAgentHost = class {
90
91
  constructor(context) {
91
92
  this.context = context;
92
93
  this._rpcUnsubscribe = context.rpc.onChanged(() => {
93
- this.events.emit("agent:manifest:changed");
94
+ this.events.emit(DEVFRAME_EVENTS.bus.agentManifestChanged);
94
95
  });
95
96
  }
96
97
  registerTool(input) {
@@ -100,28 +101,28 @@ var DevframeAgentHost = class {
100
101
  tool,
101
102
  handler: input.handler
102
103
  });
103
- this.events.emit("agent:tool:registered", tool);
104
- this.events.emit("agent:manifest:changed");
104
+ this.events.emit(DEVFRAME_EVENTS.bus.agentToolRegistered, tool);
105
+ this.events.emit(DEVFRAME_EVENTS.bus.agentManifestChanged);
105
106
  return { unregister: () => this.unregisterTool(tool.id) };
106
107
  }
107
108
  unregisterTool(id) {
108
109
  const existed = this.tools.delete(id);
109
110
  if (existed) {
110
- this.events.emit("agent:tool:unregistered", id);
111
- this.events.emit("agent:manifest:changed");
111
+ this.events.emit(DEVFRAME_EVENTS.bus.agentToolUnregistered, id);
112
+ this.events.emit(DEVFRAME_EVENTS.bus.agentManifestChanged);
112
113
  }
113
114
  return existed;
114
115
  }
115
116
  registerToolProvider(provider) {
116
117
  this.providers.add(provider);
117
- this.events.emit("agent:manifest:changed");
118
+ this.events.emit(DEVFRAME_EVENTS.bus.agentManifestChanged);
118
119
  const notifyChanged = () => {
119
- if (this.providers.has(provider)) this.events.emit("agent:manifest:changed");
120
+ if (this.providers.has(provider)) this.events.emit(DEVFRAME_EVENTS.bus.agentManifestChanged);
120
121
  };
121
122
  return {
122
123
  notifyChanged,
123
124
  unregister: () => {
124
- if (this.providers.delete(provider)) this.events.emit("agent:manifest:changed");
125
+ if (this.providers.delete(provider)) this.events.emit(DEVFRAME_EVENTS.bus.agentManifestChanged);
125
126
  }
126
127
  };
127
128
  }
@@ -138,15 +139,15 @@ var DevframeAgentHost = class {
138
139
  resource,
139
140
  read: input.read
140
141
  });
141
- this.events.emit("agent:resource:registered", resource);
142
- this.events.emit("agent:manifest:changed");
142
+ this.events.emit(DEVFRAME_EVENTS.bus.agentResourceRegistered, resource);
143
+ this.events.emit(DEVFRAME_EVENTS.bus.agentManifestChanged);
143
144
  return { unregister: () => this.unregisterResource(resource.id) };
144
145
  }
145
146
  unregisterResource(id) {
146
147
  const existed = this.resources.delete(id);
147
148
  if (existed) {
148
- this.events.emit("agent:resource:unregistered", id);
149
- this.events.emit("agent:manifest:changed");
149
+ this.events.emit(DEVFRAME_EVENTS.bus.agentResourceUnregistered, id);
150
+ this.events.emit(DEVFRAME_EVENTS.bus.agentManifestChanged);
150
151
  }
151
152
  return existed;
152
153
  }
@@ -1,12 +1,13 @@
1
- import { n as __exportAll } from "./rolldown-runtime-JspESFgx.mjs";
1
+ import { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.mjs";
2
2
  import { t as Diagnostic } from "./nostics-CzECRXpE.mjs";
3
- import { i as isAllowedOrigin } from "./ws-server-BiUne4K7.mjs";
4
- import { t as diagnostics } from "./diagnostics-DOQPnQmX.mjs";
5
- import { t as createHostContext } from "./context-CEe4PBz1.mjs";
3
+ import { t as DEVFRAME_EVENTS } from "./events-DKfSmoTj.mjs";
4
+ import { i as isAllowedOrigin } from "./ws-server-BdSLrhxE.mjs";
5
+ import { t as diagnostics } from "./diagnostics-Di8ytitn.mjs";
6
+ import { t as createHostContext } from "./context-Bdkakk8S.mjs";
6
7
  import { t as toAgentToolName } from "./agent-tool-name-EgfoFO8C.mjs";
7
8
  import { randomUUID } from "node:crypto";
8
- import { join } from "pathe";
9
9
  import process from "node:process";
10
+ import { join } from "pathe";
10
11
  import { homedir } from "node:os";
11
12
  import { defineHandler } from "h3";
12
13
  import { Server, WebStandardStreamableHTTPServerTransport, isInitializeRequest } from "@modelcontextprotocol/server";
@@ -172,7 +173,7 @@ function buildMcpServerFromContext(ctx, options) {
172
173
  const notify = (method) => {
173
174
  server.notification({ method }).catch(() => {});
174
175
  };
175
- const offManifest = ctx.agent.events.on("agent:manifest:changed", () => {
176
+ const offManifest = ctx.agent.events.on(DEVFRAME_EVENTS.bus.agentManifestChanged, () => {
176
177
  notify("notifications/tools/list_changed");
177
178
  notify("notifications/resources/list_changed");
178
179
  });
@@ -210,7 +211,9 @@ async function createMcpServer(definition, options = {}) {
210
211
  }
211
212
  }
212
213
  });
214
+ for (const input of definition.services ?? []) ctx.services.install(input, { resolveFrom: definition.packageName });
213
215
  await definition.setup(ctx);
216
+ await ctx.services.ready();
214
217
  const { server, dispose } = buildMcpServerFromContext(ctx, {
215
218
  serverName: options.serverName ?? `${definition.id} (devframe)`,
216
219
  serverVersion: options.serverVersion ?? definition.version ?? "0.0.0",
@@ -1,5 +1,5 @@
1
- import { R as DevframeNodeRpcSession, g as DevframeNodeContext, lt as SharedState } from "./devframe-DJMg0WLe.mjs";
2
- import { n as InternalAnonymousAuthStorage } from "./context-B3YUu_95.mjs";
1
+ import { _ as DevframeNodeRpcSession, g as DevframeNodeContext, gt as SharedState } from "./devframe-BlLEZR-x.mjs";
2
+ import { n as InternalAnonymousAuthStorage } from "./context-dqyXS6o3.mjs";
3
3
  //#region src/node/auth/revoke.d.ts
4
4
  /**
5
5
  * Flip `isTrusted` to false on any live WS clients connected with `token`
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ScopedServerFunctions, B as RpcFunctionsHost, C as DevframeScopedStreamingHost, Ct as DevframeAgentHost, D as ScopedBroadcastOptions, Dt as EventsMap, E as DevframeSettingsStore, Et as EventUnsubscribe, F as DevframeStorageScope, G as RpcStreamingHost, H as RpcSharedStateHost, I as DevframeDiagnosticsHost, J as DevframeRpcSharedStates, K as DevframeRpcClientFunctions, L as DevframeDiagnosticsLogger, M as SettingsForNamespace, N as DevframeViewHost, O as ScopedClientFunctions, P as DevframeHost, R as DevframeNodeRpcSession, S as DevframeScopedNodeRpc, St as AgentToolProviderHandle, T as DevframeSettingsRegistry, Tt as EventEmitter, U as RpcStreamingChannel, V as RpcSharedStateGetOptions, W as RpcStreamingChannelOptions, _ as DevframeServiceId, _t as AgentResourceContent, a as DevframeDuplicationStrategy, b as DevframeServicesRegistry, bt as AgentToolInput, c as DevframeWsOptions, d as ConnectionMeta, f as ConnectionMetaSse, g as DevframeNodeContext, gt as AgentResource, h as DevframeConnectionConfigsRegistry, ht as AgentManifest, i as DevframeDockDefaults, j as ScopedSharedStates, k as ScopedRpcFn, l as McpRouteOptions, m as DevframeCapabilities, mt as AgentHandle, n as DevframeDefinition, o as DevframeSetupInfo, p as ConnectionMetaWebsocket, q as DevframeRpcServerFunctions, r as DevframeDeploymentKind, s as DevframeSseOptions, t as DevframeCliOptions, v as DevframeServiceOf, vt as AgentResourceInput, w as DevframeSettings, wt as DevframeAgentHostEvents, x as DevframeScopedNodeContext, xt as AgentToolProvider, y as DevframeServicesHost, yt as AgentTool, z as RpcBroadcastOptions } from "./devframe-DJMg0WLe.mjs";
1
+ import { $ as DevframeStorageScope, A as DevframeServiceId, At as DevframeAgentHost, B as DevframeScopedNodeRpc, C as RpcStreamingChannelOptions, Ct as AgentResource, D as DevframeRpcSharedStates, Dt as AgentToolInput, E as DevframeRpcServerFunctions, Et as AgentTool, F as DevframeServicesHost, G as ScopedBroadcastOptions, H as DevframeSettings, I as DevframeServicesRegistry, J as ScopedServerFunctions, K as ScopedClientFunctions, L as DevframeServicesScopeRegistry, M as DevframeServiceMeta, Mt as EventEmitter, N as DevframeServiceOf, Nt as EventUnsubscribe, O as DevframeServiceDefinition, Ot as AgentToolProvider, P as DevframeServiceScopeOf, Pt as EventsMap, Q as DevframeHost, R as DevframeServicesState, S as RpcStreamingChannel, St as AgentManifest, T as DevframeRpcClientFunctions, Tt as AgentResourceInput, U as DevframeSettingsRegistry, V as DevframeScopedStreamingHost, W as DevframeSettingsStore, X as SettingsForNamespace, Y as ScopedSharedStates, Z as DevframeViewHost, _ as DevframeNodeRpcSession, a as DevframeDuplicationStrategy, b as RpcSharedStateGetOptions, c as DevframeWsOptions, d as ConnectionMeta, et as DevframeDiagnosticsHost, f as ConnectionMetaSse, g as DevframeNodeContext, h as DevframeConnectionConfigsRegistry, i as DevframeDockDefaults, j as DevframeServiceInput, jt as DevframeAgentHostEvents, k as DevframeServiceDescriptor, kt as AgentToolProviderHandle, l as McpRouteOptions, m as DevframeCapabilities, n as DevframeDefinition, o as DevframeSetupInfo, p as ConnectionMetaWebsocket, q as ScopedRpcFn, r as DevframeDeploymentKind, s as DevframeSseOptions, t as DevframeCliOptions, tt as DevframeDiagnosticsLogger, v as RpcBroadcastOptions, w as RpcStreamingHost, wt as AgentResourceContent, x as RpcSharedStateHost, xt as AgentHandle, y as RpcFunctionsHost, z as DevframeScopedNodeContext } from "./devframe-BlLEZR-x.mjs";
2
2
  import "./index-tdrk1bzV.mjs";
3
3
  import { C as RpcFunctionType, T as RpcReturnSchema, _ as RpcFunctionDefinition, g as RpcFunctionAgentOptions, i as RpcArgsSchema } from "./types-Djq7CBXh.mjs";
4
4
  import { d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, p as DevframeRpcTransportKind, u as DevframeNodeRpcSessionMeta } from "./ws-server-D1d3QM9f.mjs";
@@ -12,4 +12,4 @@ declare const defineRpcFunction: <NAME extends string, TYPE extends RpcFunctionT
12
12
  */
13
13
  declare function defineDevframe(d: DevframeDefinition): DevframeDefinition;
14
14
  //#endregion
15
- export { type AgentHandle, type AgentManifest, type AgentResource, type AgentResourceContent, type AgentResourceInput, type AgentTool, type AgentToolInput, type AgentToolProvider, type AgentToolProviderHandle, type ConnectionMeta, type ConnectionMetaSse, type ConnectionMetaWebsocket, type DevframeAgentHost, type DevframeAgentHostEvents, type DevframeCapabilities, type DevframeCliOptions, type DevframeConnectionConfigsRegistry, type DevframeDefineDiagnosticsOptions, type DevframeDefinition, type DevframeDeploymentKind, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDockDefaults, type DevframeDuplicationStrategy, type DevframeHost, type DevframeNodeContext, type DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, type DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, type DevframeRpcTransportKind, type DevframeScopedNodeContext, type DevframeScopedNodeRpc, type DevframeScopedStreamingHost, type DevframeServiceId, type DevframeServiceOf, type DevframeServicesHost, type DevframeServicesRegistry, type DevframeSettings, type DevframeSettingsRegistry, type DevframeSettingsStore, type DevframeSetupInfo, type DevframeSseOptions, type DevframeStorageScope, type DevframeViewHost, type DevframeWsOptions, type EventEmitter, type EventUnsubscribe, type EventsMap, type McpRouteOptions, type RemoteAssets, type RemoteAssetsErrorMessage, type RemoteAssetsProvider, type RemoteAssetsProviderCustom, type RemoteAssetsStore, type RpcBroadcastOptions, type RpcFunctionAgentOptions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type ScopedBroadcastOptions, type ScopedClientFunctions, type ScopedRpcFn, type ScopedServerFunctions, type ScopedSharedStates, type SettingsForNamespace, type StaticAssetsSource, defineDevframe, defineRpcFunction };
15
+ export { type AgentHandle, type AgentManifest, type AgentResource, type AgentResourceContent, type AgentResourceInput, type AgentTool, type AgentToolInput, type AgentToolProvider, type AgentToolProviderHandle, type ConnectionMeta, type ConnectionMetaSse, type ConnectionMetaWebsocket, type DevframeAgentHost, type DevframeAgentHostEvents, type DevframeCapabilities, type DevframeCliOptions, type DevframeConnectionConfigsRegistry, type DevframeDefineDiagnosticsOptions, type DevframeDefinition, type DevframeDeploymentKind, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDockDefaults, type DevframeDuplicationStrategy, type DevframeHost, type DevframeNodeContext, type DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, type DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, type DevframeRpcTransportKind, type DevframeScopedNodeContext, type DevframeScopedNodeRpc, type DevframeScopedStreamingHost, type DevframeServiceDefinition, type DevframeServiceDescriptor, type DevframeServiceId, type DevframeServiceInput, type DevframeServiceMeta, type DevframeServiceOf, type DevframeServiceScopeOf, type DevframeServicesHost, type DevframeServicesRegistry, type DevframeServicesScopeRegistry, type DevframeServicesState, type DevframeSettings, type DevframeSettingsRegistry, type DevframeSettingsStore, type DevframeSetupInfo, type DevframeSseOptions, type DevframeStorageScope, type DevframeViewHost, type DevframeWsOptions, type EventEmitter, type EventUnsubscribe, type EventsMap, type McpRouteOptions, type RemoteAssets, type RemoteAssetsErrorMessage, type RemoteAssetsProvider, type RemoteAssetsProviderCustom, type RemoteAssetsStore, type RpcBroadcastOptions, type RpcFunctionAgentOptions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type ScopedBroadcastOptions, type ScopedClientFunctions, type ScopedRpcFn, type ScopedServerFunctions, type ScopedSharedStates, type SettingsForNamespace, type StaticAssetsSource, defineDevframe, defineRpcFunction };
@@ -1,8 +1,8 @@
1
- import { n as __exportAll } from "./rolldown-runtime-JspESFgx.mjs";
2
- import { t as diagnostics } from "./diagnostics-DOQPnQmX.mjs";
3
- import { mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
4
- import { join } from "pathe";
1
+ import { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.mjs";
2
+ import { t as diagnostics } from "./diagnostics-Di8ytitn.mjs";
5
3
  import process from "node:process";
4
+ import { join } from "pathe";
5
+ import { mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
6
6
  import { homedir } from "node:os";
7
7
  //#region src/node/instance-registry.ts
8
8
  var instance_registry_exports = /* @__PURE__ */ __exportAll({
@@ -1,6 +1,6 @@
1
- import { K as DevframeRpcClientFunctions, R as DevframeNodeRpcSession, c as DevframeWsOptions, d as ConnectionMeta, g as DevframeNodeContext, q as DevframeRpcServerFunctions, s as DevframeSseOptions, u as DevframeAuthHandler } from "./devframe-DJMg0WLe.mjs";
1
+ import { E as DevframeRpcServerFunctions, T as DevframeRpcClientFunctions, _ as DevframeNodeRpcSession, c as DevframeWsOptions, d as ConnectionMeta, g as DevframeNodeContext, s as DevframeSseOptions, u as DevframeAuthHandler } from "./devframe-BlLEZR-x.mjs";
2
2
  import { d as DevframeRpcConnection, n as WsOriginRegistry, u as DevframeNodeRpcSessionMeta } from "./ws-server-D1d3QM9f.mjs";
3
- import "./index-CB-fSUyn.mjs";
3
+ import "./index-BKFT9-jA.mjs";
4
4
  import { BirpcGroup } from "birpc";
5
5
  import { NodeAdapter } from "crossws/adapters/node";
6
6
  import { Buffer } from "node:buffer";
@@ -1,6 +1,6 @@
1
1
  import "./constants.mjs";
2
- import { t as diagnostics } from "./diagnostics-DOQPnQmX.mjs";
3
- import { t as getInternalContext } from "./context-xdynGSLP.mjs";
2
+ import { t as diagnostics } from "./diagnostics-Di8ytitn.mjs";
3
+ import { t as getInternalContext } from "./context-CXhjygJU.mjs";
4
4
  import { createInteractiveAuth } from "./recipes/interactive-auth.mjs";
5
5
  import { createServer } from "node:http";
6
6
  import process from "node:process";
@@ -197,7 +197,7 @@ function createInstanceShell(options) {
197
197
  const origin = currentOrigin();
198
198
  if (!cfg || registerPromise || !origin || !meta) return;
199
199
  const resolvedMeta = meta;
200
- registerPromise = import("./instance-registry-WvQkt42E.mjs").then((n) => n.t).then(({ registerDevframeInstance }) => {
200
+ registerPromise = import("./instance-registry-CHunhMi5.mjs").then((n) => n.t).then(({ registerDevframeInstance }) => {
201
201
  let port = 0;
202
202
  try {
203
203
  const url = new URL(origin);
@@ -257,7 +257,7 @@ function createInstanceShell(options) {
257
257
  let resolvedAuth = false;
258
258
  let corePromise;
259
259
  function ensureCore() {
260
- corePromise ??= import("./rpc-core-DMTe-hLo.mjs").then((n) => n.n).then(({ createContextRpcServer }) => createContextRpcServer({
260
+ corePromise ??= import("./rpc-core-Dru9uoM0.mjs").then((n) => n.n).then(({ createContextRpcServer }) => createContextRpcServer({
261
261
  context: ctx,
262
262
  auth: resolvedAuth,
263
263
  onPeerConnect: options.onPeerConnect,
@@ -298,7 +298,7 @@ function createInstanceShell(options) {
298
298
  allowedOrigins: options.allowedOrigins
299
299
  });
300
300
  if (ws.port != null) return await start(ws.port);
301
- const { getPort } = await import("./_shared-CKZPvSrN.mjs").then((n) => n.a);
301
+ const { getPort } = await import("./dist-CZXfGEkd.mjs").then((n) => n.t);
302
302
  let lastError;
303
303
  for (let attempt = 0; attempt < 3; attempt++) {
304
304
  const port = attempt === 0 && options.resolveSidecarPort ? await options.resolveSidecarPort(sidecarHost) : await getPort({
@@ -1,9 +1,9 @@
1
- import { Ct as DevframeAgentHost$1, P as DevframeHost, St as AgentToolProviderHandle, Tt as EventEmitter, _t as AgentResourceContent, bt as AgentToolInput, g as DevframeNodeContext, gt as AgentResource, ht as AgentManifest, mt as AgentHandle, vt as AgentResourceInput, wt as DevframeAgentHostEvents, xt as AgentToolProvider, yt as AgentTool } from "../devframe-DJMg0WLe.mjs";
1
+ import { At as DevframeAgentHost$1, Ct as AgentResource, Dt as AgentToolInput, Et as AgentTool, Mt as EventEmitter, Ot as AgentToolProvider, Q as DevframeHost, St as AgentManifest, Tt as AgentResourceInput, g as DevframeNodeContext, jt as DevframeAgentHostEvents, kt as AgentToolProviderHandle, wt as AgentResourceContent, xt as AgentHandle } from "../devframe-BlLEZR-x.mjs";
2
2
  import { v as RpcFunctionDefinitionAny } from "../types-Djq7CBXh.mjs";
3
3
  import { a as RemoteAssetsStore } from "../remote-assets-Bg4gCUZ_.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-CljiKq1c.mjs";
5
- import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-BPmX9fqK.mjs";
6
- import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-Cc4lucI0.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-0iw-cQ5V.mjs";
5
+ import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-DqbKCAew.mjs";
6
+ import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-CR8o34O9.mjs";
7
7
  //#region src/node/agent-args.d.ts
8
8
  /**
9
9
  * How {@link coerceAgentPositionalArgs} treats an args object that carries
@@ -280,6 +280,48 @@ declare const diagnostics: import("nostics").Diagnostics<{
280
280
  }) => string;
281
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.";
282
282
  };
283
+ readonly DF0066: {
284
+ readonly why: (p: {
285
+ package: string;
286
+ }) => string;
287
+ readonly fix: "Option sets only merge before `ctx.services.ready()` fires. Install the service (or declare it in `DevframeDefinition.services`) before the barrier so its options join the merge.";
288
+ };
289
+ readonly DF0067: {
290
+ readonly why: (p: {
291
+ package: string;
292
+ reason: string;
293
+ }) => string;
294
+ readonly fix: "Install the service package next to whoever declares it (a plugin declaring it in `services` should list it in its own dependencies), or drop `required: true` to degrade gracefully when it is absent.";
295
+ };
296
+ readonly DF0068: {
297
+ readonly why: (p: {
298
+ package: string;
299
+ required: string;
300
+ installed: string;
301
+ }) => string;
302
+ readonly fix: "Align the installed service package with the range its declarer requires, or drop `required: true` to downgrade the mismatch to a warning.";
303
+ };
304
+ readonly DF0069: {
305
+ readonly why: (p: {
306
+ package: string;
307
+ required: string;
308
+ installed: string;
309
+ }) => string;
310
+ readonly fix: "The advertised meta carries the real version, so clients can gate on it. Align the installed service package with the declared range to silence this warning.";
311
+ };
312
+ readonly DF0070: {
313
+ readonly why: (p: {
314
+ package: string;
315
+ reason: string;
316
+ }) => 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.";
318
+ };
319
+ readonly DF0071: {
320
+ readonly why: (p: {
321
+ reason: string;
322
+ }) => string;
323
+ readonly fix: "Call `ctx.services.ready()` explicitly after every devframe's setup has run (the first-party adapters do) so installation errors surface at startup instead of at connect time.";
324
+ };
283
325
  }, readonly [(d: import("nostics").Diagnostic, { method }?: {
284
326
  method?: "log" | "warn" | "error";
285
327
  }) => void]>;
@@ -364,7 +406,6 @@ declare function normalizeHttpServerUrl(host: string, port: number | string): st
364
406
  * The per-connection `serialize`/`deserialize` pair for a live RPC wire.
365
407
  *
366
408
  * @internal
367
- * implementations; not part of the stable public API.
368
409
  */
369
410
  interface RpcWireCodec {
370
411
  serialize: (msg: any) => string;
@@ -380,7 +421,6 @@ interface RpcWireCodec {
380
421
  * don't collide across connections.
381
422
  *
382
423
  * @internal
383
- * implementations; not part of the stable public API.
384
424
  */
385
425
  declare function createRpcWireCodec(definitions?: ReadonlyMap<string, Pick<RpcFunctionDefinitionAny, 'jsonSerializable'>>): RpcWireCodec;
386
426
  /**
@@ -390,7 +430,6 @@ declare function createRpcWireCodec(definitions?: ReadonlyMap<string, Pick<RpcFu
390
430
  * handed to birpc proper.
391
431
  *
392
432
  * @internal
393
- * implementations; not part of the stable public API.
394
433
  */
395
434
  declare function peekRpcWireFrame(raw: string): {
396
435
  t?: string;
@@ -1,9 +1,9 @@
1
- import { n as peekRpcWireFrame, t as createRpcWireCodec } from "../wire-codec-GsoRxIsD.mjs";
2
- import { t as diagnostics } from "../diagnostics-DOQPnQmX.mjs";
3
- import { n as coerceAgentPositionalArgs, t as DevframeAgentHost } from "../host-agent-xLCSe65D.mjs";
4
- import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-CKZPvSrN.mjs";
5
- import { t as createH3DevframeHost } from "../host-h3-Crkzm42q.mjs";
6
- import { i as registerDevframeInstance, n as listLiveDevframeInstances } from "../instance-registry-WvQkt42E.mjs";
7
- import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-XvN5USg4.mjs";
8
- import { t as createContextRpcServer } from "../rpc-core-DMTe-hLo.mjs";
1
+ import { n as peekRpcWireFrame, t as createRpcWireCodec } from "../wire-codec-0K-o5MYW.mjs";
2
+ import { t as diagnostics } from "../diagnostics-Di8ytitn.mjs";
3
+ import { n as coerceAgentPositionalArgs, t as DevframeAgentHost } from "../host-agent-BDdcOXhG.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 { i as registerDevframeInstance, n as listLiveDevframeInstances } from "../instance-registry-CHunhMi5.mjs";
7
+ import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-DbDoozNM.mjs";
8
+ import { t as createContextRpcServer } from "../rpc-core-Dru9uoM0.mjs";
9
9
  export { DevframeAgentHost, coerceAgentPositionalArgs, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, diagnostics, listLiveDevframeInstances, normalizeBasePath, normalizeHttpServerUrl, peekRpcWireFrame, registerDevframeInstance, resolveBasePath, resolveInstanceRegister, samePath };
@@ -1,3 +1,3 @@
1
- import { u as DevframeAuthHandler } from "../devframe-DJMg0WLe.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-CB-fSUyn.mjs";
1
+ import { u as DevframeAuthHandler } from "../devframe-BlLEZR-x.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-BKFT9-jA.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-DZbJ7Cl0.mjs";
2
- import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, r as getTempAuthCode, t as buildOtpAuthUrl } from "../state-Cc1IeSmQ.mjs";
1
+ import { n as revokeAuthToken, t as revokeActiveConnectionsForToken } from "../revoke-3Q6aDKWk.mjs";
2
+ import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, r as getTempAuthCode, t as buildOtpAuthUrl } from "../state-CK9LjrnT.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-B3YUu_95.mjs";
2
- import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-BPmX9fqK.mjs";
1
+ import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-dqyXS6o3.mjs";
2
+ import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-DqbKCAew.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-CKZPvSrN.mjs";
2
- import { n as internalContextMap, t as getInternalContext } from "../context-xdynGSLP.mjs";
1
+ import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-BM3PdYli.mjs";
2
+ import { n as internalContextMap, t as getInternalContext } from "../context-CXhjygJU.mjs";
3
3
  export { getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
@@ -1,4 +1,4 @@
1
- import { B as RpcFunctionsHost, P as DevframeHost, g as DevframeNodeContext, lt as SharedState } from "../devframe-DJMg0WLe.mjs";
1
+ import { Q as DevframeHost, g as DevframeNodeContext, gt as SharedState, y as RpcFunctionsHost } from "../devframe-BlLEZR-x.mjs";
2
2
  import "../index-tdrk1bzV.mjs";
3
3
  import { v as RpcFunctionDefinitionAny } from "../types-Djq7CBXh.mjs";
4
4
  import { BirpcGroup } from "birpc";
@@ -1,3 +1,3 @@
1
- import { t as createHostContext } from "../context-CEe4PBz1.mjs";
2
- import { t as createStorage } from "../storage-CYye7P7L.mjs";
1
+ import { t as createHostContext } from "../context-Bdkakk8S.mjs";
2
+ import { t as createStorage } from "../storage-D4a99Ung.mjs";
3
3
  export { createHostContext, createStorage };
@@ -1,4 +1,4 @@
1
- import "../devframe-DJMg0WLe.mjs";
1
+ import "../devframe-BlLEZR-x.mjs";
2
2
  import "../index-tdrk1bzV.mjs";
3
3
  import { E as Thenable, S as RpcFunctionSetupResult, c as RpcDump, g as RpcFunctionAgentOptions } from "../types-Djq7CBXh.mjs";
4
4
  import { SimpleSchema } from "../utils/simple-schema.mjs";
@@ -1,5 +1,5 @@
1
- import { g as DevframeNodeContext, u as DevframeAuthHandler } from "../devframe-DJMg0WLe.mjs";
2
- import "../index-CB-fSUyn.mjs";
1
+ import { g as DevframeNodeContext, u as DevframeAuthHandler } from "../devframe-BlLEZR-x.mjs";
2
+ import "../index-BKFT9-jA.mjs";
3
3
  //#region src/recipes/interactive-auth.d.ts
4
4
  interface CreateInteractiveAuthOptions {
5
5
  /**
@@ -1,8 +1,8 @@
1
1
  import { s as colors } from "../nostics-CzECRXpE.mjs";
2
2
  import { n as defineRpcFunction } from "../define-BLWPsH6y.mjs";
3
3
  import { isAnonymousRpcMethod } from "../constants.mjs";
4
- import { a as verifyAuthToken, n as exchangeTempAuthCode, r as getTempAuthCode, t as buildOtpAuthUrl } from "../state-Cc1IeSmQ.mjs";
5
- import { t as getInternalContext } from "../context-xdynGSLP.mjs";
4
+ import { a as verifyAuthToken, n as exchangeTempAuthCode, r as getTempAuthCode, t as buildOtpAuthUrl } from "../state-CK9LjrnT.mjs";
5
+ import { t as getInternalContext } from "../context-CXhjygJU.mjs";
6
6
  import { t as s } from "../simple-schema-DQPZrAaZ.mjs";
7
7
  //#region src/recipes/interactive-auth.ts
8
8
  function defaultBanner(info) {
@@ -1,13 +1,13 @@
1
- import { t as diagnostics } from "./diagnostics-DOQPnQmX.mjs";
1
+ import { t as diagnostics } from "./diagnostics-Di8ytitn.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import { isatty } from "node:tty";
4
4
  import { formatWithOptions, inspect } from "node:util";
5
+ import { dirname, extname, join, normalize, sep } from "pathe";
5
6
  import { createReadStream, existsSync } from "node:fs";
6
7
  import { Buffer } from "node:buffer";
7
8
  import { mkdir, readFile, rename, rm, stat, writeFile } from "node:fs/promises";
8
9
  import { Readable } from "node:stream";
9
10
  import { lookup } from "mrmime";
10
- import { dirname, extname, join, normalize, sep } from "pathe";
11
11
  //#region ../../node_modules/.pnpm/obug@2.1.4/node_modules/obug/dist/core.js
12
12
  /**
13
13
  * Coerce `value`.
@@ -315,9 +315,10 @@ const CACHE_CONTROL_HEADER = "no-store";
315
315
  function flattenTree(nodes, style) {
316
316
  const out = [];
317
317
  const walk = (list, prefix) => {
318
- for (const node of list) if (style === "path") if (node.type === "file") out.push((node.path ?? "").replace(/^\//, ""));
319
- else walk(node.files ?? [], "");
320
- else if (node.type === "file") out.push(prefix + (node.name ?? ""));
318
+ for (const node of list) if (style === "path") {
319
+ if (node.type === "file") out.push((node.path ?? "").replace(/^\//, ""));
320
+ else walk(node.files ?? [], "");
321
+ } else if (node.type === "file") out.push(prefix + (node.name ?? ""));
321
322
  else if (node.files) walk(node.files, `${prefix}${node.name}/`);
322
323
  };
323
324
  walk(nodes, "");
@@ -1,3 +1,4 @@
1
+ import { t as DEVFRAME_EVENTS } from "./events-DKfSmoTj.mjs";
1
2
  //#region src/node/auth/revoke.ts
2
3
  /**
3
4
  * Flip `isTrusted` to false on any live WS clients connected with `token`
@@ -16,7 +17,7 @@ async function revokeActiveConnectionsForToken(context, token) {
16
17
  }
17
18
  if (affectedSessionIds.size === 0) return;
18
19
  await rpcHost.broadcast({
19
- method: "devframe:auth:revoked",
20
+ method: DEVFRAME_EVENTS.broadcast.authRevoked,
20
21
  args: [],
21
22
  filter: (client) => affectedSessionIds.has(client.$meta.id)
22
23
  });
@@ -26,7 +26,7 @@ var __copyProps = (to, from, except, desc) => {
26
26
  }
27
27
  return to;
28
28
  };
29
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
29
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
30
30
  value: mod,
31
31
  enumerable: true
32
32
  }) : target, mod));