Skip to content

armgit / mso

Public Imported from GitHub
0

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.

fix(browser): keep Camoufox automation on demand

Rahmanaa3ea165143d
diff --git a/claude-skills/mso-camoufox/SKILL.md b/claude-skills/mso-camoufox/SKILL.md
index 7af48bd4..ba9c5d0b 100644
--- a/claude-skills/mso-camoufox/SKILL.md
+++ b/claude-skills/mso-camoufox/SKILL.md
@@ -11,11 +11,19 @@ metadata:
Camoufox is MSO's anti-fingerprinting Firefox on a headless X display. It is useful for **authorized** access when ordinary automation is blocked by fingerprinting.
+## Two browser modes
+
+1. **Agent automation (default for website checks/audits):** use the verified `camoufox-browse` skill with a disposable profile. The persistent `camoufox-vnc.service` may remain off. Do not reuse the human profile or its cookies.
+2. **Human persistent Browser app:** use `browser_status` / `browser_power` only when the user wants the live MSO Browser window or explicitly needs the saved human browser session.
+
## What an agent may do
-- Check installed/running state.
-- Start or stop the Camoufox service through the bounded browser capability.
-- Tell the user to open the Browser app / Settings to drive the live screen.
+- Treat `running: false` as the normal idle state, not a failure.
+- For automated site inspection, discover/read `camoufox-browse` and run it with a disposable profile.
+- Check installed/running state of the persistent Browser app.
+- Start or stop the persistent Camoufox service through the bounded browser capability when that mode is actually required.
+- If the agent found the persistent session off and started it itself, stop it after the task unless the user asked to leave it running.
+- Tell the user to open the Browser app / Settings to drive the live persistent screen.
- Diagnose non-secret service failures and resource pressure.
## What an agent must never retrieve or expose
@@ -27,9 +35,11 @@ Camoufox is MSO's anti-fingerprinting Firefox on a headless X display. It is use
The CLI has a human/operator command that can reveal the one-time VNC credential. **Do not invoke that command from an agent.** The omission of session credentials from bounded MSO tools is intentional least privilege, not a missing feature.
-## Power only
+## Persistent Browser app power
+
+Do not power this service merely because a task mentions a browser. First decide whether the task needs the **human persistent session** or only automated inspection. Automated inspection uses `camoufox-browse` and leaves this service off.
-If no bounded browser tool exists in the current runtime, resolve the local CLI and limit automation to status/start/stop:
+If the persistent mode is required and no bounded browser tool exists in the current runtime, resolve the local CLI and limit lifecycle control to status/start/stop:
```bash
MSO_ROOT="${MSO_DIR:-$(systemctl show -p WorkingDirectory --value mso.service 2>/dev/null || true)}"
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 68441db4..05f504d4 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -12,6 +12,7 @@ this is the *what*, and it is what Settings → About shows as “What's new”.
**Fixed**
+- `browser` keep Camoufox automation on demand
- `browser` retain private viewer connectivity without server access
- `release` align Node support and read-only browser reconnects
- `extensions` lock project controls until initial inspection
diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md
index 63a8665b..9823472c 100644
--- a/docs/TROUBLESHOOTING.md
+++ b/docs/TROUBLESHOOTING.md
@@ -297,7 +297,8 @@ x11vnc, noVNC/websockify, the VNC password file and the user systemd runtime/lin
### Browser is installed but Off
That is the expected idle state. The user unit is intentionally not enabled at boot and has
-a finite lease. Start it from Browser/Settings; stop it again when done.
+a finite lease. The human-facing Browser app may start it from Browser/Settings when needed.
+Agent website audits should normally use the verified `camoufox-browse` automation skill with a disposable profile instead, so the persistent logged-in VNC session can remain off.
### Browser reports secure embedding is unavailable
diff --git a/lib/mcp/tools-power.ts b/lib/mcp/tools-power.ts
index 9c4078f3..5fb482cd 100644
--- a/lib/mcp/tools-power.ts
+++ b/lib/mcp/tools-power.ts
@@ -43,8 +43,9 @@ export const POWER_TOOLS: McpTool[] = [
limit: { key: "camoufox", max: 12, windowMs: 60_000 },
audit: { action: "camoufox.power" as const, targetArg: "on" },
description:
- "Start or stop the Camoufox browser session on the VPS. Starting boots a real Firefox on a headless " +
- "X display; the session self-terminates after 2h. Stop it when done — it holds a live logged-in profile.",
+ "Start or stop the persistent Camoufox/noVNC session used by the human-facing MSO Browser app. Starting boots the saved-profile Firefox on a headless " +
+ "X display; the session self-terminates after 2h. Do not start it merely for automated public-site inspection: use the verified camoufox-browse skill with a disposable profile instead. " +
+ "If an agent explicitly starts this persistent session for a task and it was previously off, stop it when done — it holds a live logged-in profile.",
scope: "exec",
annotations: { destructiveHint: true },
inputSchema: S({ on: { type: "boolean", description: "true = start, false = stop." } }, ["on"]),
diff --git a/lib/mcp/tools-read.ts b/lib/mcp/tools-read.ts
index 5e789fa0..a930e141 100644
--- a/lib/mcp/tools-read.ts
+++ b/lib/mcp/tools-read.ts
@@ -194,7 +194,8 @@ export const READ_TOOLS: McpTool[] = [
{
name: "browser_status",
description:
- "State of the Camoufox anti-fingerprinting browser (a real Firefox on a headless display). " +
+ "State of the persistent Camoufox/noVNC browser session used by the human-facing MSO Browser app. Off is a healthy idle state. " +
+ "Automated website inspection should prefer the verified camoufox-browse skill with a disposable profile and should not start this persistent session just to inspect a public site. " +
"Returns installed/running/autostart only. The viewer URL and its one-time VNC password are DELIBERATELY not " +
"returned here — that session holds live Google and LinkedIn logins, so its credentials never leave " +
"the box through a tool result. Open Settings in mso to get them.",
diff --git a/lib/orchestration/capability-catalog.mjs b/lib/orchestration/capability-catalog.mjs
index 893b3bea..f5f97da8 100644
--- a/lib/orchestration/capability-catalog.mjs
+++ b/lib/orchestration/capability-catalog.mjs
@@ -26,7 +26,7 @@ const ROUTES = [
{ id: "project-function", priority: 90, patterns: [/\b(project function|declared function|automation function|project capability)\b/i], tools: ["project_capabilities", "project_function_call"], budget: 10_000 },
{ id: "project-discovery", priority: 65, patterns: [/\b(find|list|locate|which|cari|temukan|daftar)\b.*\b(project|repo|repository|workspace|proyek)\b/i], tools: ["projects_list"], budget: 8_000 },
{ id: "skills", priority: 65, patterns: [/\b(skill|capability|recipe|how do i|how to|best practice|cara|kemampuan)\b/i], tools: ["skills_search", "skills_read"], budget: 10_000 },
- { id: "browser", priority: 85, patterns: [/\b(camoufox|browser|firefox|vnc)\b/i], tools: ["browser_status", "browser_power"], budget: 8_000 },
+ { id: "browser", priority: 85, patterns: [/\b(camoufox|browser|firefox|vnc)\b/i], tools: ["skills_search", "skills_read", "browser_status", "browser_power"], budget: 10_000 },
{ id: "screen", priority: 90, patterns: [/\b(screenshot|screen capture|capture the .*screen|visual proof)\b/i], tools: ["screen_capture"], budget: 8_000 },
{ id: "cloudflare-dns", priority: 100, patterns: [/\bcloudflare\b.*\b(dns|zone|record)\b/i], tools: ["cloudflare_zones_list", "cloudflare_dns_upsert"], budget: 10_000 },
{ id: "hostinger-dns", priority: 100, patterns: [/\bhostinger\b.*\b(dns|domain|record)\b/i], tools: ["hostinger_dns_upsert"], budget: 10_000 },
diff --git a/scripts/mso-agent-tool-router.test.ts b/scripts/mso-agent-tool-router.test.ts
index b9b12590..0c8191af 100644
--- a/scripts/mso-agent-tool-router.test.ts
+++ b/scripts/mso-agent-tool-router.test.ts
@@ -5,7 +5,7 @@ const tool = (name: string, description: string) => ({ name, description, scope:
const catalog = [
tool("workflow_start", "Start multi-step workflow"), tool("workflow_status", "Workflow status"),
tool("workflow_finish", "Finish workflow"), tool("workflow_cancel", "Cancel workflow"),
- tool("skills_search", "Search capabilities skills tools recipes"), tool("projects_list", "List projects repositories"),
+ tool("skills_search", "Search capabilities skills tools recipes"), tool("skills_read", "Read one skill"), tool("projects_list", "List projects repositories"),
tool("project_capabilities", "Inspect project functions"), tool("agent_session_current", "Current session"),
tool("sys_stats", "Live VPS CPU memory disk uptime health"), tool("sys_processes", "Top CPU processes"),
tool("apps_list", "Managed apps hermes openclaw"), tool("apps_logs", "Recent application logs"),
@@ -14,7 +14,7 @@ const catalog = [
tool("project_memory_upsert", "Persist repo-local memory including user manual tests"),
tool("exec_run", "Run a short shell command"), tool("exec_job_start", "Run long tests and builds"),
tool("exec_job_status", "Read long job status"), tool("exec_job_cancel", "Cancel long job"),
- tool("screen_capture", "Capture screenshot"), tool("browser_status", "Camoufox browser state"),
+ tool("screen_capture", "Capture screenshot"), tool("browser_status", "Camoufox browser state"), tool("browser_power", "Start or stop persistent Camoufox Browser app"),
tool("cloudflare_zones_list", "List Cloudflare DNS zones"), tool("hostinger_dns_upsert", "Update Hostinger DNS record"),
tool("local_agents_list", "List active same-host local session agents"), tool("local_agent_inbox", "Read local session agent inbox"),
tool("local_agent_message_send", "Send message or task to a local session agent"), tool("local_agent_reply", "Reply to a correlated local agent request"),
@@ -38,6 +38,13 @@ describe("MSO per-turn tool router", () => {
expect(out.softLimit).toBe(MAX_ACTIVE_TOOLS);
});
+
+ it("routes browser intent to lifecycle plus skill discovery so automation can stay disposable", () => {
+ const out = selectToolsForTurn(catalog, [{ role: "user", text: "use camoufox to check this website UI" }]);
+ expect(out.routeIds).toContain("browser");
+ expect(out.selectedNames).toEqual(expect.arrayContaining(["skills_search", "skills_read", "browser_status", "browser_power"]));
+ });
+
it("falls back to discovery only when the catalog cannot classify the request", () => {
const out = selectToolsForTurn(catalog, [{ role: "user", text: "do the unusual thing we discussed" }]);
expect(out.catalogMatched).toBe(false);