conversation-session-plugin-resident-freeze-cold-resume.json 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-plugin-resident-freeze-cold-resume",
  4. "spec": "./test/e2e/conversation-session/plugins/conversation-session-plugin-resident-freeze-cold-resume.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "resident-enabled-title",
  8. "description": "WPL-008 resident S1 的标题 sidecar。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题生成不属于 Plugin 生命周期语义;固定返回避免后台 title retry 干扰 cold resume。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_WPL_008_RESIDENT_ENABLED"]
  19. },
  20. "replay": {
  21. "consumeOnce": true
  22. },
  23. "response": {
  24. "statusCode": 200,
  25. "headers": {
  26. "content-type": "application/json; charset=utf-8"
  27. },
  28. "body": "{\"id\":\"resident-enabled-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"WPL-008 resident enabled\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":64,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":8,\"service_tier\":\"standard\"}}"
  29. }
  30. },
  31. {
  32. "id": "new-session-disabled-title",
  33. "description": "WPL-008 新 Session S2 的标题 sidecar。",
  34. "metadata": {
  35. "kind": "common",
  36. "timingPolicy": "fast-text",
  37. "source": "synthetic",
  38. "syntheticReason": "标题生成不属于 Plugin 生命周期语义;固定返回避免后台 title retry 干扰 Desktop 重启。"
  39. },
  40. "match": {
  41. "method": "POST",
  42. "pathIncludes": "/messages",
  43. "bodyIncludes": ["Generate a concise title", "E2E_WPL_008_NEW_SESSION_DISABLED"]
  44. },
  45. "replay": {
  46. "consumeOnce": true
  47. },
  48. "response": {
  49. "statusCode": 200,
  50. "headers": {
  51. "content-type": "application/json; charset=utf-8"
  52. },
  53. "body": "{\"id\":\"new-session-disabled-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"WPL-008 new session disabled\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":64,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":8,\"service_tier\":\"standard\"}}"
  54. }
  55. },
  56. {
  57. "id": "resident-enabled-tool-call",
  58. "description": "WPL-008 resident S1 保持创建时 Plugin MCP tool。",
  59. "metadata": {
  60. "kind": "main",
  61. "timingPolicy": "tool-use",
  62. "source": "synthetic",
  63. "syntheticReason": "固定 resident tool_use,验证 App catalog 冻结。"
  64. },
  65. "match": {
  66. "method": "POST",
  67. "pathIncludes": "/messages",
  68. "lastUserMessageIncludes": ["E2E_WPL_008_RESIDENT_ENABLED"],
  69. "bodyIncludes": ["E2E_WPL_008_RESIDENT_ENABLED"],
  70. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  71. },
  72. "replay": {
  73. "consumeOnce": true
  74. },
  75. "response": {
  76. "statusCode": 200,
  77. "toolUse": {
  78. "id": "toolu_e2e_wpl_008_resident",
  79. "name": "mcp__plugin_e2e-plugin-mcp-ping_ping__ping",
  80. "input": {
  81. "message": "wpl-008-resident"
  82. }
  83. }
  84. }
  85. },
  86. {
  87. "id": "resident-enabled-final",
  88. "description": "WPL-008 resident S1 tool_result 后完成。",
  89. "metadata": {
  90. "kind": "main",
  91. "timingPolicy": "fast-text",
  92. "source": "synthetic",
  93. "syntheticReason": "固定 resident 最终响应。"
  94. },
  95. "match": {
  96. "method": "POST",
  97. "pathIncludes": "/messages",
  98. "bodyIncludes": ["E2E_WPL_008_RESIDENT_ENABLED", "toolu_e2e_wpl_008_resident"],
  99. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  100. },
  101. "replay": {
  102. "consumeOnce": true
  103. },
  104. "response": {
  105. "statusCode": 200,
  106. "text": "wpl-008-resident-ok"
  107. }
  108. },
  109. {
  110. "id": "new-session-disabled-final",
  111. "description": "WPL-008 新 Session S2 读取 Workspace disabled。",
  112. "metadata": {
  113. "kind": "main",
  114. "timingPolicy": "fast-text",
  115. "source": "synthetic",
  116. "syntheticReason": "固定新 Session 无 Plugin MCP tool 的最终响应。"
  117. },
  118. "match": {
  119. "method": "POST",
  120. "pathIncludes": "/messages",
  121. "bodyIncludes": ["E2E_WPL_008_NEW_SESSION_DISABLED"],
  122. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  123. },
  124. "replay": {
  125. "consumeOnce": true
  126. },
  127. "response": {
  128. "statusCode": 200,
  129. "text": "wpl-008-new-session-ok"
  130. }
  131. },
  132. {
  133. "id": "cold-resume-disabled-final",
  134. "description": "WPL-008 S1 cold resume 重建后读取 Workspace disabled。",
  135. "metadata": {
  136. "kind": "main",
  137. "timingPolicy": "fast-text",
  138. "source": "synthetic",
  139. "syntheticReason": "固定 cold resume 无 Plugin MCP tool 的最终响应。"
  140. },
  141. "match": {
  142. "method": "POST",
  143. "pathIncludes": "/messages",
  144. "bodyIncludes": ["E2E_WPL_008_COLD_RESUME_DISABLED"],
  145. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  146. },
  147. "response": {
  148. "statusCode": 200,
  149. "text": "wpl-008-cold-resume-ok"
  150. }
  151. }
  152. ]
  153. }