Skip to content

feat: index tool with tree-sitter skeletons - #43

Merged
wowi42 merged 1 commit into
mainfrom
feat/index-tool
Nov 20, 2026
Merged

wowi42 merged 1 commit into
mainfrom
feat/index-tool

Conversation

@wowi42

@wowi42 wowi42 commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Closes #40.

New index tool: tree-sitter skeleton of a source file (imports, types, function/method signatures with line ranges), so the model reads only the ranges it needs. Supported: python, javascript, typescript, tsx, rust, go, c, cpp, java, ruby, bash, zig, elixir. Unsupported extensions return a plain note; parse issues are fail-open.

Decisions:

  • Individual grammar packages with abi3 wheels instead of tree-sitter-language-pack, which downloads grammars at runtime (47 MB cache, no offline).
  • tree-sitter core 0.26.1 has no cp315 wheel, so it builds from source on 3.15 (small C lib; CI green on ubuntu + macOS).
  • index is read-class in permissions; read tool description now nudges index-first on large files.

Tests: 10 new cases in tests/test_tool_index.py (per-language skeletons, multiline signatures, elixir call keywords, caps, error paths), readonly matrix + registry shape updated. Full suite green locally (2330 passed).

Closes #40. The index tool returns imports, types, and signatures with
line ranges for 14 languages, so the agent reads only the ranges it
needs instead of whole files. Registered as read-class; the read tool
description nudges indexing first on large files.

Grammars ship as pinned abi3 wheels (offline-friendly); the tree-sitter
core builds from source on Python 3.15.
@wowi42
wowi42 merged commit ba0f517 into main Nov 20, 2026
2 checks passed
@wowi42
wowi42 deleted the feat/index-tool branch November 20, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: index tool (tree-sitter skeleton before reads)

1 participant