import { type SkillDocumentParserProvider } from "../../extensions/parser/skill-document-parser.js"; import { type ResolvedSkillSelectorSnapshot } from "../../skill/selector.js"; /** Maximum model identifier length accepted from hosted skill metadata. */ export declare const MAX_RUNTIME_SKILL_MODEL_LENGTH = 256; /** Maximum thinking-token override accepted from hosted skill metadata. */ export declare const MAX_RUNTIME_SKILL_THINKING_TOKENS = 1000000; /** Maximum delegated step override accepted from hosted skill metadata. */ export declare const MAX_RUNTIME_SKILL_STEPS = 1000; /** Whether a hosted skill model override is a bounded, printable identifier. */ export declare function isValidRuntimeSkillModel(value: unknown): value is string; /** Public API contract for runtime skill frontmatter. */ export interface RuntimeSkillFrontmatter { name: string | undefined; description: string | undefined; allowedTools: string[]; metadata: Record | undefined; model: string | undefined; thinking: false | number | undefined; maxSteps: number | undefined; } /** Strict schema factory for bounded runtime skill frontmatter. */ export declare const getRuntimeSkillFrontmatterSchema: () => import("../../internal-agents/schema.js").Schema; /** Schema for runtime skill frontmatter. * @deprecated Use {@link getRuntimeSkillFrontmatterSchema}. */ export declare const RuntimeSkillFrontmatterSchema: import("../../internal-agents/schema.js").Schema; /** Definition for runtime skill. */ export type RuntimeSkillDefinition = { id: string; name: string; displayName?: string; description: string; instructions: string; /** * `allowed-tools` frontmatter, recorded verbatim. The Agent Skills spec * defines this as pre-approval metadata, so the runtime carries it but never * enforces it. See veryfront/veryfront-issue-inbox#406. */ allowedTools?: string[]; metadata?: Record; model?: string; thinking?: false | number; maxSteps?: number; references?: string[]; /** * Owning agent id for agent-scoped (colocated) skills. Unowned (undefined) * skills are project-global; owned skills are visible only to their owner. */ ownerAgentId?: string; /** Short name used by the owning agent's `skills:` selector (e.g. "cite"). */ shortName?: string; /** * Actual discovered source path of the skill's SKILL.md. Consumers must use * this instead of reconstructing paths from (possibly namespaced) ids. */ sourcePath?: string; }; /** * Whether a runtime skill definition is visible to the caller identified by * the scope — the same owner-aware rule as the local skill registry: unowned * skills plus the caller's own. */ export declare function isRuntimeSkillVisibleTo(definition: Pick, scope?: { agentId?: string; }): boolean; /** * Resolve the runtime skills advertised to an agent. * * Explicit selectors use the same rule as the local skill registry: resolve * the agent's own short name first, then an exact visible skill id. */ export declare function resolveRuntimeSkillsForAgent(input: { skills: readonly RuntimeSkillDefinition[]; agentId: string; selector: true | false | readonly string[] | undefined; }): RuntimeSkillDefinition[]; /** Resolve a presence-aware runtime skill selector snapshot without throwing on explicit misses. */ export declare function resolveRuntimeSkillSelectorSnapshotForAgent(input: { skills: readonly RuntimeSkillDefinition[]; agentId: string; selector: true | readonly string[] | undefined; }): ResolvedSkillSelectorSnapshot; /** Resolve a presence-aware runtime skill selector snapshot and reject explicit misses. */ export declare function resolveRuntimeSkillSelectorForAgent(input: { skills: readonly RuntimeSkillDefinition[]; agentId: string; selector: true | readonly string[] | undefined; }): ResolvedSkillSelectorSnapshot; /** Response payload for runtime loaded skill. */ export type RuntimeLoadedSkillResponse = { /** Which skill was loaded. Echoed so the caller can correlate the result. */ skillId: string; /** The skill's markdown body. The only instruction content in this result. */ instructions: string; /** Reference files this skill advertises, loadable via load_skill's `file` parameter. */ references?: string[]; /** Model override the skill declares, for the caller to forward when delegating. */ model?: string; /** Thinking-token override the skill declares, for the caller to forward when delegating. */ thinking?: false | number; /** Step-budget override the skill declares, for the caller to forward when delegating. */ maxSteps?: number; }; /** Public API contract for runtime skill metadata logger. */ export type RuntimeSkillMetadataLogger = { error?: (message: string, metadata?: Record) => void; }; /** Composition options for synchronous runtime Skill document parsing. */ export type RuntimeSkillMetadataParseOptions = { logger?: RuntimeSkillMetadataLogger; /** Override the immutable first-party parser captured when this module initializes. */ skillDocumentParserProvider?: SkillDocumentParserProvider; /** Accept the provider-safe name grammar used by owner-scoped catalog ids. */ providerSafeName?: boolean; }; /** Public API contract for parsed runtime skill document. */ export type ParsedRuntimeSkillDocument = { metadata: RuntimeSkillFrontmatter; body: string; }; /** Validate one bounded Agent Skills file from a single decoded snapshot. */ export declare function isValidStrictRuntimeSkillFileDocument(content: string, canonicalName: string, options?: RuntimeSkillMetadataParseOptions): boolean; /** Parses a bounded runtime skill document and fails closed on invalid input. */ export declare function parseStrictRuntimeSkillDocument(content: string, options?: RuntimeSkillMetadataParseOptions): ParsedRuntimeSkillDocument | null; /** Strict runtime-boundary parser for hosted and filesystem skill metadata. */ export declare function parseStrictRuntimeSkillMetadata(content: string, options?: RuntimeSkillMetadataParseOptions): RuntimeSkillFrontmatter | null; /** Parses a bounded runtime skill document and fails closed on invalid input. */ export declare function parseRuntimeSkillDocument(content: string, options?: RuntimeSkillMetadataParseOptions): ParsedRuntimeSkillDocument | null; /** Parses bounded runtime skill metadata and fails closed on invalid input. */ export declare function parseRuntimeSkillMetadata(content: string, options?: RuntimeSkillMetadataParseOptions): RuntimeSkillFrontmatter | null; type BuildRuntimeSkillDefinitionInput = { id: string; content: string; references?: readonly string[]; ownerAgentId?: string; shortName?: string; sourcePath?: string; logger?: RuntimeSkillMetadataLogger; skillDocumentParserProvider?: SkillDocumentParserProvider; }; /** Build a bounded, immutable runtime skill definition. */ export declare function buildRuntimeSkillDefinition(input: BuildRuntimeSkillDefinitionInput): RuntimeSkillDefinition | null; /** Build a strict, immutable Agent Skills directory definition for discovery. */ export declare function buildRuntimeDirectorySkillDefinition(input: BuildRuntimeSkillDefinitionInput): RuntimeSkillDefinition | null; /** * Build a legacy flat-file runtime skill. * * Flat `{skillsPath}/{id}.md` files predate the Agent Skills directory * contract. They may omit `name` and `description`, which are derived from the * file id and first Markdown line. New `SKILL.md` files must use * `buildRuntimeDirectorySkillDefinition` and satisfy the strict core contract. */ export declare function buildLegacyRuntimeFlatSkillDefinition(input: BuildRuntimeSkillDefinitionInput): RuntimeSkillDefinition | null; /** Strict runtime-boundary normalizer for hosted and filesystem reference paths. */ export declare function normalizeStrictRuntimeSkillReferencePath(path: string): string | null; /** Normalizes and bounds a portable runtime skill reference path. */ export declare function normalizeRuntimeSkillReferencePath(path: string): string | null; type BuildRuntimeLoadedSkillResponseInput = { skillId: string; instructions: string; references?: readonly string[]; logger?: RuntimeSkillMetadataLogger; skillDocumentParserProvider?: SkillDocumentParserProvider; }; /** Build a bounded loaded-skill response at hosted and filesystem trust boundaries. */ export declare function buildStrictRuntimeLoadedSkillResponse(input: BuildRuntimeLoadedSkillResponseInput): RuntimeLoadedSkillResponse; /** Build a bounded loaded-skill response and fail closed on invalid metadata. */ export declare function buildRuntimeLoadedSkillResponse(input: BuildRuntimeLoadedSkillResponseInput): RuntimeLoadedSkillResponse; export {}; //# sourceMappingURL=skill-metadata.d.ts.map