multi-agents-cli 1.0.85 → 1.0.86
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/restart.js +20 -4
- package/package.json +1 -1
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