Metadata-Version: 2.4
Name: krl-types
Version: 0.2.1
Summary: Shared type definitions for the KRL Analytics Platform
Project-URL: Documentation, https://docs.krlabs.dev/krl-types
Project-URL: Repository, https://github.com/KR-Labs/krl-types
Project-URL: Changelog, https://github.com/KR-Labs/krl-types/blob/main/CHANGELOG.md
Author-email: KR-Labs Engineering <engineering@krlabs.dev>
License: Apache-2.0
Keywords: analytics,billing,enums,krl,types
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: pydantic>=2.0.0
Provides-Extra: dev
Requires-Dist: mypy>=1.8.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest>=7.4.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# KRL Types

> **Version:** 0.1.0  
> **License:** MIT  
> **Python:** ≥3.9  
> **Status:** ⚠️ CRITICAL DEPENDENCY RISK

---

## ⚠️ CRITICAL: NOT PUBLISHED TO PyPI

**This package is NOT published to PyPI but is declared as a dependency by other packages.**

If `krl-data-connectors` or `krl-premium-backend` declare `krl-types` as a dependency in their `pyproject.toml`, then:

```bash
pip install krl-data-connectors  # WILL FAIL
```

### Impact

| Package | Declares krl-types? | Installation Impact |
|---------|---------------------|---------------------|
| krl-data-connectors | ⚠️ Yes | **Installation will fail** |
| krl-premium-backend | ⚠️ Possibly | Installation may fail |

### Resolution Required

1. **Option A:** Publish krl-types to PyPI immediately
2. **Option B:** Remove krl-types dependency from other packages and inline the types
3. **Option C:** Use a private PyPI index

---

## SECTION A — Executive & Strategic Overview

### What This Repository Does

KRL Types provides **shared type definitions** used across the KRL suite:

1. **Billing Enums** — `LicenseTier`, `BillingCycle`, `UsageType`
2. **Connector Enums** — `ConnectorTier`, `DataSourceType`
3. **Model Enums** — `ModelCategory`, `ModelTier`
4. **Pydantic Models** — Shared request/response schemas

### Why This Matters

Type consistency across packages:
- Ensures frontend and backend use same tier names
- Prevents "Community" vs "COMMUNITY" vs "community" bugs
- Enables IDE autocomplete across all packages

### Current State: **BROKEN DEPENDENCY**

| Criterion | Status |
|-----------|--------|
| Types defined | ✅ Yes |
| Package structure | ✅ Yes |
| Published to PyPI | ❌ **NO** |
| Git repository | ❌ **NO** (no .git folder) |
| Version pinned | 0.1.0 |

---

## SECTION B — Contents

### Billing Types

```python
from krl_types.billing import LicenseTier, BillingCycle

class LicenseTier(str, Enum):
    COMMUNITY = "community"
    PROFESSIONAL = "professional"
    ENTERPRISE = "enterprise"

class BillingCycle(str, Enum):
    MONTHLY = "monthly"
    ANNUAL = "annual"
```

### Connector Types

```python
from krl_types.connectors import ConnectorTier

class ConnectorTier(str, Enum):
    COMMUNITY = "community"
    PROFESSIONAL = "professional"
    ENTERPRISE = "enterprise"
```

---

## SECTION C — Engineering Notes

### Package Structure

```
krl-types/
├── src/
│   └── krl_types/
│       ├── __init__.py
│       ├── billing.py      # Billing enums
│       ├── connectors.py   # Connector enums
│       └── models.py       # Model enums
│
├── tests/                  # Minimal tests
├── pyproject.toml          # Package definition
└── README.md               # This file
```

### Local Installation

Since this is not on PyPI, install locally:

```bash
# From the krl-types directory
pip install -e .

# Or from another package directory
pip install -e ../krl-types
```

### pyproject.toml Fix

Until krl-types is on PyPI, other packages should use:

```toml
[project]
dependencies = [
    # krl-types @ git+https://github.com/KR-Labs/krl-types.git  # When git repo exists
    # OR remove dependency and inline types
]
```

---

## SECTION D — Action Required

### Immediate Priority: HIGH

1. **Create git repository** for krl-types
2. **Publish to PyPI** (or private index)
3. **Update dependent packages** to use published version

### Owner

- **Team:** KR-Labs Engineering
- **Escalation:** engineering@krlabs.dev

### Risk If Not Addressed

- `pip install krl-data-connectors` fails
- `pip install krl-premium-backend` may fail
- Customer onboarding blocked
- CI/CD pipelines fail

---

*Last updated: December 14, 2025 — Forensic audit identified CRITICAL deployment blocker*
