Documentation
¶
Overview ¶
Package server provides the gRPC server for yaad. Uses google.golang.org/grpc with a hand-written service descriptor (no protoc required — messages are JSON-encoded over gRPC).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeDashboard ¶
ServeDashboard serves the graph visualization dashboard at /yaad/ui.
Types ¶
type GRPCNode ¶
type GRPCNode struct {
ID string `json:"id"`
Type string `json:"type"`
Content string `json:"content"`
Summary string `json:"summary"`
Scope string `json:"scope"`
Project string `json:"project"`
Tier int `json:"tier"`
Tags string `json:"tags"`
Confidence float64 `json:"confidence"`
SourceSession string `json:"source_session"`
SourceAgent string `json:"source_agent"`
}
type GRPCServer ¶
type GRPCServer struct {
// contains filtered or unexported fields
}
GRPCServer implements the yaad gRPC service.
func NewGRPCServer ¶
func NewGRPCServer(eng *engine.Engine, addr string) *GRPCServer
NewGRPCServer creates a gRPC server.
func (*GRPCServer) ListenAndServe ¶
func (s *GRPCServer) ListenAndServe() error
ListenAndServe starts the gRPC server.
func (*GRPCServer) NotifyWatchers ¶
func (s *GRPCServer) NotifyWatchers(event string, node *storage.Node)
NotifyWatchers broadcasts a memory event to all active WatchMemories streams.
type MCPServer ¶
type MCPServer struct {
// ToolProfile controls which tools are exposed.
// "agent" = 8 core tools (saves ~800 tokens), "all" = all 15 tools.
ToolProfile string
// contains filtered or unexported fields
}
MCPServer wraps the MCP protocol server.
func NewMCPServer ¶
NewMCPServer creates an MCP server with yaad tools registered. profile: "agent" (8 core tools, saves tokens) or "all" (15 tools, default).
func (*MCPServer) ServeStdio ¶
ServeStdio starts the MCP server on stdin/stdout.
type MemoryEvent ¶
type RESTServer ¶
type RESTServer struct {
SSE *SSEBroker
// contains filtered or unexported fields
}
RESTServer serves the HTTP API.
func NewRESTServer ¶
func NewRESTServer(eng *engine.Engine, addr string) *RESTServer
NewRESTServer creates a REST server.
func (*RESTServer) ListenAndServe ¶
func (s *RESTServer) ListenAndServe() error
ListenAndServe starts the HTTP server.
func (*RESTServer) RegisterRoutes ¶
func (s *RESTServer) RegisterRoutes(mux *http.ServeMux)
RegisterRoutes registers all routes on the given mux (useful for testing).
func (*RESTServer) WithEmbedder ¶
func (s *RESTServer) WithEmbedder(p embeddings.Provider) *RESTServer
WithEmbedder sets the embedding provider for vector search.
func (*RESTServer) WithTLS ¶
func (s *RESTServer) WithTLS(cfg *stdtls.Config) *RESTServer
WithTLS sets TLS config on the server.