Add Linux-first runtime and systemd deployment support - #618
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR adds Linux runtime detection, cross-platform process inspection, systemd service installation, Linux documentation, and CI coverage. It also adds headless browser handling and raises the Node.js minimum version to 20. ChangesLinux support
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant runLinuxServiceInstaller
participant installLinuxService
participant systemd
CLI->>runLinuxServiceInstaller: Run linux-service command
runLinuxServiceInstaller->>installLinuxService: Forward installer arguments
installLinuxService->>systemd: Verify and install service unit
systemd-->>installLinuxService: Return service status
installLinuxService-->>runLinuxServiceInstaller: Return exit status
runLinuxServiceInstaller-->>CLI: Report completion or error
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
.github/workflows/linux-ci.yml (1)
26-26: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winDisable persisted checkout credentials.
The workflow executes repository build and test code after checkout. Set
persist-credentials: falseon each checkout step because the workflow only needs read access during checkout.
.github/workflows/linux-ci.yml#L26-L26: addwith: persist-credentials: false..github/workflows/linux-ci.yml#L47-L47: addwith: persist-credentials: false..github/workflows/linux-ci.yml#L61-L61: addwith: persist-credentials: false.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/linux-ci.yml at line 26, Disable persisted checkout credentials on all three checkout steps in .github/workflows/linux-ci.yml at lines 26-26, 47-47, and 61-61 by adding the checkout action’s with configuration with persist-credentials set to false.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@LINUX.md`:
- Around line 93-98: Update the final journalctl command in the Linux
service-management instructions to invoke journalctl with sudo, while preserving
its existing service unit and time-filter arguments.
In `@src/platform/processes.ts`:
- Around line 93-104: Update the execFileAsync invocation in runPs to provide a
stable POSIX locale through its subprocess environment, using LC_ALL or
LC_NUMERIC set to C while preserving the existing options and output handling.
In `@src/tools/process.ts`:
- Around line 20-23: Extend SENSITIVE_FLAG_PATTERN and the redactProcessArgs
flow to recognize Windows-style sensitive switches using /name:value and /name
value forms, including command lines returned by listPlatformProcesses('win32').
Preserve existing hyphen-prefixed redaction and ensure sensitive values are
removed whenever includeArgs is true.
---
Nitpick comments:
In @.github/workflows/linux-ci.yml:
- Line 26: Disable persisted checkout credentials on all three checkout steps in
.github/workflows/linux-ci.yml at lines 26-26, 47-47, and 61-61 by adding the
checkout action’s with configuration with persist-credentials set to false.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 93ad690e-7b63-423c-bc70-3d46fda3f598
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (20)
.gitattributes.github/workflows/linux-ci.ymlLINUX.mdREADME.mddeploy/linux/desktop-commander-device.service.templatepackage.jsonscripts/install-linux-service.shsrc/config-manager.tssrc/handlers/process-handlers.tssrc/index.tssrc/npm-scripts/linux-service.tssrc/platform/processes.tssrc/platform/runtime.tssrc/remote-device/device-authenticator.tssrc/server.tssrc/tools/process.tssrc/tools/schemas.tssrc/utils/open-browser.tstest/test-linux-platform.jstest/test-linux-service-installer.js
|
Addressed all actionable CodeRabbit findings in 05c4267:\n\n- Disabled persisted checkout credentials in all Linux CI jobs.\n- Added sudo to the system journal command.\n- Forced LC_ALL=C for POSIX ps subprocesses.\n- Added Windows-style sensitive switch redaction, including /name:value, /name=value, /name value, /p, and /rp forms, with regression coverage.\n\nValidation: npm run test:linux passed; git diff --check passed. |
|
Fixed the failing Full Linux test suite in Root cause: the two jsdom-based Markdown editor tests imported Tiptap/ProseMirror without defining The tests now conditionally install jsdom's navigator before importing Tiptap. Validation:
|
Summary
Adds Linux-first runtime support for Desktop Commander across local MCP usage and headless remote-device deployments.
What changed
ps, while preserving the Windows CIM implementation.list_processessafe by default: command-line arguments are opt-in, paginated, truncated, and sensitive values are redacted.systemd-analyze verifybefore installation.Why
Desktop Commander previously relied on platform assumptions centered on Windows and macOS. Linux servers and VPS environments need native shell selection, safe process inspection, headless authorization, and a supervised service lifecycle without granting root access by default.
User impact
Linux users can run Desktop Commander as a local MCP server or a persistent headless remote device using systemd. Existing Windows and macOS behavior remains supported, while process output is now safer and bounded across all platforms.
Validation
npm run build— passednpm run test:linux— passedThe only failing test is the existing
test-enhanced-repl.jsWindows Python PATH detection test, which reports that neitherpython3norpythonis available despite Python being installed. No newly added Linux or process-safety tests failed.Summary by CodeRabbit