groove-dev 0.25.14 → 0.25.16
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/node_modules/@groove-dev/daemon/src/journalist.js +15 -5
- package/node_modules/@groove-dev/gui/dist/assets/{index-Cg1mJi9s.js → index-BjUplOVu.js} +15 -15
- package/node_modules/@groove-dev/gui/dist/index.html +1 -1
- package/node_modules/@groove-dev/gui/src/components/agents/agent-feed.jsx +19 -6
- package/package.json +1 -1
- package/packages/daemon/src/journalist.js +15 -5
- package/packages/gui/dist/assets/{index-Cg1mJi9s.js → index-BjUplOVu.js} +15 -15
- package/packages/gui/dist/index.html +1 -1
- package/packages/gui/src/components/agents/agent-feed.jsx +19 -6
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { readFileSync, writeFileSync, existsSync, mkdirSync, statSync } from 'fs';
|
|
5
5
|
import { resolve } from 'path';
|
|
6
6
|
import { execFile } from 'child_process';
|
|
7
|
-
import { getProvider } from './providers/index.js';
|
|
7
|
+
import { getProvider, getInstalledProviders } from './providers/index.js';
|
|
8
8
|
|
|
9
9
|
const DEFAULT_INTERVAL = 120_000; // 2 minutes
|
|
10
10
|
const MAX_LOG_CHARS = 40_000; // ~10k tokens budget for synthesis input
|
|
@@ -309,13 +309,23 @@ export class Journalist {
|
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
async callHeadless(prompt) {
|
|
312
|
-
|
|
313
|
-
|
|
312
|
+
// Find the best available provider for headless synthesis
|
|
313
|
+
// Priority: claude-code (cheapest via Haiku) > gemini > codex > ollama
|
|
314
|
+
const priority = ['claude-code', 'gemini', 'codex', 'ollama'];
|
|
315
|
+
const installed = getInstalledProviders();
|
|
316
|
+
const providerId = priority.find((p) => installed.some((i) => i.id === p));
|
|
317
|
+
if (!providerId) {
|
|
314
318
|
throw new Error('No provider available for synthesis');
|
|
315
319
|
}
|
|
320
|
+
const provider = getProvider(providerId);
|
|
316
321
|
|
|
317
|
-
//
|
|
318
|
-
const
|
|
322
|
+
// Pick the lightest model for synthesis (cheapest/fastest)
|
|
323
|
+
const lightModel = provider.constructor.models?.find((m) => m.tier === 'light')
|
|
324
|
+
|| provider.constructor.models?.find((m) => m.tier === 'medium')
|
|
325
|
+
|| provider.constructor.models?.[0];
|
|
326
|
+
const modelId = lightModel?.id || null;
|
|
327
|
+
|
|
328
|
+
const { command, args, env } = provider.buildHeadlessCommand(prompt, modelId);
|
|
319
329
|
|
|
320
330
|
return new Promise((resolve, reject) => {
|
|
321
331
|
const proc = execFile(command, args, {
|