/**
 * CitadelActionPort — host adapter for Citadel governance operations.
 *
 * Implements tiered access control (T1-T4) per BYOA (Bring Your Own Agent) framework.
 * Only T3+ agents can seal sprints, T1 is read-only, T4 requires on-chain signing.
 *
 * Source: MASTER-PLAN-v5.md §1.3 (CC service layer) + vauban-gouvernance/rules/ai/tiered-gates.md
 */
// ─── Typed errors ─────────────────────────────────────────────────────────
export class CitadelTierViolationError extends Error {
    required_tier;
    actual_tier;
    operation;
    cause;
    constructor(message, required_tier, actual_tier, operation, cause) {
        super(message);
        this.required_tier = required_tier;
        this.actual_tier = actual_tier;
        this.operation = operation;
        this.cause = cause;
        this.name = "CitadelTierViolationError";
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
export class CitadelTaskRefNotFoundError extends Error {
    task_ref;
    cause;
    constructor(task_ref, cause) {
        super(`Task not found: ${task_ref}`);
        this.task_ref = task_ref;
        this.cause = cause;
        this.name = "CitadelTaskRefNotFoundError";
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
export class CitadelSprintNotActiveError extends Error {
    sprint_id;
    current_status;
    cause;
    constructor(sprint_id, current_status, cause) {
        super(`Sprint ${sprint_id} is not active (status: ${current_status}). Cannot seal.`);
        this.sprint_id = sprint_id;
        this.current_status = current_status;
        this.cause = cause;
        this.name = "CitadelSprintNotActiveError";
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
export class CitadelInvalidStateTransitionError extends Error {
    current_status;
    requested_status;
    cause;
    constructor(current_status, requested_status, cause) {
        super(`Invalid state transition: ${current_status} → ${requested_status}`);
        this.current_status = current_status;
        this.requested_status = requested_status;
        this.cause = cause;
        this.name = "CitadelInvalidStateTransitionError";
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
//# sourceMappingURL=citadel-action.js.map