@mrclrchtr/supi-ask-user 1.11.3 → 1.12.1

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.
package/README.md CHANGED
@@ -63,9 +63,8 @@ const controller = new AskUserController(questionnaire);
63
63
  |-------|------|-------------|
64
64
  | `title` | string (optional) | Short overall title for the form |
65
65
  | `intro` | string (optional) | Why the agent is asking |
66
- | `questions` | array (1–4) | Choice or text questions |
66
+ | `questions` | array (1–10) | Choice or text questions |
67
67
  | `allowPartialSubmit` | boolean (optional) | Let the user submit partial progress |
68
- | `allowDiscuss` | boolean (optional) | Let the user switch back into discussion instead of giving a final decision |
69
68
 
70
69
  ## Questions
71
70
 
@@ -126,9 +125,9 @@ A completed form returns a result with `details.status` set to one of:
126
125
  The tool registers the following prompt guidance that the model sees:
127
126
 
128
127
  - Use ask_user only for blocking user input, not open-ended interviews or repo facts.
129
- - Use ask_user with 1-4 related questions; prefer one when possible.
128
+ - Use ask_user with 1-10 related questions; prefer one when possible.
130
129
  - Use ask_user `choice` for fixed options and ask_user `text` for freeform input; yes/no should be a `choice`.
131
- - Keep one ask_user form active at a time; use `allowOther` only for single-select choice and `allowDiscuss`/`allowPartialSubmit` only when actionable.
130
+ - Keep one ask_user form active at a time; use `allowOther` only for single-select choice and `allowPartialSubmit` only when actionable.
132
131
 
133
132
  ## UI controls
134
133
 
@@ -148,7 +147,7 @@ Notes are available only for real `choice` options. They do not apply to `text`
148
147
  Only exceptional action rows are visible:
149
148
 
150
149
  - `Other…` — when `allowOther` is enabled
151
- - `Discuss instead…` — when `allowDiscuss` is enabled
150
+ - `Discuss instead…` — always available
152
151
  - `Submit partial answers` — when `allowPartialSubmit` is enabled
153
152
  - `Skip question` — for optional questions
154
153
 
@@ -192,7 +191,7 @@ Exceptional action rows (`Discuss instead…`, `Submit partial answers`) may app
192
191
  "placeholder": "optional"
193
192
  }
194
193
  ],
195
- "allowDiscuss": true
194
+ "allowPartialSubmit": true
196
195
  }
197
196
  ```
198
197
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-core",
3
- "version": "1.11.3",
3
+ "version": "1.12.1",
4
4
  "description": "SuPi core — shared infrastructure for SuPi extensions (XML context tags, config system)",
5
5
  "license": "MIT",
6
6
  "repository": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-ask-user",
3
- "version": "1.11.3",
3
+ "version": "1.12.1",
4
4
  "description": "SuPi ask-user extension — rich questionnaire UI for structured agent-user decisions",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "main": "src/api.ts",
23
23
  "dependencies": {
24
- "@mrclrchtr/supi-core": "1.11.3"
24
+ "@mrclrchtr/supi-core": "1.12.1"
25
25
  },
26
26
  "bundledDependencies": [
27
27
  "@mrclrchtr/supi-core"
package/src/normalize.ts CHANGED
@@ -50,7 +50,6 @@ export function normalizeQuestionnaire(params: AskUserParams): NormalizedQuestio
50
50
  ...(intro ? { intro } : {}),
51
51
  questions,
52
52
  allowPartialSubmit: params.allowPartialSubmit ?? false,
53
- allowDiscuss: params.allowDiscuss ?? false,
54
53
  };
55
54
  }
56
55
 
package/src/schema.ts CHANGED
@@ -86,11 +86,6 @@ export const AskUserParamsSchema = Type.Object({
86
86
  description: "Allow partial submission",
87
87
  }),
88
88
  ),
89
- allowDiscuss: Type.Optional(
90
- Type.Boolean({
91
- description: "Allow discussion handoff",
92
- }),
93
- ),
94
89
  });
95
90
 
96
91
  export type AskUserParams = Static<typeof AskUserParamsSchema>;
@@ -180,7 +180,7 @@ export class AskUserController {
180
180
  }
181
181
 
182
182
  finishDiscuss(message?: string): boolean {
183
- if (!this.questionnaire.allowDiscuss || this.isTerminal) return false;
183
+ if (this.isTerminal) return false;
184
184
  this.status = "discuss";
185
185
  this.discussMessage = trimOptional(message);
186
186
  return true;
@@ -1,13 +1,13 @@
1
1
  // Prompt guidance and tool description for the redesigned ask_user tool.
2
2
 
3
3
  export const toolDescription =
4
- "Ask the user for a focused blocking decision. Use 1-4 related `choice` or `text` questions, and keep only one ask_user form active at a time.";
4
+ "Ask the user for a focused blocking decision. Use 1-10 related `choice` or `text` questions, and keep only one ask_user form active at a time.";
5
5
 
6
6
  export const promptSnippet = "ask_user — request a focused blocking user decision";
7
7
 
8
8
  export const promptGuidelines = [
9
9
  "Use ask_user only for blocking user input, not open-ended interviews or repo facts.",
10
- "Use ask_user with 1-4 related questions; prefer one when possible.",
10
+ "Use ask_user with 1-10 related questions; prefer one when possible.",
11
11
  "Use ask_user `choice` for fixed options and ask_user `text` for freeform input; yes/no should be a `choice`.",
12
- "Keep one ask_user form active at a time; use `allowOther` only for single-select choice and `allowDiscuss`/`allowPartialSubmit` only when actionable.",
12
+ "Keep one ask_user form active at a time; use `allowOther` only for single-select choice and `allowPartialSubmit` only when actionable.",
13
13
  ];
package/src/types.ts CHANGED
@@ -40,7 +40,6 @@ export interface NormalizedQuestionnaire {
40
40
  intro?: string;
41
41
  questions: NormalizedQuestion[];
42
42
  allowPartialSubmit: boolean;
43
- allowDiscuss: boolean;
44
43
  }
45
44
 
46
45
  /**
@@ -94,7 +93,7 @@ export type AskUserToolDetails = AskUserDetails | AskUserErrorDetails;
94
93
 
95
94
  export const ASK_USER_LIMITS = {
96
95
  minQuestions: 1,
97
- maxQuestions: 4,
96
+ maxQuestions: 10,
98
97
  minChoiceOptions: 2,
99
98
  maxChoiceOptions: 12,
100
99
  maxHeaderLength: 60,
@@ -302,7 +302,7 @@ function buildExceptionalActions(
302
302
  ): OverlayAction[] {
303
303
  const actions: OverlayAction[] = [];
304
304
  if (!required) actions.push("skip");
305
- if (controller.questionnaire.allowDiscuss) actions.push("discuss");
305
+ actions.push("discuss");
306
306
  if (controller.canPartialSubmit()) actions.push("partial");
307
307
  return actions;
308
308
  }