devframe 0.2.0 → 0.2.1

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 (58) hide show
  1. package/README.md +20 -76
  2. package/dist/adapters/build.d.mts +1 -1
  3. package/dist/adapters/build.mjs +4 -5
  4. package/dist/adapters/cli.d.mts +1 -1
  5. package/dist/adapters/cli.mjs +1 -1
  6. package/dist/adapters/dev.d.mts +2 -2
  7. package/dist/adapters/dev.mjs +1 -1
  8. package/dist/adapters/embedded.d.mts +1 -1
  9. package/dist/adapters/mcp.d.mts +2 -2
  10. package/dist/adapters/mcp.mjs +72 -17
  11. package/dist/client/index.d.mts +4 -4
  12. package/dist/client/index.mjs +4 -8
  13. package/dist/{context-DRa0wGsC.d.mts → context-BaX-SZti.d.mts} +1 -1
  14. package/dist/{dev-CewNNE2R.mjs → dev-CA0-8Amw.mjs} +4 -5
  15. package/dist/{devframe-R5Ex5K5L.d.mts → devframe-BXZUBuy6.d.mts} +2 -2
  16. package/dist/helpers/vite.d.mts +1 -1
  17. package/dist/helpers/vite.mjs +3 -3
  18. package/dist/{context-BBi2IQDm.mjs → host-h3-CpYkiCIU.mjs} +25 -2
  19. package/dist/{index-DB2Ie0Or.d.mts → index-BO4daMzR.d.mts} +51 -3
  20. package/dist/index.d.mts +3 -3
  21. package/dist/node/auth.d.mts +2 -2
  22. package/dist/node/auth.mjs +2 -2
  23. package/dist/node/index.d.mts +6 -37
  24. package/dist/node/index.mjs +4 -6
  25. package/dist/node/internal.d.mts +2 -2
  26. package/dist/node/internal.mjs +4 -4
  27. package/dist/recipes/open-helpers.d.mts +1 -1
  28. package/dist/recipes/open-helpers.mjs +2 -2
  29. package/dist/rpc/index.d.mts +3 -3
  30. package/dist/rpc/index.mjs +2 -2
  31. package/dist/rpc/transports/ws-client.d.mts +1 -1
  32. package/dist/rpc/transports/ws-client.mjs +1 -1
  33. package/dist/rpc/transports/ws-server.d.mts +1 -1
  34. package/dist/rpc/transports/ws-server.mjs +1 -1
  35. package/dist/{rpc-DAzoVCR0.mjs → rpc-BlVCyk9W.mjs} +135 -11
  36. package/dist/{server-DzKz023G.d.mts → server-CgqyJG9m.d.mts} +1 -1
  37. package/dist/{transports-BnCs4rj9.mjs → transports-BLwT342H.mjs} +1 -1
  38. package/dist/types/index.d.mts +3 -3
  39. package/dist/{types-4rdUEi2R.d.mts → types-ip8THGH1.d.mts} +21 -5
  40. package/dist/utils/events.d.mts +1 -1
  41. package/dist/utils/human-id.mjs +1 -1
  42. package/dist/utils/launch-editor.mjs +1 -1
  43. package/dist/utils/open.mjs +1 -1
  44. package/dist/utils/shared-state.d.mts +1 -1
  45. package/dist/utils/streaming-channel.d.mts +1 -1
  46. package/dist/{ws-client-Bavoya6-.d.mts → ws-client-DFUf-xgm.d.mts} +1 -1
  47. package/dist/{ws-server-DjvlwLuM.d.mts → ws-server-kW8RZXTw.d.mts} +1 -1
  48. package/package.json +1 -1
  49. package/skills/devframe/SKILL.md +1 -1
  50. package/dist/host-h3-Dz8YnFgu.mjs +0 -24
  51. package/dist/static-dump-C67bCuse.mjs +0 -80
  52. /package/dist/{_shared-BrKv3CYt.mjs → _shared-C_yZKUmx.mjs} +0 -0
  53. /package/dist/{human-id-adtUWQLr.mjs → human-id-mPh1HcFO.mjs} +0 -0
  54. /package/dist/{launch-editor-CX_n_0SS.mjs → launch-editor-1dAC7Uk5.mjs} +0 -0
  55. /package/dist/{open-B2ah1IKK.mjs → open-CWL4Zasd.mjs} +0 -0
  56. /package/dist/{revoke-DIMz1r7-.mjs → revoke-CWSPBbJH.mjs} +0 -0
  57. /package/dist/{server-DOk4grlJ.mjs → server-G1ymmN3_.mjs} +0 -0
  58. /package/dist/{storage-CNvfBGQ5.mjs → storage-BaLJK6e_.mjs} +0 -0
package/README.md CHANGED
@@ -1,84 +1,28 @@
1
1
  # devframe
2
2
 
3
- Framework- and build-tool-agnostic foundation for building generic DevTools. Define your devtool once — its RPC, its data, its SPA, its CLI shape — and deploy the same definition anywhere through a set of pluggable adapters.
3
+ [![npm version][npm-version-src]][npm-version-href]
4
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
5
+ [![bundle][bundle-src]][bundle-href]
6
+ [![JSDocs][jsdocs-src]][jsdocs-href]
7
+ [![License][license-src]][license-href]
4
8
 
5
- Full documentation: [https://devfra.me/](https://devfra.me/).
9
+ Framework-neutral foundation for building generic DevTools.
6
10
 
7
- ## Install
11
+ Documentation: [https://devfra.me/](https://devfra.me/).
8
12
 
9
- ```sh
10
- pnpm add devframe
11
- ```
12
-
13
- ## Hello, Devframe
14
-
15
- ```ts
16
- import { defineDevframe, defineRpcFunction } from 'devframe'
17
- import { createCli } from 'devframe/adapters/cli'
18
-
19
- const devframe = defineDevframe({
20
- id: 'my-devframe',
21
- name: 'My Devframe',
22
- setup(ctx) {
23
- ctx.rpc.register(defineRpcFunction({
24
- name: 'my-devframe:hello',
25
- type: 'static',
26
- jsonSerializable: true,
27
- handler: () => ({ message: 'hello' }),
28
- }))
29
- },
30
- })
31
-
32
- await createCli(devframe).parse()
33
- ```
34
-
35
- ## Adapters
36
-
37
- | Adapter | Use case |
38
- |---------|----------|
39
- | `cli` | Standalone CLI tool with `dev` / `build` / `mcp` subcommands. |
40
- | `build` | Generates a static, self-contained SPA snapshot. |
41
- | `vite` | Mounts the devframe into Vite DevTools (or any compatible host) via `@vitejs/devtools-kit`. |
42
- | `embedded` | Overlays inside another devtool's UI. |
43
- | `mcp` | Surfaces the devframe's RPC to coding agents over MCP. |
44
-
45
- ## Agent-Native (experimental)
46
-
47
- > [!WARNING]
48
- > The agent-native surface — the `agent` field on `defineRpcFunction`, `DevToolsAgentHost`, and the `devframe/adapters/mcp` adapter — may change without a major version bump until it stabilizes.
49
-
50
- Devframe surfaces a devframe's RPC functions, tools, and resources to coding agents over [MCP](https://modelcontextprotocol.io). Flag an RPC function with `agent: { description }` to expose it, then spin up an MCP server:
51
-
52
- ```ts
53
- import { defineDevframe, defineRpcFunction } from 'devframe'
54
- import { createMcpServer } from 'devframe/adapters/mcp'
55
-
56
- const getSummary = defineRpcFunction({
57
- name: 'my-plugin:get-summary',
58
- type: 'query',
59
- agent: {
60
- description: 'Return a short summary of the current build state.',
61
- },
62
- setup: ctx => ({ handler: async () => buildSummary() }),
63
- })
64
-
65
- const devframe = defineDevframe({
66
- id: 'my-plugin',
67
- setup(ctx) {
68
- ctx.rpc.register(getSummary)
69
- ctx.agent.registerResource({
70
- id: 'latest-build',
71
- name: 'Latest build',
72
- read: () => ({ text: renderMarkdown(latestBuild) }),
73
- })
74
- },
75
- })
76
-
77
- await createMcpServer(devframe, { transport: 'stdio' })
78
- ```
13
+ ## License
79
14
 
80
- Or via the CLI: `devframe mcp`. `@modelcontextprotocol/sdk` is a peer dependency — add it when you want MCP support. See the [Agent-Native guide](https://devfra.me/guide/agent-native) for the full API and Claude Desktop integration example.
15
+ [MIT](../../LICENSE.md) License © [Anthony Fu](https://github.com/antfu)
81
16
 
82
- ## License
17
+ <!-- Badges -->
83
18
 
84
- [MIT](./LICENSE.md)
19
+ [npm-version-src]: https://img.shields.io/npm/v/devframe?style=flat&colorA=080f12&colorB=517158
20
+ [npm-version-href]: https://npmx.dev/package/devframe
21
+ [npm-downloads-src]: https://img.shields.io/npm/dm/devframe?style=flat&colorA=080f12&colorB=517158
22
+ [npm-downloads-href]: https://npmx.dev/package/devframe
23
+ [bundle-src]: https://img.shields.io/bundlephobia/minzip/devframe?style=flat&colorA=080f12&colorB=517158&label=minzip
24
+ [bundle-href]: https://bundlephobia.com/result?p=devframe
25
+ [license-src]: https://img.shields.io/github/license/devframes/devframe.svg?style=flat&colorA=080f12&colorB=517158
26
+ [license-href]: https://github.com/devframes/devframe/blob/main/LICENSE.md
27
+ [jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=517158
28
+ [jsdocs-href]: https://www.jsdocs.io/package/devframe
@@ -1,4 +1,4 @@
1
- import { r as DevframeDefinition } from "../devframe-R5Ex5K5L.mjs";
1
+ import { r as DevframeDefinition } from "../devframe-BXZUBuy6.mjs";
2
2
 
3
3
  //#region src/adapters/build.d.ts
4
4
  interface CreateBuildOptions {
@@ -1,11 +1,10 @@
1
+ import { t as collectStaticRpcDump } from "../rpc-BlVCyk9W.mjs";
1
2
  import { n as strictJsonStringify } from "../serialization-CwO31axa.mjs";
3
+ import { DEVTOOLS_CONNECTION_META_FILENAME, DEVTOOLS_RPC_DUMP_DIRNAME, DEVTOOLS_RPC_DUMP_MANIFEST_FILENAME } from "../constants.mjs";
2
4
  import { i as structuredCloneStringify } from "../structured-clone-CD2l4fI3.mjs";
3
5
  import { t as colors } from "../colors-DS7k8ljB.mjs";
4
- import { t as createHostContext } from "../context-BBi2IQDm.mjs";
5
- import { t as createH3DevToolsHost } from "../host-h3-Dz8YnFgu.mjs";
6
- import { DEVTOOLS_CONNECTION_META_FILENAME, DEVTOOLS_RPC_DUMP_DIRNAME, DEVTOOLS_RPC_DUMP_MANIFEST_FILENAME } from "../constants.mjs";
7
- import { t as collectStaticRpcDump } from "../static-dump-C67bCuse.mjs";
8
- import { n as resolveBasePath } from "../_shared-BrKv3CYt.mjs";
6
+ import { n as createHostContext, t as createH3DevToolsHost } from "../host-h3-CpYkiCIU.mjs";
7
+ import { n as resolveBasePath } from "../_shared-C_yZKUmx.mjs";
9
8
  import { existsSync } from "node:fs";
10
9
  import process from "node:process";
11
10
  import { dirname, resolve } from "pathe";
@@ -1,4 +1,4 @@
1
- import { ct as CliFlagsSchema, dt as parseCliFlags, lt as InferCliFlags, r as DevframeDefinition, ut as defineCliFlags } from "../devframe-R5Ex5K5L.mjs";
1
+ import { ct as CliFlagsSchema, dt as parseCliFlags, lt as InferCliFlags, r as DevframeDefinition, ut as defineCliFlags } from "../devframe-BXZUBuy6.mjs";
2
2
  import { H3 } from "h3";
3
3
  import { CAC } from "cac";
4
4
 
@@ -1,6 +1,6 @@
1
1
  import { t as colors } from "../colors-DS7k8ljB.mjs";
2
2
  import { createBuild } from "./build.mjs";
3
- import { n as resolveDevServerPort, t as createDevServer } from "../dev-CewNNE2R.mjs";
3
+ import { n as resolveDevServerPort, t as createDevServer } from "../dev-CA0-8Amw.mjs";
4
4
  import process from "node:process";
5
5
  import cac from "cac";
6
6
  import { safeParse } from "valibot";
@@ -1,5 +1,5 @@
1
- import { r as DevframeDefinition } from "../devframe-R5Ex5K5L.mjs";
2
- import { n as StartedServer } from "../server-DzKz023G.mjs";
1
+ import { r as DevframeDefinition } from "../devframe-BXZUBuy6.mjs";
2
+ import { n as StartedServer } from "../server-CgqyJG9m.mjs";
3
3
  import { H3 } from "h3";
4
4
 
5
5
  //#region src/adapters/dev.d.ts
@@ -1,2 +1,2 @@
1
- import { n as resolveDevServerPort, t as createDevServer } from "../dev-CewNNE2R.mjs";
1
+ import { n as resolveDevServerPort, t as createDevServer } from "../dev-CA0-8Amw.mjs";
2
2
  export { createDevServer, resolveDevServerPort };
@@ -1,4 +1,4 @@
1
- import { d as DevToolsNodeContext, r as DevframeDefinition } from "../devframe-R5Ex5K5L.mjs";
1
+ import { d as DevToolsNodeContext, r as DevframeDefinition } from "../devframe-BXZUBuy6.mjs";
2
2
 
3
3
  //#region src/adapters/embedded.d.ts
4
4
  interface CreateEmbeddedOptions {
@@ -1,7 +1,7 @@
1
- import { r as DevframeDefinition } from "../devframe-R5Ex5K5L.mjs";
1
+ import { r as DevframeDefinition } from "../devframe-BXZUBuy6.mjs";
2
2
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
3
 
4
- //#region src/node/mcp/build-server.d.ts
4
+ //#region src/adapters/mcp/build-server.d.ts
5
5
  interface CreateMcpServerOptions {
6
6
  /**
7
7
  * Transport to use. Only `'stdio'` is implemented today; HTTP support
@@ -1,12 +1,76 @@
1
1
  import { n as logger } from "../diagnostics-Cg9ycFIM.mjs";
2
- import { t as createHostContext } from "../context-BBi2IQDm.mjs";
2
+ import { n as createHostContext } from "../host-h3-CpYkiCIU.mjs";
3
3
  import { homedir } from "node:os";
4
4
  import process from "node:process";
5
5
  import { join } from "pathe";
6
6
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
7
7
  import { CallToolRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema } from "@modelcontextprotocol/sdk/types.js";
8
8
  import { toJsonSchema } from "@valibot/to-json-schema";
9
- //#region src/node/mcp/to-json-schema.ts
9
+ //#region src/adapters/mcp/stringify.ts
10
+ /**
11
+ * JSON-coercing serializer for MCP text payloads.
12
+ *
13
+ * MCP carries tool results and resource reads as plain text over a
14
+ * JSON-RPC transport, so we cannot use the `s:`-prefixed structured-clone
15
+ * format the WS RPC transport falls back to for non-JSON values. Instead,
16
+ * we coerce common non-JSON types into JSON-friendly forms so the LLM
17
+ * client sees something useful instead of `[object Object]`.
18
+ *
19
+ * Coercions:
20
+ * - `BigInt` → `"123n"`
21
+ * - `Date` → ISO string (via the native `toJSON`)
22
+ * - `Map` → `{ __type: 'Map', entries: [[k, v], …] }`
23
+ * - `Set` → `{ __type: 'Set', entries: [v, …] }`
24
+ * - `Error` → `{ name, message, stack, cause? }` (cause recurses)
25
+ * - `Function` → `"[Function: name]"`
26
+ * - `Symbol` → `value.toString()`
27
+ * - cycles → `"[Circular]"`
28
+ */
29
+ function stringifyForMcp(value) {
30
+ if (value === void 0) return "undefined";
31
+ if (typeof value === "string") return value;
32
+ const seen = /* @__PURE__ */ new WeakSet();
33
+ return JSON.stringify(value, (_key, val) => {
34
+ if (typeof val === "bigint") return `${val}n`;
35
+ if (val instanceof Error) {
36
+ const out = {
37
+ name: val.name,
38
+ message: val.message,
39
+ stack: val.stack
40
+ };
41
+ if (val.cause !== void 0) out.cause = val.cause;
42
+ return out;
43
+ }
44
+ if (val instanceof Map) return {
45
+ __type: "Map",
46
+ entries: [...val.entries()]
47
+ };
48
+ if (val instanceof Set) return {
49
+ __type: "Set",
50
+ entries: [...val]
51
+ };
52
+ if (typeof val === "function") return `[Function: ${val.name || "anonymous"}]`;
53
+ if (typeof val === "symbol") return val.toString();
54
+ if (val !== null && typeof val === "object") {
55
+ if (seen.has(val)) return "[Circular]";
56
+ seen.add(val);
57
+ }
58
+ return val;
59
+ }, 2);
60
+ }
61
+ /**
62
+ * Format a thrown value for an MCP `isError` text payload. Surfaces the
63
+ * `Error.name`/`message`, and one level of `cause.message` so context
64
+ * isn't dropped silently.
65
+ */
66
+ function formatMcpError(error) {
67
+ if (!(error instanceof Error)) return String(error);
68
+ const cause = error.cause;
69
+ const causeText = cause instanceof Error ? ` (cause: ${cause.message})` : cause !== void 0 ? ` (cause: ${String(cause)})` : "";
70
+ return `${error.name}: ${error.message}${causeText}`;
71
+ }
72
+ //#endregion
73
+ //#region src/adapters/mcp/to-json-schema.ts
10
74
  const FALLBACK_OBJECT_SCHEMA = Object.freeze({
11
75
  type: "object",
12
76
  additionalProperties: true
@@ -75,7 +139,7 @@ function isObjectJsonSchema(value) {
75
139
  return !!value && typeof value === "object" && value.type === "object";
76
140
  }
77
141
  //#endregion
78
- //#region src/node/mcp/build-server.ts
142
+ //#region src/adapters/mcp/build-server.ts
79
143
  /**
80
144
  * Wire an MCP {@link Server} to a devframe context. Returns the server
81
145
  * plus a disposal function for the subscriptions it sets up. The
@@ -140,7 +204,7 @@ async function createMcpServer(definition, options = {}) {
140
204
  serverVersion: options.serverVersion ?? definition.version ?? "0.0.0",
141
205
  exposeSharedState: options.exposeSharedState ?? true
142
206
  });
143
- const { startStdioTransport } = await import("../transports-BnCs4rj9.mjs");
207
+ const { startStdioTransport } = await import("../transports-BLwT342H.mjs");
144
208
  let stop;
145
209
  try {
146
210
  stop = await startStdioTransport(server);
@@ -166,14 +230,14 @@ function registerToolHandlers(server, ctx) {
166
230
  try {
167
231
  return { content: [{
168
232
  type: "text",
169
- text: stringify(await ctx.agent.invoke(name, args ?? {}))
233
+ text: stringifyForMcp(await ctx.agent.invoke(name, args ?? {}))
170
234
  }] };
171
235
  } catch (error) {
172
236
  return {
173
237
  isError: true,
174
238
  content: [{
175
239
  type: "text",
176
- text: `Error invoking "${name}": ${error instanceof Error ? error.message : String(error)}`
240
+ text: `Error invoking "${name}": ${formatMcpError(error)}`
177
241
  }]
178
242
  };
179
243
  }
@@ -209,13 +273,13 @@ function registerResourceHandlers(server, ctx, exposeSharedState) {
209
273
  return { contents: [{
210
274
  uri,
211
275
  mimeType: content.mimeType ?? "application/json",
212
- text: content.text ?? stringify(content.json)
276
+ text: content.text ?? stringifyForMcp(content.json)
213
277
  }] };
214
278
  }
215
279
  if (parsed.kind === "state") return { contents: [{
216
280
  uri,
217
281
  mimeType: "application/json",
218
- text: stringify((await ctx.rpc.sharedState.get(parsed.key)).value())
282
+ text: stringifyForMcp((await ctx.rpc.sharedState.get(parsed.key)).value())
219
283
  }] };
220
284
  throw new Error(`[devframe/mcp] unknown resource URI "${uri}"`);
221
285
  });
@@ -269,14 +333,5 @@ function parseResourceUri(uri) {
269
333
  key: decoded
270
334
  };
271
335
  }
272
- function stringify(value) {
273
- if (value === void 0) return "undefined";
274
- if (typeof value === "string") return value;
275
- try {
276
- return JSON.stringify(value, null, 2);
277
- } catch {
278
- return String(value);
279
- }
280
- }
281
336
  //#endregion
282
337
  export { createMcpServer };
@@ -1,7 +1,7 @@
1
- import { T as StreamSink, U as DevToolsRpcClientFunctions, W as DevToolsRpcServerFunctions, at as EventEmitter, g as RpcSharedStateHost, l as ConnectionMeta, w as StreamReader } from "../devframe-R5Ex5K5L.mjs";
2
- import { m as RpcCacheOptions, p as RpcCacheManager } from "../index-DB2Ie0Or.mjs";
3
- import { S as RpcFunctionsCollector } from "../types-4rdUEi2R.mjs";
4
- import { t as WsRpcChannelOptions } from "../ws-client-Bavoya6-.mjs";
1
+ import { T as StreamSink, U as DevToolsRpcClientFunctions, W as DevToolsRpcServerFunctions, at as EventEmitter, g as RpcSharedStateHost, l as ConnectionMeta, w as StreamReader } from "../devframe-BXZUBuy6.mjs";
2
+ import { C as RpcCacheManager, w as RpcCacheOptions } from "../index-BO4daMzR.mjs";
3
+ import { C as RpcFunctionsCollector } from "../types-ip8THGH1.mjs";
4
+ import { t as WsRpcChannelOptions } from "../ws-client-DFUf-xgm.mjs";
5
5
  import { BirpcOptions, BirpcReturn } from "birpc";
6
6
 
7
7
  //#region src/client/rpc-streaming.d.ts
@@ -1,13 +1,13 @@
1
1
  import { t as hash } from "../hash-CIBte1yS.mjs";
2
- import { l as RpcCacheManager, o as RpcFunctionsCollectorBase } from "../rpc-DAzoVCR0.mjs";
2
+ import { a as reviveDumpError, f as RpcCacheManager, l as RpcFunctionsCollectorBase } from "../rpc-BlVCyk9W.mjs";
3
+ import { DEVTOOLS_CONNECTION_META_FILENAME, DEVTOOLS_RPC_DUMP_MANIFEST_FILENAME } from "../constants.mjs";
3
4
  import { createRpcClient } from "../rpc/client.mjs";
4
5
  import { t as structuredCloneDeserialize } from "../structured-clone-CD2l4fI3.mjs";
5
6
  import { createWsRpcChannel } from "../rpc/transports/ws-client.mjs";
6
7
  import { createEventEmitter } from "../utils/events.mjs";
7
8
  import { t as createSharedState } from "../shared-state-q9-1EOSX.mjs";
8
9
  import { createStreamReader, createStreamSink } from "../utils/streaming-channel.mjs";
9
- import { DEVTOOLS_CONNECTION_META_FILENAME, DEVTOOLS_RPC_DUMP_MANIFEST_FILENAME } from "../constants.mjs";
10
- import { t as humanId } from "../human-id-adtUWQLr.mjs";
10
+ import { t as humanId } from "../human-id-mPh1HcFO.mjs";
11
11
  import { promiseWithResolver } from "../utils/promise.mjs";
12
12
  //#region src/client/rpc-shared-state.ts
13
13
  function createRpcSharedStateClientHost(rpc) {
@@ -111,11 +111,7 @@ function isRecord(value) {
111
111
  return typeof value === "object" && value !== null && ("output" in value || "error" in value);
112
112
  }
113
113
  function resolveRecordOutput(record) {
114
- if (record.error) {
115
- const error = new Error(record.error.message);
116
- error.name = record.error.name;
117
- throw error;
118
- }
114
+ if (record.error) throw reviveDumpError(record.error);
119
115
  return record.output;
120
116
  }
121
117
  function createStaticRpcCaller(manifest, fetchJson) {
@@ -1,4 +1,4 @@
1
- import { P as SharedState, d as DevToolsNodeContext } from "./devframe-R5Ex5K5L.mjs";
1
+ import { P as SharedState, d as DevToolsNodeContext } from "./devframe-BXZUBuy6.mjs";
2
2
 
3
3
  //#region src/node/internal/context.d.ts
4
4
  interface InternalAnonymousAuthStorage {
@@ -1,9 +1,8 @@
1
- import { 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
1
  import { DEVTOOLS_CONNECTION_META_FILENAME } from "./constants.mjs";
5
- import { n as resolveBasePath, t as normalizeBasePath } from "./_shared-BrKv3CYt.mjs";
6
- import { t as open } from "./open-B2ah1IKK.mjs";
2
+ import { n as createHostContext, t as createH3DevToolsHost } from "./host-h3-CpYkiCIU.mjs";
3
+ import { t as startHttpAndWs } from "./server-G1ymmN3_.mjs";
4
+ import { n as resolveBasePath, t as normalizeBasePath } from "./_shared-C_yZKUmx.mjs";
5
+ import { t as open } from "./open-CWL4Zasd.mjs";
7
6
  import { mountStaticHandler } from "./utils/serve-static.mjs";
8
7
  import { networkInterfaces } from "node:os";
9
8
  import process$1 from "node:process";
@@ -1,5 +1,5 @@
1
- import { f as RpcFunctionsCollectorBase } from "./index-DB2Ie0Or.mjs";
2
- import { t as DevToolsNodeRpcSessionMeta } from "./ws-server-DjvlwLuM.mjs";
1
+ import { S as RpcFunctionsCollectorBase } from "./index-BO4daMzR.mjs";
2
+ import { t as DevToolsNodeRpcSessionMeta } from "./ws-server-kW8RZXTw.mjs";
3
3
  import { Logger, createLogger, defineDiagnostics } from "logs-sdk";
4
4
  import { BirpcReturn } from "birpc";
5
5
  import { CAC } from "cac";
@@ -1,4 +1,4 @@
1
- import { r as DevframeDefinition } from "../devframe-R5Ex5K5L.mjs";
1
+ import { r as DevframeDefinition } from "../devframe-BXZUBuy6.mjs";
2
2
 
3
3
  //#region src/helpers/vite.d.ts
4
4
  interface ViteDevBridgeOptions {
@@ -1,8 +1,8 @@
1
- import { n as logger } from "../diagnostics-Cg9ycFIM.mjs";
2
1
  import { DEVTOOLS_CONNECTION_META_FILENAME } from "../constants.mjs";
3
- import { n as resolveBasePath } from "../_shared-BrKv3CYt.mjs";
2
+ import { n as logger } from "../diagnostics-Cg9ycFIM.mjs";
3
+ import { n as resolveBasePath } from "../_shared-C_yZKUmx.mjs";
4
4
  import { serveStaticNodeMiddleware } from "../utils/serve-static.mjs";
5
- import { n as resolveDevServerPort, t as createDevServer } from "../dev-CewNNE2R.mjs";
5
+ import { n as resolveDevServerPort, t as createDevServer } from "../dev-CA0-8Amw.mjs";
6
6
  import { resolve } from "pathe";
7
7
  //#region src/helpers/vite.ts
8
8
  /**
@@ -1,4 +1,4 @@
1
- import { o as RpcFunctionsCollectorBase } from "./rpc-DAzoVCR0.mjs";
1
+ import { l as RpcFunctionsCollectorBase } from "./rpc-BlVCyk9W.mjs";
2
2
  import { r as diagnostics } from "./serialization-CwO31axa.mjs";
3
3
  import { defineRpcFunction } from "./index.mjs";
4
4
  import { t as colors$1 } from "./colors-DS7k8ljB.mjs";
@@ -11,6 +11,9 @@ import { ansiFormatter } from "logs-sdk/formatters/ansi";
11
11
  import { isatty } from "node:tty";
12
12
  import { formatWithOptions, inspect } from "node:util";
13
13
  import { existsSync } from "node:fs";
14
+ import { homedir } from "node:os";
15
+ import process$1 from "node:process";
16
+ import { join } from "pathe";
14
17
  //#region src/node/host-agent.ts
15
18
  /**
16
19
  * Framework-neutral host aggregating the agent-exposed surface of a
@@ -1030,4 +1033,24 @@ async function createHostContext(options) {
1030
1033
  return context;
1031
1034
  }
1032
1035
  //#endregion
1033
- export { createRpcSharedStateServerHost as a, createRpcStreamingServerHost as i, DevToolsViewHost as n, DevToolsDiagnosticsHost as o, RpcFunctionsHost as r, DevToolsAgentHost as s, createHostContext as t };
1036
+ //#region src/node/host-h3.ts
1037
+ /**
1038
+ * h3-backed {@link DevToolsHost} — used by the standalone CLI adapter.
1039
+ */
1040
+ function createH3DevToolsHost(options) {
1041
+ const workspaceRoot = options.workspaceRoot ?? process$1.cwd();
1042
+ return {
1043
+ mountStatic(base, distDir) {
1044
+ return options.mount?.(base, distDir);
1045
+ },
1046
+ resolveOrigin() {
1047
+ return options.origin;
1048
+ },
1049
+ getStorageDir(scope) {
1050
+ const namespace = `.${options.appName}/devtools`;
1051
+ return scope === "workspace" ? join(workspaceRoot, "node_modules", namespace) : join(homedir(), namespace);
1052
+ }
1053
+ };
1054
+ }
1055
+ //#endregion
1056
+ export { createRpcStreamingServerHost as a, DevToolsAgentHost as c, RpcFunctionsHost as i, createHostContext as n, createRpcSharedStateServerHost as o, DevToolsViewHost as r, DevToolsDiagnosticsHost as s, createH3DevToolsHost as t };
@@ -1,4 +1,4 @@
1
- import { C as RpcReturnSchema, S as RpcFunctionsCollector, b as RpcFunctionSetupResult, c as RpcDumpClientOptions, g as RpcFunctionDefinitionAny, h as RpcFunctionDefinition, i as RpcArgsSchema, l as RpcDumpCollectionOptions, n as BirpcReturn, o as RpcDefinitionsToFunctions, p as RpcDumpStore, x as RpcFunctionType } from "./types-4rdUEi2R.mjs";
1
+ import { C as RpcFunctionsCollector, S as RpcFunctionType, _ as RpcFunctionDefinitionAny, c as RpcDumpClientOptions, g as RpcFunctionDefinition, i as RpcArgsSchema, l as RpcDumpCollectionOptions, m as RpcDumpStore, n as BirpcReturn, o as RpcDefinitionsToFunctions, p as RpcDumpRecordError, w as RpcReturnSchema, x as RpcFunctionSetupResult } from "./types-ip8THGH1.mjs";
2
2
 
3
3
  //#region src/rpc/cache.d.ts
4
4
  interface RpcCacheOptions {
@@ -47,7 +47,7 @@ declare class RpcFunctionsCollectorBase<LocalFunctions extends Record<string, an
47
47
  declare function 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>): RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS>;
48
48
  declare function createDefineWrapperWithContext<CONTEXT>(): <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, CONTEXT>) => RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, CONTEXT>;
49
49
  //#endregion
50
- //#region src/rpc/dumps.d.ts
50
+ //#region src/rpc/dump/index.d.ts
51
51
  /**
52
52
  * Collects pre-computed dumps by executing functions with their defined input combinations.
53
53
  * Static functions without dump config automatically get `{ inputs: [[]] }`.
@@ -75,6 +75,54 @@ declare function createClientFromDump<T extends Record<string, any>>(store: RpcD
75
75
  */
76
76
  declare function getDefinitionsWithDumps<T extends readonly RpcFunctionDefinitionAny[]>(definitions: T): RpcFunctionDefinitionAny[];
77
77
  //#endregion
78
+ //#region src/rpc/dump/error.d.ts
79
+ /**
80
+ * Normalize a thrown value into a plain object suitable for storage in
81
+ * a dump record. Preserves `message`, `name`, `cause`, and any own
82
+ * enumerable properties of an `Error` so consumers reading the dump can
83
+ * reconstruct a richer Error than just `{ message, name }`.
84
+ *
85
+ * Non-`Error` throws are wrapped as `{ name: 'Error', message: String(thrown) }`.
86
+ */
87
+ declare function serializeDumpError(error: unknown): RpcDumpRecordError;
88
+ /**
89
+ * Inverse of {@link serializeDumpError}: rebuild a thrown `Error` from
90
+ * the plain object stored in a dump record. Preserves `cause`, restores
91
+ * the original `name`, and re-attaches any custom own properties.
92
+ */
93
+ declare function reviveDumpError(stored: RpcDumpRecordError): Error;
94
+ //#endregion
95
+ //#region src/rpc/dump/static.d.ts
96
+ type StaticRpcDumpSerialization = 'json' | 'structured-clone';
97
+ interface StaticRpcDumpManifestStaticEntry {
98
+ type: 'static';
99
+ path: string;
100
+ /** Encoder used when this entry's file was written. Default: `'json'`. */
101
+ serialization?: StaticRpcDumpSerialization;
102
+ }
103
+ interface StaticRpcDumpManifestQueryEntry {
104
+ type: 'query';
105
+ records: Record<string, string>;
106
+ fallback?: string;
107
+ /** Encoder used when each record/fallback file was written. Default: `'json'`. */
108
+ serialization?: StaticRpcDumpSerialization;
109
+ }
110
+ type StaticRpcDumpManifestValue = StaticRpcDumpManifestStaticEntry | StaticRpcDumpManifestQueryEntry | any;
111
+ type StaticRpcDumpManifest = Record<string, StaticRpcDumpManifestValue>;
112
+ interface StaticRpcDumpFile {
113
+ /** Whether this file was written via `JSON.stringify` or `structured-clone-es.stringify`. */
114
+ serialization: StaticRpcDumpSerialization;
115
+ /** Function name the file belongs to — used to scope `DF0019` errors during write. */
116
+ fnName: string;
117
+ /** Payload to encode. */
118
+ data: unknown;
119
+ }
120
+ interface StaticRpcDumpCollection {
121
+ manifest: StaticRpcDumpManifest;
122
+ files: Record<string, StaticRpcDumpFile>;
123
+ }
124
+ declare function collectStaticRpcDump(definitions: Iterable<RpcFunctionDefinitionAny>, context: any): Promise<StaticRpcDumpCollection>;
125
+ //#endregion
78
126
  //#region src/rpc/handler.d.ts
79
127
  declare function getRpcResolvedSetupResult<NAME extends string, TYPE extends RpcFunctionType, ARGS extends any[], RETURN = void, CONTEXT = undefined>(definition: RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, any, any, CONTEXT>, context: CONTEXT): Promise<RpcFunctionSetupResult<ARGS, RETURN>>;
80
128
  declare function getRpcHandler<NAME extends string, TYPE extends RpcFunctionType, ARGS extends any[], RETURN = void, CONTEXT = undefined>(definition: RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, any, any, CONTEXT>, context: CONTEXT): Promise<(...args: ARGS) => RETURN>;
@@ -136,4 +184,4 @@ declare function validateDefinitions(definitions: readonly RpcFunctionDefinition
136
184
  */
137
185
  declare function validateDefinition(definition: RpcFunctionDefinitionAny): void;
138
186
  //#endregion
139
- export { getRpcHandler as a, dumpFunctions as c, defineRpcFunction as d, RpcFunctionsCollectorBase as f, strictJsonStringify as i, getDefinitionsWithDumps as l, RpcCacheOptions as m, validateDefinitions as n, getRpcResolvedSetupResult as o, RpcCacheManager as p, STRUCTURED_CLONE_PREFIX as r, createClientFromDump as s, validateDefinition as t, createDefineWrapperWithContext as u };
187
+ export { RpcCacheManager as C, RpcFunctionsCollectorBase as S, createClientFromDump as _, getRpcHandler as a, createDefineWrapperWithContext as b, StaticRpcDumpFile as c, StaticRpcDumpManifestStaticEntry as d, StaticRpcDumpManifestValue as f, serializeDumpError as g, reviveDumpError as h, strictJsonStringify as i, StaticRpcDumpManifest as l, collectStaticRpcDump as m, validateDefinitions as n, getRpcResolvedSetupResult as o, StaticRpcDumpSerialization as p, STRUCTURED_CLONE_PREFIX as r, StaticRpcDumpCollection as s, validateDefinition as t, StaticRpcDumpManifestQueryEntry as u, dumpFunctions as v, RpcCacheOptions as w, defineRpcFunction as x, getDefinitionsWithDumps as y };
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { $ as AgentResourceContent, B as EntriesToObject, G as DevToolsRpcSharedStates, H as Thenable, J as DevToolsDiagnosticsHost, K as DevToolsHost, Q as AgentResource, U as DevToolsRpcClientFunctions, V as PartialWithoutId, W as DevToolsRpcServerFunctions, X as AgentHandle, Y as DevToolsDiagnosticsLogger, Z as AgentManifest, _ as RpcStreamingChannel, a as DevframeRuntime, at as EventEmitter, c as defineDevframe, d as DevToolsNodeContext, et as AgentResourceInput, f as DevToolsNodeRpcSession, g as RpcSharedStateHost, h as RpcSharedStateGetOptions, i as DevframeDeploymentKind, it as DevToolsAgentHostEvents, l as ConnectionMeta, m as RpcFunctionsHost, n as DevframeCliOptions, nt as AgentToolInput, o as DevframeSetupInfo, ot as EventUnsubscribe, p as RpcBroadcastOptions, q as DevToolsDiagnosticsDefinition, r as DevframeDefinition, rt as DevToolsAgentHost, s as DevframeSpaOptions, st as EventsMap, t as DevframeBrowserContext, tt as AgentTool, u as DevToolsCapabilities, v as RpcStreamingChannelOptions, y as RpcStreamingHost, z as DevToolsViewHost } from "./devframe-R5Ex5K5L.mjs";
2
- import { C as RpcReturnSchema, h as RpcFunctionDefinition, i as RpcArgsSchema, m as RpcFunctionAgentOptions, x as RpcFunctionType } from "./types-4rdUEi2R.mjs";
3
- import { t as DevToolsNodeRpcSessionMeta } from "./ws-server-DjvlwLuM.mjs";
1
+ import { $ as AgentResourceContent, B as EntriesToObject, G as DevToolsRpcSharedStates, H as Thenable, J as DevToolsDiagnosticsHost, K as DevToolsHost, Q as AgentResource, U as DevToolsRpcClientFunctions, V as PartialWithoutId, W as DevToolsRpcServerFunctions, X as AgentHandle, Y as DevToolsDiagnosticsLogger, Z as AgentManifest, _ as RpcStreamingChannel, a as DevframeRuntime, at as EventEmitter, c as defineDevframe, d as DevToolsNodeContext, et as AgentResourceInput, f as DevToolsNodeRpcSession, g as RpcSharedStateHost, h as RpcSharedStateGetOptions, i as DevframeDeploymentKind, it as DevToolsAgentHostEvents, l as ConnectionMeta, m as RpcFunctionsHost, n as DevframeCliOptions, nt as AgentToolInput, o as DevframeSetupInfo, ot as EventUnsubscribe, p as RpcBroadcastOptions, q as DevToolsDiagnosticsDefinition, r as DevframeDefinition, rt as DevToolsAgentHost, s as DevframeSpaOptions, st as EventsMap, t as DevframeBrowserContext, tt as AgentTool, u as DevToolsCapabilities, v as RpcStreamingChannelOptions, y as RpcStreamingHost, z as DevToolsViewHost } from "./devframe-BXZUBuy6.mjs";
2
+ import { S as RpcFunctionType, g as RpcFunctionDefinition, h as RpcFunctionAgentOptions, i as RpcArgsSchema, w as RpcReturnSchema } from "./types-ip8THGH1.mjs";
3
+ import { t as DevToolsNodeRpcSessionMeta } from "./ws-server-kW8RZXTw.mjs";
4
4
 
5
5
  //#region src/define.d.ts
6
6
  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, DevToolsNodeContext>) => RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevToolsNodeContext>;
@@ -1,5 +1,5 @@
1
- import { P as SharedState, d as DevToolsNodeContext, f as DevToolsNodeRpcSession } from "../devframe-R5Ex5K5L.mjs";
2
- import { n as InternalAnonymousAuthStorage } from "../context-DRa0wGsC.mjs";
1
+ import { P as SharedState, d as DevToolsNodeContext, f as DevToolsNodeRpcSession } from "../devframe-BXZUBuy6.mjs";
2
+ import { n as InternalAnonymousAuthStorage } from "../context-BaX-SZti.mjs";
3
3
 
4
4
  //#region src/node/auth/revoke.d.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { n as revokeAuthToken, t as revokeActiveConnectionsForToken } from "../revoke-DIMz1r7-.mjs";
2
- import { t as humanId } from "../human-id-adtUWQLr.mjs";
1
+ import { n as revokeAuthToken, t as revokeActiveConnectionsForToken } from "../revoke-CWSPBbJH.mjs";
2
+ import { t as humanId } from "../human-id-mPh1HcFO.mjs";
3
3
  //#region src/node/auth/state.ts
4
4
  let pendingAuth = null;
5
5
  let tempAuthToken = generateTempId();
@@ -1,8 +1,8 @@
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";
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-BXZUBuy6.mjs";
2
+ import { S as RpcFunctionsCollectorBase } from "../index-BO4daMzR.mjs";
3
+ import { _ as RpcFunctionDefinitionAny } from "../types-ip8THGH1.mjs";
4
+ import { t as DevToolsNodeRpcSessionMeta } from "../ws-server-kW8RZXTw.mjs";
5
+ import { n as StartedServer, r as startHttpAndWs, t as StartHttpAndWsOptions } from "../server-CgqyJG9m.mjs";
6
6
  import { createLogger, defineDiagnostics } from "logs-sdk";
7
7
  import { BirpcGroup } from "birpc";
8
8
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -160,37 +160,6 @@ declare function createRpcSharedStateServerHost(rpc: RpcFunctionsHost$1): RpcSha
160
160
  */
161
161
  declare function createRpcStreamingServerHost(rpc: RpcFunctionsHost$1): RpcStreamingHost;
162
162
  //#endregion
163
- //#region src/node/static-dump.d.ts
164
- type StaticRpcDumpSerialization = 'json' | 'structured-clone';
165
- interface StaticRpcDumpManifestStaticEntry {
166
- type: 'static';
167
- path: string;
168
- /** Encoder used when this entry's file was written. Default: `'json'`. */
169
- serialization?: StaticRpcDumpSerialization;
170
- }
171
- interface StaticRpcDumpManifestQueryEntry {
172
- type: 'query';
173
- records: Record<string, string>;
174
- fallback?: string;
175
- /** Encoder used when each record/fallback file was written. Default: `'json'`. */
176
- serialization?: StaticRpcDumpSerialization;
177
- }
178
- type StaticRpcDumpManifestValue = StaticRpcDumpManifestStaticEntry | StaticRpcDumpManifestQueryEntry | any;
179
- type StaticRpcDumpManifest = Record<string, StaticRpcDumpManifestValue>;
180
- interface StaticRpcDumpFile {
181
- /** Whether this file was written via `JSON.stringify` or `structured-clone-es.stringify`. */
182
- serialization: StaticRpcDumpSerialization;
183
- /** Function name the file belongs to — used to scope `DF0019` errors during write. */
184
- fnName: string;
185
- /** Payload to encode. */
186
- data: unknown;
187
- }
188
- interface StaticRpcDumpCollection {
189
- manifest: StaticRpcDumpManifest;
190
- files: Record<string, StaticRpcDumpFile>;
191
- }
192
- declare function collectStaticRpcDump(definitions: Iterable<RpcFunctionDefinitionAny>, context: any): Promise<StaticRpcDumpCollection>;
193
- //#endregion
194
163
  //#region src/node/storage.d.ts
195
164
  interface CreateStorageOptions<T extends object> {
196
165
  filepath: string;
@@ -204,4 +173,4 @@ declare function createStorage<T extends object>(options: CreateStorageOptions<T
204
173
  declare function isObject(value: unknown): value is Record<string, any>;
205
174
  declare function normalizeHttpServerUrl(host: string, port: number | string): string;
206
175
  //#endregion
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 };
176
+ export { CreateH3DevToolsHostOptions, CreateHostContextOptions, CreateStorageOptions, DevToolsAgentHost, DevToolsDiagnosticsHost, DevToolsViewHost, RpcFunctionsHost, StartHttpAndWsOptions, StartedServer, createH3DevToolsHost, createHostContext, createRpcSharedStateServerHost, createRpcStreamingServerHost, createStorage, isObject, normalizeHttpServerUrl, startHttpAndWs };