import { type SkillContent, type SkillContext } from '../interfaces'; import { type SkillMetadata, type SkillReferencedOperation, type SkillResources, type SkillToolRef } from '../metadata'; import { type SkillRecord } from '../records'; import { BaseEntry, type EntryOwnerRef } from './base.entry'; /** * Result of loading a skill with tool validation information. */ export type SkillLoadResult = { /** * The loaded skill content. */ skill: SkillContent; /** * Tools that are available in the current scope. */ availableTools: string[]; /** * Tools that are referenced but not available. */ missingTools: string[]; /** * True if all required tools are available. */ isComplete: boolean; /** * Warning message if tools are missing. */ warning?: string; }; /** * Result returned from skill validation. */ export type SafeSkillLoadResult = { success: true; data: T; } | { success: false; error: Error; }; /** * Abstract base class for skill entries. * * Skills are knowledge/workflow packages that don't execute directly. * Instead, they provide instructions and context for LLMs to perform tasks. */ export declare abstract class SkillEntry extends BaseEntry { /** * The owner of this skill (app, plugin, etc.). */ owner: EntryOwnerRef; /** * The name of the skill, as declared in the metadata. */ name: string; /** * The full qualified name of the skill, including the owner name as prefix. */ fullName: string; /** * Get a short description of the skill. */ abstract getDescription(): string; /** * Load the skill's detailed instructions. * Resolves from inline string, file path, or URL based on metadata. */ abstract loadInstructions(): Promise; /** * Load the full skill content. * Returns the complete skill with resolved instructions. */ abstract load(): Promise; /** * Get the tool references from the skill metadata. * Returns normalized SkillToolRef objects. */ getToolRefs(): SkillToolRef[]; /** * Get tool names from the skill metadata. */ getToolNames(): string[]; /** * Get the skill's tags for categorization. */ getTags(): string[]; /** * Check if the skill should be hidden from discovery. */ isHidden(): boolean; /** * Check if this skill is always loaded — bindings derived from this skill * are merged into every codecall:execute call regardless of the skills the * agent passed. See SkillMetadata.alwaysLoad for guidance on when to set this. */ isAlwaysLoaded(): boolean; /** * Get the OpenAPI operations this skill references in its markdown. Empty * array for skills that haven't been through the harvester or that * declare capabilities only via decorator `tools`. */ getReferencedOperations(): SkillReferencedOperation[]; /** * Whether this skill is "executable" — has at least one declared tool * OR at least one referenced openapi operation. Skills with neither are * pure-knowledge: discoverable via searchKnowledge, callable via execute() * but with no tool bindings (the agentscript can only do pure computation). */ isExecutable(): boolean; /** Convenience inverse of {@link isExecutable}. */ isKnowledgeOnly(): boolean; /** * Get the skill's priority for search ranking. */ getPriority(): number; /** * Get the skill's license. */ getLicense(): string | undefined; /** * Get the skill's compatibility notes. */ getCompatibility(): string | undefined; /** * Get the skill's spec metadata (arbitrary key-value pairs). */ getSpecMetadata(): Record | undefined; /** * Get the skill's allowed tools (space-delimited string). */ getAllowedTools(): string | undefined; /** * Get the skill's bundled resource directories. */ getResources(): SkillResources | undefined; /** * Get the skill's effective `` segments per SEP-2640. * * Returns `metadata.skillPath` when set, otherwise `[name]`. The final * segment is always equal to `name` (enforced by the metadata schema). */ getSkillPathSegments(): string[]; /** * Get the skill's `` joined by `/` for URI construction. */ getSkillPath(): string; } //# sourceMappingURL=skill.entry.d.ts.map