Skip to main content

TIBET Cortex — Zero-trust AI knowledge processing. JIS-gated, Airlock-protected, TIBET-audited.

Project description

TIBET Cortex (Python)

Zero-trust AI knowledge processing. Data that protects itself.

Python client for the TIBET Cortex framework. For production use with memory-level security guarantees (mlock, zeroize), use the Rust crates.

Install

pip install tibet-cortex

Quick Start

JIS — Multi-Dimensional Access Control

from cortex import JisClaim, JisPolicy, JisGate

# Partner in strategy, EU, clearance 3
claim = JisClaim(
    actor="partner@mckinsey.com",
    clearance=3,
    role="partner",
    department="strategy",
    geo=["NL", "DE"],
)

# M&A document policy
policy = JisPolicy(
    min_clearance=3,
    allowed_roles=["partner"],
    allowed_departments=["strategy"],
    allowed_geos=["NL", "DE", "FR"],
)

verdict = JisGate.evaluate(claim, policy)
print(f"Access: {verdict.allowed}")  # True

# Intern tries same document
intern = JisClaim(actor="intern@mckinsey.com", clearance=1, role="intern")
verdict = JisGate.evaluate(intern, policy)
print(f"Access: {verdict.allowed}")  # False
print(f"Reasons: {[d.reason.value for d in verdict.denials]}")
# ['clearance_too_low', 'role_not_allowed', 'department_not_allowed', 'geo_restricted']

Envelope — JIS-Gated Data

from cortex import Envelope, EnvelopeBlock

env = Envelope(id="doc_001")
env.add_block(EnvelopeBlock.new_embedding(b"vector data"))
env.add_block(EnvelopeBlock.new_content(b"M&A strategy for client X", jis_level=3))

# Everyone can search (embedding is JIS 0)
assert env.embedding() is not None

# Only clearance 3+ can read content
assert env.content(accessor_jis_level=1) is None
assert env.content(accessor_jis_level=3) is not None

Airlock — Controlled Processing

from cortex import Airlock

airlock = Airlock()

result, session = airlock.process(
    data=b"sensitive document",
    actor="analyst@company.com",
    jis_level=2,
    callback=lambda plaintext: len(plaintext),
)

print(f"Result: {result}")
print(f"Duration: {session.duration_ms:.2f}ms")
print(f"Actor: {session.actor}")

Audit — Blackbox-met-Window

from cortex import AuditTrail

trail = AuditTrail(".cortex/audit.json")
trail.record_session(session, query_hash="sha256:abc", response_hash="sha256:def")

stats = trail.stats()
print(f"Queries: {stats['total_queries']}")
print(f"Chain intact: {stats['chain_intact']}")

Architecture

STORE     TBZ envelopes + JIS levels
GATE      Multi-dimensional JIS claims (role × dept × time × geo)
AIRLOCK   Zero plaintext lifetime (mlock + zeroize in Rust)
AUDIT     Blackbox-met-window trail (WHO/WHEN, not WHAT)
TIBET     Immutable provenance chain

Links

License

MIT OR Apache-2.0

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

tibet_cortex-0.2.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

tibet_cortex-0.2.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file tibet_cortex-0.2.0.tar.gz.

File metadata

  • Download URL: tibet_cortex-0.2.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for tibet_cortex-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a01d343bf898738ac90f52ed73e504e4bf06f7d9f6eb47393c00bbceda7754a9
MD5 832bf1c82e3ecb1c471ceff50475349d
BLAKE2b-256 f9a083e221000909ad5d23d979276a8d224cfb73a1fd25f292e226113637cd3f

See more details on using hashes here.

File details

Details for the file tibet_cortex-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: tibet_cortex-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for tibet_cortex-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c5f20bfbae8c5ee6513b6d11f7b37ae1d2dcb017782e6e91ad0f9489d69718a
MD5 6483f43e7242eb543b6818aba3086b9d
BLAKE2b-256 0dbf8db3be8fa1cfe34bc039067a8e8ba3afdc45f9de3205c31734a6c1bd27a8

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