pi-subagent-manager 1.4.0 → 1.5.0
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/docs/default-agents.md +3 -3
- package/docs/settings.md +7 -7
- package/package.json +1 -1
- package/src/orch/extensions.ts +12 -0
- package/src/prefs/settings.ts +1 -1
- package/src/ui/settings-ui.ts +2 -3
package/docs/default-agents.md
CHANGED
|
@@ -63,7 +63,7 @@ These are choices, not an automatic fallback/escalation chain or a universal qua
|
|
|
63
63
|
|
|
64
64
|
## Researcher retrieval contract
|
|
65
65
|
|
|
66
|
-
With the
|
|
66
|
+
With the **Allowed (except blocked)** Tool Filtering mode, the researcher child has `read`, `grep`, `find`, `ls`, `bash`, `agent_update`, and `agent_pause`. A custom allowlist can select exact names of registered non-hidden parent MCP/web tools; broader filtering modes can also make them available. Deferred/codemode tools are discoverable through child-local codemode when permitted. Skills are not automatically loaded. External tools reuse the main session's resources/context, and bridged callable tools remain subject to its tool policy; they are not fresh, isolated extension instances.
|
|
67
67
|
|
|
68
68
|
Use only actually available authorized retrieval routes. For shell routes:
|
|
69
69
|
|
|
@@ -79,9 +79,9 @@ The handback gives the answer first, inline evidence, code paths/commit-pinned c
|
|
|
79
79
|
|
|
80
80
|
## Tool and authorization boundaries
|
|
81
81
|
|
|
82
|
-
With the
|
|
82
|
+
With the **Allowed (except blocked)** Tool Filtering mode, only architect has descendant delegation controls, and even architect coordinates or executes only when the assignment authorizes it. Other roles can report progress or pause without starting children. Researcher/reviewer have no `edit`/`write` tools; researcher may write only a caller-authorized evidence artifact via shell. Writer has no bash retrieval route.
|
|
83
83
|
|
|
84
|
-
The manager's **Tool Filtering** setting can override these YAML tool boundaries: **All except blocked** ignores allow lists, while **All** ignores both allow and block lists. Tool sets are selected when sessions initialize; already-open sessions retain their tools. These modes do not change the role prompts or authorization requirements.
|
|
84
|
+
The manager's **Tool Filtering** setting can override these YAML tool boundaries: **All except blocked** (the default) ignores allow lists, while **All** ignores both allow and block lists. Tool sets are selected when sessions initialize; already-open sessions retain their tools. These modes do not change the role prompts or authorization requirements.
|
|
85
85
|
|
|
86
86
|
Tool policy is **not an OS sandbox**: bash can mutate files, contact services, or run scripts despite a read-only research/review prompt. Research does not authorize worktree changes, remote writes, setup, installations, or untrusted code execution. Tests/builds can write files and need explicit authorization. Coder must not claim browser/rendering/accessibility checks without tooling that actually ran.
|
|
87
87
|
|
package/docs/settings.md
CHANGED
|
@@ -26,7 +26,7 @@ All keys are optional. Defaults:
|
|
|
26
26
|
"housekeepingEnabled": false,
|
|
27
27
|
"housekeepingModel": "",
|
|
28
28
|
"modelSelection": "pick-first-scoped",
|
|
29
|
-
"toolFiltering": "
|
|
29
|
+
"toolFiltering": "all-except-blocked",
|
|
30
30
|
"maxLevels": 3,
|
|
31
31
|
"maxConcurrent": 16,
|
|
32
32
|
"maxThreads": 64
|
|
@@ -199,11 +199,11 @@ Which model an agent gets when its session starts.
|
|
|
199
199
|
|
|
200
200
|
How the type's `tools.allow` / `tools.block` lists are applied.
|
|
201
201
|
|
|
202
|
-
| Option
|
|
203
|
-
|
|
|
204
|
-
| `allowed` — **Allowed (except blocked)**
|
|
205
|
-
| `all-except-blocked` — **All except blocked**
|
|
206
|
-
| `all` — **All**
|
|
202
|
+
| Option | What it does | Use when |
|
|
203
|
+
| ---------------------------------------------------- | ---------------------------------------------------------------- | ----------------------------------------- |
|
|
204
|
+
| `allowed` — **Allowed (except blocked)** | Only `allow` tools, minus `block`. Empty/missing `allow` = no tools. | Least privilege. Recommended. |
|
|
205
|
+
| `all-except-blocked` — **All except blocked** (default) | Ignores `allow`; everything except `block`. | Your definitions only list what to forbid. |
|
|
206
|
+
| `all` — **All** | Ignores both lists. | Trusted local experiments. |
|
|
207
207
|
|
|
208
208
|
- "All" includes child-local built-in and manager tools plus the main session's registered non-hidden tools. Exact-name allow/block lists apply to this inventory.
|
|
209
209
|
- Inherited tools retain exposure and active status. Deferred/codemode tools are discoverable through child-local codemode when permitted; direct tools remain model-facing when active.
|
|
@@ -211,7 +211,7 @@ How the type's `tools.allow` / `tools.block` lists are applied.
|
|
|
211
211
|
- Other custom **model-only** tools fail closed: the SDK cannot bridge them while preserving root permission/result hooks. Run those in the main session.
|
|
212
212
|
- UI/command-driven resumes after reopening the main session need a main-session `agent_*` tool call to establish the execution bridge; use `agent_steer` rather than the thread dialog.
|
|
213
213
|
- Applies to newly started sessions (including retained ones reopened after reload). Already-open sessions keep their selected tools, and the main session's tool set is unchanged.
|
|
214
|
-
-
|
|
214
|
+
- All except blocked and All can expose `agent_spawn` to types that weren't meant to delegate.
|
|
215
215
|
|
|
216
216
|
## Max Levels (`maxLevels`)
|
|
217
217
|
|
package/package.json
CHANGED
package/src/orch/extensions.ts
CHANGED
|
@@ -5,6 +5,18 @@ import { DefaultPackageManager, SettingsManager } from "@earendil-works/pi-codin
|
|
|
5
5
|
|
|
6
6
|
const MANAGER_ENTRY = fileURLToPath(new URL("../index.ts", import.meta.url));
|
|
7
7
|
|
|
8
|
+
/** Installed extensions use their npm package name, not a generic entry-point filename. */
|
|
9
|
+
export function extensionDisplayName(file: string): string {
|
|
10
|
+
const packagePath = file.split(`${path.sep}node_modules${path.sep}`).slice(1).at(-1);
|
|
11
|
+
if (packagePath) {
|
|
12
|
+
const [name, scopedName] = packagePath.split(path.sep);
|
|
13
|
+
return name.startsWith("@") ? `${name}/${scopedName}` : name;
|
|
14
|
+
}
|
|
15
|
+
return /^index\.[cm]?[jt]s$/.test(path.basename(file))
|
|
16
|
+
? path.basename(path.dirname(file))
|
|
17
|
+
: path.basename(file);
|
|
18
|
+
}
|
|
19
|
+
|
|
8
20
|
async function canonical(file: string): Promise<string> {
|
|
9
21
|
return realpath(file).catch(() => path.resolve(file));
|
|
10
22
|
}
|
package/src/prefs/settings.ts
CHANGED
|
@@ -84,7 +84,7 @@ export const DEFAULT_MANAGER_SETTINGS: ManagerSettings = {
|
|
|
84
84
|
maxThreads: 64,
|
|
85
85
|
modelSelection: "pick-first-scoped",
|
|
86
86
|
subagentMode: "opportunistic",
|
|
87
|
-
toolFiltering: "
|
|
87
|
+
toolFiltering: "all-except-blocked",
|
|
88
88
|
widgetMode: "full",
|
|
89
89
|
costDisplay: "pi-footer-status",
|
|
90
90
|
costValue: "subagents",
|
package/src/ui/settings-ui.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ExtensionCommandContext, Theme } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
import {
|
|
3
|
-
import { discoverSubagentExtensions } from "../orch/extensions.ts";
|
|
2
|
+
import { discoverSubagentExtensions, extensionDisplayName } from "../orch/extensions.ts";
|
|
4
3
|
import type { ConfigStore } from "../prefs/config.ts";
|
|
5
4
|
import {
|
|
6
5
|
canOpenDialog,
|
|
@@ -226,7 +225,7 @@ async function configureSubagentExtensions(
|
|
|
226
225
|
[
|
|
227
226
|
...files.map((file) => ({
|
|
228
227
|
id: file,
|
|
229
|
-
label: `${selected.has(file) ? "[x]" : "[ ]"} ${
|
|
228
|
+
label: `${selected.has(file) ? "[x]" : "[ ]"} ${extensionDisplayName(file)}`,
|
|
230
229
|
value: available.includes(file) ? (selected.has(file) ? "On" : "Off") : "Unavailable",
|
|
231
230
|
help: `${file}\n${available.includes(file) ? "Reload this extension in newly opened subagent sessions." : "Not currently discoverable/trusted; will not load. Toggle Off to remove the saved selection."}\nSpace/Enter toggles. Changes are saved only with outer Save and apply.`,
|
|
232
231
|
})),
|