Add bots files handling logic

This commit is contained in:
2026-10-21 17:56:09 +01:00
parent b0af4db1bf
commit d17a4a7bdd
97 changed files with 5843 additions and 41 deletions
@@ -0,0 +1,28 @@
import type { HarnessTool } from "../../types";
import copyFileTool from "./copy-file-tool";
import deleteFileTool from "./delete-file-tool";
import ingestFileTool from "./ingest-file-tool";
import listFilesTool from "./list-files-tool";
import moveFileTool from "./move-file-tool";
import readFileTool from "./read-file-tool";
import searchFilesTool from "./search-files-tool";
import type { StorageToolContext } from "./storage-tool-context";
import writeFileTool from "./write-file-tool";
/**
* The file tools a bot works with on every run, bound to its own
* directories (and, for the coordinator, every bot's and workspace's).
* `copy_file` only shows when the run reaches more than one directory.
*/
export default function grabStorageTools(context: StorageToolContext): HarnessTool[] {
return [
listFilesTool(context),
readFileTool(context),
writeFileTool(context),
searchFilesTool(context),
moveFileTool(context),
deleteFileTool(context),
ingestFileTool(context),
...(context.scopes.length > 1 ? [copyFileTool(context)] : []),
];
}