feat(vnext): port capability policy and Cursor HITL updates - #17
Merged
Conversation
| } | ||
|
|
||
| /** Called whenever the configured server URL is resolved or changed. */ | ||
| export function setPolicyServerUrl(url: string | undefined): void { |
There was a problem hiding this comment.
Issue: Policy decisions survive Glean instance switches because setPolicyServerUrl updates only cacheKeyUrl while decisionInForce returns the memoized decision. A restriction or deactivation from instance A can therefore remain enforced after switching to instance B.
Suggested fix: When the configured URL changes, invalidate the memoized decision and lastRequest so the next evaluation uses the new instance's URL-keyed policy and current session context. Add an A-to-B instance-switch regression test.
🔧 Tag @ glean-for-engineering to fix or click here to fix in Glean
💬 Help us improve! Was this comment helpful? React with 👍 or 👎
mohit-gupta-glean
approved these changes
Aug 20, 2026
mohit-gupta-glean
approved these changes
Aug 20, 2026
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.
Summary
Port the latest merged runtime changes from
gleanwork/glean-plugins-vnextinto the consolidatedshared/glean/mcpimplementation.Audited upstream PRs: #43 and #48–#52.
Audit and changes
Already present — no duplicate port
maxItems: 3, and one-time usage instructions were already present under the exposedfind_skills_and_toolsname (backend RPC remainsfind_skills).file_argslimit and documentation were already present.Ported
vnext #49 — trusted plugin version
serverInfoand downstreamclientInfo.vnext #50 — capability/policy negotiation
com.glean.mcp/capabilityPolicymetadata on downstreamtools/listandtools/call.vnext #51 — Cursor HITL restoration
vnext #52 — policy enforcement
metaTools,toolPromotion, andfileArgs.setup.tools/list.file_argsbefore reading any local file.Consolidated-repo adaptations
find_skills_and_tools; backend remainsfind_skills.glean, notglean-vnext.Verification
npm run check:no-shell✅npm run typecheck:bundle✅npm run test:bundle— 19 files / 283 tests passed ✅npm test— Claude, Cursor, and Codex build + validation passed ✅3.3.0; zero unresolved version placeholders ✅3.3.0beside a modified9.9.9package manifest ✅git diff --check✅