pi-subagents 0.11.6 → 0.11.7
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 +16 -0
- package/package.json +1 -1
- package/prompt-template-bridge.ts +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.11.7] - 2026-03-20
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- Removed the cwd mismatch guard from the prompt-template delegation bridge, allowing delegated requests to specify a working directory different from the active session's cwd.
|
|
9
|
+
|
|
5
10
|
## [0.11.6] - 2026-03-20
|
|
6
11
|
|
|
7
12
|
### Added
|
package/README.md
CHANGED
|
@@ -20,6 +20,22 @@ To remove:
|
|
|
20
20
|
npx pi-subagents --remove
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
If you use [pi-prompt-template-model](https://github.com/nicobailon/pi-prompt-template-model), you can wrap subagent delegation in a slash command:
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
---
|
|
27
|
+
description: Take a screenshot
|
|
28
|
+
model: claude-sonnet-4-20250514
|
|
29
|
+
subagent: browser-screenshoter
|
|
30
|
+
cwd: /tmp/screenshots
|
|
31
|
+
---
|
|
32
|
+
Use url in the prompt to take screenshot: $@
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Then `/take-screenshot https://example.com` switches to Sonnet, delegates to the `browser-screenshoter` agent with `/tmp/screenshots` as the working directory, and restores your model when done. Runtime overrides like `--cwd=<path>` and `--subagent=<name>` work too.
|
|
36
|
+
|
|
37
|
+
pi-prompt-template-model is entirely optional — pi-subagents works standalone through the `subagent` tool and slash commands.
|
|
38
|
+
|
|
23
39
|
## Agents
|
|
24
40
|
|
|
25
41
|
Agents are markdown files with YAML frontmatter that define specialized subagent configurations.
|
package/package.json
CHANGED
|
@@ -146,17 +146,6 @@ export function registerPromptTemplateDelegationBridge<Ctx extends { cwd?: strin
|
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
if (typeof ctx.cwd === "string" && ctx.cwd !== request.cwd) {
|
|
150
|
-
const response: PromptTemplateDelegationResponse = {
|
|
151
|
-
...request,
|
|
152
|
-
messages: [],
|
|
153
|
-
isError: true,
|
|
154
|
-
errorText: `Delegated request cwd mismatch: active context is '${ctx.cwd}' but request asked for '${request.cwd}'. Retry from the target session/cwd.`,
|
|
155
|
-
};
|
|
156
|
-
options.events.emit(PROMPT_TEMPLATE_SUBAGENT_RESPONSE_EVENT, response);
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
149
|
const controller = new AbortController();
|
|
161
150
|
controllers.set(request.requestId, controller);
|
|
162
151
|
|