pi-distill 1.6.0 → 1.7.0
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 +31 -0
- package/package.json +8 -4
package/SKILL.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: configure-pi-distill
|
|
3
|
+
description: "配置与排查 pi-distill 的模型、压缩阈值、重试、工具开关和审计卡片。Use when configuring pi-distill or diagnosing output distillation."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 配置 pi-distill
|
|
7
|
+
|
|
8
|
+
## 诊断
|
|
9
|
+
|
|
10
|
+
1. 定位实际 Pi agent 目录;默认是 `~/.pi/agent`,设置 `PI_CODING_AGENT_DIR` 时使用该目录。
|
|
11
|
+
2. 读取 `extensions/pi-distill/config.json`;不存在时从包内 `config.example.json` 建立,不猜字段。
|
|
12
|
+
3. 同时检查 `PI_DISTILL_*` 和旧 `PI_BASH_SUMMARY_*` 环境变量。JSON 配置优先;环境变量中同名的新 `PI_DISTILL_*` 优先于旧 `PI_BASH_SUMMARY_*`。
|
|
13
|
+
|
|
14
|
+
## 修改
|
|
15
|
+
|
|
16
|
+
优先让用户在 Pi 中运行 `/config:distill`;`/pi-distill` 只是兼容别名。手工配置时只使用包内 `config.example.json` 已声明的字段:
|
|
17
|
+
|
|
18
|
+
- `model` 留空时使用当前会话模型,否则必须是可用的 `provider/model`;
|
|
19
|
+
- `minChars` 控制何时提炼,`maxChars` 与 `maxOutputChars` 控制大结果落盘和返回上限;
|
|
20
|
+
- `timeoutRetryCount`、`errorRetryCount` 是额外重试次数;
|
|
21
|
+
- `summarizeErrors` 默认 `true`,控制达到 `minChars` 的错误结果是否提炼;环境变量依次为 `PI_DISTILL_SUMMARIZE_ERRORS`、旧 `PI_BASH_SUMMARY_SUMMARIZE_ERRORS`;
|
|
22
|
+
- `tools.<name>.enabled` 控制单个工具;`edit`、`write` 默认关闭,其他未配置工具默认开启;
|
|
23
|
+
- `render` 只控制展示,不改变提炼语义。
|
|
24
|
+
|
|
25
|
+
不要把需要完整原文的调用配置成摘要;调用方应传 `outputRequest: "RAW"`。不要为非文本结果启用文本提炼假设。
|
|
26
|
+
|
|
27
|
+
## 验证
|
|
28
|
+
|
|
29
|
+
- 用 `/distill:stats` 查看当前会话成功、失败、回退、压缩率和模型消耗。
|
|
30
|
+
- 对达到 `minChars` 的文本工具结果观察提炼;再用 `RAW` 确认完整性路径。
|
|
31
|
+
- 当前会话无可用模型或模型调用失败时,必须报告原始结果被保留的 fail-open 行为,不能宣称提炼成功。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-distill",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Pi tool-output distillation with file-first configuration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.ts",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"assets",
|
|
15
15
|
"config.example.json",
|
|
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 tests/bash-output-summary.test.ts",
|
|
@@ -27,6 +28,9 @@
|
|
|
27
28
|
"./index.ts",
|
|
28
29
|
"../pi-extensions-i18n/index.ts",
|
|
29
30
|
"../pi-extensions-tool-display/index.ts"
|
|
31
|
+
],
|
|
32
|
+
"skills": [
|
|
33
|
+
"./SKILL.md"
|
|
30
34
|
]
|
|
31
35
|
},
|
|
32
36
|
"engines": {
|
|
@@ -57,8 +61,8 @@
|
|
|
57
61
|
"@earendil-works/pi-tui": ">=0.80.0 <0.81.0"
|
|
58
62
|
},
|
|
59
63
|
"dependencies": {
|
|
60
|
-
"pi-extensions-i18n": "^0.
|
|
61
|
-
"pi-extensions-tool-display": "^1.0
|
|
64
|
+
"pi-extensions-i18n": "^0.4.0",
|
|
65
|
+
"pi-extensions-tool-display": "^1.1.0"
|
|
62
66
|
},
|
|
63
67
|
"devDependencies": {
|
|
64
68
|
"@earendil-works/pi-ai": "0.80.10",
|