1. 顶层一句话
运行中的 DSH 是一棵由 Cordis 管理的插件树。 插件把 service、typed event listener、reversible effect 注册到共享 Context;Agent 又拥有自己的 scoped Context,从而让不同会话看到不同工具、persona 与能力。
Profile / Bundle / Patch
↓
App Boot
↓
Cordis Plugin Tree
↓
┌──────────── shared host services ────────────┐
│ sessions llm tools systemPrompt agents │
└──────────────────────────────────────────────┘
↓ create agent
Agent-scoped Context
↓
Agent Loop ↔ Session Log ↔ LLM/Tools
2. 六个必须记住的轴
Composition
Profile/Bundle/Patch 决定装哪些插件。
Dependency
插件通过 service key 和 inject 解耦。
Lifecycle
注册是 effect,卸载时自动回滚。
Scope
同一进程里不同 Agent 可以有不同能力。
Event Log
模型可见状态必须可由 Session 事件重建。
Seam
Definition/Provider/Consumer 让后端可替换。
3. “没有特权核心”是什么意思
DSH 的核心包仍然存在,但架构原则是:新增行为优先挂在已有扩展点,而不是修改 loop。比如新增模型注册到 ctx.llm;新增工具注册到 ctx.tools;拦截工具执行监听 tools/*;改变某个 agent 的能力则在其 scoped context 挂插件。