@zhushanwen/pi-base-tool-enhance 0.8.1 → 0.8.3
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 +2 -0
- package/package.json +5 -5
- package/src/bash-kill-tool.ts +2 -0
- package/src/bash-output-tool.ts +4 -0
package/README.md
CHANGED
|
@@ -32,6 +32,8 @@ pi install npm:@zhushanwen/pi-base-tool-enhance
|
|
|
32
32
|
- `bash_output {task_id?}` —— 省略列出任务(单例表 + registry 终态条目);指定返回状态与 tail 输出
|
|
33
33
|
- `bash_kill {task_id}` —— 终止后台任务(限本进程任务;跨进程 running 条目由发起进程或 reaper 管理)
|
|
34
34
|
|
|
35
|
+
`bash_output` / `bash_kill` 为 `exposure: "deferred"`——不占常驻工具声明,由 pi 内置 `tool_search` 工具检索命中后按需激活。taiji 宿主内开箱即用(宿主启动时已激活 `tool_search`);独立 pi 使用需在 `<agentDir>/settings.json`(默认 `~/.pi/agent/settings.json`)加 `"defaultTools": ["+tool_search"]`(`+` 前缀是增量修饰,保留 read/bash/edit/write 默认集)。未开启 `tool_search` 时这两个工具对模型不可见。
|
|
36
|
+
|
|
35
37
|
完成通知经 pending-notifications(`type:"bash"`,process 生命周期档)+ sendMessage steer 注入当前 session。
|
|
36
38
|
|
|
37
39
|
## 退役条件(sunset)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhushanwen/pi-base-tool-enhance",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
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.
|
|
32
|
-
"@zhushanwen/pi-ext-guards": "0.4.
|
|
31
|
+
"@zhushanwen/extension-protocol": "0.20.0",
|
|
32
|
+
"@zhushanwen/pi-ext-guards": "0.4.4",
|
|
33
33
|
"@zhushanwen/pi-extension-logger": "0.6.2",
|
|
34
34
|
"@zhushanwen/pi-file-lock": "0.4.1",
|
|
35
|
-
"@zhushanwen/pi-llm-shared": "0.11.
|
|
35
|
+
"@zhushanwen/pi-llm-shared": "0.11.2"
|
|
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": "^1.0.0",
|
|
43
43
|
"typebox": "1.3.27",
|
|
44
|
-
"@zhushanwen/pi-pending-notifications": "0.8.
|
|
44
|
+
"@zhushanwen/pi-pending-notifications": "0.8.5"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
|
47
47
|
"@zhushanwen/pi-pending-notifications": {
|
package/src/bash-kill-tool.ts
CHANGED
|
@@ -54,6 +54,8 @@ export function createBashKillToolDefinition() {
|
|
|
54
54
|
return {
|
|
55
55
|
name: "bash_kill",
|
|
56
56
|
label: "bash_kill",
|
|
57
|
+
// deferred(tool-declaration-slimming D4):同 bash_output;as const 防宽化为 string
|
|
58
|
+
exposure: "deferred" as const,
|
|
57
59
|
description: BASH_KILL_DESCRIPTION,
|
|
58
60
|
parameters: bashKillSchema,
|
|
59
61
|
async execute(
|
package/src/bash-output-tool.ts
CHANGED
|
@@ -112,6 +112,10 @@ export function createBashOutputToolDefinition() {
|
|
|
112
112
|
return {
|
|
113
113
|
name: "bash_output",
|
|
114
114
|
label: "bash_output",
|
|
115
|
+
// deferred(tool-declaration-slimming D4):不常驻声明,tool_search 命中即激活;
|
|
116
|
+
// 迁移写入的 +tool_search 条目(runtime pi-codemode-settings)承载检索入口。
|
|
117
|
+
// as const:函数返回宽类型对象字面量,防 exposure 宽化为 string
|
|
118
|
+
exposure: "deferred" as const,
|
|
115
119
|
description: BASH_OUTPUT_DESCRIPTION,
|
|
116
120
|
parameters: bashOutputSchema,
|
|
117
121
|
async execute(
|