Files
cobble/src/harness/tools/storage/grab-storage-tools.ts
T
tbenandClaude Opus 5.5 ac3ebc43d4 Keep searchable text only in knowledgebases
Every bot file was chunked into bot_file_chunks and embedded into
bot_file_vectors, and uploads kept their extracted text in
media.text_content, which together took most of the database. Bot
files are no longer indexed: bots find them by name or path with
list_files and read them with read_file, and search_files, ingest_file
and the files modal's re-read button are gone. Attachments keep no
text; a reply reads a document from the file. Only knowledgebase
documents keep text.

The schema drops both tables and the ingest columns. At boot,
dropStoredFileText removes what older versions stored (file jobs,
upload text) and vacuums once much of the database is free. The
media:prune-text script it replaces is removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 04:44:46 +01:00

25 lines
950 B
TypeScript

import type { HarnessTool } from "../../types";
import copyFileTool from "./copy-file-tool";
import deleteFileTool from "./delete-file-tool";
import listFilesTool from "./list-files-tool";
import moveFileTool from "./move-file-tool";
import readFileTool from "./read-file-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),
moveFileTool(context),
deleteFileTool(context),
...(context.scopes.length > 1 ? [copyFileTool(context)] : []),
];
}