Skip to main content

fred-capability-html-artifact

A Fred agent capability (html_artifact) that lets an agent produce a static HTML/CSS artifact rendered live in a sandboxed viewer beside the chat — the "artifact" experience, scoped to static markup (no JavaScript) for v1.

Design: docs/swift/rfc/HTML-ARTIFACT-CAPABILITY-RFC.md (issue #2478).

What it ships

  • Tool render_html_artifact(title, html, css, artifact_id?) — HTML and CSS kept separate (for the viewer's tabs). Combined size is capped at 256 KB.
  • Chat part HtmlArtifactPart (type="html_artifact") carrying the markup inline — no owned table, no router, no migration (v1 is read-only; chat ui_parts persist across reload).
  • Prompt fragment steering the model to call the tool (static only) instead of pasting code into the chat.
  • Side panel html_artifact_pane (frontend): read-only tabs Preview (sandboxed <iframe srcdoc>) / HTML / CSS + download.

execution_models=("react",): the prompt overlay is a wrap_model_call hook, so the tool is carried by the capability's middleware (mirrors writable_document).

Registration

Installing this package IS the registration — the fred.capabilities entry point in pyproject.toml points the fred-agents pod at HtmlArtifactCapability. It is wired into the pod as an editable path dependency of apps/fred-agents.

Security

The markup is untrusted LLM output; the backend carries only inert strings. Safe rendering is a frontend concern (RFC §4.7): the Preview iframe uses sandbox without allow-scripts/allow-same-origin and a restrictive CSP, so no script runs and no network egress is possible.

Dev

make code-quality   # ruff + format + type-check
make test           # offline unit tests

Metadata

Release files for fred-capability-html-artifact 4.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fred-capability-html-artifact 4.5.1
File Size Uploaded Provenance Actions
fred_capability_html_artifact-4.5.1.tar.gz 10.0 kB Without provenance Details for fred_capability_html_artifact-4.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fred-capability-html-artifact 4.5.1
File Interpreter ABI Platform Actions
fred_capability_html_artifact-4.5.1-py3-none-any.whl Python 3 none any Details for fred_capability_html_artifact-4.5.1-py3-none-any.whl

Total release size: 18.3 kB

Release files / fred_capability_html_artifact-4.5.1.tar.gz

Download URL fred_capability_html_artifact-4.5.1.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b1f2e32db66ab0f67b9e68990349ba76bfefadf6fbb654fbc60361385f676699
BLAKE2b-256 checksum
How to use checksums
73b09c37b11fed4da9253676c4ce1980ff5c7faf1f97630d8bc319df74c227e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / fred_capability_html_artifact-4.5.1-py3-none-any.whl

Download URL fred_capability_html_artifact-4.5.1-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0fe497bc3d3075fb921a53e24e1b67a8aa8ef8dce466acd8688aa203c5ae27fb
BLAKE2b-256 checksum
How to use checksums
b5eb91ad7bbfc653396947f7e6ae81319f8c670a708786a2694661e4b16608a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for fred-capability-html-artifact 4.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page