@lynn123411/dsh-ask-user-grilling 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/lib/index.js +10 -14
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -7,7 +7,7 @@ DSH 侧的 grilling 适配层(输送机制):把 Matt Pocock 的 grilling
7
7
  - **ask_user_grilling**:grilling 轮次专用提问工具。
8
8
  - **子代理闸门**:后台有子代理运行时会拒绝提问,返回「阻塞 + 运行中名单」——agent 应**结束当前回合**,子代理结算通知自动唤醒后再调用,不在回合内反复重试;
9
9
  - **强制多选**:所有问题一律多选(schema 不提供关闭开关);
10
- - **补充机制**:自动为每个问题追加「补充」选项,并自动在每轮末尾追加「本轮还有什么要补充或调整的吗?」;
10
+ - **补充机制**:每题的补充通过内置输入框「输入你的答案」完成,不再单独追加「补充」选项(避免与输入框重复);仅在每轮末尾追加一道轮级补充问题——单选「无需补充」+ 输入框补充(原先每题的补充复选框 + 轮末「有补充」选项与输入框重复,已移除);
11
11
  - **题干引导**:要求题干只含问题本身、不重复选项文本(仅模型侧引导,不做硬校验——避免误伤自然提及选项名称的题干)。
12
12
  - **enter_plan_mode**:为当前 agent 激活 DSH 计划模式。grilling 最后一轮答完、用户确认共识后调用,让 agent 写方案供审阅而不是直接开始执行;可通过 `exit_plan_mode` 或 `/plan off` 退出。
13
13
 
package/lib/index.js CHANGED
@@ -9,7 +9,10 @@ import "@deepseek-ai/dsh-user-questions";
9
9
  * ask_user_grilling:
10
10
  * - gate: refuses while background subagents are running (R1)
11
11
  * - forces multi-select on every question (R2)
12
- * - appends a per-question "Supplement" option and a round-end question (R3)
12
+ * - appends a round-end supplement question (R3) per-question supplement is
13
+ * via the built-in custom input ("Type your answer" / "输入你的答案"), no
14
+ * extra per-question "Supplement" option to avoid duplication with that
15
+ * field (see image.png issue: checkbox + input were redundant)
13
16
  * - stem/option separation is guidance only — never rejects stems (R4
14
17
  * relaxed: substring checks false-positive on legitimate stems)
15
18
  *
@@ -19,18 +22,12 @@ import "@deepseek-ai/dsh-user-questions";
19
22
  const name = "tool-ask-user-grilling";
20
23
  const inject = ["tools", "userQuestions"];
21
24
 
22
- const SUPPLEMENT_OPTION = {
23
- label: "Supplement",
24
- description: "Select this and write your supplement for this question in your reply.",
25
- };
26
-
27
25
  const ROUND_END_QUESTION = {
28
26
  id: "__grill_round_supplement__",
29
- question: "Anything else to add or adjust this round?",
30
- header: "Round supplement",
27
+ question: "这轮还有什么要补充或调整的吗?",
28
+ header: "轮末补充",
31
29
  options: [
32
- { label: "Nothing to add" },
33
- { label: "I have something to add (write it in my reply)", description: "Select this and write any additions or adjustments for this round in your reply." },
30
+ { label: "无需补充" },
34
31
  ],
35
32
  multiSelect: true,
36
33
  };
@@ -42,7 +39,7 @@ function displayName(entry) {
42
39
  function apply(ctx) {
43
40
  ctx.tools.register(defineTool({
44
41
  name: "ask_user_grilling",
45
- description: "Ask the user a ROUND of grilling questions (decision-tree interview). Use for grilling sessions (grill-me / grill-with-docs / triage / wayfinder / architecture grilling): send ALL frontier questions of the current round in ONE call. The tool forces multi-select, appends a per-question 'Supplement' option, and appends a round-end supplement question automatically. If background subagents are running, this tool returns blocked — do NOT retry within the same turn: end your turn and wait; the settlement notice will wake you automatically, then call again. Keep the question stem to the question itself, without repeating option labels (style guidance only — stems are never rejected). Example of one round with two questions: questions: [{ id: 'q1', question: 'Which issue tracker?', options: [{ label: 'GitHub' }, { label: 'Local markdown' }] }, { id: 'q2', question: 'Any deadline?', options: [{ label: 'This week' }, { label: 'Next month' }] }].",
42
+ description: "Ask the user a ROUND of grilling questions (decision-tree interview). Use for grilling sessions (grill-me / grill-with-docs / triage / wayfinder / architecture grilling): send ALL frontier questions of the current round in ONE call. The tool forces multi-select and appends a round-end supplement question automatically; per-question supplement is via the built-in custom input (\"Type your answer\" / \"输入你的答案\") — no extra per-question option is added (avoids duplication where a \"Supplement\" checkbox and the custom field were both shown). The round-end question has a single \"无需补充\" option and its supplement is also via custom input. If background subagents are running, this tool returns blocked — do NOT retry within the same turn: end your turn and wait; the settlement notice will wake you automatically, then call again. Keep the question stem to the question itself, without repeating option labels (style guidance only — stems are never rejected). Example of one round with two questions: questions: [{ id: 'q1', question: 'Which issue tracker?', options: [{ label: 'GitHub' }, { label: 'Local markdown' }] }, { id: 'q2', question: 'Any deadline?', options: [{ label: 'This week' }, { label: 'Next month' }] }].",
46
43
  parameters: {
47
44
  questions: {
48
45
  type: "array",
@@ -180,7 +177,7 @@ function apply(ctx) {
180
177
  };
181
178
  }
182
179
 
183
- // 3. transform: force multi-select (R2), append supplement option (R3)
180
+ // 3. transform: force multi-select (R2); per-question supplement is via the built-in custom input ("Type your answer"/"输入你的答案") — no extra option is added to avoid duplication with that field
184
181
  const questions = args.questions.map((question) => ({
185
182
  id: question.id,
186
183
  question: question.question,
@@ -190,12 +187,11 @@ function apply(ctx) {
190
187
  label: option.label,
191
188
  ...(option.description !== undefined ? { description: option.description } : {}),
192
189
  })),
193
- SUPPLEMENT_OPTION,
194
190
  ],
195
191
  multiSelect: true,
196
192
  }));
197
193
 
198
- // 4. round-end supplement question (R3)
194
+ // 4. round-end supplement question (R3) — single "无需补充" option; supplement is via custom input, so no "I have something to add" option (duplicates that field)
199
195
  questions.push(ROUND_END_QUESTION);
200
196
 
201
197
  // 5. ask through the userQuestions seam (UI renders from the service)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lynn123411/dsh-ask-user-grilling",
3
- "version": "0.1.1",
4
- "description": "DSH delivery adaptations for grilling rounds: ask_user_grilling (subagent gate / forced multi-select / supplement option / stem guidance) and enter_plan_mode. Does not modify any skill file.",
3
+ "version": "0.1.2",
4
+ "description": "DSH delivery adaptations for grilling rounds: ask_user_grilling (subagent gate / forced multi-select / round-end supplement / stem guidance) and enter_plan_mode. Does not modify any skill file.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "exports": {