import { SkillCatalogEntry, SkillRecord } from "../contracts/skill-record.type.mjs"; import { SkillsStoreContract } from "../contracts/skills-store.contract.mjs"; //#region ../ai/src/skills/store/mock-skills-store.d.ts /** * In-memory {@link SkillsStoreContract} that ships with the package. * * Backs tests and small/ephemeral skill libraries with zero external * dependencies. Holds the **latest** record per skill name; `saveCandidate` * writes an INERT `type: "candidate"` (never injectable until promoted), * and `promote` flips it to `type: "promoted"` with a monotonic * `version + 1`. * * Construct via `new MockSkillsStore([...records])` — it is a concrete * test/utility store, not a factory-fronted runtime primitive, so `new` * is the public surface here. * * @example * const store = new MockSkillsStore([ * { name: "scaffold", description: "Scaffold a form", version: 1, body: "...", type: "authored" }, * ]); * const lib = skills({ name: "build", sources: [{ type: "store", store }] }); */ declare class MockSkillsStore implements SkillsStoreContract { /** Latest record per skill name. */ private readonly records; constructor(seed?: SkillRecord[]); /** * List the cheap catalog metadata for every NON-candidate skill, * optionally filtered to those whose `tags` intersect `scope.tags`. * Candidates are filtered out — they can never be catalogued or injected. */ list(scope?: { tags?: string[]; }): Promise; /** * Load the full record for `name`. When `version` is given, returns the * record only if its version matches (pin); otherwise the latest. A * `candidate` is never returned here — it is inert until promoted. */ load(name: string, version?: number): Promise; /** * Write an INERT candidate (`type: "candidate"`, `version: 0`). A * candidate is filtered out of `list()` / `load()` — it can never be * injected until a `review` gate promotes it. */ saveCandidate(record: Omit): Promise; /** * Promote the stored candidate for `name` to a new monotonic version * (`type: "promoted"`, `version + 1`). Throws when there is no candidate * to promote — promotion of a non-existent skill is a programming error. */ promote(name: string): Promise; } //#endregion export { MockSkillsStore }; //# sourceMappingURL=mock-skills-store.d.mts.map