context-before-user
Manifest validdsh plugin: keep injected runtime context and skill context as user-role turns before the human request
dsh-context-before-user
Host-only DeepSeek Harness plugin that keeps injected user-role context ahead
of the current human turn. At the public agent/pre-step waterfall it awaits
the normal DSH injectors, then stable-partitions the entering messages:
The resulting provider-visible order is:
system: assembled system prompt
...conversation history...
user: runtime-context snapshot
user: workspace instructions and skill catalog/instructions
user: current human request
The partition uses trusted provenance: messages with source.kind === "user"
stay in their original order at the end, and all other step messages stay in
their original order before them. Skill catalogs remain durable user-role
context turns. The system prompt is neither copied nor wrapped in a
<system-reminder>; it remains solely in request/header.system and the
provider's system slot.
The plugin uses agent/pre-step because loop-built llm/stream requests are
deep-frozen. Reordering here remains model-visible and logged, preserving exact
request reconstruction.
Existing durable history is never rewritten. The plugin fixes newly entering step messages, so start a fresh session when validating the complete initial transcript order.
Install
dsh plugin --profile web add ./context-before-user
Restart the profile after installation.
Verify
npm test
For an end-to-end check, export a harmless test session and confirm that the runtime snapshot and skill catalog remain separate user-role messages before the actual human request, and that the assembled system prompt appears only in the request header/system slot.
Comments
Loading…
From the same category
by ranxianglei
基本稳定可用 100K tokens is enough. Universal context-compression proxy for ALL AI coding agents,10w上下文足矣
★ 814
↓ 423.4k/wk
MIT
TypeScript
Oct 11, 2026
dsh plugin --profile web add billion-contextby Han-1413141
DeepSeek Harness session cost meter plugin: session/daily cost, budget, history, OpenCode Go quota, official & custom-provider balance, Codex-like token heatmap, peak/off-peak pricing with pre-switch
★ 186
↓ 23k/wk
MIT
JavaScript
Aug 25, 2026
dsh plugin --profile web add dsh-cost-meterby Totoro-qaq
DeepSeek Harness plugin for previewable cross-preset session migration. Fixed-schema handoffs preserve state, source-model intent, and unresolved images; the original session stays untouched.
★ 129
MIT
JavaScript
Aug 25, 2026
dsh plugin --profile web add dsh-plugin-bridgeby aa2246740
Read-only Agent work-path observer for DeepSeek Harness
★ 116
MIT
JavaScript
Oct 8, 2026
dsh plugin --profile web add dsh-watcherby Nwflower
Import 14+ external agent chat histories (Claude Code, Codex, ChatGPT, Cursor, Gemini, Reasonix, opencode, ZCode, Grok Build, OpenClaw, Pi, Hermes, Kimi CLI, DSH) into DeepSeek Harness as resumable se
★ 105
MIT
JavaScript
Aug 25, 2026
dsh plugin --profile web add dsh-chat-importby Anionex
deepseek harness对话和代码状态回退插件 | DSH — rewind conversation and workspace state, powered by a persistent Change Ledger
★ 100
BSD-3-Clause
JavaScript
Aug 23, 2026
dsh plugin --profile web add @anionex/dsh-turn-rewind