Documentation
¶
Overview ¶
Package grove is Fuse's adapter to the in-process Grove engine. The previous HTTP client + auto-spawn of `grove serve` is gone: Fuse now links against `grove/pkg/grove` and opens the on-disk index directly. Public types (Client, Edge, ImpactNode, SymbolRecord, EnsureRunning) are preserved so the rest of Fuse compiles unchanged.
Index ¶
- func EnsureRunning(ctx context.Context, baseURL, binary, root string, timeout time.Duration) error
- type Client
- func (c *Client) Close()
- func (c *Client) Deps(ctx context.Context, filePath string) ([]Edge, error)
- func (c *Client) EnsureIndexed(ctx context.Context) error
- func (c *Client) Health(ctx context.Context) error
- func (c *Client) Impact(ctx context.Context, query string, maxDepth int) ([]ImpactNode, error)
- func (c *Client) Index(ctx context.Context, dir string) error
- func (c *Client) Symbols(ctx context.Context, query string, limit int) ([]SymbolRecord, error)
- func (c *Client) WithTokenFromDir(dir string) *Client
- type Edge
- type ImpactNode
- type SymbolRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureRunning ¶
EnsureRunning is a no-op in the embedded model — Grove is in-process. Kept for API compatibility; baseURL/binary/timeout are ignored. root is required so we know which repository's .grove/ to attach to.
Types ¶
type Client ¶
Client wraps an embedded Grove engine. BaseURL/Token are accepted for API compatibility but unused.
func (*Client) EnsureIndexed ¶ added in v0.5.0
EnsureIndexed makes the embedded index usable for blast-radius queries. On a fresh clone the engine opens with zero symbols and every Impact/Deps call silently returns nothing, so an empty index triggers a full build (bounded by ctx). A populated index gets a best-effort delta refresh so the graph reflects the current working tree; refresh errors are swallowed because stale impact data is better than failing the merge.
func (*Client) WithTokenFromDir ¶
WithTokenFromDir records the project root so Fuse can open the engine at <dir>/.grove/grove.db on first use. No token is read (none exists).
type Edge ¶
type Edge struct {
From string `json:"from"`
To string `json:"to"`
Type string `json:"type"`
Confidence float64 `json:"confidence"`
}
Edge mirrors the engine edge shape Fuse consumes.
type ImpactNode ¶
type ImpactNode struct {
ID string `json:"id"`
FilePath string `json:"filePath"`
Name string `json:"name"`
}
ImpactNode is one entry in the blast-radius response.