groove-dev 0.27.140 → 0.27.142

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.
Files changed (98) hide show
  1. package/node_modules/@groove-dev/cli/package.json +1 -1
  2. package/node_modules/@groove-dev/daemon/integrations-registry.json +12 -44
  3. package/node_modules/@groove-dev/daemon/package.json +1 -1
  4. package/node_modules/@groove-dev/daemon/src/api.js +100 -23
  5. package/node_modules/@groove-dev/daemon/src/integrations.js +10 -0
  6. package/node_modules/@groove-dev/daemon/src/introducer.js +1 -1
  7. package/node_modules/@groove-dev/daemon/src/journalist.js +171 -1
  8. package/node_modules/@groove-dev/daemon/src/keeper.js +2 -2
  9. package/node_modules/@groove-dev/daemon/src/memory.js +8 -5
  10. package/node_modules/@groove-dev/daemon/src/model-lab.js +11 -0
  11. package/node_modules/@groove-dev/daemon/src/process.js +65 -0
  12. package/node_modules/@groove-dev/daemon/src/rotator.js +25 -8
  13. package/node_modules/@groove-dev/daemon/src/validate.js +8 -0
  14. package/node_modules/@groove-dev/gui/dist/assets/{codemirror-BQqYnZfL.js → codemirror-BYKpdS2W.js} +10 -10
  15. package/node_modules/@groove-dev/gui/dist/assets/index-Bjd91ufV.js +984 -0
  16. package/node_modules/@groove-dev/gui/dist/assets/index-BqdwIFn4.css +1 -0
  17. package/node_modules/@groove-dev/gui/dist/index.html +3 -3
  18. package/node_modules/@groove-dev/gui/package.json +1 -1
  19. package/node_modules/@groove-dev/gui/src/app.jsx +0 -2
  20. package/node_modules/@groove-dev/gui/src/components/agents/agent-chat.jsx +3 -4
  21. package/node_modules/@groove-dev/gui/src/components/agents/agent-feed.jsx +8 -2
  22. package/node_modules/@groove-dev/gui/src/components/agents/agent-file-tree.jsx +12 -8
  23. package/node_modules/@groove-dev/gui/src/components/agents/agent-panel.jsx +79 -5
  24. package/node_modules/@groove-dev/gui/src/components/agents/code-review.jsx +5 -4
  25. package/node_modules/@groove-dev/gui/src/components/agents/workspace-mode.jsx +109 -12
  26. package/node_modules/@groove-dev/gui/src/components/dashboard/context-gauges.jsx +111 -0
  27. package/node_modules/@groove-dev/gui/src/components/dashboard/routing-chart.jsx +70 -33
  28. package/node_modules/@groove-dev/gui/src/components/editor/ai-panel.jsx +77 -6
  29. package/node_modules/@groove-dev/gui/src/components/editor/code-editor.jsx +2 -68
  30. package/node_modules/@groove-dev/gui/src/components/editor/file-tree.jsx +2 -49
  31. package/node_modules/@groove-dev/gui/src/components/editor/terminal.jsx +15 -4
  32. package/node_modules/@groove-dev/gui/src/components/keeper/global-modals.jsx +10 -10
  33. package/node_modules/@groove-dev/gui/src/components/layout/activity-bar.jsx +1 -2
  34. package/node_modules/@groove-dev/gui/src/components/layout/terminal-panel.jsx +151 -3
  35. package/node_modules/@groove-dev/gui/src/components/marketplace/integration-wizard.jsx +223 -18
  36. package/node_modules/@groove-dev/gui/src/stores/groove.js +107 -29
  37. package/node_modules/@groove-dev/gui/src/views/agents.jsx +114 -56
  38. package/node_modules/@groove-dev/gui/src/views/dashboard.jsx +2 -0
  39. package/node_modules/@groove-dev/gui/src/views/marketplace.jsx +3 -71
  40. package/node_modules/@groove-dev/gui/src/views/memory.jsx +9 -9
  41. package/node_modules/@groove-dev/gui/src/views/model-lab.jsx +1 -6
  42. package/node_modules/@groove-dev/gui/src/views/models.jsx +658 -565
  43. package/package.json +1 -1
  44. package/packages/cli/package.json +1 -1
  45. package/packages/daemon/integrations-registry.json +12 -44
  46. package/packages/daemon/package.json +1 -1
  47. package/packages/daemon/src/api.js +100 -23
  48. package/packages/daemon/src/integrations.js +10 -0
  49. package/packages/daemon/src/introducer.js +1 -1
  50. package/packages/daemon/src/journalist.js +171 -1
  51. package/packages/daemon/src/keeper.js +2 -2
  52. package/packages/daemon/src/memory.js +8 -5
  53. package/packages/daemon/src/model-lab.js +11 -0
  54. package/packages/daemon/src/process.js +65 -0
  55. package/packages/daemon/src/rotator.js +25 -8
  56. package/packages/daemon/src/validate.js +8 -0
  57. package/packages/gui/dist/assets/{codemirror-BQqYnZfL.js → codemirror-BYKpdS2W.js} +10 -10
  58. package/packages/gui/dist/assets/index-Bjd91ufV.js +984 -0
  59. package/packages/gui/dist/assets/index-BqdwIFn4.css +1 -0
  60. package/packages/gui/dist/index.html +3 -3
  61. package/packages/gui/package.json +1 -1
  62. package/packages/gui/src/app.jsx +0 -2
  63. package/packages/gui/src/components/agents/agent-chat.jsx +3 -4
  64. package/packages/gui/src/components/agents/agent-feed.jsx +8 -2
  65. package/packages/gui/src/components/agents/agent-file-tree.jsx +12 -8
  66. package/packages/gui/src/components/agents/agent-panel.jsx +79 -5
  67. package/packages/gui/src/components/agents/code-review.jsx +5 -4
  68. package/packages/gui/src/components/agents/workspace-mode.jsx +109 -12
  69. package/packages/gui/src/components/dashboard/context-gauges.jsx +111 -0
  70. package/packages/gui/src/components/dashboard/routing-chart.jsx +70 -33
  71. package/packages/gui/src/components/editor/ai-panel.jsx +77 -6
  72. package/packages/gui/src/components/editor/code-editor.jsx +2 -68
  73. package/packages/gui/src/components/editor/file-tree.jsx +2 -49
  74. package/packages/gui/src/components/editor/terminal.jsx +15 -4
  75. package/packages/gui/src/components/keeper/global-modals.jsx +10 -10
  76. package/packages/gui/src/components/layout/activity-bar.jsx +1 -2
  77. package/packages/gui/src/components/layout/terminal-panel.jsx +151 -3
  78. package/packages/gui/src/components/marketplace/integration-wizard.jsx +223 -18
  79. package/packages/gui/src/stores/groove.js +107 -29
  80. package/packages/gui/src/views/agents.jsx +114 -56
  81. package/packages/gui/src/views/dashboard.jsx +2 -0
  82. package/packages/gui/src/views/marketplace.jsx +3 -71
  83. package/packages/gui/src/views/memory.jsx +9 -9
  84. package/packages/gui/src/views/model-lab.jsx +1 -6
  85. package/packages/gui/src/views/models.jsx +658 -565
  86. package/plan_files/keeper-manual.md +53 -42
  87. package/node_modules/@groove-dev/gui/dist/assets/index-BV9CAiw1.css +0 -1
  88. package/node_modules/@groove-dev/gui/dist/assets/index-DK6UIz0n.js +0 -8698
  89. package/node_modules/@groove-dev/gui/src/components/toys/toy-card.jsx +0 -78
  90. package/node_modules/@groove-dev/gui/src/components/toys/toy-creator.jsx +0 -144
  91. package/node_modules/@groove-dev/gui/src/components/toys/toy-launcher.jsx +0 -187
  92. package/node_modules/@groove-dev/gui/src/views/toys.jsx +0 -162
  93. package/packages/gui/dist/assets/index-BV9CAiw1.css +0 -1
  94. package/packages/gui/dist/assets/index-DK6UIz0n.js +0 -8698
  95. package/packages/gui/src/components/toys/toy-card.jsx +0 -78
  96. package/packages/gui/src/components/toys/toy-creator.jsx +0 -144
  97. package/packages/gui/src/components/toys/toy-launcher.jsx +0 -187
  98. package/packages/gui/src/views/toys.jsx +0 -162
@@ -1976,6 +1976,10 @@ For normal file edits within your scope, proceed without review.
1976
1976
  * Resume a completed agent's session with a new message.
1977
1977
  * Uses --resume SESSION_ID for zero cold-start continuation.
1978
1978
  * Falls back to full spawn if no session ID available.
1979
+ *
1980
+ * If the agent has been idle for longer than IDLE_CONTEXT_THRESHOLD,
1981
+ * spawns fresh with the full conversation thread instead of --resume.
1982
+ * This avoids degraded context from internal compaction.
1979
1983
  */
1980
1984
  async resume(agentId, message) {
1981
1985
  const { registry, locks } = this.daemon;
@@ -1996,6 +2000,12 @@ For normal file edits within your scope, proceed without review.
1996
2000
  return this.daemon.rotator.rotate(agentId, { additionalPrompt: message });
1997
2001
  }
1998
2002
 
2003
+ // Conversation-thread resume: available via explicit API call (conversationResume=true)
2004
+ // but NOT automatic. The old 5-min idle threshold was too aggressive — it replaced
2005
+ // every normal --resume with a full re-spawn, losing the Claude Code session.
2006
+ // Normal --resume preserves the actual CC session; conversation-resume is for when
2007
+ // the user explicitly wants a fresh context with the dialogue replayed.
2008
+
1999
2009
  const provider = getProvider(agent.provider || 'claude-code');
2000
2010
  if (!provider?.buildResumeCommand) {
2001
2011
  return this.daemon.rotator.rotate(agentId, { additionalPrompt: message });
@@ -2125,6 +2135,61 @@ For normal file edits within your scope, proceed without review.
2125
2135
  return newAgent;
2126
2136
  }
2127
2137
 
2138
+ /**
2139
+ * Conversation-thread resume: spawns a fresh agent with the full
2140
+ * user↔assistant conversation as context instead of using --resume
2141
+ * on a potentially compacted session. Used when idle > threshold.
2142
+ */
2143
+ async _conversationResume(agentId, agent, resumePrompt) {
2144
+ const { registry, locks } = this.daemon;
2145
+ const config = { ...agent };
2146
+
2147
+ if (this.handles.has(agentId)) {
2148
+ await this.kill(agentId);
2149
+ }
2150
+ registry.remove(agentId);
2151
+ locks.release(agentId);
2152
+
2153
+ const newAgent = await this.spawn({
2154
+ role: config.role,
2155
+ scope: config.scope,
2156
+ provider: config.provider,
2157
+ model: config.model,
2158
+ prompt: resumePrompt,
2159
+ permission: config.permission || 'full',
2160
+ workingDir: config.workingDir,
2161
+ name: config.name,
2162
+ teamId: config.teamId,
2163
+ isRotation: true,
2164
+ });
2165
+
2166
+ // Carry cumulative token count for tracking
2167
+ if (config.tokensUsed > 0) {
2168
+ registry.update(newAgent.id, { tokensUsed: config.tokensUsed });
2169
+ }
2170
+
2171
+ if (this.daemon.timeline) {
2172
+ this.daemon.timeline.recordEvent('conversation_resume', {
2173
+ agentId: newAgent.id,
2174
+ oldAgentId: agentId,
2175
+ agentName: newAgent.name,
2176
+ role: config.role,
2177
+ idleMinutes: Math.round((Date.now() - new Date(config.lastActivity).getTime()) / 60000),
2178
+ });
2179
+ }
2180
+
2181
+ this.daemon.broadcast({
2182
+ type: 'rotation:complete',
2183
+ agentId: newAgent.id,
2184
+ agentName: newAgent.name,
2185
+ oldAgentId: agentId,
2186
+ reason: 'conversation_resume',
2187
+ tokensSaved: 0,
2188
+ });
2189
+
2190
+ return newAgent;
2191
+ }
2192
+
2128
2193
  async _resumeAgentLoop(agentId, agent, message, provider) {
2129
2194
  const { registry, locks } = this.daemon;
2130
2195
  const config = { ...agent };
@@ -346,14 +346,31 @@ export class Rotator extends EventEmitter {
346
346
  delete this.scoreHistory[agentId];
347
347
  this.compactionCounts.delete(agentId);
348
348
 
349
- let brief = await journalist.generateHandoffBrief(agent, {
350
- reason: options.reason,
351
- qualityScore: options.qualityScore,
352
- signals: options.signals,
353
- });
354
-
355
- if (options.additionalPrompt) {
356
- brief = brief + '\n\n## User Instruction\n\n' + options.additionalPrompt;
349
+ // Try conversation-thread resume first: replays the actual user↔assistant
350
+ // dialogue from stream-json logs so the new agent picks up with full context
351
+ // instead of a lossy journalist summary. Falls back to the brief if logs are
352
+ // empty or the thread is too short to be useful.
353
+ let brief;
354
+ let usedConversationThread = false;
355
+ if (typeof journalist.buildConversationResumePrompt === 'function') {
356
+ const conversationPrompt = journalist.buildConversationResumePrompt(
357
+ agent,
358
+ options.additionalPrompt || ''
359
+ );
360
+ if (conversationPrompt && conversationPrompt.length > 500) {
361
+ brief = conversationPrompt;
362
+ usedConversationThread = true;
363
+ }
364
+ }
365
+ if (!usedConversationThread) {
366
+ brief = await journalist.generateHandoffBrief(agent, {
367
+ reason: options.reason,
368
+ qualityScore: options.qualityScore,
369
+ signals: options.signals,
370
+ });
371
+ if (options.additionalPrompt) {
372
+ brief = brief + '\n\n## User Instruction\n\n' + options.additionalPrompt;
373
+ }
357
374
  }
358
375
 
359
376
  if (agent.role === 'planner' && !brief.includes('PLANNING ONLY')) {
@@ -112,6 +112,12 @@ export function validateAgentConfig(config) {
112
112
  if (!isNaN(v) && v >= 0 && v <= 100) verbosity = Math.round(v);
113
113
  }
114
114
 
115
+ const validEffort = ['min', 'low', 'default', 'high', 'max'];
116
+ const effort = validEffort.includes(config.effort) ? config.effort : undefined;
117
+
118
+ const validRouting = ['fixed', 'auto', 'auto-floor'];
119
+ const routingMode = validRouting.includes(config.routingMode) ? config.routingMode : undefined;
120
+
115
121
  // Return sanitized config (only known fields)
116
122
  return {
117
123
  role: config.role,
@@ -131,6 +137,8 @@ export function validateAgentConfig(config) {
131
137
  reasoningEffort: numericReasoningEffort ?? reasoningEffort,
132
138
  temperature,
133
139
  verbosity,
140
+ effort,
141
+ routingMode,
134
142
  labPresetId: (typeof config.labPresetId === 'string' && config.labPresetId.length <= 64) ? config.labPresetId : undefined,
135
143
  keeperTags: Array.isArray(config.keeperTags) ? config.keeperTags.filter(t => typeof t === 'string').slice(0, 20) : undefined,
136
144
  };