Skip to content

policy manager#194

Draft
aryasaatvik wants to merge 6 commits intoRhysSullivan:mainfrom
aryasaatvik:policy-manager
Draft

policy manager#194
aryasaatvik wants to merge 6 commits intoRhysSullivan:mainfrom
aryasaatvik:policy-manager

Conversation

@aryasaatvik
Copy link
Copy Markdown
Contributor

@aryasaatvik aryasaatvik commented Apr 11, 2026

No description provided.

…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.
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