Metadata-Version: 2.4
Name: sms-office
Version: 0.1.2
Summary: SMS Office — the SMS Security Management System core library. Auth, guards, shifts, locations, dispatch, compliance, brain-state. PostgreSQL-backed.
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: fastapi>=0.100
Requires-Dist: bcrypt>=4.0
Requires-Dist: pyjwt>=2.8
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: psycopg2-binary>=2.9
Requires-Dist: redis>=5.0
Requires-Dist: cryptography>=42.0
Provides-Extra: brain
Requires-Dist: allschills>=1.5.0; extra == "brain"
Provides-Extra: llm
Requires-Dist: openai>=1.0; extra == "llm"
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Requires-Dist: requests>=2.28; extra == "test"

# sms-office

The SMS Security Management System — core Python library.

Packaged from the SMS codebase (`backend/sms_security/`) so the backend logic can be
installed, imported, and tested as a normal Python library.

## Install

```bash
pip install -e .          # dev install (editable)
pip install .             # regular install
```

Optional brain-engine extras (`φ-lang v6`):

```bash
pip install .[brain]
```

## Usage

```python
from sms_security import SecurityController
from sms_security.db import Database
from sms_security.auth import hash_password, verify_password
```

## What's inside

| Module | What it is |
|---|---|
| `sms_security.auth` | Password hashing (bcrypt), JWT issue/verify, API keys |
| `sms_security.db` | PostgreSQL access layer (DSN from env) |
| `sms_security.models` | Domain models: guards, shifts, locations, incidents, dispatch, alarms |
| `sms_security.services` | Business logic: compliance, admissibility, dispatch, driver tracking, analytics |
| `sms_security.integrations` | Plugin framework (google, trello, notion, sage, mailchimp, brightpay) |
| `sms_security.controller` | `SecurityController` — main orchestrator (optional allschills brain) |

## Config (environment)

| Env var | Default | Purpose |
|---|---|---|
| `DATABASE_URL` | dev-local DSN | PostgreSQL connection |
| `REDIS_URL` | `redis://localhost:6379` | Cache/queue |
| `JWT_SECRET` | dev fallback | Token signing — set in production |
| `SERVER_PORT` | `8500` | HTTP server port |

## Tests

```bash
pip install -e .[test]
pytest
```

## Source

Built from the SMS codebase — corrections to the library land in this repo so
later updates are applied perfectly.

**Not included (by design):** signing keystore (`key.properties` / `*.jks`),
runtime data, build artifacts.
