Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

fix(sdk): unstick process.off typecheck against current @types/node

Cursor Agent815d4ba2299f
diff --git a/sdk/ts/remote.test.ts b/sdk/ts/remote.test.ts
index 1f2a0485..c8e73ee7 100644
--- a/sdk/ts/remote.test.ts
+++ b/sdk/ts/remote.test.ts
@@ -176,7 +176,8 @@ describe("RemoteHarness transport", () => {
const h = new RemoteHarness({ url: "http://bridge.test" });
live.push(h);
await Bun.sleep(30);
- process.off("unhandledRejection", listener);
+ // Current @types/node overloads collapse off/removeListener to memoryPressure.
+ (process as NodeJS.EventEmitter).removeListener("unhandledRejection", listener);
expect(unhandled).toBe(0);
await expect(h.sessionId).rejects.toThrow("create failed");
});