omegon 0.6.25 → 0.6.27

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.
@@ -471,8 +471,9 @@ function restartOmegon(): never {
471
471
  "done",
472
472
  // Extra grace period for fd/terminal release
473
473
  "sleep 0.2",
474
- // Reset terminal to sane cooked state (stty sane is sufficient;
475
- // avoid printf '\\033c' which nukes scrollback history)
474
+ // Pop kitty keyboard protocol and bracketed paste before resetting
475
+ // stty sane only resets line discipline, not terminal protocol state
476
+ "printf '\\033[<u\\033[>4;0m\\033[?2004l' 2>/dev/null",
476
477
  "stty sane 2>/dev/null",
477
478
  // Clean up this script
478
479
  `rm -f "${script}"`,
@@ -483,6 +484,15 @@ function restartOmegon(): never {
483
484
  // Reset terminal to cooked mode BEFORE exiting so the restart script
484
485
  // (and the user) aren't stuck with raw-mode terminal if something goes wrong.
485
486
  try {
487
+ // Pop kitty keyboard protocol and disable bracketed paste BEFORE
488
+ // releasing raw mode — the terminal needs these escape sequences to
489
+ // stop encoding keystrokes in CSI-u format. Without this, the restart
490
+ // script (and any keystrokes during the wait) dump raw kitty sequences.
491
+ process.stdout.write(
492
+ "\x1b[<u" + // Pop kitty keyboard protocol flags
493
+ "\x1b[>4;0m" + // Disable modifyOtherKeys
494
+ "\x1b[?2004l" // Disable bracketed paste
495
+ );
486
496
  if (process.stdin.isTTY && typeof process.stdin.setRawMode === "function") {
487
497
  process.stdin.setRawMode(false);
488
498
  }
@@ -92,7 +92,7 @@ const CLEAVE_STALE_MS = 30_000;
92
92
  /** Recovery notices auto-suppress in compact mode after this many ms with no new error. */
93
93
  const RECOVERY_STALE_MS = 45_000;
94
94
  const RAISED_NARROW_WIDTH = 100;
95
- const RAISED_WIDE_WIDTH = 140;
95
+ const RAISED_WIDE_WIDTH = 160;
96
96
 
97
97
  type PrioritySegment = {
98
98
  text: string;
@@ -810,24 +810,28 @@ export class DashboardFooter implements Component {
810
810
 
811
811
  private formatModelTopologyLine(summary: DashboardModelRoleSummary, width: number, compact = false): string {
812
812
  const theme = this.theme;
813
- const sourceBadge = summary.source === "local"
814
- ? theme.fg("accent", "local")
815
- : summary.source === "cloud"
816
- ? theme.fg("muted", "cloud")
817
- : theme.fg("dim", summary.source);
818
- const stateBadge = summary.state === "active"
819
- ? theme.fg("success", "active")
820
- : summary.state === "offline"
821
- ? theme.fg("warning", "offline")
822
- : summary.state === "fallback"
823
- ? theme.fg("warning", "fallback")
824
- : theme.fg("dim", summary.state);
813
+ // In compact mode, use single-char glyphs to save space
814
+ const sourceBadge = compact
815
+ ? (summary.source === "local" ? theme.fg("accent", "⌂") : summary.source === "cloud" ? theme.fg("muted", "☁") : theme.fg("dim", "?"))
816
+ : (summary.source === "local"
817
+ ? theme.fg("accent", "local")
818
+ : summary.source === "cloud"
819
+ ? theme.fg("muted", "cloud")
820
+ : theme.fg("dim", summary.source));
821
+ const stateBadge = compact
822
+ ? "" // state is implicit in compact mode — icon color carries meaning
823
+ : (summary.state === "active"
824
+ ? theme.fg("success", "active")
825
+ : summary.state === "offline"
826
+ ? theme.fg("warning", "offline")
827
+ : summary.state === "fallback"
828
+ ? theme.fg("warning", "fallback")
829
+ : theme.fg("dim", summary.state));
825
830
  const normalized = normalizeLocalModelLabel(summary.model);
826
- const alias = normalized.alias ? theme.fg("dim", `alias ${normalized.alias}`) : "";
827
- const primary = compact
828
- ? `${theme.fg("accent", summary.label)} ${theme.fg("muted", normalized.canonical)}`
829
- : `${theme.fg("accent", summary.label)} ${theme.fg("dim", "·")} ${theme.fg("muted", normalized.canonical)}`;
830
- return truncateToWidth(composePrimaryMetaLine(width, primary, [sourceBadge, stateBadge, summary.detail ? theme.fg("dim", summary.detail) : "", alias]), width, "…");
831
+ const alias = compact ? "" : (normalized.alias ? theme.fg("dim", `alias ${normalized.alias}`) : "");
832
+ const sep = compact ? " " : ` ${theme.fg("dim", "·")} `;
833
+ const primary = `${theme.fg("accent", summary.label)}${sep}${theme.fg("muted", normalized.canonical)}`;
834
+ return truncateToWidth(composePrimaryMetaLine(width, primary, [sourceBadge, stateBadge, summary.detail ? theme.fg("dim", summary.detail) : "", alias].filter(Boolean)), width, "…");
831
835
  }
832
836
 
833
837
  private buildSummaryCard(title: string, lines: string[], width: number): string[] {
@@ -841,7 +845,7 @@ export class DashboardFooter implements Component {
841
845
  const contextCard = this.buildSummaryCard("context", this.buildHudContextLines(Math.max(1, width - 2)).map((l) => l.trimStart()), width);
842
846
  const modelCard = this.buildSummaryCard(
843
847
  "models",
844
- this.buildModelTopologySummaries().map((s) => this.formatModelTopologyLine(s, Math.max(1, width - 2), width < 70)),
848
+ this.buildModelTopologySummaries().map((s) => this.formatModelTopologyLine(s, Math.max(1, width - 2), width < 120)),
845
849
  width,
846
850
  );
847
851
  const memoryCard = this.buildSummaryCard("memory", (() => {
@@ -862,6 +866,7 @@ export class DashboardFooter implements Component {
862
866
  }
863
867
 
864
868
  if (width < RAISED_WIDE_WIDTH) {
869
+ // Two columns: context+memory on left, models+system on right
865
870
  const left = [...contextCard, ...memoryCard];
866
871
  const right = [...modelCard, ...(recoveryCard.length > 0 ? recoveryCard : []), ...systemCard];
867
872
  const colWidth = Math.floor((width - 1) / 2);
@@ -869,19 +874,16 @@ export class DashboardFooter implements Component {
869
874
  return mergeColumns(left, right, colWidth, rightWidth, this.theme.fg("dim", BOX.v));
870
875
  }
871
876
 
872
- const cards = [contextCard, modelCard, memoryCard, recoveryCard.length > 0 ? recoveryCard : systemCard];
873
- const totalCols = cards.length;
874
- const colWidth = Math.floor((width - (totalCols - 1)) / totalCols);
877
+ // Wide: three columns context+memory | models | system+recovery
878
+ // Gives each column ~50 chars at 160 cols, enough to avoid truncation.
879
+ const leftCard = [...contextCard, ...memoryCard];
880
+ const midCard = modelCard;
881
+ const rightCard = [...(recoveryCard.length > 0 ? recoveryCard : []), ...systemCard];
882
+ const colW = Math.floor((width - 2) / 3);
883
+ const lastColW = width - colW * 2 - 2;
875
884
  const divider = this.theme.fg("dim", BOX.v);
876
- let merged = cards[0] ?? [];
877
- let usedWidth = colWidth;
878
- for (let i = 1; i < cards.length; i++) {
879
- const remainingCols = totalCols - i;
880
- const nextWidth = i === cards.length - 1 ? width - usedWidth - 1 : colWidth;
881
- merged = mergeColumns(merged, cards[i] ?? [], usedWidth, nextWidth, divider);
882
- usedWidth += 1 + nextWidth;
883
- }
884
- return merged;
885
+ const leftMid = mergeColumns(leftCard, midCard, colW, colW, divider);
886
+ return mergeColumns(leftMid, rightCard, colW * 2 + 1, lastColW, divider);
885
887
  }
886
888
 
887
889
  // ── Section builders (shared by stacked + wide layouts) ───────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omegon",
3
- "version": "0.6.25",
3
+ "version": "0.6.27",
4
4
  "description": "Omegon — an opinionated distribution of pi (by Mario Zechner) with extensions for lifecycle management, memory, orchestration, and visualization",
5
5
  "bin": {
6
6
  "omegon": "bin/omegon.mjs",