Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions scripts/lib/fusion/_neurosyntax_check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""Check tree-sitter availability and warn if missing."""
import logging

logger = logging.getLogger("claw_compactor.neurosyntax")

try:
import tree_sitter
TREE_SITTER_AVAILABLE = True
except ImportError:
TREE_SITTER_AVAILABLE = False
logger.warning(
"tree-sitter not installed. Neurosyntax will use regex fallback "
"(~8%% compression vs ~25%% with tree-sitter). "
"Install with: pip install tree-sitter tree-sitter-python"
)