era-memory 0.1.0__tar.gz
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.
- era_memory-0.1.0/.github/workflows/ci.yml +36 -0
- era_memory-0.1.0/.github/workflows/release.yml +41 -0
- era_memory-0.1.0/.gitignore +15 -0
- era_memory-0.1.0/Dockerfile +15 -0
- era_memory-0.1.0/INSTALL.md +192 -0
- era_memory-0.1.0/LICENSE +201 -0
- era_memory-0.1.0/PKG-INFO +220 -0
- era_memory-0.1.0/README.md +168 -0
- era_memory-0.1.0/docker-compose.yml +38 -0
- era_memory-0.1.0/docs/HANDOVER-era-labs-tools.md +163 -0
- era_memory-0.1.0/docs/PROGRESS.md +80 -0
- era_memory-0.1.0/docs/adr/0001-dimension-is-a-per-deployment-contract.md +64 -0
- era_memory-0.1.0/docs/era-memory-light-spec.md +338 -0
- era_memory-0.1.0/pyproject.toml +65 -0
- era_memory-0.1.0/requirements-internal.txt +13 -0
- era_memory-0.1.0/src/era_memory/__init__.py +49 -0
- era_memory-0.1.0/src/era_memory/__main__.py +152 -0
- era_memory-0.1.0/src/era_memory/adapters/__init__.py +1 -0
- era_memory-0.1.0/src/era_memory/adapters/auth.py +24 -0
- era_memory-0.1.0/src/era_memory/adapters/fastembed/__init__.py +168 -0
- era_memory-0.1.0/src/era_memory/adapters/memory/__init__.py +307 -0
- era_memory-0.1.0/src/era_memory/adapters/openai/__init__.py +82 -0
- era_memory-0.1.0/src/era_memory/adapters/postgres/__init__.py +323 -0
- era_memory-0.1.0/src/era_memory/adapters/sqlite/__init__.py +328 -0
- era_memory-0.1.0/src/era_memory/app.py +156 -0
- era_memory-0.1.0/src/era_memory/config.py +65 -0
- era_memory-0.1.0/src/era_memory/core/__init__.py +0 -0
- era_memory-0.1.0/src/era_memory/core/logic/__init__.py +0 -0
- era_memory-0.1.0/src/era_memory/core/logic/dedup.py +49 -0
- era_memory-0.1.0/src/era_memory/core/logic/entropy.py +37 -0
- era_memory-0.1.0/src/era_memory/core/logic/envelope.py +50 -0
- era_memory-0.1.0/src/era_memory/core/logic/matryoshka.py +24 -0
- era_memory-0.1.0/src/era_memory/core/logic/rrf.py +54 -0
- era_memory-0.1.0/src/era_memory/core/orchestration.py +91 -0
- era_memory-0.1.0/src/era_memory/core/pipeline.py +80 -0
- era_memory-0.1.0/src/era_memory/core/search.py +105 -0
- era_memory-0.1.0/src/era_memory/embedders.py +74 -0
- era_memory-0.1.0/src/era_memory/errors.py +34 -0
- era_memory-0.1.0/src/era_memory/memory.py +106 -0
- era_memory-0.1.0/src/era_memory/models.py +150 -0
- era_memory-0.1.0/src/era_memory/ports/__init__.py +28 -0
- era_memory-0.1.0/src/era_memory/ports/auth.py +11 -0
- era_memory-0.1.0/src/era_memory/ports/blob_store.py +17 -0
- era_memory-0.1.0/src/era_memory/ports/embedder.py +19 -0
- era_memory-0.1.0/src/era_memory/ports/extractor.py +15 -0
- era_memory-0.1.0/src/era_memory/ports/kms.py +26 -0
- era_memory-0.1.0/src/era_memory/ports/queue.py +24 -0
- era_memory-0.1.0/src/era_memory/ports/record_store.py +47 -0
- era_memory-0.1.0/src/era_memory/ports/telemetry.py +18 -0
- era_memory-0.1.0/src/era_memory/ports/vector_store.py +48 -0
- era_memory-0.1.0/src/era_memory/wiring.py +225 -0
- era_memory-0.1.0/tests/__init__.py +0 -0
- era_memory-0.1.0/tests/conformance/__init__.py +0 -0
- era_memory-0.1.0/tests/conformance/test_embedder.py +38 -0
- era_memory-0.1.0/tests/conformance/test_kms.py +29 -0
- era_memory-0.1.0/tests/conformance/test_record_store.py +74 -0
- era_memory-0.1.0/tests/conformance/test_vector_store.py +65 -0
- era_memory-0.1.0/tests/conftest.py +107 -0
- era_memory-0.1.0/tests/test_auth.py +20 -0
- era_memory-0.1.0/tests/test_core_logic.py +62 -0
- era_memory-0.1.0/tests/test_e2e_tier0.py +77 -0
- era_memory-0.1.0/tests/test_embedder_resolution.py +69 -0
- era_memory-0.1.0/tests/test_envelope.py +39 -0
- era_memory-0.1.0/tests/test_http_api.py +49 -0
- era_memory-0.1.0/tests/test_import_isolation.py +39 -0
- era_memory-0.1.0/tests/test_openai_embedder.py +30 -0
- era_memory-0.1.0/tests/test_orchestration.py +117 -0
- era_memory-0.1.0/tests/test_postgres_tier1.py +63 -0
- era_memory-0.1.0/tests/test_sqlite_tier0.py +81 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main, bootstrap]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
validate:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
services:
|
|
12
|
+
postgres:
|
|
13
|
+
image: pgvector/pgvector:pg17
|
|
14
|
+
env:
|
|
15
|
+
POSTGRES_PASSWORD: era
|
|
16
|
+
POSTGRES_DB: era
|
|
17
|
+
ports:
|
|
18
|
+
- 5432:5432
|
|
19
|
+
options: >-
|
|
20
|
+
--health-cmd "pg_isready -U postgres"
|
|
21
|
+
--health-interval 2s
|
|
22
|
+
--health-timeout 3s
|
|
23
|
+
--health-retries 20
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: "3.12"
|
|
29
|
+
- name: Install
|
|
30
|
+
run: pip install -e ".[dev,sqlite,postgres,openai,server,encryption]"
|
|
31
|
+
- name: Lint
|
|
32
|
+
run: ruff check src tests
|
|
33
|
+
- name: Test (incl. Postgres-backed conformance)
|
|
34
|
+
env:
|
|
35
|
+
MEMORY_TEST_PG_DSN: postgresql://postgres:era@localhost:5432/era
|
|
36
|
+
run: pytest -q
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Publishes to PyPI via Trusted Publishing (OIDC) — no API tokens or secrets to manage.
|
|
4
|
+
# Trigger: push a version tag (e.g. v0.1.0) or publish a GitHub Release.
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
tags:
|
|
9
|
+
- "v*"
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.12"
|
|
19
|
+
- name: Build sdist + wheel
|
|
20
|
+
run: |
|
|
21
|
+
python -m pip install --upgrade build twine
|
|
22
|
+
python -m build
|
|
23
|
+
twine check dist/*
|
|
24
|
+
- uses: actions/upload-artifact@v4
|
|
25
|
+
with:
|
|
26
|
+
name: dist
|
|
27
|
+
path: dist/
|
|
28
|
+
|
|
29
|
+
publish:
|
|
30
|
+
needs: build
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
environment: pypi # configure this environment + the PyPI trusted publisher
|
|
33
|
+
permissions:
|
|
34
|
+
id-token: write # required for OIDC trusted publishing
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/download-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: dist
|
|
39
|
+
path: dist/
|
|
40
|
+
- name: Publish to PyPI
|
|
41
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# era-memory HTTP service (Tier 1 default). Deployable to era-labs-tools (Cloud Run / GKE).
|
|
2
|
+
FROM python:3.12-slim
|
|
3
|
+
|
|
4
|
+
WORKDIR /app
|
|
5
|
+
COPY pyproject.toml README.md ./
|
|
6
|
+
COPY src ./src
|
|
7
|
+
|
|
8
|
+
# Tier-1 stack: Postgres+pgvector, OpenAI-compatible embeddings, HTTP server.
|
|
9
|
+
RUN pip install --no-cache-dir ".[postgres,openai,server]"
|
|
10
|
+
|
|
11
|
+
ENV MEMORY_TIER=1
|
|
12
|
+
EXPOSE 8080
|
|
13
|
+
|
|
14
|
+
# Build the app from env at startup (MEMORY_PG_DSN, MEMORY_BEARER_TOKEN, MEMORY_EMBEDDING_URL...).
|
|
15
|
+
CMD ["uvicorn", "era_memory.app:create_app", "--factory", "--host", "0.0.0.0", "--port", "8080"]
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Installing and using era-memory
|
|
2
|
+
|
|
3
|
+
A practical, vendor-neutral guide for using era-memory in **your own** AI application — no Era
|
|
4
|
+
account, cloud project, or private registry required. For the architecture overview see
|
|
5
|
+
[`README.md`](README.md); for Era-internal deployment see
|
|
6
|
+
[`docs/HANDOVER-era-labs-tools.md`](docs/HANDOVER-era-labs-tools.md).
|
|
7
|
+
|
|
8
|
+
## 1. Requirements
|
|
9
|
+
|
|
10
|
+
- **Python 3.10+**
|
|
11
|
+
- That's it for the base library — it has **zero third-party dependencies**. Each backend
|
|
12
|
+
(SQLite vectors, Postgres, an embedding endpoint, the HTTP service) is an optional extra you
|
|
13
|
+
opt into.
|
|
14
|
+
|
|
15
|
+
## 2. Install
|
|
16
|
+
|
|
17
|
+
> **Not yet published to PyPI.** Install from source for now. (`pip install era-memory` will
|
|
18
|
+
> work once the first release is cut.)
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
git clone https://github.com/Era-Laboratories/era-memory.git
|
|
22
|
+
cd era-memory
|
|
23
|
+
python -m venv .venv && . .venv/bin/activate
|
|
24
|
+
pip install -e ".[tier0]"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Extras
|
|
28
|
+
|
|
29
|
+
| Extra | Pulls in | Use it for |
|
|
30
|
+
|-------|----------|------------|
|
|
31
|
+
| `sqlite` | `sqlite-vec` | On-disk vector + lexical search in one SQLite file (Tier 0) |
|
|
32
|
+
| `openai` | `httpx` | The OpenAI-compatible embedder (any `/embeddings` endpoint) |
|
|
33
|
+
| `postgres` | `asyncpg`, `pgvector` | Postgres + pgvector store (Tier 1) |
|
|
34
|
+
| `server` | `fastapi`, `uvicorn`, `pydantic`, `orjson` | The HTTP service |
|
|
35
|
+
| `encryption` | `cryptography` | Envelope encryption of stored content |
|
|
36
|
+
| `redis` | `redis` | Redis-backed queue |
|
|
37
|
+
| `tier0` | `sqlite` + `localembed` | Convenience bundle for laptop/offline |
|
|
38
|
+
| `tier1` | `postgres` + `openai` + `redis` + `server` | Convenience bundle for the service |
|
|
39
|
+
|
|
40
|
+
Mix freely, e.g. `pip install -e ".[sqlite,openai]"` for an on-disk store with a real embedder.
|
|
41
|
+
|
|
42
|
+
> **The Tier 2 `[milvus]`, `[vllm]`, `[gcp]` extras are not yet shipped** (adapters land in a
|
|
43
|
+
> later release). The private Era observability stack is intentionally **not** in the public
|
|
44
|
+
> package. Everything in the table above is fully public and installable.
|
|
45
|
+
|
|
46
|
+
## 3. Verify the install
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
python -c "from era_memory import build_memory, MemoryRecord, SearchRequest; print('ok')"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## 4. Use it as a library (Tier 0, in-process)
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
import asyncio
|
|
56
|
+
from era_memory import build_memory, MemoryRecord, SearchRequest
|
|
57
|
+
|
|
58
|
+
async def main():
|
|
59
|
+
mem = build_memory(tier=0, db_path="memory.db") # one SQLite file; drop db_path for in-RAM
|
|
60
|
+
await mem.store(MemoryRecord(user_id="u1", content="Ada prefers dark roast coffee"))
|
|
61
|
+
res = await mem.search(SearchRequest(user_id="u1", query="coffee"))
|
|
62
|
+
print([r.content for r in res.results])
|
|
63
|
+
|
|
64
|
+
asyncio.run(main())
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## 5. Set up a real embedder (required for semantic search)
|
|
68
|
+
|
|
69
|
+
**This is the step most likely to trip you up.** With no embedder supplied and nothing set up,
|
|
70
|
+
era-memory uses a **non-semantic** hashed-token stand-in so the library runs with zero setup — it
|
|
71
|
+
only matches on shared literal words. You have two ways to get real semantic retrieval; pick one.
|
|
72
|
+
|
|
73
|
+
### Option A — local ONNX model (offline, no endpoint, no API key)
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pip install "era-memory[localembed]" # fastembed + onnxruntime, CPU-only
|
|
77
|
+
era-memory setup # interactive: pick a model, download it from Hugging Face
|
|
78
|
+
era-memory status # shows what's configured / cached
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`setup` offers a choice of model and caches it under `~/.cache/era-memory/models`
|
|
82
|
+
(override with `ERA_MEMORY_MODEL_DIR`):
|
|
83
|
+
|
|
84
|
+
| Model key | Model | Dim | Download | License |
|
|
85
|
+
|-----------|-------|-----|----------|---------|
|
|
86
|
+
| `bge-small` (default) | `BAAI/bge-small-en-v1.5` | 384 | ~90 MB | MIT |
|
|
87
|
+
| `mxbai-large` | `mixedbread-ai/mxbai-embed-large-v1` | 1024 | ~640 MB | Apache-2.0 |
|
|
88
|
+
|
|
89
|
+
Once a model is cached, **`build_memory(...)` uses it automatically** — no arguments needed:
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
from era_memory import build_memory
|
|
93
|
+
mem = build_memory(tier=0, db_path="memory.db") # auto-resolves the cached local model
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Or skip the CLI and let the library download-and-serve on first use:
|
|
97
|
+
|
|
98
|
+
```python
|
|
99
|
+
mem = build_memory(tier=0, db_path="memory.db", embedder="auto")
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
> No surprises: a bare `build_memory()` only uses an **already-cached** model and never downloads
|
|
103
|
+
> on its own. The download happens only via `era-memory setup` or `embedder="auto"` (both explicit).
|
|
104
|
+
> Non-interactive (CI): `era-memory setup --yes --model bge-small`.
|
|
105
|
+
|
|
106
|
+
### Option B — an OpenAI-compatible endpoint (hosted or local)
|
|
107
|
+
|
|
108
|
+
Talks to *any* server exposing `POST /embeddings` — so still not cloud-locked:
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
from era_memory import build_memory
|
|
112
|
+
from era_memory.adapters.openai import OpenAICompatibleEmbedder
|
|
113
|
+
|
|
114
|
+
embedder = OpenAICompatibleEmbedder(
|
|
115
|
+
base_url="http://localhost:11434/v1", # endpoint base; `/embeddings` is appended
|
|
116
|
+
model="nomic-embed-text",
|
|
117
|
+
dimensions=768, # MUST match the model's output (see §6)
|
|
118
|
+
api_key=None, # set if your endpoint requires a bearer key
|
|
119
|
+
)
|
|
120
|
+
mem = build_memory(tier=0, db_path="memory.db", embedder=embedder)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
| Provider | `base_url` | Notes |
|
|
124
|
+
|----------|-----------|-------|
|
|
125
|
+
| **Ollama** (local) | `http://localhost:11434/v1` | `ollama pull nomic-embed-text`; no API key |
|
|
126
|
+
| **vLLM** (self-hosted) | `http://<host>:8000/v1` | Serve any HF embedding model |
|
|
127
|
+
| **LiteLLM** proxy | `http://<host>:4000/v1` | Fan out to many providers behind one URL |
|
|
128
|
+
| **OpenAI** | `https://api.openai.com/v1` | `model="text-embedding-3-small"`, `dimensions=1536`, set `api_key` |
|
|
129
|
+
|
|
130
|
+
Set `MEMORY_EMBEDDING_URL` (+ `MEMORY_EMBEDDING_MODEL`/`_DIMENSIONS`/`_API_KEY`) to use this path
|
|
131
|
+
from the HTTP service or without constructing the embedder yourself.
|
|
132
|
+
|
|
133
|
+
## 6. Choosing a dimension
|
|
134
|
+
|
|
135
|
+
The vector column is created at your embedder's dimension and a store is **pinned to one
|
|
136
|
+
`(model, dim)` for its lifetime** — changing it later means re-embedding into a fresh store. Pick
|
|
137
|
+
once, up front. See the
|
|
138
|
+
[pairings table](README.md#choosing-a-store-embedder-and-dimension) and
|
|
139
|
+
[`docs/adr/0001-dimension-is-a-per-deployment-contract.md`](docs/adr/0001-dimension-is-a-per-deployment-contract.md).
|
|
140
|
+
If you set `MEMORY_EMBEDDING_DIMENSIONS` **and** pass an embedder with a different
|
|
141
|
+
`.dimensions`, wiring fails fast with a clear error rather than corrupting the store.
|
|
142
|
+
|
|
143
|
+
## 7. Run it as a service (Tier 1, Postgres + HTTP)
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
pip install -e ".[tier1]"
|
|
147
|
+
docker compose up --build # Postgres+pgvector + the HTTP API on :8080
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Configure via environment variables:
|
|
151
|
+
|
|
152
|
+
| Variable | Required | Meaning |
|
|
153
|
+
|----------|----------|---------|
|
|
154
|
+
| `MEMORY_TIER` | yes (`1`) | Selects the Postgres+HTTP adapter set |
|
|
155
|
+
| `MEMORY_PG_DSN` | yes | `postgresql://user:pass@host:5432/db` (needs pgvector ≥ 0.7 for `halfvec`) |
|
|
156
|
+
| `MEMORY_BEARER_TOKEN` | yes | Static bearer token clients must send as `Authorization: Bearer …` |
|
|
157
|
+
| `MEMORY_EMBEDDING_URL` | for real search | OpenAI-compatible `/embeddings` base URL; omit → non-semantic dev embedder |
|
|
158
|
+
| `MEMORY_EMBEDDING_MODEL` | with URL | Model name sent to the endpoint |
|
|
159
|
+
| `MEMORY_EMBEDDING_DIMENSIONS` | with URL | Output dim; must match the model and stay constant for the DB's life |
|
|
160
|
+
| `MEMORY_EMBEDDING_API_KEY` | if endpoint needs it | Bearer key forwarded to the embedding endpoint |
|
|
161
|
+
| `MEMORY_DB_PATH` | Tier 0 only | SQLite file path when running the app at Tier 0 |
|
|
162
|
+
|
|
163
|
+
Routes: `GET /health`, `GET /ready`, `POST /api/memories`, `POST /api/memories/search`.
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
TOKEN="change-me"
|
|
167
|
+
curl -s -H "Authorization: Bearer $TOKEN" -H "X-User-Id: u1" -H "Content-Type: application/json" \
|
|
168
|
+
-X POST localhost:8080/api/memories -d '{"content":"Ada prefers dark roast coffee"}'
|
|
169
|
+
curl -s -H "Authorization: Bearer $TOKEN" -H "X-User-Id: u1" -H "Content-Type: application/json" \
|
|
170
|
+
-X POST localhost:8080/api/memories/search -d '{"query":"coffee"}'
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
> `user_id` comes from the `X-User-Id` header and scopes/isolates all data — your calling app
|
|
174
|
+
> sets it. The bearer token is a single shared secret, not per-user identity; put the service
|
|
175
|
+
> behind your own auth/perimeter for multi-tenant production use.
|
|
176
|
+
|
|
177
|
+
## 8. Troubleshooting
|
|
178
|
+
|
|
179
|
+
- **Search returns junk / nothing relevant** → you're on the default non-semantic embedder.
|
|
180
|
+
Set up a real one (§5).
|
|
181
|
+
- **`pip install` fails on `era-telemetry` / a git URL** → you're installing the Era-internal
|
|
182
|
+
`requirements-internal.txt` without access to the private repos. External users don't need it;
|
|
183
|
+
use the public extras (§2).
|
|
184
|
+
- **`halfvec` type errors on Postgres** → your pgvector is < 0.7. Upgrade, or use the
|
|
185
|
+
`pgvector/pgvector:pg17` image as in `docker-compose.yml`.
|
|
186
|
+
- **`ConfigurationError: Embedder dimension … != MEMORY_EMBEDDING_DIMENSIONS …`** → your env
|
|
187
|
+
and your embedder disagree on dimension; set one source of truth (§6).
|
|
188
|
+
- **Run the tests** to confirm a healthy install:
|
|
189
|
+
```bash
|
|
190
|
+
pip install -e ".[dev,sqlite,postgres,openai,server,encryption]"
|
|
191
|
+
pytest -q # 81 pass + 4 skipped without a local Postgres
|
|
192
|
+
```
|
era_memory-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Era Laboratories
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|