/** * NEXUS query parser and resolver - cross-project task references. * * Supports the `project:taskId` syntax: * - `my-app:T001` - Named project * - `.:T001` - Current project * - `*:T001` - Wildcard (all projects) * - `T001` - Implicit current project * * @task T4574 * @epic T4540 */ import type { Task } from '@cleocode/contracts'; import { type NexusResolveParams } from '@cleocode/contracts'; import { type EngineResult } from '../engine-result.js'; export interface NexusParsedQuery { project: string; taskId: string; wildcard: boolean; } /** Task with project context annotation. */ export type NexusResolvedTask = Task & { _project: string; }; /** * Validate a query string matches expected syntax. */ export declare function validateSyntax(query: string): boolean; /** * Parse a query string into its components. * @throws CleoError with NEXUS_INVALID_SYNTAX for bad format. */ export declare function parseQuery(query: string, currentProject?: string): NexusParsedQuery; /** * Get the current project name from context. * Reads .cleo/project-info.json or falls back to directory name. */ export declare function getCurrentProject(): string; /** * Resolve a project name to its filesystem path. * Handles special cases: "." (current), "*" (wildcard marker). */ export declare function resolveProjectPath(projectName: string): Promise; /** * Resolve a query to task data. * For wildcard queries, returns an array of matches from all projects. * For named projects, returns a single task with project context. */ export declare function resolveTask(_projectRoot: string, params: NexusResolveParams): Promise; /** @deprecated Use `resolveTask(projectRoot, params)` — ADR-057 D1 */ export declare function resolveTask(query: string, currentProject?: string): Promise; /** * Extract the project name from a query without full resolution. * Useful for permission checks before task lookup. */ export declare function getProjectFromQuery(query: string, currentProject?: string): string; /** * Resolve a cross-project task query. * * @task T1569 */ export declare function nexusResolve(query: string, currentProject?: string): Promise>>>; /** * Query highest-weight symbols/nodes from nexus plasticity or brain page nodes. * * Prioritizes brain.db page_nodes (quality_score) over nexus_relations (aggregate weight). * Supports optional --kind (nexus) or --nodeType (brain) filter. * Returns graceful empty result with note when neither DB is available. * * @task T1569 */ export declare function nexusTopEntries(params?: { limit?: number; kind?: string; nodeType?: string; }): Promise>; //# sourceMappingURL=query.d.ts.map