Add DSH (DeepSeek Harness) as an instructions-only install target - #1608
Open
yangwuan55 wants to merge 1 commit into
Open
Add DSH (DeepSeek Harness) as an instructions-only install target#1608yangwuan55 wants to merge 1 commit into
yangwuan55 wants to merge 1 commit into
Conversation
DSH agents have no MCP client; they pick up plain-markdown instruction files every turn instead. The new `dsh` target therefore writes only the marker-fenced CodeGraph usage block — into `<project>/AGENTS.md` (local) or `$DSH_HOME/AGENTS.md` (global, defaulting to `~/.dsh/AGENTS.md`) — and no MCP server config. The agent drives the `codegraph` CLI via its shell tool, which prints the same output as the MCP tools; this is exactly the non-MCP-harness audience the instructions block was reintroduced for in colbymchenry#704. Details: - `AgentTarget` grows an optional `requiresRestart` flag (default true, all existing targets unchanged). DSH sets false because running sessions re-digest their instructions file each turn, so the install/uninstall summaries say "no restart needed" instead of asking for a pointless restart. - Uninstall strips only the marker block and preserves surrounding user content; a block-only AGENTS.md is removed entirely, matching shared semantics. - `setHome()` in the target tests now clears `$DSH_HOME` at setup, not just at restore — an ambient value would leak the real `~/.dsh` into every otherwise-isolated test. - README badges/lists, CLI help text, and a CHANGELOG entry. Verified: full installer-target contract suite passes for dsh at both locations (install/idempotency/uninstall/printConfig), plus dedicated tests for $DSH_HOME override, sibling-content preservation, and the no-MCP printConfig; tsc --noEmit clean; end-to-end sandbox run of `codegraph install -y -t dsh` / `uninstall` round-trips both locations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
dshas a new installer target for DSH (DeepSeek Harness), alongside claude / cursor / codex / opencode / hermes / gemini / antigravity / kiro / copilot-*.codegraph install -t dsh # or pick DSH in the interactive promptDSH agents have no MCP client. Instead they ingest plain-markdown instruction files and re-digest them every turn:
<project-root>/AGENTS.md$DSH_HOME/AGENTS.md(defaults to~/.dsh/AGENTS.md)So this target is instructions-only: it writes the existing marker-fenced CodeGraph usage block (
instructions-template.ts) and nothing else — no MCP server config anywhere. The agent drivescodegraph explore/ other subcommands through its shell tool, which prints the same output as the MCP tools. That is precisely the "non-MCP harness" audience the instructions block was reintroduced for in #704.Why a new interface knob
AgentTargetgrows one optional field:DSH sets it to
falsebecause running sessions re-read their instructions file each turn — so the install/uninstall summaries now say "no restart needed" when every touched target is restart-free, instead of asking users to restart for nothing. Every existing target keeps today's behavior.Details
src/installer/targets/dsh.ts+ registry entry +'dsh'in theTargetIdunion; nothing else about the target system changes.removeMarkedSectionsemantics.setHome()now clears$DSH_HOMEat setup, not only at restore — otherwise an ambient value leaks the real~/.dshinto every supposedly-isolated test.Verification
RUN v2.1.9 /private/tmp/codegraph-pr
✓ tests/installer.test.ts (3 tests) 4ms
✓ tests/installer-targets.test.ts (244 tests | 3 skipped) 314ms
Test Files 2 passed (2)
Tests 244 passed | 3 skipped (247)
Start at 15:15:05
Duration 672ms (transform 159ms, setup 0ms, collect 245ms, tests 319ms, environment 0ms, prepare 114ms) → 244 passed, 3 skipped (pre-existing skips), including the generic per-target contract suite exercising at both locations (install / idempotency / uninstall-reverses / printConfig-no-writes), plus dedicated tests: override, sibling-content preservation across install/uninstall, no-MCP printConfig.
Happy to adjust naming () or scope — e.g. splitting the orchestrator message tweak into its own PR if reviewers prefer.
EOF
)