Skip to content

Commit a92ee65

Browse files
committed
docs: add architecture & flow diagram (SVG)
docs/assets/architecture.svg:云端规划 → 端侧四层(意图桥/LFM Engine/Policy Guard/Redactor) → 私有基础设施,只回传脱敏结果的 loop。中英 README 架构段改用该矢量图(标签精确、GitHub 内联渲染、 配色对齐 banner)。
1 parent ffc8450 commit a92ee65

3 files changed

Lines changed: 71 additions & 32 deletions

File tree

‎README.md‎

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -105,24 +105,15 @@ the guard + mode, returning **redacted** output), `policy_check`, `local_context
105105
The server's autonomy is set by `SENTINEL_MODE` (default `readonly`); the MCP client's own
106106
tool-approval prompt is the human gate for `ask`-tier (mutating) steps.
107107

108-
## Architecture — three-layer filter
108+
## Architecture & flow
109109

110-
```
111-
guard run "diagnose not-ready pods in default"
112-
│
113-
① Intent Bridge ─────▼───── natural-language entrypoint (CLI / MCP)
114-
② LFM Engine ─────▼───── local inference, data stays on device
115-
• Local RAG: reads ~/.kube, ~/.ssh as background (non-secret only)
116-
• intent alignment: intent -> shell / kubectl
117-
• providers: ollama | llamacpp | mlx | mock (OpenAI-compatible)
118-
③ Policy Guard ─────▼───── allow / confirm / block
119-
• regex + semantic interception (drop / --all / rm -rf ...)
120-
• human-in-the-loop confirmation
121-
│
122-
run / refuse / downgrade
123-
```
110+
<p align="center">
111+
<img src="docs/assets/architecture.svg" width="760" alt="Sentinel-Agent architecture and flow">
112+
</p>
124113

125-
Inference backends are decoupled from orchestration: every backend speaks the OpenAI-compatible
114+
The cloud planner sends only an intent; the on-device layers (Intent Bridge → LFM Engine →
115+
Policy Guard → Redactor) plan and execute locally, and only the **desensitized** result loops
116+
back. Inference backends are decoupled from orchestration: every backend speaks the OpenAI-compatible
126117
protocol, so switching is configuration, not code. See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)
127118
and the [Tool Call protocol](docs/tool-call-protocol.md).
128119

‎README.zh-CN.md‎

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -99,24 +99,14 @@ go build -o bin/guard ./cmd/guard
9999
`policy_check`、`local_context`、`list_skills`。服务自治级别由 `SENTINEL_MODE` 决定(默认 `readonly`);
100100
对 `ask` 级(变更类)步骤,MCP 客户端自身的工具调用审批弹窗即人工门。
101101

102-
## 三层过滤架构
102+
## 架构与流程
103103

104-
```
105-
guard run "诊断 default 里未就绪的 pod"
106-
│
107-
① 意图接口层 ─────▼───── 自然语言入口 (CLI / MCP)
108-
② 端侧推理芯 ─────▼───── 本地推理,数据不出域
109-
• Local RAG:读取 ~/.kube、~/.ssh 作背景(仅非密钥信息)
110-
• 意图对齐:意图 -> shell / kubectl
111-
• Provider:ollama | llamacpp | mlx | mock(OpenAI 兼容)
112-
③ 安全执行围栏 ─────▼───── allow / confirm / block
113-
• 正则 + 语义拦截(drop / --all / rm -rf …)
114-
• Human-in-the-loop 确认
115-
│
116-
执行 / 拒绝 / 降级
117-
```
104+
<p align="center">
105+
<img src="docs/assets/architecture.svg" width="760" alt="Sentinel-Agent 架构与流程">
106+
</p>
118107

119-
推理后端与编排层解耦:所有后端走 OpenAI 兼容协议,换后端是改配置而非改代码。
108+
云端规划者只下发意图;端侧四层(意图接口层 → 端侧推理芯 → 安全围栏 → Redactor)在本地规划并执行,
109+
只有**脱敏后**的结果回环。推理后端与编排层解耦:所有后端走 OpenAI 兼容协议,换后端是改配置而非改代码。
120110
详见 [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) 与 [Tool Call 协议](docs/tool-call-protocol.md)。
121111

122112
## 推理后端

‎docs/assets/architecture.svg‎

Lines changed: 58 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)