Skip to content

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

feat(lp-manifest): W3 hire skills/MCP allowlist, bundled skills, consent UI

Chaitanya Giribb88f4e41acf
diff --git a/docs/hires/spec/hire.schema.json b/docs/hires/spec/hire.schema.json
index eab6aae5..ae11d0ab 100644
--- a/docs/hires/spec/hire.schema.json
+++ b/docs/hires/spec/hire.schema.json
@@ -84,6 +84,35 @@
"maxLength": 300,
"pattern": "^https://",
"description": "Manifest home page (e.g. its gallery card). https only."
+ },
+ "skills": {
+ "type": "array",
+ "maxItems": 8,
+ "items": {
+ "type": "string",
+ "enum": ["md-hive-sync", "md-fetch-summarize", "md-audit"]
+ },
+ "description": "Bundled skill ids to activate in the agent's workspace. References into the BUNDLED_SKILL_IDS allowlist only — never raw file paths. Only the built-in safe (read-only, no-secret) skills may be listed."
+ },
+ "mcpServers": {
+ "type": "array",
+ "maxItems": 8,
+ "items": {
+ "type": "string",
+ "enum": [
+ "sequential-thinking",
+ "time",
+ "fetch",
+ "context7",
+ "filesystem",
+ "git",
+ "github-token",
+ "db",
+ "email-calendar",
+ "search-with-key"
+ ]
+ },
+ "description": "Default MCP catalog ids to enable for this agent. References into the MCP_CATALOG allowlist only — never raw specs. Safe-readonly entries (sequential-thinking, time, fetch, context7, filesystem, git) are pre-filled; write/secret entries (github-token, db, email-calendar, search-with-key) are surfaced for human consent at import and never auto-enabled."
}
}
}
diff --git a/resources/skills/md-audit/SKILL.md b/resources/skills/md-audit/SKILL.md
new file mode 100644
index 00000000..b2e61d78
--- /dev/null
+++ b/resources/skills/md-audit/SKILL.md
@@ -0,0 +1,41 @@
+---
+name: md-audit
+version: 1.0.0
+description: |
+ Read-only code quality audit — scan the current working directory for common
+ issues (bugs, dead code, security hotspots, missing error handling) and return
+ a prioritised findings report. No files are edited.
+ Use when asked to "audit the code", "quick audit", "find issues", "code scan",
+ or "what's wrong with this codebase". (munder-difflin)
+allowed-tools:
+ - Read
+ - Bash
+ - Grep
+---
+
+## Code Audit (read-only)
+
+Perform a read-only code quality scan and return a findings report. Do NOT edit any files.
+
+Steps:
+1. **Scope** — identify the primary language and entry points (`package.json`, `Cargo.toml`, `go.mod`, `pyproject.toml`, or similar).
+2. **Scan** — use `Grep` and `Read` to look for:
+ - Unhandled promise rejections / ignored errors
+ - Hard-coded secrets or credentials (keys, tokens, passwords)
+ - `TODO`/`FIXME`/`HACK` comments that signal known debt
+ - Dead exports (exported symbols with no in-repo import)
+ - Obvious type-safety gaps (unchecked `any`, missing null guards)
+3. **Report** — output a findings list sorted by severity (Critical → High → Medium → Low):
+ ```
+ ## Audit Report — <project name>
+
+ ### Critical
+ - [file:line] <description>
+
+ ### High
+ - ...
+
+ ### Summary
+ <total count> findings across <file count> files scanned.
+ ```
+4. Stop after reporting. Do not apply any fixes.
diff --git a/resources/skills/md-fetch-summarize/SKILL.md b/resources/skills/md-fetch-summarize/SKILL.md
new file mode 100644
index 00000000..ffdc0841
--- /dev/null
+++ b/resources/skills/md-fetch-summarize/SKILL.md
@@ -0,0 +1,28 @@
+---
+name: md-fetch-summarize
+version: 1.0.0
+description: |
+ Fetch a URL and return a concise markdown summary of its content.
+ Read-only: no files are written; the summary is returned as output only.
+ Use when asked to "fetch and summarize", "summarize this URL", "what does
+ this page say", or "get the content of <url>".
+ Proactively suggest when the user pastes a URL and asks what it contains. (munder-difflin)
+allowed-tools:
+ - WebFetch
+ - Bash
+---
+
+## Fetch & Summarize
+
+Given a URL, fetch its content and return a concise markdown summary.
+
+Steps:
+1. Fetch the page with `WebFetch` (or `Bash` with `curl -sL <url> | head -200` as a fallback).
+2. Extract the main content — ignore nav, footer, ads, and boilerplate.
+3. Return a structured summary with:
+ - **Title** (the page's `<title>` or heading)
+ - **One-paragraph overview** of what the page is about
+ - **Key points** as a bullet list (max 5)
+ - **Source** — the URL fetched
+
+Do not save or write the fetched content anywhere. Return the summary directly.
diff --git a/resources/skills/md-hive-sync/SKILL.md b/resources/skills/md-hive-sync/SKILL.md
new file mode 100644
index 00000000..bb80a217
--- /dev/null
+++ b/resources/skills/md-hive-sync/SKILL.md
@@ -0,0 +1,31 @@
+---
+name: md-hive-sync
+version: 1.0.0
+description: |
+ Munder Difflin hive sync — runs the start-of-task hive protocol steps:
+ reads memory.md, checks inbox/ for new messages, and reminds you to record
+ durable facts in memory.md and write coordination files before ending.
+ Use when asked to "sync with the hive", "check my inbox", "hive status",
+ or "hive sync".
+ Proactively suggest at the start of a new task if you haven't checked your
+ hive inbox in this conversation. (munder-difflin)
+allowed-tools:
+ - Read
+ - Bash
+---
+
+## Hive Sync
+
+Run the mandatory hive start-of-task steps:
+
+1. **Read memory** — `Read $AGENT_DIR/memory.md` for durable context from prior sessions.
+
+2. **Check inbox** — list and read all files in `$AGENT_DIR/inbox/` that are NOT in `inbox/.done/`. For each message:
+ - Act on the message.
+ - Move the handled file into `$AGENT_DIR/inbox/.done/` with `mv`.
+
+3. **Report** — summarize what you found in memory and any new inbox messages. Note any tasks assigned to you or information relevant to the current session.
+
+4. **End-of-task reminder** — before closing this conversation, append durable facts, decisions, and outcomes to `$AGENT_DIR/memory.md` so future-you remembers.
+
+Run `echo $AGENT_DIR` if the variable is not set to locate your agent directory under the hive root.
diff --git a/src/renderer/src/components/AddAgentModal.tsx b/src/renderer/src/components/AddAgentModal.tsx
index 75fe0e9c..214a1dfc 100644
--- a/src/renderer/src/components/AddAgentModal.tsx
+++ b/src/renderer/src/components/AddAgentModal.tsx
@@ -7,6 +7,7 @@ import { useStore, type Agent } from '@/store/store';
import { OFFICE_CAST, DEFAULT_CHARACTER, type OfficeCharacterName } from '@/scene/office/cast';
import { type AccentColorName } from '@/design/tokens';
import type { HireManifest } from '@shared/hire';
+import { MCP_CATALOG } from '@shared/mcpCatalog';
import {
type AgentProvider,
type HarnessConfig,
@@ -289,6 +290,67 @@ export function AddAgentModal({ onClose, config }: AddAgentModalProps) {
))}
</span>
)}
+ {hireMeta.skills && hireMeta.skills.length > 0 && (
+ <span style={{ display: 'flex', gap: 4, alignItems: 'baseline', flexWrap: 'wrap', marginTop: 2 }}>
+ <span style={{ fontSize: 12 }}>skills this hire activates:</span>
+ {hireMeta.skills.map((s) => (
+ <code
+ key={s}
+ style={{
+ fontFamily: 'var(--cth-font-mono)',
+ fontSize: 12,
+ padding: '0 4px',
+ background: 'var(--cth-mint-light, #d0f0e0)',
+ boxShadow: 'inset 0 0 0 1px var(--cth-mint-700, #1f7a4d)',
+ color: 'var(--cth-ink-900)'
+ }}
+ >
+ {s}
+ </code>
+ ))}
+ </span>
+ )}
+ {hireMeta.mcpServers && hireMeta.mcpServers.length > 0 && (() => {
+ const safe = hireMeta.mcpServers!.filter(
+ (id) => MCP_CATALOG.find((e) => e.id === id)?.tier === 'safe-readonly'
+ );
+ const consent = hireMeta.mcpServers!.filter(
+ (id) => MCP_CATALOG.find((e) => e.id === id)?.tier !== 'safe-readonly'
+ );
+ return (
+ <div style={{ display: 'flex', flexDirection: 'column', gap: 3, marginTop: 2 }}>
+ {safe.length > 0 && (
+ <span style={{ display: 'flex', gap: 4, alignItems: 'baseline', flexWrap: 'wrap' }}>
+ <span style={{ fontSize: 12 }}>MCP servers (safe, pre-enabled):</span>
+ {safe.map((id) => (
+ <code key={id} style={{
+ fontFamily: 'var(--cth-font-mono)', fontSize: 12, padding: '0 4px',
+ background: 'var(--cth-sky-light, #d0e8f8)',
+ boxShadow: 'inset 0 0 0 1px var(--cth-sky-700, #1f5a8a)',
+ color: 'var(--cth-ink-900)'
+ }}>{id}</code>
+ ))}
+ </span>
+ )}
+ {consent.length > 0 && (
+ <span style={{ display: 'flex', gap: 4, alignItems: 'baseline', flexWrap: 'wrap' }}>
+ <span style={{ fontSize: 12 }}>⚠️ MCP (needs your consent — NOT auto-enabled):</span>
+ {consent.map((id) => (
+ <code key={id} style={{
+ fontFamily: 'var(--cth-font-mono)', fontSize: 12, padding: '0 4px',
+ background: 'var(--cth-paprika-light, #f6d3c4)',
+ boxShadow: 'inset 0 0 0 1px var(--cth-paprika-700, #b3502e)',
+ color: 'var(--cth-ink-900)'
+ }}>{id}</code>
+ ))}
+ <span style={{ fontSize: 11, color: 'var(--cth-ink-700)' }}>
+ — enable in Settings → MCP after reviewing
+ </span>
+ </span>
+ )}
+ </div>
+ );
+ })()}
</div>
)}
<Row label="Name">
diff --git a/src/renderer/src/components/McpDefaultsSettings.tsx b/src/renderer/src/components/McpDefaultsSettings.tsx
new file mode 100644
index 00000000..4c4cc8ba
--- /dev/null
+++ b/src/renderer/src/components/McpDefaultsSettings.tsx
@@ -0,0 +1,143 @@
+import { useState } from 'react';
+import type { HarnessConfig } from '@/store/config';
+import { MCP_CATALOG, type McpTier } from '@shared/mcpCatalog';
+
+export interface McpDefaultsSettingsProps {
+ config: HarnessConfig;
+}
+
+const TIER_ORDER: McpTier[] = ['safe-readonly', 'write', 'secret'];
+const TIER_LABEL: Record<McpTier, string> = {
+ 'safe-readonly': 'Safe & Read-Only (on by default)',
+ 'write': 'Write Access (consent required)',
+ 'secret': 'Requires Secret / API Key (consent required)'
+};
+const TIER_NOTE: Record<McpTier, string> = {
+ 'safe-readonly': 'These servers read data only, need no secrets, and are scoped to the agent workspace. They are enabled for every new agent.',
+ 'write': 'These servers can mutate state beyond the workspace. Off by default — enable only after reviewing.',
+ 'secret': 'These servers require an API key or credentials. Off by default — add your credentials and enable after consent.'
+};
+
+const labelStyle: React.CSSProperties = {
+ fontFamily: 'var(--cth-font-display)',
+ fontSize: 8,
+ lineHeight: '12px',
+ color: 'var(--cth-ink-500)',
+ textTransform: 'uppercase'
+};
+
+export function McpDefaultsSettings({ config }: McpDefaultsSettingsProps) {
+ const [note, setNote] = useState('');
+
+ const enabledFor = (id: string): boolean =>
+ config.mcpDefaults?.[id]?.enabled ?? MCP_CATALOG.find((e) => e.id === id)?.defaultEnabled ?? false;
+
+ const toggle = async (id: string) => {
+ const next = !enabledFor(id);
+ try {
+ await window.cth.updateConfig({
+ mcpDefaults: { ...(config.mcpDefaults ?? {}), [id]: { enabled: next } }
+ });
+ setNote(`${id}: ${next ? 'enabled' : 'disabled'}`);
+ setTimeout(() => setNote(''), 1800);
+ } catch {
+ setNote('could not save');
+ setTimeout(() => setNote(''), 2000);
+ }
+ };
+
+ const byTier = (tier: McpTier) => MCP_CATALOG.filter((e) => e.tier === tier);
+
+ return (
+ <div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
+ <div>
+ <div style={{ ...labelStyle, marginBottom: 6 }}>Default MCP servers</div>
+ <span style={{ fontSize: 12, lineHeight: '16px', color: 'var(--cth-ink-500)' }}>
+ These servers are merged into each new agent's session settings. Safe servers are on by
+ default; write/secret servers are off until you consent. Changes take effect on the next
+ agent spawn — running agents are not affected.
+ </span>
+ </div>
+
+ {TIER_ORDER.map((tier) => {
+ const entries = byTier(tier);
+ if (entries.length === 0) return null;
+ const isConsent = tier !== 'safe-readonly';
+ return (
+ <div key={tier} style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
+ <div style={{ display: 'flex', flexDirection: 'column', gap: 3 }}>
+ <span style={{
+ fontFamily: 'var(--cth-font-display)', fontSize: 8, lineHeight: '12px',
+ color: isConsent ? '#6E1423' : 'var(--cth-ink-500)',
+ textTransform: 'uppercase'
+ }}>
+ {TIER_LABEL[tier]}
+ </span>
+ <span style={{ fontSize: 11, lineHeight: '15px', color: 'var(--cth-ink-400, var(--cth-ink-500))' }}>
+ {TIER_NOTE[tier]}
+ </span>
+ </div>
+
+ <div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
+ {entries.map((entry) => {
+ const on = enabledFor(entry.id);
+ return (
+ <div
+ key={entry.id}
+ style={{
+ display: 'flex', alignItems: 'center', justifyContent: 'space-between',
+ gap: 12, padding: '7px 10px',
+ background: 'var(--cth-paper-100)',
+ boxShadow: `inset 0 0 0 1px ${isConsent && on ? '#6E1423' : 'var(--cth-ink-300)'}`
+ }}
+ >
+ <div style={{ display: 'flex', flexDirection: 'column', gap: 1, flex: 1, minWidth: 0 }}>
+ <span style={{ fontSize: 13, lineHeight: '18px', color: 'var(--cth-ink-900)', fontWeight: 600 }}>
+ {entry.label}
+ <code style={{
+ marginLeft: 6,
+ fontFamily: 'var(--cth-font-mono)',
+ fontSize: 11,
+ color: 'var(--cth-ink-500)',
+ fontWeight: 400
+ }}>{entry.id}</code>
+ </span>
+ <span style={{ fontSize: 12, lineHeight: '16px', color: 'var(--cth-ink-500)', wordBreak: 'break-word' }}>
+ {entry.description}
+ </span>
+ </div>
+ <button
+ type="button"
+ onClick={() => { void toggle(entry.id); }}
+ style={{
+ flexShrink: 0,
+ padding: '3px 10px 1px',
+ background: on
+ ? (isConsent ? 'var(--cth-coral-light, #f6d3c4)' : 'var(--cth-lemon)')
+ : 'var(--cth-cream-200)',
+ boxShadow: `inset 0 0 0 1px ${on ? 'var(--cth-ink-900)' : 'var(--cth-ink-700)'}`,
+ border: 'none',
+ fontFamily: 'var(--cth-font-display)',
+ fontSize: 8,
+ lineHeight: '14px',
+ color: 'var(--cth-ink-900)',
+ cursor: 'pointer',
+ textTransform: 'uppercase'
+ }}
+ >
+ {on ? 'on' : 'off'}
+ </button>
+ </div>
+ );
+ })}
+ </div>
+ </div>
+ );
+ })}
+
+ {note && (
+ <span style={{ fontSize: 12, color: 'var(--cth-mint)' }}>{note}</span>
+ )}
+ </div>
+ );
+}
diff --git a/src/renderer/src/components/SettingsModal.tsx b/src/renderer/src/components/SettingsModal.tsx
index 2117ee6d..dc962a87 100644
--- a/src/renderer/src/components/SettingsModal.tsx
+++ b/src/renderer/src/components/SettingsModal.tsx
@@ -5,6 +5,7 @@ import { PixelPanel } from './PixelPanel';
import { PixelButton } from './PixelButton';
import { Icon } from './Icon';
import { OfficeThemePicker } from './OfficeThemePicker';
+import { McpDefaultsSettings } from './McpDefaultsSettings';
export interface SettingsModalProps {
config: HarnessConfig;
@@ -106,8 +107,8 @@ function clearLocalState(): void {
} catch { /* noop */ }
}
-type Section = 'General' | 'Integrations' | 'Danger Zone';
-const NAV_SECTIONS: Section[] = ['General', 'Integrations', 'Danger Zone'];
+type Section = 'General' | 'MCP' | 'Integrations' | 'Danger Zone';
+const NAV_SECTIONS: Section[] = ['General', 'MCP', 'Integrations', 'Danger Zone'];
export function SettingsModal({ config, onClose }: SettingsModalProps) {
const [confirming, setConfirming] = useState(false);
@@ -786,6 +787,11 @@ export function SettingsModal({ config, onClose }: SettingsModalProps) {
</>
)}
+ {/* MCP DEFAULTS */}
+ {activeSection === 'MCP' && (
+ <McpDefaultsSettings config={config} />
+ )}
+
{/* INTEGRATIONS */}
{activeSection === 'Integrations' && (
<>
diff --git a/src/shared/hire.ts b/src/shared/hire.ts
index 7f0b6597..b32ce77a 100644
--- a/src/shared/hire.ts
+++ b/src/shared/hire.ts
@@ -14,10 +14,26 @@
* flag-shaped arguments (validated below), which the modal shows in full.
* - All fields are length/shape-capped here, in one dependency-free module
* shared by main (deep link / file import) and renderer (prefill).
+ * - `skills` and `mcpServers` are references into the BUNDLED allowlists only —
+ * never raw specs. This is the same threat model as `commandFlags`: a manifest
+ * can never inject an arbitrary executable path, env var, or MCP spec.
+ * Write/secret MCP servers are surfaced for human consent at import, never
+ * auto-enabled (consistent with "import only pre-fills; human clicks spawn").
*/
+import { mcpCatalogEntry } from './mcpCatalog';
+
export const HIRE_SPEC_V1 = 'munder-difflin/hire@1';
+/** Skill ids bundled in app resources (the only values a hire manifest may request
+ * in the `skills` field). A manifest can never name an arbitrary skill path —
+ * only these curated, read-only, no-secret skill ids are allowlisted. */
+export const BUNDLED_SKILL_IDS: ReadonlySet<string> = new Set([
+ 'md-hive-sync',
+ 'md-fetch-summarize',
+ 'md-audit'
+]);
+
/** Providers a manifest may request ('agy' is accepted as an alias for
* 'antigravity'). 'custom' is deliberately NOT allowed — it would let a
* manifest choose an arbitrary local binary. */
@@ -54,12 +70,24 @@ export interface HireManifest {
author?: string;
/** Manifest home (gallery page). https only. */
homepage?: string;
+ /** Bundled skill ids to activate in the agent's workspace. References into
+ * BUNDLED_SKILL_IDS only — never raw file paths or arbitrary skill names. */
+ skills?: string[];
+ /** Default MCP catalog ids to enable for this agent. References into the
+ * MCP_CATALOG allowlist only — never raw specs. Safe-readonly ids are
+ * pre-filled; write/secret ids are surfaced for human consent at import
+ * and never auto-enabled. */
+ mcpServers?: string[];
}
export interface HireValidation {
ok: boolean;
manifest?: HireManifest;
errors: string[];
+ /** MCP catalog ids present in the manifest's `mcpServers` that are NOT
+ * safe-readonly (write or secret tier). These must be surfaced to the human
+ * for explicit consent before they are enabled — they are NEVER auto-enabled. */
+ consentRequired?: string[];
}
const PROVIDERS: readonly string[] = ['claude', 'antigravity', 'codex'];
@@ -234,13 +262,57 @@ export function validateHireManifest(raw: unknown): HireValidation {
else errors.push('"tokenCap" must be a positive integer (max 1e10)');
}
+ // skills — allowlist: references into BUNDLED_SKILL_IDS only; max 8
+ let skills: string[] | undefined;
+ if (o.skills !== undefined) {
+ if (!Array.isArray(o.skills) || o.skills.length > 8) {
+ errors.push('"skills" must be an array of at most 8 items');
+ } else {
+ skills = [];
+ for (const s of o.skills) {
+ if (!str(s) || !s.trim()) { errors.push('"skills" entries must be non-empty strings'); continue; }
+ const id = s.trim();
+ if (!BUNDLED_SKILL_IDS.has(id)) {
+ errors.push(`"skills" entry ${JSON.stringify(id)} is not a bundled skill id — a hire may only reference the built-in safe skills (${[...BUNDLED_SKILL_IDS].join(', ')})`);
+ } else {
+ skills.push(id);
+ }
+ }
+ if (skills.length === 0) skills = undefined;
+ }
+ }
+
+ // mcpServers — allowlist: references into MCP_CATALOG only; max 8; write/secret surfaced for consent
+ let mcpServers: string[] | undefined;
+ const consentRequired: string[] = [];
+ if (o.mcpServers !== undefined) {
+ if (!Array.isArray(o.mcpServers) || o.mcpServers.length > 8) {
+ errors.push('"mcpServers" must be an array of at most 8 items');
+ } else {
+ mcpServers = [];
+ for (const s of o.mcpServers) {
+ if (!str(s) || !s.trim()) { errors.push('"mcpServers" entries must be non-empty strings'); continue; }
+ const id = s.trim();
+ const entry = mcpCatalogEntry(id);
+ if (!entry) {
+ errors.push(`"mcpServers" entry ${JSON.stringify(id)} is not a known catalog id — a hire may only reference built-in MCP servers`);
+ } else {
+ mcpServers.push(id);
+ if (entry.tier !== 'safe-readonly') consentRequired.push(id);
+ }
+ }
+ if (mcpServers.length === 0) mcpServers = undefined;
+ }
+ }
+
if (homepage && !homepage.startsWith('https://')) errors.push('"homepage" must be https');
if (errors.length > 0 || !name) return { ok: false, errors };
return {
ok: true,
errors: [],
- manifest: { spec: HIRE_SPEC_V1, name, description, goal, character, accent, provider, model, commandFlags, capabilities, isolate, tokenCap, author, homepage }
+ consentRequired: consentRequired.length > 0 ? consentRequired : undefined,
+ manifest: { spec: HIRE_SPEC_V1, name, description, goal, character, accent, provider, model, commandFlags, capabilities, isolate, tokenCap, author, homepage, skills, mcpServers }
};
}