/**
 * Pure scoring, planning, and analysis functions extracted from OrchestratorEngine.
 * Zero side effects, no class dependencies — safe to call from any module.
 * Re-exported from the orchestrator barrel so callers keep the same import path.
 */
import type { RuntimeArtifactSelectionAudit, RuntimeArtifactOutcomeSnapshot, RuntimeRagUsageSummary, RuntimeTaskGraphSnapshot, RuntimeOrchestrationSnapshot, RuntimeSourceAwareTokenBudgetSnapshot, RuntimeWorkerPlanSnapshot } from '../runtime-registry.js';
import type { KnowledgeFabricBundle } from '../knowledge-fabric.js';
import type { ExecutionRun } from '../../phantom/index.js';
import type { AutonomyIntent, ArtifactHistoryRecord, ArtifactOutcomeHistoryMap, SessionBootstrapResult } from './types.js';
export declare function dedupeStrings(values: string[]): string[];
export declare function shortLabel(value: string, limit: number): string;
export declare function extractKeywords(value: string): string[];
export declare function scoreText(value: string, keywords: string[], intent?: AutonomyIntent): number;
export declare function scorePath(filePath: string, keywords: string[]): number;
export declare function decomposeTask(task: string): string[];
export declare function classifyIntent(task: string): AutonomyIntent;
export declare function classifyPhaseKind(phase: string, intent: AutonomyIntent, index: number, total: number): RuntimeTaskGraphSnapshot['phases'][number]['kind'];
export declare function buildTaskGraph(task: string, phases: string[], intent: AutonomyIntent): RuntimeTaskGraphSnapshot;
export declare function buildWorkerPlan(workerCount: number, mode: RuntimeOrchestrationSnapshot['mode'], taskGraph: RuntimeTaskGraphSnapshot, knowledgeFabric: KnowledgeFabricBundle): RuntimeWorkerPlanSnapshot;
export declare function decideWorkers(requestedWorkers: number | undefined, plannedWorkers: number, phaseCount: number, intent: AutonomyIntent, repeatedFailures: number, knowledgeFabric?: KnowledgeFabricBundle): number;
/**
 * Determine execution mode. `repeatedFailures` must be passed explicitly
 * (previously read from `this.sessionState.repeatedFailures`).
 */
export declare function determineMode(intent: AutonomyIntent, phaseCount: number, workers: number, repeatedFailures: number): RuntimeOrchestrationSnapshot['mode'];
export declare function toSourceAwareTokenBudget(knowledgeFabric: KnowledgeFabricBundle, selectedFiles: string[], reason: string, task?: string): RuntimeSourceAwareTokenBudgetSnapshot;
export declare function toRagCandidateStatus(knowledgeFabric: KnowledgeFabricBundle): SessionBootstrapResult['ragCandidateStatus'];
export declare function toRagUsageSummary(knowledgeFabric: KnowledgeFabricBundle, usage: {
    usedInPlanner: boolean;
    usedInPacket: boolean;
    usedInRuntime: boolean;
}): RuntimeRagUsageSummary;
export declare function artifactHistoryKey(kind: RuntimeArtifactSelectionAudit['selected'][number]['kind'], id: string): string;
export declare function buildArtifactOutcome(audit: RuntimeArtifactSelectionAudit, run: ExecutionRun): RuntimeArtifactOutcomeSnapshot;
export declare function mergeArtifactOutcomeHistory(existing: ArtifactOutcomeHistoryMap | undefined, snapshot: RuntimeArtifactOutcomeSnapshot): ArtifactOutcomeHistoryMap;
/**
 * Look up an artifact's history record from the supplied map.
 * `historyMap` was formerly `this.sessionState.artifactOutcomeHistory`.
 */
export declare function getArtifactHistoryRecord(historyMap: ArtifactOutcomeHistoryMap | undefined, kind: RuntimeArtifactSelectionAudit['selected'][number]['kind'], id: string): ArtifactHistoryRecord | undefined;
export declare function getArtifactHistoryScore(historyMap: ArtifactOutcomeHistoryMap | undefined, kind: RuntimeArtifactSelectionAudit['selected'][number]['kind'], id: string): number;
export declare function deriveArtifactMemoryClass(history?: ArtifactHistoryRecord): 'scratch' | 'session_learning' | 'project_fact' | 'reusable_pattern';
export declare function deriveArtifactFreshness(history?: ArtifactHistoryRecord): 'hot' | 'warm' | 'cold' | 'stale';
export declare function buildRepoSearchDocument(relativePath: string, head: string): string;
export declare function readRepoSearchHead(filePath: string): Promise<string>;
export declare function extractRepoSearchTerms(relativePath: string, head: string): string[];
