devframe 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/dist/{_shared-C06DH07o.mjs → _shared-BGb9aDxr.mjs} +7 -9
  2. package/dist/{_shared-DbO-OtUC.d.mts → _shared-CnKu5myY.d.mts} +4 -4
  3. package/dist/adapters/build.d.mts +3 -5
  4. package/dist/adapters/build.mjs +7 -8
  5. package/dist/adapters/cac.d.mts +1 -3
  6. package/dist/adapters/cac.mjs +5 -7
  7. package/dist/adapters/dev.d.mts +6 -8
  8. package/dist/adapters/dev.mjs +2 -2
  9. package/dist/adapters/embedded.d.mts +2 -4
  10. package/dist/adapters/embedded.mjs +1 -2
  11. package/dist/adapters/initiate.d.mts +9 -9
  12. package/dist/adapters/initiate.mjs +1 -2
  13. package/dist/adapters/mcp.d.mts +3 -3
  14. package/dist/adapters/mcp.mjs +1 -2
  15. package/dist/{agentic-D6HePbWg.d.mts → agentic-CCstJ5yv.d.mts} +1 -3
  16. package/dist/{browser-agent-Pu-FLk6I.mjs → browser-agent-DmAotroz.mjs} +1 -2
  17. package/dist/{browser-agent-rpc-KH4HHvHf.mjs → browser-agent-rpc-CS80Sphv.mjs} +3 -5
  18. package/dist/cli/main.d.mts +1 -3
  19. package/dist/cli/main.mjs +3 -4
  20. package/dist/client/index.d.mts +6 -30
  21. package/dist/client/index.mjs +47 -72
  22. package/dist/{client-agent-DuLhUF6d.mjs → client-agent-qNMgDUev.mjs} +7 -12
  23. package/dist/constants.d.mts +1 -5
  24. package/dist/constants.mjs +2 -3
  25. package/dist/{context-BY72d2gV.mjs → context-BTxC4QrJ.mjs} +4 -5
  26. package/dist/{context-CmSDJAEI.mjs → context-C5FcbWQi.mjs} +25 -41
  27. package/dist/{context-eIUOSrKu.d.mts → context-CsdPs3po.d.mts} +1 -3
  28. package/dist/{context-Dko5QFWF.d.mts → context-WxTq6kqb.d.mts} +54 -42
  29. package/dist/{crypto-token-TVbGGFuj.mjs → crypto-token-CUhPE_ei.mjs} +1 -2
  30. package/dist/{define-BLWPsH6y.mjs → define-C8h-fyD3.mjs} +1 -2
  31. package/dist/{dev-C-wQTIrV.mjs → dev-DaHYh5YK.mjs} +10 -11
  32. package/dist/{diagnostics-BJjvKfVK.mjs → diagnostics-DC1-WcvN.mjs} +6 -3
  33. package/dist/{dist-CO98PBnQ.mjs → dist-BWGpvt-z.mjs} +1 -2
  34. package/dist/{dist-CZXfGEkd.mjs → dist-DJydMELP.mjs} +3 -10
  35. package/dist/{events-0wDwalmL.mjs → events-qWCKwD8-.mjs} +1 -2
  36. package/dist/{handler-DmaAfpGq.mjs → handler-DkLlj3-B.mjs} +3 -5
  37. package/dist/{hash-DdPnc4k3.mjs → hash-DHqpWeMO.mjs} +4 -8
  38. package/dist/{host-h3-BROI6SQ4.mjs → host-h3-D1uj5EM8.mjs} +1 -2
  39. package/dist/{import-runtime-module-BzlEQ9PI.mjs → import-runtime-module-DsdqJ1gK.mjs} +2 -3
  40. package/dist/in-page-channel/index.d.mts +2 -12
  41. package/dist/in-page-channel/index.mjs +10 -16
  42. package/dist/{index-CeEtxDmK.d.mts → index-BIRF0E5l.d.mts} +0 -2
  43. package/dist/{index-Bia1vKjL.d.mts → index-BKu9BxcT.d.mts} +0 -2
  44. package/dist/{index-DuEm0sDH.d.mts → index-D0qrBkhO.d.mts} +1 -15
  45. package/dist/{index-BMj-o_sP.d.mts → index-HMJPlexc.d.mts} +2 -6
  46. package/dist/index.d.mts +7 -9
  47. package/dist/index.mjs +3 -4
  48. package/dist/{instance-registry-vlz81P9X.mjs → instance-registry-CmZfF5u3.mjs} +4 -10
  49. package/dist/{instance-shell-yfm1AYk8.d.mts → instance-shell-Bujp0BhE.d.mts} +5 -9
  50. package/dist/{instance-shell-CBgy8YzK.mjs → instance-shell-Dk2SejFT.mjs} +38 -17
  51. package/dist/{interactive-auth-BsqLFXw8.mjs → interactive-auth-BURwIAvE.mjs} +6 -8
  52. package/dist/internal/index.d.mts +15 -29
  53. package/dist/internal/index.mjs +13 -15
  54. package/dist/{mcp-content-wcQxvrrW.d.mts → mcp-content-CQQBt2An.d.mts} +1 -3
  55. package/dist/{mcp-content-DN3O212x.mjs → mcp-content-CqU8yaF7.mjs} +1 -2
  56. package/dist/{mrmime-40h5OOIp.mjs → mrmime-y_XyiVcd.mjs} +1 -2
  57. package/dist/node/auth.d.mts +2 -2
  58. package/dist/node/auth.mjs +2 -2
  59. package/dist/node/hub-internals.d.mts +2 -2
  60. package/dist/node/hub-internals.mjs +2 -2
  61. package/dist/node/index.d.mts +2 -6
  62. package/dist/node/index.mjs +2 -2
  63. package/dist/{nostics-DWvukRwa.d.mts → nostics-Dgwh7ytT.d.mts} +0 -2
  64. package/dist/{nostics-D0PvLZsn.mjs → nostics-InlX4tmd.mjs} +2 -4
  65. package/dist/{origin-DZit9g29.mjs → origin-Ck7mLbKU.mjs} +1 -2
  66. package/dist/{origin-CY6BBHOy.d.mts → origin-D5i7K_Zb.d.mts} +0 -2
  67. package/dist/recipes/interactive-auth.d.mts +3 -5
  68. package/dist/recipes/interactive-auth.mjs +1 -2
  69. package/dist/{remote-assets-eBvSKZMS.d.mts → remote-assets-5AQMHZnV.d.mts} +0 -2
  70. package/dist/{remote-assets-DOva7l3s.mjs → remote-assets-DhonNeo_.mjs} +5 -8
  71. package/dist/{revoke-CeQUo6KI.mjs → revoke-D6KA3vwr.mjs} +2 -3
  72. package/dist/{rolldown-runtime-B4iAMlE-.mjs → rolldown-runtime-DYf_mQCB.mjs} +2 -3
  73. package/dist/rpc/client.d.mts +2 -4
  74. package/dist/rpc/client.mjs +2 -3
  75. package/dist/rpc/dump.d.mts +3 -11
  76. package/dist/rpc/dump.mjs +1 -2
  77. package/dist/rpc/index.d.mts +3 -3
  78. package/dist/rpc/index.mjs +6 -8
  79. package/dist/rpc/server.d.mts +2 -4
  80. package/dist/rpc/server.mjs +2 -3
  81. package/dist/rpc/transports/sse-client.d.mts +1 -1
  82. package/dist/rpc/transports/sse-client.mjs +2 -3
  83. package/dist/rpc/transports/sse-server.d.mts +5 -7
  84. package/dist/rpc/transports/sse-server.mjs +4 -5
  85. package/dist/rpc/transports/ws-bun.d.mts +3 -5
  86. package/dist/rpc/transports/ws-bun.mjs +2 -3
  87. package/dist/rpc/transports/ws-client.d.mts +1 -1
  88. package/dist/rpc/transports/ws-client.mjs +2 -3
  89. package/dist/rpc/transports/ws-deno.d.mts +3 -5
  90. package/dist/rpc/transports/ws-deno.mjs +2 -3
  91. package/dist/rpc/transports/ws-server.d.mts +3 -3
  92. package/dist/rpc/transports/ws-server.mjs +5 -6
  93. package/dist/{rpc-core-oXIq2hjO.mjs → rpc-core-CDUizUQB.mjs} +4 -5
  94. package/dist/{rpc-core-BQ1mesqZ.d.mts → rpc-core-CFwyV10r.d.mts} +5 -7
  95. package/dist/{serialization-BhuOoL80.mjs → serialization-iiTQ7n21.mjs} +3 -5
  96. package/dist/{services-install-D5YUwFXW.mjs → services-install-DCuDzMJ-.mjs} +1 -2
  97. package/dist/{session-DPfj6zQG.mjs → session-BjvoLH3r.mjs} +1 -2
  98. package/dist/{session-r6PDixP6.d.mts → session-Y9R6tqg4.d.mts} +0 -2
  99. package/dist/{shared-state-Cc-Jrhma.mjs → shared-state-COV7NCbd.mjs} +4 -6
  100. package/dist/{sse-client-DNdscfu_.d.mts → sse-client-B2PrSz-H.d.mts} +2 -4
  101. package/dist/{state-W4wI6X5X.mjs → state-B_yjfeqo.mjs} +3 -5
  102. package/dist/{storage-BzAr-S6I.mjs → storage-DpJ52UB_.mjs} +3 -5
  103. package/dist/{structured-clone-CbAV5rFI.mjs → structured-clone-B1N_XQvA.mjs} +2 -4
  104. package/dist/{structured-clone-CgtQ61SA.mjs → structured-clone-D1dOCZvc.mjs} +2 -4
  105. package/dist/{tool-input-CES3Pc4y.mjs → tool-input-CcCgJ8jq.mjs} +6 -12
  106. package/dist/types/index.d.mts +6 -6
  107. package/dist/{types-BmDbfHCx.d.mts → types-844OBepb.d.mts} +1 -5
  108. package/dist/utils/agent-tool-name.d.mts +1 -3
  109. package/dist/utils/agent-tool-name.mjs +1 -2
  110. package/dist/utils/colors.d.mts +1 -3
  111. package/dist/utils/colors.mjs +1 -2
  112. package/dist/utils/crypto-token.d.mts +1 -3
  113. package/dist/utils/crypto-token.mjs +1 -2
  114. package/dist/utils/debounce.d.mts +0 -2
  115. package/dist/utils/debounce.mjs +1 -2
  116. package/dist/utils/events.d.mts +2 -4
  117. package/dist/utils/events.mjs +1 -2
  118. package/dist/utils/get-port.d.mts +0 -2
  119. package/dist/utils/get-port.mjs +1 -2
  120. package/dist/utils/hash.d.mts +1 -3
  121. package/dist/utils/hash.mjs +1 -2
  122. package/dist/utils/launch-editor.d.mts +1 -3
  123. package/dist/utils/launch-editor.mjs +25 -37
  124. package/dist/utils/nanoid.d.mts +1 -3
  125. package/dist/utils/nanoid.mjs +1 -2
  126. package/dist/utils/nostics.d.mts +1 -1
  127. package/dist/utils/nostics.mjs +1 -2
  128. package/dist/utils/open.d.mts +1 -3
  129. package/dist/utils/open.mjs +1 -2
  130. package/dist/utils/origin.d.mts +1 -1
  131. package/dist/utils/origin.mjs +1 -2
  132. package/dist/utils/remote-assets.d.mts +2 -4
  133. package/dist/utils/remote-assets.mjs +1 -2
  134. package/dist/utils/serve-static.d.mts +2 -4
  135. package/dist/utils/serve-static.mjs +3 -4
  136. package/dist/utils/shared-state.d.mts +1 -1
  137. package/dist/utils/shared-state.mjs +1 -2
  138. package/dist/utils/simple-schema.d.mts +1 -3
  139. package/dist/utils/simple-schema.mjs +1 -2
  140. package/dist/utils/streaming-channel.d.mts +1 -1
  141. package/dist/utils/streaming-channel.mjs +1 -2
  142. package/dist/utils/structured-clone.d.mts +1 -3
  143. package/dist/utils/structured-clone.mjs +1 -2
  144. package/dist/utils/url.d.mts +1 -3
  145. package/dist/utils/url.mjs +1 -2
  146. package/dist/utils/when.d.mts +1 -3
  147. package/dist/utils/when.mjs +2 -4
  148. package/dist/{validation-CMfDAti3.mjs → validation-Cjy1P58H.mjs} +7 -13
  149. package/dist/{wire-codec-B1W3zH3L.mjs → wire-codec-BdngvzfH.mjs} +3 -4
  150. package/dist/{write-DK7rBUN3.mjs → write-3miSvPaD.mjs} +10 -16
  151. package/dist/{ws-client-6Mrz6eC4.d.mts → ws-client-lqOeANcn.d.mts} +2 -4
  152. package/dist/{ws-server-y2R76aSW.d.mts → ws-server-CYHkeyA-.d.mts} +3 -5
  153. package/package.json +8 -8
@@ -1,2 +1,2 @@
1
- import { _ as formatDiagnostic, a as DevframeDiagnostics, c as DiagnosticDefinition, d as DiagnosticReporter, f as Diagnostics, g as defineProdDiagnostics, h as defineDiagnostics, i as DevframeDefineDiagnosticsOptions, l as DiagnosticHandle, m as createConsoleReporter, n as ConsoleMethod, o as Diagnostic, p as ansiFormatter, r as ConsoleReporterOptions, s as DiagnosticCallParams, t as AnyDiagnosticReporter, u as DiagnosticInit } from "../nostics-DWvukRwa.mjs";
1
+ import { _ as formatDiagnostic, a as DevframeDiagnostics, c as DiagnosticDefinition, d as DiagnosticReporter, f as Diagnostics, g as defineProdDiagnostics, h as defineDiagnostics, i as DevframeDefineDiagnosticsOptions, l as DiagnosticHandle, m as createConsoleReporter, n as ConsoleMethod, o as Diagnostic, p as ansiFormatter, r as ConsoleReporterOptions, s as DiagnosticCallParams, t as AnyDiagnosticReporter, u as DiagnosticInit } from "../nostics-Dgwh7ytT.mjs";
2
2
  export { type AnyDiagnosticReporter, type ConsoleMethod, type ConsoleReporterOptions, DevframeDefineDiagnosticsOptions, DevframeDiagnostics, type Diagnostic, type DiagnosticCallParams, type DiagnosticDefinition, type DiagnosticHandle, type DiagnosticInit, type DiagnosticReporter, type Diagnostics, ansiFormatter, createConsoleReporter, defineDiagnostics, defineProdDiagnostics, formatDiagnostic };
@@ -1,2 +1 @@
1
- import { a as defineProdDiagnostics, i as defineDiagnostics, n as ansiFormatter, o as formatDiagnostic, r as createConsoleReporter, t as Diagnostic } from "../nostics-D0PvLZsn.mjs";
2
- export { Diagnostic, ansiFormatter, createConsoleReporter, defineDiagnostics, defineProdDiagnostics, formatDiagnostic };
1
+ export { t as Diagnostic, n as ansiFormatter, r as createConsoleReporter, i as defineDiagnostics, a as defineProdDiagnostics, o as formatDiagnostic } from "../nostics-InlX4tmd.mjs";
@@ -1,7 +1,5 @@
1
- //#region src/utils/open.d.ts
2
1
  /**
3
2
  * Open a URL, file, or other target in its default OS handler
4
3
  * (browser for URLs, Finder/Explorer for paths, etc.).
5
4
  */
6
- export declare function open(target: string): Promise<void>;
7
- //#endregion
5
+ export declare function open(target: string): Promise<void>;
@@ -1,7 +1,7 @@
1
1
  import fs from "node:fs";
2
2
  import process from "node:process";
3
3
  import { spawn } from "node:child_process";
4
- //#region src/utils/open.ts
4
+ // src/utils/open.ts
5
5
  /**
6
6
  * Launches `command` detached from the current process and resolves once
7
7
  * the OS has accepted the spawn (not once the launched app exits), the
@@ -53,5 +53,4 @@ async function open(target) {
53
53
  }
54
54
  return spawnDetached("xdg-open", [target]);
55
55
  }
56
- //#endregion
57
56
  export { open };
@@ -1,2 +1,2 @@
1
- import { i as validateOriginCandidate, n as isLoopbackAddress, r as isLoopbackHostname, t as isAllowedOrigin } from "../origin-CY6BBHOy.mjs";
1
+ import { i as validateOriginCandidate, n as isLoopbackAddress, r as isLoopbackHostname, t as isAllowedOrigin } from "../origin-D5i7K_Zb.mjs";
2
2
  export { isAllowedOrigin, isLoopbackAddress, isLoopbackHostname, validateOriginCandidate };
@@ -1,4 +1,4 @@
1
- //#region src/utils/origin.ts
1
+ // src/utils/origin.ts
2
2
  /**
3
3
  * Origin and hostname predicates shared by the RPC transports (the WS upgrade,
4
4
  * SSE, and MCP origin gates) and the instance shell's authentication-link
@@ -96,5 +96,4 @@ function validateOriginCandidate(candidate, allowedOrigins) {
96
96
  if (canonical === "null") return void 0;
97
97
  if (isLoopbackHostname(url.hostname) || allowedOrigins?.includes(canonical)) return canonical;
98
98
  }
99
- //#endregion
100
99
  export { isAllowedOrigin, isLoopbackAddress, isLoopbackHostname, validateOriginCandidate };
@@ -1,5 +1,4 @@
1
- import { a as RemoteAssetsStore, o as StaticAssetsSource } from "../remote-assets-eBvSKZMS.mjs";
2
- //#region src/utils/remote-assets.d.ts
1
+ import { a as RemoteAssetsStore, o as StaticAssetsSource } from "../remote-assets-5AQMHZnV.mjs";
3
2
  /**
4
3
  * Normalize a {@link StaticAssetsSource} into something servable: a local
5
4
  * directory (strings pass through; a remote source short-circuits to a
@@ -16,5 +15,4 @@ import { a as RemoteAssetsStore, o as StaticAssetsSource } from "../remote-asset
16
15
  * per-source string still wins and an explicit `null` still opts out of the
17
16
  * installed-copy lookup.
18
17
  */
19
- export declare function resolveStaticAssetsSource(source: StaticAssetsSource, projectStorageDir: string, defaultResolveFrom?: string | null): string | RemoteAssetsStore;
20
- //#endregion
18
+ export declare function resolveStaticAssetsSource(source: StaticAssetsSource, projectStorageDir: string, defaultResolveFrom?: string | null): string | RemoteAssetsStore;
@@ -1,2 +1 @@
1
- import { t as resolveStaticAssetsSource } from "../remote-assets-DOva7l3s.mjs";
2
- export { resolveStaticAssetsSource };
1
+ export { t as resolveStaticAssetsSource } from "../remote-assets-DhonNeo_.mjs";
@@ -1,7 +1,6 @@
1
- import { a as RemoteAssetsStore } from "../remote-assets-eBvSKZMS.mjs";
1
+ import { a as RemoteAssetsStore } from "../remote-assets-5AQMHZnV.mjs";
2
2
  import { EventHandler, H3 } from "h3";
3
3
  import { IncomingMessage, ServerResponse } from "node:http";
4
- //#region src/utils/serve-static.d.ts
5
4
  /**
6
5
  * What the static-serving engine accepts: a local directory, or a resolved
7
6
  * {@link RemoteAssetsStore} back-proxy (from `devframe/utils/remote-assets`).
@@ -40,5 +39,4 @@ export declare function mountStaticHandler(app: H3, base: string, source: Servab
40
39
  * Connect stack; avoids forcing the host package to depend on h3 just to
41
40
  * adapt an event handler back into Node middleware.
42
41
  */
43
- export declare function serveStaticNodeMiddleware(source: ServableAssets, options?: ServeStaticOptions): (req: IncomingMessage, res: ServerResponse, next?: (err?: Error) => void) => void;
44
- //#endregion
42
+ export declare function serveStaticNodeMiddleware(source: ServableAssets, options?: ServeStaticOptions): (req: IncomingMessage, res: ServerResponse, next?: (err?: Error) => void) => void;
@@ -1,11 +1,11 @@
1
- import { t as DEVFRAME_EVENTS } from "../events-0wDwalmL.mjs";
2
- import { t as lookup } from "../mrmime-40h5OOIp.mjs";
1
+ import { t as lookup } from "../mrmime-y_XyiVcd.mjs";
2
+ import { t as DEVFRAME_EVENTS } from "../events-qWCKwD8-.mjs";
3
3
  import { realpath, stat } from "node:fs/promises";
4
4
  import { extname, join, normalize, resolve, sep } from "pathe";
5
5
  import { createReadStream } from "node:fs";
6
6
  import { Readable } from "node:stream";
7
7
  import { H3, defineHandler } from "h3";
8
- //#region src/utils/serve-static.ts
8
+ // src/utils/serve-static.ts
9
9
  const HTML_EXTENSIONS = [".html", ".htm"];
10
10
  /**
11
11
  * The canonical (symlink-resolved) served root, falling back to the lexical
@@ -312,5 +312,4 @@ function remoteErrorPage(pkg, version, reason) {
312
312
  </html>
313
313
  `;
314
314
  }
315
- //#endregion
316
315
  export { mountStaticHandler, serveStaticHandler, serveStaticNodeMiddleware };
@@ -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-Dko5QFWF.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-WxTq6kqb.mjs";
2
2
  export { Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableSet, SharedState, SharedStateEvents, SharedStateOptions, SharedStatePatch, createSharedState };
@@ -1,2 +1 @@
1
- import { t as createSharedState } from "../shared-state-Cc-Jrhma.mjs";
2
- export { createSharedState };
1
+ export { t as createSharedState } from "../shared-state-COV7NCbd.mjs";
@@ -1,5 +1,4 @@
1
- import { t as StandardSchemaV1 } from "../index-CeEtxDmK.mjs";
2
- //#region src/utils/simple-schema.d.ts
1
+ import { t as StandardSchemaV1 } from "../index-BIRF0E5l.mjs";
3
2
  /**
4
3
  * A tiny, zero-dependency [Standard Schema](https://standardschema.dev/)
5
4
  * builder.
@@ -98,5 +97,4 @@ export declare const s: {
98
97
  readonly nullable: typeof nullable;
99
98
  readonly describe: typeof describe;
100
99
  };
101
- //#endregion
102
100
  export type { StandardSchemaV1 };
@@ -1,4 +1,4 @@
1
- //#region src/utils/simple-schema.ts
1
+ // src/utils/simple-schema.ts
2
2
  function ok(value) {
3
3
  return { value };
4
4
  }
@@ -150,5 +150,4 @@ const s = {
150
150
  nullable,
151
151
  describe
152
152
  };
153
- //#endregion
154
153
  export { array, boolean, describe, literal, nullType, nullable, number, object, optional, picklist, record, s, string, union, voidType };
@@ -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-Dko5QFWF.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-WxTq6kqb.mjs";
2
2
  export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };
@@ -1,6 +1,6 @@
1
1
  import { createEventEmitter } from "./events.mjs";
2
2
  import { nanoid } from "./nanoid.mjs";
3
- //#region src/utils/streaming-channel.ts
3
+ // src/utils/streaming-channel.ts
4
4
  const DEFAULT_HIGH_WATER_MARK = 256;
5
5
  var StreamClosedError = class extends Error {
6
6
  name = "StreamClosedError";
@@ -254,5 +254,4 @@ function toErrorPayload(reason) {
254
254
  };
255
255
  }
256
256
  }
257
- //#endregion
258
257
  export { createStreamReader, createStreamSink };
@@ -1,4 +1,3 @@
1
- //#region src/utils/structured-clone.d.ts
2
1
  /**
3
2
  * Serialize a structured-cloneable value (`Map`, `Set`, `Date`, `BigInt`,
4
3
  * cycles, class instances, …) into a JSON-safe records array.
@@ -16,5 +15,4 @@ export declare function structuredCloneStringify(value: unknown): string;
16
15
  /**
17
16
  * Inverse of {@link structuredCloneStringify}.
18
17
  */
19
- export declare function structuredCloneParse<T = unknown>(value: string): T;
20
- //#endregion
18
+ export declare function structuredCloneParse<T = unknown>(value: string): T;
@@ -1,2 +1 @@
1
- import { i as structuredCloneStringify, n as structuredCloneParse, r as structuredCloneSerialize, t as structuredCloneDeserialize } from "../structured-clone-CgtQ61SA.mjs";
2
- export { structuredCloneDeserialize, structuredCloneParse, structuredCloneSerialize, structuredCloneStringify };
1
+ export { t as structuredCloneDeserialize, n as structuredCloneParse, r as structuredCloneSerialize, i as structuredCloneStringify } from "../structured-clone-D1dOCZvc.mjs";
@@ -1,4 +1,3 @@
1
- //#region src/utils/url.d.ts
2
1
  /**
3
2
  * URL path-joining and slash-normalization helpers shared by the adapters,
4
3
  * the RPC clients, and the hub's mount-path plumbing. In-house replacements
@@ -27,5 +26,4 @@ export declare function joinURL(base: string, ...segments: string[]): string;
27
26
  */
28
27
  export declare function withBase(input: string, base: string): string;
29
28
  /** Replaces (or adds) the protocol of `input`: `withProtocol(url, 'ws://')`. */
30
- export declare function withProtocol(input: string, protocol: string): string;
31
- //#endregion
29
+ export declare function withProtocol(input: string, protocol: string): string;
@@ -1,4 +1,4 @@
1
- //#region src/utils/url.ts
1
+ // src/utils/url.ts
2
2
  /**
3
3
  * URL path-joining and slash-normalization helpers shared by the adapters,
4
4
  * the RPC clients, and the hub's mount-path plumbing. In-house replacements
@@ -54,5 +54,4 @@ function withProtocol(input, protocol) {
54
54
  const match = input.match(PROTOCOL_RE);
55
55
  return protocol + (match ? input.slice(match[0].length) : input);
56
56
  }
57
- //#endregion
58
57
  export { cleanDoubleSlashes, joinURL, withBase, withLeadingSlash, withProtocol, withTrailingSlash, withoutLeadingSlash, withoutTrailingSlash };
@@ -1,5 +1,4 @@
1
1
  import { WhenExpression as WhenExpression$1 } from "whenexpr";
2
- //#region src/utils/when.d.ts
3
2
  /**
4
3
  * Context object for evaluating `when` expressions.
5
4
  *
@@ -50,5 +49,4 @@ export declare function evaluateWhen<T extends object, const E extends string>(e
50
49
  * Resolve a context value by key. Supports namespaced keys with `.` or `:`
51
50
  * separators. Returns `undefined` for unknown keys.
52
51
  */
53
- export declare function resolveContextValue<T extends Record<string, unknown>>(key: string, context: T): unknown;
54
- //#endregion
52
+ export declare function resolveContextValue<T extends Record<string, unknown>>(key: string, context: T): unknown;
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/whenexpr@0.1.2/node_modules/whenexpr/dist/index.mjs
1
+ // ../../node_modules/.pnpm/whenexpr@0.1.2/node_modules/whenexpr/dist/index.mjs
2
2
  const OPS = [
3
3
  "===",
4
4
  "!==",
@@ -420,8 +420,7 @@ function resolve(key, ctx) {
420
420
  value: void 0
421
421
  };
422
422
  }
423
- //#endregion
424
- //#region src/utils/when.ts
423
+ // src/utils/when.ts
425
424
  /**
426
425
  * Evaluate a when-clause expression string against a context object.
427
426
  *
@@ -438,5 +437,4 @@ function evaluateWhen(expression, context, options) {
438
437
  function resolveContextValue(key, context) {
439
438
  return resolveContextValue$1(key, context);
440
439
  }
441
- //#endregion
442
440
  export { evaluateWhen, resolveContextValue };
@@ -1,6 +1,6 @@
1
- import { r as diagnostics } from "./serialization-BhuOoL80.mjs";
1
+ import { r as diagnostics } from "./serialization-iiTQ7n21.mjs";
2
2
  import { createHash } from "node:crypto";
3
- //#region ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/_chunks/is-equal.mjs
3
+ // ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/_chunks/is-equal.mjs
4
4
  function serialize(input) {
5
5
  if (typeof input === "string") return `'${input}'`;
6
6
  return new Serializer().serialize(input);
@@ -147,8 +147,7 @@ const Serializer = /*@__PURE__*/ (function() {
147
147
  };
148
148
  return Serializer;
149
149
  })();
150
- //#endregion
151
- //#region ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/crypto/node/index.mjs
150
+ // ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/crypto/node/index.mjs
152
151
  const fastHash = /*@__PURE__*/ (() => globalThis.process?.getBuiltinModule?.("crypto")?.hash)();
153
152
  const algorithm = "sha256";
154
153
  const encoding = "base64url";
@@ -157,21 +156,18 @@ function digest(data) {
157
156
  const h = createHash(algorithm).update(data);
158
157
  return globalThis.process?.versions?.webcontainer ? h.digest().toString(encoding) : h.digest(encoding);
159
158
  }
160
- //#endregion
161
- //#region ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/index.mjs
159
+ // ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/index.mjs
162
160
  function hash$1(input) {
163
161
  return digest(serialize(input));
164
162
  }
165
- //#endregion
166
- //#region src/utils/hash.ts
163
+ // src/utils/hash.ts
167
164
  /**
168
165
  * Stable, deterministic hash of any structured-cloneable value.
169
166
  */
170
167
  function hash(value) {
171
168
  return hash$1(value);
172
169
  }
173
- //#endregion
174
- //#region src/rpc/agent-json-serialization.ts
170
+ // src/rpc/agent-json-serialization.ts
175
171
  /**
176
172
  * Prevents using a coding-agent-exposed RPC function that is explicitly
177
173
  * marked as non-serializable, and marks these functions as serializable by
@@ -183,8 +179,7 @@ function ensureAgentJsonSerializable(fnDef) {
183
179
  if (fnDef.agent && fnDef.jsonSerializable === false) throw diagnostics.DF0019({ name: fnDef.name });
184
180
  if (fnDef.agent && !fnDef.jsonSerializable) fnDef.jsonSerializable = true;
185
181
  }
186
- //#endregion
187
- //#region src/rpc/validation.ts
182
+ // src/rpc/validation.ts
188
183
  /**
189
184
  * Validates RPC function definitions.
190
185
  * Action and event functions cannot have dumps (side effects should not be cached).
@@ -212,5 +207,4 @@ function validateDefinitions(definitions) {
212
207
  function validateDefinition(definition) {
213
208
  validateDefinitions([definition]);
214
209
  }
215
- //#endregion
216
210
  export { hash as i, validateDefinitions as n, ensureAgentJsonSerializable as r, validateDefinition as t };
@@ -1,6 +1,6 @@
1
- import { n as strictJsonStringify } from "./serialization-BhuOoL80.mjs";
2
- import { n as structuredCloneStringify, t as structuredCloneParse } from "./structured-clone-CbAV5rFI.mjs";
3
- //#region src/rpc/wire-codec.ts
1
+ import { n as structuredCloneStringify, t as structuredCloneParse } from "./structured-clone-B1N_XQvA.mjs";
2
+ import { n as strictJsonStringify } from "./serialization-iiTQ7n21.mjs";
3
+ // src/rpc/wire-codec.ts
4
4
  const EMPTY_WIRE_DEFS = /* @__PURE__ */ new Map();
5
5
  /**
6
6
  * Build the per-connection wire codec every live transport (WS server, WS
@@ -52,5 +52,4 @@ function peekRpcWireFrame(raw) {
52
52
  return {};
53
53
  }
54
54
  }
55
- //#endregion
56
55
  export { peekRpcWireFrame as n, createRpcWireCodec as t };
@@ -1,11 +1,11 @@
1
- import { i as hash, n as validateDefinitions, r as ensureAgentJsonSerializable } from "./validation-CMfDAti3.mjs";
2
- import { n as strictJsonStringify, r as diagnostics } from "./serialization-BhuOoL80.mjs";
3
- import { t as getRpcHandler } from "./handler-DmaAfpGq.mjs";
1
+ import { i as hash, n as validateDefinitions, r as ensureAgentJsonSerializable } from "./validation-Cjy1P58H.mjs";
2
+ import { n as strictJsonStringify, r as diagnostics } from "./serialization-iiTQ7n21.mjs";
3
+ import { t as getRpcHandler } from "./handler-DkLlj3-B.mjs";
4
4
  import { DEVFRAME_RPC_DUMP_DIRNAME, DEVFRAME_RPC_DUMP_MANIFEST_FILENAME } from "./constants.mjs";
5
- import { n as structuredCloneStringify } from "./structured-clone-CbAV5rFI.mjs";
5
+ import { n as structuredCloneStringify } from "./structured-clone-B1N_XQvA.mjs";
6
6
  import fs from "node:fs/promises";
7
7
  import { dirname, resolve } from "pathe";
8
- //#region ../../node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.js
8
+ // ../../node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.js
9
9
  var Node = class {
10
10
  value;
11
11
  next;
@@ -62,8 +62,7 @@ var Queue = class {
62
62
  while (this.#head) yield this.dequeue();
63
63
  }
64
64
  };
65
- //#endregion
66
- //#region ../../node_modules/.pnpm/p-limit@7.3.3/node_modules/p-limit/index.js
65
+ // ../../node_modules/.pnpm/p-limit@7.3.3/node_modules/p-limit/index.js
67
66
  function pLimit(concurrency) {
68
67
  let rejectOnClear = false;
69
68
  if (typeof concurrency === "object") ({concurrency, rejectOnClear = false} = concurrency);
@@ -141,8 +140,7 @@ function pLimit(concurrency) {
141
140
  function validateConcurrency(concurrency) {
142
141
  if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) throw new TypeError("Expected `concurrency` to be a number from 1 and up");
143
142
  }
144
- //#endregion
145
- //#region src/rpc/dump/error.ts
143
+ // src/rpc/dump/error.ts
146
144
  /**
147
145
  * Normalize a thrown value into a plain object suitable for storage in
148
146
  * a dump record. Preserves `message`, `name`, `cause`, and any own
@@ -192,8 +190,7 @@ function reviveDumpError(stored) {
192
190
  function isPlainErrorShape(value) {
193
191
  return typeof value === "object" && value !== null && typeof value.message === "string" && typeof value.name === "string";
194
192
  }
195
- //#endregion
196
- //#region src/rpc/dump/collect.ts
193
+ // src/rpc/dump/collect.ts
197
194
  function getDumpRecordKey(functionName, args) {
198
195
  return `${functionName}---${hash(args)}`;
199
196
  }
@@ -344,8 +341,7 @@ function createClientFromDump(store, options = {}) {
344
341
  function getDefinitionsWithDumps(definitions) {
345
342
  return definitions.filter((def) => def.dump !== void 0);
346
343
  }
347
- //#endregion
348
- //#region src/rpc/dump/static.ts
344
+ // src/rpc/dump/static.ts
349
345
  function makeDumpKey(name) {
350
346
  return encodeURIComponent(name.replaceAll(":", "~"));
351
347
  }
@@ -429,8 +425,7 @@ async function collectStaticRpcDump(definitions, context) {
429
425
  files
430
426
  };
431
427
  }
432
- //#endregion
433
- //#region src/rpc/dump/write.ts
428
+ // src/rpc/dump/write.ts
434
429
  /**
435
430
  * Write a collected static RPC dump to disk: every sharded record file plus
436
431
  * the `__rpc-dump/index.json` manifest, under `outDir`. Shared by the build
@@ -447,5 +442,4 @@ async function writeStaticRpcDump(dump, outDir, options = {}) {
447
442
  }
448
443
  await fs.writeFile(resolve(outDir, DEVFRAME_RPC_DUMP_MANIFEST_FILENAME), JSON.stringify(dump.manifest, null, 2), "utf-8");
449
444
  }
450
- //#endregion
451
445
  export { getDefinitionsWithDumps as a, dumpFunctions as i, collectStaticRpcDump as n, reviveDumpError as o, createClientFromDump as r, serializeDumpError as s, writeStaticRpcDump as t };
@@ -1,6 +1,5 @@
1
- import { a as ChannelOptions } from "./index-Bia1vKjL.mjs";
2
- import { g as RpcFunctionDefinitionAny } from "./types-BmDbfHCx.mjs";
3
- //#region src/rpc/transports/ws-client.d.ts
1
+ import { a as ChannelOptions } from "./index-BKu9BxcT.mjs";
2
+ import { g as RpcFunctionDefinitionAny } from "./types-844OBepb.mjs";
4
3
  interface WsRpcChannelOptions {
5
4
  url: string;
6
5
  onConnected?: (e: Event) => void;
@@ -26,5 +25,4 @@ interface WsRpcChannelOptions {
26
25
  declare function createWsRpcChannel(options: WsRpcChannelOptions): ChannelOptions & {
27
26
  close: () => void;
28
27
  };
29
- //#endregion
30
28
  export { createWsRpcChannel as n, WsRpcChannelOptions as t };
@@ -1,6 +1,6 @@
1
- import { a as ChannelOptions, n as BirpcGroup } from "./index-Bia1vKjL.mjs";
2
- import { g as RpcFunctionDefinitionAny } from "./types-BmDbfHCx.mjs";
3
- import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "./session-r6PDixP6.mjs";
1
+ import { a as ChannelOptions, n as BirpcGroup } from "./index-BKu9BxcT.mjs";
2
+ import { g as RpcFunctionDefinitionAny } from "./types-844OBepb.mjs";
3
+ import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "./session-Y9R6tqg4.mjs";
4
4
  import { Hooks } from "crossws";
5
5
  import { NodeAdapter } from "crossws/adapters/node";
6
6
  import { Buffer } from "node:buffer";
@@ -8,7 +8,6 @@ import { IncomingMessage, Server } from "node:http";
8
8
  import { Server as Server$1, ServerOptions } from "node:https";
9
9
  import { AddressInfo } from "node:net";
10
10
  import { Duplex } from "node:stream";
11
- //#region src/rpc/transports/ws-server.d.ts
12
11
  interface WsRpcTransportOptions {
13
12
  /**
14
13
  * Attach to an existing HTTP(S) server, sharing its port. Combine with
@@ -148,5 +147,4 @@ declare function createWsRpcPeerHooks<ClientFunctions extends object, ServerFunc
148
147
  * and `close` (full deterministic teardown).
149
148
  */
150
149
  declare function attachWsRpcTransport<ClientFunctions extends object, ServerFunctions extends object>(rpcGroup: BirpcGroup<ClientFunctions, ServerFunctions, false>, options?: WsRpcTransportOptions): WsRpcTransport;
151
- //#endregion
152
150
  export { attachWsRpcTransport as a, WsRpcTransportOptions as i, WsOriginRegistry as n, createWsOriginRegistry as o, WsRpcTransport as r, createWsRpcPeerHooks as s, CreateWsOriginRegistryOptions as t };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "devframe",
3
3
  "type": "module",
4
- "version": "1.3.0",
4
+ "version": "1.3.2",
5
5
  "description": "Framework for building one portable devtool integration that runs in any viewer.",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -77,7 +77,7 @@
77
77
  "skills"
78
78
  ],
79
79
  "peerDependencies": {
80
- "@devframes/agentic": "1.3.0",
80
+ "@devframes/agentic": "1.3.2",
81
81
  "cac": "^7.0.0"
82
82
  },
83
83
  "peerDependenciesMeta": {
@@ -89,18 +89,18 @@
89
89
  }
90
90
  },
91
91
  "dependencies": {
92
- "crossws": "^0.4.15",
93
- "h3": "^2.0.7",
92
+ "crossws": "^0.4.17",
93
+ "h3": "^2.0.8",
94
94
  "nostics": "^1.3.0",
95
95
  "pathe": "^2.0.3"
96
96
  },
97
97
  "devDependencies": {
98
- "@devframes/agentic": "1.3.0",
98
+ "@devframes/agentic": "1.3.2",
99
99
  "@standard-schema/spec": "^1.1.0",
100
100
  "birpc": "^4.2.0",
101
101
  "cac": "^7.1.0",
102
102
  "get-port-please": "^3.2.0",
103
- "immer": "^11.2.3",
103
+ "immer": "^11.2.9",
104
104
  "launch-editor": "^2.14.2",
105
105
  "mlly": "^1.8.2",
106
106
  "mrmime": "^2.0.1",
@@ -110,12 +110,12 @@
110
110
  "perfect-debounce": "^2.1.0",
111
111
  "structured-clone-es": "^2.0.1",
112
112
  "tinyglobby": "^0.2.17",
113
- "tsdown": "0.23.0",
113
+ "tsdown": "^0.23.4",
114
114
  "typescript": "^6.0.3",
115
115
  "ua-parser-modern": "^0.1.1",
116
116
  "valibot": "^1.5.0",
117
117
  "whenexpr": "^0.1.2",
118
- "ws": "^8.22.0"
118
+ "ws": "^8.22.1"
119
119
  },
120
120
  "scripts": {
121
121
  "build": "tsdown",