groove-dev 0.26.0 → 0.26.3
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/agent-loop.js +3 -38
- package/node_modules/@groove-dev/daemon/src/process.js +2 -2
- package/node_modules/@groove-dev/daemon/src/providers/index.js +19 -13
- package/node_modules/@groove-dev/daemon/src/providers/local.js +24 -2
- package/node_modules/@groove-dev/gui/dist/assets/{index-BqL4GcgZ.js → index-BgKM8VOT.js} +51 -51
- package/node_modules/@groove-dev/gui/dist/index.html +1 -1
- package/node_modules/@groove-dev/gui/src/stores/groove.js +7 -1
- package/node_modules/@groove-dev/gui/src/views/settings.jsx +41 -14
- package/package.json +1 -1
- package/packages/daemon/src/agent-loop.js +3 -38
- package/packages/daemon/src/process.js +2 -2
- package/packages/daemon/src/providers/index.js +19 -13
- package/packages/daemon/src/providers/local.js +24 -2
- package/packages/gui/dist/assets/{index-BqL4GcgZ.js → index-BgKM8VOT.js} +51 -51
- package/packages/gui/dist/index.html +1 -1
- package/packages/gui/src/stores/groove.js +7 -1
- package/packages/gui/src/views/settings.jsx +41 -14
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="icon" type="image/png" href="/favicon.png" />
|
|
7
7
|
<title>Groove GUI</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-BgKM8VOT.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/vendor-C0HXlhrU.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/reactflow-BQPfi37R.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/codemirror-BBL3i_JW.js">
|
|
@@ -158,7 +158,13 @@ export const useGrooveStore = create((set, get) => ({
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
// Text responses → chat bubbles (stream: append to recent agent message)
|
|
161
|
-
|
|
161
|
+
// Claude Code: subtype='assistant' or type='result' with structured data
|
|
162
|
+
// Gemini/Codex/Ollama/Local: type='activity' with plain string data (no subtype)
|
|
163
|
+
const showAsChat = chatText && chatText.trim() && (
|
|
164
|
+
data.subtype === 'assistant' || data.type === 'result' ||
|
|
165
|
+
(data.type === 'activity' && typeof data.data === 'string')
|
|
166
|
+
);
|
|
167
|
+
if (showAsChat) {
|
|
162
168
|
const history = { ...get().chatHistory };
|
|
163
169
|
if (!history[agentId]) history[agentId] = [];
|
|
164
170
|
const arr = [...history[agentId]];
|
|
@@ -102,18 +102,22 @@ function ProviderCard({ provider, onKeyChange }) {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
//
|
|
105
|
+
// Local models card
|
|
106
106
|
if (isLocal) {
|
|
107
|
+
const installedCount = provider.models?.filter(m => !m.disabled)?.length || 0;
|
|
108
|
+
const goToModels = () => useGrooveStore.getState().setActiveView('models');
|
|
107
109
|
return (
|
|
108
110
|
<div className="flex flex-col rounded-lg border border-border-subtle bg-surface-1 overflow-hidden min-w-[220px]">
|
|
109
111
|
<div className="flex items-center gap-2.5 px-4 py-3 border-b border-border-subtle">
|
|
110
112
|
<StatusDot status={isReady ? 'running' : 'crashed'} size="sm" />
|
|
111
113
|
<span className="text-[13px] font-semibold text-text-0 font-sans">{provider.name}</span>
|
|
112
114
|
<div className="flex-1" />
|
|
113
|
-
{isReady ? (
|
|
114
|
-
<Badge variant="success" className="text-2xs gap-1"><Check size={8} />
|
|
115
|
+
{isReady && installedCount > 0 ? (
|
|
116
|
+
<Badge variant="success" className="text-2xs gap-1"><Check size={8} /> {installedCount} models</Badge>
|
|
117
|
+
) : isReady ? (
|
|
118
|
+
<Badge variant="warning" className="text-2xs">No models pulled</Badge>
|
|
115
119
|
) : (
|
|
116
|
-
<Badge variant="default" className="text-2xs">
|
|
120
|
+
<Badge variant="default" className="text-2xs">Ollama not installed</Badge>
|
|
117
121
|
)}
|
|
118
122
|
</div>
|
|
119
123
|
<div className="flex-1">
|
|
@@ -122,17 +126,40 @@ function ProviderCard({ provider, onKeyChange }) {
|
|
|
122
126
|
) : (
|
|
123
127
|
<div className="px-4 py-3 flex flex-col h-full">
|
|
124
128
|
<div className="text-xs text-text-3 font-sans flex-1">
|
|
125
|
-
{isReady
|
|
129
|
+
{isReady && installedCount > 0
|
|
130
|
+
? 'Full agentic runtime — tool calling, context rotation, zero cloud cost'
|
|
131
|
+
: isReady
|
|
132
|
+
? 'Ollama is running but no models pulled yet. Pull a model or browse the Models tab.'
|
|
133
|
+
: 'Run any open-source model on your machine — free, private, fully offline'}
|
|
126
134
|
</div>
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
{!isReady ? (
|
|
136
|
+
<Button
|
|
137
|
+
variant="primary"
|
|
138
|
+
size="sm"
|
|
139
|
+
onClick={() => setOllamaOpen(true)}
|
|
140
|
+
className="w-full h-7 text-2xs gap-1.5 mt-3"
|
|
141
|
+
>
|
|
142
|
+
<Cpu size={11} /> Set Up Ollama
|
|
143
|
+
</Button>
|
|
144
|
+
) : installedCount === 0 ? (
|
|
145
|
+
<div className="flex gap-2 mt-3">
|
|
146
|
+
<Button variant="primary" size="sm" onClick={() => setOllamaOpen(true)} className="flex-1 h-7 text-2xs gap-1.5">
|
|
147
|
+
<Cpu size={11} /> Pull Models
|
|
148
|
+
</Button>
|
|
149
|
+
<Button variant="secondary" size="sm" onClick={goToModels} className="flex-1 h-7 text-2xs gap-1.5">
|
|
150
|
+
Browse HuggingFace
|
|
151
|
+
</Button>
|
|
152
|
+
</div>
|
|
153
|
+
) : (
|
|
154
|
+
<div className="flex gap-2 mt-3">
|
|
155
|
+
<Button variant="secondary" size="sm" onClick={() => setOllamaOpen(true)} className="flex-1 h-7 text-2xs gap-1.5">
|
|
156
|
+
<Cpu size={11} /> Manage
|
|
157
|
+
</Button>
|
|
158
|
+
<Button variant="secondary" size="sm" onClick={goToModels} className="flex-1 h-7 text-2xs gap-1.5">
|
|
159
|
+
Browse Models
|
|
160
|
+
</Button>
|
|
161
|
+
</div>
|
|
162
|
+
)}
|
|
136
163
|
</div>
|
|
137
164
|
)}
|
|
138
165
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "groove-dev",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.3",
|
|
4
4
|
"description": "Open-source agent orchestration layer — the AI company OS. Local model agent engine (GGUF/Ollama/llama-server), HuggingFace model browser, MCP integrations (Slack, Gmail, Stripe, 15+), agent scheduling (cron), business roles (CMO, CFO, EA). GUI dashboard, multi-agent coordination, zero cold-start, infinite sessions. Works with Claude Code, Codex, Gemini CLI, Ollama, any local model.",
|
|
5
5
|
"license": "FSL-1.1-Apache-2.0",
|
|
6
6
|
"author": "Groove Dev <hello@groovedev.ai> (https://groovedev.ai)",
|
|
@@ -28,7 +28,6 @@ export class AgentLoop extends EventEmitter {
|
|
|
28
28
|
this.turns = 0;
|
|
29
29
|
this.toolCallCount = 0;
|
|
30
30
|
this.startedAt = Date.now();
|
|
31
|
-
this.lastContextUsage = 0;
|
|
32
31
|
|
|
33
32
|
// Tool executor — sandboxed to agent's working directory
|
|
34
33
|
this.executor = new ToolExecutor(
|
|
@@ -190,8 +189,9 @@ export class AgentLoop extends EventEmitter {
|
|
|
190
189
|
});
|
|
191
190
|
}
|
|
192
191
|
|
|
193
|
-
// Context
|
|
194
|
-
|
|
192
|
+
// Context rotation is handled by the Rotator's 15s polling loop
|
|
193
|
+
// which checks registry.contextUsage against the adaptive threshold.
|
|
194
|
+
// The journalist has full logs — no need for in-loop compaction.
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
|
|
@@ -356,7 +356,6 @@ export class AgentLoop extends EventEmitter {
|
|
|
356
356
|
// Context usage = how full the context window is
|
|
357
357
|
const contextWindow = this.config.contextWindow || 32768;
|
|
358
358
|
const contextUsage = contextWindow > 0 ? Math.min(inputTokens / contextWindow, 1) : 0;
|
|
359
|
-
this.lastContextUsage = contextUsage;
|
|
360
359
|
|
|
361
360
|
// Emit token event — ProcessManager handles registry updates + subsystem feeding
|
|
362
361
|
this.emit('output', {
|
|
@@ -369,40 +368,6 @@ export class AgentLoop extends EventEmitter {
|
|
|
369
368
|
});
|
|
370
369
|
}
|
|
371
370
|
|
|
372
|
-
// --- Context Management ---
|
|
373
|
-
|
|
374
|
-
_checkContext() {
|
|
375
|
-
// Compact old messages to buy time before rotation kicks in
|
|
376
|
-
// (Uses internal tracker — registry.contextUsage is set by PM handler)
|
|
377
|
-
if (this.lastContextUsage > 0.7 && this.messages.length > 20) {
|
|
378
|
-
this._compactHistory();
|
|
379
|
-
}
|
|
380
|
-
// Rotation itself is handled by the Rotator's 15s polling loop
|
|
381
|
-
// which checks registry.contextUsage against adaptive threshold
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
_compactHistory() {
|
|
385
|
-
const systemPrompt = this.messages[0];
|
|
386
|
-
const keepRecent = 14;
|
|
387
|
-
|
|
388
|
-
if (this.messages.length <= keepRecent + 2) return;
|
|
389
|
-
|
|
390
|
-
// Truncate tool results in old messages to save tokens
|
|
391
|
-
const old = this.messages.slice(1, -(keepRecent));
|
|
392
|
-
const compacted = old.map((msg) => {
|
|
393
|
-
if (msg.role === 'tool' && msg.content && msg.content.length > 200) {
|
|
394
|
-
return { ...msg, content: msg.content.slice(0, 150) + '\n[... truncated to save context]' };
|
|
395
|
-
}
|
|
396
|
-
if (msg.role === 'assistant' && msg.content && msg.content.length > 500) {
|
|
397
|
-
return { ...msg, content: msg.content.slice(0, 400) + '\n[... truncated]' };
|
|
398
|
-
}
|
|
399
|
-
return msg;
|
|
400
|
-
});
|
|
401
|
-
|
|
402
|
-
const recent = this.messages.slice(-(keepRecent));
|
|
403
|
-
this.messages = [systemPrompt, ...compacted, ...recent];
|
|
404
|
-
}
|
|
405
|
-
|
|
406
371
|
// --- System Prompt ---
|
|
407
372
|
|
|
408
373
|
_buildSystemPrompt() {
|
|
@@ -173,8 +173,8 @@ export class ProcessManager {
|
|
|
173
173
|
if (installed.length === 0) {
|
|
174
174
|
throw new Error('No AI providers installed. Install Claude Code, Gemini CLI, Codex, or Ollama first.');
|
|
175
175
|
}
|
|
176
|
-
// Priority: claude-code > gemini > codex > ollama
|
|
177
|
-
const priority = ['claude-code', 'gemini', 'codex', 'ollama'];
|
|
176
|
+
// Priority: claude-code > gemini > codex > local (local replaces ollama in UI)
|
|
177
|
+
const priority = ['claude-code', 'gemini', 'codex', 'local', 'ollama'];
|
|
178
178
|
const best = priority.find((p) => installed.some((i) => i.id === p)) || installed[0].id;
|
|
179
179
|
providerName = best;
|
|
180
180
|
}
|
|
@@ -19,20 +19,26 @@ export function getProvider(name) {
|
|
|
19
19
|
return providers[name] || null;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
// Providers hidden from UI but kept for backward compatibility
|
|
23
|
+
// (existing agents with provider='ollama' still resolve via getProvider)
|
|
24
|
+
const HIDDEN_PROVIDERS = new Set(['ollama']);
|
|
25
|
+
|
|
22
26
|
export function listProviders() {
|
|
23
|
-
return Object.entries(providers)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
return Object.entries(providers)
|
|
28
|
+
.filter(([key]) => !HIDDEN_PROVIDERS.has(key))
|
|
29
|
+
.map(([key, p]) => ({
|
|
30
|
+
id: key,
|
|
31
|
+
name: p.constructor.displayName,
|
|
32
|
+
installed: p.constructor.isInstalled(),
|
|
33
|
+
authType: p.constructor.authType,
|
|
34
|
+
envKey: p.constructor.envKey || null,
|
|
35
|
+
authHint: p.constructor.authHint || null,
|
|
36
|
+
authStatus: p.constructor.isAuthenticated?.() || null,
|
|
37
|
+
models: p.constructor.models,
|
|
38
|
+
installCommand: p.constructor.installCommand(),
|
|
39
|
+
canHotSwap: p.switchModel ? p.switchModel() : false,
|
|
40
|
+
hardwareRequirements: p.constructor.hardwareRequirements?.() || null,
|
|
41
|
+
}));
|
|
36
42
|
}
|
|
37
43
|
|
|
38
44
|
export function getInstalledProviders() {
|
|
@@ -52,15 +52,37 @@ const TOOL_CALLING_MODELS = new Set([
|
|
|
52
52
|
|
|
53
53
|
export class LocalProvider extends Provider {
|
|
54
54
|
static name = 'local';
|
|
55
|
-
static displayName = 'Local Models
|
|
55
|
+
static displayName = 'Local Models';
|
|
56
56
|
static command = 'ollama';
|
|
57
57
|
static authType = 'local';
|
|
58
58
|
static useAgentLoop = true;
|
|
59
59
|
|
|
60
|
+
// Only return models that are actually installed and ready to use
|
|
60
61
|
static get models() {
|
|
61
|
-
|
|
62
|
+
const installed = [];
|
|
63
|
+
|
|
64
|
+
// Ollama installed models
|
|
65
|
+
if (LocalProvider._hasOllama()) {
|
|
66
|
+
try {
|
|
67
|
+
const ollamaModels = OllamaProvider.getInstalledModels();
|
|
68
|
+
for (const m of ollamaModels) {
|
|
69
|
+
installed.push({
|
|
70
|
+
id: m.id, name: m.name || m.id,
|
|
71
|
+
tier: m.tier || 'medium', category: m.category || 'general',
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
} catch { /* Ollama not running */ }
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// If nothing installed, show a hint instead of a blank list
|
|
78
|
+
if (installed.length === 0) {
|
|
79
|
+
return [{ id: '_none', name: 'No models installed — pull one with: ollama pull qwen2.5-coder:7b', tier: 'medium', disabled: true }];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return installed;
|
|
62
83
|
}
|
|
63
84
|
|
|
85
|
+
// Full catalog for the Models browser (includes uninstalled)
|
|
64
86
|
static get catalog() {
|
|
65
87
|
return OllamaProvider.catalog;
|
|
66
88
|
}
|