/**
 * APS v2 Types — Constitutional Governance Extensions
 * Integrated into the Agent Passport System SDK
 */
export type AssuranceClass = 'mechanically_enforceable' | 'evidentially_auditable' | 'socially_adjudicated';
export type SemanticUncertainty = 'low' | 'medium' | 'high' | 'critical';
export type OutcomeClass = 'success' | 'partial_success' | 'failure' | 'unintended_effect' | 'unknown';
export type EarningContext = 'bootstrap_sandbox' | 'bootstrap_field' | 'field_earned' | 'migration_carried';
export type V2DelegationStatus = 'active' | 'expired' | 'revoked' | 'superseded' | 'grace_period';
export type RiskClass = 'low' | 'medium' | 'high' | 'critical';
export type ReputationInheritance = 'full' | 'discounted' | 'scoped' | 'probationary';
export type ReviewMode = 'async' | 'sync' | 'none';
export type AnomalyType = 'first_max_authority' | 'semantic_uncertainty_violation' | 'delegation_concentration' | 'authority_spike';
export type ActivationStatus = 'active' | 'expired' | 'reviewed_justified' | 'reviewed_unjustified' | 'reviewed_ambiguous';
export interface PolicyContext {
    policy_version: string;
    values_floor_version: string;
    trust_epoch: number;
    issuer_id: string;
    created_at: string;
    valid_from: string;
    valid_until: string;
}
export interface V2ScopeDefinition {
    action_categories: string[];
    semantic_boundaries?: string[];
    resource_limits?: Record<string, number>;
    domain?: string;
    constraints?: Record<string, string>;
    /** HumanEscalationFlag: per-action-class owner-confirmation requirements. */
    escalation_requirements?: EscalationRequirement[];
}
export type ConfirmationScope = 'per_action' | 'per_session' | 'time_window';
export interface EscalationRequirement {
    action_class: string;
    requires_owner_confirmation: boolean;
    /** TTL of a recorded confirmation, in milliseconds. */
    confirmation_ttl_ms: number;
    confirmation_scope: ConfirmationScope;
}
export interface ConfirmationRequest {
    id: string;
    delegation_id: string;
    action_class: string;
    action_details_hash: string;
    confirmation_scope: ConfirmationScope;
    session_id: string | null;
    confirmation_ttl_ms: number;
    created_at: string;
}
export interface OwnerConfirmation {
    id: string;
    request_id: string;
    delegation_id: string;
    action_class: string;
    action_details_hash: string;
    confirmation_scope: ConfirmationScope;
    session_id: string | null;
    confirmed_by: string;
    confirmed_at: string;
    expires_at: string;
    signature: string;
}
/**
 * Identifies the human or organizational principal whose authority traces
 * through one hop of a delegation chain.
 *
 * Required for matrix v2 candidate C-II-3 (recursive delegation accountability
 * beyond two hops). Monotonic narrowing in v1 answers who authorizes what.
 * It does not answer which human bears responsibility when several principals
 * authorize chains that meet at hop three or later. ResponsibilityAnchor
 * carries that answer on the hop itself, and cascadePrincipal in
 * src/v2/delegation/responsibility.ts resolves chains that mix it.
 *
 * The field is additive on V2Delegation. Existing delegations without it
 * remain valid. The cascade falls back to the chain root delegation when no
 * anchors are present.
 */
export interface ResponsibilityAnchor {
    /**
     * Ed25519 public key (hex) of the principal recorded on this hop. When
     * principal_kind is 'human' or 'org' this is the actual human or
     * organization. When principal_kind is 'agent_acting_for_principal' this is
     * the acting agent itself; the upstream human or org is resolved by walking
     * acting_agent_id through the chain.
     */
    principal_id: string;
    /** What kind of entity principal_id refers to on this hop. */
    principal_kind: 'human' | 'org' | 'agent_acting_for_principal';
    /**
     * Required when principal_kind is 'agent_acting_for_principal'. The
     * identifier of the upstream entity this hop acts on behalf of. The cascade
     * walks this through the chain until it lands on a 'human' or 'org' anchor.
     * Must match another anchor's principal_id in the same chain for the
     * cascade to resolve.
     */
    acting_agent_id?: string;
}
export interface V2Delegation {
    id: string;
    version: number;
    supersedes: string | null;
    supersession_justification: string | null;
    delegator: string;
    delegatee: string;
    scope: V2ScopeDefinition;
    policy_context: PolicyContext;
    signature: string;
    status: V2DelegationStatus;
    renewal_reason: string | null;
    expansion_reviewer: string | null;
    expansion_review_sig: string | null;
    assurance_class: AssuranceClass;
    /**
     * Optional principal-of-record carrier for this hop. See ResponsibilityAnchor
     * and cascadePrincipal in src/v2/delegation/responsibility.ts. Newly issued
     * delegations from this SDK version forward should set it. Legacy
     * delegations remain valid; the cascade walks back to the root delegation's
     * delegator as fallback.
     */
    responsibility_anchor?: ResponsibilityAnchor;
    /**
     * Optional audience binding. When present, the delegation is bound to the
     * named recipient identifier(s) and a verifier rejects it when presented to
     * any other recipient (see src/v2/audience-binding). Additive and versioned:
     * a delegation that OMITS this field signs and serializes byte-for-byte as it
     * did before audience binding existed, so existing delegations remain valid.
     * The slot is optional-until-profile-required: a verifier policy may require
     * it (requireAudience), but it is never issuer-asserted assurance.
     */
    aud?: import('./audience-binding/types.js').AudienceBinding;
}
export interface OutcomePerspective {
    reporter: string;
    observed_outcome: string;
    outcome_class: OutcomeClass;
    divergence_score: number;
    signature: string;
    reported_at: string;
}
export interface OutcomeRecord {
    id: string;
    action_id: string;
    agent_id: string;
    declared_intent: string;
    semantic_uncertainty: SemanticUncertainty;
    agent_report: OutcomePerspective;
    principal_report: OutcomePerspective | null;
    adjudicated_report: OutcomePerspective | null;
    consensus: boolean;
    policy_context: PolicyContext;
    assurance_class: AssuranceClass;
}
export interface BehavioralEvidenceMetadata {
    evaluationContextHash: string;
    aggregateScore: number;
    classification: 'hold' | 'bend' | 'break';
    confidence: number;
}
export interface ArtifactProvenance {
    artifact_id: string;
    authoring_agent: string;
    authority_scope: V2ScopeDefinition;
    delegation_ref: string;
    intended_use: string;
    risk_class: RiskClass;
    requires_human_execution: boolean;
    content_hash: string;
    content_size: number;
    artifact_type: string;
    policy_context: PolicyContext;
    signature: string;
    assurance_class: AssuranceClass;
    behavioralEvidence?: BehavioralEvidenceMetadata;
}
export interface Condition {
    field: string;
    operator: 'eq' | 'neq' | 'gt' | 'lt' | 'gte' | 'lte' | 'contains' | 'matches';
    value: string | number | boolean;
}
export interface ConditionSet {
    all_of?: Condition[];
    any_of?: Condition[];
}
export interface ActionRecord {
    action_id: string;
    agent_id: string;
    authority_level: number;
    semantic_uncertainty: SemanticUncertainty;
    risk_class: RiskClass;
    delegation_ref: string;
    was_delegated: boolean;
    complexity: number;
    timestamp: string;
}
export interface AnomalyFlag {
    id: string;
    agent_id: string;
    anomaly_type: AnomalyType;
    action_id: string;
    description: string;
    review_mode: ReviewMode;
    reviewed: boolean;
    review_outcome: string | null;
    created_at: string;
    assurance_class: AssuranceClass;
}
export interface ConcentrationMetrics {
    agent_id: string;
    tasks_retained_ratio: number;
    scope_utilization_breadth: number;
    delegation_refusal_count: number;
    single_agent_workflow_pct: number;
    concentration_risk: number;
    flagged: boolean;
    computed_at: string;
}
export interface AlternativeRejected {
    alternative: string;
    reason: string;
}
export interface ContextualAttestation {
    id: string;
    action_id: string;
    agent_id: string;
    delegation_ref: string;
    context_understanding: string;
    factors_considered: string[];
    alternatives_rejected: AlternativeRejected[];
    expected_outcome: string;
    confidence: number;
    semantic_uncertainty: SemanticUncertainty;
    required: boolean;
    policy_context: PolicyContext;
    signature: string;
    assurance_class: AssuranceClass;
    created_at: string;
}
export interface TrustTier {
    tier: number;
    name: string;
    min_effective_reputation: number;
}
export interface DecayConfig {
    default_decay_factor: number;
    domain_decay_overrides: Record<string, number>;
    policy_version: string;
}
export interface MigrationRequest {
    id: string;
    source_agent: string;
    source_delegation: string;
    limitation: string;
    requested_scope_change: string;
    justification: string;
    agent_signature: string;
    policy_context: PolicyContext;
    status: 'pending' | 'approved' | 'denied';
    approver_response: string | null;
    approver_signature: string | null;
    created_at: string;
}
export interface MigrationRecord {
    id: string;
    source_agent: string;
    source_delegation: string;
    target_agent: string;
    target_delegation: string;
    state_hash: string;
    state_size: number;
    reputation_inheritance: ReputationInheritance;
    migration_factor: number;
    probation_duration: string;
    probation_ends_at: string;
    probation_active: boolean;
    justification: string;
    request_ref: string;
    approver: string;
    approver_signature: string;
    source_signature: string;
    target_signature: string;
    policy_context: PolicyContext;
    assurance_class: AssuranceClass;
    created_at: string;
    status: 'active' | 'probation_complete' | 'rolled_back';
}
export interface AttestationQuality {
    has_context: boolean;
    has_factors: boolean;
    has_alternatives: boolean;
    confidence_calibrated: boolean;
    quality_score: number;
}
export type ApprovalDecision = 'approved' | 'denied' | 'deferred' | 'escalated';
export interface ApprovalRecord {
    id: string;
    principal_id: string;
    agent_id: string;
    intent_id: string;
    decision: ApprovalDecision;
    decision_latency_ms: number;
    intent_complexity: number;
    risk_class: RiskClass;
    timestamp: string;
}
export interface FatigueMetrics {
    principal_id: string;
    window_size: number;
    approval_rate: number;
    avg_decision_latency_ms: number;
    min_decision_latency_ms: number;
    decisions_per_hour: number;
    trivial_before_critical_count: number;
    rubber_stamp_score: number;
    flagged: boolean;
    computed_at: string;
}
export type FatigueAnomalyType = 'rubber_stamping' | 'velocity_spike' | 'complexity_masking' | 'latency_impossible';
export interface EffectDeclaration {
    id: string;
    intent_id: string;
    agent_id: string;
    expected_effects: string[];
    acceptable_divergence: number;
    verification_method: 'self_report' | 'principal_report' | 'oracle' | 'automated';
    policy_context: PolicyContext;
    signature: string;
    created_at: string;
}
export interface EffectVerification {
    id: string;
    declaration_id: string;
    intent_id: string;
    agent_id: string;
    actual_effects: string[];
    matched_effects: string[];
    unmatched_declared: string[];
    undeclared_actual: string[];
    divergence_score: number;
    verdict: 'within_tolerance' | 'divergent' | 'blocked';
    verifier: string;
    signature: string;
    created_at: string;
}
export interface EffectPattern {
    agent_id: string;
    pattern_type: 'systematic_underdeclare' | 'systematic_side_effect' | 'selective_omission';
    frequency: number;
    examples: string[];
    first_seen: string;
    last_seen: string;
}
export interface AgentActionSummary {
    agent_id: string;
    action_category: string;
    count: number;
    period: string;
}
export interface SystemMetrics {
    id: string;
    diversity_index: number;
    resource_velocity: number;
    convergence_score: number;
    top_action_concentration: number;
    top_agent_concentration: number;
    agent_count: number;
    action_count: number;
    computed_at: string;
}
export type EmergencePatternType = 'epistemic_monoculture' | 'resource_depletion' | 'market_concentration' | 'cascade_correlation' | 'consent_gap';
export interface EmergenceFlag {
    id: string;
    pattern_type: EmergencePatternType;
    severity: RiskClass;
    description: string;
    affected_agents: string[];
    metrics_snapshot: SystemMetrics;
    recommended_action: string;
    reviewed: boolean;
    review_outcome: string | null;
    created_at: string;
}
export type GovernancePhase = 'founding' | 'operational' | 'transitional' | 'democratic';
export interface AuthorityTransitionPlan {
    id: string;
    current_phase: GovernancePhase;
    target_phase: GovernancePhase;
    conditions: ConditionSet;
    required_signers: string[];
    minimum_agent_count: number;
    transition_justification: string;
    sunset_root_after_transition: boolean;
    created_at: string;
    status: 'proposed' | 'approved' | 'executing' | 'completed' | 'aborted';
}
export interface SemanticIntentRecord {
    id: string;
    agent_id: string;
    intent_id: string;
    declared_purpose: string;
    declared_keywords: string[];
    action_description: string;
    action_keywords: string[];
    scope_ref: string;
    timestamp: string;
}
export interface SemanticDriftResult {
    intent_id: string;
    agent_id: string;
    keyword_overlap: number;
    purpose_action_similarity: number;
    drift_score: number;
    verdict: 'aligned' | 'drifted' | 'subverted';
    mismatched_keywords: string[];
}
export interface PipelineAction {
    id: string;
    agent_id: string;
    delegation_scope: string[];
    action_category: string;
    input_from: string | null;
    output_to: string | null;
    timestamp: string;
}
export interface CompositeCapability {
    pipeline_id: string;
    agents: string[];
    individual_scopes: Record<string, string[]>;
    composite_capabilities: string[];
    unauthorized_composites: string[];
    flagged: boolean;
    description: string;
    created_at: string;
}
//# sourceMappingURL=types.d.ts.map