polohot/dsh-adrian-inject-context0

dsh-adrian-inject-context

Inject Context for DeepSeek Harness (DSH): persist your own context entries and inject them as a standalone 'Remember:' row — right after the system prompt, before your message — per turn or once per session (per-entry 'Every turn' switch). Simple/Advanced datasets, native Settings editor, standalone manager page.

包名
dsh-adrian-inject-context
版本
0.3.0
最近更新
2026年9月6日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:polohot/dsh-adrian-inject-context

Usage

  1. Open Settings → Inject Context
  2. Add context entries; per row, two switches:
    • Enabled — off = never injected
    • Every turn (ticked by default) — ticked = injected before every message; unticked = only the first message of a session
  3. Pick the active tab (Simple/Advanced) — its dataset feeds the injection
  4. Send any message and check the Trajectory: your Remember: block sits between SYSTEM and your message

Per-entry frequency (v0.3.0)

EnabledEvery turnBehavior
offnever injected
ontickedinjected before every turn of every session (the default, and the migration default for existing entries)
onuntickedinjected only at the start of a session (its first turn), never again in that session

Once-per-session entries are restart-safe: a process restart never re-injects a once-entry into a session that already carries it. Prior injection is detected from the session's persisted sourced-message surface (the adrian-inject-context:lessons rows) plus in-memory per-session tracking while the process lives. Unticking an entry mid-session lets it appear on the next message exactly once more, then never again — per dataset, so Simple and Advanced stay fully independent.

Configuration

Store: ~/.dsh/adrian-inject-context.json (schema v2, auto-migrated from v1):

{
  "version": 2,
  "mode": "simple",
  "simple":   { "lessons": [{ "id": 1, "text": "…", "enabled": true, "everyTurn": true }] },
  "advanced": { "lessons": [] }
}

everyTurn was added in v0.3.0 without a schema bump — entries missing the field default to true (the previous every-turn behavior).