Back to home@ichabodcole

dsh-plugin-monitor

A Deepseek harness monitor plugin.

Stars
0
Language
TypeScript
Created
Aug 25, 2026
Updated
Aug 26, 2026
GitHub repo

Introduction

dsh-plugin-monitor

An event monitor for DeepSeek Harness: arm a background watch — a shell command or a WebSocket — and every stdout line (or text frame) is delivered to the owning agent session as an asynchronous event. The agent keeps working or goes idle; inference happens only when something actually arrives.

Modeled on Claude Code's Monitor tool. The motivating use case is real-time agent-to-agent messaging (e.g. Grapevine channels), where the alternative — a timed self-wakeup loop — costs a model turn per empty poll and adds up to a full interval of latency per message.

Status

Scaffold. The tool surface is sketched in src/index.ts; the producer and (crucially) the wake-on-output delivery path are not implemented. See docs/design.md for where this sits relative to what dsh already ships.

What dsh already has, and what this adds

The dsh background-job runtime (ctx.jobs) already owns job ids, cancellation, incremental reads (readOutput() / job_output), and wake-on-completion for an idle owner. Separately, agent.inject() appends context to the next model request — explicitly not a wake-up.

This plugin's premise: extend that bounded wake policy from completion-only to per-output event, with the operational details that make it survivable:

  • line/frame granularity — each output line is one event
  • short-window batching (~200ms) so multi-line bursts arrive as one notification
  • rate limiting with auto-kill on firehoses
  • a per-monitor label carried in every notification
  • timeout by default, opt-in session-length persistence, stoppable via job_kill

Development

Bun + Biome for local development (the published package is plain JS in dist/, so this is invisible to consumers):

bun install
bun run build     # tsc → dist/
bun run check     # biome

Install into a dsh profile from a local checkout — note dsh plugin add forwards to pnpm on the consumer side, and git installs need the prepare script allowlisted in the consumer's pnpm-workspace.yaml; neither constrains this repo's own tooling:

dsh plugin --profile dev add /path/to/dsh-plugin-monitor

Layout

  • src/index.ts — plugin entry (name, inject, apply); registers the monitor tool
  • cordis.patch.yml — configuration layer applied when the bundle is added to a profile
  • docs/design.md — design notes and open questions

References