Skip to main content

Module tools

Module tools 

Source

Modules§

ask
bash
edit
git
lua
mana
memory
multi_edit
query
Boolean query parser with stemming for code search.
read
scan
Scan tool — extract code structure using tree-sitter AST parsing.
session_search
shell
web
Web tool — search the web and read pages.
worktree
write

Structs§

AnchorStore
CheckpointRecord
CheckpointState
Shared session-scoped checkpoint state built on top of FileHistory.
FileCache
In-session file content cache. Avoids re-reading files that haven’t changed.
FileHistory
Pre-edit file snapshots for rollback safety.
FileTracker
Tracks which files have been read in the current session and when.
LineAnchor
ToolContext
Context provided to tools during execution.
ToolOutput
Result of a tool execution.
ToolRegistry
Registry of available tools.
ToolUpdate
Partial update from a running tool (for streaming output).
TruncationResult

Traits§

Tool
A tool that can be invoked by the agent.

Functions§

generate_diff
Generate a unified diff between old and new content.
levenshtein
Compute the Levenshtein edit distance between two strings.
resolve_path
Resolve a user-provided path: expands ~ to home dir, resolves relative paths against cwd.
stable_hash
suggest_similar_files
Search for files with names similar to the missing target path.
truncate_head
Truncate keeping the head (first N lines/bytes). When truncated, writes full output to a temp file.
truncate_line
Truncate a single line to max_bytes, appending “…” if truncated.
truncate_tail
Truncate keeping the tail (last N lines/bytes). When truncated, writes full output to a temp file.
validate_tool_args
Validate tool arguments against a JSON Schema.

Type Aliases§

LuaToolLoader
Cloneable runtime hook for loading Lua extension tools into a registry.