export declare const CONNECTED_CONTEXT_SCHEMA_VERSION: "1";
export type SelectedScopeKind = "workspace-root" | "directory" | "files";
export declare const SELECTED_SCOPE_KINDS: readonly SelectedScopeKind[];
export interface SelectedScope {
    readonly schemaVersion: typeof CONNECTED_CONTEXT_SCHEMA_VERSION;
    readonly scopeId: string;
    readonly workspaceRoot: string;
    readonly kind: SelectedScopeKind;
    readonly relativePaths: readonly string[];
    readonly conversationId: string | undefined;
    readonly connectedAtMs: number;
    readonly explicitConnection?: boolean;
}
export interface EvidenceLedgerRef {
    readonly evidenceSchemaVersion: "1";
    readonly runId: string;
    readonly atomId: string | undefined;
}
export type EvidenceAtomProvenanceKind = "lexical-search" | "file-listing" | "excerpt-read" | "structural" | "git-history" | "model-rerank";
export declare const EVIDENCE_ATOM_PROVENANCE_KINDS: readonly EvidenceAtomProvenanceKind[];
export interface EvidenceAtomProvenance {
    readonly kind: EvidenceAtomProvenanceKind;
    readonly tool: string;
    readonly queryFingerprint: string;
}
export type EvidenceAtomRedactionState = "redacted" | "raw-internal";
export declare const EVIDENCE_ATOM_REDACTION_STATES: readonly EvidenceAtomRedactionState[];
export interface LineRange {
    readonly startLine: number;
    readonly endLine: number;
}
export interface EvidenceAtom {
    readonly schemaVersion: typeof CONNECTED_CONTEXT_SCHEMA_VERSION;
    readonly stableId: string;
    readonly scopePath: string;
    readonly lineRange: LineRange | undefined;
    readonly score: number;
    readonly provenance: EvidenceAtomProvenance;
    readonly redactionState: EvidenceAtomRedactionState;
    readonly emittedAtMs: number;
    readonly ledgerRef: EvidenceLedgerRef | undefined;
}
export interface ExplorationBudget {
    readonly searchCallsMax: number;
    readonly filesReadMax: number;
    readonly excerptBytesMax: number;
    readonly modelInputTokensMax: number;
    readonly modelOutputTokensMax: number;
    readonly elapsedMsMax: number;
    readonly rerankCallsMax: number;
}
export declare const DEFAULT_EXPLORATION_BUDGET: ExplorationBudget;
export interface ExplorationUsage {
    readonly searchCalls: number;
    readonly filesRead: number;
    readonly excerptBytes: number;
    readonly modelInputTokens: number;
    readonly modelOutputTokens: number;
    readonly elapsedMs: number;
    readonly rerankCalls: number;
}
export type RetrievalQueryKind = "natural-language" | "exact-symbol" | "file-pattern" | "regex";
export declare const RETRIEVAL_QUERY_KINDS: readonly RetrievalQueryKind[];
export interface RetrievalQuery {
    readonly kind: RetrievalQueryKind;
    readonly text: string;
    readonly caseSensitive: boolean;
    readonly maxResults: number;
    readonly emittedAtMs: number;
}
export type CandidateOmissionReason = "outside-scope" | "binary" | "generated" | "ignored" | "size-exceeded" | "near-duplicate" | "low-relevance" | "redacted-only" | "budget-exhausted" | "tool-unavailable";
export declare const CANDIDATE_OMISSION_REASONS: readonly CandidateOmissionReason[];
export interface CandidateSignal {
    readonly name: string;
    readonly value: number;
}
export interface CandidateFile {
    readonly scopePath: string;
    readonly score: number;
    readonly signals: readonly CandidateSignal[];
    readonly omitted: CandidateOmissionReason | undefined;
}
export interface ContextExcerpt {
    readonly atom: EvidenceAtom;
    readonly content: string;
    readonly contentBytes: number;
}
export type ConnectedFileRole = "read-only" | "editable";
export declare const CONNECTED_FILE_ROLES: readonly ConnectedFileRole[];
export interface ConnectedFileEntry {
    readonly scopePath: string;
    readonly role: ConnectedFileRole;
    readonly selectionReason: string;
    readonly excerpts: readonly ContextExcerpt[];
}
export type UncertaintyMarkerKind = "no-evidence" | "stale-evidence" | "scope-incomplete" | "budget-clipped" | "tool-unavailable" | "low-confidence";
export declare const UNCERTAINTY_MARKER_KINDS: readonly UncertaintyMarkerKind[];
export interface UncertaintyMarker {
    readonly kind: UncertaintyMarkerKind;
    readonly claim: string;
    readonly impactedAtomIds: readonly string[];
    readonly emittedAtMs: number;
}
export interface OmittedContextEntry {
    readonly scopePath: string;
    readonly reason: CandidateOmissionReason;
    readonly omittedAtMs: number;
}
export interface ConnectedContextPack {
    readonly schemaVersion: typeof CONNECTED_CONTEXT_SCHEMA_VERSION;
    readonly stableId: string;
    readonly scope: SelectedScope;
    readonly query: RetrievalQuery;
    readonly budget: ExplorationBudget;
    readonly usage: ExplorationUsage;
    readonly files: readonly ConnectedFileEntry[];
    readonly omitted: readonly OmittedContextEntry[];
    readonly uncertainty: readonly UncertaintyMarker[];
    readonly emittedAtMs: number;
    readonly ledgerRef: EvidenceLedgerRef | undefined;
}
export interface ConnectedContextPackSummary {
    readonly schemaVersion: typeof CONNECTED_CONTEXT_SCHEMA_VERSION;
    readonly stableId: string;
    readonly scopeId: string;
    readonly scopeKind: SelectedScopeKind;
    readonly conversationId: string | undefined;
    readonly queryKind: RetrievalQueryKind;
    readonly fileCount: number;
    readonly readOnlyFileCount: number;
    readonly editableFileCount: number;
    readonly omittedCount: number;
    readonly uncertaintyCount: number;
    readonly usage: ExplorationUsage;
    readonly budget: ExplorationBudget;
    readonly emittedAtMs: number;
}
export interface ConversationAttachmentContextLink {
    readonly attachmentId: string;
    readonly contextPackStableId: string;
    readonly scopeId: string;
    readonly linkedAtMs: number;
}
export interface EvidenceAtomStableIdInput {
    readonly scopeId: string;
    readonly scopePath: string;
    readonly lineRange: LineRange | undefined;
    readonly provenanceKind: EvidenceAtomProvenanceKind;
    readonly provenanceTool: string;
    readonly queryFingerprint: string;
}
export interface ConnectedContextPackStableIdInput {
    readonly scopeId: string;
    readonly queryKind: RetrievalQueryKind;
    readonly queryText: string;
    readonly atomStableIds: readonly string[];
}
export type ValidationResult = {
    readonly ok: true;
} | {
    readonly ok: false;
    readonly reasons: readonly string[];
};
export interface IsValidScopePathOptions {
    readonly mustBeRelative: boolean;
}
export declare function isValidScopePath(path: string, options: IsValidScopePathOptions): boolean;
export declare function isValidLineRange(range: LineRange): boolean;
export declare function isWithinBudget(usage: ExplorationUsage, budget: ExplorationBudget): boolean;
export declare function validateSelectedScope(scope: SelectedScope): ValidationResult;
export declare function validateEvidenceAtom(atom: EvidenceAtom): ValidationResult;
export declare function validateRetrievalQuery(query: RetrievalQuery): ValidationResult;
export declare function validateConnectedContextPack(pack: ConnectedContextPack): ValidationResult;
//# sourceMappingURL=connected-context.d.ts.map