@yemi33/minions 0.1.2191 → 0.1.2192
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/dashboard.js +0 -36
- package/package.json +1 -1
package/dashboard.js
CHANGED
|
@@ -7316,42 +7316,6 @@ const server = http.createServer(async (req, res) => {
|
|
|
7316
7316
|
return jsonReply(res, 200, plans);
|
|
7317
7317
|
}
|
|
7318
7318
|
|
|
7319
|
-
async function handlePlansUnarchive(req, res) {
|
|
7320
|
-
try {
|
|
7321
|
-
const body = await readBody(req);
|
|
7322
|
-
if (!body.file) return jsonReply(res, 400, { error: 'file required' });
|
|
7323
|
-
const file = body.file;
|
|
7324
|
-
if (file.includes('..') || file.includes('\0') || file.includes('/') || file.includes('\\')) return jsonReply(res, 400, { error: 'invalid' });
|
|
7325
|
-
|
|
7326
|
-
const isJson = file.endsWith('.json');
|
|
7327
|
-
const targetDir = isJson ? PRD_DIR : PLANS_DIR;
|
|
7328
|
-
const archiveDir = path.join(targetDir, 'archive');
|
|
7329
|
-
const archivePath = path.join(archiveDir, file);
|
|
7330
|
-
|
|
7331
|
-
if (!fs.existsSync(archivePath)) return jsonReply(res, 404, { error: 'File not found in archive' });
|
|
7332
|
-
fs.renameSync(archivePath, path.join(targetDir, file));
|
|
7333
|
-
|
|
7334
|
-
// If unarchiving a PRD .json, also unarchive its source .md plan
|
|
7335
|
-
let unarchivedSource = null;
|
|
7336
|
-
if (isJson) {
|
|
7337
|
-
try {
|
|
7338
|
-
const prd = safeJson(path.join(targetDir, file));
|
|
7339
|
-
if (prd?.source_plan) {
|
|
7340
|
-
const mdArchivePath = path.join(PLANS_DIR, 'archive', prd.source_plan);
|
|
7341
|
-
if (fs.existsSync(mdArchivePath)) {
|
|
7342
|
-
fs.renameSync(mdArchivePath, path.join(PLANS_DIR, prd.source_plan));
|
|
7343
|
-
unarchivedSource = prd.source_plan;
|
|
7344
|
-
}
|
|
7345
|
-
}
|
|
7346
|
-
} catch { /* optional */ }
|
|
7347
|
-
}
|
|
7348
|
-
|
|
7349
|
-
invalidateStatusCache();
|
|
7350
|
-
invalidatePlansCache();
|
|
7351
|
-
return jsonReply(res, 200, { ok: true, unarchivedSource });
|
|
7352
|
-
} catch (e) { return jsonReply(res, 400, { error: e.message }); }
|
|
7353
|
-
}
|
|
7354
|
-
|
|
7355
7319
|
async function handlePlansArchiveRead(req, res, match) {
|
|
7356
7320
|
const file = decodeURIComponent(match[1]);
|
|
7357
7321
|
if (file.includes('..') || file.includes('\0')) return jsonReply(res, 400, { error: 'invalid' });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2192",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|