@pellux/goodvibes-agent 1.0.20 → 1.0.22
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 +213 -95
- package/docs/README.md +1 -1
- package/docs/getting-started.md +1 -1
- package/docs/tools-and-commands.md +3 -3
- package/package.json +1 -1
- 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 +6 -6
- package/src/tools/agent-harness-tool.ts +17 -26
- 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.22 - 2026-06-03
|
|
6
|
+
|
|
7
|
+
- Refuse ambiguous agent_harness model-tool schema lookup with candidate tools instead of selecting the first partial match.
|
|
8
|
+
- Refuse ambiguous connected-host capability lookup with candidate capabilities while preserving exact and unique lookup behavior.
|
|
9
|
+
- Refresh model-visible harness parameter descriptions, preferred route hints, package docs, and focused harness coverage for no-guess single-item lookup parity.
|
|
10
|
+
|
|
11
|
+
## 1.0.21 - 2026-06-03
|
|
12
|
+
|
|
13
|
+
- Resolve agent_harness run_workspace_action by actionId, command, target, or query using the same lookup contract as workspace_action inspection.
|
|
14
|
+
- Refuse ambiguous workspace action run requests with candidate actions instead of requiring exact action ids or guessing.
|
|
15
|
+
- Refresh package-facing docs and focused harness coverage for workspace action run parity.
|
|
16
|
+
|
|
5
17
|
## 1.0.20 - 2026-06-03
|
|
6
18
|
|
|
7
19
|
- Add agent_harness run_keybinding for confirmation-gated shell-safe shortcut equivalents such as search, prompt-history search, paste, clear screen, cancel generation, panel focus/close routes, and visible block-action routing.
|
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 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
|
|
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, 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
|
@@ -389257,6 +389257,23 @@ function createSchema2(db) {
|
|
|
389257
389257
|
`);
|
|
389258
389258
|
db.run(`CREATE INDEX IF NOT EXISTS idx_knowledge_schedules_job_id ON knowledge_schedules(job_id)`);
|
|
389259
389259
|
}
|
|
389260
|
+
function getKnowledgeSchemaStatements() {
|
|
389261
|
+
const statements = [];
|
|
389262
|
+
createSchema2({
|
|
389263
|
+
run(sql) {
|
|
389264
|
+
const normalized = sql.trim();
|
|
389265
|
+
if (normalized.length > 0)
|
|
389266
|
+
statements.push(normalized);
|
|
389267
|
+
}
|
|
389268
|
+
});
|
|
389269
|
+
return statements;
|
|
389270
|
+
}
|
|
389271
|
+
function renderKnowledgeSchemaSql() {
|
|
389272
|
+
return `${getKnowledgeSchemaStatements().map((statement) => statement.endsWith(";") ? statement : `${statement};`).join(`
|
|
389273
|
+
|
|
389274
|
+
`)}
|
|
389275
|
+
`;
|
|
389276
|
+
}
|
|
389260
389277
|
function rowObject(columns, values2) {
|
|
389261
389278
|
return Object.fromEntries(columns.map((column, index) => [column, values2[index]]));
|
|
389262
389279
|
}
|
|
@@ -702594,6 +702611,9 @@ var init_ingest = __esm(() => {
|
|
|
702594
702611
|
// node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/browser-history/index.js
|
|
702595
702612
|
var init_browser_history = __esm(() => {
|
|
702596
702613
|
init_ingest();
|
|
702614
|
+
init_discover();
|
|
702615
|
+
init_readers();
|
|
702616
|
+
init_paths2();
|
|
702597
702617
|
});
|
|
702598
702618
|
|
|
702599
702619
|
// node_modules/graphql/jsutils/devAssert.mjs
|
|
@@ -720233,6 +720253,7 @@ var init_semantic = __esm(() => {
|
|
|
720233
720253
|
init_llm();
|
|
720234
720254
|
init_gap_repair();
|
|
720235
720255
|
init_service4();
|
|
720256
|
+
init_self_improvement();
|
|
720236
720257
|
});
|
|
720237
720258
|
|
|
720238
720259
|
// node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/home-graph/helpers.js
|
|
@@ -724201,8 +724222,40 @@ var init_map_view = __esm(() => {
|
|
|
724201
724222
|
});
|
|
724202
724223
|
|
|
724203
724224
|
// node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/home-graph/types.js
|
|
724204
|
-
var HOME_GRAPH_CAPABILITIES;
|
|
724225
|
+
var HOME_GRAPH_NODE_KINDS, HOME_GRAPH_RELATIONS, HOME_GRAPH_CAPABILITIES;
|
|
724205
724226
|
var init_types6 = __esm(() => {
|
|
724227
|
+
HOME_GRAPH_NODE_KINDS = [
|
|
724228
|
+
"ha_home",
|
|
724229
|
+
"ha_entity",
|
|
724230
|
+
"ha_device",
|
|
724231
|
+
"ha_area",
|
|
724232
|
+
"ha_automation",
|
|
724233
|
+
"ha_script",
|
|
724234
|
+
"ha_scene",
|
|
724235
|
+
"ha_label",
|
|
724236
|
+
"ha_integration",
|
|
724237
|
+
"ha_room",
|
|
724238
|
+
"ha_device_passport",
|
|
724239
|
+
"ha_maintenance_item",
|
|
724240
|
+
"ha_troubleshooting_case",
|
|
724241
|
+
"ha_purchase",
|
|
724242
|
+
"ha_network_node"
|
|
724243
|
+
];
|
|
724244
|
+
HOME_GRAPH_RELATIONS = [
|
|
724245
|
+
"controls",
|
|
724246
|
+
"located_in",
|
|
724247
|
+
"belongs_to_device",
|
|
724248
|
+
"has_manual",
|
|
724249
|
+
"has_receipt",
|
|
724250
|
+
"has_warranty",
|
|
724251
|
+
"has_issue",
|
|
724252
|
+
"fixed_by",
|
|
724253
|
+
"uses_battery",
|
|
724254
|
+
"connected_via",
|
|
724255
|
+
"part_of_network",
|
|
724256
|
+
"mentioned_by",
|
|
724257
|
+
"source_for"
|
|
724258
|
+
];
|
|
724206
724259
|
HOME_GRAPH_CAPABILITIES = [
|
|
724207
724260
|
"knowledge-space-isolation",
|
|
724208
724261
|
"snapshot-sync",
|
|
@@ -725609,6 +725662,7 @@ var init_service5 = __esm(() => {
|
|
|
725609
725662
|
var init_home_graph = __esm(() => {
|
|
725610
725663
|
init_service5();
|
|
725611
725664
|
init_extension();
|
|
725665
|
+
init_types6();
|
|
725612
725666
|
});
|
|
725613
725667
|
|
|
725614
725668
|
// node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/store-refinement.js
|
|
@@ -727936,10 +727990,14 @@ var init_service6 = __esm(() => {
|
|
|
727936
727990
|
var init_project_planning = __esm(() => {
|
|
727937
727991
|
init_service6();
|
|
727938
727992
|
init_helpers3();
|
|
727993
|
+
init_readiness();
|
|
727939
727994
|
});
|
|
727940
727995
|
|
|
727941
727996
|
// node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/persistence.js
|
|
727942
|
-
var init_persistence = () => {
|
|
727997
|
+
var init_persistence = __esm(() => {
|
|
727998
|
+
init_store_schema();
|
|
727999
|
+
init_store_load();
|
|
728000
|
+
});
|
|
727943
728001
|
|
|
727944
728002
|
// node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/projections.js
|
|
727945
728003
|
class KnowledgeProjectionService {
|
|
@@ -731447,21 +731505,21 @@ var init_service7 = __esm(() => {
|
|
|
731447
731505
|
var exports_knowledge = {};
|
|
731448
731506
|
__export(exports_knowledge, {
|
|
731449
731507
|
withKnowledgeSpace: () => withKnowledgeSpace,
|
|
731450
|
-
uniqKnowledgeValues: () =>
|
|
731451
|
-
stabilizeKnowledgeText: () =>
|
|
731452
|
-
runKnowledgeSemanticSelfImprovement: () =>
|
|
731508
|
+
uniqKnowledgeValues: () => uniq2,
|
|
731509
|
+
stabilizeKnowledgeText: () => stableText,
|
|
731510
|
+
runKnowledgeSemanticSelfImprovement: () => runKnowledgeSemanticSelfImprovement,
|
|
731453
731511
|
resolveProjectPlanningSpace: () => resolveProjectPlanningSpace,
|
|
731454
|
-
resolveKnowledgeDbPathFromControlPlaneDir: () =>
|
|
731512
|
+
resolveKnowledgeDbPathFromControlPlaneDir: () => resolveKnowledgeDbPathFromControlPlaneDir,
|
|
731455
731513
|
renderPacket: () => renderPacket,
|
|
731456
731514
|
renderKnowledgeSchemaSql: () => renderKnowledgeSchemaSql,
|
|
731457
731515
|
renderKnowledgeMap: () => renderKnowledgeMap,
|
|
731458
731516
|
readKnowledgeSearchText: () => readKnowledgeSearchText,
|
|
731459
|
-
readBrowserKnowledgeProfile: () =>
|
|
731517
|
+
readBrowserKnowledgeProfile: () => readBrowserKnowledgeProfile,
|
|
731460
731518
|
projectPlanningSourceId: () => projectPlanningSourceId,
|
|
731461
731519
|
projectPlanningProjectIdFromPath: () => projectPlanningProjectIdFromPath,
|
|
731462
731520
|
projectPlanningCanonicalUri: () => projectPlanningCanonicalUri,
|
|
731463
731521
|
projectKnowledgeSpaceId: () => projectKnowledgeSpaceId,
|
|
731464
|
-
parseKnowledgeJsonValue: () =>
|
|
731522
|
+
parseKnowledgeJsonValue: () => parseJsonValue,
|
|
731465
731523
|
normalizeProjectId: () => normalizeProjectId,
|
|
731466
731524
|
normalizeKnowledgeSpaceId: () => normalizeKnowledgeSpaceId,
|
|
731467
731525
|
normalizeHomeAssistantInstallationId: () => normalizeHomeAssistantInstallationId,
|
|
@@ -731469,12 +731527,12 @@ __export(exports_knowledge, {
|
|
|
731469
731527
|
materializeGeneratedKnowledgeProjection: () => materializeGeneratedKnowledgeProjection,
|
|
731470
731528
|
looksLikeRawPdfPayload: () => looksLikeRawPdfPayload,
|
|
731471
731529
|
looksBinaryLikeText: () => looksBinaryLikeText,
|
|
731472
|
-
loadKnowledgeStoreSnapshot: () =>
|
|
731530
|
+
loadKnowledgeStoreSnapshot: () => loadKnowledgeStoreSnapshot,
|
|
731473
731531
|
listGeneratedKnowledgePages: () => listGeneratedKnowledgePages,
|
|
731474
|
-
listBrowserKinds: () =>
|
|
731532
|
+
listBrowserKinds: () => listBrowserKinds,
|
|
731475
731533
|
knowledgeSpaceMetadata: () => knowledgeSpaceMetadata,
|
|
731476
731534
|
knowledgePageSourceWeight: () => knowledgePageSourceWeight,
|
|
731477
|
-
knowledgeNowMs: () =>
|
|
731535
|
+
knowledgeNowMs: () => nowMs,
|
|
731478
731536
|
knowledgeExtractionNeedsRefresh: () => knowledgeExtractionNeedsRefresh,
|
|
731479
731537
|
isUsefulKnowledgePageSourceCandidate: () => isUsefulKnowledgePageSourceCandidate,
|
|
731480
731538
|
isUsefulKnowledgePageSource: () => isUsefulKnowledgePageSource,
|
|
@@ -731494,12 +731552,12 @@ __export(exports_knowledge, {
|
|
|
731494
731552
|
generatedKnowledgeSourceId: () => generatedKnowledgeSourceId,
|
|
731495
731553
|
generatedKnowledgeCanonicalUri: () => generatedKnowledgeCanonicalUri,
|
|
731496
731554
|
extractKnowledgeArtifact: () => extractKnowledgeArtifact,
|
|
731497
|
-
evaluateProjectPlanningReadiness: () =>
|
|
731498
|
-
discoverBrowserKnowledgeProfiles: () =>
|
|
731555
|
+
evaluateProjectPlanningReadiness: () => evaluateProjectPlanningReadiness,
|
|
731556
|
+
discoverBrowserKnowledgeProfiles: () => discoverBrowserKnowledgeProfiles,
|
|
731499
731557
|
createWebKnowledgeGapRepairer: () => createWebKnowledgeGapRepairer,
|
|
731500
731558
|
createProviderBackedKnowledgeSemanticLlm: () => createProviderBackedKnowledgeSemanticLlm,
|
|
731501
731559
|
createMemoryApi: () => createMemoryApi,
|
|
731502
|
-
createKnowledgeSchema: () =>
|
|
731560
|
+
createKnowledgeSchema: () => createSchema2,
|
|
731503
731561
|
createKnowledgeApi: () => createKnowledgeApi,
|
|
731504
731562
|
createDefaultKnowledgeConnectorRegistry: () => createDefaultKnowledgeConnectorRegistry,
|
|
731505
731563
|
compareKnowledgePageSources: () => compareKnowledgePageSources,
|
|
@@ -733937,7 +733995,7 @@ var init_delivery_manager = __esm(() => {
|
|
|
733937
733995
|
});
|
|
733938
733996
|
|
|
733939
733997
|
// node_modules/@pellux/goodvibes-sdk/dist/platform/automation/scheduler-capacity.js
|
|
733940
|
-
function computeSchedulerCapacity(slotsTotal, runs,
|
|
733998
|
+
function computeSchedulerCapacity(slotsTotal, runs, nowMs2 = Date.now()) {
|
|
733941
733999
|
let slotsInUse = 0;
|
|
733942
734000
|
const queuedRuns = [];
|
|
733943
734001
|
for (const run7 of runs) {
|
|
@@ -733947,7 +734005,7 @@ function computeSchedulerCapacity(slotsTotal, runs, nowMs3 = Date.now()) {
|
|
|
733947
734005
|
queuedRuns.push(run7);
|
|
733948
734006
|
}
|
|
733949
734007
|
const queueDepth = queuedRuns.length;
|
|
733950
|
-
const oldestQueuedAgeMs = queueDepth > 0 ?
|
|
734008
|
+
const oldestQueuedAgeMs = queueDepth > 0 ? nowMs2 - Math.min(...queuedRuns.map((r5) => r5.queuedAt)) : null;
|
|
733951
734009
|
return { slotsTotal, slotsInUse, queueDepth, oldestQueuedAgeMs };
|
|
733952
734010
|
}
|
|
733953
734011
|
|
|
@@ -816508,7 +816566,7 @@ var createStyledCell = (char, overrides = {}) => ({
|
|
|
816508
816566
|
// src/version.ts
|
|
816509
816567
|
import { readFileSync } from "fs";
|
|
816510
816568
|
import { join } from "path";
|
|
816511
|
-
var _version = "1.0.
|
|
816569
|
+
var _version = "1.0.22";
|
|
816512
816570
|
var _sdkVersion = "0.33.35";
|
|
816513
816571
|
try {
|
|
816514
816572
|
const pkg = JSON.parse(readFileSync(join(import.meta.dir, "..", "package.json"), "utf-8"));
|
|
@@ -839370,7 +839428,7 @@ var WORK_PLAN_STATUSES = [
|
|
|
839370
839428
|
"failed",
|
|
839371
839429
|
"cancelled"
|
|
839372
839430
|
];
|
|
839373
|
-
function
|
|
839431
|
+
function nowMs2() {
|
|
839374
839432
|
return Date.now();
|
|
839375
839433
|
}
|
|
839376
839434
|
function isObject5(value) {
|
|
@@ -839476,7 +839534,7 @@ class WorkPlanStore {
|
|
|
839476
839534
|
if (!normalizedTitle)
|
|
839477
839535
|
throw new Error("Work plan item title is required.");
|
|
839478
839536
|
const plan = this.readPlan();
|
|
839479
|
-
const time4 =
|
|
839537
|
+
const time4 = nowMs2();
|
|
839480
839538
|
const item = {
|
|
839481
839539
|
id: createItemId(),
|
|
839482
839540
|
title: normalizedTitle,
|
|
@@ -839500,7 +839558,7 @@ class WorkPlanStore {
|
|
|
839500
839558
|
updateItem(idOrPrefix, patch2) {
|
|
839501
839559
|
const plan = this.readPlan();
|
|
839502
839560
|
const item = this.resolveItem(plan, idOrPrefix);
|
|
839503
|
-
const time4 =
|
|
839561
|
+
const time4 = nowMs2();
|
|
839504
839562
|
const nextStatus = patch2.status ?? item.status;
|
|
839505
839563
|
const next = this.pruneItem({
|
|
839506
839564
|
...item,
|
|
@@ -839533,7 +839591,7 @@ class WorkPlanStore {
|
|
|
839533
839591
|
removeItem(idOrPrefix) {
|
|
839534
839592
|
const plan = this.readPlan();
|
|
839535
839593
|
const item = this.resolveItem(plan, idOrPrefix);
|
|
839536
|
-
const time4 =
|
|
839594
|
+
const time4 = nowMs2();
|
|
839537
839595
|
const remaining = plan.items.filter((candidate) => candidate.id !== item.id);
|
|
839538
839596
|
this.writePlan({
|
|
839539
839597
|
...plan,
|
|
@@ -839553,7 +839611,7 @@ class WorkPlanStore {
|
|
|
839553
839611
|
...plan,
|
|
839554
839612
|
items: remaining,
|
|
839555
839613
|
activeItemId: remaining[0]?.id,
|
|
839556
|
-
updatedAt:
|
|
839614
|
+
updatedAt: nowMs2()
|
|
839557
839615
|
});
|
|
839558
839616
|
return removed;
|
|
839559
839617
|
}
|
|
@@ -839592,7 +839650,7 @@ class WorkPlanStore {
|
|
|
839592
839650
|
const parsed = JSON.parse(raw);
|
|
839593
839651
|
if (!isObject5(parsed))
|
|
839594
839652
|
return this.createEmptyPlan();
|
|
839595
|
-
const time4 =
|
|
839653
|
+
const time4 = nowMs2();
|
|
839596
839654
|
const createdAt = typeof parsed.createdAt === "number" ? parsed.createdAt : time4;
|
|
839597
839655
|
const updatedAt = typeof parsed.updatedAt === "number" ? parsed.updatedAt : createdAt;
|
|
839598
839656
|
const items = Array.isArray(parsed.items) ? parsed.items.map((item) => normalizeItem(item, createdAt)).filter((item) => item !== null) : [];
|
|
@@ -839611,7 +839669,7 @@ class WorkPlanStore {
|
|
|
839611
839669
|
};
|
|
839612
839670
|
}
|
|
839613
839671
|
createEmptyPlan() {
|
|
839614
|
-
const time4 =
|
|
839672
|
+
const time4 = nowMs2();
|
|
839615
839673
|
return {
|
|
839616
839674
|
id: createPlanId(this.options.projectId, this.options.projectRoot),
|
|
839617
839675
|
projectId: this.options.projectId,
|
|
@@ -879403,7 +879461,7 @@ function describeCommandPolicy(commandName) {
|
|
|
879403
879461
|
return {
|
|
879404
879462
|
effect: "ui-navigation",
|
|
879405
879463
|
confirmation,
|
|
879406
|
-
preferredModelTool: "agent_harness workspace/workspace_actions/workspace_action",
|
|
879464
|
+
preferredModelTool: "agent_harness workspace/workspace_actions/workspace_action/run_workspace_action",
|
|
879407
879465
|
boundary: "Navigation and discovery commands should be inspected through agent_harness when possible."
|
|
879408
879466
|
};
|
|
879409
879467
|
}
|
|
@@ -879454,7 +879512,7 @@ function describeCliCommandPolicy(commandName) {
|
|
|
879454
879512
|
return {
|
|
879455
879513
|
effect: root === "tui" || root === "onboarding" ? "ui-navigation" : "read-only",
|
|
879456
879514
|
confirmation,
|
|
879457
|
-
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",
|
|
879458
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."
|
|
879459
879517
|
};
|
|
879460
879518
|
}
|
|
@@ -879477,7 +879535,7 @@ function describeCliCommandPolicy(commandName) {
|
|
|
879477
879535
|
return {
|
|
879478
879536
|
effect: "local-state",
|
|
879479
879537
|
confirmation,
|
|
879480
|
-
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",
|
|
879481
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."
|
|
879482
879540
|
};
|
|
879483
879541
|
}
|
|
@@ -879657,31 +879715,52 @@ function relatedConnectedHostRouteFamilies(capability) {
|
|
|
879657
879715
|
return capabilityId.length > 0 && recordTextMatches(family, capabilityId);
|
|
879658
879716
|
});
|
|
879659
879717
|
}
|
|
879660
|
-
function
|
|
879661
|
-
|
|
879662
|
-
|
|
879663
|
-
|
|
879664
|
-
|
|
879665
|
-
|
|
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") {
|
|
879666
879728
|
return {
|
|
879667
879729
|
status: "allowed",
|
|
879668
|
-
capability:
|
|
879669
|
-
relatedRouteFamilies: relatedConnectedHostRouteFamilies(
|
|
879730
|
+
capability: entry.capability,
|
|
879731
|
+
relatedRouteFamilies: relatedConnectedHostRouteFamilies(entry.capability),
|
|
879670
879732
|
statusMode: 'Use agent_harness mode:"connected_host_status" for live read-only reachability, SDK compatibility, token posture, and Agent Knowledge route readiness.',
|
|
879671
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."
|
|
879672
879734
|
};
|
|
879673
879735
|
}
|
|
879674
|
-
|
|
879675
|
-
|
|
879676
|
-
|
|
879677
|
-
|
|
879678
|
-
|
|
879679
|
-
|
|
879680
|
-
|
|
879681
|
-
|
|
879682
|
-
|
|
879683
|
-
|
|
879684
|
-
|
|
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) };
|
|
879685
879764
|
return null;
|
|
879686
879765
|
}
|
|
879687
879766
|
function connectedHostSummary(context, toolRegistry) {
|
|
@@ -881269,37 +881348,77 @@ function readLimit9(value, fallback) {
|
|
|
881269
881348
|
return fallback;
|
|
881270
881349
|
return Math.max(1, Math.min(500, Math.trunc(parsed)));
|
|
881271
881350
|
}
|
|
881272
|
-
function
|
|
881273
|
-
|
|
881274
|
-
|
|
881275
|
-
|
|
881276
|
-
|
|
881277
|
-
|
|
881351
|
+
function modelToolSearchText(tool2) {
|
|
881352
|
+
return [
|
|
881353
|
+
tool2.name,
|
|
881354
|
+
tool2.description,
|
|
881355
|
+
...tool2.sideEffects ?? []
|
|
881356
|
+
].join(`
|
|
881357
|
+
`).toLowerCase();
|
|
881358
|
+
}
|
|
881359
|
+
function modelToolLookupFromArgs(args2) {
|
|
881360
|
+
const toolName = readString56(args2.toolName);
|
|
881361
|
+
if (toolName)
|
|
881362
|
+
return { source: "toolName", input: toolName };
|
|
881363
|
+
const target = readString56(args2.target);
|
|
881364
|
+
if (target)
|
|
881365
|
+
return { source: "target", input: target };
|
|
881366
|
+
const query2 = readString56(args2.query);
|
|
881367
|
+
return query2 ? { source: "query", input: query2 } : null;
|
|
881368
|
+
}
|
|
881369
|
+
function describeModelTool(tool2, options = {}) {
|
|
881370
|
+
return {
|
|
881278
881371
|
name: tool2.name,
|
|
881279
881372
|
description: tool2.description,
|
|
881280
881373
|
sideEffects: tool2.sideEffects ?? [],
|
|
881281
881374
|
concurrency: tool2.concurrency ?? "parallel",
|
|
881282
881375
|
supportsProgress: tool2.supportsProgress ?? false,
|
|
881283
881376
|
supportsStreamingOutput: tool2.supportsStreamingOutput ?? false,
|
|
881284
|
-
...
|
|
881377
|
+
...options.lookup ? { lookup: options.lookup } : {},
|
|
881378
|
+
...options.includeParameters ? { parameters: tool2.parameters } : {}
|
|
881379
|
+
};
|
|
881380
|
+
}
|
|
881381
|
+
function describeModelToolCandidates(tools3) {
|
|
881382
|
+
return tools3.slice(0, 8).map((tool2) => ({
|
|
881383
|
+
toolName: tool2.name,
|
|
881384
|
+
description: tool2.description,
|
|
881385
|
+
sideEffects: tool2.sideEffects ?? []
|
|
881285
881386
|
}));
|
|
881286
881387
|
}
|
|
881388
|
+
function listHarnessModelTools(toolRegistry, args2) {
|
|
881389
|
+
const query2 = readString56(args2.query).toLowerCase();
|
|
881390
|
+
const includeParameters = args2.includeParameters === true;
|
|
881391
|
+
const limit3 = readLimit9(args2.limit, 200);
|
|
881392
|
+
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 }));
|
|
881393
|
+
}
|
|
881287
881394
|
function describeHarnessModelTool(toolRegistry, args2) {
|
|
881288
|
-
const
|
|
881289
|
-
if (!
|
|
881395
|
+
const lookup = modelToolLookupFromArgs(args2);
|
|
881396
|
+
if (!lookup)
|
|
881290
881397
|
return null;
|
|
881291
|
-
const
|
|
881292
|
-
|
|
881398
|
+
const tools3 = toolRegistry.getToolDefinitions().sort((a4, b3) => a4.name.localeCompare(b3.name));
|
|
881399
|
+
const normalized = lookup.input.toLowerCase();
|
|
881400
|
+
const exact = tools3.find((tool2) => tool2.name === lookup.input);
|
|
881401
|
+
const found = exact ? { tool: exact, resolvedBy: "name" } : (() => {
|
|
881402
|
+
const insensitive = tools3.find((tool2) => tool2.name.toLowerCase() === normalized);
|
|
881403
|
+
if (insensitive)
|
|
881404
|
+
return { tool: insensitive, resolvedBy: "case-insensitive-name" };
|
|
881405
|
+
const searched = tools3.filter((tool2) => modelToolSearchText(tool2).includes(normalized));
|
|
881406
|
+
if (searched.length === 1)
|
|
881407
|
+
return { tool: searched[0], resolvedBy: "search" };
|
|
881408
|
+
if (searched.length > 1)
|
|
881409
|
+
return { candidates: searched };
|
|
881293
881410
|
return null;
|
|
881411
|
+
})();
|
|
881412
|
+
if (!found)
|
|
881413
|
+
return null;
|
|
881414
|
+
if ("candidates" in found)
|
|
881415
|
+
return { status: "ambiguous", input: lookup.input, candidates: describeModelToolCandidates(found.candidates) };
|
|
881294
881416
|
return {
|
|
881295
|
-
|
|
881296
|
-
|
|
881297
|
-
|
|
881298
|
-
|
|
881299
|
-
|
|
881300
|
-
supportsStreamingOutput: tool2.supportsStreamingOutput ?? false,
|
|
881301
|
-
parameters: tool2.parameters,
|
|
881302
|
-
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."
|
|
881417
|
+
status: "found",
|
|
881418
|
+
tool: {
|
|
881419
|
+
...describeModelTool(found.tool, { includeParameters: true, lookup: { ...lookup, resolvedBy: found.resolvedBy } }),
|
|
881420
|
+
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."
|
|
881421
|
+
}
|
|
881303
881422
|
};
|
|
881304
881423
|
}
|
|
881305
881424
|
|
|
@@ -881352,11 +881471,11 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
|
|
|
881352
881471
|
},
|
|
881353
881472
|
query: {
|
|
881354
881473
|
type: "string",
|
|
881355
|
-
description: "Search text for command, CLI mirror, panel, UI surface, keybinding, workspace action, setting, or
|
|
881474
|
+
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."
|
|
881356
881475
|
},
|
|
881357
881476
|
command: {
|
|
881358
881477
|
type: "string",
|
|
881359
|
-
description: 'Full slash command string for mode command, workspace_action lookup, or run_command, for example "/settings get provider.model". In cli_command mode this may also hold a top-level CLI string such as "goodvibes-agent status --json".'
|
|
881478
|
+
description: 'Full slash command string for mode command, workspace_action/run_workspace_action lookup, or run_command, for example "/settings get provider.model". In cli_command mode this may also hold a top-level CLI string such as "goodvibes-agent status --json".'
|
|
881360
881479
|
},
|
|
881361
881480
|
cliCommand: {
|
|
881362
881481
|
type: "string",
|
|
@@ -881385,7 +881504,7 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
|
|
|
881385
881504
|
},
|
|
881386
881505
|
actionId: {
|
|
881387
881506
|
type: "string",
|
|
881388
|
-
description: "Agent workspace action id for workspace_action or run_workspace_action, or keybinding action id for keybinding/run_keybinding/set_keybinding/reset_keybinding. target or query can also look up one keybinding action."
|
|
881507
|
+
description: "Agent workspace action id for workspace_action or run_workspace_action, or keybinding action id for keybinding/run_keybinding/set_keybinding/reset_keybinding. command, target, or query can also look up one workspace action; target or query can also look up one keybinding action."
|
|
881389
881508
|
},
|
|
881390
881509
|
fields: {
|
|
881391
881510
|
type: "object",
|
|
@@ -881419,7 +881538,7 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
|
|
|
881419
881538
|
},
|
|
881420
881539
|
target: {
|
|
881421
881540
|
type: "string",
|
|
881422
|
-
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."
|
|
881541
|
+
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."
|
|
881423
881542
|
},
|
|
881424
881543
|
capabilityId: {
|
|
881425
881544
|
type: "string",
|
|
@@ -881456,11 +881575,11 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
|
|
|
881456
881575
|
},
|
|
881457
881576
|
confirm: {
|
|
881458
881577
|
type: "boolean",
|
|
881459
|
-
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."
|
|
881578
|
+
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."
|
|
881460
881579
|
},
|
|
881461
881580
|
explicitUserRequest: {
|
|
881462
881581
|
type: "string",
|
|
881463
|
-
description: "Exact user request or faithful short summary authorizing a setting mutation, keybinding action,
|
|
881582
|
+
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."
|
|
881464
881583
|
}
|
|
881465
881584
|
};
|
|
881466
881585
|
|
|
@@ -882424,17 +882543,6 @@ function listWorkspaceActions(deps, args2) {
|
|
|
882424
882543
|
const source = query2 ? searchAgentWorkspaceActions(AGENT_WORKSPACE_CATEGORIES, query2).map((result2) => ({ category: result2.category, action: result2.action })) : allWorkspaceActions();
|
|
882425
882544
|
return source.filter((entry) => !categoryId || entry.category.id === categoryId).slice(0, limit3).map((entry) => describeWorkspaceAction(entry.category, entry.action, { includeEditor, editorContext }));
|
|
882426
882545
|
}
|
|
882427
|
-
function findWorkspaceAction(args2) {
|
|
882428
|
-
const actionId = readString58(args2.actionId || args2.query);
|
|
882429
|
-
const categoryId = readString58(args2.categoryId || args2.category);
|
|
882430
|
-
if (!actionId)
|
|
882431
|
-
return null;
|
|
882432
|
-
return allWorkspaceActions().find((entry) => {
|
|
882433
|
-
if (categoryId && entry.category.id !== categoryId)
|
|
882434
|
-
return false;
|
|
882435
|
-
return entry.action.id === actionId || entry.action.label.toLowerCase() === actionId.toLowerCase();
|
|
882436
|
-
}) ?? null;
|
|
882437
|
-
}
|
|
882438
882546
|
function workspaceActionLookupFromArgs(args2) {
|
|
882439
882547
|
const actionId = readString58(args2.actionId);
|
|
882440
882548
|
if (actionId)
|
|
@@ -882642,10 +882750,12 @@ async function runWorkspaceEditorAction(deps, action2, editor, args2) {
|
|
|
882642
882750
|
});
|
|
882643
882751
|
}
|
|
882644
882752
|
async function runWorkspaceAction(deps, args2) {
|
|
882645
|
-
const
|
|
882646
|
-
if (
|
|
882647
|
-
return error52(
|
|
882648
|
-
|
|
882753
|
+
const resolved = resolveWorkspaceActionDetail(args2);
|
|
882754
|
+
if (resolved?.status === "ambiguous")
|
|
882755
|
+
return error52(`Ambiguous Agent workspace action ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
882756
|
+
if (!resolved)
|
|
882757
|
+
return error52('run_workspace_action requires a valid actionId, command, target, or query. Use mode:"workspace_actions" to inspect available actions.');
|
|
882758
|
+
const { category, action: action2, lookup } = resolved;
|
|
882649
882759
|
if (action2.safety === "blocked") {
|
|
882650
882760
|
return error52(`Workspace action ${action2.id} is blocked in Agent: ${action2.detail}`);
|
|
882651
882761
|
}
|
|
@@ -882653,14 +882763,14 @@ async function runWorkspaceAction(deps, args2) {
|
|
|
882653
882763
|
const editorContext2 = buildWorkspaceEditorContext(deps.commandContext, args2);
|
|
882654
882764
|
return output7({
|
|
882655
882765
|
status: "guidance",
|
|
882656
|
-
action: describeWorkspaceAction(category, action2, { includeEditor: true, editorContext: editorContext2 })
|
|
882766
|
+
action: describeWorkspaceAction(category, action2, { includeEditor: true, editorContext: editorContext2, lookup })
|
|
882657
882767
|
});
|
|
882658
882768
|
}
|
|
882659
882769
|
if (action2.kind === "workspace" && action2.targetCategoryId) {
|
|
882660
882770
|
const target = AGENT_WORKSPACE_CATEGORIES.find((entry) => entry.id === action2.targetCategoryId);
|
|
882661
882771
|
return output7({
|
|
882662
882772
|
status: "workspace_target",
|
|
882663
|
-
action: describeWorkspaceAction(category, action2),
|
|
882773
|
+
action: describeWorkspaceAction(category, action2, { lookup }),
|
|
882664
882774
|
targetCategory: target ? describeWorkspaceCategory(target) : action2.targetCategoryId,
|
|
882665
882775
|
targetActions: target ? target.actions.map((entry) => describeWorkspaceAction(target, entry)).slice(0, 40) : []
|
|
882666
882776
|
});
|
|
@@ -882669,7 +882779,7 @@ async function runWorkspaceAction(deps, args2) {
|
|
|
882669
882779
|
if (/<[^>\s]+(?:\s+[^>]*)?>/.test(action2.command)) {
|
|
882670
882780
|
return output7({
|
|
882671
882781
|
status: "needs_concrete_command",
|
|
882672
|
-
action: describeWorkspaceAction(category, action2),
|
|
882782
|
+
action: describeWorkspaceAction(category, action2, { lookup }),
|
|
882673
882783
|
note: 'This workspace action is a command template. Provide concrete values with mode:"run_command" once the exact command is known.'
|
|
882674
882784
|
});
|
|
882675
882785
|
}
|
|
@@ -882687,7 +882797,7 @@ async function runWorkspaceAction(deps, args2) {
|
|
|
882687
882797
|
const editorContext = buildWorkspaceEditorContext(deps.commandContext, args2);
|
|
882688
882798
|
return output7({
|
|
882689
882799
|
status: "no_direct_effect",
|
|
882690
|
-
action: describeWorkspaceAction(category, action2, { includeEditor: true, editorContext })
|
|
882800
|
+
action: describeWorkspaceAction(category, action2, { includeEditor: true, editorContext, lookup })
|
|
882691
882801
|
});
|
|
882692
882802
|
}
|
|
882693
882803
|
function createAgentHarnessTool(deps) {
|
|
@@ -882733,7 +882843,7 @@ function createAgentHarnessTool(deps) {
|
|
|
882733
882843
|
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.',
|
|
882734
882844
|
shortcuts: 'Use mode:"shortcuts" to inspect fixed shortcuts plus configurable keybindings. Use mode:"keybinding" with actionId, target, key, or query; use mode:"run_keybinding" for confirmation-gated shell-safe shortcut equivalents; use mode:"set_keybinding" and mode:"reset_keybinding" with confirm:true plus explicitUserRequest to edit the same config file the user edits.',
|
|
882735
882845
|
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.',
|
|
882736
|
-
workspace: 'Use mode:"workspace_actions" to list
|
|
882846
|
+
workspace: 'Use mode:"workspace_actions" to list, mode:"workspace_action" with actionId, command, target, or query for one action and editor schema, and mode:"run_workspace_action" with the same lookup fields plus confirmation for executable actions; set includeParameters:true on workspace_actions to inline editor schemas.',
|
|
882737
882847
|
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.',
|
|
882738
882848
|
tools: 'Use mode:"tools" to list first-class model tools, or mode:"tool" with toolName, target, or query to inspect one schema.',
|
|
882739
882849
|
connectedHost: 'Use mode:"connected_host" for the connected-host capability map and blocked boundaries. Use mode:"connected_host_capability" with capabilityId, target, or query for one allowed or blocked capability.',
|
|
@@ -882898,15 +883008,23 @@ function createAgentHarnessTool(deps) {
|
|
|
882898
883008
|
}
|
|
882899
883009
|
if (args2.mode === "tool") {
|
|
882900
883010
|
const query2 = readString58(args2.toolName || args2.target || args2.query);
|
|
882901
|
-
const
|
|
882902
|
-
|
|
883011
|
+
const resolved = describeHarnessModelTool(deps.toolRegistry, args2);
|
|
883012
|
+
if (resolved?.status === "found")
|
|
883013
|
+
return output7(resolved.tool);
|
|
883014
|
+
if (resolved?.status === "ambiguous")
|
|
883015
|
+
return error52(`Ambiguous model tool ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
883016
|
+
return error52(`Unknown model tool ${query2 || "<missing>"}. Use mode:"tools" to inspect available model tools.`);
|
|
882903
883017
|
}
|
|
882904
883018
|
if (args2.mode === "connected_host")
|
|
882905
883019
|
return output7(connectedHostSummary(deps.commandContext, deps.toolRegistry));
|
|
882906
883020
|
if (args2.mode === "connected_host_capability") {
|
|
882907
883021
|
const query2 = readString58(args2.capabilityId || args2.target || args2.query);
|
|
882908
|
-
const
|
|
882909
|
-
|
|
883022
|
+
const resolved = describeConnectedHostCapability(deps.toolRegistry, query2);
|
|
883023
|
+
if (resolved?.status === "found")
|
|
883024
|
+
return output7(resolved.detail);
|
|
883025
|
+
if (resolved?.status === "ambiguous")
|
|
883026
|
+
return error52(`Ambiguous connected-host capability ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
883027
|
+
return error52(`Unknown connected-host capability ${query2 || "<missing>"}. Use mode:"connected_host" to inspect allowed and blocked capability ids.`);
|
|
882910
883028
|
}
|
|
882911
883029
|
if (args2.mode === "connected_host_status")
|
|
882912
883030
|
return output7(await connectedHostStatusSummary(deps.commandContext, deps.toolRegistry));
|
package/docs/README.md
CHANGED
|
@@ -22,7 +22,7 @@ Important baseline constraints:
|
|
|
22
22
|
- Agent depends on `@pellux/goodvibes-sdk@0.33.35`.
|
|
23
23
|
- Agent connects to a GoodVibes host owned outside this product.
|
|
24
24
|
- Agent does not start, stop, restart, install, uninstall, or own the connected GoodVibes host.
|
|
25
|
-
- User-facing Agent workspace actions, single workspace-action lookup, built-in panels and single-panel lookup, modal/overlay/picker UI surfaces and single-surface lookup, named operator surfaces, top-level CLI mirrors and single-mirror lookup, fixed shortcuts, configurable keybindings, single-keybinding lookup, shell-safe keybinding execution, slash commands, single-command lookup with policy metadata, model tools and individual model tool schemas, settings and single-setting lookup, local registries, connected-host capability boundaries, single connected-host capability inspection, and live connected-host readiness are model-visible through Agent-owned tools. Visible UI routing includes the command browser, reasoning-effort picker, live process output, runtime activity, settings, workspaces, and pickers the user can open. Local memory, note, persona, skill, and routine create editors can also run through confirmed workspace actions. Mutations, visible UI routing, and keybinding execution remain explicit and confirmation-gated; prompt-editor-only shortcuts stay direct user interaction; and ambiguous lookup matches are refused with candidates instead of guessed.
|
|
25
|
+
- User-facing Agent workspace actions, single workspace-action lookup/execution, built-in panels and single-panel lookup, modal/overlay/picker UI surfaces and single-surface lookup, named operator surfaces, top-level CLI mirrors and single-mirror lookup, fixed shortcuts, configurable keybindings, single-keybinding lookup, shell-safe keybinding execution, slash commands, single-command lookup with policy metadata, model tools and individual model tool schemas, settings and single-setting lookup, local registries, connected-host capability boundaries, single connected-host capability inspection, and live connected-host readiness are model-visible through Agent-owned tools. Visible UI routing includes the command browser, reasoning-effort picker, live process output, runtime activity, settings, workspaces, and pickers the user can open. Local memory, note, persona, skill, and routine create editors can also run through confirmed workspace actions. Mutations, visible UI routing, and keybinding execution remain explicit and confirmation-gated; prompt-editor-only shortcuts stay direct user interaction; and ambiguous lookup matches are refused with candidates instead of guessed.
|
|
26
26
|
- Agent Knowledge uses only `/api/goodvibes-agent/knowledge/*`; there is no default knowledge or non-Agent product fallback.
|
|
27
27
|
- Agent supports isolated Agent homes with `GOODVIBES_AGENT_HOME=<path>` and named profile homes with `goodvibes-agent profiles create <name> --template <starter> --yes` plus `--agent-profile <name>`.
|
|
28
28
|
- Agent supports connected-host URL overrides with `--runtime-url http://host:port` or `GOODVIBES_AGENT_RUNTIME_URL=http://host:port`; these only change the Agent connection target.
|
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 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
|
|
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-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
|
|
|
@@ -43,14 +43,14 @@ Host-management and coding-first commands that would imply connected-host lifecy
|
|
|
43
43
|
|
|
44
44
|
The main Agent model has an Agent-owned harness bridge rather than generic SDK settings/context control. Use these model tools as the supported parity layer:
|
|
45
45
|
|
|
46
|
-
- `agent_harness`: inspect workspace categories/actions and one workspace action by action id, command, or lookup text, inspect built-in panels and one panel by id or lookup text, inspect modal/overlay/picker UI surfaces and named operator surfaces by id or lookup text, inspect top-level CLI mirrors and one mirror by command string, command token, or lookup text, inspect fixed shortcuts and configurable keybindings, inspect/change/run one keybinding by action id or lookup text where a shell-safe model route exists, inspect slash commands and one slash command by typed command or lookup text with policy metadata, run concrete
|
|
46
|
+
- `agent_harness`: inspect workspace categories/actions and inspect or run one workspace action by action id, command, or lookup text, inspect built-in panels and one panel by id or lookup text, inspect modal/overlay/picker UI surfaces and named operator surfaces by id or lookup text, inspect top-level CLI mirrors and one mirror by command string, command token, or lookup text, inspect fixed shortcuts and configurable keybindings, inspect/change/run one keybinding by action id or lookup text where a shell-safe model route exists, inspect slash commands and one slash command by typed command or lookup text with policy metadata, run concrete slash-command mirrors with confirmation, inspect model tools or one model tool schema, inspect or change Agent settings by exact key or lookup text, inspect connected-host capability boundaries or one connected-host capability, and inspect live connected-host readiness.
|
|
47
47
|
- `agent_local_registry`: inspect and maintain Agent-local memory, notes, personas, skills, skill bundles, and routines. Deleting local records requires `confirm:true` and `explicitUserRequest`.
|
|
48
48
|
- `agent_knowledge` and `agent_knowledge_ingest`: ask/search and ingest into the isolated Agent Knowledge segment.
|
|
49
49
|
- `agent_operator_briefing` and `agent_operator_action`: inspect connected work/approval/automation posture, or run exact confirmed approval/automation actions.
|
|
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`
|
|
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` 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
|
|
|
@@ -64,7 +64,7 @@ CLI mirror modes are catalog and parser inspection only. When the user asks the
|
|
|
64
64
|
|
|
65
65
|
Setting writes, setting resets, supported keybinding actions, keybinding writes/resets, UI surface routing, slash-command invocation, workspace-action invocation, local record deletion, channel sends, notifications, reminders, media generation, and connected-host operator mutations require explicit user request and confirmation. Secret-backed settings are stored through the secret manager, and connected-host lifecycle/listener settings remain read-only in Agent.
|
|
66
66
|
|
|
67
|
-
Selection-based local workspace actions use the same bridge. `agent_harness` reports the required model tool for each local action; for actions that depend on the TUI selection, call `run_workspace_action` with the selected local `recordId
|
|
67
|
+
Selection-based local workspace actions use the same bridge. `agent_harness` reports the required model tool for each local action; for actions that depend on the TUI selection, call `run_workspace_action` with the selected local `recordId` plus an `actionId`, `command`, `target`, or `query` that resolves to one action. Direct local create editors for memory, notes, personas, skills, and routines can execute from submitted `fields` through `run_workspace_action`; the harness validates required fields, requires `confirm:true` and `explicitUserRequest`, and dispatches through `agent_local_registry`. Note promotion actions can prefill and create memory, personas, skills, routines, or isolated Agent Knowledge URL ingests through the matching first-class model tool. Profile creation schemas include the current runtime starter-template inventory, and routine schedule schemas prefill the selected routine when `recordId` or a `routineId` field matches a local routine.
|
|
68
68
|
|
|
69
69
|
Use first-class Agent tools before falling back to slash-command mirrors. Slash-command execution is for harness parity and scriptable mirrors, not for bypassing Agent product boundaries.
|
|
70
70
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pellux/goodvibes-agent",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.22",
|
|
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",
|
|
@@ -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,11 +23,11 @@ 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',
|
|
30
|
-
description: 'Full slash command string for mode command, workspace_action lookup, or run_command, for example "/settings get provider.model". In cli_command mode this may also hold a top-level CLI string such as "goodvibes-agent status --json".',
|
|
30
|
+
description: 'Full slash command string for mode command, workspace_action/run_workspace_action lookup, or run_command, for example "/settings get provider.model". In cli_command mode this may also hold a top-level CLI string such as "goodvibes-agent status --json".',
|
|
31
31
|
},
|
|
32
32
|
cliCommand: {
|
|
33
33
|
type: 'string',
|
|
@@ -56,7 +56,7 @@ export const AGENT_HARNESS_PARAMETER_PROPERTIES = {
|
|
|
56
56
|
},
|
|
57
57
|
actionId: {
|
|
58
58
|
type: 'string',
|
|
59
|
-
description: 'Agent workspace action id for workspace_action or run_workspace_action, or keybinding action id for keybinding/run_keybinding/set_keybinding/reset_keybinding. target or query can also look up one keybinding action.',
|
|
59
|
+
description: 'Agent workspace action id for workspace_action or run_workspace_action, or keybinding action id for keybinding/run_keybinding/set_keybinding/reset_keybinding. command, target, or query can also look up one workspace action; target or query can also look up one keybinding action.',
|
|
60
60
|
},
|
|
61
61
|
fields: {
|
|
62
62
|
type: 'object',
|
|
@@ -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;
|
|
@@ -273,16 +273,6 @@ function listWorkspaceActions(deps: AgentHarnessToolDeps, args: AgentHarnessTool
|
|
|
273
273
|
.map((entry) => describeWorkspaceAction(entry.category, entry.action, { includeEditor, editorContext }));
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
function findWorkspaceAction(args: AgentHarnessToolArgs): { readonly category: AgentWorkspaceCategory; readonly action: AgentWorkspaceAction } | null {
|
|
277
|
-
const actionId = readString(args.actionId || args.query);
|
|
278
|
-
const categoryId = readString(args.categoryId || args.category);
|
|
279
|
-
if (!actionId) return null;
|
|
280
|
-
return allWorkspaceActions().find((entry) => {
|
|
281
|
-
if (categoryId && entry.category.id !== categoryId) return false;
|
|
282
|
-
return entry.action.id === actionId || entry.action.label.toLowerCase() === actionId.toLowerCase();
|
|
283
|
-
}) ?? null;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
276
|
function workspaceActionLookupFromArgs(args: AgentHarnessToolArgs): { readonly source: WorkspaceActionLookup['source']; readonly input: string } | null {
|
|
287
277
|
const actionId = readString(args.actionId);
|
|
288
278
|
if (actionId) return { source: 'actionId', input: actionId };
|
|
@@ -509,9 +499,10 @@ async function runWorkspaceAction(
|
|
|
509
499
|
deps: AgentHarnessToolDeps,
|
|
510
500
|
args: AgentHarnessToolArgs,
|
|
511
501
|
): Promise<{ readonly success: boolean; readonly output?: string; readonly error?: string }> {
|
|
512
|
-
const
|
|
513
|
-
if (
|
|
514
|
-
|
|
502
|
+
const resolved = resolveWorkspaceActionDetail(args);
|
|
503
|
+
if (resolved?.status === 'ambiguous') return error(`Ambiguous Agent workspace action ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
504
|
+
if (!resolved) return error('run_workspace_action requires a valid actionId, command, target, or query. Use mode:"workspace_actions" to inspect available actions.');
|
|
505
|
+
const { category, action, lookup } = resolved;
|
|
515
506
|
|
|
516
507
|
if (action.safety === 'blocked') {
|
|
517
508
|
return error(`Workspace action ${action.id} is blocked in Agent: ${action.detail}`);
|
|
@@ -520,14 +511,14 @@ async function runWorkspaceAction(
|
|
|
520
511
|
const editorContext = buildWorkspaceEditorContext(deps.commandContext, args);
|
|
521
512
|
return output({
|
|
522
513
|
status: 'guidance',
|
|
523
|
-
action: describeWorkspaceAction(category, action, { includeEditor: true, editorContext }),
|
|
514
|
+
action: describeWorkspaceAction(category, action, { includeEditor: true, editorContext, lookup }),
|
|
524
515
|
});
|
|
525
516
|
}
|
|
526
517
|
if (action.kind === 'workspace' && action.targetCategoryId) {
|
|
527
518
|
const target = AGENT_WORKSPACE_CATEGORIES.find((entry) => entry.id === action.targetCategoryId);
|
|
528
519
|
return output({
|
|
529
520
|
status: 'workspace_target',
|
|
530
|
-
action: describeWorkspaceAction(category, action),
|
|
521
|
+
action: describeWorkspaceAction(category, action, { lookup }),
|
|
531
522
|
targetCategory: target ? describeWorkspaceCategory(target) : action.targetCategoryId,
|
|
532
523
|
targetActions: target ? target.actions.map((entry) => describeWorkspaceAction(target, entry)).slice(0, 40) : [],
|
|
533
524
|
});
|
|
@@ -536,7 +527,7 @@ async function runWorkspaceAction(
|
|
|
536
527
|
if (/<[^>\s]+(?:\s+[^>]*)?>/.test(action.command)) {
|
|
537
528
|
return output({
|
|
538
529
|
status: 'needs_concrete_command',
|
|
539
|
-
action: describeWorkspaceAction(category, action),
|
|
530
|
+
action: describeWorkspaceAction(category, action, { lookup }),
|
|
540
531
|
note: 'This workspace action is a command template. Provide concrete values with mode:"run_command" once the exact command is known.',
|
|
541
532
|
});
|
|
542
533
|
}
|
|
@@ -553,7 +544,7 @@ async function runWorkspaceAction(
|
|
|
553
544
|
const editorContext = buildWorkspaceEditorContext(deps.commandContext, args);
|
|
554
545
|
return output({
|
|
555
546
|
status: 'no_direct_effect',
|
|
556
|
-
action: describeWorkspaceAction(category, action, { includeEditor: true, editorContext }),
|
|
547
|
+
action: describeWorkspaceAction(category, action, { includeEditor: true, editorContext, lookup }),
|
|
557
548
|
});
|
|
558
549
|
}
|
|
559
550
|
|
|
@@ -599,7 +590,7 @@ export function createAgentHarnessTool(deps: AgentHarnessToolDeps): Tool {
|
|
|
599
590
|
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.',
|
|
600
591
|
shortcuts: 'Use mode:"shortcuts" to inspect fixed shortcuts plus configurable keybindings. Use mode:"keybinding" with actionId, target, key, or query; use mode:"run_keybinding" for confirmation-gated shell-safe shortcut equivalents; use mode:"set_keybinding" and mode:"reset_keybinding" with confirm:true plus explicitUserRequest to edit the same config file the user edits.',
|
|
601
592
|
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.',
|
|
602
|
-
workspace: 'Use mode:"workspace_actions" to list
|
|
593
|
+
workspace: 'Use mode:"workspace_actions" to list, mode:"workspace_action" with actionId, command, target, or query for one action and editor schema, and mode:"run_workspace_action" with the same lookup fields plus confirmation for executable actions; set includeParameters:true on workspace_actions to inline editor schemas.',
|
|
603
594
|
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.',
|
|
604
595
|
tools: 'Use mode:"tools" to list first-class model tools, or mode:"tool" with toolName, target, or query to inspect one schema.',
|
|
605
596
|
connectedHost: 'Use mode:"connected_host" for the connected-host capability map and blocked boundaries. Use mode:"connected_host_capability" with capabilityId, target, or query for one allowed or blocked capability.',
|
|
@@ -765,18 +756,18 @@ export function createAgentHarnessTool(deps: AgentHarnessToolDeps): Tool {
|
|
|
765
756
|
}
|
|
766
757
|
if (args.mode === 'tool') {
|
|
767
758
|
const query = readString(args.toolName || args.target || args.query);
|
|
768
|
-
const
|
|
769
|
-
return tool
|
|
770
|
-
|
|
771
|
-
|
|
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.`);
|
|
772
763
|
}
|
|
773
764
|
if (args.mode === 'connected_host') return output(connectedHostSummary(deps.commandContext, deps.toolRegistry));
|
|
774
765
|
if (args.mode === 'connected_host_capability') {
|
|
775
766
|
const query = readString(args.capabilityId || args.target || args.query);
|
|
776
|
-
const
|
|
777
|
-
return
|
|
778
|
-
|
|
779
|
-
|
|
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.`);
|
|
780
771
|
}
|
|
781
772
|
if (args.mode === 'connected_host_status') return output(await connectedHostStatusSummary(deps.commandContext, deps.toolRegistry));
|
|
782
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.22';
|
|
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 {
|