billion-context-pi-lean 0.1.56-lean.2 → 0.1.57-lean.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 +7 -8
- package/README.zh-CN.md +7 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,11 +10,11 @@ A lightweight Pi wrapper for [`billion-context-pi`](https://github.com/ranxiangl
|
|
|
10
10
|
* Streamlined tool surface: Exposes the high-frequency `compress` tool directly, while consolidating `decompress`, `search_context`, and `acp_status` into an on-demand `acp_context` interface.
|
|
11
11
|
* Focused and clean: Disables built-in delegation and auto-updates by design. For delegation workflows, pair with a dedicated subagent extension.
|
|
12
12
|
|
|
13
|
-
Upstream dependency is pinned to `billion-context-pi@0.1.
|
|
13
|
+
Upstream dependency is pinned to `billion-context-pi@0.1.57`; delegation remains disabled in this lean wrapper.
|
|
14
14
|
|
|
15
15
|
## Context Savings
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
The benchmark below compares the same delegation-disabled configuration against upstream `0.1.57`.
|
|
18
18
|
|
|
19
19
|
## Installation
|
|
20
20
|
|
|
@@ -59,16 +59,15 @@ Use `help` only when you need to inspect the full upstream schema.
|
|
|
59
59
|
|
|
60
60
|
With only this extension enabled, its recurring initialization overhead in the model context is:
|
|
61
61
|
|
|
62
|
-
| Item | Lean | Upstream `billion-context-pi@0.1.
|
|
62
|
+
| Item | Lean | Upstream `billion-context-pi@0.1.57` |
|
|
63
63
|
| --- | ---: | ---: |
|
|
64
64
|
| `compress` | 231 | 549 |
|
|
65
65
|
| Context operations | `acp_context`: 90 | `decompress` + `search_context` + `acp_status`: 1,095 |
|
|
66
|
-
| System prompt additions | 369 |
|
|
67
|
-
| **Total** | **690** | **
|
|
68
|
-
|
|
69
|
-
This saves **5,371 tokens (88.6%)** compared to the pinned upstream package.
|
|
70
|
-
The benchmark was measured on Pi 0.84.4 with `pi-context-view@0.4.3` in a fresh isolated session, excluding built-in tools, skills, context files, and unrelated extensions. Context View estimates tokens as `ceil(characters / 4)`. Pure runtime UI elements and slash commands are excluded as they are not sent to the model.
|
|
66
|
+
| System prompt additions | 369 | 3,951 |
|
|
67
|
+
| **Total** | **690** | **5,595** |
|
|
71
68
|
|
|
69
|
+
This saves **4,905 tokens (87.7%)** compared to the pinned upstream package.
|
|
70
|
+
The benchmark was measured on Pi 0.84.4 with `pi-context-view@0.4.3` in a fresh isolated session, with delegation disabled for both packages, excluding built-in tools, skills, context files, and unrelated extensions. Context View estimates tokens as `ceil(characters / 4)`. Pure runtime UI elements and slash commands are excluded as they are not sent to the model.
|
|
72
71
|
## Development
|
|
73
72
|
|
|
74
73
|
```bash
|
package/README.zh-CN.md
CHANGED
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
* 完整上下文引擎:保留上游的对话历史压缩、分层摘要、主动提示(Nudge)、溢出恢复、重试机制与工具保护能力。
|
|
10
10
|
* 优化工具布局:高频使用的 `compress` 工具直接对外暴露,其余 `decompress`、`search_context` 与 `acp_status` 操作整合为按需调用的 `acp_context` 入口。
|
|
11
|
-
* 纯粹专注:主动移除了内置的 Delegation 代理分发与自动更新逻辑;如需多 Agent 协作,建议搭配独立的 Subagent 扩展使用。上游依赖版本锁定为 `billion-context-pi@0.1.
|
|
11
|
+
* 纯粹专注:主动移除了内置的 Delegation 代理分发与自动更新逻辑;如需多 Agent 协作,建议搭配独立的 Subagent 扩展使用。上游依赖版本锁定为 `billion-context-pi@0.1.57`,确保运行稳定可靠。
|
|
12
12
|
|
|
13
13
|
## 精简优化成效
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
在双方均关闭 Delegation 的配置下,与上游 `billion-context-pi@0.1.57` 本地对比:Lean 精简版常驻上下文开销为 690 tokens,上游为 5,595 tokens,减少 **4,905 tokens(87.7%)**。
|
|
16
16
|
|
|
17
17
|
## 安装
|
|
18
18
|
|
|
@@ -57,16 +57,15 @@ acp_context
|
|
|
57
57
|
|
|
58
58
|
单独启用本扩展时,注入到模型初始上下文中的 Token 占用实测如下:
|
|
59
59
|
|
|
60
|
-
| 项目 | Lean 精简版 | 原版 `billion-context-pi@0.1.
|
|
60
|
+
| 项目 | Lean 精简版 | 原版 `billion-context-pi@0.1.57` |
|
|
61
61
|
| --- | ---: | ---: |
|
|
62
62
|
| `compress` | 231 | 549 |
|
|
63
63
|
| 上下文检索与操作 | `acp_context`: 90 | `decompress` + `search_context` + `acp_status`: 1,095 |
|
|
64
|
-
| 系统提示词增量 | 369 |
|
|
65
|
-
| **合计** | **690** | **
|
|
66
|
-
|
|
67
|
-
相比固定版本的上游扩展,初始开销减少了 **5,371 tokens(88.6%)**。
|
|
68
|
-
测试环境为 Pi 0.84.4 与 `pi-context-view@0.4.3` 独立会话,排除了 Pi 内置工具、Skills、上下文文件与无关扩展。Context View 按 `ceil(字符数 / 4)` 估算。未计入不会发送给模型的纯运行时 UI 与 Slash 命令。
|
|
64
|
+
| 系统提示词增量 | 369 | 3,951 |
|
|
65
|
+
| **合计** | **690** | **5,595** |
|
|
69
66
|
|
|
67
|
+
相比当前上游扩展,初始开销减少了 **4,905 tokens(87.7%)**。
|
|
68
|
+
测试时双方均关闭 Delegation,环境为 Pi 0.84.4 与 `pi-context-view@0.4.3` 独立会话,排除了 Pi 内置工具、Skills、上下文文件与无关扩展。Context View 按 `ceil(字符数 / 4)` 估算。未计入不会发送给模型的纯运行时 UI 与 Slash 命令。
|
|
70
69
|
## 本地开发
|
|
71
70
|
|
|
72
71
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "billion-context-pi-lean",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.57-lean.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Token-lean Pi facade for billion-context-pi with the full upstream context engine.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"check": "npm run typecheck && npm test"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"billion-context-pi": "0.1.
|
|
21
|
+
"billion-context-pi": "0.1.57",
|
|
22
22
|
"typebox": "1.3.7"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|