Documentation
¶
Overview ¶
@index HTTP handlers for the ccg-server Wiki UI and its viewer-oriented JSON API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
StaticDir string
RagIndexDir string
NamespaceRoot string
Repository wiki.Repository
Retrieval *retrieval.Service
Logger *slog.Logger
}
Config describes the external Wiki asset directory and data roots. @intent keep Wiki UI serving outside the ccg binary while letting ccg-server expose docs/RAG data.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves static Wiki assets and small JSON APIs for docs exploration. @intent isolate browser-facing Wiki behavior from MCP transport and webhook handlers.
func New ¶
New validates the Wiki static directory and creates a server instance. @intent fail server startup early when --wiki-dir points at an unusable dist directory.
func (*Server) APIHandler ¶
APIHandler routes Wiki JSON API requests. @intent provide browser-friendly access to namespaces, Wiki trees, docs, search, and copied context.
func (*Server) StaticHandler ¶
StaticHandler serves the React dist directory with SPA fallback to index.html. @intent let ccg-server expose the Wiki UI without embedding frontend assets into the binary. @sideEffect reads static files from --wiki-dir.