Shell Desktop MCP
Overview
Use this skill to drive the Electron shell via MCP with deterministic, testable workflows.
Always do preflight first, then run one focused operation batch per objective.
Path Resolution
Skill-local paths (for example scripts/... and references/...) are relative to this directory:
/codex/skills/shell-desktop-mcp.
Standard Workflow
- Confirm backend availability.
- Capture baseline shell/sim state.
- Run the requested simulation, window, input, or asset operations.
- For renderer/WebGPU investigations, run diagnostics tools in the same batch.
- Re-check state and summarize deltas.
- Capture reproducible evidence (status + screenshot/log payload) when relevant.
Preflight (Required)
Run this sequence first:
- Call
mcp__idle-engine-shell-desktop__health.
- If health is not OK, start with bounded wait:
bash /codex/skills/shell-desktop-mcp/scripts/preflight-and-wait.sh gateway-backend 18 10
- Uses 18 attempts with 10-second interval (about 3 minutes max).
- Starts shell-desktop in detached mode (
nohup) and writes PID/log paths.
- Requires stable health before success (two consecutive smoke checks + short guard window).
- Fails fast if the launcher process exits before health becomes OK.
- Re-run
mcp__idle-engine-shell-desktop__health and verify ok: true.
- Run MCP smoke test:
pnpm shell:desktop:mcp:smoke
- Capture baseline:
mcp__idle-engine-shell-desktop__sim_status
mcp__idle-engine-shell-desktop__window_info
- If diagnosing renderer/WebGPU:
renderer.status (wrapper: mcp__idle-engine-shell-desktop__renderer_status) + probe.webgpuHealth (wrapper: mcp__idle-engine-shell-desktop__probe_webgpuHealth)
If startup details are needed, use docs/shell-desktop-mcp.md in the repo.
Operation Patterns
Simulation Control
- Use
mcp__idle-engine-shell-desktop__sim_start, mcp__idle-engine-shell-desktop__sim_pause, mcp__idle-engine-shell-desktop__sim_resume, mcp__idle-engine-shell-desktop__sim_stop for lifecycle transitions.
- Use
mcp__idle-engine-shell-desktop__sim_step only while paused for deterministic advancement.
- Use
mcp__idle-engine-shell-desktop__sim_enqueue to inject runtime commands in deterministic order.
sim_enqueue requires object commands (not strings). Minimal valid shape per command is { type: string }.
- Example:
{
"commands": [
{
"type": "TEST_COMMAND",
"payload": { "source": "mcp" },
"priority": 1
}
]
}
- Capture
mcp__idle-engine-shell-desktop__sim_status before and after lifecycle mutations.
Window Diagnostics
- Use
mcp__idle-engine-shell-desktop__window_info to inspect bounds/url/devtools state.
- Use
mcp__idle-engine-shell-desktop__window_resize before screenshot collection.
- Use
mcp__idle-engine-shell-desktop__window_devtools only when renderer debugging is needed.
- Always verify
window_devtools effects with a follow-up window_info.
- In some headless environments,
window_devtools may return success while devToolsOpen remains false; treat this as an environment limitation unless other tool calls fail.
- Use
mcp__idle-engine-shell-desktop__window_screenshot to collect bounded PNG evidence.
Input Injection
- Use
mcp__idle-engine-shell-desktop__input_controlEvent with explicit intent, phase, and optional value/metadata.
- Example:
{
"intent": "collect",
"phase": "start",
"value": 1,
"metadata": { "source": "mcp-skill-test" }
}
- After input injection, step or resume sim and capture resulting status and/or screenshot.
Full Surface Validation (Periodic)
Use this when validating MCP server coverage end-to-end (for example when updating this skill):
- Run preflight + smoke.
- Capture baseline:
health, sim_status, window_info, renderer_status, probe_webgpuHealth.
- Exercise window tools:
window_resize, window_screenshot, window_devtools, window_info.
- Exercise input/sim tools:
input_controlEvent, sim_pause, sim_step, sim_enqueue, sim_resume, sim_stop, sim_start, sim_status.
- Exercise asset tools:
asset_list root, asset_list recursive, asset_read on a discovered file.
- Exercise diagnostics tools:
logs_tail (unfiltered + filtered) and logs_since with cursor polling.
- Restore runtime state and window size (
1200x800 unless scenario requires otherwise), then capture final baseline snapshot.
Report tool-by-tool status and any semantic gaps (for example "success response did not change observable state").
Diagnostics and Triage
- Use
renderer.status (wrapper: mcp__idle-engine-shell-desktop__renderer_status) to capture #output text, optional error banner text, and renderer state snapshots.
- Use
logs.tail (wrapper: mcp__idle-engine-shell-desktop__logs_tail) for bounded recent diagnostics with optional filters: source, subsystem, severity, limit.
- Use
logs.since (wrapper: mcp__idle-engine-shell-desktop__logs_since) for incremental polling from a cursor id when tracking live recovery/regressions.
- Use
probe.webgpuHealth (wrapper: mcp__idle-engine-shell-desktop__probe_webgpuHealth) for machine-readable WebGPU status (ok, lost, recovered) plus last loss reason/timestamp.
- Prefer dotted tool names (
renderer.status, logs.since, probe.webgpuHealth) in runbooks; expect underscore mapping in Codex tool wrappers.
Asset Inspection
- Use
mcp__idle-engine-shell-desktop__asset_list first.
- Use
mcp__idle-engine-shell-desktop__asset_read only on discovered paths.
- Keep reads bounded with
maxBytes.
Determinism and Evidence
For reproducible debugging, prefer:
sim_pause
sim_step with explicit step count
window_screenshot (bounded)
sim_status
- Diagnostics snapshot (
renderer.status + filtered logs.tail + probe.webgpuHealth) for renderer/WebGPU scenarios
Always report:
- exact
nextStep
- step count used
- window size at screenshot time
- screenshot byte count
- diagnostics filters used (if any),
nextCursor, and entry count when using log tools
- WebGPU probe status and last loss reason (if present)
Known Warnings
Do not treat these as root-cause failures by default when MCP calls succeed:
- DBus socket warnings in headless Linux
- DevTools autofill protocol warnings
- file descriptor comparison capability warning
Details: references/known-benign-warnings.md
Failure Handling
When preflight or smoke test fails:
- Stop with a clear timeout/process-exited reason.
- Include current
health response.
- Include launcher command used and elapsed attempts.
- Do not proceed to scenario actions until preflight is healthy.
References
- Startup/runbook:
docs/shell-desktop-mcp.md
- Tool sequencing examples:
references/tool-workflows.md
- Benign warning interpretation:
references/known-benign-warnings.md
- Preflight helper:
scripts/preflight-and-wait.sh
1---2name: shell-desktop-mcp3description: Operate the Idle Engine Electron shell through the shell-desktop MCP server, including deterministic simulation control, renderer/log/WebGPU diagnostics, window screenshots, shell input events, and compiled asset inspection. Use when tasks mention shell-desktop MCP, Electron shell automation, runtime debugging, or regression capture from desktop shell behavior.4license: Proprietary5---67# Shell Desktop MCP89## Overview1011Use this skill to drive the Electron shell via MCP with deterministic, testable workflows.12Always do preflight first, then run one focused operation batch per objective.1314## Path Resolution1516Skill-local paths (for example `scripts/...` and `references/...`) are relative to this directory:17`/codex/skills/shell-desktop-mcp`.1819## Standard Workflow20211. Confirm backend availability.222. Capture baseline shell/sim state.233. Run the requested simulation, window, input, or asset operations.244. For renderer/WebGPU investigations, run diagnostics tools in the same batch.255. Re-check state and summarize deltas.266. Capture reproducible evidence (status + screenshot/log payload) when relevant.2728## Preflight (Required)2930Run this sequence first:31321. Call `mcp__idle-engine-shell-desktop__health`.332. If health is not OK, start with bounded wait:3435```bash36bash /codex/skills/shell-desktop-mcp/scripts/preflight-and-wait.sh gateway-backend 18 1037```3839- Uses 18 attempts with 10-second interval (about 3 minutes max).40- Starts shell-desktop in detached mode (`nohup`) and writes PID/log paths.41- Requires stable health before success (two consecutive smoke checks + short guard window).42- Fails fast if the launcher process exits before health becomes OK.43443. Re-run `mcp__idle-engine-shell-desktop__health` and verify `ok: true`.454. Run MCP smoke test:4647```bash48pnpm shell:desktop:mcp:smoke49```50515. Capture baseline:52- `mcp__idle-engine-shell-desktop__sim_status`53- `mcp__idle-engine-shell-desktop__window_info`54- If diagnosing renderer/WebGPU: `renderer.status` (wrapper: `mcp__idle-engine-shell-desktop__renderer_status`) + `probe.webgpuHealth` (wrapper: `mcp__idle-engine-shell-desktop__probe_webgpuHealth`)5556If startup details are needed, use `docs/shell-desktop-mcp.md` in the repo.5758## Operation Patterns5960### Simulation Control6162- Use `mcp__idle-engine-shell-desktop__sim_start`, `mcp__idle-engine-shell-desktop__sim_pause`, `mcp__idle-engine-shell-desktop__sim_resume`, `mcp__idle-engine-shell-desktop__sim_stop` for lifecycle transitions.63- Use `mcp__idle-engine-shell-desktop__sim_step` only while paused for deterministic advancement.64- Use `mcp__idle-engine-shell-desktop__sim_enqueue` to inject runtime commands in deterministic order.65- `sim_enqueue` requires object commands (not strings). Minimal valid shape per command is `{ type: string }`.66- Example:6768```json69{70 "commands": [71 {72 "type": "TEST_COMMAND",73 "payload": { "source": "mcp" },74 "priority": 175 }76 ]77}78```79- Capture `mcp__idle-engine-shell-desktop__sim_status` before and after lifecycle mutations.8081### Window Diagnostics8283- Use `mcp__idle-engine-shell-desktop__window_info` to inspect bounds/url/devtools state.84- Use `mcp__idle-engine-shell-desktop__window_resize` before screenshot collection.85- Use `mcp__idle-engine-shell-desktop__window_devtools` only when renderer debugging is needed.86- Always verify `window_devtools` effects with a follow-up `window_info`.87- In some headless environments, `window_devtools` may return success while `devToolsOpen` remains `false`; treat this as an environment limitation unless other tool calls fail.88- Use `mcp__idle-engine-shell-desktop__window_screenshot` to collect bounded PNG evidence.8990### Input Injection9192- Use `mcp__idle-engine-shell-desktop__input_controlEvent` with explicit `intent`, `phase`, and optional `value`/`metadata`.93- Example:9495```json96{97 "intent": "collect",98 "phase": "start",99 "value": 1,100 "metadata": { "source": "mcp-skill-test" }101}102```103- After input injection, step or resume sim and capture resulting status and/or screenshot.104105## Full Surface Validation (Periodic)106107Use this when validating MCP server coverage end-to-end (for example when updating this skill):1081091. Run preflight + smoke.1102. Capture baseline: `health`, `sim_status`, `window_info`, `renderer_status`, `probe_webgpuHealth`.1113. Exercise window tools: `window_resize`, `window_screenshot`, `window_devtools`, `window_info`.1124. Exercise input/sim tools: `input_controlEvent`, `sim_pause`, `sim_step`, `sim_enqueue`, `sim_resume`, `sim_stop`, `sim_start`, `sim_status`.1135. Exercise asset tools: `asset_list` root, `asset_list` recursive, `asset_read` on a discovered file.1146. Exercise diagnostics tools: `logs_tail` (unfiltered + filtered) and `logs_since` with cursor polling.1157. Restore runtime state and window size (`1200x800` unless scenario requires otherwise), then capture final baseline snapshot.116117Report tool-by-tool status and any semantic gaps (for example "success response did not change observable state").118119### Diagnostics and Triage120121- Use `renderer.status` (wrapper: `mcp__idle-engine-shell-desktop__renderer_status`) to capture `#output` text, optional error banner text, and renderer state snapshots.122- Use `logs.tail` (wrapper: `mcp__idle-engine-shell-desktop__logs_tail`) for bounded recent diagnostics with optional filters: `source`, `subsystem`, `severity`, `limit`.123- Use `logs.since` (wrapper: `mcp__idle-engine-shell-desktop__logs_since`) for incremental polling from a cursor id when tracking live recovery/regressions.124- Use `probe.webgpuHealth` (wrapper: `mcp__idle-engine-shell-desktop__probe_webgpuHealth`) for machine-readable WebGPU status (`ok`, `lost`, `recovered`) plus last loss reason/timestamp.125- Prefer dotted tool names (`renderer.status`, `logs.since`, `probe.webgpuHealth`) in runbooks; expect underscore mapping in Codex tool wrappers.126127### Asset Inspection128129- Use `mcp__idle-engine-shell-desktop__asset_list` first.130- Use `mcp__idle-engine-shell-desktop__asset_read` only on discovered paths.131- Keep reads bounded with `maxBytes`.132133## Determinism and Evidence134135For reproducible debugging, prefer:1361371. `sim_pause`1382. `sim_step` with explicit step count1393. `window_screenshot` (bounded)1404. `sim_status`1415. Diagnostics snapshot (`renderer.status` + filtered `logs.tail` + `probe.webgpuHealth`) for renderer/WebGPU scenarios142143Always report:144145- exact `nextStep`146- step count used147- window size at screenshot time148- screenshot byte count149- diagnostics filters used (if any), `nextCursor`, and entry count when using log tools150- WebGPU probe status and last loss reason (if present)151152## Known Warnings153154Do not treat these as root-cause failures by default when MCP calls succeed:155156- DBus socket warnings in headless Linux157- DevTools autofill protocol warnings158- file descriptor comparison capability warning159160Details: `references/known-benign-warnings.md`161162## Failure Handling163164When preflight or smoke test fails:1651661. Stop with a clear timeout/process-exited reason.1672. Include current `health` response.1683. Include launcher command used and elapsed attempts.1694. Do not proceed to scenario actions until preflight is healthy.170171## References172173- Startup/runbook: `docs/shell-desktop-mcp.md`174- Tool sequencing examples: `references/tool-workflows.md`175- Benign warning interpretation: `references/known-benign-warnings.md`176- Preflight helper: `scripts/preflight-and-wait.sh`