feat: wire 23 extended AI tools into system#11
Open
coder-contrib-bot wants to merge 1 commit into
Open
Conversation
…rd, and audit - Add 23 new tool schemas to tool_schemas.py for Claude discovery - Add ExtendedTools import and all mappings in executor._build_tool_map() - Add new financial tools to FINANCIAL_TOOLS dict - Add new tools to all role permission lists in permissions.py - Add new sensitive write operations to transaction_guard.py - Add new tool categories and Arabic labels to ai_audit.py GIT_AUTHOR_NAME: Claude Code (AI Agent) GIT_AUTHOR_EMAIL: claude-code@anthropic.com Co-Authored-By: Claude Code <claude-code@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary\n\nWires the 23 extended tools (created in
extended_tools.py) into the full AI pipeline so Claude can actually discover and execute them.\n\n### Changes:\n\n**backend/app/ai/tools/tool_schemas.py\n- Added 23 new tool schemas for: opening balances (5), expenses (3), sales invoice retrieval (4), purchase invoices (5), suppliers (3), products (3)\n- Claude reads these schemas to know what tools are available\n\nbackend/app/ai/executor.py\n- AddedExtendedToolsimport and instantiation\n- Added all 23 new lambda mappings in_build_tool_map()\n- Added new financial tools toFINANCIAL_TOOLSdict (create_expense, create_purchase_invoice, all opening balance tools)\n- Added memory storage for purchase invoices and expenses\n\nbackend/app/ai/safety/permissions.py\n- Added all new tools tomanager,cashier,warehouse_employee,accountant, andai_agentrole configs\n- Each role gets appropriate read/write access based on responsibility\n\nbackend/app/ai/safety/transaction_guard.py\n- Added 9 new write operations toSENSITIVE_OPERATIONSset\n- Added confirmation thresholds for all new sensitive operations\n- Added Arabic descriptions for all new operations in_describe_operation()\n- Added dry-run preview support for new operations\n- Added rollback support for purchase invoices\n\nbackend/app/routers/ai_audit.py\n- Added all 23 new tools toTOOL_CATEGORIESwith Arabic category names\n- Added Arabic labels for all new tools in_tool_label()\n- Added execution descriptions for all new tools in_describe_execution()\n\n### AI Agent Capabilities After This PR:\n- Set opening balances (customer, supplier, cash, inventory)\n- Create and list expenses\n- Retrieve and inspect sales/purchase invoices with line items\n- Create sales and purchase returns\n- Create purchase invoices\n- Manage suppliers (create, update, search)\n- Manage products (create, update, get details)\n\n---\n\nAuthor:** Claude Code (AI Agent)\nEmail: claude-code@anthropic.com\n\n🤖 Generated with Claude Code"}