moondesk 0.12.0 → 0.13.1
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/README.md +7 -5
- package/npm/moondesk.js +1 -1
- package/package.json +1 -1
- package/skills/browser/SKILL.md +31 -25
package/README.md
CHANGED
|
@@ -120,9 +120,11 @@ Select the connector and start working.
|
|
|
120
120
|
|
|
121
121
|
## Browser control
|
|
122
122
|
|
|
123
|
-
MoonDesk owns one lazy
|
|
123
|
+
MoonDesk owns one lazy managed Chromium process instead of attaching to your personal browser profile or launching a separate browser for every project. On first browser use it provisions a pinned Chrome for Testing build for the current platform, verifies the exact archive size and SHA-256, records a verified inventory of the installed browser files including Unix permission bits where applicable, installs it atomically into MoonDesk's browser cache, and controls it directly from Rust over the Chrome DevTools Protocol (CDP)—no Playwright, `chrome-devtools-mcp`, or separate browser-control service is required. Later starts revalidate that inventory so a missing or damaged support file triggers reprovisioning instead of a persistent broken-browser loop. Inside that shared Chromium, each registered workspace gets its own isolated BrowserContext for cookies and site storage, while each ChatGPT conversation gets its own MoonDesk-routed logical tab set. Different workspaces therefore do not share cookies, localStorage, IndexedDB, or service-worker state, and separate conversations cannot accidentally act on each other's selected tabs.
|
|
124
124
|
|
|
125
|
-
The browser runs headless by default and can be switched to visible mode for human-assisted steps such as logins or permission prompts. Presentation belongs to the shared Chromium process, so changing it while the browser is live requires explicit confirmation because every workspace BrowserContext and logical tab is recreated. MoonDesk never attaches to or reuses your personal browser profile, cookies, or logged-in sessions.
|
|
125
|
+
The browser runs headless by default and can be switched to visible mode for human-assisted steps such as logins or permission prompts. Headless and visible are two presentations of the same agent browser and expose the same page-local tabs, navigation, DOM controls, visual computer-use controls, viewport management, screenshots, console/network inspection, and heap-snapshot capabilities. Browser-global performance tracing has stricter isolation preconditions and is rejected whenever another managed BrowserContext is active, another logical browser session has used the workspace BrowserContext in the current runtime generation, a managed page is not owned by the requester, or an unowned/default-context page could contribute unrelated trace data. Presentation belongs to the shared Chromium process, so changing it while the browser is live requires explicit confirmation because every workspace BrowserContext and logical tab is recreated. MoonDesk never attaches to or reuses your personal browser profile, cookies, or logged-in sessions.
|
|
126
|
+
|
|
127
|
+
For normal agent work MoonDesk exposes a Codex-style capability facade: `browser_state` for ambient state, `browser_tabs` for conversation-owned tabs, `browser_navigate` for goto/back/forward/reload, `browser_dom` for accessibility/DOM interactions, `browser_cua` for rendered screenshots plus physical coordinate/keyboard/wheel input, and `browser_viewport` for responsive/device sizing. `browser_command` remains available as an advanced native-CDP escape hatch for console/network inspection, emulation, performance traces, V8 heap snapshots, screenshots, and lower-level page operations that are not represented by the facade.
|
|
126
128
|
|
|
127
129
|
```bash
|
|
128
130
|
moondesk browser navigate_page --url=http://localhost:3000
|
|
@@ -131,7 +133,7 @@ moondesk browser take_snapshot
|
|
|
131
133
|
moondesk browser list_console_messages
|
|
132
134
|
```
|
|
133
135
|
|
|
134
|
-
The `moondesk browser` CLI shares the resolved workspace's BrowserContext/login state but uses its own logical tab session, so scripted browser commands cannot steal a ChatGPT conversation's active page.
|
|
136
|
+
The `moondesk browser` CLI is the deterministic low-level scripting path. It shares the resolved workspace's BrowserContext/login state but uses its own logical tab session, so scripted browser commands cannot steal a ChatGPT conversation's active page. For interactive agent work prefer the capability facade; use `browser_cua action=screenshot` or `view_page` when the task depends on actual rendered pixels rather than only a text/accessibility snapshot.
|
|
135
137
|
|
|
136
138
|
For browser-runtime invariants and implementation details, see [`docs/BROWSER_RUNTIME_ARCHITECTURE_HARDENING.md`](docs/BROWSER_RUNTIME_ARCHITECTURE_HARDENING.md).
|
|
137
139
|
|
|
@@ -172,7 +174,7 @@ Use read-only mode when mutation is unnecessary, and use a VM or container for u
|
|
|
172
174
|
|
|
173
175
|
**Commands:** `run_command`, `start_command`, `list_commands`, `poll_command`, `read_command_output`, `cancel_command`
|
|
174
176
|
|
|
175
|
-
**Browser:** `
|
|
177
|
+
**Browser:** `browser_state`, `browser_tabs`, `browser_navigate`, `browser_dom`, `browser_cua`, `browser_viewport`, `set_browser_presentation`, `view_page`, plus advanced `browser_command`
|
|
176
178
|
|
|
177
179
|
Use `run_command` for short work. Use `start_command` + `poll_command` for builds, tests, installs, dev servers, and other long-running jobs.
|
|
178
180
|
|
|
@@ -217,7 +219,7 @@ If Windows Security or another antivirus quarantines the verified executable, up
|
|
|
217
219
|
| Tunnel | ngrok |
|
|
218
220
|
| MCP server | Custom implementation |
|
|
219
221
|
| MCP protocol | `2025-11-25` |
|
|
220
|
-
| Browser runtime |
|
|
222
|
+
| Browser runtime | MoonDesk-managed Chrome for Testing + native Rust CDP |
|
|
221
223
|
| Distribution | npm + verified native binaries |
|
|
222
224
|
|
|
223
225
|
## Contributing
|
package/npm/moondesk.js
CHANGED
|
@@ -128,7 +128,7 @@ async function orchestrate(options = {}) {
|
|
|
128
128
|
const nodeVersion = options.nodeVersion ?? process.versions.node;
|
|
129
129
|
if (!isSupportedNodeVersion(nodeVersion)) {
|
|
130
130
|
logger.error(
|
|
131
|
-
`MoonDesk requires Node.js ${SUPPORTED_NODE_RANGE}
|
|
131
|
+
`MoonDesk requires Node.js ${SUPPORTED_NODE_RANGE} for its supported npm bootstrap and self-update runtime; detected Node.js ${nodeVersion}.`,
|
|
132
132
|
);
|
|
133
133
|
return { code: 1, signal: null };
|
|
134
134
|
}
|
package/package.json
CHANGED
package/skills/browser/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: browser
|
|
3
|
-
description: Control MoonDesk's
|
|
3
|
+
description: Control MoonDesk's Codex-style agent browser with workspace-isolated storage, conversation-owned tabs, DOM actions, visual computer-use controls, viewport control, and advanced DevTools fallback.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# MoonDesk Browser
|
|
@@ -9,37 +9,43 @@ Use MoonDesk's browser runtime for local web-app inspection, UI testing, console
|
|
|
9
9
|
|
|
10
10
|
## Interfaces
|
|
11
11
|
|
|
12
|
-
- **MCP `
|
|
13
|
-
- **MCP `
|
|
14
|
-
- **MCP `
|
|
15
|
-
-
|
|
12
|
+
- **MCP `browser_state`**: read ambient browser state without launching Chromium: headless/visible presentation, runtime status, this conversation's logical tabs, selected tab, and available capability groups.
|
|
13
|
+
- **MCP `browser_tabs`**: list/select/open/close conversation-owned logical tabs. Raw upstream Chrome page IDs and other conversations' tabs are never exposed.
|
|
14
|
+
- **MCP `browser_navigate`**: goto/back/forward/reload on the selected tab.
|
|
15
|
+
- **MCP `browser_dom`**: the normal DOM-oriented path for snapshots, UID interactions, forms, evaluation, waits, and uploads.
|
|
16
|
+
- **MCP `browser_cua`**: the visual computer-use path for rendered screenshots, coordinate clicks, focused typing, keypresses, and scrolling. Prefer this for canvas, custom editors, maps, and other interfaces where DOM UIDs are unreliable.
|
|
17
|
+
- **MCP `browser_viewport`**: inspect or set the selected tab's viewport, using exact emulation when DPR/mobile/touch/landscape characteristics are requested.
|
|
18
|
+
- **MCP `set_browser_presentation`**: switch the same host-owned agent Chromium between headless and visible presentation. Prefer headless; changing presentation while Chromium is live restarts the host-wide browser runtime and therefore requires explicit user approval before retrying with `confirm_restart=true`.
|
|
19
|
+
- **MCP `browser_command`**: advanced escape hatch for MoonDesk-native CDP operations that are not represented by the capability facade. Do not use it as the default interaction model.
|
|
20
|
+
- **MCP `view_page`**: direct rendered-pixel helper retained for compatibility; `browser_cua action=screenshot` is the capability-facade equivalent.
|
|
21
|
+
- **`moondesk browser` CLI**: deterministic low-level scripting interface in Both mode. It calls the same MoonDesk Chromium runtime and workspace BrowserContext, but it intentionally owns a separate local-CLI logical tab session instead of borrowing a ChatGPT conversation's active page.
|
|
16
22
|
|
|
17
|
-
|
|
23
|
+
MoonDesk provisions its own pinned Chrome for Testing build and controls it directly over CDP. Do not launch a second Playwright/CDP/MCP browser-control stack for normal MoonDesk browser work.
|
|
18
24
|
|
|
19
25
|
## Core workflow
|
|
20
26
|
|
|
21
|
-
1.
|
|
22
|
-
2.
|
|
23
|
-
3.
|
|
24
|
-
4.
|
|
25
|
-
5. Take another snapshot after
|
|
26
|
-
6. Use
|
|
27
|
-
7.
|
|
27
|
+
1. Call `browser_state` when ambient browser state matters, then use `browser_tabs` to select or create the target tab.
|
|
28
|
+
2. Navigate with `browser_navigate` and set the target size with `browser_viewport` before collecting interaction references.
|
|
29
|
+
3. For ordinary web UI, call `browser_dom action=snapshot`, then use the latest UIDs with DOM click/fill/hover/drag/upload actions. Navigation, viewport changes, and substantial DOM mutations can invalidate older UIDs.
|
|
30
|
+
4. For visual interfaces, use `browser_cua action=screenshot` followed by coordinate click/scroll/type/keypress actions instead of forcing an unreliable DOM path.
|
|
31
|
+
5. Take another DOM snapshot after structural state changes, or another visual screenshot after appearance-sensitive changes.
|
|
32
|
+
6. Use rendered pixels for visual judgment. Accessibility/text snapshots are structural evidence, not a substitute for seeing the page.
|
|
33
|
+
7. Drop to `browser_command` only for advanced console/network, emulation, native performance-trace, heap-snapshot, or lower-level page functionality not covered by the facade.
|
|
28
34
|
|
|
29
|
-
MoonDesk starts one host-owned Chromium lazily on the first browser operation and runs it headless by default at a deterministic 1280x800 initial viewport. The
|
|
35
|
+
MoonDesk starts one host-owned managed Chromium lazily on the first browser operation and runs it headless by default at a deterministic 1280x800 initial viewport. On an empty cache it first downloads the pinned Chrome for Testing artifact, verifies its exact size and SHA-256, and installs it atomically. The Chromium process and native CDP connection are shared, but browser ownership is not: each registered workspace gets a named isolated BrowserContext for cookies/storage, and each ChatGPT conversation gets its own logical page set inside that workspace context. MoonDesk routes page-scoped operations by the conversation's owned page ID instead of trusting Chromium's globally selected tab. Conversations in the same workspace therefore share that project's login/storage state while keeping separate tabs; different workspaces do not share cookies/localStorage/IndexedDB/service-worker state. Always use the connector that owns the project for its browser work--do not switch to another workspace connector merely because it exposes browser tools.
|
|
30
36
|
|
|
31
|
-
Headless
|
|
37
|
+
Headless and visible presentation expose the same browser capabilities: tabs, navigation, DOM control, visual CUA, viewport control, screenshots, and advanced DevTools inspection. Users can switch the one agent Chromium to visible presentation from MoonDesk's dashboard. In `multi-tools`, use `set_browser_presentation` only when the user needs to see or manually interact with the browser, such as a login, CAPTCHA, or permission prompt; `browser_cua action=screenshot` and `view_page` already provide rendered pixels for agent inspection. Presentation is process-global. Changing it while Chromium is running closes **all** MoonDesk workspace BrowserContexts and conversation/CLI tabs, so the tool returns `confirmation_required` until the user explicitly approves that loss and the agent retries with `confirm_restart=true`. If the shared runtime is lost or a dispatched operation exceeds its deadline, MoonDesk invalidates that runtime before another browser operation can run; the next call starts a fresh Chromium generation and all callers must re-establish their page/snapshot state. MoonDesk never automatically replays an ambiguous state-changing action.
|
|
32
38
|
|
|
33
39
|
## Local dev-server verification
|
|
34
40
|
|
|
35
41
|
When an agent starts a local web server, browser verification is part of completing the task rather than a separate setup step:
|
|
36
42
|
|
|
37
43
|
1. Wait until the server reports its localhost URL as ready.
|
|
38
|
-
2. Navigate this conversation's
|
|
39
|
-
3. Set the viewport being tested
|
|
40
|
-
4. Exercise
|
|
41
|
-
5. Inspect console/network output when debugging behavior.
|
|
42
|
-
6. Use `view_page` to verify the actual rendered result; do not declare visual success from DOM text alone.
|
|
44
|
+
2. Navigate this conversation's selected tab to that URL with `browser_navigate`.
|
|
45
|
+
3. Set the viewport being tested with `browser_viewport`, then take a fresh `browser_dom` snapshot when DOM interactions are appropriate.
|
|
46
|
+
4. Exercise ordinary controls through `browser_dom`; use `browser_cua` for canvas/custom editors/maps or other visual interactions.
|
|
47
|
+
5. Inspect console/network output through the advanced DevTools path when debugging behavior.
|
|
48
|
+
6. Use `browser_cua action=screenshot` or `view_page` to verify the actual rendered result; do not declare visual success from DOM text alone.
|
|
43
49
|
7. Repeat at the relevant desktop/tablet/mobile viewport when the change is responsive.
|
|
44
50
|
|
|
45
51
|
## Common CLI commands
|
|
@@ -73,13 +79,13 @@ moondesk browser take_snapshot
|
|
|
73
79
|
moondesk browser list_console_messages
|
|
74
80
|
```
|
|
75
81
|
|
|
76
|
-
Prefer the CLI for orchestration,
|
|
82
|
+
Prefer the capability facade for interactive agent work. Use the CLI for deterministic orchestration, then return to `browser_cua action=screenshot` or `view_page` whenever the task requires actual visual inspection.
|
|
77
83
|
|
|
78
84
|
## Safety and lifecycle
|
|
79
85
|
|
|
80
|
-
- Do not run browser lifecycle commands (`start`, `status`, `stop`) through MCP `browser_command` or `moondesk browser`; the running MoonDesk host owns that lifecycle.
|
|
86
|
+
- Do not run browser lifecycle commands (`start`, `status`, `stop`) through MCP `browser_command` or `moondesk browser`; the running MoonDesk host owns that lifecycle. `browser_state` observes lifecycle state without starting Chromium.
|
|
81
87
|
- `moondesk browser` is a lightweight localhost client to the running MoonDesk host. It does not own a separate browser process. CLI calls for one workspace share that workspace's BrowserContext/storage but use a dedicated local-CLI logical tab session, separate from ChatGPT conversations.
|
|
82
|
-
- ReadOnly mode
|
|
88
|
+
- ReadOnly mode narrows the facade to inspection-only actions: `browser_state`, tab list/selected, DOM snapshot/wait, visual screenshot, and viewport get. Navigation, arbitrary JavaScript execution, interaction, uploads, resizing, and other state-changing browser actions are blocked.
|
|
83
89
|
- Treat `evaluate_script` as code execution in this caller's currently active logical page. MoonDesk injects the owned upstream page ID; callers must not rely on Chromium's globally selected tab. Use scripts only when needed and keep them narrowly scoped.
|
|
84
|
-
- Browser file paths are local machine paths. Relative input paths stay inside the active workspace. Browser-only mode keeps browser inputs workspace-scoped. When Computer tools are also enabled (`Both` mode), an explicit absolute input-file path (for example, `upload_file`) may reference another regular file readable by the MoonDesk user; MoonDesk stages a private copy before Chromium sees it.
|
|
85
|
-
-
|
|
90
|
+
- Browser file paths are local machine paths. Relative input paths stay inside the active workspace. Browser-only mode keeps browser inputs workspace-scoped. When Computer tools are also enabled (`Both` mode), an explicit absolute input-file path (for example, `upload_file`) may reference another regular file readable by the MoonDesk user; MoonDesk stages a private copy before Chromium sees it. File-producing/output paths remain workspace-bound.
|
|
91
|
+
- The native surface intentionally omits adapter-specific extension lifecycle, Lighthouse wrapper, WebMCP/third-party-tool discovery, and screencast commands. Native CDP performance tracing is browser-global, so MoonDesk leases the active trace to the conversation and exact page that started it.
|