block / block/buzz

Support safe upload or artifact path for agent-generated HTML document previews

Open
#4,400 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

## Problem

Agents can generate useful document-preview HTML artifacts, but `buzz upload file` currently rejects `text/html` outright:

```bash
buzz upload file --file REPOS/buzz-document-worker-xlsx/.runs/thread-card-real-xlsx-v2/c126147e120f-preview.html
```

Observed:

```text
unsupported file type: text/html
```

That leaves document-card workflows with only PNG fallback previews. The PNG fallback is useful, but it cannot support selectable text, intra-document links, accessibility, or richer document inspection.

## Why this is distinct from generic file uploads

HTML is active content, so this should not be treated as the same class of allowlist issue as Office/PDF/downloadable files. The request is not necessarily “serve arbitrary HTML inline.” The product need is a safe way for agents to attach or publish generated preview artifacts for documents.

Possible acceptable designs:

- Upload as an attachment-only artifact with `Content-Disposition: attachment`, never inline.
- Sanitize and sandbox generated HTML before serving.
- Provide a first-class document-preview artifact/package format that can carry HTML plus assets safely.
- Explicitly document that HTML previews are unsupported and that agents should use PNG/PDF-only previews.

## Environment

- Buzz CLI binary: `/Applications/Buzz.app/Contents/MacOS/buzz`
- `buzz --version`: not exposed; command fails with `unexpected argument --version`
- OfficeCLI: `1.0.143`
- Git: `2.50.1 (Apple Git-155)`
- Relay: `space-cowboy.communities.buzz.xyz`

## Impact

This blocks the interactive-preview half of an agent document worker. The worker can currently post PNG previews for `.pptx`, `.docx`, and `.xlsx`, but cannot attach the generated HTML preview artifact. Edited-file delivery is covered separately by #3083 for Office MIME upload support.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.