@staff0rd/assist 0.958.0 → 0.960.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.
- package/README.md +2 -1
- package/claude/advice/ask-question.md +6 -0
- package/claude/settings.json +4 -0
- package/claude/skills/review-ci/scripts/review.mjs +113 -113
- package/dist/commands/extension/extension/updates.json +2 -2
- package/dist/commands/sessions/web/bundle.js +496 -496
- package/dist/index.js +405 -266
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -288,7 +288,7 @@ Rules are `- **<code>** — **<title>** — <text>` bullets, the title optional,
|
|
|
288
288
|
|
|
289
289
|
### Hooks
|
|
290
290
|
|
|
291
|
-
- `assist cli-hook` - PreToolUse hook auto-approving CLI commands from `allowed.cli-reads` / `allowed.cli-writes`,
|
|
291
|
+
- `assist cli-hook` - PreToolUse hook auto-approving CLI commands from `allowed.cli-reads` / `allowed.cli-writes`, denying reads of `~/.assist/restricted`, and (with `sessions.askQuestion` on) denying `AskUserQuestion` in assist sessions in favour of `assist ask-question`
|
|
292
292
|
- `assist cli-hook add <cli>` - Discover a CLI's commands and auto-permit read-only ones
|
|
293
293
|
- `assist cli-hook check <command> [--tool <tool>]` - Check whether a command would be auto-approved
|
|
294
294
|
- `assist cli-hook deny` - List all deny rules
|
|
@@ -357,6 +357,7 @@ Rules are `- **<code>** — **<title>** — <text>` bullets, the title optional,
|
|
|
357
357
|
- `assist prompts` - Show the most frequently denied tool calls
|
|
358
358
|
- `assist chart [--title <title>]` - Draw a terminal line chart of a `label value` series piped in on stdin, one pair per line
|
|
359
359
|
- `assist ask --title <title> --body <markdown|->` - Put a plan, summary or proposed decision in the session's web preview pane and wait for the user to approve or reject it; `--body -` reads stdin
|
|
360
|
+
- `assist ask-question --json <file|->` - Ask `AskUserQuestion` questions (1-4, each with 2-4 options, plus an Other free-text answer) as a form in the session's web preview pane and wait for the answers; prints the same result text as the built-in tool, exits non-zero when dismissed, and outside an assist session or with `sessions.askQuestion` off (the default) exits non-zero so Claude uses the built-in tool
|
|
360
361
|
- `assist show --body <markdown|-> [--title <title>]` - Render markdown in the session's web preview pane so long links, paths and code can be clicked and copied unbroken; `--body -` reads stdin
|
|
361
362
|
|
|
362
363
|
### Project setup
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Asking questions
|
|
3
|
+
when: askQuestion
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
In an assist session (`ASSIST_SESSION=1`), don't use the built-in AskUserQuestion tool; the user answers from the session's web preview pane, which can't drive the terminal prompt. Write the same AskUserQuestion input as JSON (`{"questions": [...]}`, 1-4 questions each with `question`, `header`, `multiSelect` and 2-4 `options` of `label`, `description` and optional `preview`) to a scratch file and run `assist ask-question --json - < <file>` as a background task, doing no other work until it returns. It opens as a form in the preview pane and blocks until answered. Answering exits 0 and prints the same answer text AskUserQuestion returns; dismissing exits non-zero, meaning the user declined to answer. To revise a still-pending question, re-run it directly; the earlier task then exits 0 as superseded — ignore its result. Outside an assist session it exits non-zero, so use AskUserQuestion.
|
package/claude/settings.json
CHANGED
|
@@ -26,6 +26,10 @@
|
|
|
26
26
|
"matcher": "Read|Grep|Glob",
|
|
27
27
|
"hooks": [{ "type": "command", "command": "assist cli-hook" }]
|
|
28
28
|
},
|
|
29
|
+
{
|
|
30
|
+
"matcher": "AskUserQuestion",
|
|
31
|
+
"hooks": [{ "type": "command", "command": "assist cli-hook" }]
|
|
32
|
+
},
|
|
29
33
|
{
|
|
30
34
|
"matcher": "Edit|Write|MultiEdit",
|
|
31
35
|
"hooks": [{ "type": "command", "command": "assist edit-hook" }]
|