mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-31 17:10:43 +02:00
Harden the Grok Build ACP runtime (originally #5285 by @sanjay3290) to address the three blockers found in triage review (MUL-4430): - Auth handshake: after `initialize`, read `authMethods` and send `authenticate` (preferring xai.api_key when XAI_API_KEY is set, else cached_token) before session/new or session/load — matching xAI's documented headless ACP flow. Without it a real, logged-in CLI rejects every session op. Model discovery (discoverACPModels) gets the same optional handshake so it returns the real catalog instead of the static fallback. Ref: https://docs.x.ai/build/cli/headless-scripting - Migration renumbered 163 -> 166: main advanced to 163/164/165, so 163 collided and would trip the unique-prefix migrations lint. - `--no-auto-update` is now passed by the daemon as a global flag (and kept in the blocked custom-arg set) so background update checks never stall an unattended ACP task, per xAI's automation guidance. Tests: fake ACP now advertises authMethods + handles authenticate; new tests assert authenticate is ordered initialize<authenticate<session for both new and resume, that a rejected handshake fails the task, and cover the auth-method selection preference. argv test updated for the --no-auto-update prefix. Co-authored-by: multica-agent <github@multica.ai>