Skip to content

fix(sdk): enforce workspace policies in toolkits - #1927

Open
donmasakayan wants to merge 6 commits into
UsefulSoftwareCo:mainfrom
donmasakayan:codex/toolkit-policy-enforcement
Open

fix(sdk): enforce workspace policies in toolkits#1927
donmasakayan wants to merge 6 commits into
UsefulSoftwareCo:mainfrom
donmasakayan:codex/toolkit-policy-enforcement

Conversation

@donmasakayan

Copy link
Copy Markdown

Summary

  • Combine provider policy results with workspace policy rows for active provider executors.
  • Preserve the most restrictive action, so workspace require_approval and block rules cannot be bypassed by a toolkit-scoped executor.
  • Apply the same composition to tools listing, schema lookup, policy resolution, and execution.
  • Add regression tests for provider and prepared-provider paths, including a real toolkit-scoped executor.

This addresses issue 1752. The implementation follows the least-privilege behavior proposed in the earlier PR 1846 by Adityakk9031, while excluding that PRs unrelated React change.

Validation

  • bun run test -- src/policies.test.ts (43 passed)
  • bun run test -- src/server.test.ts (6 passed)
  • root lint passed
  • root typecheck passed
  • formatting check passed

No application-specific policy semantics were changed for executors without an active policy provider.

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