Skip to content

Commit 2af7d21

Browse files
committed
Add onTurn() to API quick reference, fix jsonc language tag in SKILL.md
Add missing onTurn() convenience method to the API Quick Reference table and change the fenced code block language tag from json to jsonc for the multi-turn fixture examples that contain // comments.
1 parent 5dda28c commit 2af7d21

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

skills/write-fixtures/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Multi-part content (e.g., `[{type: "text", text: "hello"}]`) is automatically ex
5353

5454
### Multi-turn fixture examples
5555

56-
```json
56+
```jsonc
5757
// 2-step HITL with turnIndex
5858
{"match": {"userMessage": "trip to mars", "turnIndex": 0}, "response": {"toolCalls": [{"id": "call_001", "name": "generate_steps", "arguments": "{}"}]}}
5959
{"match": {"userMessage": "trip to mars", "turnIndex": 1}, "response": {"content": "Great choices! Proceeding."}}
@@ -691,6 +691,7 @@ const mock = await LLMock.create({ port: 0 }); // creates + starts in one call
691691
| `onJsonOutput(pattern, json, opts?)` | Match by user message with `responseFormat` |
692692
| `onToolCall(name, response, opts?)` | Match by tool name in `tools[]` |
693693
| `onToolResult(id, response, opts?)` | Match by `tool_call_id` |
694+
| `onTurn(turn, pattern, response, opts?)` | Match by turn index + user message |
694695
| `nextRequestError(status, body?)` | One-shot error, auto-removes |
695696
| `loadFixtureFile(path)` | Load JSON fixture file |
696697
| `loadFixtureDir(path)` | Load all JSON files in directory |

0 commit comments

Comments
 (0)