axor-backend 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.
- axor_backend-0.1.0/.gitignore +9 -0
- axor_backend-0.1.0/PKG-INFO +56 -0
- axor_backend-0.1.0/README.md +31 -0
- axor_backend-0.1.0/pyproject.toml +34 -0
- axor_backend-0.1.0/src/axor_backend/__init__.py +1 -0
- axor_backend-0.1.0/src/axor_backend/app.py +1019 -0
- axor_backend-0.1.0/src/axor_backend/auth.py +104 -0
- axor_backend-0.1.0/src/axor_backend/broadcast.py +31 -0
- axor_backend-0.1.0/src/axor_backend/demo.py +176 -0
- axor_backend-0.1.0/src/axor_backend/ee/LICENSE +25 -0
- axor_backend-0.1.0/src/axor_backend/ee/__init__.py +20 -0
- axor_backend-0.1.0/src/axor_backend/ee/cli.py +114 -0
- axor_backend-0.1.0/src/axor_backend/ee/license.py +102 -0
- axor_backend-0.1.0/src/axor_backend/errors.py +13 -0
- axor_backend-0.1.0/src/axor_backend/graph.py +247 -0
- axor_backend-0.1.0/src/axor_backend/main.py +10 -0
- axor_backend-0.1.0/src/axor_backend/migrations/env.py +31 -0
- axor_backend-0.1.0/src/axor_backend/migrations/script.py.mako +22 -0
- axor_backend-0.1.0/src/axor_backend/migrations/versions/0001_baseline.py +107 -0
- axor_backend-0.1.0/src/axor_backend/migrations/versions/0002_dead_letters.py +33 -0
- axor_backend-0.1.0/src/axor_backend/migrations/versions/0003_org_features.py +66 -0
- axor_backend-0.1.0/src/axor_backend/migrations/versions/0004_multinode_events.py +41 -0
- axor_backend-0.1.0/src/axor_backend/monitor.py +119 -0
- axor_backend-0.1.0/src/axor_backend/notifications.py +154 -0
- axor_backend-0.1.0/src/axor_backend/observability.py +52 -0
- axor_backend-0.1.0/src/axor_backend/plane.py +357 -0
- axor_backend-0.1.0/src/axor_backend/replay_api.py +286 -0
- axor_backend-0.1.0/src/axor_backend/share.py +232 -0
- axor_backend-0.1.0/src/axor_backend/signing.py +62 -0
- axor_backend-0.1.0/src/axor_backend/storage.py +699 -0
- axor_backend-0.1.0/src/axor_backend/vault_creds.py +128 -0
- axor_backend-0.1.0/src/axor_backend/vault_signing.py +117 -0
- axor_backend-0.1.0/tests/e2e/__init__.py +1 -0
- axor_backend-0.1.0/tests/e2e/conftest.py +230 -0
- axor_backend-0.1.0/tests/e2e/test_e2e_auth.py +75 -0
- axor_backend-0.1.0/tests/e2e/test_e2e_durability.py +66 -0
- axor_backend-0.1.0/tests/e2e/test_e2e_governed.py +43 -0
- axor_backend-0.1.0/tests/e2e/test_e2e_journey.py +79 -0
- axor_backend-0.1.0/tests/e2e/test_e2e_notifications.py +38 -0
- axor_backend-0.1.0/tests/e2e/test_e2e_plane.py +128 -0
- axor_backend-0.1.0/tests/e2e/test_e2e_stream.py +30 -0
- axor_backend-0.1.0/tests/golden/size1/evidence.json +1 -0
- axor_backend-0.1.0/tests/golden/size1/scrubber.json +1 -0
- axor_backend-0.1.0/tests/test_auth.py +141 -0
- axor_backend-0.1.0/tests/test_backend.py +271 -0
- axor_backend-0.1.0/tests/test_graph.py +52 -0
- axor_backend-0.1.0/tests/test_graph_inmemory.py +162 -0
- axor_backend-0.1.0/tests/test_jcs_signing_vectors.py +58 -0
- axor_backend-0.1.0/tests/test_jcs_vectors.py +42 -0
- axor_backend-0.1.0/tests/test_migrations.py +132 -0
- axor_backend-0.1.0/tests/test_org_features.py +191 -0
- axor_backend-0.1.0/tests/test_phase6.py +485 -0
- axor_backend-0.1.0/tests/test_size1_gate.py +92 -0
- axor_backend-0.1.0/tests/test_subgraph_api.py +109 -0
- axor_backend-0.1.0/tests/test_topology.py +203 -0
- axor_backend-0.1.0/tests/test_vault.py +163 -0
- axor_backend-0.1.0/tests/vectors/jcs.json +127 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: axor-backend
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: FastAPI backend: trace ingest, control plane (SSE+POST), replay API, GraphStore.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Bucha11/axor-control-plane
|
|
6
|
+
Project-URL: Documentation, https://github.com/Bucha11/axor-control-plane#readme
|
|
7
|
+
Project-URL: Issues, https://github.com/Bucha11/axor-control-plane/issues
|
|
8
|
+
License: Apache-2.0
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Requires-Python: >=3.12
|
|
13
|
+
Requires-Dist: aiosqlite>=0.20
|
|
14
|
+
Requires-Dist: alembic>=1.13
|
|
15
|
+
Requires-Dist: asyncpg>=0.29
|
|
16
|
+
Requires-Dist: axor-core<0.10,>=0.9.2
|
|
17
|
+
Requires-Dist: axor-eval<0.2,>=0.1.0
|
|
18
|
+
Requires-Dist: fastapi>=0.111
|
|
19
|
+
Requires-Dist: kuzu>=0.4
|
|
20
|
+
Requires-Dist: pynacl>=1.5
|
|
21
|
+
Requires-Dist: sqlalchemy[asyncio]>=2.0
|
|
22
|
+
Requires-Dist: sse-starlette>=2.1
|
|
23
|
+
Requires-Dist: uvicorn>=0.29
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# axor-backend
|
|
27
|
+
|
|
28
|
+
FastAPI system-of-record + plane service. Persists and fans out; it never
|
|
29
|
+
interprets governance — replay/degradation is `axor_core.kernel`'s.
|
|
30
|
+
|
|
31
|
+
Run: `AXOR_ALLOW_UNSIGNED=1 uv run uvicorn axor_backend.main:app --factory --port 8400`
|
|
32
|
+
(SQLite by default; set `AXOR_DATABASE_URL=postgresql+asyncpg://…` for Postgres/JSONB).
|
|
33
|
+
|
|
34
|
+
Modules:
|
|
35
|
+
|
|
36
|
+
| Module | Responsibility |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `app.py` | app factory: routes, auth middleware, lifespan (stale monitor) |
|
|
39
|
+
| `plane.py` | plane service (protocol v0.2): `/command`, `/desired` (SSE), `/telemetry`, `/facts`, `/cascade-stop` |
|
|
40
|
+
| `storage.py` | append-only events + runs/desired/reported/facts/pins/keys/share-links/notification-subs; JSON→JSONB on Postgres |
|
|
41
|
+
| `replay_api.py` | config→`KernelConfig`, scrubber/counterfactual payloads |
|
|
42
|
+
| `graph.py` | taint graph — a derived index over the event log; `InMemoryGraphStore` (default, rebuilt from the DB at boot) + `KuzuGraphStore`; trace→derivation folding |
|
|
43
|
+
| `signing.py` | operator command signing — delegates JCS to `axor_core.kernel.canonicalize` |
|
|
44
|
+
| `notifications.py` / `monitor.py` | webhook triggers (retries + dead-letter); node-stale sweep |
|
|
45
|
+
| `share.py` | EvidenceCase HTML + dependency-free PDF receipt, revocable links |
|
|
46
|
+
| `auth.py` | opt-in master token + scoped API keys |
|
|
47
|
+
| `ee/` | Enterprise Edition (offline Ed25519 license) — commercial licence, see `ee/LICENSE` |
|
|
48
|
+
|
|
49
|
+
Env: `AXOR_DATABASE_URL`, `AXOR_API_TOKEN`, `AXOR_OPERATOR_KEYS` (JSON op→hex),
|
|
50
|
+
`AXOR_ALLOW_UNSIGNED`, `AXOR_VENDOR_PUBKEY`, `AXOR_STALE_AFTER`.
|
|
51
|
+
|
|
52
|
+
Tests: `uv run pytest packages/axor-backend`. In-process suites use httpx
|
|
53
|
+
ASGITransport; `tests/e2e/` (marker `e2e`) boots the real backend + proxy as
|
|
54
|
+
subprocesses and drives them over HTTP/SSE — cross-service upload, live audit &
|
|
55
|
+
desired streams, webhook delivery, auth enforcement, and process-restart
|
|
56
|
+
durability. Run only those with `-m e2e`, or skip them with `-m 'not e2e'`.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# axor-backend
|
|
2
|
+
|
|
3
|
+
FastAPI system-of-record + plane service. Persists and fans out; it never
|
|
4
|
+
interprets governance — replay/degradation is `axor_core.kernel`'s.
|
|
5
|
+
|
|
6
|
+
Run: `AXOR_ALLOW_UNSIGNED=1 uv run uvicorn axor_backend.main:app --factory --port 8400`
|
|
7
|
+
(SQLite by default; set `AXOR_DATABASE_URL=postgresql+asyncpg://…` for Postgres/JSONB).
|
|
8
|
+
|
|
9
|
+
Modules:
|
|
10
|
+
|
|
11
|
+
| Module | Responsibility |
|
|
12
|
+
|---|---|
|
|
13
|
+
| `app.py` | app factory: routes, auth middleware, lifespan (stale monitor) |
|
|
14
|
+
| `plane.py` | plane service (protocol v0.2): `/command`, `/desired` (SSE), `/telemetry`, `/facts`, `/cascade-stop` |
|
|
15
|
+
| `storage.py` | append-only events + runs/desired/reported/facts/pins/keys/share-links/notification-subs; JSON→JSONB on Postgres |
|
|
16
|
+
| `replay_api.py` | config→`KernelConfig`, scrubber/counterfactual payloads |
|
|
17
|
+
| `graph.py` | taint graph — a derived index over the event log; `InMemoryGraphStore` (default, rebuilt from the DB at boot) + `KuzuGraphStore`; trace→derivation folding |
|
|
18
|
+
| `signing.py` | operator command signing — delegates JCS to `axor_core.kernel.canonicalize` |
|
|
19
|
+
| `notifications.py` / `monitor.py` | webhook triggers (retries + dead-letter); node-stale sweep |
|
|
20
|
+
| `share.py` | EvidenceCase HTML + dependency-free PDF receipt, revocable links |
|
|
21
|
+
| `auth.py` | opt-in master token + scoped API keys |
|
|
22
|
+
| `ee/` | Enterprise Edition (offline Ed25519 license) — commercial licence, see `ee/LICENSE` |
|
|
23
|
+
|
|
24
|
+
Env: `AXOR_DATABASE_URL`, `AXOR_API_TOKEN`, `AXOR_OPERATOR_KEYS` (JSON op→hex),
|
|
25
|
+
`AXOR_ALLOW_UNSIGNED`, `AXOR_VENDOR_PUBKEY`, `AXOR_STALE_AFTER`.
|
|
26
|
+
|
|
27
|
+
Tests: `uv run pytest packages/axor-backend`. In-process suites use httpx
|
|
28
|
+
ASGITransport; `tests/e2e/` (marker `e2e`) boots the real backend + proxy as
|
|
29
|
+
subprocesses and drives them over HTTP/SSE — cross-service upload, live audit &
|
|
30
|
+
desired streams, webhook delivery, auth enforcement, and process-restart
|
|
31
|
+
durability. Run only those with `-m e2e`, or skip them with `-m 'not e2e'`.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "axor-backend"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "FastAPI backend: trace ingest, control plane (SSE+POST), replay API, GraphStore."
|
|
5
|
+
requires-python = ">=3.12"
|
|
6
|
+
readme = "README.md"
|
|
7
|
+
license = { text = "Apache-2.0" }
|
|
8
|
+
classifiers = [
|
|
9
|
+
"Development Status :: 4 - Beta",
|
|
10
|
+
"License :: OSI Approved :: Apache Software License",
|
|
11
|
+
"Programming Language :: Python :: 3.12",
|
|
12
|
+
]
|
|
13
|
+
dependencies = [
|
|
14
|
+
"axor-core>=0.9.2,<0.10",
|
|
15
|
+
"axor-eval>=0.1.0,<0.2",
|
|
16
|
+
"fastapi>=0.111", "sse-starlette>=2.1", "uvicorn>=0.29",
|
|
17
|
+
"sqlalchemy[asyncio]>=2.0", "asyncpg>=0.29",
|
|
18
|
+
"kuzu>=0.4",
|
|
19
|
+
"aiosqlite>=0.20",
|
|
20
|
+
"alembic>=1.13",
|
|
21
|
+
"pynacl>=1.5",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
[project.urls]
|
|
25
|
+
Homepage = "https://github.com/Bucha11/axor-control-plane"
|
|
26
|
+
Documentation = "https://github.com/Bucha11/axor-control-plane#readme"
|
|
27
|
+
Issues = "https://github.com/Bucha11/axor-control-plane/issues"
|
|
28
|
+
|
|
29
|
+
[project.scripts]
|
|
30
|
+
axor-license = "axor_backend.ee.cli:main"
|
|
31
|
+
|
|
32
|
+
[build-system]
|
|
33
|
+
requires = ["hatchling"]
|
|
34
|
+
build-backend = "hatchling.build"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""axor-backend. Replay imports axor_core.kernel.replay — never reimplements gates (rule 0)."""
|