DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Trajectory Anchor — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
T

@dsh-ext/trajectory-anchor

Trajectory Anchor

Self-contained DeepSeek Harness bundle: first-round trajectory anchoring, EWMA trajectory scoring, adaptive drift rollback, anchorGate promotion gating, bootstrap context suppression, trajectory-log export, and Layer-4 training-data aggregation. Zero community-plugin dependencies.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:ggfgfgf-on/dsh-trajectory-anchor#890e8d58b46ec673d27c483176da9df8d101bd9e
READMECompatibilityVersions

Compatibility and provenance

Trajectory Anchor is published as @dsh-ext/trajectory-anchor and currently resolves to version 0.4.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
9/25/2026

Versions

0.4.0stable
9/25/2026

Related plugins

Loading related plugins…

Latest
0.4.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 1
Weekly downloads
0
Last push
9/25/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in models-usage.

Usage@linxin666/dsh-usageUsage statistics plugin for the dsh web GUI: per-provider balance and coding-plan quota detection plus a live token usage ledger, with a compact price glance card above the sidebar's Settings rowWhale Widgetdsh-whale-widgetDeepSeek balance whale widget in the bottom-right corner of the DSH Web interface: balance/today’s usage/peak-off-peak pricing, customizable bubble click sequence (text/balance/today/peak-off-peak/image/random phrases and parallel weighted selection), per-line styles and fonts, floating quick editinCost Meterdsh-cost-meterDeepSeek Harness session cost tracking plugin: current session cost, today’s charges, historical records, and official price synchronization; supports multi-provider and multi-model price-based billing (built-in catalog of 90+ model prices with automatic matching), quota lookup and display for mainsCommandcode Provider@mars-sea/dsh-commandcode-providerUnofficial DeepSeek Harness LLM provider plugin for Command Code, ported from pi-commandcode-provider (MIT). Registers the 'commandcode' provider route with a Models-page card and live model catalog.

README

dsh-trajectory-anchor

A self-contained DeepSeek Harness bundle: first-round trajectory anchoring, EWMA trajectory scoring, adaptive drift rollback, anchorGate promotion gating, bootstrap context suppression, trajectory-log export with process-reward annotation, and a Layer-4 training-data aggregator. Zero community-plugin dependencies — one line to mount.

Every mechanism in this bundle was validated live on this harness family as a dynamic-plugin prototype (iterations 1–3, eight test subagents, full trajectory audit retained). Runtime facts are cross-checked against community references (dsh-anchored-standard / context-gate / @argszero/cordis-plugin-preset-tool-filter / @a9i5k4/dsh-anchored-monitor / @max-null/dsh-allostasis / we-need-ds) in the table below.

Installation

From GitHub (recommended):

dsh plugin add github:ggfgfgf-on/dsh-trajectory-anchor

dsh plugin is a pnpm forwarder: after installing, it detects the package's dsh.bundle.patch declaration and joins it to the profile layer stack (dsh.profile.bundles) automatically — no manual configuration. This package has no prepare script, so no pnpm allowBuilds entry is required.

Local file: dependency (offline / development):

# in the profile's package.json dependencies add:
#   "@dsh-ext/trajectory-anchor": "file:<path-to-this-repo>"
pnpm install

# and append one row to the profile's cordis.patch.yml (or let the bundle patch merge it):
#   - insert:
#       - id: trajectory-anchor
#         name: '@dsh-ext/trajectory-anchor'

Restart DSH. The plugin mounts on the host plane: it adopts all live agents at startup (audit-only) and every new agent then goes through the anchor → gate promotion → continuous scoring lifecycle.

Lifecycle

agent/created
   │  restrict({ allow: visible bootstrap tools })     # probed against the agent scope
   │  complete persona("You are a helpful …")          # same-name override of the preset persona
   │  suppressRuntimeContext()                         # clear dynamic runtime-context
   ▼
request #1: bootstrap tools + Minimal persona (maxTokens uncapped by default)
   │  first tool/call → gate-armed
   ▼
gate wait: latest reasoning window looks minimal-like (contains "we", no "let me")
   │  fallbacks: maxBootstrapSteps=5 / promoteAfterFirstResponse
   ▼
promotion: lift restrictions + restore context + explicitly strip the maxTokens cap
   │  (the seed would otherwise inherit the previous header)
   ▼
steady state: EWMA trajectory scoring + hysteresis state machine + (optional) drift
   │  rollback + counterfactual candidate mining
   ▼
agent/disposed: RewardAnnotator process reward + trajectory JSONL final archive

Key configuration (cordis.patch.yml)

KeyDefaultMeaning
bootstrapTools[bash, str_replace_editor, pwsh]intersected with the tools the agent scope can actually see; on Windows the bash row is usually disabled
bootstrapMaxTokensnull (uncapped)opt-in: capping the first response below its real size truncates the opening plan and kills the turn (community issue #85, reproduced locally); when enabled, the cap is explicitly stripped on promotion (seed-inheritance trap)
gateEnabledtrueanchorGate promotion gating
maxBootstrapSteps5gate fallback
suppressContextOnBootstraptrueagent-scope context suppression during bootstrap
lexicon / ratioWeightsmonitor-calibratedweighted lexicon scoring (we/let's/we'll/"we need"/our vs "let me"; neutral i will/i'll/i need/check/verify)
specMax / reactMin0.2 / 0.5persona_ratio band boundaries (spec/mixed/react)
baselineMinSamples / rollbackPercentile10 / 25baseline-relative drift: rollback only fires when the current ratio's percentile within the session's own history is < 25
rollbackEnabledtruecalibrated rollback switch (safe to enable under baseline-relative semantics)
leanDenyPatterns61 entriesdrift-rollback deny set (* prefix wildcards)
rewardAnnotatordefaultLayer-4 process reward; pluggable extension point

Calibration findings (measured, important)

  1. The anchoring effect holds on this deployment's model (deepseek-v4-flash): with only pwsh plus the Minimal persona (uncapped), the first reasoning block of a fresh subagent is pure "we" (lexicon ratio 282–290, spec band) — no 1024 cap needed. Consistent with the community "Minimal schema at 256000 anchors 5/5" result.
  2. The 1024 first-round cap is a risk, not an anchoring requirement: truncating the opening plan makes the subagent die with zero tool calls (issue #85 reproduced locally), so it is off by default.
  3. Absolute bands do not detect drift: deepseek-v4's baseline style is let-me (react band), so the old binary scoring always flagged drift. After upgrading to lexicon + bands + session-own baseline percentiles, "drift" means degradation relative to the agent's own history (the ratio 290→1 drop after promotion is exactly that signal), and rollback no longer fires unconditionally.
  4. The runtime agent identifier field is id (not sessionId); trajectory files must live under the process-level workspaceRoot (the sandbox-policy-allowed area).
  5. Perception channels: internal/dispatch (unfiltered, fires before every dispatch) plus direct waterfalls (agent/request / agent/pre-step registered with prepend: true). Host-plane rows are reachable — verified live.

Community reference mapping

MechanismReference
explicit maxTokens strip after promotion, prepend registration disciplinedsh-anchored-standard shared/tool-bootstrap.mjs
pre-step filter await-next + claimed baseline + failure degradationdsh-anchored-standard shared/context-gate.mjs
restrict visible-surface pre-filter + run_code exclusion@argszero/cordis-plugin-preset-tool-filter
lexicon/band/percentile scoring, L1 hint wording, L2 re-anchoring payload@a9i5k4/dsh-anchored-monitor
recency-position bias correction + per-round throttling@max-null/dsh-allostasis
decision-round / execution-round decouplingwe-need-ds

Layer-4 training-data export

tools/export-layer4.mjs joins the trajectory JSONLs (event stream + process reward) with the DSH session logs (text) into step-level training samples — zero dependencies, Node ≥ 22 (node:zlib decodes zstd):

node tools\export-layer4.mjs `
  --logs-dir <workspaceRoot>\.dsh-trajectory-logs `
  --sessions-dir $env:USERPROFILE\.dsh\sessions `
  --out D:\datasets\layer4-1
  • Aggregate: assistant-message/tool-call events are aligned to session-log text by (turn, step); the nearest lexicon score is attached
  • Clean: closed agents only; main-session traces (anchor-session-* / summary.self) excluded; lifecycle marker lines dropped; grouped per session
  • Schema: {sessionId, model, turn, step, kind, messages, response, toolName, toolResult, reward{lexicon, sessionScore, scoreNorm, planner}, trajectory_features{…}, textComplete} — compatible with PRM (per-step process reward) and DPO/RLVR (pairwise sampling per sessionId)
  • Normalize: min-max normalization of session rewards (scoreNorm), positive/negative lexicon-polarity counts, band/liftReason/machineState buckets
  • Output: dataset.jsonl + stats.json (inclusion/exclusion list, text coverage, model distribution) + manifest.json

Verification

  • Per-agent trajectory audit: <workspaceRoot>/.dsh-trajectory-logs/anchor-<agentId>.jsonl
  • Live state: the anchor_status tool (globally registered, read-only)
  • Event-sequence assertion: adopted → anchored → context-suppressed → maxTokens-rewrite → gate-armed → lift(anchor-gate:minimal-like | max-steps) → context-restored → maxTokens-strip → score… → closed + record(incl. reward)

License

MIT.