conversation-session-bot-topic-worker.json 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-bot-topic-worker",
  4. "spec": "./test/e2e/conversation-session/conversation-session-bot-topic-worker.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "topic-slow",
  8. "metadata": {
  9. "kind": "main",
  10. "timingPolicy": "controlled-stream",
  11. "source": "synthetic",
  12. "syntheticReason": "隔离平台 HTTP,通过真实 CLI 证明停止续接与历史附件工具回查。"
  13. },
  14. "match": {
  15. "method": "POST",
  16. "pathIncludes": "/messages",
  17. "lastUserMessageIncludes": [
  18. "E2E_BOT_TOPIC_SLOW"
  19. ],
  20. "bodyExcludes": [
  21. "Generate a concise title",
  22. "CRITICAL: Respond with TEXT ONLY",
  23. "E2E_BOT_TOPIC_NEXT"
  24. ]
  25. },
  26. "response": {
  27. "statusCode": 200,
  28. "headers": {
  29. "content-type": "text/event-stream"
  30. },
  31. "chunks": [
  32. {
  33. "offsetMs": 0,
  34. "text": "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"slow\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"e2e-bot-model\", \"content\": [], \"usage\": {\"input_tokens\": 20, \"output_tokens\": 0}}}\n\nevent: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}\n\nevent: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"E2E_TOPIC_RUNNING\"}}\n\n"
  35. },
  36. {
  37. "offsetMs": 90000,
  38. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \" E2E_TOPIC_OLD_FINAL\"}}\n\nevent: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}\n\nevent: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\", \"stop_sequence\": null}, \"usage\": {\"output_tokens\": 10}}\n\nevent: message_stop\ndata: {\"type\": \"message_stop\"}\n\n"
  39. }
  40. ]
  41. }
  42. },
  43. {
  44. "id": "topic-next",
  45. "metadata": {
  46. "kind": "main",
  47. "timingPolicy": "fast-text",
  48. "source": "synthetic",
  49. "syntheticReason": "隔离平台 HTTP,通过真实 CLI 证明停止续接与历史附件工具回查。"
  50. },
  51. "match": {
  52. "method": "POST",
  53. "pathIncludes": "/messages",
  54. "lastUserMessageIncludes": [
  55. "E2E_BOT_TOPIC_NEXT"
  56. ],
  57. "bodyExcludes": [
  58. "Generate a concise title",
  59. "CRITICAL: Respond with TEXT ONLY"
  60. ]
  61. },
  62. "response": {
  63. "statusCode": 200,
  64. "text": {
  65. "text": "E2E_TOPIC_NEXT_DONE"
  66. }
  67. }
  68. },
  69. {
  70. "id": "topic-resource-tool",
  71. "metadata": {
  72. "kind": "main",
  73. "timingPolicy": "fast-text",
  74. "source": "synthetic",
  75. "syntheticReason": "隔离平台 HTTP,通过真实 CLI 证明停止续接与历史附件工具回查。"
  76. },
  77. "match": {
  78. "method": "POST",
  79. "pathIncludes": "/messages",
  80. "lastUserMessageIncludes": [
  81. "E2E_BOT_TOPIC_RESOURCE"
  82. ],
  83. "bodyExcludes": [
  84. "Generate a concise title",
  85. "CRITICAL: Respond with TEXT ONLY"
  86. ]
  87. },
  88. "response": {
  89. "statusCode": 200,
  90. "toolUse": {
  91. "id": "call_resource",
  92. "name": "ReadSessionContext",
  93. "input": {
  94. "strategy": "topic",
  95. "query": "read archived file",
  96. "attachment": {
  97. "messageId": "om_archive",
  98. "index": 0
  99. }
  100. }
  101. }
  102. },
  103. "maxMatches": 1
  104. },
  105. {
  106. "id": "topic-resource-final",
  107. "metadata": {
  108. "kind": "main",
  109. "timingPolicy": "fast-text",
  110. "source": "synthetic",
  111. "syntheticReason": "隔离平台 HTTP,通过真实 CLI 证明停止续接与历史附件工具回查。"
  112. },
  113. "match": {
  114. "method": "POST",
  115. "pathIncludes": "/messages",
  116. "bodyExcludes": [
  117. "Generate a concise title",
  118. "CRITICAL: Respond with TEXT ONLY"
  119. ],
  120. "bodyIncludes": [
  121. "E2E_BOT_TOPIC_RESOURCE"
  122. ]
  123. },
  124. "response": {
  125. "statusCode": 200,
  126. "text": {
  127. "text": "E2E_RESOURCE_DONE"
  128. }
  129. }
  130. }
  131. ]
  132. }