Skip to content

Add plugin install request schema and validation#28802

Open
zswang-oai wants to merge 1 commit into
nm-codex/plugin-installs-extensionfrom
nm-codex/plugin-installs-extension-schema
Open

Add plugin install request schema and validation#28802
zswang-oai wants to merge 1 commit into
nm-codex/plugin-installs-extensionfrom
nm-codex/plugin-installs-extension-schema

Conversation

@zswang-oai

@zswang-oai zswang-oai commented Jun 17, 2026

Copy link
Copy Markdown

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

  • add flat and categorized request_plugin_installs schemas
  • keep a single-entry connector schema for the TUI client
  • validate entry limits, duplicate tools, category shape, known IDs, and TUI compatibility
  • derive Hash for DiscoverableToolType so duplicate detection can use (tool_type, tool_id) keys

Stack

This is PR 3 of 7.

Validation

  • just test -p codex-plugin-installs-extension (15 tests)

@zswang-oai zswang-oai force-pushed the nm-codex/plugin-installs-extension branch from 7d79ab0 to 77c3ce0 Compare June 17, 2026 23:24
@zswang-oai zswang-oai force-pushed the nm-codex/plugin-installs-extension-schema branch from 973e71d to 3106d9b Compare June 17, 2026 23:24
@zswang-oai zswang-oai force-pushed the nm-codex/plugin-installs-extension branch from 77c3ce0 to 01bb934 Compare June 17, 2026 23:49
@zswang-oai zswang-oai force-pushed the nm-codex/plugin-installs-extension-schema branch from 3106d9b to 85f74c9 Compare June 17, 2026 23:50
@zswang-oai zswang-oai changed the title Define plugin install extension tool schema Test plugin install core integration Jun 17, 2026
@zswang-oai zswang-oai force-pushed the nm-codex/plugin-installs-extension-schema branch from 85f74c9 to e45aefe Compare June 18, 2026 00:04
@zswang-oai zswang-oai force-pushed the nm-codex/plugin-installs-extension branch from 01bb934 to d7f7d9a Compare June 18, 2026 00:04
@zswang-oai zswang-oai changed the title Test plugin install core integration Add plugin install request schema and validation Jun 18, 2026
@zswang-oai zswang-oai marked this pull request as ready for review June 18, 2026 05:02

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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