plugin-subagent-override-cold.json 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. {
  2. "version": 1,
  3. "caseName": "plugin-subagent-override-cold",
  4. "spec": "./test/e2e/plugins/runtime/plugin-subagent-override-cold.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "plugin-subagent-override-cold-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": "plugin-override-cold-parent",
  31. "description": "父请求只负责触发已配置覆盖的夹具插件 subagent。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "确定性触发插件 child,模型与档位以实际请求为证据。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_PLUGIN_OVERRIDE_COLD_PARENT"],
  43. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  44. },
  45. "response": {
  46. "statusCode": 200,
  47. "toolUse": {
  48. "id": "toolu_plugin_override_cold",
  49. "name": "Agent",
  50. "input": {
  51. "description": "Check plugin model override",
  52. "subagent_type": "e2e-subagent-refresh:reviewer",
  53. "prompt": "E2E_PLUGIN_OVERRIDE_COLD_CHILD: Reply with exactly E2E_PLUGIN_OVERRIDE_COLD_RESULT and no other text."
  54. }
  55. }
  56. }
  57. },
  58. {
  59. "id": "plugin-override-cold-child",
  60. "description": "插件 child 确定性返回。",
  61. "metadata": {
  62. "kind": "main",
  63. "timingPolicy": "fast-text",
  64. "source": "synthetic",
  65. "syntheticReason": "检查 child 的真实模型和 high 参数,不依赖模型输出随机性。"
  66. },
  67. "maxMatches": 1,
  68. "match": {
  69. "method": "POST",
  70. "pathIncludes": "/messages",
  71. "lastUserMessageIncludes": ["E2E_PLUGIN_OVERRIDE_COLD_CHILD"],
  72. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  73. },
  74. "response": {
  75. "statusCode": 200,
  76. "text": {
  77. "id": "plugin-override-cold-child",
  78. "inputTokens": 128,
  79. "outputTokens": 16,
  80. "text": "E2E_PLUGIN_OVERRIDE_COLD_RESULT"
  81. }
  82. }
  83. },
  84. {
  85. "id": "plugin-override-cold-final",
  86. "description": "父请求消费 child 结果后完成。",
  87. "metadata": {
  88. "kind": "main",
  89. "timingPolicy": "fast-text",
  90. "source": "synthetic",
  91. "syntheticReason": "验证子结果回到父执行,父 continuation 不继承 child 模型或档位。"
  92. },
  93. "maxMatches": 1,
  94. "match": {
  95. "method": "POST",
  96. "pathIncludes": "/messages",
  97. "bodyIncludes": ["E2E_PLUGIN_OVERRIDE_COLD_PARENT", "E2E_PLUGIN_OVERRIDE_COLD_RESULT"],
  98. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  99. },
  100. "response": {
  101. "statusCode": 200,
  102. "text": {
  103. "id": "plugin-override-cold-final",
  104. "inputTokens": 160,
  105. "outputTokens": 12,
  106. "text": "plugin-override-cold-done"
  107. }
  108. }
  109. }
  110. ]
  111. }