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

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.12
File Size Uploaded
matrx_content_guard-0.1.12.tar.gz 52.7 kB Details

Built distribution (wheel)

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

Total release size: 82.9 kB

Release files / matrx_content_guard-0.1.12.tar.gz

Download URL matrx_content_guard-0.1.12.tar.gz
Size 52.7 kB
Tags Source
SHA-256 checksum
How to use checksums
abc113d7216346e8136177a76c27c7fa76528775fa3ace8eb56718ecfced4f0f
BLAKE2b-256 checksum
How to use checksums
731fd9881777b2f0d17ee2741adf2895f18e1be2962fd528a0b78b87a9831c45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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

Transparency log

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

Download URL matrx_content_guard-0.1.12-py3-none-any.whl
Size 30.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7516ead8fb08d9bc801410ce3b1d6bf3fb3af6be388722dc309798c8c524438
BLAKE2b-256 checksum
How to use checksums
6c87ab9ee551a0b99c6f9350e0e0d7689e6686c3d1578605f95e31b9e9ef568c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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

Transparency log

Release history Release notifications | RSS feed

This release

0.1.12 This release

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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