brl-subagent 2.9.0 → 2.9.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/AGENT.md +16 -1
- package/README.md +2 -2
- package/package.json +5 -5
- package/src/boot-recovery.ts +50 -3
- package/src/delegate-handler.ts +2 -2
- package/src/logging.ts +66 -3
- package/src/recovery.ts +236 -7
- package/src/run-registry.ts +131 -7
- package/src/schema.ts +4 -2
- package/src/session-manager.ts +512 -74
- package/src/tui.ts +4 -4
- package/src/validate.ts +26 -6
package/src/tui.ts
CHANGED
|
@@ -1372,7 +1372,7 @@ async function showRunDetail(ctx: ExtensionContext, run: SubagentRun): Promise<v
|
|
|
1372
1372
|
|
|
1373
1373
|
const wrapOutput = (width: number): string[] => {
|
|
1374
1374
|
if (width === wrappedWidth) return wrappedLines;
|
|
1375
|
-
wrappedLines = new Text(theme.fg("toolOutput", outputText), 1, 0).render(width);
|
|
1375
|
+
wrappedLines = [...new Text(theme.fg("toolOutput", outputText), 1, 0).render(width)];
|
|
1376
1376
|
wrappedWidth = width;
|
|
1377
1377
|
return wrappedLines;
|
|
1378
1378
|
};
|
|
@@ -1948,7 +1948,7 @@ export async function showAgentDetail(
|
|
|
1948
1948
|
|
|
1949
1949
|
return {
|
|
1950
1950
|
render: (w: number) => {
|
|
1951
|
-
const lines = buildView().render(w);
|
|
1951
|
+
const lines = [...buildView().render(w)];
|
|
1952
1952
|
// Full-screen: pad the overlay content to the terminal height so
|
|
1953
1953
|
// the drill-in occupies the whole screen (the tui overlay sizes
|
|
1954
1954
|
// to its rendered content otherwise).
|
|
@@ -2973,9 +2973,9 @@ function withDiffKeybinding(
|
|
|
2973
2973
|
dc.addChild(new Text("", 0, 0));
|
|
2974
2974
|
dc.addChild(new Text(theme.fg("dim", "Press any key to return"), 1, 0));
|
|
2975
2975
|
dc.addChild(new DynamicBorder((s: string) => theme.fg("accent", s)));
|
|
2976
|
-
return dc.render(width);
|
|
2976
|
+
return [...dc.render(width)];
|
|
2977
2977
|
}
|
|
2978
|
-
return container.render(width);
|
|
2978
|
+
return [...container.render(width)];
|
|
2979
2979
|
},
|
|
2980
2980
|
handleInput(data: string) {
|
|
2981
2981
|
if (showFullDiff) {
|
package/src/validate.ts
CHANGED
|
@@ -66,9 +66,11 @@ interface ToolRequirement {
|
|
|
66
66
|
requiredTools: string[];
|
|
67
67
|
/**
|
|
68
68
|
* ANY-of: when set, ONE available tool satisfies the requirement and
|
|
69
|
-
* `requiredTools` is ignored —
|
|
70
|
-
*
|
|
71
|
-
*
|
|
69
|
+
* `requiredTools` is ignored — the row asks whether a single CAPABILITY
|
|
70
|
+
* is present, not whether every one of its interchangeable means is:
|
|
71
|
+
* directory exploration (find/ls/grep/bash), writing/creating a file
|
|
72
|
+
* (write/bash) and editing one (write/edit/bash) are each satisfied by
|
|
73
|
+
* any ONE of their tools, not a conjunction of all of them (issue #537).
|
|
72
74
|
*/
|
|
73
75
|
anyOfTools?: string[];
|
|
74
76
|
/**
|
|
@@ -111,17 +113,34 @@ interface ToolRequirement {
|
|
|
111
113
|
* yarn/pnpm/cargo/pip stay warning-class (docs can name them without
|
|
112
114
|
* needing them). Widening the table is deliberate work: add the keyword
|
|
113
115
|
* here AND update this note.
|
|
116
|
+
*
|
|
117
|
+
* CAPABILITY BOUNDARY — what a row claims (issue #537). Each row asks
|
|
118
|
+
* whether the CAPABILITY exists, not whether a preferred tool does: bash
|
|
119
|
+
* writes, edits and deletes, so it satisfies the write, edit and delete
|
|
120
|
+
* rows; the dedicated tools stay preferable by the prompt, not by this
|
|
121
|
+
* scan. Two consequences worth naming. (a) `edit` cannot create a missing
|
|
122
|
+
* file, so it does NOT satisfy the write/create row, while `write` rewrites
|
|
123
|
+
* a file wholesale, so it DOES satisfy the edit row. (b) The delete row
|
|
124
|
+
* requires bash alone — `write` cannot unlink, so requiring it there told a
|
|
125
|
+
* bash-bearing toolset to add a tool that could not do the job. The scan
|
|
126
|
+
* sees BUILT-IN tools only (custom tools are invisible to it). File RENAMES
|
|
127
|
+
* remain a documented false negative: `rename` sits in the edit row, and
|
|
128
|
+
* neither edit nor write can remove the old path.
|
|
114
129
|
*/
|
|
115
130
|
|
|
116
131
|
const TOOL_REQUIREMENTS: ToolRequirement[] = [
|
|
117
132
|
{
|
|
118
133
|
patterns: [/\b(write|create|generate|build|implement|add|insert|append)\b/i],
|
|
119
|
-
requiredTools: [
|
|
134
|
+
requiredTools: [],
|
|
135
|
+
// `edit` cannot create a missing file — it does not satisfy this arm.
|
|
136
|
+
anyOfTools: ['write', 'bash'],
|
|
120
137
|
description: 'involves writing/creating files',
|
|
121
138
|
},
|
|
122
139
|
{
|
|
123
140
|
patterns: [/\b(edit|modify|update|change|fix|patch|refactor|rename)\b/i],
|
|
124
|
-
requiredTools: [
|
|
141
|
+
requiredTools: [],
|
|
142
|
+
// `write` rewrites a file wholesale — it satisfies editing.
|
|
143
|
+
anyOfTools: ['write', 'edit', 'bash'],
|
|
125
144
|
description: 'involves editing files',
|
|
126
145
|
},
|
|
127
146
|
{
|
|
@@ -153,7 +172,8 @@ const TOOL_REQUIREMENTS: ToolRequirement[] = [
|
|
|
153
172
|
},
|
|
154
173
|
{
|
|
155
174
|
patterns: [/\b(delete|remove|clean|prune|uninstall|rm)\b/i],
|
|
156
|
-
|
|
175
|
+
// bash is the only builtin that deletes; `write` cannot unlink.
|
|
176
|
+
requiredTools: ['bash'],
|
|
157
177
|
description: 'involves deleting files',
|
|
158
178
|
},
|
|
159
179
|
{
|