@pellux/goodvibes-agent 1.0.17 → 1.0.19
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 +12 -0
- package/README.md +2 -2
- package/dist/package/main.js +305 -87
- package/docs/README.md +1 -1
- package/docs/getting-started.md +2 -2
- package/docs/tools-and-commands.md +7 -5
- package/package.json +1 -1
- package/src/tools/agent-harness-cli-metadata.ts +74 -9
- package/src/tools/agent-harness-keybinding-metadata.ts +83 -23
- package/src/tools/agent-harness-panel-metadata.ts +84 -14
- package/src/tools/agent-harness-tool-schema.ts +6 -6
- package/src/tools/agent-harness-tool.ts +7 -7
- package/src/tools/agent-harness-ui-surface-metadata.ts +75 -11
- package/src/version.ts +1 -1
package/dist/package/main.js
CHANGED
|
@@ -816508,7 +816508,7 @@ var createStyledCell = (char, overrides = {}) => ({
|
|
|
816508
816508
|
// src/version.ts
|
|
816509
816509
|
import { readFileSync } from "fs";
|
|
816510
816510
|
import { join } from "path";
|
|
816511
|
-
var _version = "1.0.
|
|
816511
|
+
var _version = "1.0.19";
|
|
816512
816512
|
var _sdkVersion = "0.33.35";
|
|
816513
816513
|
try {
|
|
816514
816514
|
const pkg = JSON.parse(readFileSync(join(import.meta.dir, "..", "package.json"), "utf-8"));
|
|
@@ -847717,13 +847717,13 @@ init_state3();
|
|
|
847717
847717
|
|
|
847718
847718
|
// src/input/commands/recall-shared.ts
|
|
847719
847719
|
var VALID_CLASSES = ["decision", "constraint", "incident", "pattern", "fact", "risk", "runbook", "architecture", "ownership"];
|
|
847720
|
-
var
|
|
847720
|
+
var VALID_SCOPES = ["session", "project", "team"];
|
|
847721
847721
|
var VALID_REVIEW_STATES = ["fresh", "reviewed", "stale", "contradicted"];
|
|
847722
847722
|
function isValidClass(s4) {
|
|
847723
847723
|
return VALID_CLASSES.includes(s4);
|
|
847724
847724
|
}
|
|
847725
847725
|
function isValidScope(s4) {
|
|
847726
|
-
return
|
|
847726
|
+
return VALID_SCOPES.includes(s4);
|
|
847727
847727
|
}
|
|
847728
847728
|
function isValidReviewState(s4) {
|
|
847729
847729
|
return VALID_REVIEW_STATES.includes(s4);
|
|
@@ -847766,7 +847766,7 @@ function handleRecallSearch(args2, context) {
|
|
|
847766
847766
|
if (isValidScope(scope))
|
|
847767
847767
|
filter.scope = scope;
|
|
847768
847768
|
else {
|
|
847769
|
-
context.print(`[memory] Unknown scope "${scope}". Valid values ${
|
|
847769
|
+
context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES.join(", ")}.`);
|
|
847770
847770
|
return;
|
|
847771
847771
|
}
|
|
847772
847772
|
}
|
|
@@ -847941,7 +847941,7 @@ function handleRecallList(args2, context) {
|
|
|
847941
847941
|
if (scopeIdx !== -1 && args2[scopeIdx + 1]) {
|
|
847942
847942
|
const scope = args2[scopeIdx + 1];
|
|
847943
847943
|
if (!isValidScope(scope)) {
|
|
847944
|
-
context.print(`[memory] Unknown scope "${scope}". Valid values ${
|
|
847944
|
+
context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES.join(", ")}.`);
|
|
847945
847945
|
return;
|
|
847946
847946
|
}
|
|
847947
847947
|
filter.scope = scope;
|
|
@@ -847991,7 +847991,7 @@ async function handleRecallAdd(args2, context) {
|
|
|
847991
847991
|
const tags = tagsRaw ? tagsRaw.split(",").map((token) => token.trim()).filter(Boolean) : [];
|
|
847992
847992
|
const scope = scopeRaw && isValidScope(scopeRaw) ? scopeRaw : "project";
|
|
847993
847993
|
if (scopeRaw && !isValidScope(scopeRaw)) {
|
|
847994
|
-
context.print(`[memory] Invalid scope "${scopeRaw}". Valid values ${
|
|
847994
|
+
context.print(`[memory] Invalid scope "${scopeRaw}". Valid values ${VALID_SCOPES.join(", ")}.`);
|
|
847995
847995
|
return;
|
|
847996
847996
|
}
|
|
847997
847997
|
const provenance = [];
|
|
@@ -848125,7 +848125,7 @@ function handleRecallExport(args2, context) {
|
|
|
848125
848125
|
if (scopeIdx !== -1 && commandArgs[scopeIdx + 1]) {
|
|
848126
848126
|
const scope = commandArgs[scopeIdx + 1];
|
|
848127
848127
|
if (!isValidScope(scope)) {
|
|
848128
|
-
context.print(`[memory] Unknown scope "${scope}". Valid values ${
|
|
848128
|
+
context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES.join(", ")}.`);
|
|
848129
848129
|
return;
|
|
848130
848130
|
}
|
|
848131
848131
|
filter.scope = scope;
|
|
@@ -848204,7 +848204,7 @@ function handleRecallHandoffExport(args2, context) {
|
|
|
848204
848204
|
const scopeIdx = commandArgs.indexOf("--scope");
|
|
848205
848205
|
const scopeRaw = scopeIdx !== -1 ? commandArgs[scopeIdx + 1] : "team";
|
|
848206
848206
|
if (!scopeRaw || !isValidScope(scopeRaw)) {
|
|
848207
|
-
context.print(`[memory] Unknown scope "${scopeRaw ?? ""}". Valid values ${
|
|
848207
|
+
context.print(`[memory] Unknown scope "${scopeRaw ?? ""}". Valid values ${VALID_SCOPES.join(", ")}.`);
|
|
848208
848208
|
return;
|
|
848209
848209
|
}
|
|
848210
848210
|
const bundle = memory.exportBundle({ scope: scopeRaw });
|
|
@@ -848320,7 +848320,7 @@ function handleRecallPromote(args2, context) {
|
|
|
848320
848320
|
const id = parsed.rest[0];
|
|
848321
848321
|
const scope = parsed.rest[1];
|
|
848322
848322
|
if (!id || !scope || !isValidScope(scope)) {
|
|
848323
|
-
context.print(`[memory] Usage: /memory promote <id> <${
|
|
848323
|
+
context.print(`[memory] Usage: /memory promote <id> <${VALID_SCOPES.join("|")}> --yes`);
|
|
848324
848324
|
return;
|
|
848325
848325
|
}
|
|
848326
848326
|
if (!parsed.yes) {
|
|
@@ -862253,7 +862253,7 @@ import { mkdirSync as mkdirSync64, readFileSync as readFileSync86, writeFileSync
|
|
|
862253
862253
|
import { dirname as dirname63, resolve as resolve39 } from "path";
|
|
862254
862254
|
init_state3();
|
|
862255
862255
|
var VALID_CLASSES2 = ["decision", "constraint", "incident", "pattern", "fact", "risk", "runbook", "architecture", "ownership"];
|
|
862256
|
-
var
|
|
862256
|
+
var VALID_SCOPES3 = ["session", "project", "team"];
|
|
862257
862257
|
var VALID_REVIEW_STATES3 = ["fresh", "reviewed", "stale", "contradicted"];
|
|
862258
862258
|
var VALID_PROVENANCE_KINDS = ["session", "turn", "task", "event", "file"];
|
|
862259
862259
|
var VALUE_OPTIONS = new Set([
|
|
@@ -862353,7 +862353,7 @@ function isMemoryClass2(value) {
|
|
|
862353
862353
|
return VALID_CLASSES2.includes(value);
|
|
862354
862354
|
}
|
|
862355
862355
|
function isMemoryScope2(value) {
|
|
862356
|
-
return
|
|
862356
|
+
return VALID_SCOPES3.includes(value);
|
|
862357
862357
|
}
|
|
862358
862358
|
function isReviewState(value) {
|
|
862359
862359
|
return VALID_REVIEW_STATES3.includes(value);
|
|
@@ -862368,7 +862368,7 @@ function requireClass(value) {
|
|
|
862368
862368
|
}
|
|
862369
862369
|
function requireScope(value) {
|
|
862370
862370
|
if (!value || !isMemoryScope2(value))
|
|
862371
|
-
throw new Error(`Invalid memory scope "${value ?? ""}". Valid values ${
|
|
862371
|
+
throw new Error(`Invalid memory scope "${value ?? ""}". Valid values ${VALID_SCOPES3.join(", ")}`);
|
|
862372
862372
|
return value;
|
|
862373
862373
|
}
|
|
862374
862374
|
function optionalScope(value) {
|
|
@@ -879744,6 +879744,9 @@ function readLimit5(value, fallback) {
|
|
|
879744
879744
|
return fallback;
|
|
879745
879745
|
return Math.max(1, Math.min(500, Math.trunc(parsed)));
|
|
879746
879746
|
}
|
|
879747
|
+
function redactCliLookupInput(input) {
|
|
879748
|
+
return input.replace(/(--config=)([^=\s]+)=\S+/g, "$1$2=<redacted>").replace(/(--config\s+)([^=\s]+)=\S+/g, "$1$2=<redacted>");
|
|
879749
|
+
}
|
|
879747
879750
|
function cliCommandTokens(command8) {
|
|
879748
879751
|
if (command8 === "unknown")
|
|
879749
879752
|
return [];
|
|
@@ -879760,13 +879763,14 @@ function fallbackCliSummary(command8) {
|
|
|
879760
879763
|
return "Print the installed Agent package version.";
|
|
879761
879764
|
return "Inspect the CLI help for this Agent package command.";
|
|
879762
879765
|
}
|
|
879763
|
-
function describeCliCommand(command8) {
|
|
879766
|
+
function describeCliCommand(command8, lookup) {
|
|
879764
879767
|
const help = describeGoodVibesCommandHelp(command8);
|
|
879765
879768
|
const tokens = cliCommandTokens(command8);
|
|
879766
879769
|
return {
|
|
879767
879770
|
name: command8,
|
|
879768
879771
|
tokens,
|
|
879769
879772
|
invocation: command8 === "tui" ? "goodvibes-agent" : `goodvibes-agent ${tokens[0] ?? command8}`,
|
|
879773
|
+
...lookup ? { lookup } : {},
|
|
879770
879774
|
helpTopic: help?.command ?? command8,
|
|
879771
879775
|
summary: help?.summary ?? fallbackCliSummary(command8),
|
|
879772
879776
|
usage: help?.usage ?? (command8 === "tui" ? ["goodvibes-agent [OPTIONS]"] : [`goodvibes-agent ${command8} [ARGS]`]),
|
|
@@ -879791,6 +879795,14 @@ function cliCommandMatches(command8, query2) {
|
|
|
879791
879795
|
].map((value) => JSON.stringify(value)).join(`
|
|
879792
879796
|
`).toLowerCase().includes(query2.toLowerCase());
|
|
879793
879797
|
}
|
|
879798
|
+
function cliCommandCandidate(command8) {
|
|
879799
|
+
return {
|
|
879800
|
+
name: command8.name,
|
|
879801
|
+
tokens: command8.tokens,
|
|
879802
|
+
invocation: command8.invocation,
|
|
879803
|
+
summary: command8.summary
|
|
879804
|
+
};
|
|
879805
|
+
}
|
|
879794
879806
|
function totalHarnessCliCommands() {
|
|
879795
879807
|
return listGoodVibesCliCommands().filter((command8) => command8 !== "unknown").length;
|
|
879796
879808
|
}
|
|
@@ -879800,23 +879812,60 @@ function blockedHarnessCliCommandTokens() {
|
|
|
879800
879812
|
function listHarnessCliCommands(args2) {
|
|
879801
879813
|
const query2 = readString50(args2.query);
|
|
879802
879814
|
const limit3 = readLimit5(args2.limit, 200);
|
|
879803
|
-
return listGoodVibesCliCommands().filter((command8) => command8 !== "unknown").map(describeCliCommand).filter((command8) => cliCommandMatches(command8, query2)).sort((a4, b3) => String(a4.name).localeCompare(String(b3.name))).slice(0, limit3);
|
|
879815
|
+
return listGoodVibesCliCommands().filter((command8) => command8 !== "unknown").map((command8) => describeCliCommand(command8)).filter((command8) => cliCommandMatches(command8, query2)).sort((a4, b3) => String(a4.name).localeCompare(String(b3.name))).slice(0, limit3);
|
|
879804
879816
|
}
|
|
879805
|
-
function
|
|
879806
|
-
const
|
|
879807
|
-
if (
|
|
879808
|
-
return
|
|
879817
|
+
function cliInputFromArgs(args2) {
|
|
879818
|
+
const cliCommand = readString50(args2.cliCommand);
|
|
879819
|
+
if (cliCommand)
|
|
879820
|
+
return { source: "cliCommand", input: cliCommand };
|
|
879821
|
+
const command8 = readString50(args2.command);
|
|
879822
|
+
if (command8)
|
|
879823
|
+
return { source: "command", input: command8 };
|
|
879824
|
+
const commandName = readString50(args2.commandName);
|
|
879825
|
+
if (commandName)
|
|
879826
|
+
return { source: "commandName", input: commandName };
|
|
879827
|
+
const target = readString50(args2.target);
|
|
879828
|
+
if (target)
|
|
879829
|
+
return { source: "target", input: target };
|
|
879830
|
+
const query2 = readString50(args2.query);
|
|
879831
|
+
if (query2)
|
|
879832
|
+
return { source: "query", input: query2 };
|
|
879833
|
+
return null;
|
|
879834
|
+
}
|
|
879835
|
+
function cliTokensFromRaw(raw) {
|
|
879809
879836
|
const tokens = raw.split(/\s+/).filter((token) => token.length > 0);
|
|
879810
879837
|
if (tokens[0] === "goodvibes-agent" || tokens[0]?.endsWith("/goodvibes-agent"))
|
|
879811
879838
|
return tokens.slice(1);
|
|
879812
879839
|
return tokens;
|
|
879813
879840
|
}
|
|
879841
|
+
function isConcreteCliSource(source) {
|
|
879842
|
+
return source === "cliCommand" || source === "command" || source === "commandName";
|
|
879843
|
+
}
|
|
879814
879844
|
function describeHarnessCliCommand(args2) {
|
|
879815
|
-
const
|
|
879816
|
-
if (
|
|
879817
|
-
return describeCliCommand("tui");
|
|
879845
|
+
const input = cliInputFromArgs(args2);
|
|
879846
|
+
if (!input)
|
|
879847
|
+
return describeCliCommand("tui", { source: "default", input: "", resolvedBy: "default" });
|
|
879848
|
+
const lookupInput = redactCliLookupInput(input.input);
|
|
879849
|
+
const tokens = cliTokensFromRaw(input.input);
|
|
879818
879850
|
const parsed = parseGoodVibesCli(tokens);
|
|
879819
|
-
|
|
879851
|
+
const directInvocation = parsed.command !== "unknown" && (isConcreteCliSource(input.source) || String(parsed.rawCommand ?? "").toLowerCase() === String(tokens[0] ?? "").toLowerCase());
|
|
879852
|
+
if (!directInvocation) {
|
|
879853
|
+
const matches = listGoodVibesCliCommands().filter((command8) => command8 !== "unknown").map((command8) => describeCliCommand(command8)).filter((command8) => cliCommandMatches(command8, input.input)).sort((a4, b3) => String(a4.name).localeCompare(String(b3.name)));
|
|
879854
|
+
if (matches.length === 1) {
|
|
879855
|
+
return {
|
|
879856
|
+
...matches[0],
|
|
879857
|
+
lookup: { source: input.source, input: lookupInput, resolvedBy: "search" }
|
|
879858
|
+
};
|
|
879859
|
+
}
|
|
879860
|
+
if (matches.length > 1) {
|
|
879861
|
+
return {
|
|
879862
|
+
supported: false,
|
|
879863
|
+
status: "ambiguous",
|
|
879864
|
+
input: lookupInput,
|
|
879865
|
+
candidates: matches.map(cliCommandCandidate).slice(0, 8),
|
|
879866
|
+
note: "Multiple top-level CLI mirrors matched this lookup. Provide cliCommand or commandName with one concrete command token."
|
|
879867
|
+
};
|
|
879868
|
+
}
|
|
879820
879869
|
return {
|
|
879821
879870
|
supported: false,
|
|
879822
879871
|
token: parsed.rawCommand ?? tokens[0],
|
|
@@ -879826,7 +879875,7 @@ function describeHarnessCliCommand(args2) {
|
|
|
879826
879875
|
};
|
|
879827
879876
|
}
|
|
879828
879877
|
return {
|
|
879829
|
-
...describeCliCommand(parsed.command),
|
|
879878
|
+
...describeCliCommand(parsed.command, { source: input.source, input: lookupInput, resolvedBy: "invocation" }),
|
|
879830
879879
|
parsed: {
|
|
879831
879880
|
command: parsed.command,
|
|
879832
879881
|
rawCommand: parsed.rawCommand,
|
|
@@ -880020,10 +880069,6 @@ function requireKeybindingsManager2(context) {
|
|
|
880020
880069
|
function isKeyAction2(action2) {
|
|
880021
880070
|
return Object.hasOwn(ACTION_DESCRIPTIONS, action2);
|
|
880022
880071
|
}
|
|
880023
|
-
function actionFromArgs(args2) {
|
|
880024
|
-
const action2 = readString52(args2.actionId || args2.key || args2.query);
|
|
880025
|
-
return action2 && isKeyAction2(action2) ? action2 : null;
|
|
880026
|
-
}
|
|
880027
880072
|
function readBoolean15(value) {
|
|
880028
880073
|
if (typeof value === "boolean")
|
|
880029
880074
|
return value;
|
|
@@ -880112,23 +880157,70 @@ function describeCombo(manager5, combo) {
|
|
|
880112
880157
|
label: manager5.formatCombo(combo)
|
|
880113
880158
|
};
|
|
880114
880159
|
}
|
|
880115
|
-
function
|
|
880116
|
-
|
|
880117
|
-
|
|
880118
|
-
|
|
880160
|
+
function keybindingLookupFromArgs(args2) {
|
|
880161
|
+
const actionId = readString52(args2.actionId);
|
|
880162
|
+
if (actionId)
|
|
880163
|
+
return { source: "actionId", input: actionId };
|
|
880164
|
+
const target = readString52(args2.target);
|
|
880165
|
+
if (target)
|
|
880166
|
+
return { source: "target", input: target };
|
|
880167
|
+
const key = readString52(args2.key);
|
|
880168
|
+
if (key)
|
|
880169
|
+
return { source: "key", input: key };
|
|
880170
|
+
const query2 = readString52(args2.query);
|
|
880171
|
+
if (query2)
|
|
880172
|
+
return { source: "query", input: query2 };
|
|
880173
|
+
return null;
|
|
880174
|
+
}
|
|
880175
|
+
function bindingSearchText(manager5, entry) {
|
|
880176
|
+
return [
|
|
880119
880177
|
entry.action,
|
|
880120
880178
|
entry.description,
|
|
880121
|
-
...entry.combos.map((combo) => comboFingerprint(combo))
|
|
880179
|
+
...entry.combos.map((combo) => comboFingerprint(combo)),
|
|
880180
|
+
...entry.combos.map((combo) => manager5.formatCombo(combo))
|
|
880122
880181
|
].join(`
|
|
880123
880182
|
`).toLowerCase();
|
|
880124
|
-
return haystack.includes(query2.toLowerCase());
|
|
880125
880183
|
}
|
|
880126
|
-
function
|
|
880184
|
+
function bindingCandidate(manager5, entry) {
|
|
880185
|
+
return {
|
|
880186
|
+
action: entry.action,
|
|
880187
|
+
description: entry.description,
|
|
880188
|
+
labels: entry.combos.map((combo) => manager5.formatCombo(combo))
|
|
880189
|
+
};
|
|
880190
|
+
}
|
|
880191
|
+
function bindingMatches(manager5, entry, query2) {
|
|
880192
|
+
if (!query2)
|
|
880193
|
+
return true;
|
|
880194
|
+
return bindingSearchText(manager5, entry).includes(query2.toLowerCase());
|
|
880195
|
+
}
|
|
880196
|
+
function resolveHarnessKeybinding(context, args2) {
|
|
880197
|
+
const manager5 = requireKeybindingsManager2(context);
|
|
880198
|
+
const lookup = keybindingLookupFromArgs(args2);
|
|
880199
|
+
if (!lookup)
|
|
880200
|
+
return null;
|
|
880201
|
+
const entries = manager5.getAll();
|
|
880202
|
+
if (isKeyAction2(lookup.input))
|
|
880203
|
+
return { status: "found", action: lookup.input, lookup: { ...lookup, resolvedBy: "action" } };
|
|
880204
|
+
const inputLower = lookup.input.toLowerCase();
|
|
880205
|
+
const ciActions = entries.filter((entry) => entry.action.toLowerCase() === inputLower);
|
|
880206
|
+
if (ciActions.length === 1)
|
|
880207
|
+
return { status: "found", action: ciActions[0].action, lookup: { ...lookup, resolvedBy: "case-insensitive-action" } };
|
|
880208
|
+
if (ciActions.length > 1)
|
|
880209
|
+
return { status: "ambiguous", input: lookup.input, candidates: ciActions.map((entry) => bindingCandidate(manager5, entry)).slice(0, 8) };
|
|
880210
|
+
const matches = entries.filter((entry) => bindingMatches(manager5, entry, lookup.input));
|
|
880211
|
+
if (matches.length === 1)
|
|
880212
|
+
return { status: "found", action: matches[0].action, lookup: { ...lookup, resolvedBy: "search" } };
|
|
880213
|
+
if (matches.length > 1)
|
|
880214
|
+
return { status: "ambiguous", input: lookup.input, candidates: matches.map((entry) => bindingCandidate(manager5, entry)).slice(0, 8) };
|
|
880215
|
+
return null;
|
|
880216
|
+
}
|
|
880217
|
+
function describeBinding(manager5, action2, combos, lookup) {
|
|
880127
880218
|
const defaults3 = DEFAULT_KEYBINDINGS[action2];
|
|
880128
880219
|
const customized = !combosEqual(combos, defaults3);
|
|
880129
880220
|
return {
|
|
880130
880221
|
action: action2,
|
|
880131
880222
|
description: ACTION_DESCRIPTIONS[action2],
|
|
880223
|
+
...lookup ? { lookup } : {},
|
|
880132
880224
|
bindings: combos.map((combo) => describeCombo(manager5, combo)),
|
|
880133
880225
|
labels: combos.map((combo) => manager5.formatCombo(combo)),
|
|
880134
880226
|
defaultBindings: defaults3.map((combo) => describeCombo(manager5, combo)),
|
|
@@ -880173,7 +880265,7 @@ ${shortcut.description}`.toLowerCase().includes(query2)).slice(0, readLimit7(arg
|
|
|
880173
880265
|
function listHarnessKeybindings(context, args2) {
|
|
880174
880266
|
const manager5 = requireKeybindingsManager2(context);
|
|
880175
880267
|
const query2 = readString52(args2.query);
|
|
880176
|
-
const entries = manager5.getAll().filter((entry) => bindingMatches(entry, query2)).slice(0, readLimit7(args2.limit, 200)).map((entry) => describeBinding(manager5, entry.action, entry.combos));
|
|
880268
|
+
const entries = manager5.getAll().filter((entry) => bindingMatches(manager5, entry, query2)).slice(0, readLimit7(args2.limit, 200)).map((entry) => describeBinding(manager5, entry.action, entry.combos));
|
|
880177
880269
|
return {
|
|
880178
880270
|
configPath: manager5.getConfigPath(),
|
|
880179
880271
|
keybindings: entries,
|
|
@@ -880184,46 +880276,54 @@ function listHarnessKeybindings(context, args2) {
|
|
|
880184
880276
|
}
|
|
880185
880277
|
function describeHarnessKeybinding(context, args2) {
|
|
880186
880278
|
const manager5 = requireKeybindingsManager2(context);
|
|
880187
|
-
const
|
|
880188
|
-
if (
|
|
880279
|
+
const resolved = resolveHarnessKeybinding(context, args2);
|
|
880280
|
+
if (resolved?.status === "ambiguous")
|
|
880281
|
+
return { status: "ambiguous", input: resolved.input, candidates: resolved.candidates };
|
|
880282
|
+
if (!resolved)
|
|
880189
880283
|
return null;
|
|
880190
|
-
const entry = manager5.getAll().find((candidate) => candidate.action ===
|
|
880284
|
+
const entry = manager5.getAll().find((candidate) => candidate.action === resolved.action);
|
|
880191
880285
|
return entry ? {
|
|
880192
880286
|
configPath: manager5.getConfigPath(),
|
|
880193
|
-
...describeBinding(manager5, entry.action, entry.combos)
|
|
880287
|
+
...describeBinding(manager5, entry.action, entry.combos, resolved.lookup)
|
|
880194
880288
|
} : null;
|
|
880195
880289
|
}
|
|
880196
880290
|
function setHarnessKeybinding(context, args2) {
|
|
880197
880291
|
const manager5 = requireKeybindingsManager2(context);
|
|
880198
|
-
const
|
|
880199
|
-
if (
|
|
880200
|
-
throw new Error(
|
|
880292
|
+
const resolved = resolveHarnessKeybinding(context, args2);
|
|
880293
|
+
if (resolved?.status === "ambiguous")
|
|
880294
|
+
throw new Error(`Ambiguous keybinding action ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
880295
|
+
if (!resolved)
|
|
880296
|
+
throw new Error("set_keybinding requires a valid keybinding action id, target, or query.");
|
|
880201
880297
|
const combos = combosFromArgs(args2);
|
|
880202
880298
|
const configPath = manager5.getConfigPath();
|
|
880203
880299
|
const overrides = readOverrideFile(configPath);
|
|
880204
|
-
overrides[
|
|
880300
|
+
overrides[resolved.action] = combos.length === 1 ? combos[0] : combos;
|
|
880205
880301
|
writeOverrideFile(configPath, overrides);
|
|
880206
880302
|
manager5.loadFromDisk();
|
|
880207
880303
|
return {
|
|
880208
880304
|
status: "updated",
|
|
880209
880305
|
configPath,
|
|
880210
|
-
keybinding: describeHarnessKeybinding(context, { actionId:
|
|
880306
|
+
keybinding: describeHarnessKeybinding(context, { actionId: resolved.action }),
|
|
880307
|
+
lookup: resolved.lookup
|
|
880211
880308
|
};
|
|
880212
880309
|
}
|
|
880213
880310
|
function resetHarnessKeybinding(context, args2) {
|
|
880214
880311
|
const manager5 = requireKeybindingsManager2(context);
|
|
880215
|
-
const
|
|
880216
|
-
if (
|
|
880217
|
-
throw new Error(
|
|
880312
|
+
const resolved = resolveHarnessKeybinding(context, args2);
|
|
880313
|
+
if (resolved?.status === "ambiguous")
|
|
880314
|
+
throw new Error(`Ambiguous keybinding action ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
880315
|
+
if (!resolved)
|
|
880316
|
+
throw new Error("reset_keybinding requires a valid keybinding action id, target, or query.");
|
|
880218
880317
|
const configPath = manager5.getConfigPath();
|
|
880219
880318
|
const overrides = readOverrideFile(configPath);
|
|
880220
|
-
delete overrides[
|
|
880319
|
+
delete overrides[resolved.action];
|
|
880221
880320
|
writeOverrideFile(configPath, overrides);
|
|
880222
880321
|
manager5.loadFromDisk();
|
|
880223
880322
|
return {
|
|
880224
880323
|
status: "reset",
|
|
880225
880324
|
configPath,
|
|
880226
|
-
keybinding: describeHarnessKeybinding(context, { actionId:
|
|
880325
|
+
keybinding: describeHarnessKeybinding(context, { actionId: resolved.action }),
|
|
880326
|
+
lookup: resolved.lookup
|
|
880227
880327
|
};
|
|
880228
880328
|
}
|
|
880229
880329
|
|
|
@@ -880249,10 +880349,69 @@ function panelMatches(panel, query2) {
|
|
|
880249
880349
|
panel.category,
|
|
880250
880350
|
panel.description,
|
|
880251
880351
|
panel.workspaceRoute
|
|
880252
|
-
].map((value) => String(value ?? "")).join(`
|
|
880352
|
+
].map((value) => typeof value === "object" ? JSON.stringify(value) : String(value ?? "")).join(`
|
|
880253
880353
|
`).toLowerCase().includes(query2.toLowerCase());
|
|
880254
880354
|
}
|
|
880255
|
-
function
|
|
880355
|
+
function panelLookupFromArgs(args2) {
|
|
880356
|
+
const panelId = readString53(args2.panelId);
|
|
880357
|
+
if (panelId)
|
|
880358
|
+
return { source: "panelId", input: panelId };
|
|
880359
|
+
const target = readString53(args2.target);
|
|
880360
|
+
if (target)
|
|
880361
|
+
return { source: "target", input: target };
|
|
880362
|
+
const query2 = readString53(args2.query);
|
|
880363
|
+
if (query2)
|
|
880364
|
+
return { source: "query", input: query2 };
|
|
880365
|
+
return null;
|
|
880366
|
+
}
|
|
880367
|
+
function panelCandidate(registration) {
|
|
880368
|
+
return {
|
|
880369
|
+
id: registration.id,
|
|
880370
|
+
name: registration.name,
|
|
880371
|
+
category: registration.category,
|
|
880372
|
+
description: registration.description,
|
|
880373
|
+
workspaceRoute: {
|
|
880374
|
+
categoryId: agentWorkspaceCategoryForPanel(registration.id),
|
|
880375
|
+
command: agentWorkspaceCommandForPanel(registration.id)
|
|
880376
|
+
}
|
|
880377
|
+
};
|
|
880378
|
+
}
|
|
880379
|
+
function resolveHarnessPanel(context, args2) {
|
|
880380
|
+
const manager5 = panelManager(context);
|
|
880381
|
+
const lookup = panelLookupFromArgs(args2);
|
|
880382
|
+
if (!manager5 || !lookup)
|
|
880383
|
+
return null;
|
|
880384
|
+
const registrations = manager5.getRegisteredTypes();
|
|
880385
|
+
const exactId = registrations.find((panel) => panel.id === lookup.input);
|
|
880386
|
+
if (exactId)
|
|
880387
|
+
return { status: "found", registration: exactId, lookup: { ...lookup, resolvedBy: "id" } };
|
|
880388
|
+
const inputLower = lookup.input.toLowerCase();
|
|
880389
|
+
const exactName = registrations.find((panel) => panel.name === lookup.input);
|
|
880390
|
+
if (exactName)
|
|
880391
|
+
return { status: "found", registration: exactName, lookup: { ...lookup, resolvedBy: "name" } };
|
|
880392
|
+
const ciId = registrations.filter((panel) => panel.id.toLowerCase() === inputLower);
|
|
880393
|
+
if (ciId.length === 1)
|
|
880394
|
+
return { status: "found", registration: ciId[0], lookup: { ...lookup, resolvedBy: "case-insensitive-id" } };
|
|
880395
|
+
if (ciId.length > 1)
|
|
880396
|
+
return { status: "ambiguous", input: lookup.input, candidates: ciId.map(panelCandidate).slice(0, 8) };
|
|
880397
|
+
const ciName = registrations.filter((panel) => panel.name.toLowerCase() === inputLower);
|
|
880398
|
+
if (ciName.length === 1)
|
|
880399
|
+
return { status: "found", registration: ciName[0], lookup: { ...lookup, resolvedBy: "case-insensitive-name" } };
|
|
880400
|
+
if (ciName.length > 1)
|
|
880401
|
+
return { status: "ambiguous", input: lookup.input, candidates: ciName.map(panelCandidate).slice(0, 8) };
|
|
880402
|
+
const category = readString53(args2.category);
|
|
880403
|
+
const search2 = registrations.filter((registration) => {
|
|
880404
|
+
if (category && registration.category !== category)
|
|
880405
|
+
return false;
|
|
880406
|
+
return panelMatches(panelCandidate(registration), lookup.input);
|
|
880407
|
+
});
|
|
880408
|
+
if (search2.length === 1)
|
|
880409
|
+
return { status: "found", registration: search2[0], lookup: { ...lookup, resolvedBy: "search" } };
|
|
880410
|
+
if (search2.length > 1)
|
|
880411
|
+
return { status: "ambiguous", input: lookup.input, candidates: search2.map(panelCandidate).slice(0, 8) };
|
|
880412
|
+
return null;
|
|
880413
|
+
}
|
|
880414
|
+
function describePanelRegistration(context, registration, lookup) {
|
|
880256
880415
|
const manager5 = panelManager(context);
|
|
880257
880416
|
const openPanel = manager5?.getPanel(registration.id) ?? null;
|
|
880258
880417
|
const pane = manager5?.getPaneOf(registration.id) ?? null;
|
|
@@ -880263,6 +880422,7 @@ function describePanelRegistration(context, registration) {
|
|
|
880263
880422
|
icon: registration.icon,
|
|
880264
880423
|
category: registration.category,
|
|
880265
880424
|
description: registration.description,
|
|
880425
|
+
...lookup ? { lookup } : {},
|
|
880266
880426
|
preload: registration.preload === true,
|
|
880267
880427
|
open: openPanel !== null,
|
|
880268
880428
|
pane,
|
|
@@ -880292,24 +880452,27 @@ function listHarnessPanels(context, args2) {
|
|
|
880292
880452
|
return manager5.getRegisteredTypes().map((registration) => describePanelRegistration(context, registration)).filter((panel) => !category || panel.category === category).filter((panel) => panelMatches(panel, query2)).sort((a4, b3) => String(a4.id).localeCompare(String(b3.id))).slice(0, limit3);
|
|
880293
880453
|
}
|
|
880294
880454
|
function describeHarnessPanel(context, args2) {
|
|
880295
|
-
const
|
|
880296
|
-
if (
|
|
880297
|
-
return
|
|
880298
|
-
|
|
880299
|
-
|
|
880300
|
-
|
|
880301
|
-
|
|
880302
|
-
return registration ? describePanelRegistration(context, registration) : null;
|
|
880455
|
+
const resolved = resolveHarnessPanel(context, args2);
|
|
880456
|
+
if (resolved?.status === "found")
|
|
880457
|
+
return describePanelRegistration(context, resolved.registration, resolved.lookup);
|
|
880458
|
+
if (resolved?.status === "ambiguous") {
|
|
880459
|
+
return { status: "ambiguous", input: resolved.input, candidates: resolved.candidates };
|
|
880460
|
+
}
|
|
880461
|
+
return null;
|
|
880303
880462
|
}
|
|
880304
880463
|
function openHarnessPanel(context, args2) {
|
|
880305
|
-
const
|
|
880306
|
-
if (
|
|
880464
|
+
const resolved = resolveHarnessPanel(context, args2);
|
|
880465
|
+
if (resolved?.status === "ambiguous") {
|
|
880466
|
+
return { status: "ambiguous_panel", input: resolved.input, candidates: resolved.candidates };
|
|
880467
|
+
}
|
|
880468
|
+
if (!resolved) {
|
|
880307
880469
|
return {
|
|
880308
880470
|
status: "unknown_panel",
|
|
880309
|
-
panelId: readString53(args2.panelId || args2.query) || "<missing>",
|
|
880471
|
+
panelId: readString53(args2.panelId || args2.target || args2.query) || "<missing>",
|
|
880310
880472
|
availablePanels: listHarnessPanels(context, { limit: 50 }).map((entry) => entry.id)
|
|
880311
880473
|
};
|
|
880312
880474
|
}
|
|
880475
|
+
const panel = describePanelRegistration(context, resolved.registration, resolved.lookup);
|
|
880313
880476
|
const requestedPane = readString53(args2.pane);
|
|
880314
880477
|
const pane = requestedPane === "bottom" || requestedPane === "top" ? requestedPane : undefined;
|
|
880315
880478
|
if (!context.showPanel) {
|
|
@@ -880927,7 +881090,7 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
|
|
|
880927
881090
|
},
|
|
880928
881091
|
query: {
|
|
880929
881092
|
type: "string",
|
|
880930
|
-
description: "Search text for command, workspace action, setting,
|
|
881093
|
+
description: "Search text for command, CLI mirror, panel, UI surface, keybinding, workspace action, setting, or tool catalogs; also slash-command, CLI mirror, setting, panel, UI surface, or keybinding lookup for single-item modes."
|
|
880931
881094
|
},
|
|
880932
881095
|
command: {
|
|
880933
881096
|
type: "string",
|
|
@@ -880935,7 +881098,7 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
|
|
|
880935
881098
|
},
|
|
880936
881099
|
cliCommand: {
|
|
880937
881100
|
type: "string",
|
|
880938
|
-
description: 'Top-level CLI command string for mode cli_command, for example "goodvibes-agent status --json" or "profiles list". This mode is read-only metadata/parse inspection.'
|
|
881101
|
+
description: 'Top-level CLI command string for mode cli_command, for example "goodvibes-agent status --json" or "profiles list". target or query can also look up one CLI mirror when the exact command token is not known. This mode is read-only metadata/parse inspection.'
|
|
880939
881102
|
},
|
|
880940
881103
|
commandName: {
|
|
880941
881104
|
type: "string",
|
|
@@ -880952,15 +881115,15 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
|
|
|
880952
881115
|
},
|
|
880953
881116
|
surfaceId: {
|
|
880954
881117
|
type: "string",
|
|
880955
|
-
description: "UI surface id for ui_surface or open_ui_surface modes."
|
|
881118
|
+
description: "UI surface id for ui_surface or open_ui_surface modes. target or query can also look up one UI surface when the exact id is not known."
|
|
880956
881119
|
},
|
|
880957
881120
|
panelId: {
|
|
880958
881121
|
type: "string",
|
|
880959
|
-
description: "Built-in panel id for panel or open_panel modes."
|
|
881122
|
+
description: "Built-in panel id for panel or open_panel modes. target or query can also look up one panel when the exact id is not known."
|
|
880960
881123
|
},
|
|
880961
881124
|
actionId: {
|
|
880962
881125
|
type: "string",
|
|
880963
|
-
description: "Agent workspace action id for workspace_action or run_workspace_action, or keybinding action id for keybinding/set_keybinding/reset_keybinding."
|
|
881126
|
+
description: "Agent workspace action id for workspace_action or run_workspace_action, or keybinding action id for keybinding/set_keybinding/reset_keybinding. target or query can also look up one keybinding action."
|
|
880964
881127
|
},
|
|
880965
881128
|
fields: {
|
|
880966
881129
|
type: "object",
|
|
@@ -880994,7 +881157,7 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
|
|
|
880994
881157
|
},
|
|
880995
881158
|
target: {
|
|
880996
881159
|
type: "string",
|
|
880997
|
-
description: "Optional lookup target, such as a model-picker target, workspace action id/search text, slash command root or invocation, setting key/search text, model tool name, or connected-host capability id."
|
|
881160
|
+
description: "Optional lookup target, such as a model-picker target, top-level CLI mirror/search text, panel id/search text, UI surface id/search text, workspace action id/search text, slash command root or invocation, setting key/search text, keybinding action/search text, model tool name, or connected-host capability id."
|
|
880998
881161
|
},
|
|
880999
881162
|
capabilityId: {
|
|
881000
881163
|
type: "string",
|
|
@@ -881744,13 +881907,64 @@ function surfaceMatches(surface, query2) {
|
|
|
881744
881907
|
].map((value) => String(value ?? "")).join(`
|
|
881745
881908
|
`).toLowerCase().includes(query2.toLowerCase());
|
|
881746
881909
|
}
|
|
881747
|
-
function
|
|
881910
|
+
function surfaceLookupFromArgs(args2) {
|
|
881911
|
+
const surfaceId = readString57(args2.surfaceId);
|
|
881912
|
+
if (surfaceId)
|
|
881913
|
+
return { source: "surfaceId", input: surfaceId };
|
|
881914
|
+
const query2 = readString57(args2.query);
|
|
881915
|
+
if (query2)
|
|
881916
|
+
return { source: "query", input: query2 };
|
|
881917
|
+
const target = readString57(args2.target);
|
|
881918
|
+
if (target)
|
|
881919
|
+
return { source: "target", input: target };
|
|
881920
|
+
return null;
|
|
881921
|
+
}
|
|
881922
|
+
function surfaceCandidate(surface) {
|
|
881748
881923
|
return {
|
|
881749
881924
|
id: surface.id,
|
|
881750
881925
|
label: surface.label,
|
|
881751
881926
|
kind: surface.kind,
|
|
881752
881927
|
summary: surface.summary,
|
|
881753
881928
|
command: surface.command,
|
|
881929
|
+
preferredModelRoute: surface.preferredModelRoute
|
|
881930
|
+
};
|
|
881931
|
+
}
|
|
881932
|
+
function resolveHarnessUiSurface(args2) {
|
|
881933
|
+
const lookup = surfaceLookupFromArgs(args2);
|
|
881934
|
+
if (!lookup)
|
|
881935
|
+
return null;
|
|
881936
|
+
const exactId = UI_SURFACES.find((surface) => surface.id === lookup.input);
|
|
881937
|
+
if (exactId)
|
|
881938
|
+
return { status: "found", surface: exactId, lookup: { ...lookup, resolvedBy: "id" } };
|
|
881939
|
+
const exactLabel = UI_SURFACES.find((surface) => surface.label === lookup.input);
|
|
881940
|
+
if (exactLabel)
|
|
881941
|
+
return { status: "found", surface: exactLabel, lookup: { ...lookup, resolvedBy: "label" } };
|
|
881942
|
+
const inputLower = lookup.input.toLowerCase();
|
|
881943
|
+
const ciId = UI_SURFACES.filter((surface) => surface.id.toLowerCase() === inputLower);
|
|
881944
|
+
if (ciId.length === 1)
|
|
881945
|
+
return { status: "found", surface: ciId[0], lookup: { ...lookup, resolvedBy: "case-insensitive-id" } };
|
|
881946
|
+
if (ciId.length > 1)
|
|
881947
|
+
return { status: "ambiguous", input: lookup.input, candidates: ciId.map(surfaceCandidate).slice(0, 8) };
|
|
881948
|
+
const ciLabel = UI_SURFACES.filter((surface) => surface.label.toLowerCase() === inputLower);
|
|
881949
|
+
if (ciLabel.length === 1)
|
|
881950
|
+
return { status: "found", surface: ciLabel[0], lookup: { ...lookup, resolvedBy: "case-insensitive-label" } };
|
|
881951
|
+
if (ciLabel.length > 1)
|
|
881952
|
+
return { status: "ambiguous", input: lookup.input, candidates: ciLabel.map(surfaceCandidate).slice(0, 8) };
|
|
881953
|
+
const search2 = UI_SURFACES.filter((surface) => surfaceMatches(surfaceCandidate(surface), lookup.input));
|
|
881954
|
+
if (search2.length === 1)
|
|
881955
|
+
return { status: "found", surface: search2[0], lookup: { ...lookup, resolvedBy: "search" } };
|
|
881956
|
+
if (search2.length > 1)
|
|
881957
|
+
return { status: "ambiguous", input: lookup.input, candidates: search2.map(surfaceCandidate).slice(0, 8) };
|
|
881958
|
+
return null;
|
|
881959
|
+
}
|
|
881960
|
+
function describeSurface(context, surface, lookup) {
|
|
881961
|
+
return {
|
|
881962
|
+
id: surface.id,
|
|
881963
|
+
label: surface.label,
|
|
881964
|
+
kind: surface.kind,
|
|
881965
|
+
summary: surface.summary,
|
|
881966
|
+
command: surface.command,
|
|
881967
|
+
...lookup ? { lookup } : {},
|
|
881754
881968
|
preferredModelRoute: surface.preferredModelRoute,
|
|
881755
881969
|
parameters: surface.parameters ?? [],
|
|
881756
881970
|
available: surface.available(context),
|
|
@@ -881770,26 +881984,30 @@ function listHarnessUiSurfaces(context, args2) {
|
|
|
881770
881984
|
return UI_SURFACES.map((surface) => describeSurface(context, surface)).filter((surface) => surfaceMatches(surface, query2)).slice(0, limit3);
|
|
881771
881985
|
}
|
|
881772
881986
|
function describeHarnessUiSurface(context, args2) {
|
|
881773
|
-
const
|
|
881774
|
-
if (
|
|
881775
|
-
return
|
|
881776
|
-
|
|
881777
|
-
|
|
881987
|
+
const resolved = resolveHarnessUiSurface(args2);
|
|
881988
|
+
if (resolved?.status === "found")
|
|
881989
|
+
return describeSurface(context, resolved.surface, resolved.lookup);
|
|
881990
|
+
if (resolved?.status === "ambiguous") {
|
|
881991
|
+
return { status: "ambiguous", input: resolved.input, candidates: resolved.candidates };
|
|
881992
|
+
}
|
|
881993
|
+
return null;
|
|
881778
881994
|
}
|
|
881779
881995
|
async function openHarnessUiSurface(context, args2) {
|
|
881780
|
-
const
|
|
881781
|
-
|
|
881782
|
-
|
|
881996
|
+
const resolved = resolveHarnessUiSurface(args2);
|
|
881997
|
+
if (resolved?.status === "ambiguous") {
|
|
881998
|
+
return { status: "ambiguous_ui_surface", input: resolved.input, candidates: resolved.candidates };
|
|
881999
|
+
}
|
|
882000
|
+
if (!resolved) {
|
|
881783
882001
|
return {
|
|
881784
882002
|
status: "unknown_ui_surface",
|
|
881785
|
-
surfaceId: surfaceId || "<missing>",
|
|
882003
|
+
surfaceId: readString57(args2.surfaceId || args2.query || args2.target) || "<missing>",
|
|
881786
882004
|
availableSurfaces: UI_SURFACES.map((entry) => entry.id)
|
|
881787
882005
|
};
|
|
881788
882006
|
}
|
|
881789
|
-
const routed = await surface.open(context, args2);
|
|
882007
|
+
const routed = await resolved.surface.open(context, args2);
|
|
881790
882008
|
return {
|
|
881791
882009
|
...routed,
|
|
881792
|
-
descriptor: describeSurface(context, surface)
|
|
882010
|
+
descriptor: describeSurface(context, resolved.surface, resolved.lookup)
|
|
881793
882011
|
};
|
|
881794
882012
|
}
|
|
881795
882013
|
|
|
@@ -882248,10 +882466,10 @@ function createAgentHarnessTool(deps) {
|
|
|
882248
882466
|
workspaceActions: allWorkspaceActions().length,
|
|
882249
882467
|
tools: deps.toolRegistry.getToolDefinitions().length,
|
|
882250
882468
|
modelAccess: {
|
|
882251
|
-
cliCommands: 'Use mode:"cli_commands" and mode:"cli_command" to inspect package CLI mirrors and their preferred in-process model routes. CLI modes are discovery-only.',
|
|
882252
|
-
panels: 'Use mode:"panels" and mode:"panel" to inspect built-in panel catalog/open state; use mode:"open_panel" with confirm:true plus explicitUserRequest to route a visible panel/workspace change.',
|
|
882253
|
-
uiSurfaces: 'Use mode:"ui_surfaces" and mode:"ui_surface" to inspect modal/overlay/picker/workspace surfaces; use mode:"open_ui_surface" with confirm:true plus explicitUserRequest to route visible UI navigation.',
|
|
882254
|
-
shortcuts: 'Use mode:"shortcuts" to inspect fixed shortcuts plus configurable keybindings. Use mode:"set_keybinding" and mode:"reset_keybinding" with confirm:true plus explicitUserRequest to edit the same config file the user edits.',
|
|
882469
|
+
cliCommands: 'Use mode:"cli_commands" to list and mode:"cli_command" with cliCommand, command, commandName, target, or query to inspect package CLI mirrors and their preferred in-process model routes. CLI modes are discovery-only.',
|
|
882470
|
+
panels: 'Use mode:"panels" to list and mode:"panel" with panelId, target, or query to inspect built-in panel catalog/open state; use mode:"open_panel" with confirm:true plus explicitUserRequest to route a visible panel/workspace change.',
|
|
882471
|
+
uiSurfaces: 'Use mode:"ui_surfaces" to list and mode:"ui_surface" with surfaceId, target, or query to inspect modal/overlay/picker/workspace surfaces; use mode:"open_ui_surface" with confirm:true plus explicitUserRequest to route visible UI navigation.',
|
|
882472
|
+
shortcuts: 'Use mode:"shortcuts" to inspect fixed shortcuts plus configurable keybindings. Use mode:"keybinding" with actionId, target, key, or query; use mode:"set_keybinding" and mode:"reset_keybinding" with confirm:true plus explicitUserRequest to edit the same config file the user edits.',
|
|
882255
882473
|
slashCommands: 'Use mode:"commands" to list slash commands and mode:"command" with command, commandName, target, or query to inspect one command; use mode:"run_command" with confirm:true plus explicitUserRequest to execute.',
|
|
882256
882474
|
workspace: 'Use mode:"workspace_actions" to list and mode:"workspace_action" with actionId, command, target, or query for one action and editor schema; set includeParameters:true on workspace_actions to inline editor schemas.',
|
|
882257
882475
|
settings: 'Use mode:"settings" to list and mode:"get_setting" with key, target, or query for one setting. Use mode:"set_setting" or mode:"reset_setting" with key, target, or query plus confirm:true and explicitUserRequest.',
|
|
@@ -882287,7 +882505,7 @@ function createAgentHarnessTool(deps) {
|
|
|
882287
882505
|
}
|
|
882288
882506
|
if (args2.mode === "panel") {
|
|
882289
882507
|
const panel = describeHarnessPanel(deps.commandContext, args2);
|
|
882290
|
-
return panel ? output7(panel) : error52(`Unknown panel ${readString58(args2.panelId || args2.query) || "<missing>"}.`);
|
|
882508
|
+
return panel ? output7(panel) : error52(`Unknown panel ${readString58(args2.panelId || args2.target || args2.query) || "<missing>"}.`);
|
|
882291
882509
|
}
|
|
882292
882510
|
if (args2.mode === "open_panel") {
|
|
882293
882511
|
const confirmationError2 = requireConfirmedAction(args2, "Panel routing");
|
|
@@ -882301,7 +882519,7 @@ function createAgentHarnessTool(deps) {
|
|
|
882301
882519
|
}
|
|
882302
882520
|
if (args2.mode === "ui_surface") {
|
|
882303
882521
|
const surface = describeHarnessUiSurface(deps.commandContext, args2);
|
|
882304
|
-
return surface ? output7(surface) : error52(`Unknown UI surface ${readString58(args2.surfaceId || args2.query) || "<missing>"}.`);
|
|
882522
|
+
return surface ? output7(surface) : error52(`Unknown UI surface ${readString58(args2.surfaceId || args2.query || args2.target) || "<missing>"}.`);
|
|
882305
882523
|
}
|
|
882306
882524
|
if (args2.mode === "open_ui_surface") {
|
|
882307
882525
|
const confirmationError2 = requireConfirmedAction(args2, "UI surface routing");
|
|
@@ -882315,7 +882533,7 @@ function createAgentHarnessTool(deps) {
|
|
|
882315
882533
|
return output7(listHarnessKeybindings(deps.commandContext, args2));
|
|
882316
882534
|
if (args2.mode === "keybinding") {
|
|
882317
882535
|
const binding = describeHarnessKeybinding(deps.commandContext, args2);
|
|
882318
|
-
return binding ? output7(binding) : error52(`Unknown keybinding action ${readString58(args2.actionId || args2.key || args2.query) || "<missing>"}.`);
|
|
882536
|
+
return binding ? output7(binding) : error52(`Unknown keybinding action ${readString58(args2.actionId || args2.target || args2.key || args2.query) || "<missing>"}.`);
|
|
882319
882537
|
}
|
|
882320
882538
|
if (args2.mode === "set_keybinding") {
|
|
882321
882539
|
const confirmationError2 = requireConfirmedAction(args2, "Keybinding mutation");
|