Newer
Older
navi-1 / navi / tools / filesystem.py
"""Compatibility shim — the filesystem tools live in `navi.tools._filesystem`.

The single 18-action `FilesystemTool` was split into `FilesystemReadTool`,
`FilesystemWriteTool` and `FileAiTool`.  This module keeps the old helper
imports working for tests and any external tool code; it declares no tool of
its own.
"""

from ._filesystem import FileAiTool, FilesystemReadTool, FilesystemWriteTool
from ._filesystem.helpers import (
    _AI_CHUNK_CHARS,
    _AI_EDIT_MAX_CHARS,
    _AI_OVERLAP_LINES,
    _DIFF_HUNK_RE,
    _EDIT_SYSTEM,
    _FIND_MAX_RESULTS,
    _GREP_MAX_RESULTS,
    _LIST_MAX_ENTRIES,
    _QUERY_CHUNK_SYSTEM,
    _QUERY_SINGLE_SYSTEM,
    _QUERY_SYNTHESIS_SYSTEM,
    _READ_HARD_BYTES,
    _READ_PAGE_BYTES,
    _READ_PAGE_LINES,
    _READ_WARN_BYTES,
    _SKIP_DIRS,
    _apply_ops,
    _atomic_write,
    _check_path,
    _context_around,
    _fmt_size,
    _fmt_time,
    _is_binary,
    _iter_search_files,
    _looks_numbered,
    _make_chunks,
    _nearest_lines,
    _number_diff,
    _number_lines,
    _resolve_relative_path,
    _unified_diff,
    _validate_ops,
)

__all__ = [
    "FileAiTool",
    "FilesystemReadTool",
    "FilesystemWriteTool",
    "_AI_CHUNK_CHARS",
    "_AI_EDIT_MAX_CHARS",
    "_AI_OVERLAP_LINES",
    "_DIFF_HUNK_RE",
    "_EDIT_SYSTEM",
    "_FIND_MAX_RESULTS",
    "_GREP_MAX_RESULTS",
    "_LIST_MAX_ENTRIES",
    "_QUERY_CHUNK_SYSTEM",
    "_QUERY_SINGLE_SYSTEM",
    "_QUERY_SYNTHESIS_SYSTEM",
    "_READ_HARD_BYTES",
    "_READ_PAGE_BYTES",
    "_READ_PAGE_LINES",
    "_READ_WARN_BYTES",
    "_SKIP_DIRS",
    "_apply_ops",
    "_atomic_write",
    "_check_path",
    "_context_around",
    "_fmt_size",
    "_fmt_time",
    "_is_binary",
    "_iter_search_files",
    "_looks_numbered",
    "_make_chunks",
    "_nearest_lines",
    "_number_diff",
    "_number_lines",
    "_resolve_relative_path",
    "_unified_diff",
    "_validate_ops",
]