dual-model-airlock 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Trishula Software
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,238 @@
1
+ Metadata-Version: 2.4
2
+ Name: dual-model-airlock
3
+ Version: 2.0.0
4
+ Summary: Sovereign Framework-Free IPC & REST Bridge Between Google Gemini, Claude Code CLI, Codex, and Aider.
5
+ Author-email: Trishula Software <trishulasoftware@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://trishulasoftware.github.io
8
+ Project-URL: Repository, https://github.com/TrishulaSoftware/Dual-Model-Airlock
9
+ Project-URL: Documentation, https://github.com/TrishulaSoftware/Dual-Model-Airlock#readme
10
+ Keywords: gemini,claude-code,ai-agents,mcp,ipc-bridge,multi-agent,autogen-alternative,skill
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Dynamic: license-file
23
+
24
+ # Dual-Model-Airlock v2.0 ๐Ÿ”ฑ
25
+
26
+ > **Sovereign, Framework-Free IPC & REST Security Bridge Between Google Gemini, Claude Code CLI, Codex, and Aider.**
27
+ > *Re-engineered zero-dependency alternative to AutoGen 0.4 โ€” built for cross-model code execution, adversarial code review, and SKILL.md agent workflows.*
28
+
29
+ [![CI Verify](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/ci-verify.yml/badge.svg)](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/ci-verify.yml)
30
+ [![Cross-Platform Matrix](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/cross-os-matrix.yml/badge.svg)](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/cross-os-matrix.yml)
31
+ [![CodeQL](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/codeql.yml/badge.svg)](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/codeql.yml)
32
+ [![Bandit](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/bandit-sast.yml/badge.svg)](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/bandit-sast.yml)
33
+ [![Security Scan](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/security-scan.yml/badge.svg)](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/security-scan.yml)
34
+ [![Docker GHCR](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/docker-ghcr.yml/badge.svg)](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/docker-ghcr.yml)
35
+ [![Package Publish](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/package-publish.yml/badge.svg)](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/package-publish.yml)
36
+ [![Dependency Review](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/dependency-review.yml)
37
+ [![Website: Trishula Software](https://img.shields.io/badge/Trishula_Software-trishulasoftware.github.io-00e5ff?style=flat&logo=googlechrome&logoColor=white)](https://trishulasoftware.github.io)
38
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
39
+ [![Python: 3.10+](https://img.shields.io/badge/Python-3.10%2B-brightgreen.svg)](#)
40
+ [![Dependencies: Zero (Stdlib Only)](https://img.shields.io/badge/Dependencies-0%20(Pure%20Stdlib)-brightgreen.svg)](#)
41
+ [![Agent Skill: SKILL.md Ready](https://img.shields.io/badge/Agent%20Skill-SKILL.md%20Ready-d946ef.svg)](SKILL.md)
42
+
43
+ **Official Website & Sovereign Architecture Suite:** [**https://trishulasoftware.github.io**](https://trishulasoftware.github.io)
44
+
45
+ ---
46
+
47
+ ## โšก Why Dual-Model-Airlock?
48
+
49
+ 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.
50
+
51
+ **Dual-Model-Airlock v2.0** solves cross-model orchestration in **pure Python standard library (`0` third-party packages, `< 15 MB` RAM)**:
52
+ - **Multi-Agent CLI Auto-Discovery:** Automatically resolves installed CLI coding workers across Windows, macOS, and Linux (`claude`, `gemini`, `codex`, `aider`).
53
+ - **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.
54
+ - **Perimeter Security Gate (`AirlockSecurityPolicy`):** Neutralizes destructive shell patterns, enforces workspace `allowed_cwd_roots` sandboxing, gates raw shell execution, and protects the threaded REST gateway with Bearer token authentication (`AIRLOCK_API_KEY`) and a `1 MiB` payload ceiling.
55
+ - **Deterministic Process Control & Audit Receipts:** Tracks live OS `Popen` handles for real subprocess termination (`cancel_task`), detects modified git worktree artifacts automatically, and signs every execution with a SHA-256 `receipt_hash` + optional `JSONL` audit trail.
56
+ - **Native `SKILL.md` Compatibility:** Ships with a root [`SKILL.md`](SKILL.md) ready to drop into Claude Code, Cursor, Copilot, Antigravity, or **Agensi.io**.
57
+
58
+ ---
59
+
60
+ ## ๐Ÿš€ Architecture Diagram
61
+
62
+ ```mermaid
63
+ sequenceDiagram
64
+ autonumber
65
+ actor Dev as Developer / Orchestrator
66
+ participant Gem as Commander Agent (Gemini / IDE)
67
+ participant Air as Dual-Model-Airlock (Port 9090 / IPC)
68
+ participant Gate as AirlockSecurityPolicy
69
+ participant Wkr as CLI Worker (Claude Code / Gemini / Codex)
70
+
71
+ Dev->>Gem: "Refactor engine & run cross-model security review"
72
+ Gem->>Air: POST /v1/dispatch or /v1/review (Bearer Auth)
73
+ Air->>Gate: Validate prompt, CWD sandbox & destructive patterns
74
+ Gate-->>Air: Policy Approved
75
+ Air->>Wkr: Popen(["claude", "-p", "..."], shell=False)
76
+ Wkr-->>Air: stdout/stderr, exit code, modified git artifacts
77
+ Air-->>Gem: AirlockResult + SHA-256 receipt_hash + JSONL audit log
78
+ Gem-->>Dev: Verified multi-model synthesis & diff report
79
+ ```
80
+
81
+ ---
82
+
83
+ ## ๐Ÿ“ฆ Quickstart
84
+
85
+ ### 1. Clone & Verify Environment (Zero `pip` Dependencies Required)
86
+ ```bash
87
+ git clone https://github.com/TrishulaSoftware/Dual-Model-Airlock.git
88
+ cd Dual-Model-Airlock
89
+
90
+ # Discover installed local CLI coding agents (Claude Code, Gemini CLI, Codex, Aider)
91
+ python cli.py workers
92
+ ```
93
+
94
+ *(Optional)* Install as a global/editable CLI command (`dual-model-airlock`):
95
+ ```bash
96
+ pip install -e .
97
+ ```
98
+
99
+ ### 2. Dispatch a Cross-Model Task via CLI
100
+ ```bash
101
+ # Execute directly through the local IPC bridge
102
+ python cli.py dispatch "Refactor vector_math.py for zero-copy memory safety" --worker claude
103
+
104
+ # Run a Dual-Model Adversarial Code Review on a file
105
+ python cli.py review airlock_bridge.py --worker claude --commander gemini-2.5-pro
106
+ ```
107
+
108
+ ### 3. Start the Threaded HTTP REST Gateway
109
+ ```bash
110
+ python cli.py serve --port 9090 --api-key "my-secret-token" --audit-log airlock_audit.jsonl
111
+ ```
112
+
113
+ #### Health & Worker Discovery Check
114
+ ```bash
115
+ curl http://127.0.0.1:9090/health
116
+ ```
117
+ ```json
118
+ {
119
+ "status": "online",
120
+ "service": "Dual-Model-Airlock",
121
+ "version": "2.0.0",
122
+ "claude_available": true,
123
+ "auth_enabled": true,
124
+ "workers": {
125
+ "claude": { "available": true, "binary": "/usr/local/bin/claude" },
126
+ "gemini": { "available": true, "binary": "/usr/local/bin/gemini" },
127
+ "codex": { "available": false, "binary": null },
128
+ "aider": { "available": false, "binary": null },
129
+ "mock": { "available": true, "binary": "builtin://mock" }
130
+ }
131
+ }
132
+ ```
133
+
134
+ ### 4. Python SDK Usage
135
+ ```python
136
+ from airlock_core import AirlockTask, AirlockSecurityPolicy
137
+ from airlock_bridge import AirlockBridge
138
+
139
+ # Enforce workspace sandboxing and JSONL audit logging
140
+ policy = AirlockSecurityPolicy(
141
+ allow_shell_worker=False,
142
+ allowed_cwd_roots=["."]
143
+ )
144
+ bridge = AirlockBridge(policy=policy, audit_log_path="airlock_audit.jsonl")
145
+
146
+ # 1. Standard Task Dispatch
147
+ task = AirlockTask(
148
+ prompt="Generate edge-case unit tests for token bucket rate limiter",
149
+ commander="gemini-2.5-pro",
150
+ worker="claude",
151
+ timeout_sec=180
152
+ )
153
+ result = bridge.execute_task(task)
154
+ print(f"Status: {result.status.value} | Receipt: {result.receipt_hash}")
155
+ print(f"Artifacts Modified: {result.artifacts_generated}")
156
+
157
+ # 2. Dual-Model Adversarial Code Review
158
+ review_res = bridge.execute_review(
159
+ target="airlock_server.py",
160
+ commander="gemini-2.5-pro",
161
+ worker="claude"
162
+ )
163
+ print(review_res.stdout)
164
+ ```
165
+
166
+ ---
167
+
168
+ ## ๐Ÿ›ก๏ธ SWOT Hardening & Benchmark Matrix (v2.0)
169
+
170
+ | Capability | AutoGen 0.4 | CrewAI | Dual-Model-Airlock v2.0 |
171
+ | :--- | :---: | :---: | :---: |
172
+ | **External Dependencies** | 25+ packages | 35+ packages | **0 (Pure Python Standard Library)** |
173
+ | **Gemini โ†” Claude Code CLI Pipe** | Custom Actor Required | Not Native | **Native IPC + Threaded REST** |
174
+ | **Built-In Cross-Model Code Review** | Manual Setup | Manual Setup | **`cli.py review` & `POST /v1/review`** |
175
+ | **Perimeter Security Gate** | External | External | **`AirlockSecurityPolicy` + CWD Sandbox + Bearer Auth** |
176
+ | **Cryptographic Execution Receipts** | None | None | **SHA-256 `receipt_hash` + JSONL Audit Trail** |
177
+ | **Memory Footprint** | ~350 MB | ~600 MB | **< 15 MB** |
178
+ | **`SKILL.md` Agent Store Ready** | No | No | **Yes ([`SKILL.md`](SKILL.md) included)** |
179
+
180
+ ---
181
+
182
+ ## โš™๏ธ CI/CD, Security & Supply Chain
183
+
184
+ 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):
185
+
186
+ | Workflow | File | Triggers | What it proves |
187
+ | :--- | :--- | :--- | :--- |
188
+ | **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 |
189
+ | **Cross-Platform Matrix** | `cross-os-matrix.yml` | push / PR | Same suite on Ubuntu, macOS and Windows (Python 3.11 / 3.12), `fail-fast: false` |
190
+ | **CodeQL SAST** | `codeql.yml` | push / PR / weekly | GitHub semantic analysis (`security-extended`, `security-and-quality`) โ†’ Security tab |
191
+ | **Bandit SAST** | `bandit-sast.yml` | push / PR / weekly | Python AST security linter, SARIF uploaded to Security โ†’ Code scanning |
192
+ | **Security Scan** | `security-scan.yml` | push / PR / weekly | TruffleHog verified-secret scan, `pip-audit`, zero-secret file gate |
193
+ | **Dependency Review** | `dependency-review.yml` | pull requests | Blocks PRs adding vulnerable (>= moderate) or non-permissive-licence dependencies |
194
+ | **Docker โ†’ GHCR** | `docker-ghcr.yml` | push to `main` / `v*.*.*` tags | Builds the hardened image and publishes it to GitHub Packages |
195
+ | **Package Publish** | `package-publish.yml` | `v*.*.*` tags / manual | PEP 517 `build`, `twine check --strict`, `SHA256SUMS`, GitHub Release assets, PyPI via OIDC Trusted Publishing |
196
+
197
+ > **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*.
198
+
199
+ ### ๐Ÿณ Container image (GitHub Packages)
200
+
201
+ ```bash
202
+ docker pull ghcr.io/trishulasoftware/dual-model-airlock:latest
203
+
204
+ # Hardened runtime (read-only FS, no capabilities, resource-capped)
205
+ docker run --rm --read-only --cap-drop=ALL --security-opt=no-new-privileges \
206
+ --memory=256m --cpus=1.0 --pids-limit=32 \
207
+ --tmpfs /tmp:rw,noexec,nosuid,size=64m \
208
+ ghcr.io/trishulasoftware/dual-model-airlock:latest workers
209
+ ```
210
+
211
+ 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.
212
+
213
+ ### ๐Ÿ“ฆ Releasing
214
+
215
+ ```bash
216
+ git tag v2.0.1 && git push origin v2.0.1
217
+ ```
218
+
219
+ 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).
220
+
221
+ ### ๐Ÿ”’ Reporting findings
222
+
223
+ 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`.
224
+
225
+ ---
226
+
227
+ ## ๐Ÿงช Running the Test Suite
228
+
229
+ ```bash
230
+ python -m unittest discover -s . -p "test_*.py" -v
231
+ ```
232
+
233
+ ---
234
+
235
+ ## ๐Ÿ“œ License & Attribution
236
+
237
+ Distributed under the **MIT License**. Engineered by [**Trishula Software**](https://trishulasoftware.github.io).
238
+ *Pierce The Heavens ๐Ÿ”ฑ*
@@ -0,0 +1,215 @@
1
+ # Dual-Model-Airlock v2.0 ๐Ÿ”ฑ
2
+
3
+ > **Sovereign, Framework-Free IPC & REST Security Bridge Between Google Gemini, Claude Code CLI, Codex, and Aider.**
4
+ > *Re-engineered zero-dependency alternative to AutoGen 0.4 โ€” built for cross-model code execution, adversarial code review, and SKILL.md agent workflows.*
5
+
6
+ [![CI Verify](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/ci-verify.yml/badge.svg)](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/ci-verify.yml)
7
+ [![Cross-Platform Matrix](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/cross-os-matrix.yml/badge.svg)](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/cross-os-matrix.yml)
8
+ [![CodeQL](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/codeql.yml/badge.svg)](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/codeql.yml)
9
+ [![Bandit](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/bandit-sast.yml/badge.svg)](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/bandit-sast.yml)
10
+ [![Security Scan](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/security-scan.yml/badge.svg)](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/security-scan.yml)
11
+ [![Docker GHCR](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/docker-ghcr.yml/badge.svg)](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/docker-ghcr.yml)
12
+ [![Package Publish](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/package-publish.yml/badge.svg)](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/package-publish.yml)
13
+ [![Dependency Review](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/TrishulaSoftware/Dual-Model-Airlock/actions/workflows/dependency-review.yml)
14
+ [![Website: Trishula Software](https://img.shields.io/badge/Trishula_Software-trishulasoftware.github.io-00e5ff?style=flat&logo=googlechrome&logoColor=white)](https://trishulasoftware.github.io)
15
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
16
+ [![Python: 3.10+](https://img.shields.io/badge/Python-3.10%2B-brightgreen.svg)](#)
17
+ [![Dependencies: Zero (Stdlib Only)](https://img.shields.io/badge/Dependencies-0%20(Pure%20Stdlib)-brightgreen.svg)](#)
18
+ [![Agent Skill: SKILL.md Ready](https://img.shields.io/badge/Agent%20Skill-SKILL.md%20Ready-d946ef.svg)](SKILL.md)
19
+
20
+ **Official Website & Sovereign Architecture Suite:** [**https://trishulasoftware.github.io**](https://trishulasoftware.github.io)
21
+
22
+ ---
23
+
24
+ ## โšก Why Dual-Model-Airlock?
25
+
26
+ 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.
27
+
28
+ **Dual-Model-Airlock v2.0** solves cross-model orchestration in **pure Python standard library (`0` third-party packages, `< 15 MB` RAM)**:
29
+ - **Multi-Agent CLI Auto-Discovery:** Automatically resolves installed CLI coding workers across Windows, macOS, and Linux (`claude`, `gemini`, `codex`, `aider`).
30
+ - **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.
31
+ - **Perimeter Security Gate (`AirlockSecurityPolicy`):** Neutralizes destructive shell patterns, enforces workspace `allowed_cwd_roots` sandboxing, gates raw shell execution, and protects the threaded REST gateway with Bearer token authentication (`AIRLOCK_API_KEY`) and a `1 MiB` payload ceiling.
32
+ - **Deterministic Process Control & Audit Receipts:** Tracks live OS `Popen` handles for real subprocess termination (`cancel_task`), detects modified git worktree artifacts automatically, and signs every execution with a SHA-256 `receipt_hash` + optional `JSONL` audit trail.
33
+ - **Native `SKILL.md` Compatibility:** Ships with a root [`SKILL.md`](SKILL.md) ready to drop into Claude Code, Cursor, Copilot, Antigravity, or **Agensi.io**.
34
+
35
+ ---
36
+
37
+ ## ๐Ÿš€ Architecture Diagram
38
+
39
+ ```mermaid
40
+ sequenceDiagram
41
+ autonumber
42
+ actor Dev as Developer / Orchestrator
43
+ participant Gem as Commander Agent (Gemini / IDE)
44
+ participant Air as Dual-Model-Airlock (Port 9090 / IPC)
45
+ participant Gate as AirlockSecurityPolicy
46
+ participant Wkr as CLI Worker (Claude Code / Gemini / Codex)
47
+
48
+ Dev->>Gem: "Refactor engine & run cross-model security review"
49
+ Gem->>Air: POST /v1/dispatch or /v1/review (Bearer Auth)
50
+ Air->>Gate: Validate prompt, CWD sandbox & destructive patterns
51
+ Gate-->>Air: Policy Approved
52
+ Air->>Wkr: Popen(["claude", "-p", "..."], shell=False)
53
+ Wkr-->>Air: stdout/stderr, exit code, modified git artifacts
54
+ Air-->>Gem: AirlockResult + SHA-256 receipt_hash + JSONL audit log
55
+ Gem-->>Dev: Verified multi-model synthesis & diff report
56
+ ```
57
+
58
+ ---
59
+
60
+ ## ๐Ÿ“ฆ Quickstart
61
+
62
+ ### 1. Clone & Verify Environment (Zero `pip` Dependencies Required)
63
+ ```bash
64
+ git clone https://github.com/TrishulaSoftware/Dual-Model-Airlock.git
65
+ cd Dual-Model-Airlock
66
+
67
+ # Discover installed local CLI coding agents (Claude Code, Gemini CLI, Codex, Aider)
68
+ python cli.py workers
69
+ ```
70
+
71
+ *(Optional)* Install as a global/editable CLI command (`dual-model-airlock`):
72
+ ```bash
73
+ pip install -e .
74
+ ```
75
+
76
+ ### 2. Dispatch a Cross-Model Task via CLI
77
+ ```bash
78
+ # Execute directly through the local IPC bridge
79
+ python cli.py dispatch "Refactor vector_math.py for zero-copy memory safety" --worker claude
80
+
81
+ # Run a Dual-Model Adversarial Code Review on a file
82
+ python cli.py review airlock_bridge.py --worker claude --commander gemini-2.5-pro
83
+ ```
84
+
85
+ ### 3. Start the Threaded HTTP REST Gateway
86
+ ```bash
87
+ python cli.py serve --port 9090 --api-key "my-secret-token" --audit-log airlock_audit.jsonl
88
+ ```
89
+
90
+ #### Health & Worker Discovery Check
91
+ ```bash
92
+ curl http://127.0.0.1:9090/health
93
+ ```
94
+ ```json
95
+ {
96
+ "status": "online",
97
+ "service": "Dual-Model-Airlock",
98
+ "version": "2.0.0",
99
+ "claude_available": true,
100
+ "auth_enabled": true,
101
+ "workers": {
102
+ "claude": { "available": true, "binary": "/usr/local/bin/claude" },
103
+ "gemini": { "available": true, "binary": "/usr/local/bin/gemini" },
104
+ "codex": { "available": false, "binary": null },
105
+ "aider": { "available": false, "binary": null },
106
+ "mock": { "available": true, "binary": "builtin://mock" }
107
+ }
108
+ }
109
+ ```
110
+
111
+ ### 4. Python SDK Usage
112
+ ```python
113
+ from airlock_core import AirlockTask, AirlockSecurityPolicy
114
+ from airlock_bridge import AirlockBridge
115
+
116
+ # Enforce workspace sandboxing and JSONL audit logging
117
+ policy = AirlockSecurityPolicy(
118
+ allow_shell_worker=False,
119
+ allowed_cwd_roots=["."]
120
+ )
121
+ bridge = AirlockBridge(policy=policy, audit_log_path="airlock_audit.jsonl")
122
+
123
+ # 1. Standard Task Dispatch
124
+ task = AirlockTask(
125
+ prompt="Generate edge-case unit tests for token bucket rate limiter",
126
+ commander="gemini-2.5-pro",
127
+ worker="claude",
128
+ timeout_sec=180
129
+ )
130
+ result = bridge.execute_task(task)
131
+ print(f"Status: {result.status.value} | Receipt: {result.receipt_hash}")
132
+ print(f"Artifacts Modified: {result.artifacts_generated}")
133
+
134
+ # 2. Dual-Model Adversarial Code Review
135
+ review_res = bridge.execute_review(
136
+ target="airlock_server.py",
137
+ commander="gemini-2.5-pro",
138
+ worker="claude"
139
+ )
140
+ print(review_res.stdout)
141
+ ```
142
+
143
+ ---
144
+
145
+ ## ๐Ÿ›ก๏ธ SWOT Hardening & Benchmark Matrix (v2.0)
146
+
147
+ | Capability | AutoGen 0.4 | CrewAI | Dual-Model-Airlock v2.0 |
148
+ | :--- | :---: | :---: | :---: |
149
+ | **External Dependencies** | 25+ packages | 35+ packages | **0 (Pure Python Standard Library)** |
150
+ | **Gemini โ†” Claude Code CLI Pipe** | Custom Actor Required | Not Native | **Native IPC + Threaded REST** |
151
+ | **Built-In Cross-Model Code Review** | Manual Setup | Manual Setup | **`cli.py review` & `POST /v1/review`** |
152
+ | **Perimeter Security Gate** | External | External | **`AirlockSecurityPolicy` + CWD Sandbox + Bearer Auth** |
153
+ | **Cryptographic Execution Receipts** | None | None | **SHA-256 `receipt_hash` + JSONL Audit Trail** |
154
+ | **Memory Footprint** | ~350 MB | ~600 MB | **< 15 MB** |
155
+ | **`SKILL.md` Agent Store Ready** | No | No | **Yes ([`SKILL.md`](SKILL.md) included)** |
156
+
157
+ ---
158
+
159
+ ## โš™๏ธ CI/CD, Security & Supply Chain
160
+
161
+ 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):
162
+
163
+ | Workflow | File | Triggers | What it proves |
164
+ | :--- | :--- | :--- | :--- |
165
+ | **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 |
166
+ | **Cross-Platform Matrix** | `cross-os-matrix.yml` | push / PR | Same suite on Ubuntu, macOS and Windows (Python 3.11 / 3.12), `fail-fast: false` |
167
+ | **CodeQL SAST** | `codeql.yml` | push / PR / weekly | GitHub semantic analysis (`security-extended`, `security-and-quality`) โ†’ Security tab |
168
+ | **Bandit SAST** | `bandit-sast.yml` | push / PR / weekly | Python AST security linter, SARIF uploaded to Security โ†’ Code scanning |
169
+ | **Security Scan** | `security-scan.yml` | push / PR / weekly | TruffleHog verified-secret scan, `pip-audit`, zero-secret file gate |
170
+ | **Dependency Review** | `dependency-review.yml` | pull requests | Blocks PRs adding vulnerable (>= moderate) or non-permissive-licence dependencies |
171
+ | **Docker โ†’ GHCR** | `docker-ghcr.yml` | push to `main` / `v*.*.*` tags | Builds the hardened image and publishes it to GitHub Packages |
172
+ | **Package Publish** | `package-publish.yml` | `v*.*.*` tags / manual | PEP 517 `build`, `twine check --strict`, `SHA256SUMS`, GitHub Release assets, PyPI via OIDC Trusted Publishing |
173
+
174
+ > **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*.
175
+
176
+ ### ๐Ÿณ Container image (GitHub Packages)
177
+
178
+ ```bash
179
+ docker pull ghcr.io/trishulasoftware/dual-model-airlock:latest
180
+
181
+ # Hardened runtime (read-only FS, no capabilities, resource-capped)
182
+ docker run --rm --read-only --cap-drop=ALL --security-opt=no-new-privileges \
183
+ --memory=256m --cpus=1.0 --pids-limit=32 \
184
+ --tmpfs /tmp:rw,noexec,nosuid,size=64m \
185
+ ghcr.io/trishulasoftware/dual-model-airlock:latest workers
186
+ ```
187
+
188
+ 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.
189
+
190
+ ### ๐Ÿ“ฆ Releasing
191
+
192
+ ```bash
193
+ git tag v2.0.1 && git push origin v2.0.1
194
+ ```
195
+
196
+ 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).
197
+
198
+ ### ๐Ÿ”’ Reporting findings
199
+
200
+ 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`.
201
+
202
+ ---
203
+
204
+ ## ๐Ÿงช Running the Test Suite
205
+
206
+ ```bash
207
+ python -m unittest discover -s . -p "test_*.py" -v
208
+ ```
209
+
210
+ ---
211
+
212
+ ## ๐Ÿ“œ License & Attribution
213
+
214
+ Distributed under the **MIT License**. Engineered by [**Trishula Software**](https://trishulasoftware.github.io).
215
+ *Pierce The Heavens ๐Ÿ”ฑ*