From 0365b6f1ffad0775d8025055e640576c05718218 Mon Sep 17 00:00:00 2001 From: Erik Kotsiuba Date: Tue, 11 Aug 2026 23:29:38 +0200 Subject: [PATCH] chore: upgrade pi dependencies to 0.84.1 --- README.md | 4 +- docs/architecture.md | 2 +- docs/configuration.md | 9 ++- docs/contract.md | 4 +- package.json | 16 ++--- pnpm-lock.yaml | 110 +++++++++++++++++++++----------- src/answer-commands.ts | 3 +- src/answer-extraction.ts | 39 +++++++---- src/ask-payload-store.ts | 4 +- src/pending-ask.ts | 15 +++-- src/result-format.ts | 6 +- src/schema.ts | 3 +- tests/answer-extraction.test.ts | 48 +++++++++++++- tests/ask-payload-store.test.ts | 1 + tests/ask-tool.test.ts | 73 ++++++++++----------- tests/pending-ask.test.ts | 14 +++- tests/result.test.ts | 9 ++- 17 files changed, 242 insertions(+), 118 deletions(-) diff --git a/README.md b/README.md index 9a815b7..60a3c19 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # @eko24ive/pi-ask [![npm downloads](https://badgen.net/npm/dm/@eko24ive/pi-ask)](https://www.npmjs.com/package/@eko24ive/pi-ask) -[![last commit](https://badgen.net/github/last-commit/eko24ive/pi-ask?v=6fef4ac)](https://github.com/eko24ive/pi-ask/commits/main) +[![last commit](https://badgen.net/github/last-commit/eko24ive/pi-ask?v=4b6c81e)](https://github.com/eko24ive/pi-ask/commits/main) [![stars](https://badgen.net/github/stars/eko24ive/pi-ask)](https://github.com/eko24ive/pi-ask/stargazers) > [!IMPORTANT] @@ -130,6 +130,8 @@ Review-tab shortcuts can optionally require the same number key twice via `behav You can edit the config file yourself, ask pi to edit it for you, or use `/ask-settings` to find the exact config path, toggle behaviour/notification settings, or reset config to defaults with a guarded double press. pi-ask treats the config file as user-owned: load-time migrations and invalid files are handled in memory without rewriting or backing up the file, and read-only/externally managed configs fail gracefully with a manual-edit message. +`/answer` keeps extraction within the current session model scope. Check a configured model before use with `pi auth check --provider --model `. + ```json { "schemaVersion": 5, diff --git a/docs/architecture.md b/docs/architecture.md index 4859d78..2a34fbe 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -16,7 +16,7 @@ The codebase is split so the implementation reads through file boundaries and na - `src/index.ts` — extension entrypoint - `src/ask-tool.ts` — tool registration, non-interactive fallback, transcript rendering, ask payload capture - `src/answer-commands.ts` — `/answer`, `/answer:again`, and `/ask:replay` command wiring -- `src/answer-extraction.ts` — configured extraction model selection, synthetic `ask_user` tool-call extraction, and tolerant text fallback +- `src/answer-extraction.ts` — configured, session-scope-aware extraction model selection, synthetic `ask_user` tool-call extraction, and tolerant text fallback - `src/ask-payload-store.ts` — branch-aware persisted ask payload lookup - `src/pending-ask.ts` — active-branch unresolved tool-call detection and recovery dismissal persistence - `src/resume-pending-ask.ts` — detached lifecycle wiring and recovered answer delivery diff --git a/docs/configuration.md b/docs/configuration.md index 28bdf29..91126f4 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -99,8 +99,13 @@ These settings affect only the `/answer` command. Normal `ask_user` tool calls d - type: array of `{ "provider": string, "id": string }` - default: lightweight OpenAI Codex, GitHub Copilot, and Anthropic models -- effect: `/answer` tries configured models in order and uses the first model with available auth -- fallback: if no configured model is usable, `/answer` tries the current chat model after validating its auth +- effect: `/answer` tries configured models in order and uses the first model with available auth that is inside the current session model scope; an empty scope allows all available models +- fallback: if no configured model is usable, `/answer` tries the current chat model after validating its auth and scope +- auth check: use Pi's auth preflight before changing this list: + +```bash +pi auth check --provider openai-codex --model gpt-5.4-mini +``` ### `answer.extractionTimeoutMs` diff --git a/docs/contract.md b/docs/contract.md index 9cdefdf..1c46f07 100644 --- a/docs/contract.md +++ b/docs/contract.md @@ -171,7 +171,7 @@ This document defines the stable external behavior. It does not explain internal - semantically invalid payloads that reach tool execution return `error.kind === "invalid_input"` with structured `issues` and a transcript-friendly `Invalid ask_user payload:` message; their rendered status is `Invalid tool payload` - payloads missing schema-required fields fail Pi's schema validation before tool execution and use Pi's standard tool-error result without structured `details` - `mode: "submit"` is normal completion; `mode: "elaborate"` means the user asked the agent to continue with follow-up clarification based on notes -- unanswered questions are omitted from `answers`, but non-cancelled submitted result text includes `