dsh-hive-panel 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,34 @@ All notable changes to this project are documented in this file. The format is
4
4
  based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project
5
5
  adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.0.7] - 2026-12-05
8
+
9
+ ### Fixed
10
+
11
+ - Renderer re-synced from hive-panel 1.0.3: when no worker is live but claimed tasks
12
+ remain, the header count shows "等待回收 N / waiting to reclaim N" with an explanatory
13
+ tooltip instead of implying that nothing is happening. Browser bundle rebuilt.
14
+
15
+ ### Tests
16
+
17
+ - 41 checks pass, including the synced waiting-reclaim chip and the rebuilt client.
18
+
19
+ ## [1.0.6] - 2026-12-05
20
+
21
+ ### Changed
22
+
23
+ - The shared renderer and stylesheet are re-synced from hive-panel 1.0.2: agent details
24
+ open in a centered dialog with a readable list, the header count prioritises live
25
+ workers, and the technical detail block is collapsed. The browser bundle is rebuilt.
26
+
27
+ ### Tests
28
+
29
+ - 41 checks pass, including the synced renderer and the rebuilt client bundle.
30
+
31
+ ### Published
32
+
33
+ - npm: `dsh-hive-panel@1.0.6` on 2026-12-05.
34
+
7
35
  ## [1.0.5] - 2026-12-05
8
36
 
9
37
  ### Fixed
@@ -24,6 +52,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
24
52
  - 41 checks cover the `addRepo` registration path, initialised-marker discovery, the
25
53
  widened invariants copy and the unchanged suppression rules.
26
54
 
55
+ ### Published
56
+
57
+ - npm: `dsh-hive-panel@1.0.5` on 2026-12-05.
58
+
27
59
  ## [1.0.4] - 2026-12-05
28
60
 
29
61
  ### Fixed
package/lib/client.js CHANGED
@@ -2090,6 +2090,22 @@ dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow:
2090
2090
  }
2091
2091
  .hive-agent-count { font: inherit; cursor: pointer; }
2092
2092
  .hive-agent-count:disabled { cursor: default; }
2093
+ /* Agents dialog */
2094
+ .hive-agents-dialog { width: min(560px, 92vw); max-height: 80vh; }
2095
+ .hive-agents-body { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }
2096
+ .hive-agents-empty-note { padding: 10px 0; color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; }
2097
+ .hive-agent-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--hive-line-2); }
2098
+ .hive-agent-row-main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
2099
+ .hive-agent-row-name { color: var(--hive-fg); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
2100
+ .hive-agent-row-task { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
2101
+ .hive-agent-row-meta { color: var(--hive-fg-faint); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
2102
+ .hive-agents-workers-title { padding-top: 4px; color: var(--hive-fg); font-size: 14px; font-weight: 700; line-height: 1.5; }
2103
+ .hive-agent-worker-row { padding: 8px 0; border-bottom: 1px solid var(--hive-line-2); }
2104
+ .hive-agent-worker-task { color: var(--hive-fg); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
2105
+ .hive-agent-worker-meta { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
2106
+ .hive-agents-technical { border-top: 1px solid var(--hive-line-2); padding-top: 8px; }
2107
+ .hive-agents-technical-summary { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; cursor: pointer; }
2108
+ .hive-agents-technical-json { max-height: 220px; margin-top: 8px; }
2093
2109
  `;
2094
2110
 
2095
2111
  const LANE_LABEL_KEYS = Object.freeze({
@@ -2148,6 +2164,16 @@ const messages = Object.freeze({
2148
2164
  "status.actionFailed": "action failed",
2149
2165
  "status.disconnected": "disconnected",
2150
2166
  "agents.openAria": "Open agent",
2167
+ "agents.runningTooltip": "Running {running} / board identities {identities}",
2168
+ "agents.fallbackTooltip": "Board identities {identities} (supervisor disconnected or repository not registered)",
2169
+ "agents.modalEmpty": "No agents.",
2170
+ "agents.fileCount": "{count} files",
2171
+ "agents.workersTitle": "Active work units",
2172
+ "agents.workerStarted": "Started {time}",
2173
+ "agents.workerElapsed": "Running for {duration}",
2174
+ "agents.technical": "Technical details",
2175
+ "agents.waitingReclaim": "Waiting to reclaim {count}",
2176
+ "agents.waitingReclaimTooltip": "{count} tasks are claimed but no agent is running (waiting to be reclaimed after a process restart)",
2151
2177
  "agent.idle": "idle",
2152
2178
  "agent.task": "task",
2153
2179
  "agent.unknown": "unknown",
@@ -2389,6 +2415,16 @@ const messages = Object.freeze({
2389
2415
  "status.actionFailed": "操作失败",
2390
2416
  "status.disconnected": "连接断开",
2391
2417
  "agents.openAria": "打开智能体",
2418
+ "agents.runningTooltip": "运行中 {running} / 公告板身份 {identities}",
2419
+ "agents.fallbackTooltip": "公告板身份 {identities}(监督器未连接或未注册该仓库)",
2420
+ "agents.modalEmpty": "暂无智能体。",
2421
+ "agents.fileCount": "{count} 个文件",
2422
+ "agents.workersTitle": "运行中的工作单元",
2423
+ "agents.workerStarted": "开始于 {time}",
2424
+ "agents.workerElapsed": "已运行 {duration}",
2425
+ "agents.technical": "技术详情",
2426
+ "agents.waitingReclaim": "等待回收 {count}",
2427
+ "agents.waitingReclaimTooltip": "有 {count} 个任务被认领但当前没有运行中的工作单元(进程重启后等待回收)",
2392
2428
  "agent.idle": "空闲",
2393
2429
  "agent.task": "任务",
2394
2430
  "agent.unknown": "未知",
@@ -2962,7 +2998,7 @@ function normalizeSupervisorRoles(source) {
2962
2998
  const ensure = (role) => {
2963
2999
  const name = asString(role).trim();
2964
3000
  if (!name) return null;
2965
- if (!rows.has(name)) rows.set(name, { role: name, limit: null, inFlight: null, queued: null });
3001
+ if (!rows.has(name)) rows.set(name, { role: name, limit: null, live: null, inFlight: null, queued: null });
2966
3002
  return rows.get(name);
2967
3003
  };
2968
3004
  const setLimit = (role, value) => {
@@ -2996,6 +3032,12 @@ function normalizeSupervisorRoles(source) {
2996
3032
  break;
2997
3033
  }
2998
3034
  }
3035
+ for (const field of ["live", "liveCount", "live_count", "workers", "workerCount"]) {
3036
+ if (supervisorNumber(raw[field]) !== null) {
3037
+ row.live = supervisorNumber(raw[field]);
3038
+ break;
3039
+ }
3040
+ }
2999
3041
  for (const field of ["queued", "queue", "queued_count", "pending", "pending_count", "waiting", "waiting_count", "backlog"]) {
3000
3042
  if (supervisorNumber(raw[field]) !== null) {
3001
3043
  row.queued = supervisorNumber(raw[field]);
@@ -3082,6 +3124,26 @@ function supervisorEntriesFrom(payload, depth = 0) {
3082
3124
  }
3083
3125
 
3084
3126
  /** Normalize the supervisor status endpoint into per-repository rows. */
3127
+ function normalizeSupervisorWorkers(source) {
3128
+ const raw = source && Array.isArray(source.workers) ? source.workers : [];
3129
+ const rows = [];
3130
+ for (const entry of raw) {
3131
+ if (!isRecord(entry)) continue;
3132
+ const cardId = asString(entry.cardId || entry.card || entry.task || entry.id);
3133
+ if (!cardId) continue;
3134
+ rows.push({
3135
+ cardId,
3136
+ role: asString(entry.role),
3137
+ agent: asString(entry.agent || entry.adapter),
3138
+ agentName: asString(entry.agentName || entry.agent_name || entry.name),
3139
+ sessionId: asString(entry.sessionId || entry.session_id),
3140
+ startedAt: asString(entry.startedAt || entry.started_at),
3141
+ lastOutputAt: asString(entry.lastOutputAt || entry.last_output_at),
3142
+ });
3143
+ }
3144
+ return rows;
3145
+ }
3146
+
3085
3147
  function normalizeSupervisorStatus(payload) {
3086
3148
  const rows = new Map();
3087
3149
  for (const raw of supervisorEntriesFrom(payload)) {
@@ -3104,11 +3166,30 @@ function normalizeSupervisorStatus(payload) {
3104
3166
  else if (/run|active|busy|working/.test(rawState)) state = "running";
3105
3167
  else if (/idle|ready|free/.test(rawState)) state = "idle";
3106
3168
  else if (running !== null && running > 0) state = "running";
3107
- rows.set(repo, { repo, state, running, roles: normalizeSupervisorRoles(source) });
3169
+ rows.set(repo, { repo, state, running, roles: normalizeSupervisorRoles(source), workers: normalizeSupervisorWorkers(source) });
3108
3170
  }
3109
3171
  return [...rows.values()].sort((left, right) => left.repo.localeCompare(right.repo));
3110
3172
  }
3111
3173
 
3174
+ function supervisorWorkerCount(row) {
3175
+ if (!row) return null;
3176
+ if (Array.isArray(row.workers) && row.workers.length > 0) return row.workers.length;
3177
+ const direct = supervisorNumber(row.running);
3178
+ if (direct !== null) return direct;
3179
+ let total = 0;
3180
+ let found = false;
3181
+ for (const role of Array.isArray(row.roles) ? row.roles : []) {
3182
+ if (!isRecord(role)) continue;
3183
+ const live = supervisorNumber(role.live);
3184
+ const inFlight = live !== null ? live : supervisorNumber(role.inFlight);
3185
+ if (inFlight !== null) {
3186
+ total += inFlight;
3187
+ found = true;
3188
+ }
3189
+ }
3190
+ return found ? total : null;
3191
+ }
3192
+
3112
3193
  function element(doc, tag, className, text) {
3113
3194
  const node = doc.createElement(tag);
3114
3195
  if (className) node.className = className;
@@ -3636,7 +3717,7 @@ function mount(root, options = {}) {
3636
3717
  const agentsCount = element(doc, "button", "hive-stat hive-agent-count");
3637
3718
  setAttr(agentsCount, "type", "button");
3638
3719
  agentsCount.addEventListener("click", () => {
3639
- if (agentsCount._agent) openAgentDrawer(agentsCount._agent);
3720
+ openAgentsDialog();
3640
3721
  });
3641
3722
  bar.appendChild(agentsCount);
3642
3723
 
@@ -5228,6 +5309,101 @@ function mount(root, options = {}) {
5228
5309
  return body;
5229
5310
  }
5230
5311
 
5312
+ function taskTitleForId(id) {
5313
+ const wanted = asString(id);
5314
+ if (!wanted || !lastModel) return "";
5315
+ for (const lane of LANE_ORDER) {
5316
+ for (const card of lastModel.lanes[lane] || []) {
5317
+ if (asString(card.id) === wanted) return card.title || wanted;
5318
+ }
5319
+ }
5320
+ return wanted;
5321
+ }
5322
+
5323
+ function openAgentsDialog() {
5324
+ closeHelp(false);
5325
+ closePlanDialog(false);
5326
+ closeAddDialog(false);
5327
+ closeDrawer(false);
5328
+ closeLimitsDialog(false);
5329
+
5330
+ const dialog = element(doc, "dialog", "hive-dialog hive-agents-dialog");
5331
+ setAttr(dialog, "role", "dialog");
5332
+ setAttr(dialog, "aria-modal", "true");
5333
+ setAttr(dialog, "aria-label", translate("pane.agents"));
5334
+ bindDialogDismiss(dialog, () => {
5335
+ closeModalDialog(dialog);
5336
+ if (!destroyed) focusNode(agentsCount);
5337
+ });
5338
+
5339
+ const head = element(doc, "div", "hive-dialog-head");
5340
+ const titleBox = element(doc, "div", "hive-dialog-head-title");
5341
+ titleBox.appendChild(element(doc, "h2", "hive-dialog-title", translate("pane.agents")));
5342
+ head.appendChild(titleBox);
5343
+ const closeButton = dialogCloseButton(() => {
5344
+ closeModalDialog(dialog);
5345
+ if (!destroyed) focusNode(agentsCount);
5346
+ });
5347
+ head.appendChild(closeButton);
5348
+ dialog.appendChild(head);
5349
+
5350
+ const body = element(doc, "div", "hive-dialog-body hive-agents-body");
5351
+ const agents = lastModel && Array.isArray(lastModel.agents) ? lastModel.agents : [];
5352
+ if (agents.length === 0) {
5353
+ body.appendChild(element(doc, "div", "hive-agents-empty-note", translate("agents.modalEmpty")));
5354
+ }
5355
+ for (const agent of agents) {
5356
+ const row = element(doc, "div", "hive-agent-row");
5357
+ const dot = element(doc, "span", "hive-dot is-" + safeClassToken(agent.state));
5358
+ setAttr(dot, "title", agent.state || translate("agent.idle"));
5359
+ row.appendChild(dot);
5360
+ const content = element(doc, "div", "hive-agent-row-main");
5361
+ content.appendChild(element(doc, "div", "hive-agent-row-name", agent.agent || translate("agent.unknown")));
5362
+ const task = taskTitleForId(agent.task);
5363
+ content.appendChild(
5364
+ element(doc, "div", "hive-agent-row-task", task || translate("agent.idle")),
5365
+ );
5366
+ const meta = [translate("agents.fileCount").replace("{count}", String((agent.files || []).length))];
5367
+ const activity = elapsedLabel(agent.updatedAt);
5368
+ if (activity) meta.push(activity);
5369
+ const metaNode = element(doc, "div", "hive-agent-row-meta", meta.join(" · "));
5370
+ if (agent.updatedAt) setAttr(metaNode, "title", agent.updatedAt);
5371
+ content.appendChild(metaNode);
5372
+ row.appendChild(content);
5373
+ body.appendChild(row);
5374
+ }
5375
+
5376
+ const supervisor = currentSupervisorRow();
5377
+ const workers = supervisor && Array.isArray(supervisor.workers) ? supervisor.workers : [];
5378
+ if (workers.length > 0) {
5379
+ body.appendChild(element(doc, "div", "hive-agents-workers-title", translate("agents.workersTitle")));
5380
+ for (const worker of workers) {
5381
+ const row = element(doc, "div", "hive-agent-worker-row");
5382
+ row.appendChild(
5383
+ element(doc, "div", "hive-agent-worker-task", taskTitleForId(worker.cardId) || worker.cardId),
5384
+ );
5385
+ const meta = [];
5386
+ if (worker.role) meta.push(worker.role);
5387
+ if (worker.startedAt) meta.push(translate("agents.workerStarted").replace("{time}", formatRunStamp(worker.startedAt)));
5388
+ const elapsed = elapsedLabel(worker.startedAt);
5389
+ if (elapsed) meta.push(translate("agents.workerElapsed").replace("{duration}", elapsed));
5390
+ row.appendChild(element(doc, "div", "hive-agent-worker-meta", meta.join(" · ") || worker.agentName || worker.agent || ""));
5391
+ body.appendChild(row);
5392
+ }
5393
+ }
5394
+
5395
+ const technical = element(doc, "details", "hive-agents-technical");
5396
+ technical.appendChild(element(doc, "summary", "hive-agents-technical-summary", translate("agents.technical")));
5397
+ technical.appendChild(
5398
+ element(doc, "pre", "hive-json hive-agents-technical-json", JSON.stringify({ agents, workers }, null, 2)),
5399
+ );
5400
+ body.appendChild(technical);
5401
+ dialog.appendChild(body);
5402
+
5403
+ showModalDialog(dialog);
5404
+ focusNode(closeButton);
5405
+ }
5406
+
5231
5407
  function openAgentDrawer(agent) {
5232
5408
  const raw = findRawAgent(agent) || { ...agent };
5233
5409
  const title = agent.agent || translate("agent.unknown");
@@ -5832,6 +6008,7 @@ function mount(root, options = {}) {
5832
6008
  function setSupervisorData(rows) {
5833
6009
  supervisorData = Array.isArray(rows) ? rows : [];
5834
6010
  renderSupervisor();
6011
+ if (lastModel) renderAgents(lastModel);
5835
6012
  }
5836
6013
 
5837
6014
  async function refreshSupervisor(force = false) {
@@ -5993,16 +6170,27 @@ function mount(root, options = {}) {
5993
6170
  agentsCount.disabled = true;
5994
6171
  return;
5995
6172
  }
5996
- const count = model.agents.length;
6173
+ const identities = model.agents.length;
6174
+ const row = currentSupervisorRow();
6175
+ const workers = supervisorWorkerCount(row);
6176
+ const running = workers !== null ? workers : identities;
6177
+ const claimed = asCount(model.stats.byState.claimed, (model.lanes.claimed || []).length);
6178
+ const waitingToReclaim = workers === 0 && claimed > 0;
5997
6179
  agentsCount.className = "hive-stat hive-agent-count";
5998
- agentsCount.textContent = translate("pane.agents") + " " + String(count);
5999
- const first = count > 0 ? model.agents[0] : null;
6180
+ agentsCount.textContent = waitingToReclaim
6181
+ ? translate("agents.waitingReclaim").replace("{count}", String(claimed))
6182
+ : translate("pane.agents") + " " + String(running);
6183
+ const first = identities > 0 ? model.agents[0] : null;
6000
6184
  agentsCount._agent = first;
6001
- agentsCount.disabled = !first;
6002
- const message = first
6003
- ? translate("agents.openAria") + " " + (first.agent || translate("agent.unknown"))
6004
- : translate("pane.agents");
6005
- const label = model.boardError || message;
6185
+ agentsCount.disabled = false;
6186
+ const message = waitingToReclaim
6187
+ ? translate("agents.waitingReclaimTooltip").replace("{count}", String(claimed))
6188
+ : workers !== null
6189
+ ? translate("agents.runningTooltip")
6190
+ .replace("{running}", String(running))
6191
+ .replace("{identities}", String(identities))
6192
+ : translate("agents.fallbackTooltip").replace("{identities}", String(identities));
6193
+ const label = model.boardError ? message + " · " + model.boardError : message;
6006
6194
  setAttr(agentsCount, "title", label);
6007
6195
  setAttr(agentsCount, "aria-label", label);
6008
6196
  }
@@ -6474,7 +6662,7 @@ function mount(root, options = {}) {
6474
6662
 
6475
6663
  return { mount: mount, renderModel: renderModel, messages: messages }
6476
6664
  })()
6477
- var HIVE_PANEL_CSS = "/*\n * hive-panel-ui\n * Dark-first, host-themed through four variables:\n * --hive-bg, --hive-fg, --hive-line, --hive-accent\n * Defaults live on a zero-specificity :root rule and every rule keeps a fallback,\n * so a host can override the variables on :root, body, a wrapper, or .hive.\n */\n\n.hive,\n.hive *,\n.hive *::before,\n.hive *::after {\n box-sizing: border-box;\n}\n\n.hive {\n /* Derived helpers; the four required variables use inline fallbacks. */\n --hive-fg-soft: color-mix(in srgb, var(--hive-fg) 62%, transparent);\n --hive-fg-faint: color-mix(in srgb, var(--hive-fg) 40%, transparent);\n --hive-surface: color-mix(in srgb, var(--hive-fg) 4%, transparent);\n --hive-surface-strong: color-mix(in srgb, var(--hive-fg) 8%, transparent);\n --hive-surface-hover: color-mix(in srgb, var(--hive-fg) 11%, transparent);\n --hive-accent-soft: color-mix(in srgb, var(--hive-accent) 17%, transparent);\n --hive-mono: ui-monospace, \"SFMono-Regular\", \"JetBrains Mono\", Menlo, Consolas, monospace;\n\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 480px;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-lg);\n background: var(--hive-bg);\n color: var(--hive-fg);\n font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n color-scheme: light dark;\n}\n\n.hive ::selection {\n background: color-mix(in srgb, var(--hive-accent) 35%, transparent);\n}\n\n/* ------------------------------------------------------------------ top bar */\n\n.hive-bar {\n display: flex;\n flex: 0 0 auto;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 12px;\n padding: 9px 14px;\n border-bottom: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 2%, transparent);\n}\n\n.hive-ident {\n display: flex;\n align-items: baseline;\n gap: 8px;\n min-width: 0;\n}\n\n.hive-brand {\n color: var(--hive-accent);\n font-size: 10px;\n font-weight: 750;\n letter-spacing: 0.18em;\n text-transform: uppercase;\n}\n\n.hive-repo {\n max-width: min(34vw, 360px);\n overflow: hidden;\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 11.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-time {\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.hive-badge {\n padding: 2px 8px;\n border: 1px solid var(--hive-line);\n border-radius: 999px;\n font-size: 10px;\n font-weight: 650;\n letter-spacing: 0.09em;\n line-height: 1.5;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-badge.is-free {\n border-color: color-mix(in srgb, var(--hive-accent) 45%, transparent);\n background: var(--hive-accent-soft);\n color: var(--hive-accent);\n}\n\n.hive-badge.is-freeze {\n border-color: color-mix(in srgb, var(--hive-warn) 45%, transparent);\n background: color-mix(in srgb, var(--hive-warn) 14%, transparent);\n color: var(--hive-warn);\n}\n\n.hive-badge.is-custom {\n color: var(--hive-fg-soft);\n}\n\n.hive-stats {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 5px;\n min-width: 0;\n}\n\n.hive-stat {\n padding: 1px 7px;\n border: 1px solid transparent;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface);\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n font-variant-numeric: tabular-nums;\n line-height: 1.7;\n white-space: nowrap;\n}\n\n.hive-stat strong {\n color: var(--hive-fg);\n font-weight: 650;\n}\n\n.hive-stat.is-total {\n color: var(--hive-fg);\n}\n\n.hive-stat.is-warn {\n color: var(--hive-warn);\n background: color-mix(in srgb, var(--hive-warn) 10%, transparent);\n}\n\n.hive-status {\n color: var(--hive-danger);\n font-size: 10px;\n font-weight: 700;\n letter-spacing: 0.09em;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-status:empty {\n display: none;\n}\n\n.hive-status::before {\n content: \"● \";\n font-size: 9px;\n}\n\n.hive-status.is-error {\n color: var(--hive-danger);\n}\n\n.hive-status.is-info {\n color: var(--hive-info);\n}\n\n.hive-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-left: auto;\n}\n\n/* ------------------------------------------------------------------ buttons */\n\n.hive-btn {\n appearance: none;\n padding: 4px 10px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface-strong);\n color: var(--hive-fg);\n font: inherit;\n font-size: 11.5px;\n font-weight: 550;\n line-height: 1.5;\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease, color 120ms ease;\n}\n\n.hive-btn:hover {\n border-color: color-mix(in srgb, var(--hive-accent) 55%, var(--hive-line));\n background: var(--hive-accent-soft);\n}\n\n.hive-btn:active {\n transform: translateY(1px);\n}\n\n.hive-btn:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 1px;\n}\n\n.hive-btn-ghost {\n padding: 3px 8px;\n border-color: transparent;\n background: transparent;\n color: var(--hive-fg-soft);\n font-size: 11px;\n}\n\n/* ------------------------------------------------------------------- layout */\n\n.hive-main {\n display: grid;\n flex: 1 1 auto;\n grid-template-columns: minmax(185px, 230px) minmax(0, 1fr) minmax(215px, 300px);\n min-height: 0;\n}\n\n.hive-pane {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n}\n\n.hive-agents {\n border-right: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 1.5%, transparent);\n}\n\n.hive-events {\n border-left: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 1.5%, transparent);\n}\n\n.hive-pane-head {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 7px;\n padding: 8px 12px;\n border-bottom: 1px solid var(--hive-line);\n color: var(--hive-fg-soft);\n font-size: 10px;\n font-weight: 650;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n}\n\n.hive-hint {\n color: var(--hive-fg-faint);\n font-size: 9.5px;\n font-weight: 500;\n letter-spacing: 0.04em;\n text-transform: none;\n}\n\n.hive-count {\n min-width: 18px;\n margin-left: auto;\n padding: 0 6px;\n border-radius: 999px;\n background: var(--hive-surface);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10px;\n font-variant-numeric: tabular-nums;\n line-height: 17px;\n text-align: center;\n}\n\n.hive-scroll {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 7px;\n min-height: 0;\n padding: 10px;\n overflow-x: hidden;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-empty {\n padding: 14px 10px;\n color: var(--hive-fg-faint);\n font-size: 11px;\n text-align: center;\n}\n\n/* ------------------------------------------------------------------- agents */\n\n.hive-agent {\n padding: 8px 10px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface);\n}\n\n.hive-agent-head {\n display: flex;\n align-items: center;\n gap: 7px;\n font-weight: 600;\n}\n\n.hive-agent-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-dot {\n width: 7px;\n height: 7px;\n flex: 0 0 auto;\n border-radius: 50%;\n background: var(--hive-fg-faint);\n box-shadow: none;\n}\n\n.hive-dot.is-working {\n background: var(--hive-accent);\n box-shadow: none;\n}\n\n.hive-dot.is-idle {\n background: var(--hive-fg-faint);\n}\n\n.hive-dot.is-failed {\n background: var(--hive-danger);\n}\n\n.hive-dot.is-done {\n background: var(--hive-ok);\n}\n\n.hive-meta {\n margin-top: 3px;\n overflow: hidden;\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-agent-files {\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n}\n\n/* -------------------------------------------------------------------- lanes */\n\n.hive-board { background: var(--hive-bg); }\n\n.hive-lanes {\n display: flex;\n flex: 1 1 auto;\n align-items: stretch;\n gap: 9px;\n min-height: 0;\n padding: 10px;\n overflow-x: auto;\n overflow-y: hidden;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-lane {\n display: flex;\n flex: 0 0 232px;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: color-mix(in srgb, var(--hive-fg) 2%, transparent);\n}\n\n.hive-lane-head {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 7px;\n padding: 8px 10px;\n border-bottom: 1px solid var(--hive-line);\n color: var(--hive-fg-soft);\n font-size: 10px;\n font-weight: 700;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n}\n\n.hive-lane-head::before {\n width: 3px;\n height: 10px;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-fg-faint);\n content: \"\";\n}\n\n.hive-lane-name {\n color: var(--hive-fg);\n}\n\n.hive-lane-pending .hive-lane-head::before {\n background: var(--hive-accent);\n}\n\n.hive-lane-claimed .hive-lane-head::before {\n background: var(--hive-info);\n}\n\n.hive-lane-done .hive-lane-head::before {\n background: var(--hive-ok);\n}\n\n.hive-lane-failed .hive-lane-head::before {\n background: var(--hive-danger);\n}\n\n.hive-lane-cards {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 7px;\n min-height: 0;\n padding: 7px;\n overflow-x: hidden;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-card {\n padding: 8px 9px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface);\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease;\n}\n\n.hive-card:hover {\n border-color: color-mix(in srgb, var(--hive-accent) 55%, var(--hive-line));\n background: var(--hive-surface-hover);\n}\n\n.hive-card:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 1px;\n}\n\n.hive-card-title {\n overflow-wrap: anywhere;\n font-size: 12.5px;\n font-weight: 600;\n line-height: 1.35;\n}\n\n.hive-card-meta {\n margin-top: 4px;\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n}\n\n.hive-scopes {\n display: flex;\n flex-wrap: wrap;\n gap: 3px;\n margin-top: 6px;\n}\n\n.hive-scope {\n max-width: 100%;\n overflow: hidden;\n padding: 1px 5px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface-strong);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-reason {\n margin-top: 6px;\n padding: 3px 6px;\n overflow-wrap: anywhere;\n border-left: 1px solid var(--hive-danger);\n border-radius: 0 var(--hive-radius-sm) var(--hive-radius-sm) 0;\n background: color-mix(in srgb, var(--hive-danger) 10%, transparent);\n color: color-mix(in srgb, var(--hive-danger) 82%, var(--hive-fg));\n font-size: 10.5px;\n}\n\n.hive-card-foot {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n margin-top: 7px;\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n}\n\n.hive-card-id,\n.hive-card-state {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-card-state {\n text-transform: uppercase;\n}\n\n/* ------------------------------------------------------------------- events */\n\n.hive-event {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n gap: 2px 7px;\n padding: 6px 7px;\n border: 1px solid transparent;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface);\n font-size: 10.5px;\n}\n\n.hive-event-time {\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.hive-event-kind {\n justify-self: start;\n overflow: hidden;\n color: var(--hive-accent);\n font-weight: 600;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-event-text {\n grid-column: 1 / -1;\n overflow-wrap: anywhere;\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10px;\n}\n\n/* ------------------------------------------------------------------- drawer */\n\n.hive-drawer {\n position: fixed;\n z-index: 2147483000;\n top: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n width: min(440px, 92vw);\n border-left: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-bg) 97%, var(--hive-fg) 3%);\n color: var(--hive-fg);\n box-shadow: none;\n font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n color-scheme: light dark;\n animation: hive-drawer-in 150ms ease-out;\n}\n\n.hive-drawer-head {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 14px;\n border-bottom: 1px solid var(--hive-line);\n}\n\n.hive-drawer-titlebox {\n min-width: 0;\n}\n\n.hive-drawer-eyebrow {\n overflow: hidden;\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n letter-spacing: 0.05em;\n text-overflow: ellipsis;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-drawer-title {\n margin: 3px 0 0;\n overflow-wrap: anywhere;\n color: var(--hive-fg);\n font-size: 15px;\n font-weight: 650;\n line-height: 1.35;\n}\n\n.hive-drawer-head .hive-btn-ghost {\n flex: 0 0 auto;\n margin-left: auto;\n}\n\n.hive-drawer-body {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 10px;\n min-height: 0;\n padding: 14px;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-actions-row {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.hive-note {\n color: var(--hive-fg-faint);\n font-size: 11px;\n}\n\n.hive-section-label {\n margin-top: 2px;\n color: var(--hive-fg-faint);\n font-size: 9.5px;\n font-weight: 650;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n}\n\n.hive-json {\n max-height: 55vh;\n margin: 0;\n padding: 10px;\n overflow: auto;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: color-mix(in srgb, var(--hive-fg) 3%, transparent);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10.5px;\n line-height: 1.55;\n overflow-wrap: anywhere;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n white-space: pre-wrap;\n}\n\n@keyframes hive-drawer-in {\n from {\n opacity: 0;\n transform: translateX(18px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .hive-card,\n .hive-btn {\n transition: none;\n }\n\n .hive-drawer {\n animation: none;\n }\n}\n\n/* ------------------------------------------------------------------ compact */\n\n@media (max-width: 920px) {\n .hive {\n min-height: 100dvh;\n height: 100dvh;\n border-radius: 0;\n }\n\n .hive-main {\n grid-template-columns: minmax(0, 1fr);\n grid-template-rows: minmax(110px, 17vh) minmax(280px, 1fr) minmax(120px, 20vh);\n }\n\n .hive-agents {\n border-right: 0;\n border-bottom: 1px solid var(--hive-line);\n }\n\n .hive-events {\n border-top: 1px solid var(--hive-line);\n border-left: 0;\n }\n\n .hive-agent-list {\n flex-direction: row;\n overflow-x: auto;\n overflow-y: hidden;\n }\n\n .hive-agent {\n flex: 0 0 190px;\n }\n\n .hive-drawer {\n width: 100vw;\n }\n}\n/* DSH design-token bridge. Neutral grayscale fallbacks keep standalone pages readable. */\n.hive, .hive-portal, .hive-dialog {\n --hive-bg: var(--dsw-alias-bg-base, #fff);\n --hive-bg-layer-1: var(--dsw-alias-bg-layer-1, #fff);\n --hive-bg-layer-2: var(--dsw-alias-bg-layer-2, #fff);\n --hive-bg-layer-3: var(--dsw-alias-bg-layer-3, #f5f5f5);\n --hive-line: var(--dsw-alias-border-l1, #d9d9d9);\n --hive-line-2: var(--dsw-alias-border-l2, #e8e8e8);\n --hive-fg: var(--dsw-alias-label-primary, #000);\n --hive-fg-soft: var(--dsw-alias-label-secondary, #4d4d4d);\n --hive-fg-faint: var(--dsw-alias-label-tertiary, #808080);\n --hive-accent: var(--dsw-alias-brand-primary, #000);\n --hive-hover: var(--dsw-alias-interactive-bg-hover, #f2f2f2);\n --hive-selected: var(--dsw-alias-border-selected, #000);\n --hive-danger: var(--dsw-alias-state-error-primary, #000);\n --hive-ok: var(--dsw-alias-state-success-primary, #000);\n --hive-warn: var(--dsw-alias-state-warn-primary, #000);\n --hive-info: var(--dsw-alias-brand-primary, #000);\n --hive-radius-sm: var(--dsw-radius-sm, 4px);\n --hive-radius-md: var(--dsw-radius-md, 8px);\n --hive-radius-lg: var(--dsw-radius-lg, 12px);\n --hive-elevation: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n --hive-surface: var(--hive-bg-layer-1);\n --hive-surface-strong: var(--hive-bg-layer-2);\n --hive-surface-hover: var(--hive-hover);\n --hive-accent-soft: color-mix(in srgb, var(--hive-accent) 14%, transparent);\n --hive-label-on-brand: var(--hive-bg);\n --hive-mono: ui-monospace, \"SFMono-Regular\", \"JetBrains Mono\", Menlo, Consolas, monospace;\n}\n\n/* Tokenized component treatment. */\n.hive { background: var(--hive-bg); color: var(--hive-fg); border-color: var(--hive-line); border-radius: var(--hive-radius-lg); }\n.hive-bar { background: var(--hive-bg-layer-1); border-bottom-color: var(--hive-line); gap: 8px; }\n.hive-main,\n.hive-board { background: var(--hive-bg); }\n.hive-agents,\n.hive-events { background: var(--hive-bg-layer-1); border-color: var(--hive-line); }\n.hive-lane { background: var(--hive-bg-layer-1); border-color: var(--hive-line); border-radius: var(--hive-radius-md); }\n.hive-card { background: var(--hive-bg-layer-1); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-md); box-shadow: none; }\n.hive-card:hover { background: var(--hive-hover); border-color: var(--hive-line); }\n.hive-btn { background: transparent; border: 1px solid var(--hive-line); color: var(--hive-fg); border-radius: var(--hive-radius-md); }\n.hive-btn:hover { background: var(--hive-hover); border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-btn-ghost { background: transparent; border-color: transparent; color: var(--hive-fg-soft); }\n.hive-btn-ghost:hover { background: var(--hive-hover); border-color: transparent; color: var(--hive-fg); }\n.hive-btn-danger { background: transparent; border-color: var(--hive-danger); color: var(--hive-danger); }\n.hive-btn-danger:hover:not(:disabled) { background: var(--hive-hover); border-color: var(--hive-danger); color: var(--hive-danger); }\n.hive-settings-primary,\n.hive-add-submit { background: var(--hive-accent); border-color: var(--hive-accent); color: var(--hive-label-on-brand); }\n.hive-settings-primary:hover:not(:disabled),\n.hive-add-submit:hover:not(:disabled) { background: var(--hive-accent); border-color: var(--hive-accent); color: var(--hive-label-on-brand); }\n.hive-settings-secondary { background: transparent; border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-settings-secondary:hover { background: var(--hive-hover); border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-input,\n.hive-textarea,\n.hive-limits-input { background: var(--hive-bg-layer-1); border: 1px solid var(--hive-line); color: var(--hive-fg); border-radius: var(--hive-radius-sm); }\n.hive-input:focus,\n.hive-textarea:focus,\n.hive-limits-input:focus { outline: 1px solid var(--hive-selected); outline-offset: 0; }\n.hive-dialog,\n.hive-add-dialog,\n.hive-settings-dialog,\n.hive-card-dialog { background: var(--hive-bg-layer-2); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-lg); box-shadow: var(--hive-elevation); color: var(--hive-fg); }\n.hive-toast { background: var(--hive-bg-layer-2); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-lg); box-shadow: none; color: var(--hive-fg); }\n.hive-drawer { background: var(--hive-bg-layer-2); border-left: 1px solid var(--hive-line); box-shadow: none; }\n.hive-json,\n.hive-plan-raw,\n.hive-plan-item,\n.hive-scope,\n.hive-init-card,\n.hive-limits-error,\n.hive-settings-note { background: var(--hive-bg-layer-1); border-color: var(--hive-line); border-radius: var(--hive-radius-sm); }\n.hive-limits-row { border-top-color: var(--hive-line-2); }\n.hive-limits-row:not(.is-head):hover { background: var(--hive-hover); }\n.hive-settings-tab[aria-selected=\"true\"] { border-bottom-color: var(--hive-selected); }\n.hive-lane-head,\n.hive-dialog-head,\n.hive-dialog-foot,\n.hive-drawer-head,\n.hive-settings-tabs { border-color: var(--hive-line-2); }\n.hive-freeze-banner { background: transparent; border-bottom-color: var(--hive-warn); color: var(--hive-warn); }\n.hive-freeze-banner .hive-btn { background: transparent; border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-queen-hint { background: var(--hive-bg-layer-1); border-color: var(--hive-line); }\n.hive-supervisor-inline,\n.hive-stat,\n.hive-status,\n.hive-queen-badge {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 22px;\n padding: 0 8px;\n border: 1px solid var(--hive-line);\n border-radius: 999px;\n background: transparent;\n color: var(--hive-fg-soft);\n font-size: 12px;\n font-weight: 400;\n line-height: 1;\n white-space: nowrap;\n}\n.hive-supervisor-inline { gap: 6px; }\n.hive-supervisor-inline-label { color: var(--hive-fg-soft); font-weight: 400; }\n.hive-supervisor-inline-state { display: inline-flex; align-items: center; gap: 6px; color: var(--hive-fg-soft); font-size: 12px; font-weight: 400; }\n.hive-supervisor-inline-state::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--hive-fg-faint); content: \"\"; }\n.hive-supervisor-inline-state.is-running::before { background: var(--hive-accent); }\n.hive-supervisor-inline-state.is-backoff::before { background: var(--hive-warn); }\n.hive-supervisor-inline-state.is-paused::before { background: var(--hive-fg-faint); }\n.hive-supervisor-inline-resume { height: auto; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--hive-fg-soft); font-size: 12px; line-height: 1; }\n.hive-supervisor-inline-resume:hover { background: transparent; color: var(--hive-fg); }\n.hive-stats { flex-wrap: wrap; gap: 8px; }\n.hive-stat.is-warn { color: var(--hive-fg-soft); background: transparent; }\n.hive-stat strong { color: var(--hive-fg-soft); font-weight: 400; }\n.hive-status { color: var(--hive-fg-soft); }\n.hive-status::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--hive-danger); content: \"\"; font-size: 0; }\n.hive-status.is-info::before { background: var(--hive-accent); }\n.hive-queen-badge { color: var(--hive-fg-soft); }\n\n\n.hive-portal {\n position: fixed;\n inset: 0;\n z-index: 2147483600;\n pointer-events: none;\n}\n\n.hive-portal > .hive-overlay { pointer-events: auto; }\n\n/* Buttons: two explicit tiers. */\n.hive-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n height: 28px;\n padding: 0 12px;\n border: 1px solid var(--hive-line-2);\n border-radius: var(--hive-radius-md);\n background: transparent;\n color: var(--hive-fg);\n font-size: 14px;\n font-weight: 600;\n line-height: 1.5;\n}\n\n.hive-btn:hover {\n border-color: var(--hive-line-2);\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-btn-ghost {\n border-color: transparent;\n background: transparent;\n color: var(--hive-fg-soft);\n}\n\n.hive-btn-ghost:hover {\n border-color: transparent;\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-btn-danger {\n border-color: var(--hive-danger);\n background: transparent;\n color: var(--hive-danger);\n}\n\n.hive-btn-danger:hover:not(:disabled) {\n border-color: var(--hive-danger);\n background: var(--hive-hover);\n color: var(--hive-danger);\n}\n\n.hive-settings-primary,\n.hive-add-submit {\n border-color: var(--hive-accent);\n background: var(--hive-accent);\n color: var(--hive-label-on-brand);\n font-weight: 600;\n}\n\n.hive-settings-primary:hover:not(:disabled),\n.hive-add-submit:hover:not(:disabled) {\n border-color: var(--hive-accent);\n background: color-mix(in srgb, var(--hive-accent) 92%, #000);\n color: var(--hive-label-on-brand);\n}\n\n.hive-settings-primary:active:not(:disabled),\n.hive-add-submit:active:not(:disabled) {\n border-color: var(--hive-accent);\n background: color-mix(in srgb, var(--hive-accent) 84%, #000);\n color: var(--hive-label-on-brand);\n}\n\n.hive-settings-primary:focus-visible,\n.hive-add-submit:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 2px;\n}\n\n.hive-settings-secondary {\n border-color: var(--hive-line-2);\n background: transparent;\n color: var(--hive-fg);\n}\n\n.hive-settings-secondary:hover {\n border-color: var(--hive-line-2);\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-icon-button,\n.hive-dialog-close {\n height: 28px;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--hive-fg-soft);\n}\n\n.hive-icon-button:hover,\n.hive-dialog-close:hover {\n border: 0;\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-role-remove {\n height: 28px;\n min-height: 28px;\n padding: 0;\n border-color: transparent;\n background: transparent;\n color: var(--hive-danger);\n}\n\n/* Dialogs are portaled to the document body; keep them above the panel. */\n.hive-dialog,\n.hive-add-dialog,\n.hive-settings-dialog,\n.hive-card-dialog {\n border: 1px solid var(--hive-line);\n background: var(--hive-bg-layer-2);\n box-shadow: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n}\n\n/* toolbar action rhythm */\n.hive-actions { gap: 8px; }\n.hive-actions > .hive-btn { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }\n\n/* Dialog form containment: portal content must not create horizontal scroll. */\n.hive-portal,\n.hive-portal *,\n.hive-portal *::before,\n.hive-portal *::after { box-sizing: border-box; }\n\n.hive-portal .hive-dialog { max-width: 92vw; overflow-x: hidden; }\n.hive-portal .hive-dialog-head,\n.hive-portal .hive-dialog-body,\n.hive-portal .hive-dialog-foot { padding-left: 16px; padding-right: 16px; }\n.hive-portal .hive-dialog-body { width: auto; min-width: 0; max-width: 100%; }\n.hive-portal .hive-dialog-body > * { margin-left: 0; margin-right: 0; max-width: 100%; min-width: 0; }\n.hive-portal .hive-field,\n.hive-portal .hive-field-row,\n.hive-portal .hive-settings-section,\n.hive-portal .hive-settings-tabpanel,\n.hive-portal .hive-limits-table { width: 100%; max-width: 100%; min-width: 0; margin-left: 0; margin-right: 0; }\n.hive-portal .hive-field-row > .hive-field { width: auto; flex: 1 1 160px; }\n.hive-portal .hive-input,\n.hive-portal .hive-textarea,\n.hive-portal select { width: 100%; min-width: 0; max-width: 100%; }\n.hive-portal .hive-limits-row {\n width: 100%;\n max-width: 100%;\n min-width: 0;\n grid-template-columns: minmax(0, 1fr) 96px 48px 48px 28px;\n}\n.hive-portal .hive-limits-cell,\n.hive-portal .hive-limits-role,\n.hive-portal .hive-dialog-title,\n.hive-portal .hive-card-subline,\n.hive-portal .hive-settings-role-name { min-width: 0; overflow-wrap: anywhere; }\n.hive-portal .hive-dialog-foot { flex-wrap: wrap; }\n\n.hive-portal .hive-dialog-body { overflow-x: hidden; }\n.hive-portal .hive-settings-tabs { flex-wrap: wrap; }\n.hive-portal .hive-card-actions,\n.hive-portal .hive-settings-form-actions { max-width: 100%; }\n\n/* Native <dialog>: top layer, browser-managed backdrop and focus trap. */\n.hive-dialog,\n.hive-dialog *,\n.hive-dialog *::before,\n.hive-dialog *::after { box-sizing: border-box; }\n\ndialog.hive-dialog {\n position: fixed;\n inset: 0;\n margin: auto;\n padding: 0;\n width: min(560px, 100%);\n max-width: 92vw;\n max-height: 80vh;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-lg);\n background: var(--hive-bg-layer-2);\n color: var(--hive-fg);\n box-shadow: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n color-scheme: light dark;\n}\n\ndialog.hive-card-dialog { width: min(720px, 92vw); }\n\ndialog.hive-dialog::backdrop {\n background: var(--dsw-alias-bg-mask-1, rgba(0, 0, 0, 0.24));\n backdrop-filter: var(--dsw-mask-blur, none);\n}\n\ndialog.hive-dialog .hive-dialog-head,\ndialog.hive-dialog .hive-dialog-body,\ndialog.hive-dialog .hive-dialog-foot { padding-left: 16px; padding-right: 16px; }\ndialog.hive-dialog .hive-dialog-body { width: auto; min-width: 0; max-width: 100%; overflow-x: hidden; }\ndialog.hive-dialog .hive-dialog-body > * { margin-left: 0; margin-right: 0; max-width: 100%; min-width: 0; }\ndialog.hive-dialog .hive-field,\ndialog.hive-dialog .hive-field-row,\ndialog.hive-dialog .hive-settings-section,\ndialog.hive-dialog .hive-settings-tabpanel,\ndialog.hive-dialog .hive-limits-table { width: 100%; max-width: 100%; min-width: 0; margin-left: 0; margin-right: 0; }\ndialog.hive-dialog .hive-field-row > .hive-field { width: auto; flex: 1 1 160px; }\ndialog.hive-dialog .hive-input,\ndialog.hive-dialog .hive-textarea,\ndialog.hive-dialog select { width: 100%; min-width: 0; max-width: 100%; }\ndialog.hive-dialog .hive-limits-row {\n width: 100%;\n max-width: 100%;\n min-width: 0;\n grid-template-columns: minmax(0, 1fr) 96px 48px 48px 28px;\n}\ndialog.hive-dialog .hive-limits-cell,\ndialog.hive-dialog .hive-limits-role,\ndialog.hive-dialog .hive-dialog-title,\ndialog.hive-dialog .hive-card-subline,\ndialog.hive-dialog .hive-settings-role-name { min-width: 0; overflow-wrap: anywhere; }\ndialog.hive-dialog .hive-dialog-foot { flex-wrap: wrap; }\n\ndialog.hive-dialog {\n display: flex;\n flex-direction: column;\n max-height: 80vh;\n}\ndialog.hive-dialog .hive-dialog-head,\ndialog.hive-dialog .hive-dialog-foot { flex: 0 0 auto; }\ndialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow: auto; }\n.hive-card-run-output { max-height: 20lh; overflow: auto; }\n.hive-card-actions { flex-wrap: wrap; justify-content: flex-end; }\n\n/* Virtual lanes: fixed 26px cards, 2px gaps, 28px stride. */\n.hive-lane-cards {\n display: block;\n flex: 1 1 auto;\n min-height: 0;\n padding: 7px;\n overflow-x: hidden;\n overflow-y: auto;\n}\n.hive-lane-virtual { position: relative; width: 100%; min-width: 0; }\n.hive-lane-virtual .hive-card {\n position: absolute;\n left: 0;\n right: 0;\n display: flex;\n align-items: center;\n height: 26px;\n min-height: 26px;\n padding: 2px 8px;\n overflow: hidden;\n border-radius: var(--hive-radius-sm);\n}\n.hive-lane-virtual .hive-card-title {\n width: 100%;\n overflow: hidden;\n font-size: 12px;\n line-height: 16px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-agent-count { font: inherit; cursor: pointer; }\n.hive-agent-count:disabled { cursor: default; }\n\n\n/* The DSH design-token bridge is bundled in panel.css; this file is kept for package layout compatibility. */\n"
6665
+ var HIVE_PANEL_CSS = "/*\n * hive-panel-ui\n * Dark-first, host-themed through four variables:\n * --hive-bg, --hive-fg, --hive-line, --hive-accent\n * Defaults live on a zero-specificity :root rule and every rule keeps a fallback,\n * so a host can override the variables on :root, body, a wrapper, or .hive.\n */\n\n.hive,\n.hive *,\n.hive *::before,\n.hive *::after {\n box-sizing: border-box;\n}\n\n.hive {\n /* Derived helpers; the four required variables use inline fallbacks. */\n --hive-fg-soft: color-mix(in srgb, var(--hive-fg) 62%, transparent);\n --hive-fg-faint: color-mix(in srgb, var(--hive-fg) 40%, transparent);\n --hive-surface: color-mix(in srgb, var(--hive-fg) 4%, transparent);\n --hive-surface-strong: color-mix(in srgb, var(--hive-fg) 8%, transparent);\n --hive-surface-hover: color-mix(in srgb, var(--hive-fg) 11%, transparent);\n --hive-accent-soft: color-mix(in srgb, var(--hive-accent) 17%, transparent);\n --hive-mono: ui-monospace, \"SFMono-Regular\", \"JetBrains Mono\", Menlo, Consolas, monospace;\n\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 480px;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-lg);\n background: var(--hive-bg);\n color: var(--hive-fg);\n font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n color-scheme: light dark;\n}\n\n.hive ::selection {\n background: color-mix(in srgb, var(--hive-accent) 35%, transparent);\n}\n\n/* ------------------------------------------------------------------ top bar */\n\n.hive-bar {\n display: flex;\n flex: 0 0 auto;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 12px;\n padding: 9px 14px;\n border-bottom: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 2%, transparent);\n}\n\n.hive-ident {\n display: flex;\n align-items: baseline;\n gap: 8px;\n min-width: 0;\n}\n\n.hive-brand {\n color: var(--hive-accent);\n font-size: 10px;\n font-weight: 750;\n letter-spacing: 0.18em;\n text-transform: uppercase;\n}\n\n.hive-repo {\n max-width: min(34vw, 360px);\n overflow: hidden;\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 11.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-time {\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.hive-badge {\n padding: 2px 8px;\n border: 1px solid var(--hive-line);\n border-radius: 999px;\n font-size: 10px;\n font-weight: 650;\n letter-spacing: 0.09em;\n line-height: 1.5;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-badge.is-free {\n border-color: color-mix(in srgb, var(--hive-accent) 45%, transparent);\n background: var(--hive-accent-soft);\n color: var(--hive-accent);\n}\n\n.hive-badge.is-freeze {\n border-color: color-mix(in srgb, var(--hive-warn) 45%, transparent);\n background: color-mix(in srgb, var(--hive-warn) 14%, transparent);\n color: var(--hive-warn);\n}\n\n.hive-badge.is-custom {\n color: var(--hive-fg-soft);\n}\n\n.hive-stats {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 5px;\n min-width: 0;\n}\n\n.hive-stat {\n padding: 1px 7px;\n border: 1px solid transparent;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface);\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n font-variant-numeric: tabular-nums;\n line-height: 1.7;\n white-space: nowrap;\n}\n\n.hive-stat strong {\n color: var(--hive-fg);\n font-weight: 650;\n}\n\n.hive-stat.is-total {\n color: var(--hive-fg);\n}\n\n.hive-stat.is-warn {\n color: var(--hive-warn);\n background: color-mix(in srgb, var(--hive-warn) 10%, transparent);\n}\n\n.hive-status {\n color: var(--hive-danger);\n font-size: 10px;\n font-weight: 700;\n letter-spacing: 0.09em;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-status:empty {\n display: none;\n}\n\n.hive-status::before {\n content: \"● \";\n font-size: 9px;\n}\n\n.hive-status.is-error {\n color: var(--hive-danger);\n}\n\n.hive-status.is-info {\n color: var(--hive-info);\n}\n\n.hive-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-left: auto;\n}\n\n/* ------------------------------------------------------------------ buttons */\n\n.hive-btn {\n appearance: none;\n padding: 4px 10px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface-strong);\n color: var(--hive-fg);\n font: inherit;\n font-size: 11.5px;\n font-weight: 550;\n line-height: 1.5;\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease, color 120ms ease;\n}\n\n.hive-btn:hover {\n border-color: color-mix(in srgb, var(--hive-accent) 55%, var(--hive-line));\n background: var(--hive-accent-soft);\n}\n\n.hive-btn:active {\n transform: translateY(1px);\n}\n\n.hive-btn:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 1px;\n}\n\n.hive-btn-ghost {\n padding: 3px 8px;\n border-color: transparent;\n background: transparent;\n color: var(--hive-fg-soft);\n font-size: 11px;\n}\n\n/* ------------------------------------------------------------------- layout */\n\n.hive-main {\n display: grid;\n flex: 1 1 auto;\n grid-template-columns: minmax(185px, 230px) minmax(0, 1fr) minmax(215px, 300px);\n min-height: 0;\n}\n\n.hive-pane {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n}\n\n.hive-agents {\n border-right: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 1.5%, transparent);\n}\n\n.hive-events {\n border-left: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 1.5%, transparent);\n}\n\n.hive-pane-head {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 7px;\n padding: 8px 12px;\n border-bottom: 1px solid var(--hive-line);\n color: var(--hive-fg-soft);\n font-size: 10px;\n font-weight: 650;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n}\n\n.hive-hint {\n color: var(--hive-fg-faint);\n font-size: 9.5px;\n font-weight: 500;\n letter-spacing: 0.04em;\n text-transform: none;\n}\n\n.hive-count {\n min-width: 18px;\n margin-left: auto;\n padding: 0 6px;\n border-radius: 999px;\n background: var(--hive-surface);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10px;\n font-variant-numeric: tabular-nums;\n line-height: 17px;\n text-align: center;\n}\n\n.hive-scroll {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 7px;\n min-height: 0;\n padding: 10px;\n overflow-x: hidden;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-empty {\n padding: 14px 10px;\n color: var(--hive-fg-faint);\n font-size: 11px;\n text-align: center;\n}\n\n/* ------------------------------------------------------------------- agents */\n\n.hive-agent {\n padding: 8px 10px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface);\n}\n\n.hive-agent-head {\n display: flex;\n align-items: center;\n gap: 7px;\n font-weight: 600;\n}\n\n.hive-agent-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-dot {\n width: 7px;\n height: 7px;\n flex: 0 0 auto;\n border-radius: 50%;\n background: var(--hive-fg-faint);\n box-shadow: none;\n}\n\n.hive-dot.is-working {\n background: var(--hive-accent);\n box-shadow: none;\n}\n\n.hive-dot.is-idle {\n background: var(--hive-fg-faint);\n}\n\n.hive-dot.is-failed {\n background: var(--hive-danger);\n}\n\n.hive-dot.is-done {\n background: var(--hive-ok);\n}\n\n.hive-meta {\n margin-top: 3px;\n overflow: hidden;\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-agent-files {\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n}\n\n/* -------------------------------------------------------------------- lanes */\n\n.hive-board { background: var(--hive-bg); }\n\n.hive-lanes {\n display: flex;\n flex: 1 1 auto;\n align-items: stretch;\n gap: 9px;\n min-height: 0;\n padding: 10px;\n overflow-x: auto;\n overflow-y: hidden;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-lane {\n display: flex;\n flex: 0 0 232px;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: color-mix(in srgb, var(--hive-fg) 2%, transparent);\n}\n\n.hive-lane-head {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 7px;\n padding: 8px 10px;\n border-bottom: 1px solid var(--hive-line);\n color: var(--hive-fg-soft);\n font-size: 10px;\n font-weight: 700;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n}\n\n.hive-lane-head::before {\n width: 3px;\n height: 10px;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-fg-faint);\n content: \"\";\n}\n\n.hive-lane-name {\n color: var(--hive-fg);\n}\n\n.hive-lane-pending .hive-lane-head::before {\n background: var(--hive-accent);\n}\n\n.hive-lane-claimed .hive-lane-head::before {\n background: var(--hive-info);\n}\n\n.hive-lane-done .hive-lane-head::before {\n background: var(--hive-ok);\n}\n\n.hive-lane-failed .hive-lane-head::before {\n background: var(--hive-danger);\n}\n\n.hive-lane-cards {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 7px;\n min-height: 0;\n padding: 7px;\n overflow-x: hidden;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-card {\n padding: 8px 9px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface);\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease;\n}\n\n.hive-card:hover {\n border-color: color-mix(in srgb, var(--hive-accent) 55%, var(--hive-line));\n background: var(--hive-surface-hover);\n}\n\n.hive-card:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 1px;\n}\n\n.hive-card-title {\n overflow-wrap: anywhere;\n font-size: 12.5px;\n font-weight: 600;\n line-height: 1.35;\n}\n\n.hive-card-meta {\n margin-top: 4px;\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n}\n\n.hive-scopes {\n display: flex;\n flex-wrap: wrap;\n gap: 3px;\n margin-top: 6px;\n}\n\n.hive-scope {\n max-width: 100%;\n overflow: hidden;\n padding: 1px 5px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface-strong);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-reason {\n margin-top: 6px;\n padding: 3px 6px;\n overflow-wrap: anywhere;\n border-left: 1px solid var(--hive-danger);\n border-radius: 0 var(--hive-radius-sm) var(--hive-radius-sm) 0;\n background: color-mix(in srgb, var(--hive-danger) 10%, transparent);\n color: color-mix(in srgb, var(--hive-danger) 82%, var(--hive-fg));\n font-size: 10.5px;\n}\n\n.hive-card-foot {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n margin-top: 7px;\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n}\n\n.hive-card-id,\n.hive-card-state {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-card-state {\n text-transform: uppercase;\n}\n\n/* ------------------------------------------------------------------- events */\n\n.hive-event {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n gap: 2px 7px;\n padding: 6px 7px;\n border: 1px solid transparent;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface);\n font-size: 10.5px;\n}\n\n.hive-event-time {\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.hive-event-kind {\n justify-self: start;\n overflow: hidden;\n color: var(--hive-accent);\n font-weight: 600;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-event-text {\n grid-column: 1 / -1;\n overflow-wrap: anywhere;\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10px;\n}\n\n/* ------------------------------------------------------------------- drawer */\n\n.hive-drawer {\n position: fixed;\n z-index: 2147483000;\n top: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n width: min(440px, 92vw);\n border-left: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-bg) 97%, var(--hive-fg) 3%);\n color: var(--hive-fg);\n box-shadow: none;\n font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n color-scheme: light dark;\n animation: hive-drawer-in 150ms ease-out;\n}\n\n.hive-drawer-head {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 14px;\n border-bottom: 1px solid var(--hive-line);\n}\n\n.hive-drawer-titlebox {\n min-width: 0;\n}\n\n.hive-drawer-eyebrow {\n overflow: hidden;\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n letter-spacing: 0.05em;\n text-overflow: ellipsis;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-drawer-title {\n margin: 3px 0 0;\n overflow-wrap: anywhere;\n color: var(--hive-fg);\n font-size: 15px;\n font-weight: 650;\n line-height: 1.35;\n}\n\n.hive-drawer-head .hive-btn-ghost {\n flex: 0 0 auto;\n margin-left: auto;\n}\n\n.hive-drawer-body {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 10px;\n min-height: 0;\n padding: 14px;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-actions-row {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.hive-note {\n color: var(--hive-fg-faint);\n font-size: 11px;\n}\n\n.hive-section-label {\n margin-top: 2px;\n color: var(--hive-fg-faint);\n font-size: 9.5px;\n font-weight: 650;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n}\n\n.hive-json {\n max-height: 55vh;\n margin: 0;\n padding: 10px;\n overflow: auto;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: color-mix(in srgb, var(--hive-fg) 3%, transparent);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10.5px;\n line-height: 1.55;\n overflow-wrap: anywhere;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n white-space: pre-wrap;\n}\n\n@keyframes hive-drawer-in {\n from {\n opacity: 0;\n transform: translateX(18px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .hive-card,\n .hive-btn {\n transition: none;\n }\n\n .hive-drawer {\n animation: none;\n }\n}\n\n/* ------------------------------------------------------------------ compact */\n\n@media (max-width: 920px) {\n .hive {\n min-height: 100dvh;\n height: 100dvh;\n border-radius: 0;\n }\n\n .hive-main {\n grid-template-columns: minmax(0, 1fr);\n grid-template-rows: minmax(110px, 17vh) minmax(280px, 1fr) minmax(120px, 20vh);\n }\n\n .hive-agents {\n border-right: 0;\n border-bottom: 1px solid var(--hive-line);\n }\n\n .hive-events {\n border-top: 1px solid var(--hive-line);\n border-left: 0;\n }\n\n .hive-agent-list {\n flex-direction: row;\n overflow-x: auto;\n overflow-y: hidden;\n }\n\n .hive-agent {\n flex: 0 0 190px;\n }\n\n .hive-drawer {\n width: 100vw;\n }\n}\n/* DSH design-token bridge. Neutral grayscale fallbacks keep standalone pages readable. */\n.hive, .hive-portal, .hive-dialog {\n --hive-bg: var(--dsw-alias-bg-base, #fff);\n --hive-bg-layer-1: var(--dsw-alias-bg-layer-1, #fff);\n --hive-bg-layer-2: var(--dsw-alias-bg-layer-2, #fff);\n --hive-bg-layer-3: var(--dsw-alias-bg-layer-3, #f5f5f5);\n --hive-line: var(--dsw-alias-border-l1, #d9d9d9);\n --hive-line-2: var(--dsw-alias-border-l2, #e8e8e8);\n --hive-fg: var(--dsw-alias-label-primary, #000);\n --hive-fg-soft: var(--dsw-alias-label-secondary, #4d4d4d);\n --hive-fg-faint: var(--dsw-alias-label-tertiary, #808080);\n --hive-accent: var(--dsw-alias-brand-primary, #000);\n --hive-hover: var(--dsw-alias-interactive-bg-hover, #f2f2f2);\n --hive-selected: var(--dsw-alias-border-selected, #000);\n --hive-danger: var(--dsw-alias-state-error-primary, #000);\n --hive-ok: var(--dsw-alias-state-success-primary, #000);\n --hive-warn: var(--dsw-alias-state-warn-primary, #000);\n --hive-info: var(--dsw-alias-brand-primary, #000);\n --hive-radius-sm: var(--dsw-radius-sm, 4px);\n --hive-radius-md: var(--dsw-radius-md, 8px);\n --hive-radius-lg: var(--dsw-radius-lg, 12px);\n --hive-elevation: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n --hive-surface: var(--hive-bg-layer-1);\n --hive-surface-strong: var(--hive-bg-layer-2);\n --hive-surface-hover: var(--hive-hover);\n --hive-accent-soft: color-mix(in srgb, var(--hive-accent) 14%, transparent);\n --hive-label-on-brand: var(--hive-bg);\n --hive-mono: ui-monospace, \"SFMono-Regular\", \"JetBrains Mono\", Menlo, Consolas, monospace;\n}\n\n/* Tokenized component treatment. */\n.hive { background: var(--hive-bg); color: var(--hive-fg); border-color: var(--hive-line); border-radius: var(--hive-radius-lg); }\n.hive-bar { background: var(--hive-bg-layer-1); border-bottom-color: var(--hive-line); gap: 8px; }\n.hive-main,\n.hive-board { background: var(--hive-bg); }\n.hive-agents,\n.hive-events { background: var(--hive-bg-layer-1); border-color: var(--hive-line); }\n.hive-lane { background: var(--hive-bg-layer-1); border-color: var(--hive-line); border-radius: var(--hive-radius-md); }\n.hive-card { background: var(--hive-bg-layer-1); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-md); box-shadow: none; }\n.hive-card:hover { background: var(--hive-hover); border-color: var(--hive-line); }\n.hive-btn { background: transparent; border: 1px solid var(--hive-line); color: var(--hive-fg); border-radius: var(--hive-radius-md); }\n.hive-btn:hover { background: var(--hive-hover); border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-btn-ghost { background: transparent; border-color: transparent; color: var(--hive-fg-soft); }\n.hive-btn-ghost:hover { background: var(--hive-hover); border-color: transparent; color: var(--hive-fg); }\n.hive-btn-danger { background: transparent; border-color: var(--hive-danger); color: var(--hive-danger); }\n.hive-btn-danger:hover:not(:disabled) { background: var(--hive-hover); border-color: var(--hive-danger); color: var(--hive-danger); }\n.hive-settings-primary,\n.hive-add-submit { background: var(--hive-accent); border-color: var(--hive-accent); color: var(--hive-label-on-brand); }\n.hive-settings-primary:hover:not(:disabled),\n.hive-add-submit:hover:not(:disabled) { background: var(--hive-accent); border-color: var(--hive-accent); color: var(--hive-label-on-brand); }\n.hive-settings-secondary { background: transparent; border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-settings-secondary:hover { background: var(--hive-hover); border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-input,\n.hive-textarea,\n.hive-limits-input { background: var(--hive-bg-layer-1); border: 1px solid var(--hive-line); color: var(--hive-fg); border-radius: var(--hive-radius-sm); }\n.hive-input:focus,\n.hive-textarea:focus,\n.hive-limits-input:focus { outline: 1px solid var(--hive-selected); outline-offset: 0; }\n.hive-dialog,\n.hive-add-dialog,\n.hive-settings-dialog,\n.hive-card-dialog { background: var(--hive-bg-layer-2); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-lg); box-shadow: var(--hive-elevation); color: var(--hive-fg); }\n.hive-toast { background: var(--hive-bg-layer-2); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-lg); box-shadow: none; color: var(--hive-fg); }\n.hive-drawer { background: var(--hive-bg-layer-2); border-left: 1px solid var(--hive-line); box-shadow: none; }\n.hive-json,\n.hive-plan-raw,\n.hive-plan-item,\n.hive-scope,\n.hive-init-card,\n.hive-limits-error,\n.hive-settings-note { background: var(--hive-bg-layer-1); border-color: var(--hive-line); border-radius: var(--hive-radius-sm); }\n.hive-limits-row { border-top-color: var(--hive-line-2); }\n.hive-limits-row:not(.is-head):hover { background: var(--hive-hover); }\n.hive-settings-tab[aria-selected=\"true\"] { border-bottom-color: var(--hive-selected); }\n.hive-lane-head,\n.hive-dialog-head,\n.hive-dialog-foot,\n.hive-drawer-head,\n.hive-settings-tabs { border-color: var(--hive-line-2); }\n.hive-freeze-banner { background: transparent; border-bottom-color: var(--hive-warn); color: var(--hive-warn); }\n.hive-freeze-banner .hive-btn { background: transparent; border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-queen-hint { background: var(--hive-bg-layer-1); border-color: var(--hive-line); }\n.hive-supervisor-inline,\n.hive-stat,\n.hive-status,\n.hive-queen-badge {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 22px;\n padding: 0 8px;\n border: 1px solid var(--hive-line);\n border-radius: 999px;\n background: transparent;\n color: var(--hive-fg-soft);\n font-size: 12px;\n font-weight: 400;\n line-height: 1;\n white-space: nowrap;\n}\n.hive-supervisor-inline { gap: 6px; }\n.hive-supervisor-inline-label { color: var(--hive-fg-soft); font-weight: 400; }\n.hive-supervisor-inline-state { display: inline-flex; align-items: center; gap: 6px; color: var(--hive-fg-soft); font-size: 12px; font-weight: 400; }\n.hive-supervisor-inline-state::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--hive-fg-faint); content: \"\"; }\n.hive-supervisor-inline-state.is-running::before { background: var(--hive-accent); }\n.hive-supervisor-inline-state.is-backoff::before { background: var(--hive-warn); }\n.hive-supervisor-inline-state.is-paused::before { background: var(--hive-fg-faint); }\n.hive-supervisor-inline-resume { height: auto; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--hive-fg-soft); font-size: 12px; line-height: 1; }\n.hive-supervisor-inline-resume:hover { background: transparent; color: var(--hive-fg); }\n.hive-stats { flex-wrap: wrap; gap: 8px; }\n.hive-stat.is-warn { color: var(--hive-fg-soft); background: transparent; }\n.hive-stat strong { color: var(--hive-fg-soft); font-weight: 400; }\n.hive-status { color: var(--hive-fg-soft); }\n.hive-status::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--hive-danger); content: \"\"; font-size: 0; }\n.hive-status.is-info::before { background: var(--hive-accent); }\n.hive-queen-badge { color: var(--hive-fg-soft); }\n\n\n.hive-portal {\n position: fixed;\n inset: 0;\n z-index: 2147483600;\n pointer-events: none;\n}\n\n.hive-portal > .hive-overlay { pointer-events: auto; }\n\n/* Buttons: two explicit tiers. */\n.hive-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n height: 28px;\n padding: 0 12px;\n border: 1px solid var(--hive-line-2);\n border-radius: var(--hive-radius-md);\n background: transparent;\n color: var(--hive-fg);\n font-size: 14px;\n font-weight: 600;\n line-height: 1.5;\n}\n\n.hive-btn:hover {\n border-color: var(--hive-line-2);\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-btn-ghost {\n border-color: transparent;\n background: transparent;\n color: var(--hive-fg-soft);\n}\n\n.hive-btn-ghost:hover {\n border-color: transparent;\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-btn-danger {\n border-color: var(--hive-danger);\n background: transparent;\n color: var(--hive-danger);\n}\n\n.hive-btn-danger:hover:not(:disabled) {\n border-color: var(--hive-danger);\n background: var(--hive-hover);\n color: var(--hive-danger);\n}\n\n.hive-settings-primary,\n.hive-add-submit {\n border-color: var(--hive-accent);\n background: var(--hive-accent);\n color: var(--hive-label-on-brand);\n font-weight: 600;\n}\n\n.hive-settings-primary:hover:not(:disabled),\n.hive-add-submit:hover:not(:disabled) {\n border-color: var(--hive-accent);\n background: color-mix(in srgb, var(--hive-accent) 92%, #000);\n color: var(--hive-label-on-brand);\n}\n\n.hive-settings-primary:active:not(:disabled),\n.hive-add-submit:active:not(:disabled) {\n border-color: var(--hive-accent);\n background: color-mix(in srgb, var(--hive-accent) 84%, #000);\n color: var(--hive-label-on-brand);\n}\n\n.hive-settings-primary:focus-visible,\n.hive-add-submit:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 2px;\n}\n\n.hive-settings-secondary {\n border-color: var(--hive-line-2);\n background: transparent;\n color: var(--hive-fg);\n}\n\n.hive-settings-secondary:hover {\n border-color: var(--hive-line-2);\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-icon-button,\n.hive-dialog-close {\n height: 28px;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--hive-fg-soft);\n}\n\n.hive-icon-button:hover,\n.hive-dialog-close:hover {\n border: 0;\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-role-remove {\n height: 28px;\n min-height: 28px;\n padding: 0;\n border-color: transparent;\n background: transparent;\n color: var(--hive-danger);\n}\n\n/* Dialogs are portaled to the document body; keep them above the panel. */\n.hive-dialog,\n.hive-add-dialog,\n.hive-settings-dialog,\n.hive-card-dialog {\n border: 1px solid var(--hive-line);\n background: var(--hive-bg-layer-2);\n box-shadow: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n}\n\n/* toolbar action rhythm */\n.hive-actions { gap: 8px; }\n.hive-actions > .hive-btn { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }\n\n/* Dialog form containment: portal content must not create horizontal scroll. */\n.hive-portal,\n.hive-portal *,\n.hive-portal *::before,\n.hive-portal *::after { box-sizing: border-box; }\n\n.hive-portal .hive-dialog { max-width: 92vw; overflow-x: hidden; }\n.hive-portal .hive-dialog-head,\n.hive-portal .hive-dialog-body,\n.hive-portal .hive-dialog-foot { padding-left: 16px; padding-right: 16px; }\n.hive-portal .hive-dialog-body { width: auto; min-width: 0; max-width: 100%; }\n.hive-portal .hive-dialog-body > * { margin-left: 0; margin-right: 0; max-width: 100%; min-width: 0; }\n.hive-portal .hive-field,\n.hive-portal .hive-field-row,\n.hive-portal .hive-settings-section,\n.hive-portal .hive-settings-tabpanel,\n.hive-portal .hive-limits-table { width: 100%; max-width: 100%; min-width: 0; margin-left: 0; margin-right: 0; }\n.hive-portal .hive-field-row > .hive-field { width: auto; flex: 1 1 160px; }\n.hive-portal .hive-input,\n.hive-portal .hive-textarea,\n.hive-portal select { width: 100%; min-width: 0; max-width: 100%; }\n.hive-portal .hive-limits-row {\n width: 100%;\n max-width: 100%;\n min-width: 0;\n grid-template-columns: minmax(0, 1fr) 96px 48px 48px 28px;\n}\n.hive-portal .hive-limits-cell,\n.hive-portal .hive-limits-role,\n.hive-portal .hive-dialog-title,\n.hive-portal .hive-card-subline,\n.hive-portal .hive-settings-role-name { min-width: 0; overflow-wrap: anywhere; }\n.hive-portal .hive-dialog-foot { flex-wrap: wrap; }\n\n.hive-portal .hive-dialog-body { overflow-x: hidden; }\n.hive-portal .hive-settings-tabs { flex-wrap: wrap; }\n.hive-portal .hive-card-actions,\n.hive-portal .hive-settings-form-actions { max-width: 100%; }\n\n/* Native <dialog>: top layer, browser-managed backdrop and focus trap. */\n.hive-dialog,\n.hive-dialog *,\n.hive-dialog *::before,\n.hive-dialog *::after { box-sizing: border-box; }\n\ndialog.hive-dialog {\n position: fixed;\n inset: 0;\n margin: auto;\n padding: 0;\n width: min(560px, 100%);\n max-width: 92vw;\n max-height: 80vh;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-lg);\n background: var(--hive-bg-layer-2);\n color: var(--hive-fg);\n box-shadow: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n color-scheme: light dark;\n}\n\ndialog.hive-card-dialog { width: min(720px, 92vw); }\n\ndialog.hive-dialog::backdrop {\n background: var(--dsw-alias-bg-mask-1, rgba(0, 0, 0, 0.24));\n backdrop-filter: var(--dsw-mask-blur, none);\n}\n\ndialog.hive-dialog .hive-dialog-head,\ndialog.hive-dialog .hive-dialog-body,\ndialog.hive-dialog .hive-dialog-foot { padding-left: 16px; padding-right: 16px; }\ndialog.hive-dialog .hive-dialog-body { width: auto; min-width: 0; max-width: 100%; overflow-x: hidden; }\ndialog.hive-dialog .hive-dialog-body > * { margin-left: 0; margin-right: 0; max-width: 100%; min-width: 0; }\ndialog.hive-dialog .hive-field,\ndialog.hive-dialog .hive-field-row,\ndialog.hive-dialog .hive-settings-section,\ndialog.hive-dialog .hive-settings-tabpanel,\ndialog.hive-dialog .hive-limits-table { width: 100%; max-width: 100%; min-width: 0; margin-left: 0; margin-right: 0; }\ndialog.hive-dialog .hive-field-row > .hive-field { width: auto; flex: 1 1 160px; }\ndialog.hive-dialog .hive-input,\ndialog.hive-dialog .hive-textarea,\ndialog.hive-dialog select { width: 100%; min-width: 0; max-width: 100%; }\ndialog.hive-dialog .hive-limits-row {\n width: 100%;\n max-width: 100%;\n min-width: 0;\n grid-template-columns: minmax(0, 1fr) 96px 48px 48px 28px;\n}\ndialog.hive-dialog .hive-limits-cell,\ndialog.hive-dialog .hive-limits-role,\ndialog.hive-dialog .hive-dialog-title,\ndialog.hive-dialog .hive-card-subline,\ndialog.hive-dialog .hive-settings-role-name { min-width: 0; overflow-wrap: anywhere; }\ndialog.hive-dialog .hive-dialog-foot { flex-wrap: wrap; }\n\ndialog.hive-dialog {\n display: flex;\n flex-direction: column;\n max-height: 80vh;\n}\ndialog.hive-dialog .hive-dialog-head,\ndialog.hive-dialog .hive-dialog-foot { flex: 0 0 auto; }\ndialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow: auto; }\n.hive-card-run-output { max-height: 20lh; overflow: auto; }\n.hive-card-actions { flex-wrap: wrap; justify-content: flex-end; }\n\n/* Virtual lanes: fixed 26px cards, 2px gaps, 28px stride. */\n.hive-lane-cards {\n display: block;\n flex: 1 1 auto;\n min-height: 0;\n padding: 7px;\n overflow-x: hidden;\n overflow-y: auto;\n}\n.hive-lane-virtual { position: relative; width: 100%; min-width: 0; }\n.hive-lane-virtual .hive-card {\n position: absolute;\n left: 0;\n right: 0;\n display: flex;\n align-items: center;\n height: 26px;\n min-height: 26px;\n padding: 2px 8px;\n overflow: hidden;\n border-radius: var(--hive-radius-sm);\n}\n.hive-lane-virtual .hive-card-title {\n width: 100%;\n overflow: hidden;\n font-size: 12px;\n line-height: 16px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-agent-count { font: inherit; cursor: pointer; }\n.hive-agent-count:disabled { cursor: default; }\n\n/* Agents dialog */\n.hive-agents-dialog { width: min(560px, 92vw); max-height: 80vh; }\n.hive-agents-body { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }\n.hive-agents-empty-note { padding: 10px 0; color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; }\n.hive-agent-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--hive-line-2); }\n.hive-agent-row-main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }\n.hive-agent-row-name { color: var(--hive-fg); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }\n.hive-agent-row-task { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }\n.hive-agent-row-meta { color: var(--hive-fg-faint); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }\n.hive-agents-workers-title { padding-top: 4px; color: var(--hive-fg); font-size: 14px; font-weight: 700; line-height: 1.5; }\n.hive-agent-worker-row { padding: 8px 0; border-bottom: 1px solid var(--hive-line-2); }\n.hive-agent-worker-task { color: var(--hive-fg); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }\n.hive-agent-worker-meta { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }\n.hive-agents-technical { border-top: 1px solid var(--hive-line-2); padding-top: 8px; }\n.hive-agents-technical-summary { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; cursor: pointer; }\n.hive-agents-technical-json { max-height: 220px; margin-top: 8px; }\n\n\n/* The DSH design-token bridge is bundled in panel.css; this file is kept for package layout compatibility. */\n"
6478
6666
  function ensureHivePanelCss() {
6479
6667
  if (typeof document === 'undefined') return
6480
6668
  if (document.querySelector('style[data-hive-panel-css]') !== null) return
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-hive-panel",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Hive board and queen mode inside DSH Web: a conversation view scoped to the Session's repository, with allowlisted task-card actions over DSH's shell seam.",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
package/src/panel.css CHANGED
@@ -1131,3 +1131,20 @@ dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow:
1131
1131
  .hive-agent-count { font: inherit; cursor: pointer; }
1132
1132
  .hive-agent-count:disabled { cursor: default; }
1133
1133
 
1134
+ /* Agents dialog */
1135
+ .hive-agents-dialog { width: min(560px, 92vw); max-height: 80vh; }
1136
+ .hive-agents-body { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }
1137
+ .hive-agents-empty-note { padding: 10px 0; color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; }
1138
+ .hive-agent-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--hive-line-2); }
1139
+ .hive-agent-row-main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
1140
+ .hive-agent-row-name { color: var(--hive-fg); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
1141
+ .hive-agent-row-task { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
1142
+ .hive-agent-row-meta { color: var(--hive-fg-faint); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
1143
+ .hive-agents-workers-title { padding-top: 4px; color: var(--hive-fg); font-size: 14px; font-weight: 700; line-height: 1.5; }
1144
+ .hive-agent-worker-row { padding: 8px 0; border-bottom: 1px solid var(--hive-line-2); }
1145
+ .hive-agent-worker-task { color: var(--hive-fg); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
1146
+ .hive-agent-worker-meta { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
1147
+ .hive-agents-technical { border-top: 1px solid var(--hive-line-2); padding-top: 8px; }
1148
+ .hive-agents-technical-summary { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; cursor: pointer; }
1149
+ .hive-agents-technical-json { max-height: 220px; margin-top: 8px; }
1150
+
package/src/panel.js CHANGED
@@ -2017,6 +2017,22 @@ dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow:
2017
2017
  }
2018
2018
  .hive-agent-count { font: inherit; cursor: pointer; }
2019
2019
  .hive-agent-count:disabled { cursor: default; }
2020
+ /* Agents dialog */
2021
+ .hive-agents-dialog { width: min(560px, 92vw); max-height: 80vh; }
2022
+ .hive-agents-body { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }
2023
+ .hive-agents-empty-note { padding: 10px 0; color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; }
2024
+ .hive-agent-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--hive-line-2); }
2025
+ .hive-agent-row-main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
2026
+ .hive-agent-row-name { color: var(--hive-fg); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
2027
+ .hive-agent-row-task { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
2028
+ .hive-agent-row-meta { color: var(--hive-fg-faint); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
2029
+ .hive-agents-workers-title { padding-top: 4px; color: var(--hive-fg); font-size: 14px; font-weight: 700; line-height: 1.5; }
2030
+ .hive-agent-worker-row { padding: 8px 0; border-bottom: 1px solid var(--hive-line-2); }
2031
+ .hive-agent-worker-task { color: var(--hive-fg); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
2032
+ .hive-agent-worker-meta { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
2033
+ .hive-agents-technical { border-top: 1px solid var(--hive-line-2); padding-top: 8px; }
2034
+ .hive-agents-technical-summary { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; cursor: pointer; }
2035
+ .hive-agents-technical-json { max-height: 220px; margin-top: 8px; }
2020
2036
  `;
2021
2037
 
2022
2038
  const LANE_LABEL_KEYS = Object.freeze({
@@ -2075,6 +2091,16 @@ export const messages = Object.freeze({
2075
2091
  "status.actionFailed": "action failed",
2076
2092
  "status.disconnected": "disconnected",
2077
2093
  "agents.openAria": "Open agent",
2094
+ "agents.runningTooltip": "Running {running} / board identities {identities}",
2095
+ "agents.fallbackTooltip": "Board identities {identities} (supervisor disconnected or repository not registered)",
2096
+ "agents.modalEmpty": "No agents.",
2097
+ "agents.fileCount": "{count} files",
2098
+ "agents.workersTitle": "Active work units",
2099
+ "agents.workerStarted": "Started {time}",
2100
+ "agents.workerElapsed": "Running for {duration}",
2101
+ "agents.technical": "Technical details",
2102
+ "agents.waitingReclaim": "Waiting to reclaim {count}",
2103
+ "agents.waitingReclaimTooltip": "{count} tasks are claimed but no agent is running (waiting to be reclaimed after a process restart)",
2078
2104
  "agent.idle": "idle",
2079
2105
  "agent.task": "task",
2080
2106
  "agent.unknown": "unknown",
@@ -2316,6 +2342,16 @@ export const messages = Object.freeze({
2316
2342
  "status.actionFailed": "操作失败",
2317
2343
  "status.disconnected": "连接断开",
2318
2344
  "agents.openAria": "打开智能体",
2345
+ "agents.runningTooltip": "运行中 {running} / 公告板身份 {identities}",
2346
+ "agents.fallbackTooltip": "公告板身份 {identities}(监督器未连接或未注册该仓库)",
2347
+ "agents.modalEmpty": "暂无智能体。",
2348
+ "agents.fileCount": "{count} 个文件",
2349
+ "agents.workersTitle": "运行中的工作单元",
2350
+ "agents.workerStarted": "开始于 {time}",
2351
+ "agents.workerElapsed": "已运行 {duration}",
2352
+ "agents.technical": "技术详情",
2353
+ "agents.waitingReclaim": "等待回收 {count}",
2354
+ "agents.waitingReclaimTooltip": "有 {count} 个任务被认领但当前没有运行中的工作单元(进程重启后等待回收)",
2319
2355
  "agent.idle": "空闲",
2320
2356
  "agent.task": "任务",
2321
2357
  "agent.unknown": "未知",
@@ -2889,7 +2925,7 @@ function normalizeSupervisorRoles(source) {
2889
2925
  const ensure = (role) => {
2890
2926
  const name = asString(role).trim();
2891
2927
  if (!name) return null;
2892
- if (!rows.has(name)) rows.set(name, { role: name, limit: null, inFlight: null, queued: null });
2928
+ if (!rows.has(name)) rows.set(name, { role: name, limit: null, live: null, inFlight: null, queued: null });
2893
2929
  return rows.get(name);
2894
2930
  };
2895
2931
  const setLimit = (role, value) => {
@@ -2923,6 +2959,12 @@ function normalizeSupervisorRoles(source) {
2923
2959
  break;
2924
2960
  }
2925
2961
  }
2962
+ for (const field of ["live", "liveCount", "live_count", "workers", "workerCount"]) {
2963
+ if (supervisorNumber(raw[field]) !== null) {
2964
+ row.live = supervisorNumber(raw[field]);
2965
+ break;
2966
+ }
2967
+ }
2926
2968
  for (const field of ["queued", "queue", "queued_count", "pending", "pending_count", "waiting", "waiting_count", "backlog"]) {
2927
2969
  if (supervisorNumber(raw[field]) !== null) {
2928
2970
  row.queued = supervisorNumber(raw[field]);
@@ -3009,6 +3051,26 @@ function supervisorEntriesFrom(payload, depth = 0) {
3009
3051
  }
3010
3052
 
3011
3053
  /** Normalize the supervisor status endpoint into per-repository rows. */
3054
+ function normalizeSupervisorWorkers(source) {
3055
+ const raw = source && Array.isArray(source.workers) ? source.workers : [];
3056
+ const rows = [];
3057
+ for (const entry of raw) {
3058
+ if (!isRecord(entry)) continue;
3059
+ const cardId = asString(entry.cardId || entry.card || entry.task || entry.id);
3060
+ if (!cardId) continue;
3061
+ rows.push({
3062
+ cardId,
3063
+ role: asString(entry.role),
3064
+ agent: asString(entry.agent || entry.adapter),
3065
+ agentName: asString(entry.agentName || entry.agent_name || entry.name),
3066
+ sessionId: asString(entry.sessionId || entry.session_id),
3067
+ startedAt: asString(entry.startedAt || entry.started_at),
3068
+ lastOutputAt: asString(entry.lastOutputAt || entry.last_output_at),
3069
+ });
3070
+ }
3071
+ return rows;
3072
+ }
3073
+
3012
3074
  function normalizeSupervisorStatus(payload) {
3013
3075
  const rows = new Map();
3014
3076
  for (const raw of supervisorEntriesFrom(payload)) {
@@ -3031,11 +3093,30 @@ function normalizeSupervisorStatus(payload) {
3031
3093
  else if (/run|active|busy|working/.test(rawState)) state = "running";
3032
3094
  else if (/idle|ready|free/.test(rawState)) state = "idle";
3033
3095
  else if (running !== null && running > 0) state = "running";
3034
- rows.set(repo, { repo, state, running, roles: normalizeSupervisorRoles(source) });
3096
+ rows.set(repo, { repo, state, running, roles: normalizeSupervisorRoles(source), workers: normalizeSupervisorWorkers(source) });
3035
3097
  }
3036
3098
  return [...rows.values()].sort((left, right) => left.repo.localeCompare(right.repo));
3037
3099
  }
3038
3100
 
3101
+ function supervisorWorkerCount(row) {
3102
+ if (!row) return null;
3103
+ if (Array.isArray(row.workers) && row.workers.length > 0) return row.workers.length;
3104
+ const direct = supervisorNumber(row.running);
3105
+ if (direct !== null) return direct;
3106
+ let total = 0;
3107
+ let found = false;
3108
+ for (const role of Array.isArray(row.roles) ? row.roles : []) {
3109
+ if (!isRecord(role)) continue;
3110
+ const live = supervisorNumber(role.live);
3111
+ const inFlight = live !== null ? live : supervisorNumber(role.inFlight);
3112
+ if (inFlight !== null) {
3113
+ total += inFlight;
3114
+ found = true;
3115
+ }
3116
+ }
3117
+ return found ? total : null;
3118
+ }
3119
+
3039
3120
  function element(doc, tag, className, text) {
3040
3121
  const node = doc.createElement(tag);
3041
3122
  if (className) node.className = className;
@@ -3563,7 +3644,7 @@ export function mount(root, options = {}) {
3563
3644
  const agentsCount = element(doc, "button", "hive-stat hive-agent-count");
3564
3645
  setAttr(agentsCount, "type", "button");
3565
3646
  agentsCount.addEventListener("click", () => {
3566
- if (agentsCount._agent) openAgentDrawer(agentsCount._agent);
3647
+ openAgentsDialog();
3567
3648
  });
3568
3649
  bar.appendChild(agentsCount);
3569
3650
 
@@ -5155,6 +5236,101 @@ export function mount(root, options = {}) {
5155
5236
  return body;
5156
5237
  }
5157
5238
 
5239
+ function taskTitleForId(id) {
5240
+ const wanted = asString(id);
5241
+ if (!wanted || !lastModel) return "";
5242
+ for (const lane of LANE_ORDER) {
5243
+ for (const card of lastModel.lanes[lane] || []) {
5244
+ if (asString(card.id) === wanted) return card.title || wanted;
5245
+ }
5246
+ }
5247
+ return wanted;
5248
+ }
5249
+
5250
+ function openAgentsDialog() {
5251
+ closeHelp(false);
5252
+ closePlanDialog(false);
5253
+ closeAddDialog(false);
5254
+ closeDrawer(false);
5255
+ closeLimitsDialog(false);
5256
+
5257
+ const dialog = element(doc, "dialog", "hive-dialog hive-agents-dialog");
5258
+ setAttr(dialog, "role", "dialog");
5259
+ setAttr(dialog, "aria-modal", "true");
5260
+ setAttr(dialog, "aria-label", translate("pane.agents"));
5261
+ bindDialogDismiss(dialog, () => {
5262
+ closeModalDialog(dialog);
5263
+ if (!destroyed) focusNode(agentsCount);
5264
+ });
5265
+
5266
+ const head = element(doc, "div", "hive-dialog-head");
5267
+ const titleBox = element(doc, "div", "hive-dialog-head-title");
5268
+ titleBox.appendChild(element(doc, "h2", "hive-dialog-title", translate("pane.agents")));
5269
+ head.appendChild(titleBox);
5270
+ const closeButton = dialogCloseButton(() => {
5271
+ closeModalDialog(dialog);
5272
+ if (!destroyed) focusNode(agentsCount);
5273
+ });
5274
+ head.appendChild(closeButton);
5275
+ dialog.appendChild(head);
5276
+
5277
+ const body = element(doc, "div", "hive-dialog-body hive-agents-body");
5278
+ const agents = lastModel && Array.isArray(lastModel.agents) ? lastModel.agents : [];
5279
+ if (agents.length === 0) {
5280
+ body.appendChild(element(doc, "div", "hive-agents-empty-note", translate("agents.modalEmpty")));
5281
+ }
5282
+ for (const agent of agents) {
5283
+ const row = element(doc, "div", "hive-agent-row");
5284
+ const dot = element(doc, "span", "hive-dot is-" + safeClassToken(agent.state));
5285
+ setAttr(dot, "title", agent.state || translate("agent.idle"));
5286
+ row.appendChild(dot);
5287
+ const content = element(doc, "div", "hive-agent-row-main");
5288
+ content.appendChild(element(doc, "div", "hive-agent-row-name", agent.agent || translate("agent.unknown")));
5289
+ const task = taskTitleForId(agent.task);
5290
+ content.appendChild(
5291
+ element(doc, "div", "hive-agent-row-task", task || translate("agent.idle")),
5292
+ );
5293
+ const meta = [translate("agents.fileCount").replace("{count}", String((agent.files || []).length))];
5294
+ const activity = elapsedLabel(agent.updatedAt);
5295
+ if (activity) meta.push(activity);
5296
+ const metaNode = element(doc, "div", "hive-agent-row-meta", meta.join(" · "));
5297
+ if (agent.updatedAt) setAttr(metaNode, "title", agent.updatedAt);
5298
+ content.appendChild(metaNode);
5299
+ row.appendChild(content);
5300
+ body.appendChild(row);
5301
+ }
5302
+
5303
+ const supervisor = currentSupervisorRow();
5304
+ const workers = supervisor && Array.isArray(supervisor.workers) ? supervisor.workers : [];
5305
+ if (workers.length > 0) {
5306
+ body.appendChild(element(doc, "div", "hive-agents-workers-title", translate("agents.workersTitle")));
5307
+ for (const worker of workers) {
5308
+ const row = element(doc, "div", "hive-agent-worker-row");
5309
+ row.appendChild(
5310
+ element(doc, "div", "hive-agent-worker-task", taskTitleForId(worker.cardId) || worker.cardId),
5311
+ );
5312
+ const meta = [];
5313
+ if (worker.role) meta.push(worker.role);
5314
+ if (worker.startedAt) meta.push(translate("agents.workerStarted").replace("{time}", formatRunStamp(worker.startedAt)));
5315
+ const elapsed = elapsedLabel(worker.startedAt);
5316
+ if (elapsed) meta.push(translate("agents.workerElapsed").replace("{duration}", elapsed));
5317
+ row.appendChild(element(doc, "div", "hive-agent-worker-meta", meta.join(" · ") || worker.agentName || worker.agent || ""));
5318
+ body.appendChild(row);
5319
+ }
5320
+ }
5321
+
5322
+ const technical = element(doc, "details", "hive-agents-technical");
5323
+ technical.appendChild(element(doc, "summary", "hive-agents-technical-summary", translate("agents.technical")));
5324
+ technical.appendChild(
5325
+ element(doc, "pre", "hive-json hive-agents-technical-json", JSON.stringify({ agents, workers }, null, 2)),
5326
+ );
5327
+ body.appendChild(technical);
5328
+ dialog.appendChild(body);
5329
+
5330
+ showModalDialog(dialog);
5331
+ focusNode(closeButton);
5332
+ }
5333
+
5158
5334
  function openAgentDrawer(agent) {
5159
5335
  const raw = findRawAgent(agent) || { ...agent };
5160
5336
  const title = agent.agent || translate("agent.unknown");
@@ -5759,6 +5935,7 @@ export function mount(root, options = {}) {
5759
5935
  function setSupervisorData(rows) {
5760
5936
  supervisorData = Array.isArray(rows) ? rows : [];
5761
5937
  renderSupervisor();
5938
+ if (lastModel) renderAgents(lastModel);
5762
5939
  }
5763
5940
 
5764
5941
  async function refreshSupervisor(force = false) {
@@ -5920,16 +6097,27 @@ export function mount(root, options = {}) {
5920
6097
  agentsCount.disabled = true;
5921
6098
  return;
5922
6099
  }
5923
- const count = model.agents.length;
6100
+ const identities = model.agents.length;
6101
+ const row = currentSupervisorRow();
6102
+ const workers = supervisorWorkerCount(row);
6103
+ const running = workers !== null ? workers : identities;
6104
+ const claimed = asCount(model.stats.byState.claimed, (model.lanes.claimed || []).length);
6105
+ const waitingToReclaim = workers === 0 && claimed > 0;
5924
6106
  agentsCount.className = "hive-stat hive-agent-count";
5925
- agentsCount.textContent = translate("pane.agents") + " " + String(count);
5926
- const first = count > 0 ? model.agents[0] : null;
6107
+ agentsCount.textContent = waitingToReclaim
6108
+ ? translate("agents.waitingReclaim").replace("{count}", String(claimed))
6109
+ : translate("pane.agents") + " " + String(running);
6110
+ const first = identities > 0 ? model.agents[0] : null;
5927
6111
  agentsCount._agent = first;
5928
- agentsCount.disabled = !first;
5929
- const message = first
5930
- ? translate("agents.openAria") + " " + (first.agent || translate("agent.unknown"))
5931
- : translate("pane.agents");
5932
- const label = model.boardError || message;
6112
+ agentsCount.disabled = false;
6113
+ const message = waitingToReclaim
6114
+ ? translate("agents.waitingReclaimTooltip").replace("{count}", String(claimed))
6115
+ : workers !== null
6116
+ ? translate("agents.runningTooltip")
6117
+ .replace("{running}", String(running))
6118
+ .replace("{identities}", String(identities))
6119
+ : translate("agents.fallbackTooltip").replace("{identities}", String(identities));
6120
+ const label = model.boardError ? message + " · " + model.boardError : message;
5933
6121
  setAttr(agentsCount, "title", label);
5934
6122
  setAttr(agentsCount, "aria-label", label);
5935
6123
  }