# Run Event Stream

The run event stream is the single source of truth for V3.

Every user interface must consume these events instead of inventing its own progress state.

## CLI Example

```powershell
99p run "整理当前workspace并报告状态"
99p worker once <run_id>
99p events <run_id>
```

Expected non-mutating run:

```text
run.created
agent.selected
step.started
agent.thinking
tool.call
tool.result
step.completed
run.completed
```

Expected mutating/deployment run:

```text
run.created
agent.selected
step.started
agent.thinking
tool.call
tool.result
approval.required
```

## Event Rules

- `run.created` starts a run.
- `agent.selected` must identify the main orchestrator and routed model tier.
- `agent.thinking` may be streamed to CLI, Telegram, Cockpit, and app.99pages.uk.
- `tool.call` records what the agent intends to do.
- `tool.result` records what actually happened.
- `approval.required` blocks mutating work until a human approves.
- `approval.granted` resumes the run.
- `run.completed` or `run.failed` terminates the run.

## Approval Gate

Deployment-like tasks must not mutate local devices, VPS hosts, browsers, or files without approval.

The current deterministic worker detects English `deploy` and Chinese `部署` as deployment-like placeholders. The production ReAct worker should replace this with a policy engine backed by MCP action metadata.

## Model Policy

The main orchestrator is always MiniMax 2.5 through AI Workforce.

The event stream may expose `model_tier`, but not raw provider internals.
