groove-dev 0.27.103 → 0.27.106

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 (39) hide show
  1. package/moe-training/client/index.js +1 -0
  2. package/moe-training/client/step-classifier.js +1 -1
  3. package/moe-training/client/trajectory-capture.js +52 -7
  4. package/moe-training/test/client/step-classifier.test.js +42 -0
  5. package/moe-training/test/client/trajectory-capture.test.js +199 -0
  6. package/node_modules/@groove-dev/cli/package.json +1 -1
  7. package/node_modules/@groove-dev/daemon/package.json +1 -1
  8. package/node_modules/@groove-dev/daemon/src/api.js +21 -7
  9. package/node_modules/@groove-dev/daemon/src/process.js +54 -0
  10. package/node_modules/@groove-dev/daemon/src/providers/claude-code.js +7 -7
  11. package/node_modules/@groove-dev/daemon/src/providers/codex.js +1 -1
  12. package/node_modules/@groove-dev/daemon/src/providers/gemini.js +1 -1
  13. package/node_modules/@groove-dev/gui/dist/assets/{index-8gdXdRnq.js → index-BN7fQKaF.js} +23 -23
  14. package/node_modules/@groove-dev/gui/dist/assets/{index-C1ObKizg.css → index-QwgLRN8B.css} +1 -1
  15. package/node_modules/@groove-dev/gui/dist/index.html +2 -2
  16. package/node_modules/@groove-dev/gui/package.json +1 -1
  17. package/node_modules/@groove-dev/gui/src/components/onboarding/setup-wizard.jsx +6 -0
  18. package/node_modules/@groove-dev/gui/src/components/settings/ProviderSetupWizard.jsx +57 -7
  19. package/node_modules/@groove-dev/gui/src/views/settings.jsx +35 -2
  20. package/node_modules/moe-training/client/index.js +1 -0
  21. package/node_modules/moe-training/client/step-classifier.js +1 -1
  22. package/node_modules/moe-training/client/trajectory-capture.js +52 -7
  23. package/node_modules/moe-training/test/client/step-classifier.test.js +42 -0
  24. package/node_modules/moe-training/test/client/trajectory-capture.test.js +199 -0
  25. package/package.json +1 -1
  26. package/packages/cli/package.json +1 -1
  27. package/packages/daemon/package.json +1 -1
  28. package/packages/daemon/src/api.js +21 -7
  29. package/packages/daemon/src/process.js +54 -0
  30. package/packages/daemon/src/providers/claude-code.js +7 -7
  31. package/packages/daemon/src/providers/codex.js +1 -1
  32. package/packages/daemon/src/providers/gemini.js +1 -1
  33. package/packages/gui/dist/assets/{index-8gdXdRnq.js → index-BN7fQKaF.js} +23 -23
  34. package/packages/gui/dist/assets/{index-C1ObKizg.css → index-QwgLRN8B.css} +1 -1
  35. package/packages/gui/dist/index.html +2 -2
  36. package/packages/gui/package.json +1 -1
  37. package/packages/gui/src/components/onboarding/setup-wizard.jsx +6 -0
  38. package/packages/gui/src/components/settings/ProviderSetupWizard.jsx +57 -7
  39. package/packages/gui/src/views/settings.jsx +35 -2
@@ -1760,6 +1760,15 @@ For normal file edits within your scope, proceed without review.
1760
1760
  locks.register(newAgent.id, newAgent.scope, newAgent.workingDir);
1761
1761
  }
1762
1762
 
1763
+ if (this.daemon.trajectoryCapture) {
1764
+ try {
1765
+ const teamSize = registry.getAll().filter(a => a.status === 'active' || a.status === 'running' || a.status === 'starting').length;
1766
+ this.daemon.trajectoryCapture.onAgentSpawn(
1767
+ newAgent.id, config.provider, config.model || null, config.role, teamSize
1768
+ ).catch(() => {});
1769
+ } catch (e) { /* fail silent */ }
1770
+ }
1771
+
1763
1772
  // Spawn the resumed process
1764
1773
  const resumeCwd = [config.workingDir, this.daemon.projectDir].find(d => d && existsSync(d)) || this.daemon.projectDir;
1765
1774
  const proc = cpSpawn(command, args, {
@@ -1815,6 +1824,23 @@ For normal file edits within your scope, proceed without review.
1815
1824
 
1816
1825
  const finalStatus = signal === 'SIGTERM' || signal === 'SIGKILL' ? 'killed' : code === 0 ? 'completed' : 'crashed';
1817
1826
  registry.update(newAgent.id, { status: finalStatus, pid: null });
1827
+
1828
+ if (this.daemon.trajectoryCapture) {
1829
+ try {
1830
+ if (finalStatus === 'completed') {
1831
+ this.daemon.trajectoryCapture.onAgentComplete(newAgent.id, {
1832
+ status: 'SUCCESS', exit_code: code, signal,
1833
+ });
1834
+ } else {
1835
+ this.daemon.trajectoryCapture.onAgentCrash(newAgent.id,
1836
+ signal ? 'Killed by signal ' + signal : 'Exit code ' + code
1837
+ );
1838
+ }
1839
+ const count = (this.daemon.state.get('training_sessions_captured') || 0) + 1;
1840
+ this.daemon.state.set('training_sessions_captured', count);
1841
+ } catch (e) { /* fail silent */ }
1842
+ }
1843
+
1818
1844
  this.daemon.broadcast({ type: 'agent:exit', agentId: newAgent.id, code, signal, status: finalStatus });
1819
1845
  if (finalStatus === 'completed' && this.daemon.journalist) {
1820
1846
  const a = registry.get(newAgent.id);
@@ -1930,8 +1956,20 @@ For normal file edits within your scope, proceed without review.
1930
1956
  });
1931
1957
  }
1932
1958
 
1959
+ if (this.daemon.trajectoryCapture) {
1960
+ try {
1961
+ const teamSize = registry.getAll().filter(a => a.status === 'active' || a.status === 'running' || a.status === 'starting').length;
1962
+ this.daemon.trajectoryCapture.onAgentSpawn(
1963
+ newAgent.id, config.provider, loopConfig.model || config.model || null, config.role, teamSize
1964
+ ).catch(() => {});
1965
+ } catch (e) { /* fail silent */ }
1966
+ }
1967
+
1933
1968
  loop.on('output', (output) => {
1934
1969
  this._handleAgentOutput(newAgent.id, output);
1970
+ if (this.daemon.trajectoryCapture) {
1971
+ try { this.daemon.trajectoryCapture.onParsedOutput(newAgent.id, output); } catch (e) { /* fail silent */ }
1972
+ }
1935
1973
  });
1936
1974
 
1937
1975
  loop.on('exit', ({ code, signal, status }) => {
@@ -1960,6 +1998,22 @@ For normal file edits within your scope, proceed without review.
1960
1998
  });
1961
1999
  }
1962
2000
 
2001
+ if (this.daemon.trajectoryCapture) {
2002
+ try {
2003
+ if (status === 'completed') {
2004
+ this.daemon.trajectoryCapture.onAgentComplete(newAgent.id, {
2005
+ status: 'SUCCESS', exit_code: code || 0, signal,
2006
+ });
2007
+ } else {
2008
+ this.daemon.trajectoryCapture.onAgentCrash(newAgent.id,
2009
+ signal ? 'Killed by signal ' + signal : 'Exit status ' + status
2010
+ );
2011
+ }
2012
+ const count = (this.daemon.state.get('training_sessions_captured') || 0) + 1;
2013
+ this.daemon.state.set('training_sessions_captured', count);
2014
+ } catch (e) { /* fail silent */ }
2015
+ }
2016
+
1963
2017
  this.daemon.broadcast({ type: 'agent:exit', agentId: newAgent.id, code: code || 0, signal, status });
1964
2018
  if (this.daemon.integrations) this.daemon.integrations.refreshMcpJson();
1965
2019
 
@@ -46,7 +46,7 @@ export class ClaudeCodeProvider extends Provider {
46
46
 
47
47
  static isInstalled() {
48
48
  try {
49
- const cmd = process.platform === 'win32' ? 'where claude' : 'which claude';
49
+ const cmd = process.platform === 'win32' ? 'where claude' : 'bash -lc "which claude"';
50
50
  execSync(cmd, { stdio: 'ignore' });
51
51
  return true;
52
52
  } catch {
@@ -55,14 +55,14 @@ export class ClaudeCodeProvider extends Provider {
55
55
  }
56
56
 
57
57
  static isAuthenticated() {
58
- const home = homedir();
59
- const settingsPath = resolve(home, '.claude', 'settings.json');
60
- if (!existsSync(settingsPath)) return { authenticated: false, reason: 'Claude Code not configured' };
58
+ if (!ClaudeCodeProvider.isInstalled()) return { authenticated: false, reason: 'Claude Code not installed' };
61
59
  try {
62
- execSync('claude --version', { stdio: 'ignore', timeout: 5000 });
63
- return { authenticated: true, method: 'subscription' };
60
+ const out = execSync('bash -lc "claude auth status --json"', { encoding: 'utf8', timeout: 10_000, stdio: ['pipe', 'pipe', 'pipe'] });
61
+ const data = JSON.parse(out);
62
+ const method = data.authMethod || data.auth_method || 'subscription';
63
+ return { authenticated: true, method };
64
64
  } catch {
65
- return { authenticated: false, reason: 'Claude CLI not responding' };
65
+ return { authenticated: false, reason: 'Not logged in. Run: claude auth login' };
66
66
  }
67
67
  }
68
68
 
@@ -49,7 +49,7 @@ export class CodexProvider extends Provider {
49
49
 
50
50
  static isInstalled() {
51
51
  try {
52
- const cmd = process.platform === 'win32' ? 'where codex' : 'which codex';
52
+ const cmd = process.platform === 'win32' ? 'where codex' : 'bash -lc "which codex"';
53
53
  execSync(cmd, { stdio: 'ignore' });
54
54
  return true;
55
55
  } catch {
@@ -41,7 +41,7 @@ export class GeminiProvider extends Provider {
41
41
 
42
42
  static isInstalled() {
43
43
  try {
44
- const cmd = process.platform === 'win32' ? 'where gemini' : 'which gemini';
44
+ const cmd = process.platform === 'win32' ? 'where gemini' : 'bash -lc "which gemini"';
45
45
  execSync(cmd, { stdio: 'ignore' });
46
46
  return true;
47
47
  } catch {