/**
 * Decision Request & Authorization Flow
 *
 * Handles decision requests when agent confidence is below threshold.
 * Supports consulting internal agents (colony/subagents) and external agents (P2P).
 *
 * Flow:
 * Agent Decision Need
 *     ↓
 * Query ValueFunction → Calculate Confidence
 *     ↓
 * Confidence > Threshold → Execute
 *     ↓ (No)
 * DecisionRequest → [Human | Internal Agents | External Agents]
 *     ↓
 * Authorization / Collaboration
 *     ↓
 * Execute & Archive Judgment
 */
import { Judgment } from './index.js';
export type DecisionLevel = 'autonomous' | 'consult_internal' | 'consult_external' | 'require_human';
export type ConsultationTarget = 'human' | 'colony_ant' | 'subagent' | 'p2p_agent';
export type DecisionStatus = 'pending' | 'authorized' | 'rejected' | 'executed' | 'failed';
export interface DecisionRequest {
    id: string;
    description: string;
    context: string;
    confidence: number;
    threshold: number;
    level: DecisionLevel;
    targets: ConsultationTarget[];
    status: DecisionStatus;
    agentId: string;
    createdAt: string;
    respondedAt?: string;
    response?: DecisionResponse;
    judgment?: Judgment;
}
export interface DecisionResponse {
    authorized: boolean;
    content: string;
    modifier?: string;
    delegate?: ConsultationTarget;
    by: ConsultationTarget;
    timestamp: string;
}
export interface AgentConsultationResult {
    target: ConsultationTarget;
    agentId: string;
    response: string;
    confidence: number;
}
/**
 * Set default confidence threshold
 */
export declare function setConfidenceThreshold(threshold: number): void;
/**
 * Get default confidence threshold
 */
export declare function getConfidenceThreshold(): number;
/**
 * Set default decision level
 */
export declare function setDefaultDecisionLevel(level: DecisionLevel): void;
/**
 * Get default decision level
 */
export declare function getDefaultDecisionLevel(): DecisionLevel;
/**
 * Evaluate a decision need and determine appropriate level
 */
export declare function evaluateDecision(description: string, context: string, agentId: string, threshold?: number): Promise<DecisionRequest>;
/**
 * Submit a decision response
 */
export declare function submitDecisionResponse(requestId: string, response: DecisionResponse): Promise<DecisionRequest | null>;
/**
 * Check if input is a decision response
 */
export declare function isDecisionResponse(input: string): boolean;
/**
 * Parse decision response from natural language
 */
export declare function parseDecisionResponse(input: string): Partial<DecisionResponse>;
/**
 * Query internal agents (colony ants and subagents)
 */
export declare function queryInternalAgents(request: DecisionRequest): Promise<AgentConsultationResult[]>;
/**
 * Process human feedback and distill to judgment
 */
export declare function processHumanFeedback(requestId: string, input: string): Promise<DecisionRequest | null>;
/**
 * Get pending decision requests
 */
export declare function getPendingDecisions(): DecisionRequest[];
/**
 * Get decision request by ID
 */
export declare function getDecisionRequest(id: string): DecisionRequest | undefined;
/**
 * Get decision statistics
 */
export declare function getDecisionStats(): {
    pending: number;
    authorized: number;
    rejected: number;
    total: number;
};
/**
 * Subscribe to decision events
 */
export declare function onDecisionEvent(event: 'decisionCreated' | 'decisionResponded' | 'decisionExecuted', callback: (request: DecisionRequest) => void): void;
/**
 * Unsubscribe from decision events
 */
export declare function offDecisionEvent(event: 'decisionCreated' | 'decisionResponded' | 'decisionExecuted', callback: (request: DecisionRequest) => void): void;
