/** * src/mcp/index.ts — Beacon MCP subsystem entry. Boots a stdio MCP server. * * Originally `@skillfm/beacon-mcp` (PR #190), merged into `@skillfm/local` 2.7.0 * as a subcommand on Day 1 (2026-05-01). Invoked via: * * npx -y @skillfm/local mcp * * Lifecycle: * 1. loadConfig() — env > config.json > degraded fallback * 2. instantiate BrainClient + McpServer(name='skillfm-beacon', v=PKG_VERSION) * 3. registerAllTools(server, deps) — 8 real + 25+ placeholder * 4. install global error guards (stderr ONLY — stdout is MCP transport) * 5. start StdioServerTransport * * BYOK red line: this file MUST NOT touch the user's LLM API keys, cookies, * or vault secrets. The only credential read is SKILLFM_AGENT_TOKEN (an * opaque token issued by SkillFM brain). * * MCP protocol invariant: stdout is reserved for JSON-RPC frames. Any debug * output goes through `console.error` (stderr). Calling `console.log` from * any imported module corrupts the transport — see exhaustive grep in CI. * * TODO Week 5: * - HTTP transport mode (via env SKILLFM_BEACON_MCP_HTTP_PORT) — mirrors * skillfm-local's dual transport setup for multi-tenant cloud agents. * - Health-check endpoint exposed via local UDS for the Beacon GUI. * - Self-upgrade probe (npm view + warn if a newer minor is out). * - Structured request log → ~/.skillfm/beacon-mcp/server.log (rotating). */ /** * Boot the server. Awaits transport.start(); resolves when stdin closes. */ export declare function startServer(): Promise; export { BrainClient } from './brain-client.js'; export { loadConfig } from './config.js'; export { evaluateSuggestion } from './decision-engine.js'; export { loadPrefs, savePrefs, loadRules, saveRules, openSessionCache, BEACON_HOME, } from './cache.js'; export { SkillFmError, SKILLFM_ERROR_CODES } from './errors.js'; export { APRENTICE_CAPABILITIES, getApprenticeCapabilityCatalog, } from '../beacon/apprentice-capabilities.js'; //# sourceMappingURL=index.d.ts.map