Documentation
¶
Overview ¶
@index Shared runtime wiring for ccg CLI and ccg-server binaries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildWalkers ¶
func BuildWalkers(logger *slog.Logger) map[string]*treesitter.Walker
BuildWalkers constructs the language parser registry keyed by file extension. @intent register supported language walkers for build, update, and MCP execution paths.
Types ¶
type Runtime ¶
type Runtime struct {
Logger *slog.Logger
DB *gorm.DB
Store *graphgorm.Store
UnitOfWork ingest.UnitOfWork
Search ingest.SearchWriter
SearchMaintenance document.Maintenance
SearchBackend searchsql.Backend
SearchReader *searchsql.Reader
Walkers map[string]*treesitter.Walker
Syncer *incremental.Syncer
// contains filtered or unexported fields
}
Runtime holds shared graph, DB, parser, and search dependencies. @intent provide one dependency assembly path for local CLI and self-hosted server binaries. @sideEffect Init opens a database connection and Close closes parser/database resources.
func NewRuntime ¶
NewRuntime creates shared runtime dependencies that do not require the database yet. @intent initialize parser walkers once before command-specific database setup runs.
func (*Runtime) Close ¶
func (r *Runtime) Close()
Close releases parser and database resources owned by the runtime. @intent give both binaries one cleanup path for shared dependencies. @sideEffect closes Tree-sitter parsers and the active DB connection.
func (*Runtime) Init ¶
Init opens the configured DB and attaches store/search/incremental services to the runtime. @intent keep schema validation and graph storage wiring identical across ccg and ccg-server. @sideEffect opens a database connection and may run safe local schema initialization.
func (*Runtime) MCPComponents ¶
func (r *Runtime) MCPComponents() mcpruntime.Components
MCPComponents returns the shared application/adapter set used by stdio and HTTP MCP runtimes. @intent keep both transports on one grouped MCP assembly input without exposing composition to inbound adapters.
Directories
¶
| Path | Synopsis |
|---|---|
|
@index Shared MCP runtime assembly for stdio and HTTP server entry points.
|
@index Shared MCP runtime assembly for stdio and HTTP server entry points. |
|
@index Remote HTTP runtime composition for MCP, Wiki, webhook, and repository sync.
|
@index Remote HTTP runtime composition for MCP, Wiki, webhook, and repository sync. |