@foldkit/devtools-mcp 0.25.0-canary.1f6776fa7ece → 0.25.0-canary.7ee214268c60

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.
package/README.md CHANGED
@@ -6,7 +6,7 @@ With it attached, agents can:
6
6
 
7
7
  - Read the current Model, or any historical Model by history index
8
8
  - Narrow reads with dot-string paths and summarized payloads to fit token budgets
9
- - List and inspect the Message history, with Command and Mount lifecycle, diffs, and Block chains
9
+ - List and inspect the Message history, with Command and Mount lifecycle, diffs, and Submodel chains
10
10
  - Query history server-side: filter entries by changed Model paths, count Messages by tag, tail the latest entries, and diff the Models at two indices
11
11
  - Read the recorded init Model, the Commands returned from `init`, and the Mounts that fired during the first render
12
12
  - Inspect Runtime state: current index, retained history bounds, pause status
@@ -36,21 +36,17 @@ pnpm add -D @foldkit/devtools-mcp
36
36
  yarn add -D @foldkit/devtools-mcp
37
37
  ```
38
38
 
39
- Set `devTools.dispatch` to `true` when calling `Program.make` to let the agent discover and dispatch Messages. Foldkit derives the dispatch Schema from the completed root Block, including generated envelopes for registered child Blocks. The Runtime rejects a payload that does not match that Schema before it reaches update:
39
+ Pass your `Message` Schema to `Runtime.makeApplication` to let the agent dispatch Messages. The Runtime rejects a payload that does not match the Schema before it reaches update:
40
40
 
41
41
  ```typescript
42
- Program.make({
43
- block: ApplicationBlock,
44
- container,
42
+ Runtime.makeApplication({
45
43
  devTools: {
46
44
  // Rest of your DevTools config
47
- dispatch: true,
45
+ Message,
48
46
  },
49
47
  })
50
48
  ```
51
49
 
52
- If the completed Message Codec needs Services for decoding, `dispatch: true` adds them to the Program's requirements. Supply any remaining decoding Services through `program.provide(...)`; the dispatch opt-in does not provide them.
53
-
54
50
  Restart your dev server, then restart your AI agent. The MCP server will appear with the `foldkit_*` tools attached.
55
51
 
56
52
  The browser bridge runs inside your app, so the MCP server only sees a Runtime while the app is open in a browser tab. Close the tab and the Runtime disappears from `foldkit_list_runtimes`.
@@ -61,29 +57,29 @@ Treat this server as privileged access to the running application. A connected a
61
57
 
62
58
  Keep API keys, passwords, access and refresh tokens, authorization headers, session material, and private personal data out of those values. Long-lived secrets belong behind a server boundary, including in local demos. If the browser must temporarily carry a sensitive value, use Effect `Redacted` with a `Schema.Redacted` field configured with `disallowJsonEncode: true`. `Redacted` protects normal string, JSON, and inspection output; it does not encrypt the value or hide a browser-side credential from the person running the browser.
63
59
 
64
- `excludeFromHistory` is for noisy Messages, not sensitive ones. The resulting Model remains inspectable. External dispatch is disabled by default; read and replay tools remain available. Set `devToolsMcpPort: false` in the Foldkit Vite plugin options to keep the in-browser DevTools without starting the MCP relay, or set `devTools: false` in the application config to disable recording and the browser bridge too.
60
+ `excludeFromHistory` is for noisy Messages, not sensitive ones. The resulting Model remains inspectable. Omitting `DevToolsConfig.Message` disables dispatch only; read and replay tools remain available. Set `devToolsMcpPort: false` in the Foldkit Vite plugin options to keep the in-browser DevTools without starting the MCP relay, or set `devTools: false` in the application config to disable recording and the browser bridge too.
65
61
 
66
62
  ## Tools
67
63
 
68
64
  Every tool except `foldkit_list_runtimes` accepts an optional `runtime_id`. Without one, the tool uses the most recently connected Runtime of the most recently started dev server.
69
65
 
70
- | Tool | Description |
71
- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
72
- | `foldkit_list_runtimes` | Returns metadata for every connected browser tab. Each tab carries the `projectRoot` of the dev server it belongs to, unless `FOLDKIT_DEVTOOLS_MCP_PORT` or `FOLDKIT_DEVTOOLS_MCP_HOST` is set. Agents call this first to discover which Runtime to target. |
73
- | `foldkit_get_model` | Snapshots the current Model. Accepts an optional `path` to narrow to a subtree and `expand` to control summarization. |
74
- | `foldkit_get_model_at` | Snapshots a historical Model after a given history entry. Pass `index: N - 1` to read the Model just before Message `N`. Same `path`/`expand` semantics as `foldkit_get_model`. Indices outside the readable range (older entries are evicted past the rolling buffer) are rejected with the valid bounds. For the initial Model (and the init Commands and Mounts), use `foldkit_get_init`. |
75
- | `foldkit_get_init` | Reads the recorded initial Model, the Commands returned from the application's `init` function, and the Mounts that fired during the first render. Each Command and Mount carries its declared args. Equivalent to selecting the synthetic "init" row in the DevTools panel. |
76
- | `foldkit_get_runtime_state` | Snapshots the Runtime's DevTools state: history bounds, current paused/live status, and whether init is recorded. Useful for understanding what `foldkit_list_messages` and `foldkit_get_message` will see and detecting whether the Runtime is paused. |
77
- | `foldkit_list_messages` | Lists Message history entries. Each entry carries the Message body, Commands triggered (with args), Mounts that started or ended during the resulting render (with args), timestamp, an `isModelChanged` flag, the diff path lists (`changedPaths` / `affectedPaths`), and any extracted Block chain. Filter server-side with `changed_paths_match`, read the latest entries with `from_end`, and paginate forward with `since_index`. |
78
- | `foldkit_count_messages_by_tag` | Counts retained history entries by Message tag, without payloads, sorted by count descending. A cheap reconnaissance call before paging through history: it surfaces the high-frequency Messages worth filtering out, and with `changed_paths_match` it answers which Message tags touch a Model subtree. |
79
- | `foldkit_diff_models` | Diffs the Models at two history indices server-side, returning path-level changes `{ path, before, after }` with summarized values. Each side is `{ _tag: 'Present', value }`, or `{ _tag: 'Absent' }` when the path does not exist on that side. Pass `changed_paths_match` to narrow the diff to a subtree. |
80
- | `foldkit_get_message` | Reads one entry at a given index. The response carries the SerializedEntry only; to inspect the Model around the entry, call `foldkit_get_model_at` with `index - 1` (before) and `index` (after). Use `foldkit_get_init` for the synthetic init entry. |
81
- | `foldkit_list_keyframes` | Returns the indices Foldkit can replay back to. Index `-1` is the initial Model. |
82
- | `foldkit_replay_to_keyframe` | Time-travels the Runtime to a previous state. The Runtime is paused at that snapshot until `foldkit_resume` is called. |
83
- | `foldkit_resume` | Resumes normal execution after a replay. |
84
- | `foldkit_get_message_schema` | Describes the Runtime's Message Schema so agents can construct valid Messages without reading the application source. With no arguments, returns a small variant index (top-level tag names plus payload fields). With `variant_tag` set to a dot-separated path of variant tags (e.g. `"GotChildMessage.Opened"`), narrows the JSON Schema along the chain and collapses deeper unions to summary placeholders. Returns `maybeResult: None` when external dispatch is not enabled. |
85
- | `foldkit_dispatch_message` | Dispatches a Message into the Runtime as if your application produced it. The Runtime decodes the payload against your Schema and returns a clean error if it does not match. |
86
- | `foldkit_dispatch_messages` | Dispatches an ordered batch of 1 to 100 Messages in one call, first to last. The Runtime validates every payload before dispatching any of them, so one invalid entry rejects the whole batch with its zero-based position and nothing is dispatched. The response reports the predicted history index for each Message. |
66
+ | Tool | Description |
67
+ | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
68
+ | `foldkit_list_runtimes` | Returns metadata for every connected browser tab. Each tab carries the `projectRoot` of the dev server it belongs to, unless `FOLDKIT_DEVTOOLS_MCP_PORT` or `FOLDKIT_DEVTOOLS_MCP_HOST` is set. Agents call this first to discover which Runtime to target. |
69
+ | `foldkit_get_model` | Snapshots the current Model. Accepts an optional `path` to narrow to a subtree and `expand` to control summarization. |
70
+ | `foldkit_get_model_at` | Snapshots a historical Model after a given history entry. Pass `index: N - 1` to read the Model just before Message `N`. Same `path`/`expand` semantics as `foldkit_get_model`. Indices outside the readable range (older entries are evicted past the rolling buffer) are rejected with the valid bounds. For the initial Model (and the init Commands and Mounts), use `foldkit_get_init`. |
71
+ | `foldkit_get_init` | Reads the recorded initial Model, the Commands returned from the application's `init` function, and the Mounts that fired during the first render. Each Command and Mount carries its declared args. Equivalent to selecting the synthetic "init" row in the DevTools panel. |
72
+ | `foldkit_get_runtime_state` | Snapshots the Runtime's DevTools state: history bounds, current paused/live status, and whether init is recorded. Useful for understanding what `foldkit_list_messages` and `foldkit_get_message` will see and detecting whether the Runtime is paused. |
73
+ | `foldkit_list_messages` | Lists Message history entries. Each entry carries the Message body, Commands triggered (with args), Mounts that started or ended during the resulting render (with args), timestamp, an `isModelChanged` flag, the diff path lists (`changedPaths` / `affectedPaths`), and any extracted Submodel chain. Filter server-side with `changed_paths_match`, read the latest entries with `from_end`, and paginate forward with `since_index`. |
74
+ | `foldkit_count_messages_by_tag` | Counts retained history entries by Message tag, without payloads, sorted by count descending. A cheap reconnaissance call before paging through history: it surfaces the high-frequency Messages worth filtering out, and with `changed_paths_match` it answers which Message tags touch a Model subtree. |
75
+ | `foldkit_diff_models` | Diffs the Models at two history indices server-side, returning path-level changes `{ path, before, after }` with summarized values. Each side is `{ _tag: 'Present', value }`, or `{ _tag: 'Absent' }` when the path does not exist on that side. Pass `changed_paths_match` to narrow the diff to a subtree. |
76
+ | `foldkit_get_message` | Reads one entry at a given index. The response carries the SerializedEntry only; to inspect the Model around the entry, call `foldkit_get_model_at` with `index - 1` (before) and `index` (after). Use `foldkit_get_init` for the synthetic init entry. |
77
+ | `foldkit_list_keyframes` | Returns the indices Foldkit can replay back to. Index `-1` is the initial Model. |
78
+ | `foldkit_replay_to_keyframe` | Time-travels the Runtime to a previous state. The Runtime is paused at that snapshot until `foldkit_resume` is called. |
79
+ | `foldkit_resume` | Resumes normal execution after a replay. |
80
+ | `foldkit_get_message_schema` | Describes the Runtime's Message Schema so agents can construct valid Messages without reading the application source. With no arguments, returns a small variant index (top-level tag names plus payload fields). With `variant_tag` set to a dot-separated path of variant tags (e.g. `"GotChildMessage.Opened"`), narrows the JSON Schema along the chain and collapses deeper unions to summary placeholders. Returns `maybeResult: None` when the Runtime hasn't configured `DevToolsConfig.Message`. |
81
+ | `foldkit_dispatch_message` | Dispatches a Message into the Runtime as if your application produced it. The Runtime decodes the payload against your Schema and returns a clean error if it does not match. |
82
+ | `foldkit_dispatch_messages` | Dispatches an ordered batch of 1 to 100 Messages in one call, first to last. The Runtime validates every payload before dispatching any of them, so one invalid entry rejects the whole batch with its zero-based position and nothing is dispatched. The response reports the predicted history index for each Message. |
87
83
 
88
84
  ### Reading the Model efficiently
89
85
 
@@ -111,8 +107,6 @@ Three components cooperate:
111
107
 
112
108
  Multiple browser tabs can be connected at once and each is addressable by its connection id. Tabs that close (gracefully or not) are pruned from the live Runtime list automatically.
113
109
 
114
- The bridge derives JSON Schema for its transport boundary. A Message payload must have a supported JSON representation to be dispatched from MCP. Browser-memory values such as `File` cannot be constructed through this connection.
115
-
116
110
  ## Configuration
117
111
 
118
112
  An agent started at a workspace root can inspect every Foldkit app running under it. If no dev server runs under the agent's project root, the MCP server finds the nearest root that encloses it. This also lets an agent started in `src/` or through a symlink find the app. `foldkit_list_runtimes` lists the Runtimes from every matching dev server and includes each server's `projectRoot`.
@@ -133,7 +127,7 @@ On Windows, both processes use PowerShell to check the directory's owner, access
133
127
  ## Notes
134
128
 
135
129
  - The MCP bridge shares its lifecycle with Foldkit DevTools. If you set `devTools: false` in your program config, the bridge does not start and the Runtime is invisible to MCP. The default enables the bridge in dev.
136
- - External dispatch and Message Schema discovery require `devTools: { dispatch: true }`. The other tools still work with the default configuration.
130
+ - Without `Message` in your `DevToolsConfig`, dispatch is rejected. The other (read-only) tools still work.
137
131
  - The relay only runs at dev time. Production builds never include the relay or the bridge, regardless of any `show` setting.
138
132
 
139
133
  ## Documentation
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sources":["../src/install.ts"],"names":[],"mappings":"AAoEA;;;;;GAKG;AACH,eAAO,MAAM,OAAO,QAAO,IAkB1B,CAAA"}
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAoEA;;;;;GAKG;AACH,eAAO,MAAM,OAAO,QAAO,IAkB1B,CAAA"}
package/dist/install.js CHANGED
@@ -36,9 +36,9 @@ const printNextSteps = (alreadyRegistered) => {
36
36
  console.log('');
37
37
  console.log('Next steps:');
38
38
  console.log('');
39
- console.log(' 1. Enable Message dispatch in Program.make or Program.makeElement:');
39
+ console.log(' 1. Pass your Message Schema to Runtime.makeApplication (enables dispatch):');
40
40
  console.log('');
41
- console.log(' devTools: { dispatch: true }');
41
+ console.log(' devTools: { Message }');
42
42
  console.log('');
43
43
  console.log(' 2. Start your dev server, then restart your AI agent (Claude Code, Cursor, etc.).');
44
44
  console.log('');
@@ -1 +1 @@
1
- {"version":3,"file":"relayClient.d.ts","sources":["../src/relayClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,KAAK,EAKV,MAAM,EAKN,MAAM,EASP,MAAM,QAAQ,CAAA;AACf,OAAO,EACL,OAAO,EAEP,KAAK,QAAQ,EAEb,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAA;AAIlC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAqDrD,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC;IACnC,OAAO,EAAE,OAAO,WAAW,CAAC,IAAI,CAAA;IAChC,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;CACxC,CAAC,CAAA;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC,CAAA;IAChE,WAAW,EAAE,CACX,OAAO,EAAE,OAAO,OAAO,CAAC,IAAI,EAC5B,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAClC,MAAM,CAAC,MAAM,CAAC,OAAO,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,CAAA;IACpE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;CAC3B,CAAC,CAAA;AAiBF;;;GAGG;AACH,eAAO,MAAM,WAAW,UAAW,KAAK,KAAG,MACe,CAAA;AA4H1D,eAAO,MAAM,eAAe,GAAI,QAAQ,kBACtB,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,KACzE,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,KAA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}
@@ -1 +1 @@
1
- {"version":3,"file":"relayLocation.d.ts","sources":["../src/relayLocation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAGzD,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAE3B,MAAM,oBAAoB,CAAA;AAS3B,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;IAC9B,mBAAmB,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC1C,mBAAmB,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC1C,WAAW,EAAE,MAAM,CAAA;CACpB,CAAC,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;CACxC,CAAC,CAAA;AAEF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAe5B,CAAA;AAmDrB,eAAO,MAAM,kBAAkB,aACnB,QAAQ,KACjB,MAAM,CAAC,MAAM,CAAC,MAAM,CAiBtB,CAAA;AAED,eAAO,MAAM,mBAAmB,aACpB,QAAQ,kBACF,mBAAmB,KAClC,MAAM,CAAC,MAAM,CACd,aAAa,CAAC,WAAW,CAAC,EAC1B,KAAK,EACL,qBAAqB,GAAG,mBAAmB,CAAC,mBAAmB,CAmB7D,CAAA"}
1
+ {"version":3,"file":"relayLocation.d.ts","sourceRoot":"","sources":["../src/relayLocation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAGz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G,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,CAAA;AAE/D,eAAO,MAAM,6BAA6B,SAClC,aAAa,mBACF,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KACrC,MAAM,CAAC,MAAM,CAAC,MAAM,CAkBnB,CAAA;AA2OJ,eAAO,MAAM,uBAAuB,SAC5B,MAAM,kBACI,MAAM,KACrB,MAAM,CAAC,MAAM,CAAC,MAAM,CAwCtB,CAAA;AAuFD,eAAO,MAAM,4BAA4B,gBAC1B,aAAa,CAAC,MAAM,CAAC,kBAClB,MAAM,KACrB,MAAM,CAAC,MAAM,CAAC,MAAM,CAwEtB,CAAA;AAED,eAAO,MAAM,cAAc,eAAgB,MAAM,KAAG,MAOjD,CAAA;AAEH,eAAO,MAAM,sBAAsB,cACtB,MAAM,YACP,MAAM,KACf,MAAM,CAAC,MAAM,CAAC,MAAM,CAGgB,CAAA;AAuHvC,eAAO,MAAM,qBAAqB,oBACf,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,aAC3B,MAAM,KAChB,MAAM,CAAC,MAAM,CACd,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EACrB,KAAK,EACL,mBAAmB,CAAC,mBAAmB,CAQrC,CAAA;AA+BJ,eAAO,MAAM,kBAAkB,EAAE,kBAgFhC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sources":["../src/server.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":""}
package/dist/server.js CHANGED
@@ -31400,7 +31400,7 @@ const optionalProcessor = (schema, ctx, _json, params) => {
31400
31400
  seen.ref = def.innerType;
31401
31401
  };
31402
31402
  //#endregion
31403
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.31.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
31403
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
31404
31404
  function isZ4Schema(s) {
31405
31405
  return !!s._zod;
31406
31406
  }
@@ -32424,7 +32424,7 @@ function datetime(params) {
32424
32424
  return /* @__PURE__ */ _isoDateTime(ZodISODateTime, params);
32425
32425
  }
32426
32426
  //#endregion
32427
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.31.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
32427
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
32428
32428
  const LATEST_PROTOCOL_VERSION = "2025-11-25";
32429
32429
  const SUPPORTED_PROTOCOL_VERSIONS = [
32430
32430
  LATEST_PROTOCOL_VERSION,
@@ -34319,7 +34319,7 @@ var UrlElicitationRequiredError = class extends McpError {
34319
34319
  }
34320
34320
  };
34321
34321
  //#endregion
34322
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.31.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
34322
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
34323
34323
  /**
34324
34324
  * Experimental task interfaces for MCP SDK.
34325
34325
  * WARNING: These APIs are experimental and may change without notice.
@@ -34336,7 +34336,7 @@ function isTerminal(status) {
34336
34336
  return status === "completed" || status === "failed" || status === "cancelled";
34337
34337
  }
34338
34338
  //#endregion
34339
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.31.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
34339
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
34340
34340
  function getMethodLiteral(schema) {
34341
34341
  const methodSchema = getObjectShape(schema)?.method;
34342
34342
  if (!methodSchema) throw new Error("Schema is missing a method literal");
@@ -41775,7 +41775,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41775
41775
  exports.default = formatsPlugin;
41776
41776
  }));
41777
41777
  //#endregion
41778
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.31.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
41778
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
41779
41779
  var import_ajv = /* @__PURE__ */ __toESM(require_ajv(), 1);
41780
41780
  var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
41781
41781
  function createDefaultAjvInstance() {
@@ -41851,7 +41851,7 @@ var AjvJsonSchemaValidator = class {
41851
41851
  }
41852
41852
  };
41853
41853
  //#endregion
41854
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.31.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
41854
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
41855
41855
  /**
41856
41856
  * Experimental server task features for MCP SDK.
41857
41857
  * WARNING: These APIs are experimental and may change without notice.
@@ -42069,7 +42069,7 @@ var ExperimentalServerTasks = class {
42069
42069
  }
42070
42070
  };
42071
42071
  //#endregion
42072
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.31.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
42072
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
42073
42073
  /**
42074
42074
  * Experimental task capability assertion helpers.
42075
42075
  * WARNING: These APIs are experimental and may change without notice.
@@ -42114,7 +42114,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
42114
42114
  }
42115
42115
  }
42116
42116
  //#endregion
42117
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.31.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
42117
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
42118
42118
  /**
42119
42119
  * An MCP server on top of a pluggable transport.
42120
42120
  *
@@ -42193,7 +42193,14 @@ var Server = class extends Protocol {
42193
42193
  setRequestHandler(requestSchema, handler) {
42194
42194
  const methodSchema = getObjectShape(requestSchema)?.method;
42195
42195
  if (!methodSchema) throw new Error("Schema is missing a method literal");
42196
- const methodValue = getLiteralValue(methodSchema);
42196
+ let methodValue;
42197
+ if (isZ4Schema(methodSchema)) {
42198
+ const v4Schema = methodSchema;
42199
+ methodValue = (v4Schema._zod?.def)?.value ?? v4Schema.value;
42200
+ } else {
42201
+ const v3Schema = methodSchema;
42202
+ methodValue = v3Schema._def?.value ?? v3Schema.value;
42203
+ }
42197
42204
  if (typeof methodValue !== "string") throw new Error("Schema method literal must be a string");
42198
42205
  if (methodValue === "tools/call") {
42199
42206
  const wrappedHandler = async (request, extra) => {
@@ -42436,18 +42443,13 @@ var Server = class extends Protocol {
42436
42443
  return this.notification({ method: "notifications/prompts/list_changed" });
42437
42444
  }
42438
42445
  };
42446
+ //#endregion
42447
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
42439
42448
  /**
42440
42449
  * Buffers a continuous stdio stream into discrete JSON-RPC messages.
42441
42450
  */
42442
42451
  var ReadBuffer = class {
42443
- constructor(options) {
42444
- this._maxBufferSize = options?.maxBufferSize ?? 10485760;
42445
- }
42446
42452
  append(chunk) {
42447
- if ((this._buffer?.length ?? 0) + chunk.length > this._maxBufferSize) {
42448
- this.clear();
42449
- throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
42450
- }
42451
42453
  this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
42452
42454
  }
42453
42455
  readMessage() {
@@ -42469,30 +42471,25 @@ function serializeMessage(message) {
42469
42471
  return JSON.stringify(message) + "\n";
42470
42472
  }
42471
42473
  //#endregion
42472
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.31.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
42474
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.6.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
42473
42475
  /**
42474
42476
  * Server transport for stdio: this communicates with an MCP client by reading from the current process' stdin and writing to stdout.
42475
42477
  *
42476
42478
  * This transport is only available in Node.js environments.
42477
42479
  */
42478
42480
  var StdioServerTransport = class {
42479
- constructor(_stdin = process$1.stdin, _stdout = process$1.stdout, options) {
42481
+ constructor(_stdin = process$1.stdin, _stdout = process$1.stdout) {
42480
42482
  this._stdin = _stdin;
42481
42483
  this._stdout = _stdout;
42484
+ this._readBuffer = new ReadBuffer();
42482
42485
  this._started = false;
42483
42486
  this._ondata = (chunk) => {
42484
- try {
42485
- this._readBuffer.append(chunk);
42486
- this.processReadBuffer();
42487
- } catch (error) {
42488
- this.onerror?.(error);
42489
- this.close().catch(() => {});
42490
- }
42487
+ this._readBuffer.append(chunk);
42488
+ this.processReadBuffer();
42491
42489
  };
42492
42490
  this._onerror = (error) => {
42493
42491
  this.onerror?.(error);
42494
42492
  };
42495
- this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
42496
42493
  }
42497
42494
  /**
42498
42495
  * Starts listening for messages on stdin.
@@ -42556,9 +42553,9 @@ const printNextSteps = (alreadyRegistered) => {
42556
42553
  console.log("");
42557
42554
  console.log("Next steps:");
42558
42555
  console.log("");
42559
- console.log(" 1. Enable Message dispatch in Program.make or Program.makeElement:");
42556
+ console.log(" 1. Pass your Message Schema to Runtime.makeApplication (enables dispatch):");
42560
42557
  console.log("");
42561
- console.log(" devTools: { dispatch: true }");
42558
+ console.log(" devTools: { Message }");
42562
42559
  console.log("");
42563
42560
  console.log(" 2. Start your dev server, then restart your AI agent (Claude Code, Cursor, etc.).");
42564
42561
  console.log("");
@@ -42640,7 +42637,6 @@ const getDirectPropertyNames = (propertySignatures) => {
42640
42637
  }
42641
42638
  return names;
42642
42639
  };
42643
- const callableTaggedStructs = /* @__PURE__ */ new WeakSet();
42644
42640
  const makeCallable = (tag, fields) => {
42645
42641
  const schema = TaggedStruct(tag, fields);
42646
42642
  const propertyNames = Object.hasOwn(fields, "_tag") ? void 0 : getDirectPropertyNames(schema.ast.propertySignatures);
@@ -42660,7 +42656,7 @@ const makeCallable = (tag, fields) => {
42660
42656
  }
42661
42657
  return output;
42662
42658
  } : make;
42663
- const callable = new Proxy(function() {}, {
42659
+ return new Proxy(function() {}, {
42664
42660
  apply(_target, _thisArg, argumentsList) {
42665
42661
  return construct(argumentsList[0]);
42666
42662
  },
@@ -42674,8 +42670,6 @@ const makeCallable = (tag, fields) => {
42674
42670
  return Reflect.getPrototypeOf(schema);
42675
42671
  }
42676
42672
  });
42677
- callableTaggedStructs.add(callable);
42678
- return callable;
42679
42673
  };
42680
42674
  const reservedUnionPropertyNames = /* @__PURE__ */ new Set(["members", "subset"]);
42681
42675
  const taggedUnionTypeOnlyPropertyNames = /* @__PURE__ */ new Set([
@@ -42754,18 +42748,18 @@ function defineTaggedUnion(casesByTag) {
42754
42748
  }
42755
42749
  //#endregion
42756
42750
  //#region ../foldkit/src/devTools/protocol.ts
42757
- /** A serialized Command produced during a Message dispatch (or `init`). `args` is `Some` when the Command declared an args record. `maybeBlockPath` is `None` until the result Message resolves, `Some([])` for a top-level result, and `Some(tags)` for a Block-routed result. */
42751
+ /** A serialized Command produced during a Message dispatch (or `init`). `args` is `Some` when the Command declared an args record. `maybeSubmodelPath` is `None` until the result Message resolves, `Some([])` for a top-level result, and `Some(tags)` for a Submodel-routed result. */
42758
42752
  const SerializedCommand = Struct({
42759
42753
  name: String$2,
42760
42754
  args: OptionFromNullOr(Record(String$2, Unknown)),
42761
- maybeBlockPath: OptionFromNullOr(ArraySchema(String$2))
42755
+ maybeSubmodelPath: OptionFromNullOr(ArraySchema(String$2))
42762
42756
  });
42763
42757
  /** A serialized Mount lifecycle event (start or end). `args` is `Some` when the Mount's definition declared an args record, and carries the runtime values used to construct the MountAction instance. */
42764
42758
  const SerializedMount = Struct({
42765
42759
  name: String$2,
42766
42760
  args: OptionFromNullOr(Record(String$2, Unknown))
42767
42761
  });
42768
- /** A serialized history entry as it appears on the wire. `blockPath` lists `Got<Child>Message` wrapper tags from outer to inner when the entry came up through a Block chain; `maybeLeafTag` is `Some` with the innermost child Message tag when one exists. `mountStarts` lists Mounts that fired during the render after this Message; `mountEnds` lists Mounts whose elements were unmounted during that render. The Messages dispatched by mount Effects appear as their own entries elsewhere in history. */
42762
+ /** A serialized history entry as it appears on the wire. `submodelPath` lists `Got<Child>Message` wrapper tags from outer to inner when the entry came up through a Submodel chain; `maybeLeafTag` is `Some` with the innermost child Message tag when one exists. `mountStarts` lists Mounts that fired during the render after this Message; `mountEnds` lists Mounts whose elements were unmounted during that render. The Messages dispatched by mount Effects appear as their own entries elsewhere in history. */
42769
42763
  const SerializedEntry = Struct({
42770
42764
  index: Number$1,
42771
42765
  tag: String$2,
@@ -42777,7 +42771,7 @@ const SerializedEntry = Struct({
42777
42771
  isModelChanged: Boolean$1,
42778
42772
  changedPaths: ArraySchema(String$2),
42779
42773
  affectedPaths: ArraySchema(String$2),
42780
- blockPath: ArraySchema(String$2),
42774
+ submodelPath: ArraySchema(String$2),
42781
42775
  maybeLeafTag: OptionFromNullOr(String$2)
42782
42776
  });
42783
42777
  /** Metadata about a single keyframe. The index identifies the point in history where the runtime can replay back to. */
@@ -47332,7 +47326,7 @@ const DispatchMessagesInput = Struct({
47332
47326
  });
47333
47327
  const GetMessageSchemaInput = Struct({
47334
47328
  runtime_id: RuntimeIdField,
47335
- variant_tag: optional$1(String$2.annotate({ description: "Optional dot-separated path of variant `_tag` values. When omitted, the tool returns a small variant index (tag names plus payload field names plus a tagged-union indicator) so agents can enumerate the top-level union cheaply. When provided, the tool walks the path through each variant's single tagged-union payload field, narrows the schema along the chain, and collapses any union deeper than the path to a `{ \"_summary\": \"union\", \"variants\": [...] }` placeholder. Extend the path to drill further. Examples: `\"ScrolledSidebar\"` (one top-level variant), `\"GotMobileMenuDialogMessage.GotAnimationMessage\"` (two levels of a Block chain)." }))
47329
+ variant_tag: optional$1(String$2.annotate({ description: "Optional dot-separated path of variant `_tag` values. When omitted, the tool returns a small variant index (tag names plus payload field names plus a tagged-union indicator) so agents can enumerate the top-level union cheaply. When provided, the tool walks the path through each variant's single tagged-union payload field, narrows the schema along the chain, and collapses any union deeper than the path to a `{ \"_summary\": \"union\", \"variants\": [...] }` placeholder. Extend the path to drill further. Examples: `\"ScrolledSidebar\"` (one top-level variant), `\"GotMobileMenuDialogMessage.GotAnimationMessage\"` (two levels of a Submodel chain)." }))
47336
47330
  });
47337
47331
  /**
47338
47332
  * Extract the inner JSON Schema from Effect's `JsonSchema.Document` wrapper.
@@ -47441,13 +47435,13 @@ const buildTools = (relayClient) => [
47441
47435
  },
47442
47436
  {
47443
47437
  name: "foldkit_get_message",
47444
- description: "Read a single Message history entry by absolute index. The response carries the SerializedEntry (tag, message body, commands, mountStarts, mountEnds, timestamp, `isModelChanged`, `changedPaths` for leaf-level mutations, `affectedPaths` adding their ancestor paths). Each entry in `commands` carries the Command name, `args` (`Some(record)` when the Command declared an args schema, `None` otherwise), and `maybeBlockPath` (`None` before the result resolves, `Some([])` for a resolved top-level Command, or `Some(tags)` for a resolved Block Command). `mountStarts` lists Mounts that fired during the render after this Message; `mountEnds` lists Mounts whose elements were unmounted during that render. Each Mount carries its `name` and `args` (`Some(record)` when the Mount declared an args schema, `None` otherwise). For Block-routed entries (tag matches `Got*Message`), the entry also carries `blockPath` listing wrapper tags from outer to inner and `maybeLeafTag` naming the innermost child Message. Model snapshots are not included; call foldkit_get_model_at with `index - 1` (before) and `index` (after) to inspect Model state around the entry.",
47438
+ description: "Read a single Message history entry by absolute index. The response carries the SerializedEntry (tag, message body, commands, mountStarts, mountEnds, timestamp, `isModelChanged`, `changedPaths` for leaf-level mutations, `affectedPaths` adding their ancestor paths). Each entry in `commands` carries the Command name, `args` (`Some(record)` when the Command declared an args schema, `None` otherwise), and `maybeSubmodelPath` (`None` before the result resolves, `Some([])` for a resolved top-level Command, or `Some(tags)` for a resolved Submodel Command). `mountStarts` lists Mounts that fired during the render after this Message; `mountEnds` lists Mounts whose elements were unmounted during that render. Each Mount carries its `name` and `args` (`Some(record)` when the Mount declared an args schema, `None` otherwise). For Submodel-routed entries (tag matches `Got*Message`), the entry also carries `submodelPath` listing wrapper tags from outer to inner and `maybeLeafTag` naming the innermost child Message. Model snapshots are not included; call foldkit_get_model_at with `index - 1` (before) and `index` (after) to inspect Model state around the entry.",
47445
47439
  inputSchema: toInputSchema(GetMessageInput),
47446
47440
  handle: runRuntimeTool(GetMessageInput, ({ index }) => Request.RequestGetMessage({ index }), relayClient)
47447
47441
  },
47448
47442
  {
47449
47443
  name: "foldkit_get_init",
47450
- description: "Read the runtime's initial Model, the Commands returned from the application's `init` function, and the Mounts that fired during the first render. The init entry is the synthetic row at index -1 in the DevTools panel; this tool exposes the same data without time-travelling the runtime. `maybeModel` is `None` until the runtime has finished its first render and recorded init, then stays `Some` for the rest of the runtime's life. `commands` lists init-time Commands in the order they were produced, each with its name, `args` (`Some(record)` when the Command declared an args schema, `None` otherwise), and `maybeBlockPath` (`None` before the result resolves, `Some([])` for a resolved top-level Command, or `Some(tags)` for a resolved Block Command); `mountStarts` lists Mounts whose elements appeared in the initial render, each with its name and `args` (`Some(record)` when the Mount declared an args schema, `None` otherwise).",
47444
+ description: "Read the runtime's initial Model, the Commands returned from the application's `init` function, and the Mounts that fired during the first render. The init entry is the synthetic row at index -1 in the DevTools panel; this tool exposes the same data without time-travelling the runtime. `maybeModel` is `None` until the runtime has finished its first render and recorded init, then stays `Some` for the rest of the runtime's life. `commands` lists init-time Commands in the order they were produced, each with its name, `args` (`Some(record)` when the Command declared an args schema, `None` otherwise), and `maybeSubmodelPath` (`None` before the result resolves, `Some([])` for a resolved top-level Command, or `Some(tags)` for a resolved Submodel Command); `mountStarts` lists Mounts whose elements appeared in the initial render, each with its name and `args` (`Some(record)` when the Mount declared an args schema, `None` otherwise).",
47451
47445
  inputSchema: toInputSchema(GetInitInput),
47452
47446
  handle: runRuntimeTool(GetInitInput, () => Request.RequestGetInit(), relayClient)
47453
47447
  },
@@ -47477,19 +47471,19 @@ const buildTools = (relayClient) => [
47477
47471
  },
47478
47472
  {
47479
47473
  name: "foldkit_get_message_schema",
47480
- description: "Describe the Message Schema for a Foldkit runtime so agents can construct valid payloads for `foldkit_dispatch_message`. Call with no arguments to receive a small variant index (every top-level variant's `_tag`, its payload field names, and which payload fields are themselves tagged-union shapes). Then call with `variant_tag: \"ChosenVariant\"` to drill in. The argument is a dot-separated path of variant `_tag` values: each segment names a variant, and the walker steps through the variant's single tagged-union payload field to reach the next. So `\"GotMobileMenuDialogMessage\"` narrows one level; `\"GotMobileMenuDialogMessage.GotAnimationMessage\"` narrows two levels of a Block chain. Discriminated unions deeper than the supplied path collapse to `{ \"_summary\": \"union\", \"variants\": [...] }` placeholders so the response stays compact even for deeply-nested apps; extend the path to drill further. `Schema.Option` fields render as `anyOf: [{_tag: \"Some\", value}, {_tag: \"None\"}]`. The full document follows the JSON Schema draft-2020-12 shape from `Schema.toJsonSchemaDocument`: `{ dialect, schema, definitions }`. Returns `maybeResult: None` when the Program has not enabled `devTools.dispatch` (dispatch is also unavailable). Fields with no JSON representation, notably `Schema.instanceOf(File)` for user-uploaded files, render as `{type: \"null\"}`; those variants can't be dispatched via MCP because their values live in browser memory.",
47474
+ description: "Describe the Message Schema for a Foldkit runtime so agents can construct valid payloads for `foldkit_dispatch_message`. Call with no arguments to receive a small variant index (every top-level variant's `_tag`, its payload field names, and which payload fields are themselves tagged-union shapes). Then call with `variant_tag: \"ChosenVariant\"` to drill in. The argument is a dot-separated path of variant `_tag` values: each segment names a variant, and the walker steps through the variant's single tagged-union payload field to reach the next. So `\"GotMobileMenuDialogMessage\"` narrows one level; `\"GotMobileMenuDialogMessage.GotAnimationMessage\"` narrows two levels of a Submodel chain. Discriminated unions deeper than the supplied path collapse to `{ \"_summary\": \"union\", \"variants\": [...] }` placeholders so the response stays compact even for deeply-nested apps; extend the path to drill further. `Schema.Option` fields render as `anyOf: [{_tag: \"Some\", value}, {_tag: \"None\"}]`. The full document follows the JSON Schema draft-2020-12 shape from `Schema.toJsonSchemaDocument`: `{ dialect, schema, definitions }`. Returns `maybeResult: None` when the runtime hasn't configured `DevToolsConfig.Message` (dispatch is also unavailable). Fields with no JSON representation, notably `Schema.instanceOf(File)` for user-uploaded files, render as `{type: \"null\"}`; those variants can't be dispatched via MCP because their values live in browser memory.",
47481
47475
  inputSchema: toInputSchema(GetMessageSchemaInput),
47482
47476
  handle: runRuntimeTool(GetMessageSchemaInput, ({ variant_tag }) => Request.RequestGetMessageSchema({ maybeVariantTag: fromNullishOr(variant_tag) }), relayClient)
47483
47477
  },
47484
47478
  {
47485
47479
  name: "foldkit_dispatch_message",
47486
- description: "Dispatch a Message into a Foldkit runtime, as if the application itself produced it. Requires `devTools: { dispatch: true }` on the Program; without it, dispatch is rejected. Call `foldkit_get_message_schema` with no arguments to enumerate the variants, then with `variant_tag` to learn one variant's exact payload shape, before constructing the Message object. The runtime decodes the payload and returns a clean error if it doesn't match. Messages configured with excludeFromHistory are rejected before execution. A successful response identifies the confirmed recorded history entry. A child Message that becomes stale before queued execution is discarded and returns an error. To dispatch several Messages in order with one call, use foldkit_dispatch_messages.",
47480
+ description: "Dispatch a Message into a Foldkit runtime, as if the application itself produced it. Requires the runtime to have configured DevToolsConfig.Message; without it, dispatch is rejected. Call `foldkit_get_message_schema` with no arguments to enumerate the variants, then with `variant_tag` to learn one variant's exact payload shape, before constructing the Message object. The runtime decodes the payload and returns a clean error if it doesn't match. To dispatch several Messages in order with one call, use foldkit_dispatch_messages.",
47487
47481
  inputSchema: toInputSchema(DispatchMessageInput),
47488
47482
  handle: runRuntimeTool(DispatchMessageInput, ({ message }) => Request.RequestDispatchMessage({ message }), relayClient)
47489
47483
  },
47490
47484
  {
47491
47485
  name: "foldkit_dispatch_messages",
47492
- description: `Dispatch an ordered batch of Messages into a Foldkit runtime in one call, first to last, as if the application produced them in quick succession. Prefer this over repeated foldkit_dispatch_message calls when staging state that takes several Messages: reproducing a bug, filling a form, or building a history fixture. Takes 1 to 100 Messages. Validation is all-or-nothing: the runtime decodes every payload against the Message Schema before dispatching any of them, and one invalid entry rejects the whole batch with an error naming its zero-based position, so there is never a partially applied prefix to clean up. Messages excluded from history are rejected before dispatch. On success, acceptedAtIndices contains the exact recorded history indices in request order. A Message whose captured child occurrence becomes stale before queued execution is omitted, while unrelated Messages recorded between batch entries keep their own indices. Requires devTools: { dispatch: true }, like foldkit_dispatch_message.`,
47486
+ description: `Dispatch an ordered batch of Messages into a Foldkit runtime in one call, first to last, as if the application produced them in quick succession. Prefer this over repeated foldkit_dispatch_message calls when staging state that takes several Messages: reproducing a bug, filling a form, or building a history fixture. Takes 1 to 100 Messages. Validation is all-or-nothing: the runtime decodes every payload against the Message Schema before dispatching any of them, and one invalid entry rejects the whole batch with an error naming its zero-based position, so there is never a partially applied prefix to clean up. On success the response carries acceptedAtIndices, the predicted history index for each Message in request order; the runtime may still record its own Messages between entries (for example a Command completing mid-burst), exactly as with rapid user input, and Messages excluded from history via excludeFromHistory are dispatched but never recorded, so entries after one land below their predicted index. Requires DevToolsConfig.Message, like foldkit_dispatch_message.`,
47493
47487
  inputSchema: toInputSchema(DispatchMessagesInput),
47494
47488
  handle: runRuntimeTool(DispatchMessagesInput, ({ messages }) => Request.RequestDispatchMessages({ messages }), relayClient)
47495
47489
  },
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAkB,MAAM,QAAQ,CAAA;AAOtD,OAAO,EAEL,KAAK,WAAW,EAEjB,MAAM,kBAAkB,CAAA;AA0LzB,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAA;IAChE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC,CAAA;AAEF,8HAA8H;AAC9H,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;CACzD,CAAC,CAAA;AAyEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,gBACR,WAAW,KACvB,aAAa,CAAC,cAAc,CAsM9B,CAAA"}
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAkB,MAAM,QAAQ,CAAA;AAOtD,OAAO,EAEL,KAAK,WAAW,EAEjB,MAAM,kBAAkB,CAAA;AA0LzB,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAA;IAChE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC,CAAA;AAEF,8HAA8H;AAC9H,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;CACzD,CAAC,CAAA;AAyEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,gBACR,WAAW,KACvB,aAAa,CAAC,cAAc,CAsM9B,CAAA"}
package/dist/tools.js CHANGED
@@ -104,7 +104,7 @@ const DispatchMessagesInput = Schema.Struct({
104
104
  }),
105
105
  });
106
106
  const VariantTagField = Schema.optional(Schema.String.annotate({
107
- description: 'Optional dot-separated path of variant `_tag` values. When omitted, the tool returns a small variant index (tag names plus payload field names plus a tagged-union indicator) so agents can enumerate the top-level union cheaply. When provided, the tool walks the path through each variant\'s single tagged-union payload field, narrows the schema along the chain, and collapses any union deeper than the path to a `{ "_summary": "union", "variants": [...] }` placeholder. Extend the path to drill further. Examples: `"ScrolledSidebar"` (one top-level variant), `"GotMobileMenuDialogMessage.GotAnimationMessage"` (two levels of a Block chain).',
107
+ description: 'Optional dot-separated path of variant `_tag` values. When omitted, the tool returns a small variant index (tag names plus payload field names plus a tagged-union indicator) so agents can enumerate the top-level union cheaply. When provided, the tool walks the path through each variant\'s single tagged-union payload field, narrows the schema along the chain, and collapses any union deeper than the path to a `{ "_summary": "union", "variants": [...] }` placeholder. Extend the path to drill further. Examples: `"ScrolledSidebar"` (one top-level variant), `"GotMobileMenuDialogMessage.GotAnimationMessage"` (two levels of a Submodel chain).',
108
108
  }));
109
109
  const GetMessageSchemaInput = Schema.Struct({
110
110
  runtime_id: RuntimeIdField,
@@ -212,13 +212,13 @@ export const buildTools = (relayClient) => [
212
212
  },
213
213
  {
214
214
  name: 'foldkit_get_message',
215
- description: 'Read a single Message history entry by absolute index. The response carries the SerializedEntry (tag, message body, commands, mountStarts, mountEnds, timestamp, `isModelChanged`, `changedPaths` for leaf-level mutations, `affectedPaths` adding their ancestor paths). Each entry in `commands` carries the Command name, `args` (`Some(record)` when the Command declared an args schema, `None` otherwise), and `maybeBlockPath` (`None` before the result resolves, `Some([])` for a resolved top-level Command, or `Some(tags)` for a resolved Block Command). `mountStarts` lists Mounts that fired during the render after this Message; `mountEnds` lists Mounts whose elements were unmounted during that render. Each Mount carries its `name` and `args` (`Some(record)` when the Mount declared an args schema, `None` otherwise). For Block-routed entries (tag matches `Got*Message`), the entry also carries `blockPath` listing wrapper tags from outer to inner and `maybeLeafTag` naming the innermost child Message. Model snapshots are not included; call foldkit_get_model_at with `index - 1` (before) and `index` (after) to inspect Model state around the entry.',
215
+ description: 'Read a single Message history entry by absolute index. The response carries the SerializedEntry (tag, message body, commands, mountStarts, mountEnds, timestamp, `isModelChanged`, `changedPaths` for leaf-level mutations, `affectedPaths` adding their ancestor paths). Each entry in `commands` carries the Command name, `args` (`Some(record)` when the Command declared an args schema, `None` otherwise), and `maybeSubmodelPath` (`None` before the result resolves, `Some([])` for a resolved top-level Command, or `Some(tags)` for a resolved Submodel Command). `mountStarts` lists Mounts that fired during the render after this Message; `mountEnds` lists Mounts whose elements were unmounted during that render. Each Mount carries its `name` and `args` (`Some(record)` when the Mount declared an args schema, `None` otherwise). For Submodel-routed entries (tag matches `Got*Message`), the entry also carries `submodelPath` listing wrapper tags from outer to inner and `maybeLeafTag` naming the innermost child Message. Model snapshots are not included; call foldkit_get_model_at with `index - 1` (before) and `index` (after) to inspect Model state around the entry.',
216
216
  inputSchema: toInputSchema(GetMessageInput),
217
217
  handle: runRuntimeTool(GetMessageInput, ({ index }) => Request.RequestGetMessage({ index }), relayClient),
218
218
  },
219
219
  {
220
220
  name: 'foldkit_get_init',
221
- description: "Read the runtime's initial Model, the Commands returned from the application's `init` function, and the Mounts that fired during the first render. The init entry is the synthetic row at index -1 in the DevTools panel; this tool exposes the same data without time-travelling the runtime. `maybeModel` is `None` until the runtime has finished its first render and recorded init, then stays `Some` for the rest of the runtime's life. `commands` lists init-time Commands in the order they were produced, each with its name, `args` (`Some(record)` when the Command declared an args schema, `None` otherwise), and `maybeBlockPath` (`None` before the result resolves, `Some([])` for a resolved top-level Command, or `Some(tags)` for a resolved Block Command); `mountStarts` lists Mounts whose elements appeared in the initial render, each with its name and `args` (`Some(record)` when the Mount declared an args schema, `None` otherwise).",
221
+ description: "Read the runtime's initial Model, the Commands returned from the application's `init` function, and the Mounts that fired during the first render. The init entry is the synthetic row at index -1 in the DevTools panel; this tool exposes the same data without time-travelling the runtime. `maybeModel` is `None` until the runtime has finished its first render and recorded init, then stays `Some` for the rest of the runtime's life. `commands` lists init-time Commands in the order they were produced, each with its name, `args` (`Some(record)` when the Command declared an args schema, `None` otherwise), and `maybeSubmodelPath` (`None` before the result resolves, `Some([])` for a resolved top-level Command, or `Some(tags)` for a resolved Submodel Command); `mountStarts` lists Mounts whose elements appeared in the initial render, each with its name and `args` (`Some(record)` when the Mount declared an args schema, `None` otherwise).",
222
222
  inputSchema: toInputSchema(GetInitInput),
223
223
  handle: runRuntimeTool(GetInitInput, () => Request.RequestGetInit(), relayClient),
224
224
  },
@@ -248,7 +248,7 @@ export const buildTools = (relayClient) => [
248
248
  },
249
249
  {
250
250
  name: 'foldkit_get_message_schema',
251
- description: 'Describe the Message Schema for a Foldkit runtime so agents can construct valid payloads for `foldkit_dispatch_message`. Call with no arguments to receive a small variant index (every top-level variant\'s `_tag`, its payload field names, and which payload fields are themselves tagged-union shapes). Then call with `variant_tag: "ChosenVariant"` to drill in. The argument is a dot-separated path of variant `_tag` values: each segment names a variant, and the walker steps through the variant\'s single tagged-union payload field to reach the next. So `"GotMobileMenuDialogMessage"` narrows one level; `"GotMobileMenuDialogMessage.GotAnimationMessage"` narrows two levels of a Block chain. Discriminated unions deeper than the supplied path collapse to `{ "_summary": "union", "variants": [...] }` placeholders so the response stays compact even for deeply-nested apps; extend the path to drill further. `Schema.Option` fields render as `anyOf: [{_tag: "Some", value}, {_tag: "None"}]`. The full document follows the JSON Schema draft-2020-12 shape from `Schema.toJsonSchemaDocument`: `{ dialect, schema, definitions }`. Returns `maybeResult: None` when the Program has not enabled `devTools.dispatch` (dispatch is also unavailable). Fields with no JSON representation, notably `Schema.instanceOf(File)` for user-uploaded files, render as `{type: "null"}`; those variants can\'t be dispatched via MCP because their values live in browser memory.',
251
+ description: 'Describe the Message Schema for a Foldkit runtime so agents can construct valid payloads for `foldkit_dispatch_message`. Call with no arguments to receive a small variant index (every top-level variant\'s `_tag`, its payload field names, and which payload fields are themselves tagged-union shapes). Then call with `variant_tag: "ChosenVariant"` to drill in. The argument is a dot-separated path of variant `_tag` values: each segment names a variant, and the walker steps through the variant\'s single tagged-union payload field to reach the next. So `"GotMobileMenuDialogMessage"` narrows one level; `"GotMobileMenuDialogMessage.GotAnimationMessage"` narrows two levels of a Submodel chain. Discriminated unions deeper than the supplied path collapse to `{ "_summary": "union", "variants": [...] }` placeholders so the response stays compact even for deeply-nested apps; extend the path to drill further. `Schema.Option` fields render as `anyOf: [{_tag: "Some", value}, {_tag: "None"}]`. The full document follows the JSON Schema draft-2020-12 shape from `Schema.toJsonSchemaDocument`: `{ dialect, schema, definitions }`. Returns `maybeResult: None` when the runtime hasn\'t configured `DevToolsConfig.Message` (dispatch is also unavailable). Fields with no JSON representation, notably `Schema.instanceOf(File)` for user-uploaded files, render as `{type: "null"}`; those variants can\'t be dispatched via MCP because their values live in browser memory.',
252
252
  inputSchema: toInputSchema(GetMessageSchemaInput),
253
253
  handle: runRuntimeTool(GetMessageSchemaInput, ({ variant_tag }) => Request.RequestGetMessageSchema({
254
254
  maybeVariantTag: Option.fromNullishOr(variant_tag),
@@ -256,13 +256,13 @@ export const buildTools = (relayClient) => [
256
256
  },
257
257
  {
258
258
  name: 'foldkit_dispatch_message',
259
- description: "Dispatch a Message into a Foldkit runtime, as if the application itself produced it. Requires `devTools: { dispatch: true }` on the Program; without it, dispatch is rejected. Call `foldkit_get_message_schema` with no arguments to enumerate the variants, then with `variant_tag` to learn one variant's exact payload shape, before constructing the Message object. The runtime decodes the payload and returns a clean error if it doesn't match. Messages configured with excludeFromHistory are rejected before execution. A successful response identifies the confirmed recorded history entry. A child Message that becomes stale before queued execution is discarded and returns an error. To dispatch several Messages in order with one call, use foldkit_dispatch_messages.",
259
+ description: "Dispatch a Message into a Foldkit runtime, as if the application itself produced it. Requires the runtime to have configured DevToolsConfig.Message; without it, dispatch is rejected. Call `foldkit_get_message_schema` with no arguments to enumerate the variants, then with `variant_tag` to learn one variant's exact payload shape, before constructing the Message object. The runtime decodes the payload and returns a clean error if it doesn't match. To dispatch several Messages in order with one call, use foldkit_dispatch_messages.",
260
260
  inputSchema: toInputSchema(DispatchMessageInput),
261
261
  handle: runRuntimeTool(DispatchMessageInput, ({ message }) => Request.RequestDispatchMessage({ message }), relayClient),
262
262
  },
263
263
  {
264
264
  name: 'foldkit_dispatch_messages',
265
- description: `Dispatch an ordered batch of Messages into a Foldkit runtime in one call, first to last, as if the application produced them in quick succession. Prefer this over repeated foldkit_dispatch_message calls when staging state that takes several Messages: reproducing a bug, filling a form, or building a history fixture. Takes 1 to ${MAX_DISPATCH_BATCH_SIZE} Messages. Validation is all-or-nothing: the runtime decodes every payload against the Message Schema before dispatching any of them, and one invalid entry rejects the whole batch with an error naming its zero-based position, so there is never a partially applied prefix to clean up. Messages excluded from history are rejected before dispatch. On success, acceptedAtIndices contains the exact recorded history indices in request order. A Message whose captured child occurrence becomes stale before queued execution is omitted, while unrelated Messages recorded between batch entries keep their own indices. Requires devTools: { dispatch: true }, like foldkit_dispatch_message.`,
265
+ description: `Dispatch an ordered batch of Messages into a Foldkit runtime in one call, first to last, as if the application produced them in quick succession. Prefer this over repeated foldkit_dispatch_message calls when staging state that takes several Messages: reproducing a bug, filling a form, or building a history fixture. Takes 1 to ${MAX_DISPATCH_BATCH_SIZE} Messages. Validation is all-or-nothing: the runtime decodes every payload against the Message Schema before dispatching any of them, and one invalid entry rejects the whole batch with an error naming its zero-based position, so there is never a partially applied prefix to clean up. On success the response carries acceptedAtIndices, the predicted history index for each Message in request order; the runtime may still record its own Messages between entries (for example a Command completing mid-burst), exactly as with rapid user input, and Messages excluded from history via excludeFromHistory are dispatched but never recorded, so entries after one land below their predicted index. Requires DevToolsConfig.Message, like foldkit_dispatch_message.`,
266
266
  inputSchema: toInputSchema(DispatchMessagesInput),
267
267
  handle: runRuntimeTool(DispatchMessagesInput, ({ messages }) => Request.RequestDispatchMessages({ messages }), relayClient),
268
268
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foldkit/devtools-mcp",
3
- "version": "0.25.0-canary.1f6776fa7ece",
3
+ "version": "0.25.0-canary.7ee214268c60",
4
4
  "description": "MCP server exposing Foldkit DevTools to AI agents (Claude Code, Cursor, etc.)",
5
5
  "type": "module",
6
6
  "main": "./dist/server.js",
@@ -17,23 +17,23 @@
17
17
  },
18
18
  "peerDependencies": {
19
19
  "effect": "4.0.0",
20
- "foldkit": "0.169.0-canary.1f6776fa7ece"
20
+ "foldkit": "0.169.0-canary.7ee214268c60"
21
21
  },
22
22
  "dependencies": {
23
- "@modelcontextprotocol/sdk": "1.31.0",
23
+ "@modelcontextprotocol/sdk": "1.29.0",
24
24
  "ws": "^8.21.3"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@effect/platform-node": "4.0.0",
28
- "@foldkit/vite-plugin": "0.28.0-canary.1f6776fa7ece",
28
+ "@foldkit/vite-plugin": "0.28.0-canary.7ee214268c60",
29
29
  "@types/node": "26.4.0",
30
30
  "@types/ws": "^8.18.1",
31
31
  "effect": "4.0.0",
32
- "foldkit": "0.169.0-canary.1f6776fa7ece",
32
+ "foldkit": "0.169.0-canary.7ee214268c60",
33
33
  "rimraf": "^6.1.3",
34
34
  "rolldown": "^1.2.11",
35
- "typescript": "7.1.0-beta",
36
- "vite": "^8.3.3",
35
+ "typescript": "^7.0.2",
36
+ "vite": "^8.3.1",
37
37
  "vitest": "^4.1.11"
38
38
  },
39
39
  "files": [