@google/gemini-cli-core 0.44.0-nightly.20260521.g57c42a5c4 → 0.44.0-preview.0
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/dist/docs/changelogs/preview.md +6 -3
- package/dist/src/agents/agentLoader.d.ts +38 -38
- package/dist/src/availability/testUtils.js +1 -1
- package/dist/src/availability/testUtils.js.map +1 -1
- package/dist/src/config/config.d.ts +3 -1
- package/dist/src/config/config.js +36 -2
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +58 -0
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/flashFallback.test.js +31 -0
- package/dist/src/config/flashFallback.test.js.map +1 -1
- package/dist/src/confirmation-bus/message-bus.d.ts +3 -1
- package/dist/src/confirmation-bus/message-bus.js +14 -5
- package/dist/src/confirmation-bus/message-bus.js.map +1 -1
- package/dist/src/confirmation-bus/message-bus.test.js +34 -0
- package/dist/src/confirmation-bus/message-bus.test.js.map +1 -1
- package/dist/src/context/config/profiles.js +2 -2
- package/dist/src/context/config/profiles.js.map +1 -1
- package/dist/src/context/contextManager.barrier.test.js +13 -13
- package/dist/src/context/contextManager.barrier.test.js.map +1 -1
- package/dist/src/context/contextManager.d.ts +9 -21
- package/dist/src/context/contextManager.js +77 -137
- package/dist/src/context/contextManager.js.map +1 -1
- package/dist/src/context/contextManager.test.d.ts +6 -0
- package/dist/src/context/contextManager.test.js +104 -0
- package/dist/src/context/contextManager.test.js.map +1 -0
- package/dist/src/context/graph/mapper.d.ts +2 -2
- package/dist/src/context/graph/mapper.js +2 -2
- package/dist/src/context/graph/mapper.js.map +1 -1
- package/dist/src/context/graph/mapper.test.js +4 -6
- package/dist/src/context/graph/mapper.test.js.map +1 -1
- package/dist/src/context/graph/render.d.ts +12 -1
- package/dist/src/context/graph/render.js +68 -24
- package/dist/src/context/graph/render.js.map +1 -1
- package/dist/src/context/graph/render.test.js +76 -6
- package/dist/src/context/graph/render.test.js.map +1 -1
- package/dist/src/context/graph/toGraph.js +36 -38
- package/dist/src/context/graph/toGraph.js.map +1 -1
- package/dist/src/context/initializer.js +2 -6
- package/dist/src/context/initializer.js.map +1 -1
- package/dist/src/context/pipeline/orchestrator.d.ts +5 -6
- package/dist/src/context/pipeline/orchestrator.js +49 -151
- package/dist/src/context/pipeline/orchestrator.js.map +1 -1
- package/dist/src/context/pipeline/orchestrator.test.js +4 -8
- package/dist/src/context/pipeline/orchestrator.test.js.map +1 -1
- package/dist/src/context/processors/stateSnapshotAsyncProcessor.js +3 -0
- package/dist/src/context/processors/stateSnapshotAsyncProcessor.js.map +1 -1
- package/dist/src/context/processors/stateSnapshotProcessor.js +6 -0
- package/dist/src/context/processors/stateSnapshotProcessor.js.map +1 -1
- package/dist/src/context/system-tests/lifecycle.golden.test.js +4 -2
- package/dist/src/context/system-tests/lifecycle.golden.test.js.map +1 -1
- package/dist/src/context/system-tests/simulationHarness.js +19 -8
- package/dist/src/context/system-tests/simulationHarness.js.map +1 -1
- package/dist/src/context/testing/contextTestUtils.d.ts +1 -0
- package/dist/src/context/testing/contextTestUtils.js +2 -1
- package/dist/src/context/testing/contextTestUtils.js.map +1 -1
- package/dist/src/core/agentChatHistory.d.ts +1 -12
- package/dist/src/core/agentChatHistory.js +1 -17
- package/dist/src/core/agentChatHistory.js.map +1 -1
- package/dist/src/core/client.d.ts +1 -1
- package/dist/src/core/client.js +22 -13
- package/dist/src/core/client.js.map +1 -1
- package/dist/src/core/client.test.js +10 -10
- package/dist/src/core/client.test.js.map +1 -1
- package/dist/src/core/geminiChat.d.ts +2 -4
- package/dist/src/core/geminiChat.js +91 -53
- package/dist/src/core/geminiChat.js.map +1 -1
- package/dist/src/core/geminiChat.test.js +7 -1
- package/dist/src/core/geminiChat.test.js.map +1 -1
- package/dist/src/core/turn.d.ts +6 -2
- package/dist/src/core/turn.js +3 -2
- package/dist/src/core/turn.js.map +1 -1
- package/dist/src/core/turn.test.js +1 -2
- package/dist/src/core/turn.test.js.map +1 -1
- package/dist/src/fallback/handler.js +15 -5
- package/dist/src/fallback/handler.js.map +1 -1
- package/dist/src/fallback/handler.test.js +6 -2
- package/dist/src/fallback/handler.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/generated/git-commit.js.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/sandbox/utils/commandUtils.js +5 -1
- package/dist/src/sandbox/utils/commandUtils.js.map +1 -1
- package/dist/src/services/chatRecordingService.d.ts +0 -6
- package/dist/src/services/chatRecordingService.js +76 -131
- package/dist/src/services/chatRecordingService.js.map +1 -1
- package/dist/src/services/gitService.js +23 -22
- package/dist/src/services/gitService.js.map +1 -1
- package/dist/src/services/modelConfigService.d.ts +1 -0
- package/dist/src/services/modelConfigService.js +3 -0
- package/dist/src/services/modelConfigService.js.map +1 -1
- package/dist/src/services/modelConfigService.test.js +16 -0
- package/dist/src/services/modelConfigService.test.js.map +1 -1
- package/dist/src/services/shellExecutionService.js +53 -4
- package/dist/src/services/shellExecutionService.js.map +1 -1
- package/dist/src/services/shellExecutionService.test.js +17 -7
- package/dist/src/services/shellExecutionService.test.js.map +1 -1
- package/dist/src/tools/mcp-client.js +9 -16
- package/dist/src/tools/mcp-client.js.map +1 -1
- package/dist/src/tools/mcp-client.test.js +39 -37
- package/dist/src/tools/mcp-client.test.js.map +1 -1
- package/dist/src/tools/{xcode-mcp-fix-transport.d.ts → mcp-compliance-transport.d.ts} +6 -6
- package/dist/src/tools/{xcode-mcp-fix-transport.js → mcp-compliance-transport.js} +6 -6
- package/dist/src/tools/mcp-compliance-transport.js.map +1 -0
- package/dist/src/tools/mcp-compliance-transport.test.d.ts +6 -0
- package/dist/src/tools/mcp-compliance-transport.test.js +162 -0
- package/dist/src/tools/mcp-compliance-transport.test.js.map +1 -0
- package/dist/src/tools/ripGrep.js +6 -2
- package/dist/src/tools/ripGrep.js.map +1 -1
- package/dist/src/tools/ripGrep.test.js +36 -1
- package/dist/src/tools/ripGrep.test.js.map +1 -1
- package/dist/src/tools/shell.d.ts +4 -3
- package/dist/src/tools/shell.js +16 -15
- package/dist/src/tools/shell.js.map +1 -1
- package/dist/src/tools/shell.test.js +43 -13
- package/dist/src/tools/shell.test.js.map +1 -1
- package/dist/src/tools/shell_proactive.test.js +1 -0
- package/dist/src/tools/shell_proactive.test.js.map +1 -1
- package/dist/src/utils/atCommandUtils.d.ts +35 -0
- package/dist/src/utils/atCommandUtils.js +163 -0
- package/dist/src/utils/atCommandUtils.js.map +1 -0
- package/dist/src/utils/atCommandUtils.test.d.ts +6 -0
- package/dist/src/utils/atCommandUtils.test.js +292 -0
- package/dist/src/utils/atCommandUtils.test.js.map +1 -0
- package/dist/src/utils/environmentContext.js +14 -2
- package/dist/src/utils/environmentContext.js.map +1 -1
- package/dist/src/utils/historyHardening.d.ts +6 -0
- package/dist/src/utils/historyHardening.js +14 -8
- package/dist/src/utils/historyHardening.js.map +1 -1
- package/dist/src/utils/path-validator.d.ts +17 -0
- package/dist/src/utils/path-validator.js +76 -0
- package/dist/src/utils/path-validator.js.map +1 -0
- package/dist/src/utils/path-validator.test.d.ts +6 -0
- package/dist/src/utils/path-validator.test.js +91 -0
- package/dist/src/utils/path-validator.test.js.map +1 -0
- package/dist/src/utils/paths.js +9 -1
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/paths.test.js +46 -0
- package/dist/src/utils/paths.test.js.map +1 -1
- package/dist/src/utils/sessionOperations.d.ts +26 -0
- package/dist/src/utils/sessionOperations.js +177 -8
- package/dist/src/utils/sessionOperations.js.map +1 -1
- package/dist/src/utils/sessionUtils.d.ts +9 -0
- package/dist/src/utils/sessionUtils.js +123 -68
- package/dist/src/utils/sessionUtils.js.map +1 -1
- package/dist/src/utils/shell-utils.d.ts +19 -1
- package/dist/src/utils/shell-utils.js +49 -6
- package/dist/src/utils/shell-utils.js.map +1 -1
- package/dist/src/utils/shell-utils.test.js +69 -6
- package/dist/src/utils/shell-utils.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/google-gemini-cli-core-0.44.0-nightly.20260512.g022e8baef.tgz +0 -0
- package/dist/src/context/historyObserver.d.ts +0 -26
- package/dist/src/context/historyObserver.js +0 -69
- package/dist/src/context/historyObserver.js.map +0 -1
- package/dist/src/tools/xcode-mcp-fix-transport.js.map +0 -1
- package/dist/src/tools/xcode-mcp-fix-transport.test.d.ts +0 -1
- package/dist/src/tools/xcode-mcp-fix-transport.test.js +0 -98
- package/dist/src/tools/xcode-mcp-fix-transport.test.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Preview release: v0.43.0-preview.
|
|
1
|
+
# Preview release: v0.43.0-preview.1
|
|
2
2
|
|
|
3
|
-
Released: May
|
|
3
|
+
Released: May 19, 2026
|
|
4
4
|
|
|
5
5
|
Our preview release includes the latest, new, and experimental features. This
|
|
6
6
|
release may not be as stable as our [latest weekly release](latest.md).
|
|
@@ -26,6 +26,9 @@ npm install -g @google/gemini-cli@preview
|
|
|
26
26
|
|
|
27
27
|
## What's Changed
|
|
28
28
|
|
|
29
|
+
- fix(patch): cherry-pick 85566a7 to release/v0.43.0-preview.0-pr-27073
|
|
30
|
+
[CONFLICTS] by @gemini-cli-robot in
|
|
31
|
+
[#27256](https://github.com/google-gemini/gemini-cli/pull/27256)
|
|
29
32
|
- feat(core): steer model to use edit tool for surgical edits, fix a typo in
|
|
30
33
|
[#26480](https://github.com/google-gemini/gemini-cli/pull/26480)
|
|
31
34
|
- docs: clarify Auto Memory proposes memory updates and skills in
|
|
@@ -193,4 +196,4 @@ npm install -g @google/gemini-cli@preview
|
|
|
193
196
|
[#26949](https://github.com/google-gemini/gemini-cli/pull/26949)
|
|
194
197
|
|
|
195
198
|
**Full Changelog**:
|
|
196
|
-
https://github.com/google-gemini/gemini-cli/compare/v0.42.0-preview.2...v0.43.0-preview.
|
|
199
|
+
https://github.com/google-gemini/gemini-cli/compare/v0.42.0-preview.2...v0.43.0-preview.1
|
|
@@ -64,11 +64,11 @@ declare const localAgentSchema: z.ZodObject<{
|
|
|
64
64
|
}, "strip", z.ZodTypeAny, {
|
|
65
65
|
type: "oauth";
|
|
66
66
|
scopes?: string[] | undefined;
|
|
67
|
-
audiences?: string[] | undefined;
|
|
68
67
|
client_id?: string | undefined;
|
|
69
|
-
redirect_uri?: string | undefined;
|
|
70
68
|
client_secret?: string | undefined;
|
|
69
|
+
redirect_uri?: string | undefined;
|
|
71
70
|
token_url?: string | undefined;
|
|
71
|
+
audiences?: string[] | undefined;
|
|
72
72
|
authorization_url?: string | undefined;
|
|
73
73
|
issuer?: string | undefined;
|
|
74
74
|
token_param_name?: string | undefined;
|
|
@@ -76,11 +76,11 @@ declare const localAgentSchema: z.ZodObject<{
|
|
|
76
76
|
}, {
|
|
77
77
|
type: "oauth";
|
|
78
78
|
scopes?: string[] | undefined;
|
|
79
|
-
audiences?: string[] | undefined;
|
|
80
79
|
client_id?: string | undefined;
|
|
81
|
-
redirect_uri?: string | undefined;
|
|
82
80
|
client_secret?: string | undefined;
|
|
81
|
+
redirect_uri?: string | undefined;
|
|
83
82
|
token_url?: string | undefined;
|
|
83
|
+
audiences?: string[] | undefined;
|
|
84
84
|
authorization_url?: string | undefined;
|
|
85
85
|
issuer?: string | undefined;
|
|
86
86
|
token_param_name?: string | undefined;
|
|
@@ -99,11 +99,11 @@ declare const localAgentSchema: z.ZodObject<{
|
|
|
99
99
|
} | {
|
|
100
100
|
type: "oauth";
|
|
101
101
|
scopes?: string[] | undefined;
|
|
102
|
-
audiences?: string[] | undefined;
|
|
103
102
|
client_id?: string | undefined;
|
|
104
|
-
redirect_uri?: string | undefined;
|
|
105
103
|
client_secret?: string | undefined;
|
|
104
|
+
redirect_uri?: string | undefined;
|
|
106
105
|
token_url?: string | undefined;
|
|
106
|
+
audiences?: string[] | undefined;
|
|
107
107
|
authorization_url?: string | undefined;
|
|
108
108
|
issuer?: string | undefined;
|
|
109
109
|
token_param_name?: string | undefined;
|
|
@@ -130,11 +130,11 @@ declare const localAgentSchema: z.ZodObject<{
|
|
|
130
130
|
} | {
|
|
131
131
|
type: "oauth";
|
|
132
132
|
scopes?: string[] | undefined;
|
|
133
|
-
audiences?: string[] | undefined;
|
|
134
133
|
client_id?: string | undefined;
|
|
135
|
-
redirect_uri?: string | undefined;
|
|
136
134
|
client_secret?: string | undefined;
|
|
135
|
+
redirect_uri?: string | undefined;
|
|
137
136
|
token_url?: string | undefined;
|
|
137
|
+
audiences?: string[] | undefined;
|
|
138
138
|
authorization_url?: string | undefined;
|
|
139
139
|
issuer?: string | undefined;
|
|
140
140
|
token_param_name?: string | undefined;
|
|
@@ -160,6 +160,7 @@ declare const localAgentSchema: z.ZodObject<{
|
|
|
160
160
|
model?: string | undefined;
|
|
161
161
|
tools?: string[] | undefined;
|
|
162
162
|
temperature?: number | undefined;
|
|
163
|
+
max_turns?: number | undefined;
|
|
163
164
|
mcp_servers?: Record<string, {
|
|
164
165
|
type?: "http" | "sse" | undefined;
|
|
165
166
|
url?: string | undefined;
|
|
@@ -173,11 +174,11 @@ declare const localAgentSchema: z.ZodObject<{
|
|
|
173
174
|
} | {
|
|
174
175
|
type: "oauth";
|
|
175
176
|
scopes?: string[] | undefined;
|
|
176
|
-
audiences?: string[] | undefined;
|
|
177
177
|
client_id?: string | undefined;
|
|
178
|
-
redirect_uri?: string | undefined;
|
|
179
178
|
client_secret?: string | undefined;
|
|
179
|
+
redirect_uri?: string | undefined;
|
|
180
180
|
token_url?: string | undefined;
|
|
181
|
+
audiences?: string[] | undefined;
|
|
181
182
|
authorization_url?: string | undefined;
|
|
182
183
|
issuer?: string | undefined;
|
|
183
184
|
token_param_name?: string | undefined;
|
|
@@ -192,7 +193,6 @@ declare const localAgentSchema: z.ZodObject<{
|
|
|
192
193
|
include_tools?: string[] | undefined;
|
|
193
194
|
exclude_tools?: string[] | undefined;
|
|
194
195
|
}> | undefined;
|
|
195
|
-
max_turns?: number | undefined;
|
|
196
196
|
display_name?: string | undefined;
|
|
197
197
|
timeout_mins?: number | undefined;
|
|
198
198
|
}, {
|
|
@@ -202,6 +202,7 @@ declare const localAgentSchema: z.ZodObject<{
|
|
|
202
202
|
model?: string | undefined;
|
|
203
203
|
tools?: string[] | undefined;
|
|
204
204
|
temperature?: number | undefined;
|
|
205
|
+
max_turns?: number | undefined;
|
|
205
206
|
mcp_servers?: Record<string, {
|
|
206
207
|
type?: "http" | "sse" | undefined;
|
|
207
208
|
url?: string | undefined;
|
|
@@ -215,11 +216,11 @@ declare const localAgentSchema: z.ZodObject<{
|
|
|
215
216
|
} | {
|
|
216
217
|
type: "oauth";
|
|
217
218
|
scopes?: string[] | undefined;
|
|
218
|
-
audiences?: string[] | undefined;
|
|
219
219
|
client_id?: string | undefined;
|
|
220
|
-
redirect_uri?: string | undefined;
|
|
221
220
|
client_secret?: string | undefined;
|
|
221
|
+
redirect_uri?: string | undefined;
|
|
222
222
|
token_url?: string | undefined;
|
|
223
|
+
audiences?: string[] | undefined;
|
|
223
224
|
authorization_url?: string | undefined;
|
|
224
225
|
issuer?: string | undefined;
|
|
225
226
|
token_param_name?: string | undefined;
|
|
@@ -234,7 +235,6 @@ declare const localAgentSchema: z.ZodObject<{
|
|
|
234
235
|
include_tools?: string[] | undefined;
|
|
235
236
|
exclude_tools?: string[] | undefined;
|
|
236
237
|
}> | undefined;
|
|
237
|
-
max_turns?: number | undefined;
|
|
238
238
|
display_name?: string | undefined;
|
|
239
239
|
timeout_mins?: number | undefined;
|
|
240
240
|
}>;
|
|
@@ -303,11 +303,11 @@ declare const remoteAgentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
303
303
|
}, "strip", z.ZodTypeAny, {
|
|
304
304
|
type: "oauth";
|
|
305
305
|
scopes?: string[] | undefined;
|
|
306
|
-
audiences?: string[] | undefined;
|
|
307
306
|
client_id?: string | undefined;
|
|
308
|
-
redirect_uri?: string | undefined;
|
|
309
307
|
client_secret?: string | undefined;
|
|
308
|
+
redirect_uri?: string | undefined;
|
|
310
309
|
token_url?: string | undefined;
|
|
310
|
+
audiences?: string[] | undefined;
|
|
311
311
|
authorization_url?: string | undefined;
|
|
312
312
|
issuer?: string | undefined;
|
|
313
313
|
token_param_name?: string | undefined;
|
|
@@ -315,11 +315,11 @@ declare const remoteAgentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
315
315
|
}, {
|
|
316
316
|
type: "oauth";
|
|
317
317
|
scopes?: string[] | undefined;
|
|
318
|
-
audiences?: string[] | undefined;
|
|
319
318
|
client_id?: string | undefined;
|
|
320
|
-
redirect_uri?: string | undefined;
|
|
321
319
|
client_secret?: string | undefined;
|
|
320
|
+
redirect_uri?: string | undefined;
|
|
322
321
|
token_url?: string | undefined;
|
|
322
|
+
audiences?: string[] | undefined;
|
|
323
323
|
authorization_url?: string | undefined;
|
|
324
324
|
issuer?: string | undefined;
|
|
325
325
|
token_param_name?: string | undefined;
|
|
@@ -341,11 +341,11 @@ declare const remoteAgentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
341
341
|
} | {
|
|
342
342
|
type: "oauth";
|
|
343
343
|
scopes?: string[] | undefined;
|
|
344
|
-
audiences?: string[] | undefined;
|
|
345
344
|
client_id?: string | undefined;
|
|
346
|
-
redirect_uri?: string | undefined;
|
|
347
345
|
client_secret?: string | undefined;
|
|
346
|
+
redirect_uri?: string | undefined;
|
|
348
347
|
token_url?: string | undefined;
|
|
348
|
+
audiences?: string[] | undefined;
|
|
349
349
|
authorization_url?: string | undefined;
|
|
350
350
|
issuer?: string | undefined;
|
|
351
351
|
token_param_name?: string | undefined;
|
|
@@ -367,11 +367,11 @@ declare const remoteAgentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
367
367
|
} | {
|
|
368
368
|
type: "oauth";
|
|
369
369
|
scopes?: string[] | undefined;
|
|
370
|
-
audiences?: string[] | undefined;
|
|
371
370
|
client_id?: string | undefined;
|
|
372
|
-
redirect_uri?: string | undefined;
|
|
373
371
|
client_secret?: string | undefined;
|
|
372
|
+
redirect_uri?: string | undefined;
|
|
374
373
|
token_url?: string | undefined;
|
|
374
|
+
audiences?: string[] | undefined;
|
|
375
375
|
authorization_url?: string | undefined;
|
|
376
376
|
issuer?: string | undefined;
|
|
377
377
|
token_param_name?: string | undefined;
|
|
@@ -401,11 +401,11 @@ declare const remoteAgentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
401
401
|
} | {
|
|
402
402
|
type: "oauth";
|
|
403
403
|
scopes?: string[] | undefined;
|
|
404
|
-
audiences?: string[] | undefined;
|
|
405
404
|
client_id?: string | undefined;
|
|
406
|
-
redirect_uri?: string | undefined;
|
|
407
405
|
client_secret?: string | undefined;
|
|
406
|
+
redirect_uri?: string | undefined;
|
|
408
407
|
token_url?: string | undefined;
|
|
408
|
+
audiences?: string[] | undefined;
|
|
409
409
|
authorization_url?: string | undefined;
|
|
410
410
|
issuer?: string | undefined;
|
|
411
411
|
token_param_name?: string | undefined;
|
|
@@ -435,11 +435,11 @@ declare const remoteAgentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
435
435
|
} | {
|
|
436
436
|
type: "oauth";
|
|
437
437
|
scopes?: string[] | undefined;
|
|
438
|
-
audiences?: string[] | undefined;
|
|
439
438
|
client_id?: string | undefined;
|
|
440
|
-
redirect_uri?: string | undefined;
|
|
441
439
|
client_secret?: string | undefined;
|
|
440
|
+
redirect_uri?: string | undefined;
|
|
442
441
|
token_url?: string | undefined;
|
|
442
|
+
audiences?: string[] | undefined;
|
|
443
443
|
authorization_url?: string | undefined;
|
|
444
444
|
issuer?: string | undefined;
|
|
445
445
|
token_param_name?: string | undefined;
|
|
@@ -510,11 +510,11 @@ declare const remoteAgentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
510
510
|
}, "strip", z.ZodTypeAny, {
|
|
511
511
|
type: "oauth";
|
|
512
512
|
scopes?: string[] | undefined;
|
|
513
|
-
audiences?: string[] | undefined;
|
|
514
513
|
client_id?: string | undefined;
|
|
515
|
-
redirect_uri?: string | undefined;
|
|
516
514
|
client_secret?: string | undefined;
|
|
515
|
+
redirect_uri?: string | undefined;
|
|
517
516
|
token_url?: string | undefined;
|
|
517
|
+
audiences?: string[] | undefined;
|
|
518
518
|
authorization_url?: string | undefined;
|
|
519
519
|
issuer?: string | undefined;
|
|
520
520
|
token_param_name?: string | undefined;
|
|
@@ -522,11 +522,11 @@ declare const remoteAgentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
522
522
|
}, {
|
|
523
523
|
type: "oauth";
|
|
524
524
|
scopes?: string[] | undefined;
|
|
525
|
-
audiences?: string[] | undefined;
|
|
526
525
|
client_id?: string | undefined;
|
|
527
|
-
redirect_uri?: string | undefined;
|
|
528
526
|
client_secret?: string | undefined;
|
|
527
|
+
redirect_uri?: string | undefined;
|
|
529
528
|
token_url?: string | undefined;
|
|
529
|
+
audiences?: string[] | undefined;
|
|
530
530
|
authorization_url?: string | undefined;
|
|
531
531
|
issuer?: string | undefined;
|
|
532
532
|
token_param_name?: string | undefined;
|
|
@@ -548,11 +548,11 @@ declare const remoteAgentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
548
548
|
} | {
|
|
549
549
|
type: "oauth";
|
|
550
550
|
scopes?: string[] | undefined;
|
|
551
|
-
audiences?: string[] | undefined;
|
|
552
551
|
client_id?: string | undefined;
|
|
553
|
-
redirect_uri?: string | undefined;
|
|
554
552
|
client_secret?: string | undefined;
|
|
553
|
+
redirect_uri?: string | undefined;
|
|
555
554
|
token_url?: string | undefined;
|
|
555
|
+
audiences?: string[] | undefined;
|
|
556
556
|
authorization_url?: string | undefined;
|
|
557
557
|
issuer?: string | undefined;
|
|
558
558
|
token_param_name?: string | undefined;
|
|
@@ -574,11 +574,11 @@ declare const remoteAgentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
574
574
|
} | {
|
|
575
575
|
type: "oauth";
|
|
576
576
|
scopes?: string[] | undefined;
|
|
577
|
-
audiences?: string[] | undefined;
|
|
578
577
|
client_id?: string | undefined;
|
|
579
|
-
redirect_uri?: string | undefined;
|
|
580
578
|
client_secret?: string | undefined;
|
|
579
|
+
redirect_uri?: string | undefined;
|
|
581
580
|
token_url?: string | undefined;
|
|
581
|
+
audiences?: string[] | undefined;
|
|
582
582
|
authorization_url?: string | undefined;
|
|
583
583
|
issuer?: string | undefined;
|
|
584
584
|
token_param_name?: string | undefined;
|
|
@@ -608,11 +608,11 @@ declare const remoteAgentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
608
608
|
} | {
|
|
609
609
|
type: "oauth";
|
|
610
610
|
scopes?: string[] | undefined;
|
|
611
|
-
audiences?: string[] | undefined;
|
|
612
611
|
client_id?: string | undefined;
|
|
613
|
-
redirect_uri?: string | undefined;
|
|
614
612
|
client_secret?: string | undefined;
|
|
613
|
+
redirect_uri?: string | undefined;
|
|
615
614
|
token_url?: string | undefined;
|
|
615
|
+
audiences?: string[] | undefined;
|
|
616
616
|
authorization_url?: string | undefined;
|
|
617
617
|
issuer?: string | undefined;
|
|
618
618
|
token_param_name?: string | undefined;
|
|
@@ -642,11 +642,11 @@ declare const remoteAgentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
642
642
|
} | {
|
|
643
643
|
type: "oauth";
|
|
644
644
|
scopes?: string[] | undefined;
|
|
645
|
-
audiences?: string[] | undefined;
|
|
646
645
|
client_id?: string | undefined;
|
|
647
|
-
redirect_uri?: string | undefined;
|
|
648
646
|
client_secret?: string | undefined;
|
|
647
|
+
redirect_uri?: string | undefined;
|
|
649
648
|
token_url?: string | undefined;
|
|
649
|
+
audiences?: string[] | undefined;
|
|
650
650
|
authorization_url?: string | undefined;
|
|
651
651
|
issuer?: string | undefined;
|
|
652
652
|
token_param_name?: string | undefined;
|
|
@@ -13,7 +13,7 @@ export function createAvailabilityServiceMock(selection = { selectedModel: null,
|
|
|
13
13
|
markHealthy: vi.fn(),
|
|
14
14
|
markRetryOncePerTurn: vi.fn(),
|
|
15
15
|
consumeStickyAttempt: vi.fn(),
|
|
16
|
-
snapshot: vi.fn(),
|
|
16
|
+
snapshot: vi.fn().mockReturnValue({ available: true }),
|
|
17
17
|
resetTurn: vi.fn(),
|
|
18
18
|
selectFirstAvailable: vi.fn().mockReturnValue(selection),
|
|
19
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testUtils.js","sourceRoot":"","sources":["../../../src/availability/testUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAM5B;;GAEG;AACH,MAAM,UAAU,6BAA6B,CAC3C,YAAkC,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAEtE,MAAM,OAAO,GAAG;QACd,YAAY,EAAE,EAAE,CAAC,EAAE,EAAE;QACrB,WAAW,EAAE,EAAE,CAAC,EAAE,EAAE;QACpB,oBAAoB,EAAE,EAAE,CAAC,EAAE,EAAE;QAC7B,oBAAoB,EAAE,EAAE,CAAC,EAAE,EAAE;QAC7B,QAAQ,EAAE,EAAE,CAAC,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"testUtils.js","sourceRoot":"","sources":["../../../src/availability/testUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAM5B;;GAEG;AACH,MAAM,UAAU,6BAA6B,CAC3C,YAAkC,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAEtE,MAAM,OAAO,GAAG;QACd,YAAY,EAAE,EAAE,CAAC,EAAE,EAAE;QACrB,WAAW,EAAE,EAAE,CAAC,EAAE,EAAE;QACpB,oBAAoB,EAAE,EAAE,CAAC,EAAE,EAAE;QAC7B,oBAAoB,EAAE,EAAE,CAAC,EAAE,EAAE;QAC7B,QAAQ,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QACtD,SAAS,EAAE,EAAE,CAAC,EAAE,EAAE;QAClB,oBAAoB,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,SAAS,CAAC;KACzD,CAAC;IAEF,uEAAuE;IACvE,OAAO,OAA8C,CAAC;AACxD,CAAC"}
|
|
@@ -641,6 +641,7 @@ export declare class Config implements McpContext, AgentLoopContext {
|
|
|
641
641
|
private readonly folderTrust;
|
|
642
642
|
private ideMode;
|
|
643
643
|
private _activeModel;
|
|
644
|
+
private fallbackOverrides;
|
|
644
645
|
private readonly maxSessionTurns;
|
|
645
646
|
private readonly listSessions;
|
|
646
647
|
private readonly deleteSession;
|
|
@@ -818,7 +819,8 @@ export declare class Config implements McpContext, AgentLoopContext {
|
|
|
818
819
|
getModel(): string;
|
|
819
820
|
getDisableLoopDetection(): boolean;
|
|
820
821
|
setModel(newModel: string, isTemporary?: boolean): void;
|
|
821
|
-
activateFallbackMode(model: string): void;
|
|
822
|
+
activateFallbackMode(model: string, failedModel?: string): void;
|
|
823
|
+
getFallbackOverride(model: string): string | undefined;
|
|
822
824
|
getActiveModel(): string;
|
|
823
825
|
setActiveModel(model: string): void;
|
|
824
826
|
setFallbackModelHandler(handler: FallbackModelHandler): void;
|
|
@@ -80,6 +80,7 @@ import { SkillManager } from '../skills/skillManager.js';
|
|
|
80
80
|
import { startupProfiler } from '../telemetry/startupProfiler.js';
|
|
81
81
|
import { fetchAdminControls } from '../code_assist/admin/admin_controls.js';
|
|
82
82
|
import { isSubpath, resolveToRealPath } from '../utils/paths.js';
|
|
83
|
+
import { validatePath } from '../utils/path-validator.js';
|
|
83
84
|
import { InjectionService } from './injectionService.js';
|
|
84
85
|
import { ExecutionLifecycleService } from '../services/executionLifecycleService.js';
|
|
85
86
|
import { WORKSPACE_POLICY_TIER } from '../policy/config.js';
|
|
@@ -277,6 +278,7 @@ export class Config {
|
|
|
277
278
|
folderTrust;
|
|
278
279
|
ideMode;
|
|
279
280
|
_activeModel;
|
|
281
|
+
fallbackOverrides = new Map();
|
|
280
282
|
maxSessionTurns;
|
|
281
283
|
listSessions;
|
|
282
284
|
deleteSession;
|
|
@@ -874,6 +876,8 @@ export class Config {
|
|
|
874
876
|
async refreshAuth(authMethod, apiKey, baseUrl, customHeaders) {
|
|
875
877
|
// Reset availability service when switching auth
|
|
876
878
|
this.modelAvailabilityService.reset();
|
|
879
|
+
this.fallbackOverrides.clear();
|
|
880
|
+
this.modelConfigService.clearRuntimeOverrides();
|
|
877
881
|
// Vertex and Genai have incompatible encryption and sending history with
|
|
878
882
|
// thoughtSignature from Genai to Vertex will fail, we need to strip them
|
|
879
883
|
if (this.contentGeneratorConfig?.authType === AuthType.USE_GEMINI &&
|
|
@@ -1066,6 +1070,8 @@ export class Config {
|
|
|
1066
1070
|
this._sessionId = sessionId;
|
|
1067
1071
|
this.storage.setSessionId(sessionId);
|
|
1068
1072
|
this.trackerService = undefined;
|
|
1073
|
+
this.fallbackOverrides.clear();
|
|
1074
|
+
this.modelConfigService.clearRuntimeOverrides();
|
|
1069
1075
|
this.approvedPlanPath = undefined;
|
|
1070
1076
|
this.topicState.reset();
|
|
1071
1077
|
this.skillManager.reset();
|
|
@@ -1143,13 +1149,37 @@ export class Config {
|
|
|
1143
1149
|
}
|
|
1144
1150
|
this.modelAvailabilityService.reset();
|
|
1145
1151
|
}
|
|
1146
|
-
activateFallbackMode(model) {
|
|
1147
|
-
this.
|
|
1152
|
+
activateFallbackMode(model, failedModel) {
|
|
1153
|
+
if (this.getActiveModel() !== model) {
|
|
1154
|
+
this.setModel(model, true);
|
|
1155
|
+
}
|
|
1156
|
+
if (failedModel) {
|
|
1157
|
+
// Chained fallback mitigation: If we already have overrides that point to the model
|
|
1158
|
+
// that just failed, we need to update them to point to the new fallback model.
|
|
1159
|
+
// e.g. A -> B, then B fails and we fallback to C. We must update A to point to C.
|
|
1160
|
+
for (const [source, target] of this.fallbackOverrides.entries()) {
|
|
1161
|
+
if (target === failedModel) {
|
|
1162
|
+
this.fallbackOverrides.set(source, model);
|
|
1163
|
+
this.modelConfigService.registerRuntimeModelOverride({
|
|
1164
|
+
match: { model: source },
|
|
1165
|
+
modelConfig: { model },
|
|
1166
|
+
});
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
this.fallbackOverrides.set(failedModel, model);
|
|
1170
|
+
this.modelConfigService.registerRuntimeModelOverride({
|
|
1171
|
+
match: { model: failedModel },
|
|
1172
|
+
modelConfig: { model },
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
1148
1175
|
const authType = this.getContentGeneratorConfig()?.authType;
|
|
1149
1176
|
if (authType) {
|
|
1150
1177
|
logFlashFallback(this, new FlashFallbackEvent(authType));
|
|
1151
1178
|
}
|
|
1152
1179
|
}
|
|
1180
|
+
getFallbackOverride(model) {
|
|
1181
|
+
return this.fallbackOverrides.get(model);
|
|
1182
|
+
}
|
|
1153
1183
|
getActiveModel() {
|
|
1154
1184
|
return this._activeModel ?? this.model;
|
|
1155
1185
|
}
|
|
@@ -2168,6 +2198,10 @@ export class Config {
|
|
|
2168
2198
|
* @returns An error message string if the path is disallowed, null otherwise.
|
|
2169
2199
|
*/
|
|
2170
2200
|
validatePathAccess(absolutePath, checkType = 'write') {
|
|
2201
|
+
const pathValidation = validatePath(absolutePath);
|
|
2202
|
+
if (!pathValidation.isValid) {
|
|
2203
|
+
return `Invalid path: ${pathValidation.error}`;
|
|
2204
|
+
}
|
|
2171
2205
|
if (checkType === 'write' && hasScopedAutoMemoryExtractionWriteAccess()) {
|
|
2172
2206
|
const resolvedPath = resolveToRealPath(absolutePath);
|
|
2173
2207
|
if (this.isScopedAutoMemoryExtractionWritePathAllowed(absolutePath, resolvedPath)) {
|