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
refactor: remove unused symbols and enforce compiler checks
Rahmanfad9957e00b8
diff --git a/app/os-root.tsx b/app/os-root.tsxindex 7358d750..6d951690 100644--- a/app/os-root.tsx+++ b/app/os-root.tsx@@ -1,7 +1,7 @@"use client";import { useMemo } from "react";-import { AppShell, type AppDescriptor, type ShellManifest } from "@/features/appshell";+import { AppShell, type ShellManifest } from "@/features/appshell";import {A11yCommands,TOPSIDE_BRAND,diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.mdindex c927b267..49e540c8 100644--- a/docs/CHANGELOG.md+++ b/docs/CHANGELOG.md@@ -10,6 +10,10 @@ this is the *what*, and it is what Settings → About shows as “What's new”.- `security` harden share audit and release verification+**Changed**++- remove unused symbols and enforce compiler checks+## 2026-09-04**Added**diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.mdindex 24a6ea69..c1d77c07 100644--- a/docs/DEVELOPMENT.md+++ b/docs/DEVELOPMENT.md@@ -22,6 +22,8 @@ Every feature is a self-contained **vertical slice** under `frontend/slices/<slu## Quality gates+TypeScript enforces `noUnusedLocals` and `noUnusedParameters`. Remove genuinely unused imports/declarations; keep required side effects and use an explicit `_` prefix only for positional interface/callback arguments.+```bashbun run verify # full repository quality gatebun run test:features # one process per area; exit 2 means skipped/incomplete evidencediff --git a/docs/PROGRESS.md b/docs/PROGRESS.mdindex 6779a017..81502c4f 100644--- a/docs/PROGRESS.md+++ b/docs/PROGRESS.md@@ -1,4 +1,5 @@# mso — Progress Log+- **Compiler-enforced unused-code cleanup (2026-09-05):** resolved 49 unused import/local/parameter diagnostics across the shell, assistant, media, host, MCP and test modules. Calls with intentional side effects remain intact; positional callback placeholders are explicitly named. TypeScript `noUnusedLocals` and `noUnusedParameters` now make the ordinary typecheck/CI reject regressions. This is compiler-proven unused-symbol cleanup, not a claim that every exported symbol, runtime-discovered asset or optional integration is removable.- **Public-sharing security and maintenance audit (2026-09-05):** app `0.2.2` keeps the independently versioned CLI/MCP contracts unchanged. Release and assurance dependency audits now fail closed on unavailable, malformed or incomplete evidence; local developer skips are explicitly labelled, registry diagnostics do not expose raw URLs, and skipped optional scanners cannot produce an unconditional assurance PASS. Removed the dormant Convex deploy tail, fixed shared Git-hook installation and out-of-tree dependency copying for linked worktrees, and added functional regression tests. README now leads with a readable install/features/security overview and collapsible reference detail, preserving generated comparison evidence and public-alpha limits. `test:features` runs each test area in a separate process and distinguishes PASS/PARTIAL/SKIPPED/FAIL. The Forge Docker sandbox and synthetic credential-path fixture activate previously skipped security checks without using real secrets; CI now provisions the same bounded fixtures. Onboarding tests derive the app version from `package.json`; the browser suite follows the actual Activity & Runs UI, checks infrastructure deep-links, and never echoes session-cookie diagnostics. Full-history scanning now requests merge diffs explicitly in CI and the assurance runner; independent scanner outputs remain private; no genuine historical secret was identified by the configured scan, so shared history was not rewritten. Live-service deployment and remote CI status require separate exact-revision evidence and are not inferred from local tests.- **Rahmanef-aligned MCP widget palette / Block + Page v2 (2026-09-04):** MCP server `1.10.0` / toolset `2026.09.04.7` moves the two canonical ChatGPT resources to `ui://mso/block-v2.html` and `ui://mso/page-v2.html` so hosts do not reuse the old purple CSS cache key. Block and Page now share one visual-token source aligned with `rahmanef.com`: light `#f4f4f7` / `#1c1c1f`, dark `#1b1b20` / `#f2f2f5`, accent `#1f6df0`, Plus Jakarta Sans display copy, Inter body copy, fine separators, and editorial foreground/background primary-action inversion. ChatGPT theme changes propagate through `window.openai.theme` with a color-scheme fallback. Block/Page v1 and the earlier workflow/surface URIs remain readable but unlisted compatibility aliases; the headless workflow and two-surface/security contracts are unchanged.- **Headless workflows + two-surface MCP UI contract (2026-09-04):** MCP server `1.10.0` / toolset `2026.09.04.6` removes the automatic UI binding from `workflow_start`: orchestration, collision checks, tracing, evidence, and learning continue in the background without consuming the answer with a progress card. ChatGPT now has exactly two canonical MCP App resources: `ui://mso/block-v1.html` through `render_mso_block` for compact validation/action/CRUD input-output, and `ui://mso/page-v1.html` through `render_mso_page` for native operator views plus reviewed development/preview/production embeds. Block buttons send a user-approved follow-up and never execute mutations inside the widget, preserving normal scope, approval, audit, and workflow boundaries. The prior workflow/surface URIs remain non-advertised read aliases, while `workflow_status` and `render_mso_surface` remain app-only compatibility shims for cached clients. The ChatGPT transport profile is 66 tools: 64 model-visible actions (35 read / 17 write / 12 exec) plus two app-only shims; the full catalog is 90. Only Block and Page advertise a resource URI.diff --git a/frontend/slices/app-store/components/app-console.tsx b/frontend/slices/app-store/components/app-console.tsxindex c156d5bf..a0601864 100644--- a/frontend/slices/app-store/components/app-console.tsx+++ b/frontend/slices/app-store/components/app-console.tsx@@ -32,7 +32,7 @@ export function AppConsole({ m }: { m: AppManifest }) {text.replace(/\n$/, "").split("\n")- .filter((_, i, a) => !(a.length === 1 && a[0] === ""))+ .filter((_, _index, a) => !(a.length === 1 && a[0] === "")).map((text) => ({ kind, text }));const onRun = async () => {diff --git a/frontend/slices/appshell/components/desktop.tsx b/frontend/slices/appshell/components/desktop.tsxindex 6bec7035..fed63ac7 100644--- a/frontend/slices/appshell/components/desktop.tsx+++ b/frontend/slices/appshell/components/desktop.tsx@@ -1,6 +1,6 @@"use client";-import { Suspense, useEffect, useMemo, useState, type ComponentType } from "react";+import { Suspense, useEffect, useState, type ComponentType } from "react";import { useResponsive } from "../responsive/use-responsive";import { inEditable } from "../lib/use-focused-hotkey";import { usePersistLayout } from "../hooks/use-persist-layout";diff --git a/frontend/slices/appshell/components/mobile-shell.tsx b/frontend/slices/appshell/components/mobile-shell.tsxindex d1f7f28e..0e10b271 100644--- a/frontend/slices/appshell/components/mobile-shell.tsx+++ b/frontend/slices/appshell/components/mobile-shell.tsx@@ -12,7 +12,6 @@ import { MobileSwitcher } from "./mobile-switcher";import { MobileHome } from "./mobile-home";import { MobileNotifications } from "./mobile-notifications";import { Slot } from "../registry/feature-registry";-import { useShellConfig } from "../registry/shell-config";import { ShellUIProvider, type ShellUI } from "../registry/shell-ui";import { useMobileNavigationInfo } from "../lib/mobile-navigation";import { IosFeatureHeader } from "./shells/ios/ios-feature-header";diff --git a/frontend/slices/appshell/components/shells/android/android-shell.tsx b/frontend/slices/appshell/components/shells/android/android-shell.tsxindex 6f6c03e0..843baa9e 100644--- a/frontend/slices/appshell/components/shells/android/android-shell.tsx+++ b/frontend/slices/appshell/components/shells/android/android-shell.tsx@@ -20,7 +20,6 @@ import { useWindowOrder, useFocused, useWindow } from "../../../hooks/use-shell"import { shellStore, openWindow, focusApp, minimizeWindow, restoreWindow, toggleSpotlight, toggleInspector } from "../../../lib/store";import { WindowContent } from "../../window-content";import { Slot } from "../../../registry/feature-registry";-import { useShellConfig } from "../../../registry/shell-config";import { ShellUIProvider, type ShellUI } from "../../../registry/shell-ui";import { Clock } from "../../clock";import { AppCell, AppDrawer, NavBar, Recents } from "./android-parts";diff --git a/frontend/slices/appshell/components/shells/dashboard/dashboard-shell.tsx b/frontend/slices/appshell/components/shells/dashboard/dashboard-shell.tsxindex 2e90da08..68a426a0 100644--- a/frontend/slices/appshell/components/shells/dashboard/dashboard-shell.tsx+++ b/frontend/slices/appshell/components/shells/dashboard/dashboard-shell.tsx@@ -10,7 +10,6 @@import { useMemo, useState } from "react";import { useUrlHome } from "../../../hooks/use-url-home";import { LayoutDashboard, Home, Search } from "lucide-react";-import { useShellConfig } from "../../../registry/shell-config";import { useBrand } from "../../../registry/brand";import { useApps } from "../../../lib/registry";import { useWindowOrder, useFocused, useWindow, useWindowsMap } from "../../../hooks/use-shell";diff --git a/frontend/slices/appshell/lib/context-zone.tsx b/frontend/slices/appshell/lib/context-zone.tsxindex 68646ec4..e1959c7f 100644--- a/frontend/slices/appshell/lib/context-zone.tsx+++ b/frontend/slices/appshell/lib/context-zone.tsx@@ -10,7 +10,7 @@The <ContextMenuHost> (mounted once at #main-content) does the walking + ownsthe shared <ContextMenu> renderer. See context-menu-host.tsx. */-import { useCallback, useEffect, useRef, type ReactNode } from "react";+import { useCallback, useEffect, useRef } from "react";import type { MenuItem, ContextMenuCtx } from "./context-menu";// A provider gets the shell ctx (id/surface/x/y) PLUS the node the click hitdiff --git a/frontend/slices/appshell/lib/profiles.ts b/frontend/slices/appshell/lib/profiles.tsindex c184544c..e887042f 100644--- a/frontend/slices/appshell/lib/profiles.ts+++ b/frontend/slices/appshell/lib/profiles.ts@@ -1,6 +1,5 @@"use client";-import { useSyncExternalStore } from "react";import type { PersistedWindow } from "./types";import { hydrate, serialize } from "./store";import { getShellPrefs, setShell, type ShellPrefs } from "../registry/shells";diff --git a/frontend/slices/appshell/lib/store-multi.test.ts b/frontend/slices/appshell/lib/store-multi.test.tsindex 2fc7f836..a75b0323 100644--- a/frontend/slices/appshell/lib/store-multi.test.ts+++ b/frontend/slices/appshell/lib/store-multi.test.ts@@ -94,7 +94,7 @@ describe("closeWindow focus transfer", () => {// then close it — focus must fall to the next-highest-z (middle one),// not to the youngest (which was created last but never re-focused).const a = openWindow("settings", "Settings"); // created first- const b = openWindow("monitor", "Monitor");+ openWindow("monitor", "Monitor"); // keep the middle window and its z-order side effectconst c = openWindow("files", "Files", undefined, { path: "/x" }, { multi: true });focusWindow(a); // a now has the top zexpect(shellStore.getFocused()).toBe(a);diff --git a/frontend/slices/appshell/lib/types.ts b/frontend/slices/appshell/lib/types.tsindex fbc0d264..4abf8a4a 100644--- a/frontend/slices/appshell/lib/types.ts+++ b/frontend/slices/appshell/lib/types.ts@@ -1,5 +1,4 @@import type { ComponentType, CSSProperties } from "react";-import type { LucideIcon } from "lucide-react";/** The glyph contract <AppIcon> renders against — the subset of LucideProps it* actually passes, so a plain component can stand in for a lucide icon. */diff --git a/frontend/slices/assistant/components/agent-form.tsx b/frontend/slices/assistant/components/agent-form.tsxindex d2e1cb2f..cb613131 100644--- a/frontend/slices/assistant/components/agent-form.tsx+++ b/frontend/slices/assistant/components/agent-form.tsx@@ -3,9 +3,6 @@import { useState } from "react";import { Input } from "@/components/ui/input";import { Textarea } from "@/components/ui/textarea";-import { Switch } from "@/components/ui/switch";-import { Button } from "@/components/ui/button";-import { cn } from "@/lib/utils";import { AGENT_COLORS, SKILL_ICONS } from "../lib/presets";import type { AIStore } from "../lib/store";import { OS_TOOLS } from "../lib/tools";diff --git a/frontend/slices/assistant/components/chat-panel.tsx b/frontend/slices/assistant/components/chat-panel.tsxindex 72f37e2b..624f8095 100644--- a/frontend/slices/assistant/components/chat-panel.tsx+++ b/frontend/slices/assistant/components/chat-panel.tsx@@ -5,15 +5,12 @@ import {useEffect,useImperativeHandle,useMemo,- useRef,- useState,- type Ref,+ useRef, type Ref} from "react";import { ScrollArea } from "@/components/ui/scroll-area";import { cn } from "@/lib/utils";import { errText } from "./error-text";import {- registerAlfaRunner,updateAlfa,useActiveShell,useAlfaMessages,@@ -23,7 +20,7 @@ import {useAlfaBusy,sendToAlfa,ChatComposer,- type AlfaMessage,+ type AlfaMessage} from "@/features/appshell";import { runToolAgent, useOsApi, type AgentMsg } from "../lib/host";import type { Agent, Automation } from "../lib/types";diff --git a/frontend/slices/assistant/lib/store-persist.ts b/frontend/slices/assistant/lib/store-persist.tsindex eb203567..2848837f 100644--- a/frontend/slices/assistant/lib/store-persist.ts+++ b/frontend/slices/assistant/lib/store-persist.ts@@ -4,7 +4,6 @@// under the 200-line rule, and because this half has the load-bearing history: the// migration below is what stops a returning user's saved data from being silently// emptied when the tool catalogs changed shape.-import type { Agent, Automation, Skill } from "./types";import { PRESET_AGENTS } from "./presets";import { OS_TOOLS } from "./tools";diff --git a/frontend/slices/assistant/lib/store.ts b/frontend/slices/assistant/lib/store.tsindex ab7e0b65..50be4612 100644--- a/frontend/slices/assistant/lib/store.ts+++ b/frontend/slices/assistant/lib/store.ts@@ -3,7 +3,7 @@import { useCallback, useSyncExternalStore } from "react";import type { Agent, Automation, Skill } from "./types";import { PRESET_AGENTS, PRESET_AUTOMATIONS, PRESET_SKILLS } from "./presets";-import { KEYS, load, loadActive, migrateRows, persist } from "./store-persist";+import { KEYS, load, loadActive, persist } from "./store-persist";const uid = () => crypto.randomUUID().slice(0, 8);diff --git a/frontend/slices/assistant/lib/tools.ts b/frontend/slices/assistant/lib/tools.tsindex e5dc96d9..ecd481f2 100644--- a/frontend/slices/assistant/lib/tools.ts+++ b/frontend/slices/assistant/lib/tools.ts@@ -1,5 +1,5 @@import { HOST_TOOLS } from "../host-tools/catalog";-import type { Agent, Skill, Tool, ToolGroup } from "./types";+import type { Tool, ToolGroup } from "./types";// Presentation for the Agents / Skills / Automations editors. Groups only — the// tools themselves come from the executable catalog below.diff --git a/frontend/slices/image-editor/components/panels/layers-panel.tsx b/frontend/slices/image-editor/components/panels/layers-panel.tsxindex 99a538ce..5ae52d5b 100644--- a/frontend/slices/image-editor/components/panels/layers-panel.tsx+++ b/frontend/slices/image-editor/components/panels/layers-panel.tsx@@ -1,7 +1,7 @@"use client";import { useState } from "react";-import { Eye, EyeOff, GripVertical, Lock, SquareDashed } from "lucide-react";+import { Eye, EyeOff, Lock, SquareDashed } from "lucide-react";import { Input } from "@/components/ui/input";import { Button } from "@/components/ui/button";import { ScrollArea } from "@/components/ui/scroll-area";@@ -10,6 +10,8 @@ import { useEditor } from "../../lib/store";import type { Layer } from "../../lib/types";import { LayerThumb } from "./layer-thumb";import { LayerActionsMenu } from "./layer-actions-menu";+import { LayersHeader } from "./layers-header";+import { LayersFooter } from "./layers-footer";const KIND_LABEL: Record<Layer["kind"], string> = {image: "IMG",@@ -18,8 +20,6 @@ const KIND_LABEL: Record<Layer["kind"], string> = {paint: "PIXEL",adjustment: "ADJ",};-import { LayersHeader } from "./layers-header";-import { LayersFooter } from "./layers-footer";// Compact, Photoshop-style Layers panel:// header → blend + opacity (selected layer)diff --git a/frontend/slices/image-picker/types.ts b/frontend/slices/image-picker/types.tsindex 3f511ee1..76387ef6 100644--- a/frontend/slices/image-picker/types.ts+++ b/frontend/slices/image-picker/types.ts@@ -7,7 +7,6 @@* profile header, card hero, wallpaper, … */export type { ImageSource, ImageValue, ImageField } from "@/lib/contracts/image";-import type { ImageValue } from "@/lib/contracts/image";export interface UnsplashPhoto {id: string;diff --git a/frontend/slices/managed-apps/uninstall-panel.tsx b/frontend/slices/managed-apps/uninstall-panel.tsxindex 6cee2407..85acf6a7 100644--- a/frontend/slices/managed-apps/uninstall-panel.tsx+++ b/frontend/slices/managed-apps/uninstall-panel.tsx@@ -1,7 +1,7 @@"use client";import { useState } from "react";-import { Copy, Eye, Trash2, TriangleAlert } from "lucide-react";+import { Eye, Trash2, TriangleAlert } from "lucide-react";import { Button } from "@/components/ui/button";import { Input } from "@/components/ui/input";import { Label } from "@/components/ui/label";diff --git a/frontend/slices/os-settings/components/mcp-setup-guide.tsx b/frontend/slices/os-settings/components/mcp-setup-guide.tsxindex 7138ac5f..bc115386 100644--- a/frontend/slices/os-settings/components/mcp-setup-guide.tsx+++ b/frontend/slices/os-settings/components/mcp-setup-guide.tsx@@ -1,7 +1,7 @@"use client";import { useCallback, useEffect, useMemo, useState } from "react";-import { Bot, PlugZap, RefreshCw, ShieldCheck, TerminalSquare } from "lucide-react";+import { Bot, PlugZap, RefreshCw, ShieldCheck } from "lucide-react";import { Button } from "@/components/ui/button";import { SettingsBlock, SettingsSection } from "@/features/shell-settings";import { cn } from "@/lib/utils";diff --git a/frontend/slices/os-shell/integrations.ts b/frontend/slices/os-shell/integrations.tsindex 1ef94e8a..1cb476aa 100644--- a/frontend/slices/os-shell/integrations.ts+++ b/frontend/slices/os-shell/integrations.ts@@ -7,17 +7,13 @@import { Activity, Expand, FilePlus, FolderPlus, Link2, Lock, RotateCcw, Shrink, Wallpaper as WallpaperIcon } from "lucide-react";import {lock,- openWindow,- registerCommands,- registerAlfaLoader,+ openWindow, registerAlfaLoader,registerContextMenu,resetDesktopIcons,setAddDialog,setShell,setUnlockGuard,- shellsForSurface,- toast,- type MenuItem,+ shellsForSurface, type MenuItem} from "@/features/appshell";// @ agents and / skills+tools for every AI composer. Registered here rather thandiff --git a/frontend/slices/reel-editor/components/comp-props.tsx b/frontend/slices/reel-editor/components/comp-props.tsxindex c05adf61..f14a8625 100644--- a/frontend/slices/reel-editor/components/comp-props.tsx+++ b/frontend/slices/reel-editor/components/comp-props.tsx@@ -1,6 +1,6 @@"use client";-import { useEffect, useState } from "react";+import { useState } from "react";import { ArrowLeftRight } from "lucide-react";import { Button } from "@/components/ui/button";import { cn } from "@/lib/utils";diff --git a/frontend/slices/reel-editor/lib/composition.test.ts b/frontend/slices/reel-editor/lib/composition.test.tsindex 7469ac03..402bae0f 100644--- a/frontend/slices/reel-editor/lib/composition.test.ts+++ b/frontend/slices/reel-editor/lib/composition.test.ts@@ -138,7 +138,6 @@ describe("splitAt", () => {it("splitting within produces two clips with correct start/len", () => {const r = splitAt(comp, 30, "c1");expect(r.clips).toHaveLength(3);- const [a, b] = r.clips.filter((c) => c.track === "t1" && c.id === "c1" || r.clips.indexOf(c) < 2);// left part: start=0, len=30const left = r.clips.find((c) => c.id === "c1")!;expect(left.start).toBe(0);diff --git a/frontend/slices/reel-editor/lib/media-audio.ts b/frontend/slices/reel-editor/lib/media-audio.tsindex 30e4eb3f..5a7f73a8 100644--- a/frontend/slices/reel-editor/lib/media-audio.ts+++ b/frontend/slices/reel-editor/lib/media-audio.ts@@ -5,8 +5,6 @@import type { Clip, Composition, MediaType } from "./mock-timeline";-const clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));-/** Per-clip audio envelope at clip-local frame `l`: gain × fade-in × fade-out. */export function clipEnvelope(c: Clip, l: number): number {const vol = c.mute ? 0 : c.vol ?? 1;diff --git a/lib/a2a/client.test.ts b/lib/a2a/client.test.tsindex 4c2fb824..584ba9a5 100644--- a/lib/a2a/client.test.ts+++ b/lib/a2a/client.test.ts@@ -1,4 +1,4 @@-import { describe, expect, it } from "vitest";+import { expect, it } from "vitest";import {a2aAgentCardUrl,cancelA2ATask,diff --git a/lib/a2a/store.test.ts b/lib/a2a/store.test.tsindex 11699c23..f5fadca8 100644--- a/lib/a2a/store.test.ts+++ b/lib/a2a/store.test.ts@@ -1,7 +1,7 @@import { promises as fs } from "node:fs";import path from "node:path";import os from "node:os";-import { afterEach, describe, expect, it, vi } from "vitest";+import { afterEach, expect, it, vi } from "vitest";const dirs: string[] = [];afterEach(async () => {diff --git a/lib/forge/sandbox.ts b/lib/forge/sandbox.tsindex 55d94694..16c4c190 100644--- a/lib/forge/sandbox.ts+++ b/lib/forge/sandbox.ts@@ -67,7 +67,7 @@ export function forgeSandboxImageEvidence(): { image: string; imageId: string }export async function runForgeFixture(projectPath: string, spec: ForgeFunctionSpec, fixture: ForgeFixture): Promise<{ code: number; stdout: string; stderr: string; sandboxImageId: string }> {const resolved = await validateForgeCommand(projectPath, spec);const projectReal = await fs.realpath(projectPath);- const { image, imageId } = forgeSandboxImageEvidence();+ const { imageId } = forgeSandboxImageEvidence();const relScript = path.relative(projectReal, resolved.script);if (!relScript || relScript.startsWith("..") || path.isAbsolute(relScript)) throw new Error("forge script escaped project snapshot");const sandboxScript = `/workspace/${relScript.split(path.sep).join("/")}`;diff --git a/lib/host/fs-zip.ts b/lib/host/fs-zip.tsindex cb0587be..d8e74bcf 100644--- a/lib/host/fs-zip.ts+++ b/lib/host/fs-zip.ts@@ -16,7 +16,7 @@// only NARROW the archive (never widen access), so they're low-risk, but each is// still a safe basename.import { spawn } from "child_process";-import { createReadStream, promises as fsp } from "fs";+import { promises as fsp } from "fs";import os from "os";import path from "path";import type { Readable } from "stream";diff --git a/lib/host/project-containers.ts b/lib/host/project-containers.tsindex 3928f201..b7e5c986 100644--- a/lib/host/project-containers.ts+++ b/lib/host/project-containers.ts@@ -23,7 +23,7 @@import { promises as fs } from "fs";import path from "path";import { isCredentialPath, isUnderRoot } from "./paths";-import { PROJECT_LIMITS, shortId, type AuthorizedRoot } from "./project-identity";+import { shortId, type AuthorizedRoot } from "./project-identity";import { allConfiguredRoots, authorizedRoots } from "./project-authorized-roots";export { allConfiguredRoots, authorizedRoots };diff --git a/lib/host/project-roots.ts b/lib/host/project-roots.tsindex f5ec6607..d5394545 100644--- a/lib/host/project-roots.ts+++ b/lib/host/project-roots.ts@@ -19,7 +19,7 @@import { promises as fs } from "fs";import path from "path";import { validateProjectChild } from "./project-candidate";-import { decodeCursor, encodeCursor } from "./project-cursor";+import { encodeCursor } from "./project-cursor";import {allConfiguredRoots, overflowRoots, projectContainers,PROJECT_LIMITS, type ProjectContainer, type ScanCursor, type ScanReport,diff --git a/lib/host/projects.ts b/lib/host/projects.tsindex a51dbcb6..98c0b0e6 100644--- a/lib/host/projects.ts+++ b/lib/host/projects.ts@@ -1,4 +1,3 @@-import { promises as fs } from "fs";import path from "path";import { normalizeProjectKey, projectAliasesFor, projectAliasTarget } from "./project-aliases";import { boundedGitMeta, fullGitMeta, packageMeta } from "./project-meta";diff --git a/lib/managed-apps/proxy-headers.test.ts b/lib/managed-apps/proxy-headers.test.tsindex 623003ee..649217b4 100644--- a/lib/managed-apps/proxy-headers.test.ts+++ b/lib/managed-apps/proxy-headers.test.ts@@ -10,7 +10,6 @@ import {} from "./proxy-headers";const PREFIX = proxyPrefix("hermes");-const PREFIX_URL = `https://mso.rahmanef.com${PREFIX}/`;describe("buildUpstreamHeaders", () => {const base = new URL("http://127.0.0.1:9119");diff --git a/lib/managed-apps/update.test.ts b/lib/managed-apps/update.test.tsindex 02028f44..6e40f3d0 100644--- a/lib/managed-apps/update.test.ts+++ b/lib/managed-apps/update.test.ts@@ -8,6 +8,7 @@ import { promises as fs } from "node:fs";import os from "node:os";import path from "node:path";import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";+import type { ManagedAppJob } from "./types";vi.mock("server-only", () => ({}));@@ -17,10 +18,9 @@ vi.mock("server-only", () => ({}));delete process.env.HERMES_HOME;delete process.env.OPENCLAW_HOME;-const { cachedUpdateStatus, checkUpdate, setChannel, startRollback, startUninstall, startUpdate } = await import("./update");+const { checkUpdate, setChannel, startRollback, startUninstall, startUpdate } = await import("./update");const { readManagedAppJob, listManagedAppJobs } = await import("./jobs");const { listBackups } = await import("./backups");-import type { ManagedAppJob } from "./types";let home: string;let bin: string;diff --git a/lib/mcp/tools-discovery-read.test.ts b/lib/mcp/tools-discovery-read.test.tsindex eb702d23..ef8d93ef 100644--- a/lib/mcp/tools-discovery-read.test.ts+++ b/lib/mcp/tools-discovery-read.test.ts@@ -1,8 +1,8 @@import { afterAll, describe, expect, it, vi } from "vitest";-vi.mock("server-only", () => ({}));import { promises as fs } from "fs";import os from "os";import path from "path";+vi.mock("server-only", () => ({}));// Same fixture as tools-discovery.test.ts (see its header). This half covers// skills_read: exact ids, ambiguity refusal, and fail-closed symlink roots.@@ -61,8 +61,6 @@ const tool = (name: string) => {};const run = (name: string, args: Record<string, unknown> = {}) => tool(name).run(args, { scope: "read" as const });-type SkillRow = { id: string; trust: string; instructionsReadable: boolean; project?: { id: string; name: string } };-type Scan = { truncated: boolean; truncationReasons: string[] };afterAll(async () => {if (previous === undefined) delete process.env.OS_FS_READ_ROOTS;diff --git a/lib/mcp/tools-infra.ts b/lib/mcp/tools-infra.tsindex 6556a9b3..b87a828a 100644--- a/lib/mcp/tools-infra.ts+++ b/lib/mcp/tools-infra.ts@@ -1,5 +1,5 @@import { doctorInfraProvider, ensureDokployProject, INFRA_PROVIDER_IDS, isInfraProviderId, listCloudflareZones, listDokployProjects, readInfraProvider, summarizeInfraProvider, upsertCloudflareDns, upsertHostingerDns } from "@/lib/infra";-import { type McpTool, opt, S, str } from "./tool-kit";+import { type McpTool, S, str } from "./tool-kit";const dnsSchema = {name: { type: "string", description: "Fully-qualified DNS hostname, e.g. app.example.com" },diff --git a/lib/mcp/tools-local-agents.ts b/lib/mcp/tools-local-agents.tsindex 78f90d22..e4af9e48 100644--- a/lib/mcp/tools-local-agents.ts+++ b/lib/mcp/tools-local-agents.ts@@ -1,5 +1,5 @@import { listLocalAgents } from "@/lib/agent/local-agent-directory";-import { listLocalAgentInbox, updateLocalAgentMessageState } from "@/lib/agent/local-agent-mailbox";+import { updateLocalAgentMessageState } from "@/lib/agent/local-agent-mailbox";import { replyLocalAgentMessage, sendLocalAgentMessage, waitForLocalAgentInbox, waitForLocalAgentReply } from "@/lib/agent/local-agent-messaging";import { handoffOwnerLocalSession } from "@/lib/a2a/local-session";import { type McpRunContext, type McpTool, S, str } from "./tool-kit";diff --git a/lib/security/gateway-supply-chain.test.ts b/lib/security/gateway-supply-chain.test.tsindex dcd3466f..52719d9f 100644--- a/lib/security/gateway-supply-chain.test.ts+++ b/lib/security/gateway-supply-chain.test.ts@@ -17,10 +17,6 @@ const snapshot = (file: string) => {return { mode: stat.mode & 0o777, text: fs.readFileSync(fd, "utf8") };} finally { fs.closeSync(fd); }};-const appendNoFollow = (file: string, value: string) => {- const fd = fs.openSync(file, fs.constants.O_WRONLY | fs.constants.O_APPEND | fs.constants.O_NOFOLLOW);- try { fs.writeSync(fd, value); } finally { fs.closeSync(fd); }-};afterEach(() => { for (const root of roots.splice(0)) fs.rmSync(root, { recursive: true, force: true }); });diff --git a/proxy-machine-protocol.test.ts b/proxy-machine-protocol.test.tsindex 5eca9602..1b55727a 100644--- a/proxy-machine-protocol.test.ts+++ b/proxy-machine-protocol.test.ts@@ -2,7 +2,6 @@ import { afterEach, describe, expect, it, vi } from "vitest";import { NextRequest } from "next/server";const TEMPLATE = "{id}.mso.rahmanef.com";-const APP_HOST_HEADER = "x-os-managed-app-host";async function loadProxy(template: string) {vi.resetModules();diff --git a/scripts/bench-agent-corpus.test.ts b/scripts/bench-agent-corpus.test.tsindex ae6145bb..030f8738 100644--- a/scripts/bench-agent-corpus.test.ts+++ b/scripts/bench-agent-corpus.test.ts@@ -4,8 +4,7 @@ import { spawnSync } from "node:child_process";import os from "node:os";import path from "node:path";import { createCorpus, scratchIsPrivate } from "./bench-agent-corpus-fixtures.mjs";-import { aggregateAgent, comparabilityLevel, eligibleRanking, extractModelEvidence, extractToolTelemetry, extractUsage } from "./bench-agent-metrics.mjs";-import { buildCorpusPlan, interleaveCorpusPlans, scoreScenario, summarizeCorpus } from "./bench-agent-corpus.mjs";+import { buildCorpusPlan, interleaveCorpusPlans, scoreScenario } from "./bench-agent-corpus.mjs";const dirs: string[] = [];afterEach(() => { while (dirs.length) rmSync(dirs.pop()!, { recursive: true, force: true }); });diff --git a/scripts/mso-agent-approval-ui.test.ts b/scripts/mso-agent-approval-ui.test.tsindex c42a4b3b..208cff32 100644--- a/scripts/mso-agent-approval-ui.test.ts+++ b/scripts/mso-agent-approval-ui.test.ts@@ -1,6 +1,6 @@import { describe, expect, it, vi } from "vitest";import { canonicalAgentApproval, matchesAgentApproval } from "../lib/agent/approval.mjs";-import { approvalActionSummary, approvalArgsSummary, approvalDetailLines, approvalStatusLine, requestExactToolApproval } from "./mso-agent-approval-ui.mjs";+import { approvalArgsSummary, approvalDetailLines, approvalStatusLine, requestExactToolApproval } from "./mso-agent-approval-ui.mjs";describe("compact exact-call approval UX", () => {const tool = { name: "exec_run", scope: "exec" };diff --git a/scripts/mso-agent-mentions.test.ts b/scripts/mso-agent-mentions.test.tsindex 083d179f..6b240e16 100644--- a/scripts/mso-agent-mentions.test.ts+++ b/scripts/mso-agent-mentions.test.ts@@ -25,7 +25,7 @@ describe("local agent @mention routing", () => {it("dispatches a mention as a correlated request and persists the parent request", async () => {const history: unknown[] = [];const session = { agentSession: { id: "session-a" }, history };- const api = vi.fn(async (path: string, init?: RequestInit) => {+ const api = vi.fn(async (_path: string, init?: RequestInit) => {if (!init?.method) return { agents: rows };const body = JSON.parse(String(init.body));expect(body).toMatchObject({ target: "session-b", intent: "request", requiresUserRelay: true, activeOnly: true });diff --git a/scripts/mso-gateway.test.ts b/scripts/mso-gateway.test.tsindex af864851..dcfc7463 100644--- a/scripts/mso-gateway.test.ts+++ b/scripts/mso-gateway.test.ts@@ -3,7 +3,7 @@ import fs from "node:fs";import path from "node:path";import { describe, expect, it } from "vitest";import {- CLI, GATEWAY, ROOT, VERSION, fixture, readFileSnapshot, readState, runGateway as run,+ CLI, GATEWAY, VERSION, fixture, readFileSnapshot, readState, runGateway as run} from "./mso-gateway-test-fixture";diff --git a/tsconfig.json b/tsconfig.jsonindex 2bdc130c..c872fd27 100644--- a/tsconfig.json+++ b/tsconfig.json@@ -36,7 +36,9 @@"@/features/*": ["./frontend/slices/*"]- }+ },+ "noUnusedLocals": true,+ "noUnusedParameters": true},"include": ["next-env.d.ts",