conversation-session-subagent-parallel-projection.json 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-subagent-parallel-projection",
  4. "spec": "./test/e2e/conversation-session/conversation-session-subagent-parallel-projection.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "subagent-parallel-projection-parent-launch",
  8. "description": "父模型在同一回复中并行启动 7 个 foreground Agent。",
  9. "metadata": {
  10. "kind": "main",
  11. "timingPolicy": "fast-tool-use",
  12. "source": "synthetic",
  13. "syntheticReason": "固定产生 7 个并行 Agent tool calls,稳定覆盖 child persist 与父投影发布的竞态窗口。"
  14. },
  15. "maxMatches": 1,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "lastUserMessageIncludes": ["E2E_SUBAGENT_PARALLEL_PROJECTION_PARENT"],
  20. "bodyIncludes": [
  21. "E2E_SUBAGENT_PARALLEL_PROJECTION_PARENT",
  22. "E2E_SUBAGENT_PARALLEL_PROJECTION_PARENT_DONE"
  23. ],
  24. "bodyExcludes": [
  25. "Generate a concise title",
  26. "CRITICAL: Respond with TEXT ONLY"
  27. ]
  28. },
  29. "response": {
  30. "statusCode": 200,
  31. "toolUses": [
  32. {
  33. "id": "toolu_e2e_parallel_subagent_01",
  34. "name": "Agent",
  35. "input": {
  36. "description": "E2E parallel child 01",
  37. "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_01: wait for the controlled response and return it.",
  38. "subagent_type": "general-purpose"
  39. }
  40. },
  41. {
  42. "id": "toolu_e2e_parallel_subagent_02",
  43. "name": "Agent",
  44. "input": {
  45. "description": "E2E parallel child 02",
  46. "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_02: wait for the controlled response and return it.",
  47. "subagent_type": "general-purpose"
  48. }
  49. },
  50. {
  51. "id": "toolu_e2e_parallel_subagent_03",
  52. "name": "Agent",
  53. "input": {
  54. "description": "E2E parallel child 03",
  55. "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_03: wait for the controlled response and return it.",
  56. "subagent_type": "general-purpose"
  57. }
  58. },
  59. {
  60. "id": "toolu_e2e_parallel_subagent_04",
  61. "name": "Agent",
  62. "input": {
  63. "description": "E2E parallel child 04",
  64. "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_04: wait for the controlled response and return it.",
  65. "subagent_type": "general-purpose"
  66. }
  67. },
  68. {
  69. "id": "toolu_e2e_parallel_subagent_05",
  70. "name": "Agent",
  71. "input": {
  72. "description": "E2E parallel child 05",
  73. "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_05: wait for the controlled response and return it.",
  74. "subagent_type": "general-purpose"
  75. }
  76. },
  77. {
  78. "id": "toolu_e2e_parallel_subagent_06",
  79. "name": "Agent",
  80. "input": {
  81. "description": "E2E parallel child 06",
  82. "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_06: wait for the controlled response and return it.",
  83. "subagent_type": "general-purpose"
  84. }
  85. },
  86. {
  87. "id": "toolu_e2e_parallel_subagent_07",
  88. "name": "Agent",
  89. "input": {
  90. "description": "E2E parallel child 07",
  91. "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_07: wait for the controlled response and return it.",
  92. "subagent_type": "general-purpose"
  93. }
  94. }
  95. ]
  96. }
  97. },
  98. {
  99. "id": "subagent-parallel-projection-child-controlled-window",
  100. "description": "7 个 child 的模型请求保持同一个可观察 running 窗口。",
  101. "metadata": {
  102. "kind": "subagent",
  103. "timingPolicy": "controlled-stream",
  104. "source": "synthetic",
  105. "syntheticReason": "真实模型完成速度不可控;固定延迟让 E2E 能在 child 全部 running 时断言并切换任务。"
  106. },
  107. "maxMatches": 7,
  108. "match": {
  109. "method": "POST",
  110. "pathIncludes": "/messages",
  111. "lastUserMessageIncludes": ["E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_"],
  112. "bodyExcludes": [
  113. "Generate a concise title",
  114. "CRITICAL: Respond with TEXT ONLY"
  115. ]
  116. },
  117. "response": {
  118. "statusCode": 200,
  119. "delayMs": 15000,
  120. "text": {
  121. "id": "upstream-e2e-subagent-parallel-projection-child-done",
  122. "text": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_DONE"
  123. }
  124. }
  125. },
  126. {
  127. "id": "subagent-parallel-projection-parent-final",
  128. "description": "父模型收到全部 7 个 child 结果后结束。",
  129. "metadata": {
  130. "kind": "main",
  131. "timingPolicy": "fast-text",
  132. "source": "synthetic",
  133. "syntheticReason": "固定父 continuation 收口,证明 7 个真实 child 都已完成且 parent 可恢复 idle。"
  134. },
  135. "maxMatches": 1,
  136. "match": {
  137. "method": "POST",
  138. "pathIncludes": "/messages",
  139. "bodyIncludes": [
  140. "E2E_SUBAGENT_PARALLEL_PROJECTION_PARENT",
  141. "toolu_e2e_parallel_subagent_01",
  142. "toolu_e2e_parallel_subagent_02",
  143. "toolu_e2e_parallel_subagent_03",
  144. "toolu_e2e_parallel_subagent_04",
  145. "toolu_e2e_parallel_subagent_05",
  146. "toolu_e2e_parallel_subagent_06",
  147. "toolu_e2e_parallel_subagent_07",
  148. "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_DONE"
  149. ],
  150. "bodyExcludes": [
  151. "Generate a concise title",
  152. "CRITICAL: Respond with TEXT ONLY"
  153. ]
  154. },
  155. "response": {
  156. "statusCode": 200,
  157. "text": {
  158. "id": "upstream-e2e-subagent-parallel-projection-parent-done",
  159. "text": "E2E_SUBAGENT_PARALLEL_PROJECTION_PARENT_DONE"
  160. }
  161. }
  162. }
  163. ]
  164. }