Repository navigation
feat(scopes): leave plugin-created Scopes out of Scope listings - #2715
Merged
Merged
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
jasper-yl
requested review from
AlexStocks,
PsiACE,
frostming and
zhanghuidinah
as code owners
November 18, 2026 08:52
Co-Authored-By: Claude <noreply@anthropic.com>
frf12
approved these changes
Nov 18, 2026
frf12
left a comment
Member
There was a problem hiding this comment.
Reviewed 549f7ae8ab80b8f6594c6ea9e490705a0adcbd3b. No blocking findings. Default filtering, explicit plugin-Scope discovery and pagination behave as documented; plugin-owned Scope queries and direct Scope/Artifact access remain intact. Verified the relevant tests and a real SQLite Server restart with the owning plugin removed. CI is still pending.
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.
Which issue or RFC does this PR close?
Follows RFC #2579 (plugin-created Scopes). Requested by the knowledge-base plugin in #2658.
Rationale for this change
A plugin creates Scopes with
ctx.scopes.create(), for example one per knowledge base. These Scopes hold what the plugin manages and are used through the plugin, butGET /v1/scopeslists them next to ordinary Scopes, so they appear in the Dashboard Scope selector, in Desktop, and in an agent'slist_scopes.What changes are included in this PR?
GET /v1/scopesleaves out Scopes that carry an external reference of kindpowercontext.plugin, in the complete list, in pages, and with any filter. A request withexternal_reference_kind=powercontext.pluginlists exactly these Scopes.ctx.scopes.list()are unchanged. The Scopes of an unloaded plugin stay out of listings too.list_scopesdescription inopenapi/powercontext.yaml; the Python and Desktop generated sources follow. No parameter or schema changes.Are there any user-facing changes?
Yes, a behavior change of an existing operation: callers of
GET /v1/scopesno longer receive plugin-created Scopes unless they ask for that reference kind. There is no request that returns ordinary and plugin-created Scopes together.How was this change tested?
tests/e2e/test_plugin_access.pycovers the complete list, a page, a filtered query, and the request for the plugin reference kind against a real Server.ty checkpass;make contract-testpasses, 69 passed; the Scope and plugin access tests pass.sqlite-plugin-scope-listing-bc22089e-v1: anonymous loopback, static Bearer, HTTPS with CA/base path, and enforced Provider modes passed on a Linux VM (Ubuntu 24.04) against the wheel built frombc22089e9;tests/test_desktop_contract.pypasses.AI usage statement
Built with Claude Code (Claude). The author reviewed the design and the changes.
🤖 Generated with Claude Code