YunongDai2005/dsh-theone ↗★ 0

dsh-theone

Automatic context routing for DeepSeek Harness 适合多主题长期对话,通过上下文路由与按使用频率保留摘要来管理历史内容。

Package
dsh-theone
Compatibility
Unverified
Harness peer range
0.2.0-rc.2
Cordis peer range
4.0.4
Version
0.3.5
Last updated
Oct 1, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:YunongDai2005/dsh-theone

Entry context and usage-based compression

The entry reports the backing model's context window and default output allowance from DSH, including adapter configuration overrides. It does not set a separate fixed context capacity. DSH still chooses when to compact, which old region to replace, and how much recent conversation to retain; its normal capacity thresholds remain in use.

When DSH compacts through the TheOne provider, the plugin creates a bounded reference checkpoint from the topic catalog and completed routing calls:

  • Hot: the current topic, a topic used in the past day, or a topic used in the past seven days with at least three successful calls in the past 30 days. Retain a longer summary and up to three recent user/reply pairs when space permits.
  • Warm: another topic used in the past 30 days. Retain a shorter summary and up to one recent pair.
  • Cold: older topics or topics without recorded TheOne usage. Keep a short summary and state; omit their dialogue excerpts. A resumed topic becomes current and receives priority again.

Only successful calls heat a topic. Failed requests and clarification do not increase its frequency. Usage survives entry reconstruction. Checkpoints are redacted, bounded by the model capacity and the compaction output allowance, and can be compacted again without multiplying retained excerpts. Compression makes no additional model call and never runs a worker or a tool. Original DSH logs, source ranges, topic summaries, and working sessions remain available for history retrieval.

This changes the gateway checkpoint, not workers' ordinary DSH compaction. It activates when DSH compacts; age alone does not start a background compression job. An explicitly configured separate DSH summarization provider uses that provider's summary policy instead.

Optional configuration

A normal installation needs none of these variables.

VariablePurpose / default
THEONE_HISTORY_CATALOGEnabled by default; false stops background indexing
THEONE_DATABASE_PATHOverride the catalog database path
THEONE_CONTEXTS_PATHManual catalog JSON; omitted means an initially empty catalog
THEONE_GATEWAY_KEYGateway identifier; default
THEONE_ROUTER_MODEllm (default) or rules
THEONE_ROUTER_TRANSPORTdsh (default); legacy uses the earlier direct DeepSeek integration
THEONE_WORKER_PROVIDER / THEONE_WORKER_MODELFixed model override; set both together. Otherwise follows DSH selection

Only THEONE_ROUTER_TRANSPORT=legacy uses THEONE_ROUTER_API_KEY, THEONE_ROUTER_BASE_URL, and THEONE_ROUTER_MODEL. The default integration does not read that key.

A manual catalog contains ContextDescriptor[]: id / title / summary / entities / keywords / lastState. Entries are inserted only on first initialization. Workers cannot use the theone provider.