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 +5 -0
- package/README.md +4 -4
- package/index.ts +1 -1
- package/intercom-bridge.ts +12 -7
- package/package.json +1 -1
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: `
|
|
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": "
|
|
790
|
+
"intercomBridge": "always"
|
|
791
791
|
}
|
|
792
792
|
```
|
|
793
793
|
|
|
794
794
|
Values:
|
|
795
|
-
- `"
|
|
796
|
-
- `"
|
|
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": "
|
|
12
|
+
* { "asyncByDefault": true, "maxSubagentDepth": 1, "intercomBridge": "always", "worktreeSetupHook": "./scripts/setup-worktree.mjs" }
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import * as fs from "node:fs";
|
package/intercom-bridge.ts
CHANGED
|
@@ -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 "
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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