From 2402e2a7dac57521d6c3c3143fd7caa513e47028 Mon Sep 17 00:00:00 2001 From: fylorn <249551762+fylorn@users.noreply.github.com> Date: Thu, 24 Sep 2026 13:08:36 +0800 Subject: [PATCH 1/2] chore: put the crates enterprise depends on in the shared layer tw-dialect, tw-guard and tw-breaker sat under the layer the comment said enterprise never depends on, yet enterprise pins all three, and tw-secret comes along through tw-guard. List them with the shared layer and name what enterprise uses directly. Co-Authored-By: Claude Opus 5.5 --- Cargo.toml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0c535344..1ee2b967 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,23 +1,26 @@ [workspace] resolver = "2" members = [ - # ── 第一层 · 共用协议层(企业版也依赖)──────────────── + # ── 第一层 · 共用(企业版依赖,含传递依赖)────────── + # 企业版直接用:tw-types、tw-upstream、tw-wire、tw-crypto、 + # tw-dialect、tw-guard、tw-breaker;tw-secret 经 tw-guard 带进去。 + # 改这一层要 grep 企业版。 "crates/tw-types", "crates/tw-upstream", "crates/tw-wire", "crates/tw-crypto", - # ── 第二层 · 桌面网关(企业版永不依赖)──────────────── - "crates/tw-api", + "crates/tw-dialect", + "crates/tw-guard", "crates/tw-secret", + "crates/tw-breaker", + # ── 第二层 · 桌面网关(企业版不依赖)──────────────── + "crates/tw-api", "crates/tw-config", "crates/tw-yaml", "crates/tw-store", "crates/tw-pricing", "crates/tw-adopt", "crates/tw-scan", - "crates/tw-guard", - "crates/tw-breaker", - "crates/tw-dialect", "crates/tw-engine", "crates/tw-observe", "crates/tw-gateway", From 75aafa2144132384cb32bff325e8bd883c27944a Mon Sep 17 00:00:00 2001 From: fylorn <249551762+fylorn@users.noreply.github.com> Date: Thu, 24 Sep 2026 13:18:01 +0800 Subject: [PATCH 2/2] docs: name the crates the server edition actually depends on Co-Authored-By: Claude Opus 5.5 --- README.md | 7 ++++--- README.zh-CN.md | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fa40b24b..97403493 100644 --- a/README.md +++ b/README.md @@ -44,13 +44,14 @@ Point a client (Claude Code, Codex, and friends) at a local port, and: ``` tw-types · tw-dialect · tw-wire · tw-upstream · tw-crypto ← shape fixed by the outside world -tw-engine · tw-pricing · tw-guard · tw-yaml · tw-secret ← domain logic +tw-engine · tw-pricing · tw-guard · tw-breaker · tw-yaml · tw-secret ← domain logic tw-config · tw-store · tw-scan · tw-adopt · tw-observe ← assembly tw-gateway · tw-control ← data plane / control plane ``` -The top two layers are stable against external reality — the server edition -depends on them directly. The bottom two are the single-machine implementation +The top two layers are stable against external reality. The server edition +depends on tw-types, tw-dialect, tw-wire, tw-upstream, tw-crypto, tw-guard and +tw-breaker directly, and on tw-secret through tw-guard. The bottom two are the single-machine implementation (SQLite, unix socket) and are deliberately **not** shared: single-machine SQLite and multi-tenant Postgres are different enough that forcing one abstraction over both would serve neither. diff --git a/README.zh-CN.md b/README.zh-CN.md index 8d96caa6..851e1d66 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -39,12 +39,14 @@ cargo run -p twcore -- serve # 起网关和控制面 ``` tw-types · tw-dialect · tw-wire · tw-upstream · tw-crypto ← 形状由外部现实决定 -tw-engine · tw-pricing · tw-guard · tw-yaml · tw-secret ← 领域逻辑 +tw-engine · tw-pricing · tw-guard · tw-breaker · tw-yaml · tw-secret ← 领域逻辑 tw-config · tw-store · tw-scan · tw-adopt · tw-observe ← 装配 tw-gateway · tw-control ← 数据面 / 控制面 ``` -上面两层对外部稳定,服务端版本直接依赖它们。下面两层是单机的实现 +上面两层对外部稳定。服务端版本直接依赖其中的 tw-types、tw-dialect、 +tw-wire、tw-upstream、tw-crypto、tw-guard、tw-breaker,tw-secret 经 +tw-guard 间接带进去。下面两层是单机的实现 (SQLite、unix socket),**有意不共用** —— 单机 SQLite 和多租户 Postgres 差得太远,强行统一只会造出一个两边都别扭的抽象。