Adds a mood-aware Japanese kaomoji to agent replies, picked from a curated kaomojiya.org whitelist and configurable from Settings → General.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-kaomoji
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:TianJie52009/dsh-kaomoji
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
Add Japanese kaomoji to DeepSeek Harness (dsh) replies.
🤖 Pure Codex generation — the code and docs in this repository were generated entirely by OpenAI Codex and have not been human-reviewed. Please read and test before use.
dsh-kaomoji uses official Harness packages and Node built-ins. Before a model call it injects a
“mood → kaomoji” whitelist rule into the system prompt, so the model copies a
real, well-formed kaomoji verbatim at the right moment. The curated library is
based on 顔文字屋 kaomojiya.org, one of the
largest Japanese kaomoji sites.
简体中文 | English
Features
- Prompt-only design — no stream rewriting, no extra model calls, stable for KV caches.
- Whitelist prevents garbled output — the model copies characters exactly instead of inventing malformed faces.
- 12 mood buckets — happy, love, sad, cry, angry, surprised, confused, shy, playful, encourage, thanks, sorry.
- Three frequency modes —
auto(default; greetings, casual chat, recommendations and empathetic replies get one),frequent,off. - Placement control —
inlineafter the mood-matching sentence (default) orendof the reply. - Visual settings card under Settings → General, saved live without a restart.
- Native settings — official Harness Config schemas,
systemPrompt,settingsand Node built-ins; no plugin-owned HTTP routes.
How it works
- On startup the plugin registers a prompt section named
dsh-kaomoji:guidance(order176) viactx.systemPrompt.section(). - On every prompt assembly the section contributes:
- the active mode and placement rules;
- the mood-categorized kaomoji whitelist;
- an optional user
customPrompt.
- The model emits one of the listed kaomoji where it fits. Because kaomoji are plain text, no custom rendering is needed in the chat UI.
Settings use the official Harness remote.settings interface:
- The Settings → General card reads/writes native configuration in the active profile.
- Live Config updates notify the prompt provider, so the next reply uses the new settings without a restart.
- Legacy JSON is imported once and preserved, as described below.
Prompt injection is preferred over post-processing the stream because it avoids
stream parsing, sentence-boundary guessing, and keyword-based sentiment
guessing, and it follows the same mechanism as plugins like dsh-emoji.
Install
Prerequisites: a Harness 0.2.0-rc.2 through 0.2.1-rc.3 Web or Desktop profile
with system-prompt and native-settings services,
Node.js ^22.19.0 || >=24.0.0, pnpm 11.
cd "$env:USERPROFILE\.dsh\profiles\web"
# Option A: install from npm (recommended)
dsh plugin --profile web add dsh-kaomoji
# Option B: install straight from GitHub (no npm release needed)
dsh plugin --profile web add github:TianJie52009/dsh-kaomoji
# Local development build
pnpm add file:C:\path\to\dsh-kaomoji
If you install with pnpm manually, make sure
"dsh-kaomoji"is listed indsh.profile.bundlesinsidepackage.json.
Restart the Host and reload the client afterwards (or use a compatible hot-loader). The Host starts injecting the guidance; Web and Desktop add the “Kaomoji (dsh-kaomoji)” card at the bottom of Settings → General.
Configuration
Defaults are ready to use (mode: auto). There are two settings layers:
- Deployment defaults: override
configforid: dsh-kaomojiin the profile’scordis.patch.yml; - User settings: edited in the Settings → General card and persisted by Harness in the active profile; user settings win. “Reset to defaults” falls back to inherited deployment defaults while retaining the migration marker.
Example cordis.patch.yml:
- id: dsh-kaomoji
config:
mode: frequent # off | auto | frequent
placement: end # inline | end
maxPerTurn: 2
customPrompt: "Keep it professional; prefer thanks/encourage kaomoji"
| Key | Type | Default | Description |
|---|---|---|---|
mode |
'off' | 'auto' | 'frequent' |
'auto' |
off disables; auto adds one to greetings, casual chat, recommendations and empathetic replies; frequent adds one to every conversational reply (code-only/formal replies excluded) |
placement |
'inline' | 'end' |
'inline' |
Put the kaomoji after the best-matching sentence, or at the reply end |
maxPerTurn |
number (1–5) |
1 |
Max kaomoji per reply; frequent distributes that many across different sentences (fewer in very short replies) |
customPrompt |
string |
'' |
Extra style/scene guidance; cannot change mode, whitelist or limits |
settingsFile |
string |
'' (auto-discover legacy file) |
(advanced) legacy JSON import path; future writes use Harness native configuration |
| Card edits persist through Harness and take effect immediately. Keep the internal | |||
migrationVersion marker unchanged when editing configuration manually. |
Remote access (Tailscale / LAN)
- Settings use Harness
remote.settingsand follow the Host's authentication and trust policy; no plugin-owned route or browser-local persistence is used. - Errors are shown in the card; use Retry after restoring the connection or write access.
Legacy configuration migration
On first load, import schemaVersion 1 JSON from the Host data directory, a legacy nested DSH_HOME/.dsh path, or settingsFile. Existing native user fields win. The source file remains intact, and migrationVersion is committed with the imported values. Reset keeps that marker so old data does not return. Failed imports log a warning and retry after restart. Migration is per profile; moving machines requires transferring the data or profile.
Kaomoji library & attribution
The built-in library lives in data/catalog.json, with a
source URL per category:
| Mood | Source page |
|---|---|
| happy | happy-kaomoji |
| love | love-kaomoji |
| sad | sad-kaomoji |
| cry | cry-kaomoji |
| angry | angry-kaomoji |
| surprised | odoroiteru-kaomoji |
| confused | komaru-kaomoji |
| shy / playful | shy-kaomoji |
| encourage | hagemasu-kaomoji |
| thanks | thanks-kaomoji |
| sorry | sorry-kaomoji |
Kaomojiya states the pages are free to use (no registration required, personal and commercial use allowed). This plugin ships a small hand-picked subset and keeps the source attribution. The plugin code itself is MIT-licensed.
To extend the library, update both data/catalog.json (full catalog) and the
CATALOG constant in lib/index.js (the prompt whitelist).
Development
dsh-kaomoji/
├── lib/
│ ├── index.js # Host: config, guidance builder, section registration, native settings/migration
│ ├── client.js # Web: Settings → General card (ModuleLoader format)
│ └── index.d.ts # TypeScript declarations
├── data/
│ └── catalog.json # curated kaomoji library with source URLs
├── test/
│ ├── plugin.test.mjs# Host unit tests (guidance + native settings/migration)
│ └── client.test.mjs# Client ModuleLoader/store tests
├── cordis.patch.yml # dsh bundle patch
├── package.json
├── README.md / README.en.md
├── CHANGELOG.md
└── LICENSE
npm ci --legacy-peer-deps
npm test # run unit tests
npm run test:compat # isolated official-runtime compatibility matrix
npm pack # verify the publish payload (runs npm test via prepack)
Inspect the injected guidance quickly:
node -e "import('./lib/index.js').then((m) => console.log(m.buildGuidance({ mode: 'frequent', placement: 'end' })))"
Publishing to npm (maintainers)
The bare-name install (dsh plugin --profile web add dsh-kaomoji) requires a
real npm release. registry.npmmirror.com is a read-only mirror and cannot
publish, so log in to the official registry once:
npm login --registry https://registry.npmjs.org
npm publish --access public --registry https://registry.npmjs.org
package.json already pins publishConfig.registry to
https://registry.npmjs.org/.
Compatibility
Supports exactly the nine published Harness releases from 0.2.0-rc.2 through 0.2.1-rc.3, including alpha.1–alpha.5 and rc.1–rc.3. Later releases require separate validation.
Host services:
systemPrompt,settings,profileContext; client services:slots,locale,remote.settingsand reconnect notifications. No plugin-ownedwebServerroutes.Exact peer versions pass the Host compatibility gate. See validation evidence for real-runtime tests and their limits.
Coexists with dsh-emoji: different prompt section names/orders (
dsh-emoji:guidance@175 vsdsh-kaomoji:guidance@176), settings namespace and card slot (Plugins page vs General). Kaomoji are plain text, so dsh-emoji’s stream rewrite (which handles canonical Unicode emoji only) never touches them.
FAQ
- No kaomoji in replies? Check, in order: (1) the Host half is mounted —
dsh plugin --profile web add dsh-kaomojiwrites bothdependenciesanddsh.profile.bundles; a barepnpm addonly loads the client card, so re-install with the dsh CLI or add theinsertrow tocordis.patch.ymland restart; confirm the Loader entry is active; (2) the mode —autoonly fires on friendly/casual/empathetic replies, usefrequentfor one per conversational reply; (3) the settings card status — check Host loading, connectivity and configuration write access, then Retry. A settings connection error alone does not prove guidance is absent. - Why does the model sometimes skip kaomoji in
automode? That is by design. Onlyfrequentrequires one per conversational reply. - Can I use kaomoji outside the whitelist? Yes — put the exact string in
customPrompt; explicit user requests are an exception to the whitelist. - Will code replies be polluted? No. The rules forbid kaomoji inside code blocks, inline code, links, tables, and tool output.
- Where is the settings card? At the bottom of Settings → General (after language, appearance, composer rows). Changes save live; “Reset to defaults” is available in the card.
- Does it conflict with dsh-emoji? No technical conflict (see
Compatibility). If both run in
frequentmode a reply may contain an emoji and a kaomoji — keep one of them inauto(or turn one off) for the cleanest look.
Market synchronization
The repository is already listed; the upstream catalog periodically probes npm versions. Maintainer handoff and market synchronization scripts live in the local parent directory shared by the two projects, outside this package. The per-project entry points are HANDOFF-dsh-kaomoji.md and sync-market-dsh-kaomoji.cmd.
License
Kaomoji characters are sourced from 顔文字屋 kaomojiya.org (free for personal and commercial use per the site).
Links
More in this category
PC2005-cloud/dsh-pet#dsh-pet★ 3496
Desktop pet for the DSH Web UI on Windows, macOS and Linux: 106 transparent animations in the browser overlay or a transparent always-on-top desktop window, throw-and-bounce drag physics with squash and particle scoring, a work-status bubble driven by live session events, self-talk and chat with persistent memory, balance display, meme-image bubbles, multiple pets on screen, and drop-in custom animations and pet packs.
Nagi-ovo/dsh-ads★ 682
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.
vlln/whale-girl★ 375
Desktop pet (QQ-pet style): floats in the corner, draggable, feedable, playable.
yyh-001/dsh-meme★ 295
Chat meme stickers: text-only send, mood auto-send, QQ/WeChat-style picker, auto-learn, custom packs.
a86582751/dsh-nexttavern★ 191
NextTavern is a long-form roleplay plugin for DeepSeek Harness 0.1.7-rc.2 Web, with character-card import and creation, worldlines, worldbooks, layered long-term memory, keyword/semantic/hybrid retrieval, character agents, and card or novel export. SillyTavern character-card import is supported; v0.2.9 fixes distribution and installation.
Sutera-Diffusus/dsh-whale-musume★ 156
A whale-girl companion for DeepSeek Harness with 45 achievements, daily quests and weekly check-ins, three mini-games, 92 artworks, 620 dialogue lines, a growth journal, weather and festival reactions, per-tool work poses, cross-device save export/import (JSON file or migration code), accessibility mode and an optional MiMo TTS bridge. Data stays in the host localStorage with no telemetry. Verified on DSH desktop 0.2.0-rc.2; compatible with 0.2.1-rc.1/rc.2 and legacy 0.1.x web.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.