Add ChatGPT assistant to the Capve console
Merged
RI
1h ago+1530+1530+0123456789012345678901234567890123456789-4-4-0123456789
What changes
Ports Capgo's ChatGPT connection and chat-agent flow into the Capve dashboard. Users open Ask Capve, connect their eligible ChatGPT account with PKCE and the explained loopback callback, and ask the assistant to investigate reports or propose changes. Every write requires its own confirmation card showing the exact arguments; confirming one keeps sibling proposals available.
- Session-only Worker proxy for OAuth exchange/refresh, models and streamed Responses requests; fixed upstream endpoints, no-store, size limits and redirect rejection.
- Reuses all existing MCP business tools through the selected browser account, preserving team roles, billing locks, audit logs and ad-platform write opt-ins. No personal API token is minted. Successful mutations refresh the current dashboard while keeping chat open, including when the model summary fails. Disabled during support impersonation.
- Tab-scoped ChatGPT credentials, disconnect/sign-out cleanup, account-switch cancellation, usage-limit/reconnect states, console links and question cards.
- Setup and release instructions: docs/console-assistant.md. No new secret, migration, API key or hostname required. Martin merges and deploys via the normal workflow after approval.
Validation
bun run typecheckandbun run buildpassed.bun run test: all 34 Workers test files passed; the final focused assistant checks passed 25 tests.bun run test:mcp:clients: SDK v1/v2 tools, OAuth discovery, registration, refresh and revocation passed.- Headless browser: desktop and 390px mobile layout, no console errors, no campaign created before confirmation, exactly one real local campaign created after confirmation, disconnect cleared credentials. Review regression checks also verified question/answer context across turns and global sign-out cleanup followed by a fresh connection prompt after signing back in. Confirmed create, rename and archive operations update the visible campaign list without a browser reload; failed mutations and other-account events do not refresh it. Multi-action checks verified separate confirmations, exactly-once execution, retained pending arguments and cancelled-card state. Regression tests also preserve the successful write result when the model fails after one or two read-only rounds.
- OpenAI was mocked in automated tests and the action screenshot. A live eligible ChatGPT account sign-in and plan request still need the documented production smoke check. No production deployment or merge performed.
Screenshots
Actual local Capve UI. Connection/setup screens use a local demo account; the action screen uses simulated OpenAI output with real local Capve tool execution.
Connect

Callback instructions

Confirm an action

Mobile
