@zekilou/dsh-ask-form
为智能体提供结构化表单提问工具 适合需要通过表单收集用户输入、进行数据校验和条件分支的场景。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Zekilou/dsh-ask-form说明文档
阅读完整 README ↗Usage
A form is one tool call. Fields are ordered; the first option of a list is the recommended one by convention.
{
"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
}
A ready-made interview:
{ "pack": "requirement-intake", "pack_args": { "topic": "cache layer" }, "notes": true }
The result carries typed values plus provenance:
{ "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": "…" }
status is one of answered, incomplete, cancelled, aborted, no_answerer, unavailable, script_error.