/**
 * Skill-specific error classes.
 *
 * Each external service (Brave/Tavily, Alpaca, Telegram, Slack, SMTP/Resend,
 * CBOE, Starknet) throws a `<Skill>NotConfiguredError` when required env keys
 * are missing — distinguishes "config gap" from "live API failure".
 *
 * @public
 */
export class SkillNotConfiguredError extends Error {
    skillName;
    missingEnv;
    constructor(skillName, missingEnv) {
        super(`Skill '${skillName}' not configured: missing env ${missingEnv.join(", ")}`);
        this.name = "SkillNotConfiguredError";
        this.skillName = skillName;
        this.missingEnv = missingEnv;
    }
}
export class SkillExecutionError extends Error {
    skillName;
    status;
    cause;
    constructor(skillName, message, opts) {
        super(`Skill '${skillName}' failed: ${message}`);
        this.name = "SkillExecutionError";
        this.skillName = skillName;
        this.status = opts?.status;
        this.cause = opts?.cause;
    }
}
export class SqlReadOnlyViolation extends Error {
    query;
    constructor(query) {
        super("SQL skill rejected non-read query (cc:read scope)");
        this.name = "SqlReadOnlyViolation";
        this.query = query;
    }
}
export class HttpFetchAllowlistError extends Error {
    url;
    host;
    constructor(url, host) {
        super(`http_fetch: host '${host}' not in HTTP_FETCH_ALLOWLIST`);
        this.name = "HttpFetchAllowlistError";
        this.url = url;
        this.host = host;
    }
}
export class SkillMdParseError extends Error {
    filePath;
    constructor(filePath, reason) {
        super(`SKILL.md at ${filePath}: ${reason}`);
        this.name = "SkillMdParseError";
        this.filePath = filePath;
    }
}
export class SkillMdValidationError extends Error {
    filePath;
    issues;
    constructor(filePath, issues) {
        const summary = issues
            .map((i) => `${i.path || "(root)"}: ${i.message}`)
            .join("; ");
        super(`SKILL.md at ${filePath}: invalid frontmatter — ${summary}`);
        this.name = "SkillMdValidationError";
        this.filePath = filePath;
        this.issues = issues;
    }
}
//# sourceMappingURL=errors.js.map