Documentation
¶
Overview ¶
Package search exposes the universal, topology-free discovery entry point (#645) as the search MCP tool. It is a thin surface over knowledge.Router: it resolves the caller identity from the platform context, runs one query across every searchable source the persona can access, and returns a balanced, grouped-by-source result set plus a coverage summary so the agent sees the shape of the answer space (datasets, memory, insights, assets, prompts, API endpoints, connections) without first having to know the topology. The router owns per-source scope enforcement and the balanced allocator; this package owns only the tool schema and the request/response shape.
Index ¶
- type Toolkit
- func (*Toolkit) Close() error
- func (*Toolkit) Connection() string
- func (*Toolkit) Kind() string
- func (t *Toolkit) Name() string
- func (t *Toolkit) RegisterTools(s *mcp.Server)
- func (t *Toolkit) SetPersonasForRoles(fn func(roles []string) []string)
- func (*Toolkit) SetQueryProvider(query.Provider)
- func (*Toolkit) SetSemanticProvider(semantic.Provider)
- func (*Toolkit) Tools() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Toolkit ¶
type Toolkit struct {
// contains filtered or unexported fields
}
Toolkit registers the search tool over a knowledge.Router.
func (*Toolkit) Connection ¶
Connection returns the connection name for audit logging (none).
func (*Toolkit) RegisterTools ¶
RegisterTools registers the search tool with the MCP server.
func (*Toolkit) SetPersonasForRoles ¶ added in v1.115.0
SetPersonasForRoles binds the resolver that maps a caller's roles to every persona they BELONG TO. Sources whose visibility rule is persona membership (managed resources) scope on that set rather than on the single resolved persona, which falls back to the configured default persona for a caller whose roles match none — a fallback that would hand an unmatched caller the default persona's material. Optional: with no resolver bound, the caller carries only the resolved persona, matching what the resources middleware does when it has no resolver either. Call once at wiring time.
func (*Toolkit) SetQueryProvider ¶
SetQueryProvider is a no-op: search does not execute queries.
func (*Toolkit) SetSemanticProvider ¶
SetSemanticProvider is a no-op: search reads through the router's providers, not the enrichment semantic provider.