Metadata-Version: 2.5
Name: cascaid
Version: 0.1.0
Summary: Predictive cascading-failure intelligence for AI-native systems
Project-URL: Homepage, https://github.com/stalzkie/cascaid
Project-URL: Repository, https://github.com/stalzkie/cascaid
Project-URL: Issues, https://github.com/stalzkie/cascaid/issues
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Monitoring
Requires-Python: <3.13,>=3.12
Requires-Dist: fastapi>=0.115
Requires-Dist: httpx>=0.27
Requires-Dist: langgraph>=0.2
Requires-Dist: matplotlib>=3.11.1
Requires-Dist: networkx>=3.2
Requires-Dist: numpy>=1.26
Requires-Dist: pandas>=2.2
Requires-Dist: psycopg[binary]>=3.1
Requires-Dist: pydantic>=2.6
Requires-Dist: scikit-learn>=1.4
Requires-Dist: sqlalchemy>=2.0
Requires-Dist: torch-geometric>=2.5
Requires-Dist: torch>=2.3
Requires-Dist: uvicorn>=0.30
Requires-Dist: xgboost>=2.0
Description-Content-Type: text/markdown

# Cascaid

Predictive cascading-failure intelligence for AI-native systems: predicts which
part of your LangGraph/LiteLLM/vector-DB pipeline is about to take the rest
down with it, before it happens -- not just tracing what already went wrong.
Self-hosted, your data never leaves your own environment. See
`docs/Cascaid_PRD (1).md` for the full product spec.

## Install

```
pipx install cascaid          # or: uv tool install cascaid
```

## Try it -- zero setup, no real pipeline needed

```
cascaid demo
```

Spins up a synthetic fault-injection pipeline, trains a model on it, and seeds
a local SQLite-backed store -- no Postgres, no Docker, nothing to configure
first. See it predict a cascade before it happens.

## Point it at your real pipeline

```
docker compose up                                  # the dashboard + model server + Postgres, one command
cascaid run -- python your_app.py                   # instruments your app with zero code changes
cascaid ingest --events data/live/<run_id>.jsonl \
  --model models/pretrained_base.pt \
  --database-url postgresql+psycopg://... \
  --follow                                          # gets it showing up in the dashboard
```

`cascaid run` auto-detects LangGraph/LiteLLM/Pinecone/Weaviate in your app and
instruments them before your code runs -- no SDK, no decorators, no lines added
to your pipeline. `cascaid ingest` streams what it observes into the same
Graph Store + Postgres the dashboard reads from. Alerting is off by default;
turn it on once you trust the track record.

Then open `http://localhost:3000` for the dashboard.

## Development

```
uv sync                              # install pinned Python 3.12 env + deps
uv run python -m cascaid_demo.run_scenarios   # generate synthetic fault-injection corpus
uv run python -m cascaid.train                # train GNN vs XGBoost baseline, save pretrained artifact
```

Or, once `uv sync` has installed the project in editable mode, use the unified
CLI directly: `uv run cascaid demo`, `uv run cascaid serve ...`, etc.

## Test pyramid

```
uv run pytest tests/unit -q          # fast, no I/O
uv run pytest tests/integration -q   # real demo pipeline -> snapshot -> labeling wiring
uv run pytest tests/e2e -q           # actual CLI entry points end-to-end
```

## Branching & CI

- `master` -- production. `staging` -- pre-prod integration. `feature/*` -- work in progress, PR into `staging`, then `staging` -> `master`.
- Pushing a `feature/**` branch runs lint + unit tests (fast feedback).
- A PR into `staging` or `master` runs the full pyramid: lint, unit, integration, e2e (`.github/workflows/ci.yml`).
- A pushed tag `vX.Y.Z` retrains the model on the full synthetic corpus and publishes `models/pretrained_base.pt` to a GitHub Release (`.github/workflows/release.yml`).

Branch protection (require PR + passing checks into `staging`/`master`) is one-time setup a human has to do with an authenticated GitHub session -- run:

```
bash scripts/setup-branch-protection.sh
```

## License

Apache 2.0 -- see [LICENSE](LICENSE).
