DEEPSEEK HARNESS · OFFLINE TUTORIAL
13 · 自测与进阶
检验是否真正吃透
1. 四级理解
| 级别 | 标准 |
|---|---|
| Level 1 | 会启动和配置 |
| Level 2 | 能追 user → inbox → turn → step → llm → tools → turn end |
| Level 3 | 能写 Tool、Adapter、Policy、Provider、SessionEvent、Scoped capability |
| Level 4 | 能设计新 Harness capability 并找对 seam |
2. 12 道题
- 为什么不把所有功能写进 Agent?——composition / replaceability / scope / lifecycle。
- 为什么 Permission 更适合 Event/Guard?——policy/mechanism separation。
- 为什么
ctx.fs比 LocalFilesystem 更重要?——Definition/Provider separation。 - 为什么 Agent Loop 也可以是插件?——loop strategy 可替换。
- 为什么 Message[] 不是事实源?——不能完整表达 execution lifecycle。
- 为什么 assistant chunk 值得记录?——replay / UI / fidelity。
- 为什么工具并发,但 durable result ordering 要谨慎?——避免调度时序污染模型历史。
- 为什么 compaction 不直接删旧消息?——append-only event sourcing。
- 为什么 Persistence 不属于 core Session?——storage 是 replaceable seam。
- 什么时候创建 SessionEvent?——reload 后仍必须存在的事实。
- 什么时候使用 agent/*?——观察或拦截 live agent execution。
- 什么时候才改 Agent Loop?——所有 Agent 共享的 generic control-flow 且现有 seam 无法表达。
3. 最终设计题
新增 browser-computer capability,同时支持本地 Chrome 和远程 Browser:
Browser Service Definition
│
├─ Local Chrome Provider
└─ Remote Browser Provider
Browser Policy Events
│
▼
permission / sandbox plugins
Model-facing browser tools
│
▼
ctx.browser
能独立画出运行时图、能追一次 Turn、能解释核心不变量、能给新能力找对 seam、能自己写出 mini-DSH,才算真正“吃透”。