pi-advisor-flow 0.16.1-dev.1 → 0.17.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +16 -8
  3. package/dist/index.js +328 -96
  4. package/docs/configuration.md +10 -9
  5. package/locales/de.json +6 -1
  6. package/locales/en.json +6 -1
  7. package/locales/fr.json +6 -1
  8. package/package.json +1 -1
  9. package/src/commands/activation-preparation.ts +30 -3
  10. package/src/commands/activation-settings.ts +73 -0
  11. package/src/commands/activation.ts +75 -56
  12. package/src/commands/advisor-tools.ts +27 -6
  13. package/src/commands/configuration-tool-preview.ts +70 -13
  14. package/src/commands/configuration-tool-runtime.ts +3 -20
  15. package/src/commands/configuration-tool-update.ts +23 -1
  16. package/src/commands/lifecycle.ts +30 -1
  17. package/src/commands/manual-command.ts +4 -3
  18. package/src/commands/manual-consultation.ts +5 -5
  19. package/src/commands/model-commands.ts +17 -0
  20. package/src/commands/model-picker.ts +14 -6
  21. package/src/commands/settings-commands.ts +36 -20
  22. package/src/commands/settings-persistence.ts +33 -1
  23. package/src/config/defaults.ts +3 -0
  24. package/src/config/schema.ts +14 -1
  25. package/src/config/session-overrides.ts +109 -0
  26. package/src/config/state.ts +7 -0
  27. package/src/config/storage.ts +15 -1
  28. package/src/config/types.ts +3 -0
  29. package/src/session-state.ts +2 -0
  30. package/src/tools/budget-feedback.ts +2 -2
  31. package/src/tools/register-lifecycle.ts +12 -6
  32. package/src/tools/registration.ts +8 -1
  33. package/src/tools/session-availability.ts +10 -0
  34. package/src/ui/settings-items.ts +27 -6
  35. package/src/ui/settings-mutations.ts +7 -0
  36. package/src/ui/settings-selector.ts +1 -0
  37. package/src/ui/types.ts +6 -1
package/CHANGELOG.md CHANGED
@@ -6,9 +6,16 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 0.17.0 - 2026-11-20
10
+
11
+ ### Added
12
+
13
+ - Added `advisorActivation: "session"` and an **Advisor activation** setting. Each session start, including `/reload`, leaves all three Advisor tools inactive; `/advisor` and `/advisor-off` toggle them without writing `advisor.json`. The default persistent behavior is unchanged.
14
+
9
15
  ### Fixed
10
16
 
11
17
  - Prevent `/model` and model cycling from changing the persisted Executor; update it only through `/advisor-models` or an explicit `/advisor executor=...` override.
18
+ - `/advisor-manual` now waits for the consultation in `pi --mode json -p` one-shot runs, so the result (or failure) message is emitted before the process exits instead of being lost to teardown, and no Executor turn is triggered there.
12
19
 
13
20
  ## 0.16.0 - 2026-11-16
14
21
 
package/README.md CHANGED
@@ -92,6 +92,14 @@ In the Settings, enable Simple Mode for a quick start.
92
92
 
93
93
  Unknown fields in `advisor.json` are preserved for forward compatibility and reported as non-blocking warnings. Invalid recognized values fail their own Advisor call with a clear message instead of blocking every tool call.
94
94
 
95
+ ### Session-only activation
96
+
97
+ Set **Advisor activation** to `session` in `/advisor-settings`, or add `"advisorActivation": "session"` to the global `advisor.json`. Each session start, including `/reload`, starts with `ask_advisor`, `record_advisor_outcome`, and `advisor_config` inactive. `/advisor` enables them for the current session; `/advisor-off` disables them again. Neither command writes `advisor.json` in this mode.
98
+
99
+ Session mode starts inactive even if `alwaysOn` was saved as `true`; it does not change that saved setting. Model choices and arguments supplied to `/advisor` stay in memory for the session. Use `/advisor-models` to save model choices explicitly. `/advisor-manual` and `/advisor-settings` remain available while the tools are off. This mode also frees Codemode's tool-declaration budget until Advisor is enabled.
100
+
101
+ The default, `"advisorActivation": "persistent"`, keeps the existing cross-session behavior. Switching to session mode keeps the current Advisor on/off state until the next session start. Switching back to persistent mode immediately applies the saved tool preference.
102
+
95
103
  ## Pi Codemode
96
104
 
97
105
  With Pi Codemode enabled and the Advisor flow active, call the existing tool through `tools.ask_advisor`; no separate review tool or workflow is needed:
@@ -141,14 +149,14 @@ Successful calls return an opaque `adviceId`. If global outcome logging is enabl
141
149
 
142
150
  ## Commands
143
151
 
144
- | Command | What it does |
145
- | ------------------------- | -------------------------------------------------------------------------------------- |
146
- | `/advisor` | Enable the flow; choose available models when needed. |
147
- | `/advisor-manual [focus]` | Ask for an immediate second opinion. |
148
- | `/advisor-models` | Choose the Executor, Advisor, and optional fallback models. |
149
- | `/advisor-settings` | Configure behavior, models, context, privacy, and limits. |
150
- | `/advisor-stats` | Show retained outcome adoption and validation stats. |
151
- | `/advisor-off` | Disable model-facing Advisor tools across sessions and turn off persistent activation. |
152
+ | Command | What it does |
153
+ | ------------------------- | ------------------------------------------------------------------------------------------- |
154
+ | `/advisor` | Enable the flow; choose available models when needed. |
155
+ | `/advisor-manual [focus]` | Ask for an immediate second opinion. |
156
+ | `/advisor-models` | Choose the Executor, Advisor, and optional fallback models. |
157
+ | `/advisor-settings` | Configure behavior, models, context, privacy, and limits. |
158
+ | `/advisor-stats` | Show retained outcome adoption and validation stats. |
159
+ | `/advisor-off` | Disable Advisor tools across sessions by default, or only for this session in session mode. |
152
160
 
153
161
  In the interactive TUI, `/advisor-manual [focus]` opens a centered overlay with the focus text prefilled, a choice of permitted Git-context level, and live progress in the transcript. Canceling has no side effects.
154
162