groove-dev 0.27.54 → 0.27.55
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/cli/package.json +1 -1
- package/node_modules/@groove-dev/daemon/package.json +1 -1
- package/node_modules/@groove-dev/daemon/src/api.js +27 -0
- package/node_modules/@groove-dev/daemon/src/process.js +54 -45
- package/node_modules/@groove-dev/daemon/src/providers/groove-network.js +3 -2
- package/node_modules/@groove-dev/gui/package.json +1 -1
- package/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/daemon/package.json +1 -1
- package/packages/daemon/src/api.js +27 -0
- package/packages/daemon/src/process.js +54 -45
- package/packages/daemon/src/providers/groove-network.js +3 -2
- package/packages/gui/package.json +1 -1
|
@@ -945,6 +945,33 @@ export function createApi(app, daemon) {
|
|
|
945
945
|
// Loop exists but not running — fall through to resume/rotate
|
|
946
946
|
}
|
|
947
947
|
|
|
948
|
+
// One-shot providers (groove-network): kill any running instance and
|
|
949
|
+
// respawn with the user's message as --prompt. No handoff brief, no
|
|
950
|
+
// session resume, no message queue — each chat message is a fresh spawn.
|
|
951
|
+
const provider = getProvider(agent.provider);
|
|
952
|
+
if (provider?.constructor?.isOneShot) {
|
|
953
|
+
const oldConfig = { ...agent };
|
|
954
|
+
if (daemon.processes.isRunning(req.params.id)) {
|
|
955
|
+
await daemon.processes.kill(req.params.id);
|
|
956
|
+
}
|
|
957
|
+
daemon.registry.remove(req.params.id);
|
|
958
|
+
daemon.locks.release(req.params.id);
|
|
959
|
+
|
|
960
|
+
const newAgent = await daemon.processes.spawn({
|
|
961
|
+
role: oldConfig.role,
|
|
962
|
+
scope: oldConfig.scope,
|
|
963
|
+
provider: oldConfig.provider,
|
|
964
|
+
model: oldConfig.model,
|
|
965
|
+
prompt: message.trim(),
|
|
966
|
+
permission: oldConfig.permission || 'full',
|
|
967
|
+
workingDir: oldConfig.workingDir,
|
|
968
|
+
name: oldConfig.name,
|
|
969
|
+
teamId: oldConfig.teamId,
|
|
970
|
+
});
|
|
971
|
+
daemon.audit.log('agent.instruct', { id: req.params.id, newId: newAgent.id, resumed: false });
|
|
972
|
+
return res.json(newAgent);
|
|
973
|
+
}
|
|
974
|
+
|
|
948
975
|
// Running CLI agent (no loop) — queue the message for delivery after
|
|
949
976
|
// the current task completes instead of killing and respawning.
|
|
950
977
|
if (daemon.processes.isRunning(req.params.id)) {
|
|
@@ -549,11 +549,17 @@ export class ProcessManager {
|
|
|
549
549
|
introContext,
|
|
550
550
|
};
|
|
551
551
|
|
|
552
|
-
//
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
552
|
+
// One-shot providers (groove-network) send the raw prompt directly to a
|
|
553
|
+
// small model — skip role prefixes, personality, skills, PM review, etc.
|
|
554
|
+
// Those are designed for full CLI agents like Claude Code.
|
|
555
|
+
const isOneShotProvider = provider.constructor.isOneShot;
|
|
556
|
+
|
|
557
|
+
if (!isOneShotProvider) {
|
|
558
|
+
// Apply role-specific prompt prefix so agents always get their role constraints
|
|
559
|
+
const rolePrompt = ROLE_PROMPTS[agent.role];
|
|
560
|
+
if (rolePrompt) {
|
|
561
|
+
if (!spawnConfig.prompt) {
|
|
562
|
+
spawnConfig.prompt = rolePrompt + `IMPORTANT: No task has been assigned yet. You MUST wait for the user to tell you what to do.
|
|
557
563
|
|
|
558
564
|
Do NOT:
|
|
559
565
|
- Start building, coding, or creating anything
|
|
@@ -562,54 +568,57 @@ Do NOT:
|
|
|
562
568
|
- Analyze the codebase proactively
|
|
563
569
|
|
|
564
570
|
DO: Introduce yourself in one sentence and ask the user what they would like you to work on. Then wait.`;
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
571
|
+
} else if (spawnConfig.prompt.startsWith('# Agent Handoff Brief')) {
|
|
572
|
+
spawnConfig.prompt += '\n\n## Role Constraints\n\n' + rolePrompt.trim();
|
|
573
|
+
} else {
|
|
574
|
+
spawnConfig.prompt = rolePrompt + 'Task: ' + spawnConfig.prompt;
|
|
575
|
+
}
|
|
576
|
+
} else if (!spawnConfig.prompt) {
|
|
577
|
+
spawnConfig.prompt = `You are a ${agent.role} agent.
|
|
572
578
|
|
|
573
579
|
IMPORTANT: No task has been assigned yet. You MUST wait for the user to tell you what to do. Do NOT start building, coding, or continuing previous work. Do NOT treat existing files or the project map as your task. Introduce yourself in one sentence and ask the user what they would like you to work on. Then wait.`;
|
|
574
|
-
|
|
580
|
+
}
|
|
575
581
|
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
582
|
+
// Inject skill content into the prompt
|
|
583
|
+
if (config.skills?.length > 0 && this.daemon.skills) {
|
|
584
|
+
const skillSections = [];
|
|
585
|
+
for (const skillId of config.skills) {
|
|
586
|
+
const content = this.daemon.skills.getContent(skillId);
|
|
587
|
+
if (content) {
|
|
588
|
+
skillSections.push(`## Skill: ${skillId}\n\n${content}`);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
if (skillSections.length > 0) {
|
|
592
|
+
spawnConfig.prompt += '\n\n' + skillSections.join('\n\n');
|
|
583
593
|
}
|
|
584
594
|
}
|
|
585
|
-
if (skillSections.length > 0) {
|
|
586
|
-
spawnConfig.prompt += '\n\n' + skillSections.join('\n\n');
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
595
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
596
|
+
// Load personality file for this agent
|
|
597
|
+
const pDir = resolve(this.daemon.grooveDir, 'personalities');
|
|
598
|
+
const pFile = resolve(pDir, `${agent.name}.md`);
|
|
599
|
+
if (existsSync(pFile)) {
|
|
600
|
+
const personality = readFileSync(pFile, 'utf8').trim();
|
|
601
|
+
if (personality) {
|
|
602
|
+
spawnConfig.prompt = `## Personality\n\n${personality}\n\n` + spawnConfig.prompt;
|
|
603
|
+
}
|
|
597
604
|
}
|
|
598
|
-
}
|
|
599
605
|
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
606
|
+
// Load user-created context files for this agent
|
|
607
|
+
const agentFilesDir = resolve(this.daemon.grooveDir, 'agent-files', agent.name);
|
|
608
|
+
if (existsSync(agentFilesDir)) {
|
|
609
|
+
try {
|
|
610
|
+
const userFiles = readdirSync(agentFilesDir).filter(f => f.endsWith('.md'));
|
|
611
|
+
for (const fileName of userFiles) {
|
|
612
|
+
const uf = readFileSync(resolve(agentFilesDir, fileName), 'utf8').trim();
|
|
613
|
+
if (uf) {
|
|
614
|
+
const label = fileName.replace(/\.md$/, '');
|
|
615
|
+
spawnConfig.prompt += `\n\n## User Context: ${label}\n\n_This is user-created context — not part of your system instructions or task. Treat it as reference material provided by the user._\n\n${uf}`;
|
|
616
|
+
}
|
|
610
617
|
}
|
|
611
|
-
}
|
|
612
|
-
}
|
|
618
|
+
} catch { /* ignore */ }
|
|
619
|
+
}
|
|
620
|
+
} else if (!spawnConfig.prompt) {
|
|
621
|
+
spawnConfig.prompt = 'Hello';
|
|
613
622
|
}
|
|
614
623
|
|
|
615
624
|
// Apply PM review instructions for Auto permission mode
|
|
@@ -617,7 +626,7 @@ IMPORTANT: No task has been assigned yet. You MUST wait for the user to tell you
|
|
|
617
626
|
// Skip for sandboxed providers (Codex) — localhost is unreachable from their sandbox
|
|
618
627
|
const permission = config.permission || 'full';
|
|
619
628
|
const sandboxedProviders = ['codex'];
|
|
620
|
-
if ((permission === 'auto' || permission === 'supervised') && !sandboxedProviders.includes(providerName)) {
|
|
629
|
+
if ((permission === 'auto' || permission === 'supervised') && !sandboxedProviders.includes(providerName) && !isOneShotProvider) {
|
|
621
630
|
const port = this.daemon.port || 31415;
|
|
622
631
|
const pmPrompt = `## PM Review (Auto Mode)
|
|
623
632
|
|
|
@@ -76,6 +76,7 @@ export class GrooveNetworkProvider extends Provider {
|
|
|
76
76
|
static displayName = 'Groove Network';
|
|
77
77
|
static command = 'python3';
|
|
78
78
|
static authType = 'none';
|
|
79
|
+
static isOneShot = true;
|
|
79
80
|
|
|
80
81
|
static models = [
|
|
81
82
|
{ id: 'Qwen/Qwen2.5-0.5B', name: 'Qwen 2.5 0.5B (Network)', context: 4096 },
|
|
@@ -156,10 +157,10 @@ export class GrooveNetworkProvider extends Provider {
|
|
|
156
157
|
return { type: 'activity', data: trimmed };
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
if (msg.type === 'token' && msg.text) {
|
|
160
|
+
if (msg.type === 'token' && msg.text != null) {
|
|
160
161
|
return { type: 'activity', subtype: 'text', data: msg.text, tokensGenerated: msg.tokens_generated };
|
|
161
162
|
}
|
|
162
|
-
if (msg.type === 'complete' || msg.type === 'result') {
|
|
163
|
+
if (msg.type === 'done' || msg.type === 'complete' || msg.type === 'result') {
|
|
163
164
|
return { type: 'result', text: msg.text || '', tokensGenerated: msg.tokens_generated, sessionId: msg.session_id };
|
|
164
165
|
}
|
|
165
166
|
if (msg.type === 'error') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "groove-dev",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.55",
|
|
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)",
|
|
@@ -945,6 +945,33 @@ export function createApi(app, daemon) {
|
|
|
945
945
|
// Loop exists but not running — fall through to resume/rotate
|
|
946
946
|
}
|
|
947
947
|
|
|
948
|
+
// One-shot providers (groove-network): kill any running instance and
|
|
949
|
+
// respawn with the user's message as --prompt. No handoff brief, no
|
|
950
|
+
// session resume, no message queue — each chat message is a fresh spawn.
|
|
951
|
+
const provider = getProvider(agent.provider);
|
|
952
|
+
if (provider?.constructor?.isOneShot) {
|
|
953
|
+
const oldConfig = { ...agent };
|
|
954
|
+
if (daemon.processes.isRunning(req.params.id)) {
|
|
955
|
+
await daemon.processes.kill(req.params.id);
|
|
956
|
+
}
|
|
957
|
+
daemon.registry.remove(req.params.id);
|
|
958
|
+
daemon.locks.release(req.params.id);
|
|
959
|
+
|
|
960
|
+
const newAgent = await daemon.processes.spawn({
|
|
961
|
+
role: oldConfig.role,
|
|
962
|
+
scope: oldConfig.scope,
|
|
963
|
+
provider: oldConfig.provider,
|
|
964
|
+
model: oldConfig.model,
|
|
965
|
+
prompt: message.trim(),
|
|
966
|
+
permission: oldConfig.permission || 'full',
|
|
967
|
+
workingDir: oldConfig.workingDir,
|
|
968
|
+
name: oldConfig.name,
|
|
969
|
+
teamId: oldConfig.teamId,
|
|
970
|
+
});
|
|
971
|
+
daemon.audit.log('agent.instruct', { id: req.params.id, newId: newAgent.id, resumed: false });
|
|
972
|
+
return res.json(newAgent);
|
|
973
|
+
}
|
|
974
|
+
|
|
948
975
|
// Running CLI agent (no loop) — queue the message for delivery after
|
|
949
976
|
// the current task completes instead of killing and respawning.
|
|
950
977
|
if (daemon.processes.isRunning(req.params.id)) {
|
|
@@ -549,11 +549,17 @@ export class ProcessManager {
|
|
|
549
549
|
introContext,
|
|
550
550
|
};
|
|
551
551
|
|
|
552
|
-
//
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
552
|
+
// One-shot providers (groove-network) send the raw prompt directly to a
|
|
553
|
+
// small model — skip role prefixes, personality, skills, PM review, etc.
|
|
554
|
+
// Those are designed for full CLI agents like Claude Code.
|
|
555
|
+
const isOneShotProvider = provider.constructor.isOneShot;
|
|
556
|
+
|
|
557
|
+
if (!isOneShotProvider) {
|
|
558
|
+
// Apply role-specific prompt prefix so agents always get their role constraints
|
|
559
|
+
const rolePrompt = ROLE_PROMPTS[agent.role];
|
|
560
|
+
if (rolePrompt) {
|
|
561
|
+
if (!spawnConfig.prompt) {
|
|
562
|
+
spawnConfig.prompt = rolePrompt + `IMPORTANT: No task has been assigned yet. You MUST wait for the user to tell you what to do.
|
|
557
563
|
|
|
558
564
|
Do NOT:
|
|
559
565
|
- Start building, coding, or creating anything
|
|
@@ -562,54 +568,57 @@ Do NOT:
|
|
|
562
568
|
- Analyze the codebase proactively
|
|
563
569
|
|
|
564
570
|
DO: Introduce yourself in one sentence and ask the user what they would like you to work on. Then wait.`;
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
571
|
+
} else if (spawnConfig.prompt.startsWith('# Agent Handoff Brief')) {
|
|
572
|
+
spawnConfig.prompt += '\n\n## Role Constraints\n\n' + rolePrompt.trim();
|
|
573
|
+
} else {
|
|
574
|
+
spawnConfig.prompt = rolePrompt + 'Task: ' + spawnConfig.prompt;
|
|
575
|
+
}
|
|
576
|
+
} else if (!spawnConfig.prompt) {
|
|
577
|
+
spawnConfig.prompt = `You are a ${agent.role} agent.
|
|
572
578
|
|
|
573
579
|
IMPORTANT: No task has been assigned yet. You MUST wait for the user to tell you what to do. Do NOT start building, coding, or continuing previous work. Do NOT treat existing files or the project map as your task. Introduce yourself in one sentence and ask the user what they would like you to work on. Then wait.`;
|
|
574
|
-
|
|
580
|
+
}
|
|
575
581
|
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
582
|
+
// Inject skill content into the prompt
|
|
583
|
+
if (config.skills?.length > 0 && this.daemon.skills) {
|
|
584
|
+
const skillSections = [];
|
|
585
|
+
for (const skillId of config.skills) {
|
|
586
|
+
const content = this.daemon.skills.getContent(skillId);
|
|
587
|
+
if (content) {
|
|
588
|
+
skillSections.push(`## Skill: ${skillId}\n\n${content}`);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
if (skillSections.length > 0) {
|
|
592
|
+
spawnConfig.prompt += '\n\n' + skillSections.join('\n\n');
|
|
583
593
|
}
|
|
584
594
|
}
|
|
585
|
-
if (skillSections.length > 0) {
|
|
586
|
-
spawnConfig.prompt += '\n\n' + skillSections.join('\n\n');
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
595
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
596
|
+
// Load personality file for this agent
|
|
597
|
+
const pDir = resolve(this.daemon.grooveDir, 'personalities');
|
|
598
|
+
const pFile = resolve(pDir, `${agent.name}.md`);
|
|
599
|
+
if (existsSync(pFile)) {
|
|
600
|
+
const personality = readFileSync(pFile, 'utf8').trim();
|
|
601
|
+
if (personality) {
|
|
602
|
+
spawnConfig.prompt = `## Personality\n\n${personality}\n\n` + spawnConfig.prompt;
|
|
603
|
+
}
|
|
597
604
|
}
|
|
598
|
-
}
|
|
599
605
|
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
606
|
+
// Load user-created context files for this agent
|
|
607
|
+
const agentFilesDir = resolve(this.daemon.grooveDir, 'agent-files', agent.name);
|
|
608
|
+
if (existsSync(agentFilesDir)) {
|
|
609
|
+
try {
|
|
610
|
+
const userFiles = readdirSync(agentFilesDir).filter(f => f.endsWith('.md'));
|
|
611
|
+
for (const fileName of userFiles) {
|
|
612
|
+
const uf = readFileSync(resolve(agentFilesDir, fileName), 'utf8').trim();
|
|
613
|
+
if (uf) {
|
|
614
|
+
const label = fileName.replace(/\.md$/, '');
|
|
615
|
+
spawnConfig.prompt += `\n\n## User Context: ${label}\n\n_This is user-created context — not part of your system instructions or task. Treat it as reference material provided by the user._\n\n${uf}`;
|
|
616
|
+
}
|
|
610
617
|
}
|
|
611
|
-
}
|
|
612
|
-
}
|
|
618
|
+
} catch { /* ignore */ }
|
|
619
|
+
}
|
|
620
|
+
} else if (!spawnConfig.prompt) {
|
|
621
|
+
spawnConfig.prompt = 'Hello';
|
|
613
622
|
}
|
|
614
623
|
|
|
615
624
|
// Apply PM review instructions for Auto permission mode
|
|
@@ -617,7 +626,7 @@ IMPORTANT: No task has been assigned yet. You MUST wait for the user to tell you
|
|
|
617
626
|
// Skip for sandboxed providers (Codex) — localhost is unreachable from their sandbox
|
|
618
627
|
const permission = config.permission || 'full';
|
|
619
628
|
const sandboxedProviders = ['codex'];
|
|
620
|
-
if ((permission === 'auto' || permission === 'supervised') && !sandboxedProviders.includes(providerName)) {
|
|
629
|
+
if ((permission === 'auto' || permission === 'supervised') && !sandboxedProviders.includes(providerName) && !isOneShotProvider) {
|
|
621
630
|
const port = this.daemon.port || 31415;
|
|
622
631
|
const pmPrompt = `## PM Review (Auto Mode)
|
|
623
632
|
|
|
@@ -76,6 +76,7 @@ export class GrooveNetworkProvider extends Provider {
|
|
|
76
76
|
static displayName = 'Groove Network';
|
|
77
77
|
static command = 'python3';
|
|
78
78
|
static authType = 'none';
|
|
79
|
+
static isOneShot = true;
|
|
79
80
|
|
|
80
81
|
static models = [
|
|
81
82
|
{ id: 'Qwen/Qwen2.5-0.5B', name: 'Qwen 2.5 0.5B (Network)', context: 4096 },
|
|
@@ -156,10 +157,10 @@ export class GrooveNetworkProvider extends Provider {
|
|
|
156
157
|
return { type: 'activity', data: trimmed };
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
if (msg.type === 'token' && msg.text) {
|
|
160
|
+
if (msg.type === 'token' && msg.text != null) {
|
|
160
161
|
return { type: 'activity', subtype: 'text', data: msg.text, tokensGenerated: msg.tokens_generated };
|
|
161
162
|
}
|
|
162
|
-
if (msg.type === 'complete' || msg.type === 'result') {
|
|
163
|
+
if (msg.type === 'done' || msg.type === 'complete' || msg.type === 'result') {
|
|
163
164
|
return { type: 'result', text: msg.text || '', tokensGenerated: msg.tokens_generated, sessionId: msg.session_id };
|
|
164
165
|
}
|
|
165
166
|
if (msg.type === 'error') {
|