Back to home@joao-paulo-santos

dsh-bouncing-squares-example

Example plugin for dsh-granular-settings: three bouncing squares, one per settings scope (session, workspace, global). Switch sessions and workspaces to watch each scope behave differently

Stars
0
Language
JavaScript
Created
Aug 26, 2026
Updated
Aug 26, 2026
GitHub repo

Introduction

dsh-bouncing-squares-example

A DeepSeek Harness (DSH) plugin, and the example plugin for dsh-granular-settings: three bouncing squares share your screen, each driven by one settings scope.

squarescopewhat changing it teaches
bluesessionone value per session: two sessions can show two colors at once
amberworkspaceone value per workspace: every session in the workspace shows the same
greenglobalone plugin-wide value: the same in every workspace, and it keeps bouncing with no session open at all

What to try

  • Open two sessions in the same workspace and give them different Session square colors. Each session square keeps its own color; both workspace squares match.
  • Switch workspace: the session and workspace squares follow the new context, the global square does not change at all.
  • Close every session: only the global square remains, because global values exist without a session context.
  • The workspace square's Text prefix (enum) and Text suffixes (multiselect) decorate its label. The global square's size (number) resizes it.

The settings it registers

Every scope registers the same four keys, show, color, text, speed, so the scope axis is easy to see, plus one or two types the others do not have:

scopekeystypes exercised
sessionshow, color, text, speedtoggle, color, text, slider
workspaceshow, color, text, speed, prefix, suffixestoggle, color, text, slider, enum, multiselect
globalshow, color, text, speed, sizetoggle, color, text, slider, number

Code tour

  • lib/index.js, host half: one gs.register call per setting, nothing else.
  • lib/client.js, browser half: each square is a handful of gs.useSetting(NS, scope, key) calls plus physics. The platform hook owns the session context, subscriptions, default fallback, and writes; module-scope flight state survives context switches. The global square reads the sessionless context, which is why it bounces with no session open.

How to install

Requires a DeepSeek Harness checkout and a profile, here web. Clone the dependencies and this plugin into a plugins folder:

mkdir -p ~/dsh-plugins && cd ~/dsh-plugins
git clone https://github.com/joao-paulo-santos/dsh-event-relay.git
git clone https://github.com/joao-paulo-santos/dsh-granular-settings.git
git clone https://github.com/joao-paulo-santos/dsh-bouncing-squares-example.git

# from the harness checkout
pnpm dsh plugin --profile web add ~/dsh-plugins/dsh-event-relay
pnpm dsh plugin --profile web add ~/dsh-plugins/dsh-granular-settings
pnpm dsh plugin --profile web add ~/dsh-plugins/dsh-bouncing-squares-example

# verify the profile still composes
pnpm dsh --profile web --dump-config

Then restart the harness. The squares appear immediately; their controls live in the settings dialog under Granular Settings.

Dependencies

Plugins dependent on this

(none, this is the end of the line: an example, not a platform)