@fyeeme/pi-ask-user-lite 2.0.2 → 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 +7 -0
  2. package/index.ts +11 -3
  3. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [2.0.3] - 2026-10-01
6
+
7
+ ### Changed
8
+
9
+ - `ask_user` now registers with pi 0.99 `exposure: "model-only"`: declared to the model, unreachable from codemode scripts and nested tool execution (ask-the-user is a model-level decision). No `outputSchema` is declared — model-only tools have no programmatic consumer of structured results. Model-facing 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
+
5
12
  ## [2.0.2] - 2026-09-09
6
13
 
7
14
  ### Fixed
package/index.ts CHANGED
@@ -15,7 +15,7 @@
15
15
  * `/tree` inspection.
16
16
  */
17
17
 
18
- import type { ExtensionAPI, ExtensionCommandContext, ExtensionUIContext, ToolDefinition } from "@earendil-works/pi-coding-agent";
18
+ import type { ExtensionAPI, ExtensionCommandContext, ExtensionToolContext, ExtensionUIContext, ToolDefinition } from "@earendil-works/pi-coding-agent";
19
19
  import type { Theme } from "@earendil-works/pi-coding-agent";
20
20
  import { Editor, type EditorTheme, Key, matchesKey, Text, type TUI, visibleWidth, wrapTextWithAnsi } from "@earendil-works/pi-tui";
21
21
  import { Type } from "typebox";
@@ -761,7 +761,12 @@ const askUserTool: ToolDefinition<typeof AskParamsSchema, AskUserDetails> = {
761
761
  "Ask the user one or more clarifying questions with selectable options. " +
762
762
  "Use when choices have materially different tradeoffs the user must decide. " +
763
763
  "The user can always provide free-form input via an automatic 'Other' option.",
764
- promptSnippet: "Ask the user structured questions with options during execution",
764
+ // pi 0.99: model-only — declared to the model, unreachable from codemode
765
+ // scripts / nested tool execution (ask-the-user is a model-level decision;
766
+ // spec: ask-user-exposure). No outputSchema: model-only tools have no
767
+ // programmatic consumer of structuredContent.
768
+ exposure: "model-only",
769
+ promptSnippet: "Ask the user structured questions with options during execution",
765
770
  promptGuidelines: [
766
771
  "Use ask_user only after exhausting repo conventions, configs, and docs; reserve it for decisions whose options have materially different tradeoffs.",
767
772
  ],
@@ -968,7 +973,10 @@ async function runAskDemo(ctx: ExtensionCommandContext): Promise<void> {
968
973
  const run = async (label: string, params: AskParams): Promise<string> => {
969
974
  ctx.ui.notify(`ask-demo ${label} — follow the dialog instructions`, "info");
970
975
  try {
971
- const result = await askUserTool.execute(`demo-${label}`, params, undefined, undefined, ctx);
976
+ // pi 0.99 split tool and command contexts into sibling branches; the demo
977
+ // only exercises ExtensionContext members (ui/abort), so the cast is safe.
978
+ const toolCtx = ctx as unknown as ExtensionToolContext;
979
+ const result = await askUserTool.execute(`demo-${label}`, params, undefined, undefined, toolCtx);
972
980
  const text = result.content[0]?.type === "text" ? result.content[0].text : "";
973
981
  ctx.ui.notify(`ask-demo ${label} → ${text.split("\n").filter(Boolean).join(" | ").slice(0, 200)}`, "info");
974
982
  return text;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fyeeme/pi-ask-user-lite",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Structured ask_user tool for pi — lets the LLM surface clarifying questions with options, multi-select, recommended defaults, and free-form Other input.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -43,13 +43,13 @@
43
43
  "typecheck": "tsc"
44
44
  },
45
45
  "peerDependencies": {
46
- "@earendil-works/pi-coding-agent": ">=0.84.1",
47
- "@earendil-works/pi-tui": ">=0.84.1",
46
+ "@earendil-works/pi-coding-agent": ">=0.99.0",
47
+ "@earendil-works/pi-tui": ">=0.99.0",
48
48
  "typebox": ">=1.0.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@earendil-works/pi-coding-agent": "0.84.1",
52
- "@earendil-works/pi-tui": "0.84.1",
51
+ "@earendil-works/pi-coding-agent": "0.99.2",
52
+ "@earendil-works/pi-tui": "0.99.2",
53
53
  "@types/node": "22.19.19",
54
54
  "typebox": "1.1.38",
55
55
  "typescript": "5.9.3",