hashgraph / hashgraph/hedera-agent-kit-py
fix: unify transaction-tool hook invocation via BaseTransactionTool
- Dominant language
- Python
- Stars
- 11
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
#353 (predicates epic) must be fully complete before starting this task. #357 must also be complete — this task builds on `BaseTransactionTool`.
**Land alongside #361 (doc fix for issue #339).**
Hook invocation is currently duplicated per-tool. The JS repo centralized it in `BaseTransactionTool` so that all transaction tools get consistent pre/post-execution hook firing without per-tool wiring.
JS reference: [PR #1047](https://github.com/hashgraph/hedera-agent-kit-js/pull/1047)
Python tracking: [Issue #339](https://github.com/hashgraph/hedera-agent-kit-py/issues/339)
## Scope
- Move hook invocation into `BaseTransactionTool.execute()` so it fires uniformly for every transaction tool
- Remove per-tool hook wiring duplications across built-in plugins
- Regression test: a `RejectToolPolicy` targeting a known tool must fire correctly end-to-end
Contributor guide
Research direction
First confirm that #353 and #357 are complete, then read BaseTransactionTool.execute() and the built-in plugin transaction tools for duplicated hook wiring. Use the JS PR #1047 as context and exercise the RejectToolPolicy regression path. Done means hooks fire consistently through BaseTransactionTool without per-tool duplication, with the end-to-end rejection behavior covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100