pi-advisor-flow 0.9.2-dev.5 → 0.10.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/CHANGELOG.md CHANGED
@@ -6,8 +6,12 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 0.10.0 - 2026-10-02
10
+
9
11
  ### Added
10
12
 
13
+ - Added an optional `advisorFallbackModel`, selectable from `/advisor-models` and `/advisor-settings`, that retries a failed primary Advisor request once while attributing the response to the model that answered.
14
+ - Added `followUpTo` support for short-lived, session-local Advisor follow-ups that reuse the original post-redaction payload prefix, enforce depth and conversation-advance limits, and render distinct usage status.
11
15
  - Added `/advisor-stats`, a local rendered report for retained outcome triggers, adoption, followed-versus-rejected validation pass rates, distinct pseudonymous advice hashes, and the capped ledger time window.
12
16
  - Added default-on, toggleable `AGENTS.md` context for trusted Advisor calls, with origin labels, redaction, byte caps, untrusted-rule framing, and explicit withholding for untrusted projects.
13
17
 
@@ -20,8 +24,10 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
20
24
 
21
25
  ### Changed
22
26
 
27
+ - Fallback retries count as one consultation against the shared Advisor budget; follow-ups count as one consultation each and require a new question without extra attachments or context overrides.
23
28
  - Pi 0.87.x and 0.99.x hosts are no longer supported; Pi 1.0.x is now the supported Pi host and the peer range is `^1.0.0`.
24
29
  - Updated the development toolchain to the Pi 1.0.0 packages.
30
+ - Updated the Node.js type definitions to 26.6.4.
25
31
 
26
32
  ## 0.9.1 - 2026-09-30
27
33
 
package/README.md CHANGED
@@ -20,6 +20,8 @@ Keep implementation on a fast model and borrow frontier reasoning only when deci
20
20
  - **Configurable review gates** before plans, after repeated failures, and before declaring completion.
21
21
  - **Automatic loop detection** for repeated tool calls, with explicit proceed, revise, or blocked decisions.
22
22
  - **Separate model and reasoning controls** for the Executor and Advisor, with same-model consultations skipped by default to avoid redundant calls.
23
+ - **Optional Advisor fallback model** that retries provider, auth, and availability failures once without consuming a second consultation budget slot.
24
+ - **Cached Advisor follow-ups** through `followUpTo`, reusing a short-lived, redacted payload prefix for focused questions.
23
25
  - **Model whitelist** that can restrict Advisor calls to exact `provider/model` Executor references.
24
26
  - **Advisor usage accounting** with per-response token and cost details, normalized usage in Pi's `/cost` totals, and an optional cumulative footer.
25
27
  - **Outcome reporting** through `/advisor-stats`, with adoption and validation comparisons over the retained ledger window.
@@ -68,7 +70,7 @@ Reload Pi after installing.
68
70
 
69
71
  ```text
70
72
  /advisor # Enable the Advisor Flow
71
- /advisor-models # Choose the Executor and Advisor models
73
+ /advisor-models # Choose the Executor, Advisor, and optional fallback models
72
74
  /advisor-settings # Configure behavior, modes, etc.
73
75
  /advisor-stats # Show retained outcome adoption and validation stats
74
76
  ```
@@ -89,11 +91,13 @@ Unknown fields in `advisor.json` are preserved for forward compatibility and rep
89
91
 
90
92
  ## Usage and accounting
91
93
 
92
- Advisor responses show provider-reported input, output, cache, and cost details when available. Successful `ask_advisor` calls also carry normalized usage into Pi's built-in `/cost` totals. Manual consultations and automatic gates keep their own session-local accounting instead, so nothing is double-counted. Missing or partial provider usage is shown as unavailable rather than fabricated as zero. `/advisor-settings` controls both the per-response details and the optional cumulative footer independently.
94
+ Advisor responses show provider-reported input, output, cache, and cost details when available. Successful `ask_advisor` calls also carry normalized usage into Pi's built-in `/cost` totals. Manual consultations and automatic gates keep their own session-local accounting instead, so nothing is double-counted. Missing or partial provider usage is shown as unavailable rather than fabricated as zero. `/advisor-settings` controls both the per-response details and the optional cumulative footer independently. Configure `advisorFallbackModel` or choose **Fallback Advisor model** in the model/settings pickers to retry one failed primary request; the final response is labelled with the model that answered, and both failures are shown together.
95
+
96
+ A follow-up reuses only the original post-redaction payload in memory. It expires after five minutes, is cleared by a new user turn or three subsequent non-Advisor tool results, and allows at most three chained follow-ups. Use a fresh consultation when it expires or when you need new repository context or attachments.
93
97
 
94
98
  `/advisor-stats` reads the local outcomes ledger and reports trigger counts, adoption, followed-versus-rejected validation pass rates, distinct pseudonymous advice hashes, and the retained time window. It never fabricates historical cost data; the ledger is capped at 1 MiB and rewritten on overflow.
95
99
 
96
- Successful calls return an opaque `adviceId`. If global outcome logging is enabled, the Executor can call `record_advisor_outcome` once to record whether the advice was adopted and whether final validation passed.
100
+ Successful calls return an opaque `adviceId`. If global outcome logging is enabled, the Executor can call `record_advisor_outcome` once to record whether the advice was adopted and whether final validation passed. A later `ask_advisor` call can pass that ID as `followUpTo` with a new question; the follow-up is counted once against the session budget and shows its responding model and follow-up status.
97
101
 
98
102
  ## Commands
99
103
 
@@ -101,8 +105,8 @@ Successful calls return an opaque `adviceId`. If global outcome logging is enabl
101
105
  | --- | --- |
102
106
  | `/advisor` | Enable the flow; choose available models when needed. |
103
107
  | `/advisor-manual [focus]` | Ask for an immediate second opinion. |
104
- | `/advisor-models` | Choose the Executor and Advisor models. |
105
- | `/advisor-settings` | Configure behavior, context, privacy, and limits. |
108
+ | `/advisor-models` | Choose the Executor, Advisor, and optional fallback models. |
109
+ | `/advisor-settings` | Configure behavior, models, context, privacy, and limits. |
106
110
  | `/advisor-stats` | Show retained outcome adoption and validation stats. |
107
111
  | `/advisor-off` | Disable the flow and persistent activation. |
108
112