[build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "proximo-proxmox" version = "0.57.1" description = "The governed client for Proxmox (PVE, PBS, PMG, PDM): plans, keeps the receipts, puts things back." readme = "README.md" requires-python = ">=3.12" license = "AGPL-3.0-or-later" # LICENSES/Apache-2.0.txt: the outside contributions came in under Apache-2.0 (see README, License). license-files = ["LICENSE", "LICENSES/*"] authors = [{ name = "John Broadway" }, { name = "Claude (Anthropic)" }] keywords = ["proxmox", "pve", "pbs", "pmg", "pdm", "mail-gateway", "datacenter-manager", "mcp", "model-context-protocol", "a2a", "agent2agent", "lxc", "homelab", "infrastructure", "self-hosted", "multi-cluster"] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: System Administrators", "Topic :: System :: Systems Administration", ] dependencies = [ # Official Model Context Protocol SDK — DUAL-MAJOR: one build runs 1.x (FastMCP) and # 2.x (MCPServer) through the src/proximo/core/mcpcompat.py seam. The floor is MEASURED, not # inherited (2026-08-12, per-release import probes): the previously declared 1.2.0 could # not import proximo at all — ToolAnnotations is absent from mcp.types through 1.6, and a # fastmcp registration crash on union-annotated params blocks import through 1.21.0 # (fixed in 1.21.1). 1.21.1-1.23 import and serve but cannot run the suite # (streamable_http_client arrives at 1.24); 1.24 is the first suite-green release # (full suite verified on 1.24.0). The <3 ceiling excludes the unproven next major; the # admitted set is pinned as a SUPPORTED_MAJORS table in tests/test_dependency_bounds.py # via `packaging` — never a substring check. # THE TWO-MAJOR RULE, so this range is never argued from scratch again: Proximo supports AT # MOST TWO mcp majors at a time — the one our own artifacts RUN (the lock: 2.x since 0.44.0) # and the ONE BEHIND IT, as an upgrade window for adopters who pinned. Never three. # When 3.0 ships: move the lock to 3.x, move this floor to `mcp>=2,<4`, and DELETE the 1.x # branches — the whole seam is one module, core/mcpcompat.py, plus 12 MCP_MAJOR branches across # two files (measured 2026-09-21), so dropping a major is a deletion, not a refactor. # Carrying 1.x today is NOT inertia: upstream shipped 1.30.0 and 2.2.0 on the SAME DAY # (2026-09-07), so it is a maintained major, and dropping a major the vendor still cuts does # not make us current, it only narrows who can install us. The trigger to drop it is upstream # stopping 1.x releases, or 3.0 arriving — whichever comes first. "mcp>=1.24,<3", "httpx>=0.27,<1", # Proxmox REST API client # Imported directly in 43 modules (Field param docs, BeforeValidator coercion) but was # only ever a transitive dep via mcp — a future mcp release dropping it would break every # fresh install. Declared with the same major-bound discipline as the others. "pydantic>=2,<3", ] [project.urls] Homepage = "https://john-broadway.github.io/proximo/" Repository = "https://github.com/john-broadway/proximo" Documentation = "https://john-broadway.github.io/proximo/" Issues = "https://github.com/john-broadway/proximo/issues" Changelog = "https://github.com/john-broadway/proximo/blob/main/CHANGELOG.md" [project.optional-dependencies] # The A2A (Agent2Agent) face is OPTIONAL — the MCP core keeps zero extra deps. # Install with: pip install 'proximo-proxmox[a2a]' (adds the official a2a-sdk + an ASGI server). # a2a-sdk[signing] pulls PyJWT for the SIGNET card-signing helpers; cryptography is used directly # by proximo.core.perimeter.a2a.signing — declared explicitly rather than relied on transitively. # The cryptography FLOOR is a security bound, not a feature floor: GHSA-g6cj-pr64-35w5 (HIGH, # 2026-08-03) affects >=44,<50, so >=50 is what keeps an adopter out of the vulnerable range. # Don't lower it — and the floor is guarded, not merely asked for: the ceiling test only checks # that the next major is closed (a floor back at >=49 leaves it green, proven by mutation), so # test_the_cryptography_floor_excludes_the_bleichenbacher_range asserts the floor separately. # The starlette FLOOR is a behaviour floor: 1.7.0 is the first release whose Host check parses a # bracketed IPv6 Host (`[::1]:8080`); before it the check compared the text up to the first colon, # `[`, and a door bound to an IPv6 address could not be reached by that address at all. Held by # test_the_starlette_floor_is_the_first_release_that_parses_an_ipv6_host. a2a = ["a2a-sdk[signing]>=1.1,<2", "uvicorn>=0.30,<1", "starlette>=1.7.0,<2", "cryptography>=50.0.0,<51"] # The HTTP/OpenAPI face is OPTIONAL too — the full governed tool surface + trust funnel, the same # shared dispatch as A2A, served as plain REST for no-code clients (Open WebUI etc.). ASGI only; no a2a-sdk. # Install with: pip install 'proximo-proxmox[http]' # cryptography is for caller-badge verification (proximo.core.perimeter.badge) — ES256 JWS pins on this face. http = ["uvicorn>=0.30,<1", "starlette>=1.7.0,<2", "cryptography>=50.0.0,<51"] # The MCP-over-streamable-HTTP face is OPTIONAL — the SAME server instance the stdio door runs, # served over the SDK's native Streamable HTTP transport behind the shared perimeter guard (no # third-party stdio→HTTP bridge needed). This extra used to raise the mcp floor to 1.8 for # streamable_http_app(); the base floor (>=1.24, measured) now exceeds that on its own, so the # extra carries only the ASGI stack. Install with: pip install 'proximo-proxmox[mcp-http]' mcp-http = ["uvicorn>=0.30,<1", "starlette>=1.7.0,<2", "cryptography>=50.0.0,<51"] dev = [ "pytest>=8", "pytest-asyncio>=1.4.0", "ruff>=0.6", "pyright>=1.1", "packaging>=24", "a2a-sdk[signing]>=1.1", "uvicorn>=0.30", "starlette>=1.7.0", "cryptography>=50.0.0", # A2A slice + SIGNET tests ] [project.scripts] # THE GOVERNED CORE'S DOORS, and nothing else (the default-command swap, 2026-10-17). `proximo` # is the MCP door over stdio: six tools over every address the vendor publishes. The shell door # needs no model, no agent and no protocol: `proximo-core pve GET /nodes/pve1/status` from a bash # script or a cron job, and it carries the operator's verbs (`mint`, `doctor`, `badge`). The # network doors serve the same six tools behind the one perimeter. Same distribution, one # dependency graph; the core's import closure stays httpx-only and tests/test_closure.py asserts it. proximo = "proximo.core.doors.mcp:main" proximo-proxmox = "proximo.core.doors.mcp:main" # alias matching the PyPI dist name (for `uvx proximo-proxmox`) proximo-core = "proximo.core.doors.cli:main" proximo-mcp-http = "proximo.core.doors.mcphttp:main" # MCP over streamable HTTP (needs [mcp-http]) proximo-http = "proximo.core.doors.http:main" # REST, with an OpenAPI document (needs [http]) proximo-a2a = "proximo.core.doors.a2a:main" # an A2A agent with a signed card (needs [a2a]) # [tool.uv] carried `constraint-dependencies = ["mcp>=1.24,<2"]` from the dual-support port # (0.39.0) until 0.44.0: the published metadata admitted 1.x AND 2.x, but our own artifacts # (uv.lock -> requirements/*.txt -> the CI default leg, the container, the SBOM) stayed on 1.x # while the flip waited on "its own later deliberate act". That act is this release. It was # load-bearing right up to it: until 0.43.0, mcp 2.x sanitized every non-ToolError to # "Error executing tool ", so a 2.x client read every Proximo refusal as a bare tool # name. Shipping a 2.x image before that fix would have shipped a mute governance layer. # # The lock now resolves the newest mcp (2.x). The published floor deliberately does NOT move: # `mcp>=1.24,<3` still admits 1.x, and CI's compat leg installs 1.x unpinned to keep that # claim honest. Constrain here again only to hold the lock BELOW what the metadata admits, # and say why. [tool.hatch.build.targets.wheel] packages = ["src/proximo"] # The sdist is a SECOND publish path (PyPI hosts it alongside the wheel). Without an explicit allowlist # hatchling bundles the whole repo root — including .gitea/ (internal forge CI + the node-name deny # list), .remember/, CLAUDE.md, and the internal strategy docs. Ship ONLY the user-facing set, the same # way the github mirror is curated. Deny-by-default: add a path here on purpose, never by omission. [tool.hatch.build.targets.sdist] include = [ "/src/proximo", "/README.md", "/docs/SETUP.md", "/CHANGELOG.md", "/LICENSE", "/LICENSES", ] [tool.ruff] line-length = 120 target-version = "py312" src = ["src", "tests"] [tool.ruff.lint] # S = flake8-bandit (security): we run a hypervisor tool, lint for it. # C90 = mccabe cyclomatic complexity — a coarse readability gate, not a design verdict: # it's an early smell test that a function has too many branches to hold in your head at once # (2026-07-01: caught two ~200-line blast.py functions at complexity 32/28 before decomposition). select = ["E", "F", "I", "UP", "B", "S", "C90"] [tool.ruff.lint.mccabe] # 21 is a CEILING, not a target: it is set by the single worst pre-existing function on the # whole tree today (plan_prune_grant in access.py, complexity 21) — not by blast.py, whose worst # function is now 6 post-refactor. Lower this only after a follow-up pass brings down the other # ~30 functions currently sitting between 10-21 (see `access.py`, `pmg.py`, `cluster_ops.py`, # `envelope.py`, `diagnose.py`, `storage_admin.py`, `access_users.py`); until then, 21 stops NEW # regressions above today's worst offender without failing the build on pre-existing debt this # gate wasn't scoped to fix. max-complexity = 21 [tool.ruff.lint.per-file-ignores] "tests/**" = ["S101", "S105", "S106"] [tool.pytest.ini_options] asyncio_mode = "auto" testpaths = ["tests"] [tool.pyright] # Type-check the shipped package only. Structural test doubles (_FakeApi, mock kwargs) # trip nominal-typing false positives that don't reflect runtime behavior; pytest is # what guards the tests. Scoping here keeps `pyright` honestly clean. include = ["src"]