conversation-session-plugin-skill-live-catalog.json 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-plugin-skill-live-catalog",
  4. "spec": "./test/e2e/conversation-session/plugins/conversation-session-plugin-skill-live-catalog.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "skill-live-title",
  8. "description": "会话标题 sidecar。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题生成不属于 skill 目录语义;固定返回避免后台 title retry 干扰后续轮次。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_SKILL_LIVE_FIRST"]
  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\": \"skill-live-title\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"deepseek-v4-flash\", \"content\": [{\"type\": \"text\", \"text\": \"{\\\"title\\\": \\\"Skill live catalog\\\"}\"}], \"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": "skill-live-first-final",
  33. "description": "第 1 轮:列表首发,含插件 skill,不含新 skill。",
  34. "metadata": {
  35. "kind": "main",
  36. "timingPolicy": "fast-text",
  37. "source": "synthetic",
  38. "syntheticReason": "固定第 1 轮文本,断言只看请求里的列表。"
  39. },
  40. "match": {
  41. "method": "POST",
  42. "pathIncludes": "/messages",
  43. "lastUserMessageIncludes": ["E2E_SKILL_LIVE_FIRST"],
  44. "bodyIncludes": ["E2E_SKILL_LIVE_FIRST"],
  45. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  46. },
  47. "replay": {
  48. "consumeOnce": true
  49. },
  50. "response": {
  51. "statusCode": 200,
  52. "text": "skill-live-first-ok"
  53. }
  54. },
  55. {
  56. "id": "skill-live-second-tool",
  57. "description": "第 2 轮:调用刚写入的工作区 skill。",
  58. "metadata": {
  59. "kind": "main",
  60. "timingPolicy": "tool-use",
  61. "source": "synthetic",
  62. "syntheticReason": "固定 Skill tool_use,验证未命中时 flush 后能加载。"
  63. },
  64. "match": {
  65. "method": "POST",
  66. "pathIncludes": "/messages",
  67. "lastUserMessageIncludes": ["E2E_SKILL_LIVE_SECOND"],
  68. "bodyIncludes": ["E2E_SKILL_LIVE_SECOND"],
  69. "bodyExcludes": [
  70. "Generate a concise title",
  71. "CRITICAL: Respond with TEXT ONLY",
  72. "toolu_e2e_skill_live_load"
  73. ]
  74. },
  75. "replay": {
  76. "consumeOnce": true
  77. },
  78. "response": {
  79. "statusCode": 200,
  80. "toolUse": {
  81. "id": "toolu_e2e_skill_live_load",
  82. "name": "Skill",
  83. "input": {
  84. "skill": "e2e-live-skill"
  85. }
  86. }
  87. }
  88. },
  89. {
  90. "id": "skill-live-second-final",
  91. "description": "第 2 轮:Skill 结果之后完成。",
  92. "metadata": {
  93. "kind": "main",
  94. "timingPolicy": "fast-text",
  95. "source": "synthetic",
  96. "syntheticReason": "固定第 2 轮最终文本。"
  97. },
  98. "match": {
  99. "method": "POST",
  100. "pathIncludes": "/messages",
  101. "bodyIncludes": ["E2E_SKILL_LIVE_SECOND", "toolu_e2e_skill_live_load"],
  102. "bodyExcludes": [
  103. "Generate a concise title",
  104. "CRITICAL: Respond with TEXT ONLY",
  105. "E2E_SKILL_LIVE_THIRD"
  106. ]
  107. },
  108. "replay": {
  109. "consumeOnce": true
  110. },
  111. "response": {
  112. "statusCode": 200,
  113. "text": "skill-live-second-ok"
  114. }
  115. },
  116. {
  117. "id": "skill-live-third-tool",
  118. "description": "第 3 轮:调用已停用插件的 skill。",
  119. "metadata": {
  120. "kind": "main",
  121. "timingPolicy": "tool-use",
  122. "source": "synthetic",
  123. "syntheticReason": "固定 Skill tool_use,验证停用插件的 skill 返回 not found。"
  124. },
  125. "match": {
  126. "method": "POST",
  127. "pathIncludes": "/messages",
  128. "lastUserMessageIncludes": ["E2E_SKILL_LIVE_THIRD"],
  129. "bodyIncludes": ["E2E_SKILL_LIVE_THIRD"],
  130. "bodyExcludes": [
  131. "Generate a concise title",
  132. "CRITICAL: Respond with TEXT ONLY",
  133. "toolu_e2e_skill_live_plugin"
  134. ]
  135. },
  136. "replay": {
  137. "consumeOnce": true
  138. },
  139. "response": {
  140. "statusCode": 200,
  141. "toolUse": {
  142. "id": "toolu_e2e_skill_live_plugin",
  143. "name": "Skill",
  144. "input": {
  145. "skill": "e2e-plugin-mcp-ping:plugin-mcp-ping"
  146. }
  147. }
  148. }
  149. },
  150. {
  151. "id": "skill-live-third-final",
  152. "description": "第 3 轮:Skill 报错之后完成。",
  153. "metadata": {
  154. "kind": "main",
  155. "timingPolicy": "fast-text",
  156. "source": "synthetic",
  157. "syntheticReason": "固定第 3 轮最终文本。"
  158. },
  159. "match": {
  160. "method": "POST",
  161. "pathIncludes": "/messages",
  162. "bodyIncludes": ["E2E_SKILL_LIVE_THIRD", "toolu_e2e_skill_live_plugin"],
  163. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  164. },
  165. "replay": {
  166. "consumeOnce": true
  167. },
  168. "response": {
  169. "statusCode": 200,
  170. "text": "skill-live-third-ok"
  171. }
  172. }
  173. ]
  174. }