feat(tool): debug tool usage via channels#1332
Conversation
|
This feature might be blocked by #1316. Perhaps after the agent refactoring, it could be better implemented through the event system. |
yinwm
left a comment
There was a problem hiding this comment.
🔴 Security Concern: Sensitive Information Exposure
This feature sends tool arguments directly to the chat channel. However, some tools may receive sensitive information in their arguments:
execcommands might contain passwords:curl -u user:password ...http_requestmight include API keys or tokens- File operations could expose configuration secrets
Question: How should this be handled? Have you considered:
- Tool blacklist (exclude certain tools from sending feedback)
- Sensitive field masking (redact fields like
password,token,secret,api_key) - User-configurable exclusion rules
Would like to hear your thoughts on this.
|
hello @yinwm, thanks for the review, I agree with your security concern that sensitive information could be leaked into the channel this way, but wouldn't it be the same if after the agent executed an exec command with sensitive information I asked him to provide me with the command he just used? |
|
yes I just tested it and I confirm that it is, the information is leaked. If you want to replicate it you can create a command.txt file in pico workspace, inside the file you write the command |
|
hi @afjcjsbx , sorry for late, plz resolve conflicts |
|
no problem @yinwm, thanks! probably with the agent refactor we could configure this logic well with the pre-post hook functionality of the tools |
yinwm
left a comment
There was a problem hiding this comment.
LGTM! Code quality is good, no security issues or critical bugs found.
One minor note: the default value for tool_feedback.enabled differs between defaults.go (true) and config.example.json (false). Consider unifying them for consistency, but this is non-blocking.
Thanks for the contribution!
* feat(tool): debug usage via channel * set defaults * fix conflicts
* feat(tool): debug usage via channel * set defaults * fix conflicts
* feat(tool): debug usage via channel * set defaults * fix conflicts
* feat(tool): debug usage via channel * set defaults * fix conflicts
* feat(tool): debug usage via channel * set defaults * fix conflicts
📝 Description
This PR introduces the Real-Time Tool Feedback (
tool_feedback) feature.Currently, users have to wait in silence while the agent executes potentially long or multi-step tool calls (like web searches, executing commands, etc.). This feature improves transparency and User Experience (UX) by sending a short, formatted notification directly to the chat channel whenever the agent invokes a tool.
Key changes:
tool_feedbackconfiguration insideagents.defaults(withenabledandmax_args_lengthproperties).pkg/agent/loop.goto send a 🔧 formatted message to the active channel containing the tool name and a truncated preview of the arguments.config.example.jsonand added comprehensive documentation indocs/debug.md.🗣️ Type of Change
🤖 AI Code Generation
🔗 Related Issue
N/A
📚 Technical Context (Skip for Docs)
🧪 Test Environment
📸 Evidence (Optional)
Click to view Logs/Screenshots
Example of in-chat output: