@xiaopb/dsh-pet-bridge
DSH server plugin: bridge dsh-pet (desktop pet) and publish its events & info outward — listen to dsh-pet /state directly, replay-fallback via session/event, webhook push + loopback pull server, token-authenticated. Keeps the v0.2.0 /bubble push (X-DSH-Pet-Token) to the DSH Mobile desktop pet. 适合需要将桌宠状态与事件同步推送至手机端或外部服务的用户。
설치
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:XiaoPb/dsh-pet-bridge配置(cordis config)
| 键 | 默认 | 说明 |
|---|---|---|
mode | auto | auto=直连 dsh-pet,失败回退本地归约、恢复切回;listen=仅直连;replay=仅本地归约。环境变量 DSH_PET_BRIDGE_MODE 可覆盖 |
petBaseUrl | http://127.0.0.1:3080 | dsh-pet 路由 origin(与桌面 Helper 同源)。环境变量 DSH_PET_BRIDGE_PET_URL 可覆盖 |
serverEnabled | true | 回环拉取服务开关 |
serverPort | 7780 | 回环拉取服务端口(仅绑定 127.0.0.1) |
token | 见上 | 回环服务 + webhook 默认 token |
targets | [] | webhook 目标数组:{url, header?, token?, events?, timeoutMs?} |
port | 7779 | v0.2.0:手机桌宠 /bubble 端口(仅回环生效) |
pollInterval | 250 | v0.2.0:事件轮询间隔(ms),必须 >0 |
enabled | true | false 时装载但零推送 |
auth | auto | v0.2.0:off=刻意不带 /bubble token |