Viewer Actions

# Controlling the Canvas

The connection is two-way. Not only does the viewer send context to the AI, but the AI can also programmatically trigger actions in the React UI.

### Agent's Tool Call

import { invokeViewerAction } from "pneuma";
await invokeViewerAction({
id: "navigate-to",
params: { slide: 10 }
});

### Vite Frontend Response

Viewport jumped to Slide 10

The user doesn't have to scroll. When the AI finishes editing slide 10, it brings the user's attention exactly where it's needed via the `ViewerContract`.