@zhushanwen/pi-session-manager 0.1.11 → 0.1.13

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.
Files changed (2) hide show
  1. package/README.md +9 -3
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -8,11 +8,11 @@ agent-managed session pi extension:把 session 的创建/发送/读取/列表/
8
8
  - 请求体为嵌套形状 `{ action, params }`(形状 SSOT 在 `@zhushanwen/extension-protocol`);**不要扁平化展开**——runtime event-adapter 按 `data.params` 提取,扁平化会导致 params 丢失
9
9
  - 应答方是 taiji runtime 的 `SessionManagerHandler`(select value 通道回写 JSON 字符串;取消/超时返回 null)
10
10
 
11
- ## 工具(6 个 action)
11
+ ## 工具(6 个工具,每工具 1 个 action)
12
12
 
13
13
  | 工具 | action | 说明 |
14
14
  |------|--------|------|
15
- | `create_managed_session` | create | 在指定 cwd 创建子 session(可选 label);服务端注入 `spawnSource: 'agent'` 与父 session id,`.agent.json` sidecar 落盘供重启恢复 |
15
+ | `create_managed_session` | create | 在指定 cwd 创建子 session(可选 label;可选 `prompt` 作初始 prompt,create+send 原子完成);服务端注入 `spawnSource: 'agent'` 与父 session id,`.agent.json` sidecar 落盘供重启恢复 |
16
16
  | `send_to_session` | send | 向子 session 发送 prompt(异步处理) |
17
17
  | `read_session_history` | history | 读子 session 对话历史(可选 tailTurns 截尾部 N 个 turn) |
18
18
  | `list_my_sessions` | list | 列出本 agent 管理的 session(无过滤参数,自动限定发起方 agent) |
@@ -21,7 +21,13 @@ agent-managed session pi extension:把 session 的创建/发送/读取/列表/
21
21
 
22
22
  ## 运行要求
23
23
 
24
- 应答端(runtime handler)在 taiji 桌面应用内;独立 pi CLI 环境无 handler 时工具将等待至超时(create/history 60s、其余 30s)并返回 cancelled。
24
+ 应答端(runtime handler)在 taiji 桌面应用内;独立 pi CLI 环境无 handler 应答,工具会等待至超时(create/history 60s、其余 30s)后返回 isError 错误结果(文案 `cancelled or timed out`——pi 实装对取消与超时不可区分,见 protocol `callMarkerRpc`)。
25
+
26
+ ## 安装
27
+
28
+ ```bash
29
+ pi install npm:@zhushanwen/pi-session-manager
30
+ ```
25
31
 
26
32
  ## 测试
27
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhushanwen/pi-session-manager",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Pi extension for managing agent-managed sessions — create, send, read history, list, status, abort via ctx.ui.select channel.",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -26,8 +26,8 @@
26
26
  "README.md"
27
27
  ],
28
28
  "dependencies": {
29
- "@zhushanwen/extension-protocol": "0.11.0",
30
- "@zhushanwen/pi-extension-logger": "0.6.0"
29
+ "@zhushanwen/extension-protocol": "0.12.0",
30
+ "@zhushanwen/pi-extension-logger": "0.6.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "^24.0.0",