青雲的博客
《深入浅出 DeepSeek Harness》封面
全部小册

源码版本 47f943859bef60e4160492346772ded9b24f765a

深入浅出 DeepSeek Harness

从一次回车到完整 Agent 平台

沿 DeepSeek Harness 官方仓库的固定 commit,从你在终端敲下 dsh 或在浏览器按下回车讲起,追踪消息怎样穿过 Inbox 进入 Agent Loop,事件日志怎样同时支撑模型上下文、持久化与界面投影,并继续拆解工具治理、Goal、多 Agent、Cordis、MCP、SDK、安全与验证体系。

目录

50 章已发布

查阅索引

.dsh directory auto-discovery
Repository Plugin 和 Self-modification
分层注册域 (ScopedLayers): global / ancestor / own
工具调度器与注册域
取消语义: ABORTED vs ABORTED_BEFORE_DISPATCH
工具调度器与注册域
三层环境加载与 bootstrap-only 拒绝
从敲下 dsh 到补丁栈组装完成
五层补丁栈叠合顺序
从敲下 dsh 到补丁栈组装完成
BlockAssembler incremental assembly
LLM Service、流式 chunk 与 BlockAssembler
boot() 的两阶段错误处理
从敲下 dsh 到补丁栈组装完成
canonical value 与 model-facing content 区分
结果太大了:Spill、截断和外溢
Capability Seam 三角色架构
Capability Seam 与 cordis.yml 组合
complete section 替换语义
System Prompt 四层组装
CONFIGURED_AGENT_IDENTITIES_KEY
Agent、Session 和那个共用的身份证
contexts 渲染为 user-role 消息
System Prompt 四层组装
cordis.yml 每次启动覆写的原因
从敲下 dsh 到补丁栈组装完成
cordis.yml 声明式组合
Capability Seam 与 cordis.yml 组合
delta-only protocol tolerance
流式响应:chunk 怎样变成消息
disabled 互斥平台切换
Capability Seam 与 cordis.yml 组合
finally turn/end 保证
Retry、Abort 与 turn 结账
freezeRestoredObject iterative freeze
Resume、Fork、Compaction——上下文改写术
GoalPhase finite state machine
Goal 为什么是事件流而不是字段
llm-retry 指数退避
Retry、Abort 与 turn 结账
llm/stream waterfall interception
LLM Service、流式 chunk 与 BlockAssembler
markAgentLoopRequest deep-freeze
LLM Service、流式 chunk 与 BlockAssembler
max-tokens tool-call discard
流式响应:chunk 怎样变成消息
maxParallelToolCalls 滚动并发池
工具调度器与注册域
normal 模式与 always 模式
Retry、Abort 与 turn 结账
pre/around/post 瀑布管线与 monotonic guard
工具调度器与注册域
PreparedLlmCall one-shot dispatch
LLM Service、流式 chunk 与 BlockAssembler
Profile 目录结构与自动初始化
从敲下 dsh 到补丁栈组装完成
PromptAssembly 四层结构
System Prompt 四层组装
provider retryAfterMs
Retry、Abort 与 turn 结账
read 工具 anti-loop 跳过规则
结果太大了:Spill、截断和外溢
Repository Plugin self-modification
MCP 工具注册与 Repository Plugin
run_code internal scheduler
并行工具调用:顺序和屏障
schedule dispatch framing injection
Plan、Todo、Schedule——Goal 的三个邻居
sections order 数值约定
System Prompt 四层组装
Service Definition vs Provider vs Consumer
Capability Seam 与 cordis.yml 组合
shell stream-level 独立截断
结果太大了:Spill、截断和外溢
skill-filesystem project roots
Repository Plugin 和 Self-modification
SpillStore best-effort 存储语义
结果太大了:Spill、截断和外溢
strict variable interpolation
System Prompt 四层组装
synthetic error result
Retry、Abort 与 turn 结账
todo_write allowParallelInProgress
Plan、Todo、Schedule——Goal 的三个邻居
ToolExecutionMode: parallel vs exclusive 的 fail-closed 分类
工具调度器与注册域
ToolPresentationMode: native / code / both 三种呈现
工具调度器与注册域
ToolRestriction: allow/deny 交集过滤
工具调度器与注册域
ToolRuntime: 注册表 + 执行管线 + 调度器三合一
工具调度器与注册域
tools 排序与 toolOrder
System Prompt 四层组装
top-down cancellation propagation
收束:Cancel、Dispose 和多 Agent 清理
transport layer (stdio/streamable-http)
MCP 工具注册与 Repository Plugin
two-arm 设计(模型面与 durable log)
结果太大了:Spill、截断和外溢
variables 近覆盖远
System Prompt 四层组装
verify-cordis-config 静态验证
Capability Seam 与 cordis.yml 组合
workspace-level capabilities
Repository Plugin 和 Self-modification