Skip to main content

odai/dsh/plugin

93Stars16Forks0Issues1Watchers

Injects Odai governance core into the specified DSH profile, overriding all agent presets; automatically chooses between using the current model, upgrading in-place, or delegating to a sub-agent based on task complexity, with built-in output style, compressed summary, skill source, and long-term memory.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
JavaScript
License
MIT
Branch
main
agent-skillsagentic-workflowai-agentai-agentsai-governanceclaude-codecodexdsh

Install

cmdweb profile
$ dsh plugin --profile web add odai-dsh-plugin

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin orziz/odai/dsh/plugin for me: review the repository at https://github.com/orziz/odai first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Description

odai-dsh-plugin is a bundle that provides a global governance kernel for a certain DeepSeek Harness profile. After installation, all agent presets under that profile will automatically switch between the current model, in-place upgrades, and outsourced sub-agents based on task complexity, with built-in output style, compaction summary, skill source, and local persistence of long-term memory.

Core Capabilities

  • Embed persistent governance prompts in each agent preset's system prompt, allowing the model to silently judge based on "fact|method|result|boundary" before acting on each request
  • Automatically decide whether to stay at the current controller for direct execution, upgrade in-place to a higher responsibility in the same round, or delegate to an independent sub-agent based on task complexity, clarity, risk, and domain gaps
  • Maintain configurable responsibility model mappings (researcher / planner / executor / reviewer / frontend), naming providers and models in natural language, then persisting to local JSON for the next round to take effect
  • Persist output forms (normal / soft-compacted / economy), compaction summary models, skill sources (bundled / auto / user), and local semantic memory, all written under $DSH_HOME/odai/, and not automatically cleaned up on package uninstall
  • Expose tools like odai_routing_config, odai_route_card, odai_output_config, odai_compaction_config, odai_memory for the controller to directly read/write its governance state without modifying host files
  • Provide a controlled skill self-evolution overlay, allowing users to precisely replace governance markdown with one-time phrases; each replacement leaves base/result generational records and lineage, with destructive changes requiring a separate authorization phrase

Technical Implementation

  • Language: JavaScript (Node.js ESM .mjs), no build step
  • Key Dependencies: @deepseek-ai/dsh (peerDependency, DSH host; declared as optional), node:crypto node:fs node:path node:os node:url and other built-in modules
  • Architecture Pattern: Registers a plugin named odai-governance to the host via DSH's Cordis patch bundle (dsh/plugin/cordis.patch.yml:1-7), with injection points at systemPrompt / tools / subagents / sessions / llm (dsh/runtime/src/index.mjs:145-146); performs governance, routing, sub-agent boundaries, and evidence storage on multiple DSH hooks at runtime
  • Entry File: dsh/runtime/src/index.mjs (both main and exports in package.json:16 point to this file; dsh/plugin/cordis.patch.yml also references it via bundle)

Use Cases

Suitable for teams or heavy individual users who want all agent presets under a DSH profile to automatically follow governance rules of "differentiate by complexity for direct execution, planning, execution, and acceptance" without configuring each preset individually. If you only want to use Odai for one agent preset, please use odai-dsh-agent instead; do not install both Plugin and Agent simultaneously.

Prerequisites & Compatibility

DependencyMinimum VersionDescription
DSH0.1.0-rc.7 or 0.1.0-rc.80.2.5 no longer supports rc.6 (dsh/plugin/package.json:64)
Node.js>=22.15.0Historical Zstandard session migration depends on native API from this Node version (dsh/plugin/package.json:72)
PlatformmacOS / Windows / LinuxOnly depends on Node built-in modules, no native extensions; tests cover Windows, Linux, and macOS (dsh/plugin/tests/package.test.mjs:35-42)
Native ModulesNoneOnly uses built-in capabilities like node:crypto node:fs node:path node:os node:url node:zlib

Installation

dsh plugin --profile web add github:orziz/odai/dsh/plugin

Configuration Options

ConfigTypeDescriptionDefault
routing.modeEnumRouting master switch: off disables routing but keeps governance; observe only records without moving models; auto auto-routes by complexity; execute keeps experimental delegation behaviorauto
routing.providerStringProvider name for delegated sub-agentsspawn
routing.maxInputCharsIntegerInput text upper limit for routing decisions, minimum 25612000
routing.roles.{researcher,planner,executor,reviewer,frontend}ObjectEach responsibility role's provider / model / reasoningEffort / maxTokens configNot configured
routing.configPathPathRouting config JSON file location$DSH_HOME/odai/routing.json
governance.additionalDeniedToolsString ArrayAdditional tool names prohibited for sub-agents[]
governance.skillSourceEnumSkill source: bundled always uses package built-in; auto prioritizes project/custom/user-level; user only looks at user-levelbundled
governance.skillConfigPathPathSkill source config JSON location$DSH_HOME/odai/source.json
governance.evolutionRootPathStorage root for user-controlled skill self-evolution$DSH_HOME/odai/skill-evolution
output.configPathPathOutput style strategy JSON location$DSH_HOME/odai/output.json
compaction.cacheRetentionEnumCompaction cache retention strategy: provider-default / short / long / noneprovider-default (can be overridden by ODAI_COMPACTION_CACHE_RETENTION env var)
compaction.configPathPathCompaction model config JSON location$DSH_HOME/odai/compaction.json
memory.modeEnumLong-term memory switch: auto auto-captures high-confidence entries; off disablesauto
memory.storePathPathLong-term memory JSON file location$DSH_HOME/odai/memory/store.json
memory.maxRetrievedIntegerMaximum entries retrieved per recall, 1 to 126
skillPathStringForce use of skill package from specified path; can be overridden by ODAI_SKILL_PATH env varNot set

FAQ

Q: Does DSH session need to be restarted after installation to take effect?

A: Yes. Plugin is a profile-level bundle; after installation or upgrade, you must first stop the DSH process, restart, and open a new session with the corresponding profile to load the new governance; running sessions will still behave as before installation.

Q: Will every simple question be slowed down by the process after installation?

A: No. Default routing.mode=auto leaves tasks with clear results, actions, and authorization and low risk directly at the current controller; only when complexity, ambiguity, risk, or domain gaps appear does it upgrade to planning, execution, acceptance, or outsourced sub-agents.

Q: Do I need to manually specify models for planning or execution?

A: Not required. Plugin won't arbitrarily choose other models when the host's default model is sufficient; when users explicitly say in natural language "use provider-x/model-y for planning, reasoning level high", the controller calls odai_routing_config to persist to $DSH_HOME/odai/routing.json, taking effect from the next user turn.

Q: What states get written to local storage?

A: Routing mappings, output styles, compaction models, skill sources, skill self-evolution, long-term memory, and personal safety continuity records are written respectively to routing.json, output.json, compaction.json, source.json, skill-evolution/, memory/store.json, and human-safety-continuity.json under $DSH_HOME/odai/. Plugin and Agent share this directory; installation, update, repair, and uninstall do not automatically clean it up.

Q: What is the relationship with odai-dsh-agent? Do I need to install both?

A: Plugin is a profile-level bundle covering all agent presets under that profile; Agent is a separate form that selects Odai preset per session. Under normal circumstances, installing both is redundant; they are only installed together when "profile-scoped Plugin + separate Odai agent preset" coexistence is needed.

Q: Do I need to stop DSH before upgrading or uninstalling?

A: Yes. The odai-dsh-plugin repair-sessions subcommand actively checks whether DSH process is still running; local process check failure or active DSH detection directly refuses to write. When upgrading from old versions (≤0.0.4), you must also first run npx odai-dsh-plugin repair-sessions --yes to add ignorable markers to private odai/* events in historical sessions.

Q: Is the economy mode output limit a hard limit?

A: Not a local hard billing boundary. That limit is just the output token request value sent to the provider; the provider may count hidden reasoning into it, exceed it, or ignore it; actual cost and compliance should be evaluated based on per-request usage.

Difficulty Level

Advanced — Works out of the box after default installation, but the five mechanisms of routing roles, compaction models, skill sources, long-term memory, and output style are each independently configured; fine-grained control requires understanding their respective local JSONs and corresponding tools.

Known Issues & Limitations

  • Only supports DSH 0.1.0-rc.7 and 0.1.0-rc.8; 0.2.5 is not compatible with rc.6; subsequent DSH rc.9+ will be fail-closed and refused loading before a dedicated release version (dsh/plugin/README.md:170)
  • After explicitly configuring governance.skillConfigPath or env var ODAI_SKILL_PATH, DSH must be restarted to take effect; DSH process has loaded bundled skill bytes into memory at startup, and file changes during runtime won't take effect immediately (dsh/plugin/README.md:61 / 75)
  • Upgrading from ≤0.0.4 old versions must first stop DSH and run repair-sessions; otherwise private odai/* events in historical sessions will cause new DSH to refuse loading; that subcommand also refuses to execute when an active DSH process exists (dsh/plugin/README.md:45-51)
  • Economy mode maxTokens does not affect sub-agent, compaction summary, checkpoint, and other internal budgets; providers may still exceed that value, and if the controller's upper limit is already lower than the user-set value, it won't relax it (dsh/plugin/README.md:87-89)
  • Economy mode doesn't invent non-default token counts; uses 500 when user doesn't provide a specific value; plugin won't automatically select other values (dsh/plugin/README.md:85)
  • Provider cache is best-effort: even identical requests may miss due to upstream writes, expiration, or routing; lowering controller upper limit is not an effective cache fix, and may instead cause incomplete checkpoints (dsh/plugin/README.md:168)

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/orziz/odai/dsh/plugin)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory