@foldkit/devtools-mcp 0.25.0-canary.fbc0bbd6fde6 → 0.26.0-canary.54f8bcd443b4

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 Submodel chains
9
+ - List and inspect the Message history, with Command and Mount lifecycle, diffs, and Block 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,17 +36,22 @@ pnpm add -D @foldkit/devtools-mcp
36
36
  yarn add -D @foldkit/devtools-mcp
37
37
  ```
38
38
 
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:
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:
40
40
 
41
41
  ```typescript
42
- Runtime.makeApplication({
42
+ Program.make({
43
+ block: ApplicationBlock,
44
+ layer,
45
+ container,
43
46
  devTools: {
44
47
  // Rest of your DevTools config
45
- Message,
48
+ dispatch: true,
46
49
  },
47
50
  })
48
51
  ```
49
52
 
53
+ 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.
54
+
50
55
  Restart your dev server, then restart your AI agent. The MCP server will appear with the `foldkit_*` tools attached.
51
56
 
52
57
  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`.
@@ -57,29 +62,29 @@ Treat this server as privileged access to the running application. A connected a
57
62
 
58
63
  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.
59
64
 
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
+ `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.
61
66
 
62
67
  ## Tools
63
68
 
64
69
  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.
65
70
 
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. |
71
+ | Tool | Description |
72
+ | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
73
+ | `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. |
74
+ | `foldkit_get_model` | Snapshots the current Model. Accepts an optional `path` to narrow to a subtree and `expand` to control summarization. |
75
+ | `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`. |
76
+ | `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. |
77
+ | `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. |
78
+ | `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`. |
79
+ | `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. |
80
+ | `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. |
81
+ | `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. |
82
+ | `foldkit_list_keyframes` | Returns the indices Foldkit can replay back to. Index `-1` is the initial Model. |
83
+ | `foldkit_replay_to_keyframe` | Time-travels the Runtime to a previous state. The Runtime is paused at that snapshot until `foldkit_resume` is called. |
84
+ | `foldkit_resume` | Resumes normal execution after a replay. |
85
+ | `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. |
86
+ | `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. |
87
+ | `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. |
83
88
 
84
89
  ### Reading the Model efficiently
85
90
 
@@ -107,6 +112,8 @@ Three components cooperate:
107
112
 
108
113
  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.
109
114
 
115
+ 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.
116
+
110
117
  ## Configuration
111
118
 
112
119
  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`.
@@ -122,12 +129,14 @@ The MCP server connects when a tool is called. It checks the registry on every c
122
129
 
123
130
  An automatically discovered relay's registry record contains a random token. The MCP client uses it to sign a connection challenge and checks the relay's response before sending tool requests. The plugin refuses to publish the record if another user can read or replace the registry directory. The MCP server applies the same check before reading it. Both reject symlinks and junctions; on macOS they also check directory ACLs. Clients without access to the registry cannot connect, but the agent using this MCP server can inspect the Runtime data.
124
131
 
132
+ On Linux, relay records also identify the publisher's PID and network namespaces. Readers omit relays from a known different network namespace without deleting their records. Matching PID namespaces allow the ordinary process check. When the PID namespace is different or unknown, a failed process check does not prove the relay is gone; the reader probes its port before retiring the record. Older records remain compatible.
133
+
125
134
  On Windows, both processes use PowerShell to check the directory's owner, access list, ancestors, and reparse points. The registry must be a private direct child of the user's temporary directory. If the check cannot run or refuses the directory, configure `devToolsMcpPort` in Vite and set `FOLDKIT_DEVTOOLS_MCP_PORT` to the same port. A fixed port listens on every interface without a token. Do not use it on a shared or untrusted network.
126
135
 
127
136
  ## Notes
128
137
 
129
138
  - 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.
130
- - Without `Message` in your `DevToolsConfig`, dispatch is rejected. The other (read-only) tools still work.
139
+ - External dispatch and Message Schema discovery require `devTools: { dispatch: true }`. The other tools still work with the default configuration.
131
140
  - The relay only runs at dev time. Production builds never include the relay or the bridge, regardless of any `show` setting.
132
141
 
133
142
  ## Documentation
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAoEA;;;;;GAKG;AACH,eAAO,MAAM,OAAO,QAAO,IAkB1B,CAAA"}
1
+ {"version":3,"file":"install.d.ts","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. Pass your Message Schema to Runtime.makeApplication (enables dispatch):');
39
+ console.log(' 1. Enable Message dispatch in Program.make or Program.makeElement:');
40
40
  console.log('');
41
- console.log(' devTools: { Message }');
41
+ console.log(' devTools: { dispatch: true }');
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('');
@@ -2,7 +2,7 @@ import { type Cause, Effect, Option } from 'effect';
2
2
  import { Request, type Response, type RuntimeInfo } from 'foldkit/devtools-protocol';
3
3
  import type { RelayTarget } from './relayLocation.js';
4
4
  export type ListedRuntime = Readonly<{
5
- runtime: typeof RuntimeInfo.Type;
5
+ runtime: RuntimeInfo;
6
6
  maybeProjectRoot: Option.Option<string>;
7
7
  }>;
8
8
  /**
@@ -25,7 +25,7 @@ export type ListedRuntime = Readonly<{
25
25
  */
26
26
  export type RelayClient = Readonly<{
27
27
  listRuntimes: Effect.Effect<ReadonlyArray<ListedRuntime>, Error>;
28
- sendRequest: (request: typeof Request.Type, maybeRuntimeId: Option.Option<string>) => Effect.Effect<typeof Response.Type, Cause.TimeoutError | Error>;
28
+ sendRequest: (request: Request, maybeRuntimeId: Option.Option<string>) => Effect.Effect<Response, Cause.TimeoutError | Error>;
29
29
  close: Effect.Effect<void>;
30
30
  }>;
31
31
  /**
@@ -1 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.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,WAAW,CAAA;IACpB,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,EAChB,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAClC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,CAAA;IACxD,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,KAAK,EAAE,QAAQ,CAkTzC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { Effect, FileSystem, Option } from 'effect';
2
+ import type { RelayNamespaces, RelayRecord } from 'foldkit/devtools-protocol';
3
+ export type RelayStatus = 'Running' | 'Gone' | 'Unreachable';
4
+ export declare const readProcessNamespaces: Effect.Effect<Option.Option<RelayNamespaces>, never, FileSystem.FileSystem>;
5
+ export declare const checkRelay: (record: RelayRecord, maybeOwnNamespaces: Option.Option<RelayNamespaces>) => Effect.Effect<RelayStatus>;
6
+ //# sourceMappingURL=relayLiveness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relayLiveness.d.ts","sources":["../src/relayLiveness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,MAAM,EAAE,UAAU,EAAU,MAAM,EAAU,MAAM,QAAQ,CAAA;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAW7E,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,aAAa,CAAA;AAE5D,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,CAC/C,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,EAC9B,KAAK,EACL,UAAU,CAAC,UAAU,CAO4C,CAAA;AA2DnE,eAAO,MAAM,UAAU,WACb,WAAW,sBACC,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,KACjD,MAAM,CAAC,MAAM,CAAC,WAAW,CAqC3B,CAAA"}
@@ -0,0 +1,80 @@
1
+ import { Duration, Effect, FileSystem, Number, Option, String } from 'effect';
2
+ import { connect } from 'node:net';
3
+ const NAMESPACE_DIRECTORY = '/proc/self/ns';
4
+ const PROBE_TIMEOUT = Duration.seconds(1);
5
+ const WEBSOCKET_PORT = 80;
6
+ const SECURE_WEBSOCKET_PORT = 443;
7
+ const IPV6_BRACKETS = /^\[|\]$/g;
8
+ export const readProcessNamespaces = Effect.gen(function* () {
9
+ const fileSystem = yield* FileSystem.FileSystem;
10
+ const pid = yield* fileSystem.readLink(`${NAMESPACE_DIRECTORY}/pid`);
11
+ const network = yield* fileSystem.readLink(`${NAMESPACE_DIRECTORY}/net`);
12
+ return Option.some({ pid, network });
13
+ }).pipe(Effect.orElseSucceed(() => Option.none()));
14
+ const isProcessAlive = (pid) => {
15
+ try {
16
+ process.kill(pid, 0);
17
+ return true;
18
+ }
19
+ catch (error) {
20
+ return error instanceof Error && 'code' in error && error.code === 'EPERM';
21
+ }
22
+ };
23
+ const relayAddress = (url) => Option.flatMap(Option.fromNullishOr(URL.parse(url)), parsed => {
24
+ const host = parsed.hostname.replace(IPV6_BRACKETS, '');
25
+ if (String.isNonEmpty(parsed.port)) {
26
+ return Option.map(Number.parse(parsed.port), port => ({ host, port }));
27
+ }
28
+ else if (parsed.protocol === 'wss:') {
29
+ return Option.some({ host, port: SECURE_WEBSOCKET_PORT });
30
+ }
31
+ else {
32
+ return Option.some({ host, port: WEBSOCKET_PORT });
33
+ }
34
+ });
35
+ const refusesConnections = ({ host, port, }) => Effect.callback(resume => {
36
+ const socket = connect({ host, port });
37
+ const settle = (isRefused) => {
38
+ socket.destroy();
39
+ resume(Effect.succeed(isRefused));
40
+ };
41
+ socket.once('connect', () => settle(false));
42
+ socket.once('error', error => settle('code' in error && error.code === 'ECONNREFUSED'));
43
+ return Effect.sync(() => socket.destroy());
44
+ }).pipe(Effect.timeoutOption(PROBE_TIMEOUT), Effect.map(Option.getOrElse(() => false)));
45
+ const statusFromPort = (url) => Option.match(relayAddress(url), {
46
+ onNone: () => Effect.succeed('Running'),
47
+ onSome: address => Effect.map(refusesConnections(address), (isRefused) => isRefused ? 'Gone' : 'Running'),
48
+ });
49
+ // NOTE: kill(pid, 0) answers for this process's PID namespace only. A relay
50
+ // published from another PID namespace looks dead even while it runs, so its
51
+ // record counts as gone only when its port refuses connections. A relay in
52
+ // another network namespace listens on a loopback this process cannot reach.
53
+ export const checkRelay = (record, maybeOwnNamespaces) => {
54
+ const maybeRecordNamespaces = Option.fromNullishOr(record.namespaces);
55
+ const maybeBothNamespaces = Option.all([
56
+ maybeOwnNamespaces,
57
+ maybeRecordNamespaces,
58
+ ]);
59
+ const hasNoNamespaces = Option.isNone(maybeOwnNamespaces) && Option.isNone(maybeRecordNamespaces);
60
+ const isSamePidNamespace = Option.exists(maybeBothNamespaces, ([own, recorded]) => own.pid === recorded.pid);
61
+ const isOtherNetworkNamespace = Option.exists(maybeBothNamespaces, ([own, recorded]) => own.network !== recorded.network);
62
+ if (Option.isSome(maybeRecordNamespaces) &&
63
+ Option.isNone(maybeOwnNamespaces)) {
64
+ return Effect.succeed('Unreachable');
65
+ }
66
+ else if (isOtherNetworkNamespace) {
67
+ return Effect.succeed('Unreachable');
68
+ }
69
+ else if (isSamePidNamespace ||
70
+ (hasNoNamespaces && process.platform !== 'linux')) {
71
+ return Effect.succeed(isProcessAlive(record.pid) ? 'Running' : 'Gone');
72
+ }
73
+ else if (Option.isNone(maybeRecordNamespaces) &&
74
+ isProcessAlive(record.pid)) {
75
+ return Effect.succeed('Running');
76
+ }
77
+ else {
78
+ return statusFromPort(record.url);
79
+ }
80
+ };
@@ -1 +1 @@
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;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,CAA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QAAQ,kBACF,mBAAmB,KAClC,MAAM,CAAC,MAAM,CACd,aAAa,CAAC,WAAW,CAAC,EAC1B,KAAK,EACL,qBAAqB,GAAG,mBAAmB,CAAC,mBAAmB,CAa7D,CAAA"}
@@ -3,10 +3,6 @@ import { isIPv6 } from 'node:net';
3
3
  import { discoverRelays, } from './relayRegistry.js';
4
4
  const LEGACY_DEFAULT_PORT = 9988;
5
5
  const DEFAULT_HOST = 'localhost';
6
- const AUTOMATIC_RELAY_HOST = '127.0.0.1';
7
- const AUTOMATIC_RELAY_PATH = '/__foldkit/devtools-mcp';
8
- const RELAY_TOKEN_PARAMETER = 'token';
9
- const RELAY_TOKEN_PATTERN = /^[0-9a-f]{64}$/;
10
6
  export const loadSettings = Effect.gen(function* () {
11
7
  const maybeConfiguredPort = yield* Config.option(Config.String('FOLDKIT_DEVTOOLS_MCP_PORT'));
12
8
  const maybeConfiguredHost = yield* Config.option(Config.String('FOLDKIT_DEVTOOLS_MCP_HOST'));
@@ -24,28 +20,6 @@ const fixedTarget = (url) => ({
24
20
  url,
25
21
  maybeProjectRoot: Option.none(),
26
22
  });
27
- const parseUrl = Option.liftThrowable((url) => new URL(url));
28
- const hasValidPort = (url) => {
29
- const port = globalThis.Number(url.port);
30
- return (url.port !== '' &&
31
- globalThis.Number.isInteger(port) &&
32
- port > 0 &&
33
- port <= 65_535);
34
- };
35
- const isPublishedRelayUrl = (value) => Option.exists(parseUrl(value), url => {
36
- if (url.protocol !== 'ws:' ||
37
- url.username !== '' ||
38
- url.password !== '' ||
39
- url.hash !== '' ||
40
- !hasValidPort(url)) {
41
- return false;
42
- }
43
- const parameters = Array.fromIterable(url.searchParams);
44
- return (url.hostname === AUTOMATIC_RELAY_HOST &&
45
- url.pathname === AUTOMATIC_RELAY_PATH &&
46
- Array.length(parameters) === 1 &&
47
- Option.exists(Array.head(parameters), ([name, token]) => name === RELAY_TOKEN_PARAMETER && RELAY_TOKEN_PATTERN.test(token)));
48
- });
49
23
  export const configuredRelayUrl = (settings) => {
50
24
  const { maybeConfiguredHost, maybeConfiguredPort } = settings;
51
25
  if (Option.isSome(maybeConfiguredHost) ||
@@ -60,12 +34,9 @@ export const configuredRelayUrl = (settings) => {
60
34
  };
61
35
  export const resolveRelayTargets = (settings, registryReader) => Option.match(configuredRelayUrl(settings), {
62
36
  onSome: url => Effect.succeed([fixedTarget(url)]),
63
- onNone: () => Effect.map(discoverRelays(settings.projectRoot, registryReader), records => {
64
- const trustedRecords = Array.filter(records, record => isPublishedRelayUrl(record.url));
65
- return Array.map(trustedRecords, (record) => ({
66
- key: record.id,
67
- url: record.url,
68
- maybeProjectRoot: Option.some(record.root),
69
- }));
70
- }),
37
+ onNone: () => Effect.map(discoverRelays(settings.projectRoot, registryReader), Array.map((record) => ({
38
+ key: record.id,
39
+ url: record.url,
40
+ maybeProjectRoot: Option.some(record.root),
41
+ }))),
71
42
  });
@@ -1 +1 @@
1
- {"version":3,"file":"relayRegistry.d.ts","sourceRoot":"","sources":["../src/relayRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,MAAM,EACN,UAAU,EACV,OAAO,EAGP,IAAI,EACJ,GAAG,EAIJ,MAAM,QAAQ,CAAA;AACf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAGL,WAAW,EACZ,MAAM,2BAA2B,CAAA;AAGlC,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,yBAAyB,CAAA;AAMhC,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAA;AAErE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,KAAK,EAAE,kBAAkB,CAAA;IACzB,gBAAgB,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;CACnD,CAAC,CAAA;AAEF,KAAK,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EA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;AAwEJ,eAAO,MAAM,cAAc,gBACZ,MAAM,kBACH,mBAAmB,KAClC,MAAM,CAAC,MAAM,CACd,aAAa,CAAC,WAAW,CAAC,EAC1B,KAAK,EACL,qBAAqB,GAAG,mBAAmB,CAAC,mBAAmB,CAyD7D,CAAA"}
@@ -1,10 +1,37 @@
1
1
  import { Array, Config, Console, Effect, FileSystem, HashSet, Option, Order, Path, Ref, Schema, String, pipe, } from 'effect';
2
2
  import { RELAY_REGISTRY_DIRECTORY_NAME, RELAY_REGISTRY_DIRECTORY_VARIABLE, RelayRecord, } from 'foldkit/devtools-protocol';
3
3
  import { homedir, tmpdir } from 'node:os';
4
+ import { checkRelay, readProcessNamespaces } from './relayLiveness.js';
4
5
  import { relayRegistryTrust, } from './relayRegistryTrust.js';
5
6
  const RUNTIME_DIRECTORY_VARIABLE = 'XDG_RUNTIME_DIR';
6
7
  const RECORD_FILE_EXTENSION = '.json';
7
8
  const RETIRING_RECORD_SUFFIX = '.retiring';
9
+ const AUTOMATIC_RELAY_HOST = '127.0.0.1';
10
+ const AUTOMATIC_RELAY_PATH = '/__foldkit/devtools-mcp';
11
+ const RELAY_TOKEN_PARAMETER = 'token';
12
+ const RELAY_TOKEN_PATTERN = /^[0-9a-f]{64}$/;
13
+ const parseUrl = Option.liftThrowable((url) => new URL(url));
14
+ const hasValidPort = (url) => {
15
+ const port = globalThis.Number(url.port);
16
+ return (url.port !== '' &&
17
+ globalThis.Number.isInteger(port) &&
18
+ port > 0 &&
19
+ port <= 65_535);
20
+ };
21
+ const isPublishedRelayUrl = (value) => Option.exists(parseUrl(value), url => {
22
+ if (url.protocol !== 'ws:' ||
23
+ url.username !== '' ||
24
+ url.password !== '' ||
25
+ url.hash !== '' ||
26
+ !hasValidPort(url)) {
27
+ return false;
28
+ }
29
+ const parameters = Array.fromIterable(url.searchParams);
30
+ return (url.hostname === AUTOMATIC_RELAY_HOST &&
31
+ url.pathname === AUTOMATIC_RELAY_PATH &&
32
+ Array.length(parameters) === 1 &&
33
+ Option.exists(Array.head(parameters), ([name, token]) => name === RELAY_TOKEN_PARAMETER && RELAY_TOKEN_PATTERN.test(token)));
34
+ });
8
35
  const decodeRelayRecord = Schema.decodeUnknownOption(Schema.fromJsonString(RelayRecord));
9
36
  const relayRegistryDirectory = Effect.gen(function* () {
10
37
  const path = yield* Path.Path;
@@ -15,15 +42,6 @@ const relayRegistryDirectory = Effect.gen(function* () {
15
42
  return path.join(Option.getOrElse(maybeRuntimeDirectory, () => defaultParent), RELAY_REGISTRY_DIRECTORY_NAME);
16
43
  });
17
44
  }).pipe(Effect.orDie);
18
- const isProcessAlive = (pid) => {
19
- try {
20
- process.kill(pid, 0);
21
- return true;
22
- }
23
- catch (error) {
24
- return error instanceof Error && 'code' in error && error.code === 'EPERM';
25
- }
26
- };
27
45
  const readRecordFile = (filePath) => Effect.gen(function* () {
28
46
  const fileSystem = yield* FileSystem.FileSystem;
29
47
  const raw = yield* fileSystem.readFileString(filePath);
@@ -45,13 +63,26 @@ const retireStaleRecord = (filePath, record) => Effect.gen(function* () {
45
63
  }
46
64
  yield* fileSystem.remove(retiringPath, { force: true }).pipe(Effect.ignore);
47
65
  });
48
- const readLiveRecordFile = (filePath) => Effect.gen(function* () {
66
+ const readLiveRecordFile = (filePath, maybeOwnNamespaces) => Effect.gen(function* () {
49
67
  const maybeRecord = yield* readRecordFile(filePath);
50
- if (Option.isSome(maybeRecord) && !isProcessAlive(maybeRecord.value.pid)) {
51
- yield* retireStaleRecord(filePath, maybeRecord.value);
68
+ if (Option.isNone(maybeRecord)) {
69
+ return maybeRecord;
70
+ }
71
+ const record = maybeRecord.value;
72
+ if (!isPublishedRelayUrl(record.url)) {
73
+ return Option.none();
74
+ }
75
+ const status = yield* checkRelay(record, maybeOwnNamespaces);
76
+ if (status === 'Gone') {
77
+ yield* retireStaleRecord(filePath, record);
52
78
  return Option.none();
53
79
  }
54
- return maybeRecord;
80
+ else if (status === 'Unreachable') {
81
+ return Option.none();
82
+ }
83
+ else {
84
+ return maybeRecord;
85
+ }
55
86
  });
56
87
  const newestFirst = Order.mapInput(Order.flip(Order.Number), record => record.startedAt);
57
88
  export const isWithinRoot = (root, candidate, pathApi) => {
@@ -116,7 +147,8 @@ export const discoverRelays = (projectRoot, registryReader) => Effect.gen(functi
116
147
  .readDirectory(directory)
117
148
  .pipe(Effect.orElseSucceed(() => []));
118
149
  const recordFileNames = Array.filter(fileNames, String.endsWith(RECORD_FILE_EXTENSION));
119
- const records = Array.getSomes(yield* Effect.forEach(recordFileNames, recordFileName => readLiveRecordFile(path.join(directory, recordFileName))));
150
+ const maybeOwnNamespaces = yield* readProcessNamespaces;
151
+ const records = Array.getSomes(yield* Effect.forEach(recordFileNames, recordFileName => readLiveRecordFile(path.join(directory, recordFileName), maybeOwnNamespaces)));
120
152
  const realProjectRoot = yield* realRoot(projectRoot);
121
153
  const rootedRecords = yield* Effect.forEach(records, record => Effect.map(realRoot(record.root), root => ({ record, root })));
122
154
  const recordsInside = Array.filter(rootedRecords, ({ root }) => isWithinRoot(realProjectRoot, root, path));
@@ -1 +1 @@
1
- {"version":3,"file":"relayRegistryTrust.d.ts","sourceRoot":"","sources":["../src/relayRegistryTrust.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,MAAM,EACN,UAAU,EACV,MAAM,EAIP,MAAM,QAAQ,CAAA;AACf,OAAO,EAAgB,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAyElE,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;CACpC,CAAC,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,OAAO,EAAE,CACP,SAAS,EAAE,MAAM,KACd,MAAM,CAAC,MAAM,CAChB,uBAAuB,EACvB,KAAK,EACL,mBAAmB,CAAC,mBAAmB,CACxC,CAAA;CACF,CAAC,CAAA;AAEF,KA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M,kBAAkB,GAAG,QAAQ,CAAC;IACxC,OAAO,EAAE,CACP,SAAS,EAAE,MAAM,KACd,MAAM,CAAC,MAAM,CAChB,uBAAuB,EACvB,KAAK,EACL,mBAAmB,CAAC,mBAAmB,CACxC,CAAA;CACF,CAAC,CAAA;AAEF,KAAK,aAAa,GAAG,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","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"server.d.ts","sources":["../src/server.ts"],"names":[],"mappings":""}