Introduction¶
DeepSeek Harness (DSH) Plugin: Group Chat Context Feed—Batches non-@ messages and attaches them to context (zero token cost, no model wake-up), and compresses them into a daily digest.
In group chat scenarios, Agents face two extremes: either they only wake up when @-mentioned, knowing nothing about the context and giving irrelevant answers; or they frequently wake up the model to catch every message, causing bills to skyrocket. This plugin takes the third path: non-@ messages are batched in memory. Once accumulated into a segment, they are attached to the session context with zero token cost, without triggering model invocation. A daily summary and cleanup of the session is performed.
Core Features¶
Batched Feeding
Non-@ messages trigger feeding based on count (25 messages) or time (40 minutes). It retrieves messages from newest to oldest, processing a maximum of 40 messages per batch. A single session can have a maximum of 3 unread segments attached to prevent context overflow.
Zero-Token Injection
The feeding process does not wake up the model and generates no token costs. Messages are temporarily stored in memory and injected as background context the next time the Agent is @-mentioned.
Daily Digest
Executed daily at 04:10 (local time). It compresses the raw text of each session into a Chinese summary and writes it to <dir>/digest/<date>.md. If summarization fails, the session is not cleared, ensuring no data loss.
Session Filtering
Sessions with fewer than 40 characters are skipped for the daily summary. If the process is not running between 04:10 and 08:00, the daily digest for that day is skipped.
Installation & Configuration¶
The installation command is as follows:
dsh plugin --profile web add github:JackZo400/dsh-group-feed
For configuration, please refer to the settings in cordis.patch.yml.
Typical Usage¶
Feeding Messages
Store non-@ messages in memory via the note function:
ctx.get('groupFeed').note('group:chatId', senderName, text)
Manual Digest
If you need to organize immediately, you can call digest:
ctx.get('groupFeed').digest()
Data Directory
When running, the plugin creates a .group-feed folder in the startup directory to store state and daily digest summaries.
Scenarios & Notes¶
Applicable Scenarios
Suitable for DSH Agents that need to maintain a certain level of context awareness in group chats but do not want to pay for every casual message.
Runtime Limitations
Batching exists only in memory; unfed messages will be lost if the process restarts. The feeding itself still incurs token costs (when the Agent is @-mentioned next time). There is no tool output.
Dependency Requirements
A channel plugin is required to implement the transcript function to provide the raw text. If summarization fails or the channel does not provide raw text, the session will not be cleared to ensure data safety.
Time Window
If the process is not running between 04:10 and 08:00, the daily digest is skipped. Manual completion is required.
Conclusion¶
Through batching and daily digest mechanisms, this plugin balances the Agent’s context awareness capabilities with token costs. For more details, please refer to the plugin directory or the GitHub source code.