pi-subagents 0.13.1 → 0.13.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.13.2] - 2026-04-13
6
+
7
+ ### Changed
8
+ - `intercomBridge` now defaults to `always` so intercom coordination instructions are injected for both `fresh` and `fork` delegated runs when `pi-intercom` is available.
9
+
5
10
  ## [0.13.1] - 2026-04-13
6
11
 
7
12
  ### Added
package/README.md CHANGED
@@ -331,7 +331,7 @@ Chains can be created from the Agents Manager template picker ("Blank Chain"), o
331
331
  | Parallel | Yes | `{ tasks: [{agent, task}...] }` - via TUI toggle or converted to chain for async |
332
332
 
333
333
  Execution context defaults to `context: "fresh"`, which starts each child run from a clean session. Set `context: "fork"` to start each child from a real branched session created from the parent's current leaf.
334
- When `intercomBridge` is enabled (default: `fork-only`) and `pi-intercom` is installed/enabled, forked children get runtime instructions for contacting the orchestrator session via `intercom({ action: "ask"|"send", ... })`.
334
+ When `intercomBridge` is enabled (default: `always`) and `pi-intercom` is installed/enabled, delegated children get runtime instructions for contacting the orchestrator session via `intercom({ action: "ask"|"send", ... })`.
335
335
 
336
336
  > **Note:** Intercom bridging requires the [pi-intercom](https://github.com/nicobailon/pi-intercom) extension. Install it with `pi install npm:pi-intercom`.
337
337
 
@@ -787,13 +787,13 @@ Controls whether subagents receive runtime intercom coordination instructions (a
787
787
 
788
788
  ```json
789
789
  {
790
- "intercomBridge": "fork-only"
790
+ "intercomBridge": "always"
791
791
  }
792
792
  ```
793
793
 
794
794
  Values:
795
- - `"fork-only"` (default): inject intercom bridge only when `context: "fork"`
796
- - `"always"`: inject bridge in both `fresh` and `fork`
795
+ - `"always"` (default): inject bridge in both `fresh` and `fork`
796
+ - `"fork-only"`: inject bridge only when `context: "fork"`
797
797
  - `"off"`: disable bridge entirely
798
798
 
799
799
  Bridge activation also requires all of the following:
package/index.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  * Toggle: async parameter (default: false, configurable via config.json)
10
10
  *
11
11
  * Config file: ~/.pi/agent/extensions/subagent/config.json
12
- * { "asyncByDefault": true, "maxSubagentDepth": 1, "intercomBridge": "fork-only", "worktreeSetupHook": "./scripts/setup-worktree.mjs" }
12
+ * { "asyncByDefault": true, "maxSubagentDepth": 1, "intercomBridge": "always", "worktreeSetupHook": "./scripts/setup-worktree.mjs" }
13
13
  */
14
14
 
15
15
  import * as fs from "node:fs";
@@ -27,7 +27,7 @@ interface ResolveIntercomBridgeInput {
27
27
 
28
28
  export function resolveIntercomBridgeMode(value: unknown): IntercomBridgeMode {
29
29
  if (value === "off" || value === "always" || value === "fork-only") return value;
30
- return "fork-only";
30
+ return "always";
31
31
  }
32
32
 
33
33
  function intercomEnabled(configPath: string): boolean {
@@ -43,12 +43,17 @@ function intercomEnabled(configPath: string): boolean {
43
43
 
44
44
  function extensionSandboxAllowsIntercom(extensions: string[] | undefined, extensionDir: string): boolean {
45
45
  if (extensions === undefined) return true;
46
- const lowerExtensionDir = extensionDir.toLowerCase();
47
- return extensions.some((entry) => {
48
- const normalized = entry.toLowerCase();
49
- if (normalized.includes(lowerExtensionDir)) return true;
50
- return /(^|[\\/])pi-intercom([\\/]|$)/i.test(normalized);
51
- });
46
+
47
+ const intercomDir = path.resolve(extensionDir).replaceAll("\\", "/").toLowerCase();
48
+ for (const entry of extensions) {
49
+ const normalized = entry.trim().replaceAll("\\", "/").toLowerCase();
50
+ if (normalized === "pi-intercom") return true;
51
+ if (normalized === intercomDir) return true;
52
+ if (normalized.startsWith(`${intercomDir}/`)) return true;
53
+ if (normalized.endsWith("/pi-intercom")) return true;
54
+ if (normalized.includes("/pi-intercom/")) return true;
55
+ }
56
+ return false;
52
57
  }
53
58
 
54
59
  function buildIntercomBridgeInstruction(orchestratorTarget: string): string {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-subagents",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "description": "Pi extension for delegating tasks to subagents with chains, parallel execution, and TUI clarification",
5
5
  "author": "Nico Bailon",
6
6
  "license": "MIT",