multi-agents-cli 1.0.54 → 1.0.55
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/agent.js +1 -1
- package/core/workflow/complete.js +20 -1
- package/init.js +11 -0
- package/package.json +1 -1
package/core/workflow/agent.js
CHANGED
|
@@ -1400,7 +1400,7 @@ ${excludedUrls}
|
|
|
1400
1400
|
console.log(` ${bold('2.')} ${bold(yellow('Open a NEW session in Claude Code CLI or Claude Code Extension - and type go or start to initiate'))}`);
|
|
1401
1401
|
console.log(dim(' Do NOT reuse a previous session.\n'));
|
|
1402
1402
|
console.log(` ${bold('3.')} Start the session and let the agent run.\n`);
|
|
1403
|
-
console.log(
|
|
1403
|
+
console.log(` ${bold('4.')} When the agent is done, run: ${cyan('npm run complete')} to merge the task into main.\n`);
|
|
1404
1404
|
separator();
|
|
1405
1405
|
console.log('');
|
|
1406
1406
|
|
|
@@ -187,7 +187,10 @@ const main = async () => {
|
|
|
187
187
|
|
|
188
188
|
const policyScope = scopePolicy[scopeMeta.policy];
|
|
189
189
|
const agentKey = scopeMeta.agent && scopeMeta.agent.toUpperCase();
|
|
190
|
-
const
|
|
190
|
+
const override = policyScope && policyScope.agentOverrides && policyScope.agentOverrides[agentKey];
|
|
191
|
+
const scaffoldedFlag = (config.scaffolded || {})[scopeMeta.scope];
|
|
192
|
+
const overrideActive = override && (!override.onlyBeforeScaffolded || !scaffoldedFlag);
|
|
193
|
+
const allowed = (overrideActive && override.allowed) || (policyScope && policyScope.allowed) || [];
|
|
191
194
|
const blocked = (policyScope && policyScope.blocked) || [];
|
|
192
195
|
|
|
193
196
|
const changedFiles = execSync('git diff --name-only main...HEAD', { cwd: worktreePath, stdio: 'pipe' })
|
|
@@ -353,6 +356,22 @@ const main = async () => {
|
|
|
353
356
|
}
|
|
354
357
|
} catch { /* best-effort */ }
|
|
355
358
|
|
|
359
|
+
// ── Update scaffold flags ──────────────────────────────────────────────────
|
|
360
|
+
|
|
361
|
+
try {
|
|
362
|
+
const parts = branchName.split('/');
|
|
363
|
+
if (parts.length >= 4) {
|
|
364
|
+
const scope = parts[1];
|
|
365
|
+
const agent = parts[2].toUpperCase();
|
|
366
|
+
const cfgPath = path.join(ROOT, '.scaffold', '.config.json');
|
|
367
|
+
const cfg = JSON.parse(fs.readFileSync(cfgPath, 'utf8'));
|
|
368
|
+
if (!cfg.scaffolded) cfg.scaffolded = { client: false, backend: false };
|
|
369
|
+
if (scope === 'client' && agent === 'UI') cfg.scaffolded.client = true;
|
|
370
|
+
if (scope === 'backend' && agent === 'INIT') cfg.scaffolded.backend = true;
|
|
371
|
+
fs.writeFileSync(cfgPath, JSON.stringify(cfg, null, 2), 'utf8');
|
|
372
|
+
}
|
|
373
|
+
} catch { /* best-effort */ }
|
|
374
|
+
|
|
356
375
|
// ── Push to origin ────────────────────────────────────────────────────────────
|
|
357
376
|
|
|
358
377
|
try {
|
package/init.js
CHANGED
|
@@ -1192,6 +1192,10 @@ const main = async () => {
|
|
|
1192
1192
|
orm: backendOrm,
|
|
1193
1193
|
auth: backendAuth,
|
|
1194
1194
|
},
|
|
1195
|
+
scaffolded: {
|
|
1196
|
+
client: false,
|
|
1197
|
+
backend: false,
|
|
1198
|
+
},
|
|
1195
1199
|
};
|
|
1196
1200
|
|
|
1197
1201
|
fs.writeFileSync(
|
|
@@ -1207,6 +1211,12 @@ const main = async () => {
|
|
|
1207
1211
|
client: {
|
|
1208
1212
|
allowed: ['client/**'],
|
|
1209
1213
|
blocked: ['backend/**', 'shared/**', 'CONTRACTS.md', 'BUILD_STATE.md', 'TASKS_HISTORY.md'],
|
|
1214
|
+
agentOverrides: {
|
|
1215
|
+
UI: {
|
|
1216
|
+
allowed: ['client/**', 'shared/wiring.config.json'],
|
|
1217
|
+
onlyBeforeScaffolded: true,
|
|
1218
|
+
},
|
|
1219
|
+
},
|
|
1210
1220
|
},
|
|
1211
1221
|
backend: {
|
|
1212
1222
|
allowed: ['backend/**'],
|
|
@@ -1214,6 +1224,7 @@ const main = async () => {
|
|
|
1214
1224
|
agentOverrides: {
|
|
1215
1225
|
INIT: {
|
|
1216
1226
|
allowed: ['backend/**', 'shared/wiring.config.json', 'CONTRACTS.md'],
|
|
1227
|
+
onlyBeforeScaffolded: true,
|
|
1217
1228
|
},
|
|
1218
1229
|
},
|
|
1219
1230
|
},
|
package/package.json
CHANGED