@dreki-gg/pi-subagent 0.3.0 → 0.3.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @dreki-gg/pi-subagent
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`144498f`](https://github.com/dreki-gg/pi-extensions/commit/144498fd9c23cb5060fb5171e56ff722ebf0c4f2) Thanks [@jalbarrang](https://github.com/jalbarrang)! - Fix two bugs in the `subagent` tool surfaced when spawning long-running reviewer agents:
8
+
9
+ - **Bun standalone binary spawn failure**: `getPiInvocation` now detects Bun's virtual filesystem paths (`/$bunfs/...`) in `process.argv[1]` and falls back to invoking the compiled binary directly. Previously, spawned subagents would fail with errors like `/$bunfs/root/pi doesn't exist in this environment` because the virtual path was passed verbatim to `spawn`.
10
+ - **Parallel summary truncation**: `parallel` mode no longer truncates each child agent's final output to 100 characters in the tool result summary. Long reviews from editorial/scout agents are now returned in full so callers don't need to scrape temp files or re-run agents to see their work.
11
+
3
12
  ## 0.3.0
4
13
 
5
14
  ### Minor Changes
@@ -256,13 +256,19 @@ async function writePromptToTempFile(
256
256
 
257
257
  function getPiInvocation(args: string[]): { command: string; args: string[] } {
258
258
  const currentScript = process.argv[1];
259
- if (currentScript && fs.existsSync(currentScript)) {
259
+
260
+ // Bun standalone binaries set argv[1] to a virtual FS path (e.g. /$bunfs/root/pi)
261
+ // that only resolves inside the running Bun process. Skip it — the binary IS the entry point.
262
+ const isBunVirtualPath = currentScript?.startsWith('/$bunfs/');
263
+
264
+ if (currentScript && !isBunVirtualPath && fs.existsSync(currentScript)) {
260
265
  return { command: process.execPath, args: [currentScript, ...args] };
261
266
  }
262
267
 
263
268
  const execName = path.basename(process.execPath).toLowerCase();
264
269
  const isGenericRuntime = /^(node|bun)(\.exe)?$/.test(execName);
265
270
  if (!isGenericRuntime) {
271
+ // Standalone binary (e.g. pi compiled with Bun) — invoke directly
266
272
  return { command: process.execPath, args };
267
273
  }
268
274
 
@@ -719,8 +725,7 @@ export default function (pi: ExtensionAPI) {
719
725
  const successCount = results.filter((r) => r.exitCode === 0).length;
720
726
  const summaries = results.map((r) => {
721
727
  const output = getFinalOutput(r.messages);
722
- const preview = output.slice(0, 100) + (output.length > 100 ? '...' : '');
723
- return `[${r.agent}] ${r.exitCode === 0 ? 'completed' : 'failed'}: ${preview || '(no output)'}`;
728
+ return `[${r.agent}] ${r.exitCode === 0 ? 'completed' : 'failed'}: ${output || '(no output)'}`;
724
729
  });
725
730
  return {
726
731
  content: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreki-gg/pi-subagent",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Subagent tool and delegate orchestration for pi — isolated agents, parallel scouts, planning gates, and workflow presets",
5
5
  "keywords": [
6
6
  "pi-package"