BolunHan/cc-monitor

dsh-cc-monitor

将 DeepSeek Harness 会话活动上报到自托管的 cc-monitor 服务器:Claude Code 与 DSH 会话以彩色状态卡片出现在同一个 Web 仪表盘中,会话需要关注时通过浏览器与 Android 应用通知你。

通知与集成androidclaude-apiclaude-code

dsh-cc-monitor

A host-side DSH plugin that reports session activity to a cc-monitor server. It maps DSH session events to the same normalized hook payloads the server already accepts, then POSTs them to /api/event with agent: dsh.

Install

dsh plugin --profile web add link:/path/to/cc-monitor/dsh-cc-monitor

Then make sure the profile's package.json lists dsh-cc-monitor in dsh.profile.bundles (the dsh plugin add command normally handles this for out-of-tree bundles; verify with dsh --profile web --dump-config).

First npm publish: npm Trusted Publishing can only publish subsequent versions once the package already exists. Publish the first version once from a machine with npm login (npm login && npm publish --access public), then the GitHub Actions trusted-publisher job can publish future versions.

Configuration

Defaults are designed for a local cc-monitor server on 127.0.0.1:9876. Override them with environment variables or a patch entry:

- insert:
    - id: cc-monitor
      name: 'dsh-cc-monitor'
      config:
        # Full override; host/port below are ignored when this is set.
        serverUrl: 'https://192.168.1.100:9876'
        # Or configure host + port separately:
        # host: '192.168.1.100'
        # port: 9876
        uid: 'my-dsh-instance'

If serverUrl is set, port overrides its port. If serverUrl is omitted, host + port are used to build http://<host>:<port>.

SettingEnvironmentDefault
serverUrlCC_MONITOR_URL—
hostCC_MONITOR_HOST127.0.0.1
portCC_MONITOR_PORT9876
uidCC_MONITOR_UIDdsh-default
enabled—true

How it maps

DSH eventcc-monitor eventState
direct user/messageUserPromptSubmitworking
assistant/messagecached, then turn/end → Stoppending_review
tool/callPreToolUseworking
approval tool callPermissionRequestpending_approval
tool/resultPostToolUseworking
session/disposedSessionEndall_done