Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,18 @@ jobs:
COUNCIL_REDIS_HOST: redis
COUNCIL_REDIS_PASSWORD: dummy # pragma: allowlist secret
run: |
uv lock --check
uv run python -m compileall -q nomos executors trusted_executor_contract monitor demo scripts
uv run python -c "import yaml; yaml.safe_load(open('.github/workflows/ci.yml'))"
uv run python -c "from nomos.config.settings import load_config; load_config('configs/council.yaml')"

- name: Validate published NAT extra
run: |
python -m venv /tmp/nomos-nat-install
/tmp/nomos-nat-install/bin/python -m pip install --upgrade "pip @ https://files.pythonhosted.org/packages/62/36/a3aed958d60531cb442b7ab4596cda7b3621cfb916f8ae1d6769795c7dc1/pip-26.2-py3-none-any.whl#sha256=931c303696af6fa3417112103b1cad26890e5a07eccb5b99783700e33f2b8aad"
/tmp/nomos-nat-install/bin/python -m pip install ".[nat]"
/tmp/nomos-nat-install/bin/python -m pip check

lint:
name: Lint
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ validate_config:
- uv run python -m compileall -q nomos executors trusted_executor_contract monitor demo scripts
- uv run python -c "import yaml; yaml.safe_load(open('.gitlab-ci.yml'))"
- NVIDIA_API_KEY=dummy COUNCIL_REDIS_HOST=redis COUNCIL_REDIS_PASSWORD=dummy uv run python -c "from nomos.config.settings import load_config; load_config('configs/council.yaml')"
- python -m venv /tmp/nomos-nat-install
- /tmp/nomos-nat-install/bin/python -m pip install --upgrade pip
- /tmp/nomos-nat-install/bin/python -m pip install ".[nat]"
- /tmp/nomos-nat-install/bin/python -m pip check

lint:
extends: .python_job
Expand Down
53 changes: 11 additions & 42 deletions LICENSE-THIRD-PARTY
Original file line number Diff line number Diff line change
Expand Up @@ -13,46 +13,35 @@ MIT License

Packages under the MIT License:

aioitertools 0.13.0
alembic 1.18.4
annotated-doc 0.0.4
annotated-types 0.7.0
anthropic 0.92.0
anyio 4.13.0
attrs 26.1.0
beautifulsoup4 4.14.3
blinker 1.9.0
cachetools 7.0.5
cffi 2.0.0
cfgv 3.5.0
charset-normalizer 3.4.7
colorlog 6.10.1
docstring-parser 0.17.0
expandvars 1.1.2
fastapi 0.135.3
greenlet 3.4.0
fastapi 0.141.1
h11 0.16.0
httptools 0.7.1
httpx-sse 0.4.3
identify 2.6.18
iniconfig 2.3.0
jiter 0.13.0
jmespath 1.1.0
jsonschema 4.26.0
jsonschema-specifications 2025.9.1
mako 1.3.12
markdown-it-py 4.0.0
mcp 1.27.0
mcp 1.29.0
mdurl 0.1.2
mypy 1.20.0
mypy-extensions 1.1.0
narwhals 2.19.0
optuna 4.8.0
pip 26.0.1
pkce 1.0.3
pkginfo 1.12.1.2
platformdirs 4.9.6
plotly 6.6.0
pluggy 1.6.0
pre-commit 4.5.1
pydantic 2.12.5
Expand All @@ -72,16 +61,15 @@ Packages under the MIT License:
ruff 0.15.9
setuptools 82.0.1
six 1.17.0
soupsieve 2.8.3
sqlalchemy 2.0.49
soupsieve 2.9.1
tabulate 0.10.0
tomli 2.4.1
tzlocal 5.4.4
typing-inspection 0.4.2
urllib3 2.7.0
uvloop 0.22.1
virtualenv 21.2.0
watchfiles 1.1.1
wikipedia 1.4.0

Full MIT License Text:
--------------------------------------------------
Expand Down Expand Up @@ -111,40 +99,27 @@ Apache License, Version 2.0

Packages under the Apache License, Version 2.0:

aioboto3 15.5.0
aiobotocore 2.25.1
aiofiles 25.1.0
aiohttp 3.13.5
aiorwlock 1.5.1
aiosignal 1.4.0
async-timeout 5.0.1
bandit 1.9.4
boto3 1.40.61
botocore 1.40.61
coverage 7.13.5
detect-secrets 1.5.0
distro 1.9.0
frozenlist 1.8.0
grpcio 1.80.0
grpcio-tools 1.80.0
hf-xet 1.4.3
huggingface-hub 0.36.2
jsonpath-ng 1.8.0
multidict 6.7.1
nvidia-nat 1.5.0
nvidia-nat-core 1.5.0
nvidia-nat-mcp 1.5.0
nvidia-nat 1.8.0
nvidia-nat-atif 1.8.0
nvidia-nat-core 1.8.0
nvidia-nat-mcp 1.8.0
openai 2.31.0
openinference-semantic-conventions 0.1.28
propcache 0.4.1
pymilvus 2.6.11
pymilvus 2.6.9
pytest-asyncio 1.3.0
python-multipart 0.0.32
requests 2.33.1
s3transfer 0.14.0
stevedore 5.7.0
tzdata 2026.1
yarl 1.23.0

Full Apache License, Version 2.0 Text:
--------------------------------------------------
Expand All @@ -158,14 +133,11 @@ BSD License (2-Clause / 3-Clause)
Packages under BSD licenses:

authlib 1.7.2
click 8.3.2
click 8.4.2
colorama 0.4.6
flask 3.1.3
fsspec 2026.3.0
httpcore 1.0.9
httpx 0.28.1
idna 3.11
itsdangerous 2.2.0
jinja2 3.1.6
joserfc 1.7.1
markupsafe 3.0.3
Expand All @@ -179,11 +151,9 @@ Packages under BSD licenses:
pygments 2.20.0
python-dotenv 1.2.2
sse-starlette 3.3.4
starlette 0.52.1
starlette 1.3.1
uvicorn 0.44.0
websockets 16.0
werkzeug 3.1.8
wrapt 1.17.3

Full BSD License Text:
--------------------------------------------------
Expand Down Expand Up @@ -924,7 +894,6 @@ Python Software Foundation License 2.0

Packages under the Python Software Foundation License 2.0:

aiohappyeyeballs 2.6.1
distlib 0.4.0
pywin32 311
typing-extensions 4.15.0
Expand Down
3 changes: 2 additions & 1 deletion agent_signup/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
fastapi>=0.110
starlette>=1.3.1
uvicorn[standard]>=0.27
redis>=5.0
# Service mode: write accounts/trusted-executors to the durable store (PostgreSQL)
# the council reads, and generate ed25519 trusted-executor keypairs server-side.
cryptography>=42.0.0
cryptography>=48.0.1
psycopg[binary,pool]>=3.2
3 changes: 2 additions & 1 deletion demo/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# SPDX-License-Identifier: Apache-2.0
fastapi>=0.110
uvicorn[standard]>=0.27
mcp>=1.23.0
mcp>=1.28.1,<2
starlette>=1.3.1
httpx>=0.27
# Security floors for transitive deps pulled in via mcp (CVE fixed versions)
pyjwt>=2.13.0 # CVE-2026-48526
Expand Down
44 changes: 30 additions & 14 deletions deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ FROM python:3.13-slim AS base

# Prevent Python from writing .pyc files and enable unbuffered output
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
PYTHONUNBUFFERED=1 \
PATH="/app/.venv/bin:$PATH"

WORKDIR /app

Expand All @@ -34,19 +35,11 @@ RUN apt-get update && \
RUN pip install --no-cache-dir uv

# ── Install deps first (cache layer) ─────────────────────────
# Copy only pyproject.toml to cache the dependency install layer.
# Copy only dependency metadata to cache the dependency install layer.
# We install the heavy deps before copying source so this layer is cached.
COPY pyproject.toml ./
RUN uv pip install --system \
"cryptography>=42.0.0" \
"pydantic>=2.0.0" \
"pydantic-settings>=2.0.0" \
"pyyaml>=6.0.0" \
"nvidia-nat[mcp]>=1.5.0,<2.0.0" \
"nvidia-nat-langchain>=1.0.0" \
"mcp>=1.23.0" \
"anthropic>=0.30.0" \
"redis>=5.0.0"
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev --no-install-project \
--extra nat --extra anthropic --extra grpc --extra postgres
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

# ── Copy application code ────────────────────────────────────
COPY nomos/ ./nomos/
Expand All @@ -58,7 +51,30 @@ COPY scripts/councils.py ./scripts/councils.py

# Install the package (registers entry points for NAT plugin discovery)
RUN chmod -R a+rX ./nomos ./nomos_runtime ./trusted_executor_contract ./configs ./scripts && \
uv pip install --system ".[nat,anthropic,grpc,postgres]"
uv sync --frozen --no-dev \
--extra nat --extra anthropic --extra grpc --extra postgres

# Block incompatible dependency overrides and broken runtime crypto integrations.
RUN python - <<'PY'
import subprocess
import sys

pip_check = subprocess.run([sys.executable, "-m", "pip", "check"], check=False)

from mcp import ClientSession
from nat.builder.builder import Builder
from nomos.level_0.crypto import KeyPair, Signer, Verifier

payload = b"nomos-image-signing-validation"
key_pair = KeyPair.generate(key_id="image-build")
verifier = Verifier()
verifier.register_key_pair(key_pair)
signature = Signer(key_pair).sign(payload)
if not verifier.verify(payload, signature):
raise RuntimeError("Ed25519 signing verification failed")
if pip_check.returncode:
raise SystemExit("pip check failed")
PY

# ── Create non-root user for execution sandbox ───────────────
RUN useradd --create-home --shell /bin/bash council && \
Expand Down
8 changes: 3 additions & 5 deletions deploy/Dockerfile.executor
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ RUN curl -fsSL "https://dl.k8s.io/release/$(curl -fsSL https://dl.k8s.io/release
chmod +x /usr/local/bin/kubectl

# ── Python deps (deliberately minimal) ──────────────────────
RUN pip install --no-cache-dir \
"pydantic>=2.0.0" \
"cryptography>=42.0.0" \
"redis>=5.0.0" \
"pyyaml>=6.0"
COPY deploy/executor-constraints.txt ./
RUN pip install --no-cache-dir --only-binary=:all: --require-hashes \
--requirement executor-constraints.txt

# ── Copy only the executor packages ─────────────────────────
COPY trusted_executor_contract/ ./trusted_executor_contract/
Expand Down
30 changes: 30 additions & 0 deletions deploy/executor-constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# Complete hashed requirements set for Dockerfile.executor on Python 3.13 Linux
# amd64/arm64. This resolution is separate from uv.lock because the executor does
# not install NVIDIA NAT. Binary-only installation keeps every artifact hash-covered.
annotated-types==0.8.0 \
--hash=sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0
cffi==2.1.1 \
--hash=sha256:a931079504ecc49efed7744c476a5c343a92fabf66dec2db95edb1b2fdc770e2 \
--hash=sha256:f16c709686a78c727bbbf059f92b0bf41c6fc60deec706d2dc19f529175a6125
cryptography==50.0.0 \
--hash=sha256:06a32a980526a6ab9a4b9bf8f7385800791e2bb960903cb6b530e4817509a3b7 \
--hash=sha256:fd9192b7b70c573d7f214eb1ae35e00d359f6f5e4b27c7e21e30de1fc6204645
pycparser==3.0 \
--hash=sha256:b727414169a36b7d524c1c3e31839a521725078d7b2ff038656844266160a992
pydantic==2.13.4 \
--hash=sha256:45a282cde31d808236fd7ea9d919b128653c8b38b393d1c4ab335c62924d9aba
pydantic-core==2.46.4 \
--hash=sha256:9551187363ffc0de2a00b2e47c25aeaeb1020b69b668762966df15fc5659dd5a \
--hash=sha256:f027324c56cd5406ca49c124b0db10e56c69064fec039acc571c29020cc87c76
pyyaml==6.0.3 \
--hash=sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6 \
--hash=sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c
redis==8.1.0 \
--hash=sha256:a4fe1aac3d3b3cc791d4b3d5931c5a956045dc951ee74d1c913ee3ac4d2ee9fb
typing-extensions==4.16.0 \
--hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8
typing-inspection==0.4.2 \
--hash=sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7
1 change: 1 addition & 0 deletions monitor/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
fastapi>=0.110
starlette>=1.3.1
uvicorn[standard]>=0.27
httpx>=0.27
# Stats path (MONITOR_STATS_SOURCE=redis): read the council telemetry stream.
Expand Down
Loading