@maplezzk/pi-interactive-subagents 3.10.1 → 3.11.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/SKILL.md +28 -0
- package/package.json +8 -4
- package/pi-extension/subagents/index.ts +4 -13
- package/agents/claude-code.md +0 -22
package/SKILL.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: configure-pi-interactive-subagents
|
|
3
|
+
description: "配置与排查 interactive subagents 的终端复用器、Herdr split/tab 和状态面板。Use when configuring subagent mux behavior."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 配置 pi-interactive-subagents
|
|
7
|
+
|
|
8
|
+
## 诊断
|
|
9
|
+
|
|
10
|
+
读取实际 Pi agent 目录下的 `extensions/pi-interactive-subagents/config.json`:`mux` 保存后端偏好,`herdrMode` 保存 `split|tab`。状态面板的 `status.enabled` 由安装包根目录的 `config.json` 读取;不存在时读取同目录 `config.json.example`。状态行数当前固定为 4,不是配置项。
|
|
11
|
+
|
|
12
|
+
环境变量优先级:`PI_TERMINAL_MUX` > `PI_SUBAGENT_MUX` > 持久化 `mux` > `auto`;`PI_SUBAGENT_HERDR_MODE` > 持久化 `herdrMode` > `split`。
|
|
13
|
+
|
|
14
|
+
## 修改
|
|
15
|
+
|
|
16
|
+
优先运行:
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
/config:subagent auto|muxy|cmux|tmux|zellij|wezterm|herdr [split|tab]|otty|orca
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
不带参数时使用交互选择。`/subagent-config`、`/pi-subagent-config` 是兼容别名。选择会立即写入用户配置并应用;环境变量仍可覆盖。
|
|
23
|
+
|
|
24
|
+
不要把未支持的后端写入配置。修改状态配置时只使用 `status.enabled`;`status.lineLimit` 等未知字段会显式失败,无效 JSON 也不会静默回退。
|
|
25
|
+
|
|
26
|
+
## 验证
|
|
27
|
+
|
|
28
|
+
先用 `subagents_list` 确认扩展工具已加载,再启动一个最小 `subagent`,观察对应 pane/tab 与状态 widget。终端后端不可用时必须报告失败;不要静默声称已回退到目标后端。真实启动会创建子进程和终端 surface,执行前遵守当前任务的 E2E 授权边界。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maplezzk/pi-interactive-subagents",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.1",
|
|
4
4
|
"description": "Interactive async subagents for pi — spawn, orchestrate, and manage sub-agent sessions in multiplexer panes. Fork of HazAT/pi-interactive-subagents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.ts",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"locales",
|
|
15
15
|
"config.json.example",
|
|
16
16
|
"README.md",
|
|
17
|
-
"README.zh-CN.md"
|
|
17
|
+
"README.zh-CN.md",
|
|
18
|
+
"SKILL.md"
|
|
18
19
|
],
|
|
19
20
|
"scripts": {
|
|
20
21
|
"test": "tsx --test test/subagent-done-nudge.test.ts test/test.ts",
|
|
@@ -27,6 +28,9 @@
|
|
|
27
28
|
"extensions": [
|
|
28
29
|
"./index.ts",
|
|
29
30
|
"../pi-extensions-i18n/index.ts"
|
|
31
|
+
],
|
|
32
|
+
"skills": [
|
|
33
|
+
"./SKILL.md"
|
|
30
34
|
]
|
|
31
35
|
},
|
|
32
36
|
"engines": {
|
|
@@ -58,8 +62,8 @@
|
|
|
58
62
|
],
|
|
59
63
|
"dependencies": {
|
|
60
64
|
"ajv": "^8.20.0",
|
|
61
|
-
"pi-extensions-i18n": "^0.
|
|
62
|
-
"pi-terminal-mux": "^0.4.
|
|
65
|
+
"pi-extensions-i18n": "^0.4.0",
|
|
66
|
+
"pi-terminal-mux": "^0.4.1"
|
|
63
67
|
},
|
|
64
68
|
"peerDependencies": {
|
|
65
69
|
"@earendil-works/pi-coding-agent": ">=0.80.0 <0.81.0",
|
|
@@ -882,19 +882,10 @@ function handleSubagentInterrupt(
|
|
|
882
882
|
running.statusState = forceStatusAfterInterrupt(running.statusState, now);
|
|
883
883
|
updateWidget();
|
|
884
884
|
|
|
885
|
-
//
|
|
886
|
-
//
|
|
887
|
-
//
|
|
888
|
-
|
|
889
|
-
const exitFile = `${running.sessionFile}.exit`;
|
|
890
|
-
try {
|
|
891
|
-
writeFileSync(exitFile, JSON.stringify({ type: "done" }));
|
|
892
|
-
} catch (writeErr: any) {
|
|
893
|
-
process.stderr.write(
|
|
894
|
-
`[interrupt] .exit 写入失败 file=${exitFile} err=${writeErr?.message ?? String(writeErr)}\n`,
|
|
895
|
-
);
|
|
896
|
-
}
|
|
897
|
-
}
|
|
885
|
+
// Escape only cancels the child's current turn. Do not write the `.exit`
|
|
886
|
+
// sidecar here: that file is the terminal completion signal consumed by
|
|
887
|
+
// pollForExit, and writing it would close the pane and remove this running
|
|
888
|
+
// entry instead of leaving the child alive for another turn.
|
|
898
889
|
|
|
899
890
|
return {
|
|
900
891
|
content: [{ type: "text" as const, text: `Interrupt requested for subagent "${running.name}".` }],
|
package/agents/claude-code.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: claude-code
|
|
3
|
-
description: Self-driving Claude Code session for deep investigation, experimentation, and code exploration
|
|
4
|
-
cli: claude
|
|
5
|
-
auto-exit: true
|
|
6
|
-
spawning: false
|
|
7
|
-
deny-tools: claude
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Claude Code
|
|
11
|
-
|
|
12
|
-
You are a self-driving Claude Code session spawned by pi for hands-on investigation and experimentation.
|
|
13
|
-
|
|
14
|
-
You have full autonomy: bash, file access, git clone, code editing, running tests, building projects — everything a developer can do in a terminal.
|
|
15
|
-
|
|
16
|
-
## Guidelines
|
|
17
|
-
|
|
18
|
-
- Focus on the task given to you
|
|
19
|
-
- Be thorough in your investigation
|
|
20
|
-
- Report concrete findings with evidence (file paths, command output, test results)
|
|
21
|
-
- If you get stuck, explain what you tried and what failed
|
|
22
|
-
- Your final message should summarize what you accomplished and what you found
|