groove-dev 0.27.62 → 0.27.64

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groove-dev/cli",
3
- "version": "0.27.62",
3
+ "version": "0.27.64",
4
4
  "description": "GROOVE CLI — manage AI coding agents from your terminal",
5
5
  "license": "FSL-1.1-Apache-2.0",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groove-dev/daemon",
3
- "version": "0.27.62",
3
+ "version": "0.27.64",
4
4
  "description": "GROOVE daemon — agent orchestration engine",
5
5
  "license": "FSL-1.1-Apache-2.0",
6
6
  "type": "module",
@@ -4725,10 +4725,13 @@ Keep responses concise. Help them think, don't lecture them about the system the
4725
4725
 
4726
4726
  app.get('/api/network/install/status', networkGate, (req, res) => {
4727
4727
  const installPath = networkRoot();
4728
- const installed = existsSync(resolve(installPath, 'setup.sh'));
4728
+ const dirExists = existsSync(installPath);
4729
+ const installed = dirExists && existsSync(resolve(installPath, 'setup.sh'));
4730
+ const stale = dirExists && !installed;
4729
4731
  res.json({
4730
4732
  installed,
4731
- path: installed ? installPath : null,
4733
+ stale,
4734
+ path: dirExists ? installPath : null,
4732
4735
  version: installed ? getInstalledNetworkVersion() : null,
4733
4736
  });
4734
4737
  });
@@ -4746,9 +4749,17 @@ Keep responses concise. Help them think, don't lecture them about the system the
4746
4749
  return res.status(500).json({ error: 'Invalid install path' });
4747
4750
  }
4748
4751
 
4749
- // Refuse to clone over an existing directory avoids surprising merges.
4752
+ // If directory exists from a previous failed install, clean it up automatically.
4750
4753
  if (existsSync(installPath)) {
4751
- return res.status(400).json({ error: 'Install path already exists; uninstall first' });
4754
+ if (daemon.config?.networkBeta?.installed) {
4755
+ return res.status(400).json({ error: 'Install path already exists; uninstall first' });
4756
+ }
4757
+ try {
4758
+ rmSync(installPath, { recursive: true, force: true });
4759
+ daemon.audit?.log?.('network.install.stale-cleanup', { path: installPath });
4760
+ } catch (cleanupErr) {
4761
+ return res.status(500).json({ error: `Failed to clean stale install directory: ${cleanupErr.message}` });
4762
+ }
4752
4763
  }
4753
4764
 
4754
4765
  daemon.networkInstall = { running: true, startedAt: Date.now() };