randerous/dsh-turn-meta
Opt-in per-step turn metadata for DeepSeek Harness — a minimal first-plugin template (dsh-plugin)
Opt-in per-step turn metadata for DeepSeek Harness: each entering agent step appends one compact, source-attributed header naming the session, the current turn and step, how many real user messages and tool results belong to the open turn, and how many turns preceded it — [turn-meta] session=<id> turn=<turn> step=<step> user_msgs=<a> tool_results=<b> prior_turns=<p>. The README also presents the package as a minimal first-plugin template: it exercises the same seams every Harness plugin uses with the smallest possible surface — a named-export function plugin (name / inject / Config / apply), schemastery-validated config, a single ctx.on('agent/pre-step', …) hook with { prepend: true }, and a ./invariant companion that owns the durable message shape.
Install
⚠️ Install command not yet confirmed — check the README on GitHub for the exact command.
Compatibility
DeepSeek Harness with a profile patch layer (cordis.patch.yml overlay or --patch). The plugin is also documented as an in-repo package at packages/context/turn-meta. The README's smoke test needs Node ≥ 23 (type stripping) and requires @deepseek-ai/{cordis,dsh-agent,dsh-llm,dsh-session,schemastery} resolvable from the package's node_modules.
Details
- Repo: randerous/dsh-turn-meta
- Category: Files & Data
- Stars: 1
- Version: Opt-in cordis.patch.yml overlay (README's documented form; the @deepseek-ai/dsh-turn-meta name is not published — 404 checked 2026-09-13)
- Last push: 2026-08-13
- First seen: 2026-08-13
Recent updates
The README documents the header format, the config keys, the template role and a verification-status section rather than a versioned changelog: the runtime smoke against an installed dsh distribution passes 6/6 assertions (injection, exact header text, disabled config, invalid-config load failure, disposal, proposed-message counting), while the monorepo CI gates are reported as expected-to-pass but not run externally. Verify the current install instructions in the repository before installing.
FAQ
- How do I install dsh-turn-meta?
- It is opt-in: add the documented insert row (id: turn-meta, name: '@deepseek-ai/dsh-turn-meta', config.enabled: true) to a cordis.patch.yml overlay or pass it as --patch. No dsh plugin add command is published.
- What does the injected header look like?
- [turn-meta] session=<id> turn=<turn> step=<step> user_msgs=<a> tool_results=<b> prior_turns=<p> — prepended once per entering agent step.
- Is it also a template for writing plugins?
- Yes — the README describes it as a minimal first-plugin template: named-export function plugin with name/inject/Config/apply, schemastery config, one agent/pre-step hook, and an ./invariant companion for the durable message shape.
Alternatives
LeemanCheung/dsh-token-usage · xiufengsun/TokenTracker · vlln/dsh-task-status