import type { SkillEntry, SkillLike, SkillResolver, SkillResolverContext, SkillSource } from '../types/skills.js'; /** * `SkillEntry` has exactly one callable member: `SkillResolver`. `SkillLike` and * `SkillStoreLike` are plain objects, `string` is a primitive, and a packaged-skill bundle is * an array — none of those is ever a function — so `typeof entry === 'function'` discriminates * the whole union without needing a brand. Named (rather than inlined at each call site) so the * invariant is asserted once, here, and every caller shares the same reasoning. */ export declare function isSkillResolver(entry: SkillEntry): entry is SkillResolver; /** * Normalize `SkillSource` into an ordered list of entries. A bare array is a list of entries, * except the special case where every element is a `PackagedSkill` — that shape is one * packaged bundle, not several entries (mirrors the historical `prepareSkillStore` behavior). */ export declare function normalizeSkillSource(source: SkillSource): SkillEntry[]; export interface SubstitutedSkillEntries { /** `entries` with every resolver replaced in place by the store it produced, so downstream * precedence (later entries win) is unaffected by where a resolver sat in the array. */ entries: SkillEntry[]; /** This session's resolver output, keyed by the resolver's position in `entries`. Persist * verbatim — it is what a later turn or a replay reuses instead of re-invoking the * resolver against a tenant lookup that has since moved on. */ resolvedByIndex: Record; } /** * Replace every `SkillResolver` entry with the store it resolved to, in place. A resolver * whose index is present in `cached` is not called again — its cached output is reused * verbatim, which is what makes resolution "once per session" rather than once per turn. * * Collisions: two *different* resolvers producing the same skill name is an authoring error * (there is no ordering the author intended between two per-tenant resolutions) and throws, * naming both. A resolver producing a name a *static* entry also declares is not a collision * here — precedence for that is just array order, same as any other two entries. */ export declare function substituteSkillResolvers(entries: readonly SkillEntry[], ctx: SkillResolverContext, cached: Readonly> | undefined): Promise;