Skip to content

feat(js/plugins/middleware): implemented tool approval middleware#5055

Merged
pavelgj merged 27 commits intopj/gm-middleware-filesystemfrom
pj/gm-middleware-tool-approval
Apr 10, 2026
Merged

feat(js/plugins/middleware): implemented tool approval middleware#5055
pavelgj merged 27 commits intopj/gm-middleware-filesystemfrom
pj/gm-middleware-tool-approval

Conversation

@pavelgj
Copy link
Copy Markdown
Member

@pavelgj pavelgj commented Apr 2, 2026

No description provided.

@github-actions github-actions bot added docs Improvements or additions to documentation js labels Apr 2, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a suite of middlewares for the Genkit JS SDK, including filesystem access, skill injection, tool approval, retries, and fallbacks. The feedback identifies a configuration error in the README regarding the skills middleware and notes a dependency on internal framework APIs within the toolApproval implementation that could benefit from better documentation or a more stable interface.

@pavelgj
Copy link
Copy Markdown
Member Author

pavelgj commented Apr 3, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the toolApproval middleware to the Genkit JS SDK, which enables restricting tool execution to an approved list and supports manual approval workflows via ToolInterruptError. The changes include the middleware implementation, documentation in the README, a coding agent example, and unit tests. Review feedback recommends improving type safety by replacing any types with specific interfaces in the example script and the middleware logic.

@github-actions github-actions bot added the config label Apr 9, 2026
@pavelgj pavelgj merged commit 0851507 into pj/gm-middleware-filesystem Apr 10, 2026
6 checks passed
@pavelgj pavelgj deleted the pj/gm-middleware-tool-approval branch April 10, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config docs Improvements or additions to documentation js

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants