/**
 * SOP catalog service.
 *
 * `config/sops/` is a *catalog* of reusable SOPs (a marketplace), NOT content a
 * team owns automatically. A team owns a SOP only once it is INSTALLED — copied
 * into the team's own `~/.crewly/teams/<id>/sops/` store, which the wiki then
 * surfaces (via the overlay resolver) under the team's `sop/` folder.
 *
 * This service lists the catalog, reports which entries a given team has
 * installed, and performs install / uninstall (copy / remove of the per-team
 * copy — the catalog original is never touched).
 *
 * @module services/wiki/sop-catalog.service
 */
/** A single SOP available in the catalog. */
export interface SopCatalogEntry {
    /** Catalog-relative path, e.g. `pm/progress-tracking.md`. Stable id. */
    path: string;
    /** Display title (from frontmatter `title:` or the filename). */
    title: string;
    /** Top-level category folder (`common`, `developer`, …) or `general`. */
    category: string;
    /** File size in bytes. */
    bytes: number;
    /** Whether the queried team has this SOP installed. */
    installed: boolean;
}
/**
 * Resolve the catalog directory (`<configDir>/sops`). `<configDir>` mirrors the
 * convention used by other services (`<cwd>/config`), overridable via
 * `CREWLY_CONFIG_DIR`.
 *
 * @returns Absolute path to the SOP catalog directory.
 */
export declare function sopCatalogDir(): string;
/**
 * Resolve a team's installed-SOP store from its vault path. The store is a
 * sibling of the vault (`<vault>/../sops`), matching the overlay resolver.
 *
 * @param vaultPath - Absolute path to the team vault (`.../teams/<id>/wiki`).
 * @returns Absolute path to the team's installed-SOP directory.
 */
export declare function teamSopsDir(vaultPath: string): string;
/**
 * The SOP catalog service. Stateless; methods take the team vault path so the
 * same instance serves any team.
 */
export declare class SopCatalogService {
    /**
     * List the catalog, annotated with whether the given team has each installed.
     *
     * @param vaultPath - The team vault path (to resolve its installed store).
     * @returns Catalog entries sorted by category then path.
     */
    list(vaultPath: string): Promise<SopCatalogEntry[]>;
    /**
     * Install a catalog SOP into the team's store (copy, preserving the relative
     * path). Idempotent — re-installing refreshes the copy to the catalog version.
     *
     * @param vaultPath - The team vault path.
     * @param sopPath - Catalog-relative SOP path (e.g. `pm/progress-tracking.md`).
     * @returns `{ installed: true, path }`.
     * @throws Error when the path is unsafe or the catalog file is missing.
     */
    install(vaultPath: string, sopPath: string): Promise<{
        installed: true;
        path: string;
    }>;
    /**
     * Remove a SOP from the team's store. The catalog original is untouched.
     * Idempotent — removing a not-installed SOP is a no-op.
     *
     * @param vaultPath - The team vault path.
     * @param sopPath - Catalog-relative SOP path.
     * @returns `{ installed: false, path }`.
     * @throws Error when the path is unsafe.
     */
    uninstall(vaultPath: string, sopPath: string): Promise<{
        installed: false;
        path: string;
    }>;
}
//# sourceMappingURL=sop-catalog.service.d.ts.map