@wrongstack/tui 1.0.12 → 1.0.13

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.
@@ -1,12 +1,12 @@
1
- import type React from "react";
2
- import type { RailSpanEntry } from "./powerline-rail.js";
3
- import type { StatusBarProps } from "./status-bar-types.js";
4
- import type { StatuslineItem } from "./statusline-picker.js";
5
- import { type StatusBarRailBuildParams } from "./status-bar-rails-common.js";
6
- export type { StatusBarRailBuildParams } from "./status-bar-rails-common.js";
7
- export { densityBounds } from "./status-bar-rails-common.js";
8
- export { buildSafetyWorkEntries } from "./status-bar-rails-safety.js";
9
- export { buildAsyncChipEntries } from "./status-bar-rails-async.js";
1
+ import type React from 'react';
2
+ import type { RailSpanEntry } from './powerline-rail.js';
3
+ import { type StatusBarRailBuildParams } from './status-bar-rails-common.js';
4
+ import type { StatusBarProps } from './status-bar-types.js';
5
+ import type { StatuslineItem } from './statusline-picker.js';
6
+ export { buildAsyncChipEntries } from './status-bar-rails-async.js';
7
+ export type { StatusBarRailBuildParams } from './status-bar-rails-common.js';
8
+ export { densityBounds } from './status-bar-rails-common.js';
9
+ export { buildSafetyWorkEntries } from './status-bar-rails-safety.js';
10
10
  export declare function buildWorkspaceChipEntries(p: StatusBarRailBuildParams, modelStatusChip: React.ReactElement | null, modelShortChip?: React.ReactElement | null, modelMicroChip?: React.ReactElement | null): RailSpanEntry[];
11
11
  /**
12
12
  * The per-turn telemetry chips. Formerly a single 90-column composite whose
package/dist/index.js CHANGED
@@ -42786,8 +42786,227 @@ function icon(glyph2, isNoColor) {
42786
42786
  return isNoColor ? "" : `${glyph2} `;
42787
42787
  }
42788
42788
 
42789
- // src/components/status-bar-rails-safety.tsx
42789
+ // src/components/status-bar-rails-async.tsx
42790
42790
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
42791
+ function buildMailboxDetailEntries(p, mailbox, showMailbox) {
42792
+ const { isNoColor } = p;
42793
+ if (!mailbox || !showMailbox) return [];
42794
+ const clients = (short) => {
42795
+ const parts = [];
42796
+ if (mailbox.onlineClients.tui > 0) {
42797
+ parts.push(
42798
+ `${glyphs.desktop} TUI${mailbox.onlineClients.tui > 1 ? `\xD7${mailbox.onlineClients.tui}` : ""}`
42799
+ );
42800
+ }
42801
+ if (mailbox.onlineClients.webui > 0) {
42802
+ parts.push(
42803
+ `${glyphs.web} WebUI${mailbox.onlineClients.webui > 1 ? `\xD7${mailbox.onlineClients.webui}` : ""}`
42804
+ );
42805
+ }
42806
+ if (mailbox.onlineClients.repl > 0) {
42807
+ parts.push(
42808
+ `${glyphs.terminal} REPL${mailbox.onlineClients.repl > 1 ? `\xD7${mailbox.onlineClients.repl}` : ""}`
42809
+ );
42810
+ }
42811
+ return short || parts.length === 0 ? "" : ` \xB7 ${parts.join(" \xB7 ")}`;
42812
+ };
42813
+ return compact([
42814
+ entry("mailbox", "mailbox", p, [
42815
+ mailbox.unread > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { color: chipColor(theme.warn, isNoColor), bold: true, children: [
42816
+ STATUSLINE_ICONS.mailbox,
42817
+ " ",
42818
+ mailbox.unread,
42819
+ " new"
42820
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { dimColor: !isNoColor, children: [
42821
+ STATUSLINE_ICONS.mailbox,
42822
+ " 0"
42823
+ ] }),
42824
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
42825
+ Text2,
42826
+ {
42827
+ color: mailbox.unread > 0 ? chipColor(theme.warn, isNoColor) : void 0,
42828
+ dimColor: mailbox.unread === 0 && !isNoColor,
42829
+ children: [
42830
+ STATUSLINE_ICONS.mailbox,
42831
+ mailbox.unread
42832
+ ]
42833
+ }
42834
+ )
42835
+ ]),
42836
+ entry("mailbox_peers", "mailbox", p, [
42837
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { color: chipColor(theme.accent, isNoColor), children: [
42838
+ glyphs.peers,
42839
+ " ",
42840
+ mailbox.onlineAgents,
42841
+ " agent",
42842
+ mailbox.onlineAgents === 1 ? "" : "s",
42843
+ clients(false)
42844
+ ] }),
42845
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { color: chipColor(theme.accent, isNoColor), children: [
42846
+ glyphs.peers,
42847
+ mailbox.onlineAgents
42848
+ ] })
42849
+ ]),
42850
+ mailbox.lastSubject ? entry("mailbox_last", "mailbox", p, [
42851
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { dimColor: !isNoColor, children: [
42852
+ mailbox.lastFrom ? `${mailbox.lastFrom}: ` : "",
42853
+ truncateChip(mailbox.lastSubject, 40)
42854
+ ] }),
42855
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { dimColor: !isNoColor, children: truncateChip(mailbox.lastSubject, 16) })
42856
+ ]) : null
42857
+ ]);
42858
+ }
42859
+ function buildFleetAgentEntries(p, agents) {
42860
+ const { isNoColor, showChip } = p;
42861
+ if (!agents || !showChip("fleet_agents")) return [];
42862
+ return compact(
42863
+ agents.map(
42864
+ (agent, index) => entry(index === 0 ? "fleet_agents" : `fleet_agent-${index}`, "fleet_agents", p, [
42865
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { children: [
42866
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : agent.color, bold: true, children: agent.label }),
42867
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: agent.running && !isNoColor ? theme.warn : void 0, children: ` ${agent.running ? glyphs.running : "\xB7"} ` }),
42868
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { dimColor: !isNoColor, children: [
42869
+ fmtElapsed(agent.elapsedMs),
42870
+ " \xB7 ",
42871
+ agent.toolCalls,
42872
+ "t"
42873
+ ] }),
42874
+ agent.tool ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.accent, children: ` \xB7 ${agent.tool}` }) : null,
42875
+ agent.extensions && agent.extensions > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.warn, children: ` \xB7 ${glyphs.process} \xD7${agent.extensions}` }) : null
42876
+ ] }),
42877
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { children: [
42878
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : agent.color, bold: true, children: truncateChip(agent.label, 10) }),
42879
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
42880
+ Text2,
42881
+ {
42882
+ dimColor: !isNoColor,
42883
+ children: ` ${agent.running ? glyphs.running : "\xB7"} ${fmtElapsed(agent.elapsedMs)}`
42884
+ }
42885
+ )
42886
+ ] }),
42887
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : agent.color, bold: true, children: truncateChip(agent.label, 6) })
42888
+ ])
42889
+ )
42890
+ );
42891
+ }
42892
+ function buildAsyncChipEntries(p) {
42893
+ const {
42894
+ showChip,
42895
+ isNoColor,
42896
+ fleetHasActivity,
42897
+ fleet,
42898
+ subagentCount,
42899
+ showBrain,
42900
+ brain,
42901
+ showDebugStream,
42902
+ debugStreamStats,
42903
+ mailbox,
42904
+ fleetAgents,
42905
+ showMailbox,
42906
+ memoryDetailChips,
42907
+ hasNextStepsAutoSubmit,
42908
+ nextStepsAutoSubmitCountdown,
42909
+ nextStepsAutoSubmitLabel,
42910
+ nextStepsColor,
42911
+ hasAutoProceed,
42912
+ autoProceedCountdown,
42913
+ showEnhance,
42914
+ enhanceCountdown
42915
+ } = p;
42916
+ return compact([
42917
+ fleetHasActivity && showChip("fleet") ? fleet ? (() => {
42918
+ const counts = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
42919
+ fleet.running > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.warn, children: isNoColor ? `>${fleet.running}` : `${glyphs.running} ${fleet.running}` }) : null,
42920
+ fleet.running > 0 && (fleet.pending > 0 || fleet.idle > 0 || fleet.completed > 0) ? " " : "",
42921
+ fleet.pending > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { dimColor: !isNoColor, children: isNoColor ? `.${fleet.pending}` : `${glyphs.pending} ${fleet.pending}` }) : null,
42922
+ fleet.pending > 0 && (fleet.idle > 0 || fleet.completed > 0) ? " " : "",
42923
+ fleet.idle > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { dimColor: !isNoColor, children: [
42924
+ "\xB7",
42925
+ fleet.idle,
42926
+ "idle"
42927
+ ] }) : null,
42928
+ fleet.idle > 0 && fleet.completed > 0 ? " " : "",
42929
+ fleet.completed > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.success, children: isNoColor ? `+${fleet.completed}` : `${glyphs.success} ${fleet.completed}` }) : null
42930
+ ] });
42931
+ const lead = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.accent, children: icon(STATUSLINE_ICONS.fleet, isNoColor) });
42932
+ return entry("fleet", "fleet", p, [
42933
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { children: [
42934
+ lead,
42935
+ counts
42936
+ ] }),
42937
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { children: [
42938
+ lead,
42939
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.warn, children: `${glyphs.running} ${fleet.running}` })
42940
+ ] }),
42941
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.accent, children: `${STATUSLINE_ICONS.fleet}${fleet.running}` })
42942
+ ]);
42943
+ })() : entry("fleet", "fleet", p, [
42944
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { color: chipColor(theme.accent, isNoColor), children: [
42945
+ icon(STATUSLINE_ICONS.fleet, isNoColor),
42946
+ subagentCount,
42947
+ " agent",
42948
+ subagentCount === 1 ? "" : "s"
42949
+ ] }),
42950
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: chipColor(theme.accent, isNoColor), children: `${STATUSLINE_ICONS.fleet}${subagentCount}` })
42951
+ ]) : null,
42952
+ ...buildFleetAgentEntries(p, fleetAgents),
42953
+ ...buildMailboxDetailEntries(p, mailbox, showMailbox),
42954
+ showBrain && brain ? entry("brain", "brain", p, [/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BrainChip, { brain, monochrome: isNoColor })]) : null,
42955
+ showDebugStream && debugStreamStats ? entry("debug_stream", "debug_stream", p, [
42956
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { color: chipColor(theme.accent, isNoColor), children: [
42957
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { bold: true, children: isNoColor ? "stream" : `${STATUSLINE_ICONS.debug_stream} stream` }),
42958
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { dimColor: !isNoColor, children: [
42959
+ " #",
42960
+ debugStreamStats.chunkCount
42961
+ ] }),
42962
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { dimColor: !isNoColor, children: [
42963
+ " \xB7 ",
42964
+ debugStreamStats.lastChunkSize,
42965
+ "B"
42966
+ ] }),
42967
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { dimColor: !isNoColor, children: [
42968
+ " \xB7 +",
42969
+ debugStreamStats.lastDeltaMs,
42970
+ "ms"
42971
+ ] }),
42972
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { dimColor: !isNoColor, children: [
42973
+ " \xB7 ",
42974
+ fmtDebugBytes(debugStreamStats.totalBytes)
42975
+ ] })
42976
+ ] }),
42977
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: chipColor(theme.accent, isNoColor), children: `${STATUSLINE_ICONS.debug_stream}${debugStreamStats.chunkCount} \xB7 ${fmtDebugBytes(debugStreamStats.totalBytes)}` }),
42978
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: chipColor(theme.accent, isNoColor), children: `${STATUSLINE_ICONS.debug_stream}${debugStreamStats.chunkCount}` })
42979
+ ]) : null,
42980
+ ...memoryDetailChips,
42981
+ hasNextStepsAutoSubmit && nextStepsAutoSubmitCountdown != null && showChip("next_steps") ? entry("next_steps", "next_steps", p, [
42982
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { children: [
42983
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : nextStepsColor, bold: true, children: isNoColor ? `${nextStepsAutoSubmitCountdown}s` : `${STATUSLINE_ICONS.next_steps} ${nextStepsAutoSubmitCountdown}s` }),
42984
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { dimColor: !isNoColor, children: [
42985
+ nextStepsAutoSubmitLabel ? ` ${formatSuggestionLabel(nextStepsAutoSubmitLabel)}` : "",
42986
+ " \xB7 \u21E5 edit"
42987
+ ] })
42988
+ ] }),
42989
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : nextStepsColor, bold: true, children: isNoColor ? `${nextStepsAutoSubmitCountdown}s \u21E5` : `${STATUSLINE_ICONS.next_steps} ${nextStepsAutoSubmitCountdown}s \u21E5` })
42990
+ ]) : null,
42991
+ hasAutoProceed && showChip("auto_proceed") ? entry("auto_proceed", "auto_proceed", p, [
42992
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
42993
+ Text2,
42994
+ {
42995
+ color: isNoColor ? void 0 : autoProceedCountdown != null && autoProceedCountdown <= 5 ? theme.warn : theme.accent,
42996
+ children: isNoColor ? `auto in ${autoProceedCountdown}s` : `${STATUSLINE_ICONS.auto_proceed} auto in ${autoProceedCountdown}s`
42997
+ }
42998
+ ),
42999
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.accent, children: `${STATUSLINE_ICONS.auto_proceed}${autoProceedCountdown}s` })
43000
+ ]) : null,
43001
+ showEnhance && enhanceCountdown != null ? entry("enhance", "enhance", p, [
43002
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : countdownColor(enhanceCountdown, 15, 5), children: isNoColor ? `refined \xB7 send in ${enhanceCountdown}s` : `${STATUSLINE_ICONS.enhance} refinement ready \xB7 send in ${enhanceCountdown}s` }),
43003
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : countdownColor(enhanceCountdown, 15, 5), children: `${STATUSLINE_ICONS.enhance} send ${enhanceCountdown}s` })
43004
+ ]) : null
43005
+ ]);
43006
+ }
43007
+
43008
+ // src/components/status-bar-rails-safety.tsx
43009
+ var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
42791
43010
  function buildSafetyWorkEntries(p) {
42792
43011
  const {
42793
43012
  yolo,
@@ -42816,28 +43035,28 @@ function buildSafetyWorkEntries(p) {
42816
43035
  );
42817
43036
  return compact([
42818
43037
  yolo && showChip("yolo") ? entry("yolo", "yolo", p, [
42819
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: chipColor(theme.error, isNoColor), bold: true, children: isNoColor ? "YOLO" : `${STATUSLINE_ICONS.yolo} YOLO` }),
42820
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: chipColor(theme.error, isNoColor), bold: true, children: isNoColor ? "YOLO" : `${STATUSLINE_ICONS.yolo}Y` })
43038
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: chipColor(theme.error, isNoColor), bold: true, children: isNoColor ? "YOLO" : `${STATUSLINE_ICONS.yolo} YOLO` }),
43039
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: chipColor(theme.error, isNoColor), bold: true, children: isNoColor ? "YOLO" : `${STATUSLINE_ICONS.yolo}Y` })
42821
43040
  ]) : null,
42822
43041
  autonomy && autonomy !== "off" && showChip("autonomy") ? entry("autonomy", "autonomy", p, [
42823
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: autonomyColor, bold: true, children: isNoColor ? autonomy.toUpperCase() : `\u221E ${autonomy.toUpperCase()}` }),
42824
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: autonomyColor, bold: true, children: isNoColor ? autonomy.slice(0, 1).toUpperCase() : `\u221E${autonomy.slice(0, 1).toUpperCase()}` })
43042
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: autonomyColor, bold: true, children: isNoColor ? autonomy.toUpperCase() : `\u221E ${autonomy.toUpperCase()}` }),
43043
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: autonomyColor, bold: true, children: isNoColor ? autonomy.slice(0, 1).toUpperCase() : `\u221E${autonomy.slice(0, 1).toUpperCase()}` })
42825
43044
  ]) : null,
42826
43045
  showEternalStage && eternalStage ? entry("eternal_stage", "eternal_stage", p, [
42827
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(EternalStageChip, { stage: eternalStage, monochrome: isNoColor })
43046
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(EternalStageChip, { stage: eternalStage, monochrome: isNoColor })
42828
43047
  ]) : null,
42829
43048
  // Seconds-level safety state: the breaker leads the posture block.
42830
43049
  breakerCountdown && showChip("breaker") ? (() => {
42831
43050
  const secs = Math.ceil(breakerCountdown.remainingMs / 1e3);
42832
43051
  const color = countdownColor(secs, 20, 10);
42833
43052
  return entry("breaker", "breaker", p, [
42834
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { color: isNoColor ? void 0 : color, bold: true, children: [
43053
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { color: isNoColor ? void 0 : color, bold: true, children: [
42835
43054
  STATUSLINE_ICONS.breaker,
42836
43055
  " kill/reset in ",
42837
43056
  secs,
42838
43057
  "s"
42839
43058
  ] }),
42840
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { color: isNoColor ? void 0 : color, bold: true, children: [
43059
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { color: isNoColor ? void 0 : color, bold: true, children: [
42841
43060
  STATUSLINE_ICONS.breaker,
42842
43061
  " ",
42843
43062
  secs,
@@ -42856,7 +43075,7 @@ function buildSafetyWorkEntries(p) {
42856
43075
  );
42857
43076
  const reset = quota.resetIn ? ` ${glyphs.clock}${quota.resetIn}` : "";
42858
43077
  return entry("quota", "quota", p, [
42859
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { color, children: [
43078
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { color, children: [
42860
43079
  icon(STATUSLINE_ICONS.quota, isNoColor),
42861
43080
  quota.windowLabel,
42862
43081
  " ",
@@ -42864,14 +43083,14 @@ function buildSafetyWorkEntries(p) {
42864
43083
  "%",
42865
43084
  reset
42866
43085
  ] }),
42867
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { color, children: [
43086
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { color, children: [
42868
43087
  icon(STATUSLINE_ICONS.quota, isNoColor),
42869
43088
  quota.windowLabel,
42870
43089
  " ",
42871
43090
  pct,
42872
43091
  "%"
42873
43092
  ] }),
42874
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { color, children: [
43093
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { color, children: [
42875
43094
  isNoColor ? "" : STATUSLINE_ICONS.quota,
42876
43095
  pct,
42877
43096
  "%"
@@ -42879,39 +43098,39 @@ function buildSafetyWorkEntries(p) {
42879
43098
  ]);
42880
43099
  })() : null,
42881
43100
  tokenSavingMode !== void 0 && tokenSavingMode !== "off" && showChip("token_saving") ? entry("token_saving", "token_saving", p, [
42882
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: chipColor(theme.warn, isNoColor), bold: true, children: isNoColor ? tokenSavingMode : `${STATUSLINE_ICONS.token_saving} ${tokenSavingMode}` }),
42883
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: chipColor(theme.warn, isNoColor), bold: true, children: isNoColor ? tokenSavingMode.slice(0, 1) : `${STATUSLINE_ICONS.token_saving}${tokenSavingMode.slice(0, 1).toUpperCase()}` })
43101
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: chipColor(theme.warn, isNoColor), bold: true, children: isNoColor ? tokenSavingMode : `${STATUSLINE_ICONS.token_saving} ${tokenSavingMode}` }),
43102
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: chipColor(theme.warn, isNoColor), bold: true, children: isNoColor ? tokenSavingMode.slice(0, 1) : `${STATUSLINE_ICONS.token_saving}${tokenSavingMode.slice(0, 1).toUpperCase()}` })
42884
43103
  ]) : null,
42885
43104
  processCount != null && processCount > 0 && showChip("processes") ? entry("processes", "processes", p, [
42886
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { color: chipColor(theme.error, isNoColor), children: [
43105
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { color: chipColor(theme.error, isNoColor), children: [
42887
43106
  STATUSLINE_ICONS.processes,
42888
43107
  " ",
42889
43108
  processCount,
42890
43109
  " ",
42891
43110
  processCount === 1 ? "process" : "processes"
42892
43111
  ] }),
42893
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { color: chipColor(theme.error, isNoColor), children: [
43112
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { color: chipColor(theme.error, isNoColor), children: [
42894
43113
  STATUSLINE_ICONS.processes,
42895
43114
  processCount
42896
43115
  ] })
42897
43116
  ]) : null,
42898
43117
  sideEffectCount != null && sideEffectCount > 0 && showChip("side_effects") ? entry("side_effects", "side_effects", p, [
42899
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { color: chipColor(theme.warn, isNoColor), children: [
43118
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { color: chipColor(theme.warn, isNoColor), children: [
42900
43119
  icon(STATUSLINE_ICONS.side_effects, isNoColor),
42901
43120
  sideEffectCount,
42902
43121
  " audit",
42903
43122
  sideEffectCount === 1 ? "" : "s"
42904
43123
  ] }),
42905
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { color: chipColor(theme.warn, isNoColor), children: [
43124
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { color: chipColor(theme.warn, isNoColor), children: [
42906
43125
  icon(STATUSLINE_ICONS.side_effects, isNoColor),
42907
43126
  sideEffectCount
42908
43127
  ] })
42909
43128
  ]) : null,
42910
43129
  droppedTools != null && droppedTools > 0 && showChip("dropped_tools") ? entry("dropped_tools", "dropped_tools", p, [
42911
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: chipColor(theme.warn, isNoColor), children: isNoColor ? `-${droppedTools} tools` : `${STATUSLINE_ICONS.dropped_tools} -${droppedTools}` })
43130
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: chipColor(theme.warn, isNoColor), children: isNoColor ? `-${droppedTools} tools` : `${STATUSLINE_ICONS.dropped_tools} -${droppedTools}` })
42912
43131
  ]) : null,
42913
43132
  hasActiveGoal && goalSummary ? entry("goal", "goal", p, [
42914
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
43133
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
42915
43134
  Text2,
42916
43135
  {
42917
43136
  color: isNoColor ? void 0 : goalSummary.goalState === "abandoned" ? theme.textMuted : goalSummary.goalState === "active" || goalSummary.goalState === "completed" ? theme.success : theme.warn,
@@ -42927,310 +43146,91 @@ function buildSafetyWorkEntries(p) {
42927
43146
  ]
42928
43147
  }
42929
43148
  ),
42930
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { color: isNoColor ? void 0 : theme.success, children: [
43149
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { color: isNoColor ? void 0 : theme.success, children: [
42931
43150
  icon(STATUSLINE_ICONS.goal, isNoColor),
42932
43151
  truncateChip(goalSummary.goal, 18),
42933
43152
  " (i",
42934
43153
  goalSummary.iterations,
42935
43154
  ")"
42936
43155
  ] }),
42937
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { color: isNoColor ? void 0 : theme.success, children: [
43156
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { color: isNoColor ? void 0 : theme.success, children: [
42938
43157
  icon(STATUSLINE_ICONS.goal, isNoColor),
42939
43158
  truncateChip(goalSummary.goal, 8)
42940
43159
  ] })
42941
43160
  ]) : null,
42942
43161
  todos && (todos.pending > 0 || todos.inProgress > 0 || todos.completed > 0 && !todosCleared) && showChip("todos") ? (() => {
42943
- const counts = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
42944
- todos.inProgress > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.warn, children: isNoColor ? `?${todos.inProgress}` : `${glyphs.running} ${todos.inProgress}` }) : null,
43162
+ const counts = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
43163
+ todos.inProgress > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.warn, children: isNoColor ? `?${todos.inProgress}` : `${glyphs.running} ${todos.inProgress}` }) : null,
42945
43164
  todos.inProgress > 0 && (todos.pending > 0 || todos.completed > 0) ? " " : "",
42946
- todos.pending > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { dimColor: !isNoColor, children: isNoColor ? `.${todos.pending}` : `${glyphs.pending} ${todos.pending}` }) : null,
43165
+ todos.pending > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { dimColor: !isNoColor, children: isNoColor ? `.${todos.pending}` : `${glyphs.pending} ${todos.pending}` }) : null,
42947
43166
  todos.pending > 0 && todos.completed > 0 ? " " : "",
42948
- todos.completed > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.success, children: isNoColor ? `+${todos.completed}` : `${glyphs.success} ${todos.completed}` }) : null
43167
+ todos.completed > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.success, children: isNoColor ? `+${todos.completed}` : `${glyphs.success} ${todos.completed}` }) : null
42949
43168
  ] });
42950
43169
  return entry("todos", "todos", p, [
42951
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { children: [
42952
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { dimColor: !isNoColor, children: "todos " }),
43170
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { children: [
43171
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { dimColor: !isNoColor, children: "todos " }),
42953
43172
  counts
42954
43173
  ] }),
42955
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { children: counts }),
42956
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.warn, children: `${STATUSLINE_ICONS.todos}${todos.inProgress + todos.pending}` })
43174
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { children: counts }),
43175
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.warn, children: `${STATUSLINE_ICONS.todos}${todos.inProgress + todos.pending}` })
42957
43176
  ]);
42958
43177
  })() : null,
42959
43178
  plan && (plan.open > 0 || plan.inProgress > 0 || plan.done > 0) && showChip("plan") ? (() => {
42960
- const counts = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
42961
- plan.inProgress > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.warn, children: isNoColor ? `?${plan.inProgress}` : `${glyphs.running} ${plan.inProgress}` }) : null,
43179
+ const counts = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
43180
+ plan.inProgress > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.warn, children: isNoColor ? `?${plan.inProgress}` : `${glyphs.running} ${plan.inProgress}` }) : null,
42962
43181
  plan.inProgress > 0 && (plan.open > 0 || plan.done > 0) ? " " : "",
42963
- plan.open > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { dimColor: !isNoColor, children: isNoColor ? `.${plan.open}` : `${glyphs.pending} ${plan.open}` }) : null,
43182
+ plan.open > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { dimColor: !isNoColor, children: isNoColor ? `.${plan.open}` : `${glyphs.pending} ${plan.open}` }) : null,
42964
43183
  plan.open > 0 && plan.done > 0 ? " " : "",
42965
- plan.done > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.success, children: isNoColor ? `+${plan.done}` : `${glyphs.success} ${plan.done}` }) : null
43184
+ plan.done > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.success, children: isNoColor ? `+${plan.done}` : `${glyphs.success} ${plan.done}` }) : null
42966
43185
  ] });
42967
- const lead = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.accent, children: icon(STATUSLINE_ICONS.plan, isNoColor) });
43186
+ const lead = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.accent, children: icon(STATUSLINE_ICONS.plan, isNoColor) });
42968
43187
  return entry("plan", "plan", p, [
42969
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { children: [
43188
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { children: [
42970
43189
  lead,
42971
43190
  counts,
42972
- plan.scope ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { dimColor: !isNoColor, children: [
43191
+ plan.scope ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { dimColor: !isNoColor, children: [
42973
43192
  " [",
42974
43193
  plan.scope,
42975
43194
  "]"
42976
43195
  ] }) : null
42977
43196
  ] }),
42978
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { children: [
43197
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { children: [
42979
43198
  lead,
42980
43199
  counts
42981
43200
  ] }),
42982
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.accent, children: `${STATUSLINE_ICONS.plan}${plan.inProgress + plan.open}` })
43201
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.accent, children: `${STATUSLINE_ICONS.plan}${plan.inProgress + plan.open}` })
42983
43202
  ]);
42984
43203
  })() : null,
42985
43204
  hasTaskActivity && tasks && showChip("tasks") ? (() => {
42986
- const counts = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
42987
- tasks.inProgress > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.warn, children: isNoColor ? `?${tasks.inProgress}` : `${glyphs.running} ${tasks.inProgress}` }) : null,
43205
+ const counts = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
43206
+ tasks.inProgress > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.warn, children: isNoColor ? `?${tasks.inProgress}` : `${glyphs.running} ${tasks.inProgress}` }) : null,
42988
43207
  tasks.inProgress > 0 && (tasks.pending > 0 || tasks.blocked > 0) ? " " : "",
42989
- tasks.pending > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { dimColor: !isNoColor, children: isNoColor ? `.${tasks.pending}` : `${glyphs.pending} ${tasks.pending}` }) : null,
43208
+ tasks.pending > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { dimColor: !isNoColor, children: isNoColor ? `.${tasks.pending}` : `${glyphs.pending} ${tasks.pending}` }) : null,
42990
43209
  tasks.pending > 0 && tasks.blocked > 0 ? " " : "",
42991
- tasks.blocked > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.error, children: isNoColor ? `!${tasks.blocked}` : `${glyphs.warning} ${tasks.blocked}` }) : null,
43210
+ tasks.blocked > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.error, children: isNoColor ? `!${tasks.blocked}` : `${glyphs.warning} ${tasks.blocked}` }) : null,
42992
43211
  (tasks.pending > 0 || tasks.blocked > 0) && (tasks.completed > 0 || tasks.failed > 0) ? " " : "",
42993
- tasks.completed > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.success, children: isNoColor ? `+${tasks.completed}` : `${glyphs.success} ${tasks.completed}` }) : null,
43212
+ tasks.completed > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.success, children: isNoColor ? `+${tasks.completed}` : `${glyphs.success} ${tasks.completed}` }) : null,
42994
43213
  tasks.completed > 0 && tasks.failed > 0 ? " " : "",
42995
- tasks.failed > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.error, children: isNoColor ? `x${tasks.failed}` : `${glyphs.failure} ${tasks.failed}` }) : null
43214
+ tasks.failed > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.error, children: isNoColor ? `x${tasks.failed}` : `${glyphs.failure} ${tasks.failed}` }) : null
42996
43215
  ] });
42997
- const lead = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.monitor.agents, children: icon(STATUSLINE_ICONS.tasks, isNoColor) });
43216
+ const lead = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.monitor.agents, children: icon(STATUSLINE_ICONS.tasks, isNoColor) });
42998
43217
  return entry("tasks", "tasks", p, [
42999
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { children: [
43218
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { children: [
43000
43219
  lead,
43001
43220
  counts,
43002
- tasks.scope ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { dimColor: !isNoColor, children: [
43221
+ tasks.scope ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { dimColor: !isNoColor, children: [
43003
43222
  " [",
43004
43223
  tasks.scope,
43005
43224
  "]"
43006
43225
  ] }) : null
43007
43226
  ] }),
43008
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text2, { children: [
43009
- lead,
43010
- counts
43011
- ] }),
43012
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text2, { color: isNoColor ? void 0 : theme.monitor.agents, children: `${STATUSLINE_ICONS.tasks}${tasks.inProgress + tasks.pending}` })
43013
- ]);
43014
- })() : null
43015
- ]);
43016
- }
43017
-
43018
- // src/components/status-bar-rails-async.tsx
43019
- var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
43020
- function buildMailboxDetailEntries(p, mailbox, showMailbox) {
43021
- const { isNoColor } = p;
43022
- if (!mailbox || !showMailbox) return [];
43023
- const clients = (short) => {
43024
- const parts = [];
43025
- if (mailbox.onlineClients.tui > 0) {
43026
- parts.push(
43027
- `${glyphs.desktop} TUI${mailbox.onlineClients.tui > 1 ? `\xD7${mailbox.onlineClients.tui}` : ""}`
43028
- );
43029
- }
43030
- if (mailbox.onlineClients.webui > 0) {
43031
- parts.push(
43032
- `${glyphs.web} WebUI${mailbox.onlineClients.webui > 1 ? `\xD7${mailbox.onlineClients.webui}` : ""}`
43033
- );
43034
- }
43035
- if (mailbox.onlineClients.repl > 0) {
43036
- parts.push(
43037
- `${glyphs.terminal} REPL${mailbox.onlineClients.repl > 1 ? `\xD7${mailbox.onlineClients.repl}` : ""}`
43038
- );
43039
- }
43040
- return short || parts.length === 0 ? "" : ` \xB7 ${parts.join(" \xB7 ")}`;
43041
- };
43042
- return compact([
43043
- entry("mailbox", "mailbox", p, [
43044
- mailbox.unread > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { color: chipColor(theme.warn, isNoColor), bold: true, children: [
43045
- STATUSLINE_ICONS.mailbox,
43046
- " ",
43047
- mailbox.unread,
43048
- " new"
43049
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { dimColor: !isNoColor, children: [
43050
- STATUSLINE_ICONS.mailbox,
43051
- " 0"
43052
- ] }),
43053
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
43054
- Text2,
43055
- {
43056
- color: mailbox.unread > 0 ? chipColor(theme.warn, isNoColor) : void 0,
43057
- dimColor: mailbox.unread === 0 && !isNoColor,
43058
- children: [
43059
- STATUSLINE_ICONS.mailbox,
43060
- mailbox.unread
43061
- ]
43062
- }
43063
- )
43064
- ]),
43065
- entry("mailbox_peers", "mailbox", p, [
43066
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { color: chipColor(theme.accent, isNoColor), children: [
43067
- glyphs.peers,
43068
- " ",
43069
- mailbox.onlineAgents,
43070
- " agent",
43071
- mailbox.onlineAgents === 1 ? "" : "s",
43072
- clients(false)
43073
- ] }),
43074
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { color: chipColor(theme.accent, isNoColor), children: [
43075
- glyphs.peers,
43076
- mailbox.onlineAgents
43077
- ] })
43078
- ]),
43079
- mailbox.lastSubject ? entry("mailbox_last", "mailbox", p, [
43080
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { dimColor: !isNoColor, children: [
43081
- mailbox.lastFrom ? `${mailbox.lastFrom}: ` : "",
43082
- truncateChip(mailbox.lastSubject, 40)
43083
- ] }),
43084
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { dimColor: !isNoColor, children: truncateChip(mailbox.lastSubject, 16) })
43085
- ]) : null
43086
- ]);
43087
- }
43088
- function buildFleetAgentEntries(p, agents) {
43089
- const { isNoColor, showChip } = p;
43090
- if (!agents || !showChip("fleet_agents")) return [];
43091
- return compact(
43092
- agents.map(
43093
- (agent, index) => entry(index === 0 ? "fleet_agents" : `fleet_agent-${index}`, "fleet_agents", p, [
43094
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { children: [
43095
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : agent.color, bold: true, children: agent.label }),
43096
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: agent.running && !isNoColor ? theme.warn : void 0, children: ` ${agent.running ? glyphs.running : "\xB7"} ` }),
43097
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { dimColor: !isNoColor, children: [
43098
- fmtElapsed(agent.elapsedMs),
43099
- " \xB7 ",
43100
- agent.toolCalls,
43101
- "t"
43102
- ] }),
43103
- agent.tool ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.accent, children: ` \xB7 ${agent.tool}` }) : null,
43104
- agent.extensions && agent.extensions > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.warn, children: ` \xB7 ${glyphs.process} \xD7${agent.extensions}` }) : null
43105
- ] }),
43106
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { children: [
43107
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : agent.color, bold: true, children: truncateChip(agent.label, 10) }),
43108
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
43109
- Text2,
43110
- {
43111
- dimColor: !isNoColor,
43112
- children: ` ${agent.running ? glyphs.running : "\xB7"} ${fmtElapsed(agent.elapsedMs)}`
43113
- }
43114
- )
43115
- ] }),
43116
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : agent.color, bold: true, children: truncateChip(agent.label, 6) })
43117
- ])
43118
- )
43119
- );
43120
- }
43121
- function buildAsyncChipEntries(p) {
43122
- const {
43123
- showChip,
43124
- isNoColor,
43125
- fleetHasActivity,
43126
- fleet,
43127
- subagentCount,
43128
- showBrain,
43129
- brain,
43130
- showDebugStream,
43131
- debugStreamStats,
43132
- mailbox,
43133
- fleetAgents,
43134
- showMailbox,
43135
- memoryDetailChips,
43136
- hasNextStepsAutoSubmit,
43137
- nextStepsAutoSubmitCountdown,
43138
- nextStepsAutoSubmitLabel,
43139
- nextStepsColor,
43140
- hasAutoProceed,
43141
- autoProceedCountdown,
43142
- showEnhance,
43143
- enhanceCountdown
43144
- } = p;
43145
- return compact([
43146
- fleetHasActivity && showChip("fleet") ? fleet ? (() => {
43147
- const counts = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
43148
- fleet.running > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.warn, children: isNoColor ? `>${fleet.running}` : `${glyphs.running} ${fleet.running}` }) : null,
43149
- fleet.running > 0 && (fleet.pending > 0 || fleet.idle > 0 || fleet.completed > 0) ? " " : "",
43150
- fleet.pending > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { dimColor: !isNoColor, children: isNoColor ? `.${fleet.pending}` : `${glyphs.pending} ${fleet.pending}` }) : null,
43151
- fleet.pending > 0 && (fleet.idle > 0 || fleet.completed > 0) ? " " : "",
43152
- fleet.idle > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { dimColor: !isNoColor, children: [
43153
- "\xB7",
43154
- fleet.idle,
43155
- "idle"
43156
- ] }) : null,
43157
- fleet.idle > 0 && fleet.completed > 0 ? " " : "",
43158
- fleet.completed > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.success, children: isNoColor ? `+${fleet.completed}` : `${glyphs.success} ${fleet.completed}` }) : null
43159
- ] });
43160
- const lead = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.accent, children: icon(STATUSLINE_ICONS.fleet, isNoColor) });
43161
- return entry("fleet", "fleet", p, [
43162
43227
  /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { children: [
43163
43228
  lead,
43164
43229
  counts
43165
43230
  ] }),
43166
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { children: [
43167
- lead,
43168
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.warn, children: `${glyphs.running} ${fleet.running}` })
43169
- ] }),
43170
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.accent, children: `${STATUSLINE_ICONS.fleet}${fleet.running}` })
43231
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.monitor.agents, children: `${STATUSLINE_ICONS.tasks}${tasks.inProgress + tasks.pending}` })
43171
43232
  ]);
43172
- })() : entry("fleet", "fleet", p, [
43173
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { color: chipColor(theme.accent, isNoColor), children: [
43174
- icon(STATUSLINE_ICONS.fleet, isNoColor),
43175
- subagentCount,
43176
- " agent",
43177
- subagentCount === 1 ? "" : "s"
43178
- ] }),
43179
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: chipColor(theme.accent, isNoColor), children: `${STATUSLINE_ICONS.fleet}${subagentCount}` })
43180
- ]) : null,
43181
- ...buildFleetAgentEntries(p, fleetAgents),
43182
- ...buildMailboxDetailEntries(p, mailbox, showMailbox),
43183
- showBrain && brain ? entry("brain", "brain", p, [/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(BrainChip, { brain, monochrome: isNoColor })]) : null,
43184
- showDebugStream && debugStreamStats ? entry("debug_stream", "debug_stream", p, [
43185
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { color: chipColor(theme.accent, isNoColor), children: [
43186
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { bold: true, children: isNoColor ? "stream" : `${STATUSLINE_ICONS.debug_stream} stream` }),
43187
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { dimColor: !isNoColor, children: [
43188
- " #",
43189
- debugStreamStats.chunkCount
43190
- ] }),
43191
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { dimColor: !isNoColor, children: [
43192
- " \xB7 ",
43193
- debugStreamStats.lastChunkSize,
43194
- "B"
43195
- ] }),
43196
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { dimColor: !isNoColor, children: [
43197
- " \xB7 +",
43198
- debugStreamStats.lastDeltaMs,
43199
- "ms"
43200
- ] }),
43201
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { dimColor: !isNoColor, children: [
43202
- " \xB7 ",
43203
- fmtDebugBytes(debugStreamStats.totalBytes)
43204
- ] })
43205
- ] }),
43206
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: chipColor(theme.accent, isNoColor), children: `${STATUSLINE_ICONS.debug_stream}${debugStreamStats.chunkCount} \xB7 ${fmtDebugBytes(debugStreamStats.totalBytes)}` }),
43207
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: chipColor(theme.accent, isNoColor), children: `${STATUSLINE_ICONS.debug_stream}${debugStreamStats.chunkCount}` })
43208
- ]) : null,
43209
- ...memoryDetailChips,
43210
- hasNextStepsAutoSubmit && nextStepsAutoSubmitCountdown != null && showChip("next_steps") ? entry("next_steps", "next_steps", p, [
43211
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { children: [
43212
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : nextStepsColor, bold: true, children: isNoColor ? `${nextStepsAutoSubmitCountdown}s` : `${STATUSLINE_ICONS.next_steps} ${nextStepsAutoSubmitCountdown}s` }),
43213
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text2, { dimColor: !isNoColor, children: [
43214
- nextStepsAutoSubmitLabel ? ` ${formatSuggestionLabel(nextStepsAutoSubmitLabel)}` : "",
43215
- " \xB7 \u21E5 edit"
43216
- ] })
43217
- ] }),
43218
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : nextStepsColor, bold: true, children: isNoColor ? `${nextStepsAutoSubmitCountdown}s \u21E5` : `${STATUSLINE_ICONS.next_steps} ${nextStepsAutoSubmitCountdown}s \u21E5` })
43219
- ]) : null,
43220
- hasAutoProceed && showChip("auto_proceed") ? entry("auto_proceed", "auto_proceed", p, [
43221
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
43222
- Text2,
43223
- {
43224
- color: isNoColor ? void 0 : autoProceedCountdown != null && autoProceedCountdown <= 5 ? theme.warn : theme.accent,
43225
- children: isNoColor ? `auto in ${autoProceedCountdown}s` : `${STATUSLINE_ICONS.auto_proceed} auto in ${autoProceedCountdown}s`
43226
- }
43227
- ),
43228
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : theme.accent, children: `${STATUSLINE_ICONS.auto_proceed}${autoProceedCountdown}s` })
43229
- ]) : null,
43230
- showEnhance && enhanceCountdown != null ? entry("enhance", "enhance", p, [
43231
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : countdownColor(enhanceCountdown, 15, 5), children: isNoColor ? `refined \xB7 send in ${enhanceCountdown}s` : `${STATUSLINE_ICONS.enhance} refinement ready \xB7 send in ${enhanceCountdown}s` }),
43232
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text2, { color: isNoColor ? void 0 : countdownColor(enhanceCountdown, 15, 5), children: `${STATUSLINE_ICONS.enhance} send ${enhanceCountdown}s` })
43233
- ]) : null
43233
+ })() : null
43234
43234
  ]);
43235
43235
  }
43236
43236
 
@@ -43381,7 +43381,7 @@ function buildVitalsChipEntries(p) {
43381
43381
  context && showChip("context") ? entry("context", "context", p, [
43382
43382
  /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text2, { color: barColor, children: [
43383
43383
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text2, { dimColor: !isNoColor, children: `${STATUSLINE_ICONS.context} ctx ` }),
43384
- renderMeter(ratio, 8),
43384
+ renderMeter(ratio, 10),
43385
43385
  " ",
43386
43386
  fmtTok(context.used),
43387
43387
  "/",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/tui",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "license": "MIT",
5
5
  "description": "WrongStack terminal UI: Ink-based interactive renderer with history, pickers, and slash menus.",
6
6
  "repository": {
@@ -26,12 +26,12 @@
26
26
  "!dist/**/*.map"
27
27
  ],
28
28
  "dependencies": {
29
- "@wrongstack/core": "1.0.12",
30
- "@wrongstack/kanban": "1.0.12",
31
- "@wrongstack/runtime": "1.0.12",
32
- "@wrongstack/sage": "1.0.12",
33
- "@wrongstack/sdd": "1.0.12",
34
- "@wrongstack/tools": "1.0.12",
29
+ "@wrongstack/core": "1.0.13",
30
+ "@wrongstack/kanban": "1.0.13",
31
+ "@wrongstack/runtime": "1.0.13",
32
+ "@wrongstack/sage": "1.0.13",
33
+ "@wrongstack/sdd": "1.0.13",
34
+ "@wrongstack/tools": "1.0.13",
35
35
  "string-width": "8.2.2",
36
36
  "wrap-ansi": "^10.0.1"
37
37
  },