import type { Db } from "@paperclipai/db";
import { agents } from "@paperclipai/db";
export type AgentOrgRow = Pick<typeof agents.$inferSelect, "id" | "companyId" | "name" | "reportsTo" | "status">;
export type AgentInvokabilityBlockReason = "missing" | "paused" | "terminated" | "pending_approval" | "unknown_status" | "manager_missing" | "manager_company_mismatch" | "manager_terminated" | "reporting_cycle" | "reporting_chain_too_deep";
export type AgentInvokability = {
    invokable: true;
} | {
    invokable: false;
    reason: AgentInvokabilityBlockReason;
    message: string;
    details: Record<string, unknown>;
    invalidOrgChain: boolean;
};
export declare function evaluateAgentInvokability(agent: AgentOrgRow | null | undefined, companyAgents: AgentOrgRow[]): AgentInvokability;
export declare function evaluateAgentInvokabilityFromDb(db: Db, agent: AgentOrgRow | null | undefined): Promise<AgentInvokability>;
export declare function listInvalidOrgChainDescendantIds(terminatedAgentId: string, companyAgents: AgentOrgRow[]): string[];
export declare function shouldCancelRunsForNonInvokableAgent(result: AgentInvokability): boolean;
//# sourceMappingURL=agent-invokability.d.ts.map