feat(analysis): add bounded memory and call tracing
This commit is contained in:
@@ -278,7 +278,7 @@ describe("HopperClient", () => {
|
||||
const results = await Promise.all(
|
||||
OFFICIAL_TOOL_CONTRACTS.map(({ name }) => client.callTool(name, {})),
|
||||
);
|
||||
expect(results).toHaveLength(34);
|
||||
expect(results).toHaveLength(36);
|
||||
expect(results.every((result) => result.ok)).toBe(true);
|
||||
});
|
||||
|
||||
@@ -317,6 +317,19 @@ describe("HopperClient", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("projects a missing bridge API as typed capability unavailability", async () => {
|
||||
const client = await startClient();
|
||||
const result = await client.callTool("capability_unavailable");
|
||||
expect(result.ok).toBe(false);
|
||||
if (!result.ok)
|
||||
expect(result.error).toMatchObject({
|
||||
_tag: "AnalysisCapabilityUnavailableError",
|
||||
providerId: "hopper",
|
||||
operation: "capability_unavailable",
|
||||
reason: "fixture API is unavailable",
|
||||
});
|
||||
});
|
||||
|
||||
it("cancels and ignores late responses without corrupting the session", async () => {
|
||||
const client = await startClient();
|
||||
const controller = new AbortController();
|
||||
|
||||
Reference in New Issue
Block a user