@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
|
@@ -217,7 +217,7 @@ import {
|
|
|
217
217
|
toPathKey,
|
|
218
218
|
unescapePath,
|
|
219
219
|
zodToJsonSchema
|
|
220
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-533APETE.js";
|
|
221
221
|
import {
|
|
222
222
|
wrapper_default
|
|
223
223
|
} from "./chunk-664ZODQF.js";
|
|
@@ -246396,8 +246396,8 @@ import { createHash } from "node:crypto";
|
|
|
246396
246396
|
import * as os12 from "node:os";
|
|
246397
246397
|
|
|
246398
246398
|
// packages/core/src/generated/git-commit.ts
|
|
246399
|
-
var GIT_COMMIT_INFO = "
|
|
246400
|
-
var CLI_VERSION = "0.
|
|
246399
|
+
var GIT_COMMIT_INFO = "caa046641";
|
|
246400
|
+
var CLI_VERSION = "0.42.0-nightly.20260428.g59b2dea0e";
|
|
246401
246401
|
|
|
246402
246402
|
// packages/core/src/ide/detect-ide.ts
|
|
246403
246403
|
var IDE_DEFINITIONS = {
|
|
@@ -249125,6 +249125,7 @@ var ChatRecordingService = class {
|
|
|
249125
249125
|
*/
|
|
249126
249126
|
async deleteSessionAndArtifacts(chatsDir, file2, tempDir) {
|
|
249127
249127
|
const filePath = path20.join(chatsDir, file2);
|
|
249128
|
+
let fullSessionId;
|
|
249128
249129
|
try {
|
|
249129
249130
|
const CHUNK_SIZE = 4096;
|
|
249130
249131
|
const buffer = Buffer.alloc(CHUNK_SIZE);
|
|
@@ -249133,25 +249134,33 @@ var ChatRecordingService = class {
|
|
|
249133
249134
|
try {
|
|
249134
249135
|
fd = await fs24.promises.open(filePath, "r");
|
|
249135
249136
|
const { bytesRead } = await fd.read(buffer, 0, CHUNK_SIZE, 0);
|
|
249136
|
-
if (bytesRead
|
|
249137
|
-
|
|
249138
|
-
|
|
249139
|
-
|
|
249137
|
+
if (bytesRead > 0) {
|
|
249138
|
+
const contentChunk = buffer.toString("utf8", 0, bytesRead);
|
|
249139
|
+
const newlineIndex = contentChunk.indexOf("\n");
|
|
249140
|
+
firstLine = newlineIndex !== -1 ? contentChunk.substring(0, newlineIndex) : contentChunk;
|
|
249141
|
+
try {
|
|
249142
|
+
const content = JSON.parse(firstLine);
|
|
249143
|
+
if (isSessionIdRecord(content)) {
|
|
249144
|
+
fullSessionId = content.sessionId;
|
|
249145
|
+
}
|
|
249146
|
+
} catch {
|
|
249147
|
+
}
|
|
249140
249148
|
}
|
|
249141
|
-
const contentChunk = buffer.toString("utf8", 0, bytesRead);
|
|
249142
|
-
const newlineIndex = contentChunk.indexOf("\n");
|
|
249143
|
-
firstLine = newlineIndex !== -1 ? contentChunk.substring(0, newlineIndex) : contentChunk;
|
|
249144
249149
|
} finally {
|
|
249145
249150
|
if (fd !== void 0) {
|
|
249146
249151
|
await fd.close();
|
|
249147
249152
|
}
|
|
249148
249153
|
}
|
|
249149
|
-
|
|
249150
|
-
|
|
249151
|
-
|
|
249152
|
-
|
|
249154
|
+
if (!fullSessionId) {
|
|
249155
|
+
try {
|
|
249156
|
+
const fileContent = await fs24.promises.readFile(filePath, "utf8");
|
|
249157
|
+
const parsed = JSON.parse(fileContent);
|
|
249158
|
+
if (isSessionIdRecord(parsed)) {
|
|
249159
|
+
fullSessionId = parsed.sessionId;
|
|
249160
|
+
}
|
|
249161
|
+
} catch {
|
|
249162
|
+
}
|
|
249153
249163
|
}
|
|
249154
|
-
await fs24.promises.unlink(filePath);
|
|
249155
249164
|
if (fullSessionId) {
|
|
249156
249165
|
await deleteSessionArtifactsAsync(fullSessionId, tempDir);
|
|
249157
249166
|
await deleteSubagentSessionDirAndArtifactsAsync(
|
|
@@ -249161,7 +249170,37 @@ var ChatRecordingService = class {
|
|
|
249161
249170
|
);
|
|
249162
249171
|
}
|
|
249163
249172
|
} catch (error40) {
|
|
249164
|
-
debugLogger.error(
|
|
249173
|
+
debugLogger.error(
|
|
249174
|
+
`Error deleting artifacts for session file ${file2}:`,
|
|
249175
|
+
error40
|
|
249176
|
+
);
|
|
249177
|
+
} finally {
|
|
249178
|
+
try {
|
|
249179
|
+
await fs24.promises.unlink(filePath);
|
|
249180
|
+
} catch (error40) {
|
|
249181
|
+
if (isNodeError(error40) && error40.code !== "ENOENT") {
|
|
249182
|
+
debugLogger.error(`Error unlinking session file ${file2}:`, error40);
|
|
249183
|
+
}
|
|
249184
|
+
}
|
|
249185
|
+
}
|
|
249186
|
+
}
|
|
249187
|
+
/**
|
|
249188
|
+
* Asynchronously deletes the current session's chat file and tool outputs.
|
|
249189
|
+
* This encapsulates the session ID logic and uses non-blocking I/O to avoid
|
|
249190
|
+
* blocking the event loop on exit.
|
|
249191
|
+
*/
|
|
249192
|
+
async deleteCurrentSessionAsync() {
|
|
249193
|
+
if (!this.conversationFile) {
|
|
249194
|
+
return;
|
|
249195
|
+
}
|
|
249196
|
+
try {
|
|
249197
|
+
const tempDir = this.context.config.storage.getProjectTempDir();
|
|
249198
|
+
await fs24.promises.unlink(this.conversationFile).catch(() => {
|
|
249199
|
+
});
|
|
249200
|
+
await deleteSessionArtifactsAsync(this.sessionId, tempDir);
|
|
249201
|
+
} catch (error40) {
|
|
249202
|
+
debugLogger.error("Error deleting current session.", error40);
|
|
249203
|
+
throw error40;
|
|
249165
249204
|
}
|
|
249166
249205
|
}
|
|
249167
249206
|
/**
|
|
@@ -252042,6 +252081,9 @@ function appendToLastTextPart(prompt, textToAppend, separator = "\n\n") {
|
|
|
252042
252081
|
}
|
|
252043
252082
|
return newPrompt;
|
|
252044
252083
|
}
|
|
252084
|
+
function isTextPart2(part) {
|
|
252085
|
+
return typeof part === "object" && part !== null && "text" in part && typeof part.text === "string";
|
|
252086
|
+
}
|
|
252045
252087
|
|
|
252046
252088
|
// packages/core/src/utils/generateContentResponseUtilities.ts
|
|
252047
252089
|
function createFunctionResponsePart(callId, toolName, output) {
|
|
@@ -269596,7 +269638,7 @@ function getVersion() {
|
|
|
269596
269638
|
}
|
|
269597
269639
|
versionPromise = (async () => {
|
|
269598
269640
|
const pkgJson = await getPackageJson(__dirname4);
|
|
269599
|
-
return "0.
|
|
269641
|
+
return "0.42.0-nightly.20260428.g59b2dea0e";
|
|
269600
269642
|
})();
|
|
269601
269643
|
return versionPromise;
|
|
269602
269644
|
}
|
|
@@ -270523,14 +270565,18 @@ var SILENT_ACTIONS = {
|
|
|
270523
270565
|
};
|
|
270524
270566
|
var DEFAULT_STATE = {
|
|
270525
270567
|
terminal: "terminal",
|
|
270526
|
-
transient: "
|
|
270568
|
+
transient: "terminal",
|
|
270527
270569
|
not_found: "terminal",
|
|
270528
270570
|
unknown: "terminal"
|
|
270529
270571
|
};
|
|
270530
|
-
var
|
|
270531
|
-
|
|
270532
|
-
|
|
270533
|
-
|
|
270572
|
+
var AUTO_ROUTING_OVERRIDES = {
|
|
270573
|
+
maxAttempts: 3,
|
|
270574
|
+
actions: { ...DEFAULT_ACTIONS, transient: "silent" },
|
|
270575
|
+
stateTransitions: {
|
|
270576
|
+
...DEFAULT_STATE,
|
|
270577
|
+
transient: "sticky_retry"
|
|
270578
|
+
}
|
|
270579
|
+
};
|
|
270534
270580
|
var FLASH_LITE_CHAIN = [
|
|
270535
270581
|
definePolicy({
|
|
270536
270582
|
model: DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
@@ -270547,19 +270593,41 @@ var FLASH_LITE_CHAIN = [
|
|
|
270547
270593
|
})
|
|
270548
270594
|
];
|
|
270549
270595
|
function getModelPolicyChain(options) {
|
|
270596
|
+
const isAuto = options.isAutoSelection ?? false;
|
|
270550
270597
|
if (options.previewEnabled) {
|
|
270551
|
-
const
|
|
270598
|
+
const proModel = resolveModel(
|
|
270552
270599
|
PREVIEW_GEMINI_MODEL,
|
|
270553
270600
|
options.useGemini31,
|
|
270554
270601
|
options.useGemini31FlashLite,
|
|
270555
270602
|
options.useCustomToolModel
|
|
270556
270603
|
);
|
|
270557
270604
|
return [
|
|
270558
|
-
definePolicy({
|
|
270559
|
-
|
|
270605
|
+
definePolicy({
|
|
270606
|
+
model: proModel,
|
|
270607
|
+
...isAuto ? {
|
|
270608
|
+
maxAttempts: 3,
|
|
270609
|
+
actions: { ...DEFAULT_ACTIONS, transient: "silent" },
|
|
270610
|
+
stateTransitions: { ...DEFAULT_STATE, transient: "sticky_retry" }
|
|
270611
|
+
} : {}
|
|
270612
|
+
}),
|
|
270613
|
+
definePolicy({
|
|
270614
|
+
model: PREVIEW_GEMINI_FLASH_MODEL,
|
|
270615
|
+
isLastResort: true,
|
|
270616
|
+
maxAttempts: 10
|
|
270617
|
+
})
|
|
270560
270618
|
];
|
|
270561
270619
|
}
|
|
270562
|
-
return
|
|
270620
|
+
return [
|
|
270621
|
+
definePolicy({
|
|
270622
|
+
model: DEFAULT_GEMINI_MODEL,
|
|
270623
|
+
...isAuto ? AUTO_ROUTING_OVERRIDES : {}
|
|
270624
|
+
}),
|
|
270625
|
+
definePolicy({
|
|
270626
|
+
model: DEFAULT_GEMINI_FLASH_MODEL,
|
|
270627
|
+
isLastResort: true,
|
|
270628
|
+
maxAttempts: 10
|
|
270629
|
+
})
|
|
270630
|
+
];
|
|
270563
270631
|
}
|
|
270564
270632
|
function createSingleModelChain(model) {
|
|
270565
270633
|
return [definePolicy({ model, isLastResort: true })];
|
|
@@ -270574,6 +270642,7 @@ function definePolicy(config2) {
|
|
|
270574
270642
|
return {
|
|
270575
270643
|
model: config2.model,
|
|
270576
270644
|
isLastResort: config2.isLastResort,
|
|
270645
|
+
maxAttempts: config2.maxAttempts,
|
|
270577
270646
|
actions: { ...DEFAULT_ACTIONS, ...config2.actions ?? {} },
|
|
270578
270647
|
stateTransitions: {
|
|
270579
270648
|
...DEFAULT_STATE,
|
|
@@ -270619,17 +270688,22 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
|
|
|
270619
270688
|
};
|
|
270620
270689
|
if (resolvedModel === DEFAULT_GEMINI_FLASH_LITE_MODEL) {
|
|
270621
270690
|
chain2 = config2.modelConfigService.resolveChain("lite", context2);
|
|
270622
|
-
} else if (isGemini3Model(resolvedModel, config2) ||
|
|
270623
|
-
if (
|
|
270691
|
+
} else if (isGemini3Model(resolvedModel, config2) || isAutoPreferred || isAutoConfigured) {
|
|
270692
|
+
if (isAutoConfigured && config2.modelConfigService.getModelChain(configuredModel)) {
|
|
270624
270693
|
chain2 = config2.modelConfigService.resolveChain(
|
|
270625
270694
|
configuredModel,
|
|
270626
270695
|
context2
|
|
270627
270696
|
);
|
|
270628
270697
|
}
|
|
270629
270698
|
if (!chain2) {
|
|
270699
|
+
const isAutoSelection = isAutoPreferred || isAutoConfigured;
|
|
270630
270700
|
const previewEnabled = hasAccessToPreview && (isGemini3Model(resolvedModel, config2) || preferredModel === PREVIEW_GEMINI_MODEL_AUTO || configuredModel === PREVIEW_GEMINI_MODEL_AUTO);
|
|
270701
|
+
const autoPrefix = isAutoSelection ? "auto-" : "";
|
|
270631
270702
|
const chainKey = previewEnabled ? "preview" : "default";
|
|
270632
|
-
chain2 = config2.modelConfigService.resolveChain(
|
|
270703
|
+
chain2 = config2.modelConfigService.resolveChain(
|
|
270704
|
+
`${autoPrefix}${chainKey}`,
|
|
270705
|
+
context2
|
|
270706
|
+
);
|
|
270633
270707
|
}
|
|
270634
270708
|
}
|
|
270635
270709
|
if (!chain2) {
|
|
@@ -270640,10 +270714,12 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
|
|
|
270640
270714
|
if (resolvedModel === DEFAULT_GEMINI_FLASH_LITE_MODEL) {
|
|
270641
270715
|
chain2 = getFlashLitePolicyChain();
|
|
270642
270716
|
} else if (isGemini3Model(resolvedModel, config2) || isAutoPreferred || isAutoConfigured) {
|
|
270717
|
+
const isAutoSelection = isAutoPreferred || isAutoConfigured;
|
|
270643
270718
|
if (hasAccessToPreview) {
|
|
270644
270719
|
const previewEnabled = isGemini3Model(resolvedModel, config2) || preferredModel === PREVIEW_GEMINI_MODEL_AUTO || configuredModel === PREVIEW_GEMINI_MODEL_AUTO;
|
|
270645
270720
|
chain2 = getModelPolicyChain({
|
|
270646
270721
|
previewEnabled,
|
|
270722
|
+
isAutoSelection,
|
|
270647
270723
|
userTier: config2.getUserTier(),
|
|
270648
270724
|
useGemini31,
|
|
270649
270725
|
useGemini31FlashLite,
|
|
@@ -270652,6 +270728,7 @@ function resolvePolicyChain(config2, preferredModel, wrapsAround = false) {
|
|
|
270652
270728
|
} else {
|
|
270653
270729
|
chain2 = getModelPolicyChain({
|
|
270654
270730
|
previewEnabled: false,
|
|
270731
|
+
isAutoSelection,
|
|
270655
270732
|
userTier: config2.getUserTier(),
|
|
270656
270733
|
useGemini31,
|
|
270657
270734
|
useGemini31FlashLite,
|
|
@@ -270732,10 +270809,12 @@ function applyModelSelection(config2, modelConfigKey, options = {}) {
|
|
|
270732
270809
|
if (selection.attempts && options.consumeAttempt !== false) {
|
|
270733
270810
|
config2.getModelAvailabilityService().consumeStickyAttempt(finalModel);
|
|
270734
270811
|
}
|
|
270812
|
+
const chain2 = resolvePolicyChain(config2, finalModel);
|
|
270813
|
+
const policy = chain2.find((p) => p.model === finalModel);
|
|
270735
270814
|
return {
|
|
270736
270815
|
model: finalModel,
|
|
270737
270816
|
config: generateContentConfig,
|
|
270738
|
-
maxAttempts: selection.attempts
|
|
270817
|
+
maxAttempts: selection.attempts ?? policy?.maxAttempts
|
|
270739
270818
|
};
|
|
270740
270819
|
}
|
|
270741
270820
|
function applyAvailabilityTransition(getContext, failureKind) {
|
|
@@ -270749,7 +270828,11 @@ function applyAvailabilityTransition(getContext, failureKind) {
|
|
|
270749
270828
|
failureKind === "terminal" ? "quota" : "capacity"
|
|
270750
270829
|
);
|
|
270751
270830
|
} else if (transition === "sticky_retry") {
|
|
270752
|
-
context2.service.markRetryOncePerTurn(
|
|
270831
|
+
context2.service.markRetryOncePerTurn(
|
|
270832
|
+
context2.policy.model,
|
|
270833
|
+
context2.policy.maxAttempts
|
|
270834
|
+
);
|
|
270835
|
+
context2.service.consumeStickyAttempt(context2.policy.model);
|
|
270753
270836
|
}
|
|
270754
270837
|
}
|
|
270755
270838
|
|
|
@@ -270985,8 +271068,11 @@ var RETRYABLE_NETWORK_CODES = [
|
|
|
270985
271068
|
"EAI_AGAIN",
|
|
270986
271069
|
"ECONNREFUSED",
|
|
270987
271070
|
"ERR_SSL_WRONG_VERSION_NUMBER",
|
|
270988
|
-
"EPROTO"
|
|
271071
|
+
"EPROTO",
|
|
270989
271072
|
// Generic protocol error (often SSL-related)
|
|
271073
|
+
"UND_ERR_HEADERS_TIMEOUT",
|
|
271074
|
+
"UND_ERR_BODY_TIMEOUT",
|
|
271075
|
+
"UND_ERR_CONNECT_TIMEOUT"
|
|
270990
271076
|
];
|
|
270991
271077
|
var RETRYABLE_SSL_ERROR_PATTERN = /^ERR_SSL_.*BAD_RECORD_MAC/i;
|
|
270992
271078
|
function isRetryableSslErrorCode(code) {
|
|
@@ -271097,6 +271183,7 @@ async function retryWithBackoff(fn, options) {
|
|
|
271097
271183
|
shouldRetryOnError: isRetryableError,
|
|
271098
271184
|
...cleanOptions
|
|
271099
271185
|
};
|
|
271186
|
+
const getCurrentMaxAttempts = () => getAvailabilityContext?.()?.policy.maxAttempts ?? maxAttempts;
|
|
271100
271187
|
let attempt = 0;
|
|
271101
271188
|
let currentDelay = initialDelayMs;
|
|
271102
271189
|
const throwIfAborted = () => {
|
|
@@ -271104,7 +271191,7 @@ async function retryWithBackoff(fn, options) {
|
|
|
271104
271191
|
throw createAbortError();
|
|
271105
271192
|
}
|
|
271106
271193
|
};
|
|
271107
|
-
while (attempt <
|
|
271194
|
+
while (attempt < getCurrentMaxAttempts()) {
|
|
271108
271195
|
if (signal?.aborted) {
|
|
271109
271196
|
throw createAbortError();
|
|
271110
271197
|
}
|
|
@@ -271171,7 +271258,7 @@ async function retryWithBackoff(fn, options) {
|
|
|
271171
271258
|
}
|
|
271172
271259
|
const is500 = errorCode !== void 0 && errorCode >= 500 && errorCode < 600;
|
|
271173
271260
|
if (classifiedError instanceof RetryableQuotaError || is500) {
|
|
271174
|
-
if (attempt >=
|
|
271261
|
+
if (attempt >= getCurrentMaxAttempts()) {
|
|
271175
271262
|
const errorMessage = classifiedError instanceof Error ? classifiedError.message : "";
|
|
271176
271263
|
debugLogger.warn(
|
|
271177
271264
|
`Attempt ${attempt} failed${errorMessage ? `: ${errorMessage}` : ""}. Max attempts reached`
|
|
@@ -271219,7 +271306,7 @@ async function retryWithBackoff(fn, options) {
|
|
|
271219
271306
|
continue;
|
|
271220
271307
|
}
|
|
271221
271308
|
}
|
|
271222
|
-
if (attempt >=
|
|
271309
|
+
if (attempt >= getCurrentMaxAttempts() || // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
271223
271310
|
!shouldRetryOnError(error40, retryFetchErrors)) {
|
|
271224
271311
|
throw error40;
|
|
271225
271312
|
}
|
|
@@ -271443,7 +271530,7 @@ var BaseLlmClient = class {
|
|
|
271443
271530
|
authType: this.authType ?? this.config.getContentGeneratorConfig()?.authType,
|
|
271444
271531
|
retryFetchErrors: this.config.getRetryFetchErrors(),
|
|
271445
271532
|
onRetry: (attempt, error40, delayMs) => {
|
|
271446
|
-
const actualMaxAttempts =
|
|
271533
|
+
const actualMaxAttempts = getAvailabilityContext()?.policy.maxAttempts ?? maxAttempts ?? DEFAULT_MAX_ATTEMPTS2;
|
|
271447
271534
|
const modelName = getDisplayString(currentModel);
|
|
271448
271535
|
const errorType = getRetryErrorType(error40);
|
|
271449
271536
|
coreEvents.emitRetryAttempt({
|
|
@@ -273411,24 +273498,31 @@ var ReleaseChannel = /* @__PURE__ */ ((ReleaseChannel2) => {
|
|
|
273411
273498
|
ReleaseChannel2["STABLE"] = "stable";
|
|
273412
273499
|
return ReleaseChannel2;
|
|
273413
273500
|
})(ReleaseChannel || {});
|
|
273501
|
+
var RELEASE_CHANNEL_STABILITY = {
|
|
273502
|
+
["nightly" /* NIGHTLY */]: 0,
|
|
273503
|
+
["preview" /* PREVIEW */]: 1,
|
|
273504
|
+
["stable" /* STABLE */]: 2
|
|
273505
|
+
};
|
|
273414
273506
|
var cache = /* @__PURE__ */ new Map();
|
|
273415
273507
|
function _clearCache() {
|
|
273416
273508
|
cache.clear();
|
|
273417
273509
|
}
|
|
273510
|
+
function getChannelFromVersion(version4) {
|
|
273511
|
+
if (!version4 || version4.includes("nightly")) {
|
|
273512
|
+
return "nightly" /* NIGHTLY */;
|
|
273513
|
+
}
|
|
273514
|
+
if (version4.includes("preview")) {
|
|
273515
|
+
return "preview" /* PREVIEW */;
|
|
273516
|
+
}
|
|
273517
|
+
return "stable" /* STABLE */;
|
|
273518
|
+
}
|
|
273418
273519
|
async function getReleaseChannel(cwd) {
|
|
273419
273520
|
if (cache.has(cwd)) {
|
|
273420
273521
|
return cache.get(cwd);
|
|
273421
273522
|
}
|
|
273422
273523
|
const packageJson = await getPackageJson(cwd);
|
|
273423
273524
|
const version4 = packageJson?.version ?? "";
|
|
273424
|
-
|
|
273425
|
-
if (version4.includes("nightly") || version4 === "") {
|
|
273426
|
-
channel = "nightly" /* NIGHTLY */;
|
|
273427
|
-
} else if (version4.includes("preview")) {
|
|
273428
|
-
channel = "preview" /* PREVIEW */;
|
|
273429
|
-
} else {
|
|
273430
|
-
channel = "stable" /* STABLE */;
|
|
273431
|
-
}
|
|
273525
|
+
const channel = getChannelFromVersion(version4);
|
|
273432
273526
|
cache.set(cwd, channel);
|
|
273433
273527
|
return channel;
|
|
273434
273528
|
}
|
|
@@ -274963,19 +275057,14 @@ function getAuthTypeFromEnv() {
|
|
|
274963
275057
|
}
|
|
274964
275058
|
return void 0;
|
|
274965
275059
|
}
|
|
274966
|
-
var LOCAL_HOSTNAMES = ["localhost", "127.0.0.1", "[::1]"];
|
|
274967
275060
|
var VERTEX_AI_REQUEST_TYPE_HEADER = "X-Vertex-AI-LLM-Request-Type";
|
|
274968
275061
|
var VERTEX_AI_SHARED_REQUEST_TYPE_HEADER = "X-Vertex-AI-LLM-Shared-Request-Type";
|
|
274969
275062
|
function validateBaseUrl(baseUrl) {
|
|
274970
|
-
let url3;
|
|
274971
275063
|
try {
|
|
274972
|
-
|
|
275064
|
+
new URL(baseUrl);
|
|
274973
275065
|
} catch {
|
|
274974
275066
|
throw new Error(`Invalid custom base URL: ${baseUrl}`);
|
|
274975
275067
|
}
|
|
274976
|
-
if (url3.protocol !== "https:" && !LOCAL_HOSTNAMES.includes(url3.hostname)) {
|
|
274977
|
-
throw new Error("Custom base URL must use HTTPS unless it is localhost.");
|
|
274978
|
-
}
|
|
274979
275068
|
}
|
|
274980
275069
|
async function createContentGeneratorConfig(config2, authType, apiKey, baseUrl, customHeaders, vertexAiRouting) {
|
|
274981
275070
|
const geminiApiKey = apiKey || process.env["GEMINI_API_KEY"] || await loadApiKey() || void 0;
|
|
@@ -284239,7 +284328,7 @@ var GrepToolInvocation = class extends BaseToolInvocation {
|
|
|
284239
284328
|
const grepAvailable = await this.isCommandAvailable("grep");
|
|
284240
284329
|
if (grepAvailable) {
|
|
284241
284330
|
strategyUsed = "system grep";
|
|
284242
|
-
const grepArgs = ["-r", "-n", "-H", "-E", "-I"];
|
|
284331
|
+
const grepArgs = ["-r", "-n", "-H", "-E", "-I", "-i"];
|
|
284243
284332
|
const globExcludes = this.fileExclusions.getGlobExcludes();
|
|
284244
284333
|
const commonExcludes = globExcludes.map((pattern2) => {
|
|
284245
284334
|
let dir = pattern2;
|
|
@@ -288534,12 +288623,13 @@ var PrivateIpError = class extends Error {
|
|
|
288534
288623
|
this.name = "PrivateIpError";
|
|
288535
288624
|
}
|
|
288536
288625
|
};
|
|
288537
|
-
var
|
|
288626
|
+
var defaultHeadersTimeout = 6e4;
|
|
288627
|
+
var defaultBodyTimeout = 3e5;
|
|
288538
288628
|
var currentProxy = void 0;
|
|
288539
288629
|
(0, import_undici2.setGlobalDispatcher)(
|
|
288540
288630
|
new import_undici2.Agent({
|
|
288541
|
-
headersTimeout:
|
|
288542
|
-
bodyTimeout:
|
|
288631
|
+
headersTimeout: defaultHeadersTimeout,
|
|
288632
|
+
bodyTimeout: defaultBodyTimeout
|
|
288543
288633
|
})
|
|
288544
288634
|
);
|
|
288545
288635
|
function updateGlobalFetchTimeouts(timeoutMs) {
|
|
@@ -288548,14 +288638,14 @@ function updateGlobalFetchTimeouts(timeoutMs) {
|
|
|
288548
288638
|
`Invalid timeout value: ${timeoutMs}. Must be a positive finite number.`
|
|
288549
288639
|
);
|
|
288550
288640
|
}
|
|
288551
|
-
|
|
288641
|
+
defaultHeadersTimeout = timeoutMs;
|
|
288552
288642
|
if (currentProxy) {
|
|
288553
288643
|
setGlobalProxy(currentProxy);
|
|
288554
288644
|
} else {
|
|
288555
288645
|
(0, import_undici2.setGlobalDispatcher)(
|
|
288556
288646
|
new import_undici2.Agent({
|
|
288557
|
-
headersTimeout:
|
|
288558
|
-
bodyTimeout:
|
|
288647
|
+
headersTimeout: defaultHeadersTimeout,
|
|
288648
|
+
bodyTimeout: defaultBodyTimeout
|
|
288559
288649
|
})
|
|
288560
288650
|
);
|
|
288561
288651
|
}
|
|
@@ -288656,8 +288746,8 @@ function setGlobalProxy(proxy2) {
|
|
|
288656
288746
|
(0, import_undici2.setGlobalDispatcher)(
|
|
288657
288747
|
new import_undici2.ProxyAgent({
|
|
288658
288748
|
uri: proxy2,
|
|
288659
|
-
headersTimeout:
|
|
288660
|
-
bodyTimeout:
|
|
288749
|
+
headersTimeout: defaultHeadersTimeout,
|
|
288750
|
+
bodyTimeout: defaultBodyTimeout
|
|
288661
288751
|
})
|
|
288662
288752
|
);
|
|
288663
288753
|
}
|
|
@@ -296180,7 +296270,7 @@ ${options.planModeToolsList}
|
|
|
296180
296270
|
- **Inquiries:** If the request is an **Inquiry** (e.g., "How does X work?"), answer directly. DO NOT create a plan.
|
|
296181
296271
|
- **Directives:** If the request is a **Directive** (e.g., "Fix bug Y"), follow the workflow below.
|
|
296182
296272
|
5. **Plan Storage:** Save plans as Markdown (.md) using descriptive filenames.
|
|
296183
|
-
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.
|
|
296273
|
+
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)}.**
|
|
296184
296274
|
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.
|
|
296185
296275
|
|
|
296186
296276
|
## Planning Workflow
|
|
@@ -296204,7 +296294,7 @@ Write the implementation plan to \`${options.plansDir}/\`. The plan's structure
|
|
|
296204
296294
|
- **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." : ""}
|
|
296205
296295
|
|
|
296206
296296
|
### 4. Review & Approval
|
|
296207
|
-
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."}
|
|
296297
|
+
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."}
|
|
296208
296298
|
|
|
296209
296299
|
${renderApprovedPlanSection(options.approvedPlanPath)}`.trim();
|
|
296210
296300
|
}
|
|
@@ -296814,7 +296904,7 @@ ${options.planModeToolsList}
|
|
|
296814
296904
|
- Save the implementation plan to the designated plans directory
|
|
296815
296905
|
|
|
296816
296906
|
### Phase 4: Review & Approval
|
|
296817
|
-
- Present the plan and request approval for the finalized plan using the \`${EXIT_PLAN_MODE_TOOL_NAME}\` tool
|
|
296907
|
+
- 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}\`.**
|
|
296818
296908
|
- If plan is approved, you can begin implementation
|
|
296819
296909
|
- If plan is rejected, address the feedback and iterate on the plan
|
|
296820
296910
|
|
|
@@ -301169,7 +301259,12 @@ var mcpServerSchema = external_exports.object({
|
|
|
301169
301259
|
client_secret: external_exports.string().optional(),
|
|
301170
301260
|
scopes: external_exports.array(external_exports.string()).optional(),
|
|
301171
301261
|
authorization_url: external_exports.string().url().optional(),
|
|
301172
|
-
token_url: external_exports.string().url().optional()
|
|
301262
|
+
token_url: external_exports.string().url().optional(),
|
|
301263
|
+
issuer: external_exports.string().url().optional(),
|
|
301264
|
+
audiences: external_exports.array(external_exports.string()).optional(),
|
|
301265
|
+
redirect_uri: external_exports.string().url().optional(),
|
|
301266
|
+
token_param_name: external_exports.string().optional(),
|
|
301267
|
+
registration_url: external_exports.string().url().optional()
|
|
301173
301268
|
})
|
|
301174
301269
|
]).optional()
|
|
301175
301270
|
});
|
|
@@ -301220,7 +301315,12 @@ var oauth2AuthSchema = external_exports.object({
|
|
|
301220
301315
|
client_secret: external_exports.string().optional(),
|
|
301221
301316
|
scopes: external_exports.array(external_exports.string()).optional(),
|
|
301222
301317
|
authorization_url: external_exports.string().url().optional(),
|
|
301223
|
-
token_url: external_exports.string().url().optional()
|
|
301318
|
+
token_url: external_exports.string().url().optional(),
|
|
301319
|
+
issuer: external_exports.string().url().optional(),
|
|
301320
|
+
audiences: external_exports.array(external_exports.string()).optional(),
|
|
301321
|
+
redirect_uri: external_exports.string().url().optional(),
|
|
301322
|
+
token_param_name: external_exports.string().optional(),
|
|
301323
|
+
registration_url: external_exports.string().url().optional()
|
|
301224
301324
|
});
|
|
301225
301325
|
var authConfigSchema = external_exports.discriminatedUnion("type", [
|
|
301226
301326
|
apiKeyAuthSchema,
|
|
@@ -301446,7 +301546,12 @@ function convertFrontmatterAuthToConfig(frontmatter) {
|
|
|
301446
301546
|
client_secret: frontmatter.client_secret,
|
|
301447
301547
|
scopes: frontmatter.scopes,
|
|
301448
301548
|
authorization_url: frontmatter.authorization_url,
|
|
301449
|
-
token_url: frontmatter.token_url
|
|
301549
|
+
token_url: frontmatter.token_url,
|
|
301550
|
+
issuer: frontmatter.issuer,
|
|
301551
|
+
audiences: frontmatter.audiences,
|
|
301552
|
+
redirect_uri: frontmatter.redirect_uri,
|
|
301553
|
+
token_param_name: frontmatter.token_param_name,
|
|
301554
|
+
registration_url: frontmatter.registration_url
|
|
301450
301555
|
};
|
|
301451
301556
|
default: {
|
|
301452
301557
|
const exhaustive = frontmatter;
|
|
@@ -301515,7 +301620,12 @@ function markdownToAgentDefinition(markdown, metadata2) {
|
|
|
301515
301620
|
clientSecret: config2.auth.client_secret,
|
|
301516
301621
|
scopes: config2.auth.scopes,
|
|
301517
301622
|
authorizationUrl: config2.auth.authorization_url,
|
|
301518
|
-
tokenUrl: config2.auth.token_url
|
|
301623
|
+
tokenUrl: config2.auth.token_url,
|
|
301624
|
+
issuer: config2.auth.issuer,
|
|
301625
|
+
audiences: config2.auth.audiences,
|
|
301626
|
+
redirectUri: config2.auth.redirect_uri,
|
|
301627
|
+
tokenParamName: config2.auth.token_param_name,
|
|
301628
|
+
registrationUrl: config2.auth.registration_url
|
|
301519
301629
|
};
|
|
301520
301630
|
}
|
|
301521
301631
|
}
|
|
@@ -302694,7 +302804,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
|
|
|
302694
302804
|
return provider;
|
|
302695
302805
|
}
|
|
302696
302806
|
case "oauth2": {
|
|
302697
|
-
const { OAuth2AuthProvider } = await import("./oauth2-provider-
|
|
302807
|
+
const { OAuth2AuthProvider } = await import("./oauth2-provider-7UM3XCQ4.js");
|
|
302698
302808
|
const provider = new OAuth2AuthProvider(
|
|
302699
302809
|
authConfig,
|
|
302700
302810
|
options.agentName ?? "unknown",
|
|
@@ -312871,7 +312981,7 @@ var A2AResultReassembler = class {
|
|
|
312871
312981
|
if (!message) return;
|
|
312872
312982
|
if (message.role === "user") return;
|
|
312873
312983
|
const text = extractPartsText(message.parts, "");
|
|
312874
|
-
if (text && this.messageLog
|
|
312984
|
+
if (text && this.messageLog.at(-1) !== text) {
|
|
312875
312985
|
this.messageLog.push(text);
|
|
312876
312986
|
}
|
|
312877
312987
|
}
|
|
@@ -312936,7 +313046,7 @@ function extractPartsText(parts2, separator) {
|
|
|
312936
313046
|
return parts2.map((p) => extractPartText(p)).filter(Boolean).join(separator);
|
|
312937
313047
|
}
|
|
312938
313048
|
function extractPartText(part) {
|
|
312939
|
-
if (
|
|
313049
|
+
if (isTextPart3(part)) {
|
|
312940
313050
|
return part.text;
|
|
312941
313051
|
}
|
|
312942
313052
|
if (isDataPart(part)) {
|
|
@@ -313004,7 +313114,7 @@ function extractIdsFromResponse(result2) {
|
|
|
313004
313114
|
}
|
|
313005
313115
|
return { contextId, taskId, clearTaskId };
|
|
313006
313116
|
}
|
|
313007
|
-
function
|
|
313117
|
+
function isTextPart3(part) {
|
|
313008
313118
|
return part.kind === "text";
|
|
313009
313119
|
}
|
|
313010
313120
|
function isDataPart(part) {
|
|
@@ -321498,7 +321608,7 @@ var ModelAvailabilityService = class {
|
|
|
321498
321608
|
markHealthy(model) {
|
|
321499
321609
|
this.clearState(model);
|
|
321500
321610
|
}
|
|
321501
|
-
markRetryOncePerTurn(model) {
|
|
321611
|
+
markRetryOncePerTurn(model, attempts = 1) {
|
|
321502
321612
|
const currentState = this.health.get(model);
|
|
321503
321613
|
if (currentState?.status === "terminal") {
|
|
321504
321614
|
return;
|
|
@@ -321510,7 +321620,8 @@ var ModelAvailabilityService = class {
|
|
|
321510
321620
|
this.setState(model, {
|
|
321511
321621
|
status: "sticky_retry",
|
|
321512
321622
|
reason: "retry_once_per_turn",
|
|
321513
|
-
consumed
|
|
321623
|
+
consumed,
|
|
321624
|
+
attempts
|
|
321514
321625
|
});
|
|
321515
321626
|
}
|
|
321516
321627
|
consumeStickyAttempt(model) {
|
|
@@ -321538,7 +321649,7 @@ var ModelAvailabilityService = class {
|
|
|
321538
321649
|
const snapshot = this.snapshot(model);
|
|
321539
321650
|
if (snapshot.available) {
|
|
321540
321651
|
const state = this.health.get(model);
|
|
321541
|
-
const attempts = state?.status === "sticky_retry" ?
|
|
321652
|
+
const attempts = state?.status === "sticky_retry" ? state.attempts : void 0;
|
|
321542
321653
|
return { selectedModel: model, skipped, attempts };
|
|
321543
321654
|
} else {
|
|
321544
321655
|
skipped.push({ model, reason: snapshot.reason ?? "unknown" });
|
|
@@ -322881,7 +322992,7 @@ var DEFAULT_MODEL_CONFIGS = {
|
|
|
322881
322992
|
},
|
|
322882
322993
|
stateTransitions: {
|
|
322883
322994
|
terminal: "terminal",
|
|
322884
|
-
transient: "
|
|
322995
|
+
transient: "terminal",
|
|
322885
322996
|
not_found: "terminal",
|
|
322886
322997
|
unknown: "terminal"
|
|
322887
322998
|
}
|
|
@@ -322889,18 +323000,54 @@ var DEFAULT_MODEL_CONFIGS = {
|
|
|
322889
323000
|
{
|
|
322890
323001
|
model: "gemini-3-flash-preview",
|
|
322891
323002
|
isLastResort: true,
|
|
323003
|
+
maxAttempts: 10,
|
|
322892
323004
|
actions: {
|
|
322893
323005
|
terminal: "prompt",
|
|
322894
323006
|
transient: "prompt",
|
|
322895
323007
|
not_found: "prompt",
|
|
322896
323008
|
unknown: "prompt"
|
|
322897
323009
|
},
|
|
323010
|
+
stateTransitions: {
|
|
323011
|
+
terminal: "terminal",
|
|
323012
|
+
transient: "terminal",
|
|
323013
|
+
not_found: "terminal",
|
|
323014
|
+
unknown: "terminal"
|
|
323015
|
+
}
|
|
323016
|
+
}
|
|
323017
|
+
],
|
|
323018
|
+
"auto-preview": [
|
|
323019
|
+
{
|
|
323020
|
+
model: "gemini-3-pro-preview",
|
|
323021
|
+
maxAttempts: 3,
|
|
323022
|
+
actions: {
|
|
323023
|
+
terminal: "prompt",
|
|
323024
|
+
transient: "silent",
|
|
323025
|
+
not_found: "prompt",
|
|
323026
|
+
unknown: "prompt"
|
|
323027
|
+
},
|
|
322898
323028
|
stateTransitions: {
|
|
322899
323029
|
terminal: "terminal",
|
|
322900
323030
|
transient: "sticky_retry",
|
|
322901
323031
|
not_found: "terminal",
|
|
322902
323032
|
unknown: "terminal"
|
|
322903
323033
|
}
|
|
323034
|
+
},
|
|
323035
|
+
{
|
|
323036
|
+
model: "gemini-3-flash-preview",
|
|
323037
|
+
isLastResort: true,
|
|
323038
|
+
maxAttempts: 10,
|
|
323039
|
+
actions: {
|
|
323040
|
+
terminal: "prompt",
|
|
323041
|
+
transient: "prompt",
|
|
323042
|
+
not_found: "prompt",
|
|
323043
|
+
unknown: "prompt"
|
|
323044
|
+
},
|
|
323045
|
+
stateTransitions: {
|
|
323046
|
+
terminal: "terminal",
|
|
323047
|
+
transient: "terminal",
|
|
323048
|
+
not_found: "terminal",
|
|
323049
|
+
unknown: "terminal"
|
|
323050
|
+
}
|
|
322904
323051
|
}
|
|
322905
323052
|
],
|
|
322906
323053
|
default: [
|
|
@@ -322922,18 +323069,54 @@ var DEFAULT_MODEL_CONFIGS = {
|
|
|
322922
323069
|
{
|
|
322923
323070
|
model: "gemini-2.5-flash",
|
|
322924
323071
|
isLastResort: true,
|
|
323072
|
+
maxAttempts: 10,
|
|
322925
323073
|
actions: {
|
|
322926
323074
|
terminal: "prompt",
|
|
322927
323075
|
transient: "prompt",
|
|
322928
323076
|
not_found: "prompt",
|
|
322929
323077
|
unknown: "prompt"
|
|
322930
323078
|
},
|
|
323079
|
+
stateTransitions: {
|
|
323080
|
+
terminal: "terminal",
|
|
323081
|
+
transient: "terminal",
|
|
323082
|
+
not_found: "terminal",
|
|
323083
|
+
unknown: "terminal"
|
|
323084
|
+
}
|
|
323085
|
+
}
|
|
323086
|
+
],
|
|
323087
|
+
"auto-default": [
|
|
323088
|
+
{
|
|
323089
|
+
model: "gemini-2.5-pro",
|
|
323090
|
+
maxAttempts: 3,
|
|
323091
|
+
actions: {
|
|
323092
|
+
terminal: "prompt",
|
|
323093
|
+
transient: "silent",
|
|
323094
|
+
not_found: "prompt",
|
|
323095
|
+
unknown: "prompt"
|
|
323096
|
+
},
|
|
322931
323097
|
stateTransitions: {
|
|
322932
323098
|
terminal: "terminal",
|
|
322933
323099
|
transient: "sticky_retry",
|
|
322934
323100
|
not_found: "terminal",
|
|
322935
323101
|
unknown: "terminal"
|
|
322936
323102
|
}
|
|
323103
|
+
},
|
|
323104
|
+
{
|
|
323105
|
+
model: "gemini-2.5-flash",
|
|
323106
|
+
isLastResort: true,
|
|
323107
|
+
maxAttempts: 10,
|
|
323108
|
+
actions: {
|
|
323109
|
+
terminal: "prompt",
|
|
323110
|
+
transient: "prompt",
|
|
323111
|
+
not_found: "prompt",
|
|
323112
|
+
unknown: "prompt"
|
|
323113
|
+
},
|
|
323114
|
+
stateTransitions: {
|
|
323115
|
+
terminal: "terminal",
|
|
323116
|
+
transient: "terminal",
|
|
323117
|
+
not_found: "terminal",
|
|
323118
|
+
unknown: "terminal"
|
|
323119
|
+
}
|
|
322937
323120
|
}
|
|
322938
323121
|
],
|
|
322939
323122
|
lite: [
|
|
@@ -322947,7 +323130,7 @@ var DEFAULT_MODEL_CONFIGS = {
|
|
|
322947
323130
|
},
|
|
322948
323131
|
stateTransitions: {
|
|
322949
323132
|
terminal: "terminal",
|
|
322950
|
-
transient: "
|
|
323133
|
+
transient: "terminal",
|
|
322951
323134
|
not_found: "terminal",
|
|
322952
323135
|
unknown: "terminal"
|
|
322953
323136
|
}
|
|
@@ -322962,7 +323145,7 @@ var DEFAULT_MODEL_CONFIGS = {
|
|
|
322962
323145
|
},
|
|
322963
323146
|
stateTransitions: {
|
|
322964
323147
|
terminal: "terminal",
|
|
322965
|
-
transient: "
|
|
323148
|
+
transient: "terminal",
|
|
322966
323149
|
not_found: "terminal",
|
|
322967
323150
|
unknown: "terminal"
|
|
322968
323151
|
}
|
|
@@ -322978,7 +323161,7 @@ var DEFAULT_MODEL_CONFIGS = {
|
|
|
322978
323161
|
},
|
|
322979
323162
|
stateTransitions: {
|
|
322980
323163
|
terminal: "terminal",
|
|
322981
|
-
transient: "
|
|
323164
|
+
transient: "terminal",
|
|
322982
323165
|
not_found: "terminal",
|
|
322983
323166
|
unknown: "terminal"
|
|
322984
323167
|
}
|
|
@@ -331655,6 +331838,7 @@ var McpClientManager = class {
|
|
|
331655
331838
|
Object.keys(extension.mcpServers ?? {}).map((name3) => {
|
|
331656
331839
|
const config2 = this.allServerConfigs.get(name3);
|
|
331657
331840
|
if (config2?.extension?.id === extension.id) {
|
|
331841
|
+
const clientKey = this.getClientKey(name3, config2);
|
|
331658
331842
|
this.allServerConfigs.delete(name3);
|
|
331659
331843
|
const index = this.blockedMcpServers.findIndex(
|
|
331660
331844
|
(s2) => s2.name === name3 && s2.extensionName === extension.name
|
|
@@ -331662,7 +331846,7 @@ var McpClientManager = class {
|
|
|
331662
331846
|
if (index !== -1) {
|
|
331663
331847
|
this.blockedMcpServers.splice(index, 1);
|
|
331664
331848
|
}
|
|
331665
|
-
return this.disconnectClient(
|
|
331849
|
+
return this.disconnectClient(clientKey, true);
|
|
331666
331850
|
}
|
|
331667
331851
|
return Promise.resolve();
|
|
331668
331852
|
})
|
|
@@ -341179,7 +341363,7 @@ var Config = class {
|
|
|
341179
341363
|
if (this.experimentalJitContext && this.memoryContextManager) {
|
|
341180
341364
|
await this.memoryContextManager.refresh();
|
|
341181
341365
|
} else {
|
|
341182
|
-
const { refreshServerHierarchicalMemory: refreshServerHierarchicalMemory2 } = await import("./memoryDiscovery-
|
|
341366
|
+
const { refreshServerHierarchicalMemory: refreshServerHierarchicalMemory2 } = await import("./memoryDiscovery-LIJKMASE.js");
|
|
341183
341367
|
await refreshServerHierarchicalMemory2(this);
|
|
341184
341368
|
}
|
|
341185
341369
|
if (this._geminiClient?.isInitialized()) {
|
|
@@ -342377,7 +342561,7 @@ ${s2.content}`).join("\n\n");
|
|
|
342377
342561
|
|
|
342378
342562
|
// packages/core/src/output/json-formatter.ts
|
|
342379
342563
|
var JsonFormatter = class {
|
|
342380
|
-
format(sessionId, response, stats, error40) {
|
|
342564
|
+
format(sessionId, response, stats, error40, warnings) {
|
|
342381
342565
|
const output = {};
|
|
342382
342566
|
if (sessionId) {
|
|
342383
342567
|
output.session_id = sessionId;
|
|
@@ -342391,6 +342575,9 @@ var JsonFormatter = class {
|
|
|
342391
342575
|
if (error40) {
|
|
342392
342576
|
output.error = error40;
|
|
342393
342577
|
}
|
|
342578
|
+
if (warnings && warnings.length > 0) {
|
|
342579
|
+
output.warnings = warnings.map((w) => stripAnsi(w));
|
|
342580
|
+
}
|
|
342394
342581
|
return JSON.stringify(output, null, 2);
|
|
342395
342582
|
}
|
|
342396
342583
|
formatError(error40, code, sessionId) {
|
|
@@ -350250,7 +350437,7 @@ function translateEvent(event, state) {
|
|
|
350250
350437
|
out2.push(
|
|
350251
350438
|
makeEvent("error", state, {
|
|
350252
350439
|
status: "PERMISSION_DENIED",
|
|
350253
|
-
message:
|
|
350440
|
+
message: event.value.systemMessage?.trim() || event.value.reason,
|
|
350254
350441
|
fatal: false,
|
|
350255
350442
|
_meta: { code: "AGENT_EXECUTION_BLOCKED" }
|
|
350256
350443
|
})
|
|
@@ -359393,6 +359580,7 @@ export {
|
|
|
359393
359580
|
getResponseText,
|
|
359394
359581
|
flatMapTextParts,
|
|
359395
359582
|
appendToLastTextPart,
|
|
359583
|
+
isTextPart2 as isTextPart,
|
|
359396
359584
|
convertToFunctionResponse,
|
|
359397
359585
|
getResponseTextFromParts,
|
|
359398
359586
|
getFunctionCalls,
|
|
@@ -359486,7 +359674,9 @@ export {
|
|
|
359486
359674
|
createConversationOffered,
|
|
359487
359675
|
formatProtoJsonDuration,
|
|
359488
359676
|
ReleaseChannel,
|
|
359677
|
+
RELEASE_CHANNEL_STABILITY,
|
|
359489
359678
|
_clearCache,
|
|
359679
|
+
getChannelFromVersion,
|
|
359490
359680
|
getReleaseChannel,
|
|
359491
359681
|
isNightly,
|
|
359492
359682
|
isPreview,
|