* fix(packaging): ensure Homebrew var directory exists on first start
When zeroclaw is installed via Homebrew, the service plist references
/opt/homebrew/var/zeroclaw (or /usr/local/var/zeroclaw on Intel) for
runtime data, but this directory was never created. This caused
`brew services start zeroclaw` to fail on first use.
The fix detects Homebrew installations by checking if the binary lives
under a Homebrew prefix (Cellar path or symlinked bin/ with Cellar
sibling). When detected:
- install_macos() creates the var directory and sets
ZEROCLAW_CONFIG_DIR + WorkingDirectory in the generated plist
- start() defensively ensures the var directory exists before
invoking launchctl
Closes#3464
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* style(service): fix cargo fmt formatting in Homebrew var dir tests
Collapse multi-line assert_eq! macros to single-line form as
required by cargo fmt.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: SpaceLobster <spacelobster@SpaceLobsters-Mac-mini.local>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>