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
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
//
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
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
|
|
2145
|
-
if (
|
|
2146
|
-
|
|
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 { /*
|
|
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
|
|