agentgui 1.0.206 → 1.0.207
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/package.json +2 -2
- package/server.js +25 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentgui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.207",
|
|
4
4
|
"description": "Multi-agent ACP client with real-time communication",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "server.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"better-sqlite3": "^12.6.2",
|
|
28
28
|
"busboy": "^1.6.0",
|
|
29
29
|
"express": "^5.2.1",
|
|
30
|
-
"fsbrowse": "^0.2.
|
|
30
|
+
"fsbrowse": "^0.2.17",
|
|
31
31
|
"google-auth-library": "^10.5.0",
|
|
32
32
|
"onnxruntime-node": "^1.24.1",
|
|
33
33
|
"webtalk": "github:AnEntrypoint/webtalk",
|
package/server.js
CHANGED
|
@@ -154,6 +154,21 @@ expressApp.use(BASE_URL + '/files/:conversationId', (req, res, next) => {
|
|
|
154
154
|
router(req, res, next);
|
|
155
155
|
});
|
|
156
156
|
|
|
157
|
+
function findCommand(cmd) {
|
|
158
|
+
const isWindows = os.platform() === 'win32';
|
|
159
|
+
try {
|
|
160
|
+
if (isWindows) {
|
|
161
|
+
const result = execSync(`where ${cmd}`, { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'ignore'] }).trim();
|
|
162
|
+
return result.split('\n')[0].trim();
|
|
163
|
+
} else {
|
|
164
|
+
const result = execSync(`which ${cmd}`, { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'ignore'] }).trim();
|
|
165
|
+
return result;
|
|
166
|
+
}
|
|
167
|
+
} catch (_) {
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
157
172
|
function discoverAgents() {
|
|
158
173
|
const agents = [];
|
|
159
174
|
const binaries = [
|
|
@@ -172,10 +187,8 @@ function discoverAgents() {
|
|
|
172
187
|
{ cmd: 'fast-agent', id: 'fast-agent', name: 'fast-agent', icon: 'F' },
|
|
173
188
|
];
|
|
174
189
|
for (const bin of binaries) {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
if (result) agents.push({ id: bin.id, name: bin.name, icon: bin.icon, path: result });
|
|
178
|
-
} catch (_) {}
|
|
190
|
+
const result = findCommand(bin.cmd);
|
|
191
|
+
if (result) agents.push({ id: bin.id, name: bin.name, icon: bin.icon, path: result });
|
|
179
192
|
}
|
|
180
193
|
return agents;
|
|
181
194
|
}
|
|
@@ -201,13 +214,15 @@ function extractOAuthFromFile(oauth2Path) {
|
|
|
201
214
|
function getGeminiOAuthCreds() {
|
|
202
215
|
const oauthRelPath = path.join('node_modules', '@google', 'gemini-cli-core', 'dist', 'src', 'code_assist', 'oauth2.js');
|
|
203
216
|
try {
|
|
204
|
-
const geminiPath =
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
217
|
+
const geminiPath = findCommand('gemini');
|
|
218
|
+
if (geminiPath) {
|
|
219
|
+
const realPath = fs.realpathSync(geminiPath);
|
|
220
|
+
const pkgRoot = path.resolve(path.dirname(realPath), '..');
|
|
221
|
+
const result = extractOAuthFromFile(path.join(pkgRoot, oauthRelPath));
|
|
222
|
+
if (result) return result;
|
|
223
|
+
}
|
|
209
224
|
} catch (e) {
|
|
210
|
-
console.error('[gemini-oauth]
|
|
225
|
+
console.error('[gemini-oauth] gemini lookup failed:', e.message);
|
|
211
226
|
}
|
|
212
227
|
try {
|
|
213
228
|
const npmCacheDirs = new Set();
|
|
@@ -227,15 +242,6 @@ function getGeminiOAuthCreds() {
|
|
|
227
242
|
} catch (e) {
|
|
228
243
|
console.error('[gemini-oauth] npm cache scan failed:', e.message);
|
|
229
244
|
}
|
|
230
|
-
try {
|
|
231
|
-
const found = execSync('find / -path "*/gemini-cli-core/dist/src/code_assist/oauth2.js" -maxdepth 10 2>/dev/null | head -1', { encoding: 'utf8', timeout: 10000 }).trim();
|
|
232
|
-
if (found) {
|
|
233
|
-
const result = extractOAuthFromFile(found);
|
|
234
|
-
if (result) return result;
|
|
235
|
-
}
|
|
236
|
-
} catch (e) {
|
|
237
|
-
console.error('[gemini-oauth] filesystem search failed:', e.message);
|
|
238
|
-
}
|
|
239
245
|
console.error('[gemini-oauth] Could not find Gemini CLI OAuth credentials in any known location');
|
|
240
246
|
return null;
|
|
241
247
|
}
|