@google/gemini-cli 0.54.0-preview.1 → 0.54.4
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-SBSLQYOV.js → chunk-4YSWDUQZ.js} +1 -1
- package/bundle/{chunk-JIT42EQ2.js → chunk-5NT754WV.js} +1 -1
- package/bundle/{chunk-DIJ6I3G3.js → chunk-6SBXH4D5.js} +1 -1
- package/bundle/{chunk-DPIHBZAT.js → chunk-7ELLCO6U.js} +2 -2
- package/bundle/{chunk-UZMDXL7Q.js → chunk-7SPI3KN6.js} +1 -1
- package/bundle/{chunk-CULEIHKX.js → chunk-B5CTWZND.js} +1 -1
- package/bundle/{chunk-D2EAX3ZX.js → chunk-BCKLMRS4.js} +3 -3
- package/bundle/{chunk-OGXJPYSG.js → chunk-BS6BSLZD.js} +98 -8
- package/bundle/{chunk-AFGG2RPD.js → chunk-D7ZXPN6G.js} +1 -1
- package/bundle/{chunk-K3SJRITH.js → chunk-DFZESNXJ.js} +3 -3
- package/bundle/{chunk-XE7YFMNO.js → chunk-DJWQKPM3.js} +1 -1
- package/bundle/{chunk-PEJMTAMT.js → chunk-FNQ3CHG6.js} +2 -2
- package/bundle/{chunk-RDYXVWPW.js → chunk-GHCTXZXJ.js} +3 -3
- package/bundle/{chunk-FMTFTARW.js → chunk-HX3M7TQG.js} +1 -1
- package/bundle/{chunk-RCBLHUUY.js → chunk-IJK6RPHE.js} +2 -2
- package/bundle/{chunk-SMLDN56O.js → chunk-IX4IHGFA.js} +1 -1
- package/bundle/{chunk-T6U6FIO7.js → chunk-K6DV6ZQJ.js} +1 -1
- package/bundle/{chunk-CVUISPMN.js → chunk-K77W7OAI.js} +2 -2
- package/bundle/{chunk-FXXIWHGQ.js → chunk-NWWVQCEM.js} +1 -1
- package/bundle/{chunk-VA3G5QBP.js → chunk-PGCIAGXU.js} +1 -1
- package/bundle/{chunk-TNVY3HW2.js → chunk-QXLHAGLO.js} +104 -8
- package/bundle/{chunk-525VQXSC.js → chunk-RJSQB7MD.js} +7 -7
- package/bundle/{chunk-MSUXP6KY.js → chunk-TOGB2OXA.js} +7 -7
- package/bundle/{chunk-ZPRVIRJI.js → chunk-TXL73KVK.js} +1 -1
- package/bundle/{chunk-RO4LFQ22.js → chunk-TYAF55F7.js} +98 -8
- package/bundle/{chunk-TTNCL6R2.js → chunk-UWHDOUIM.js} +1 -1
- package/bundle/{chunk-Z62YA2V7.js → chunk-WFY6AHA3.js} +1 -1
- package/bundle/{chunk-IO55T6DE.js → chunk-YFMY6TMN.js} +3 -3
- package/bundle/{chunk-ZHTU5ILJ.js → chunk-YMKYUNCI.js} +98 -8
- package/bundle/{chunk-YDQPFZ2Y.js → chunk-YOVSXRBK.js} +1 -1
- package/bundle/{chunk-IYJYJHOC.js → chunk-ZJ6RWJBB.js} +7 -7
- package/bundle/{chunk-UUIODUV3.js → chunk-ZT7DTH6P.js} +7 -7
- package/bundle/{cleanup-HQV2IFKH.js → cleanup-ID7KOVH6.js} +2 -2
- package/bundle/{cleanup-L5VWLPP4.js → cleanup-IQDM3OQH.js} +2 -2
- package/bundle/{cleanup-XXP2E7MI.js → cleanup-VC5QYANG.js} +2 -2
- package/bundle/{cleanup-ZVT5D3O6.js → cleanup-XKLXHTQY.js} +2 -2
- package/bundle/{core-57QOTUGQ.js → core-L2IMO77B.js} +3 -1
- package/bundle/{devtoolsService-ZSEA3CMZ.js → devtoolsService-A4MVL3QX.js} +2 -2
- package/bundle/{devtoolsService-35UP55Q3.js → devtoolsService-FCZAZ7OL.js} +2 -2
- package/bundle/{devtoolsService-3CR2FLT6.js → devtoolsService-MTKVT52L.js} +2 -2
- package/bundle/{devtoolsService-6ODDI2AX.js → devtoolsService-OFTYP7HA.js} +2 -2
- package/bundle/{dist-47AO7W6O.js → dist-IRKAN2JJ.js} +3 -1
- package/bundle/{dist-H6O2HKLX.js → dist-OMDZCEPS.js} +3 -1
- package/bundle/{dist-OQCDYU7F.js → dist-UPFVI32N.js} +3 -1
- package/bundle/{gemini-UCXGGSBW.js → gemini-A2H7FXLW.js} +14 -14
- package/bundle/{gemini-IDZJKL5P.js → gemini-ANKKRIYC.js} +14 -14
- package/bundle/{gemini-LO7DND33.js → gemini-RXM642S5.js} +14 -14
- package/bundle/{gemini-HAONW54R.js → gemini-TQ4IKPW2.js} +14 -14
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-TRSGHNSO.js → interactiveCli-DCR23VNH.js} +21 -15
- package/bundle/{interactiveCli-6R7JZJ2X.js → interactiveCli-LU4ELYJR.js} +21 -15
- package/bundle/{interactiveCli-3ACLI4L7.js → interactiveCli-MMQJKAMI.js} +21 -15
- package/bundle/{interactiveCli-EHIAN3B3.js → interactiveCli-XFHD4NND.js} +21 -15
- package/bundle/{liteRtServerManager-3VYWFFDR.js → liteRtServerManager-3XISBZSR.js} +4 -4
- package/bundle/{liteRtServerManager-E5CRSVVL.js → liteRtServerManager-AW53PI2D.js} +4 -4
- package/bundle/{liteRtServerManager-VFS4GSUO.js → liteRtServerManager-D6QKXOSW.js} +4 -4
- package/bundle/{liteRtServerManager-XWQ4FJKY.js → liteRtServerManager-PKONORB7.js} +4 -4
- package/bundle/{oauth2-provider-3UXFRSIK.js → oauth2-provider-7KVPKQ4C.js} +1 -1
- package/bundle/{oauth2-provider-54DMURL5.js → oauth2-provider-CU4P6HIT.js} +1 -1
- package/bundle/{oauth2-provider-66YNXHST.js → oauth2-provider-MRWRX5R2.js} +1 -1
- package/bundle/{oauth2-provider-JGXWLD5K.js → oauth2-provider-NQD4RC5Z.js} +1 -1
- package/bundle/{start-2X7CSHIJ.js → start-7U2NBBF2.js} +6 -6
- package/bundle/{start-JT4SJ6FO.js → start-HBTVIGJK.js} +6 -6
- package/bundle/{start-LZJM7TIF.js → start-JQFBJ44Q.js} +6 -6
- package/bundle/{start-YHTESBGR.js → start-KLUMUSR7.js} +6 -6
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5NT754WV.js";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__require
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UWHDOUIM.js";
|
|
5
5
|
import {
|
|
6
6
|
RELEASE_CHANNEL_STABILITY,
|
|
7
7
|
debugLogger,
|
|
8
8
|
getChannelFromVersion,
|
|
9
9
|
isGitRepository
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TYAF55F7.js";
|
|
11
11
|
|
|
12
12
|
// packages/cli/src/utils/installationInfo.ts
|
|
13
13
|
import * as fs from "node:fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NWWVQCEM.js";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__require
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HX3M7TQG.js";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__require
|
|
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
exitCli,
|
|
4
4
|
require_source
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7SPI3KN6.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_PORT,
|
|
8
8
|
SERVER_START_WAIT_MS,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
isServerRunning,
|
|
15
15
|
resolveGemmaConfig,
|
|
16
16
|
writeServerProcessInfo
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-PGCIAGXU.js";
|
|
18
18
|
import {
|
|
19
19
|
debugLogger
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-QXLHAGLO.js";
|
|
21
21
|
import {
|
|
22
22
|
__toESM
|
|
23
23
|
} from "./chunk-34MYV7JD.js";
|
|
@@ -282510,8 +282510,8 @@ function isValidToolName(name3, options = {}) {
|
|
|
282510
282510
|
}
|
|
282511
282511
|
|
|
282512
282512
|
// packages/core/dist/src/generated/git-commit.js
|
|
282513
|
-
var GIT_COMMIT_INFO = "
|
|
282514
|
-
var CLI_VERSION = "0.54.
|
|
282513
|
+
var GIT_COMMIT_INFO = "10944dcc4";
|
|
282514
|
+
var CLI_VERSION = "0.54.1";
|
|
282515
282515
|
|
|
282516
282516
|
// packages/core/dist/src/ide/detect-ide.js
|
|
282517
282517
|
var IDE_DEFINITIONS = {
|
|
@@ -285452,7 +285452,10 @@ var ChatRecordingService = class {
|
|
|
285452
285452
|
}
|
|
285453
285453
|
this.updateMetadata({ sessionId: this.sessionId });
|
|
285454
285454
|
} else {
|
|
285455
|
-
|
|
285455
|
+
debugLogger.warn("Failed to reload resumed session data from file; falling back to the in-memory conversation.");
|
|
285456
|
+
this.cachedConversation = resumedSessionData.conversation;
|
|
285457
|
+
this.projectHash = this.cachedConversation.projectHash;
|
|
285458
|
+
this.rewriteConversationFile(this.cachedConversation);
|
|
285456
285459
|
}
|
|
285457
285460
|
} else {
|
|
285458
285461
|
this.sessionId = this.context.promptId;
|
|
@@ -285522,6 +285525,57 @@ var ChatRecordingService = class {
|
|
|
285522
285525
|
}
|
|
285523
285526
|
}
|
|
285524
285527
|
}
|
|
285528
|
+
/**
|
|
285529
|
+
* Rewrites the session file from an in-memory record. Any existing
|
|
285530
|
+
* (unreadable) file is preserved alongside rather than destroyed, and the
|
|
285531
|
+
* new file is written atomically (temp file + rename).
|
|
285532
|
+
*/
|
|
285533
|
+
rewriteConversationFile(conversation) {
|
|
285534
|
+
if (!this.conversationFile)
|
|
285535
|
+
return;
|
|
285536
|
+
if (this.conversationFile.endsWith(".json")) {
|
|
285537
|
+
this.conversationFile = this.conversationFile + "l";
|
|
285538
|
+
}
|
|
285539
|
+
const { messages, memoryScratchpad, ...metadata2 } = conversation;
|
|
285540
|
+
const lines = [JSON.stringify(metadata2)];
|
|
285541
|
+
for (const msg of messages) {
|
|
285542
|
+
lines.push(JSON.stringify(msg));
|
|
285543
|
+
}
|
|
285544
|
+
if (memoryScratchpad) {
|
|
285545
|
+
lines.push(JSON.stringify({ $set: { memoryScratchpad } }));
|
|
285546
|
+
}
|
|
285547
|
+
const content = lines.join("\n") + "\n";
|
|
285548
|
+
try {
|
|
285549
|
+
fs30.mkdirSync(path27.dirname(this.conversationFile), { recursive: true });
|
|
285550
|
+
if (fs30.existsSync(this.conversationFile)) {
|
|
285551
|
+
const backup = `${this.conversationFile}.unreadable-${Date.now()}`;
|
|
285552
|
+
try {
|
|
285553
|
+
fs30.renameSync(this.conversationFile, backup);
|
|
285554
|
+
debugLogger.warn(`Preserved the unreadable session file at ${backup}.`);
|
|
285555
|
+
} catch (backupError) {
|
|
285556
|
+
debugLogger.error("Failed to preserve the unreadable session file.", backupError);
|
|
285557
|
+
}
|
|
285558
|
+
}
|
|
285559
|
+
const tempFile = `${this.conversationFile}.tmp-${process.pid}`;
|
|
285560
|
+
try {
|
|
285561
|
+
fs30.writeFileSync(tempFile, content);
|
|
285562
|
+
fs30.renameSync(tempFile, this.conversationFile);
|
|
285563
|
+
} catch (error40) {
|
|
285564
|
+
try {
|
|
285565
|
+
fs30.unlinkSync(tempFile);
|
|
285566
|
+
} catch {
|
|
285567
|
+
}
|
|
285568
|
+
throw error40;
|
|
285569
|
+
}
|
|
285570
|
+
} catch (error40) {
|
|
285571
|
+
if (isNodeError(error40) && error40.code === "ENOSPC") {
|
|
285572
|
+
this.conversationFile = null;
|
|
285573
|
+
debugLogger.warn(ENOSPC_WARNING_MESSAGE);
|
|
285574
|
+
} else {
|
|
285575
|
+
throw error40;
|
|
285576
|
+
}
|
|
285577
|
+
}
|
|
285578
|
+
}
|
|
285525
285579
|
updateMetadata(updates) {
|
|
285526
285580
|
if (!this.cachedConversation)
|
|
285527
285581
|
return;
|
|
@@ -305720,7 +305774,7 @@ function getVersion() {
|
|
|
305720
305774
|
}
|
|
305721
305775
|
versionPromise = (async () => {
|
|
305722
305776
|
const pkgJson = await getPackageJson(__dirname4);
|
|
305723
|
-
return "0.54.
|
|
305777
|
+
return "0.54.1";
|
|
305724
305778
|
})();
|
|
305725
305779
|
return versionPromise;
|
|
305726
305780
|
}
|
|
@@ -330272,6 +330326,7 @@ var MID_STREAM_RETRY_OPTIONS = {
|
|
|
330272
330326
|
useExponentialBackoff: true
|
|
330273
330327
|
};
|
|
330274
330328
|
var SYNTHETIC_THOUGHT_SIGNATURE2 = "skip_thought_signature_validator";
|
|
330329
|
+
var INTERRUPTED_RESPONSE_PLACEHOLDER = "[The previous response was interrupted before it completed.]";
|
|
330275
330330
|
function isIndexedPart(part) {
|
|
330276
330331
|
return "callIndex" in part;
|
|
330277
330332
|
}
|
|
@@ -330456,6 +330511,9 @@ var GeminiChat = class {
|
|
|
330456
330511
|
this.sendPromise = streamDonePromise;
|
|
330457
330512
|
let userContent = createUserContent(message);
|
|
330458
330513
|
const isOriginalFunctionResponse = isFunctionResponse(userContent);
|
|
330514
|
+
if (!isOriginalFunctionResponse) {
|
|
330515
|
+
this.closeUnansweredToolResponseTurn();
|
|
330516
|
+
}
|
|
330459
330517
|
const { model } = this.context.config.modelConfigService.getResolvedConfig(modelConfigKey);
|
|
330460
330518
|
const isContextManagementEnabled = this.context.config.isContextManagementEnabled();
|
|
330461
330519
|
if (!isOriginalFunctionResponse) {
|
|
@@ -330623,6 +330681,24 @@ var GeminiChat = class {
|
|
|
330623
330681
|
};
|
|
330624
330682
|
return streamWithRetries.call(this);
|
|
330625
330683
|
}
|
|
330684
|
+
/**
|
|
330685
|
+
* Appends a closing model turn when history ends with an unanswered tool
|
|
330686
|
+
* response, so the next user message stays a turn of its own.
|
|
330687
|
+
*/
|
|
330688
|
+
closeUnansweredToolResponseTurn() {
|
|
330689
|
+
const turns = this.agentHistory.get();
|
|
330690
|
+
const last2 = turns[turns.length - 1];
|
|
330691
|
+
if (last2?.content.role !== "user" || !last2.content.parts?.some((part) => !!part.functionResponse)) {
|
|
330692
|
+
return;
|
|
330693
|
+
}
|
|
330694
|
+
this.agentHistory.push({
|
|
330695
|
+
id: randomUUID6(),
|
|
330696
|
+
content: {
|
|
330697
|
+
role: "model",
|
|
330698
|
+
parts: [{ text: INTERRUPTED_RESPONSE_PLACEHOLDER }]
|
|
330699
|
+
}
|
|
330700
|
+
});
|
|
330701
|
+
}
|
|
330626
330702
|
extractBinaryInjections(parts2) {
|
|
330627
330703
|
const binaryParts = [];
|
|
330628
330704
|
if (parts2) {
|
|
@@ -331249,11 +331325,24 @@ function stripThoughts2(history) {
|
|
|
331249
331325
|
if (!hasThought)
|
|
331250
331326
|
return turn;
|
|
331251
331327
|
const nonThoughtParts = turn.content.parts.filter((p) => p && !p.thought);
|
|
331328
|
+
let patchedFirstCall = false;
|
|
331329
|
+
const finalParts = turn.content.role === "model" ? nonThoughtParts.map((p) => {
|
|
331330
|
+
if (!patchedFirstCall && p.functionCall) {
|
|
331331
|
+
patchedFirstCall = true;
|
|
331332
|
+
if (!p.thoughtSignature) {
|
|
331333
|
+
return {
|
|
331334
|
+
...p,
|
|
331335
|
+
thoughtSignature: SYNTHETIC_THOUGHT_SIGNATURE2
|
|
331336
|
+
};
|
|
331337
|
+
}
|
|
331338
|
+
}
|
|
331339
|
+
return p;
|
|
331340
|
+
}) : nonThoughtParts;
|
|
331252
331341
|
return {
|
|
331253
331342
|
...turn,
|
|
331254
331343
|
content: {
|
|
331255
331344
|
...turn.content,
|
|
331256
|
-
parts:
|
|
331345
|
+
parts: finalParts
|
|
331257
331346
|
}
|
|
331258
331347
|
};
|
|
331259
331348
|
}).filter((turn) => !turn.content.parts || turn.content.parts.length > 0);
|
|
@@ -338405,7 +338494,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
|
|
|
338405
338494
|
return provider;
|
|
338406
338495
|
}
|
|
338407
338496
|
case "oauth2": {
|
|
338408
|
-
const { OAuth2AuthProvider } = await import("./oauth2-provider-
|
|
338497
|
+
const { OAuth2AuthProvider } = await import("./oauth2-provider-CU4P6HIT.js");
|
|
338409
338498
|
const provider = new OAuth2AuthProvider(authConfig, options.agentName ?? "unknown", agentCard, options.agentCardUrl);
|
|
338410
338499
|
await provider.initialize();
|
|
338411
338500
|
return provider;
|
|
@@ -391822,7 +391911,7 @@ var validateSerializable = (newContents) => {
|
|
|
391822
391911
|
};
|
|
391823
391912
|
|
|
391824
391913
|
// node_modules/execa/lib/io/output-sync.js
|
|
391825
|
-
import { writeFileSync as
|
|
391914
|
+
import { writeFileSync as writeFileSync5, appendFileSync as appendFileSync4 } from "node:fs";
|
|
391826
391915
|
|
|
391827
391916
|
// node_modules/execa/lib/verbose/output.js
|
|
391828
391917
|
var shouldLogOutput = ({ stdioItems, encoding, verboseInfo, fdNumber }) => fdNumber !== "all" && isFullVerbose(verboseInfo, fdNumber) && !BINARY_ENCODINGS.has(encoding) && fdUsesVerbose(fdNumber) && (stdioItems.some(({ type: type2, value }) => type2 === "native" && PIPED_STDIO_VALUES.has(value)) || stdioItems.every(({ type: type2 }) => TRANSFORM_TYPES.has(type2)));
|
|
@@ -391949,7 +392038,7 @@ var writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
|
391949
392038
|
appendFileSync4(path113, serializedResult);
|
|
391950
392039
|
} else {
|
|
391951
392040
|
outputFiles.add(pathString);
|
|
391952
|
-
|
|
392041
|
+
writeFileSync5(path113, serializedResult);
|
|
391953
392042
|
}
|
|
391954
392043
|
}
|
|
391955
392044
|
};
|
|
@@ -396116,6 +396205,7 @@ export {
|
|
|
396116
396205
|
isCompletedAskUserTool,
|
|
396117
396206
|
StreamEventType,
|
|
396118
396207
|
SYNTHETIC_THOUGHT_SIGNATURE2 as SYNTHETIC_THOUGHT_SIGNATURE,
|
|
396208
|
+
INTERRUPTED_RESPONSE_PLACEHOLDER,
|
|
396119
396209
|
isValidNonThoughtTextPart,
|
|
396120
396210
|
InvalidStreamError,
|
|
396121
396211
|
AgentExecutionStoppedError,
|
|
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
exitCli,
|
|
4
4
|
require_source
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4YSWDUQZ.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_PORT,
|
|
8
8
|
SERVER_START_WAIT_MS,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
isServerRunning,
|
|
15
15
|
resolveGemmaConfig,
|
|
16
16
|
writeServerProcessInfo
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-D7ZXPN6G.js";
|
|
18
18
|
import {
|
|
19
19
|
debugLogger
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BS6BSLZD.js";
|
|
21
21
|
import {
|
|
22
22
|
__toESM
|
|
23
23
|
} from "./chunk-34MYV7JD.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UWHDOUIM.js";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__require
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NWWVQCEM.js";
|
|
5
5
|
import {
|
|
6
6
|
RELEASE_CHANNEL_STABILITY,
|
|
7
7
|
debugLogger,
|
|
8
8
|
getChannelFromVersion,
|
|
9
9
|
isGitRepository
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QXLHAGLO.js";
|
|
11
11
|
|
|
12
12
|
// packages/cli/src/utils/installationInfo.ts
|
|
13
13
|
import * as fs from "node:fs";
|
|
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
exitCli,
|
|
4
4
|
require_source
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DJWQKPM3.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_PORT,
|
|
8
8
|
SERVER_START_WAIT_MS,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
isServerRunning,
|
|
15
15
|
resolveGemmaConfig,
|
|
16
16
|
writeServerProcessInfo
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6SBXH4D5.js";
|
|
18
18
|
import {
|
|
19
19
|
debugLogger
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-TYAF55F7.js";
|
|
21
21
|
import {
|
|
22
22
|
__toESM
|
|
23
23
|
} from "./chunk-34MYV7JD.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5NT754WV.js";
|
|
5
5
|
import {
|
|
6
6
|
RELEASE_CHANNEL_STABILITY,
|
|
7
7
|
debugLogger,
|
|
8
8
|
getChannelFromVersion,
|
|
9
9
|
isGitRepository
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BS6BSLZD.js";
|
|
11
11
|
|
|
12
12
|
// packages/cli/src/utils/installationInfo.ts
|
|
13
13
|
import * as fs from "node:fs";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HX3M7TQG.js";
|
|
5
5
|
import {
|
|
6
6
|
RELEASE_CHANNEL_STABILITY,
|
|
7
7
|
debugLogger,
|
|
8
8
|
getChannelFromVersion,
|
|
9
9
|
isGitRepository
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YMKYUNCI.js";
|
|
11
11
|
|
|
12
12
|
// packages/cli/src/utils/installationInfo.ts
|
|
13
13
|
import * as fs from "node:fs";
|
|
@@ -282784,8 +282784,8 @@ function isValidToolName(name3, options = {}) {
|
|
|
282784
282784
|
}
|
|
282785
282785
|
|
|
282786
282786
|
// packages/core/src/generated/git-commit.ts
|
|
282787
|
-
var GIT_COMMIT_INFO = "
|
|
282788
|
-
var CLI_VERSION = "0.54.
|
|
282787
|
+
var GIT_COMMIT_INFO = "10944dcc4";
|
|
282788
|
+
var CLI_VERSION = "0.54.1";
|
|
282789
282789
|
|
|
282790
282790
|
// packages/core/src/ide/detect-ide.ts
|
|
282791
282791
|
var IDE_DEFINITIONS = {
|
|
@@ -285791,7 +285791,12 @@ var ChatRecordingService = class {
|
|
|
285791
285791
|
}
|
|
285792
285792
|
this.updateMetadata({ sessionId: this.sessionId });
|
|
285793
285793
|
} else {
|
|
285794
|
-
|
|
285794
|
+
debugLogger.warn(
|
|
285795
|
+
"Failed to reload resumed session data from file; falling back to the in-memory conversation."
|
|
285796
|
+
);
|
|
285797
|
+
this.cachedConversation = resumedSessionData.conversation;
|
|
285798
|
+
this.projectHash = this.cachedConversation.projectHash;
|
|
285799
|
+
this.rewriteConversationFile(this.cachedConversation);
|
|
285795
285800
|
}
|
|
285796
285801
|
} else {
|
|
285797
285802
|
this.sessionId = this.context.promptId;
|
|
@@ -285872,6 +285877,61 @@ var ChatRecordingService = class {
|
|
|
285872
285877
|
}
|
|
285873
285878
|
}
|
|
285874
285879
|
}
|
|
285880
|
+
/**
|
|
285881
|
+
* Rewrites the session file from an in-memory record. Any existing
|
|
285882
|
+
* (unreadable) file is preserved alongside rather than destroyed, and the
|
|
285883
|
+
* new file is written atomically (temp file + rename).
|
|
285884
|
+
*/
|
|
285885
|
+
rewriteConversationFile(conversation) {
|
|
285886
|
+
if (!this.conversationFile) return;
|
|
285887
|
+
if (this.conversationFile.endsWith(".json")) {
|
|
285888
|
+
this.conversationFile = this.conversationFile + "l";
|
|
285889
|
+
}
|
|
285890
|
+
const { messages, memoryScratchpad, ...metadata2 } = conversation;
|
|
285891
|
+
const lines = [JSON.stringify(metadata2)];
|
|
285892
|
+
for (const msg of messages) {
|
|
285893
|
+
lines.push(JSON.stringify(msg));
|
|
285894
|
+
}
|
|
285895
|
+
if (memoryScratchpad) {
|
|
285896
|
+
lines.push(JSON.stringify({ $set: { memoryScratchpad } }));
|
|
285897
|
+
}
|
|
285898
|
+
const content = lines.join("\n") + "\n";
|
|
285899
|
+
try {
|
|
285900
|
+
fs30.mkdirSync(path27.dirname(this.conversationFile), { recursive: true });
|
|
285901
|
+
if (fs30.existsSync(this.conversationFile)) {
|
|
285902
|
+
const backup = `${this.conversationFile}.unreadable-${Date.now()}`;
|
|
285903
|
+
try {
|
|
285904
|
+
fs30.renameSync(this.conversationFile, backup);
|
|
285905
|
+
debugLogger.warn(
|
|
285906
|
+
`Preserved the unreadable session file at ${backup}.`
|
|
285907
|
+
);
|
|
285908
|
+
} catch (backupError) {
|
|
285909
|
+
debugLogger.error(
|
|
285910
|
+
"Failed to preserve the unreadable session file.",
|
|
285911
|
+
backupError
|
|
285912
|
+
);
|
|
285913
|
+
}
|
|
285914
|
+
}
|
|
285915
|
+
const tempFile = `${this.conversationFile}.tmp-${process.pid}`;
|
|
285916
|
+
try {
|
|
285917
|
+
fs30.writeFileSync(tempFile, content);
|
|
285918
|
+
fs30.renameSync(tempFile, this.conversationFile);
|
|
285919
|
+
} catch (error40) {
|
|
285920
|
+
try {
|
|
285921
|
+
fs30.unlinkSync(tempFile);
|
|
285922
|
+
} catch {
|
|
285923
|
+
}
|
|
285924
|
+
throw error40;
|
|
285925
|
+
}
|
|
285926
|
+
} catch (error40) {
|
|
285927
|
+
if (isNodeError(error40) && error40.code === "ENOSPC") {
|
|
285928
|
+
this.conversationFile = null;
|
|
285929
|
+
debugLogger.warn(ENOSPC_WARNING_MESSAGE);
|
|
285930
|
+
} else {
|
|
285931
|
+
throw error40;
|
|
285932
|
+
}
|
|
285933
|
+
}
|
|
285934
|
+
}
|
|
285875
285935
|
updateMetadata(updates) {
|
|
285876
285936
|
if (!this.cachedConversation) return;
|
|
285877
285937
|
Object.assign(this.cachedConversation, updates);
|
|
@@ -306307,7 +306367,7 @@ function getVersion() {
|
|
|
306307
306367
|
}
|
|
306308
306368
|
versionPromise = (async () => {
|
|
306309
306369
|
const pkgJson = await getPackageJson(__dirname4);
|
|
306310
|
-
return "0.54.
|
|
306370
|
+
return "0.54.1";
|
|
306311
306371
|
})();
|
|
306312
306372
|
return versionPromise;
|
|
306313
306373
|
}
|
|
@@ -332516,6 +332576,7 @@ var MID_STREAM_RETRY_OPTIONS = {
|
|
|
332516
332576
|
useExponentialBackoff: true
|
|
332517
332577
|
};
|
|
332518
332578
|
var SYNTHETIC_THOUGHT_SIGNATURE2 = "skip_thought_signature_validator";
|
|
332579
|
+
var INTERRUPTED_RESPONSE_PLACEHOLDER = "[The previous response was interrupted before it completed.]";
|
|
332519
332580
|
function isIndexedPart(part) {
|
|
332520
332581
|
return "callIndex" in part;
|
|
332521
332582
|
}
|
|
@@ -332699,6 +332760,9 @@ var GeminiChat = class {
|
|
|
332699
332760
|
this.sendPromise = streamDonePromise;
|
|
332700
332761
|
let userContent = createUserContent(message);
|
|
332701
332762
|
const isOriginalFunctionResponse = isFunctionResponse(userContent);
|
|
332763
|
+
if (!isOriginalFunctionResponse) {
|
|
332764
|
+
this.closeUnansweredToolResponseTurn();
|
|
332765
|
+
}
|
|
332702
332766
|
const { model } = this.context.config.modelConfigService.getResolvedConfig(modelConfigKey);
|
|
332703
332767
|
const isContextManagementEnabled = this.context.config.isContextManagementEnabled();
|
|
332704
332768
|
if (!isOriginalFunctionResponse) {
|
|
@@ -332904,6 +332968,24 @@ var GeminiChat = class {
|
|
|
332904
332968
|
};
|
|
332905
332969
|
return streamWithRetries.call(this);
|
|
332906
332970
|
}
|
|
332971
|
+
/**
|
|
332972
|
+
* Appends a closing model turn when history ends with an unanswered tool
|
|
332973
|
+
* response, so the next user message stays a turn of its own.
|
|
332974
|
+
*/
|
|
332975
|
+
closeUnansweredToolResponseTurn() {
|
|
332976
|
+
const turns = this.agentHistory.get();
|
|
332977
|
+
const last2 = turns[turns.length - 1];
|
|
332978
|
+
if (last2?.content.role !== "user" || !last2.content.parts?.some((part) => !!part.functionResponse)) {
|
|
332979
|
+
return;
|
|
332980
|
+
}
|
|
332981
|
+
this.agentHistory.push({
|
|
332982
|
+
id: randomUUID6(),
|
|
332983
|
+
content: {
|
|
332984
|
+
role: "model",
|
|
332985
|
+
parts: [{ text: INTERRUPTED_RESPONSE_PLACEHOLDER }]
|
|
332986
|
+
}
|
|
332987
|
+
});
|
|
332988
|
+
}
|
|
332907
332989
|
extractBinaryInjections(parts2) {
|
|
332908
332990
|
const binaryParts = [];
|
|
332909
332991
|
if (parts2) {
|
|
@@ -333628,11 +333710,24 @@ function stripThoughts2(history) {
|
|
|
333628
333710
|
const hasThought = turn.content.parts.some((p) => p && p.thought);
|
|
333629
333711
|
if (!hasThought) return turn;
|
|
333630
333712
|
const nonThoughtParts = turn.content.parts.filter((p) => p && !p.thought);
|
|
333713
|
+
let patchedFirstCall = false;
|
|
333714
|
+
const finalParts = turn.content.role === "model" ? nonThoughtParts.map((p) => {
|
|
333715
|
+
if (!patchedFirstCall && p.functionCall) {
|
|
333716
|
+
patchedFirstCall = true;
|
|
333717
|
+
if (!p.thoughtSignature) {
|
|
333718
|
+
return {
|
|
333719
|
+
...p,
|
|
333720
|
+
thoughtSignature: SYNTHETIC_THOUGHT_SIGNATURE2
|
|
333721
|
+
};
|
|
333722
|
+
}
|
|
333723
|
+
}
|
|
333724
|
+
return p;
|
|
333725
|
+
}) : nonThoughtParts;
|
|
333631
333726
|
return {
|
|
333632
333727
|
...turn,
|
|
333633
333728
|
content: {
|
|
333634
333729
|
...turn.content,
|
|
333635
|
-
parts:
|
|
333730
|
+
parts: finalParts
|
|
333636
333731
|
}
|
|
333637
333732
|
};
|
|
333638
333733
|
}).filter((turn) => !turn.content.parts || turn.content.parts.length > 0);
|
|
@@ -341074,7 +341169,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
|
|
|
341074
341169
|
return provider;
|
|
341075
341170
|
}
|
|
341076
341171
|
case "oauth2": {
|
|
341077
|
-
const { OAuth2AuthProvider } = await import("./oauth2-provider-
|
|
341172
|
+
const { OAuth2AuthProvider } = await import("./oauth2-provider-MRWRX5R2.js");
|
|
341078
341173
|
const provider = new OAuth2AuthProvider(
|
|
341079
341174
|
authConfig,
|
|
341080
341175
|
options.agentName ?? "unknown",
|
|
@@ -398387,7 +398482,7 @@ var validateSerializable = (newContents) => {
|
|
|
398387
398482
|
};
|
|
398388
398483
|
|
|
398389
398484
|
// node_modules/execa/lib/io/output-sync.js
|
|
398390
|
-
import { writeFileSync as
|
|
398485
|
+
import { writeFileSync as writeFileSync5, appendFileSync as appendFileSync4 } from "node:fs";
|
|
398391
398486
|
|
|
398392
398487
|
// node_modules/execa/lib/verbose/output.js
|
|
398393
398488
|
var shouldLogOutput = ({ stdioItems, encoding, verboseInfo, fdNumber }) => fdNumber !== "all" && isFullVerbose(verboseInfo, fdNumber) && !BINARY_ENCODINGS.has(encoding) && fdUsesVerbose(fdNumber) && (stdioItems.some(({ type: type2, value }) => type2 === "native" && PIPED_STDIO_VALUES.has(value)) || stdioItems.every(({ type: type2 }) => TRANSFORM_TYPES.has(type2)));
|
|
@@ -398514,7 +398609,7 @@ var writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
|
398514
398609
|
appendFileSync4(path113, serializedResult);
|
|
398515
398610
|
} else {
|
|
398516
398611
|
outputFiles.add(pathString);
|
|
398517
|
-
|
|
398612
|
+
writeFileSync5(path113, serializedResult);
|
|
398518
398613
|
}
|
|
398519
398614
|
}
|
|
398520
398615
|
};
|
|
@@ -402753,6 +402848,7 @@ export {
|
|
|
402753
402848
|
isCompletedAskUserTool,
|
|
402754
402849
|
StreamEventType,
|
|
402755
402850
|
SYNTHETIC_THOUGHT_SIGNATURE2 as SYNTHETIC_THOUGHT_SIGNATURE,
|
|
402851
|
+
INTERRUPTED_RESPONSE_PLACEHOLDER,
|
|
402756
402852
|
isValidNonThoughtTextPart,
|
|
402757
402853
|
InvalidStreamError,
|
|
402758
402854
|
AgentExecutionStoppedError,
|