Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 4 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
差得太远,强行统一只会造出一个两边都别扭的抽象。

Expand Down
Loading