/**
 * ManifestRegistryPort — agent manifest registration and lifecycle management (S1 spec).
 *
 * Implements: manifest registration with Ed25519 signatures, lifecycle states
 * (active/deprecated/revoked), version monotonicity, and tier-based compliance gating.
 *
 * Invariants enforced: I-S1-1..12 (capabilities, tier constraints, versioning).
 * Errors: ManifestNotFoundError, ManifestSignatureInvalidError, ManifestVersionConflictError,
 * ManifestComplianceConflictError (from S5 Cedar G-3).
 */
export const SUPPORTED_TIERS = [
    "dev",
    "test",
    "pilot",
    "production",
    "internal",
    "legacy",
];
// ─── Typed errors ─────────────────────────────────────────────────────────────
export class ManifestNotFoundError extends Error {
    name;
    version;
    constructor(name, version) {
        super(`Manifest not found: ${name}@${version}`);
        this.name = name;
        this.version = version;
        this.name = "ManifestNotFoundError";
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
export class ManifestSignatureInvalidError extends Error {
    name;
    version;
    cause;
    constructor(name, version, cause) {
        super(`Manifest signature invalid for ${name}@${version}`);
        this.name = name;
        this.version = version;
        this.cause = cause;
        this.name = "ManifestSignatureInvalidError";
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
export class ManifestVersionConflictError extends Error {
    name;
    version;
    existingStatus;
    constructor(name, version, existingStatus) {
        super(`Manifest version conflict: ${name}@${version} already registered as ${existingStatus}`);
        this.name = name;
        this.version = version;
        this.existingStatus = existingStatus;
        this.name = "ManifestVersionConflictError";
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
export class ManifestComplianceConflictError extends Error {
    name;
    version;
    violation;
    constructor(name, version, violation) {
        super(`Compliance violation for ${name}@${version}: ${violation}`);
        this.name = name;
        this.version = version;
        this.violation = violation;
        this.name = "ManifestComplianceConflictError";
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
export class ManifestValidationError extends Error {
    violations;
    constructor(violations) {
        super(`Manifest validation failed with ${violations.length} violation(s)`);
        this.violations = violations;
        this.name = "ManifestValidationError";
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
//# sourceMappingURL=manifest-registry.js.map