taskplane 0.21.7 → 0.21.9

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.
@@ -243,8 +243,12 @@ export function parsePromptForOrchestrator(
243
243
  const scopeBody = fileScopeMatch[1].trim();
244
244
  const scopeLines = scopeBody.split("\n");
245
245
  for (const line of scopeLines) {
246
- // "- extensions/task-orchestrator.ts" or "- .pi/task-orchestrator.yaml"
247
- const trimmed = line.replace(/^[\s-*]+/, "").trim();
246
+ // "- extensions/task-orchestrator.ts" or "- `api-service/src/health.js`"
247
+ let trimmed = line.replace(/^[\s-*]+/, "").trim();
248
+ // Strip inline backticks: `path/to/file` → path/to/file
249
+ if (trimmed.startsWith("`") && trimmed.endsWith("`")) {
250
+ trimmed = trimmed.slice(1, -1);
251
+ }
248
252
  if (trimmed && !trimmed.startsWith("#") && !trimmed.startsWith("```")) {
249
253
  fileScope.push(trimmed);
250
254
  }
@@ -431,8 +431,16 @@ export function buildLaneEnvVars(
431
431
 
432
432
  let relativePath: string;
433
433
  if (workspaceRoot) {
434
- // Workspace mode: always use absolute path for cross-repo safety
435
- relativePath = resolve(promptPath);
434
+ // Workspace mode: use worktree-relative path when the task folder is
435
+ // inside the lane's repo. This ensures STATUS.md, .DONE, and git commits
436
+ // all operate in the worktree (not the original source directory).
437
+ // Falls back to absolute path for cross-repo tasks (task in repo A,
438
+ // worker in repo B — future: issue #51).
439
+ if (promptNorm.startsWith(repoRootNorm + "/")) {
440
+ relativePath = promptNorm.slice(repoRootNorm.length + 1);
441
+ } else {
442
+ relativePath = resolve(promptPath);
443
+ }
436
444
  } else if (promptNorm.startsWith(repoRootNorm + "/")) {
437
445
  // Repo mode: relative path from repo root (mirrors into worktree)
438
446
  relativePath = promptNorm.slice(repoRootNorm.length + 1);
@@ -764,28 +772,16 @@ export function resolveCanonicalTaskPaths(
764
772
  let resolvedFolder: string;
765
773
 
766
774
  if (isWorkspaceMode) {
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)
775
+ // Workspace mode: use worktree-relative path when the task folder is
776
+ // inside the lane's repo (same logic as TASK_AUTOSTART resolution).
777
+ // The worker writes .DONE and STATUS.md in the worktree, so the engine
778
+ // must look there too.
774
779
  if (folderNorm.startsWith(repoRootNorm + "/")) {
775
780
  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
- }
781
+ resolvedFolder = join(worktreePath, relPath);
782
+ } else {
783
+ // Cross-repo fallback: use absolute path (future: #51)
784
+ resolvedFolder = resolve(taskFolder);
789
785
  }
790
786
  } else if (folderNorm.startsWith(repoRootNorm + "/")) {
791
787
  // Repo mode: task folder is inside the repo root.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskplane",
3
- "version": "0.21.7",
3
+ "version": "0.21.9",
4
4
  "description": "AI agent orchestration for pi — parallel task execution with checkpoint discipline",
5
5
  "keywords": [
6
6
  "pi-package",