@mcp-use/client 2.2.2 → 2.2.3-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.
@@ -1110,7 +1110,8 @@ var BaseConnector = class {
1110
1110
  * @returns Complete list of all resources
1111
1111
  */
1112
1112
  async listAllResources(options) {
1113
- if (!this.client) {
1113
+ const client = this.client;
1114
+ if (!client) {
1114
1115
  throw new Error("MCP client is not connected");
1115
1116
  }
1116
1117
  if (!this.capabilitiesCache?.resources) {
@@ -1123,7 +1124,7 @@ var BaseConnector = class {
1123
1124
  const allResources = [];
1124
1125
  let cursor = void 0;
1125
1126
  do {
1126
- const result = await this.client.listResources({ cursor }, options);
1127
+ const result = await client.listResources({ cursor }, options);
1127
1128
  allResources.push(...result.resources || []);
1128
1129
  cursor = result.nextCursor;
1129
1130
  } while (cursor);
@@ -1476,6 +1477,9 @@ var HttpConnector = class extends BaseConnector {
1476
1477
  throw error;
1477
1478
  }
1478
1479
  await this.completeInteractiveAuthorization();
1480
+ if (!this.connected || !this.client) {
1481
+ throw new Error("MCP client is not connected");
1482
+ }
1479
1483
  return operation();
1480
1484
  }
1481
1485
  }
@@ -1901,7 +1905,7 @@ var HttpConnector = class extends BaseConnector {
1901
1905
  };
1902
1906
 
1903
1907
  // src/utils/version.ts
1904
- var VERSION = "2.2.2";
1908
+ var VERSION = "2.2.3-canary.1";
1905
1909
  function getPackageVersion() {
1906
1910
  return VERSION;
1907
1911
  }