/** * CatalogManager — round resource management (resource-management design). * * A user-pointed **catalog directory** (a folder/repo holding `{skills,extensions,agents,prompts,themes}`) * is the easy-to-setup source of a user's workflows. From it pi can: * - **install** a resource = copy it into the pi user level (`//`), * - **update** = hash-compare what's installed against the catalog and re-sync changed/outdated ones, * - **backup** = copy a user-level resource back into the catalog. * Per machine, the user installs only the subset they want; `update` refreshes exactly those. * * Copies are content-recursive (`cpSync`); status is decided by a recursive content hash so it is * portable across machines (mtimes differ; content does not). */ export declare const CATALOG_KINDS: readonly ["skills", "extensions", "agents", "prompts", "themes"]; export type CatalogKind = (typeof CATALOG_KINDS)[number]; export type CatalogStatus = "not-installed" | "up-to-date" | "outdated"; export interface CatalogEntry { kind: CatalogKind; /** Top-level name in the catalog (a directory or file name). */ name: string; /** Absolute path of the entry in the catalog. */ catalogPath: string; /** Absolute path where it installs at user level. */ installPath: string; } export declare class CatalogManager { private readonly agentDir; private readonly catalogDir; constructor(agentDir: string, catalogDir: string); /** Every resource discovered in the catalog, across all kinds. */ list(): CatalogEntry[]; /** Status of one catalog entry relative to what is installed at user level. */ status(entry: CatalogEntry): CatalogStatus; /** Copy a catalog entry into the user level (install or overwrite), atomically. */ install(entry: CatalogEntry): void; /** * Re-sync every INSTALLED resource that is outdated relative to the catalog (catalog → user level). * Never installs things the user has not already chosen on this machine. Returns the updated entries. */ update(): CatalogEntry[]; /** Copy a user-level resource back into the catalog (backup). Requires it to exist at user level. */ backup(entry: CatalogEntry): void; } /** * Content hash of a file or directory tree: stable across machines (ignores mtimes/paths outside the * tree). Files contribute their relative path + bytes; directories are walked in sorted order so the * hash is deterministic. */ export declare function hashPath(target: string): string; //# sourceMappingURL=catalog-manager.d.ts.map