Preface¶
DeepSeek Harness (DSH) provides a plugin-based architecture for context management. Jev-LCM Compaction is an experimental DSH plugin designed to address the issues identified in Hermes agent PR #116246 with standalone Jev compaction: relying solely on Jev compaction can omit assistant text identifiers, saturate the state budget, and cause an increasingly large text floor in long-running sessions. This plugin places Jev ranking before lossless context compression, preserves raw evidence through a local SQLite archive, and provides a calibration mechanism to optimize the retention rate.
Core Features¶
The plugin adds a Jev ranking layer before DSH’s native compression flow, with the following capabilities:
- Raw Data Archiving: Before Jev scoring, the raw material is first ingested into a local SQLite archive. The local SQLite archive owns the raw evidence, and Jev does not rewrite the raw rows.
- Intelligent Scoring and Anchor Extraction: It scores matched tool-result pairs and selected assistant text anchors. It uses rolling retention-rate quantiles (instead of the default 0.5) for calibration and batches the scored results.
- Overflow Handling: When the state cap is exceeded, overflow candidates are marked as
jev_unscoredrather than being assigned fabricated scores. - Multi-provider Support: It supports Cloudflare Clef as the provider surface and supports
TYPESAFE_API_KEYandOPENROUTER_API_KEY. - Session Tool Exposure: Within a session, it exposes the following tools for debugging and management:
lcm_grep,lcm_expand,lcm_nodes,jev_stats,jev_providers,jev_scores,jev_anchors, andjev_calibrate.
Installation and Build¶
DeepSeek Harness is developer preview software. Before installing the plugin, it is recommended to verify the CLI and configuration file first. Installation requires Node.js >= 22.19.0.
git clone https://github.com/bojansandhaus/jev-lcm-dsh-compaction.git
cd jev-lcm-dsh-compaction
npm install
npm run build
npm test
npm pack
Typical Usage¶
The plugin provides session-scoped tools for querying state and configuring providers.
Provider Fallback¶
The configuration supports automatic fallback across multiple providers. For example, when encountering 429 errors, the provider can be switched to another:
jev_provider_fallback from=typesafe to=openrouter reason=429
Provider Validation¶
Before using real data, it is recommended to validate the provider endpoint. For example, the OpenRouter adapter currently targets the /alpha/decisions path.
Limitations and Notes¶
This plugin is an experimental DSH plugin package. It does not claim live provider operational success or production parity.
- Data Ownership: The local SQLite archive owns the raw evidence, and Jev does not modify the raw rows.
- Architecture Differences: The DSH archive does not claim to be equivalent to the Hermes LCM SQLite DAG.
- Production Use: Production parity, host-level recall, prompt acceptance, and live cache impact have not been validated.
- Registry Publication: Publishing to a registry does not imply that the installation has been updated.
- Development Environment: DeepSeek Harness is still in developer preview.
Summary¶
By introducing a SQLite archive and a calibrated Jev ranking layer, the Jev-LCM Compaction plugin provides DSH with a solution for context compression while preserving raw evidence losslessly. Through batching, anchor extraction, and overflow marking, it mitigates state budget saturation and is suitable for use in development debugging or experimental scenarios.