@ian-pascoe/pi-minimal-subagents 0.6.1 → 0.6.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/README.md
CHANGED
|
@@ -178,15 +178,18 @@ lists: `"read"` grants `read`, `grep`, `find`, and `ls`; `"modify"` adds
|
|
|
178
178
|
named ordinary tool and does not expand a preset. Coordinator tools are
|
|
179
179
|
injected separately according to delegation and must not appear in `tools`;
|
|
180
180
|
misuse returns an actionable error. Use the string preset when a child needs
|
|
181
|
-
the complete
|
|
181
|
+
the complete discovery bundle. Child sessions load the Root Agent's
|
|
182
182
|
configured settings and extensions, excluding the recursive
|
|
183
183
|
`pi-minimal-subagents` entrypoint. Project Context controls only project-scoped
|
|
184
184
|
AGENTS instructions and skills; omitting it retains user instructions and
|
|
185
185
|
skills plus project settings, extensions, providers, and tools. A configured
|
|
186
|
-
`pi-codex-conversion` adapter replaces a complete granted tool group only
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
186
|
+
`pi-codex-conversion` adapter replaces a complete granted tool group only,
|
|
187
|
+
including the `"read"` preset's `read`, `grep`, `find`, and `ls` tools. Exact
|
|
188
|
+
tool arrays are replaced only when they contain the complete source group.
|
|
189
|
+
Because Codex performs discovery through `exec_command`, an adapted `"read"`
|
|
190
|
+
preset is not an enforced read-only boundary. Status reports effective adapter
|
|
191
|
+
tools while the Launch Contract continues to record the originally granted
|
|
192
|
+
capability names.
|
|
190
193
|
|
|
191
194
|
`agent_message` reports whether a message was delivered through an active
|
|
192
195
|
parent wait, queued for the recipient, or failed. `subagent_wait` can return an
|
package/package.json
CHANGED
|
@@ -85,8 +85,12 @@ import type {
|
|
|
85
85
|
const EXTENSION_ENTRYPOINT = fileURLToPath(new URL("./index.ts", import.meta.url));
|
|
86
86
|
const CODEX_CONVERSION_TOOL_ADAPTER_SOURCE = "npm:@howaboua/pi-codex-conversion";
|
|
87
87
|
const CODEX_CONVERSION_TOOL_REPLACEMENTS = [
|
|
88
|
+
{
|
|
89
|
+
sourceToolNames: ["read", "grep", "find", "ls"],
|
|
90
|
+
runtimeToolNames: ["exec_command", "write_stdin"],
|
|
91
|
+
},
|
|
88
92
|
{ sourceToolNames: ["bash"], runtimeToolNames: ["exec_command", "write_stdin"] },
|
|
89
|
-
{ sourceToolNames: ["
|
|
93
|
+
{ sourceToolNames: ["edit", "write"], runtimeToolNames: ["apply_patch"] },
|
|
90
94
|
{ sourceToolNames: ["bash", "edit", "write"], runtimeToolNames: ["exec", "wait"] },
|
|
91
95
|
{ sourceToolNames: ["bash", "edit", "write"], runtimeToolNames: ["notebook"] },
|
|
92
96
|
] as const;
|
|
@@ -90,7 +90,7 @@ export interface RuntimeToolReplacement {
|
|
|
90
90
|
export interface RuntimeToolAdapter {
|
|
91
91
|
/** Every tool registered by the adapter, used to defer initial tool selection until it loads. */
|
|
92
92
|
readonly toolNames: readonly string[];
|
|
93
|
-
/**
|
|
93
|
+
/** Runtime replacements recognized for this adapter. */
|
|
94
94
|
readonly replacements: readonly RuntimeToolReplacement[];
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -42,7 +42,6 @@ export interface MinimalSubagentsWidgetRow {
|
|
|
42
42
|
|
|
43
43
|
export interface MinimalSubagentsWidgetView {
|
|
44
44
|
runningCount: number;
|
|
45
|
-
retainedCount: number;
|
|
46
45
|
recentCount: number;
|
|
47
46
|
rows: MinimalSubagentsWidgetRow[];
|
|
48
47
|
overflowCount: number;
|
|
@@ -148,7 +147,6 @@ export function buildMinimalSubagentsWidgetView(
|
|
|
148
147
|
});
|
|
149
148
|
return {
|
|
150
149
|
runningCount: running.length,
|
|
151
|
-
retainedCount: flattened.length,
|
|
152
150
|
recentCount: recent.filter((item) => chosenIds.has(item.agent.agent_id)).length,
|
|
153
151
|
rows,
|
|
154
152
|
overflowCount: Math.max(0, desiredIds.size - chosenIds.size),
|
|
@@ -395,7 +393,7 @@ class MinimalSubagentsWidgetComponent implements Component {
|
|
|
395
393
|
invalidate(): void {}
|
|
396
394
|
}
|
|
397
395
|
|
|
398
|
-
/** Own the root session's widget,
|
|
396
|
+
/** Own the root session's widget, live refresh, cooldown, and idempotent cleanup. */
|
|
399
397
|
export class MinimalSubagentsUiController {
|
|
400
398
|
private disposed = false;
|
|
401
399
|
private widgetMounted = false;
|
|
@@ -406,7 +404,6 @@ export class MinimalSubagentsUiController {
|
|
|
406
404
|
private restorationAttentionConsumed = false;
|
|
407
405
|
private currentView: MinimalSubagentsWidgetView = {
|
|
408
406
|
runningCount: 0,
|
|
409
|
-
retainedCount: 0,
|
|
410
407
|
recentCount: 0,
|
|
411
408
|
rows: [],
|
|
412
409
|
overflowCount: 0,
|
|
@@ -426,16 +423,8 @@ export class MinimalSubagentsUiController {
|
|
|
426
423
|
this.clearCooldown();
|
|
427
424
|
this.ensureRefreshInterval();
|
|
428
425
|
this.showWidget(nextView);
|
|
429
|
-
this.context.ui.setStatus(
|
|
430
|
-
MINIMAL_SUBAGENTS_UI_KEY,
|
|
431
|
-
[
|
|
432
|
-
this.context.ui.theme.fg("accent", `◉ ${nextView.runningCount} running`),
|
|
433
|
-
this.context.ui.theme.fg("muted", `${nextView.retainedCount} retained`),
|
|
434
|
-
].join(this.context.ui.theme.fg("dim", " · ")),
|
|
435
|
-
);
|
|
436
426
|
} else {
|
|
437
427
|
this.clearRefreshInterval();
|
|
438
|
-
this.context.ui.setStatus(MINIMAL_SUBAGENTS_UI_KEY, undefined);
|
|
439
428
|
const restoredUnavailable =
|
|
440
429
|
!this.restorationAttentionConsumed &&
|
|
441
430
|
this.previousRunningCount === 0 &&
|
|
@@ -459,7 +448,6 @@ export class MinimalSubagentsUiController {
|
|
|
459
448
|
this.clearRefreshInterval();
|
|
460
449
|
this.clearCooldown();
|
|
461
450
|
if (this.context.mode === "tui") {
|
|
462
|
-
this.context.ui.setStatus(MINIMAL_SUBAGENTS_UI_KEY, undefined);
|
|
463
451
|
this.context.ui.setWidget(MINIMAL_SUBAGENTS_UI_KEY, undefined);
|
|
464
452
|
}
|
|
465
453
|
this.widgetMounted = false;
|