@google/gemini-cli 0.44.0 → 0.45.0-nightly.20260528.g5cac7c10f
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-LM6XTSWQ.js → chunk-2H5DC5TA.js} +56 -2
- package/bundle/{chunk-CBT4PN4R.js → chunk-2RRZM3IR.js} +8 -8
- package/bundle/{chunk-FOOWNGAB.js → chunk-2SU33N7C.js} +1 -1
- package/bundle/{chunk-M3EDSAPV.js → chunk-4M3TG6ZU.js} +1 -1
- package/bundle/{chunk-TN4WXWFM.js → chunk-4TSRLQBZ.js} +3 -3
- package/bundle/{chunk-DALZZYPQ.js → chunk-767WVJKA.js} +1 -1
- package/bundle/{chunk-EKUU3KNX.js → chunk-B4GDSUR2.js} +1 -1
- package/bundle/{chunk-SIXPHUVZ.js → chunk-CWAXEILN.js} +423 -330
- package/bundle/{chunk-BE42OOYM.js → chunk-FBTNPKPG.js} +377 -297
- package/bundle/{chunk-3K52543M.js → chunk-GIXFMPPJ.js} +56 -2
- package/bundle/{chunk-TW47A6FW.js → chunk-GTQYFINA.js} +7827 -14242
- package/bundle/{chunk-6W2Z7FTE.js → chunk-HJCI56HE.js} +3 -3
- package/bundle/{chunk-5CABHQOE.js → chunk-HTTFLYNV.js} +1 -1
- package/bundle/{chunk-BOYNQXWU.js → chunk-HYC42UG2.js} +2 -2
- package/bundle/{chunk-G2L4VCSN.js → chunk-HYJ253BF.js} +9 -8
- package/bundle/{chunk-VUERI7WB.js → chunk-KETVRR7F.js} +8 -8
- package/bundle/{chunk-7ZH745HC.js → chunk-LM7IUUPG.js} +63 -6
- package/bundle/{chunk-QUZ62PY7.js → chunk-LUQGJPIY.js} +2 -2
- package/bundle/{chunk-N4SGO3W6.js → chunk-MGXTB4U2.js} +2 -2
- package/bundle/{chunk-ONQVFEHS.js → chunk-OY6QYVTR.js} +1 -1
- package/bundle/{chunk-7KIX5G5D.js → chunk-Q3UZDZZV.js} +3 -3
- package/bundle/{chunk-OLBOCZ5F.js → chunk-RL3BAOLP.js} +68 -55
- package/bundle/{chunk-OTLI6LZ3.js → chunk-RLOHM32C.js} +1 -1
- package/bundle/chunk-VONINEZL.js +512 -0
- package/bundle/chunk-WE2NPYLF.js +17320 -0
- package/bundle/{chunk-XTG4JBIR.js → chunk-WPCNMQ6J.js} +1 -1
- package/bundle/chunk-XBD7NYQK.js +398 -0
- package/bundle/chunk-XLNVYLTH.js +1571 -0
- package/bundle/chunk-XVJGS2PV.js +81685 -0
- package/bundle/chunk-YP6T4TTR.js +118 -0
- package/bundle/chunk-ZAP2IAMA.js +394429 -0
- package/bundle/chunk-ZQZFTBJB.js +154 -0
- package/bundle/{cleanup-PDT5ATZB.js → cleanup-7FHLTEXT.js} +2 -2
- package/bundle/{cleanup-SF7XW2P3.js → cleanup-OC2VH2NM.js} +2 -2
- package/bundle/{cleanup-UW3DZLXP.js → cleanup-QAYOZSYG.js} +2 -2
- package/bundle/cleanup-RSDKY26B.js +32 -0
- package/bundle/{core-LN2S4IOX.js → core-LD6MHGD6.js} +3 -7
- package/bundle/{devtoolsService-DUEWJW52.js → devtoolsService-4Y2RGEUE.js} +2 -2
- package/bundle/{devtoolsService-64QE2V7E.js → devtoolsService-72PYXNY7.js} +2 -2
- package/bundle/{devtoolsService-ZC7E4R2A.js → devtoolsService-A7GGCE5S.js} +4 -3
- package/bundle/devtoolsService-W6D2CBSD.js +856 -0
- package/bundle/{dist-J4RONYVV.js → dist-AWZHVQVU.js} +3 -7
- package/bundle/{core-GW6VAL53.js → dist-JIEO7BGB.js} +3 -7
- package/bundle/dist-NIOYWUBZ.js +2134 -0
- package/bundle/docs/changelogs/index.md +15 -0
- package/bundle/docs/changelogs/latest.md +198 -262
- package/bundle/docs/changelogs/preview.md +202 -181
- package/bundle/docs/reference/configuration.md +24 -29
- package/bundle/{gemini-SSQIKHR2.js → gemini-5BI3CAHU.js} +41 -30
- package/bundle/{gemini-CSPRLMWN.js → gemini-5ZI322FJ.js} +41 -30
- package/bundle/{gemini-CMBH5YG6.js → gemini-VGWW5S4X.js} +239 -212
- package/bundle/gemini-WNFLKYIG.js +16406 -0
- package/bundle/gemini.js +15 -10
- package/bundle/{interactiveCli-RDMZS6KL.js → interactiveCli-HERACVWI.js} +34 -58
- package/bundle/{interactiveCli-Q2A2JFLA.js → interactiveCli-MK4KMRE5.js} +340 -345
- package/bundle/interactiveCli-MV4UI2QW.js +34726 -0
- package/bundle/{interactiveCli-TOEU7LIO.js → interactiveCli-XM5HDVD7.js} +34 -58
- package/bundle/{liteRtServerManager-ASKAVAO7.js → liteRtServerManager-6ABLEPRZ.js} +4 -4
- package/bundle/{liteRtServerManager-6BWTXMUI.js → liteRtServerManager-6N5DYDEQ.js} +4 -4
- package/bundle/{liteRtServerManager-ZS3BCW53.js → liteRtServerManager-PCEFUKXR.js} +4 -4
- package/bundle/liteRtServerManager-PRFP3VM3.js +65 -0
- package/bundle/{oauth2-provider-SYRZDGL5.js → oauth2-provider-RHC4TM2M.js} +1 -1
- package/bundle/{oauth2-provider-7JOVY727.js → oauth2-provider-S3GQDX6M.js} +38 -72
- package/bundle/{oauth2-provider-FGI6QDEM.js → oauth2-provider-WS7LUQ5V.js} +1 -1
- package/bundle/oauth2-provider-YDSFC443.js +235 -0
- package/bundle/{start-KJCIH3GX.js → start-6J7J6MU3.js} +6 -6
- package/bundle/{start-TU5WNP77.js → start-SVVJOUJH.js} +6 -6
- package/bundle/{start-47OYCVVA.js → start-XLIGOOW3.js} +6 -6
- package/bundle/start-Z3RQJJU3.js +18 -0
- package/package.json +1 -1
|
@@ -155,13 +155,13 @@ import {
|
|
|
155
155
|
widestLineFromStyledChars,
|
|
156
156
|
wordBreakStyledChars,
|
|
157
157
|
wrapStyledChars
|
|
158
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-2RRZM3IR.js";
|
|
159
159
|
import {
|
|
160
160
|
appEvents
|
|
161
161
|
} from "./chunk-5PS3AYFU.js";
|
|
162
162
|
import {
|
|
163
163
|
require_source
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-4M3TG6ZU.js";
|
|
165
165
|
import {
|
|
166
166
|
ACTIVE_SHELL_MAX_LINES,
|
|
167
167
|
COMPACT_TOOL_SUBVIEW_MAX_LINES,
|
|
@@ -211,24 +211,24 @@ import {
|
|
|
211
211
|
stringWidth,
|
|
212
212
|
stripUnsafeCharacters,
|
|
213
213
|
toCodePoints
|
|
214
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-GIXFMPPJ.js";
|
|
215
215
|
import {
|
|
216
216
|
handleAutoUpdate,
|
|
217
217
|
isDevelopment,
|
|
218
218
|
relaunchApp,
|
|
219
219
|
setUpdateHandler
|
|
220
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-LUQGJPIY.js";
|
|
221
221
|
import {
|
|
222
222
|
isTodoList,
|
|
223
223
|
mapCoreStatusToDisplayStatus,
|
|
224
224
|
require_react
|
|
225
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-WPCNMQ6J.js";
|
|
226
226
|
import {
|
|
227
227
|
registerCleanup,
|
|
228
228
|
removeCleanup,
|
|
229
229
|
runExitCleanup,
|
|
230
230
|
setupTtyCheck
|
|
231
|
-
} from "./chunk-
|
|
231
|
+
} from "./chunk-OY6QYVTR.js";
|
|
232
232
|
import {
|
|
233
233
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
234
234
|
AGENT_TOOL_NAME,
|
|
@@ -270,8 +270,8 @@ import {
|
|
|
270
270
|
OverageMenuShownEvent,
|
|
271
271
|
OverageOptionSelectedEvent,
|
|
272
272
|
PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
|
|
273
|
-
PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL,
|
|
274
273
|
PREVIEW_GEMINI_3_1_MODEL,
|
|
274
|
+
PREVIEW_GEMINI_FLASH_LITE_MODEL,
|
|
275
275
|
PREVIEW_GEMINI_FLASH_MODEL,
|
|
276
276
|
PREVIEW_GEMINI_MODEL,
|
|
277
277
|
PolicyIntegrityManager,
|
|
@@ -410,7 +410,7 @@ import {
|
|
|
410
410
|
validatePlanContent,
|
|
411
411
|
validatePlanPath,
|
|
412
412
|
writeToStdout
|
|
413
|
-
} from "./chunk-
|
|
413
|
+
} from "./chunk-CWAXEILN.js";
|
|
414
414
|
import "./chunk-6HI7VNOG.js";
|
|
415
415
|
import "./chunk-TUDYL3X4.js";
|
|
416
416
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -16624,7 +16624,6 @@ function ModelDialog({ onClose }) {
|
|
|
16624
16624
|
const preferredModel = config?.getModel() || GEMINI_MODEL_ALIAS_AUTO;
|
|
16625
16625
|
const shouldShowPreviewModels = config?.getHasAccessToPreviewModel() ?? false;
|
|
16626
16626
|
const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
|
|
16627
|
-
const useGemini31FlashLite = config?.getGemini31FlashLiteLaunchedSync?.() ?? false;
|
|
16628
16627
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
16629
16628
|
const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
|
|
16630
16629
|
const manualModelSelected = (0, import_react55.useMemo)(() => {
|
|
@@ -16639,9 +16638,9 @@ function ModelDialog({ onClose }) {
|
|
|
16639
16638
|
PREVIEW_GEMINI_MODEL,
|
|
16640
16639
|
PREVIEW_GEMINI_3_1_MODEL,
|
|
16641
16640
|
PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
|
|
16642
|
-
|
|
16641
|
+
PREVIEW_GEMINI_FLASH_LITE_MODEL,
|
|
16643
16642
|
PREVIEW_GEMINI_FLASH_MODEL
|
|
16644
|
-
];
|
|
16643
|
+
].filter((m) => m !== "none");
|
|
16645
16644
|
if (manualModels.includes(preferredModel)) {
|
|
16646
16645
|
return preferredModel;
|
|
16647
16646
|
}
|
|
@@ -16669,7 +16668,6 @@ function ModelDialog({ onClose }) {
|
|
|
16669
16668
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
|
|
16670
16669
|
const allOptions = config.getModelConfigService().getAvailableModelOptions({
|
|
16671
16670
|
useGemini3_1: useGemini31,
|
|
16672
|
-
useGemini3_1FlashLite: useGemini31FlashLite,
|
|
16673
16671
|
useCustomTools: useCustomToolModel,
|
|
16674
16672
|
hasAccessToPreview: shouldShowPreviewModels,
|
|
16675
16673
|
hasAccessToProModel
|
|
@@ -16711,7 +16709,6 @@ function ModelDialog({ onClose }) {
|
|
|
16711
16709
|
shouldShowPreviewModels,
|
|
16712
16710
|
manualModelSelected,
|
|
16713
16711
|
useGemini31,
|
|
16714
|
-
useGemini31FlashLite,
|
|
16715
16712
|
useCustomToolModel,
|
|
16716
16713
|
hasAccessToProModel
|
|
16717
16714
|
]);
|
|
@@ -16719,7 +16716,6 @@ function ModelDialog({ onClose }) {
|
|
|
16719
16716
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
|
|
16720
16717
|
const allOptions = config.getModelConfigService().getAvailableModelOptions({
|
|
16721
16718
|
useGemini3_1: useGemini31,
|
|
16722
|
-
useGemini3_1FlashLite: useGemini31FlashLite,
|
|
16723
16719
|
useCustomTools: useCustomToolModel,
|
|
16724
16720
|
hasAccessToPreview: shouldShowPreviewModels,
|
|
16725
16721
|
hasAccessToProModel
|
|
@@ -16737,15 +16733,15 @@ function ModelDialog({ onClose }) {
|
|
|
16737
16733
|
title: getDisplayString(DEFAULT_GEMINI_MODEL),
|
|
16738
16734
|
key: DEFAULT_GEMINI_MODEL
|
|
16739
16735
|
},
|
|
16740
|
-
{
|
|
16741
|
-
value: DEFAULT_GEMINI_FLASH_MODEL,
|
|
16742
|
-
title: getDisplayString(DEFAULT_GEMINI_FLASH_MODEL),
|
|
16743
|
-
key: DEFAULT_GEMINI_FLASH_MODEL
|
|
16744
|
-
},
|
|
16745
16736
|
{
|
|
16746
16737
|
value: DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
16747
16738
|
title: getDisplayString(DEFAULT_GEMINI_FLASH_LITE_MODEL),
|
|
16748
16739
|
key: DEFAULT_GEMINI_FLASH_LITE_MODEL
|
|
16740
|
+
},
|
|
16741
|
+
{
|
|
16742
|
+
value: DEFAULT_GEMINI_FLASH_MODEL,
|
|
16743
|
+
title: getDisplayString(DEFAULT_GEMINI_FLASH_MODEL),
|
|
16744
|
+
key: DEFAULT_GEMINI_FLASH_MODEL
|
|
16749
16745
|
}
|
|
16750
16746
|
];
|
|
16751
16747
|
if (showGemmaModels) {
|
|
@@ -16777,11 +16773,11 @@ function ModelDialog({ onClose }) {
|
|
|
16777
16773
|
key: PREVIEW_GEMINI_FLASH_MODEL
|
|
16778
16774
|
}
|
|
16779
16775
|
];
|
|
16780
|
-
if (
|
|
16776
|
+
if (PREVIEW_GEMINI_FLASH_LITE_MODEL !== "none") {
|
|
16781
16777
|
previewOptions.push({
|
|
16782
|
-
value:
|
|
16783
|
-
title: getDisplayString(
|
|
16784
|
-
key:
|
|
16778
|
+
value: PREVIEW_GEMINI_FLASH_LITE_MODEL,
|
|
16779
|
+
title: getDisplayString(PREVIEW_GEMINI_FLASH_LITE_MODEL),
|
|
16780
|
+
key: PREVIEW_GEMINI_FLASH_LITE_MODEL
|
|
16785
16781
|
});
|
|
16786
16782
|
}
|
|
16787
16783
|
options2.unshift(...previewOptions);
|
|
@@ -16793,12 +16789,21 @@ function ModelDialog({ onClose }) {
|
|
|
16793
16789
|
}, [
|
|
16794
16790
|
shouldShowPreviewModels,
|
|
16795
16791
|
useGemini31,
|
|
16796
|
-
useGemini31FlashLite,
|
|
16797
16792
|
useCustomToolModel,
|
|
16798
16793
|
hasAccessToProModel,
|
|
16799
16794
|
config
|
|
16800
16795
|
]);
|
|
16801
|
-
const options =
|
|
16796
|
+
const options = (0, import_react55.useMemo)(() => {
|
|
16797
|
+
const rawOptions = view === "main" ? mainOptions : manualOptions;
|
|
16798
|
+
const seen = /* @__PURE__ */ new Set();
|
|
16799
|
+
return rawOptions.filter((option) => {
|
|
16800
|
+
if (seen.has(option.value)) {
|
|
16801
|
+
return false;
|
|
16802
|
+
}
|
|
16803
|
+
seen.add(option.value);
|
|
16804
|
+
return true;
|
|
16805
|
+
});
|
|
16806
|
+
}, [view, mainOptions, manualOptions]);
|
|
16802
16807
|
const initialIndex = (0, import_react55.useMemo)(() => {
|
|
16803
16808
|
const idx = options.findIndex((option) => option.value === preferredModel);
|
|
16804
16809
|
if (idx !== -1) {
|
|
@@ -29995,7 +30000,7 @@ function useVim(buffer, onSubmit) {
|
|
|
29995
30000
|
return true;
|
|
29996
30001
|
}
|
|
29997
30002
|
dispatch({ type: "CLEAR_PENDING_STATES" });
|
|
29998
|
-
if (normalizedKey.insertable) {
|
|
30003
|
+
if (normalizedKey.insertable && !normalizedKey.ctrl && !normalizedKey.alt && !normalizedKey.cmd) {
|
|
29999
30004
|
return true;
|
|
30000
30005
|
}
|
|
30001
30006
|
return false;
|
|
@@ -31913,8 +31918,6 @@ import process11 from "node:process";
|
|
|
31913
31918
|
function useSuspend({
|
|
31914
31919
|
handleWarning,
|
|
31915
31920
|
setRawMode,
|
|
31916
|
-
refreshStatic,
|
|
31917
|
-
setForceRerenderKey,
|
|
31918
31921
|
shouldUseAlternateScreen
|
|
31919
31922
|
}) {
|
|
31920
31923
|
const [ctrlZPressCount, setCtrlZPressCount] = (0, import_react117.useState)(0);
|
|
@@ -31976,10 +31979,6 @@ function useSuspend({
|
|
|
31976
31979
|
enableMouseEvents();
|
|
31977
31980
|
}
|
|
31978
31981
|
process11.stdout.emit("resize");
|
|
31979
|
-
setImmediate(() => {
|
|
31980
|
-
refreshStatic();
|
|
31981
|
-
setForceRerenderKey((prev) => prev + 1);
|
|
31982
|
-
});
|
|
31983
31982
|
} finally {
|
|
31984
31983
|
if (onResumeHandlerRef.current === onResume) {
|
|
31985
31984
|
onResumeHandlerRef.current = null;
|
|
@@ -32002,14 +32001,7 @@ function useSuspend({
|
|
|
32002
32001
|
ctrlZTimerRef.current = null;
|
|
32003
32002
|
}, WARNING_PROMPT_DURATION_MS);
|
|
32004
32003
|
}
|
|
32005
|
-
}, [
|
|
32006
|
-
ctrlZPressCount,
|
|
32007
|
-
handleWarning,
|
|
32008
|
-
setRawMode,
|
|
32009
|
-
refreshStatic,
|
|
32010
|
-
setForceRerenderKey,
|
|
32011
|
-
shouldUseAlternateScreen
|
|
32012
|
-
]);
|
|
32004
|
+
}, [ctrlZPressCount, handleWarning, setRawMode, shouldUseAlternateScreen]);
|
|
32013
32005
|
const handleSuspend = (0, import_react117.useCallback)(() => {
|
|
32014
32006
|
setCtrlZPressCount((prev) => prev + 1);
|
|
32015
32007
|
}, []);
|
|
@@ -32428,7 +32420,6 @@ var AppContainer = (props) => {
|
|
|
32428
32420
|
}
|
|
32429
32421
|
}, [mouseMode, setOptions]);
|
|
32430
32422
|
const [corgiMode, setCorgiMode] = (0, import_react121.useState)(false);
|
|
32431
|
-
const [forceRerenderKey, setForceRerenderKey] = (0, import_react121.useState)(0);
|
|
32432
32423
|
const [debugMessage, setDebugMessage] = (0, import_react121.useState)("");
|
|
32433
32424
|
const [quittingMessages, setQuittingMessages] = (0, import_react121.useState)(null);
|
|
32434
32425
|
const [showPrivacyNotice, setShowPrivacyNotice] = (0, import_react121.useState)(false);
|
|
@@ -33543,7 +33534,6 @@ ${queuedText}` : queuedText;
|
|
|
33543
33534
|
needsRestart: ideNeedsRestart,
|
|
33544
33535
|
restartReason: ideTrustRestartReason
|
|
33545
33536
|
} = useIdeTrustListener();
|
|
33546
|
-
const isInitialMount = (0, import_react121.useRef)(true);
|
|
33547
33537
|
useIncludeDirsTrust(config, isTrustedFolder, historyManager, setCustomDialog);
|
|
33548
33538
|
const tabFocusTimeoutRef = (0, import_react121.useRef)(null);
|
|
33549
33539
|
(0, import_react121.useEffect)(() => {
|
|
@@ -33586,8 +33576,6 @@ ${queuedText}` : queuedText;
|
|
|
33586
33576
|
const { handleSuspend } = useSuspend({
|
|
33587
33577
|
handleWarning,
|
|
33588
33578
|
setRawMode,
|
|
33589
|
-
refreshStatic,
|
|
33590
|
-
setForceRerenderKey,
|
|
33591
33579
|
shouldUseAlternateScreen
|
|
33592
33580
|
});
|
|
33593
33581
|
(0, import_react121.useEffect)(() => {
|
|
@@ -33595,18 +33583,6 @@ ${queuedText}` : queuedText;
|
|
|
33595
33583
|
setShowIdeRestartPrompt(true);
|
|
33596
33584
|
}
|
|
33597
33585
|
}, [ideNeedsRestart]);
|
|
33598
|
-
(0, import_react121.useEffect)(() => {
|
|
33599
|
-
if (isInitialMount.current) {
|
|
33600
|
-
isInitialMount.current = false;
|
|
33601
|
-
return;
|
|
33602
|
-
}
|
|
33603
|
-
const handler = setTimeout(() => {
|
|
33604
|
-
refreshStatic();
|
|
33605
|
-
}, 300);
|
|
33606
|
-
return () => {
|
|
33607
|
-
clearTimeout(handler);
|
|
33608
|
-
};
|
|
33609
|
-
}, [terminalWidth, refreshStatic]);
|
|
33610
33586
|
(0, import_react121.useEffect)(() => {
|
|
33611
33587
|
const unsubscribe = ideContextStore.subscribe(setIdeContextState);
|
|
33612
33588
|
setIdeContextState(ideContextStore.get());
|
|
@@ -33726,7 +33702,7 @@ ${queuedText}` : queuedText;
|
|
|
33726
33702
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
33727
33703
|
if (settings.merged.general.devtools) {
|
|
33728
33704
|
void (async () => {
|
|
33729
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
33705
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-4Y2RGEUE.js");
|
|
33730
33706
|
await toggleDevToolsPanel(
|
|
33731
33707
|
config,
|
|
33732
33708
|
showErrorDetails,
|
|
@@ -34535,7 +34511,7 @@ ${queuedText}` : queuedText;
|
|
|
34535
34511
|
isExpanded,
|
|
34536
34512
|
toggleExpansion,
|
|
34537
34513
|
toggleAllExpansion,
|
|
34538
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(ShellFocusContext.Provider, { value: isFocused, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(MouseProvider, { mouseEventsEnabled: mouseMode, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(ScrollProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(App, {}
|
|
34514
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(ShellFocusContext.Provider, { value: isFocused, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(MouseProvider, { mouseEventsEnabled: mouseMode, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(ScrollProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(App, {}) }) }) })
|
|
34539
34515
|
}
|
|
34540
34516
|
)
|
|
34541
34517
|
}
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
DEFAULT_PORT,
|
|
4
4
|
getBinaryPath,
|
|
5
5
|
isServerRunning
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-2H5DC5TA.js";
|
|
7
|
+
import "./chunk-HYJ253BF.js";
|
|
8
8
|
import {
|
|
9
9
|
debugLogger
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZAP2IAMA.js";
|
|
11
11
|
import "./chunk-6HI7VNOG.js";
|
|
12
12
|
import "./chunk-TUDYL3X4.js";
|
|
13
13
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -41,7 +41,7 @@ var LiteRtServerManager = class {
|
|
|
41
41
|
`[LiteRtServerManager] Auto-starting LiteRT server on port ${port}...`
|
|
42
42
|
);
|
|
43
43
|
try {
|
|
44
|
-
const { startServer } = await import("./start-
|
|
44
|
+
const { startServer } = await import("./start-6J7J6MU3.js");
|
|
45
45
|
const started = await startServer(binaryPath, port);
|
|
46
46
|
if (started) {
|
|
47
47
|
debugLogger.log(`[LiteRtServerManager] Server started on port ${port}`);
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
DEFAULT_PORT,
|
|
4
4
|
getBinaryPath,
|
|
5
5
|
isServerRunning
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-GIXFMPPJ.js";
|
|
7
|
+
import "./chunk-WPCNMQ6J.js";
|
|
8
8
|
import {
|
|
9
9
|
debugLogger
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CWAXEILN.js";
|
|
11
11
|
import "./chunk-6HI7VNOG.js";
|
|
12
12
|
import "./chunk-TUDYL3X4.js";
|
|
13
13
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -41,7 +41,7 @@ var LiteRtServerManager = class {
|
|
|
41
41
|
`[LiteRtServerManager] Auto-starting LiteRT server on port ${port}...`
|
|
42
42
|
);
|
|
43
43
|
try {
|
|
44
|
-
const { startServer } = await import("./start-
|
|
44
|
+
const { startServer } = await import("./start-XLIGOOW3.js");
|
|
45
45
|
const started = await startServer(binaryPath, port);
|
|
46
46
|
if (started) {
|
|
47
47
|
debugLogger.log(`[LiteRtServerManager] Server started on port ${port}`);
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
DEFAULT_PORT,
|
|
4
4
|
getBinaryPath,
|
|
5
5
|
isServerRunning
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-LM7IUUPG.js";
|
|
7
|
+
import "./chunk-VONINEZL.js";
|
|
8
8
|
import {
|
|
9
9
|
debugLogger
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FBTNPKPG.js";
|
|
11
11
|
import "./chunk-6HI7VNOG.js";
|
|
12
12
|
import "./chunk-TUDYL3X4.js";
|
|
13
13
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -41,7 +41,7 @@ var LiteRtServerManager = class {
|
|
|
41
41
|
`[LiteRtServerManager] Auto-starting LiteRT server on port ${port}...`
|
|
42
42
|
);
|
|
43
43
|
try {
|
|
44
|
-
const { startServer } = await import("./start-
|
|
44
|
+
const { startServer } = await import("./start-SVVJOUJH.js");
|
|
45
45
|
const started = await startServer(binaryPath, port);
|
|
46
46
|
if (started) {
|
|
47
47
|
debugLogger.log(`[LiteRtServerManager] Server started on port ${port}`);
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
import {
|
|
3
|
+
DEFAULT_PORT,
|
|
4
|
+
getBinaryPath,
|
|
5
|
+
isServerRunning
|
|
6
|
+
} from "./chunk-WE2NPYLF.js";
|
|
7
|
+
import "./chunk-B4GDSUR2.js";
|
|
8
|
+
import {
|
|
9
|
+
debugLogger
|
|
10
|
+
} from "./chunk-GTQYFINA.js";
|
|
11
|
+
import "./chunk-6HI7VNOG.js";
|
|
12
|
+
import "./chunk-TUDYL3X4.js";
|
|
13
|
+
import "./chunk-IUUIT4SU.js";
|
|
14
|
+
import "./chunk-34MYV7JD.js";
|
|
15
|
+
|
|
16
|
+
// packages/cli/src/services/liteRtServerManager.ts
|
|
17
|
+
import fs from "node:fs";
|
|
18
|
+
var LiteRtServerManager = class {
|
|
19
|
+
static async ensureRunning(gemmaSettings) {
|
|
20
|
+
if (!gemmaSettings?.enabled) return;
|
|
21
|
+
if (gemmaSettings.autoStartServer === false) return;
|
|
22
|
+
const binaryPath = getBinaryPath();
|
|
23
|
+
if (!binaryPath || !fs.existsSync(binaryPath)) {
|
|
24
|
+
debugLogger.log(
|
|
25
|
+
'[LiteRtServerManager] Binary not installed, skipping auto-start. Run "gemini gemma setup".'
|
|
26
|
+
);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const port = parseInt(
|
|
30
|
+
gemmaSettings.classifier?.host?.match(/:(\d+)/)?.[1] ?? "",
|
|
31
|
+
10
|
|
32
|
+
) || DEFAULT_PORT;
|
|
33
|
+
const running = await isServerRunning(port);
|
|
34
|
+
if (running) {
|
|
35
|
+
debugLogger.log(
|
|
36
|
+
`[LiteRtServerManager] Server already running on port ${port}`
|
|
37
|
+
);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
debugLogger.log(
|
|
41
|
+
`[LiteRtServerManager] Auto-starting LiteRT server on port ${port}...`
|
|
42
|
+
);
|
|
43
|
+
try {
|
|
44
|
+
const { startServer } = await import("./start-Z3RQJJU3.js");
|
|
45
|
+
const started = await startServer(binaryPath, port);
|
|
46
|
+
if (started) {
|
|
47
|
+
debugLogger.log(`[LiteRtServerManager] Server started on port ${port}`);
|
|
48
|
+
} else {
|
|
49
|
+
debugLogger.warn(
|
|
50
|
+
`[LiteRtServerManager] Server may not have started correctly on port ${port}`
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
} catch (error) {
|
|
54
|
+
debugLogger.warn("[LiteRtServerManager] Auto-start failed:", error);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
LiteRtServerManager
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* @license
|
|
63
|
+
* Copyright 2026 Google LLC
|
|
64
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
65
|
+
*/
|
|
@@ -16,35 +16,35 @@ import {
|
|
|
16
16
|
openBrowserSecurely,
|
|
17
17
|
refreshAccessToken,
|
|
18
18
|
startCallbackServer
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FBTNPKPG.js";
|
|
20
20
|
import "./chunk-6HI7VNOG.js";
|
|
21
21
|
import "./chunk-TUDYL3X4.js";
|
|
22
22
|
import "./chunk-IUUIT4SU.js";
|
|
23
23
|
import "./chunk-34MYV7JD.js";
|
|
24
24
|
|
|
25
|
-
// packages/core/src/agents/auth-provider/oauth2-provider.
|
|
25
|
+
// packages/core/dist/src/agents/auth-provider/oauth2-provider.js
|
|
26
26
|
var OAuth2AuthProvider = class extends BaseA2AAuthProvider {
|
|
27
|
+
config;
|
|
28
|
+
agentName;
|
|
29
|
+
agentCardUrl;
|
|
30
|
+
type = "oauth2";
|
|
31
|
+
tokenStorage;
|
|
32
|
+
cachedToken = null;
|
|
33
|
+
/** Resolved OAuth URLs — may come from config or agent card. */
|
|
34
|
+
authorizationUrl;
|
|
35
|
+
tokenUrl;
|
|
36
|
+
scopes;
|
|
27
37
|
constructor(config, agentName, agentCard, agentCardUrl) {
|
|
28
38
|
super();
|
|
29
39
|
this.config = config;
|
|
30
40
|
this.agentName = agentName;
|
|
31
41
|
this.agentCardUrl = agentCardUrl;
|
|
32
|
-
this.tokenStorage = new MCPOAuthTokenStorage(
|
|
33
|
-
Storage.getA2AOAuthTokensPath(),
|
|
34
|
-
"gemini-cli-a2a"
|
|
35
|
-
);
|
|
42
|
+
this.tokenStorage = new MCPOAuthTokenStorage(Storage.getA2AOAuthTokensPath(), "gemini-cli-a2a");
|
|
36
43
|
this.authorizationUrl = config.authorization_url;
|
|
37
44
|
this.tokenUrl = config.token_url;
|
|
38
45
|
this.scopes = config.scopes;
|
|
39
46
|
this.mergeAgentCardDefaults(agentCard);
|
|
40
47
|
}
|
|
41
|
-
type = "oauth2";
|
|
42
|
-
tokenStorage;
|
|
43
|
-
cachedToken = null;
|
|
44
|
-
/** Resolved OAuth URLs — may come from config or agent card. */
|
|
45
|
-
authorizationUrl;
|
|
46
|
-
tokenUrl;
|
|
47
|
-
scopes;
|
|
48
48
|
/**
|
|
49
49
|
* Initialize the provider by loading any persisted token from storage.
|
|
50
50
|
* Also discovers OAuth URLs from the agent card if not yet resolved.
|
|
@@ -56,9 +56,7 @@ var OAuth2AuthProvider = class extends BaseA2AAuthProvider {
|
|
|
56
56
|
const credentials = await this.tokenStorage.getCredentials(this.agentName);
|
|
57
57
|
if (credentials && !this.tokenStorage.isTokenExpired(credentials.token)) {
|
|
58
58
|
this.cachedToken = credentials.token;
|
|
59
|
-
debugLogger.debug(
|
|
60
|
-
`[OAuth2AuthProvider] Loaded valid cached token for "${this.agentName}"`
|
|
61
|
-
);
|
|
59
|
+
debugLogger.debug(`[OAuth2AuthProvider] Loaded valid cached token for "${this.agentName}"`);
|
|
62
60
|
}
|
|
63
61
|
}
|
|
64
62
|
/**
|
|
@@ -71,25 +69,16 @@ var OAuth2AuthProvider = class extends BaseA2AAuthProvider {
|
|
|
71
69
|
}
|
|
72
70
|
if (this.cachedToken?.refreshToken && this.tokenUrl && this.config.client_id) {
|
|
73
71
|
try {
|
|
74
|
-
const refreshed = await refreshAccessToken(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
this.cachedToken.refreshToken,
|
|
81
|
-
this.tokenUrl
|
|
82
|
-
);
|
|
83
|
-
this.cachedToken = this.toOAuthToken(
|
|
84
|
-
refreshed,
|
|
85
|
-
this.cachedToken.refreshToken
|
|
86
|
-
);
|
|
72
|
+
const refreshed = await refreshAccessToken({
|
|
73
|
+
clientId: this.config.client_id,
|
|
74
|
+
clientSecret: this.config.client_secret,
|
|
75
|
+
scopes: this.scopes
|
|
76
|
+
}, this.cachedToken.refreshToken, this.tokenUrl);
|
|
77
|
+
this.cachedToken = this.toOAuthToken(refreshed, this.cachedToken.refreshToken);
|
|
87
78
|
await this.persistToken();
|
|
88
79
|
return { Authorization: `Bearer ${this.cachedToken.accessToken}` };
|
|
89
80
|
} catch (error) {
|
|
90
|
-
debugLogger.debug(
|
|
91
|
-
`[OAuth2AuthProvider] Refresh failed, falling back to interactive flow: ${getErrorMessage(error)}`
|
|
92
|
-
);
|
|
81
|
+
debugLogger.debug(`[OAuth2AuthProvider] Refresh failed, falling back to interactive flow: ${getErrorMessage(error)}`);
|
|
93
82
|
await this.tokenStorage.deleteCredentials(this.agentName);
|
|
94
83
|
}
|
|
95
84
|
}
|
|
@@ -108,9 +97,7 @@ var OAuth2AuthProvider = class extends BaseA2AAuthProvider {
|
|
|
108
97
|
return void 0;
|
|
109
98
|
}
|
|
110
99
|
this.authRetryCount++;
|
|
111
|
-
debugLogger.debug(
|
|
112
|
-
"[OAuth2AuthProvider] Auth failure, clearing token and re-authenticating"
|
|
113
|
-
);
|
|
100
|
+
debugLogger.debug("[OAuth2AuthProvider] Auth failure, clearing token and re-authenticating");
|
|
114
101
|
this.cachedToken = null;
|
|
115
102
|
await this.tokenStorage.deleteCredentials(this.agentName);
|
|
116
103
|
return this.headers();
|
|
@@ -123,7 +110,8 @@ var OAuth2AuthProvider = class extends BaseA2AAuthProvider {
|
|
|
123
110
|
* `securitySchemes` when not already provided via user config.
|
|
124
111
|
*/
|
|
125
112
|
mergeAgentCardDefaults(agentCard) {
|
|
126
|
-
if (!agentCard?.securitySchemes)
|
|
113
|
+
if (!agentCard?.securitySchemes)
|
|
114
|
+
return;
|
|
127
115
|
for (const scheme of Object.values(agentCard.securitySchemes)) {
|
|
128
116
|
if (scheme.type === "oauth2" && scheme.flows.authorizationCode) {
|
|
129
117
|
const flow = scheme.flows.authorizationCode;
|
|
@@ -139,18 +127,15 @@ var OAuth2AuthProvider = class extends BaseA2AAuthProvider {
|
|
|
139
127
|
* (which normalizes proto-format cards) and extract OAuth2 URLs.
|
|
140
128
|
*/
|
|
141
129
|
async fetchAgentCardDefaults() {
|
|
142
|
-
if (!this.agentCardUrl)
|
|
130
|
+
if (!this.agentCardUrl)
|
|
131
|
+
return;
|
|
143
132
|
try {
|
|
144
|
-
debugLogger.debug(
|
|
145
|
-
`[OAuth2AuthProvider] Fetching agent card from ${this.agentCardUrl}`
|
|
146
|
-
);
|
|
133
|
+
debugLogger.debug(`[OAuth2AuthProvider] Fetching agent card from ${this.agentCardUrl}`);
|
|
147
134
|
const resolver = new DefaultAgentCardResolver();
|
|
148
135
|
const card = await resolver.resolve(this.agentCardUrl, "");
|
|
149
136
|
this.mergeAgentCardDefaults(card);
|
|
150
137
|
} catch (error) {
|
|
151
|
-
debugLogger.warn(
|
|
152
|
-
`[OAuth2AuthProvider] Could not fetch agent card for OAuth URL discovery: ${getErrorMessage(error)}`
|
|
153
|
-
);
|
|
138
|
+
debugLogger.warn(`[OAuth2AuthProvider] Could not fetch agent card for OAuth URL discovery: ${getErrorMessage(error)}`);
|
|
154
139
|
}
|
|
155
140
|
}
|
|
156
141
|
/**
|
|
@@ -158,14 +143,10 @@ var OAuth2AuthProvider = class extends BaseA2AAuthProvider {
|
|
|
158
143
|
*/
|
|
159
144
|
async authenticateInteractively() {
|
|
160
145
|
if (!this.config.client_id) {
|
|
161
|
-
throw new Error(
|
|
162
|
-
`OAuth2 authentication for agent "${this.agentName}" requires a client_id. Add client_id to the auth config in your agent definition.`
|
|
163
|
-
);
|
|
146
|
+
throw new Error(`OAuth2 authentication for agent "${this.agentName}" requires a client_id. Add client_id to the auth config in your agent definition.`);
|
|
164
147
|
}
|
|
165
148
|
if (!this.authorizationUrl || !this.tokenUrl) {
|
|
166
|
-
throw new Error(
|
|
167
|
-
`OAuth2 authentication for agent "${this.agentName}" requires authorization_url and token_url. Provide them in the auth config or ensure the agent card exposes an oauth2 security scheme.`
|
|
168
|
-
);
|
|
149
|
+
throw new Error(`OAuth2 authentication for agent "${this.agentName}" requires authorization_url and token_url. Provide them in the auth config or ensure the agent card exposes an oauth2 security scheme.`);
|
|
169
150
|
}
|
|
170
151
|
const flowConfig = {
|
|
171
152
|
clientId: this.config.client_id,
|
|
@@ -184,36 +165,25 @@ var OAuth2AuthProvider = class extends BaseA2AAuthProvider {
|
|
|
184
165
|
redirectPort,
|
|
185
166
|
/* resource= */
|
|
186
167
|
void 0
|
|
187
|
-
// No MCP resource parameter for A2A.
|
|
188
|
-
);
|
|
189
|
-
const consent = await getConsentForOauth(
|
|
190
|
-
`Authentication required for A2A agent: '${this.agentName}'.`
|
|
191
168
|
);
|
|
169
|
+
const consent = await getConsentForOauth(`Authentication required for A2A agent: '${this.agentName}'.`);
|
|
192
170
|
if (!consent) {
|
|
193
171
|
throw new FatalCancellationError("Authentication cancelled by user.");
|
|
194
172
|
}
|
|
195
|
-
coreEvents.emitFeedback(
|
|
196
|
-
"info",
|
|
197
|
-
`\u2192 Opening your browser for OAuth sign-in...
|
|
173
|
+
coreEvents.emitFeedback("info", `\u2192 Opening your browser for OAuth sign-in...
|
|
198
174
|
|
|
199
175
|
If the browser does not open, copy and paste this URL into your browser:
|
|
200
176
|
${authUrl}
|
|
201
177
|
|
|
202
178
|
\u{1F4A1} TIP: Triple-click to select the entire URL, then copy and paste it into your browser.
|
|
203
|
-
\u26A0\uFE0F Make sure to copy the COMPLETE URL - it may wrap across multiple lines.`
|
|
204
|
-
);
|
|
179
|
+
\u26A0\uFE0F Make sure to copy the COMPLETE URL - it may wrap across multiple lines.`);
|
|
205
180
|
try {
|
|
206
181
|
await openBrowserSecurely(authUrl);
|
|
207
182
|
} catch (error) {
|
|
208
|
-
debugLogger.warn(
|
|
209
|
-
"Failed to open browser automatically:",
|
|
210
|
-
getErrorMessage(error)
|
|
211
|
-
);
|
|
183
|
+
debugLogger.warn("Failed to open browser automatically:", getErrorMessage(error));
|
|
212
184
|
}
|
|
213
185
|
const { code } = await callbackServer.response;
|
|
214
|
-
debugLogger.debug(
|
|
215
|
-
"\u2713 Authorization code received, exchanging for tokens..."
|
|
216
|
-
);
|
|
186
|
+
debugLogger.debug("\u2713 Authorization code received, exchanging for tokens...");
|
|
217
187
|
const tokenResponse = await exchangeCodeForToken(
|
|
218
188
|
flowConfig,
|
|
219
189
|
code,
|
|
@@ -250,13 +220,9 @@ ${authUrl}
|
|
|
250
220
|
* Persist the current cached token to disk.
|
|
251
221
|
*/
|
|
252
222
|
async persistToken() {
|
|
253
|
-
if (!this.cachedToken)
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
this.cachedToken,
|
|
257
|
-
this.config.client_id,
|
|
258
|
-
this.tokenUrl
|
|
259
|
-
);
|
|
223
|
+
if (!this.cachedToken)
|
|
224
|
+
return;
|
|
225
|
+
await this.tokenStorage.saveToken(this.agentName, this.cachedToken, this.config.client_id, this.tokenUrl);
|
|
260
226
|
}
|
|
261
227
|
};
|
|
262
228
|
export {
|