Skip to main content

openpets/packages/dsh

1.1kStars95Forks13Issues6Watchers

Automatically syncs with a desktop pet while the DSH coding agent runs, displaying reaction bubbles for thinking, completed, error, or awaiting approval based on the agent's working status.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
TypeScript
License
MIT
Branch
main
ai-agentsclaude-codecoding-agentsdesktop-companiondesktop-petdsh-pluginelectronmcp

Install

cmdweb profile
$ dsh plugin --profile web add @open-pets/dsh

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin alvinunreal/openpets/packages/dsh for me: review the repository at https://github.com/alvinunreal/openpets first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Description

Integrates OpenPets desktop pet with DSH coding agent: automatically displays corresponding reaction bubbles and short phrases based on the agent's current state—thinking, error, or waiting for approval—visualizing the coding process without leaking any business data.

Core Features

  • Listens to DSH's agent/status event, mapping "thinking" state to thinking reaction, "completed" to success reaction
  • Listens to DSH's agent/error event, immediately switches pet to error reaction and shows error message short phrase
  • Listens to DSH's approval/request event, maps waiting-for-user-approval state to waiting reaction with "approval needed" prompt
  • Automatically dispatches local IPC client with 500ms timeout, bypassing remote channels, ignoring remote environment variables
  • Uses preset phrase pool with validation internally to prevent code, URLs, paths, or keys from mixing into bubble text
  • Suppresses success/idle reactions within 5 seconds after error events, avoiding visual confusion of "error immediately followed by completion"

Technical Implementation

  • Language: TypeScript (ESM, compiled output in dist/)
  • Key Dependencies: @deepseek-ai/cordis (peerDep), @open-pets/agent-events (preset phrase pool & validation), @open-pets/client (local IPC client)
  • Architecture Pattern: Uses dsh.bundle.patch to insert the Cordis module openpets-dsh into apply(ctx, options) and registers it to the host context's three event hooks: agent/status, agent/error, approval/request; classifier only reads event classification values, dispatcher dispatches asynchronously, never blocking host flow
  • Entry File: packages/dsh/src/index.ts (exports apply, name, etc., loaded by cordis.patch.yml)

Use Cases

  • DSH users want their desktop pet to reflect the coding agent's current work state (thinking, error, waiting for approval), gaining a more intuitive "companionship" feeling without any code or prompts being leaked.
  • Lightweight DSH users who don't need remote pet control or want to call model tools via MCP need an out-of-the-box, strictly local integration.
  • Scenarios where different DSH profiles want pet linkage enabled separately, while keeping it completely decoupled from other OpenPets plugins/remote MCP configurations.

Prerequisites & Compatibility

DependencyMin VersionDescription
@deepseek-ai/cordis^4.0.1Declared as peerDependencies, DSH host must bring this core library
@open-pets/agent-eventsworkspaceProvides preset phrase pool for event classification and bubble text validation
@open-pets/clientworkspaceProvides local IPC client capability
OSNot declaredClient internally uses @open-pets/client via local IPC, can run cross-platform

No minimum Node version or platform restrictions are declared in the source code.

Installation

dsh plugin --profile web add github:alvinunreal/openpets/packages/dsh

Configuration

ConfigTypeDescriptionDefault
This plugin needs no extra config—Takes effect immediately after installation via dsh plugin --profile web add; OpenPetsDshOptions fields (clientFactory/schedule/random/now) are only for host test injection—

FAQ

Q: Where will this plugin be installed in DSH?

A: It's installed to the specified profile via dsh plugin --profile web add; to enable it for multiple profiles, run the same command for each profile separately.

Q: After enabling, will my code or prompts be sent to the pet?

A: No. The classifier only reads the status classification value from the event envelope, and bubble text is drawn from a preset phrase pool in agent-events; messages are forcibly validated to not contain sensitive content like URLs, file paths, or keys, and no prompts or tool results are forwarded.

Q: What's its relationship with OpenPets' built-in remote MCP?

A: This plugin is completely localized, uses a local IPC client with 500ms timeout to communicate with the desktop application, and explicitly ignores OPENPETS_REMOTE_ENDPOINT/TOKEN environment variables in test cases; remote MCP can still be configured independently without interference.

Q: Will pet reactions block DSH?

A: No. All classification and dispatch are asynchronous, scheduled via scheduler (default Promise.resolve().then) into the event loop, with injectable schedule replacement for host testing; dispatch exceptions are silently swallowed and never passed back to DSH main flow.

Q: After an error, the pet takes a few seconds to show "completed"—is this a bug?

A: It's intentional. The source code constant errorSuccessSuppressionMs = 5_000 suppresses success/idle reactions within 5 seconds, letting the error state be seen first; if you don't want to wait, you can temporarily shut down the backend, wait, or contact the author to adjust the threshold.

Q: How to uninstall?

A: Use the DSH bundle removal command for the corresponding profile; the plugin doesn't write any persistent files and is immediately invalidated after deletion.

Getting Started Difficulty

Beginner — one-line installation command to enable, no external services, remote credentials, or additional config items required; after DSH starts, the pet automatically switches reactions with the agent state.

Known Issues & Limitations

  • No TODO/FIXME/known defects marked in the source code found; runtime.test.ts already covers the three core paths: classification mapping, suppression window, and remote variable ignoring.
  • Behavioral inherent limitations (design, not bugs):
    • success/idle within 5 seconds after error reaction are silently suppressed, which may feel "delayed".
    • Only supports preset 4 types (thinking/success/error/permission) of short phrases, cannot customize bubble text.
    • Only recognizes three event types: agent/status, agent/error, approval/request; other DSH events are directly ignored by the classifier.
    • Forced to use local IPC; if users configure remote OpenPets endpoints, this plugin will also ignore it, leaving remote channel handling to other plugins/CLI only.

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/alvinunreal/openpets/packages/dsh)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory