Add plugin install request schema and validation#28802
Conversation
7d79ab0 to
77c3ce0
Compare
973e71d to
3106d9b
Compare
77c3ce0 to
01bb934
Compare
3106d9b to
85f74c9
Compare
85f74c9 to
e45aefe
Compare
01bb934 to
d7f7d9a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e45aefe0d9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| app_server_client_name: Option<&str>, | ||
| presentation: ToolSuggestPresentation, | ||
| ) -> Result<Vec<RequestPluginInstallResolvedPickerEntry>, FunctionCallError> { | ||
| if app_server_client_name == Some("codex-tui") |
There was a problem hiding this comment.
Reject non-install action types
When action_type is "enable", this validator still resolves entries successfully, and build_request_plugin_installs_elicitation_request later copies args.action_type into the elicitation suggest_type. The schema says to use install, but DiscoverableToolAction deserialization accepts enable and the tool is non-strict, so malformed model calls can drive an enable suggestion through request_plugin_installs instead of being rejected before host-side work runs.
Useful? React with 👍 / 👎.
Why
The extension needs to describe the plural tool to the model and reject malformed picker requests before any host-side work runs.
What changed
request_plugin_installsschemasHashforDiscoverableToolTypeso duplicate detection can use(tool_type, tool_id)keysStack
This is PR 3 of 7.
Validation
just test -p codex-plugin-installs-extension(15 tests)