dshbase

插件目录 / Developer / dsh-ask-guard

dsh-ask-guard

未验证 Q1hangL

✓ 持续维护 基于 3 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

1Stars
1Forks
0未关闭 issue
语言
2026-08-14最近推送
跨平台平台

功能简介

Timeout guard for ask_user_question in DeepSeek Harness: a lost or unanswered question resolves as ASK_TIMEOUT instead of hanging the turn forever

我们的评价
未验证 — 尚未实测

Timeout guard for ask_user_question in DeepSeek Harness: a lost or unanswered question resolves as ASK_TIMEOUT instead of hanging the turn forever 尚未验证——请自行安装测试。

「未验证」表示我们的自动化 CI 尚未安装过该插件。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

你是插件作者? 想拿到「已验证」标签——提交你自己的验证证据(截图、日志或短视频),我们审核通过后即改为「已验证」。

提交验证证据 ↗

README

dsh-ask-guard

Timeout guard for ask_user_question in DeepSeek Harness: a lost or
unanswered question resolves as a structured ASK_TIMEOUT instead of hanging
the turn forever.

The problem

The question card is delivered to the browser over a single push on the mux
WebSocket. When the page is backgrounded, the laptop sleeps, or the connection
dies half-open, the frame is lost, the client never notices (no heartbeat), and
the tool waits forever — observed hangs of 6+ hours, recoverable only by
pressing Stop. Upstream report:
deepseek-ai/deepseek-harness#1554.

What this plugin does

It registers a tools/execute wrapper that arms a cooperative deadline on
every ask_user_question dispatch (the same mechanism as the official
dsh-tool-call-timeout-policy, which only enforces budgets declared by tool
plugins — ask_user_question declares none).

  • When the deadline wins, the waiting provider's abort handler fires: the web
    provider broadcasts question/resolved cancelled, so the stuck composer
    (if any) is cleaned up.
  • The wrapper then replaces the normalized abort with a structured error result
    (code: ASK_TIMEOUT, name: AskTimeoutError) with a model-facing message, so
    the agent can end the turn gracefully instead of blocking.
  • All other tools pass through untouched.

The timeout is cooperative (@deepseek-ai/dsh-timeout notifies via
exec.signal; the web user-questions provider honors the signal, so it
terminates for real).

Install

dsh plugin --profile web add dsh-ask-guard

Restart dsh web. The plugin is a dsh.bundle package, so its patch row is
added to the profile composition automatically on reconcile.

Install from a git checkout instead:

dsh plugin --profile web add github:Q1hangL/dsh-ask-guard

Config

Field Default Meaning
timeoutMs 300000 Deadline for one ask_user_question call (ms).

Tune it in the profile's cordis.patch.yml:

- id: ask-guard
  config:
    timeoutMs: 600000

Recovery note

A page refresh (F5) re-syncs pending questions — the host replays unanswered
questions to a reconnecting client. With this plugin, even without a refresh
the turn no longer hangs forever.

Test

npm install
node --test

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-ask-guard」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:Q1hangL/dsh-ask-guard

Headless(CLI)profile:

dsh plugin --profile headless add github:Q1hangL/dsh-ask-guard

实测报告

尚未 L3 验证——若已跑过,见下方失败备注。

状态:pending · 最近测试 2026-08-27
备注:验证: runtime-fail 浏览全部待验证失败 →
安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7795 个插件 →