feat: integrate AST structural validation into check_code pipeline
loading diff…
Integrates Mercury's new AST-based structural validator, auto-fixer, and skeleton extractor into the Integrator. This is the companion PR to mercury#17353 (which adds the parser modules).
Changes:
helper.py: Added sys.path setup for Mercury parsers + new _structural_check_and_fix() functiontool.py: Calls structural check between check_if_action_code and _composio_action_checksHow it works:
validate_and_fix() (gracefully skips if unavailable)prompt.py: Added _get_app_skeleton_context() that calls Mercury's extract_app_context() to generate compact structural summaries of existing actionsThis reduces builder agent token usage by providing compact pattern context (~2KB for 16 actions) instead of requiring the agent to read multiple full source files.
Depends on: mercury#17353
ruff check and ruff format clean on all modified files_structural_check_and_fix and _get_app_skeleton_context return safe defaults when Mercury parsers are unavailableextract_app_context('hackernews') produces 2KB summary of 16 action files🤖 Generated with Claude Code