conversation-session-tool-history-order.json 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-tool-history-order",
  4. "spec": "./test/e2e/conversation-session/conversation-session-tool-history-order.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "d19-title",
  8. "description": "D19 工具历史顺序:d19-title。",
  9. "metadata": {
  10. "kind": "common",
  11. "source": "synthetic",
  12. "timingPolicy": "fast-text",
  13. "syntheticReason": "固定 Bash→Read 声明,比较 live 与 latest-user edit 后的 provider tool_use/tool_result 顺序和内容。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_TOOL_ORDER_SOURCE"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "text": {
  23. "id": "d19-title",
  24. "inputTokens": 64,
  25. "outputTokens": 8,
  26. "text": "{\"title\":\"Tool history order\"}"
  27. }
  28. }
  29. },
  30. {
  31. "id": "d19-tools",
  32. "description": "D19 工具历史顺序:d19-tools。",
  33. "metadata": {
  34. "kind": "main",
  35. "source": "synthetic",
  36. "timingPolicy": "tool-use",
  37. "syntheticReason": "固定 Bash→Read 声明,比较 live 与 latest-user edit 后的 provider tool_use/tool_result 顺序和内容。"
  38. },
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_TOOL_ORDER_SOURCE"],
  43. "bodyExcludes": [
  44. "Generate a concise title",
  45. "CRITICAL: Respond with TEXT ONLY",
  46. "toolu_d19_bash"
  47. ]
  48. },
  49. "response": {
  50. "statusCode": 200,
  51. "toolUses": [
  52. {
  53. "id": "toolu_d19_bash",
  54. "name": "Bash",
  55. "input": {
  56. "command": "node -e \"console.log(12345)\""
  57. }
  58. },
  59. {
  60. "id": "toolu_d19_read",
  61. "name": "Read",
  62. "input": {
  63. "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-history-order/read.txt"
  64. }
  65. }
  66. ]
  67. }
  68. },
  69. {
  70. "id": "d19-followup",
  71. "description": "D19 工具历史顺序:d19-followup。",
  72. "metadata": {
  73. "kind": "main",
  74. "source": "synthetic",
  75. "timingPolicy": "fast-text",
  76. "syntheticReason": "固定 Bash→Read 声明,比较 live 与 latest-user edit 后的 provider tool_use/tool_result 顺序和内容。"
  77. },
  78. "match": {
  79. "method": "POST",
  80. "pathIncludes": "/messages",
  81. "bodyIncludes": [
  82. "E2E_TOOL_ORDER_SOURCE",
  83. "tool_result",
  84. "toolu_d19_bash",
  85. "toolu_d19_read"
  86. ],
  87. "bodyExcludes": [
  88. "Generate a concise title",
  89. "CRITICAL: Respond with TEXT ONLY",
  90. "E2E_TOOL_ORDER_LATER",
  91. "E2E_TOOL_ORDER_EDITED"
  92. ]
  93. },
  94. "response": {
  95. "statusCode": 200,
  96. "text": {
  97. "id": "d19-followup",
  98. "inputTokens": 64,
  99. "outputTokens": 8,
  100. "text": "D19_SOURCE_DONE"
  101. }
  102. }
  103. },
  104. {
  105. "id": "d19-later",
  106. "description": "D19 工具历史顺序:d19-later。",
  107. "metadata": {
  108. "kind": "main",
  109. "source": "synthetic",
  110. "timingPolicy": "fast-text",
  111. "syntheticReason": "固定 Bash→Read 声明,比较 live 与 latest-user edit 后的 provider tool_use/tool_result 顺序和内容。"
  112. },
  113. "match": {
  114. "method": "POST",
  115. "pathIncludes": "/messages",
  116. "lastUserMessageIncludes": ["E2E_TOOL_ORDER_LATER"],
  117. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  118. },
  119. "response": {
  120. "statusCode": 200,
  121. "text": {
  122. "id": "d19-later",
  123. "inputTokens": 64,
  124. "outputTokens": 8,
  125. "text": "D19_LATER_DONE"
  126. }
  127. }
  128. },
  129. {
  130. "id": "d19-edited",
  131. "description": "D19 工具历史顺序:d19-edited。",
  132. "metadata": {
  133. "kind": "main",
  134. "source": "synthetic",
  135. "timingPolicy": "fast-text",
  136. "syntheticReason": "固定 Bash→Read 声明,比较 live 与 latest-user edit 后的 provider tool_use/tool_result 顺序和内容。"
  137. },
  138. "match": {
  139. "method": "POST",
  140. "pathIncludes": "/messages",
  141. "lastUserMessageIncludes": ["E2E_TOOL_ORDER_EDITED"],
  142. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  143. },
  144. "response": {
  145. "statusCode": 200,
  146. "text": {
  147. "id": "d19-edited",
  148. "inputTokens": 64,
  149. "outputTokens": 8,
  150. "text": "D19_EDITED_DONE"
  151. }
  152. }
  153. }
  154. ]
  155. }