@mrclrchtr/supi-ask-user 1.3.1 → 1.4.0

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 (48) hide show
  1. package/README.md +125 -67
  2. package/node_modules/@mrclrchtr/supi-core/README.md +52 -41
  3. package/node_modules/@mrclrchtr/supi-core/package.json +1 -1
  4. package/node_modules/@mrclrchtr/supi-core/src/api.ts +13 -13
  5. package/node_modules/@mrclrchtr/supi-core/src/{config-settings.ts → config/config-settings.ts} +2 -2
  6. package/node_modules/@mrclrchtr/supi-core/src/{context-provider-registry.ts → context/context-provider-registry.ts} +1 -1
  7. package/node_modules/@mrclrchtr/supi-core/src/extension.ts +1 -1
  8. package/node_modules/@mrclrchtr/supi-core/src/index.ts +13 -13
  9. package/node_modules/@mrclrchtr/supi-core/src/{settings-registry.ts → settings/settings-registry.ts} +1 -1
  10. package/package.json +2 -2
  11. package/src/api.ts +19 -0
  12. package/src/ask-user.ts +65 -131
  13. package/src/index.ts +23 -1
  14. package/src/normalize.ts +153 -142
  15. package/src/render/result.ts +98 -0
  16. package/src/render/transcript.ts +65 -0
  17. package/src/render/tree-summary.ts +10 -0
  18. package/src/schema.ts +41 -38
  19. package/src/session/controller.ts +163 -0
  20. package/src/session/lock.ts +19 -0
  21. package/src/tool/guidance.ts +15 -0
  22. package/src/types.ts +50 -56
  23. package/src/ui/choose-renderer.ts +11 -0
  24. package/src/ui/overlay-actions.ts +42 -0
  25. package/src/ui/overlay-render.ts +196 -0
  26. package/src/ui/overlay-view.ts +216 -0
  27. package/src/ui/overlay.ts +388 -0
  28. package/src/ui/types.ts +35 -0
  29. package/src/flow.ts +0 -224
  30. package/src/format.ts +0 -66
  31. package/src/render/ui-rich-render-editor.ts +0 -51
  32. package/src/render/ui-rich-render-env.ts +0 -15
  33. package/src/render/ui-rich-render-footer.ts +0 -55
  34. package/src/render/ui-rich-render-markdown.ts +0 -33
  35. package/src/render/ui-rich-render-notes.ts +0 -80
  36. package/src/render/ui-rich-render-types.ts +0 -17
  37. package/src/render/ui-rich-render.ts +0 -323
  38. package/src/render.ts +0 -95
  39. package/src/result.ts +0 -90
  40. package/src/ui/ui-rich-handlers.ts +0 -369
  41. package/src/ui/ui-rich-inline.ts +0 -77
  42. package/src/ui/ui-rich-state.ts +0 -179
  43. package/src/ui/ui-rich.ts +0 -144
  44. /package/node_modules/@mrclrchtr/supi-core/src/{config.ts → config/config.ts} +0 -0
  45. /package/node_modules/@mrclrchtr/supi-core/src/{context-messages.ts → context/context-messages.ts} +0 -0
  46. /package/node_modules/@mrclrchtr/supi-core/src/{context-tag.ts → context/context-tag.ts} +0 -0
  47. /package/node_modules/@mrclrchtr/supi-core/src/{settings-command.ts → settings/settings-command.ts} +0 -0
  48. /package/node_modules/@mrclrchtr/supi-core/src/{settings-ui.ts → settings/settings-ui.ts} +0 -0
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # @mrclrchtr/supi-ask-user
2
2
 
3
- Structured `ask_user` tool and rich questionnaire overlay for the [pi coding agent](https://github.com/earendil-works/pi). Lets the agent pause and ask you focused, typed decisions — picking from lists, multi-selecting, or entering freeform text.
3
+ Adds a redesigned `ask_user` tool to the [pi coding agent](https://github.com/earendil-works/pi).
4
+ It lets the model pause and request a small decision form when explicit human input is required.
4
5
 
5
6
  ## Install
6
7
 
@@ -14,34 +15,121 @@ For local development:
14
15
  pi install ./packages/supi-ask-user
15
16
  ```
16
17
 
17
- After editing the source, run `/reload` to pick up changes.
18
+ After editing the source, run `/reload`.
18
19
 
19
- ## What it adds
20
+ ## What you get
20
21
 
21
- Registers the `ask_user` tool — callable by the model during an agent run. When the agent needs explicit user input to proceed, it invokes `ask_user` with a questionnaire, and the extension opens an interactive overlay.
22
+ After install, pi gets one new tool:
22
23
 
23
- **Question types:**
24
+ - `ask_user` — open a blocking decision form during a run
24
25
 
25
- | Type | Use |
26
- |------|-----|
27
- | `choice` | Pick one option (default) or multiple options (`multi: true`) from a list |
28
- | `text` | Freeform text input |
26
+ Use cases:
29
27
 
30
- For yes/no questions, use `choice` with options `{value: "yes", label: "Yes"}` and `{value: "no", label: "No"}` — there is no separate `yesno` type.
28
+ - clarify a narrow implementation choice
29
+ - confirm a risky or destructive action
30
+ - ask for a preference the repo cannot answer
31
+ - gather one short cluster of related decisions before proceeding
31
32
 
32
- **Key behaviors:**
33
+ It is **not** meant for long surveys or open-ended discovery.
33
34
 
34
- - Returns an error in non-interactive or print-mode sessions (no fallback dialog).
35
- - Only one questionnaire runs at a time — concurrent `ask_user` calls return an error.
36
- - Cancelling or closing the overlay aborts the current agent turn.
37
- - Completed answers appear as a readable summary entry in the `/tree` view.
35
+ ## Request shape
38
36
 
39
- ## Usage
37
+ `ask_user` accepts a small form with optional framing text:
40
38
 
41
- The agent decides when to call `ask_user`. You control how it's used through the system prompt guidelines the extension injects. A minimal example the agent might construct:
39
+ - `title` short overall title
40
+ - `intro` — why the agent is asking
41
+ - `questions` — 1-4 related questions
42
+ - `allowPartialSubmit` — let the user submit partial progress
43
+ - `allowDiscuss` — let the user switch back into discussion instead of giving a final decision
44
+
45
+ ## Question types
46
+
47
+ ### `choice`
48
+
49
+ Use for fixed options.
50
+
51
+ Supported fields:
52
+
53
+ - `options`
54
+ - `required`
55
+ - `multi`
56
+ - `allowOther` — single-select only
57
+ - `recommendation`
58
+ - `initial`
59
+ - option `description`
60
+ - option `preview`
61
+
62
+ ### `text`
63
+
64
+ Use for freeform input.
65
+
66
+ Supported fields:
67
+
68
+ - `required`
69
+ - `initial`
70
+ - `placeholder`
71
+
72
+ ## Result statuses
73
+
74
+ A completed form returns one of these statuses in `details.status`:
75
+
76
+ - `submitted` — full submit
77
+ - `partial` — partial submit with missing required answers
78
+ - `discuss` — user wants to continue the conversation instead of deciding
79
+ - `cancelled` — user explicitly cancelled
80
+ - `aborted` — the interaction was aborted externally
81
+
82
+ `details.answersById` contains structured answers keyed by question id.
83
+
84
+ ## Behavior
85
+
86
+ - interactive UI with custom overlay support required
87
+ - `ask_user` does not provide a degraded dialog fallback
88
+ - only one `ask_user` interaction may be active at a time
89
+ - cancellation or abort stops the current agent turn
90
+ - completed forms are summarized in the session tree
91
+
92
+ ## Rich overlay controls
93
+
94
+ `ask_user` requires the rich overlay renderer. The current interaction model is:
95
+
96
+ ### Choice questions
97
+
98
+ - `↑↓` move between rows
99
+ - `Space` selects the focused option in single-select mode
100
+ - `Space` toggles the focused option in multi-select mode
101
+ - `Enter` submits the current choice answer
102
+ - `←` goes back to the previous question
103
+ - `Esc` cancels the whole form
104
+
105
+ On wide terminals, choice previews render side-by-side with the option list. On narrow terminals, previews stack below.
106
+
107
+ Visible rows are kept for exceptional paths only:
108
+
109
+ - `Other…`
110
+ - `Discuss instead…`
111
+ - `Submit partial answers`
112
+ - `Skip question` for optional questions
113
+
114
+ There is no visible Back row or Cancel row in the overlay.
115
+
116
+ ### Text questions
117
+
118
+ - the text editor is visible immediately
119
+ - there is no separate `Enter response…` row
120
+ - `Enter` submits the current text answer
121
+ - `↓` moves from the editor into any visible exceptional action rows
122
+ - `↑` from the first action row returns focus to the editor
123
+ - `Esc` cancels the whole form
124
+
125
+ Text questions may still show exceptional action rows such as `Discuss instead…` or `Submit partial answers` below the editor when those paths are enabled.
126
+
127
+ ## Example
42
128
 
43
129
  ```json
44
130
  {
131
+ "title": "Formatter decision",
132
+ "intro": "I need one explicit choice before I update the repo config.",
45
133
  "questions": [
46
134
  {
47
135
  "type": "choice",
@@ -53,63 +141,33 @@ The agent decides when to call `ask_user`. You control how it's used through the
53
141
  { "value": "prettier", "label": "Prettier" }
54
142
  ],
55
143
  "recommendation": "biome",
56
- "default": "biome"
144
+ "initial": "biome"
57
145
  },
58
146
  {
59
147
  "type": "text",
60
148
  "id": "reason",
61
149
  "header": "Reason",
62
- "prompt": "Why this formatter?",
63
- "default": "Faster linting"
150
+ "prompt": "Anything I should optimize for?",
151
+ "required": false,
152
+ "placeholder": "optional"
64
153
  }
65
- ]
66
- }
67
- ```
68
-
69
- **Multi-select example:**
70
-
71
- ```json
72
- {
73
- "type": "choice",
74
- "multi": true,
75
- "id": "features",
76
- "header": "Features",
77
- "prompt": "Which features to include?",
78
- "options": [
79
- { "value": "auth", "label": "Authentication" },
80
- { "value": "caching", "label": "Caching" },
81
- { "value": "logging", "label": "Logging" }
82
154
  ],
83
- "recommendation": ["auth", "caching"]
155
+ "allowDiscuss": true
84
156
  }
85
157
  ```
86
158
 
87
- **Per-question features:**
88
-
89
- - `multi` — set to `true` to enable multi-select (replaces the former `multichoice` type). Default `false`.
90
- - `recommendation` — highlights the preferred option with a visual badge. String for single-select, array for multi-select.
91
- - `default` — pre-selects a starting value the user can accept with a single keystroke. String for single-select, array for multi-select.
92
- - `allowOther` — lets the user type a custom answer instead of picking from options.
93
- - `allowDiscuss` — lets the user opt into a discussion instead of deciding immediately.
94
- - `preview` — rich content (markdown, code, or ASCII mockups) shown alongside the option.
95
-
96
- **Questionnaire-level controls:**
97
-
98
- - `allowSkip` — exposes a Skip action so the user can submit partial results without answering all required questions.
99
-
100
- ## Limits
101
-
102
- - **1–4 questions** per questionnaire. Use one decision per call; chain multiple calls when you need more questions.
103
- - **2–12 options** per `choice` question (single or multi-select).
104
- - **60 characters** max per question header.
105
- - **4000 characters** max per question prompt.
106
-
107
- ## Requirements
108
-
109
- - `@earendil-works/pi-coding-agent`
110
- - `@earendil-works/pi-tui`
111
- - `typebox`
112
-
113
- ## Source
114
-
115
- Entrypoint: `src/ask-user.ts` — registers the `ask_user` tool, drives the questionnaire overlay, and manages the concurrency lock.
159
+ ## Source layout
160
+
161
+ - `src/ask-user.ts` — tool registration and execution boundary
162
+ - `src/schema.ts` — tool-call schema
163
+ - `src/normalize.ts` — validation and lowering into internal types
164
+ - `src/session/controller.ts` — headless decision-form state
165
+ - `src/ui/choose-renderer.ts` — custom-overlay capability gate
166
+ - `src/ui/overlay.ts` — rich custom interaction orchestration
167
+ - `src/ui/overlay-view.ts` — choice/action row modeling and split-layout helpers
168
+ - `src/ui/overlay-render.ts` — rich overlay rendering built on `Markdown`, `Editor`, and `SelectList`
169
+ - `src/ui/overlay-actions.ts` — exceptional-action list wiring for text questions
170
+ - `src/ui/types.ts` — shared UI runner types
171
+ - `src/render/result.ts` — tool result shaping
172
+ - `src/render/transcript.ts` — transcript rendering
173
+ - `src/render/tree-summary.ts` — session-tree summary labels
@@ -1,65 +1,78 @@
1
1
  # @mrclrchtr/supi-core
2
2
 
3
- Shared infrastructure for SuPi packages.
3
+ Shared infrastructure for SuPi extensions.
4
+
5
+ This package is mainly for extension authors. It gives you a common config system, settings plumbing, context helpers, registries, and a small extension surface that registers `/supi-settings`.
4
6
 
5
7
  ## Install
6
8
 
7
- Use it as a dependency in another extension package:
9
+ ### As a dependency for another extension
8
10
 
9
11
  ```bash
10
12
  pnpm add @mrclrchtr/supi-core
11
13
  ```
12
14
 
13
- ## Package role
14
-
15
- `@mrclrchtr/supi-core` now has two explicit surfaces:
15
+ ### As a pi package
16
16
 
17
- - `@mrclrchtr/supi-core/api` — shared library helpers for other SuPi packages
18
- - `@mrclrchtr/supi-core/extension` — a minimal pi extension that registers `/supi-settings`
19
-
20
- `pi.extensions` still points at the real file path `./src/extension.ts` inside the package. The `/api` and `/extension` paths are consumer-facing package exports, not manifest aliases.
17
+ ```bash
18
+ pi install npm:@mrclrchtr/supi-core
19
+ ```
21
20
 
22
- ## What it provides
21
+ Installing it as a pi package adds the minimal `/supi-settings` extension surface.
23
22
 
24
- Current exports cover:
23
+ ## Package surfaces
25
24
 
26
- - shared config loading, scoped reads, writes, and key removal
27
- - config-backed settings registration helpers for `/supi-settings`
28
- - the shared settings registry, overlay UI, and `registerSettingsCommand()` helper
29
- - XML `<extension-context>` wrapping plus context-message utilities
30
- - context-provider and debug-event registries reused across SuPi packages
31
- - project root and path helpers reused by packages such as `supi-lsp`
25
+ - `@mrclrchtr/supi-core/api` reusable helpers for other packages and extensions
26
+ - `@mrclrchtr/supi-core/extension` minimal pi extension that registers `/supi-settings`
32
27
 
33
- ## Config system
28
+ ## What you get from the API
34
29
 
35
- Config resolution order:
30
+ ### Config helpers
36
31
 
37
- ```text
38
- defaults <- global <- project
39
- ```
32
+ - `loadSupiConfig()` — merged config with resolution order `defaults <- global <- project`
33
+ - `loadSupiConfigForScope()` load one scope at a time for settings UIs
34
+ - `writeSupiConfig()` — persist values
35
+ - `removeSupiConfigKey()` — remove a key or override
40
36
 
41
37
  Config file locations:
42
38
 
43
39
  - global: `~/.pi/agent/supi/config.json`
44
40
  - project: `.pi/supi/config.json`
45
41
 
46
- Main helpers:
42
+ ### Settings helpers
43
+
44
+ - `registerSettings()` — register an arbitrary settings section
45
+ - `registerConfigSettings()` — register a config-backed settings section with scoped persistence helpers
46
+ - `registerSettingsCommand()` — register `/supi-settings`
47
+ - `openSettingsOverlay()` — open the shared settings UI directly
48
+ - `createInputSubmenu()` — helper for simple text-entry submenus
49
+
50
+ The built-in settings UI supports:
47
51
 
48
- - `loadSupiConfig()` — effective merged config (`defaults <- global <- project`)
49
- - `loadSupiConfigForScope()` raw single-scope config for settings UIs (`defaults <- selected scope`)
50
- - `writeSupiConfig()`
51
- - `removeSupiConfigKey()`
52
- - `registerConfigSettings()`
52
+ - project/global scope toggle
53
+ - grouped extension sections
54
+ - searchable setting lists
53
55
 
54
- ## Context and settings helpers
56
+ ### Context helpers
55
57
 
56
- - `wrapExtensionContext()`
58
+ - `wrapExtensionContext()` — wrap injected text in SuPi's `<extension-context>` tag
57
59
  - `findLastUserMessageIndex()`
58
60
  - `getContextToken()`
61
+ - `getPromptContent()`
59
62
  - `pruneAndReorderContextMessages()`
60
- - `registerSettings()`
61
- - `registerSettingsCommand()`
62
- - `openSettingsOverlay()`
63
+ - `restorePromptContent()`
64
+
65
+ ### Shared registries
66
+
67
+ - context-provider registry for `/supi-context`
68
+ - debug-event registry for producers that want shared debug capture
69
+ - settings registry used by `/supi-settings`
70
+
71
+ ### Project and session helpers
72
+
73
+ - project-root detection and directory walking helpers such as `findProjectRoot()` and `walkProject()`
74
+ - active-branch session helper: `getActiveBranchEntries()`
75
+ - terminal helpers such as `formatTitle()`, `signalWaiting()`, and `signalDone()`
63
76
 
64
77
  ## Example
65
78
 
@@ -80,17 +93,15 @@ registerConfigSettings({
80
93
  });
81
94
 
82
95
  const message = wrapExtensionContext("my-extension", "hello", {
83
- turn: 1,
84
96
  file: "CLAUDE.md",
97
+ turn: 1,
85
98
  });
86
99
  ```
87
100
 
88
- ## Requirements
89
-
90
- - `@earendil-works/pi-coding-agent`
91
- - `@earendil-works/pi-tui`
92
-
93
101
  ## Source
94
102
 
95
- - Library surface: `src/api.ts`
96
- - Extension surface: `src/extension.ts`
103
+ - `src/api.ts` — exported library surface
104
+ - `src/extension.ts` — minimal `/supi-settings` entrypoint
105
+ - `src/config.ts` — shared config loading and writing
106
+ - `src/config-settings.ts` — config-backed settings registration helper
107
+ - `src/settings-ui.ts` — shared settings overlay
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-core",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "SuPi core — shared infrastructure for SuPi extensions (XML context tags, config system)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -2,30 +2,30 @@
2
2
  // Provides XML context tag wrapping, unified config system, context-message utilities,
3
3
  // and settings registry for supi-wide TUI settings.
4
4
 
5
- export type { SupiConfigLocation, SupiConfigOptions } from "./config.ts";
5
+ export type { SupiConfigLocation, SupiConfigOptions } from "./config/config.ts";
6
6
  export {
7
7
  loadSupiConfig,
8
8
  loadSupiConfigForScope,
9
9
  removeSupiConfigKey,
10
10
  writeSupiConfig,
11
- } from "./config.ts";
12
- export type { ConfigSettingsHelpers, ConfigSettingsOptions } from "./config-settings.ts";
13
- export { registerConfigSettings } from "./config-settings.ts";
14
- export type { ContextMessageLike } from "./context-messages.ts";
11
+ } from "./config/config.ts";
12
+ export type { ConfigSettingsHelpers, ConfigSettingsOptions } from "./config/config-settings.ts";
13
+ export { registerConfigSettings } from "./config/config-settings.ts";
14
+ export type { ContextMessageLike } from "./context/context-messages.ts";
15
15
  export {
16
16
  findLastUserMessageIndex,
17
17
  getContextToken,
18
18
  getPromptContent,
19
19
  pruneAndReorderContextMessages,
20
20
  restorePromptContent,
21
- } from "./context-messages.ts";
22
- export type { ContextProvider } from "./context-provider-registry.ts";
21
+ } from "./context/context-messages.ts";
22
+ export type { ContextProvider } from "./context/context-provider-registry.ts";
23
23
  export {
24
24
  clearRegisteredContextProviders,
25
25
  getRegisteredContextProviders,
26
26
  registerContextProvider,
27
- } from "./context-provider-registry.ts";
28
- export { wrapExtensionContext } from "./context-tag.ts";
27
+ } from "./context/context-provider-registry.ts";
28
+ export { wrapExtensionContext } from "./context/context-tag.ts";
29
29
  export type {
30
30
  DebugAgentAccess,
31
31
  DebugEvent,
@@ -64,14 +64,14 @@ export {
64
64
  walkProject,
65
65
  } from "./project-roots.ts";
66
66
  export { getActiveBranchEntries } from "./session-utils.ts";
67
- export { registerSettingsCommand } from "./settings-command.ts";
68
- export type { SettingsScope, SettingsSection } from "./settings-registry.ts";
67
+ export { registerSettingsCommand } from "./settings/settings-command.ts";
68
+ export type { SettingsScope, SettingsSection } from "./settings/settings-registry.ts";
69
69
  export {
70
70
  clearRegisteredSettings,
71
71
  getRegisteredSettings,
72
72
  registerSettings,
73
- } from "./settings-registry.ts";
74
- export { createInputSubmenu, openSettingsOverlay } from "./settings-ui.ts";
73
+ } from "./settings/settings-registry.ts";
74
+ export { createInputSubmenu, openSettingsOverlay } from "./settings/settings-ui.ts";
75
75
  export type { TitleTarget } from "./terminal.ts";
76
76
  export {
77
77
  DONE_SYMBOL,
@@ -2,9 +2,9 @@
2
2
  // Wraps registerSettings() and centralizes selected-scope loading + scoped persistence.
3
3
 
4
4
  import type { SettingItem } from "@earendil-works/pi-tui";
5
+ import type { SettingsScope } from "../settings/settings-registry.ts";
6
+ import { registerSettings } from "../settings/settings-registry.ts";
5
7
  import { loadSupiConfigForScope, removeSupiConfigKey, writeSupiConfig } from "./config.ts";
6
- import type { SettingsScope } from "./settings-registry.ts";
7
- import { registerSettings } from "./settings-registry.ts";
8
8
 
9
9
  export interface ConfigSettingsHelpers {
10
10
  /** Write a key to the selected scope's config section. */
@@ -3,7 +3,7 @@
3
3
  // Extensions declare context data providers via `registerContextProvider()` during their
4
4
  // factory function. The `/supi-context` command reads them via `getRegisteredContextProviders()`.
5
5
 
6
- import { createRegistry } from "./registry-utils.ts";
6
+ import { createRegistry } from "../registry-utils.ts";
7
7
 
8
8
  export interface ContextProvider {
9
9
  /** Unique identifier — e.g. "rtk" */
@@ -1 +1 @@
1
- export { registerSettingsCommand as default } from "./settings-command.ts";
1
+ export { registerSettingsCommand as default } from "./settings/settings-command.ts";
@@ -2,30 +2,30 @@
2
2
  // Provides XML context tag wrapping, unified config system, context-message utilities,
3
3
  // and settings registry for supi-wide TUI settings.
4
4
 
5
- export type { SupiConfigLocation, SupiConfigOptions } from "./config.ts";
5
+ export type { SupiConfigLocation, SupiConfigOptions } from "./config/config.ts";
6
6
  export {
7
7
  loadSupiConfig,
8
8
  loadSupiConfigForScope,
9
9
  removeSupiConfigKey,
10
10
  writeSupiConfig,
11
- } from "./config.ts";
12
- export type { ConfigSettingsHelpers, ConfigSettingsOptions } from "./config-settings.ts";
13
- export { registerConfigSettings } from "./config-settings.ts";
14
- export type { ContextMessageLike } from "./context-messages.ts";
11
+ } from "./config/config.ts";
12
+ export type { ConfigSettingsHelpers, ConfigSettingsOptions } from "./config/config-settings.ts";
13
+ export { registerConfigSettings } from "./config/config-settings.ts";
14
+ export type { ContextMessageLike } from "./context/context-messages.ts";
15
15
  export {
16
16
  findLastUserMessageIndex,
17
17
  getContextToken,
18
18
  getPromptContent,
19
19
  pruneAndReorderContextMessages,
20
20
  restorePromptContent,
21
- } from "./context-messages.ts";
22
- export type { ContextProvider } from "./context-provider-registry.ts";
21
+ } from "./context/context-messages.ts";
22
+ export type { ContextProvider } from "./context/context-provider-registry.ts";
23
23
  export {
24
24
  clearRegisteredContextProviders,
25
25
  getRegisteredContextProviders,
26
26
  registerContextProvider,
27
- } from "./context-provider-registry.ts";
28
- export { wrapExtensionContext } from "./context-tag.ts";
27
+ } from "./context/context-provider-registry.ts";
28
+ export { wrapExtensionContext } from "./context/context-tag.ts";
29
29
  export type {
30
30
  DebugAgentAccess,
31
31
  DebugEvent,
@@ -64,14 +64,14 @@ export {
64
64
  walkProject,
65
65
  } from "./project-roots.ts";
66
66
  export { getActiveBranchEntries } from "./session-utils.ts";
67
- export { registerSettingsCommand } from "./settings-command.ts";
68
- export type { SettingsScope, SettingsSection } from "./settings-registry.ts";
67
+ export { registerSettingsCommand } from "./settings/settings-command.ts";
68
+ export type { SettingsScope, SettingsSection } from "./settings/settings-registry.ts";
69
69
  export {
70
70
  clearRegisteredSettings,
71
71
  getRegisteredSettings,
72
72
  registerSettings,
73
- } from "./settings-registry.ts";
74
- export { createInputSubmenu, openSettingsOverlay } from "./settings-ui.ts";
73
+ } from "./settings/settings-registry.ts";
74
+ export { createInputSubmenu, openSettingsOverlay } from "./settings/settings-ui.ts";
75
75
  export type { TitleTarget } from "./terminal.ts";
76
76
  export {
77
77
  DONE_SYMBOL,
@@ -4,7 +4,7 @@
4
4
  // factory function. The generic settings UI reads them via `getRegisteredSettings()`.
5
5
 
6
6
  import type { SettingItem } from "@earendil-works/pi-tui";
7
- import { createRegistry } from "./registry-utils.ts";
7
+ import { createRegistry } from "../registry-utils.ts";
8
8
 
9
9
  export type SettingsScope = "project" | "global";
10
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-ask-user",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
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.3.1"
24
+ "@mrclrchtr/supi-core": "1.4.0"
25
25
  },
26
26
  "bundledDependencies": [
27
27
  "@mrclrchtr/supi-core"
package/src/api.ts CHANGED
@@ -1 +1,20 @@
1
1
  export { default } from "./ask-user.ts";
2
+ export { AskUserValidationError, normalizeQuestionnaire } from "./normalize.ts";
3
+ export { AskUserParamsSchema } from "./schema.ts";
4
+ export { AskUserController } from "./session/controller.ts";
5
+ export { ActiveQuestionnaireLock } from "./session/lock.ts";
6
+ export type {
7
+ Answer,
8
+ AskUserDetails,
9
+ AskUserErrorDetails,
10
+ AskUserOutcome,
11
+ AskUserStatus,
12
+ AskUserToolDetails,
13
+ ChoiceAnswer,
14
+ CustomAnswer,
15
+ NormalizedChoiceQuestion,
16
+ NormalizedQuestion,
17
+ NormalizedQuestionnaire,
18
+ NormalizedTextQuestion,
19
+ TextAnswer,
20
+ } from "./types.ts";