multi-agents-cli 1.1.2 → 1.1.4
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/core/workflow/reset.js +15 -7
- package/package.json +1 -1
package/core/workflow/reset.js
CHANGED
|
@@ -216,7 +216,7 @@ const main = async () => {
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
// Wipe project files (keep .git
|
|
219
|
+
// Wipe project files (keep .git — git repo is infrastructure, not framework state)
|
|
220
220
|
const keepList = ['.git'];
|
|
221
221
|
const entries = fs.readdirSync(ROOT);
|
|
222
222
|
for (const entry of entries) {
|
|
@@ -227,18 +227,26 @@ const main = async () => {
|
|
|
227
227
|
}
|
|
228
228
|
console.log(` ${green('✓')} Project files removed`);
|
|
229
229
|
|
|
230
|
-
|
|
230
|
+
|
|
231
|
+
// ── Re-plant package.json ────────────────────────────────────────────
|
|
232
|
+
|
|
231
233
|
try {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
const freshPkg = {
|
|
235
|
+
name: projectName.toLowerCase().replace(/\s+/g, '-'),
|
|
236
|
+
version: '1.0.0',
|
|
237
|
+
scripts: { init: 'multi-agents init' },
|
|
238
|
+
};
|
|
239
|
+
fs.writeFileSync(path.join(ROOT, 'package.json'), JSON.stringify(freshPkg, null, 2) + '\n', 'utf8');
|
|
240
|
+
console.log(' ' + green('\u2713') + ' package.json re-planted');
|
|
241
|
+
} catch { /* best-effort */ }
|
|
235
242
|
|
|
236
243
|
// ── Post-wipe instructions ────────────────────────────────────────────────────
|
|
237
244
|
|
|
238
245
|
separator();
|
|
239
246
|
console.log(`${green(bold(' Project wiped successfully.'))}\n`);
|
|
240
|
-
console.log(`
|
|
241
|
-
console.log(` ${cyan(
|
|
247
|
+
console.log(` Run to start fresh:\n`);
|
|
248
|
+
console.log(` ${cyan('npm run init')}
|
|
249
|
+
`);
|
|
242
250
|
separator();
|
|
243
251
|
|
|
244
252
|
process.exit(0);
|
package/package.json
CHANGED