devframe 1.2.6 → 1.3.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 (56) hide show
  1. package/dist/{_shared-B6K2DKhb.mjs → _shared-C61zPwIz.mjs} +4 -1
  2. package/dist/{_shared-BvDsc83f.d.mts → _shared-Cm4iD0L3.d.mts} +8 -2
  3. package/dist/adapters/build.d.mts +1 -1
  4. package/dist/adapters/build.mjs +3 -3
  5. package/dist/adapters/cac.d.mts +1 -1
  6. package/dist/adapters/cac.mjs +4 -7
  7. package/dist/adapters/dev.d.mts +10 -4
  8. package/dist/adapters/dev.mjs +2 -2
  9. package/dist/adapters/embedded.d.mts +1 -1
  10. package/dist/adapters/initiate.d.mts +2 -2
  11. package/dist/adapters/initiate.mjs +1 -1
  12. package/dist/adapters/mcp.d.mts +3 -3
  13. package/dist/{agentic-JXlb0uiD.d.mts → agentic-C6SCkdtj.d.mts} +1 -1
  14. package/dist/{browser-agent-rpc-BXhoSh1z.mjs → browser-agent-rpc-KH4HHvHf.mjs} +24 -2
  15. package/dist/cli/main.mjs +1 -1
  16. package/dist/client/index.d.mts +1 -1
  17. package/dist/client/index.mjs +2 -2
  18. package/dist/{host-agent-DB1yECaG.mjs → client-agent-iBkMYxqn.mjs} +148 -2
  19. package/dist/{context-O8NJzl93.d.mts → context-BGJi0ITA.d.mts} +1 -1
  20. package/dist/{context-dOWXVHc6.d.mts → context-BNxFOPbX.d.mts} +255 -117
  21. package/dist/{context-CeD8-IZA.mjs → context-CAJ5V017.mjs} +6 -46
  22. package/dist/{context-B-2gsJ6Z.mjs → context-D_jSSdME.mjs} +1 -1
  23. package/dist/{dev-pIWWAGYd.mjs → dev-BKBjIpX3.mjs} +43 -23
  24. package/dist/{diagnostics-Dngy7cNp.mjs → diagnostics-E_PvUPsA.mjs} +12 -0
  25. package/dist/in-page-channel/index.d.mts +1 -1
  26. package/dist/in-page-channel/index.mjs +1 -1
  27. package/dist/{index-DVGcpYm7.d.mts → index-CxJatyA1.d.mts} +2 -2
  28. package/dist/index.d.mts +3 -3
  29. package/dist/{instance-registry-B--XFmLS.mjs → instance-registry-C_4PpB6N.mjs} +1 -1
  30. package/dist/{instance-shell-DrvOWxqh.d.mts → instance-shell-GihbmXoF.d.mts} +2 -2
  31. package/dist/{instance-shell-DyVmJA6B.mjs → instance-shell-m4sY2oTG.mjs} +56 -15
  32. package/dist/{interactive-auth-CCZdQDy_.mjs → interactive-auth-DdDxs3WF.mjs} +1 -1
  33. package/dist/internal/index.d.mts +39 -7
  34. package/dist/internal/index.mjs +7 -7
  35. package/dist/{mcp-content-9_Pdtziq.d.mts → mcp-content-QImBQO8e.d.mts} +1 -1
  36. package/dist/node/auth.d.mts +2 -2
  37. package/dist/node/hub-internals.d.mts +2 -2
  38. package/dist/node/hub-internals.mjs +2 -2
  39. package/dist/node/index.d.mts +1 -1
  40. package/dist/node/index.mjs +2 -2
  41. package/dist/recipes/interactive-auth.d.mts +2 -2
  42. package/dist/recipes/interactive-auth.mjs +1 -1
  43. package/dist/{remote-assets-DoZ1AMpq.mjs → remote-assets-B-n83kUY.mjs} +1 -1
  44. package/dist/rpc/transports/ws-bun.d.mts +1 -1
  45. package/dist/rpc/transports/ws-deno.d.mts +1 -1
  46. package/dist/{rpc-core-Dl50hXG3.mjs → rpc-core-BLc5hm9X.mjs} +1 -1
  47. package/dist/{rpc-core-D6NWQW-B.d.mts → rpc-core-CGTCla-R.d.mts} +2 -2
  48. package/dist/{shared-state-Cow3u-_m.mjs → shared-state-Cc-Jrhma.mjs} +5 -2
  49. package/dist/{storage-BQy9865B.mjs → storage-CWI9PZ-5.mjs} +1 -1
  50. package/dist/types/index.d.mts +2 -2
  51. package/dist/utils/events.d.mts +1 -1
  52. package/dist/utils/remote-assets.mjs +1 -1
  53. package/dist/utils/shared-state.d.mts +1 -1
  54. package/dist/utils/shared-state.mjs +1 -1
  55. package/dist/utils/streaming-channel.d.mts +1 -1
  56. package/package.json +8 -8
package/dist/index.d.mts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { C as RpcFunctionType, T as RpcReturnSchema, h as RpcFunctionDefinition, m as RpcFunctionAgentOptions, n as RpcArgsSchema } from "./types-BmDbfHCx.mjs";
2
- import { $ as McpSetting, At as DevframeDiagnosticsLogger, B as DevframeCliOptions, Bt as AgentResourceInput, Ct as DevframeViewHost, Dt as DevframeHost, Et as DevframeRpcSharedStates, F as CreateMcpServerOptions, G as DevframeRpcOptions, Gt as DevframeAgentHost, H as DevframeDeploymentKind, Ht as AgentToolInput, I as McpConnectionInfo, It as AgentHandle, J as DevframeSnapshotRpcInputs, Jt as EventUnsubscribe, K as DevframeSetupInfo, Kt as DevframeAgentHostEvents, L as McpContentBlock, Lt as AgentManifest, Ot as DevframeStorageScope, P as CreateMcpFetchHandlerOptions, Q as McpRouteOptions, R as McpFetchHandler, Rt as AgentResource, St as SettingsForNamespace, Tt as DevframeRpcServerFunctions, U as DevframeDockDefaults, Ut as AgentToolProvider, V as DevframeDefinition, Vt as AgentTool, W as DevframeDuplicationStrategy, Wt as AgentToolProviderHandle, X as DevframeWsOptions, Y as DevframeSseOptions, Yt as EventsMap, Z as McpAuthorization, _t as ScopedBroadcastOptions, a as DevframeConnectionConfigsRegistry, at as DevframeServiceOf, bt as ScopedServerFunctions, c as RpcBroadcastOptions, ct as DevframeServicesRegistry, d as RpcSharedStateHost, dt as DevframeScopedNodeContext, et as DevframeServiceDefinition, f as RpcStreamingChannel, ft as DevframeScopedNodeRpc, gt as DevframeSettingsStore, ht as DevframeSettingsRegistry, i as DevframeCapabilities, it as DevframeServiceMeta, kt as DevframeDiagnosticsHost, l as RpcFunctionsHost, lt as DevframeServicesScopeRegistry, m as RpcStreamingHost, mt as DevframeSettings, n as ConnectionMetaSse, nt as DevframeServiceId, o as DevframeNodeContext, ot as DevframeServiceScopeOf, p as RpcStreamingChannelOptions, pt as DevframeScopedStreamingHost, q as DevframeSnapshotRpcEntry, qt as EventEmitter, r as ConnectionMetaWebsocket, rt as DevframeServiceInput, s as DevframeNodeRpcSession, st as DevframeServicesHost, t as ConnectionMeta, tt as DevframeServiceDescriptor, u as RpcSharedStateGetOptions, ut as DevframeServicesState, vt as ScopedClientFunctions, wt as DevframeRpcClientFunctions, xt as ScopedSharedStates, yt as ScopedRpcFn, z as McpServerHandle, zt as AgentResourceContent } from "./context-dOWXVHc6.mjs";
2
+ import { $ as DevframeServiceOf, $t as AgentToolProviderHandle, At as McpFetchHandler, B as DevframeSetupInfo, Ct as DevframeStorageScope, Dt as CreateMcpServerOptions, Et as CreateMcpFetchHandlerOptions, F as DevframeDefinition, Ft as McpResourceTemplate, G as McpAuthorization, Gt as AgentHandle, H as DevframeSnapshotRpcInputs, I as DevframeDeploymentKind, It as McpResourceTemplateContent, J as DevframeServiceDefinition, Jt as AgentResourceContent, K as McpRouteOptions, Kt as AgentManifest, L as DevframeDockDefaults, Lt as McpResourceTemplateEntry, Mt as McpPromptArgument, Nt as McpPromptMessage, Ot as McpConnectionInfo, P as DevframeCliOptions, Pt as McpPromptResult, Q as DevframeServiceMeta, Qt as AgentToolProvider, R as DevframeDuplicationStrategy, Rt as McpResourcesChangedHook, St as DevframeHost, Tt as DevframeDiagnosticsLogger, U as DevframeSseOptions, V as DevframeSnapshotRpcEntry, W as DevframeWsOptions, X as DevframeServiceId, Xt as AgentTool, Y as DevframeServiceDescriptor, Yt as AgentResourceInput, Z as DevframeServiceInput, Zt as AgentToolInput, _t as DevframeViewHost, a as DevframeConnectionConfigsRegistry, at as DevframeScopedNodeContext, bt as DevframeRpcSharedStates, c as RpcBroadcastOptions, ct as DevframeSettings, d as RpcSharedStateHost, dt as ScopedBroadcastOptions, en as DevframeAgentHost, et as DevframeServiceScopeOf, f as RpcStreamingChannel, ft as ScopedClientFunctions, gt as SettingsForNamespace, ht as ScopedSharedStates, i as DevframeCapabilities, in as EventsMap, it as DevframeServicesState, jt as McpPrompt, kt as McpContentBlock, l as RpcFunctionsHost, lt as DevframeSettingsRegistry, m as RpcStreamingHost, mt as ScopedServerFunctions, n as ConnectionMetaSse, nn as EventEmitter, nt as DevframeServicesRegistry, o as DevframeNodeContext, ot as DevframeScopedNodeRpc, p as RpcStreamingChannelOptions, pt as ScopedRpcFn, q as McpSetting, qt as AgentResource, r as ConnectionMetaWebsocket, rn as EventUnsubscribe, rt as DevframeServicesScopeRegistry, s as DevframeNodeRpcSession, st as DevframeScopedStreamingHost, t as ConnectionMeta, tn as DevframeAgentHostEvents, tt as DevframeServicesHost, u as RpcSharedStateGetOptions, ut as DevframeSettingsStore, vt as DevframeRpcClientFunctions, wt as DevframeDiagnosticsHost, yt as DevframeRpcServerFunctions, z as DevframeRpcOptions, zt as McpServerHandle } from "./context-BNxFOPbX.mjs";
3
3
  import { a as DevframeWsPeer, i as DevframeRpcTransportKind, n as DevframeRpcConnection, r as DevframeRpcConnectionRequest, t as DevframeNodeRpcSessionMeta } from "./session-r6PDixP6.mjs";
4
4
  import { a as RemoteAssetsStore, i as RemoteAssetsProviderCustom, n as RemoteAssetsErrorMessage, o as StaticAssetsSource, r as RemoteAssetsProvider, t as RemoteAssets } from "./remote-assets-eBvSKZMS.mjs";
5
5
  import { i as DevframeDefineDiagnosticsOptions } from "./nostics-DWvukRwa.mjs";
6
- import { n as withMcpContent } from "./mcp-content-9_Pdtziq.mjs";
6
+ import { n as withMcpContent } from "./mcp-content-QImBQO8e.mjs";
7
7
  //#region src/define.d.ts
8
8
  export declare const defineRpcFunction: <NAME extends string, TYPE extends RpcFunctionType, ARGS extends any[], RETURN = void, const AS extends RpcArgsSchema | undefined = undefined, const RS extends RpcReturnSchema | undefined = undefined>(definition: RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevframeNodeContext>) => RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevframeNodeContext>;
9
9
  /**
@@ -12,4 +12,4 @@ export declare const defineRpcFunction: <NAME extends string, TYPE extends RpcFu
12
12
  */
13
13
  export 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 CreateMcpFetchHandlerOptions, type CreateMcpServerOptions, 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 DevframeRpcOptions, 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 DevframeSnapshotRpcEntry, type DevframeSnapshotRpcInputs, type DevframeSseOptions, type DevframeStorageScope, type DevframeViewHost, type DevframeWsOptions, type DevframeWsPeer, type EventEmitter, type EventUnsubscribe, type EventsMap, type McpAuthorization, type McpConnectionInfo, type McpContentBlock, type McpFetchHandler, type McpRouteOptions, type McpServerHandle, type McpSetting, 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, withMcpContent };
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 CreateMcpFetchHandlerOptions, type CreateMcpServerOptions, 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 DevframeRpcOptions, 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 DevframeSnapshotRpcEntry, type DevframeSnapshotRpcInputs, type DevframeSseOptions, type DevframeStorageScope, type DevframeViewHost, type DevframeWsOptions, type DevframeWsPeer, type EventEmitter, type EventUnsubscribe, type EventsMap, type McpAuthorization, type McpConnectionInfo, type McpContentBlock, type McpFetchHandler, type McpPrompt, type McpPromptArgument, type McpPromptMessage, type McpPromptResult, type McpResourceTemplate, type McpResourceTemplateContent, type McpResourceTemplateEntry, type McpResourcesChangedHook, type McpRouteOptions, type McpServerHandle, type McpSetting, 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, withMcpContent };
@@ -1,5 +1,5 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.mjs";
2
- import { t as diagnostics } from "./diagnostics-Dngy7cNp.mjs";
2
+ import { t as diagnostics } from "./diagnostics-E_PvUPsA.mjs";
3
3
  import { join } from "pathe";
4
4
  import { mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
5
5
  import process from "node:process";
@@ -1,8 +1,8 @@
1
1
  import { n as BirpcGroup } from "./index-Bia1vKjL.mjs";
2
- import { Tt as DevframeRpcServerFunctions, X as DevframeWsOptions, Y as DevframeSseOptions, jt as DevframeAuthHandler, o as DevframeNodeContext, s as DevframeNodeRpcSession, t as ConnectionMeta, wt as DevframeRpcClientFunctions } from "./context-dOWXVHc6.mjs";
2
+ import { Bt as DevframeAuthHandler, U as DevframeSseOptions, W as DevframeWsOptions, o as DevframeNodeContext, s as DevframeNodeRpcSession, t as ConnectionMeta, vt as DevframeRpcClientFunctions, yt as DevframeRpcServerFunctions } from "./context-BNxFOPbX.mjs";
3
3
  import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "./session-r6PDixP6.mjs";
4
4
  import { n as WsOriginRegistry } from "./ws-server-y2R76aSW.mjs";
5
- import "./index-DVGcpYm7.mjs";
5
+ import "./index-CxJatyA1.mjs";
6
6
  import { H3 } from "h3";
7
7
  import { NodeAdapter } from "crossws/adapters/node";
8
8
  import { Buffer } from "node:buffer";
@@ -1,14 +1,60 @@
1
1
  import "./constants.mjs";
2
2
  import { r as validateOriginCandidate } from "./origin-DZit9g29.mjs";
3
- import { t as diagnostics } from "./diagnostics-Dngy7cNp.mjs";
4
- import { c as joinURL, d as withoutLeadingSlash, f as withoutTrailingSlash, u as withLeadingSlash } from "./_shared-B6K2DKhb.mjs";
5
- import { t as getInternalContext } from "./context-B-2gsJ6Z.mjs";
6
- import { n as createInteractiveAuth } from "./interactive-auth-CCZdQDy_.mjs";
3
+ import { t as diagnostics } from "./diagnostics-E_PvUPsA.mjs";
4
+ import { c as joinURL, d as withoutLeadingSlash, f as withoutTrailingSlash, u as withLeadingSlash } from "./_shared-C61zPwIz.mjs";
5
+ import { t as getInternalContext } from "./context-D_jSSdME.mjs";
6
+ import { n as createInteractiveAuth } from "./interactive-auth-DdDxs3WF.mjs";
7
7
  import { createServer } from "node:http";
8
8
  import process from "node:process";
9
9
  import { isIP } from "node:net";
10
10
  import { Server } from "node:tls";
11
11
  import { H3, defineHandler, toNodeHandler } from "h3";
12
+ //#region src/node/listen.ts
13
+ function listen(server, port, host) {
14
+ return new Promise((resolve, reject) => {
15
+ const onError = (error) => reject(error);
16
+ server.once("error", onError);
17
+ server.listen(port, host, () => {
18
+ server.removeListener("error", onError);
19
+ resolve();
20
+ });
21
+ });
22
+ }
23
+ /** Errors meaning the machine has no such loopback address to bind. */
24
+ const NO_LOOPBACK_ADDRESS = /* @__PURE__ */ new Set(["EADDRNOTAVAIL", "EAFNOSUPPORT"]);
25
+ /** Whether a failed bind means another process holds the port. */
26
+ function isAddressInUse(error) {
27
+ return error?.code === "EADDRINUSE";
28
+ }
29
+ /**
30
+ * Listen on `host`, and when that is `localhost`, on the other loopback
31
+ * address too. `listen(port, 'localhost')` binds only the first address
32
+ * `localhost` resolves to (`::1` on most current Linux and macOS setups),
33
+ * while a browser dials the page's own hostname, so a page opened on
34
+ * `127.0.0.1` would be refused, or reach another process that holds
35
+ * `127.0.0.1` on the same port. The twin server hands its traffic to
36
+ * `server`. If another process holds the twin address, fail like a taken
37
+ * port (`EADDRINUSE`), so pages on that address never reach a different
38
+ * server. A machine without that address family skips the twin. Resolves to
39
+ * a closer for the twin.
40
+ */
41
+ async function listenWithLoopbackTwin(server, port, host) {
42
+ await listen(server, port, host);
43
+ const bound = server.address();
44
+ if (host !== "localhost" || !bound || typeof bound === "string") return async () => {};
45
+ const twin = createServer();
46
+ twin.on("request", (req, res) => server.emit("request", req, res));
47
+ twin.on("upgrade", (req, socket, head) => server.emit("upgrade", req, socket, head));
48
+ try {
49
+ await listen(twin, bound.port, bound.family === "IPv6" ? "127.0.0.1" : "::1");
50
+ return () => new Promise((r) => twin.close(() => r()));
51
+ } catch (error) {
52
+ if (NO_LOOPBACK_ADDRESS.has(error.code ?? "")) return async () => {};
53
+ await new Promise((r) => server.close(() => r()));
54
+ throw error;
55
+ }
56
+ }
57
+ //#endregion
12
58
  //#region src/node/runtime.ts
13
59
  /**
14
60
  * Detect the current server runtime from its runtime-specific global. The
@@ -86,15 +132,9 @@ async function bindHttpAndWs(options) {
86
132
  ws = transport.ws;
87
133
  closeWs = transport.close;
88
134
  }
135
+ let closeLoopbackTwin = async () => {};
89
136
  if (ownsHttpServer) try {
90
- await new Promise((resolve, reject) => {
91
- const onError = (error) => reject(error);
92
- httpServer.once("error", onError);
93
- httpServer.listen(port, bindHost, () => {
94
- httpServer.removeListener("error", onError);
95
- resolve();
96
- });
97
- });
137
+ closeLoopbackTwin = await listenWithLoopbackTwin(httpServer, port, bindHost);
98
138
  } catch (error) {
99
139
  await closeWs().catch(() => {});
100
140
  throw diagnostics.DF0052({
@@ -128,6 +168,7 @@ async function bindHttpAndWs(options) {
128
168
  async close() {
129
169
  httpServer.off("listening", publishWsEndpoint);
130
170
  await closeWs();
171
+ await closeLoopbackTwin();
131
172
  if (ownsHttpServer) await new Promise((r) => httpServer.close(() => r()));
132
173
  if (wsUrl && getInternalContext(context).wsEndpoint?.url === wsUrl) getInternalContext(context).setWsEndpoint(void 0);
133
174
  }
@@ -321,7 +362,7 @@ function createInstanceShell(options) {
321
362
  const origin = currentOrigin();
322
363
  if (!cfg || registerPromise || !origin || !meta) return;
323
364
  const resolvedMeta = meta;
324
- registerPromise = import("./instance-registry-B--XFmLS.mjs").then((n) => n.t).then(({ registerDevframeInstance }) => {
365
+ registerPromise = import("./instance-registry-C_4PpB6N.mjs").then((n) => n.t).then(({ registerDevframeInstance }) => {
325
366
  let port = 0;
326
367
  try {
327
368
  const url = new URL(origin);
@@ -397,7 +438,7 @@ function createInstanceShell(options) {
397
438
  let resolvedAuth = false;
398
439
  let corePromise;
399
440
  function ensureCore() {
400
- corePromise ??= import("./rpc-core-Dl50hXG3.mjs").then((n) => n.n).then(({ createContextRpcServer }) => createContextRpcServer({
441
+ corePromise ??= import("./rpc-core-BLc5hm9X.mjs").then((n) => n.n).then(({ createContextRpcServer }) => createContextRpcServer({
401
442
  context: ctx,
402
443
  auth: resolvedAuth,
403
444
  onPeerConnect: options.onPeerConnect,
@@ -659,4 +700,4 @@ function createInstanceShell(options) {
659
700
  };
660
701
  }
661
702
  //#endregion
662
- export { normalizeHttpServerUrl as i, resolveInstanceRegister as n, samePath as r, createInstanceShell as t };
703
+ export { isAddressInUse as a, normalizeHttpServerUrl as i, resolveInstanceRegister as n, listenWithLoopbackTwin as o, samePath as r, createInstanceShell as t };
@@ -2,7 +2,7 @@ import { s as colors } from "./nostics-D0PvLZsn.mjs";
2
2
  import { n as defineRpcFunction } from "./define-BLWPsH6y.mjs";
3
3
  import { isAnonymousRpcMethod } from "./constants.mjs";
4
4
  import { a as getTempAuthCodeInfo, n as describeUA, o as refreshTempAuthCode, r as exchangeTempAuthCode, s as verifyAuthToken, t as buildOtpAuthUrl } from "./state-W4wI6X5X.mjs";
5
- import { t as getInternalContext } from "./context-B-2gsJ6Z.mjs";
5
+ import { t as getInternalContext } from "./context-D_jSSdME.mjs";
6
6
  //#region src/utils/simple-schema.ts
7
7
  function ok(value) {
8
8
  return { value };
@@ -1,12 +1,12 @@
1
1
  import { t as StandardSchemaV1 } from "../index-CeEtxDmK.mjs";
2
2
  import { g as RpcFunctionDefinitionAny } from "../types-BmDbfHCx.mjs";
3
- import { Bt as AgentResourceInput, Dt as DevframeHost, Gt as DevframeAgentHost$1, Ht as AgentToolInput, It as AgentHandle, Kt as DevframeAgentHostEvents, Lt as AgentManifest, Rt as AgentResource, Ut as AgentToolProvider, Vt as AgentTool, Wt as AgentToolProviderHandle, o as DevframeNodeContext, qt as EventEmitter, zt as AgentResourceContent } from "../context-dOWXVHc6.mjs";
3
+ import { $t as AgentToolProviderHandle, Gt as AgentHandle, Jt as AgentResourceContent, Kt as AgentManifest, Qt as AgentToolProvider, St as DevframeHost, Xt as AgentTool, Yt as AgentResourceInput, Zt as AgentToolInput, en as DevframeAgentHost$1, nn as EventEmitter, o as DevframeNodeContext, qt as AgentResource, tn as DevframeAgentHostEvents, xt as BrowserAgentClientInfo } from "../context-BNxFOPbX.mjs";
4
4
  import { a as RemoteAssetsStore } from "../remote-assets-eBvSKZMS.mjs";
5
- import { a as InstanceShellInit, c as StartedServer, d as samePath, f as DevframeInstanceRecord, g as registerDevframeInstance, h as probeDevframeOrigin, 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-DrvOWxqh.mjs";
6
- import { i as importAgenticMcp, n as MountMcpHttpOptions, r as MountedMcpHttp, t as AgenticMcpModule } from "../agentic-JXlb0uiD.mjs";
7
- import { a as resolveBasePath, i as normalizeBasePath, n as ResolvedMcpConfig, r as loadAutoMcpAdapter, s as resolveMcpConfig } from "../_shared-BvDsc83f.mjs";
8
- import { t as getMcpContent } from "../mcp-content-9_Pdtziq.mjs";
9
- import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-D6NWQW-B.mjs";
5
+ import { a as InstanceShellInit, c as StartedServer, d as samePath, f as DevframeInstanceRecord, g as registerDevframeInstance, h as probeDevframeOrigin, 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-GihbmXoF.mjs";
6
+ import { i as importAgenticMcp, n as MountMcpHttpOptions, r as MountedMcpHttp, t as AgenticMcpModule } from "../agentic-C6SCkdtj.mjs";
7
+ import { a as resolveBasePath, i as normalizeBasePath, n as ResolvedMcpConfig, r as loadAutoMcpAdapter, s as resolveMcpConfig } from "../_shared-Cm4iD0L3.mjs";
8
+ import { t as getMcpContent } from "../mcp-content-QImBQO8e.mjs";
9
+ import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-CGTCla-R.mjs";
10
10
  //#region src/agent/stringify.d.ts
11
11
  /**
12
12
  * JSON-coercing serializer for MCP text payloads.
@@ -64,6 +64,16 @@ export declare function returnToJsonSchema(schema: StandardSchemaV1 | undefined)
64
64
  */
65
65
  export declare function argsToJsonSchema(args: readonly StandardSchemaV1[] | undefined): unknown;
66
66
  //#endregion
67
+ //#region src/node/client-agent.d.ts
68
+ /** Id of the built-in tool listing connected browser tabs (wire name `devframe_agent_list-clients`). */
69
+ export declare const LIST_CLIENTS_TOOL = "devframe:agent:list-clients";
70
+ /** One connected browser tab as reported by {@link LIST_CLIENTS_TOOL}. */
71
+ interface ConnectedClient extends BrowserAgentClientInfo {
72
+ id: string;
73
+ connectedAt: number;
74
+ tools: string[];
75
+ }
76
+ //#endregion
67
77
  //#region src/node/diagnostics.d.ts
68
78
  /**
69
79
  * DF00xx codes are allocated across packages (e.g. @devframes/json-render
@@ -388,6 +398,28 @@ export declare const diagnostics: import("nostics").Diagnostics<{
388
398
  }) => string;
389
399
  readonly fix: "Pass `withMcpContent` a non-empty array of `{ type: 'text', text }`, `{ type: 'image', data, mimeType }` or `{ type: 'audio', data, mimeType }` blocks, with string fields and base64 `data`.";
390
400
  };
401
+ readonly DF0082: {
402
+ readonly why: (p: {
403
+ clientId: string;
404
+ tool: string;
405
+ live: string[];
406
+ }) => string;
407
+ readonly fix: "Re-list the connected clients (`devframe:agent:list-clients`) and retry with a live `client_id`, or omit `client_id` to target the most recently focused tab.";
408
+ };
409
+ readonly DF0084: {
410
+ readonly why: (p: {
411
+ name: string;
412
+ uriTemplate: string;
413
+ reason: string;
414
+ }) => string;
415
+ readonly fix: "Use RFC 6570 level 1 only: plain `{name}` expressions made of letters, digits, `_` and `.`, with no operator (`+`, `#`, `/`, `?`, …), modifier (`:n`, `*`) or list of names, and no `{` or `}` outside an expression.";
416
+ };
417
+ readonly DF0085: {
418
+ readonly why: (p: {
419
+ name: string;
420
+ }) => string;
421
+ readonly fix: "Give each entry in `prompts` its own `name`. `prompts/get` finds a prompt by its name, so two prompts cannot share one.";
422
+ };
391
423
  }, readonly [(d: import("nostics").Diagnostic, { method }?: {
392
424
  method?: "log" | "warn" | "error";
393
425
  }) => void], never>;
@@ -518,4 +550,4 @@ export declare function peekRpcWireFrame(raw: string): {
518
550
  /** Convert tool input for a command, whose arguments must be declared. */
519
551
  export declare function toolInputToCommandArgs(input: unknown, argumentCount?: number): unknown[];
520
552
  //#endregion
521
- export { type AgenticMcpModule, type ContextRpcServer, type CreateContextRpcServerOptions, type CreateInstanceShellOptions, type DevframeInstanceRecord, type DevframeInstanceRegistration, type InstanceRegisterConfig, type InstanceShell, type InstanceShellApi, type InstanceShellInit, type InstanceShellInternals, type InstanceWsTier, type MountMcpHttpOptions, type MountedMcpHttp, type ResolvedMcpConfig, type RpcWireCodec, type StartedServer, createContextRpcServer, createInstanceShell, getMcpContent, importAgenticMcp, listLiveDevframeInstances, loadAutoMcpAdapter, normalizeBasePath, probeDevframeOrigin, registerDevframeInstance, resolveBasePath, resolveInstanceRegister, resolveMcpConfig, samePath };
553
+ export { type AgenticMcpModule, type ConnectedClient, type ContextRpcServer, type CreateContextRpcServerOptions, type CreateInstanceShellOptions, type DevframeInstanceRecord, type DevframeInstanceRegistration, type InstanceRegisterConfig, type InstanceShell, type InstanceShellApi, type InstanceShellInit, type InstanceShellInternals, type InstanceWsTier, type MountMcpHttpOptions, type MountedMcpHttp, type ResolvedMcpConfig, type RpcWireCodec, type StartedServer, createContextRpcServer, createInstanceShell, getMcpContent, importAgenticMcp, listLiveDevframeInstances, loadAutoMcpAdapter, normalizeBasePath, probeDevframeOrigin, registerDevframeInstance, resolveBasePath, resolveInstanceRegister, resolveMcpConfig, samePath };
@@ -1,14 +1,14 @@
1
1
  import { t as getMcpContent } from "../mcp-content-DN3O212x.mjs";
2
2
  import { t as Diagnostic } from "../nostics-D0PvLZsn.mjs";
3
3
  import { n as peekRpcWireFrame, t as createRpcWireCodec } from "../wire-codec-B1W3zH3L.mjs";
4
- import { t as diagnostics } from "../diagnostics-Dngy7cNp.mjs";
5
- import { n as toolInputToCommandArgs, t as DevframeAgentHost } from "../host-agent-DB1yECaG.mjs";
6
- import { a as resolveMcpConfig, n as normalizeBasePath, r as resolveBasePath, s as importAgenticMcp, t as loadAutoMcpAdapter } from "../_shared-B6K2DKhb.mjs";
4
+ import { t as diagnostics } from "../diagnostics-E_PvUPsA.mjs";
5
+ import { a as toolInputToCommandArgs, i as DevframeAgentHost, t as LIST_CLIENTS_TOOL } from "../client-agent-iBkMYxqn.mjs";
6
+ import { a as resolveMcpConfig, n as normalizeBasePath, r as resolveBasePath, s as importAgenticMcp, t as loadAutoMcpAdapter } from "../_shared-C61zPwIz.mjs";
7
7
  import { t as importRuntimeModule } from "../import-runtime-module-BzlEQ9PI.mjs";
8
8
  import { t as createH3DevframeHost } from "../host-h3-BROI6SQ4.mjs";
9
- import { i as registerDevframeInstance, n as listLiveDevframeInstances, r as probeDevframeOrigin } from "../instance-registry-B--XFmLS.mjs";
10
- import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-DyVmJA6B.mjs";
11
- import { t as createContextRpcServer } from "../rpc-core-Dl50hXG3.mjs";
9
+ import { i as registerDevframeInstance, n as listLiveDevframeInstances, r as probeDevframeOrigin } from "../instance-registry-C_4PpB6N.mjs";
10
+ import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-m4sY2oTG.mjs";
11
+ import { t as createContextRpcServer } from "../rpc-core-BLc5hm9X.mjs";
12
12
  //#region src/agent/stringify.ts
13
13
  /**
14
14
  * JSON-coercing serializer for MCP text payloads.
@@ -157,4 +157,4 @@ function argsToJsonSchema(args) {
157
157
  };
158
158
  }
159
159
  //#endregion
160
- export { DevframeAgentHost, argsToJsonSchema, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, diagnostics, formatMcpError, getMcpContent, importAgenticMcp, importRuntimeModule, listLiveDevframeInstances, loadAutoMcpAdapter, normalizeBasePath, normalizeHttpServerUrl, peekRpcWireFrame, probeDevframeOrigin, registerDevframeInstance, resolveBasePath, resolveInstanceRegister, resolveMcpConfig, returnToJsonSchema, samePath, stringifyForMcp, toolInputToCommandArgs };
160
+ export { DevframeAgentHost, LIST_CLIENTS_TOOL, argsToJsonSchema, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, diagnostics, formatMcpError, getMcpContent, importAgenticMcp, importRuntimeModule, listLiveDevframeInstances, loadAutoMcpAdapter, normalizeBasePath, normalizeHttpServerUrl, peekRpcWireFrame, probeDevframeOrigin, registerDevframeInstance, resolveBasePath, resolveInstanceRegister, resolveMcpConfig, returnToJsonSchema, samePath, stringifyForMcp, toolInputToCommandArgs };
@@ -1,4 +1,4 @@
1
- import { L as McpContentBlock } from "./context-dOWXVHc6.mjs";
1
+ import { kt as McpContentBlock } from "./context-BNxFOPbX.mjs";
2
2
  //#region src/agent/mcp-content.d.ts
3
3
  /**
4
4
  * Attach MCP content blocks to a tool result, for example an image next to
@@ -1,3 +1,3 @@
1
- import { jt as DevframeAuthHandler } from "../context-dOWXVHc6.mjs";
2
- import { a as getTempAuthCodeInfo, c as revokeActiveConnectionsForToken, i as getTempAuthCode, l as revokeAuthToken, n as describeUA, o as refreshTempAuthCode, r as exchangeTempAuthCode, s as verifyAuthToken, t as buildOtpAuthUrl } from "../index-DVGcpYm7.mjs";
1
+ import { Bt as DevframeAuthHandler } from "../context-BNxFOPbX.mjs";
2
+ import { a as getTempAuthCodeInfo, c as revokeActiveConnectionsForToken, i as getTempAuthCode, l as revokeAuthToken, n as describeUA, o as refreshTempAuthCode, r as exchangeTempAuthCode, s as verifyAuthToken, t as buildOtpAuthUrl } from "../index-CxJatyA1.mjs";
3
3
  export { DevframeAuthHandler, buildOtpAuthUrl, describeUA, exchangeTempAuthCode, getTempAuthCode, getTempAuthCodeInfo, 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-O8NJzl93.mjs";
2
- import { a as resolveBasePath, i as normalizeBasePath } from "../_shared-BvDsc83f.mjs";
1
+ import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-BGJi0ITA.mjs";
2
+ import { a as resolveBasePath, i as normalizeBasePath } from "../_shared-Cm4iD0L3.mjs";
3
3
  export { type DevframeInternalContext, type InternalAnonymousAuthStorage, type RemoteTokenRecord, getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
@@ -1,3 +1,3 @@
1
- import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-B6K2DKhb.mjs";
2
- import { n as internalContextMap, t as getInternalContext } from "../context-B-2gsJ6Z.mjs";
1
+ import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-C61zPwIz.mjs";
2
+ import { n as internalContextMap, t as getInternalContext } from "../context-D_jSSdME.mjs";
3
3
  export { getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
@@ -1,5 +1,5 @@
1
1
  import { g as RpcFunctionDefinitionAny } from "../types-BmDbfHCx.mjs";
2
- import { Dt as DevframeHost, k as SharedState, l as RpcFunctionsHost, o as DevframeNodeContext } from "../context-dOWXVHc6.mjs";
2
+ import { St as DevframeHost, k as SharedState, l as RpcFunctionsHost, o as DevframeNodeContext } from "../context-BNxFOPbX.mjs";
3
3
  //#region src/node/context.d.ts
4
4
  export interface CreateHostContextOptions {
5
5
  cwd: string;
@@ -1,3 +1,3 @@
1
- import { t as createHostContext } from "../context-CeD8-IZA.mjs";
2
- import { t as createStorage } from "../storage-BQy9865B.mjs";
1
+ import { t as createHostContext } from "../context-CAJ5V017.mjs";
2
+ import { t as createStorage } from "../storage-CWI9PZ-5.mjs";
3
3
  export { createHostContext, createStorage };
@@ -1,5 +1,5 @@
1
- import { jt as DevframeAuthHandler, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "../context-dOWXVHc6.mjs";
2
- import "../index-DVGcpYm7.mjs";
1
+ import { Bt as DevframeAuthHandler, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "../context-BNxFOPbX.mjs";
2
+ import "../index-CxJatyA1.mjs";
3
3
  import { ColorFn } from "../utils/colors.mjs";
4
4
  //#region src/recipes/interactive-auth.d.ts
5
5
  export interface CreateInteractiveAuthOptions {
@@ -1,2 +1,2 @@
1
- import { n as createInteractiveAuth, t as createAuthBanner } from "../interactive-auth-CCZdQDy_.mjs";
1
+ import { n as createInteractiveAuth, t as createAuthBanner } from "../interactive-auth-DdDxs3WF.mjs";
2
2
  export { createAuthBanner, createInteractiveAuth };
@@ -1,4 +1,4 @@
1
- import { t as diagnostics } from "./diagnostics-Dngy7cNp.mjs";
1
+ import { t as diagnostics } from "./diagnostics-E_PvUPsA.mjs";
2
2
  import { t as lookup } from "./mrmime-40h5OOIp.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { mkdir, readFile, rename, rm, stat, writeFile } from "node:fs/promises";
@@ -1,5 +1,5 @@
1
1
  import { n as WsOriginRegistry } from "../../ws-server-y2R76aSW.mjs";
2
- import { t as ContextRpcServer } from "../../rpc-core-D6NWQW-B.mjs";
2
+ import { t as ContextRpcServer } from "../../rpc-core-CGTCla-R.mjs";
3
3
  //#region src/rpc/transports/ws-bun.d.ts
4
4
  export interface AttachBunWsTransportOptions {
5
5
  /** Same contract as `WsRpcTransportOptions.allowedOrigins`. */
@@ -1,5 +1,5 @@
1
1
  import { n as WsOriginRegistry } from "../../ws-server-y2R76aSW.mjs";
2
- import { t as ContextRpcServer } from "../../rpc-core-D6NWQW-B.mjs";
2
+ import { t as ContextRpcServer } from "../../rpc-core-CGTCla-R.mjs";
3
3
  //#region src/rpc/transports/ws-deno.d.ts
4
4
  export interface AttachDenoWsTransportOptions {
5
5
  /** Same contract as `WsRpcTransportOptions.allowedOrigins`. */
@@ -1,7 +1,7 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.mjs";
2
2
  import { n as getRpcResolvedSetupResult, t as getRpcHandler } from "./handler-DmaAfpGq.mjs";
3
3
  import { createRpcServer } from "./rpc/server.mjs";
4
- import { t as diagnostics } from "./diagnostics-Dngy7cNp.mjs";
4
+ import { t as diagnostics } from "./diagnostics-E_PvUPsA.mjs";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  //#region src/node/rpc-core.ts
7
7
  var rpc_core_exports = /* @__PURE__ */ __exportAll({ createContextRpcServer: () => createContextRpcServer });
@@ -1,8 +1,8 @@
1
1
  import { n as BirpcGroup, o as EventOptions } from "./index-Bia1vKjL.mjs";
2
- import { Tt as DevframeRpcServerFunctions, jt as DevframeAuthHandler, o as DevframeNodeContext, s as DevframeNodeRpcSession, wt as DevframeRpcClientFunctions } from "./context-dOWXVHc6.mjs";
2
+ import { Bt as DevframeAuthHandler, o as DevframeNodeContext, s as DevframeNodeRpcSession, vt as DevframeRpcClientFunctions, yt as DevframeRpcServerFunctions } from "./context-BNxFOPbX.mjs";
3
3
  import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "./session-r6PDixP6.mjs";
4
4
  import "./ws-server-y2R76aSW.mjs";
5
- import "./index-DVGcpYm7.mjs";
5
+ import "./index-CxJatyA1.mjs";
6
6
  //#region src/node/rpc-core.d.ts
7
7
  interface CreateContextRpcServerOptions {
8
8
  context: DevframeNodeContext;
@@ -1,6 +1,6 @@
1
1
  import { createEventEmitter } from "./utils/events.mjs";
2
2
  import { nanoid } from "./utils/nanoid.mjs";
3
- //#region ../../node_modules/.pnpm/immer@11.1.21/node_modules/immer/dist/immer.mjs
3
+ //#region ../../node_modules/.pnpm/immer@11.2.3/node_modules/immer/dist/immer.mjs
4
4
  var NOTHING = Symbol.for("immer-nothing");
5
5
  var DRAFTABLE = Symbol.for("immer-draftable");
6
6
  var DRAFT_STATE = Symbol.for("immer-state");
@@ -646,7 +646,9 @@ function currentImpl(value) {
646
646
  copy = shallowCopy(value, state.scope_.immer_.useStrictShallowCopy_);
647
647
  strict = state.scope_.immer_.shouldUseStrictIteration();
648
648
  } else copy = shallowCopy(value, true);
649
- each(copy, (key, childValue) => {
649
+ const source = copy;
650
+ if (isSet(copy)) copy = /* @__PURE__ */ new Set();
651
+ each(source, (key, childValue) => {
650
652
  set(copy, key, currentImpl(childValue));
651
653
  }, strict);
652
654
  if (state) state.finalized_ = false;
@@ -674,6 +676,7 @@ function enablePatches() {
674
676
  key = Array.from(setParent.drafts_.keys()).indexOf(state.key_);
675
677
  } else key = state.key_;
676
678
  if (!(isSet2 && parentCopy.size > key || has(parentCopy, key))) return null;
679
+ if (state.parent_.type_ === 1 && state.parent_.allIndicesReassigned_) return null;
677
680
  path.push(key);
678
681
  }
679
682
  if (state.parent_) return getPath(state.parent_, path);
@@ -1,4 +1,4 @@
1
- import { t as diagnostics } from "./diagnostics-Dngy7cNp.mjs";
1
+ import { t as diagnostics } from "./diagnostics-E_PvUPsA.mjs";
2
2
  import { dirname } from "pathe";
3
3
  import { createSharedState } from "devframe/utils/shared-state";
4
4
  import fs from "node:fs";
@@ -1,6 +1,6 @@
1
1
  import { m as RpcFunctionAgentOptions } from "../types-BmDbfHCx.mjs";
2
- import { $ as McpSetting, At as DevframeDiagnosticsLogger, B as DevframeCliOptions, Bt as AgentResourceInput, Ct as DevframeViewHost, Dt as DevframeHost, Et as DevframeRpcSharedStates, F as CreateMcpServerOptions, G as DevframeRpcOptions, Gt as DevframeAgentHost, H as DevframeDeploymentKind, Ht as AgentToolInput, I as McpConnectionInfo, It as AgentHandle, J as DevframeSnapshotRpcInputs, Jt as EventUnsubscribe, K as DevframeSetupInfo, Kt as DevframeAgentHostEvents, L as McpContentBlock, Lt as AgentManifest, Ot as DevframeStorageScope, P as CreateMcpFetchHandlerOptions, Q as McpRouteOptions, R as McpFetchHandler, Rt as AgentResource, St as SettingsForNamespace, Tt as DevframeRpcServerFunctions, U as DevframeDockDefaults, Ut as AgentToolProvider, V as DevframeDefinition, Vt as AgentTool, W as DevframeDuplicationStrategy, Wt as AgentToolProviderHandle, X as DevframeWsOptions, Y as DevframeSseOptions, Yt as EventsMap, Z as McpAuthorization, _t as ScopedBroadcastOptions, a as DevframeConnectionConfigsRegistry, at as DevframeServiceOf, bt as ScopedServerFunctions, c as RpcBroadcastOptions, ct as DevframeServicesRegistry, d as RpcSharedStateHost, dt as DevframeScopedNodeContext, et as DevframeServiceDefinition, f as RpcStreamingChannel, ft as DevframeScopedNodeRpc, gt as DevframeSettingsStore, ht as DevframeSettingsRegistry, i as DevframeCapabilities, it as DevframeServiceMeta, kt as DevframeDiagnosticsHost, l as RpcFunctionsHost, lt as DevframeServicesScopeRegistry, m as RpcStreamingHost, mt as DevframeSettings, n as ConnectionMetaSse, nt as DevframeServiceId, o as DevframeNodeContext, ot as DevframeServiceScopeOf, p as RpcStreamingChannelOptions, pt as DevframeScopedStreamingHost, q as DevframeSnapshotRpcEntry, qt as EventEmitter, r as ConnectionMetaWebsocket, rt as DevframeServiceInput, s as DevframeNodeRpcSession, st as DevframeServicesHost, t as ConnectionMeta, tt as DevframeServiceDescriptor, u as RpcSharedStateGetOptions, ut as DevframeServicesState, vt as ScopedClientFunctions, wt as DevframeRpcClientFunctions, xt as ScopedSharedStates, yt as ScopedRpcFn, z as McpServerHandle, zt as AgentResourceContent } from "../context-dOWXVHc6.mjs";
2
+ import { $ as DevframeServiceOf, $t as AgentToolProviderHandle, At as McpFetchHandler, B as DevframeSetupInfo, Ct as DevframeStorageScope, Dt as CreateMcpServerOptions, Et as CreateMcpFetchHandlerOptions, F as DevframeDefinition, Ft as McpResourceTemplate, G as McpAuthorization, Gt as AgentHandle, H as DevframeSnapshotRpcInputs, I as DevframeDeploymentKind, It as McpResourceTemplateContent, J as DevframeServiceDefinition, Jt as AgentResourceContent, K as McpRouteOptions, Kt as AgentManifest, L as DevframeDockDefaults, Lt as McpResourceTemplateEntry, Mt as McpPromptArgument, Nt as McpPromptMessage, Ot as McpConnectionInfo, P as DevframeCliOptions, Pt as McpPromptResult, Q as DevframeServiceMeta, Qt as AgentToolProvider, R as DevframeDuplicationStrategy, Rt as McpResourcesChangedHook, St as DevframeHost, Tt as DevframeDiagnosticsLogger, U as DevframeSseOptions, V as DevframeSnapshotRpcEntry, W as DevframeWsOptions, X as DevframeServiceId, Xt as AgentTool, Y as DevframeServiceDescriptor, Yt as AgentResourceInput, Z as DevframeServiceInput, Zt as AgentToolInput, _t as DevframeViewHost, a as DevframeConnectionConfigsRegistry, at as DevframeScopedNodeContext, bt as DevframeRpcSharedStates, c as RpcBroadcastOptions, ct as DevframeSettings, d as RpcSharedStateHost, dt as ScopedBroadcastOptions, en as DevframeAgentHost, et as DevframeServiceScopeOf, f as RpcStreamingChannel, ft as ScopedClientFunctions, gt as SettingsForNamespace, ht as ScopedSharedStates, i as DevframeCapabilities, in as EventsMap, it as DevframeServicesState, jt as McpPrompt, kt as McpContentBlock, l as RpcFunctionsHost, lt as DevframeSettingsRegistry, m as RpcStreamingHost, mt as ScopedServerFunctions, n as ConnectionMetaSse, nn as EventEmitter, nt as DevframeServicesRegistry, o as DevframeNodeContext, ot as DevframeScopedNodeRpc, p as RpcStreamingChannelOptions, pt as ScopedRpcFn, q as McpSetting, qt as AgentResource, r as ConnectionMetaWebsocket, rn as EventUnsubscribe, rt as DevframeServicesScopeRegistry, s as DevframeNodeRpcSession, st as DevframeScopedStreamingHost, t as ConnectionMeta, tn as DevframeAgentHostEvents, tt as DevframeServicesHost, u as RpcSharedStateGetOptions, ut as DevframeSettingsStore, vt as DevframeRpcClientFunctions, wt as DevframeDiagnosticsHost, yt as DevframeRpcServerFunctions, z as DevframeRpcOptions, zt as McpServerHandle } from "../context-BNxFOPbX.mjs";
3
3
  import { a as DevframeWsPeer, i as DevframeRpcTransportKind, n as DevframeRpcConnection, r as DevframeRpcConnectionRequest, t as DevframeNodeRpcSessionMeta } from "../session-r6PDixP6.mjs";
4
4
  import { a as RemoteAssetsStore, i as RemoteAssetsProviderCustom, n as RemoteAssetsErrorMessage, o as StaticAssetsSource, r as RemoteAssetsProvider, t as RemoteAssets } from "../remote-assets-eBvSKZMS.mjs";
5
5
  import { i as DevframeDefineDiagnosticsOptions } from "../nostics-DWvukRwa.mjs";
6
- export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, AgentToolProvider, AgentToolProviderHandle, ConnectionMeta, ConnectionMetaSse, ConnectionMetaWebsocket, CreateMcpFetchHandlerOptions, CreateMcpServerOptions, DevframeAgentHost, DevframeAgentHostEvents, DevframeCapabilities, DevframeCliOptions, DevframeConnectionConfigsRegistry, type DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDockDefaults, DevframeDuplicationStrategy, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, DevframeRpcOptions, DevframeRpcServerFunctions, DevframeRpcSharedStates, type DevframeRpcTransportKind, DevframeScopedNodeContext, DevframeScopedNodeRpc, DevframeScopedStreamingHost, DevframeServiceDefinition, DevframeServiceDescriptor, DevframeServiceId, DevframeServiceInput, DevframeServiceMeta, DevframeServiceOf, DevframeServiceScopeOf, DevframeServicesHost, DevframeServicesRegistry, DevframeServicesScopeRegistry, DevframeServicesState, DevframeSettings, DevframeSettingsRegistry, DevframeSettingsStore, DevframeSetupInfo, DevframeSnapshotRpcEntry, DevframeSnapshotRpcInputs, DevframeSseOptions, DevframeStorageScope, DevframeViewHost, DevframeWsOptions, type DevframeWsPeer, EventEmitter, EventUnsubscribe, EventsMap, McpAuthorization, McpConnectionInfo, McpContentBlock, McpFetchHandler, McpRouteOptions, McpServerHandle, McpSetting, RemoteAssets, RemoteAssetsErrorMessage, RemoteAssetsProvider, RemoteAssetsProviderCustom, RemoteAssetsStore, RpcBroadcastOptions, type RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedRpcFn, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, StaticAssetsSource };
6
+ export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, AgentToolProvider, AgentToolProviderHandle, ConnectionMeta, ConnectionMetaSse, ConnectionMetaWebsocket, CreateMcpFetchHandlerOptions, CreateMcpServerOptions, DevframeAgentHost, DevframeAgentHostEvents, DevframeCapabilities, DevframeCliOptions, DevframeConnectionConfigsRegistry, type DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDockDefaults, DevframeDuplicationStrategy, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, DevframeRpcOptions, DevframeRpcServerFunctions, DevframeRpcSharedStates, type DevframeRpcTransportKind, DevframeScopedNodeContext, DevframeScopedNodeRpc, DevframeScopedStreamingHost, DevframeServiceDefinition, DevframeServiceDescriptor, DevframeServiceId, DevframeServiceInput, DevframeServiceMeta, DevframeServiceOf, DevframeServiceScopeOf, DevframeServicesHost, DevframeServicesRegistry, DevframeServicesScopeRegistry, DevframeServicesState, DevframeSettings, DevframeSettingsRegistry, DevframeSettingsStore, DevframeSetupInfo, DevframeSnapshotRpcEntry, DevframeSnapshotRpcInputs, DevframeSseOptions, DevframeStorageScope, DevframeViewHost, DevframeWsOptions, type DevframeWsPeer, EventEmitter, EventUnsubscribe, EventsMap, McpAuthorization, McpConnectionInfo, McpContentBlock, McpFetchHandler, McpPrompt, McpPromptArgument, McpPromptMessage, McpPromptResult, McpResourceTemplate, McpResourceTemplateContent, McpResourceTemplateEntry, McpResourcesChangedHook, McpRouteOptions, McpServerHandle, McpSetting, RemoteAssets, RemoteAssetsErrorMessage, RemoteAssetsProvider, RemoteAssetsProviderCustom, RemoteAssetsStore, RpcBroadcastOptions, type RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedRpcFn, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, StaticAssetsSource };
@@ -1,4 +1,4 @@
1
- import { Yt as EventsMap, qt as EventEmitter } from "../context-dOWXVHc6.mjs";
1
+ import { in as EventsMap, nn as EventEmitter } from "../context-BNxFOPbX.mjs";
2
2
  //#region src/utils/events.d.ts
3
3
  /**
4
4
  * Create event emitter.
@@ -1,2 +1,2 @@
1
- import { t as resolveStaticAssetsSource } from "../remote-assets-DoZ1AMpq.mjs";
1
+ import { t as resolveStaticAssetsSource } from "../remote-assets-B-n83kUY.mjs";
2
2
  export { resolveStaticAssetsSource };
@@ -1,2 +1,2 @@
1
- import { A as SharedStateEvents, D as ImmutableObject, E as ImmutableMap, M as SharedStatePatch, N as createSharedState, O as ImmutableSet, T as ImmutableArray, j as SharedStateOptions, k as SharedState, w as Immutable } from "../context-dOWXVHc6.mjs";
1
+ import { A as SharedStateEvents, D as ImmutableObject, E as ImmutableMap, M as SharedStatePatch, N as createSharedState, O as ImmutableSet, T as ImmutableArray, j as SharedStateOptions, k as SharedState, w as Immutable } from "../context-BNxFOPbX.mjs";
2
2
  export { Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableSet, SharedState, SharedStateEvents, SharedStateOptions, SharedStatePatch, createSharedState };
@@ -1,2 +1,2 @@
1
- import { t as createSharedState } from "../shared-state-Cow3u-_m.mjs";
1
+ import { t as createSharedState } from "../shared-state-Cc-Jrhma.mjs";
2
2
  export { createSharedState };
@@ -1,2 +1,2 @@
1
- import { C as createStreamSink, S as createStreamReader, _ as CreateStreamSinkOptions, b as StreamSink, g as CreateStreamReaderOptions, h as BufferedChunk, v as StreamErrorPayload, x as StreamSinkEvents, y as StreamReader } from "../context-dOWXVHc6.mjs";
1
+ import { C as createStreamSink, S as createStreamReader, _ as CreateStreamSinkOptions, b as StreamSink, g as CreateStreamReaderOptions, h as BufferedChunk, v as StreamErrorPayload, x as StreamSinkEvents, y as StreamReader } from "../context-BNxFOPbX.mjs";
2
2
  export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "devframe",
3
3
  "type": "module",
4
- "version": "1.2.6",
4
+ "version": "1.3.1",
5
5
  "description": "Framework for building one portable devtool integration that runs in any viewer.",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -77,7 +77,7 @@
77
77
  "skills"
78
78
  ],
79
79
  "peerDependencies": {
80
- "@devframes/agentic": "1.2.6",
80
+ "@devframes/agentic": "1.3.1",
81
81
  "cac": "^7.0.0"
82
82
  },
83
83
  "peerDependenciesMeta": {
@@ -89,18 +89,18 @@
89
89
  }
90
90
  },
91
91
  "dependencies": {
92
- "crossws": "^0.4.12",
93
- "h3": "^2.0.1",
92
+ "crossws": "^0.4.15",
93
+ "h3": "^2.0.7",
94
94
  "nostics": "^1.3.0",
95
95
  "pathe": "^2.0.3"
96
96
  },
97
97
  "devDependencies": {
98
- "@devframes/agentic": "1.2.6",
98
+ "@devframes/agentic": "1.3.1",
99
99
  "@standard-schema/spec": "^1.1.0",
100
100
  "birpc": "^4.2.0",
101
- "cac": "^7.0.0",
101
+ "cac": "^7.1.0",
102
102
  "get-port-please": "^3.2.0",
103
- "immer": "^11.1.21",
103
+ "immer": "^11.2.3",
104
104
  "launch-editor": "^2.14.2",
105
105
  "mlly": "^1.8.2",
106
106
  "mrmime": "^2.0.1",
@@ -110,7 +110,7 @@
110
110
  "perfect-debounce": "^2.1.0",
111
111
  "structured-clone-es": "^2.0.1",
112
112
  "tinyglobby": "^0.2.17",
113
- "tsdown": "^0.23.0",
113
+ "tsdown": "0.23.0",
114
114
  "typescript": "^6.0.3",
115
115
  "ua-parser-modern": "^0.1.1",
116
116
  "valibot": "^1.5.0",