devframe 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/{_shared-D1ebaX_J.d.mts → _shared-DjkowZKP.d.mts} +2 -2
  2. package/dist/adapters/build.d.mts +1 -1
  3. package/dist/adapters/build.mjs +1 -1
  4. package/dist/adapters/cac.d.mts +1 -1
  5. package/dist/adapters/cac.mjs +1 -1
  6. package/dist/adapters/dev.d.mts +3 -3
  7. package/dist/adapters/dev.mjs +1 -1
  8. package/dist/adapters/embedded.d.mts +1 -1
  9. package/dist/adapters/initiate.d.mts +2 -2
  10. package/dist/adapters/initiate.mjs +1 -1
  11. package/dist/adapters/mcp.d.mts +2 -2
  12. package/dist/{agentic-DLqHMOyN.d.mts → agentic-B8y_r5tQ.d.mts} +1 -1
  13. package/dist/cli/main.mjs +2 -1
  14. package/dist/client/index.d.mts +9 -1
  15. package/dist/client/index.mjs +6 -1
  16. package/dist/{context--tVkJw3W.d.mts → context-BvaYawdU.d.mts} +2 -0
  17. package/dist/{context-D3qBv0IX.d.mts → context-CNX8VDIJ.d.mts} +1 -1
  18. package/dist/{dev-BTbLJekh.mjs → dev-CInztvNK.mjs} +1 -1
  19. package/dist/in-page-channel/index.d.mts +1 -1
  20. package/dist/{index-D-2IdY1I.d.mts → index-LtvVaxSc.d.mts} +2 -2
  21. package/dist/index.d.mts +1 -1
  22. package/dist/{instance-registry-DtvYxc0Y.mjs → instance-registry-C-nC0By7.mjs} +6 -2
  23. package/dist/{instance-shell-wC2sfEU_.mjs → instance-shell-C3VrwJRS.mjs} +15 -5
  24. package/dist/{instance-shell-CXnpSuK7.d.mts → instance-shell-CM2nruNe.d.mts} +6 -4
  25. package/dist/internal/index.d.mts +14 -6
  26. package/dist/internal/index.mjs +17 -3
  27. package/dist/node/auth.d.mts +2 -2
  28. package/dist/node/hub-internals.d.mts +2 -2
  29. package/dist/node/index.d.mts +1 -1
  30. package/dist/recipes/interactive-auth.d.mts +2 -2
  31. package/dist/rpc/dump.mjs +1 -1
  32. package/dist/rpc/transports/ws-bun.d.mts +1 -1
  33. package/dist/rpc/transports/ws-deno.d.mts +1 -1
  34. package/dist/{rpc-core-B6n9MQsc.d.mts → rpc-core-CZ72-_vD.d.mts} +2 -2
  35. package/dist/types/index.d.mts +1 -1
  36. package/dist/utils/events.d.mts +1 -1
  37. package/dist/utils/launch-editor.mjs +59 -14
  38. package/dist/utils/shared-state.d.mts +1 -1
  39. package/dist/utils/streaming-channel.d.mts +1 -1
  40. package/dist/{write-DoXJzGUH.mjs → write-BWIO0h0Z.mjs} +12 -2
  41. package/package.json +7 -7
@@ -1,5 +1,5 @@
1
- import { B as DevframeDefinition, Q as McpSetting, V as DevframeDeploymentKind, Wt as DevframeAgentHost, X as McpAuthorization, t as ConnectionMeta } from "./context--tVkJw3W.mjs";
2
- import { t as AgenticMcpModule } from "./agentic-DLqHMOyN.mjs";
1
+ import { B as DevframeDefinition, Q as McpSetting, V as DevframeDeploymentKind, Wt as DevframeAgentHost, X as McpAuthorization, t as ConnectionMeta } from "./context-BvaYawdU.mjs";
2
+ import { t as AgenticMcpModule } from "./agentic-B8y_r5tQ.mjs";
3
3
  //#region src/adapters/_shared.d.ts
4
4
  /**
5
5
  * Resolve the mount base path for a devframe's SPA. Hosted adapters
@@ -1,4 +1,4 @@
1
- import { B as DevframeDefinition, K as DevframeSnapshotRpcEntry, o as DevframeNodeContext } from "../context--tVkJw3W.mjs";
1
+ import { B as DevframeDefinition, K as DevframeSnapshotRpcEntry, o as DevframeNodeContext } from "../context-BvaYawdU.mjs";
2
2
  import { o as StaticAssetsSource } from "../remote-assets-eBvSKZMS.mjs";
3
3
  //#region src/adapters/build.d.ts
4
4
  export interface CreateBuildOptions {
@@ -1,6 +1,6 @@
1
1
  import { s as colors } from "../nostics-D0PvLZsn.mjs";
2
2
  import { DEVFRAME_CONNECTION_META_FILENAME, DEVFRAME_RPC_DUMP_MANIFEST_FILENAME } from "../constants.mjs";
3
- import { n as collectStaticRpcDump, t as writeStaticRpcDump } from "../write-DoXJzGUH.mjs";
3
+ import { n as collectStaticRpcDump, t as writeStaticRpcDump } from "../write-BWIO0h0Z.mjs";
4
4
  import { t as diagnostics } from "../diagnostics-Cx4_VjlG.mjs";
5
5
  import { t as createHostContext } from "../context-BqpgC5tq.mjs";
6
6
  import { t as resolveStaticAssetsSource } from "../remote-assets-B9MeWmW6.mjs";
@@ -1,4 +1,4 @@
1
- import { B as DevframeDefinition, Mt as InferCliFlags, Nt as defineCliFlags, Pt as parseCliFlags, Q as McpSetting, jt as CliFlagsSchema } from "../context--tVkJw3W.mjs";
1
+ import { B as DevframeDefinition, Mt as InferCliFlags, Nt as defineCliFlags, Pt as parseCliFlags, Q as McpSetting, jt as CliFlagsSchema } from "../context-BvaYawdU.mjs";
2
2
  import { CAC } from "cac";
3
3
  import { H3 } from "h3";
4
4
  //#region src/adapters/cac.d.ts
@@ -1,7 +1,7 @@
1
1
  import { s as colors } from "../nostics-D0PvLZsn.mjs";
2
2
  import { i as resolveDevServerPort, s as importAgenticMcp } from "../_shared-B2PZsp-J.mjs";
3
3
  import { createBuild } from "./build.mjs";
4
- import { t as createDevServer } from "../dev-BTbLJekh.mjs";
4
+ import { t as createDevServer } from "../dev-CInztvNK.mjs";
5
5
  import process from "node:process";
6
6
  import cac$1 from "cac";
7
7
  //#region src/adapters/flags.ts
@@ -1,9 +1,9 @@
1
- import { At as DevframeAuthHandler, B as DevframeDefinition, J as DevframeSseOptions, Q as McpSetting, Y as DevframeWsOptions, s as DevframeNodeRpcSession } from "../context--tVkJw3W.mjs";
1
+ import { At as DevframeAuthHandler, B as DevframeDefinition, J as DevframeSseOptions, Q as McpSetting, Y as DevframeWsOptions, s as DevframeNodeRpcSession } from "../context-BvaYawdU.mjs";
2
2
  import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "../session-r6PDixP6.mjs";
3
3
  import { o as StaticAssetsSource } from "../remote-assets-eBvSKZMS.mjs";
4
4
  import { n as WsOriginRegistry } from "../ws-server-y2R76aSW.mjs";
5
- import { c as StartedServer } from "../instance-shell-CXnpSuK7.mjs";
6
- import { c as resolveMcpConnectionMeta, o as resolveDevServerPort, t as ResolveDevServerPortOptions } from "../_shared-D1ebaX_J.mjs";
5
+ import { c as StartedServer } from "../instance-shell-CM2nruNe.mjs";
6
+ import { c as resolveMcpConnectionMeta, o as resolveDevServerPort, t as ResolveDevServerPortOptions } from "../_shared-DjkowZKP.mjs";
7
7
  import { H3 } from "h3";
8
8
  //#region src/adapters/dev.d.ts
9
9
  export interface CreateDevServerOptions {
@@ -1,3 +1,3 @@
1
1
  import { i as resolveDevServerPort, o as resolveMcpConnectionMeta } from "../_shared-B2PZsp-J.mjs";
2
- import { t as createDevServer } from "../dev-BTbLJekh.mjs";
2
+ import { t as createDevServer } from "../dev-CInztvNK.mjs";
3
3
  export { createDevServer, resolveDevServerPort, resolveMcpConnectionMeta };
@@ -1,4 +1,4 @@
1
- import { B as DevframeDefinition, o as DevframeNodeContext } from "../context--tVkJw3W.mjs";
1
+ import { B as DevframeDefinition, o as DevframeNodeContext } from "../context-BvaYawdU.mjs";
2
2
  //#region src/adapters/embedded.d.ts
3
3
  export interface CreateEmbeddedOptions {
4
4
  /** Target context the devframe is registered into. Required. */
@@ -1,8 +1,8 @@
1
- import { At as DevframeAuthHandler, B as DevframeDefinition, Dt as DevframeStorageScope, J as DevframeSseOptions, Q as McpSetting, Y as DevframeWsOptions, o as DevframeNodeContext, s as DevframeNodeRpcSession, t as ConnectionMeta } from "../context--tVkJw3W.mjs";
1
+ import { At as DevframeAuthHandler, B as DevframeDefinition, Dt as DevframeStorageScope, J as DevframeSseOptions, Q as McpSetting, Y as DevframeWsOptions, o as DevframeNodeContext, s as DevframeNodeRpcSession, t as ConnectionMeta } from "../context-BvaYawdU.mjs";
2
2
  import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "../session-r6PDixP6.mjs";
3
3
  import { o as StaticAssetsSource } from "../remote-assets-eBvSKZMS.mjs";
4
4
  import { n as WsOriginRegistry } from "../ws-server-y2R76aSW.mjs";
5
- import { c as StartedServer, f as DevframeInstanceRecord } from "../instance-shell-CXnpSuK7.mjs";
5
+ import { c as StartedServer, f as DevframeInstanceRecord } from "../instance-shell-CM2nruNe.mjs";
6
6
  import { H3 } from "h3";
7
7
  import { Buffer } from "node:buffer";
8
8
  import { IncomingMessage, Server, ServerResponse } from "node:http";
@@ -1,2 +1,2 @@
1
- import { n as getInstanceInternals, r as initDevframe } from "../dev-BTbLJekh.mjs";
1
+ import { n as getInstanceInternals, r as initDevframe } from "../dev-CInztvNK.mjs";
2
2
  export { getInstanceInternals, initDevframe };
@@ -1,4 +1,4 @@
1
- import { F as CreateMcpServerOptions, I as McpConnectionInfo, L as McpFetchHandler, P as CreateMcpFetchHandlerOptions, R as McpServerHandle } from "../context--tVkJw3W.mjs";
2
- import { n as MountMcpHttpOptions, r as MountedMcpHttp } from "../agentic-DLqHMOyN.mjs";
1
+ import { F as CreateMcpServerOptions, I as McpConnectionInfo, L as McpFetchHandler, P as CreateMcpFetchHandlerOptions, R as McpServerHandle } from "../context-BvaYawdU.mjs";
2
+ import { n as MountMcpHttpOptions, r as MountedMcpHttp } from "../agentic-B8y_r5tQ.mjs";
3
3
  import { createMcpFetchHandler, createMcpServer, mountMcpHttp } from "@devframes/agentic/mcp";
4
4
  export { type CreateMcpFetchHandlerOptions, type CreateMcpServerOptions, type McpConnectionInfo, type McpFetchHandler, type McpServerHandle, type MountMcpHttpOptions, type MountedMcpHttp, createMcpFetchHandler, createMcpServer, mountMcpHttp };
@@ -1,4 +1,4 @@
1
- import { B as DevframeDefinition, F as CreateMcpServerOptions, L as McpFetchHandler, P as CreateMcpFetchHandlerOptions, R as McpServerHandle, o as DevframeNodeContext } from "./context--tVkJw3W.mjs";
1
+ import { B as DevframeDefinition, F as CreateMcpServerOptions, L as McpFetchHandler, P as CreateMcpFetchHandlerOptions, R as McpServerHandle, o as DevframeNodeContext } from "./context-BvaYawdU.mjs";
2
2
  import { H3 } from "h3";
3
3
  //#region src/node/agentic.d.ts
4
4
  /**
package/dist/cli/main.mjs CHANGED
@@ -29,10 +29,11 @@ async function importConnect() {
29
29
  */
30
30
  async function runDevframeCli(argv = process.argv) {
31
31
  const cli = cac("devframe");
32
- cli.command("connect", "Run the devframe MCP connector on stdio (discovers running devframe dev servers and proxies their tools)").option("--port <port>", "Probe an explicit port besides the instance registry (repeatable)").option("--instances-dir <dir>", "Override the instance registry directory (default: ~/.devframe/instances, or $DEVFRAME_INSTANCES_DIR)").option("--timeout <ms>", "Probe timeout per instance in milliseconds", { default: 1e3 }).action(async (options) => {
32
+ cli.command("connect", "Run the devframe MCP connector on stdio (discovers running devframe dev servers and proxies their tools)").option("--port <port>", "Probe an explicit port besides the instance registry (repeatable)").option("--base <path>", "Base path the --port probes look for __connection.json under, for a devframe mounted below the root (e.g. /__devtools/ for Vite DevTools)", { default: "/" }).option("--instances-dir <dir>", "Override the instance registry directory (default: ~/.devframe/instances, or $DEVFRAME_INSTANCES_DIR)").option("--timeout <ms>", "Probe timeout per instance in milliseconds", { default: 1e3 }).action(async (options) => {
33
33
  const { startConnectServer } = await importConnect();
34
34
  await startConnectServer({
35
35
  ports: parsePortsFlag(options.port),
36
+ base: typeof options.base === "string" ? options.base : void 0,
36
37
  instancesDir: options.instancesDir,
37
38
  timeoutMs: options.timeout,
38
39
  /**
@@ -1,7 +1,7 @@
1
1
  import { i as BirpcReturn, r as BirpcOptions } from "../index-Bia1vKjL.mjs";
2
2
  import { f as RpcCacheManager, p as RpcCacheOptions } from "../index-DuEm0sDH.mjs";
3
3
  import { h as RpcFunctionDefinition, w as RpcFunctionsCollector } from "../types-BmDbfHCx.mjs";
4
- import { Ct as DevframeRpcClientFunctions, Kt as EventEmitter, at as DevframeServiceScopeOf, b as StreamSink, bt as ScopedSharedStates, d as RpcSharedStateHost, k as SharedState, lt as DevframeServicesState, pt as DevframeSettings, rt as DevframeServiceMeta, t as ConnectionMeta, u as RpcSharedStateGetOptions, vt as ScopedRpcFn, wt as DevframeRpcServerFunctions, xt as SettingsForNamespace, y as StreamReader, yt as ScopedServerFunctions } from "../context--tVkJw3W.mjs";
4
+ import { Ct as DevframeRpcClientFunctions, Kt as EventEmitter, at as DevframeServiceScopeOf, b as StreamSink, bt as ScopedSharedStates, d as RpcSharedStateHost, k as SharedState, lt as DevframeServicesState, pt as DevframeSettings, rt as DevframeServiceMeta, t as ConnectionMeta, u as RpcSharedStateGetOptions, vt as ScopedRpcFn, wt as DevframeRpcServerFunctions, xt as SettingsForNamespace, y as StreamReader, yt as ScopedServerFunctions } from "../context-BvaYawdU.mjs";
5
5
  import { t as SseRpcChannelOptions } from "../sse-client-DNdscfu_.mjs";
6
6
  import { t as WsRpcChannelOptions } from "../ws-client-6Mrz6eC4.mjs";
7
7
  //#region src/client/connection.d.ts
@@ -502,6 +502,14 @@ export interface DevframeRpcClientMode {
502
502
  export declare function resolveClientTransport(requested: 'auto' | 'websocket' | 'sse', meta: ConnectionMeta): 'websocket' | 'sse' | 'static';
503
503
  export declare function getDevframeRpcClient(options?: DevframeRpcClientOptions): Promise<DevframeRpcClient>;
504
504
  //#endregion
505
+ //#region src/client/connection-storage.d.ts
506
+ /**
507
+ * Publish the connection on this window for same-origin frames to inherit.
508
+ * Call again after mutating `connection.connectionMeta` so the legacy meta
509
+ * copy below follows.
510
+ */
511
+ export declare function storeConnection(connection: DevframeConnection): void;
512
+ //#endregion
505
513
  //#region src/client/otp.d.ts
506
514
  /**
507
515
  * Read a one-time authentication code (OTP) from the current page URL's
@@ -410,6 +410,11 @@ function readStoredAuthToken(userAuthToken) {
410
410
  } catch {}
411
411
  return readFromWindows(CONNECTION_AUTH_TOKEN_KEY);
412
412
  }
413
+ /**
414
+ * Publish the connection on this window for same-origin frames to inherit.
415
+ * Call again after mutating `connection.connectionMeta` so the legacy meta
416
+ * copy below follows.
417
+ */
413
418
  function storeConnection(connection) {
414
419
  globalThis[DEVFRAME_CONNECTION_KEY] = connection;
415
420
  globalThis[CONNECTION_META_KEY] = {
@@ -2002,4 +2007,4 @@ async function getDevframeRpcClient(options = {}) {
2002
2007
  //#region src/client/index.ts
2003
2008
  const connectDevframe = getDevframeRpcClient;
2004
2009
  //#endregion
2005
- export { DevframeConnectionError, authenticateWithUrlOtp, connectDevframe, consumeOtpFromUrl, createClientSettings, createRpcStreamingClientHost, createScopedClientContext, getDevframeConnection, getDevframeRpcClient, isCallableStatus, readOtpFromUrl, registerDevframeViewerOrigin, registerWebMcpTools, resolveClientTransport, resolveSseUrl, resolveWebMcpModelContext, resolveWsUrl, setupDevframeConnection };
2010
+ export { DevframeConnectionError, authenticateWithUrlOtp, connectDevframe, consumeOtpFromUrl, createClientSettings, createRpcStreamingClientHost, createScopedClientContext, getDevframeConnection, getDevframeRpcClient, isCallableStatus, readOtpFromUrl, registerDevframeViewerOrigin, registerWebMcpTools, resolveClientTransport, resolveSseUrl, resolveWebMcpModelContext, resolveWsUrl, setupDevframeConnection, storeConnection };
@@ -1376,6 +1376,8 @@ interface DevframeCliOptions {
1376
1376
  interface DevframeDockDefaults {
1377
1377
  /** Dock entry title. Defaults to the definition's `name`. */
1378
1378
  title?: string;
1379
+ /** Translations of `title` by BCP 47 tag; see `@devframes/hub`'s `resolveTitle()`. */
1380
+ titleLocales?: Record<string, string>;
1379
1381
  /** Dock entry icon. Defaults to the definition's `icon`. */
1380
1382
  icon?: string | {
1381
1383
  light: string;
@@ -1,4 +1,4 @@
1
- import { k as SharedState, o as DevframeNodeContext } from "./context--tVkJw3W.mjs";
1
+ import { k as SharedState, o as DevframeNodeContext } from "./context-BvaYawdU.mjs";
2
2
  //#region src/node/hub-internals/context.d.ts
3
3
  interface InternalAnonymousAuthStorage {
4
4
  trusted: Record<string, {
@@ -4,7 +4,7 @@ import { t as createHostContext } from "./context-BqpgC5tq.mjs";
4
4
  import { t as resolveStaticAssetsSource } from "./remote-assets-B9MeWmW6.mjs";
5
5
  import { a as resolveMcpConfig, c as joinURL, d as withoutLeadingSlash, i as resolveDevServerPort, l as withBase, n as normalizeBasePath, r as resolveBasePath, s as importAgenticMcp, t as loadAutoMcpAdapter } from "./_shared-B2PZsp-J.mjs";
6
6
  import { t as createH3DevframeHost } from "./host-h3-BROI6SQ4.mjs";
7
- import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, t as createInstanceShell } from "./instance-shell-wC2sfEU_.mjs";
7
+ import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, t as createInstanceShell } from "./instance-shell-C3VrwJRS.mjs";
8
8
  import { open } from "./utils/open.mjs";
9
9
  import { mountStaticHandler } from "./utils/serve-static.mjs";
10
10
  import { resolve } from "pathe";
@@ -1,5 +1,5 @@
1
1
  import { D as InferArgsType, E as Thenable, O as InferReturnType, T as RpcReturnSchema, m as RpcFunctionAgentOptions, n as RpcArgsSchema } from "../types-BmDbfHCx.mjs";
2
- import { Kt as EventEmitter, k as SharedState } from "../context--tVkJw3W.mjs";
2
+ import { Kt as EventEmitter, k as SharedState } from "../context-BvaYawdU.mjs";
3
3
  //#region src/in-page-channel/types.d.ts
4
4
  /**
5
5
  * The shared contract of one in-page channel, declared once (usually in a
@@ -1,5 +1,5 @@
1
- import { k as SharedState, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "./context--tVkJw3W.mjs";
2
- import { n as InternalAnonymousAuthStorage } from "./context-D3qBv0IX.mjs";
1
+ import { k as SharedState, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "./context-BvaYawdU.mjs";
2
+ import { n as InternalAnonymousAuthStorage } from "./context-CNX8VDIJ.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,5 +1,5 @@
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 DevframeServiceDefinition, B as DevframeDefinition, Bt as AgentTool, Ct as DevframeRpcClientFunctions, Dt as DevframeStorageScope, Et as DevframeHost, F as CreateMcpServerOptions, Ft as AgentHandle, G as DevframeSetupInfo, Gt as DevframeAgentHostEvents, H as DevframeDockDefaults, Ht as AgentToolProvider, I as McpConnectionInfo, It as AgentManifest, J as DevframeSseOptions, Jt as EventsMap, K as DevframeSnapshotRpcEntry, Kt as EventEmitter, L as McpFetchHandler, Lt as AgentResource, Ot as DevframeDiagnosticsHost, P as CreateMcpFetchHandlerOptions, Q as McpSetting, R as McpServerHandle, Rt as AgentResourceContent, St as DevframeViewHost, Tt as DevframeRpcSharedStates, U as DevframeDuplicationStrategy, Ut as AgentToolProviderHandle, V as DevframeDeploymentKind, Vt as AgentToolInput, W as DevframeRpcOptions, Wt as DevframeAgentHost, X as McpAuthorization, Y as DevframeWsOptions, Z as McpRouteOptions, _t as ScopedClientFunctions, a as DevframeConnectionConfigsRegistry, at as DevframeServiceScopeOf, bt as ScopedSharedStates, c as RpcBroadcastOptions, ct as DevframeServicesScopeRegistry, d as RpcSharedStateHost, dt as DevframeScopedNodeRpc, et as DevframeServiceDescriptor, f as RpcStreamingChannel, ft as DevframeScopedStreamingHost, gt as ScopedBroadcastOptions, ht as DevframeSettingsStore, i as DevframeCapabilities, it as DevframeServiceOf, kt as DevframeDiagnosticsLogger, l as RpcFunctionsHost, lt as DevframeServicesState, m as RpcStreamingHost, mt as DevframeSettingsRegistry, n as ConnectionMetaSse, nt as DevframeServiceInput, o as DevframeNodeContext, ot as DevframeServicesHost, p as RpcStreamingChannelOptions, pt as DevframeSettings, q as DevframeSnapshotRpcInputs, qt as EventUnsubscribe, r as ConnectionMetaWebsocket, rt as DevframeServiceMeta, s as DevframeNodeRpcSession, st as DevframeServicesRegistry, t as ConnectionMeta, tt as DevframeServiceId, u as RpcSharedStateGetOptions, ut as DevframeScopedNodeContext, vt as ScopedRpcFn, wt as DevframeRpcServerFunctions, xt as SettingsForNamespace, yt as ScopedServerFunctions, z as DevframeCliOptions, zt as AgentResourceInput } from "./context--tVkJw3W.mjs";
2
+ import { $ as DevframeServiceDefinition, B as DevframeDefinition, Bt as AgentTool, Ct as DevframeRpcClientFunctions, Dt as DevframeStorageScope, Et as DevframeHost, F as CreateMcpServerOptions, Ft as AgentHandle, G as DevframeSetupInfo, Gt as DevframeAgentHostEvents, H as DevframeDockDefaults, Ht as AgentToolProvider, I as McpConnectionInfo, It as AgentManifest, J as DevframeSseOptions, Jt as EventsMap, K as DevframeSnapshotRpcEntry, Kt as EventEmitter, L as McpFetchHandler, Lt as AgentResource, Ot as DevframeDiagnosticsHost, P as CreateMcpFetchHandlerOptions, Q as McpSetting, R as McpServerHandle, Rt as AgentResourceContent, St as DevframeViewHost, Tt as DevframeRpcSharedStates, U as DevframeDuplicationStrategy, Ut as AgentToolProviderHandle, V as DevframeDeploymentKind, Vt as AgentToolInput, W as DevframeRpcOptions, Wt as DevframeAgentHost, X as McpAuthorization, Y as DevframeWsOptions, Z as McpRouteOptions, _t as ScopedClientFunctions, a as DevframeConnectionConfigsRegistry, at as DevframeServiceScopeOf, bt as ScopedSharedStates, c as RpcBroadcastOptions, ct as DevframeServicesScopeRegistry, d as RpcSharedStateHost, dt as DevframeScopedNodeRpc, et as DevframeServiceDescriptor, f as RpcStreamingChannel, ft as DevframeScopedStreamingHost, gt as ScopedBroadcastOptions, ht as DevframeSettingsStore, i as DevframeCapabilities, it as DevframeServiceOf, kt as DevframeDiagnosticsLogger, l as RpcFunctionsHost, lt as DevframeServicesState, m as RpcStreamingHost, mt as DevframeSettingsRegistry, n as ConnectionMetaSse, nt as DevframeServiceInput, o as DevframeNodeContext, ot as DevframeServicesHost, p as RpcStreamingChannelOptions, pt as DevframeSettings, q as DevframeSnapshotRpcInputs, qt as EventUnsubscribe, r as ConnectionMetaWebsocket, rt as DevframeServiceMeta, s as DevframeNodeRpcSession, st as DevframeServicesRegistry, t as ConnectionMeta, tt as DevframeServiceId, u as RpcSharedStateGetOptions, ut as DevframeScopedNodeContext, vt as ScopedRpcFn, wt as DevframeRpcServerFunctions, xt as SettingsForNamespace, yt as ScopedServerFunctions, z as DevframeCliOptions, zt as AgentResourceInput } from "./context-BvaYawdU.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";
@@ -116,7 +116,9 @@ function originCandidates(origin) {
116
116
  * Probe `<origin><basePath>__connection.json`, trying each dialable
117
117
  * candidate for the origin (see {@link originCandidates}). The single
118
118
  * probe primitive behind both registry liveness checks and the
119
- * connector's explicit `--port` probes.
119
+ * connector's explicit `--port` probes. A candidate counts only when it
120
+ * answers `2xx` with a JSON object; anything else (an HTML SPA fallback, a
121
+ * JSON array, an unparseable body) is treated as "no devframe here".
120
122
  *
121
123
  * @internal
122
124
  */
@@ -125,9 +127,11 @@ async function probeDevframeOrigin(origin, basePath, timeoutMs) {
125
127
  for (const candidate of originCandidates(origin)) try {
126
128
  const response = await fetch(`${candidate}${base}__connection.json`, { signal: AbortSignal.timeout(timeoutMs ?? 1e3) });
127
129
  if (!response.ok) continue;
130
+ const meta = await response.json().catch(() => void 0);
131
+ if (!meta || typeof meta !== "object" || Array.isArray(meta)) continue;
128
132
  return {
129
133
  origin: candidate,
130
- meta: await response.json().catch(() => ({}))
134
+ meta
131
135
  };
132
136
  } catch {}
133
137
  return null;
@@ -7,6 +7,7 @@ import { n as createInteractiveAuth } from "./interactive-auth-BCa_iamv.mjs";
7
7
  import { createServer } from "node:http";
8
8
  import process from "node:process";
9
9
  import { isIP } from "node:net";
10
+ import { Server } from "node:tls";
10
11
  import { H3, defineHandler, toNodeHandler } from "h3";
11
12
  //#region src/node/runtime.ts
12
13
  /**
@@ -106,9 +107,17 @@ async function bindHttpAndWs(options) {
106
107
  const address = httpServer.address();
107
108
  const resolvedPort = typeof address === "object" && address ? address.port : port;
108
109
  const origin = normalizeHttpServerUrl(bindHost, resolvedPort);
109
- const internal = getInternalContext(context);
110
- const wsUrl = `ws://${formatHostForUrl(bindHost)}:${resolvedPort}${options.path ?? ""}`;
111
- if (websocket) internal.setWsEndpoint({ url: wsUrl });
110
+ let wsUrl;
111
+ const publishWsEndpoint = () => {
112
+ const bound = httpServer.address();
113
+ if (!bound || typeof bound === "string") return;
114
+ wsUrl = `${httpServer instanceof Server ? "wss" : "ws"}://${formatHostForUrl(bindHost)}:${bound.port}${options.path ?? ""}`;
115
+ getInternalContext(context).setWsEndpoint({ url: wsUrl });
116
+ };
117
+ if (websocket) {
118
+ if (httpServer.listening) publishWsEndpoint();
119
+ else httpServer.once("listening", publishWsEndpoint);
120
+ }
112
121
  return {
113
122
  origin,
114
123
  port: resolvedPort,
@@ -117,9 +126,10 @@ async function bindHttpAndWs(options) {
117
126
  rpcGroup: core.rpcGroup,
118
127
  connectionMeta: () => websocketConnectionMeta(rpcHost, options.path),
119
128
  async close() {
129
+ httpServer.off("listening", publishWsEndpoint);
120
130
  await closeWs();
121
131
  if (ownsHttpServer) await new Promise((r) => httpServer.close(() => r()));
122
- if (websocket && getInternalContext(context).wsEndpoint?.url === wsUrl) getInternalContext(context).setWsEndpoint(void 0);
132
+ if (wsUrl && getInternalContext(context).wsEndpoint?.url === wsUrl) getInternalContext(context).setWsEndpoint(void 0);
123
133
  }
124
134
  };
125
135
  }
@@ -311,7 +321,7 @@ function createInstanceShell(options) {
311
321
  const origin = currentOrigin();
312
322
  if (!cfg || registerPromise || !origin || !meta) return;
313
323
  const resolvedMeta = meta;
314
- registerPromise = import("./instance-registry-DtvYxc0Y.mjs").then((n) => n.t).then(({ registerDevframeInstance }) => {
324
+ registerPromise = import("./instance-registry-C-nC0By7.mjs").then((n) => n.t).then(({ registerDevframeInstance }) => {
315
325
  let port = 0;
316
326
  try {
317
327
  const url = new URL(origin);
@@ -1,8 +1,8 @@
1
1
  import { n as BirpcGroup } from "./index-Bia1vKjL.mjs";
2
- import { At as DevframeAuthHandler, Ct as DevframeRpcClientFunctions, J as DevframeSseOptions, Y as DevframeWsOptions, o as DevframeNodeContext, s as DevframeNodeRpcSession, t as ConnectionMeta, wt as DevframeRpcServerFunctions } from "./context--tVkJw3W.mjs";
2
+ import { At as DevframeAuthHandler, Ct as DevframeRpcClientFunctions, J as DevframeSseOptions, Y as DevframeWsOptions, o as DevframeNodeContext, s as DevframeNodeRpcSession, t as ConnectionMeta, wt as DevframeRpcServerFunctions } from "./context-BvaYawdU.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-D-2IdY1I.mjs";
5
+ import "./index-LtvVaxSc.mjs";
6
6
  import { H3 } from "h3";
7
7
  import { NodeAdapter } from "crossws/adapters/node";
8
8
  import { Buffer } from "node:buffer";
@@ -74,7 +74,7 @@ declare function registerDevframeInstance(record: DevframeInstanceRecord, option
74
74
  interface ProbedDevframeOrigin {
75
75
  /** The origin that answered (may be an explicit address family for a `localhost` bind). */
76
76
  origin: string;
77
- /** The parsed `__connection.json` payload (`{}` when unparseable). */
77
+ /** The parsed `__connection.json` payload (always a JSON object). */
78
78
  meta: {
79
79
  mcp?: {
80
80
  path: string;
@@ -86,7 +86,9 @@ interface ProbedDevframeOrigin {
86
86
  * Probe `<origin><basePath>__connection.json`, trying each dialable
87
87
  * candidate for the origin (see {@link originCandidates}). The single
88
88
  * probe primitive behind both registry liveness checks and the
89
- * connector's explicit `--port` probes.
89
+ * connector's explicit `--port` probes. A candidate counts only when it
90
+ * answers `2xx` with a JSON object; anything else (an HTML SPA fallback, a
91
+ * JSON array, an unparseable body) is treated as "no devframe here".
90
92
  *
91
93
  * @internal
92
94
  */
@@ -1,11 +1,11 @@
1
1
  import { t as StandardSchemaV1 } from "../index-CeEtxDmK.mjs";
2
2
  import { g as RpcFunctionDefinitionAny } from "../types-BmDbfHCx.mjs";
3
- import { Bt as AgentTool, Et as DevframeHost, Ft as AgentHandle, Gt as DevframeAgentHostEvents, Ht as AgentToolProvider, It as AgentManifest, Kt as EventEmitter, Lt as AgentResource, Rt as AgentResourceContent, Ut as AgentToolProviderHandle, Vt as AgentToolInput, Wt as DevframeAgentHost$1, o as DevframeNodeContext, zt as AgentResourceInput } from "../context--tVkJw3W.mjs";
3
+ import { Bt as AgentTool, Et as DevframeHost, Ft as AgentHandle, Gt as DevframeAgentHostEvents, Ht as AgentToolProvider, It as AgentManifest, Kt as EventEmitter, Lt as AgentResource, Rt as AgentResourceContent, Ut as AgentToolProviderHandle, Vt as AgentToolInput, Wt as DevframeAgentHost$1, o as DevframeNodeContext, zt as AgentResourceInput } from "../context-BvaYawdU.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-CXnpSuK7.mjs";
6
- import { i as importAgenticMcp, n as MountMcpHttpOptions, r as MountedMcpHttp, t as AgenticMcpModule } from "../agentic-DLqHMOyN.mjs";
7
- import { a as resolveBasePath, i as normalizeBasePath, n as ResolvedMcpConfig, r as loadAutoMcpAdapter, s as resolveMcpConfig } from "../_shared-D1ebaX_J.mjs";
8
- import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-B6n9MQsc.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-CM2nruNe.mjs";
6
+ import { i as importAgenticMcp, n as MountMcpHttpOptions, r as MountedMcpHttp, t as AgenticMcpModule } from "../agentic-B8y_r5tQ.mjs";
7
+ import { a as resolveBasePath, i as normalizeBasePath, n as ResolvedMcpConfig, r as loadAutoMcpAdapter, s as resolveMcpConfig } from "../_shared-DjkowZKP.mjs";
8
+ import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-CZ72-_vD.mjs";
9
9
  //#region src/agent/stringify.d.ts
10
10
  /**
11
11
  * JSON-coercing serializer for MCP text payloads.
@@ -41,6 +41,14 @@ export declare function formatMcpError(error: unknown): string;
41
41
  //#region src/agent/to-json-schema.d.ts
42
42
  /**
43
43
  * JSON Schema for an RPC return value on the agent/MCP surface.
44
+ *
45
+ * Unlike args, a return value has no permissive fallback: the schema is
46
+ * advertised as an MCP `outputSchema`, which obliges the tool to return a
47
+ * matching object on every call. A validator with no native converter
48
+ * (e.g. valibot), or one whose converter cannot express the schema, yields
49
+ * no output schema rather than an unfounded object one, so array- and
50
+ * primitive-returning tools still work. Conversion uses the converter's
51
+ * `output`, since a transforming validator returns its output type.
44
52
  * @internal
45
53
  */
46
54
  export declare function returnToJsonSchema(schema: StandardSchemaV1 | undefined): unknown;
@@ -374,7 +382,7 @@ export declare const diagnostics: import("nostics").Diagnostics<{
374
382
  };
375
383
  }, readonly [(d: import("nostics").Diagnostic, { method }?: {
376
384
  method?: "log" | "warn" | "error";
377
- }) => void]>;
385
+ }) => void], never>;
378
386
  //#endregion
379
387
  //#region src/node/host-agent.d.ts
380
388
  /**
@@ -5,8 +5,8 @@ import { n as toolInputToCommandArgs, t as DevframeAgentHost } from "../host-age
5
5
  import { a as resolveMcpConfig, n as normalizeBasePath, r as resolveBasePath, s as importAgenticMcp, t as loadAutoMcpAdapter } from "../_shared-B2PZsp-J.mjs";
6
6
  import { t as importRuntimeModule } from "../import-runtime-module-BzlEQ9PI.mjs";
7
7
  import { t as createH3DevframeHost } from "../host-h3-BROI6SQ4.mjs";
8
- import { i as registerDevframeInstance, n as listLiveDevframeInstances, r as probeDevframeOrigin } from "../instance-registry-DtvYxc0Y.mjs";
9
- import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-wC2sfEU_.mjs";
8
+ import { i as registerDevframeInstance, n as listLiveDevframeInstances, r as probeDevframeOrigin } from "../instance-registry-C-nC0By7.mjs";
9
+ import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-C3VrwJRS.mjs";
10
10
  import { t as createContextRpcServer } from "../rpc-core-BXyMjbKG.mjs";
11
11
  //#region src/agent/stringify.ts
12
12
  /**
@@ -107,11 +107,25 @@ function safeToJsonSchema(schema) {
107
107
  }
108
108
  /**
109
109
  * JSON Schema for an RPC return value on the agent/MCP surface.
110
+ *
111
+ * Unlike args, a return value has no permissive fallback: the schema is
112
+ * advertised as an MCP `outputSchema`, which obliges the tool to return a
113
+ * matching object on every call. A validator with no native converter
114
+ * (e.g. valibot), or one whose converter cannot express the schema, yields
115
+ * no output schema rather than an unfounded object one, so array- and
116
+ * primitive-returning tools still work. Conversion uses the converter's
117
+ * `output`, since a transforming validator returns its output type.
110
118
  * @internal
111
119
  */
112
120
  function returnToJsonSchema(schema) {
113
121
  if (!schema) return void 0;
114
- return safeToJsonSchema(schema);
122
+ const standard = schema["~standard"];
123
+ if (!standard.jsonSchema) return void 0;
124
+ try {
125
+ return standard.jsonSchema.output({ target: "draft-2020-12" });
126
+ } catch {
127
+ return;
128
+ }
115
129
  }
116
130
  /**
117
131
  * JSON Schema for an RPC function's positional args on the agent/MCP
@@ -1,3 +1,3 @@
1
- import { At as DevframeAuthHandler } from "../context--tVkJw3W.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-D-2IdY1I.mjs";
1
+ import { At as DevframeAuthHandler } from "../context-BvaYawdU.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-LtvVaxSc.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-D3qBv0IX.mjs";
2
- import { a as resolveBasePath, i as normalizeBasePath } from "../_shared-D1ebaX_J.mjs";
1
+ import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-CNX8VDIJ.mjs";
2
+ import { a as resolveBasePath, i as normalizeBasePath } from "../_shared-DjkowZKP.mjs";
3
3
  export { type DevframeInternalContext, type InternalAnonymousAuthStorage, type RemoteTokenRecord, getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
@@ -1,5 +1,5 @@
1
1
  import { g as RpcFunctionDefinitionAny } from "../types-BmDbfHCx.mjs";
2
- import { Et as DevframeHost, k as SharedState, l as RpcFunctionsHost, o as DevframeNodeContext } from "../context--tVkJw3W.mjs";
2
+ import { Et as DevframeHost, k as SharedState, l as RpcFunctionsHost, o as DevframeNodeContext } from "../context-BvaYawdU.mjs";
3
3
  //#region src/node/context.d.ts
4
4
  export interface CreateHostContextOptions {
5
5
  cwd: string;
@@ -1,5 +1,5 @@
1
- import { At as DevframeAuthHandler, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "../context--tVkJw3W.mjs";
2
- import "../index-D-2IdY1I.mjs";
1
+ import { At as DevframeAuthHandler, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "../context-BvaYawdU.mjs";
2
+ import "../index-LtvVaxSc.mjs";
3
3
  import { ColorFn } from "../utils/colors.mjs";
4
4
  //#region src/recipes/interactive-auth.d.ts
5
5
  export interface CreateInteractiveAuthOptions {
package/dist/rpc/dump.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as getDefinitionsWithDumps, i as dumpFunctions, n as collectStaticRpcDump, o as reviveDumpError, r as createClientFromDump, s as serializeDumpError, t as writeStaticRpcDump } from "../write-DoXJzGUH.mjs";
1
+ import { a as getDefinitionsWithDumps, i as dumpFunctions, n as collectStaticRpcDump, o as reviveDumpError, r as createClientFromDump, s as serializeDumpError, t as writeStaticRpcDump } from "../write-BWIO0h0Z.mjs";
2
2
  export { collectStaticRpcDump, createClientFromDump, dumpFunctions, getDefinitionsWithDumps, reviveDumpError, serializeDumpError, writeStaticRpcDump };
@@ -1,5 +1,5 @@
1
1
  import { n as WsOriginRegistry } from "../../ws-server-y2R76aSW.mjs";
2
- import { t as ContextRpcServer } from "../../rpc-core-B6n9MQsc.mjs";
2
+ import { t as ContextRpcServer } from "../../rpc-core-CZ72-_vD.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-B6n9MQsc.mjs";
2
+ import { t as ContextRpcServer } from "../../rpc-core-CZ72-_vD.mjs";
3
3
  //#region src/rpc/transports/ws-deno.d.ts
4
4
  export interface AttachDenoWsTransportOptions {
5
5
  /** Same contract as `WsRpcTransportOptions.allowedOrigins`. */
@@ -1,8 +1,8 @@
1
1
  import { n as BirpcGroup, o as EventOptions } from "./index-Bia1vKjL.mjs";
2
- import { At as DevframeAuthHandler, Ct as DevframeRpcClientFunctions, o as DevframeNodeContext, s as DevframeNodeRpcSession, wt as DevframeRpcServerFunctions } from "./context--tVkJw3W.mjs";
2
+ import { At as DevframeAuthHandler, Ct as DevframeRpcClientFunctions, o as DevframeNodeContext, s as DevframeNodeRpcSession, wt as DevframeRpcServerFunctions } from "./context-BvaYawdU.mjs";
3
3
  import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "./session-r6PDixP6.mjs";
4
4
  import "./ws-server-y2R76aSW.mjs";
5
- import "./index-D-2IdY1I.mjs";
5
+ import "./index-LtvVaxSc.mjs";
6
6
  //#region src/node/rpc-core.d.ts
7
7
  interface CreateContextRpcServerOptions {
8
8
  context: DevframeNodeContext;
@@ -1,5 +1,5 @@
1
1
  import { m as RpcFunctionAgentOptions } from "../types-BmDbfHCx.mjs";
2
- import { $ as DevframeServiceDefinition, B as DevframeDefinition, Bt as AgentTool, Ct as DevframeRpcClientFunctions, Dt as DevframeStorageScope, Et as DevframeHost, F as CreateMcpServerOptions, Ft as AgentHandle, G as DevframeSetupInfo, Gt as DevframeAgentHostEvents, H as DevframeDockDefaults, Ht as AgentToolProvider, I as McpConnectionInfo, It as AgentManifest, J as DevframeSseOptions, Jt as EventsMap, K as DevframeSnapshotRpcEntry, Kt as EventEmitter, L as McpFetchHandler, Lt as AgentResource, Ot as DevframeDiagnosticsHost, P as CreateMcpFetchHandlerOptions, Q as McpSetting, R as McpServerHandle, Rt as AgentResourceContent, St as DevframeViewHost, Tt as DevframeRpcSharedStates, U as DevframeDuplicationStrategy, Ut as AgentToolProviderHandle, V as DevframeDeploymentKind, Vt as AgentToolInput, W as DevframeRpcOptions, Wt as DevframeAgentHost, X as McpAuthorization, Y as DevframeWsOptions, Z as McpRouteOptions, _t as ScopedClientFunctions, a as DevframeConnectionConfigsRegistry, at as DevframeServiceScopeOf, bt as ScopedSharedStates, c as RpcBroadcastOptions, ct as DevframeServicesScopeRegistry, d as RpcSharedStateHost, dt as DevframeScopedNodeRpc, et as DevframeServiceDescriptor, f as RpcStreamingChannel, ft as DevframeScopedStreamingHost, gt as ScopedBroadcastOptions, ht as DevframeSettingsStore, i as DevframeCapabilities, it as DevframeServiceOf, kt as DevframeDiagnosticsLogger, l as RpcFunctionsHost, lt as DevframeServicesState, m as RpcStreamingHost, mt as DevframeSettingsRegistry, n as ConnectionMetaSse, nt as DevframeServiceInput, o as DevframeNodeContext, ot as DevframeServicesHost, p as RpcStreamingChannelOptions, pt as DevframeSettings, q as DevframeSnapshotRpcInputs, qt as EventUnsubscribe, r as ConnectionMetaWebsocket, rt as DevframeServiceMeta, s as DevframeNodeRpcSession, st as DevframeServicesRegistry, t as ConnectionMeta, tt as DevframeServiceId, u as RpcSharedStateGetOptions, ut as DevframeScopedNodeContext, vt as ScopedRpcFn, wt as DevframeRpcServerFunctions, xt as SettingsForNamespace, yt as ScopedServerFunctions, z as DevframeCliOptions, zt as AgentResourceInput } from "../context--tVkJw3W.mjs";
2
+ import { $ as DevframeServiceDefinition, B as DevframeDefinition, Bt as AgentTool, Ct as DevframeRpcClientFunctions, Dt as DevframeStorageScope, Et as DevframeHost, F as CreateMcpServerOptions, Ft as AgentHandle, G as DevframeSetupInfo, Gt as DevframeAgentHostEvents, H as DevframeDockDefaults, Ht as AgentToolProvider, I as McpConnectionInfo, It as AgentManifest, J as DevframeSseOptions, Jt as EventsMap, K as DevframeSnapshotRpcEntry, Kt as EventEmitter, L as McpFetchHandler, Lt as AgentResource, Ot as DevframeDiagnosticsHost, P as CreateMcpFetchHandlerOptions, Q as McpSetting, R as McpServerHandle, Rt as AgentResourceContent, St as DevframeViewHost, Tt as DevframeRpcSharedStates, U as DevframeDuplicationStrategy, Ut as AgentToolProviderHandle, V as DevframeDeploymentKind, Vt as AgentToolInput, W as DevframeRpcOptions, Wt as DevframeAgentHost, X as McpAuthorization, Y as DevframeWsOptions, Z as McpRouteOptions, _t as ScopedClientFunctions, a as DevframeConnectionConfigsRegistry, at as DevframeServiceScopeOf, bt as ScopedSharedStates, c as RpcBroadcastOptions, ct as DevframeServicesScopeRegistry, d as RpcSharedStateHost, dt as DevframeScopedNodeRpc, et as DevframeServiceDescriptor, f as RpcStreamingChannel, ft as DevframeScopedStreamingHost, gt as ScopedBroadcastOptions, ht as DevframeSettingsStore, i as DevframeCapabilities, it as DevframeServiceOf, kt as DevframeDiagnosticsLogger, l as RpcFunctionsHost, lt as DevframeServicesState, m as RpcStreamingHost, mt as DevframeSettingsRegistry, n as ConnectionMetaSse, nt as DevframeServiceInput, o as DevframeNodeContext, ot as DevframeServicesHost, p as RpcStreamingChannelOptions, pt as DevframeSettings, q as DevframeSnapshotRpcInputs, qt as EventUnsubscribe, r as ConnectionMetaWebsocket, rt as DevframeServiceMeta, s as DevframeNodeRpcSession, st as DevframeServicesRegistry, t as ConnectionMeta, tt as DevframeServiceId, u as RpcSharedStateGetOptions, ut as DevframeScopedNodeContext, vt as ScopedRpcFn, wt as DevframeRpcServerFunctions, xt as SettingsForNamespace, yt as ScopedServerFunctions, z as DevframeCliOptions, zt as AgentResourceInput } from "../context-BvaYawdU.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";
@@ -1,4 +1,4 @@
1
- import { Jt as EventsMap, Kt as EventEmitter } from "../context--tVkJw3W.mjs";
1
+ import { Jt as EventsMap, Kt as EventEmitter } from "../context-BvaYawdU.mjs";
2
2
  //#region src/utils/events.d.ts
3
3
  /**
4
4
  * Create event emitter.
@@ -69,7 +69,7 @@ var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
69
69
  module.exports.createColors = createColors;
70
70
  }));
71
71
  //#endregion
72
- //#region ../../node_modules/.pnpm/shell-quote@1.10.0/node_modules/shell-quote/quote.js
72
+ //#region ../../node_modules/.pnpm/shell-quote@1.11.0/node_modules/shell-quote/quote.js
73
73
  var require_quote = /* @__PURE__ */ __commonJSMin(((exports, module) => {
74
74
  /** @import { ControlOperator } from './parse' */
75
75
  /** @type {ControlOperator['op'][]} */
@@ -92,15 +92,18 @@ var require_quote = /* @__PURE__ */ __commonJSMin(((exports, module) => {
92
92
  ">"
93
93
  ];
94
94
  var LINE_TERMINATORS = /[\n\r\u2028\u2029]/;
95
- var GLOB_SHELL_SPECIAL = /[\s#!"$&'():;<=>@\\^`|]/g;
95
+ var GLOB_SHELL_SPECIAL = /[\s#!"$&'():;<=>@\\^`|~]/g;
96
96
  /** @type {typeof import('./quote')} */
97
97
  module.exports = function quote(xs) {
98
+ var sawComment = false;
98
99
  return xs.map(function(s) {
100
+ if (sawComment && typeof s === "string" && LINE_TERMINATORS.test(s)) throw new TypeError("a token after a `comment` must not contain line terminators");
99
101
  if (s === "") return "''";
100
102
  if (s && typeof s === "object") {
101
103
  if ("op" in s && s.op === "glob") {
102
104
  if (typeof s.pattern !== "string") throw new TypeError("glob token requires a string `pattern`");
103
105
  if (LINE_TERMINATORS.test(s.pattern)) throw new TypeError("glob `pattern` must not contain line terminators");
106
+ if (s.pattern === "") return "''";
104
107
  return s.pattern.replace(GLOB_SHELL_SPECIAL, "\\$&");
105
108
  }
106
109
  if ("op" in s && typeof s.op === "string") {
@@ -109,18 +112,20 @@ var require_quote = /* @__PURE__ */ __commonJSMin(((exports, module) => {
109
112
  }
110
113
  if ("comment" in s && typeof s.comment === "string") {
111
114
  if (LINE_TERMINATORS.test(s.comment)) throw new TypeError("`comment` must not contain line terminators");
115
+ sawComment = true;
112
116
  return "#" + s.comment;
113
117
  }
114
118
  throw new TypeError("unrecognized object token shape");
115
119
  }
116
- if (/["\s\\]/.test(s) && !/'/.test(s)) return "'" + s.replace(/(['])/g, "\\$1") + "'";
117
- if (/["'\s]/.test(s)) return "\"" + s.replace(/(["\\$`!])/g, "\\$1") + "\"";
120
+ if (/'/.test(s) && /!/.test(s)) return "'" + s.replace(/'/g, "'\"'\"'") + "'";
121
+ if (/["\s\\]/.test(s) && !/'/.test(s)) return "'" + s + "'";
122
+ if (/["'\s]/.test(s)) return "\"" + s.replace(/(["\\$`])/g, "\\$1") + "\"";
118
123
  return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g, "$1\\$2");
119
124
  }).join(" ");
120
125
  };
121
126
  }));
122
127
  //#endregion
123
- //#region ../../node_modules/.pnpm/shell-quote@1.10.0/node_modules/shell-quote/parse.js
128
+ //#region ../../node_modules/.pnpm/shell-quote@1.11.0/node_modules/shell-quote/parse.js
124
129
  var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
125
130
  /**
126
131
  * @import {
@@ -144,7 +149,11 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
144
149
  var controlRE = new RegExp("^" + CONTROL + "$");
145
150
  var META = "|&;()<> \\t";
146
151
  var SINGLE_QUOTE = "'([^']*?)'";
147
- var DOUBLE_QUOTE = "\"((\\\\\"|[^\"])*?)\"";
152
+ var ANSI_C_BODY = "(?:\\\\[\\s\\S]|[^\\\\'])*?";
153
+ var ANSI_C_QUOTE = "\\$'" + ANSI_C_BODY + "'";
154
+ var ansiCAt = new RegExp("\\$'" + ANSI_C_BODY + "(?:(')|\\\\?$)", "g");
155
+ var ANSI_C_LETTERS = "abeEfnrtv";
156
+ var ANSI_C_CHARS = "\x07\b\x1B\x1B\f\n\r \v";
148
157
  var hash = /^#$/;
149
158
  var SQ = "'";
150
159
  var DQ = "\"";
@@ -180,6 +189,38 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
180
189
  if (typeof r === "object") return pre + TOKEN + JSON.stringify(r) + TOKEN;
181
190
  return pre + r;
182
191
  }
192
+ var ansiCEscape = /\\([0-7]{1,3}|x[\dA-Fa-f]{1,2}|u[\dA-Fa-f]{1,4}|U[\dA-Fa-f]{1,8}|c(?:\\\\|[\s\S])|[abeEfnrtv\\'"?])/g;
193
+ /**
194
+ * @param {string} m
195
+ * @param {string} escape
196
+ */
197
+ function expandAnsiCEscape(m, escape) {
198
+ var kind = escape.charAt(0);
199
+ if (kind === "c") {
200
+ var ctrl = escape.charAt(1);
201
+ return ctrl === "?" ? "" : String.fromCharCode(ctrl.charCodeAt(0) & 31);
202
+ }
203
+ if (kind === "x" || kind === "u" || kind === "U") {
204
+ var cp = parseInt(escape.slice(1), 16);
205
+ if (cp > 1114111) return m;
206
+ return String.fromCharCode.apply(null, cp > 65535 ? [55232 + (cp >> 10), 56320 + (cp & 1023)] : [cp]);
207
+ }
208
+ if (kind >= "0" && kind <= "7") return String.fromCharCode(parseInt(escape, 8) & 255);
209
+ var letter = ANSI_C_LETTERS.indexOf(escape);
210
+ return letter < 0 ? escape : ANSI_C_CHARS.charAt(letter);
211
+ }
212
+ /** @param {string} body */
213
+ function expandAnsiC(body) {
214
+ return body.replace(ansiCEscape, expandAnsiCEscape).split("\0")[0];
215
+ }
216
+ /**
217
+ * @param {string} s
218
+ * @param {number} i
219
+ */
220
+ function closesAnsiC(s, i) {
221
+ ansiCAt.lastIndex = i;
222
+ return !!ansiCAt.exec(s)[1];
223
+ }
183
224
  /**
184
225
  * @param {string} string
185
226
  * @param {Env} [env]
@@ -190,8 +231,9 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
190
231
  if (!opts) opts = {};
191
232
  var BS = opts.escape || "\\";
192
233
  var ifs = opts.splitUnquoted === true ? " \n" : typeof opts.splitUnquoted === "string" ? opts.splitUnquoted : "";
193
- var BAREWORD = "(\\" + BS + "['\"" + META + "]|[^\\s'\"" + META + "])+";
194
- var matches = matchAll(string, new RegExp(["(" + CONTROL + ")", "(" + BAREWORD + "|" + DOUBLE_QUOTE + "|" + SINGLE_QUOTE + ")+"].join("|"), "g"));
234
+ var BAREWORD = "(\\" + BS + "['\"$\\" + BS + META + "]|\\$\\$|\\$(?!" + ANSI_C_QUOTE.slice(2) + ")|[^\\s'\"$" + META + "])+";
235
+ var DOUBLE_QUOTE = "\"(?:\\" + BS + "[\\s\\S]|[^\"\\" + BS + "])*\"";
236
+ var matches = matchAll(string, new RegExp(["(" + CONTROL + ")", "(" + ANSI_C_QUOTE + "|" + BAREWORD + "|" + DOUBLE_QUOTE + "|" + SINGLE_QUOTE + ")+"].join("|"), "g"));
195
237
  if (matches.length === 0) return [];
196
238
  if (!env) env = {};
197
239
  var commented = false;
@@ -232,10 +274,8 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
232
274
  varend -= 1;
233
275
  varname = s.slice(i, varend);
234
276
  i = varend;
235
- } else if (/[*@#?$!_-]/.test(char)) {
236
- varname = char;
237
- i += 1;
238
- } else {
277
+ } else if (/[*@#?$!-]/.test(char)) varname = char;
278
+ else {
239
279
  var slicedFromI = s.slice(i);
240
280
  varend = slicedFromI.match(/[^\w\d_]/);
241
281
  if (!varend) {
@@ -289,7 +329,12 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
289
329
  if (out.length) return [out, commentObj];
290
330
  return [commentObj];
291
331
  } else if (c === BS) esc = true;
292
- else if (c === DS) {
332
+ else if (c === DS && s.charAt(i + 1) === SQ && closesAnsiC(s, i)) {
333
+ flushRun();
334
+ sawQuote = true;
335
+ out += expandAnsiC(s.slice(i + 2, ansiCAt.lastIndex - 1));
336
+ i = ansiCAt.lastIndex - 1;
337
+ } else if (c === DS) {
293
338
  var value = parseEnvVar();
294
339
  if (!ifs) out += value;
295
340
  else for (var vi = 0; vi < value.length; vi += 1) {
@@ -346,7 +391,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346
391
  };
347
392
  }));
348
393
  //#endregion
349
- //#region ../../node_modules/.pnpm/shell-quote@1.10.0/node_modules/shell-quote/index.js
394
+ //#region ../../node_modules/.pnpm/shell-quote@1.11.0/node_modules/shell-quote/index.js
350
395
  var require_shell_quote = /* @__PURE__ */ __commonJSMin(((exports) => {
351
396
  exports.quote = require_quote();
352
397
  exports.parse = require_parse();
@@ -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--tVkJw3W.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-BvaYawdU.mjs";
2
2
  export { Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableSet, SharedState, SharedStateEvents, SharedStateOptions, SharedStatePatch, 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--tVkJw3W.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-BvaYawdU.mjs";
2
2
  export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };
@@ -62,7 +62,7 @@ var Queue = class {
62
62
  }
63
63
  };
64
64
  //#endregion
65
- //#region ../../node_modules/.pnpm/p-limit@7.3.2/node_modules/p-limit/index.js
65
+ //#region ../../node_modules/.pnpm/p-limit@7.3.3/node_modules/p-limit/index.js
66
66
  function pLimit(concurrency) {
67
67
  let rejectOnClear = false;
68
68
  if (typeof concurrency === "object") ({concurrency, rejectOnClear = false} = concurrency);
@@ -121,7 +121,17 @@ function pLimit(concurrency) {
121
121
  }
122
122
  },
123
123
  map: { async value(iterable, function_) {
124
- const promises = Array.from(iterable, (value, index) => generator(function_, value, index));
124
+ const promises = [];
125
+ try {
126
+ Array.from(iterable, (value, index) => {
127
+ const promise = generator(function_, value, index);
128
+ promises.push(promise);
129
+ return promise;
130
+ });
131
+ } catch (error) {
132
+ for (const promise of promises) promise.catch(() => {});
133
+ throw error;
134
+ }
125
135
  return Promise.all(promises);
126
136
  } }
127
137
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "devframe",
3
3
  "type": "module",
4
- "version": "1.0.0",
4
+ "version": "1.2.0",
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.0.0",
80
+ "@devframes/agentic": "1.2.0",
81
81
  "cac": "^7.0.0"
82
82
  },
83
83
  "peerDependenciesMeta": {
@@ -90,12 +90,12 @@
90
90
  },
91
91
  "dependencies": {
92
92
  "crossws": "^0.4.12",
93
- "h3": "^2.0.1-rc.31",
94
- "nostics": "^1.2.0",
93
+ "h3": "^2.0.1-rc.32",
94
+ "nostics": "^1.3.0",
95
95
  "pathe": "^2.0.3"
96
96
  },
97
97
  "devDependencies": {
98
- "@devframes/agentic": "1.0.0",
98
+ "@devframes/agentic": "1.2.0",
99
99
  "@standard-schema/spec": "^1.1.0",
100
100
  "birpc": "^4.2.0",
101
101
  "cac": "^7.0.0",
@@ -106,7 +106,7 @@
106
106
  "mrmime": "^2.0.1",
107
107
  "obug": "^3.0.0",
108
108
  "ohash": "^2.0.12",
109
- "p-limit": "^7.3.2",
109
+ "p-limit": "^7.3.3",
110
110
  "perfect-debounce": "^2.1.0",
111
111
  "structured-clone-es": "^2.0.1",
112
112
  "tinyglobby": "^0.2.17",
@@ -115,7 +115,7 @@
115
115
  "ua-parser-modern": "^0.1.1",
116
116
  "valibot": "^1.5.0",
117
117
  "whenexpr": "^0.1.2",
118
- "ws": "^8.21.3"
118
+ "ws": "^8.22.0"
119
119
  },
120
120
  "scripts": {
121
121
  "build": "tsdown",