Dual-Model-Airlock v2.0 🔱
Sovereign, Framework-Free IPC & REST Security Bridge Between Google Gemini, Claude Code CLI, Codex, and Aider.
Re-engineered zero-dependency alternative to AutoGen 0.4 — built for cross-model code execution, adversarial code review, and SKILL.md agent workflows.
Official Website & Sovereign Architecture Suite: https://trishulasoftware.github.io
⚡ Why Dual-Model-Airlock?
Heavy multi-agent frameworks like AutoGen 0.4 and CrewAI introduce massive dependency graphs (25–35+ packages), breaking API churn, and hundreds of megabytes of actor overhead just to let one frontier model delegate a coding or verification task to another CLI agent.
Dual-Model-Airlock v2.0 solves cross-model orchestration in pure Python standard library (0 third-party packages, < 15 MB RAM):
- Multi-Agent CLI Auto-Discovery: Automatically resolves installed CLI coding workers across Windows, macOS, and Linux (
claude,gemini,codex,aider). - Adversarial Dual-Model Code Review (
review): Have Model A (e.g., Gemini Pro) write code and dispatch it through the Airlock to Model B (e.g., Claude Code CLI) for a structured 4-point security, concurrency, and bug audit. - Perimeter Security Gate (
AirlockSecurityPolicy): Neutralizes destructive shell patterns, enforces workspaceallowed_cwd_rootssandboxing, gates raw shell execution, and protects the threaded REST gateway with Bearer token authentication (AIRLOCK_API_KEY) and a1 MiBpayload ceiling. - Deterministic Process Control & Audit Receipts: Tracks live OS
Popenhandles for real subprocess termination (cancel_task), detects modified git worktree artifacts automatically, and signs every execution with a SHA-256receipt_hash+ optionalJSONLaudit trail. - Native
SKILL.mdCompatibility: Ships with a rootSKILL.mdready to drop into Claude Code, Cursor, Copilot, Antigravity, or Agensi.io.
🚀 Architecture Diagram
sequenceDiagram
autonumber
actor Dev as Developer / Orchestrator
participant Gem as Commander Agent (Gemini / IDE)
participant Air as Dual-Model-Airlock (Port 9090 / IPC)
participant Gate as AirlockSecurityPolicy
participant Wkr as CLI Worker (Claude Code / Gemini / Codex)
Dev->>Gem: "Refactor engine & run cross-model security review"
Gem->>Air: POST /v1/dispatch or /v1/review (Bearer Auth)
Air->>Gate: Validate prompt, CWD sandbox & destructive patterns
Gate-->>Air: Policy Approved
Air->>Wkr: Popen(["claude", "-p", "..."], shell=False)
Wkr-->>Air: stdout/stderr, exit code, modified git artifacts
Air-->>Gem: AirlockResult + SHA-256 receipt_hash + JSONL audit log
Gem-->>Dev: Verified multi-model synthesis & diff report
📦 Quickstart
1. Clone & Verify Environment (Zero pip Dependencies Required)
git clone https://github.com/TrishulaSoftware/Dual-Model-Airlock.git
cd Dual-Model-Airlock
# Discover installed local CLI coding agents (Claude Code, Gemini CLI, Codex, Aider)
python cli.py workers
(Optional) Install as a global/editable CLI command (dual-model-airlock):
pip install -e .
2. Dispatch a Cross-Model Task via CLI
# Execute directly through the local IPC bridge
python cli.py dispatch "Refactor vector_math.py for zero-copy memory safety" --worker claude
# Run a Dual-Model Adversarial Code Review on a file
python cli.py review airlock_bridge.py --worker claude --commander gemini-2.5-pro
3. Start the Threaded HTTP REST Gateway
python cli.py serve --port 9090 --api-key "my-secret-token" --audit-log airlock_audit.jsonl
Health & Worker Discovery Check
curl http://127.0.0.1:9090/health
{
"status": "online",
"service": "Dual-Model-Airlock",
"version": "2.0.0",
"claude_available": true,
"auth_enabled": true,
"workers": {
"claude": { "available": true, "binary": "/usr/local/bin/claude" },
"gemini": { "available": true, "binary": "/usr/local/bin/gemini" },
"codex": { "available": false, "binary": null },
"aider": { "available": false, "binary": null },
"mock": { "available": true, "binary": "builtin://mock" }
}
}
4. Python SDK Usage
from airlock_core import AirlockTask, AirlockSecurityPolicy
from airlock_bridge import AirlockBridge
# Enforce workspace sandboxing and JSONL audit logging
policy = AirlockSecurityPolicy(
allow_shell_worker=False,
allowed_cwd_roots=["."]
)
bridge = AirlockBridge(policy=policy, audit_log_path="airlock_audit.jsonl")
# 1. Standard Task Dispatch
task = AirlockTask(
prompt="Generate edge-case unit tests for token bucket rate limiter",
commander="gemini-2.5-pro",
worker="claude",
timeout_sec=180
)
result = bridge.execute_task(task)
print(f"Status: {result.status.value} | Receipt: {result.receipt_hash}")
print(f"Artifacts Modified: {result.artifacts_generated}")
# 2. Dual-Model Adversarial Code Review
review_res = bridge.execute_review(
target="airlock_server.py",
commander="gemini-2.5-pro",
worker="claude"
)
print(review_res.stdout)
🛡️ SWOT Hardening & Benchmark Matrix (v2.0)
| Capability | AutoGen 0.4 | CrewAI | Dual-Model-Airlock v2.0 |
|---|---|---|---|
| External Dependencies | 25+ packages | 35+ packages | 0 (Pure Python Standard Library) |
| Gemini ↔ Claude Code CLI Pipe | Custom Actor Required | Not Native | Native IPC + Threaded REST |
| Built-In Cross-Model Code Review | Manual Setup | Manual Setup | cli.py review & POST /v1/review |
| Perimeter Security Gate | External | External | AirlockSecurityPolicy + CWD Sandbox + Bearer Auth |
| Cryptographic Execution Receipts | None | None | SHA-256 receipt_hash + JSONL Audit Trail |
| Memory Footprint | ~350 MB | ~600 MB | < 15 MB |
SKILL.md Agent Store Ready |
No | No | Yes (SKILL.md included) |
⚙️ CI/CD, Security & Supply Chain
Every push and pull request to main is proven by 8 GitHub Actions workflows (all jobs enforce timeout-minutes: 10 and cancel-in-progress: true to protect the free-tier quota):
| Workflow | File | Triggers | What it proves |
|---|---|---|---|
| CI Verify | ci-verify.yml |
push / PR | Zero-secret gate (tokens.json, .env, keys), ruff lint, syntax compile, full unit suite, CLI workers + review — Python 3.10 / 3.11 / 3.12 |
| Cross-Platform Matrix | cross-os-matrix.yml |
push / PR | Same suite on Ubuntu, macOS and Windows (Python 3.11 / 3.12), fail-fast: false |
| CodeQL SAST | codeql.yml |
push / PR / weekly | GitHub semantic analysis (security-extended, security-and-quality) → Security tab |
| Bandit SAST | bandit-sast.yml |
push / PR / weekly | Python AST security linter, SARIF uploaded to Security → Code scanning |
| Security Scan | security-scan.yml |
push / PR / weekly | TruffleHog verified-secret scan, pip-audit, zero-secret file gate |
| Dependency Review | dependency-review.yml |
pull requests | Blocks PRs adding vulnerable (>= moderate) or non-permissive-licence dependencies |
| Docker → GHCR | docker-ghcr.yml |
push to main / v*.*.* tags |
Builds the hardened image and publishes it to GitHub Packages |
| Package Publish | package-publish.yml |
v*.*.* tags / manual |
PEP 517 build, twine check --strict, SHA256SUMS, GitHub Release assets, PyPI via OIDC Trusted Publishing |
Zero secrets in Git. No API keys or tokens are stored in the repository. CI authenticates with the built-in
GITHUB_TOKEN(GHCR) and OIDC (PyPI). Any CI-only secret belongs in Settings → Secrets and variables → Actions.
🐳 Container image (GitHub Packages)
docker pull ghcr.io/trishulasoftware/dual-model-airlock:latest
# Hardened runtime (read-only FS, no capabilities, resource-capped)
docker run --rm --read-only --cap-drop=ALL --security-opt=no-new-privileges \
--memory=256m --cpus=1.0 --pids-limit=32 \
--tmpfs /tmp:rw,noexec,nosuid,size=64m \
ghcr.io/trishulasoftware/dual-model-airlock:latest workers
The image runs as a non-root user, exposes 9090 and ships a /health HEALTHCHECK. Add --network=none for fully isolated runs, and never bake tokens.json, .env or API keys into image layers. Tags: latest, sha-<short>, and semver (1.2.3, 1.2) on release tags.
📦 Releasing
git tag v2.0.1 && git push origin v2.0.1
Tagging triggers package-publish.yml (wheel + sdist + SHA256SUMS attached to a GitHub Release, then PyPI via Trusted Publishing — configure the pypi environment and a Trusted Publisher for dual-model-airlock on PyPI first) and docker-ghcr.yml (semver image tags).
🔒 Reporting findings
Static-analysis results live under Security → Code scanning. Intentional patterns carry an inline justification (# nosec) — for example the shell=False subprocess calls gated by AirlockSecurityPolicy, and the http(s)-only URL helper in cli.py.
🧪 Running the Test Suite
python -m unittest discover -s . -p "test_*.py" -v
📜 License & Attribution
Distributed under the MIT License. Engineered by Trishula Software.
Pierce The Heavens 🔱
Metadata
Release files for dual-model-airlock 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dual_model_airlock-2.0.0.tar.gz | 21.9 kB | With provenance | Details for dual_model_airlock-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dual_model_airlock-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for dual_model_airlock-2.0.0-py3-none-any.whl |
Total release size: 42.2 kB
Release files / dual_model_airlock-2.0.0.tar.gz
| Download URL | dual_model_airlock-2.0.0.tar.gz |
|---|---|
| Size | 21.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4aadcd2f519bc6b486be91388ecf04fa190fbcd9fbd9d0baa641bf823765d7c7
|
|
BLAKE2b-256 checksum How to use checksums |
5189f9f1147ba3215fd26dbdfa25707bef528bc60e3a95d458678f1186b3730c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / dual_model_airlock-2.0.0-py3-none-any.whl
| Download URL | dual_model_airlock-2.0.0-py3-none-any.whl |
|---|---|
| Size | 20.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a01257e581cad10aedb8488250a573a96633ced921b3ae2eb9baa884f8458ae1
|
|
BLAKE2b-256 checksum How to use checksums |
0d1df7c725fc25582ccd7e52d71749d6fc6d049fcd8d9a1a38b3cfeb27c0458a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logSecurity for dual-model-airlock 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dual_model_airlock-2.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.