Draft
Conversation
…CRUD - Introduce PolicyDecision type (allow/deny/require_interaction/fallback) - Add get/update methods to PolicyEngine interface for individual policy ops - Restructure Policy schema: action→effect, match→toolPattern+approvalMode, add enabled field - Extract evaluatePolicyDecision into policy-eval.ts for centralized matching - Add ElicitationContext.approval for tracking policy vs annotation approvals
BREAKING: Drops columns name, action, matchToolPattern, matchSourceId. Storage namespaces bumped (policies→policies-v2, meta→meta-v2) in file backend. - Add get(policyId) and update(policyId, patch) methods - check() now evaluates policies via evaluatePolicyDecision - sortPoliciesByPrecedence applied to list results - Both storage backends migrated with updated tests
Adds list, create, get, update, and remove endpoints under /scopes/:scopeId/policies. Includes input validation (non-empty toolPattern, at least one field on update) and proper error responses (400, 404).
Adds PoliciesPage component with inline PolicyForm for create/edit flows, CardStack listing, permission badge, and enable/disable toggle. Wires up policiesAtom, createPolicy, updatePolicy, and removePolicy atoms. Route added in both cloud and local apps with Policies nav item in sidebar.
Adds approval field to the interaction object when elicitationContext.approval is present.
Tests policy enforcement through executor with annotated tools, including allow/deny scenarios based on policy effect and approvalMode settings.
223f5b7 to
30f1adf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.