test_case_id: "embed_ac_template_csv_input_001"
description: "Tests «artifact_content:data.csv>>>apply_to_template:table.mustache>>>format:text»."
tags: ["all","common","embeds"]
skip_intermediate_events: true

setup_artifacts:
  - filename: "data.csv"
    mime_type: "text/csv"
    content: "h1,h2\na,b\nc,d"
  - filename: "table.mustache"
    mime_type: "text/mustache" # Or text/plain, resolver should load it
    content: "<table><thead><tr>{{#headers}}<th>{{.}}</th>{{/headers}}</tr></thead><tbody>{{#data_rows}}<tr>{{#.}}<td>{{.}}</td>{{/.}}</tr>{{/data_rows}}</tbody></table>"
gateway_input:
  target_agent_name: "TestAgent"
  user_identity: "embed_late_tester@example.com"
  parts: [{type: "text", text: "Render data.csv with table.mustache"}]
llm_interactions:
  - static_response:
      choices: [{message: {role: "assistant", content: "Result: «artifact_content:data.csv>>>apply_to_template:table.mustache>>>format:text»"}}]
expected_gateway_output:
  - type: "final_response"
    content_parts:
      - type: "text"
        text_contains: "Result: <table><thead><tr><th>h1</th><th>h2</th></tr></thead><tbody><tr><td>a</td><td>b</td></tr><tr><td>c</td><td>d</td></tr></tbody></table>"
