DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Cybernetics — DeepSeek Harness 插件(DSH Plugin)
← Plugins
C

dsh-cybernetics

Cybernetics

DSH 插件 dsh-cybernetics

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:boomzikazita/dsh-cybernetics#966824a8a96f08cb2cf0d0f3d00ffc8067d36a21
README兼容性版本

说明

DSH 插件 dsh-cybernetics

兼容性与来源证明

Cybernetics 以 dsh-cybernetics 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/8/20

版本

0.1.0stable
2026/8/20
最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

README

dsh-cybernetics

A cybernetic control kernel runtime for DeepSeek Harness (DSH). It wraps an agent session in a classical closed-loop control system — observer, feedforward controller, feedback correction, and actuators — so the harness can watch its own tool-call behavior, detect instability (divergence, oscillation, redundant calls, tool-stuck loops), and adapt its own operating mode in real time.

Implemented as a Cordis plugin (pure ESM) and informed by classical engineering cybernetics (Engineering Cybernetics, Tsien Hsue-shen & Song Jian, 3rd ed.).

中文简介:dsh-cybernetics 是一个面向 DeepSeek Harness 的「控制论内核」运行时插件,用经典控制回路(观测器 / 前馈控制 / 反馈校正 / 执行器)让智能体自我观测、自我诊断并自适应调节运行档位。源码注释含中文,功能文档以英文为准。

Features

  • Observer — per-session in-memory state plus JSONL persistence (~/.dsh/cybernetics/state_log.ndjson); pHat and the current mode survive restarts via boot-time log replay.
  • Feedforward control — tools/pre-execute rule table with tool-name whitelists and argument regexes. Destructive commands are routed through an approval gate (dry-run+confirm); flaky network commands are logged and warned (retry+timeout).
  • Feedback correction — tools/result events feed a delta signal (0 = success, 1 = failure) through an EMA filter that estimates the failure rate pHat; a hysteresis control law then adapts the operating mode (fast → deep → conservative).
  • Instability detection — divergence (consecutive failures), oscillation (high 0/1 flip rate), redundant calls (parameter-text hash), low tool-distribution entropy (loop / tunnel-vision signal), slow-tool TOP3, and observation completeness.
  • Health score — 0–100 synthesized from success rate, observation completeness, redundancy, divergence, and oscillation.
  • Controllability self-check — given a goal and its required tools, compare against the available tool set (plugin tools ∪ observed host tools) and return controllable / not-controllable with advice.
  • Sandbox mode actuator — switch the session's file-sandbox mode at runtime (read-only / workspace-write / danger-full-access).

Provided tools

ToolDescription
cybernetics_snapWrite the current kernel state (in-memory state + feedforward rule summary + mode) to the state log and return a summary. mode temporarily switches mode (fast/deep/conservative; auto-reverts to adaptive after 60 s).
cybernetics_statusRead the last N state-log entries and summarize: tool call counts, delta mean, pHat, mode, divergence/oscillation, redundant calls, entropy, observation rate, health score.
cybernetics_checkControllability self-check: goal + required tools vs currently available tools → missing / controllable / advice.
cybernetics_sandbox_modeSwitch the current session's file sandbox mode (read-only / workspace-write / danger-full-access); runs only after explicit user confirmation.

Installation

dsh plugin --profile web add github:boomzikazita/dsh-cybernetics

Or install from a local bundle directory:

dsh plugin --profile web add /path/to/dsh-cybernetics

Important: the plugin's node_modules must be symlinked to the global DSH host (ln -s $DSH_NODE_MODULES node_modules). Do not install its dependencies yourself (e.g. with pnpm) — a second copy of @deepseek-ai/dsh-tools breaks the module-level TOOL_RUNTIME_SCHEDULER symbol and crashes all tool scheduling.

Configuration

The bundle ships its own default patch (cordis.patch.yml). To customize, override the plugin entry in your profile:

# append to ~/.dsh/profiles/web/cordis.patch.yml (or headless)
- insert:
    - id: cybernetics
      name: 'dsh-cybernetics'
      config:
        stateLog: '~/.dsh/cybernetics/state_log.ndjson'
        feedforward:
          - id: 'network-unstable'
            tools: ['bash']
            pattern: '\\b(git|npm|curl|wget|pnpm)\\b'
            action: { strategy: 'retry+timeout', retry: 2, timeout: 30000 }
          - id: 'irreversible-write'
            tools: ['bash']
            pattern: '\\b(rm|mv|rmdir|shred)\\b|git (push|reset --hard|clean)'
            action: { strategy: 'dry-run+confirm', dryRun: true, confirm: true }
        stability:
          maxToolCallsPerTurn: 5
        modes:
          fast: { label: '快速响应', zeta: 0.3 }
          deep: { label: '深度分析', zeta: 0.7 }
          conservative: { label: '保守稳定', zeta: 1.2 }

Control parameters (all configurable under control)

ParameterDefaultMeaning
alpha0.2EMA smoothing coefficient
escalateAt / deescalateAt0.6 / 0.15pHat thresholds for mode up-shift / down-shift
deescalateStreak5consecutive low-pHat runs required to down-shift (hysteresis)
divergenceStreak3consecutive failures to flag divergence
oscillationWindow / oscillationRatio10 / 0.7oscillation detection window / flip ratio
redundantWindow20redundancy / entropy window
entropyWarnAt / entropyRecoverAt1.0 / 1.5low-entropy warn / recover thresholds (hysteresis)

Mode → per-turn tool-call stability limits: fast: 5 / deep: 4 / conservative: 3 (higher mode = tighter).

How the control loop works

Classical negative-feedback loop:

  1. Observe — every tool call is recorded per session. On boot, the JSONL log is replayed to restore pHat and the mode, so the kernel does not "forget" across restarts.
  2. Feedforward — before a tool runs, rules can force an approval gate (destructive / irreversible ops) or attach a warning (flaky network commands), instead of reacting only after failure.
  3. Feedback — each tools/result yields delta (0 success / 1 failure); EMA estimates pHat; the control law (with hysteresis + debounce) shifts modes; divergence and oscillation are flagged and warnings are queued.
  4. Actuate — warnings are injected into the next agent request (agent/pre-step); the four cybernetics_* tools let the agent or a human inspect and steer the kernel; agent/disposed emits a per-session summary event for downstream review automations.

Development

node --check index.js && node --check core.mjs   # syntax check
node --test test/cybernetics.test.mjs            # unit tests (11 cases)

core.mjs contains the pure control-law functions (EMA, hysteresis, oscillation/entropy/health-score, error classification) with no Node side effects and no external dependencies, so they are directly unit-testable with node:test.

License

MIT © 2026 boomzikazita