telys_index_repo
Walk a repository, chunk text files, and ingest them into a collection for semantic search; re-runs fingerprint files and re-embed only changed ones, keeping the index current.
Instructions
Walk a repo directory — respecting .gitignore on git checkouts, else skipping common build/dep dirs; binaries and symlinks escaping the root are refused — chunk every text file, and ingest the chunks into a collection for telys_repo_search. Incremental: re-calls re-fingerprint each file (size, mtime), re-embed only changed files, tombstone removed ones, and no-op fast when nothing changed. Routing: telys_repo_search queries the index; telys_add/telys_upsert store manual memories. Returns status (built/refreshed/hit), repo_id, and file/chunk counts. All arguments optional: path (repo root; default: the server workspace, else CWD), collection (default 'repo_symbols'), mode ('windowed' default or 'file'), window_lines (48), window_overlap_lines (8), max_file_bytes / max_files / max_seconds (0 = unlimited), force (default false; rebuild every file). Fails when path is not a directory or the collection already exists with a partition key other than repo_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'windowed' sliding line window or 'file' (one record per file) | windowed |
| path | No | repo root (defaults to server workspace / CWD) | |
| force | No | ignore the fingerprint cache and rebuild every file | |
| max_files | No | stop after walking this many files; 0 = unlimited | |
| collection | No | target collection for the repo chunks (auto-created with partition_by='repo_id') | repo_symbols |
| max_seconds | No | wall-clock budget in seconds; 0 = unlimited | |
| window_lines | No | lines per chunk in windowed mode | |
| max_file_bytes | No | skip files larger than this many bytes; 0 = unlimited | |
| window_overlap_lines | No | overlap lines between consecutive windows |