dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
把你保存的上下文条目以「Remember」行的形式注入到每条用户消息之后,可按轮或按会话一次;带设置编辑器与管理页。
Inject Context for DeepSeek Harness (DSH): persist your own context entries and have them injected as a standalone Remember: row — right after your message — on every turn or once per session, per entry.
/adrian-inject-contextSettings → Inject Context — manage your datasets

Remember: row in the Trajectory

dsh plugin --profile web add polohot/dsh-adrian-inject-context
Remember: block (order: SYSTEM → your message → Remember:)| Enabled | Every turn | Behavior |
|---|---|---|
| off | — | never injected |
| on | ticked | injected right after every message of every session (the default, and the migration default for existing entries) |
| on | unticked | injected 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.
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).
dsh ≥ 0.2.0-rc.2 (tested on the web profile)dsh 0.1.x — see Session format v4 belowHost-side: an agent/pre-step waterfall listener composes the block per step — all enabled every-turn entries plus enabled once-entries not yet delivered to that session — and splices the plugin's own independently-sourced user-role message right after the turn's user message (the same pattern as dsh-agent-instructions), freshly read from the store on every step. It never injects into an empty entering batch (the agent loop's turn-close signal). Client-side: a settings-section module renders the manager against two host routes. Zero system-prompt modification.
DSH 0.2.0 ships Session format v4, which retired the catch-all
{ kind: 'plugin', plugin: '…' } message source. That kind is now refused at
admission: emitting it raises SessionFormatError and aborts the whole turn
with format v4 message requires a producer-owned source kind.
This plugin emits the v4 producer-owned form of its own identity:
source: { kind: 'plugin:adrian-inject-context:lessons' }
That is the same kind the shipped v3→v4 migration derives for a third-party plugin, so live rows and rows migrated from older sessions share one identity and the once-per-session surface scan recognises both.
The row's position is decided by a positive test — a user-role row counts as
the turn's message only when source.kind === 'user'. Every other producer (the
runtime-context snapshot, agent instructions, tool and model rows) declares its
own kind and is skipped. v0.3.2 blocklisted the kinds it knew about, so the
runtime-context snapshot was mistaken for the user message and the row landed
after the snapshot instead of after the message it answers.
MIT