devframe 0.9.5 → 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 (66) hide show
  1. package/README.md +1 -1
  2. package/dist/{_shared-CsBsnhuO.d.mts → _shared-BJ6AmwTu.d.mts} +1 -1
  3. package/dist/adapters/build.d.mts +1 -1
  4. package/dist/adapters/build.mjs +1 -1
  5. package/dist/adapters/cac.d.mts +1 -1
  6. package/dist/adapters/cac.mjs +3 -2
  7. package/dist/adapters/dev.d.mts +4 -4
  8. package/dist/adapters/dev.mjs +1 -1
  9. package/dist/adapters/embedded.d.mts +1 -1
  10. package/dist/adapters/initiate.d.mts +3 -3
  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-c0OlSc12.d.mts → context-BhBzOXVa.d.mts} +3 -3
  20. package/dist/{context-DO0Qu1O8.d.mts → context-HOnG-WvG.d.mts} +1 -1
  21. package/dist/{context-Cx9V9Grq.mjs → context-KUqAfawQ.mjs} +1 -1
  22. package/dist/{context-Bc5S40Qt.mjs → context-omlma_1n.mjs} +3 -150
  23. package/dist/{dev-BRQA42Lh.mjs → dev-Czit5IP4.mjs} +3 -3
  24. package/dist/{events-DzolaBEs.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-B_DPNIT4.d.mts → index-DcKxIMoI.d.mts} +2 -2
  29. package/dist/index.d.mts +4 -4
  30. package/dist/{instance-shell-CPuYY8pw.d.mts → instance-shell-Bh4l9Vz_.d.mts} +3 -3
  31. package/dist/{instance-shell-fB5PyVtR.mjs → instance-shell-CpVW4zG0.mjs} +15 -2
  32. package/dist/internal/index.d.mts +16 -6
  33. package/dist/internal/index.mjs +3 -3
  34. package/dist/node/auth.d.mts +2 -2
  35. package/dist/node/auth.mjs +1 -1
  36. package/dist/node/hub-internals.d.mts +2 -2
  37. package/dist/node/hub-internals.mjs +1 -1
  38. package/dist/node/index.d.mts +3 -3
  39. package/dist/node/index.mjs +1 -1
  40. package/dist/recipes/common-rpc-functions.d.mts +3 -3
  41. package/dist/recipes/interactive-auth.d.mts +13 -2
  42. package/dist/recipes/interactive-auth.mjs +5 -1
  43. package/dist/{revoke-PihtvVil.mjs → revoke-COLW0cOi.mjs} +1 -1
  44. package/dist/rpc/dump.d.mts +1 -1
  45. package/dist/rpc/index.d.mts +2 -2
  46. package/dist/rpc/transports/sse-client.d.mts +1 -1
  47. package/dist/rpc/transports/sse-server.d.mts +2 -2
  48. package/dist/rpc/transports/ws-bun.d.mts +2 -2
  49. package/dist/rpc/transports/ws-client.d.mts +1 -1
  50. package/dist/rpc/transports/ws-deno.d.mts +2 -2
  51. package/dist/rpc/transports/ws-server.d.mts +1 -1
  52. package/dist/{rpc-core-Oyz-cJBC.d.mts → rpc-core-BHUsDl7s.d.mts} +3 -3
  53. package/dist/{host-agent-DbPWo0Bl.mjs → services-install-CqqQVls5.mjs} +150 -2
  54. package/dist/{sse-client-CdGD_B8_.d.mts → sse-client-DwX021ST.d.mts} +1 -1
  55. package/dist/types/index.d.mts +3 -3
  56. package/dist/{types-BBLeGfpt.d.mts → types-CMdPYhOx.d.mts} +1 -1
  57. package/dist/utils/events.d.mts +1 -1
  58. package/dist/utils/serve-static.mjs +1 -1
  59. package/dist/utils/shared-state.d.mts +1 -1
  60. package/dist/utils/streaming-channel.d.mts +1 -1
  61. package/dist/{ws-client-Bo2t6hES.d.mts → ws-client-7_lZi-B9.d.mts} +1 -1
  62. package/dist/{ws-server-DLtEoLdR.d.mts → ws-server-Di2oqr4q.d.mts} +1 -1
  63. package/package.json +2 -1
  64. package/skills/devframe/SKILL.md +86 -82
  65. package/dist/http-D7wWuy7-.mjs +0 -569
  66. 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-c0OlSc12.mjs";
2
- import { n as InternalAnonymousAuthStorage } from "./context-DO0Qu1O8.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,7 +1,7 @@
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-c0OlSc12.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
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
@@ -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-c0OlSc12.mjs";
3
- import "./index-B_DPNIT4.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-Cx9V9Grq.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-c0OlSc12.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
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-CPuYY8pw.mjs";
5
- import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-CsBsnhuO.mjs";
6
- import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-Oyz-cJBC.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-DbPWo0Bl.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-fB5PyVtR.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-c0OlSc12.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-B_DPNIT4.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-PihtvVil.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-DO0Qu1O8.mjs";
2
- import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-CsBsnhuO.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-Cx9V9Grq.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-c0OlSc12.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-Bc5S40Qt.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-c0OlSc12.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-c0OlSc12.mjs";
2
- import "../index-B_DPNIT4.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-Cx9V9Grq.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
  });
@@ -1,4 +1,4 @@
1
- import { t as DEVFRAME_EVENTS } from "./events-DzolaBEs.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-Oyz-cJBC.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-Oyz-cJBC.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-c0OlSc12.mjs";
3
- import "./index-B_DPNIT4.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-DzolaBEs.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-c0OlSc12.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
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-c0OlSc12.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 { t as DEVFRAME_EVENTS } from "../events-DzolaBEs.mjs";
1
+ import { t as DEVFRAME_EVENTS } from "../events-4daw0uK9.mjs";
2
2
  import { extname, join, normalize, resolve, sep } from "pathe";
3
3
  import { createReadStream } from "node:fs";
4
4
  import { stat } from "node:fs/promises";
@@ -1,2 +1,2 @@
1
- import { A as SharedStateEvents, D as ImmutableObject, E as ImmutableMap, M as SharedStatePatch, N as createSharedState, O as ImmutableSet, T as ImmutableArray, j as SharedStateOptions, k as SharedState, w as Immutable } from "../context-c0OlSc12.mjs";
1
+ import { A as SharedStateEvents, D as ImmutableObject, E as ImmutableMap, M as SharedStatePatch, N as createSharedState, O as ImmutableSet, T as ImmutableArray, j as SharedStateOptions, k as SharedState, w as Immutable } from "../context-BhBzOXVa.mjs";
2
2
  export { Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableSet, SharedState, SharedStateEvents, SharedStateOptions, SharedStatePatch, createSharedState };
@@ -1,2 +1,2 @@
1
- import { C as createStreamSink, S as createStreamReader, _ as CreateStreamSinkOptions, b as StreamSink, g as CreateStreamReaderOptions, h as BufferedChunk, v as StreamErrorPayload, x as StreamSinkEvents, y as StreamReader } from "../context-c0OlSc12.mjs";
1
+ import { C as createStreamSink, S as createStreamReader, _ as CreateStreamSinkOptions, b as StreamSink, g as CreateStreamReaderOptions, h as BufferedChunk, v as StreamErrorPayload, x as StreamSinkEvents, y as StreamReader } from "../context-BhBzOXVa.mjs";
2
2
  export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };
@@ -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/ws-client.d.ts
4
4
  interface WsRpcChannelOptions {
@@ -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 { BirpcGroup, ChannelOptions } from "birpc";
3
3
  import { Hooks, Peer } from "crossws";
4
4
  import { NodeAdapter } from "crossws/adapters/node";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "devframe",
3
3
  "type": "module",
4
- "version": "0.9.5",
4
+ "version": "0.9.6",
5
5
  "description": "Framework for building one portable devtool integration that runs in any viewer.",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -27,6 +27,7 @@
27
27
  "./adapters/mcp": "./dist/adapters/mcp.mjs",
28
28
  "./client": "./dist/client/index.mjs",
29
29
  "./constants": "./dist/constants.mjs",
30
+ "./in-page-channel": "./dist/in-page-channel/index.mjs",
30
31
  "./initiate": "./dist/adapters/initiate.mjs",
31
32
  "./internal": "./dist/internal/index.mjs",
32
33
  "./node": "./dist/node/index.mjs",