@pi-unipi/unipi 3.0.0-alpha.4 → 3.0.0-alpha.6
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/CHANGELOG.md +42 -0
- package/README.md +1 -4
- package/package.json +21 -23
- package/packages/ask-user/README.md +55 -107
- package/packages/ask-user/ask-ui.ts +306 -732
- package/packages/ask-user/clipboard.ts +50 -0
- package/packages/ask-user/config.ts +73 -77
- package/packages/ask-user/package.json +2 -2
- package/packages/ask-user/questions.ts +151 -0
- package/packages/ask-user/skills/ask-user/SKILL.md +59 -133
- package/packages/ask-user/tools.ts +179 -432
- package/packages/autocomplete/package.json +1 -1
- package/packages/autocomplete/src/constants.ts +15 -13
- package/packages/autocomplete/src/sorting.ts +8 -0
- package/packages/background-tasks/package.json +2 -2
- package/packages/btw/package.json +2 -2
- package/packages/compactor/package.json +3 -3
- package/packages/compactor/src/compaction/source.ts +27 -8
- package/packages/core/constants.ts +4 -23
- package/packages/core/events.ts +0 -53
- package/packages/core/index.ts +3 -0
- package/packages/core/model-cache.ts +81 -7
- package/packages/core/package.json +2 -2
- package/packages/core/src/attach/detect.ts +163 -0
- package/packages/core/src/jev/chatter.ts +24 -0
- package/packages/core/src/package-colors.ts +2 -0
- package/packages/core/src/settings/catalog.ts +39 -15
- package/packages/core/src/settings/hub.ts +44 -10
- package/packages/core/src/settings/open.ts +49 -0
- package/packages/core/src/settings/schema.ts +8 -4
- package/packages/footer/package.json +3 -3
- package/packages/fusion/package.json +3 -3
- package/packages/fusion/src/picker.ts +36 -12
- package/packages/info-screen/package.json +2 -2
- package/packages/input-shortcuts/package.json +2 -2
- package/packages/kanboard/package.json +7 -7
- package/packages/long-horizon/package.json +2 -2
- package/packages/mcp/package.json +2 -2
- package/packages/memory/package.json +3 -3
- package/packages/notify/package.json +2 -2
- package/packages/skill-registry/README.md +55 -16
- package/packages/skill-registry/index.ts +223 -0
- package/packages/skill-registry/package.json +20 -4
- package/packages/skill-registry/skills/brainstorm/SKILL.md +16 -13
- package/packages/skill-registry/skills/gather-context/SKILL.md +10 -8
- package/packages/skill-registry/skills/plan/SKILL.md +23 -20
- package/packages/skill-registry/skills/review-work/SKILL.md +10 -7
- package/packages/skill-registry/skills/work/SKILL.md +15 -12
- package/packages/skill-registry/src/editor.ts +208 -0
- package/packages/skill-registry/src/judge.ts +293 -0
- package/packages/skill-registry/src/registry.ts +98 -0
- package/packages/skill-registry/src/settings.ts +258 -0
- package/packages/skill-registry/src/vault.ts +80 -0
- package/packages/subagents/README.md +0 -1
- package/packages/subagents/package.json +2 -2
- package/packages/subagents/src/index.ts +0 -6
- package/packages/unipi/bundled.js +20232 -20068
- package/packages/unipi/index.ts +2 -7
- package/packages/updater/package.json +2 -2
- package/packages/utility/README.md +67 -69
- package/packages/utility/package.json +2 -2
- package/packages/utility/skills/image/SKILL.md +37 -0
- package/packages/utility/skills/utility/SKILL.md +17 -60
- package/packages/utility/src/answer/extract.ts +128 -0
- package/packages/utility/src/answer/index.ts +213 -0
- package/packages/utility/src/answer/reply.ts +133 -0
- package/packages/utility/src/answer/web.ts +167 -0
- package/packages/utility/src/attach/index.ts +184 -0
- package/packages/utility/src/commands.ts +38 -147
- package/packages/utility/src/diagnostics/engine.ts +50 -5
- package/packages/utility/src/image/index.ts +33 -0
- package/packages/utility/src/image/models.ts +221 -0
- package/packages/{image/src → utility/src/image}/recognize.ts +2 -2
- package/packages/utility/src/image/settings.ts +178 -0
- package/packages/{image/src/image-source.ts → utility/src/image/source.ts} +1 -1
- package/packages/utility/src/image/tools.ts +168 -0
- package/packages/utility/src/image/transports.ts +186 -0
- package/packages/utility/src/index.ts +47 -389
- package/packages/utility/src/lifecycle/cleanup.ts +116 -311
- package/packages/utility/src/rename/gate.ts +102 -0
- package/packages/utility/src/rename/index.ts +191 -0
- package/packages/utility/src/rename/session.ts +170 -0
- package/packages/utility/src/render/parse.ts +156 -0
- package/packages/utility/src/render/pi-settings.ts +38 -0
- package/packages/utility/src/render/tools.ts +316 -0
- package/packages/utility/src/settings.ts +163 -231
- package/packages/utility/src/types.ts +1 -222
- package/packages/watchdog/index.ts +0 -1
- package/packages/watchdog/package.json +3 -3
- package/packages/web-api/package.json +2 -2
- package/packages/workflow/package.json +2 -2
- package/packages/workflow/src/permission/decide.ts +1 -1
- package/packages/image/README.md +0 -99
- package/packages/image/package.json +0 -61
- package/packages/image/skills/image/SKILL.md +0 -76
- package/packages/image/src/generate.ts +0 -256
- package/packages/image/src/index.ts +0 -135
- package/packages/image/src/models.ts +0 -519
- package/packages/image/src/openai-images-api.ts +0 -282
- package/packages/image/src/register-providers.ts +0 -209
- package/packages/image/src/settings.ts +0 -173
- package/packages/image/src/tools.ts +0 -326
- package/packages/subagents/src/badge-session.ts +0 -46
- package/packages/subagents/src/badge.ts +0 -43
- package/packages/utility/src/analytics/collector.ts +0 -293
- package/packages/utility/src/info-screen.ts +0 -80
- package/packages/utility/src/lifecycle/process.ts +0 -162
- package/packages/utility/src/prefix-cache.ts +0 -263
- package/packages/utility/src/skill-discovery.ts +0 -542
- package/packages/utility/src/tools/env.ts +0 -113
- package/packages/utility/src/tui/name-badge-state.ts +0 -315
- package/packages/utility/src/tui/name-badge.ts +0 -109
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,48 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [3.0.0-alpha.6] — 2026-09-28
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- `ask-user`: **rebuilt after Devin's question UI.** One `ask_user` call carries 1–4 questions (`questions: [{ header, question, options, multi_select }]`) with an automatic "Other" choice. Header chips show progress; digits pick; typing on "Other" needs no Enter and the text stays editable; ←→ switch questions; Enter moves on and submits on the last; unanswered questions are sent as skipped; `?` tells the agent you want to clarify first; Esc stops the turn. Pasted/dropped paths and Ctrl+V images in "Other" become `[Image #N]` / `[File #N]` and images reach the model. The transcript shows a short answer tree. The older single-question form is still accepted (`timeout` is ignored). Settings (/unipi:settings → Ask User): questions per call, what Esc does (stop the turn or send what's answered), whether number keys move on, "Other" agent-decided / always / never, and the "not ready" line — the old "allowed formats" switches are gone. Esc and `end_turn` options stop the turn cleanly instead of aborting it.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- `ask-user`: several `ask_user` calls in one message opened their dialogs at the same time, so only the last was answerable and the turn hung forever; the tool now runs one call at a time.
|
|
18
|
+
- `compactor`: answers from multi-question `ask_user` results are kept as "question → answer" decisions.
|
|
19
|
+
|
|
20
|
+
## [3.0.0-alpha.5] — 2026-09-28
|
|
21
|
+
|
|
22
|
+
### Breaking Changes
|
|
23
|
+
|
|
24
|
+
- **BREAKING: `@pi-unipi/image` removed.** Image generation, editing and recognition now live in `@pi-unipi/utility` (same `image` settings namespace, so existing configs keep working). **Migration path:** nothing to do with the umbrella package; if you installed `@pi-unipi/image` on its own, remove it and use `@pi-unipi/utility`.
|
|
25
|
+
- **BREAKING: utility slimmed.** Removed `/unipi:reload` (use pi's `/reload`), `/unipi:status`, `/unipi:env`, `/unipi:prefix-cache`, the agent tools `ctx_env` and `set_session_name`, the top name-badge bar, the analytics collector and the process-lifecycle signal handlers. **Migration path:** `/unipi:doctor` covers the health checks; sessions are named automatically (below) or with pi's `/name`. Old `badge.*` settings carry over to `rename.*`.
|
|
26
|
+
- **BREAKING: skill exposure moved** from `utility.skills` to the new `skills` namespace (`@pi-unipi/skill-registry`). Migrated automatically on first read.
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- `utility`: `/unipi:retry`, an alias of `/unipi:continue`.
|
|
31
|
+
- `utility`: **automatic session naming.** After each round, jev checks whether the round (your message plus what the agent did) established a subject and, for a named session, whether it moved to a different task; a throwaway session with a single `rename_session` tool writes the name. Greetings never rename; names set with `/name` are never overwritten; Herdr pane/tab sync kept.
|
|
32
|
+
- `utility`: **`/unipi:answer`** — answer the last reply without scrolling: `reply` (default: the reply scrolls above a fixed input box, like `/unipi:btw`), `questions` (one answer per question, Q/A template) or `web` (local form; over SSH it prints the `ssh -L` forward). A hint above the editor says when a reply asks questions.
|
|
33
|
+
- `utility`: **pasted images and files** become `[Image #N]` / `[File #N]` attachments with a chip row above the editor and inline previews in Kitty, Ghostty, iTerm2 and WezTerm; images are sent to the model as images.
|
|
34
|
+
- `utility`: **image tools** `image_generate`, `image_edit` (new) and `image_recognize`, with OpenRouter, fal and custom-endpoint routes, a key per provider, and model pickers filtered by input/output modality. Default model FLUX.2 [klein] 4B.
|
|
35
|
+
- `utility`: **response formatting** — Settings → Utility → Response formatting: `simple` (one line per tool), `regular` (pi's own) or `advanced` (highlighted commands incl. embedded heredoc/`-c` code, tinted syntax-highlighted diffs, test summaries, exit lines).
|
|
36
|
+
- `utility`: `/unipi:settings <search>` opens the hub filtered; typing `/settings` lists `/unipi:settings` first.
|
|
37
|
+
- `skill-registry`: now a real extension. **Skill settings…** grid (`/unipi:skills` → Skill settings…): per skill Enabled / Discoverable / Must show, per global or project scope, plus a skill vault at `~/.unipi/skill-vault` whose skills stay off until a scope turns them on (skill proxy, off by default).
|
|
38
|
+
- `core`: the shared model cache (`~/.unipi/config/models-cache.json`) records input/output modalities; the settings hub pickers and kanboard read it.
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- `skill-registry`: skill judging keeps skills named in the request, lists hidden skills by name in the system prompt, waits for the first real request instead of freezing on a greeting, and caps generic workflow skills.
|
|
43
|
+
- `fusion`: `/unipi:model` lists only your preset lead/sidekick models; typing searches the whole catalogue (also inside the lead/sidekick dropdowns).
|
|
44
|
+
- `utility`: `/unipi:cleanup` only removes files on an explicit list, previews them and asks first; v2 memory backups can never be removed. `/unipi:doctor` checks the model cache, the Decision Model key and skill exposure.
|
|
45
|
+
|
|
46
|
+
### Fixed
|
|
47
|
+
|
|
48
|
+
- `image`: generation failed for most users (only a pi-ai OpenRouter route with a key pi often couldn't see) and failures were reported to the agent as successes.
|
|
49
|
+
- `core`: capability-filtered model pickers hide entries with no declared input again.
|
|
50
|
+
|
|
9
51
|
## [3.0.0-alpha.4] — 2026-09-28
|
|
10
52
|
|
|
11
53
|
### Breaking Changes
|
package/README.md
CHANGED
|
@@ -33,7 +33,6 @@ pi install npm:@pi-unipi/unipi
|
|
|
33
33
|
|
|
34
34
|
**[Web API](./packages/web-api/README.md)** — Web search, page reading, content summarization. Defaults to [wigolo](https://github.com/KnockOutEZ/wigolo), a local-first engine with multi-engine search and on-device reranking — $0/query, no API key. Plus a smart-fetch engine with browser-grade TLS fingerprinting. Paid providers as fallbacks, and auto-selection falls through when a provider is unavailable.
|
|
35
35
|
|
|
36
|
-
**[Image](./packages/image/README.md)** — Generate images from a text prompt and analyze existing ones. 34 image models, plus vision analysis on any model that accepts image input, with a customizable system prompt.
|
|
37
36
|
|
|
38
37
|
**[MCP](./packages/mcp/README.md)** — Browse 7,800+ MCP servers, add them interactively. Tools from servers register automatically as Pi tools.
|
|
39
38
|
|
|
@@ -116,14 +115,12 @@ Coexists triggers enhance behavior when packages are installed together. Workflo
|
|
|
116
115
|
| `spawn_helper` / `get_helper_result` | subagents | Parallel agents |
|
|
117
116
|
| `memory_store` / `memory_search` / `memory_delete` | memory | Memory CRUD |
|
|
118
117
|
| `web_search` / `multi_web_content_read` / `web_llm_summarize` | web-api | Web research |
|
|
119
|
-
| `image_generate` / `image_recognize` |
|
|
118
|
+
| `image_generate` / `image_edit` / `image_recognize` | utility | Image generation, editing and vision (recognize hides while the session model has vision) |
|
|
120
119
|
| `notify_user` | notify | Push notifications |
|
|
121
120
|
| `sidekick` / `read_subagent` | fusion | Delegate to the persistent sidekick and collect its report |
|
|
122
121
|
| `bg_run` / `bg_status` / `bg_logs` / `bg_kill` / `bg_delegate` / `bg_result` | background-tasks | Long-running commands and background delegate agents |
|
|
123
122
|
| `ask_user` | ask-user | User input |
|
|
124
123
|
| `session_recall` / `context_budget` | compactor | Context management |
|
|
125
|
-
| `ctx_env` | utility | Environment info |
|
|
126
|
-
| `set_session_name` | utility | Session name for badge |
|
|
127
124
|
|
|
128
125
|
## Development
|
|
129
126
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-unipi/unipi",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.6",
|
|
4
4
|
"description": "All-in-one extension suite for Pi coding agent",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -70,7 +70,6 @@
|
|
|
70
70
|
"packages/notify/skills",
|
|
71
71
|
"packages/kanboard/skills",
|
|
72
72
|
"packages/updater/skills",
|
|
73
|
-
"packages/image/skills",
|
|
74
73
|
"packages/subagents/skills"
|
|
75
74
|
],
|
|
76
75
|
"prompts": [
|
|
@@ -84,27 +83,26 @@
|
|
|
84
83
|
"typebox": "^1.1.38"
|
|
85
84
|
},
|
|
86
85
|
"dependencies": {
|
|
87
|
-
"@pi-unipi/ask-user": "3.0.0-alpha.
|
|
88
|
-
"@pi-unipi/background-tasks": "3.0.0-alpha.
|
|
89
|
-
"@pi-unipi/btw": "3.0.0-alpha.
|
|
90
|
-
"@pi-unipi/command-enchantment": "3.0.0-alpha.
|
|
91
|
-
"@pi-unipi/compactor": "3.0.0-alpha.
|
|
92
|
-
"@pi-unipi/core": "3.0.0-alpha.
|
|
93
|
-
"@pi-unipi/footer": "3.0.0-alpha.
|
|
94
|
-
"@pi-unipi/
|
|
95
|
-
"@pi-unipi/
|
|
96
|
-
"@pi-unipi/
|
|
97
|
-
"@pi-unipi/
|
|
98
|
-
"@pi-unipi/
|
|
99
|
-
"@pi-unipi/
|
|
100
|
-
"@pi-unipi/
|
|
101
|
-
"@pi-unipi/
|
|
102
|
-
"@pi-unipi/
|
|
103
|
-
"@pi-unipi/
|
|
104
|
-
"@pi-unipi/
|
|
105
|
-
"@pi-unipi/
|
|
106
|
-
"@pi-unipi/
|
|
107
|
-
"@pi-unipi/workflow": "3.0.0-alpha.4"
|
|
86
|
+
"@pi-unipi/ask-user": "3.0.0-alpha.6",
|
|
87
|
+
"@pi-unipi/background-tasks": "3.0.0-alpha.6",
|
|
88
|
+
"@pi-unipi/btw": "3.0.0-alpha.6",
|
|
89
|
+
"@pi-unipi/command-enchantment": "3.0.0-alpha.6",
|
|
90
|
+
"@pi-unipi/compactor": "3.0.0-alpha.6",
|
|
91
|
+
"@pi-unipi/core": "3.0.0-alpha.6",
|
|
92
|
+
"@pi-unipi/footer": "3.0.0-alpha.6",
|
|
93
|
+
"@pi-unipi/fusion": "3.0.0-alpha.6",
|
|
94
|
+
"@pi-unipi/info-screen": "3.0.0-alpha.6",
|
|
95
|
+
"@pi-unipi/input-shortcuts": "3.0.0-alpha.6",
|
|
96
|
+
"@pi-unipi/kanboard": "3.0.0-alpha.6",
|
|
97
|
+
"@pi-unipi/mcp": "3.0.0-alpha.6",
|
|
98
|
+
"@pi-unipi/memory": "3.0.0-alpha.6",
|
|
99
|
+
"@pi-unipi/notify": "3.0.0-alpha.6",
|
|
100
|
+
"@pi-unipi/skill-registry": "3.0.0-alpha.6",
|
|
101
|
+
"@pi-unipi/subagents": "3.0.0-alpha.6",
|
|
102
|
+
"@pi-unipi/updater": "3.0.0-alpha.6",
|
|
103
|
+
"@pi-unipi/utility": "3.0.0-alpha.6",
|
|
104
|
+
"@pi-unipi/web-api": "3.0.0-alpha.6",
|
|
105
|
+
"@pi-unipi/workflow": "3.0.0-alpha.6"
|
|
108
106
|
},
|
|
109
107
|
"devDependencies": {
|
|
110
108
|
"@earendil-works/pi-agent-core": "^0.87.1",
|
|
@@ -1,124 +1,72 @@
|
|
|
1
1
|
# @pi-unipi/ask-user
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The `ask_user` tool: when the agent needs a decision from you, it asks 1–4 multiple-choice questions in one dialog and waits. Modelled on Devin's question UI.
|
|
4
4
|
|
|
5
|
-
Three input modes: single-select (pick one), multi-select (toggle several), freeform (type your own). The agent presents the question, you answer, it continues.
|
|
6
|
-
|
|
7
|
-
## Commands
|
|
8
|
-
|
|
9
|
-
Ask-user has no user commands. It's an agent tool package — the agent calls it when it needs input.
|
|
10
|
-
|
|
11
|
-
## Special Triggers
|
|
12
|
-
|
|
13
|
-
All workflow skills detect ask-user and use it for decision gates. Instead of the agent deciding on its own, it presents options and waits for your input. This happens naturally during brainstorm, plan, work, and other skills when the agent faces ambiguity.
|
|
14
|
-
|
|
15
|
-
For workflow handoffs, options can use `action: "new_session"` with a `prefill`. Selecting one opens a launcher where **Compact & run** queues the prefill after compaction (or a short fallback) and **Run directly** queues it immediately. If automatic queuing fails, the prefill is placed in the editor for you to submit manually.
|
|
16
|
-
|
|
17
|
-
The bundled skill guides the agent to use `ask_user` for high-stakes decisions — architecture choices, database selection, naming decisions, anything with lasting impact.
|
|
18
|
-
|
|
19
|
-
## Agent Tool
|
|
20
|
-
|
|
21
|
-
| Tool | Description |
|
|
22
|
-
|------|-------------|
|
|
23
|
-
| `ask_user` | Structured user input with options |
|
|
24
|
-
|
|
25
|
-
### Parameters
|
|
26
|
-
|
|
27
|
-
| Parameter | Type | Default | Description |
|
|
28
|
-
|-----------|------|---------|-------------|
|
|
29
|
-
| `question` | string | required | The question to ask |
|
|
30
|
-
| `context` | string? | — | Additional context shown before question |
|
|
31
|
-
| `options` | array? | [] | Multiple-choice options |
|
|
32
|
-
| `allowMultiple` | boolean? | false | Enable multi-select mode |
|
|
33
|
-
| `allowFreeform` | boolean? | true | Allow freeform text input |
|
|
34
|
-
| `timeout` | number? | — | Auto-dismiss after N ms |
|
|
35
|
-
|
|
36
|
-
### Example
|
|
37
|
-
|
|
38
|
-
```typescript
|
|
39
|
-
ask_user({
|
|
40
|
-
question: "Which database should we use?",
|
|
41
|
-
options: [
|
|
42
|
-
{ label: "PostgreSQL", description: "Reliable, feature-rich" },
|
|
43
|
-
{ label: "SQLite", description: "Simple, serverless" },
|
|
44
|
-
],
|
|
45
|
-
})
|
|
46
5
|
```
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
action: "new_session",
|
|
58
|
-
prefill: "the implementation step specs:2026-05-06-feature-plan.md",
|
|
59
|
-
},
|
|
60
|
-
{ label: "Done for now", value: "done", action: "end_turn" },
|
|
61
|
-
],
|
|
62
|
-
allowFreeform: false,
|
|
63
|
-
})
|
|
6
|
+
── Planet ✓ · Foods 2 · Last book ─────────────────────────────────────
|
|
7
|
+
What was the last book you read?
|
|
8
|
+
Can't remember
|
|
9
|
+
Don't read books
|
|
10
|
+
❭ Other (type your own)
|
|
11
|
+
└ Dune, cover: [Image #1]
|
|
12
|
+
[Image #1] red-cube.png · 570 KB
|
|
13
|
+
───────────────────────────────────────────────────────────────────────
|
|
14
|
+
↑↓ navigate · ↵ select · ctrl+v image · ←→ switch question · esc cancel
|
|
15
|
+
? Not ready to answer, help me out!
|
|
64
16
|
```
|
|
65
17
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
| Launcher choice | Behavior |
|
|
69
|
-
|-----------------|----------|
|
|
70
|
-
| 🧹 Compact & run | Starts context compaction, returns immediately, then queues/submits the prefill as a follow-up message from the compaction callback or a short fallback timer |
|
|
71
|
-
| ▶ Run directly | Queues/submits the prefill immediately as a follow-up message |
|
|
72
|
-
| ✕ Cancel | Cancels the handoff; no message is queued |
|
|
73
|
-
|
|
74
|
-
The tool result is rendered as `queued compact → ...` or `queued direct → ...`. If automatic delivery fails, ask-user falls back to editor prefill and warns you to press Enter.
|
|
75
|
-
|
|
76
|
-
### History Expansion
|
|
18
|
+
## Answering
|
|
77
19
|
|
|
78
|
-
|
|
20
|
+
| Key | Action |
|
|
21
|
+
|-----|--------|
|
|
22
|
+
| `↑` `↓` | Move between options |
|
|
23
|
+
| `1`–`9` | Pick that option (single choice: picks and moves on; multi-select: toggles) |
|
|
24
|
+
| `space` | Toggle (multi-select) |
|
|
25
|
+
| `enter` | Select and go to the next question; on the last one, send everything |
|
|
26
|
+
| `←` `→`, `tab` | Switch question (in a non-empty "Other" they move the text cursor) |
|
|
27
|
+
| type | On "Other", just type — no Enter needed. The option numbers hide so digits are text |
|
|
28
|
+
| paste / drop / `ctrl+v` | In "Other": a pasted or dropped image/file path, or a clipboard image (Ctrl+V), becomes `[Image #N]` / `[File #N]`; images are sent to the model with your answer |
|
|
29
|
+
| `?` | Not ready to answer: the agent is told you want to clarify first |
|
|
30
|
+
| `esc` | Cancel and stop the agent's turn (or send what's answered — see Settings) |
|
|
79
31
|
|
|
80
|
-
|
|
32
|
+
Questions you leave unanswered are sent as **skipped** — skipping never blocks. The header chips show progress: `✓` answered, a number for multi-select picks.
|
|
81
33
|
|
|
82
|
-
|
|
83
|
-
|------|------|
|
|
84
|
-
| Single-select | Up/Down navigate, Enter select, Esc cancel |
|
|
85
|
-
| Multi-select | Up/Down navigate, Space toggle, Enter submit, Esc cancel |
|
|
86
|
-
| Freeform | Type text, Enter submit, Esc back |
|
|
34
|
+
In the transcript the answers stay as a short tree (`● Asked user 3 questions` / `│ Planet: Mars` / `└ Last book: Dune`).
|
|
87
35
|
|
|
88
|
-
|
|
36
|
+
## For the agent
|
|
89
37
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
**Multi-select:**
|
|
38
|
+
```ts
|
|
39
|
+
ask_user({
|
|
40
|
+
questions: [{
|
|
41
|
+
header: "Database", // ≤16 chars, shown as a chip
|
|
42
|
+
question: "Which database should the service use?",
|
|
43
|
+
options: [ // 2–4; "Other" is added automatically
|
|
44
|
+
{ label: "Postgres", description: "JSON columns, full-text search" },
|
|
45
|
+
{ label: "SQLite", description: "Zero setup; single writer" },
|
|
46
|
+
],
|
|
47
|
+
multi_select: false, // optional
|
|
48
|
+
other: true, // optional; false removes "Other"
|
|
49
|
+
}],
|
|
50
|
+
})
|
|
105
51
|
```
|
|
106
|
-
─────────────────────────────
|
|
107
|
-
Which features to enable?
|
|
108
|
-
─────────────────────────────
|
|
109
|
-
> [x] Logging
|
|
110
|
-
[ ] Metrics
|
|
111
|
-
[x] Tracing
|
|
112
|
-
[ ] Type something...
|
|
113
52
|
|
|
114
|
-
|
|
115
|
-
─────────────────────────────
|
|
116
|
-
```
|
|
53
|
+
The result is `User answered your questions:` followed by a JSON object keyed by question: `{ "selected": [...], "custom_text": "...", "skipped": false }`. Attached images follow as image content.
|
|
117
54
|
|
|
118
|
-
|
|
55
|
+
- Tool calls from one message run one at a time, so several `ask_user` calls can never hide each other (they used to: only the last dialog was answerable and the turn hung).
|
|
56
|
+
- Options can carry `action: "end_turn"` or `action: "new_session"` with a `prefill` — the workflow skills use these for handoffs; a launcher offers **Compact & run** or **Run directly**.
|
|
57
|
+
- The older single-question form (`question`, `context`, `options`, `allowMultiple`, `allowFreeform`) is still accepted; `timeout` is ignored — you answer in your own time.
|
|
58
|
+
- Inside a subagent the tool fails with instructions to report the question to the lead instead.
|
|
119
59
|
|
|
120
|
-
|
|
60
|
+
## Settings
|
|
121
61
|
|
|
122
|
-
|
|
62
|
+
`/unipi:settings` → Ask User (changes apply to the next question, no restart):
|
|
123
63
|
|
|
124
|
-
|
|
64
|
+
| Setting | Default | What it does |
|
|
65
|
+
|---------|---------|--------------|
|
|
66
|
+
| Enable ask_user | on | Give the agent the tool |
|
|
67
|
+
| Notify when asked | on | Send a notification while the agent waits for you |
|
|
68
|
+
| Questions per call | 4 | How many questions one dialog may hold (1–4; the tool description updates in new sessions) |
|
|
69
|
+
| Esc | stop the agent's turn | Or: send what's answered, the rest as skipped |
|
|
70
|
+
| Number keys move on | on | In a single-choice question, 1–9 also goes to the next question |
|
|
71
|
+
| "Other" choice | agent decides | Or: always / never offer "Other (type your own)", whatever the agent asked for |
|
|
72
|
+
| "Not ready" line | on | Show "? Not ready to answer, help me out!" (the `?` key works either way) |
|