devframe 0.9.4 → 0.9.6

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 (71) hide show
  1. package/README.md +1 -1
  2. package/dist/{_shared-BPovvJW8.d.mts → _shared-BJ6AmwTu.d.mts} +1 -1
  3. package/dist/adapters/build.d.mts +5 -4
  4. package/dist/adapters/build.mjs +4 -3
  5. package/dist/adapters/cac.d.mts +1 -1
  6. package/dist/adapters/cac.mjs +3 -2
  7. package/dist/adapters/dev.d.mts +12 -11
  8. package/dist/adapters/dev.mjs +1 -1
  9. package/dist/adapters/embedded.d.mts +1 -1
  10. package/dist/adapters/initiate.d.mts +9 -8
  11. package/dist/adapters/initiate.mjs +1 -1
  12. package/dist/adapters/mcp.d.mts +30 -26
  13. package/dist/adapters/mcp.mjs +559 -1
  14. package/dist/cli/main.mjs +1 -1
  15. package/dist/client/index.d.mts +5 -5
  16. package/dist/client/index.mjs +1 -64
  17. package/dist/constants.d.mts +13 -1
  18. package/dist/constants.mjs +1 -1
  19. package/dist/{context-_i51nYOs.d.mts → context-BhBzOXVa.d.mts} +23 -11
  20. package/dist/{context-CO7eZHJy.d.mts → context-HOnG-WvG.d.mts} +1 -1
  21. package/dist/{context-BUJGvlje.mjs → context-KUqAfawQ.mjs} +1 -1
  22. package/dist/{context-CQW0lSw8.mjs → context-omlma_1n.mjs} +3 -150
  23. package/dist/{dev-lpIvwagf.mjs → dev-Czit5IP4.mjs} +6 -5
  24. package/dist/{events-DKfSmoTj.mjs → events-4daw0uK9.mjs} +16 -2
  25. package/dist/in-page-channel/index.d.mts +306 -0
  26. package/dist/in-page-channel/index.mjs +816 -0
  27. package/dist/{index-DOg4S5wk.d.mts → index-BzyopqxV.d.mts} +1 -1
  28. package/dist/{index-CEvd-YXD.d.mts → index-DcKxIMoI.d.mts} +2 -2
  29. package/dist/index.d.mts +14 -6
  30. package/dist/index.mjs +11 -1
  31. package/dist/{instance-shell-BHvBIGP4.d.mts → instance-shell-Bh4l9Vz_.d.mts} +3 -3
  32. package/dist/{instance-shell-B-uevnK-.mjs → instance-shell-CpVW4zG0.mjs} +15 -2
  33. package/dist/internal/index.d.mts +17 -7
  34. package/dist/internal/index.mjs +3 -3
  35. package/dist/node/auth.d.mts +2 -2
  36. package/dist/node/auth.mjs +1 -1
  37. package/dist/node/hub-internals.d.mts +2 -2
  38. package/dist/node/hub-internals.mjs +1 -1
  39. package/dist/node/index.d.mts +3 -3
  40. package/dist/node/index.mjs +1 -1
  41. package/dist/recipes/common-rpc-functions.d.mts +3 -3
  42. package/dist/recipes/interactive-auth.d.mts +13 -2
  43. package/dist/recipes/interactive-auth.mjs +5 -1
  44. package/dist/{remote-assets-Bg4gCUZ_.d.mts → remote-assets-B13_vRkJ.d.mts} +1 -1
  45. package/dist/{revoke-3Q6aDKWk.mjs → revoke-COLW0cOi.mjs} +1 -1
  46. package/dist/rpc/dump.d.mts +1 -1
  47. package/dist/rpc/index.d.mts +2 -2
  48. package/dist/rpc/transports/sse-client.d.mts +1 -1
  49. package/dist/rpc/transports/sse-server.d.mts +2 -2
  50. package/dist/rpc/transports/ws-bun.d.mts +2 -2
  51. package/dist/rpc/transports/ws-client.d.mts +1 -1
  52. package/dist/rpc/transports/ws-deno.d.mts +2 -2
  53. package/dist/rpc/transports/ws-server.d.mts +1 -1
  54. package/dist/{rpc-core-CDZoGYiD.d.mts → rpc-core-BHUsDl7s.d.mts} +3 -3
  55. package/dist/{host-agent-B84av916.mjs → services-install-CqqQVls5.mjs} +150 -2
  56. package/dist/{sse-client-CdGD_B8_.d.mts → sse-client-DwX021ST.d.mts} +1 -1
  57. package/dist/types/index.d.mts +4 -4
  58. package/dist/{types-BBLeGfpt.d.mts → types-CMdPYhOx.d.mts} +1 -1
  59. package/dist/utils/events.d.mts +1 -1
  60. package/dist/utils/remote-assets.d.mts +1 -1
  61. package/dist/utils/serve-static.d.mts +1 -1
  62. package/dist/utils/serve-static.mjs +1 -1
  63. package/dist/utils/shared-state.d.mts +1 -1
  64. package/dist/utils/streaming-channel.d.mts +1 -1
  65. package/dist/{ws-client-Bo2t6hES.d.mts → ws-client-7_lZi-B9.d.mts} +1 -1
  66. package/dist/{ws-server-DLtEoLdR.d.mts → ws-server-Di2oqr4q.d.mts} +1 -1
  67. package/package.json +2 -1
  68. package/skills/devframe/SKILL.md +88 -84
  69. package/skills/devframe/templates/hub.ts +1 -1
  70. package/dist/http-BKiqHcXX.mjs +0 -569
  71. package/dist/transports-vhizgqXM.mjs +0 -15
@@ -1,4 +1,4 @@
1
- import { C as RpcFunctionType, S as RpcFunctionSetupResult, T as RpcReturnSchema, _ as RpcFunctionDefinition, i as RpcArgsSchema, v as RpcFunctionDefinitionAny, w as RpcFunctionsCollector } from "./types-BBLeGfpt.mjs";
1
+ import { C as RpcFunctionType, S as RpcFunctionSetupResult, T as RpcReturnSchema, _ as RpcFunctionDefinition, i as RpcArgsSchema, v as RpcFunctionDefinitionAny, w as RpcFunctionsCollector } from "./types-CMdPYhOx.mjs";
2
2
  //#region src/rpc/cache.d.ts
3
3
  interface RpcCacheOptions {
4
4
  functions: string[];
@@ -1,5 +1,5 @@
1
- import { k as SharedState, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "./context-_i51nYOs.mjs";
2
- import { n as InternalAnonymousAuthStorage } from "./context-CO7eZHJy.mjs";
1
+ import { k as SharedState, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "./context-BhBzOXVa.mjs";
2
+ import { n as InternalAnonymousAuthStorage } from "./context-HOnG-WvG.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,8 +1,8 @@
1
- import "./index-DOg4S5wk.mjs";
2
- import { C as RpcFunctionType, T as RpcReturnSchema, _ as RpcFunctionDefinition, g as RpcFunctionAgentOptions, i as RpcArgsSchema } from "./types-BBLeGfpt.mjs";
3
- import { d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, p as DevframeRpcTransportKind, u as DevframeNodeRpcSessionMeta } from "./ws-server-DLtEoLdR.mjs";
4
- import { $ as DevframeServicesHost, At as AgentResource, B as DevframeSetupInfo, Bt as EventUnsubscribe, F as DevframeDefinition, Ft as AgentToolProvider, G as McpRouteOptions, H as DevframeSnapshotRpcInputs, I as DevframeDeploymentKind, It as AgentToolProviderHandle, J as DevframeServiceId, K as DevframeServiceDefinition, L as DevframeDockDefaults, Lt as DevframeAgentHost, Mt as AgentResourceInput, Nt as AgentTool, Ot as AgentHandle, P as DevframeCliOptions, Pt as AgentToolInput, Q as DevframeServiceScopeOf, R as DevframeDuplicationStrategy, Rt as DevframeAgentHostEvents, St as DevframeDiagnosticsLogger, U as DevframeSseOptions, V as DevframeSnapshotRpcEntry, Vt as EventsMap, W as DevframeWsOptions, X as DevframeServiceMeta, Y as DevframeServiceInput, Z as DevframeServiceOf, _t as DevframeRpcServerFunctions, a as DevframeConnectionConfigsRegistry, at as DevframeScopedStreamingHost, bt as DevframeStorageScope, c as RpcBroadcastOptions, ct as DevframeSettingsStore, d as RpcSharedStateHost, dt as ScopedRpcFn, et as DevframeServicesRegistry, f as RpcStreamingChannel, ft as ScopedServerFunctions, gt as DevframeRpcClientFunctions, ht as DevframeViewHost, i as DevframeCapabilities, it as DevframeScopedNodeRpc, jt as AgentResourceContent, kt as AgentManifest, l as RpcFunctionsHost, lt as ScopedBroadcastOptions, m as RpcStreamingHost, mt as SettingsForNamespace, n as ConnectionMetaSse, nt as DevframeServicesState, o as DevframeNodeContext, ot as DevframeSettings, p as RpcStreamingChannelOptions, pt as ScopedSharedStates, q as DevframeServiceDescriptor, r as ConnectionMetaWebsocket, rt as DevframeScopedNodeContext, s as DevframeNodeRpcSession, st as DevframeSettingsRegistry, t as ConnectionMeta, tt as DevframeServicesScopeRegistry, u as RpcSharedStateGetOptions, ut as ScopedClientFunctions, vt as DevframeRpcSharedStates, xt as DevframeDiagnosticsHost, yt as DevframeHost, z as DevframeRpcOptions, zt as EventEmitter } from "./context-_i51nYOs.mjs";
5
- import { a as RemoteAssetsStore, i as RemoteAssetsProviderCustom, n as RemoteAssetsErrorMessage, o as StaticAssetsSource, r as RemoteAssetsProvider, t as RemoteAssets } from "./remote-assets-Bg4gCUZ_.mjs";
1
+ import "./index-BzyopqxV.mjs";
2
+ import { C as RpcFunctionType, T as RpcReturnSchema, _ as RpcFunctionDefinition, g as RpcFunctionAgentOptions, i as RpcArgsSchema } from "./types-CMdPYhOx.mjs";
3
+ import { d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, p as DevframeRpcTransportKind, u as DevframeNodeRpcSessionMeta } from "./ws-server-Di2oqr4q.mjs";
4
+ import { $ as DevframeServicesHost, At as AgentResource, B as DevframeSetupInfo, Bt as EventUnsubscribe, F as DevframeDefinition, Ft as AgentToolProvider, G as McpRouteOptions, H as DevframeSnapshotRpcInputs, I as DevframeDeploymentKind, It as AgentToolProviderHandle, J as DevframeServiceId, K as DevframeServiceDefinition, L as DevframeDockDefaults, Lt as DevframeAgentHost, Mt as AgentResourceInput, Nt as AgentTool, Ot as AgentHandle, P as DevframeCliOptions, Pt as AgentToolInput, Q as DevframeServiceScopeOf, R as DevframeDuplicationStrategy, Rt as DevframeAgentHostEvents, St as DevframeDiagnosticsLogger, U as DevframeSseOptions, V as DevframeSnapshotRpcEntry, Vt as EventsMap, W as DevframeWsOptions, X as DevframeServiceMeta, Y as DevframeServiceInput, Z as DevframeServiceOf, _t as DevframeRpcServerFunctions, a as DevframeConnectionConfigsRegistry, at as DevframeScopedStreamingHost, bt as DevframeStorageScope, c as RpcBroadcastOptions, ct as DevframeSettingsStore, d as RpcSharedStateHost, dt as ScopedRpcFn, et as DevframeServicesRegistry, f as RpcStreamingChannel, ft as ScopedServerFunctions, gt as DevframeRpcClientFunctions, ht as DevframeViewHost, i as DevframeCapabilities, it as DevframeScopedNodeRpc, jt as AgentResourceContent, kt as AgentManifest, l as RpcFunctionsHost, lt as ScopedBroadcastOptions, m as RpcStreamingHost, mt as SettingsForNamespace, n as ConnectionMetaSse, nt as DevframeServicesState, o as DevframeNodeContext, ot as DevframeSettings, p as RpcStreamingChannelOptions, pt as ScopedSharedStates, q as DevframeServiceDescriptor, r as ConnectionMetaWebsocket, rt as DevframeScopedNodeContext, s as DevframeNodeRpcSession, st as DevframeSettingsRegistry, t as ConnectionMeta, tt as DevframeServicesScopeRegistry, u as RpcSharedStateGetOptions, ut as ScopedClientFunctions, vt as DevframeRpcSharedStates, xt as DevframeDiagnosticsHost, yt as DevframeHost, z as DevframeRpcOptions, zt as EventEmitter } from "./context-BhBzOXVa.mjs";
5
+ import { a as RemoteAssetsStore, i as RemoteAssetsProviderCustom, n as RemoteAssetsErrorMessage, o as StaticAssetsSource, r as RemoteAssetsProvider, t as RemoteAssets } from "./remote-assets-B13_vRkJ.mjs";
6
6
  import { i as DevframeDefineDiagnosticsOptions } from "./nostics-SPGDgHEP.mjs";
7
7
  //#region src/define.d.ts
8
8
  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>;
@@ -11,5 +11,13 @@ declare const defineRpcFunction: <NAME extends string, TYPE extends RpcFunctionT
11
11
  * entry point. Import it from the package root: `import { defineDevframe } from 'devframe'`.
12
12
  */
13
13
  declare function defineDevframe(d: DevframeDefinition): DevframeDefinition;
14
+ /**
15
+ * Resolve a definition's client assets source — the built SPA served as its
16
+ * UI. Prefers the top-level {@link DevframeDefinition.clientAssets} and falls
17
+ * back to the deprecated {@link DevframeCliOptions.distDir}, so both the new
18
+ * and legacy shapes resolve. Returns `undefined` when neither is set (bridge
19
+ * mode — the SPA is hosted elsewhere).
20
+ */
21
+ declare function resolveClientAssets(d: DevframeDefinition): StaticAssetsSource | undefined;
14
22
  //#endregion
15
- export { type AgentHandle, type AgentManifest, type AgentResource, type AgentResourceContent, type AgentResourceInput, type AgentTool, type AgentToolInput, type AgentToolProvider, type AgentToolProviderHandle, type ConnectionMeta, type ConnectionMetaSse, type ConnectionMetaWebsocket, type DevframeAgentHost, type DevframeAgentHostEvents, type DevframeCapabilities, type DevframeCliOptions, type DevframeConnectionConfigsRegistry, type DevframeDefineDiagnosticsOptions, type DevframeDefinition, type DevframeDeploymentKind, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDockDefaults, type DevframeDuplicationStrategy, type DevframeHost, type DevframeNodeContext, type DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, type DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, type 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 EventEmitter, type EventUnsubscribe, type EventsMap, type McpRouteOptions, type RemoteAssets, type RemoteAssetsErrorMessage, type RemoteAssetsProvider, type RemoteAssetsProviderCustom, type RemoteAssetsStore, type RpcBroadcastOptions, type RpcFunctionAgentOptions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type ScopedBroadcastOptions, type ScopedClientFunctions, type ScopedRpcFn, type ScopedServerFunctions, type ScopedSharedStates, type SettingsForNamespace, type StaticAssetsSource, defineDevframe, defineRpcFunction };
23
+ export { type AgentHandle, type AgentManifest, type AgentResource, type AgentResourceContent, type AgentResourceInput, type AgentTool, type AgentToolInput, type AgentToolProvider, type AgentToolProviderHandle, type ConnectionMeta, type ConnectionMetaSse, type ConnectionMetaWebsocket, type DevframeAgentHost, type DevframeAgentHostEvents, type DevframeCapabilities, type DevframeCliOptions, type DevframeConnectionConfigsRegistry, type DevframeDefineDiagnosticsOptions, type DevframeDefinition, type DevframeDeploymentKind, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDockDefaults, type DevframeDuplicationStrategy, type DevframeHost, type DevframeNodeContext, type DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, type DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, type 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 EventEmitter, type EventUnsubscribe, type EventsMap, type McpRouteOptions, type RemoteAssets, type RemoteAssetsErrorMessage, type RemoteAssetsProvider, type RemoteAssetsProviderCustom, type RemoteAssetsStore, type RpcBroadcastOptions, type RpcFunctionAgentOptions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type ScopedBroadcastOptions, type ScopedClientFunctions, type ScopedRpcFn, type ScopedServerFunctions, type ScopedSharedStates, type SettingsForNamespace, type StaticAssetsSource, defineDevframe, defineRpcFunction, resolveClientAssets };
package/dist/index.mjs CHANGED
@@ -8,5 +8,15 @@ const defineRpcFunction = createDefineWrapperWithContext();
8
8
  function defineDevframe(d) {
9
9
  return d;
10
10
  }
11
+ /**
12
+ * Resolve a definition's client assets source — the built SPA served as its
13
+ * UI. Prefers the top-level {@link DevframeDefinition.clientAssets} and falls
14
+ * back to the deprecated {@link DevframeCliOptions.distDir}, so both the new
15
+ * and legacy shapes resolve. Returns `undefined` when neither is set (bridge
16
+ * mode — the SPA is hosted elsewhere).
17
+ */
18
+ function resolveClientAssets(d) {
19
+ return d.clientAssets ?? d.cli?.distDir;
20
+ }
11
21
  //#endregion
12
- export { defineDevframe, defineRpcFunction };
22
+ export { defineDevframe, defineRpcFunction, resolveClientAssets };
@@ -1,6 +1,6 @@
1
- import { d as DevframeRpcConnection, n as WsOriginRegistry, u as DevframeNodeRpcSessionMeta } from "./ws-server-DLtEoLdR.mjs";
2
- import { Ct as DevframeAuthHandler, U as DevframeSseOptions, W as DevframeWsOptions, _t as DevframeRpcServerFunctions, gt as DevframeRpcClientFunctions, o as DevframeNodeContext, s as DevframeNodeRpcSession, t as ConnectionMeta } from "./context-_i51nYOs.mjs";
3
- import "./index-CEvd-YXD.mjs";
1
+ import { d as DevframeRpcConnection, n as WsOriginRegistry, u as DevframeNodeRpcSessionMeta } from "./ws-server-Di2oqr4q.mjs";
2
+ import { Ct as DevframeAuthHandler, U as DevframeSseOptions, W as DevframeWsOptions, _t as DevframeRpcServerFunctions, gt as DevframeRpcClientFunctions, o as DevframeNodeContext, s as DevframeNodeRpcSession, t as ConnectionMeta } from "./context-BhBzOXVa.mjs";
3
+ import "./index-DcKxIMoI.mjs";
4
4
  import { BirpcGroup } from "birpc";
5
5
  import { NodeAdapter } from "crossws/adapters/node";
6
6
  import { Buffer } from "node:buffer";
@@ -1,12 +1,25 @@
1
1
  import "./constants.mjs";
2
2
  import { t as diagnostics } from "./diagnostics-BXWW3VK-.mjs";
3
- import { t as getInternalContext } from "./context-BUJGvlje.mjs";
3
+ import { r as importServicePackage } from "./services-install-CqqQVls5.mjs";
4
+ import { t as getInternalContext } from "./context-KUqAfawQ.mjs";
4
5
  import { createInteractiveAuth } from "./recipes/interactive-auth.mjs";
5
6
  import { createServer } from "node:http";
6
7
  import process from "node:process";
7
8
  import { isIP } from "node:net";
8
9
  import { joinURL, withLeadingSlash, withoutLeadingSlash, withoutTrailingSlash } from "ufo";
9
10
  import { H3, defineHandler, toNodeHandler } from "h3";
11
+ //#region src/node/import-runtime-module.ts
12
+ /**
13
+ * Resolve and import a package at runtime without adding it to a consumer's
14
+ * bundle graph. First-party adapters use this for optional peers whose code
15
+ * is needed only when the matching feature is enabled.
16
+ *
17
+ * @internal
18
+ */
19
+ async function importRuntimeModule(specifier) {
20
+ return await importServicePackage(specifier, [import.meta.url]);
21
+ }
22
+ //#endregion
10
23
  //#region src/node/utils.ts
11
24
  const NON_DIALABLE_HOSTS = /* @__PURE__ */ new Set([
12
25
  "0.0.0.0",
@@ -483,4 +496,4 @@ function createInstanceShell(options) {
483
496
  };
484
497
  }
485
498
  //#endregion
486
- export { normalizeHttpServerUrl as i, resolveInstanceRegister as n, samePath as r, createInstanceShell as t };
499
+ export { importRuntimeModule as a, normalizeHttpServerUrl as i, resolveInstanceRegister as n, samePath as r, createInstanceShell as t };
@@ -1,9 +1,9 @@
1
- import { v as RpcFunctionDefinitionAny } from "../types-BBLeGfpt.mjs";
2
- import { At as AgentResource, Ft as AgentToolProvider, It as AgentToolProviderHandle, Lt as DevframeAgentHost$1, Mt as AgentResourceInput, Nt as AgentTool, Ot as AgentHandle, Pt as AgentToolInput, Rt as DevframeAgentHostEvents, jt as AgentResourceContent, kt as AgentManifest, o as DevframeNodeContext, yt as DevframeHost, zt as EventEmitter } from "../context-_i51nYOs.mjs";
3
- import { a as RemoteAssetsStore } from "../remote-assets-Bg4gCUZ_.mjs";
4
- import { a as InstanceShellInit, c as StartedServer, d as samePath, f as DevframeInstanceRecord, h as registerDevframeInstance, i as InstanceShellApi, l as createInstanceShell, m as listLiveDevframeInstances, n as InstanceRegisterConfig, o as InstanceShellInternals, p as DevframeInstanceRegistration, r as InstanceShell, s as InstanceWsTier, t as CreateInstanceShellOptions, u as resolveInstanceRegister } from "../instance-shell-BHvBIGP4.mjs";
5
- import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-BPovvJW8.mjs";
6
- import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-CDZoGYiD.mjs";
1
+ import { v as RpcFunctionDefinitionAny } from "../types-CMdPYhOx.mjs";
2
+ import { At as AgentResource, Ft as AgentToolProvider, It as AgentToolProviderHandle, Lt as DevframeAgentHost$1, Mt as AgentResourceInput, Nt as AgentTool, Ot as AgentHandle, Pt as AgentToolInput, Rt as DevframeAgentHostEvents, jt as AgentResourceContent, kt as AgentManifest, o as DevframeNodeContext, yt as DevframeHost, zt as EventEmitter } from "../context-BhBzOXVa.mjs";
3
+ import { a as RemoteAssetsStore } from "../remote-assets-B13_vRkJ.mjs";
4
+ import { a as InstanceShellInit, c as StartedServer, d as samePath, f as DevframeInstanceRecord, h as registerDevframeInstance, i as InstanceShellApi, l as createInstanceShell, m as listLiveDevframeInstances, n as InstanceRegisterConfig, o as InstanceShellInternals, p as DevframeInstanceRegistration, r as InstanceShell, s as InstanceWsTier, t as CreateInstanceShellOptions, u as resolveInstanceRegister } from "../instance-shell-Bh4l9Vz_.mjs";
5
+ import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-BJ6AmwTu.mjs";
6
+ import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-BHUsDl7s.mjs";
7
7
  //#region src/node/agent-args.d.ts
8
8
  /**
9
9
  * How {@link coerceAgentPositionalArgs} treats an args object that carries
@@ -398,6 +398,16 @@ interface CreateH3DevframeHostOptions {
398
398
  */
399
399
  declare function createH3DevframeHost(options: CreateH3DevframeHostOptions): DevframeHost;
400
400
  //#endregion
401
+ //#region src/node/import-runtime-module.d.ts
402
+ /**
403
+ * Resolve and import a package at runtime without adding it to a consumer's
404
+ * bundle graph. First-party adapters use this for optional peers whose code
405
+ * is needed only when the matching feature is enabled.
406
+ *
407
+ * @internal
408
+ */
409
+ declare function importRuntimeModule<T = unknown>(specifier: string): Promise<T>;
410
+ //#endregion
401
411
  //#region src/node/utils.d.ts
402
412
  declare function normalizeHttpServerUrl(host: string, port: number | string): string;
403
413
  //#endregion
@@ -436,4 +446,4 @@ declare function peekRpcWireFrame(raw: string): {
436
446
  i?: string;
437
447
  };
438
448
  //#endregion
439
- export { type AgentArgsFallback, type ContextRpcServer, type CreateContextRpcServerOptions, CreateH3DevframeHostOptions, type CreateInstanceShellOptions, DevframeAgentHost, type DevframeInstanceRecord, type DevframeInstanceRegistration, type InstanceRegisterConfig, type InstanceShell, type InstanceShellApi, type InstanceShellInit, type InstanceShellInternals, type InstanceWsTier, type RpcWireCodec, type StartedServer, coerceAgentPositionalArgs, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, diagnostics, listLiveDevframeInstances, normalizeBasePath, normalizeHttpServerUrl, peekRpcWireFrame, registerDevframeInstance, resolveBasePath, resolveInstanceRegister, samePath };
449
+ export { type AgentArgsFallback, type ContextRpcServer, type CreateContextRpcServerOptions, CreateH3DevframeHostOptions, type CreateInstanceShellOptions, DevframeAgentHost, type DevframeInstanceRecord, type DevframeInstanceRegistration, type InstanceRegisterConfig, type InstanceShell, type InstanceShellApi, type InstanceShellInit, type InstanceShellInternals, type InstanceWsTier, type RpcWireCodec, type StartedServer, coerceAgentPositionalArgs, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, diagnostics, importRuntimeModule, listLiveDevframeInstances, normalizeBasePath, normalizeHttpServerUrl, peekRpcWireFrame, registerDevframeInstance, resolveBasePath, resolveInstanceRegister, samePath };
@@ -1,9 +1,9 @@
1
1
  import { n as peekRpcWireFrame, t as createRpcWireCodec } from "../wire-codec-0K-o5MYW.mjs";
2
2
  import { t as diagnostics } from "../diagnostics-BXWW3VK-.mjs";
3
- import { n as coerceAgentPositionalArgs, t as DevframeAgentHost } from "../host-agent-B84av916.mjs";
3
+ import { a as DevframeAgentHost, o as coerceAgentPositionalArgs } from "../services-install-CqqQVls5.mjs";
4
4
  import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-BM3PdYli.mjs";
5
5
  import { t as createH3DevframeHost } from "../host-h3-fRbF9yor.mjs";
6
+ import { a as importRuntimeModule, i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-CpVW4zG0.mjs";
6
7
  import { i as registerDevframeInstance, n as listLiveDevframeInstances } from "../instance-registry-BjlMQbFB.mjs";
7
- import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-B-uevnK-.mjs";
8
8
  import { t as createContextRpcServer } from "../rpc-core-DlHd276T.mjs";
9
- export { DevframeAgentHost, coerceAgentPositionalArgs, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, diagnostics, listLiveDevframeInstances, normalizeBasePath, normalizeHttpServerUrl, peekRpcWireFrame, registerDevframeInstance, resolveBasePath, resolveInstanceRegister, samePath };
9
+ export { DevframeAgentHost, coerceAgentPositionalArgs, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, diagnostics, importRuntimeModule, listLiveDevframeInstances, normalizeBasePath, normalizeHttpServerUrl, peekRpcWireFrame, registerDevframeInstance, resolveBasePath, resolveInstanceRegister, samePath };
@@ -1,3 +1,3 @@
1
- import { Ct as DevframeAuthHandler } from "../context-_i51nYOs.mjs";
2
- import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, o as revokeActiveConnectionsForToken, r as getTempAuthCode, s as revokeAuthToken, t as buildOtpAuthUrl } from "../index-CEvd-YXD.mjs";
1
+ import { Ct as DevframeAuthHandler } from "../context-BhBzOXVa.mjs";
2
+ import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, o as revokeActiveConnectionsForToken, r as getTempAuthCode, s as revokeAuthToken, t as buildOtpAuthUrl } from "../index-DcKxIMoI.mjs";
3
3
  export { DevframeAuthHandler, buildOtpAuthUrl, exchangeTempAuthCode, getTempAuthCode, refreshTempAuthCode, revokeActiveConnectionsForToken, revokeAuthToken, verifyAuthToken };
@@ -1,3 +1,3 @@
1
- import { n as revokeAuthToken, t as revokeActiveConnectionsForToken } from "../revoke-3Q6aDKWk.mjs";
1
+ import { n as revokeAuthToken, t as revokeActiveConnectionsForToken } from "../revoke-COLW0cOi.mjs";
2
2
  import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, r as getTempAuthCode, t as buildOtpAuthUrl } from "../state-CK9LjrnT.mjs";
3
3
  export { buildOtpAuthUrl, exchangeTempAuthCode, getTempAuthCode, refreshTempAuthCode, revokeActiveConnectionsForToken, revokeAuthToken, verifyAuthToken };
@@ -1,3 +1,3 @@
1
- import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-CO7eZHJy.mjs";
2
- import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-BPovvJW8.mjs";
1
+ import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-HOnG-WvG.mjs";
2
+ import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-BJ6AmwTu.mjs";
3
3
  export { type DevframeInternalContext, type InternalAnonymousAuthStorage, type RemoteTokenRecord, getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
@@ -1,3 +1,3 @@
1
1
  import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-BM3PdYli.mjs";
2
- import { n as internalContextMap, t as getInternalContext } from "../context-BUJGvlje.mjs";
2
+ import { n as internalContextMap, t as getInternalContext } from "../context-KUqAfawQ.mjs";
3
3
  export { getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
@@ -1,6 +1,6 @@
1
- import "../index-DOg4S5wk.mjs";
2
- import { v as RpcFunctionDefinitionAny } from "../types-BBLeGfpt.mjs";
3
- import { k as SharedState, l as RpcFunctionsHost, o as DevframeNodeContext, yt as DevframeHost } from "../context-_i51nYOs.mjs";
1
+ import "../index-BzyopqxV.mjs";
2
+ import { v as RpcFunctionDefinitionAny } from "../types-CMdPYhOx.mjs";
3
+ import { k as SharedState, l as RpcFunctionsHost, o as DevframeNodeContext, yt as DevframeHost } from "../context-BhBzOXVa.mjs";
4
4
  import { BirpcGroup } from "birpc";
5
5
  //#region src/node/context.d.ts
6
6
  interface CreateHostContextOptions {
@@ -1,3 +1,3 @@
1
- import { t as createHostContext } from "../context-CQW0lSw8.mjs";
1
+ import { t as createHostContext } from "../context-omlma_1n.mjs";
2
2
  import { t as createStorage } from "../storage-BXNVhKyR.mjs";
3
3
  export { createHostContext, createStorage };
@@ -1,6 +1,6 @@
1
- import "../index-DOg4S5wk.mjs";
2
- import { E as Thenable, S as RpcFunctionSetupResult, c as RpcDump, g as RpcFunctionAgentOptions } from "../types-BBLeGfpt.mjs";
3
- import "../context-_i51nYOs.mjs";
1
+ import "../index-BzyopqxV.mjs";
2
+ import { E as Thenable, S as RpcFunctionSetupResult, c as RpcDump, g as RpcFunctionAgentOptions } from "../types-CMdPYhOx.mjs";
3
+ import "../context-BhBzOXVa.mjs";
4
4
  import { SimpleSchema } from "../utils/simple-schema.mjs";
5
5
  //#region src/recipes/common-rpc-functions.d.ts
6
6
  /**
@@ -1,5 +1,5 @@
1
- import { Ct as DevframeAuthHandler, o as DevframeNodeContext } from "../context-_i51nYOs.mjs";
2
- import "../index-CEvd-YXD.mjs";
1
+ import { Ct as DevframeAuthHandler, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "../context-BhBzOXVa.mjs";
2
+ import "../index-DcKxIMoI.mjs";
3
3
  //#region src/recipes/interactive-auth.d.ts
4
4
  interface CreateInteractiveAuthOptions {
5
5
  /**
@@ -20,6 +20,17 @@ interface CreateInteractiveAuthOptions {
20
20
  code: string;
21
21
  url: string;
22
22
  }) => void;
23
+ /**
24
+ * Called once a code exchange succeeds, so a host rendering its own
25
+ * banner can retract it. Fires after the rotated code is printed, so
26
+ * such a host drops that follow-up too and calls `auth.printBanner()`
27
+ * when it next wants a code on screen. Connect-time trust from a static
28
+ * or remote-dock token doesn't call this.
29
+ */
30
+ onTrusted?: (info: {
31
+ session: DevframeNodeRpcSession;
32
+ authToken: string;
33
+ }) => void;
23
34
  /**
24
35
  * The base URL the magic link should point at. Defaults to
25
36
  * `context.host.resolveOrigin()`.
@@ -2,7 +2,7 @@ import { s as colors } from "../nostics-CzECRXpE.mjs";
2
2
  import { n as defineRpcFunction } from "../define-BLWPsH6y.mjs";
3
3
  import { isAnonymousRpcMethod } from "../constants.mjs";
4
4
  import { a as verifyAuthToken, n as exchangeTempAuthCode, r as getTempAuthCode, t as buildOtpAuthUrl } from "../state-CK9LjrnT.mjs";
5
- import { t as getInternalContext } from "../context-BUJGvlje.mjs";
5
+ import { t as getInternalContext } from "../context-KUqAfawQ.mjs";
6
6
  import { t as s } from "../simple-schema-DQPZrAaZ.mjs";
7
7
  //#region src/recipes/interactive-auth.ts
8
8
  function defaultBanner(info) {
@@ -87,6 +87,10 @@ function createInteractiveAuth(context, options = {}) {
87
87
  if (!session) return { authToken: null };
88
88
  const authToken = exchangeTempAuthCode(params.code, session, params, storage);
89
89
  printBanner();
90
+ if (authToken) options.onTrusted?.({
91
+ session,
92
+ authToken
93
+ });
90
94
  return { authToken };
91
95
  }
92
96
  });
@@ -14,7 +14,7 @@
14
14
  * 3. The CDN {@link provider} — each requested file streams through to
15
15
  * the browser while being written into the cache.
16
16
  *
17
- * Anywhere a static mount accepts a dist directory (`cli.distDir`,
17
+ * Anywhere a static mount accepts a dist directory (`clientAssets`,
18
18
  * `hostStatic`, `mountStatic`) it also accepts this object — see
19
19
  * {@link StaticAssetsSource}.
20
20
  */
@@ -1,4 +1,4 @@
1
- import { t as DEVFRAME_EVENTS } from "./events-DKfSmoTj.mjs";
1
+ import { t as DEVFRAME_EVENTS } from "./events-4daw0uK9.mjs";
2
2
  //#region src/node/auth/revoke.ts
3
3
  /**
4
4
  * Flip `isTrusted` to false on any live WS clients connected with `token`
@@ -1,4 +1,4 @@
1
- import { h as RpcDumpStore, l as RpcDumpClientOptions, m as RpcDumpRecordError, n as BirpcReturn, o as RpcDefinitionsToFunctions, u as RpcDumpCollectionOptions, v as RpcFunctionDefinitionAny } from "../types-BBLeGfpt.mjs";
1
+ import { h as RpcDumpStore, l as RpcDumpClientOptions, m as RpcDumpRecordError, n as BirpcReturn, o as RpcDefinitionsToFunctions, u as RpcDumpCollectionOptions, v as RpcFunctionDefinitionAny } from "../types-CMdPYhOx.mjs";
2
2
  //#region src/rpc/dump/collect.d.ts
3
3
  /**
4
4
  * Collects pre-computed dumps by executing functions with their defined input combinations.
@@ -1,3 +1,3 @@
1
- import { a as STRUCTURED_CLONE_PREFIX, c as getRpcResolvedSetupResult, d as RpcFunctionsCollectorBase, f as RpcCacheManager, i as validateRpcReturn, l as createDefineWrapperWithContext, n as validateDefinitions, o as strictJsonStringify, p as RpcCacheOptions, r as validateRpcArgs, s as getRpcHandler, t as validateDefinition, u as defineRpcFunction } from "../index-DOg4S5wk.mjs";
2
- import { C as RpcFunctionType, E as Thenable, S as RpcFunctionSetupResult, T as RpcReturnSchema, _ as RpcFunctionDefinition, a as RpcDefinitionsFilter, b as RpcFunctionDefinitionBase, c as RpcDump, d as RpcDumpDefinition, f as RpcDumpGetter, g as RpcFunctionAgentOptions, h as RpcDumpStore, i as RpcArgsSchema, l as RpcDumpClientOptions, m as RpcDumpRecordError, n as BirpcReturn, o as RpcDefinitionsToFunctions, p as RpcDumpRecord, r as EntriesToObject, s as RpcDefinitionsToFunctionsWithNamespace, t as BirpcFn, u as RpcDumpCollectionOptions, v as RpcFunctionDefinitionAny, w as RpcFunctionsCollector, x as RpcFunctionDefinitionToFunction, y as RpcFunctionDefinitionAnyWithContext } from "../types-BBLeGfpt.mjs";
1
+ import { a as STRUCTURED_CLONE_PREFIX, c as getRpcResolvedSetupResult, d as RpcFunctionsCollectorBase, f as RpcCacheManager, i as validateRpcReturn, l as createDefineWrapperWithContext, n as validateDefinitions, o as strictJsonStringify, p as RpcCacheOptions, r as validateRpcArgs, s as getRpcHandler, t as validateDefinition, u as defineRpcFunction } from "../index-BzyopqxV.mjs";
2
+ import { C as RpcFunctionType, E as Thenable, S as RpcFunctionSetupResult, T as RpcReturnSchema, _ as RpcFunctionDefinition, a as RpcDefinitionsFilter, b as RpcFunctionDefinitionBase, c as RpcDump, d as RpcDumpDefinition, f as RpcDumpGetter, g as RpcFunctionAgentOptions, h as RpcDumpStore, i as RpcArgsSchema, l as RpcDumpClientOptions, m as RpcDumpRecordError, n as BirpcReturn, o as RpcDefinitionsToFunctions, p as RpcDumpRecord, r as EntriesToObject, s as RpcDefinitionsToFunctionsWithNamespace, t as BirpcFn, u as RpcDumpCollectionOptions, v as RpcFunctionDefinitionAny, w as RpcFunctionsCollector, x as RpcFunctionDefinitionToFunction, y as RpcFunctionDefinitionAnyWithContext } from "../types-CMdPYhOx.mjs";
3
3
  export { type BirpcFn, type BirpcReturn, EntriesToObject, RpcArgsSchema, RpcCacheManager, RpcCacheOptions, RpcDefinitionsFilter, RpcDefinitionsToFunctions, RpcDefinitionsToFunctionsWithNamespace, RpcDump, RpcDumpClientOptions, RpcDumpCollectionOptions, RpcDumpDefinition, RpcDumpGetter, RpcDumpRecord, RpcDumpRecordError, RpcDumpStore, RpcFunctionAgentOptions, RpcFunctionDefinition, RpcFunctionDefinitionAny, RpcFunctionDefinitionAnyWithContext, RpcFunctionDefinitionBase, RpcFunctionDefinitionToFunction, RpcFunctionSetupResult, RpcFunctionType, RpcFunctionsCollector, RpcFunctionsCollectorBase, RpcReturnSchema, STRUCTURED_CLONE_PREFIX, Thenable, createDefineWrapperWithContext, defineRpcFunction, getRpcHandler, getRpcResolvedSetupResult, strictJsonStringify, validateDefinition, validateDefinitions, validateRpcArgs, validateRpcReturn };
@@ -1,2 +1,2 @@
1
- import { n as createSseRpcChannel, t as SseRpcChannelOptions } from "../../sse-client-CdGD_B8_.mjs";
1
+ import { n as createSseRpcChannel, t as SseRpcChannelOptions } from "../../sse-client-DwX021ST.mjs";
2
2
  export { SseRpcChannelOptions, createSseRpcChannel };
@@ -1,5 +1,5 @@
1
- import { v as RpcFunctionDefinitionAny } from "../../types-BBLeGfpt.mjs";
2
- import { d as DevframeRpcConnection, n as WsOriginRegistry, u as DevframeNodeRpcSessionMeta } from "../../ws-server-DLtEoLdR.mjs";
1
+ import { v as RpcFunctionDefinitionAny } from "../../types-CMdPYhOx.mjs";
2
+ import { d as DevframeRpcConnection, n as WsOriginRegistry, u as DevframeNodeRpcSessionMeta } from "../../ws-server-Di2oqr4q.mjs";
3
3
  import { BirpcGroup } from "birpc";
4
4
  //#region src/rpc/transports/sse-server.d.ts
5
5
  interface SseRpcTransportOptions {
@@ -1,5 +1,5 @@
1
- import { n as WsOriginRegistry } from "../../ws-server-DLtEoLdR.mjs";
2
- import { t as ContextRpcServer } from "../../rpc-core-CDZoGYiD.mjs";
1
+ import { n as WsOriginRegistry } from "../../ws-server-Di2oqr4q.mjs";
2
+ import { t as ContextRpcServer } from "../../rpc-core-BHUsDl7s.mjs";
3
3
  //#region src/rpc/transports/ws-bun.d.ts
4
4
  interface AttachBunWsTransportOptions {
5
5
  /** Same contract as `WsRpcTransportOptions.allowedOrigins`. */
@@ -1,2 +1,2 @@
1
- import { n as createWsRpcChannel, t as WsRpcChannelOptions } from "../../ws-client-Bo2t6hES.mjs";
1
+ import { n as createWsRpcChannel, t as WsRpcChannelOptions } from "../../ws-client-7_lZi-B9.mjs";
2
2
  export { WsRpcChannelOptions, createWsRpcChannel };
@@ -1,5 +1,5 @@
1
- import { n as WsOriginRegistry } from "../../ws-server-DLtEoLdR.mjs";
2
- import { t as ContextRpcServer } from "../../rpc-core-CDZoGYiD.mjs";
1
+ import { n as WsOriginRegistry } from "../../ws-server-Di2oqr4q.mjs";
2
+ import { t as ContextRpcServer } from "../../rpc-core-BHUsDl7s.mjs";
3
3
  //#region src/rpc/transports/ws-deno.d.ts
4
4
  interface AttachDenoWsTransportOptions {
5
5
  /** Same contract as `WsRpcTransportOptions.allowedOrigins`. */
@@ -1,2 +1,2 @@
1
- import { a as attachWsRpcTransport, c as isAllowedOrigin, d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, i as WsRpcTransportOptions, l as isLoopbackHostname, n as WsOriginRegistry, o as createWsOriginRegistry, p as DevframeRpcTransportKind, r as WsRpcTransport, s as createWsRpcPeerHooks, t as CreateWsOriginRegistryOptions, u as DevframeNodeRpcSessionMeta } from "../../ws-server-DLtEoLdR.mjs";
1
+ import { a as attachWsRpcTransport, c as isAllowedOrigin, d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, i as WsRpcTransportOptions, l as isLoopbackHostname, n as WsOriginRegistry, o as createWsOriginRegistry, p as DevframeRpcTransportKind, r as WsRpcTransport, s as createWsRpcPeerHooks, t as CreateWsOriginRegistryOptions, u as DevframeNodeRpcSessionMeta } from "../../ws-server-Di2oqr4q.mjs";
2
2
  export { CreateWsOriginRegistryOptions, type DevframeNodeRpcSessionMeta, type DevframeRpcConnection, type DevframeRpcConnectionRequest, type DevframeRpcTransportKind, WsOriginRegistry, WsRpcTransport, WsRpcTransportOptions, attachWsRpcTransport, createWsOriginRegistry, createWsRpcPeerHooks, isAllowedOrigin, isLoopbackHostname };
@@ -1,6 +1,6 @@
1
- import { d as DevframeRpcConnection, u as DevframeNodeRpcSessionMeta } from "./ws-server-DLtEoLdR.mjs";
2
- import { Ct as DevframeAuthHandler, _t as DevframeRpcServerFunctions, gt as DevframeRpcClientFunctions, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "./context-_i51nYOs.mjs";
3
- import "./index-CEvd-YXD.mjs";
1
+ import { d as DevframeRpcConnection, u as DevframeNodeRpcSessionMeta } from "./ws-server-Di2oqr4q.mjs";
2
+ import { Ct as DevframeAuthHandler, _t as DevframeRpcServerFunctions, gt as DevframeRpcClientFunctions, o as DevframeNodeContext, s as DevframeNodeRpcSession } from "./context-BhBzOXVa.mjs";
3
+ import "./index-DcKxIMoI.mjs";
4
4
  import { BirpcGroup, EventOptions } from "birpc";
5
5
  //#region src/node/rpc-core.d.ts
6
6
  interface CreateContextRpcServerOptions {
@@ -1,5 +1,8 @@
1
- import { t as DEVFRAME_EVENTS } from "./events-DKfSmoTj.mjs";
1
+ import { t as DEVFRAME_EVENTS } from "./events-4daw0uK9.mjs";
2
2
  import { t as diagnostics } from "./diagnostics-BXWW3VK-.mjs";
3
+ import { createRequire } from "node:module";
4
+ import { pathToFileURL } from "node:url";
5
+ import { isAbsolute, join } from "pathe";
3
6
  //#region src/utils/events.ts
4
7
  /**
5
8
  * Create event emitter.
@@ -262,4 +265,149 @@ function inferSafety(type) {
262
265
  return "action";
263
266
  }
264
267
  //#endregion
265
- export { coerceAgentPositionalArgs as n, createEventEmitter as r, DevframeAgentHost as t };
268
+ //#region src/node/services-install.ts
269
+ /**
270
+ * Turn a `resolveFrom` value (a file path, a file URL like `import.meta.url`,
271
+ * or a directory) into something `createRequire` accepts — a directory gets a
272
+ * synthetic filename appended so resolution starts inside it.
273
+ */
274
+ function toRequireBase(resolveFrom) {
275
+ if (resolveFrom.startsWith("file://")) return resolveFrom;
276
+ if ((resolveFrom.split(/[/\\]/).pop() ?? "").includes(".")) return resolveFrom;
277
+ return join(resolveFrom, "_devframe_resolve.js");
278
+ }
279
+ /**
280
+ * Normalize an `install()` `resolveFrom` into a resolution base. Paths and
281
+ * file URLs pass through (the common case: the declaring plugin's
282
+ * `importMetaUrl`, so a service it declares resolves against the plugin's own
283
+ * dependencies); a bare npm package name resolves to that package's location
284
+ * from `cwd`. An unresolvable package name reads as no base (the caller's
285
+ * workspace fallbacks apply).
286
+ */
287
+ function expandResolveFrom(resolveFrom, cwd) {
288
+ if (resolveFrom.startsWith("file://") || resolveFrom.startsWith(".") || isAbsolute(resolveFrom)) return resolveFrom;
289
+ const require = createRequire(join(cwd, "_devframe_resolve.js"));
290
+ try {
291
+ return require.resolve(`${resolveFrom}/package.json`);
292
+ } catch {}
293
+ try {
294
+ return require.resolve(resolveFrom);
295
+ } catch {}
296
+ }
297
+ /**
298
+ * Import a service package's module, trying each `resolveFrom` candidate in
299
+ * order (so a plugin-declared service resolves against the plugin's own
300
+ * dependency tree first, then the workspace fallback). Throws the last
301
+ * resolution error when no candidate succeeds.
302
+ */
303
+ async function importServicePackage(pkg, resolveFroms) {
304
+ const candidates = [...new Set(resolveFroms.filter((x) => typeof x === "string" && x.length > 0))];
305
+ let lastError = /* @__PURE__ */ new Error(`no resolution base available for "${pkg}"`);
306
+ for (const from of candidates) {
307
+ let resolved;
308
+ try {
309
+ resolved = createRequire(toRequireBase(from)).resolve(pkg);
310
+ } catch (error) {
311
+ lastError = error;
312
+ continue;
313
+ }
314
+ return await import(
315
+ /* webpackIgnore: true */
316
+ /* @vite-ignore */
317
+ /* turbopackIgnore: true */
318
+ pathToFileURL(resolved).href
319
+ );
320
+ }
321
+ throw lastError;
322
+ }
323
+ function parseVersion(input) {
324
+ const [core, ...prerelease] = input.trim().replace(/^v/, "").split("-");
325
+ if (!core) return void 0;
326
+ const parts = core.split(".").map((part) => Number.parseInt(part, 10));
327
+ if (parts.length === 0 || parts.some((part) => Number.isNaN(part) || part < 0)) return void 0;
328
+ while (parts.length < 3) parts.push(0);
329
+ return {
330
+ parts,
331
+ ...prerelease.length ? { prerelease: prerelease.join("-") } : {}
332
+ };
333
+ }
334
+ function compareVersions(a, b) {
335
+ for (let i = 0; i < 3; i++) {
336
+ const diff = (a.parts[i] ?? 0) - (b.parts[i] ?? 0);
337
+ if (diff !== 0) return diff;
338
+ }
339
+ if (a.prerelease && !b.prerelease) return -1;
340
+ if (!a.prerelease && b.prerelease) return 1;
341
+ if (a.prerelease && b.prerelease) return a.prerelease < b.prerelease ? -1 : a.prerelease > b.prerelease ? 1 : 0;
342
+ return 0;
343
+ }
344
+ function satisfiesComparator(version, comparator) {
345
+ const raw = comparator.trim();
346
+ if (!raw || raw === "*" || raw === "x") return true;
347
+ const operatorMatch = raw.match(/^([\^~]|>=|<=|[><=])?(.+)$/);
348
+ if (!operatorMatch) return false;
349
+ const operator = operatorMatch[1];
350
+ const rest = operatorMatch[2].trim();
351
+ const segments = rest.replace(/\.[x*]/gi, "").split(".").filter(Boolean);
352
+ const base = parseVersion(rest.replace(/[x*]/gi, "0"));
353
+ if (!base) return false;
354
+ switch (operator) {
355
+ case ">": return compareVersions(version, base) > 0;
356
+ case ">=": return compareVersions(version, base) >= 0;
357
+ case "<": return compareVersions(version, base) < 0;
358
+ case "<=": return compareVersions(version, base) <= 0;
359
+ case "^": {
360
+ if (compareVersions(version, base) < 0) return false;
361
+ const fixedIndex = base.parts.findIndex((part) => part !== 0);
362
+ const lockUpTo = fixedIndex === -1 ? base.parts.length - 1 : fixedIndex;
363
+ for (let i = 0; i <= lockUpTo; i++) if ((version.parts[i] ?? 0) !== (base.parts[i] ?? 0)) return false;
364
+ return true;
365
+ }
366
+ case "~": {
367
+ if (compareVersions(version, base) < 0) return false;
368
+ const lockUpTo = segments.length >= 2 ? 1 : 0;
369
+ for (let i = 0; i <= lockUpTo; i++) if ((version.parts[i] ?? 0) !== (base.parts[i] ?? 0)) return false;
370
+ return true;
371
+ }
372
+ default:
373
+ for (let i = 0; i < Math.max(segments.length, 3); i++) if (i < segments.length && (version.parts[i] ?? 0) !== (base.parts[i] ?? 0)) return false;
374
+ return segments.length >= 3 ? compareVersions(version, base) === 0 : true;
375
+ }
376
+ }
377
+ /**
378
+ * Pragmatic semver range check for service version declarations — supports
379
+ * the common forms (`1.2.3`, `^1.2.3`, `~1.2`, `>=1 <3`, `1.x`, `*`, and
380
+ * `||`-joined alternatives) without pulling in a semver dependency. An
381
+ * unparseable version or range reads as **not satisfied**.
382
+ */
383
+ function satisfiesVersionRange(version, range) {
384
+ const parsed = parseVersion(version);
385
+ if (!parsed) return false;
386
+ const alternatives = range.split("||").map((alt) => alt.trim()).filter(Boolean);
387
+ if (alternatives.length === 0) return true;
388
+ return alternatives.some((alternative) => alternative.split(/\s+/).every((comparator) => satisfiesComparator(parsed, comparator)));
389
+ }
390
+ function isPlainObject(value) {
391
+ return typeof value === "object" && value !== null && !Array.isArray(value);
392
+ }
393
+ /** Deep-merge two values with the service option-set rules (see below). */
394
+ function deepMergeTwo(a, b) {
395
+ if (Array.isArray(a) && Array.isArray(b)) return [.../* @__PURE__ */ new Set([...a, ...b])];
396
+ if (isPlainObject(a) && isPlainObject(b)) {
397
+ const out = { ...a };
398
+ for (const key of Object.keys(b)) out[key] = key in a ? deepMergeTwo(a[key], b[key]) : b[key];
399
+ return out;
400
+ }
401
+ return b;
402
+ }
403
+ /**
404
+ * Default option-set merge when a service declares no `mergeOptions`:
405
+ * deep-merge in declaration order — objects recurse, arrays union-dedupe,
406
+ * scalars take the later value. Covers the built-in services (`roots` /
407
+ * `langs` union, `themes` per-key last-wins) without a custom hook.
408
+ */
409
+ function deepMergeOptionSets(sets) {
410
+ return sets.reduce((merged, set) => deepMergeTwo(merged, set));
411
+ }
412
+ //#endregion
413
+ export { DevframeAgentHost as a, satisfiesVersionRange as i, expandResolveFrom as n, coerceAgentPositionalArgs as o, importServicePackage as r, createEventEmitter as s, deepMergeOptionSets as t };
@@ -1,4 +1,4 @@
1
- import { v as RpcFunctionDefinitionAny } from "./types-BBLeGfpt.mjs";
1
+ import { v as RpcFunctionDefinitionAny } from "./types-CMdPYhOx.mjs";
2
2
  import { ChannelOptions } from "birpc";
3
3
  //#region src/rpc/transports/sse-client.d.ts
4
4
  interface SseRpcChannelOptions {
@@ -1,6 +1,6 @@
1
- import { g as RpcFunctionAgentOptions } from "../types-BBLeGfpt.mjs";
2
- import { d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, p as DevframeRpcTransportKind, u as DevframeNodeRpcSessionMeta } from "../ws-server-DLtEoLdR.mjs";
3
- import { $ as DevframeServicesHost, At as AgentResource, B as DevframeSetupInfo, Bt as EventUnsubscribe, F as DevframeDefinition, Ft as AgentToolProvider, G as McpRouteOptions, H as DevframeSnapshotRpcInputs, I as DevframeDeploymentKind, It as AgentToolProviderHandle, J as DevframeServiceId, K as DevframeServiceDefinition, L as DevframeDockDefaults, Lt as DevframeAgentHost, Mt as AgentResourceInput, Nt as AgentTool, Ot as AgentHandle, P as DevframeCliOptions, Pt as AgentToolInput, Q as DevframeServiceScopeOf, R as DevframeDuplicationStrategy, Rt as DevframeAgentHostEvents, St as DevframeDiagnosticsLogger, U as DevframeSseOptions, V as DevframeSnapshotRpcEntry, Vt as EventsMap, W as DevframeWsOptions, X as DevframeServiceMeta, Y as DevframeServiceInput, Z as DevframeServiceOf, _t as DevframeRpcServerFunctions, a as DevframeConnectionConfigsRegistry, at as DevframeScopedStreamingHost, bt as DevframeStorageScope, c as RpcBroadcastOptions, ct as DevframeSettingsStore, d as RpcSharedStateHost, dt as ScopedRpcFn, et as DevframeServicesRegistry, f as RpcStreamingChannel, ft as ScopedServerFunctions, gt as DevframeRpcClientFunctions, ht as DevframeViewHost, i as DevframeCapabilities, it as DevframeScopedNodeRpc, jt as AgentResourceContent, kt as AgentManifest, l as RpcFunctionsHost, lt as ScopedBroadcastOptions, m as RpcStreamingHost, mt as SettingsForNamespace, n as ConnectionMetaSse, nt as DevframeServicesState, o as DevframeNodeContext, ot as DevframeSettings, p as RpcStreamingChannelOptions, pt as ScopedSharedStates, q as DevframeServiceDescriptor, r as ConnectionMetaWebsocket, rt as DevframeScopedNodeContext, s as DevframeNodeRpcSession, st as DevframeSettingsRegistry, t as ConnectionMeta, tt as DevframeServicesScopeRegistry, u as RpcSharedStateGetOptions, ut as ScopedClientFunctions, vt as DevframeRpcSharedStates, xt as DevframeDiagnosticsHost, yt as DevframeHost, z as DevframeRpcOptions, zt as EventEmitter } from "../context-_i51nYOs.mjs";
4
- import { a as RemoteAssetsStore, i as RemoteAssetsProviderCustom, n as RemoteAssetsErrorMessage, o as StaticAssetsSource, r as RemoteAssetsProvider, t as RemoteAssets } from "../remote-assets-Bg4gCUZ_.mjs";
1
+ import { g as RpcFunctionAgentOptions } from "../types-CMdPYhOx.mjs";
2
+ import { d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, p as DevframeRpcTransportKind, u as DevframeNodeRpcSessionMeta } from "../ws-server-Di2oqr4q.mjs";
3
+ import { $ as DevframeServicesHost, At as AgentResource, B as DevframeSetupInfo, Bt as EventUnsubscribe, F as DevframeDefinition, Ft as AgentToolProvider, G as McpRouteOptions, H as DevframeSnapshotRpcInputs, I as DevframeDeploymentKind, It as AgentToolProviderHandle, J as DevframeServiceId, K as DevframeServiceDefinition, L as DevframeDockDefaults, Lt as DevframeAgentHost, Mt as AgentResourceInput, Nt as AgentTool, Ot as AgentHandle, P as DevframeCliOptions, Pt as AgentToolInput, Q as DevframeServiceScopeOf, R as DevframeDuplicationStrategy, Rt as DevframeAgentHostEvents, St as DevframeDiagnosticsLogger, U as DevframeSseOptions, V as DevframeSnapshotRpcEntry, Vt as EventsMap, W as DevframeWsOptions, X as DevframeServiceMeta, Y as DevframeServiceInput, Z as DevframeServiceOf, _t as DevframeRpcServerFunctions, a as DevframeConnectionConfigsRegistry, at as DevframeScopedStreamingHost, bt as DevframeStorageScope, c as RpcBroadcastOptions, ct as DevframeSettingsStore, d as RpcSharedStateHost, dt as ScopedRpcFn, et as DevframeServicesRegistry, f as RpcStreamingChannel, ft as ScopedServerFunctions, gt as DevframeRpcClientFunctions, ht as DevframeViewHost, i as DevframeCapabilities, it as DevframeScopedNodeRpc, jt as AgentResourceContent, kt as AgentManifest, l as RpcFunctionsHost, lt as ScopedBroadcastOptions, m as RpcStreamingHost, mt as SettingsForNamespace, n as ConnectionMetaSse, nt as DevframeServicesState, o as DevframeNodeContext, ot as DevframeSettings, p as RpcStreamingChannelOptions, pt as ScopedSharedStates, q as DevframeServiceDescriptor, r as ConnectionMetaWebsocket, rt as DevframeScopedNodeContext, s as DevframeNodeRpcSession, st as DevframeSettingsRegistry, t as ConnectionMeta, tt as DevframeServicesScopeRegistry, u as RpcSharedStateGetOptions, ut as ScopedClientFunctions, vt as DevframeRpcSharedStates, xt as DevframeDiagnosticsHost, yt as DevframeHost, z as DevframeRpcOptions, zt as EventEmitter } from "../context-BhBzOXVa.mjs";
4
+ import { a as RemoteAssetsStore, i as RemoteAssetsProviderCustom, n as RemoteAssetsErrorMessage, o as StaticAssetsSource, r as RemoteAssetsProvider, t as RemoteAssets } from "../remote-assets-B13_vRkJ.mjs";
5
5
  import { i as DevframeDefineDiagnosticsOptions } from "../nostics-SPGDgHEP.mjs";
6
6
  export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, AgentToolProvider, AgentToolProviderHandle, ConnectionMeta, ConnectionMetaSse, ConnectionMetaWebsocket, DevframeAgentHost, DevframeAgentHostEvents, DevframeCapabilities, DevframeCliOptions, DevframeConnectionConfigsRegistry, type DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDockDefaults, DevframeDuplicationStrategy, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, DevframeRpcOptions, DevframeRpcServerFunctions, DevframeRpcSharedStates, type DevframeRpcTransportKind, DevframeScopedNodeContext, DevframeScopedNodeRpc, DevframeScopedStreamingHost, DevframeServiceDefinition, DevframeServiceDescriptor, DevframeServiceId, DevframeServiceInput, DevframeServiceMeta, DevframeServiceOf, DevframeServiceScopeOf, DevframeServicesHost, DevframeServicesRegistry, DevframeServicesScopeRegistry, DevframeServicesState, DevframeSettings, DevframeSettingsRegistry, DevframeSettingsStore, DevframeSetupInfo, DevframeSnapshotRpcEntry, DevframeSnapshotRpcInputs, DevframeSseOptions, DevframeStorageScope, DevframeViewHost, DevframeWsOptions, EventEmitter, EventUnsubscribe, EventsMap, McpRouteOptions, RemoteAssets, RemoteAssetsErrorMessage, RemoteAssetsProvider, RemoteAssetsProviderCustom, RemoteAssetsStore, RpcBroadcastOptions, type RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedRpcFn, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, StaticAssetsSource };
@@ -320,4 +320,4 @@ type RpcDefinitionsFilter<T extends readonly RpcFunctionDefinitionAny[], Type ex
320
320
  type: Type;
321
321
  } ? T[K] : never; };
322
322
  //#endregion
323
- export { RpcFunctionType as C, Thenable as E, RpcFunctionSetupResult as S, RpcReturnSchema as T, RpcFunctionDefinition as _, RpcDefinitionsFilter as a, RpcFunctionDefinitionBase as b, RpcDump as c, RpcDumpDefinition as d, RpcDumpGetter as f, RpcFunctionAgentOptions as g, RpcDumpStore as h, RpcArgsSchema as i, RpcDumpClientOptions as l, RpcDumpRecordError as m, BirpcReturn$1 as n, RpcDefinitionsToFunctions as o, RpcDumpRecord as p, EntriesToObject as r, RpcDefinitionsToFunctionsWithNamespace as s, BirpcFn as t, RpcDumpCollectionOptions as u, RpcFunctionDefinitionAny as v, RpcFunctionsCollector as w, RpcFunctionDefinitionToFunction as x, RpcFunctionDefinitionAnyWithContext as y };
323
+ export { RpcFunctionType as C, InferArgsType as D, Thenable as E, InferReturnType as O, RpcFunctionSetupResult as S, RpcReturnSchema as T, RpcFunctionDefinition as _, RpcDefinitionsFilter as a, RpcFunctionDefinitionBase as b, RpcDump as c, RpcDumpDefinition as d, RpcDumpGetter as f, RpcFunctionAgentOptions as g, RpcDumpStore as h, RpcArgsSchema as i, RpcDumpClientOptions as l, RpcDumpRecordError as m, BirpcReturn$1 as n, RpcDefinitionsToFunctions as o, RpcDumpRecord as p, EntriesToObject as r, RpcDefinitionsToFunctionsWithNamespace as s, BirpcFn as t, RpcDumpCollectionOptions as u, RpcFunctionDefinitionAny as v, RpcFunctionsCollector as w, RpcFunctionDefinitionToFunction as x, RpcFunctionDefinitionAnyWithContext as y };
@@ -1,4 +1,4 @@
1
- import { Vt as EventsMap, zt as EventEmitter } from "../context-_i51nYOs.mjs";
1
+ import { Vt as EventsMap, zt as EventEmitter } from "../context-BhBzOXVa.mjs";
2
2
  //#region src/utils/events.d.ts
3
3
  /**
4
4
  * Create event emitter.
@@ -1,4 +1,4 @@
1
- import { a as RemoteAssetsStore, o as StaticAssetsSource } from "../remote-assets-Bg4gCUZ_.mjs";
1
+ import { a as RemoteAssetsStore, o as StaticAssetsSource } from "../remote-assets-B13_vRkJ.mjs";
2
2
  //#region src/utils/remote-assets.d.ts
3
3
  /**
4
4
  * Normalize a {@link StaticAssetsSource} into something servable: a local
@@ -1,4 +1,4 @@
1
- import { a as RemoteAssetsStore } from "../remote-assets-Bg4gCUZ_.mjs";
1
+ import { a as RemoteAssetsStore } from "../remote-assets-B13_vRkJ.mjs";
2
2
  import { IncomingMessage, ServerResponse } from "node:http";
3
3
  import { EventHandler, H3 } from "h3";
4
4
  //#region src/utils/serve-static.d.ts