Skip to main content

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

matrx_content_guard-0.1.2.tar.gz (50.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matrx_content_guard-0.1.2-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file matrx_content_guard-0.1.2.tar.gz.

File metadata

  • Download URL: matrx_content_guard-0.1.2.tar.gz
  • Upload date:
  • Size: 50.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for matrx_content_guard-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d5f7486430c6589f6c858e54315a1e637f1de743b05fcb8fd9faf9f372b8e800
MD5 36b0b8864f4ede7ca828ce9fae079b5c
BLAKE2b-256 e71999a7252f483242904668522523205f2ef0da6a69614cd2f8b9a08c9346f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for matrx_content_guard-0.1.2.tar.gz:

Publisher: publish-package.yml on AI-Matrix-Engine/aidream

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file matrx_content_guard-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for matrx_content_guard-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4346bbe8b24c96ef63da59b8fc5e33e11513a491d4a813763319efa5e8eaea69
MD5 3facd27647f9ae350be92baedb7461a8
BLAKE2b-256 09e7d7f9b98e4984b30f1852714fd91f4053939342878a7302e0b149ed259b9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for matrx_content_guard-0.1.2-py3-none-any.whl:

Publisher: publish-package.yml on AI-Matrix-Engine/aidream

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page