import type { ClientOptions, WorkspaceInfoResponse, WorkspaceFsReadResponse, WorkspaceFsWriteResponse, WorkspaceFsListResponse, WorkspaceFsDeleteResponse, WorkspaceFsMkdirResponse, WorkspaceFsStatResponse, WorkspaceSearchParams, WorkspaceSearchResponse, WorkspaceIndexParams, WorkspaceIndexResponse, ListSkillsResponse, Skill, SearchSkillsParams, SearchSkillsResponse, ListSkillReferencesResponse, GetSkillReferenceResponse, SkillsShSearchParams, SkillsShSearchResponse, SkillsShPopularParams, SkillsShPopularResponse, SkillsShPreviewParams, SkillsShPreviewResponse, SkillsShInstallParams, SkillsShInstallResponse, SkillsShRemoveParams, SkillsShRemoveResponse, SkillsShUpdateParams, SkillsShUpdateResponse } from '../types.js'; import { BaseResource } from './base.js'; /** * Resource for interacting with a specific skill via the workspace API */ export declare class WorkspaceSkillResource extends BaseResource { private workspaceId; private skillName; private skillPath?; private basePath; private pathQuery; constructor(options: ClientOptions, workspaceId: string, skillName: string, skillPath?: string | undefined); /** * Gets the full details of this skill including instructions * @returns Promise containing skill details */ details(): Promise; /** * Lists all reference file paths for this skill * @returns Promise containing list of reference paths */ listReferences(): Promise; /** * Gets the content of a specific reference file * @param referencePath - Path to the reference file * @returns Promise containing reference content */ getReference(referencePath: string): Promise; } /** * Resource for interacting with the workspace API * * The workspace provides: * - Filesystem operations (read, write, list, delete, mkdir, stat) * - Search operations (search, index) * - Skills operations (list, get, search, references) * - skills.sh registry operations (search, popular, preview, install, remove, update) */ export declare class Workspace extends BaseResource { private workspaceId; constructor(options: ClientOptions, workspaceId: string); /** * Helper to build the base path for this workspace */ private get basePath(); /** * Gets information about the workspace and its capabilities * @returns Promise containing workspace info */ info(): Promise; /** * Reads a file from the workspace filesystem * @param path - Path to the file to read * @param encoding - Optional encoding. Server defaults to utf-8 if not specified. * @returns Promise containing file content and metadata */ readFile(path: string, encoding?: string): Promise; /** * Writes content to a file in the workspace filesystem * @param path - Path to write to * @param content - Content to write * @param options - Write options including encoding and recursive directory creation * @returns Promise containing success status */ writeFile(path: string, content: string, options?: { encoding?: 'utf-8' | 'base64'; recursive?: boolean; }): Promise; /** * Lists files and directories in the workspace * @param path - Path to the directory to list * @param recursive - Whether to include subdirectories * @returns Promise containing directory listing */ listFiles(path: string, recursive?: boolean): Promise; /** * Deletes a file or directory from the workspace * @param path - Path to delete * @param options - Delete options * @returns Promise containing success status */ delete(path: string, options?: { recursive?: boolean; force?: boolean; }): Promise; /** * Creates a directory in the workspace * @param path - Directory path to create * @param recursive - Whether to create parent directories if needed * @returns Promise containing success status */ mkdir(path: string, recursive?: boolean): Promise; /** * Gets information about a file or directory * @param path - Path to get info about * @returns Promise containing file/directory stats */ stat(path: string): Promise; /** * Searches across indexed workspace content * @param params - Search parameters * @returns Promise containing search results */ search(params: WorkspaceSearchParams): Promise; /** * Indexes content for search * @param params - Index parameters including path and content * @returns Promise containing success status */ index(params: WorkspaceIndexParams): Promise; /** * Lists all discovered skills * @returns Promise containing list of skills with metadata */ listSkills(): Promise; /** * Searches across all skills content * @param params - Search parameters * @returns Promise containing search results */ searchSkills(params: SearchSkillsParams): Promise; /** * Gets a skill instance for further operations * @param skillName - Skill name identifier * @param skillPath - Optional skill path for disambiguation when multiple skills share the same name * @returns WorkspaceSkillResource instance */ getSkill(skillName: string, skillPath?: string): WorkspaceSkillResource; private skillsShQuery; /** * Searches the skills.sh registry * @param params - Search query and optional result limit * @returns Promise containing matching skills */ searchSkillsSh(params: SkillsShSearchParams): Promise; /** * Lists popular skills from the skills.sh registry * @param params - Optional pagination * @returns Promise containing popular skills */ listPopularSkillsSh(params?: SkillsShPopularParams): Promise; /** * Fetches the SKILL.md of a skills.sh skill without installing it * @param params - GitHub owner, repo and skill path * @returns Promise containing the SKILL.md content */ previewSkillsSh(params: SkillsShPreviewParams): Promise; /** * Installs a skills.sh skill into the workspace filesystem * @param params - GitHub owner, repo, skill name and optional mount * @returns Promise containing the installed path and files written */ installSkillsSh(params: SkillsShInstallParams): Promise; /** * Removes an installed skills.sh skill from the workspace * @param params - Name of the skill to remove * @returns Promise containing the removed path */ removeSkillsSh(params: SkillsShRemoveParams): Promise; /** * Re-fetches installed skills.sh skills from GitHub * @param params - Optional skill name; omit to update all * @returns Promise containing per-skill update results */ updateSkillsSh(params?: SkillsShUpdateParams): Promise; } //# sourceMappingURL=workspace.d.ts.map