diff --git a/.superset/config.json b/.superset/config.json new file mode 100644 index 00000000..be379932 --- /dev/null +++ b/.superset/config.json @@ -0,0 +1,5 @@ +{ + "setup": ["bun install"], + "teardown": [], + "run": ["bun run dev mcp start"] +} diff --git a/src/commands/example.test.ts b/src/commands/example.test.ts index ef472562..69b4d8ec 100644 --- a/src/commands/example.test.ts +++ b/src/commands/example.test.ts @@ -42,7 +42,11 @@ describe("exampleAction", () => { it("outputs JSON when --json flag provided", async () => { const consoleSpy = spyOn(console, "log").mockImplementation(() => {}); - await exampleAction("test", { lang: "javascript", json: true }, createDeps()); + await exampleAction( + "test", + { lang: "javascript", json: true }, + createDeps(), + ); const output = consoleSpy.mock.calls[0]?.[0] as string; const parsed = JSON.parse(output); @@ -52,7 +56,11 @@ describe("exampleAction", () => { it("throws AuthRequiredError on auth failure", async () => { await expect( - exampleAction("test", { lang: "python" }, createDeps({ hasValidToken: false })), + exampleAction( + "test", + { lang: "python" }, + createDeps({ hasValidToken: false }), + ), ).rejects.toThrow(AuthRequiredError); }); }); diff --git a/src/commands/search-registration.test.ts b/src/commands/search-registration.test.ts index 8c95073b..08875622 100644 --- a/src/commands/search-registration.test.ts +++ b/src/commands/search-registration.test.ts @@ -11,9 +11,9 @@ describe("registerUnifiedSearchCommands", () => { capability: "enabled", }); - expect(program.commands.some((command) => command.name() === "search")).toBe( - false, - ); + expect( + program.commands.some((command) => command.name() === "search"), + ).toBe(false); expect( program.commands.some((command) => command.name() === "search-status"), ).toBe(false); @@ -29,9 +29,9 @@ describe("registerUnifiedSearchCommands", () => { expiredStoredAuth: false, }); - expect(program.commands.some((command) => command.name() === "search")).toBe( - false, - ); + expect( + program.commands.some((command) => command.name() === "search"), + ).toBe(false); }); it("registers search commands when capability is enabled", async () => { @@ -42,9 +42,9 @@ describe("registerUnifiedSearchCommands", () => { capability: "enabled", }); - expect(program.commands.some((command) => command.name() === "search")).toBe( - true, - ); + expect( + program.commands.some((command) => command.name() === "search"), + ).toBe(true); expect( program.commands.some((command) => command.name() === "search-status"), ).toBe(true); @@ -58,9 +58,9 @@ describe("registerUnifiedSearchCommands", () => { capability: "disabled", }); - expect(program.commands.some((command) => command.name() === "search")).toBe( - true, - ); + expect( + program.commands.some((command) => command.name() === "search"), + ).toBe(true); }); it("registers search commands for opaque env tokens", async () => { @@ -72,9 +72,9 @@ describe("registerUnifiedSearchCommands", () => { envTokenPresent: true, }); - expect(program.commands.some((command) => command.name() === "search")).toBe( - true, - ); + expect( + program.commands.some((command) => command.name() === "search"), + ).toBe(true); }); it("registers search commands for expired stored auth", async () => { @@ -86,8 +86,8 @@ describe("registerUnifiedSearchCommands", () => { expiredStoredAuth: true, }); - expect(program.commands.some((command) => command.name() === "search")).toBe( - true, - ); + expect( + program.commands.some((command) => command.name() === "search"), + ).toBe(true); }); }); diff --git a/src/services/code-navigation-service.ts b/src/services/code-navigation-service.ts index 0cb1120b..05be8b46 100644 --- a/src/services/code-navigation-service.ts +++ b/src/services/code-navigation-service.ts @@ -1204,7 +1204,9 @@ const unifiedSearchGraphQLResponseSchema = z.object({ const unifiedSearchStatusGraphQLResponseSchema = z.object({ data: z .object({ - discoverySearchProgress: unifiedSearchProgressSchema.nullable().optional(), + discoverySearchProgress: unifiedSearchProgressSchema + .nullable() + .optional(), }) .nullable() .optional(), diff --git a/src/shared/unified-search-target.ts b/src/shared/unified-search-target.ts index cd2cdc30..e14ae3d2 100644 --- a/src/shared/unified-search-target.ts +++ b/src/shared/unified-search-target.ts @@ -1,8 +1,10 @@ import type { CodeNavigationTarget } from "../services/index.js"; -import { InvalidArgumentError, parsePackageSpec } from "./package-spec.js"; import { toCodeNavigationRegistry } from "./code-navigation.js"; +import { InvalidArgumentError, parsePackageSpec } from "./package-spec.js"; -export function parseUnifiedSearchTargetSpec(spec: string): CodeNavigationTarget { +export function parseUnifiedSearchTargetSpec( + spec: string, +): CodeNavigationTarget { const trimmed = spec.trim(); if (trimmed.length === 0) { throw new InvalidArgumentError("Target spec cannot be empty."); diff --git a/src/tools/get-example.ts b/src/tools/get-example.ts index e5c02c28..4905d587 100644 --- a/src/tools/get-example.ts +++ b/src/tools/get-example.ts @@ -25,9 +25,7 @@ const schema = { license_mode: z .enum(["strict", "yolo", "custom"]) .optional() - .describe( - 'License filtering mode: strict (default), yolo, or custom.', - ), + .describe("License filtering mode: strict (default), yolo, or custom."), }; const DESCRIPTION = `Get verified, canonical code examples from global open source. diff --git a/src/tools/search-status.ts b/src/tools/search-status.ts index e650b6f8..3592bbaf 100644 --- a/src/tools/search-status.ts +++ b/src/tools/search-status.ts @@ -11,7 +11,10 @@ export interface SearchStatusArgs { } const schema = { - search_ref: z.string().min(1).describe("Search reference returned by search."), + search_ref: z + .string() + .min(1) + .describe("Search reference returned by search."), }; const DESCRIPTION = @@ -32,7 +35,9 @@ export function createSearchStatusTool( const payload = buildUnifiedSearchStatusPayload(outcome); return textResult(JSON.stringify(payload)); } catch (error) { - return errorResult(JSON.stringify(buildUnifiedSearchErrorPayload(error))); + return errorResult( + JSON.stringify(buildUnifiedSearchErrorPayload(error)), + ); } }, };