Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/agent/runtime-api-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ an alternate public import adapter.
Test canonical parser/catalog/schema consistency, generated follow-ups, Direct
and Gateway dispatch, App-only admission, OAuth/Project/permission boundaries,
file-provenance rejection and authenticated operational routes. Verify retired
routes and tool names fail closed in every build configuration, except for the
[named direct MCP Host-import adapter](../compatibility-policy.md#named-cached-chatgpt-file-import-descriptor).
Keep its canonical admission and trust parity covered. Test description
routes and tool names fail closed in every build configuration. The named direct
MCP exceptions in the [compatibility policy](../compatibility-policy.md) must
retain canonical admission and trust checks. Test description
and serialized schema budgets against the maintained MCP surface, not a retired
300-character/30-operation importer limit.
1 change: 1 addition & 0 deletions docs/compatibility-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ The following code is retained for concrete consumers:
| Update metadata absence and unsupported-format handling | A release or development build without verified installer metadata must not be treated as a safe automatic installation candidate. |
| Retired-config rejection and sensitive-path exclusions | Reject retired authority/registry settings before use; do not silently select a different default. Old secret/config paths stay protected even when discovery is retired. |
| Direct MCP `import_conversation_files_to_project` calls | Active ChatGPT conversations retain this Host file descriptor after refresh. Resolve its unchanged wire contract to `import_host_files` only at the MCP adapter boundary; see below. |
| Direct MCP `runtime_status` calls | The older ChatGPT `webcodex` connector retains this name. Resolve it to the read-only `get_runtime_status` before canonical MCP admission, with the same inputs. Current discovery and gateway targets use the canonical name. |
| MCP dated revisions and Runner/management protocol checks | These serve external Hosts and independently upgraded components. Their lifecycle follows observed protocol consumers, not the v0.5 package number. |
| `ActionAudit`, `ActionSession`, `ActionEvent` | Current tool audit and history infrastructure. The removed GPT Actions HTTP adapter does not make this domain obsolete. |

Expand Down
6 changes: 3 additions & 3 deletions src/mcp/tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,12 @@ pub(super) struct McpToolCallParams {
pub(super) arguments: Value,
}

/// ChatGPT sessions can retain the pre-rename Host file descriptor even after
/// tools/list refresh. Its argument and fileParams contracts are identical.
/// Resolve only that direct MCP spelling; never registry names or gateway targets.
/// ChatGPT can retain these pre-rename direct descriptors with the same inputs.
/// Resolve only direct MCP calls, before the canonical tool's admission checks.
fn canonical_direct_tool_name(name: &str) -> &str {
match name {
"import_conversation_files_to_project" => "import_host_files",
"runtime_status" => "get_runtime_status",
_ => name,
}
}
Expand Down
22 changes: 19 additions & 3 deletions src/mcp_tests/runtime_tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,18 @@ async fn adaptive_mcp_work_on_project_recovery_is_immediately_gateway_callable()
#[tokio::test]
async fn mcp_runtime_status_defaults_sparse_preserves_explicit_full_and_gateway_parity() {
let runtime = test_runtime();
for gateway in [false, true] {
assert!(
!crate::mcp::tools::adaptive_runtime_gateway_target_admitted_for_test(
"runtime_status",
true
)
);
for (name, gateway, stateless) in [
("get_runtime_status", false, false),
("runtime_status", false, false),
("runtime_status", false, true),
("get_runtime_status", true, false),
] {
for (arguments, sparse) in [
(json!({}), true),
(Value::Null, true),
Expand All @@ -415,9 +426,14 @@ async fn mcp_runtime_status_defaults_sparse_preserves_explicit_full_and_gateway_
(json!({"compact": false, "summary_only": true}), true),
] {
let params = if gateway {
adaptive_runtime_gateway_params("get_runtime_status", arguments)
adaptive_runtime_gateway_params(name, arguments)
} else {
json!({"name": name, "arguments": arguments})
};
let params = if stateless {
mcp_2026_params(params)
} else {
json!({"name": "get_runtime_status", "arguments": arguments})
params
};
let McpOutcome::Ok(value) =
handle_mcp_request(&runtime, rpc("tools/call", Some(json!(1)), params), None).await
Expand Down
1 change: 0 additions & 1 deletion src/mcp_tests/tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ async fn mcp_route_recovery_rejects_unavailable_tools_without_gateway_retry() {
for stateless in [false, true] {
for name in [
"tool_manifest",
"runtime_status",
"unknown_tool_name",
"get_work_result_state",
] {
Expand Down
Loading