@howaboua/pi-ask 0.0.8 → 0.0.10

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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # @howaboua/pi-ask
2
2
 
3
+ ## 0.0.10
4
+
5
+ - Requires Pi 1.0.0 or later.
6
+
7
+ Fixed Ask text cursor and input-method candidate window placement in Pi's fullscreen interface.
8
+
9
+ ## 0.0.9
10
+
11
+ - Removed redundant tool guidance from Ask, Shepherdr, Skills and Browser. Code and Notebook Mode now show one callable contract per tool, with detailed Browser and agent rules in help.
12
+
3
13
  ## 0.0.8
4
14
 
5
15
  - Shepherdr now discovers and answers waiting questions invoked inside Code and Notebook Mode.
package/ask/contracts.ts CHANGED
@@ -4,30 +4,21 @@ import { type Static, Type } from "typebox";
4
4
  const ASK_DELIVERIES = ["wait", "steer"] as const;
5
5
 
6
6
  const ChoiceSchema = Type.Object({
7
- label: Type.String({ description: "Short choice." }),
8
- description: Type.Optional(Type.String({ description: "Optional detail." })),
7
+ label: Type.String(),
8
+ description: Type.Optional(Type.String()),
9
9
  });
10
10
 
11
11
  const PromptSchema = Type.Object({
12
- title: Type.String({ description: "Short prompt." }),
13
- body: Type.Optional(Type.String({ description: "Context or evidence." })),
14
- multiple: Type.Optional(Type.Boolean({ description: "Allow multiple." })),
15
- choices: Type.Optional(
16
- Type.Array(ChoiceSchema, { description: "Choices; omit for free text." }),
17
- ),
12
+ title: Type.String(),
13
+ body: Type.Optional(Type.String()),
14
+ multiple: Type.Optional(Type.Boolean()),
15
+ choices: Type.Optional(Type.Array(ChoiceSchema)),
18
16
  });
19
17
 
20
18
  export const AskParameters = Type.Object({
21
- handoff: Type.Optional(
22
- Type.Boolean({ description: "Wait for user action." }),
23
- ),
24
- prompts: Type.Array(PromptSchema, { description: "Prompts." }),
25
- delivery: Type.Optional(
26
- StringEnum(ASK_DELIVERIES, {
27
- description:
28
- "Wait for a gating response; steer while continuing reversible work. Omit to wait.",
29
- }),
30
- ),
19
+ handoff: Type.Optional(Type.Boolean()),
20
+ prompts: Type.Array(PromptSchema),
21
+ delivery: Type.Optional(StringEnum(ASK_DELIVERIES)),
31
22
  });
32
23
 
33
24
  export type PromptChoice = Static<typeof ChoiceSchema>;
package/ask/tool.ts CHANGED
@@ -43,13 +43,12 @@ export function createAskRuntime({
43
43
  const tool = defineTool({
44
44
  name: "ask",
45
45
  label: "Ask",
46
- description: "Request user input or action. Requires interactive UI.",
46
+ description: "Request user input or action",
47
47
  parameters: AskParameters,
48
- promptSnippet: "Request human input or action.",
49
48
  promptGuidelines: [
50
- "ask: Use steer only while useful reversible work can continue; wait for gating answers and handoffs, stating a handoff's completion signal.",
49
+ "ask: Omit delivery to wait; steer only while reversible work can continue. Handoffs wait for user action; state the completion signal",
51
50
  "ask: For reviews, make each finding a prompt with disposition choices; do not report first.",
52
- "ask: Do not add Other/rephrase; it is automatic.",
51
+ "ask: Other/rephrase is automatic; omit choices for free text",
53
52
  ],
54
53
  executionMode: "sequential",
55
54
  async execute(toolCallId, params, signal, _onUpdate, ctx) {
package/ask/tui.ts CHANGED
@@ -217,6 +217,13 @@ export async function askInTui(
217
217
  return lines;
218
218
  };
219
219
  return {
220
+ get focused() {
221
+ return editor.focused;
222
+ },
223
+ set focused(value: boolean) {
224
+ editor.focused = value;
225
+ cached = undefined;
226
+ },
220
227
  render,
221
228
  handleInput,
222
229
  dispose: () => signal?.removeEventListener("abort", abort),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@howaboua/pi-ask",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "Interactive decisions, review triage, and human handoffs for Pi.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -45,10 +45,10 @@
45
45
  ]
46
46
  },
47
47
  "peerDependencies": {
48
- "@howaboua/pi-codex-conversion": ">=3.0.30",
49
- "@earendil-works/pi-ai": ">=0.84.3",
50
- "@earendil-works/pi-coding-agent": ">=0.84.3",
51
- "@earendil-works/pi-tui": ">=0.84.3",
48
+ "@howaboua/pi-codex-conversion": ">=3.0.43",
49
+ "@earendil-works/pi-ai": ">=1.0.0",
50
+ "@earendil-works/pi-coding-agent": ">=1.0.0",
51
+ "@earendil-works/pi-tui": ">=1.0.0",
52
52
  "typebox": "*"
53
53
  },
54
54
  "peerDependenciesMeta": {
@@ -57,11 +57,11 @@
57
57
  }
58
58
  },
59
59
  "devDependencies": {
60
- "@howaboua/pi-codex-conversion": "3.0.30",
60
+ "@howaboua/pi-codex-conversion": "3.0.43",
61
61
  "@biomejs/biome": "^2.5.10",
62
- "@earendil-works/pi-ai": "0.85.1",
63
- "@earendil-works/pi-coding-agent": "0.85.1",
64
- "@earendil-works/pi-tui": "0.85.1",
62
+ "@earendil-works/pi-ai": "1.0.0",
63
+ "@earendil-works/pi-coding-agent": "1.0.0",
64
+ "@earendil-works/pi-tui": "1.0.0",
65
65
  "typebox": "1.3.18",
66
66
  "typescript": "^7.0.2"
67
67
  },