composer-voice-input.json 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. {
  2. "version": 1,
  3. "caseName": "composer-voice-input",
  4. "spec": "./test/e2e/ui-shell/composer/composer-voice-input.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "composer-voice-input-blocked-title",
  8. "description": "VI-22 首发消息的标题旁路响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "source": "synthetic",
  12. "timingPolicy": "fast-text",
  13. "syntheticReason": "VI-22 首发会触发标题旁路;固定本例标题,避免依赖 legacy fixture 或触发后台重试。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_VOICE_BLOCKED"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "statusMessage": "OK",
  23. "headers": { "content-type": "application/json; charset=utf-8" },
  24. "body": "{\"id\":\"composer-voice-input-blocked-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Voice input blocked E2E\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":64,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":8,\"service_tier\":\"standard\"}}"
  25. }
  26. },
  27. {
  28. "id": "composer-voice-input-blocked-call",
  29. "description": "VI-22:延迟返回一个需要审批的 Bash 调用,让审批卡片在录音进行中出现。",
  30. "metadata": {
  31. "kind": "main",
  32. "source": "synthetic",
  33. "timingPolicy": "controlled-stream",
  34. "syntheticReason": "需要在录音进行中稳定弹出审批卡片:延迟 4 秒返回 Bash 工具调用,guarded 模式下递归删除会触发守卫审批;用例随后拒绝,命令不会执行。"
  35. },
  36. "match": {
  37. "method": "POST",
  38. "pathIncludes": "/messages",
  39. "bodyIncludes": ["E2E_VOICE_BLOCKED"],
  40. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  41. "lastUserMessageIncludes": ["E2E_VOICE_BLOCKED"]
  42. },
  43. "response": {
  44. "statusCode": 200,
  45. "delayMs": 4000,
  46. "toolUse": {
  47. "id": "toolu_E2E_VOICE_BLOCKED",
  48. "name": "Bash",
  49. "input": {
  50. "command": "rm -r .zcode-e2e/composer-voice-input/vi22-missing-target"
  51. }
  52. }
  53. }
  54. },
  55. {
  56. "id": "composer-voice-input-blocked-final",
  57. "description": "VI-22:拒绝审批后的收尾回复。",
  58. "metadata": {
  59. "kind": "main",
  60. "source": "synthetic",
  61. "timingPolicy": "fast-text",
  62. "syntheticReason": "拒绝审批后只需固定收尾文本,用来确认回合结束、输入框恢复显示。"
  63. },
  64. "match": {
  65. "method": "POST",
  66. "pathIncludes": "/messages",
  67. "bodyIncludes": ["E2E_VOICE_BLOCKED", "toolu_E2E_VOICE_BLOCKED"],
  68. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  69. },
  70. "response": {
  71. "statusCode": 200,
  72. "text": {
  73. "id": "composer-voice-input-blocked-final",
  74. "inputTokens": 80,
  75. "outputTokens": 8,
  76. "text": "E2E_VOICE_BLOCKED_DONE"
  77. }
  78. }
  79. }
  80. ]
  81. }