import type { RuleFileManifest } from '@auden.to/protocol'; export type CollectRuleManifestOptions = { /** Repo root to scan. Defaults to `process.cwd()`. */ cwd?: string; /** Mirror `auden import`'s `discoverGlobal` config, see below. */ global?: boolean; /** * Override the home directory — both the global discovery root and where the * `repoId` key is read from (`repoIdKeyPath`). Primarily for tests, which * must not read or create the real `~/.auden/repo-id-key`. */ homedir?: string; }; /** * Collect the manifest for one repo root. * * Reuses `discoverGuideFiles` rather than walking a second time — the set of * files that count as "delivered rule guidance" must be *the same set* import * would send, or the join against `guides.origin` silently misses files. That * is also why `global` is honoured: when a user's imports include * `~/.claude/CLAUDE.md` and `~/.claude/skills`, those guides exist on the * server with the same payload-relative origins and are just as delivered. * Callers pass the same `resolveGlobalFlag`/`readConfigDiscoverGlobal` value * `auden import` uses. * * Discovery reads file contents (it is built for import); this drops them * immediately, keeping only `path`, `format` and `contentHash`. Nothing else * leaves the machine. * * `includeSkillMembers: false` is the one place discovery is asked for less * than import needs, and it is not an optimization detail: this runs inside the * `Stop` hook, which blocks the agent's turn (`packages/cli/src/commands/init.ts`). * Member expansion lstats, reads, UTF-8-validates and sha256s every file in * every skill directory — up to `MAX_SKILL_MEMBER_FILES` per skill — and the * manifest then throws all of it away, since a member is not a guide and has no * `origin` to join against. Skipping it changes nothing about *which files* are * reported (review finding 3's join is over guide files only); it changes only * how much of each skill directory is read to report them. */ export declare function collectRuleManifest(options?: CollectRuleManifestOptions): Promise; //# sourceMappingURL=manifest.d.ts.map