/** * Resolving named paths — `auden import ` — onto the same candidates * the no-argument scan produces. * * **Named paths select from the scan; they do not build a second one.** It would * be easy to read a named file directly and hand-build a payload, and that is * the mistake: discovery is what decides a guide's `payloadPath`, its scope * `root`, its content hash and — for a `SKILL.md` — its member files * (`rules/discover.ts:28-65`). A second construction path would agree with it * today and drift later, and the thing it would drift on is the identity the * server reconciles by. So a named path is *matched against* the scan, and * anything the scan did not produce is refused with a reason derived from the * same `detectFormat` the scan uses. * * That also answers "does a folder recurse?" for free: a folder is a filter over * the scan, so it offers exactly what the no-argument form would have offered * inside that subtree, no more and no less. */ import type { ImportCandidate } from './import-candidates.js'; /** Why a named path yields nothing to adopt. */ export type PathRefusal = { /** One code per reason, so a test names the rule rather than the wording. */ code: 'outside-repo' | 'not-guidance' | 'document-unsupported' | 'skill-member' | 'missing'; /** The path as the user typed it, so the message points at their own words. */ input: string; message: string; }; export type NamedPathResolution = { /** Candidates the named paths selected, in the scan's order, deduplicated. */ candidates: ImportCandidate[]; refusals: PathRefusal[]; }; /** * Select the candidates the named paths refer to. * * A path may name a file or a directory; a directory selects every candidate * beneath it. Resolution is against `cwd` so the paths a user types are the ones * their shell would complete, and containment is checked against the repo root * because that is the tree the scan covered. */ export declare function resolveNamedPaths(inputs: ReadonlyArray, candidates: ReadonlyArray, options: { cwd: string; root: string; }): NamedPathResolution; //# sourceMappingURL=import-paths.d.ts.map