Zekilou/dsh-ask-form ↗★ 0

@zekilou/dsh-ask-form

Structured form questions for the Harness agent: typed fields, conditionals, validation, rounds, a native-convention centered form, and an opt-in script escape hatch. 适合需要通过表单收集用户输入、进行数据校验和条件分支的场景。

パッケージ
@zekilou/dsh-ask-form
互換性
未検証
バージョン
0.4.0
ライセンス
MIT
最終更新
2026/09/30

インストール

$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.