Skip to content

Commit 5e2f454

Browse files
author
Christian Quintino De Luca
committed
feat: BUSL license + Gemini plugin + pricing + PyPI workflow
1 parent 6949ba4 commit 5e2f454

File tree

23 files changed

+373
-44
lines changed

23 files changed

+373
-44
lines changed

.github/workflows/publish-core.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Publish Core (TestPyPI/PyPI)
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- 'aspera-v*'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: '3.11'
17+
- name: Build
18+
run: |
19+
python -m pip install --upgrade pip build
20+
python -m build
21+
- uses: actions/upload-artifact@v4
22+
with:
23+
name: dist
24+
path: dist/*
25+
26+
publish-testpypi:
27+
needs: build
28+
if: ${{ github.event_name == 'workflow_dispatch' }}
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/download-artifact@v4
32+
with:
33+
name: dist
34+
path: dist
35+
- name: Publish to TestPyPI
36+
uses: pypa/gh-action-pypi-publish@v1.9.0
37+
with:
38+
print-hash: true
39+
repository-url: https://test.pypi.org/legacy/
40+
user: __token__
41+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
42+
43+
publish-pypi:
44+
needs: build
45+
if: startsWith(github.ref, 'refs/tags/aspera-v')
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/download-artifact@v4
49+
with:
50+
name: dist
51+
path: dist
52+
- name: Publish to PyPI
53+
uses: pypa/gh-action-pypi-publish@v1.9.0
54+
with:
55+
print-hash: true
56+
user: __token__
57+
password: ${{ secrets.PYPI_API_TOKEN }}
58+
59+

LICENSE

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
MIT License
1+
Business Source License 1.1 (BUSL-1.1)
22

3-
Copyright (c) 2025 Christian Quintino De Luca - RTH Italia
3+
Licensor: Christian Quintino De Luca - RTH Italia
4+
Licensed Work: ASPERA (the "Software")
5+
Additional Use Grant: You may use, copy, modify, and self-host the Software for
6+
non-production and internal production purposes. You may not provide the
7+
Software to third parties as a managed service or compete with the Licensor’s
8+
hosted offerings during the Change Date Period.
49

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
10+
Change Date: 2027-10-08
11+
Change License: Apache License, Version 2.0
1112

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
13+
License Terms: The Licensor hereby grants you the right to use the Software
14+
under the Business Source License 1.1, a copy of which is available at
15+
https://mariadb.com/bsl11/.
1416

15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
17+
Any use not explicitly granted herein is prohibited. After the Change Date,
18+
the Software will be made available under the Change License.
2219

20+
Trademarks: This license does not grant you any right in the Licensor’s
21+
trademarks, service marks, or logos, including "ASPERA".

README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
**Un framework innovativo per sistemi cognitivi che unisce ragionamento simbolico e intelligenza artificiale**
88

99
[![Python Version](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/downloads/)
10-
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
10+
[![License](https://img.shields.io/badge/license-BUSL--1.1-blue)](LICENSE)
1111
[![Tests](https://img.shields.io/badge/tests-37%2F39%20passing-brightgreen)](aspera/tests/)
1212
[![Groq](https://img.shields.io/badge/LLM-Groq%20Powered-orange)](https://groq.com)
1313
[![Product Status](https://img.shields.io/badge/status-PRODUCTION%20READY-success)](STARTUP_ROADMAP.md)
@@ -108,6 +108,39 @@ python aspera_cli.py run --aspera aspera/lang/examples/empathetic.aspera --signa
108108
python aspera_cli.py validate ast.json
109109
```
110110

111+
### Plugin: installazione, discovery e uso (incluso Gemini)
112+
113+
```bash
114+
# Installa plugin esterni (esempi)
115+
python -m pip install -e plugins/aspera-vector-weaviate
116+
python -m pip install -e plugins/aspera-llm-openai
117+
python -m pip install -e plugins/aspera-llm-gemini
118+
119+
# Scopri e lista plugin disponibili
120+
python aspera_cli.py plugins discover
121+
python aspera_cli.py plugins list
122+
```
123+
124+
Uso programmatico con `PluginManager`:
125+
126+
```python
127+
from aspera.plugins.plugin_interface import PluginManager
128+
129+
pm = PluginManager()
130+
pm.discover_plugins()
131+
132+
llm = pm.get_plugin("openai_llm") or pm.get_plugin("gemini_llm")
133+
if llm:
134+
llm.initialize({"model": "gpt-4o-mini", "temperature": 0.7})
135+
print(llm.generate_inference(context={}, signals={}, rules=["if a then b"]))
136+
137+
vec = pm.get_plugin("weaviate_vector")
138+
if vec:
139+
vec.initialize({"url": "http://localhost:8080", "class_name": "AsperaVector"})
140+
vec.save("demo", "hello")
141+
print("Loaded:", vec.load("demo"))
142+
```
143+
111144
### 🔌 Plugins: installazione rapida
112145

113146
```bash

docs/PLUGINS.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class MyLLM(LLMPlugin):
5858

5959
- `openai_llm` (pacchetto: `aspera-llm-openai`): provider LLM OpenAI.
6060
- `weaviate_vector` (pacchetto: `aspera-vector-weaviate`): storage vettoriale Weaviate.
61+
- `gemini_llm` (pacchetto: `aspera-llm-gemini`): provider LLM Google Gemini (tier gratuito).
6162

6263
### Installazione
6364

@@ -67,6 +68,31 @@ python aspera_cli.py plugins discover
6768
python aspera_cli.py plugins list
6869
```
6970

71+
### Pubblicazione su TestPyPI/PyPI
72+
73+
1) Build locale del pacchetto (esempio Weaviate):
74+
75+
```bash
76+
cd plugins/aspera-vector-weaviate
77+
python -m pip install --upgrade build
78+
python -m build
79+
```
80+
81+
2) Upload su TestPyPI con `twine`:
82+
83+
```bash
84+
python -m pip install --upgrade twine
85+
python -m twine upload --repository testpypi dist/*
86+
```
87+
88+
3) Installazione dal TestPyPI per verifica:
89+
90+
```bash
91+
python -m pip install --index-url https://test.pypi.org/simple/ --no-deps aspera-vector-weaviate
92+
```
93+
94+
4) Pubblicazione PyPI: configura token in CI (GitHub Actions) e tagga la release (vedi workflow nei plugin di esempio).
95+
7096
### Uso programmatico
7197

7298
```python

docs/PRICING.md

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,30 @@
22

33
## Tiers
44

5-
### FREE
6-
- 5s execution time (per observation)
7-
- 100MB memory cap
8-
- 1,000 tokens per observation
9-
- 3 LLM calls per observation
10-
- 10 observations/min
5+
### Community (FREE)
6+
- Uso locale illimitato (open core BSL 1.1)
7+
- SDK/CLI/LSP, plugin system
8+
- Usa la tua `GROQ_API_KEY` (tier gratuito Groq)
9+
- Supporto: GitHub Issues (best‑effort)
1110

12-
### PRO - €49/month
13-
- 30s execution time
14-
- 500MB memory cap
15-
- 10,000 tokens per observation
16-
- 10 LLM calls per observation
17-
- 60 observations/min
11+
### Pro (€99/mese)
12+
- Cloud hosted da RTH Italia (API managed)
13+
- SLA 99%, email support (24h)
14+
- Billing a consumo: token/azioni
15+
- Dashboard metriche e limiti configurabili
1816

19-
### ENTERPRISE - Custom
20-
- 120s execution time
21-
- 2GB memory cap
22-
- 100,000 tokens per observation
23-
- 50 LLM calls per observation
24-
- Unlimited rate (per SLA)
17+
### Enterprise (Custom)
18+
- On‑prem / VPC, multi‑region, DR (RTO/RPO)
19+
- Compliance (SOC2/DPA), audit avanzato
20+
- Supporto 24/7, SLA 99.9%
21+
- Agenti verticali e training su dati proprietari
2522

2623
## ROI Calculator
27-
**Input**: observations/month
28-
**Output**: cost savings vs pure LLM (Groq FREE + symbolic)
24+
**Input**: osservazioni/mese
25+
**Output**: risparmio vs LLM puro (Groq + simbolico)
2926

30-
Example: 100K obs/month
31-
- Pure LLM: $2,000
32-
- ASPERA PRO: $49 + $200 = $249
33-
- **Savings**: 87%
27+
Esempio: 100K osservazioni/mese
28+
- LLM puro: $2,000
29+
- ASPERA Pro: €99 + $200 = ~$299
30+
- **Risparmio**: ~85%
3431

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# aspera-llm-gemini
2+
3+
Plugin LLM per ASPERA basato su Google Gemini (tier gratuito disponibile).
4+
5+
## Installazione
6+
7+
```bash
8+
pip install aspera-llm-gemini
9+
```
10+
11+
Sviluppo locale:
12+
```bash
13+
python -m pip install -e plugins/aspera-llm-gemini
14+
```
15+
16+
## Configurazione
17+
18+
- `GEMINI_API_KEY` (richiesta)
19+
- `GEMINI_MODEL` (default: `gemini-1.5-flash`)
20+
21+
## Uso con CLI ASPERA
22+
23+
```bash
24+
python aspera_cli.py plugins discover
25+
python aspera_cli.py plugins list # vedrai gemini_llm
26+
```
27+
28+
## Uso programmatico
29+
30+
```python
31+
from aspera.plugins.plugin_interface import PluginManager
32+
33+
pm = PluginManager()
34+
pm.discover_plugins()
35+
llm = pm.get_plugin("gemini_llm")
36+
if llm:
37+
llm.initialize({"model": "gemini-1.5-flash"})
38+
print(llm.generate_inference(context={}, signals={}, rules=["if a then b"]))
39+
```
40+
41+
## Build & Publish
42+
43+
```bash
44+
python -m pip install --upgrade build
45+
python -m build
46+
python -m pip install --upgrade twine
47+
python -m twine upload --repository testpypi dist/*
48+
```
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[build-system]
2+
requires = ["setuptools>=65.0", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "aspera-llm-gemini"
7+
version = "0.1.0"
8+
description = "ASPERA plugin: Google Gemini LLM provider"
9+
readme = "README.md"
10+
requires-python = ">=3.10"
11+
license = { text = "Apache-2.0" }
12+
authors = [
13+
{ name = "RTH Italia", email = "info@rthitalia.com" }
14+
]
15+
classifiers = [
16+
"Development Status :: 3 - Alpha",
17+
"Intended Audience :: Developers",
18+
"License :: OSI Approved :: Apache Software License",
19+
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3.10",
21+
"Programming Language :: Python :: 3.11",
22+
"Programming Language :: Python :: 3.12",
23+
]
24+
dependencies = [
25+
"google-generativeai>=0.8.3",
26+
]
27+
28+
[project.urls]
29+
Homepage = "https://github.com/rthitalia/aspera"
30+
Repository = "https://github.com/rthitalia/aspera"
31+
32+
[project.entry-points."aspera.plugins"]
33+
gemini_llm = "aspera_llm_gemini.plugin:GeminiLLMPlugin"
34+
35+
[tool.setuptools]
36+
package-dir = {"" = "src"}
37+
packages = ["aspera_llm_gemini"]
38+
39+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .plugin import GeminiLLMPlugin
2+
3+
__all__ = ["GeminiLLMPlugin"]

0 commit comments

Comments
 (0)