refactor(tools): remove arbitrary workflow ceilings
This commit is contained in:
@@ -18,9 +18,9 @@ describe("Ghidra MCP evidence parity", () => {
|
||||
);
|
||||
expect(listed).toMatchObject({
|
||||
operation: "list_procedures",
|
||||
provider: { id: "ghidra", name: "Ghidra", version: "12.1.2" },
|
||||
provider: { id: "ghidra", name: "Ghidra", version: "12.1.4" },
|
||||
analysis_profile: {
|
||||
provider: { id: "ghidra", version: "12.1.2" },
|
||||
provider: { id: "ghidra", version: "12.1.4" },
|
||||
parameters: {
|
||||
import_mode: "ephemeral-read-only",
|
||||
analyzer_preset: "ghidra-default",
|
||||
@@ -78,7 +78,7 @@ describe("Ghidra MCP evidence parity", () => {
|
||||
);
|
||||
expect(pseudocode).toMatchObject({
|
||||
operation: "procedure_pseudo_code",
|
||||
provider: { id: "ghidra", version: "12.1.2" },
|
||||
provider: { id: "ghidra", version: "12.1.4" },
|
||||
normalized_result: expect.stringContaining("return 42"),
|
||||
limitations: expect.arrayContaining([
|
||||
expect.stringContaining("not text-equivalent to Hopper"),
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
ghidraReferenceEdge,
|
||||
} from "../../../src/domain/hopperValues.fixture.js";
|
||||
|
||||
const INSTALL = "/opt/ghidra_12.1.2_PUBLIC";
|
||||
const INSTALL = "/opt/ghidra_12.1.4_PUBLIC";
|
||||
|
||||
export const connectGhidraMcp = async (name: string) => {
|
||||
const calls: GhidraOperation[] = [];
|
||||
@@ -98,7 +98,7 @@ export const sessionEvidence = (session: BinarySession, value: unknown) => {
|
||||
const installationHost = (): GhidraInstallationHost => ({
|
||||
platform: "linux",
|
||||
architecture: "x64",
|
||||
readText: () => "application.version=12.1.2\n",
|
||||
readText: () => "application.version=12.1.4\n",
|
||||
executable: () => true,
|
||||
probeJava: () => ({
|
||||
version: "21.0.11",
|
||||
@@ -113,7 +113,7 @@ const sessionInfo = (profileDigest: string, targetSha256: string) => ({
|
||||
name: "REA Ghidra bridge" as const,
|
||||
run_id: "11111111-1111-4111-8111-111111111111",
|
||||
profile_digest: profileDigest,
|
||||
provider: { id: "ghidra" as const, version: "12.1.2" },
|
||||
provider: { id: "ghidra" as const, version: "12.1.4" },
|
||||
read_only: true as const,
|
||||
analysis_complete: true,
|
||||
analysis_timed_out: false,
|
||||
|
||||
@@ -33,7 +33,7 @@ describe("Ghidra MCP capability routing", () => {
|
||||
result: {
|
||||
open: true,
|
||||
analysis_provider_binding: {
|
||||
provider: { id: "ghidra", version: "12.1.2" },
|
||||
provider: { id: "ghidra", version: "12.1.4" },
|
||||
},
|
||||
tool_availability: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
|
||||
@@ -82,6 +82,28 @@ describe("read_bytes contract", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("list_strings contract", () => {
|
||||
it("describes optional provider string metadata inline", () => {
|
||||
const contract = OFFICIAL_TOOL_CONTRACTS.find(
|
||||
({ name }) => name === "list_strings",
|
||||
);
|
||||
expect(
|
||||
contract?.outputSchema.shape.result.safeParse([
|
||||
{
|
||||
address: "0x1000",
|
||||
value: "coffee",
|
||||
string: {
|
||||
encoding: "UTF-8",
|
||||
termination: "present_or_not_required",
|
||||
byte_length: 6,
|
||||
},
|
||||
},
|
||||
{ address: "0x1008", value: "beans" },
|
||||
]).success,
|
||||
).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await Promise.all(
|
||||
resources.splice(0).map(async (resource) => resource.close()),
|
||||
|
||||
Reference in New Issue
Block a user