@mcp-use/client 2.0.0 → 2.0.1-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/core/config.d.ts +8 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/node.d.ts.map +1 -1
- package/dist/index-browser.js +1 -1
- package/dist/index-browser.js.map +1 -1
- package/dist/index.js +32 -18
- package/dist/index.js.map +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.map +1 -1
- package/dist/transport/stdio.d.ts +22 -1
- package/dist/transport/stdio.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,17 @@ import { ConnectionManager } from "./connection-manager.js";
|
|
|
6
6
|
import { StdioClientTransport } from "@modelcontextprotocol/client/stdio";
|
|
7
7
|
import { BaseConnector } from "./base.js";
|
|
8
8
|
import type { ClientInfo } from "./http.js";
|
|
9
|
+
/**
|
|
10
|
+
* How a spawned server's standard error is handled.
|
|
11
|
+
*
|
|
12
|
+
* - `"pipe"` forwards the child's stderr to the connector's `errlog`.
|
|
13
|
+
* - `"inherit"` hands the parent's stderr file descriptor to the child, which
|
|
14
|
+
* preserves TTY detection and colorization but bypasses `errlog`.
|
|
15
|
+
* - `"ignore"` discards it.
|
|
16
|
+
*
|
|
17
|
+
* @defaultValue `"pipe"`
|
|
18
|
+
*/
|
|
19
|
+
export type StdioStderrMode = "pipe" | "inherit" | "ignore";
|
|
9
20
|
/** Stdio-specific connector options. */
|
|
10
21
|
interface StdioConnectorOptions extends ConnectorInitOptions {
|
|
11
22
|
/** Client identity advertised to the server. */
|
|
@@ -28,6 +39,7 @@ export declare class StdioConnector extends BaseConnector {
|
|
|
28
39
|
private readonly env?;
|
|
29
40
|
private readonly cwd?;
|
|
30
41
|
private readonly errlog;
|
|
42
|
+
private readonly stderr;
|
|
31
43
|
private readonly clientInfo;
|
|
32
44
|
private readonly protocolNegotiation;
|
|
33
45
|
/**
|
|
@@ -35,11 +47,18 @@ export declare class StdioConnector extends BaseConnector {
|
|
|
35
47
|
*
|
|
36
48
|
* @param options - Process launch, client identity, and shared connector options.
|
|
37
49
|
*/
|
|
38
|
-
constructor({ command, args, env, errlog, ...rest }?: {
|
|
50
|
+
constructor({ command, args, env, errlog, stderr, ...rest }?: {
|
|
39
51
|
command?: string;
|
|
40
52
|
args?: string[];
|
|
41
53
|
env?: Record<string, string>;
|
|
42
54
|
errlog?: Writable;
|
|
55
|
+
/**
|
|
56
|
+
* How the child's standard error is handled. Defaults to `"pipe"` so
|
|
57
|
+
* {@link StdioStderrMode} forwarding to `errlog` works without extra
|
|
58
|
+
* configuration; pass `"inherit"` to keep the child on the parent's
|
|
59
|
+
* stderr file descriptor.
|
|
60
|
+
*/
|
|
61
|
+
stderr?: StdioStderrMode;
|
|
43
62
|
cwd?: string;
|
|
44
63
|
} & StdioConnectorOptions);
|
|
45
64
|
/**
|
|
@@ -62,6 +81,8 @@ export declare class StdioConnectionManager extends ConnectionManager<StdioClien
|
|
|
62
81
|
private readonly serverParams;
|
|
63
82
|
private readonly errlog;
|
|
64
83
|
private _transport;
|
|
84
|
+
private _stderrSource;
|
|
85
|
+
private readonly _onErrlogError;
|
|
65
86
|
/**
|
|
66
87
|
* Creates a connection manager for a local server process.
|
|
67
88
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../src/transport/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,sBAAsB,EACvB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAItD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,oB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CAAC,EAAE,QAAQ,CAAC;QAClB;;;;;WAKG;QACH,MAAM,CAAC,EAAE,eAAe,CAAC;QACzB,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,GAAG,qBAA0B;IAgB9B;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA+G9B;;;;OAIG;IACH,IAAI,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAK7C;CACF;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,iBAAiB,CAAC,oBAAoB,CAAC;IACjF,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAwB;IACrD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAW;IAClC,OAAO,CAAC,UAAU,CAAqC;IACvD,OAAO,CAAC,aAAa,CAAsC;IAC3D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAE7B;IAEF;;;;;OAKG;gBAED,YAAY,EAAE,qBAAqB,EACnC,MAAM,GAAE,QAAyB;cAOnB,mBAAmB,IAAI,OAAO,CAAC,oBAAoB,CAAC;cA8BpD,eAAe,CAC7B,WAAW,EAAE,oBAAoB,GAChC,OAAO,CAAC,IAAI,CAAC;CAgBjB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-use/client",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.1-canary.1",
|
|
5
5
|
"description": "MCP client for connecting to Model Context Protocol servers — sessions, connectors, and OAuth. Part of the mcp-use v2 framework.",
|
|
6
6
|
"author": "mcp-use, Inc.",
|
|
7
7
|
"license": "MIT",
|