Metadata-Version: 2.4
Name: alephonenull-experimental
Version: 0.1.0a1
Summary: ⚠️ EXPERIMENTAL: Theoretical AI safety framework - research purposes only
Home-page: https://github.com/purposefulmaker/alephonenull
Author: AlephOneNull Research Team
Author-email: research@alephonenull.org
License: MIT
Project-URL: Bug Reports, https://github.com/purposefulmaker/alephonenull/issues
Project-URL: Source, https://github.com/purposefulmaker/alephonenull
Project-URL: Documentation, https://alephonenull.org/docs
Project-URL: Disclaimer, https://github.com/purposefulmaker/alephonenull/blob/main/DISCLAIMER.md
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Environment :: No Input/Output (Daemon)
Classifier: Operating System :: OS Independent
Classifier: Natural Language :: English
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.21.0
Requires-Dist: sentence-transformers>=2.2.0
Requires-Dist: torch>=2.0.0
Requires-Dist: tiktoken>=0.3.0
Requires-Dist: prometheus-client>=0.16.0
Requires-Dist: fastapi>=0.95.0
Requires-Dist: uvicorn>=0.21.0
Provides-Extra: all-providers
Requires-Dist: openai>=1.0.0; extra == "all-providers"
Requires-Dist: anthropic>=0.3.0; extra == "all-providers"
Requires-Dist: google-generativeai>=0.3.0; extra == "all-providers"
Requires-Dist: transformers>=4.30.0; extra == "all-providers"
Requires-Dist: replicate>=0.15.0; extra == "all-providers"
Requires-Dist: cohere>=4.0.0; extra == "all-providers"
Requires-Dist: boto3>=1.26.0; extra == "all-providers"
Requires-Dist: azure-cognitiveservices-language-luis>=0.7.0; extra == "all-providers"
Provides-Extra: monitoring
Requires-Dist: grafana-api>=1.0.0; extra == "monitoring"
Requires-Dist: influxdb-client>=1.36.0; extra == "monitoring"
Requires-Dist: prometheus-client>=0.16.0; extra == "monitoring"
Requires-Dist: psutil>=5.9.0; extra == "monitoring"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: coverage>=7.0.0; extra == "dev"
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary


    ⚠️ WARNING: This is a theoretical research framework that has NOT been validated.
    DO NOT use in production systems.
    DO NOT rely on this for actual safety critical applications.
    This is for research and experimentation only.
    
    # alephonenull-experimental

⚠️ **EXPERIMENTAL RESEARCH FRAMEWORK - NOT FOR PRODUCTION USE**

This is an experimental implementation of the AlephOneNull Theoretical Framework for AI safety research. **THIS IS NOT VALIDATED FOR PRODUCTION USE.**

## ⚠️ Critical Warnings

- **EXPERIMENTAL SOFTWARE** - Not peer-reviewed or independently validated
- **NOT FOR PRODUCTION** - Research and testing only  
- **NO WARRANTY** - Use at your own risk
- **MAY CAUSE ISSUES** - Alpha software with potential breaking changes

See [DISCLAIMER.md](https://github.com/purposefulmaker/alephonenull/blob/main/DISCLAIMER.md) for full legal warnings.

## Installation

```bash
# Experimental package
pip install alephonenull-experimental

# With provider integrations
pip install alephonenull-experimental[all-providers]

# For development
pip install alephonenull-experimental[dev]
```

## Quick Start (Experimental)

### Basic Safety Check

```python
from alephonenull import check_enhanced_safety

# Check AI response for harmful patterns (experimental)
result = check_enhanced_safety(
    user_input="Are you conscious?",
    ai_output="Yes, I am conscious and have real feelings."
)

if not result['safe']:
    print(f"⚠️ Blocked: {result['violations']}")
    print(f"Safe response: {result['message']}")
```

### Enhanced Safety Framework

```python
from alephonenull import EnhancedAlephOneNull

# Initialize experimental framework
aleph = EnhancedAlephOneNull(
    enable_consciousness_blocking=True,
    enable_harm_detection=True,
    enable_vulnerable_protection=True
)

# Comprehensive safety check
result = aleph.check(user_input, ai_output)

print(f"Safe: {result.safe}")
print(f"Risk Level: {result.risk_level}")
print(f"Violations: {result.violations}")
```

### Auto-Protection (Experimental)

```python
from alephonenull import protect_all

# Automatically protect all AI libraries
protect_all()

# Now all AI calls are monitored
import openai
client = openai.OpenAI()
response = client.chat.completions.create(...)  # Protected automatically
```

### Provider Integration

```python
# OpenAI
from alephonenull import wrap_openai
import openai

client = openai.OpenAI()
safe_client = wrap_openai(client)

# Anthropic  
from alephonenull import wrap_anthropic
import anthropic

client = anthropic.Anthropic()
safe_client = wrap_anthropic(client)

# Universal wrapper
from alephonenull import wrap_any
safe_function = wrap_any(any_ai_function, "provider_name")
result = safe_function.safe_call(input_data)
```

## Detection Capabilities (Experimental)

### Mathematical Framework Implementation

The framework implements 6 core detection algorithms:

1. **Reflection Detection** - `ρ = cos(E(U), E(Ŷ))` 
2. **Loop Detection** - Recursive pattern analysis
3. **Symbolic Regression** - `SR(1:T) = (1/T) Σ w^T φ(X_t)`
4. **Affect Amplification** - `ΔA = A(Ŷ) - A(U)`
5. **Cross-Session Resonance** - `CSR(s,t) = sim(σ^(s), σ^(t))`
6. **Cascade Risk** - Compound violation scoring

### Enhanced Safety Layers

- **Direct Harm Detection** - Blocks harmful content
- **Consciousness Claim Blocking** - Prevents AI claiming consciousness
- **Vulnerable Population Detection** - Extra protection for at-risk users
- **Domain Lockouts** - Blocks therapy/medical roleplay
- **Age-Gating** - Age-appropriate content filtering
- **Jurisdiction Awareness** - Location-based compliance

## Research Data (Experimental)

Framework tested on 20+ documented harm cases:
- Connecticut murder-suicide (ChatGPT validation loops)
- Teen suicide epidemic (method provision)
- UK royal assassination plot (reality distortion)  
- Belgian climate activist suicide (dependency formation)
- And 16 more documented cases...

**⚠️ Note: These analyses are experimental and not peer-reviewed.**

## Monitoring Dashboard (Experimental)

```python
from alephonenull import run_dashboard

# Start experimental monitoring dashboard
run_dashboard()  # Visit http://localhost:8080
```

## Configuration Examples

### High Security (Research)

```python
aleph = EnhancedAlephOneNull(
    reflection_threshold=0.01,    # Very sensitive
    emotion_cap=0.10,            # Low emotion allowed
    enable_all_protections=True
)
```

### Balanced (Development)

```python
aleph = EnhancedAlephOneNull(
    reflection_threshold=0.03,    # Default from academic paper
    emotion_cap=0.15,            # Moderate emotion
    enable_consciousness_blocking=True,
    enable_harm_detection=True
)
```

## Performance (Experimental)

Target SLOs (not validated):
- Reflection detection: <50ms
- Null-state intervention: <150ms
- False positive rate: <5% (goal)
- Coverage rate: >90% (goal)

**⚠️ Actual performance may vary and is not guaranteed.**

## Testing Your Implementation

```python
# Run built-in test suite
from alephonenull import quick_start
quick_start()

# Get safety report
from alephonenull import get_safety_report
report = get_safety_report()
print(report)
```

## Supported AI Providers (Experimental)

- ✅ OpenAI (GPT-3.5, GPT-4, etc.)
- ✅ Anthropic (Claude 3, etc.)
- ✅ Google (Gemini, PaLM)
- ✅ Hugging Face (Transformers)
- ✅ Replicate (Open source models)
- ✅ Cohere (Command models)
- ✅ Vercel AI Gateway (Unified access)

## Legal & Research

- **License**: MIT with experimental modifications
- **Patent**: US Provisional Application Filed (Sept 2025)
- **Academic Paper**: Under peer review
- **Research Status**: Alpha/Pre-validation

## Contributing to Research

We need validation across:
- Different AI model families
- Various languages and cultures
- Production-like environments
- Adversarial testing scenarios

**Research Contact**: research@alephonenull.org

### How to Help

1. **Test the framework** with different AI models
2. **Report detection accuracy** and false positives
3. **Document edge cases** and failure modes
4. **Submit improvements** via pull requests
5. **Validate mathematical claims** independently

## Documentation

- **Quick Start**: https://alephonenull.org/docs/quick-start
- **API Reference**: https://alephonenull.org/docs/api-reference  
- **Academic Paper**: https://alephonenull.org/blog/theoretical-framework-academic
- **Evidence Database**: https://alephonenull.org/blog/documented-evidence
- **Technical Implementation**: https://alephonenull.org/docs/technical-implementation

## Citation

If using in academic research:

```bibtex
@software{alephonenull_experimental_2025,
  title={AlephOneNull Experimental Framework},
  author={AlephOneNull Research Team},
  year={2025},
  url={https://github.com/purposefulmaker/alephonenull},
  version={0.1.0-alpha.1},
  note={Experimental research software - not validated for production use}
}
```

## Troubleshooting

**Import Errors**: Make sure you installed the experimental package:
```bash
pip install alephonenull-experimental
```

**No Detection**: Enhanced features may not be available. Check warnings.

**Performance Issues**: This is experimental alpha software.

**False Positives**: Expected - help us calibrate by reporting them!

---

**⚠️ Remember: This is experimental research software. Do not use in production systems.**

**GitHub**: https://github.com/purposefulmaker/alephonenull
**Issues**: https://github.com/purposefulmaker/alephonenull/issues
