groove-dev 0.27.155 → 0.27.156
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/CLAUDE.md +0 -7
- 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/routes/files.js +26 -4
- package/node_modules/@groove-dev/gui/dist/assets/{index-BTLb6zTD.js → index-COQYX12F.js} +2 -2
- package/node_modules/@groove-dev/gui/dist/index.html +1 -1
- package/node_modules/@groove-dev/gui/package.json +1 -1
- package/node_modules/@groove-dev/gui/src/components/agents/agent-file-tree.jsx +12 -14
- package/node_modules/@groove-dev/gui/src/components/editor/file-tree.jsx +6 -8
- package/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/daemon/package.json +1 -1
- package/packages/daemon/src/routes/files.js +26 -4
- package/packages/gui/dist/assets/{index-BTLb6zTD.js → index-COQYX12F.js} +2 -2
- package/packages/gui/dist/index.html +1 -1
- package/packages/gui/package.json +1 -1
- package/packages/gui/src/components/agents/agent-file-tree.jsx +12 -14
- package/packages/gui/src/components/editor/file-tree.jsx +6 -8
package/CLAUDE.md
CHANGED
|
@@ -295,10 +295,3 @@ Audit-driven release. Multi-agent orchestration system with 7 coordination layer
|
|
|
295
295
|
- Dashboard: routing donut, cache panel, context health gauges
|
|
296
296
|
- Monitor/QC agent mode (stay active, loop)
|
|
297
297
|
- Distribution: demo video, HN launch, Twitter content
|
|
298
|
-
|
|
299
|
-
<!-- GROOVE:START -->
|
|
300
|
-
## GROOVE Orchestration (auto-injected)
|
|
301
|
-
Active agents: 0
|
|
302
|
-
See AGENTS_REGISTRY.md for full agent state.
|
|
303
|
-
**Memory policy:** GROOVE manages project memory automatically. Do not read or write MEMORY.md or .groove/memory/ files directly.
|
|
304
|
-
<!-- GROOVE:END -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// FSL-1.1-Apache-2.0 — see LICENSE
|
|
2
2
|
import { resolve, sep, isAbsolute, basename } from 'path';
|
|
3
3
|
import { existsSync, readFileSync, readdirSync, statSync, writeFileSync, mkdirSync, unlinkSync, renameSync, rmSync, createReadStream, realpathSync } from 'fs';
|
|
4
|
-
import { execFile, execFileSync } from 'child_process';
|
|
4
|
+
import { execFile, execFileSync, spawn } from 'child_process';
|
|
5
5
|
import { homedir } from 'os';
|
|
6
6
|
import { lookup as mimeLookup } from '../mimetypes.js';
|
|
7
7
|
|
|
@@ -331,15 +331,37 @@ export function registerFileRoutes(app, daemon) {
|
|
|
331
331
|
}
|
|
332
332
|
});
|
|
333
333
|
|
|
334
|
-
// Download a file (
|
|
334
|
+
// Download a file or folder (folders are streamed as zip)
|
|
335
335
|
app.get('/api/files/download', (req, res) => {
|
|
336
336
|
const relPath = req.query.path;
|
|
337
337
|
const result = validateFilePath(relPath, getEditorRoot(daemon));
|
|
338
338
|
if (result.error) return res.status(400).json({ error: result.error });
|
|
339
|
-
if (!existsSync(result.fullPath)) return res.status(404).json({ error: '
|
|
339
|
+
if (!existsSync(result.fullPath)) return res.status(404).json({ error: 'Not found' });
|
|
340
340
|
|
|
341
341
|
const stat = statSync(result.fullPath);
|
|
342
|
-
|
|
342
|
+
|
|
343
|
+
if (stat.isDirectory()) {
|
|
344
|
+
const folderName = basename(result.fullPath);
|
|
345
|
+
res.setHeader('Content-Disposition', `attachment; filename="${encodeURIComponent(folderName)}.zip"`);
|
|
346
|
+
res.setHeader('Content-Type', 'application/zip');
|
|
347
|
+
|
|
348
|
+
const zipProc = spawn('zip', [
|
|
349
|
+
'-r', '-q', '-',
|
|
350
|
+
relPath,
|
|
351
|
+
'-x', `${relPath}/.git/*`,
|
|
352
|
+
'-x', `${relPath}/node_modules/*`,
|
|
353
|
+
], {
|
|
354
|
+
cwd: getEditorRoot(daemon),
|
|
355
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
356
|
+
});
|
|
357
|
+
|
|
358
|
+
zipProc.stdout.pipe(res);
|
|
359
|
+
zipProc.stderr.on('data', () => {});
|
|
360
|
+
zipProc.on('error', () => {
|
|
361
|
+
if (!res.headersSent) res.status(500).json({ error: 'Failed to create zip' });
|
|
362
|
+
});
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
343
365
|
|
|
344
366
|
const name = basename(result.fullPath);
|
|
345
367
|
const mime = mimeLookup(name) || 'application/octet-stream';
|