@fyeeme/pi-ask-user 2.0.1 → 2.0.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/index.ts +7 -9
  3. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [2.0.3] - 2026-10-01
6
+
7
+ ### Changed
8
+
9
+ - The `ask` tool now registers with pi 0.99 `exposure: "model-only"`: declared to the model, unreachable from codemode scripts and nested tool execution. No `outputSchema` is declared — model-only tools have no programmatic consumer of structured results. Model-facing dialog behavior is unchanged.
10
+ - Peer dependency floor raised to `@earendil-works/pi-coding-agent >= 0.99.0`; dev toolchain pinned to 0.99.2.
11
+
12
+ ## [2.0.2] - 2026-09-09
13
+
14
+ ### Fixed
15
+
16
+ - Terminal bell fires only in TUI mode (`ctx.mode === "tui"`) — RPC stdout is the JSON protocol channel.
17
+ - Removed an unreachable empty-questions error branch (the schema's `minItems: 1` already rejects it).
18
+
5
19
  ## [2.0.1] - 2026-08-27
6
20
 
7
21
  Renamed to `@fyeeme/pi-ask-user` (formerly `@fyeeme/pi-omp-ask`, whose 2.0.0 release carried this codebase); the lightweight `ask_user` extension formerly published under this name now lives as `@fyeeme/pi-ask-user-lite`.
package/index.ts CHANGED
@@ -200,6 +200,10 @@ export default function ompAskExtension(pi: ExtensionAPI): void {
200
200
  name: "ask",
201
201
  label: "Ask",
202
202
  description: ASK_DESCRIPTION,
203
+ // pi 0.99: model-only — declared to the model, unreachable from codemode
204
+ // scripts / nested tool execution (spec: ask-user-exposure). No
205
+ // outputSchema: model-only tools have no programmatic consumer.
206
+ exposure: "model-only",
203
207
  promptSnippet: "Ask the user a clarifying question",
204
208
  promptGuidelines: [
205
209
  "Use ask only after exhausting repo conventions, configs, and docs; reserve it for decisions whose options have materially different tradeoffs.",
@@ -244,15 +248,9 @@ export default function ompAskExtension(pi: ExtensionAPI): void {
244
248
 
245
249
  // omp ask.notify → terminal bell (pi extensions cannot send desktop
246
250
  // notifications or read settings). omp's setting is opt-out-able, so
247
- // the bell stays configurable via PI_OMK_ASK_NOTIFY=0.
248
- if (process.env.PI_OMK_ASK_NOTIFY !== "0") process.stdout.write("\x07");
249
-
250
- if (params.questions.length === 0) {
251
- return {
252
- content: [{ type: "text" as const, text: "Error: questions must not be empty" }],
253
- details: {},
254
- };
255
- }
251
+ // the bell stays configurable via PI_OMK_ASK_NOTIFY=0. Terminal-direct:
252
+ // TUI only — RPC stdout is the JSON protocol channel (Mode Behavior).
253
+ if (ctx.mode === "tui" && process.env.PI_OMK_ASK_NOTIFY !== "0") process.stdout.write("\x07");
256
254
 
257
255
  const richQuestions: ExtensionAskDialogQuestion[] = params.questions.map(q => ({
258
256
  id: q.id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fyeeme/pi-ask-user",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "oh-my-pi's `ask` tool migrated to a pi extension — tabbed multi-question dialog with a Submit review page, inactivity countdown, RPC degradation, and headless hiding.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -46,13 +46,13 @@
46
46
  "typecheck": "tsc"
47
47
  },
48
48
  "peerDependencies": {
49
- "@earendil-works/pi-coding-agent": ">=0.84.1",
50
- "@earendil-works/pi-tui": ">=0.84.1",
49
+ "@earendil-works/pi-coding-agent": ">=0.99.0",
50
+ "@earendil-works/pi-tui": ">=0.99.0",
51
51
  "typebox": ">=1.0.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@earendil-works/pi-coding-agent": "0.84.1",
55
- "@earendil-works/pi-tui": "0.84.1",
54
+ "@earendil-works/pi-coding-agent": "0.99.2",
55
+ "@earendil-works/pi-tui": "0.99.2",
56
56
  "@types/node": "22.19.19",
57
57
  "typebox": "1.1.38",
58
58
  "typescript": "5.9.3",