test_case_id: "embed_ac_chain_jsonpath_grep_head_001"
description: "Tests «artifact_content:complex.json>>>jsonpath:$.logs[*]>>>grep:ERROR>>>head:1>>>format:text»."
tags: ["common","embeds"]
skip_intermediate_events: true

setup_artifacts:
  - filename: "complex.json"
    mime_type: "application/json"
    content: '{"logs":["INFO: Start","WARN: Issue A","ERROR: Fail X","INFO: Mid","ERROR: Fail Y"]}'
gateway_input:
  target_agent_name: "TestAgent"
  user_identity: "embed_late_tester@example.com"
  parts: [{type: "text", text: "Chain jsonpath, grep, head on complex.json"}]
llm_interactions:
  - static_response:
      choices: [{message: {role: "assistant", content: "Result: «artifact_content:complex.json>>>jsonpath:$.logs[*]>>>grep:ERROR>>>head:1>>>format:text»"}}]
expected_gateway_output:
  - type: "final_response"
    content_parts:
      - type: "text"
        text_contains: 'Result: ["INFO: Start","WARN: Issue A","ERROR: Fail X","INFO: Mid","ERROR: Fail Y"]'
