galvanize-dsh: Registering Event Triggers within DSH Agents to Wake Up Headless Sessions on Demand

Introduction

When running agents in DeepSeek Harness (DSH), a common need is “call me when something happens”: a resume lands in the Downloads folder, a report arrives in the mailbox, a Webhook is invoked, a repository gets a new push. Writing your own polling scripts yourself either introduces large delays or wastes resources, and you also have to separately maintain the wake logic and its integration with DSH sessions.

galvanize-dsh is a community-maintained native DSH Cordis bundle that wires “register trigger → event arrives → spawn a new DSH session with prompt and event data” on top of galvanize core. The plugin itself is only a thin client: it exposes five trigger_* tools in the agent schema, while the actual scheduling and waking are handled by the local galvanize core loopback API. On installation it performs a heartbeat proof to avoid the silent failure of “installed but never loaded.”

What Is This

  • Name and ownership: Plugin package name galvanize-dsh, repository lychee888/galvanize-dsh, maintained by lychee888; classified as “Workflow” in the SkillHub plugin directory.
  • Positioning: Gives DSH agents a set of event-triggering capabilities (folders, email IMAP, Webhook, emit, git and other paths supported by core); when triggered, core executes a wake, spawning a new headless DSH session carrying your prompt and event payload.
  • License: MIT (see the repository README).

Core Functions

After installation and verification, the agent can use the tools in the table below (all proxied to the local galvanize core API; the wake logic is not implemented in JS):

Tool Purpose
trigger_add Register a trigger (folder / webhook / emit / imap, etc.)
trigger_list View current listeners and their configurations
trigger_test Send a synthetic event through the real dispatch path
trigger_status Health information: daemon, latest trigger, count for today, latest errors, etc.
trigger_remove Remove a trigger (including routing cleanup)

The event path can be summarized as:

event ── galvanize core ── wake ──▶ dsh --profile <wakeProfile> "<prompt>"
 (folder/mail/webhook/git/emit)     (dedupe, cooldown, routing, delivery)      new DSH session

Key points (all from the README):

  • Thin client: Communicates through core interfaces such as GET /version and POST /manage/<op>; its behavior matches core’s plugins for Hermes / Claude Code / Codex.
  • Single surface: The plugin and galvanize mcp should not be mounted at the same time; core’s doctor will flag a double mount.
  • Wake presets: For every event, core executes dsh --profile <wakeProfile> "<prompt>"; the profile, command, and heartbeat interval are written in the bundle’s cordis configuration lines.
  • Webhook + DSH/shell wake: trigger_add requires relay_url when kind=webhook, with optional relay_token; without a deployed relay it will error before creating the trigger. See the galvanize repository relay docs for relay deployment.

The current package version is 0.1.6 (per the repository’s package.json); Node requirement is ^22.19 || >=24, consistent with DSH’s own range. Windows, macOS, and Linux are supported.

Installation and Activation

Two things must be prepared on the local machine before installation.

1. galvanize core (including daemon and auto-start):

pipx install "git+https://github.com/lychee888/galvanize.git"
galvanize init

2. DeepSeek Harness, with the dsh CLI on PATH:

npm install -g @deepseek-ai/dsh

Then, no repository clone needed: one command installs the bundle from GitHub and mounts it to DSH’s web profile (use --profile <p> to switch profiles):

npx github:lychee888/galvanize-dsh install

You can also install globally and then run:

npm install -g github:lychee888/galvanize-dsh

The installer bootstraps a headless wake profile, probes the target profile and the wake profile separately, and only reports success when all four checks pass, for example:

  ✔ core /version handshake        core 0.2.0, api 1
  ✔ authenticated core access      read-only trigger list succeeded
  ✔ patch row 'galvanize/tools'    row present, package resolvable
  ✔ plugin heartbeat               plugin 0.1.6, core_api_ok=true, 3s ago
LOADED: all four checks green.

Notes:

  • galvanize-dsh verify --profile <name> can rerun the above checks when the corresponding profile is running.
  • galvanize-dsh uninstall can undo the installation; if you previously used a custom --profile / --wake-profile, pass the same options when uninstalling.
  • --wake-profile <name> can specify a wake profile other than the default headless; the installer writes the choice into each profile’s cordis.patch.yml.
  • Session heartbeats are recorded in ~/.galvanize/dsh-heartbeats/<profile>/; verification does not accept stopped, expired, or unhealthy sessions. If you need to restore profile identity after upgrading the plugin, rerun the installer.
  • The installer updates the core shared item dsh_wake_profile, so that galvanize add --wake dsh and triggers created by the plugin use the same wake profile; please upgrade core together with the plugin, otherwise installation may fail. This setting only affects newly created triggers.

Typical Usage

Register a folder trigger via CLI and wake DSH:

galvanize add folder ~/inbox --name triage --wake dsh \
  --prompt 'Read {file} and write a triage summary to ~/inbox-out/{file}.md'

echo hello > ~/inbox/demo.txt   # you should see ~/inbox-out/demo.txt.md about a minute later

Let the agent register triggers itself in a DSH conversation:

Describe the need in natural language, e.g., “wake me up when a lab report arrives in the inbox”; the agent will call trigger_add and test-fire once to confirm the path, and will only wake again when a real event occurs.

Use Cases and Caveats

Who it is for

  • Those who already use or plan to use galvanize for local event orchestration, and want DSH agents to be able to add, remove, query triggers, and view status directly within a conversation.
  • Those who need “event-driven one-shot DSH sessions” rather than long-running polling jobs.

Things to note before use

  • The plugin and galvanize core run with the current user, current machine permissions; the paths, mailboxes, Webhooks, etc. that triggers listen to likewise fall under that environment. Before installing, read the repository source code and the MIT license to confirm they meet your security and compliance requirements.
  • The DSH community plugin directory (SkillHub) is an independent site with no official affiliation to DeepSeek / High-Flyer; the ecosystem philosophy is “everything is a plugin”, and this article only introduces the capabilities of that community plugin and the steps from the official README.
  • Versions must match the core; the README requires the plugin and core to be upgraded together, and relies on heartbeat and authenticated core access for load proofing.
  • The development integration test fixtures pin DSH 0.1.1-rc.2 and HMR 1.0.16 (the README notes that newer HMR removed the API used by that DSH version); for production, take your locally installed DSH version as the baseline.

Conclusion

galvanize-dsh turns galvanize’s event triggering and DSH headless wake into a verifiable installation path: five trigger_* tools on the agent side, and dedupe, routing, and dsh --profile … wake on the core side. If you want to “run an agent round only when files / mail / Webhook / git arrive” inside Harness, you can learn the summary from the directory page and follow the GitHub README to complete the installation of core, DSH, and npx github:lychee888/galvanize-dsh install, along with the four LOADED checks.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye