2.9 KiB
2.9 KiB
summary, read_when
| summary | read_when | |||
|---|---|---|---|---|
| Refactor: unify on the clawdbot CLI + gateway-first control; retire clawdbot-mac |
|
CLI unification (clawdbot-only)
Status: active refactor · Date: 2025-12-20
Goals
- Single CLI: use
clawdbotfor all automation (local + remote). Retireclawdbot-mac. - Gateway-first: all agent actions flow through the Gateway WebSocket + node.invoke.
- Permission awareness: nodes advertise permission state so the agent can decide what to run.
- No duplicate paths: remove macOS control socket + Swift CLI surface.
Non-goals
- Keep legacy
clawdbot-maccompatibility. - Support agent control when no Gateway is running.
Key decisions
-
No Gateway → no control
- If the macOS app is running but the Gateway is not, remote commands (canvas/run/notify) are unavailable.
- This is acceptable to keep one network surface.
-
Remove ensure-permissions CLI
- Permissions are advertised by the node (e.g., screen recording granted/denied).
- Commands will still fail with explicit errors when permissions are missing.
-
Mac app installs/symlinks
clawdbot- Bundle a standalone
clawdbotbinary in the app (bun-compiled). - Install/symlink that binary to
/usr/local/bin/clawdbotand/opt/homebrew/bin/clawdbot. - No
clawdbot-machelper remains.
- Bundle a standalone
-
Canvas parity across node types
- Use
node.invokecommands consistently (canvas.present|navigate|eval|snapshot|a2ui.*). - The TS CLI provides convenient wrappers so agents never have to craft raw
node.invokecalls.
- Use
Command surface (new/normalized)
clawdbot nodes invoke --command canvas.*remains valid.- New CLI wrappers for convenience:
clawdbot canvas present|navigate|eval|snapshot|a2ui push|a2ui reset
- New node commands (mac-only initially):
system.run(shell execution)system.notify(local notifications)
Permission advertising
- Node hello/pairing includes a
permissionsmap:- Example keys:
screenRecording,accessibility,microphone,notifications,speechRecognition. - Values: boolean (
true= granted,false= not granted).
- Example keys:
- Gateway
node.list/node.describesurfaces the map.
Gateway mode + config
- Gateways should only auto-start when explicitly configured for local mode.
- When config is missing or explicitly remote,
clawdbot gatewayshould refuse to auto-start unless forced.
Implementation checklist
- Add bun-compiled
clawdbotbinary to macOS app bundle; update codesign + install flows. - Remove
ClawdbotCLItarget and control socket server. - Add node command(s) for
system.runandsystem.notifyon macOS. - Add permission map to node hello/pairing + gateway responses.
- Update TS CLI + docs to use
clawdbotonly.