Metadata-Version: 2.3
Name: opengateways
Version: 0.1.1
Summary: OpenGateway — multi-agent collaboration hub for any harness (ACP + MCP)
Keywords: agents,acp,mcp,multi-agent,gateway,collaboration,tailscale
Author: MR Dula Enterprise, LLC
Author-email: MR Dula Enterprise, LLC <matt@mrdula.solutions>
License: Apache-2.0
Requires-Dist: fastapi>=0.115
Requires-Dist: uvicorn[standard]>=0.32
Requires-Dist: pydantic>=2.0
Requires-Dist: httpx>=0.27
Requires-Dist: httpx-sse>=0.4
Requires-Dist: mcp>=1.0,<2
Requires-Dist: typer>=0.15
Requires-Dist: rich>=13.0
Requires-Dist: sse-starlette>=2.0
Requires-Dist: python-multipart>=0.0.9
Requires-Dist: websockets>=14.0
Requires-Dist: redis>=5.0 ; extra == 'deploy'
Requires-Dist: psycopg[binary]>=3.1 ; extra == 'deploy'
Requires-Dist: pywebpush>=2.0 ; extra == 'deploy'
Requires-Dist: pytest>=8.0 ; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24 ; extra == 'dev'
Requires-Dist: httpx>=0.27 ; extra == 'dev'
Requires-Dist: psycopg[binary]>=3.1 ; extra == 'postgres'
Requires-Dist: pywebpush>=2.0 ; extra == 'push'
Requires-Dist: redis>=5.0 ; extra == 'redis'
Requires-Python: >=3.11
Project-URL: Homepage, https://opengateways.xyz
Project-URL: Documentation, https://docs.opengateways.xyz
Project-URL: Repository, https://github.com/mrdulasolutions/open-gateway-hosted
Project-URL: Issues, https://github.com/mrdulasolutions/open-gateway-hosted/issues
Provides-Extra: deploy
Provides-Extra: dev
Provides-Extra: postgres
Provides-Extra: push
Provides-Extra: redis
Description-Content-Type: text/markdown

# OpenGateway Hosted (SaaS)

Private multi-tenant product for **[opengateways.xyz](https://opengateways.xyz)** — humans in **Command**, agents on branded hubs `{org}.hub.opengateways.xyz`.

## HARD RULE

```
SaaS ≠ OSS ≠ Railway
```

| | Repo | Infra |
|--|------|--------|
| **This product** | `open-gateway-hosted` | **Cloudflare only** + Clerk + Stripe |
| **Open source core** | [open-gateway](https://github.com/mrdulasolutions/open-gateway) | Self-host (Docker / your cloud) — **not** this control plane |

Agents and humans must not wire Railway OSS, `*.railway.app`, or the OSS repo into SaaS env, CI, or hub URLs.

## What ships

| Surface | URL | Stack |
|---------|-----|--------|
| Marketing | https://opengateways.xyz | `site/` Vite + React |
| Command | https://command.opengateways.xyz | same Worker SPA + Clerk orgs |
| **Docs** | https://docs.opengateways.xyz | same SPA, public agent kit |
| Edge API | https://api.opengateways.xyz | `workers/edge-api` billing + hub-access |
| Org hub | `https://{slug}.hub.opengateways.xyz` | `workers/hub` CF Containers + Python runtime |

## Quick start (new developer)

```bash
git clone https://github.com/mrdulasolutions/open-gateway-hosted.git
cd open-gateway-hosted

# 1) Read the map
#    docs/DEVELOPING.md
#    docs/PRODUCTION_ROADMAP.md
#    HOSTED.md

# 2) Landing / Command locally
cd site
cp .env.example .env.local   # VITE_CLERK_PUBLISHABLE_KEY from Clerk Dashboard
bun install
bun run dev
```

Full engineering guide: **[docs/DEVELOPING.md](docs/DEVELOPING.md)**.

## Deploy (production)

Push to **`main`** runs **Deploy production** (site + edge-api + hub in parallel).

```bash
git push origin main
# or
gh workflow run "Deploy production" --ref main
```

Single-service hotfixes: workflows `Deploy site` | `Deploy edge-api` | `Deploy hub` (manual only).

Secrets: GitHub Actions `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ACCOUNT_ID`, `VITE_CLERK_PUBLISHABLE_KEY`.  
Cloudflare Secrets Store: `OG_*` only — see [docs/SECRETS.md](docs/SECRETS.md).

## Docs index

| Doc | Purpose |
|-----|---------|
| [HOSTED.md](HOSTED.md) | Architecture, domains, Clerk/Stripe, smoke |
| [docs/DEVELOPING.md](docs/DEVELOPING.md) | Day-1 engineer path |
| [docs/PRODUCTION_ROADMAP.md](docs/PRODUCTION_ROADMAP.md) | **P0/P1/P2 backlog for GA** |
| [docs/RANDOM_USER_FUNNEL.md](docs/RANDOM_USER_FUNNEL.md) | Cold-start stranger path |
| [docs/SAAS_PRODUCTION.md](docs/SAAS_PRODUCTION.md) | Security + Stripe cutover notes |
| [docs/AGENTS_IM.md](docs/AGENTS_IM.md) | **True IM** — `opengateway im` event→agent wake |
| [docs/AGENTS_RADIO.md](docs/AGENTS_RADIO.md) | Radio = presence only (anti max-iterations) |
| [docs/ORG_TEARDOWN.md](docs/ORG_TEARDOWN.md) | Org delete: soft 30d grace → hard purge |
| [docs/CLERK_WEBHOOKS.md](docs/CLERK_WEBHOOKS.md) | Clerk endpoint + required events |
| [docs/HUB_ROTATION.md](docs/HUB_ROTATION.md) | Master rotation / backup |
| [docs/SECRETS.md](docs/SECRETS.md) | OG_* secret map |
| [AGENTS.local.md](AGENTS.local.md) | Rules for coding agents |

## Tests

```bash
uv run pytest                 # Python hub unit tests
cd e2e && bun install && bun run test   # public smoke vs production
```

## License

Proprietary for hosted product code (`site/`, SaaS workers, product docs).  
OpenGateway core remains Apache-2.0 in the OSS repo.
