/** * Startup tenancy sync. * * `GET /v1/subscription` (X-API-Key → `{"plan": "free" | "pro" | "team"}`) is * the authoritative signal for what the active key can actually do. At every * server start the MCP: * * 1. fetches the live plan and records it (setLivePlan) so banners, result * structure, and tool descriptions match the key's real scope, * 2. persists the plan to ~/.bhived/config.json so offline consumers (the * CLI's quiet refresh, a later offline MCP start) stay accurate, and * 3. refreshes the bhived block in installed agent instruction files when * the scope changed, via the `bhived` CLI package's marker-based writer. * * Steps 2–3 run only when the active key IS the stored key (config.tenancyTrusted) * — an out-of-band --key/BHIVED_API_KEY run must not stamp another key's scope * onto files that agents using the stored key rely on. Everything is * best-effort: failures leave stored-metadata behavior intact and never block * server startup. */ type Plan = "free" | "pro" | "team"; /** * Fetch the live plan and update local scope state. Safe to call multiple * times (bhived://status re-checks on read). Returns the plan, or null when * the endpoint could not confirm one — with the failure kind recorded via * setLiveCheckOutcome so copy can report 404/401/network distinctly. */ export declare function fetchLivePlan(timeoutMs?: number): Promise; /** Full startup sync: live plan → persist to config.json → refresh instruction files. */ export declare function syncTenancyAtStartup(): Promise; export {}; //# sourceMappingURL=scopeSync.d.ts.map