devframe 0.9.7 → 0.9.9

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 (116) hide show
  1. package/dist/{_shared-BM3PdYli.mjs → _shared-C08SdQRl.mjs} +15 -4
  2. package/dist/{_shared-BJ6AmwTu.d.mts → _shared-CK3czkH4.d.mts} +25 -2
  3. package/dist/adapters/build.d.mts +6 -6
  4. package/dist/adapters/build.mjs +32 -22
  5. package/dist/adapters/cac.d.mts +16 -1
  6. package/dist/adapters/cac.mjs +8 -7
  7. package/dist/adapters/dev.d.mts +13 -13
  8. package/dist/adapters/dev.mjs +2 -2
  9. package/dist/adapters/embedded.d.mts +1 -1
  10. package/dist/adapters/initiate.d.mts +28 -26
  11. package/dist/adapters/initiate.mjs +1 -1
  12. package/dist/adapters/mcp.d.mts +28 -14
  13. package/dist/adapters/mcp.mjs +75 -39
  14. package/dist/{agent-tool-name-EgfoFO8C.mjs → agent-tool-name-DGzeuWcO.mjs} +2 -2
  15. package/dist/cli/main.d.mts +1 -1
  16. package/dist/cli/main.mjs +41 -17
  17. package/dist/client/index.d.mts +36 -36
  18. package/dist/client/index.mjs +83 -51
  19. package/dist/client-assets-DNdhagGm.mjs +16 -0
  20. package/dist/constants.d.mts +8 -7
  21. package/dist/constants.mjs +7 -6
  22. package/dist/{context-BhBzOXVa.d.mts → context-4AIVRLYF.d.mts} +173 -122
  23. package/dist/{context-omlma_1n.mjs → context-CwPUinjn.mjs} +126 -88
  24. package/dist/{context-KUqAfawQ.mjs → context-DIUvJW4D.mjs} +3 -3
  25. package/dist/{context-HOnG-WvG.d.mts → context-rgBSPFHS.d.mts} +5 -5
  26. package/dist/{crypto-token-XCqTSMg9.mjs → crypto-token-TVbGGFuj.mjs} +1 -1
  27. package/dist/{dev-Czit5IP4.mjs → dev-Eqq5PX0k.mjs} +37 -18
  28. package/dist/{diagnostics-BXWW3VK-.mjs → diagnostics-BMfN8mb1.mjs} +30 -17
  29. package/dist/{diagnostics-CD8nlgll.mjs → diagnostics-D0EVm5M6.mjs} +2 -2
  30. package/dist/{events-4daw0uK9.mjs → events-BV4Dj59a.mjs} +2 -2
  31. package/dist/{host-h3-fRbF9yor.mjs → host-h3-BJ4siyz7.mjs} +1 -1
  32. package/dist/in-page-channel/index.d.mts +59 -22
  33. package/dist/in-page-channel/index.mjs +71 -56
  34. package/dist/{index-BzyopqxV.d.mts → index-pIVt92jP.d.mts} +9 -9
  35. package/dist/{index-DcKxIMoI.d.mts → index-pKl67H6w.d.mts} +4 -4
  36. package/dist/index.d.mts +11 -13
  37. package/dist/index.mjs +6 -7
  38. package/dist/{instance-registry-BjlMQbFB.mjs → instance-registry-C7-41RSp.mjs} +8 -8
  39. package/dist/{instance-shell-Bh4l9Vz_.d.mts → instance-shell-7Z52PE4_.d.mts} +18 -18
  40. package/dist/{instance-shell-CpVW4zG0.mjs → instance-shell-cdVETpfz.mjs} +227 -58
  41. package/dist/internal/index.d.mts +51 -21
  42. package/dist/internal/index.mjs +10 -9
  43. package/dist/node/auth.d.mts +2 -2
  44. package/dist/node/auth.mjs +2 -2
  45. package/dist/node/hub-internals.d.mts +2 -2
  46. package/dist/node/hub-internals.mjs +2 -2
  47. package/dist/node/index.d.mts +5 -5
  48. package/dist/node/index.mjs +2 -2
  49. package/dist/{nostics-SPGDgHEP.d.mts → nostics-0sKe5HIj.d.mts} +2 -2
  50. package/dist/{nostics-CzECRXpE.mjs → nostics-D0PvLZsn.mjs} +1 -1
  51. package/dist/origin-DGDH8BI9.d.mts +45 -0
  52. package/dist/origin-DZit9g29.mjs +80 -0
  53. package/dist/recipes/common-rpc-functions.d.mts +5 -5
  54. package/dist/recipes/common-rpc-functions.mjs +3 -3
  55. package/dist/recipes/interactive-auth.d.mts +6 -6
  56. package/dist/recipes/interactive-auth.mjs +6 -6
  57. package/dist/{remote-assets-DezQmPQU.mjs → remote-assets-BIFWOlBW.mjs} +26 -6
  58. package/dist/{remote-assets-B13_vRkJ.d.mts → remote-assets-eBvSKZMS.d.mts} +7 -7
  59. package/dist/{revoke-COLW0cOi.mjs → revoke-cqztiCX4.mjs} +1 -1
  60. package/dist/rpc/dump.d.mts +2 -11
  61. package/dist/rpc/dump.mjs +1 -1
  62. package/dist/rpc/index.d.mts +2 -2
  63. package/dist/rpc/index.mjs +3 -3
  64. package/dist/rpc/transports/sse-client.d.mts +1 -1
  65. package/dist/rpc/transports/sse-client.mjs +30 -14
  66. package/dist/rpc/transports/sse-server.d.mts +4 -4
  67. package/dist/rpc/transports/sse-server.mjs +7 -7
  68. package/dist/rpc/transports/ws-bun.d.mts +5 -5
  69. package/dist/rpc/transports/ws-bun.mjs +8 -2
  70. package/dist/rpc/transports/ws-client.d.mts +1 -1
  71. package/dist/rpc/transports/ws-client.mjs +2 -2
  72. package/dist/rpc/transports/ws-deno.d.mts +4 -4
  73. package/dist/rpc/transports/ws-deno.mjs +8 -2
  74. package/dist/rpc/transports/ws-server.d.mts +2 -1
  75. package/dist/rpc/transports/ws-server.mjs +232 -1
  76. package/dist/{rpc-core-BHUsDl7s.d.mts → rpc-core-Ceu6AUz8.d.mts} +4 -4
  77. package/dist/{rpc-core-DlHd276T.mjs → rpc-core-DVQ7xi89.mjs} +14 -2
  78. package/dist/{serialization-BGzEwAdr.mjs → serialization-DTZnPQ1-.mjs} +20 -18
  79. package/dist/{services-install-CqqQVls5.mjs → services-install-P_DV7VYL.mjs} +32 -21
  80. package/dist/session-DPfj6zQG.mjs +16 -0
  81. package/dist/{shared-state-DoXutg_U.mjs → shared-state-CaxB1q0h.mjs} +4 -3
  82. package/dist/{simple-schema-DQPZrAaZ.mjs → simple-schema-Bi40l-P6.mjs} +2 -2
  83. package/dist/{sse-client-DwX021ST.d.mts → sse-client-BQ4jS3eO.d.mts} +4 -4
  84. package/dist/{state-CK9LjrnT.mjs → state-CeQQWzM-.mjs} +4 -4
  85. package/dist/{static-DV_qUSRS.mjs → static-DZ8P2Kn7.mjs} +130 -135
  86. package/dist/{storage-BXNVhKyR.mjs → storage-Dccf_IyD.mjs} +1 -1
  87. package/dist/types/index.d.mts +6 -6
  88. package/dist/{types-CMdPYhOx.d.mts → types-Dq4i156u.d.mts} +17 -17
  89. package/dist/utils/agent-tool-name.d.mts +2 -2
  90. package/dist/utils/agent-tool-name.mjs +2 -2
  91. package/dist/utils/colors.d.mts +1 -1
  92. package/dist/utils/crypto-token.d.mts +1 -1
  93. package/dist/utils/crypto-token.mjs +1 -1
  94. package/dist/utils/events.d.mts +1 -1
  95. package/dist/utils/nostics.d.mts +1 -1
  96. package/dist/utils/nostics.mjs +1 -1
  97. package/dist/utils/open.mjs +1 -1
  98. package/dist/utils/origin.d.mts +2 -0
  99. package/dist/utils/origin.mjs +80 -0
  100. package/dist/utils/remote-assets.d.mts +2 -2
  101. package/dist/utils/remote-assets.mjs +1 -1
  102. package/dist/utils/serve-static.d.mts +4 -4
  103. package/dist/utils/serve-static.mjs +56 -19
  104. package/dist/utils/shared-state.d.mts +1 -1
  105. package/dist/utils/shared-state.mjs +1 -1
  106. package/dist/utils/simple-schema.d.mts +5 -5
  107. package/dist/utils/simple-schema.mjs +2 -2
  108. package/dist/utils/streaming-channel.d.mts +1 -1
  109. package/dist/utils/streaming-channel.mjs +2 -2
  110. package/dist/utils/when.d.mts +5 -5
  111. package/dist/{validation-YrZH6atx.mjs → validation-BOy8IoFZ.mjs} +2 -2
  112. package/dist/{wire-codec-0K-o5MYW.mjs → wire-codec-dcCeXcSo.mjs} +3 -3
  113. package/dist/{ws-client-7_lZi-B9.d.mts → ws-client-Xpxt0oPA.d.mts} +3 -3
  114. package/dist/{ws-server-Di2oqr4q.d.mts → ws-server-D2nv68Hg.d.mts} +13 -22
  115. package/package.json +6 -5
  116. package/dist/ws-server-BdSLrhxE.mjs +0 -267
package/dist/index.d.mts CHANGED
@@ -1,23 +1,21 @@
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
- import { i as DevframeDefineDiagnosticsOptions } from "./nostics-SPGDgHEP.mjs";
1
+ import "./index-pIVt92jP.mjs";
2
+ import { C as RpcFunctionType, T as RpcReturnSchema, _ as RpcFunctionDefinition, g as RpcFunctionAgentOptions, i as RpcArgsSchema } from "./types-Dq4i156u.mjs";
3
+ import { c as DevframeNodeRpcSessionMeta, d as DevframeRpcTransportKind, l as DevframeRpcConnection, u as DevframeRpcConnectionRequest } from "./ws-server-D2nv68Hg.mjs";
4
+ import { $ as DevframeServiceScopeOf, At as AgentManifest, B as DevframeSetupInfo, Bt as EventEmitter, Ct as DevframeDiagnosticsLogger, F as DevframeDefinition, Ft as AgentToolInput, G as McpAuthorization, H as DevframeSnapshotRpcInputs, Ht as EventsMap, I as DevframeDeploymentKind, It as AgentToolProvider, J as DevframeServiceDescriptor, K as McpRouteOptions, L as DevframeDockDefaults, Lt as AgentToolProviderHandle, Mt as AgentResourceContent, Nt as AgentResourceInput, P as DevframeCliOptions, Pt as AgentTool, Q as DevframeServiceOf, R as DevframeDuplicationStrategy, Rt as DevframeAgentHost, St as DevframeDiagnosticsHost, U as DevframeSseOptions, V as DevframeSnapshotRpcEntry, Vt as EventUnsubscribe, W as DevframeWsOptions, X as DevframeServiceInput, Y as DevframeServiceId, Z as DevframeServiceMeta, _t as DevframeRpcClientFunctions, a as DevframeConnectionConfigsRegistry, at as DevframeScopedNodeRpc, bt as DevframeHost, c as RpcBroadcastOptions, ct as DevframeSettingsRegistry, d as RpcSharedStateHost, dt as ScopedClientFunctions, et as DevframeServicesHost, f as RpcStreamingChannel, ft as ScopedRpcFn, gt as DevframeViewHost, ht as SettingsForNamespace, i as DevframeCapabilities, it as DevframeScopedNodeContext, jt as AgentResource, kt as AgentHandle, l as RpcFunctionsHost, lt as DevframeSettingsStore, m as RpcStreamingHost, mt as ScopedSharedStates, n as ConnectionMetaSse, nt as DevframeServicesScopeRegistry, o as DevframeNodeContext, ot as DevframeScopedStreamingHost, p as RpcStreamingChannelOptions, pt as ScopedServerFunctions, q as DevframeServiceDefinition, r as ConnectionMetaWebsocket, rt as DevframeServicesState, s as DevframeNodeRpcSession, st as DevframeSettings, t as ConnectionMeta, tt as DevframeServicesRegistry, u as RpcSharedStateGetOptions, ut as ScopedBroadcastOptions, vt as DevframeRpcServerFunctions, xt as DevframeStorageScope, yt as DevframeRpcSharedStates, z as DevframeRpcOptions, zt as DevframeAgentHostEvents } from "./context-4AIVRLYF.mjs";
5
+ import { a as RemoteAssetsStore, i as RemoteAssetsProviderCustom, n as RemoteAssetsErrorMessage, o as StaticAssetsSource, r as RemoteAssetsProvider, t as RemoteAssets } from "./remote-assets-eBvSKZMS.mjs";
6
+ import { i as DevframeDefineDiagnosticsOptions } from "./nostics-0sKe5HIj.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>;
9
9
  /**
10
- * Identity helper that types a devframe definition — the primary authoring
10
+ * Identity helper that types a devframe definition, the primary authoring
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
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).
15
+ * @deprecated Read {@link DevframeDefinition.clientAssets} from the definition
16
+ * directly. This helper is internal machinery that was never meant to be part
17
+ * of the public API and is scheduled for removal.
20
18
  */
21
19
  declare function resolveClientAssets(d: DevframeDefinition): StaticAssetsSource | undefined;
22
20
  //#endregion
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 };
21
+ 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 McpAuthorization, 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
@@ -1,22 +1,21 @@
1
1
  import { t as createDefineWrapperWithContext } from "./define-BLWPsH6y.mjs";
2
+ import { t as resolveClientAssets$1 } from "./client-assets-DNdhagGm.mjs";
2
3
  //#region src/define.ts
3
4
  const defineRpcFunction = createDefineWrapperWithContext();
4
5
  /**
5
- * Identity helper that types a devframe definition — the primary authoring
6
+ * Identity helper that types a devframe definition, the primary authoring
6
7
  * entry point. Import it from the package root: `import { defineDevframe } from 'devframe'`.
7
8
  */
8
9
  function defineDevframe(d) {
9
10
  return d;
10
11
  }
11
12
  /**
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).
13
+ * @deprecated Read {@link DevframeDefinition.clientAssets} from the definition
14
+ * directly. This helper is internal machinery that was never meant to be part
15
+ * of the public API and is scheduled for removal.
17
16
  */
18
17
  function resolveClientAssets(d) {
19
- return d.clientAssets ?? d.cli?.distDir;
18
+ return resolveClientAssets$1(d);
20
19
  }
21
20
  //#endregion
22
21
  export { defineDevframe, defineRpcFunction, resolveClientAssets };
@@ -1,5 +1,5 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.mjs";
2
- import { t as diagnostics } from "./diagnostics-BXWW3VK-.mjs";
2
+ import { t as diagnostics } from "./diagnostics-BMfN8mb1.mjs";
3
3
  import process from "node:process";
4
4
  import { join } from "pathe";
5
5
  import { mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
@@ -16,9 +16,9 @@ const DEVFRAME_INSTANCES_DIR_ENV = "DEVFRAME_INSTANCES_DIR";
16
16
  /** Environment variable disabling instance registration entirely. */
17
17
  const DEVFRAME_DISABLE_INSTANCE_REGISTRY_ENV = "DEVFRAME_DISABLE_INSTANCE_REGISTRY";
18
18
  /**
19
- * Resolve the registry directory: `~/.devframe/instances/` by default —
20
- * the framework's own global dir, deliberately outside the per-app
21
- * `~/.<appName>/devframe/` storage convention since the registry spans apps —
19
+ * Resolve the registry directory: `~/.devframe/instances/` by default
20
+ * (the framework's own global dir, deliberately outside the per-app
21
+ * `~/.<appName>/devframe/` storage convention since the registry spans apps),
22
22
  * overridable via `DEVFRAME_INSTANCES_DIR`.
23
23
  */
24
24
  function resolveInstancesDir(override) {
@@ -40,7 +40,7 @@ function isRegistryDisabled() {
40
40
  * The record is written atomically to `<dir>/<pid>-<port>.json` and removed
41
41
  * by {@link DevframeInstanceRegistration.unregister}. Records surviving a
42
42
  * crash are pruned by readers whose liveness probe fails. Registration never
43
- * throws — a write failure degrades to a coded warning (`DF0045`), since a
43
+ * throws; a write failure degrades to a coded warning (`DF0045`), since a
44
44
  * dev server must not die over discovery metadata.
45
45
  */
46
46
  function registerDevframeInstance(record, options = {}) {
@@ -75,7 +75,7 @@ function registerDevframeInstance(record, options = {}) {
75
75
  }
76
76
  /**
77
77
  * Read every record in the registry directory, dropping unparseable files.
78
- * Liveness is the caller's concern — see {@link probeDevframeInstance}.
78
+ * Liveness is the caller's concern; see {@link probeDevframeInstance}.
79
79
  */
80
80
  function readDevframeInstances(options = {}) {
81
81
  const dir = resolveInstancesDir(options.instancesDir);
@@ -94,8 +94,8 @@ function readDevframeInstances(options = {}) {
94
94
  }
95
95
  /**
96
96
  * Dialable-origin candidates for a recorded origin. A `localhost` bind is
97
- * ambiguous — the server may listen on `127.0.0.1`, `::1`, or both, and
98
- * HTTP clients differ in which family they try — so probe the explicit
97
+ * ambiguous: the server may listen on `127.0.0.1`, `::1`, or both, and
98
+ * HTTP clients differ in which family they try, so probe the explicit
99
99
  * addresses too and adopt whichever answers.
100
100
  */
101
101
  function originCandidates(origin) {
@@ -1,6 +1,6 @@
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";
1
+ import { c as DevframeNodeRpcSessionMeta, l as DevframeRpcConnection, n as WsOriginRegistry } from "./ws-server-D2nv68Hg.mjs";
2
+ import { U as DevframeSseOptions, W as DevframeWsOptions, _t as DevframeRpcClientFunctions, o as DevframeNodeContext, s as DevframeNodeRpcSession, t as ConnectionMeta, vt as DevframeRpcServerFunctions, wt as DevframeAuthHandler } from "./context-4AIVRLYF.mjs";
3
+ import "./index-pKl67H6w.mjs";
4
4
  import { BirpcGroup } from "birpc";
5
5
  import { NodeAdapter } from "crossws/adapters/node";
6
6
  import { Buffer } from "node:buffer";
@@ -10,7 +10,7 @@ import { H3 } from "h3";
10
10
  //#region src/node/instance-registry.d.ts
11
11
  /**
12
12
  * One running devframe instance, as recorded in the instance registry.
13
- * Records are self-describing JSON — additive fields are safe.
13
+ * Records are self-describing JSON, so additive fields are safe.
14
14
  */
15
15
  interface DevframeInstanceRecord {
16
16
  /** Process id of the dev server. */
@@ -58,7 +58,7 @@ interface DevframeInstanceRegistration {
58
58
  * The record is written atomically to `<dir>/<pid>-<port>.json` and removed
59
59
  * by {@link DevframeInstanceRegistration.unregister}. Records surviving a
60
60
  * crash are pruned by readers whose liveness probe fails. Registration never
61
- * throws — a write failure degrades to a coded warning (`DF0045`), since a
61
+ * throws; a write failure degrades to a coded warning (`DF0045`), since a
62
62
  * dev server must not die over discovery metadata.
63
63
  */
64
64
  declare function registerDevframeInstance(record: DevframeInstanceRecord, options?: {
@@ -85,7 +85,7 @@ declare function listLiveDevframeInstances(options?: {
85
85
  //#endregion
86
86
  //#region src/node/instance-shell.d.ts
87
87
  /**
88
- * The live handle for a bound HTTP + WebSocket RPC server — what the
88
+ * The live handle for a bound HTTP + WebSocket RPC server: what the
89
89
  * side-car / shared-server tiers produce and what {@link createDevServer}
90
90
  * re-exposes through its own return contract.
91
91
  */
@@ -101,7 +101,7 @@ interface StartedServer {
101
101
  ws?: NodeAdapter;
102
102
  rpcGroup: BirpcGroup<DevframeRpcClientFunctions, DevframeRpcServerFunctions, false>;
103
103
  /**
104
- * The {@link ConnectionMeta} descriptor for this server — the same shape a
104
+ * The {@link ConnectionMeta} descriptor for this server, the same shape a
105
105
  * `__connection.json` route should serve so a devframe client's
106
106
  * `resolveWsUrl` can dial back in.
107
107
  */
@@ -111,15 +111,15 @@ interface StartedServer {
111
111
  /**
112
112
  * How the instance's RPC socket is bound:
113
113
  *
114
- * - `sidecar` — its own HTTP+WS server on a dedicated port (`ws.port` /
114
+ * - `sidecar`: its own HTTP+WS server on a dedicated port (`ws.port` /
115
115
  * `ws.sidecar`), advertised with that port.
116
- * - `server` — a shared upgrade route on the host's `node:http` server.
117
- * - `external` — no local transport: `ws.url` alone names a server that owns
116
+ * - `server`: a shared upgrade route on the host's `node:http` server.
117
+ * - `external`: no local transport; `ws.url` alone names a server that owns
118
118
  * both the socket and its auth.
119
- * - `unbound` — the transport exists but nothing is bound to it yet; the host
119
+ * - `unbound`: the transport exists but nothing is bound to it yet; the host
120
120
  * drives it through {@link InstanceShell.handleUpgrade} /
121
121
  * {@link InstanceShell.attach}.
122
- * - `disabled` — `ws: false`: no WebSocket at all; clients connect over the
122
+ * - `disabled` (`ws: false`): no WebSocket at all; clients connect over the
123
123
  * SSE endpoint instead (`backend: 'sse'`).
124
124
  */
125
125
  type InstanceWsTier = 'sidecar' | 'server' | 'external' | 'unbound' | 'disabled';
@@ -154,9 +154,9 @@ interface CreateInstanceShellOptions<TContext extends DevframeNodeContext> {
154
154
  auth?: boolean | DevframeAuthHandler;
155
155
  /** Host `node:http` server to share the WS upgrade with. */
156
156
  server?: Server;
157
- /** Explicit WebSocket control — see {@link DevframeWsOptions}. `false` disables the socket (SSE-only). */
157
+ /** Explicit WebSocket control; see {@link DevframeWsOptions}. `false` disables the socket (SSE-only). */
158
158
  ws?: DevframeWsOptions | false;
159
- /** SSE endpoint control — enabled by default; `false` disables, an object renames the route. */
159
+ /** SSE endpoint control, enabled by default; `false` disables, an object renames the route. */
160
160
  sse?: boolean | DevframeSseOptions;
161
161
  /** Bind host for a side-car WebSocket server. Default: `localhost`. */
162
162
  host?: string;
@@ -177,7 +177,7 @@ interface CreateInstanceShellOptions<TContext extends DevframeNodeContext> {
177
177
  resolveSidecarPort?: (host: string) => Promise<number>;
178
178
  /**
179
179
  * Publish this instance in the global registry (`~/.devframe/instances/`)
180
- * once its public origin is known — a dynamic import so the registry code
180
+ * once its public origin is known, via a dynamic import so the registry code
181
181
  * stays out of instances that opt out. Omit to skip registration.
182
182
  */
183
183
  register?: InstanceRegisterConfig;
@@ -190,7 +190,7 @@ interface CreateInstanceShellOptions<TContext extends DevframeNodeContext> {
190
190
  }
191
191
  /**
192
192
  * The identity a shell needs to publish itself in the global instance
193
- * registry — the parts it can't derive on its own. The shell fills in
193
+ * registry: the parts it can't derive on its own. The shell fills in
194
194
  * `pid` / `origin` / `port` / `basePath` / `mcp` / `startedAt` once the
195
195
  * origin resolves, then merges {@link InstanceRegisterConfig.overrides} last.
196
196
  */
@@ -240,8 +240,8 @@ declare function samePath(a: string, b: string): boolean;
240
240
  * The shared machinery behind `initDevframe` and `initHub`: one mount base,
241
241
  * one h3 app, one lazily-derived public origin (and the auth banner that waits
242
242
  * for it), one WebSocket binding, and the fetch / connect-middleware pair that
243
- * serves them. Each factory supplies only what makes it itself — its context,
244
- * its routes, its diagnostics — through `init` / `mount`.
243
+ * serves them. Each factory supplies only what makes it itself (its context,
244
+ * its routes, its diagnostics) through `init` / `mount`.
245
245
  *
246
246
  * Nothing here listens on a port unless a side-car was explicitly requested:
247
247
  * the default tier leaves the socket `unbound`, so a host chains it onto its