conversation-session-composer-recent-mode.json 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-composer-recent-mode",
  4. "spec": "./test/e2e/conversation-session/conversation-session-composer-recent-mode.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "recent-mode-title",
  8. "description": "I74: 新任务继承最近提交权限的受控响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "隔离模型输出,验证真实 Composer 提交、新任务初始化及 Write 权限行为。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_COMPOSER_RECENT_MODE"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "text": {
  23. "id": "recent-mode-title",
  24. "text": "{\"title\":\"Recent permission E2E\"}",
  25. "inputTokens": 64,
  26. "outputTokens": 8
  27. }
  28. }
  29. },
  30. {
  31. "id": "recent-mode-seed",
  32. "description": "I74: 新任务继承最近提交权限的受控响应。",
  33. "metadata": {
  34. "kind": "main",
  35. "timingPolicy": "controlled-stream",
  36. "source": "synthetic",
  37. "syntheticReason": "隔离模型输出,验证真实 Composer 提交、新任务初始化及 Write 权限行为。"
  38. },
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_COMPOSER_RECENT_MODE_SEED"],
  43. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  44. },
  45. "response": {
  46. "statusCode": 200,
  47. "statusMessage": "OK",
  48. "headers": {
  49. "cache-control": "no-cache",
  50. "content-type": "text/event-stream; charset=utf-8"
  51. },
  52. "chunks": [
  53. {
  54. "offsetMs": 0,
  55. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"recent-mode-slow\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
  56. },
  57. {
  58. "offsetMs": 250,
  59. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  60. },
  61. {
  62. "offsetMs": 500,
  63. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"RECENT_MODE_STREAMING \"}}\n\n"
  64. },
  65. {
  66. "offsetMs": 45000,
  67. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  68. },
  69. {
  70. "offsetMs": 45100,
  71. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":80,\"output_tokens\":4,\"service_tier\":\"standard\"}}\n\n"
  72. },
  73. {
  74. "offsetMs": 45200,
  75. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  76. }
  77. ],
  78. "text": {
  79. "id": "recent-mode-slow",
  80. "inputTokens": 80,
  81. "outputTokens": 4,
  82. "text": "RECENT_MODE_STREAMING"
  83. }
  84. }
  85. },
  86. {
  87. "id": "recent-mode-write",
  88. "description": "I74: 新任务继承最近提交权限的受控响应。",
  89. "metadata": {
  90. "kind": "main",
  91. "timingPolicy": "fast-text",
  92. "source": "synthetic",
  93. "syntheticReason": "隔离模型输出,验证真实 Composer 提交、新任务初始化及 Write 权限行为。"
  94. },
  95. "match": {
  96. "method": "POST",
  97. "pathIncludes": "/messages",
  98. "lastUserMessageIncludes": ["E2E_COMPOSER_RECENT_MODE_WRITE"],
  99. "bodyExcludes": [
  100. "Generate a concise title",
  101. "CRITICAL: Respond with TEXT ONLY",
  102. "toolu_recent_mode_write"
  103. ]
  104. },
  105. "response": {
  106. "statusCode": 200,
  107. "toolUse": {
  108. "id": "toolu_recent_mode_write",
  109. "name": "Write",
  110. "input": {
  111. "file_path": "{{e2eRuntimeRoot}}/conversation-session-composer-recent-mode/result.txt",
  112. "content": "RECENT_MODE_WRITE_OK\n"
  113. }
  114. }
  115. }
  116. },
  117. {
  118. "id": "recent-mode-final",
  119. "description": "I74: 新任务继承最近提交权限的受控响应。",
  120. "metadata": {
  121. "kind": "main",
  122. "timingPolicy": "fast-text",
  123. "source": "synthetic",
  124. "syntheticReason": "隔离模型输出,验证真实 Composer 提交、新任务初始化及 Write 权限行为。"
  125. },
  126. "match": {
  127. "method": "POST",
  128. "pathIncludes": "/messages",
  129. "bodyIncludes": ["E2E_COMPOSER_RECENT_MODE_WRITE", "toolu_recent_mode_write"],
  130. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  131. },
  132. "response": {
  133. "statusCode": 200,
  134. "text": {
  135. "id": "recent-mode-final",
  136. "text": "RECENT_MODE_DONE",
  137. "inputTokens": 80,
  138. "outputTokens": 8
  139. }
  140. }
  141. }
  142. ]
  143. }