Documentation
¶
Index ¶
- func Register(s *server.MCPServer, st *store.Store, projectRoot string) func(bool)
- func RegisterWithOpts(s *server.MCPServer, st *store.Store, projectRoot string, opts RegisterOpts) func(bool)
- func RegisterWorkspaceWithOpts(s *server.MCPServer, w *workspace.Workspace, opts RegisterOpts) func(bool)
- type DriftAuditor
- type EntityReader
- type RegisterOpts
- type SimilarityReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
Register registers all tools and returns a func(bool) to set the indexing flag. Callers should pass true before a cold-start background index and false (via defer) when it finishes.
func RegisterWithOpts ¶ added in v0.3.0
func RegisterWithOpts(s *server.MCPServer, st *store.Store, projectRoot string, opts RegisterOpts) func(bool)
RegisterWithOpts registers the MCP tools with opt-in LLM callout flags and returns a func(bool) to set the indexing flag.
func RegisterWorkspaceWithOpts ¶ added in v0.3.0
func RegisterWorkspaceWithOpts(s *server.MCPServer, w *workspace.Workspace, opts RegisterOpts) func(bool)
RegisterWorkspaceWithOpts registers the MCP tools for a workspace, with opt-in LLM callout flags, and returns the indexing-flag setter.
Types ¶
type DriftAuditor ¶ added in v0.3.0
type DriftAuditor interface {
GetDriftFindings(opts store.DriftAuditOpts) ([]store.DriftFinding, error)
}
DriftAuditor is the drift-audit surface the tools layer consumes from a store.
GetDriftFindings is the single exported drift entry point — the ~20 find*/conflicting* helpers are package-private to internal/store and hide behind it — so drift consumers depend on this narrow interface instead of the whole *store.Store. That keeps the dependency honest (drift rendering needs nothing else from a store) and lets the rendering be unit-tested against a mock. *store.Store satisfies it; in workspace mode each project's *Store does.
type EntityReader ¶ added in v0.3.0
EntityReader resolves an entity UUID to its full record. appendEntitySection uses it to render human-readable canonical names + aliases instead of the bare entity UUIDs stored on mentions. Satisfied by the entity sub-store reached via store.Store.Entity (passed at the call sites in handleNode/handleContext); the sub-store type is unexported, so the satisfaction is enforced there rather than by a package-level var assertion.
type RegisterOpts ¶ added in v0.2.2
RegisterOpts configures which opt-in LLM callout tools are registered. EnableEmbeddings/EnableEnrichment default to false — tools are not registered unless explicitly enabled. NoGitignore mirrors the serve flag so docgraph_status can report which ignore sources are active.
type SimilarityReader ¶ added in v0.3.2
SimilarityReader is the narrow similarity-edge surface handleSimilar consumes from a store. GetSimilarEdgesForDoc is the only store method this tool needs — the ranking/dedup downstream is pure (rankSimilarEdges over []store.Edge) — so the consumer depends on this single-method interface instead of the whole *store.Store. *store.Store satisfies it; in workspace mode each project's *Store does, so handleSimilar passes the per-store value into fetchSimilarEdges for both single-store and workspace modes.