test(mcp): consolidate catalog inventory checks
This commit is contained in:
parent
b783e7febe
commit
3afcd64146
|
|
@ -186,6 +186,7 @@ describe("enhanced MCP tools", () => {
|
|||
)
|
||||
.sort(),
|
||||
).toEqual(ENHANCED_TOOL_CONTRACTS.map(({ name }) => name).sort());
|
||||
expect(listed.tools.map(({ name }) => name)).not.toContain("open_binary");
|
||||
});
|
||||
|
||||
it("executes all twelve tools through production registration", async () => {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import {
|
|||
import { PACKAGE_METADATA } from "../../../src/generatedPackageMetadata.js";
|
||||
import { PRODUCT_IDENTITY, SDK_IDENTITY } from "../../../src/identity.js";
|
||||
import { TOOL_CONTRACTS } from "../../../src/contracts/toolContracts.js";
|
||||
import { PROMPT_CONTRACTS } from "../../../src/contracts/promptContracts.js";
|
||||
import { createServer } from "../../../src/server/createServer.js";
|
||||
import { createServerIdentity } from "../../../src/serverIdentity.js";
|
||||
import { observed } from "../../fixtures/analysisExecution.js";
|
||||
|
|
@ -97,7 +98,7 @@ describe("server and catalog identity", () => {
|
|||
expect(CATALOG_IDENTITY.counts).toEqual({
|
||||
cli_commands: CLI_COMMAND_NAMES.length,
|
||||
mcp_tools: TOOL_CONTRACTS.length,
|
||||
mcp_prompts: 6,
|
||||
mcp_prompts: PROMPT_CONTRACTS.length,
|
||||
});
|
||||
expect(CATALOG_IDENTITY.digests.combined_sha256).toMatch(/^[a-f0-9]{64}$/u);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,11 +7,6 @@ import { HopperRemoteError } from "../../../src/domain/errors.js";
|
|||
import { err } from "../../../src/domain/result.js";
|
||||
import { observed as ok } from "../../fixtures/analysisExecution.js";
|
||||
import { createServer } from "../../../src/server/createServer.js";
|
||||
import {
|
||||
SESSION_TOOL_CONTRACTS,
|
||||
TOOL_CONTRACTS,
|
||||
} from "../../../src/contracts/toolContracts.js";
|
||||
import { MANAGED_WORKFLOW_TOOL_CONTRACTS } from "../../../src/contracts/managedWorkflowToolContracts.js";
|
||||
|
||||
const resources: Array<{ close(): Promise<void> }> = [];
|
||||
|
||||
|
|
@ -50,22 +45,6 @@ const structured = (result: CallToolResult): Record<string, unknown> => {
|
|||
return Object.fromEntries(Object.entries(result.structuredContent));
|
||||
};
|
||||
|
||||
it("preserves the target-open tool inventory without a session", async () => {
|
||||
const client = await connect({
|
||||
execute: () => Promise.resolve(ok(null)),
|
||||
});
|
||||
const listed = await client.listTools();
|
||||
expect(listed.tools).toHaveLength(
|
||||
TOOL_CONTRACTS.length -
|
||||
SESSION_TOOL_CONTRACTS.length -
|
||||
MANAGED_WORKFLOW_TOOL_CONTRACTS.length,
|
||||
);
|
||||
const names = listed.tools.map((t) => t.name);
|
||||
expect(names).toContain("binary_overview");
|
||||
expect(names).toContain("batch_decompile");
|
||||
expect(names).not.toContain("open_binary");
|
||||
});
|
||||
|
||||
it("projects remote failures without provider or bridge details", async () => {
|
||||
const client = await connect({
|
||||
execute: () =>
|
||||
|
|
|
|||
Loading…
Reference in New Issue