devframe 0.1.21 → 0.2.0

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 (92) hide show
  1. package/README.md +40 -18
  2. package/dist/{_shared-iZy45oG3.mjs → _shared-BrKv3CYt.mjs} +5 -5
  3. package/dist/adapters/build.d.mts +5 -5
  4. package/dist/adapters/build.mjs +13 -12
  5. package/dist/adapters/cli.d.mts +4 -4
  6. package/dist/adapters/cli.mjs +5 -5
  7. package/dist/adapters/dev.d.mts +21 -12
  8. package/dist/adapters/dev.mjs +1 -1
  9. package/dist/adapters/embedded.d.mts +5 -5
  10. package/dist/adapters/embedded.mjs +2 -2
  11. package/dist/adapters/mcp.d.mts +3 -3
  12. package/dist/adapters/mcp.mjs +5 -5
  13. package/dist/chunk-e9Ob2GDo.mjs +26 -0
  14. package/dist/client/index.d.mts +8 -5
  15. package/dist/client/index.mjs +12 -12
  16. package/dist/colors-DS7k8ljB.mjs +123 -0
  17. package/dist/{context-BJ4r2SmR.mjs → context-BBi2IQDm.mjs} +19 -37
  18. package/dist/{context-internal-saIAfNVw.d.mts → context-DRa0wGsC.d.mts} +2 -2
  19. package/dist/{dev-CdAy400a.mjs → dev-CewNNE2R.mjs} +24 -28
  20. package/dist/{devtool-CNvLs2_Y.d.mts → devframe-R5Ex5K5L.d.mts} +41 -66
  21. package/dist/{diagnostics-DxPnRoXO.mjs → diagnostics-Cg9ycFIM.mjs} +7 -2
  22. package/dist/hash-CIBte1yS.mjs +263 -0
  23. package/dist/helpers/vite.d.mts +65 -0
  24. package/dist/helpers/vite.mjs +94 -0
  25. package/dist/{human-id-BLoGo_e5.mjs → human-id-adtUWQLr.mjs} +12 -3
  26. package/dist/{index-CuLRIMto.d.mts → index-DB2Ie0Or.d.mts} +2 -3
  27. package/dist/index.d.mts +4 -5
  28. package/dist/index.mjs +2 -5
  29. package/dist/launch-editor-CX_n_0SS.mjs +581 -0
  30. package/dist/node/auth.d.mts +44 -0
  31. package/dist/node/auth.mjs +55 -0
  32. package/dist/node/index.d.mts +13 -55
  33. package/dist/node/index.mjs +6 -62
  34. package/dist/node/internal.d.mts +16 -0
  35. package/dist/node/internal.mjs +50 -0
  36. package/dist/{open-Dede_w9r.mjs → open-B2ah1IKK.mjs} +38 -24
  37. package/dist/recipes/open-helpers.d.mts +4 -9
  38. package/dist/recipes/open-helpers.mjs +7 -12
  39. package/dist/revoke-DIMz1r7-.mjs +35 -0
  40. package/dist/rpc/index.d.mts +3 -3
  41. package/dist/rpc/index.mjs +4 -4
  42. package/dist/rpc/transports/ws-client.d.mts +1 -1
  43. package/dist/rpc/transports/ws-client.mjs +2 -1
  44. package/dist/rpc/transports/ws-server.d.mts +1 -1
  45. package/dist/rpc/transports/ws-server.mjs +2 -1
  46. package/dist/{rpc-INbWfHoX.mjs → rpc-DAzoVCR0.mjs} +5 -4
  47. package/dist/{serialization-DwKi05Pn.mjs → serialization-CwO31axa.mjs} +1 -2
  48. package/dist/{server-CBsxXIH5.mjs → server-DOk4grlJ.mjs} +4 -4
  49. package/dist/{server-BAqOajx_.d.mts → server-DzKz023G.d.mts} +8 -7
  50. package/dist/shared-state-q9-1EOSX.mjs +928 -0
  51. package/dist/{static-dump-D5VH8Iqk.mjs → static-dump-C67bCuse.mjs} +1 -1
  52. package/dist/{context-internal-Dx_NoSv1.mjs → storage-CNvfBGQ5.mjs} +5 -87
  53. package/dist/structured-clone-CD2l4fI3.mjs +221 -0
  54. package/dist/types/index.d.mts +4 -4
  55. package/dist/types/index.mjs +3 -3
  56. package/dist/utils/colors.d.mts +28 -0
  57. package/dist/utils/colors.mjs +2 -0
  58. package/dist/utils/events.d.mts +1 -1
  59. package/dist/utils/hash.d.mts +7 -0
  60. package/dist/utils/hash.mjs +2 -0
  61. package/dist/utils/human-id.d.mts +6 -8
  62. package/dist/utils/human-id.mjs +1 -2
  63. package/dist/utils/launch-editor.d.mts +13 -0
  64. package/dist/utils/launch-editor.mjs +2 -0
  65. package/dist/utils/open.d.mts +16 -0
  66. package/dist/utils/open.mjs +2 -0
  67. package/dist/utils/serve-static.d.mts +40 -0
  68. package/dist/utils/serve-static.mjs +173 -0
  69. package/dist/utils/shared-state.d.mts +1 -1
  70. package/dist/utils/shared-state.mjs +1 -35
  71. package/dist/utils/streaming-channel.d.mts +1 -1
  72. package/dist/utils/structured-clone.d.mts +21 -0
  73. package/dist/utils/structured-clone.mjs +2 -0
  74. package/dist/utils/when.d.mts +33 -50
  75. package/dist/utils/when.mjs +21 -3
  76. package/dist/{ws-client-CjPuPFbA.d.mts → ws-client-Bavoya6-.d.mts} +1 -1
  77. package/dist/{ws-server-C7LnhOHi.d.mts → ws-server-DjvlwLuM.d.mts} +1 -1
  78. package/package.json +38 -18
  79. package/skills/devframe/SKILL.md +64 -39
  80. package/skills/devframe/templates/{counter-devtool.ts → counter-devframe.ts} +4 -4
  81. package/skills/devframe/templates/{spa-devtool.ts → spa-devframe.ts} +5 -5
  82. package/skills/devframe/templates/vite-client.ts +2 -2
  83. package/dist/adapters/vite.d.mts +0 -33
  84. package/dist/adapters/vite.mjs +0 -32
  85. package/dist/internal/index.d.mts +0 -16
  86. package/dist/internal/index.mjs +0 -3
  87. package/dist/utils/state.d.mts +0 -50
  88. package/dist/utils/state.mjs +0 -26
  89. package/dist/{define-Bb4zh-Dc.mjs → define-CW9gLnyG.mjs} +0 -0
  90. package/dist/{host-h3-9jeHcltx.mjs → host-h3-Dz8YnFgu.mjs} +1 -1
  91. /package/dist/{transports-DSV5_5QM.mjs → transports-BnCs4rj9.mjs} +0 -0
  92. /package/dist/{types-C5OVe4AC.d.mts → types-4rdUEi2R.d.mts} +0 -0
@@ -1,53 +1,12 @@
1
- import { $ as AgentHandle, P as SharedState, Q as DevToolsDiagnosticsLogger, U as DevToolsRpcClientFunctions, W as DevToolsRpcServerFunctions, Y as DevToolsHost, Z as DevToolsDiagnosticsHost$1, at as AgentToolInput, ct as EventEmitter, d as DevToolsNodeContext, et as AgentManifest, f as DevToolsNodeRpcSession, g as RpcSharedStateHost, it as AgentTool, m as RpcFunctionsHost$1, nt as AgentResourceContent, ot as DevToolsAgentHost$1, p as RpcBroadcastOptions, rt as AgentResourceInput, st as DevToolsAgentHostEvents, tt as AgentResource, y as RpcStreamingHost, z as DevToolsViewHost$1 } from "../devtool-CNvLs2_Y.mjs";
2
- import { g as RpcFunctionsCollectorBase } from "../index-CuLRIMto.mjs";
3
- import { g as RpcFunctionDefinitionAny } from "../types-C5OVe4AC.mjs";
4
- import { t as DevToolsNodeRpcSessionMeta } from "../ws-server-C7LnhOHi.mjs";
5
- import { n as StartedServer, r as startHttpAndWs, t as StartHttpAndWsOptions } from "../server-BAqOajx_.mjs";
6
- import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevToolsInternalContext } from "../context-internal-saIAfNVw.mjs";
1
+ import { $ as AgentResourceContent, J as DevToolsDiagnosticsHost$1, K as DevToolsHost, P as SharedState, Q as AgentResource, U as DevToolsRpcClientFunctions, W as DevToolsRpcServerFunctions, X as AgentHandle, Y as DevToolsDiagnosticsLogger, Z as AgentManifest, at as EventEmitter, d as DevToolsNodeContext, et as AgentResourceInput, f as DevToolsNodeRpcSession, g as RpcSharedStateHost, it as DevToolsAgentHostEvents, m as RpcFunctionsHost$1, nt as AgentToolInput, p as RpcBroadcastOptions, rt as DevToolsAgentHost$1, tt as AgentTool, y as RpcStreamingHost, z as DevToolsViewHost$1 } from "../devframe-R5Ex5K5L.mjs";
2
+ import { f as RpcFunctionsCollectorBase } from "../index-DB2Ie0Or.mjs";
3
+ import { g as RpcFunctionDefinitionAny } from "../types-4rdUEi2R.mjs";
4
+ import { t as DevToolsNodeRpcSessionMeta } from "../ws-server-DjvlwLuM.mjs";
5
+ import { n as StartedServer, r as startHttpAndWs, t as StartHttpAndWsOptions } from "../server-DzKz023G.mjs";
7
6
  import { createLogger, defineDiagnostics } from "logs-sdk";
8
7
  import { BirpcGroup } from "birpc";
9
8
  import { AsyncLocalStorage } from "node:async_hooks";
10
9
 
11
- //#region src/node/auth-revoke.d.ts
12
- /**
13
- * Flip `isTrusted` to false on any live WS clients connected with `token`
14
- * and broadcast the `auth:revoked` event so they can react.
15
- *
16
- * Shared between persisted-auth revocation and remote-dock token revocation.
17
- */
18
- declare function revokeActiveConnectionsForToken(context: DevToolsNodeContext, token: string): Promise<void>;
19
- /**
20
- * Revoke an auth token: remove from storage and notify all connected clients
21
- * using this token that they are no longer trusted.
22
- */
23
- declare function revokeAuthToken(context: DevToolsNodeContext, storage: SharedState<InternalAnonymousAuthStorage>, token: string): Promise<void>;
24
- //#endregion
25
- //#region src/node/auth-state.d.ts
26
- interface PendingAuthRequest {
27
- clientAuthToken: string;
28
- session: DevToolsNodeRpcSession;
29
- ua: string;
30
- origin: string;
31
- resolve: (result: {
32
- isTrusted: boolean;
33
- }) => void;
34
- abortController: AbortController;
35
- timeout: ReturnType<typeof setTimeout>;
36
- }
37
- declare function getTempAuthToken(): string;
38
- declare function refreshTempAuthToken(): string;
39
- declare function getPendingAuth(): PendingAuthRequest | null;
40
- declare function setPendingAuth(request: PendingAuthRequest | null): void;
41
- /**
42
- * Abort and clean up any existing pending auth request.
43
- */
44
- declare function abortPendingAuth(): void;
45
- /**
46
- * Consume the temp auth ID: verify it matches, trust the pending client, and clean up.
47
- * Returns the client's authToken if successful, null otherwise.
48
- */
49
- declare function consumeTempAuthToken(id: string, storage: SharedState<InternalAnonymousAuthStorage>): string | null;
50
- //#endregion
51
10
  //#region src/node/context.d.ts
52
11
  interface CreateHostContextOptions {
53
12
  cwd: string;
@@ -62,20 +21,19 @@ interface CreateHostContextOptions {
62
21
  builtinRpcDeclarations?: readonly RpcFunctionDefinitionAny[];
63
22
  }
64
23
  /**
65
- * Framework-neutral core of the DevTools node context. Wires the RPC
66
- * host, view (HTTP file-serving) host, diagnostics, and agent
67
- * subsystems plus the JSON-render factory. Hub-level subsystems
68
- * (`docks`, `terminals`, `messages`, `commands`) are owned by
69
- * `@vitejs/devtools-kit` its `createKitContext` wraps this and
70
- * attaches them when the devtool is mounted into a multi-integration
71
- * hub.
24
+ * Framework- and build-tool-agnostic core of the DevTools node context.
25
+ * Wires the RPC host, view (HTTP file-serving) host, diagnostics, and
26
+ * agent subsystems. Host adapters can wrap this to augment `ctx` with
27
+ * extra surfaces for example, `@vitejs/devtools-kit`'s
28
+ * `createKitContext` attaches `docks`, `terminals`, `messages`,
29
+ * `commands`, and `createJsonRenderer` when mounted into Vite DevTools.
72
30
  */
73
31
  declare function createHostContext(options: CreateHostContextOptions): Promise<DevToolsNodeContext>;
74
32
  //#endregion
75
33
  //#region src/node/host-agent.d.ts
76
34
  /**
77
35
  * Framework-neutral host aggregating the agent-exposed surface of a
78
- * devtool. Auto-discovers RPC functions with an `agent` field from
36
+ * devframe. Auto-discovers RPC functions with an `agent` field from
79
37
  * `ctx.rpc.definitions`, and accepts plugin-registered tools /
80
38
  * resources via `registerTool` / `registerResource`.
81
39
  *
@@ -246,4 +204,4 @@ declare function createStorage<T extends object>(options: CreateStorageOptions<T
246
204
  declare function isObject(value: unknown): value is Record<string, any>;
247
205
  declare function normalizeHttpServerUrl(host: string, port: number | string): string;
248
206
  //#endregion
249
- export { CreateH3DevToolsHostOptions, CreateHostContextOptions, CreateStorageOptions, DevToolsAgentHost, DevToolsDiagnosticsHost, DevToolsInternalContext, DevToolsViewHost, InternalAnonymousAuthStorage, PendingAuthRequest, RemoteTokenRecord, RpcFunctionsHost, StartHttpAndWsOptions, StartedServer, StaticRpcDumpCollection, StaticRpcDumpFile, StaticRpcDumpManifest, StaticRpcDumpManifestQueryEntry, StaticRpcDumpManifestStaticEntry, StaticRpcDumpManifestValue, StaticRpcDumpSerialization, abortPendingAuth, collectStaticRpcDump, consumeTempAuthToken, createH3DevToolsHost, createHostContext, createRpcSharedStateServerHost, createRpcStreamingServerHost, createStorage, getInternalContext, getPendingAuth, getTempAuthToken, internalContextMap, isObject, normalizeHttpServerUrl, refreshTempAuthToken, revokeActiveConnectionsForToken, revokeAuthToken, setPendingAuth, startHttpAndWs };
207
+ export { CreateH3DevToolsHostOptions, CreateHostContextOptions, CreateStorageOptions, DevToolsAgentHost, DevToolsDiagnosticsHost, DevToolsViewHost, RpcFunctionsHost, StartHttpAndWsOptions, StartedServer, StaticRpcDumpCollection, StaticRpcDumpFile, StaticRpcDumpManifest, StaticRpcDumpManifestQueryEntry, StaticRpcDumpManifestStaticEntry, StaticRpcDumpManifestValue, StaticRpcDumpSerialization, collectStaticRpcDump, createH3DevToolsHost, createHostContext, createRpcSharedStateServerHost, createRpcStreamingServerHost, createStorage, isObject, normalizeHttpServerUrl, startHttpAndWs };
@@ -1,65 +1,9 @@
1
- import { t as import_dist } from "../human-id-BLoGo_e5.mjs";
2
- import { a as revokeAuthToken, i as revokeActiveConnectionsForToken, n as internalContextMap, r as createStorage, t as getInternalContext } from "../context-internal-Dx_NoSv1.mjs";
3
- import { a as createRpcSharedStateServerHost, i as createRpcStreamingServerHost, n as DevToolsViewHost, o as DevToolsDiagnosticsHost, r as RpcFunctionsHost, s as DevToolsAgentHost, t as createHostContext } from "../context-BJ4r2SmR.mjs";
4
- import { t as createH3DevToolsHost } from "../host-h3-9jeHcltx.mjs";
5
- import { t as startHttpAndWs } from "../server-CBsxXIH5.mjs";
6
- import { t as collectStaticRpcDump } from "../static-dump-D5VH8Iqk.mjs";
1
+ import { a as createRpcSharedStateServerHost, i as createRpcStreamingServerHost, n as DevToolsViewHost, o as DevToolsDiagnosticsHost, r as RpcFunctionsHost, s as DevToolsAgentHost, t as createHostContext } from "../context-BBi2IQDm.mjs";
2
+ import { t as createH3DevToolsHost } from "../host-h3-Dz8YnFgu.mjs";
3
+ import { t as startHttpAndWs } from "../server-DOk4grlJ.mjs";
4
+ import { t as collectStaticRpcDump } from "../static-dump-C67bCuse.mjs";
5
+ import { t as createStorage } from "../storage-CNvfBGQ5.mjs";
7
6
  import { isIP } from "node:net";
8
- //#region src/node/auth-state.ts
9
- let pendingAuth = null;
10
- let tempAuthToken = generateTempId();
11
- function generateTempId() {
12
- return (0, import_dist.humanId)({
13
- separator: "-",
14
- capitalize: false
15
- });
16
- }
17
- function getTempAuthToken() {
18
- return tempAuthToken;
19
- }
20
- function refreshTempAuthToken() {
21
- tempAuthToken = generateTempId();
22
- return tempAuthToken;
23
- }
24
- function getPendingAuth() {
25
- return pendingAuth;
26
- }
27
- function setPendingAuth(request) {
28
- pendingAuth = request;
29
- }
30
- /**
31
- * Abort and clean up any existing pending auth request.
32
- */
33
- function abortPendingAuth() {
34
- if (pendingAuth) {
35
- pendingAuth.abortController.abort();
36
- clearTimeout(pendingAuth.timeout);
37
- pendingAuth = null;
38
- }
39
- }
40
- /**
41
- * Consume the temp auth ID: verify it matches, trust the pending client, and clean up.
42
- * Returns the client's authToken if successful, null otherwise.
43
- */
44
- function consumeTempAuthToken(id, storage) {
45
- if (id !== tempAuthToken || !pendingAuth) return null;
46
- const { clientAuthToken, session, ua, origin, resolve } = pendingAuth;
47
- storage.mutate((state) => {
48
- state.trusted[clientAuthToken] = {
49
- authToken: clientAuthToken,
50
- ua,
51
- origin,
52
- timestamp: Date.now()
53
- };
54
- });
55
- session.meta.clientAuthToken = clientAuthToken;
56
- session.meta.isTrusted = true;
57
- resolve({ isTrusted: true });
58
- abortPendingAuth();
59
- refreshTempAuthToken();
60
- return clientAuthToken;
61
- }
62
- //#endregion
63
7
  //#region src/node/utils.ts
64
8
  function isObject(value) {
65
9
  return Object.prototype.toString.call(value) === "[object Object]";
@@ -68,4 +12,4 @@ function normalizeHttpServerUrl(host, port) {
68
12
  return `http://${host === "127.0.0.1" ? "localhost" : isIP(host) === 6 ? `[${host}]` : host}:${port}`;
69
13
  }
70
14
  //#endregion
71
- export { DevToolsAgentHost, DevToolsDiagnosticsHost, DevToolsViewHost, RpcFunctionsHost, abortPendingAuth, collectStaticRpcDump, consumeTempAuthToken, createH3DevToolsHost, createHostContext, createRpcSharedStateServerHost, createRpcStreamingServerHost, createStorage, getInternalContext, getPendingAuth, getTempAuthToken, internalContextMap, isObject, normalizeHttpServerUrl, refreshTempAuthToken, revokeActiveConnectionsForToken, revokeAuthToken, setPendingAuth, startHttpAndWs };
15
+ export { DevToolsAgentHost, DevToolsDiagnosticsHost, DevToolsViewHost, RpcFunctionsHost, collectStaticRpcDump, createH3DevToolsHost, createHostContext, createRpcSharedStateServerHost, createRpcStreamingServerHost, createStorage, isObject, normalizeHttpServerUrl, startHttpAndWs };
@@ -0,0 +1,16 @@
1
+ import { i as DevframeDeploymentKind, r as DevframeDefinition } from "../devframe-R5Ex5K5L.mjs";
2
+ import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevToolsInternalContext } from "../context-DRa0wGsC.mjs";
3
+
4
+ //#region src/adapters/_shared.d.ts
5
+ /**
6
+ * Resolve the mount base path for a devframe's SPA. Hosted adapters
7
+ * (`vite`, `embedded`) default to `/__<id>/` so they don't collide
8
+ * with the host app; standalone adapters (`cli`, `spa`, `build`)
9
+ * default to `/` because they own the origin.
10
+ *
11
+ * The devframe author can override with `basePath` on the definition.
12
+ */
13
+ declare function resolveBasePath(def: DevframeDefinition, kind: DevframeDeploymentKind): string;
14
+ declare function normalizeBasePath(base: string): string;
15
+ //#endregion
16
+ export { type DevToolsInternalContext, type InternalAnonymousAuthStorage, type RemoteTokenRecord, getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
@@ -0,0 +1,50 @@
1
+ import { t as createStorage } from "../storage-CNvfBGQ5.mjs";
2
+ import { n as revokeAuthToken, t as revokeActiveConnectionsForToken } from "../revoke-DIMz1r7-.mjs";
3
+ import { t as humanId } from "../human-id-adtUWQLr.mjs";
4
+ import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-BrKv3CYt.mjs";
5
+ import { join } from "pathe";
6
+ //#region src/node/internal/context.ts
7
+ const internalContextMap = /* @__PURE__ */ new WeakMap();
8
+ function getInternalContext(context) {
9
+ if (!internalContextMap.has(context)) {
10
+ const storage = createStorage({
11
+ filepath: join(context.host.getStorageDir("global"), "auth.json"),
12
+ initialValue: { trusted: {} }
13
+ });
14
+ const remoteTokens = /* @__PURE__ */ new Map();
15
+ function revokeRemoteToken(token) {
16
+ if (!remoteTokens.delete(token)) return;
17
+ revokeActiveConnectionsForToken(context, token);
18
+ }
19
+ const internalContext = {
20
+ storage: { auth: storage },
21
+ revokeAuthToken: (token) => revokeAuthToken(context, storage, token),
22
+ remoteTokens,
23
+ allocateRemoteToken(dockId, origin, originLock) {
24
+ const token = humanId();
25
+ remoteTokens.set(token, {
26
+ dockId,
27
+ origin,
28
+ originLock
29
+ });
30
+ return token;
31
+ },
32
+ revokeRemoteToken,
33
+ revokeRemoteTokensForDock(dockId) {
34
+ const tokensToRevoke = [];
35
+ for (const [token, record] of remoteTokens) if (record.dockId === dockId) tokensToRevoke.push(token);
36
+ for (const token of tokensToRevoke) revokeRemoteToken(token);
37
+ },
38
+ isRemoteTokenTrusted(token, requestOrigin) {
39
+ const record = remoteTokens.get(token);
40
+ if (!record) return false;
41
+ if (!record.originLock) return true;
42
+ return !!requestOrigin && record.origin === requestOrigin;
43
+ }
44
+ };
45
+ internalContextMap.set(context, internalContext);
46
+ }
47
+ return internalContextMap.get(context);
48
+ }
49
+ //#endregion
50
+ export { getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
@@ -2,12 +2,12 @@ import { promisify } from "node:util";
2
2
  import fs from "node:fs";
3
3
  import os from "node:os";
4
4
  import process from "node:process";
5
- import fs$1, { constants } from "node:fs/promises";
6
5
  import path from "node:path";
7
6
  import { fileURLToPath } from "node:url";
8
7
  import childProcess, { execFile } from "node:child_process";
8
+ import fs$1, { constants } from "node:fs/promises";
9
9
  import { Buffer } from "node:buffer";
10
- //#region ../../../node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.js
10
+ //#region ../../node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.js
11
11
  let isDockerCached;
12
12
  function hasDockerEnv() {
13
13
  try {
@@ -29,7 +29,7 @@ function isDocker() {
29
29
  return isDockerCached;
30
30
  }
31
31
  //#endregion
32
- //#region ../../../node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js
32
+ //#region ../../node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js
33
33
  let cachedResult;
34
34
  const hasContainerEnv = () => {
35
35
  try {
@@ -44,7 +44,7 @@ function isInsideContainer() {
44
44
  return cachedResult;
45
45
  }
46
46
  //#endregion
47
- //#region ../../../node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js
47
+ //#region ../../node_modules/.pnpm/is-wsl@3.1.1/node_modules/is-wsl/index.js
48
48
  const isWsl = () => {
49
49
  if (process.platform !== "linux") return false;
50
50
  if (os.release().toLowerCase().includes("microsoft")) {
@@ -52,14 +52,14 @@ const isWsl = () => {
52
52
  return true;
53
53
  }
54
54
  try {
55
- return fs.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
56
- } catch {
57
- return false;
58
- }
55
+ if (fs.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft")) return !isInsideContainer();
56
+ } catch {}
57
+ if (fs.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop") || fs.existsSync("/run/WSL")) return !isInsideContainer();
58
+ return false;
59
59
  };
60
60
  var is_wsl_default = process.env.__IS_WSL_TEST__ ? isWsl : isWsl();
61
61
  //#endregion
62
- //#region ../../../node_modules/.pnpm/powershell-utils@0.1.0/node_modules/powershell-utils/index.js
62
+ //#region ../../node_modules/.pnpm/powershell-utils@0.1.0/node_modules/powershell-utils/index.js
63
63
  const execFile$2 = promisify(childProcess.execFile);
64
64
  const powerShellPath$1 = () => `${process.env.SYSTEMROOT || process.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
65
65
  const executePowerShell = async (command, options = {}) => {
@@ -80,7 +80,7 @@ executePowerShell.argumentsPrefix = [
80
80
  executePowerShell.encodeCommand = (command) => Buffer.from(command, "utf16le").toString("base64");
81
81
  executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
82
82
  //#endregion
83
- //#region ../../../node_modules/.pnpm/wsl-utils@0.3.1/node_modules/wsl-utils/utilities.js
83
+ //#region ../../node_modules/.pnpm/wsl-utils@0.3.1/node_modules/wsl-utils/utilities.js
84
84
  function parseMountPointFromConfig(content) {
85
85
  for (const line of content.split("\n")) {
86
86
  if (/^\s*#/.test(line)) continue;
@@ -90,7 +90,7 @@ function parseMountPointFromConfig(content) {
90
90
  }
91
91
  }
92
92
  //#endregion
93
- //#region ../../../node_modules/.pnpm/wsl-utils@0.3.1/node_modules/wsl-utils/index.js
93
+ //#region ../../node_modules/.pnpm/wsl-utils@0.3.1/node_modules/wsl-utils/index.js
94
94
  const execFile$1 = promisify(childProcess.execFile);
95
95
  const wslDrivesMountPoint = (() => {
96
96
  const defaultMountPoint = "/mnt/";
@@ -143,7 +143,7 @@ const convertWslPathToWindows = async (path) => {
143
143
  }
144
144
  };
145
145
  //#endregion
146
- //#region ../../../node_modules/.pnpm/define-lazy-prop@3.0.0/node_modules/define-lazy-prop/index.js
146
+ //#region ../../node_modules/.pnpm/define-lazy-prop@3.0.0/node_modules/define-lazy-prop/index.js
147
147
  function defineLazyProperty(object, propertyName, valueGetter) {
148
148
  const define = (value) => Object.defineProperty(object, propertyName, {
149
149
  value,
@@ -165,7 +165,7 @@ function defineLazyProperty(object, propertyName, valueGetter) {
165
165
  return object;
166
166
  }
167
167
  //#endregion
168
- //#region ../../../node_modules/.pnpm/default-browser-id@5.0.1/node_modules/default-browser-id/index.js
168
+ //#region ../../node_modules/.pnpm/default-browser-id@5.0.1/node_modules/default-browser-id/index.js
169
169
  const execFileAsync$3 = promisify(execFile);
170
170
  async function defaultBrowserId() {
171
171
  if (process.platform !== "darwin") throw new Error("macOS only");
@@ -179,7 +179,7 @@ async function defaultBrowserId() {
179
179
  return browserId;
180
180
  }
181
181
  //#endregion
182
- //#region ../../../node_modules/.pnpm/run-applescript@7.1.0/node_modules/run-applescript/index.js
182
+ //#region ../../node_modules/.pnpm/run-applescript@7.1.0/node_modules/run-applescript/index.js
183
183
  const execFileAsync$2 = promisify(execFile);
184
184
  async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
185
185
  if (process.platform !== "darwin") throw new Error("macOS only");
@@ -194,12 +194,12 @@ async function runAppleScript(script, { humanReadableOutput = true, signal } = {
194
194
  return stdout.trim();
195
195
  }
196
196
  //#endregion
197
- //#region ../../../node_modules/.pnpm/bundle-name@4.1.0/node_modules/bundle-name/index.js
197
+ //#region ../../node_modules/.pnpm/bundle-name@4.1.0/node_modules/bundle-name/index.js
198
198
  async function bundleName(bundleId) {
199
199
  return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string\ntell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
200
200
  }
201
201
  //#endregion
202
- //#region ../../../node_modules/.pnpm/default-browser@5.4.0/node_modules/default-browser/windows.js
202
+ //#region ../../node_modules/.pnpm/default-browser@5.5.0/node_modules/default-browser/windows.js
203
203
  const execFileAsync$1 = promisify(execFile);
204
204
  const windowsBrowserProgIds = {
205
205
  MSEdgeHTM: {
@@ -279,12 +279,17 @@ async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
279
279
  const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
280
280
  if (!match) throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
281
281
  const { id } = match.groups;
282
- const browser = windowsBrowserProgIds[id];
283
- if (!browser) throw new UnknownBrowserError(`Unknown browser ID: ${id}`);
284
- return browser;
282
+ const dotIndex = id.lastIndexOf(".");
283
+ const hyphenIndex = id.lastIndexOf("-");
284
+ const baseIdByDot = dotIndex === -1 ? void 0 : id.slice(0, dotIndex);
285
+ const baseIdByHyphen = hyphenIndex === -1 ? void 0 : id.slice(0, hyphenIndex);
286
+ return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? {
287
+ name: id,
288
+ id
289
+ };
285
290
  }
286
291
  //#endregion
287
- //#region ../../../node_modules/.pnpm/default-browser@5.4.0/node_modules/default-browser/index.js
292
+ //#region ../../node_modules/.pnpm/default-browser@5.5.0/node_modules/default-browser/index.js
288
293
  const execFileAsync = promisify(execFile);
289
294
  const titleize = (string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase());
290
295
  async function defaultBrowser() {
@@ -311,10 +316,10 @@ async function defaultBrowser() {
311
316
  throw new Error("Only macOS, Linux, and Windows are supported");
312
317
  }
313
318
  //#endregion
314
- //#region ../../../node_modules/.pnpm/is-in-ssh@1.0.0/node_modules/is-in-ssh/index.js
319
+ //#region ../../node_modules/.pnpm/is-in-ssh@1.0.0/node_modules/is-in-ssh/index.js
315
320
  const isInSsh = Boolean(process.env.SSH_CONNECTION || process.env.SSH_CLIENT || process.env.SSH_TTY);
316
321
  //#endregion
317
- //#region ../../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
322
+ //#region ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
318
323
  const fallbackAttemptSymbol = Symbol("fallbackAttempt");
319
324
  const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
320
325
  const localXdgOpenPath = path.join(__dirname, "xdg-open");
@@ -475,7 +480,7 @@ const baseOpen = async (options) => {
475
480
  });
476
481
  });
477
482
  };
478
- const open = (target, options) => {
483
+ const open$1 = (target, options) => {
479
484
  if (typeof target !== "string") throw new TypeError("Expected a `target`");
480
485
  return baseOpen({
481
486
  ...options,
@@ -530,4 +535,13 @@ defineLazyProperty(apps, "edge", () => detectPlatformBinary({
530
535
  }, { wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe" }));
531
536
  defineLazyProperty(apps, "safari", () => detectPlatformBinary({ darwin: "Safari" }));
532
537
  //#endregion
533
- export { open as default };
538
+ //#region src/utils/open.ts
539
+ /**
540
+ * Open a URL, file, or other target in its default OS handler
541
+ * (browser for URLs, Finder/Explorer for paths, etc.).
542
+ */
543
+ async function open(target, options) {
544
+ await open$1(target, options);
545
+ }
546
+ //#endregion
547
+ export { open as t };
@@ -1,17 +1,16 @@
1
- import { b as RpcFunctionSetupResult, m as RpcFunctionAgentOptions, s as RpcDump, w as Thenable } from "../types-C5OVe4AC.mjs";
1
+ import { b as RpcFunctionSetupResult, m as RpcFunctionAgentOptions, s as RpcDump, w as Thenable } from "../types-4rdUEi2R.mjs";
2
2
  import * as v from "valibot";
3
3
 
4
4
  //#region src/recipes/open-helpers.d.ts
5
5
  /**
6
- * Prebuilt RPC action that opens a file in the user's configured editor
7
- * via [`launch-editor`](https://www.npmjs.com/package/launch-editor).
6
+ * Prebuilt RPC action that opens a file in the user's configured editor.
8
7
  *
9
8
  * Registered name: `devframe:open-in-editor`.
10
9
  *
11
10
  * ```ts
12
11
  * import { openInEditor } from 'devframe/recipes/open-helpers'
13
12
  *
14
- * defineDevtool({
13
+ * defineDevframe({
15
14
  * id: 'my-tool',
16
15
  * name: 'My Tool',
17
16
  * setup(ctx) {
@@ -19,9 +18,6 @@ import * as v from "valibot";
19
18
  * },
20
19
  * })
21
20
  * ```
22
- *
23
- * Requires `launch-editor` to be installed by the consumer (declared as
24
- * an optional peer dependency on devframe).
25
21
  */
26
22
  declare const openInEditor: {
27
23
  name: "devframe:open-in-editor";
@@ -39,8 +35,7 @@ declare const openInEditor: {
39
35
  __promise?: Thenable<RpcFunctionSetupResult<[string], void>> | undefined;
40
36
  };
41
37
  /**
42
- * Prebuilt RPC action that reveals a path in the OS file explorer via
43
- * [`open`](https://www.npmjs.com/package/open).
38
+ * Prebuilt RPC action that reveals a path in the OS file explorer.
44
39
  *
45
40
  * Registered name: `devframe:open-in-finder`.
46
41
  *
@@ -1,16 +1,17 @@
1
- import { n as defineRpcFunction } from "../define-Bb4zh-Dc.mjs";
1
+ import { n as defineRpcFunction } from "../define-CW9gLnyG.mjs";
2
+ import { t as launchEditor } from "../launch-editor-CX_n_0SS.mjs";
3
+ import { t as open } from "../open-B2ah1IKK.mjs";
2
4
  import * as v from "valibot";
3
5
  //#region src/recipes/open-helpers.ts
4
6
  /**
5
- * Prebuilt RPC action that opens a file in the user's configured editor
6
- * via [`launch-editor`](https://www.npmjs.com/package/launch-editor).
7
+ * Prebuilt RPC action that opens a file in the user's configured editor.
7
8
  *
8
9
  * Registered name: `devframe:open-in-editor`.
9
10
  *
10
11
  * ```ts
11
12
  * import { openInEditor } from 'devframe/recipes/open-helpers'
12
13
  *
13
- * defineDevtool({
14
+ * defineDevframe({
14
15
  * id: 'my-tool',
15
16
  * name: 'My Tool',
16
17
  * setup(ctx) {
@@ -18,9 +19,6 @@ import * as v from "valibot";
18
19
  * },
19
20
  * })
20
21
  * ```
21
- *
22
- * Requires `launch-editor` to be installed by the consumer (declared as
23
- * an optional peer dependency on devframe).
24
22
  */
25
23
  const openInEditor = defineRpcFunction({
26
24
  name: "devframe:open-in-editor",
@@ -29,13 +27,11 @@ const openInEditor = defineRpcFunction({
29
27
  args: [v.string()],
30
28
  returns: v.void(),
31
29
  async handler(filename) {
32
- const mod = await import("launch-editor");
33
- (mod.default ?? mod)(filename);
30
+ launchEditor(filename);
34
31
  }
35
32
  });
36
33
  /**
37
- * Prebuilt RPC action that reveals a path in the OS file explorer via
38
- * [`open`](https://www.npmjs.com/package/open).
34
+ * Prebuilt RPC action that reveals a path in the OS file explorer.
39
35
  *
40
36
  * Registered name: `devframe:open-in-finder`.
41
37
  *
@@ -52,7 +48,6 @@ const openInFinder = defineRpcFunction({
52
48
  args: [v.string()],
53
49
  returns: v.void(),
54
50
  async handler(path) {
55
- const { default: open } = await import("../open-Dede_w9r.mjs");
56
51
  await open(path);
57
52
  }
58
53
  });
@@ -0,0 +1,35 @@
1
+ //#region src/node/auth/revoke.ts
2
+ /**
3
+ * Flip `isTrusted` to false on any live WS clients connected with `token`
4
+ * and broadcast the `auth:revoked` event so they can react.
5
+ *
6
+ * Shared between persisted-auth revocation and remote-dock token revocation.
7
+ */
8
+ async function revokeActiveConnectionsForToken(context, token) {
9
+ const rpcHost = context.rpc;
10
+ if (!rpcHost?._rpcGroup) return;
11
+ const affectedSessionIds = /* @__PURE__ */ new Set();
12
+ for (const client of rpcHost._rpcGroup.clients) if (client.$meta.clientAuthToken === token) {
13
+ affectedSessionIds.add(client.$meta.id);
14
+ client.$meta.isTrusted = false;
15
+ client.$meta.clientAuthToken = void 0;
16
+ }
17
+ if (affectedSessionIds.size === 0) return;
18
+ await rpcHost.broadcast({
19
+ method: "devframe:auth:revoked",
20
+ args: [],
21
+ filter: (client) => affectedSessionIds.has(client.$meta.id)
22
+ });
23
+ }
24
+ /**
25
+ * Revoke an auth token: remove from storage and notify all connected clients
26
+ * using this token that they are no longer trusted.
27
+ */
28
+ async function revokeAuthToken(context, storage, token) {
29
+ storage.mutate((state) => {
30
+ delete state.trusted[token];
31
+ });
32
+ await revokeActiveConnectionsForToken(context, token);
33
+ }
34
+ //#endregion
35
+ export { revokeAuthToken as n, revokeActiveConnectionsForToken as t };
@@ -1,3 +1,3 @@
1
- import { _ as RpcCacheManager, a as structuredCloneDeserialize, c as structuredCloneStringify, d as createClientFromDump, f as dumpFunctions, g as RpcFunctionsCollectorBase, h as defineRpcFunction, i as strictJsonStringify, l as getRpcHandler, m as createDefineWrapperWithContext, n as validateDefinitions, o as structuredCloneParse, p as getDefinitionsWithDumps, r as STRUCTURED_CLONE_PREFIX, s as structuredCloneSerialize, t as validateDefinition, u as getRpcResolvedSetupResult, v as RpcCacheOptions } from "../index-CuLRIMto.mjs";
2
- import { C as RpcReturnSchema, S as RpcFunctionsCollector, _ as RpcFunctionDefinitionAnyWithContext, a as RpcDefinitionsFilter, b as RpcFunctionSetupResult, c as RpcDumpClientOptions, d as RpcDumpGetter, f as RpcDumpRecord, g as RpcFunctionDefinitionAny, h as RpcFunctionDefinition, i as RpcArgsSchema, l as RpcDumpCollectionOptions, m as RpcFunctionAgentOptions, n as BirpcReturn, o as RpcDefinitionsToFunctions, p as RpcDumpStore, r as EntriesToObject, s as RpcDump, t as BirpcFn, u as RpcDumpDefinition, v as RpcFunctionDefinitionBase, w as Thenable, x as RpcFunctionType, y as RpcFunctionDefinitionToFunction } from "../types-C5OVe4AC.mjs";
3
- export { BirpcFn, BirpcReturn, EntriesToObject, RpcArgsSchema, RpcCacheManager, RpcCacheOptions, RpcDefinitionsFilter, RpcDefinitionsToFunctions, RpcDump, RpcDumpClientOptions, RpcDumpCollectionOptions, RpcDumpDefinition, RpcDumpGetter, RpcDumpRecord, RpcDumpStore, RpcFunctionAgentOptions, RpcFunctionDefinition, RpcFunctionDefinitionAny, RpcFunctionDefinitionAnyWithContext, RpcFunctionDefinitionBase, RpcFunctionDefinitionToFunction, RpcFunctionSetupResult, RpcFunctionType, RpcFunctionsCollector, RpcFunctionsCollectorBase, RpcReturnSchema, STRUCTURED_CLONE_PREFIX, Thenable, createClientFromDump, createDefineWrapperWithContext, defineRpcFunction, dumpFunctions, getDefinitionsWithDumps, getRpcHandler, getRpcResolvedSetupResult, strictJsonStringify, structuredCloneDeserialize, structuredCloneParse, structuredCloneSerialize, structuredCloneStringify, validateDefinition, validateDefinitions };
1
+ import { a as getRpcHandler, c as dumpFunctions, d as defineRpcFunction, f as RpcFunctionsCollectorBase, i as strictJsonStringify, l as getDefinitionsWithDumps, m as RpcCacheOptions, n as validateDefinitions, o as getRpcResolvedSetupResult, p as RpcCacheManager, r as STRUCTURED_CLONE_PREFIX, s as createClientFromDump, t as validateDefinition, u as createDefineWrapperWithContext } from "../index-DB2Ie0Or.mjs";
2
+ import { C as RpcReturnSchema, S as RpcFunctionsCollector, _ as RpcFunctionDefinitionAnyWithContext, a as RpcDefinitionsFilter, b as RpcFunctionSetupResult, c as RpcDumpClientOptions, d as RpcDumpGetter, f as RpcDumpRecord, g as RpcFunctionDefinitionAny, h as RpcFunctionDefinition, i as RpcArgsSchema, l as RpcDumpCollectionOptions, m as RpcFunctionAgentOptions, n as BirpcReturn, o as RpcDefinitionsToFunctions, p as RpcDumpStore, r as EntriesToObject, s as RpcDump, t as BirpcFn, u as RpcDumpDefinition, v as RpcFunctionDefinitionBase, w as Thenable, x as RpcFunctionType, y as RpcFunctionDefinitionToFunction } from "../types-4rdUEi2R.mjs";
3
+ export { BirpcFn, BirpcReturn, EntriesToObject, RpcArgsSchema, RpcCacheManager, RpcCacheOptions, RpcDefinitionsFilter, RpcDefinitionsToFunctions, RpcDump, RpcDumpClientOptions, RpcDumpCollectionOptions, RpcDumpDefinition, RpcDumpGetter, RpcDumpRecord, RpcDumpStore, RpcFunctionAgentOptions, RpcFunctionDefinition, RpcFunctionDefinitionAny, RpcFunctionDefinitionAnyWithContext, RpcFunctionDefinitionBase, RpcFunctionDefinitionToFunction, RpcFunctionSetupResult, RpcFunctionType, RpcFunctionsCollector, RpcFunctionsCollectorBase, RpcReturnSchema, STRUCTURED_CLONE_PREFIX, Thenable, createClientFromDump, createDefineWrapperWithContext, defineRpcFunction, dumpFunctions, getDefinitionsWithDumps, getRpcHandler, getRpcResolvedSetupResult, strictJsonStringify, validateDefinition, validateDefinitions };
@@ -1,4 +1,4 @@
1
- import { a as validateDefinitions, c as getRpcResolvedSetupResult, i as validateDefinition, l as RpcCacheManager, n as dumpFunctions, o as RpcFunctionsCollectorBase, r as getDefinitionsWithDumps, s as getRpcHandler, t as createClientFromDump } from "../rpc-INbWfHoX.mjs";
2
- import { a as structuredCloneSerialize, i as structuredCloneParse, n as strictJsonStringify, o as structuredCloneStringify, r as structuredCloneDeserialize, t as STRUCTURED_CLONE_PREFIX } from "../serialization-DwKi05Pn.mjs";
3
- import { n as defineRpcFunction, t as createDefineWrapperWithContext } from "../define-Bb4zh-Dc.mjs";
4
- export { RpcCacheManager, RpcFunctionsCollectorBase, STRUCTURED_CLONE_PREFIX, createClientFromDump, createDefineWrapperWithContext, defineRpcFunction, dumpFunctions, getDefinitionsWithDumps, getRpcHandler, getRpcResolvedSetupResult, strictJsonStringify, structuredCloneDeserialize, structuredCloneParse, structuredCloneSerialize, structuredCloneStringify, validateDefinition, validateDefinitions };
1
+ import { a as validateDefinitions, c as getRpcResolvedSetupResult, i as validateDefinition, l as RpcCacheManager, n as dumpFunctions, o as RpcFunctionsCollectorBase, r as getDefinitionsWithDumps, s as getRpcHandler, t as createClientFromDump } from "../rpc-DAzoVCR0.mjs";
2
+ import { n as strictJsonStringify, t as STRUCTURED_CLONE_PREFIX } from "../serialization-CwO31axa.mjs";
3
+ import { n as defineRpcFunction, t as createDefineWrapperWithContext } from "../define-CW9gLnyG.mjs";
4
+ export { RpcCacheManager, RpcFunctionsCollectorBase, STRUCTURED_CLONE_PREFIX, createClientFromDump, createDefineWrapperWithContext, defineRpcFunction, dumpFunctions, getDefinitionsWithDumps, getRpcHandler, getRpcResolvedSetupResult, strictJsonStringify, validateDefinition, validateDefinitions };
@@ -1,2 +1,2 @@
1
- import { n as createWsRpcChannel, t as WsRpcChannelOptions } from "../../ws-client-CjPuPFbA.mjs";
1
+ import { n as createWsRpcChannel, t as WsRpcChannelOptions } from "../../ws-client-Bavoya6-.mjs";
2
2
  export { WsRpcChannelOptions, createWsRpcChannel };
@@ -1,4 +1,5 @@
1
- import { i as structuredCloneParse, n as strictJsonStringify, o as structuredCloneStringify } from "../../serialization-DwKi05Pn.mjs";
1
+ import { n as strictJsonStringify } from "../../serialization-CwO31axa.mjs";
2
+ import { i as structuredCloneStringify, n as structuredCloneParse } from "../../structured-clone-CD2l4fI3.mjs";
2
3
  //#region src/rpc/transports/ws-client.ts
3
4
  function NOOP() {}
4
5
  const EMPTY_DEFS = /* @__PURE__ */ new Map();
@@ -1,2 +1,2 @@
1
- import { n as WsRpcTransportOptions, r as attachWsRpcTransport, t as DevToolsNodeRpcSessionMeta } from "../../ws-server-C7LnhOHi.mjs";
1
+ import { n as WsRpcTransportOptions, r as attachWsRpcTransport, t as DevToolsNodeRpcSessionMeta } from "../../ws-server-DjvlwLuM.mjs";
2
2
  export { DevToolsNodeRpcSessionMeta, WsRpcTransportOptions, attachWsRpcTransport };
@@ -1,4 +1,5 @@
1
- import { i as structuredCloneParse, n as strictJsonStringify, o as structuredCloneStringify } from "../../serialization-DwKi05Pn.mjs";
1
+ import { n as strictJsonStringify } from "../../serialization-CwO31axa.mjs";
2
+ import { i as structuredCloneStringify, n as structuredCloneParse } from "../../structured-clone-CD2l4fI3.mjs";
2
3
  import { createServer } from "node:https";
3
4
  import { WebSocketServer } from "ws";
4
5
  //#region src/rpc/transports/ws-server.ts
@@ -1,5 +1,5 @@
1
- import { c as logger } from "./serialization-DwKi05Pn.mjs";
2
- import { hash } from "ohash";
1
+ import { t as hash } from "./hash-CIBte1yS.mjs";
2
+ import { i as logger } from "./serialization-CwO31axa.mjs";
3
3
  //#region src/rpc/cache.ts
4
4
  /**
5
5
  * @experimental API is expected to change.
@@ -56,6 +56,7 @@ async function getRpcHandler(definition, context) {
56
56
  //#endregion
57
57
  //#region src/rpc/collector.ts
58
58
  var RpcFunctionsCollectorBase = class {
59
+ context;
59
60
  definitions = /* @__PURE__ */ new Map();
60
61
  functions;
61
62
  _onChanged = [];
@@ -128,7 +129,7 @@ function assertAgentJsonSerializable(fn) {
128
129
  if (fn.agent && fn.jsonSerializable !== true) throw logger.DF0019({ name: fn.name }).throw();
129
130
  }
130
131
  //#endregion
131
- //#region ../../../node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.js
132
+ //#region ../../node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.js
132
133
  var Node = class {
133
134
  value;
134
135
  next;
@@ -186,7 +187,7 @@ var Queue = class {
186
187
  }
187
188
  };
188
189
  //#endregion
189
- //#region ../../../node_modules/.pnpm/p-limit@7.3.0/node_modules/p-limit/index.js
190
+ //#region ../../node_modules/.pnpm/p-limit@7.3.0/node_modules/p-limit/index.js
190
191
  function pLimit(concurrency) {
191
192
  let rejectOnClear = false;
192
193
  if (typeof concurrency === "object") ({concurrency, rejectOnClear = false} = concurrency);
@@ -1,5 +1,4 @@
1
1
  import { consoleReporter, createLogger, defineDiagnostics, plainFormatter } from "logs-sdk";
2
- import { deserialize as structuredCloneDeserialize, parse as structuredCloneParse, serialize as structuredCloneSerialize, stringify as structuredCloneStringify } from "structured-clone-es";
3
2
  //#region src/rpc/diagnostics.ts
4
3
  const diagnostics = defineDiagnostics({
5
4
  docsBase: "https://devfra.me/errors",
@@ -109,4 +108,4 @@ function formatPath(parent, key) {
109
108
  return key;
110
109
  }
111
110
  //#endregion
112
- export { structuredCloneSerialize as a, logger as c, structuredCloneParse as i, strictJsonStringify as n, structuredCloneStringify as o, structuredCloneDeserialize as r, diagnostics as s, STRUCTURED_CLONE_PREFIX as t };
111
+ export { logger as i, strictJsonStringify as n, diagnostics as r, STRUCTURED_CLONE_PREFIX as t };