/** * Filter-first public symbol search over catalog occurrences. * * Match modes (stated in DTO docs): * - `substring` — case-insensitive simpleName contains query * - `exact` — case-sensitive simpleName equality * - `qualified` — case-sensitive qualifiedName equality * * Filters (including module-init exclusion) run before the bounded top-K * window. Results are ordered by qualified name, file, line, column, symbolId * (code-point comparison). Continuation uses a compact hash identity, not the * potentially large raw tuple. */ import { type Result } from '@opensip-cli/core'; import { type ReadGroupSummary } from './bounded-view.js'; import { type EffectiveGraphSourceFilter, type GraphReadCoverage, type GraphSourceFilter, type GraphSymbolRef } from './query-contracts.js'; import { type SourceRoleMatcher } from './source-filter.js'; import type { GraphReadError } from './types.js'; import type { Catalog, Indexes } from '../types.js'; /** Match semantics for {@link searchSymbolOccurrences}. */ export type SymbolSearchMatch = 'substring' | 'exact' | 'qualified'; /** Match, filtering, grouping, and continuation options for symbol search. */ export interface SymbolSearchQuery { readonly query: string; readonly match: SymbolSearchMatch; readonly filter: GraphSourceFilter; /** Page size; builder retains at most `limit + 1` to prove another page. */ readonly limit: number; /** * Compact continuation token for the last row of the preceding page. */ readonly afterKey?: string; readonly groupBy?: 'none' | 'package' | 'file'; } /** Bounded symbol-search results with effective filters and coverage metadata. */ export interface SymbolSearchView { readonly symbols: readonly GraphSymbolRef[]; /** True when more than `limit` matches exist after `afterKey`. */ readonly hasMore: boolean; readonly effectiveFilter: EffectiveGraphSourceFilter; readonly coverage: GraphReadCoverage; readonly groups?: readonly ReadGroupSummary[]; } /** * Printable stable key matching qualified/file/line/column/symbolId ordering. */ export declare function symbolSearchStableKey(ref: GraphSymbolRef): string; /** Code-point multi-field comparison used for deterministic top-K order. */ export declare function compareSymbolRefs(a: GraphSymbolRef, b: GraphSymbolRef): number; /** * Shared match semantics for symbol search (substring / exact / qualified). * Exported so MCP and other readers reuse one implementation. */ export declare function matchesSymbolSearchQuery(occ: { readonly simpleName: string; readonly qualifiedName: string; }, query: string, match: SymbolSearchMatch): boolean; /** * Search catalog occurrences with filter-first semantics and a bounded top-K * window of size `limit + 1` after an optional exclusive `afterKey`. * * Does not accept regular expressions and does not read source files. */ export declare function searchSymbolOccurrences(_catalog: Catalog, indexes: Indexes, query: SymbolSearchQuery, matcher: SourceRoleMatcher): Result; //# sourceMappingURL=symbol-search.d.ts.map