plugin-runtime-env-agent-projection.json 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {
  2. "version": 1,
  3. "caseName": "plugin-runtime-env-agent-projection",
  4. "spec": "./test/e2e/plugins/runtime/plugin-runtime-env-agent-projection.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "plugin-runtime-env-agent-projection-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": "upstream-plugin-runtime-env-tool-call",
  31. "description": "PLM-LC-010 advertises and calls the installed plugin secret-env verifier.",
  32. "match": {
  33. "method": "POST",
  34. "pathIncludes": "/messages",
  35. "lastUserMessageIncludes": ["E2E_PLUGIN_SECRET_ENV_CASE_"],
  36. "bodyIncludes": ["E2E_PLUGIN_SECRET_ENV_CASE_"],
  37. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  38. },
  39. "replay": {
  40. "consumeOnce": true
  41. },
  42. "response": {
  43. "statusCode": 200,
  44. "toolUse": {
  45. "id": "toolu_e2e_plugin_secret_env",
  46. "name": "mcp__plugin_e2e-plugin-secret-agent_secret-verifier__verify_secret_env",
  47. "input": {}
  48. }
  49. }
  50. },
  51. {
  52. "id": "upstream-plugin-runtime-env-final",
  53. "description": "PLM-LC-010 final response after the MCP confirms the secret env was resolved.",
  54. "match": {
  55. "method": "POST",
  56. "pathIncludes": "/messages",
  57. "bodyIncludes": [
  58. "E2E_PLUGIN_SECRET_ENV_CASE_",
  59. "toolu_e2e_plugin_secret_env",
  60. "E2E_PLUGIN_RUNTIME_SECRET_RESOLVED"
  61. ],
  62. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  63. },
  64. "response": {
  65. "statusCode": 200,
  66. "text": "upstream-e2e-ok"
  67. }
  68. }
  69. ]
  70. }