@pellux/goodvibes-agent 1.0.18 → 1.0.20

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,23 +389257,6 @@ 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
- }
389277
389260
  function rowObject(columns, values2) {
389278
389261
  return Object.fromEntries(columns.map((column, index) => [column, values2[index]]));
389279
389262
  }
@@ -702611,9 +702594,6 @@ var init_ingest = __esm(() => {
702611
702594
  // node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/browser-history/index.js
702612
702595
  var init_browser_history = __esm(() => {
702613
702596
  init_ingest();
702614
- init_discover();
702615
- init_readers();
702616
- init_paths2();
702617
702597
  });
702618
702598
 
702619
702599
  // node_modules/graphql/jsutils/devAssert.mjs
@@ -720253,7 +720233,6 @@ var init_semantic = __esm(() => {
720253
720233
  init_llm();
720254
720234
  init_gap_repair();
720255
720235
  init_service4();
720256
- init_self_improvement();
720257
720236
  });
720258
720237
 
720259
720238
  // node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/home-graph/helpers.js
@@ -724222,40 +724201,8 @@ var init_map_view = __esm(() => {
724222
724201
  });
724223
724202
 
724224
724203
  // node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/home-graph/types.js
724225
- var HOME_GRAPH_NODE_KINDS, HOME_GRAPH_RELATIONS, HOME_GRAPH_CAPABILITIES;
724204
+ var HOME_GRAPH_CAPABILITIES;
724226
724205
  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
- ];
724259
724206
  HOME_GRAPH_CAPABILITIES = [
724260
724207
  "knowledge-space-isolation",
724261
724208
  "snapshot-sync",
@@ -725662,7 +725609,6 @@ var init_service5 = __esm(() => {
725662
725609
  var init_home_graph = __esm(() => {
725663
725610
  init_service5();
725664
725611
  init_extension();
725665
- init_types6();
725666
725612
  });
725667
725613
 
725668
725614
  // node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/store-refinement.js
@@ -727990,14 +727936,10 @@ var init_service6 = __esm(() => {
727990
727936
  var init_project_planning = __esm(() => {
727991
727937
  init_service6();
727992
727938
  init_helpers3();
727993
- init_readiness();
727994
727939
  });
727995
727940
 
727996
727941
  // node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/persistence.js
727997
- var init_persistence = __esm(() => {
727998
- init_store_schema();
727999
- init_store_load();
728000
- });
727942
+ var init_persistence = () => {};
728001
727943
 
728002
727944
  // node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/projections.js
728003
727945
  class KnowledgeProjectionService {
@@ -731505,21 +731447,21 @@ var init_service7 = __esm(() => {
731505
731447
  var exports_knowledge = {};
731506
731448
  __export(exports_knowledge, {
731507
731449
  withKnowledgeSpace: () => withKnowledgeSpace,
731508
- uniqKnowledgeValues: () => uniq2,
731509
- stabilizeKnowledgeText: () => stableText,
731510
- runKnowledgeSemanticSelfImprovement: () => runKnowledgeSemanticSelfImprovement,
731450
+ uniqKnowledgeValues: () => uniq3,
731451
+ stabilizeKnowledgeText: () => stableText2,
731452
+ runKnowledgeSemanticSelfImprovement: () => runKnowledgeSemanticSelfImprovement2,
731511
731453
  resolveProjectPlanningSpace: () => resolveProjectPlanningSpace,
731512
- resolveKnowledgeDbPathFromControlPlaneDir: () => resolveKnowledgeDbPathFromControlPlaneDir,
731454
+ resolveKnowledgeDbPathFromControlPlaneDir: () => resolveKnowledgeDbPathFromControlPlaneDir2,
731513
731455
  renderPacket: () => renderPacket,
731514
731456
  renderKnowledgeSchemaSql: () => renderKnowledgeSchemaSql,
731515
731457
  renderKnowledgeMap: () => renderKnowledgeMap,
731516
731458
  readKnowledgeSearchText: () => readKnowledgeSearchText,
731517
- readBrowserKnowledgeProfile: () => readBrowserKnowledgeProfile,
731459
+ readBrowserKnowledgeProfile: () => readBrowserKnowledgeProfile2,
731518
731460
  projectPlanningSourceId: () => projectPlanningSourceId,
731519
731461
  projectPlanningProjectIdFromPath: () => projectPlanningProjectIdFromPath,
731520
731462
  projectPlanningCanonicalUri: () => projectPlanningCanonicalUri,
731521
731463
  projectKnowledgeSpaceId: () => projectKnowledgeSpaceId,
731522
- parseKnowledgeJsonValue: () => parseJsonValue,
731464
+ parseKnowledgeJsonValue: () => parseJsonValue2,
731523
731465
  normalizeProjectId: () => normalizeProjectId,
731524
731466
  normalizeKnowledgeSpaceId: () => normalizeKnowledgeSpaceId,
731525
731467
  normalizeHomeAssistantInstallationId: () => normalizeHomeAssistantInstallationId,
@@ -731527,12 +731469,12 @@ __export(exports_knowledge, {
731527
731469
  materializeGeneratedKnowledgeProjection: () => materializeGeneratedKnowledgeProjection,
731528
731470
  looksLikeRawPdfPayload: () => looksLikeRawPdfPayload,
731529
731471
  looksBinaryLikeText: () => looksBinaryLikeText,
731530
- loadKnowledgeStoreSnapshot: () => loadKnowledgeStoreSnapshot,
731472
+ loadKnowledgeStoreSnapshot: () => loadKnowledgeStoreSnapshot2,
731531
731473
  listGeneratedKnowledgePages: () => listGeneratedKnowledgePages,
731532
- listBrowserKinds: () => listBrowserKinds,
731474
+ listBrowserKinds: () => listBrowserKinds2,
731533
731475
  knowledgeSpaceMetadata: () => knowledgeSpaceMetadata,
731534
731476
  knowledgePageSourceWeight: () => knowledgePageSourceWeight,
731535
- knowledgeNowMs: () => nowMs,
731477
+ knowledgeNowMs: () => nowMs2,
731536
731478
  knowledgeExtractionNeedsRefresh: () => knowledgeExtractionNeedsRefresh,
731537
731479
  isUsefulKnowledgePageSourceCandidate: () => isUsefulKnowledgePageSourceCandidate,
731538
731480
  isUsefulKnowledgePageSource: () => isUsefulKnowledgePageSource,
@@ -731552,12 +731494,12 @@ __export(exports_knowledge, {
731552
731494
  generatedKnowledgeSourceId: () => generatedKnowledgeSourceId,
731553
731495
  generatedKnowledgeCanonicalUri: () => generatedKnowledgeCanonicalUri,
731554
731496
  extractKnowledgeArtifact: () => extractKnowledgeArtifact,
731555
- evaluateProjectPlanningReadiness: () => evaluateProjectPlanningReadiness,
731556
- discoverBrowserKnowledgeProfiles: () => discoverBrowserKnowledgeProfiles,
731497
+ evaluateProjectPlanningReadiness: () => evaluateProjectPlanningReadiness2,
731498
+ discoverBrowserKnowledgeProfiles: () => discoverBrowserKnowledgeProfiles2,
731557
731499
  createWebKnowledgeGapRepairer: () => createWebKnowledgeGapRepairer,
731558
731500
  createProviderBackedKnowledgeSemanticLlm: () => createProviderBackedKnowledgeSemanticLlm,
731559
731501
  createMemoryApi: () => createMemoryApi,
731560
- createKnowledgeSchema: () => createSchema2,
731502
+ createKnowledgeSchema: () => createSchema3,
731561
731503
  createKnowledgeApi: () => createKnowledgeApi,
731562
731504
  createDefaultKnowledgeConnectorRegistry: () => createDefaultKnowledgeConnectorRegistry,
731563
731505
  compareKnowledgePageSources: () => compareKnowledgePageSources,
@@ -733995,7 +733937,7 @@ var init_delivery_manager = __esm(() => {
733995
733937
  });
733996
733938
 
733997
733939
  // node_modules/@pellux/goodvibes-sdk/dist/platform/automation/scheduler-capacity.js
733998
- function computeSchedulerCapacity(slotsTotal, runs, nowMs2 = Date.now()) {
733940
+ function computeSchedulerCapacity(slotsTotal, runs, nowMs3 = Date.now()) {
733999
733941
  let slotsInUse = 0;
734000
733942
  const queuedRuns = [];
734001
733943
  for (const run7 of runs) {
@@ -734005,7 +733947,7 @@ function computeSchedulerCapacity(slotsTotal, runs, nowMs2 = Date.now()) {
734005
733947
  queuedRuns.push(run7);
734006
733948
  }
734007
733949
  const queueDepth = queuedRuns.length;
734008
- const oldestQueuedAgeMs = queueDepth > 0 ? nowMs2 - Math.min(...queuedRuns.map((r5) => r5.queuedAt)) : null;
733950
+ const oldestQueuedAgeMs = queueDepth > 0 ? nowMs3 - Math.min(...queuedRuns.map((r5) => r5.queuedAt)) : null;
734009
733951
  return { slotsTotal, slotsInUse, queueDepth, oldestQueuedAgeMs };
734010
733952
  }
734011
733953
 
@@ -816566,7 +816508,7 @@ var createStyledCell = (char, overrides = {}) => ({
816566
816508
  // src/version.ts
816567
816509
  import { readFileSync } from "fs";
816568
816510
  import { join } from "path";
816569
- var _version = "1.0.18";
816511
+ var _version = "1.0.20";
816570
816512
  var _sdkVersion = "0.33.35";
816571
816513
  try {
816572
816514
  const pkg = JSON.parse(readFileSync(join(import.meta.dir, "..", "package.json"), "utf-8"));
@@ -839428,7 +839370,7 @@ var WORK_PLAN_STATUSES = [
839428
839370
  "failed",
839429
839371
  "cancelled"
839430
839372
  ];
839431
- function nowMs2() {
839373
+ function nowMs3() {
839432
839374
  return Date.now();
839433
839375
  }
839434
839376
  function isObject5(value) {
@@ -839534,7 +839476,7 @@ class WorkPlanStore {
839534
839476
  if (!normalizedTitle)
839535
839477
  throw new Error("Work plan item title is required.");
839536
839478
  const plan = this.readPlan();
839537
- const time4 = nowMs2();
839479
+ const time4 = nowMs3();
839538
839480
  const item = {
839539
839481
  id: createItemId(),
839540
839482
  title: normalizedTitle,
@@ -839558,7 +839500,7 @@ class WorkPlanStore {
839558
839500
  updateItem(idOrPrefix, patch2) {
839559
839501
  const plan = this.readPlan();
839560
839502
  const item = this.resolveItem(plan, idOrPrefix);
839561
- const time4 = nowMs2();
839503
+ const time4 = nowMs3();
839562
839504
  const nextStatus = patch2.status ?? item.status;
839563
839505
  const next = this.pruneItem({
839564
839506
  ...item,
@@ -839591,7 +839533,7 @@ class WorkPlanStore {
839591
839533
  removeItem(idOrPrefix) {
839592
839534
  const plan = this.readPlan();
839593
839535
  const item = this.resolveItem(plan, idOrPrefix);
839594
- const time4 = nowMs2();
839536
+ const time4 = nowMs3();
839595
839537
  const remaining = plan.items.filter((candidate) => candidate.id !== item.id);
839596
839538
  this.writePlan({
839597
839539
  ...plan,
@@ -839611,7 +839553,7 @@ class WorkPlanStore {
839611
839553
  ...plan,
839612
839554
  items: remaining,
839613
839555
  activeItemId: remaining[0]?.id,
839614
- updatedAt: nowMs2()
839556
+ updatedAt: nowMs3()
839615
839557
  });
839616
839558
  return removed;
839617
839559
  }
@@ -839650,7 +839592,7 @@ class WorkPlanStore {
839650
839592
  const parsed = JSON.parse(raw);
839651
839593
  if (!isObject5(parsed))
839652
839594
  return this.createEmptyPlan();
839653
- const time4 = nowMs2();
839595
+ const time4 = nowMs3();
839654
839596
  const createdAt = typeof parsed.createdAt === "number" ? parsed.createdAt : time4;
839655
839597
  const updatedAt = typeof parsed.updatedAt === "number" ? parsed.updatedAt : createdAt;
839656
839598
  const items = Array.isArray(parsed.items) ? parsed.items.map((item) => normalizeItem(item, createdAt)).filter((item) => item !== null) : [];
@@ -839669,7 +839611,7 @@ class WorkPlanStore {
839669
839611
  };
839670
839612
  }
839671
839613
  createEmptyPlan() {
839672
- const time4 = nowMs2();
839614
+ const time4 = nowMs3();
839673
839615
  return {
839674
839616
  id: createPlanId(this.options.projectId, this.options.projectRoot),
839675
839617
  projectId: this.options.projectId,
@@ -847775,13 +847717,13 @@ init_state3();
847775
847717
 
847776
847718
  // src/input/commands/recall-shared.ts
847777
847719
  var VALID_CLASSES = ["decision", "constraint", "incident", "pattern", "fact", "risk", "runbook", "architecture", "ownership"];
847778
- var VALID_SCOPES2 = ["session", "project", "team"];
847720
+ var VALID_SCOPES = ["session", "project", "team"];
847779
847721
  var VALID_REVIEW_STATES = ["fresh", "reviewed", "stale", "contradicted"];
847780
847722
  function isValidClass(s4) {
847781
847723
  return VALID_CLASSES.includes(s4);
847782
847724
  }
847783
847725
  function isValidScope(s4) {
847784
- return VALID_SCOPES2.includes(s4);
847726
+ return VALID_SCOPES.includes(s4);
847785
847727
  }
847786
847728
  function isValidReviewState(s4) {
847787
847729
  return VALID_REVIEW_STATES.includes(s4);
@@ -847824,7 +847766,7 @@ function handleRecallSearch(args2, context) {
847824
847766
  if (isValidScope(scope))
847825
847767
  filter.scope = scope;
847826
847768
  else {
847827
- context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES2.join(", ")}.`);
847769
+ context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES.join(", ")}.`);
847828
847770
  return;
847829
847771
  }
847830
847772
  }
@@ -847999,7 +847941,7 @@ function handleRecallList(args2, context) {
847999
847941
  if (scopeIdx !== -1 && args2[scopeIdx + 1]) {
848000
847942
  const scope = args2[scopeIdx + 1];
848001
847943
  if (!isValidScope(scope)) {
848002
- context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES2.join(", ")}.`);
847944
+ context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES.join(", ")}.`);
848003
847945
  return;
848004
847946
  }
848005
847947
  filter.scope = scope;
@@ -848049,7 +847991,7 @@ async function handleRecallAdd(args2, context) {
848049
847991
  const tags = tagsRaw ? tagsRaw.split(",").map((token) => token.trim()).filter(Boolean) : [];
848050
847992
  const scope = scopeRaw && isValidScope(scopeRaw) ? scopeRaw : "project";
848051
847993
  if (scopeRaw && !isValidScope(scopeRaw)) {
848052
- context.print(`[memory] Invalid scope "${scopeRaw}". Valid values ${VALID_SCOPES2.join(", ")}.`);
847994
+ context.print(`[memory] Invalid scope "${scopeRaw}". Valid values ${VALID_SCOPES.join(", ")}.`);
848053
847995
  return;
848054
847996
  }
848055
847997
  const provenance = [];
@@ -848183,7 +848125,7 @@ function handleRecallExport(args2, context) {
848183
848125
  if (scopeIdx !== -1 && commandArgs[scopeIdx + 1]) {
848184
848126
  const scope = commandArgs[scopeIdx + 1];
848185
848127
  if (!isValidScope(scope)) {
848186
- context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES2.join(", ")}.`);
848128
+ context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES.join(", ")}.`);
848187
848129
  return;
848188
848130
  }
848189
848131
  filter.scope = scope;
@@ -848262,7 +848204,7 @@ function handleRecallHandoffExport(args2, context) {
848262
848204
  const scopeIdx = commandArgs.indexOf("--scope");
848263
848205
  const scopeRaw = scopeIdx !== -1 ? commandArgs[scopeIdx + 1] : "team";
848264
848206
  if (!scopeRaw || !isValidScope(scopeRaw)) {
848265
- context.print(`[memory] Unknown scope "${scopeRaw ?? ""}". Valid values ${VALID_SCOPES2.join(", ")}.`);
848207
+ context.print(`[memory] Unknown scope "${scopeRaw ?? ""}". Valid values ${VALID_SCOPES.join(", ")}.`);
848266
848208
  return;
848267
848209
  }
848268
848210
  const bundle = memory.exportBundle({ scope: scopeRaw });
@@ -848378,7 +848320,7 @@ function handleRecallPromote(args2, context) {
848378
848320
  const id = parsed.rest[0];
848379
848321
  const scope = parsed.rest[1];
848380
848322
  if (!id || !scope || !isValidScope(scope)) {
848381
- context.print(`[memory] Usage: /memory promote <id> <${VALID_SCOPES2.join("|")}> --yes`);
848323
+ context.print(`[memory] Usage: /memory promote <id> <${VALID_SCOPES.join("|")}> --yes`);
848382
848324
  return;
848383
848325
  }
848384
848326
  if (!parsed.yes) {
@@ -862311,7 +862253,7 @@ import { mkdirSync as mkdirSync64, readFileSync as readFileSync86, writeFileSync
862311
862253
  import { dirname as dirname63, resolve as resolve39 } from "path";
862312
862254
  init_state3();
862313
862255
  var VALID_CLASSES2 = ["decision", "constraint", "incident", "pattern", "fact", "risk", "runbook", "architecture", "ownership"];
862314
- var VALID_SCOPES4 = ["session", "project", "team"];
862256
+ var VALID_SCOPES3 = ["session", "project", "team"];
862315
862257
  var VALID_REVIEW_STATES3 = ["fresh", "reviewed", "stale", "contradicted"];
862316
862258
  var VALID_PROVENANCE_KINDS = ["session", "turn", "task", "event", "file"];
862317
862259
  var VALUE_OPTIONS = new Set([
@@ -862411,7 +862353,7 @@ function isMemoryClass2(value) {
862411
862353
  return VALID_CLASSES2.includes(value);
862412
862354
  }
862413
862355
  function isMemoryScope2(value) {
862414
- return VALID_SCOPES4.includes(value);
862356
+ return VALID_SCOPES3.includes(value);
862415
862357
  }
862416
862358
  function isReviewState(value) {
862417
862359
  return VALID_REVIEW_STATES3.includes(value);
@@ -862426,7 +862368,7 @@ function requireClass(value) {
862426
862368
  }
862427
862369
  function requireScope(value) {
862428
862370
  if (!value || !isMemoryScope2(value))
862429
- throw new Error(`Invalid memory scope "${value ?? ""}". Valid values ${VALID_SCOPES4.join(", ")}`);
862371
+ throw new Error(`Invalid memory scope "${value ?? ""}". Valid values ${VALID_SCOPES3.join(", ")}`);
862430
862372
  return value;
862431
862373
  }
862432
862374
  function optionalScope(value) {
@@ -879802,6 +879744,9 @@ function readLimit5(value, fallback) {
879802
879744
  return fallback;
879803
879745
  return Math.max(1, Math.min(500, Math.trunc(parsed)));
879804
879746
  }
879747
+ function redactCliLookupInput(input) {
879748
+ return input.replace(/(--config=)([^=\s]+)=\S+/g, "$1$2=<redacted>").replace(/(--config\s+)([^=\s]+)=\S+/g, "$1$2=<redacted>");
879749
+ }
879805
879750
  function cliCommandTokens(command8) {
879806
879751
  if (command8 === "unknown")
879807
879752
  return [];
@@ -879818,13 +879763,14 @@ function fallbackCliSummary(command8) {
879818
879763
  return "Print the installed Agent package version.";
879819
879764
  return "Inspect the CLI help for this Agent package command.";
879820
879765
  }
879821
- function describeCliCommand(command8) {
879766
+ function describeCliCommand(command8, lookup) {
879822
879767
  const help = describeGoodVibesCommandHelp(command8);
879823
879768
  const tokens = cliCommandTokens(command8);
879824
879769
  return {
879825
879770
  name: command8,
879826
879771
  tokens,
879827
879772
  invocation: command8 === "tui" ? "goodvibes-agent" : `goodvibes-agent ${tokens[0] ?? command8}`,
879773
+ ...lookup ? { lookup } : {},
879828
879774
  helpTopic: help?.command ?? command8,
879829
879775
  summary: help?.summary ?? fallbackCliSummary(command8),
879830
879776
  usage: help?.usage ?? (command8 === "tui" ? ["goodvibes-agent [OPTIONS]"] : [`goodvibes-agent ${command8} [ARGS]`]),
@@ -879849,6 +879795,14 @@ function cliCommandMatches(command8, query2) {
879849
879795
  ].map((value) => JSON.stringify(value)).join(`
879850
879796
  `).toLowerCase().includes(query2.toLowerCase());
879851
879797
  }
879798
+ function cliCommandCandidate(command8) {
879799
+ return {
879800
+ name: command8.name,
879801
+ tokens: command8.tokens,
879802
+ invocation: command8.invocation,
879803
+ summary: command8.summary
879804
+ };
879805
+ }
879852
879806
  function totalHarnessCliCommands() {
879853
879807
  return listGoodVibesCliCommands().filter((command8) => command8 !== "unknown").length;
879854
879808
  }
@@ -879858,23 +879812,60 @@ function blockedHarnessCliCommandTokens() {
879858
879812
  function listHarnessCliCommands(args2) {
879859
879813
  const query2 = readString50(args2.query);
879860
879814
  const limit3 = readLimit5(args2.limit, 200);
879861
- return listGoodVibesCliCommands().filter((command8) => command8 !== "unknown").map(describeCliCommand).filter((command8) => cliCommandMatches(command8, query2)).sort((a4, b3) => String(a4.name).localeCompare(String(b3.name))).slice(0, limit3);
879815
+ return listGoodVibesCliCommands().filter((command8) => command8 !== "unknown").map((command8) => describeCliCommand(command8)).filter((command8) => cliCommandMatches(command8, query2)).sort((a4, b3) => String(a4.name).localeCompare(String(b3.name))).slice(0, limit3);
879862
879816
  }
879863
- function cliTokensFromArgs(args2) {
879864
- const raw = readString50(args2.cliCommand) || readString50(args2.command) || readString50(args2.commandName) || readString50(args2.query);
879865
- if (!raw)
879866
- return [];
879817
+ function cliInputFromArgs(args2) {
879818
+ const cliCommand = readString50(args2.cliCommand);
879819
+ if (cliCommand)
879820
+ return { source: "cliCommand", input: cliCommand };
879821
+ const command8 = readString50(args2.command);
879822
+ if (command8)
879823
+ return { source: "command", input: command8 };
879824
+ const commandName = readString50(args2.commandName);
879825
+ if (commandName)
879826
+ return { source: "commandName", input: commandName };
879827
+ const target = readString50(args2.target);
879828
+ if (target)
879829
+ return { source: "target", input: target };
879830
+ const query2 = readString50(args2.query);
879831
+ if (query2)
879832
+ return { source: "query", input: query2 };
879833
+ return null;
879834
+ }
879835
+ function cliTokensFromRaw(raw) {
879867
879836
  const tokens = raw.split(/\s+/).filter((token) => token.length > 0);
879868
879837
  if (tokens[0] === "goodvibes-agent" || tokens[0]?.endsWith("/goodvibes-agent"))
879869
879838
  return tokens.slice(1);
879870
879839
  return tokens;
879871
879840
  }
879841
+ function isConcreteCliSource(source) {
879842
+ return source === "cliCommand" || source === "command" || source === "commandName";
879843
+ }
879872
879844
  function describeHarnessCliCommand(args2) {
879873
- const tokens = cliTokensFromArgs(args2);
879874
- if (tokens.length === 0)
879875
- return describeCliCommand("tui");
879845
+ const input = cliInputFromArgs(args2);
879846
+ if (!input)
879847
+ return describeCliCommand("tui", { source: "default", input: "", resolvedBy: "default" });
879848
+ const lookupInput = redactCliLookupInput(input.input);
879849
+ const tokens = cliTokensFromRaw(input.input);
879876
879850
  const parsed = parseGoodVibesCli(tokens);
879877
- if (parsed.command === "unknown") {
879851
+ const directInvocation = parsed.command !== "unknown" && (isConcreteCliSource(input.source) || String(parsed.rawCommand ?? "").toLowerCase() === String(tokens[0] ?? "").toLowerCase());
879852
+ if (!directInvocation) {
879853
+ const matches = listGoodVibesCliCommands().filter((command8) => command8 !== "unknown").map((command8) => describeCliCommand(command8)).filter((command8) => cliCommandMatches(command8, input.input)).sort((a4, b3) => String(a4.name).localeCompare(String(b3.name)));
879854
+ if (matches.length === 1) {
879855
+ return {
879856
+ ...matches[0],
879857
+ lookup: { source: input.source, input: lookupInput, resolvedBy: "search" }
879858
+ };
879859
+ }
879860
+ if (matches.length > 1) {
879861
+ return {
879862
+ supported: false,
879863
+ status: "ambiguous",
879864
+ input: lookupInput,
879865
+ candidates: matches.map(cliCommandCandidate).slice(0, 8),
879866
+ note: "Multiple top-level CLI mirrors matched this lookup. Provide cliCommand or commandName with one concrete command token."
879867
+ };
879868
+ }
879878
879869
  return {
879879
879870
  supported: false,
879880
879871
  token: parsed.rawCommand ?? tokens[0],
@@ -879884,7 +879875,7 @@ function describeHarnessCliCommand(args2) {
879884
879875
  };
879885
879876
  }
879886
879877
  return {
879887
- ...describeCliCommand(parsed.command),
879878
+ ...describeCliCommand(parsed.command, { source: input.source, input: lookupInput, resolvedBy: "invocation" }),
879888
879879
  parsed: {
879889
879880
  command: parsed.command,
879890
879881
  rawCommand: parsed.rawCommand,
@@ -880234,9 +880225,133 @@ function describeBinding(manager5, action2, combos, lookup) {
880234
880225
  labels: combos.map((combo) => manager5.formatCombo(combo)),
880235
880226
  defaultBindings: defaults3.map((combo) => describeCombo(manager5, combo)),
880236
880227
  customized,
880237
- source: customized ? "custom" : "default"
880228
+ source: customized ? "custom" : "default",
880229
+ modelOperation: keybindingOperationRoute(action2)
880238
880230
  };
880239
880231
  }
880232
+ function keybindingOperationRoute(action2) {
880233
+ switch (action2) {
880234
+ case "clear-cancel":
880235
+ return {
880236
+ supported: true,
880237
+ effect: "shell-action",
880238
+ preferredMode: "run_keybinding",
880239
+ confirmation: 'agent_harness mode:"run_keybinding" requires confirm:true and explicitUserRequest.',
880240
+ note: "Routes the cancel-generation side of this shortcut through commandContext.cancelGeneration. Prompt clearing and double-press exit remain direct user interaction."
880241
+ };
880242
+ case "screen-clear":
880243
+ return {
880244
+ supported: true,
880245
+ effect: "shell-action",
880246
+ preferredMode: "run_keybinding",
880247
+ confirmation: 'agent_harness mode:"run_keybinding" requires confirm:true and explicitUserRequest.',
880248
+ note: "Routes through commandContext.clearScreen."
880249
+ };
880250
+ case "panel-picker":
880251
+ return {
880252
+ supported: true,
880253
+ effect: "visible-ui-navigation",
880254
+ preferredMode: "run_keybinding",
880255
+ surfaceId: "agent-workspace",
880256
+ confirmation: 'agent_harness mode:"run_keybinding" requires confirm:true and explicitUserRequest.',
880257
+ note: "Opens the same Agent workspace home route as the panel-picker shortcut."
880258
+ };
880259
+ case "panel-close":
880260
+ return {
880261
+ supported: true,
880262
+ effect: "visible-ui-navigation",
880263
+ preferredMode: "run_keybinding",
880264
+ confirmation: 'agent_harness mode:"run_keybinding" requires confirm:true and explicitUserRequest.',
880265
+ note: "Closes the active legacy panel if present, then focuses the prompt when the shell bridge exposes focusPrompt."
880266
+ };
880267
+ case "panel-close-all":
880268
+ return {
880269
+ supported: true,
880270
+ effect: "visible-ui-navigation",
880271
+ preferredMode: "run_keybinding",
880272
+ confirmation: 'agent_harness mode:"run_keybinding" requires confirm:true and explicitUserRequest.',
880273
+ note: "Closes all legacy panels if present, hides the panel manager, then focuses the prompt when the shell bridge exposes focusPrompt."
880274
+ };
880275
+ case "history-search":
880276
+ return {
880277
+ supported: true,
880278
+ effect: "visible-ui-navigation",
880279
+ preferredMode: "run_keybinding",
880280
+ surfaceId: "prompt-history-search",
880281
+ confirmation: 'agent_harness mode:"run_keybinding" requires confirm:true and explicitUserRequest.',
880282
+ note: "Opens the visible prompt-history search overlay; optional search text may be supplied with value."
880283
+ };
880284
+ case "search":
880285
+ return {
880286
+ supported: true,
880287
+ effect: "visible-ui-navigation",
880288
+ preferredMode: "run_keybinding",
880289
+ surfaceId: "conversation-search",
880290
+ confirmation: 'agent_harness mode:"run_keybinding" requires confirm:true and explicitUserRequest.',
880291
+ note: "Opens the visible conversation search overlay; optional search text may be supplied with value."
880292
+ };
880293
+ case "paste":
880294
+ return {
880295
+ supported: true,
880296
+ effect: "shell-action",
880297
+ preferredMode: "run_keybinding",
880298
+ command: "/paste",
880299
+ confirmation: 'agent_harness mode:"run_keybinding" requires confirm:true and explicitUserRequest.',
880300
+ note: "Routes through commandContext.pasteFromClipboard and reports whether text, image, or nothing was pasted."
880301
+ };
880302
+ case "block-copy":
880303
+ case "bookmark":
880304
+ case "block-save":
880305
+ return {
880306
+ supported: true,
880307
+ effect: "visible-ui-interaction",
880308
+ preferredMode: "run_keybinding",
880309
+ surfaceId: "block-actions",
880310
+ confirmation: 'agent_harness mode:"run_keybinding" requires confirm:true and explicitUserRequest.',
880311
+ note: "Opens the visible nearest-block actions surface. The exact block action remains an interactive visible-shell selection because it depends on cursor/scroll position."
880312
+ };
880313
+ case "panel-tab-next":
880314
+ case "panel-tab-prev":
880315
+ return {
880316
+ supported: false,
880317
+ effect: "visible-ui-navigation",
880318
+ preferredMode: "open_ui_surface",
880319
+ surfaceId: "agent-workspace",
880320
+ confirmation: "Use open_ui_surface with confirm:true and an explicit categoryId/target instead of cycling hidden UI state.",
880321
+ note: "Category cycling depends on the live workspace focus position. The model should open the intended Agent workspace category directly."
880322
+ };
880323
+ case "copy-selection":
880324
+ return {
880325
+ supported: false,
880326
+ effect: "clipboard-selection",
880327
+ preferredMode: "direct-user-interaction",
880328
+ confirmation: "No model operation is exposed.",
880329
+ note: "Terminal text selection is outside the Agent command context. Use transcript/session export or a content-specific model route when a concrete artifact is needed."
880330
+ };
880331
+ case "delete-word":
880332
+ case "line-start":
880333
+ case "next-error-line-end":
880334
+ case "kill-line":
880335
+ case "clear-prompt":
880336
+ case "undo":
880337
+ case "redo":
880338
+ return {
880339
+ supported: false,
880340
+ effect: "prompt-editor-state",
880341
+ preferredMode: "direct-user-interaction",
880342
+ confirmation: "No model operation is exposed.",
880343
+ note: "This shortcut mutates live prompt-buffer cursor/edit state that is not part of the model tool contract."
880344
+ };
880345
+ case "replay-panel":
880346
+ return {
880347
+ supported: false,
880348
+ effect: "reserved",
880349
+ preferredMode: "direct-user-interaction",
880350
+ confirmation: "No model operation is exposed.",
880351
+ note: "This shortcut is reserved and has no current Agent operation route."
880352
+ };
880353
+ }
880354
+ }
880240
880355
  function readOverrideFile(configPath) {
880241
880356
  if (!existsSync82(configPath))
880242
880357
  return {};
@@ -880268,7 +880383,7 @@ ${shortcut.description}`.toLowerCase().includes(query2)).slice(0, readLimit7(arg
880268
880383
  configurableKeybindings: keybindings.keybindings,
880269
880384
  returned: fixed.length + Number(keybindings.returned ?? 0),
880270
880385
  total: totalHarnessShortcuts(context),
880271
- policy: "Fixed shortcuts are runtime/editor controls. Configurable keybindings can be changed with set_keybinding/reset_keybinding."
880386
+ policy: "Fixed shortcuts are runtime/editor controls. Configurable keybindings can be inspected, supported shell-safe actions can be run with run_keybinding, and bindings can be changed with set_keybinding/reset_keybinding."
880272
880387
  };
880273
880388
  }
880274
880389
  function listHarnessKeybindings(context, args2) {
@@ -880280,7 +880395,7 @@ function listHarnessKeybindings(context, args2) {
880280
880395
  keybindings: entries,
880281
880396
  returned: entries.length,
880282
880397
  total: manager5.getAll().length,
880283
- policy: "Reads the live resolved keybindings. set_keybinding/reset_keybinding write the same keybindings.json file the user can edit and reload the runtime manager."
880398
+ policy: "Reads the live resolved keybindings, including modelOperation route metadata. run_keybinding executes only supported shell-safe actions. set_keybinding/reset_keybinding write the same keybindings.json file the user can edit and reload the runtime manager."
880284
880399
  };
880285
880400
  }
880286
880401
  function describeHarnessKeybinding(context, args2) {
@@ -880296,6 +880411,143 @@ function describeHarnessKeybinding(context, args2) {
880296
880411
  ...describeBinding(manager5, entry.action, entry.combos, resolved.lookup)
880297
880412
  } : null;
880298
880413
  }
880414
+ function runUnavailable(action2, route, reason) {
880415
+ return {
880416
+ status: "keybinding_route_unavailable",
880417
+ action: action2,
880418
+ modelOperation: route,
880419
+ ...reason ? { reason } : {}
880420
+ };
880421
+ }
880422
+ function runHarnessKeybinding(context, args2) {
880423
+ const manager5 = requireKeybindingsManager2(context);
880424
+ const resolved = resolveHarnessKeybinding(context, args2);
880425
+ if (resolved?.status === "ambiguous")
880426
+ return { status: "ambiguous", input: resolved.input, candidates: resolved.candidates };
880427
+ if (!resolved)
880428
+ throw new Error("run_keybinding requires a valid keybinding action id, target, key, or query.");
880429
+ const entry = manager5.getAll().find((candidate) => candidate.action === resolved.action);
880430
+ if (!entry)
880431
+ throw new Error(`No live keybinding entry found for ${resolved.action}.`);
880432
+ const route = keybindingOperationRoute(resolved.action);
880433
+ const descriptor = {
880434
+ configPath: manager5.getConfigPath(),
880435
+ ...describeBinding(manager5, entry.action, entry.combos, resolved.lookup)
880436
+ };
880437
+ if (!route.supported) {
880438
+ return {
880439
+ status: "unsupported_keybinding_action",
880440
+ action: resolved.action,
880441
+ keybinding: descriptor,
880442
+ modelOperation: route
880443
+ };
880444
+ }
880445
+ switch (resolved.action) {
880446
+ case "clear-cancel":
880447
+ if (!context.cancelGeneration)
880448
+ return runUnavailable(resolved.action, route, "commandContext.cancelGeneration is unavailable.");
880449
+ context.cancelGeneration();
880450
+ return { status: "executed", action: resolved.action, effect: "cancel-generation", keybinding: descriptor };
880451
+ case "screen-clear":
880452
+ if (!context.clearScreen)
880453
+ return runUnavailable(resolved.action, route, "commandContext.clearScreen is unavailable.");
880454
+ context.clearScreen();
880455
+ return { status: "executed", action: resolved.action, effect: "screen-clear", keybinding: descriptor };
880456
+ case "panel-picker":
880457
+ if (context.openPanelPicker) {
880458
+ context.openPanelPicker();
880459
+ return { status: "executed", action: resolved.action, effect: "agent-workspace-opened", route: "openPanelPicker", keybinding: descriptor };
880460
+ }
880461
+ if (context.openAgentWorkspace) {
880462
+ context.openAgentWorkspace("home");
880463
+ return { status: "executed", action: resolved.action, effect: "agent-workspace-opened", route: "openAgentWorkspace", categoryId: "home", keybinding: descriptor };
880464
+ }
880465
+ return runUnavailable(resolved.action, route, "No panel picker or Agent workspace opener is available.");
880466
+ case "panel-close": {
880467
+ const active = context.workspace.panelManager?.getActivePanel() ?? null;
880468
+ if (active)
880469
+ context.workspace.panelManager?.close(active.id);
880470
+ if (!active && !context.focusPrompt)
880471
+ return runUnavailable(resolved.action, route, "No active legacy panel or prompt focus route is available.");
880472
+ if (context.focusPrompt)
880473
+ context.focusPrompt();
880474
+ context.renderRequest();
880475
+ return {
880476
+ status: "executed",
880477
+ action: resolved.action,
880478
+ effect: active ? "active-panel-closed" : "prompt-focused",
880479
+ ...active ? { panelId: active.id } : {},
880480
+ keybinding: descriptor
880481
+ };
880482
+ }
880483
+ case "panel-close-all": {
880484
+ const managerPanel = context.workspace.panelManager;
880485
+ const openPanels = managerPanel?.getAllOpen() ?? [];
880486
+ for (const panel of openPanels)
880487
+ managerPanel?.close(panel.id);
880488
+ managerPanel?.hide();
880489
+ if (openPanels.length === 0 && !context.focusPrompt)
880490
+ return runUnavailable(resolved.action, route, "No open legacy panels or prompt focus route is available.");
880491
+ if (context.focusPrompt)
880492
+ context.focusPrompt();
880493
+ context.renderRequest();
880494
+ return {
880495
+ status: "executed",
880496
+ action: resolved.action,
880497
+ effect: "all-panels-closed",
880498
+ closedPanels: openPanels.map((panel) => panel.id),
880499
+ keybinding: descriptor
880500
+ };
880501
+ }
880502
+ case "history-search": {
880503
+ if (!context.openPromptHistorySearch)
880504
+ return runUnavailable(resolved.action, route, "commandContext.openPromptHistorySearch is unavailable.");
880505
+ const query2 = readString52(args2.value);
880506
+ context.openPromptHistorySearch(query2 || undefined);
880507
+ return { status: "executed", action: resolved.action, effect: "prompt-history-search-opened", query: query2, keybinding: descriptor };
880508
+ }
880509
+ case "search": {
880510
+ if (!context.openConversationSearch)
880511
+ return runUnavailable(resolved.action, route, "commandContext.openConversationSearch is unavailable.");
880512
+ const query2 = readString52(args2.value);
880513
+ context.openConversationSearch(query2 || undefined);
880514
+ return { status: "executed", action: resolved.action, effect: "conversation-search-opened", query: query2, keybinding: descriptor };
880515
+ }
880516
+ case "paste": {
880517
+ if (!context.pasteFromClipboard)
880518
+ return runUnavailable(resolved.action, route, "commandContext.pasteFromClipboard is unavailable.");
880519
+ const pasted = context.pasteFromClipboard();
880520
+ return { status: "executed", action: resolved.action, effect: "paste-from-clipboard", pasted, keybinding: descriptor };
880521
+ }
880522
+ case "block-copy":
880523
+ case "bookmark":
880524
+ case "block-save": {
880525
+ if (!context.openBlockActions)
880526
+ return runUnavailable(resolved.action, route, "commandContext.openBlockActions is unavailable.");
880527
+ const opened = context.openBlockActions();
880528
+ return opened ? {
880529
+ status: "visible_interaction_required",
880530
+ action: resolved.action,
880531
+ effect: "block-actions-opened",
880532
+ keybinding: descriptor,
880533
+ note: "The block action surface is open. Selecting the exact nearest-block action remains visible interactive shell work."
880534
+ } : {
880535
+ status: "not_opened",
880536
+ action: resolved.action,
880537
+ effect: "block-actions",
880538
+ keybinding: descriptor,
880539
+ note: "The current shell did not have an empty prompt plus nearby block required for block actions."
880540
+ };
880541
+ }
880542
+ default:
880543
+ return {
880544
+ status: "unsupported_keybinding_action",
880545
+ action: resolved.action,
880546
+ keybinding: descriptor,
880547
+ modelOperation: route
880548
+ };
880549
+ }
880550
+ }
880299
880551
  function setHarnessKeybinding(context, args2) {
880300
880552
  const manager5 = requireKeybindingsManager2(context);
880301
880553
  const resolved = resolveHarnessKeybinding(context, args2);
@@ -881065,6 +881317,7 @@ var AGENT_HARNESS_MODES = [
881065
881317
  "shortcuts",
881066
881318
  "keybindings",
881067
881319
  "keybinding",
881320
+ "run_keybinding",
881068
881321
  "set_keybinding",
881069
881322
  "reset_keybinding",
881070
881323
  "commands",
@@ -881099,7 +881352,7 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
881099
881352
  },
881100
881353
  query: {
881101
881354
  type: "string",
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."
881355
+ description: "Search text for command, CLI mirror, panel, UI surface, keybinding, workspace action, setting, or tool catalogs; also slash-command, CLI mirror, setting, panel, UI surface, or keybinding lookup for single-item modes."
881103
881356
  },
881104
881357
  command: {
881105
881358
  type: "string",
@@ -881107,7 +881360,7 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
881107
881360
  },
881108
881361
  cliCommand: {
881109
881362
  type: "string",
881110
- description: 'Top-level CLI command string for mode cli_command, for example "goodvibes-agent status --json" or "profiles list". This mode is read-only metadata/parse inspection.'
881363
+ description: 'Top-level CLI command string for mode cli_command, for example "goodvibes-agent status --json" or "profiles list". target or query can also look up one CLI mirror when the exact command token is not known. This mode is read-only metadata/parse inspection.'
881111
881364
  },
881112
881365
  commandName: {
881113
881366
  type: "string",
@@ -881132,7 +881385,7 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
881132
881385
  },
881133
881386
  actionId: {
881134
881387
  type: "string",
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."
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."
881136
881389
  },
881137
881390
  fields: {
881138
881391
  type: "object",
@@ -881162,11 +881415,11 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
881162
881415
  { type: "number" },
881163
881416
  { type: "boolean" }
881164
881417
  ],
881165
- description: "Setting value for set_setting. Strings, booleans, numbers, and enum strings are accepted."
881418
+ description: "Setting value for set_setting. Strings, booleans, numbers, and enum strings are accepted. In run_keybinding, value can provide visible search text for search/history-search shortcut routes."
881166
881419
  },
881167
881420
  target: {
881168
881421
  type: "string",
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."
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."
881170
881423
  },
881171
881424
  capabilityId: {
881172
881425
  type: "string",
@@ -881203,11 +881456,11 @@ var AGENT_HARNESS_PARAMETER_PROPERTIES = {
881203
881456
  },
881204
881457
  confirm: {
881205
881458
  type: "boolean",
881206
- description: "Required true for set_setting, reset_setting, run_command, open_panel, open_ui_surface, and mutating run_workspace_action calls after an explicit user request."
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."
881207
881460
  },
881208
881461
  explicitUserRequest: {
881209
881462
  type: "string",
881210
- description: "Exact user request or faithful short summary authorizing a setting mutation or harness UI/command invocation."
881463
+ description: "Exact user request or faithful short summary authorizing a setting mutation, keybinding action, or harness UI/command invocation."
881211
881464
  }
881212
881465
  };
881213
881466
 
@@ -881871,7 +882124,7 @@ var UI_SURFACES = [
881871
882124
  kind: "overlay",
881872
882125
  summary: "Keyboard shortcut reference overlay.",
881873
882126
  command: "/shortcuts",
881874
- preferredModelRoute: "Use shortcuts/keybindings modes for model-readable discovery and confirmed keybinding edits.",
882127
+ preferredModelRoute: "Use shortcuts/keybindings modes for model-readable discovery, run_keybinding for supported shell-safe actions, and confirmed keybinding edits for binding changes.",
881875
882128
  available: (context) => typeof context.openShortcutsOverlay === "function",
881876
882129
  open: (context) => {
881877
882130
  const surface = findSurfaceById("shortcuts-overlay");
@@ -882444,7 +882697,7 @@ function createAgentHarnessTool(deps) {
882444
882697
  description: [
882445
882698
  "Discover and operate the GoodVibes Agent harness from the main conversation.",
882446
882699
  "Use this tool to inspect Agent workspace actions, built-in panels, top-level CLI mirrors, UI surfaces, keybindings, slash commands with policy metadata, model tools or one model tool schema, connected-host capabilities or one connected-host capability detail, and Agent settings, or to invoke a workspace action/command through the same in-process command registry the user uses in the TUI.",
882447
- "Discovery modes are read-only. Setting/keybinding writes, resets, UI routing, slash command invocation, and workspace action invocation require confirm:true plus explicitUserRequest.",
882700
+ "Discovery modes are read-only. Setting/keybinding writes, resets, keybinding actions, UI routing, slash command invocation, and workspace action invocation require confirm:true plus explicitUserRequest.",
882448
882701
  "This tool preserves Agent product boundaries: connected-host lifecycle and listener posture stay externally owned, connected-host mode reports allowed and blocked route families, and secret-backed settings store raw values through the secret manager while config receives only a secret reference."
882449
882702
  ].join(" "),
882450
882703
  parameters: {
@@ -882475,10 +882728,10 @@ function createAgentHarnessTool(deps) {
882475
882728
  workspaceActions: allWorkspaceActions().length,
882476
882729
  tools: deps.toolRegistry.getToolDefinitions().length,
882477
882730
  modelAccess: {
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.',
882731
+ cliCommands: 'Use mode:"cli_commands" to list and mode:"cli_command" with cliCommand, command, commandName, target, or query to inspect package CLI mirrors and their preferred in-process model routes. CLI modes are discovery-only.',
882479
882732
  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
882733
  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.',
882734
+ 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.',
882482
882735
  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.',
882483
882736
  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.',
882484
882737
  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.',
@@ -882546,15 +882799,15 @@ function createAgentHarnessTool(deps) {
882546
882799
  }
882547
882800
  if (args2.mode === "set_keybinding") {
882548
882801
  const confirmationError2 = requireConfirmedAction(args2, "Keybinding mutation");
882549
- if (confirmationError2)
882550
- return error52(confirmationError2);
882551
- return output7(setHarnessKeybinding(deps.commandContext, args2));
882802
+ return confirmationError2 ? error52(confirmationError2) : output7(setHarnessKeybinding(deps.commandContext, args2));
882552
882803
  }
882553
882804
  if (args2.mode === "reset_keybinding") {
882554
882805
  const confirmationError2 = requireConfirmedAction(args2, "Keybinding reset");
882555
- if (confirmationError2)
882556
- return error52(confirmationError2);
882557
- return output7(resetHarnessKeybinding(deps.commandContext, args2));
882806
+ return confirmationError2 ? error52(confirmationError2) : output7(resetHarnessKeybinding(deps.commandContext, args2));
882807
+ }
882808
+ if (args2.mode === "run_keybinding") {
882809
+ const confirmationError2 = requireConfirmedAction(args2, "Keybinding action");
882810
+ return confirmationError2 ? error52(confirmationError2) : output7(runHarnessKeybinding(deps.commandContext, args2));
882558
882811
  }
882559
882812
  if (args2.mode === "commands") {
882560
882813
  const commands3 = listHarnessCommands(deps.commandRegistry, args2);