返回目录
模型与 MCP 插件

dsh-wait-buddy

CelineHuangdz/dsh-wait-buddy

A DSH session view for monitoring long-running Agent tasks, with approval/failure alerts and lightweight games.

Stars
1
Forks
0
Issues
0
更新
7 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:CelineHuangdz/dsh-wait-buddy

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

WaitBuddy

WaitBuddy icon

An Agent long-task monitor for the DSH session view, with lightweight games
Monitoring first · read-only · one-way Agent → game signals

中文 · Changelog · Acceptance Runbook · GitHub

Version DSH Tests License

Current version 0.13.0: monitor-truth release — tool results and durations in the feed, event-age pulse, per-turn signal dedupe, command-free projection, and no global key/scroll hijacking. Games are frozen (no new content); only Snake consumes Agent signals. Tested on DSH 0.2.1-rc.5.

Table of Contents

What is this

WaitBuddy is a session-view plugin for DSH Desktop. It adds a WaitBuddy tab next to Chat / Trajectory in the current session and lets you:

  • see what the Agent is doing: status, completed steps, latest tool calls and their outcomes;
  • get a visible secondary reminder for pending approvals and task failures;
  • play Snake, Gomoku or Safari while waiting for a long task;
  • in M3, let Agent events one-way drive Snake only: pause on approval, +5 per step, +50 on success. Gomoku and Safari are pure breaks.

It never controls the Agent, never intercepts the native approval dialog, and never writes to the session log.

Features

Monitoring

  • Session view: registered on conversation.view, next to Chat / Trajectory.
  • Honest status: loading / ready / degraded / stale; a missing projection is never shown as “idle”.
  • Real step count: “N steps completed”; no total steps, no fake percentage.
  • Activity feed: the latest 3 tool calls by default (expandable to 8), with tool/result status, duration and error code; no raw model reasoning (D27) and no full shell command (D51).
  • Dedicated alert rail: approval/failure alerts live outside the scrolling content and stay visible; pending approvals show their wait age.
  • Honest activity pulse: driven by every event revision (steps included), with a readable “last activity Xs ago”; it never claims “stuck”.

Low-key presence (v0.5.0)

  • Two surfaces: the full view (WaitBuddy tab) and the pill (default) — a small corner capsule that expands into a draggable floating panel (status + latest activity + games) sharing the same rounds as the full view. Moving the pointer out of the panel auto-pauses the snake; Space or clicking the overlay resumes.
  • Ctrl/Cmd+Shift+W toggles pill ↔ background (no UI, system notifications only). Notifications fire only while the window is unfocused, for approval/finish/failure, and never contain command text.
  • Presence is configured in the board footer like speed/difficulty and stored in localStorage.

Games

  • Snake: Canvas, no external assets, keyboard arrows; direction queue, Space pause/resume, reset, speed presets.
  • Gomoku: 15×15, human black vs heuristic AI; difficulty presets; redraws on resize.
  • Sprite Safari (0.10.0): explore a 12×12 grid map, encounter procedural sprites in the grass (54 species, 3 bodies × 6 palettes × 3 patterns), one-click catch by rarity, and a dex persisted in localStorage.
  • Games keep their own state; switching view/session pauses but does not reset. Only Snake consumes Agent signals; Gomoku/Safari do not score or pause on approval.

One-way signals (M3)

  • Approval appears → the game pauses automatically with “Waiting for approval”.
  • Approval is resolved → no auto-resume; the overlay shows “Handled — press Space or click Resume”.
  • step +5, success +50, failed/abort only show a notice; the current round is not reset.
  • Signals are published as agent:*; the game only consumes them. The monitor layer defines no rewards.

Quick start

Requirements

  • DSH Desktop 0.2.1-rc.5 (the only tested version)
  • Node.js 22+ and pnpm for local development

Install

In DSH: sidebar → Plugins → Add plugin, then use one of:

Method Value Notes
Git (recommended) github:CelineHuangdz/dsh-wait-buddy#v0.13.0 Pinned tag (recommended); a bare spec follows HEAD
Local directory /abs/path/to/dsh-wait-buddy For development; run pnpm install first
Tarball absolute path to dist/dsh-wait-buddy-x.y.z.tgz Create with npm pack --pack-destination dist

After installing, enable the plugin and refresh the page, then select WaitBuddy in the session view tabs.

For a local directory, run pnpm install first (the Host half uses zod for projection schema validation).

Usage

  1. Open a session and switch to WaitBuddy.
  2. Send a task: status, steps, activity and tool outcomes update from turn/start / step/end / tool/call / tool/result.
  3. Click Start game to play Snake; arrow keys require focus inside the view (click the board once).
  4. When approval appears, Snake pauses (Gomoku/Safari only show the alert); handle it in the native approval panel, then resume manually.
  5. On success, +50 points; switching views does not replay the toast.

Arrow keys only act inside the view and never steal composer keys. Touch/pointer-only devices cannot control direction (D7, approved deviation).

Configuration

Item Storage Values
Snake speed localStorage → dsh-wait-buddy.settings.v1 Slow / Normal / Fast
Gomoku difficulty Same Easy / Medium / Hard
  • Settings are local only; no upload, no cross-device sync.
  • Best score and the current round are in memory only (M4 candidate).
  • No environment variables or remote configuration.

Architecture

Host (index.js)
  session log ── pure fold ──> waitbuddy projection (stateVersion 7)
                                      │
Client (client.js)                    ▼
  projection + sessionStatus ──> composeMonitor ──> TrackState ──> WaitBuddyView
                                      │
                                      └── diffMonitorSignals ──> agent:* SignalHub
                                                                     │
                                                                     ▼
                                                              gameStore (snake)
  • Host: registers the waitbuddy session projection; pure fold, read-only, never writes logs.
  • Client: conversation.view entry; merges the durable projection with process-local running / pendingInteraction.
  • M3 signal layer: task_start / step_advance / approval_enter / approval_leave / task_finish.
  • Game layer: consumes signals only; no direct monitor reads, no reverse-control API.

Compatibility and known deviations

Capability Status
M1 status board ✅
M2 Snake / Gomoku ✅
M3 signals / approval pause / +5/+50 ✅ core; real approval pause + manual resume verified
D7 soft buttons Approved deviation: keyboard arrows only
D16/D17 Gomoku/settings Approved deviation: M4 scope shipped early
D28 question / plan-review ✅ visible since 0.5.0: per-kind alert copy + game auto-pause
D22 unknown terminal aborted + reason text; no new enum
  • Verified on DSH 0.2.1-rc.5; other versions are not promised. The full host API surface and the per-version checklist live in docs/compat.md.
  • 320px is covered by visual regression; run a real double-instance smoke before release.
  • Real DSH Canvas drawing and the native approval chain are outside automated coverage (see the Runbook).

Development

pnpm install
npx playwright install chromium   # required for visual tests the first time

npm run build:client  # regenerate client.js from src/client/ fragments (required after editing them)
npm run test:meta    # version consistency + node --check + fragment/artifact drift check
npm test             # 100 unit/component cases
npm run test:visual  # 4 headless layout scenarios (with host tabs / Todo dock / composer)
npm run test:all     # all of the above
  • CI: .github/workflows/ci.yml runs npm test + npm run test:visual on push/PR.
  • Tests: test/*.test.js; visual script: tools/visual-layout.mjs.
  • Visual tests render the real view with React server rendering and inspect spacing, horizontal overflow, alert position and pause copy in Chromium.

Change process

  1. Update docs first: UI/copy → docs/ui-spec.md; boundaries/trade-offs → docs/decisions.md.
  2. Then change code so implementation matches docs.
  3. The M0 baseline is frozen; semantic changes must be recorded in decisions.

Project layout

index.js            Host half: waitbuddy session projection (pure fold, read-only)
client.js           Client half (generated: ordered concat of src/client/*.mjs)
src/client/         Client source fragments (§1–§10 slices of the factory; build with npm run build:client)
cordis.patch.yml    Bundler entry: id = wait-buddy
locale/*.json       Plugin manager title/description
icon.svg            Plugin icon
docs/               Baseline, UI spec, decisions, reviews, acceptance, release docs
test/               node:test unit/component tests
test-support/       Test loader (VM + minimal browser stubs)
tools/              Build script, headless visual layout checks
CHANGELOG.md        Release notes

Documentation

Document Content
M0 baseline Frozen product baseline
M0 compliance Implementation vs baseline, deviations
M1 acceptance M1 acceptance record
M3 implementation Signals, pause, rewards
UI spec Layout, copy, interaction spec
Decisions ADR-lite, D1–D28
Acceptance Runbook Manual checks and pass criteria
Reviews 2026-11-05 review archive
Iteration plan Backlog and iteration plan
Release Runbook Packaging, npm, Git distribution
CHANGELOG Version history

Roadmap

  • 0.5.0: low-key presence — pill, draggable floating panel, Ctrl/Cmd+Shift+W background mode, unfocused-window system notifications (D28–D35).
  • 0.6.0: background button on the pill, Space controls all states (D36).
  • 0.6.1: gomoku hard-AI fork/double-three blocking (D39), Todo-dock-aware bottom spacing (D40), GitHub-only distribution (D37), docs and acceptance realigned with code.
  • 0.7.0: hardening — locale-neutral reason codes + stateVersion 5 (D41), host-adapter feedback for the view switch, notification permission on user gesture, disableable shortcut, store lifecycle per apply, late-binding retries, error boundaries, reduced-motion (D42/D43).
  • 0.8.0: architecture — client.js split into ordered src/client/ fragments with a concat build + drift guard (D44); GameAdapter registry removes every mode === 'snake' branch — a third game is now one adapter object (D45).
  • Next: DSH multi-version compatibility — host API contract + per-version checklist in docs/compat.md; verify against new DSH releases as they ship. Hardening backlog (host-coupling adapter layer, notification permission on user gesture, RT-04/RT-05, error boundary) tracked in docs/iteration-plan.md.
  • Never: in-game approval, auto-approval, or any reverse control over the Agent.

Security and privacy

  • The plugin runs inside the DSH process with the current user's permissions; there is no sandbox.
  • Read-only session events; no session-log writes; no network requests; no telemetry.
  • Settings are stored only in local localStorage.
  • The activity feed stores a safe summary: tool name, path basename / URL host, and shell argument count. It never stores the full command, query text, or URL path. Raw model reasoning was removed by D27; copying a feed row copies only that summary.
  • The plugin never registers, replaces, or intercepts the native approval panel.

Contributing

  • Open an issue/discussion first; for UI/behavior changes, update docs first.
  • Run npm run test:all before submitting a PR.
  • Do not add reverse control, composer replacement, or fake progress (see decisions.md).

License

MIT

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类模型与 MCP
规则置信度中

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。