The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.
test(node): fix the native agent namespace E2E test (#3071)
Jiaqiang Wongb8f76ab8aac9
diff --git a/sdks/node/README.md b/sdks/node/README.mdindex ff9eeb332..0429b6afd 100644--- a/sdks/node/README.md+++ b/sdks/node/README.md@@ -720,9 +720,13 @@ do not build the native module and exclude these integration tests.From the repository root, run`make test:integration:node FILTER='agent namespace'`. The native Box getter test-obtains a handle from a loopback REST server and checks namespace access without-starting a VM or sending agent requests. Separate tests reject plain-object and-prototype-only method receivers before the agent operation runs.+gets a Box from a loopback REST server and reads `box.agents`. It checks that+the result is a native `Agents` instance and the server received only the+initial Box lookup. The+[Rust REST client tests](../../src/boxlite/src/rest/litebox/tests/agents.rs)+cover the HTTP requests issued by `agents.create()` and `agents.get()`.+Separate Node tests reject plain-object and prototype-only method receivers+before the agent operation runs.To compare Node and Python agent results with Rust in real OpenCode VMs, set`BOXLITE_TEST_OPENCODE_BINARY` to the OpenCode 2.2.2 Linux binary and rundiff --git a/sdks/node/tests/agents.integration.test.ts b/sdks/node/tests/agents.integration.test.tsindex d0631cc28..cc2a388f7 100644--- a/sdks/node/tests/agents.integration.test.ts+++ b/sdks/node/tests/agents.integration.test.ts@@ -57,12 +57,6 @@ describe("agent namespace", () => {expect(box).not.toBeNull();const agents = box!.agents;expect(agents).toBeInstanceOf(getNativeModule().Agents);- await expect(agents.create("agent")).rejects.toThrow(- "supported: opencode",- );- await expect(agents.get("agent")).rejects.toThrow(- "agents require a local runtime",- );expect(requests).toEqual(["GET /v1/boxes/agent-box"]);} finally {runtime.close();