import type { Finding } from './engine.js'; export interface ScopeSignals { explicit?: string; branch?: string; worktree?: string; issueIds: string[]; } export interface ScopeResolution { issueId: string | null; reason: string; } /** Every known issue id that appears in a branch/worktree name on id boundaries. Exported so * observational integrations can report all evidence while the gate keeps using the same * matcher and precedence below. */ export declare function matchIssueIdsInName(name: string, issueIds: string[]): string[]; /** Resolve the active issue from git signals. Precedence: branch, then worktree. * Zero matches → null (the caller fails closed and gates the whole tracker). * Two distinct ids in one name → ambiguous → null: never guess the scope. */ export declare function resolveActiveIssue(signals: ScopeSignals): ScopeResolution; export interface FindingPartition { blocking: Finding[]; informational: Finding[]; } /** Split findings for a scoped gate. With an active issue, only that issue's * findings — plus workspace-level findings that carry no issueId (e.g. a parse * failure) — gate the turn; everything else is informational. With no active * issue, fail closed: every finding gates. */ export declare function partitionFindings(findings: Finding[], activeId: string | null): FindingPartition;