dsh-stream-rules: On-Demand Rule Injection to Reduce Persistent Context

`@jiesou/dsh-stream-rules` is an MIT-licensed DSH plugin (v0.1.7) designed to correct agent tool calls by injecting rules on demand, avoiding the persistent presence of fixed rules in the context to reduce token consumption. The plugin ports the concept from `opencode-stream-rules` to DSH. When a tool call matches a preset rule, it injects system prompts via `agent.inject()` or sets `reject` to deny the initial call, guiding the agent to retry. It leverages DSH's `tools/pre-execute` mechanism, requiring no core modifications or monkey-patching, ensuring compatibility. Users can install it via npm or GitHub, and need to configure it in the configuration file.

Read More
Inject Guidance Rules into Agents on Demand with dsh-stream-rules

`dsh-stream-rules` is a DeepSeek Harness community plugin maintained by jiesou: The rules do not occupy system context normally, and only inject steering guidance when tool calls are matched. By default, `agent.inject()` is used to queue SYSTEM NOTICE, and if `reject: true`, the first call will be rejected. This article verifies the installation command, rule writing and capability boundaries based on the directory page and GitHub.

Read More