Remove Codex plugin feature and mention residue

This commit is contained in:
Meta Vens 2026-05-13 22:55:06 +01:00
commit 1933d8c175
29 changed files with 61 additions and 212 deletions

View file

@ -871,6 +871,14 @@ no longer advertise app config structs, `Feature::Apps` and the legacy
exists. MCP tool approval remains live, but it is now named `McpToolApproval`
and lives under MCP server config.
The plugin feature and mention residue is gone too. `Feature::Plugins`,
`Feature::RemotePlugin`, `plugin://` structured mentions, plugin instruction
tags, stale plugin popup snapshots, and app/plugin path classification in
`codex-core-skills` were deleted. Live structured mentions are MCP/skill-shaped
only. Do not resurrect plugin product routing or `app://` compatibility to make
old tests feel less lonely; the blessed route is `mcp://` at the MCP edge and
typed CultCache/CultNet documents inside Epiphany.
That husk has now been cut from `codex-core`. The root core crate no longer
exports `plugins`, no longer depends on `codex-core-plugins` or `codex-plugin`,
and the core plugin manager / marketplace add-remove-sync modules and tests

Binary file not shown.

File diff suppressed because one or more lines are too long

View file

@ -10633,8 +10633,8 @@ mod tests {
path: PathBuf::from("/repo/.codex/skills/skill-creator/SKILL.md"),
},
CoreUserInput::Mention {
name: "Demo App".to_string(),
path: "app://demo-app".to_string(),
name: "Docs MCP".to_string(),
path: "mcp://docs".to_string(),
},
],
});
@ -10659,8 +10659,8 @@ mod tests {
path: PathBuf::from("/repo/.codex/skills/skill-creator/SKILL.md"),
},
UserInput::Mention {
name: "Demo App".to_string(),
path: "app://demo-app".to_string(),
name: "Docs MCP".to_string(),
path: "mcp://docs".to_string(),
},
],
}

View file

@ -604,16 +604,16 @@ Invoke a skill explicitly by including `$<skill-name>` in the text input and add
} } }
```
### Example: Start a turn (invoke an app)
### Example: Start a turn (invoke an MCP server)
Invoke an app by including `$<app-slug>` in the text input and adding a `mention` input item with the app id in `app://<connector-id>` form.
Invoke an MCP server by including a linked mention in the text input and adding a `mention` input item with the server name in `mcp://<server-name>` form.
```json
{ "method": "turn/start", "id": 34, "params": {
"threadId": "thr_123",
"input": [
{ "type": "text", "text": "$demo-app Summarize the latest updates." },
{ "type": "mention", "name": "Demo App", "path": "app://demo-app" }
{ "type": "text", "text": "Use [$docs](mcp://docs) to summarize the latest updates." },
{ "type": "mention", "name": "Docs MCP", "path": "mcp://docs" }
]
} }
{ "id": 34, "result": { "turn": {
@ -624,26 +624,6 @@ Invoke an app by including `$<app-slug>` in the text input and adding a `mention
} } }
```
### Example: Start a turn (invoke a plugin)
Invoke a plugin by including a UI mention token such as `@sample` in the text input and adding a `mention` input item with the exact `plugin://<plugin-name>@<marketplace-name>` path returned by `plugin/list`.
```json
{ "method": "turn/start", "id": 35, "params": {
"threadId": "thr_123",
"input": [
{ "type": "text", "text": "@sample Summarize the latest updates." },
{ "type": "mention", "name": "Sample Plugin", "path": "plugin://sample@test" }
]
} }
{ "id": 35, "result": { "turn": {
"id": "turn_459",
"status": "inProgress",
"items": [],
"error": null
} } }
```
### Example: Inject raw history items
Use `thread/inject_items` to append prebuilt Responses API items to a loaded thread’s prompt history without starting a user turn. These items are persisted to the rollout and included in subsequent model requests.

View file

@ -168,7 +168,7 @@ async fn mcp_server_elicitation_round_trip() -> Result<()> {
.send_turn_start_request(TurnStartParams {
thread_id: thread.id.clone(),
input: vec![V2UserInput::Text {
text: "Use [$calendar](app://calendar) to run the calendar tool.".to_string(),
text: "Use [$calendar](mcp://calendar) to run the calendar tool.".to_string(),
text_elements: Vec::new(),
}],
model: Some("mock-model".to_string()),

View file

@ -644,8 +644,8 @@ async fn turn_start_accepts_text_at_limit_with_mention_item() -> Result<()> {
text_elements: Vec::new(),
},
V2UserInput::Mention {
name: "Demo App".to_string(),
path: "app://demo-app".to_string(),
name: "Docs MCP".to_string(),
path: "mcp://docs".to_string(),
},
],
..Default::default()
@ -2282,7 +2282,6 @@ async fn turn_start_streams_apply_patch_change_updates_v2() -> Result<()> {
&BTreeMap::from([
(Feature::ApplyPatchFreeform, true),
(Feature::ApplyPatchStreamingEvents, true),
(Feature::Plugins, false),
(Feature::RemoteModels, false),
(Feature::ShellSnapshot, false),
]),

View file

@ -200,26 +200,18 @@ impl<'a> ToolMentions<'a> {
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ToolMentionKind {
App,
Mcp,
Plugin,
Skill,
Other,
}
const APP_PATH_PREFIX: &str = "app://";
const MCP_PATH_PREFIX: &str = "mcp://";
const PLUGIN_PATH_PREFIX: &str = "plugin://";
const SKILL_PATH_PREFIX: &str = "skill://";
const SKILL_FILENAME: &str = "SKILL.md";
pub fn tool_kind_for_path(path: &str) -> ToolMentionKind {
if path.starts_with(APP_PATH_PREFIX) {
ToolMentionKind::App
} else if path.starts_with(MCP_PATH_PREFIX) {
if path.starts_with(MCP_PATH_PREFIX) {
ToolMentionKind::Mcp
} else if path.starts_with(PLUGIN_PATH_PREFIX) {
ToolMentionKind::Plugin
} else if path.starts_with(SKILL_PATH_PREFIX) || is_skill_filename(path) {
ToolMentionKind::Skill
} else {
@ -232,16 +224,6 @@ fn is_skill_filename(path: &str) -> bool {
file_name.eq_ignore_ascii_case(SKILL_FILENAME)
}
pub fn app_id_from_path(path: &str) -> Option<&str> {
path.strip_prefix(APP_PATH_PREFIX)
.filter(|value| !value.is_empty())
}
pub fn plugin_config_name_from_path(path: &str) -> Option<&str> {
path.strip_prefix(PLUGIN_PATH_PREFIX)
.filter(|value| !value.is_empty())
}
pub(crate) fn normalize_skill_path(path: &str) -> &str {
path.strip_prefix(SKILL_PATH_PREFIX).unwrap_or(path)
}
@ -269,10 +251,7 @@ pub fn extract_tool_mentions_with_sigil(text: &str, sigil: char) -> ToolMentions
parse_linked_tool_mention(text, text_bytes, index, sigil)
{
if !is_common_env_var(name) {
if !matches!(
tool_kind_for_path(path),
ToolMentionKind::App | ToolMentionKind::Mcp | ToolMentionKind::Plugin
) {
if !matches!(tool_kind_for_path(path), ToolMentionKind::Mcp) {
mentioned_names.insert(name);
}
mentioned_paths.insert(path);
@ -333,12 +312,7 @@ fn select_skills_from_mentions(
let mention_skill_paths: HashSet<&str> = mentions
.paths()
.filter(|path| {
!matches!(
tool_kind_for_path(path),
ToolMentionKind::App | ToolMentionKind::Mcp | ToolMentionKind::Plugin
)
})
.filter(|path| !matches!(tool_kind_for_path(path), ToolMentionKind::Mcp))
.map(normalize_skill_path)
.collect();

View file

@ -121,7 +121,7 @@ fn extract_tool_mentions_stops_at_non_name_chars() {
}
#[test]
fn extract_tool_mentions_keeps_plugin_skill_namespaces() {
fn extract_tool_mentions_keeps_tool_style_namespaces() {
assert_mentions(
"use $slack:search and $alpha",
&["alpha", "slack:search"],

View file

@ -327,9 +327,6 @@
"personality": {
"type": "boolean"
},
"plugins": {
"type": "boolean"
},
"prevent_idle_sleep": {
"type": "boolean"
},
@ -342,9 +339,6 @@
"remote_models": {
"type": "boolean"
},
"remote_plugin": {
"type": "boolean"
},
"request_permissions": {
"type": "boolean"
},
@ -2293,9 +2287,6 @@
"personality": {
"type": "boolean"
},
"plugins": {
"type": "boolean"
},
"prevent_idle_sleep": {
"type": "boolean"
},
@ -2308,9 +2299,6 @@
"remote_models": {
"type": "boolean"
},
"remote_plugin": {
"type": "boolean"
},
"request_permissions": {
"type": "boolean"
},

View file

@ -378,11 +378,14 @@ async fn includes_thread_config_layers_in_stack() -> anyhow::Result<()> {
LOCAL_FS.as_ref(),
tmp.path(),
Some(cwd),
&[("features.plugins".to_string(), TomlValue::Boolean(true))],
&[(
"features.multi_agent_v2".to_string(),
TomlValue::Boolean(true),
)],
LoaderOverrides::without_managed_config_for_tests(),
CloudRequirementsLoader::default(),
&StaticThreadConfigLoader::new(vec![ThreadConfigSource::Session(SessionThreadConfig {
features: BTreeMap::from([("plugins".to_string(), false)]),
features: BTreeMap::from([("multi_agent_v2".to_string(), false)]),
..Default::default()
})]),
/*host_name*/ None,
@ -412,7 +415,7 @@ async fn includes_thread_config_layers_in_stack() -> anyhow::Result<()> {
.effective_config()
.get("features")
.and_then(TomlValue::as_table)
.and_then(|features| features.get("plugins")),
.and_then(|features| features.get("multi_agent_v2")),
Some(&TomlValue::Boolean(false))
);

View file

@ -872,7 +872,6 @@ pub(crate) fn build_guardian_review_session_config(
for feature in [
Feature::Collab,
Feature::CodexHooks,
Feature::Plugins,
Feature::WebSearchRequest,
Feature::WebSearchCached,
] {

View file

@ -2024,7 +2024,7 @@ async fn guardian_review_session_config_uses_live_network_proxy_state() {
}
#[tokio::test]
async fn guardian_review_session_config_disables_mcp_and_plugins() {
async fn guardian_review_session_config_disables_mcp() {
let mut parent_config = test_config().await;
let server: McpServerConfig =
toml::from_str("command = \"docs-server\"").expect("deserialize MCP server");
@ -2032,10 +2032,6 @@ async fn guardian_review_session_config_disables_mcp_and_plugins() {
.mcp_servers
.set(HashMap::from([("docs".to_string(), server)]))
.expect("parent MCP servers are configurable");
parent_config
.features
.enable(Feature::Plugins)
.expect("plugins feature is configurable");
let guardian_config = build_guardian_review_session_config_for_test(
&parent_config,
@ -2046,7 +2042,6 @@ async fn guardian_review_session_config_disables_mcp_and_plugins() {
.expect("guardian config");
assert!(guardian_config.mcp_servers.get().is_empty());
assert!(!guardian_config.features.enabled(Feature::Plugins));
}
#[tokio::test]

View file

@ -329,7 +329,7 @@ async fn spawn_agent_rejects_when_message_and_items_are_both_set() {
"spawn_agent",
function_payload(json!({
"message": "hello",
"items": [{"type": "mention", "name": "drive", "path": "app://drive"}]
"items": [{"type": "mention", "name": "docs", "path": "mcp://docs"}]
})),
);
let Err(err) = SpawnAgentHandler.handle(invocation).await else {
@ -1390,7 +1390,7 @@ async fn multi_agent_v2_send_message_rejects_legacy_items_field() {
function_payload(json!({
"target": agent_id.to_string(),
"items": [
{"type": "mention", "name": "drive", "path": "app://google_drive"},
{"type": "mention", "name": "docs", "path": "mcp://docs"},
{"type": "text", "text": "read the folder"}
]
})),
@ -2124,7 +2124,7 @@ async fn send_input_rejects_when_message_and_items_are_both_set() {
function_payload(json!({
"target": ThreadId::new().to_string(),
"message": "hello",
"items": [{"type": "mention", "name": "drive", "path": "app://drive"}]
"items": [{"type": "mention", "name": "docs", "path": "mcp://docs"}]
})),
);
let Err(err) = SendInputHandler.handle(invocation).await else {
@ -2231,7 +2231,7 @@ async fn send_input_accepts_structured_items() {
function_payload(json!({
"target": agent_id.to_string(),
"items": [
{"type": "mention", "name": "drive", "path": "app://google_drive"},
{"type": "mention", "name": "docs", "path": "mcp://docs"},
{"type": "text", "text": "read the folder"}
]
})),
@ -2246,7 +2246,7 @@ async fn send_input_accepts_structured_items() {
items: vec![
UserInput::Mention {
name: "drive".to_string(),
path: "app://google_drive".to_string(),
path: "mcp://docs".to_string(),
},
UserInput::Text {
text: "read the folder".to_string(),

View file

@ -4,7 +4,6 @@ use std::sync::OnceLock;
use crate::responses::ResponsesRequest;
use codex_protocol::protocol::APPS_INSTRUCTIONS_OPEN_TAG;
use codex_protocol::protocol::PLUGINS_INSTRUCTIONS_OPEN_TAG;
use codex_protocol::protocol::SKILLS_INSTRUCTIONS_OPEN_TAG;
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
@ -278,9 +277,6 @@ fn canonicalize_snapshot_text(text: &str) -> String {
if text.starts_with(SKILLS_INSTRUCTIONS_OPEN_TAG) {
return "<SKILLS_INSTRUCTIONS>".to_string();
}
if text.starts_with(PLUGINS_INSTRUCTIONS_OPEN_TAG) {
return "<PLUGINS_INSTRUCTIONS>".to_string();
}
if text.starts_with("# AGENTS.md instructions for ") {
return "<AGENTS_MD>".to_string();
}
@ -326,9 +322,7 @@ fn canonicalize_snapshot_text(text: &str) -> String {
}
fn is_capability_instruction_text(text: &str) -> bool {
text.starts_with(APPS_INSTRUCTIONS_OPEN_TAG)
|| text.starts_with(SKILLS_INSTRUCTIONS_OPEN_TAG)
|| text.starts_with(PLUGINS_INSTRUCTIONS_OPEN_TAG)
text.starts_with(APPS_INSTRUCTIONS_OPEN_TAG) || text.starts_with(SKILLS_INSTRUCTIONS_OPEN_TAG)
}
fn normalize_dynamic_snapshot_paths(text: &str) -> String {
@ -423,10 +417,6 @@ mod tests {
{
"type": "input_text",
"text": "<skills_instructions>\n## Skills\nbody\n</skills_instructions>"
},
{
"type": "input_text",
"text": "<plugins_instructions>\n## Plugins\nbody\n</plugins_instructions>"
}
]
})];
@ -438,7 +428,7 @@ mod tests {
assert_eq!(
rendered,
"00:message/developer[3]:\n [01] <APPS_INSTRUCTIONS>\n [02] <SKILLS_INSTRUCTIONS>\n [03] <PLUGINS_INSTRUCTIONS>"
"00:message/developer[2]:\n [01] <APPS_INSTRUCTIONS>\n [02] <SKILLS_INSTRUCTIONS>"
);
}
@ -449,8 +439,7 @@ mod tests {
"role": "developer",
"content": [
{ "type": "input_text", "text": "<permissions instructions>\n...</permissions instructions>" },
{ "type": "input_text", "text": "<skills_instructions>\n## Skills\n...</skills_instructions>" },
{ "type": "input_text", "text": "<plugins_instructions>\n## Plugins\n...</plugins_instructions>" }
{ "type": "input_text", "text": "<skills_instructions>\n## Skills\n...</skills_instructions>" }
]
})];

View file

@ -403,7 +403,7 @@ async fn search_tool_hides_apps_tools_without_search() -> Result<()> {
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn explicit_app_mentions_expose_apps_tools_without_search() -> Result<()> {
async fn explicit_mcp_mentions_expose_mcp_tools_without_search() -> Result<()> {
skip_if_no_network!(Ok(()));
let server = start_mock_server().await;
@ -422,7 +422,7 @@ async fn explicit_app_mentions_expose_apps_tools_without_search() -> Result<()>
let test = builder.build(&server).await?;
test.submit_turn_with_policies(
"Use [$calendar](app://calendar) and then call tools.",
"Use [$calendar](mcp://calendar) and then call tools.",
AskForApproval::Never,
SandboxPolicy::DangerFullAccess,
)
@ -437,11 +437,11 @@ async fn explicit_app_mentions_expose_apps_tools_without_search() -> Result<()>
SEARCH_CALENDAR_CREATE_TOOL
)
.is_some(),
"expected explicit app mention to expose create tool, got tools: {tools:?}"
"expected explicit MCP mention to expose create tool, got tools: {tools:?}"
);
assert!(
namespace_child_tool(&body, SEARCH_CALENDAR_NAMESPACE, SEARCH_CALENDAR_LIST_TOOL).is_some(),
"expected explicit app mention to expose list tool, got tools: {tools:?}"
"expected explicit MCP mention to expose list tool, got tools: {tools:?}"
);
Ok(())

View file

@ -95,7 +95,7 @@ Valid `personality` values are `friendly`, `pragmatic`, and `none`. When `none`
- `text` – Plain text plus optional UI text elements.
- `image` / `local_image` – Image inputs.
- `skill` – Explicit skill selection (`name`, `path` to `SKILL.md`).
- `mention` – Explicit app/connector selection (`name`, `path` in `app://{connector_id}` form).
- `mention` – Explicit MCP server selection (`name`, `path` in `mcp://{server_name}` form).
Note: For v1 wire compatibility, `EventMsg::TurnStarted` and `EventMsg::TurnComplete` serialize as `task_started` / `task_complete`. The deserializer accepts both `task_*` and `turn_*` tags.

View file

@ -148,8 +148,6 @@ pub enum Feature {
ToolSearchAlwaysDeferMcpTools,
/// Expose placeholder tools for unavailable historical tool calls.
UnavailableDummyTools,
/// Enable plugins.
Plugins,
/// Allow the in-app browser pane in desktop apps.
///
/// Requirements-only gate: this should be set from requirements, not user config.
@ -158,8 +156,6 @@ pub enum Feature {
///
/// Requirements-only gate: this should be set from requirements, not user config.
BrowserUse,
/// Temporary internal-only flag for PS-backed remote plugin catalog development.
RemotePlugin,
/// Show the startup prompt for migrating external agent config into Codex.
ExternalMigration,
/// Allow the model to invoke the built-in image generation tool.
@ -819,12 +815,6 @@ pub const FEATURES: &[FeatureSpec] = &[
stage: Stage::UnderDevelopment,
default_enabled: false,
},
FeatureSpec {
id: Feature::Plugins,
key: "plugins",
stage: Stage::Stable,
default_enabled: true,
},
FeatureSpec {
id: Feature::InAppBrowser,
key: "in_app_browser",
@ -837,12 +827,6 @@ pub const FEATURES: &[FeatureSpec] = &[
stage: Stage::Stable,
default_enabled: true,
},
FeatureSpec {
id: Feature::RemotePlugin,
key: "remote_plugin",
stage: Stage::UnderDevelopment,
default_enabled: false,
},
FeatureSpec {
id: Feature::ExternalMigration,
key: "external_migration",

View file

@ -257,7 +257,7 @@ fn multi_agent_is_stable_and_enabled_by_default() {
#[test]
fn from_sources_applies_base_profile_and_overrides() {
let mut base_entries = BTreeMap::new();
base_entries.insert("plugins".to_string(), true);
base_entries.insert("multi_agent_v2".to_string(), true);
let base_features = FeaturesToml {
entries: base_entries,
..Default::default()
@ -286,7 +286,7 @@ fn from_sources_applies_base_profile_and_overrides() {
},
);
assert_eq!(features.enabled(Feature::Plugins), true);
assert_eq!(features.enabled(Feature::MultiAgentV2), true);
assert_eq!(features.enabled(Feature::CodeModeOnly), true);
assert_eq!(features.enabled(Feature::CodeMode), true);
assert_eq!(features.enabled(Feature::ApplyPatchFreeform), true);

View file

@ -96,8 +96,6 @@ pub const APPS_INSTRUCTIONS_OPEN_TAG: &str = "<apps_instructions>";
pub const APPS_INSTRUCTIONS_CLOSE_TAG: &str = "</apps_instructions>";
pub const SKILLS_INSTRUCTIONS_OPEN_TAG: &str = "<skills_instructions>";
pub const SKILLS_INSTRUCTIONS_CLOSE_TAG: &str = "</skills_instructions>";
pub const PLUGINS_INSTRUCTIONS_OPEN_TAG: &str = "<plugins_instructions>";
pub const PLUGINS_INSTRUCTIONS_CLOSE_TAG: &str = "</plugins_instructions>";
pub const COLLABORATION_MODE_OPEN_TAG: &str = "<collaboration_mode>";
pub const COLLABORATION_MODE_CLOSE_TAG: &str = "</collaboration_mode>";
pub const EPIPHANY_STATE_OPEN_TAG: &str = "<epiphany_state>";

View file

@ -35,7 +35,7 @@ pub enum UserInput {
/// Explicit structured mention selected by the user.
///
/// `path` identifies the exact mention target, for example
/// `app://<connector-id>` or `plugin://<plugin-name>@<marketplace-name>`.
/// `mcp://<server-name>` or a path to `SKILL.md`.
Mention { name: String, path: String },
}

View file

@ -490,7 +490,7 @@ fn create_collab_input_items_schema() -> JsonSchema {
(
"path".to_string(),
JsonSchema::string(Some(
"Path when type is local_image/skill, or structured mention target such as app://<connector-id> or plugin://<plugin-name>@<marketplace-name> when type is mention."
"Path when type is local_image/skill, or structured mention target such as mcp://<server-name> when type is mention."
.to_string(),
)),
),
@ -501,7 +501,7 @@ fn create_collab_input_items_schema() -> JsonSchema {
]);
JsonSchema::array(JsonSchema::object(properties, /*required*/ None, Some(false.into())), Some(
"Structured input items. Use this to pass explicit mentions (for example app:// connector paths)."
"Structured input items. Use this to pass explicit mentions (for example mcp:// server paths)."
.to_string(),
))
}

View file

@ -1,17 +0,0 @@
---
source: tui/src/chatwidget/tests.rs
expression: popup
---
Plugins
Figma · Can be installed · ChatGPT Marketplace
Data shared with this app is subject to the app's terms of service and privacy policy. Learn
more.
Turn Figma files into implementation context.
› 1. Back to plugins Return to the plugin list.
2. Install plugin Install this plugin now.
Skills design-review, extract-copy
Apps Figma, Slack
MCP Servers figma-mcp, docs-mcp
Press esc to close.

View file

@ -1,15 +0,0 @@
---
source: tui/src/chatwidget/tests.rs
expression: popup
---
Plugins
Figma · Installed · ChatGPT Marketplace
Turn Figma files into implementation context.
› 1. Back to plugins Return to the plugin list.
2. Uninstall plugin Remove this plugin now.
Skills design-review, extract-copy
Apps Figma, Slack
MCP Servers figma-mcp, docs-mcp
Press esc to close.

View file

@ -1,17 +0,0 @@
---
source: tui/src/chatwidget/tests/popups_and_settings.rs
expression: popup
---
Plugins
Browse plugins from available marketplaces.
Installed 1 of 4 available plugins.
[All Plugins] Installed (1) OpenAI Curated Repo Marketplace
Type to search plugins
› [ ] Alpha Sync Disabled Space to enable; Enter view details.
[-] Bravo Search Available · ChatGPT Marketplace · Search docs and tickets.
[-] Hidden Repo Plugin Available · Repo Marketplace · Should not be shown in /plugins.
[-] Starter Available · ChatGPT Marketplace · Included by default.
space enable/disable · ←/→ select marketplace · enter view details · esc close

View file

@ -1,9 +0,0 @@
---
source: tui/src/chatwidget/tests.rs
expression: popup
---
Plugins
Loading available plugins...
This updates when the marketplace list is ready.
› Loading plugins... This updates when the marketplace list is ready.

View file

@ -1,14 +0,0 @@
---
source: tui/src/chatwidget/tests.rs
expression: popup
---
Plugins
Browse plugins from available marketplaces.
Installed 0 of 3 available plugins.
[All Plugins] Installed (0) OpenAI Curated
sla
› [-] Slack Available Press Enter to view plugin details.
space enable/disable · ←/→ select marketplace · enter view details · esc close

View file

@ -1080,7 +1080,7 @@ async fn submit_user_message_ignores_plugin_mentions_from_bindings() {
text_elements: Vec::new(),
mention_bindings: vec![MentionBinding {
mention: "sample".to_string(),
path: "plugin://sample@test".to_string(),
path: "skill://sample".to_string(),
}],
});

View file

@ -200,7 +200,6 @@ fn is_common_env_var(name: &str) -> bool {
fn is_tool_path(path: &str) -> bool {
path.starts_with("mcp://")
|| path.starts_with("plugin://")
|| path.starts_with("skill://")
|| path
.rsplit(['/', '\\'])
@ -216,7 +215,7 @@ mod tests {
#[test]
fn decode_history_mentions_restores_visible_tokens() {
let decoded = decode_history_mentions(
"Use [$repo](mcp://repo), [$sample](plugin://sample@test), and [$figma](/tmp/figma/SKILL.md).",
"Use [$repo](mcp://repo), [$sample](skill://sample), and [$figma](/tmp/figma/SKILL.md).",
);
assert_eq!(decoded.text, "Use $repo, $sample, and $figma.");
assert_eq!(
@ -228,7 +227,7 @@ mod tests {
},
LinkedMention {
mention: "sample".to_string(),
path: "plugin://sample@test".to_string(),
path: "skill://sample".to_string(),
},
LinkedMention {
mention: "figma".to_string(),
@ -258,7 +257,7 @@ mod tests {
},
LinkedMention {
mention: "sample".to_string(),
path: "plugin://sample@test".to_string(),
path: "skill://sample".to_string(),
},
LinkedMention {
mention: "figma".to_string(),
@ -268,7 +267,7 @@ mod tests {
);
assert_eq!(
encoded,
"[$figma](mcp://figma) then [$sample](plugin://sample@test) then [$figma](/tmp/figma/SKILL.md) then $other"
"[$figma](mcp://figma) then [$sample](skill://sample) then [$figma](/tmp/figma/SKILL.md) then $other"
);
}
}