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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-bot-topic-worker",
  4. "spec": "./test/e2e/conversation-session/session-control/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": ["E2E_BOT_TOPIC_SLOW"],
  18. "bodyExcludes": [
  19. "Generate a concise title",
  20. "CRITICAL: Respond with TEXT ONLY",
  21. "E2E_BOT_TOPIC_NEXT"
  22. ]
  23. },
  24. "response": {
  25. "statusCode": 200,
  26. "headers": {
  27. "content-type": "text/event-stream"
  28. },
  29. "chunks": [
  30. {
  31. "offsetMs": 0,
  32. "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"
  33. },
  34. {
  35. "offsetMs": 90000,
  36. "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"
  37. }
  38. ]
  39. }
  40. },
  41. {
  42. "id": "topic-next",
  43. "metadata": {
  44. "kind": "main",
  45. "timingPolicy": "fast-text",
  46. "source": "synthetic",
  47. "syntheticReason": "隔离平台 HTTP,通过真实 CLI 证明停止续接与历史附件工具回查。"
  48. },
  49. "match": {
  50. "method": "POST",
  51. "pathIncludes": "/messages",
  52. "lastUserMessageIncludes": ["E2E_BOT_TOPIC_NEXT"],
  53. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  54. },
  55. "response": {
  56. "statusCode": 200,
  57. "text": {
  58. "text": "E2E_TOPIC_NEXT_DONE"
  59. }
  60. }
  61. },
  62. {
  63. "id": "topic-resource-tool",
  64. "metadata": {
  65. "kind": "main",
  66. "timingPolicy": "fast-text",
  67. "source": "synthetic",
  68. "syntheticReason": "隔离平台 HTTP,通过真实 CLI 证明停止续接与历史附件工具回查。"
  69. },
  70. "match": {
  71. "method": "POST",
  72. "pathIncludes": "/messages",
  73. "lastUserMessageIncludes": ["E2E_BOT_TOPIC_RESOURCE"],
  74. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  75. },
  76. "response": {
  77. "statusCode": 200,
  78. "toolUse": {
  79. "id": "call_resource",
  80. "name": "ReadTopicResource",
  81. "input": {
  82. "messageId": "om_archive",
  83. "index": 0
  84. }
  85. }
  86. },
  87. "maxMatches": 1
  88. },
  89. {
  90. "id": "topic-resource-final",
  91. "metadata": {
  92. "kind": "main",
  93. "timingPolicy": "fast-text",
  94. "source": "synthetic",
  95. "syntheticReason": "隔离平台 HTTP,通过真实 CLI 证明停止续接与历史附件工具回查。"
  96. },
  97. "match": {
  98. "method": "POST",
  99. "pathIncludes": "/messages",
  100. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  101. "bodyIncludes": ["E2E_BOT_TOPIC_RESOURCE"]
  102. },
  103. "response": {
  104. "statusCode": 200,
  105. "text": {
  106. "text": "E2E_RESOURCE_DONE"
  107. }
  108. }
  109. }
  110. ]
  111. }