Documentation
¶
Overview ¶
Package grove is the public, in-process Go API for the Grove code knowledge graph. Prism, Fuse, and Relay import this package and call it directly — there is no HTTP server, no port, no shared-secret token, no auto-start.
Index data lives in <repoRoot>/.grove/grove.db. SQLite WAL mode handles concurrent readers; only one writer at a time per database file.
Index ¶
- type Config
- type Edge
- type EdgeType
- type Engine
- func (e *Engine) Close() error
- func (e *Engine) Deps(ctx context.Context, filePath string) ([]Edge, error)
- func (e *Engine) ICR(ctx context.Context, intent string) IsolatedChangeRegion
- func (e *Engine) Impact(ctx context.Context, query string, maxDepth int) ([]Symbol, error)
- func (e *Engine) Index(ctx context.Context, dir string) (IndexResult, error)
- func (e *Engine) Query(ctx context.Context, intent string, limit int) ([]Symbol, error)
- func (e *Engine) Root() string
- func (e *Engine) Semantic(ctx context.Context, query string, limit int) ([]Scored, error)
- func (e *Engine) Status(ctx context.Context) (Status, error)
- func (e *Engine) Symbols(ctx context.Context, query string, limit int) ([]Symbol, error)
- func (e *Engine) Tests(ctx context.Context, query string) ([]Symbol, error)
- type IndexResult
- type IsolatedChangeRegion
- type Scored
- type Status
- type Symbol
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// RepoRoot is the absolute path to the repository whose .grove/ directory
// holds the index. Required.
RepoRoot string
}
Config controls how Engine opens a repository's Grove index.
type Edge ¶
Re-exported core types — Prism/Fuse/Relay can use these directly without mirroring shapes.
type EdgeType ¶
Re-exported core types — Prism/Fuse/Relay can use these directly without mirroring shapes.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is the embedded Grove API consumed by Prism, Fuse, and Relay. Methods are safe for concurrent use.
func Open ¶
Open initialises the on-disk store, runs migrations, and rebuilds the in-memory graph from whatever symbols are already persisted.
func (*Engine) ICR ¶
func (e *Engine) ICR(ctx context.Context, intent string) IsolatedChangeRegion
ICR computes the Isolated Change Region for a given intent.
func (*Engine) Index ¶
Index walks dir (defaults to RepoRoot), parses changed files via delta SHA, updates the persistent store, and refreshes the in-memory graph.
func (*Engine) Query ¶
Query resolves a natural-language intent into ranked symbols by blending TF-IDF semantic search with substring keyword matches.
type IndexResult ¶
type IndexResult = core.IndexResult
Re-exported core types — Prism/Fuse/Relay can use these directly without mirroring shapes.
type IsolatedChangeRegion ¶
type IsolatedChangeRegion = core.IsolatedChangeRegion
Re-exported core types — Prism/Fuse/Relay can use these directly without mirroring shapes.
type Scored ¶
type Scored = struct {
Symbol *core.SymbolRecord
Score float64
}
Re-exported core types — Prism/Fuse/Relay can use these directly without mirroring shapes.
type Status ¶
Re-exported core types — Prism/Fuse/Relay can use these directly without mirroring shapes.
type Symbol ¶
type Symbol = core.SymbolRecord
Re-exported core types — Prism/Fuse/Relay can use these directly without mirroring shapes.