Introduction

During agent programming, timely feedback mechanisms help improve the development experience. DeepSeek Harness (DSH) provides plugin extension capabilities. dsh-fireworks is a plugin that renders fireworks above the chat window and triggers celebration effects based on different events. It does not directly interfere with interaction but serves as visual feedback.

Core Features

Six Event-Driven Categories

The plugin configures different fireworks effects for specific DSH lifecycle events:

  • session/created: opening welcome (e.g., twin stars, first opening of the blue gate).
  • turn/end: turn celebration, with scale varying by token usage.
  • tool: successful tool-call starburst, batched and fired continuously within 1.4s.
  • milestone: grand celebration for cumulative token milestones (six tiers: 2k/8k/20k/50k/120k/300k).
  • todo: closing finale when all tasks are complete (multi-bullet salvo).
  • fail: duds when tools fail (understated humor).

Token-Based Scale Mapping

The grandeur of the fireworks is determined by token usage. The calculation formula is outputTokens + 0.2 * inputTokens, mapped through a log₂ curve to magnitude (0..1). This value interpolates control over star count, burst speed, explosion height, brightness, and saturation.

Visuals and Rendering

  • Card Deck and Variants: Built-in 30 attribute cards and 20 flame patterns (peony, chrysanthemum, willow, plume, strobe, etc.). Supports a rarity system (1-5) and shuffle-bag drawing without replacement, ensuring that variants do not repeat during consecutive firings of the same event.
  • Rendering Engine: Prefers WebGL2 GPU rendering, using three-bucket accumulation buffers to achieve a long-exposure texture, point-sprite radial falloff, and 8-bit quantization to prevent afterimages. If WebGL2 is unavailable, it automatically falls back to Canvas2D.
  • One Shot, Multiple Colors: Supports probability-based color mixing; color.bands can define the proportion of different colored star groups.

Integration and Control

  • Zero Intrusion: Uses a transparent overlay with position:fixed; pointer-events:none, so it does not block chat interaction.
  • Adaptation: Automatically detects page background brightness; under light themes, it automatically switches to ink-style rendering. Light/dark theme changes are followed in real time.
  • Display Scope: Supports multiple display modes, including fullscreen, sidebar, and corner.
  • Settings and Performance: Provides a master switch, global intensity slider, individual switches, and test-fire buttons on the settings page. Includes performance self-regulation mechanisms: particle cap, frame-time degradation, pause when the page is hidden, prefers-reduced-motion support, and host-side token-bucket rate limiting (10 tokens/5s) to prevent flooding from sub-agent storms.

Installation

Run the following command to install the plugin:

dsh plugin --profile web add @weibaohui/dsh-fireworks -w

After installation, restart dsh web to activate it. The entry point is located at Settings → Fireworks Celebration.

Typical Usage

  1. Automatic Triggering: Proceed with normal agent programming; the plugin automatically triggers corresponding fireworks based on events (new session welcome → turn celebration → tool starburst → milestone → finale salvo).
  2. Manual Test Firing: Use the “test fire” button for each category on the settings page, or click “test all” to preview the effects.
  3. Console Invocation: Enter __dshFireworks.fire('finale', 0.9) in the browser console to trigger the finale salvo.
  4. Preview Engine: Open demo/demo.html directly in the browser for testing (?shot=1 for continuous firing, ?demo=1 for replay).

Dependencies and Requirements

  • DeepSeek Harness version must be >= 0.1.7-rc.2.
  • Node.js version must be >= 22.5.
  • Depends on @deepseek-ai/cordis as a peer dependency.
  • Depends on @weibaohui/dsh-plugin-kit.

Conclusion

dsh-fireworks turns code execution feedback into a visual experience, suitable for developers who want a sense of ceremony or immediate feedback during agent development. The source code and documentation are available on GitHub.