refactor: return complete tool results inline

This commit is contained in:
morluto
2026-09-29 07:08:46 +08:00
parent 2160d4fae5
commit 0d96275b68
535 changed files with 4084 additions and 13537 deletions
@@ -153,7 +153,17 @@ describe("HopperClient protocol", () => {
const client = await startClient();
const result = await client.callTool(method);
expect(result.ok).toBe(false);
if (!result.ok) expect(result.error._tag).toBe(expectedTag);
if (!result.ok) {
expect(result.error._tag).toBe(expectedTag);
if (result.error._tag === "HopperRemoteError")
expect(result.error).toMatchObject({ operation: method, requestId: 2 });
if (result.error._tag === "HopperTimeoutError")
expect(result.error).toMatchObject({
operation: method,
requestId: 2,
providerState: "busy",
});
}
});
it("preserves a sanitized bridge exception diagnostic", async () => {