dsh-onlyne
消息通讯 活跃维护

dsh-onlyne

dbydd/dsh-onlyne

提供统一IM网关,打通QQ、微信、飞书与Telegram消息双向收发。外部聊天自动推送至会话内,回复原路返回各平台,屏蔽协议差异,配置后即可运行。

2
Stars 标星
1
Forks 分支
2
Watchers 关注
1
Open Issues
TypeScript
主要语言
MIT
开源协议
17 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:dbydd/dsh-onlyne
git clone https://github.com/dbydd/dsh-onlyne.git
git clone git@github.com:dbydd/dsh-onlyne.git
README.md main

dsh-onlyne

English | 中文

Give DeepSeek Harness agents a real IM inbox/outbox through Onlyne.

dsh-onlyne is the DeepSeek Harness (dsh) plugin for Onlyne, the workspace-local IM channel daemon. It adds model-facing tools and a watch loop so a dsh agent can receive messages from IM channels (Telegram, Feishu/Lark, QQ Bot, WeChat) and send replies — without pretending a chat platform is a terminal or a workflow engine.

It is the dsh counterpart of pi-onlyne and shares the same per-project config file (.pi/onlyne.json), so one workspace can be bridged by either harness without reconfiguration.

Install

Onlyne is a single binary; see the Onlyne README to install and initialize a workspace:

onlyne init

Then install the plugin into a dsh profile and mount it:

dsh plugin --profile web add dsh-onlyne

Add a row to the profile's cordis.patch.yml ($DSH_HOME/profiles/<name>/cordis.patch.yml):

- insert:
    - id: onlyne
      name: dsh-onlyne

The plugin finds the workspace by walking up from the dsh process's invoking directory to the nearest .onlyne/.

Tools

onlyne_daemon_start()
onlyne_daemon_stop()
onlyne_daemon_restart()
onlyne_reply({ text })
onlyne_send({ channelId, text, rawText? })
onlyne_broadcast({ targets, text, rawText? })
onlyne_loopback({ text, rawText? })
onlyne_mark_no_reply({ reason? })

Send one message

onlyne_send({
  channelId: "telegram",
  text: "# Build report\n\nAll checks passed."
})

Set rawText: true to send literal text instead of Markdown.

Broadcast

onlyne_broadcast({
  targets: [{ channelId: "telegram" }, { channelId: "feishu" }],
  text: "# Release shipped"
})

Loopback wake-up

From any local script, inject an inbound message into the running daemon:

onlyne client '{"id":"wake","op":"loopback","text":"background job finished","raw_text":true}'

Channel loopback is wake-up-only: it surfaces a follow-up in the session but does not expect onlyne_reply.

Command

/onlyne status
/onlyne watch on
/onlyne watch off
/onlyne daemon start
/onlyne daemon stop
/onlyne daemon restart
/onlyne config auto-start

watch on subscribes to the daemon's event stream; inbound messages are surfaced into the current dsh session as user follow-ups, and the agent replies with onlyne_reply or acknowledges with onlyne_mark_no_reply. Control messages such as /handshake are consumed silently. config auto-start toggles watching automatically at session start.

Config

Shared with pi-onlyne at .pi/onlyne.json:

{
  "watch": { "autoStart": false },
  "inbound": {
    "defaultMode": "auto-handle",
    "rules": [{ "channel": "telegram", "mode": "queue-only" }]
  },
  "outbound": {
    "defaultReplyMode": "guarded-explicit",
    "retry": { "attempts": 2, "concurrency": 8 }
  }
}

Development

npm install
npm run check     # build + tests
npm pack          # build the publishable tarball

Links