POC: vscode-free @cline/sdk driver with unit test (Feature #2)

fetchSdkSummary() dynamic-imports the ESM-only SDK and returns its build
version + builtin tool catalog (pure, key-free). Kept vscode-free so it is
unit-testable in Node; test asserts a semver version and the read_files tool.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ben Stull
2026-06-09 23:55:39 -07:00
parent b343f0754a
commit 33bff2b130
2 changed files with 49 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
import { describe, it, expect } from "vitest";
import { fetchSdkSummary } from "../src/cline";
describe("fetchSdkSummary", () => {
it("loads @cline/sdk and returns its version and builtin tool catalog", async () => {
const summary = await fetchSdkSummary();
expect(summary.version).toMatch(/^\d+\.\d+\.\d+/);
expect(summary.tools.length).toBeGreaterThan(0);
expect(summary.tools.map((t) => t.id)).toContain("read_files");
for (const tool of summary.tools) {
expect(typeof tool.id).toBe("string");
expect(typeof tool.description).toBe("string");
}
});
});