@mseep/clawdcursor 1.5.5
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/CHANGELOG.md +2264 -0
- package/LICENSE +21 -0
- package/README.md +385 -0
- package/SECURITY.md +44 -0
- package/SKILL.md +503 -0
- package/dist/core/agent-loop/agent.d.ts +42 -0
- package/dist/core/agent-loop/agent.js +1023 -0
- package/dist/core/agent-loop/agent.js.map +1 -0
- package/dist/core/agent-loop/batch-tool.d.ts +25 -0
- package/dist/core/agent-loop/batch-tool.js +218 -0
- package/dist/core/agent-loop/batch-tool.js.map +1 -0
- package/dist/core/agent-loop/coord-scale.d.ts +72 -0
- package/dist/core/agent-loop/coord-scale.js +89 -0
- package/dist/core/agent-loop/coord-scale.js.map +1 -0
- package/dist/core/agent-loop/focus-guard.d.ts +24 -0
- package/dist/core/agent-loop/focus-guard.js +29 -0
- package/dist/core/agent-loop/focus-guard.js.map +1 -0
- package/dist/core/agent-loop/project-mcp.d.ts +97 -0
- package/dist/core/agent-loop/project-mcp.js +253 -0
- package/dist/core/agent-loop/project-mcp.js.map +1 -0
- package/dist/core/agent-loop/prompt.d.ts +45 -0
- package/dist/core/agent-loop/prompt.js +426 -0
- package/dist/core/agent-loop/prompt.js.map +1 -0
- package/dist/core/agent-loop/tool-meta.d.ts +93 -0
- package/dist/core/agent-loop/tool-meta.js +651 -0
- package/dist/core/agent-loop/tool-meta.js.map +1 -0
- package/dist/core/agent-loop/tools.d.ts +38 -0
- package/dist/core/agent-loop/tools.js +2134 -0
- package/dist/core/agent-loop/tools.js.map +1 -0
- package/dist/core/agent-loop/types.d.ts +170 -0
- package/dist/core/agent-loop/types.js +12 -0
- package/dist/core/agent-loop/types.js.map +1 -0
- package/dist/core/agent.d.ts +51 -0
- package/dist/core/agent.js +245 -0
- package/dist/core/agent.js.map +1 -0
- package/dist/core/app-categories.d.ts +67 -0
- package/dist/core/app-categories.js +108 -0
- package/dist/core/app-categories.js.map +1 -0
- package/dist/core/banner.d.ts +70 -0
- package/dist/core/banner.js +245 -0
- package/dist/core/banner.js.map +1 -0
- package/dist/core/classify/capability.d.ts +45 -0
- package/dist/core/classify/capability.js +78 -0
- package/dist/core/classify/capability.js.map +1 -0
- package/dist/core/decompose/llm-decomposer.d.ts +35 -0
- package/dist/core/decompose/llm-decomposer.js +156 -0
- package/dist/core/decompose/llm-decomposer.js.map +1 -0
- package/dist/core/decompose/parser.d.ts +27 -0
- package/dist/core/decompose/parser.js +101 -0
- package/dist/core/decompose/parser.js.map +1 -0
- package/dist/core/observability/correlation.d.ts +19 -0
- package/dist/core/observability/correlation.js +36 -0
- package/dist/core/observability/correlation.js.map +1 -0
- package/dist/core/observability/cost-meter.d.ts +51 -0
- package/dist/core/observability/cost-meter.js +134 -0
- package/dist/core/observability/cost-meter.js.map +1 -0
- package/dist/core/observability/logger.d.ts +61 -0
- package/dist/core/observability/logger.js +550 -0
- package/dist/core/observability/logger.js.map +1 -0
- package/dist/core/router/aliases.d.ts +50 -0
- package/dist/core/router/aliases.js +104 -0
- package/dist/core/router/aliases.js.map +1 -0
- package/dist/core/router/normalize.d.ts +41 -0
- package/dist/core/router/normalize.js +80 -0
- package/dist/core/router/normalize.js.map +1 -0
- package/dist/core/safety.d.ts +126 -0
- package/dist/core/safety.js +568 -0
- package/dist/core/safety.js.map +1 -0
- package/dist/core/sense/a11y-resolver.d.ts +73 -0
- package/dist/core/sense/a11y-resolver.js +76 -0
- package/dist/core/sense/a11y-resolver.js.map +1 -0
- package/dist/core/sense/fingerprint.d.ts +41 -0
- package/dist/core/sense/fingerprint.js +123 -0
- package/dist/core/sense/fingerprint.js.map +1 -0
- package/dist/core/sense/rank.d.ts +70 -0
- package/dist/core/sense/rank.js +192 -0
- package/dist/core/sense/rank.js.map +1 -0
- package/dist/core/sense/reactive-check.d.ts +40 -0
- package/dist/core/sense/reactive-check.js +48 -0
- package/dist/core/sense/reactive-check.js.map +1 -0
- package/dist/core/sense/snapshot.d.ts +19 -0
- package/dist/core/sense/snapshot.js +100 -0
- package/dist/core/sense/snapshot.js.map +1 -0
- package/dist/core/sense/types.d.ts +66 -0
- package/dist/core/sense/types.js +9 -0
- package/dist/core/sense/types.js.map +1 -0
- package/dist/core/sense/ui-map-anchors.d.ts +7 -0
- package/dist/core/sense/ui-map-anchors.js +24 -0
- package/dist/core/sense/ui-map-anchors.js.map +1 -0
- package/dist/core/sense/ui-map-elements.d.ts +5 -0
- package/dist/core/sense/ui-map-elements.js +33 -0
- package/dist/core/sense/ui-map-elements.js.map +1 -0
- package/dist/core/sense/ui-map-find.d.ts +56 -0
- package/dist/core/sense/ui-map-find.js +153 -0
- package/dist/core/sense/ui-map-find.js.map +1 -0
- package/dist/core/sense/ui-map-fuse.d.ts +4 -0
- package/dist/core/sense/ui-map-fuse.js +44 -0
- package/dist/core/sense/ui-map-fuse.js.map +1 -0
- package/dist/core/sense/ui-map-geom.d.ts +3 -0
- package/dist/core/sense/ui-map-geom.js +16 -0
- package/dist/core/sense/ui-map-geom.js.map +1 -0
- package/dist/core/sense/ui-map-holder.d.ts +58 -0
- package/dist/core/sense/ui-map-holder.js +87 -0
- package/dist/core/sense/ui-map-holder.js.map +1 -0
- package/dist/core/sense/ui-map-normalize.d.ts +19 -0
- package/dist/core/sense/ui-map-normalize.js +65 -0
- package/dist/core/sense/ui-map-normalize.js.map +1 -0
- package/dist/core/sense/ui-map-render.d.ts +4 -0
- package/dist/core/sense/ui-map-render.js +34 -0
- package/dist/core/sense/ui-map-render.js.map +1 -0
- package/dist/core/sense/ui-map-resolve.d.ts +41 -0
- package/dist/core/sense/ui-map-resolve.js +59 -0
- package/dist/core/sense/ui-map-resolve.js.map +1 -0
- package/dist/core/sense/ui-map-types.d.ts +66 -0
- package/dist/core/sense/ui-map-types.js +11 -0
- package/dist/core/sense/ui-map-types.js.map +1 -0
- package/dist/core/sense/ui-map.d.ts +29 -0
- package/dist/core/sense/ui-map.js +113 -0
- package/dist/core/sense/ui-map.js.map +1 -0
- package/dist/core/verify/assertions.d.ts +132 -0
- package/dist/core/verify/assertions.js +284 -0
- package/dist/core/verify/assertions.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/llm/browser-config.d.ts +36 -0
- package/dist/llm/browser-config.js +83 -0
- package/dist/llm/browser-config.js.map +1 -0
- package/dist/llm/client.d.ts +268 -0
- package/dist/llm/client.js +1094 -0
- package/dist/llm/client.js.map +1 -0
- package/dist/llm/config.d.ts +79 -0
- package/dist/llm/config.js +375 -0
- package/dist/llm/config.js.map +1 -0
- package/dist/llm/credentials.d.ts +35 -0
- package/dist/llm/credentials.js +491 -0
- package/dist/llm/credentials.js.map +1 -0
- package/dist/llm/external-creds.d.ts +42 -0
- package/dist/llm/external-creds.js +169 -0
- package/dist/llm/external-creds.js.map +1 -0
- package/dist/llm/providers.d.ts +123 -0
- package/dist/llm/providers.js +717 -0
- package/dist/llm/providers.js.map +1 -0
- package/dist/paths.d.ts +31 -0
- package/dist/paths.js +147 -0
- package/dist/paths.js.map +1 -0
- package/dist/platform/accessibility.d.ts +139 -0
- package/dist/platform/accessibility.js +670 -0
- package/dist/platform/accessibility.js.map +1 -0
- package/dist/platform/cdp-driver.d.ts +318 -0
- package/dist/platform/cdp-driver.js +1179 -0
- package/dist/platform/cdp-driver.js.map +1 -0
- package/dist/platform/index.d.ts +11 -0
- package/dist/platform/index.js +69 -0
- package/dist/platform/index.js.map +1 -0
- package/dist/platform/keys.d.ts +17 -0
- package/dist/platform/keys.js +129 -0
- package/dist/platform/keys.js.map +1 -0
- package/dist/platform/launch-poll.d.ts +101 -0
- package/dist/platform/launch-poll.js +177 -0
- package/dist/platform/launch-poll.js.map +1 -0
- package/dist/platform/linux.d.ts +173 -0
- package/dist/platform/linux.js +1253 -0
- package/dist/platform/linux.js.map +1 -0
- package/dist/platform/macos.d.ts +136 -0
- package/dist/platform/macos.js +976 -0
- package/dist/platform/macos.js.map +1 -0
- package/dist/platform/native-desktop.d.ts +145 -0
- package/dist/platform/native-desktop.js +936 -0
- package/dist/platform/native-desktop.js.map +1 -0
- package/dist/platform/native-helper.d.ts +130 -0
- package/dist/platform/native-helper.js +592 -0
- package/dist/platform/native-helper.js.map +1 -0
- package/dist/platform/ocr-engine.d.ts +78 -0
- package/dist/platform/ocr-engine.js +363 -0
- package/dist/platform/ocr-engine.js.map +1 -0
- package/dist/platform/ps-runner.d.ts +28 -0
- package/dist/platform/ps-runner.js +228 -0
- package/dist/platform/ps-runner.js.map +1 -0
- package/dist/platform/types.d.ts +397 -0
- package/dist/platform/types.js +15 -0
- package/dist/platform/types.js.map +1 -0
- package/dist/platform/uri-handler.d.ts +75 -0
- package/dist/platform/uri-handler.js +273 -0
- package/dist/platform/uri-handler.js.map +1 -0
- package/dist/platform/wayland-backend.d.ts +53 -0
- package/dist/platform/wayland-backend.js +348 -0
- package/dist/platform/wayland-backend.js.map +1 -0
- package/dist/platform/windows.d.ts +232 -0
- package/dist/platform/windows.js +1210 -0
- package/dist/platform/windows.js.map +1 -0
- package/dist/postbuild.d.ts +10 -0
- package/dist/postbuild.js +98 -0
- package/dist/postbuild.js.map +1 -0
- package/dist/schema/snapshot.d.ts +33 -0
- package/dist/schema/snapshot.js +90 -0
- package/dist/schema/snapshot.js.map +1 -0
- package/dist/shortcuts.d.ts +30 -0
- package/dist/shortcuts.js +261 -0
- package/dist/shortcuts.js.map +1 -0
- package/dist/surface/cli.d.ts +7 -0
- package/dist/surface/cli.js +1556 -0
- package/dist/surface/cli.js.map +1 -0
- package/dist/surface/dashboard.d.ts +8 -0
- package/dist/surface/dashboard.js +1193 -0
- package/dist/surface/dashboard.js.map +1 -0
- package/dist/surface/doctor.d.ts +29 -0
- package/dist/surface/doctor.js +1514 -0
- package/dist/surface/doctor.js.map +1 -0
- package/dist/surface/format.d.ts +10 -0
- package/dist/surface/format.js +37 -0
- package/dist/surface/format.js.map +1 -0
- package/dist/surface/http-utility.d.ts +65 -0
- package/dist/surface/http-utility.js +336 -0
- package/dist/surface/http-utility.js.map +1 -0
- package/dist/surface/mcp-server.d.ts +91 -0
- package/dist/surface/mcp-server.js +280 -0
- package/dist/surface/mcp-server.js.map +1 -0
- package/dist/surface/onboarding.d.ts +15 -0
- package/dist/surface/onboarding.js +184 -0
- package/dist/surface/onboarding.js.map +1 -0
- package/dist/surface/pidfile.d.ts +79 -0
- package/dist/surface/pidfile.js +263 -0
- package/dist/surface/pidfile.js.map +1 -0
- package/dist/surface/readiness.d.ts +45 -0
- package/dist/surface/readiness.js +230 -0
- package/dist/surface/readiness.js.map +1 -0
- package/dist/surface/report.d.ts +68 -0
- package/dist/surface/report.js +341 -0
- package/dist/surface/report.js.map +1 -0
- package/dist/surface/skill-register.d.ts +14 -0
- package/dist/surface/skill-register.js +150 -0
- package/dist/surface/skill-register.js.map +1 -0
- package/dist/surface/version.d.ts +6 -0
- package/dist/surface/version.js +27 -0
- package/dist/surface/version.js.map +1 -0
- package/dist/tools/a11y.d.ts +8 -0
- package/dist/tools/a11y.js +545 -0
- package/dist/tools/a11y.js.map +1 -0
- package/dist/tools/a11y_depth.d.ts +19 -0
- package/dist/tools/a11y_depth.js +455 -0
- package/dist/tools/a11y_depth.js.map +1 -0
- package/dist/tools/agent.d.ts +15 -0
- package/dist/tools/agent.js +248 -0
- package/dist/tools/agent.js.map +1 -0
- package/dist/tools/batch.d.ts +46 -0
- package/dist/tools/batch.js +230 -0
- package/dist/tools/batch.js.map +1 -0
- package/dist/tools/cdp.d.ts +8 -0
- package/dist/tools/cdp.js +233 -0
- package/dist/tools/cdp.js.map +1 -0
- package/dist/tools/compact.d.ts +63 -0
- package/dist/tools/compact.js +418 -0
- package/dist/tools/compact.js.map +1 -0
- package/dist/tools/cost-class.d.ts +38 -0
- package/dist/tools/cost-class.js +117 -0
- package/dist/tools/cost-class.js.map +1 -0
- package/dist/tools/desktop.d.ts +9 -0
- package/dist/tools/desktop.js +346 -0
- package/dist/tools/desktop.js.map +1 -0
- package/dist/tools/electron_bridge.d.ts +41 -0
- package/dist/tools/electron_bridge.js +261 -0
- package/dist/tools/electron_bridge.js.map +1 -0
- package/dist/tools/extras.d.ts +22 -0
- package/dist/tools/extras.js +942 -0
- package/dist/tools/extras.js.map +1 -0
- package/dist/tools/favorites.d.ts +13 -0
- package/dist/tools/favorites.js +137 -0
- package/dist/tools/favorites.js.map +1 -0
- package/dist/tools/introspection.d.ts +13 -0
- package/dist/tools/introspection.js +55 -0
- package/dist/tools/introspection.js.map +1 -0
- package/dist/tools/ocr.d.ts +8 -0
- package/dist/tools/ocr.js +66 -0
- package/dist/tools/ocr.js.map +1 -0
- package/dist/tools/orchestration.d.ts +7 -0
- package/dist/tools/orchestration.js +377 -0
- package/dist/tools/orchestration.js.map +1 -0
- package/dist/tools/playbooks/extract-compose.d.ts +22 -0
- package/dist/tools/playbooks/extract-compose.js +85 -0
- package/dist/tools/playbooks/extract-compose.js.map +1 -0
- package/dist/tools/playbooks/find-replace.d.ts +11 -0
- package/dist/tools/playbooks/find-replace.js +56 -0
- package/dist/tools/playbooks/find-replace.js.map +1 -0
- package/dist/tools/playbooks/index.d.ts +63 -0
- package/dist/tools/playbooks/index.js +70 -0
- package/dist/tools/playbooks/index.js.map +1 -0
- package/dist/tools/playbooks/keys-blocklist.d.ts +24 -0
- package/dist/tools/playbooks/keys-blocklist.js +89 -0
- package/dist/tools/playbooks/keys-blocklist.js.map +1 -0
- package/dist/tools/registry.d.ts +40 -0
- package/dist/tools/registry.js +560 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/safety-gate.d.ts +16 -0
- package/dist/tools/safety-gate.js +70 -0
- package/dist/tools/safety-gate.js.map +1 -0
- package/dist/tools/scheduler.d.ts +76 -0
- package/dist/tools/scheduler.js +413 -0
- package/dist/tools/scheduler.js.map +1 -0
- package/dist/tools/shortcuts.d.ts +13 -0
- package/dist/tools/shortcuts.js +205 -0
- package/dist/tools/shortcuts.js.map +1 -0
- package/dist/tools/smart.d.ts +15 -0
- package/dist/tools/smart.js +785 -0
- package/dist/tools/smart.js.map +1 -0
- package/dist/tools/types.d.ts +174 -0
- package/dist/tools/types.js +67 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/tools/window-text.d.ts +15 -0
- package/dist/tools/window-text.js +39 -0
- package/dist/tools/window-text.js.map +1 -0
- package/dist/types.d.ts +122 -0
- package/dist/types.js +41 -0
- package/dist/types.js.map +1 -0
- package/native/Package.swift +38 -0
- package/native/README.md +113 -0
- package/native/Sources/ClawdCursorHelper/main.swift +602 -0
- package/native/Sources/ClawdCursorHost/main.swift +182 -0
- package/native/Sources/PermissionCheck/main.swift +53 -0
- package/native/Sources/ScreenshotHelper/main.swift +219 -0
- package/native/build.sh +139 -0
- package/native/entitlements.plist +12 -0
- package/package.json +115 -0
- package/scripts/banner.ps1 +112 -0
- package/scripts/coord-accuracy.ps1 +140 -0
- package/scripts/coord-uwp.ps1 +80 -0
- package/scripts/edge-glow.ps1 +180 -0
- package/scripts/find-element.ps1 +198 -0
- package/scripts/get-foreground-window.ps1 +71 -0
- package/scripts/get-screen-context.ps1 +183 -0
- package/scripts/get-windows.ps1 +66 -0
- package/scripts/install-panic-hotkey.ps1 +46 -0
- package/scripts/interact-element.ps1 +431 -0
- package/scripts/invoke-element.ps1 +314 -0
- package/scripts/linux/atspi-bridge.py +356 -0
- package/scripts/linux/ocr-recognize.py +154 -0
- package/scripts/mac/_window-picker.jxa +163 -0
- package/scripts/mac/find-element.jxa +0 -0
- package/scripts/mac/find-element.sh +161 -0
- package/scripts/mac/focus-window.jxa +284 -0
- package/scripts/mac/get-focused-element.jxa +102 -0
- package/scripts/mac/get-foreground-window.jxa +173 -0
- package/scripts/mac/get-screen-context.jxa +197 -0
- package/scripts/mac/get-ui-tree.sh +141 -0
- package/scripts/mac/get-windows.jxa +117 -0
- package/scripts/mac/interact-element.sh +235 -0
- package/scripts/mac/invoke-element.jxa +408 -0
- package/scripts/mac/ocr-recognize.swift +124 -0
- package/scripts/ocr-recognize.ps1 +102 -0
- package/scripts/postinstall-native.js +48 -0
- package/scripts/ps-bridge.ps1 +830 -0
- package/scripts/smoke-mcp.ps1 +119 -0
- package/scripts/sync-version.ts +178 -0
- package/scripts/verify-install.js +81 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 Amr Dabbas
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
<h1 align="center">Clawd Cursor</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<strong>Safe desktop control for any AI agent.</strong> Reads the screen through the accessibility tree (screenshots as fallback),<br>
|
|
5
|
+
<strong>verifies its own actions</strong>, and gates everything through one safety checkpoint. Local · cross-OS · any model.
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="LICENSE"><img src="https://img.shields.io/github/license/AmrDab/clawdcursor?color=a855f7" alt="MIT license"></a>
|
|
10
|
+
<a href="https://github.com/AmrDab/clawdcursor/releases/latest"><img src="https://img.shields.io/github/v/release/AmrDab/clawdcursor?color=22c55e&label=release" alt="Latest release"></a>
|
|
11
|
+
<a href="https://www.npmjs.com/package/clawdcursor"><img src="https://img.shields.io/npm/v/clawdcursor?color=cb3837&logo=npm" alt="npm"></a>
|
|
12
|
+
<img src="https://img.shields.io/badge/node-%E2%89%A520-339933?logo=nodedotjs&logoColor=white" alt="Node 20+">
|
|
13
|
+
<img src="https://img.shields.io/badge/platform-win%20%7C%20mac%20%7C%20linux-0ea5e9" alt="Cross-platform">
|
|
14
|
+
<a href="https://github.com/AmrDab/clawdcursor/actions/workflows/cross-platform.yml"><img src="https://img.shields.io/github/actions/workflow/status/AmrDab/clawdcursor/cross-platform.yml?branch=main&label=tests" alt="Tests"></a>
|
|
15
|
+
<a href="https://discord.gg/hW29nrEZ8G"><img src="https://img.shields.io/badge/Discord-join-5865F2?logo=discord&logoColor=white" alt="Discord"></a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<a href="#60-second-quickstart">Quickstart</a> ·
|
|
20
|
+
<a href="#why-its-different">Why it's different</a> ·
|
|
21
|
+
<a href="#the-engine">The engine</a> ·
|
|
22
|
+
<a href="#how-it-works">How it works</a> ·
|
|
23
|
+
<a href="#the-toolbox">Tools</a> ·
|
|
24
|
+
<a href="#platform-support">Platforms</a> ·
|
|
25
|
+
<a href="CHANGELOG.md">Changelog</a>
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
<!-- ───────────────────────────────────────────────────────────────────────────
|
|
29
|
+
DEMO: the single highest-leverage thing on this page for a *visual* tool.
|
|
30
|
+
Record a 15–25s screen capture of clawdcursor driving a real app end-to-end
|
|
31
|
+
(open app → find a field by name → type → verify), export to docs/demo.gif,
|
|
32
|
+
and uncomment the block below (it will sit right under the hero).
|
|
33
|
+
|
|
34
|
+
<p align="center">
|
|
35
|
+
<img src="docs/demo.gif" width="760" alt="clawdcursor driving a desktop app">
|
|
36
|
+
<br><em>Opening an app, finding a field by name, typing, and verifying the result — accessibility-first, locally.</em>
|
|
37
|
+
</p>
|
|
38
|
+
─────────────────────────────────────────────────────────────────────────── -->
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## What it is
|
|
43
|
+
|
|
44
|
+
Clawd Cursor is a **local MCP server** that gives any tool-calling agent — Claude Code, Cursor, Windsurf, OpenClaw, the Claude Agent SDK, or your own loop — safe control of the **real desktop**. It clicks, types, reads the screen, opens apps, and drives any GUI the way a human would: native apps, the browser, even a canvas.
|
|
45
|
+
|
|
46
|
+
Most "let an agent use the computer" tools take a screenshot and feed it to a vision model — slow, expensive, and brittle. Clawd Cursor reads the **accessibility tree** first (structured text, near-free, no vision model), falls back to OCR, and only reaches for pixels as a last resort. The result is cheaper, faster, private, and — uniquely — it **checks that each action actually did what it claimed**.
|
|
47
|
+
|
|
48
|
+
> **If a human can do it on a screen, your agent can too.** No API, no integration, no problem — only the right sequence of reads, clicks, keys, and waits. Use it as the **last-mile fallback**: native API exists? Use it. CLI? Use it. Clawd Cursor is for the click, the legacy app, the GUI with no public surface.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Why it's different
|
|
53
|
+
|
|
54
|
+
The desktop-agent space is crowded. The closest **install-and-go** peers are [Windows-MCP](https://github.com/CursorTouch/Windows-MCP) and [Terminator](https://t8r.tech/) (desktop MCP servers); browser-only tools (browser-use, Playwright MCP) are adjacent; and [OmniParser](https://github.com/microsoft/OmniParser) / [UI-TARS](https://github.com/bytedance/UI-TARS-desktop) are vision-centric *parsing approaches* you'd build an agent around, not products you install. Here's the honest comparison across those approaches — what Clawd Cursor does that the popular options don't:
|
|
55
|
+
|
|
56
|
+
| | **Clawd Cursor** | browser-use | Playwright MCP | OmniParser / UI-TARS | computer-use |
|
|
57
|
+
|------------------------------------------|:-----------------------:|:-----------:|:--------------:|:--------------------:|:------------:|
|
|
58
|
+
| Any desktop app, not just the web | ✅ | web only | web only | ✅ | ✅ |
|
|
59
|
+
| Cross-OS (Windows + macOS + Linux) | ✅ | — | — | varies | sandbox |
|
|
60
|
+
| Perception **without a vision model** | ✅ a11y → OCR → vision | DOM | a11y tree | ❌ vision-centric | ❌ vision |
|
|
61
|
+
| **Verifies its own actions** (deviation) | ✅ | — | — | — | — |
|
|
62
|
+
| Single safety chokepoint (allow/confirm/block) | ✅ | — | — | — | — |
|
|
63
|
+
| Any model / vendor | ✅ | ✅ | not an agent | model-specific | Claude only |
|
|
64
|
+
| MCP-native (one config, any host) | ✅ | library | test framework | — | tool-use API |
|
|
65
|
+
| Local-only, no cloud required | ✅ | ✅ | ✅ | needs a model | screens → cloud |
|
|
66
|
+
|
|
67
|
+
Three things here are genuinely rare:
|
|
68
|
+
|
|
69
|
+
1. **Cheapest-tier-first perception, fully local.** Accessibility tree (free) → OCR (cheap) → screenshot (expensive — the *only* tier that puts pixels in the model's context; "screenshot" and "vision" are the same step). The agent climbs only when it must, so token cost tracks task difficulty — and with a local model, nothing leaves the machine. Vision-centric agents (OmniParser, UI-TARS) need a screenshot in the model for *every* observation.
|
|
70
|
+
2. **It verifies.** Pass `expect` on a consequential action and Clawd Cursor re-checks the live screen (with a short settle window for async UIs) and reports a **DEVIATION** instead of a hollow "success." A completed task can't be marked done on evidence that was already true before it acted.
|
|
71
|
+
3. **One safety gate.** Every call — from an editor over stdio, an external agent over HTTP, or the built-in loop — routes through a single `safety.evaluate()` chokepoint (allow / confirm / block) before it touches the desktop. The agent cannot bypass it.
|
|
72
|
+
|
|
73
|
+
Plus: an on-screen **"desktop control in progress" banner** with a blinking red dot whenever an agent is driving — **double-click it to stop.** A human at the machine always knows, and always has a kill switch.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 60-second Quickstart
|
|
78
|
+
|
|
79
|
+
**Install (any OS):**
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npm i -g clawdcursor
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
<details>
|
|
86
|
+
<summary>Or one line per OS (clones, builds, handles the macOS native build)</summary>
|
|
87
|
+
|
|
88
|
+
```powershell
|
|
89
|
+
# Windows (PowerShell)
|
|
90
|
+
powershell -c "irm https://clawdcursor.com/install.ps1 | iex"
|
|
91
|
+
```
|
|
92
|
+
```bash
|
|
93
|
+
# macOS / Linux
|
|
94
|
+
curl -fsSL https://clawdcursor.com/install.sh | bash
|
|
95
|
+
```
|
|
96
|
+
</details>
|
|
97
|
+
|
|
98
|
+
**Set up — this is the whole thing for the common case** (your agent drives over MCP):
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
clawdcursor consent --accept # one-time consent (required) — also registers the
|
|
102
|
+
# clawdcursor *skill* in your agents (Claude Code,
|
|
103
|
+
# OpenClaw, Codex, Cursor); re-run: clawdcursor register-skill
|
|
104
|
+
clawdcursor grant # macOS only — approve Accessibility + Screen Recording
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Wire it into your editor** (Claude Code, Cursor, Windsurf, Zed):
|
|
108
|
+
|
|
109
|
+
```jsonc
|
|
110
|
+
// ~/.claude/settings.json (or your editor's MCP config)
|
|
111
|
+
{
|
|
112
|
+
"mcpServers": {
|
|
113
|
+
"clawdcursor": { "command": "clawdcursor", "args": ["mcp", "--compact"] }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
That's it. Ask your agent to *"open Outlook and reply to the latest email from Sarah"* and watch it run.
|
|
119
|
+
|
|
120
|
+
> **You never run `clawdcursor mcp` yourself** — the editor spawns it over stdio on demand. `clawdcursor doctor` is **not** part of MCP setup; it only configures the built-in LLM for the autonomous `agent` daemon. On macOS, **Accessibility is required** (the primary control path); **Screen Recording is optional** (only the vision fallback needs it).
|
|
121
|
+
|
|
122
|
+
> **Editor permission allowlists:** use the server-level wildcard `"mcp__clawdcursor"` rather than per-tool entries — it covers every tool and survives tool renames across versions.
|
|
123
|
+
|
|
124
|
+
### Or install the Claude Code plugin (no hand-edited config)
|
|
125
|
+
|
|
126
|
+
If you use **Claude Code**, you can skip the manual `mcpServers` block above. This
|
|
127
|
+
repo ships a plugin (`.claude-plugin/plugin.json`) that registers the MCP server
|
|
128
|
+
**and** bundles the usage skill in one step. It launches the server with
|
|
129
|
+
`npx -y clawdcursor mcp --compact`, so there's **nothing to install first** —
|
|
130
|
+
npx fetches clawdcursor on demand (or uses your global install if you have one), and
|
|
131
|
+
because it resolves the package's `bin` (never a hard-coded `dist/` path) it can't be
|
|
132
|
+
broken by an entry-point change on upgrade.
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# load the plugin for one session straight from a checkout…
|
|
136
|
+
claude --plugin-dir /path/to/clawdcursor
|
|
137
|
+
# …or add this repo to a plugin marketplace for a persistent install.
|
|
138
|
+
|
|
139
|
+
# one-time desktop-control consent (npx fetches the bin if you don't have it):
|
|
140
|
+
npx -y clawdcursor consent --accept
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
> **Requires Node.js 20+** (for `npx`, which ships with Node). The first launch
|
|
144
|
+
> downloads clawdcursor into npx's cache; later launches reuse it — no global
|
|
145
|
+
> install and no `PATH` shim to resolve.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## The engine
|
|
150
|
+
|
|
151
|
+
The perception + verification core (the **UI State Compiler**, since v1.5.0):
|
|
152
|
+
|
|
153
|
+
- **`compile_ui`** fuses the accessibility tree and OCR into one confidence-scored map of the screen, every element tagged with a stable `el_NN` id. Act on an element by `{element_id, snapshot_id}` instead of pixels — near-free in tokens, and it survives DPI, resize, and layout shifts. `find_button` / `find_field` locate a target by meaning and hand you the id.
|
|
154
|
+
- **Reactive verification.** `expect` on an action → Clawd Cursor confirms the outcome on the live screen and returns a **DEVIATION** when the UI didn't obey.
|
|
155
|
+
- **Cross-platform parity.** The compiler, secure-field redaction, and coordinate handling run on Windows, macOS, and Linux; the external-agent (MCP) surface resolves `el_NN` refs through the safety gate and discloses when it attached to your existing browser.
|
|
156
|
+
|
|
157
|
+
> Set-of-Mark-style element IDs and a11y/OCR fusion aren't new ideas on their own — what's rare is doing them **locally, a11y-first (no vision model required), with a built-in verification gate and one safety chokepoint**, across three operating systems, behind a single MCP config.
|
|
158
|
+
|
|
159
|
+
See the [changelog](CHANGELOG.md) for the full release history (latest: **v1.5.2** — perception reliability, honest verification, the control banner).
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## How it works
|
|
164
|
+
|
|
165
|
+
**Where the brain lives** decides how you run it. Both modes can run side-by-side.
|
|
166
|
+
|
|
167
|
+
| Brain lives… | Mode | Command | What you call |
|
|
168
|
+
|---|---|---|---|
|
|
169
|
+
| In your editor (Claude Code, Cursor, Windsurf, Zed) | Direct tools | `clawdcursor mcp` | Each tool, via stdio MCP |
|
|
170
|
+
| In a headless agent with its own LLM (OpenClaw, Agent SDK, your loop) | Direct tools | `clawdcursor agent --no-llm` | Same, over HTTP MCP |
|
|
171
|
+
| Inside Clawd Cursor itself (scheduled / "submit and walk away") | Thin agent loop | `clawdcursor agent` + `doctor`-configured LLM | `task` / `submit_task` |
|
|
172
|
+
| External brain that delegates sub-tasks to the built-in loop | Direct + delegation | `clawdcursor agent` + your client | `task({instruction:…})` to hand off |
|
|
173
|
+
|
|
174
|
+
### The loop
|
|
175
|
+
|
|
176
|
+
Read the a11y tree (cheap) → act on named targets → verify from fresh observations → escalate perception only when needed (OCR → screenshot, the one tier that sends pixels to the model). Sparse a11y tree? `system.detect_webview` switches Electron/WebView2 apps to `browser.*` over CDP. Canvas-only (Paint, Figma, games)? Screenshot + coordinate click.
|
|
177
|
+
|
|
178
|
+
```mermaid
|
|
179
|
+
flowchart TB
|
|
180
|
+
task["User task"] --> loop["Agent LLM loop<br/>plans · chooses tools · verifies"]
|
|
181
|
+
loop --> observe{"Cheapest observation<br/>that answers the question"}
|
|
182
|
+
|
|
183
|
+
observe -- "obs·a11y — free" --> a11y["A11y tree<br/>(structured text + el_NN handles)"]
|
|
184
|
+
observe -- "obs·ocr — cheap" --> ocr["OCR (OS-level, no vision LLM)"]
|
|
185
|
+
observe -- "obs·dom — medium" --> dom["Browser DOM (CDP)"]
|
|
186
|
+
observe -- "obs·vision — expensive" --> vision["Screenshot (image into context)"]
|
|
187
|
+
|
|
188
|
+
a11y --> act
|
|
189
|
+
ocr --> act
|
|
190
|
+
dom --> act
|
|
191
|
+
vision --> act
|
|
192
|
+
|
|
193
|
+
act["Act<br/>click/type/key/drag · invoke/set_value · open_app · batch"] --> safety
|
|
194
|
+
safety["Single safety gate<br/>safety.evaluate() → allow / confirm / block"] -- allowed --> tools["Tool registry<br/>98 granular + 7 compound"]
|
|
195
|
+
safety -- needs user --> confirm["Human confirmation"] --> tools
|
|
196
|
+
safety -- denied --> blocked["blocked"]
|
|
197
|
+
|
|
198
|
+
tools --> desktop["Real desktop"]
|
|
199
|
+
desktop --> verify{"expect → does state match?"}
|
|
200
|
+
verify -- pass --> done["done"]
|
|
201
|
+
verify -- "DEVIATION" --> loop
|
|
202
|
+
|
|
203
|
+
classDef agentNode fill:#dbeafe,stroke:#2563eb,color:#0f172a;
|
|
204
|
+
classDef gate fill:#ede9fe,stroke:#7c3aed,color:#0f172a;
|
|
205
|
+
classDef obsNode fill:#fef9c3,stroke:#ca8a04,color:#0f172a;
|
|
206
|
+
classDef actNode fill:#ffedd5,stroke:#ea580c,color:#0f172a;
|
|
207
|
+
classDef stop fill:#fee2e2,stroke:#dc2626,color:#0f172a;
|
|
208
|
+
class loop,verify agentNode;
|
|
209
|
+
class safety,confirm,tools gate;
|
|
210
|
+
class observe,a11y,ocr,dom,vision obsNode;
|
|
211
|
+
class act actNode;
|
|
212
|
+
class blocked stop;
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**`batch` for deterministic stretches.** When the next N steps are known, collapse them into one call — each step still routes through the safety gate; on any guard miss or error the batch halts with a per-step trace.
|
|
216
|
+
|
|
217
|
+
**Task delegation.** With an LLM configured on the daemon, an external agent can hand off at any point: `task({"instruction":"…"})`. The built-in loop takes the wheel and reports back — offload grunt work to a cheaper model without burning your own context.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## The toolbox
|
|
222
|
+
|
|
223
|
+
Two catalogs ship side-by-side. The **toolbox** is 7 compound tools, each with an `action` enum covering ~10–20 verbs (~1,500 tokens total — about 12× smaller than granular, the `computer_20250124` shape editor hosts already know). The **granular** surface is the 98 underlying primitives, one schema per verb (for runtimes that need top-level tools, or for debugging). Both run through the same `safety.evaluate()` chokepoint; the full catalog is always visible via MCP `tools/list`.
|
|
224
|
+
|
|
225
|
+
| Toolbox | Actions |
|
|
226
|
+
|---|---|
|
|
227
|
+
| `computer` | `screenshot`, `click`, `double_click`, `right_click`, `triple_click`, `hover`, `move`, `scroll`, `scroll_horizontal`, `drag`, `drag_path`, `type`, `key`, `wait` |
|
|
228
|
+
| `accessibility` | `read_tree`, `find`, `get_element`, `focused`, `invoke`, `focus`, `set_value`, `get_value`, `expand`, `collapse`, `toggle`, `select`, `state`, `list_children`, `wait_for`, `compile_ui`, `find_button`, `find_field`, `smart_click`, `smart_type`, `smart_read` |
|
|
229
|
+
| `window` | `list`, `active`, `focus`, `maximize`, `minimize`, `restore`, `close`, `resize`, `list_displays`, `screen_size`, `open_app`, `open_file`, `open_url`, `switch_tab`, `navigate` |
|
|
230
|
+
| `system` | `clipboard_read`, `clipboard_write`, `system_time`, `ocr`, `undo`, `shortcuts_list`, `shortcuts_run`, `delegate`, `detect_webview`, `relaunch_with_cdp`, `system_prompt`, `build_uri`, `open_uri`, `open_app`, `open_file`, `open_url`, `detect_app`, `app_guide`, `learn_app` |
|
|
231
|
+
| `browser` | `connect`, `page_context`, `read_text`, `click`, `type`, `select_option`, `evaluate`, `wait_for`, `list_tabs`, `switch_tab`, `scroll` |
|
|
232
|
+
| `task` | `run` (default; **bounded-sync** — waits up to `timeout`s, returns `{status:"running"}` + progress if longer, re-call to keep waiting), `status`, `abort`. Delegates to the built-in loop. Requires `clawdcursor agent` with an LLM. |
|
|
233
|
+
| `batch` | `{steps:[…]}` — collapse N calls into one round-trip; each step `{name, arguments, expect?}`, re-perceived and safety-gated, halts with a trace on any miss. |
|
|
234
|
+
|
|
235
|
+
```js
|
|
236
|
+
computer({ action: "key", combo: "mod+s" }) // Cmd+S / Ctrl+S, resolved per-OS
|
|
237
|
+
accessibility({ action: "invoke", name: "Send" }) // click by name, not pixels
|
|
238
|
+
window({ action: "open_app", name: "Outlook" })
|
|
239
|
+
task({ instruction: "open Notepad and type hello" }) // hand off to the thin loop
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Cheapest-tier-first perception
|
|
245
|
+
|
|
246
|
+
Every observation has a cost. Start at the cheapest rung that works; climb only when it fails. The live log (`CLAWD_LOG=pretty`, default on a TTY) shows the ladder in real time via per-call badges.
|
|
247
|
+
|
|
248
|
+
| Tier | Badge | Cost | Source | When |
|
|
249
|
+
|---|---|---|---|---|
|
|
250
|
+
| **T1** structured | `obs·a11y` | ~free | `accessibility.*`, `window.*`, `browser.read_text`, clipboard | Default. Text + bounds, no image, no vision LLM. |
|
|
251
|
+
| **T2** OCR | `obs·ocr` | cheap | `system.ocr`, `smart_read` / `smart_click` / `smart_type` | A11y tree empty/sparse. OS-level text out, no image bytes. |
|
|
252
|
+
| **T3** DOM | `obs·dom` | medium | `browser.read_text` / `page_context` (CDP) | WebView / Electron / Chrome content. |
|
|
253
|
+
| **T4** screenshot (vision) | `obs·vision` | expensive | `computer.screenshot` | The only tier that puts pixels in the model's context. Canvas-only apps or spatial reasoning. Last resort. |
|
|
254
|
+
|
|
255
|
+
Acting tools log `act`. Watching `obs·a11y → act → obs·a11y` on a normal turn — and the rare climb to `obs·vision` — is the whole efficiency model, visible.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Transports
|
|
260
|
+
|
|
261
|
+
One protocol — **MCP** — two transports, same catalog and JSON-RPC envelope. Both stateless; no session handshake.
|
|
262
|
+
|
|
263
|
+
| Transport | When | Client config |
|
|
264
|
+
|---|---|---|
|
|
265
|
+
| **stdio MCP** | Editor hosts. Tools appear on demand — no daemon. | `{"command":"clawdcursor","args":["mcp","--compact"]}` |
|
|
266
|
+
| **HTTP MCP** | Headless agents, daemons, orchestration, Agent SDK. POST JSON-RPC to `http://127.0.0.1:3847/mcp`. | Run `clawdcursor agent`. Bearer token at `~/.clawdcursor/token`. |
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
# HTTP MCP — list tools
|
|
270
|
+
curl -s -X POST http://127.0.0.1:3847/mcp \
|
|
271
|
+
-H "Authorization: Bearer $(cat ~/.clawdcursor/token)" \
|
|
272
|
+
-H "Content-Type: application/json" \
|
|
273
|
+
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Platform support
|
|
279
|
+
|
|
280
|
+
Platform code lives behind a single `PlatformAdapter` interface (`src/platform/{windows,macos,linux}.ts` + `wayland-backend.ts`). Business logic never reads `process.platform`.
|
|
281
|
+
|
|
282
|
+
| Platform | UI Automation | OCR | Browser (CDP) | Input |
|
|
283
|
+
|---|---|---|---|---|
|
|
284
|
+
| **Windows** 10/11 (x64 / ARM64) | UIA via PowerShell bridge | `Windows.Media.Ocr` | Chrome / Edge | nut-js |
|
|
285
|
+
| **macOS** 12+ (Intel / Apple Silicon) | JXA + System Events (TCC-safe) | Apple Vision | Chrome / Edge | nut-js + System Events |
|
|
286
|
+
| **Linux** X11 | AT-SPI via `python3-gi` | Tesseract | Chrome / Edge | nut-js |
|
|
287
|
+
| **Linux** Wayland | AT-SPI via `python3-gi` | Tesseract | Chrome / Edge | `ydotool` / `wtype` |
|
|
288
|
+
|
|
289
|
+
- **Windows** — no setup; the PowerShell bridge spawns on demand.
|
|
290
|
+
- **macOS** — first run needs Accessibility (required) + Screen Recording (optional); `clawdcursor grant` walks the dialogs. Retina/HiDPI handled in-adapter — **don't pre-scale coordinates.**
|
|
291
|
+
- **Linux X11** — `apt install tesseract-ocr python3-gi gir1.2-atspi-2.0`.
|
|
292
|
+
- **Linux Wayland** — same, plus `ydotool` + `ydotoold` (preferred) or `wtype` (keyboard only).
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## Safety & privacy
|
|
297
|
+
|
|
298
|
+
| Tier | Actions | Behavior |
|
|
299
|
+
|---|---|---|
|
|
300
|
+
| **Allow** | Reading, opening apps, navigation, typing into non-sensitive fields, minimize | Executes immediately |
|
|
301
|
+
| **Confirm** | Sends, deletes, purchases, transfers, close-window/quit-app & show-desktop key combos, sensitive apps | Pauses for approval (`batch({allowConfirm:true})` to authorize) |
|
|
302
|
+
| **Block** | `Ctrl+Alt+Del`, lock / log-out / force-quit / shutdown key sequences | Refused outright (no path) |
|
|
303
|
+
|
|
304
|
+
- **Network isolation.** Binds to `127.0.0.1`. Verify: `netstat -an | findstr 3847` (Windows) / `| grep 3847` (Unix).
|
|
305
|
+
- **Bearer-token auth** on every HTTP request (`~/.clawdcursor/token`).
|
|
306
|
+
- **Sensitive-app policy.** Email, banking, password managers, private messaging auto-elevate to Confirm.
|
|
307
|
+
- **No telemetry by default.** Nothing phones home. Screenshots stay in RAM; with a local model nothing leaves the machine; with a cloud provider, screenshots go only to the endpoint you configured. `clawdcursor report` is opt-in and previews exactly what it sends.
|
|
308
|
+
- **Prompt-injection defense.** Screen text is returned inside `<untrusted-screen-content>` tags — data, never instructions.
|
|
309
|
+
- **Log privacy.** Logs redact password-field values (`AXSecureTextField`, UIA `IsPassword=true`).
|
|
310
|
+
|
|
311
|
+
See [SECURITY.md](SECURITY.md) for private vulnerability reporting.
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## Architecture
|
|
316
|
+
|
|
317
|
+
| Directory | What lives here |
|
|
318
|
+
|---|---|
|
|
319
|
+
| `src/core/` | Thin agent loop (`runAgent`), sense layer (a11y / snapshot / fingerprint / UI compiler), reactive verification, focus guard, safety gate. |
|
|
320
|
+
| `src/tools/` | 98 granular tools + 7 compound aggregators + `batch`, playbooks, registry, dispatch. |
|
|
321
|
+
| `src/platform/` | `PlatformAdapter` + Windows / macOS / Linux / Wayland, OCR engine, CDP driver, URI handler. |
|
|
322
|
+
| `src/llm/` | Provider clients (Claude, GPT, Gemini, Llama, Kimi, Ollama, …), credentials, model config. |
|
|
323
|
+
| `src/surface/` | CLI, MCP server (stdio + HTTP), dashboard, doctor, onboarding, control banner. |
|
|
324
|
+
|
|
325
|
+
The `PlatformAdapter` is the only thing platform code talks to; `safety.evaluate()` is the only way tools execute. Those two seams are the whole point.
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## CLI
|
|
330
|
+
|
|
331
|
+
For humans diagnosing an install. Agents connect via MCP.
|
|
332
|
+
|
|
333
|
+
```
|
|
334
|
+
clawdcursor consent Manage desktop-control consent (--accept / --revoke / --status)
|
|
335
|
+
clawdcursor grant Grant macOS permissions (interactive, macOS only)
|
|
336
|
+
clawdcursor doctor Configure the AI provider for `agent` mode (+ diagnostics)
|
|
337
|
+
clawdcursor status Readiness check (consent, permissions, AI config)
|
|
338
|
+
clawdcursor mcp stdio MCP server — editor hosts spawn this; you don't
|
|
339
|
+
clawdcursor agent Daemon: HTTP MCP on :3847, optional built-in thin loop
|
|
340
|
+
clawdcursor agent --no-llm Daemon, tool surface only (no built-in brain)
|
|
341
|
+
clawdcursor stop Stop every running mode
|
|
342
|
+
clawdcursor uninstall Remove all config and data
|
|
343
|
+
|
|
344
|
+
Options: --port <n> (default 3847) · --compact · --no-banner · --provider <name> · --accept
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
## Development
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
git clone https://github.com/AmrDab/clawdcursor.git && cd clawdcursor
|
|
353
|
+
npm install
|
|
354
|
+
npm run build # tsc + postbuild → dist/surface/cli.js
|
|
355
|
+
npm test # vitest (1,000+ tests)
|
|
356
|
+
npm run lint # eslint
|
|
357
|
+
npm link # global `clawdcursor` shim (Admin shell on Windows)
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
Tests run on Node 20 & 22 against Ubuntu, macOS, and Windows in CI, plus a coverage ratchet, a perf tripwire, and an `npm audit` gate.
|
|
361
|
+
|
|
362
|
+
**Tech:** TypeScript · Node 20+ · nut-js · Playwright · sharp · Express · Model Context Protocol SDK · Zod · commander.
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## Contributing
|
|
367
|
+
|
|
368
|
+
PRs welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) for the dev loop, branch conventions, and the test matrix every change clears. Bugs and features in [issues](https://github.com/AmrDab/clawdcursor/issues); private security reports via [SECURITY.md](SECURITY.md).
|
|
369
|
+
|
|
370
|
+
## License
|
|
371
|
+
|
|
372
|
+
MIT — see [LICENSE](LICENSE).
|
|
373
|
+
|
|
374
|
+
## Acknowledgments
|
|
375
|
+
|
|
376
|
+
Built on the Model Context Protocol SDK, nut-js, Playwright, the Anthropic `computer_20250124` tool shape, and the AT-SPI / UIA / AX trees that make app-agnostic GUI automation possible at all.
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
<p align="center">
|
|
381
|
+
<a href="https://clawdcursor.com">clawdcursor.com</a> ·
|
|
382
|
+
<a href="https://discord.gg/hW29nrEZ8G">Discord</a> ·
|
|
383
|
+
<a href="CHANGELOG.md">Changelog</a> ·
|
|
384
|
+
<a href="https://www.npmjs.com/package/clawdcursor">npm</a>
|
|
385
|
+
</p>
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
Clawd Cursor runs with high-trust OS permissions: Accessibility on macOS (full input + UI tree read), Screen Recording on macOS (frame capture for OCR/vision), UI Automation + global hooks on Windows, AT-SPI + `ydotool`/`wtype` on Linux. A vulnerability in this codebase, in a dependency it ships, or in the local MCP surfaces it exposes can give an attacker the same control over the user's desktop session that the user has themselves.
|
|
4
|
+
|
|
5
|
+
We take that seriously. **Please do not report security issues in public GitHub issues, pull requests, or the Discord.**
|
|
6
|
+
|
|
7
|
+
## Reporting a vulnerability
|
|
8
|
+
|
|
9
|
+
There are two private channels:
|
|
10
|
+
|
|
11
|
+
1. **GitHub Private Vulnerability Reporting** (preferred). Open the [Security tab](https://github.com/AmrDab/clawdcursor/security/advisories/new) on this repo and click "Report a vulnerability". This creates a private advisory only the maintainers can see and lets us collaborate on a fix and a coordinated disclosure inside GitHub.
|
|
12
|
+
|
|
13
|
+
2. **Email**: `amraldabbas19@gmail.com` with subject prefix `[clawdcursor security]`. PGP not currently offered.
|
|
14
|
+
|
|
15
|
+
If you have not received an acknowledgment within 72 hours, please follow up — incoming mail is occasionally lost to spam filters.
|
|
16
|
+
|
|
17
|
+
## What to include
|
|
18
|
+
|
|
19
|
+
A useful report tells us:
|
|
20
|
+
|
|
21
|
+
- The clawdcursor version (`clawdcursor --version`) and the OS + version it's running on.
|
|
22
|
+
- Which surface is affected: MCP stdio (`clawdcursor mcp`), MCP HTTP (`clawdcursor agent` on `127.0.0.1:3847/mcp`), the autonomous `agent` loop, the `guides` marketplace fetch path, the installer, or a dependency.
|
|
23
|
+
- A minimal reproducer or proof-of-concept. Logs from `CLAWD_LOG=debug` are helpful.
|
|
24
|
+
- Your assessment of impact — local privilege use, cross-process exfiltration, remote exposure, etc.
|
|
25
|
+
|
|
26
|
+
## Scope — what counts as a vulnerability
|
|
27
|
+
|
|
28
|
+
**In scope:**
|
|
29
|
+
|
|
30
|
+
- Bypasses of the SafetyLayer chokepoint that allow destructive verbs (e.g. `delete`, `send`, `close_window`, blocked keyboard combos like `Cmd+Q`) to execute without the documented confirm/escalation.
|
|
31
|
+
- Remote-attacker access to the localhost MCP HTTP surface — including unintended exposure on a non-loopback interface, missing/weak bearer-token enforcement on `POST /mcp`, or auth-bypass via path traversal / proxy confusion.
|
|
32
|
+
- Code execution from user-controllable input that does not require pre-existing local code execution (e.g. a malicious tool argument that escapes the safety layer and runs arbitrary shell, or a poisoned guide fetched from the marketplace registry that bypasses `lintGuide` and injects instructions into the agent prompt).
|
|
33
|
+
- Token theft — the bearer token at `~/.clawdcursor/token` being leaked through logs, error responses, or a CORS misconfiguration that lets a webpage in the local browser read it.
|
|
34
|
+
- Supply-chain issues in pinned dependencies (`package-lock.json`) that have a fixed version available, or in the guides registry at `clawdcursor.com/app-guides` / `AmrDab/clawdcursor-guides`.
|
|
35
|
+
|
|
36
|
+
**Out of scope:**
|
|
37
|
+
|
|
38
|
+
- Anything that requires the user to first run untrusted code on their machine — clawdcursor is a local tool that the user explicitly grants high permissions to. We do not defend against malware that already has those permissions.
|
|
39
|
+
- Issues in `@nut-tree-fork/nut-js`, `playwright`, `sharp`, or other dependencies should be reported upstream first; we will track them but cannot patch them in clawdcursor alone.
|
|
40
|
+
- Best-practice gripes about TypeScript style, missing rate-limiting on a localhost-only port, etc. — file a normal issue or PR.
|
|
41
|
+
|
|
42
|
+
## Disclosure
|
|
43
|
+
|
|
44
|
+
We aim to ship a fix within 14 days for high-severity issues and to publish an advisory crediting the reporter (unless you'd rather stay anonymous) once users have had a reasonable window to upgrade.
|