/** * Discover task-source manifests from two roots: the sources bundled inside * this package (`/task-sources`) and the user-installed sources under * `~/.config/groundcrew/task-sources`. Each `/source.json` is validated * and indexed by manifest name; a later root overrides an earlier one on a * name collision (user over package), recording a warning. The registry * (`../registry.ts`) turns each result into an enable-by-kind adapter. */ import { type SourceManifest } from "./manifest.ts"; type ManifestOrigin = "package" | "user"; export interface DiscoveredManifest { manifest: SourceManifest; manifestDir: string; origin: ManifestOrigin; } export interface ManifestRoot { dir: string; origin: ManifestOrigin; } export interface DiscoveryResult { manifests: DiscoveredManifest[]; warnings: string[]; } export declare function discoverFromRoots(roots: readonly ManifestRoot[]): DiscoveryResult; export declare function discoverTaskSourceManifests(): DiscoveredManifest[]; /** * Look up a single discovered manifest by name (the enable-by-kind `kind`). * Manifest-only: a built-in code adapter (`linear`, `todo-txt`) has no manifest, * so this returns `undefined` for those kinds. Part of the public discovery API * so crew-config can read a source's install-time hints (prerequisites, * secrets) without re-scanning the roots itself. * * This reads the discovery roots fresh on each call. Prefer * `discoverTaskSourceManifests()` when looking up multiple names in one flow so * callers only pay the filesystem scan once. */ export declare function getTaskSourceManifest(name: string): SourceManifest | undefined; export {}; //# sourceMappingURL=discovery.d.ts.map