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", 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 差得太远,强行统一只会造出一个两边都别扭的抽象。