@0perator/operator 0.1.157 → 0.1.158

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ Operator is AXE's terminal coding agent (npm `@0perator/operator`), running on A
4
4
  Newest first. Every release bumps `src/cli.tsx` VERSION + `package.json`, adds an entry here, and ships to
5
5
  npm + both git remotes (memjar/kode, axetechnologies/kode). Test counts are the full suite at that release.
6
6
 
7
+ ## 0.1.158 — 2026-09-29 — fix: TUI capability-detection review findings
8
+ - Adversarial review of the 0.1.156 TUI foundation surfaced real gaps, now fixed: (1) `truecolor` was
9
+ conflated with the graphics-protocol flag, under-detecting VS Code/Warp/Hyper/Tabby — split into an
10
+ independent per-terminal field; (2) `tmux` was detected but never consumed — now gates `graphics` OFF
11
+ under tmux (inline images break without allow-passthrough); (3) Alacritty `osc8` was stale-false → true
12
+ (shipped in v0.13, 2024); (4) `mouse` no longer requires a non-empty `TERM` (isTTY already excludes
13
+ non-terminals; SGR mouse is universal); (5) `hyperlinkHint` doc corrected to inline-boot-only. Tests
14
+ +7 (truecolor independence, tmux gate, all known terminals, case-insensitivity, `caps()` caching,
15
+ empty-env). Suite 719 green. Also indexed the sandbox + TUI docs in `_ai-docs` (kiyoko).
16
+
7
17
  ## 0.1.157 — 2026-09-29 — remote: RC auto-start default ON for every session
8
18
  - `rcAutostart()` no longer gates on the admin tier — **every Operator session self-hosts Remote Control
9
19
  by default**, so mobile SessionsView + the desktop RemotePane attach with no config ("default on for
@@ -7,19 +7,20 @@
7
7
  // feature misbehave, a false "unsupported" only forgoes a nicety. OSC 8 hyperlinks in particular
8
8
  // DEGRADE safely everywhere (osc.ts already emits them; an unsupporting terminal shows the label), so
9
9
  // `osc8` here drives HINTS/affordances, not whether links are emitted.
10
- // Known emulators keyed by the lowercased TERM_PROGRAM value, with a display name and whether they
11
- // honor OSC 8 clicks. Apple_Terminal is the notable OSC-8 holdout among common macOS terminals.
10
+ // Known emulators keyed by the lowercased TERM_PROGRAM value. `osc8`/`graphics`/`truecolor` are tracked
11
+ // INDEPENDENTLY — a terminal can do 24-bit color without an inline-image protocol (e.g. VS Code, Warp).
12
+ // Apple_Terminal is the notable holdout: no OSC 8, no truecolor (256-color only).
12
13
  const KNOWN = {
13
- "iterm.app": { name: "iTerm2", osc8: true, graphics: true },
14
- "apple_terminal": { name: "Terminal.app", osc8: false, graphics: false },
15
- "ghostty": { name: "Ghostty", osc8: true, graphics: true },
16
- "wezterm": { name: "WezTerm", osc8: true, graphics: true },
17
- "vscode": { name: "VS Code", osc8: true, graphics: false },
18
- "hyper": { name: "Hyper", osc8: true, graphics: false },
19
- "tabby": { name: "Tabby", osc8: true, graphics: false },
20
- "rio": { name: "Rio", osc8: true, graphics: true },
21
- "warpterminal": { name: "Warp", osc8: true, graphics: false },
22
- "alacritty": { name: "Alacritty", osc8: false, graphics: false }, // OSC 8 landed only very recently; treat as no
14
+ "iterm.app": { name: "iTerm2", osc8: true, graphics: true, truecolor: true },
15
+ "apple_terminal": { name: "Terminal.app", osc8: false, graphics: false, truecolor: false },
16
+ "ghostty": { name: "Ghostty", osc8: true, graphics: true, truecolor: true },
17
+ "wezterm": { name: "WezTerm", osc8: true, graphics: true, truecolor: true },
18
+ "vscode": { name: "VS Code", osc8: true, graphics: false, truecolor: true },
19
+ "hyper": { name: "Hyper", osc8: true, graphics: false, truecolor: true },
20
+ "tabby": { name: "Tabby", osc8: true, graphics: false, truecolor: true },
21
+ "rio": { name: "Rio", osc8: true, graphics: true, truecolor: true },
22
+ "warpterminal": { name: "Warp", osc8: true, graphics: false, truecolor: true },
23
+ "alacritty": { name: "Alacritty", osc8: true, graphics: false, truecolor: true }, // OSC 8 since v0.13 (2024)
23
24
  };
24
25
  /** Pure detection from an explicit env + TTY flag. Exported for unit tests; production reads via caps(). */
25
26
  export function detectCaps(env, isTTY) {
@@ -33,12 +34,15 @@ export function detectCaps(env, isTTY) {
33
34
  const name = known?.name ?? (isKitty ? "Kitty" : tp || term || "terminal");
34
35
  // OSC 8: a known-supporting emulator, or Kitty. Unknown terminals → false for HINTS only (links are
35
36
  // still emitted by osc.ts and degrade to the label). Non-TTY is never "supported".
36
- const osc8 = isTTY && (known?.osc8 ?? isKitty ?? false) === true;
37
- const truecolor = isTTY && (colorterm === "truecolor" || colorterm === "24bit" || isKitty || known?.graphics === true);
37
+ const osc8 = isTTY && (known?.osc8 ?? isKitty);
38
+ // Truecolor is INDEPENDENT of graphics: COLORTERM wins, else the per-terminal flag, else Kitty.
39
+ const truecolor = isTTY && (colorterm === "truecolor" || colorterm === "24bit" || isKitty || known?.truecolor === true);
38
40
  // SGR mouse reporting is universal on modern terminals; the only real exclusions are non-TTY and
39
41
  // the legacy dumb terminal. We stay permissive here and gate mouse USE on `fullscreen` + this flag.
40
- const mouse = isTTY && term !== "dumb" && term !== "";
41
- const graphics = isTTY && (isKitty || known?.graphics === true);
42
+ const mouse = isTTY && term !== "dumb"; // isTTY already excludes non-terminals; SGR mouse is universal otherwise
43
+ // Inline-image protocols break under tmux without `allow-passthrough` (murky to detect), so gate
44
+ // graphics OFF inside tmux — the one place the tmux flag is actually consumed (matches the doc above).
45
+ const graphics = isTTY && !tmux && (isKitty || known?.graphics === true);
42
46
  return { isTTY, termProgram: tp, termName: name, osc8, truecolor, mouse, graphics, tmux };
43
47
  }
44
48
  let _caps = null;
@@ -51,7 +55,8 @@ export function caps() {
51
55
  }
52
56
  /** One-line hint when the current terminal won't render clickable links — so the owner knows switching
53
57
  * to iTerm2/Ghostty/Kitty/WezTerm makes URLs + artifact links clickable. Empty string when links work
54
- * (or output isn't a TTY). Shown once at boot by the CLI, never mid-stream. */
58
+ * (or output isn't a TTY). Printed once after the INLINE boot masthead (cli.tsx); fullscreen/alt-screen
59
+ * sessions skip it here — they'll surface it via the status rule with the Phase 1 mouse-layer work. */
55
60
  export function hyperlinkHint(c = caps()) {
56
61
  if (!c.isTTY || c.osc8)
57
62
  return "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0perator/operator",
3
- "version": "0.1.157",
3
+ "version": "0.1.158",
4
4
  "description": "Operator (KODE) — TypeScript + Ink terminal coding agent. Full-frame render, single-engine core shared across CLI/web/mobile; runs against a local Aurora model.",
5
5
  "type": "module",
6
6
  "bin": {