Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture to extend its capabilities through modules. During long-cycle agent task development, execution details are often buried in log streams, making it difficult to quickly perceive current progress from the conversation header.

The dsh-task-capsule plugin condenses the Harness execution process into an always-visible, minimally intrusive task status indicator. It provides a compact capsule view and an expandable floating panel for displaying task counts, elapsed time, file change statistics, and sub-agent status.

Feature Overview

Compact Capsule

The capsule is located on the right side of the session header and presents core information in a minimal form:
- Status and counts: Displays a status dot (●), task counts (completed/in progress/pending), and elapsed time (MM:SS).
- Visual distinction: Running state uses a breathing animation (1.4s period), waiting state uses an easing animation (2.6s period), making them easy to distinguish.
- End-state collapse: After a task completes, the capsule automatically collapses into a record format, such as ✓ Task completed 5/5 · 02:31, and the duration no longer grows with page refresh.

Expanded Panel

Clicking the capsule expands a floating panel that contains the following sections:
- Status row: Displays the current status word and waiting reason (if any).
- Current task: Highlights the running task name, elapsed time, and operation details.
- File statistics: Shows the number of changed files and diff statistics (+12 −4).
- Sub-agent summary: Aggregates the current task status from the host-side delegation tree; expandable to view details for each sub-agent.
- Task list: Ordered by current > completed > waiting; when the current task changes, there is an emphasis animation, with an elapsed-time proportion bar.
- Recent tasks: A persisted ring-buffer list showing the preceding status dot, status word, completion count, and elapsed time.

Liquid Floating Panel

The panel is rendered via Portal into <body> and anchored below the capsule:
- No clipping: It is not clipped by the session header or scroll containers and floats above the content.
- Space adaptation: Automatically flips upward when there is insufficient space below; supports Tab cycling and close/restore.
- Glassmorphism: Features liquid droplet rounded corners, settling, and recoil animations.

Configuration and Usage

The plugin can be tuned via the cordis.patch.yml configuration file or the runtime settings center.

cordis.patch.yml example:

- insert:
    - id: task-capsule
      name: dsh-task-capsule
      config:
        keepAfterDoneMs: 8000       # 完成态胶囊保留时长(0 = 立即收缩)
        autoExpandRunning: true     # 任务进行时自动展开面板
        autoExpandFailed: false     # 失败时自动展开面板
        alwaysVisible: false        # 空闲无活动时也保持可见
        historyLimit: 5             # 最近任务历史容量
        showDuration: true          # 展开态显示逐任务耗时
        showCurrentOp: true         # 显示当前操作行
        density: comfortable        # 面板密度(comfortable | compact)
        accent: auto                # 强调色(auto | business | success | warn | error)

Data and Behavior

Data Sources and Persistence

  • Status driven: Task state is fully driven by the Agent’s todo_write tool (full table replacement, Last-Write-Wins). If the Agent describes a task as completed but does not write it to the todo list, the capsule faithfully reflects the last written state.
  • Persistence path: Recent task history is persisted to $DSH_HOME/task-capsule-history.json and is not lost across restarts.

Lifecycle and Limitations

  • Auto-expand: Under default configuration, the capsule automatically expands the panel while a task is running and automatically collapses 1.5s after completion.
  • Failure handling: A failed state is not inferred as completed. Failure/abort/interruption/waiting decisions (error / aborted / interrupted / blocked) do not automatically collapse the panel.
  • Unsupported features: It does not include a log viewer, does not support task search/filtering, and does not support custom themes.

Notes

The plugin runs with the permissions of the current DSH process. Before installation, it is recommended to review the source code and license (MIT) to ensure compliance.