@pellux/goodvibes-agent 1.0.16 → 1.0.18

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.
@@ -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: () => uniq3,
731451
- stabilizeKnowledgeText: () => stableText2,
731452
- runKnowledgeSemanticSelfImprovement: () => runKnowledgeSemanticSelfImprovement2,
731508
+ uniqKnowledgeValues: () => uniq2,
731509
+ stabilizeKnowledgeText: () => stableText,
731510
+ runKnowledgeSemanticSelfImprovement: () => runKnowledgeSemanticSelfImprovement,
731453
731511
  resolveProjectPlanningSpace: () => resolveProjectPlanningSpace,
731454
- resolveKnowledgeDbPathFromControlPlaneDir: () => resolveKnowledgeDbPathFromControlPlaneDir2,
731512
+ resolveKnowledgeDbPathFromControlPlaneDir: () => resolveKnowledgeDbPathFromControlPlaneDir,
731455
731513
  renderPacket: () => renderPacket,
731456
731514
  renderKnowledgeSchemaSql: () => renderKnowledgeSchemaSql,
731457
731515
  renderKnowledgeMap: () => renderKnowledgeMap,
731458
731516
  readKnowledgeSearchText: () => readKnowledgeSearchText,
731459
- readBrowserKnowledgeProfile: () => readBrowserKnowledgeProfile2,
731517
+ readBrowserKnowledgeProfile: () => readBrowserKnowledgeProfile,
731460
731518
  projectPlanningSourceId: () => projectPlanningSourceId,
731461
731519
  projectPlanningProjectIdFromPath: () => projectPlanningProjectIdFromPath,
731462
731520
  projectPlanningCanonicalUri: () => projectPlanningCanonicalUri,
731463
731521
  projectKnowledgeSpaceId: () => projectKnowledgeSpaceId,
731464
- parseKnowledgeJsonValue: () => parseJsonValue2,
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: () => loadKnowledgeStoreSnapshot2,
731530
+ loadKnowledgeStoreSnapshot: () => loadKnowledgeStoreSnapshot,
731473
731531
  listGeneratedKnowledgePages: () => listGeneratedKnowledgePages,
731474
- listBrowserKinds: () => listBrowserKinds2,
731532
+ listBrowserKinds: () => listBrowserKinds,
731475
731533
  knowledgeSpaceMetadata: () => knowledgeSpaceMetadata,
731476
731534
  knowledgePageSourceWeight: () => knowledgePageSourceWeight,
731477
- knowledgeNowMs: () => nowMs2,
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: () => evaluateProjectPlanningReadiness2,
731498
- discoverBrowserKnowledgeProfiles: () => discoverBrowserKnowledgeProfiles2,
731555
+ evaluateProjectPlanningReadiness: () => evaluateProjectPlanningReadiness,
731556
+ discoverBrowserKnowledgeProfiles: () => discoverBrowserKnowledgeProfiles,
731499
731557
  createWebKnowledgeGapRepairer: () => createWebKnowledgeGapRepairer,
731500
731558
  createProviderBackedKnowledgeSemanticLlm: () => createProviderBackedKnowledgeSemanticLlm,
731501
731559
  createMemoryApi: () => createMemoryApi,
731502
- createKnowledgeSchema: () => createSchema3,
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, nowMs3 = Date.now()) {
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 ? nowMs3 - Math.min(...queuedRuns.map((r5) => r5.queuedAt)) : null;
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.16";
816569
+ var _version = "1.0.18";
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 nowMs3() {
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 = nowMs3();
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 = nowMs3();
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 = nowMs3();
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: nowMs3()
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 = nowMs3();
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 = nowMs3();
839672
+ const time4 = nowMs2();
839615
839673
  return {
839616
839674
  id: createPlanId(this.options.projectId, this.options.projectRoot),
839617
839675
  projectId: this.options.projectId,
@@ -851011,6 +851069,36 @@ function findSetting(configManager, rawKey) {
851011
851069
  return null;
851012
851070
  return configManager.getSchema().find((setting) => setting.key === rawKey) ?? null;
851013
851071
  }
851072
+ function settingLookupText(setting) {
851073
+ return [setting.key, setting.description, setting.type, ...setting.enumValues ?? []].join(`
851074
+ `).toLowerCase();
851075
+ }
851076
+ function settingMatchesSearch(setting, query2) {
851077
+ return settingLookupText(setting).includes(query2);
851078
+ }
851079
+ function settingCandidate(setting) {
851080
+ const hostOwned = isExternalHostOwnedSettingKey(setting.key);
851081
+ return {
851082
+ key: setting.key,
851083
+ category: setting.key.split(".")[0] ?? "",
851084
+ type: setting.type,
851085
+ writable: !hostOwned,
851086
+ visibleInWorkspace: !isAgentHiddenSettingKey(setting.key),
851087
+ description: setting.description
851088
+ };
851089
+ }
851090
+ function settingLookupFromArgs(args2) {
851091
+ const key = args2.key?.trim();
851092
+ if (key)
851093
+ return { source: "key", input: key };
851094
+ const target = args2.target?.trim();
851095
+ if (target)
851096
+ return { source: "target", input: target };
851097
+ const query2 = args2.query?.trim();
851098
+ if (query2)
851099
+ return { source: "query", input: query2 };
851100
+ return null;
851101
+ }
851014
851102
  function redactHarnessSettingValue(key, value) {
851015
851103
  if (typeof value !== "string")
851016
851104
  return value;
@@ -851023,7 +851111,7 @@ function redactHarnessSettingValue(key, value) {
851023
851111
  }
851024
851112
  return value;
851025
851113
  }
851026
- function describeHarnessSetting(configManager, setting) {
851114
+ function describeHarnessSetting(configManager, setting, options = {}) {
851027
851115
  const value = configManager.get(setting.key);
851028
851116
  const hostOwned = isExternalHostOwnedSettingKey(setting.key);
851029
851117
  return {
@@ -851037,7 +851125,8 @@ function describeHarnessSetting(configManager, setting) {
851037
851125
  visibleInWorkspace: !isAgentHiddenSettingKey(setting.key),
851038
851126
  ...hostOwned ? { lockReason: AGENT_EXTERNAL_HOST_SETTING_LOCK_REASON } : {},
851039
851127
  description: setting.description,
851040
- ...setting.enumValues ? { enumValues: setting.enumValues } : {}
851128
+ ...setting.enumValues ? { enumValues: setting.enumValues } : {},
851129
+ ...options.lookup ? { lookup: options.lookup } : {}
851041
851130
  };
851042
851131
  }
851043
851132
  function listHarnessSettings(configManager, filters = {}) {
@@ -851056,17 +851145,74 @@ function listHarnessSettings(configManager, filters = {}) {
851056
851145
  if (!filters.includeHidden && isAgentHiddenSettingKey(setting.key))
851057
851146
  return false;
851058
851147
  if (query2) {
851059
- const text = [setting.key, setting.description, setting.type, ...setting.enumValues ?? []].join(`
851060
- `).toLowerCase();
851061
- if (!text.includes(query2))
851148
+ if (!settingMatchesSearch(setting, query2))
851062
851149
  return false;
851063
851150
  }
851064
851151
  return true;
851065
851152
  }).map((setting) => describeHarnessSetting(configManager, setting)).slice(0, limit3);
851066
851153
  }
851067
- function getHarnessSetting(configManager, key) {
851154
+ function getHarnessSetting(configManager, key, lookup) {
851068
851155
  const setting = findSetting(configManager, key);
851069
- return setting ? describeHarnessSetting(configManager, setting) : null;
851156
+ return setting ? describeHarnessSetting(configManager, setting, { lookup }) : null;
851157
+ }
851158
+ function resolveHarnessSetting(configManager, args2) {
851159
+ const lookup = settingLookupFromArgs(args2);
851160
+ if (!lookup)
851161
+ return null;
851162
+ const exact = findSetting(configManager, lookup.input);
851163
+ if (exact) {
851164
+ const resolvedLookup = { ...lookup, resolvedBy: "key" };
851165
+ return {
851166
+ status: "found",
851167
+ setting: describeHarnessSetting(configManager, exact, { lookup: resolvedLookup }),
851168
+ lookup: resolvedLookup
851169
+ };
851170
+ }
851171
+ const inputLower = lookup.input.toLowerCase();
851172
+ const schema3 = configManager.getSchema();
851173
+ const caseInsensitiveMatches = schema3.filter((setting) => setting.key.toLowerCase() === inputLower);
851174
+ if (caseInsensitiveMatches.length === 1) {
851175
+ const resolvedLookup = { ...lookup, resolvedBy: "case-insensitive-key" };
851176
+ return {
851177
+ status: "found",
851178
+ setting: describeHarnessSetting(configManager, caseInsensitiveMatches[0], { lookup: resolvedLookup }),
851179
+ lookup: resolvedLookup
851180
+ };
851181
+ }
851182
+ if (caseInsensitiveMatches.length > 1) {
851183
+ return {
851184
+ status: "ambiguous",
851185
+ input: lookup.input,
851186
+ candidates: caseInsensitiveMatches.map(settingCandidate).slice(0, 8)
851187
+ };
851188
+ }
851189
+ const category = args2.category?.trim();
851190
+ const prefix = args2.prefix?.trim();
851191
+ const searchMatches = schema3.filter((setting) => {
851192
+ if (category && setting.key.split(".")[0] !== category)
851193
+ return false;
851194
+ if (prefix && !setting.key.startsWith(prefix))
851195
+ return false;
851196
+ if (!args2.includeHidden && isAgentHiddenSettingKey(setting.key))
851197
+ return false;
851198
+ return settingMatchesSearch(setting, inputLower);
851199
+ });
851200
+ if (searchMatches.length === 1) {
851201
+ const resolvedLookup = { ...lookup, resolvedBy: "search" };
851202
+ return {
851203
+ status: "found",
851204
+ setting: describeHarnessSetting(configManager, searchMatches[0], { lookup: resolvedLookup }),
851205
+ lookup: resolvedLookup
851206
+ };
851207
+ }
851208
+ if (searchMatches.length > 1) {
851209
+ return {
851210
+ status: "ambiguous",
851211
+ input: lookup.input,
851212
+ candidates: searchMatches.map(settingCandidate).slice(0, 8)
851213
+ };
851214
+ }
851215
+ return null;
851070
851216
  }
851071
851217
  function coerceBoolean(value) {
851072
851218
  if (typeof value === "boolean")
@@ -879638,8 +879784,8 @@ function blockedConnectedHostCapabilities() {
879638
879784
  }
879639
879785
  function settingsPolicySummary() {
879640
879786
  return {
879641
- discovery: 'Use mode:"settings" for the setting catalog and mode:"get_setting" for one key. Hidden/scriptable settings require includeHidden:true.',
879642
- mutation: 'Use mode:"set_setting" or mode:"reset_setting" with confirm:true and explicitUserRequest.',
879787
+ discovery: 'Use mode:"settings" for the setting catalog and mode:"get_setting" with key, target, or query for one setting. Hidden/scriptable settings require includeHidden:true unless the exact key is supplied.',
879788
+ mutation: 'Use mode:"set_setting" or mode:"reset_setting" with key, target, or query plus confirm:true and explicitUserRequest; ambiguous setting lookups are refused.',
879643
879789
  secretHandling: "Raw secret values are persisted through the secret manager; config receives only a secret reference and tool output is redacted.",
879644
879790
  writablePolicy: "Each setting descriptor includes writable, visibleInWorkspace, and lockReason when applicable.",
879645
879791
  readOnlyHostOwnedPrefixes: ["service.*", "controlPlane.*", "httpListener.*", "web.*", "danger.daemon.*", "danger.httpListener.*"]
@@ -879932,10 +880078,6 @@ function requireKeybindingsManager2(context) {
879932
880078
  function isKeyAction2(action2) {
879933
880079
  return Object.hasOwn(ACTION_DESCRIPTIONS, action2);
879934
880080
  }
879935
- function actionFromArgs(args2) {
879936
- const action2 = readString52(args2.actionId || args2.key || args2.query);
879937
- return action2 && isKeyAction2(action2) ? action2 : null;
879938
- }
879939
880081
  function readBoolean15(value) {
879940
880082
  if (typeof value === "boolean")
879941
880083
  return value;
@@ -880024,23 +880166,70 @@ function describeCombo(manager5, combo) {
880024
880166
  label: manager5.formatCombo(combo)
880025
880167
  };
880026
880168
  }
880027
- function bindingMatches(entry, query2) {
880028
- if (!query2)
880029
- return true;
880030
- const haystack = [
880169
+ function keybindingLookupFromArgs(args2) {
880170
+ const actionId = readString52(args2.actionId);
880171
+ if (actionId)
880172
+ return { source: "actionId", input: actionId };
880173
+ const target = readString52(args2.target);
880174
+ if (target)
880175
+ return { source: "target", input: target };
880176
+ const key = readString52(args2.key);
880177
+ if (key)
880178
+ return { source: "key", input: key };
880179
+ const query2 = readString52(args2.query);
880180
+ if (query2)
880181
+ return { source: "query", input: query2 };
880182
+ return null;
880183
+ }
880184
+ function bindingSearchText(manager5, entry) {
880185
+ return [
880031
880186
  entry.action,
880032
880187
  entry.description,
880033
- ...entry.combos.map((combo) => comboFingerprint(combo))
880188
+ ...entry.combos.map((combo) => comboFingerprint(combo)),
880189
+ ...entry.combos.map((combo) => manager5.formatCombo(combo))
880034
880190
  ].join(`
880035
880191
  `).toLowerCase();
880036
- return haystack.includes(query2.toLowerCase());
880037
880192
  }
880038
- function describeBinding(manager5, action2, combos) {
880193
+ function bindingCandidate(manager5, entry) {
880194
+ return {
880195
+ action: entry.action,
880196
+ description: entry.description,
880197
+ labels: entry.combos.map((combo) => manager5.formatCombo(combo))
880198
+ };
880199
+ }
880200
+ function bindingMatches(manager5, entry, query2) {
880201
+ if (!query2)
880202
+ return true;
880203
+ return bindingSearchText(manager5, entry).includes(query2.toLowerCase());
880204
+ }
880205
+ function resolveHarnessKeybinding(context, args2) {
880206
+ const manager5 = requireKeybindingsManager2(context);
880207
+ const lookup = keybindingLookupFromArgs(args2);
880208
+ if (!lookup)
880209
+ return null;
880210
+ const entries = manager5.getAll();
880211
+ if (isKeyAction2(lookup.input))
880212
+ return { status: "found", action: lookup.input, lookup: { ...lookup, resolvedBy: "action" } };
880213
+ const inputLower = lookup.input.toLowerCase();
880214
+ const ciActions = entries.filter((entry) => entry.action.toLowerCase() === inputLower);
880215
+ if (ciActions.length === 1)
880216
+ return { status: "found", action: ciActions[0].action, lookup: { ...lookup, resolvedBy: "case-insensitive-action" } };
880217
+ if (ciActions.length > 1)
880218
+ return { status: "ambiguous", input: lookup.input, candidates: ciActions.map((entry) => bindingCandidate(manager5, entry)).slice(0, 8) };
880219
+ const matches = entries.filter((entry) => bindingMatches(manager5, entry, lookup.input));
880220
+ if (matches.length === 1)
880221
+ return { status: "found", action: matches[0].action, lookup: { ...lookup, resolvedBy: "search" } };
880222
+ if (matches.length > 1)
880223
+ return { status: "ambiguous", input: lookup.input, candidates: matches.map((entry) => bindingCandidate(manager5, entry)).slice(0, 8) };
880224
+ return null;
880225
+ }
880226
+ function describeBinding(manager5, action2, combos, lookup) {
880039
880227
  const defaults3 = DEFAULT_KEYBINDINGS[action2];
880040
880228
  const customized = !combosEqual(combos, defaults3);
880041
880229
  return {
880042
880230
  action: action2,
880043
880231
  description: ACTION_DESCRIPTIONS[action2],
880232
+ ...lookup ? { lookup } : {},
880044
880233
  bindings: combos.map((combo) => describeCombo(manager5, combo)),
880045
880234
  labels: combos.map((combo) => manager5.formatCombo(combo)),
880046
880235
  defaultBindings: defaults3.map((combo) => describeCombo(manager5, combo)),
@@ -880085,7 +880274,7 @@ ${shortcut.description}`.toLowerCase().includes(query2)).slice(0, readLimit7(arg
880085
880274
  function listHarnessKeybindings(context, args2) {
880086
880275
  const manager5 = requireKeybindingsManager2(context);
880087
880276
  const query2 = readString52(args2.query);
880088
- const entries = manager5.getAll().filter((entry) => bindingMatches(entry, query2)).slice(0, readLimit7(args2.limit, 200)).map((entry) => describeBinding(manager5, entry.action, entry.combos));
880277
+ const entries = manager5.getAll().filter((entry) => bindingMatches(manager5, entry, query2)).slice(0, readLimit7(args2.limit, 200)).map((entry) => describeBinding(manager5, entry.action, entry.combos));
880089
880278
  return {
880090
880279
  configPath: manager5.getConfigPath(),
880091
880280
  keybindings: entries,
@@ -880096,46 +880285,54 @@ function listHarnessKeybindings(context, args2) {
880096
880285
  }
880097
880286
  function describeHarnessKeybinding(context, args2) {
880098
880287
  const manager5 = requireKeybindingsManager2(context);
880099
- const action2 = actionFromArgs(args2);
880100
- if (!action2)
880288
+ const resolved = resolveHarnessKeybinding(context, args2);
880289
+ if (resolved?.status === "ambiguous")
880290
+ return { status: "ambiguous", input: resolved.input, candidates: resolved.candidates };
880291
+ if (!resolved)
880101
880292
  return null;
880102
- const entry = manager5.getAll().find((candidate) => candidate.action === action2);
880293
+ const entry = manager5.getAll().find((candidate) => candidate.action === resolved.action);
880103
880294
  return entry ? {
880104
880295
  configPath: manager5.getConfigPath(),
880105
- ...describeBinding(manager5, entry.action, entry.combos)
880296
+ ...describeBinding(manager5, entry.action, entry.combos, resolved.lookup)
880106
880297
  } : null;
880107
880298
  }
880108
880299
  function setHarnessKeybinding(context, args2) {
880109
880300
  const manager5 = requireKeybindingsManager2(context);
880110
- const action2 = actionFromArgs(args2);
880111
- if (!action2)
880112
- throw new Error("set_keybinding requires a valid keybinding action id.");
880301
+ const resolved = resolveHarnessKeybinding(context, args2);
880302
+ if (resolved?.status === "ambiguous")
880303
+ throw new Error(`Ambiguous keybinding action ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
880304
+ if (!resolved)
880305
+ throw new Error("set_keybinding requires a valid keybinding action id, target, or query.");
880113
880306
  const combos = combosFromArgs(args2);
880114
880307
  const configPath = manager5.getConfigPath();
880115
880308
  const overrides = readOverrideFile(configPath);
880116
- overrides[action2] = combos.length === 1 ? combos[0] : combos;
880309
+ overrides[resolved.action] = combos.length === 1 ? combos[0] : combos;
880117
880310
  writeOverrideFile(configPath, overrides);
880118
880311
  manager5.loadFromDisk();
880119
880312
  return {
880120
880313
  status: "updated",
880121
880314
  configPath,
880122
- keybinding: describeHarnessKeybinding(context, { actionId: action2 })
880315
+ keybinding: describeHarnessKeybinding(context, { actionId: resolved.action }),
880316
+ lookup: resolved.lookup
880123
880317
  };
880124
880318
  }
880125
880319
  function resetHarnessKeybinding(context, args2) {
880126
880320
  const manager5 = requireKeybindingsManager2(context);
880127
- const action2 = actionFromArgs(args2);
880128
- if (!action2)
880129
- throw new Error("reset_keybinding requires a valid keybinding action id.");
880321
+ const resolved = resolveHarnessKeybinding(context, args2);
880322
+ if (resolved?.status === "ambiguous")
880323
+ throw new Error(`Ambiguous keybinding action ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
880324
+ if (!resolved)
880325
+ throw new Error("reset_keybinding requires a valid keybinding action id, target, or query.");
880130
880326
  const configPath = manager5.getConfigPath();
880131
880327
  const overrides = readOverrideFile(configPath);
880132
- delete overrides[action2];
880328
+ delete overrides[resolved.action];
880133
880329
  writeOverrideFile(configPath, overrides);
880134
880330
  manager5.loadFromDisk();
880135
880331
  return {
880136
880332
  status: "reset",
880137
880333
  configPath,
880138
- keybinding: describeHarnessKeybinding(context, { actionId: action2 })
880334
+ keybinding: describeHarnessKeybinding(context, { actionId: resolved.action }),
880335
+ lookup: resolved.lookup
880139
880336
  };
880140
880337
  }
880141
880338
 
@@ -880161,10 +880358,69 @@ function panelMatches(panel, query2) {
880161
880358
  panel.category,
880162
880359
  panel.description,
880163
880360
  panel.workspaceRoute
880164
- ].map((value) => String(value ?? "")).join(`
880361
+ ].map((value) => typeof value === "object" ? JSON.stringify(value) : String(value ?? "")).join(`
880165
880362
  `).toLowerCase().includes(query2.toLowerCase());
880166
880363
  }
880167
- function describePanelRegistration(context, registration) {
880364
+ function panelLookupFromArgs(args2) {
880365
+ const panelId = readString53(args2.panelId);
880366
+ if (panelId)
880367
+ return { source: "panelId", input: panelId };
880368
+ const target = readString53(args2.target);
880369
+ if (target)
880370
+ return { source: "target", input: target };
880371
+ const query2 = readString53(args2.query);
880372
+ if (query2)
880373
+ return { source: "query", input: query2 };
880374
+ return null;
880375
+ }
880376
+ function panelCandidate(registration) {
880377
+ return {
880378
+ id: registration.id,
880379
+ name: registration.name,
880380
+ category: registration.category,
880381
+ description: registration.description,
880382
+ workspaceRoute: {
880383
+ categoryId: agentWorkspaceCategoryForPanel(registration.id),
880384
+ command: agentWorkspaceCommandForPanel(registration.id)
880385
+ }
880386
+ };
880387
+ }
880388
+ function resolveHarnessPanel(context, args2) {
880389
+ const manager5 = panelManager(context);
880390
+ const lookup = panelLookupFromArgs(args2);
880391
+ if (!manager5 || !lookup)
880392
+ return null;
880393
+ const registrations = manager5.getRegisteredTypes();
880394
+ const exactId = registrations.find((panel) => panel.id === lookup.input);
880395
+ if (exactId)
880396
+ return { status: "found", registration: exactId, lookup: { ...lookup, resolvedBy: "id" } };
880397
+ const inputLower = lookup.input.toLowerCase();
880398
+ const exactName = registrations.find((panel) => panel.name === lookup.input);
880399
+ if (exactName)
880400
+ return { status: "found", registration: exactName, lookup: { ...lookup, resolvedBy: "name" } };
880401
+ const ciId = registrations.filter((panel) => panel.id.toLowerCase() === inputLower);
880402
+ if (ciId.length === 1)
880403
+ return { status: "found", registration: ciId[0], lookup: { ...lookup, resolvedBy: "case-insensitive-id" } };
880404
+ if (ciId.length > 1)
880405
+ return { status: "ambiguous", input: lookup.input, candidates: ciId.map(panelCandidate).slice(0, 8) };
880406
+ const ciName = registrations.filter((panel) => panel.name.toLowerCase() === inputLower);
880407
+ if (ciName.length === 1)
880408
+ return { status: "found", registration: ciName[0], lookup: { ...lookup, resolvedBy: "case-insensitive-name" } };
880409
+ if (ciName.length > 1)
880410
+ return { status: "ambiguous", input: lookup.input, candidates: ciName.map(panelCandidate).slice(0, 8) };
880411
+ const category = readString53(args2.category);
880412
+ const search2 = registrations.filter((registration) => {
880413
+ if (category && registration.category !== category)
880414
+ return false;
880415
+ return panelMatches(panelCandidate(registration), lookup.input);
880416
+ });
880417
+ if (search2.length === 1)
880418
+ return { status: "found", registration: search2[0], lookup: { ...lookup, resolvedBy: "search" } };
880419
+ if (search2.length > 1)
880420
+ return { status: "ambiguous", input: lookup.input, candidates: search2.map(panelCandidate).slice(0, 8) };
880421
+ return null;
880422
+ }
880423
+ function describePanelRegistration(context, registration, lookup) {
880168
880424
  const manager5 = panelManager(context);
880169
880425
  const openPanel = manager5?.getPanel(registration.id) ?? null;
880170
880426
  const pane = manager5?.getPaneOf(registration.id) ?? null;
@@ -880175,6 +880431,7 @@ function describePanelRegistration(context, registration) {
880175
880431
  icon: registration.icon,
880176
880432
  category: registration.category,
880177
880433
  description: registration.description,
880434
+ ...lookup ? { lookup } : {},
880178
880435
  preload: registration.preload === true,
880179
880436
  open: openPanel !== null,
880180
880437
  pane,
@@ -880204,24 +880461,27 @@ function listHarnessPanels(context, args2) {
880204
880461
  return manager5.getRegisteredTypes().map((registration) => describePanelRegistration(context, registration)).filter((panel) => !category || panel.category === category).filter((panel) => panelMatches(panel, query2)).sort((a4, b3) => String(a4.id).localeCompare(String(b3.id))).slice(0, limit3);
880205
880462
  }
880206
880463
  function describeHarnessPanel(context, args2) {
880207
- const manager5 = panelManager(context);
880208
- if (!manager5)
880209
- return null;
880210
- const panelId = readString53(args2.panelId || args2.query);
880211
- if (!panelId)
880212
- return null;
880213
- const registration = manager5.getRegisteredTypes().find((panel) => panel.id === panelId || panel.name.toLowerCase() === panelId.toLowerCase());
880214
- return registration ? describePanelRegistration(context, registration) : null;
880464
+ const resolved = resolveHarnessPanel(context, args2);
880465
+ if (resolved?.status === "found")
880466
+ return describePanelRegistration(context, resolved.registration, resolved.lookup);
880467
+ if (resolved?.status === "ambiguous") {
880468
+ return { status: "ambiguous", input: resolved.input, candidates: resolved.candidates };
880469
+ }
880470
+ return null;
880215
880471
  }
880216
880472
  function openHarnessPanel(context, args2) {
880217
- const panel = describeHarnessPanel(context, args2);
880218
- if (!panel) {
880473
+ const resolved = resolveHarnessPanel(context, args2);
880474
+ if (resolved?.status === "ambiguous") {
880475
+ return { status: "ambiguous_panel", input: resolved.input, candidates: resolved.candidates };
880476
+ }
880477
+ if (!resolved) {
880219
880478
  return {
880220
880479
  status: "unknown_panel",
880221
- panelId: readString53(args2.panelId || args2.query) || "<missing>",
880480
+ panelId: readString53(args2.panelId || args2.target || args2.query) || "<missing>",
880222
880481
  availablePanels: listHarnessPanels(context, { limit: 50 }).map((entry) => entry.id)
880223
880482
  };
880224
880483
  }
880484
+ const panel = describePanelRegistration(context, resolved.registration, resolved.lookup);
880225
880485
  const requestedPane = readString53(args2.pane);
880226
880486
  const pane = requestedPane === "bottom" || requestedPane === "top" ? requestedPane : undefined;
880227
880487
  if (!context.showPanel) {
@@ -880839,7 +881099,7 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
880839
881099
  },
880840
881100
  query: {
880841
881101
  type: "string",
880842
- description: "Search text for command, workspace action, setting, tool, or UI surface catalogs; also a slash-command lookup for mode command."
881102
+ description: "Search text for command, panel, UI surface, keybinding, workspace action, setting, or tool catalogs; also slash-command, setting, panel, UI surface, or keybinding lookup for single-item modes."
880843
881103
  },
880844
881104
  command: {
880845
881105
  type: "string",
@@ -880864,15 +881124,15 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
880864
881124
  },
880865
881125
  surfaceId: {
880866
881126
  type: "string",
880867
- description: "UI surface id for ui_surface or open_ui_surface modes."
881127
+ description: "UI surface id for ui_surface or open_ui_surface modes. target or query can also look up one UI surface when the exact id is not known."
880868
881128
  },
880869
881129
  panelId: {
880870
881130
  type: "string",
880871
- description: "Built-in panel id for panel or open_panel modes."
881131
+ description: "Built-in panel id for panel or open_panel modes. target or query can also look up one panel when the exact id is not known."
880872
881132
  },
880873
881133
  actionId: {
880874
881134
  type: "string",
880875
- description: "Agent workspace action id for workspace_action or run_workspace_action, or keybinding action id for keybinding/set_keybinding/reset_keybinding."
881135
+ description: "Agent workspace action id for workspace_action or run_workspace_action, or keybinding action id for keybinding/set_keybinding/reset_keybinding. target or query can also look up one keybinding action."
880876
881136
  },
880877
881137
  fields: {
880878
881138
  type: "object",
@@ -880894,7 +881154,7 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
880894
881154
  },
880895
881155
  key: {
880896
881156
  type: "string",
880897
- description: "Agent setting key for get_setting, set_setting, or reset_setting."
881157
+ description: "Agent setting key for get_setting, set_setting, or reset_setting. target or query can also look up one setting when the exact key is not known."
880898
881158
  },
880899
881159
  value: {
880900
881160
  anyOf: [
@@ -880906,7 +881166,7 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
880906
881166
  },
880907
881167
  target: {
880908
881168
  type: "string",
880909
- description: "Optional lookup target, such as a model-picker target, workspace action id/search text, slash command root or invocation, settings key, model tool name, or connected-host capability id."
881169
+ description: "Optional lookup target, such as a model-picker target, 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."
880910
881170
  },
880911
881171
  capabilityId: {
880912
881172
  type: "string",
@@ -881656,13 +881916,64 @@ function surfaceMatches(surface, query2) {
881656
881916
  ].map((value) => String(value ?? "")).join(`
881657
881917
  `).toLowerCase().includes(query2.toLowerCase());
881658
881918
  }
881659
- function describeSurface(context, surface) {
881919
+ function surfaceLookupFromArgs(args2) {
881920
+ const surfaceId = readString57(args2.surfaceId);
881921
+ if (surfaceId)
881922
+ return { source: "surfaceId", input: surfaceId };
881923
+ const query2 = readString57(args2.query);
881924
+ if (query2)
881925
+ return { source: "query", input: query2 };
881926
+ const target = readString57(args2.target);
881927
+ if (target)
881928
+ return { source: "target", input: target };
881929
+ return null;
881930
+ }
881931
+ function surfaceCandidate(surface) {
881660
881932
  return {
881661
881933
  id: surface.id,
881662
881934
  label: surface.label,
881663
881935
  kind: surface.kind,
881664
881936
  summary: surface.summary,
881665
881937
  command: surface.command,
881938
+ preferredModelRoute: surface.preferredModelRoute
881939
+ };
881940
+ }
881941
+ function resolveHarnessUiSurface(args2) {
881942
+ const lookup = surfaceLookupFromArgs(args2);
881943
+ if (!lookup)
881944
+ return null;
881945
+ const exactId = UI_SURFACES.find((surface) => surface.id === lookup.input);
881946
+ if (exactId)
881947
+ return { status: "found", surface: exactId, lookup: { ...lookup, resolvedBy: "id" } };
881948
+ const exactLabel = UI_SURFACES.find((surface) => surface.label === lookup.input);
881949
+ if (exactLabel)
881950
+ return { status: "found", surface: exactLabel, lookup: { ...lookup, resolvedBy: "label" } };
881951
+ const inputLower = lookup.input.toLowerCase();
881952
+ const ciId = UI_SURFACES.filter((surface) => surface.id.toLowerCase() === inputLower);
881953
+ if (ciId.length === 1)
881954
+ return { status: "found", surface: ciId[0], lookup: { ...lookup, resolvedBy: "case-insensitive-id" } };
881955
+ if (ciId.length > 1)
881956
+ return { status: "ambiguous", input: lookup.input, candidates: ciId.map(surfaceCandidate).slice(0, 8) };
881957
+ const ciLabel = UI_SURFACES.filter((surface) => surface.label.toLowerCase() === inputLower);
881958
+ if (ciLabel.length === 1)
881959
+ return { status: "found", surface: ciLabel[0], lookup: { ...lookup, resolvedBy: "case-insensitive-label" } };
881960
+ if (ciLabel.length > 1)
881961
+ return { status: "ambiguous", input: lookup.input, candidates: ciLabel.map(surfaceCandidate).slice(0, 8) };
881962
+ const search2 = UI_SURFACES.filter((surface) => surfaceMatches(surfaceCandidate(surface), lookup.input));
881963
+ if (search2.length === 1)
881964
+ return { status: "found", surface: search2[0], lookup: { ...lookup, resolvedBy: "search" } };
881965
+ if (search2.length > 1)
881966
+ return { status: "ambiguous", input: lookup.input, candidates: search2.map(surfaceCandidate).slice(0, 8) };
881967
+ return null;
881968
+ }
881969
+ function describeSurface(context, surface, lookup) {
881970
+ return {
881971
+ id: surface.id,
881972
+ label: surface.label,
881973
+ kind: surface.kind,
881974
+ summary: surface.summary,
881975
+ command: surface.command,
881976
+ ...lookup ? { lookup } : {},
881666
881977
  preferredModelRoute: surface.preferredModelRoute,
881667
881978
  parameters: surface.parameters ?? [],
881668
881979
  available: surface.available(context),
@@ -881682,26 +881993,30 @@ function listHarnessUiSurfaces(context, args2) {
881682
881993
  return UI_SURFACES.map((surface) => describeSurface(context, surface)).filter((surface) => surfaceMatches(surface, query2)).slice(0, limit3);
881683
881994
  }
881684
881995
  function describeHarnessUiSurface(context, args2) {
881685
- const surfaceId = readString57(args2.surfaceId || args2.query);
881686
- if (!surfaceId)
881687
- return null;
881688
- const surface = UI_SURFACES.find((entry) => entry.id === surfaceId || entry.label.toLowerCase() === surfaceId.toLowerCase());
881689
- return surface ? describeSurface(context, surface) : null;
881996
+ const resolved = resolveHarnessUiSurface(args2);
881997
+ if (resolved?.status === "found")
881998
+ return describeSurface(context, resolved.surface, resolved.lookup);
881999
+ if (resolved?.status === "ambiguous") {
882000
+ return { status: "ambiguous", input: resolved.input, candidates: resolved.candidates };
882001
+ }
882002
+ return null;
881690
882003
  }
881691
882004
  async function openHarnessUiSurface(context, args2) {
881692
- const surfaceId = readString57(args2.surfaceId || args2.query);
881693
- const surface = UI_SURFACES.find((entry) => entry.id === surfaceId || entry.label.toLowerCase() === surfaceId.toLowerCase());
881694
- if (!surface) {
882005
+ const resolved = resolveHarnessUiSurface(args2);
882006
+ if (resolved?.status === "ambiguous") {
882007
+ return { status: "ambiguous_ui_surface", input: resolved.input, candidates: resolved.candidates };
882008
+ }
882009
+ if (!resolved) {
881695
882010
  return {
881696
882011
  status: "unknown_ui_surface",
881697
- surfaceId: surfaceId || "<missing>",
882012
+ surfaceId: readString57(args2.surfaceId || args2.query || args2.target) || "<missing>",
881698
882013
  availableSurfaces: UI_SURFACES.map((entry) => entry.id)
881699
882014
  };
881700
882015
  }
881701
- const routed = await surface.open(context, args2);
882016
+ const routed = await resolved.surface.open(context, args2);
881702
882017
  return {
881703
882018
  ...routed,
881704
- descriptor: describeSurface(context, surface)
882019
+ descriptor: describeSurface(context, resolved.surface, resolved.lookup)
881705
882020
  };
881706
882021
  }
881707
882022
 
@@ -881712,6 +882027,16 @@ function isMode(value) {
881712
882027
  function readString58(value) {
881713
882028
  return typeof value === "string" ? value.trim() : "";
881714
882029
  }
882030
+ function settingLookupArgs(args2) {
882031
+ return {
882032
+ key: readString58(args2.key) || undefined,
882033
+ target: readString58(args2.target) || undefined,
882034
+ query: readString58(args2.query) || undefined,
882035
+ category: readString58(args2.category) || undefined,
882036
+ prefix: readString58(args2.prefix) || undefined,
882037
+ includeHidden: args2.includeHidden === true
882038
+ };
882039
+ }
881715
882040
  function readLimit11(value, fallback) {
881716
882041
  const parsed = typeof value === "string" && value.trim() ? Number(value) : value;
881717
882042
  if (typeof parsed !== "number" || !Number.isFinite(parsed))
@@ -882151,12 +882476,12 @@ function createAgentHarnessTool(deps) {
882151
882476
  tools: deps.toolRegistry.getToolDefinitions().length,
882152
882477
  modelAccess: {
882153
882478
  cliCommands: 'Use mode:"cli_commands" and mode:"cli_command" to inspect package CLI mirrors and their preferred in-process model routes. CLI modes are discovery-only.',
882154
- panels: 'Use mode:"panels" and mode:"panel" to inspect built-in panel catalog/open state; use mode:"open_panel" with confirm:true plus explicitUserRequest to route a visible panel/workspace change.',
882155
- uiSurfaces: 'Use mode:"ui_surfaces" and mode:"ui_surface" to inspect modal/overlay/picker/workspace surfaces; use mode:"open_ui_surface" with confirm:true plus explicitUserRequest to route visible UI navigation.',
882156
- shortcuts: 'Use mode:"shortcuts" to inspect fixed shortcuts plus configurable keybindings. Use mode:"set_keybinding" and mode:"reset_keybinding" with confirm:true plus explicitUserRequest to edit the same config file the user edits.',
882479
+ panels: 'Use mode:"panels" to list and mode:"panel" with panelId, target, or query to inspect built-in panel catalog/open state; use mode:"open_panel" with confirm:true plus explicitUserRequest to route a visible panel/workspace change.',
882480
+ 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.',
882481
+ shortcuts: 'Use mode:"shortcuts" to inspect fixed shortcuts plus configurable keybindings. Use mode:"keybinding" with actionId, target, key, or query; use mode:"set_keybinding" and mode:"reset_keybinding" with confirm:true plus explicitUserRequest to edit the same config file the user edits.',
882157
882482
  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.',
882158
882483
  workspace: 'Use mode:"workspace_actions" to list and mode:"workspace_action" with actionId, command, target, or query for one action and editor schema; set includeParameters:true on workspace_actions to inline editor schemas.',
882159
- settings: 'Use mode:"settings", mode:"get_setting", mode:"set_setting", and mode:"reset_setting".',
882484
+ 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.',
882160
882485
  tools: 'Use mode:"tools" to list first-class model tools, or mode:"tool" with toolName, target, or query to inspect one schema.',
882161
882486
  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.',
882162
882487
  connectedHostStatus: 'Use mode:"connected_host_status" for live read-only host reachability, SDK compatibility, token posture, and Agent Knowledge route readiness.'
@@ -882189,7 +882514,7 @@ function createAgentHarnessTool(deps) {
882189
882514
  }
882190
882515
  if (args2.mode === "panel") {
882191
882516
  const panel = describeHarnessPanel(deps.commandContext, args2);
882192
- return panel ? output7(panel) : error52(`Unknown panel ${readString58(args2.panelId || args2.query) || "<missing>"}.`);
882517
+ return panel ? output7(panel) : error52(`Unknown panel ${readString58(args2.panelId || args2.target || args2.query) || "<missing>"}.`);
882193
882518
  }
882194
882519
  if (args2.mode === "open_panel") {
882195
882520
  const confirmationError2 = requireConfirmedAction(args2, "Panel routing");
@@ -882203,7 +882528,7 @@ function createAgentHarnessTool(deps) {
882203
882528
  }
882204
882529
  if (args2.mode === "ui_surface") {
882205
882530
  const surface = describeHarnessUiSurface(deps.commandContext, args2);
882206
- return surface ? output7(surface) : error52(`Unknown UI surface ${readString58(args2.surfaceId || args2.query) || "<missing>"}.`);
882531
+ return surface ? output7(surface) : error52(`Unknown UI surface ${readString58(args2.surfaceId || args2.query || args2.target) || "<missing>"}.`);
882207
882532
  }
882208
882533
  if (args2.mode === "open_ui_surface") {
882209
882534
  const confirmationError2 = requireConfirmedAction(args2, "UI surface routing");
@@ -882217,7 +882542,7 @@ function createAgentHarnessTool(deps) {
882217
882542
  return output7(listHarnessKeybindings(deps.commandContext, args2));
882218
882543
  if (args2.mode === "keybinding") {
882219
882544
  const binding = describeHarnessKeybinding(deps.commandContext, args2);
882220
- return binding ? output7(binding) : error52(`Unknown keybinding action ${readString58(args2.actionId || args2.key || args2.query) || "<missing>"}.`);
882545
+ return binding ? output7(binding) : error52(`Unknown keybinding action ${readString58(args2.actionId || args2.target || args2.key || args2.query) || "<missing>"}.`);
882221
882546
  }
882222
882547
  if (args2.mode === "set_keybinding") {
882223
882548
  const confirmationError2 = requireConfirmedAction(args2, "Keybinding mutation");
@@ -882253,9 +882578,13 @@ function createAgentHarnessTool(deps) {
882253
882578
  return output7({ settings, returned: settings.length, policy: settingsPolicySummary() });
882254
882579
  }
882255
882580
  if (args2.mode === "get_setting") {
882256
- const key = readString58(args2.key);
882257
- const setting = getHarnessSetting(deps.commandContext.platform.configManager, key);
882258
- return setting ? output7(setting) : error52(`Unknown setting ${key || "<missing>"}.`);
882581
+ const setting = resolveHarnessSetting(deps.commandContext.platform.configManager, settingLookupArgs(args2));
882582
+ if (setting?.status === "found")
882583
+ return output7(setting.setting);
882584
+ if (setting?.status === "ambiguous") {
882585
+ return error52(`Ambiguous setting ${setting.input}. Candidates: ${JSON.stringify(setting.candidates)}`);
882586
+ }
882587
+ return error52(`Unknown setting ${readString58(args2.key || args2.target || args2.query) || "<missing>"}. Use mode:"settings" to inspect available settings.`);
882259
882588
  }
882260
882589
  if (args2.mode === "set_setting") {
882261
882590
  const confirmationError2 = requireConfirmedAction(args2, "Setting mutation");
@@ -882263,17 +882592,29 @@ function createAgentHarnessTool(deps) {
882263
882592
  return error52(confirmationError2);
882264
882593
  if (args2.value === undefined)
882265
882594
  return error52("set_setting requires value.");
882266
- const key = readString58(args2.key);
882267
- const result2 = await setHarnessSetting(deps.commandContext.platform.configManager, deps.commandContext.platform.secretsManager, key, args2.value);
882268
- return output7(result2);
882595
+ const setting = resolveHarnessSetting(deps.commandContext.platform.configManager, settingLookupArgs(args2));
882596
+ if (setting?.status === "ambiguous") {
882597
+ return error52(`Ambiguous setting ${setting.input}. Candidates: ${JSON.stringify(setting.candidates)}`);
882598
+ }
882599
+ if (setting?.status !== "found") {
882600
+ return error52(`Unknown setting ${readString58(args2.key || args2.target || args2.query) || "<missing>"}. Use mode:"settings" to inspect available settings.`);
882601
+ }
882602
+ const result2 = await setHarnessSetting(deps.commandContext.platform.configManager, deps.commandContext.platform.secretsManager, setting.setting.key, args2.value);
882603
+ return output7({ ...result2, lookup: setting.lookup });
882269
882604
  }
882270
882605
  if (args2.mode === "reset_setting") {
882271
882606
  const confirmationError2 = requireConfirmedAction(args2, "Setting reset");
882272
882607
  if (confirmationError2)
882273
882608
  return error52(confirmationError2);
882274
- const key = readString58(args2.key);
882275
- const result2 = await resetHarnessSetting(deps.commandContext.platform.configManager, deps.commandContext.platform.secretsManager, key);
882276
- return output7(result2);
882609
+ const setting = resolveHarnessSetting(deps.commandContext.platform.configManager, settingLookupArgs(args2));
882610
+ if (setting?.status === "ambiguous") {
882611
+ return error52(`Ambiguous setting ${setting.input}. Candidates: ${JSON.stringify(setting.candidates)}`);
882612
+ }
882613
+ if (setting?.status !== "found") {
882614
+ return error52(`Unknown setting ${readString58(args2.key || args2.target || args2.query) || "<missing>"}. Use mode:"settings" to inspect available settings.`);
882615
+ }
882616
+ const result2 = await resetHarnessSetting(deps.commandContext.platform.configManager, deps.commandContext.platform.secretsManager, setting.setting.key);
882617
+ return output7({ ...result2, lookup: setting.lookup });
882277
882618
  }
882278
882619
  if (args2.mode === "workspace" || args2.mode === "workspace_categories") {
882279
882620
  return output7({