integrate-sdk 0.7.1 → 0.7.2
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/adapters/solid-start.js +0 -40
- package/dist/adapters/svelte-kit.js +0 -40
- package/dist/index.js +0 -40
- package/dist/server.js +0 -40
- package/dist/src/client.d.ts +0 -6
- package/dist/src/client.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1326,8 +1326,6 @@ class MCPClient {
|
|
|
1326
1326
|
onReauthRequired;
|
|
1327
1327
|
maxReauthRetries;
|
|
1328
1328
|
authState = new Map;
|
|
1329
|
-
connectionMode;
|
|
1330
|
-
connecting = null;
|
|
1331
1329
|
oauthManager;
|
|
1332
1330
|
eventEmitter = new SimpleEventEmitter;
|
|
1333
1331
|
apiRouteBase;
|
|
@@ -1361,7 +1359,6 @@ class MCPClient {
|
|
|
1361
1359
|
};
|
|
1362
1360
|
this.onReauthRequired = config.onReauthRequired;
|
|
1363
1361
|
this.maxReauthRetries = config.maxReauthRetries ?? 1;
|
|
1364
|
-
this.connectionMode = config.connectionMode ?? "lazy";
|
|
1365
1362
|
this.oauthManager = new OAuthManager(oauthApiBase, config.oauthFlow);
|
|
1366
1363
|
const providers = this.plugins.filter((p) => p.oauth).map((p) => p.oauth.provider);
|
|
1367
1364
|
this.oauthManager.loadAllProviderTokens(providers);
|
|
@@ -1387,28 +1384,10 @@ class MCPClient {
|
|
|
1387
1384
|
const normalizedPath = oauthApiBase.replace(/\/$/, "");
|
|
1388
1385
|
return `${origin}${normalizedPath}/callback`;
|
|
1389
1386
|
}
|
|
1390
|
-
async ensureConnected() {
|
|
1391
|
-
if (this.initialized && this.transport.isConnected()) {
|
|
1392
|
-
return;
|
|
1393
|
-
}
|
|
1394
|
-
if (this.connecting) {
|
|
1395
|
-
return this.connecting;
|
|
1396
|
-
}
|
|
1397
|
-
if (this.connectionMode === "manual" && !this.initialized) {
|
|
1398
|
-
throw new Error("Client not connected. Call connect() first when using manual connection mode.");
|
|
1399
|
-
}
|
|
1400
|
-
this.connecting = this.connect();
|
|
1401
|
-
try {
|
|
1402
|
-
await this.connecting;
|
|
1403
|
-
} finally {
|
|
1404
|
-
this.connecting = null;
|
|
1405
|
-
}
|
|
1406
|
-
}
|
|
1407
1387
|
createPluginProxy(pluginId) {
|
|
1408
1388
|
return new Proxy({}, {
|
|
1409
1389
|
get: (_target, methodName) => {
|
|
1410
1390
|
return async (args) => {
|
|
1411
|
-
await this.ensureConnected();
|
|
1412
1391
|
const toolName = methodToToolName(methodName, pluginId);
|
|
1413
1392
|
return await this.callToolWithRetry(toolName, args, 0);
|
|
1414
1393
|
};
|
|
@@ -1419,7 +1398,6 @@ class MCPClient {
|
|
|
1419
1398
|
return new Proxy({}, {
|
|
1420
1399
|
get: (_target, methodName) => {
|
|
1421
1400
|
return async (args) => {
|
|
1422
|
-
await this.ensureConnected();
|
|
1423
1401
|
const toolName = methodToToolName(methodName, "");
|
|
1424
1402
|
const finalToolName = toolName.startsWith("_") ? toolName.substring(1) : toolName;
|
|
1425
1403
|
return await this.callServerToolInternal(finalToolName, args);
|
|
@@ -1428,12 +1406,6 @@ class MCPClient {
|
|
|
1428
1406
|
});
|
|
1429
1407
|
}
|
|
1430
1408
|
async callServerToolInternal(name, args) {
|
|
1431
|
-
if (!this.initialized) {
|
|
1432
|
-
throw new Error("Client not initialized. Call connect() first.");
|
|
1433
|
-
}
|
|
1434
|
-
if (!this.availableTools.has(name)) {
|
|
1435
|
-
throw new Error(`Tool "${name}" is not available on the server. Available tools: ${Array.from(this.availableTools.keys()).join(", ")}`);
|
|
1436
|
-
}
|
|
1437
1409
|
try {
|
|
1438
1410
|
const response = await this.callToolThroughHandler(name, args);
|
|
1439
1411
|
return response;
|
|
@@ -1488,12 +1460,6 @@ class MCPClient {
|
|
|
1488
1460
|
return await this.callToolWithRetry(name, args, 0);
|
|
1489
1461
|
}
|
|
1490
1462
|
async callServerTool(name, args) {
|
|
1491
|
-
if (!this.initialized) {
|
|
1492
|
-
throw new Error("Client not initialized. Call connect() first.");
|
|
1493
|
-
}
|
|
1494
|
-
if (!this.availableTools.has(name)) {
|
|
1495
|
-
throw new Error(`Tool "${name}" is not available on the server. Available tools: ${Array.from(this.availableTools.keys()).join(", ")}`);
|
|
1496
|
-
}
|
|
1497
1463
|
try {
|
|
1498
1464
|
const response = await this.callToolThroughHandler(name, args);
|
|
1499
1465
|
return response;
|
|
@@ -1547,15 +1513,9 @@ class MCPClient {
|
|
|
1547
1513
|
return result;
|
|
1548
1514
|
}
|
|
1549
1515
|
async callToolWithRetry(name, args, retryCount = 0) {
|
|
1550
|
-
if (!this.initialized) {
|
|
1551
|
-
throw new Error("Client not initialized. Call connect() first.");
|
|
1552
|
-
}
|
|
1553
1516
|
if (!this.enabledToolNames.has(name)) {
|
|
1554
1517
|
throw new Error(`Tool "${name}" is not enabled. Enable it by adding the appropriate plugin.`);
|
|
1555
1518
|
}
|
|
1556
|
-
if (!this.availableTools.has(name)) {
|
|
1557
|
-
throw new Error(`Tool "${name}" is not available on the server. Available tools: ${Array.from(this.availableTools.keys()).join(", ")}`);
|
|
1558
|
-
}
|
|
1559
1519
|
const provider = this.getProviderForTool(name);
|
|
1560
1520
|
try {
|
|
1561
1521
|
const response = await this.callToolThroughHandler(name, args, provider);
|
|
@@ -1326,8 +1326,6 @@ class MCPClient {
|
|
|
1326
1326
|
onReauthRequired;
|
|
1327
1327
|
maxReauthRetries;
|
|
1328
1328
|
authState = new Map;
|
|
1329
|
-
connectionMode;
|
|
1330
|
-
connecting = null;
|
|
1331
1329
|
oauthManager;
|
|
1332
1330
|
eventEmitter = new SimpleEventEmitter;
|
|
1333
1331
|
apiRouteBase;
|
|
@@ -1361,7 +1359,6 @@ class MCPClient {
|
|
|
1361
1359
|
};
|
|
1362
1360
|
this.onReauthRequired = config.onReauthRequired;
|
|
1363
1361
|
this.maxReauthRetries = config.maxReauthRetries ?? 1;
|
|
1364
|
-
this.connectionMode = config.connectionMode ?? "lazy";
|
|
1365
1362
|
this.oauthManager = new OAuthManager(oauthApiBase, config.oauthFlow);
|
|
1366
1363
|
const providers = this.plugins.filter((p) => p.oauth).map((p) => p.oauth.provider);
|
|
1367
1364
|
this.oauthManager.loadAllProviderTokens(providers);
|
|
@@ -1387,28 +1384,10 @@ class MCPClient {
|
|
|
1387
1384
|
const normalizedPath = oauthApiBase.replace(/\/$/, "");
|
|
1388
1385
|
return `${origin}${normalizedPath}/callback`;
|
|
1389
1386
|
}
|
|
1390
|
-
async ensureConnected() {
|
|
1391
|
-
if (this.initialized && this.transport.isConnected()) {
|
|
1392
|
-
return;
|
|
1393
|
-
}
|
|
1394
|
-
if (this.connecting) {
|
|
1395
|
-
return this.connecting;
|
|
1396
|
-
}
|
|
1397
|
-
if (this.connectionMode === "manual" && !this.initialized) {
|
|
1398
|
-
throw new Error("Client not connected. Call connect() first when using manual connection mode.");
|
|
1399
|
-
}
|
|
1400
|
-
this.connecting = this.connect();
|
|
1401
|
-
try {
|
|
1402
|
-
await this.connecting;
|
|
1403
|
-
} finally {
|
|
1404
|
-
this.connecting = null;
|
|
1405
|
-
}
|
|
1406
|
-
}
|
|
1407
1387
|
createPluginProxy(pluginId) {
|
|
1408
1388
|
return new Proxy({}, {
|
|
1409
1389
|
get: (_target, methodName) => {
|
|
1410
1390
|
return async (args) => {
|
|
1411
|
-
await this.ensureConnected();
|
|
1412
1391
|
const toolName = methodToToolName(methodName, pluginId);
|
|
1413
1392
|
return await this.callToolWithRetry(toolName, args, 0);
|
|
1414
1393
|
};
|
|
@@ -1419,7 +1398,6 @@ class MCPClient {
|
|
|
1419
1398
|
return new Proxy({}, {
|
|
1420
1399
|
get: (_target, methodName) => {
|
|
1421
1400
|
return async (args) => {
|
|
1422
|
-
await this.ensureConnected();
|
|
1423
1401
|
const toolName = methodToToolName(methodName, "");
|
|
1424
1402
|
const finalToolName = toolName.startsWith("_") ? toolName.substring(1) : toolName;
|
|
1425
1403
|
return await this.callServerToolInternal(finalToolName, args);
|
|
@@ -1428,12 +1406,6 @@ class MCPClient {
|
|
|
1428
1406
|
});
|
|
1429
1407
|
}
|
|
1430
1408
|
async callServerToolInternal(name, args) {
|
|
1431
|
-
if (!this.initialized) {
|
|
1432
|
-
throw new Error("Client not initialized. Call connect() first.");
|
|
1433
|
-
}
|
|
1434
|
-
if (!this.availableTools.has(name)) {
|
|
1435
|
-
throw new Error(`Tool "${name}" is not available on the server. Available tools: ${Array.from(this.availableTools.keys()).join(", ")}`);
|
|
1436
|
-
}
|
|
1437
1409
|
try {
|
|
1438
1410
|
const response = await this.callToolThroughHandler(name, args);
|
|
1439
1411
|
return response;
|
|
@@ -1488,12 +1460,6 @@ class MCPClient {
|
|
|
1488
1460
|
return await this.callToolWithRetry(name, args, 0);
|
|
1489
1461
|
}
|
|
1490
1462
|
async callServerTool(name, args) {
|
|
1491
|
-
if (!this.initialized) {
|
|
1492
|
-
throw new Error("Client not initialized. Call connect() first.");
|
|
1493
|
-
}
|
|
1494
|
-
if (!this.availableTools.has(name)) {
|
|
1495
|
-
throw new Error(`Tool "${name}" is not available on the server. Available tools: ${Array.from(this.availableTools.keys()).join(", ")}`);
|
|
1496
|
-
}
|
|
1497
1463
|
try {
|
|
1498
1464
|
const response = await this.callToolThroughHandler(name, args);
|
|
1499
1465
|
return response;
|
|
@@ -1547,15 +1513,9 @@ class MCPClient {
|
|
|
1547
1513
|
return result;
|
|
1548
1514
|
}
|
|
1549
1515
|
async callToolWithRetry(name, args, retryCount = 0) {
|
|
1550
|
-
if (!this.initialized) {
|
|
1551
|
-
throw new Error("Client not initialized. Call connect() first.");
|
|
1552
|
-
}
|
|
1553
1516
|
if (!this.enabledToolNames.has(name)) {
|
|
1554
1517
|
throw new Error(`Tool "${name}" is not enabled. Enable it by adding the appropriate plugin.`);
|
|
1555
1518
|
}
|
|
1556
|
-
if (!this.availableTools.has(name)) {
|
|
1557
|
-
throw new Error(`Tool "${name}" is not available on the server. Available tools: ${Array.from(this.availableTools.keys()).join(", ")}`);
|
|
1558
|
-
}
|
|
1559
1519
|
const provider = this.getProviderForTool(name);
|
|
1560
1520
|
try {
|
|
1561
1521
|
const response = await this.callToolThroughHandler(name, args, provider);
|
package/dist/index.js
CHANGED
|
@@ -1180,8 +1180,6 @@ class MCPClient {
|
|
|
1180
1180
|
onReauthRequired;
|
|
1181
1181
|
maxReauthRetries;
|
|
1182
1182
|
authState = new Map;
|
|
1183
|
-
connectionMode;
|
|
1184
|
-
connecting = null;
|
|
1185
1183
|
oauthManager;
|
|
1186
1184
|
eventEmitter = new SimpleEventEmitter;
|
|
1187
1185
|
apiRouteBase;
|
|
@@ -1215,7 +1213,6 @@ class MCPClient {
|
|
|
1215
1213
|
};
|
|
1216
1214
|
this.onReauthRequired = config.onReauthRequired;
|
|
1217
1215
|
this.maxReauthRetries = config.maxReauthRetries ?? 1;
|
|
1218
|
-
this.connectionMode = config.connectionMode ?? "lazy";
|
|
1219
1216
|
this.oauthManager = new OAuthManager(oauthApiBase, config.oauthFlow);
|
|
1220
1217
|
const providers = this.plugins.filter((p) => p.oauth).map((p) => p.oauth.provider);
|
|
1221
1218
|
this.oauthManager.loadAllProviderTokens(providers);
|
|
@@ -1241,28 +1238,10 @@ class MCPClient {
|
|
|
1241
1238
|
const normalizedPath = oauthApiBase.replace(/\/$/, "");
|
|
1242
1239
|
return `${origin}${normalizedPath}/callback`;
|
|
1243
1240
|
}
|
|
1244
|
-
async ensureConnected() {
|
|
1245
|
-
if (this.initialized && this.transport.isConnected()) {
|
|
1246
|
-
return;
|
|
1247
|
-
}
|
|
1248
|
-
if (this.connecting) {
|
|
1249
|
-
return this.connecting;
|
|
1250
|
-
}
|
|
1251
|
-
if (this.connectionMode === "manual" && !this.initialized) {
|
|
1252
|
-
throw new Error("Client not connected. Call connect() first when using manual connection mode.");
|
|
1253
|
-
}
|
|
1254
|
-
this.connecting = this.connect();
|
|
1255
|
-
try {
|
|
1256
|
-
await this.connecting;
|
|
1257
|
-
} finally {
|
|
1258
|
-
this.connecting = null;
|
|
1259
|
-
}
|
|
1260
|
-
}
|
|
1261
1241
|
createPluginProxy(pluginId) {
|
|
1262
1242
|
return new Proxy({}, {
|
|
1263
1243
|
get: (_target, methodName) => {
|
|
1264
1244
|
return async (args) => {
|
|
1265
|
-
await this.ensureConnected();
|
|
1266
1245
|
const toolName = methodToToolName(methodName, pluginId);
|
|
1267
1246
|
return await this.callToolWithRetry(toolName, args, 0);
|
|
1268
1247
|
};
|
|
@@ -1273,7 +1252,6 @@ class MCPClient {
|
|
|
1273
1252
|
return new Proxy({}, {
|
|
1274
1253
|
get: (_target, methodName) => {
|
|
1275
1254
|
return async (args) => {
|
|
1276
|
-
await this.ensureConnected();
|
|
1277
1255
|
const toolName = methodToToolName(methodName, "");
|
|
1278
1256
|
const finalToolName = toolName.startsWith("_") ? toolName.substring(1) : toolName;
|
|
1279
1257
|
return await this.callServerToolInternal(finalToolName, args);
|
|
@@ -1282,12 +1260,6 @@ class MCPClient {
|
|
|
1282
1260
|
});
|
|
1283
1261
|
}
|
|
1284
1262
|
async callServerToolInternal(name, args) {
|
|
1285
|
-
if (!this.initialized) {
|
|
1286
|
-
throw new Error("Client not initialized. Call connect() first.");
|
|
1287
|
-
}
|
|
1288
|
-
if (!this.availableTools.has(name)) {
|
|
1289
|
-
throw new Error(`Tool "${name}" is not available on the server. Available tools: ${Array.from(this.availableTools.keys()).join(", ")}`);
|
|
1290
|
-
}
|
|
1291
1263
|
try {
|
|
1292
1264
|
const response = await this.callToolThroughHandler(name, args);
|
|
1293
1265
|
return response;
|
|
@@ -1342,12 +1314,6 @@ class MCPClient {
|
|
|
1342
1314
|
return await this.callToolWithRetry(name, args, 0);
|
|
1343
1315
|
}
|
|
1344
1316
|
async callServerTool(name, args) {
|
|
1345
|
-
if (!this.initialized) {
|
|
1346
|
-
throw new Error("Client not initialized. Call connect() first.");
|
|
1347
|
-
}
|
|
1348
|
-
if (!this.availableTools.has(name)) {
|
|
1349
|
-
throw new Error(`Tool "${name}" is not available on the server. Available tools: ${Array.from(this.availableTools.keys()).join(", ")}`);
|
|
1350
|
-
}
|
|
1351
1317
|
try {
|
|
1352
1318
|
const response = await this.callToolThroughHandler(name, args);
|
|
1353
1319
|
return response;
|
|
@@ -1401,15 +1367,9 @@ class MCPClient {
|
|
|
1401
1367
|
return result;
|
|
1402
1368
|
}
|
|
1403
1369
|
async callToolWithRetry(name, args, retryCount = 0) {
|
|
1404
|
-
if (!this.initialized) {
|
|
1405
|
-
throw new Error("Client not initialized. Call connect() first.");
|
|
1406
|
-
}
|
|
1407
1370
|
if (!this.enabledToolNames.has(name)) {
|
|
1408
1371
|
throw new Error(`Tool "${name}" is not enabled. Enable it by adding the appropriate plugin.`);
|
|
1409
1372
|
}
|
|
1410
|
-
if (!this.availableTools.has(name)) {
|
|
1411
|
-
throw new Error(`Tool "${name}" is not available on the server. Available tools: ${Array.from(this.availableTools.keys()).join(", ")}`);
|
|
1412
|
-
}
|
|
1413
1373
|
const provider = this.getProviderForTool(name);
|
|
1414
1374
|
try {
|
|
1415
1375
|
const response = await this.callToolThroughHandler(name, args, provider);
|
package/dist/server.js
CHANGED
|
@@ -1180,8 +1180,6 @@ class MCPClient {
|
|
|
1180
1180
|
onReauthRequired;
|
|
1181
1181
|
maxReauthRetries;
|
|
1182
1182
|
authState = new Map;
|
|
1183
|
-
connectionMode;
|
|
1184
|
-
connecting = null;
|
|
1185
1183
|
oauthManager;
|
|
1186
1184
|
eventEmitter = new SimpleEventEmitter;
|
|
1187
1185
|
apiRouteBase;
|
|
@@ -1215,7 +1213,6 @@ class MCPClient {
|
|
|
1215
1213
|
};
|
|
1216
1214
|
this.onReauthRequired = config.onReauthRequired;
|
|
1217
1215
|
this.maxReauthRetries = config.maxReauthRetries ?? 1;
|
|
1218
|
-
this.connectionMode = config.connectionMode ?? "lazy";
|
|
1219
1216
|
this.oauthManager = new OAuthManager(oauthApiBase, config.oauthFlow);
|
|
1220
1217
|
const providers = this.plugins.filter((p) => p.oauth).map((p) => p.oauth.provider);
|
|
1221
1218
|
this.oauthManager.loadAllProviderTokens(providers);
|
|
@@ -1241,28 +1238,10 @@ class MCPClient {
|
|
|
1241
1238
|
const normalizedPath = oauthApiBase.replace(/\/$/, "");
|
|
1242
1239
|
return `${origin}${normalizedPath}/callback`;
|
|
1243
1240
|
}
|
|
1244
|
-
async ensureConnected() {
|
|
1245
|
-
if (this.initialized && this.transport.isConnected()) {
|
|
1246
|
-
return;
|
|
1247
|
-
}
|
|
1248
|
-
if (this.connecting) {
|
|
1249
|
-
return this.connecting;
|
|
1250
|
-
}
|
|
1251
|
-
if (this.connectionMode === "manual" && !this.initialized) {
|
|
1252
|
-
throw new Error("Client not connected. Call connect() first when using manual connection mode.");
|
|
1253
|
-
}
|
|
1254
|
-
this.connecting = this.connect();
|
|
1255
|
-
try {
|
|
1256
|
-
await this.connecting;
|
|
1257
|
-
} finally {
|
|
1258
|
-
this.connecting = null;
|
|
1259
|
-
}
|
|
1260
|
-
}
|
|
1261
1241
|
createPluginProxy(pluginId) {
|
|
1262
1242
|
return new Proxy({}, {
|
|
1263
1243
|
get: (_target, methodName) => {
|
|
1264
1244
|
return async (args) => {
|
|
1265
|
-
await this.ensureConnected();
|
|
1266
1245
|
const toolName = methodToToolName(methodName, pluginId);
|
|
1267
1246
|
return await this.callToolWithRetry(toolName, args, 0);
|
|
1268
1247
|
};
|
|
@@ -1273,7 +1252,6 @@ class MCPClient {
|
|
|
1273
1252
|
return new Proxy({}, {
|
|
1274
1253
|
get: (_target, methodName) => {
|
|
1275
1254
|
return async (args) => {
|
|
1276
|
-
await this.ensureConnected();
|
|
1277
1255
|
const toolName = methodToToolName(methodName, "");
|
|
1278
1256
|
const finalToolName = toolName.startsWith("_") ? toolName.substring(1) : toolName;
|
|
1279
1257
|
return await this.callServerToolInternal(finalToolName, args);
|
|
@@ -1282,12 +1260,6 @@ class MCPClient {
|
|
|
1282
1260
|
});
|
|
1283
1261
|
}
|
|
1284
1262
|
async callServerToolInternal(name, args) {
|
|
1285
|
-
if (!this.initialized) {
|
|
1286
|
-
throw new Error("Client not initialized. Call connect() first.");
|
|
1287
|
-
}
|
|
1288
|
-
if (!this.availableTools.has(name)) {
|
|
1289
|
-
throw new Error(`Tool "${name}" is not available on the server. Available tools: ${Array.from(this.availableTools.keys()).join(", ")}`);
|
|
1290
|
-
}
|
|
1291
1263
|
try {
|
|
1292
1264
|
const response = await this.callToolThroughHandler(name, args);
|
|
1293
1265
|
return response;
|
|
@@ -1342,12 +1314,6 @@ class MCPClient {
|
|
|
1342
1314
|
return await this.callToolWithRetry(name, args, 0);
|
|
1343
1315
|
}
|
|
1344
1316
|
async callServerTool(name, args) {
|
|
1345
|
-
if (!this.initialized) {
|
|
1346
|
-
throw new Error("Client not initialized. Call connect() first.");
|
|
1347
|
-
}
|
|
1348
|
-
if (!this.availableTools.has(name)) {
|
|
1349
|
-
throw new Error(`Tool "${name}" is not available on the server. Available tools: ${Array.from(this.availableTools.keys()).join(", ")}`);
|
|
1350
|
-
}
|
|
1351
1317
|
try {
|
|
1352
1318
|
const response = await this.callToolThroughHandler(name, args);
|
|
1353
1319
|
return response;
|
|
@@ -1401,15 +1367,9 @@ class MCPClient {
|
|
|
1401
1367
|
return result;
|
|
1402
1368
|
}
|
|
1403
1369
|
async callToolWithRetry(name, args, retryCount = 0) {
|
|
1404
|
-
if (!this.initialized) {
|
|
1405
|
-
throw new Error("Client not initialized. Call connect() first.");
|
|
1406
|
-
}
|
|
1407
1370
|
if (!this.enabledToolNames.has(name)) {
|
|
1408
1371
|
throw new Error(`Tool "${name}" is not enabled. Enable it by adding the appropriate plugin.`);
|
|
1409
1372
|
}
|
|
1410
|
-
if (!this.availableTools.has(name)) {
|
|
1411
|
-
throw new Error(`Tool "${name}" is not available on the server. Available tools: ${Array.from(this.availableTools.keys()).join(", ")}`);
|
|
1412
|
-
}
|
|
1413
1373
|
const provider = this.getProviderForTool(name);
|
|
1414
1374
|
try {
|
|
1415
1375
|
const response = await this.callToolThroughHandler(name, args, provider);
|
package/dist/src/client.d.ts
CHANGED
|
@@ -53,8 +53,6 @@ export declare class MCPClient<TPlugins extends readonly MCPPlugin[] = readonly
|
|
|
53
53
|
private onReauthRequired?;
|
|
54
54
|
private maxReauthRetries;
|
|
55
55
|
private authState;
|
|
56
|
-
private connectionMode;
|
|
57
|
-
private connecting;
|
|
58
56
|
private oauthManager;
|
|
59
57
|
private eventEmitter;
|
|
60
58
|
private apiRouteBase;
|
|
@@ -74,10 +72,6 @@ export declare class MCPClient<TPlugins extends readonly MCPPlugin[] = readonly
|
|
|
74
72
|
* @returns Default redirect URI
|
|
75
73
|
*/
|
|
76
74
|
private getDefaultRedirectUri;
|
|
77
|
-
/**
|
|
78
|
-
* Ensure the client is connected (for lazy connection mode)
|
|
79
|
-
*/
|
|
80
|
-
private ensureConnected;
|
|
81
75
|
/**
|
|
82
76
|
* Create a proxy for a plugin namespace that intercepts method calls
|
|
83
77
|
* and routes them to the appropriate tool
|
package/dist/src/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EACV,OAAO,EAEP,mBAAmB,EAGpB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EAC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