billion-context 0.1.133 → 0.1.134-pr.1083.981
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 +0 -24
- package/README.zh-CN.md +0 -10
- package/dist/index.js +16033 -16082
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -810,30 +810,6 @@ The file auto-rotates at 10 MB (renamed to `bili.log.old`). Cache-hit stats
|
|
|
810
810
|
per request are logged as `[acp-usage] round N input=X cached=Y (cache hit Z%)`
|
|
811
811
|
so you can measure prefix-cache health directly from the log.
|
|
812
812
|
|
|
813
|
-
### Chaining bili instances (bili → bili)
|
|
814
|
-
|
|
815
|
-
When one bili's upstream is another bili (`client → A → B → LLM`), only the
|
|
816
|
-
instance closest to the client should run the compression pipeline — a second
|
|
817
|
-
pass would double-compress and corrupt session state. Any of three signals on
|
|
818
|
-
the inbound request makes the downstream instance pass it through **verbatim**
|
|
819
|
-
(no tool/tag injection, no acp-loop, no session state):
|
|
820
|
-
|
|
821
|
-
- `x-bili-hop` — stamped with the processing instance's id on every processed
|
|
822
|
-
emission (#300). Clients never send this header, so its presence always means
|
|
823
|
-
"came from a bili".
|
|
824
|
-
- `x-bili-sig` — sha256 digest of the exact emitted body bytes (#1078). Proves
|
|
825
|
-
no middlebox rewrote the request in transit; on mismatch the downstream
|
|
826
|
-
instance passes through anyway, because it must not process content it did
|
|
827
|
-
not produce.
|
|
828
|
-
- ACP artifacts in the body (render tags / context-management tool names) —
|
|
829
|
-
fallback for relays that strip bili's headers.
|
|
830
|
-
|
|
831
|
-
Every detection logs a prominent `[chain]` line (to `bili.log` and stderr)
|
|
832
|
-
naming the signal that fired. Older versions that stamp only `x-bili-hop` keep
|
|
833
|
-
working unchanged. If a third-party relay in your chain rewrites or strips
|
|
834
|
-
request bodies/headers, a `[chain]` warning on the downstream instance is the
|
|
835
|
-
safety mechanism working, not an error.
|
|
836
|
-
|
|
837
813
|
### Self-update
|
|
838
814
|
|
|
839
815
|
The proxy checks npm for a newer version on startup and every 3 minutes. When a
|
package/README.zh-CN.md
CHANGED
|
@@ -402,16 +402,6 @@ bili --host 0.0.0.0 # 所有网卡(或直接用局域网 IP)
|
|
|
402
402
|
|
|
403
403
|
文件超过 10 MB 自动轮转(重命名为 `bili.log.old`)。每个请求的缓存命中统计会以 `[acp-usage] round N input=X cached=Y (cache hit Z%)` 打印,可直接从日志衡量前缀缓存健康度。
|
|
404
404
|
|
|
405
|
-
### 串联多个 bili(bili → bili)
|
|
406
|
-
|
|
407
|
-
当一个 bili 的 upstream 指向另一个 bili(`客户端 → A → B → LLM`)时,只有离客户端最近的那个实例应该执行压缩管线——二次处理会重复压缩并破坏会话状态。入站请求上任意一个信号命中,下游实例都会**原样透传**该请求(不注入工具/标签、不跑 acp-loop、不建会话状态):
|
|
408
|
-
|
|
409
|
-
- `x-bili-hop` —— 处理方实例在每次处理后的转发上盖自己的实例 id(#300)。客户端永远不会发这个头,所以它的出现一定意味着"来自某个 bili"。
|
|
410
|
-
- `x-bili-sig` —— 转发体字节的 sha256 摘要(#1078)。用来证明请求在途中没有被中间设备改写;摘要不符时下游同样直接透传,因为它不能处理自己没有产出的内容。
|
|
411
|
-
- 请求体中的 ACP 产物(render 标签 / 上下文管理工具名)—— 针对会剥掉 bili 请求头的中转站的兜底检测。
|
|
412
|
-
|
|
413
|
-
每次命中都会在 `bili.log`(及 stderr)打一条醒目的 `[chain]` 日志,标明触发信号。只盖 `x-bili-hop` 的旧版本行为不变。如果你的链路里有第三方中转站会改写或剥离请求体/头,下游实例出现的 `[chain]` 警告是安全机制在工作,不是错误。
|
|
414
|
-
|
|
415
405
|
### 自动更新
|
|
416
406
|
|
|
417
407
|
代理启动时和每 3 分钟检查 npm 是否有新版本。发现新版本就全局安装(`npm install -g`)并打印通知 —— **重启 `bili` 才能生效**。
|