mac-control-plane-work
Use this when a task touches macOS actions, native permissions, Wi-Fi, windows, Shortcuts, AppleScript, Accessibility, screen capture, microphone, speech, Bluetooth, VPN, system settings, native command wrappers, Clawix signed host execution, Mac audit receipts, or Commander migration.
Procedure
- Start from the canon:
docs/mac-control-plane.mddocs/adr/0023-mac-control-plane-v1.mddocs/adr/0024-mac-permission-broker-v1.mddocs/governance/mac-control-plane/source-audit.mddocs/governance/mac-control-plane/decision-matrix.md
- Inspect the registered routes before editing:
claw inspect route mac.directCliAction --jsonclaw inspect route mac.permissionLifecycle --jsonclaw inspect show claw.mac.controlPlane --jsonclaw inspect show claw.mac.permissionBroker --jsonclaw inspect show claw.mac.actionBroker --json
- Keep ownership intact:
- ClawJS owns contracts, atlas entries, schemas, CLI, MCP/API contracts, route graph, tests, docs, and static guardrails.
- Clawix owns native UI, signed-host execution, host identity, TCC state, local prompt rendering, and host operational audit storage.
- Add or change Mac capabilities only through
packages/clawjs-core/src/mac-control-plane.ts. Every capability needs a stablemac.<family>.<action>id, permissions, risk tier, backend strategy, coverage state, CLI usage, related surfaces, docs, and validation evidence. - For real native execution, route through the signed-host Mac Action Broker.
Do not call
networksetup,osascript, AX,shortcuts,screencapture, TCC helpers, process killers, or sensitive native APIs directly from CLI, Node, feature services, or tests unless the use is in the versioned broker allowlist with owner, reason, expiry, and tests. - For permissions, route through the central Mac Permission Broker. Feature services such as dictation, screen tools, or voice must consume central permission state and request plans instead of owning prompts.
- Preserve direct CLI semantics. Everyday roots are
wifi,window,shortcut,app,bluetooth,vpn, and related nouns.macis the control-plane portal;permissionsis its own root. Collision help must showRelated surfaces. - Treat executable V1 claims as host-dependent. Hermetic tests can prove
schemas, plans, routing, and guardrails, but real execution needs signed
Clawix embedded and Claw.app standalone validation. Mark physical gaps as
EXTERNAL PENDINGonly for non-executable or explicitly external items. - Before claiming goal progress, run the focused gate:
node scripts/verify-mac-control-plane-goal.mjsnode scripts/surface-route-graph-guard.mjsnode scripts/verify-host-permission-contract.mjs- relevant Mac CLI/core tests
Constraints
- Do not reintroduce Commander as a stable public surface.
- Do not require the
macprefix for ordinary local actions. - Do not request all permissions at install; permission requests are just-in-time and plan-first.
- Do not store secrets, full paths, sensitive SSIDs, window titles, or native payloads in public docs, fixtures, or unredacted audit output.
- Do not mark a V1 executable Mac action complete while its real signed-host
validation is still
EXTERNAL PENDING.