@google/gemini-cli-a2a-server 0.21.0-nightly.20251204.3da4fd5f7 → 0.21.0-nightly.20251206.3cf44acc0
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/a2a-server.mjs +211 -51
- package/dist/src/config/config.js +1 -0
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/settings.d.ts +3 -0
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/config/settings.test.d.ts +6 -0
- package/dist/src/config/settings.test.js +161 -0
- package/dist/src/config/settings.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/a2a-server.mjs
CHANGED
|
@@ -307379,7 +307379,7 @@ function toFriendlyError(error2) {
|
|
|
307379
307379
|
if (error2 && typeof error2 === "object" && "response" in error2) {
|
|
307380
307380
|
const gaxiosError = error2;
|
|
307381
307381
|
const data = parseResponseData(gaxiosError);
|
|
307382
|
-
if (data.error && data.error.message && data.error.code) {
|
|
307382
|
+
if (data && data.error && data.error.message && data.error.code) {
|
|
307383
307383
|
switch (data.error.code) {
|
|
307384
307384
|
case 400:
|
|
307385
307385
|
return new BadRequestError(data.error.message);
|
|
@@ -307395,7 +307395,11 @@ function toFriendlyError(error2) {
|
|
|
307395
307395
|
}
|
|
307396
307396
|
function parseResponseData(error2) {
|
|
307397
307397
|
if (typeof error2.response?.data === "string") {
|
|
307398
|
-
|
|
307398
|
+
try {
|
|
307399
|
+
return JSON.parse(error2.response?.data);
|
|
307400
|
+
} catch {
|
|
307401
|
+
return void 0;
|
|
307402
|
+
}
|
|
307399
307403
|
}
|
|
307400
307404
|
return error2.response?.data;
|
|
307401
307405
|
}
|
|
@@ -311854,8 +311858,8 @@ var Float64Vector = import_vector.default.Float64Vector;
|
|
|
311854
311858
|
var PointerVector = import_vector.default.PointerVector;
|
|
311855
311859
|
|
|
311856
311860
|
// packages/core/dist/src/generated/git-commit.js
|
|
311857
|
-
var GIT_COMMIT_INFO = "
|
|
311858
|
-
var CLI_VERSION = "0.21.0-nightly.
|
|
311861
|
+
var GIT_COMMIT_INFO = "3cf44acc0";
|
|
311862
|
+
var CLI_VERSION = "0.21.0-nightly.20251206.3cf44acc0";
|
|
311859
311863
|
|
|
311860
311864
|
// packages/core/dist/src/ide/detect-ide.js
|
|
311861
311865
|
var IDE_DEFINITIONS = {
|
|
@@ -315000,7 +315004,7 @@ async function createContentGenerator(config3, gcConfig, sessionId2) {
|
|
|
315000
315004
|
if (gcConfig.fakeResponses) {
|
|
315001
315005
|
return FakeContentGenerator.fromFile(gcConfig.fakeResponses);
|
|
315002
315006
|
}
|
|
315003
|
-
const version4 = "0.21.0-nightly.
|
|
315007
|
+
const version4 = "0.21.0-nightly.20251206.3cf44acc0";
|
|
315004
315008
|
const customHeadersEnv = process.env["GEMINI_CLI_CUSTOM_HEADERS"] || void 0;
|
|
315005
315009
|
const userAgent = `GeminiCLI/${version4} (${process.platform}; ${process.arch})`;
|
|
315006
315010
|
const customHeadersMap = parseCustomHeaders(customHeadersEnv);
|
|
@@ -352866,18 +352870,51 @@ function delay2(ms, signal) {
|
|
|
352866
352870
|
}
|
|
352867
352871
|
|
|
352868
352872
|
// packages/core/dist/src/utils/retry.js
|
|
352869
|
-
var FETCH_FAILED_MESSAGE = "exception TypeError: fetch failed sending request";
|
|
352870
352873
|
var DEFAULT_RETRY_OPTIONS = {
|
|
352871
352874
|
maxAttempts: 3,
|
|
352872
352875
|
initialDelayMs: 5e3,
|
|
352873
352876
|
maxDelayMs: 3e4,
|
|
352874
352877
|
// 30 seconds
|
|
352875
|
-
shouldRetryOnError:
|
|
352876
|
-
};
|
|
352877
|
-
|
|
352878
|
-
|
|
352878
|
+
shouldRetryOnError: isRetryableError
|
|
352879
|
+
};
|
|
352880
|
+
var RETRYABLE_NETWORK_CODES = [
|
|
352881
|
+
"ECONNRESET",
|
|
352882
|
+
"ETIMEDOUT",
|
|
352883
|
+
"EPIPE",
|
|
352884
|
+
"ENOTFOUND",
|
|
352885
|
+
"EAI_AGAIN",
|
|
352886
|
+
"ECONNREFUSED"
|
|
352887
|
+
];
|
|
352888
|
+
function getNetworkErrorCode(error2) {
|
|
352889
|
+
const getCode = (obj) => {
|
|
352890
|
+
if (typeof obj !== "object" || obj === null) {
|
|
352891
|
+
return void 0;
|
|
352892
|
+
}
|
|
352893
|
+
if ("code" in obj && typeof obj.code === "string") {
|
|
352894
|
+
return obj.code;
|
|
352895
|
+
}
|
|
352896
|
+
return void 0;
|
|
352897
|
+
};
|
|
352898
|
+
const directCode = getCode(error2);
|
|
352899
|
+
if (directCode) {
|
|
352900
|
+
return directCode;
|
|
352901
|
+
}
|
|
352902
|
+
if (typeof error2 === "object" && error2 !== null && "cause" in error2) {
|
|
352903
|
+
return getCode(error2.cause);
|
|
352904
|
+
}
|
|
352905
|
+
return void 0;
|
|
352906
|
+
}
|
|
352907
|
+
var FETCH_FAILED_MESSAGE = "fetch failed";
|
|
352908
|
+
function isRetryableError(error2, retryFetchErrors) {
|
|
352909
|
+
const errorCode = getNetworkErrorCode(error2);
|
|
352910
|
+
if (errorCode && RETRYABLE_NETWORK_CODES.includes(errorCode)) {
|
|
352879
352911
|
return true;
|
|
352880
352912
|
}
|
|
352913
|
+
if (retryFetchErrors && error2 instanceof Error) {
|
|
352914
|
+
if (error2.message.toLowerCase().includes(FETCH_FAILED_MESSAGE)) {
|
|
352915
|
+
return true;
|
|
352916
|
+
}
|
|
352917
|
+
}
|
|
352881
352918
|
if (error2 instanceof ApiError2) {
|
|
352882
352919
|
if (error2.status === 400)
|
|
352883
352920
|
return false;
|
|
@@ -352899,6 +352936,7 @@ async function retryWithBackoff(fn, options2) {
|
|
|
352899
352936
|
const cleanOptions = options2 ? Object.fromEntries(Object.entries(options2).filter(([_, v]) => v != null)) : {};
|
|
352900
352937
|
const { maxAttempts, initialDelayMs, maxDelayMs, onPersistent429, authType, shouldRetryOnError, shouldRetryOnContent, retryFetchErrors, signal } = {
|
|
352901
352938
|
...DEFAULT_RETRY_OPTIONS,
|
|
352939
|
+
shouldRetryOnError: isRetryableError,
|
|
352902
352940
|
...cleanOptions
|
|
352903
352941
|
};
|
|
352904
352942
|
let attempt = 0;
|
|
@@ -358960,6 +358998,7 @@ function convertColorToHex(color, colorMode, defaultColor) {
|
|
|
358960
358998
|
var { Terminal } = import_headless.default;
|
|
358961
358999
|
var SIGKILL_TIMEOUT_MS = 200;
|
|
358962
359000
|
var MAX_CHILD_PROCESS_BUFFER_SIZE = 16 * 1024 * 1024;
|
|
359001
|
+
var SCROLLBACK_LIMIT = 3e5;
|
|
358963
359002
|
var BASH_SHOPT_OPTIONS = "promptvars nullglob extglob nocaseglob dotglob";
|
|
358964
359003
|
var BASH_SHOPT_GUARD = `shopt -u ${BASH_SHOPT_OPTIONS};`;
|
|
358965
359004
|
function ensurePromptvarsDisabled(command, shell) {
|
|
@@ -358977,10 +359016,27 @@ var getFullBufferText = (terminal) => {
|
|
|
358977
359016
|
const lines = [];
|
|
358978
359017
|
for (let i4 = 0; i4 < buffer.length; i4++) {
|
|
358979
359018
|
const line = buffer.getLine(i4);
|
|
358980
|
-
|
|
358981
|
-
|
|
359019
|
+
if (!line) {
|
|
359020
|
+
continue;
|
|
359021
|
+
}
|
|
359022
|
+
let trimRight = true;
|
|
359023
|
+
if (i4 + 1 < buffer.length) {
|
|
359024
|
+
const nextLine = buffer.getLine(i4 + 1);
|
|
359025
|
+
if (nextLine?.isWrapped) {
|
|
359026
|
+
trimRight = false;
|
|
359027
|
+
}
|
|
359028
|
+
}
|
|
359029
|
+
const lineContent = line.translateToString(trimRight);
|
|
359030
|
+
if (line.isWrapped && lines.length > 0) {
|
|
359031
|
+
lines[lines.length - 1] += lineContent;
|
|
359032
|
+
} else {
|
|
359033
|
+
lines.push(lineContent);
|
|
359034
|
+
}
|
|
359035
|
+
}
|
|
359036
|
+
while (lines.length > 0 && lines[lines.length - 1] === "") {
|
|
359037
|
+
lines.pop();
|
|
358982
359038
|
}
|
|
358983
|
-
return lines.join("\n")
|
|
359039
|
+
return lines.join("\n");
|
|
358984
359040
|
};
|
|
358985
359041
|
var ShellExecutionService = class {
|
|
358986
359042
|
static activePtys = /* @__PURE__ */ new Map();
|
|
@@ -359217,7 +359273,8 @@ var ShellExecutionService = class {
|
|
|
359217
359273
|
const headlessTerminal = new Terminal({
|
|
359218
359274
|
allowProposedApi: true,
|
|
359219
359275
|
cols,
|
|
359220
|
-
rows
|
|
359276
|
+
rows,
|
|
359277
|
+
scrollback: shellExecutionConfig.scrollback ?? SCROLLBACK_LIMIT
|
|
359221
359278
|
});
|
|
359222
359279
|
headlessTerminal.scrollToTop();
|
|
359223
359280
|
this.activePtys.set(ptyProcess.pid, { ptyProcess, headlessTerminal });
|
|
@@ -359252,24 +359309,11 @@ var ShellExecutionService = class {
|
|
|
359252
359309
|
if (shellExecutionConfig.showColor) {
|
|
359253
359310
|
newOutput = serializeTerminalToObject(headlessTerminal);
|
|
359254
359311
|
} else {
|
|
359255
|
-
|
|
359256
|
-
|
|
359257
|
-
|
|
359258
|
-
|
|
359259
|
-
|
|
359260
|
-
{
|
|
359261
|
-
text: lineContent,
|
|
359262
|
-
bold: false,
|
|
359263
|
-
italic: false,
|
|
359264
|
-
underline: false,
|
|
359265
|
-
dim: false,
|
|
359266
|
-
inverse: false,
|
|
359267
|
-
fg: "",
|
|
359268
|
-
bg: ""
|
|
359269
|
-
}
|
|
359270
|
-
]);
|
|
359271
|
-
}
|
|
359272
|
-
newOutput = lines;
|
|
359312
|
+
newOutput = (serializeTerminalToObject(headlessTerminal) || []).map((line) => line.map((token2) => {
|
|
359313
|
+
token2.fg = "";
|
|
359314
|
+
token2.bg = "";
|
|
359315
|
+
return token2;
|
|
359316
|
+
}));
|
|
359273
359317
|
}
|
|
359274
359318
|
let lastNonEmptyLine = -1;
|
|
359275
359319
|
for (let i4 = newOutput.length - 1; i4 >= 0; i4--) {
|
|
@@ -360118,8 +360162,8 @@ var PRIVATE_IP_RANGES = [
|
|
|
360118
360162
|
];
|
|
360119
360163
|
var FetchError2 = class extends Error {
|
|
360120
360164
|
code;
|
|
360121
|
-
constructor(message, code2) {
|
|
360122
|
-
super(message);
|
|
360165
|
+
constructor(message, code2, options2) {
|
|
360166
|
+
super(message, options2);
|
|
360123
360167
|
this.code = code2;
|
|
360124
360168
|
this.name = "FetchError";
|
|
360125
360169
|
}
|
|
@@ -360142,7 +360186,7 @@ async function fetchWithTimeout(url5, timeout) {
|
|
|
360142
360186
|
if (isNodeError(error2) && error2.code === "ABORT_ERR") {
|
|
360143
360187
|
throw new FetchError2(`Request timed out after ${timeout}ms`, "ETIMEDOUT");
|
|
360144
360188
|
}
|
|
360145
|
-
throw new FetchError2(getErrorMessage(error2));
|
|
360189
|
+
throw new FetchError2(getErrorMessage(error2), void 0, { cause: error2 });
|
|
360146
360190
|
} finally {
|
|
360147
360191
|
clearTimeout(timeoutId);
|
|
360148
360192
|
}
|
|
@@ -365127,10 +365171,17 @@ var WebFetchToolInvocation = class extends BaseToolInvocation {
|
|
|
365127
365171
|
url5 = url5.replace("github.com", "raw.githubusercontent.com").replace("/blob/", "/");
|
|
365128
365172
|
}
|
|
365129
365173
|
try {
|
|
365130
|
-
const response = await
|
|
365131
|
-
|
|
365132
|
-
|
|
365133
|
-
|
|
365174
|
+
const response = await retryWithBackoff(async () => {
|
|
365175
|
+
const res = await fetchWithTimeout(url5, URL_FETCH_TIMEOUT_MS);
|
|
365176
|
+
if (!res.ok) {
|
|
365177
|
+
const error2 = new Error(`Request failed with status code ${res.status} ${res.statusText}`);
|
|
365178
|
+
error2.status = res.status;
|
|
365179
|
+
throw error2;
|
|
365180
|
+
}
|
|
365181
|
+
return res;
|
|
365182
|
+
}, {
|
|
365183
|
+
retryFetchErrors: this.config.getRetryFetchErrors()
|
|
365184
|
+
});
|
|
365134
365185
|
const rawContent = await response.text();
|
|
365135
365186
|
const contentType = response.headers.get("content-type") || "";
|
|
365136
365187
|
let textContent2;
|
|
@@ -367358,6 +367409,33 @@ var ChatRecordingService = class {
|
|
|
367358
367409
|
updateFn(conversation);
|
|
367359
367410
|
this.writeConversation(conversation);
|
|
367360
367411
|
}
|
|
367412
|
+
/**
|
|
367413
|
+
* Saves a summary for the current session.
|
|
367414
|
+
*/
|
|
367415
|
+
saveSummary(summary) {
|
|
367416
|
+
if (!this.conversationFile)
|
|
367417
|
+
return;
|
|
367418
|
+
try {
|
|
367419
|
+
this.updateConversation((conversation) => {
|
|
367420
|
+
conversation.summary = summary;
|
|
367421
|
+
});
|
|
367422
|
+
} catch (error2) {
|
|
367423
|
+
debugLogger.error("Error saving summary to chat history.", error2);
|
|
367424
|
+
}
|
|
367425
|
+
}
|
|
367426
|
+
/**
|
|
367427
|
+
* Gets the current conversation data (for summary generation).
|
|
367428
|
+
*/
|
|
367429
|
+
getConversation() {
|
|
367430
|
+
if (!this.conversationFile)
|
|
367431
|
+
return null;
|
|
367432
|
+
try {
|
|
367433
|
+
return this.readConversation();
|
|
367434
|
+
} catch (error2) {
|
|
367435
|
+
debugLogger.error("Error reading conversation for summary.", error2);
|
|
367436
|
+
return null;
|
|
367437
|
+
}
|
|
367438
|
+
}
|
|
367361
367439
|
/**
|
|
367362
367440
|
* Deletes a session file by session ID.
|
|
367363
367441
|
*/
|
|
@@ -367973,6 +368051,7 @@ var GeminiChat = class {
|
|
|
367973
368051
|
maxAttempts = 1;
|
|
367974
368052
|
}
|
|
367975
368053
|
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
368054
|
+
let isConnectionPhase = true;
|
|
367976
368055
|
try {
|
|
367977
368056
|
if (attempt > 0) {
|
|
367978
368057
|
yield { type: StreamEventType.RETRY };
|
|
@@ -367980,19 +368059,27 @@ var GeminiChat = class {
|
|
|
367980
368059
|
if (attempt > 0) {
|
|
367981
368060
|
generateContentConfig.temperature = 1;
|
|
367982
368061
|
}
|
|
368062
|
+
isConnectionPhase = true;
|
|
367983
368063
|
const stream3 = await this.makeApiCallAndProcessStream(model, generateContentConfig, requestContents, prompt_id);
|
|
368064
|
+
isConnectionPhase = false;
|
|
367984
368065
|
for await (const chunk2 of stream3) {
|
|
367985
368066
|
yield { type: StreamEventType.CHUNK, value: chunk2 };
|
|
367986
368067
|
}
|
|
367987
368068
|
lastError = null;
|
|
367988
368069
|
break;
|
|
367989
368070
|
} catch (error2) {
|
|
368071
|
+
if (isConnectionPhase) {
|
|
368072
|
+
throw error2;
|
|
368073
|
+
}
|
|
367990
368074
|
lastError = error2;
|
|
367991
368075
|
const isContentError = error2 instanceof InvalidStreamError;
|
|
367992
|
-
|
|
368076
|
+
const isRetryable = isRetryableError(error2, this.config.getRetryFetchErrors());
|
|
368077
|
+
if (isContentError && isGemini2Model(model) || isRetryable && !signal.aborted) {
|
|
367993
368078
|
if (attempt < maxAttempts - 1) {
|
|
367994
|
-
|
|
367995
|
-
|
|
368079
|
+
const delayMs = INVALID_CONTENT_RETRY_OPTIONS.initialDelayMs;
|
|
368080
|
+
const retryType = isContentError ? error2.type : "NETWORK_ERROR";
|
|
368081
|
+
logContentRetry(this.config, new ContentRetryEvent(attempt, retryType, delayMs, model));
|
|
368082
|
+
await new Promise((res) => setTimeout(res, delayMs * (attempt + 1)));
|
|
367996
368083
|
continue;
|
|
367997
368084
|
}
|
|
367998
368085
|
}
|
|
@@ -370232,7 +370319,7 @@ var GeminiClient = class {
|
|
|
370232
370319
|
const model = this._getEffectiveModelForCurrentTurn();
|
|
370233
370320
|
const { newHistory, info: info2 } = await this.compressionService.compress(this.getChat(), prompt_id, force, model, this.config, this.hasFailedCompressionAttempt);
|
|
370234
370321
|
if (info2.compressionStatus === CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT) {
|
|
370235
|
-
this.hasFailedCompressionAttempt = !force
|
|
370322
|
+
this.hasFailedCompressionAttempt = this.hasFailedCompressionAttempt || !force;
|
|
370236
370323
|
} else if (info2.compressionStatus === CompressionStatus.COMPRESSED) {
|
|
370237
370324
|
if (newHistory) {
|
|
370238
370325
|
this.chat = await this.startChat(newHistory);
|
|
@@ -381702,7 +381789,7 @@ async function getClientMetadata() {
|
|
|
381702
381789
|
clientMetadataPromise = (async () => ({
|
|
381703
381790
|
ideName: "IDE_UNSPECIFIED",
|
|
381704
381791
|
pluginType: "GEMINI",
|
|
381705
|
-
ideVersion: "0.21.0-nightly.
|
|
381792
|
+
ideVersion: "0.21.0-nightly.20251206.3cf44acc0",
|
|
381706
381793
|
platform: getPlatform(),
|
|
381707
381794
|
updateChannel: await getReleaseChannel(__dirname5)
|
|
381708
381795
|
}))();
|
|
@@ -383629,17 +383716,23 @@ var McpClient = class {
|
|
|
383629
383716
|
toolRegistry;
|
|
383630
383717
|
promptRegistry;
|
|
383631
383718
|
workspaceContext;
|
|
383719
|
+
cliConfig;
|
|
383632
383720
|
debugMode;
|
|
383721
|
+
onToolsUpdated;
|
|
383633
383722
|
client;
|
|
383634
383723
|
transport;
|
|
383635
383724
|
status = MCPServerStatus.DISCONNECTED;
|
|
383636
|
-
|
|
383725
|
+
isRefreshing = false;
|
|
383726
|
+
pendingRefresh = false;
|
|
383727
|
+
constructor(serverName, serverConfig, toolRegistry, promptRegistry, workspaceContext, cliConfig, debugMode, onToolsUpdated) {
|
|
383637
383728
|
this.serverName = serverName;
|
|
383638
383729
|
this.serverConfig = serverConfig;
|
|
383639
383730
|
this.toolRegistry = toolRegistry;
|
|
383640
383731
|
this.promptRegistry = promptRegistry;
|
|
383641
383732
|
this.workspaceContext = workspaceContext;
|
|
383733
|
+
this.cliConfig = cliConfig;
|
|
383642
383734
|
this.debugMode = debugMode;
|
|
383735
|
+
this.onToolsUpdated = onToolsUpdated;
|
|
383643
383736
|
}
|
|
383644
383737
|
/**
|
|
383645
383738
|
* Connects to the MCP server.
|
|
@@ -383651,6 +383744,14 @@ var McpClient = class {
|
|
|
383651
383744
|
this.updateStatus(MCPServerStatus.CONNECTING);
|
|
383652
383745
|
try {
|
|
383653
383746
|
this.client = await connectToMcpServer(this.serverName, this.serverConfig, this.debugMode, this.workspaceContext);
|
|
383747
|
+
const capabilities = this.client.getServerCapabilities();
|
|
383748
|
+
if (capabilities?.tools?.listChanged) {
|
|
383749
|
+
debugLogger.log(`Server '${this.serverName}' supports tool updates. Listening for changes...`);
|
|
383750
|
+
this.client.setNotificationHandler(ToolListChangedNotificationSchema, async () => {
|
|
383751
|
+
debugLogger.log(`\u{1F514} Received tool update notification from '${this.serverName}'`);
|
|
383752
|
+
await this.refreshTools();
|
|
383753
|
+
});
|
|
383754
|
+
}
|
|
383654
383755
|
const originalOnError = this.client.onerror;
|
|
383655
383756
|
this.client.onerror = (error2) => {
|
|
383656
383757
|
if (this.status !== MCPServerStatus.CONNECTED) {
|
|
@@ -383717,9 +383818,11 @@ var McpClient = class {
|
|
|
383717
383818
|
throw new Error(`Client is not connected, must connect before interacting with the server. Current state is ${this.status}`);
|
|
383718
383819
|
}
|
|
383719
383820
|
}
|
|
383720
|
-
async discoverTools(cliConfig) {
|
|
383821
|
+
async discoverTools(cliConfig, options2) {
|
|
383721
383822
|
this.assertConnected();
|
|
383722
|
-
return discoverTools(this.serverName, this.serverConfig, this.client, cliConfig, this.toolRegistry.getMessageBus()
|
|
383823
|
+
return discoverTools(this.serverName, this.serverConfig, this.client, cliConfig, this.toolRegistry.getMessageBus(), options2 ?? {
|
|
383824
|
+
timeout: this.serverConfig.timeout ?? MCP_DEFAULT_TIMEOUT_MSEC
|
|
383825
|
+
});
|
|
383723
383826
|
}
|
|
383724
383827
|
async discoverPrompts() {
|
|
383725
383828
|
this.assertConnected();
|
|
@@ -383731,6 +383834,56 @@ var McpClient = class {
|
|
|
383731
383834
|
getInstructions() {
|
|
383732
383835
|
return this.client?.getInstructions();
|
|
383733
383836
|
}
|
|
383837
|
+
/**
|
|
383838
|
+
* Refreshes the tools for this server by re-querying the MCP `tools/list` endpoint.
|
|
383839
|
+
*
|
|
383840
|
+
* This method implements a **Coalescing Pattern** to handle rapid bursts of notifications
|
|
383841
|
+
* (e.g., during server startup or bulk updates) without overwhelming the server or
|
|
383842
|
+
* creating race conditions in the global ToolRegistry.
|
|
383843
|
+
*/
|
|
383844
|
+
async refreshTools() {
|
|
383845
|
+
if (this.isRefreshing) {
|
|
383846
|
+
debugLogger.log(`Tool refresh for '${this.serverName}' is already in progress. Pending update.`);
|
|
383847
|
+
this.pendingRefresh = true;
|
|
383848
|
+
return;
|
|
383849
|
+
}
|
|
383850
|
+
this.isRefreshing = true;
|
|
383851
|
+
try {
|
|
383852
|
+
do {
|
|
383853
|
+
this.pendingRefresh = false;
|
|
383854
|
+
if (this.status !== MCPServerStatus.CONNECTED || !this.client)
|
|
383855
|
+
break;
|
|
383856
|
+
const timeoutMs = this.serverConfig.timeout ?? MCP_DEFAULT_TIMEOUT_MSEC;
|
|
383857
|
+
const abortController = new AbortController();
|
|
383858
|
+
const timeoutId = setTimeout(() => abortController.abort(), timeoutMs);
|
|
383859
|
+
let newTools;
|
|
383860
|
+
try {
|
|
383861
|
+
newTools = await this.discoverTools(this.cliConfig, {
|
|
383862
|
+
signal: abortController.signal
|
|
383863
|
+
});
|
|
383864
|
+
} catch (err2) {
|
|
383865
|
+
debugLogger.error(`Discovery failed during refresh: ${getErrorMessage(err2)}`);
|
|
383866
|
+
clearTimeout(timeoutId);
|
|
383867
|
+
break;
|
|
383868
|
+
}
|
|
383869
|
+
this.toolRegistry.removeMcpToolsByServer(this.serverName);
|
|
383870
|
+
for (const tool of newTools) {
|
|
383871
|
+
this.toolRegistry.registerTool(tool);
|
|
383872
|
+
}
|
|
383873
|
+
this.toolRegistry.sortTools();
|
|
383874
|
+
if (this.onToolsUpdated) {
|
|
383875
|
+
await this.onToolsUpdated(abortController.signal);
|
|
383876
|
+
}
|
|
383877
|
+
clearTimeout(timeoutId);
|
|
383878
|
+
coreEvents.emitFeedback("info", `Tools updated for server: ${this.serverName}`);
|
|
383879
|
+
} while (this.pendingRefresh);
|
|
383880
|
+
} catch (error2) {
|
|
383881
|
+
debugLogger.error(`Critical error in refresh loop for ${this.serverName}: ${getErrorMessage(error2)}`);
|
|
383882
|
+
} finally {
|
|
383883
|
+
this.isRefreshing = false;
|
|
383884
|
+
this.pendingRefresh = false;
|
|
383885
|
+
}
|
|
383886
|
+
}
|
|
383734
383887
|
};
|
|
383735
383888
|
var serverStatuses = /* @__PURE__ */ new Map();
|
|
383736
383889
|
var mcpDiscoveryState = MCPDiscoveryState.NOT_STARTED;
|
|
@@ -383853,11 +384006,11 @@ function populateMcpServerCommand(mcpServers, mcpServerCommand) {
|
|
|
383853
384006
|
}
|
|
383854
384007
|
return mcpServers;
|
|
383855
384008
|
}
|
|
383856
|
-
async function discoverTools(mcpServerName, mcpServerConfig, mcpClient, cliConfig, messageBus) {
|
|
384009
|
+
async function discoverTools(mcpServerName, mcpServerConfig, mcpClient, cliConfig, messageBus, options2) {
|
|
383857
384010
|
try {
|
|
383858
384011
|
if (mcpClient.getServerCapabilities()?.tools == null)
|
|
383859
384012
|
return [];
|
|
383860
|
-
const response = await mcpClient.listTools({});
|
|
384013
|
+
const response = await mcpClient.listTools({}, options2);
|
|
383861
384014
|
const discoveredTools = [];
|
|
383862
384015
|
for (const toolDef of response.tools) {
|
|
383863
384016
|
try {
|
|
@@ -384410,7 +384563,13 @@ var McpClientManager = class {
|
|
|
384410
384563
|
if (existing) {
|
|
384411
384564
|
await existing.disconnect();
|
|
384412
384565
|
}
|
|
384413
|
-
const client = existing ?? new McpClient(name4, config3, this.toolRegistry, this.cliConfig.getPromptRegistry(), this.cliConfig.getWorkspaceContext(), this.cliConfig.getDebugMode())
|
|
384566
|
+
const client = existing ?? new McpClient(name4, config3, this.toolRegistry, this.cliConfig.getPromptRegistry(), this.cliConfig.getWorkspaceContext(), this.cliConfig, this.cliConfig.getDebugMode(), async () => {
|
|
384567
|
+
debugLogger.log("Tools changed, updating Gemini context...");
|
|
384568
|
+
const geminiClient = this.cliConfig.getGeminiClient();
|
|
384569
|
+
if (geminiClient.isInitialized()) {
|
|
384570
|
+
await geminiClient.setTools();
|
|
384571
|
+
}
|
|
384572
|
+
});
|
|
384414
384573
|
if (!existing) {
|
|
384415
384574
|
this.clients.set(name4, client);
|
|
384416
384575
|
this.eventEmitter?.emit("mcp-client-update", this.clients);
|
|
@@ -385711,7 +385870,8 @@ async function loadConfig(settings, extensionLoader, taskId) {
|
|
|
385711
385870
|
},
|
|
385712
385871
|
ideMode: false,
|
|
385713
385872
|
folderTrust: settings.folderTrust === true,
|
|
385714
|
-
extensionLoader
|
|
385873
|
+
extensionLoader,
|
|
385874
|
+
previewFeatures: settings.general?.previewFeatures
|
|
385715
385875
|
};
|
|
385716
385876
|
const fileService = new FileDiscoveryService(workspaceDir);
|
|
385717
385877
|
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(
|
|
@@ -44,6 +44,7 @@ export async function loadConfig(settings, extensionLoader, taskId) {
|
|
|
44
44
|
ideMode: false,
|
|
45
45
|
folderTrust: settings.folderTrust === true,
|
|
46
46
|
extensionLoader,
|
|
47
|
+
previewFeatures: settings.general?.previewFeatures,
|
|
47
48
|
};
|
|
48
49
|
const fileService = new FileDiscoveryService(workspaceDir);
|
|
49
50
|
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(workspaceDir, [workspaceDir], false, fileService, extensionLoader, settings.folderTrust === true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAGjC,OAAO,EACL,QAAQ,EACR,MAAM,EAEN,oBAAoB,EACpB,YAAY,EACZ,4BAA4B,EAC5B,UAAU,EACV,8BAA8B,EAC9B,oBAAoB,EAEpB,eAAe,GAChB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,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AC9C,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3B,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,SAAS,KAAK,UAAU,IAAI,CAAC,SAAS,EAAE,CAAC;YAC3C,2EAA2E;YAC3E,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;YACvE,IAAI,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC;gBACrC,OAAO,iBAAiB,CAAC;YAC3B,CAAC;YACD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,CAAC;YACjD,IAAI,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC/B,OAAO,WAAW,CAAC;YACrB,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,UAAU,GAAG,SAAS,CAAC;IACzB,CAAC;AACH,CAAC"}
|
|
@@ -15,6 +15,9 @@ export interface Settings {
|
|
|
15
15
|
showMemoryUsage?: boolean;
|
|
16
16
|
checkpointing?: CheckpointingSettings;
|
|
17
17
|
folderTrust?: boolean;
|
|
18
|
+
general?: {
|
|
19
|
+
previewFeatures?: boolean;
|
|
20
|
+
};
|
|
18
21
|
fileFiltering?: {
|
|
19
22
|
respectGitIgnore?: boolean;
|
|
20
23
|
enableRecursiveFileSearch?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/config/settings.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAA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