taskplane 0.25.1 → 0.25.2

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.
@@ -2126,31 +2126,20 @@ function parseAgentFile(filePath: string): { fm: Record<string, string>; body: s
2126
2126
  * @since TP-117
2127
2127
  */
2128
2128
  function loadBaseAgentPrompt(agentName: string): string {
2129
- const relPath = join("node_modules", "taskplane", "templates", "agents", `${agentName}.md`);
2130
- const candidates: string[] = [];
2131
-
2132
- // Global npm paths
2133
- const home = process.env.HOME || process.env.USERPROFILE || "";
2134
- if (process.env.APPDATA) candidates.push(join(process.env.APPDATA, "npm", relPath));
2135
- if (home) {
2136
- candidates.push(join(home, "AppData", "Roaming", "npm", relPath));
2137
- candidates.push(join(home, ".npm-global", "lib", relPath));
2138
- }
2139
- candidates.push(join("/usr", "local", "lib", relPath));
2140
- candidates.push(join("/opt", "homebrew", "lib", relPath));
2141
-
2142
- // Dynamic: npm root -g
2129
+ // Use the same robust resolution as resolveTaskplanePackageFile, which
2130
+ // handles all npm setups (nvm, Homebrew, volta, Windows, etc.) via
2131
+ // npm root -g caching and well-known fallback paths.
2132
+ // This avoids loadBaseAgentPrompt silently returning "" (which would
2133
+ // cause the worker to skip reviews because the review_step instructions
2134
+ // live in the base template, not the local .pi/agents/ override).
2135
+ const relPath = join("templates", "agents", `${agentName}.md`);
2143
2136
  try {
2144
- const result = spawnSync("npm", ["root", "-g"], { encoding: "utf-8", timeout: 5000, shell: true });
2145
- if (result.stdout?.trim()) {
2146
- candidates.push(join(result.stdout.trim(), "taskplane", "templates", "agents", `${agentName}.md`));
2137
+ const resolved = resolveTaskplanePackageFile(process.cwd(), relPath);
2138
+ if (existsSync(resolved)) {
2139
+ const def = parseAgentFile(resolved);
2140
+ if (def?.body) return def.body;
2147
2141
  }
2148
- } catch { /* ignore */ }
2149
-
2150
- for (const p of candidates) {
2151
- const def = parseAgentFile(p);
2152
- if (def?.body) return def.body;
2153
- }
2142
+ } catch { /* fall through */ }
2154
2143
  return "";
2155
2144
  }
2156
2145
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskplane",
3
- "version": "0.25.1",
3
+ "version": "0.25.2",
4
4
  "description": "AI agent orchestration for pi — parallel task execution with checkpoint discipline",
5
5
  "keywords": [
6
6
  "pi-package",