fix(plugins): manage default Chat selection in plugin settings

Merged
WE
3d ago
+1312-794

Description

Move MCP and OpenAPI default Chat settings out of Chat Preferences and into Plugins. Chat Preferences keeps built-in controls and shows a translated notice linking to Plugins.

OpenAPI Configuration now has an Enable in default Chat toggle. Changes are saved with the form. Turning it off removes the plugin from default Chat while preserving custom-agent use. OpenAPI tools remain read-only; there are no per-operation switches. Admin directory status reflects default Chat selection.

OpenAPI plugins no longer have a global disable control. Delete the plugin to remove it from the workspace. Previously disabled records remain off default Chat, but configured custom agents can use them, subject to access and authentication. Explicit default Chat selection normalizes the legacy flag. This uses existing fields and associations, with no migration. New full-admin setup defaults the Chat toggle on; scoped creators cannot change workspace Chat defaults.

MCP retains its server-level default Chat switch and global per-tool controls. Removing the Chat Preferences cards intentionally removes individual MCP tool selection specifically for default Chat. OpenAPI retains its whole-plugin default Chat choice in Configuration.

Terraform onyx_custom_tool.enabled now controls default Chat selection. The provider reads and writes default_chat_enabled through the custom-tool API. Metadata and selection save atomically, parallel resources preserve unrelated selections, and omitted OAuth settings remain unchanged. Upgrade the provider alongside the server; older versions use the removed global status writes. No Terraform state schema migration is required.

Update the feature map and simplify the OpenAPI tools list to shared name/description rows with consistent search and counts. Rows retain composite method/path/name keys.

How Has This Been Tested?

  • 149 frontend tests passed across plugin forms, member details, and the admin directory.
  • Backend availability unit tests passed, including permission checks, legacy selections, and omitted versus explicitly cleared OAuth settings. Additional MCP/default Chat unit checks passed.
  • 13 PostgreSQL tests passed against a disposable ODS database. Coverage includes legacy OpenAPI construction, atomic API create/update/read, rollback, and concurrent selections.
  • Terraform provider go test ./... passed and generated documentation is current. Live Terraform acceptance tests were not run.
  • Repository pre-commit checks passed, including type checks, formatting, lint, translations, and feature-map integrity. git diff --check passed.

Additional Options

  • [Optional] Please cherry-pick this PR to the latest release version.

Summary by CodeRabbit

  • New Features

    • Added per-plugin availability controls for Default Chat, including MCP servers and OpenAPI actions.
    • OpenAPI actions disabled for Default Chat remain available to configured custom agents.
    • Added permission-aware controls so only workspace administrators can change Default Chat availability.
    • Added support for managing these settings through Terraform custom tools.
  • Improvements

    • Chat Preferences now focuses on built-in tools, with links directing administrators to Plugins for MCP and OpenAPI configuration.
    • Improved OpenAPI action search and display.
  • Localization

    • Added translated availability guidance across supported languages.