Completes the deferred half of #8358: Grok's plan-approval gate now works on the v2 runtime. The XAi extension regains main's exit-plan helpers (request schemas, plan-markdown extraction, the abandoned-with-feedback response, and the plan.md session-path sniffing), and the v2 ACP adapter grows a captureProposedPlan primitive that emits a completed proposed-plan artifact for the active turn — one plan id per turn, so plan.md rewrites and the exit gate update a single card. The Grok flavor wires both ends: tool calls that write plan.md under a Grok session dir surface the plan while plan mode is still active, and x.ai/exit_plan_mode (plus the underscore alias) captures the final plan — request content first, then the sniffed plan.md contents, then the empty-state placeholder — and abandons the native gate so the turn does not hang, mirroring the Claude ExitPlanMode pattern. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Julius Marminge committed on 8/29/2026, 6:02:34 AMparentaf5199e
4 files changedLine totals unavailable