feat(overseer): dedicated admin console + runtime brain switching - #103
feat(overseer): dedicated admin console + runtime brain switching#103heavygee wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70b11fb582
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| const active = { profile: parsed.data.profile, model: parsed.data.model ?? null } | ||
| engine.getSettings().setActiveBrain(active) |
There was a problem hiding this comment.
Scope active-brain writes to the authenticated namespace
On a hub serving multiple CLI_API_TOKEN:<namespace> users, this endpoint ignores c.get('namespace') and writes a single global active_brain key, so any authenticated namespace can redirect every other namespace's Overseer conversations to a different provider or model. Persist the setting per namespace or restrict this admin mutation to an authorized/default namespace.
AGENTS.md reference: AGENTS.md:L149-L149
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Deferred to #107 — active-brain persistence is intentionally global for now; namespace scoping is tracked there and out of scope for this dogfood pass.
70b11fb to
1cb8781
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1cb8781fe4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Adds the /overseer admin console + runtime brain switching (new overseer_settings KV table, idempotent DDL in finishSchemaInit; REQUIRED_TABLES gains overseer_settings). Union order: open-loops -> dispositions -> admin-console. Tip 70b11fb. Also repoints remat-escalate owner_session_prefix/ping to the live meta-soup session (05d9f0f2) after the 5bcf291c->05d9f0f2 reconnect re-ID; label gate stays the durable owner identity. Co-authored-by: Cursor <cursoragent@cursor.com>
feat/overseer-admin-console (#103) re-introduced the pre-restructure inline toolbar (with an Overseer -> /overseer button); rerere drops the inline copy as before. Extend heal 89 to add the Overseer nav button between browse and settings in the single headerActions toolbar so the console stays reachable from the shell. Co-authored-by: Cursor <cursoragent@cursor.com>
8d59e9f to
8b9c5d5
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b9c5d5152
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| try { | ||
| const res = await api.overseerConverse(nextHistory, { | ||
| profile: selectedProfile !== 'default' ? selectedProfile : undefined, | ||
| profile: selectedProfile, |
There was a problem hiding this comment.
Select the sole configured named profile
When the hub has only a named profile such as OVERSEER_BRAIN_PROFILE_OPENAI_URL and no OVERSEER_BRAIN_URL, selectedProfile remains default; the profile selector is also hidden because profiles.length is one. This changed line therefore sends an unavailable literal default profile on every prompt, causing resolveBrainConfig to return null even after the named brain was made active. Initialize the selector from the active/first configured profile, or avoid sending default when it is absent. Fresh evidence beyond the prior default-profile thread is the supported named-only configuration combined with the hidden single-profile selector.
Useful? React with 👍 / 👎.
Add a top-level /overseer console that consolidates the Overseer control surfaces (brain switch, talk-to, events + inbox debug, identity/tools) that previously lived scattered in Settings > About. Runtime brain switching: a persisted "active brain" (profile + optional model) that voice and every converse default to, switchable at whim with no env edit and no hub restart. Backed by a new overseer_settings KV table (idempotent DDL, alongside the other Overseer self-heal schemas). Precedence, highest first: per-request override (talk-to panel) > persisted active brain > env default — resolveBrainSelection() collapses the three layers for resolveBrainConfig(). Routes: GET /overseer/brains now also returns the active selection; GET+PUT /overseer/brain/active read/write it (PUT validates the profile is configured so the console can never persist a dead brain). The api key stays server-side. Tests: settings round-trip + malformed-json tolerance + idempotent DDL, resolveBrainSelection precedence, PUT validation + cross-engine persistence. Co-authored-by: Cursor <cursoragent@cursor.com>
About no longer mounts the debug panels; it links to /overseer instead. Update the metadata suite to click that button and expect navigate(). Co-authored-by: Cursor <cursoragent@cursor.com>
Add CORS PUT for brain switch, send explicit default profile from talk-to selector, clear stale persisted profiles, /overseer back fallback to /sessions, and distinguish reachable HTTP model-list failures from offline. Co-authored-by: Cursor <cursoragent@cursor.com>
8b9c5d5 to
10e3c26
Compare
Stacked on #102 (disposition keystone). Review/merge after it.
Summary
/overseerconsole — a top-level admin surface (eye icon in the sessions header) that consolidates every Overseer control that previously lived scattered under Settings → About: the new Brain switcher, the talk-to debug chat, events + inbox debug panels, and an identity/tools readout. Settings → About now just links here.hub.envedit, no hub restart. Backed by a newoverseer_settingsKV table (idempotent DDL, alongside the other Overseer self-heal schemas).resolveBrainSelection()collapses the three layers beforeresolveBrainConfig().GET /overseer/brainsnow also returns the active selection;GET+PUT /overseer/brain/activeread/write it.PUTvalidates the profile is actually configured so the console can never persist a dead brain that would silently fall back to env. The api key never reaches the browser (model list stays server-proxied).Test plan
bun run typecheck(cli + web + hub) greenresolveBrainSelectionprecedence (env default / active / per-request profile / per-request model)PUT /overseer/brain/activerejects unconfigured profile (400), persists a known one, survives a fresh engine over the same storeOperator/meta note (one-time env)
For the switcher to offer both brains, the hub env needs the profiles configured (default = local llama, plus the OpenAI profile). Example:
No code needs the restart — only adding/removing configured profiles does. Switching the active profile/model among already-configured profiles is fully runtime.
Made with Cursor