pi-advisor-flow 0.13.3-dev.1 → 0.13.3-dev.3
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 +8 -0
- package/README.md +3 -3
- package/dist/index.js +827 -1828
- package/package.json +6 -6
- package/src/commands/settings-commands.ts +8 -10
- package/src/commands/settings-persistence.ts +2 -15
- package/src/config/defaults.ts +7 -0
- package/src/config/schema.ts +10 -0
- package/src/config/state.ts +9 -0
- package/src/config/storage.ts +23 -3
- package/src/config/types.ts +2 -0
- package/src/jev/classifier-key-store.ts +203 -0
- package/src/jev/classifier.ts +421 -0
- package/src/jev/ledger.ts +3 -3
- package/src/jev/questions.ts +61 -23
- package/src/tools/jev-filter.ts +54 -34
- package/src/tools/jev-turn-gate.ts +105 -97
- package/src/tools/register-ask-advisor.ts +19 -2
- package/src/ui/jev-classifier-submenu.ts +459 -0
- package/src/ui/jev-filter-submenu.ts +67 -53
- package/src/ui/jev-provider-submenu.ts +16 -1
- package/src/ui/jev-setup-support.ts +13 -1
- package/src/ui/settings-items.ts +39 -72
- package/src/ui/settings-mutations.ts +0 -13
- package/src/ui/settings-selector.ts +21 -17
- package/src/ui/types.ts +36 -2
- package/src/usage.ts +82 -42
package/CHANGELOG.md
CHANGED
|
@@ -6,8 +6,16 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Added a dedicated masked Jev API Key option with isolated secure storage. Keys entered through this option are never migrated from legacy Jev stores or Pi provider credentials.
|
|
12
|
+
|
|
9
13
|
### Changed
|
|
10
14
|
|
|
15
|
+
- Updated development dependencies: Pi packages (`pi-ai`, `pi-coding-agent`, `pi-tui`) to 1.3.0 and TypeBox to 1.4.1; the supported peer range stays `^1.0.0`. The codemode composition tests now retry while Pi's process-wide codemode worker limit still counts finished workers as shutting down, matching Pi 1.3.0's admission behavior.
|
|
16
|
+
- Jev screening and turn-gate now use Pi's native classifier registry instead of pi-advisor's duplicate Jev inference clients. Existing screening policy is unchanged; provider authentication stays Pi-managed, and screening classifier input cost uses the selected model's Pi catalog rates.
|
|
17
|
+
- Screening classifier usage is included once with Advisor usage in `ask_advisor` tool totals. Manual and turn-gate classifier usage remains in the local Jev summary.
|
|
18
|
+
|
|
11
19
|
- The Executor now follows the model and thinking level of the current Pi session by default. `/advisor` no longer asks for or switches to an Executor model, and `/model` selections are not saved as the Executor. Pick an explicit Executor in `/advisor-models`, via `executor=` on `/advisor`, or in `advisor.json` to pin one; choose **Current session model** in `/advisor-models` to return to following the session.
|
|
12
20
|
|
|
13
21
|
## 0.13.2 - 2026-10-14
|
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ Keep implementation on a fast model and borrow frontier reasoning only when deci
|
|
|
30
30
|
- **Optional persistent activation, Simple mode, session summaries, and Herdr integration.**
|
|
31
31
|
- **Compact searchable `/advisor-settings`** that matches Pi's settings list and saves changes immediately.
|
|
32
32
|
- **Experimental Advisor Scout** that uses the configured Executor model to curate conversation evidence before every Advisor call.
|
|
33
|
-
- **Optional Jev
|
|
33
|
+
- **Optional Jev classifier screening and proactive turn gate**: typed Pi classifiers can skip low-stakes, self-answerable consultations or proactively pull in the Advisor. `/advisor-settings` offers available Pi-authenticated classifiers plus an explicit **Jev API Key** option. The API-key option is independently masked, live-verified, and stored only in a Jev-classifier-specific secure store; legacy keys are not migrated. Custom classifiers must be registered by a Pi provider extension. Both features remain off by default.
|
|
34
34
|
|
|
35
35
|
## How it works
|
|
36
36
|
|
|
@@ -118,13 +118,13 @@ Gather and filter deterministic results before paying for Advisor reasoning. Nes
|
|
|
118
118
|
|
|
119
119
|
Codemode receives `{ text, adviceId?, advisor?, followUp?, usage?, jev?, skipReason? }`. `text` preserves Advisor Markdown or the existing skip notice; `usage` is the same normalized snapshot shown in response details. Skipped calls have no new `adviceId`. Provider failures and blocked calls reject. Regular consultations never become loop-gate decisions. Interactive responses and usage accounting are unchanged.
|
|
120
120
|
|
|
121
|
-
Draft text is explicit disclosure: it does **not** inherit the policies of the tools that produced it. Do not copy excluded tool output, secrets, or unconsented file bodies into `draft` or `question`. The selected Jev
|
|
121
|
+
Draft text is explicit disclosure: it does **not** inherit the policies of the tools that produced it. Do not copy excluded tool output, secrets, or unconsented file bodies into `draft` or `question`. The selected Jev classifier may also receive the draft when screening is enabled. See [Privacy and data handling](docs/privacy.md).
|
|
122
122
|
|
|
123
123
|
## Usage and accounting
|
|
124
124
|
|
|
125
125
|
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.
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
Classifier token usage and catalog-priced input cost appear in the local Jev session summary. Pi's catalog input/cache rates are authoritative; JEV output tokens are always free and native classifier usage is normalized to zero output cost even when a catalog carries an output rate. During `ask_advisor` screening, classifier usage is combined with Advisor usage once in the tool result and included in Pi cost totals (under the generic tools bucket). Manual and turn-gate classifier calls remain local-only for Pi totals because Pi exposes no supported lifecycle usage-attribution API.
|
|
128
128
|
|
|
129
129
|
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.
|
|
130
130
|
|