import type { Effect } from "../ast/nodes.js"; import type { RunLimits } from "../codegen/runner.js"; import type { UasfParam } from "../mcp/uasf.js"; import type { SkillPackage, InvokeSkillResult } from "./types.js"; /** * Summary of a skill returned by search() and list(). * Contains metadata for selection without the full WASM binary. */ export interface SkillSearchResult { name: string; description: string; /** Relevance score: 0.0–1.0 (query token hit ratio). Always 1.0 from list(). */ score: number; signature: { params: UasfParam[]; returns: { type: string; }; effects: Effect[]; }; verified: boolean; wasmSize: number; } /** * In-memory store for UASF skill packages with keyword search and execution. * * Usage: * const memory = new SkillMemory(); * memory.store(skill); * const results = memory.search("fibonacci"); * const result = await memory.execute("FibSkill"); */ export declare class SkillMemory { private readonly skills; /** Number of stored skills. */ get size(): number; /** * Store a skill package, keyed by metadata.name. * Overwrites if a skill with the same name already exists. * @throws if metadata.name is empty or missing */ store(skill: SkillPackage): void; /** Retrieve a skill by exact name. Returns undefined if not found. */ get(name: string): SkillPackage | undefined; /** * Keyword search over name, description, and tags. * Returns matches ranked by relevance score (descending). * Empty query returns all skills (score 1.0). */ search(query: string): SkillSearchResult[]; /** * Execute a stored skill by name. * Returns structured result — never throws. */ execute(name: string, limits?: RunLimits): Promise; /** * Remove a skill from memory. * @returns true if the skill existed and was removed, false otherwise */ remove(name: string): boolean; /** List all stored skills with metadata. Score is 1.0 for all. */ list(): SkillSearchResult[]; /** Serialize all stored packages for persistence. */ toJSON(): SkillPackage[]; /** Reconstruct a SkillMemory from serialized data. */ static fromJSON(data: SkillPackage[]): SkillMemory; } //# sourceMappingURL=memory.d.ts.map