/** * Parsed `skill://` URI components. */ export interface ParsedSkillUri { /** Full skill path segments — always at least one. The last segment is the skill name. */ skillPathSegments: string[]; /** The skill's name — the final segment of ``. */ skillName: string; /** * Organisational prefix segments. Empty when `` is a single * segment. */ prefixSegments: string[]; /** File path segments relative to the skill directory; empty for directory URIs. */ filePathSegments: string[]; /** Whether this URI addresses the skill's `SKILL.md`. */ isSkillMd: boolean; /** The full `` joined by `/`. */ skillPath: string; /** The full `` joined by `/`. */ filePath: string; } /** * Test whether a URI uses the `skill://` scheme. */ export declare function isSkillUri(uri: string): boolean; /** * Test whether a URI is the well-known discovery index. */ export declare function isSkillIndexUri(uri: string): boolean; /** * Build a `skill://` URI from skill path segments and an optional file path. * * @example * buildSkillUri(['git-workflow'], 'SKILL.md') // skill://git-workflow/SKILL.md * buildSkillUri(['acme', 'billing', 'refunds'], 'templates/email.md') * // skill://acme/billing/refunds/templates/email.md */ export declare function buildSkillUri(skillPathSegments: string[], filePath?: string): string; /** * Parse a `skill://` URI into its components. * * Returns `undefined` for malformed URIs. The well-known * `skill://index.json` does NOT parse as a skill URI — it's reserved. * * SEP-2640 §URI Scheme: the first segment occupies the RFC 3986 authority * position (parsed before the path), so we re-attach it to the path here. */ export declare function parseSkillUri(uri: string): ParsedSkillUri | undefined; /** * Parse a `skill://` URI knowing the registered skill path. This is the * preferred parse path when the registry can supply the skill-path * (e.g. when handling `read_resource` for a known skill). It correctly * splits sub-file paths like `skill://my-skill/scripts/extract.py`. */ export declare function parseSkillUriWithKnownSkill(uri: string, knownSkillPath: string): ParsedSkillUri | undefined; /** * Validate a `` per SEP-2640: one or more `/`-separated * segments, final segment matches the agentskills naming rules. Prefix * segments are looser (just non-empty URI path segments). * * Returns the validated skill path (lowercased final segment). Throws on * malformed input. */ export declare function validateSkillPath(skillPath: string, expectedName: string): string[]; //# sourceMappingURL=sep-2640.uri.d.ts.map