groove-dev 0.27.183 → 0.27.185
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/.watch-test-flag-1784767927904 +1 -0
- package/.watch-test-flag-1784768055729 +1 -0
- package/.watch-test-flag-1784768066364 +1 -0
- 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 +2 -0
- package/node_modules/@groove-dev/daemon/src/index.js +17 -0
- package/node_modules/@groove-dev/daemon/src/innerchat-docs.js +96 -0
- package/node_modules/@groove-dev/daemon/src/innerchat.js +265 -96
- package/node_modules/@groove-dev/daemon/src/introducer.js +31 -1
- package/node_modules/@groove-dev/daemon/src/process.js +36 -6
- package/node_modules/@groove-dev/daemon/src/routes/innerchat.js +109 -13
- package/node_modules/@groove-dev/daemon/src/routes/teams.js +11 -0
- package/node_modules/@groove-dev/daemon/src/routes/watch.js +42 -0
- package/node_modules/@groove-dev/daemon/src/teams.js +28 -0
- package/node_modules/@groove-dev/daemon/src/watcher.js +258 -0
- package/node_modules/@groove-dev/daemon/test/innerchat.test.js +222 -179
- package/node_modules/@groove-dev/daemon/test/teams.test.js +53 -0
- package/node_modules/@groove-dev/daemon/test/watcher.test.js +158 -0
- package/node_modules/@groove-dev/gui/dist/assets/index-CU8L_r5f.css +1 -0
- package/{packages/gui/dist/assets/index-DPjGBQ5X.js → node_modules/@groove-dev/gui/dist/assets/index-DEZwM4Hb.js} +233 -228
- package/node_modules/@groove-dev/gui/dist/index.html +2 -2
- package/node_modules/@groove-dev/gui/package.json +1 -1
- package/node_modules/@groove-dev/gui/src/app.css +1 -0
- package/node_modules/@groove-dev/gui/src/components/agents/agent-feed.jsx +60 -4
- package/node_modules/@groove-dev/gui/src/components/agents/agent-panel.jsx +1 -29
- package/node_modules/@groove-dev/gui/src/components/fleet/fleet-agent-row.jsx +18 -2
- package/node_modules/@groove-dev/gui/src/components/fleet/fleet-pane.jsx +1 -15
- package/node_modules/@groove-dev/gui/src/components/fleet/fleet-sidebar.jsx +29 -11
- package/node_modules/@groove-dev/gui/src/stores/groove.js +36 -16
- package/node_modules/@groove-dev/gui/src/stores/slices/agents-slice.js +6 -0
- package/node_modules/@groove-dev/gui/src/stores/slices/teams-slice.js +22 -0
- package/node_modules/@groove-dev/gui/src/views/memory.jsx +56 -31
- 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 +2 -0
- package/packages/daemon/src/index.js +17 -0
- package/packages/daemon/src/innerchat-docs.js +96 -0
- package/packages/daemon/src/innerchat.js +265 -96
- package/packages/daemon/src/introducer.js +31 -1
- package/packages/daemon/src/process.js +36 -6
- package/packages/daemon/src/routes/innerchat.js +109 -13
- package/packages/daemon/src/routes/teams.js +11 -0
- package/packages/daemon/src/routes/watch.js +42 -0
- package/packages/daemon/src/teams.js +28 -0
- package/packages/daemon/src/watcher.js +258 -0
- package/packages/gui/dist/assets/index-CU8L_r5f.css +1 -0
- package/{node_modules/@groove-dev/gui/dist/assets/index-DPjGBQ5X.js → packages/gui/dist/assets/index-DEZwM4Hb.js} +233 -228
- package/packages/gui/dist/index.html +2 -2
- package/packages/gui/package.json +1 -1
- package/packages/gui/src/app.css +1 -0
- package/packages/gui/src/components/agents/agent-feed.jsx +60 -4
- package/packages/gui/src/components/agents/agent-panel.jsx +1 -29
- package/packages/gui/src/components/fleet/fleet-agent-row.jsx +18 -2
- package/packages/gui/src/components/fleet/fleet-pane.jsx +1 -15
- package/packages/gui/src/components/fleet/fleet-sidebar.jsx +29 -11
- package/packages/gui/src/stores/groove.js +36 -16
- package/packages/gui/src/stores/slices/agents-slice.js +6 -0
- package/packages/gui/src/stores/slices/teams-slice.js +22 -0
- package/packages/gui/src/views/memory.jsx +56 -31
- package/node_modules/@groove-dev/gui/dist/assets/index-CiOy7wVS.css +0 -1
- package/node_modules/@groove-dev/gui/src/components/agents/innerchat-relay.jsx +0 -145
- package/packages/gui/dist/assets/index-CiOy7wVS.css +0 -1
- package/packages/gui/src/components/agents/innerchat-relay.jsx +0 -145
|
@@ -0,0 +1 @@
|
|
|
1
|
+
x
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
x
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
x
|
|
@@ -28,6 +28,7 @@ import { registerFileRoutes, resetEditorRoot } from './routes/files.js';
|
|
|
28
28
|
import { registerNetworkRoutes } from './routes/network.js';
|
|
29
29
|
import { registerScheduleRoutes } from './routes/schedules.js';
|
|
30
30
|
import { registerInnerChatRoutes } from './routes/innerchat.js';
|
|
31
|
+
import { registerWatchRoutes } from './routes/watch.js';
|
|
31
32
|
import { registerAutoAgentRoutes } from './routes/auto-agents.js';
|
|
32
33
|
|
|
33
34
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
@@ -178,6 +179,7 @@ export function createApi(app, daemon) {
|
|
|
178
179
|
registerNetworkRoutes(app, daemon);
|
|
179
180
|
registerScheduleRoutes(app, daemon);
|
|
180
181
|
registerInnerChatRoutes(app, daemon);
|
|
182
|
+
registerWatchRoutes(app, daemon);
|
|
181
183
|
registerAutoAgentRoutes(app, daemon);
|
|
182
184
|
|
|
183
185
|
|
|
@@ -47,6 +47,7 @@ import { RepoImporter } from './repo-import.js';
|
|
|
47
47
|
import { ConversationManager } from './conversations.js';
|
|
48
48
|
import { Toys } from './toys.js';
|
|
49
49
|
import { InnerChat } from './innerchat.js';
|
|
50
|
+
import { Watcher } from './watcher.js';
|
|
50
51
|
import { AutoState } from './autostate.js';
|
|
51
52
|
import { Orchestrator } from './orchestrator.js';
|
|
52
53
|
import { TrajectoryCapture, ConsentManager } from '../../../moe-training/client/index.js';
|
|
@@ -162,6 +163,7 @@ export class Daemon {
|
|
|
162
163
|
this.modelLab = new ModelLab(this);
|
|
163
164
|
this.toys = new Toys(this);
|
|
164
165
|
this.innerchat = new InnerChat(this);
|
|
166
|
+
this.watcher = new Watcher(this);
|
|
165
167
|
this.autoState = new AutoState(this.grooveDir);
|
|
166
168
|
this.orchestrator = new Orchestrator(this);
|
|
167
169
|
this.trajectoryCapture = null;
|
|
@@ -623,6 +625,19 @@ export class Daemon {
|
|
|
623
625
|
this.federation.initialize();
|
|
624
626
|
this._startGarbageCollector();
|
|
625
627
|
|
|
628
|
+
// Regenerate the on-disk registry files once on boot. They otherwise
|
|
629
|
+
// only refresh on a registry change, so a daemon upgraded with new
|
|
630
|
+
// agent-facing docs (InnerChat, Watch) would serve stale AGENTS_REGISTRY.md
|
|
631
|
+
// to already-running agents until something happened to change state.
|
|
632
|
+
if (this.registry.getAll().length > 0) {
|
|
633
|
+
try {
|
|
634
|
+
this.introducer.writeRegistryFile(this.projectDir);
|
|
635
|
+
this.introducer.injectGrooveSection(this.projectDir);
|
|
636
|
+
} catch (err) {
|
|
637
|
+
console.error('[startup] Failed to refresh registry files:', err.message);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
|
|
626
641
|
// Restore auth token from stored config so subscription polling works after restart
|
|
627
642
|
const storedToken = this.skills.getToken();
|
|
628
643
|
if (storedToken) {
|
|
@@ -847,6 +862,8 @@ export class Daemon {
|
|
|
847
862
|
this.journalist.stop();
|
|
848
863
|
this.rotator.stop();
|
|
849
864
|
this.scheduler.stop();
|
|
865
|
+
this.watcher.stop();
|
|
866
|
+
this.innerchat.stop();
|
|
850
867
|
this.orchestrator.stop();
|
|
851
868
|
this.timeline.stop();
|
|
852
869
|
if (this._gcInterval) clearInterval(this._gcInterval);
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// FSL-1.1-Apache-2.0 — see LICENSE
|
|
2
|
+
|
|
3
|
+
// The agent-facing InnerChat instructions, in one place.
|
|
4
|
+
//
|
|
5
|
+
// These are injected into a new agent's spawn prompt AND written into every
|
|
6
|
+
// AGENTS_REGISTRY.md. Both are needed: the prompt reaches the agent on turn
|
|
7
|
+
// one, and the file survives context compaction — an agent that has forgotten
|
|
8
|
+
// the prompt can re-read the registry it already knows to consult.
|
|
9
|
+
//
|
|
10
|
+
// No imports on purpose — process.js and introducer.js both pull from here.
|
|
11
|
+
|
|
12
|
+
export function innerChatInstructions(port = 31415, agentName = 'YOUR_NAME') {
|
|
13
|
+
return [
|
|
14
|
+
'## Consulting Other Agents (InnerChat)',
|
|
15
|
+
'',
|
|
16
|
+
'Other GROOVE agents may be working alongside you, including on other teams.',
|
|
17
|
+
'When the user asks you to reach out to, coordinate with, or get input from',
|
|
18
|
+
'another agent, use this — it sends them a message and waits for their reply:',
|
|
19
|
+
'',
|
|
20
|
+
'> **Do NOT use your built-in `SendMessage` / Agent tools to reach a GROOVE agent.**',
|
|
21
|
+
'> Those only address sub-agents you spawned yourself in this session, so they will',
|
|
22
|
+
'> fail with "not reachable" or ask you for an `a…-…` agent ID that does not exist',
|
|
23
|
+
'> here. GROOVE agents are separate processes. The curl below is the only way to',
|
|
24
|
+
'> reach them. Do not invent a fallback (writing a message into a file, etc.) —',
|
|
25
|
+
'> if the curl fails, read the error and report it to the user.',
|
|
26
|
+
'',
|
|
27
|
+
'```bash',
|
|
28
|
+
`curl -s http://localhost:${port}/api/innerchat/ask -X POST -H 'Content-Type: application/json' \\`,
|
|
29
|
+
` -d '{"from":"${agentName}","to":"AGENT_NAME","message":"YOUR_QUESTION"}'`,
|
|
30
|
+
'```',
|
|
31
|
+
'',
|
|
32
|
+
'This BLOCKS until they answer, then returns:',
|
|
33
|
+
'`{"from":"...","reply":"...","exchangesUsed":N,"exchangesRemaining":N}`',
|
|
34
|
+
'',
|
|
35
|
+
'> **Run the curl in the FOREGROUND and let it block.** Do not background it with',
|
|
36
|
+
"> `&`, and never put `&` inside the command — that detaches the curl and throws away",
|
|
37
|
+
"> the reply, so you get no answer and can't confirm delivery. Blocking for a minute or",
|
|
38
|
+
'> two is expected and correct; just wait for it. If you truly cannot wait, use `tell`',
|
|
39
|
+
'> (below) instead — that is the right tool for fire-and-forget, not a backgrounded ask.',
|
|
40
|
+
'',
|
|
41
|
+
'Call it again to continue — prior turns are included automatically, so just say',
|
|
42
|
+
'the next thing. Keep going until you reach a conclusion together, then report',
|
|
43
|
+
'that conclusion to the user. `ask` is best for tight back-and-forth (negotiating',
|
|
44
|
+
'an interface, resolving a blocker) where you need the answer before you proceed.',
|
|
45
|
+
'',
|
|
46
|
+
'If the other agent is heads-down and you do NOT need the answer right now, send it',
|
|
47
|
+
'without blocking instead — this returns immediately, and their reply (if any) is',
|
|
48
|
+
'delivered back to you later, waking you if your turn has ended:',
|
|
49
|
+
'',
|
|
50
|
+
'```bash',
|
|
51
|
+
`curl -s http://localhost:${port}/api/innerchat/tell -X POST -H 'Content-Type: application/json' \\`,
|
|
52
|
+
` -d '{"from":"${agentName}","to":"AGENT_NAME","message":"YOUR_MESSAGE"}'`,
|
|
53
|
+
'```',
|
|
54
|
+
'',
|
|
55
|
+
'**Rules:**',
|
|
56
|
+
'- Only start a conversation when the user asks you to. Never consult other agents on your own initiative.',
|
|
57
|
+
`- \`from\` must be your own agent name${agentName === 'YOUR_NAME' ? ' (it is in your $GROOVE_AGENT_NAME environment variable)' : ''}.`,
|
|
58
|
+
'- Agent names are listed in `AGENTS_REGISTRY.md`, including agents on other teams.',
|
|
59
|
+
'- Use `ask` when you need the reply now; use `tell` to hand off or notify without waiting.',
|
|
60
|
+
'- One message per call. With `ask`, wait for the answer before deciding what to ask next.',
|
|
61
|
+
'- Ground truth lives in files (specs, code, run output), not in chat — use InnerChat to',
|
|
62
|
+
' negotiate and hand off, and verify claims against the actual artifacts.',
|
|
63
|
+
'- Read any error you get back — it tells you what to do (unknown name, cap reached, or they are waiting on you).',
|
|
64
|
+
'- `exchangesRemaining` counts down (shared by ask and tell). At 0 the conversation is over: stop and report.',
|
|
65
|
+
'- If another agent asks YOU something (a blocking ask), answer it directly in your next message — they are blocked until you do.',
|
|
66
|
+
];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Wake-on-completion. Same delivery/injection story as InnerChat above.
|
|
70
|
+
export function watchInstructions(port = 31415, agentName = 'YOUR_NAME') {
|
|
71
|
+
const nameHint = agentName === 'YOUR_NAME' ? ' ($GROOVE_AGENT_NAME)' : '';
|
|
72
|
+
return [
|
|
73
|
+
'## Getting Notified When Something Finishes (Watch)',
|
|
74
|
+
'',
|
|
75
|
+
'Your process ends when your turn ends, so a test suite or long job you kicked',
|
|
76
|
+
'off has nothing to notify you — telling the user "I\'ll report back when it lands"',
|
|
77
|
+
'does not work on its own; the session is gone. Instead, set a Watch. The daemon',
|
|
78
|
+
'outlives your turn and RESUMES you with the result when it finishes:',
|
|
79
|
+
'',
|
|
80
|
+
'```bash',
|
|
81
|
+
`curl -s http://localhost:${port}/api/watch -X POST -H 'Content-Type: application/json' \\`,
|
|
82
|
+
` -d '{"agent":"${agentName}","label":"test suite","command":"npm test"}'`,
|
|
83
|
+
'```',
|
|
84
|
+
'',
|
|
85
|
+
'This returns immediately with a `watchId`. **End your turn** — you will be woken',
|
|
86
|
+
'with the exit code and output tail when the command finishes.',
|
|
87
|
+
'',
|
|
88
|
+
'- Prefer `command` (let the daemon run it) over launching it yourself — that way',
|
|
89
|
+
' it captures the real exit code and output.',
|
|
90
|
+
'- For something ALREADY running, poll instead with `until` (fires when the check',
|
|
91
|
+
` exits 0): \`-d '{"agent":"${agentName}","label":"server up","until":"curl -sf localhost:3000/health"}'\`.`,
|
|
92
|
+
`- \`agent\` must be your own name${nameHint}.`,
|
|
93
|
+
'- Watches time out (default 30 min). One clear task per watch; do not watch trivial commands you could just run.',
|
|
94
|
+
'- Do not poll or sleep-loop waiting yourself — set the watch and end the turn. That is the whole point.',
|
|
95
|
+
];
|
|
96
|
+
}
|