Commit Graph

402 Commits

Author SHA1 Message Date
Haitao Pan
4f87b67a4e feat(xworkmate_bridge): add Windows Scheduled Task deployment and skip Caddy on Windows 2026-06-21 20:18:11 +08:00
Haitao Pan
51d08cf9db perf(nodejs): disable homebrew auto update to speed up installation 2026-06-21 20:14:03 +08:00
Haitao Pan
aa3b4e8069 fix(gateway_openclaw): resolve npm path resolution, remove obsolete plugins via CLI, and make doctor non-interactive 2026-06-21 20:10:50 +08:00
Haitao Pan
85bad4155f fix(gateway_openclaw): resolve parse error on windows module in handlers 2026-06-21 19:57:37 +08:00
Haitao Pan
48ba854671 fix(litellm): use explicit postgres database for psql commands to prevent connection errors on macOS 2026-06-21 19:56:44 +08:00
Haitao Pan
fa04606542 feat(gateway_openclaw): run doctor --fix --force on restart 2026-06-21 19:54:58 +08:00
Haitao Pan
aedf457ddc feat(gateway_openclaw): add Windows tasks implementation 2026-06-21 19:53:26 +08:00
Haitao Pan
5f7bc697fc fix(playbooks): use include_tasks for windows and force node24 path for openclaw 2026-06-21 19:52:14 +08:00
Haitao Pan
284c3c43a3 feat(ai_agent_runtime): add Windows tasks implementation 2026-06-21 19:48:52 +08:00
Haitao Pan
340de0c4d8 feat(nodejs): add Windows tasks implementation 2026-06-21 19:43:16 +08:00
Haitao Pan
ae9f09d77f fix(openclaw): use 'run' command instead of positional config file in launchd plist 2026-06-21 19:42:13 +08:00
Haitao Pan
a170671ffd fix(nodejs): add --ignore-dependencies to brew uninstall node 2026-06-21 19:32:50 +08:00
Haitao Pan
a35befd123 fix(nodejs): replace community.general.homebrew with shell command to bypass macOS version crash 2026-06-21 19:32:02 +08:00
Haitao Pan
2a8db4f79a fix(nodejs): actually run macOS node installation and fix variable name 2026-06-21 19:30:38 +08:00
Haitao Pan
aa59be12a0 fix(bridge): move macos.yml import before validation 2026-06-21 19:28:09 +08:00
Haitao Pan
4863c327cc fix(macOS): correct bridge and openclaw launchd CLI arguments 2026-06-21 19:22:48 +08:00
Haitao Pan
16ecda9e7d chore: remove temp scripts 2026-06-21 19:08:59 +08:00
Haitao Pan
32da386051 fix(macOS): unify notify strings in xworkmate_bridge and gateway_openclaw to trigger OS-agnostic listen topics rather than Linux-specific handler names 2026-06-21 19:08:43 +08:00
Haitao Pan
8d644f006e fix(macOS): rewrite remaining macOS handlers to use listen attribute instead of notify chaining for proper sequence during flush_handlers 2026-06-21 19:05:33 +08:00
Haitao Pan
f6ef2202b2 fix(macOS): correctly skip caddy and systemd validation tasks in xworkmate_bridge when not enabled on Darwin 2026-06-21 19:01:51 +08:00
Haitao Pan
73e33e3083 fix(macOS): correctly sequence launchctl unload and load by using listen rather than notify in handlers 2026-06-21 18:55:52 +08:00
Haitao Pan
3f1ece8601 refactor(macOS): overhaul handlers to support dynamic OS routing via listen feature 2026-06-21 18:52:37 +08:00
Haitao Pan
68206296f4 fix(macOS): use launchctl unload/load instead of stop/start in handlers to ensure plist updates are applied 2026-06-21 18:48:20 +08:00
Haitao Pan
a5db649802 fix(macOS): use dynamic npm global bin path for codex adapter 2026-06-21 18:47:39 +08:00
Haitao Pan
21e0ab9628 fix(macOS): define acp_hermes_path for launchd plist template 2026-06-21 18:41:02 +08:00
Haitao Pan
04bf000c78 fix(macOS): use dynamic variables instead of hardcoded ubuntu for hermes adapter user and paths 2026-06-21 18:39:07 +08:00
Haitao Pan
ffa357ac4e fix(macOS): add retries to acp validation uri tasks to mitigate launchd race conditions 2026-06-21 18:34:52 +08:00
Haitao Pan
fd142df681 fix(macOS): correct bridge adapter invocation syntax for acp endpoints 2026-06-21 18:27:22 +08:00
321fd81f37 fix(macos): define acp_opencode_path for launchd plist
opencode.plist.j2 exports PATH from acp_opencode_path, but the var was never
defined (codex/gemini define their *_path), causing AnsibleUndefinedVariable on
the 'Create launchd plist template for OpenCode ACP' task. Add
acp_opencode_npm_global_bin + acp_opencode_path mirroring gemini (macOS uses
~/.local/bin + Homebrew + system paths).
2026-06-21 10:13:12 +00:00
8e346889fe fix(macos): gate opencode Caddy conf-dir on manage_caddy
The OpenCode 'Ensure Caddy conf directory exists' task ran unconditionally
(owner root), unlike codex which gates on acp_*_manage_caddy. On macOS (caddy
off by default, manage_caddy=false) it templated the caddy path and tried to
create/chown the dir as root. Gate it on acp_opencode_manage_caddy like codex,
so macOS single-host skips Caddy entirely.
2026-06-21 10:04:52 +00:00
c14962d572 fix: quote strings in caddy_base_dir Jinja (invalid unquoted expr)
caddy_base_dir was {{ /opt/homebrew/etc/caddy if ansible_os_family == Darwin
else /etc/caddy }} with unquoted paths/value, so Jinja parsed '/' as division
-> 'unexpected /' templating error (hit on acp_opencode). Quote the literals:
'{{ "/opt/homebrew/etc/caddy" if ansible_os_family == "Darwin" else "/etc/caddy" }}'
across the 9 affected roles.
2026-06-21 09:55:12 +00:00
e51e07f210 fix(macos): guard acp apt installs to Debian-family with non-empty packages
The opencode/gemini/hermes install tasks ran ansible.builtin.apt unconditionally,
so apt-get update fired even on macOS (no apt) and with empty package lists.
Gate them on 'packages | length > 0' and ansible_os_family == 'Debian' (apt is
Debian-only), matching codex. macOS skips apt entirely.
2026-06-21 09:39:23 +00:00
4ea7adbfa2 fix(macos): portable listener check (ss->lsof fallback) in acp+bridge validate
ss is Linux-only; on macOS it is absent and the validate tasks failed with
[Errno 2] No such file or directory: ss. Use ss when present, else lsof
(-nP -iTCP -sTCP:LISTEN). The acp diagnostic checks are also made non-fatal;
the bridge capture keeps host:port output so its port assertion still matches.
2026-06-21 08:56:26 +00:00
Haitao Pan
cc2e010377 fix(acp): gate caddy validation tasks behind manage_caddy 2026-06-21 16:35:43 +08:00
Haitao Pan
4d63a66cf4 fix(acp): omit owner and group on macOS for codex and opencode bridge extraction 2026-06-21 16:29:32 +08:00
c07874b4d4 feat(caddy): OS-aware caddy_config_dir (Linux /etc/caddy, macOS brew)
Add caddy_config_dir = /etc/caddy on Linux, /opt/homebrew/etc/caddy on macOS.
Derive the Caddyfile / conf.d / fragment paths in the caddy role and the
gateway_openclaw/litellm/xworkmate_bridge roles from it, so a force-enabled
Caddy (caddy_enabled=true) on macOS writes to the Homebrew location instead of
the unwritable /etc/caddy. Default (caddy_enabled=false on macOS) still skips
Caddy entirely.
2026-06-21 16:10:32 +08:00
784f683a3b feat(caddy): gate litellm + bridge Caddy on caddy_enabled
litellm: the Caddy fragment-dir task missed the gate its siblings had; gate it
on caddy_enabled + litellm_caddy_config_enabled. xworkmate_bridge: wrap the
whole Caddy ingress block in caddy_enabled so macOS single-host never touches
/etc/caddy (the bridge service task stays outside the block).
2026-06-21 16:09:46 +08:00
0cfd1af1b7 feat(caddy): gate Caddy behind caddy_enabled (Linux on, macOS off)
Add caddy_enabled (group_vars/all) defaulting to ansible_os_family != 'Darwin',
overridable via -e caddy_enabled=true/false. Wrap the dedicated caddy role and
the gateway_openclaw Caddy ingress block in 'when: caddy_enabled | bool' so
macOS single-host deploys never touch /etc/caddy or start caddy, while Linux
VPS deploys keep Caddy + HTTP/TLS by default. Notifies only fire from gated
tasks, so the Reload caddy handlers stay inert when disabled.
2026-06-21 16:07:33 +08:00
17e2267449 fix(openclaw): retry compile-cache reset to survive rmtree race
On macOS the compile cache is still being written by OpenClaw while ansible
removes it, so shutil.rmtree fails with [Errno 66] Directory not empty. Retry
the deletion (5x, 3s) until the directory is gone.
2026-06-21 16:06:56 +08:00
Haitao Pan
cdbfb2e92a feat(deploy): refactor XWorkmate and OpenClaw deployments to use offline GitHub Release tarballs 2026-06-19 19:50:06 +08:00
Haitao Pan
6aa240c16b fix(permissions): add missing become:true to all cross-platform /usr/local/bin writes 2026-06-19 18:56:47 +08:00
Haitao Pan
a3e570371a fix(acp_server): add missing become:true to xworkmate bridge binary copy tasks 2026-06-19 18:55:25 +08:00
Haitao Pan
f7800111b2 fix(ufw): ensure UFW tasks only run on Debian/Ubuntu and restore missing enable_ufw default 2026-06-19 18:49:06 +08:00
Haitao Pan
7635677dbf fix(caddy): resolve malformed YAML escapes and quotes introduced during caddy refactoring 2026-06-19 18:34:04 +08:00
Haitao Pan
4164e1ff91 refactor(caddy): completely refactor Caddy macOS paths and missing privileges across all roles 2026-06-19 18:22:53 +08:00
Haitao Pan
f66a118c57 fix: resolve Caddy permission denied and macOS path issues in acp_server_codex 2026-06-19 18:16:25 +08:00
Haitao Pan
a0b27a7aee chore: commit pending infra playbook changes including ssh initialization script 2026-06-19 18:09:16 +08:00
Haitao Pan
51565ecf66 fix: resolve nodejs/npm dependency conflict and caddy path/permission issues 2026-06-19 18:08:33 +08:00
Haitao Pan
402c90967a fix: correct acp_server_gemini template name and update nodejs packages for offline installation 2026-06-19 12:25:15 +08:00
Haitao Pan
7613a848a2 fix: stop systemd user status service and timer before cleaning up repo directory to avoid race conditions 2026-06-19 12:16:13 +08:00