@wrongstack/tui 0.292.0 → 0.293.0

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/dist/index.js CHANGED
@@ -1289,8 +1289,8 @@ function hslToHex(h, s2, l) {
1289
1289
  const toHex2 = (n) => Math.round((n + m) * 255).toString(16).padStart(2, "0");
1290
1290
  return `#${toHex2(r)}${toHex2(g)}${toHex2(b)}`;
1291
1291
  }
1292
- var RAINBOW_SATURATION = 0.7;
1293
- var RAINBOW_LIGHTNESS = 0.65;
1292
+ var RAINBOW_SATURATION = 0.45;
1293
+ var RAINBOW_LIGHTNESS = 0.55;
1294
1294
  function rainbowColor(charIndex, phase) {
1295
1295
  const hue = rainbowHue(charIndex, phase);
1296
1296
  return hslToHex(hue, RAINBOW_SATURATION, RAINBOW_LIGHTNESS);
@@ -2662,7 +2662,8 @@ var ITEM_DESCRIPTIONS = {
2662
2662
  mailbox: "Mailbox unread messages",
2663
2663
  enhance: "Prompt-enhance countdown",
2664
2664
  debug_stream: "Stream debug telemetry",
2665
- next_steps: "Next-step auto-submit countdown"
2665
+ next_steps: "Next-step auto-submit countdown",
2666
+ memory_context: "Memory context detail line (matched/injected/filtered/active counts)"
2666
2667
  };
2667
2668
  var ITEM_LINE = {
2668
2669
  // Line 1 — workspace + runtime: mode indicators, project/workdir,
@@ -2704,6 +2705,7 @@ var ITEM_LINE = {
2704
2705
  fleet: 3,
2705
2706
  fleet_agents: 3,
2706
2707
  mailbox: 3,
2708
+ memory_context: 3,
2707
2709
  next_steps: 3,
2708
2710
  plan: 3,
2709
2711
  tasks: 3,
@@ -2748,6 +2750,7 @@ var STATUSLINE_ITEMS = [
2748
2750
  "fleet",
2749
2751
  "fleet_agents",
2750
2752
  "mailbox",
2753
+ "memory_context",
2751
2754
  "next_steps",
2752
2755
  "plan",
2753
2756
  "tasks",
@@ -5776,6 +5779,165 @@ function ThinkingChip({
5776
5779
  ] });
5777
5780
  }
5778
5781
 
5782
+ // src/memory-context-monitor.ts
5783
+ function emptyMemoryContextMonitor() {
5784
+ return { memories: {}, transitions: [] };
5785
+ }
5786
+ function activeMemoryContextCount(state) {
5787
+ return Object.values(state.memories).filter((memory) => memory.state === "active").length;
5788
+ }
5789
+ function memoryEventMatchesSession(payload, currentSessionId) {
5790
+ const eventSessionId = stringValue(recordValue(payload).sessionId);
5791
+ return eventSessionId === void 0 || eventSessionId === currentSessionId;
5792
+ }
5793
+ async function readMemoryRecordTotal(store) {
5794
+ if (!store || typeof store !== "object" || !("stats" in store)) return void 0;
5795
+ const stats = store.stats;
5796
+ if (typeof stats !== "function") return void 0;
5797
+ const result = await stats.call(store);
5798
+ return typeof result.total === "number" && Number.isFinite(result.total) && result.total >= 0 ? Math.floor(result.total) : void 0;
5799
+ }
5800
+ function applyMemoryInjectorRun(state, payload) {
5801
+ const at = stringValue(payload.at) ?? (/* @__PURE__ */ new Date()).toISOString();
5802
+ const trigger = stringValue(payload.trigger) ?? "unknown";
5803
+ const injected = arrayRecords(payload.injected);
5804
+ const rejected = recordValue(payload.rejected);
5805
+ const memories = { ...state.memories };
5806
+ const transitions = [...state.transitions];
5807
+ for (const item of injected) {
5808
+ const id = stringValue(item.id);
5809
+ if (!id) continue;
5810
+ const previous = memories[id];
5811
+ memories[id] = {
5812
+ id,
5813
+ kind: stringValue(item.kind) ?? "unknown",
5814
+ text: stringValue(item.text) ?? "",
5815
+ score: numberValue(item.score),
5816
+ confidence: numberValue(item.confidence),
5817
+ freshness: numberValue(item.freshness),
5818
+ importance: numberValue(item.importance),
5819
+ persistence: stringValue(item.persistence) ?? "unknown",
5820
+ anchors: stringArray(item.anchors),
5821
+ tags: stringArray(item.tags),
5822
+ activationReasons: stringArray(item.activationReasons),
5823
+ // Injection is pending until the next provider request. If this memory
5824
+ // was already confirmed in the latest request, a re-injection must not
5825
+ // erase that authoritative provider-context state.
5826
+ state: previous?.state === "active" ? "active" : "injected",
5827
+ trigger,
5828
+ enteredAt: previous?.enteredAt ?? at,
5829
+ lastSeenAt: at
5830
+ };
5831
+ transitions.unshift({
5832
+ id: `${at}_injected_${id}`,
5833
+ at,
5834
+ memoryId: id,
5835
+ action: "injected",
5836
+ reason: `${trigger} \xB7 score ${numberValue(item.score).toFixed(2)}`
5837
+ });
5838
+ }
5839
+ const outcome = stringValue(payload.outcome);
5840
+ const errorStr = stringValue(payload.error);
5841
+ return {
5842
+ latest: {
5843
+ at,
5844
+ trigger,
5845
+ matched: numberValue(payload.candidates),
5846
+ injected: outcome === "error" ? 0 : injected.length,
5847
+ filtered: Object.values(rejected).reduce((sum, value) => sum + numberValue(value), 0),
5848
+ contextPressure: numberValue(payload.contextPressure),
5849
+ injectedChars: numberValue(payload.injectedChars),
5850
+ outcome: outcome ?? void 0,
5851
+ ...outcome === "error" && errorStr ? { error: errorStr } : {}
5852
+ },
5853
+ memories,
5854
+ transitions: transitions.slice(0, 100)
5855
+ };
5856
+ }
5857
+ function applyMemoryContextSnapshot(state, payload) {
5858
+ const at = stringValue(payload.at) ?? (/* @__PURE__ */ new Date()).toISOString();
5859
+ const activeIds = stringArray(payload.activeMemoryIds);
5860
+ const enteredIds = stringArray(payload.enteredMemoryIds);
5861
+ const exitedIds = stringArray(payload.exitedMemoryIds);
5862
+ const active = new Set(activeIds);
5863
+ const memories = { ...state.memories };
5864
+ const transitions = [...state.transitions];
5865
+ for (const id of activeIds) {
5866
+ const previous = memories[id];
5867
+ memories[id] = previous ? { ...previous, state: "active", lastSeenAt: at, exitedAt: void 0 } : placeholder(id, at, "active");
5868
+ }
5869
+ for (const id of enteredIds) {
5870
+ transitions.unshift({
5871
+ id: `${at}_entered_${id}`,
5872
+ at,
5873
+ memoryId: id,
5874
+ action: "entered",
5875
+ reason: "provider request"
5876
+ });
5877
+ }
5878
+ for (const id of exitedIds) {
5879
+ const previous = memories[id];
5880
+ if (previous) memories[id] = { ...previous, state: "exited", exitedAt: at };
5881
+ transitions.unshift({
5882
+ id: `${at}_exited_${id}`,
5883
+ at,
5884
+ memoryId: id,
5885
+ action: "exited",
5886
+ reason: "left provider context"
5887
+ });
5888
+ }
5889
+ for (const [id, memory] of Object.entries(memories)) {
5890
+ if ((memory.state === "injected" || memory.state === "active") && !active.has(id)) {
5891
+ memories[id] = { ...memory, state: "exited", exitedAt: at };
5892
+ if (!exitedIds.includes(id)) {
5893
+ transitions.unshift({
5894
+ id: `${at}_exited_before_provider_${id}`,
5895
+ at,
5896
+ memoryId: id,
5897
+ action: "exited",
5898
+ reason: memory.state === "injected" ? "removed before provider request" : "absent from provider context snapshot"
5899
+ });
5900
+ }
5901
+ }
5902
+ }
5903
+ return { ...state, memories, transitions: transitions.slice(0, 100) };
5904
+ }
5905
+ function placeholder(id, at, state) {
5906
+ return {
5907
+ id,
5908
+ kind: "unknown",
5909
+ text: "Details unavailable in this TUI process.",
5910
+ score: 0,
5911
+ confidence: 0,
5912
+ freshness: 0,
5913
+ importance: 0,
5914
+ persistence: "unknown",
5915
+ anchors: [],
5916
+ tags: [],
5917
+ activationReasons: [],
5918
+ state,
5919
+ trigger: "context snapshot",
5920
+ enteredAt: at,
5921
+ lastSeenAt: at,
5922
+ isPlaceholder: true
5923
+ };
5924
+ }
5925
+ function recordValue(value) {
5926
+ return value && typeof value === "object" && !Array.isArray(value) ? value : {};
5927
+ }
5928
+ function arrayRecords(value) {
5929
+ return Array.isArray(value) ? value.filter((item) => !!item && typeof item === "object") : [];
5930
+ }
5931
+ function stringArray(value) {
5932
+ return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
5933
+ }
5934
+ function stringValue(value) {
5935
+ return typeof value === "string" && value.length > 0 ? value : void 0;
5936
+ }
5937
+ function numberValue(value) {
5938
+ return typeof value === "number" && Number.isFinite(value) ? value : 0;
5939
+ }
5940
+
5779
5941
  // src/components/status-bar.tsx
5780
5942
  import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
5781
5943
  function chipExpired(meta, now = Date.now()) {
@@ -5877,6 +6039,7 @@ function StatusBar({
5877
6039
  context,
5878
6040
  estimatedContextTokens,
5879
6041
  superMemory,
6042
+ memoryContextMonitor,
5880
6043
  contextStrategy,
5881
6044
  hiddenItems,
5882
6045
  mode = "detailed",
@@ -6029,21 +6192,89 @@ function StatusBar({
6029
6192
  fmtMemory(processMemory.heapUsed)
6030
6193
  ] }) : null
6031
6194
  ] }) : null;
6032
- const superMemoryStatusChip = superMemory && showChip("super_memory") ? /* @__PURE__ */ jsxs8(Text, { color: chipColor(theme.accent, isNoColor), children: [
6033
- isNoColor ? "mem " : `${glyphs.brain} mem `,
6034
- superMemory.total,
6035
- " total",
6036
- /* @__PURE__ */ jsx9(Text, { dimColor: !isNoColor, children: " \xB7 " }),
6037
- /* @__PURE__ */ jsxs8(Text, { color: chipColor(theme.success, isNoColor), children: [
6038
- superMemory.activeInContext,
6039
- " ctx"
6040
- ] })
6041
- ] }) : null;
6195
+ const superMemoryStatusChip = null;
6196
+ const memoryMonitor = memoryContextMonitor;
6197
+ const memorySummary = memoryMonitor?.latest;
6198
+ const hasMemoryDetail = (memorySummary != null || superMemory != null) && showChip("memory_context");
6199
+ const memoryDetailChips = [];
6200
+ if (hasMemoryDetail) {
6201
+ const records = memoryMonitor ? Object.values(memoryMonitor.memories) : [];
6202
+ const active = memoryMonitor ? activeMemoryContextCount(memoryMonitor) : 0;
6203
+ const pending = records.filter((m) => m.state === "injected").length;
6204
+ const left = records.filter((m) => m.state === "exited").length;
6205
+ memoryDetailChips.push(
6206
+ /* @__PURE__ */ jsx9(Text, { color: chipColor(theme.accent, isNoColor), children: isNoColor ? "mem:" : `${glyphs.brain} ` }, "mem-label")
6207
+ );
6208
+ if (superMemory) {
6209
+ memoryDetailChips.push(
6210
+ /* @__PURE__ */ jsxs8(Text, { children: [
6211
+ superMemory.total,
6212
+ " total",
6213
+ /* @__PURE__ */ jsx9(Text, { dimColor: !isNoColor, children: " \xB7 " }),
6214
+ /* @__PURE__ */ jsxs8(Text, { color: chipColor(theme.success, isNoColor), children: [
6215
+ superMemory.activeInContext,
6216
+ " ctx"
6217
+ ] }),
6218
+ memorySummary != null ? /* @__PURE__ */ jsx9(Text, { dimColor: !isNoColor, children: " \xB7 " }) : null
6219
+ ] }, "total")
6220
+ );
6221
+ }
6222
+ if (memorySummary != null) {
6223
+ memoryDetailChips.push(
6224
+ /* @__PURE__ */ jsxs8(Text, { children: [
6225
+ memorySummary.matched,
6226
+ " matched",
6227
+ /* @__PURE__ */ jsx9(Text, { dimColor: !isNoColor, children: " \xB7 " }),
6228
+ /* @__PURE__ */ jsxs8(Text, { color: chipColor(theme.success, isNoColor), children: [
6229
+ memorySummary.injected,
6230
+ " inj"
6231
+ ] }),
6232
+ /* @__PURE__ */ jsx9(Text, { dimColor: !isNoColor, children: " \xB7 " }),
6233
+ /* @__PURE__ */ jsxs8(Text, { color: chipColor(theme.warn, isNoColor), children: [
6234
+ memorySummary.filtered,
6235
+ " filt"
6236
+ ] }),
6237
+ /* @__PURE__ */ jsx9(Text, { dimColor: !isNoColor, children: " \xB7 " }),
6238
+ /* @__PURE__ */ jsxs8(Text, { color: chipColor(theme.accent, isNoColor), children: [
6239
+ active,
6240
+ " actv"
6241
+ ] }),
6242
+ pending > 0 ? /* @__PURE__ */ jsxs8(Fragment3, { children: [
6243
+ /* @__PURE__ */ jsx9(Text, { dimColor: !isNoColor, children: " \xB7 " }),
6244
+ /* @__PURE__ */ jsxs8(Text, { color: chipColor(theme.accent, isNoColor), children: [
6245
+ pending,
6246
+ " pend"
6247
+ ] })
6248
+ ] }) : null,
6249
+ left > 0 ? /* @__PURE__ */ jsxs8(Fragment3, { children: [
6250
+ /* @__PURE__ */ jsx9(Text, { dimColor: !isNoColor, children: " \xB7 " }),
6251
+ /* @__PURE__ */ jsxs8(Text, { color: chipColor(theme.textMuted, isNoColor), children: [
6252
+ left,
6253
+ " left"
6254
+ ] })
6255
+ ] }) : null
6256
+ ] }, "matched")
6257
+ );
6258
+ memoryDetailChips.push(
6259
+ /* @__PURE__ */ jsxs8(Text, { color: chipColor(theme.textMuted, isNoColor), children: [
6260
+ memorySummary.trigger.length > 25 ? `${memorySummary.trigger.slice(0, 22)}\u2026` : memorySummary.trigger,
6261
+ /* @__PURE__ */ jsxs8(Text, { dimColor: !isNoColor, children: [
6262
+ " \xB7 ctx ",
6263
+ Math.round(memorySummary.contextPressure * 100),
6264
+ "%",
6265
+ " \xB7 +",
6266
+ memorySummary.injectedChars >= 1024 ? `${(memorySummary.injectedChars / 1024).toFixed(1)}K` : memorySummary.injectedChars,
6267
+ " chars"
6268
+ ] })
6269
+ ] }, "trigger")
6270
+ );
6271
+ }
6272
+ }
6042
6273
  const primaryChips = [
6043
6274
  // Combined context bar: meter · tokens · cost
6044
6275
  (context || showTokenDisplay || (cost?.total ?? 0) > 0) && (showChip("context") || showChip("tokens") || showChip("cost")) ? (() => {
6045
6276
  const ratio = context ? Math.min(context.used / context.max, 1) : 0;
6046
- const barColor = isNoColor ? void 0 : ratio < 0.6 ? theme.success : ratio < 0.75 ? theme.warn : theme.error;
6277
+ const barColor = isNoColor ? void 0 : contextBarColor(ratio);
6047
6278
  const hasTokens = showTokenDisplay && showChip("tokens");
6048
6279
  const hasCost = cost && cost.total > 0 && showChip("cost");
6049
6280
  const segments = [];
@@ -6158,7 +6389,7 @@ function StatusBar({
6158
6389
  // Context bar (compact: 6 blocks, optional tokens)
6159
6390
  (context || showTokenDisplay) && showChip("context") ? (() => {
6160
6391
  const ratio = context ? Math.min(context.used / context.max, 1) : 0;
6161
- const c = context ? ratio < 0.6 ? theme.success : ratio < 0.75 ? theme.warn : theme.error : theme.textSecondary;
6392
+ const c = context ? contextBarColor(ratio) : theme.textSecondary;
6162
6393
  const hasTokens = showTokenDisplay && showChip("tokens");
6163
6394
  return /* @__PURE__ */ jsxs8(Text, { children: [
6164
6395
  /* @__PURE__ */ jsxs8(Text, { color: chipColor(c, isNoColor), children: [
@@ -6430,6 +6661,15 @@ function StatusBar({
6430
6661
  monochrome: isNoColor,
6431
6662
  fillBg: LINE_BG_COLORS[2]
6432
6663
  }
6664
+ ) : null,
6665
+ hasMemoryDetail ? /* @__PURE__ */ jsx9(
6666
+ PowerlineRail,
6667
+ {
6668
+ segments: memoryDetailChips,
6669
+ budget: Math.max(12, termWidth),
6670
+ monochrome: isNoColor,
6671
+ fillBg: LINE_BG_COLORS[3]
6672
+ }
6433
6673
  ) : null
6434
6674
  ] });
6435
6675
  }
@@ -6490,6 +6730,13 @@ function renderProgress(ratio, width) {
6490
6730
  const capped = Math.min(width, filled);
6491
6731
  return FILLED.repeat(capped) + EMPTY.repeat(width - capped);
6492
6732
  }
6733
+ function contextBarColor(ratio) {
6734
+ if (ratio < 0.25) return theme.accent;
6735
+ if (ratio < 0.5) return theme.success;
6736
+ if (ratio < 0.65) return pastel.peach;
6737
+ if (ratio < 0.8) return theme.warn;
6738
+ return theme.error;
6739
+ }
6493
6740
  function renderMeter(ratio, width) {
6494
6741
  const clamped = Math.max(0, Math.min(1, ratio));
6495
6742
  const filled = Math.round(clamped * width);
@@ -11530,9 +11777,10 @@ function ThresholdSection({
11530
11777
  )}) until ${nextBoundary.desc}` : nextBoundary ? `${(nextBoundary.from - curVal).toFixed(1)}% until ${nextBoundary.desc}` : "in the final zone \u2014 compaction is overdue";
11531
11778
  const LABEL_W = 9;
11532
11779
  const RANGE_W = 9;
11780
+ const azClr = zoneColor(activeZone);
11533
11781
  return /* @__PURE__ */ jsxs23(Box, { flexDirection: "column", marginTop: 1, children: [
11534
11782
  /* @__PURE__ */ jsx24(SectionLabel, { children: "THRESHOLD MAP" }),
11535
- /* @__PURE__ */ jsx24(Box, { marginTop: 1, children: /* @__PURE__ */ jsxs23(Text, { color: zoneColor(activeZone), children: [
11783
+ /* @__PURE__ */ jsx24(Box, { marginTop: 1, children: /* @__PURE__ */ jsxs23(Text, { color: azClr, children: [
11536
11784
  renderMeter(pct, barWidth),
11537
11785
  " ",
11538
11786
  curVal.toFixed(1),
@@ -11550,6 +11798,9 @@ function ThresholdSection({
11550
11798
  const isActive = curVal >= z.from && curVal < z.to;
11551
11799
  const zColor = zoneColor(zoneFor((z.to - 0.01) / 100));
11552
11800
  const range = `${z.from}\u2013${z.to}%`;
11801
+ const zoneSpan = z.to - z.from;
11802
+ const fullWidth = 20;
11803
+ const fillLen = Math.round(zoneSpan / 100 * fullWidth);
11553
11804
  return /* @__PURE__ */ jsxs23(Box, { children: [
11554
11805
  /* @__PURE__ */ jsx24(Text, { color: zColor, children: "\u25CF" }),
11555
11806
  /* @__PURE__ */ jsxs23(Text, { color: isActive ? theme.textPrimary : theme.textSecondary, children: [
@@ -11562,14 +11813,16 @@ function ThresholdSection({
11562
11813
  ] }),
11563
11814
  /* @__PURE__ */ jsxs23(Text, { color: isActive ? theme.textSecondary : theme.textMuted, children: [
11564
11815
  " ",
11565
- z.desc
11816
+ z.desc.padEnd(22)
11566
11817
  ] }),
11567
- isActive ? /* @__PURE__ */ jsx24(Text, { color: zColor, children: " \u25C0 now" }) : null
11818
+ /* @__PURE__ */ jsx24(Text, { color: isActive ? zColor : theme.textMuted, children: "\u2588".repeat(fillLen) + "\u2591".repeat(fullWidth - fillLen) }),
11819
+ isActive ? /* @__PURE__ */ jsx24(Text, { color: zColor, children: " \u25C0" }) : null
11568
11820
  ] }, z.label);
11569
11821
  }) }),
11570
11822
  /* @__PURE__ */ jsxs23(Box, { marginTop: 1, children: [
11571
- /* @__PURE__ */ jsx24(Text, { color: theme.textMuted, children: "now " }),
11572
- /* @__PURE__ */ jsxs23(Text, { color: zoneColor(activeZone), children: [
11823
+ /* @__PURE__ */ jsxs23(Text, { color: azClr, children: [
11824
+ "\u25C6",
11825
+ " ",
11573
11826
  curVal.toFixed(1),
11574
11827
  "% ",
11575
11828
  zoneLabel(pct)
@@ -11617,7 +11870,7 @@ function AgentFootprintSection({
11617
11870
  const allAgents = [];
11618
11871
  if (leaderPct != null) allAgents.push({ name: "LEADER", ctxPct: leaderPct });
11619
11872
  for (const e of fleet) {
11620
- if (e.ctxPct != null) allAgents.push({ name: e.name, ctxPct: e.ctxPct });
11873
+ if (e.ctxPct != null) allAgents.push({ name: e.name, ctxPct: e.ctxPct, status: e.status });
11621
11874
  }
11622
11875
  if (allAgents.length === 0) {
11623
11876
  return /* @__PURE__ */ jsxs23(Box, { flexDirection: "column", marginTop: 1, children: [
@@ -11625,7 +11878,7 @@ function AgentFootprintSection({
11625
11878
  /* @__PURE__ */ jsx24(Text, { color: theme.textMuted, children: "No agent context data yet." })
11626
11879
  ] });
11627
11880
  }
11628
- const agentBarLen = Math.min(30, Math.max(8, contentWidth - 22));
11881
+ const agentBarLen = Math.min(30, Math.max(8, contentWidth - 30));
11629
11882
  return /* @__PURE__ */ jsxs23(Box, { flexDirection: "column", marginTop: 1, children: [
11630
11883
  /* @__PURE__ */ jsx24(SectionLabel, { children: "PER-AGENT FOOTPRINT" }),
11631
11884
  allAgents.map((a) => {
@@ -11635,6 +11888,7 @@ function AgentFootprintSection({
11635
11888
  const aPct = `${(apct * 100).toFixed(0)}%`.padStart(4);
11636
11889
  const tag = a.name === "LEADER" ? "\u{1F451}" : " ";
11637
11890
  const aBar = renderMeter(apct, agentBarLen);
11891
+ const spark = tuiMiniBar(apct, 10);
11638
11892
  return /* @__PURE__ */ jsx24(Box, { children: /* @__PURE__ */ jsxs23(Text, { children: [
11639
11893
  /* @__PURE__ */ jsxs23(Text, { children: [
11640
11894
  tag,
@@ -11644,10 +11898,12 @@ function AgentFootprintSection({
11644
11898
  /* @__PURE__ */ jsxs23(Text, { color: aColor, children: [
11645
11899
  aEmoji,
11646
11900
  " ",
11647
- aBar,
11648
- " ",
11649
- aPct
11650
- ] })
11901
+ aBar
11902
+ ] }),
11903
+ /* @__PURE__ */ jsx24(Text, { children: " " }),
11904
+ /* @__PURE__ */ jsx24(Text, { color: aColor, children: spark }),
11905
+ /* @__PURE__ */ jsx24(Text, { children: " " }),
11906
+ /* @__PURE__ */ jsx24(Text, { color: theme.textPrimary, children: aPct })
11651
11907
  ] }) }, a.name);
11652
11908
  })
11653
11909
  ] });
@@ -11664,69 +11920,100 @@ function MetricsSection({ data }) {
11664
11920
  const pct = data.ctxPct ?? (max > 0 ? used / max : 0);
11665
11921
  const free = max - used;
11666
11922
  const freePct = max > 0 ? (free / max * 100).toFixed(1) : "0.0";
11667
- const utilBar = renderMeter(pct, 20);
11923
+ const utilBar20 = renderMeter(pct, 20);
11924
+ const utilBar8 = renderMeter(pct, 8);
11925
+ const zClr = zoneColor(zoneFor(pct));
11668
11926
  return /* @__PURE__ */ jsxs23(Box, { flexDirection: "column", marginTop: 1, children: [
11669
11927
  /* @__PURE__ */ jsx24(SectionLabel, { children: "TOKEN METRICS" }),
11670
11928
  /* @__PURE__ */ jsxs23(Box, { children: [
11671
- /* @__PURE__ */ jsx24(Text, { color: theme.textMuted, children: "Used " }),
11672
- /* @__PURE__ */ jsx24(Text, { color: theme.textPrimary, children: used.toLocaleString("en-US") })
11673
- ] }),
11674
- /* @__PURE__ */ jsxs23(Box, { children: [
11675
- /* @__PURE__ */ jsx24(Text, { color: theme.textMuted, children: "Free " }),
11676
- /* @__PURE__ */ jsxs23(Text, { color: theme.textSecondary, children: [
11677
- free.toLocaleString("en-US"),
11678
- " (",
11679
- freePct,
11680
- "%)"
11681
- ] })
11682
- ] }),
11683
- /* @__PURE__ */ jsxs23(Box, { children: [
11684
- /* @__PURE__ */ jsx24(Text, { color: theme.textMuted, children: "Capacity " }),
11685
- /* @__PURE__ */ jsx24(Text, { color: theme.textPrimary, children: max.toLocaleString("en-US") })
11929
+ /* @__PURE__ */ jsx24(Box, { flexGrow: 1, children: /* @__PURE__ */ jsxs23(Text, { children: [
11930
+ /* @__PURE__ */ jsx24(Text, { color: theme.textMuted, children: "Used " }),
11931
+ /* @__PURE__ */ jsx24(Text, { color: theme.textPrimary, children: used.toLocaleString("en-US") })
11932
+ ] }) }),
11933
+ /* @__PURE__ */ jsx24(Box, { flexGrow: 1, children: /* @__PURE__ */ jsxs23(Text, { children: [
11934
+ /* @__PURE__ */ jsx24(Text, { color: theme.textMuted, children: "Free " }),
11935
+ /* @__PURE__ */ jsxs23(Text, { color: theme.textSecondary, children: [
11936
+ free.toLocaleString("en-US"),
11937
+ " (",
11938
+ freePct,
11939
+ "%)"
11940
+ ] })
11941
+ ] }) }),
11942
+ /* @__PURE__ */ jsx24(Box, { children: /* @__PURE__ */ jsxs23(Text, { children: [
11943
+ /* @__PURE__ */ jsx24(Text, { color: theme.textMuted, children: "Cap " }),
11944
+ /* @__PURE__ */ jsx24(Text, { color: theme.textPrimary, children: max.toLocaleString("en-US") })
11945
+ ] }) })
11686
11946
  ] }),
11687
11947
  /* @__PURE__ */ jsxs23(Box, { children: [
11688
11948
  /* @__PURE__ */ jsx24(Text, { color: theme.textMuted, children: "Utilization" }),
11689
11949
  /* @__PURE__ */ jsx24(Text, { children: " " }),
11690
- /* @__PURE__ */ jsx24(Text, { color: zoneColor(zoneFor(pct)), children: utilBar }),
11950
+ /* @__PURE__ */ jsx24(Text, { color: zClr, children: utilBar20 }),
11691
11951
  /* @__PURE__ */ jsx24(Text, { children: " " }),
11692
11952
  /* @__PURE__ */ jsxs23(Text, { color: theme.textSecondary, children: [
11693
11953
  (pct * 100).toFixed(1),
11694
11954
  "%"
11695
- ] })
11955
+ ] }),
11956
+ /* @__PURE__ */ jsx24(Text, { children: " " }),
11957
+ /* @__PURE__ */ jsx24(Text, { color: zClr, children: utilBar8 })
11696
11958
  ] }),
11697
- /* @__PURE__ */ jsxs23(Box, { children: [
11959
+ /* @__PURE__ */ jsx24(Box, { children: /* @__PURE__ */ jsxs23(Text, { children: [
11698
11960
  /* @__PURE__ */ jsx24(Text, { color: theme.textMuted, children: "Model " }),
11699
11961
  /* @__PURE__ */ jsx24(Text, { color: theme.textPrimary, children: data.model }),
11700
11962
  /* @__PURE__ */ jsx24(Text, { color: theme.textMuted, children: " \xB7 " }),
11701
- /* @__PURE__ */ jsx24(Text, { color: theme.textPrimary, children: data.provider })
11702
- ] }),
11703
- /* @__PURE__ */ jsxs23(Box, { children: [
11704
- /* @__PURE__ */ jsx24(Text, { color: theme.textMuted, children: "Mode " }),
11705
- /* @__PURE__ */ jsx24(Text, { color: theme.textSecondary, children: data.mode })
11706
- ] }),
11707
- /* @__PURE__ */ jsxs23(Box, { children: [
11708
- /* @__PURE__ */ jsx24(Text, { color: theme.textMuted, children: "Uptime " }),
11963
+ /* @__PURE__ */ jsx24(Text, { color: theme.textPrimary, children: data.provider }),
11964
+ /* @__PURE__ */ jsx24(Text, { color: theme.textMuted, children: " \xB7 Mode " }),
11965
+ /* @__PURE__ */ jsx24(Text, { color: theme.textSecondary, children: data.mode }),
11966
+ /* @__PURE__ */ jsx24(Text, { color: theme.textMuted, children: " \xB7 Uptime " }),
11709
11967
  /* @__PURE__ */ jsx24(Text, { color: theme.textSecondary, children: data.uptime })
11710
- ] })
11968
+ ] }) })
11711
11969
  ] });
11712
11970
  }
11971
+ function tuiMiniBar(pct, width) {
11972
+ const clamped = Math.max(0, Math.min(1, pct));
11973
+ const filled = Math.round(clamped * width);
11974
+ const empty = width - filled;
11975
+ return "\u2588".repeat(Math.max(0, filled)) + "\u2591".repeat(Math.max(0, empty));
11976
+ }
11713
11977
  function StatusSection({ data }) {
11714
11978
  const pct = data.ctxPct ?? 0;
11715
11979
  const z = zoneFor(pct);
11716
11980
  const emoji = zoneEmoji(pct);
11981
+ const zClr = zoneColor(z);
11982
+ const used = data.ctxTokens ?? 0;
11983
+ const max = data.ctxMaxTokens ?? 2e5;
11984
+ const barWidth = 20;
11985
+ const bar = tuiMiniBar(pct, barWidth);
11717
11986
  let verdict;
11718
11987
  if (pct > 0.85) {
11719
- verdict = `${emoji} CRITICAL \u2014 Context at ${(pct * 100).toFixed(1)}%. Consider compacting or a fresh session.`;
11988
+ verdict = `CRITICAL \u2014 Consider compacting or a fresh session.`;
11720
11989
  } else if (pct > 0.65) {
11721
- verdict = `${emoji} WARNING \u2014 Context at ${(pct * 100).toFixed(1)}%. Plan compaction soon.`;
11990
+ verdict = `WARNING \u2014 Plan compaction soon.`;
11722
11991
  } else if (pct > 0.45) {
11723
- verdict = `${emoji} MODERATE \u2014 Context at ${(pct * 100).toFixed(1)}%. Healthy, monitor as it grows.`;
11992
+ verdict = `MODERATE \u2014 Healthy, monitor as it grows.`;
11724
11993
  } else {
11725
- verdict = `${emoji} HEALTHY \u2014 Context at ${(pct * 100).toFixed(1)}%. Plenty of room for more conversation.`;
11994
+ verdict = `HEALTHY \u2014 Plenty of room for more conversation.`;
11726
11995
  }
11727
11996
  return /* @__PURE__ */ jsxs23(Box, { flexDirection: "column", marginTop: 1, children: [
11728
11997
  /* @__PURE__ */ jsx24(SectionLabel, { children: "STATUS" }),
11729
- /* @__PURE__ */ jsx24(Text, { color: zoneColor(z), children: verdict })
11998
+ /* @__PURE__ */ jsxs23(Box, { children: [
11999
+ /* @__PURE__ */ jsxs23(Text, { color: zClr, children: [
12000
+ bar,
12001
+ " ",
12002
+ (pct * 100).toFixed(1),
12003
+ "%"
12004
+ ] }),
12005
+ /* @__PURE__ */ jsx24(Text, { children: " " }),
12006
+ /* @__PURE__ */ jsxs23(Text, { color: theme.textMuted, children: [
12007
+ used.toLocaleString("en-US"),
12008
+ " / ",
12009
+ max.toLocaleString("en-US")
12010
+ ] })
12011
+ ] }),
12012
+ /* @__PURE__ */ jsxs23(Text, { color: zClr, children: [
12013
+ emoji,
12014
+ " ",
12015
+ verdict
12016
+ ] })
11730
12017
  ] });
11731
12018
  }
11732
12019
  function MemoryContextSection({ data }) {
@@ -17536,208 +17823,24 @@ function MailboxPanel({
17536
17823
  ] });
17537
17824
  }
17538
17825
 
17539
- // src/memory-context-monitor.ts
17540
- function emptyMemoryContextMonitor() {
17541
- return { memories: {}, transitions: [] };
17542
- }
17543
- function activeMemoryContextCount(state) {
17544
- return Object.values(state.memories).filter((memory) => memory.state === "active").length;
17545
- }
17546
- function memoryEventMatchesSession(payload, currentSessionId) {
17547
- const eventSessionId = stringValue(recordValue(payload).sessionId);
17548
- return eventSessionId === void 0 || eventSessionId === currentSessionId;
17549
- }
17550
- async function readMemoryRecordTotal(store) {
17551
- if (!store || typeof store !== "object" || !("stats" in store)) return void 0;
17552
- const stats = store.stats;
17553
- if (typeof stats !== "function") return void 0;
17554
- const result = await stats.call(store);
17555
- return typeof result.total === "number" && Number.isFinite(result.total) && result.total >= 0 ? Math.floor(result.total) : void 0;
17556
- }
17557
- function applyMemoryInjectorRun(state, payload) {
17558
- const at = stringValue(payload.at) ?? (/* @__PURE__ */ new Date()).toISOString();
17559
- const trigger = stringValue(payload.trigger) ?? "unknown";
17560
- const injected = arrayRecords(payload.injected);
17561
- const rejected = recordValue(payload.rejected);
17562
- const memories = { ...state.memories };
17563
- const transitions = [...state.transitions];
17564
- for (const item of injected) {
17565
- const id = stringValue(item.id);
17566
- if (!id) continue;
17567
- const previous = memories[id];
17568
- memories[id] = {
17569
- id,
17570
- kind: stringValue(item.kind) ?? "unknown",
17571
- text: stringValue(item.text) ?? "",
17572
- score: numberValue(item.score),
17573
- confidence: numberValue(item.confidence),
17574
- freshness: numberValue(item.freshness),
17575
- importance: numberValue(item.importance),
17576
- persistence: stringValue(item.persistence) ?? "unknown",
17577
- anchors: stringArray(item.anchors),
17578
- tags: stringArray(item.tags),
17579
- activationReasons: stringArray(item.activationReasons),
17580
- // Injection is pending until the next provider request. If this memory
17581
- // was already confirmed in the latest request, a re-injection must not
17582
- // erase that authoritative provider-context state.
17583
- state: previous?.state === "active" ? "active" : "injected",
17584
- trigger,
17585
- enteredAt: previous?.enteredAt ?? at,
17586
- lastSeenAt: at
17587
- };
17588
- transitions.unshift({
17589
- id: `${at}_injected_${id}`,
17590
- at,
17591
- memoryId: id,
17592
- action: "injected",
17593
- reason: `${trigger} \xB7 score ${numberValue(item.score).toFixed(2)}`
17594
- });
17595
- }
17596
- const outcome = stringValue(payload.outcome);
17597
- const errorStr = stringValue(payload.error);
17598
- return {
17599
- latest: {
17600
- at,
17601
- trigger,
17602
- matched: numberValue(payload.candidates),
17603
- injected: outcome === "error" ? 0 : injected.length,
17604
- filtered: Object.values(rejected).reduce((sum, value) => sum + numberValue(value), 0),
17605
- contextPressure: numberValue(payload.contextPressure),
17606
- injectedChars: numberValue(payload.injectedChars),
17607
- outcome: outcome ?? void 0,
17608
- ...outcome === "error" && errorStr ? { error: errorStr } : {}
17609
- },
17610
- memories,
17611
- transitions: transitions.slice(0, 100)
17612
- };
17613
- }
17614
- function applyMemoryContextSnapshot(state, payload) {
17615
- const at = stringValue(payload.at) ?? (/* @__PURE__ */ new Date()).toISOString();
17616
- const activeIds = stringArray(payload.activeMemoryIds);
17617
- const enteredIds = stringArray(payload.enteredMemoryIds);
17618
- const exitedIds = stringArray(payload.exitedMemoryIds);
17619
- const active = new Set(activeIds);
17620
- const memories = { ...state.memories };
17621
- const transitions = [...state.transitions];
17622
- for (const id of activeIds) {
17623
- const previous = memories[id];
17624
- memories[id] = previous ? { ...previous, state: "active", lastSeenAt: at, exitedAt: void 0 } : placeholder(id, at, "active");
17625
- }
17626
- for (const id of enteredIds) {
17627
- transitions.unshift({
17628
- id: `${at}_entered_${id}`,
17629
- at,
17630
- memoryId: id,
17631
- action: "entered",
17632
- reason: "provider request"
17633
- });
17634
- }
17635
- for (const id of exitedIds) {
17636
- const previous = memories[id];
17637
- if (previous) memories[id] = { ...previous, state: "exited", exitedAt: at };
17638
- transitions.unshift({
17639
- id: `${at}_exited_${id}`,
17640
- at,
17641
- memoryId: id,
17642
- action: "exited",
17643
- reason: "left provider context"
17644
- });
17645
- }
17646
- for (const [id, memory] of Object.entries(memories)) {
17647
- if ((memory.state === "injected" || memory.state === "active") && !active.has(id)) {
17648
- memories[id] = { ...memory, state: "exited", exitedAt: at };
17649
- if (!exitedIds.includes(id)) {
17650
- transitions.unshift({
17651
- id: `${at}_exited_before_provider_${id}`,
17652
- at,
17653
- memoryId: id,
17654
- action: "exited",
17655
- reason: memory.state === "injected" ? "removed before provider request" : "absent from provider context snapshot"
17656
- });
17657
- }
17658
- }
17659
- }
17660
- return { ...state, memories, transitions: transitions.slice(0, 100) };
17661
- }
17662
- function placeholder(id, at, state) {
17663
- return {
17664
- id,
17665
- kind: "unknown",
17666
- text: "Details unavailable in this TUI process.",
17667
- score: 0,
17668
- confidence: 0,
17669
- freshness: 0,
17670
- importance: 0,
17671
- persistence: "unknown",
17672
- anchors: [],
17673
- tags: [],
17674
- activationReasons: [],
17675
- state,
17676
- trigger: "context snapshot",
17677
- enteredAt: at,
17678
- lastSeenAt: at,
17679
- isPlaceholder: true
17680
- };
17681
- }
17682
- function recordValue(value) {
17683
- return value && typeof value === "object" && !Array.isArray(value) ? value : {};
17684
- }
17685
- function arrayRecords(value) {
17686
- return Array.isArray(value) ? value.filter((item) => !!item && typeof item === "object") : [];
17687
- }
17688
- function stringArray(value) {
17689
- return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
17690
- }
17691
- function stringValue(value) {
17692
- return typeof value === "string" && value.length > 0 ? value : void 0;
17693
- }
17694
- function numberValue(value) {
17695
- return typeof value === "number" && Number.isFinite(value) ? value : 0;
17696
- }
17697
-
17698
- // src/components/memory-context-widget.tsx
17699
- import { jsx as jsx48, jsxs as jsxs47 } from "react/jsx-runtime";
17700
- function MemoryContextWidget({ state }) {
17701
- const summary = state.latest;
17702
- if (!summary) return null;
17703
- const records = Object.values(state.memories);
17704
- const active = activeMemoryContextCount(state);
17705
- const pending = records.filter((memory) => memory.state === "injected").length;
17706
- const left = records.filter((memory) => memory.state === "exited").length;
17707
- return /* @__PURE__ */ jsxs47(Box, { flexDirection: "column", borderStyle: "single", borderColor: "magenta", paddingX: 1, children: [
17708
- /* @__PURE__ */ jsxs47(Text, { children: [
17709
- /* @__PURE__ */ jsx48(Text, { bold: true, color: "magenta", children: "MEMORY " }),
17710
- /* @__PURE__ */ jsx48(Text, { children: `${summary.matched} matched \xB7 ` }),
17711
- /* @__PURE__ */ jsx48(Text, { color: "green", children: `${summary.injected} injected` }),
17712
- /* @__PURE__ */ jsx48(Text, { children: " \xB7 " }),
17713
- /* @__PURE__ */ jsx48(Text, { color: "yellow", children: `${summary.filtered} filtered` }),
17714
- /* @__PURE__ */ jsx48(Text, { children: " \xB7 " }),
17715
- /* @__PURE__ */ jsx48(Text, { color: "cyan", children: `${active} ctx` }),
17716
- pending > 0 ? /* @__PURE__ */ jsx48(Text, { color: "yellow", children: ` \xB7 ${pending} pending` }) : null,
17717
- left > 0 ? /* @__PURE__ */ jsx48(Text, { color: theme.textMuted, children: ` \xB7 ${left} left` }) : null
17718
- ] }),
17719
- summary.error ? /* @__PURE__ */ jsx48(Text, { color: "red", children: `${summary.error}` }) : /* @__PURE__ */ jsx48(Text, { color: theme.textMuted, children: `${summary.trigger} \xB7 ctx ${Math.round(summary.contextPressure * 100)}% \xB7 +${summary.injectedChars} chars \xB7 /context = details` })
17720
- ] });
17721
- }
17722
-
17723
17826
  // src/components/mcp-picker.tsx
17724
- import { Fragment as Fragment20, jsx as jsx49, jsxs as jsxs48 } from "react/jsx-runtime";
17827
+ import { Fragment as Fragment20, jsx as jsx48, jsxs as jsxs47 } from "react/jsx-runtime";
17725
17828
  var CHROME_ROWS4 = 17;
17726
17829
  function statusBadge(status, enabled) {
17727
- if (!enabled) return /* @__PURE__ */ jsx49(Text, { dimColor: true, children: "\u25CB disabled" });
17830
+ if (!enabled) return /* @__PURE__ */ jsx48(Text, { dimColor: true, children: "\u25CB disabled" });
17728
17831
  switch (status) {
17729
17832
  case "connected":
17730
- return /* @__PURE__ */ jsx49(Text, { color: "green", children: "\u25CF connected" });
17833
+ return /* @__PURE__ */ jsx48(Text, { color: "green", children: "\u25CF connected" });
17731
17834
  case "connecting":
17732
- return /* @__PURE__ */ jsx49(Text, { color: "cyan", children: "\u25D0 connecting" });
17835
+ return /* @__PURE__ */ jsx48(Text, { color: "cyan", children: "\u25D0 connecting" });
17733
17836
  case "reconnecting":
17734
- return /* @__PURE__ */ jsx49(Text, { color: "cyan", children: "\u25D1 reconnecting" });
17837
+ return /* @__PURE__ */ jsx48(Text, { color: "cyan", children: "\u25D1 reconnecting" });
17735
17838
  case "disconnected":
17736
- return /* @__PURE__ */ jsx49(Text, { dimColor: true, children: "\u25CB disconnected" });
17839
+ return /* @__PURE__ */ jsx48(Text, { dimColor: true, children: "\u25CB disconnected" });
17737
17840
  case "failed":
17738
- return /* @__PURE__ */ jsx49(Text, { color: "red", children: "\u2717 failed" });
17841
+ return /* @__PURE__ */ jsx48(Text, { color: "red", children: "\u2717 failed" });
17739
17842
  default:
17740
- return /* @__PURE__ */ jsx49(Text, { dimColor: true, children: status });
17843
+ return /* @__PURE__ */ jsx48(Text, { dimColor: true, children: status });
17741
17844
  }
17742
17845
  }
17743
17846
  function McpPicker({
@@ -17754,36 +17857,36 @@ function McpPicker({
17754
17857
  const windowEnd = Math.min(windowStart + maxVisible, total);
17755
17858
  const above = windowStart;
17756
17859
  const below = total - windowEnd;
17757
- return /* @__PURE__ */ jsxs48(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
17758
- /* @__PURE__ */ jsx49(Text, { bold: true, color: "cyan", children: "MCP Servers" }),
17759
- /* @__PURE__ */ jsx49(Text, { dimColor: true, children: "\u2191/\u2193 select \xB7 Enter/\u2190/\u2192 toggle enable \xB7 r restart \xB7 Esc close" }),
17760
- /* @__PURE__ */ jsx49(Box, { marginTop: 1, flexDirection: "column", children: items.length === 0 ? /* @__PURE__ */ jsx49(Text, { dimColor: true, children: busy ? "Loading servers\u2026" : "No MCP servers configured." }) : /* @__PURE__ */ jsxs48(Fragment20, { children: [
17761
- above > 0 ? /* @__PURE__ */ jsx49(Text, { dimColor: true, children: ` \u2191 ${above} more` }) : null,
17860
+ return /* @__PURE__ */ jsxs47(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
17861
+ /* @__PURE__ */ jsx48(Text, { bold: true, color: "cyan", children: "MCP Servers" }),
17862
+ /* @__PURE__ */ jsx48(Text, { dimColor: true, children: "\u2191/\u2193 select \xB7 Enter/\u2190/\u2192 toggle enable \xB7 r restart \xB7 Esc close" }),
17863
+ /* @__PURE__ */ jsx48(Box, { marginTop: 1, flexDirection: "column", children: items.length === 0 ? /* @__PURE__ */ jsx48(Text, { dimColor: true, children: busy ? "Loading servers\u2026" : "No MCP servers configured." }) : /* @__PURE__ */ jsxs47(Fragment20, { children: [
17864
+ above > 0 ? /* @__PURE__ */ jsx48(Text, { dimColor: true, children: ` \u2191 ${above} more` }) : null,
17762
17865
  items.slice(windowStart, windowEnd).map((item, i) => {
17763
17866
  const index = windowStart + i;
17764
17867
  const focused = index === selected;
17765
17868
  const marker = focused ? "\u203A" : " ";
17766
- return /* @__PURE__ */ jsxs48(Text, { color: focused ? "cyan" : void 0, wrap: "truncate-end", children: [
17869
+ return /* @__PURE__ */ jsxs47(Text, { color: focused ? "cyan" : void 0, wrap: "truncate-end", children: [
17767
17870
  marker,
17768
17871
  " ",
17769
17872
  statusBadge(item.status, item.enabled),
17770
17873
  " ",
17771
- /* @__PURE__ */ jsx49(Text, { bold: true, children: item.name.padEnd(18) }),
17772
- /* @__PURE__ */ jsxs48(Text, { dimColor: true, children: [
17874
+ /* @__PURE__ */ jsx48(Text, { bold: true, children: item.name.padEnd(18) }),
17875
+ /* @__PURE__ */ jsxs47(Text, { dimColor: true, children: [
17773
17876
  item.transport.padEnd(14),
17774
17877
  item.toolCount > 0 ? `${item.toolCount} tools` : "",
17775
17878
  item.lazy ? " lazy" : ""
17776
17879
  ] })
17777
17880
  ] }, item.name);
17778
17881
  }),
17779
- below > 0 ? /* @__PURE__ */ jsx49(Text, { dimColor: true, children: ` \u2193 ${below} more` }) : null
17882
+ below > 0 ? /* @__PURE__ */ jsx48(Text, { dimColor: true, children: ` \u2193 ${below} more` }) : null
17780
17883
  ] }) }),
17781
- hint ? /* @__PURE__ */ jsx49(Box, { marginTop: 1, children: /* @__PURE__ */ jsx49(Text, { dimColor: true, children: hint }) }) : null
17884
+ hint ? /* @__PURE__ */ jsx48(Box, { marginTop: 1, children: /* @__PURE__ */ jsx48(Text, { dimColor: true, children: hint }) }) : null
17782
17885
  ] });
17783
17886
  }
17784
17887
 
17785
17888
  // src/components/mode-picker.tsx
17786
- import { jsx as jsx50, jsxs as jsxs49 } from "react/jsx-runtime";
17889
+ import { jsx as jsx49, jsxs as jsxs48 } from "react/jsx-runtime";
17787
17890
  function modeFamily(mode) {
17788
17891
  if (mode.tags?.includes("lite")) return "lite";
17789
17892
  if (mode.tags?.includes("deep")) return "deep";
@@ -17830,44 +17933,44 @@ function ModePicker({
17830
17933
  }) {
17831
17934
  const activeMode = modes.find((mode) => mode.isActive);
17832
17935
  const modeMeta = `${modes.length} mode${modes.length === 1 ? "" : "s"}`;
17833
- return /* @__PURE__ */ jsxs49(Box, { flexDirection: "column", borderStyle: "round", borderColor: "blue", paddingX: 1, children: [
17834
- /* @__PURE__ */ jsxs49(Text, { color: "cyan", bold: true, children: [
17936
+ return /* @__PURE__ */ jsxs48(Box, { flexDirection: "column", borderStyle: "round", borderColor: "blue", paddingX: 1, children: [
17937
+ /* @__PURE__ */ jsxs48(Text, { color: "cyan", bold: true, children: [
17835
17938
  "\u2501\u2501 Mode Selection \u2501\u2501 ",
17836
- /* @__PURE__ */ jsx50(Text, { dimColor: true, children: modeMeta })
17939
+ /* @__PURE__ */ jsx49(Text, { dimColor: true, children: modeMeta })
17837
17940
  ] }),
17838
- /* @__PURE__ */ jsxs49(Text, { dimColor: true, children: [
17941
+ /* @__PURE__ */ jsxs48(Text, { dimColor: true, children: [
17839
17942
  "Current: ",
17840
17943
  activeMode ? activeMode.name : "none",
17841
17944
  " \xB7 \u2191/\u2193 navigate \xB7 Enter select \xB7 Esc cancel"
17842
17945
  ] }),
17843
- modes.length === 0 ? /* @__PURE__ */ jsx50(Text, { dimColor: true, children: "No modes available." }) : modes.map((opt, i) => /* @__PURE__ */ jsxs49(
17946
+ modes.length === 0 ? /* @__PURE__ */ jsx49(Text, { dimColor: true, children: "No modes available." }) : modes.map((opt, i) => /* @__PURE__ */ jsxs48(
17844
17947
  Text,
17845
17948
  {
17846
17949
  inverse: i === selected,
17847
17950
  ...i === selected ? { color: "cyan" } : {},
17848
17951
  children: [
17849
17952
  i === selected ? "\u203A " : " ",
17850
- /* @__PURE__ */ jsx50(Text, { bold: true, children: opt.name.padEnd(18) }),
17851
- /* @__PURE__ */ jsxs49(Text, { color: familyColor(opt.family), children: [
17953
+ /* @__PURE__ */ jsx49(Text, { bold: true, children: opt.name.padEnd(18) }),
17954
+ /* @__PURE__ */ jsxs48(Text, { color: familyColor(opt.family), children: [
17852
17955
  "[",
17853
17956
  familyLabel(opt.family),
17854
17957
  "]"
17855
17958
  ] }),
17856
- /* @__PURE__ */ jsxs49(Text, { dimColor: true, children: [
17959
+ /* @__PURE__ */ jsxs48(Text, { dimColor: true, children: [
17857
17960
  " ",
17858
17961
  opt.description
17859
17962
  ] }),
17860
- opt.isActive ? /* @__PURE__ */ jsx50(Text, { color: "green", children: " \u25CF active" }) : null
17963
+ opt.isActive ? /* @__PURE__ */ jsx49(Text, { color: "green", children: " \u25CF active" }) : null
17861
17964
  ]
17862
17965
  },
17863
17966
  opt.id
17864
17967
  )),
17865
- hint ? /* @__PURE__ */ jsx50(Text, { color: "yellow", children: hint }) : null
17968
+ hint ? /* @__PURE__ */ jsx49(Text, { color: "yellow", children: hint }) : null
17866
17969
  ] });
17867
17970
  }
17868
17971
 
17869
17972
  // src/components/model-picker.tsx
17870
- import { jsx as jsx51, jsxs as jsxs50 } from "react/jsx-runtime";
17973
+ import { jsx as jsx50, jsxs as jsxs49 } from "react/jsx-runtime";
17871
17974
  var MAX_VISIBLE2 = 10;
17872
17975
  function getVisibleWindow2(selected, total) {
17873
17976
  const half = Math.floor(MAX_VISIBLE2 / 2);
@@ -17895,27 +17998,27 @@ function ModelPicker({
17895
17998
  }) {
17896
17999
  const title = titleLabel ?? "Switch model";
17897
18000
  if (step === "provider") {
17898
- return /* @__PURE__ */ jsxs50(Box, { flexDirection: "column", borderStyle: "round", borderColor: UI_COLORS.border, paddingX: 1, children: [
17899
- /* @__PURE__ */ jsx51(Text, { color: UI_COLORS.title, bold: true, children: `\u2501\u2501 ${title} \u2014 Step 1/2: Pick provider \u2501\u2501` }),
17900
- /* @__PURE__ */ jsx51(Text, { dimColor: true, children: "\u2191/\u2193 navigate \xB7 Enter select \xB7 Esc cancel \xB7 Ctrl+C exit" }),
17901
- providerOptions.length === 0 ? /* @__PURE__ */ jsx51(Text, { dimColor: true, children: "(no providers with keys \u2014 add one via `wstack auth`)" }) : /* @__PURE__ */ jsx51(Box, { flexDirection: "column", minHeight: providerOptions.length, children: providerOptions.map((p, i) => {
18001
+ return /* @__PURE__ */ jsxs49(Box, { flexDirection: "column", borderStyle: "round", borderColor: UI_COLORS.border, paddingX: 1, children: [
18002
+ /* @__PURE__ */ jsx50(Text, { color: UI_COLORS.title, bold: true, children: `\u2501\u2501 ${title} \u2014 Step 1/2: Pick provider \u2501\u2501` }),
18003
+ /* @__PURE__ */ jsx50(Text, { dimColor: true, children: "\u2191/\u2193 navigate \xB7 Enter select \xB7 Esc cancel \xB7 Ctrl+C exit" }),
18004
+ providerOptions.length === 0 ? /* @__PURE__ */ jsx50(Text, { dimColor: true, children: "(no providers with keys \u2014 add one via `wstack auth`)" }) : /* @__PURE__ */ jsx50(Box, { flexDirection: "column", minHeight: providerOptions.length, children: providerOptions.map((p, i) => {
17902
18005
  const isSelected = i === selected;
17903
18006
  const famColor = colorForFamily(p.family);
17904
- return /* @__PURE__ */ jsxs50(
18007
+ return /* @__PURE__ */ jsxs49(
17905
18008
  Text,
17906
18009
  {
17907
18010
  inverse: isSelected,
17908
18011
  ...isSelected ? { color: UI_COLORS.focused } : {},
17909
18012
  children: [
17910
18013
  isSelected ? "\u203A " : " ",
17911
- /* @__PURE__ */ jsx51(Text, { bold: true, color: isSelected ? void 0 : famColor, children: p.id.padEnd(28) }),
17912
- /* @__PURE__ */ jsxs50(Text, { color: isSelected ? void 0 : famColor, dimColor: !isSelected, children: [
18014
+ /* @__PURE__ */ jsx50(Text, { bold: true, color: isSelected ? void 0 : famColor, children: p.id.padEnd(28) }),
18015
+ /* @__PURE__ */ jsxs49(Text, { color: isSelected ? void 0 : famColor, dimColor: !isSelected, children: [
17913
18016
  " ",
17914
18017
  "[",
17915
18018
  p.family,
17916
18019
  "]"
17917
18020
  ] }),
17918
- /* @__PURE__ */ jsxs50(Text, { dimColor: true, children: [
18021
+ /* @__PURE__ */ jsxs49(Text, { dimColor: true, children: [
17919
18022
  " ",
17920
18023
  p.models.length,
17921
18024
  " model",
@@ -17926,15 +18029,15 @@ function ModelPicker({
17926
18029
  p.id
17927
18030
  );
17928
18031
  }) }),
17929
- hint ? /* @__PURE__ */ jsx51(Text, { color: UI_COLORS.hint, children: hint }) : null
18032
+ hint ? /* @__PURE__ */ jsx50(Text, { color: UI_COLORS.hint, children: hint }) : null
17930
18033
  ] });
17931
18034
  }
17932
18035
  const total = filteredOptions.length;
17933
18036
  const { start, end } = getVisibleWindow2(selected, total);
17934
18037
  const visibleItems = filteredOptions.slice(start, end);
17935
18038
  const searchHint = searchQuery ? ` | filter:"${searchQuery}" \u2192 ${total} match${total === 1 ? "" : "es"}` : total > MAX_VISIBLE2 ? ` (${total} models \u2014 type to filter)` : "";
17936
- return /* @__PURE__ */ jsxs50(Box, { flexDirection: "column", borderStyle: "round", borderColor: UI_COLORS.border, paddingX: 1, children: [
17937
- /* @__PURE__ */ jsxs50(Text, { color: UI_COLORS.title, bold: true, children: [
18039
+ return /* @__PURE__ */ jsxs49(Box, { flexDirection: "column", borderStyle: "round", borderColor: UI_COLORS.border, paddingX: 1, children: [
18040
+ /* @__PURE__ */ jsxs49(Text, { color: UI_COLORS.title, bold: true, children: [
17938
18041
  `\u2501\u2501 ${title} \u2014 Step 2/2: Pick model `,
17939
18042
  "(",
17940
18043
  pickedProviderId,
@@ -17942,9 +18045,9 @@ function ModelPicker({
17942
18045
  ")",
17943
18046
  " \u2501\u2501"
17944
18047
  ] }),
17945
- /* @__PURE__ */ jsx51(Text, { dimColor: true, children: "\u2191/\u2193 navigate \xB7 Enter select \xB7 Esc back \xB7 Ctrl+C exit \xB7 type to filter" }),
17946
- total === 0 ? /* @__PURE__ */ jsx51(Text, { dimColor: true, children: searchQuery ? `(no models match "${searchQuery}")` : "(no models known for this provider)" }) : /* @__PURE__ */ jsxs50(Box, { flexDirection: "column", minHeight: MAX_VISIBLE2 + 2, children: [
17947
- start > 0 && /* @__PURE__ */ jsxs50(Text, { dimColor: true, children: [
18048
+ /* @__PURE__ */ jsx50(Text, { dimColor: true, children: "\u2191/\u2193 navigate \xB7 Enter select \xB7 Esc back \xB7 Ctrl+C exit \xB7 type to filter" }),
18049
+ total === 0 ? /* @__PURE__ */ jsx50(Text, { dimColor: true, children: searchQuery ? `(no models match "${searchQuery}")` : "(no models known for this provider)" }) : /* @__PURE__ */ jsxs49(Box, { flexDirection: "column", minHeight: MAX_VISIBLE2 + 2, children: [
18050
+ start > 0 && /* @__PURE__ */ jsxs49(Text, { dimColor: true, children: [
17948
18051
  "\u25B2 ",
17949
18052
  start,
17950
18053
  " above"
@@ -17952,7 +18055,7 @@ function ModelPicker({
17952
18055
  visibleItems.map((id, vi) => {
17953
18056
  const absoluteIndex = start + vi;
17954
18057
  const isSelected = absoluteIndex === selected;
17955
- return /* @__PURE__ */ jsxs50(
18058
+ return /* @__PURE__ */ jsxs49(
17956
18059
  Text,
17957
18060
  {
17958
18061
  inverse: isSelected,
@@ -17966,20 +18069,20 @@ function ModelPicker({
17966
18069
  );
17967
18070
  }),
17968
18071
  Array.from({ length: MAX_VISIBLE2 - visibleItems.length }).map(
17969
- (_, i) => /* @__PURE__ */ jsx51(Text, { children: " " }, `pad-${i}`)
18072
+ (_, i) => /* @__PURE__ */ jsx50(Text, { children: " " }, `pad-${i}`)
17970
18073
  ),
17971
- end < total && /* @__PURE__ */ jsxs50(Text, { dimColor: true, children: [
18074
+ end < total && /* @__PURE__ */ jsxs49(Text, { dimColor: true, children: [
17972
18075
  "\u25BC ",
17973
18076
  total - end,
17974
18077
  " below"
17975
18078
  ] })
17976
18079
  ] }),
17977
- hint ? /* @__PURE__ */ jsx51(Text, { color: UI_COLORS.hint, children: hint }) : null
18080
+ hint ? /* @__PURE__ */ jsx50(Text, { color: UI_COLORS.hint, children: hint }) : null
17978
18081
  ] });
17979
18082
  }
17980
18083
 
17981
18084
  // src/components/phase-monitor.tsx
17982
- import { Fragment as Fragment21, jsx as jsx52, jsxs as jsxs51 } from "react/jsx-runtime";
18085
+ import { Fragment as Fragment21, jsx as jsx51, jsxs as jsxs50 } from "react/jsx-runtime";
17983
18086
  var fmtElapsed3 = (ms) => {
17984
18087
  const s2 = Math.floor(ms / 1e3);
17985
18088
  const m = Math.floor(s2 / 60);
@@ -18012,74 +18115,74 @@ function PhaseMonitor({
18012
18115
  );
18013
18116
  const done = phaseList.filter((p) => p.status === "completed" || p.status === "skipped");
18014
18117
  const failed = phaseList.filter((p) => p.status === "failed");
18015
- return /* @__PURE__ */ jsxs51(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
18016
- /* @__PURE__ */ jsxs51(Box, { flexDirection: "row", gap: 1, marginBottom: 1, children: [
18017
- /* @__PURE__ */ jsx52(Text, { bold: true, color: "cyan", children: "PHASE MONITOR" }),
18018
- /* @__PURE__ */ jsx52(Text, { dimColor: true, children: "\u2502" }),
18019
- /* @__PURE__ */ jsxs51(Text, { dimColor: true, children: [
18118
+ return /* @__PURE__ */ jsxs50(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
18119
+ /* @__PURE__ */ jsxs50(Box, { flexDirection: "row", gap: 1, marginBottom: 1, children: [
18120
+ /* @__PURE__ */ jsx51(Text, { bold: true, color: "cyan", children: "PHASE MONITOR" }),
18121
+ /* @__PURE__ */ jsx51(Text, { dimColor: true, children: "\u2502" }),
18122
+ /* @__PURE__ */ jsxs50(Text, { dimColor: true, children: [
18020
18123
  "\u23F1 ",
18021
18124
  fmtElapsed3(elapsedMs)
18022
18125
  ] }),
18023
- /* @__PURE__ */ jsx52(Text, { dimColor: true, children: "\u2502" }),
18024
- /* @__PURE__ */ jsxs51(Text, { color: "yellow", children: [
18126
+ /* @__PURE__ */ jsx51(Text, { dimColor: true, children: "\u2502" }),
18127
+ /* @__PURE__ */ jsxs50(Text, { color: "yellow", children: [
18025
18128
  "\u25B6",
18026
18129
  running.length
18027
18130
  ] }),
18028
- /* @__PURE__ */ jsx52(Text, { dimColor: true, children: "\xB7" }),
18029
- /* @__PURE__ */ jsxs51(Text, { color: "green", children: [
18131
+ /* @__PURE__ */ jsx51(Text, { dimColor: true, children: "\xB7" }),
18132
+ /* @__PURE__ */ jsxs50(Text, { color: "green", children: [
18030
18133
  "\u2713",
18031
18134
  done.length
18032
18135
  ] }),
18033
- failed.length > 0 ? /* @__PURE__ */ jsxs51(Fragment21, { children: [
18034
- /* @__PURE__ */ jsx52(Text, { dimColor: true, children: "\xB7" }),
18035
- /* @__PURE__ */ jsxs51(Text, { color: "red", children: [
18136
+ failed.length > 0 ? /* @__PURE__ */ jsxs50(Fragment21, { children: [
18137
+ /* @__PURE__ */ jsx51(Text, { dimColor: true, children: "\xB7" }),
18138
+ /* @__PURE__ */ jsxs50(Text, { color: "red", children: [
18036
18139
  "\u2717",
18037
18140
  failed.length
18038
18141
  ] })
18039
18142
  ] }) : null,
18040
- /* @__PURE__ */ jsx52(Text, { dimColor: true, children: "\u2502 Ctrl+P to close" })
18143
+ /* @__PURE__ */ jsx51(Text, { dimColor: true, children: "\u2502 Ctrl+P to close" })
18041
18144
  ] }),
18042
- phaseList.length === 0 ? /* @__PURE__ */ jsx52(Text, { dimColor: true, children: "No phases active. Use /goal start [title] to begin." }) : phaseList.map((phase, i) => {
18145
+ phaseList.length === 0 ? /* @__PURE__ */ jsx51(Text, { dimColor: true, children: "No phases active. Use /goal start [title] to begin." }) : phaseList.map((phase, i) => {
18043
18146
  const s2 = fmtPhase(phase.status);
18044
18147
  const phaseKey = Object.keys(phases).find((k) => phases[k] === phase) ?? String(i);
18045
18148
  const isRunning = runningPhaseIds.includes(phaseKey);
18046
18149
  const elapsed = phase.startedAt ? fmtElapsed3(nowTick - phase.startedAt) : "\u2014";
18047
18150
  const progress = phase.totalTasks > 0 ? `${phase.completedTasks}/${phase.totalTasks}` : "\u2014";
18048
- return /* @__PURE__ */ jsxs51(Box, { flexDirection: "column", marginTop: 1, children: [
18049
- /* @__PURE__ */ jsxs51(Box, { flexDirection: "row", gap: 1, children: [
18050
- /* @__PURE__ */ jsx52(Text, { color: s2.color, bold: true, children: s2.icon }),
18051
- /* @__PURE__ */ jsx52(Text, { bold: true, children: phase.name }),
18052
- /* @__PURE__ */ jsx52(Text, { dimColor: true, children: "\xB7" }),
18053
- /* @__PURE__ */ jsx52(Text, { color: s2.color, children: s2.label }),
18054
- isRunning ? /* @__PURE__ */ jsxs51(Fragment21, { children: [
18055
- /* @__PURE__ */ jsx52(Text, { dimColor: true, children: "\xB7" }),
18056
- /* @__PURE__ */ jsxs51(Text, { dimColor: true, children: [
18151
+ return /* @__PURE__ */ jsxs50(Box, { flexDirection: "column", marginTop: 1, children: [
18152
+ /* @__PURE__ */ jsxs50(Box, { flexDirection: "row", gap: 1, children: [
18153
+ /* @__PURE__ */ jsx51(Text, { color: s2.color, bold: true, children: s2.icon }),
18154
+ /* @__PURE__ */ jsx51(Text, { bold: true, children: phase.name }),
18155
+ /* @__PURE__ */ jsx51(Text, { dimColor: true, children: "\xB7" }),
18156
+ /* @__PURE__ */ jsx51(Text, { color: s2.color, children: s2.label }),
18157
+ isRunning ? /* @__PURE__ */ jsxs50(Fragment21, { children: [
18158
+ /* @__PURE__ */ jsx51(Text, { dimColor: true, children: "\xB7" }),
18159
+ /* @__PURE__ */ jsxs50(Text, { dimColor: true, children: [
18057
18160
  "elapsed ",
18058
18161
  elapsed
18059
18162
  ] })
18060
18163
  ] }) : null,
18061
- phase.totalTasks > 0 && /* @__PURE__ */ jsxs51(Fragment21, { children: [
18062
- /* @__PURE__ */ jsx52(Text, { dimColor: true, children: "\xB7" }),
18063
- /* @__PURE__ */ jsxs51(Text, { dimColor: true, children: [
18164
+ phase.totalTasks > 0 && /* @__PURE__ */ jsxs50(Fragment21, { children: [
18165
+ /* @__PURE__ */ jsx51(Text, { dimColor: true, children: "\xB7" }),
18166
+ /* @__PURE__ */ jsxs50(Text, { dimColor: true, children: [
18064
18167
  "tasks ",
18065
18168
  progress
18066
18169
  ] })
18067
18170
  ] })
18068
18171
  ] }),
18069
- (phase.activeTasks ?? []).map((t) => /* @__PURE__ */ jsxs51(Box, { flexDirection: "row", gap: 1, marginLeft: 2, children: [
18070
- /* @__PURE__ */ jsx52(Text, { color: "yellow", children: "\u25CF" }),
18071
- /* @__PURE__ */ jsx52(Text, { color: "cyan", children: t.agent ?? "agent" }),
18072
- /* @__PURE__ */ jsx52(Text, { dimColor: true, children: "\u2192" }),
18073
- /* @__PURE__ */ jsx52(Text, { dimColor: true, children: t.title || "(task)" })
18172
+ (phase.activeTasks ?? []).map((t) => /* @__PURE__ */ jsxs50(Box, { flexDirection: "row", gap: 1, marginLeft: 2, children: [
18173
+ /* @__PURE__ */ jsx51(Text, { color: "yellow", children: "\u25CF" }),
18174
+ /* @__PURE__ */ jsx51(Text, { color: "cyan", children: t.agent ?? "agent" }),
18175
+ /* @__PURE__ */ jsx51(Text, { dimColor: true, children: "\u2192" }),
18176
+ /* @__PURE__ */ jsx51(Text, { dimColor: true, children: t.title || "(task)" })
18074
18177
  ] }, t.taskId))
18075
18178
  ] }, phaseKey);
18076
18179
  }),
18077
- /* @__PURE__ */ jsx52(Box, { marginTop: 1, children: /* @__PURE__ */ jsx52(Text, { dimColor: true, children: "\u2191/\u2193 navigate phases" }) })
18180
+ /* @__PURE__ */ jsx51(Box, { marginTop: 1, children: /* @__PURE__ */ jsx51(Text, { dimColor: true, children: "\u2191/\u2193 navigate phases" }) })
18078
18181
  ] });
18079
18182
  }
18080
18183
 
18081
18184
  // src/components/phase-panel.tsx
18082
- import { jsx as jsx53, jsxs as jsxs52 } from "react/jsx-runtime";
18185
+ import { jsx as jsx52, jsxs as jsxs51 } from "react/jsx-runtime";
18083
18186
  var fmtElapsed4 = (ms) => {
18084
18187
  const s2 = Math.floor(ms / 1e3);
18085
18188
  const m = Math.floor(s2 / 60);
@@ -18106,7 +18209,7 @@ function PhasePanel({ phases, nowTick }) {
18106
18209
  const done = list.filter((p) => p.status === "completed" || p.status === "skipped").length;
18107
18210
  const running = list.filter((p) => p.status === "running").length;
18108
18211
  const failed = list.filter((p) => p.status === "failed").length;
18109
- return /* @__PURE__ */ jsxs52(
18212
+ return /* @__PURE__ */ jsxs51(
18110
18213
  Box,
18111
18214
  {
18112
18215
  flexDirection: "column",
@@ -18117,27 +18220,27 @@ function PhasePanel({ phases, nowTick }) {
18117
18220
  borderLeft: false,
18118
18221
  borderRight: false,
18119
18222
  children: [
18120
- /* @__PURE__ */ jsxs52(Box, { flexDirection: "row", gap: 2, children: [
18121
- /* @__PURE__ */ jsx53(Text, { dimColor: true, children: "Phases" }),
18122
- /* @__PURE__ */ jsx53(Text, { dimColor: true, children: "\u2502" }),
18123
- /* @__PURE__ */ jsxs52(Text, { color: "yellow", children: [
18223
+ /* @__PURE__ */ jsxs51(Box, { flexDirection: "row", gap: 2, children: [
18224
+ /* @__PURE__ */ jsx52(Text, { dimColor: true, children: "Phases" }),
18225
+ /* @__PURE__ */ jsx52(Text, { dimColor: true, children: "\u2502" }),
18226
+ /* @__PURE__ */ jsxs51(Text, { color: "yellow", children: [
18124
18227
  "\u25B6",
18125
18228
  running
18126
18229
  ] }),
18127
- /* @__PURE__ */ jsxs52(Text, { dimColor: true, children: [
18230
+ /* @__PURE__ */ jsxs51(Text, { dimColor: true, children: [
18128
18231
  "\u2713",
18129
18232
  done
18130
18233
  ] }),
18131
- failed > 0 ? /* @__PURE__ */ jsxs52(Text, { color: "red", children: [
18234
+ failed > 0 ? /* @__PURE__ */ jsxs51(Text, { color: "red", children: [
18132
18235
  "\u2717",
18133
18236
  failed
18134
18237
  ] }) : null,
18135
- /* @__PURE__ */ jsxs52(Text, { dimColor: true, children: [
18238
+ /* @__PURE__ */ jsxs51(Text, { dimColor: true, children: [
18136
18239
  "\xB7 ",
18137
18240
  list.length,
18138
18241
  " total"
18139
18242
  ] }),
18140
- /* @__PURE__ */ jsx53(Text, { dimColor: true, children: "\xB7 Ctrl+P for details" })
18243
+ /* @__PURE__ */ jsx52(Text, { dimColor: true, children: "\xB7 Ctrl+P for details" })
18141
18244
  ] }),
18142
18245
  list.map((phase, i) => {
18143
18246
  const phaseKey = Object.keys(phases).find((k) => phases[k] === phase) ?? String(i);
@@ -18146,18 +18249,18 @@ function PhasePanel({ phases, nowTick }) {
18146
18249
  const elapsed = phase.startedAt ? fmtElapsed4(nowTick - phase.startedAt) : "";
18147
18250
  const isRunning = st2.icon === "\u25CF";
18148
18251
  const animPhase = Math.floor(nowTick / 250);
18149
- return /* @__PURE__ */ jsxs52(Box, { flexDirection: "row", gap: 1, children: [
18150
- /* @__PURE__ */ jsx53(Text, { color: st2.color, children: st2.icon }),
18252
+ return /* @__PURE__ */ jsxs51(Box, { flexDirection: "row", gap: 1, children: [
18253
+ /* @__PURE__ */ jsx52(Text, { color: st2.color, children: st2.icon }),
18151
18254
  isRunning ? (
18152
18255
  // Running phase: smooth rainbow gradient on the name
18153
- Array.from(phase.name.slice(0, 14)).map((ch, ci) => /* @__PURE__ */ jsx53(Text, { bold: true, color: rainbowColor(ci, animPhase), children: ch }, ci))
18154
- ) : /* @__PURE__ */ jsx53(Text, { children: phase.name.slice(0, 14).padEnd(14) }),
18155
- /* @__PURE__ */ jsx53(Text, { color: st2.color, dimColor: true, children: isRunning ? phase.status : "" }),
18156
- progress ? /* @__PURE__ */ jsxs52(Text, { dimColor: true, children: [
18256
+ Array.from(phase.name.slice(0, 14)).map((ch, ci) => /* @__PURE__ */ jsx52(Text, { bold: true, color: rainbowColor(ci, animPhase), children: ch }, ci))
18257
+ ) : /* @__PURE__ */ jsx52(Text, { children: phase.name.slice(0, 14).padEnd(14) }),
18258
+ /* @__PURE__ */ jsx52(Text, { color: st2.color, dimColor: true, children: isRunning ? phase.status : "" }),
18259
+ progress ? /* @__PURE__ */ jsxs51(Text, { dimColor: true, children: [
18157
18260
  " ",
18158
18261
  progress
18159
18262
  ] }) : null,
18160
- elapsed && isRunning ? /* @__PURE__ */ jsxs52(Text, { dimColor: true, children: [
18263
+ elapsed && isRunning ? /* @__PURE__ */ jsxs51(Text, { dimColor: true, children: [
18161
18264
  " ",
18162
18265
  elapsed
18163
18266
  ] }) : null
@@ -18173,7 +18276,7 @@ import { useCallback, useEffect as useEffect19, useMemo as useMemo7, useState as
18173
18276
  import * as fs from "node:fs/promises";
18174
18277
  import * as path from "node:path";
18175
18278
  import { resolveWstackPaths, sessionScopedPath } from "@wrongstack/core/utils";
18176
- import { jsx as jsx54, jsxs as jsxs53 } from "react/jsx-runtime";
18279
+ import { jsx as jsx53, jsxs as jsxs52 } from "react/jsx-runtime";
18177
18280
  var STATUS_COLOR = {
18178
18281
  open: "gray",
18179
18282
  in_progress: "yellow",
@@ -18267,22 +18370,22 @@ function PlanPanel({
18267
18370
  const visible = ordered.slice(window.start, window.end);
18268
18371
  const selectedItem = ordered[selected];
18269
18372
  const completeRatio = items.length > 0 ? done.length / items.length : 0;
18270
- return /* @__PURE__ */ jsxs53(
18373
+ return /* @__PURE__ */ jsxs52(
18271
18374
  MonitorShell,
18272
18375
  {
18273
18376
  accent: theme.accent,
18274
18377
  icon: glyphs.plan,
18275
18378
  title: "PLAN",
18276
18379
  kicker: size.columns >= 90 ? truncatePanelText(title ?? "execution map", 30) : void 0,
18277
- right: /* @__PURE__ */ jsxs53(Text, { color: scope === "project" ? theme.warn : theme.accent, bold: true, children: [
18380
+ right: /* @__PURE__ */ jsxs52(Text, { color: scope === "project" ? theme.warn : theme.accent, bold: true, children: [
18278
18381
  scope.toUpperCase(),
18279
18382
  " ",
18280
18383
  items.length,
18281
18384
  " items"
18282
18385
  ] }),
18283
- footer: /* @__PURE__ */ jsxs53(Box, { gap: 2, children: [
18284
- /* @__PURE__ */ jsx54(KeyCap, { keyName: "\u2191\u2193", label: "inspect", color: theme.accent }),
18285
- /* @__PURE__ */ jsx54(
18386
+ footer: /* @__PURE__ */ jsxs52(Box, { gap: 2, children: [
18387
+ /* @__PURE__ */ jsx53(KeyCap, { keyName: "\u2191\u2193", label: "inspect", color: theme.accent }),
18388
+ /* @__PURE__ */ jsx53(
18286
18389
  KeyCap,
18287
18390
  {
18288
18391
  keyName: "S",
@@ -18290,38 +18393,38 @@ function PlanPanel({
18290
18393
  color: theme.accent
18291
18394
  }
18292
18395
  ),
18293
- /* @__PURE__ */ jsx54(KeyCap, { keyName: "F5", label: "close", color: theme.accent })
18396
+ /* @__PURE__ */ jsx53(KeyCap, { keyName: "F5", label: "close", color: theme.accent })
18294
18397
  ] }),
18295
18398
  children: [
18296
- /* @__PURE__ */ jsxs53(Box, { marginTop: 1, gap: 1, children: [
18297
- /* @__PURE__ */ jsx54(Text, { color: theme.textMuted, children: "PROGRESS" }),
18298
- /* @__PURE__ */ jsxs53(Text, { color: completeRatio === 1 && items.length > 0 ? theme.success : theme.accent, children: [
18399
+ /* @__PURE__ */ jsxs52(Box, { marginTop: 1, gap: 1, children: [
18400
+ /* @__PURE__ */ jsx53(Text, { color: theme.textMuted, children: "PROGRESS" }),
18401
+ /* @__PURE__ */ jsxs52(Text, { color: completeRatio === 1 && items.length > 0 ? theme.success : theme.accent, children: [
18299
18402
  "[",
18300
18403
  renderProgress(completeRatio, size.columns >= 90 ? 18 : 10),
18301
18404
  "]"
18302
18405
  ] }),
18303
- /* @__PURE__ */ jsxs53(Text, { color: theme.textSecondary, children: [
18406
+ /* @__PURE__ */ jsxs52(Text, { color: theme.textSecondary, children: [
18304
18407
  done.length,
18305
18408
  "/",
18306
18409
  items.length
18307
18410
  ] }),
18308
- /* @__PURE__ */ jsxs53(Text, { color: theme.warn, children: [
18411
+ /* @__PURE__ */ jsxs52(Text, { color: theme.warn, children: [
18309
18412
  " \u25D0 ",
18310
18413
  inProgress.length
18311
18414
  ] }),
18312
- /* @__PURE__ */ jsxs53(Text, { color: theme.textMuted, children: [
18415
+ /* @__PURE__ */ jsxs52(Text, { color: theme.textMuted, children: [
18313
18416
  " \u25CB ",
18314
18417
  open.length
18315
18418
  ] }),
18316
- updatedAt && size.columns >= 105 ? /* @__PURE__ */ jsxs53(Text, { color: theme.textMuted, children: [
18419
+ updatedAt && size.columns >= 105 ? /* @__PURE__ */ jsxs52(Text, { color: theme.textMuted, children: [
18317
18420
  " updated ",
18318
18421
  new Date(updatedAt).toLocaleTimeString()
18319
18422
  ] }) : null
18320
18423
  ] }),
18321
- loading ? /* @__PURE__ */ jsx54(Text, { color: theme.textMuted, children: "Loading plan\u2026" }) : error ? /* @__PURE__ */ jsxs53(Text, { color: theme.error, children: [
18424
+ loading ? /* @__PURE__ */ jsx53(Text, { color: theme.textMuted, children: "Loading plan\u2026" }) : error ? /* @__PURE__ */ jsxs52(Text, { color: theme.error, children: [
18322
18425
  "Could not read plan: ",
18323
18426
  error
18324
- ] }) : items.length === 0 ? /* @__PURE__ */ jsx54(
18427
+ ] }) : items.length === 0 ? /* @__PURE__ */ jsx53(
18325
18428
  EmptyPanelState,
18326
18429
  {
18327
18430
  icon: "\u25C7",
@@ -18329,17 +18432,17 @@ function PlanPanel({
18329
18432
  detail: "Use /plan add <title> to create the first step.",
18330
18433
  accent: theme.accent
18331
18434
  }
18332
- ) : /* @__PURE__ */ jsxs53(Box, { flexDirection: "column", marginTop: 1, children: [
18333
- selectedItem?.details ? /* @__PURE__ */ jsxs53(Text, { color: theme.textMuted, children: [
18435
+ ) : /* @__PURE__ */ jsxs52(Box, { flexDirection: "column", marginTop: 1, children: [
18436
+ selectedItem?.details ? /* @__PURE__ */ jsxs52(Text, { color: theme.textMuted, children: [
18334
18437
  "DETAIL ",
18335
18438
  truncatePanelText(selectedItem.details, size.contentWidth - 8)
18336
18439
  ] }) : null,
18337
- window.above > 0 ? /* @__PURE__ */ jsxs53(Text, { color: theme.textMuted, children: [
18440
+ window.above > 0 ? /* @__PURE__ */ jsxs52(Text, { color: theme.textMuted, children: [
18338
18441
  " \u2191 ",
18339
18442
  window.above,
18340
18443
  " earlier items"
18341
18444
  ] }) : null,
18342
- visible.map((item, index) => /* @__PURE__ */ jsx54(
18445
+ visible.map((item, index) => /* @__PURE__ */ jsx53(
18343
18446
  PlanRow,
18344
18447
  {
18345
18448
  item,
@@ -18348,7 +18451,7 @@ function PlanPanel({
18348
18451
  },
18349
18452
  item.id
18350
18453
  )),
18351
- window.below > 0 ? /* @__PURE__ */ jsxs53(Text, { color: theme.textMuted, children: [
18454
+ window.below > 0 ? /* @__PURE__ */ jsxs52(Text, { color: theme.textMuted, children: [
18352
18455
  " \u2193 ",
18353
18456
  window.below,
18354
18457
  " more items"
@@ -18365,16 +18468,16 @@ function PlanRow({
18365
18468
  }) {
18366
18469
  const icon = STATUS_ICON[item.status] ?? "?";
18367
18470
  const color = STATUS_COLOR[item.status] ?? "white";
18368
- return /* @__PURE__ */ jsxs53(Box, { flexDirection: "row", children: [
18369
- /* @__PURE__ */ jsxs53(Text, { color: selected ? theme.accent : theme.textMuted, children: [
18471
+ return /* @__PURE__ */ jsxs52(Box, { flexDirection: "row", children: [
18472
+ /* @__PURE__ */ jsxs52(Text, { color: selected ? theme.accent : theme.textMuted, children: [
18370
18473
  selected ? "\u203A" : " ",
18371
18474
  " "
18372
18475
  ] }),
18373
- /* @__PURE__ */ jsxs53(Text, { color, bold: selected, children: [
18476
+ /* @__PURE__ */ jsxs52(Text, { color, bold: selected, children: [
18374
18477
  icon,
18375
18478
  " "
18376
18479
  ] }),
18377
- /* @__PURE__ */ jsx54(
18480
+ /* @__PURE__ */ jsx53(
18378
18481
  Text,
18379
18482
  {
18380
18483
  color: selected ? theme.textPrimary : item.status === "done" ? theme.textMuted : theme.textSecondary,
@@ -18382,13 +18485,13 @@ function PlanRow({
18382
18485
  children: truncatePanelText(item.title, Math.max(12, width - 20))
18383
18486
  }
18384
18487
  ),
18385
- /* @__PURE__ */ jsx54(Box, { flexGrow: 1 }),
18386
- /* @__PURE__ */ jsx54(Text, { color, children: item.status.replace("_", " ") })
18488
+ /* @__PURE__ */ jsx53(Box, { flexGrow: 1 }),
18489
+ /* @__PURE__ */ jsx53(Text, { color, children: item.status.replace("_", " ") })
18387
18490
  ] });
18388
18491
  }
18389
18492
 
18390
18493
  // src/components/plugin-picker.tsx
18391
- import { Fragment as Fragment22, jsx as jsx55, jsxs as jsxs54 } from "react/jsx-runtime";
18494
+ import { Fragment as Fragment22, jsx as jsx54, jsxs as jsxs53 } from "react/jsx-runtime";
18392
18495
  var CHROME_ROWS5 = 17;
18393
18496
  var MAX_PICKER_ITEMS = 15;
18394
18497
  function PluginPicker({
@@ -18406,15 +18509,15 @@ function PluginPicker({
18406
18509
  const above = windowStart;
18407
18510
  const below = total - windowEnd;
18408
18511
  const hasLockedRows = items.some((item) => item.lockable === false);
18409
- return /* @__PURE__ */ jsxs54(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
18410
- /* @__PURE__ */ jsx55(Text, { bold: true, color: "cyan", children: "Plugin menu" }),
18411
- /* @__PURE__ */ jsxs54(Text, { dimColor: true, children: [
18512
+ return /* @__PURE__ */ jsxs53(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
18513
+ /* @__PURE__ */ jsx54(Text, { bold: true, color: "cyan", children: "Plugin menu" }),
18514
+ /* @__PURE__ */ jsxs53(Text, { dimColor: true, children: [
18412
18515
  "\u2191/\u2193 select \xB7 Enter/\u2190/\u2192 toggle",
18413
18516
  hasLockedRows ? " \xB7 \u{1F512} = locked" : "",
18414
18517
  " \xB7 Esc close"
18415
18518
  ] }),
18416
- /* @__PURE__ */ jsx55(Box, { marginTop: 1, flexDirection: "column", children: items.length === 0 ? /* @__PURE__ */ jsx55(Text, { dimColor: true, children: busy ? "Loading plugins\u2026" : "No plugins available." }) : /* @__PURE__ */ jsxs54(Fragment22, { children: [
18417
- above > 0 ? /* @__PURE__ */ jsx55(Text, { dimColor: true, children: ` \u2191 ${above} more` }) : null,
18519
+ /* @__PURE__ */ jsx54(Box, { marginTop: 1, flexDirection: "column", children: items.length === 0 ? /* @__PURE__ */ jsx54(Text, { dimColor: true, children: busy ? "Loading plugins\u2026" : "No plugins available." }) : /* @__PURE__ */ jsxs53(Fragment22, { children: [
18520
+ above > 0 ? /* @__PURE__ */ jsx54(Text, { dimColor: true, children: ` \u2191 ${above} more` }) : null,
18418
18521
  items.slice(windowStart, windowEnd).map((item, i) => {
18419
18522
  const index = windowStart + i;
18420
18523
  const focused = index === selected;
@@ -18423,16 +18526,16 @@ function PluginPicker({
18423
18526
  const state = item.enabled ? "\u25CF on " : "\u25CB off";
18424
18527
  const color = item.enabled ? "green" : "gray";
18425
18528
  const lock = isLocked ? "\u{1F512}" : " ";
18426
- return /* @__PURE__ */ jsxs54(Text, { color: focused ? "cyan" : void 0, wrap: "truncate-end", children: [
18529
+ return /* @__PURE__ */ jsxs53(Text, { color: focused ? "cyan" : void 0, wrap: "truncate-end", children: [
18427
18530
  marker,
18428
18531
  " ",
18429
- /* @__PURE__ */ jsx55(Text, { color, children: state }),
18532
+ /* @__PURE__ */ jsx54(Text, { color, children: state }),
18430
18533
  " ",
18431
18534
  item.name.padEnd(18),
18432
18535
  " ",
18433
- /* @__PURE__ */ jsx55(Text, { color: isLocked ? "yellow" : void 0, children: lock }),
18536
+ /* @__PURE__ */ jsx54(Text, { color: isLocked ? "yellow" : void 0, children: lock }),
18434
18537
  " ",
18435
- /* @__PURE__ */ jsxs54(Text, { dimColor: true, children: [
18538
+ /* @__PURE__ */ jsxs53(Text, { dimColor: true, children: [
18436
18539
  "risk=",
18437
18540
  item.risk.padEnd(6)
18438
18541
  ] }),
@@ -18440,16 +18543,16 @@ function PluginPicker({
18440
18543
  item.summary
18441
18544
  ] }, item.name);
18442
18545
  }),
18443
- below > 0 ? /* @__PURE__ */ jsx55(Text, { dimColor: true, children: ` \u2193 ${below} more` }) : null
18546
+ below > 0 ? /* @__PURE__ */ jsx54(Text, { dimColor: true, children: ` \u2193 ${below} more` }) : null
18444
18547
  ] }) }),
18445
- hint ? /* @__PURE__ */ jsx55(Box, { marginTop: 1, children: /* @__PURE__ */ jsx55(Text, { dimColor: true, children: hint }) }) : null
18548
+ hint ? /* @__PURE__ */ jsx54(Box, { marginTop: 1, children: /* @__PURE__ */ jsx54(Text, { dimColor: true, children: hint }) }) : null
18446
18549
  ] });
18447
18550
  }
18448
18551
 
18449
18552
  // src/components/process-list.tsx
18450
18553
  import { useEffect as useEffect20, useState as useState20 } from "react";
18451
18554
  import { getProcessRegistry } from "@wrongstack/tools";
18452
- import { jsx as jsx56, jsxs as jsxs55 } from "react/jsx-runtime";
18555
+ import { jsx as jsx55, jsxs as jsxs54 } from "react/jsx-runtime";
18453
18556
  function ProcessListMonitor() {
18454
18557
  const size = useMonitorSize();
18455
18558
  const [, setTick] = useState20(0);
@@ -18523,39 +18626,39 @@ function ProcessListMonitor() {
18523
18626
  getProcessRegistry().forceBreakerReset();
18524
18627
  }
18525
18628
  });
18526
- return /* @__PURE__ */ jsxs55(
18629
+ return /* @__PURE__ */ jsxs54(
18527
18630
  MonitorShell,
18528
18631
  {
18529
18632
  accent: theme.error,
18530
18633
  icon: glyphs.process,
18531
18634
  title: "PROCESSES",
18532
18635
  kicker: size.columns >= 90 ? "background execution" : void 0,
18533
- right: /* @__PURE__ */ jsxs55(Text, { children: [
18534
- /* @__PURE__ */ jsxs55(Text, { color: running > 0 ? theme.warn : theme.success, bold: true, children: [
18636
+ right: /* @__PURE__ */ jsxs54(Text, { children: [
18637
+ /* @__PURE__ */ jsxs54(Text, { color: running > 0 ? theme.warn : theme.success, bold: true, children: [
18535
18638
  "\u25CF ",
18536
18639
  running
18537
18640
  ] }),
18538
- /* @__PURE__ */ jsxs55(Text, { color: theme.textMuted, children: [
18641
+ /* @__PURE__ */ jsxs54(Text, { color: theme.textMuted, children: [
18539
18642
  " / ",
18540
18643
  all.length,
18541
18644
  " tracked"
18542
18645
  ] })
18543
18646
  ] }),
18544
- footer: /* @__PURE__ */ jsxs55(Box, { gap: 2, children: [
18545
- /* @__PURE__ */ jsx56(Text, { color: theme.warn, bold: true, children: "\u23F8 INPUT PAUSED" }),
18546
- /* @__PURE__ */ jsx56(KeyCap, { keyName: "\u2191\u2193", label: "select", color: theme.error }),
18547
- /* @__PURE__ */ jsx56(KeyCap, { keyName: "Enter", label: "stop", color: theme.warn }),
18548
- /* @__PURE__ */ jsx56(KeyCap, { keyName: "Del", label: "force", color: theme.error }),
18549
- /* @__PURE__ */ jsx56(KeyCap, { keyName: "F8/Esc", label: "close", color: theme.error })
18647
+ footer: /* @__PURE__ */ jsxs54(Box, { gap: 2, children: [
18648
+ /* @__PURE__ */ jsx55(Text, { color: theme.warn, bold: true, children: "\u23F8 INPUT PAUSED" }),
18649
+ /* @__PURE__ */ jsx55(KeyCap, { keyName: "\u2191\u2193", label: "select", color: theme.error }),
18650
+ /* @__PURE__ */ jsx55(KeyCap, { keyName: "Enter", label: "stop", color: theme.warn }),
18651
+ /* @__PURE__ */ jsx55(KeyCap, { keyName: "Del", label: "force", color: theme.error }),
18652
+ /* @__PURE__ */ jsx55(KeyCap, { keyName: "F8/Esc", label: "close", color: theme.error })
18550
18653
  ] }),
18551
18654
  children: [
18552
- /* @__PURE__ */ jsxs55(Box, { marginTop: 1, children: [
18553
- /* @__PURE__ */ jsx56(Text, { color: theme.textMuted, children: "CIRCUIT BREAKER " }),
18554
- /* @__PURE__ */ jsxs55(Text, { color: breakerColor, bold: true, children: [
18655
+ /* @__PURE__ */ jsxs54(Box, { marginTop: 1, children: [
18656
+ /* @__PURE__ */ jsx55(Text, { color: theme.textMuted, children: "CIRCUIT BREAKER " }),
18657
+ /* @__PURE__ */ jsxs54(Text, { color: breakerColor, bold: true, children: [
18555
18658
  "\u25CF ",
18556
18659
  b.state.toUpperCase()
18557
18660
  ] }),
18558
- b.state !== "closed" ? /* @__PURE__ */ jsxs55(Text, { color: theme.textMuted, children: [
18661
+ b.state !== "closed" ? /* @__PURE__ */ jsxs54(Text, { color: theme.textMuted, children: [
18559
18662
  " ",
18560
18663
  "failures ",
18561
18664
  b.consecutiveFailures,
@@ -18563,21 +18666,21 @@ function ProcessListMonitor() {
18563
18666
  b.slowCallsInWindow,
18564
18667
  "/3"
18565
18668
  ] }) : null,
18566
- /* @__PURE__ */ jsx56(Box, { flexGrow: 1 }),
18567
- /* @__PURE__ */ jsx56(KeyCap, { keyName: "R", label: "reset", color: breakerColor })
18669
+ /* @__PURE__ */ jsx55(Box, { flexGrow: 1 }),
18670
+ /* @__PURE__ */ jsx55(KeyCap, { keyName: "R", label: "reset", color: breakerColor })
18568
18671
  ] }),
18569
- pendingAction ? /* @__PURE__ */ jsxs55(Box, { borderStyle: "single", borderColor: theme.warn, paddingX: 1, marginTop: 1, children: [
18570
- /* @__PURE__ */ jsxs55(Text, { color: theme.warn, bold: true, children: [
18672
+ pendingAction ? /* @__PURE__ */ jsxs54(Box, { borderStyle: "single", borderColor: theme.warn, paddingX: 1, marginTop: 1, children: [
18673
+ /* @__PURE__ */ jsxs54(Text, { color: theme.warn, bold: true, children: [
18571
18674
  "\u26A0 ",
18572
18675
  pendingAction.label,
18573
18676
  "?"
18574
18677
  ] }),
18575
- /* @__PURE__ */ jsx56(Box, { flexGrow: 1 }),
18576
- /* @__PURE__ */ jsx56(KeyCap, { keyName: "Y/Enter", label: "confirm", color: theme.error }),
18577
- /* @__PURE__ */ jsx56(Text, { children: " " }),
18578
- /* @__PURE__ */ jsx56(KeyCap, { keyName: "N", label: "cancel", color: theme.success })
18678
+ /* @__PURE__ */ jsx55(Box, { flexGrow: 1 }),
18679
+ /* @__PURE__ */ jsx55(KeyCap, { keyName: "Y/Enter", label: "confirm", color: theme.error }),
18680
+ /* @__PURE__ */ jsx55(Text, { children: " " }),
18681
+ /* @__PURE__ */ jsx55(KeyCap, { keyName: "N", label: "cancel", color: theme.success })
18579
18682
  ] }) : null,
18580
- all.length === 0 ? /* @__PURE__ */ jsx56(
18683
+ all.length === 0 ? /* @__PURE__ */ jsx55(
18581
18684
  EmptyPanelState,
18582
18685
  {
18583
18686
  icon: "\u25C7",
@@ -18586,7 +18689,7 @@ function ProcessListMonitor() {
18586
18689
  accent: theme.error
18587
18690
  }
18588
18691
  ) : null,
18589
- window.above > 0 ? /* @__PURE__ */ jsxs55(Text, { color: theme.textMuted, children: [
18692
+ window.above > 0 ? /* @__PURE__ */ jsxs54(Text, { color: theme.textMuted, children: [
18590
18693
  " \u2191 ",
18591
18694
  window.above,
18592
18695
  " earlier processes"
@@ -18595,22 +18698,22 @@ function ProcessListMonitor() {
18595
18698
  const age = ((now - p.startedAt) / 1e3).toFixed(1);
18596
18699
  const isSelected = window.start + i === safeIndex;
18597
18700
  const cmd = truncatePanelText(p.command, Math.max(12, size.contentWidth - 31));
18598
- return /* @__PURE__ */ jsxs55(Box, { flexDirection: "row", children: [
18599
- /* @__PURE__ */ jsx56(Text, { color: isSelected ? theme.error : theme.textMuted, children: isSelected ? "\u203A " : " " }),
18600
- /* @__PURE__ */ jsx56(Text, { color: theme.textMuted, children: String(p.pid).padEnd(7) }),
18601
- /* @__PURE__ */ jsx56(Text, { color: theme.textMuted, children: truncatePanelText(p.name, 8).padEnd(9) }),
18602
- /* @__PURE__ */ jsx56(Text, { color: theme.textMuted, children: `${age}s`.padEnd(8) }),
18603
- /* @__PURE__ */ jsx56(Text, { color: isSelected ? theme.textPrimary : theme.textSecondary, bold: isSelected, children: cmd }),
18604
- /* @__PURE__ */ jsx56(Box, { flexGrow: 1 }),
18605
- p.killed ? /* @__PURE__ */ jsx56(Text, { color: theme.error, children: "STOPPED" }) : /* @__PURE__ */ jsx56(Text, { color: theme.success, children: "RUNNING" })
18701
+ return /* @__PURE__ */ jsxs54(Box, { flexDirection: "row", children: [
18702
+ /* @__PURE__ */ jsx55(Text, { color: isSelected ? theme.error : theme.textMuted, children: isSelected ? "\u203A " : " " }),
18703
+ /* @__PURE__ */ jsx55(Text, { color: theme.textMuted, children: String(p.pid).padEnd(7) }),
18704
+ /* @__PURE__ */ jsx55(Text, { color: theme.textMuted, children: truncatePanelText(p.name, 8).padEnd(9) }),
18705
+ /* @__PURE__ */ jsx55(Text, { color: theme.textMuted, children: `${age}s`.padEnd(8) }),
18706
+ /* @__PURE__ */ jsx55(Text, { color: isSelected ? theme.textPrimary : theme.textSecondary, bold: isSelected, children: cmd }),
18707
+ /* @__PURE__ */ jsx55(Box, { flexGrow: 1 }),
18708
+ p.killed ? /* @__PURE__ */ jsx55(Text, { color: theme.error, children: "STOPPED" }) : /* @__PURE__ */ jsx55(Text, { color: theme.success, children: "RUNNING" })
18606
18709
  ] }, p.pid);
18607
18710
  }),
18608
- window.below > 0 ? /* @__PURE__ */ jsxs55(Text, { color: theme.textMuted, children: [
18711
+ window.below > 0 ? /* @__PURE__ */ jsxs54(Text, { color: theme.textMuted, children: [
18609
18712
  " \u2193 ",
18610
18713
  window.below,
18611
18714
  " more processes"
18612
18715
  ] }) : null,
18613
- all.length > 0 && !pendingAction ? /* @__PURE__ */ jsxs55(Text, { color: theme.textMuted, children: [
18716
+ all.length > 0 && !pendingAction ? /* @__PURE__ */ jsxs54(Text, { color: theme.textMuted, children: [
18614
18717
  " ",
18615
18718
  "A stop all \xB7 Shift+A force all \xB7 PgUp/PgDn page \xB7 Home/End jump"
18616
18719
  ] }) : null
@@ -18620,7 +18723,7 @@ function ProcessListMonitor() {
18620
18723
  }
18621
18724
 
18622
18725
  // src/components/project-picker.tsx
18623
- import { jsx as jsx57, jsxs as jsxs56 } from "react/jsx-runtime";
18726
+ import { jsx as jsx56, jsxs as jsxs55 } from "react/jsx-runtime";
18624
18727
  function actionIcon(key) {
18625
18728
  if (key === "new-session") return glyphs.sessions;
18626
18729
  if (key === "prev-sessions") return glyphs.clock;
@@ -18640,71 +18743,71 @@ function ProjectPicker({
18640
18743
  const window = panelWindow(items.length, selected, limit);
18641
18744
  const visible = items.slice(window.start, window.end);
18642
18745
  const labelWidth = Math.max(12, size.contentWidth - 16);
18643
- return /* @__PURE__ */ jsxs56(
18746
+ return /* @__PURE__ */ jsxs55(
18644
18747
  MonitorShell,
18645
18748
  {
18646
18749
  accent: theme.accent,
18647
18750
  icon: glyphs.folder,
18648
18751
  title: "PROJECTS",
18649
18752
  kicker: size.columns >= 58 ? "workspace switcher" : void 0,
18650
- right: /* @__PURE__ */ jsxs56(Text, { color: theme.textMuted, children: [
18753
+ right: /* @__PURE__ */ jsxs55(Text, { color: theme.textMuted, children: [
18651
18754
  projectCount,
18652
18755
  " project",
18653
18756
  projectCount === 1 ? "" : "s"
18654
18757
  ] }),
18655
- footer: /* @__PURE__ */ jsxs56(Box, { gap: 2, children: [
18656
- /* @__PURE__ */ jsx57(KeyCap, { keyName: "\u2191\u2193", label: "navigate" }),
18657
- /* @__PURE__ */ jsx57(KeyCap, { keyName: "Enter", label: "open", color: theme.success }),
18658
- size.columns >= 64 ? /* @__PURE__ */ jsx57(KeyCap, { keyName: "Esc", label: "close", color: theme.error }) : null
18758
+ footer: /* @__PURE__ */ jsxs55(Box, { gap: 2, children: [
18759
+ /* @__PURE__ */ jsx56(KeyCap, { keyName: "\u2191\u2193", label: "navigate" }),
18760
+ /* @__PURE__ */ jsx56(KeyCap, { keyName: "Enter", label: "open", color: theme.success }),
18761
+ size.columns >= 64 ? /* @__PURE__ */ jsx56(KeyCap, { keyName: "Esc", label: "close", color: theme.error }) : null
18659
18762
  ] }),
18660
18763
  children: [
18661
- /* @__PURE__ */ jsxs56(Box, { height: 1, marginTop: 1, children: [
18662
- /* @__PURE__ */ jsxs56(Text, { color: filter ? theme.warn : theme.textMuted, children: [
18764
+ /* @__PURE__ */ jsxs55(Box, { height: 1, marginTop: 1, children: [
18765
+ /* @__PURE__ */ jsxs55(Text, { color: filter ? theme.warn : theme.textMuted, children: [
18663
18766
  glyphs.prompt,
18664
18767
  " "
18665
18768
  ] }),
18666
- /* @__PURE__ */ jsx57(Text, { color: filter ? theme.textPrimary : theme.textMuted, children: filter || "Type to filter projects and actions" }),
18667
- filter ? /* @__PURE__ */ jsx57(Text, { color: theme.accent, children: "\u2588" }) : null,
18668
- /* @__PURE__ */ jsx57(Box, { flexGrow: 1 }),
18669
- /* @__PURE__ */ jsxs56(Text, { color: theme.textMuted, children: [
18769
+ /* @__PURE__ */ jsx56(Text, { color: filter ? theme.textPrimary : theme.textMuted, children: filter || "Type to filter projects and actions" }),
18770
+ filter ? /* @__PURE__ */ jsx56(Text, { color: theme.accent, children: "\u2588" }) : null,
18771
+ /* @__PURE__ */ jsx56(Box, { flexGrow: 1 }),
18772
+ /* @__PURE__ */ jsxs55(Text, { color: theme.textMuted, children: [
18670
18773
  selectableCount,
18671
18774
  " choices"
18672
18775
  ] })
18673
18776
  ] }),
18674
- window.above > 0 ? /* @__PURE__ */ jsxs56(Text, { color: theme.textMuted, children: [
18777
+ window.above > 0 ? /* @__PURE__ */ jsxs55(Text, { color: theme.textMuted, children: [
18675
18778
  " \u2191 ",
18676
18779
  window.above,
18677
18780
  " hidden"
18678
18781
  ] }) : null,
18679
- visible.length === 0 ? /* @__PURE__ */ jsx57(
18782
+ visible.length === 0 ? /* @__PURE__ */ jsx56(
18680
18783
  EmptyPanelState,
18681
18784
  {
18682
18785
  icon: glyphs.folder,
18683
18786
  title: "No matching projects",
18684
18787
  detail: "Clear the filter or add a project with /project add."
18685
18788
  }
18686
- ) : /* @__PURE__ */ jsx57(Box, { flexDirection: "column", marginTop: 1, children: visible.map((item, offset) => {
18789
+ ) : /* @__PURE__ */ jsx56(Box, { flexDirection: "column", marginTop: 1, children: visible.map((item, offset) => {
18687
18790
  const index = window.start + offset;
18688
18791
  const isSelected = index === selected;
18689
18792
  if (item.key === "__divider__") {
18690
- return /* @__PURE__ */ jsx57(Box, { height: 1, children: /* @__PURE__ */ jsx57(Text, { color: theme.textMuted, children: "\u2500".repeat(Math.min(32, size.contentWidth)) }) }, `${item.key}-${index}`);
18793
+ return /* @__PURE__ */ jsx56(Box, { height: 1, children: /* @__PURE__ */ jsx56(Text, { color: theme.textMuted, children: "\u2500".repeat(Math.min(32, size.contentWidth)) }) }, `${item.key}-${index}`);
18691
18794
  }
18692
18795
  const icon = item.kind === "project" ? glyphs.folder : actionIcon(item.key);
18693
18796
  const accent = item.kind === "project" ? theme.accent : theme.warn;
18694
- return /* @__PURE__ */ jsxs56(
18797
+ return /* @__PURE__ */ jsxs55(
18695
18798
  Box,
18696
18799
  {
18697
18800
  flexDirection: "column",
18698
18801
  ...isSelected && theme.supportsBackground ? { backgroundColor: theme.surfaceRaised } : {},
18699
18802
  children: [
18700
- /* @__PURE__ */ jsxs56(Box, { height: 1, children: [
18701
- /* @__PURE__ */ jsx57(Text, { color: isSelected ? accent : theme.textMuted, children: isSelected ? "\u258E" : " " }),
18702
- /* @__PURE__ */ jsxs56(Text, { color: accent, children: [
18803
+ /* @__PURE__ */ jsxs55(Box, { height: 1, children: [
18804
+ /* @__PURE__ */ jsx56(Text, { color: isSelected ? accent : theme.textMuted, children: isSelected ? "\u258E" : " " }),
18805
+ /* @__PURE__ */ jsxs55(Text, { color: accent, children: [
18703
18806
  " ",
18704
18807
  icon,
18705
18808
  " "
18706
18809
  ] }),
18707
- /* @__PURE__ */ jsx57(
18810
+ /* @__PURE__ */ jsx56(
18708
18811
  Text,
18709
18812
  {
18710
18813
  color: isSelected ? theme.textPrimary : theme.textSecondary,
@@ -18712,24 +18815,24 @@ function ProjectPicker({
18712
18815
  children: truncatePanelText(item.label, labelWidth)
18713
18816
  }
18714
18817
  ),
18715
- /* @__PURE__ */ jsx57(Box, { flexGrow: 1 }),
18716
- item.meta ? /* @__PURE__ */ jsx57(Text, { color: isSelected ? accent : theme.textMuted, children: truncatePanelText(item.meta, 18) }) : null
18818
+ /* @__PURE__ */ jsx56(Box, { flexGrow: 1 }),
18819
+ item.meta ? /* @__PURE__ */ jsx56(Text, { color: isSelected ? accent : theme.textMuted, children: truncatePanelText(item.meta, 18) }) : null
18717
18820
  ] }),
18718
- item.subtitle ? /* @__PURE__ */ jsxs56(Box, { height: 1, children: [
18719
- /* @__PURE__ */ jsx57(Text, { color: isSelected ? accent : theme.textMuted, children: " \u2514\u2500 " }),
18720
- /* @__PURE__ */ jsx57(Text, { color: theme.textMuted, children: truncatePanelText(item.subtitle, labelWidth) })
18821
+ item.subtitle ? /* @__PURE__ */ jsxs55(Box, { height: 1, children: [
18822
+ /* @__PURE__ */ jsx56(Text, { color: isSelected ? accent : theme.textMuted, children: " \u2514\u2500 " }),
18823
+ /* @__PURE__ */ jsx56(Text, { color: theme.textMuted, children: truncatePanelText(item.subtitle, labelWidth) })
18721
18824
  ] }) : null
18722
18825
  ]
18723
18826
  },
18724
18827
  item.key
18725
18828
  );
18726
18829
  }) }),
18727
- window.below > 0 ? /* @__PURE__ */ jsxs56(Text, { color: theme.textMuted, children: [
18830
+ window.below > 0 ? /* @__PURE__ */ jsxs55(Text, { color: theme.textMuted, children: [
18728
18831
  " \u2193 ",
18729
18832
  window.below,
18730
18833
  " hidden"
18731
18834
  ] }) : null,
18732
- hint ? /* @__PURE__ */ jsxs56(Text, { color: theme.warn, children: [
18835
+ hint ? /* @__PURE__ */ jsxs55(Text, { color: theme.warn, children: [
18733
18836
  glyphs.warning,
18734
18837
  " ",
18735
18838
  hint
@@ -18741,7 +18844,7 @@ function ProjectPicker({
18741
18844
 
18742
18845
  // src/components/queue-panel.tsx
18743
18846
  import { useCallback as useCallback2, useEffect as useEffect21, useState as useState21 } from "react";
18744
- import { jsx as jsx58, jsxs as jsxs57 } from "react/jsx-runtime";
18847
+ import { jsx as jsx57, jsxs as jsxs56 } from "react/jsx-runtime";
18745
18848
  function QueuePanel({
18746
18849
  items,
18747
18850
  onDelete,
@@ -18790,28 +18893,28 @@ function QueuePanel({
18790
18893
  [items.length, selected, confirmClear, onDelete, onClear, onEdit, onToggleRefine]
18791
18894
  );
18792
18895
  useInput(handler);
18793
- return /* @__PURE__ */ jsx58(
18896
+ return /* @__PURE__ */ jsx57(
18794
18897
  MonitorShell,
18795
18898
  {
18796
18899
  accent: theme.accent,
18797
18900
  icon: glyphs.queue,
18798
18901
  title: "MESSAGE QUEUE",
18799
18902
  kicker: size.columns >= 88 ? "next turns" : void 0,
18800
- right: /* @__PURE__ */ jsxs57(Text, { color: items.length > 0 ? theme.accent : theme.textMuted, bold: true, children: [
18903
+ right: /* @__PURE__ */ jsxs56(Text, { color: items.length > 0 ? theme.accent : theme.textMuted, bold: true, children: [
18801
18904
  items.length,
18802
18905
  " waiting"
18803
18906
  ] }),
18804
- footer: /* @__PURE__ */ jsxs57(Box, { gap: 2, children: [
18805
- /* @__PURE__ */ jsx58(KeyCap, { keyName: "\u2191\u2193", label: "sel", color: theme.accent }),
18806
- /* @__PURE__ */ jsx58(KeyCap, { keyName: "d", label: "del", color: theme.textMuted }),
18807
- /* @__PURE__ */ jsx58(KeyCap, { keyName: "e", label: "edit", color: theme.textMuted }),
18808
- /* @__PURE__ */ jsx58(KeyCap, { keyName: "r", label: "refine", color: theme.textMuted }),
18809
- items.length > 0 ? /* @__PURE__ */ jsx58(KeyCap, { keyName: "c", label: confirmClear ? "confirm" : "clear", color: confirmClear ? theme.warn : theme.textMuted }) : null,
18810
- confirmClear ? /* @__PURE__ */ jsx58(Text, { color: theme.warn, children: " Clear all? (c=yes, x=cancel)" }) : null,
18811
- /* @__PURE__ */ jsx58(Box, { flexGrow: 1 }),
18812
- /* @__PURE__ */ jsx58(KeyCap, { keyName: "F7", label: "close", color: theme.accent })
18907
+ footer: /* @__PURE__ */ jsxs56(Box, { gap: 2, children: [
18908
+ /* @__PURE__ */ jsx57(KeyCap, { keyName: "\u2191\u2193", label: "sel", color: theme.accent }),
18909
+ /* @__PURE__ */ jsx57(KeyCap, { keyName: "d", label: "del", color: theme.textMuted }),
18910
+ /* @__PURE__ */ jsx57(KeyCap, { keyName: "e", label: "edit", color: theme.textMuted }),
18911
+ /* @__PURE__ */ jsx57(KeyCap, { keyName: "r", label: "refine", color: theme.textMuted }),
18912
+ items.length > 0 ? /* @__PURE__ */ jsx57(KeyCap, { keyName: "c", label: confirmClear ? "confirm" : "clear", color: confirmClear ? theme.warn : theme.textMuted }) : null,
18913
+ confirmClear ? /* @__PURE__ */ jsx57(Text, { color: theme.warn, children: " Clear all? (c=yes, x=cancel)" }) : null,
18914
+ /* @__PURE__ */ jsx57(Box, { flexGrow: 1 }),
18915
+ /* @__PURE__ */ jsx57(KeyCap, { keyName: "F7", label: "close", color: theme.accent })
18813
18916
  ] }),
18814
- children: items.length === 0 ? /* @__PURE__ */ jsx58(
18917
+ children: items.length === 0 ? /* @__PURE__ */ jsx57(
18815
18918
  EmptyPanelState,
18816
18919
  {
18817
18920
  icon: "\u25C7",
@@ -18819,33 +18922,33 @@ function QueuePanel({
18819
18922
  detail: "Messages added while the agent is busy will wait here.",
18820
18923
  accent: theme.accent
18821
18924
  }
18822
- ) : /* @__PURE__ */ jsxs57(Box, { flexDirection: "column", marginTop: 1, children: [
18925
+ ) : /* @__PURE__ */ jsxs56(Box, { flexDirection: "column", marginTop: 1, children: [
18823
18926
  visible.map((item, i) => {
18824
18927
  const idx = window.start + i;
18825
18928
  const isSelected = idx === selected;
18826
- return /* @__PURE__ */ jsxs57(Box, { flexDirection: "row", flexShrink: 0, paddingX: 1, children: [
18827
- /* @__PURE__ */ jsxs57(Text, { color: isSelected ? theme.accent : theme.textMuted, bold: true, children: [
18929
+ return /* @__PURE__ */ jsxs56(Box, { flexDirection: "row", flexShrink: 0, paddingX: 1, children: [
18930
+ /* @__PURE__ */ jsxs56(Text, { color: isSelected ? theme.accent : theme.textMuted, bold: true, children: [
18828
18931
  isSelected ? "\u203A" : " ",
18829
18932
  " ",
18830
18933
  String(idx + 1).padStart(2)
18831
18934
  ] }),
18832
- /* @__PURE__ */ jsxs57(Text, { color: theme.textMuted, children: [
18935
+ /* @__PURE__ */ jsxs56(Text, { color: theme.textMuted, children: [
18833
18936
  " ",
18834
18937
  idx === 0 ? "NEXT" : "WAIT"
18835
18938
  ] }),
18836
- /* @__PURE__ */ jsxs57(Text, { color: isSelected ? theme.textPrimary : theme.textSecondary, children: [
18939
+ /* @__PURE__ */ jsxs56(Text, { color: isSelected ? theme.textPrimary : theme.textSecondary, children: [
18837
18940
  " ",
18838
18941
  truncatePanelText(item.displayText, Math.max(12, size.contentWidth - 18))
18839
18942
  ] }),
18840
- item.shouldRefine ? /* @__PURE__ */ jsx58(Text, { color: theme.brandPrimary, children: " \u2726" }) : /* @__PURE__ */ jsx58(Text, { color: theme.textMuted, children: " \xB7" }),
18841
- /* @__PURE__ */ jsx58(Box, { flexGrow: 1 }),
18842
- item.blocks.length > 1 ? /* @__PURE__ */ jsxs57(Text, { color: theme.textMuted, children: [
18943
+ item.shouldRefine ? /* @__PURE__ */ jsx57(Text, { color: theme.brandPrimary, children: " \u2726" }) : /* @__PURE__ */ jsx57(Text, { color: theme.textMuted, children: " \xB7" }),
18944
+ /* @__PURE__ */ jsx57(Box, { flexGrow: 1 }),
18945
+ item.blocks.length > 1 ? /* @__PURE__ */ jsxs56(Text, { color: theme.textMuted, children: [
18843
18946
  item.blocks.length,
18844
18947
  "B"
18845
18948
  ] }) : null
18846
18949
  ] }, item.id);
18847
18950
  }),
18848
- overflow > 0 ? /* @__PURE__ */ jsxs57(Text, { color: theme.textMuted, children: [
18951
+ overflow > 0 ? /* @__PURE__ */ jsxs56(Text, { color: theme.textMuted, children: [
18849
18952
  " ",
18850
18953
  window.above > 0 ? `\u2191 ${window.above} earlier` : "",
18851
18954
  window.above > 0 && window.below > 0 ? " \xB7 " : "",
@@ -18858,7 +18961,7 @@ function QueuePanel({
18858
18961
 
18859
18962
  // src/components/refine-failure-panel.tsx
18860
18963
  import { useState as useState22 } from "react";
18861
- import { jsx as jsx59, jsxs as jsxs58 } from "react/jsx-runtime";
18964
+ import { jsx as jsx58, jsxs as jsxs57 } from "react/jsx-runtime";
18862
18965
  var PICK_WINDOW = 8;
18863
18966
  function useColumns() {
18864
18967
  const { stdout } = useStdout();
@@ -18923,7 +19026,7 @@ function RefineFailurePanel({
18923
19026
  );
18924
19027
  const windowStart = Math.max(0, start);
18925
19028
  const visible = models.slice(windowStart, windowStart + PICK_WINDOW);
18926
- return /* @__PURE__ */ jsxs58(
19029
+ return /* @__PURE__ */ jsxs57(
18927
19030
  Box,
18928
19031
  {
18929
19032
  alignSelf: "stretch",
@@ -18933,36 +19036,36 @@ function RefineFailurePanel({
18933
19036
  borderColor: theme.accent,
18934
19037
  paddingX: 1,
18935
19038
  children: [
18936
- /* @__PURE__ */ jsxs58(Box, { height: 1, children: [
18937
- /* @__PURE__ */ jsxs58(Text, { color: theme.accent, bold: true, children: [
19039
+ /* @__PURE__ */ jsxs57(Box, { height: 1, children: [
19040
+ /* @__PURE__ */ jsxs57(Text, { color: theme.accent, bold: true, children: [
18938
19041
  glyphs.brain,
18939
19042
  " RETRY REFINEMENT ON"
18940
19043
  ] }),
18941
- /* @__PURE__ */ jsx59(Box, { flexGrow: 1 }),
18942
- /* @__PURE__ */ jsxs58(Text, { color: theme.textMuted, children: [
19044
+ /* @__PURE__ */ jsx58(Box, { flexGrow: 1 }),
19045
+ /* @__PURE__ */ jsxs57(Text, { color: theme.textMuted, children: [
18943
19046
  models.length,
18944
19047
  " model",
18945
19048
  models.length === 1 ? "" : "s"
18946
19049
  ] })
18947
19050
  ] }),
18948
- /* @__PURE__ */ jsx59(Box, { flexDirection: "column", marginTop: 1, children: visible.map((m, i) => {
19051
+ /* @__PURE__ */ jsx58(Box, { flexDirection: "column", marginTop: 1, children: visible.map((m, i) => {
18949
19052
  const idx = windowStart + i;
18950
19053
  const selected = idx === cursor;
18951
19054
  const label = m.label && m.label !== m.model ? ` ${m.label}` : "";
18952
- return /* @__PURE__ */ jsxs58(Box, { height: 1, children: [
18953
- /* @__PURE__ */ jsx59(Text, { color: selected ? theme.accent : theme.textMuted, children: selected ? "\u25B8 " : " " }),
18954
- /* @__PURE__ */ jsx59(Text, { color: selected ? theme.textPrimary : theme.textSecondary, children: `${m.providerId}/${m.model}` }),
18955
- /* @__PURE__ */ jsx59(Text, { color: theme.textMuted, children: label })
19055
+ return /* @__PURE__ */ jsxs57(Box, { height: 1, children: [
19056
+ /* @__PURE__ */ jsx58(Text, { color: selected ? theme.accent : theme.textMuted, children: selected ? "\u25B8 " : " " }),
19057
+ /* @__PURE__ */ jsx58(Text, { color: selected ? theme.textPrimary : theme.textSecondary, children: `${m.providerId}/${m.model}` }),
19058
+ /* @__PURE__ */ jsx58(Text, { color: theme.textMuted, children: label })
18956
19059
  ] }, `${m.providerId}/${m.model}`);
18957
19060
  }) }),
18958
- /* @__PURE__ */ jsx59(Box, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx59(Text, { color: theme.textMuted, children: "\u2191/\u2193 choose \xB7 Enter refine on it \xB7 Esc back" }) })
19061
+ /* @__PURE__ */ jsx58(Box, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx58(Text, { color: theme.textMuted, children: "\u2191/\u2193 choose \xB7 Enter refine on it \xB7 Esc back" }) })
18959
19062
  ]
18960
19063
  }
18961
19064
  );
18962
19065
  }
18963
19066
  const preview = original.replace(/\s+/g, " ").trim();
18964
19067
  const previewShown = preview.length > width - 6 ? `${preview.slice(0, width - 7)}\u2026` : preview;
18965
- return /* @__PURE__ */ jsxs58(
19068
+ return /* @__PURE__ */ jsxs57(
18966
19069
  Box,
18967
19070
  {
18968
19071
  alignSelf: "stretch",
@@ -18972,77 +19075,77 @@ function RefineFailurePanel({
18972
19075
  borderColor: theme.error,
18973
19076
  paddingX: 1,
18974
19077
  children: [
18975
- /* @__PURE__ */ jsxs58(Box, { height: 1, children: [
18976
- /* @__PURE__ */ jsxs58(Text, { color: theme.error, bold: true, children: [
19078
+ /* @__PURE__ */ jsxs57(Box, { height: 1, children: [
19079
+ /* @__PURE__ */ jsxs57(Text, { color: theme.error, bold: true, children: [
18977
19080
  glyphs.warning,
18978
19081
  " REFINEMENT FAILED"
18979
19082
  ] }),
18980
- /* @__PURE__ */ jsx59(Box, { flexGrow: 1 }),
18981
- /* @__PURE__ */ jsxs58(Text, { color: theme.textMuted, children: [
19083
+ /* @__PURE__ */ jsx58(Box, { flexGrow: 1 }),
19084
+ /* @__PURE__ */ jsxs57(Text, { color: theme.textMuted, children: [
18982
19085
  "after ",
18983
19086
  formatRefinementDuration(elapsedMs)
18984
19087
  ] })
18985
19088
  ] }),
18986
- error ? /* @__PURE__ */ jsx59(Box, { height: 1, children: /* @__PURE__ */ jsx59(Text, { color: theme.textMuted, children: error.length > width ? `${error.slice(0, width - 1)}\u2026` : error }) }) : null,
18987
- /* @__PURE__ */ jsxs58(Box, { flexDirection: "column", marginTop: 1, children: [
18988
- /* @__PURE__ */ jsx59(Text, { color: theme.textMuted, children: "YOUR MESSAGE" }),
18989
- /* @__PURE__ */ jsxs58(Box, { height: 1, children: [
18990
- /* @__PURE__ */ jsx59(Text, { color: theme.brand, children: "\u258E" }),
18991
- /* @__PURE__ */ jsxs58(Text, { color: theme.textSecondary, children: [
19089
+ error ? /* @__PURE__ */ jsx58(Box, { height: 1, children: /* @__PURE__ */ jsx58(Text, { color: theme.textMuted, children: error.length > width ? `${error.slice(0, width - 1)}\u2026` : error }) }) : null,
19090
+ /* @__PURE__ */ jsxs57(Box, { flexDirection: "column", marginTop: 1, children: [
19091
+ /* @__PURE__ */ jsx58(Text, { color: theme.textMuted, children: "YOUR MESSAGE" }),
19092
+ /* @__PURE__ */ jsxs57(Box, { height: 1, children: [
19093
+ /* @__PURE__ */ jsx58(Text, { color: theme.brand, children: "\u258E" }),
19094
+ /* @__PURE__ */ jsxs57(Text, { color: theme.textSecondary, children: [
18992
19095
  " ",
18993
19096
  previewShown
18994
19097
  ] })
18995
19098
  ] })
18996
19099
  ] }),
18997
- /* @__PURE__ */ jsxs58(Box, { flexDirection: "column", marginTop: 1, children: [
18998
- /* @__PURE__ */ jsxs58(Box, { height: 1, gap: 2, children: [
18999
- /* @__PURE__ */ jsxs58(Text, { children: [
19000
- /* @__PURE__ */ jsxs58(Text, { color: theme.accent, bold: true, children: [
19100
+ /* @__PURE__ */ jsxs57(Box, { flexDirection: "column", marginTop: 1, children: [
19101
+ /* @__PURE__ */ jsxs57(Box, { height: 1, gap: 2, children: [
19102
+ /* @__PURE__ */ jsxs57(Text, { children: [
19103
+ /* @__PURE__ */ jsxs57(Text, { color: theme.accent, bold: true, children: [
19001
19104
  " ",
19002
19105
  "Enter",
19003
19106
  " "
19004
19107
  ] }),
19005
- /* @__PURE__ */ jsx59(Text, { color: theme.textMuted, children: " retry (more time)" })
19108
+ /* @__PURE__ */ jsx58(Text, { color: theme.textMuted, children: " retry (more time)" })
19006
19109
  ] }),
19007
- canFallback ? /* @__PURE__ */ jsxs58(Text, { children: [
19008
- /* @__PURE__ */ jsxs58(Text, { color: theme.success, bold: true, children: [
19110
+ canFallback ? /* @__PURE__ */ jsxs57(Text, { children: [
19111
+ /* @__PURE__ */ jsxs57(Text, { color: theme.success, bold: true, children: [
19009
19112
  " ",
19010
19113
  "M",
19011
19114
  " "
19012
19115
  ] }),
19013
- /* @__PURE__ */ jsxs58(Text, { color: theme.textMuted, children: [
19116
+ /* @__PURE__ */ jsxs57(Text, { color: theme.textMuted, children: [
19014
19117
  " ",
19015
19118
  fallbackRef
19016
19119
  ] })
19017
19120
  ] }) : null
19018
19121
  ] }),
19019
- /* @__PURE__ */ jsxs58(Box, { height: 1, gap: 2, children: [
19020
- canPick ? /* @__PURE__ */ jsxs58(Text, { children: [
19021
- /* @__PURE__ */ jsxs58(Text, { color: theme.warn, bold: true, children: [
19122
+ /* @__PURE__ */ jsxs57(Box, { height: 1, gap: 2, children: [
19123
+ canPick ? /* @__PURE__ */ jsxs57(Text, { children: [
19124
+ /* @__PURE__ */ jsxs57(Text, { color: theme.warn, bold: true, children: [
19022
19125
  " ",
19023
19126
  "P",
19024
19127
  " "
19025
19128
  ] }),
19026
- /* @__PURE__ */ jsx59(Text, { color: theme.textMuted, children: " another model\u2026" })
19129
+ /* @__PURE__ */ jsx58(Text, { color: theme.textMuted, children: " another model\u2026" })
19027
19130
  ] }) : null,
19028
- /* @__PURE__ */ jsxs58(Text, { children: [
19029
- /* @__PURE__ */ jsxs58(Text, { color: theme.textPrimary, bold: true, children: [
19131
+ /* @__PURE__ */ jsxs57(Text, { children: [
19132
+ /* @__PURE__ */ jsxs57(Text, { color: theme.textPrimary, bold: true, children: [
19030
19133
  " ",
19031
19134
  "S",
19032
19135
  " "
19033
19136
  ] }),
19034
- /* @__PURE__ */ jsx59(Text, { color: theme.textMuted, children: " send as-is" })
19137
+ /* @__PURE__ */ jsx58(Text, { color: theme.textMuted, children: " send as-is" })
19035
19138
  ] }),
19036
- /* @__PURE__ */ jsxs58(Text, { children: [
19037
- /* @__PURE__ */ jsxs58(Text, { color: theme.warn, bold: true, children: [
19139
+ /* @__PURE__ */ jsxs57(Text, { children: [
19140
+ /* @__PURE__ */ jsxs57(Text, { color: theme.warn, bold: true, children: [
19038
19141
  " ",
19039
19142
  "E",
19040
19143
  " "
19041
19144
  ] }),
19042
- /* @__PURE__ */ jsx59(Text, { color: theme.textMuted, children: " edit" })
19145
+ /* @__PURE__ */ jsx58(Text, { color: theme.textMuted, children: " edit" })
19043
19146
  ] })
19044
19147
  ] }),
19045
- /* @__PURE__ */ jsx59(Box, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx59(Text, { color: theme.textMuted, children: "Esc sends your message as-is" }) })
19148
+ /* @__PURE__ */ jsx58(Box, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx58(Text, { color: theme.textMuted, children: "Esc sends your message as-is" }) })
19046
19149
  ] })
19047
19150
  ]
19048
19151
  }
@@ -19050,7 +19153,7 @@ function RefineFailurePanel({
19050
19153
  }
19051
19154
 
19052
19155
  // src/components/resume-picker.tsx
19053
- import { jsx as jsx60, jsxs as jsxs59 } from "react/jsx-runtime";
19156
+ import { jsx as jsx59, jsxs as jsxs58 } from "react/jsx-runtime";
19054
19157
  function ResumePicker({
19055
19158
  sessions,
19056
19159
  selected,
@@ -19058,19 +19161,19 @@ function ResumePicker({
19058
19161
  error,
19059
19162
  hint
19060
19163
  }) {
19061
- return /* @__PURE__ */ jsxs59(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
19062
- /* @__PURE__ */ jsx60(Text, { color: "cyan", bold: true, children: "\u2501\u2501 Resume Session \u2501\u2501" }),
19063
- /* @__PURE__ */ jsx60(Text, { dimColor: true, children: busy ? "Resuming selected session\u2026" : "\u2191/\u2193 navigate \xB7 Enter select \xB7 Esc cancel" }),
19064
- error ? /* @__PURE__ */ jsx60(Text, { color: "red", children: error }) : null,
19065
- sessions.length === 0 && !busy ? /* @__PURE__ */ jsx60(Text, { dimColor: true, children: "No sessions found." }) : sessions.map((s2, i) => {
19164
+ return /* @__PURE__ */ jsxs58(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
19165
+ /* @__PURE__ */ jsx59(Text, { color: "cyan", bold: true, children: "\u2501\u2501 Resume Session \u2501\u2501" }),
19166
+ /* @__PURE__ */ jsx59(Text, { dimColor: true, children: busy ? "Resuming selected session\u2026" : "\u2191/\u2193 navigate \xB7 Enter select \xB7 Esc cancel" }),
19167
+ error ? /* @__PURE__ */ jsx59(Text, { color: "red", children: error }) : null,
19168
+ sessions.length === 0 && !busy ? /* @__PURE__ */ jsx59(Text, { dimColor: true, children: "No sessions found." }) : sessions.map((s2, i) => {
19066
19169
  const isCurrent = s2.isCurrent;
19067
19170
  const isSelected = i === selected;
19068
19171
  const date = s2.startedAt.slice(0, 16).replace("T", " ");
19069
19172
  const outcomeBadge = s2.outcome === "completed" ? "\u2713 " : s2.outcome === "aborted" ? "\u26A0 " : s2.outcome === "error" ? "\u2717 " : s2.outcome === "timeout" ? "\u23F1 " : " ";
19070
19173
  const toolStr = s2.toolCallCount > 0 ? `${s2.toolCallCount} tool${s2.toolCallCount === 1 ? "" : "s"}` : "";
19071
19174
  const iterStr = s2.iterationCount > 0 ? `${s2.iterationCount} iter${s2.iterationCount === 1 ? "" : "s"}` : "";
19072
- return /* @__PURE__ */ jsxs59(Box, { flexDirection: "column", children: [
19073
- /* @__PURE__ */ jsxs59(
19175
+ return /* @__PURE__ */ jsxs58(Box, { flexDirection: "column", children: [
19176
+ /* @__PURE__ */ jsxs58(
19074
19177
  Text,
19075
19178
  {
19076
19179
  inverse: isSelected,
@@ -19078,35 +19181,35 @@ function ResumePicker({
19078
19181
  ...isSelected ? { color: isCurrent ? "gray" : "cyan" } : {},
19079
19182
  children: [
19080
19183
  isSelected ? "\u203A " : " ",
19081
- /* @__PURE__ */ jsx60(Text, { bold: true, dimColor: isCurrent ?? false, children: s2.id }),
19082
- isCurrent ? /* @__PURE__ */ jsx60(Text, { dimColor: true, children: " (current)" }) : null,
19083
- /* @__PURE__ */ jsxs59(Text, { dimColor: true, children: [
19184
+ /* @__PURE__ */ jsx59(Text, { bold: true, dimColor: isCurrent ?? false, children: s2.id }),
19185
+ isCurrent ? /* @__PURE__ */ jsx59(Text, { dimColor: true, children: " (current)" }) : null,
19186
+ /* @__PURE__ */ jsxs58(Text, { dimColor: true, children: [
19084
19187
  " ",
19085
19188
  date
19086
19189
  ] })
19087
19190
  ]
19088
19191
  }
19089
19192
  ),
19090
- /* @__PURE__ */ jsxs59(Text, { dimColor: true, children: [
19193
+ /* @__PURE__ */ jsxs58(Text, { dimColor: true, children: [
19091
19194
  isSelected ? " " : " ",
19092
19195
  outcomeBadge,
19093
19196
  s2.tokenTotal.toLocaleString(),
19094
19197
  " tok",
19095
19198
  toolStr ? ` \xB7 ${toolStr}` : "",
19096
19199
  iterStr ? ` \xB7 ${iterStr}` : "",
19097
- s2.toolErrorCount > 0 ? /* @__PURE__ */ jsxs59(Text, { color: "yellow", children: [
19200
+ s2.toolErrorCount > 0 ? /* @__PURE__ */ jsxs58(Text, { color: "yellow", children: [
19098
19201
  " \xB7 ",
19099
19202
  s2.toolErrorCount,
19100
19203
  " err"
19101
19204
  ] }) : null
19102
19205
  ] }),
19103
- /* @__PURE__ */ jsxs59(Text, { dimColor: true, children: [
19206
+ /* @__PURE__ */ jsxs58(Text, { dimColor: true, children: [
19104
19207
  isSelected ? " " : " ",
19105
19208
  s2.title.length > 72 ? `${s2.title.slice(0, 71)}\u2026` : s2.title
19106
19209
  ] })
19107
19210
  ] }, s2.id);
19108
19211
  }),
19109
- hint ? /* @__PURE__ */ jsx60(Text, { color: "yellow", children: hint }) : null
19212
+ hint ? /* @__PURE__ */ jsx59(Text, { color: "yellow", children: hint }) : null
19110
19213
  ] });
19111
19214
  }
19112
19215
 
@@ -19291,7 +19394,7 @@ function computeWindow(totalHeight, viewportRows, scrollOffset, entryCount, cach
19291
19394
  }
19292
19395
 
19293
19396
  // src/components/scrollable-history.tsx
19294
- import { jsx as jsx61, jsxs as jsxs60 } from "react/jsx-runtime";
19397
+ import { jsx as jsx60, jsxs as jsxs59 } from "react/jsx-runtime";
19295
19398
  function scrollbarThumb(rows, offset, total) {
19296
19399
  const scrollable = total > rows;
19297
19400
  if (!scrollable) return { top: 0, size: rows, scrollable: false };
@@ -19318,7 +19421,7 @@ function Scrollbar({
19318
19421
  for (let i = 0; i < rows; i++) {
19319
19422
  cells.push(i >= thumbTop && i < thumbTop + thumbSize ? "\u2588" : "\u2502");
19320
19423
  }
19321
- return /* @__PURE__ */ jsx61(Box, { flexDirection: "column", marginLeft: 1, flexShrink: 0, children: cells.map((c, i) => /* @__PURE__ */ jsx61(
19424
+ return /* @__PURE__ */ jsx60(Box, { flexDirection: "column", marginLeft: 1, flexShrink: 0, children: cells.map((c, i) => /* @__PURE__ */ jsx60(
19322
19425
  Text,
19323
19426
  {
19324
19427
  ...scrollable ? { color: theme.accent } : {},
@@ -19390,8 +19493,8 @@ var ScrollableHistory = memo3(function ScrollableHistory2({
19390
19493
  const win = windowed ? computeWindow(cacheTotal, vp, scrollOffset, entries.length, heightCacheRef.current) : null;
19391
19494
  const shownEntries = win?.windowed ? entries.slice(win.startIdx, win.endIdx) : entries;
19392
19495
  const hiddenCount = win?.windowed ? Math.max(0, entries.length - (win.endIdx - win.startIdx)) : 0;
19393
- return /* @__PURE__ */ jsxs60(Box, { flexDirection: "row", children: [
19394
- /* @__PURE__ */ jsx61(
19496
+ return /* @__PURE__ */ jsxs59(Box, { flexDirection: "row", children: [
19497
+ /* @__PURE__ */ jsx60(
19395
19498
  Box,
19396
19499
  {
19397
19500
  flexDirection: "column",
@@ -19399,19 +19502,19 @@ var ScrollableHistory = memo3(function ScrollableHistory2({
19399
19502
  height: vp,
19400
19503
  overflowY: "hidden",
19401
19504
  justifyContent: "flex-end",
19402
- children: /* @__PURE__ */ jsxs60(
19505
+ children: /* @__PURE__ */ jsxs59(
19403
19506
  Box,
19404
19507
  {
19405
19508
  ref: contentRef,
19406
19509
  flexDirection: "column",
19407
19510
  flexShrink: 0,
19408
19511
  children: [
19409
- win?.windowed && win.spacerAbove > 0 ? /* @__PURE__ */ jsx61(Box, { height: win.spacerAbove, flexShrink: 0 }) : null,
19410
- hiddenCount > 0 ? /* @__PURE__ */ jsx61(Box, { flexShrink: 0, children: /* @__PURE__ */ jsx61(Text, { dimColor: true, italic: true, children: ` \u2191 ${hiddenCount} earlier ${hiddenCount === 1 ? "entry" : "entries"} (scroll up to view)` }) }) : null,
19411
- shownEntries.map((entry) => /* @__PURE__ */ jsx61(Box, { marginBottom: entry.kind === "turn-summary" ? 1 : 0, flexShrink: 0, children: /* @__PURE__ */ jsx61(Entry, { entry, termWidth, setSuggestions, autonomyMode, todos, showModelReasoning }) }, entry.id)),
19412
- win?.windowed && win.spacerBelow > 0 ? /* @__PURE__ */ jsx61(Box, { height: win.spacerBelow, flexShrink: 0 }) : null,
19413
- tail ? /* @__PURE__ */ jsx61(Box, { height: ASSISTANT_TAIL_HEIGHT, flexShrink: 0, children: /* @__PURE__ */ jsx61(AssistantTail, { text: tail, termWidth }) }) : null,
19414
- toolTail && toolStream ? /* @__PURE__ */ jsx61(
19512
+ win?.windowed && win.spacerAbove > 0 ? /* @__PURE__ */ jsx60(Box, { height: win.spacerAbove, flexShrink: 0 }) : null,
19513
+ hiddenCount > 0 ? /* @__PURE__ */ jsx60(Box, { flexShrink: 0, children: /* @__PURE__ */ jsx60(Text, { dimColor: true, italic: true, children: ` \u2191 ${hiddenCount} earlier ${hiddenCount === 1 ? "entry" : "entries"} (scroll up to view)` }) }) : null,
19514
+ shownEntries.map((entry) => /* @__PURE__ */ jsx60(Box, { marginBottom: entry.kind === "turn-summary" ? 1 : 0, flexShrink: 0, children: /* @__PURE__ */ jsx60(Entry, { entry, termWidth, setSuggestions, autonomyMode, todos, showModelReasoning }) }, entry.id)),
19515
+ win?.windowed && win.spacerBelow > 0 ? /* @__PURE__ */ jsx60(Box, { height: win.spacerBelow, flexShrink: 0 }) : null,
19516
+ tail ? /* @__PURE__ */ jsx60(Box, { height: ASSISTANT_TAIL_HEIGHT, flexShrink: 0, children: /* @__PURE__ */ jsx60(AssistantTail, { text: tail, termWidth }) }) : null,
19517
+ toolTail && toolStream ? /* @__PURE__ */ jsx60(
19415
19518
  ToolStreamBox,
19416
19519
  {
19417
19520
  name: toolStream.name,
@@ -19425,12 +19528,12 @@ var ScrollableHistory = memo3(function ScrollableHistory2({
19425
19528
  )
19426
19529
  }
19427
19530
  ),
19428
- /* @__PURE__ */ jsx61(Scrollbar, { rows: vp, offset: Math.max(0, scrollOffset), total: scrollbarTotal })
19531
+ /* @__PURE__ */ jsx60(Scrollbar, { rows: vp, offset: Math.max(0, scrollOffset), total: scrollbarTotal })
19429
19532
  ] });
19430
19533
  });
19431
19534
 
19432
19535
  // src/components/sdd-board-overlay.tsx
19433
- import { jsx as jsx62, jsxs as jsxs61 } from "react/jsx-runtime";
19536
+ import { jsx as jsx61, jsxs as jsxs60 } from "react/jsx-runtime";
19434
19537
  var STATUS4 = {
19435
19538
  pending: { icon: "\u25CB", color: "gray" },
19436
19539
  queued: { icon: "\u25D4", color: "cyan" },
@@ -19473,26 +19576,26 @@ function clip(s2, n) {
19473
19576
  }
19474
19577
  function TaskCard2({ task }) {
19475
19578
  const st2 = STATUS4[task.displayStatus] ?? { icon: "?", color: "white" };
19476
- return /* @__PURE__ */ jsxs61(Box, { flexDirection: "column", marginBottom: 1, width: 26, children: [
19477
- /* @__PURE__ */ jsxs61(Box, { flexDirection: "row", gap: 1, children: [
19478
- /* @__PURE__ */ jsx62(Text, { color: st2.color, bold: true, children: st2.icon }),
19479
- /* @__PURE__ */ jsx62(Text, { dimColor: true, children: task.shortId }),
19480
- /* @__PURE__ */ jsx62(Text, { color: PRIORITY[task.priority] ?? "gray", children: task.priority[0]?.toUpperCase() })
19579
+ return /* @__PURE__ */ jsxs60(Box, { flexDirection: "column", marginBottom: 1, width: 26, children: [
19580
+ /* @__PURE__ */ jsxs60(Box, { flexDirection: "row", gap: 1, children: [
19581
+ /* @__PURE__ */ jsx61(Text, { color: st2.color, bold: true, children: st2.icon }),
19582
+ /* @__PURE__ */ jsx61(Text, { dimColor: true, children: task.shortId }),
19583
+ /* @__PURE__ */ jsx61(Text, { color: PRIORITY[task.priority] ?? "gray", children: task.priority[0]?.toUpperCase() })
19481
19584
  ] }),
19482
- /* @__PURE__ */ jsx62(Text, { wrap: "truncate-end", children: clip(task.title, 24) }),
19483
- task.deps.length > 0 ? /* @__PURE__ */ jsxs61(Text, { dimColor: true, children: [
19585
+ /* @__PURE__ */ jsx61(Text, { wrap: "truncate-end", children: clip(task.title, 24) }),
19586
+ task.deps.length > 0 ? /* @__PURE__ */ jsxs60(Text, { dimColor: true, children: [
19484
19587
  "\u2190 ",
19485
19588
  clip(task.deps.join(", "), 22)
19486
19589
  ] }) : null,
19487
- task.agentName ? /* @__PURE__ */ jsxs61(Box, { flexDirection: "row", gap: 1, children: [
19488
- /* @__PURE__ */ jsx62(Text, { color: task.displayStatus === "in_progress" ? "yellow" : "gray", children: "\u25CF" }),
19489
- /* @__PURE__ */ jsx62(Text, { color: "cyan", children: clip(task.agentName, 14) }),
19490
- task.retries > 0 ? /* @__PURE__ */ jsxs61(Text, { color: "red", children: [
19590
+ task.agentName ? /* @__PURE__ */ jsxs60(Box, { flexDirection: "row", gap: 1, children: [
19591
+ /* @__PURE__ */ jsx61(Text, { color: task.displayStatus === "in_progress" ? "yellow" : "gray", children: "\u25CF" }),
19592
+ /* @__PURE__ */ jsx61(Text, { color: "cyan", children: clip(task.agentName, 14) }),
19593
+ task.retries > 0 ? /* @__PURE__ */ jsxs60(Text, { color: "red", children: [
19491
19594
  "\u21BB",
19492
19595
  task.retries
19493
19596
  ] }) : null
19494
19597
  ] }) : null,
19495
- task.worktreeBranch ? /* @__PURE__ */ jsxs61(Text, { dimColor: true, children: [
19598
+ task.worktreeBranch ? /* @__PURE__ */ jsxs60(Text, { dimColor: true, children: [
19496
19599
  "\u2325 ",
19497
19600
  clip(task.worktreeBranch, 22)
19498
19601
  ] }) : null
@@ -19508,68 +19611,68 @@ function SddBoardOverlay({
19508
19611
  const recentFeed = (snapshot.feed ?? []).slice(0, 6);
19509
19612
  const focused = typeof focusColumn === "number" && focusColumn >= 0 && focusColumn < snapshot.columns.length ? focusColumn : null;
19510
19613
  const columns = focused === null ? snapshot.columns : [snapshot.columns[focused]];
19511
- return /* @__PURE__ */ jsxs61(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
19512
- /* @__PURE__ */ jsxs61(Box, { flexDirection: "row", gap: 1, marginBottom: 1, children: [
19513
- /* @__PURE__ */ jsx62(Text, { bold: true, color: "cyan", children: "SDD BOARD" }),
19514
- /* @__PURE__ */ jsx62(Text, { dimColor: true, children: "\u2502" }),
19515
- /* @__PURE__ */ jsx62(Text, { bold: true, children: clip(snapshot.title, 32) }),
19516
- /* @__PURE__ */ jsx62(Text, { dimColor: true, children: "\u2502" }),
19517
- /* @__PURE__ */ jsx62(Text, { color: RUN_STATUS[snapshot.status] ?? "white", children: snapshot.status }),
19518
- /* @__PURE__ */ jsx62(Text, { dimColor: true, children: "\u2502" }),
19519
- /* @__PURE__ */ jsxs61(Text, { dimColor: true, children: [
19614
+ return /* @__PURE__ */ jsxs60(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
19615
+ /* @__PURE__ */ jsxs60(Box, { flexDirection: "row", gap: 1, marginBottom: 1, children: [
19616
+ /* @__PURE__ */ jsx61(Text, { bold: true, color: "cyan", children: "SDD BOARD" }),
19617
+ /* @__PURE__ */ jsx61(Text, { dimColor: true, children: "\u2502" }),
19618
+ /* @__PURE__ */ jsx61(Text, { bold: true, children: clip(snapshot.title, 32) }),
19619
+ /* @__PURE__ */ jsx61(Text, { dimColor: true, children: "\u2502" }),
19620
+ /* @__PURE__ */ jsx61(Text, { color: RUN_STATUS[snapshot.status] ?? "white", children: snapshot.status }),
19621
+ /* @__PURE__ */ jsx61(Text, { dimColor: true, children: "\u2502" }),
19622
+ /* @__PURE__ */ jsxs60(Text, { dimColor: true, children: [
19520
19623
  "wave ",
19521
19624
  snapshot.wave + 1
19522
19625
  ] }),
19523
- /* @__PURE__ */ jsx62(Text, { dimColor: true, children: "\u2502" }),
19524
- /* @__PURE__ */ jsxs61(Text, { color: "green", children: [
19626
+ /* @__PURE__ */ jsx61(Text, { dimColor: true, children: "\u2502" }),
19627
+ /* @__PURE__ */ jsxs60(Text, { color: "green", children: [
19525
19628
  "\u2713",
19526
19629
  p.completed
19527
19630
  ] }),
19528
- /* @__PURE__ */ jsx62(Text, { dimColor: true, children: "/" }),
19529
- /* @__PURE__ */ jsx62(Text, { children: p.total }),
19530
- /* @__PURE__ */ jsxs61(Text, { dimColor: true, children: [
19631
+ /* @__PURE__ */ jsx61(Text, { dimColor: true, children: "/" }),
19632
+ /* @__PURE__ */ jsx61(Text, { children: p.total }),
19633
+ /* @__PURE__ */ jsxs60(Text, { dimColor: true, children: [
19531
19634
  "(",
19532
19635
  p.percentComplete,
19533
19636
  "%)"
19534
19637
  ] }),
19535
- p.inProgress > 0 ? /* @__PURE__ */ jsxs61(Text, { color: "yellow", children: [
19638
+ p.inProgress > 0 ? /* @__PURE__ */ jsxs60(Text, { color: "yellow", children: [
19536
19639
  "\u25B6",
19537
19640
  p.inProgress
19538
19641
  ] }) : null,
19539
- p.failed > 0 ? /* @__PURE__ */ jsxs61(Text, { color: "red", children: [
19642
+ p.failed > 0 ? /* @__PURE__ */ jsxs60(Text, { color: "red", children: [
19540
19643
  "\u2717",
19541
19644
  p.failed
19542
19645
  ] }) : null,
19543
- /* @__PURE__ */ jsx62(Text, { dimColor: true, children: "\u2502 Ctrl+B close \xB7 c clean wt \xB7 z rollback \xB7 x destroy" }),
19544
- focused !== null ? /* @__PURE__ */ jsxs61(Text, { dimColor: true, children: [
19646
+ /* @__PURE__ */ jsx61(Text, { dimColor: true, children: "\u2502 Ctrl+B close \xB7 c clean wt \xB7 z rollback \xB7 x destroy" }),
19647
+ focused !== null ? /* @__PURE__ */ jsxs60(Text, { dimColor: true, children: [
19545
19648
  "\u2502 column ",
19546
19649
  focused + 1,
19547
19650
  "/",
19548
19651
  snapshot.columns.length
19549
19652
  ] }) : null
19550
19653
  ] }),
19551
- chains.length > 0 ? /* @__PURE__ */ jsxs61(Box, { flexDirection: "column", marginBottom: 1, children: [
19552
- /* @__PURE__ */ jsx62(Text, { color: "red", bold: true, children: "\u26A0 Deadlock \u2014 blocked by failed tasks:" }),
19553
- chains.map((c) => /* @__PURE__ */ jsxs61(Text, { color: "red", children: [
19654
+ chains.length > 0 ? /* @__PURE__ */ jsxs60(Box, { flexDirection: "column", marginBottom: 1, children: [
19655
+ /* @__PURE__ */ jsx61(Text, { color: "red", bold: true, children: "\u26A0 Deadlock \u2014 blocked by failed tasks:" }),
19656
+ chains.map((c) => /* @__PURE__ */ jsxs60(Text, { color: "red", children: [
19554
19657
  " ",
19555
19658
  c.blocked,
19556
19659
  " \u2190 ",
19557
19660
  c.blockedBy.join(", ")
19558
19661
  ] }, c.blocked))
19559
19662
  ] }) : null,
19560
- snapshot.tasks.length === 0 ? /* @__PURE__ */ jsx62(Text, { dimColor: true, children: "No active SDD run. Start one with /sdd execute." }) : /* @__PURE__ */ jsx62(Box, { flexDirection: "row", gap: 2, children: columns.map((col) => /* @__PURE__ */ jsxs61(Box, { flexDirection: "column", marginRight: 1, children: [
19561
- /* @__PURE__ */ jsx62(Text, { bold: true, color: "cyan", children: col.label }),
19562
- /* @__PURE__ */ jsx62(Text, { dimColor: true, children: "\u2500".repeat(12) }),
19563
- col.taskIds.map((sid) => byShort.get(sid)).filter((t) => Boolean(t)).map((t) => /* @__PURE__ */ jsx62(TaskCard2, { task: t }, t.id))
19663
+ snapshot.tasks.length === 0 ? /* @__PURE__ */ jsx61(Text, { dimColor: true, children: "No active SDD run. Start one with /sdd execute." }) : /* @__PURE__ */ jsx61(Box, { flexDirection: "row", gap: 2, children: columns.map((col) => /* @__PURE__ */ jsxs60(Box, { flexDirection: "column", marginRight: 1, children: [
19664
+ /* @__PURE__ */ jsx61(Text, { bold: true, color: "cyan", children: col.label }),
19665
+ /* @__PURE__ */ jsx61(Text, { dimColor: true, children: "\u2500".repeat(12) }),
19666
+ col.taskIds.map((sid) => byShort.get(sid)).filter((t) => Boolean(t)).map((t) => /* @__PURE__ */ jsx61(TaskCard2, { task: t }, t.id))
19564
19667
  ] }, col.label)) }),
19565
- recentFeed.length > 0 ? /* @__PURE__ */ jsxs61(Box, { flexDirection: "column", marginTop: 1, children: [
19566
- /* @__PURE__ */ jsx62(Text, { bold: true, color: "cyan", children: "Recent activity" }),
19567
- /* @__PURE__ */ jsx62(Text, { dimColor: true, children: "\u2500".repeat(12) }),
19668
+ recentFeed.length > 0 ? /* @__PURE__ */ jsxs60(Box, { flexDirection: "column", marginTop: 1, children: [
19669
+ /* @__PURE__ */ jsx61(Text, { bold: true, color: "cyan", children: "Recent activity" }),
19670
+ /* @__PURE__ */ jsx61(Text, { dimColor: true, children: "\u2500".repeat(12) }),
19568
19671
  recentFeed.map((f, i) => {
19569
19672
  const k = FEED_KIND[f.kind] ?? FEED_KIND.started;
19570
- return /* @__PURE__ */ jsxs61(Box, { flexDirection: "row", gap: 1, children: [
19571
- /* @__PURE__ */ jsx62(Text, { color: k?.color ?? "white", children: k?.icon ?? "\u2022" }),
19572
- /* @__PURE__ */ jsx62(Text, { dimColor: true, children: clip(f.text, 70) })
19673
+ return /* @__PURE__ */ jsxs60(Box, { flexDirection: "row", gap: 1, children: [
19674
+ /* @__PURE__ */ jsx61(Text, { color: k?.color ?? "white", children: k?.icon ?? "\u2022" }),
19675
+ /* @__PURE__ */ jsx61(Text, { dimColor: true, children: clip(f.text, 70) })
19573
19676
  ] }, `${f.ts}-${i}`);
19574
19677
  })
19575
19678
  ] }) : null
@@ -19577,7 +19680,7 @@ function SddBoardOverlay({
19577
19680
  }
19578
19681
 
19579
19682
  // src/components/sessions-panel.tsx
19580
- import { Fragment as Fragment23, jsx as jsx63, jsxs as jsxs62 } from "react/jsx-runtime";
19683
+ import { Fragment as Fragment23, jsx as jsx62, jsxs as jsxs61 } from "react/jsx-runtime";
19581
19684
  function statusIcon2(status) {
19582
19685
  switch (status) {
19583
19686
  case "active":
@@ -19643,36 +19746,36 @@ function SessionsPanel({
19643
19746
  const visible = sessions.slice(window.start, window.end);
19644
19747
  const active = sessions.filter((session) => session.status === "active").length;
19645
19748
  const agentTotal = sessions.reduce((sum, session) => sum + session.agentCount, 0);
19646
- return /* @__PURE__ */ jsxs62(
19749
+ return /* @__PURE__ */ jsxs61(
19647
19750
  MonitorShell,
19648
19751
  {
19649
19752
  accent: theme.accent,
19650
19753
  icon: glyphs.sessions,
19651
19754
  title: "SESSIONS",
19652
19755
  kicker: size.columns >= 92 ? "cross-surface presence" : void 0,
19653
- right: /* @__PURE__ */ jsxs62(Text, { children: [
19654
- /* @__PURE__ */ jsxs62(Text, { color: theme.success, children: [
19756
+ right: /* @__PURE__ */ jsxs61(Text, { children: [
19757
+ /* @__PURE__ */ jsxs61(Text, { color: theme.success, children: [
19655
19758
  "\u25CF ",
19656
19759
  active,
19657
19760
  " active"
19658
19761
  ] }),
19659
- /* @__PURE__ */ jsxs62(Text, { color: theme.textMuted, children: [
19762
+ /* @__PURE__ */ jsxs61(Text, { color: theme.textMuted, children: [
19660
19763
  " ",
19661
19764
  sessions.length,
19662
19765
  " sessions \xB7 ",
19663
19766
  agentTotal,
19664
19767
  " agents"
19665
19768
  ] }),
19666
- busy ? /* @__PURE__ */ jsx63(Text, { color: theme.warn, children: " \u21BB syncing" }) : null
19769
+ busy ? /* @__PURE__ */ jsx62(Text, { color: theme.warn, children: " \u21BB syncing" }) : null
19667
19770
  ] }),
19668
- footer: /* @__PURE__ */ jsxs62(Box, { gap: 2, children: [
19669
- /* @__PURE__ */ jsx63(KeyCap, { keyName: "\u2191\u2193", label: "select", color: theme.accent }),
19670
- /* @__PURE__ */ jsx63(KeyCap, { keyName: "Enter", label: "resume", color: theme.warn }),
19671
- /* @__PURE__ */ jsx63(KeyCap, { keyName: "F10", label: "close", color: theme.accent }),
19672
- /* @__PURE__ */ jsx63(Text, { color: theme.textMuted, children: "/sessions kill <id>" })
19771
+ footer: /* @__PURE__ */ jsxs61(Box, { gap: 2, children: [
19772
+ /* @__PURE__ */ jsx62(KeyCap, { keyName: "\u2191\u2193", label: "select", color: theme.accent }),
19773
+ /* @__PURE__ */ jsx62(KeyCap, { keyName: "Enter", label: "resume", color: theme.warn }),
19774
+ /* @__PURE__ */ jsx62(KeyCap, { keyName: "F10", label: "close", color: theme.accent }),
19775
+ /* @__PURE__ */ jsx62(Text, { color: theme.textMuted, children: "/sessions kill <id>" })
19673
19776
  ] }),
19674
19777
  children: [
19675
- resumeConfirm ? /* @__PURE__ */ jsxs62(
19778
+ resumeConfirm ? /* @__PURE__ */ jsxs61(
19676
19779
  Box,
19677
19780
  {
19678
19781
  marginTop: 1,
@@ -19681,16 +19784,16 @@ function SessionsPanel({
19681
19784
  paddingX: 1,
19682
19785
  flexDirection: "column",
19683
19786
  children: [
19684
- /* @__PURE__ */ jsxs62(Text, { color: theme.warn, bold: true, children: [
19787
+ /* @__PURE__ */ jsxs61(Text, { color: theme.warn, bold: true, children: [
19685
19788
  "\u26A0 Replace this conversation with \u201C",
19686
19789
  resumeConfirm.sessionName,
19687
19790
  "\u201D?"
19688
19791
  ] }),
19689
- /* @__PURE__ */ jsx63(Text, { color: theme.textMuted, children: "Enter confirms \xB7 Esc cancels \xB7 the current session remains stored." })
19792
+ /* @__PURE__ */ jsx62(Text, { color: theme.textMuted, children: "Enter confirms \xB7 Esc cancels \xB7 the current session remains stored." })
19690
19793
  ]
19691
19794
  }
19692
19795
  ) : null,
19693
- sessions.length === 0 ? busy ? /* @__PURE__ */ jsx63(Text, { color: theme.textMuted, children: "Loading sessions\u2026" }) : /* @__PURE__ */ jsx63(
19796
+ sessions.length === 0 ? busy ? /* @__PURE__ */ jsx62(Text, { color: theme.textMuted, children: "Loading sessions\u2026" }) : /* @__PURE__ */ jsx62(
19694
19797
  EmptyPanelState,
19695
19798
  {
19696
19799
  icon: "\u25C7",
@@ -19698,8 +19801,8 @@ function SessionsPanel({
19698
19801
  detail: "Open another WrongStack surface to see shared presence here.",
19699
19802
  accent: theme.accent
19700
19803
  }
19701
- ) : /* @__PURE__ */ jsxs62(Box, { flexDirection: "column", marginTop: 1, children: [
19702
- window.above > 0 ? /* @__PURE__ */ jsxs62(Text, { color: theme.textMuted, children: [
19804
+ ) : /* @__PURE__ */ jsxs61(Box, { flexDirection: "column", marginTop: 1, children: [
19805
+ window.above > 0 ? /* @__PURE__ */ jsxs61(Text, { color: theme.textMuted, children: [
19703
19806
  " \u2191 ",
19704
19807
  window.above,
19705
19808
  " earlier sessions"
@@ -19707,20 +19810,20 @@ function SessionsPanel({
19707
19810
  visible.map((s2, localIndex) => {
19708
19811
  const idx = window.start + localIndex;
19709
19812
  const isSelected = idx === safeSelected;
19710
- return /* @__PURE__ */ jsxs62(
19813
+ return /* @__PURE__ */ jsxs61(
19711
19814
  Box,
19712
19815
  {
19713
19816
  flexDirection: "column",
19714
19817
  marginTop: isSelected ? 1 : 0,
19715
19818
  paddingX: isSelected ? 1 : 0,
19716
19819
  children: [
19717
- /* @__PURE__ */ jsxs62(Box, { children: [
19718
- /* @__PURE__ */ jsx63(Text, { color: isSelected ? theme.accent : theme.textMuted, children: isSelected ? "\u203A " : " " }),
19719
- /* @__PURE__ */ jsxs62(Text, { color: statusColor(s2.status), bold: isSelected, children: [
19820
+ /* @__PURE__ */ jsxs61(Box, { children: [
19821
+ /* @__PURE__ */ jsx62(Text, { color: isSelected ? theme.accent : theme.textMuted, children: isSelected ? "\u203A " : " " }),
19822
+ /* @__PURE__ */ jsxs61(Text, { color: statusColor(s2.status), bold: isSelected, children: [
19720
19823
  s2.sessionId === currentSessionId ? "\u25CF" : statusIcon2(s2.status),
19721
19824
  " "
19722
19825
  ] }),
19723
- /* @__PURE__ */ jsx63(
19826
+ /* @__PURE__ */ jsx62(
19724
19827
  Text,
19725
19828
  {
19726
19829
  color: isSelected ? theme.textPrimary : theme.textSecondary,
@@ -19728,17 +19831,17 @@ function SessionsPanel({
19728
19831
  children: truncatePanelText(s2.projectName, size.columns >= 90 ? 24 : 16)
19729
19832
  }
19730
19833
  ),
19731
- /* @__PURE__ */ jsxs62(Text, { color: theme.textMuted, children: [
19834
+ /* @__PURE__ */ jsxs61(Text, { color: theme.textMuted, children: [
19732
19835
  " ",
19733
19836
  shortSessionId2(s2.sessionId)
19734
19837
  ] }),
19735
- s2.gitBranch ? /* @__PURE__ */ jsxs62(Text, { color: theme.brand, children: [
19838
+ s2.gitBranch ? /* @__PURE__ */ jsxs61(Text, { color: theme.brand, children: [
19736
19839
  " \u2387 ",
19737
19840
  truncatePanelText(s2.gitBranch, 20)
19738
19841
  ] }) : null,
19739
- /* @__PURE__ */ jsx63(Box, { flexGrow: 1 }),
19740
- /* @__PURE__ */ jsx63(Text, { color: statusColor(s2.status), children: s2.status }),
19741
- /* @__PURE__ */ jsxs62(Text, { color: theme.textMuted, children: [
19842
+ /* @__PURE__ */ jsx62(Box, { flexGrow: 1 }),
19843
+ /* @__PURE__ */ jsx62(Text, { color: statusColor(s2.status), children: s2.status }),
19844
+ /* @__PURE__ */ jsxs61(Text, { color: theme.textMuted, children: [
19742
19845
  " ",
19743
19846
  fmtDuration2(s2.startedAt),
19744
19847
  " \xB7 ",
@@ -19746,33 +19849,33 @@ function SessionsPanel({
19746
19849
  " agents"
19747
19850
  ] })
19748
19851
  ] }),
19749
- isSelected ? /* @__PURE__ */ jsxs62(Fragment23, { children: [
19750
- /* @__PURE__ */ jsxs62(Text, { color: theme.textMuted, children: [
19852
+ isSelected ? /* @__PURE__ */ jsxs61(Fragment23, { children: [
19853
+ /* @__PURE__ */ jsxs61(Text, { color: theme.textMuted, children: [
19751
19854
  " ",
19752
19855
  truncatePanelText(s2.workingDir, size.contentWidth - 4),
19753
19856
  " \xB7 PID ",
19754
19857
  s2.pid
19755
19858
  ] }),
19756
- /* @__PURE__ */ jsxs62(Box, { marginLeft: 2, flexDirection: "column", children: [
19757
- s2.agents.slice(0, agentLimit).map((a) => /* @__PURE__ */ jsxs62(Box, { children: [
19758
- /* @__PURE__ */ jsxs62(Text, { color: statusColor(a.status), children: [
19859
+ /* @__PURE__ */ jsxs61(Box, { marginLeft: 2, flexDirection: "column", children: [
19860
+ s2.agents.slice(0, agentLimit).map((a) => /* @__PURE__ */ jsxs61(Box, { children: [
19861
+ /* @__PURE__ */ jsxs61(Text, { color: statusColor(a.status), children: [
19759
19862
  agentIcon(a.status),
19760
19863
  " "
19761
19864
  ] }),
19762
- /* @__PURE__ */ jsx63(Text, { color: theme.textSecondary, children: truncatePanelText(a.name, 20) }),
19763
- a.currentTool ? /* @__PURE__ */ jsxs62(Text, { color: theme.accent, children: [
19865
+ /* @__PURE__ */ jsx62(Text, { color: theme.textSecondary, children: truncatePanelText(a.name, 20) }),
19866
+ a.currentTool ? /* @__PURE__ */ jsxs61(Text, { color: theme.accent, children: [
19764
19867
  " ",
19765
19868
  truncatePanelText(a.currentTool, 24)
19766
19869
  ] }) : null,
19767
- /* @__PURE__ */ jsx63(Box, { flexGrow: 1 }),
19768
- /* @__PURE__ */ jsxs62(Text, { color: theme.textMuted, children: [
19870
+ /* @__PURE__ */ jsx62(Box, { flexGrow: 1 }),
19871
+ /* @__PURE__ */ jsxs61(Text, { color: theme.textMuted, children: [
19769
19872
  a.iterations,
19770
19873
  " iter \xB7 ",
19771
19874
  a.toolCalls,
19772
19875
  " tools"
19773
19876
  ] })
19774
19877
  ] }, a.id)),
19775
- s2.agents.length > agentLimit ? /* @__PURE__ */ jsxs62(Text, { color: theme.textMuted, children: [
19878
+ s2.agents.length > agentLimit ? /* @__PURE__ */ jsxs61(Text, { color: theme.textMuted, children: [
19776
19879
  " ",
19777
19880
  "+",
19778
19881
  s2.agents.length - agentLimit,
@@ -19785,7 +19888,7 @@ function SessionsPanel({
19785
19888
  s2.sessionId
19786
19889
  );
19787
19890
  }),
19788
- window.below > 0 ? /* @__PURE__ */ jsxs62(Text, { color: theme.textMuted, children: [
19891
+ window.below > 0 ? /* @__PURE__ */ jsxs61(Text, { color: theme.textMuted, children: [
19789
19892
  " \u2193 ",
19790
19893
  window.below,
19791
19894
  " more sessions"
@@ -19797,7 +19900,7 @@ function SessionsPanel({
19797
19900
  }
19798
19901
 
19799
19902
  // src/components/slash-confirm-panel.tsx
19800
- import { jsx as jsx64, jsxs as jsxs63 } from "react/jsx-runtime";
19903
+ import { jsx as jsx63, jsxs as jsxs62 } from "react/jsx-runtime";
19801
19904
  function slashConfirmationDecision(input, key, defaultYes) {
19802
19905
  if (key.escape) return "cancel";
19803
19906
  if (key.return) return defaultYes;
@@ -19811,60 +19914,60 @@ function SlashConfirmPanel({
19811
19914
  question,
19812
19915
  defaultYes
19813
19916
  }) {
19814
- return /* @__PURE__ */ jsxs63(Box, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, marginY: 1, children: [
19815
- /* @__PURE__ */ jsx64(Text, { bold: true, color: "yellow", children: "? CONFIRM ACTION" }),
19816
- /* @__PURE__ */ jsx64(Box, { marginTop: 1, children: /* @__PURE__ */ jsx64(Text, { children: question }) }),
19817
- /* @__PURE__ */ jsx64(Box, { marginTop: 1, children: /* @__PURE__ */ jsxs63(Text, { children: [
19818
- /* @__PURE__ */ jsx64(Text, { bold: true, color: "green", children: "[y]" }),
19917
+ return /* @__PURE__ */ jsxs62(Box, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, marginY: 1, children: [
19918
+ /* @__PURE__ */ jsx63(Text, { bold: true, color: "yellow", children: "? CONFIRM ACTION" }),
19919
+ /* @__PURE__ */ jsx63(Box, { marginTop: 1, children: /* @__PURE__ */ jsx63(Text, { children: question }) }),
19920
+ /* @__PURE__ */ jsx63(Box, { marginTop: 1, children: /* @__PURE__ */ jsxs62(Text, { children: [
19921
+ /* @__PURE__ */ jsx63(Text, { bold: true, color: "green", children: "[y]" }),
19819
19922
  "es",
19820
19923
  " ",
19821
- /* @__PURE__ */ jsx64(Text, { bold: true, color: "red", children: "[n]" }),
19924
+ /* @__PURE__ */ jsx63(Text, { bold: true, color: "red", children: "[n]" }),
19822
19925
  "o",
19823
19926
  " ",
19824
- /* @__PURE__ */ jsx64(Text, { bold: true, children: "Enter" }),
19927
+ /* @__PURE__ */ jsx63(Text, { bold: true, children: "Enter" }),
19825
19928
  " = ",
19826
19929
  defaultYes ? "yes" : "no",
19827
19930
  " ",
19828
- /* @__PURE__ */ jsx64(Text, { bold: true, children: "Esc/q" }),
19931
+ /* @__PURE__ */ jsx63(Text, { bold: true, children: "Esc/q" }),
19829
19932
  " = cancel"
19830
19933
  ] }) })
19831
19934
  ] });
19832
19935
  }
19833
19936
 
19834
19937
  // src/components/shadow-panel.tsx
19835
- import { jsx as jsx65, jsxs as jsxs64 } from "react/jsx-runtime";
19938
+ import { jsx as jsx64, jsxs as jsxs63 } from "react/jsx-runtime";
19836
19939
  function ShadowPanel({
19837
19940
  shadow,
19838
19941
  hint
19839
19942
  }) {
19840
- return /* @__PURE__ */ jsxs64(Box, { flexDirection: "column", borderStyle: "round", borderColor: "blue", paddingX: 1, children: [
19841
- /* @__PURE__ */ jsx65(Text, { bold: true, color: "blue", children: "\u2501\u2501 Shadow Agent \u2501\u2501" }),
19842
- /* @__PURE__ */ jsx65(Text, { dimColor: true, children: "s start \xB7 t stop \xB7 i cycle interval \xB7 m cycle model \xB7 Esc close" }),
19843
- /* @__PURE__ */ jsxs64(Box, { marginTop: 1, flexDirection: "column", children: [
19844
- /* @__PURE__ */ jsxs64(Box, { children: [
19845
- /* @__PURE__ */ jsx65(Text, { bold: true, children: "Status: " }),
19846
- shadow.running ? /* @__PURE__ */ jsx65(Text, { color: "green", children: "\u25CF running" }) : /* @__PURE__ */ jsx65(Text, { color: "gray", children: "\u25CB stopped" }),
19847
- shadow.activeId ? /* @__PURE__ */ jsx65(Text, { dimColor: true, children: ` ${shadow.activeId.slice(0, 12)}\u2026` }) : null
19943
+ return /* @__PURE__ */ jsxs63(Box, { flexDirection: "column", borderStyle: "round", borderColor: "blue", paddingX: 1, children: [
19944
+ /* @__PURE__ */ jsx64(Text, { bold: true, color: "blue", children: "\u2501\u2501 Shadow Agent \u2501\u2501" }),
19945
+ /* @__PURE__ */ jsx64(Text, { dimColor: true, children: "s start \xB7 t stop \xB7 i cycle interval \xB7 m cycle model \xB7 Esc close" }),
19946
+ /* @__PURE__ */ jsxs63(Box, { marginTop: 1, flexDirection: "column", children: [
19947
+ /* @__PURE__ */ jsxs63(Box, { children: [
19948
+ /* @__PURE__ */ jsx64(Text, { bold: true, children: "Status: " }),
19949
+ shadow.running ? /* @__PURE__ */ jsx64(Text, { color: "green", children: "\u25CF running" }) : /* @__PURE__ */ jsx64(Text, { color: "gray", children: "\u25CB stopped" }),
19950
+ shadow.activeId ? /* @__PURE__ */ jsx64(Text, { dimColor: true, children: ` ${shadow.activeId.slice(0, 12)}\u2026` }) : null
19848
19951
  ] }),
19849
- /* @__PURE__ */ jsxs64(Box, { marginTop: 1, children: [
19850
- /* @__PURE__ */ jsx65(Text, { bold: true, children: "Model: " }),
19851
- /* @__PURE__ */ jsx65(Text, { color: "cyan", children: shadow.model })
19952
+ /* @__PURE__ */ jsxs63(Box, { marginTop: 1, children: [
19953
+ /* @__PURE__ */ jsx64(Text, { bold: true, children: "Model: " }),
19954
+ /* @__PURE__ */ jsx64(Text, { color: "cyan", children: shadow.model })
19852
19955
  ] }),
19853
- /* @__PURE__ */ jsxs64(Box, { marginTop: 1, children: [
19854
- /* @__PURE__ */ jsx65(Text, { bold: true, children: "Interval: " }),
19855
- /* @__PURE__ */ jsx65(Text, { color: "yellow", children: shadow.intervalMs >= 1e3 ? `${shadow.intervalMs / 1e3}s` : `${shadow.intervalMs}ms` }),
19856
- /* @__PURE__ */ jsx65(Text, { dimColor: true, children: " (min 5s)" })
19956
+ /* @__PURE__ */ jsxs63(Box, { marginTop: 1, children: [
19957
+ /* @__PURE__ */ jsx64(Text, { bold: true, children: "Interval: " }),
19958
+ /* @__PURE__ */ jsx64(Text, { color: "yellow", children: shadow.intervalMs >= 1e3 ? `${shadow.intervalMs / 1e3}s` : `${shadow.intervalMs}ms` }),
19959
+ /* @__PURE__ */ jsx64(Text, { dimColor: true, children: " (min 5s)" })
19857
19960
  ] }),
19858
- /* @__PURE__ */ jsx65(Box, { marginTop: 1, children: /* @__PURE__ */ jsx65(Text, { dimColor: true, children: shadow.running ? "Press t to stop the Shadow Agent" : "Press s to start the Shadow Agent" }) })
19961
+ /* @__PURE__ */ jsx64(Box, { marginTop: 1, children: /* @__PURE__ */ jsx64(Text, { dimColor: true, children: shadow.running ? "Press t to stop the Shadow Agent" : "Press s to start the Shadow Agent" }) })
19859
19962
  ] }),
19860
- hint ? /* @__PURE__ */ jsx65(Box, { marginTop: 1, children: /* @__PURE__ */ jsx65(Text, { dimColor: true, children: hint }) }) : null
19963
+ hint ? /* @__PURE__ */ jsx64(Box, { marginTop: 1, children: /* @__PURE__ */ jsx64(Text, { dimColor: true, children: hint }) }) : null
19861
19964
  ] });
19862
19965
  }
19863
19966
 
19864
19967
  // src/components/shell-command-warning.tsx
19865
19968
  import { writeOut as writeOut2 } from "@wrongstack/core";
19866
19969
  import React5 from "react";
19867
- import { jsx as jsx66, jsxs as jsxs65 } from "react/jsx-runtime";
19970
+ import { jsx as jsx65, jsxs as jsxs64 } from "react/jsx-runtime";
19868
19971
  function truncateShellCommandWarningCommand(text, max = 80) {
19869
19972
  return text.length <= max ? text : `${text.slice(0, max - 1)}\u2026`;
19870
19973
  }
@@ -19882,30 +19985,30 @@ function ShellCommandWarning({
19882
19985
  if (ch === "n") onDecision("no");
19883
19986
  if (ch === "d") onDecision("dont-show-again");
19884
19987
  });
19885
- return /* @__PURE__ */ jsxs65(Box, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, children: [
19886
- /* @__PURE__ */ jsxs65(Box, { flexDirection: "row", children: [
19887
- /* @__PURE__ */ jsx66(Text, { bold: true, color: "yellow", children: "\u26A0 SHELL COMMAND" }),
19888
- /* @__PURE__ */ jsx66(Text, { children: " " }),
19889
- /* @__PURE__ */ jsxs65(Text, { bold: true, color: "white", children: [
19988
+ return /* @__PURE__ */ jsxs64(Box, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, children: [
19989
+ /* @__PURE__ */ jsxs64(Box, { flexDirection: "row", children: [
19990
+ /* @__PURE__ */ jsx65(Text, { bold: true, color: "yellow", children: "\u26A0 SHELL COMMAND" }),
19991
+ /* @__PURE__ */ jsx65(Text, { children: " " }),
19992
+ /* @__PURE__ */ jsxs64(Text, { bold: true, color: "white", children: [
19890
19993
  "!",
19891
19994
  truncateShellCommandWarningCommand(command)
19892
19995
  ] })
19893
19996
  ] }),
19894
- /* @__PURE__ */ jsx66(Text, { dimColor: true, children: "This will execute in your shell via /dev. Only run commands you trust." }),
19895
- /* @__PURE__ */ jsx66(Text, { dimColor: true, children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" }),
19896
- /* @__PURE__ */ jsx66(Box, { flexDirection: "row", children: /* @__PURE__ */ jsxs65(Text, { children: [
19897
- /* @__PURE__ */ jsx66(Text, { bold: true, color: "green", children: "[y]" }),
19898
- /* @__PURE__ */ jsx66(Text, { dimColor: true, children: "es " }),
19899
- /* @__PURE__ */ jsx66(Text, { bold: true, color: "red", children: "[n]" }),
19900
- /* @__PURE__ */ jsx66(Text, { dimColor: true, children: "o " }),
19901
- /* @__PURE__ */ jsx66(Text, { bold: true, color: "cyan", children: "[d]" }),
19902
- /* @__PURE__ */ jsx66(Text, { dimColor: true, children: "ont show again" })
19997
+ /* @__PURE__ */ jsx65(Text, { dimColor: true, children: "This will execute in your shell via /dev. Only run commands you trust." }),
19998
+ /* @__PURE__ */ jsx65(Text, { dimColor: true, children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" }),
19999
+ /* @__PURE__ */ jsx65(Box, { flexDirection: "row", children: /* @__PURE__ */ jsxs64(Text, { children: [
20000
+ /* @__PURE__ */ jsx65(Text, { bold: true, color: "green", children: "[y]" }),
20001
+ /* @__PURE__ */ jsx65(Text, { dimColor: true, children: "es " }),
20002
+ /* @__PURE__ */ jsx65(Text, { bold: true, color: "red", children: "[n]" }),
20003
+ /* @__PURE__ */ jsx65(Text, { dimColor: true, children: "o " }),
20004
+ /* @__PURE__ */ jsx65(Text, { bold: true, color: "cyan", children: "[d]" }),
20005
+ /* @__PURE__ */ jsx65(Text, { dimColor: true, children: "ont show again" })
19903
20006
  ] }) })
19904
20007
  ] });
19905
20008
  }
19906
20009
 
19907
20010
  // src/components/slash-menu.tsx
19908
- import { jsx as jsx67, jsxs as jsxs66 } from "react/jsx-runtime";
20011
+ import { jsx as jsx66, jsxs as jsxs65 } from "react/jsx-runtime";
19909
20012
  var MAX_VISIBLE_ITEMS = 8;
19910
20013
  function SlashMenu({ query, matches, selected }) {
19911
20014
  const placeholder2 = query ? `/${query}` : "/";
@@ -19924,59 +20027,59 @@ function SlashMenu({ query, matches, selected }) {
19924
20027
  const visible = windowRows2(rows, selectedRowIdx < 0 ? 0 : selectedRowIdx, MAX_VISIBLE_ITEMS);
19925
20028
  const hiddenAbove = visible.start;
19926
20029
  const hiddenBelow = rows.length - visible.end;
19927
- return /* @__PURE__ */ jsxs66(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
19928
- /* @__PURE__ */ jsxs66(Text, { bold: true, color: "cyan", children: [
20030
+ return /* @__PURE__ */ jsxs65(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
20031
+ /* @__PURE__ */ jsxs65(Text, { bold: true, color: "cyan", children: [
19929
20032
  "\u2501\u2501 Command palette \u2501\u2501 ",
19930
- /* @__PURE__ */ jsx67(Text, { dimColor: true, children: placeholder2 }),
20033
+ /* @__PURE__ */ jsx66(Text, { dimColor: true, children: placeholder2 }),
19931
20034
  " ",
19932
- /* @__PURE__ */ jsxs66(Text, { dimColor: true, children: [
20035
+ /* @__PURE__ */ jsxs65(Text, { dimColor: true, children: [
19933
20036
  "(",
19934
20037
  resultMeta,
19935
20038
  ")"
19936
20039
  ] })
19937
20040
  ] }),
19938
- /* @__PURE__ */ jsx67(Text, { dimColor: true, children: "Type to filter commands by name, alias, or description." }),
19939
- hiddenAbove > 0 && /* @__PURE__ */ jsxs66(Text, { dimColor: true, children: [
20041
+ /* @__PURE__ */ jsx66(Text, { dimColor: true, children: "Type to filter commands by name, alias, or description." }),
20042
+ hiddenAbove > 0 && /* @__PURE__ */ jsxs65(Text, { dimColor: true, children: [
19940
20043
  " \u2191 ",
19941
20044
  hiddenAbove,
19942
20045
  " more"
19943
20046
  ] }),
19944
- visible.contextHeader && /* @__PURE__ */ jsxs66(Text, { bold: true, color: "yellow", dimColor: true, children: [
20047
+ visible.contextHeader && /* @__PURE__ */ jsxs65(Text, { bold: true, color: "yellow", dimColor: true, children: [
19945
20048
  " ",
19946
20049
  visible.contextHeader
19947
20050
  ] }),
19948
20051
  visible.rows.map((row) => {
19949
20052
  if (row.type === "header") {
19950
- return /* @__PURE__ */ jsxs66(Text, { bold: true, color: "yellow", dimColor: true, children: [
20053
+ return /* @__PURE__ */ jsxs65(Text, { bold: true, color: "yellow", dimColor: true, children: [
19951
20054
  " ",
19952
20055
  row.category
19953
20056
  ] }, `cat-${row.category}`);
19954
20057
  }
19955
20058
  const { match: m, index: i } = row;
19956
- return /* @__PURE__ */ jsxs66(Text, { inverse: i === selected, ...i === selected ? { color: "cyan" } : {}, children: [
20059
+ return /* @__PURE__ */ jsxs65(Text, { inverse: i === selected, ...i === selected ? { color: "cyan" } : {}, children: [
19957
20060
  i === selected ? "\u203A " : " ",
19958
- /* @__PURE__ */ jsx67(Text, { bold: true, children: m.name }),
19959
- m.argsHint ? /* @__PURE__ */ jsxs66(Text, { dimColor: true, children: [
20061
+ /* @__PURE__ */ jsx66(Text, { bold: true, children: m.name }),
20062
+ m.argsHint ? /* @__PURE__ */ jsxs65(Text, { dimColor: true, children: [
19960
20063
  " ",
19961
20064
  m.argsHint
19962
20065
  ] }) : null,
19963
- m.matchedAlias ? /* @__PURE__ */ jsxs66(Text, { dimColor: true, children: [
20066
+ m.matchedAlias ? /* @__PURE__ */ jsxs65(Text, { dimColor: true, children: [
19964
20067
  " alias /",
19965
20068
  m.matchedAlias
19966
20069
  ] }) : null,
19967
- /* @__PURE__ */ jsxs66(Text, { dimColor: true, children: [
20070
+ /* @__PURE__ */ jsxs65(Text, { dimColor: true, children: [
19968
20071
  " \u2014 ",
19969
20072
  m.description
19970
20073
  ] })
19971
20074
  ] }, m.name);
19972
20075
  }),
19973
- hiddenBelow > 0 && /* @__PURE__ */ jsxs66(Text, { dimColor: true, children: [
20076
+ hiddenBelow > 0 && /* @__PURE__ */ jsxs65(Text, { dimColor: true, children: [
19974
20077
  " \u2193 ",
19975
20078
  hiddenBelow,
19976
20079
  " more"
19977
20080
  ] }),
19978
- matches.length === 0 && /* @__PURE__ */ jsx67(Text, { dimColor: true, children: "No matching commands" }),
19979
- /* @__PURE__ */ jsx67(Text, { dimColor: true, children: "\u2500\u2500\u2500 \u2191\u2193 nav \xB7 Enter run \xB7 Tab fill \xB7 Esc close" })
20081
+ matches.length === 0 && /* @__PURE__ */ jsx66(Text, { dimColor: true, children: "No matching commands" }),
20082
+ /* @__PURE__ */ jsx66(Text, { dimColor: true, children: "\u2500\u2500\u2500 \u2191\u2193 nav \xB7 Enter run \xB7 Tab fill \xB7 Esc close" })
19980
20083
  ] });
19981
20084
  }
19982
20085
  function windowRows2(rows, focus, max) {
@@ -20008,7 +20111,7 @@ function windowRows2(rows, focus, max) {
20008
20111
 
20009
20112
  // src/components/todos-monitor.tsx
20010
20113
  import { useEffect as useEffect23, useState as useState24 } from "react";
20011
- import { jsx as jsx68, jsxs as jsxs67 } from "react/jsx-runtime";
20114
+ import { jsx as jsx67, jsxs as jsxs66 } from "react/jsx-runtime";
20012
20115
  function TodosMonitor({ todos }) {
20013
20116
  const size = useMonitorSize();
20014
20117
  const [selected, setSelected] = useState24(0);
@@ -20043,87 +20146,87 @@ function TodosMonitor({ todos }) {
20043
20146
  const label = t.status === "in_progress" && t.activeForm ? t.activeForm : t.content;
20044
20147
  const display = truncatePanelText(label, Math.max(8, colWidth - 9));
20045
20148
  if (t.status === "completed") {
20046
- return /* @__PURE__ */ jsxs67(Text, { color: theme.textMuted, children: [
20047
- /* @__PURE__ */ jsx68(Text, { color: isSelected ? theme.warn : theme.textMuted, children: marker }),
20048
- /* @__PURE__ */ jsxs67(Text, { color: theme.textMuted, children: [
20149
+ return /* @__PURE__ */ jsxs66(Text, { color: theme.textMuted, children: [
20150
+ /* @__PURE__ */ jsx67(Text, { color: isSelected ? theme.warn : theme.textMuted, children: marker }),
20151
+ /* @__PURE__ */ jsxs66(Text, { color: theme.textMuted, children: [
20049
20152
  num,
20050
20153
  "."
20051
20154
  ] }),
20052
20155
  " ",
20053
- /* @__PURE__ */ jsx68(Text, { color: theme.success, children: "[x]" }),
20156
+ /* @__PURE__ */ jsx67(Text, { color: theme.success, children: "[x]" }),
20054
20157
  " ",
20055
20158
  display
20056
20159
  ] }, `${t.id}-${idx}`);
20057
20160
  }
20058
20161
  if (t.status === "in_progress") {
20059
- return /* @__PURE__ */ jsxs67(Text, { children: [
20060
- /* @__PURE__ */ jsx68(Text, { color: isSelected ? theme.warn : theme.textMuted, children: marker }),
20061
- /* @__PURE__ */ jsxs67(Text, { color: theme.textMuted, children: [
20162
+ return /* @__PURE__ */ jsxs66(Text, { children: [
20163
+ /* @__PURE__ */ jsx67(Text, { color: isSelected ? theme.warn : theme.textMuted, children: marker }),
20164
+ /* @__PURE__ */ jsxs66(Text, { color: theme.textMuted, children: [
20062
20165
  num,
20063
20166
  "."
20064
20167
  ] }),
20065
20168
  " ",
20066
- /* @__PURE__ */ jsx68(Text, { color: theme.warn, bold: true, children: "[~]" }),
20169
+ /* @__PURE__ */ jsx67(Text, { color: theme.warn, bold: true, children: "[~]" }),
20067
20170
  " ",
20068
- /* @__PURE__ */ jsx68(Text, { color: theme.warn, children: display })
20171
+ /* @__PURE__ */ jsx67(Text, { color: theme.warn, children: display })
20069
20172
  ] }, t.id);
20070
20173
  }
20071
- return /* @__PURE__ */ jsxs67(Text, { children: [
20072
- /* @__PURE__ */ jsx68(Text, { color: isSelected ? theme.warn : theme.textMuted, children: marker }),
20073
- /* @__PURE__ */ jsxs67(Text, { color: theme.textMuted, children: [
20174
+ return /* @__PURE__ */ jsxs66(Text, { children: [
20175
+ /* @__PURE__ */ jsx67(Text, { color: isSelected ? theme.warn : theme.textMuted, children: marker }),
20176
+ /* @__PURE__ */ jsxs66(Text, { color: theme.textMuted, children: [
20074
20177
  num,
20075
20178
  "."
20076
20179
  ] }),
20077
20180
  " ",
20078
- /* @__PURE__ */ jsx68(Text, { color: theme.textMuted, children: "[ ]" }),
20181
+ /* @__PURE__ */ jsx67(Text, { color: theme.textMuted, children: "[ ]" }),
20079
20182
  " ",
20080
- /* @__PURE__ */ jsx68(Text, { color: theme.textSecondary, children: display })
20183
+ /* @__PURE__ */ jsx67(Text, { color: theme.textSecondary, children: display })
20081
20184
  ] }, t.id);
20082
20185
  };
20083
- return /* @__PURE__ */ jsxs67(
20186
+ return /* @__PURE__ */ jsxs66(
20084
20187
  MonitorShell,
20085
20188
  {
20086
20189
  accent: theme.warn,
20087
20190
  icon: glyphs.task,
20088
20191
  title: "TODOS",
20089
20192
  kicker: size.columns >= 90 ? "execution board" : void 0,
20090
- right: /* @__PURE__ */ jsxs67(Text, { children: [
20091
- /* @__PURE__ */ jsxs67(Text, { color: theme.warn, children: [
20193
+ right: /* @__PURE__ */ jsxs66(Text, { children: [
20194
+ /* @__PURE__ */ jsxs66(Text, { color: theme.warn, children: [
20092
20195
  "\u21BB ",
20093
20196
  inProgress
20094
20197
  ] }),
20095
- /* @__PURE__ */ jsxs67(Text, { color: theme.textMuted, children: [
20198
+ /* @__PURE__ */ jsxs66(Text, { color: theme.textMuted, children: [
20096
20199
  " \u25A1 ",
20097
20200
  pending
20098
20201
  ] }),
20099
- /* @__PURE__ */ jsxs67(Text, { color: theme.success, children: [
20202
+ /* @__PURE__ */ jsxs66(Text, { color: theme.success, children: [
20100
20203
  " \u2713 ",
20101
20204
  done
20102
20205
  ] })
20103
20206
  ] }),
20104
- footer: /* @__PURE__ */ jsxs67(Box, { gap: 2, children: [
20105
- /* @__PURE__ */ jsx68(KeyCap, { keyName: "\u2191\u2193", label: "inspect", color: theme.warn }),
20106
- /* @__PURE__ */ jsx68(KeyCap, { keyName: "F6", label: "close", color: theme.warn }),
20107
- overflow > 0 ? /* @__PURE__ */ jsxs67(Text, { color: theme.textMuted, children: [
20207
+ footer: /* @__PURE__ */ jsxs66(Box, { gap: 2, children: [
20208
+ /* @__PURE__ */ jsx67(KeyCap, { keyName: "\u2191\u2193", label: "inspect", color: theme.warn }),
20209
+ /* @__PURE__ */ jsx67(KeyCap, { keyName: "F6", label: "close", color: theme.warn }),
20210
+ overflow > 0 ? /* @__PURE__ */ jsxs66(Text, { color: theme.textMuted, children: [
20108
20211
  window.above > 0 ? `\u2191${window.above} ` : "",
20109
20212
  window.below > 0 ? `\u2193${window.below}` : ""
20110
20213
  ] }) : null
20111
20214
  ] }),
20112
20215
  children: [
20113
- /* @__PURE__ */ jsxs67(Box, { marginTop: 1, gap: 1, children: [
20114
- /* @__PURE__ */ jsx68(Text, { color: theme.textMuted, children: "PROGRESS" }),
20115
- /* @__PURE__ */ jsxs67(Text, { color: done === todos.length && todos.length > 0 ? theme.success : theme.warn, children: [
20216
+ /* @__PURE__ */ jsxs66(Box, { marginTop: 1, gap: 1, children: [
20217
+ /* @__PURE__ */ jsx67(Text, { color: theme.textMuted, children: "PROGRESS" }),
20218
+ /* @__PURE__ */ jsxs66(Text, { color: done === todos.length && todos.length > 0 ? theme.success : theme.warn, children: [
20116
20219
  "[",
20117
20220
  renderProgress(todos.length > 0 ? done / todos.length : 0, size.columns >= 90 ? 18 : 10),
20118
20221
  "]"
20119
20222
  ] }),
20120
- /* @__PURE__ */ jsxs67(Text, { color: theme.textSecondary, children: [
20223
+ /* @__PURE__ */ jsxs66(Text, { color: theme.textSecondary, children: [
20121
20224
  done,
20122
20225
  "/",
20123
20226
  todos.length
20124
20227
  ] })
20125
20228
  ] }),
20126
- todos.length === 0 ? /* @__PURE__ */ jsx68(
20229
+ todos.length === 0 ? /* @__PURE__ */ jsx67(
20127
20230
  EmptyPanelState,
20128
20231
  {
20129
20232
  icon: "\u25C7",
@@ -20131,27 +20234,27 @@ function TodosMonitor({ todos }) {
20131
20234
  detail: "Todos will appear as the agent plans work.",
20132
20235
  accent: theme.warn
20133
20236
  }
20134
- ) : twoCols ? /* @__PURE__ */ jsxs67(Box, { flexDirection: "row", gap: 3, marginTop: 1, children: [
20135
- /* @__PURE__ */ jsx68(Box, { flexDirection: "column", width: colWidth, children: visible.slice(0, mid).map((t, i) => renderRow4(t, i)) }),
20136
- /* @__PURE__ */ jsx68(Box, { flexDirection: "column", width: colWidth, children: visible.slice(mid).map((t, i) => renderRow4(t, mid + i)) })
20137
- ] }) : /* @__PURE__ */ jsx68(Box, { flexDirection: "column", marginTop: 1, children: visible.map(renderRow4) })
20237
+ ) : twoCols ? /* @__PURE__ */ jsxs66(Box, { flexDirection: "row", gap: 3, marginTop: 1, children: [
20238
+ /* @__PURE__ */ jsx67(Box, { flexDirection: "column", width: colWidth, children: visible.slice(0, mid).map((t, i) => renderRow4(t, i)) }),
20239
+ /* @__PURE__ */ jsx67(Box, { flexDirection: "column", width: colWidth, children: visible.slice(mid).map((t, i) => renderRow4(t, mid + i)) })
20240
+ ] }) : /* @__PURE__ */ jsx67(Box, { flexDirection: "column", marginTop: 1, children: visible.map(renderRow4) })
20138
20241
  ]
20139
20242
  }
20140
20243
  );
20141
20244
  }
20142
20245
 
20143
20246
  // src/components/tools-picker.tsx
20144
- import { Fragment as Fragment24, jsx as jsx69, jsxs as jsxs68 } from "react/jsx-runtime";
20247
+ import { Fragment as Fragment24, jsx as jsx68, jsxs as jsxs67 } from "react/jsx-runtime";
20145
20248
  var CHROME_ROWS6 = 15;
20146
20249
  var MAX_PICKER_ITEMS2 = 15;
20147
20250
  function toolActionLabel(enabled) {
20148
20251
  return enabled ? "Enter makes this tool passive" : "Enter re-enables this tool";
20149
20252
  }
20150
20253
  function statusBadge2(enabled) {
20151
- return enabled ? /* @__PURE__ */ jsx69(Text, { color: "green", children: "\u25CF active" }) : /* @__PURE__ */ jsx69(Text, { color: "red", children: "\u25CB passive" });
20254
+ return enabled ? /* @__PURE__ */ jsx68(Text, { color: "green", children: "\u25CF active" }) : /* @__PURE__ */ jsx68(Text, { color: "red", children: "\u25CB passive" });
20152
20255
  }
20153
20256
  function rwBadge(mutating) {
20154
- return mutating ? /* @__PURE__ */ jsx69(Text, { color: "yellow", children: "mut" }) : /* @__PURE__ */ jsx69(Text, { color: "cyan", children: "ro" });
20257
+ return mutating ? /* @__PURE__ */ jsx68(Text, { color: "yellow", children: "mut" }) : /* @__PURE__ */ jsx68(Text, { color: "cyan", children: "ro" });
20155
20258
  }
20156
20259
  function displayCategory(cat) {
20157
20260
  if (!cat || cat.trim() === "") return "Other";
@@ -20253,19 +20356,19 @@ function ToolsPicker({
20253
20356
  hiddenAbove = win.start;
20254
20357
  hiddenBelow = rows.length - win.end;
20255
20358
  const hasFilter = filterActive;
20256
- return /* @__PURE__ */ jsxs68(Box, { flexDirection: "column", borderStyle: "round", borderColor: "green", paddingX: 1, children: [
20257
- /* @__PURE__ */ jsx69(Text, { bold: true, color: "green", children: "\u2501\u2501 Tools \u2501\u2501" }),
20258
- /* @__PURE__ */ jsx69(Text, { dimColor: true, children: hasFilter ? `Filter: ${filter} (${visibleItems.length} match${visibleItems.length === 1 ? "" : "es"}) \xB7 Backspace edit \xB7 Esc clear` : `\u2191/\u2193 select \xB7 type to filter \xB7 Enter toggles \xB7 Esc close \xB7 ${enabledCount} active / ${passiveCount} passive` }),
20259
- /* @__PURE__ */ jsx69(Text, { dimColor: true, children: "Passive tools stay listed for this session so you can select them and re-enable them later." }),
20260
- /* @__PURE__ */ jsx69(Box, { marginTop: 1, flexDirection: "column", children: total === 0 ? /* @__PURE__ */ jsx69(Text, { dimColor: true, children: busy ? "Loading tools\u2026" : "No tools registered." }) : visibleItems.length === 0 ? /* @__PURE__ */ jsxs68(Text, { dimColor: true, children: [
20359
+ return /* @__PURE__ */ jsxs67(Box, { flexDirection: "column", borderStyle: "round", borderColor: "green", paddingX: 1, children: [
20360
+ /* @__PURE__ */ jsx68(Text, { bold: true, color: "green", children: "\u2501\u2501 Tools \u2501\u2501" }),
20361
+ /* @__PURE__ */ jsx68(Text, { dimColor: true, children: hasFilter ? `Filter: ${filter} (${visibleItems.length} match${visibleItems.length === 1 ? "" : "es"}) \xB7 Backspace edit \xB7 Esc clear` : `\u2191/\u2193 select \xB7 type to filter \xB7 Enter toggles \xB7 Esc close \xB7 ${enabledCount} active / ${passiveCount} passive` }),
20362
+ /* @__PURE__ */ jsx68(Text, { dimColor: true, children: "Passive tools stay listed for this session so you can select them and re-enable them later." }),
20363
+ /* @__PURE__ */ jsx68(Box, { marginTop: 1, flexDirection: "column", children: total === 0 ? /* @__PURE__ */ jsx68(Text, { dimColor: true, children: busy ? "Loading tools\u2026" : "No tools registered." }) : visibleItems.length === 0 ? /* @__PURE__ */ jsxs67(Text, { dimColor: true, children: [
20261
20364
  'No tools match "',
20262
20365
  filter,
20263
20366
  '".'
20264
- ] }) : /* @__PURE__ */ jsxs68(Fragment24, { children: [
20265
- hiddenAbove > 0 ? /* @__PURE__ */ jsx69(Text, { dimColor: true, children: ` \u2191 ${hiddenAbove} more` }) : null,
20367
+ ] }) : /* @__PURE__ */ jsxs67(Fragment24, { children: [
20368
+ hiddenAbove > 0 ? /* @__PURE__ */ jsx68(Text, { dimColor: true, children: ` \u2191 ${hiddenAbove} more` }) : null,
20266
20369
  displayRows.map(({ item, index }) => {
20267
20370
  const focused = index === visibleSelected;
20268
- return /* @__PURE__ */ jsxs68(
20371
+ return /* @__PURE__ */ jsxs67(
20269
20372
  Text,
20270
20373
  {
20271
20374
  inverse: focused,
@@ -20275,9 +20378,9 @@ function ToolsPicker({
20275
20378
  focused ? "\u203A " : " ",
20276
20379
  statusBadge2(item.enabled),
20277
20380
  " ",
20278
- /* @__PURE__ */ jsx69(Text, { bold: true, children: fitCell(item.name, columnWidths.name) }),
20381
+ /* @__PURE__ */ jsx68(Text, { bold: true, children: fitCell(item.name, columnWidths.name) }),
20279
20382
  " ",
20280
- /* @__PURE__ */ jsxs68(Text, { dimColor: true, children: [
20383
+ /* @__PURE__ */ jsxs67(Text, { dimColor: true, children: [
20281
20384
  fitCell(displayCategory(item.category), columnWidths.category),
20282
20385
  " ",
20283
20386
  fitCell(`[${item.owner}]`, columnWidths.owner),
@@ -20287,7 +20390,7 @@ function ToolsPicker({
20287
20390
  " ",
20288
20391
  fitCell(item.permission, columnWidths.permission),
20289
20392
  " ",
20290
- /* @__PURE__ */ jsxs68(Text, { color: item.descMode === "simple" ? "yellow" : void 0, children: [
20393
+ /* @__PURE__ */ jsxs67(Text, { color: item.descMode === "simple" ? "yellow" : void 0, children: [
20291
20394
  "desc:",
20292
20395
  item.descMode
20293
20396
  ] })
@@ -20297,22 +20400,22 @@ function ToolsPicker({
20297
20400
  item.name
20298
20401
  );
20299
20402
  }),
20300
- hiddenBelow > 0 ? /* @__PURE__ */ jsx69(Text, { dimColor: true, children: ` \u2193 ${hiddenBelow} more` }) : null
20403
+ hiddenBelow > 0 ? /* @__PURE__ */ jsx68(Text, { dimColor: true, children: ` \u2193 ${hiddenBelow} more` }) : null
20301
20404
  ] }) }),
20302
- selectedItem ? /* @__PURE__ */ jsxs68(Box, { marginTop: 1, flexDirection: "column", children: [
20303
- /* @__PURE__ */ jsxs68(Text, { children: [
20304
- /* @__PURE__ */ jsx69(Text, { color: selectedItem.enabled ? "green" : "red", children: toolActionLabel(selectedItem.enabled) }),
20305
- /* @__PURE__ */ jsx69(Text, { dimColor: true, children: ` \xB7 ${selectedItem.mutating ? "Mutating" : "Read-only"} \xB7 permission: ${selectedItem.permission} \xB7 descriptions: ${selectedItem.descMode}` })
20405
+ selectedItem ? /* @__PURE__ */ jsxs67(Box, { marginTop: 1, flexDirection: "column", children: [
20406
+ /* @__PURE__ */ jsxs67(Text, { children: [
20407
+ /* @__PURE__ */ jsx68(Text, { color: selectedItem.enabled ? "green" : "red", children: toolActionLabel(selectedItem.enabled) }),
20408
+ /* @__PURE__ */ jsx68(Text, { dimColor: true, children: ` \xB7 ${selectedItem.mutating ? "Mutating" : "Read-only"} \xB7 permission: ${selectedItem.permission} \xB7 descriptions: ${selectedItem.descMode}` })
20306
20409
  ] }),
20307
- /* @__PURE__ */ jsx69(Text, { dimColor: true, wrap: "truncate-end", children: selectedItem.description || "No description provided." })
20410
+ /* @__PURE__ */ jsx68(Text, { dimColor: true, wrap: "truncate-end", children: selectedItem.description || "No description provided." })
20308
20411
  ] }) : null,
20309
- hint ? /* @__PURE__ */ jsx69(Box, { marginTop: 1, children: /* @__PURE__ */ jsx69(Text, { dimColor: true, children: hint }) }) : null
20412
+ hint ? /* @__PURE__ */ jsx68(Box, { marginTop: 1, children: /* @__PURE__ */ jsx68(Text, { dimColor: true, children: hint }) }) : null
20310
20413
  ] });
20311
20414
  }
20312
20415
 
20313
20416
  // src/components/worktree-monitor.tsx
20314
20417
  import { useEffect as useEffect24, useState as useState25 } from "react";
20315
- import { jsx as jsx70, jsxs as jsxs69 } from "react/jsx-runtime";
20418
+ import { jsx as jsx69, jsxs as jsxs68 } from "react/jsx-runtime";
20316
20419
  var fmtElapsed5 = (ms) => {
20317
20420
  const s2 = Math.floor(ms / 1e3);
20318
20421
  const m = Math.floor(s2 / 60);
@@ -20372,48 +20475,48 @@ function WorktreeMonitor({
20372
20475
  const window = panelWindow(recent.length, selected, limit);
20373
20476
  const visible = recent.slice(window.start, window.end);
20374
20477
  const compact = size.columns < 92;
20375
- return /* @__PURE__ */ jsxs69(
20478
+ return /* @__PURE__ */ jsxs68(
20376
20479
  MonitorShell,
20377
20480
  {
20378
20481
  accent: theme.monitor.worktree,
20379
20482
  icon: "\u2442",
20380
20483
  title: "WORKTREES",
20381
20484
  kicker: compact ? void 0 : "isolated changes",
20382
- right: /* @__PURE__ */ jsxs69(Text, { children: [
20383
- /* @__PURE__ */ jsxs69(Text, { color: theme.warn, children: [
20485
+ right: /* @__PURE__ */ jsxs68(Text, { children: [
20486
+ /* @__PURE__ */ jsxs68(Text, { color: theme.warn, children: [
20384
20487
  "\u25CF ",
20385
20488
  active
20386
20489
  ] }),
20387
- /* @__PURE__ */ jsx70(Text, { color: theme.textMuted, children: " " }),
20388
- /* @__PURE__ */ jsxs69(Text, { color: theme.success, children: [
20490
+ /* @__PURE__ */ jsx69(Text, { color: theme.textMuted, children: " " }),
20491
+ /* @__PURE__ */ jsxs68(Text, { color: theme.success, children: [
20389
20492
  "\u2713 ",
20390
20493
  merged
20391
20494
  ] }),
20392
- failed > 0 ? /* @__PURE__ */ jsxs69(Text, { color: theme.error, children: [
20495
+ failed > 0 ? /* @__PURE__ */ jsxs68(Text, { color: theme.error, children: [
20393
20496
  " \u26A0 ",
20394
20497
  failed
20395
20498
  ] }) : null
20396
20499
  ] }),
20397
- footer: /* @__PURE__ */ jsxs69(Box, { gap: 2, children: [
20398
- /* @__PURE__ */ jsx70(KeyCap, { keyName: "\u2191\u2193", label: "inspect", color: theme.monitor.worktree }),
20399
- /* @__PURE__ */ jsx70(KeyCap, { keyName: "F4", label: "close", color: theme.monitor.worktree }),
20400
- /* @__PURE__ */ jsx70(Text, { color: theme.textMuted, children: "/worktree merge <branch>" }),
20401
- staleTerminal > 0 ? /* @__PURE__ */ jsxs69(Text, { color: theme.textMuted, children: [
20500
+ footer: /* @__PURE__ */ jsxs68(Box, { gap: 2, children: [
20501
+ /* @__PURE__ */ jsx69(KeyCap, { keyName: "\u2191\u2193", label: "inspect", color: theme.monitor.worktree }),
20502
+ /* @__PURE__ */ jsx69(KeyCap, { keyName: "F4", label: "close", color: theme.monitor.worktree }),
20503
+ /* @__PURE__ */ jsx69(Text, { color: theme.textMuted, children: "/worktree merge <branch>" }),
20504
+ staleTerminal > 0 ? /* @__PURE__ */ jsxs68(Text, { color: theme.textMuted, children: [
20402
20505
  staleTerminal,
20403
20506
  " archived"
20404
20507
  ] }) : null
20405
20508
  ] }),
20406
20509
  children: [
20407
- /* @__PURE__ */ jsx70(Box, { marginTop: 1, children: /* @__PURE__ */ jsxs69(Text, { color: theme.textMuted, children: [
20510
+ /* @__PURE__ */ jsx69(Box, { marginTop: 1, children: /* @__PURE__ */ jsxs68(Text, { color: theme.textMuted, children: [
20408
20511
  "BASE ",
20409
- /* @__PURE__ */ jsx70(Text, { color: theme.textSecondary, children: baseBranch ?? "project default" }),
20512
+ /* @__PURE__ */ jsx69(Text, { color: theme.textSecondary, children: baseBranch ?? "project default" }),
20410
20513
  " \xB7 ",
20411
20514
  "showing ",
20412
20515
  visible.length,
20413
20516
  "/",
20414
20517
  recent.length || 0
20415
20518
  ] }) }),
20416
- recent.length === 0 ? /* @__PURE__ */ jsx70(
20519
+ recent.length === 0 ? /* @__PURE__ */ jsx69(
20417
20520
  EmptyPanelState,
20418
20521
  {
20419
20522
  icon: "\u25C7",
@@ -20427,56 +20530,56 @@ function WorktreeMonitor({
20427
20530
  const elapsed = w.allocatedAt ? fmtElapsed5(nowTick - w.allocatedAt) : "\u2014";
20428
20531
  const conflictWidth = Math.max(18, size.contentWidth - 15);
20429
20532
  const isSelected = window.start + visibleIndex === selected;
20430
- return /* @__PURE__ */ jsxs69(Box, { flexDirection: "column", marginTop: 1, paddingX: 1, children: [
20431
- /* @__PURE__ */ jsxs69(Box, { children: [
20432
- /* @__PURE__ */ jsx70(Text, { color: isSelected ? theme.monitor.worktree : theme.textMuted, children: isSelected ? "\u203A " : " " }),
20433
- /* @__PURE__ */ jsxs69(Text, { color: s2.color, bold: true, children: [
20533
+ return /* @__PURE__ */ jsxs68(Box, { flexDirection: "column", marginTop: 1, paddingX: 1, children: [
20534
+ /* @__PURE__ */ jsxs68(Box, { children: [
20535
+ /* @__PURE__ */ jsx69(Text, { color: isSelected ? theme.monitor.worktree : theme.textMuted, children: isSelected ? "\u203A " : " " }),
20536
+ /* @__PURE__ */ jsxs68(Text, { color: s2.color, bold: true, children: [
20434
20537
  s2.icon,
20435
20538
  " ",
20436
20539
  s2.label.toUpperCase().padEnd(12)
20437
20540
  ] }),
20438
- /* @__PURE__ */ jsx70(Text, { color: theme.textPrimary, bold: true, children: truncatePanelText(short, compact ? 24 : 42) }),
20439
- /* @__PURE__ */ jsx70(Box, { flexGrow: 1 }),
20440
- /* @__PURE__ */ jsx70(Text, { color: theme.textMuted, children: elapsed })
20541
+ /* @__PURE__ */ jsx69(Text, { color: theme.textPrimary, bold: true, children: truncatePanelText(short, compact ? 24 : 42) }),
20542
+ /* @__PURE__ */ jsx69(Box, { flexGrow: 1 }),
20543
+ /* @__PURE__ */ jsx69(Text, { color: theme.textMuted, children: elapsed })
20441
20544
  ] }),
20442
- /* @__PURE__ */ jsxs69(Box, { marginLeft: 2, children: [
20443
- /* @__PURE__ */ jsx70(Text, { color: theme.textMuted, children: truncatePanelText(
20545
+ /* @__PURE__ */ jsxs68(Box, { marginLeft: 2, children: [
20546
+ /* @__PURE__ */ jsx69(Text, { color: theme.textMuted, children: truncatePanelText(
20444
20547
  `${w.baseBranch ?? baseBranch ?? "base"} \u2192 ${short}`,
20445
20548
  compact ? 38 : 58
20446
20549
  ) }),
20447
- !compact ? /* @__PURE__ */ jsxs69(Text, { color: theme.textMuted, children: [
20550
+ !compact ? /* @__PURE__ */ jsxs68(Text, { color: theme.textMuted, children: [
20448
20551
  " owner ",
20449
20552
  w.ownerLabel
20450
20553
  ] }) : null,
20451
- /* @__PURE__ */ jsx70(Box, { flexGrow: 1 }),
20452
- /* @__PURE__ */ jsxs69(Text, { color: theme.success, children: [
20554
+ /* @__PURE__ */ jsx69(Box, { flexGrow: 1 }),
20555
+ /* @__PURE__ */ jsxs68(Text, { color: theme.success, children: [
20453
20556
  "+",
20454
20557
  w.insertions
20455
20558
  ] }),
20456
- /* @__PURE__ */ jsxs69(Text, { color: theme.error, children: [
20559
+ /* @__PURE__ */ jsxs68(Text, { color: theme.error, children: [
20457
20560
  " -",
20458
20561
  w.deletions
20459
20562
  ] }),
20460
- /* @__PURE__ */ jsxs69(Text, { color: theme.textMuted, children: [
20563
+ /* @__PURE__ */ jsxs68(Text, { color: theme.textMuted, children: [
20461
20564
  " ",
20462
20565
  w.files,
20463
20566
  " files"
20464
20567
  ] })
20465
20568
  ] }),
20466
- compact ? /* @__PURE__ */ jsxs69(Text, { color: theme.textMuted, children: [
20569
+ compact ? /* @__PURE__ */ jsxs68(Text, { color: theme.textMuted, children: [
20467
20570
  " owner ",
20468
20571
  w.ownerLabel
20469
20572
  ] }) : null,
20470
- w.conflictFiles && w.conflictFiles.length > 0 ? /* @__PURE__ */ jsxs69(Box, { marginLeft: 2, children: [
20471
- /* @__PURE__ */ jsxs69(Text, { color: theme.warn, bold: true, children: [
20573
+ w.conflictFiles && w.conflictFiles.length > 0 ? /* @__PURE__ */ jsxs68(Box, { marginLeft: 2, children: [
20574
+ /* @__PURE__ */ jsxs68(Text, { color: theme.warn, bold: true, children: [
20472
20575
  "\u26A0 conflicts",
20473
20576
  " "
20474
20577
  ] }),
20475
- /* @__PURE__ */ jsx70(Text, { color: theme.textSecondary, children: truncatePanelText(w.conflictFiles.join(", "), conflictWidth) })
20578
+ /* @__PURE__ */ jsx69(Text, { color: theme.textSecondary, children: truncatePanelText(w.conflictFiles.join(", "), conflictWidth) })
20476
20579
  ] }) : null
20477
20580
  ] }, w.branch);
20478
20581
  }),
20479
- window.below > 0 ? /* @__PURE__ */ jsxs69(Text, { color: theme.textMuted, children: [
20582
+ window.below > 0 ? /* @__PURE__ */ jsxs68(Text, { color: theme.textMuted, children: [
20480
20583
  " \u2193 ",
20481
20584
  window.below,
20482
20585
  " more worktrees"
@@ -20487,7 +20590,7 @@ function WorktreeMonitor({
20487
20590
  }
20488
20591
 
20489
20592
  // src/components/worktree-panel.tsx
20490
- import { jsx as jsx71, jsxs as jsxs70 } from "react/jsx-runtime";
20593
+ import { jsx as jsx70, jsxs as jsxs69 } from "react/jsx-runtime";
20491
20594
  var fmtElapsed6 = (ms) => {
20492
20595
  const s2 = Math.floor(ms / 1e3);
20493
20596
  const m = Math.floor(s2 / 60);
@@ -20519,7 +20622,7 @@ function WorktreePanel({
20519
20622
  ).length;
20520
20623
  const merged = list.filter((w) => w.status === "merged").length;
20521
20624
  const failed = list.filter((w) => w.status === "failed" || w.status === "needs-review").length;
20522
- return /* @__PURE__ */ jsxs70(
20625
+ return /* @__PURE__ */ jsxs69(
20523
20626
  Box,
20524
20627
  {
20525
20628
  flexDirection: "column",
@@ -20530,22 +20633,22 @@ function WorktreePanel({
20530
20633
  borderLeft: false,
20531
20634
  borderRight: false,
20532
20635
  children: [
20533
- /* @__PURE__ */ jsxs70(Box, { flexDirection: "row", gap: 2, children: [
20534
- /* @__PURE__ */ jsx71(Text, { dimColor: true, children: "Worktrees" }),
20535
- /* @__PURE__ */ jsx71(Text, { dimColor: true, children: "\u2502" }),
20536
- /* @__PURE__ */ jsxs70(Text, { color: "yellow", children: [
20636
+ /* @__PURE__ */ jsxs69(Box, { flexDirection: "row", gap: 2, children: [
20637
+ /* @__PURE__ */ jsx70(Text, { dimColor: true, children: "Worktrees" }),
20638
+ /* @__PURE__ */ jsx70(Text, { dimColor: true, children: "\u2502" }),
20639
+ /* @__PURE__ */ jsxs69(Text, { color: "yellow", children: [
20537
20640
  "\u25B6",
20538
20641
  active
20539
20642
  ] }),
20540
- /* @__PURE__ */ jsxs70(Text, { color: "green", children: [
20643
+ /* @__PURE__ */ jsxs69(Text, { color: "green", children: [
20541
20644
  "\u2713",
20542
20645
  merged
20543
20646
  ] }),
20544
- failed > 0 ? /* @__PURE__ */ jsxs70(Text, { color: "red", children: [
20647
+ failed > 0 ? /* @__PURE__ */ jsxs69(Text, { color: "red", children: [
20545
20648
  "\u2717",
20546
20649
  failed
20547
20650
  ] }) : null,
20548
- /* @__PURE__ */ jsxs70(Text, { dimColor: true, children: [
20651
+ /* @__PURE__ */ jsxs69(Text, { dimColor: true, children: [
20549
20652
  "\xB7 ",
20550
20653
  list.length,
20551
20654
  " total \xB7 Ctrl+T for details"
@@ -20555,11 +20658,11 @@ function WorktreePanel({
20555
20658
  const s2 = st(w.status);
20556
20659
  const conflict = w.status === "needs-review";
20557
20660
  const elapsed = w.allocatedAt ? fmtElapsed6(nowTick - w.allocatedAt) : "";
20558
- return /* @__PURE__ */ jsxs70(Box, { flexDirection: "row", gap: 1, children: [
20559
- /* @__PURE__ */ jsx71(Text, { color: s2.color, children: s2.icon }),
20560
- /* @__PURE__ */ jsx71(Text, { children: w.branch.replace(/^wstack\/ap\//, "").slice(0, 18).padEnd(18) }),
20561
- /* @__PURE__ */ jsx71(Text, { dimColor: true, children: w.ownerLabel.slice(0, 12) }),
20562
- conflict ? /* @__PURE__ */ jsx71(Text, { color: "magenta", children: " CONFLICT" }) : /* @__PURE__ */ jsxs70(Text, { dimColor: true, children: [
20661
+ return /* @__PURE__ */ jsxs69(Box, { flexDirection: "row", gap: 1, children: [
20662
+ /* @__PURE__ */ jsx70(Text, { color: s2.color, children: s2.icon }),
20663
+ /* @__PURE__ */ jsx70(Text, { children: w.branch.replace(/^wstack\/ap\//, "").slice(0, 18).padEnd(18) }),
20664
+ /* @__PURE__ */ jsx70(Text, { dimColor: true, children: w.ownerLabel.slice(0, 12) }),
20665
+ conflict ? /* @__PURE__ */ jsx70(Text, { color: "magenta", children: " CONFLICT" }) : /* @__PURE__ */ jsxs69(Text, { dimColor: true, children: [
20563
20666
  " ",
20564
20667
  "+",
20565
20668
  w.insertions,
@@ -20569,7 +20672,7 @@ function WorktreePanel({
20569
20672
  w.files,
20570
20673
  "f"
20571
20674
  ] }),
20572
- elapsed && (w.status === "active" || w.status === "committing") ? /* @__PURE__ */ jsxs70(Text, { dimColor: true, children: [
20675
+ elapsed && (w.status === "active" || w.status === "committing") ? /* @__PURE__ */ jsxs69(Text, { dimColor: true, children: [
20573
20676
  " ",
20574
20677
  elapsed
20575
20678
  ] }) : null
@@ -23787,27 +23890,18 @@ function useTuiControllers({
23787
23890
  useEffect36(() => {
23788
23891
  if (!fleetStreamController) return;
23789
23892
  fleetStreamController.mode = fleetChat;
23790
- fleetStreamController.enabled = fleetChat !== "off";
23791
23893
  fleetStreamController.setMode = (mode) => {
23792
23894
  dispatch({ type: "setFleetChat", mode });
23793
23895
  };
23794
- fleetStreamController.setEnabled = (enabled) => {
23795
- dispatch({ type: "setFleetChat", mode: enabled ? "full" : "off" });
23796
- };
23797
23896
  return () => {
23798
23897
  fleetStreamController.setMode = (mode) => {
23799
23898
  fleetStreamController.mode = mode;
23800
- fleetStreamController.enabled = mode !== "off";
23801
- };
23802
- fleetStreamController.setEnabled = (enabled) => {
23803
- fleetStreamController.setMode(enabled ? "full" : "off");
23804
23899
  };
23805
23900
  };
23806
23901
  }, [dispatch, fleetStreamController, fleetChat]);
23807
23902
  useEffect36(() => {
23808
23903
  if (fleetStreamController) {
23809
23904
  fleetStreamController.mode = fleetChat;
23810
- fleetStreamController.enabled = fleetChat !== "off";
23811
23905
  }
23812
23906
  }, [fleetStreamController, fleetChat]);
23813
23907
  useEffect36(() => {
@@ -26451,7 +26545,7 @@ function deleteWordForward(buffer, cursor) {
26451
26545
 
26452
26546
  // src/app.tsx
26453
26547
  import { buildGoalPreamble as buildGoalPreamble2 } from "@wrongstack/core";
26454
- import { jsx as jsx72, jsxs as jsxs71 } from "react/jsx-runtime";
26548
+ import { jsx as jsx71, jsxs as jsxs70 } from "react/jsx-runtime";
26455
26549
  var INPUT_PROMPT = DEFAULT_INPUT_PROMPT;
26456
26550
  var PASTE_THRESHOLD_CHARS = 200;
26457
26551
  var CONTINUE_CONFIRM_DELAY_MS = 4e3;
@@ -30973,8 +31067,8 @@ ${content}
30973
31067
  const inputHeight = Math.max(3, inputCellRows.length + 2);
30974
31068
  const hideInput = enhanceActive || state.refineFailure != null || state.continueConfirm != null || state.clearConfirm != null || state.slashConfirm != null || state.confirmQueue.length > 0 || state.shellCommandWarning != null || state.brainPrompt != null || state.escConfirm != null || state.sendModePicker != null || state.helpOpen || state.projectPicker.open || state.monitorOpen || state.agentsMonitorOpen || state.worktreeMonitorOpen || state.planPanelOpen || state.todosMonitorOpen || state.queuePanelOpen || state.processListOpen || state.goalPanelOpen || state.contextPanelOpen || state.sessionsPanelOpen || state.authPanel.open;
30975
31069
  const lowerFunctionPanelOpen = state.monitorOpen || state.agentsMonitorOpen || (state.goalRun?.monitorOpen ?? false) || state.worktreeMonitorOpen || state.planPanelOpen || state.kanbanPanelOpen || state.todosMonitorOpen || state.queuePanelOpen || state.processListOpen || state.goalPanelOpen || state.sessionsPanelOpen;
30976
- return /* @__PURE__ */ jsx72(Box, { flexDirection: "column", children: /* @__PURE__ */ jsxs71(Box, { flexDirection: "column", flexGrow: 1, flexShrink: 0, children: [
30977
- mouseMode ? /* @__PURE__ */ jsx72(
31070
+ return /* @__PURE__ */ jsx71(Box, { flexDirection: "column", children: /* @__PURE__ */ jsxs70(Box, { flexDirection: "column", flexGrow: 1, flexShrink: 0, children: [
31071
+ mouseMode ? /* @__PURE__ */ jsx71(
30978
31072
  ScrollableHistory,
30979
31073
  {
30980
31074
  entries: state.entries,
@@ -30990,7 +31084,7 @@ ${content}
30990
31084
  todos: liveTodos,
30991
31085
  showModelReasoning: state.settingsPicker.open ? state.settingsPicker.showModelReasoning : liveSettings?.showModelReasoning ?? true
30992
31086
  }
30993
- ) : /* @__PURE__ */ jsx72(
31087
+ ) : /* @__PURE__ */ jsx71(
30994
31088
  History,
30995
31089
  {
30996
31090
  entries: state.entries,
@@ -31004,8 +31098,8 @@ ${content}
31004
31098
  showModelReasoning: state.settingsPicker.open ? state.settingsPicker.showModelReasoning : liveSettings?.showModelReasoning ?? true
31005
31099
  }
31006
31100
  ),
31007
- /* @__PURE__ */ jsxs71(Box, { flexDirection: "column", flexShrink: 0, ref: bottomRegionRef, children: [
31008
- /* @__PURE__ */ jsx72(
31101
+ /* @__PURE__ */ jsxs70(Box, { flexDirection: "column", flexShrink: 0, ref: bottomRegionRef, children: [
31102
+ /* @__PURE__ */ jsx71(
31009
31103
  Input,
31010
31104
  {
31011
31105
  prompt: INPUT_PROMPT,
@@ -31022,7 +31116,7 @@ ${content}
31022
31116
  workingTime: workingTimeMs
31023
31117
  }
31024
31118
  ),
31025
- state.picker.open ? /* @__PURE__ */ jsx72(
31119
+ state.picker.open ? /* @__PURE__ */ jsx71(
31026
31120
  FilePicker,
31027
31121
  {
31028
31122
  query: state.picker.query,
@@ -31030,7 +31124,7 @@ ${content}
31030
31124
  selected: state.picker.selected
31031
31125
  }
31032
31126
  ) : null,
31033
- state.slashPicker.open ? /* @__PURE__ */ jsx72(
31127
+ state.slashPicker.open ? /* @__PURE__ */ jsx71(
31034
31128
  SlashMenu,
31035
31129
  {
31036
31130
  query: state.slashPicker.query,
@@ -31038,7 +31132,7 @@ ${content}
31038
31132
  selected: state.slashPicker.selected
31039
31133
  }
31040
31134
  ) : null,
31041
- state.modelPicker.open ? /* @__PURE__ */ jsx72(
31135
+ state.modelPicker.open ? /* @__PURE__ */ jsx71(
31042
31136
  ModelPicker,
31043
31137
  {
31044
31138
  step: state.modelPicker.step,
@@ -31052,7 +31146,7 @@ ${content}
31052
31146
  titleLabel: state.modelPicker.title
31053
31147
  }
31054
31148
  ) : null,
31055
- state.autonomyPicker.open ? /* @__PURE__ */ jsx72(
31149
+ state.autonomyPicker.open ? /* @__PURE__ */ jsx71(
31056
31150
  AutonomyPicker,
31057
31151
  {
31058
31152
  options: state.autonomyPicker.options,
@@ -31060,7 +31154,7 @@ ${content}
31060
31154
  hint: state.autonomyPicker.hint
31061
31155
  }
31062
31156
  ) : null,
31063
- state.modePicker.open ? /* @__PURE__ */ jsx72(
31157
+ state.modePicker.open ? /* @__PURE__ */ jsx71(
31064
31158
  ModePicker,
31065
31159
  {
31066
31160
  modes: state.modePicker.modes,
@@ -31068,7 +31162,7 @@ ${content}
31068
31162
  hint: state.modePicker.hint
31069
31163
  }
31070
31164
  ) : null,
31071
- state.designPicker.open ? /* @__PURE__ */ jsx72(
31165
+ state.designPicker.open ? /* @__PURE__ */ jsx71(
31072
31166
  DesignPicker,
31073
31167
  {
31074
31168
  kits: state.designPicker.kits,
@@ -31076,7 +31170,7 @@ ${content}
31076
31170
  stack: state.designPicker.stack
31077
31171
  }
31078
31172
  ) : null,
31079
- state.promptPicker.open ? /* @__PURE__ */ jsx72(
31173
+ state.promptPicker.open ? /* @__PURE__ */ jsx71(
31080
31174
  PromptPicker,
31081
31175
  {
31082
31176
  entries: filterPromptPicker(
@@ -31090,7 +31184,7 @@ ${content}
31090
31184
  total: state.promptPicker.all.length
31091
31185
  }
31092
31186
  ) : null,
31093
- state.resumePicker.open ? /* @__PURE__ */ jsx72(
31187
+ state.resumePicker.open ? /* @__PURE__ */ jsx71(
31094
31188
  ResumePicker,
31095
31189
  {
31096
31190
  sessions: state.resumePicker.sessions,
@@ -31100,7 +31194,7 @@ ${content}
31100
31194
  hint: state.resumePicker.hint
31101
31195
  }
31102
31196
  ) : null,
31103
- state.settingsPicker.open ? /* @__PURE__ */ jsx72(
31197
+ state.settingsPicker.open ? /* @__PURE__ */ jsx71(
31104
31198
  SettingsPicker,
31105
31199
  {
31106
31200
  field: state.settingsPicker.field,
@@ -31151,7 +31245,7 @@ ${content}
31151
31245
  hint: state.settingsPicker.hint
31152
31246
  }
31153
31247
  ) : null,
31154
- state.statuslinePicker.open ? /* @__PURE__ */ jsx72(
31248
+ state.statuslinePicker.open ? /* @__PURE__ */ jsx71(
31155
31249
  StatuslinePicker,
31156
31250
  {
31157
31251
  field: state.statuslinePicker.field,
@@ -31160,7 +31254,7 @@ ${content}
31160
31254
  hint: state.statuslinePicker.hint
31161
31255
  }
31162
31256
  ) : null,
31163
- state.pluginPicker.open ? /* @__PURE__ */ jsx72(
31257
+ state.pluginPicker.open ? /* @__PURE__ */ jsx71(
31164
31258
  PluginPicker,
31165
31259
  {
31166
31260
  items: state.pluginPicker.items,
@@ -31169,7 +31263,7 @@ ${content}
31169
31263
  hint: state.pluginPicker.hint
31170
31264
  }
31171
31265
  ) : null,
31172
- state.mcpPicker.open ? /* @__PURE__ */ jsx72(
31266
+ state.mcpPicker.open ? /* @__PURE__ */ jsx71(
31173
31267
  McpPicker,
31174
31268
  {
31175
31269
  items: state.mcpPicker.items,
@@ -31178,7 +31272,7 @@ ${content}
31178
31272
  hint: state.mcpPicker.hint
31179
31273
  }
31180
31274
  ) : null,
31181
- state.toolsPicker.open ? /* @__PURE__ */ jsx72(
31275
+ state.toolsPicker.open ? /* @__PURE__ */ jsx71(
31182
31276
  ToolsPicker,
31183
31277
  {
31184
31278
  items: state.toolsPicker.items,
@@ -31188,8 +31282,8 @@ ${content}
31188
31282
  filter: state.toolsPicker.filter
31189
31283
  }
31190
31284
  ) : null,
31191
- state.brainPanel.open && !state.modelPicker.open ? /* @__PURE__ */ jsx72(BrainPanel, { ...state.brainPanel }) : null,
31192
- state.helpPanel.open ? /* @__PURE__ */ jsx72(
31285
+ state.brainPanel.open && !state.modelPicker.open ? /* @__PURE__ */ jsx71(BrainPanel, { ...state.brainPanel }) : null,
31286
+ state.helpPanel.open ? /* @__PURE__ */ jsx71(
31193
31287
  HelpPanel,
31194
31288
  {
31195
31289
  entries: state.helpPanel.entries,
@@ -31198,9 +31292,9 @@ ${content}
31198
31292
  hint: state.helpPanel.hint
31199
31293
  }
31200
31294
  ) : null,
31201
- state.shadowPanel.open ? /* @__PURE__ */ jsx72(ShadowPanel, { shadow: state.shadowPanel.shadow, hint: state.shadowPanel.hint }) : null,
31202
- state.authPanel.open ? /* @__PURE__ */ jsx72(AuthPanel, { panel: state.authPanel }) : null,
31203
- state.projectPicker.open ? /* @__PURE__ */ jsx72(
31295
+ state.shadowPanel.open ? /* @__PURE__ */ jsx71(ShadowPanel, { shadow: state.shadowPanel.shadow, hint: state.shadowPanel.hint }) : null,
31296
+ state.authPanel.open ? /* @__PURE__ */ jsx71(AuthPanel, { panel: state.authPanel }) : null,
31297
+ state.projectPicker.open ? /* @__PURE__ */ jsx71(
31204
31298
  ProjectPicker,
31205
31299
  {
31206
31300
  items: state.projectPicker.items,
@@ -31209,8 +31303,8 @@ ${content}
31209
31303
  hint: state.projectPicker.hint
31210
31304
  }
31211
31305
  ) : null,
31212
- state.fKeyPicker.open ? /* @__PURE__ */ jsx72(FKeyPicker, { selected: state.fKeyPicker.selected }) : null,
31213
- state.coordinator.monitorOpen ? /* @__PURE__ */ jsx72(
31306
+ state.fKeyPicker.open ? /* @__PURE__ */ jsx71(FKeyPicker, { selected: state.fKeyPicker.selected }) : null,
31307
+ state.coordinator.monitorOpen ? /* @__PURE__ */ jsx71(
31214
31308
  CoordinatorPanel,
31215
31309
  {
31216
31310
  coordinator: state.coordinator,
@@ -31218,7 +31312,7 @@ ${content}
31218
31312
  onClose: () => dispatch({ type: "toggleCoordinatorMonitor" })
31219
31313
  }
31220
31314
  ) : null,
31221
- state.auditPanelOpen ? /* @__PURE__ */ jsx72(
31315
+ state.auditPanelOpen ? /* @__PURE__ */ jsx71(
31222
31316
  AuditPanel,
31223
31317
  {
31224
31318
  sideEffects: agent.ctx.sideEffects ?? [],
@@ -31227,7 +31321,7 @@ ${content}
31227
31321
  ) : null,
31228
31322
  state.rewindOverlay ? (() => {
31229
31323
  const overlay = state.rewindOverlay;
31230
- return /* @__PURE__ */ jsx72(
31324
+ return /* @__PURE__ */ jsx71(
31231
31325
  CheckpointTimeline,
31232
31326
  {
31233
31327
  checkpoints: overlay.checkpoints,
@@ -31241,7 +31335,7 @@ ${content}
31241
31335
  }
31242
31336
  );
31243
31337
  })() : null,
31244
- state.brainPrompt ? /* @__PURE__ */ jsx72(Box, { flexDirection: "column", marginY: 1, flexShrink: 0, children: /* @__PURE__ */ jsx72(
31338
+ state.brainPrompt ? /* @__PURE__ */ jsx71(Box, { flexDirection: "column", marginY: 1, flexShrink: 0, children: /* @__PURE__ */ jsx71(
31245
31339
  BrainDecisionPrompt,
31246
31340
  {
31247
31341
  ...state.brainPrompt,
@@ -31260,7 +31354,7 @@ ${content}
31260
31354
  info.resolve(decision);
31261
31355
  dispatch({ type: "shellCommandWarningClose" });
31262
31356
  };
31263
- return /* @__PURE__ */ jsx72(ShellCommandWarning, { command: info.command, onDecision });
31357
+ return /* @__PURE__ */ jsx71(ShellCommandWarning, { command: info.command, onDecision });
31264
31358
  })() : null,
31265
31359
  state.confirmQueue.length > 0 && (() => {
31266
31360
  const head = expectDefined5(state.confirmQueue[0]);
@@ -31284,7 +31378,7 @@ ${content}
31284
31378
  head.resolve("yes");
31285
31379
  dispatch({ type: "confirmClose" });
31286
31380
  };
31287
- return /* @__PURE__ */ jsx72(
31381
+ return /* @__PURE__ */ jsx71(
31288
31382
  ConfirmPrompt,
31289
31383
  {
31290
31384
  toolName: head.toolName,
@@ -31297,7 +31391,7 @@ ${content}
31297
31391
  }
31298
31392
  );
31299
31393
  })(),
31300
- state.clearConfirm ? /* @__PURE__ */ jsx72(
31394
+ state.clearConfirm ? /* @__PURE__ */ jsx71(
31301
31395
  ClearConfirmPanel,
31302
31396
  {
31303
31397
  leaderActive: state.clearConfirm.leaderActive,
@@ -31305,21 +31399,21 @@ ${content}
31305
31399
  value: state.clearConfirm.value
31306
31400
  }
31307
31401
  ) : null,
31308
- state.exitConfirm ? /* @__PURE__ */ jsx72(
31402
+ state.exitConfirm ? /* @__PURE__ */ jsx71(
31309
31403
  ExitConfirmPanel,
31310
31404
  {
31311
31405
  leaderActive: state.exitConfirm.leaderActive,
31312
31406
  subagentCount: state.exitConfirm.subagentCount
31313
31407
  }
31314
31408
  ) : null,
31315
- state.slashConfirm ? /* @__PURE__ */ jsx72(
31409
+ state.slashConfirm ? /* @__PURE__ */ jsx71(
31316
31410
  SlashConfirmPanel,
31317
31411
  {
31318
31412
  question: state.slashConfirm.question,
31319
31413
  defaultYes: state.slashConfirm.defaultYes
31320
31414
  }
31321
31415
  ) : null,
31322
- state.escConfirm ? /* @__PURE__ */ jsx72(Box, { flexDirection: "column", marginY: 1, flexShrink: 0, children: /* @__PURE__ */ jsx72(
31416
+ state.escConfirm ? /* @__PURE__ */ jsx71(Box, { flexDirection: "column", marginY: 1, flexShrink: 0, children: /* @__PURE__ */ jsx71(
31323
31417
  EscConfirmPrompt,
31324
31418
  {
31325
31419
  runningTools: state.escConfirm.snapshot.runningTools,
@@ -31367,7 +31461,7 @@ ${content}
31367
31461
  resolved = true;
31368
31462
  info.resolve(decision);
31369
31463
  };
31370
- return /* @__PURE__ */ jsx72(
31464
+ return /* @__PURE__ */ jsx71(
31371
31465
  SendModePicker,
31372
31466
  {
31373
31467
  selected: info.selected,
@@ -31377,7 +31471,7 @@ ${content}
31377
31471
  }
31378
31472
  );
31379
31473
  })() : null,
31380
- state.enhanceBusy && !state.enhance ? /* @__PURE__ */ jsx72(
31474
+ state.enhanceBusy && !state.enhance ? /* @__PURE__ */ jsx71(
31381
31475
  RefiningPanel,
31382
31476
  {
31383
31477
  original: enhanceOriginalRef.current,
@@ -31396,7 +31490,7 @@ ${content}
31396
31490
  setEnhanceCountdown(null);
31397
31491
  info.resolve(decision);
31398
31492
  };
31399
- return /* @__PURE__ */ jsx72(
31493
+ return /* @__PURE__ */ jsx71(
31400
31494
  EnhancePanel,
31401
31495
  {
31402
31496
  original: info.original,
@@ -31420,7 +31514,7 @@ ${content}
31420
31514
  resolved = true;
31421
31515
  info.resolve(decision);
31422
31516
  };
31423
- return /* @__PURE__ */ jsx72(
31517
+ return /* @__PURE__ */ jsx71(
31424
31518
  RefineFailurePanel,
31425
31519
  {
31426
31520
  original: info.original,
@@ -31440,7 +31534,7 @@ ${content}
31440
31534
  resolved = true;
31441
31535
  info.resolve(decision);
31442
31536
  };
31443
- return /* @__PURE__ */ jsx72(
31537
+ return /* @__PURE__ */ jsx71(
31444
31538
  ContinueConfirmPanel,
31445
31539
  {
31446
31540
  label: info.label,
@@ -31452,7 +31546,7 @@ ${content}
31452
31546
  }
31453
31547
  );
31454
31548
  })() : null,
31455
- /* @__PURE__ */ jsx72(Box, { ref: statusBarWrapRef, flexDirection: "column", flexShrink: 0, children: /* @__PURE__ */ jsx72(
31549
+ /* @__PURE__ */ jsx71(Box, { ref: statusBarWrapRef, flexDirection: "column", flexShrink: 0, children: /* @__PURE__ */ jsx71(
31456
31550
  StatusBar,
31457
31551
  {
31458
31552
  provider: liveProvider,
@@ -31482,6 +31576,7 @@ ${content}
31482
31576
  context: contextWindow,
31483
31577
  estimatedContextTokens: currentContextTokens,
31484
31578
  superMemory: memoryRecordTotal === void 0 ? void 0 : { total: memoryRecordTotal, activeInContext: activeMemoryInContext },
31579
+ memoryContextMonitor,
31485
31580
  contextStrategy: getSettings ? getSettings().contextStrategy : void 0,
31486
31581
  brain: state.brain,
31487
31582
  projectName,
@@ -31511,8 +31606,7 @@ ${content}
31511
31606
  sideEffectCount: agent.ctx.sideEffects?.length ?? 0
31512
31607
  }
31513
31608
  ) }),
31514
- /* @__PURE__ */ jsx72(MemoryContextWidget, { state: memoryContextMonitor }),
31515
- /* @__PURE__ */ jsx72(
31609
+ /* @__PURE__ */ jsx71(
31516
31610
  MailboxPanel,
31517
31611
  {
31518
31612
  messages: mailboxMessages,
@@ -31521,9 +31615,9 @@ ${content}
31521
31615
  open: mailboxPanelOpen
31522
31616
  }
31523
31617
  ),
31524
- /* @__PURE__ */ jsxs71(Box, { ref: belowStatusBarRef, flexDirection: "column", flexShrink: 0, children: [
31525
- state.helpOpen ? /* @__PURE__ */ jsx72(HelpOverlay, {}) : null,
31526
- state.agentsMonitorOpen ? /* @__PURE__ */ jsx72(
31618
+ /* @__PURE__ */ jsxs70(Box, { ref: belowStatusBarRef, flexDirection: "column", flexShrink: 0, children: [
31619
+ state.helpOpen ? /* @__PURE__ */ jsx71(HelpOverlay, {}) : null,
31620
+ state.agentsMonitorOpen ? /* @__PURE__ */ jsx71(
31527
31621
  AgentsMonitor,
31528
31622
  {
31529
31623
  entries: entriesWithLeader,
@@ -31535,7 +31629,7 @@ ${content}
31535
31629
  transcripts: agentTranscripts,
31536
31630
  leaderTranscript: getLeaderTranscript
31537
31631
  }
31538
- ) : state.goalRun?.monitorOpen ? /* @__PURE__ */ jsx72(
31632
+ ) : state.goalRun?.monitorOpen ? /* @__PURE__ */ jsx71(
31539
31633
  PhaseMonitor,
31540
31634
  {
31541
31635
  phases: state.goalRun.phases,
@@ -31543,13 +31637,13 @@ ${content}
31543
31637
  elapsedMs: state.goalRun.elapsedMs,
31544
31638
  nowTick
31545
31639
  }
31546
- ) : state.sddBoard?.monitorOpen ? /* @__PURE__ */ jsx72(
31640
+ ) : state.sddBoard?.monitorOpen ? /* @__PURE__ */ jsx71(
31547
31641
  SddBoardOverlay,
31548
31642
  {
31549
31643
  snapshot: state.sddBoard.snapshot,
31550
31644
  focusColumn: state.sddBoard.focusColumn ?? null
31551
31645
  }
31552
- ) : state.worktreeMonitorOpen ? /* @__PURE__ */ jsx72(
31646
+ ) : state.worktreeMonitorOpen ? /* @__PURE__ */ jsx71(
31553
31647
  WorktreeMonitor,
31554
31648
  {
31555
31649
  worktrees: state.worktrees,
@@ -31557,7 +31651,7 @@ ${content}
31557
31651
  nowTick,
31558
31652
  onClose: () => dispatch({ type: "toggleWorktreeMonitor" })
31559
31653
  }
31560
- ) : state.todosMonitorOpen ? /* @__PURE__ */ jsx72(TodosMonitor, { todos: liveTodos }) : state.monitorOpen ? /* @__PURE__ */ jsx72(
31654
+ ) : state.todosMonitorOpen ? /* @__PURE__ */ jsx71(TodosMonitor, { todos: liveTodos }) : state.monitorOpen ? /* @__PURE__ */ jsx71(
31561
31655
  FleetMonitor,
31562
31656
  {
31563
31657
  entries: state.fleet,
@@ -31567,14 +31661,14 @@ ${content}
31567
31661
  nowTick,
31568
31662
  collabSession: state.collabSession
31569
31663
  }
31570
- ) : state.planPanelOpen ? /* @__PURE__ */ jsx72(
31664
+ ) : state.planPanelOpen ? /* @__PURE__ */ jsx71(
31571
31665
  PlanPanel,
31572
31666
  {
31573
31667
  projectRoot: agent.ctx.projectRoot,
31574
31668
  sessionId: agent.ctx.session?.id ?? null,
31575
31669
  onClose: () => dispatch({ type: "togglePlanPanel" })
31576
31670
  }
31577
- ) : state.kanbanPanelOpen ? /* @__PURE__ */ jsx72(
31671
+ ) : state.kanbanPanelOpen ? /* @__PURE__ */ jsx71(
31578
31672
  KanbanPanel,
31579
31673
  {
31580
31674
  projectRoot: agent.ctx.projectRoot,
@@ -31583,7 +31677,7 @@ ${content}
31583
31677
  onClose: () => dispatch({ type: "toggleKanbanPanel" }),
31584
31678
  initialBoardId: focusedBoardId ?? void 0
31585
31679
  }
31586
- ) : state.queuePanelOpen ? /* @__PURE__ */ jsx72(
31680
+ ) : state.queuePanelOpen ? /* @__PURE__ */ jsx71(
31587
31681
  QueuePanel,
31588
31682
  {
31589
31683
  items: state.queue,
@@ -31595,7 +31689,7 @@ ${content}
31595
31689
  },
31596
31690
  onToggleRefine: (pos) => dispatch({ type: "queueToggleRefine", position: pos })
31597
31691
  }
31598
- ) : state.processListOpen ? /* @__PURE__ */ jsx72(ProcessListMonitor, {}) : state.cronMonitorOpen ? /* @__PURE__ */ jsx72(CronJobsMonitor, { getCronJobs }) : state.goalPanelOpen ? /* @__PURE__ */ jsx72(
31692
+ ) : state.processListOpen ? /* @__PURE__ */ jsx71(ProcessListMonitor, {}) : state.cronMonitorOpen ? /* @__PURE__ */ jsx71(CronJobsMonitor, { getCronJobs }) : state.goalPanelOpen ? /* @__PURE__ */ jsx71(
31599
31693
  GoalPanel,
31600
31694
  {
31601
31695
  goal: state.goalSummary,
@@ -31603,14 +31697,14 @@ ${content}
31603
31697
  onCoordinatorStop: onCoordinatorStop ?? void 0,
31604
31698
  coordinatorRunning
31605
31699
  }
31606
- ) : state.goalKanbanPanelOpen ? /* @__PURE__ */ jsx72(
31700
+ ) : state.goalKanbanPanelOpen ? /* @__PURE__ */ jsx71(
31607
31701
  GoalKanbanPanel,
31608
31702
  {
31609
31703
  projectRoot,
31610
31704
  goal: state.goalSummary,
31611
31705
  onClose: () => dispatch({ type: "toggleGoalKanbanPanel" })
31612
31706
  }
31613
- ) : state.contextPanelOpen ? /* @__PURE__ */ jsx72(
31707
+ ) : state.contextPanelOpen ? /* @__PURE__ */ jsx71(
31614
31708
  ContextPanel,
31615
31709
  {
31616
31710
  data: {
@@ -31643,7 +31737,7 @@ ${content}
31643
31737
  },
31644
31738
  onClose: () => dispatch({ type: "toggleContextPanel" })
31645
31739
  }
31646
- ) : state.sessionsPanelOpen ? /* @__PURE__ */ jsx72(
31740
+ ) : state.sessionsPanelOpen ? /* @__PURE__ */ jsx71(
31647
31741
  SessionsPanel,
31648
31742
  {
31649
31743
  sessions: state.sessionsPanel.sessions,
@@ -31652,7 +31746,7 @@ ${content}
31652
31746
  resumeConfirm: state.sessionResumeConfirm ? { sessionName: state.sessionResumeConfirm.sessionName } : void 0,
31653
31747
  currentSessionId: agent.ctx.session?.id
31654
31748
  }
31655
- ) : director || hasVisibleFleetPanel || state.collabSession ? /* @__PURE__ */ jsx72(
31749
+ ) : director || hasVisibleFleetPanel || state.collabSession ? /* @__PURE__ */ jsx71(
31656
31750
  FleetPanel,
31657
31751
  {
31658
31752
  entries: entriesWithLeader,
@@ -31663,7 +31757,7 @@ ${content}
31663
31757
  collabSession: state.collabSession
31664
31758
  }
31665
31759
  ) : null,
31666
- state.goalRun && !lowerFunctionPanelOpen ? /* @__PURE__ */ jsx72(
31760
+ state.goalRun && !lowerFunctionPanelOpen ? /* @__PURE__ */ jsx71(
31667
31761
  PhasePanel,
31668
31762
  {
31669
31763
  phases: state.goalRun.phases,
@@ -31671,7 +31765,7 @@ ${content}
31671
31765
  nowTick
31672
31766
  }
31673
31767
  ) : null,
31674
- Object.keys(state.worktrees).length > 0 && !lowerFunctionPanelOpen ? /* @__PURE__ */ jsx72(WorktreePanel, { worktrees: state.worktrees, nowTick }) : null,
31768
+ Object.keys(state.worktrees).length > 0 && !lowerFunctionPanelOpen ? /* @__PURE__ */ jsx71(WorktreePanel, { worktrees: state.worktrees, nowTick }) : null,
31675
31769
  (() => {
31676
31770
  const anyMonitorOpen = state.agentsMonitorOpen || (state.goalRun?.monitorOpen ?? false) || state.worktreeMonitorOpen || state.todosMonitorOpen || state.monitorOpen || state.processListOpen || state.queuePanelOpen || state.goalPanelOpen || state.contextPanelOpen;
31677
31771
  let nextPanelHint;
@@ -31690,7 +31784,7 @@ ${content}
31690
31784
  picker: state.settingsPicker.open || state.modelPicker.open || state.autonomyPicker.open || state.designPicker.open,
31691
31785
  nextPanelHint
31692
31786
  };
31693
- return /* @__PURE__ */ jsx72(KeyHintBar, { context: ctx });
31787
+ return /* @__PURE__ */ jsx71(KeyHintBar, { context: ctx });
31694
31788
  })()
31695
31789
  ] })
31696
31790
  ] })