Skip to main content

Module nats_service

Module nats_service 

Source
Expand description

CodeGraph NATS service — exposes code graph tools via NatsServiceBuilder.

Provides 8 handlers over the codegraph.cmd subject prefix, making the code graph queryable and modifiable via NATS request/reply:

CommandDescription
searchSearch nodes by name/body pattern
readRead a specific node by ID
depsCallers/callees for a node
replaceUpdate a node’s body (requires rationale)
queryStructured filter query
buildRun cargo build
testRun cargo test
toolsReturn tool schemas for MCP bridge discovery

Subject prefix: codegraph.cmd Binary: nusy-codegraph-service

Structs§

BuildRequest
BuildResponse
CodeGraphState
Mutable state for the CodeGraph NATS service.
CodeNodeFull
DepsRequest
DepsResponse
NodeSummary
QueryRequest
QueryResponse
ReadRequest
ReadResponse
ReplaceRequest
ReplaceResponse
SearchRequest
SearchResponse
TestRequest
TestResponse
ToolSchema
MCP tool schema for bridge discovery.
ToolsResponse

Functions§

handle_build
handle_deps
handle_query
handle_read
handle_replace
handle_search
handle_test
handle_tools
Return MCP tool schemas — called by the MCP bridge on tools/list.
resolve_cargo_path
Resolve the cargo binary path, checking common locations.