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.18

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.18
File Size Uploaded Provenance
matrx_content_guard-0.1.18.tar.gz 53.2 kB With provenance Details

Built distribution (wheel)

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

Total release size: 83.4 kB

Release files / matrx_content_guard-0.1.18.tar.gz

Download URL matrx_content_guard-0.1.18.tar.gz
Size 53.2 kB
Tags Source
SHA-256 checksum
How to use checksums
db0d728e39391c0a7286407aca9bf3097a4c8a64846ee4e05b6ab6aa72fb8e0c
BLAKE2b-256 checksum
How to use checksums
a9f7401d7cf5d6b5c9c1026a2eb737a5af8d08a1e542b289c747c8e6f44d3b93
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 Oct 25, 2026.

Transparency log

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

Download URL matrx_content_guard-0.1.18-py3-none-any.whl
Size 30.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9bb393601c98aead5fddc77f7de3af0b32da2e24d3c21aef9913f49118410bd7
BLAKE2b-256 checksum
How to use checksums
27cb23f74ac13587d2c28c1b3a498f5554b118361ec0f595dfe7ed1e8c926cae
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 Oct 25, 2026.

Transparency log

Security for matrx-content-guard 0.1.18

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for matrx_content_guard-0.1.18.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 Oct 25, 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