agent-block 0.25.0

Lua-first Agent Runtime built on AgentMesh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- HTTP MCP cancel API fixture.
-- Reads MCP_HTTP_URL from the environment, connects via HTTP transport,
-- then calls mcp.cancel and verifies it does not error.

local url = os.getenv("MCP_HTTP_URL")
assert(url and url ~= "", "MCP_HTTP_URL must be set")

mcp.connect_http("counter", url)
print("CONNECT_HTTP_OK")

-- mcp.cancel is fire-and-forget: it must not throw even with request_id=0.
mcp.cancel("counter", 0)
print("CANCEL_OK")

-- Disconnect cleanly.
mcp.disconnect("counter")
print("FIXTURE_DONE")