Preface¶
In DeepSeek Harness (DSH), agents commonly use the built-in ask_user_question to confirm options with users: one page at a time, with flat option lists. When multiple fields, conditions, or validation are involved, it often needs to be split into multiple calls, and the returned results are mostly strings that subsequent logic must parse itself.
The community plugin dsh-ask-form (maintainer: Zekilou, category: workflow) provides the tool ask_form: a single call presents the entire form, supporting 14 field types, cross-field conditions and validation, targeted re-questioning on validation failure, and typed JSON answers. In environments where forms cannot be rendered, it automatically degrades to the built-in Q&A flow, consistent with DSH’s “everything is a plugin” approach. See the SkillHub directory page for details, and the GitHub repository for the source code.
What Is This¶
dsh-ask-form is a community plugin package for DeepSeek Harness. The Host side registers ask_form, and the Client side renders a centered overlay form in the Web UI; the Bundle consists of two halves, index.js and client.js, with no additional build step required. The current package version is 0.4.0, licensed under MIT.
Comparison with built-in tools as described in the README: the built-in ask_user_question displays option lists question by question; ask_form adds field types, cross-field constraints, and single-call submission, and degrades to the built-in flow on interfaces that do not support rendering.
Core Features¶
Field Types and Return Values¶
Supports 14 field types: confirm, single, multi, text, longtext, number, integer, date, tags, scale, slider, ranking, matrix, budget.
Validation and display-related capabilities include:
- Conditional display:
visible_if - Validation:
validate(a whitelisted expression language, noeval),pattern,max_length,min/max,sum_to - Targeted re-questioning: only re-asks fields that failed validation, up to
max_roundsrounds
Results of each type are decoded on the Host side into the corresponding structure, e.g., scale / slider / number → number, ranking → ordered array, matrix → {row: choice}, budget → {option: number}, tags → array of strings.
Interview Packs and Extensions¶
Built-in interview packs: requirement-intake, design-choice, release-gate, incident-intake, adjustable via pack_args.
single, multi, and tags allow free-text “Other” by default; set allow_other: false to disable it. mode: "script" can render custom React elements in the Web UI, and should declare script.fallback for use by other interfaces; Script mode will explicitly report an error on failure rather than silently degrading.
Runtime Overview¶
The Host half registers the tool through the existing ctx.userQuestions seam: it compiles the form into ordinary AskUserQuestionItem[], so any answerer can still respond; the Client half registers at low priority on the conversation.composer chain, rendering the full form and returning a JSON envelope only when the question carries this plugin’s intent.kind. Interfaces without this plugin’s renderer still treat each field as an ordinary question, with renderer set to "generic" in the result.
Installation and Activation¶
Prerequisites: the Harness profile must have the plugin_manager tool (the web profile already includes it).
- Have the agent install it within Harness, or execute via
plugin_manager:
action: install_bundle
target: github:Zekilou/dsh-ask-form
If using a local directory, replace target with the absolute path of that directory, e.g., /absolute/path/to/dsh-ask-form.
- Reload the Harness Web page once so that the client bundle registers (
client.jsis responsible for the form UI). - After installation,
ask_formis available alongsideask_user_question.
The plugin runs under the permissions of the current DSH process; please review the repository source code and its license (MIT) before installation.
Typical Usage¶
A single tool call renders one form; in list-type fields, the first item is conventionally the recommended option.
Example of a custom form:
{
"title": "Runtime decision",
"intro": "Pick the runtime and weight the criteria.",
"fields": [
{ "name": "runtime", "type": "single", "label": "Runtime",
"options": ["Node 22 (Recommended)", "Bun", "Deno"] },
{ "name": "needs_wasm", "type": "confirm", "label": "Do you need WASM?",
"visible_if": "runtime == 'Bun'" },
{ "name": "weights", "type": "budget", "label": "Criteria weights (sum 100)",
"options": ["Performance", "Ecosystem", "Footprint"], "sum_to": 100 },
{ "name": "priority", "type": "ranking", "label": "Priority order",
"options": ["Ship fast", "Stay small", "Be portable"] },
{ "name": "scores", "type": "matrix", "label": "Score each dimension",
"rows": ["Performance", "Cost"], "options": ["High", "Medium", "Low"] }
],
"notes": true
}
Using a pre-made interview pack:
{ "pack": "requirement-intake", "pack_args": { "topic": "cache layer" }, "notes": true }
The return structure includes typed values and source information; status takes one of the values answered, incomplete, cancelled, aborted, no_answerer, unavailable, script_error. Example:
{ "status": "answered", "rounds": 1, "renderer": "form",
"values": { "runtime": "Bun", "needs_wasm": true,
"weights": { "Performance": 50, "Ecosystem": 30, "Footprint": 20 },
"priority": ["Be portable", "Ship fast", "Stay small"],
"scores": { "Performance": "High", "Cost": "Low" } },
"notes": "…" }
Applicable Scenarios and Notes¶
Suitable for: requirement intake, design selection, release gating, incident intake, and other workflows that require multiple fields, conditional branching, numeric constraints (such as budget summing), and direct JSON consumption by the Agent.
Compatibility and UI behavior (excerpted from the README):
- Host requires
ctx.toolsandctx.userQuestions; Client requires theconversation.composerchain andreact-domin the shell. - The implementation is based on the
0.2.0-rc.2-era APIs of@deepseek-ai/dsh-*, which may change in the future. - The form is a centered modal layer; clicking the backdrop does not close it, and Escape does not cancel, to avoid accidental loss of partially filled content.
- If the answer does not reach the Host within 10 seconds, the UI re-enables the buttons and shows a hint, avoiding long hangs.
Local verification (no monorepo or browser required):
node tests/host.test.mjs
node tests/client.test.mjs
Community directories such as SkillHub are independent sites with no official affiliation with DeepSeek / High-Flyer; star counts and other statistics are based on the directory page (the current GitHub star count is 0).
Summary¶
dsh-ask-form converges “asking users a set of structured questions” into a single ask_form call: typed fields, conditions, validation, and JSON answers, with dedicated rendering on the Web side while other interfaces can still fall back to built-in Q&A. When needed, you can enter the documentation from the SkillHub directory page and view the README, THIRD_PARTY_NOTICES, and Issues on GitHub.