dangthanhtam529-dev/dsh-plugin-news-report--packages-guard-news-report-guard ↗★ 1
@deepseek-ai/dsh-news-report-guard
News-report runtime guard: enforces source routing (minimax for domestic, tavily for international), 24h time window, 5W1H field completeness, and archive writes for news-report skill outputs 适合使用news-report技能并需强制规范的用户;约束来源、时效与5W1H字段。
インストール
検証済み bundle がないか、互換性チェックに失敗しています。先にリポジトリの説明を読んでください。 README 全文を読む ↗
ドキュメント
README 全文を読む ↗@deepseek-ai/dsh-news-report-guard
English | 中文
Runtime guard that backs the news-report skill with structural enforcement. The skill teaches the model how to write a news report; this guard ensures the report does follow the contract:
- Source routing — domestic news queries must use the
minimaxCLI, international queries must use thetavilyCLI. Other tools whose name looks like a search/fetch/extract call inject atools/post-executereminder. - Time window — the current system time and the rolling 24h / 12h window boundaries are injected into every
system-prompt/assembleso the model cannot drift outside the freshness contract. - Failure code surface —
NEWS_REPORT_GUARD_FAILis exported so providers can register it on the LLM retry policy.
Mount the plugin to enable enforcement. It has no configuration of its own; the shipped CLI composition includes the plugin as disabled: true; users must explicitly enable its news-report-guard row.
Config
Defaults are fail-loud. None of these fields disable the guard at runtime; they only tune the time-window injection.
- id: news-report-guard
name: '@deepseek-ai/dsh-news-report-guard'
config:
windowHours: 24
eveningWindowHours: 12
injectTimeContext: true
| Key | Type | Default | Purpose |
|---|---|---|---|
windowHours | integer >= 1 | 24 | Window applied to "morning" / "daily" reports. |
eveningWindowHours | integer >= 1 | 12 | Window applied to "evening" reports. |
injectTimeContext | boolean | true | Whether to inject the time-window context into system-prompt/assemble. |
Misconfiguration throws at plugin load (windowHours or eveningWindowHours < 1) — never a silent fall-back.
Model Experience
What the model sees
- After every search/fetch/extract call that isn't
minimaxortavily, the model sees ausermessage stamped{kind: 'plugin', plugin: 'news-report-guard', form: 'notice', summary: 'unknown source: ...'}instructing it to switch CLI tools. - Every
system-prompt/assemblecycle prepends anews-report-time-windowcontext with the current system time and the morning/daily + evening window boundaries.
Token effect
The routing reminder rides only when a tool is mistargeted. The time-window context is small (a few lines, fixed format) and reuses a stable insertion point so its KV prefix doesn't churn between turns.
KV Cache effect
Disabled by default. When enabled, the time-window context changes on each assembly (the timestamp is fresh), invalidating the KV prefix boundary at the news-report-time-window insertion point. Set injectTimeContext: false if you want to preserve cache for steady-state runs.
Known Limitations and Deferred Work
- The guard is advisory: it nudges the model with
additionalContextsand never throws on its own. Structural hard-fail requires a provider-level retry policy that recognisesNEWS_REPORT_GUARD_FAIL. - The guard does not validate report content (field completeness, character counts). Content validation is intentionally out of scope — the family guard convention is event-level, not content-level. Content checks live in a downstream consumer.
- Archive writes are not yet implemented inside this plugin; they belong in a host-side consumer that subscribes to
assistant/messageand writes to~/.dsh/memory/news-archive/.