feat: plugin RPC + Custom Endpoint API Keys consolidation with .env sync - #68043
Closed
eiritsu wants to merge 3 commits into
Closed
feat: plugin RPC + Custom Endpoint API Keys consolidation with .env sync#68043eiritsu wants to merge 3 commits into
eiritsu wants to merge 3 commits into
Conversation
Allow plugins to register JSON-RPC methods via ctx.register_rpc() that are merged into the gateway's method table, so Desktop plugin GUIs can invoke them through host.request(method, params). Changes: - PluginContext.register_rpc() validates and stores RPC handlers - PluginManager._rpc_methods registry (cleared on force=True reload) - get_plugin_rpc_methods() / get_plugin_rpc_method_names() accessors - Gateway: _merge_plugin_rpc_methods() discovers plugins on each call, reconciles stale plugin-owned methods, and is safe to call repeatedly - handle_request() calls _merge_plugin_rpc_methods() before dispatch Addresses review feedback: - discover_plugins() called before reading registrations (fixes empty merge in standalone TUI process) - Only marks merge state after successful discovery - force=True clears _rpc_methods registry - Stale plugin RPC methods removed from _methods on re-merge
…ified card UX Removed the standalone Custom Endpoints sub-page and sidebar navigation. Added CustomEndpointKeyCard in the API Keys page using the same structure as ProviderKeyRows (@container, status dot, row-hover, @2XL responsive). Backend: new GET/PUT /api/providers/custom-endpoint reading/writing the managed_by:desktop-api-keys entry in config.yaml custom_providers:. Auto-detects api_mode from URL. Profile-scoped. 4 new test cases. Frontend: API Key lifecycle matches KeyField (masked display, draft-on-focus, Esc cancel, explicit Remove with confirm). Only sends api_key when user typed one. Full i18n (en/zh/zh-hant/ja). Removed standalone CRUD endpoints.
eiritsu
force-pushed
the
feat/custom-endpoint-api-keys-card
branch
from
July 21, 2026 04:08
33f3c1b to
3fecd7e
Compare
…routes Frontend was calling singular /custom-endpoint but upstream backend registers plural /custom-endpoints. Caused 404 from headless catch-all.
eiritsu
force-pushed
the
feat/custom-endpoint-api-keys-card
branch
from
July 21, 2026 05:29
0c9d56e to
13e4111
Compare
Author
|
Closing in favor of a clean PR with squashed commits. Replaced by a fresh branch rebased on latest origin/main. |
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.
What
Three related changes bundled into one PR:
1. Plugin RPC registration
Add
PluginContext.register_rpc()so plugins can expose JSON-RPC methods to the gateway WebSocket API without modifyingtui_gateway/server.py. Desktop plugin GUIs invoke them viahost.request(method, params).2. Custom Endpoint consolidated into API Keys page
Removed the standalone Custom Endpoints sub-page and sidebar nav. Added
CustomEndpointKeyCardin the API Keys page using the same structure asProviderKeyRows.Backend:
GET/PUT /api/providers/custom-endpointsreading/writing themanaged_by:desktop-api-keysentry. Auto-detects api_mode from URL. Profile-scoped. 4 new test cases.Frontend: API Key lifecycle matches
KeyField(masked display, draft-on-focus, Esc cancel, explicit Remove with confirm). Only sends api_key when user typed one. Full i18n (en/zh/zh-hant/ja).3. .env sync on save
_write_custom_endpoint()now syncsCUSTOM_BASE_URL/CUSTOM_API_KEYto.envon save and cleans them up on delete. Without this, stale.envvalues silently overrideconfig.yaml.Notes
/api/providers/custom-endpointroute aliases for backward compat with older Desktop bundlesregister_rpcis not yet upstream — wiki plugin depends on it for Desktop GUI RPC