pi-advisor-flow 0.5.6 → 0.7.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 +29 -0
- package/README.md +1 -0
- package/dist/index.js +3160 -1255
- package/extensions/index.ts +9 -9
- package/package.json +12 -8
- package/src/{untracked.ts → attachments.ts} +2 -5
- package/src/commands/activation-preparation.ts +6 -6
- package/src/commands/activation.ts +7 -7
- package/src/commands/lifecycle.ts +5 -5
- package/src/commands/manual-command.ts +13 -9
- package/src/commands/manual-consultation.ts +24 -10
- package/src/commands/manual-progress.ts +3 -3
- package/src/commands/model-commands.ts +6 -6
- package/src/commands/model-options.ts +4 -4
- package/src/commands/model-picker.ts +2 -2
- package/src/commands/registration.ts +8 -8
- package/src/commands/renderers.ts +5 -5
- package/src/commands/runtime.ts +8 -8
- package/src/commands/settings-commands.ts +8 -8
- package/src/commands/settings-persistence.ts +52 -4
- package/src/commands/types.ts +6 -13
- package/src/commands.ts +2 -2
- package/src/config/args.ts +3 -3
- package/src/config/defaults.ts +78 -3
- package/src/config/schema.ts +434 -0
- package/src/config/state.ts +71 -2
- package/src/config/storage.ts +27 -119
- package/src/config/types.ts +30 -1
- package/src/config/validation.ts +61 -181
- package/src/config.ts +7 -7
- package/src/content-utils.ts +30 -0
- package/src/conversation.ts +13 -168
- package/src/git.ts +4 -18
- package/src/herdr.ts +6 -8
- package/src/jev/client.ts +348 -0
- package/src/jev/key-store.ts +252 -0
- package/src/jev/ledger.ts +234 -0
- package/src/jev/questions.ts +119 -0
- package/src/jev/state.ts +47 -0
- package/src/jev/transport.ts +58 -0
- package/src/model-stream.ts +5 -8
- package/src/outcomes.ts +3 -2
- package/src/pi-settings.ts +59 -0
- package/src/preferences.ts +2 -2
- package/src/redaction.ts +50 -0
- package/src/scout-context.ts +121 -485
- package/src/scout-curation.ts +84 -0
- package/src/scout-groups.ts +485 -0
- package/src/scout-protocol.ts +122 -0
- package/src/scout-reconstruct.ts +44 -0
- package/src/scout-types.ts +66 -0
- package/src/scout.ts +53 -63
- package/src/session-state.ts +215 -78
- package/src/tool-result-cap.ts +88 -0
- package/src/tools/consult-context.ts +155 -0
- package/src/tools/consultation.ts +71 -220
- package/src/tools/gate-policy.ts +5 -5
- package/src/tools/gate-protocol.ts +2 -2
- package/src/tools/jev-filter.ts +202 -0
- package/src/tools/jev-turn-gate.ts +183 -0
- package/src/tools/loop-gate.ts +71 -61
- package/src/tools/outage-notifier.ts +30 -0
- package/src/tools/prompts.ts +4 -7
- package/src/tools/register-ask-advisor.ts +46 -15
- package/src/tools/register-lifecycle.ts +7 -7
- package/src/tools/register-outcome.ts +5 -5
- package/src/tools/register-renderers.ts +63 -5
- package/src/tools/registration.ts +27 -10
- package/src/tools/render-advisor-result.ts +54 -22
- package/src/tools/render-common.ts +25 -13
- package/src/tools/scout-status.ts +5 -5
- package/src/tools/session.ts +1 -1
- package/src/tools/types.ts +17 -7
- package/src/tools.ts +9 -9
- package/src/ui/jev-setup-submenu.ts +344 -0
- package/src/ui/manual-dialog-render.ts +2 -2
- package/src/ui/manual-dialog.ts +4 -9
- package/src/ui/masked-input.ts +68 -0
- package/src/ui/model-selector.ts +1 -1
- package/src/ui/settings-formatting.ts +2 -2
- package/src/ui/settings-items.ts +166 -5
- package/src/ui/settings-mutations.ts +37 -2
- package/src/ui/settings-selector.ts +5 -5
- package/src/ui/text-setting-submenu.ts +1 -1
- package/src/ui/types.ts +13 -2
- package/src/ui.ts +4 -4
- package/src/usage.ts +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,35 @@ All notable changes to this project are documented here.
|
|
|
4
4
|
|
|
5
5
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0/).
|
|
6
6
|
|
|
7
|
+
## 0.7.0 - 2026-09-19
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Jev consultation filter** — an optional gate in front of `ask_advisor`. Jev, a small classification model by TypeSafe, takes one quick, inexpensive look at each consultation request; when it is clearly low-stakes and resolvable without the Advisor, the consultation is skipped with a short note telling the Executor to carry on — saving a full Advisor call. Everything else consults exactly as before, and if Jev cannot be reached the consultation simply goes through. Off by default.
|
|
12
|
+
- **Proactive turn gate** — pi-advisor can now notice when the Executor has worked through several turns without any advice. Every N turns, one quick Jev check asks whether a senior second opinion is warranted right now; on a confident yes the Advisor consults and its advice is delivered to the Executor between turns. Also off by default.
|
|
13
|
+
- **One-step setup** — open `/advisor-settings` → *Jev consultation filter* for guided setup: it verifies your access with one live call before turning anything on. Either paste a TypeSafe API key (stored securely — in your system's secret store when available, otherwise a dedicated owner-only file under `~/.pi/agent/`) or skip keys entirely: with an existing OpenRouter login in Pi, Jev reuses it automatically. A hand-placed plaintext key in `advisor.json` keeps working read-only and can be migrated to secure storage from the same screen.
|
|
14
|
+
- **Skip-aware accounting** — the Session Advisor Summary shows how many consultations were screened, skipped, or overridden, what the Jev checks cost, and a labelled upper-bound estimate of what the skips saved; skipped consultations never touch the Advisor-call budget.
|
|
15
|
+
- `/advisor-manual` consultations are now remembered by their question: if the Executor later asks the Advisor the exact same thing, the earlier advice is reattached instead of running another consultation. This deduplication is instant, free, and works even with the Jev screening filter turned off; sessions without any Jev activity report it as `Consultation dedup:` in the summary.
|
|
16
|
+
- All Jev thresholds, costs, and the turn-gate interval are tunable from the `Jev …` rows in `/advisor-settings` without editing files. The default Jev call timeout is provisional pending real-world measurements.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- The manual Advisor result message to the Executor now states it is informational and that no follow-up consultation is needed, preventing duplicate consultations.
|
|
21
|
+
- Updated development tooling dependencies (ultracite 7.12.0, Biome 2.5.13, knip 6.37.0, lint-staged 17.5.1, typebox 1.3.34, @types/node 26.6.2, bun-types 1.4.2); no runtime dependencies changed. Biome is held at 2.5.13 because 2.5.14's `noUnnecessaryConditions` regression falsely flags the gate parsers' required `RegExp.exec` null-guards as dead code.
|
|
22
|
+
|
|
23
|
+
## 0.6.0 - 2026-09-12
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- Advisor and Scout thinking previews now respect Pi's `hide_thinking` setting, collapsing to a one-line `Thinking…` cue the way Pi renders the Executor's own hidden thinking.
|
|
28
|
+
- The `ask_advisor` result no longer renders a doubled blank gap between the request and the first Scout line; the result box's own top padding was stacking on the call box's padding.
|
|
29
|
+
- Session summaries keep the cumulative gate-intervention count when the loop gate resets repetition after a proceed decision.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- Advisor thinking previews no longer render the 💭 emoji; the cue is a plain indented, italic line.
|
|
34
|
+
- Internal code-quality remediation with no behavior change: Biome scanner rules (`noConsole`, `noFloatingPromises`, `noPrivateImports`, `noUndeclaredDependencies`, `useImportExtensions`) activated and all import specifiers normalized to `.ts`; knip-verified dead exports removed; `src/untracked.ts` renamed to `src/attachments.ts` (deep imports of the old path must switch; the four `src/config.ts`, `src/ui.ts`, `src/tools.ts`, and `src/commands.ts` facades are unchanged and now pinned by `test/facade-exports.test.ts`); the registration test suite split into fifteen focused files under 500 lines each with shared mock/config/harness helpers; Scout context building decomposed into `scout-types`, `scout-protocol`, `scout-groups`, and `scout-reconstruct` modules with a single invalid-protocol failure constructor; configuration key lists derived from one declarative `src/config/schema.ts` table; conversation redaction and tool-result capping extracted into `redaction.ts` and `tool-result-cap.ts` with linear-time byte capping; and repeated cancellation/teardown/fallback blocks collapsed in the Scout runner.
|
|
35
|
+
|
|
7
36
|
## 0.5.6 - 2026-09-11
|
|
8
37
|
|
|
9
38
|
### Fixed
|
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@ Keep implementation on a fast model and borrow frontier reasoning only when deci
|
|
|
25
25
|
- **Optional persistent activation, Simple mode, session summaries, and Herdr integration.**
|
|
26
26
|
- **Compact searchable `/advisor-settings`** that matches Pi's settings list and saves changes immediately.
|
|
27
27
|
- **Experimental Advisor Scout** that uses the configured Executor model to curate conversation evidence before every Advisor call.
|
|
28
|
+
- **Optional Jev consultation filter and proactive turn gate** (TypeSafe): one cheap typed screening call skips low-stakes, self-answerable consultations; a periodic turn check can proactively pull in the Advisor. Works directly with a TypeSafe key or by reusing an existing OpenRouter login; both features are off by default.
|
|
28
29
|
|
|
29
30
|
## How it works
|
|
30
31
|
|