conversation-session-subagent-team-scope.json 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-subagent-team-scope",
  4. "spec": "./test/e2e/conversation-session/subagents/conversation-session-subagent-team-scope.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "conversation-session-subagent-team-scope-title-sidecar",
  8. "description": "本例标题旁路响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "source": "synthetic",
  12. "timingPolicy": "fast-text",
  13. "syntheticReason": "运行时证据显示标题旁路缺少响应;在本例显式登记固定标题,避免依赖 legacy fixture 或触发后台网络重试。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "statusMessage": "OK",
  23. "headers": {
  24. "content-type": "application/json; charset=utf-8"
  25. },
  26. "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\"}}"
  27. }
  28. },
  29. {
  30. "id": "subagent-team-scope-parent-agent",
  31. "description": "父请求触发 Team scope 缺失的 custom Agent。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "父 tool_use 由真实 runtime 处理 child provider 资格校验。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "bodyIncludes": [
  43. "E2E_SUBAGENT_TEAM_SCOPE_PARENT",
  44. "e2e-team-scope-reviewer",
  45. "E2E_SUBAGENT_TEAM_SCOPE_CHILD"
  46. ],
  47. "bodyExcludes": [
  48. "toolu_e2e_subagent_team_scope",
  49. "Generate a concise title",
  50. "CRITICAL: Respond with TEXT ONLY"
  51. ]
  52. },
  53. "response": {
  54. "statusCode": 200,
  55. "toolUse": {
  56. "id": "toolu_e2e_subagent_team_scope",
  57. "name": "Agent",
  58. "input": {
  59. "description": "Run Team scope child",
  60. "prompt": "E2E_SUBAGENT_TEAM_SCOPE_CHILD: inspect the workspace.",
  61. "subagent_type": "e2e-team-scope-reviewer"
  62. }
  63. }
  64. }
  65. },
  66. {
  67. "id": "subagent-team-scope-parent-final",
  68. "description": "父会话消费失败 tool_result 后继续完成。",
  69. "metadata": {
  70. "kind": "main",
  71. "timingPolicy": "fast-text",
  72. "source": "synthetic",
  73. "syntheticReason": "验证 child 失败不拖垮父会话。"
  74. },
  75. "match": {
  76. "method": "POST",
  77. "pathIncludes": "/messages",
  78. "bodyIncludes": [
  79. "E2E_SUBAGENT_TEAM_SCOPE_PARENT",
  80. "toolu_e2e_subagent_team_scope",
  81. "tool_result"
  82. ],
  83. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  84. },
  85. "response": {
  86. "statusCode": 200,
  87. "text": {
  88. "id": "subagent-team-scope-parent-final",
  89. "inputTokens": 48,
  90. "outputTokens": 8,
  91. "text": "E2E_SUBAGENT_TEAM_SCOPE_PARENT_DONE"
  92. }
  93. }
  94. }
  95. ]
  96. }