# UnifiedSlide Programable File Payload API - alpha36-fix11

This document aligns UnifiedSlide with the single-file processing policy v1.3.

## Direction split

- `OpenFile(request, context)` is a Host callback. WorkbenchControl or a package command asks Host to acquire a file.
- `SaveFile(payload, context)` is a Host callback. WorkbenchControl or a package command asks Host to write generated data.
- `EditorControl.openFile(payload, context)` is an EditorControl method. Host or WorkbenchControl passes already-acquired bytes to UnifiedSlide.
- `EditorControl.saveFile(payload, context)`, `saveAsFile(payload, context)`, and `exportFile(payload, context)` generate `payload.data` and return a `HostSavePayload/v1`.

## API

UnifiedSlideControl exposes:

```js
control.openFile(hostFilePayload, context);
control.saveFile(hostSavePayload, context);
control.saveAsFile(hostSavePayload, context);
control.exportFile(hostSavePayload, context);
control.getFileContext();
```

## Payloads

`HostFilePayload/v1` accepts `file`, `blob`, `arrayBuffer`, or `text` plus file metadata. `HostSavePayload/v1` returns `data`, `dataType`, `fileName`, `format`, `mimeType`, and `fileContext`.

The legacy workspace bridge implements the same methods while the full view migration continues, so OneEditor and Workbench-style hosts can use the stable API immediately.
