/** * SMI-4408: Indexer blocklist for non-skill repos. * * Loads data/indexer-blocklist.json and produces a BlocklistMatcher consumed * by the main() CLI in import-github-skills.ts. The filter runs between * deduplicateSkills() and saveOutput() so blocked repos never reach * data/imported-skills.json. * * Tactical fix for known-bad repos. The structural fix (require a * signal-of-intent signal per ingested repo) is tracked as Tier 2 * follow-up under ADR-109 SPARC. * * Design invariants: * - Exact-match only (`owner/name`, case-sensitive) — no wildcards. Keeps * scope tight and auditable. If wildcards become necessary, file a * follow-up issue rather than widening this module. * - Malformed entries throw at load (fail-safe toward ingestion rejection * would be wrong here — ingestion should NOT proceed with an unverified * blocklist file). * - version=1 contract: future schema changes must bump and handle migration. */ export interface BlocklistEntry { /** GitHub full_name: `owner/name`. Exact match, case-sensitive. */ repo: string; /** Why this entry is blocked — human-readable, required. */ reason: string; /** Who added the entry — required for audit trail. */ addedBy: string; /** YYYY-MM-DD string — required. */ addedAt: string; } export interface BlocklistFile { version: 1; updatedAt: string; blocked: BlocklistEntry[]; } export interface BlocklistMatcher { /** * True when `repo` (format: `owner/name`) appears in the blocklist. Exact * match, case-sensitive. */ isBlocked(repo: string): boolean; /** Expose entries for audit-logging in the import summary. */ entries(): readonly BlocklistEntry[]; } /** * Parse a raw blocklist file object. Throws on malformed shape or missing * required fields. Callers must catch. */ export declare function parseBlocklistFile(raw: unknown): BlocklistFile; /** * Empty matcher — blocks nothing. Used when the blocklist file is absent or * callers want to opt out without conditional plumbing. */ export declare const EMPTY_BLOCKLIST: BlocklistMatcher; /** * Load + validate a blocklist JSON file and return a matcher. * * If `path` does not exist, returns EMPTY_BLOCKLIST (no-op). A malformed * file throws so the importer refuses to proceed with a corrupt blocklist. */ export declare function loadBlocklist(path: string): BlocklistMatcher; /** Build a matcher from an in-memory entry list (test + inline use). */ export declare function buildBlocklist(entries: BlocklistEntry[]): BlocklistMatcher; //# sourceMappingURL=blocklist.d.ts.map