Skip to content

feat(overseer): dedicated admin console + runtime brain switching - #103

Open
heavygee wants to merge 3 commits into
feat/overseer-dispositionsfrom
feat/overseer-admin-console
Open

feat(overseer): dedicated admin console + runtime brain switching#103
heavygee wants to merge 3 commits into
feat/overseer-dispositionsfrom
feat/overseer-admin-console

Conversation

@heavygee

Copy link
Copy Markdown
Owner

Stacked on #102 (disposition keystone). Review/merge after it.

Summary

  • Dedicated /overseer console — 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.
  • Runtime brain switching — a persisted active brain (profile + optional model) that voice and every converse default to. Switchable at whim from the console: no hub.env edit, 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, testing "at whim") → persisted active brain → env default. resolveBrainSelection() collapses the three layers before resolveBrainConfig().
  • Routes: GET /overseer/brains now also returns the active selection; GET+PUT /overseer/brain/active read/write it. PUT validates 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) green
  • hub suite green (574 pass), incl. new:
    • settings round-trip + malformed-json tolerance + idempotent DDL
    • resolveBrainSelection precedence (env default / active / per-request profile / per-request model)
    • PUT /overseer/brain/active rejects unconfigured profile (400), persists a known one, survives a fresh engine over the same store
  • Operator smoke on :3006 once soup includes this layer: open the console, switch active brain between local and openai, confirm converse honors it without a restart.

Operator/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:

OVERSEER_BRAIN_URL=http://127.0.0.1:8080/v1        # local llama-server (default profile)
OVERSEER_BRAIN_PROFILE_OPENAI_URL=https://api.openai.com/v1
OVERSEER_BRAIN_PROFILE_OPENAI_API_KEY=sk-...
OVERSEER_BRAIN_PROFILE_OPENAI_MODEL=gpt-4o

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deferred to #107 — active-brain persistence is intentionally global for now; namespace scoping is tracked there and out of scope for this dogfood pass.

Comment thread hub/src/web/routes/overseer.ts
Comment thread hub/src/web/routes/overseer.ts Outdated
Comment thread web/src/routes/overseer/index.tsx
Comment thread web/src/components/overseer/OverseerBrainPanel.tsx Outdated
@heavygee
heavygee force-pushed the feat/overseer-admin-console branch from 70b11fb to 1cb8781 Compare August 1, 2026 09:02

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread hub/src/web/routes/overseer.ts
heavygee added a commit that referenced this pull request Aug 1, 2026
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>
heavygee added a commit that referenced this pull request Aug 1, 2026
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>
@heavygee
heavygee force-pushed the feat/overseer-admin-console branch 2 times, most recently from 8d59e9f to 8b9c5d5 Compare August 1, 2026 20:12

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

heavygee and others added 3 commits August 2, 2026 00:37
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>
@heavygee
heavygee force-pushed the feat/overseer-admin-console branch from 8b9c5d5 to 10e3c26 Compare August 1, 2026 23:37
heavygee added a commit that referenced this pull request Aug 3, 2026
Operator remat request for 0ef4d51; soup current PR tip 109fe19
(includes that commit + routes brace fix). Also #102/#103/#104 tip
rewrites: snooze CI, bound write grants, #107 per-ns OverseerEntity.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant