Skip to content

fix(toolkits): stop doubling the account in toolkit policy patterns - #2343

Closed
stanislavlysenko0912 wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
stanislavlysenko0912:fix/toolkit-policy-pattern
Closed

stanislavlysenko0912 wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
stanislavlysenko0912:fix/toolkit-policy-pattern

Conversation

@stanislavlysenko0912

@stanislavlysenko0912 stanislavlysenko0912 commented Oct 23, 2026 •

Copy link
Copy Markdown

Summary

On a toolkit page, a policy set from a tool or folder row in the tree saved a pattern with the owner and connection twice, for example google_gmail.user.me.user.me.gmail.users.labels.*. The pattern never matched, so the rule silently did nothing and write tools still asked for approval.

The toolkit page passed the full tool id (integration.owner.connection.tool) as the tree row name. Since #2062, rows inside an account section add owner.connection to that name. The toolkit page now passes integration.tool for non-static tools, as the integration Tools tab already does. This also drops the redundant user → <connection> levels from the tree.

Verification

  • Self-hosted 1.6.11 with this change applied: a folder rule and a tool rule set from the tree saved google_gmail.user.<conn>.gmail.users.drafts.* and ...drafts.delete. A drafts.create + drafts.delete call over the toolkit MCP ran without an approval prompt.
  • bun run format:check
  • bun run lint
  • bun run typecheck (@executor-js/plugin-toolkits and its dependents)
  • bun run test (@executor-js/plugin-toolkits and its dependents)

Checklist

  • Added a changeset (bun run changeset)
  • Added or updated tests for the new behaviour.
  • No secrets, credentials, or private data in the diff.

@RhysSullivan

Copy link
Copy Markdown
Collaborator

Thanks for tracking this down. v2 has no toolkit pages or pattern-based tool policies: approval rules live in each app's code, so this doubled owner.connection pattern can't be produced there. Since v1 main now only takes migration work, we're closing this. If you see a policy problem on v2, please open a new issue against v2.

Sent from my Claude

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants