@pi-archimedes/ask 2.5.1 → 2.6.3
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 +49 -35
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,37 +1,43 @@
|
|
|
1
1
|
# @pi-archimedes/ask
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Keep the decisions. Delegate the work.**
|
|
4
4
|
|
|
5
|
-
When
|
|
6
|
-
|
|
7
|
-
## What you get
|
|
8
|
-
|
|
9
|
-
- **Tabbed multi-question flow** — submit review for multiple questions at once
|
|
10
|
-
- **Single-question picker** — instant submit for quick decisions
|
|
11
|
-
- **Inline note editing** — add custom notes and context per option
|
|
12
|
-
- **Markdown context descriptions** — rich context descriptions rendered above options
|
|
13
|
-
- **Automatic "Other" handling** — built-in custom response option with auto-focus
|
|
14
|
-
- **Subagent support** — subagents can call `ask` and questions appear in the parent agent's TUI via bidirectional IPC
|
|
15
|
-
|
|
16
|
-
## Screenshots
|
|
17
|
-
|
|
18
|
-

|
|
5
|
+
When an agent needs you, ask turns the need into a structured prompt right in the terminal — options, inline notes, a freeform fallback — so the answer carries your exact intent back. From subagents, too: their questions surface in the parent TUI, the agent waits, and the work carries on with your choice. No copy-pasting messages between panes to stay involved.
|
|
19
6
|
|
|
20
7
|
## Install
|
|
21
8
|
|
|
9
|
+
Standalone:
|
|
10
|
+
|
|
22
11
|
```bash
|
|
23
12
|
pi install npm:@pi-archimedes/ask
|
|
24
13
|
```
|
|
25
14
|
|
|
26
|
-
Or
|
|
15
|
+
Or the full suite instead:
|
|
27
16
|
|
|
28
17
|
```bash
|
|
29
18
|
pi install npm:pi-archimedes
|
|
30
19
|
```
|
|
31
20
|
|
|
32
|
-
|
|
21
|
+
New to Pi? Pi itself is a one-time global install and needs Node.js ≥ 22.19.0:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
|
|
25
|
+
```
|
|
33
26
|
|
|
34
|
-
|
|
27
|
+
After installing Pi, choose one installation command above, then `cd` into your project and run `pi`. Inside the session, `/login` signs you in and `/model` picks a model — the [setup section](https://github.com/danielcherubini/pi-archimedes#setup) covers the first run. `/reload` picks the tool up in a running session.
|
|
28
|
+
|
|
29
|
+
## What you get
|
|
30
|
+
|
|
31
|
+
- **Tabbed multi-question flows** — arrow keys move between related questions; a final batch review submits the whole set in one step.
|
|
32
|
+
- **Single-question picker** — for fast multiple-choice questions, keyboard-driven: up/down to move, `Enter` to submit, `Esc` to cancel. Nothing requires a mouse.
|
|
33
|
+
- **Inline note per option** — `Tab` opens a note editor on the hovered option; `Enter` submits it. Notes travel back with the answer, so context and constraints ride along.
|
|
34
|
+
- **Multiple selection** — `multi: true` collects several answers from one question.
|
|
35
|
+
- **Built-in "Other (type your own)"** — whenever the options don't cover it, a freeform response field is always available.
|
|
36
|
+
- **Markdown context** — the agent can attach formatted descriptions, headers, and code blocks above the options, so the question presents context you can actually read.
|
|
37
|
+
|
|
38
|
+
## Tool usage
|
|
39
|
+
|
|
40
|
+
### Single quick question
|
|
35
41
|
|
|
36
42
|
```jsonc
|
|
37
43
|
{
|
|
@@ -47,38 +53,46 @@ Single question example:
|
|
|
47
53
|
}
|
|
48
54
|
```
|
|
49
55
|
|
|
50
|
-
Multi-question with
|
|
56
|
+
### Multi-question flow with markdown context and multiple selection
|
|
51
57
|
|
|
52
58
|
```jsonc
|
|
53
59
|
{
|
|
54
60
|
"questions": [
|
|
55
61
|
{
|
|
56
62
|
"id": "priority",
|
|
57
|
-
"question": "What
|
|
58
|
-
"description": "Choose the
|
|
63
|
+
"question": "What is the implementation priority?",
|
|
64
|
+
"description": "Choose the initial focus area for this milestone.",
|
|
65
|
+
"recommended": 0,
|
|
59
66
|
"options": [
|
|
60
|
-
{ "label": "Core
|
|
61
|
-
{ "label": "
|
|
62
|
-
{ "label": "
|
|
63
|
-
]
|
|
64
|
-
"recommended": 0
|
|
67
|
+
{ "label": "Core architecture first" },
|
|
68
|
+
{ "label": "Unit tests first" },
|
|
69
|
+
{ "label": "CLI interface first" }
|
|
70
|
+
]
|
|
65
71
|
},
|
|
66
72
|
{
|
|
67
|
-
"id": "
|
|
68
|
-
"question": "
|
|
73
|
+
"id": "constraints",
|
|
74
|
+
"question": "Select applicable constraints:",
|
|
75
|
+
"multi": true,
|
|
69
76
|
"options": [
|
|
70
77
|
{ "label": "No breaking changes" },
|
|
71
|
-
{ "label": "
|
|
72
|
-
{ "label": "
|
|
73
|
-
]
|
|
74
|
-
"multi": true
|
|
78
|
+
{ "label": "Zero external dependencies" },
|
|
79
|
+
{ "label": "Strict backward compatibility" }
|
|
80
|
+
]
|
|
75
81
|
}
|
|
76
82
|
]
|
|
77
83
|
}
|
|
78
84
|
```
|
|
79
85
|
|
|
80
|
-
|
|
86
|
+
An option the agent marks `recommended` is flagged in the UI; `description` renders as markdown above the options.
|
|
87
|
+
|
|
88
|
+
## Subagent relay
|
|
89
|
+
|
|
90
|
+
When a subagent dispatched by `@pi-archimedes/subagent` calls `ask`, the same prompt relayed over the bidirectional IPC channel appears in your live terminal, even mid-stream — the subagent blocks while you answer and resumes carrying your exact choices. It works alongside the live streaming and cost tracking, no temp files or pipes. This relay only applies to Archimedes-dispatched subagents; a question from a directly-called agent simply renders in-line.
|
|
91
|
+
|
|
92
|
+
<div align="center">
|
|
93
|
+
<img src="https://raw.githubusercontent.com/danielcherubini/pi-archimedes/main/docs/images/ask-subagent.png" width="700" alt="Ask prompt routed from subagent to parent TUI">
|
|
94
|
+
</div>
|
|
81
95
|
|
|
82
|
-
|
|
96
|
+
On/off is managed by the suite: toggle via `/plugins` (`archimedes.ask.enabled`, default on).
|
|
83
97
|
|
|
84
|
-
← Back to
|
|
98
|
+
← [Back to pi-archimedes](https://github.com/danielcherubini/pi-archimedes)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-archimedes/ask",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"main": "./src/index.ts",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@pi-archimedes/core": "2.
|
|
14
|
+
"@pi-archimedes/core": "2.6.3"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@earendil-works/pi-coding-agent": ">=0.1.0",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"typebox": ">=1.1.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@earendil-works/pi-coding-agent": "^0.
|
|
23
|
-
"@earendil-works/pi-tui": "^0.
|
|
22
|
+
"@earendil-works/pi-coding-agent": "^0.85.1",
|
|
23
|
+
"@earendil-works/pi-tui": "^0.85.1",
|
|
24
24
|
"typebox": "^1.1.38",
|
|
25
25
|
"typescript": "^6.0.0"
|
|
26
26
|
},
|