design phase 8 t1 deepseek - sinrimin/harness-nexus GitHub Wiki
Status: implemented (branch
phase-8-t1-deepseek). Research:research-phase-8-t1-deepseek-harness.md(ground truth: dshv0.1.2-rc.1). Ground-truth update (#46, 2026-10-13): the integration moved to dsh 0.2.0-rc.2 with NO back-compat β the session-log reader, the event tap and the connect gate all target the latest line only; seedesign-phase-9-w7-native-sessions.mdΒ§ #46 addendum,design-phase-9-w7.1-dsh-event-tap.mdΒ§ #46 addendum, anddesign-dsh-client-version-gate.md. The install/scanner surfaces below (~/.dsh/skillsfrontmatter,cordis.patch.ymlinsert rows,@deepseek-ai/dsh-mcp-client, the ACP profile + settings.yaml route) were source-diffed 0.1.2-rc.1 β 0.2.0-rc.2 and verified UNCHANGED; the T1 ACP row (acp/adapters.ts) now carriesminVersion: '0.2.0-rc.2', which the daemon's version gate enforces before every spawn. Verification: CLI 26/26 (11 new adapter tests β frontmatter synthesis, per-profile managed-region replace-idempotence, long-slug cap, skipped kinds, outDir override), scanner cases ininventory.test.ts(bundlesβskill / flatβcommand split, platform vs local MCP origins, stdio + streamable-http collect), server 55/55 (incl. a NEWregistry-resilience.test.tsregression β see below), and smoke 283/283 with a[8 T1]block driving the REAL CLI dist: create profile βinstall --applyβ~/.dsh/skills/<slug>/SKILL.mdwith synthesized frontmatter + flat command skill + managedcordis.patch.ymlinsert row + ledger β reinstall is an idempotent overwrite of OUR marked region only.Out-of-band fix surfaced by the T1 smoke (committed with it): a stdio
autorow referencing a MISSING credential (the C3-import shape β env values redacted to${cred:KEY}before upload, import saves rows directly via the UnitOfWork) derives dial siteserver, andMcpRegistry.resolveTransportTHREW on stdio β crashing the fire-and-forget reload (unhandled rejection killed the process; the code comment even claimed it was "skipped rather than crashing the pool"). C5-era smokes never hit it only because no/api/mcp-serversmutation followed the import. Fix:serverDialedDefinitionsskips rows whose transport cannot resolve (warn log; Phase 2.2 "misconfigured upstreams never block the pool" rule), andconnectServeron such a row maps to409 not_dialable.Numbering: target onboarding becomes a T-wave inside Phase 8 β it lands on Phase 8 surfaces (C3 scanner, C4 deploy, C5 ACP row) plus the 3.x install pipeline; the roadmap's 3.8 "other agents" bucket is superseded by this wave (same absorption move as 3.6βC2). T1 was pulled ahead of all other pending target work (ECC/Superpower import, CC local-write fallback) by explicit priority decision. Supported-harnesses list (one-click install + ACP chat) after T1: Claude Code, Codex, DeepSeek Harness β user-facing docs mention only these three for now; existing adapters (hermes) keep working unlisted. Profile target range is otherwise unchanged (additive
deepseekonly). Parent: Phase 8 designdesign-phase-8-client.md; adapter template: the Codex adapter (8 C2).
Add deepseek as a first-class AgentTarget across the platform:
-
shared β
agentTargetSchema+='deepseek'(kept in sync withcore/domain/resource.ts, per the documented duplication rule);HOOK_SUPPORT['deepseek'] = null(hook bridges are opt-in packages β research Β§ Hooks);SCANNABLE_TARGETS+='deepseek'. -
core β
AgentTargetunion +='deepseek'. -
CLI install adapter (
install/adapters/deepseek.ts, registered inregistry.ts) β target root~/.dsh, home kind:-
skills β
~/.dsh/skills/<slug>/β¦bundle files (inline + inline-bundle), with frontmatter synthesis: dsh rejects SKILL.md without YAML frontmattername+description; the adapter guarantees both (slug from the resource name, description from the resource record), kebab-case per dsh's^[a-z0-9]+(?:-[a-z0-9]+)*$. -
commands β flat
~/.dsh/skills/<slug>.md(dsh's/nameinvocation surface IS the skill surface; frontmatter kept/synthesized, body unchanged β unlike Codex which strips it). -
mcp β a managed
- insert:block appended to the home-level~/.dsh/cordis.patch.yml: one@deepseek-ai/dsh-mcp-clientrow per profile,transport: stdio,command= the hnx executable,args = [mcp, serve, --profile <id>, --server <base>](HN_SERVERresolution identical to the Codex adapter). The block sits between# BEGIN/END harness-nexus (managed)markers β re-planning replaces the block wholesale (idempotent overwrite semantics, like Codex's TOML section surgery); user content outside markers is preserved byte-for-byte. - rule / sub_agent / hook entries β skipped with warnings (research table; same policy as Codex).
-
skills β
-
CLI inventory scanner (
inventory/scanners/deepseek.ts, added toSCANNERS) β scans~/.dsh/skills(bundles + flat files) and MCP rows from the home patch (tolerant text parse of- insert:rows whosename === '@deepseek-ai/dsh-mcp-client'; the parse handles the README field spellings, not arbitrary YAML β same tradeoff as the Codex TOML parser). Platform-origin detection reuses the ledger +harness-nexusserverName convention. Import: MCP items becomeMcpServerrows (stdio arm), skills/commands become resources β the C3 pipeline needs no target-specific changes. -
C5 ACP adapter row (
daemon/acp/adapters.ts) βdeepseek: ['dsh', '--profile', 'acp'](dsh on PATH; provider must be configured on the machine β documented prerequisite; env overrideHN_ACP_COMMAND_DEEPSEEK). -
server β
DEPLOYABLE_TARGETS+='deepseek'(it has a local-write adapter; remote deploy rides the unchanged C4 job pipeline). -
web β profile editor target list +=
deepseek; MachineDetail deploy filter +=deepseek; resource-editor target checkboxes follow the Codex precedent (Codex is not listed there today βdeepseekmatches it; only the profile surface changes). -
Tests + smoke β CLI unit tests for the adapter (skill frontmatter
synthesis, command emission, managed-block replace-idempotence, skipped
kinds,
outDiroverride) and scanner additions inpackages/cli/test/inventory.test.ts; smoke gains adeepseekinstall + inventory block mirroring the Codex one.
-
dsh plugin-package distribution (
dsh plugin --profile X add <pkg>/dsh.bundle.patchmanifests) β that path requires pnpm on the target machine and per-profile management; our local-write adapter achieves the same capability wiring through the home patch layer. Revisit only if dsh grows a marketplace surface worth emitting (like 3.5 did for Claude Code). -
Hook bridges (
dsh-hooks-claude-code) β opt-in packages; would need per-profile pnpm.HOOK_SUPPORTstaysnull; revisit if bridges ever ship in-box. -
Rulesβpersona writing β replacing a user's
system-promptpersona row from an installer is destructive; skipped. -
session/resumechat semantics β dsh ACP supports it; our v1 daemon contract is "no resume" and stays that way. -
DSH_HOME env plumbing through the daemon β the adapter resolves
~/.dshvia the standardhomeDirinput (same as every adapter); jobs can still override the whole root withpayload.directory.
- shared (enum + matrix + SCANNABLE_TARGETS) β core union β typecheck.
- CLI adapter + registry + warnings plumbing β unit tests.
- CLI scanner + registry β inventory tests.
- ACP row + server DEPLOYABLE_TARGETS + web pickers.
-
pnpm -r typecheck+ targeted builds +pnpm format. - smoke
[8 T1]block; full suites green. - Docs: research/design status flip, roadmap (T-wave + priority note),
AGENTS.md,
docs/README.md, README supported-harnesses list; merge to main.
- No secrets in any emission: the MCP row carries the hnx command line only; credentials resolve server-side at the outlet, exactly like the Codex row.
- The managed-block markers bound our writes; anything outside them is
untouched (and
hnx uninstallrestores pre-install snapshots from the ledger as always). - Frontmatter synthesis never copies more than name/description (resource-scoped fields) into the target home.