Expand description
JSON-RPC 2.0 based IPC protocol for the synwire daemon.
The daemon communicates with MCP server proxies over a Unix domain socket using newline-delimited JSON (NDJSON). Each line is a complete JSON-RPC 2.0 request or response object.
§Supported methods
| Method string | Variant | Description |
|---|---|---|
index | IpcMethod::Index | Trigger indexing for a worktree |
search | IpcMethod::Search | Semantic vector search |
graph_query | IpcMethod::GraphQuery | Code graph query |
graph_search | IpcMethod::GraphSearch | Code graph search |
community_search | IpcMethod::CommunitySearch | Community detection search |
hybrid_search | IpcMethod::HybridSearch | Hybrid vector + BM25 search |
clone_repo | IpcMethod::CloneRepo | Clone a repository |
xref_query | IpcMethod::XrefQuery | Cross-reference query |
index_status | IpcMethod::IndexStatus | Check indexing status |
§Wire format
Each message is a single UTF-8 JSON object terminated by \n. The daemon
reads one line at a time, deserialises it as an IpcRequest, dispatches
the method, and writes back an IpcResponse followed by \n.
Structs§
- IpcError
- A JSON-RPC 2.0 error object.
- IpcRequest
- A JSON-RPC 2.0 request received from a client over the UDS.
- IpcResponse
- A JSON-RPC 2.0 response sent back to the client.
Enums§
- IpcMethod
- The set of IPC methods the daemon understands.
Constants§
- ERROR_
INTERNAL - Error code: an internal error occurred while processing the request.
- ERROR_
INVALID_ PARAMS - Error code: invalid method parameters.
- ERROR_
METHOD_ NOT_ FOUND - Error code: the requested method does not exist.
- ERROR_
PARSE - Error code: the request could not be parsed as valid JSON-RPC.
Functions§
- read_
request - Read a single JSON-RPC request from a newline-delimited stream.
- write_
response - Write a JSON-RPC response as a single newline-terminated JSON line.