Skip to main content

matrx-content-guard

Deterministic HTML/CSS/JS content validation + patch/diff editing for the Matrx CMS agent-authoring layer. Pure Python, no DB access, no tool-framework imports — every agent mutation to html_pages / client_* content flows through this library before it's written.

See CONTRACT.md for the full typed API and FEATURE.md for the durable design notes (parser choice, permissive-first policy rationale, byte- preservation guarantee).

from matrx_content_guard import validate_content, apply_patch, SearchReplacePatch, SearchReplaceHunk

report = validate_content("<script>alert(1)</script>", "html_page_document")
report.blocked  # False — inline script is a supported feature; only genuinely dangerous constructs block.

result = apply_patch(
    "<h1>Hello</h1>",
    SearchReplacePatch(hunks=[SearchReplaceHunk(search="Hello", replace="Hi")]),
)
result.result  # "<h1>Hi</h1>"

Metadata

Release files for matrx-content-guard 0.1.21

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

Source distribution (sdist)

Source distribution for matrx-content-guard 0.1.21
File Size Uploaded Provenance Actions
matrx_content_guard-0.1.21.tar.gz 57.8 kB With provenance Details for matrx_content_guard-0.1.21.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for matrx-content-guard 0.1.21
File Interpreter ABI Platform Actions
matrx_content_guard-0.1.21-py3-none-any.whl Python 3 none any Details for matrx_content_guard-0.1.21-py3-none-any.whl

Total release size: 89.4 kB

Release files / matrx_content_guard-0.1.21.tar.gz

Download URL matrx_content_guard-0.1.21.tar.gz
Size 57.8 kB
Tags Source
SHA-256 checksum
How to use checksums
61e42b81b4ce5e6a6d4d0135f95ddf66faabc1df78d41adbe397d1c683abb8e5
BLAKE2b-256 checksum
How to use checksums
b690c5a975ece3bc46d0d769668cf30114e98f0fbac3ccc98843b8efd0a7eb7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / matrx_content_guard-0.1.21-py3-none-any.whl

Download URL matrx_content_guard-0.1.21-py3-none-any.whl
Size 31.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ffd0a1f38c109f8c1b18593d67189471e387766b5af05780f357a057bea41594
BLAKE2b-256 checksum
How to use checksums
af69c388e1d9be07e8d4d90f8fdce41f90e1925e54cbc84cb58512f941606b4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for matrx-content-guard 0.1.21

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for matrx_content_guard-0.1.21.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

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