/** * vscode-free driver for @cline/sdk. * * @cline/sdk is ESM-only (Node >=22) and uses createRequire(import.meta.url), * so it must NOT be bundled into the CJS extension. We load it at runtime via * dynamic import(); the bundler keeps it external (see esbuild.mjs). */ export interface ClineTool { id: string; description: string; } export interface SdkSummary { version: string; tools: ClineTool[]; } /** * Drive @cline/sdk with pure, key-free calls and return a renderable summary: * the SDK build version and the agent's builtin tool catalog. Proves the SDK * is linked and callable from the extension host. */ export async function fetchSdkSummary(): Promise { const sdk = await import("@cline/sdk"); const catalog = sdk.getCoreBuiltinToolCatalog(); return { version: sdk.CORE_BUILD_VERSION, tools: catalog.map((entry) => ({ id: entry.id, description: entry.description, })), }; }