conversation-session-plan-approval-feedback-user-message.json 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-plan-approval-feedback-user-message",
  4. "spec": "./test/e2e/conversation-session/conversation-session-plan-approval-feedback-user-message.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "upstream-conversation-plan-approval-enter-plan-call",
  8. "description": "首轮请求稳定返回 EnterPlanMode 工具调用,制造 plan mode 审批前置状态。",
  9. "metadata": {
  10. "kind": "main",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "需要稳定制造 plan mode 状态,避免依赖真实模型是否选择 EnterPlanMode。"
  14. },
  15. "maxMatches": 1,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "lastUserMessageIncludes": [
  20. "E2E_PLAN_APPROVAL_FEEDBACK_USER_MESSAGE"
  21. ],
  22. "bodyIncludes": [
  23. "E2E_PLAN_APPROVAL_FEEDBACK_USER_MESSAGE",
  24. "E2E_PLAN_APPROVAL_ENTER_PLAN",
  25. "E2E_PLAN_APPROVAL_EXIT_PLAN"
  26. ],
  27. "bodyExcludes": [
  28. "Generate a concise title",
  29. "CRITICAL: Respond with TEXT ONLY"
  30. ]
  31. },
  32. "response": {
  33. "statusCode": 200,
  34. "toolUse": {
  35. "id": "toolu_e2e_plan_approval_enter_plan_mode",
  36. "name": "EnterPlanMode",
  37. "input": {}
  38. }
  39. }
  40. },
  41. {
  42. "id": "upstream-conversation-plan-approval-exit-plan-call",
  43. "description": "进入 plan mode 后返回 ExitPlanMode 工具调用,触发审批弹窗。",
  44. "metadata": {
  45. "kind": "main",
  46. "timingPolicy": "fast-text",
  47. "source": "synthetic",
  48. "syntheticReason": "需要稳定触发 ExitPlanMode 审批弹窗,避免模型输出文本而跳过工具。"
  49. },
  50. "maxMatches": 1,
  51. "match": {
  52. "method": "POST",
  53. "pathIncludes": "/messages",
  54. "bodyIncludes": [
  55. "E2E_PLAN_APPROVAL_EXIT_PLAN",
  56. "toolu_e2e_plan_approval_enter_plan_mode"
  57. ],
  58. "bodyExcludes": [
  59. "Generate a concise title",
  60. "CRITICAL: Respond with TEXT ONLY"
  61. ]
  62. },
  63. "response": {
  64. "statusCode": 200,
  65. "toolUse": {
  66. "id": "toolu_e2e_plan_approval_exit_plan_mode",
  67. "name": "ExitPlanMode",
  68. "input": {
  69. "plan": "E2E_PLAN_APPROVAL_PLAN_BODY: 1. Add runtime bridge. 2. Add UI regression coverage."
  70. }
  71. }
  72. }
  73. },
  74. {
  75. "id": "upstream-conversation-plan-approval-feedback-final",
  76. "description": "审批 custom feedback 被续作用户消息后返回最终文本。",
  77. "metadata": {
  78. "kind": "main",
  79. "timingPolicy": "fast-text",
  80. "source": "synthetic",
  81. "syntheticReason": "需要断言 custom feedback 出现在下一轮用户消息,而不是被塞回 ExitPlanMode tool_result。"
  82. },
  83. "maxMatches": 1,
  84. "match": {
  85. "method": "POST",
  86. "pathIncludes": "/messages",
  87. "lastUserMessageIncludes": [
  88. "E2E_PLAN_APPROVAL_FEEDBACK"
  89. ],
  90. "bodyIncludes": [
  91. "E2E_PLAN_APPROVAL_FEEDBACK",
  92. "E2E_PLAN_APPROVAL_EXIT_PLAN",
  93. "toolu_e2e_plan_approval_exit_plan_mode",
  94. "The plan was not approved by the user."
  95. ],
  96. "bodyExcludes": [
  97. "Generate a concise title",
  98. "CRITICAL: Respond with TEXT ONLY"
  99. ]
  100. },
  101. "response": {
  102. "statusCode": 200,
  103. "text": "upstream-e2e-ok"
  104. }
  105. }
  106. ]
  107. }