Back to home@Jian-Sparrow

dsh-plugin-mission-control

No description

Stars
1
Language
TypeScript
Created
Aug 17, 2026
Updated
Aug 18, 2026
GitHub repo

Introduction

Mission Control for DeepSeek Harness

Live observability for the current DeepSeek Harness Session. Mission Control turns Agent activity, Tool calls, in-process subagent collaboration, and authoritative token counters into a compact panel below the DSH Web Session list, with an expandable full-screen dashboard for deeper inspection.

中文说明

What it shows

  • A global HUD with connection state, total tokens, four token buckets, recent token velocity, estimated CNY cost, Agent count, running Tool count, and diagnostics.
  • A selectable Agent tree rooted at the current Session. Selecting an Agent filters token totals and Tool rows.
  • A live Tool stream with ownership, timing, result state, bounded rows, and optional payload previews.
  • Two native entry points: the current Session header and the DSH Web sidebar footer.

Mission Control is live-only. It opens one same-origin SSE subscription while the panel is visible, follows the globally current Session, freezes the last snapshot while reconnecting, and releases the subscription on close, sidebar collapse, Session retarget, plugin unload, or browser disconnect. It does not add model tools, prompts, or hidden reasoning to the model context.

Requirements

  • DeepSeek Harness 0.1.0-rc.7
  • The DSH Web profile
  • Node.js ^22.19.0 or >=24.0.0
  • pnpm through Corepack

Install

Install the bundle into the Web profile, verify the composed row, then start DSH Web:

dsh plugin --profile web add dsh-plugin-mission-control
dsh --profile web --dump-config
dsh --profile web

The package bundle inserts one Cordis row. Its shipped layer is equivalent to:

- id: mission-control
  name: dsh-plugin-mission-control
  config:
    previewMode: names-only
    tokenPublishIntervalMs: 250
    velocityWindowMs: 5000
    maxLiveRows: 300

To change settings, override the complete mission-control row in the profile or home cordis.patch.yml. To use a checkout instead of npm, run dsh plugin --profile web add ./dsh-plugin-mission-control.

Use

Start or open a Session in DSH Web. Choose Mission Control in the Session header, or use the ◎ Mission Control action beside Settings in the sidebar. The sidebar action is disabled when no Session is selected. A collapsed sidebar expands through Harness's existing toggle action; the Session list remains mounted, scrollable, and selectable above the panel. Changing the selected Session retargets the live stream without closing the panel. Closing the panel returns focus to the launch button.

Use Expand Mission Control in the inline title bar to open the original large dashboard: Agent topology on the left, Tool live stream on the right, and the Token/CNY HUD above both. Use Restore Mission Control to return the same live view to the Session-list panel. Expand and Restore do not reconnect SSE, reset Agent selection, clear Tool rows, or start a new viewing generation. Escape closes either presentation.

Version 0.3.x intentionally adapts to the Harness rc.7 sidebar DOM rooted at the supported sidebar.footer.action slot. It inserts one plugin-owned host immediately before the footer and renders through React Portal; full-screen presentation portals the same live view to the document body. It does not require openSidebar(), sidebar.auxiliary, or a Harness source patch. A future Harness sidebar markup change may require a corresponding plugin update and fails with a named integration error instead of silently mounting in the wrong place.

The HUD token fields come from the Harness token-meter projection:

  • Input: uncached input tokens.
  • Output: generated output tokens.
  • Cache read: input served from provider cache.
  • Cache write: input written to provider cache.
  • Recent tokens/s: change in authoritative totals over the configured rolling window; it is an activity rate, not a billing estimate.

Cost estimation

Mission Control calculates an offline estimate only for exact deepseek-official routes that match its versioned catalog. Each step inherits the latest recorded request header until a later header changes the route, so unchanged multi-step Sessions remain fully priced while model switches do not reprice earlier work. A finalized usage record replaces an earlier streaming usage sample for the same step instead of being counted twice.

The catalog bundled in this release was checked against DeepSeek's official Chinese pricing page on 2026-08-18. Prices below are CNY per million tokens:

  • deepseek-v4-flash: off-peak ¥0.05 cache hit, ¥1.50 cache miss, ¥4.50 output; peak ¥0.10, ¥3.00, and ¥9.00 respectively.
  • deepseek-v4-pro: off-peak ¥0.15 cache hit, ¥4.50 cache miss, ¥13.50 output; peak ¥0.30, ¥9.00, and ¥27.00 respectively.
  • Peak hours are 09:00–12:00 and 14:00–18:00 China Standard Time. All other times are off-peak.
  • Cache write is ¥0/M because DeepSeek does not publish a separate cache-write charge for these routes.

For each priced step, the plugin selects the peak or off-peak band from the step start time and calculates CNY = uncached input × cache-miss price + cache reads × cache-hit price + cache writes × 0 + output × output price, with Token counts divided by one million. The HUD reports the priced-step fraction, full coverage when every observed step has an exact price, a partial estimate when some steps are excluded, and No price when no observed step can be priced. Unknown providers, model aliases, unknown models, missing request routes, and missing timestamps remain unpriced rather than being treated as free.

Estimate only, not an actual bill. The amount does not include taxes, account-specific terms, promotions, rounding rules, or provider-side billing adjustments, and the plugin never queries account or billing APIs at runtime.

Privacy and previews

previewMode controls the Tool payload surface:

  • names-only (default): Tool name, owner, timing, and outcome only. Arguments and results are not transmitted for presentation.
  • redacted: bounded argument and result summaries with configured sensitive fields and credential-like text replaced. Redaction is best-effort and is not a security boundary.
  • full: complete recorded Tool arguments and results up to transport limits. The dashboard keeps a visible warning on screen.

The dashboard never renders model chain-of-thought or hidden reasoning. It shows only Session facts already recorded by Harness: Agent state, Tool activity, subagent labels, response state, and token projections.

DSH Web owns network exposure. Mission Control uses a same-origin endpoint and inherits the Web profile's bind address, trusted-host checks, authentication, reverse-proxy behavior, and LAN risk. Do not expose DSH Web to an untrusted network merely to view this dashboard.

Configuration

FieldDefaultValid valuesMeaning
previewModenames-onlynames-only, redacted, fullTool payload visibility
maxPreviewBytes2048128..65536Maximum preview bytes per value
sensitiveFieldNamescommon credential namesstring arrayCase-insensitive object keys removed in redacted mode
tokenPublishIntervalMs25050..5000Token update coalescing interval
velocityWindowMs50001000..60000Rolling recent-token-rate window
maxLiveRows30050..2000Maximum Tool rows retained per viewing epoch
maxPendingFrames648..512Maximum queued SSE frames per subscriber

Every field is validated when the Cordis plugin loads. Invalid configuration fails loudly.

Subagents and limits

In-process, Session-backed subagents appear as descendants and can be inspected with the same authoritative projections as the root. An unreadable Session remains visible as unavailable. External or process-isolated agents that do not publish Harness Session events are opaque; Mission Control does not infer their hidden activity.

This release watches only the current Session and its Session-backed descendants. It does not provide history playback, cross-Session aggregation, distributed tracing, provider billing reconciliation, or a standalone Web server. Tool rows are bounded in memory; reopening the dashboard starts a fresh viewing epoch. The inline/full-screen presentation choice is not persisted across page reloads or panel reopen.

Troubleshooting

  • The action is missing: confirm dsh --profile web --dump-config contains the mission-control row and restart DSH Web after installing the bundle.
  • The sidebar action is disabled: select a Session first.
  • The page says Reconnecting: inspect the browser Network panel for /plugins/mission-control/events; keep the request same-origin and check reverse-proxy buffering/timeouts.
  • No subagent node appears: verify the provider creates Session-backed, in-process subagents. Opaque external agents cannot be expanded.
  • Token totals do not move: the active composition must include the Harness token-meter and Session projection services; the plugin fails to load when required services are absent.
  • Payloads are hidden: names-only is the privacy default. Override the complete Cordis row to choose another mode.

Development

pnpm install
pnpm run verify:release
pnpm pack --dry-run

The host entry is ESM at dsh-plugin-mission-control; DSH Web loads dsh-plugin-mission-control/client through the browser module loader. The browser bundle externalizes React and Cordis-provided runtimes.

Before every release, maintainers must verify the official Chinese pricing page, update src/pricing.ts values, revision and dates when needed, update the exact catalog tests and both README files together, and run pnpm run verify:release. Runtime price fetching must not be introduced.

License

MIT