AI companion with a learned body clock, real offline sleep, its own memory, and self-reported affect delivered through the same judge math as the pi version.
Install
# from npm (prebuilt)
dsh plugin --profile web add @m-rui/dsh-mate-companion
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:m-rui001/dsh-mate-companion
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
Persisto Mate — the AI companion with a body clock, real sleep, its own memory and feelings — as a DeepSeek Harness (dsh) bundle.
Install
dsh plugin --profile <your-profile> add github:m-rui001/dsh-mate-companion
# or, from npm:
dsh plugin --profile <your-profile> add @m-rui/dsh-mate-companion
Then boot that profile. State lives beside the harness home ($DSH_HOME or ~/.dsh) at
agent/mate/ — separate from the pi-host companion's state, because a different host is a
different body.
What it contributes
- System prompt sections — the cached identity/character/memory block and a volatile state block (clock, mood, drives, session log, reply lean) that re-renders on every assembly.
- The kernel — every inbound user message advances the affective state; offline time integrates in closed form and crosses real sleep windows; memory recalls, rehearses and consolidates; SPARK beliefs crystallise from recurring topics.
- The affect judge — after each user exchange the model reports, via the
mate_feeltool, how the exchange moved each Plutchik feeling on a -2..+2 scale. The report goes through the same literature-anchored math as the pi companion's judge (rung equating, negativity asymmetry), and a due gate keeps it a reading of the new exchange rather than a re-read of an old one. - A waking heartbeat — impulses the kernel decides are worth voicing are delivered as a queued
follow-up message of their own turn, wrapped in a
<system-event type="mate-impulse">envelope so they are never mistaken for the user's words. - Tools —
mate_remember(persistent memory),mate_ponder(private thought),mate_debug(full internal state).
Known scope limits (v0.2)
- The judge reads the exchange through the host model's own self-report rather than a separate side-channel model, which introduces the usual self-assessment bias; the design treats that as acceptable until the harness documents a plugin-facing completion API.
- No live sleep mode, dreams, or alarm tool yet — offline sleep is fully simulated by the kernel's catch-up, and the sleeping-hours impulse suppression still applies.
- To switch the companion's prompt language, write
{"version":1,"lang":"zh"}toagent/mate/lang.jsonunder the harness home.
Requires Node 22.19+/24 per the harness. The harness is a developer preview; its plugin surface may change under us.
Source
MIT, in LICENSE. This repository is a published mirror of the
Persisto-Mate monorepo, and it carries the source of the
bundle rather than only the bundle: packages/ holds the files dist/index.js is built from, at
their monorepo paths, so no import had to be rewritten to put them here — this host
(packages/dsh-mate-extension/src), the MATE kernel (packages/mate/src) and the one shared
affect-appraisal file it imports from the pi host
(packages/coding-agent/src/extensions/mate/appraisal.ts).
Rebuild it to check that claim:
bun install
npm run build # writes dist/index.js from the source in packages/
Send changes upstream in the monorepo — the next publish overwrites what is here.
Links
More in this category
kingcharleslzy-ai/dsh-purge★ 14391
Community-maintained dsh-purge fork with host-policy patches, prompt and rule settings, diagnostics, separate update-check and install controls, and local backup/rollback.
aureth-labs/dsh-aurabot-qq★ 786
Puts the agent on QQ as a persona character through SnowLuma (OneBot v11): private and group chat, voice notes, stickers, Qzone diary, Bilibili browsing, song covers, image generation, long-term memory and mood. Every feature is a module you can switch off, replace or extend locally — hot-reloaded modules can also rewrite group-reply decisions, prompts, outgoing messages and per-chat model choice. Safe by default (master switch off, dry run on).
ECNU/EduWork#dsh-oidc★ 452
Configurable OIDC login and token-authorized model access, including LiteLLM and opt-in oidc-llm integration, with a standalone DSH Web backend.
techflag/workdsh#enterprise-connection★ 353
Enterprise login, colleague mentions, shared text and files, and authenticated business requests for WorkDSH Desktop 2.0.6-alpha.3+ with WorkDSH Admin; distributed as a release archive.
Yuuyuko-uu/dsh-feiyu-mood★ 278
Gives the companion a mood judged each turn and shown as a short context note, with a panel for mood, emotion dimensions and timeline.
FNOSP/fnos-dsh#dsh-codex-auth-plugin★ 127
ChatGPT account sign-in for DeepSeek Harness through a Codex browser OAuth flow with no API key and no workspace selection: subscribes the login to pi-ai's Codex provider, lets you set the global default Codex model and reasoning effort for new sessions, refreshes the model list from the signed-in account's own catalog endpoint, and shows the five-hour and weekly usage windows in the composer.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.