conversation-session-plugin-mcp-skill-workspace-root.json 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-plugin-mcp-skill-workspace-root",
  4. "spec": "./test/e2e/conversation-session/plugins/conversation-session-plugin-mcp-skill-workspace-root.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "conversation-session-plugin-mcp-skill-workspace-root-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": "workspace-root-blocked",
  31. "description": "项目目录插件待信任时被强制停用,普通对话仍可完成。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "固定文本响应,验证待信任时模型请求没有工作区目录插件的 MCP 工具。"
  37. },
  38. "match": {
  39. "method": "POST",
  40. "pathIncludes": "/messages",
  41. "lastUserMessageIncludes": ["E2E_PLUGIN_MCP_PING_WORKSPACE_ROOT"],
  42. "bodyIncludes": ["E2E_PLUGIN_MCP_PING_WORKSPACE_ROOT"],
  43. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  44. },
  45. "response": {
  46. "statusCode": 200,
  47. "text": "upstream-e2e-ok"
  48. }
  49. },
  50. {
  51. "id": "workspace-root-trusted-tool-call",
  52. "description": "用户在设置页信任项目目录插件后,新会话调用其 namespaced MCP tool。",
  53. "metadata": {
  54. "kind": "main",
  55. "timingPolicy": "tool-use",
  56. "source": "synthetic",
  57. "syntheticReason": "固定 tool_use,证明信任后新会话加载项目目录插件的 MCP。"
  58. },
  59. "match": {
  60. "method": "POST",
  61. "pathIncludes": "/messages",
  62. "lastUserMessageIncludes": ["E2E_PLUGIN_MCP_PING_WORKSPACE_TRUSTED"],
  63. "bodyIncludes": ["E2E_PLUGIN_MCP_PING_WORKSPACE_TRUSTED"],
  64. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  65. },
  66. "replay": {
  67. "consumeOnce": true
  68. },
  69. "response": {
  70. "statusCode": 200,
  71. "toolUse": {
  72. "id": "toolu_e2e_plugin_mcp_ping_workspace_trusted",
  73. "name": "mcp__plugin_e2e-plugin-mcp-ping_ping__ping",
  74. "input": {
  75. "message": "ping-workspace-trusted"
  76. }
  77. }
  78. }
  79. },
  80. {
  81. "id": "workspace-root-trusted-final",
  82. "description": "信任后项目目录插件 MCP tool_result 之后的最终响应。",
  83. "metadata": {
  84. "kind": "main",
  85. "timingPolicy": "fast-text",
  86. "source": "synthetic",
  87. "syntheticReason": "固定最终文本,闭合信任后的 project root runtime。"
  88. },
  89. "match": {
  90. "method": "POST",
  91. "pathIncludes": "/messages",
  92. "bodyIncludes": [
  93. "E2E_PLUGIN_MCP_PING_WORKSPACE_TRUSTED",
  94. "toolu_e2e_plugin_mcp_ping_workspace_trusted"
  95. ],
  96. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  97. },
  98. "response": {
  99. "statusCode": 200,
  100. "text": "upstream-e2e-ok"
  101. }
  102. }
  103. ]
  104. }