@opzero/codez-hub-client
v0.1.2
Published
Machine-agent client for codez-hub. Connects a CodeZ/CodeZero machine to a hosted zhub instance.
Readme
@opzero/codez-hub-client
Machine-agent client for codez-hub. Connects a CodeZ/CodeZero machine to a hosted zhub instance over a single authenticated WebSocket: registers the machine, heartbeats, forwards CodeZ SSE events, and handles command dispatch from the Hub. Use it to ship the agent inside your own process without pulling in the Cloudflare Worker.
Usage
import { HubMachineAgent, type HubAgentConfig } from "@opzero/codez-hub-client";
const agent = new HubMachineAgent(config, async (action, params) => {
// handle command actions (create_session, send_prompt, etc.)
return {};
});
await agent.connect();