# DeepSeek Harness integration options Audit date: 2026-08-27 Audited DSH source: `deepseek-ai/deepseek-harness` commit `b150a551b8d465e31e418e1b2eaf5e79bbb7d28e`, package version `0.1.1-rc.2`. ## Confirmed extension points - A distributable plugin is a bundle declared by `package.json#dsh.bundle.patch`. `dsh plugin --profile add/remove` maintains a profile in `$DSH_HOME/profiles/`. - A browser contribution is declared by `package.json#dsh.client` and loaded from the package's `./client` export without rebuilding the DSH Web application. - The official MCP client accepts `stdio` and `streamable-http` configurations, uses argv arrays for stdio, and disposes transports and tool registrations through Cordis effects. - `SessionEventMap` is declaration-mergeable. `Session.append()` writes durable JSON events, and `session/event` is the persistence and UI observation stream. - The Web client exposes a session-scoped `conversation.view` slot. A plugin can add a tab for cassette status and interaction inspection. - The Host Web server exposes reversible exact and prefix HTTP route registration. ## Option A: core transport wrapper Replace or decorate the official MCP client's transport creation and observe requests and responses in-process. Advantages: - No wrapper process for stdio. - Direct live hit/miss callbacks and lower annotation latency. Costs and risks: - The official MCP package constructs SDK transports internally and does not publish a transport-provider registration point. - A wrapper must import internal source paths or replace the entire MCP client plugin, coupling this project to developer-preview implementation details. - Reimplementing reconnection, tool registration, namespace reservation, credential scrubbing, timeouts, and teardown would duplicate DSH behavior. This option is rejected for v0.1. ## Option B: CLI/profile adapter Generate a reversible profile overlay that keeps the official DSH MCP client row but changes its endpoint: - stdio record: `dsh-echo record -o -- ` - stdio replay: `dsh-echo replay ` - stdio passthrough: `dsh-echo replay --on-miss passthrough -- ` - HTTP: point the official MCP client at a loopback recording or replay proxy owned by the Host plugin. Advantages: - Reuses the complete upstream engine and DSH's official MCP lifecycle. - Replay cannot start the real server because replay argv contains no original command. - The generated overlay is inspectable, reversible, and testable without mutating a real profile. - DSH upgrades only require adapting documented MCP configuration fields. Costs and mitigations: - stdio has one wrapper process; DSH owns it as the configured MCP child, so unload still terminates the process tree. - Session annotations infer hit/miss from a separate, non-consuming cassette index rather than a private callback. Each annotation includes the matching fingerprint and structured near-miss diff. - HTTP rows must wait for the Host cassette service. The generated overlay adds an explicit injection dependency. This is the selected v0.1 option. ## Profile and data policy The adapter reads a source config, emits a separate overlay and recovery manifest, and never edits the source in place. It validates that every configured cassette and snapshot path resolves below the configured cassette root. API calls address cassette ids rather than filesystem paths. Default recordings live below `.dsh-echo/`, which is ignored by Git. A fixture export is a separate command that scans for secrets, refuses unsafe output, and prints the required human-review warning. Session logs store cassette id, relative path, mode, format version, redaction status, and compact hit/miss/diff metadata. Full arguments and results remain in the cassette and are fetched by the client only for the selected interaction.