{
"fixtures": [
{
"_comment": "Stateless POST /run: single-turn agent run for http-run.txt — first LLM call (no tool result yet).",
"match": { "userMessage": "http-run.txt", "turnIndex": 0 },
"response": {
"toolCalls": [
{
"name": "write_file",
"arguments": { "path": "http-run.txt", "contents": "run-ok" }
}
]
}
},
{
"_comment": "Stateless POST /run: follow-up after tool result.",
"match": { "userMessage": "http-run.txt", "turnIndex": 1 },
"response": { "content": "Done! I created http-run.txt with content run-ok." }
},
{
"_comment": "Persistent session, turn 1: first LLM call — assistantCount=0 (clean transcript).",
"match": { "userMessage": "session-turn1.txt", "turnIndex": 0 },
"response": {
"toolCalls": [
{
"name": "write_file",
"arguments": { "path": "session-turn1.txt", "contents": "turn1" }
}
]
}
},
{
"_comment": "Persistent session, turn 1: follow-up after tool result — assistantCount=1.",
"match": { "userMessage": "session-turn1.txt", "turnIndex": 1 },
"response": { "content": "Done! I created session-turn1.txt." }
},
{
"_comment": "Persistent session, turn 2: first LLM call. assistantCount=2 (turn 1 left tool-call assistant + final-reply assistant). hasToolResult would be true here (turn 1's tool message lingers in transcript), so we use turnIndex.",
"match": { "userMessage": "session-turn2.txt", "turnIndex": 2 },
"response": {
"toolCalls": [
{
"name": "write_file",
"arguments": { "path": "session-turn2.txt", "contents": "turn2" }
}
]
}
},
{
"_comment": "Persistent session, turn 2: follow-up — assistantCount=3.",
"match": { "userMessage": "session-turn2.txt", "turnIndex": 3 },
"response": { "content": "Done! I created session-turn2.txt." }
},
{
"_comment": "SSE test uses a dedicated fresh session — single turn, assistantCount 0/1.",
"match": { "userMessage": "sse-test.txt", "turnIndex": 0 },
"response": {
"toolCalls": [
{
"name": "write_file",
"arguments": { "path": "sse-test.txt", "contents": "sse-ok" }
}
]
}
},
{
"match": { "userMessage": "sse-test.txt", "turnIndex": 1 },
"response": { "content": "Done! I created sse-test.txt with content sse-ok." }
}
]
}