UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

28 lines • 1.61 kB
import type { GitHubAccessor } from '../../accessor/github.ts'; import { PathSpec } from '../../types.ts'; import type { GitHubTransport } from './client.ts'; export interface SearchResult { path: string; sha: string; } export declare function searchCode(transport: GitHubTransport, owner: string, repo: string, query: string, pathFilter?: string): Promise<{ results: SearchResult[]; truncated: boolean; }>; export declare function narrowPaths(accessor: GitHubAccessor, query: string, paths: readonly PathSpec[]): Promise<PathSpec[] | null>; /** * The files under `under` that may hold the whole word `text`. * * Code search answers only where it can vouch for the whole scope: more * than `SCOPE_WARN` files (fewer are cheaper to read), a tree the API did * not truncate, the default branch (the only one code search indexes), a * word the search grammar reads as plain terms (`searchSafe`), and an * answer that is the whole set (`narrowPaths`, which adds back every file * the search never indexes). An empty answer is not trusted either: the * index trails a push. A file with a binary extension is left out: the walk * reads one only under `-a`, and then whatever the answer says. */ export declare function filesContaining(accessor: GitHubAccessor, text: string, under: readonly PathSpec[]): Promise<PathSpec[] | null>; /** Fetch a bounded REST search, following the server's pagination. */ export declare function search(transport: GitHubTransport, kind: string, query: string, limit: number, sort?: string, order?: string): Promise<unknown[]>; //# sourceMappingURL=search.d.ts.map