# DeepSeek Harness adapter This directory is the DeepSeek Harness adapter for Context Continuity. It uses the same ledger, state model, recovery rules, and privacy limits as the Codex plugin. It is not a fork. ## Requirements - DeepSeek Harness `0.1.1-rc.2` - Node.js 20 or newer - `pnpm`, which the current DSH plugin manager uses for plugin packages DeepSeek Harness is still a developer preview. Pin the compatible version rather than assuming later release candidates have the same plugin contract. ## Install from GitHub `` is one runnable composition under `$DSH_HOME/profiles/`. Use an existing profile or a dedicated preview name. Per the [official profile/plugin guide](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/develop/basic/publish.md), the first `dsh plugin --profile add ...` call initializes that profile. This CLI profile-add path remains an explicit release limitation below; do not use a production profile for the preview smoke test. ```sh dsh plugin --profile add github:rrrrrredy/context-continuity#v0.2.0-beta.2 dsh --profile --dump-config ``` The dump must contain a layer/service whose `id` and `name` are both `context-continuity`. Start the installed profile with: ```sh dsh --profile ``` If the layer is absent, stop: the adapter is not active. Restart that DSH profile after installation. The bundle patch inserts the `context-continuity` service into the profile. No separate configuration is required for the default local data directory. ## What it does - observes bounded user-input provenance without copying the transcript; - queues a minimal ledger snapshot when `compaction/start` is observed; - marks a successful boundary only after `compaction/end`; - injects a bounded recovery projection through the awaited `agent/pre-step` waterfall; - rechecks resume and parent/child handoff candidates; - always makes the old `next_action` stale across a lossy boundary. Context Continuity does not bundle Execution Fidelity Guard. There is no live bridge. This adapter targets Harness `0.1.1-rc.2`; the separate Guard DSH adapter targets `0.1.2-alpha.2`. Do not assume they form one integrated profile. The adapter exposes the same eight bounded state tools as the Codex MCP surface. Task and session identity, working directory, and user-authority source events are bound by the host adapter and are not writable tool arguments. Users can speak normally: - “Show the current continuity state.” - “Protect the current objective and constraints.” - “This recovered item is wrong; replace it with …” - “Export a minimal handoff.” - “Delete this task's continuity state.” ## Data and failure behavior By default, state is stored under: ```text $DSH_HOME/plugin-data/context-continuity/v1 ``` `CONTEXT_CONTINUITY_DATA_DIR` can override this for isolated tests or managed deployments. The adapter does not append private custom events to the DSH session log and does not copy the session transcript. If the adapter fails or times out, DSH continues. Continuity protection for that boundary must then be treated as unavailable. ## Upgrade or remove Upgrade to `` while preserving the local ledger: ```sh dsh plugin --profile remove context-continuity dsh plugin --profile add github:rrrrrredy/context-continuity# ``` To remove the adapter without deleting its ledger: ```sh dsh plugin --profile remove context-continuity ``` Removal does not silently delete task ledgers. For complete deletion, first ask the running adapter to delete the current task, send its exact second confirmation, and verify that the task state is gone. Only if the adapter cannot run should manual directory handling be considered. The command below prints a default candidate, not a guaranteed runtime-resolved directory. Verify `CONTEXT_CONTINUITY_DATA_DIR`, `DSH_HOME`, the profile process environment, and installed configuration before deleting anything: ```sh printf '%s\n' "${DSH_HOME:-$HOME/.dsh}/plugin-data/context-continuity/v1" ``` On Windows PowerShell: ```powershell $ccDshRoot = if ($env:DSH_HOME) { $env:DSH_HOME } else { Join-Path $HOME ".dsh" } Join-Path $ccDshRoot "plugin-data\context-continuity\v1" ``` ## Verified boundary The repository test suite runs against the published `0.1.1-rc.2` Cordis, AgentRegistry, Session, SystemPrompt, and ToolRuntime APIs. It exercises native tool confirmation, validated compaction events, and the real pre-step waterfall. The release also packs and installs the distributable in an isolated consumer. The full DSH CLI profile-add flow and an automatic compaction generated by the DSH engine have not yet been exercised in the local release environment. Those limits are recorded in the release receipt instead of being inferred from fixtures. The bundle and profile commands follow the [official DeepSeek Harness plugin packaging guide](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/develop/basic/publish.md). Git installation executes package code under the profile package manager, so review the source and pin the release tag before installation.