conversation-session-plan-directory-order.json 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-plan-directory-order",
  4. "spec": "./test/e2e/conversation-session/planning/conversation-session-plan-directory-order.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "plan-directory-title",
  8. "description": "Upstream e2e title generation 的固定辅助响应,避免标题生成请求误命中业务 case fixture。",
  9. "match": {
  10. "method": "POST",
  11. "pathIncludes": "/messages",
  12. "bodyIncludes": ["Generate a concise title", "E2E_PLAN_DIRECTORY_ORDER"]
  13. },
  14. "response": {
  15. "statusCode": 200,
  16. "statusMessage": "OK",
  17. "headers": {
  18. "content-type": "application/json; charset=utf-8"
  19. },
  20. "body": "{\"id\":\"upstream-e2e-title-fixture\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Upstream E2E Fixture\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":125,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":24,\"service_tier\":\"standard\"}}"
  21. },
  22. "metadata": {
  23. "kind": "common",
  24. "timingPolicy": "fast-text",
  25. "source": "synthetic",
  26. "syntheticReason": "固定标题响应,计划审批和原始工具顺序仍走真实执行链路。"
  27. }
  28. },
  29. {
  30. "id": "upstream-plan-directory-enter-plan-call",
  31. "description": "首轮请求稳定返回 EnterPlanMode 工具调用,制造 plan mode 审批前置状态。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "需要稳定制造 plan mode 状态,避免依赖真实模型是否选择 EnterPlanMode。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_PLAN_DIRECTORY_ORDER"],
  43. "bodyIncludes": [
  44. "E2E_PLAN_DIRECTORY_ORDER",
  45. "E2E_PLAN_DIRECTORY_ENTER",
  46. "E2E_PLAN_DIRECTORY_EXIT"
  47. ],
  48. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  49. },
  50. "response": {
  51. "statusCode": 200,
  52. "toolUse": {
  53. "id": "toolu_e2e_plan_directory_enter_plan_mode",
  54. "name": "EnterPlanMode",
  55. "input": {}
  56. }
  57. }
  58. },
  59. {
  60. "id": "upstream-plan-directory-exit-plan-call",
  61. "description": "进入 plan mode 后返回 ExitPlanMode 工具调用,触发审批弹窗并携带唯一 plan marker。",
  62. "metadata": {
  63. "kind": "main",
  64. "timingPolicy": "fast-text",
  65. "source": "synthetic",
  66. "syntheticReason": "需要稳定触发 ExitPlanMode 审批弹窗,并让已批准 plan 内容可在文件和 compact 后请求中被追踪。"
  67. },
  68. "maxMatches": 1,
  69. "match": {
  70. "method": "POST",
  71. "pathIncludes": "/messages",
  72. "bodyIncludes": ["E2E_PLAN_DIRECTORY_EXIT", "toolu_e2e_plan_directory_enter_plan_mode"],
  73. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  74. },
  75. "response": {
  76. "statusCode": 200,
  77. "toolUse": {
  78. "id": "toolu_e2e_plan_directory_exit_plan_mode",
  79. "name": "ExitPlanMode",
  80. "input": {
  81. "plan": "# E2E_PLAN_DIRECTORY_TITLE\n\n1. Inspect the workspace.\n2. Report the result."
  82. }
  83. }
  84. }
  85. },
  86. {
  87. "id": "upstream-plan-directory-approval-final",
  88. "description": "用户批准 plan 后返回固定文本,让审批轮进入 completed。",
  89. "metadata": {
  90. "kind": "main",
  91. "timingPolicy": "fast-text",
  92. "source": "synthetic",
  93. "syntheticReason": "审批通过后的回复内容不是本 case 核心,只需要稳定结束当前轮并保留 provider-visible approved plan。"
  94. },
  95. "maxMatches": 1,
  96. "match": {
  97. "method": "POST",
  98. "pathIncludes": "/messages",
  99. "bodyIncludes": [
  100. "toolu_e2e_plan_directory_exit_plan_mode",
  101. "User has approved your plan",
  102. "E2E_PLAN_DIRECTORY_TITLE"
  103. ],
  104. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  105. },
  106. "response": {
  107. "statusCode": 200,
  108. "text": {
  109. "id": "upstream-e2e-plan-directory-approval-final",
  110. "inputTokens": 192,
  111. "outputTokens": 12,
  112. "text": "E2E_PLAN_DIRECTORY_CONTINUATION"
  113. }
  114. }
  115. }
  116. ]
  117. }