agents
Version:
A home for your AI agents
42 lines (41 loc) • 993 B
TypeScript
//#region src/skills/script-workspace.d.ts
/**
* The Workspace a skill script reaches through `ctx.workspace`: a
* `Workspace` from `@cloudflare/computer`, or anything with the same `fs`
* methods.
*/
interface SkillScriptWorkspace {
readonly fs: {
stat(path: string): Promise<{
size: number;
isDirectory: boolean;
}>;
readFile(path: string): Promise<ReadableStream<Uint8Array>>;
writeFile(path: string, content: Uint8Array): Promise<void>;
mkdir(
path: string,
options?: {
recursive?: boolean;
}
): Promise<void>;
readdir(path: string): Promise<
Array<{
name: string;
size: number;
isDirectory: boolean;
}>
>;
find(
directory: string,
pattern?: string
): Promise<
Array<{
path: string;
type: "file" | "dir";
}>
>;
};
}
//#endregion
export { SkillScriptWorkspace as t };
//# sourceMappingURL=script-workspace-BpdAYq1R.d.ts.map