taskplane 0.21.4 → 0.21.6
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.
|
@@ -208,9 +208,9 @@ export function parsePromptForOrchestrator(
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
if (execTargetSectionBody !== null) {
|
|
211
|
-
// Match "Repo: api" or "**Repo:** api" or "
|
|
211
|
+
// Match "Repo: api" or "**Repo:** api" or "Workspace: api" with whitespace
|
|
212
212
|
const repoLineMatch = execTargetSectionBody.match(
|
|
213
|
-
/^\s*\*?\*?Repo:?\*?\*?\s+(\S+)/mi,
|
|
213
|
+
/^\s*\*?\*?(?:Repo|Workspace):?\*?\*?\s+(\S+)/mi,
|
|
214
214
|
);
|
|
215
215
|
if (repoLineMatch) {
|
|
216
216
|
const candidate = repoLineMatch[1].trim().toLowerCase();
|
|
@@ -220,10 +220,10 @@ export function parsePromptForOrchestrator(
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
// Priority 2 (fallback): Inline "**Repo:** <id>" anywhere in content
|
|
223
|
+
// Priority 2 (fallback): Inline "**Repo:** <id>" or "**Workspace:** <id>" anywhere in content
|
|
224
224
|
if (!promptRepoId) {
|
|
225
225
|
const inlineRepoMatch = content.match(
|
|
226
|
-
/^\*\*Repo:\*\*\s+(\S+)/m,
|
|
226
|
+
/^\*\*(?:Repo|Workspace):\*\*\s+(\S+)/m,
|
|
227
227
|
);
|
|
228
228
|
if (inlineRepoMatch) {
|
|
229
229
|
const candidate = inlineRepoMatch[1].trim().toLowerCase();
|
|
@@ -764,11 +764,29 @@ export function resolveCanonicalTaskPaths(
|
|
|
764
764
|
let resolvedFolder: string;
|
|
765
765
|
|
|
766
766
|
if (isWorkspaceMode) {
|
|
767
|
-
// Workspace mode:
|
|
768
|
-
//
|
|
769
|
-
//
|
|
770
|
-
//
|
|
771
|
-
|
|
767
|
+
// Workspace mode: check both the original source path AND the
|
|
768
|
+
// worktree-relative path. The task-runner may write .DONE to either
|
|
769
|
+
// location depending on how TASK_AUTOSTART resolves in the worker's
|
|
770
|
+
// context. Check worktree first (most common), then fall back to original.
|
|
771
|
+
const candidatePaths: string[] = [];
|
|
772
|
+
|
|
773
|
+
// Candidate 1: worktree-relative (task folder mirrored in worktree)
|
|
774
|
+
if (folderNorm.startsWith(repoRootNorm + "/")) {
|
|
775
|
+
const relPath = folderNorm.slice(repoRootNorm.length + 1);
|
|
776
|
+
candidatePaths.push(join(worktreePath, relPath));
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
// Candidate 2: original absolute path
|
|
780
|
+
candidatePaths.push(resolve(taskFolder));
|
|
781
|
+
|
|
782
|
+
// Use whichever has .DONE or STATUS.md; default to first candidate
|
|
783
|
+
resolvedFolder = candidatePaths[0];
|
|
784
|
+
for (const candidate of candidatePaths) {
|
|
785
|
+
if (existsSync(join(candidate, ".DONE")) || existsSync(join(candidate, "STATUS.md"))) {
|
|
786
|
+
resolvedFolder = candidate;
|
|
787
|
+
break;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
772
790
|
} else if (folderNorm.startsWith(repoRootNorm + "/")) {
|
|
773
791
|
// Repo mode: task folder is inside the repo root.
|
|
774
792
|
// Translate to equivalent path in the worktree.
|