/** * The learned topics of a registered repository (DES-learn-workflow §2, §6), read from its checkout's * `.wicked/knowledge//` (topic.json + claims.jsonl): what studio's learn page shows — each * topic's claim counts by status and how stale its active claims are. Read-only and bounded: at * most MAX_TOPICS topics and MAX_CLAIMS_BYTES of claims per topic; a malformed file is reported on * the topic (`problem`), never thrown. */ import type { LearnTopic } from 'wicked-crew-api-types'; export type { LearnTopic }; /** One topic's summary. `staleAfterDays`: an active claim not re-verified for longer counts as stale. */ /** Where a topic's files are read from: the checkout's working tree, or a git ref (what MERGED). */ export interface TopicSource { /** The topic directories under `.wicked/knowledge/`. */ slugs(): Promise; /** One file's text, or `null` when absent. */ read(slug: string, file: 'topic.json' | 'claims.jsonl'): Promise; } export declare function treeSource(root: string): TopicSource; /** The topics as they are at a git `ref` of the checkout (e.g. `origin/main`, what the learn tick indexes). */ export declare function refSource(root: string, ref: string): TopicSource; export declare function readTopic(src: TopicSource, slug: string, staleAfterDays: number, now: Date): Promise; /** Every topic in `src`, sorted by slug. No knowledge dir is an empty list. */ export declare function readTopics(src: TopicSource, staleAfterDays: (slug: string) => number, now: Date): Promise; /** What MERGED (F-LEARN-4): `origin/` when the checkout has that ref (the learn tick fetches * it each minute and indexes the same tree), else the working tree (a repository with no remote). */ export declare function mergedSource(root: string, defaultBranch: string): Promise; //# sourceMappingURL=topics.d.ts.map