Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.
TypeScript browser-shellcontrol-planefile-managerhomelabmobile-firstnextjsptyreactself-hostedserver-managementshadcn-uisysadmintailwindcssterminaltypescriptvpsweb-desktopweb-terminal
fix(agent): stabilize terminal banner navigation
Rahmana425dfbad0a4
diff --git a/bin/mso b/bin/msoindex e14f5340..e511af2f 100755--- a/bin/mso+++ b/bin/mso@@ -126,7 +126,7 @@# Docs: https://github.com/rahmanef63/msoset -euo pipefail-VERSION="1.5.3"+VERSION="1.5.4"ROOT="$(cd "$(dirname "$(readlink -f "$0")")/.." && pwd)"die() { echo "mso: $*" >&2; exit 1; }diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.mdindex 5101e5b2..c15261a2 100644--- a/docs/CHANGELOG.md+++ b/docs/CHANGELOG.md@@ -17,6 +17,7 @@ this is the *what*, and it is what Settings → About shows as “What's new”.**Fixed**+- `agent` stabilize terminal banner navigation- `cli` make updates visible and idempotent- `mcp` preserve app-only workflow status schemadiff --git a/docs/PROGRESS.md b/docs/PROGRESS.mdindex 7e54e386..ce53383c 100644--- a/docs/PROGRESS.md+++ b/docs/PROGRESS.md@@ -2,6 +2,10 @@Running log of what shipped each phase. Newest at top.+## 2026-09-01 — Terminal banner geometry + stable slash navigation — SHIPPED++MSO Agent now uses the compact canonical folder + `MSO` ASCII geometry from the terminal logger instead of the oversized 12-row title. The seven title rows render as a cool blue → cyan → teal/emerald gradient with no purple. The slash palette also reserves its physical terminal rows only when it opens or grows; subsequent `↑/↓` selection redraws use ANSI cursor movement only, and the input prompt no longer embeds a leading newline that would be replayed on every redraw. A real PTY regression verifies both arrow directions emit zero LF/CRLF while still moving selection, so terminal scrollback stays stable. CLI patch version: **1.5.4**.+## 2026-09-01 — Install/update DX and legacy upgrade bridge — SHIPPEDThe public installation contract is now explicitly agent-friendly and backward-compatible. A user may@@ -39,10 +43,9 @@ What changed:- Cloudflare automation never performs a bulk zone PUT, refuses duplicate/conflicting rows, PATCHes one existing record or POSTs one new record, and defaults proxying off. Hostinger DNS now uses the provider's scoped RR-set replacement semantics (`overwrite:true` with one `name + type` row), so unrelated zone rows never enter the PUT payload; ambiguity/conflicts remain refused and the mutation stays approval-gated;- official `mso-project-deploy` skill documents workflow start → inspect → provider doctor → bounded deployment/DNS operations → runtime/HTTPS verification → finish/cancel;- MSO Agent slash skills are now executable: `/<skill>` selects a trusted global/current-project skill for the next message, `/<skill> <prompt>` runs immediately, `/skill <exact-id>` resolves cross-project ambiguity, and Tab completion only offers skills valid in the current scope; project skills follow the terminal working directory while untrusted instructions remain withheld;-- terminal title art now uses a stable two-space gutter so the blue MSO icon is not flush against the terminal edge;-- the first MSO folder-title row now carries the same internal two-space inset as the folder body, and the terminal composer now opens a Hermes-style slash dropdown immediately on `/`, with live filtering, fixed 8-row viewport, ↑/↓ navigation, Enter/Tab selection, Esc dismissal, command metadata, and trusted current-project/global skill recommendations;+- the terminal composer opens a Hermes-style slash dropdown immediately on `/`, with live filtering, fixed 8-row viewport, Enter/Tab selection, Esc dismissal, command metadata, and trusted current-project/global skill recommendations;- `mso update` now short-circuits when source and active runtime already match, avoiding redundant production rebuilds; when a real service update is needed, an interactive terminal waits and prints update milestones until the new runtime is verified instead of immediately returning with only a log hint;-- CLI version for this interaction milestone is **1.5.3**. `docs/INFRASTRUCTURE-PROVIDERS.md`, architecture/install/MCP/ChatGPT connector docs, generated CLI reference and slice catalog are synchronized.+- CLI version for this interaction milestone is **1.5.4**. `docs/INFRASTRUCTURE-PROVIDERS.md`, architecture/install/MCP/ChatGPT connector docs, generated CLI reference and slice catalog are synchronized.Verification added specifically for this slice covers provider-store symlink/permission/secret behavior, Cloudflare one-record semantics, Hostinger exact RR-set payloads, Owner-only agent/provider routes, exact-payload terminal approval, CLI onboarding/update fixtures, MCP parity/rate limits, and documentation/toolset markers. The final full repository gate passes with **254 test files / 1,918 passing tests** (1 expected fail, 4 skipped), typecheck and dependency audit green, zero value cycles, and zero lint errors (six pre-existing max-lines warnings remain). A targeted Codex Security pass first found two Medium issues in the new infrastructure surface — whole-response buffering before its nominal 1 MiB cap and a stale full-zone Hostinger PUT. Both were fixed; the final infrastructure re-scan completed **1/1 component with 0 findings**. A separate terminal-agent scan found one Medium issue where a truncated approval preview could conceal mutation fields. The terminal now renders the complete canonical tool name + nested input, refuses approval payloads above 32 KiB, removes session-wide mutation grants, and binds the approval SHA-256 to the exact payload that the server independently re-hashes before dispatch; the final terminal-agent re-scan completed **1/1 component with 0 findings**. A parallel-suite-only lifecycle harness race was also removed by holding the fixture lock until the assertion explicitly releases it; the lifecycle file then passed 5 consecutive runs (40/40 checks). The first production handoff also exposed a release-verification false negative: the system unit can spend close to its 90 s `TimeoutStopSec` draining the old npm/Next control group, while the finalizer only waited 40 s for a new MainPID. Production still reached the gated release SHA, and the verifier now uses a bounded 120 s default restart budget (override constrained to 30–300 s) so a valid slow systemd restart is not reported as rollback. Live Dokploy/Cloudflare/Hostinger API success is intentionally not claimed until an owner supplies credentials and `mso provider doctor` checks that provider.diff --git a/scripts/mso-agent-composer.mjs b/scripts/mso-agent-composer.mjsindex e8ed619b..0cf8cbcf 100644--- a/scripts/mso-agent-composer.mjs+++ b/scripts/mso-agent-composer.mjs@@ -80,28 +80,36 @@ export class AgentComposer {if (this.closed) return null;const input = this.input, output = this.output, C = this.C;return new Promise((resolve) => {- let value = "", cursor = 0, selected = 0, previousMenuRows = 0;+ let value = "", cursor = 0, selected = 0, reservedMenuRows = 0;let dismissed = false, historyIndex = null, draft = "";const wasRaw = Boolean(input.isRaw);const matches = () => dismissed || !complete ? [] : complete(value) || [];+ // Reserve physical rows only when the dropdown first grows. Selection changes then+ // redraw with cursor movement only — no LF/CRLF — so ↑/↓ never create scrollback rows.+ const reserve = (rows) => {+ if (rows <= reservedMenuRows) return;+ if (reservedMenuRows) output.write(CURSOR_DOWN(reservedMenuRows));+ for (let i = reservedMenuRows; i < rows; i++) output.write("\r\n");+ output.write(`${CURSOR_UP(rows)}\r`);+ reservedMenuRows = rows;+ };const erase = () => {output.write(`\r${CLEAR_LINE}`);- for (let i = 0; i < previousMenuRows; i++) output.write(`${CURSOR_DOWN(1)}\r${CLEAR_LINE}`);- if (previousMenuRows) output.write(`${CURSOR_UP(previousMenuRows)}\r`);- previousMenuRows = 0;+ for (let i = 0; i < reservedMenuRows; i++) output.write(`${CURSOR_DOWN(1)}\r${CLEAR_LINE}`);+ if (reservedMenuRows) output.write(`${CURSOR_UP(reservedMenuRows)}\r`);};const render = () => {- erase();const maxInput = Math.max(8, Number(output.columns || 100) - width(prompt) - 2);const viewport = inputViewport(value, cursor, maxInput);const items = matches();selected = items.length ? clamp(selected, 0, items.length - 1) : 0;const menu = menuLines(items, selected, output.columns, C);+ reserve(menu.length);+ erase();output.write(`${prompt}${viewport.display}`);- for (const row of menu) output.write(`\r\n${row}`);- previousMenuRows = menu.length;- if (previousMenuRows) output.write(CURSOR_UP(previousMenuRows));+ for (const row of menu) output.write(`${CURSOR_DOWN(1)}\r${CLEAR_LINE}${row}`);+ if (menu.length) output.write(CURSOR_UP(menu.length));output.write(`\r${CURSOR_RIGHT(width(prompt) + viewport.cursor)}`);};const cleanup = () => {diff --git a/scripts/mso-agent-composer.test.ts b/scripts/mso-agent-composer.test.tsindex 1482fc8c..32467b5e 100644--- a/scripts/mso-agent-composer.test.ts+++ b/scripts/mso-agent-composer.test.ts@@ -1,5 +1,6 @@+import { EventEmitter } from "node:events";import { describe, expect, it } from "vitest";-import { completionWindow, inputViewport } from "./mso-agent-composer.mjs";+import { AgentComposer, completionWindow, inputViewport } from "./mso-agent-composer.mjs";describe("MSO Agent interactive composer primitives", () => {it("keeps a fixed completion viewport centered near the selected row", () => {@@ -21,4 +22,47 @@ describe("MSO Agent interactive composer primitives", () => {expect(Array.from(atStart.display).length).toBeLessThanOrEqual(10);expect(atStart.cursor).toBe(0);});+ it("redraws arrow-key selection in place without emitting new lines", async () => {+ class FakeInput extends EventEmitter {+ isRaw = false;+ resume() {}+ pause() {}+ setRawMode(value: boolean) { this.isRaw = value; }+ }+ class FakeOutput {+ columns = 88;+ chunks: string[] = [];+ write(value: string) { this.chunks.push(String(value)); return true; }+ }+ const input = new FakeInput();+ const output = new FakeOutput();+ const colors = { blue: "", bold: "", reset: "", dim: "" };+ const composer = new AgentComposer({ input: input as never, output: output as never, colors });+ const answer = composer.question("› ", {+ complete: (value: string) => value.startsWith("/") ? [+ { text: "/help", meta: "help" },+ { text: "/model", meta: "model" },+ { text: "/skills", meta: "skills" },+ ] : [],+ } as never);++ input.emit("keypress", "/", { name: "/", sequence: "/" });+ const beforeDown = output.chunks.length;+ input.emit("keypress", undefined, { name: "down", sequence: "ESC-DOWN" });+ const downRedraw = output.chunks.slice(beforeDown).join("");+ expect(downRedraw).not.toContain("\n");+ expect(downRedraw).toContain("/model");++ const beforeUp = output.chunks.length;+ input.emit("keypress", undefined, { name: "up", sequence: "ESC-UP" });+ const upRedraw = output.chunks.slice(beforeUp).join("");+ expect(upRedraw).not.toContain("\n");+ expect(upRedraw).toContain("/help");++ input.emit("keypress", undefined, { ctrl: true, name: "c" });+ input.emit("keypress", undefined, { ctrl: true, name: "c" });+ await answer;+ composer.close();+ });+});diff --git a/scripts/mso-agent-contract.test.ts b/scripts/mso-agent-contract.test.tsindex 8342f583..0561be75 100644--- a/scripts/mso-agent-contract.test.ts+++ b/scripts/mso-agent-contract.test.ts@@ -7,13 +7,16 @@ const src = files.map((file) => fs.readFileSync(file, "utf8")).join("\n");describe("MSO terminal agent contract", () => {it("renders the final blue MSO Agent title art and setup/session shortcuts", () => {- expect(src).toContain("████████████");- expect(src).toContain(" ██ ██ ██ ██ ██████████████████████");- expect(src).toContain("███╗ ███╗███████╗ ██████╗");- expect(src).toContain("── MSO Agent ──");+ expect(src).toContain("████████╗ ███╗ ███╗███████╗ ██████╗ ");+ expect(src).toContain("██╔═╦═╦═╝████████████████╗ ████╗ ████║██╔════╝██╔═══██╗");+ expect(src).toContain("██║ > _ > ██║ ██║╚██╔╝██║╚════██║██║ ██║");+ expect(src).toContain("╚████████████████████████╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ");+ expect(src).toContain(" ── MSO Agent ──");expect(src).toContain("MSO_TITLE_ART");- expect(src).toContain("MSO_TITLE_GUTTER");- expect(src).toContain(" ████████████");+ expect(src).toContain("MSO_TITLE_COLORS");+ expect(src).toContain("38;2;69;142;255");+ expect(src).toContain("38;2;46;229;157");+ expect(src).not.toContain("MSO_TITLE_GUTTER");expect(src).not.toContain("╭──┘ ╰────────╮");for (const command of ["/model", "/setup", "/providers", "/provider", "/doctor", "/tools", "/skills", "/skill", "/<skill>", "/session", "/sessions", "/resume", "/clear", "/exit"]) expect(src).toContain(command);expect(src).toContain("selected for the next message");diff --git a/scripts/mso-agent-ui.mjs b/scripts/mso-agent-ui.mjsindex 8edb8979..61f9499e 100644--- a/scripts/mso-agent-ui.mjs+++ b/scripts/mso-agent-ui.mjs@@ -10,23 +10,27 @@ C.a = C.blue;C.b = C.blue;C.c = C.cyan;-export const MSO_TITLE_GUTTER = " ";-export const MSO_TITLE_ART = [- " ████████████",- " ██ ██",- " ██ ██ ██ ██ ██████████████████████",- " ██ ██ ███╗ ███╗███████╗ ██████╗ ",- " ██ ██ ████╗ ████║██╔════╝██╔═══██╗",- " ██ ██ ██ ██ ██╔████╔██║███████╗██║ ██║",- " ██ ██ ██ ██ ██║╚██╔╝██║╚════██║██║ ██║",- " ██ ██ ████████ ██ ██ ██║ ╚═╝ ██║███████║╚██████╔╝",- " ██ ██ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ",- " ██ ██",- " ████████████████████████████████████",- " ── MSO Agent ──",+ "████████╗ ███╗ ███╗███████╗ ██████╗ ",+ "██╔═╦═╦═╝████████████████╗ ████╗ ████║██╔════╝██╔═══██╗",+ "██║ ╚═╩═╝ ██║ ██╔████╔██║███████╗██║ ██║",+ "██║ > _ > ██║ ██║╚██╔╝██║╚════██║██║ ██║",+ "██║ ██║ ██║ ╚═╝ ██║███████║╚██████╔╝",+ "╚████████████████████████╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ",+ " ── MSO Agent ── ",];+// Blue → cyan → teal/emerald. No purple: the title should read as one cool MSO gradient.+export const MSO_TITLE_COLORS = color ? [+ "\x1b[38;2;69;142;255m",+ "\x1b[38;2;58;160;255m",+ "\x1b[38;2;45;184;255m",+ "\x1b[38;2;34;211;238m",+ "\x1b[38;2;32;201;176m",+ "\x1b[38;2;46;229;157m",+ "\x1b[38;2;46;229;157m",+] : MSO_TITLE_ART.map(() => "");+function plain(value) { return String(value ?? "").replace(/\x1b\[[0-9;]*m/g, ""); }function width(value) { return [...plain(value)].length; }export function fit(value, max) {@@ -96,9 +100,9 @@ function panelTitle(title, inner) {export function printAgentBanner(s, agentSession, { base, version }) {const totalWidth = terminalWidth();const inner = totalWidth - 2;- const titleArtWidth = width(MSO_TITLE_GUTTER) + Math.max(...MSO_TITLE_ART.map(width));+ const titleArtWidth = Math.max(...MSO_TITLE_ART.map(width));if (totalWidth >= titleArtWidth) {- for (const line of MSO_TITLE_ART) console.log(`${C.blue}${C.bold}${MSO_TITLE_GUTTER}${line}${C.reset}`);+ MSO_TITLE_ART.forEach((line, index) => console.log(`${MSO_TITLE_COLORS[index]}${C.bold}${line}${C.reset}`));} else console.log(`${C.blue}${C.bold}── MSO Agent ──${C.reset}`);console.log();diff --git a/scripts/mso-agent.mjs b/scripts/mso-agent.mjsindex 0d27fd2b..ad53e990 100644--- a/scripts/mso-agent.mjs+++ b/scripts/mso-agent.mjs@@ -194,7 +194,8 @@ async function main() {while (true) {let line = "";try {- const answer = await rl.question(`\n${C.blue}${C.bold}›${C.reset} `, { complete: completeSlash });+ console.log();+ const answer = await rl.question(`${C.blue}${C.bold}›${C.reset} `, { complete: completeSlash });if (answer === null) break;line = answer.trim();} catch { break; }