@google/gemini-cli 0.53.0-preview.0 → 0.54.0-nightly.20260727.g3818efbbf
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-XH7QC2TB.js → chunk-466R4OXK.js} +2 -2
- package/bundle/{chunk-7VUO7T2C.js → chunk-5IDNNCKI.js} +3 -3
- package/bundle/{chunk-QSTUV3QH.js → chunk-6FGJ26XP.js} +7 -7
- package/bundle/{chunk-PLMRBJEA.js → chunk-6FQUF3NB.js} +2 -2
- package/bundle/{chunk-SLQKIE73.js → chunk-AWEYEUHO.js} +1 -1
- package/bundle/{chunk-SXKIOLLX.js → chunk-BGQD2QOL.js} +7 -7
- package/bundle/{chunk-5RDOS7UZ.js → chunk-CPK5WFFK.js} +105 -69
- package/bundle/{chunk-UEI42N7R.js → chunk-DJN5ASV2.js} +3 -3
- package/bundle/{chunk-PVCJCQWY.js → chunk-DLH2UGEO.js} +1 -1
- package/bundle/{chunk-LUM47MYE.js → chunk-DZDRGXE7.js} +1 -1
- package/bundle/{chunk-HF533LET.js → chunk-ECJRPVVC.js} +7699 -14271
- package/bundle/{chunk-4OVORMGE.js → chunk-HSJEGTD3.js} +1 -1
- package/bundle/{chunk-27C6XFMY.js → chunk-ISVXSEBZ.js} +105 -69
- package/bundle/{chunk-BX6DTJOD.js → chunk-JFK64ABJ.js} +1 -1
- package/bundle/{chunk-BRZT2CQU.js → chunk-JFMN3NMH.js} +1 -1
- package/bundle/{chunk-6AD4A2WF.js → chunk-KJNJ3QIT.js} +8 -5
- package/bundle/{chunk-HVYOZEAP.js → chunk-MGBX554B.js} +3 -3
- package/bundle/{chunk-CTNBR234.js → chunk-NNV4Z6XR.js} +2 -2
- package/bundle/{chunk-IODN6H35.js → chunk-NPRNIWWX.js} +1 -1
- package/bundle/chunk-OEJGR4OM.js +396934 -0
- package/bundle/chunk-OFBUSMXT.js +118 -0
- package/bundle/chunk-ORA2PDIL.js +17332 -0
- package/bundle/{chunk-UJVAPQ7V.js → chunk-PHD2HIVW.js} +1 -1
- package/bundle/{chunk-BDSSP5BZ.js → chunk-QG7OFP4D.js} +1 -1
- package/bundle/chunk-QGDYKVWX.js +1571 -0
- package/bundle/chunk-REN6UR5J.js +398 -0
- package/bundle/{chunk-PKFZO3SN.js → chunk-RM2K5H4S.js} +1 -1
- package/bundle/{chunk-GHVD6PXK.js → chunk-SUGVZSZP.js} +9 -8
- package/bundle/{chunk-WVDR5L2V.js → chunk-TQ3DG6NP.js} +67 -54
- package/bundle/chunk-UK6PXCXN.js +154 -0
- package/bundle/chunk-VSNWZ6EN.js +512 -0
- package/bundle/chunk-XUMLHXHF.js +102505 -0
- package/bundle/{cleanup-4FVUYQ7H.js → cleanup-EMIXJXP4.js} +2 -2
- package/bundle/{cleanup-XETKRH7X.js → cleanup-IA6XG6SC.js} +2 -2
- package/bundle/{cleanup-ZR34H2GU.js → cleanup-QIBIT7JQ.js} +2 -2
- package/bundle/cleanup-YQH2S5EG.js +32 -0
- package/bundle/{core-PVG4D2MR.js → core-UHW46BQ2.js} +3 -1
- package/bundle/{devtoolsService-OUX7PWP3.js → devtoolsService-6SDZCTRP.js} +2 -2
- package/bundle/{devtoolsService-IVPTF5ZJ.js → devtoolsService-7KPRZCZM.js} +2 -2
- package/bundle/{devtoolsService-QYDPHHFN.js → devtoolsService-F7ASQSK7.js} +4 -3
- package/bundle/devtoolsService-XKABGMO6.js +4359 -0
- package/bundle/{dist-PRJQFPSQ.js → dist-756SYAPF.js} +3 -1
- package/bundle/{core-I73XKBPY.js → dist-ONOKSR3P.js} +3 -1
- package/bundle/dist-Y4VJWSZD.js +2156 -0
- package/bundle/docs/changelogs/index.md +20 -0
- package/bundle/docs/changelogs/latest.md +53 -18
- package/bundle/docs/changelogs/preview.md +35 -46
- package/bundle/{gemini-LA6TNI44.js → gemini-2NIRSAT7.js} +14 -14
- package/bundle/{gemini-QKB55UV6.js → gemini-DXOB6GF4.js} +212 -196
- package/bundle/{gemini-E2E3U6PR.js → gemini-VBI43GZ4.js} +14 -14
- package/bundle/gemini-VNJSIRD3.js +16427 -0
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-FS3OVPXQ.js → interactiveCli-7CJ3QII7.js} +8 -8
- package/bundle/{interactiveCli-OD2LO24X.js → interactiveCli-J27JH7NJ.js} +8 -8
- package/bundle/{interactiveCli-ADLAWPXN.js → interactiveCli-NPEBWIDC.js} +315 -296
- package/bundle/interactiveCli-XKYOQGP5.js +34816 -0
- package/bundle/{liteRtServerManager-O7PFOUFD.js → liteRtServerManager-ADM43JXF.js} +4 -4
- package/bundle/{liteRtServerManager-T2Z3RLS3.js → liteRtServerManager-GJ75LD6Q.js} +4 -4
- package/bundle/{liteRtServerManager-3SKK7MNE.js → liteRtServerManager-L72IJLSL.js} +4 -4
- package/bundle/liteRtServerManager-NRGCTYJQ.js +65 -0
- package/bundle/{oauth2-provider-Q433RA6I.js → oauth2-provider-3THMIWTP.js} +1 -1
- package/bundle/{oauth2-provider-E3S5DGLL.js → oauth2-provider-EJQVJV5M.js} +1 -1
- package/bundle/{oauth2-provider-DFVE3NYF.js → oauth2-provider-EOXEHSLW.js} +38 -72
- package/bundle/oauth2-provider-TZOUW4Q5.js +235 -0
- package/bundle/{start-5G2UDZZ6.js → start-A4ZY5O7I.js} +6 -6
- package/bundle/{start-XMJ23QZN.js → start-BCDWTEXB.js} +6 -6
- package/bundle/{start-3FPYJBRX.js → start-GCMULBVZ.js} +6 -6
- package/bundle/start-R674O2XI.js +18 -0
- 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-RM2K5H4S.js";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__require
|
|
@@ -282763,8 +282763,8 @@ function isValidToolName(name3, options = {}) {
|
|
|
282763
282763
|
}
|
|
282764
282764
|
|
|
282765
282765
|
// packages/core/src/generated/git-commit.ts
|
|
282766
|
-
var GIT_COMMIT_INFO = "
|
|
282767
|
-
var CLI_VERSION = "0.
|
|
282766
|
+
var GIT_COMMIT_INFO = "3818efbbf";
|
|
282767
|
+
var CLI_VERSION = "0.54.0-nightly.20260722.gf743ab579";
|
|
282768
282768
|
|
|
282769
282769
|
// packages/core/src/ide/detect-ide.ts
|
|
282770
282770
|
var IDE_DEFINITIONS = {
|
|
@@ -306258,7 +306258,7 @@ function getVersion() {
|
|
|
306258
306258
|
}
|
|
306259
306259
|
versionPromise = (async () => {
|
|
306260
306260
|
const pkgJson = await getPackageJson(__dirname4);
|
|
306261
|
-
return "0.
|
|
306261
|
+
return "0.54.0-nightly.20260722.gf743ab579";
|
|
306262
306262
|
})();
|
|
306263
306263
|
return versionPromise;
|
|
306264
306264
|
}
|
|
@@ -306777,6 +306777,12 @@ ${errorMessage}`,
|
|
|
306777
306777
|
// packages/core/src/utils/llm-edit-fixer.ts
|
|
306778
306778
|
import { createHash as createHash5 } from "node:crypto";
|
|
306779
306779
|
|
|
306780
|
+
// packages/core/src/utils/session.ts
|
|
306781
|
+
import { randomUUID as randomUUID5 } from "node:crypto";
|
|
306782
|
+
function createSessionId() {
|
|
306783
|
+
return randomUUID5();
|
|
306784
|
+
}
|
|
306785
|
+
|
|
306780
306786
|
// packages/core/src/utils/secure-browser-launcher.ts
|
|
306781
306787
|
import { execFile as execFile6 } from "node:child_process";
|
|
306782
306788
|
import { promisify as promisify7 } from "node:util";
|
|
@@ -307597,6 +307603,7 @@ async function handleUpgrade() {
|
|
|
307597
307603
|
async function processIntent(config2, intent, fallbackModel, failedModel) {
|
|
307598
307604
|
switch (intent) {
|
|
307599
307605
|
case "retry_always":
|
|
307606
|
+
config2.rotateSessionId(createSessionId());
|
|
307600
307607
|
config2.activateFallbackMode(fallbackModel, failedModel);
|
|
307601
307608
|
return true;
|
|
307602
307609
|
case "retry_once":
|
|
@@ -310516,6 +310523,9 @@ var CodeAssistServer = class {
|
|
|
310516
310523
|
this.paidTier = paidTier;
|
|
310517
310524
|
this.config = config2;
|
|
310518
310525
|
}
|
|
310526
|
+
getEffectiveSessionId() {
|
|
310527
|
+
return this.config?.getSessionId() ?? this.sessionId;
|
|
310528
|
+
}
|
|
310519
310529
|
async generateContentStream(req, userPromptId, role) {
|
|
310520
310530
|
const autoUse = this.config ? shouldAutoUseCredits(
|
|
310521
310531
|
this.config.getBillingSettings().overageStrategy,
|
|
@@ -310534,7 +310544,7 @@ var CodeAssistServer = class {
|
|
|
310534
310544
|
req,
|
|
310535
310545
|
userPromptId,
|
|
310536
310546
|
this.projectId,
|
|
310537
|
-
this.
|
|
310547
|
+
this.getEffectiveSessionId(),
|
|
310538
310548
|
enabledCreditTypes
|
|
310539
310549
|
),
|
|
310540
310550
|
req.config?.abortSignal
|
|
@@ -310562,7 +310572,7 @@ var CodeAssistServer = class {
|
|
|
310562
310572
|
translatedResponse,
|
|
310563
310573
|
streamingLatency,
|
|
310564
310574
|
req.config?.abortSignal,
|
|
310565
|
-
server.
|
|
310575
|
+
server.getEffectiveSessionId()
|
|
310566
310576
|
// Use sessionId as trajectoryId
|
|
310567
310577
|
);
|
|
310568
310578
|
if (response.consumedCredits) {
|
|
@@ -310603,7 +310613,7 @@ var CodeAssistServer = class {
|
|
|
310603
310613
|
req,
|
|
310604
310614
|
userPromptId,
|
|
310605
310615
|
this.projectId,
|
|
310606
|
-
this.
|
|
310616
|
+
this.getEffectiveSessionId(),
|
|
310607
310617
|
void 0
|
|
310608
310618
|
),
|
|
310609
310619
|
req.config?.abortSignal,
|
|
@@ -310621,7 +310631,7 @@ var CodeAssistServer = class {
|
|
|
310621
310631
|
translatedResponse,
|
|
310622
310632
|
streamingLatency,
|
|
310623
310633
|
req.config?.abortSignal,
|
|
310624
|
-
this.
|
|
310634
|
+
this.getEffectiveSessionId()
|
|
310625
310635
|
// Use sessionId as trajectoryId
|
|
310626
310636
|
);
|
|
310627
310637
|
if (response.remainingCredits) {
|
|
@@ -332078,10 +332088,10 @@ var TopicState = class {
|
|
|
332078
332088
|
};
|
|
332079
332089
|
|
|
332080
332090
|
// packages/core/src/agents/local-executor.ts
|
|
332081
|
-
import { randomUUID as
|
|
332091
|
+
import { randomUUID as randomUUID13 } from "node:crypto";
|
|
332082
332092
|
|
|
332083
332093
|
// packages/core/src/core/geminiChat.ts
|
|
332084
|
-
import { randomUUID as
|
|
332094
|
+
import { randomUUID as randomUUID6 } from "node:crypto";
|
|
332085
332095
|
|
|
332086
332096
|
// packages/core/src/utils/messageInspectors.ts
|
|
332087
332097
|
function isFunctionResponse(content) {
|
|
@@ -332548,7 +332558,7 @@ var GeminiChat = class {
|
|
|
332548
332558
|
let initialHistory;
|
|
332549
332559
|
if (history.length > 0) {
|
|
332550
332560
|
initialHistory = history.map(
|
|
332551
|
-
(item) => "id" in item && "content" in item ? item : { id:
|
|
332561
|
+
(item) => "id" in item && "content" in item ? item : { id: randomUUID6(), content: item }
|
|
332552
332562
|
);
|
|
332553
332563
|
} else if (resumedSessionData) {
|
|
332554
332564
|
initialHistory = resumedSessionData.conversation.messages.filter((m) => m.type === "user" || m.type === "gemini").map((m) => ({
|
|
@@ -332892,7 +332902,7 @@ var GeminiChat = class {
|
|
|
332892
332902
|
tools: this.tools,
|
|
332893
332903
|
abortSignal
|
|
332894
332904
|
};
|
|
332895
|
-
let contentsToUse = supportsModernFeatures(modelToUse) ? [...contentsForPreviewModel] : [...requestContents];
|
|
332905
|
+
let contentsToUse = supportsModernFeatures(modelToUse) || isGemini2Model(modelToUse) ? [...contentsForPreviewModel] : [...requestContents];
|
|
332896
332906
|
const hookSystem = this.context.config.getHookSystem();
|
|
332897
332907
|
if (hookSystem) {
|
|
332898
332908
|
const beforeModelResult = await hookSystem.fireBeforeModelEvent({
|
|
@@ -332927,7 +332937,7 @@ var GeminiChat = class {
|
|
|
332927
332937
|
this.context.config.hasGemini35FlashGAAccess?.() ?? false
|
|
332928
332938
|
);
|
|
332929
332939
|
lastModelToUse = modelToUse;
|
|
332930
|
-
contentsToUse = supportsModernFeatures(modelToUse) ? [...contentsForPreviewModel] : [...requestContents];
|
|
332940
|
+
contentsToUse = supportsModernFeatures(modelToUse) || isGemini2Model(modelToUse) ? [...contentsForPreviewModel] : [...requestContents];
|
|
332931
332941
|
}
|
|
332932
332942
|
if (beforeModelResult.modifiedConfig) {
|
|
332933
332943
|
Object.assign(config2, beforeModelResult.modifiedConfig);
|
|
@@ -333036,7 +333046,14 @@ var GeminiChat = class {
|
|
|
333036
333046
|
*/
|
|
333037
333047
|
getHistoryTurns(curated = false) {
|
|
333038
333048
|
const history = curated ? extractCuratedHistory2(this.agentHistory.get()) : [...this.agentHistory.get()];
|
|
333039
|
-
|
|
333049
|
+
if (this.context.config.isContextManagementEnabled()) {
|
|
333050
|
+
return scrubHistory(history);
|
|
333051
|
+
}
|
|
333052
|
+
const model = this.context.config.getModel();
|
|
333053
|
+
if (isGemini2Model(model) || supportsModernFeatures(model)) {
|
|
333054
|
+
return coalesceConsecutiveRoles(stripThoughts2(history));
|
|
333055
|
+
}
|
|
333056
|
+
return history;
|
|
333040
333057
|
}
|
|
333041
333058
|
/**
|
|
333042
333059
|
* Clears the chat history.
|
|
@@ -333462,6 +333479,21 @@ function coalesceConsecutiveRoles(history) {
|
|
|
333462
333479
|
}
|
|
333463
333480
|
return result2;
|
|
333464
333481
|
}
|
|
333482
|
+
function stripThoughts2(history) {
|
|
333483
|
+
return history.map((turn) => {
|
|
333484
|
+
if (!turn.content.parts) return turn;
|
|
333485
|
+
const hasThought = turn.content.parts.some((p) => p && p.thought);
|
|
333486
|
+
if (!hasThought) return turn;
|
|
333487
|
+
const nonThoughtParts = turn.content.parts.filter((p) => p && !p.thought);
|
|
333488
|
+
return {
|
|
333489
|
+
...turn,
|
|
333490
|
+
content: {
|
|
333491
|
+
...turn.content,
|
|
333492
|
+
parts: nonThoughtParts
|
|
333493
|
+
}
|
|
333494
|
+
};
|
|
333495
|
+
}).filter((turn) => !turn.content.parts || turn.content.parts.length > 0);
|
|
333496
|
+
}
|
|
333465
333497
|
|
|
333466
333498
|
// packages/core/src/utils/ragLogger.ts
|
|
333467
333499
|
import * as fs50 from "node:fs";
|
|
@@ -340763,7 +340795,13 @@ var GoogleCredentialsAuthProvider = class extends BaseA2AAuthProvider {
|
|
|
340763
340795
|
"targetUrl must be provided to GoogleCredentialsAuthProvider to determine token audience."
|
|
340764
340796
|
);
|
|
340765
340797
|
}
|
|
340766
|
-
const
|
|
340798
|
+
const urlObj = new URL(targetUrl);
|
|
340799
|
+
if (urlObj.protocol !== "https:") {
|
|
340800
|
+
throw new Error(
|
|
340801
|
+
`Protocol "${urlObj.protocol}" is not secure. Google Credential provider requires HTTPS.`
|
|
340802
|
+
);
|
|
340803
|
+
}
|
|
340804
|
+
const hostname3 = urlObj.hostname;
|
|
340767
340805
|
const isRunAppHost = CLOUD_RUN_HOST_REGEX.test(hostname3);
|
|
340768
340806
|
if (isRunAppHost) {
|
|
340769
340807
|
this.useIdToken = true;
|
|
@@ -340877,7 +340915,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
|
|
|
340877
340915
|
return provider;
|
|
340878
340916
|
}
|
|
340879
340917
|
case "oauth2": {
|
|
340880
|
-
const { OAuth2AuthProvider } = await import("./oauth2-provider-
|
|
340918
|
+
const { OAuth2AuthProvider } = await import("./oauth2-provider-3THMIWTP.js");
|
|
340881
340919
|
const provider = new OAuth2AuthProvider(
|
|
340882
340920
|
authConfig,
|
|
340883
340921
|
options.agentName ?? "unknown",
|
|
@@ -342571,7 +342609,7 @@ var SchedulerStateManager = class {
|
|
|
342571
342609
|
|
|
342572
342610
|
// packages/core/src/scheduler/confirmation.ts
|
|
342573
342611
|
import { on } from "node:events";
|
|
342574
|
-
import { randomUUID as
|
|
342612
|
+
import { randomUUID as randomUUID7 } from "node:crypto";
|
|
342575
342613
|
async function awaitConfirmation(messageBus, correlationId, signal) {
|
|
342576
342614
|
if (signal.aborted) {
|
|
342577
342615
|
throw new Error("Operation cancelled");
|
|
@@ -342623,7 +342661,7 @@ async function resolveConfirmation(toolCall, signal, deps) {
|
|
|
342623
342661
|
details.systemMessage = deps.systemMessage;
|
|
342624
342662
|
}
|
|
342625
342663
|
await notifyHooks(deps, details);
|
|
342626
|
-
const correlationId =
|
|
342664
|
+
const correlationId = randomUUID7();
|
|
342627
342665
|
const serializableDetails = details;
|
|
342628
342666
|
lastDetails = serializableDetails;
|
|
342629
342667
|
const ideConfirmation = "ideConfirmation" in details ? details.ideConfirmation : void 0;
|
|
@@ -344300,7 +344338,7 @@ Output too large. Full output available at: ${filePath}
|
|
|
344300
344338
|
};
|
|
344301
344339
|
|
|
344302
344340
|
// packages/core/src/core/client.ts
|
|
344303
|
-
import { randomUUID as
|
|
344341
|
+
import { randomUUID as randomUUID11 } from "node:crypto";
|
|
344304
344342
|
|
|
344305
344343
|
// packages/core/src/context/config/registry.ts
|
|
344306
344344
|
var ContextProcessorRegistry = class {
|
|
@@ -344882,7 +344920,7 @@ function formatNodesForLlm(nodes, options = {}) {
|
|
|
344882
344920
|
}
|
|
344883
344921
|
|
|
344884
344922
|
// packages/core/src/context/utils/snapshotGenerator.ts
|
|
344885
|
-
import { randomUUID as
|
|
344923
|
+
import { randomUUID as randomUUID8 } from "node:crypto";
|
|
344886
344924
|
function isStringArray(value) {
|
|
344887
344925
|
return Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
344888
344926
|
}
|
|
@@ -345095,7 +345133,7 @@ ${formatNodesForLlm(nodes)}`;
|
|
|
345095
345133
|
const desc = t2["description"];
|
|
345096
345134
|
if (typeof desc === "string" && desc) {
|
|
345097
345135
|
newState.active_tasks.push({
|
|
345098
|
-
id: `task_${
|
|
345136
|
+
id: `task_${randomUUID8().slice(0, 8)}`,
|
|
345099
345137
|
description: desc
|
|
345100
345138
|
});
|
|
345101
345139
|
}
|
|
@@ -345753,7 +345791,7 @@ async function loadContextManagementConfig(sidecarPath, registry2) {
|
|
|
345753
345791
|
// packages/core/src/context/tracer.ts
|
|
345754
345792
|
import * as fsSync3 from "node:fs";
|
|
345755
345793
|
import * as path69 from "node:path";
|
|
345756
|
-
import { randomUUID as
|
|
345794
|
+
import { randomUUID as randomUUID9 } from "node:crypto";
|
|
345757
345795
|
var ContextTracer = class {
|
|
345758
345796
|
traceDir;
|
|
345759
345797
|
assetsDir;
|
|
@@ -345807,7 +345845,7 @@ var ContextTracer = class {
|
|
|
345807
345845
|
saveAsset(component, assetName, data) {
|
|
345808
345846
|
if (!this.enabled) return "asset-recording-disabled";
|
|
345809
345847
|
try {
|
|
345810
|
-
const assetId = `${Date.now()}-${
|
|
345848
|
+
const assetId = `${Date.now()}-${randomUUID9()}-${assetName}.json`;
|
|
345811
345849
|
const assetPath = path69.join(this.assetsDir, assetId);
|
|
345812
345850
|
fsSync3.writeFileSync(assetPath, JSON.stringify(data, null, 2), "utf-8");
|
|
345813
345851
|
this.logEvent(component, `Saved asset: ${assetName}`, { assetId });
|
|
@@ -345863,12 +345901,12 @@ var ContextEventBus = class extends EventEmitter5 {
|
|
|
345863
345901
|
};
|
|
345864
345902
|
|
|
345865
345903
|
// packages/core/src/context/pipeline/inbox.ts
|
|
345866
|
-
import { randomUUID as
|
|
345904
|
+
import { randomUUID as randomUUID10 } from "node:crypto";
|
|
345867
345905
|
var LiveInbox = class {
|
|
345868
345906
|
messages = [];
|
|
345869
345907
|
publish(topic, payload) {
|
|
345870
345908
|
this.messages.push({
|
|
345871
|
-
id:
|
|
345909
|
+
id: randomUUID10(),
|
|
345872
345910
|
topic,
|
|
345873
345911
|
payload,
|
|
345874
345912
|
timestamp: Date.now()
|
|
@@ -347965,7 +348003,7 @@ var GeminiClient = class {
|
|
|
347965
348003
|
if (this.contextManager) {
|
|
347966
348004
|
const rawPendingRequest = createUserContent(request);
|
|
347967
348005
|
const pendingRequest = {
|
|
347968
|
-
id:
|
|
348006
|
+
id: randomUUID11(),
|
|
347969
348007
|
content: rawPendingRequest
|
|
347970
348008
|
};
|
|
347971
348009
|
const {
|
|
@@ -350246,7 +350284,7 @@ function createScopedWorkspaceContext(parentContext, additionalDirectories) {
|
|
|
350246
350284
|
}
|
|
350247
350285
|
|
|
350248
350286
|
// packages/core/src/confirmation-bus/message-bus.ts
|
|
350249
|
-
import { randomUUID as
|
|
350287
|
+
import { randomUUID as randomUUID12 } from "node:crypto";
|
|
350250
350288
|
import { EventEmitter as EventEmitter6 } from "node:events";
|
|
350251
350289
|
var MessageBus = class _MessageBus extends EventEmitter6 {
|
|
350252
350290
|
constructor(policyEngine, debug2 = false, isTrusted = true) {
|
|
@@ -350407,7 +350445,7 @@ var MessageBus = class _MessageBus extends EventEmitter6 {
|
|
|
350407
350445
|
* The correlation ID is generated internally and added to the request
|
|
350408
350446
|
*/
|
|
350409
350447
|
async request(request, responseType, timeoutMs = 6e4) {
|
|
350410
|
-
const correlationId =
|
|
350448
|
+
const correlationId = randomUUID12();
|
|
350411
350449
|
return new Promise((resolve29, reject) => {
|
|
350412
350450
|
const timeoutId = setTimeout(() => {
|
|
350413
350451
|
cleanup();
|
|
@@ -350691,7 +350729,7 @@ var LocalAgentExecutor = class _LocalAgentExecutor {
|
|
|
350691
350729
|
this.compressionService = new ChatCompressionService();
|
|
350692
350730
|
this.parentCallId = parentCallId;
|
|
350693
350731
|
this.cache = new import_lru_cache.default(10);
|
|
350694
|
-
this.agentId =
|
|
350732
|
+
this.agentId = randomUUID13();
|
|
350695
350733
|
}
|
|
350696
350734
|
/**
|
|
350697
350735
|
* Executes a single turn of the agent's logic, from calling the model
|
|
@@ -351136,7 +351174,7 @@ var LocalAgentExecutor = class _LocalAgentExecutor {
|
|
|
351136
351174
|
} else if (info2.compressionStatus === 1 /* COMPRESSED */) {
|
|
351137
351175
|
if (newHistory) {
|
|
351138
351176
|
const turns = newHistory.map((c4) => ({
|
|
351139
|
-
id:
|
|
351177
|
+
id: randomUUID13(),
|
|
351140
351178
|
content: c4
|
|
351141
351179
|
}));
|
|
351142
351180
|
chat.setHistory(turns);
|
|
@@ -351145,7 +351183,7 @@ var LocalAgentExecutor = class _LocalAgentExecutor {
|
|
|
351145
351183
|
} else if (info2.compressionStatus === 6 /* CONTENT_TRUNCATED */) {
|
|
351146
351184
|
if (newHistory) {
|
|
351147
351185
|
const turns = newHistory.map((c4) => ({
|
|
351148
|
-
id:
|
|
351186
|
+
id: randomUUID13(),
|
|
351149
351187
|
content: c4
|
|
351150
351188
|
}));
|
|
351151
351189
|
chat.setHistory(turns);
|
|
@@ -351599,7 +351637,7 @@ Important Rules:
|
|
|
351599
351637
|
};
|
|
351600
351638
|
|
|
351601
351639
|
// packages/core/src/agents/local-invocation.ts
|
|
351602
|
-
import { randomUUID as
|
|
351640
|
+
import { randomUUID as randomUUID14 } from "node:crypto";
|
|
351603
351641
|
|
|
351604
351642
|
// packages/core/src/utils/agent-sanitization-utils.ts
|
|
351605
351643
|
var SENSITIVE_KEY_PATTERNS = [
|
|
@@ -351775,7 +351813,7 @@ var LocalSubagentInvocation = class extends BaseToolInvocation {
|
|
|
351775
351813
|
lastItem.content = sanitizeThoughtContent(text);
|
|
351776
351814
|
} else {
|
|
351777
351815
|
recentActivity.push({
|
|
351778
|
-
id:
|
|
351816
|
+
id: randomUUID14(),
|
|
351779
351817
|
type: "thought",
|
|
351780
351818
|
content: sanitizeThoughtContent(text),
|
|
351781
351819
|
status: "running" /* RUNNING */
|
|
@@ -351795,7 +351833,7 @@ var LocalSubagentInvocation = class extends BaseToolInvocation {
|
|
|
351795
351833
|
const args2 = JSON.stringify(
|
|
351796
351834
|
sanitizeToolArgs(activity.data["args"])
|
|
351797
351835
|
);
|
|
351798
|
-
const callId = activity.data["callId"] ? String(activity.data["callId"]) :
|
|
351836
|
+
const callId = activity.data["callId"] ? String(activity.data["callId"]) : randomUUID14();
|
|
351799
351837
|
recentActivity.push({
|
|
351800
351838
|
id: callId,
|
|
351801
351839
|
type: "tool_call",
|
|
@@ -351846,7 +351884,7 @@ var LocalSubagentInvocation = class extends BaseToolInvocation {
|
|
|
351846
351884
|
}
|
|
351847
351885
|
}
|
|
351848
351886
|
recentActivity.push({
|
|
351849
|
-
id:
|
|
351887
|
+
id: randomUUID14(),
|
|
351850
351888
|
type: "thought",
|
|
351851
351889
|
content: isCancellation || isRejection ? sanitizedError : `Error: ${sanitizedError}`,
|
|
351852
351890
|
status: isCancellation || isRejection ? "cancelled" /* CANCELLED */ : "error" /* ERROR */
|
|
@@ -351921,7 +351959,7 @@ ${output.result}`;
|
|
|
351921
351959
|
const lastActivity = recentActivity[recentActivity.length - 1];
|
|
351922
351960
|
if (!lastActivity || lastActivity.status !== "error" /* ERROR */) {
|
|
351923
351961
|
recentActivity.push({
|
|
351924
|
-
id:
|
|
351962
|
+
id: randomUUID14(),
|
|
351925
351963
|
type: "thought",
|
|
351926
351964
|
content: `Error: ${errorMessage}`,
|
|
351927
351965
|
status: "error" /* ERROR */
|
|
@@ -352377,7 +352415,7 @@ ${errorMessage}` : errorMessage;
|
|
|
352377
352415
|
};
|
|
352378
352416
|
|
|
352379
352417
|
// packages/core/src/agents/local-session-invocation.ts
|
|
352380
|
-
import { randomUUID as
|
|
352418
|
+
import { randomUUID as randomUUID16 } from "node:crypto";
|
|
352381
352419
|
|
|
352382
352420
|
// packages/core/src/utils/checks.ts
|
|
352383
352421
|
function assumeExhaustive(_value) {
|
|
@@ -352388,7 +352426,7 @@ function checkExhaustive(value, msg = `unexpected value ${value}!`) {
|
|
|
352388
352426
|
}
|
|
352389
352427
|
|
|
352390
352428
|
// packages/core/src/agents/local-subagent-protocol.ts
|
|
352391
|
-
import { randomUUID as
|
|
352429
|
+
import { randomUUID as randomUUID15 } from "node:crypto";
|
|
352392
352430
|
|
|
352393
352431
|
// packages/core/src/agent/agent-session.ts
|
|
352394
352432
|
var AgentSession = class {
|
|
@@ -352583,7 +352621,7 @@ var LocalSubagentProtocol = class {
|
|
|
352583
352621
|
}
|
|
352584
352622
|
_events = [];
|
|
352585
352623
|
_subscribers = /* @__PURE__ */ new Set();
|
|
352586
|
-
_streamId =
|
|
352624
|
+
_streamId = randomUUID15();
|
|
352587
352625
|
_eventCounter = 0;
|
|
352588
352626
|
_agentStartEmitted = false;
|
|
352589
352627
|
_agentEndEmitted = false;
|
|
@@ -352658,7 +352696,7 @@ var LocalSubagentProtocol = class {
|
|
|
352658
352696
|
// Core: execution
|
|
352659
352697
|
// ---------------------------------------------------------------------------
|
|
352660
352698
|
_beginNewStream() {
|
|
352661
|
-
this._streamId =
|
|
352699
|
+
this._streamId = randomUUID15();
|
|
352662
352700
|
this._eventCounter = 0;
|
|
352663
352701
|
this._abortController = new AbortController();
|
|
352664
352702
|
this._agentStartEmitted = false;
|
|
@@ -352724,7 +352762,7 @@ var LocalSubagentProtocol = class {
|
|
|
352724
352762
|
}
|
|
352725
352763
|
case "TOOL_CALL_START": {
|
|
352726
352764
|
const rawCallId = activity.data["callId"];
|
|
352727
|
-
const callId = String(rawCallId ??
|
|
352765
|
+
const callId = String(rawCallId ?? randomUUID15());
|
|
352728
352766
|
const rawName = activity.data["name"];
|
|
352729
352767
|
const name3 = String(rawName ?? "unknown");
|
|
352730
352768
|
const rawArgs = activity.data["args"];
|
|
@@ -352742,7 +352780,7 @@ var LocalSubagentProtocol = class {
|
|
|
352742
352780
|
}
|
|
352743
352781
|
case "TOOL_CALL_END": {
|
|
352744
352782
|
const rawId = activity.data["id"];
|
|
352745
|
-
const requestId = String(rawId ??
|
|
352783
|
+
const requestId = String(rawId ?? randomUUID15());
|
|
352746
352784
|
const rawName = activity.data["name"];
|
|
352747
352785
|
const name3 = String(rawName ?? "unknown");
|
|
352748
352786
|
const rawOutput = activity.data["output"];
|
|
@@ -352927,7 +352965,7 @@ var LocalSessionInvocation = class extends BaseToolInvocation {
|
|
|
352927
352965
|
lastItem.content = sanitizeThoughtContent(text);
|
|
352928
352966
|
} else {
|
|
352929
352967
|
recentActivity.push({
|
|
352930
|
-
id:
|
|
352968
|
+
id: randomUUID16(),
|
|
352931
352969
|
type: "thought",
|
|
352932
352970
|
content: sanitizeThoughtContent(text),
|
|
352933
352971
|
status: "running" /* RUNNING */
|
|
@@ -352946,7 +352984,7 @@ var LocalSessionInvocation = class extends BaseToolInvocation {
|
|
|
352946
352984
|
const displayName = activity.data["displayName"] ? sanitizeErrorMessage(String(activity.data["displayName"]).trim()) : void 0;
|
|
352947
352985
|
const description = activity.data["description"] ? sanitizeErrorMessage(String(activity.data["description"])) : void 0;
|
|
352948
352986
|
const args2 = JSON.stringify(sanitizeToolArgs(activity.data["args"]));
|
|
352949
|
-
const callId = activity.data["callId"] ? String(activity.data["callId"]) :
|
|
352987
|
+
const callId = activity.data["callId"] ? String(activity.data["callId"]) : randomUUID16();
|
|
352950
352988
|
recentActivity.push({
|
|
352951
352989
|
id: callId,
|
|
352952
352990
|
type: "tool_call",
|
|
@@ -352998,7 +353036,7 @@ var LocalSessionInvocation = class extends BaseToolInvocation {
|
|
|
352998
353036
|
}
|
|
352999
353037
|
}
|
|
353000
353038
|
recentActivity.push({
|
|
353001
|
-
id:
|
|
353039
|
+
id: randomUUID16(),
|
|
353002
353040
|
type: "thought",
|
|
353003
353041
|
content: isCancellation || isRejection ? sanitizedError : `Error: ${sanitizedError}`,
|
|
353004
353042
|
status: isCancellation || isRejection ? "cancelled" /* CANCELLED */ : "error" /* ERROR */
|
|
@@ -353101,7 +353139,7 @@ ${output.result}`;
|
|
|
353101
353139
|
const lastActivity = recentActivity[recentActivity.length - 1];
|
|
353102
353140
|
if (!lastActivity || lastActivity.status !== "error" /* ERROR */) {
|
|
353103
353141
|
recentActivity.push({
|
|
353104
|
-
id:
|
|
353142
|
+
id: randomUUID16(),
|
|
353105
353143
|
type: "thought",
|
|
353106
353144
|
content: `Error: ${errorMessage}`,
|
|
353107
353145
|
status: "error" /* ERROR */
|
|
@@ -353135,7 +353173,7 @@ ${output.result}`;
|
|
|
353135
353173
|
};
|
|
353136
353174
|
|
|
353137
353175
|
// packages/core/src/agents/remote-subagent-protocol.ts
|
|
353138
|
-
import { randomUUID as
|
|
353176
|
+
import { randomUUID as randomUUID17 } from "node:crypto";
|
|
353139
353177
|
function isAbortLikeError2(err2) {
|
|
353140
353178
|
return err2 instanceof Error && err2.name === "AbortError";
|
|
353141
353179
|
}
|
|
@@ -353151,7 +353189,7 @@ var RemoteSubagentProtocol = class {
|
|
|
353151
353189
|
}
|
|
353152
353190
|
_events = [];
|
|
353153
353191
|
_subscribers = /* @__PURE__ */ new Set();
|
|
353154
|
-
_streamId =
|
|
353192
|
+
_streamId = randomUUID17();
|
|
353155
353193
|
_eventCounter = 0;
|
|
353156
353194
|
_agentStartEmitted = false;
|
|
353157
353195
|
_agentEndEmitted = false;
|
|
@@ -353224,7 +353262,7 @@ var RemoteSubagentProtocol = class {
|
|
|
353224
353262
|
// Core: A2A streaming
|
|
353225
353263
|
// ---------------------------------------------------------------------------
|
|
353226
353264
|
_beginNewStream() {
|
|
353227
|
-
this._streamId =
|
|
353265
|
+
this._streamId = randomUUID17();
|
|
353228
353266
|
this._eventCounter = 0;
|
|
353229
353267
|
this._abortController = new AbortController();
|
|
353230
353268
|
this._agentStartEmitted = false;
|
|
@@ -353638,7 +353676,7 @@ ${errorMessage}` : errorMessage;
|
|
|
353638
353676
|
};
|
|
353639
353677
|
|
|
353640
353678
|
// packages/core/src/agents/browser/browserAgentInvocation.ts
|
|
353641
|
-
import { randomUUID as
|
|
353679
|
+
import { randomUUID as randomUUID18 } from "node:crypto";
|
|
353642
353680
|
|
|
353643
353681
|
// packages/core/src/utils/browserConsent.ts
|
|
353644
353682
|
import * as fs59 from "node:fs/promises";
|
|
@@ -355318,7 +355356,7 @@ var BrowserAgentInvocation = class extends BaseToolInvocation {
|
|
|
355318
355356
|
const printOutput = updateOutput ? (msg) => {
|
|
355319
355357
|
const sanitizedMsg = sanitizeThoughtContent(msg);
|
|
355320
355358
|
recentActivity.push({
|
|
355321
|
-
id:
|
|
355359
|
+
id: randomUUID18(),
|
|
355322
355360
|
type: "thought",
|
|
355323
355361
|
content: sanitizedMsg,
|
|
355324
355362
|
status: "completed" /* COMPLETED */
|
|
@@ -355353,7 +355391,7 @@ var BrowserAgentInvocation = class extends BaseToolInvocation {
|
|
|
355353
355391
|
lastItem.content = sanitizeThoughtContent(text);
|
|
355354
355392
|
} else {
|
|
355355
355393
|
recentActivity.push({
|
|
355356
|
-
id:
|
|
355394
|
+
id: randomUUID18(),
|
|
355357
355395
|
type: "thought",
|
|
355358
355396
|
content: sanitizeThoughtContent(text),
|
|
355359
355397
|
status: "running" /* RUNNING */
|
|
@@ -355369,7 +355407,7 @@ var BrowserAgentInvocation = class extends BaseToolInvocation {
|
|
|
355369
355407
|
const args2 = JSON.stringify(
|
|
355370
355408
|
sanitizeToolArgs(activity.data["args"])
|
|
355371
355409
|
);
|
|
355372
|
-
const callId = activity.data["callId"] ? String(activity.data["callId"]) :
|
|
355410
|
+
const callId = activity.data["callId"] ? String(activity.data["callId"]) : randomUUID18();
|
|
355373
355411
|
recentActivity.push({
|
|
355374
355412
|
id: callId,
|
|
355375
355413
|
type: "tool_call",
|
|
@@ -355418,7 +355456,7 @@ var BrowserAgentInvocation = class extends BaseToolInvocation {
|
|
|
355418
355456
|
}
|
|
355419
355457
|
const sanitizedError = sanitizeErrorMessage(error40);
|
|
355420
355458
|
recentActivity.push({
|
|
355421
|
-
id:
|
|
355459
|
+
id: randomUUID18(),
|
|
355422
355460
|
type: "thought",
|
|
355423
355461
|
content: isCancellation ? sanitizedError : `Error: ${sanitizedError}`,
|
|
355424
355462
|
status: newStatus
|
|
@@ -370533,7 +370571,7 @@ var McpComplianceTransport = class extends EventEmitter8 {
|
|
|
370533
370571
|
// packages/core/src/tools/mcp-client.ts
|
|
370534
370572
|
import { basename as basename7 } from "node:path";
|
|
370535
370573
|
import { pathToFileURL } from "node:url";
|
|
370536
|
-
import { randomUUID as
|
|
370574
|
+
import { randomUUID as randomUUID19 } from "node:crypto";
|
|
370537
370575
|
|
|
370538
370576
|
// packages/core/src/mcp/oauth-token-storage.ts
|
|
370539
370577
|
import { promises as fs75 } from "node:fs";
|
|
@@ -372506,7 +372544,7 @@ var McpCallableTool2 = class {
|
|
|
372506
372544
|
throw new Error("McpCallableTool only supports single function call");
|
|
372507
372545
|
}
|
|
372508
372546
|
const call = functionCalls[0];
|
|
372509
|
-
const progressToken =
|
|
372547
|
+
const progressToken = randomUUID19();
|
|
372510
372548
|
const context2 = getToolCallContext();
|
|
372511
372549
|
if (context2 && this.progressReporter) {
|
|
372512
372550
|
this.progressReporter.registerProgressToken(
|
|
@@ -381243,8 +381281,8 @@ function rng3() {
|
|
|
381243
381281
|
}
|
|
381244
381282
|
|
|
381245
381283
|
// packages/core/node_modules/uuid/dist-node/native.js
|
|
381246
|
-
import { randomUUID as
|
|
381247
|
-
var native_default2 = { randomUUID:
|
|
381284
|
+
import { randomUUID as randomUUID20 } from "node:crypto";
|
|
381285
|
+
var native_default2 = { randomUUID: randomUUID20 };
|
|
381248
381286
|
|
|
381249
381287
|
// packages/core/node_modules/uuid/dist-node/v4.js
|
|
381250
381288
|
function _v4(options, buf, offset) {
|
|
@@ -382385,6 +382423,9 @@ var Config = class {
|
|
|
382385
382423
|
this.refreshSessionScopedPlansDirectory(previousPlansDir);
|
|
382386
382424
|
}
|
|
382387
382425
|
}
|
|
382426
|
+
rotateSessionId(sessionId) {
|
|
382427
|
+
this._sessionId = sessionId;
|
|
382428
|
+
}
|
|
382388
382429
|
resetNewSessionState(sessionId) {
|
|
382389
382430
|
this.setSessionId(sessionId);
|
|
382390
382431
|
}
|
|
@@ -384856,7 +384897,7 @@ Write the complete content to the \`GEMINI.md\` file. The output must be well-fo
|
|
|
384856
384897
|
}
|
|
384857
384898
|
|
|
384858
384899
|
// packages/core/src/commands/memory.ts
|
|
384859
|
-
import { randomUUID as
|
|
384900
|
+
import { randomUUID as randomUUID22 } from "node:crypto";
|
|
384860
384901
|
import { constants as fsConstants3 } from "node:fs";
|
|
384861
384902
|
import * as fs81 from "node:fs/promises";
|
|
384862
384903
|
import * as path93 from "node:path";
|
|
@@ -385345,7 +385386,7 @@ async function resolveTargetWithinAllowedRoots(targetPath, allowedRoots) {
|
|
|
385345
385386
|
import * as fs80 from "node:fs/promises";
|
|
385346
385387
|
import * as path92 from "node:path";
|
|
385347
385388
|
import { constants as fsConstants2 } from "node:fs";
|
|
385348
|
-
import { randomUUID as
|
|
385389
|
+
import { randomUUID as randomUUID21 } from "node:crypto";
|
|
385349
385390
|
|
|
385350
385391
|
// packages/core/src/agents/skill-extraction-agent.ts
|
|
385351
385392
|
var SkillExtractionSchema = external_exports.object({
|
|
@@ -386364,7 +386405,7 @@ function buildAgentLoopContext(config2) {
|
|
|
386364
386405
|
const autoApproveBus = new MessageBus(autoApprovePolicy);
|
|
386365
386406
|
return {
|
|
386366
386407
|
config: config2,
|
|
386367
|
-
promptId: `skill-extraction-${
|
|
386408
|
+
promptId: `skill-extraction-${randomUUID21().slice(0, 8)}`,
|
|
386368
386409
|
toolRegistry: config2.getToolRegistry(),
|
|
386369
386410
|
promptRegistry: new PromptRegistry(),
|
|
386370
386411
|
resourceRegistry: new ResourceRegistry(),
|
|
@@ -387532,7 +387573,7 @@ async function restoreCommittedInboxPatchTarget(stagedTarget) {
|
|
|
387532
387573
|
);
|
|
387533
387574
|
const restorePath = path93.join(
|
|
387534
387575
|
restoreDir,
|
|
387535
|
-
`.${path93.basename(stagedTarget.targetPath)}.${
|
|
387576
|
+
`.${path93.basename(stagedTarget.targetPath)}.${randomUUID22()}.rollback`
|
|
387536
387577
|
);
|
|
387537
387578
|
await writeExclusiveFile(
|
|
387538
387579
|
restorePath,
|
|
@@ -387555,7 +387596,7 @@ async function stageInboxPatchTargets(targets) {
|
|
|
387555
387596
|
);
|
|
387556
387597
|
const tempPath = path93.join(
|
|
387557
387598
|
tempDir,
|
|
387558
|
-
`.${path93.basename(target.targetPath)}.${
|
|
387599
|
+
`.${path93.basename(target.targetPath)}.${randomUUID22()}.patch-tmp`
|
|
387559
387600
|
);
|
|
387560
387601
|
await writeExclusiveFile(tempPath, target.patched, mode);
|
|
387561
387602
|
stagedTargets.push({
|
|
@@ -393786,12 +393827,6 @@ var ReadManyFilesTool = class _ReadManyFilesTool extends BaseDeclarativeTool {
|
|
|
393786
393827
|
}
|
|
393787
393828
|
};
|
|
393788
393829
|
|
|
393789
|
-
// packages/core/src/utils/session.ts
|
|
393790
|
-
import { randomUUID as randomUUID22 } from "node:crypto";
|
|
393791
|
-
function createSessionId() {
|
|
393792
|
-
return randomUUID22();
|
|
393793
|
-
}
|
|
393794
|
-
|
|
393795
393830
|
// packages/core/src/utils/compatibility.ts
|
|
393796
393831
|
import os32 from "node:os";
|
|
393797
393832
|
function isWindows10() {
|
|
@@ -402408,6 +402443,7 @@ export {
|
|
|
402408
402443
|
resetVersionCache,
|
|
402409
402444
|
IDEConnectionStatus,
|
|
402410
402445
|
IdeClient,
|
|
402446
|
+
createSessionId,
|
|
402411
402447
|
openBrowserSecurely,
|
|
402412
402448
|
shouldLaunchBrowser,
|
|
402413
402449
|
getErrorStatus,
|
|
@@ -402546,6 +402582,7 @@ export {
|
|
|
402546
402582
|
isInvalidArgumentError,
|
|
402547
402583
|
stripToolCallIdPrefixes,
|
|
402548
402584
|
coalesceConsecutiveRoles,
|
|
402585
|
+
stripThoughts2 as stripThoughts,
|
|
402549
402586
|
populateToolDisplay,
|
|
402550
402587
|
toolResultDisplayToDisplayContent,
|
|
402551
402588
|
renderDisplayDiff,
|
|
@@ -402835,7 +402872,6 @@ export {
|
|
|
402835
402872
|
LegacyAgentProtocol,
|
|
402836
402873
|
LegacyAgentSession,
|
|
402837
402874
|
ReadManyFilesTool,
|
|
402838
|
-
createSessionId,
|
|
402839
402875
|
isWindows10,
|
|
402840
402876
|
isJetBrainsTerminal,
|
|
402841
402877
|
isTmux,
|