/** * ICatalogSource — pluggable asset catalog source interface. * * Lives in workspaces/plugins (all pluggable interface contracts centralized here). * Built-in implementation: LocalCatalogSource in workspaces/library. * * Types are defined inline (structurally compatible with library's * AssetDefinition / Source) to avoid circular deps — plugins is a leaf package. */ /** * A single asset entry as returned by {@link ICatalogSource.resolve} and * {@link ICatalogSource.listAssets}. * * Types are defined inline (structurally compatible with `library`'s * `AssetDefinition`) to keep `plugins` a zero-dependency leaf package. * * @docLink packages/workspace-plugin/index#plugin-interfaces */ export interface CatalogAsset { /** Canonical ref: `/@`. */ id: string; kind: string; publisher: string; name: string; version: string; /** * `"/"` the asset came from. Optional — the store may omit it, * and local libraries without a git remote have none. */ repo?: string; sha256?: string; description?: string; license?: string; category?: string; /** * Navigational domain slug (from a sidecar `DOMAIN.md`), or absent when no * domain claims this asset. Display-only — never part of identity. */ domainSlug?: string; /** * Report-only body-link soft-dep refs — cross-asset references inferred from * the asset body, not the typed manifest. Carried through from the source * (store catalog `softDepsJson` / local discovery) so a consumer can index + * surface them. Absent for sources that don't compute them. */ softDeps?: string[]; /** Full parsed manifest as JSON-safe object. */ manifest: Record; } /** * Optional filter passed to {@link ICatalogSource.listAssets}. * * All fields are optional — an empty filter returns the full catalog. * * @docLink packages/workspace-plugin/index#plugin-interfaces */ export interface CatalogAssetFilter { kind?: string; publisher?: string; /** Prefix match on the full `/` ref. */ prefix?: string; } /** * How the members of a navigational domain relate. Display-only hint — never an * install-all bundle. Mirrors the discovery library's `DomainRelation`. */ export type DomainRelation = "additions" | "alternatives" | "sequence"; /** * Display-only metadata for a navigational domain (from a sidecar `DOMAIN.md`, * surfaced by the store's `catalog.listDomains`). Joined to assets via * {@link CatalogAsset.domainSlug}. A domain groups assets for co-discovery; it * is never part of asset identity and never bulk-installs. * * Defined inline (structurally compatible with `core`'s `CatalogDomain`) to keep * `plugins` a zero-dependency leaf package. */ export interface CatalogDomain { /** Stable slug — the join key to {@link CatalogAsset.domainSlug}. */ slug: string; /** Human-readable title (may change without breaking the slug join). */ title: string; /** Free-text description from the `DOMAIN.md` body. */ description?: string; /** How members relate — drives sort + per-asset glyph, not installs. */ relation?: DomainRelation; /** Display order among a publisher's domains (ascending). */ order?: number; /** `kind:name` ref of the recommended member (alternatives domains). */ recommendedRef?: string; /** Sidecar provenance — `"/"` the `DOMAIN.md` was authored in. */ sidecarSource?: string; } /** * Optional filter passed to {@link ICatalogSource.listDomains}. * * @docLink packages/workspace-plugin/index#plugin-interfaces */ export interface CatalogDomainFilter { /** Restrict to domains whose Source has a published asset under this publisher. */ publisher?: string; /** Restrict to a single Source id. */ source?: string; } /** * Descriptor returned by {@link ICatalogSource.listSources}. * * Identifies a registered catalog source by its ID, type, and URL. * * @docLink packages/workspace-plugin/index#plugin-interfaces */ export interface CatalogSourceInfo { id: string; type: string; url: string; } /** * Pluggable asset catalog source. * * Implementations: * - `LocalCatalogSource` (Phase 1) — walks subscribed local repos (in `workspaces/library`) * - skaile.store HTTP client (Phase 2) * - Enterprise internal registries (future) * * @docLink packages/workspace-plugin/index#plugin-interfaces */ export interface ICatalogSource { /** Unique source identifier used for registration and diagnostics. */ readonly id: string; /** Resolve a single asset by canonical ref (`/@`). */ resolve(ref: string): Promise; /** List assets matching an optional filter. */ listAssets(filter?: CatalogAssetFilter): Promise; /** * Enumerate the versions this source can serve for a version-less asset ref. * * `ref` is a canonical ref **without** a version sigil, e.g. * `skill:@/` (same kind/publisher/name shape `resolve` * accepts, minus the `#version`). The resolver uses this when a dep carries * no source-derived version hint (a store-only asset with a bare or ranged * ref) so it can feed the discovered versions into pin matching instead of * landing the dep in `missing`. * * @returns Available version strings (order not significant; may be empty). */ listVersions(ref: string): Promise; /** * Fetch the content-addressed tarball for an asset. * * @param ref - Canonical asset ref. * @param sha256 - Expected SHA-256 digest for integrity verification. * @returns Raw tarball bytes. * @throws When the tarball cannot be fetched (local sources may throw — assets are available on disk). */ fetchTarball(ref: string, sha256: string): Promise; /** List registered sources. */ listSources(): Promise; /** * List navigational domains (display-only groupings from sidecar `DOMAIN.md`), * optionally narrowed by publisher and/or source id. * * **Optional** — sources that don't model domains (local libraries, older * stores, REST framings without the endpoint) omit it; consumers treat its * absence (or `[]`) identically as "no domains". Display-only, so an * implementation should degrade to `[]` on transport error rather than throw, * to never jeopardize the asset feed it accompanies. */ listDomains?(filter?: CatalogDomainFilter): Promise; } //# sourceMappingURL=catalog-source.d.ts.map