multi-agents-cli 1.0.85 → 1.0.87
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 +15 -0
- package/core/workflow/restart.js +20 -4
- package/package.json +1 -1
package/core/workflow/agent.js
CHANGED
|
@@ -1360,6 +1360,21 @@ ${excludedUrls}
|
|
|
1360
1360
|
);
|
|
1361
1361
|
console.log(` ${green('✓')} package.json proxy written`);
|
|
1362
1362
|
|
|
1363
|
+
// ── Write worktree .gitignore — block framework files from agent commits ────
|
|
1364
|
+
const worktreeGitignore = [
|
|
1365
|
+
'# Framework files — never commit these to the agent branch',
|
|
1366
|
+
'package.json',
|
|
1367
|
+
'.claude-scope',
|
|
1368
|
+
'scope.json',
|
|
1369
|
+
'TASK.md',
|
|
1370
|
+
'.vscode/',
|
|
1371
|
+
'.idea/',
|
|
1372
|
+
'.zed/',
|
|
1373
|
+
'node_modules/',
|
|
1374
|
+
].join('\n') + '\n';
|
|
1375
|
+
fs.writeFileSync(path.join(worktreePath, '.gitignore'), worktreeGitignore, 'utf8');
|
|
1376
|
+
console.log(` ${green('✓')} .gitignore written (framework files excluded from agent commits)`);
|
|
1377
|
+
|
|
1363
1378
|
// ── Write .tracking.json slot
|
|
1364
1379
|
|
|
1365
1380
|
guards.updateTrackingSlot(tracking, project, agent, {
|
package/core/workflow/restart.js
CHANGED
|
@@ -54,6 +54,12 @@ const ENTRY_CWD = process.cwd();
|
|
|
54
54
|
// ── Constants ─────────────────────────────────────────────────────────────────
|
|
55
55
|
const INIT_AGENTS = { client: ['UI'], backend: ['INIT'] };
|
|
56
56
|
|
|
57
|
+
const AGENTS = {
|
|
58
|
+
client: ['UI', 'LOGIC', 'FORMS', 'ROUTING', 'TESTING', 'ACCESSIBILITY'],
|
|
59
|
+
backend: ['INIT', 'API', 'LOGIC', 'AUTH', 'DB', 'TESTING', 'EVENTS', 'JOBS'],
|
|
60
|
+
shared: ['SECURITY'],
|
|
61
|
+
};
|
|
62
|
+
|
|
57
63
|
const DEPENDENCIES = {
|
|
58
64
|
client: { UI: ['LOGIC', 'FORMS', 'ROUTING', 'TESTING', 'ACCESSIBILITY'] },
|
|
59
65
|
backend: { INIT: ['API', 'LOGIC', 'AUTH', 'DB', 'EVENTS', 'JOBS', 'TESTING'] },
|
|
@@ -98,6 +104,14 @@ const buildCandidates = () => {
|
|
|
98
104
|
candidates.push({ scope: m[1], agent: m[2], branch: wt.branch, worktreePath: wt.path, status: 'UNTRACKED' });
|
|
99
105
|
}
|
|
100
106
|
|
|
107
|
+
// Append available (not yet started) agents
|
|
108
|
+
for (const scope of ['client', 'backend', 'shared']) {
|
|
109
|
+
for (const agent of (AGENTS[scope] || [])) {
|
|
110
|
+
if (candidates.find(c => c.scope === scope && c.agent === agent)) continue;
|
|
111
|
+
candidates.push({ scope, agent, branch: null, worktreePath: null, status: 'AVAILABLE' });
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
101
115
|
return candidates;
|
|
102
116
|
};
|
|
103
117
|
|
|
@@ -147,9 +161,9 @@ const main = async () => {
|
|
|
147
161
|
|
|
148
162
|
const candidates = buildCandidates();
|
|
149
163
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
console.log(
|
|
164
|
+
const activeCandidates = candidates.filter(c => c.status !== 'AVAILABLE');
|
|
165
|
+
if (activeCandidates.length === 0 && candidates.length === 0) {
|
|
166
|
+
console.log(yellow('\n No agents found.\n'));
|
|
153
167
|
rl.close(); process.exit(0);
|
|
154
168
|
}
|
|
155
169
|
|
|
@@ -161,7 +175,9 @@ const main = async () => {
|
|
|
161
175
|
console.log(`\n${bold('* Select agent to restart:')}\n`);
|
|
162
176
|
const idx = await arrowSelect('Select agent', [
|
|
163
177
|
...candidates.map(c => ({
|
|
164
|
-
label:
|
|
178
|
+
label: c.status === 'AVAILABLE'
|
|
179
|
+
? `${dim(c.agent)} ${dim(`(${c.scope})`)} ${dim('not started')}`
|
|
180
|
+
: `${bold(c.agent)} ${dim(`(${c.scope})`)} ${dim(c.branch)} ${c.status === 'UNTRACKED' ? yellow('untracked') : dim(c.status)}`,
|
|
165
181
|
})),
|
|
166
182
|
{ label: dim('← cancel') },
|
|
167
183
|
]);
|
package/package.json
CHANGED