/**
 * PaperclipAdapter -- Concrete orchestrator adapter for the Paperclip framework.
 *
 * Refactored (P3-ORCH-01, AC 4-5) to extend BaseOrchestratorAdapter instead
 * of the deprecated OrchestratorGovernanceAdapter. The refactor is
 * behaviour-preserving: all existing surfaces (getAuditTrail, getPaperclipConfig,
 * preAction, postAction, preTask, postTask, prePlan, postPlan, preDelegation,
 * postDelegation, getCapabilities, getOrchestratorCapabilities) are retained.
 *
 * Migration notes:
 *   - Paperclip's four internal event types (task, plan, delegation, action)
 *     are dual-emitted: once to the internal PaperclipAuditEvent trail and
 *     once as a canonical event from the Section 3.2 taxonomy.
 *   - initialize() accepts either the legacy AdapterConfig shape (for backward
 *     compat with existing tests) or the new OrchestratorAdapterConfig shape.
 *   - HITL (human-in-the-loop) logic is preserved inline.
 *
 * No Paperclip SDK dependency. This maps governance to their orchestration
 * lifecycle hooks.
 *
 * @connexum/ai-governance
 */
import { type ActionContext, type ActionDecision, type ActionResult, type AdapterCapabilities, type AdapterConfig } from '../adapters/index';
import type { TaskContext, TaskDecision, PlanContext, PlanDecision, DelegationContext, DelegationDecision } from './orchestrator-adapter';
import { BaseOrchestratorAdapter } from './base';
import { OrchestratorAdapterConfig, OrchestratorCapabilities, WorkflowContext, WorkflowDecision, WorkflowStepContext, WorkflowStepDecision, WorkflowResult, RoleEdgeContext, RoleEdgeDecision } from './index';
export interface PaperclipAdapterConfig {
    /** Task types this adapter allows (empty = deny all by default) */
    allowedTaskTypes: string[];
    /** Maximum number of steps in a plan */
    maxPlanSteps: number;
    /** Delegation policy: "open" allows all, "restricted" checks permissions */
    delegationPolicy: 'open' | 'restricted';
    /** Tools that are always denied regardless of other rules */
    sensitiveTools: string[];
    /** Enable audit event emission */
    auditEnabled?: boolean;
}
export interface PaperclipAuditEvent {
    timestamp: string;
    eventType: 'task' | 'plan' | 'delegation' | 'action';
    decision: string;
    reason: string;
    context: Record<string, unknown>;
}
export declare class PaperclipAdapter extends BaseOrchestratorAdapter {
    readonly adapterId = "paperclip";
    readonly orchestratorId = "paperclip";
    private paperclipConfig;
    private auditTrail;
    private legacyConfig;
    private _legacyName;
    private _legacyInitialized;
    constructor(config: PaperclipAdapterConfig);
    initialize(config: OrchestratorAdapterConfig | AdapterConfig): void;
    private get hitlEnabled();
    private applyHumanInTheLoop;
    private get auditEnabled();
    private recordAudit;
    /**
     * Dual-emit: record internal Paperclip audit event AND emit canonical
     * event from Section 3.2 taxonomy. Neither suppresses the other.
     */
    private dualEmit;
    /** Return a copy of the internal audit trail. */
    getAuditTrail(): PaperclipAuditEvent[];
    /** Return the adapter's Paperclip-specific configuration (copy). */
    getPaperclipConfig(): PaperclipAdapterConfig;
    get name(): string;
    preAction(context: ActionContext): ActionDecision;
    postAction(context: ActionContext, result: ActionResult): void;
    preTask(task: TaskContext): Promise<TaskDecision>;
    postTask(task: TaskContext, result: Record<string, unknown>): Promise<void>;
    prePlan(plan: PlanContext): Promise<PlanDecision>;
    postPlan(plan: PlanContext, result: Record<string, unknown>): Promise<void>;
    preDelegation(delegation: DelegationContext): Promise<DelegationDecision>;
    postDelegation(delegation: DelegationContext, result: Record<string, unknown>): Promise<void>;
    startWorkflow(ctx: WorkflowContext): Promise<WorkflowDecision>;
    stepWorkflow(ctx: WorkflowStepContext): Promise<WorkflowStepDecision>;
    completeWorkflow(ctx: WorkflowContext, result: WorkflowResult): Promise<void>;
    invokeRoleEdge(edge: RoleEdgeContext): Promise<RoleEdgeDecision>;
    getCapabilities(): AdapterCapabilities;
    getOrchestratorCapabilities(): OrchestratorCapabilities & {
        preAction: boolean;
        postAction: boolean;
        auditLogging: boolean;
        approvalQueue: boolean;
        tamperDetection: boolean;
    };
}
//# sourceMappingURL=paperclip-adapter.d.ts.map