Adds handler-level deterministic ordering to the one multi-record tool in this blade. Sort key is canonical deviceID ascending (dict key from the Syncthing REST API's `/rest/system/connections` response). Implementer-verified shape (architect OQ-5 deferred): the upstream Syncthing REST API returns `connections.connections` as a dict keyed by canonical deviceID — a fixed 64-character base32-shaped hex-class string (e.g. `AAAAAAA-AAAAAAA-...`). The dict key IS the canonical id; `format_connection` consumes `did` as its first positional arg and renders the device's name (or first 8 chars of the deviceID as fallback) at the top of each per-device section. Sort by `kv[0]` (the deviceID) is the canonical Track 2 contract. The change is in-place — a `sorted(..., key=lambda kv: kv[0])` wraps the existing `.items()` view inside the list-comprehension. No LOC delta. Adds tests/test_determinism.py with N=5 byte-equal harness, sort-key correctness, and empty-connections edge case (3 new cases / 136 total). Catalog declaration flip from `unstable → stable` lands in the paired stallari-plugins PR. Version bump 0.6.0 → 0.6.1 (patch — single-tool additive contract). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
35 lines
748 B
TOML
35 lines
748 B
TOML
[project]
|
|
name = "syncthing-blade-mcp"
|
|
version = "0.6.1"
|
|
description = "MCP server for Syncthing — token-efficient replication management, multi-instance, safe disk-space reclamation."
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"mcp[cli]>=1.0.0",
|
|
"httpx>=0.27.0",
|
|
"pydantic>=2.0.0",
|
|
"uvicorn>=0.30.0",
|
|
"starlette>=0.37.0",
|
|
"pyyaml>=6.0",
|
|
]
|
|
|
|
[project.scripts]
|
|
syncthing-blade-mcp = "syncthing_mcp.__main__:main"
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=8.0",
|
|
"pytest-asyncio>=0.24",
|
|
"respx>=0.22",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/syncthing_mcp"]
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|
|
testpaths = ["tests"]
|