Introduction¶
If you want to integrate an external chat entry point into DeepSeek Harness (DSH), you cannot simply consider “sending model output to the group”. You also need to handle callback ACK, retry deduplication, session isolation, approval boundaries, and webhook reply security.
Below is an introduction to fieldnote-ops/relayloom. It is an independently maintained, default-off external chat relay plugin, featuring the first compatible adapter connecting the public DingTalk Stream protocol to DSH agents.
What is this¶
RelayLoom is an independent, default-off external chat relay for agent harnesses. It receives DingTalk Stream callbacks and returns the committed answer of the DSH agent to the sender via bounded sessionWebhook replies.
The basics are as follows:
- Repository:
fieldnote-ops/relayloom - License: MIT
- Version:
0.2.3 - Direct runtime dependencies:
dingtalk-stream 2.1.6-beta.1 - Node engines:
^22.19.0 || >=24.0.0 - It has no affiliation, sponsorship, or official product relationship with DingTalk, Alibaba, DeepSeek, or their affiliates.
Core Features¶
Callback Handling¶
- Receives DingTalk Stream callbacks.
- Sends ACK before the asynchronous agent work settles.
- Performs retry deduplication based on
msgId. - Uses bounded memory.
Session Boundaries¶
- Supports direct-message and group-mention filtering.
- Uses a default-deny staff-id allowlist.
- Isolates sessions by sender.
- Uses deterministic, non-secret storage IDs.
- Supports DSH agent create/resume, preset mounting, committed-answer delivery, cancellation, and bounded teardown.
Approval and Replies¶
/approveand/rejectare text fallbacks.- These decisions are single-use, expiring, and bound to the original sender and conversation.
- Does not claim interactive approval cards are available.
- Uses official
sessionWebhookMarkdown replies. - The reply chain includes exact HTTPS host allowlisting, redirect denial, response limits, timeout, expiry checks, and output chunking.
Default Security¶
- Bundle defaults to
enabled: false. - Installation and boot do not read credentials or initiate DingTalk requests.
- Requires a non-empty staff-id allowlist when enabled.
- Credentials are read only from named environment variables.
- Does not read credentials from YAML.
- Rejects unsafe webhook destinations and redirects.
Installation and Enablement¶
Install from GitHub¶
When installing, pin to a public commit rather than relying on moving branches:
dsh plugin --profile web add github:fieldnote-ops/relayloom#e789dded22a6eeb00bddde0d06e47d15e23eced6
After installation, the bundle remains disabled.
Create DingTalk Internal Bot¶
First, create a DingTalk internal robot, and prepare the Client ID, Client Secret, and the sender staff id that is allowed to send messages.
Enable Configuration¶
After setting the corresponding environment variables in the startup environment, edit the DSH profile line:
- id: relayloom
name: relayloom
config:
enabled: true
clientIdEnv: DINGTALK_CLIENT_ID
clientSecretEnv: DINGTALK_CLIENT_SECRET
allowedUsers:
- your-staff-id
preset: standard
Here, only the environment variable names are configured; credentials are not written into the YAML. RelayLoom does not read credentials from YAML; an empty allowlist will be rejected when the bridge is enabled.
Typical Usage¶
Run Local Transport Probe¶
First, clone the repository and install locked dependencies:
git clone https://github.com/fieldnote-ops/relayloom.git
cd relayloom
npm ci --ignore-scripts --registry=https://registry.npmjs.org
Interactively read the Client ID, Client Secret, and allowed sender staff id to avoid them entering the shell history:
printf 'DingTalk Client ID: '
IFS= read -r DINGTALK_CLIENT_ID
printf 'DingTalk Client Secret: '
IFS= read -r -s DINGTALK_CLIENT_SECRET
printf '\nAllowed sender staff id: '
IFS= read -r RELAYLOOM_ALLOWED_USER
export DINGTALK_CLIENT_ID DINGTALK_CLIENT_SECRET RELAYLOOM_ALLOWED_USER
npm run tenant:smoke
unset DINGTALK_CLIENT_ID DINGTALK_CLIENT_SECRET RELAYLOOM_ALLOWED_USER
After running, send the exact random challenge printed by the process to the internal robot. The default wait time is 180 seconds.
Note: npm run tenant:smoke will initiate real DingTalk network calls and will not run automatically during installation, DSH boot, tests, or CI.
Local Check¶
Local checks can be executed:
npm ci --ignore-scripts
npm run check
Use Cases and Notes¶
RelayLoom is suitable for developers who want to integrate DingTalk Stream sessions into DSH while preferring a default-off configuration and minimal permission boundaries.
When using it, the following points need to be clarified:
- It is a developer preview, not a verified production bot.
- Currently, no real DingTalk tenant has completed the receive -> ACK -> reply round trip.
/approveand/rejectare text fallbacks, not a commitment to interactive cards.- A non-empty staff-id allowlist must be configured after enabling.
- It runs within the current DSH process environment; it is recommended to check the source code, dependencies, and MIT license before installing.
Related Links¶
- GitHub: https://github.com/fieldnote-ops/relayloom
- Community directory page: https://www.skillhub.cn/plugins/fieldnote-ops/relayloom