import type { CompanyClient } from './company.js';
import { PoppyError } from './errors.js';
import type { SkillEntry } from './types.js';
/** Largest artifact downloaded, and largest total unpacked size, by default (bytes). */
export declare const DEFAULT_MAX_SKILL_BYTES: number;
/** A verified skill: `SKILL.md` and, for an archive, its supporting files. */
export interface SkillFiles {
    name: string;
    digest: string;
    /** `SKILL.md`, as text. */
    skillMd: string;
    /** Every file by its path inside the skill directory (`SKILL.md` included). */
    files: Map<string, Uint8Array>;
    /** Symbolic links that stay inside the skill directory: path → target. */
    links: Map<string, string>;
}
export interface FetchSkillOptions {
    /** Default 10 MiB, for the download and for everything unpacked. */
    maxBytes?: number | undefined;
}
/** A skill artifact failed a check: it MUST NOT be used. */
export declare class SkillVerificationError extends PoppyError {
    constructor(code: string, message: string);
}
/** `sha256:` and 64 lowercase hex characters over the raw bytes. */
export declare function skillDigest(bytes: Uint8Array): string;
/**
 * Fetches a skill from the index and verifies it before returning it: the digest, then for an
 * archive its format, layout and safety. Throws `SkillVerificationError` for anything that fails.
 */
export declare function fetchSkill(company: CompanyClient, skill: SkillEntry, opts?: FetchSkillOptions): Promise<SkillFiles>;
interface Unpacked {
    files: Map<string, Uint8Array>;
    links: Map<string, string>;
}
/** Unpacks a gzip-compressed tar in memory (ustar, pax and GNU long names). */
export declare function untarGz(bytes: Uint8Array, max?: number): Unpacked;
/** Unpacks a zip in memory (stored and deflated entries). */
export declare function unzip(bytes: Uint8Array, max?: number): Unpacked;
export {};
//# sourceMappingURL=skills.d.ts.map