import type { ExtensionCommandContext } from "@earendil-works/pi-coding-agent"; export declare const ENTITY_TYPES: Set; export declare const ID_PATTERNS: { task: RegExp; sprint: RegExp; bug: RegExp; feature: RegExp; bareTask: RegExp; idFragment: RegExp; }; export declare const FQ_ID_PATTERNS: { task: RegExp; sprint: RegExp; bug: RegExp; feature: RegExp; }; export type ResolverHit = { dir: string; } | { item: any; }; export interface ResolveOptions { entityTypes?: Set; ctx?: ExtensionCommandContext; statusLabel?: string; } export declare function isDebug(): boolean; export declare function resolveToolDir(forgeRoot: string): string; export declare function runStoreCli(toolDir: string, argv: string[], cwd: string): Promise; /** * Try store-cli's native --task-suffix / --sprint-suffix flags. Returns: * - results array on success * - null if the flag is unsupported (older store-cli) — caller should fall back */ export declare function suffixMatch(toolDir: string, cwd: string, kind: "task" | "sprint", suffix: string): Promise; /** * Expand a sprint-shaped arg (fragment "S01" or fully-qualified "CART-S01") * into the list of tasks belonging to the matching sprint(s), in the picker * shape ({ id, type, title, status }). Used when the caller wants a task but * supplied a sprint reference (e.g. `/forge:run-task S01`) — we surface the * sprint's tasks for selection rather than (incorrectly) running the sprint * record as if it were a task. */ export declare function tasksForSprintArg(toolDir: string, cwd: string, arg: string): Promise; /** * Resolution cascade: * 1. @path → use the path directly as artifact directory * 2. Canonical ID → store-cli query --task/--bug/--feature/--sprint * 3. ID suffix → --task-suffix / --sprint-suffix (one call) with loop fallback * 4. Keyword → store-cli query --keyword (title substring) * 5. NLP fallback → store-cli nlp "" */ export declare function resolveEntityRef(arg: string, toolDir: string, cwd: string, opts?: ResolveOptions): Promise; export interface ResolveToCanonicalIdOptions { /** Which entity types to search. Defaults to a single-element set matching `kind`. */ entityTypes?: Set; /** Command label used in error messages (e.g. "forge:run-task"). */ commandLabel?: string; } /** * Resolve a raw user arg to a canonical entity ID string. * * 1. If the arg is already a canonical ID that resolves directly → return it. * 2. If the arg is an unprefixed ID (e.g. "S22-T03") → suffix-match or * prefix-normalize to the canonical form → return it. * 3. If the arg is ambiguous → prompt the user (or hard-fail in non-interactive). * 4. If the arg cannot be resolved → emit an actionable error and return null. */ export declare function resolveToCanonicalId(arg: string, toolDir: string, cwd: string, kind: "task" | "sprint" | "bug" | "feature", opts: ResolveToCanonicalIdOptions & { ctx?: ExtensionCommandContext; }): Promise;