Weiyang742/dsh-cross-session-messaging0

@wy/dsh-cross-session-messaging

Cross-session relay for DeepSeek Harness: peer discovery and text delivery between independent dsh processes.

包名
@wy/dsh-cross-session-messaging
版本
0.1.0
许可证
MIT
最近更新
2026年8月31日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Weiyang742/dsh-cross-session-messaging

Usage

Open two dsh sessions (for example, two "New Session" in the Web UI) and, in one of them, ask in natural language:

List the other sessions currently running, then send one of them a message: hello.

The model calls cross_session_list_agents to discover the peer and cross_session_send_message to send; the other session receives the message as form: 'relay'. The human only writes a natural-language request and names no tool.

See Quick start for the full end-to-end walkthrough.

Configuration

Configuration lives in the plugin's cordis.patch.yml under config: (already used to wire it in during installation); any field not listed falls back to its schema default. Local use normally needs no customization beyond name and the inbound policy:

- insert:
    - id: cross-session-messaging
      name: '@wy/dsh-cross-session-messaging'
      config:
        dirs:
          baseDir: ~/.dsh/cross-session   # data root; registry/socket/spool derive from it
        inbound:
          rules: []                        # inbound rules, see below
          defaultDecision: auto            # fallback when no rule matches
        name: ''                           # session name, defaults to the shortId
        # Cross-machine (optional, see "Cross-machine"):
        # remote:
        #   listen: { host, port, identity, secret }
        #   tls: { key, cert }
        #   peers:
        #     - { name, host, port, secret, tls, tlsCa/tlsFingerprint }
  • dirs.baseDir: root of all data directories (registry / socket / spool / credential / deadletter / audit), default ~/.dsh/cross-session; each of the six can be overridden.
  • inbound.rules: accept | hold | refuse rules matched by receiver (local session id/name) and sender (sender sessionId); omitting either means "all local sessions" / "default rule".
  • inbound.defaultDecision: fallback when no rule matches; auto (default) consults the receiver's DSH_PERMISSION_MODE (danger-full-access → hold, otherwise accept), or set accept | hold | refuse explicitly.
  • name: the session's readable name, used for addressing by cross_session_send_message.

Cross-machine

Cross-machine delivery needs remote (omit it for local-only use):

  • remote.listen: the TCP listener when this machine receives (host / port / identity / secret); identity is how this machine appears to peers and is stamped onto inbound from.
  • remote.tls: listener certificate (key / cert); omit to auto-generate a self-signed cert under spool/tls, with its fingerprint written to spool/tls/fingerprint.
  • remote.peers: the static peer list when this machine sends (name / host / port / secret / tls / tlsCa or tlsFingerprint). tls defaults to true; cross-machine TLS requires tlsCa or tlsFingerprint, otherwise the connection is refused.

Capacity and retry (tuning)

limits.* (queue caps, message size, rate limit, dedup window), delivery.* (retry/backoff), metricsIntervalMs, and auditMaxBytes have conservative defaults and rarely need changing; adjust by field name when you do.