@zhushanwen/pi-base-tool-enhance 0.6.0 → 0.6.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/README.md +10 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
# @zhushanwen/pi-base-tool-enhance
|
|
2
2
|
|
|
3
|
-
同名 override pi 内置 bash 工具的增强层:前台行为 100% 委托 pi 官方工厂(`createBashToolDefinition`),增量提供 background 模式、强制后台白名单与双模式可配置超时。能力面:测试类命令 force-test 白名单命中自动转后台(模式登记于 force-patterns.ts
|
|
3
|
+
同名 override pi 内置 bash 工具的增强层:前台行为 100% 委托 pi 官方工厂(`createBashToolDefinition`),增量提供 background 模式、强制后台白名单与双模式可配置超时。能力面:测试类命令 force-test 白名单命中自动转后台(模式登记于 force-patterns.ts)、前台挂死保护(可配置前台默认超时,对一切未显式填 timeout 的前台命令生效——典型挂死场景是网络类命令)、工具报错审计(tool_error 审计 hook,entry customType 为 `unified-hooks:tool-error`)。
|
|
4
4
|
|
|
5
5
|
设计决策沉淀在包内源码注释与本文档。
|
|
6
6
|
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
pi install npm:@zhushanwen/pi-base-tool-enhance
|
|
11
|
+
```
|
|
12
|
+
|
|
7
13
|
## 配置
|
|
8
14
|
|
|
15
|
+
配置指南另见随包注册的 skill:`base-tool-enhance-ext-config`(`package.json` `pi.skills` 注册,内容与本节一致,含热重载时机与白名单命中语义详述)。
|
|
16
|
+
|
|
9
17
|
`<pi agentDir>/config/base-tool-enhance-ext-config.json`(读时刷新热重载,坏键回退默认不拒载):
|
|
10
18
|
|
|
11
19
|
```jsonc
|
|
@@ -26,6 +34,6 @@
|
|
|
26
34
|
|
|
27
35
|
完成通知经 pending-notifications(`type:"bash"`,process 生命周期档)+ sendMessage steer 注入当前 session。
|
|
28
36
|
|
|
29
|
-
## 退役条件(sunset
|
|
37
|
+
## 退役条件(sunset)
|
|
30
38
|
|
|
31
39
|
pi 上游出现原生 background bash(或等价长时命令异步化)能力时评估退役本包;届时前台行为已收敛在 `createBashToolDefinition` 委托面,迁移成本可控。不登记此条件则 3 年后冗余层无人敢删(override 层与上游能力双轨漂移)。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhushanwen/pi-base-tool-enhance",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Base tool enhancement - override builtin bash tool: foreground delegates to pi official factory, incremental background mode (design decisions documented in source comments)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"skills/"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@zhushanwen/extension-protocol": "0.
|
|
31
|
+
"@zhushanwen/extension-protocol": "0.13.0",
|
|
32
32
|
"@zhushanwen/pi-ext-guards": "0.4.1",
|
|
33
33
|
"@zhushanwen/pi-extension-logger": "0.6.1",
|
|
34
34
|
"@zhushanwen/pi-file-lock": "0.4.1",
|
|
35
|
-
"@zhushanwen/pi-llm-shared": "0.
|
|
35
|
+
"@zhushanwen/pi-llm-shared": "0.9.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@vitest/coverage-v8": "^4.1.9",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@earendil-works/pi-coding-agent": "^0.84.4",
|
|
43
43
|
"typebox": "*",
|
|
44
|
-
"@zhushanwen/pi-pending-notifications": "0.7.
|
|
44
|
+
"@zhushanwen/pi-pending-notifications": "0.7.6"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
|
47
47
|
"@zhushanwen/pi-pending-notifications": {
|