import type { FileSystemAdapter } from "../platform/adapters/base.js"; import type { SkillOperationBudget } from "./operation-budget.js"; export interface SkillPathOperationOptions { budget?: SkillOperationBudget; } /** * Validate a requested path with the public compatibility resource policy. * Relative paths may contain up to 4096 characters and filesystem directory * enumeration is not entry-capped. {@link validateStrictSkillPath} applies * the runtime filesystem ceilings. * * @param skillRoot - Absolute local path, or an adapter-relative path when an fsAdapter is supplied * @param requestedPath - Relative path requested (e.g. "references/CLAUSES.md") * @param allowedSubdirs - Allowed top-level subdirectories (e.g. ["references", "assets"]) * @param fsAdapter - Optional file system adapter for VFS/cloud-backed projects * @returns The validated canonical path * @throws If the path is invalid, escapes the skill root, or the file doesn't exist */ export declare function validateSkillPath(skillRoot: string, requestedPath: string, allowedSubdirs: string[], fsAdapter?: FileSystemAdapter): Promise; /** * Validate a skill path with runtime filesystem resource ceilings. * Relative paths are limited to 1024 characters and each inspected directory * is limited to 1000 entries. */ export declare function validateStrictSkillPath(skillRoot: string, requestedPath: string, allowedSubdirs: readonly string[], fsAdapter?: FileSystemAdapter, options?: SkillPathOperationOptions): Promise; /** * List files with the public compatibility resource policy. * Enumeration is not entry-capped and preserves the filesystem adapter's * iteration order. {@link listStrictSkillSubdir} applies the runtime * filesystem ceilings and deterministic ordering. * * @param skillRoot - Absolute local path, or an adapter-relative path when an fsAdapter is supplied * @param subdir - Subdirectory name (e.g. "references", "scripts") * @param fsAdapter - Optional file system adapter for VFS/cloud-backed projects * @returns Array of relative paths like "references/filename.md" */ export declare function listSkillSubdir(skillRoot: string, subdir: string, fsAdapter?: FileSystemAdapter): Promise; /** * List at most 1000 skill directory entries in deterministic filename order. */ export declare function listStrictSkillSubdir(skillRoot: string, subdir: string, fsAdapter?: FileSystemAdapter, options?: SkillPathOperationOptions): Promise; /** * Recursively list a strict skill subdirectory in deterministic path order. * * The shared 1000-entry ceiling covers files and directories across the whole * tree, not each directory independently. Every traversed directory and file * is revalidated for type, root containment, and no-symlink semantics. */ export declare function listStrictSkillTree(skillRoot: string, subdir: string, fsAdapter?: FileSystemAdapter, options?: SkillPathOperationOptions): Promise; //# sourceMappingURL=path-safety.d.ts.map