Thank you for your interest in contributing to IronCurtain! This is an early-stage research project and contributions are welcome.
-
Fork and clone the repository:
git clone https://github.com/provos/ironcurtain.git cd ironcurtain npm install -
(Recommended) Install Aikido Safe Chain to protect against supply chain attacks during development. It intercepts package installations and validates them against a threat intelligence database in real-time:
npm install -g @aikidosec/safe-chain safe-chain setup
-
Create a
.envfile with your LLM API key:echo "ANTHROPIC_API_KEY=sk-ant-..." > .env
-
Install the pre-commit hook (runs
format:checkandlintbefore each commit):npm run setup-hooks
-
Run the tests to verify your setup:
npm test
npm run build # TypeScript compilation + copy config assets to dist/
npm test # Run all tests (vitest)
npm run lint # Run ESLint
npm run format # Format code with Prettier
npm start "task" # Run the agent with a task (dev mode, uses tsx)Run a single test file or test by name:
npm test -- test/policy-engine.test.ts
npx test -- -t "denies delete_file"See TESTING.md for the full testing guide, including environment flags for LLM and Docker integration tests.
src/
├── agent/ # LLM agent using AI SDK v6
├── config/ # Configuration loading, constitution, MCP server definitions
├── pipeline/ # Constitution -> policy compilation pipeline
├── sandbox/ # V8 isolated execution environment (UTCP Code Mode)
├── session/ # Multi-turn session management, budgets, loop detection
├── trusted-process/ # Policy engine, MCP proxy, audit log, escalation
└── types/ # Shared type definitions
- ESM modules throughout (
.jsextensions in imports) - TypeScript strict mode
stderrfor diagnostic output,stdoutfor agent responses- Integration tests spawn real MCP server processes and need ~30s timeout
IronCurtain uses different transport mechanisms on Linux (UDS + --network=none) vs macOS (TCP + internal bridge network). If you develop on macOS, use the provided script to test in a Linux environment via Docker-in-Docker:
# One-time setup: create a separate clone for Linux (avoids native module conflicts)
git clone [email protected]:provos/ironcurtain ~/src/ironcurtain-linux
# Launch a Linux dev shell (builds the DinD image on first run)
./scripts/linux-dev.sh
# Or run a specific command
./scripts/linux-dev.sh npm testThe script automatically syncs your current branch to the Linux clone, installs dependencies with Linux-native binaries, and starts a Docker daemon inside the container. Push your changes before running the script so the Linux clone can pick them up.
To rebuild the image (e.g. after changing the Dockerfile in the script):
./scripts/linux-dev.sh --rebuildThe project includes a pre-commit hook that automatically runs format:check and lint before each commit. Install it with:
npm run setup-hooksThis copies .hooks/pre-commit into .git/hooks/. The hook prevents commits that have formatting or lint errors. To bypass it in exceptional cases, use git commit --no-verify (not recommended).
If the hook blocks your commit, fix the issues first:
npm run format # Auto-fix formatting
npm run lint # Check lint errors (fix manually)This project uses npm workspaces to manage local packages under packages/. When the root package.json depends on a workspace package (e.g., @provos/memory-mcp-server), use a normal semver range like "^0.1.3" — not "workspace:*".
The workspace:* protocol is pnpm-specific and causes npm install -g and npx to fail with EUNSUPPORTEDPROTOCOL. npm workspaces automatically resolves matching local packages during development, so the standard version range works for both local dev and published installs.
When publishing a new version of a workspace package, update the version range in the root package.json to match.
- Create a feature branch from
main. - Make your changes. Add tests for new functionality.
- Ensure the pre-commit hook is installed (
npm run setup-hooks). - Ensure all tests pass (
npm test), lint is clean (npm run lint), and code is formatted (npm run format:check). - Submit a pull request with a clear description of the change and its motivation.
- Testing -- More test scenarios, edge cases, and integration tests.
- MCP servers -- Adding support for new MCP servers and argument roles.
- Constitution examples -- Real-world constitution examples and templates.
- Documentation -- Improving guides, adding examples, fixing inaccuracies.
- Security review -- Analyzing the trust boundaries and finding gaps.
Please open an issue on GitHub with:
- A clear description of the problem or suggestion
- Steps to reproduce (for bugs)
- Expected vs. actual behavior
Be respectful and constructive. This is a research project -- we're all learning.
By contributing, you agree that your contributions will be licensed under the Apache-2.0 License.