swaylq/dsh-digipet0

dsh-digipet

Hatch a digital creature in your DeepSeek Harness. It feeds on your real work — turns, tool calls, even your errors — and evolves along branching lines shaped by how you actually work. Zero tokens, zero tools, the model never knows.

AI 分析

核心用途是将日常开发/对话工作趣味游戏化。适合想要在 DSH 中养电子宠物、且不希望宠物占用上下文 Token 或干扰 Agent 正常工作的用户。完全在本地运行。

パッケージ
dsh-digipet
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/08/15

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:swaylq/dsh-digipet

ドキュメント

README 全文を読む ↗

dsh-digipet

English | 中文

Hatch a digital creature in your DeepSeek Harness. It feeds on your real work — turns, tool calls, even your errors — and evolves along branching lines shaped by how you actually work.

Zero tokens, zero tools, zero context injection: the model never learns it exists. It's not a skin — it's a save file that grows.

The shell cracks open —

    .-~~-.
   ( o  o )
    ) ██ (
   (______)  。o O

✨ DigiEgg evolved into Bubbo (Fry)
"A single breath, freshly surfaced from the data sea."

Evolution ceremony

Why

The DSH ecosystem already has twenty-plus desktop pets (whale-girl, assorted whales, a revived Clippy, Live2D companions…). Nearly all of them are state mirrors: agent thinks, pet thinks; task done, pet cheers. The deepest one, whale-girl, has XP levels and titles — but its body never changes, and it lives only in the Web GUI.

None of them is a raising game: no hatching, no evolution stages, no "how you work decides what it becomes." dsh-digipet fills that square — a tamagotchi/Digimon-style growth loop hosted in your harness and fed by your actual work.

How it plays

  1. /pet hatch — lay a DigiEgg.
  2. Just work. Every completed turn, every message you send, every tool call, even every error becomes XP.
  3. /pet shows the status card; a ⚡ appears when it's ready.
  4. /pet evolve — witness the ceremony. Each evolution re-reads your work profile for that stage and picks a line:
LineWhat feeds itUltra form
Forgewriting files, running commandsLeviathwright
Scholarreading code, searching docsOmniscient Kun
Bondplain conversationAurorasong
Glitcherrors and mishaps survivedCoredump Wyrm

Six stages (Egg → Fry → Junior → Adult → Prime → Ultra), 2 + 4×4 = 18 forms. /pet dex tracks your collection, /pet story replays its life. Lines are never locked in — a Forge-line pet that spends a stage drowning in stack traces respecs into the Glitch line. What it finally becomes is a mirror of how you actually worked.

Overfeeding makes it drowsy (above 90% fullness, XP gain drops to 15%) — a thematically honest anti-grind valve.

Dex

Install

dsh plugin --profile web add github:swaylq/dsh-digipet
# or a local directory
dsh plugin --profile web add /path/to/dsh-digipet

Restart dsh. Pure JavaScript, zero dependencies, no prepare script — installing from git needs no build authorization.

Commands

CommandDoes
/petstatus card: art, XP, fullness, mood, four stats, lifetime counters
/pet hatchlay the egg (one pet per DSH home; also triggers a ready egg's ceremony)
/pet evolvethe evolution ceremony
/pet name name it (≤16 chars)
/pet dexthe collection (unseen forms show as ???)
/pet storyits life journal
/pet aboutmechanics and trust stance

How it works

The whole plugin is four event taps and one slash command:

HookFeeds
agent/turn-stopping+5 XP per completed turn
agent/inbox/claimed+2 XP per user message (feeds Bond)
tools/result+3 XP per tool call, classified by tool name into Forge or Scholar; failures feed Grit
agent/error+4 XP per error (feeds Grit)

Evolution takes the dominant stat of the window since the last evolution; the window then resets. The save lives at $DSH_HOME/digipet/state.json, written the same way the official JSON storage backend persists (temp file + fsync + atomic rename), throttled to one write per 1.5 s no matter how busy the agent gets.

DSH's core invariant is "model-visible means logged" — this plugin's answer is to show the model nothing at all. No registered tool (tool schemas are a per-request token tax), no agent.inject(), no session events. The pet exists only in command result cards and contributes zero bytes to every model request.

Trust stance

  • Reads: only its own save file. It never reads your code or your conversation — the event taps use only what kind of thing happened; message and tool contents never touch the save.
  • Writes: only $DSH_HOME/digipet/state.json.
  • Network: none.
  • Model surface: none. Zero token overhead; provider KV caches are untouched.
  • Blast radius: every listener body is wrapped in try/catch and the command handler has its own error floor — a stumbling pet cannot veto, rewrite, or delay real work. All hooked events are notification-mode (emit/serial).

Known limitations

  • One pet per DSH home; every profile, session, and subagent on the machine shares and feeds it (feature and limitation).
  • Concurrent dsh processes race the save last-writer-wins — the same single-process stance as the official JSON backend.
  • Tool classification is a name heuristic (write/edit/shell → Forge; read/grep/search → Scholar); oddly named third-party tools count as neutral chow.
  • The collapsed conversation row flattens the art to one line — click the card for the full monospace version (same interaction as DSH's tool rows).
  • Thresholds and the diet are deliberately not configurable: changed numbers would leave the dex and old saves speaking different languages (the same closed-semantics stance whale-girl takes).

Verification record

Verified on dsh 0.1.0-rc.6 (macOS, web profile):

  1. Installed via dsh plugin --profile web add ; the digipet layer appears in --dump-config;
  2. dsh web boots clean; a registration probe confirmed the command landed;
  3. /pet hatch in a real browser renders the egg card (monospace, newlines preserved);
  4. With no API key, a plain message still produces real events — the model request fails, but agent/inbox/claimed (+2 Bond) and agent/error (+4 Grit) fire, and the save matches the diet line by line;
  5. At 30 XP, /pet evolve renders the hatch ceremony; the dex reads 2/18;
  6. 35 unit/integration tests (node --test) cover the pure logic core and a faked Cordis context.

License

MIT