/** * Build-target detection (issue #417). * * The CLI's `build` command knows the target name (`cli`, `node`, * `vercel`, `lambda`, `cloudflare`, `browser`, `sdk`, `mcpb`, * `distributed`) but doesn't tell the runtime today. This helper exposes * it so `@Tool({ availableWhen: { target: ['cli'] } })` can express * "this tool is only valid in the compiled CLI bundle." * * Resolution order: * * 1. `globalThis.FRONTMCP_BUILD_TARGET` — preferred. Build adapters * inline `const FRONTMCP_BUILD_TARGET = '';` into the * emitted entry shim before any user code runs, so this constant * is correct from the very first line of imports. * 2. `process.env.FRONTMCP_BUILD_TARGET` — set by the build adapter * via the runtime env when inlining isn't viable (e.g. SEA). * 3. `'unknown'` — dev mode, tests, or any context the build command * hasn't touched. * * The supported values match `frontmcp build --target ` plus * `'unknown'` for the dev path. */ export type BuildTarget = 'unknown' | 'node' | 'distributed' | 'cli' | 'vercel' | 'lambda' | 'cloudflare' | 'browser' | 'sdk' | 'mcpb'; export declare function getBuildTarget(): BuildTarget; /** Test helper — reset the cache between specs. */ export declare function resetBuildTargetCacheForTesting(): void;