dsh-notify
baka-world
DeepSeek Harness desktop notification plugin (notify-send / D-Bus)
PROJECT TOPICS
PROJECT README
Telegram 薄桥插件:把 DSH 的 agent 通过 Telegram Bot 暴露出来——长轮询接收私聊消息,按 chatId 映射一个 DSH agent 会话(session id telegram-<chatId>),走与 ACP 桥完全相同的驱动模式(agents.create → agent.followup → agent.whenIdle),回复最终 assistant 文本。
独立交付:不需要改动 DSH 仓库;DSH 的 Host loader 支持绝对路径插件 entry(mountRootInclude 对 isAbsolute 的 name 直接 file-URL 加载)。
| 文件 | 说明 |
|---|---|
index.mjs |
Cordis 插件本体(named exports:name/inject/Config/apply,规避 Loader 默认解包丢 Config 的问题) |
telegram-client.mjs |
纯 Bot API 客户端(无 DSH 依赖,POST JSON body;4096 分块;401/409 错误映射) |
cordis.telegram.yml |
DSH overlay 模板(insert 进用户 patch 层) |
test/telegram-client.test.mjs |
mock Bot API 服务器单测(node test/telegram-client.test.mjs) |
TELEGRAM_BOT_TOKEN(改 tokenEnv 可换变量名)。cordis.telegram.yml 的 insert 合并进 $DSH_HOME/cordis.patch.yml(全部 profile)或 $DSH_HOME/profiles/<name>/cordis.patch.yml(单 profile),allowlist 填你的 chat id(空 = 全部拒绝)。[dsh-channel-telegram] connected as @...。- insert:
- id: channel-telegram
name: dsh-channel-telegram # bundle 安装后按包名解析
config:
tokenEnv: TELEGRAM_BOT_TOKEN
allowlist: [123456789] # 你的私聊 id
# workspace: /abs/path # 可选,agent 会话 cwd(默认 ~/.dsh-telegram/workspace)
# provider: los-gateway # 可选:agent 走的 provider 路由(比如上一轮配的 los 网关)
# model: deepseek # 可选:该路由上的模型
本地开发(未安装 bundle、直接引用源码)时把 name 换成
/absolute/path/to/dsh-channel-telegram/index.mjs(DSH Host loader 支持
绝对路径插件 entry)。
telegram-<chatId>,会话内上下文连续;/new 销毁重建。/start、/help、/new、/status。v1 与 ACP/web 同信任模型:agent 继承宿主全局权限设置(含默认 permission preset)。allowlist 是唯一闸门——bot token 泄露或 allowlist 配错都会让外部聊天驱动 agent。建议:bot 只开私聊、token 严格保管、在低权限 preset 或独立 DSH profile 下运行本插件。
/new 语义自然达成:新 agent 新会话)。CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。