/**
 * Tool eligibility resolver for CLI subprocess mode.
 *
 * This layer only gates whether a tool may be offered to the model at all.
 * Permission prompts are handled by the permission rule engine.
 */
import type { ToolDefinition } from "../ports/agent-execution-contracts.js";
import type { PermissionRiskLevel } from "../ports/permission-contracts.js";
export type ToolEligibilityDecision = "allow" | "ask" | "deny";
export type ToolEligibilityStatus = "eligible" | "approval-required" | "blocked-by-policy";
export type ToolEligibilityReasonCode = "policy_blocked" | "requires_approval" | "risk_read" | "risk_write" | "risk_system" | "risk_external_egress";
export interface ToolEligibilityEntry {
    toolName: string;
    status: ToolEligibilityStatus;
    decision: ToolEligibilityDecision;
    riskLevel: PermissionRiskLevel;
    approvalRequired: boolean;
    reasonCodes: ToolEligibilityReasonCode[];
}
export interface ToolEligibilityContext {
    /** Explicitly blocked tool names from config or policy. */
    blockedToolNames?: string[];
    /** Tool name regexes treated as system risk when no manifest risk is present. */
    dangerousPatterns?: string[];
}
export interface ToolEligibilityResult {
    /** Tools eligible for execution, including ask-before-run tools. */
    eligibleTools: ToolDefinition[];
    /** Tools blocked by policy and removed from the LLM tool list. */
    blockedTools: ToolEligibilityEntry[];
    /** Tools needing approval before execution. */
    approvalRequiredTools: ToolEligibilityEntry[];
    /** Full eligibility map by tool name. */
    eligibilityByName: Map<string, ToolEligibilityEntry>;
}
export declare function resolveToolEligibility(tools: ToolDefinition[], context?: ToolEligibilityContext): ToolEligibilityResult;
