pi-better-harness 0.61.2 → 0.61.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 +6 -0
- package/node_modules/pi-better-background-tasks/package.json +1 -1
- package/node_modules/pi-better-background-tasks/runtime-client/artifacts/darwin-arm64.gz +0 -0
- package/node_modules/pi-better-background-tasks/runtime-client/artifacts/darwin-arm64.json +1 -1
- package/node_modules/pi-better-background-tasks/runtime-client/artifacts/darwin-x64.gz +0 -0
- package/node_modules/pi-better-background-tasks/runtime-client/artifacts/darwin-x64.json +1 -1
- package/node_modules/pi-better-background-tasks/runtime-client/artifacts/linux-arm64.gz +0 -0
- package/node_modules/pi-better-background-tasks/runtime-client/artifacts/linux-arm64.json +1 -1
- package/node_modules/pi-better-background-tasks/runtime-client/artifacts/linux-x64.gz +0 -0
- package/node_modules/pi-better-background-tasks/runtime-client/artifacts/linux-x64.json +1 -1
- package/node_modules/pi-better-subagents/README.md +6 -5
- package/node_modules/pi-better-subagents/docs/usage.md +7 -8
- package/node_modules/pi-better-subagents/index.ts +4 -4
- package/node_modules/pi-better-subagents/package.json +1 -1
- package/node_modules/pi-better-subagents/runtime-client/artifacts/darwin-arm64.gz +0 -0
- package/node_modules/pi-better-subagents/runtime-client/artifacts/darwin-arm64.json +1 -1
- package/node_modules/pi-better-subagents/runtime-client/artifacts/darwin-x64.gz +0 -0
- package/node_modules/pi-better-subagents/runtime-client/artifacts/darwin-x64.json +1 -1
- package/node_modules/pi-better-subagents/runtime-client/artifacts/linux-arm64.gz +0 -0
- package/node_modules/pi-better-subagents/runtime-client/artifacts/linux-arm64.json +1 -1
- package/node_modules/pi-better-subagents/runtime-client/artifacts/linux-x64.gz +0 -0
- package/node_modules/pi-better-subagents/runtime-client/artifacts/linux-x64.json +1 -1
- package/node_modules/pi-better-subagents/settings-page.ts +54 -44
- package/node_modules/pi-better-subagents/skill-picker.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.61.3] - 2026-11-29
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Open **Skill exposure** in Subagent settings to choose all skills, no skills, or only selected skills. Choosing selected skills opens the checkbox list.
|
|
8
|
+
|
|
3
9
|
## [0.61.2] - 2026-11-29
|
|
4
10
|
|
|
5
11
|
### Changed
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"5ec2e8b82e54114988979e0c6c99625a187aa36f03fd3a55e8e9de1c4e9e886d","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-arm64","dependencyLockDigest":"6becccc0aa89805268794027bb9d0927ceab5ca05bee26a346d0d32e568968de","protocolVersion":1,"serverVersion":"0.10.2","contentId":"d2ffa65a6f47ded955f2fda72baf04dee23af6cb73112a76a727d8d2be2ec51b"},"sha256":"ecc52ce22442b2695721a8be720591625846e053a22e37c6cb8733579a5e45af"}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"5ec2e8b82e54114988979e0c6c99625a187aa36f03fd3a55e8e9de1c4e9e886d","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-x64","dependencyLockDigest":"6becccc0aa89805268794027bb9d0927ceab5ca05bee26a346d0d32e568968de","protocolVersion":1,"serverVersion":"0.10.2","contentId":"618352ae5141f4109cc929912ccc696342766816a98d5429538f0c2044ffe9b2"},"sha256":"4541ed304e0ed34b3a2896a7dbad4ef0e475730fe01f368b51d2b0c70aedfb67"}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"5ec2e8b82e54114988979e0c6c99625a187aa36f03fd3a55e8e9de1c4e9e886d","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-arm64","dependencyLockDigest":"6becccc0aa89805268794027bb9d0927ceab5ca05bee26a346d0d32e568968de","protocolVersion":1,"serverVersion":"0.10.2","contentId":"4c3d05d143af14c889f7cb743bc8795f8e6647db8d63be11ff472cf852ca3ff5"},"sha256":"18f543353322a2981d19c2ab96d0aa8b7f81db30358cfdc511f553ff47d5bde9"}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"5ec2e8b82e54114988979e0c6c99625a187aa36f03fd3a55e8e9de1c4e9e886d","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-x64","dependencyLockDigest":"6becccc0aa89805268794027bb9d0927ceab5ca05bee26a346d0d32e568968de","protocolVersion":1,"serverVersion":"0.10.2","contentId":"d0db4dfa880815b86159c9aa0c8d45631c7bc72bbcff8146a446a6c99edc1246"},"sha256":"4df7318a838d9f8e522cfb10097bda6fa1f690e5bd849fb8dec2982a4e0fa82e"}
|
|
@@ -99,12 +99,13 @@ The user config sets `delegationMode` to `manual`, `adaptive` (default), or
|
|
|
99
99
|
for delegation mode, the concurrent-subagent cap (default 6), and Git workspace
|
|
100
100
|
(Clone or Worktree). Run timeout supports a duration or **24 hours**. The
|
|
101
101
|
tool-wait alert (default 5 minutes) and no-progress alert (default 10 minutes)
|
|
102
|
-
have separate intervals. Enter `0` to turn an alert off. Skill exposure
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
have separate intervals. Enter `0` to turn an alert off. Open **Skill exposure** to choose
|
|
103
|
+
**Load all skills**, **Load no skills**, or **Load selected skills only**. The
|
|
104
|
+
last option opens the same picker as the **Selected skills** row and `/agents`.
|
|
105
|
+
It lists loaded skills by name and description. Space toggles one,
|
|
105
106
|
Enter applies, and typing filters without dropping checked items. Saved paths
|
|
106
|
-
missing from discovery stay visible as unavailable and survive apply.
|
|
107
|
-
|
|
107
|
+
missing from discovery stay visible as unavailable and survive apply. Applying an empty selection
|
|
108
|
+
switches to **Load no skills**. Manual Add skill path remains
|
|
108
109
|
available. The Skill exposure row shows where the current skill setting comes from. The session choice controls the next launch before Ctrl+S, and
|
|
109
110
|
edits persist across reloads. Ctrl+S saves delegation, workspace, timing, and skill
|
|
110
111
|
settings as defaults, and Reset to defaults clears session overrides, including
|
|
@@ -24,14 +24,13 @@ followed by skills, the Agents catalog, and Reset to defaults. As in
|
|
|
24
24
|
`/harness-settings`, the cursor marks the active row and its help appears
|
|
25
25
|
below the list. On Run timeout, Space selects **24 hours** and Enter edits
|
|
26
26
|
the duration. Each alert has a separate interval in minutes. Enter `0`
|
|
27
|
-
to turn that alert off. Skill exposure
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
to turn that alert off. Open **Skill exposure** and choose **Load all skills**, **Load no skills**,
|
|
28
|
+
or **Load selected skills only**. The last option opens the same picker as the
|
|
29
|
+
**Selected skills** row. It lists loaded skills by name and description.
|
|
30
|
+
Press Space to toggle a skill, Enter to apply, or Esc to cancel. Typing
|
|
31
31
|
filters the list without losing checked items. A saved path missing from current
|
|
32
|
-
discovery stays visible as unavailable and survives apply.
|
|
33
|
-
|
|
34
|
-
draft. Manual Add skill path remains available inside the picker; a path must be
|
|
32
|
+
discovery stays visible as unavailable and survives apply. Applying an empty selection
|
|
33
|
+
switches to **Load no skills**. Manual Add skill path remains available inside the picker; a path must be
|
|
35
34
|
absolute and exist. Invalid input stays in the editor with an explanation rather
|
|
36
35
|
than being dropped.
|
|
37
36
|
Edits automatically persist for this session, including across reloads; Escape
|
|
@@ -708,7 +707,7 @@ The effective config also sets:
|
|
|
708
707
|
- `defaultSkills` — skill exposure when neither the launch nor a catalog role or
|
|
709
708
|
agent chooses one. Omit it (or set `null`) for discovery, `[]` for no skills,
|
|
710
709
|
or absolute paths for exactly those skills. `/subagents settings` writes
|
|
711
|
-
`null` when
|
|
710
|
+
`null` when **Load all skills** is saved, so it overrides an older path
|
|
712
711
|
list. See [skill exposure](#skill-exposure).
|
|
713
712
|
- `delegationMode` — foreground policy (`manual`, `adaptive`, or `coordinator`;
|
|
714
713
|
default `adaptive`). `/subagents mode ...` changes only the current session.
|
|
@@ -2486,7 +2486,7 @@ export default function (pi: ExtensionAPI, managed?: import("./managed-launch-po
|
|
|
2486
2486
|
const skills = activeSkills();
|
|
2487
2487
|
const value = skills.mode === "inherit" ? undefined : [...skills.paths];
|
|
2488
2488
|
const error = skills.error ?? (skills.mode === "explicit" && skills.paths.length === 0
|
|
2489
|
-
? "Selected skills has no paths. Add at least one skill path or choose
|
|
2489
|
+
? "Selected skills has no paths. Add at least one skill path or choose Load no skills."
|
|
2490
2490
|
: undefined);
|
|
2491
2491
|
return { value, source: skills.source, ...(error ? { error } : {}) };
|
|
2492
2492
|
};
|
|
@@ -2503,7 +2503,7 @@ export default function (pi: ExtensionAPI, managed?: import("./managed-launch-po
|
|
|
2503
2503
|
const sessionSkillChoice = (): { value?: unknown } | undefined => {
|
|
2504
2504
|
if (!skillsOverride) return undefined;
|
|
2505
2505
|
if (skillsOverride.mode === "explicit" && skillsOverride.paths.length === 0) {
|
|
2506
|
-
throw new Error("Selected skills has no paths. Add at least one skill path or choose
|
|
2506
|
+
throw new Error("Selected skills has no paths. Add at least one skill path or choose Load no skills before launching.");
|
|
2507
2507
|
}
|
|
2508
2508
|
if (skillsOverride.mode === "inherit") return {};
|
|
2509
2509
|
return { value: skillsOverride.mode === "none" ? [] : [...skillsOverride.paths] };
|
|
@@ -2655,7 +2655,7 @@ export default function (pi: ExtensionAPI, managed?: import("./managed-launch-po
|
|
|
2655
2655
|
};
|
|
2656
2656
|
}
|
|
2657
2657
|
if (skills.mode === "explicit" && skills.paths.length === 0) {
|
|
2658
|
-
return { ok: false, message: "Add at least one skill path, or choose
|
|
2658
|
+
return { ok: false, message: "Add at least one skill path, or choose Load no skills." };
|
|
2659
2659
|
}
|
|
2660
2660
|
// Saving mode and cap must not write a skill key into a config that
|
|
2661
2661
|
// never had one. Discovery only replaces a saved choice when a saved
|
|
@@ -4664,7 +4664,7 @@ export default function (pi: ExtensionAPI, managed?: import("./managed-launch-po
|
|
|
4664
4664
|
if (tokens.length === 1 && tokens[0] === "save") {
|
|
4665
4665
|
const skills = activeSkills();
|
|
4666
4666
|
if (skills.mode === "explicit" && skills.paths.length === 0) {
|
|
4667
|
-
ctx.ui.notify("Add at least one skill path, or choose
|
|
4667
|
+
ctx.ui.notify("Add at least one skill path, or choose Load no skills.", "warning");
|
|
4668
4668
|
return;
|
|
4669
4669
|
}
|
|
4670
4670
|
const skillChoice = skills.mode === "inherit" ? "skill discovery"
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"5ec2e8b82e54114988979e0c6c99625a187aa36f03fd3a55e8e9de1c4e9e886d","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-arm64","dependencyLockDigest":"6becccc0aa89805268794027bb9d0927ceab5ca05bee26a346d0d32e568968de","protocolVersion":1,"serverVersion":"0.10.2","contentId":"d2ffa65a6f47ded955f2fda72baf04dee23af6cb73112a76a727d8d2be2ec51b"},"sha256":"ecc52ce22442b2695721a8be720591625846e053a22e37c6cb8733579a5e45af"}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"5ec2e8b82e54114988979e0c6c99625a187aa36f03fd3a55e8e9de1c4e9e886d","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-x64","dependencyLockDigest":"6becccc0aa89805268794027bb9d0927ceab5ca05bee26a346d0d32e568968de","protocolVersion":1,"serverVersion":"0.10.2","contentId":"618352ae5141f4109cc929912ccc696342766816a98d5429538f0c2044ffe9b2"},"sha256":"4541ed304e0ed34b3a2896a7dbad4ef0e475730fe01f368b51d2b0c70aedfb67"}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"5ec2e8b82e54114988979e0c6c99625a187aa36f03fd3a55e8e9de1c4e9e886d","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-arm64","dependencyLockDigest":"6becccc0aa89805268794027bb9d0927ceab5ca05bee26a346d0d32e568968de","protocolVersion":1,"serverVersion":"0.10.2","contentId":"4c3d05d143af14c889f7cb743bc8795f8e6647db8d63be11ff472cf852ca3ff5"},"sha256":"18f543353322a2981d19c2ab96d0aa8b7f81db30358cfdc511f553ff47d5bde9"}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"5ec2e8b82e54114988979e0c6c99625a187aa36f03fd3a55e8e9de1c4e9e886d","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-x64","dependencyLockDigest":"6becccc0aa89805268794027bb9d0927ceab5ca05bee26a346d0d32e568968de","protocolVersion":1,"serverVersion":"0.10.2","contentId":"d0db4dfa880815b86159c9aa0c8d45631c7bc72bbcff8146a446a6c99edc1246"},"sha256":"4df7318a838d9f8e522cfb10097bda6fa1f690e5bd849fb8dec2982a4e0fa82e"}
|
|
@@ -51,7 +51,7 @@ export interface SubagentSettingsHandlers {
|
|
|
51
51
|
|
|
52
52
|
type EditTarget = { kind: "cap" } | { kind: "toolWait" } | { kind: "stuck" } | { kind: "timeout" };
|
|
53
53
|
|
|
54
|
-
const
|
|
54
|
+
const settingsRows = [
|
|
55
55
|
{ section: "Delegation", kind: "mode", label: "Delegation mode" },
|
|
56
56
|
{ section: "Delegation", kind: "cap", label: "Concurrent subagents" },
|
|
57
57
|
{ section: "Delegation", kind: "workspace", label: "Git workspace" },
|
|
@@ -64,14 +64,14 @@ const rows = [
|
|
|
64
64
|
{ section: "Session defaults", kind: "reset", label: "Reset to defaults" },
|
|
65
65
|
] as const;
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
const skillModeRows = [
|
|
68
|
+
{ section: "Skill exposure", kind: "inherit", label: "Load all skills" },
|
|
69
|
+
{ section: "Skill exposure", kind: "none", label: "Load no skills" },
|
|
70
|
+
{ section: "Skill exposure", kind: "explicit", label: "Load selected skills only" },
|
|
71
|
+
] as const satisfies readonly { section: string; kind: SkillExposureMode; label: string }[];
|
|
69
72
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
{ mode: "none", label: "No skill catalog" },
|
|
73
|
-
{ mode: "explicit", label: "Selected skills" },
|
|
74
|
-
];
|
|
73
|
+
type Row = typeof settingsRows[number] | typeof skillModeRows[number];
|
|
74
|
+
const labelWidth = Math.max(...settingsRows.map(({ label }) => Tui.visibleWidth(label)));
|
|
75
75
|
|
|
76
76
|
const MAX_TIMEOUT = "24 hours";
|
|
77
77
|
|
|
@@ -85,14 +85,6 @@ function parseRunTimeout(input: string): number {
|
|
|
85
85
|
return minutes;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
function skillLabel(mode: SkillExposureMode): string {
|
|
89
|
-
return SKILL_MODES.find((entry) => entry.mode === mode)!.label;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function cycleSkillMode(mode: SkillExposureMode): SkillExposureMode {
|
|
93
|
-
return mode === "inherit" ? "none" : "inherit";
|
|
94
|
-
}
|
|
95
|
-
|
|
96
88
|
function skillSource(settings: SubagentSettingsSnapshot): string {
|
|
97
89
|
if (settings.skillsSource === "session") return "Source: this session (unsaved)";
|
|
98
90
|
if (settings.skillsSource === "config") return "Source: config defaultSkills";
|
|
@@ -107,10 +99,10 @@ function settingValue(kind: Row["kind"], s: SubagentSettingsSnapshot): string {
|
|
|
107
99
|
case "timeout": return s.maxMinutes === 0 || s.maxMinutes >= 1440 ? MAX_TIMEOUT : `${s.maxMinutes} min`;
|
|
108
100
|
case "toolWait": return s.toolWaitMinutes === 0 ? "Off" : `${s.toolWaitMinutes} min`;
|
|
109
101
|
case "stuck": return s.stuckMinutes === 0 ? "Off" : `${s.stuckMinutes} min`;
|
|
110
|
-
case "skills": return
|
|
102
|
+
case "skills": return skillModeRows.find(entry => entry.kind === s.skillsMode)!.label;
|
|
111
103
|
case "choose": return s.skillsMode === "explicit" ? `${s.skillsPaths.length} checked ›` : "›";
|
|
112
104
|
case "agents": return "›";
|
|
113
|
-
case "reset": return "";
|
|
105
|
+
case "inherit": case "none": case "explicit": case "reset": return "";
|
|
114
106
|
}
|
|
115
107
|
}
|
|
116
108
|
|
|
@@ -128,7 +120,10 @@ function description(kind: Row["kind"], s: SubagentSettingsSnapshot): string {
|
|
|
128
120
|
case "timeout": return "Stop a subagent when its run reaches this limit. The maximum is 24 hours.";
|
|
129
121
|
case "toolWait": return "Notify the parent when a tool call stays open this long. Enter 0 to turn this alert off.";
|
|
130
122
|
case "stuck": return "Notify the parent after this long without progress. Time spent waiting for a tool is excluded. Enter 0 to turn this alert off.";
|
|
131
|
-
case "skills": return "Choose
|
|
123
|
+
case "skills": return "Choose which skills new subagents load by default.\n" + skillSource(s);
|
|
124
|
+
case "inherit": return "Let Pi discover all available skills when a subagent starts.";
|
|
125
|
+
case "none": return "Start new subagents with no skills.";
|
|
126
|
+
case "explicit": return "Choose the skills new subagents will load.";
|
|
132
127
|
case "choose": return "Choose the skills to load for new subagents.";
|
|
133
128
|
case "agents": return "Browse agent roles and edit their profiles in /agents.";
|
|
134
129
|
case "reset": return "Restore saved defaults for this session, including its workspace, limits, and skills.";
|
|
@@ -142,15 +137,17 @@ function primaryKey(action: Tui.Keybinding, excludeSpace = false): string | unde
|
|
|
142
137
|
return key.split("+").map(part => part.length === 1 ? part : part[0]!.toUpperCase() + part.slice(1)).join("+");
|
|
143
138
|
}
|
|
144
139
|
|
|
145
|
-
function shortcuts(kind: Row["kind"], editing: boolean): string {
|
|
140
|
+
function shortcuts(kind: Row["kind"], editing: boolean, choosingMode: boolean): string {
|
|
146
141
|
const cancel = primaryKey("tui.select.cancel");
|
|
147
142
|
const confirm = primaryKey(editing ? "tui.input.submit" : "tui.select.confirm", !editing);
|
|
148
143
|
const change = confirm ? `${confirm}/Space` : "Space";
|
|
149
|
-
const verb =
|
|
144
|
+
const verb = choosingMode ? "select"
|
|
145
|
+
: kind === "agents" || kind === "choose" || kind === "skills" ? "open"
|
|
146
|
+
: kind === "reset" ? "restore" : "change";
|
|
150
147
|
const actions = editing ? [confirm && `${confirm} to apply`]
|
|
151
148
|
: kind === "timeout" ? ["Space for 24 hours", confirm && `${confirm} to edit minutes`]
|
|
152
149
|
: [`${change} to ${verb}`];
|
|
153
|
-
if (!editing) actions.push("Ctrl+S to save defaults");
|
|
150
|
+
if (!editing && !choosingMode) actions.push("Ctrl+S to save defaults");
|
|
154
151
|
if (cancel) actions.push(`${cancel} to ${editing ? "cancel" : "go back"}`);
|
|
155
152
|
return actions.filter(Boolean).join(" · ");
|
|
156
153
|
}
|
|
@@ -161,11 +158,12 @@ export function createSubagentSettingsPage(
|
|
|
161
158
|
requestRender: () => void,
|
|
162
159
|
close: () => void,
|
|
163
160
|
getHeight: () => number = () => process.stdout.rows ?? 30,
|
|
164
|
-
selected?:
|
|
161
|
+
selected?: typeof settingsRows[number]["kind"],
|
|
165
162
|
): Tui.Component & Tui.Focusable {
|
|
166
163
|
const input = new Tui.Input();
|
|
167
164
|
let settings = handlers.get();
|
|
168
165
|
let focused = false;
|
|
166
|
+
let rows: readonly Row[] = settingsRows;
|
|
169
167
|
let row = Math.max(0, rows.findIndex(entry => entry.kind === selected));
|
|
170
168
|
let editing: EditTarget | undefined;
|
|
171
169
|
let picker: ReturnType<typeof createSkillPicker> | undefined;
|
|
@@ -200,11 +198,16 @@ export function createSubagentSettingsPage(
|
|
|
200
198
|
reportChange(text);
|
|
201
199
|
}
|
|
202
200
|
|
|
203
|
-
function
|
|
201
|
+
function closeModeMenu(): void {
|
|
202
|
+
rows = settingsRows;
|
|
203
|
+
row = settingsRows.findIndex(entry => entry.kind === "skills");
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function openSkillPicker(): void {
|
|
204
207
|
picker = createSkillPicker({
|
|
205
208
|
theme,
|
|
206
209
|
skills: handlers.discoverSkills?.() ?? [],
|
|
207
|
-
selected:
|
|
210
|
+
selected: settings.skillsMode === "explicit" ? settings.skillsPaths : rememberedSkillPaths ?? [],
|
|
208
211
|
requestRender,
|
|
209
212
|
getHeight,
|
|
210
213
|
title: "Selected skills",
|
|
@@ -213,8 +216,8 @@ export function createSubagentSettingsPage(
|
|
|
213
216
|
if (paths.length === 0) {
|
|
214
217
|
handlers.changeSkills("none", []);
|
|
215
218
|
rememberedSkillPaths = [];
|
|
216
|
-
reportChange("No skills checked.
|
|
217
|
-
return { ok: true, message: "No
|
|
219
|
+
reportChange("No skills checked. New subagents will load no skills.");
|
|
220
|
+
return { ok: true, message: "No skills selected." };
|
|
218
221
|
}
|
|
219
222
|
handlers.changeSkills("explicit", paths);
|
|
220
223
|
rememberedSkillPaths = [...paths];
|
|
@@ -224,12 +227,15 @@ export function createSubagentSettingsPage(
|
|
|
224
227
|
return { ok: false, message: cause instanceof Error ? cause.message : String(cause) };
|
|
225
228
|
}
|
|
226
229
|
},
|
|
227
|
-
finish() {
|
|
228
|
-
cancel() {
|
|
230
|
+
finish() {
|
|
229
231
|
picker = undefined;
|
|
230
|
-
|
|
232
|
+
if (rows === skillModeRows) closeModeMenu();
|
|
231
233
|
requestRender();
|
|
232
234
|
},
|
|
235
|
+
cancel() {
|
|
236
|
+
picker = undefined;
|
|
237
|
+
report("Skill selection unchanged.");
|
|
238
|
+
},
|
|
233
239
|
});
|
|
234
240
|
picker.focused = focused;
|
|
235
241
|
requestRender();
|
|
@@ -260,16 +266,16 @@ export function createSubagentSettingsPage(
|
|
|
260
266
|
startEditing(selected, settings.maxMinutes === 0 || settings.maxMinutes >= 1440 ? MAX_TIMEOUT : String(settings.maxMinutes));
|
|
261
267
|
}
|
|
262
268
|
} else if (selected.kind === "skills") {
|
|
269
|
+
rows = skillModeRows;
|
|
270
|
+
row = skillModeRows.findIndex(entry => entry.kind === settings.skillsMode);
|
|
271
|
+
message = "";
|
|
272
|
+
} else if (selected.kind === "inherit" || selected.kind === "none") {
|
|
263
273
|
if (settings.skillsMode === "explicit") rememberedSkillPaths = [...settings.skillsPaths];
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
reportChange(`Skill exposure: ${
|
|
267
|
-
} else if (selected.kind === "choose") {
|
|
268
|
-
openSkillPicker(
|
|
269
|
-
settings.skillsMode === "explicit" ? settings.skillsPaths : rememberedSkillPaths ?? [],
|
|
270
|
-
settings.skillsMode,
|
|
271
|
-
);
|
|
272
|
-
return;
|
|
274
|
+
handlers.changeSkills(selected.kind, []);
|
|
275
|
+
closeModeMenu();
|
|
276
|
+
reportChange(`Skill exposure: ${selected.label.toLowerCase()}.`);
|
|
277
|
+
} else if (selected.kind === "choose" || selected.kind === "explicit") {
|
|
278
|
+
openSkillPicker();
|
|
273
279
|
} else if (selected.kind === "agents") {
|
|
274
280
|
handlers.openAgents?.();
|
|
275
281
|
} else {
|
|
@@ -332,7 +338,7 @@ export function createSubagentSettingsPage(
|
|
|
332
338
|
},
|
|
333
339
|
handleInput(data: string) {
|
|
334
340
|
if (picker) {
|
|
335
|
-
picker.handleInput(data);
|
|
341
|
+
picker.handleInput?.(data);
|
|
336
342
|
requestRender();
|
|
337
343
|
return;
|
|
338
344
|
}
|
|
@@ -343,12 +349,16 @@ export function createSubagentSettingsPage(
|
|
|
343
349
|
}
|
|
344
350
|
const selected = rows[row]!;
|
|
345
351
|
const keys = Tui.getKeybindings();
|
|
346
|
-
if (keys.matches(data, "tui.select.cancel"))
|
|
347
|
-
|
|
352
|
+
if (keys.matches(data, "tui.select.cancel")) {
|
|
353
|
+
if (rows === skillModeRows) {
|
|
354
|
+
closeModeMenu();
|
|
355
|
+
message = "";
|
|
356
|
+
} else close();
|
|
357
|
+
} else if (keys.matches(data, "tui.select.up") || keys.matches(data, "tui.select.down")) {
|
|
348
358
|
row = Math.max(0, Math.min(rows.length - 1, row + (keys.matches(data, "tui.select.up") ? -1 : 1)));
|
|
349
359
|
message = "";
|
|
350
360
|
} else if (keys.matches(data, "tui.select.confirm") || data === " ") action(selected, data);
|
|
351
|
-
else if (Tui.matchesKey(data, "ctrl+s")) {
|
|
361
|
+
else if (rows === settingsRows && Tui.matchesKey(data, "ctrl+s")) {
|
|
352
362
|
const result = handlers.save();
|
|
353
363
|
if (result.ok) {
|
|
354
364
|
rememberedSkillPaths = settings.skillsMode === "explicit" ? [...settings.skillsPaths] : undefined;
|
|
@@ -392,7 +402,7 @@ export function createSubagentSettingsPage(
|
|
|
392
402
|
}
|
|
393
403
|
|
|
394
404
|
const selected = rows[row]!.kind;
|
|
395
|
-
const hint = shortcuts(selected, editing !== undefined);
|
|
405
|
+
const hint = shortcuts(selected, editing !== undefined, rows === skillModeRows);
|
|
396
406
|
const wrap = (text: string, color: Parameters<Theme["fg"]>[0]) =>
|
|
397
407
|
Tui.wrapTextWithAnsi(text, Math.max(1, w - 2)).map(line => " " + theme.fg(color, line));
|
|
398
408
|
const help = wrap(description(selected, settings), "text");
|
|
@@ -326,7 +326,7 @@ export function createSkillPicker(options: SkillPickerOptions): Tui.Component &
|
|
|
326
326
|
const hiddenChecked = [...checked.keys()].filter((key) => !visibleChecked.has(key)).length;
|
|
327
327
|
const footer = [
|
|
328
328
|
theme.fg("dim", ` ${checked.size} checked${hiddenChecked ? ` · ${hiddenChecked} checked hidden by filter` : ""}`),
|
|
329
|
-
theme.fg("dim", "
|
|
329
|
+
theme.fg("dim", " Applying an empty selection loads no skills."),
|
|
330
330
|
];
|
|
331
331
|
if (message) footer.unshift(theme.fg(error ? "error" : "muted", " " + message.replace(/[\r\n]+/g, " ")));
|
|
332
332
|
if (height < header.length + footer.length + 1) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-better-harness",
|
|
3
|
-
"version": "0.61.
|
|
3
|
+
"version": "0.61.3",
|
|
4
4
|
"description": "Pi extension bundle for a write sandbox, subagents, background tasks, SSH, Goals, and Todo lists.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -68,11 +68,11 @@
|
|
|
68
68
|
"test": "node --import tsx --import ../../scripts/isolate-registry.mjs --test test/*.test.mjs test/*.test.ts test/task-context/*.test.ts"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"pi-better-background-tasks": "0.21.
|
|
71
|
+
"pi-better-background-tasks": "0.21.8",
|
|
72
72
|
"pi-better-goal": "0.18.2",
|
|
73
73
|
"pi-better-sandbox": "0.15.2",
|
|
74
74
|
"pi-better-ssh": "0.1.7",
|
|
75
|
-
"pi-better-subagents": "0.41.
|
|
75
|
+
"pi-better-subagents": "0.41.1",
|
|
76
76
|
"openai": "6.26.0",
|
|
77
77
|
"proper-lockfile": "^4.1.2",
|
|
78
78
|
"shell-quote": "1.12.0",
|