feat(#1082): add description() to ToolGroup + Capability; expose in API + UI tooltips

- hive-sh4re: ToolGroup::description() and Capability::description() return
  short human-readable strings for each variant
- hive-c0re: ToolGroupsSnapshot and CapabilitiesSnapshot now include a
  `descriptions` map (name → description); get_capabilities now iterates
  Capability::ALL instead of hardcoding the list
- tabs.js: renderToolGroups + renderCapabilities use descriptions[name] as
  the column header title attribute (native browser tooltip on hover)
This commit is contained in:
iris 2026-06-02 12:50:19 +02:00
commit 2368bec634
3 changed files with 62 additions and 6 deletions

View file

@ -1196,7 +1196,7 @@ window.marked = marked;
function renderCapabilities(root, data) {
root.replaceChildren();
const { caps, assignments } = data;
const { caps, descriptions = {}, assignments } = data;
if (!caps || !caps.length) {
root.append(el('p', { class: 'meta' }, '(no capabilities defined)'));
return;
@ -1221,7 +1221,7 @@ window.marked = marked;
const hrow = el('tr');
hrow.append(el('th', { class: 'cap-agent-col' }, 'agent'));
for (const c of caps) {
hrow.append(el('th', { class: 'cap-col', title: c }, c));
hrow.append(el('th', { class: 'cap-col', title: descriptions[c] || c }, c));
}
hrow.append(el('th', { class: 'cap-save-col' }, ''));
thead.append(hrow);
@ -1311,7 +1311,7 @@ window.marked = marked;
function renderToolGroups(root, data) {
root.replaceChildren();
const { groups, assignments } = data;
const { groups, descriptions = {}, assignments } = data;
if (!groups || !groups.length) {
root.append(el('p', { class: 'meta' }, '(no tool groups defined)'));
return;
@ -1337,7 +1337,7 @@ window.marked = marked;
const hrow = el('tr');
hrow.append(el('th', { class: 'tg-agent-col' }, 'agent'));
for (const g of groups) {
hrow.append(el('th', { class: 'tg-group-col', title: g }, g));
hrow.append(el('th', { class: 'tg-group-col', title: descriptions[g] || g }, g));
}
hrow.append(el('th', { class: 'tg-save-col' }, ''));
thead.append(hrow);