pi-delegation-policy 0.23.2 → 0.23.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 CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.23.3 - 2026-10-31
6
+
7
+ ### Fixed
8
+
9
+ - The role-mode reply from `consult_advisor` starts with `Not an error:` and limits its instruction
10
+ not to call the tool again to the time when Advisor launch remains `role`.
11
+ - The reply names the exact active host tool `subagent`, discovered at invocation time through Pi's
12
+ public tool API. If it is absent or inactive, the reply tells the model to inform the user that it
13
+ cannot launch the Advisor and not to improvise foreground execution, a CLI or another agent.
14
+
15
+ ### Compatibility and verification
16
+
17
+ - Only the role-mode tool result changes. Tool definitions, the policy block and all other replies
18
+ remain unchanged from 0.23.2. No configuration migration, dependency, profile, model, permission or
19
+ Pi minimum change; upgrade and reload as usual.
20
+ - Registered-tool tests cover the exact launcher name, its absence and changing availability within
21
+ one runtime. The existing definition-identity test remains unchanged and passes. These checks do
22
+ not measure provider cache hits or establish real-model behavior with the new wording.
23
+
5
24
  ## 0.23.2 - 2026-10-31
6
25
 
7
26
  ### Fixed
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.23.2** 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.23.3** 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.23.2
18
+ pi install npm:pi-delegation-policy@0.23.3
19
19
  # restart Pi, or run /reload
20
20
  ```
21
21
 
package/SECURITY.md CHANGED
@@ -69,4 +69,4 @@ Include the affected version or commit, operating system, Pi version, reproducti
69
69
 
70
70
  ## Supported versions
71
71
 
72
- Only the latest published version is supported. Version `0.23.2` requires Pi `0.87.1` or later; version `0.14.1` requires Pi `0.84.3` or later.
72
+ Only the latest published version is supported. Version `0.23.3` requires Pi `0.87.1` or later; version `0.14.1` requires Pi `0.84.3` or later.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-delegation-policy",
3
- "version": "0.23.2",
3
+ "version": "0.23.3",
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
@@ -564,10 +564,16 @@ export function createPiDelegationPolicy(options: PiDelegationPolicyOptions = {}
564
564
  "Advisor is off in /delegate for this session. Do not consult it and do not ask the user to enable it unless they raise it.",
565
565
  );
566
566
  if (!advisors.length) return text(advisorUnavailableText(state));
567
- if (state.effective.advisorLaunch === "role")
567
+ if (state.effective.advisorLaunch === "role") {
568
+ const subagentTool = pi.getActiveTools().find((name) => name === "subagent");
569
+ if (!subagentTool)
570
+ return text(
571
+ 'Not an error: Advisor launch is "role", so this tool does not launch Advisors; do not call this tool again while Advisor launch is "role". The host subagent tool "subagent" is not available. Tell the user that you cannot launch the Advisor with the available host tools. Do not improvise another mechanism: do not use foreground execution, a CLI, or another agent.',
572
+ );
568
573
  return text(
569
- `Advisor launch is "role": this tool is not used in role mode; do not call this tool again. Launch every listed Advisor with the host subagent tool, using each exact agent profile and model below, in the background, all listed Advisors with the same question in one call, as the delegation policy describes. Replace LEVEL with a supported thinking level chosen per run under that Advisor's thinking policy; a fixed level must not change.\n${advisorRoleLines(state)}`,
574
+ `Not an error: Advisor launch is "role", so this tool does not launch Advisors; do not call this tool again while Advisor launch is "role". Launch every listed Advisor with the host subagent tool "${subagentTool}", using each exact agent profile and model below, in the background, all listed Advisors with the same question in one call, as the delegation policy describes. Replace LEVEL with a supported thinking level chosen per run under that Advisor's thinking policy; a fixed level must not change.\n${advisorRoleLines(state)}`,
570
575
  );
576
+ }
571
577
  if (advisorExecutor.busy)
572
578
  return text(
573
579
  "Advisor busy: one consultation group is already in flight for this session. Wait for its result before starting another consultation; do not duplicate the pending group.",