Skip to content

Index — DeepSeek Harness 源码剖析维基

撰写基线:deepseek-harness/ 仓库快照 2026-08-28;行号随上游漂移,各页以撰写日期标注为准。逐轮变更记录见 log.md。施工状态:能力域拆分(provider-* 系列)进行中,其三条前向引用暂为断链,属预期,勿修。

overviews/ 总览

页面主题
architecture-overview项目定位、全局架构图、阅读路线

tutorials/ 教程导航

页面主题
curriculum-map课程地图:外部 13 课教程 ↔ 维基机制参考页;三份材料的分工

concepts/ 机制页

页面主题
cordis-context-and-servicesContext、服务注册、inject 依赖注入、可逆注册
event-dispatch-modes五种事件分发模式:emit / waterfall / parallel / serial / bail
capability-seam三角色模式:Service Definition / Provider / Consumer
turn-execution-flowTurn 执行流事件序列与「模型可见 = 已记录」不变量
profile-bundle-compositionProfile + Bundle 分层组合与配置层叠
lifecycle生命周期:启动十一拍、__DSH_BOOT__ 引导、有界停机、格式版本策略
failure-and-observability故障传播三层遏制链、不变量载体、日志/遥测容量、损坏排查
tool-pipeline-depth工具管线纵深:调度器时序、审批等待、并发池、信号熔断、超时与 spill、各关卡运行时行为
turn-branches回合六分支:取消/转向/重试/溢出恢复/错误终结/崩溃孤儿的事件序列与识别法
llm-stream-protocolLLM 流协议纵深:七相、错误折叠、两层护栏、DeepSeek 翻译细节与数字表
cordis-mechanicsCordis 机制走查:激活序列、替换级联、服务解析路径、HMR 管线
failure-triage故障排查手册:六类症状的判别字符串、排查顺序、自动恢复与致命的分界

entities/ 实体页

页面主题
core-spinepackages/core(8 包):session / system-prompt / tools / agent / agent-loop / scope 等
agent-loopReactLoopAgent 驱动机:Phase 三态、唤醒闩锁、工具有序调度与「请求可从日志重建」不变量
capability-providers十大能力域 provider 逐个剖析(llm / shell / subprocess / fs / subagent / terminal / lsp / web / workflow / webhook)
provider-terminalTerminal 域:持久 PTY 会话的所有权注册表,能力接缝「注册表形态」实例
session-persistence会话持久层(JSONL/SQLite)、投影、storage/spill、plan/goal/todo 日志化状态
web-clientWeb 客户端:Slots、四份 props、模块图、三层分层、Conversation Node
self-extension自扩展:skill 注册表、extensions 动态 Cordis 包、postmortem 制度
sandbox-and-permissionslandlock 沙箱、sandbox 抽象、e2b 远程沙箱、interaction 审批
engineering-gatesverify- 脚本、测试矩阵、双编译面、覆盖率门禁
external-interfacesTS/Python SDK、Typert RPC 网关、ACP、MCP
multi-agent多 Agent 纵深:spawn/fork 种子、继承规则、四个进程外后端、agent-team 实验、失败隔离

syntheses/ 综合页

页面主题
design-philosophy设计哲学:无特权核心、显式>隐式、大声失败、可逆性
agent-notes-systemAgent Notes 决策记录制度与配套门禁
web-message-trace横切实例:一条 Web 消息从输入到落盘再到回渲染的七跳全程
tradeoffs设计取舍:15 个已实施决策的选、拒与代价(.agents/notes/ 索引层)

sources/ 源摘要

页面主题
repo-layout仓库目录结构与包清单摘要(54 packages + vendor + native + python)

内容采用 CC BY-SA 4.0 协议 · 非官方社区站,与 DeepSeek 官方无关