entroplain 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/26.0.1 +0 -0
- package/CONTRIBUTING.md +103 -103
- package/DEPLOY.md +41 -0
- package/README.md +478 -389
- package/dist/entroplain-0.2.2-py3-none-any.whl +0 -0
- package/dist/entroplain-0.2.2.tar.gz +0 -0
- package/dist/entroplain-0.2.3-py3-none-any.whl +0 -0
- package/dist/entroplain-0.2.3.tar.gz +0 -0
- package/docs/AGENT_USAGE.md +178 -178
- package/docs/USAGE.md +302 -302
- package/entroplain/__init__.py +32 -33
- package/entroplain/cost_tracker.py +231 -0
- package/entroplain/dashboard.py +480 -0
- package/entroplain/monitor.py +390 -272
- package/entroplain/providers.py +626 -626
- package/entroplain/proxy.py +561 -278
- package/entroplain/shared_state.py +72 -0
- package/entroplain-proxy +0 -0
- package/package.json +47 -44
- package/paper.md +299 -0
- package/pip +0 -0
- package/pyproject.toml +96 -89
- package/scripts/setup.bat +89 -0
- package/scripts/setup.sh +98 -0
- package/test_nvidia.py +56 -0
- package/test_proxy.py +16 -0
- package/vercel.json +6 -0
- package/website/README.md +14 -0
- package/website/app/globals.css +88 -0
- package/website/app/layout.tsx +34 -0
- package/website/app/page.tsx +537 -0
- package/website/package-lock.json +520 -0
- package/website/package.json +25 -0
- package/website/tsconfig.json +40 -0
- package/website/vercel.json +3 -0
- package/dist/entroplain-0.1.1-py3-none-any.whl +0 -0
- package/dist/entroplain-0.1.1.tar.gz +0 -0
package/26.0.1
ADDED
|
File without changes
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
# Contributing to Entroplain
|
|
2
|
-
|
|
3
|
-
Thanks for your interest in contributing! 🎉
|
|
4
|
-
|
|
5
|
-
## Development Setup
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Clone the repo
|
|
9
|
-
git clone https://github.com/entroplain/entroplain.git
|
|
10
|
-
cd entroplain
|
|
11
|
-
|
|
12
|
-
# Create virtual environment
|
|
13
|
-
python -m venv .venv
|
|
14
|
-
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
|
15
|
-
|
|
16
|
-
# Install in development mode
|
|
17
|
-
pip install -e ".[dev]"
|
|
18
|
-
|
|
19
|
-
# Run tests
|
|
20
|
-
pytest
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Project Structure
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
entroplain/
|
|
27
|
-
├── entroplain/
|
|
28
|
-
│ ├── __init__.py # Package exports
|
|
29
|
-
│ ├── monitor.py # Core entropy monitor
|
|
30
|
-
│ ├── providers.py # LLM provider integrations
|
|
31
|
-
│ ├── hooks.py # Agent framework hooks
|
|
32
|
-
│ └── cli.py # Command-line interface
|
|
33
|
-
├── tests/
|
|
34
|
-
│ └── test_monitor.py # Unit tests
|
|
35
|
-
├── pyproject.toml # Package config
|
|
36
|
-
├── README.md # Documentation
|
|
37
|
-
└── LICENSE # MIT License
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Adding a New Provider
|
|
41
|
-
|
|
42
|
-
1. Create a new provider class in `providers.py`:
|
|
43
|
-
|
|
44
|
-
```python
|
|
45
|
-
class MyProvider(BaseProvider):
|
|
46
|
-
def calculate_entropy(self, logprobs_data: Dict) -> float:
|
|
47
|
-
# Parse provider-specific format
|
|
48
|
-
...
|
|
49
|
-
|
|
50
|
-
def stream_with_entropy(self, **kwargs) -> Iterator[TokenWithEntropy]:
|
|
51
|
-
# Stream tokens with entropy
|
|
52
|
-
...
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
2. Export it in `__init__.py`
|
|
56
|
-
|
|
57
|
-
3. Add tests in `tests/test_providers.py`
|
|
58
|
-
|
|
59
|
-
## Code Style
|
|
60
|
-
|
|
61
|
-
- Use **Black** for formatting
|
|
62
|
-
- Use **isort** for imports
|
|
63
|
-
- Use **mypy** for type checking
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
black entroplain/ tests/
|
|
67
|
-
isort entroplain/ tests/
|
|
68
|
-
mypy entroplain/
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Testing
|
|
72
|
-
|
|
73
|
-
Run all tests:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
pytest
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Run with coverage:
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
pytest --cov=entroplain
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## Pull Request Process
|
|
86
|
-
|
|
87
|
-
1. Fork the repo
|
|
88
|
-
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
89
|
-
3. Make your changes
|
|
90
|
-
4. Add tests for new functionality
|
|
91
|
-
5. Ensure all tests pass (`pytest`)
|
|
92
|
-
6. Format code (`black .`)
|
|
93
|
-
7. Commit changes (`git commit -m 'Add amazing feature'`)
|
|
94
|
-
8. Push to branch (`git push origin feature/amazing-feature`)
|
|
95
|
-
9. Open a Pull Request
|
|
96
|
-
|
|
97
|
-
## Questions?
|
|
98
|
-
|
|
99
|
-
Open an issue
|
|
100
|
-
|
|
101
|
-
## License
|
|
102
|
-
|
|
103
|
-
By contributing, you agree that your contributions will be licensed under the MIT License.
|
|
1
|
+
# Contributing to Entroplain
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in contributing! 🎉
|
|
4
|
+
|
|
5
|
+
## Development Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Clone the repo
|
|
9
|
+
git clone https://github.com/entroplain/entroplain.git
|
|
10
|
+
cd entroplain
|
|
11
|
+
|
|
12
|
+
# Create virtual environment
|
|
13
|
+
python -m venv .venv
|
|
14
|
+
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
|
15
|
+
|
|
16
|
+
# Install in development mode
|
|
17
|
+
pip install -e ".[dev]"
|
|
18
|
+
|
|
19
|
+
# Run tests
|
|
20
|
+
pytest
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Project Structure
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
entroplain/
|
|
27
|
+
├── entroplain/
|
|
28
|
+
│ ├── __init__.py # Package exports
|
|
29
|
+
│ ├── monitor.py # Core entropy monitor
|
|
30
|
+
│ ├── providers.py # LLM provider integrations
|
|
31
|
+
│ ├── hooks.py # Agent framework hooks
|
|
32
|
+
│ └── cli.py # Command-line interface
|
|
33
|
+
├── tests/
|
|
34
|
+
│ └── test_monitor.py # Unit tests
|
|
35
|
+
├── pyproject.toml # Package config
|
|
36
|
+
├── README.md # Documentation
|
|
37
|
+
└── LICENSE # MIT License
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Adding a New Provider
|
|
41
|
+
|
|
42
|
+
1. Create a new provider class in `providers.py`:
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
class MyProvider(BaseProvider):
|
|
46
|
+
def calculate_entropy(self, logprobs_data: Dict) -> float:
|
|
47
|
+
# Parse provider-specific format
|
|
48
|
+
...
|
|
49
|
+
|
|
50
|
+
def stream_with_entropy(self, **kwargs) -> Iterator[TokenWithEntropy]:
|
|
51
|
+
# Stream tokens with entropy
|
|
52
|
+
...
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
2. Export it in `__init__.py`
|
|
56
|
+
|
|
57
|
+
3. Add tests in `tests/test_providers.py`
|
|
58
|
+
|
|
59
|
+
## Code Style
|
|
60
|
+
|
|
61
|
+
- Use **Black** for formatting
|
|
62
|
+
- Use **isort** for imports
|
|
63
|
+
- Use **mypy** for type checking
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
black entroplain/ tests/
|
|
67
|
+
isort entroplain/ tests/
|
|
68
|
+
mypy entroplain/
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Testing
|
|
72
|
+
|
|
73
|
+
Run all tests:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pytest
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Run with coverage:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
pytest --cov=entroplain
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Pull Request Process
|
|
86
|
+
|
|
87
|
+
1. Fork the repo
|
|
88
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
89
|
+
3. Make your changes
|
|
90
|
+
4. Add tests for new functionality
|
|
91
|
+
5. Ensure all tests pass (`pytest`)
|
|
92
|
+
6. Format code (`black .`)
|
|
93
|
+
7. Commit changes (`git commit -m 'Add amazing feature'`)
|
|
94
|
+
8. Push to branch (`git push origin feature/amazing-feature`)
|
|
95
|
+
9. Open a Pull Request
|
|
96
|
+
|
|
97
|
+
## Questions?
|
|
98
|
+
|
|
99
|
+
Open an issue
|
|
100
|
+
|
|
101
|
+
## License
|
|
102
|
+
|
|
103
|
+
By contributing, you agree that your contributions will be licensed under the MIT License.
|
package/DEPLOY.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Deploying Entroplain Website to Vercel
|
|
2
|
+
|
|
3
|
+
## Current Status
|
|
4
|
+
- ✅ Website code pushed to `website/` folder in main repo
|
|
5
|
+
- ✅ vercel.json added for deployment config
|
|
6
|
+
- ⏳ Needs Vercel project creation
|
|
7
|
+
|
|
8
|
+
## Option 1: Manual Deploy (Easiest)
|
|
9
|
+
|
|
10
|
+
1. Go to https://vercel.com/new
|
|
11
|
+
2. Import `https://github.com/entroplain/entroplain`
|
|
12
|
+
3. Set **Root Directory** to `website`
|
|
13
|
+
4. Click Deploy
|
|
14
|
+
|
|
15
|
+
## Option 2: CLI Deploy
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
cd C:\Users\josha\.openclaw\workspace\projects\entroplain\website
|
|
19
|
+
npx vercel
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Follow prompts to link project.
|
|
23
|
+
|
|
24
|
+
## After Deploy
|
|
25
|
+
|
|
26
|
+
The site will be live at `https://entroplain.vercel.app` (or custom domain).
|
|
27
|
+
|
|
28
|
+
Update README links to point to the live site.
|
|
29
|
+
|
|
30
|
+
## Files
|
|
31
|
+
- `website/` - Next.js static site
|
|
32
|
+
- `vercel.json` - Deployment config (root level)
|
|
33
|
+
- `website/package.json` - Dependencies
|
|
34
|
+
|
|
35
|
+
## Design
|
|
36
|
+
Based on Vercel's own design system (from design-md collection):
|
|
37
|
+
- White canvas with `#171717` text
|
|
38
|
+
- Green accent (`#4ade80`)
|
|
39
|
+
- Tight letter-spacing on headings
|
|
40
|
+
- Shadow-as-border technique
|
|
41
|
+
- Minimal, engineering-focused aesthetic
|