billion-context-pi 0.1.41 → 0.1.45

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
@@ -133,6 +133,18 @@ Blocks: 3 active (3.7K summary, 15.2K original compressed)
133
133
  b3 (T2) 3.3K→1.0K age=1m "Architecture review"
134
134
  ```
135
135
 
136
+ ## `/acp-subagents` command
137
+
138
+ **Optional, one-time setup — only if you also use [pi-subagents](https://github.com/nicobailon/pi-subagents).**
139
+
140
+ billion-context-pi's own `acp_delegate` tool works standalone. If you additionally keep pi-subagents installed and want its builtin sub-agents to have ACP context tools (`compress`/`decompress`/`search_context`/`acp_status`) for long-running tasks, run:
141
+
142
+ ```
143
+ /acp-subagents
144
+ ```
145
+
146
+ It discovers the agents and their tool baselines from the installed pi-subagents package and appends the four ACP tools to `subagents.agentOverrides` in `~/.pi/agent/settings.json` (safe write: backup + verify). Nothing is written automatically — this command is the only write path. Re-run it after upgrading pi-subagents. For git installs or forks, pass the package directory explicitly: `/acp-subagents <installDir>`.
147
+
136
148
  ## Configuration
137
149
 
138
150
  billion-context-pi works out of the box with no configuration — it reads your model's context window automatically and applies sensible defaults.
package/README.zh-CN.md CHANGED
@@ -132,6 +132,18 @@ Blocks: 3 active (3.7K summary, 15.2K original compressed)
132
132
  b3 (T2) 3.3K→1.0K age=1m "Architecture review"
133
133
  ```
134
134
 
135
+ ## `/acp-subagents` 命令
136
+
137
+ **可选、一次性设置——仅当你同时使用 [pi-subagents](https://github.com/nicobailon/pi-subagents) 时需要。**
138
+
139
+ billion-context-pi 自带的 `acp_delegate` 工具可独立工作。如果你另外保留了 pi-subagents,并希望它的内置子代理在长任务中也能使用 ACP 上下文工具(`compress`/`decompress`/`search_context`/`acp_status`),运行:
140
+
141
+ ```
142
+ /acp-subagents
143
+ ```
144
+
145
+ 它会从已安装的 pi-subagents 包中发现 agent 名单与工具基线,并向 `~/.pi/agent/settings.json` 的 `subagents.agentOverrides` 追加这四个 ACP 工具(安全写入:备份 + 校验)。不会自动写入——该命令是唯一的写入路径。升级 pi-subagents 后重新运行即可。git 安装或 fork 请显式传入包目录:`/acp-subagents <installDir>`。
146
+
135
147
  ## 配置
136
148
 
137
149
  billion-context-pi 开箱即用,无需任何配置——它会自动读取模型的上下文窗口并应用合理的默认值。
@@ -3,13 +3,22 @@ import type { ToolDefinition } from "@earendil-works/pi-coding-agent";
3
3
  import type { AcpRuntime } from "./runtime.js";
4
4
  declare const CompressParams: Type.TObject<{
5
5
  topic: Type.TOptional<Type.TString>;
6
- content: Type.TArray<Type.TObject<{
6
+ content: Type.TUnion<[Type.TArray<Type.TObject<{
7
7
  startId: Type.TString;
8
8
  endId: Type.TString;
9
9
  summary: Type.TString;
10
10
  topic: Type.TOptional<Type.TString>;
11
- }>>;
11
+ }>>, Type.TString]>;
12
12
  summaryMaxChars: Type.TOptional<Type.TNumber>;
13
13
  }>;
14
14
  export declare function makeCompressTool(runtime: AcpRuntime): ToolDefinition<typeof CompressParams>;
15
+ /** Success = completed run that created >= 1 block (partial range errors
16
+ * still count: progress was made). A 0-block panel must NOT be success —
17
+ * it would reset the retry counter while the emergency nudge re-fires,
18
+ * looping no-op compressions (issue #6). */
19
+ export declare function isCompressSuccessText(text: string): boolean;
20
+ /** No-op = completed run that compressed nothing (0-block panel: every
21
+ * range skipped). Counted as a FAILED attempt by noteCompressOutcomes so
22
+ * the retry cap applies. Non-panels ("No ranges provided.") stay neutral. */
23
+ export declare function isCompressNoopText(text: string): boolean;
15
24
  export {};
package/dist/config.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { type Config, type Prompts } from "acp-kernel";
2
+ import type { ThrottleRetryConfig } from "./throttle-retry.js";
2
3
  /** Delegate sub-agent configuration. */
3
4
  export interface DelegateConfig {
4
5
  /** Enable acp_delegate tools (delegate/wait/cancel) and their system-prompt
@@ -88,6 +89,11 @@ export interface AdapterConfig {
88
89
  delegate?: boolean | DelegateConfig;
89
90
  /** Compression tuning. */
90
91
  compress?: CompressConfig;
92
+ /** Provider token-throttle (Bedrock "Too many tokens, please wait before
93
+ * trying again.") auto-retry. Accepts a boolean shorthand (`false`
94
+ * disables) or a ThrottleRetryConfig object. Default: enabled, 10 retries,
95
+ * 60s exponential base capped at 300s per kick. */
96
+ throttleRetry?: boolean | ThrottleRetryConfig;
91
97
  /** Legacy flat alias for `delegate.displayUsage`. Kept for backward
92
98
  * compatibility with existing acp.json files. Prefer `delegate.displayUsage`. */
93
99
  displayUsage?: "merged" | "separate";