|
|
3 ヶ月 前 | |
|---|---|---|
| .. | ||
| agent | 3 ヶ月 前 | |
| agent-loop | 3 ヶ月 前 | |
| llm | 3 ヶ月 前 | |
| session | 3 ヶ月 前 | |
| system-prompt | 3 ヶ月 前 | |
| tools | 3 ヶ月 前 | |
| AGENTS.md | 3 ヶ月 前 | |
| CLAUDE.md | 3 ヶ月 前 | |
| README.md | 3 ヶ月 前 | |
Harness packages, all under the @deepseek-ai/dsh-* scope. Each package is a
Cordis service (microkernel plugin-style): it exports a default Service class
that gets registered via ctx.plugin(), declares its ctx key and events through
declaration merging, and exposes extension points through ctx.effect(),
ctx.on(), and ctx.waterfall().
dsh-llm (no harness deps — pure vocabulary)
dsh-session ← dsh-llm
dsh-system-prompt ← dsh-llm
dsh-agent ← dsh-llm, dsh-session
dsh-tools ← dsh-llm, dsh-system-prompt, dsh-agent
dsh-agent-loop ← dsh-llm, dsh-session, dsh-system-prompt, dsh-tools, dsh-agent
The rule: plugins depend on interfaces, never on the concrete loop.
dsh-agent-loop is swappable — UI/hook/tool plugins keep working against the
dsh-agent vocabulary if the loop is replaced.
| Package | Role | ctx key |
|---|---|---|
llm/ |
Abstract LLM service + content-block vocabulary + chunk assembler | ctx.llm |
session/ |
Event-sourced session log + in-memory store | ctx.sessions |
system-prompt/ |
Prompt-section + tool-schema assembly registry | ctx.systemPrompt |
tools/ |
Tool registry + tools/execute waterfall |
ctx.tools |
agent/ |
Agent interface, registry, agent/* event vocabulary |
ctx.agents |
agent-loop/ |
THE concrete plugin: LoopAgent + the loop driver |
ctx.agentLoop |
Each package has its own README.md with purpose, service API, events,
extension points, and deliberate non-goals (TODOs).
ctx.effect() / ctx.on(), so disposal
and HMR clean up automatically. Every register() returns the disposer.declare module 'cordis' { interface Events { ... } } and their ctx key in
interface Context.ctx.waterfall listeners receive (...args, next)
and MUST call next() to delegate; returning without it short-circuits (the
veto mechanism).ContentBlockMap, MessageSourceMap,
FinishReasonMap, TurnTriggerMap, TurnEndReasonMap, and SessionEventMap
use the merge-extensible-map pattern so plugins can add variants via
declaration merging..ts extensions within a package.packages/<name>/tests/*.spec.ts. Every
registry needs an HMR-safety test. Err on the side of more tests.