> ## Documentation Index
> Fetch the complete documentation index at: https://docs.framework.vibeworkapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OutputChunk Reference

> All output variants from agents

## Streaming Text

### TextDelta

```rust theme={null}
OutputChunk::TextDelta(String)
```

Streaming text token. Append to display.

### TextComplete

```rust theme={null}
OutputChunk::TextComplete(String)
```

Full text response (non-streaming mode).

## Extended Thinking

### ThinkingDelta

```rust theme={null}
OutputChunk::ThinkingDelta(String)
```

Streaming thinking token.

### ThinkingComplete

```rust theme={null}
OutputChunk::ThinkingComplete(String)
```

Complete thinking block.

## Tool Execution

### ToolStart

```rust theme={null}
OutputChunk::ToolStart {
    id: String,
    name: String,
    input: Value,
}
```

Tool execution starting.

### ToolProgress

```rust theme={null}
OutputChunk::ToolProgress {
    id: String,
    output: String,
}
```

Tool progress update.

### ToolEnd

```rust theme={null}
OutputChunk::ToolEnd {
    id: String,
    result: ToolResult,
}
```

Tool execution complete.

## Permissions

### PermissionRequest

```rust theme={null}
OutputChunk::PermissionRequest {
    tool_name: String,
    action: String,
    input: Value,
    details: Option<String>,
}
```

Permission needed for tool.

## Subagents

### SubAgentSpawned

```rust theme={null}
OutputChunk::SubAgentSpawned {
    session_id: String,
    agent_type: String,
}
```

Subagent created.

### SubAgentOutput

```rust theme={null}
OutputChunk::SubAgentOutput {
    session_id: String,
    chunk: Box<OutputChunk>,
}
```

Subagent output forwarded.

### SubAgentComplete

```rust theme={null}
OutputChunk::SubAgentComplete {
    session_id: String,
    result: Option<String>,
}
```

Subagent finished.

## State & Control

### StateChange

```rust theme={null}
OutputChunk::StateChange(AgentState)
```

Agent state transition.

### Status

```rust theme={null}
OutputChunk::Status(String)
```

Status message.

### Error

```rust theme={null}
OutputChunk::Error(String)
```

Error occurred.

### Done

```rust theme={null}
OutputChunk::Done
```

Turn complete.

## Ask User Questions

### AskUserQuestion

```rust theme={null}
OutputChunk::AskUserQuestion {
    request_id: String,
    questions: Vec<UserQuestion>,
}
```

Agent asking multiple-choice questions.

## Usage

```rust theme={null}
while let Ok(chunk) = rx.recv().await {
    match chunk {
        OutputChunk::TextDelta(text) => print!("{}", text),
        OutputChunk::ToolStart { name, .. } => println!("\nUsing {}", name),
        OutputChunk::PermissionRequest { tool_name, action, .. } => {
            show_permission_dialog(tool_name, action);
        }
        OutputChunk::Done => break,
        _ => {}
    }
}
```
