an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions
HTML agent-harnessagent-orchestrationagentsai-agentsautonomous-agentsclaude-codecodexcoding-agentsdesktop-appdeveloper-toolselectrongemini-cliharnessharness-engineeringlocal-firstmemorymulti-agentopencodeorchestrationtypescript
feat(lp-foundation): keystone agentProvider + mcpCatalog + 3-file config mirror
Chaitanya Giri3ad2089c925a
diff --git a/src/main/config.ts b/src/main/config.tsindex cf1cc1d9..4d08712a 100644--- a/src/main/config.ts+++ b/src/main/config.ts@@ -2,7 +2,13 @@ import { app } from 'electron';import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';import { dirname, join } from 'node:path';import { homedir } from 'node:os';-import { autoModeFlagForProvider, inferAgentProvider, type AgentProvider } from '../shared/agentProvider';+import {+ autoModeFlagForProvider,+ inferAgentProvider,+ providerPreset,+ type AgentProvider+} from '../shared/agentProvider';+import { defaultMcpDefaults } from '../shared/mcpCatalog';/** A recurring auto-dispatched mission fired on an interval by the scheduler. */export interface ScheduledMission {@@ -117,6 +123,17 @@ export interface HarnessConfig {defaultCommand: string;/** Default model for newly spawned agents (e.g. 'claude-sonnet-4-6[1m]'); unset = CLI default. */defaultModel?: string;+ /** Which provider powers the GOD orchestrator ("Michael"). The persona is+ * constant; only its engine is selectable. Default 'claude'. Eligible providers+ * are those that can receive inbox (claude/codex/antigravity/claw/qwen). */+ godProvider?: AgentProvider;+ /** The model GOD runs on. Unset falls back to the provider preset's+ * `recommendedOrchestratorModel`, then MODEL_GOD. Default 'claude-opus-4-8'. */+ godModel?: string;+ /** Per-server consent state for the default MCP bundle, keyed by catalog id.+ * Seeded from MCP_CATALOG (safe-readonly ON, write/secret OFF); the user flips+ * these in Settings. A server is wired into an agent only when enabled here. */+ mcpDefaults?: { [id: string]: { enabled: boolean } };/** Enable semantic memory (MemPalace CLI). No-op if mempalace isn't installed. */semanticMemory: boolean;/** Embedding model for the palace: lightweight 'minilm' or multilingual 'embeddinggemma'. */@@ -227,6 +244,11 @@ const DEFAULTS: HarnessConfig = {registeredRepos: [],autoMode: true,defaultCommand: 'claude',+ godProvider: 'claude',+ godModel: 'claude-opus-4-8',+ // Seeded from the MCP catalog so the consent defaults never drift from it+ // (safe-readonly ON, write/secret OFF).+ mcpDefaults: defaultMcpDefaults(),semanticMemory: true,embeddingModel: 'minilm',missions: [OPS_STANDUP_MISSION],@@ -311,8 +333,16 @@ export interface RoleHint {* Sonnet for general workers. Returns a model id (matching AGENT_MODELS) or* undefined to fall back to the CLI default. This is only a DEFAULT — an* explicit per-agent model selection always wins. */-export function modelForRole(meta: RoleHint): string | undefined {- if (meta.isGod) return MODEL_GOD;+export function modelForRole(+ meta: RoleHint,+ config?: Pick<HarnessConfig, 'godProvider' | 'godModel'>+): string | undefined {+ if (meta.isGod) {+ // GOD engine is selectable: an explicit godModel wins, else the chosen+ // provider's recommended orchestrator model, else the legacy Opus default.+ const preset = providerPreset(config?.godProvider ?? 'claude');+ return config?.godModel ?? preset.recommendedOrchestratorModel ?? MODEL_GOD;+ }const hay = `${meta.role ?? ''} ${(meta.capabilities ?? []).join(' ')}`.toLowerCase();if (/\b(triage|rout|verif|lint|format|summar|classif|label)/.test(hay)) return MODEL_HELPER;return MODEL_WORKER;diff --git a/src/main/index.ts b/src/main/index.tsindex 9ec83555..275286f4 100644--- a/src/main/index.ts+++ b/src/main/index.ts@@ -1523,9 +1523,13 @@ ipcMain.handle('pty:spawn', async (evt, opts: SpawnOptions & { hive?: AgentMeta;const cfg = readConfig();const args = opts.args ?? [];// Model precedence: an explicit per-agent --model (from the renderer) wins;- // else the user's global defaultModel; else the role-based default tier.+ // else the user's global defaultModel; else the role-based default tier. The+ // GOD is special-cased: it has its own engine config (godProvider/godModel), so+ // modelForRole resolves it and that wins over the worker-oriented defaultModel.if (!args.includes('--model')) {- const m = cfg.defaultModel ?? modelForRole(opts.hive);+ const m = opts.hive.isGod+ ? modelForRole(opts.hive, cfg)+ : cfg.defaultModel ?? modelForRole(opts.hive, cfg);if (m) args.push('--model', m);}// Coarse runaway cap.diff --git a/src/preload/index.ts b/src/preload/index.tsindex b4d06684..fb66d182 100644--- a/src/preload/index.ts+++ b/src/preload/index.ts@@ -161,6 +161,13 @@ export interface HarnessConfig {autoMode: boolean;defaultCommand: string;defaultModel?: string;+ /** Which provider+model powers the GOD orchestrator ("Michael"). Default+ * 'claude' / 'claude-opus-4-8'. Mirrors src/main/config.ts. */+ godProvider?: AgentProvider;+ godModel?: string;+ /** Per-server consent for the default MCP bundle, keyed by catalog id. Mirrors+ * src/main/config.ts. */+ mcpDefaults?: { [id: string]: { enabled: boolean } };semanticMemory: boolean;embeddingModel: 'minilm' | 'embeddinggemma';missions?: ScheduledMission[];diff --git a/src/renderer/src/store/config.ts b/src/renderer/src/store/config.tsindex 728aeaf7..717b3a6a 100644--- a/src/renderer/src/store/config.ts+++ b/src/renderer/src/store/config.ts@@ -53,6 +53,13 @@ export interface HarnessConfig {defaultCommand: string;/** Default model for newly spawned agents (e.g. 'claude-sonnet-4-6[1m]'); unset = CLI default. */defaultModel?: string;+ /** Which provider+model powers the GOD orchestrator ("Michael"). Default+ * 'claude' / 'claude-opus-4-8'. Mirrors src/main/config.ts. */+ godProvider?: AgentProvider;+ godModel?: string;+ /** Per-server consent for the default MCP bundle, keyed by catalog id (mirrors+ * src/main/config.ts; seeded from MCP_CATALOG). */+ mcpDefaults?: { [id: string]: { enabled: boolean } };semanticMemory: boolean;embeddingModel: 'minilm' | 'embeddinggemma';missions?: ScheduledMission[];@@ -124,6 +131,27 @@ export const ANTIGRAVITY_MODELS: ModelOption[] = [{ id: 'GPT-OSS 120B (Medium)', label: 'GPT-OSS 120B' }];+/** Models offered when an agent runs on claw-code (`claw`), the proxy-bridge CLI+ * driving a local/any LLM over the Anthropic Messages API. These are starting+ * suggestions only — the command field stays editable, and the user's local+ * router maps the chosen id to whatever model is configured. // TODO-verify the+ * real model-id list once claw-code can be installed. */+export const CLAW_MODELS: ModelOption[] = [+ { id: undefined, label: 'default' },+ { id: 'claude-opus-4-8[1m]', label: 'Opus 4.8 · 1M' },+ { id: 'claude-sonnet-4-6', label: 'Sonnet 4.6' }+];++/** Models offered when an agent runs on qwen-code (`qwen`), the proxy-bridge CLI+ * driving an OpenAI-compatible endpoint. Starting suggestions only (editable+ * command field). // TODO-verify the live list (`qwen` model ids). */+export const QWEN_MODELS: ModelOption[] = [+ { id: undefined, label: 'default' },+ { id: 'qwen3-coder-plus', label: 'Qwen3 Coder Plus' },+ { id: 'qwen3-coder', label: 'Qwen3 Coder' },+ { id: 'qwen-max', label: 'Qwen Max' }+];+/** Split a command string into argv, respecting double/single quotes so a model* value with spaces (agy's `--model "Gemini 3.1 Pro (High)"`) stays one token.* Quotes are stripped from the result. */@@ -137,7 +165,10 @@ export function tokenizeCommand(command: string): string[] {/** The model preset list for a given provider's picker. */export function modelsForProvider(provider: AgentProvider): ModelOption[] {- return provider === 'antigravity' ? ANTIGRAVITY_MODELS : AGENT_MODELS;+ if (provider === 'antigravity') return ANTIGRAVITY_MODELS;+ if (provider === 'claw') return CLAW_MODELS;+ if (provider === 'qwen') return QWEN_MODELS;+ return AGENT_MODELS;}/** Build the command line to feed into spawnPty, honoring the provider's flags,diff --git a/src/shared/agentProvider.ts b/src/shared/agentProvider.tsindex fbfd02dd..fa376773 100644--- a/src/shared/agentProvider.ts+++ b/src/shared/agentProvider.ts@@ -15,7 +15,30 @@ import type { CmdGroup } from './claudeCommands';import { COMMAND_GROUPS as CLAUDE_COMMAND_GROUPS } from './claudeCommands';import { CODEX_COMMAND_GROUPS } from './codexCommands';-export type AgentProvider = 'claude' | 'codex' | 'antigravity' | 'custom';+export type AgentProvider = 'claude' | 'codex' | 'antigravity' | 'claw' | 'qwen' | 'custom';++/** Structured descriptor for how a NON-hiveAware provider gets hive lifecycle+ * events (live status + Stop→inbox-drain + cost), introduced alongside the legacy+ * `hookBridge` so call sites can switch on `bridge.kind` without a big-bang+ * rewrite. Two kinds:+ * - 'hooks' → a config-file hook shim is installed (agy/codex). Derived from the+ * legacy `hookBridge` by `bridgeOf`, so agy/codex keep working with no+ * preset change.+ * - 'proxy' → the CLI has NO hook surface (claw/qwen), so a loopback reverse-proxy+ * sidecar observes its LLM traffic and SYNTHESIZES the same HIVE_SOCK+ * payloads the shims emit. `api` selects the usage/tool-call shape+ * (OpenAI vs Anthropic), `baseUrlEnv` is the env var the CLI reads for+ * its upstream base URL (the sidecar's loopback URL is injected there),+ * and `inboxDelivery` is how mail reaches it ('terminal' work-order+ * handoff today; 'serve' reserved for a future HTTP push path). */+export type BridgeDescriptor =+ | { kind: 'hooks'; shim: 'agy' | 'codex' }+ | {+ kind: 'proxy';+ api: 'openai' | 'anthropic';+ baseUrlEnv: string;+ inboxDelivery: 'terminal' | 'serve';+ };export interface AgentProviderPreset {id: AgentProvider;@@ -55,6 +78,18 @@ export interface AgentProviderPreset {* hiveAware); `custom` leaves it undefined (no bridge → no hooks). This is the* single switch hive.ensureAgent dispatches on to wire the bridge. */hookBridge?: 'agy' | 'codex';+ /** Structured bridge descriptor (the forward-looking replacement for the legacy+ * `hookBridge`). Set explicitly only for PROXY-tier providers (claw/qwen) that+ * have no hook file to install; agy/codex leave it undefined and `bridgeOf`+ * derives `{kind:'hooks'}` from their `hookBridge`. claude/custom leave it+ * undefined (no bridge). Prefer `bridgeOf(provider)` over reading this directly. */+ bridge?: BridgeDescriptor;+ /** The model the GOD orchestrator ("Michael") defaults to when this provider+ * powers it — surfaced as the picker default and the advisory "give Michael a+ * longer-context, higher-capability model". `modelForRole` resolves the GOD+ * model as `config.godModel ?? preset.recommendedOrchestratorModel ?? MODEL_GOD`.+ * Advisory + user-overridable. */+ recommendedOrchestratorModel?: string;/** Whether the router may DELIVER inbox mail to this provider (vs bouncing it* to the god). Requires a way for the agent to actually drain its inbox: Claude* via its Stop hook, and Antigravity/Codex via their `hookBridge` Stop→drain.@@ -87,6 +122,9 @@ export const AGENT_PROVIDER_PRESETS: AgentProviderPreset[] = [autoFlag: '--permission-mode bypassPermissions',hiveAware: true,canReceiveInbox: true,+ // Longest-context Claude variant — matches the "give Michael a bigger model"+ // advisory and the Recommended tag on the orchestrator picker.+ recommendedOrchestratorModel: 'claude-opus-4-8[1m]',resumeFlag: '--resume'},{@@ -118,6 +156,9 @@ export const AGENT_PROVIDER_PRESETS: AgentProviderPreset[] = [// inbox-wake nudge remains as a harmless fallback for an idle worker).canReceiveInbox: true,initialPromptFlag: undefined,+ // Codex's long-context coding model for the orchestrator role. // TODO-verify+ // the exact codex CLI model id (couldn't install the codex CLI to confirm).+ recommendedOrchestratorModel: 'gpt-5-codex',// Codex has no stable session-resume CLI flag in the curated reference; spawn// fresh on respawn (the protocol is re-injected as the initial prompt anyway).resumeFlag: undefined@@ -135,8 +176,63 @@ export const AGENT_PROVIDER_PRESETS: AgentProviderPreset[] = [hookBridge: 'agy', // installAgyHooks() → ~/.gemini/.../hooks.json (translating shim)canReceiveInbox: true, // via the agy-hook bridge (Stop→drain); verified agy honors hook decisionsinitialPromptFlag: '-i', // agy --prompt-interactive: orient the session, then continue+ recommendedOrchestratorModel: 'Gemini 3.1 Pro (High)', // agy takes the display-name labelresumeFlag: '--conversation' // agy: resume a previous conversation by ID},+ {+ // claw-code — runs the user's already-configured local/any LLM that speaks the+ // Anthropic Messages API (Ollama/LM Studio/router via ANTHROPIC_BASE_URL). It+ // has NO native hook surface, so hive lifecycle events come from a traffic-+ // observing PROXY sidecar (bridge.kind==='proxy') instead of an installed hook+ // file. Mirrors the antigravity preset, swapping hookBridge → bridge.+ id: 'claw',+ label: 'Claw · local',+ defaultCommand: 'claw',+ commandGroups: [],+ // TODO-verify claw-code's skip-permissions flag (couldn't install the CLI);+ // defaulting to the Claude-style flag since claw rides the Anthropic API.+ autoModeFlag: '--dangerously-skip-permissions',+ supportsModel: true,+ modelFlag: '--model',+ autoFlag: '--dangerously-skip-permissions',+ hiveAware: false,+ // SPIKE/TODO-verify: confirm claw-code's real upstream base-URL env var (assumed+ // ANTHROPIC_BASE_URL) and that it speaks Anthropic Messages (vs OpenAI). Adjust+ // api/baseUrlEnv here if the spike says otherwise.+ bridge: { kind: 'proxy', api: 'anthropic', baseUrlEnv: 'ANTHROPIC_BASE_URL', inboxDelivery: 'terminal' },+ canReceiveInbox: true, // via the proxy bridge's synthesized Stop→drain+ // claw takes its initial prompt POSITIONALLY (Claude-style); hive.ts appends it+ // as a trailing quoted arg. // TODO-verify+ initialPromptFlag: undefined,+ // Anthropic-format long-context id for the orchestrator; the local router maps+ // it to whatever model is configured. Advisory + editable. // TODO-verify+ recommendedOrchestratorModel: 'claude-opus-4-8[1m]',+ resumeFlag: undefined // no stable resume flag → spawn fresh+ },+ {+ // qwen-code — the Qwen CLI (a gemini-cli fork) driving any OpenAI-compatible+ // endpoint (OPENAI_BASE_URL). Like claw it has no hook surface, so it rides the+ // same PROXY bridge, with the OpenAI usage/tool-call shape.+ id: 'qwen',+ label: 'Qwen · local',+ defaultCommand: 'qwen',+ commandGroups: [],+ // gemini-cli heritage: --yolo auto-approves all actions. // TODO-verify+ autoModeFlag: '--yolo',+ supportsModel: true,+ modelFlag: '--model',+ autoFlag: '--yolo',+ hiveAware: false,+ // SPIKE/TODO-verify: confirm qwen-code reads OPENAI_BASE_URL for its upstream+ // ('serve' inboxDelivery is reserved for a later qwen-serve HTTP push path).+ bridge: { kind: 'proxy', api: 'openai', baseUrlEnv: 'OPENAI_BASE_URL', inboxDelivery: 'terminal' },+ canReceiveInbox: true,+ // gemini-cli style interactive-orient flag. // TODO-verify+ initialPromptFlag: '-i',+ // Qwen's long-context coder model for the orchestrator. // TODO-verify+ recommendedOrchestratorModel: 'qwen3-coder-plus',+ resumeFlag: undefined+ },{id: 'custom',label: 'Custom',@@ -155,6 +251,8 @@ export function isAgentProvider(value: unknown): value is AgentProvider {value === 'claude' ||value === 'codex' ||value === 'antigravity' ||+ value === 'claw' ||+ value === 'qwen' ||value === 'custom');}@@ -199,10 +297,25 @@ export function inferAgentProvider(command: string | undefined, explicit?: unknoconst bin = commandBinary(command);if (bin === 'codex') return 'codex';if (bin === 'agy' || bin === 'antigravity') return 'antigravity';+ if (bin === 'claw') return 'claw';+ if (bin === 'qwen') return 'qwen';if (bin === 'claude' || !bin) return 'claude';return 'custom';}+/** The structured bridge descriptor for how a non-hiveAware provider receives hive+ * lifecycle events. Returns the preset's explicit `bridge` when set (proxy tier:+ * claw/qwen); else derives `{kind:'hooks', shim}` from the legacy `hookBridge`+ * (agy/codex), so those keep working untouched; else undefined (claude uses its+ * native `--settings` path, custom has no bridge). The single accessor call sites+ * switch on (`bridge.kind`). */+export function bridgeOf(provider: AgentProvider | undefined): BridgeDescriptor | undefined {+ const preset = providerPreset(provider ?? 'claude');+ if (preset.bridge) return preset.bridge;+ if (preset.hookBridge) return { kind: 'hooks', shim: preset.hookBridge };+ return undefined;+}+export function defaultCommandForProvider(provider: AgentProvider, fallback = ''): string {if (provider === 'custom') return fallback;return providerPreset(provider).defaultCommand || fallback;diff --git a/src/shared/mcpCatalog.ts b/src/shared/mcpCatalog.tsnew file mode 100644index 00000000..607fcf43--- /dev/null+++ b/src/shared/mcpCatalog.ts@@ -0,0 +1,172 @@+/**+ * Default MCP server catalog (Workstream 3). A dependency-free, importable-by-both+ * (main + renderer) registry of the MCP servers Munder Difflin can wire into each+ * agent's per-session `settings.json`. Keep it free of electron/UI/node imports.+ *+ * Tiers gate consent:+ * - 'safe-readonly' → no secret, no destructive write OUTSIDE the agent cwd; shipped+ * ON by default (`defaultEnabled:true`). `filesystem`/`git` are+ * scoped to the agent cwd at merge time (never whole-disk).+ * - 'write' → can mutate state beyond the workspace; OFF by default,+ * consent-gated.+ * - 'secret' → needs an API key / token / connection string; OFF by default,+ * consent-gated.+ *+ * The actual merge (catalog ∩ enabled, cwd-scoping of filesystem/git, id namespacing,+ * non-fatal resolution) is Workstream 3's `buildDefaultMcpServers`/`hookSettings`+ * job — this module only declares the entries, their tiers, and the seed defaults.+ *+ * NOTE: several reference servers ship as Python (uvx) rather than npm (npx). The+ * commands below reflect each server's real transport; entries that couldn't be+ * verified against an installed server are flagged `// TODO-verify`. Workstream 3+ * makes a server that fails to resolve non-fatal to the agent.+ */++export type McpTier = 'safe-readonly' | 'write' | 'secret';++export interface McpCatalogEntry {+ /** Stable catalog id (also the consent key in `config.mcpDefaults`). The merge+ * step namespaces the written server id (e.g. `munder-<id>`) to avoid clobbering+ * a user's own `~/.claude` MCP server of the same name. */+ id: string;+ /** Human label for the consent UI. */+ label: string;+ /** One-line description for the consent UI / hire import preview. */+ description: string;+ /** The MCP stdio server launch spec. `filesystem`/`git` carry a placeholder cwd+ * arg that Workstream 3 replaces with the agent cwd at merge time. */+ spec: {+ command: string;+ args: string[];+ /** Required env (e.g. an API token). Present only on write/secret entries; the+ * value is supplied via consent, never hard-coded here. */+ env?: Record<string, string>;+ };+ tier: McpTier;+ /** Seed for `config.mcpDefaults[id].enabled`. Always === (tier === 'safe-readonly'). */+ defaultEnabled: boolean;+}++/** The default MCP bundle. Safe/read-only servers are ON; anything that writes+ * beyond the workspace or needs a secret is OFF until the user consents. */+export const MCP_CATALOG: McpCatalogEntry[] = [+ // ─── Safe, read-only, no-secret — shipped ON ──────────────────────────────+ {+ id: 'sequential-thinking',+ label: 'Sequential Thinking',+ description: 'Structured step-by-step reasoning scratchpad. No I/O, no secrets.',+ spec: { command: 'npx', args: ['-y', '@modelcontextprotocol/server-sequential-thinking'] },+ tier: 'safe-readonly',+ defaultEnabled: true+ },+ {+ id: 'time',+ label: 'Time',+ description: 'Current time and timezone conversions.',+ // Reference time server ships as Python. // TODO-verify transport (uvx vs an npm port)+ spec: { command: 'uvx', args: ['mcp-server-time'] },+ tier: 'safe-readonly',+ defaultEnabled: true+ },+ {+ id: 'fetch',+ label: 'Fetch',+ description: 'Fetch a URL and return its content as markdown (read-only HTTP GET).',+ // Reference fetch server ships as Python. // TODO-verify transport (uvx vs an npm port)+ spec: { command: 'uvx', args: ['mcp-server-fetch'] },+ tier: 'safe-readonly',+ defaultEnabled: true+ },+ {+ id: 'context7',+ label: 'Context7 Docs',+ description: 'Up-to-date library/framework documentation lookups.',+ spec: { command: 'npx', args: ['-y', '@upstash/context7-mcp'] },+ tier: 'safe-readonly',+ defaultEnabled: true+ },+ {+ id: 'filesystem',+ label: 'Filesystem (cwd)',+ description: 'Read/edit files within the agent workspace only (scoped to cwd at spawn).',+ // The trailing arg is the allowed root — Workstream 3 replaces this placeholder+ // with the agent cwd at merge time so it is NEVER whole-disk.+ spec: { command: 'npx', args: ['-y', '@modelcontextprotocol/server-filesystem', '<cwd>'] },+ tier: 'safe-readonly',+ defaultEnabled: true+ },+ {+ id: 'git',+ label: 'Git (cwd)',+ description: 'Inspect git status/log/diff for the workspace repo (scoped to cwd at spawn).',+ // Reference git server ships as Python; `--repository <cwd>` is set at merge time.+ // TODO-verify transport (uvx vs an npm port).+ spec: { command: 'uvx', args: ['mcp-server-git', '--repository', '<cwd>'] },+ tier: 'safe-readonly',+ defaultEnabled: true+ },++ // ─── Write / secret — shipped OFF, consent-gated ──────────────────────────+ {+ id: 'github-token',+ label: 'GitHub',+ description: 'Read/write GitHub issues, PRs, and repos. Requires a personal access token.',+ spec: {+ command: 'npx',+ args: ['-y', '@modelcontextprotocol/server-github'],+ env: { GITHUB_PERSONAL_ACCESS_TOKEN: '' }+ },+ tier: 'secret',+ defaultEnabled: false+ },+ {+ id: 'db',+ label: 'Database',+ description: 'Query a SQL database. Requires a connection string.',+ // TODO-verify exact server package for the user's DB engine (Postgres assumed).+ spec: {+ command: 'npx',+ args: ['-y', '@modelcontextprotocol/server-postgres'],+ env: { DATABASE_URL: '' }+ },+ tier: 'secret',+ defaultEnabled: false+ },+ {+ id: 'email-calendar',+ label: 'Email & Calendar',+ description: 'Read/send mail and read/write calendar events. Requires account credentials.',+ // TODO-verify provider package (Gmail/Google Calendar assumed).+ spec: { command: 'npx', args: ['-y', '@modelcontextprotocol/server-gsuite'], env: { GOOGLE_OAUTH_TOKEN: '' } },+ tier: 'secret',+ defaultEnabled: false+ },+ {+ id: 'search-with-key',+ label: 'Web Search',+ description: 'Keyed web search. Requires a search-provider API key.',+ // TODO-verify provider package (Brave Search assumed).+ spec: { command: 'npx', args: ['-y', '@modelcontextprotocol/server-brave-search'], env: { BRAVE_API_KEY: '' } },+ tier: 'secret',+ defaultEnabled: false+ }+];++/** Look up a catalog entry by id. */+export function mcpCatalogEntry(id: string): McpCatalogEntry | undefined {+ return MCP_CATALOG.find((e) => e.id === id);+}++/** Whether an id is a known safe-readonly server (the only tier a hire manifest may+ * request without surfacing for human consent — Workstream 3 validation). */+export function isSafeReadonlyMcp(id: string): boolean {+ return mcpCatalogEntry(id)?.tier === 'safe-readonly';+}++/** Seed for `DEFAULTS.mcpDefaults` — derived from the catalog so the two never+ * drift (safe-readonly ON, write/secret OFF). */+export function defaultMcpDefaults(): Record<string, { enabled: boolean }> {+ const out: Record<string, { enabled: boolean }> = {};+ for (const e of MCP_CATALOG) out[e.id] = { enabled: e.defaultEnabled };+ return out;+}