conversation-session-mcp-oauth-status-isolation.json 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-mcp-oauth-status-isolation",
  4. "spec": "./test/e2e/conversation-session/plugins/conversation-session-mcp-oauth-status-isolation.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "conversation-session-mcp-oauth-status-isolation-title-sidecar",
  8. "description": "本例标题旁路响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "source": "synthetic",
  12. "timingPolicy": "fast-text",
  13. "syntheticReason": "运行时证据显示标题旁路缺少响应;在本例显式登记固定标题,避免依赖 legacy fixture 或触发后台网络重试。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "statusMessage": "OK",
  23. "headers": {
  24. "content-type": "application/json; charset=utf-8"
  25. },
  26. "body": "{\"id\":\"upstream-e2e-title-fixture\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Upstream E2E Fixture\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":125,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":24,\"service_tier\":\"standard\"}}"
  27. }
  28. },
  29. {
  30. "id": "upstream-mcp-oauth-status-isolation-direct-call",
  31. "description": "OAuth 授权完成后先调用仍保持连接的用户级 stdio MCP ping 工具。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "稳定触发用户级 stdio MCP 的真实 tools/call,避免依赖模型自行选择工具。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_MCP_OAUTH_STATUS_ISOLATION"],
  43. "bodyIncludes": [
  44. "E2E_MCP_OAUTH_STATUS_ISOLATION",
  45. "mcp__everything__ping",
  46. "mcp__plain_http__ping"
  47. ],
  48. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  49. },
  50. "response": {
  51. "statusCode": 200,
  52. "toolUse": {
  53. "id": "toolu_e2e_mcp_oauth_status_isolation_direct",
  54. "name": "mcp__everything__ping",
  55. "input": {
  56. "marker": "E2E_MCP_OAUTH_STATUS_ISOLATION"
  57. }
  58. }
  59. }
  60. },
  61. {
  62. "id": "upstream-mcp-oauth-status-isolation-http-call",
  63. "description": "消费 stdio MCP tool_result 后调用普通无鉴权 HTTP MCP ping 工具。",
  64. "metadata": {
  65. "kind": "main",
  66. "timingPolicy": "fast-text",
  67. "source": "synthetic",
  68. "syntheticReason": "证明 OAuth status refresh 后 stdio MCP tool_result 能进入 provider continuation,并继续选择普通 HTTP MCP。"
  69. },
  70. "maxMatches": 1,
  71. "match": {
  72. "method": "POST",
  73. "pathIncludes": "/messages",
  74. "bodyIncludes": [
  75. "E2E_MCP_OAUTH_STATUS_ISOLATION",
  76. "toolu_e2e_mcp_oauth_status_isolation_direct",
  77. "E2E_MCP_DIRECT_PONG:E2E_MCP_OAUTH_STATUS_ISOLATION",
  78. "mcp__plain_http__ping"
  79. ],
  80. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  81. },
  82. "response": {
  83. "statusCode": 200,
  84. "toolUse": {
  85. "id": "toolu_e2e_mcp_oauth_status_isolation_http",
  86. "name": "mcp__plain_http__ping",
  87. "input": {
  88. "marker": "E2E_MCP_OAUTH_STATUS_ISOLATION"
  89. }
  90. }
  91. }
  92. },
  93. {
  94. "id": "upstream-mcp-oauth-status-isolation-final",
  95. "description": "消费 stdio 与普通 HTTP MCP 的真实 tool_result 并完成会话。",
  96. "metadata": {
  97. "kind": "main",
  98. "timingPolicy": "fast-text",
  99. "source": "synthetic",
  100. "syntheticReason": "证明两类用户 MCP 的 tool_result 都能进入 provider continuation。"
  101. },
  102. "maxMatches": 1,
  103. "match": {
  104. "method": "POST",
  105. "pathIncludes": "/messages",
  106. "bodyIncludes": [
  107. "E2E_MCP_OAUTH_STATUS_ISOLATION",
  108. "toolu_e2e_mcp_oauth_status_isolation_direct",
  109. "E2E_MCP_DIRECT_PONG:E2E_MCP_OAUTH_STATUS_ISOLATION",
  110. "toolu_e2e_mcp_oauth_status_isolation_http",
  111. "E2E_MCP_HTTP_PONG:E2E_MCP_OAUTH_STATUS_ISOLATION"
  112. ],
  113. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  114. },
  115. "response": {
  116. "statusCode": 200,
  117. "text": "upstream-e2e-ok"
  118. }
  119. }
  120. ]
  121. }