A Wang Lin cultivation companion for dsh: watches your session state and acts it out with rich animations, and levels up as you cultivate.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-plugin-ascension
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:d-ouyang/dsh-plugin-ascension
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
🇬🇧 English | 🇨🇳 简体中文
dsh-plugin-ascension
A Wang Lin cultivation companion floating in the dsh web UI. It watches the LLM session state in real time and drives animations (thinking = hand seals, tool = casting, replying = calligraphy, done = breakthrough leap, failed = injured), and levels up as you work (Qi Refining → Foundation → Core → Nascent Soul → Spirit Severing → Infant Change → Ascension), with fancier skins at higher realms.
Capabilities ported and re-themed from
@linxin666/dsh-pet(MIT): session event projection, state machine, and affinity/cultivation economy as pure logic modules.
Install
# Option 1 (recommended): from npm
dsh plugin --profile web add dsh-plugin-ascension
# Option 2: from GitHub
dsh plugin --profile web add github:d-ouyang/dsh-plugin-ascension
# local dev: dsh plugin --profile web add ./dsh-plugin-ascension
Restart the web service (:3080) after installing.
Features
State monitoring (the pet acts out what the LLM is doing)
The host subscribes to the official session event stream (ctx.on('session/event')) and maps it to 7 phases driving 9 animation tracks:
| Phase | Trigger | Bubble text | Track | Sheet row | Frames |
|---|---|---|---|---|---|
| idle | stopped / no session | 停止修炼 | stand | 6 | spritesheet (standing placeholder) |
| waiting | turn start / step start / awaiting input / blocked | 凝神入定 · 静待机缘 | meditation | — | meditation.webp (✅ real) |
| thinking | LLM reasoning | 掐诀推演 · 参悟神通结果 | running | 7 | spritesheet (✅ real) |
| tool | tool call | 正在施展神通 · 还有 N 道神通未了 | running | 7 | spritesheet (placeholder) |
| review | streaming reply | 凝神书字 · 整理心得 | running | 8 | spritesheet (placeholder) |
| done | turn completed | 圆满出关! | running-right | — | dragon.webp (✅ real, 雷龙庆祝) |
| failed | tool error / interrupt / max-tokens | 神通反噬 · 心魔反噬 · 灵力枯竭 | stand | 6 | spritesheet (standing placeholder) |
- Animations loop ping-pong (0→1→…→n→…→1→0) while the phase lasts
- done celebration window: 3 s for a normal turn, 6 s on a realm breakthrough (
celebrateMs, passed viaonStatusopts)
Cultivation & realms
- +1 per completed turn (cultivate); click pet +1 (discuss, 3 min cooldown); feed pill +1 (30 s cooldown)
- 7 realms (Qi Refining → Foundation → Core → Nascent Soul → Spirit Severing → Infant Change → Ascension), thresholds configurable in
ascension-core.js(REALMS) - Realm-up triggers the breakthrough animation and auto-switches to the next realm's skin; missing skins fall back to the previous realm
Interaction & effects
| Interaction | Effect |
|---|---|
| Click pet | Discuss (+cultivation, reaction bubble above or left) |
| Drag pet | Move it (persisted to config) |
| Hover pet | Ancient-style panel: realm badge + cultivation progress bar + pill/hide buttons |
| Click hide | Wang Lin shrinks into the Tianni Pearl (bottom-right); the pearl loops a gold-wood-water-fire-earth rotating gradient |
| Click pearl | Wang Lin grows back out of the pearl (animation first, config synced async) |
- Bubble moves to the left of the pet while hovering, never overlapping the panel
- All transitions render optimistically without waiting for the API
Settings section (Settings → Ascension)
Full-width form with Save / Cancel at the bottom (applied on save):
- Enable: master switch, stops monitoring/animation when off
- Hide pet: show/hide the pet body
- Name, skin, size (60–400 px), right / bottom insets
Tool
Ask in chat: "王林现在什么境界?" → ascension_status returns realm / cultivation / distance to next realm / pet & feed counts / current animation.
Making skins (important)
One skin = one directory (pet.json + one spritesheet), with a fixed 9-row action order:
| Row | Action | Frames | Wang Lin pose |
|---|---|---|---|
| 0 | idle | 6 | standing with hands down (placeholder) |
| 1 | sword | 4 | sword flight (御剑) |
| 2 | running-left | 8 | sword flight left |
| 3 | waving | 4 | fist-and-palm salute |
| 4 | jumping | 5 | breakthrough leap |
| 5 | failed | 8 | wounded pose (placeholder) |
| 6 | stand | 6 | still, focused (idle/failed 站姿) |
| 7 | running | 6 | hand seals (掐诀) |
| 8 | review | 6 | writing with qi |
- Cell size: current skin is
768×832(4× HD), declared by thecellfield inpet.json— any size works - Recommended pipeline: generate a looping action video with Jimeng, split into frames (frames from one video keep the character position stable), export per-frame PNGs
- Background removal: color-key for solid backgrounds + hole filling + edge feathering (keeps aura effects, removes gray edges); silver-white hair is auto-brightened to remove gray flicker
- Pack (requires sharp):
→ outputscd /Users/ouyangding/dsh-plugin-ascension pnpm install node skin-pack.js <skin-id> --name "Wang Lin · Qi Refining"assets/<id>/(spritesheet.webp + pet.json + previews/) - Drop-in without code changes: copy a packed skin directory to
~/.dsh/ascension/skins/<id>/(user skins win) - Realm ↔ skin id:
wang-lin-1..wang-lin-7map to the 7 realms
Data & API
- Persistence:
~/.dsh/ascension/(state.json / settings.json) - RPC:
/api/ascension/{state, interact, set-enabled, set-visible, set-config, set-skin},/api/ascension/skins/<id>/*(skin assets),/api/ascension/tiannizhu/*(pearl animation)
Development
dsh-plugin-ascension/
├── index.js # host: session/event subscription + cultivation service + RPC + skin registry
├── ascension-core.js # pure logic: realms / cultivation / event projection / state machine
├── client/client.js # client: settings section + floating pet + Tianni Pearl (hand-written bundle)
├── skin-pack.js # skin packer: frames → spritesheet + pet.json + previews
├── assets/ # built-in skin (wang-lin-1) + pearl animation
└── cordis.patch.yml / package.json
Credits
State monitoring / state machine / cultivation economy ported from @linxin666/dsh-pet (MIT License).
Links
More in this category
zhu1090093659/dsh-web-ui#packages/dsh-pet★ 6885
A whale-girl companion for the dsh web GUI: animations follow the agent state, with pat interactions and a feeding mechanic that raises intimacy from a calf to deep-sea bonds.
Nagi-ovo/dsh-ads★ 606
Parody ads in 2005-Chinese-web style: sidebar banners, in-chat feeds, corner popups, and a close button whose hit area is smaller than it looks. All fictional.
PC2005-cloud/dsh-pet#dsh-pet★ 544
Desktop pet for the DSH Web UI with 25 transparent animations, screen wandering, click reactions and drag, plus a reproducible asset-generation pipeline.
vlln/whale-girl★ 311
Desktop pet (QQ-pet style): floats in the corner, draggable, feedable, playable.
yyh-001/dsh-meme★ 75
Chat meme stickers: text-only send, mood auto-send, QQ/WeChat-style picker, auto-learn, custom packs.
Awu12277/dsh-stock-watch★ 71
A-share watchlist real-time market monitoring plugin: a collapsible popup in the top-right corner of the DeepSeek Harness (DSH) web interface for real-time quote monitoring, group switching, intraday and candlestick (K-line) charts, and buy/sell target price settings.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.