Skip to content

plugins: per-source annotation policy overrides#345

Open
RhysSullivan wants to merge 1 commit intomainfrom
rs/annotation-policy-override
Open

plugins: per-source annotation policy overrides#345
RhysSullivan wants to merge 1 commit intomainfrom
rs/annotation-policy-override

Conversation

@RhysSullivan
Copy link
Copy Markdown
Owner

Summary

  • Per-source override for which tool invocations require approval, across openapi / graphql / google-discovery / mcp
  • Each plugin owns its own policy shape (HTTP methods / operation kinds / requireApprovalForAll switch) stored in a separate annotation_policy column
  • Shared ApprovalPolicyToggles (chip) and ApprovalPolicySwitch (on/off) reusable UI components wired into each plugin's Add/Edit panels, with a Reset-to-defaults affordance
  • Semantics: undefined on update leaves as-is, null clears, concrete value pins; default set derived at read time via resolveAnnotations so future default changes propagate to non-overridden sources
  • 34 new tests across pure helpers, storage round-trips, and full-executor integration

Test plan

  • bun run --cwd packages/plugins/openapi test — 39/39 pass
  • bun run --cwd packages/plugins/graphql test — 16/16 pass
  • bun run --cwd packages/plugins/mcp test — 24/24 pass
  • bun run --cwd packages/plugins/google-discovery test — 17/17 pass
  • Manual smoke: Add OpenAPI source, toggle GET require-approval, save, reload, verify sticky
  • Manual smoke: Edit MCP source, flip requireApprovalForAll, reset to defaults, save

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 20, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud 8477dd9 Apr 20 2026, 07:03 PM

Add per-source override for which tool invocations require approval,
across openapi / graphql / google-discovery / mcp. Each plugin owns its
own policy shape (HTTP methods for openapi/google-discovery, operation
kinds for graphql, requireApprovalForAll switch for mcp) stored in a
separate annotation_policy column so refresh paths don't touch it.

Semantics: undefined on update leaves as-is, null clears, concrete
value pins. When null, plugin's resolveAnnotations falls back to
hardcoded defaults at read time so future default changes propagate.

Shared UX: ApprovalPolicyToggles (chip) and ApprovalPolicySwitch
(on/off) in @executor/react/plugins/approval-policy-field, wired into
each plugin's Add/Edit panels with a Reset-to-defaults affordance.
First interaction materializes the current defaults as an explicit
override so toggling one option doesn't accidentally clear the rest.

Coverage: 34 new tests across pure helpers, storage round-trips, and
full integration via executor.{plugin}.addSource/updateSource.
@RhysSullivan RhysSullivan force-pushed the rs/annotation-policy-override branch from be88984 to 8477dd9 Compare April 20, 2026 19:01
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 20, 2026

Open in StackBlitz

@executor/sdk

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/sdk@345

@executor/plugin-file-secrets

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-file-secrets@345

@executor/plugin-google-discovery

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-google-discovery@345

@executor/plugin-graphql

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-graphql@345

@executor/plugin-keychain

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-keychain@345

@executor/plugin-mcp

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-mcp@345

@executor/plugin-oauth2

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-oauth2@345

@executor/plugin-onepassword

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-onepassword@345

@executor/plugin-openapi

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-openapi@345

@executor/plugin-workos-vault

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-workos-vault@345

executor

npm i https://pkg.pr.new/RhysSullivan/executor@345

commit: 8477dd9

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.

1 participant