feat(workspace): choose the connection an integration uses from `/integrations`
Issue for this PR
Closes #1502
Type of change
- New feature
What does this PR do?
/integrations shows, under each integration that uses one chosen connection (Jira, GitHub…), which one: chosen, the default (lowest id), or a choice that turns it off. Enter opens a picker of its usable connections. The choice goes to ~/.altimate/settings.json, as the IDE extension writes it.
The engine reads connections once per process and announces no tool change, so the overlay restarts it at the next turn boundary when the choices change, here or in the IDE.
Claims:
- C1 The picker offers exactly the connections the engine accepts for that integration, and marks the one it uses.
- C2 Saving changes one key; every other key survives; the file is written in place; one that doesn't parse is never overwritten.
- C3 A changed choice restarts the engine once, at the next boundary; a start that then fails its handshake keeps the session's one retry, like any start. An unchanged or unreadable file never restarts it.
- C4 Integrations that take a connection per call (Snowflake, BigQuery, Postgres, dbt, Altimate) get no picker.
Residuals:
- R1 The engine's rules are mirrored, not read from it.
- R2 A restart fails a call another session in the project has in flight, as a re-link does today.
- R3 The file is keyed by workspace id, not tenant (the engine's format).
Codex findings: review log.
How did you verify your code works?
Typecheck, Marker Guard, test/altimate (one failure, also on main), new tests.
Live, sandbox HOME, real workspace: Jira switched between the default, a bad-token copy, a good copy and one added mid-session. Each switch restarted the engine, whose log names the chosen connection; the Jira call failed or succeeded to match.
Screenshots / recordings


Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
🤖 Generated with Claude Code
https://claude.ai/code/session_01HRUhVhg6XwxSKJs1iTufiA
Summary by cubic
/integrations now shows the connection each integration uses, and lets you change it: Enter on a connection row opens a picker of that integration's usable connections, and the choice is saved to ~/.altimate/settings.json alongside the IDE extension's keys. The engine fetches connections only at startup, so a changed choice restarts it once at the next turn boundary; that restart gets the session's one handshake retry, like any other start. The restart is judged against the choices the engine started with, so a config reload before the first turn doesn't hide a change.
- The picker offers exactly the connections the engine would accept, marks which one is in use, and skips incomplete ones (counted, not offered); integrations that take a connection per call (Snowflake, BigQuery, Postgres, dbt, Altimate) show no picker.
- Saving only rewrites the workspace's entry in place — other keys are kept, and a file that doesn't parse is never overwritten.
- An unchanged or unreadable file never restarts the engine.