mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
Beyond the mechanical conflicts (provider capability lines vs master's new inheritsParentContext field; generated catalogs regenerated rather than hand-merged; knip/lockfile), three master-side reworks required semantic adaptation of this branch: - The persona rework removed AgentOptions.systemPrompt, which was the structured-output instruction's channel. The instruction now rides the SAME final-request enforcement listener that injects the schema'd tool: appended per request to final.system (per-request wire state, not agent prompt state). Tests assert the wire request (adapter.requests) instead of child.options; the bare-direct-dispatch test pins the no-system arm. - Tool guidance moved out of deployment prompts into per-tool prompt sections; the examples' workflow paragraph became a tool:<toolName> section contributed by dsh-tool-workflow (explicit-ask-only policy), and both example personas resolve to master's minimal identity+behavior form. tool-workflow gains inject: systemPrompt (+ peer dep, tsconfig ref); the export-shape guard updated. - The uniform-RFC-format gate: the dynamic-workflows RFC restructured to the implemented/ skeleton (bare Status line; Proposal -> Decision; What-was-rejected -> Alternatives considered; new Consequences), and the overall-run-timeout deferral is now recorded in the RFC's Deferred list. The doc-graphs atlas classification gains the workflows seam (workflow-vm implementation, tool-workflow consumer). Master's harness-identity section made "empty assembled prompt" states unreachable through the loop, so the instruction-append is a plain undefined-ternary and the structured tests assert append-not-replace. All snapshot goldens (including workflow-run) replay unchanged. Full local CI-equivalent gate sequence green on the merged tree.
@deepseek-ai/dsh-subagent-mock
A scripted SubagentProvider for testing the subagent seam without a model or a real child agent — the subagent analog of dsh-llm-replay.
It lets a test drive ctx.subagents and the model-facing dsh-tool-subagent through the real cordis Loader / export path, exercising provider registration, start-time capability validation, the run lifecycle (result / cancel / dispose), and the structured-output branch — all deterministically and keylessly.
Usage
Load it as a plugin (functional shape: name/inject/Config/apply, no default). Config (all optional):
| Key | Default | Meaning |
|---|---|---|
name |
mock |
Registry name to register the provider under. |
reply |
mock subagent reply |
The scripted child's final answer text. |
stopReason |
completed |
The stop reason result settles with. |
capabilities |
all true |
Which start-time capabilities (outputSchema/depthLimit/toolFilter) the provider advertises. |
inheritsParentContext |
false |
The context contract to declare; true exercises the fork-shaped tool wording in consumer tests. |
structured |
{ reply } |
Structured value surfaced when a request carries an outputSchema and the capability is on. |
A cancel() issued before result settles flips the stop reason to aborted, so the cancellation path is observable.