@pellux/goodvibes-agent 1.0.21 → 1.0.23
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 +1 -1
- package/dist/package/main.js +163 -66
- package/docs/getting-started.md +1 -1
- package/docs/tools-and-commands.md +1 -1
- package/package.json +1 -1
- package/src/tools/agent-harness-command-catalog.ts +37 -6
- package/src/tools/agent-harness-metadata.ts +48 -24
- package/src/tools/agent-harness-model-tool-catalog.ts +72 -26
- package/src/tools/agent-harness-tool-schema.ts +4 -4
- package/src/tools/agent-harness-tool.ts +8 -8
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Product-facing release notes for GoodVibes Agent.
|
|
4
4
|
|
|
5
|
+
## 1.0.23 - 2026-06-03
|
|
6
|
+
|
|
7
|
+
- Return ambiguous agent_harness slash-command detail lookups with candidate commands instead of collapsing broad descriptive matches to unknown.
|
|
8
|
+
- Keep exact slash command, alias, typed command, target, and unique descriptive lookup behavior unchanged.
|
|
9
|
+
- Refresh package-facing docs and focused harness coverage for no-guess slash-command lookup parity.
|
|
10
|
+
|
|
11
|
+
## 1.0.22 - 2026-06-03
|
|
12
|
+
|
|
13
|
+
- Refuse ambiguous agent_harness model-tool schema lookup with candidate tools instead of selecting the first partial match.
|
|
14
|
+
- Refuse ambiguous connected-host capability lookup with candidate capabilities while preserving exact and unique lookup behavior.
|
|
15
|
+
- Refresh model-visible harness parameter descriptions, preferred route hints, package docs, and focused harness coverage for no-guess single-item lookup parity.
|
|
16
|
+
|
|
5
17
|
## 1.0.21 - 2026-06-03
|
|
6
18
|
|
|
7
19
|
- Resolve agent_harness run_workspace_action by actionId, command, target, or query using the same lookup contract as workspace_action inspection.
|
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ Use the workspace as the primary product surface:
|
|
|
66
66
|
|
|
67
67
|
Inside the Agent workspace, press `/` to search every workspace action by name, category, command, or detail. This is the primary discovery path for product actions; slash commands and CLI subcommands remain power-user/scriptable mirrors.
|
|
68
68
|
|
|
69
|
-
The model has the same harness map through `agent_harness`: it can list Agent workspace actions, inspect or run one workspace action by `actionId`, `command`, `target`, or `query`, list built-in panels and inspect one panel by `panelId`, `target`, or `query`, inspect modal/overlay/picker UI surfaces by `surfaceId`, `target`, or `query`, list top-level CLI mirrors and inspect one mirror by `cliCommand`, `command`, `commandName`, `target`, or `query`, inspect fixed shortcuts and configurable keybindings by `actionId`, `target`, `key`, or `query`, run shell-safe keybinding equivalents with confirmation, list slash commands, inspect one slash command by `command`, `commandName`, `target`, or `query` with parsed arguments and policy metadata, inspect model tool definitions or one model tool schema, inspect or change Agent settings by `key`, `target`, or `query` with confirmation, run concrete slash-command mirrors with confirmation, and report connected-host capability and live readiness posture. CLI mirror modes are read-only catalog and parser inspection; inside the main conversation, the model uses the returned preferred model tool, workspace action, setting mode, or confirmed slash-command mirror instead of launching hidden nested CLI processes. Panel modes expose catalog/open state and route visible panel/workspace changes through the current Agent shell bridge with confirmation. UI surface modes expose help, shortcuts, command browser, conversation search, prompt-history search, slash-command mode, file picker, block actions, context, runtime activity, live process output, bookmarks, model/provider/reasoning-effort pickers, TTS provider/voice pickers, session/profile pickers, the panel-picker compatibility route, security/knowledge/subscription operator surfaces, settings, MCP workspace, onboarding, and Agent workspace entrypoints; `open_ui_surface` is confirmation-gated and only performs visible shell navigation. Shortcut modes expose fixed runtime/editor controls plus the live resolved keybinding table; each keybinding descriptor reports its model operation route, `run_keybinding` executes only supported shell-safe equivalents with confirmation, and prompt-editor-only or terminal-selection shortcuts remain explicit direct user interaction. `set_keybinding` and `reset_keybinding` write the same `keybindings.json` file the user edits and require confirmation. Workspace action discovery can inline editor field schemas with `includeParameters:true`; single-action lookup and execution use the same user-facing search fields, return or preserve lookup metadata where the action result carries descriptors, and refuse ambiguous run requests with candidates; CLI mirror, panel, UI surface, keybinding,
|
|
69
|
+
The model has the same harness map through `agent_harness`: it can list Agent workspace actions, inspect or run one workspace action by `actionId`, `command`, `target`, or `query`, list built-in panels and inspect one panel by `panelId`, `target`, or `query`, inspect modal/overlay/picker UI surfaces by `surfaceId`, `target`, or `query`, list top-level CLI mirrors and inspect one mirror by `cliCommand`, `command`, `commandName`, `target`, or `query`, inspect fixed shortcuts and configurable keybindings by `actionId`, `target`, `key`, or `query`, run shell-safe keybinding equivalents with confirmation, list slash commands, inspect one slash command by `command`, `commandName`, `target`, or `query` with parsed arguments and policy metadata, inspect model tool definitions or one model tool schema, inspect or change Agent settings by `key`, `target`, or `query` with confirmation, run concrete slash-command mirrors with confirmation, and report connected-host capability and live readiness posture. CLI mirror modes are read-only catalog and parser inspection; inside the main conversation, the model uses the returned preferred model tool, workspace action, setting mode, or confirmed slash-command mirror instead of launching hidden nested CLI processes. Panel modes expose catalog/open state and route visible panel/workspace changes through the current Agent shell bridge with confirmation. UI surface modes expose help, shortcuts, command browser, conversation search, prompt-history search, slash-command mode, file picker, block actions, context, runtime activity, live process output, bookmarks, model/provider/reasoning-effort pickers, TTS provider/voice pickers, session/profile pickers, the panel-picker compatibility route, security/knowledge/subscription operator surfaces, settings, MCP workspace, onboarding, and Agent workspace entrypoints; `open_ui_surface` is confirmation-gated and only performs visible shell navigation. Shortcut modes expose fixed runtime/editor controls plus the live resolved keybinding table; each keybinding descriptor reports its model operation route, `run_keybinding` executes only supported shell-safe equivalents with confirmation, and prompt-editor-only or terminal-selection shortcuts remain explicit direct user interaction. `set_keybinding` and `reset_keybinding` write the same `keybindings.json` file the user edits and require confirmation. Workspace action discovery can inline editor field schemas with `includeParameters:true`; single-action lookup and execution use the same user-facing search fields, return or preserve lookup metadata where the action result carries descriptors, and refuse ambiguous run requests with candidates; CLI mirror, panel, UI surface, keybinding, slash-command, model tool, setting, and connected-host capability lookup use their catalog search fields and refuse ambiguous route, schema, capability, or mutation requests with candidates; profile editors use the current starter-template inventory, and routine schedule editors can prefill a selected local routine from `recordId`. Selection-based local workspace actions accept a local `recordId` so the model can use the same note promotion and local registry flows as the TUI. Direct local create editors for memory, notes, personas, skills, and routines can execute from submitted fields through `run_workspace_action` and `agent_local_registry` with confirmation. The `connected_host` report includes route families, allowed capabilities, blocked lifecycle/non-Agent surfaces, and availability for the first-class Agent tools; `connected_host_capability` inspects one allowed or blocked capability by id, target, or query with its route families and boundary. The `connected_host_status` report performs a read-only live check of the connected-host status route and the isolated Agent Knowledge status route, reports SDK compatibility, token posture, endpoint bindings, route readiness, and actionable findings, and still refuses connected-host lifecycle control. The model uses those first-class tools for product workflows where they exist, such as Agent Knowledge, local memory/notes/personas/skills/routines, channel sends, notifications, reminders, media generation, work plans, and connected-host operator actions.
|
|
70
70
|
|
|
71
71
|
The setup workspace surfaces discovered Agent-local persona, skill, and routine markdown files so day-one setup can import useful behavior instead of starting from blank records. It can also create one initial scratchpad note, local persona, skill, and routine directly during first-run setup; those records stay in Agent-local registries and never write to default knowledge or non-Agent segments.
|
|
72
72
|
|
package/dist/package/main.js
CHANGED
|
@@ -816566,7 +816566,7 @@ var createStyledCell = (char, overrides = {}) => ({
|
|
|
816566
816566
|
// src/version.ts
|
|
816567
816567
|
import { readFileSync } from "fs";
|
|
816568
816568
|
import { join } from "path";
|
|
816569
|
-
var _version = "1.0.
|
|
816569
|
+
var _version = "1.0.23";
|
|
816570
816570
|
var _sdkVersion = "0.33.35";
|
|
816571
816571
|
try {
|
|
816572
816572
|
const pkg = JSON.parse(readFileSync(join(import.meta.dir, "..", "package.json"), "utf-8"));
|
|
@@ -847775,13 +847775,13 @@ init_state3();
|
|
|
847775
847775
|
|
|
847776
847776
|
// src/input/commands/recall-shared.ts
|
|
847777
847777
|
var VALID_CLASSES = ["decision", "constraint", "incident", "pattern", "fact", "risk", "runbook", "architecture", "ownership"];
|
|
847778
|
-
var
|
|
847778
|
+
var VALID_SCOPES2 = ["session", "project", "team"];
|
|
847779
847779
|
var VALID_REVIEW_STATES = ["fresh", "reviewed", "stale", "contradicted"];
|
|
847780
847780
|
function isValidClass(s4) {
|
|
847781
847781
|
return VALID_CLASSES.includes(s4);
|
|
847782
847782
|
}
|
|
847783
847783
|
function isValidScope(s4) {
|
|
847784
|
-
return
|
|
847784
|
+
return VALID_SCOPES2.includes(s4);
|
|
847785
847785
|
}
|
|
847786
847786
|
function isValidReviewState(s4) {
|
|
847787
847787
|
return VALID_REVIEW_STATES.includes(s4);
|
|
@@ -847824,7 +847824,7 @@ function handleRecallSearch(args2, context) {
|
|
|
847824
847824
|
if (isValidScope(scope))
|
|
847825
847825
|
filter.scope = scope;
|
|
847826
847826
|
else {
|
|
847827
|
-
context.print(`[memory] Unknown scope "${scope}". Valid values ${
|
|
847827
|
+
context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES2.join(", ")}.`);
|
|
847828
847828
|
return;
|
|
847829
847829
|
}
|
|
847830
847830
|
}
|
|
@@ -847999,7 +847999,7 @@ function handleRecallList(args2, context) {
|
|
|
847999
847999
|
if (scopeIdx !== -1 && args2[scopeIdx + 1]) {
|
|
848000
848000
|
const scope = args2[scopeIdx + 1];
|
|
848001
848001
|
if (!isValidScope(scope)) {
|
|
848002
|
-
context.print(`[memory] Unknown scope "${scope}". Valid values ${
|
|
848002
|
+
context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES2.join(", ")}.`);
|
|
848003
848003
|
return;
|
|
848004
848004
|
}
|
|
848005
848005
|
filter.scope = scope;
|
|
@@ -848049,7 +848049,7 @@ async function handleRecallAdd(args2, context) {
|
|
|
848049
848049
|
const tags = tagsRaw ? tagsRaw.split(",").map((token) => token.trim()).filter(Boolean) : [];
|
|
848050
848050
|
const scope = scopeRaw && isValidScope(scopeRaw) ? scopeRaw : "project";
|
|
848051
848051
|
if (scopeRaw && !isValidScope(scopeRaw)) {
|
|
848052
|
-
context.print(`[memory] Invalid scope "${scopeRaw}". Valid values ${
|
|
848052
|
+
context.print(`[memory] Invalid scope "${scopeRaw}". Valid values ${VALID_SCOPES2.join(", ")}.`);
|
|
848053
848053
|
return;
|
|
848054
848054
|
}
|
|
848055
848055
|
const provenance = [];
|
|
@@ -848183,7 +848183,7 @@ function handleRecallExport(args2, context) {
|
|
|
848183
848183
|
if (scopeIdx !== -1 && commandArgs[scopeIdx + 1]) {
|
|
848184
848184
|
const scope = commandArgs[scopeIdx + 1];
|
|
848185
848185
|
if (!isValidScope(scope)) {
|
|
848186
|
-
context.print(`[memory] Unknown scope "${scope}". Valid values ${
|
|
848186
|
+
context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES2.join(", ")}.`);
|
|
848187
848187
|
return;
|
|
848188
848188
|
}
|
|
848189
848189
|
filter.scope = scope;
|
|
@@ -848262,7 +848262,7 @@ function handleRecallHandoffExport(args2, context) {
|
|
|
848262
848262
|
const scopeIdx = commandArgs.indexOf("--scope");
|
|
848263
848263
|
const scopeRaw = scopeIdx !== -1 ? commandArgs[scopeIdx + 1] : "team";
|
|
848264
848264
|
if (!scopeRaw || !isValidScope(scopeRaw)) {
|
|
848265
|
-
context.print(`[memory] Unknown scope "${scopeRaw ?? ""}". Valid values ${
|
|
848265
|
+
context.print(`[memory] Unknown scope "${scopeRaw ?? ""}". Valid values ${VALID_SCOPES2.join(", ")}.`);
|
|
848266
848266
|
return;
|
|
848267
848267
|
}
|
|
848268
848268
|
const bundle = memory.exportBundle({ scope: scopeRaw });
|
|
@@ -848378,7 +848378,7 @@ function handleRecallPromote(args2, context) {
|
|
|
848378
848378
|
const id = parsed.rest[0];
|
|
848379
848379
|
const scope = parsed.rest[1];
|
|
848380
848380
|
if (!id || !scope || !isValidScope(scope)) {
|
|
848381
|
-
context.print(`[memory] Usage: /memory promote <id> <${
|
|
848381
|
+
context.print(`[memory] Usage: /memory promote <id> <${VALID_SCOPES2.join("|")}> --yes`);
|
|
848382
848382
|
return;
|
|
848383
848383
|
}
|
|
848384
848384
|
if (!parsed.yes) {
|
|
@@ -862311,7 +862311,7 @@ import { mkdirSync as mkdirSync64, readFileSync as readFileSync86, writeFileSync
|
|
|
862311
862311
|
import { dirname as dirname63, resolve as resolve39 } from "path";
|
|
862312
862312
|
init_state3();
|
|
862313
862313
|
var VALID_CLASSES2 = ["decision", "constraint", "incident", "pattern", "fact", "risk", "runbook", "architecture", "ownership"];
|
|
862314
|
-
var
|
|
862314
|
+
var VALID_SCOPES4 = ["session", "project", "team"];
|
|
862315
862315
|
var VALID_REVIEW_STATES3 = ["fresh", "reviewed", "stale", "contradicted"];
|
|
862316
862316
|
var VALID_PROVENANCE_KINDS = ["session", "turn", "task", "event", "file"];
|
|
862317
862317
|
var VALUE_OPTIONS = new Set([
|
|
@@ -862411,7 +862411,7 @@ function isMemoryClass2(value) {
|
|
|
862411
862411
|
return VALID_CLASSES2.includes(value);
|
|
862412
862412
|
}
|
|
862413
862413
|
function isMemoryScope2(value) {
|
|
862414
|
-
return
|
|
862414
|
+
return VALID_SCOPES4.includes(value);
|
|
862415
862415
|
}
|
|
862416
862416
|
function isReviewState(value) {
|
|
862417
862417
|
return VALID_REVIEW_STATES3.includes(value);
|
|
@@ -862426,7 +862426,7 @@ function requireClass(value) {
|
|
|
862426
862426
|
}
|
|
862427
862427
|
function requireScope(value) {
|
|
862428
862428
|
if (!value || !isMemoryScope2(value))
|
|
862429
|
-
throw new Error(`Invalid memory scope "${value ?? ""}". Valid values ${
|
|
862429
|
+
throw new Error(`Invalid memory scope "${value ?? ""}". Valid values ${VALID_SCOPES4.join(", ")}`);
|
|
862430
862430
|
return value;
|
|
862431
862431
|
}
|
|
862432
862432
|
function optionalScope(value) {
|
|
@@ -879461,7 +879461,7 @@ function describeCommandPolicy(commandName) {
|
|
|
879461
879461
|
return {
|
|
879462
879462
|
effect: "ui-navigation",
|
|
879463
879463
|
confirmation,
|
|
879464
|
-
preferredModelTool: "agent_harness workspace/workspace_actions/workspace_action",
|
|
879464
|
+
preferredModelTool: "agent_harness workspace/workspace_actions/workspace_action/run_workspace_action",
|
|
879465
879465
|
boundary: "Navigation and discovery commands should be inspected through agent_harness when possible."
|
|
879466
879466
|
};
|
|
879467
879467
|
}
|
|
@@ -879512,7 +879512,7 @@ function describeCliCommandPolicy(commandName) {
|
|
|
879512
879512
|
return {
|
|
879513
879513
|
effect: root === "tui" || root === "onboarding" ? "ui-navigation" : "read-only",
|
|
879514
879514
|
confirmation,
|
|
879515
|
-
preferredModelTool: root === "onboarding" || root === "tui" ? "agent_harness workspace/workspace_actions" : "agent_harness cli_commands/cli_command",
|
|
879515
|
+
preferredModelTool: root === "onboarding" || root === "tui" ? "agent_harness workspace/workspace_actions/workspace_action/run_workspace_action" : "agent_harness cli_commands/cli_command",
|
|
879516
879516
|
boundary: "Top-level CLI launch, setup, help, version, and completion commands are package entrypoint surfaces; use in-process workspace and slash-command bridges from the model when operating inside the TUI."
|
|
879517
879517
|
};
|
|
879518
879518
|
}
|
|
@@ -879535,7 +879535,7 @@ function describeCliCommandPolicy(commandName) {
|
|
|
879535
879535
|
return {
|
|
879536
879536
|
effect: "local-state",
|
|
879537
879537
|
confirmation,
|
|
879538
|
-
preferredModelTool: root === "profiles" ? "agent_harness workspace_actions/run_workspace_action" : "agent_local_registry",
|
|
879538
|
+
preferredModelTool: root === "profiles" ? "agent_harness workspace_actions/workspace_action/run_workspace_action" : "agent_local_registry",
|
|
879539
879539
|
boundary: "Local library/profile/session/bundle CLI commands operate on Agent-local data. Mutations require explicit user intent and should use first-class Agent-local tools where available."
|
|
879540
879540
|
};
|
|
879541
879541
|
}
|
|
@@ -879715,31 +879715,52 @@ function relatedConnectedHostRouteFamilies(capability) {
|
|
|
879715
879715
|
return capabilityId.length > 0 && recordTextMatches(family, capabilityId);
|
|
879716
879716
|
});
|
|
879717
879717
|
}
|
|
879718
|
-
function
|
|
879719
|
-
|
|
879720
|
-
|
|
879721
|
-
|
|
879722
|
-
|
|
879723
|
-
|
|
879718
|
+
function describeConnectedHostCapabilityCandidates(entries) {
|
|
879719
|
+
return entries.slice(0, 8).map((entry) => ({
|
|
879720
|
+
status: entry.status,
|
|
879721
|
+
capabilityId: typeof entry.capability.id === "string" ? entry.capability.id : "",
|
|
879722
|
+
purpose: typeof entry.capability.purpose === "string" ? entry.capability.purpose : undefined,
|
|
879723
|
+
reason: typeof entry.capability.reason === "string" ? entry.capability.reason : undefined
|
|
879724
|
+
}));
|
|
879725
|
+
}
|
|
879726
|
+
function connectedHostCapabilityDetail(entry) {
|
|
879727
|
+
if (entry.status === "allowed") {
|
|
879724
879728
|
return {
|
|
879725
879729
|
status: "allowed",
|
|
879726
|
-
capability:
|
|
879727
|
-
relatedRouteFamilies: relatedConnectedHostRouteFamilies(
|
|
879730
|
+
capability: entry.capability,
|
|
879731
|
+
relatedRouteFamilies: relatedConnectedHostRouteFamilies(entry.capability),
|
|
879728
879732
|
statusMode: 'Use agent_harness mode:"connected_host_status" for live read-only reachability, SDK compatibility, token posture, and Agent Knowledge route readiness.',
|
|
879729
879733
|
boundary: "Use only the listed first-class model tools, slash-command families, and workspace categories. Mutations still require explicit confirmation through those tools or command bridges."
|
|
879730
879734
|
};
|
|
879731
879735
|
}
|
|
879732
|
-
|
|
879733
|
-
|
|
879734
|
-
|
|
879735
|
-
|
|
879736
|
-
|
|
879737
|
-
|
|
879738
|
-
|
|
879739
|
-
|
|
879740
|
-
|
|
879741
|
-
|
|
879742
|
-
|
|
879736
|
+
return {
|
|
879737
|
+
status: "blocked",
|
|
879738
|
+
capability: entry.capability,
|
|
879739
|
+
allowed: false,
|
|
879740
|
+
available: false,
|
|
879741
|
+
boundary: "This connected-host surface is intentionally not exposed to the model as an Agent operation.",
|
|
879742
|
+
statusMode: 'Use agent_harness mode:"connected_host_status" only for read-only readiness diagnostics.'
|
|
879743
|
+
};
|
|
879744
|
+
}
|
|
879745
|
+
function describeConnectedHostCapability(toolRegistry, rawQuery) {
|
|
879746
|
+
const query2 = normalizeCapabilityQuery(rawQuery);
|
|
879747
|
+
if (!query2)
|
|
879748
|
+
return null;
|
|
879749
|
+
const entries = [
|
|
879750
|
+
...connectedHostCapabilityMap(toolRegistry).map((capability) => ({ status: "allowed", capability })),
|
|
879751
|
+
...blockedConnectedHostCapabilities().map((capability) => ({ status: "blocked", capability }))
|
|
879752
|
+
];
|
|
879753
|
+
const exact = entries.find((entry) => entry.capability.id === rawQuery);
|
|
879754
|
+
if (exact)
|
|
879755
|
+
return { status: "found", detail: connectedHostCapabilityDetail(exact) };
|
|
879756
|
+
const insensitive = entries.find((entry) => typeof entry.capability.id === "string" && entry.capability.id.toLowerCase() === query2);
|
|
879757
|
+
if (insensitive)
|
|
879758
|
+
return { status: "found", detail: connectedHostCapabilityDetail(insensitive) };
|
|
879759
|
+
const searched = entries.filter((entry) => recordTextMatches(entry.capability, query2));
|
|
879760
|
+
if (searched.length === 1)
|
|
879761
|
+
return { status: "found", detail: connectedHostCapabilityDetail(searched[0]) };
|
|
879762
|
+
if (searched.length > 1)
|
|
879763
|
+
return { status: "ambiguous", input: rawQuery, candidates: describeConnectedHostCapabilityCandidates(searched) };
|
|
879743
879764
|
return null;
|
|
879744
879765
|
}
|
|
879745
879766
|
function connectedHostSummary(context, toolRegistry) {
|
|
@@ -880019,6 +880040,15 @@ function describeCommand(command8, lookup) {
|
|
|
880019
880040
|
policy: describeCommandPolicy(command8.name)
|
|
880020
880041
|
};
|
|
880021
880042
|
}
|
|
880043
|
+
function describeCommandCandidate(command8) {
|
|
880044
|
+
return {
|
|
880045
|
+
name: command8.name,
|
|
880046
|
+
slash: `/${command8.name}`,
|
|
880047
|
+
aliases: command8.aliases ?? [],
|
|
880048
|
+
description: command8.description,
|
|
880049
|
+
usage: command8.usage ?? ""
|
|
880050
|
+
};
|
|
880051
|
+
}
|
|
880022
880052
|
function commandDetailLookupFromArgs(args2) {
|
|
880023
880053
|
const rawCommand = readString51(args2.command);
|
|
880024
880054
|
if (rawCommand) {
|
|
@@ -880055,6 +880085,7 @@ function resolveCommandDetail(commandRegistry, args2) {
|
|
|
880055
880085
|
const direct = commandRegistry.get(lookup.parsedName);
|
|
880056
880086
|
if (direct) {
|
|
880057
880087
|
return {
|
|
880088
|
+
status: "found",
|
|
880058
880089
|
command: direct,
|
|
880059
880090
|
lookup: {
|
|
880060
880091
|
...lookup,
|
|
@@ -880065,19 +880096,33 @@ function resolveCommandDetail(commandRegistry, args2) {
|
|
|
880065
880096
|
const normalized = lookup.parsedName.toLowerCase();
|
|
880066
880097
|
for (const command8 of commandRegistry.list()) {
|
|
880067
880098
|
if (command8.name.toLowerCase() === normalized) {
|
|
880068
|
-
return { command: command8, lookup: { ...lookup, resolvedBy: "case-insensitive-name" } };
|
|
880099
|
+
return { status: "found", command: command8, lookup: { ...lookup, resolvedBy: "case-insensitive-name" } };
|
|
880069
880100
|
}
|
|
880070
880101
|
if ((command8.aliases ?? []).some((alias) => alias.toLowerCase() === normalized)) {
|
|
880071
|
-
return { command: command8, lookup: { ...lookup, resolvedBy: "case-insensitive-alias" } };
|
|
880102
|
+
return { status: "found", command: command8, lookup: { ...lookup, resolvedBy: "case-insensitive-alias" } };
|
|
880072
880103
|
}
|
|
880073
880104
|
}
|
|
880074
880105
|
const descriptionMatches = commandRegistry.list().filter((command8) => commandMatches(command8, lookup.input));
|
|
880075
880106
|
if (descriptionMatches.length === 1) {
|
|
880076
|
-
return { command: descriptionMatches[0], lookup: { ...lookup, resolvedBy: "description" } };
|
|
880107
|
+
return { status: "found", command: descriptionMatches[0], lookup: { ...lookup, resolvedBy: "description" } };
|
|
880108
|
+
}
|
|
880109
|
+
if (descriptionMatches.length > 1) {
|
|
880110
|
+
return {
|
|
880111
|
+
status: "ambiguous",
|
|
880112
|
+
input: lookup.input,
|
|
880113
|
+
candidates: descriptionMatches.map(describeCommandCandidate).slice(0, 8)
|
|
880114
|
+
};
|
|
880077
880115
|
}
|
|
880078
880116
|
const prefixMatches = commandRegistry.fuzzyMatch(lookup.parsedName).filter((entry) => entry.score >= 80);
|
|
880079
880117
|
if (prefixMatches.length === 1) {
|
|
880080
|
-
return { command: prefixMatches[0].command, lookup: { ...lookup, resolvedBy: "prefix" } };
|
|
880118
|
+
return { status: "found", command: prefixMatches[0].command, lookup: { ...lookup, resolvedBy: "prefix" } };
|
|
880119
|
+
}
|
|
880120
|
+
if (prefixMatches.length > 1) {
|
|
880121
|
+
return {
|
|
880122
|
+
status: "ambiguous",
|
|
880123
|
+
input: lookup.input,
|
|
880124
|
+
candidates: prefixMatches.map((entry) => describeCommandCandidate(entry.command)).slice(0, 8)
|
|
880125
|
+
};
|
|
880081
880126
|
}
|
|
880082
880127
|
return null;
|
|
880083
880128
|
}
|
|
@@ -880088,7 +880133,11 @@ function listHarnessCommands(commandRegistry, args2) {
|
|
|
880088
880133
|
}
|
|
880089
880134
|
function describeHarnessCommand(commandRegistry, args2) {
|
|
880090
880135
|
const detail = resolveCommandDetail(commandRegistry, args2);
|
|
880091
|
-
|
|
880136
|
+
if (detail?.status === "found")
|
|
880137
|
+
return describeCommand(detail.command, detail.lookup);
|
|
880138
|
+
if (detail?.status === "ambiguous")
|
|
880139
|
+
return { status: "ambiguous", input: detail.input, candidates: detail.candidates };
|
|
880140
|
+
return null;
|
|
880092
880141
|
}
|
|
880093
880142
|
|
|
880094
880143
|
// src/tools/agent-harness-keybinding-metadata.ts
|
|
@@ -881327,37 +881376,77 @@ function readLimit9(value, fallback) {
|
|
|
881327
881376
|
return fallback;
|
|
881328
881377
|
return Math.max(1, Math.min(500, Math.trunc(parsed)));
|
|
881329
881378
|
}
|
|
881330
|
-
function
|
|
881331
|
-
|
|
881332
|
-
|
|
881333
|
-
|
|
881334
|
-
|
|
881335
|
-
|
|
881379
|
+
function modelToolSearchText(tool2) {
|
|
881380
|
+
return [
|
|
881381
|
+
tool2.name,
|
|
881382
|
+
tool2.description,
|
|
881383
|
+
...tool2.sideEffects ?? []
|
|
881384
|
+
].join(`
|
|
881385
|
+
`).toLowerCase();
|
|
881386
|
+
}
|
|
881387
|
+
function modelToolLookupFromArgs(args2) {
|
|
881388
|
+
const toolName = readString56(args2.toolName);
|
|
881389
|
+
if (toolName)
|
|
881390
|
+
return { source: "toolName", input: toolName };
|
|
881391
|
+
const target = readString56(args2.target);
|
|
881392
|
+
if (target)
|
|
881393
|
+
return { source: "target", input: target };
|
|
881394
|
+
const query2 = readString56(args2.query);
|
|
881395
|
+
return query2 ? { source: "query", input: query2 } : null;
|
|
881396
|
+
}
|
|
881397
|
+
function describeModelTool(tool2, options = {}) {
|
|
881398
|
+
return {
|
|
881336
881399
|
name: tool2.name,
|
|
881337
881400
|
description: tool2.description,
|
|
881338
881401
|
sideEffects: tool2.sideEffects ?? [],
|
|
881339
881402
|
concurrency: tool2.concurrency ?? "parallel",
|
|
881340
881403
|
supportsProgress: tool2.supportsProgress ?? false,
|
|
881341
881404
|
supportsStreamingOutput: tool2.supportsStreamingOutput ?? false,
|
|
881342
|
-
...
|
|
881405
|
+
...options.lookup ? { lookup: options.lookup } : {},
|
|
881406
|
+
...options.includeParameters ? { parameters: tool2.parameters } : {}
|
|
881407
|
+
};
|
|
881408
|
+
}
|
|
881409
|
+
function describeModelToolCandidates(tools3) {
|
|
881410
|
+
return tools3.slice(0, 8).map((tool2) => ({
|
|
881411
|
+
toolName: tool2.name,
|
|
881412
|
+
description: tool2.description,
|
|
881413
|
+
sideEffects: tool2.sideEffects ?? []
|
|
881343
881414
|
}));
|
|
881344
881415
|
}
|
|
881416
|
+
function listHarnessModelTools(toolRegistry, args2) {
|
|
881417
|
+
const query2 = readString56(args2.query).toLowerCase();
|
|
881418
|
+
const includeParameters = args2.includeParameters === true;
|
|
881419
|
+
const limit3 = readLimit9(args2.limit, 200);
|
|
881420
|
+
return toolRegistry.getToolDefinitions().filter((tool2) => !query2 || modelToolSearchText(tool2).includes(query2)).sort((a4, b3) => a4.name.localeCompare(b3.name)).slice(0, limit3).map((tool2) => describeModelTool(tool2, { includeParameters }));
|
|
881421
|
+
}
|
|
881345
881422
|
function describeHarnessModelTool(toolRegistry, args2) {
|
|
881346
|
-
const
|
|
881347
|
-
if (!
|
|
881423
|
+
const lookup = modelToolLookupFromArgs(args2);
|
|
881424
|
+
if (!lookup)
|
|
881348
881425
|
return null;
|
|
881349
|
-
const
|
|
881350
|
-
|
|
881426
|
+
const tools3 = toolRegistry.getToolDefinitions().sort((a4, b3) => a4.name.localeCompare(b3.name));
|
|
881427
|
+
const normalized = lookup.input.toLowerCase();
|
|
881428
|
+
const exact = tools3.find((tool2) => tool2.name === lookup.input);
|
|
881429
|
+
const found = exact ? { tool: exact, resolvedBy: "name" } : (() => {
|
|
881430
|
+
const insensitive = tools3.find((tool2) => tool2.name.toLowerCase() === normalized);
|
|
881431
|
+
if (insensitive)
|
|
881432
|
+
return { tool: insensitive, resolvedBy: "case-insensitive-name" };
|
|
881433
|
+
const searched = tools3.filter((tool2) => modelToolSearchText(tool2).includes(normalized));
|
|
881434
|
+
if (searched.length === 1)
|
|
881435
|
+
return { tool: searched[0], resolvedBy: "search" };
|
|
881436
|
+
if (searched.length > 1)
|
|
881437
|
+
return { candidates: searched };
|
|
881351
881438
|
return null;
|
|
881439
|
+
})();
|
|
881440
|
+
if (!found)
|
|
881441
|
+
return null;
|
|
881442
|
+
if ("candidates" in found)
|
|
881443
|
+
return { status: "ambiguous", input: lookup.input, candidates: describeModelToolCandidates(found.candidates) };
|
|
881352
881444
|
return {
|
|
881353
|
-
|
|
881354
|
-
|
|
881355
|
-
|
|
881356
|
-
|
|
881357
|
-
|
|
881358
|
-
supportsStreamingOutput: tool2.supportsStreamingOutput ?? false,
|
|
881359
|
-
parameters: tool2.parameters,
|
|
881360
|
-
policy: "This is a first-class model tool definition. Use the returned JSON schema directly; mutating or external side-effect tools still require the explicit confirmation arguments defined by that tool."
|
|
881445
|
+
status: "found",
|
|
881446
|
+
tool: {
|
|
881447
|
+
...describeModelTool(found.tool, { includeParameters: true, lookup: { ...lookup, resolvedBy: found.resolvedBy } }),
|
|
881448
|
+
policy: "This is a first-class model tool definition. Use the returned JSON schema directly; mutating or external side-effect tools still require the explicit confirmation arguments defined by that tool."
|
|
881449
|
+
}
|
|
881361
881450
|
};
|
|
881362
881451
|
}
|
|
881363
881452
|
|
|
@@ -881410,7 +881499,7 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
|
|
|
881410
881499
|
},
|
|
881411
881500
|
query: {
|
|
881412
881501
|
type: "string",
|
|
881413
|
-
description: "Search text for command, CLI mirror, panel, UI surface, keybinding, workspace action, setting, or
|
|
881502
|
+
description: "Search text for slash-command, CLI mirror, panel, UI surface, keybinding, workspace action, model tool, setting, or connected-host capability catalogs; also lookup text for the matching single-item modes."
|
|
881414
881503
|
},
|
|
881415
881504
|
command: {
|
|
881416
881505
|
type: "string",
|
|
@@ -881477,7 +881566,7 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
|
|
|
881477
881566
|
},
|
|
881478
881567
|
target: {
|
|
881479
881568
|
type: "string",
|
|
881480
|
-
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."
|
|
881569
|
+
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/search text, or connected-host capability id/search text."
|
|
881481
881570
|
},
|
|
881482
881571
|
capabilityId: {
|
|
881483
881572
|
type: "string",
|
|
@@ -881514,11 +881603,11 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
|
|
|
881514
881603
|
},
|
|
881515
881604
|
confirm: {
|
|
881516
881605
|
type: "boolean",
|
|
881517
|
-
description: "Required true for set_setting, reset_setting, run_keybinding, run_command, open_panel, open_ui_surface, and mutating run_workspace_action calls after an explicit user request."
|
|
881606
|
+
description: "Required true for set_setting, reset_setting, run_keybinding, run_command, open_panel, open_ui_surface, and executable or mutating run_workspace_action calls after an explicit user request."
|
|
881518
881607
|
},
|
|
881519
881608
|
explicitUserRequest: {
|
|
881520
881609
|
type: "string",
|
|
881521
|
-
description: "Exact user request or faithful short summary authorizing a setting mutation, keybinding action,
|
|
881610
|
+
description: "Exact user request or faithful short summary authorizing a setting mutation, keybinding change/action, harness UI routing, slash-command invocation, or workspace-action invocation."
|
|
881522
881611
|
}
|
|
881523
881612
|
};
|
|
881524
881613
|
|
|
@@ -882947,15 +883036,23 @@ function createAgentHarnessTool(deps) {
|
|
|
882947
883036
|
}
|
|
882948
883037
|
if (args2.mode === "tool") {
|
|
882949
883038
|
const query2 = readString58(args2.toolName || args2.target || args2.query);
|
|
882950
|
-
const
|
|
882951
|
-
|
|
883039
|
+
const resolved = describeHarnessModelTool(deps.toolRegistry, args2);
|
|
883040
|
+
if (resolved?.status === "found")
|
|
883041
|
+
return output7(resolved.tool);
|
|
883042
|
+
if (resolved?.status === "ambiguous")
|
|
883043
|
+
return error52(`Ambiguous model tool ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
883044
|
+
return error52(`Unknown model tool ${query2 || "<missing>"}. Use mode:"tools" to inspect available model tools.`);
|
|
882952
883045
|
}
|
|
882953
883046
|
if (args2.mode === "connected_host")
|
|
882954
883047
|
return output7(connectedHostSummary(deps.commandContext, deps.toolRegistry));
|
|
882955
883048
|
if (args2.mode === "connected_host_capability") {
|
|
882956
883049
|
const query2 = readString58(args2.capabilityId || args2.target || args2.query);
|
|
882957
|
-
const
|
|
882958
|
-
|
|
883050
|
+
const resolved = describeConnectedHostCapability(deps.toolRegistry, query2);
|
|
883051
|
+
if (resolved?.status === "found")
|
|
883052
|
+
return output7(resolved.detail);
|
|
883053
|
+
if (resolved?.status === "ambiguous")
|
|
883054
|
+
return error52(`Ambiguous connected-host capability ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
883055
|
+
return error52(`Unknown connected-host capability ${query2 || "<missing>"}. Use mode:"connected_host" to inspect allowed and blocked capability ids.`);
|
|
882959
883056
|
}
|
|
882960
883057
|
if (args2.mode === "connected_host_status")
|
|
882961
883058
|
return output7(await connectedHostStatusSummary(deps.commandContext, deps.toolRegistry));
|
package/docs/getting-started.md
CHANGED
|
@@ -44,7 +44,7 @@ After setup has been applied once, the TUI opens directly into the Agent operato
|
|
|
44
44
|
|
|
45
45
|
Press `/` inside the Agent workspace to search every workspace action by name, category, command, or detail. Use that finder before reaching for shell commands; CLI subcommands are scriptable mirrors of these TUI workflows.
|
|
46
46
|
|
|
47
|
-
The model can inspect and use the same harness surface through Agent-owned tools. `agent_harness` exposes workspace action discovery, single workspace-action inspection and execution by action id, command, or lookup text, built-in panel discovery/routing by panel id or lookup text, modal/overlay/picker UI surface discovery/routing by surface id or lookup text, top-level CLI mirror discovery and single-mirror lookup by command string, command token, or lookup text, fixed shortcut and configurable keybinding discovery, keybinding inspection/mutation by action id or lookup text, confirmation-gated shell-safe keybinding execution, slash-command discovery, single slash-command inspection by typed command or lookup text, command policy metadata, command execution with confirmation, model tool discovery and single-tool schema inspection, settings inspection/mutation by key or lookup text, connected-host capability inventory, single connected-host capability inspection, and live connected-host readiness posture. CLI mirror modes are read-only catalog/parser inspection and point the model to the matching in-process tool, workspace action, setting mode, or slash-command mirror. Panel modes expose catalog/open state and route visible panel/workspace changes through the current Agent shell bridge with confirmation. UI surface modes expose help, shortcuts, command browser, conversation search, prompt-history search, slash-command mode, file picker, block actions, context, runtime activity, live process output, bookmarks, model/provider/reasoning-effort pickers, TTS provider/voice pickers, session/profile pickers, the panel-picker compatibility route, security/knowledge/subscription operator surfaces, settings, MCP workspace, onboarding, and Agent workspace entrypoints; `open_ui_surface` is confirmation-gated and only performs visible shell navigation. Shortcut modes expose the fixed runtime/editor shortcuts and the live keybindings table; keybinding descriptors include a model operation route, `run_keybinding` executes supported shell-safe equivalents only with confirmation, prompt-editor-only or terminal-selection shortcuts remain direct user interaction, and confirmed keybinding edits write the same `keybindings.json` file the user edits and reload the runtime manager. Workspace action discovery can include editor field schemas with `includeParameters:true`, including starter-template defaults for profile creation and selected-routine defaults for routine schedule promotion when `recordId` is supplied; single-action lookup and execution use the same user-facing search fields, return lookup metadata where the action result carries descriptors, and refuse ambiguous run requests with candidates. Single-CLI-mirror, single-panel, single-surface, single-keybinding,
|
|
47
|
+
The model can inspect and use the same harness surface through Agent-owned tools. `agent_harness` exposes workspace action discovery, single workspace-action inspection and execution by action id, command, or lookup text, built-in panel discovery/routing by panel id or lookup text, modal/overlay/picker UI surface discovery/routing by surface id or lookup text, top-level CLI mirror discovery and single-mirror lookup by command string, command token, or lookup text, fixed shortcut and configurable keybinding discovery, keybinding inspection/mutation by action id or lookup text, confirmation-gated shell-safe keybinding execution, slash-command discovery, single slash-command inspection by typed command or lookup text, command policy metadata, command execution with confirmation, model tool discovery and single-tool schema inspection, settings inspection/mutation by key or lookup text, connected-host capability inventory, single connected-host capability inspection, and live connected-host readiness posture. CLI mirror modes are read-only catalog/parser inspection and point the model to the matching in-process tool, workspace action, setting mode, or slash-command mirror. Panel modes expose catalog/open state and route visible panel/workspace changes through the current Agent shell bridge with confirmation. UI surface modes expose help, shortcuts, command browser, conversation search, prompt-history search, slash-command mode, file picker, block actions, context, runtime activity, live process output, bookmarks, model/provider/reasoning-effort pickers, TTS provider/voice pickers, session/profile pickers, the panel-picker compatibility route, security/knowledge/subscription operator surfaces, settings, MCP workspace, onboarding, and Agent workspace entrypoints; `open_ui_surface` is confirmation-gated and only performs visible shell navigation. Shortcut modes expose the fixed runtime/editor shortcuts and the live keybindings table; keybinding descriptors include a model operation route, `run_keybinding` executes supported shell-safe equivalents only with confirmation, prompt-editor-only or terminal-selection shortcuts remain direct user interaction, and confirmed keybinding edits write the same `keybindings.json` file the user edits and reload the runtime manager. Workspace action discovery can include editor field schemas with `includeParameters:true`, including starter-template defaults for profile creation and selected-routine defaults for routine schedule promotion when `recordId` is supplied; single-action lookup and execution use the same user-facing search fields, return lookup metadata where the action result carries descriptors, and refuse ambiguous run requests with candidates. Single-CLI-mirror, single-panel, single-surface, single-keybinding, single-slash-command, single-tool, single-setting, and single-connected-host-capability lookup use their catalog search fields, return lookup metadata where the result carries it, and refuse ambiguous route, schema, capability, or mutation requests with candidates. Selection-based local workspace actions accept a local `recordId`, so the model can use the same note promotion and local registry flows as the TUI. Direct local create editors for memory, notes, personas, skills, and routines can execute from submitted fields through `run_workspace_action` and `agent_local_registry` with confirmation. First-class model tools cover the main product workflows directly: Agent Knowledge, Agent Knowledge ingest, Agent-local memory/notes/personas/skills/routines, operator actions, notifications, channel sends, reminders, generated media, and work plans.
|
|
48
48
|
|
|
49
49
|
Use the Artifacts area for concrete files and generated output: attach images to prompts, export conversations or saved sessions, ingest local source files and URL lists into Agent Knowledge, import bookmarks or browser history, inspect source records, and generate media artifacts from confirmed prompts.
|
|
50
50
|
|
|
@@ -50,7 +50,7 @@ The main Agent model has an Agent-owned harness bridge rather than generic SDK s
|
|
|
50
50
|
- `agent_work_plan`: keep the visible Agent-local work plan current from the conversation.
|
|
51
51
|
- `agent_channel_send`, `agent_notify`, `agent_reminder_schedule`, and `agent_media_generate`: perform confirmed external delivery, notification, reminder, or media actions when the user explicitly asks.
|
|
52
52
|
|
|
53
|
-
`agent_harness` discovery modes are read-only. `summary` reports the model access map; `panels` lists the built-in panel catalog, and `panel` resolves one panel by `panelId`, `target`, or `query` with current open/focused state plus its matching Agent workspace route; `ui_surfaces` lists modal, overlay, picker, and workspace entrypoints, and `ui_surface` resolves one by `surfaceId`, `target`, or `query` with shell-opener availability and preferred model routes; `cli_commands` lists top-level package CLI mirror metadata, and `cli_command` resolves one mirror by `cliCommand`, `command`, `commandName`, `target`, or `query`, returning parser output for concrete invocations, blocked command tokens, lookup metadata, and preferred in-process model routes; `shortcuts` returns fixed runtime/editor shortcuts plus configurable keybindings; `keybindings` lists the live resolved keybinding table, and `keybinding`, `run_keybinding`, `set_keybinding`, and `reset_keybinding` resolve one action by `actionId`, `target`, `key`, or `query` with default bindings, custom state, config path, lookup metadata, and model-operation route metadata; `commands` lists slash-command descriptions; `command` returns one slash-command detail by `command`, `commandName`, `target`, or `query`, including parsed arguments plus effect/confirmation/preferred-tool/boundary policy metadata; `workspace_actions` lists Agent workspace actions and can inline editor field schemas with `includeParameters:true`; `workspace_action` and `run_workspace_action` resolve one action by `actionId`, `command`, `target`, or `query`, using the same user-facing action-search fields; inspection returns lookup metadata plus editor schema, and execution refuses ambiguous requests with candidate actions before any effect; `tools` lists model tool definitions and can inline JSON schemas with `includeParameters:true`; `tool` returns one model tool schema by `toolName`, `target`, or `query
|
|
53
|
+
`agent_harness` discovery modes are read-only. `summary` reports the model access map; `panels` lists the built-in panel catalog, and `panel` resolves one panel by `panelId`, `target`, or `query` with current open/focused state plus its matching Agent workspace route; `ui_surfaces` lists modal, overlay, picker, and workspace entrypoints, and `ui_surface` resolves one by `surfaceId`, `target`, or `query` with shell-opener availability and preferred model routes; `cli_commands` lists top-level package CLI mirror metadata, and `cli_command` resolves one mirror by `cliCommand`, `command`, `commandName`, `target`, or `query`, returning parser output for concrete invocations, blocked command tokens, lookup metadata, and preferred in-process model routes; `shortcuts` returns fixed runtime/editor shortcuts plus configurable keybindings; `keybindings` lists the live resolved keybinding table, and `keybinding`, `run_keybinding`, `set_keybinding`, and `reset_keybinding` resolve one action by `actionId`, `target`, `key`, or `query` with default bindings, custom state, config path, lookup metadata, and model-operation route metadata; `commands` lists slash-command descriptions; `command` returns one slash-command detail by `command`, `commandName`, `target`, or `query`, including parsed arguments plus effect/confirmation/preferred-tool/boundary policy metadata, and refuses ambiguous command lookup with candidate commands; `workspace_actions` lists Agent workspace actions and can inline editor field schemas with `includeParameters:true`; `workspace_action` and `run_workspace_action` resolve one action by `actionId`, `command`, `target`, or `query`, using the same user-facing action-search fields; inspection returns lookup metadata plus editor schema, and execution refuses ambiguous requests with candidate actions before any effect; `tools` lists model tool definitions and can inline JSON schemas with `includeParameters:true`; `tool` returns one model tool schema by `toolName`, `target`, or `query` and refuses ambiguous schema lookup with candidate tools; `settings` returns setting descriptors plus setting policy; `get_setting`, `set_setting`, and `reset_setting` resolve one setting by `key`, `target`, or `query`, return lookup metadata on success, and refuse ambiguous matches with candidate settings; `connected_host` returns the connected-host route families, allowed capabilities, blocked capabilities, and first-class tool availability; `connected_host_capability` returns one allowed or blocked connected-host capability by `capabilityId`, `target`, or `query` with related route families and boundary text and refuses ambiguous capability lookup with candidates; and `connected_host_status` performs a live read-only check of the connected-host status and Agent Knowledge status routes and reports endpoint bindings, token posture, SDK compatibility, route readiness, and findings without printing token values.
|
|
54
54
|
|
|
55
55
|
`open_ui_surface` is a confirmation-gated visible navigation mode for the same shell surfaces the user can open: Agent workspace, settings, MCP workspace, model/provider/reasoning-effort pickers, TTS provider/voice pickers, session/profile pickers, the panel-picker compatibility route, security/knowledge/subscription operator surfaces, conversation search, prompt-history search, slash-command mode, command browser, file picker, block actions, bookmarks, context inspector, runtime activity monitor, live process output, help, shortcuts, and onboarding. It does not perform hidden operations; use first-class model tools, settings modes, workspace actions, or confirmed slash-command mirrors for actual state changes. Ambiguous UI surface lookup text is refused with candidate surfaces instead of routed.
|
|
56
56
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pellux/goodvibes-agent",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "GoodVibes personal operator assistant TUI with a proactive Agent product brain, isolated Agent Knowledge, local profiles, routines, skills, personas, and explicit build delegation.",
|
|
6
6
|
"type": "module",
|
|
@@ -19,6 +19,10 @@ interface CommandDetailLookup {
|
|
|
19
19
|
readonly resolvedBy: 'name' | 'alias' | 'case-insensitive-name' | 'case-insensitive-alias' | 'description' | 'prefix';
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
type CommandDetailResolution =
|
|
23
|
+
| { readonly status: 'found'; readonly command: SlashCommand; readonly lookup: CommandDetailLookup }
|
|
24
|
+
| { readonly status: 'ambiguous'; readonly input: string; readonly candidates: readonly Record<string, unknown>[] };
|
|
25
|
+
|
|
22
26
|
function readString(value: unknown): string {
|
|
23
27
|
return typeof value === 'string' ? value.trim() : '';
|
|
24
28
|
}
|
|
@@ -67,6 +71,16 @@ function describeCommand(command: SlashCommand, lookup?: CommandDetailLookup): R
|
|
|
67
71
|
};
|
|
68
72
|
}
|
|
69
73
|
|
|
74
|
+
function describeCommandCandidate(command: SlashCommand): Record<string, unknown> {
|
|
75
|
+
return {
|
|
76
|
+
name: command.name,
|
|
77
|
+
slash: `/${command.name}`,
|
|
78
|
+
aliases: command.aliases ?? [],
|
|
79
|
+
description: command.description,
|
|
80
|
+
usage: command.usage ?? '',
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
70
84
|
function commandDetailLookupFromArgs(args: AgentHarnessCommandCatalogArgs): Omit<CommandDetailLookup, 'resolvedBy'> | null {
|
|
71
85
|
const rawCommand = readString(args.command);
|
|
72
86
|
if (rawCommand) {
|
|
@@ -97,12 +111,13 @@ function commandDetailLookupFromArgs(args: AgentHarnessCommandCatalogArgs): Omit
|
|
|
97
111
|
return null;
|
|
98
112
|
}
|
|
99
113
|
|
|
100
|
-
function resolveCommandDetail(commandRegistry: CommandRegistry, args: AgentHarnessCommandCatalogArgs):
|
|
114
|
+
function resolveCommandDetail(commandRegistry: CommandRegistry, args: AgentHarnessCommandCatalogArgs): CommandDetailResolution | null {
|
|
101
115
|
const lookup = commandDetailLookupFromArgs(args);
|
|
102
116
|
if (!lookup?.parsedName) return null;
|
|
103
117
|
const direct = commandRegistry.get(lookup.parsedName);
|
|
104
118
|
if (direct) {
|
|
105
119
|
return {
|
|
120
|
+
status: 'found',
|
|
106
121
|
command: direct,
|
|
107
122
|
lookup: {
|
|
108
123
|
...lookup,
|
|
@@ -114,21 +129,35 @@ function resolveCommandDetail(commandRegistry: CommandRegistry, args: AgentHarne
|
|
|
114
129
|
const normalized = lookup.parsedName.toLowerCase();
|
|
115
130
|
for (const command of commandRegistry.list()) {
|
|
116
131
|
if (command.name.toLowerCase() === normalized) {
|
|
117
|
-
return { command, lookup: { ...lookup, resolvedBy: 'case-insensitive-name' } };
|
|
132
|
+
return { status: 'found', command, lookup: { ...lookup, resolvedBy: 'case-insensitive-name' } };
|
|
118
133
|
}
|
|
119
134
|
if ((command.aliases ?? []).some((alias) => alias.toLowerCase() === normalized)) {
|
|
120
|
-
return { command, lookup: { ...lookup, resolvedBy: 'case-insensitive-alias' } };
|
|
135
|
+
return { status: 'found', command, lookup: { ...lookup, resolvedBy: 'case-insensitive-alias' } };
|
|
121
136
|
}
|
|
122
137
|
}
|
|
123
138
|
|
|
124
139
|
const descriptionMatches = commandRegistry.list().filter((command) => commandMatches(command, lookup.input));
|
|
125
140
|
if (descriptionMatches.length === 1) {
|
|
126
|
-
return { command: descriptionMatches[0]!, lookup: { ...lookup, resolvedBy: 'description' } };
|
|
141
|
+
return { status: 'found', command: descriptionMatches[0]!, lookup: { ...lookup, resolvedBy: 'description' } };
|
|
142
|
+
}
|
|
143
|
+
if (descriptionMatches.length > 1) {
|
|
144
|
+
return {
|
|
145
|
+
status: 'ambiguous',
|
|
146
|
+
input: lookup.input,
|
|
147
|
+
candidates: descriptionMatches.map(describeCommandCandidate).slice(0, 8),
|
|
148
|
+
};
|
|
127
149
|
}
|
|
128
150
|
|
|
129
151
|
const prefixMatches = commandRegistry.fuzzyMatch(lookup.parsedName).filter((entry) => entry.score >= 80);
|
|
130
152
|
if (prefixMatches.length === 1) {
|
|
131
|
-
return { command: prefixMatches[0]!.command, lookup: { ...lookup, resolvedBy: 'prefix' } };
|
|
153
|
+
return { status: 'found', command: prefixMatches[0]!.command, lookup: { ...lookup, resolvedBy: 'prefix' } };
|
|
154
|
+
}
|
|
155
|
+
if (prefixMatches.length > 1) {
|
|
156
|
+
return {
|
|
157
|
+
status: 'ambiguous',
|
|
158
|
+
input: lookup.input,
|
|
159
|
+
candidates: prefixMatches.map((entry) => describeCommandCandidate(entry.command)).slice(0, 8),
|
|
160
|
+
};
|
|
132
161
|
}
|
|
133
162
|
return null;
|
|
134
163
|
}
|
|
@@ -145,5 +174,7 @@ export function listHarnessCommands(commandRegistry: CommandRegistry, args: Agen
|
|
|
145
174
|
|
|
146
175
|
export function describeHarnessCommand(commandRegistry: CommandRegistry, args: AgentHarnessCommandCatalogArgs): Record<string, unknown> | null {
|
|
147
176
|
const detail = resolveCommandDetail(commandRegistry, args);
|
|
148
|
-
|
|
177
|
+
if (detail?.status === 'found') return describeCommand(detail.command, detail.lookup);
|
|
178
|
+
if (detail?.status === 'ambiguous') return { status: 'ambiguous', input: detail.input, candidates: detail.candidates };
|
|
179
|
+
return null;
|
|
149
180
|
}
|
|
@@ -9,6 +9,10 @@ export interface CommandExecutionPolicy {
|
|
|
9
9
|
readonly boundary: string;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
export type ConnectedHostCapabilityResolution =
|
|
13
|
+
| { readonly status: 'found'; readonly detail: Record<string, unknown> }
|
|
14
|
+
| { readonly status: 'ambiguous'; readonly input: string; readonly candidates: readonly Record<string, unknown>[] };
|
|
15
|
+
|
|
12
16
|
export function describeCommandPolicy(commandName: string): CommandExecutionPolicy {
|
|
13
17
|
const root = commandName.replace(/^\//, '').trim().toLowerCase();
|
|
14
18
|
const confirmation = 'agent_harness mode:"run_command" requires confirm:true and explicitUserRequest for every slash command invocation.';
|
|
@@ -105,7 +109,7 @@ export function describeCommandPolicy(commandName: string): CommandExecutionPoli
|
|
|
105
109
|
return {
|
|
106
110
|
effect: 'ui-navigation',
|
|
107
111
|
confirmation,
|
|
108
|
-
preferredModelTool: 'agent_harness workspace/workspace_actions/workspace_action',
|
|
112
|
+
preferredModelTool: 'agent_harness workspace/workspace_actions/workspace_action/run_workspace_action',
|
|
109
113
|
boundary: 'Navigation and discovery commands should be inspected through agent_harness when possible.',
|
|
110
114
|
};
|
|
111
115
|
}
|
|
@@ -168,7 +172,7 @@ export function describeCliCommandPolicy(commandName: string): CommandExecutionP
|
|
|
168
172
|
return {
|
|
169
173
|
effect: root === 'tui' || root === 'onboarding' ? 'ui-navigation' : 'read-only',
|
|
170
174
|
confirmation,
|
|
171
|
-
preferredModelTool: root === 'onboarding' || root === 'tui' ? 'agent_harness workspace/workspace_actions' : 'agent_harness cli_commands/cli_command',
|
|
175
|
+
preferredModelTool: root === 'onboarding' || root === 'tui' ? 'agent_harness workspace/workspace_actions/workspace_action/run_workspace_action' : 'agent_harness cli_commands/cli_command',
|
|
172
176
|
boundary: 'Top-level CLI launch, setup, help, version, and completion commands are package entrypoint surfaces; use in-process workspace and slash-command bridges from the model when operating inside the TUI.',
|
|
173
177
|
};
|
|
174
178
|
}
|
|
@@ -191,7 +195,7 @@ export function describeCliCommandPolicy(commandName: string): CommandExecutionP
|
|
|
191
195
|
return {
|
|
192
196
|
effect: 'local-state',
|
|
193
197
|
confirmation,
|
|
194
|
-
preferredModelTool: root === 'profiles' ? 'agent_harness workspace_actions/run_workspace_action' : 'agent_local_registry',
|
|
198
|
+
preferredModelTool: root === 'profiles' ? 'agent_harness workspace_actions/workspace_action/run_workspace_action' : 'agent_local_registry',
|
|
195
199
|
boundary: 'Local library/profile/session/bundle CLI commands operate on Agent-local data. Mutations require explicit user intent and should use first-class Agent-local tools where available.',
|
|
196
200
|
};
|
|
197
201
|
}
|
|
@@ -385,35 +389,55 @@ function relatedConnectedHostRouteFamilies(capability: Record<string, unknown>):
|
|
|
385
389
|
});
|
|
386
390
|
}
|
|
387
391
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
392
|
+
function describeConnectedHostCapabilityCandidates(
|
|
393
|
+
entries: readonly { readonly status: 'allowed' | 'blocked'; readonly capability: Record<string, unknown> }[],
|
|
394
|
+
): readonly Record<string, unknown>[] {
|
|
395
|
+
return entries.slice(0, 8).map((entry) => ({
|
|
396
|
+
status: entry.status,
|
|
397
|
+
capabilityId: typeof entry.capability.id === 'string' ? entry.capability.id : '',
|
|
398
|
+
purpose: typeof entry.capability.purpose === 'string' ? entry.capability.purpose : undefined,
|
|
399
|
+
reason: typeof entry.capability.reason === 'string' ? entry.capability.reason : undefined,
|
|
400
|
+
}));
|
|
401
|
+
}
|
|
394
402
|
|
|
395
|
-
|
|
396
|
-
if (
|
|
403
|
+
function connectedHostCapabilityDetail(entry: { readonly status: 'allowed' | 'blocked'; readonly capability: Record<string, unknown> }): Record<string, unknown> {
|
|
404
|
+
if (entry.status === 'allowed') {
|
|
397
405
|
return {
|
|
398
406
|
status: 'allowed',
|
|
399
|
-
capability:
|
|
400
|
-
relatedRouteFamilies: relatedConnectedHostRouteFamilies(
|
|
407
|
+
capability: entry.capability,
|
|
408
|
+
relatedRouteFamilies: relatedConnectedHostRouteFamilies(entry.capability),
|
|
401
409
|
statusMode: 'Use agent_harness mode:"connected_host_status" for live read-only reachability, SDK compatibility, token posture, and Agent Knowledge route readiness.',
|
|
402
410
|
boundary: 'Use only the listed first-class model tools, slash-command families, and workspace categories. Mutations still require explicit confirmation through those tools or command bridges.',
|
|
403
411
|
};
|
|
404
412
|
}
|
|
413
|
+
return {
|
|
414
|
+
status: 'blocked',
|
|
415
|
+
capability: entry.capability,
|
|
416
|
+
allowed: false,
|
|
417
|
+
available: false,
|
|
418
|
+
boundary: 'This connected-host surface is intentionally not exposed to the model as an Agent operation.',
|
|
419
|
+
statusMode: 'Use agent_harness mode:"connected_host_status" only for read-only readiness diagnostics.',
|
|
420
|
+
};
|
|
421
|
+
}
|
|
405
422
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
}
|
|
416
|
-
|
|
423
|
+
export function describeConnectedHostCapability(
|
|
424
|
+
toolRegistry: ToolRegistry,
|
|
425
|
+
rawQuery: string,
|
|
426
|
+
): ConnectedHostCapabilityResolution | null {
|
|
427
|
+
const query = normalizeCapabilityQuery(rawQuery);
|
|
428
|
+
if (!query) return null;
|
|
429
|
+
|
|
430
|
+
const entries = [
|
|
431
|
+
...connectedHostCapabilityMap(toolRegistry).map((capability) => ({ status: 'allowed' as const, capability })),
|
|
432
|
+
...blockedConnectedHostCapabilities().map((capability) => ({ status: 'blocked' as const, capability })),
|
|
433
|
+
];
|
|
434
|
+
const exact = entries.find((entry) => entry.capability.id === rawQuery);
|
|
435
|
+
if (exact) return { status: 'found', detail: connectedHostCapabilityDetail(exact) };
|
|
436
|
+
const insensitive = entries.find((entry) => typeof entry.capability.id === 'string' && entry.capability.id.toLowerCase() === query);
|
|
437
|
+
if (insensitive) return { status: 'found', detail: connectedHostCapabilityDetail(insensitive) };
|
|
438
|
+
const searched = entries.filter((entry) => recordTextMatches(entry.capability, query));
|
|
439
|
+
if (searched.length === 1) return { status: 'found', detail: connectedHostCapabilityDetail(searched[0]!) };
|
|
440
|
+
if (searched.length > 1) return { status: 'ambiguous', input: rawQuery, candidates: describeConnectedHostCapabilityCandidates(searched) };
|
|
417
441
|
|
|
418
442
|
return null;
|
|
419
443
|
}
|
|
@@ -8,6 +8,13 @@ export interface AgentHarnessModelToolCatalogArgs {
|
|
|
8
8
|
readonly limit?: unknown;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
type HarnessModelToolDefinition = ReturnType<ToolRegistry['getToolDefinitions']>[number];
|
|
12
|
+
type ModelToolLookupSource = 'toolName' | 'target' | 'query';
|
|
13
|
+
|
|
14
|
+
export type HarnessModelToolResolution =
|
|
15
|
+
| { readonly status: 'found'; readonly tool: Record<string, unknown> }
|
|
16
|
+
| { readonly status: 'ambiguous'; readonly input: string; readonly candidates: readonly Record<string, unknown>[] };
|
|
17
|
+
|
|
11
18
|
function readString(value: unknown): string {
|
|
12
19
|
return typeof value === 'string' ? value.trim() : '';
|
|
13
20
|
}
|
|
@@ -18,39 +25,78 @@ function readLimit(value: unknown, fallback: number): number {
|
|
|
18
25
|
return Math.max(1, Math.min(500, Math.trunc(parsed)));
|
|
19
26
|
}
|
|
20
27
|
|
|
28
|
+
function modelToolSearchText(tool: HarnessModelToolDefinition): string {
|
|
29
|
+
return [
|
|
30
|
+
tool.name,
|
|
31
|
+
tool.description,
|
|
32
|
+
...(tool.sideEffects ?? []),
|
|
33
|
+
].join('\n').toLowerCase();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function modelToolLookupFromArgs(args: AgentHarnessModelToolCatalogArgs): { readonly source: ModelToolLookupSource; readonly input: string } | null {
|
|
37
|
+
const toolName = readString(args.toolName);
|
|
38
|
+
if (toolName) return { source: 'toolName', input: toolName };
|
|
39
|
+
const target = readString(args.target);
|
|
40
|
+
if (target) return { source: 'target', input: target };
|
|
41
|
+
const query = readString(args.query);
|
|
42
|
+
return query ? { source: 'query', input: query } : null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function describeModelTool(tool: HarnessModelToolDefinition, options: { readonly includeParameters?: boolean; readonly lookup?: Record<string, unknown> } = {}): Record<string, unknown> {
|
|
46
|
+
return {
|
|
47
|
+
name: tool.name,
|
|
48
|
+
description: tool.description,
|
|
49
|
+
sideEffects: tool.sideEffects ?? [],
|
|
50
|
+
concurrency: tool.concurrency ?? 'parallel',
|
|
51
|
+
supportsProgress: tool.supportsProgress ?? false,
|
|
52
|
+
supportsStreamingOutput: tool.supportsStreamingOutput ?? false,
|
|
53
|
+
...(options.lookup ? { lookup: options.lookup } : {}),
|
|
54
|
+
...(options.includeParameters ? { parameters: tool.parameters } : {}),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function describeModelToolCandidates(tools: readonly HarnessModelToolDefinition[]): readonly Record<string, unknown>[] {
|
|
59
|
+
return tools.slice(0, 8).map((tool) => ({
|
|
60
|
+
toolName: tool.name,
|
|
61
|
+
description: tool.description,
|
|
62
|
+
sideEffects: tool.sideEffects ?? [],
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
|
|
21
66
|
export function listHarnessModelTools(toolRegistry: ToolRegistry, args: AgentHarnessModelToolCatalogArgs): readonly Record<string, unknown>[] {
|
|
22
67
|
const query = readString(args.query).toLowerCase();
|
|
23
68
|
const includeParameters = args.includeParameters === true;
|
|
24
69
|
const limit = readLimit(args.limit, 200);
|
|
25
70
|
return toolRegistry.getToolDefinitions()
|
|
26
|
-
.filter((tool) => !query ||
|
|
71
|
+
.filter((tool) => !query || modelToolSearchText(tool).includes(query))
|
|
27
72
|
.sort((a, b) => a.name.localeCompare(b.name))
|
|
28
73
|
.slice(0, limit)
|
|
29
|
-
.map((tool) => ({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
74
|
+
.map((tool) => describeModelTool(tool, { includeParameters }));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function describeHarnessModelTool(toolRegistry: ToolRegistry, args: AgentHarnessModelToolCatalogArgs): HarnessModelToolResolution | null {
|
|
78
|
+
const lookup = modelToolLookupFromArgs(args);
|
|
79
|
+
if (!lookup) return null;
|
|
80
|
+
const tools = toolRegistry.getToolDefinitions().sort((a, b) => a.name.localeCompare(b.name));
|
|
81
|
+
const normalized = lookup.input.toLowerCase();
|
|
82
|
+
const exact = tools.find((tool) => tool.name === lookup.input);
|
|
83
|
+
const found = exact
|
|
84
|
+
? { tool: exact, resolvedBy: 'name' }
|
|
85
|
+
: (() => {
|
|
86
|
+
const insensitive = tools.find((tool) => tool.name.toLowerCase() === normalized);
|
|
87
|
+
if (insensitive) return { tool: insensitive, resolvedBy: 'case-insensitive-name' };
|
|
88
|
+
const searched = tools.filter((tool) => modelToolSearchText(tool).includes(normalized));
|
|
89
|
+
if (searched.length === 1) return { tool: searched[0]!, resolvedBy: 'search' };
|
|
90
|
+
if (searched.length > 1) return { candidates: searched };
|
|
91
|
+
return null;
|
|
92
|
+
})();
|
|
93
|
+
if (!found) return null;
|
|
94
|
+
if ('candidates' in found) return { status: 'ambiguous', input: lookup.input, candidates: describeModelToolCandidates(found.candidates) };
|
|
46
95
|
return {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
supportsStreamingOutput: tool.supportsStreamingOutput ?? false,
|
|
53
|
-
parameters: tool.parameters,
|
|
54
|
-
policy: 'This is a first-class model tool definition. Use the returned JSON schema directly; mutating or external side-effect tools still require the explicit confirmation arguments defined by that tool.',
|
|
96
|
+
status: 'found',
|
|
97
|
+
tool: {
|
|
98
|
+
...describeModelTool(found.tool, { includeParameters: true, lookup: { ...lookup, resolvedBy: found.resolvedBy } }),
|
|
99
|
+
policy: 'This is a first-class model tool definition. Use the returned JSON schema directly; mutating or external side-effect tools still require the explicit confirmation arguments defined by that tool.',
|
|
100
|
+
},
|
|
55
101
|
};
|
|
56
102
|
}
|
|
@@ -23,7 +23,7 @@ export const AGENT_HARNESS_PARAMETER_PROPERTIES = {
|
|
|
23
23
|
},
|
|
24
24
|
query: {
|
|
25
25
|
type: 'string',
|
|
26
|
-
description: 'Search text for command, CLI mirror, panel, UI surface, keybinding, workspace action, setting, or
|
|
26
|
+
description: 'Search text for slash-command, CLI mirror, panel, UI surface, keybinding, workspace action, model tool, setting, or connected-host capability catalogs; also lookup text for the matching single-item modes.',
|
|
27
27
|
},
|
|
28
28
|
command: {
|
|
29
29
|
type: 'string',
|
|
@@ -90,7 +90,7 @@ export const AGENT_HARNESS_PARAMETER_PROPERTIES = {
|
|
|
90
90
|
},
|
|
91
91
|
target: {
|
|
92
92
|
type: 'string',
|
|
93
|
-
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.',
|
|
93
|
+
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/search text, or connected-host capability id/search text.',
|
|
94
94
|
},
|
|
95
95
|
capabilityId: {
|
|
96
96
|
type: 'string',
|
|
@@ -127,10 +127,10 @@ export const AGENT_HARNESS_PARAMETER_PROPERTIES = {
|
|
|
127
127
|
},
|
|
128
128
|
confirm: {
|
|
129
129
|
type: 'boolean',
|
|
130
|
-
description: 'Required true for set_setting, reset_setting, run_keybinding, run_command, open_panel, open_ui_surface, and mutating run_workspace_action calls after an explicit user request.',
|
|
130
|
+
description: 'Required true for set_setting, reset_setting, run_keybinding, run_command, open_panel, open_ui_surface, and executable or mutating run_workspace_action calls after an explicit user request.',
|
|
131
131
|
},
|
|
132
132
|
explicitUserRequest: {
|
|
133
133
|
type: 'string',
|
|
134
|
-
description: 'Exact user request or faithful short summary authorizing a setting mutation, keybinding action,
|
|
134
|
+
description: 'Exact user request or faithful short summary authorizing a setting mutation, keybinding change/action, harness UI routing, slash-command invocation, or workspace-action invocation.',
|
|
135
135
|
},
|
|
136
136
|
} as const;
|
|
@@ -756,18 +756,18 @@ export function createAgentHarnessTool(deps: AgentHarnessToolDeps): Tool {
|
|
|
756
756
|
}
|
|
757
757
|
if (args.mode === 'tool') {
|
|
758
758
|
const query = readString(args.toolName || args.target || args.query);
|
|
759
|
-
const
|
|
760
|
-
return tool
|
|
761
|
-
|
|
762
|
-
|
|
759
|
+
const resolved = describeHarnessModelTool(deps.toolRegistry, args);
|
|
760
|
+
if (resolved?.status === 'found') return output(resolved.tool);
|
|
761
|
+
if (resolved?.status === 'ambiguous') return error(`Ambiguous model tool ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
762
|
+
return error(`Unknown model tool ${query || '<missing>'}. Use mode:"tools" to inspect available model tools.`);
|
|
763
763
|
}
|
|
764
764
|
if (args.mode === 'connected_host') return output(connectedHostSummary(deps.commandContext, deps.toolRegistry));
|
|
765
765
|
if (args.mode === 'connected_host_capability') {
|
|
766
766
|
const query = readString(args.capabilityId || args.target || args.query);
|
|
767
|
-
const
|
|
768
|
-
return
|
|
769
|
-
|
|
770
|
-
|
|
767
|
+
const resolved = describeConnectedHostCapability(deps.toolRegistry, query);
|
|
768
|
+
if (resolved?.status === 'found') return output(resolved.detail);
|
|
769
|
+
if (resolved?.status === 'ambiguous') return error(`Ambiguous connected-host capability ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
770
|
+
return error(`Unknown connected-host capability ${query || '<missing>'}. Use mode:"connected_host" to inspect allowed and blocked capability ids.`);
|
|
771
771
|
}
|
|
772
772
|
if (args.mode === 'connected_host_status') return output(await connectedHostStatusSummary(deps.commandContext, deps.toolRegistry));
|
|
773
773
|
return error(`Unhandled agent_harness mode: ${args.mode}`);
|
package/src/version.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { join } from 'node:path';
|
|
|
6
6
|
// The prebuild script updates the fallback value before compilation.
|
|
7
7
|
// Uses import.meta.dir (Bun) to locate package.json relative to this file,
|
|
8
8
|
// which is correct regardless of the process working directory.
|
|
9
|
-
let _version = '1.0.
|
|
9
|
+
let _version = '1.0.23';
|
|
10
10
|
let _sdkVersion = '0.33.35';
|
|
11
11
|
try {
|
|
12
12
|
const pkg = JSON.parse(readFileSync(join(import.meta.dir, '..', 'package.json'), 'utf-8')) as {
|