Deterministic HTML/CSS/JS content validation + patch/diff editing engine for the Matrx CMS agent-authoring layer
Project description
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>"
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file matrx_content_guard-0.1.0.tar.gz.
File metadata
- Download URL: matrx_content_guard-0.1.0.tar.gz
- Upload date:
- Size: 47.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50328fdda603e7261af4768d7b15950eeedab32c9b0b11c4f3d216a9c6fdf32a
|
|
| MD5 |
4cd65bfab001099b5b642e31e1b56abb
|
|
| BLAKE2b-256 |
a2e6a898e3e356670a549e85d155d863d32279bc4e06bf793b73d7e2931740ef
|
Provenance
The following attestation bundles were made for matrx_content_guard-0.1.0.tar.gz:
Publisher:
publish-package.yml on AI-Matrix-Engine/aidream
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matrx_content_guard-0.1.0.tar.gz -
Subject digest:
50328fdda603e7261af4768d7b15950eeedab32c9b0b11c4f3d216a9c6fdf32a - Sigstore transparency entry: 2155729306
- Sigstore integration time:
-
Permalink:
AI-Matrix-Engine/aidream@5614a848ff326a6eede65dbd775f4f66b183907c -
Branch / Tag:
refs/tags/matrx-content-guard/v0.1.0 - Owner: https://github.com/AI-Matrix-Engine
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-package.yml@5614a848ff326a6eede65dbd775f4f66b183907c -
Trigger Event:
push
-
Statement type:
File details
Details for the file matrx_content_guard-0.1.0-py3-none-any.whl.
File metadata
- Download URL: matrx_content_guard-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95a31beb6631af10a0c667434d0773d6641537abefff3d2df9d82635e508d0e9
|
|
| MD5 |
fc3610705579dfe0e5bad8104e78dece
|
|
| BLAKE2b-256 |
107d766949fbf60e7a6b98e5a6e1ba17ce15aad658f2188db399b782e71d0190
|
Provenance
The following attestation bundles were made for matrx_content_guard-0.1.0-py3-none-any.whl:
Publisher:
publish-package.yml on AI-Matrix-Engine/aidream
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matrx_content_guard-0.1.0-py3-none-any.whl -
Subject digest:
95a31beb6631af10a0c667434d0773d6641537abefff3d2df9d82635e508d0e9 - Sigstore transparency entry: 2155729398
- Sigstore integration time:
-
Permalink:
AI-Matrix-Engine/aidream@5614a848ff326a6eede65dbd775f4f66b183907c -
Branch / Tag:
refs/tags/matrx-content-guard/v0.1.0 - Owner: https://github.com/AI-Matrix-Engine
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-package.yml@5614a848ff326a6eede65dbd775f4f66b183907c -
Trigger Event:
push
-
Statement type: