You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add local HTTP/OpenAPI server and JS SDK for ZERO automation #622
ZERO currently has strong CLI/TUI/ACP flows and zero serve --mcp, but it does not expose a local HTTP control plane for automation, SDK usage, or a future Web UI.
Today, external tools have to shell out to zero exec, parse stream-json output, or use MCP where HTTP session control is not the right fit. That makes it harder to build browser UIs, editor integrations, automation scripts, and typed clients around ZERO sessions.
Requested behavior
Add a v1 local trusted HTTP server: zero serve --http --hostname 127.0.0.1 --port 4096
Requested surface:
Bearer-token auth by default, with generated local token
Optional ZERO_SERVER_TOKEN
--no-auth only on loopback
CORS support
OpenAPI 3.1 at /openapi.json
SSE event stream at /event
Session APIs: create/list/get/update/fork/tree/lineage/event-log
Prompt APIs: sync /message and async /prompt_async
Approval APIs for permission requests and ask-user prompts
Abort support
File read/search APIs confined to project root
JS SDK package: @gitlawb/zero-sdk
Why it belongs in Zero
This is platform infrastructure for ZERO.
It enables:
Future Web UI
Typed SDK integrations
Local automation
Editor extensions
CI/dev tooling
Session browser/chat UI
External clients that need approvals, streaming, and aborts
ZERO already has sessions, event logs, stream-json events, and agent.Run; exposing them through a local HTTP/OpenAPI layer is a natural next step.
Sorry for the silence on this. It is a bigger ask than it looks, which is probably why nobody picked it up: an HTTP control plane means a new auth surface, a new permission boundary, and a versioned API to keep stable, on top of the server itself.
That is not a no. It does mean it needs a maintainer to agree the shape before anyone writes code, otherwise the first PR gets rejected on design rather than on quality. @kevincodex1 this one needs a direction call.
If it helps move things along, the narrower version is worth considering separately: a read-only local endpoint for session state and events, with no control operations. Much smaller surface, and it covers a good part of the editor and dashboard cases without opening a write path.
Escalating rather than approving, @kevincodex1 this needs your call.
The request is reasonable and well argued: an HTTP control plane would make editor integrations, browser UIs, and automation much easier than shelling out to zero exec and parsing stream-json.
What makes it your decision rather than mine is what it changes about Zero's shape. Today the security story is simple enough to state in a sentence: it runs on your machine and the only network traffic is the model request you asked for. An HTTP server that can drive an agent with file-write and shell access is a new listening surface on a developer's machine, and it needs an authentication design, a decision about loopback-only versus configurable binding, and a story for what happens when a browser page on localhost can reach it. All solvable, none of it something to leave to the implementing PR to invent.
Worth deciding the auth model and binding policy up front, then approving against that.
Activity
Vasanthdev2004 commentedon Jul 29, 2026
Sorry for the silence on this. It is a bigger ask than it looks, which is probably why nobody picked it up: an HTTP control plane means a new auth surface, a new permission boundary, and a versioned API to keep stable, on top of the server itself.
That is not a no. It does mean it needs a maintainer to agree the shape before anyone writes code, otherwise the first PR gets rejected on design rather than on quality. @kevincodex1 this one needs a direction call.
If it helps move things along, the narrower version is worth considering separately: a read-only local endpoint for session state and events, with no control operations. Much smaller surface, and it covers a good part of the editor and dashboard cases without opening a write path.
Vasanthdev2004 commentedon Aug 12, 2026
Escalating rather than approving, @kevincodex1 this needs your call.
The request is reasonable and well argued: an HTTP control plane would make editor integrations, browser UIs, and automation much easier than shelling out to
zero execand parsing stream-json.What makes it your decision rather than mine is what it changes about Zero's shape. Today the security story is simple enough to state in a sentence: it runs on your machine and the only network traffic is the model request you asked for. An HTTP server that can drive an agent with file-write and shell access is a new listening surface on a developer's machine, and it needs an authentication design, a decision about loopback-only versus configurable binding, and a story for what happens when a browser page on localhost can reach it. All solvable, none of it something to leave to the implementing PR to invent.
Worth deciding the auth model and binding policy up front, then approving against that.
anandh8x commentedon Aug 29, 2026