neo --json Protocol
neo --json is the machine-facing local integration surface for Neo.
- Transport: newline-delimited JSON over
stdinandstdout stdout: protocol events onlystderr: operational diagnostics only- Human-facing modes remain separate:
neofor the interactive Ink UIneo -pfor one-shot print mode
Lifecycle
Recommended client flow:
- Send
initialize - Optionally send
list_sessions,get_session, orresume_session - Send
run - While a run is active, send
cancelorpermission_responseas needed - Send
shutdownbefore process exit when you want deterministic cleanup
Compatibility note:
runstill works withoutinitializerunwith a newsessionIdstill creates a new public session
Requests
All requests are single JSON objects, one per line.
initialize
json
{"type":"initialize","requestId":"init-1","heartbeatIntervalMs":15000}list_sessions
json
{"type":"list_sessions","requestId":"list-1"}resume_session
json
{"type":"resume_session","requestId":"resume-1","sessionId":"public-1"}get_session
json
{"type":"get_session","requestId":"session-1","sessionId":"public-1"}run
json
{"type":"run","requestId":"req-1","sessionId":"public-1","message":"Reply with exactly: ok"}permission_response
json
{"type":"permission_response","permissionRequestId":"perm-1","decision":"allow"}cancel
json
{"type":"cancel","requestId":"req-1"}shutdown
json
{"type":"shutdown","requestId":"bye-1"}