DeepSeek Harness Plugin

16bh/dsh-comm-todo

Stars ★ 0 Category Workflow & Automation Added 2026-12-01

Cross-device todo inbox: write a task as a Markdown file in a folder your machines sync (typically a directory inside an Obsidian vault synced by Nutstore, iCloud Drive or Syncthing), and one click on the other DSH turns it into a new session that does it.

Install

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:16bh/dsh-comm-todo

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 · 中文

A cross-device todo inbox for DeepSeek Harness. Write a task down as a Markdown file in a folder both machines sync; the other machine's DSH picks it up, shows a red badge, and one click turns it into a fresh agent session that actually does the work.

The todo panel in DSH's right sidebar

The problem this solves

A DSH session belongs to one machine. Your work does not.

You read a stack trace on the laptop and want the desktop to fix it — the desktop has the repo checkout, the long build, the credentials, the GPU. Today that handoff goes through a chat window to yourself, a notes app, or a copy-paste, and three things break every time:

  1. The context is lost in transit. Half of what made the task obvious is in the conversation you were just reading.
  2. It never gets done. Nothing on the other side is waiting for it, so it sits in an inbox nobody opens.
  3. There is no record. Who asked whom, when, and whether it was ever handled — all gone.

dsh-comm-todo makes the task itself the transport. A task is a Markdown file; any folder your machines already sync carries it — the recommended home is a directory inside your Obsidian vault, synced by Nutstore, iCloud Drive, Syncthing or whatever you already use. The receiving DSH surfaces it as an unread item, and one click ends the handoff in execution — a new session on the machine that can do the work, with the task body already as its first prompt — instead of in yet another inbox.

What you get

  • A right-sidebar panel with three sections: Received, Sent, Done.
  • A red unread badge on the toolbar entry and on the sidebar tab — you see new work without opening anything.
  • One-click dispatch. Handle turns a todo into a new DSH session and sends the todo body as the prompt. Handle all unread does the whole batch.
  • Dispatch is idempotent. A dispatched todo is recorded locally, so the button becomes Open session and repeated clicks can never spawn a second session.
  • A back-and-forth stays in one session. A thread may take several rounds, and each round returns to the session that handled it — instead of opening a fresh one and losing the context.
  • Partial failure is reported honestly. If 3 of 5 dispatches fail, the other 2 stay handled, the failures stay unread and retryable, and the panel says exactly which ones failed and why.
  • Done moves the file into todo/done/ — the plugin never edits a todo in place.
  • One entry point. The Todo chip in the session toolbar opens the host's own right sidebar — no extra tab competing with the conversation.
  • Light and dark themes, zh/en UI.

Install

From the plugin market

Once the plugin is listed in dsh-market, install it from Plugins → Plugin market inside DSH.

Manually (works today)

git clone https://github.com/16bh/dsh-comm-todo.git ~/dsh-comm-todo

Add it to your profile — ~/.dsh/profiles/<profile>/package.json:

{
  "dependencies": {
    "dsh-comm-todo": "link:/home/you/dsh-comm-todo"   // absolute path to the clone
  },
  "dsh": {
    "profile": {
      "bundles": [
        // ... your existing bundles ...
        "dsh-comm-todo"
      ]
    }
  }
}

Install the profile's dependencies (pnpm install in the profile directory) and restart DSH.

Set up two machines

Recommended: put the folder inside your Obsidian vault. A vault is already a folder of Markdown files that you already sync, and the todos then show up as ordinary notes in Obsidian too — searchable, linkable, and readable on your phone. Sync the vault with Nutstore (坚果云), iCloud Drive, Syncthing, Dropbox, OneDrive or a NAS share; the plugin only sees a directory, so it does not care which.

  1. Pick a directory both machines sync — e.g. <vault>/Comm — and create Comm/todo/ in it. If the folder does not exist the plugin says so instead of silently showing an empty list.
  2. On each machine open the panel → Settings, set this device's alias (laptop, desktop, whatever) and the folder path. The two aliases must be different; the path may differ per machine if your vault lives somewhere else on each.
  3. That is all. A todo written on one machine appears on the other as soon as your sync tool delivers the file.

Do not point the plugin at a folder that is inside a Git working tree unless you have read Why not Git below.

Writing a todo

A todo is one file, one task, created once and never edited:

<root>/todo/20261130-laptop-to-desktop-rotate-the-api-key.md
---
type: todo
from: laptop
to: desktop
created: 2026-11-30T17:00:00+08:00
---

# Rotate the API key

The staging key leaked into the build log. Revoke it, issue a new one,
and re-run the smoke tests before the demo.

Do not touch the production keyring.

The filename is <YYYYMMDD>-<from>-to-<to>-<topic>.md. The body becomes the prompt of the session that handles it, so write it for an agent: the goal, the constraints, and how you will know it is done.

You do not have to write it by hand — any agent on the sending machine can create the file for you. In a session, /todo desktop rotate the staging key writes one and records the current session id with it.

One thread, one session

A handoff is rarely a single round trip. A thread ties the rounds of one task together, and session-<device> tells each machine which session to go back to:

---
type: todo
thread: 7f3c9a2e
from: laptop
to: desktop
created: 2026-11-30T18:45:00+08:00
session-desktop: session-31bd…
---

Four rules:

  • thread is generated once per thread and never changes; a reply is another file that copies it along with every session-* line.
  • Each machine reads only its own session-<itself> line, and Handle continues in that session instead of opening another one.
  • A hand-written file usually has no session-* lines at all (only Reply in the panel and the /todo command write them). For those, the plugin falls back to the session this machine already used for anything else in the same thread, so a hand-written item from the other side still lands in the same session instead of a fresh one.
  • If that session was archived or deleted, it falls back to an earlier session in the same thread that is still alive; only when none is usable is a new one created, and the row is tagged thread session archived instead of pretending it continued.
  • Files are still append-only: a new session id cannot be written back into an old file, so it travels forward with the next file.

Every item has a Reply action: it inherits the thread and the whole session map, overwrites only its own line, and lands as a new file. When the other side handles it, it returns to its session — so the task has exactly one session on each machine.

A thread survives Done too: the file moves into todo/done/ and its session map moves with it (the mark key becomes done/<name>), so with show completed turned on, old items still show as dispatched and can still be replied to.

Everyday use

Action What happens
open the panel last 5 s of state; unread count on the toolbar chip
Handle continues the bound session if there is one, otherwise a new one; todo body as the prompt, todo marked dispatched
Reply writes a new todo in the same thread, inheriting thread and session map
Handle all unread the same, per item; a failure does not stop the batch
Open session jump to the session that was created for that todo
Mark all read clears the red badge without dispatching
Done mv the file into todo/done/ and keep its marks under done/<name>, so old items can still be replied to
Settings device alias, synced folder, whether to show completed items

Where state lives

Everything this plugin remembers stays outside the synced folder, in ~/.dsh/comm-todo/:

File Purpose
config.json device alias, synced folder, show-done flag
read.json which todos this machine has read
dispatched.json todo id → { sessionId, claimId, at }, the idempotency record; a pending claim stops two windows from creating two sessions

Because read/dispatch marks are per-machine, two machines can never fight over the same file. The synced tree stays append-only.

Why one file per todo — and why not a shared JSON

File-sync tools diff and replace whole files. If both machines write to the same shared todos.json, one edit overwrites the other, and the sync tool drops a conflict copy next to it. That is why this protocol is append-only:

  • a todo is created by writing a new file (no two machines ever write the same path);
  • a todo is completed by moving it into done/, which is still a per-file operation;
  • a todo is never edited in place by the plugin.

The same reasoning is why the "handled" flag is local instead of a field in the todo file.

Why not Git

Git records what changed. This plugin needs "deliver this to the other machine now", and those are different jobs. Keeping the channel in Git works only if you accept all of the following:

  • Every write becomes a commit, and every commit needs a push. Both machines append new files to the same branch, so after the first push the other machine is behind, and its next push is rejected as non-fast-forward — not because the files conflict (they never do) but because the branch tip moved. Somebody has to fetch + rebase before every write. You end up resolving a conflict on a ref for work that has no conflict.
  • Your todo traffic enters your history. Auto-commits from a plugin land in a repo you care about: commit signing, hooks, LFS, submodules, branch protection, CI that runs on every push — all of them become part of the transport.
  • The plugin would need to run Git in a directory you also work in. A dirty tree, an in-progress rebase, a stale .git/index.lock, or missing credentials turns commit or push into a silent failure, and a courier that fails silently is worse than no courier.
  • There is no "new file arrived" event to watch. A synced folder wakes the filesystem; Git does not, so you add a poller on top of a tool that was never meant to be polled by another tool.

A sync folder is a folder: write a file, and the operating system's own file events tell the other machine. No history, no branch, no credentials, no lock file — the delivery mechanism is the thing you were already paying for.

That said, nothing stops you from also committing that folder for an audit trail. Keep the plugin pointed at the working tree and let a human, a cron job or an agent do the commit/push on its own schedule; the plugin itself only ever creates files under todo/ and moves them into todo/done/.

Limitations

  • Both machines need DSH installed and the same folder synced. This is a courier, not a server.
  • Delivery latency is your sync tool's latency; the panel only polls every 5 seconds.
  • Todos are plaintext in the synced folder. Do not put secrets in them, or encrypt the whole folder yourself.
  • The UI is web-only (the plugin registers one sidebar pane and one toolbar entry).
  • Host routes are loopback-only and validated against the app's own origin; the panel is not reachable from other devices.

Development

No build step — it is plain ESM plus a window.__ModuleLoader__ client bundle.

  • index.js — Host half: scans todo/ and todo/done/, watches the folder, serves /comm-todo/api/{state,config,read,complete,claim,release,dispatch,reply} on the loopback web server, and registers the /todo command.
  • client.js — Client half: right-sidebar pane, conversation-toolbar chip, full-page view, zh/en dictionaries, all styling through --dsw-alias-* tokens.
  • cordis.patch.yml — inserts the plugin into the Cordis app.

After editing index.js you must restart DSH (Host code is not reloaded by a page refresh); client.js changes apply on reload.

License

MIT — see LICENSE.

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.