billion-context-pi 0.1.78 → 0.1.79-pr.430.376

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 CHANGED
@@ -145,11 +145,12 @@ billion-context-pi is built for the **Pi** coding agent (`@earendil-works/pi-cod
145
145
  | `search_context` | Search compressed block summaries (and visible messages) by keyword |
146
146
  | `acp_status` | Show context usage, compressed blocks, compressible ranges |
147
147
  | `acp_cache` | Prompt-cache reconciliation: grand ledger (input/cached/hit rate), per-request miss attribution, per-fold economics |
148
+ | `acp_rule` | Record a short, principle-level reminder that survives compression (opt-in: `"rules": true`) |
148
149
  | `acp_delegate` | Spawn a clean-context sub-agent for a task (review / research / implement / plan / advise) |
149
150
  | `acp_delegate_wait` | Block until a delegate run finishes (returns its result; times out otherwise) |
150
151
  | `acp_delegate_cancel` | Cancel a running delegate by runId |
151
152
 
152
- The four `acp_delegate*` tools are optional: if you bring your own sub-agent extension, disable them with one `acp.json` key — see *Using your own sub-agent instead* below.
153
+ The four `acp_delegate*` tools are optional: if you bring your own sub-agent extension, disable them with one `acp.json` key — see *Using your own sub-agent instead* below. `acp_rule` is likewise opt-in — off by default, enable it with `"rules": true`.
153
154
 
154
155
  ### acp_delegate — clean-context delegation
155
156
 
@@ -167,7 +168,7 @@ Read-only roles (reviewer, researcher, planner, oracle) receive a restricted too
167
168
 
168
169
  Worker runs on Pi's full default toolset - no `--tools` allowlist is applied, so any loaded extension or custom tools (e.g. ACP, LSP, MCP) remain available. This keeps primary-task delegation fully capable. The `read, edit, write, bash` listing above reflects core tools only.
169
170
 
170
- The full delegate result is saved to a file (`/tmp/acp-delegate/<runId>.out`); the tool result and injected notification carry only the **task title + file path** (no preview) - use `read` for the details. This keeps the parent context lean.
171
+ The full delegate result is saved to a file (`$TMPDIR/acp-delegate/<runId>.out`, defaulting to `/tmp/acp-delegate/<runId>.out`); the tool result and injected notification carry only the **task title + file path** (no preview) - use `read` for the details. This keeps the parent context lean.
171
172
 
172
173
  - **Interactive (TUI) & RPC modes**: `async:true` (default) runs the child in the background; a short completion notification is injected into the chat when it finishes — **unless the model already read the result file after the run finished** (detected via the `read` tool or a bash command referencing the file), in which case the notification is skipped: the model already has the result, so re-injecting it would only waste context. Set `delegate: { notifyIfRead: "always" }` in `acp.json` to restore the always-inject behavior.
173
174
  - **Print / JSON modes** (`pi -p`, SDK): `async:true` auto-downgrades to **synchronous** — the result returns as the tool result in the same turn (the parent exits after one turn, so background injection would be lost).
package/README.zh-CN.md CHANGED
@@ -133,11 +133,12 @@ billion-context-pi 面向 **Pi** 编码代理(`@earendil-works/pi-coding-agent`)
133
133
  | `decompress` | 恢复之前压缩的块内容 |
134
134
  | `search_context` | 按关键词搜索已压缩块摘要(及可见消息) |
135
135
  | `acp_status` | 显示上下文用量、已压缩块、可压缩范围 |
136
+ | `acp_rule` | 记录一条简短、原则性的提醒,穿越压缩保留(可选:`"rules": true`) |
136
137
  | `acp_delegate` | 为某个任务派生一个干净上下文的子代理(审查 / 调研 / 实现 / 规划 / 建议) |
137
138
  | `acp_delegate_wait` | 阻塞等待委派任务完成(返回结果,否则超时) |
138
139
  | `acp_delegate_cancel` | 按 runId 取消正在运行的委派任务 |
139
140
 
140
- `acp_delegate*` 四个工具是可选的:如果你自带子代理扩展,一个 `acp.json` 键即可关闭 —— 见下文*改用你自己的子代理*。
141
+ `acp_delegate*` 四个工具是可选的:如果你自带子代理扩展,一个 `acp.json` 键即可关闭 —— 见下文*改用你自己的子代理*。`acp_rule` 同样是可选项 —— 默认关闭,在 `acp.json` 中设置 `"rules": true` 启用。
141
142
 
142
143
  ### acp_delegate — 干净上下文委派
143
144
 
@@ -155,7 +156,7 @@ billion-context-pi 面向 **Pi** 编码代理(`@earendil-works/pi-coding-agent`)
155
156
 
156
157
  Worker 运行在 Pi 的完整默认工具集上 - 不应用 `--tools` 白名单,因此任何已加载的扩展或自定义工具(如 ACP、LSP、MCP)保持可用。这确保主任务委派能力完整。上表中的 `read, edit, write, bash` 仅反映核心工具。
157
158
 
158
- 委派的完整结果保存到文件(`/tmp/acp-delegate/<runId>.out`);工具结果和注入通知只携带**任务标题 + 文件路径**(无预览)- 需要细节时用 `read` 读取。这让父上下文保持精简。
159
+ 委派的完整结果保存到文件(`$TMPDIR/acp-delegate/<runId>.out`,默认 `/tmp/acp-delegate/<runId>.out`);工具结果和注入通知只携带**任务标题 + 文件路径**(无预览)- 需要细节时用 `read` 读取。这让父上下文保持精简。
159
160
 
160
161
  - **交互(TUI)与 RPC 模式**:`async:true`(默认)在后台运行子进程;完成时一条简短通知注入到聊天框。
161
162
  - **Print / JSON 模式**(`pi -p`、SDK):`async:true` 自动降级为**同步** — 结果在同一轮作为工具结果返回(父进程一轮后即退出,后台注入会丢失)。
@@ -7,7 +7,7 @@ var __export = (target, all) => {
7
7
  // src/contract.ts
8
8
  var SIDECAR_SCHEMA_VERSION = 1;
9
9
  function sidecarProducer() {
10
- return `billion-context-pi@${true ? "0.1.78" : "dev"}`;
10
+ return `billion-context-pi@${true ? "0.1.79" : "dev"}`;
11
11
  }
12
12
 
13
13
  export {
@@ -15,4 +15,4 @@ export {
15
15
  SIDECAR_SCHEMA_VERSION,
16
16
  sidecarProducer
17
17
  };
18
- //# sourceMappingURL=chunk-TNMZCJIL.js.map
18
+ //# sourceMappingURL=chunk-6YLMDMXH.js.map
package/dist/config.d.ts CHANGED
@@ -317,8 +317,8 @@ export interface AdapterConfig {
317
317
  * delimit real turns. See docs/host-adapter.md. */
318
318
  hostSession?: boolean | HostSessionConfig;
319
319
  /** Persistent-rules feature gate (#526): opt-in `rules: true` in acp.json.
320
- * Gates the human `/acp-rule` command (list + record — kernel
321
- * `listRules`/`addRule` against the session `.acp.json` sidecar state) and
320
+ * Gates the human `/acp-rule` command (list + record + remove + clear — kernel
321
+ * `listRules`/`addRule`/`removeRule`/`clearRules` against the session `.acp.json` sidecar state) and
322
322
  * the model-side `acp_rule` tool (#490). Custom limits via
323
323
  * coreOverrides.rules ({ maxRules?, maxRuleChars? }). */
324
324
  rules?: boolean;
package/dist/contract.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SIDECAR_SCHEMA_VERSION,
3
3
  sidecarProducer
4
- } from "./chunk-TNMZCJIL.js";
4
+ } from "./chunk-6YLMDMXH.js";
5
5
  export {
6
6
  SIDECAR_SCHEMA_VERSION,
7
7
  sidecarProducer