WebSocket Protocol

Real-time communication protocol for the QNTX web interface.

Endpoints

PathPurpose
/wsMain WebSocket (graph updates, job status, logs)
/lspATS Language Server Protocol (completions, hover)

Message Types

All messages are JSON objects with a type field indicating the message type.

Client → Server

query

Execute an ATS query

FieldDescription
cursorCursor column position
filenameSource file name
lineCursor line position
queryATS query string

Server → Client

job_update

Async job status update

FieldDescription
jobJob object with status, progress, etc.
metadataAdditional metadata about the update

daemon_status

Pulse daemon status broadcast

FieldDescription
active_jobsNumber of active jobs
load_percentCurrent load percentage
runningWhether daemon is running

usage_update

AI usage statistics update

FieldDescription
requestsNumber of requests
tokensTotal tokens used
total_costTotal cost in USD

llm_stream

Streaming LLM response chunks

FieldDescription
contentText content chunk
doneWhether streaming is complete
job_idAssociated job ID

plugin_health

Plugin health status update

FieldDescription
healthyHealth status
namePlugin name
statePlugin state (running/paused)

Type References

Full message type definitions are in Server Types.

← Back to API Index