KnowledgeProjectSearch class final

A search across a project's bundles, ranked together under one limit.

Equal source paths in different bundles stay separate citations. Ties in similarity break by bundle path, then source path, then chunk ID; chunk IDs do not depend on where a bundle is checked out, so copies of one bundle rank alike.

Constructors

KnowledgeProjectSearch(List<ProjectBundle> bundles, List<KnowledgeSearchResponse> responses, {required int limit, List<KnowledgeSearchFreshness>? freshness})
Ranks the per-bundle responses, one for each of bundles in order, keeping the best limit matches and at most limit context passages: each match, followed by the relationship context reached from it. freshness, when given, has one entry per bundle too.
factory

Properties

bundles → List<ProjectBundle>
The bundles searched, in order.
final
context → List<KnowledgeCitation>
The matches and the relationship context reached from each, in that order, within the limit.
final
freshness → List<KnowledgeSearchFreshness>
What the search found out about each bundle's index, in order.
final
hashCode → int
The hash code for this object.
no setterinherited
matches → List<KnowledgeCitation>
The best matches across all bundles, best first.
final
notices → List<KnowledgeNotice>
Each bundle's notices in bundle order, each naming its KnowledgeNotice.bundle, so its KnowledgeNotice.text starts with the bundle's name.
final
responses → List<KnowledgeSearchResponse>
Each bundle's own response, which the result was ranked from.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
The JSON of wayfinder search --output=json in project mode.
toMarkdown() → String
## Matches and ## Related Context with citations of the form bundle-path/source-path:lines, then the notices: the text of wayfinder search and the MCP search tool. Control characters are escaped.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited