conversation-session-share-tool-presentation.json 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-share-tool-presentation",
  4. "spec": "./test/e2e/conversation-session/sharing/conversation-session-share-tool-presentation.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "share-tool-fetch-call",
  8. "metadata": {
  9. "kind": "main",
  10. "source": "synthetic",
  11. "timingPolicy": "tool-use",
  12. "syntheticReason": "固定触发 Fetch 与 Bash;Fetch 的私网目标在 IO 前失败,整个用例不访问真实网站。"
  13. },
  14. "match": {
  15. "method": "POST",
  16. "pathIncludes": "/messages",
  17. "lastUserMessageIncludes": ["E2E_SHARE_TOOL_PRESENTATION"],
  18. "bodyExcludes": [
  19. "toolu_share_fetch",
  20. "Generate a concise title",
  21. "CRITICAL: Respond with TEXT ONLY"
  22. ]
  23. },
  24. "response": {
  25. "statusCode": 200,
  26. "toolUses": [
  27. {
  28. "id": "toolu_share_fetch",
  29. "name": "WebFetch",
  30. "input": {
  31. "url": "http://example.localhost/paper",
  32. "prompt": "EXTRACTION_MUST_NOT_BE_VISIBLE"
  33. }
  34. },
  35. {
  36. "id": "toolu_share_bash",
  37. "name": "Bash",
  38. "input": {
  39. "command": "echo SHARE_TOOL_BASH"
  40. }
  41. }
  42. ]
  43. }
  44. },
  45. {
  46. "id": "share-tool-final",
  47. "metadata": {
  48. "kind": "main",
  49. "source": "synthetic",
  50. "timingPolicy": "fast-text",
  51. "syntheticReason": "工具结果回填后固定结束本轮,避免依赖真实模型。"
  52. },
  53. "match": {
  54. "method": "POST",
  55. "pathIncludes": "/messages",
  56. "bodyIncludes": ["E2E_SHARE_TOOL_PRESENTATION", "toolu_share_fetch"],
  57. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  58. },
  59. "response": {
  60. "statusCode": 200,
  61. "text": "SHARE_TOOLS_READY"
  62. }
  63. },
  64. {
  65. "id": "share-tool-title",
  66. "metadata": {
  67. "kind": "title",
  68. "source": "synthetic",
  69. "timingPolicy": "fast-text",
  70. "syntheticReason": "为独立 replay 用例提供固定标题。"
  71. },
  72. "match": {
  73. "method": "POST",
  74. "pathIncludes": "/messages",
  75. "bodyIncludes": ["Generate a concise title"]
  76. },
  77. "response": {
  78. "statusCode": 200,
  79. "headers": {
  80. "content-type": "application/json; charset=utf-8"
  81. },
  82. "body": "{\"id\":\"msg_upstream_e2e_text\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"Tool presentation\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":128,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":12,\"service_tier\":\"standard\"}}"
  83. }
  84. }
  85. ]
  86. }