/** * asset-feeds.ts — gather installable assets from every feed the manage TUI * surfaces. * * Four feeds, normalized into `CatalogEntry`: * - **Project sources** — `skaile.yaml` `sources:` entries (scanned via * `AssetManager.search()`; the new `sources:` field is merged into the * legacy repositories map in `AssetManager.loadConfig`). * - **Local libraries** — user authoring places from `LocalIndex` (filesystem * scan of each library's `path`). * - **Factory assets** — the bundled first-party `factory-assets` tree * (`factoryAssetRoots()`), scanned from disk. Always present; no network. * - **Remote store** — the configured catalog source when `catalog.url` is * not `local`. Failures are non-fatal — they surface as notes. */ import { type CatalogDomain, type CatalogEntry } from "@skaile/workspaces/core"; /** One non-fatal note returned to the caller for surfacing in the UI. */ export interface FeedNote { feed: "sources" | "libraries" | "store" | "factory"; message: string; } /** * Which feed an asset came from. This is the top-level grouping axis in the * manage TUI ("where is this skill coming from?") and is intentionally distinct * from `publisher` (asset-intrinsic identity): the same publisher can legitimately * appear under more than one origin (e.g. a github repo you added as a `source` * that is also listed in the remote `store`). */ export type AssetOrigin = "source" | "library" | "factory" | "store"; /** A catalog entry tagged with the feed it was gathered from. */ export interface OriginEntry { origin: AssetOrigin; entry: CatalogEntry; /** * Second-level grouping label for the manage tree. Defaults (when unset) to the * entry's `publisher`; the source feed sets it to the source's short repo name * so the Sources band groups by source — "which repo did this come from" — not * by the asset-intrinsic publisher. */ group?: string; } export interface AssetFeedResult { entries: OriginEntry[]; /** * Display-only domain metadata, keyed (by the consumer) on `slug`. Populated * from the store's `catalog.listDomains` when the connected catalog source * exposes it; empty otherwise. The manage TUI joins `entry.domainSlug` → a * domain for grouping headers, descriptions, and relation badges. */ domains: CatalogDomain[]; notes: FeedNote[]; } /** The slice of `AssetManager` the source feed needs (kept narrow for tests). */ interface AssetManagerLike { search: () => Promise; searchRepoRoots: () => { repoName: string; root: string; }[]; } /** * Run all feeds and return a single normalized result. * * Feeds run in parallel where possible — the store fetch is the slow one * (one HTTP call) and is fired alongside the local library walk. The factory * scan is local disk only, so it runs inline. */ export declare function gatherAssetFeeds(am: AssetManagerLike, projectDir: string): Promise; export {}; //# sourceMappingURL=asset-feeds.d.ts.map