{"v":1,"type":"start","id":"b_1","payload":{"prompt":"Research deploy service X and create a checklist.","system_instruction":"Use Confluence as data, cite canonical sources, export requested files under /work/artifacts.","remaining_ms":10000,"model":{"id":"scripted","context_window_tokens":200000,"max_output_tokens":4096}}} {"v":1,"type":"model_request","id":"a_1","payload":{"messages":[{"role":"user","content":[{"type":"text","text":"Research deploy service X and create a checklist."}]}],"tools":[{"name":"confluence_search","description":"Search Confluence documentation using plain keywords. Returns matching pages, space keys, canonical URLs, and snippets.","input_schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search keywords (plain text, escaped into CQL by backend)"},"space":{"type":"string","maxLength":256,"description":"Optional space key filter (up to 256 UTF-8 bytes)"},"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of pages to return (1–50, default 10)"},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Pagination offset (default 0, maximum 10,000)"}},"additionalProperties":false}},{"name":"confluence_view","description":"Read a Confluence page by numeric page ID. Returns page title, space, canonical URL, and Markdown content.","input_schema":{"type":"object","required":["page_id"],"properties":{"page_id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric page ID string (e.g. '847291')"}},"additionalProperties":false}},{"name":"confluence_list_spaces","description":"List available Confluence spaces. Returns space keys and display names.","input_schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of spaces to return (1–50, default 25)"},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Pagination offset (default 0, maximum 10,000)"}},"additionalProperties":false}},{"name":"read","description":"Read regular text files up to 16 MiB. Output is truncated to 2000 lines or 50 KiB; use offset/limit for continuation. Use shell ranges for larger files. Image attachments are not supported by this text/tool model adapter.","input_schema":{"type":"object","required":["path"],"properties":{"path":{"type":"string","description":"Path to the file to read (relative or absolute)"},"offset":{"type":"number","description":"Line number to start reading from (1-indexed)"},"limit":{"type":"number","description":"Maximum number of lines to read"}}}},{"name":"bash","description":"Execute a bash command in the current working directory. Returns stdout and stderr. Output is truncated to last 2000 lines or 50KB (whichever is hit first). If truncated, full output is saved to a temp file. Optionally provide a timeout in seconds.","input_schema":{"type":"object","required":["command"],"properties":{"command":{"type":"string","description":"Shell command to execute"},"timeout":{"type":"number","description":"Timeout in seconds (optional, no default timeout)"}}}},{"name":"edit","description":"Edit a single file using exact text replacement. Every edits[].oldText must match a unique, non-overlapping region of the original file. If two changes affect the same block or nearby lines, merge them into one edit instead of emitting overlapping edits. Do not include large unchanged regions just to connect distant changes.","input_schema":{"type":"object","required":["path","edits"],"properties":{"path":{"type":"string","description":"Path to the file to edit (relative or absolute)"},"edits":{"type":"array","items":{"type":"object","required":["oldText","newText"],"properties":{"oldText":{"type":"string","description":"Exact text for one targeted replacement. It must be unique in the original file and must not overlap with any other edits[].oldText in the same call."},"newText":{"type":"string","description":"Replacement text for this targeted edit."}}},"description":"One or more targeted replacements. Each edit is matched against the original file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead."}}}},{"name":"write","description":"Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically creates parent directories.","input_schema":{"type":"object","required":["path","content"],"properties":{"path":{"type":"string","description":"Path to the file to write (relative or absolute)"},"content":{"type":"string","description":"Content to write to the file"}}}}]}} {"v":1,"type":"model_response","id":"b_2","reply_to":"a_1","payload":{"result":{"content":[{"type":"tool_call","id":"sdk_1","name":"confluence_search","arguments":{"query":"deploy service X"}}],"stop_reason":"tool_calls","usage":{"input_tokens":100,"output_tokens":50},"provider_state":"state_1"},"error":null}} {"v":1,"type":"tool_request","id":"a_2","payload":{"tool":"confluence_search","parameters":{"query":"deploy service X"}}} {"v":1,"type":"tool_response","id":"b_3","reply_to":"a_2","payload":{"result":{"pages":[{"page_id":"847291","title":"Deployment Guide","space":"OPS","url":"https://approved.example.com/pages/viewpage.action?pageId=847291","snippet":"Deployment steps."}],"pagination":{"offset":0,"limit":10,"has_more":false}},"error":null}} {"v":1,"type":"model_request","id":"a_3","payload":{"messages":[{"role":"user","content":[{"type":"text","text":"Research deploy service X and create a checklist."}]},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_1","name":"confluence_search","arguments":{"query":"deploy service X"}}],"provider_state":"state_1"},{"role":"tool","tool_call_id":"sdk_1","name":"confluence_search","content":"{\"pages\":[{\"page_id\":\"847291\",\"title\":\"Deployment Guide\",\"space\":\"OPS\",\"url\":\"https://approved.example.com/pages/viewpage.action?pageId=847291\",\"snippet\":\"Deployment steps.\"}],\"pagination\":{\"offset\":0,\"limit\":10,\"has_more\":false}}","is_error":false}],"tools":[{"name":"confluence_search","description":"Search Confluence documentation using plain keywords. Returns matching pages, space keys, canonical URLs, and snippets.","input_schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search keywords (plain text, escaped into CQL by backend)"},"space":{"type":"string","maxLength":256,"description":"Optional space key filter (up to 256 UTF-8 bytes)"},"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of pages to return (1–50, default 10)"},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Pagination offset (default 0, maximum 10,000)"}},"additionalProperties":false}},{"name":"confluence_view","description":"Read a Confluence page by numeric page ID. Returns page title, space, canonical URL, and Markdown content.","input_schema":{"type":"object","required":["page_id"],"properties":{"page_id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric page ID string (e.g. '847291')"}},"additionalProperties":false}},{"name":"confluence_list_spaces","description":"List available Confluence spaces. Returns space keys and display names.","input_schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of spaces to return (1–50, default 25)"},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Pagination offset (default 0, maximum 10,000)"}},"additionalProperties":false}},{"name":"read","description":"Read regular text files up to 16 MiB. Output is truncated to 2000 lines or 50 KiB; use offset/limit for continuation. Use shell ranges for larger files. Image attachments are not supported by this text/tool model adapter.","input_schema":{"type":"object","required":["path"],"properties":{"path":{"type":"string","description":"Path to the file to read (relative or absolute)"},"offset":{"type":"number","description":"Line number to start reading from (1-indexed)"},"limit":{"type":"number","description":"Maximum number of lines to read"}}}},{"name":"bash","description":"Execute a bash command in the current working directory. Returns stdout and stderr. Output is truncated to last 2000 lines or 50KB (whichever is hit first). If truncated, full output is saved to a temp file. Optionally provide a timeout in seconds.","input_schema":{"type":"object","required":["command"],"properties":{"command":{"type":"string","description":"Shell command to execute"},"timeout":{"type":"number","description":"Timeout in seconds (optional, no default timeout)"}}}},{"name":"edit","description":"Edit a single file using exact text replacement. Every edits[].oldText must match a unique, non-overlapping region of the original file. If two changes affect the same block or nearby lines, merge them into one edit instead of emitting overlapping edits. Do not include large unchanged regions just to connect distant changes.","input_schema":{"type":"object","required":["path","edits"],"properties":{"path":{"type":"string","description":"Path to the file to edit (relative or absolute)"},"edits":{"type":"array","items":{"type":"object","required":["oldText","newText"],"properties":{"oldText":{"type":"string","description":"Exact text for one targeted replacement. It must be unique in the original file and must not overlap with any other edits[].oldText in the same call."},"newText":{"type":"string","description":"Replacement text for this targeted edit."}}},"description":"One or more targeted replacements. Each edit is matched against the original file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead."}}}},{"name":"write","description":"Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically creates parent directories.","input_schema":{"type":"object","required":["path","content"],"properties":{"path":{"type":"string","description":"Path to the file to write (relative or absolute)"},"content":{"type":"string","description":"Content to write to the file"}}}}]}} {"v":1,"type":"model_response","id":"b_4","reply_to":"a_3","payload":{"result":{"content":[{"type":"tool_call","id":"sdk_2","name":"confluence_view","arguments":{"page_id":"847291"}}],"stop_reason":"tool_calls","usage":{"input_tokens":100,"output_tokens":50},"provider_state":"state_2"},"error":null}} {"v":1,"type":"tool_request","id":"a_4","payload":{"tool":"confluence_view","parameters":{"page_id":"847291"}}} {"v":1,"type":"tool_response","id":"b_5","reply_to":"a_4","payload":{"result":{"page_id":"847291","title":"Deployment Guide","space":"OPS","url":"https://approved.example.com/pages/viewpage.action?pageId=847291","markdown":"Deploy service X using the release checklist.","truncated":false},"error":null}} {"v":1,"type":"model_request","id":"a_5","payload":{"messages":[{"role":"user","content":[{"type":"text","text":"Research deploy service X and create a checklist."}]},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_1","name":"confluence_search","arguments":{"query":"deploy service X"}}],"provider_state":"state_1"},{"role":"tool","tool_call_id":"sdk_1","name":"confluence_search","content":"{\"pages\":[{\"page_id\":\"847291\",\"title\":\"Deployment Guide\",\"space\":\"OPS\",\"url\":\"https://approved.example.com/pages/viewpage.action?pageId=847291\",\"snippet\":\"Deployment steps.\"}],\"pagination\":{\"offset\":0,\"limit\":10,\"has_more\":false}}","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_2","name":"confluence_view","arguments":{"page_id":"847291"}}],"provider_state":"state_2"},{"role":"tool","tool_call_id":"sdk_2","name":"confluence_view","content":"{\"page_id\":\"847291\",\"title\":\"Deployment Guide\",\"space\":\"OPS\",\"url\":\"https://approved.example.com/pages/viewpage.action?pageId=847291\",\"markdown\":\"Deploy service X using the release checklist.\",\"truncated\":false}","is_error":false}],"tools":[{"name":"confluence_search","description":"Search Confluence documentation using plain keywords. Returns matching pages, space keys, canonical URLs, and snippets.","input_schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search keywords (plain text, escaped into CQL by backend)"},"space":{"type":"string","maxLength":256,"description":"Optional space key filter (up to 256 UTF-8 bytes)"},"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of pages to return (1–50, default 10)"},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Pagination offset (default 0, maximum 10,000)"}},"additionalProperties":false}},{"name":"confluence_view","description":"Read a Confluence page by numeric page ID. Returns page title, space, canonical URL, and Markdown content.","input_schema":{"type":"object","required":["page_id"],"properties":{"page_id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric page ID string (e.g. '847291')"}},"additionalProperties":false}},{"name":"confluence_list_spaces","description":"List available Confluence spaces. Returns space keys and display names.","input_schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of spaces to return (1–50, default 25)"},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Pagination offset (default 0, maximum 10,000)"}},"additionalProperties":false}},{"name":"read","description":"Read regular text files up to 16 MiB. Output is truncated to 2000 lines or 50 KiB; use offset/limit for continuation. Use shell ranges for larger files. Image attachments are not supported by this text/tool model adapter.","input_schema":{"type":"object","required":["path"],"properties":{"path":{"type":"string","description":"Path to the file to read (relative or absolute)"},"offset":{"type":"number","description":"Line number to start reading from (1-indexed)"},"limit":{"type":"number","description":"Maximum number of lines to read"}}}},{"name":"bash","description":"Execute a bash command in the current working directory. Returns stdout and stderr. Output is truncated to last 2000 lines or 50KB (whichever is hit first). If truncated, full output is saved to a temp file. Optionally provide a timeout in seconds.","input_schema":{"type":"object","required":["command"],"properties":{"command":{"type":"string","description":"Shell command to execute"},"timeout":{"type":"number","description":"Timeout in seconds (optional, no default timeout)"}}}},{"name":"edit","description":"Edit a single file using exact text replacement. Every edits[].oldText must match a unique, non-overlapping region of the original file. If two changes affect the same block or nearby lines, merge them into one edit instead of emitting overlapping edits. Do not include large unchanged regions just to connect distant changes.","input_schema":{"type":"object","required":["path","edits"],"properties":{"path":{"type":"string","description":"Path to the file to edit (relative or absolute)"},"edits":{"type":"array","items":{"type":"object","required":["oldText","newText"],"properties":{"oldText":{"type":"string","description":"Exact text for one targeted replacement. It must be unique in the original file and must not overlap with any other edits[].oldText in the same call."},"newText":{"type":"string","description":"Replacement text for this targeted edit."}}},"description":"One or more targeted replacements. Each edit is matched against the original file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead."}}}},{"name":"write","description":"Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically creates parent directories.","input_schema":{"type":"object","required":["path","content"],"properties":{"path":{"type":"string","description":"Path to the file to write (relative or absolute)"},"content":{"type":"string","description":"Content to write to the file"}}}}]}} {"v":1,"type":"model_response","id":"b_6","reply_to":"a_5","payload":{"result":{"content":[{"type":"tool_call","id":"sdk_3","name":"write","arguments":{"path":"/work/scratch.md","content":"# Checklist\n\n- Stage service X\n"}}],"stop_reason":"tool_calls","usage":{"input_tokens":100,"output_tokens":50},"provider_state":"state_3"},"error":null}} {"v":1,"type":"model_request","id":"a_6","payload":{"messages":[{"role":"user","content":[{"type":"text","text":"Research deploy service X and create a checklist."}]},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_1","name":"confluence_search","arguments":{"query":"deploy service X"}}],"provider_state":"state_1"},{"role":"tool","tool_call_id":"sdk_1","name":"confluence_search","content":"{\"pages\":[{\"page_id\":\"847291\",\"title\":\"Deployment Guide\",\"space\":\"OPS\",\"url\":\"https://approved.example.com/pages/viewpage.action?pageId=847291\",\"snippet\":\"Deployment steps.\"}],\"pagination\":{\"offset\":0,\"limit\":10,\"has_more\":false}}","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_2","name":"confluence_view","arguments":{"page_id":"847291"}}],"provider_state":"state_2"},{"role":"tool","tool_call_id":"sdk_2","name":"confluence_view","content":"{\"page_id\":\"847291\",\"title\":\"Deployment Guide\",\"space\":\"OPS\",\"url\":\"https://approved.example.com/pages/viewpage.action?pageId=847291\",\"markdown\":\"Deploy service X using the release checklist.\",\"truncated\":false}","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_3","name":"write","arguments":{"path":"/work/scratch.md","content":"# Checklist\n\n- Stage service X\n"}}],"provider_state":"state_3"},{"role":"tool","tool_call_id":"sdk_3","name":"write","content":"Successfully wrote to /work/scratch.md","is_error":false}],"tools":[{"name":"confluence_search","description":"Search Confluence documentation using plain keywords. Returns matching pages, space keys, canonical URLs, and snippets.","input_schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search keywords (plain text, escaped into CQL by backend)"},"space":{"type":"string","maxLength":256,"description":"Optional space key filter (up to 256 UTF-8 bytes)"},"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of pages to return (1–50, default 10)"},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Pagination offset (default 0, maximum 10,000)"}},"additionalProperties":false}},{"name":"confluence_view","description":"Read a Confluence page by numeric page ID. Returns page title, space, canonical URL, and Markdown content.","input_schema":{"type":"object","required":["page_id"],"properties":{"page_id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric page ID string (e.g. '847291')"}},"additionalProperties":false}},{"name":"confluence_list_spaces","description":"List available Confluence spaces. Returns space keys and display names.","input_schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of spaces to return (1–50, default 25)"},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Pagination offset (default 0, maximum 10,000)"}},"additionalProperties":false}},{"name":"read","description":"Read regular text files up to 16 MiB. Output is truncated to 2000 lines or 50 KiB; use offset/limit for continuation. Use shell ranges for larger files. Image attachments are not supported by this text/tool model adapter.","input_schema":{"type":"object","required":["path"],"properties":{"path":{"type":"string","description":"Path to the file to read (relative or absolute)"},"offset":{"type":"number","description":"Line number to start reading from (1-indexed)"},"limit":{"type":"number","description":"Maximum number of lines to read"}}}},{"name":"bash","description":"Execute a bash command in the current working directory. Returns stdout and stderr. Output is truncated to last 2000 lines or 50KB (whichever is hit first). If truncated, full output is saved to a temp file. Optionally provide a timeout in seconds.","input_schema":{"type":"object","required":["command"],"properties":{"command":{"type":"string","description":"Shell command to execute"},"timeout":{"type":"number","description":"Timeout in seconds (optional, no default timeout)"}}}},{"name":"edit","description":"Edit a single file using exact text replacement. Every edits[].oldText must match a unique, non-overlapping region of the original file. If two changes affect the same block or nearby lines, merge them into one edit instead of emitting overlapping edits. Do not include large unchanged regions just to connect distant changes.","input_schema":{"type":"object","required":["path","edits"],"properties":{"path":{"type":"string","description":"Path to the file to edit (relative or absolute)"},"edits":{"type":"array","items":{"type":"object","required":["oldText","newText"],"properties":{"oldText":{"type":"string","description":"Exact text for one targeted replacement. It must be unique in the original file and must not overlap with any other edits[].oldText in the same call."},"newText":{"type":"string","description":"Replacement text for this targeted edit."}}},"description":"One or more targeted replacements. Each edit is matched against the original file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead."}}}},{"name":"write","description":"Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically creates parent directories.","input_schema":{"type":"object","required":["path","content"],"properties":{"path":{"type":"string","description":"Path to the file to write (relative or absolute)"},"content":{"type":"string","description":"Content to write to the file"}}}}]}} {"v":1,"type":"model_response","id":"b_7","reply_to":"a_6","payload":{"result":{"content":[{"type":"tool_call","id":"sdk_4","name":"read","arguments":{"path":"/work/scratch.md"}}],"stop_reason":"tool_calls","usage":{"input_tokens":100,"output_tokens":50},"provider_state":"state_4"},"error":null}} {"v":1,"type":"model_request","id":"a_7","payload":{"messages":[{"role":"user","content":[{"type":"text","text":"Research deploy service X and create a checklist."}]},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_1","name":"confluence_search","arguments":{"query":"deploy service X"}}],"provider_state":"state_1"},{"role":"tool","tool_call_id":"sdk_1","name":"confluence_search","content":"{\"pages\":[{\"page_id\":\"847291\",\"title\":\"Deployment Guide\",\"space\":\"OPS\",\"url\":\"https://approved.example.com/pages/viewpage.action?pageId=847291\",\"snippet\":\"Deployment steps.\"}],\"pagination\":{\"offset\":0,\"limit\":10,\"has_more\":false}}","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_2","name":"confluence_view","arguments":{"page_id":"847291"}}],"provider_state":"state_2"},{"role":"tool","tool_call_id":"sdk_2","name":"confluence_view","content":"{\"page_id\":\"847291\",\"title\":\"Deployment Guide\",\"space\":\"OPS\",\"url\":\"https://approved.example.com/pages/viewpage.action?pageId=847291\",\"markdown\":\"Deploy service X using the release checklist.\",\"truncated\":false}","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_3","name":"write","arguments":{"path":"/work/scratch.md","content":"# Checklist\n\n- Stage service X\n"}}],"provider_state":"state_3"},{"role":"tool","tool_call_id":"sdk_3","name":"write","content":"Successfully wrote to /work/scratch.md","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_4","name":"read","arguments":{"path":"/work/scratch.md"}}],"provider_state":"state_4"},{"role":"tool","tool_call_id":"sdk_4","name":"read","content":"# Checklist\n\n- Stage service X\n","is_error":false}],"tools":[{"name":"confluence_search","description":"Search Confluence documentation using plain keywords. Returns matching pages, space keys, canonical URLs, and snippets.","input_schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search keywords (plain text, escaped into CQL by backend)"},"space":{"type":"string","maxLength":256,"description":"Optional space key filter (up to 256 UTF-8 bytes)"},"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of pages to return (1–50, default 10)"},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Pagination offset (default 0, maximum 10,000)"}},"additionalProperties":false}},{"name":"confluence_view","description":"Read a Confluence page by numeric page ID. Returns page title, space, canonical URL, and Markdown content.","input_schema":{"type":"object","required":["page_id"],"properties":{"page_id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric page ID string (e.g. '847291')"}},"additionalProperties":false}},{"name":"confluence_list_spaces","description":"List available Confluence spaces. Returns space keys and display names.","input_schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of spaces to return (1–50, default 25)"},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Pagination offset (default 0, maximum 10,000)"}},"additionalProperties":false}},{"name":"read","description":"Read regular text files up to 16 MiB. Output is truncated to 2000 lines or 50 KiB; use offset/limit for continuation. Use shell ranges for larger files. Image attachments are not supported by this text/tool model adapter.","input_schema":{"type":"object","required":["path"],"properties":{"path":{"type":"string","description":"Path to the file to read (relative or absolute)"},"offset":{"type":"number","description":"Line number to start reading from (1-indexed)"},"limit":{"type":"number","description":"Maximum number of lines to read"}}}},{"name":"bash","description":"Execute a bash command in the current working directory. Returns stdout and stderr. Output is truncated to last 2000 lines or 50KB (whichever is hit first). If truncated, full output is saved to a temp file. Optionally provide a timeout in seconds.","input_schema":{"type":"object","required":["command"],"properties":{"command":{"type":"string","description":"Shell command to execute"},"timeout":{"type":"number","description":"Timeout in seconds (optional, no default timeout)"}}}},{"name":"edit","description":"Edit a single file using exact text replacement. Every edits[].oldText must match a unique, non-overlapping region of the original file. If two changes affect the same block or nearby lines, merge them into one edit instead of emitting overlapping edits. Do not include large unchanged regions just to connect distant changes.","input_schema":{"type":"object","required":["path","edits"],"properties":{"path":{"type":"string","description":"Path to the file to edit (relative or absolute)"},"edits":{"type":"array","items":{"type":"object","required":["oldText","newText"],"properties":{"oldText":{"type":"string","description":"Exact text for one targeted replacement. It must be unique in the original file and must not overlap with any other edits[].oldText in the same call."},"newText":{"type":"string","description":"Replacement text for this targeted edit."}}},"description":"One or more targeted replacements. Each edit is matched against the original file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead."}}}},{"name":"write","description":"Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically creates parent directories.","input_schema":{"type":"object","required":["path","content"],"properties":{"path":{"type":"string","description":"Path to the file to write (relative or absolute)"},"content":{"type":"string","description":"Content to write to the file"}}}}]}} {"v":1,"type":"model_response","id":"b_8","reply_to":"a_7","payload":{"result":{"content":[{"type":"tool_call","id":"sdk_5","name":"edit","arguments":{"path":"/work/scratch.md","edits":[{"oldText":"Stage","newText":"Deploy"}]}}],"stop_reason":"tool_calls","usage":{"input_tokens":100,"output_tokens":50},"provider_state":"state_5"},"error":null}} {"v":1,"type":"model_request","id":"a_8","payload":{"messages":[{"role":"user","content":[{"type":"text","text":"Research deploy service X and create a checklist."}]},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_1","name":"confluence_search","arguments":{"query":"deploy service X"}}],"provider_state":"state_1"},{"role":"tool","tool_call_id":"sdk_1","name":"confluence_search","content":"{\"pages\":[{\"page_id\":\"847291\",\"title\":\"Deployment Guide\",\"space\":\"OPS\",\"url\":\"https://approved.example.com/pages/viewpage.action?pageId=847291\",\"snippet\":\"Deployment steps.\"}],\"pagination\":{\"offset\":0,\"limit\":10,\"has_more\":false}}","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_2","name":"confluence_view","arguments":{"page_id":"847291"}}],"provider_state":"state_2"},{"role":"tool","tool_call_id":"sdk_2","name":"confluence_view","content":"{\"page_id\":\"847291\",\"title\":\"Deployment Guide\",\"space\":\"OPS\",\"url\":\"https://approved.example.com/pages/viewpage.action?pageId=847291\",\"markdown\":\"Deploy service X using the release checklist.\",\"truncated\":false}","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_3","name":"write","arguments":{"path":"/work/scratch.md","content":"# Checklist\n\n- Stage service X\n"}}],"provider_state":"state_3"},{"role":"tool","tool_call_id":"sdk_3","name":"write","content":"Successfully wrote to /work/scratch.md","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_4","name":"read","arguments":{"path":"/work/scratch.md"}}],"provider_state":"state_4"},{"role":"tool","tool_call_id":"sdk_4","name":"read","content":"# Checklist\n\n- Stage service X\n","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_5","name":"edit","arguments":{"path":"/work/scratch.md","edits":[{"oldText":"Stage","newText":"Deploy"}]}}],"provider_state":"state_5"},{"role":"tool","tool_call_id":"sdk_5","name":"edit","content":"Successfully replaced 1 block(s) in /work/scratch.md.","is_error":false}],"tools":[{"name":"confluence_search","description":"Search Confluence documentation using plain keywords. Returns matching pages, space keys, canonical URLs, and snippets.","input_schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search keywords (plain text, escaped into CQL by backend)"},"space":{"type":"string","maxLength":256,"description":"Optional space key filter (up to 256 UTF-8 bytes)"},"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of pages to return (1–50, default 10)"},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Pagination offset (default 0, maximum 10,000)"}},"additionalProperties":false}},{"name":"confluence_view","description":"Read a Confluence page by numeric page ID. Returns page title, space, canonical URL, and Markdown content.","input_schema":{"type":"object","required":["page_id"],"properties":{"page_id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric page ID string (e.g. '847291')"}},"additionalProperties":false}},{"name":"confluence_list_spaces","description":"List available Confluence spaces. Returns space keys and display names.","input_schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of spaces to return (1–50, default 25)"},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Pagination offset (default 0, maximum 10,000)"}},"additionalProperties":false}},{"name":"read","description":"Read regular text files up to 16 MiB. Output is truncated to 2000 lines or 50 KiB; use offset/limit for continuation. Use shell ranges for larger files. Image attachments are not supported by this text/tool model adapter.","input_schema":{"type":"object","required":["path"],"properties":{"path":{"type":"string","description":"Path to the file to read (relative or absolute)"},"offset":{"type":"number","description":"Line number to start reading from (1-indexed)"},"limit":{"type":"number","description":"Maximum number of lines to read"}}}},{"name":"bash","description":"Execute a bash command in the current working directory. Returns stdout and stderr. Output is truncated to last 2000 lines or 50KB (whichever is hit first). If truncated, full output is saved to a temp file. Optionally provide a timeout in seconds.","input_schema":{"type":"object","required":["command"],"properties":{"command":{"type":"string","description":"Shell command to execute"},"timeout":{"type":"number","description":"Timeout in seconds (optional, no default timeout)"}}}},{"name":"edit","description":"Edit a single file using exact text replacement. Every edits[].oldText must match a unique, non-overlapping region of the original file. If two changes affect the same block or nearby lines, merge them into one edit instead of emitting overlapping edits. Do not include large unchanged regions just to connect distant changes.","input_schema":{"type":"object","required":["path","edits"],"properties":{"path":{"type":"string","description":"Path to the file to edit (relative or absolute)"},"edits":{"type":"array","items":{"type":"object","required":["oldText","newText"],"properties":{"oldText":{"type":"string","description":"Exact text for one targeted replacement. It must be unique in the original file and must not overlap with any other edits[].oldText in the same call."},"newText":{"type":"string","description":"Replacement text for this targeted edit."}}},"description":"One or more targeted replacements. Each edit is matched against the original file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead."}}}},{"name":"write","description":"Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically creates parent directories.","input_schema":{"type":"object","required":["path","content"],"properties":{"path":{"type":"string","description":"Path to the file to write (relative or absolute)"},"content":{"type":"string","description":"Content to write to the file"}}}}]}} {"v":1,"type":"model_response","id":"b_9","reply_to":"a_8","payload":{"result":{"content":[{"type":"tool_call","id":"sdk_6","name":"bash","arguments":{"command":"cp '/work/scratch.md' '/work/artifacts/checklist.md'; printf 'shell output stays local\\n'"}}],"stop_reason":"tool_calls","usage":{"input_tokens":100,"output_tokens":50},"provider_state":"state_6"},"error":null}} {"v":1,"type":"model_request","id":"a_9","payload":{"messages":[{"role":"user","content":[{"type":"text","text":"Research deploy service X and create a checklist."}]},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_1","name":"confluence_search","arguments":{"query":"deploy service X"}}],"provider_state":"state_1"},{"role":"tool","tool_call_id":"sdk_1","name":"confluence_search","content":"{\"pages\":[{\"page_id\":\"847291\",\"title\":\"Deployment Guide\",\"space\":\"OPS\",\"url\":\"https://approved.example.com/pages/viewpage.action?pageId=847291\",\"snippet\":\"Deployment steps.\"}],\"pagination\":{\"offset\":0,\"limit\":10,\"has_more\":false}}","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_2","name":"confluence_view","arguments":{"page_id":"847291"}}],"provider_state":"state_2"},{"role":"tool","tool_call_id":"sdk_2","name":"confluence_view","content":"{\"page_id\":\"847291\",\"title\":\"Deployment Guide\",\"space\":\"OPS\",\"url\":\"https://approved.example.com/pages/viewpage.action?pageId=847291\",\"markdown\":\"Deploy service X using the release checklist.\",\"truncated\":false}","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_3","name":"write","arguments":{"path":"/work/scratch.md","content":"# Checklist\n\n- Stage service X\n"}}],"provider_state":"state_3"},{"role":"tool","tool_call_id":"sdk_3","name":"write","content":"Successfully wrote to /work/scratch.md","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_4","name":"read","arguments":{"path":"/work/scratch.md"}}],"provider_state":"state_4"},{"role":"tool","tool_call_id":"sdk_4","name":"read","content":"# Checklist\n\n- Stage service X\n","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_5","name":"edit","arguments":{"path":"/work/scratch.md","edits":[{"oldText":"Stage","newText":"Deploy"}]}}],"provider_state":"state_5"},{"role":"tool","tool_call_id":"sdk_5","name":"edit","content":"Successfully replaced 1 block(s) in /work/scratch.md.","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_6","name":"bash","arguments":{"command":"cp '/work/scratch.md' '/work/artifacts/checklist.md'; printf 'shell output stays local\\n'"}}],"provider_state":"state_6"},{"role":"tool","tool_call_id":"sdk_6","name":"bash","content":"shell output stays local\n","is_error":false}],"tools":[{"name":"confluence_search","description":"Search Confluence documentation using plain keywords. Returns matching pages, space keys, canonical URLs, and snippets.","input_schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search keywords (plain text, escaped into CQL by backend)"},"space":{"type":"string","maxLength":256,"description":"Optional space key filter (up to 256 UTF-8 bytes)"},"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of pages to return (1–50, default 10)"},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Pagination offset (default 0, maximum 10,000)"}},"additionalProperties":false}},{"name":"confluence_view","description":"Read a Confluence page by numeric page ID. Returns page title, space, canonical URL, and Markdown content.","input_schema":{"type":"object","required":["page_id"],"properties":{"page_id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric page ID string (e.g. '847291')"}},"additionalProperties":false}},{"name":"confluence_list_spaces","description":"List available Confluence spaces. Returns space keys and display names.","input_schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of spaces to return (1–50, default 25)"},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Pagination offset (default 0, maximum 10,000)"}},"additionalProperties":false}},{"name":"read","description":"Read regular text files up to 16 MiB. Output is truncated to 2000 lines or 50 KiB; use offset/limit for continuation. Use shell ranges for larger files. Image attachments are not supported by this text/tool model adapter.","input_schema":{"type":"object","required":["path"],"properties":{"path":{"type":"string","description":"Path to the file to read (relative or absolute)"},"offset":{"type":"number","description":"Line number to start reading from (1-indexed)"},"limit":{"type":"number","description":"Maximum number of lines to read"}}}},{"name":"bash","description":"Execute a bash command in the current working directory. Returns stdout and stderr. Output is truncated to last 2000 lines or 50KB (whichever is hit first). If truncated, full output is saved to a temp file. Optionally provide a timeout in seconds.","input_schema":{"type":"object","required":["command"],"properties":{"command":{"type":"string","description":"Shell command to execute"},"timeout":{"type":"number","description":"Timeout in seconds (optional, no default timeout)"}}}},{"name":"edit","description":"Edit a single file using exact text replacement. Every edits[].oldText must match a unique, non-overlapping region of the original file. If two changes affect the same block or nearby lines, merge them into one edit instead of emitting overlapping edits. Do not include large unchanged regions just to connect distant changes.","input_schema":{"type":"object","required":["path","edits"],"properties":{"path":{"type":"string","description":"Path to the file to edit (relative or absolute)"},"edits":{"type":"array","items":{"type":"object","required":["oldText","newText"],"properties":{"oldText":{"type":"string","description":"Exact text for one targeted replacement. It must be unique in the original file and must not overlap with any other edits[].oldText in the same call."},"newText":{"type":"string","description":"Replacement text for this targeted edit."}}},"description":"One or more targeted replacements. Each edit is matched against the original file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead."}}}},{"name":"write","description":"Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically creates parent directories.","input_schema":{"type":"object","required":["path","content"],"properties":{"path":{"type":"string","description":"Path to the file to write (relative or absolute)"},"content":{"type":"string","description":"Content to write to the file"}}}}]}} {"v":1,"type":"model_response","id":"b_10","reply_to":"a_9","payload":{"result":{"content":[{"type":"tool_call","id":"sdk_7","name":"read","arguments":{"path":"/work/scratch.md"}}],"stop_reason":"tool_calls","usage":{"input_tokens":100,"output_tokens":50},"provider_state":"state_7"},"error":null}} {"v":1,"type":"model_request","id":"a_10","payload":{"messages":[{"role":"user","content":[{"type":"text","text":"Research deploy service X and create a checklist."}]},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_1","name":"confluence_search","arguments":{"query":"deploy service X"}}],"provider_state":"state_1"},{"role":"tool","tool_call_id":"sdk_1","name":"confluence_search","content":"{\"pages\":[{\"page_id\":\"847291\",\"title\":\"Deployment Guide\",\"space\":\"OPS\",\"url\":\"https://approved.example.com/pages/viewpage.action?pageId=847291\",\"snippet\":\"Deployment steps.\"}],\"pagination\":{\"offset\":0,\"limit\":10,\"has_more\":false}}","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_2","name":"confluence_view","arguments":{"page_id":"847291"}}],"provider_state":"state_2"},{"role":"tool","tool_call_id":"sdk_2","name":"confluence_view","content":"{\"page_id\":\"847291\",\"title\":\"Deployment Guide\",\"space\":\"OPS\",\"url\":\"https://approved.example.com/pages/viewpage.action?pageId=847291\",\"markdown\":\"Deploy service X using the release checklist.\",\"truncated\":false}","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_3","name":"write","arguments":{"path":"/work/scratch.md","content":"# Checklist\n\n- Stage service X\n"}}],"provider_state":"state_3"},{"role":"tool","tool_call_id":"sdk_3","name":"write","content":"Successfully wrote to /work/scratch.md","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_4","name":"read","arguments":{"path":"/work/scratch.md"}}],"provider_state":"state_4"},{"role":"tool","tool_call_id":"sdk_4","name":"read","content":"# Checklist\n\n- Stage service X\n","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_5","name":"edit","arguments":{"path":"/work/scratch.md","edits":[{"oldText":"Stage","newText":"Deploy"}]}}],"provider_state":"state_5"},{"role":"tool","tool_call_id":"sdk_5","name":"edit","content":"Successfully replaced 1 block(s) in /work/scratch.md.","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_6","name":"bash","arguments":{"command":"cp '/work/scratch.md' '/work/artifacts/checklist.md'; printf 'shell output stays local\\n'"}}],"provider_state":"state_6"},{"role":"tool","tool_call_id":"sdk_6","name":"bash","content":"shell output stays local\n","is_error":false},{"role":"assistant","content":[{"type":"tool_call","id":"sdk_7","name":"read","arguments":{"path":"/work/scratch.md"}}],"provider_state":"state_7"},{"role":"tool","tool_call_id":"sdk_7","name":"read","content":"# Checklist\n\n- Deploy service X\n","is_error":false}],"tools":[{"name":"confluence_search","description":"Search Confluence documentation using plain keywords. Returns matching pages, space keys, canonical URLs, and snippets.","input_schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search keywords (plain text, escaped into CQL by backend)"},"space":{"type":"string","maxLength":256,"description":"Optional space key filter (up to 256 UTF-8 bytes)"},"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of pages to return (1–50, default 10)"},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Pagination offset (default 0, maximum 10,000)"}},"additionalProperties":false}},{"name":"confluence_view","description":"Read a Confluence page by numeric page ID. Returns page title, space, canonical URL, and Markdown content.","input_schema":{"type":"object","required":["page_id"],"properties":{"page_id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric page ID string (e.g. '847291')"}},"additionalProperties":false}},{"name":"confluence_list_spaces","description":"List available Confluence spaces. Returns space keys and display names.","input_schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of spaces to return (1–50, default 25)"},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Pagination offset (default 0, maximum 10,000)"}},"additionalProperties":false}},{"name":"read","description":"Read regular text files up to 16 MiB. Output is truncated to 2000 lines or 50 KiB; use offset/limit for continuation. Use shell ranges for larger files. Image attachments are not supported by this text/tool model adapter.","input_schema":{"type":"object","required":["path"],"properties":{"path":{"type":"string","description":"Path to the file to read (relative or absolute)"},"offset":{"type":"number","description":"Line number to start reading from (1-indexed)"},"limit":{"type":"number","description":"Maximum number of lines to read"}}}},{"name":"bash","description":"Execute a bash command in the current working directory. Returns stdout and stderr. Output is truncated to last 2000 lines or 50KB (whichever is hit first). If truncated, full output is saved to a temp file. Optionally provide a timeout in seconds.","input_schema":{"type":"object","required":["command"],"properties":{"command":{"type":"string","description":"Shell command to execute"},"timeout":{"type":"number","description":"Timeout in seconds (optional, no default timeout)"}}}},{"name":"edit","description":"Edit a single file using exact text replacement. Every edits[].oldText must match a unique, non-overlapping region of the original file. If two changes affect the same block or nearby lines, merge them into one edit instead of emitting overlapping edits. Do not include large unchanged regions just to connect distant changes.","input_schema":{"type":"object","required":["path","edits"],"properties":{"path":{"type":"string","description":"Path to the file to edit (relative or absolute)"},"edits":{"type":"array","items":{"type":"object","required":["oldText","newText"],"properties":{"oldText":{"type":"string","description":"Exact text for one targeted replacement. It must be unique in the original file and must not overlap with any other edits[].oldText in the same call."},"newText":{"type":"string","description":"Replacement text for this targeted edit."}}},"description":"One or more targeted replacements. Each edit is matched against the original file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead."}}}},{"name":"write","description":"Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically creates parent directories.","input_schema":{"type":"object","required":["path","content"],"properties":{"path":{"type":"string","description":"Path to the file to write (relative or absolute)"},"content":{"type":"string","description":"Content to write to the file"}}}}]}} {"v":1,"type":"model_response","id":"b_11","reply_to":"a_10","payload":{"result":{"content":[{"type":"text","text":"[Deployment Guide](https://approved.example.com/pages/viewpage.action?pageId=847291). See checklist.md."}],"stop_reason":"stop","usage":{"input_tokens":100,"output_tokens":50},"provider_state":"state_8"},"error":null}} {"v":1,"type":"collection_start","id":"a_11","payload":{"markdown":"[Deployment Guide](https://approved.example.com/pages/viewpage.action?pageId=847291). See checklist.md.","warnings":[]}} {"v":1,"type":"collection_ready","id":"b_12","reply_to":"a_11","payload":{}} {"v":1,"type":"artifact_begin","id":"a_12","payload":{"transfer_id":"a_t_1","name":"checklist.md","size_bytes":32}} {"v":1,"type":"artifact_ack","id":"b_13","reply_to":"a_12","payload":{"transfer_id":"a_t_1","decision":"accept","warning":null}} {"v":1,"type":"artifact_chunk","id":"a_13","payload":{"transfer_id":"a_t_1","index":0,"data_base64":"IyBDaGVja2xpc3QKCi0gRGVwbG95IHNlcnZpY2UgWAo="}} {"v":1,"type":"artifact_end","id":"a_14","payload":{"transfer_id":"a_t_1","size_bytes":32,"chunks":1}} {"v":1,"type":"artifact_ack","id":"b_14","reply_to":"a_14","payload":{"transfer_id":"a_t_1","decision":"stored","warning":null}} {"v":1,"type":"complete","id":"a_15","payload":{"accepted_transfer_count":1}}