Introduction¶
Maintaining a Mastodon bot that toots and replies is usually done by setting up a separate Python script, configuring API keys individually, and scattering rules like cooldowns, quotas, and night silence across the command line or config files. DeepSeek Harness (DSH) already has models, session archives, and a plugin host; if bot logic can be integrated into DSH, there’s no need to install an extra runtime layer or maintain two pipelines for the same account.
dsh-mastodon-toot (repository meowdan/dsh-mastodon-toot) is released by the maintainer meowdan and categorized as a workflow. The plugin description is rewritten from several months of personal Python scripts. The goal is to unify instance connection, auto-reply, posting materials, and the notebook into the DSH settings page and local directory, rather than requiring users to configure Python and another set of keys.
What is this¶
dsh-mastodon-toot is a bot plugin deployed on Mastodon: it toots on its own, replies on its own, and records interactions and character cards locally using JSONL. The current README marks the capability version as v0.3.13; the engine requirements in package.json are dsh >= 0.2.0-rc.2 and node >= 22, with a license of MIT.
Data and credentials default to $DSH_HOME/mastodon-toot/; tokens are written to credentials.json, and only the last digits of the token appear in the logs. The plugin will not send toot content to the author; the notebook storage can be set to local, local+mnemon, or off.
Access and Settings Page¶
After installing and restarting DSH, configure it in DSH → Settings → Mastodon. The settings page is divided into five tabs: Connection, Reply, Post, Notebook, and Advanced & Logs.
On the Connection page, fill in Instance Address and Access Token; you can test the connection. If direct connection fails, you can configure an HTTP proxy (CONNECT tunnel). The path to get the token is: Instance Webpage → Preferences → Develop → Create New App → Check read, write, follow (at least including read:notifications, read:statuses, write:statuses) → Copy Access Token.
Auto-Reply and Interaction Boundaries¶
The plugin is configured separately for three groups: Owner / Friend (Mutual) / Others: whether to reply to @, whether to reply to timelines, daily quota, per-segment limit, cooldown minutes; the README explicitly states no dice rolling, with @ and timelines calculated separately.
Default group behaviors (adjustable in the settings page) are as follows:
| Group | Reply to @ / Timeline | Quota & Cooldown (Summary) |
|---|---|---|
| Owner | Reply to @, Reply to timeline on; unlimited quota | 3 per segment, 2 min cooldown |
| Friend | Reply to @, Reply to timeline on | 12 per day, 2 per segment, 10 min cooldown |
| Others | Only reply to @ | 8 per day, 1 per segment, 15 min cooldown |
There are also options for Reply Visibility (default unlisted), Only watch within X hours (default 20), Night Silence (default 23:00–08:00 only reply to Owner), Poll Seconds (default 30), and dryRun (calculate reply but only write to logs, don’t send). Turning off “Auto Reply” means completely ignoring notifications and timelines.
@ Must Reply is a significant feature in v0.3.x: when the master switch is on, replying to others @ing me, replying to my toots, and (toggleable) my own posts by the Owner bypass cooldowns and night limits, and quotas are relaxed by a multiple; items blocked by quota only advance the cursor to the “truly processed” position, continuing in the next round. These three items are adjustable in Reply → General: @ Must Reply, Must Reply Quota Multiple (default 2), Reply to Owner Posts; turning off “@ Must Reply” reverts to the group-based cooldown and night rules.
Each “Replied / Not replied and reason” is written to the notebook. Supports One-Click Pause: stops checking notifications and replying, without uninstalling the plugin.
Posting Pipeline and Materials¶
Posting is configured in the Post tab of the settings page. Auto Post is off by default; when enabled, it randomly schedules posts within the workday time window (default 09:40–17:50) based on a date seed, about 7–10 posts a day with a shortest interval of ≥45 minutes. It supports drafting, manually posting one, or dryRun calculation without sending.
Source materials include: weather, RSS news, new GitHub projects, old blog posts, DSH plugin market, Mastodon homepage, local history snippets, and the Queue (collects “Mastodon to be sent” and history from old pipelines, filters privacy words and deduplicates before saving, with an interval of 4–12 minutes per item). Built-in RSS sources like Solidot and IT Home can be toggled individually or customized; leaving Blog RSS, Weather City, and Longitude/Latitude blank disables them.
History Snippets extract short sentences from the local DSH archive session.v4.jsonl.zstd; if they hit privacy features like IP, path, token, email, the entire segment is discarded and deduplicated by message. The settings page displays posting data statistics: today, last 7 days, total ledger, distribution by source, and the timestamp and link of the most recent post (data comes from local state/posted.json).
Notebook¶
Notebook mode defaults to local with a retention period of 180 days. Besides interaction logs, there are character cards (who, what was discussed, minefields) and a promise list. When storage is set to off, no interaction content is recorded.
Installation and Enablement¶
The installation methods provided in the README are as follows (all require --profile desktop, restart DSH after installation):
Install from npm (documented as the easiest method, no compilation required):
dsh plugin --profile desktop add dsh-mastodon-toot
Or install a GitHub Release pre-built package (example v0.3.10):
dsh plugin --profile desktop add https://github.com/meowdan/dsh-mastodon-toot/releases/download/v0.3.10/dsh-mastodon-toot-0.3.10.tgz
Or install from source code URL:
dsh plugin --profile desktop add https://github.com/meowdan/dsh-mastodon-toot
During development, you can use a local link:
dsh plugin --profile desktop add link:/path/to/dsh-mastodon-toot
The documentation notes that the npm package name is reserved as dsh-mastodon-toot, and the official npm release is pending account readiness. After installation, go to Settings → Mastodon to fill in the instance and token.
The maintainer provides a local smoke test example in the README:
node scripts/smoke.mjs # 用假 ctx 起 HTTP,走真实 token 测 /status /test /config
Applicable Scenarios and Notes¶
Suitable for developers or self-hosted users already using DSH who want to place the Mastodon bot, model, and session archives on the same host. Posting and reply generation uses the model you choose in DSH; conversational materials are only read and filtered locally.
The plugin runs with the permissions of the current DSH process. Before installing, you should review the GitHub source code and the MIT license, and confirm that it does not process the same notification in parallel with existing Mastodon monitoring scripts (the README update history describes cases where dual pipelines caused duplicate replies and duplicate posts).
Regarding the roadmap, the README lists v0.4 (stickers, migration from old solutions, gradual rollout) and v1.0 (complete documentation and videos); these are planned items and are subject to future releases from the repository.
Conclusion¶
dsh-mastodon-toot integrates Mastodon connection, group-based reply rules, posting scheduling, and local notebooks into a DSH plugin form, reducing the dual-stack maintenance of “DSH + independent Python bot”. See the community directory page at SkillHub: meowdan/dsh-mastodon-toot; for details and update logs, refer to the GitHub repository README.