@yu_robotics/remote-cli 1.1.21 → 1.1.27
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.
|
@@ -39,6 +39,12 @@ export declare class GeminiExecutor implements IExecutor {
|
|
|
39
39
|
resetContext(): void;
|
|
40
40
|
abort(): Promise<boolean>;
|
|
41
41
|
destroy(): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Runs a single attempt with a specific model alias.
|
|
44
|
+
* Throws on quota errors so the caller can retry with the next model.
|
|
45
|
+
*/
|
|
46
|
+
private executeWithModel;
|
|
42
47
|
private buildGeminiArgs;
|
|
48
|
+
private buildFriendlyError;
|
|
43
49
|
}
|
|
44
50
|
//# sourceMappingURL=GeminiExecutor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeminiExecutor.d.ts","sourceRoot":"","sources":["../../src/executor/GeminiExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIvE,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,gDAAgD;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qFAAqF;IACrF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;
|
|
1
|
+
{"version":3,"file":"GeminiExecutor.d.ts","sourceRoot":"","sources":["../../src/executor/GeminiExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIvE,MAAM,WAAW,qBAAqB;IACpC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const SessionManager_1 = require("./acp/SessionManager");
|
|
6
|
+
/**
|
|
7
|
+
* Maps a Gemini ACP tool call (kind + title) to a Claude-compatible
|
|
8
|
+
* { name, input } shape so the router's ToolFormatter renders it with
|
|
9
|
+
* the same collapsible card style as Claude tools.
|
|
10
|
+
*
|
|
11
|
+
* Gemini ACP kinds: 'exec' | 'read' | 'write' | 'list' | 'service' | ...
|
|
12
|
+
*/
|
|
13
|
+
function mapAcpToolCall(kind, title) {
|
|
14
|
+
switch (kind) {
|
|
15
|
+
case 'exec':
|
|
16
|
+
// Shell command — map to Bash so extractBashContext renders it
|
|
17
|
+
return { name: 'Bash', input: { command: title } };
|
|
18
|
+
case 'read':
|
|
19
|
+
// File read — map to Read so extractReadContext renders it
|
|
20
|
+
return { name: 'Read', input: { file_path: title } };
|
|
21
|
+
case 'write':
|
|
22
|
+
// File write/edit — map to Write
|
|
23
|
+
return { name: 'Write', input: { file_path: title } };
|
|
24
|
+
case 'list':
|
|
25
|
+
// Directory listing — map to Glob
|
|
26
|
+
return { name: 'Glob', input: { pattern: title } };
|
|
27
|
+
case 'service':
|
|
28
|
+
// MCP / service call
|
|
29
|
+
return { name: 'Service', input: { call: title } };
|
|
30
|
+
default:
|
|
31
|
+
// Unknown kind — show raw title under generic tool name
|
|
32
|
+
return { name: kind ?? 'Tool', input: { command: title } };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Gemini CLI stable model aliases used for quota fallback.
|
|
37
|
+
*
|
|
38
|
+
* These are Gemini CLI's own named aliases (not versioned model strings), so
|
|
39
|
+
* they remain valid across model releases. Gemini CLI's ACP mode does NOT
|
|
40
|
+
* implement automatic model fallback on quota exhaustion (unlike interactive
|
|
41
|
+
* mode), so we handle it here instead.
|
|
42
|
+
*
|
|
43
|
+
* Fallback order: user-configured model → flash → flash-lite
|
|
44
|
+
*/
|
|
45
|
+
const QUOTA_FALLBACK_ALIASES = ['flash', 'flash-lite'];
|
|
46
|
+
/** Returns true when the error message indicates a quota-exhaustion condition. */
|
|
47
|
+
function isQuotaError(error) {
|
|
48
|
+
if (!(error instanceof Error))
|
|
49
|
+
return false;
|
|
50
|
+
return error.message.includes('exhausted your capacity') || error.message.includes('quota');
|
|
51
|
+
}
|
|
6
52
|
/**
|
|
7
53
|
* IExecutor implementation for Gemini CLI via ACP (Agent Client Protocol).
|
|
8
54
|
*
|
|
@@ -27,6 +73,10 @@ class GeminiExecutor {
|
|
|
27
73
|
inflightClient = null;
|
|
28
74
|
constructor(directoryGuard, options = {}) {
|
|
29
75
|
this.directoryGuard = directoryGuard;
|
|
76
|
+
// Leave model unset by default so Gemini CLI uses its own default
|
|
77
|
+
// (gemini-2.5-pro). NOTE: '--model auto' maps to gemini-3-pro-preview
|
|
78
|
+
// which has stricter quota limits — do NOT default to 'auto'.
|
|
79
|
+
// Users can override via executor.gemini.model in config.
|
|
30
80
|
this.model = options.model ?? '';
|
|
31
81
|
this.autoApprove = options.autoApprove ?? true;
|
|
32
82
|
this.geminiCommand = options.geminiCommand ?? 'npx';
|
|
@@ -40,14 +90,92 @@ class GeminiExecutor {
|
|
|
40
90
|
if (!this.conversationId) {
|
|
41
91
|
this.conversationId = `conv-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
42
92
|
}
|
|
93
|
+
// Prepend history context for follow-up turns within the same conversation
|
|
94
|
+
const historyContext = this.sessionManager.buildResumeContext(this.conversationId);
|
|
95
|
+
const finalPrompt = historyContext ? `${historyContext}${prompt}` : prompt;
|
|
96
|
+
this.sessionManager.append(this.conversationId, 'user', prompt);
|
|
97
|
+
// Build fallback chain: configured model first, then quota fallback aliases.
|
|
98
|
+
// Filter out aliases that are already the configured model to avoid retrying
|
|
99
|
+
// the same model twice.
|
|
100
|
+
const fallbackAliases = QUOTA_FALLBACK_ALIASES.filter(a => a !== this.model);
|
|
101
|
+
const modelsToTry = [this.model, ...fallbackAliases];
|
|
102
|
+
for (let attempt = 0; attempt < modelsToTry.length; attempt++) {
|
|
103
|
+
const modelForAttempt = modelsToTry[attempt];
|
|
104
|
+
const modelLabel = modelForAttempt || 'pro (default)';
|
|
105
|
+
if (attempt > 0) {
|
|
106
|
+
const notice = `⚠️ Quota exhausted on **${modelsToTry[attempt - 1] || 'pro'}**, switching to **${modelLabel}**...\n\n`;
|
|
107
|
+
options.onStream?.(notice);
|
|
108
|
+
console.warn(`[GeminiExecutor] Quota exhausted on "${modelsToTry[attempt - 1] || 'pro'}", retrying with "${modelLabel}"`);
|
|
109
|
+
}
|
|
110
|
+
try {
|
|
111
|
+
const result = await this.executeWithModel(modelForAttempt, modelLabel, finalPrompt, prompt, options);
|
|
112
|
+
return result;
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
115
|
+
if (isQuotaError(error) && attempt < modelsToTry.length - 1) {
|
|
116
|
+
// Quota exhausted on this model — try the next one in the chain
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
// Final attempt or non-quota error: surface a friendly message
|
|
120
|
+
console.error(`[GeminiExecutor] ❌ Execute error:`, error);
|
|
121
|
+
const msg = error instanceof Error ? error.message : 'Unknown error';
|
|
122
|
+
return { success: false, error: this.buildFriendlyError(msg, modelLabel) };
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// Should never reach here, but satisfy TypeScript
|
|
126
|
+
return { success: false, error: 'All Gemini models exhausted quota.' };
|
|
127
|
+
}
|
|
128
|
+
getCurrentWorkingDirectory() {
|
|
129
|
+
return this.currentWorkingDirectory;
|
|
130
|
+
}
|
|
131
|
+
async setWorkingDirectory(targetPath) {
|
|
132
|
+
const resolved = this.directoryGuard.resolveWorkingDirectory(targetPath);
|
|
133
|
+
this.currentWorkingDirectory = resolved;
|
|
134
|
+
// Changing directory resets the conversation context
|
|
135
|
+
this.conversationId = null;
|
|
136
|
+
}
|
|
137
|
+
resetContext() {
|
|
138
|
+
if (this.conversationId) {
|
|
139
|
+
this.sessionManager.remove(this.conversationId);
|
|
140
|
+
this.conversationId = null;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
async abort() {
|
|
144
|
+
if (!this.inflightClient)
|
|
145
|
+
return false;
|
|
146
|
+
this.inflightClient.destroy();
|
|
147
|
+
this.inflightClient = null;
|
|
148
|
+
return true;
|
|
149
|
+
}
|
|
150
|
+
async destroy() {
|
|
151
|
+
if (this.inflightClient) {
|
|
152
|
+
this.inflightClient.destroy();
|
|
153
|
+
this.inflightClient = null;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
// ─── Internal helpers ───────────────────────────────────────────────────────
|
|
157
|
+
/**
|
|
158
|
+
* Runs a single attempt with a specific model alias.
|
|
159
|
+
* Throws on quota errors so the caller can retry with the next model.
|
|
160
|
+
*/
|
|
161
|
+
async executeWithModel(model, modelLabel, finalPrompt, originalPrompt, options) {
|
|
43
162
|
let accumulatedOutput = '';
|
|
44
163
|
const acpCallbacks = {
|
|
164
|
+
onThoughtChunk: (text) => {
|
|
165
|
+
// Stream Gemini's thinking to the user, same as Claude does for thinking blocks
|
|
166
|
+
accumulatedOutput += text;
|
|
167
|
+
options.onStream?.(text);
|
|
168
|
+
},
|
|
45
169
|
onTextChunk: (text) => {
|
|
46
170
|
accumulatedOutput += text;
|
|
47
171
|
options.onStream?.(text);
|
|
48
172
|
},
|
|
49
173
|
onToolCall: (toolCallId, title, kind) => {
|
|
50
|
-
|
|
174
|
+
// Map Gemini ACP kind → Claude-compatible tool name + structured input
|
|
175
|
+
// so the router's ToolFormatter renders it consistently with Claude tools.
|
|
176
|
+
// The tool card itself provides the progress indicator — no extra onStream needed.
|
|
177
|
+
const { name, input } = mapAcpToolCall(kind, title);
|
|
178
|
+
options.onToolUse?.({ id: toolCallId, name, input });
|
|
51
179
|
},
|
|
52
180
|
onToolResult: (toolCallId, status, output) => {
|
|
53
181
|
options.onToolResult?.({
|
|
@@ -61,25 +189,21 @@ class GeminiExecutor {
|
|
|
61
189
|
},
|
|
62
190
|
onPermissionRequest: this.autoApprove ? undefined : async () => 0,
|
|
63
191
|
};
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
const finalPrompt = historyContext ? `${historyContext}${prompt}` : prompt;
|
|
67
|
-
this.sessionManager.append(this.conversationId, 'user', prompt);
|
|
68
|
-
const client = new AcpClient_1.AcpClient(this.geminiCommand, this.buildGeminiArgs(), this.currentWorkingDirectory, acpCallbacks);
|
|
192
|
+
const args = this.buildGeminiArgs(model);
|
|
193
|
+
const client = new AcpClient_1.AcpClient(this.geminiCommand, args, this.currentWorkingDirectory, acpCallbacks);
|
|
69
194
|
this.inflightClient = client;
|
|
70
195
|
try {
|
|
71
|
-
console.log(`[GeminiExecutor] Spawning
|
|
72
|
-
console.log(`[GeminiExecutor] Gemini command: ${this.geminiCommand} ${
|
|
196
|
+
console.log(`[GeminiExecutor] Spawning ACP client (model=${modelLabel}) for cwd: ${this.currentWorkingDirectory}`);
|
|
197
|
+
console.log(`[GeminiExecutor] Gemini command: ${this.geminiCommand} ${args.join(' ')}`);
|
|
73
198
|
await client.initialize();
|
|
74
199
|
const sessionId = await client.newSession(this.currentWorkingDirectory);
|
|
75
200
|
console.log(`[GeminiExecutor] ACP session created: ${sessionId.slice(0, 8)}`);
|
|
76
201
|
if (this.autoApprove) {
|
|
77
|
-
console.log(`[GeminiExecutor] Switching session to YOLO mode...`);
|
|
78
202
|
await client.setSessionMode(sessionId, 'yolo');
|
|
79
203
|
}
|
|
80
204
|
console.log(`[GeminiExecutor] Sending prompt (length=${finalPrompt.length})...`);
|
|
81
205
|
const promptResult = await client.prompt(sessionId, finalPrompt);
|
|
82
|
-
console.log(`[GeminiExecutor] Prompt completed, stopReason=${promptResult.stopReason}`);
|
|
206
|
+
console.log(`[GeminiExecutor] Prompt completed, stopReason=${promptResult.stopReason}, model=${modelLabel}`);
|
|
83
207
|
this.sessionManager.append(this.conversationId, 'assistant', accumulatedOutput);
|
|
84
208
|
return {
|
|
85
209
|
success: promptResult.stopReason !== 'refusal',
|
|
@@ -87,61 +211,35 @@ class GeminiExecutor {
|
|
|
87
211
|
sessionAbbr: this.conversationId.slice(0, 8),
|
|
88
212
|
};
|
|
89
213
|
}
|
|
90
|
-
catch (error) {
|
|
91
|
-
console.error(`[GeminiExecutor] ❌ Execute error:`, error);
|
|
92
|
-
const msg = error instanceof Error ? error.message : 'Unknown error';
|
|
93
|
-
const friendlyMsg = msg.includes('ENOENT') || msg.includes('not found')
|
|
94
|
-
? 'Gemini CLI is not installed or not found on PATH. Use /backend to switch to another AI backend.'
|
|
95
|
-
: msg;
|
|
96
|
-
return {
|
|
97
|
-
success: false,
|
|
98
|
-
error: friendlyMsg,
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
214
|
finally {
|
|
102
215
|
client.destroy();
|
|
103
216
|
this.inflightClient = null;
|
|
104
217
|
}
|
|
105
218
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
this.currentWorkingDirectory = resolved;
|
|
112
|
-
// Changing directory resets the conversation context
|
|
113
|
-
this.conversationId = null;
|
|
114
|
-
}
|
|
115
|
-
resetContext() {
|
|
116
|
-
if (this.conversationId) {
|
|
117
|
-
this.sessionManager.remove(this.conversationId);
|
|
118
|
-
this.conversationId = null;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
async abort() {
|
|
122
|
-
if (!this.inflightClient)
|
|
123
|
-
return false;
|
|
124
|
-
this.inflightClient.destroy();
|
|
125
|
-
this.inflightClient = null;
|
|
126
|
-
return true;
|
|
127
|
-
}
|
|
128
|
-
async destroy() {
|
|
129
|
-
if (this.inflightClient) {
|
|
130
|
-
this.inflightClient.destroy();
|
|
131
|
-
this.inflightClient = null;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
// ─── Internal helpers ───────────────────────────────────────────────────────
|
|
135
|
-
buildGeminiArgs() {
|
|
136
|
-
const args = ['-y', this.geminiVersion, '--experimental-acp'];
|
|
137
|
-
if (this.model) {
|
|
138
|
-
args.push('--model', this.model);
|
|
219
|
+
buildGeminiArgs(model) {
|
|
220
|
+
const args = ['-y', this.geminiVersion, '--acp'];
|
|
221
|
+
const resolvedModel = model ?? this.model;
|
|
222
|
+
if (resolvedModel) {
|
|
223
|
+
args.push('--model', resolvedModel);
|
|
139
224
|
}
|
|
140
225
|
if (this.autoApprove) {
|
|
141
226
|
args.push('--yolo');
|
|
142
227
|
}
|
|
143
228
|
return args;
|
|
144
229
|
}
|
|
230
|
+
buildFriendlyError(msg, modelLabel) {
|
|
231
|
+
if (msg.includes('ENOENT') || msg.includes('not found')) {
|
|
232
|
+
return 'Gemini CLI is not installed or not found on PATH. Use /backend to switch to another AI backend.';
|
|
233
|
+
}
|
|
234
|
+
if (isQuotaError({ message: msg })) {
|
|
235
|
+
const resetMatch = msg.match(/reset after ([^\s.]+)/i);
|
|
236
|
+
const resetHint = resetMatch ? ` Quota resets in ${resetMatch[1]}.` : '';
|
|
237
|
+
return (`⚠️ All Gemini models (${[this.model || 'pro', ...QUOTA_FALLBACK_ALIASES].join(' → ')}) have exhausted quota.${resetHint}\n\n` +
|
|
238
|
+
`Wait for quota to reset, or switch backends:\n` +
|
|
239
|
+
`\`/backend\``);
|
|
240
|
+
}
|
|
241
|
+
return msg;
|
|
242
|
+
}
|
|
145
243
|
}
|
|
146
244
|
exports.GeminiExecutor = GeminiExecutor;
|
|
147
245
|
//# sourceMappingURL=GeminiExecutor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeminiExecutor.js","sourceRoot":"","sources":["../../src/executor/GeminiExecutor.ts"],"names":[],"mappings":";;;AAEA,+CAA+D;AAC/D,yDAAsD;AAatD;;;;;;;;;GASG;AACH,MAAa,cAAc;IACjB,cAAc,CAAiB;IAC/B,uBAAuB,CAAS;IAChC,cAAc,CAAiB;IAEtB,KAAK,CAAS;IACd,WAAW,CAAU;IACrB,aAAa,CAAS;IACtB,aAAa,CAAS;IAEvC,gEAAgE;IACxD,cAAc,GAAkB,IAAI,CAAC;IAE7C,8D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