playbooks/roles/vhosts/acp_server_opencode
Haitao Pan 4364786465
fix(acp_server_opencode): service PATH + bin var + surface adapter crash in validate (#21)
ACP readiness probe returned 000 for the full retry window on
xworkmate-bridge-ubuntu-26 (nothing listening = adapter crash-loop), but the
play aborted at the probe so the real cause never reached the CI log.

- systemd unit: add Environment=PATH ({{ acp_opencode_path }}, parity with the
  launchd plist) so the lazily-spawned opencode/node CLI resolves; replace the
  hardcoded --opencode-bin /usr/bin/opencode with {{ acp_opencode_binary_path }}
  ({{ npm_global_bin }}/opencode), matching the gemini/codex roles and macOS.
- validate.yml: wrap the readiness probe in block/rescue that dumps systemctl
  status + journalctl on failure, so the adapter crash reason is visible.
- fix latent undefined var in the summary (acp_opencode_adapter_http ->
  acp_opencode_adapter_probe), which would have errored once the endpoint came up.

Co-authored-by: Haitao Pan <manbuzhe2009@qq.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 15:25:32 +08:00
..
defaults fix(acp_server_opencode): service PATH + bin var + surface adapter crash in validate (#21) 2026-06-28 15:25:32 +08:00
handlers fix(macOS): correctly sequence launchctl unload and load by using listen rather than notify in handlers 2026-06-21 18:55:52 +08:00
tasks fix(acp_server_opencode): service PATH + bin var + surface adapter crash in validate (#21) 2026-06-28 15:25:32 +08:00
templates fix(acp_server_opencode): service PATH + bin var + surface adapter crash in validate (#21) 2026-06-28 15:25:32 +08:00
README.md fix: align xworkmate bridge ingress contract 2026-05-03 12:14:27 +08:00

acp_opencode

OpenCode service plus internal ACP bridge consumed by xworkmate-bridge.

Installs:

  • caddy

Exposes:

  • opencode serve --hostname 127.0.0.1 --port 38992 --print-logs
  • xworkmate-go-core serve --listen 127.0.0.1:3910

Notes:

  • xworkmate-app must not call /opencode, /opencode/acp, or /opencode/acp/rpc public paths.
  • Public app traffic goes through wss://xworkmate-bridge.svc.plus/acp or https://xworkmate-bridge.svc.plus/acp/rpc.
  • Provider selection is exposed through bridge acp.capabilities and xworkmate.routing.resolve, not provider-specific public URLs.