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.1.0.tar.gz (8.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.1.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tibet_cortex-0.1.0.tar.gz
  • Upload date:
  • Size: 8.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.1.0.tar.gz
Algorithm Hash digest
SHA256 99382501ea2e86e709007b96796f5395b985f55d978d39ff8668c9b2df4d0312
MD5 fb6e8982551d21b39cb0539f2bc8943e
BLAKE2b-256 1b764473cb838a59e766b2ffc966c90983b7988eb5f7dbbd62adec2e65f27f52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tibet_cortex-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cdb2486c7af6d85bb4076d347f4ac3aa7260a5ddf12b79d286a08272c72d30c6
MD5 67fc081fc649718cece62f658b6ad9b6
BLAKE2b-256 c95bfe20281b5217805fb8caaae91e8f242569b26aec990cae8b4aa7c1ce13a7

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