@google/gemini-cli 0.41.0-preview.1 → 0.42.0-nightly.20260501.gcaa046641
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/bundle/{chunk-36LZQV4W.js → chunk-2HOG45IA.js} +1047 -1240
- package/bundle/{chunk-NGB7ZVQL.js → chunk-2WK6K7H4.js} +67 -507
- package/bundle/{chunk-DOHALVIP.js → chunk-3Y7ZPPS2.js} +1047 -1240
- package/bundle/chunk-4SBF4FWA.js +512 -0
- package/bundle/{chunk-XRLFHCHC.js → chunk-533APETE.js} +30 -12
- package/bundle/{chunk-T5I4M6M4.js → chunk-747IFMEA.js} +3 -3
- package/bundle/chunk-CTSXRP2T.js +512 -0
- package/bundle/{chunk-DCHOW6BK.js → chunk-CVJABGPV.js} +2 -2
- package/bundle/{chunk-VWYB6GSK.js → chunk-DDX3KSOF.js} +67 -507
- package/bundle/{chunk-DAEE6Y5T.js → chunk-EGV36KAI.js} +1047 -1240
- package/bundle/chunk-ESRGVL52.js +512 -0
- package/bundle/{chunk-SAJ72M2G.js → chunk-FABHOVMY.js} +23 -7
- package/bundle/chunk-FNLKMX3W.js +391 -0
- package/bundle/chunk-FTIY7CSS.js +391 -0
- package/bundle/{chunk-C5CRFFTY.js → chunk-GXIITUGM.js} +1 -1
- package/bundle/{chunk-45OGXTFK.js → chunk-HIYYW6PF.js} +3 -3
- package/bundle/chunk-IDYSRNE5.js +511 -0
- package/bundle/{chunk-QRSHDIRX.js → chunk-IJA7QQHF.js} +1 -1
- package/bundle/{chunk-U6WUS35U.js → chunk-ILECTCCH.js} +2 -2
- package/bundle/{chunk-R4LSW45D.js → chunk-J44J2AAV.js} +1 -1
- package/bundle/{chunk-KCDF3RDO.js → chunk-JPGLBVDA.js} +3 -3
- package/bundle/{chunk-VJ6K3S57.js → chunk-K5CA5JX2.js} +2 -2
- package/bundle/{chunk-6NFVEILC.js → chunk-L6URBAMF.js} +262 -81
- package/bundle/{chunk-5Z2T77EB.js → chunk-NNAHWZGK.js} +66 -507
- package/bundle/{chunk-KJ4M7JXR.js → chunk-SFDJ7FIE.js} +2 -2
- package/bundle/{chunk-QY23ZEK3.js → chunk-SYZNFSS3.js} +262 -81
- package/bundle/chunk-TBIPLAJP.js +391 -0
- package/bundle/{chunk-FFVUMIL3.js → chunk-TMQACI5N.js} +1047 -1240
- package/bundle/{chunk-XO6NKGWV.js → chunk-UCTXAZT6.js} +262 -81
- package/bundle/{chunk-VLSVN2FJ.js → chunk-USFRINC4.js} +1 -1
- package/bundle/chunk-VJOUKBFO.js +391 -0
- package/bundle/{chunk-EQSLZT5Z.js → chunk-VUMF52YD.js} +271 -81
- package/bundle/{chunk-5QI3ZXQB.js → chunk-WGWUS5AF.js} +67 -507
- package/bundle/{chunk-TBBDQEFQ.js → chunk-WTLXL6OZ.js} +3 -3
- package/bundle/{cleanup-3COTQVPP.js → cleanup-GQXJGC2H.js} +3 -3
- package/bundle/{cleanup-FIE6MCAE.js → cleanup-OSSEOJVY.js} +3 -3
- package/bundle/{cleanup-PREOBLFK.js → cleanup-TDBASRR5.js} +3 -3
- package/bundle/{cleanup-YY2EUT56.js → cleanup-XLWNSNLT.js} +3 -3
- package/bundle/{core-GZOFEER4.js → core-JH4LXS4F.js} +8 -2
- package/bundle/{devtoolsService-QXOHXSMJ.js → devtoolsService-DFWZ34A5.js} +3 -3
- package/bundle/{devtoolsService-DV36S632.js → devtoolsService-KZLK5WRW.js} +3 -3
- package/bundle/{devtoolsService-JPBL5I7F.js → devtoolsService-XIWMIEMB.js} +3 -3
- package/bundle/{devtoolsService-M4LZEBZD.js → devtoolsService-ZV5MJUBY.js} +3 -3
- package/bundle/{dist-HASTHPE3.js → dist-ATBEVH4R.js} +8 -2
- package/bundle/{dist-JVRDP7SO.js → dist-BOCIGIGG.js} +8 -2
- package/bundle/{dist-NSJ6AA4L.js → dist-TDGPCKNF.js} +8 -2
- package/bundle/docs/changelogs/index.md +18 -0
- package/bundle/docs/changelogs/latest.md +167 -242
- package/bundle/docs/changelogs/preview.md +99 -385
- package/bundle/docs/cli/cli-reference.md +1 -0
- package/bundle/docs/cli/creating-skills.md +165 -38
- package/bundle/docs/cli/custom-commands.md +1 -0
- package/bundle/docs/cli/model-routing.md +3 -3
- package/bundle/docs/cli/plan-mode.md +2 -1
- package/bundle/docs/cli/skills-best-practices.md +78 -0
- package/bundle/docs/cli/skills.md +98 -93
- package/bundle/docs/cli/tutorials/session-management.md +13 -0
- package/bundle/docs/cli/tutorials/skills-getting-started.md +140 -92
- package/bundle/docs/cli/using-agent-skills.md +89 -0
- package/bundle/docs/core/gemma-setup.md +83 -0
- package/bundle/docs/core/index.md +3 -2
- package/bundle/docs/core/local-model-routing.md +14 -7
- package/bundle/docs/reference/commands.md +14 -4
- package/bundle/docs/reference/configuration.md +76 -4
- package/bundle/docs/reference/keyboard-shortcuts.md +1 -1
- package/bundle/docs/reference/policy-engine.md +14 -3
- package/bundle/docs/sidebar.json +24 -2
- package/bundle/docs/tools/activate-skill.md +1 -1
- package/bundle/{gemini-IGRTXHCM.js → gemini-ETBA6M7V.js} +1067 -850
- package/bundle/{gemini-KIM7O55W.js → gemini-FUGMMZB7.js} +1067 -850
- package/bundle/{gemini-SFFHSCEY.js → gemini-QDNEMFTK.js} +1067 -850
- package/bundle/{gemini-FTUVOUHP.js → gemini-TZ26TZKD.js} +1067 -848
- package/bundle/gemini.js +20 -13
- package/bundle/{interactiveCli-LTPR447O.js → interactiveCli-74QXEIGP.js} +682 -609
- package/bundle/{interactiveCli-K4FIT7TA.js → interactiveCli-IBVICRF7.js} +682 -609
- package/bundle/{interactiveCli-7HPLINVC.js → interactiveCli-OKS4NPC7.js} +682 -609
- package/bundle/{interactiveCli-JOX7MFFH.js → interactiveCli-ZS4ZQWNV.js} +682 -609
- package/bundle/{liteRtServerManager-BENLLSF2.js → liteRtServerManager-I5CSGWRL.js} +5 -4
- package/bundle/{liteRtServerManager-KDO6UAQ5.js → liteRtServerManager-IDNLXYHP.js} +5 -4
- package/bundle/{liteRtServerManager-MQIQXXZQ.js → liteRtServerManager-J33F7APP.js} +5 -4
- package/bundle/{liteRtServerManager-VGYEHFUE.js → liteRtServerManager-RJF74BUI.js} +5 -4
- package/bundle/{memoryDiscovery-FN3IAPBT.js → memoryDiscovery-LIJKMASE.js} +1 -1
- package/bundle/{memoryDiscovery-R7PAR2NY.js → memoryDiscovery-WVH7QDNJ.js} +1 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-JPCBTTS2.js → oauth2-provider-7UM3XCQ4.js} +2 -2
- package/bundle/{oauth2-provider-EWMNT6D6.js → oauth2-provider-BFW5HE2U.js} +2 -2
- package/bundle/{oauth2-provider-M3WV4GJM.js → oauth2-provider-LONBXYVY.js} +2 -2
- package/bundle/{oauth2-provider-UVXCM7G3.js → oauth2-provider-N65VILW5.js} +2 -2
- package/bundle/{start-4MSISK2E.js → start-3B4FNGNM.js} +7 -6
- package/bundle/{start-ATOE57Z4.js → start-3OM5OXD2.js} +7 -6
- package/bundle/{start-AVEON6UU.js → start-N3S3BSEF.js} +7 -6
- package/bundle/{start-KBB2UTE5.js → start-PLPHF43U.js} +7 -6
- package/package.json +1 -1
|
@@ -223,7 +223,7 @@ import {
|
|
|
223
223
|
toPathKey,
|
|
224
224
|
unescapePath,
|
|
225
225
|
zodToJsonSchema
|
|
226
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-FABHOVMY.js";
|
|
227
227
|
import {
|
|
228
228
|
wrapper_default
|
|
229
229
|
} from "./chunk-664ZODQF.js";
|
|
@@ -246273,8 +246273,8 @@ var EventMetadataKey;
|
|
|
246273
246273
|
})(EventMetadataKey || (EventMetadataKey = {}));
|
|
246274
246274
|
|
|
246275
246275
|
// packages/core/dist/src/generated/git-commit.js
|
|
246276
|
-
var GIT_COMMIT_INFO = "
|
|
246277
|
-
var CLI_VERSION = "0.
|
|
246276
|
+
var GIT_COMMIT_INFO = "caa046641";
|
|
246277
|
+
var CLI_VERSION = "0.42.0-nightly.20260428.g59b2dea0e";
|
|
246278
246278
|
|
|
246279
246279
|
// packages/core/dist/src/ide/detect-ide.js
|
|
246280
246280
|
var IDE_DEFINITIONS = {
|
|
@@ -248930,6 +248930,7 @@ var ChatRecordingService = class {
|
|
|
248930
248930
|
*/
|
|
248931
248931
|
async deleteSessionAndArtifacts(chatsDir, file2, tempDir) {
|
|
248932
248932
|
const filePath = path20.join(chatsDir, file2);
|
|
248933
|
+
let fullSessionId;
|
|
248933
248934
|
try {
|
|
248934
248935
|
const CHUNK_SIZE = 4096;
|
|
248935
248936
|
const buffer = Buffer.alloc(CHUNK_SIZE);
|
|
@@ -248938,31 +248939,66 @@ var ChatRecordingService = class {
|
|
|
248938
248939
|
try {
|
|
248939
248940
|
fd = await fs24.promises.open(filePath, "r");
|
|
248940
248941
|
const { bytesRead } = await fd.read(buffer, 0, CHUNK_SIZE, 0);
|
|
248941
|
-
if (bytesRead
|
|
248942
|
-
|
|
248943
|
-
|
|
248944
|
-
|
|
248942
|
+
if (bytesRead > 0) {
|
|
248943
|
+
const contentChunk = buffer.toString("utf8", 0, bytesRead);
|
|
248944
|
+
const newlineIndex = contentChunk.indexOf("\n");
|
|
248945
|
+
firstLine = newlineIndex !== -1 ? contentChunk.substring(0, newlineIndex) : contentChunk;
|
|
248946
|
+
try {
|
|
248947
|
+
const content = JSON.parse(firstLine);
|
|
248948
|
+
if (isSessionIdRecord(content)) {
|
|
248949
|
+
fullSessionId = content.sessionId;
|
|
248950
|
+
}
|
|
248951
|
+
} catch {
|
|
248952
|
+
}
|
|
248945
248953
|
}
|
|
248946
|
-
const contentChunk = buffer.toString("utf8", 0, bytesRead);
|
|
248947
|
-
const newlineIndex = contentChunk.indexOf("\n");
|
|
248948
|
-
firstLine = newlineIndex !== -1 ? contentChunk.substring(0, newlineIndex) : contentChunk;
|
|
248949
248954
|
} finally {
|
|
248950
248955
|
if (fd !== void 0) {
|
|
248951
248956
|
await fd.close();
|
|
248952
248957
|
}
|
|
248953
248958
|
}
|
|
248954
|
-
|
|
248955
|
-
|
|
248956
|
-
|
|
248957
|
-
|
|
248959
|
+
if (!fullSessionId) {
|
|
248960
|
+
try {
|
|
248961
|
+
const fileContent = await fs24.promises.readFile(filePath, "utf8");
|
|
248962
|
+
const parsed = JSON.parse(fileContent);
|
|
248963
|
+
if (isSessionIdRecord(parsed)) {
|
|
248964
|
+
fullSessionId = parsed.sessionId;
|
|
248965
|
+
}
|
|
248966
|
+
} catch {
|
|
248967
|
+
}
|
|
248958
248968
|
}
|
|
248959
|
-
await fs24.promises.unlink(filePath);
|
|
248960
248969
|
if (fullSessionId) {
|
|
248961
248970
|
await deleteSessionArtifactsAsync(fullSessionId, tempDir);
|
|
248962
248971
|
await deleteSubagentSessionDirAndArtifactsAsync(fullSessionId, chatsDir, tempDir);
|
|
248963
248972
|
}
|
|
248964
248973
|
} catch (error40) {
|
|
248965
|
-
debugLogger.error(`Error deleting
|
|
248974
|
+
debugLogger.error(`Error deleting artifacts for session file ${file2}:`, error40);
|
|
248975
|
+
} finally {
|
|
248976
|
+
try {
|
|
248977
|
+
await fs24.promises.unlink(filePath);
|
|
248978
|
+
} catch (error40) {
|
|
248979
|
+
if (isNodeError(error40) && error40.code !== "ENOENT") {
|
|
248980
|
+
debugLogger.error(`Error unlinking session file ${file2}:`, error40);
|
|
248981
|
+
}
|
|
248982
|
+
}
|
|
248983
|
+
}
|
|
248984
|
+
}
|
|
248985
|
+
/**
|
|
248986
|
+
* Asynchronously deletes the current session's chat file and tool outputs.
|
|
248987
|
+
* This encapsulates the session ID logic and uses non-blocking I/O to avoid
|
|
248988
|
+
* blocking the event loop on exit.
|
|
248989
|
+
*/
|
|
248990
|
+
async deleteCurrentSessionAsync() {
|
|
248991
|
+
if (!this.conversationFile) {
|
|
248992
|
+
return;
|
|
248993
|
+
}
|
|
248994
|
+
try {
|
|
248995
|
+
const tempDir = this.context.config.storage.getProjectTempDir();
|
|
248996
|
+
await fs24.promises.unlink(this.conversationFile).catch(() => {
|
|
248997
|
+
});
|
|
248998
|
+
await deleteSessionArtifactsAsync(this.sessionId, tempDir);
|
|
248999
|
+
} catch (error40) {
|
|
249000
|
+
debugLogger.error("Error deleting current session.", error40);
|
|
249001
|
+
throw error40;
|
|
248966
249002
|
}
|
|
248967
249003
|
}
|
|
248968
249004
|
/**
|
|
@@ -251731,6 +251767,9 @@ function appendToLastTextPart(prompt, textToAppend, separator = "\n\n") {
|
|
|
251731
251767
|
}
|
|
251732
251768
|
return newPrompt;
|
|
251733
251769
|
}
|
|
251770
|
+
function isTextPart2(part) {
|
|
251771
|
+
return typeof part === "object" && part !== null && "text" in part && typeof part.text === "string";
|
|
251772
|
+
}
|
|
251734
251773
|
|
|
251735
251774
|
// packages/core/dist/src/utils/generateContentResponseUtilities.js
|
|
251736
251775
|
function createFunctionResponsePart(callId, toolName, output) {
|
|
@@ -269216,7 +269255,7 @@ function getVersion() {
|
|
|
269216
269255
|
}
|
|
269217
269256
|
versionPromise = (async () => {
|
|
269218
269257
|
const pkgJson = await getPackageJson(__dirname4);
|
|
269219
|
-
return "0.
|
|
269258
|
+
return "0.42.0-nightly.20260501.gcaa046641";
|
|
269220
269259
|
})();
|
|
269221
269260
|
return versionPromise;
|
|
269222
269261
|
}
|
|
@@ -270017,14 +270056,18 @@ var SILENT_ACTIONS = {
|
|
|
270017
270056
|
};
|
|
270018
270057
|
var DEFAULT_STATE = {
|
|
270019
270058
|
terminal: "terminal",
|
|
270020
|
-
transient: "
|
|
270059
|
+
transient: "terminal",
|
|
270021
270060
|
not_found: "terminal",
|
|
270022
270061
|
unknown: "terminal"
|
|
270023
270062
|
};
|
|
270024
|
-
var
|
|
270025
|
-
|
|
270026
|
-
|
|
270027
|
-
|
|
270063
|
+
var AUTO_ROUTING_OVERRIDES = {
|
|
270064
|
+
maxAttempts: 3,
|
|
270065
|
+
actions: { ...DEFAULT_ACTIONS, transient: "silent" },
|
|
270066
|
+
stateTransitions: {
|
|
270067
|
+
...DEFAULT_STATE,
|
|
270068
|
+
transient: "sticky_retry"
|
|
270069
|
+
}
|
|
270070
|
+
};
|
|
270028
270071
|
var FLASH_LITE_CHAIN = [
|
|
270029
270072
|
definePolicy({
|
|
270030
270073
|
model: DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
@@ -270041,14 +270084,36 @@ var FLASH_LITE_CHAIN = [
|
|
|
270041
270084
|
})
|
|
270042
270085
|
];
|
|
270043
270086
|
function getModelPolicyChain(options) {
|
|
270087
|
+
const isAuto = options.isAutoSelection ?? false;
|
|
270044
270088
|
if (options.previewEnabled) {
|
|
270045
|
-
const
|
|
270089
|
+
const proModel = resolveModel(PREVIEW_GEMINI_MODEL, options.useGemini31, options.useGemini31FlashLite, options.useCustomToolModel);
|
|
270046
270090
|
return [
|
|
270047
|
-
definePolicy({
|
|
270048
|
-
|
|
270091
|
+
definePolicy({
|
|
270092
|
+
model: proModel,
|
|
270093
|
+
...isAuto ? {
|
|
270094
|
+
maxAttempts: 3,
|
|
270095
|
+
actions: { ...DEFAULT_ACTIONS, transient: "silent" },
|
|
270096
|
+
stateTransitions: { ...DEFAULT_STATE, transient: "sticky_retry" }
|
|
270097
|
+
} : {}
|
|
270098
|
+
}),
|
|
270099
|
+
definePolicy({
|
|
270100
|
+
model: PREVIEW_GEMINI_FLASH_MODEL,
|
|
270101
|
+
isLastResort: true,
|
|
270102
|
+
maxAttempts: 10
|
|
270103
|
+
})
|
|
270049
270104
|
];
|
|
270050
270105
|
}
|
|
270051
|
-
return
|
|
270106
|
+
return [
|
|
270107
|
+
definePolicy({
|
|
270108
|
+
model: DEFAULT_GEMINI_MODEL,
|
|
270109
|
+
...isAuto ? AUTO_ROUTING_OVERRIDES : {}
|
|
270110
|
+
}),
|
|
270111
|
+
definePolicy({
|
|
270112
|
+
model: DEFAULT_GEMINI_FLASH_MODEL,
|
|
270113
|
+
isLastResort: true,
|
|
270114
|
+
maxAttempts: 10
|
|
270115
|
+
})
|
|
270116
|
+
];
|
|
270052
270117
|
}
|
|
270053
270118
|
function createSingleModelChain(model) {
|
|
270054
270119
|
return [definePolicy({ model, isLastResort: true })];
|
|
@@ -270063,6 +270128,7 @@ function definePolicy(config2) {
|
|
|
270063
270128
|
return {
|
|
270064
270129
|
model: config2.model,
|
|
270065
270130
|
isLastResort: config2.isLastResort,
|
|
270131
|
+
maxAttempts: config2.maxAttempts,
|
|
270066
270132
|
actions: { ...DEFAULT_ACTIONS, ...config2.actions ?? {} },
|
|
270067
270133
|
stateTransitions: {
|
|
270068
270134
|
...DEFAULT_STATE,
|
|
@@ -270101,14 +270167,16 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
|
|
|
270101
270167
|
};
|
|
270102
270168
|
if (resolvedModel === DEFAULT_GEMINI_FLASH_LITE_MODEL) {
|
|
270103
270169
|
chain2 = config2.modelConfigService.resolveChain("lite", context2);
|
|
270104
|
-
} else if (isGemini3Model(resolvedModel, config2) ||
|
|
270105
|
-
if (
|
|
270170
|
+
} else if (isGemini3Model(resolvedModel, config2) || isAutoPreferred || isAutoConfigured) {
|
|
270171
|
+
if (isAutoConfigured && config2.modelConfigService.getModelChain(configuredModel)) {
|
|
270106
270172
|
chain2 = config2.modelConfigService.resolveChain(configuredModel, context2);
|
|
270107
270173
|
}
|
|
270108
270174
|
if (!chain2) {
|
|
270175
|
+
const isAutoSelection = isAutoPreferred || isAutoConfigured;
|
|
270109
270176
|
const previewEnabled = hasAccessToPreview && (isGemini3Model(resolvedModel, config2) || preferredModel === PREVIEW_GEMINI_MODEL_AUTO || configuredModel === PREVIEW_GEMINI_MODEL_AUTO);
|
|
270177
|
+
const autoPrefix = isAutoSelection ? "auto-" : "";
|
|
270110
270178
|
const chainKey = previewEnabled ? "preview" : "default";
|
|
270111
|
-
chain2 = config2.modelConfigService.resolveChain(chainKey
|
|
270179
|
+
chain2 = config2.modelConfigService.resolveChain(`${autoPrefix}${chainKey}`, context2);
|
|
270112
270180
|
}
|
|
270113
270181
|
}
|
|
270114
270182
|
if (!chain2) {
|
|
@@ -270119,10 +270187,12 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
|
|
|
270119
270187
|
if (resolvedModel === DEFAULT_GEMINI_FLASH_LITE_MODEL) {
|
|
270120
270188
|
chain2 = getFlashLitePolicyChain();
|
|
270121
270189
|
} else if (isGemini3Model(resolvedModel, config2) || isAutoPreferred || isAutoConfigured) {
|
|
270190
|
+
const isAutoSelection = isAutoPreferred || isAutoConfigured;
|
|
270122
270191
|
if (hasAccessToPreview) {
|
|
270123
270192
|
const previewEnabled = isGemini3Model(resolvedModel, config2) || preferredModel === PREVIEW_GEMINI_MODEL_AUTO || configuredModel === PREVIEW_GEMINI_MODEL_AUTO;
|
|
270124
270193
|
chain2 = getModelPolicyChain({
|
|
270125
270194
|
previewEnabled,
|
|
270195
|
+
isAutoSelection,
|
|
270126
270196
|
userTier: config2.getUserTier(),
|
|
270127
270197
|
useGemini31,
|
|
270128
270198
|
useGemini31FlashLite,
|
|
@@ -270131,6 +270201,7 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
|
|
|
270131
270201
|
} else {
|
|
270132
270202
|
chain2 = getModelPolicyChain({
|
|
270133
270203
|
previewEnabled: false,
|
|
270204
|
+
isAutoSelection,
|
|
270134
270205
|
userTier: config2.getUserTier(),
|
|
270135
270206
|
useGemini31,
|
|
270136
270207
|
useGemini31FlashLite,
|
|
@@ -270210,10 +270281,12 @@ function applyModelSelection(config2, modelConfigKey, options = {}) {
|
|
|
270210
270281
|
if (selection.attempts && options.consumeAttempt !== false) {
|
|
270211
270282
|
config2.getModelAvailabilityService().consumeStickyAttempt(finalModel);
|
|
270212
270283
|
}
|
|
270284
|
+
const chain2 = resolvePolicyChain(config2, finalModel);
|
|
270285
|
+
const policy = chain2.find((p) => p.model === finalModel);
|
|
270213
270286
|
return {
|
|
270214
270287
|
model: finalModel,
|
|
270215
270288
|
config: generateContentConfig,
|
|
270216
|
-
maxAttempts: selection.attempts
|
|
270289
|
+
maxAttempts: selection.attempts ?? policy?.maxAttempts
|
|
270217
270290
|
};
|
|
270218
270291
|
}
|
|
270219
270292
|
function applyAvailabilityTransition(getContext, failureKind) {
|
|
@@ -270226,7 +270299,8 @@ function applyAvailabilityTransition(getContext, failureKind) {
|
|
|
270226
270299
|
if (transition === "terminal") {
|
|
270227
270300
|
context2.service.markTerminal(context2.policy.model, failureKind === "terminal" ? "quota" : "capacity");
|
|
270228
270301
|
} else if (transition === "sticky_retry") {
|
|
270229
|
-
context2.service.markRetryOncePerTurn(context2.policy.model);
|
|
270302
|
+
context2.service.markRetryOncePerTurn(context2.policy.model, context2.policy.maxAttempts);
|
|
270303
|
+
context2.service.consumeStickyAttempt(context2.policy.model);
|
|
270230
270304
|
}
|
|
270231
270305
|
}
|
|
270232
270306
|
|
|
@@ -270421,8 +270495,11 @@ var RETRYABLE_NETWORK_CODES = [
|
|
|
270421
270495
|
"EAI_AGAIN",
|
|
270422
270496
|
"ECONNREFUSED",
|
|
270423
270497
|
"ERR_SSL_WRONG_VERSION_NUMBER",
|
|
270424
|
-
"EPROTO"
|
|
270498
|
+
"EPROTO",
|
|
270425
270499
|
// Generic protocol error (often SSL-related)
|
|
270500
|
+
"UND_ERR_HEADERS_TIMEOUT",
|
|
270501
|
+
"UND_ERR_BODY_TIMEOUT",
|
|
270502
|
+
"UND_ERR_CONNECT_TIMEOUT"
|
|
270426
270503
|
];
|
|
270427
270504
|
var RETRYABLE_SSL_ERROR_PATTERN = /^ERR_SSL_.*BAD_RECORD_MAC/i;
|
|
270428
270505
|
function isRetryableSslErrorCode(code) {
|
|
@@ -270523,6 +270600,7 @@ async function retryWithBackoff(fn, options) {
|
|
|
270523
270600
|
shouldRetryOnError: isRetryableError,
|
|
270524
270601
|
...cleanOptions
|
|
270525
270602
|
};
|
|
270603
|
+
const getCurrentMaxAttempts = () => getAvailabilityContext?.()?.policy.maxAttempts ?? maxAttempts;
|
|
270526
270604
|
let attempt = 0;
|
|
270527
270605
|
let currentDelay = initialDelayMs;
|
|
270528
270606
|
const throwIfAborted = () => {
|
|
@@ -270530,7 +270608,7 @@ async function retryWithBackoff(fn, options) {
|
|
|
270530
270608
|
throw createAbortError();
|
|
270531
270609
|
}
|
|
270532
270610
|
};
|
|
270533
|
-
while (attempt <
|
|
270611
|
+
while (attempt < getCurrentMaxAttempts()) {
|
|
270534
270612
|
if (signal?.aborted) {
|
|
270535
270613
|
throw createAbortError();
|
|
270536
270614
|
}
|
|
@@ -270594,7 +270672,7 @@ async function retryWithBackoff(fn, options) {
|
|
|
270594
270672
|
}
|
|
270595
270673
|
const is500 = errorCode !== void 0 && errorCode >= 500 && errorCode < 600;
|
|
270596
270674
|
if (classifiedError instanceof RetryableQuotaError || is500) {
|
|
270597
|
-
if (attempt >=
|
|
270675
|
+
if (attempt >= getCurrentMaxAttempts()) {
|
|
270598
270676
|
const errorMessage = classifiedError instanceof Error ? classifiedError.message : "";
|
|
270599
270677
|
debugLogger.warn(`Attempt ${attempt} failed${errorMessage ? `: ${errorMessage}` : ""}. Max attempts reached`);
|
|
270600
270678
|
if (onPersistent429) {
|
|
@@ -270635,7 +270713,7 @@ async function retryWithBackoff(fn, options) {
|
|
|
270635
270713
|
continue;
|
|
270636
270714
|
}
|
|
270637
270715
|
}
|
|
270638
|
-
if (attempt >=
|
|
270716
|
+
if (attempt >= getCurrentMaxAttempts() || // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
270639
270717
|
!shouldRetryOnError(error40, retryFetchErrors)) {
|
|
270640
270718
|
throw error40;
|
|
270641
270719
|
}
|
|
@@ -270801,7 +270879,7 @@ var BaseLlmClient = class {
|
|
|
270801
270879
|
authType: this.authType ?? this.config.getContentGeneratorConfig()?.authType,
|
|
270802
270880
|
retryFetchErrors: this.config.getRetryFetchErrors(),
|
|
270803
270881
|
onRetry: (attempt, error40, delayMs) => {
|
|
270804
|
-
const actualMaxAttempts =
|
|
270882
|
+
const actualMaxAttempts = getAvailabilityContext()?.policy.maxAttempts ?? maxAttempts ?? DEFAULT_MAX_ATTEMPTS2;
|
|
270805
270883
|
const modelName = getDisplayString(currentModel);
|
|
270806
270884
|
const errorType = getRetryErrorType(error40);
|
|
270807
270885
|
coreEvents.emitRetryAttempt({
|
|
@@ -272486,24 +272564,31 @@ var ReleaseChannel;
|
|
|
272486
272564
|
ReleaseChannel2["PREVIEW"] = "preview";
|
|
272487
272565
|
ReleaseChannel2["STABLE"] = "stable";
|
|
272488
272566
|
})(ReleaseChannel || (ReleaseChannel = {}));
|
|
272567
|
+
var RELEASE_CHANNEL_STABILITY = {
|
|
272568
|
+
[ReleaseChannel.NIGHTLY]: 0,
|
|
272569
|
+
[ReleaseChannel.PREVIEW]: 1,
|
|
272570
|
+
[ReleaseChannel.STABLE]: 2
|
|
272571
|
+
};
|
|
272489
272572
|
var cache = /* @__PURE__ */ new Map();
|
|
272490
272573
|
function _clearCache() {
|
|
272491
272574
|
cache.clear();
|
|
272492
272575
|
}
|
|
272576
|
+
function getChannelFromVersion(version4) {
|
|
272577
|
+
if (!version4 || version4.includes("nightly")) {
|
|
272578
|
+
return ReleaseChannel.NIGHTLY;
|
|
272579
|
+
}
|
|
272580
|
+
if (version4.includes("preview")) {
|
|
272581
|
+
return ReleaseChannel.PREVIEW;
|
|
272582
|
+
}
|
|
272583
|
+
return ReleaseChannel.STABLE;
|
|
272584
|
+
}
|
|
272493
272585
|
async function getReleaseChannel(cwd) {
|
|
272494
272586
|
if (cache.has(cwd)) {
|
|
272495
272587
|
return cache.get(cwd);
|
|
272496
272588
|
}
|
|
272497
272589
|
const packageJson = await getPackageJson(cwd);
|
|
272498
272590
|
const version4 = packageJson?.version ?? "";
|
|
272499
|
-
|
|
272500
|
-
if (version4.includes("nightly") || version4 === "") {
|
|
272501
|
-
channel = ReleaseChannel.NIGHTLY;
|
|
272502
|
-
} else if (version4.includes("preview")) {
|
|
272503
|
-
channel = ReleaseChannel.PREVIEW;
|
|
272504
|
-
} else {
|
|
272505
|
-
channel = ReleaseChannel.STABLE;
|
|
272506
|
-
}
|
|
272591
|
+
const channel = getChannelFromVersion(version4);
|
|
272507
272592
|
cache.set(cwd, channel);
|
|
272508
272593
|
return channel;
|
|
272509
272594
|
}
|
|
@@ -273774,19 +273859,14 @@ function getAuthTypeFromEnv() {
|
|
|
273774
273859
|
}
|
|
273775
273860
|
return void 0;
|
|
273776
273861
|
}
|
|
273777
|
-
var LOCAL_HOSTNAMES = ["localhost", "127.0.0.1", "[::1]"];
|
|
273778
273862
|
var VERTEX_AI_REQUEST_TYPE_HEADER = "X-Vertex-AI-LLM-Request-Type";
|
|
273779
273863
|
var VERTEX_AI_SHARED_REQUEST_TYPE_HEADER = "X-Vertex-AI-LLM-Shared-Request-Type";
|
|
273780
273864
|
function validateBaseUrl(baseUrl) {
|
|
273781
|
-
let url3;
|
|
273782
273865
|
try {
|
|
273783
|
-
|
|
273866
|
+
new URL(baseUrl);
|
|
273784
273867
|
} catch {
|
|
273785
273868
|
throw new Error(`Invalid custom base URL: ${baseUrl}`);
|
|
273786
273869
|
}
|
|
273787
|
-
if (url3.protocol !== "https:" && !LOCAL_HOSTNAMES.includes(url3.hostname)) {
|
|
273788
|
-
throw new Error("Custom base URL must use HTTPS unless it is localhost.");
|
|
273789
|
-
}
|
|
273790
273870
|
}
|
|
273791
273871
|
async function createContentGeneratorConfig(config2, authType, apiKey, baseUrl, customHeaders, vertexAiRouting) {
|
|
273792
273872
|
const geminiApiKey = apiKey || process.env["GEMINI_API_KEY"] || await loadApiKey() || void 0;
|
|
@@ -282801,7 +282881,7 @@ var GrepToolInvocation = class extends BaseToolInvocation {
|
|
|
282801
282881
|
const grepAvailable = await this.isCommandAvailable("grep");
|
|
282802
282882
|
if (grepAvailable) {
|
|
282803
282883
|
strategyUsed = "system grep";
|
|
282804
|
-
const grepArgs = ["-r", "-n", "-H", "-E", "-I"];
|
|
282884
|
+
const grepArgs = ["-r", "-n", "-H", "-E", "-I", "-i"];
|
|
282805
282885
|
const globExcludes = this.fileExclusions.getGlobExcludes();
|
|
282806
282886
|
const commonExcludes = globExcludes.map((pattern2) => {
|
|
282807
282887
|
let dir = pattern2;
|
|
@@ -286749,23 +286829,24 @@ var PrivateIpError = class extends Error {
|
|
|
286749
286829
|
this.name = "PrivateIpError";
|
|
286750
286830
|
}
|
|
286751
286831
|
};
|
|
286752
|
-
var
|
|
286832
|
+
var defaultHeadersTimeout = 6e4;
|
|
286833
|
+
var defaultBodyTimeout = 3e5;
|
|
286753
286834
|
var currentProxy = void 0;
|
|
286754
286835
|
(0, import_undici2.setGlobalDispatcher)(new import_undici2.Agent({
|
|
286755
|
-
headersTimeout:
|
|
286756
|
-
bodyTimeout:
|
|
286836
|
+
headersTimeout: defaultHeadersTimeout,
|
|
286837
|
+
bodyTimeout: defaultBodyTimeout
|
|
286757
286838
|
}));
|
|
286758
286839
|
function updateGlobalFetchTimeouts(timeoutMs) {
|
|
286759
286840
|
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
|
|
286760
286841
|
throw new RangeError(`Invalid timeout value: ${timeoutMs}. Must be a positive finite number.`);
|
|
286761
286842
|
}
|
|
286762
|
-
|
|
286843
|
+
defaultHeadersTimeout = timeoutMs;
|
|
286763
286844
|
if (currentProxy) {
|
|
286764
286845
|
setGlobalProxy(currentProxy);
|
|
286765
286846
|
} else {
|
|
286766
286847
|
(0, import_undici2.setGlobalDispatcher)(new import_undici2.Agent({
|
|
286767
|
-
headersTimeout:
|
|
286768
|
-
bodyTimeout:
|
|
286848
|
+
headersTimeout: defaultHeadersTimeout,
|
|
286849
|
+
bodyTimeout: defaultBodyTimeout
|
|
286769
286850
|
}));
|
|
286770
286851
|
}
|
|
286771
286852
|
}
|
|
@@ -286864,8 +286945,8 @@ function setGlobalProxy(proxy2) {
|
|
|
286864
286945
|
currentProxy = proxy2;
|
|
286865
286946
|
(0, import_undici2.setGlobalDispatcher)(new import_undici2.ProxyAgent({
|
|
286866
286947
|
uri: proxy2,
|
|
286867
|
-
headersTimeout:
|
|
286868
|
-
bodyTimeout:
|
|
286948
|
+
headersTimeout: defaultHeadersTimeout,
|
|
286949
|
+
bodyTimeout: defaultBodyTimeout
|
|
286869
286950
|
}));
|
|
286870
286951
|
}
|
|
286871
286952
|
|
|
@@ -294148,7 +294229,7 @@ ${options.planModeToolsList}
|
|
|
294148
294229
|
- **Inquiries:** If the request is an **Inquiry** (e.g., "How does X work?"), answer directly. DO NOT create a plan.
|
|
294149
294230
|
- **Directives:** If the request is a **Directive** (e.g., "Fix bug Y"), follow the workflow below.
|
|
294150
294231
|
5. **Plan Storage:** Save plans as Markdown (.md) using descriptive filenames.
|
|
294151
|
-
6. **Direct Modification:** If asked to modify code, explain you are in Plan Mode and use ${formatToolName(EXIT_PLAN_MODE_TOOL_NAME)} to request approval.
|
|
294232
|
+
6. **Direct Modification:** If asked to modify code, explain you are in Plan Mode and use the built-in ${formatToolName(EXIT_PLAN_MODE_TOOL_NAME)} tool to request approval. **CRITICAL: NEVER attempt to call this tool via ${formatToolName(SHELL_TOOL_NAME)}.**
|
|
294152
294233
|
7. **Presenting Plan:** When seeking informal agreement on a plan, or any time the user asks to see the plan, you MUST output the full content of the plan in the chat response. This overrides the "Minimal Output" guideline.
|
|
294153
294234
|
|
|
294154
294235
|
## Planning Workflow
|
|
@@ -294172,7 +294253,7 @@ Write the implementation plan to \`${options.plansDir}/\`. The plan's structure
|
|
|
294172
294253
|
- **Complex Tasks:** Include **Background & Motivation**, **Scope & Impact**, **Proposed Solution**, **Alternatives Considered**, a phased **Implementation Plan**, **Verification**, and **Migration & Rollback** strategies.${options.interactive ? "\n- **Alignment Check:** After drafting the plan, you MUST present it to the user in the chat (adhering to Rule 7 for presenting plans) to ensure alignment on the specific details. Ask for feedback or confirmation, and proceed to Step 4 (Review & Approval) once the user agrees with the detailed plan." : ""}
|
|
294173
294254
|
|
|
294174
294255
|
### 4. Review & Approval
|
|
294175
|
-
ONLY use the ${formatToolName(EXIT_PLAN_MODE_TOOL_NAME)} tool to present the plan for formal approval AFTER you have reached an informal agreement with the user in the chat regarding the proposed strategy. When called, this tool will present the plan and ${options.interactive ? "formally request approval." : "begin implementation."}
|
|
294256
|
+
ONLY use the built-in ${formatToolName(EXIT_PLAN_MODE_TOOL_NAME)} tool to present the plan for formal approval AFTER you have reached an informal agreement with the user in the chat regarding the proposed strategy. **CRITICAL: NEVER attempt to call this tool via ${formatToolName(SHELL_TOOL_NAME)}.** When called, this tool will present the plan and ${options.interactive ? "formally request approval." : "begin implementation."}
|
|
294176
294257
|
|
|
294177
294258
|
${renderApprovedPlanSection(options.approvedPlanPath)}`.trim();
|
|
294178
294259
|
}
|
|
@@ -294790,7 +294871,7 @@ ${options.planModeToolsList}
|
|
|
294790
294871
|
- Save the implementation plan to the designated plans directory
|
|
294791
294872
|
|
|
294792
294873
|
### Phase 4: Review & Approval
|
|
294793
|
-
- Present the plan and request approval for the finalized plan using the \`${EXIT_PLAN_MODE_TOOL_NAME}\` tool
|
|
294874
|
+
- Present the plan and request approval for the finalized plan using the built-in \`${EXIT_PLAN_MODE_TOOL_NAME}\` tool. **CRITICAL: NEVER attempt to call this tool via \`${SHELL_TOOL_NAME}\`.**
|
|
294794
294875
|
- If plan is approved, you can begin implementation
|
|
294795
294876
|
- If plan is rejected, address the feedback and iterate on the plan
|
|
294796
294877
|
|
|
@@ -299011,7 +299092,12 @@ var mcpServerSchema = external_exports.object({
|
|
|
299011
299092
|
client_secret: external_exports.string().optional(),
|
|
299012
299093
|
scopes: external_exports.array(external_exports.string()).optional(),
|
|
299013
299094
|
authorization_url: external_exports.string().url().optional(),
|
|
299014
|
-
token_url: external_exports.string().url().optional()
|
|
299095
|
+
token_url: external_exports.string().url().optional(),
|
|
299096
|
+
issuer: external_exports.string().url().optional(),
|
|
299097
|
+
audiences: external_exports.array(external_exports.string()).optional(),
|
|
299098
|
+
redirect_uri: external_exports.string().url().optional(),
|
|
299099
|
+
token_param_name: external_exports.string().optional(),
|
|
299100
|
+
registration_url: external_exports.string().url().optional()
|
|
299015
299101
|
})
|
|
299016
299102
|
]).optional()
|
|
299017
299103
|
});
|
|
@@ -299057,7 +299143,12 @@ var oauth2AuthSchema = external_exports.object({
|
|
|
299057
299143
|
client_secret: external_exports.string().optional(),
|
|
299058
299144
|
scopes: external_exports.array(external_exports.string()).optional(),
|
|
299059
299145
|
authorization_url: external_exports.string().url().optional(),
|
|
299060
|
-
token_url: external_exports.string().url().optional()
|
|
299146
|
+
token_url: external_exports.string().url().optional(),
|
|
299147
|
+
issuer: external_exports.string().url().optional(),
|
|
299148
|
+
audiences: external_exports.array(external_exports.string()).optional(),
|
|
299149
|
+
redirect_uri: external_exports.string().url().optional(),
|
|
299150
|
+
token_param_name: external_exports.string().optional(),
|
|
299151
|
+
registration_url: external_exports.string().url().optional()
|
|
299061
299152
|
});
|
|
299062
299153
|
var authConfigSchema = external_exports.discriminatedUnion("type", [
|
|
299063
299154
|
apiKeyAuthSchema,
|
|
@@ -299273,7 +299364,12 @@ function convertFrontmatterAuthToConfig(frontmatter) {
|
|
|
299273
299364
|
client_secret: frontmatter.client_secret,
|
|
299274
299365
|
scopes: frontmatter.scopes,
|
|
299275
299366
|
authorization_url: frontmatter.authorization_url,
|
|
299276
|
-
token_url: frontmatter.token_url
|
|
299367
|
+
token_url: frontmatter.token_url,
|
|
299368
|
+
issuer: frontmatter.issuer,
|
|
299369
|
+
audiences: frontmatter.audiences,
|
|
299370
|
+
redirect_uri: frontmatter.redirect_uri,
|
|
299371
|
+
token_param_name: frontmatter.token_param_name,
|
|
299372
|
+
registration_url: frontmatter.registration_url
|
|
299277
299373
|
};
|
|
299278
299374
|
default: {
|
|
299279
299375
|
const exhaustive = frontmatter;
|
|
@@ -299339,7 +299435,12 @@ function markdownToAgentDefinition(markdown, metadata2) {
|
|
|
299339
299435
|
clientSecret: config2.auth.client_secret,
|
|
299340
299436
|
scopes: config2.auth.scopes,
|
|
299341
299437
|
authorizationUrl: config2.auth.authorization_url,
|
|
299342
|
-
tokenUrl: config2.auth.token_url
|
|
299438
|
+
tokenUrl: config2.auth.token_url,
|
|
299439
|
+
issuer: config2.auth.issuer,
|
|
299440
|
+
audiences: config2.auth.audiences,
|
|
299441
|
+
redirectUri: config2.auth.redirect_uri,
|
|
299442
|
+
tokenParamName: config2.auth.token_param_name,
|
|
299443
|
+
registrationUrl: config2.auth.registration_url
|
|
299343
299444
|
};
|
|
299344
299445
|
}
|
|
299345
299446
|
}
|
|
@@ -300406,7 +300507,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
|
|
|
300406
300507
|
return provider;
|
|
300407
300508
|
}
|
|
300408
300509
|
case "oauth2": {
|
|
300409
|
-
const { OAuth2AuthProvider } = await import("./oauth2-provider-
|
|
300510
|
+
const { OAuth2AuthProvider } = await import("./oauth2-provider-N65VILW5.js");
|
|
300410
300511
|
const provider = new OAuth2AuthProvider(authConfig, options.agentName ?? "unknown", agentCard, options.agentCardUrl);
|
|
300411
300512
|
await provider.initialize();
|
|
300412
300513
|
return provider;
|
|
@@ -309432,7 +309533,7 @@ var A2AResultReassembler = class {
|
|
|
309432
309533
|
if (message.role === "user")
|
|
309433
309534
|
return;
|
|
309434
309535
|
const text = extractPartsText(message.parts, "");
|
|
309435
|
-
if (text && this.messageLog
|
|
309536
|
+
if (text && this.messageLog.at(-1) !== text) {
|
|
309436
309537
|
this.messageLog.push(text);
|
|
309437
309538
|
}
|
|
309438
309539
|
}
|
|
@@ -309498,7 +309599,7 @@ function extractPartsText(parts2, separator) {
|
|
|
309498
309599
|
return parts2.map((p) => extractPartText(p)).filter(Boolean).join(separator);
|
|
309499
309600
|
}
|
|
309500
309601
|
function extractPartText(part) {
|
|
309501
|
-
if (
|
|
309602
|
+
if (isTextPart3(part)) {
|
|
309502
309603
|
return part.text;
|
|
309503
309604
|
}
|
|
309504
309605
|
if (isDataPart(part)) {
|
|
@@ -309567,7 +309668,7 @@ function extractIdsFromResponse(result2) {
|
|
|
309567
309668
|
}
|
|
309568
309669
|
return { contextId, taskId, clearTaskId };
|
|
309569
309670
|
}
|
|
309570
|
-
function
|
|
309671
|
+
function isTextPart3(part) {
|
|
309571
309672
|
return part.kind === "text";
|
|
309572
309673
|
}
|
|
309573
309674
|
function isDataPart(part) {
|
|
@@ -317605,7 +317706,7 @@ var ModelAvailabilityService = class {
|
|
|
317605
317706
|
markHealthy(model) {
|
|
317606
317707
|
this.clearState(model);
|
|
317607
317708
|
}
|
|
317608
|
-
markRetryOncePerTurn(model) {
|
|
317709
|
+
markRetryOncePerTurn(model, attempts = 1) {
|
|
317609
317710
|
const currentState = this.health.get(model);
|
|
317610
317711
|
if (currentState?.status === "terminal") {
|
|
317611
317712
|
return;
|
|
@@ -317617,7 +317718,8 @@ var ModelAvailabilityService = class {
|
|
|
317617
317718
|
this.setState(model, {
|
|
317618
317719
|
status: "sticky_retry",
|
|
317619
317720
|
reason: "retry_once_per_turn",
|
|
317620
|
-
consumed
|
|
317721
|
+
consumed,
|
|
317722
|
+
attempts
|
|
317621
317723
|
});
|
|
317622
317724
|
}
|
|
317623
317725
|
consumeStickyAttempt(model) {
|
|
@@ -317645,7 +317747,7 @@ var ModelAvailabilityService = class {
|
|
|
317645
317747
|
const snapshot = this.snapshot(model);
|
|
317646
317748
|
if (snapshot.available) {
|
|
317647
317749
|
const state = this.health.get(model);
|
|
317648
|
-
const attempts = state?.status === "sticky_retry" ?
|
|
317750
|
+
const attempts = state?.status === "sticky_retry" ? state.attempts : void 0;
|
|
317649
317751
|
return { selectedModel: model, skipped, attempts };
|
|
317650
317752
|
} else {
|
|
317651
317753
|
skipped.push({ model, reason: snapshot.reason ?? "unknown" });
|
|
@@ -318885,7 +318987,7 @@ var DEFAULT_MODEL_CONFIGS = {
|
|
|
318885
318987
|
},
|
|
318886
318988
|
stateTransitions: {
|
|
318887
318989
|
terminal: "terminal",
|
|
318888
|
-
transient: "
|
|
318990
|
+
transient: "terminal",
|
|
318889
318991
|
not_found: "terminal",
|
|
318890
318992
|
unknown: "terminal"
|
|
318891
318993
|
}
|
|
@@ -318893,18 +318995,54 @@ var DEFAULT_MODEL_CONFIGS = {
|
|
|
318893
318995
|
{
|
|
318894
318996
|
model: "gemini-3-flash-preview",
|
|
318895
318997
|
isLastResort: true,
|
|
318998
|
+
maxAttempts: 10,
|
|
318896
318999
|
actions: {
|
|
318897
319000
|
terminal: "prompt",
|
|
318898
319001
|
transient: "prompt",
|
|
318899
319002
|
not_found: "prompt",
|
|
318900
319003
|
unknown: "prompt"
|
|
318901
319004
|
},
|
|
319005
|
+
stateTransitions: {
|
|
319006
|
+
terminal: "terminal",
|
|
319007
|
+
transient: "terminal",
|
|
319008
|
+
not_found: "terminal",
|
|
319009
|
+
unknown: "terminal"
|
|
319010
|
+
}
|
|
319011
|
+
}
|
|
319012
|
+
],
|
|
319013
|
+
"auto-preview": [
|
|
319014
|
+
{
|
|
319015
|
+
model: "gemini-3-pro-preview",
|
|
319016
|
+
maxAttempts: 3,
|
|
319017
|
+
actions: {
|
|
319018
|
+
terminal: "prompt",
|
|
319019
|
+
transient: "silent",
|
|
319020
|
+
not_found: "prompt",
|
|
319021
|
+
unknown: "prompt"
|
|
319022
|
+
},
|
|
318902
319023
|
stateTransitions: {
|
|
318903
319024
|
terminal: "terminal",
|
|
318904
319025
|
transient: "sticky_retry",
|
|
318905
319026
|
not_found: "terminal",
|
|
318906
319027
|
unknown: "terminal"
|
|
318907
319028
|
}
|
|
319029
|
+
},
|
|
319030
|
+
{
|
|
319031
|
+
model: "gemini-3-flash-preview",
|
|
319032
|
+
isLastResort: true,
|
|
319033
|
+
maxAttempts: 10,
|
|
319034
|
+
actions: {
|
|
319035
|
+
terminal: "prompt",
|
|
319036
|
+
transient: "prompt",
|
|
319037
|
+
not_found: "prompt",
|
|
319038
|
+
unknown: "prompt"
|
|
319039
|
+
},
|
|
319040
|
+
stateTransitions: {
|
|
319041
|
+
terminal: "terminal",
|
|
319042
|
+
transient: "terminal",
|
|
319043
|
+
not_found: "terminal",
|
|
319044
|
+
unknown: "terminal"
|
|
319045
|
+
}
|
|
318908
319046
|
}
|
|
318909
319047
|
],
|
|
318910
319048
|
default: [
|
|
@@ -318926,18 +319064,54 @@ var DEFAULT_MODEL_CONFIGS = {
|
|
|
318926
319064
|
{
|
|
318927
319065
|
model: "gemini-2.5-flash",
|
|
318928
319066
|
isLastResort: true,
|
|
319067
|
+
maxAttempts: 10,
|
|
318929
319068
|
actions: {
|
|
318930
319069
|
terminal: "prompt",
|
|
318931
319070
|
transient: "prompt",
|
|
318932
319071
|
not_found: "prompt",
|
|
318933
319072
|
unknown: "prompt"
|
|
318934
319073
|
},
|
|
319074
|
+
stateTransitions: {
|
|
319075
|
+
terminal: "terminal",
|
|
319076
|
+
transient: "terminal",
|
|
319077
|
+
not_found: "terminal",
|
|
319078
|
+
unknown: "terminal"
|
|
319079
|
+
}
|
|
319080
|
+
}
|
|
319081
|
+
],
|
|
319082
|
+
"auto-default": [
|
|
319083
|
+
{
|
|
319084
|
+
model: "gemini-2.5-pro",
|
|
319085
|
+
maxAttempts: 3,
|
|
319086
|
+
actions: {
|
|
319087
|
+
terminal: "prompt",
|
|
319088
|
+
transient: "silent",
|
|
319089
|
+
not_found: "prompt",
|
|
319090
|
+
unknown: "prompt"
|
|
319091
|
+
},
|
|
318935
319092
|
stateTransitions: {
|
|
318936
319093
|
terminal: "terminal",
|
|
318937
319094
|
transient: "sticky_retry",
|
|
318938
319095
|
not_found: "terminal",
|
|
318939
319096
|
unknown: "terminal"
|
|
318940
319097
|
}
|
|
319098
|
+
},
|
|
319099
|
+
{
|
|
319100
|
+
model: "gemini-2.5-flash",
|
|
319101
|
+
isLastResort: true,
|
|
319102
|
+
maxAttempts: 10,
|
|
319103
|
+
actions: {
|
|
319104
|
+
terminal: "prompt",
|
|
319105
|
+
transient: "prompt",
|
|
319106
|
+
not_found: "prompt",
|
|
319107
|
+
unknown: "prompt"
|
|
319108
|
+
},
|
|
319109
|
+
stateTransitions: {
|
|
319110
|
+
terminal: "terminal",
|
|
319111
|
+
transient: "terminal",
|
|
319112
|
+
not_found: "terminal",
|
|
319113
|
+
unknown: "terminal"
|
|
319114
|
+
}
|
|
318941
319115
|
}
|
|
318942
319116
|
],
|
|
318943
319117
|
lite: [
|
|
@@ -318951,7 +319125,7 @@ var DEFAULT_MODEL_CONFIGS = {
|
|
|
318951
319125
|
},
|
|
318952
319126
|
stateTransitions: {
|
|
318953
319127
|
terminal: "terminal",
|
|
318954
|
-
transient: "
|
|
319128
|
+
transient: "terminal",
|
|
318955
319129
|
not_found: "terminal",
|
|
318956
319130
|
unknown: "terminal"
|
|
318957
319131
|
}
|
|
@@ -318966,7 +319140,7 @@ var DEFAULT_MODEL_CONFIGS = {
|
|
|
318966
319140
|
},
|
|
318967
319141
|
stateTransitions: {
|
|
318968
319142
|
terminal: "terminal",
|
|
318969
|
-
transient: "
|
|
319143
|
+
transient: "terminal",
|
|
318970
319144
|
not_found: "terminal",
|
|
318971
319145
|
unknown: "terminal"
|
|
318972
319146
|
}
|
|
@@ -318982,7 +319156,7 @@ var DEFAULT_MODEL_CONFIGS = {
|
|
|
318982
319156
|
},
|
|
318983
319157
|
stateTransitions: {
|
|
318984
319158
|
terminal: "terminal",
|
|
318985
|
-
transient: "
|
|
319159
|
+
transient: "terminal",
|
|
318986
319160
|
not_found: "terminal",
|
|
318987
319161
|
unknown: "terminal"
|
|
318988
319162
|
}
|
|
@@ -326648,12 +326822,13 @@ var McpClientManager = class {
|
|
|
326648
326822
|
await Promise.all(Object.keys(extension.mcpServers ?? {}).map((name3) => {
|
|
326649
326823
|
const config2 = this.allServerConfigs.get(name3);
|
|
326650
326824
|
if (config2?.extension?.id === extension.id) {
|
|
326825
|
+
const clientKey = this.getClientKey(name3, config2);
|
|
326651
326826
|
this.allServerConfigs.delete(name3);
|
|
326652
326827
|
const index = this.blockedMcpServers.findIndex((s2) => s2.name === name3 && s2.extensionName === extension.name);
|
|
326653
326828
|
if (index !== -1) {
|
|
326654
326829
|
this.blockedMcpServers.splice(index, 1);
|
|
326655
326830
|
}
|
|
326656
|
-
return this.disconnectClient(
|
|
326831
|
+
return this.disconnectClient(clientKey, true);
|
|
326657
326832
|
}
|
|
326658
326833
|
return Promise.resolve();
|
|
326659
326834
|
}));
|
|
@@ -336029,7 +336204,7 @@ var Config = class {
|
|
|
336029
336204
|
if (this.experimentalJitContext && this.memoryContextManager) {
|
|
336030
336205
|
await this.memoryContextManager.refresh();
|
|
336031
336206
|
} else {
|
|
336032
|
-
const { refreshServerHierarchicalMemory: refreshServerHierarchicalMemory2 } = await import("./memoryDiscovery-
|
|
336207
|
+
const { refreshServerHierarchicalMemory: refreshServerHierarchicalMemory2 } = await import("./memoryDiscovery-WVH7QDNJ.js");
|
|
336033
336208
|
await refreshServerHierarchicalMemory2(this);
|
|
336034
336209
|
}
|
|
336035
336210
|
if (this._geminiClient?.isInitialized()) {
|
|
@@ -337108,7 +337283,7 @@ ${s2.content}`).join("\n\n");
|
|
|
337108
337283
|
|
|
337109
337284
|
// packages/core/dist/src/output/json-formatter.js
|
|
337110
337285
|
var JsonFormatter = class {
|
|
337111
|
-
format(sessionId, response, stats, error40) {
|
|
337286
|
+
format(sessionId, response, stats, error40, warnings) {
|
|
337112
337287
|
const output = {};
|
|
337113
337288
|
if (sessionId) {
|
|
337114
337289
|
output.session_id = sessionId;
|
|
@@ -337122,6 +337297,9 @@ var JsonFormatter = class {
|
|
|
337122
337297
|
if (error40) {
|
|
337123
337298
|
output.error = error40;
|
|
337124
337299
|
}
|
|
337300
|
+
if (warnings && warnings.length > 0) {
|
|
337301
|
+
output.warnings = warnings.map((w) => stripAnsi(w));
|
|
337302
|
+
}
|
|
337125
337303
|
return JSON.stringify(output, null, 2);
|
|
337126
337304
|
}
|
|
337127
337305
|
formatError(error40, code, sessionId) {
|
|
@@ -344622,7 +344800,7 @@ function translateEvent(event, state) {
|
|
|
344622
344800
|
ensureStreamStart(state, out2);
|
|
344623
344801
|
out2.push(makeEvent("error", state, {
|
|
344624
344802
|
status: "PERMISSION_DENIED",
|
|
344625
|
-
message:
|
|
344803
|
+
message: event.value.systemMessage?.trim() || event.value.reason,
|
|
344626
344804
|
fatal: false,
|
|
344627
344805
|
_meta: { code: "AGENT_EXECUTION_BLOCKED" }
|
|
344628
344806
|
}));
|
|
@@ -353613,6 +353791,7 @@ export {
|
|
|
353613
353791
|
getResponseText,
|
|
353614
353792
|
flatMapTextParts,
|
|
353615
353793
|
appendToLastTextPart,
|
|
353794
|
+
isTextPart2 as isTextPart,
|
|
353616
353795
|
convertToFunctionResponse,
|
|
353617
353796
|
getResponseTextFromParts,
|
|
353618
353797
|
getFunctionCalls,
|
|
@@ -353706,7 +353885,9 @@ export {
|
|
|
353706
353885
|
createConversationOffered,
|
|
353707
353886
|
formatProtoJsonDuration,
|
|
353708
353887
|
ReleaseChannel,
|
|
353888
|
+
RELEASE_CHANNEL_STABILITY,
|
|
353709
353889
|
_clearCache,
|
|
353890
|
+
getChannelFromVersion,
|
|
353710
353891
|
getReleaseChannel,
|
|
353711
353892
|
isNightly,
|
|
353712
353893
|
isPreview,
|