@stratusagent/plugin-mcp 0.9.2 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -106,6 +106,86 @@ do: exactly what this config granted — the harmless default inheritance,
106
106
  where `ANTHROPIC_API_KEY` and every other exported key lives, is not there
107
107
  to read.
108
108
 
109
+ That includes the transport's own idea of what a server needs. The MCP
110
+ SDK's stdio client spawns with a default set of its own (`HOME`, `LOGNAME`,
111
+ `PATH`, `SHELL`, `TERM`, `USER` on POSIX) merged under whatever it is
112
+ handed, so the bridge refuses each of those names explicitly unless this
113
+ config granted it — otherwise `passEnv: []` would still hand a third-party
114
+ server the account the daemon runs as. **Consequence for a narrowed
115
+ `passEnv`:** a `command` without a `/` is resolved against the child's
116
+ `PATH`, and the child's `PATH` is only what this config granted — so a
117
+ server whose `passEnv` omits `PATH` **must give `command` as an absolute
118
+ path**, and one that does not is refused at load with a message saying so,
119
+ rather than failing at connect as a bare `ENOENT` that reads like a missing
120
+ binary. An **empty** grant does not count either: `which` treats a falsy
121
+ search path as none and falls back to the daemon's own, so `PATH: ""` would
122
+ resolve a bare command against exactly the environment the config declined
123
+ to grant.
124
+
125
+ Grants are spelled the way the platform spells them — `Path` counts on
126
+ Windows, where environment names are case-insensitive, and does not on
127
+ POSIX, where only `PATH` drives lookup. On Windows every name the transport
128
+ would inherit is canonicalized onto the transport's own spelling before its
129
+ defaults are merged under it, which is what stops the daemon's uppercase
130
+ copy from shadowing a mixed-case grant: **for each of those names, exactly
131
+ one entry leaves this package, carrying the granted value or nothing.** That
132
+ applies to `USERPROFILE`, `APPDATA` and the rest as much as to `PATH` — a
133
+ grant that only half-applies is the failure this is guarding.
134
+
135
+ Refused rather than diagnosed at runtime because the runtime signal cannot
136
+ be trusted to mean what it says. On Windows the SDK spawns through
137
+ `cross-spawn`, whose resolver hands an absent `PATH` to `which`, and `which`
138
+ falls back to `process.env.PATH` — the daemon's own. A bare command would
139
+ resolve against exactly the environment this config declined to grant. Same
140
+ rule as a malformed `passEnv`: a grant an operator believes is in effect
141
+ must never quietly be nothing.
142
+
143
+ **A bare `command` is resolved here, not by the spawn.** The granted `PATH`
144
+ is searched in order and the transport is handed the path that came back,
145
+ because the resolver underneath it does not search only what was granted:
146
+ `cross-spawn` puts `process.cwd()` at the front on Windows — "windows always
147
+ checks the cwd first", says `which`'s own comment — and an empty `PATH`
148
+ entry means the current directory on either platform. The daemon's working
149
+ directory is not a grant, and an `npx.cmd` dropped into it would run in
150
+ place of the one on the granted `PATH`. So an empty entry is dropped rather
151
+ than searched, and the resolution runs on every platform rather than behind
152
+ a Windows branch — the lookup Windows depends on is then the one the tests
153
+ exercise. A `command` that names a path (`/opt/bin/srv`, `.\srv.exe`) is
154
+ taken as written and searched for nowhere.
155
+
156
+ Everything else about the Windows search follows `which`, because replacing
157
+ a lookup is not an occasion to change what it finds. Quotes come off an
158
+ entry only as a **balanced pair** — a lone one is a malformed entry, and
159
+ stripping it would search a directory the granted string does not name.
160
+ `PATHEXT` decides what is runnable, read from the grant and otherwise from
161
+ `which`'s own fallback, `.EXE;.CMD;.BAT;.COM`; the daemon's `PATHEXT` is
162
+ never read, for the same reason `PATH: ""` does not count as a grant, and
163
+ Windows' wider default is not used either, since it would make a bare
164
+ command resolve to file types that resolve to nothing today. A `command`
165
+ that already carries an extension is tried as written first, but only when
166
+ `PATHEXT` permits that extension — otherwise a `srv.js` under
167
+ `PATHEXT: ".EXE"` would mask the `srv.js.EXE` beside it that Windows would
168
+ actually run. One deliberate difference: an empty entry *inside* `PATHEXT`
169
+ (`".EXE;"`) makes `isexe` treat every extension as executable, and does not
170
+ here. A grant is not widened by the punctuation that ends it.
171
+
172
+ A **relative** entry is honoured, and it means what it has always meant:
173
+ `PATH: "bin"` on a server with a `cwd` is `<cwd>/bin`, the shape running
174
+ `npx` out of a project checkout takes. It is resolved against the directory
175
+ the server will actually run in — its `cwd`, or the daemon's when it sets
176
+ none — and what the transport is handed is absolute, so the file this
177
+ package checked and the file the spawn starts are the same file. That is a
178
+ different call from the empty entry, deliberately: `./node_modules/.bin` is
179
+ a directory somebody chose, while a zero-length entry is what a stray colon
180
+ leaves behind — and the default grant, `passEnv: ["PATH"]`, copies the
181
+ daemon's own `PATH` verbatim, trailing colon included.
182
+
183
+ A bare command the granted `PATH` does not contain is **not** a config
184
+ failure: the daemon goes on serving every other agent and the server is
185
+ retried like any other one that is not up, because a package still
186
+ installing is not a broken config. Only a config that cannot become correct
187
+ — a bare command with no `PATH` granted at all — is refused at load.
188
+
109
189
  OAuth-authenticated HTTP servers are not modeled yet; a static bearer in
110
190
  `headers` is what exists today.
111
191
 
@@ -122,6 +202,13 @@ OAuth-authenticated HTTP servers are not modeled yet; a static bearer in
122
202
  may no longer mean what it meant.
123
203
  - **While a server is down**, calls to its tools fail with a "not
124
204
  connected" error rather than hanging.
205
+ - **A transport error is logged and named.** The SDK's stdio reader
206
+ refuses a single message over 10 MB and closes the connection, which a
207
+ call in flight would otherwise see only as "Connection closed"; the call's
208
+ error and the log line both say a reply was too large, so the fix is the
209
+ server's result size and not the network.
210
+ - **All of these lines are in the daemon's log** — `stratus logs` — under
211
+ the daemon, and on stderr in a one-shot `stratus run`.
125
212
 
126
213
  ## Results
127
214
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,18 @@
1
1
  import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
2
2
  import { type JsonObject, type Plugin } from '@stratusagent/core';
3
+ /**
4
+ * What this client tells an MCP server it is. Moves with the package
5
+ * manifests on a release, like CLI_VERSION and CONTROL_API_VERSION — a
6
+ * server that logs or keys compatibility on clientInfo.version otherwise
7
+ * goes on seeing the release this literal was last touched at.
8
+ *
9
+ * Exported for the same reason theirs are: so a test can pin it to
10
+ * package.json, because nothing else fails when a release bumps the
11
+ * manifest and leaves the literal behind.
12
+ */
13
+ export declare const PLUGIN_MCP_VERSION = "0.11.0";
3
14
  export { bridgedToolName, normalizeCallResult, sanitizeToolSegment, SERVER_NAME_PATTERN } from './normalize.ts';
15
+ export { sealedStdioEnv, pathGrant, resolveCommandPath };
4
16
  /** What one configured server looks like once its block has been read. */
5
17
  export interface McpServerSpec {
6
18
  /** The config key — a name segment, so `mcp.<name>.*` is what a soul writes. */
@@ -52,6 +64,52 @@ export interface McpPluginOptions {
52
64
  */
53
65
  now?: () => number;
54
66
  }
67
+ /**
68
+ * The granted search path, or undefined when there is not a usable one.
69
+ *
70
+ * Empty counts as absent. `which` takes a falsy `path` as no path and falls
71
+ * back to `process.env.PATH` — the daemon's own — so an empty grant would
72
+ * resolve a bare command against exactly the environment this config
73
+ * declined to grant, which is the leak the seal exists to close.
74
+ */
75
+ declare const pathGrant: (env: Record<string, string>, platform?: NodeJS.Platform) => string | undefined;
76
+ /**
77
+ * The granted environment, plus an explicit refusal of every name the
78
+ * transport would otherwise inherit on its own.
79
+ *
80
+ * `StdioClientTransport` spawns with `{ ...getDefaultEnvironment(), ...env }`
81
+ * — the SDK's own idea of what a server needs (on POSIX: HOME, LOGNAME,
82
+ * PATH, SHELL, TERM, USER). That spread is a floor a caller cannot lower by
83
+ * passing a scrubbed `env`, so a server mounted with `passEnv: []` still
84
+ * received all six: the operator was told they get a sealed environment and
85
+ * did not. None of the six is a secret, but which of them a third-party
86
+ * server learns is the operator's decision, and `tool-shell` — which spawns
87
+ * directly and shares `DEFAULT_SUBPROCESS_PASS_ENV` so that "what does a
88
+ * child see" has one answer — already honours it.
89
+ *
90
+ * A key mapped to `undefined` is dropped by `spawn` rather than set empty,
91
+ * which is the difference between a server seeing no `USER` and seeing an
92
+ * empty one. Read from the SDK's own list rather than a copy of it, so a
93
+ * name it adds later is refused by the same code.
94
+ */
95
+ declare const sealedStdioEnv: (granted: Record<string, string>, platform?: NodeJS.Platform) => Record<string, string>;
96
+ /**
97
+ * A bare command resolved to a path against the granted search path, by us
98
+ * rather than by the spawn.
99
+ *
100
+ * `StdioClientTransport` spawns through `cross-spawn`, whose Windows
101
+ * resolver puts `process.cwd()` at the front of the search path ahead of
102
+ * anything the operator granted — `which/which.js` says so in its own
103
+ * comment, "windows always checks the cwd first". The daemon's working
104
+ * directory is not a grant, and an `npx.cmd` dropped into it would run in
105
+ * place of the one on the granted `PATH`.
106
+ *
107
+ * Handing the transport a path it does not have to search removes that. It
108
+ * is done on every platform rather than behind a Windows branch, so that
109
+ * the resolution Windows depends on is the one CI exercises, and so that
110
+ * "what does this command resolve to" has one answer instead of two.
111
+ */
112
+ declare const resolveCommandPath: (command: string, granted: Record<string, string>, platform?: NodeJS.Platform, base?: string) => string | undefined;
55
113
  export declare const createMcpPlugin: (config?: JsonObject, options?: McpPluginOptions) => Plugin;
56
114
  /** The loader's ABI. See `docs/architecture/plugins.md`. */
57
115
  export declare const createPlugin: (config: JsonObject) => Plugin;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAE/E,OAAO,EAGL,KAAK,UAAU,EAEf,KAAK,MAAM,EAIZ,MAAM,oBAAoB,CAAC;AAS5B,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAiChH,0EAA0E;AAC1E,MAAM,WAAW,aAAa;IAC5B,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,0CAA0C;IAC1C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,gBAAgB,EAAE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AAM,EAAE,MAAM,CAAC,EAC/B,WAAU,MAAM,CAAC,QAA2B,KAC3C,MAAM,CAAC,MAAM,EAAE,MAAM,CAgDvB,CAAC;AAwFF;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,kBAAkB,GACtB,SAAS,MAAM,EACf,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,WAAU,MAAM,CAAC,QAA2B,EAC5C,OAAM,MAAsB,KAC3B,MAAM,GAAG,SAqBX,CAAC;AAgGF,eAAO,MAAM,eAAe,GAAI,SAAQ,UAAe,EAAE,UAAS,gBAAqB,KAAG,MA4YzF,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,YAAY,GAAI,QAAQ,UAAU,KAAG,MAAiC,CAAC"}
package/dist/index.js CHANGED
@@ -1,10 +1,24 @@
1
1
  import { Client } from '@modelcontextprotocol/sdk/client/index.js';
2
- import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
2
+ import { DEFAULT_INHERITED_ENV_VARS, StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
3
3
  import { StreamableHTTPClientTransport, StreamableHTTPError } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
4
4
  import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js';
5
+ import { accessSync, constants, statSync } from 'node:fs';
6
+ import { join, resolve } from 'node:path';
5
7
  import { DEFAULT_SUBPROCESS_PASS_ENV, } from '@stratusagent/core';
6
8
  import { bridgedToolName, normalizeCallResult, sanitizeToolSegment, SERVER_NAME_PATTERN, } from "./normalize.js";
9
+ /**
10
+ * What this client tells an MCP server it is. Moves with the package
11
+ * manifests on a release, like CLI_VERSION and CONTROL_API_VERSION — a
12
+ * server that logs or keys compatibility on clientInfo.version otherwise
13
+ * goes on seeing the release this literal was last touched at.
14
+ *
15
+ * Exported for the same reason theirs are: so a test can pin it to
16
+ * package.json, because nothing else fails when a release bumps the
17
+ * manifest and leaves the literal behind.
18
+ */
19
+ export const PLUGIN_MCP_VERSION = '0.11.0';
7
20
  export { bridgedToolName, normalizeCallResult, sanitizeToolSegment, SERVER_NAME_PATTERN } from "./normalize.js";
21
+ export { sealedStdioEnv, pathGrant, resolveCommandPath };
8
22
  /**
9
23
  * The MCP bridge: mounts Model Context Protocol servers as Stratus tools.
10
24
  *
@@ -72,6 +86,39 @@ const asStringArray = (value, where) => {
72
86
  * configuration errors and fail the plugin at load — a mistyped block is
73
87
  * the operator's to fix, unlike a server that is merely down.
74
88
  */
89
+ /**
90
+ * The granted search path, looked up the way the *platform* spells it.
91
+ *
92
+ * Case-insensitive on Windows only, because that is where it is true.
93
+ * Windows environment names are case-insensitive and `Path` is the spelling
94
+ * it actually uses, so a check keyed to `PATH` alone would refuse a Windows
95
+ * config that granted the variable perfectly well.
96
+ *
97
+ * POSIX names are case-sensitive, and only `PATH` controls executable
98
+ * lookup. Accepting `Path` there would pass a grant that does nothing: the
99
+ * child is handed `Path`, `PATH` is sealed away as ungranted, and a bare
100
+ * command has no search path at all — which is precisely the state the
101
+ * refusal below exists to prevent. A generous read of the spelling would
102
+ * have defeated the check it guards.
103
+ *
104
+ * `platform` is a parameter so the Windows branch can be tested from
105
+ * anywhere; nothing passes it in production.
106
+ */
107
+ const grantedEntry = (granted, name, platform) => (platform === 'win32'
108
+ ? Object.entries(granted).find(([key]) => key.toLowerCase() === name.toLowerCase())
109
+ : (name in granted ? [name, granted[name]] : undefined));
110
+ /**
111
+ * The granted search path, or undefined when there is not a usable one.
112
+ *
113
+ * Empty counts as absent. `which` takes a falsy `path` as no path and falls
114
+ * back to `process.env.PATH` — the daemon's own — so an empty grant would
115
+ * resolve a bare command against exactly the environment this config
116
+ * declined to grant, which is the leak the seal exists to close.
117
+ */
118
+ const pathGrant = (env, platform = process.platform) => {
119
+ const value = grantedEntry(env, 'PATH', platform)?.[1];
120
+ return value !== undefined && value.length > 0 ? value : undefined;
121
+ };
75
122
  const resolveServerSpec = (name, block, processEnv) => {
76
123
  const where = `servers.${name}`;
77
124
  if (!SERVER_NAME_PATTERN.test(name)) {
@@ -120,6 +167,22 @@ const resolveServerSpec = (name, block, processEnv) => {
120
167
  }
121
168
  }
122
169
  Object.assign(env, asStringRecord(block.env, `${where}.env`));
170
+ // A bare command is resolved against the child's PATH, and the child's
171
+ // PATH is now only what this config granted — so without one there is no
172
+ // search path to find it in, and the failure would arrive at connect time
173
+ // as a bare ENOENT that reads like a missing binary.
174
+ //
175
+ // Refused here rather than diagnosed there, because the runtime signal
176
+ // cannot be trusted to mean what it says: on Windows the SDK spawns
177
+ // through cross-spawn, whose resolver hands an absent PATH to `which`,
178
+ // and `which` falls back to `process.env.PATH` — the daemon's own. So a
179
+ // bare command would still resolve against exactly the environment this
180
+ // config declined to grant. Same rule as a malformed `passEnv`: a grant
181
+ // an operator believes is in effect must never quietly be nothing.
182
+ if (command !== undefined && !/[/\\]/.test(command) && pathGrant(env) === undefined) {
183
+ throw new McpConfigError(`${where}.command is "${command}", which has to be found on PATH, but ${where}.passEnv does not grant PATH. `
184
+ + 'Grant PATH, or give the command as an absolute path.');
185
+ }
123
186
  return {
124
187
  name,
125
188
  ...(command !== undefined ? { command } : {}),
@@ -152,16 +215,299 @@ const resolveServerSpec = (name, block, processEnv) => {
152
215
  * params, a timeout on a slow tool — is a live connection and no reason
153
216
  * to tear it down.
154
217
  */
218
+ /**
219
+ * An error's text, cut to a length that cannot be a payload. Every error
220
+ * this plugin forwards to the host's log goes through here, because the
221
+ * SDK's messages carry bodies: a Streamable HTTP POST that fails quotes the
222
+ * whole response text, and the log this now reaches is `stratusd.jsonl`,
223
+ * which rotates at 8 MB and is what people paste into issues.
224
+ */
225
+ const ERROR_TEXT_MAX_CHARS = 200;
226
+ const describeError = (error) => {
227
+ const message = error instanceof Error ? error.message : String(error);
228
+ return message.length > ERROR_TEXT_MAX_CHARS ? `${message.slice(0, ERROR_TEXT_MAX_CHARS)}…` : message;
229
+ };
230
+ /**
231
+ * The transport's error text, with the two the operator needs translated.
232
+ * The SDK's stdio reader refuses a single JSON-RPC message over its buffer
233
+ * limit (10 MB unless the transport is built with another) and closes the
234
+ * connection; its wording names the buffer, not the reply that overflowed
235
+ * it, and nothing about it says the server has to change. A reply that is
236
+ * not JSON fails to parse with the text quoted in the error — for a stdio
237
+ * server that is its stray logging on stdout, for an HTTP server a body
238
+ * that was not JSON-RPC — and neither belongs in the daemon log or an
239
+ * agent's error text.
240
+ */
241
+ /**
242
+ * The limit a stdio reader overflow names, or undefined for any other
243
+ * error. Only a stdio server has the reader; an HTTP error quoting a body
244
+ * that happens to contain the phrase is a body, and is bounded like one.
245
+ * The digits are bounded too, so a match can never carry more than a
246
+ * number. This is the one transport error the SDK follows with a close of
247
+ * its own — see `ServerState.closeCause`.
248
+ */
249
+ const stdioOverflowBytes = (error, spec) => {
250
+ if (spec.command === undefined) {
251
+ return undefined;
252
+ }
253
+ const message = error instanceof Error ? error.message : String(error);
254
+ return /^ReadBuffer exceeded maximum size of (\d{1,15}) bytes$/.exec(message)?.[1];
255
+ };
256
+ /**
257
+ * An endpoint as the log may carry it: the origin and nothing else. A
258
+ * credential can sit in the userinfo, in a query value, or in a path
259
+ * segment (`https://host/mcp/<token>` is a common shape), and the log is
260
+ * what people paste into issues. The origin is enough to tell one server
261
+ * from another, and the line names the config block for the rest.
262
+ */
263
+ const describeEndpoint = (url) => {
264
+ try {
265
+ return new URL(url).origin;
266
+ }
267
+ catch {
268
+ return '<unparseable url>';
269
+ }
270
+ };
271
+ /**
272
+ * Whole log lines are bounded, not only the error text inside them — a
273
+ * remote server chooses its tool names, and one name can be as long as
274
+ * the server likes.
275
+ */
276
+ const LOG_LINE_MAX_CHARS = 1000;
277
+ const boundedSink = (sink) => (message) => {
278
+ sink(message.length > LOG_LINE_MAX_CHARS ? `${message.slice(0, LOG_LINE_MAX_CHARS)}…` : message);
279
+ };
280
+ const describeTransportError = (error, spec) => {
281
+ const overflow = stdioOverflowBytes(error, spec);
282
+ if (overflow !== undefined) {
283
+ return `the server sent a single message larger than the ${overflow}-byte stdio limit, and the connection was closed. `
284
+ + 'A result that large has to come back smaller — paged, summarized, or written to a file.';
285
+ }
286
+ if (error instanceof SyntaxError) {
287
+ return spec.command !== undefined
288
+ ? 'the server wrote a line to stdout that is not JSON-RPC — its own logging belongs on stderr.'
289
+ : 'the server answered with a body that is not valid JSON-RPC.';
290
+ }
291
+ return describeError(error);
292
+ };
155
293
  const isConnectionFailure = (error) => error instanceof StreamableHTTPError
156
294
  || (error instanceof McpError && error.code === ErrorCode.ConnectionClosed)
157
295
  || error instanceof TypeError;
296
+ /**
297
+ * The granted environment, plus an explicit refusal of every name the
298
+ * transport would otherwise inherit on its own.
299
+ *
300
+ * `StdioClientTransport` spawns with `{ ...getDefaultEnvironment(), ...env }`
301
+ * — the SDK's own idea of what a server needs (on POSIX: HOME, LOGNAME,
302
+ * PATH, SHELL, TERM, USER). That spread is a floor a caller cannot lower by
303
+ * passing a scrubbed `env`, so a server mounted with `passEnv: []` still
304
+ * received all six: the operator was told they get a sealed environment and
305
+ * did not. None of the six is a secret, but which of them a third-party
306
+ * server learns is the operator's decision, and `tool-shell` — which spawns
307
+ * directly and shares `DEFAULT_SUBPROCESS_PASS_ENV` so that "what does a
308
+ * child see" has one answer — already honours it.
309
+ *
310
+ * A key mapped to `undefined` is dropped by `spawn` rather than set empty,
311
+ * which is the difference between a server seeing no `USER` and seeing an
312
+ * empty one. Read from the SDK's own list rather than a copy of it, so a
313
+ * name it adds later is refused by the same code.
314
+ */
315
+ const sealedStdioEnv = (granted, platform = process.platform) => {
316
+ const sealed = {};
317
+ for (const name of DEFAULT_INHERITED_ENV_VARS) {
318
+ // Asked through the same rule the grant check uses. These two must agree
319
+ // about what "granted" means: when they disagreed, a Windows config
320
+ // granting `Path` passed the check and was then sealed against by an
321
+ // uppercase `PATH: undefined` for the same variable — the seal
322
+ // contradicting the grant it had just accepted.
323
+ if (grantedEntry(granted, name, platform) === undefined) {
324
+ sealed[name] = undefined;
325
+ }
326
+ }
327
+ const merged = { ...sealed, ...granted };
328
+ // The invariant this function exists for, stated once instead of patched
329
+ // per symptom: **for every name the transport would inherit, exactly one
330
+ // entry leaves here, spelled the way the transport spells it, holding the
331
+ // granted value or nothing.**
332
+ //
333
+ // The transport merges `{ ...getDefaultEnvironment(), ...ours }` using the
334
+ // spellings in its own list. So only that spelling can override the
335
+ // daemon's copy or seal it away; any other casing is either a different
336
+ // variable (POSIX, harmless) or a second spelling of the same one
337
+ // (Windows), and a second spelling leaves the runtime to pick — which it
338
+ // does by lexicographic order, handing the daemon's `USERPROFILE` back over
339
+ // a granted `UserProfile`. Every way this has been wrong was a missing or
340
+ // mis-spelled entry here: a refusal beside a grant, a grant with no refusal
341
+ // to override, and the rule written for `PATH` alone when it holds for the
342
+ // whole set.
343
+ for (const name of DEFAULT_INHERITED_ENV_VARS) {
344
+ if (platform === 'win32') {
345
+ // A second casing of a name Windows treats as one variable.
346
+ for (const key of Object.keys(merged)) {
347
+ if (key !== name && key.toLowerCase() === name.toLowerCase()) {
348
+ delete merged[key];
349
+ }
350
+ }
351
+ }
352
+ // PATH carries the extra rule that an empty grant is not a search path;
353
+ // every other name is worth exactly what the operator wrote.
354
+ merged[name] = name === 'PATH'
355
+ ? pathGrant(granted, platform)
356
+ : grantedEntry(granted, name, platform)?.[1];
357
+ }
358
+ // The cast is the SDK's types not describing the drop-on-undefined
359
+ // behaviour its own spawn relies on; the values are deliberate.
360
+ return merged;
361
+ };
362
+ /**
363
+ * What counts as executable on Windows when `PATHEXT` was not granted.
364
+ *
365
+ * A constant rather than the daemon's own `PATHEXT`, for the same reason
366
+ * `pathGrant` refuses an empty `PATH`: a value this config did not grant is
367
+ * not part of the search it declared. And this constant specifically,
368
+ * because it is the fallback `which` already uses — a wider one (Windows'
369
+ * own default adds `.VBS`, `.JS`, `.WS`, `.MSC`) would make a bare command
370
+ * resolve to file types that resolve to nothing today. Replacing a lookup
371
+ * is not an occasion to widen what it will run.
372
+ */
373
+ const WHICH_FALLBACK_PATHEXT = '.EXE;.CMD;.BAT;.COM';
374
+ /**
375
+ * The granted search path as directories, in order.
376
+ *
377
+ * An empty entry is dropped rather than read as the working directory the
378
+ * way a shell would. That is not the same call as dropping a relative entry,
379
+ * which is honoured: `./node_modules/.bin` is a directory somebody chose,
380
+ * while a zero-length entry is what a stray colon produces — and the default
381
+ * grant is `passEnv: ['PATH']`, which copies the daemon's own PATH verbatim,
382
+ * trailing colon included. Nobody decided that one, which makes it the same
383
+ * shape of hole as Windows searching the cwd without being asked.
384
+ */
385
+ const searchEntries = (search, platform) => search
386
+ .split(platform === 'win32' ? ';' : ':')
387
+ // A *balanced* pair only, the way `which` does it (`/^".*"$/`). A lone
388
+ // leading or trailing quote is a malformed entry, and stripping it would
389
+ // silently search a directory the granted string does not name — which is
390
+ // the same substitution this whole resolver exists to prevent, arrived at
391
+ // from the other side.
392
+ .map((entry) => (platform === 'win32' && /^".*"$/.test(entry) ? entry.slice(1, -1) : entry))
393
+ .filter((entry) => entry.length > 0);
394
+ /**
395
+ * The filenames a command could have inside one directory.
396
+ *
397
+ * On POSIX, itself. On Windows the extension is what makes a file runnable,
398
+ * so every `PATHEXT` entry is a candidate — and a command that already
399
+ * carries a dot is tried as written first, which is what `cmd.exe` and
400
+ * `which` both do.
401
+ */
402
+ const commandCandidates = (command, platform, pathext) => {
403
+ if (platform !== 'win32') {
404
+ return [command];
405
+ }
406
+ const extensions = (pathext ?? WHICH_FALLBACK_PATHEXT).split(';').filter((ext) => ext.length > 0);
407
+ const suffixed = extensions.map((ext) => `${command}${ext}`);
408
+ // Tried as written first only when what it already carries is an extension
409
+ // `PATHEXT` permits. `which` unshifts the unsuffixed candidate whenever the
410
+ // command holds a dot, but `isexe` then checks that candidate's extension
411
+ // against `PATHEXT` like any other — so a `srv.js` under `PATHEXT: ".EXE"`
412
+ // is not runnable there either, and taking it here would let a file
413
+ // Windows would refuse mask the `srv.js.EXE` beside it that it would run.
414
+ //
415
+ // One knowing divergence: `isexe` reads an empty entry *inside* `PATHEXT`
416
+ // as "every extension is executable". Empty entries are dropped here, so
417
+ // `PATHEXT: ".EXE;"` still permits only `.EXE`. A grant is not widened by
418
+ // the punctuation that ends it.
419
+ return extensions.some((ext) => command.toLowerCase().endsWith(ext.toLowerCase()))
420
+ ? [command, ...suffixed]
421
+ : suffixed;
422
+ };
423
+ /** Whether a candidate is a file this platform would actually run. */
424
+ const isRunnableFile = (candidate, platform) => {
425
+ try {
426
+ if (!statSync(candidate).isFile()) {
427
+ return false;
428
+ }
429
+ // Windows has no execute bit; the extension decided it, in the candidate
430
+ // list above.
431
+ if (platform === 'win32') {
432
+ return true;
433
+ }
434
+ accessSync(candidate, constants.X_OK);
435
+ return true;
436
+ }
437
+ catch {
438
+ return false;
439
+ }
440
+ };
441
+ /**
442
+ * A bare command resolved to a path against the granted search path, by us
443
+ * rather than by the spawn.
444
+ *
445
+ * `StdioClientTransport` spawns through `cross-spawn`, whose Windows
446
+ * resolver puts `process.cwd()` at the front of the search path ahead of
447
+ * anything the operator granted — `which/which.js` says so in its own
448
+ * comment, "windows always checks the cwd first". The daemon's working
449
+ * directory is not a grant, and an `npx.cmd` dropped into it would run in
450
+ * place of the one on the granted `PATH`.
451
+ *
452
+ * Handing the transport a path it does not have to search removes that. It
453
+ * is done on every platform rather than behind a Windows branch, so that
454
+ * the resolution Windows depends on is the one CI exercises, and so that
455
+ * "what does this command resolve to" has one answer instead of two.
456
+ */
457
+ const resolveCommandPath = (command, granted, platform = process.platform, base = process.cwd()) => {
458
+ const search = pathGrant(granted, platform);
459
+ if (search === undefined) {
460
+ return undefined;
461
+ }
462
+ const pathext = platform === 'win32' ? grantedEntry(granted, 'PATHEXT', platform)?.[1] : undefined;
463
+ for (const entry of searchEntries(search, platform)) {
464
+ for (const candidate of commandCandidates(command, platform, pathext)) {
465
+ // Absolute out, resolved against the directory the child will actually
466
+ // run in. Both halves matter and neither is optional: a relative entry
467
+ // stat'd against the daemon's directory asks about a different file
468
+ // than the one the spawn would find, and a relative path *returned*
469
+ // gets re-read against the server's `cwd` — so the file checked here
470
+ // and the file spawned there would be two different files.
471
+ const full = join(resolve(base, entry), candidate);
472
+ if (isRunnableFile(full, platform)) {
473
+ return full;
474
+ }
475
+ }
476
+ }
477
+ return undefined;
478
+ };
479
+ /**
480
+ * The executable to spawn: what the operator wrote when it names a path,
481
+ * and otherwise whatever the granted search path resolves it to.
482
+ *
483
+ * A plain `Error` rather than `McpConfigError`, because the two mean
484
+ * different things to `setup`: a config that cannot become correct fails
485
+ * the plugin, while a binary that is not installed *yet* leaves the daemon
486
+ * serving every other agent. This is the second kind — the reconnect loop
487
+ * builds a fresh transport each attempt, so a server whose package finishes
488
+ * installing is picked up without a daemon restart.
489
+ */
490
+ const stdioCommand = (command, granted, cwd) => {
491
+ if (/[/\\]/.test(command)) {
492
+ return command;
493
+ }
494
+ // The child's own working directory, which is what a relative search-path
495
+ // entry is relative to. Undefined means the server inherits the daemon's,
496
+ // so that is the base then — the same directory `spawn` would use.
497
+ const resolved = resolveCommandPath(command, granted, process.platform, cwd ?? process.cwd());
498
+ if (resolved === undefined) {
499
+ throw new Error(`Command "${command}" was not found on the PATH this server was granted. `
500
+ + 'Grant a PATH that contains it, or give the command as an absolute path.');
501
+ }
502
+ return resolved;
503
+ };
158
504
  const buildTransport = (spec) => {
159
505
  if (spec.command !== undefined) {
160
506
  return new StdioClientTransport({
161
- command: spec.command,
507
+ command: stdioCommand(spec.command, spec.env, spec.cwd),
162
508
  args: spec.args,
163
509
  ...(spec.cwd !== undefined ? { cwd: spec.cwd } : {}),
164
- env: spec.env,
510
+ env: sealedStdioEnv(spec.env),
165
511
  });
166
512
  }
167
513
  // The assertion papers over the SDK's own optional-property types not
@@ -171,8 +517,13 @@ const buildTransport = (spec) => {
171
517
  });
172
518
  };
173
519
  export const createMcpPlugin = (config = {}, options = {}) => {
174
- const log = options.log ?? ((message) => console.error(`[plugin-mcp] ${message}`));
175
- const warn = options.warn ?? ((message) => console.error(`[plugin-mcp] ${message}`));
520
+ // Reassigned at setup when the host offers its own log and the caller
521
+ // did not: the daemon's structured log is where these lines belong, and
522
+ // stderr is the fallback for a host that has nothing better. Every line
523
+ // is bounded on its way out, whatever composed it — a server names its
524
+ // own tools, at any length it likes, and the daemon log rotates at 8 MB.
525
+ let log = boundedSink(options.log ?? ((message) => console.error(`[plugin-mcp] ${message}`)));
526
+ let warn = boundedSink(options.warn ?? ((message) => console.error(`[plugin-mcp] ${message}`)));
176
527
  const processEnv = options.processEnv ?? process.env;
177
528
  const delayFor = options.reconnectDelayMs
178
529
  ?? ((attempt) => Math.min(RECONNECT_INITIAL_DELAY_MS * 2 ** attempt, RECONNECT_MAX_DELAY_MS));
@@ -186,6 +537,7 @@ export const createMcpPlugin = (config = {}, options = {}) => {
186
537
  pending: undefined,
187
538
  connected: false,
188
539
  connecting: false,
540
+ closeCause: undefined,
189
541
  attempt: 0,
190
542
  timer: undefined,
191
543
  tools: new Map(),
@@ -228,6 +580,12 @@ export const createMcpPlugin = (config = {}, options = {}) => {
228
580
  if (isConnectionFailure(error) && state.client === client) {
229
581
  dropConnection(state, error);
230
582
  }
583
+ // "Connection closed" is all the SDK says about a request the
584
+ // transport died under. When the transport said why, say so here,
585
+ // where the agent reads it.
586
+ if (isConnectionFailure(error) && state.closeCause !== undefined) {
587
+ throw new Error(`${error instanceof Error ? error.message : String(error)} — ${state.closeCause}`);
588
+ }
231
589
  throw error;
232
590
  }
233
591
  return normalizeCallResult(result, {
@@ -329,7 +687,7 @@ export const createMcpPlugin = (config = {}, options = {}) => {
329
687
  throw error;
330
688
  }
331
689
  next.delete(registered);
332
- warn(`mcp server ${state.spec.name}: ${registered} was not registered: ${error instanceof Error ? error.message : String(error)}`);
690
+ warn(`mcp server ${state.spec.name}: ${registered} was not registered: ${describeError(error)}`);
333
691
  continue;
334
692
  }
335
693
  if (!firstConnect) {
@@ -353,7 +711,7 @@ export const createMcpPlugin = (config = {}, options = {}) => {
353
711
  state.client = undefined;
354
712
  state.connected = false;
355
713
  warn(`mcp server ${state.spec.name} connection failed mid-call — its tools are unavailable until it reconnects: `
356
- + `${cause instanceof Error ? cause.message : String(cause)}`);
714
+ + describeError(cause));
357
715
  void client.close().catch(() => { });
358
716
  scheduleReconnect(state);
359
717
  };
@@ -366,7 +724,7 @@ export const createMcpPlugin = (config = {}, options = {}) => {
366
724
  state.timer = setTimeout(() => {
367
725
  state.timer = undefined;
368
726
  void connect(state, false).catch((error) => {
369
- warn(`mcp server ${state.spec.name} reconnect failed: ${error instanceof Error ? error.message : String(error)}`);
727
+ warn(`mcp server ${state.spec.name} reconnect failed: ${describeError(error)}`);
370
728
  scheduleReconnect(state);
371
729
  });
372
730
  }, delay);
@@ -394,7 +752,29 @@ export const createMcpPlugin = (config = {}, options = {}) => {
394
752
  // so dispose() can cut a handshake short instead of waiting for
395
753
  // these awaits to notice `disposed` on their own.
396
754
  state.pending = transport;
397
- const client = new Client({ name: '@stratusagent/plugin-mcp', version: '0.9.0' });
755
+ state.closeCause = undefined;
756
+ // The transport's errors otherwise go nowhere, and the one that
757
+ // closes a stdio connection — a reply over the reader's buffer limit
758
+ // — arrives here moments before the onclose that the tool call then
759
+ // reports as a bare "Connection closed". Hooked on the transport, not
760
+ // on `client.onerror`: the client funnels its own protocol errors
761
+ // through that too, and one of them — a reply landing after its
762
+ // request timed out — carries the entire serialized response in its
763
+ // message. Logged, that is a tool result in the daemon log; retained,
764
+ // it is what an unrelated later failure would be blamed on.
765
+ // `client.connect` wraps whatever handler the transport already has,
766
+ // so this one keeps running underneath the SDK's.
767
+ transport.onerror = (error) => {
768
+ if (disposed) {
769
+ return;
770
+ }
771
+ const described = describeTransportError(error, state.spec);
772
+ warn(`mcp server ${state.spec.name} transport error: ${described}`);
773
+ if (stdioOverflowBytes(error, state.spec) !== undefined) {
774
+ state.closeCause = described;
775
+ }
776
+ };
777
+ const client = new Client({ name: '@stratusagent/plugin-mcp', version: PLUGIN_MCP_VERSION });
398
778
  // A close that lands before this client is published cannot be
399
779
  // dropped: the identity guard below would discard it, and connect()
400
780
  // would then mark an already-closed client connected — leaving the
@@ -451,6 +831,12 @@ export const createMcpPlugin = (config = {}, options = {}) => {
451
831
  name: '@stratusagent/plugin-mcp',
452
832
  async setup(context) {
453
833
  view = context.tools;
834
+ if (options.log === undefined && context.log !== undefined) {
835
+ log = boundedSink(context.log);
836
+ }
837
+ if (options.warn === undefined && context.warn !== undefined) {
838
+ warn = boundedSink(context.warn);
839
+ }
454
840
  await Promise.all(states.map(async (state) => {
455
841
  try {
456
842
  await connect(state, true);
@@ -464,9 +850,9 @@ export const createMcpPlugin = (config = {}, options = {}) => {
464
850
  throw error;
465
851
  }
466
852
  warn(`mcp server ${state.spec.name} is unreachable — starting without its tools; they register when it comes back. `
467
- + `Check ${state.spec.command !== undefined ? `the command (${state.spec.command})` : `the endpoint (${state.spec.url})`} `
853
+ + `Check ${state.spec.command !== undefined ? `the command (${state.spec.command})` : `the endpoint (${describeEndpoint(state.spec.url)})`} `
468
854
  + `under plugins["@stratusagent/plugin-mcp"].servers.${state.spec.name}. `
469
- + `(${error instanceof Error ? error.message : String(error)})`);
855
+ + `(${describeError(error)})`);
470
856
  scheduleReconnect(state);
471
857
  }
472
858
  }));
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AACxH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAGzE,OAAO,EACL,2BAA2B,GAQ5B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,eAAe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AAC;YACxB,CAAC,CAAC,CAAC,CAAC;QACN,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,4DAA4D;AAC5D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAkB,EAAU,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stratusagent/plugin-mcp",
3
- "version": "0.9.2",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -19,13 +19,13 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@modelcontextprotocol/sdk": "^1.30.0",
22
- "@stratusagent/core": "0.9.2"
22
+ "@stratusagent/core": "0.11.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/node": "^24.6.0",
26
26
  "typescript": "^5.9.3",
27
27
  "zod": "^4.4.3",
28
- "@stratusagent/plugins": "0.9.2"
28
+ "@stratusagent/plugins": "0.11.0"
29
29
  },
30
30
  "license": "MIT",
31
31
  "repository": {