pi-delegation-policy 0.4.0 → 0.4.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 +6 -0
- package/README.md +2 -2
- package/SECURITY.md +1 -1
- package/package.json +1 -1
- package/src/prompt.ts +10 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.4.1 - 2026-08-28
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Restored per-launch thinking selection so delegation guidance transmits the chosen level with the exact configured model instead of falling through to an ambient subagent default.
|
|
10
|
+
|
|
5
11
|
## 0.4.0 - 2026-08-27
|
|
6
12
|
|
|
7
13
|
### Added
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A local Pi extension that helps the main agent decide **when delegation is worth it** and which exact models to use for the Small, Medium, Large, and optional UI Design roles. It provides guidance; it is not a subagent runner.
|
|
4
4
|
|
|
5
|
-
> **Status:** Version **0.4.
|
|
5
|
+
> **Status:** Version **0.4.1** is the latest published package. The package requires Pi `>=0.84.3`; Pi `0.84.3` is the explicitly checked baseline (newer versions are not claimed as tested).
|
|
6
6
|
>
|
|
7
7
|
> **Docs:** [Read the documentation site](https://yivas.github.io/pi-delegation-policy/).
|
|
8
8
|
|
|
@@ -47,7 +47,7 @@ The editor is a bounded, keyboard-first panel. It shows model ID first and `[pro
|
|
|
47
47
|
|
|
48
48
|
## Configuration and safety
|
|
49
49
|
|
|
50
|
-
Global defaults are stored at `~/.pi/agent/delegation-policy.json` (schema version 2). The file stores optional intensity, preference, exact role references, and an optional UI Design reference; it never stores thinking. A valid active mode requires exact, available, in-scope, authenticated Small, Medium, and Large references. Before every delegated launch, the policy requires the selected role's exact
|
|
50
|
+
Global defaults are stored at `~/.pi/agent/delegation-policy.json` (schema version 2). The file stores optional intensity, preference, exact role references, and an optional UI Design reference; it never stores thinking. A valid active mode requires exact, available, in-scope, authenticated Small, Medium, and Large references. Before every delegated launch, the policy requires the selected role's exact `provider/model` base and a thinking level chosen for that task instead of relying on ambient defaults. With `pi-subagents`, the main agent passes both as `model: "provider/model:LEVEL"`; other launchers may expose a separate per-run thinking field. Invalid active configuration fails closed as `D:ERR` with no policy injection; `off` is always `D:OFF`.
|
|
51
51
|
|
|
52
52
|
The extension stores only policy settings and provider/model identifiers in local defaults and session entries. Review local configuration before sharing diagnostics, and remove credentials, prompts, personal paths, session files, and unredacted logs from reports. See the [limits and privacy reference](https://yivas.github.io/pi-delegation-policy/limits-and-privacy/) and [security policy](https://github.com/Yivas/pi-delegation-policy/blob/main/SECURITY.md).
|
|
53
53
|
|
package/SECURITY.md
CHANGED
|
@@ -14,4 +14,4 @@ Include the affected version or commit, operating system, Pi version, reproducti
|
|
|
14
14
|
|
|
15
15
|
## Supported versions
|
|
16
16
|
|
|
17
|
-
Only the latest published version is supported. Version 0.4.
|
|
17
|
+
Only the latest published version is supported. Version 0.4.1 is the current supported release.
|
package/package.json
CHANGED
package/src/prompt.ts
CHANGED
|
@@ -54,6 +54,10 @@ function formatLaunchModel(reference: ModelRef): string {
|
|
|
54
54
|
return promptString(`${reference.provider}/${reference.model}`);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
function formatThinkingLaunchModel(reference: ModelRef): string {
|
|
58
|
+
return promptString(`${reference.provider}/${reference.model}:LEVEL`);
|
|
59
|
+
}
|
|
60
|
+
|
|
57
61
|
export function buildPolicyPreview(effective: EffectiveDelegateState): string[] {
|
|
58
62
|
if (effective.intensity === "off") return ["off · no policy injected"];
|
|
59
63
|
|
|
@@ -65,7 +69,7 @@ export function buildPolicyPreview(effective: EffectiveDelegateState): string[]
|
|
|
65
69
|
return [
|
|
66
70
|
`${effective.intensity} · task fit first · ${preferencePreview(effective.preference)}`,
|
|
67
71
|
`Small ${formatLaunchModel(small)} · Medium ${formatLaunchModel(medium)} · Large ${formatLaunchModel(large)}`,
|
|
68
|
-
"Every launch must include the
|
|
72
|
+
"Every launch must include the exact model plus per-task thinking; neither uses an ambient default.",
|
|
69
73
|
];
|
|
70
74
|
}
|
|
71
75
|
|
|
@@ -77,7 +81,7 @@ export function buildDelegationPolicy(state: RuntimeState): string | undefined {
|
|
|
77
81
|
|
|
78
82
|
const intensityPolicy = effective.intensity === "normal" ? NORMAL_POLICY : AGGRESSIVE_POLICY;
|
|
79
83
|
const uiDesign = effective.uiDesign
|
|
80
|
-
? `\n- UI Design: ${formatReference(effective.uiDesign)};
|
|
84
|
+
? `\n- UI Design: ${formatReference(effective.uiDesign)}; exact model base: ${formatLaunchModel(effective.uiDesign)}; pi-subagents form: ${formatThinkingLaunchModel(effective.uiDesign)}. Use this role only for visual design direction, exploration, or review. Never use it to implement an interface, write code, or run tests.`
|
|
81
85
|
: "";
|
|
82
86
|
|
|
83
87
|
return `<delegation_policy>
|
|
@@ -88,12 +92,12 @@ ${ROLE_SELECTION_POLICY}
|
|
|
88
92
|
|
|
89
93
|
Model preference: ${effective.preference}. ${preferenceGuidance(effective.preference)}
|
|
90
94
|
|
|
91
|
-
Before every delegated launch, name the selected role
|
|
95
|
+
Before every delegated launch, name the selected role and take its exact combined provider/model base below. Choose thinking dynamically for that run from task demand, difficulty, quantity, risk, review cost, and the selected model's capabilities. Then transmit both through the launcher's per-run mechanism without changing the provider/model base. When the launcher encodes thinking as a model suffix, replace LEVEL in the shown pi-subagents form and pass model: "provider/model:LEVEL". Do not omit the model or thinking choice, inherit an ambient launcher default for either, substitute another model, persist the thinking level, or invent a fallback model or role or an unsupported thinking level.
|
|
92
96
|
|
|
93
97
|
Roles:
|
|
94
|
-
- Small: ${formatReference(effective.small)};
|
|
95
|
-
- Medium: ${formatReference(effective.medium)};
|
|
96
|
-
- Large: ${formatReference(effective.large)};
|
|
98
|
+
- Small: ${formatReference(effective.small)}; exact model base: ${formatLaunchModel(effective.small)}; pi-subagents form: ${formatThinkingLaunchModel(effective.small)}
|
|
99
|
+
- Medium: ${formatReference(effective.medium)}; exact model base: ${formatLaunchModel(effective.medium)}; pi-subagents form: ${formatThinkingLaunchModel(effective.medium)}
|
|
100
|
+
- Large: ${formatReference(effective.large)}; exact model base: ${formatLaunchModel(effective.large)}; pi-subagents form: ${formatThinkingLaunchModel(effective.large)}${uiDesign}
|
|
97
101
|
|
|
98
102
|
This is guidance for the main agent. It does not create, execute, route, supervise, or enforce delegated work.
|
|
99
103
|
</delegation_policy>`;
|