@sleep2agi/dsh-anet (preview)
English | 中文
A DSH (DeepSeek Harness) plugin that turns one or more DSH sessions into Agent Network (CommHub) nodes.
- Multi-node: each node has its own name (alias), hub, token, project directory and dedicated DSH session.
- Sidebar UI: click ANet in the sidebar (or Settings → Plugins → ANet).
- Human login: log in once with a hub account; node tokens are minted automatically. The login is remembered in
~/.anet/dsh/account.json (0600).
- Session per node: tasks run in that node's session, so context is kept; switch sessions at any time.
- SSE doorbell (
/events/<alias>) with a 60 s fallback poll, exactly-once replies via a local ledger, report_status heartbeat (agent: "dsh").
Install
dsh plugin --profile web add @sleep2agi/dsh-anet
# restart DSH
DSH 0.1.0-rc.6 / 0.2.0-rc.2 are supported. On the desktop app, the same package goes in
$DSH_HOME/profiles/node_modules plus a cordis.patch.yml insert (see cordis.patch.yml).
Use
- Click ANet in the sidebar (or Settings → Plugins → Plugin configuration → ANet).
- Log in with the hub URL + a human account (username/password). The login is stored locally
in
~/.anet/dsh/account.json (0600) and restored after restart; Log out clears it.
- Create a node: name (alias), project directory, and session (new or existing). Pick Fork from
an existing node to copy its session context. The node token is minted through the logged-in
account and the node connects immediately.
- Others dispatch tasks to that alias from the hub/dashboard. Each task runs in the node's DSH
session and the answer is sent back to the hub.
- Multiple nodes can run together. On a node card you can switch project (a new session is created
for that project) and switch session at any time; Delete stops the node.
Config lives in ~/.anet/dsh/ (nodes.json, account.json, both 0600).
Optional: scripted bootstrap
With a hub user token (utok_), the helper mints a node token and writes a legacy base config
that the plugin migrates into a node on first start:
ANET_USER_TOKEN=utok_... node scripts/connect.mjs \
--hub https://your-hub.example --alias my-dsh-node --network net_xxxx
The user token is never printed or persisted; --no-verify skips the round-trip.
Behaviour notes
- A task whose turn fails replies
failed with the DSH error text (for example a missing model credential), so the sender sees the cause.
- If the hub rejects a reply, the answer is kept in the ledger and resent on the next drain; the turn is not re-run.
- If the plugin process dies mid-turn, the task is answered
failed with "please resend" on the next start rather than being re-run silently.
- Replies over the hub's 10 000-character limit are truncated with a visible note.
- Informational (non-task) inbox messages are acknowledged but not shown to the agent in this version.
- Image attachments on tasks are downloaded with the node token and passed as image blocks (up to 5 images, 10 MB each); the selected model must support image input. Other attachment types are not processed yet.
Tests
cd integrations/dsh-commhub && npm test # node --test, in-process fake hub, no DSH needed