multi-agents-cli 1.1.17 → 1.1.19
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 +23 -11
- package/core/workflow/guards.js +9 -2
- package/package.json +1 -1
package/core/workflow/agent.js
CHANGED
|
@@ -1119,7 +1119,8 @@ const main = async () => {
|
|
|
1119
1119
|
if (active) {
|
|
1120
1120
|
// Read task from TASK.md if available
|
|
1121
1121
|
let activeTask = activeSlot.branch;
|
|
1122
|
-
const
|
|
1122
|
+
const activeWorktreePath = path.isAbsolute(activeSlot.worktreePath) ? activeSlot.worktreePath : path.resolve(ROOT, activeSlot.worktreePath);
|
|
1123
|
+
const activeTm = path.join(activeWorktreePath, 'TASK.md');
|
|
1123
1124
|
if (fs.existsSync(activeTm)) {
|
|
1124
1125
|
const tmContent = fs.readFileSync(activeTm, 'utf8');
|
|
1125
1126
|
const taskMatch = tmContent.match(/## Task\n.*Task:\s*(.+)/);
|
|
@@ -1143,9 +1144,9 @@ const main = async () => {
|
|
|
1143
1144
|
if (activeChoice === 1) {
|
|
1144
1145
|
separator();
|
|
1145
1146
|
console.log(`\n ${green('✓')} Opening existing workspace...\n`);
|
|
1146
|
-
openIDE(
|
|
1147
|
+
openIDE(activeWorktreePath);
|
|
1147
1148
|
console.log(` ${bold('Resume your task:')}`);
|
|
1148
|
-
console.log(` ${dim('1.')} IDE should be open at: ${cyan(
|
|
1149
|
+
console.log(` ${dim('1.')} IDE should be open at: ${cyan(activeWorktreePath)}`);
|
|
1149
1150
|
console.log(` ${dim('2.')} Open a NEW session in Claude Code CLI or Claude Code Extension - type go or start to resume`);
|
|
1150
1151
|
console.log(` ${dim('3.')} Type: ${cyan('Read TASK.md and continue from where you stopped.')}\n`);
|
|
1151
1152
|
separator(); rl.close(); return;
|
|
@@ -1185,7 +1186,8 @@ const main = async () => {
|
|
|
1185
1186
|
});
|
|
1186
1187
|
|
|
1187
1188
|
if (gateResult.action === 'recovered') {
|
|
1188
|
-
|
|
1189
|
+
const gateWorktreePath = path.isAbsolute(gateResult.worktreePath) ? gateResult.worktreePath : path.resolve(ROOT, gateResult.worktreePath);
|
|
1190
|
+
openIDE(gateWorktreePath);
|
|
1189
1191
|
rl.close();
|
|
1190
1192
|
return;
|
|
1191
1193
|
}
|
|
@@ -1619,16 +1621,21 @@ Mark each step complete. Only proceed to the task below when all are checked.
|
|
|
1619
1621
|
const vscodeSettings = {
|
|
1620
1622
|
'files.exclude': {
|
|
1621
1623
|
...Object.fromEntries(foldersToHide.map(f => [f, true])),
|
|
1622
|
-
'.idea/':
|
|
1623
|
-
'.zed/':
|
|
1624
|
-
'.agents/':
|
|
1625
|
-
'.frameworks/':
|
|
1626
|
-
'**/node_modules':
|
|
1624
|
+
'.idea/': true,
|
|
1625
|
+
'.zed/': true,
|
|
1626
|
+
'.agents/': true,
|
|
1627
|
+
'.frameworks/': true,
|
|
1628
|
+
'**/node_modules': true,
|
|
1629
|
+
'.git': true,
|
|
1630
|
+
'.gitignore': true,
|
|
1631
|
+
'.claude-scope': true,
|
|
1632
|
+
'scope.json': true,
|
|
1633
|
+
'package.json': true,
|
|
1627
1634
|
},
|
|
1628
1635
|
'search.exclude': {
|
|
1629
1636
|
'**/node_modules': true,
|
|
1630
1637
|
},
|
|
1631
|
-
'explorer.excludeGitIgnore':
|
|
1638
|
+
'explorer.excludeGitIgnore': false,
|
|
1632
1639
|
};
|
|
1633
1640
|
fs.writeFileSync(
|
|
1634
1641
|
path.join(vscodeDir, 'settings.json'),
|
|
@@ -1641,7 +1648,7 @@ Mark each step complete. Only proceed to the task below when all are checked.
|
|
|
1641
1648
|
|
|
1642
1649
|
const ideaDir = path.join(worktreePath, '.idea');
|
|
1643
1650
|
fs.mkdirSync(ideaDir, { recursive: true });
|
|
1644
|
-
const allExcluded = [...foldersToHide, '.agents/', '.frameworks/', 'node_modules/'];
|
|
1651
|
+
const allExcluded = [...foldersToHide, '.agents/', '.frameworks/', 'node_modules/', '.git/', '.claude-scope', 'scope.json', 'package.json', '.gitignore'];
|
|
1645
1652
|
const excludedUrls = allExcluded
|
|
1646
1653
|
.map(f => ` <excludeFolder url="file://$MODULE_DIR$/${f.replace(/\/$/, '')}" />`)
|
|
1647
1654
|
.join('\n');
|
|
@@ -1674,9 +1681,14 @@ ${excludedUrls}
|
|
|
1674
1681
|
'file_scan_exclusions': [
|
|
1675
1682
|
'**/.git',
|
|
1676
1683
|
'**/.idea',
|
|
1684
|
+
'**/.zed',
|
|
1677
1685
|
'**/.agents',
|
|
1678
1686
|
'**/.frameworks',
|
|
1679
1687
|
'**/node_modules',
|
|
1688
|
+
'**/.gitignore',
|
|
1689
|
+
'**/.claude-scope',
|
|
1690
|
+
'**/scope.json',
|
|
1691
|
+
'**/package.json',
|
|
1680
1692
|
...foldersToHide.map(f => `**/${f.replace(/\/$/, '')}`),
|
|
1681
1693
|
],
|
|
1682
1694
|
};
|
package/core/workflow/guards.js
CHANGED
|
@@ -113,7 +113,11 @@ const updateTrackingSlot = (tracking, scope, agent, data, ROOT) => {
|
|
|
113
113
|
if (!tracking[scope]) tracking[scope] = {};
|
|
114
114
|
if (!tracking[scope][agent]) tracking[scope][agent] = emptySlot();
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
const normalizedData = { ...data };
|
|
117
|
+
if (normalizedData.worktreePath && path.isAbsolute(normalizedData.worktreePath)) {
|
|
118
|
+
normalizedData.worktreePath = path.relative(ROOT, normalizedData.worktreePath);
|
|
119
|
+
}
|
|
120
|
+
tracking[scope][agent] = { ...tracking[scope][agent], ...normalizedData };
|
|
117
121
|
|
|
118
122
|
const trackingPath = path.join(ROOT, '.scaffold', '.tracking.json');
|
|
119
123
|
fs.writeFileSync(trackingPath, JSON.stringify(tracking, null, 2), 'utf8');
|
|
@@ -458,7 +462,10 @@ const runMissingGate = async (params) => {
|
|
|
458
462
|
worktreePath,
|
|
459
463
|
}, ROOT);
|
|
460
464
|
|
|
461
|
-
|
|
465
|
+
const resolvedWorktreePath = path.isAbsolute(worktreePath)
|
|
466
|
+
? worktreePath
|
|
467
|
+
: path.resolve(ROOT, worktreePath);
|
|
468
|
+
return { action: 'recovered', worktreePath: resolvedWorktreePath };
|
|
462
469
|
}
|
|
463
470
|
|
|
464
471
|
// ── Handle: Reset ──────────────────────────────────────────────────────────
|
package/package.json
CHANGED