multi-agents-cli 1.1.17 → 1.1.18
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
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
|
}
|
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