{"_id":"@dropfly/x2000-brain-fleet","_rev":"2-0ebdff5f2adccdf966535cf71869d33e","name":"@dropfly/x2000-brain-fleet","dist-tags":{"latest":"2.1.0"},"versions":{"2.0.0":{"name":"@dropfly/x2000-brain-fleet","version":"2.0.0","keywords":["ai","autonomous","brain-fleet","dropfly","ceo-brain","coo-brain"],"author":{"name":"DropFly Inc."},"license":"MIT","_id":"@dropfly/x2000-brain-fleet@2.0.0","maintainers":[{"name":"dropfly","email":"dropflyai@gmail.com"}],"dist":{"shasum":"ab0f5b1d0153444b8db9b7afad260cf9c1969fb7","tarball":"https://registry.npmjs.org/@dropfly/x2000-brain-fleet/-/x2000-brain-fleet-2.0.0.tgz","fileCount":2633,"integrity":"sha512-4IIEMKQVuSj2jODs8XK+2hNtzQpU4Wh3FzFHNZRXDSaGKicjezjPbFC17DeKDrg0kUVwnAjH6sxytMsRQq4jhQ==","signatures":[{"sig":"MEQCIEx7EwpafyrJvkimAecylNFofxJ6eQ6L5r+GTbJTYftWAiAI3hnODdZbS4IgbOPKA10I66vVUdEYEf1CS7BQZSKSkg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23409454},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":"./dist/index.js","./core":"./dist/core/index.js","./tools":"./dist/tools/index.js","./brains":"./dist/brains/index.js"},"gitHead":"344eb8daa4fb165b5f7d8eac37e1070c2888811d","scripts":{"dev":"tsx watch src/index.ts","build":"tsc","start":"node dist/index.js","start:ceo":"BRAIN_ROLE=CEO node dist/tools/brain-sync.js","start:coo":"BRAIN_ROLE=COO node dist/tools/brain-sync.js","sync:brains":"npm run build && npm run start:ceo & npm run start:coo","assign:brain":"tsx src/tools/assign-brain.ts","fleet:status":"tsx src/tools/fleet-status.ts","test:communication":"tsx src/test/test-brain-communication.ts"},"_npmUser":{"name":"dropfly","email":"dropflyai@gmail.com"},"_npmVersion":"10.9.4","description":"DropFly Inc. 50-Brain Autonomous AI Fleet","directories":{},"_nodeVersion":"22.22.0","dependencies":{"pg":"^8.20.0","ws":"^8.16.0","ora":"^9.3.0","zod":"^3.22.0","hono":"^4.12.8","uuid":"^9.0.0","chalk":"^5.6.2","bullmq":"^5.71.0","dotenv":"^17.3.1","express":"^4.18.2","ioredis":"^5.10.0","commander":"^14.0.3","compromise":"^14.15.0","discord.js":"^14.25.1","googleapis":"^171.4.0","node-fetch":"^3.3.2","nodemailer":"^8.0.2","playwright":"^1.41.0","@slack/bolt":"^4.6.0","@slack/types":"^2.20.0","@faker-js/faker":"^10.4.0","@anthropic-ai/sdk":"^0.24.0","@hono/node-server":"^1.19.11","@inquirer/prompts":"^8.3.0","@supabase/supabase-js":"^2.39.0","@anthropic-ai/claude-agent-sdk":"^0.2.74"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","@types/ws":"^8.18.1","typescript":"^5.4.5","@types/node":"^20.11.0","@types/uuid":"^9.0.0","@types/express":"^5.0.6","@types/nodemailer":"^6.4.14"},"_npmOperationalInternal":{"tmp":"tmp/x2000-brain-fleet_2.0.0_1774634887995_0.9126121754990479","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@dropfly/x2000-brain-fleet","version":"2.1.0","description":"DropFly Inc. 50-Brain Autonomous AI Fleet","main":"dist/index.js","type":"module","scripts":{"build":"tsc","dev":"tsx watch src/index.ts","start":"node dist/index.js","start:ceo":"BRAIN_ROLE=CEO node dist/tools/brain-sync.js","start:coo":"BRAIN_ROLE=COO node dist/tools/brain-sync.js","test:communication":"tsx src/test/test-brain-communication.ts","sync:brains":"npm run build && npm run start:ceo & npm run start:coo","fleet:status":"tsx src/tools/fleet-status.ts","assign:brain":"tsx src/tools/assign-brain.ts"},"author":{"name":"DropFly Inc."},"license":"MIT","dependencies":{"@anthropic-ai/claude-agent-sdk":"^0.2.74","@anthropic-ai/sdk":"^0.24.0","@faker-js/faker":"^10.4.0","@hono/node-server":"^1.19.11","@inquirer/prompts":"^8.3.0","@slack/bolt":"^4.6.0","@slack/types":"^2.20.0","@supabase/supabase-js":"^2.39.0","bullmq":"^5.71.0","chalk":"^5.6.2","commander":"^14.0.3","compromise":"^14.15.0","discord.js":"^14.25.1","dotenv":"^17.3.1","express":"^4.18.2","googleapis":"^171.4.0","hono":"^4.12.8","ioredis":"^5.10.0","node-fetch":"^3.3.2","nodemailer":"^8.0.2","ora":"^9.3.0","pg":"^8.20.0","playwright":"^1.41.0","uuid":"^9.0.0","ws":"^8.16.0","zod":"^4.0.0"},"devDependencies":{"@types/express":"^5.0.6","@types/node":"^20.11.0","@types/nodemailer":"^6.4.14","@types/uuid":"^9.0.8","@types/ws":"^8.18.1","tsx":"^4.21.0","typescript":"^5.9.3"},"exports":{".":"./dist/index.js","./brains":"./dist/brains/index.js","./core":"./dist/core/index.js","./tools":"./dist/tools/index.js"},"keywords":["ai","autonomous","brain-fleet","dropfly","ceo-brain","coo-brain"],"engines":{"node":">=18.0.0"},"_id":"@dropfly/x2000-brain-fleet@2.1.0","gitHead":"4f77c6a76bf3f85ef6a577d8d2b5c56c983e1754","types":"./dist/index.d.ts","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-ziuvRlgJxxmN8fg7QhaJU6rPrZX6Osjg4E/e4O0jZ7d3mPpNFu//jACQ06Z9gcSjJThJ2YbLJ1gt0nSC69aTng==","shasum":"eddfdd5873c9e65847cd72bcbd8dd3b1683769e7","tarball":"https://registry.npmjs.org/@dropfly/x2000-brain-fleet/-/x2000-brain-fleet-2.1.0.tgz","fileCount":2713,"unpackedSize":23959664,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIF1r0zZDQFz1q/6IrP7splH6iTMY1E03Xaa3Cu8SDC8mAiBHa7eKx9F3nlj4THMrNLYWz6uBV9THPgCUHYr6+Xq92g=="}]},"_npmUser":{"name":"dropfly","email":"dropflyai@gmail.com"},"directories":{},"maintainers":[{"name":"dropfly","email":"dropflyai@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/x2000-brain-fleet_2.1.0_1774793874935_0.34197549697622853"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-27T18:08:07.903Z","modified":"2026-03-29T14:17:55.460Z","2.0.0":"2026-03-27T18:08:08.332Z","2.1.0":"2026-03-29T14:17:55.363Z"},"author":{"name":"DropFly Inc."},"license":"MIT","keywords":["ai","autonomous","brain-fleet","dropfly","ceo-brain","coo-brain"],"description":"DropFly Inc. 50-Brain Autonomous AI Fleet","maintainers":[{"name":"dropfly","email":"dropflyai@gmail.com"}],"readme":"# X2000\n\n> Autonomous AI Fleet Platform -- 50 Specialized Brains -- 11 LLM Providers -- Forever Learning\n\n<!-- badges -->\n<!-- ![Build](https://img.shields.io/github/actions/workflow/status/YOUR_ORG/x2000/ci.yml?branch=main) -->\n<!-- ![License](https://img.shields.io/badge/license-MIT-blue) -->\n<!-- ![Node](https://img.shields.io/badge/node-%3E%3D18-green) -->\n\n---\n\n## What is X2000\n\nX2000 is an autonomous AI fleet platform that orchestrates 50 specialized brains to build and operate businesses. A CEO Brain decomposes every task, delegates to domain-expert brains (engineering, marketing, finance, legal, and 45 more), and synthesizes the results -- all governed by 5-layer guardrails and an earned-autonomy trust system. Brains debate through a structured Tension Protocol, learn from every outcome via forever-learning memory, and communicate across 13 channels. X2000 works while you sleep.\n\n---\n\n## Prerequisites\n\n| Requirement | Details |\n|-------------|---------|\n| **Node.js** | v18 or later (`node -v`) |\n| **Redis** | Required for the worker system (BullMQ queues, supervisor heartbeats) |\n| **Git** | For version control and CLI operations |\n| **LLM Provider** | At least one: Claude Max subscription, any provider API key, or Ollama (free, local) |\n\n---\n\n## Quick Start\n\n```bash\n# Install globally\nnpm install -g x2000\n\n# Run the setup wizard (5 minutes)\nx2000 setup\n\n# Start the gateway\nx2000 start\n```\n\nNo source code is exposed -- the npm package ships compiled JavaScript only. Brain doctrine files (CLAUDE.md) are included for the AgentLoop to load at runtime.\n\n---\n\n## Setup Wizard\n\nRunning `npm start setup` configures X2000 step by step:\n\n| Step | What It Configures |\n|------|--------------------|\n| **Dependencies** | Checks Node.js 18+ and Git are installed |\n| **Provider** | Choose your LLM provider -- Claude, OpenAI, Ollama, or 8 others |\n| **Supabase** | Optional persistent memory backend |\n| **Channels** | Enable channels -- Telegram, WhatsApp, iMessage, Discord, Email |\n| **Autonomy** | Set the trust level (1-4) -- how much freedom X2000 has |\n| **Agent Identity** | Name your AI agent and set its personality |\n| **Owner & Team** | Your name, email, company, and team members |\n| **Newsletter** | Automated newsletter generation and delivery |\n| **Daemon** | Install background service + health check |\n\nAll configuration is stored in `~/.x2000/`.\n\n---\n\n## Commands\n\n```bash\n# Setup wizard (first time or reconfigure)\nnpm start setup\n\n# Start the gateway (foreground)\nnpm start gateway\n\n# Background daemon\nnpm start daemon install      # Install and auto-start on login\nnpm start daemon start        # Start the daemon\nnpm start daemon stop         # Stop the daemon\nnpm start daemon logs         # View daemon logs\nnpm start daemon uninstall    # Remove the daemon\n\n# Send a task\nnpm start msg \"Deploy the marketing site\"\n\n# Check system status\nnpm start status\n\n# Manage communication channels\nnpm start channels            # List configured channels\nnpm start channels add telegram\nnpm start channels add email\n\n# Login with Claude subscription\nnpm start login\n\n# Show help\nnpm start help\n```\n\n---\n\n## Architecture\n\n```\n User\n  │\n  ▼\n┌─────────────────────────────────────────────────────────────────────┐\n│                        13 CHANNELS                                  │\n│  Telegram │ Slack │ Discord │ Email │ WhatsApp │ SMS │ iMessage │…  │\n└─────────────────────────┬───────────────────────────────────────────┘\n                          │\n                          ▼\n┌─────────────────────────────────────────────────────────────────────┐\n│                     GATEWAY v2 (Hono)                               │\n│              REST API │ WebSocket │ Health │ Status                  │\n└─────────────────────────┬───────────────────────────────────────────┘\n                          │\n                          ▼\n┌─────────────────────────────────────────────────────────────────────┐\n│                        CEO BRAIN                                    │\n│       Orchestration │ Task Decomposition │ Conflict Resolution      │\n└───────┬─────────────────┼─────────────────────┬─────────────────────┘\n        │                 │                     │\n        ▼                 ▼                     ▼\n┌──────────────┐  ┌──────────────┐  ┌──────────────┐\n│ ENGINEERING  │  │   PRODUCT    │  │   FINANCE    │  ... + 47 more\n│    BRAIN     │◄►│    BRAIN     │◄►│    BRAIN     │\n└──────┬───────┘  └──────┬───────┘  └──────┬───────┘\n       │                 │                 │\n       ▼                 ▼                 ▼\n┌─────────────────────────────────────────────────────────────────────┐\n│                    FOREVER MEMORY                                    │\n│        Patterns │ Learnings │ Skills │ Decisions │ Anti-Patterns     │\n├─────────────────────────────────────────────────────────────────────┤\n│                    30 TOOLS                                          │\n│    File I/O │ Shell │ Browser │ Deploy │ Git │ Email │ Voice │ …    │\n├─────────────────────────────────────────────────────────────────────┤\n│                 5-LAYER GUARDRAILS                                   │\n│    Input │ Action │ Runtime │ Visibility │ Escalation                │\n└─────────────────────────────────────────────────────────────────────┘\n```\n\n**Key protocols:**\n\n- **Brain Tension Protocol** -- Brains PROPOSE, CHALLENGE, and RESOLVE through structured debate. CEO Brain breaks ties when consensus falls below 70%.\n- **Forever-Learning Memory** -- Every task outcome is logged as patterns, learnings, or anti-patterns. Before every new task, memory is queried for relevant history.\n- **5-Layer Guardrails** -- Input validation, action control, runtime governance, reasoning visibility, and bounded escalation.\n- **Earned Autonomy** -- Brains start at trust level 1 (read-only) and earn higher levels through proven performance, up to level 4 (full autonomy).\n- **Fortress Security** -- Zero-trust risk engine, AES-256-GCM encrypted vault, threat detection with automated response, compliance monitoring, and Docker sandbox isolation for untrusted agents.\n- **Privacy Shield** -- Bidirectional PII protection that shields sensitive data before it reaches LLM providers and reassembles it in the response. 3-layer hybrid detection (regex + NER + context boosting), synthetic replacement via faker, and AES-256-GCM encrypted token vault.\n- **Mesh Network** -- Provider-independent inter-brain messaging via Redis pub/sub + filesystem. Supports multi-instance deployment across machines with SSH-based delivery and cost-optimized LLM routing.\n- **Multi-Provider Routing** -- Automatic cost optimization: simple chat routes to DeepSeek ($0.27/1M), standard tasks to Sonnet ($3/1M), complex work to Opus ($15/1M).\n\n---\n\n## Brain Tiers\n\nX2000 contains **50 specialized brains** organized into 6 tiers:\n\n| Tier | Focus | Count | Brains |\n|------|-------|-------|--------|\n| **1 -- Core** | Leadership and direction | 7 | CEO, Engineering, Design, Product, Strategy, Research, COO |\n| **2 -- Technical** | Building and infrastructure | 13 | Architecture, Backend, Frontend, Database, DevOps, Cloud, Mobile, Security, Performance, Data, AI, Automation, Debugger |\n| **3 -- Business** | Operations and finance | 8 | Finance, Legal, Operations, HR, Investing, Innovation, Investor, Pricing |\n| **4 -- Growth** | Revenue and partnerships | 5 | Marketing, Sales, Growth, Partnership, Customer Success |\n| **5 -- Channels** | Brand and outreach | 7 | Branding, Email, Social Media, Video, Community, SEO, Paid Ads |\n| **6 -- Specialized** | Domain expertise | 10 | Content, DevRel, Analytics, Localization, Game Design, Support, QA, Blockchain, Psychology, R&D |\n\n---\n\n## LLM Providers\n\nX2000 supports **11 LLM providers**. You need at least one configured.\n\n| Provider | Type | Notes |\n|----------|------|-------|\n| **Anthropic** | Cloud (API key) | Claude models. Also supports Claude Max subscription via `npm start login` |\n| **OpenAI** | Cloud (API key) | GPT-4o, GPT-5, etc. |\n| **Google** | Cloud (API key) | Gemini models |\n| **DeepSeek** | Cloud (API key) | DeepSeek models |\n| **Groq** | Cloud (API key) | Fast inference |\n| **Mistral** | Cloud (API key) | Mistral and Mixtral models |\n| **xAI** | Cloud (API key) | Grok models |\n| **Kimi** | Cloud (API key) | Moonshot AI |\n| **OpenRouter** | Cloud (API key) | Multi-model gateway |\n| **Together** | Cloud (API key) | Open-source model hosting |\n| **Ollama** | Local (no key) | Free, runs models locally. No API key required. |\n\n---\n\n## Communication Channels\n\nX2000 supports **13 communication channels**:\n\n| Channel | Setup Notes |\n|---------|-------------|\n| **Telegram** | Create a bot via @BotFather, add the token during setup |\n| **Slack** | Create a Slack app in the developer portal |\n| **Discord** | Create a bot in the Discord developer portal |\n| **Email** | Gmail, Outlook, or custom SMTP/IMAP |\n| **WhatsApp** | Scan QR code on first connection |\n| **SMS** | Requires a Twilio or compatible provider |\n| **iMessage** | macOS only, requires Accessibility permissions |\n| **Voice** | Powered by Vapi and ElevenLabs MCP integrations |\n| **Signal** | Requires Signal CLI bridge |\n| **Matrix** | Connect to any Matrix homeserver |\n| **MS Teams** | Microsoft Teams bot integration |\n| **IRC** | Connect to any IRC network |\n| **API** | Direct HTTP/WebSocket access via the gateway |\n\n---\n\n## API Reference\n\nThe gateway runs at `http://localhost:3000` by default.\n\n### Endpoints\n\n```bash\n# Health check\nGET /health\ncurl http://localhost:3000/health\n\n# System status (brains, memory, channels)\nGET /api/status\ncurl http://localhost:3000/api/status\n\n# Send a message / task\nPOST /api/message\ncurl -X POST http://localhost:3000/api/message \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"content\": \"Build a landing page for our product\"}'\n```\n\n### WebSocket\n\nConnect to `ws://localhost:3000` for streaming responses and real-time updates.\n\n---\n\n## Configuration\n\nAll user configuration lives in `~/.x2000/`:\n\n```\n~/.x2000/\n├── config.json          # Identity, team, projects, preferences, autonomy level\n├── credentials.json     # API keys and tokens (file permissions: 600)\n├── .env                 # Environment variable overrides\n└── logs/\n    ├── gateway.log      # Standard output\n    └── gateway.err.log  # Error output\n```\n\n- **config.json** -- Created by the setup wizard. Stores your identity, team members, projects, and autonomy preferences.\n- **credentials.json** -- Stores LLM provider API keys, channel tokens, and integration secrets. Restricted to owner-only read/write (chmod 600).\n- **.env** -- Optional environment variable overrides for local development or deployment.\n\n---\n\n## Project Structure\n\n```\nx2000/\n├── src/\n│   ├── brains/              # 50 specialized brains\n│   │   ├── base.ts          # Base brain class with tool integration\n│   │   ├── factory.ts       # Brain factory (dynamic instantiation)\n│   │   ├── registry.ts      # Brain registry (all 50 registered)\n│   │   ├── ceo/             # CEO Brain -- orchestrator\n│   │   ├── engineering/     # Engineering Brain\n│   │   ├── product/         # Product Brain\n│   │   └── ...              # 46 more brain directories\n│   ├── ai/                  # LLM client, providers, prompts, compaction\n│   │   └── providers/       # 11 provider adapters\n│   ├── gateway-v2/          # Hono-based modular gateway\n│   ├── channels/            # 13 channel adapters\n│   │   ├── orchestrator.ts  # Channel routing\n│   │   ├── message-bus.ts   # Cross-channel message bus\n│   │   └── adapters/        # Telegram, Slack, Discord, Email, etc.\n│   ├── tools/               # 30 tools (file I/O, shell, browser, deploy, etc.)\n│   ├── memory/              # Forever-learning memory system\n│   ├── guardrails/          # 5-layer guardrails + earned autonomy\n│   ├── agents/              # Agent spawn, sessions, collaboration\n│   ├── workers/             # BullMQ worker system (Redis-backed)\n│   ├── supervisor/          # Worker supervisor with heartbeats\n│   ├── scheduler/           # Task scheduling\n│   ├── proactive/           # Proactive operations, goals, pulse\n│   ├── onboarding/          # Setup wizard\n│   ├── cli/                 # CLI entry point\n│   ├── config/              # User config, env config\n│   ├── plugins/             # Plugin system\n│   ├── security/            # Security layer\n│   │   ├── privacy-shield/  # Bidirectional PII shielding (V2)\n│   │   ├── fortress/        # Zero-trust risk engine\n│   │   ├── audit-log.ts     # JSONL audit log with rotation\n│   │   └── vault.ts         # AES-256-GCM encrypted credentials\n│   ├── mesh/                # Inter-brain messaging network\n│   │   ├── message-hub.ts   # Provider-independent message pool\n│   │   ├── identity.ts      # Instance identity management\n│   │   ├── hmac.ts          # HMAC authentication for peers\n│   │   └── registry.ts      # Peer registry and discovery\n│   ├── rnd/                 # R&D experiments and benchmarks\n│   ├── web/                 # Web UI\n│   └── types/               # TypeScript type definitions\n├── manifest.json            # System manifest (brains, providers, channels, tools)\n├── package.json             # Dependencies and scripts\n├── tsconfig.json            # TypeScript configuration\n└── CLAUDE.md                # AI operating protocols (works with all LLM providers)\n```\n\n> **Note on CLAUDE.md files:** The name follows the Claude Code convention, but the content is provider-agnostic. Every brain's CLAUDE.md is a standard markdown system prompt that works with Claude, GPT-4, Gemini, Llama, and all 11 supported providers. No model-specific formatting or instructions. Switching providers requires zero doctrine changes.\n\n---\n\n## Development\n\n```bash\n# Build (runs brain verification as a prebuild step)\nnpm run build\n\n# Run tests\nnpm test\n\n# Run tests with coverage\nnpm run test:coverage\n\n# Type check without emitting\nnpm run typecheck\n\n# Lint\nnpm run lint\n\n# Format\nnpm run format\n```\n\nThe `prebuild` step runs `scripts/verify-brains.ts` to confirm all 50 brains are properly registered in the factory and registry before compiling.\n\n---\n\n## Troubleshooting\n\n### Port 3000 already in use\n\n```bash\n# Find what is using port 3000\nlsof -i :3000\n\n# Kill it, or start the gateway on a different port\n```\n\n### Telegram bot not connecting\n\n1. Message your bot directly first (not in a group).\n2. Verify the token in `~/.x2000/credentials.json`.\n3. Restart the daemon: `npm start daemon restart`.\n\n### Redis not running\n\nThe worker system requires Redis for BullMQ queues and supervisor heartbeats.\n\n```bash\n# macOS (Homebrew)\nbrew services start redis\n\n# Verify Redis is running\nredis-cli ping\n# Should return: PONG\n```\n\n### No LLM provider configured\n\nRun the setup wizard again to add a provider:\n\n```bash\nnpm start setup\n```\n\nOr use Ollama for free local inference:\n\n```bash\n# Install Ollama (macOS)\nbrew install ollama\n\n# Pull a model\nollama pull llama3\n\n# X2000 will detect Ollama automatically\n```\n\n### View logs\n\n```bash\n# Daemon logs\nnpm start daemon logs\n\n# Or read log files directly\ncat ~/.x2000/logs/gateway.log\ncat ~/.x2000/logs/gateway.err.log\n```\n\n### Reset everything\n\n```bash\nrm -rf ~/.x2000\nnpm start setup\n```\n\n---\n\n## Known Limitations (Alpha)\n\n> **Version 2.0.0 is alpha software.** The following limitations apply.\n\n### Not Yet Implemented\n\n| Feature | Status | ETA |\n|---------|--------|-----|\n| **WhatsApp Channel** | Declared, not implemented | TBD |\n| **SMS Channel** | Declared, not implemented | TBD |\n| **iMessage Channel** | Declared, not implemented | TBD |\n| **Signal Channel** | Declared, not implemented | TBD |\n| **MS Teams Channel** | Declared, not implemented | TBD |\n| **Daemon Auto-Install** | Partially implemented | Soon |\n| **Test Suite** | Minimal coverage (~5%) | In progress |\n\n### Working Channels (6 of 13)\n\n| Channel | Status |\n|---------|--------|\n| Telegram | ✅ Working |\n| Slack | ✅ Working |\n| Discord | ✅ Working |\n| Email | ✅ Working |\n| API (HTTP/WebSocket) | ✅ Working |\n| Voice (Vapi/ElevenLabs) | ✅ Working |\n\n### Infrastructure Requirements\n\n| Dependency | Required | Notes |\n|------------|----------|-------|\n| **Redis** | **Yes** | Worker queue system (BullMQ) requires Redis |\n| **Supabase** | Optional | Persistent memory; falls back to local storage |\n| **Docker** | Optional | For sandboxed command execution |\n\n### Quick Redis Setup\n\n```bash\n# Option 1: Docker Compose (recommended)\ndocker-compose up -d\n\n# Option 2: Homebrew (macOS)\nbrew install redis && brew services start redis\n\n# Option 3: Linux\nsudo apt install redis-server && sudo systemctl start redis\n\n# Verify\nredis-cli ping  # Should return: PONG\n```\n\n### Known Issues\n\n1. **Gateway v2 migration incomplete** — Some routes use Express, others use Hono\n2. **Memory not persistent without Supabase** — Patterns/learnings lost on restart without Supabase\n3. **Some tools have TODO comments** — scheduler/worker.ts has incomplete sections\n4. **Crypto tool requires optional dependency** — `send_payment` needs `@coinbase/agentkit` installed\n\n### For Testers\n\nSee [GETTING_STARTED.md](./GETTING_STARTED.md) for a complete tester guide including:\n- Prerequisites and setup\n- What to test (and what to avoid)\n- How to report bugs\n- FAQ\n\n---\n\n## Privacy Shield\n\nX2000 includes a bidirectional PII protection system that ensures sensitive data never reaches LLM provider servers in plain text.\n\n### How It Works\n\n```\nUser Input → PII Detection → Shield (tokenize/synthesize) → LLM Provider → Response → Reassemble → User Output\n```\n\n### Detection Layers\n\n| Layer | Method | Detects |\n|-------|--------|---------|\n| **1** | Regex + Validators | SSN (range validation), credit cards (Luhn), phone, email, addresses |\n| **2** | NER (compromise.js) | Names, organizations, places |\n| **3** | Context Boosting | Presidio-style keyword confidence adjustment |\n\n### Replacement Modes\n\n| Mode | Example Input | Example Output |\n|------|--------------|----------------|\n| **Token** | `Email John at john@acme.com` | `Email [NAME_1] at [EMAIL_1]` |\n| **Synthetic** | `Email John at john@acme.com` | `Email Alex Chen at alex@example.com` |\n\nSynthetic mode uses `@faker-js/faker` to generate realistic replacements that produce better LLM output quality. All mappings are stored in an AES-256-GCM encrypted vault for reassembly.\n\n### Configuration\n\nSet `PRIVACY_SHIELD_MODE` in your environment:\n- `token` -- Replace PII with bracketed tokens\n- `synthetic` -- Replace PII with realistic fake data (requires `@faker-js/faker`)\n- `disabled` -- No PII protection (default)\n\n---\n\n## Mesh Network\n\nX2000 supports multi-instance deployment where multiple brains run on separate machines and communicate through a provider-independent message hub.\n\n### Architecture\n\n```\nMachine A (Tony)                    Machine B (Jasson)\n┌──────────────────┐               ┌──────────────────┐\n│  X2000 Gateway   │               │  X2000 Gateway   │\n│  ┌────────────┐  │  Redis/SSH    │  ┌────────────┐  │\n│  │ MessageHub │◄─┼──────────────►┼──│ MessageHub │  │\n│  └────────────┘  │               │  └────────────┘  │\n│  mesh-outbox/    │               │  mesh-inbox/     │\n└──────────────────┘               └──────────────────┘\n```\n\n### Cost-Optimized Routing\n\nMessages are automatically routed to the cheapest capable LLM:\n\n| Content Type | Provider | Cost/1M tokens |\n|-------------|----------|----------------|\n| Simple chat, greetings, status | DeepSeek | $0.27 |\n| Standard tasks, code review | Claude Sonnet | $3.00 |\n| Complex tasks, architecture | Claude Opus | $15.00 |\n\n### Setup\n\n```bash\n# Initialize mesh identity\nx2000 mesh init\n\n# Connect to a peer\nx2000 mesh connect <peer-address>:3000 --secret <shared-secret>\n\n# Check mesh status\nx2000 mesh status\n```\n\n### Codebase Sync\n\nFor multi-machine deployments, use the included sync script:\n\n```bash\n# Set peer connection in environment\nexport X2000_PEER_HOST=\"user@peer-ip\"\n\n# Bidirectional sync\nbash scripts/sync-codebases.sh\n\n# One-way push or pull\nbash scripts/sync-codebases.sh push\nbash scripts/sync-codebases.sh pull\n```\n\n---\n\n## MCP Integrations\n\nX2000 connects to **8 external services** via the Model Context Protocol:\n\n| Integration | Powers | Description |\n|-------------|--------|-------------|\n| **Resend** | Email | Transactional and marketing email delivery |\n| **Railway** | Deploy | One-command cloud deployments |\n| **Vapi** | Voice/Calls | Voice AI assistants and phone calls |\n| **ElevenLabs** | TTS/STT | Text-to-speech and speech-to-text |\n| **n8n** | Automation | Workflow automation and skill orchestration |\n| **Stripe** | Payments | Payment processing and subscription management |\n| **Supabase** | Database/Memory | Persistent storage for memory, patterns, and learnings |\n| **SocialFly** | Social Media | Social media content creation, scheduling, and image generation |\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md"}