Skip to main content

Local enforcement SDK and simulation environment for AI governance.

Project description

Waveframe Guard

Stop unsafe AI and automated actions before they execute.

Waveframe Guard enforces governance at the execution boundary. If an action violates policy, it never runs.

Example

This example assumes a published contract artifact exists at contracts/finance-core-0.3.1.contract.json. In your application, point contract_path at the contract published by your governance workflow.

from pathlib import Path

from waveframe_guard import install_guard, guard

install_guard(
    actor={"id": "user-1", "type": "human", "role": "intern"},
    contract_path=Path("contracts") / "finance-core-0.3.1.contract.json"
)

@guard
def transfer(amount):
    print(f"Transferred ${amount}")

transfer(100)
Execution blocked: required role not satisfied: manager

What Waveframe Guard Does

  • Intercepts function execution
  • Loads published contract artifacts
  • Evaluates governance rules before execution
  • Blocks invalid actions deterministically
  • Continues enforcement even if Cloud is unavailable

Local vs Cloud

Mode Behavior
Local Fast, local enforcement
Cloud Policy sync, audit, and attestation

Guard enforces locally. Cloud provides authority, audit, and verification.

Fail Modes

Mode Behavior
cache (default) Use cached policy if Cloud is unavailable
closed Block if Cloud is unavailable and no cached policy exists
open Allow execution if policy is unavailable and mark the decision unverified

Install

pip install waveframe-guard cricore-contract-compiler cricore-proposal-normalizer

Live Demo

python examples/live_enforcement_demo.py

The demo shows:

  • an intern blocked by policy
  • a manager allowed by policy
  • cached local enforcement during a simulated Cloud outage

Published Contracts

Guard runtime consumes published governance authority artifacts:

from pathlib import Path

install_guard(
    actor={"id": "user-1", "type": "human", "role": "manager"},
    contract_path=Path("contracts") / "finance-core-0.3.1.contract.json"
)

Inline policy dictionaries are authored and compiled before runtime. Guard loads the compiled contract artifact and enforces against it locally.

Guard also records contract metadata in runtime context for audit and telemetry:

{
    "contract_id": "finance-core",
    "contract_version": "0.3.1",
    "contract_hash": "..."
}

Why This Exists

Most AI systems can suggest, warn, or log.

Waveframe Guard is the layer that can stop execution.

Architecture Note

The Waveframe Guard SDK operates independently and does not require Cloud components to enforce governance locally.

The cloud directory contains experimental Cloud control plane components and is not required for SDK operation.

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

waveframe_guard-0.3.1.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

waveframe_guard-0.3.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file waveframe_guard-0.3.1.tar.gz.

File metadata

  • Download URL: waveframe_guard-0.3.1.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for waveframe_guard-0.3.1.tar.gz
Algorithm Hash digest
SHA256 56e1e522f326117e211a92ff151bc3edf17c593d643d0b9ce2a19520d3f12c38
MD5 34761791cc37312dfd565b2d6c96b06a
BLAKE2b-256 f66fb855351539cd13c79abce917c4c8db72a9520417f569afd4f6da9f98f231

See more details on using hashes here.

File details

Details for the file waveframe_guard-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for waveframe_guard-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 79830adc20c46f77e70248e19d78b0d9b93176e79b051f682400c841a5c24427
MD5 e4dae90500a17ecc91b05fc5227d8369
BLAKE2b-256 3dedef44fc0c683820ffe10aa481f4c7618e75c6f74e0c9516c04d11e64edee2

See more details on using hashes here.

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