Skip to content

docs: slim READMEs into focused landing pages - #1527

Merged
ranxianglei merged 8 commits into
masterfrom
2026-09-28_slim-readme
Sep 28, 2026
Merged

ranxianglei merged 8 commits into
masterfrom
2026-09-28_slim-readme

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Closes #1522

What changed

Pure documentation reorganization — zero code or behavior changes (8 markdown files, −968/+823 lines). The READMEs carried large amounts of config-file material and per-client deep dives; this splits them into their natural homes:

From (old README sections) To
dsh / Kimi Code / Hermes / ZCode / Gemini family / CONNECT blind tunnels (#897) / unrecognized endpoints (#1290) / full OpenCode section (incl. /acp status & rules, legacy #920) new CLIENTS.md + CLIENTS.zh-CN.md
Upstream proxy (firewall/GFW) full rules + mitm:// vs https:// lookup-key table CONFIGURATION.md/.zh-CN.md (top-level proxy entry + new MITM vs /bili/ key schemes section)
compat.roles wire-compat section already fully covered by CONFIGURATION.md (compat) — README section removed, pointer left
Derived (child) sessions detail (#1333/#1362) SESSION-IDENTITY.md/.zh-CN.md (new section)
Session GC (#1082) / Windows AV (#362) bodies reduced to short summaries + links (details already in CONFIGURATION.md)
Running-the-proxy subsections condensed in place without losing facts (#409/#1073 admission, self-restart safety gates, log rotation)

Result: README.md 1300 → 621 lines, README.zh-CN.md 590 → 349. Both remain landing pages: intro → how it works (incl. Two compression modes, still cited by AGENTS.md and src/server.ts) → which do I need? → install → quickstart (one line per client) → running the proxy → configuration pointer → session model.

Behavior-change disclosure

None at runtime. Two doc corrections found while moving content (each isolated in its own commit):

  1. In-passing fix: the BILI_PREFLIGHT_HOLD_MS row in CONFIGURATION.md cited a README section "Preflight hold" that no longer exists in the README — the section was added by Preflight compression holds the request with zero response bytes; client undici headersTimeout (default 300s) kills it -> repeated [preflight] summarization aborted: client disconnected 5-minute death loop, payload never forwarded #568 and later removed from the README (e152a66), leaving the CONFIGURATION.md citation dangling. Reference dropped; the row now stands on its own with the Preflight compression holds the request with zero response bytes; client undici headersTimeout (default 300s) kills it -> repeated [preflight] summarization aborted: client disconnected 5-minute death loop, payload never forwarded #568 citation.
  2. BILI_UPSTREAM_PROXY row corrected to match the code: it claimed the env var has priority above per-URL proxies; src/upstream-proxy.ts:253-307 checks the per-URL route first, then the global chain. Docs now state the actual order (per-URL > BILI_UPSTREAM_PROXY > Web UI manual > top-level > env > Windows system > direct).

Also a zh/en parity fill: the zh auto-update section now documents the opt-in self-restart options (--auto-restart-on-update / ACP_AUTO_RESTART_ON_UPDATE / autoRestartOnUpdate) that were previously EN-only.

Verification

@ranxianglei ranxianglei mentioned this pull request Sep 27, 2026
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-09-28_slim-readme (ad047ca)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.1493-pr.1527.8eac168

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr1527.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 收到。这是我在 #1522 里完成的精简工作开的 PR,现在按规范做一轮正式 review:核对原 issue 方向、diff 整洁度(仅 8 个 md)、链接/锚点与跨文档引用、两处顺手修的文档修正是否与代码一致、CI 状态。审查结论稍后回帖。

ework-agent added 5 commits September 28, 2026 02:11
Moved out of the READMEs: dsh, Kimi Code, Hermes, ZCode, Gemini family
(Gemini CLI / iFlow CLI / Qwen Code), CONNECT blind-tunnel clients (#897),
unrecognized endpoints (#1290), and the full OpenCode section (launcher /
native / pure proxy, /acp status & rules, legacy opencode-acp sessions
#920). Content is verbatim from the old README sections; the zh doc also
gains the /acp-cache paragraph that was missing from the old zh README.
…nto CONFIGURATION and SESSION-IDENTITY

- CONFIGURATION.md/.zh-CN.md: top-level proxy entry now carries the full
  resolution order (per-URL > BILI_UPSTREAM_PROXY > Web UI manual >
  top-level > env > Windows system > direct), loop prevention, both egress
  paths, updater egress (#609), Windows Clash/Mihomo discovery, SOCKS5
  policy, and a jsonc example; new 'MITM vs /bili/ key schemes' section
  with the lookup-key table; BILI_UPSTREAM_PROXY row corrected to match
  src/upstream-proxy.ts (per-URL wins first); stale README pointers now
  target this file or CLIENTS.md.
- SESSION-IDENTITY.md/.zh-CN.md: new derived-(child)-sessions section
  (#1333/#1362): lineage-at-birth parentConversationId -> derivedFrom,
  read-only parent-chain fallback, lane table.
README.md 1300 -> 621 lines, README.zh-CN.md 590 -> 349. Per-client deep
dives moved to CLIENTS.md/.zh-CN.md; upstream-proxy/GFW and compat.roles
content moved to CONFIGURATION.md/.zh-CN.md; derived-sessions detail moved
to SESSION-IDENTITY.md/.zh-CN.md; Running-the-proxy subsections condensed
without losing facts (#409/#1073 admission, self-restart safety gates,
log rotation); session GC / Windows AV / derived sections reduced to
short summaries with links. zh auto-update section now documents the
self-restart options that were previously EN-only (parity fill). All
cross-references verified to resolve.
Pre-existing: the BILI_PREFLIGHT_HOLD_MS rows cited a README section that
never existed (no such heading in any README revision). The env var row
stands on its own with the #568 citation.
@ranxianglei
ranxianglei force-pushed the 2026-09-28_slim-readme branch from 5808383 to 7844026 Compare September 27, 2026 18:19
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Review progress — branch verified, rebased, local gates green; awaiting CI on the new head.

① Issue/direction: matches #1522 exactly (slim READMEs into landing pages; config material → CONFIGURATION.md, per-client deep dives → new CLIENTS.md, derived-session detail → SESSION-IDENTITY.md). Direction approved in that thread; scope respected — diff touches exactly 8 markdown files (+823/−968), zero code/version/lockfile changes.

② Regression review (existing behavior of the touched docs): verified the old README's full fact inventory survives the split — programmatic preservation audit plus cluster-by-cluster checks against the new corpus: proxy rules (resolution order, empty-string = explicit direct, both egress paths, updater egress #609, SOCKS5 split, key-scheme table), Windows AV section (Defender steps + BILI_PERSIST_EPERM_ALERT_THRESHOLD), session-GC policy incl. CCR store lifecycle #1180, self-update safety gates, #409/#1073 admission. All external references intact: Two compression modes (cited by src/server.ts + AGENTS.md), Quickstart, Option 1/2/3 labels (cited by src/launcher.ts + tests), attach-gate #1335 text; no dangling refs repo-wide to any removed heading. Two doc corrections both checked against code: BILI_UPSTREAM_PROXY priority order now matches src/upstream-proxy.ts:253-307 (per-URL first, then global chain); the dropped "Preflight hold" citation was genuinely dangling at the branch point. No test depends on README content.

③ Code review findings (both fixed directly on the branch):

  1. One fact was silently dropped by condensation: "an absolute-form request addressed to the instance's own endpoint on a management path is served locally instead of tunneled (a forward-proxy-style health probe gets a real answer)" — code anchor confirmed at src/server.ts:849, clause restored in both READMEs (commit 7844026).
  2. PR-body inaccuracy: it claimed the "Preflight hold" section "never existed in any revision" — false: it was added by Preflight compression holds the request with zero response bytes; client undici headersTimeout (default 300s) kills it -> repeated [preflight] summarization aborted: client disconnected 5-minute death loop, payload never forwarded #568 and removed from the README by e152a66 (Sep 7), leaving only the CONFIGURATION.md citation dangling. Fix was valid; corrected the PR description wording via API.

Rebase: branch was 126 commits behind master and master had touched 4 of the 8 files (attribution term, MESSAGE-IDENTITY pointers, streamErrorShape/resumeInheritance rows). Rebased onto current master — clean 3-way merge, all master-side additions verified present in the slimmed structure. Post-rebase gates: typecheck ✓, full suite 3001 pass / 0 fail ✓, build ✓, anchor-level link check ✓. Pushed as 7844026 (5 linear commits).

CI on the new head is running — final verdict (mergeable or not) in a follow-up comment once it's green.

本轮审查:核对内容迁移无事实丢失(找回一条被压缩掉的 #1073 行为细节)、修正 PR 描述中一处史实错误、把落后 master 126 个提交的分支 rebase 到最新并全量复跑门禁,等 CI 绿后给出可合并结论。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 ✅ Review complete — mergeable. CI is fully green on the rebased head 78440262 (12/12 check runs: ubuntu/windows test matrix × Node 22/24, e2e-fake-codex, e2e-native dsh/opencode/pi lanes, hermetic registry e2e, Windows codex overlay, version-guard, build-artifact). PR state: mergeable_state: clean, base = current master.

Final position after the full pass:

Nothing left to fix on my side. Merge whenever you're ready — I can't merge PRs myself (system rule): #1527

审查结论:文档重组无事实丢失、无运行时行为变更,两处文档纠错均与代码核对一致;已把分支 rebase 到最新 master(落后的 126 个提交中 master 侧的文档新增全部并入)、补回一条被压缩掉的 #1073 行为细节、修正 PR 描述一处史实错误;本地与 CI 全部门禁通过,可以合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author
代理向对话注入四个上下文管理工具(compress、decompress、search_context、acp_status)。模型在对话增长时调用 compress,代理在服务端执行 —— 压缩后的范围在下一轮之前折叠进对话历史。

可选的第五个工具 absorb(compress.absorb.enabled: true —— 见 [CONFIGURATION.zh-CN.md](https://github.com/ranxianglei/billion-context/blob/784402628c8024d7cfc57e0f851da85ab9f5646b/CONFIGURATION.zh-CN.md))对各个工具结果即时压缩:大结果(构建、日志、grep)被附带强制吸收指令,模型将各自蒸馏为紧凑摘要,原配对从下一轮起从线上隐藏 —— 使折叠轮之间的中间会话压力更低(#605)。

第六个工具 acp_rule(默认关闭;设 compress.rules: true 显式开启 —— 见 [CONFIGURATION.zh-CN.md](https://github.com/ranxianglei/billion-context/blob/784402628c8024d7cfc57e0f851da85ab9f5646b/CONFIGURATION.zh-CN.md)。开启后模型对会话规则有全权、可未经提示自主调用,#1399)记录持久化的原则级提醒:模型记录的简短规则(用户强调的教训、要求记住的行为、撞到的大坑)受硬性保护不被压缩——调用及结果在每次折叠中都保留在上下文中——省略参数则列出已记录规则;传入 delete(规则 id,如 "rule3")删除单条规则,传入 clear: true 清空全部规则([ranxianglei/billion-context-pi#433](https://github.com/ranxianglei/billion-context-pi/issues/433))。

第七个工具 acp_retrieve(全车道默认关闭、显式开启 —— 任意层级设 compress.ccr.enabled: true 方可启用,建议先本地验证;插件车道需全局显式 true 才会在 manifest 广播工具,#1271/#1273;见 [CONFIGURATION.zh-CN.md](https://github.com/ranxianglei/billion-context/blob/784402628c8024d7cfc57e0f851da85ab9f5646b/CONFIGURATION.zh-CN.md))支撑内容寻址消息存储(内置 CCR,#1097/#1179):超大工具结果在到达时改为 ID 引用,而非强制蒸馏——线上保留字节稳定的占位符,原文进入按会话的内容存储信封(按内容哈希去重),模型通过一次廉价工具调用按需取回。v2 让折叠同样无损:折叠落定时被覆盖的原文会存入存储,decompress 可按区间恢复(startId/endId ref)而无需整块展开,search_context 命中条目携带覆盖的 mNNNNN ref,让你精确取回所需内容。默认无损:未执行的 retrieve 只花一次调用;而被 absorb 蒸馏掉的细节则永久丢失。仅代理模式、仅原生工具线(marker/文本协议没有执行 retrieve 的通道,存储在这些场景下自动解除武装,而不是静默丢失内容)。

可选工具 image_full(compress.imageCompression.enabled: true —— 见 [CONFIGURATION.zh-CN.md](https://github.com/ranxianglei/billion-context/blob/784402628c8024d7cfc57e0f851da85ab9f5646b/CONFIGURATION.zh-CN.md))支撑图像预压缩(#1095):工具结果中的截图类图像在到达时降采样一次——内核做路由决策与 recipe,宿主经可选的 sharp 执行编码——在进入 wire 前降低计费像素(供应商按像素面积计费;尺寸减半约省 4 倍计费 token)。非截图图像逐字节原样透传。天然有损:模型看不清细节时用消息 ref 调用 image_full,为整个会话恢复原始分辨率——无需代理侧存储原图(客户端自己的历史仍持有原始字节,它从未见过降采样形态)。默认关闭。

同族的保护开关 compress.protectedLatestTools(见 [CONFIGURATION.zh-CN.md](https://github.com/ranxianglei/billion-context/blob/784402628c8024d7cfc57e0f851da85ab9f5646b/CONFIGURATION.zh-CN.md))让累积型工具(客户端的 todo/任务清单,如 ["todo_list", "TodoWrite"])的最新快照永远不被压缩,旧实例照常折叠 —— agent 的活跃任务清单不会在折叠中丢失(#639)。其全历史对应项 compress.protectedTools 对工具的全部实例做硬排除 —— 适用于各次结果相互独立、后续结果不会取代旧结果的内容(如 opencode/pi 的 skill 加载);对高频或累积快照型工具保护全部实例会让上下文无界增长(#639),请只用于低频高价值工具。反向旋钮 compress.neverPreserveRecentTools(见 [CONFIGURATION.zh-CN.md](https://github.com/ranxianglei/billion-context/blob/784402628c8024d7cfc57e0f851da85ab9f5646b/CONFIGURATION.zh-CN.md),需 acp-kernel >= 0.0.92)则把工具从软保护的最近区移除,让它们的结果立即可压 —— 默认列表为 decompress/search_context/read/bash(这 4 个工具的结果不受最近区保护、立即可压);从该列表只移除 read 是批量读文件「折叠→重读」死循环(#1198/#1277)的推荐解法。其正向镜像旋钮 compress.preserveRecentTools(见 [CONFIGURATION.zh-CN.md](https://github.com/ranxianglei/billion-context/blob/784402628c8024d7cfc57e0f851da85ab9f5646b/CONFIGURATION.zh-CN.md),需 acp-kernel >= 0.0.93)是该解法更优的单条形式 —— { "compress": { "preserveRecentTools": ["read"] } } 从生效排除表中减去 read,无需重述或冻结内置默认列表。

这一大坨,换成几个工具介绍,

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Done — that wall is now a compact per-tool intro in both READMEs (commit 94a0288c, pushed; CI 12/12 green).

New shape under How it works (new ### Context-management tools / ### 上下文管理工具 subsection):

What was dropped vs kept: every issue citation and every config-key name survives; only the deep mechanics moved out of sight (plugin-lane manifest broadcast, proxy-mode-only retrieval disarming, v2 interval restore, sharp/kernel split, delete/clear syntax) — those remain fully documented in CONFIGURATION.md/.zh-CN.md, which is exactly the split this PR exists to make. Net diff: −14/+16 lines across the two files, link check green.

已把那段「大坨」换成逐工具一行式介绍(核心四工具各一行 + 四个可选扩展各一句带引用 + 保护开关一句点名全部 key),细节语义留在 CONFIGURATION 文档里,中英文 README 同步,CI 全绿。

ranxianglei and others added 2 commits September 28, 2026 14:04
修复了 README.zh-CN.md 中的文本格式和内容,确保信息的准确性和一致性。
- Follow the manual cleanup pattern applied to README.zh-CN.md: compress client-table cells, launcher comments, native-vs-standalone paragraph, notes lists and session-mechanism core paragraphs in BOTH languages; mirror the owner's quickstart labels (most native / config-free / most universal) into English.
- Move the Option-1 spawn/reuse/attach-gate/discovery/runtime-info mechanics out of README.md into TECHNICAL-NOTES(.zh-CN).md as a new 'Proxy reuse and the attach gate' section; README keeps a one-line pointer.
- Repoint the CONFIGURATION(.zh-CN) attach-gate citation at the new TECHNICAL-NOTES section (it pointed at a README section now removed).
- Docs only; zero runtime/code changes.
@ranxianglei
ranxianglei merged commit 5ffafae into master Sep 28, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

精简readme

1 participant