pi-delegation-policy 0.22.0 → 0.22.1

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
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.22.1 - 2026-10-22
4
+
5
+ ### Fixed
6
+
7
+ - The footer no longer keeps a stale `D:ERR` from session start when an ordinary model becomes
8
+ available only after this extension's `session_start` handler. Another extension may fill the model
9
+ catalog in its own start handler, and the host then emits `resources_discover`; a read-only runtime
10
+ refresh there repaints the footer with the existing validation. This adds one configuration/branch
11
+ read and footer refresh per session bind or reload, returns no resource paths, makes no network
12
+ call, and leaves the configuration-change notice reference alone, so a pending change is not lost.
13
+ A model that is genuinely missing or unusable still reports `D:ERR`. The fix relies on the public
14
+ post-start discovery order, verified in Pi `0.87.1` and `1.1.0`; availability changes after that
15
+ event still refresh on the next request or menu action.
16
+
3
17
  ## 0.22.0 - 2026-10-21
4
18
 
5
19
  ### Added
package/README.md CHANGED
@@ -6,7 +6,7 @@ general subagent runner. Only explicit tools can request reader work or Advisor
6
6
  the authorized host executor; hooks never launch children.
7
7
 
8
8
  > **Docs:** [yivas.github.io/pi-delegation-policy](https://yivas.github.io/pi-delegation-policy/).
9
- > Version **0.22.0** requires Pi `0.87.1` or later (`>=0.87.1`); it re-applies its marked policy block in the final provider payload.
9
+ > Version **0.22.1** requires Pi `0.87.1` or later (`>=0.87.1`); it re-applies its marked policy block in the final provider payload.
10
10
  > Version `0.14.1` supports Pi `0.84.3` or later (`>=0.84.3`).
11
11
  >
12
12
  > Independent Advisor mode and its companion file are available from version `0.17.0`.
@@ -15,7 +15,7 @@ the authorized host executor; hooks never launch children.
15
15
  ## Install
16
16
 
17
17
  ```bash
18
- pi install npm:pi-delegation-policy@0.22.0
18
+ pi install npm:pi-delegation-policy@0.22.1
19
19
  # restart Pi, or run /reload
20
20
  ```
21
21
 
@@ -190,6 +190,10 @@ example `advisor-mode=with-delegation (global); A:OFF` and `thinking-advisor=uns
190
190
  `D:OFF`, `D:NORM`, `D:AGG`, and `D:ORCH` describe delegation; `A:OFF`, `A:ON`, `A:PART`, and `A:ERR` describe
191
191
  Advisor. None of them proves that a launch happened or that another system followed the guidance.
192
192
 
193
+ The footer also revalidates after all session-start handlers finish. If another extension makes a
194
+ configured model available later in startup, the earlier `D:ERR` is replaced with the current status
195
+ without waiting for a message or menu action. A model that remains invalid still reports `D:ERR`.
196
+
193
197
  ### Configuration change notice
194
198
 
195
199
  Available from `0.22.0`. The declared Pi peer remains
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-delegation-policy",
3
- "version": "0.22.0",
3
+ "version": "0.22.1",
4
4
  "private": false,
5
5
  "description": "A Pi extension for configurable delegation intensity and exact subagent role model references.",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -896,6 +896,14 @@ export function createPiDelegationPolicy(options: PiDelegationPolicyOptions = {}
896
896
  advisorContext = undefined;
897
897
  startConfigBaseline(await refreshRuntime(ctx));
898
898
  });
899
+ // The host emits this after every `session_start` handler has run, so a model catalog another
900
+ // extension fills during its own start handler is visible here and the footer stops reporting an
901
+ // error that no longer applies. It only re-reads the runtime and repaints: no resource paths, no
902
+ // network, no new validation rules, and the notice reference stays as the start left it, so a pending
903
+ // change is not lost.
904
+ pi.on("resources_discover", async (_event, ctx) => {
905
+ await refreshRuntime(ctx);
906
+ });
899
907
  pi.on("input", async (event) => {
900
908
  // The host emits this for every submitted input immediately before the prompt it belongs to,
901
909
  // and `before_agent_start` follows only for a fresh prompt. Attribution therefore depends on