@mcp-use/client 2.1.5 → 2.2.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/dist/.tsbuildinfo +1 -1
- package/dist/core/session.d.ts +2 -1
- package/dist/core/session.d.ts.map +1 -1
- package/dist/index-browser.js +7 -5
- package/dist/index-browser.js.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/react/index.js +7 -5
- package/dist/react/index.js.map +1 -1
- package/dist/transport/base.d.ts +2 -1
- package/dist/transport/base.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1074,15 +1074,16 @@ var init_base = __esm({
|
|
|
1074
1074
|
*
|
|
1075
1075
|
* @param name - Prompt name.
|
|
1076
1076
|
* @param args - Prompt arguments.
|
|
1077
|
+
* @param options - Per-request timeout, cancellation, and progress options.
|
|
1077
1078
|
* @returns The rendered prompt returned by the server.
|
|
1078
1079
|
*/
|
|
1079
|
-
async getPrompt(name, args) {
|
|
1080
|
+
async getPrompt(name, args, options) {
|
|
1080
1081
|
if (!this.client) {
|
|
1081
1082
|
throw new Error("MCP client is not connected");
|
|
1082
1083
|
}
|
|
1083
1084
|
logger.debug(`Getting prompt ${name}`);
|
|
1084
1085
|
return await this.executeRequest(
|
|
1085
|
-
() => this.client.getPrompt({ name, arguments: args })
|
|
1086
|
+
() => this.client.getPrompt({ name, arguments: args }, options)
|
|
1086
1087
|
);
|
|
1087
1088
|
}
|
|
1088
1089
|
/**
|
|
@@ -1525,7 +1526,7 @@ init_connector_telemetry();
|
|
|
1525
1526
|
init_logging();
|
|
1526
1527
|
|
|
1527
1528
|
// src/utils/version.ts
|
|
1528
|
-
var VERSION = "2.
|
|
1529
|
+
var VERSION = "2.2.0";
|
|
1529
1530
|
function getPackageVersion() {
|
|
1530
1531
|
return VERSION;
|
|
1531
1532
|
}
|
|
@@ -4057,6 +4058,7 @@ var MCPConnection = class {
|
|
|
4057
4058
|
*
|
|
4058
4059
|
* @param name - Name of the prompt to get
|
|
4059
4060
|
* @param args - Arguments for the prompt
|
|
4061
|
+
* @param options - Per-request timeout, cancellation, and progress options
|
|
4060
4062
|
* @returns Prompt result
|
|
4061
4063
|
*
|
|
4062
4064
|
* @example
|
|
@@ -4065,8 +4067,8 @@ var MCPConnection = class {
|
|
|
4065
4067
|
* console.log(prompt.messages);
|
|
4066
4068
|
* ```
|
|
4067
4069
|
*/
|
|
4068
|
-
async getPrompt(name, args) {
|
|
4069
|
-
return this.connector.getPrompt(name, args);
|
|
4070
|
+
async getPrompt(name, args, options) {
|
|
4071
|
+
return this.connector.getPrompt(name, args, options);
|
|
4070
4072
|
}
|
|
4071
4073
|
/**
|
|
4072
4074
|
* Send a raw request through the client.
|