devframe 1.3.0 → 1.3.2

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 (153) hide show
  1. package/dist/{_shared-C06DH07o.mjs → _shared-BGb9aDxr.mjs} +7 -9
  2. package/dist/{_shared-DbO-OtUC.d.mts → _shared-CnKu5myY.d.mts} +4 -4
  3. package/dist/adapters/build.d.mts +3 -5
  4. package/dist/adapters/build.mjs +7 -8
  5. package/dist/adapters/cac.d.mts +1 -3
  6. package/dist/adapters/cac.mjs +5 -7
  7. package/dist/adapters/dev.d.mts +6 -8
  8. package/dist/adapters/dev.mjs +2 -2
  9. package/dist/adapters/embedded.d.mts +2 -4
  10. package/dist/adapters/embedded.mjs +1 -2
  11. package/dist/adapters/initiate.d.mts +9 -9
  12. package/dist/adapters/initiate.mjs +1 -2
  13. package/dist/adapters/mcp.d.mts +3 -3
  14. package/dist/adapters/mcp.mjs +1 -2
  15. package/dist/{agentic-D6HePbWg.d.mts → agentic-CCstJ5yv.d.mts} +1 -3
  16. package/dist/{browser-agent-Pu-FLk6I.mjs → browser-agent-DmAotroz.mjs} +1 -2
  17. package/dist/{browser-agent-rpc-KH4HHvHf.mjs → browser-agent-rpc-CS80Sphv.mjs} +3 -5
  18. package/dist/cli/main.d.mts +1 -3
  19. package/dist/cli/main.mjs +3 -4
  20. package/dist/client/index.d.mts +6 -30
  21. package/dist/client/index.mjs +47 -72
  22. package/dist/{client-agent-DuLhUF6d.mjs → client-agent-qNMgDUev.mjs} +7 -12
  23. package/dist/constants.d.mts +1 -5
  24. package/dist/constants.mjs +2 -3
  25. package/dist/{context-BY72d2gV.mjs → context-BTxC4QrJ.mjs} +4 -5
  26. package/dist/{context-CmSDJAEI.mjs → context-C5FcbWQi.mjs} +25 -41
  27. package/dist/{context-eIUOSrKu.d.mts → context-CsdPs3po.d.mts} +1 -3
  28. package/dist/{context-Dko5QFWF.d.mts → context-WxTq6kqb.d.mts} +54 -42
  29. package/dist/{crypto-token-TVbGGFuj.mjs → crypto-token-CUhPE_ei.mjs} +1 -2
  30. package/dist/{define-BLWPsH6y.mjs → define-C8h-fyD3.mjs} +1 -2
  31. package/dist/{dev-C-wQTIrV.mjs → dev-DaHYh5YK.mjs} +10 -11
  32. package/dist/{diagnostics-BJjvKfVK.mjs → diagnostics-DC1-WcvN.mjs} +6 -3
  33. package/dist/{dist-CO98PBnQ.mjs → dist-BWGpvt-z.mjs} +1 -2
  34. package/dist/{dist-CZXfGEkd.mjs → dist-DJydMELP.mjs} +3 -10
  35. package/dist/{events-0wDwalmL.mjs → events-qWCKwD8-.mjs} +1 -2
  36. package/dist/{handler-DmaAfpGq.mjs → handler-DkLlj3-B.mjs} +3 -5
  37. package/dist/{hash-DdPnc4k3.mjs → hash-DHqpWeMO.mjs} +4 -8
  38. package/dist/{host-h3-BROI6SQ4.mjs → host-h3-D1uj5EM8.mjs} +1 -2
  39. package/dist/{import-runtime-module-BzlEQ9PI.mjs → import-runtime-module-DsdqJ1gK.mjs} +2 -3
  40. package/dist/in-page-channel/index.d.mts +2 -12
  41. package/dist/in-page-channel/index.mjs +10 -16
  42. package/dist/{index-CeEtxDmK.d.mts → index-BIRF0E5l.d.mts} +0 -2
  43. package/dist/{index-Bia1vKjL.d.mts → index-BKu9BxcT.d.mts} +0 -2
  44. package/dist/{index-DuEm0sDH.d.mts → index-D0qrBkhO.d.mts} +1 -15
  45. package/dist/{index-BMj-o_sP.d.mts → index-HMJPlexc.d.mts} +2 -6
  46. package/dist/index.d.mts +7 -9
  47. package/dist/index.mjs +3 -4
  48. package/dist/{instance-registry-vlz81P9X.mjs → instance-registry-CmZfF5u3.mjs} +4 -10
  49. package/dist/{instance-shell-yfm1AYk8.d.mts → instance-shell-Bujp0BhE.d.mts} +5 -9
  50. package/dist/{instance-shell-CBgy8YzK.mjs → instance-shell-Dk2SejFT.mjs} +38 -17
  51. package/dist/{interactive-auth-BsqLFXw8.mjs → interactive-auth-BURwIAvE.mjs} +6 -8
  52. package/dist/internal/index.d.mts +15 -29
  53. package/dist/internal/index.mjs +13 -15
  54. package/dist/{mcp-content-wcQxvrrW.d.mts → mcp-content-CQQBt2An.d.mts} +1 -3
  55. package/dist/{mcp-content-DN3O212x.mjs → mcp-content-CqU8yaF7.mjs} +1 -2
  56. package/dist/{mrmime-40h5OOIp.mjs → mrmime-y_XyiVcd.mjs} +1 -2
  57. package/dist/node/auth.d.mts +2 -2
  58. package/dist/node/auth.mjs +2 -2
  59. package/dist/node/hub-internals.d.mts +2 -2
  60. package/dist/node/hub-internals.mjs +2 -2
  61. package/dist/node/index.d.mts +2 -6
  62. package/dist/node/index.mjs +2 -2
  63. package/dist/{nostics-DWvukRwa.d.mts → nostics-Dgwh7ytT.d.mts} +0 -2
  64. package/dist/{nostics-D0PvLZsn.mjs → nostics-InlX4tmd.mjs} +2 -4
  65. package/dist/{origin-DZit9g29.mjs → origin-Ck7mLbKU.mjs} +1 -2
  66. package/dist/{origin-CY6BBHOy.d.mts → origin-D5i7K_Zb.d.mts} +0 -2
  67. package/dist/recipes/interactive-auth.d.mts +3 -5
  68. package/dist/recipes/interactive-auth.mjs +1 -2
  69. package/dist/{remote-assets-eBvSKZMS.d.mts → remote-assets-5AQMHZnV.d.mts} +0 -2
  70. package/dist/{remote-assets-DOva7l3s.mjs → remote-assets-DhonNeo_.mjs} +5 -8
  71. package/dist/{revoke-CeQUo6KI.mjs → revoke-D6KA3vwr.mjs} +2 -3
  72. package/dist/{rolldown-runtime-B4iAMlE-.mjs → rolldown-runtime-DYf_mQCB.mjs} +2 -3
  73. package/dist/rpc/client.d.mts +2 -4
  74. package/dist/rpc/client.mjs +2 -3
  75. package/dist/rpc/dump.d.mts +3 -11
  76. package/dist/rpc/dump.mjs +1 -2
  77. package/dist/rpc/index.d.mts +3 -3
  78. package/dist/rpc/index.mjs +6 -8
  79. package/dist/rpc/server.d.mts +2 -4
  80. package/dist/rpc/server.mjs +2 -3
  81. package/dist/rpc/transports/sse-client.d.mts +1 -1
  82. package/dist/rpc/transports/sse-client.mjs +2 -3
  83. package/dist/rpc/transports/sse-server.d.mts +5 -7
  84. package/dist/rpc/transports/sse-server.mjs +4 -5
  85. package/dist/rpc/transports/ws-bun.d.mts +3 -5
  86. package/dist/rpc/transports/ws-bun.mjs +2 -3
  87. package/dist/rpc/transports/ws-client.d.mts +1 -1
  88. package/dist/rpc/transports/ws-client.mjs +2 -3
  89. package/dist/rpc/transports/ws-deno.d.mts +3 -5
  90. package/dist/rpc/transports/ws-deno.mjs +2 -3
  91. package/dist/rpc/transports/ws-server.d.mts +3 -3
  92. package/dist/rpc/transports/ws-server.mjs +5 -6
  93. package/dist/{rpc-core-oXIq2hjO.mjs → rpc-core-CDUizUQB.mjs} +4 -5
  94. package/dist/{rpc-core-BQ1mesqZ.d.mts → rpc-core-CFwyV10r.d.mts} +5 -7
  95. package/dist/{serialization-BhuOoL80.mjs → serialization-iiTQ7n21.mjs} +3 -5
  96. package/dist/{services-install-D5YUwFXW.mjs → services-install-DCuDzMJ-.mjs} +1 -2
  97. package/dist/{session-DPfj6zQG.mjs → session-BjvoLH3r.mjs} +1 -2
  98. package/dist/{session-r6PDixP6.d.mts → session-Y9R6tqg4.d.mts} +0 -2
  99. package/dist/{shared-state-Cc-Jrhma.mjs → shared-state-COV7NCbd.mjs} +4 -6
  100. package/dist/{sse-client-DNdscfu_.d.mts → sse-client-B2PrSz-H.d.mts} +2 -4
  101. package/dist/{state-W4wI6X5X.mjs → state-B_yjfeqo.mjs} +3 -5
  102. package/dist/{storage-BzAr-S6I.mjs → storage-DpJ52UB_.mjs} +3 -5
  103. package/dist/{structured-clone-CbAV5rFI.mjs → structured-clone-B1N_XQvA.mjs} +2 -4
  104. package/dist/{structured-clone-CgtQ61SA.mjs → structured-clone-D1dOCZvc.mjs} +2 -4
  105. package/dist/{tool-input-CES3Pc4y.mjs → tool-input-CcCgJ8jq.mjs} +6 -12
  106. package/dist/types/index.d.mts +6 -6
  107. package/dist/{types-BmDbfHCx.d.mts → types-844OBepb.d.mts} +1 -5
  108. package/dist/utils/agent-tool-name.d.mts +1 -3
  109. package/dist/utils/agent-tool-name.mjs +1 -2
  110. package/dist/utils/colors.d.mts +1 -3
  111. package/dist/utils/colors.mjs +1 -2
  112. package/dist/utils/crypto-token.d.mts +1 -3
  113. package/dist/utils/crypto-token.mjs +1 -2
  114. package/dist/utils/debounce.d.mts +0 -2
  115. package/dist/utils/debounce.mjs +1 -2
  116. package/dist/utils/events.d.mts +2 -4
  117. package/dist/utils/events.mjs +1 -2
  118. package/dist/utils/get-port.d.mts +0 -2
  119. package/dist/utils/get-port.mjs +1 -2
  120. package/dist/utils/hash.d.mts +1 -3
  121. package/dist/utils/hash.mjs +1 -2
  122. package/dist/utils/launch-editor.d.mts +1 -3
  123. package/dist/utils/launch-editor.mjs +25 -37
  124. package/dist/utils/nanoid.d.mts +1 -3
  125. package/dist/utils/nanoid.mjs +1 -2
  126. package/dist/utils/nostics.d.mts +1 -1
  127. package/dist/utils/nostics.mjs +1 -2
  128. package/dist/utils/open.d.mts +1 -3
  129. package/dist/utils/open.mjs +1 -2
  130. package/dist/utils/origin.d.mts +1 -1
  131. package/dist/utils/origin.mjs +1 -2
  132. package/dist/utils/remote-assets.d.mts +2 -4
  133. package/dist/utils/remote-assets.mjs +1 -2
  134. package/dist/utils/serve-static.d.mts +2 -4
  135. package/dist/utils/serve-static.mjs +3 -4
  136. package/dist/utils/shared-state.d.mts +1 -1
  137. package/dist/utils/shared-state.mjs +1 -2
  138. package/dist/utils/simple-schema.d.mts +1 -3
  139. package/dist/utils/simple-schema.mjs +1 -2
  140. package/dist/utils/streaming-channel.d.mts +1 -1
  141. package/dist/utils/streaming-channel.mjs +1 -2
  142. package/dist/utils/structured-clone.d.mts +1 -3
  143. package/dist/utils/structured-clone.mjs +1 -2
  144. package/dist/utils/url.d.mts +1 -3
  145. package/dist/utils/url.mjs +1 -2
  146. package/dist/utils/when.d.mts +1 -3
  147. package/dist/utils/when.mjs +2 -4
  148. package/dist/{validation-CMfDAti3.mjs → validation-Cjy1P58H.mjs} +7 -13
  149. package/dist/{wire-codec-B1W3zH3L.mjs → wire-codec-BdngvzfH.mjs} +3 -4
  150. package/dist/{write-DK7rBUN3.mjs → write-3miSvPaD.mjs} +10 -16
  151. package/dist/{ws-client-6Mrz6eC4.d.mts → ws-client-lqOeANcn.d.mts} +2 -4
  152. package/dist/{ws-server-y2R76aSW.d.mts → ws-server-CYHkeyA-.d.mts} +3 -5
  153. package/package.json +8 -8
@@ -1,5 +1,4 @@
1
- import { C as RpcFunctionType, S as RpcFunctionSetupResult, T as RpcReturnSchema, g as RpcFunctionDefinitionAny, h as RpcFunctionDefinition, n as RpcArgsSchema, w as RpcFunctionsCollector } from "./types-BmDbfHCx.mjs";
2
- //#region src/rpc/cache.d.ts
1
+ import { C as RpcFunctionType, S as RpcFunctionSetupResult, T as RpcReturnSchema, g as RpcFunctionDefinitionAny, h as RpcFunctionDefinition, n as RpcArgsSchema, w as RpcFunctionsCollector } from "./types-844OBepb.mjs";
3
2
  interface RpcCacheOptions {
4
3
  functions: string[];
5
4
  keySerializer?: (args: unknown[]) => string;
@@ -22,8 +21,6 @@ declare class RpcCacheManager {
22
21
  validate(m: string): boolean;
23
22
  clear(fn?: string): void;
24
23
  }
25
- //#endregion
26
- //#region src/rpc/collector.d.ts
27
24
  declare class RpcFunctionsCollectorBase<LocalFunctions extends Record<string, any>, SetupContext> implements RpcFunctionsCollector<LocalFunctions, SetupContext> {
28
25
  readonly context: SetupContext;
29
26
  readonly definitions: Map<string, RpcFunctionDefinition<string, any, any, any, any, any, SetupContext>>;
@@ -42,16 +39,10 @@ declare class RpcFunctionsCollectorBase<LocalFunctions extends Record<string, an
42
39
  get(name: string): RpcFunctionDefinition<string, any, any, any, any, any, SetupContext> | undefined;
43
40
  list(): string[];
44
41
  }
45
- //#endregion
46
- //#region src/rpc/define.d.ts
47
42
  declare function 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>): RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS>;
48
43
  declare function createDefineWrapperWithContext<CONTEXT>(): <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, CONTEXT>) => RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, CONTEXT>;
49
- //#endregion
50
- //#region src/rpc/handler.d.ts
51
44
  declare function getRpcResolvedSetupResult<NAME extends string, TYPE extends RpcFunctionType, ARGS extends any[], RETURN = void, CONTEXT = undefined>(definition: RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, any, any, CONTEXT>, context: CONTEXT): Promise<RpcFunctionSetupResult<ARGS, RETURN>>;
52
45
  declare function getRpcHandler<NAME extends string, TYPE extends RpcFunctionType, ARGS extends any[], RETURN = void, CONTEXT = undefined>(definition: RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, any, any, CONTEXT>, context: CONTEXT): Promise<(...args: ARGS) => RETURN>;
53
- //#endregion
54
- //#region src/rpc/serialization.d.ts
55
46
  /**
56
47
  * Wire format used by the live RPC transports (WebSocket and SSE).
57
48
  *
@@ -92,8 +83,6 @@ declare const STRUCTURED_CLONE_PREFIX = "s:";
92
83
  * the error points at the offending function.
93
84
  */
94
85
  declare function strictJsonStringify(value: unknown, fnName?: string): string;
95
- //#endregion
96
- //#region src/rpc/validate-io.d.ts
97
86
  /**
98
87
  * Validate positional arguments against their declared schemas. Only
99
88
  * indices with a schema are checked; extra arguments pass through
@@ -116,8 +105,6 @@ declare function validateRpcArgs(name: string, argsSchema: RpcArgsSchema | undef
116
105
  * @internal
117
106
  */
118
107
  declare function validateRpcReturn(name: string, returnSchema: RpcReturnSchema | undefined, value: unknown): Promise<unknown>;
119
- //#endregion
120
- //#region src/rpc/validation.d.ts
121
108
  /**
122
109
  * Validates RPC function definitions.
123
110
  * Action and event functions cannot have dumps (side effects should not be cached).
@@ -131,5 +118,4 @@ declare function validateDefinitions(definitions: readonly RpcFunctionDefinition
131
118
  * @throws {Error} If an action or event function has a dump configuration
132
119
  */
133
120
  declare function validateDefinition(definition: RpcFunctionDefinitionAny): void;
134
- //#endregion
135
121
  export { STRUCTURED_CLONE_PREFIX as a, getRpcResolvedSetupResult as c, RpcFunctionsCollectorBase as d, RpcCacheManager as f, validateRpcReturn as i, createDefineWrapperWithContext as l, validateDefinitions as n, strictJsonStringify as o, RpcCacheOptions as p, validateRpcArgs as r, getRpcHandler as s, validateDefinition as t, defineRpcFunction as u };
@@ -1,6 +1,5 @@
1
- import { k as SharedState, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "./context-Dko5QFWF.mjs";
2
- import { n as InternalAnonymousAuthStorage } from "./context-eIUOSrKu.mjs";
3
- //#region src/node/auth/revoke.d.ts
1
+ import { k as SharedState, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "./context-WxTq6kqb.mjs";
2
+ import { n as InternalAnonymousAuthStorage } from "./context-CsdPs3po.mjs";
4
3
  /**
5
4
  * Flip `isTrusted` to false on any live WS clients connected with `token`
6
5
  * and broadcast the `auth:revoked` event so they can react.
@@ -13,8 +12,6 @@ declare function revokeActiveConnectionsForToken(context: DevframeNodeContext, t
13
12
  * using this token that they are no longer trusted.
14
13
  */
15
14
  declare function revokeAuthToken(context: DevframeNodeContext, storage: SharedState<InternalAnonymousAuthStorage>, token: string): Promise<void>;
16
- //#endregion
17
- //#region src/node/auth/state.d.ts
18
15
  /**
19
16
  * Format a raw `navigator.userAgent` string into the short display label
20
17
  * shown for a trusted device (e.g. "Chrome 120 | macOS 14 desktop").
@@ -84,5 +81,4 @@ declare function exchangeTempAuthCode(code: string, session: DevframeNodeRpcSess
84
81
  ua: string;
85
82
  origin: string;
86
83
  }, storage: SharedState<InternalAnonymousAuthStorage>): string | null;
87
- //#endregion
88
84
  export { getTempAuthCodeInfo as a, revokeActiveConnectionsForToken as c, getTempAuthCode as i, revokeAuthToken as l, describeUA as n, refreshTempAuthCode as o, exchangeTempAuthCode as r, verifyAuthToken as s, buildOtpAuthUrl as t };
package/dist/index.d.mts CHANGED
@@ -1,15 +1,13 @@
1
- import { C as RpcFunctionType, T as RpcReturnSchema, h as RpcFunctionDefinition, m as RpcFunctionAgentOptions, n as RpcArgsSchema } from "./types-BmDbfHCx.mjs";
2
- import { $ as DevframeServiceOf, $t as EventUnsubscribe, At as McpFetchHandler, B as DevframeSetupInfo, Ct as DevframeStorageScope, Dt as CreateMcpServerOptions, Et as CreateMcpFetchHandlerOptions, F as DevframeDefinition, Ft as McpServerHandle, G as McpAuthorization, Gt as AgentResourceInput, H as DevframeSnapshotRpcInputs, Ht as AgentManifest, I as DevframeDeploymentKind, J as DevframeServiceDefinition, Jt as AgentToolProvider, K as McpRouteOptions, Kt as AgentTool, L as DevframeDockDefaults, Mt as McpResourceTemplateContent, Nt as McpResourceTemplateEntry, Ot as McpConnectionInfo, P as DevframeCliOptions, Pt as McpResourcesChangedHook, Q as DevframeServiceMeta, Qt as EventEmitter, R as DevframeDuplicationStrategy, St as DevframeHost, Tt as DevframeDiagnosticsLogger, U as DevframeSseOptions, Ut as AgentResource, V as DevframeSnapshotRpcEntry, Vt as AgentHandle, W as DevframeWsOptions, Wt as AgentResourceContent, X as DevframeServiceId, Xt as DevframeAgentHost, Y as DevframeServiceDescriptor, Yt as AgentToolProviderHandle, Z as DevframeServiceInput, Zt as DevframeAgentHostEvents, _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 EventsMap, et as DevframeServiceScopeOf, f as RpcStreamingChannel, ft as ScopedClientFunctions, gt as SettingsForNamespace, ht as ScopedSharedStates, i as DevframeCapabilities, it as DevframeServicesState, jt as McpResourceTemplate, kt as McpContentBlock, l as RpcFunctionsHost, lt as DevframeSettingsRegistry, m as RpcStreamingHost, mt as ScopedServerFunctions, n as ConnectionMetaSse, nt as DevframeServicesRegistry, o as DevframeNodeContext, ot as DevframeScopedNodeRpc, p as RpcStreamingChannelOptions, pt as ScopedRpcFn, q as McpSetting, qt as AgentToolInput, r as ConnectionMetaWebsocket, rt as DevframeServicesScopeRegistry, s as DevframeNodeRpcSession, st as DevframeScopedStreamingHost, t as ConnectionMeta, tt as DevframeServicesHost, u as RpcSharedStateGetOptions, ut as DevframeSettingsStore, vt as DevframeRpcClientFunctions, wt as DevframeDiagnosticsHost, yt as DevframeRpcServerFunctions, z as DevframeRpcOptions } from "./context-Dko5QFWF.mjs";
3
- import { a as DevframeWsPeer, i as DevframeRpcTransportKind, n as DevframeRpcConnection, r as DevframeRpcConnectionRequest, t as DevframeNodeRpcSessionMeta } from "./session-r6PDixP6.mjs";
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
- import { i as DevframeDefineDiagnosticsOptions } from "./nostics-DWvukRwa.mjs";
6
- import { n as withMcpContent } from "./mcp-content-wcQxvrrW.mjs";
7
- //#region src/define.d.ts
1
+ import { C as RpcFunctionType, T as RpcReturnSchema, h as RpcFunctionDefinition, m as RpcFunctionAgentOptions, n as RpcArgsSchema } from "./types-844OBepb.mjs";
2
+ import { n as withMcpContent } from "./mcp-content-CQQBt2An.mjs";
3
+ import { a as DevframeWsPeer, i as DevframeRpcTransportKind, n as DevframeRpcConnection, r as DevframeRpcConnectionRequest, t as DevframeNodeRpcSessionMeta } from "./session-Y9R6tqg4.mjs";
4
+ import { a as RemoteAssetsStore, i as RemoteAssetsProviderCustom, n as RemoteAssetsErrorMessage, o as StaticAssetsSource, r as RemoteAssetsProvider, t as RemoteAssets } from "./remote-assets-5AQMHZnV.mjs";
5
+ import { i as DevframeDefineDiagnosticsOptions } from "./nostics-Dgwh7ytT.mjs";
6
+ 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-WxTq6kqb.mjs";
8
7
  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
8
  /**
10
9
  * Identity helper that types a devframe definition, the primary authoring
11
10
  * entry point. Import it from the package root: `import { defineDevframe } from 'devframe'`.
12
11
  */
13
12
  export declare function defineDevframe(d: DevframeDefinition): DevframeDefinition;
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 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 };
13
+ 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 };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { n as withMcpContent } from "./mcp-content-DN3O212x.mjs";
2
- import { t as createDefineWrapperWithContext } from "./define-BLWPsH6y.mjs";
3
- //#region src/define.ts
1
+ import { n as withMcpContent } from "./mcp-content-CqU8yaF7.mjs";
2
+ import { t as createDefineWrapperWithContext } from "./define-C8h-fyD3.mjs";
3
+ // src/define.ts
4
4
  const defineRpcFunction = createDefineWrapperWithContext();
5
5
  /**
6
6
  * Identity helper that types a devframe definition, the primary authoring
@@ -9,5 +9,4 @@ const defineRpcFunction = createDefineWrapperWithContext();
9
9
  function defineDevframe(d) {
10
10
  return d;
11
11
  }
12
- //#endregion
13
12
  export { defineDevframe, defineRpcFunction, withMcpContent };
@@ -1,16 +1,11 @@
1
- import { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.mjs";
2
- import { t as diagnostics } from "./diagnostics-BJjvKfVK.mjs";
1
+ import { n as __exportAll } from "./rolldown-runtime-DYf_mQCB.mjs";
2
+ import { t as diagnostics } from "./diagnostics-DC1-WcvN.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";
6
6
  import { homedir } from "node:os";
7
- //#region src/node/instance-registry.ts
8
- var instance_registry_exports = /* @__PURE__ */ __exportAll({
9
- listLiveDevframeInstances: () => listLiveDevframeInstances,
10
- probeDevframeOrigin: () => probeDevframeOrigin,
11
- readDevframeInstances: () => readDevframeInstances,
12
- registerDevframeInstance: () => registerDevframeInstance
13
- });
7
+ // src/node/instance-registry.ts
8
+ var instance_registry_exports = /* @__PURE__ */ __exportAll({ registerDevframeInstance: () => registerDevframeInstance });
14
9
  /** Environment variable overriding the registry directory (tests, CI). */
15
10
  const DEVFRAME_INSTANCES_DIR_ENV = "DEVFRAME_INSTANCES_DIR";
16
11
  /** Environment variable disabling instance registration entirely. */
@@ -191,5 +186,4 @@ async function listLiveDevframeInstances(options = {}) {
191
186
  pruned
192
187
  };
193
188
  }
194
- //#endregion
195
189
  export { registerDevframeInstance as i, listLiveDevframeInstances as n, probeDevframeOrigin as r, instance_registry_exports as t };
@@ -1,14 +1,13 @@
1
- import { n as BirpcGroup } from "./index-Bia1vKjL.mjs";
2
- import { It 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-Dko5QFWF.mjs";
3
- import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "./session-r6PDixP6.mjs";
4
- import { n as WsOriginRegistry } from "./ws-server-y2R76aSW.mjs";
5
- import "./index-BMj-o_sP.mjs";
1
+ import { n as BirpcGroup } from "./index-BKu9BxcT.mjs";
2
+ import { n as WsOriginRegistry } from "./ws-server-CYHkeyA-.mjs";
3
+ import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "./session-Y9R6tqg4.mjs";
4
+ 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-WxTq6kqb.mjs";
5
+ import "./index-HMJPlexc.mjs";
6
6
  import { H3 } from "h3";
7
7
  import { NodeAdapter } from "crossws/adapters/node";
8
8
  import { Buffer } from "node:buffer";
9
9
  import { IncomingMessage, Server, ServerResponse } from "node:http";
10
10
  import { Duplex } from "node:stream";
11
- //#region src/node/instance-registry.d.ts
12
11
  /**
13
12
  * One running devframe instance, as recorded in the instance registry.
14
13
  * Records are self-describing JSON, so additive fields are safe.
@@ -111,8 +110,6 @@ declare function listLiveDevframeInstances(options?: {
111
110
  live: DevframeInstanceRecord[];
112
111
  pruned: DevframeInstanceRecord[];
113
112
  }>;
114
- //#endregion
115
- //#region src/node/instance-shell.d.ts
116
113
  /**
117
114
  * The live handle for a bound HTTP + WebSocket RPC server: what the
118
115
  * side-car / shared-server tiers produce and what {@link createDevServer}
@@ -287,5 +284,4 @@ declare function samePath(a: string, b: string): boolean;
287
284
  * @internal
288
285
  */
289
286
  declare function createInstanceShell<TContext extends DevframeNodeContext>(options: CreateInstanceShellOptions<TContext>): InstanceShell<TContext>;
290
- //#endregion
291
287
  export { InstanceShellInit as a, StartedServer as c, samePath as d, DevframeInstanceRecord as f, registerDevframeInstance as g, probeDevframeOrigin as h, InstanceShellApi as i, createInstanceShell as l, listLiveDevframeInstances as m, InstanceRegisterConfig as n, InstanceShellInternals as o, DevframeInstanceRegistration as p, InstanceShell as r, InstanceWsTier as s, CreateInstanceShellOptions as t, resolveInstanceRegister as u };
@@ -1,15 +1,15 @@
1
+ import { r as validateOriginCandidate } from "./origin-Ck7mLbKU.mjs";
2
+ import { c as joinURL, d as withoutLeadingSlash, f as withoutTrailingSlash, u as withLeadingSlash } from "./_shared-BGb9aDxr.mjs";
1
3
  import "./constants.mjs";
2
- import { r as validateOriginCandidate } from "./origin-DZit9g29.mjs";
3
- import { t as diagnostics } from "./diagnostics-BJjvKfVK.mjs";
4
- import { c as joinURL, d as withoutLeadingSlash, f as withoutTrailingSlash, u as withLeadingSlash } from "./_shared-C06DH07o.mjs";
5
- import { t as getInternalContext } from "./context-BY72d2gV.mjs";
6
- import { n as createInteractiveAuth } from "./interactive-auth-BsqLFXw8.mjs";
4
+ import { n as createInteractiveAuth } from "./interactive-auth-BURwIAvE.mjs";
5
+ import { t as diagnostics } from "./diagnostics-DC1-WcvN.mjs";
6
+ import { t as getInternalContext } from "./context-BTxC4QrJ.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
- import { H3, defineHandler, toNodeHandler } from "h3";
12
- //#region src/node/listen.ts
11
+ import { H3, defineHandler, fromNodeHandler, toNodeHandler } from "h3";
12
+ // src/node/listen.ts
13
13
  function listen(server, port, host) {
14
14
  return new Promise((resolve, reject) => {
15
15
  const onError = (error) => reject(error);
@@ -54,8 +54,7 @@ async function listenWithLoopbackTwin(server, port, host) {
54
54
  throw error;
55
55
  }
56
56
  }
57
- //#endregion
58
- //#region src/node/runtime.ts
57
+ // src/node/runtime.ts
59
58
  /**
60
59
  * Detect the current server runtime from its runtime-specific global. The
61
60
  * WebSocket binding branches on this: Bun and Deno expose their sockets as
@@ -69,8 +68,7 @@ function detectServerRuntime() {
69
68
  if (typeof g.Bun !== "undefined") return "bun";
70
69
  return "node";
71
70
  }
72
- //#endregion
73
- //#region src/node/utils.ts
71
+ // src/node/utils.ts
74
72
  const NON_DIALABLE_HOSTS = /* @__PURE__ */ new Set([
75
73
  "0.0.0.0",
76
74
  "127.0.0.1",
@@ -90,8 +88,7 @@ function formatHostForUrl(host) {
90
88
  function normalizeHttpServerUrl(host, port) {
91
89
  return `http://${formatHostForUrl(host)}:${port}`;
92
90
  }
93
- //#endregion
94
- //#region src/node/instance-shell.ts
91
+ // src/node/instance-shell.ts
95
92
  function websocketConnectionMeta(rpcHost, path) {
96
93
  const jsonSerializableMethods = [];
97
94
  for (const def of rpcHost.definitions.values()) if (def.jsonSerializable === true) jsonSerializableMethods.push(def.name);
@@ -362,7 +359,7 @@ function createInstanceShell(options) {
362
359
  const origin = currentOrigin();
363
360
  if (!cfg || registerPromise || !origin || !meta) return;
364
361
  const resolvedMeta = meta;
365
- registerPromise = import("./instance-registry-vlz81P9X.mjs").then((n) => n.t).then(({ registerDevframeInstance }) => {
362
+ registerPromise = import("./instance-registry-CmZfF5u3.mjs").then((n) => n.t).then(({ registerDevframeInstance }) => {
366
363
  let port = 0;
367
364
  try {
368
365
  const url = new URL(origin);
@@ -398,6 +395,29 @@ function createInstanceShell(options) {
398
395
  }
399
396
  maybeRegister();
400
397
  }
398
+ /**
399
+ * The host stack's `next` for each in-flight `nodeMiddleware` request at
400
+ * base `/`, read by the fall-through middleware mounted at the end of
401
+ * `init()`.
402
+ */
403
+ const hostFallthrough = /* @__PURE__ */ new WeakMap();
404
+ /**
405
+ * A devframe at `/` shares the origin root with its host, so it can't claim
406
+ * every path the way it owns a `/__<id>/` base. A `nodeMiddleware` request
407
+ * that no route answers goes to the host's `next` instead of h3's 404, so
408
+ * the host app (e.g. Vite with the bridge) keeps serving its own pages.
409
+ */
410
+ function mountHostFallthrough() {
411
+ if (base !== "/") return;
412
+ app.use((event, next) => {
413
+ if (event.context.matchedRoute) return next();
414
+ const nodeReq = event.runtime?.node?.req;
415
+ const hostNext = nodeReq && hostFallthrough.get(nodeReq);
416
+ if (!hostNext) return next();
417
+ hostFallthrough.delete(nodeReq);
418
+ return fromNodeHandler((_req, _res, _next) => hostNext())(event);
419
+ });
420
+ }
401
421
  let started;
402
422
  let transport;
403
423
  let dispose;
@@ -438,7 +458,7 @@ function createInstanceShell(options) {
438
458
  let resolvedAuth = false;
439
459
  let corePromise;
440
460
  function ensureCore() {
441
- corePromise ??= import("./rpc-core-oXIq2hjO.mjs").then((n) => n.n).then(({ createContextRpcServer }) => createContextRpcServer({
461
+ corePromise ??= import("./rpc-core-CDUizUQB.mjs").then((n) => n.n).then(({ createContextRpcServer }) => createContextRpcServer({
442
462
  context: ctx,
443
463
  auth: resolvedAuth,
444
464
  onPeerConnect: options.onPeerConnect,
@@ -482,7 +502,7 @@ function createInstanceShell(options) {
482
502
  return nativeRuntime ? bindNativeHttpAndWs(runtime, bindOptions) : bindHttpAndWs(bindOptions);
483
503
  };
484
504
  if (ws.port != null) return await start(ws.port);
485
- const { getPort } = await import("./dist-CZXfGEkd.mjs").then((n) => n.t);
505
+ const { getPort } = await import("./dist-DJydMELP.mjs").then((n) => n.t);
486
506
  let lastError;
487
507
  for (let attempt = 0; attempt < 3; attempt++) {
488
508
  const port = attempt === 0 && options.resolveSidecarPort ? await options.resolveSidecarPort(sidecarHost) : await getPort({
@@ -566,6 +586,7 @@ function createInstanceShell(options) {
566
586
  };
567
587
  if (Object.keys(ctx.staticConfig).length > 0) meta.configs = ctx.staticConfig;
568
588
  await options.mount?.(ctx, meta, api);
589
+ mountHostFallthrough();
569
590
  maybeRegister();
570
591
  }
571
592
  const initPromise = init();
@@ -625,6 +646,7 @@ function createInstanceShell(options) {
625
646
  const { toNodeHandler } = await import("h3/node");
626
647
  nodeHandler = toNodeHandler(app);
627
648
  }
649
+ if (next && base === "/") hostFallthrough.set(req, () => next());
628
650
  return nodeHandler(req, res);
629
651
  }).catch((err) => {
630
652
  if (next) {
@@ -699,5 +721,4 @@ function createInstanceShell(options) {
699
721
  }
700
722
  };
701
723
  }
702
- //#endregion
703
724
  export { isAddressInUse as a, normalizeHttpServerUrl as i, resolveInstanceRegister as n, listenWithLoopbackTwin as o, samePath as r, createInstanceShell as t };
@@ -1,9 +1,9 @@
1
- import { s as colors } from "./nostics-D0PvLZsn.mjs";
2
- import { n as defineRpcFunction } from "./define-BLWPsH6y.mjs";
1
+ import { s as colors } from "./nostics-InlX4tmd.mjs";
3
2
  import { isAnonymousRpcMethod } from "./constants.mjs";
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-BY72d2gV.mjs";
6
- //#region src/utils/simple-schema.ts
3
+ import { a as getTempAuthCodeInfo, n as describeUA, o as refreshTempAuthCode, r as exchangeTempAuthCode, s as verifyAuthToken, t as buildOtpAuthUrl } from "./state-B_yjfeqo.mjs";
4
+ import { t as getInternalContext } from "./context-BTxC4QrJ.mjs";
5
+ import { n as defineRpcFunction } from "./define-C8h-fyD3.mjs";
6
+ // src/utils/simple-schema.ts
7
7
  function ok(value) {
8
8
  return { value };
9
9
  }
@@ -155,8 +155,7 @@ const s = {
155
155
  nullable,
156
156
  describe
157
157
  };
158
- //#endregion
159
- //#region src/recipes/interactive-auth.ts
158
+ // src/recipes/interactive-auth.ts
160
159
  /**
161
160
  * Build a {@link AuthBannerFunction} that renders the auth code + magic-link
162
161
  * URL as a small bordered box, its two rows label-aligned. `createInteractiveAuth`
@@ -380,5 +379,4 @@ function createInteractiveAuth(context, options = {}) {
380
379
  buildOpenUrl
381
380
  };
382
381
  }
383
- //#endregion
384
382
  export { createInteractiveAuth as n, createAuthBanner as t };
@@ -1,13 +1,12 @@
1
- import { t as StandardSchemaV1 } from "../index-CeEtxDmK.mjs";
2
- import { g as RpcFunctionDefinitionAny } from "../types-BmDbfHCx.mjs";
3
- import { Gt as AgentResourceInput, Ht as AgentManifest, Jt as AgentToolProvider, Kt as AgentTool, Qt as EventEmitter, St as DevframeHost, Ut as AgentResource, Vt as AgentHandle, Wt as AgentResourceContent, Xt as DevframeAgentHost$1, Yt as AgentToolProviderHandle, Zt as DevframeAgentHostEvents, o as DevframeNodeContext, qt as AgentToolInput, xt as BrowserAgentClientInfo } from "../context-Dko5QFWF.mjs";
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-yfm1AYk8.mjs";
6
- import { i as importAgenticMcp, n as MountMcpHttpOptions, r as MountedMcpHttp, t as AgenticMcpModule } from "../agentic-D6HePbWg.mjs";
7
- import { a as resolveBasePath, i as normalizeBasePath, n as ResolvedMcpConfig, r as loadAutoMcpAdapter, s as resolveMcpConfig } from "../_shared-DbO-OtUC.mjs";
8
- import { t as getMcpContent } from "../mcp-content-wcQxvrrW.mjs";
9
- import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-BQ1mesqZ.mjs";
10
- //#region src/agent/stringify.d.ts
1
+ import { a as resolveBasePath, i as normalizeBasePath, n as ResolvedMcpConfig, r as loadAutoMcpAdapter, s as resolveMcpConfig } from "../_shared-CnKu5myY.mjs";
2
+ import { t as getMcpContent } from "../mcp-content-CQQBt2An.mjs";
3
+ import { t as StandardSchemaV1 } from "../index-BIRF0E5l.mjs";
4
+ import { i as importAgenticMcp, n as MountMcpHttpOptions, r as MountedMcpHttp, t as AgenticMcpModule } from "../agentic-CCstJ5yv.mjs";
5
+ 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-WxTq6kqb.mjs";
6
+ import { a as RemoteAssetsStore } from "../remote-assets-5AQMHZnV.mjs";
7
+ 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-Bujp0BhE.mjs";
8
+ import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-CFwyV10r.mjs";
9
+ import { g as RpcFunctionDefinitionAny } from "../types-844OBepb.mjs";
11
10
  /**
12
11
  * JSON-coercing serializer for MCP text payloads.
13
12
  *
@@ -38,8 +37,6 @@ export declare function stringifyForMcp(value: unknown): string;
38
37
  * level of `cause.message` so context isn't dropped silently.
39
38
  */
40
39
  export declare function formatMcpError(error: unknown): string;
41
- //#endregion
42
- //#region src/agent/to-json-schema.d.ts
43
40
  /**
44
41
  * JSON Schema for an RPC return value on the agent/MCP surface.
45
42
  *
@@ -63,8 +60,6 @@ export declare function returnToJsonSchema(schema: StandardSchemaV1 | undefined)
63
60
  * @internal
64
61
  */
65
62
  export declare function argsToJsonSchema(args: readonly StandardSchemaV1[] | undefined): unknown;
66
- //#endregion
67
- //#region src/node/client-agent.d.ts
68
63
  /** Id of the built-in tool listing connected browser tabs (wire name `devframe_agent_list-clients`). */
69
64
  export declare const LIST_CLIENTS_TOOL = "devframe:agent:list-clients";
70
65
  /** One connected browser tab as reported by {@link LIST_CLIENTS_TOOL}. */
@@ -73,8 +68,6 @@ interface ConnectedClient extends BrowserAgentClientInfo {
73
68
  connectedAt: number;
74
69
  tools: string[];
75
70
  }
76
- //#endregion
77
- //#region src/node/diagnostics.d.ts
78
71
  /**
79
72
  * DF00xx codes are allocated across packages (e.g. @devframes/json-render
80
73
  * owns DF0037–DF0041), so this file alone doesn't show the next free
@@ -414,11 +407,15 @@ export declare const diagnostics: import("nostics").Diagnostics<{
414
407
  }) => string;
415
408
  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
409
  };
410
+ readonly DF0085: {
411
+ readonly why: (p: {
412
+ name: string;
413
+ }) => string;
414
+ readonly fix: "Give each entry in `prompts` its own `name`. `prompts/get` finds a prompt by its name, so two prompts cannot share one.";
415
+ };
417
416
  }, readonly [(d: import("nostics").Diagnostic, { method }?: {
418
417
  method?: "log" | "warn" | "error";
419
418
  }) => void], never>;
420
- //#endregion
421
- //#region src/node/host-agent.d.ts
422
419
  /**
423
420
  * Framework-neutral host aggregating the agent-exposed surface of a
424
421
  * devframe. Auto-discovers RPC functions with an `agent` field from
@@ -453,8 +450,6 @@ export declare class DevframeAgentHost implements DevframeAgentHost$1 {
453
450
  private _collectRpcTools;
454
451
  private _findRpcDefinition;
455
452
  }
456
- //#endregion
457
- //#region src/node/host-h3.d.ts
458
453
  export interface CreateH3DevframeHostOptions {
459
454
  /**
460
455
  * Host the standalone server listens on, e.g. `http://localhost:9999`.
@@ -490,8 +485,6 @@ export interface CreateH3DevframeHostOptions {
490
485
  * h3-backed {@link DevframeHost}, used by the standalone CLI adapter.
491
486
  */
492
487
  export declare function createH3DevframeHost(options: CreateH3DevframeHostOptions): DevframeHost;
493
- //#endregion
494
- //#region src/node/import-runtime-module.d.ts
495
488
  /**
496
489
  * Resolve and import a package at runtime without adding it to a consumer's
497
490
  * bundle graph. First-party adapters use this for modules whose code is
@@ -501,11 +494,7 @@ export declare function createH3DevframeHost(options: CreateH3DevframeHostOption
501
494
  * @internal
502
495
  */
503
496
  export declare function importRuntimeModule<T = unknown>(specifier: string): Promise<T>;
504
- //#endregion
505
- //#region src/node/utils.d.ts
506
497
  export declare function normalizeHttpServerUrl(host: string, port: number | string): string;
507
- //#endregion
508
- //#region src/rpc/wire-codec.d.ts
509
498
  /**
510
499
  * The per-connection `serialize`/`deserialize` pair for a live RPC wire.
511
500
  *
@@ -539,9 +528,6 @@ export declare function peekRpcWireFrame(raw: string): {
539
528
  t?: string;
540
529
  i?: string;
541
530
  };
542
- //#endregion
543
- //#region src/tool-input.d.ts
544
531
  /** Convert tool input for a command, whose arguments must be declared. */
545
532
  export declare function toolInputToCommandArgs(input: unknown, argumentCount?: number): unknown[];
546
- //#endregion
547
533
  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,15 +1,15 @@
1
- import { t as getMcpContent } from "../mcp-content-DN3O212x.mjs";
2
- import { t as Diagnostic } from "../nostics-D0PvLZsn.mjs";
3
- import { n as peekRpcWireFrame, t as createRpcWireCodec } from "../wire-codec-B1W3zH3L.mjs";
4
- import { t as diagnostics } from "../diagnostics-BJjvKfVK.mjs";
5
- import { a as toolInputToCommandArgs, i as DevframeAgentHost, t as LIST_CLIENTS_TOOL } from "../client-agent-DuLhUF6d.mjs";
6
- import { a as resolveMcpConfig, n as normalizeBasePath, r as resolveBasePath, s as importAgenticMcp, t as loadAutoMcpAdapter } from "../_shared-C06DH07o.mjs";
7
- import { t as importRuntimeModule } from "../import-runtime-module-BzlEQ9PI.mjs";
8
- import { t as createH3DevframeHost } from "../host-h3-BROI6SQ4.mjs";
9
- import { i as registerDevframeInstance, n as listLiveDevframeInstances, r as probeDevframeOrigin } from "../instance-registry-vlz81P9X.mjs";
10
- import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-CBgy8YzK.mjs";
11
- import { t as createContextRpcServer } from "../rpc-core-oXIq2hjO.mjs";
12
- //#region src/agent/stringify.ts
1
+ import { a as resolveMcpConfig, n as normalizeBasePath, r as resolveBasePath, s as importAgenticMcp, t as loadAutoMcpAdapter } from "../_shared-BGb9aDxr.mjs";
2
+ import { t as getMcpContent } from "../mcp-content-CqU8yaF7.mjs";
3
+ import { t as Diagnostic } from "../nostics-InlX4tmd.mjs";
4
+ import { a as toolInputToCommandArgs, i as DevframeAgentHost, t as LIST_CLIENTS_TOOL } from "../client-agent-qNMgDUev.mjs";
5
+ import { t as diagnostics } from "../diagnostics-DC1-WcvN.mjs";
6
+ import { t as createH3DevframeHost } from "../host-h3-D1uj5EM8.mjs";
7
+ import { t as importRuntimeModule } from "../import-runtime-module-DsdqJ1gK.mjs";
8
+ import { i as registerDevframeInstance, n as listLiveDevframeInstances, r as probeDevframeOrigin } from "../instance-registry-CmZfF5u3.mjs";
9
+ import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-Dk2SejFT.mjs";
10
+ import { t as createContextRpcServer } from "../rpc-core-CDUizUQB.mjs";
11
+ import { n as peekRpcWireFrame, t as createRpcWireCodec } from "../wire-codec-BdngvzfH.mjs";
12
+ // src/agent/stringify.ts
13
13
  /**
14
14
  * JSON-coercing serializer for MCP text payloads.
15
15
  *
@@ -82,8 +82,7 @@ function formatMcpError(error) {
82
82
  const causeText = cause instanceof Error ? ` (cause: ${cause.message})` : cause !== void 0 ? ` (cause: ${String(cause)})` : "";
83
83
  return `${error.name}: ${error.message}${causeText}`;
84
84
  }
85
- //#endregion
86
- //#region src/agent/to-json-schema.ts
85
+ // src/agent/to-json-schema.ts
87
86
  const FALLBACK_OBJECT_SCHEMA = Object.freeze({
88
87
  type: "object",
89
88
  additionalProperties: true
@@ -156,5 +155,4 @@ function argsToJsonSchema(args) {
156
155
  additionalProperties: false
157
156
  };
158
157
  }
159
- //#endregion
160
158
  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,5 +1,4 @@
1
- import { kt as McpContentBlock } from "./context-Dko5QFWF.mjs";
2
- //#region src/agent/mcp-content.d.ts
1
+ import { kt as McpContentBlock } from "./context-WxTq6kqb.mjs";
3
2
  /**
4
3
  * Attach MCP content blocks to a tool result, for example an image next to
5
4
  * its text. The MCP adapter sends these blocks as the `content` of the
@@ -21,5 +20,4 @@ declare function withMcpContent<T extends object>(value: T, content: readonly Mc
21
20
  * @internal
22
21
  */
23
22
  declare function getMcpContent(value: unknown): unknown;
24
- //#endregion
25
23
  export { withMcpContent as n, getMcpContent as t };
@@ -1,4 +1,4 @@
1
- //#region src/agent/mcp-content.ts
1
+ // src/agent/mcp-content.ts
2
2
  /**
3
3
  * Registry symbol for the content blocks attached by {@link withMcpContent}.
4
4
  * `Symbol.for` keeps the key the same across duplicate copies of devframe.
@@ -36,5 +36,4 @@ function getMcpContent(value) {
36
36
  if (value === null || typeof value !== "object") return void 0;
37
37
  return value[MCP_CONTENT];
38
38
  }
39
- //#endregion
40
39
  export { withMcpContent as n, getMcpContent as t };
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/mrmime@2.0.1/node_modules/mrmime/index.mjs
1
+ // ../../node_modules/.pnpm/mrmime@2.0.1/node_modules/mrmime/index.mjs
2
2
  const mimes = {
3
3
  "3g2": "video/3gpp2",
4
4
  "3gp": "video/3gpp",
@@ -444,5 +444,4 @@ function lookup(extn) {
444
444
  let idx = tmp.lastIndexOf(".");
445
445
  return mimes[!~idx ? tmp : tmp.substring(++idx)];
446
446
  }
447
- //#endregion
448
447
  export { lookup as t };
@@ -1,3 +1,3 @@
1
- import { It as DevframeAuthHandler } from "../context-Dko5QFWF.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-BMj-o_sP.mjs";
1
+ import { Bt as DevframeAuthHandler } from "../context-WxTq6kqb.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-HMJPlexc.mjs";
3
3
  export { DevframeAuthHandler, buildOtpAuthUrl, describeUA, exchangeTempAuthCode, getTempAuthCode, getTempAuthCodeInfo, refreshTempAuthCode, revokeActiveConnectionsForToken, revokeAuthToken, verifyAuthToken };
@@ -1,3 +1,3 @@
1
- import { n as revokeAuthToken, t as revokeActiveConnectionsForToken } from "../revoke-CeQUo6KI.mjs";
2
- import { a as getTempAuthCodeInfo, i as getTempAuthCode, n as describeUA, o as refreshTempAuthCode, r as exchangeTempAuthCode, s as verifyAuthToken, t as buildOtpAuthUrl } from "../state-W4wI6X5X.mjs";
1
+ import { n as revokeAuthToken, t as revokeActiveConnectionsForToken } from "../revoke-D6KA3vwr.mjs";
2
+ import { a as getTempAuthCodeInfo, i as getTempAuthCode, n as describeUA, o as refreshTempAuthCode, r as exchangeTempAuthCode, s as verifyAuthToken, t as buildOtpAuthUrl } from "../state-B_yjfeqo.mjs";
3
3
  export { 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-eIUOSrKu.mjs";
2
- import { a as resolveBasePath, i as normalizeBasePath } from "../_shared-DbO-OtUC.mjs";
1
+ import { a as resolveBasePath, i as normalizeBasePath } from "../_shared-CnKu5myY.mjs";
2
+ import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-CsdPs3po.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-C06DH07o.mjs";
2
- import { n as internalContextMap, t as getInternalContext } from "../context-BY72d2gV.mjs";
1
+ import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-BGb9aDxr.mjs";
2
+ import { n as internalContextMap, t as getInternalContext } from "../context-BTxC4QrJ.mjs";
3
3
  export { getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
@@ -1,6 +1,5 @@
1
- import { g as RpcFunctionDefinitionAny } from "../types-BmDbfHCx.mjs";
2
- import { St as DevframeHost, k as SharedState, l as RpcFunctionsHost, o as DevframeNodeContext } from "../context-Dko5QFWF.mjs";
3
- //#region src/node/context.d.ts
1
+ import { g as RpcFunctionDefinitionAny } from "../types-844OBepb.mjs";
2
+ import { St as DevframeHost, k as SharedState, l as RpcFunctionsHost, o as DevframeNodeContext } from "../context-WxTq6kqb.mjs";
4
3
  export interface CreateHostContextOptions {
5
4
  cwd: string;
6
5
  workspaceRoot?: string;
@@ -31,8 +30,6 @@ export interface CreateHostContextOptions {
31
30
  * `commands` when mounted into Vite DevTools.
32
31
  */
33
32
  export declare function createHostContext(options: CreateHostContextOptions): Promise<DevframeNodeContext>;
34
- //#endregion
35
- //#region src/node/storage.d.ts
36
33
  export interface CreateStorageOptions<T extends object> {
37
34
  filepath: string;
38
35
  initialValue: T;
@@ -40,5 +37,4 @@ export interface CreateStorageOptions<T extends object> {
40
37
  debounce?: number;
41
38
  }
42
39
  export declare function createStorage<T extends object>(options: CreateStorageOptions<T>): SharedState<T>;
43
- //#endregion
44
40
  export type { RpcFunctionsHost };
@@ -1,3 +1,3 @@
1
- import { t as createHostContext } from "../context-CmSDJAEI.mjs";
2
- import { t as createStorage } from "../storage-BzAr-S6I.mjs";
1
+ import { t as createHostContext } from "../context-C5FcbWQi.mjs";
2
+ import { t as createStorage } from "../storage-DpJ52UB_.mjs";
3
3
  export { createHostContext, createStorage };