/** * Provenance-index walker. * * Given a list of cloned source paths plus their resolved commits, walk each * clone, read its `skaile.manifest.yaml` (or fall back to the agentskills.io * filename layout), compute per-file and composite sha256s, and build a * {@link ProvenanceIndex} keyed by `/:`. * * Manifest discovery is recursive: a `skaile.manifest.yaml` at the repo root * *and* under any subdirectory contributes assets (a curator repo carries one * manifest per upstream). A manifest (or asset entry) with a `source:` pointer * is **curated** — its bytes live in the referenced upstream, so the candidate's * `sourceUrl`/`commit` stamp the upstream and the hashes come from the author- * pinned `sha256` / granular `files[].sha256` rather than from local bytes. * * This is the source-side half of the canonical-identity resolution model: the * resolver compares these candidates against store-side candidates and detects * divergent content hashes for the same `(publisher, kind, name, version)`. */ /** One cloned source repo, pinned at a resolved commit. */ export interface SourceClone { localPath: string; sourceUrl: string; /** 40-char SHA. */ commit: string; /** Optional tag context for the version waterfall (step 3). */ tag?: string; /** * Optional curated overlay manifest FILE (the local store's flat * `~/.skaile/store/manifests/.yaml`, authored by `source manifest init`). * When set and the file exists, it is the AUTHORITATIVE inventory for this * clone — the walker reads it INSTEAD of scanning the clone's own manifests / * agentskills.io layout, so the curated publisher + asset set resolve. Byte * paths (`root`/`files`) still resolve against `localPath`. Mirrors the * discovery-side overlay so `add`/resolve agree with what `source add` indexed. */ overlayManifestPath?: string; } /** One resolved candidate in the provenance index. */ export interface ProvenanceCandidate { publisher: string; kind: string; name: string; /** Canonical semver string (or `0.0.0-sha.<7char>`). */ version: string; sourceUrl: string; commit: string; files: Array<{ path: string; sha256: string; }>; /** Composite sha256 over sorted `:\n` rows. */ sha256: string; /** Parsed content frontmatter (mcp-server defaults etc.). */ metadata?: Record; /** Canonical transitive dependency refs (`kind:name@[#pin]`). * Populated from the manifest's `assets[].dependencies` when present, else * for bundles from the bundle manifest. `resolveAll` recurses into these so a * bundle pulls its members (and nested bundles). */ deps?: string[]; description?: string; keywords?: string[]; category?: string; license?: string; homepage?: string; } export type ProvenanceIndex = Map; /** * Canonical GitHub-org → publisher slug. The single lowercasing rule shared by * the resolve side (`buildProvenanceIndex` here) and the index side * (`resolveSourcePublisher` in repo-manager). GitHub orgs are case-insensitive, * so a cased remote (`Acme`) and a lowercase index ref must not split. */ export declare function normalizeGithubOrg(org: string): string; /** * Walk a list of source clones into a provenance index. * * @param clones - Cloned source repos pinned at resolved commits. * @returns Map of `/:` → candidates. * @throws On a SKILL.md name mismatch or a missing publisher for a non-GitHub source. * @docLink packages/core/workspace-config#build-provenance-index */ export declare function buildProvenanceIndex(clones: SourceClone[], _opts?: { projectDir?: string; }): Promise; //# sourceMappingURL=walker.d.ts.map