@yandy0725/pi-subagents 0.11.3 → 0.11.5
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/README.md +13 -1
- package/README.zh.md +13 -1
- package/package.json +4 -1
- package/src/config/default-agents.ts +1 -1
- package/src/ui/session-navigator.ts +3 -3
- package/src/ui/transcript-body.ts +1 -1
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ Foreground agents block until complete. Background agents return an ID immediate
|
|
|
47
47
|
| Type | Tools | Model | Description |
|
|
48
48
|
|------|-------|-------|-------------|
|
|
49
49
|
| `general-purpose` | all | inherit | Harness-rendered prompt for the child's own tool set — same conventions, plus the sub-agent bridge |
|
|
50
|
-
| `Explore` | read, bash, grep, find, ls | inherit (overridable per call) | Fast
|
|
50
|
+
| `Explore` | read, bash, grep, find, ls | inherit (overridable per call) | Fast codebase exploration (read-only) |
|
|
51
51
|
|
|
52
52
|
## Custom Agents
|
|
53
53
|
|
|
@@ -219,6 +219,18 @@ npm test # vitest run
|
|
|
219
219
|
|
|
220
220
|
This project is a friendly fork of [@gotgenes/pi-subagents](https://github.com/gotgenes/pi-packages/tree/main/packages/pi-subagents) by [Chris Lasher](https://github.com/gotgenes), which began as a fork of [tintinweb/pi-subagents](https://github.com/tintinweb/pi-subagents). Thank you to all original authors for their work that made this package possible.
|
|
221
221
|
|
|
222
|
+
## UI surface
|
|
223
|
+
|
|
224
|
+
Both slash commands and the running-agents widget call host UI primitives directly. The widget registers a **component factory**, which only TUI mode accepts; the commands use dialogs, which RPC forwards but the client may ignore:
|
|
225
|
+
|
|
226
|
+
| Method | Guard | Outside TUI (RPC / headless) |
|
|
227
|
+
|---|---|---|
|
|
228
|
+
| `setWidget(factory)` (running / finished agents widget) | none | RPC drops component factories silently, so the widget never appears. print / json have no UI at all |
|
|
229
|
+
| `setStatus` (agents summary line) | none | Forwarded fire-and-forget; may be dropped |
|
|
230
|
+
| `select` / `input` / `notify` (`/subagents:settings`) | none | Forwarded; no `timeout` is passed, so an unresponsive client keeps the command pending. print / json get no-op dialogs, so the menu exits silently |
|
|
231
|
+
| `select` (`/subagents:sessions`) | none | Forwarded; no timeout |
|
|
232
|
+
| `custom` (transcript overlay) | none | RPC returns `undefined` immediately: picking a session shows nothing. Same in print / json |
|
|
233
|
+
|
|
222
234
|
## License
|
|
223
235
|
|
|
224
236
|
MIT
|
package/README.zh.md
CHANGED
|
@@ -47,7 +47,7 @@ subagent({
|
|
|
47
47
|
| 类型 | 工具 | 模型 | 描述 |
|
|
48
48
|
|------|------|------|------|
|
|
49
49
|
| `general-purpose` | 全部 | 继承父级 | harness 按子代理自身工具集渲染的提示词——沿用相同约定,外加子代理桥接段 |
|
|
50
|
-
| `Explore` | read, bash, grep, find, ls | 继承父级模型(可按调用覆盖) |
|
|
50
|
+
| `Explore` | read, bash, grep, find, ls | 继承父级模型(可按调用覆盖) | 快速代码库探索(只读) |
|
|
51
51
|
|
|
52
52
|
## 自定义代理
|
|
53
53
|
|
|
@@ -211,6 +211,18 @@ npm test # vitest run
|
|
|
211
211
|
|
|
212
212
|
本项目是 [@gotgenes/pi-subagents](https://github.com/gotgenes/pi-packages/tree/main/packages/pi-subagents)(作者 [Chris Lasher](https://github.com/gotgenes))的友好分支,后者源自 [tintinweb/pi-subagents](https://github.com/tintinweb/pi-subagents)。感谢所有原作者的工作使本包成为可能。
|
|
213
213
|
|
|
214
|
+
## UI 能力
|
|
215
|
+
|
|
216
|
+
两个斜杠命令和「运行中 agent」widget 都直接调用宿主的 UI 原语。widget 注册的是**组件工厂**,只有 TUI 接受这种形式;命令用的是对话框,RPC 会转发,但客户端可能不应答或直接丢弃:
|
|
217
|
+
|
|
218
|
+
| 方法 | 守卫 | 非 TUI(RPC / headless) |
|
|
219
|
+
|---|---|---|
|
|
220
|
+
| `setWidget(factory)`(运行中 / 已完成 agent 的 widget) | 无 | RPC 静默丢弃组件工厂,widget 不会出现;print / json 根本没有 UI |
|
|
221
|
+
| `setStatus`(agent 汇总行) | 无 | fire-and-forget,可能被丢弃 |
|
|
222
|
+
| `select` / `input` / `notify`(`/subagents:settings`) | 无 | 会转发;没有传 `timeout`,客户端不响应时命令一直挂着。print / json 下对话皆为空实现,菜单直接退出 |
|
|
223
|
+
| `select`(`/subagents:sessions`) | 无 | 会转发;没有超时 |
|
|
224
|
+
| `custom`(会话记录浮层) | 无 | RPC 直接返回 `undefined`:选中一个会话后什么都不显示;print / json 同理 |
|
|
225
|
+
|
|
214
226
|
## 许可证
|
|
215
227
|
|
|
216
228
|
MIT
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.11.
|
|
6
|
+
"version": "0.11.5",
|
|
7
7
|
"description": "Focused, in-process sub-agent core for pi — autonomous agents plus a typed API and lifecycle events",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"repository": {
|
|
@@ -41,6 +41,9 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@biomejs/biome": "^2.6.6",
|
|
44
|
+
"@earendil-works/pi-ai": "1.5.0",
|
|
45
|
+
"@earendil-works/pi-coding-agent": "1.5.0",
|
|
46
|
+
"@earendil-works/pi-tui": "1.5.0",
|
|
44
47
|
"@types/node": "^26.6.6",
|
|
45
48
|
"typebox": "^1.4.6",
|
|
46
49
|
"typescript": "~7.0.2",
|
|
@@ -28,7 +28,7 @@ export const DEFAULT_AGENTS: Map<string, AgentConfig> = new Map([
|
|
|
28
28
|
{
|
|
29
29
|
name: "Explore",
|
|
30
30
|
displayName: "Explore",
|
|
31
|
-
description: "Fast
|
|
31
|
+
description: "Fast codebase exploration agent (read-only)",
|
|
32
32
|
builtinToolNames: READ_ONLY_TOOLS,
|
|
33
33
|
// model omitted — inherit the parent model, and let callers override it per call.
|
|
34
34
|
// A hardcoded default would win over the `model` param and, when the exact
|
|
@@ -447,12 +447,12 @@ export class TranscriptOverlay implements Component {
|
|
|
447
447
|
*/
|
|
448
448
|
private buildContentLines(innerW: number): string[] {
|
|
449
449
|
if (innerW <= 0) return [];
|
|
450
|
-
const
|
|
450
|
+
const bodyLines = this.body.render(innerW);
|
|
451
451
|
this.renderedIndicator = this.indicatorLine();
|
|
452
452
|
if (this.renderedIndicator) {
|
|
453
|
-
|
|
453
|
+
return [...bodyLines, "", this.renderedIndicator];
|
|
454
454
|
}
|
|
455
|
-
return
|
|
455
|
+
return [...bodyLines];
|
|
456
456
|
}
|
|
457
457
|
|
|
458
458
|
/** Running-agent indicator line, or "" when the source is not streaming. */
|