export type RequestIntent = "status" | "resume" | "memory_query" | "repo_read" | "code_edit" | "debug_error" | "web_research" | "plan" | "chat" | "unknown";
export type DebloatRisk = "read" | "write" | "network" | "dangerous";
export type DebloatSandbox = "read-only" | "workspace-write" | "full-access";
export type DebloatFailurePolicy = "required-only" | "strict";
export interface RawPromptEnvelope {
    readonly rawText: string;
    readonly provider?: string;
    readonly model?: string;
    readonly userPayload?: string;
    readonly risk?: DebloatRisk;
    readonly sandbox?: DebloatSandbox;
    readonly executionSelection?: string;
    readonly role?: SignalFrame["role"];
    readonly evidenceRequired?: boolean;
    readonly capabilityEnvelope?: {
        readonly mcpEnabled: readonly string[];
        readonly skillsEnabled: readonly string[];
        readonly toolsEnabled: boolean;
        readonly liveRequired: boolean;
    };
    readonly runtimeStatus?: {
        readonly failedMcpServers: readonly string[];
        readonly connectedMcpServers: readonly string[];
    };
}
export interface SignalFrame {
    readonly userRequest: string;
    readonly provider: string;
    readonly model: string;
    readonly risk: DebloatRisk;
    readonly sandbox: DebloatSandbox;
    readonly executionSelection?: string;
    readonly role: "coordinator" | "planner" | "executor" | "reviewer";
    readonly evidenceRequired: boolean;
    readonly availableMcp: readonly string[];
    readonly availableSkills: readonly string[];
    readonly failedMcp: readonly string[];
}
export interface CapabilitySelection {
    readonly requiredMcp: readonly string[];
    readonly optionalMcp: readonly string[];
    readonly selectedSkills: readonly string[];
    readonly disabledMcp: readonly string[];
}
export interface RuntimeSidecar {
    readonly provider: string;
    readonly model: string;
    readonly intent: RequestIntent;
    readonly risk: DebloatRisk;
    readonly sandbox: DebloatSandbox;
    readonly requiredMcp: readonly string[];
    readonly optionalMcp: readonly string[];
    readonly disabledMcp: readonly string[];
    readonly selectedSkills: readonly string[];
    readonly failurePolicy: DebloatFailurePolicy;
}
export interface DebloatDiagnostics {
    readonly originalChars: number;
    readonly finalChars: number;
    readonly compressionRatio: number;
    readonly removedSections: readonly string[];
    readonly warnings: readonly string[];
}
export interface DebloatedNlpCompileResult {
    readonly modelPrompt: string;
    readonly runtimeSidecar: RuntimeSidecar;
    readonly diagnostics: DebloatDiagnostics;
}
interface FailureResolution {
    readonly failurePolicy: "required-only";
    readonly blockers: readonly string[];
    readonly warnings: readonly string[];
}
export declare function compileBloatToNlp(envelope: RawPromptEnvelope): DebloatedNlpCompileResult;
export declare function extractSignalFrame(envelope: RawPromptEnvelope): SignalFrame;
export declare function classifyIntent(userRequest: string): RequestIntent;
export declare function classifyRisk(intent: RequestIntent, userRequest: string): DebloatRisk;
export declare function selectCapabilities(input: {
    readonly intent: RequestIntent;
    readonly availableMcp: readonly string[];
    readonly availableSkills: readonly string[];
    readonly failedMcp: readonly string[];
}): CapabilitySelection;
export declare function resolveFailurePolicy(input: {
    readonly requiredMcp: readonly string[];
    readonly failedMcp: readonly string[];
}): FailureResolution;
export declare function renderNlpPrompt(input: {
    readonly signal: SignalFrame;
    readonly intent: RequestIntent;
    readonly selection: CapabilitySelection;
    readonly warnings: readonly string[];
}): string;
export declare function renderBlockerPrompt(input: {
    readonly signal: SignalFrame;
    readonly intent: RequestIntent;
    readonly blockers: readonly string[];
}): string;
export declare function validateDebloatedPrompt(input: {
    readonly originalText: string;
    readonly modelPrompt: string;
    readonly selection: CapabilitySelection;
    readonly signal: SignalFrame;
}): DebloatDiagnostics;
export declare function getPromptBudget(intent: RequestIntent): number;
export declare function filterMcpConfigForRuntime(input: {
    readonly allMcpConfig: Record<string, unknown>;
    readonly sidecar: RuntimeSidecar;
}): {
    mcpServers: Record<string, unknown>;
};
/**
 * Per-Turn MCP Config Filter (Section 10).
 * Merges user + project MCP configs, then filters by sidecar allowed set.
 * allowed = requiredMcp ∪ optionalMcp − disabledMcp
 */
export declare function filterMcpConfigForTurn(input: {
    readonly userMcpConfig: Record<string, unknown>;
    readonly projectMcpConfig: Record<string, unknown>;
    readonly sidecar: RuntimeSidecar;
}): {
    mcpServers: Record<string, unknown>;
};
/**
 * Provider Runtime Selector (Section 11).
 * Returns the provider runtime mode: raw stdout only when debugRaw=true.
 * Default is provider-event (structured event stream).
 */
export type ProviderRuntimeMode = "provider-event" | "provider-print";
export declare function selectProviderRuntime(input: {
    readonly provider: string;
    readonly intent: RequestIntent;
    readonly debugRaw?: boolean;
}): ProviderRuntimeMode;
export declare function renderUserFacingRoutingNlp(input: {
    readonly intent: RequestIntent;
    readonly selected: CapabilitySelection;
    readonly ignoredMcpCount: number;
}): string;
export {};
