Files
dirigent/crates/dirigent_protocol/tests/fixtures/session_updates.json
T
2026-05-08 01:59:04 +02:00

306 lines
7.2 KiB
JSON

[
{
"type": "user_message_chunk",
"message_id": "msg_user_001",
"content": {
"type": "text",
"text": "Hello, can you help me with this task?"
}
},
{
"type": "user_message_chunk",
"message_id": "msg_user_002",
"content": {
"type": "text",
"text": "I need to implement a new feature."
},
"_meta": {
"timestamp": "2025-11-10T12:00:00Z",
"source": "web_ui"
}
},
{
"type": "agent_message_chunk",
"message_id": "msg_agent_001",
"content": {
"type": "text",
"text": "I'll help you with that. Let me start by analyzing your code."
}
},
{
"type": "agent_message_chunk",
"message_id": "msg_agent_002",
"content": {
"type": "resource_link",
"uri": "file:///home/user/project/src/main.rs",
"name": "main.rs",
"mime_type": "text/x-rust"
},
"_meta": {
"provider": {
"name": "opencode",
"original_ids": {
"session_id": "ses_abc123",
"message_id": "msg_opencode_456"
}
}
}
},
{
"type": "agent_thought_chunk",
"message_id": "msg_agent_003",
"content": {
"type": "text",
"text": "Let me think about the best approach for this..."
}
},
{
"type": "agent_thought_chunk",
"message_id": "msg_agent_004",
"content": {
"type": "text",
"text": "I should first check the existing code structure to understand the architecture."
},
"_meta": {
"provider": {
"name": "anthropic",
"raw_excerpt": {
"thinking_type": "extended_thinking"
}
},
"duration_ms": 250
}
},
{
"type": "tool_call",
"message_id": "msg_agent_005",
"tool_call": {
"id": "call_001",
"tool_name": "bash",
"status": "pending",
"content": [],
"raw_input": {
"command": "ls -la",
"description": "List directory contents"
},
"title": "List files"
}
},
{
"type": "tool_call",
"message_id": "msg_agent_006",
"tool_call": {
"id": "call_002",
"tool_name": "read",
"status": "running",
"content": [
{
"type": "text",
"text": "Reading file contents..."
}
],
"raw_input": {
"file_path": "/home/user/project/README.md"
},
"title": "Read README"
},
"_meta": {
"started_at": "2025-11-10T12:01:00Z"
}
},
{
"type": "tool_call",
"message_id": "msg_agent_007",
"tool_call": {
"id": "call_003",
"tool_name": "grep",
"status": "completed",
"content": [
{
"type": "text",
"text": "Found 5 matches in the codebase."
}
],
"raw_input": {
"pattern": "TODO",
"path": "./src"
},
"raw_output": {
"matches": [
"src/main.rs:42:// TODO: Implement error handling",
"src/lib.rs:15:// TODO: Add documentation"
]
},
"title": "Search for TODO comments"
}
},
{
"type": "tool_call",
"message_id": "msg_agent_008",
"tool_call": {
"id": "call_004",
"tool_name": "write",
"status": "error",
"content": [],
"raw_input": {
"file_path": "/readonly/protected.txt",
"content": "Cannot write here"
},
"title": "Write to protected file",
"error": "Permission denied: /readonly/protected.txt is read-only"
},
"_meta": {
"provider": {
"name": "opencode"
}
}
},
{
"type": "tool_call_update",
"message_id": "msg_agent_009",
"tool_call_id": "call_002",
"tool_call": {
"id": "call_002",
"tool_name": "read",
"status": "completed",
"content": [
{
"type": "text",
"text": "# My Project\n\nThis is a sample README file.\n\n## Features\n\n- Feature 1\n- Feature 2"
}
],
"raw_input": {
"file_path": "/home/user/project/README.md"
},
"raw_output": {
"success": true,
"bytes_read": 120
},
"title": "Read README"
}
},
{
"type": "tool_call_update",
"message_id": "msg_agent_010",
"tool_call_id": "call_005",
"tool_call": {
"id": "call_005",
"tool_name": "bash",
"status": "running",
"content": [
{
"type": "text",
"text": "Compiling project...\n"
},
{
"type": "text",
"text": "Finished in 2.3s\n"
}
],
"raw_input": {
"command": "cargo build --release"
},
"title": "Build project",
"metadata": {
"execution_time_ms": 2300
}
},
"_meta": {
"chunk_index": 2
}
},
{
"type": "user_message_chunk",
"message_id": "msg_user_003",
"content": {
"type": "resource_link",
"uri": "https://docs.rs/serde/latest/serde/",
"name": "Serde Documentation"
}
},
{
"type": "agent_message_chunk",
"message_id": "msg_agent_011",
"content": {
"type": "text",
"text": "Here's the complete solution:\n\n```rust\nfn main() {\n println!(\"Hello, world!\");\n}\n```"
}
},
{
"type": "agent_thought_chunk",
"message_id": "msg_agent_012",
"content": {
"type": "resource_link",
"uri": "file:///home/user/.cache/analysis_results.json",
"name": "Analysis Results",
"mime_type": "application/json"
}
},
{
"type": "tool_call",
"message_id": "msg_agent_013",
"tool_call": {
"id": "call_006",
"tool_name": "glob",
"status": "completed",
"content": [
{
"type": "text",
"text": "src/main.rs\nsrc/lib.rs\nsrc/utils.rs"
}
],
"raw_input": {
"pattern": "src/**/*.rs"
},
"raw_output": {
"files": ["src/main.rs", "src/lib.rs", "src/utils.rs"]
},
"title": "Find Rust source files",
"metadata": {
"file_count": 3,
"total_size_bytes": 15420
}
},
"_meta": {
"provider": {
"name": "opencode",
"original_ids": {
"session_id": "ses_xyz789",
"message_id": "msg_oc_123",
"part_id": "prt_oc_456"
},
"raw_excerpt": {
"tool_state": "Completed"
}
},
"timestamp": "2025-11-10T12:05:30Z"
}
},
{
"type": "tool_call_update",
"message_id": "msg_agent_014",
"tool_call_id": "call_007",
"tool_call": {
"id": "call_007",
"tool_name": "bash",
"status": "error",
"content": [
{
"type": "text",
"text": "bash: invalid_command: command not found\n"
}
],
"raw_input": {
"command": "invalid_command --flag"
},
"error": "Command execution failed with exit code 127"
},
"_meta": {
"provider": {
"name": "opencode"
},
"exit_code": 127
}
}
]