4caac3a6c7
Cache failed `_ensure_initialized` outcomes for 60 seconds so that repeated tool calls during a credential outage (wrong password, IP-blocked 407, DNS failure) don't keep hammering DSM. Each caller gets the same exception raised from the cache until the cooldown window expires, after which a fresh attempt is made. - Adds INIT_ERROR_COOLDOWN module constant (60.0 s). - Adds self._init_error / self._init_error_until state on DsmClient. - Re-raises cached error inside the init lock, emits warning log on cache entry. Addresses M4 from the 0.2.7 review. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
45 lines
837 B
TOML
45 lines
837 B
TOML
[project]
|
|
name = "mcp-synology-container"
|
|
version = "0.2.8"
|
|
description = "MCP server for Synology Container Manager"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"mcp>=1.0.0",
|
|
"httpx>=0.27.0",
|
|
"pyyaml>=6.0",
|
|
"keyring>=25.0.0",
|
|
"click>=8.1.0",
|
|
"rich>=13.0.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=8.0",
|
|
"pytest-asyncio>=0.24",
|
|
]
|
|
|
|
[project.scripts]
|
|
mcp-synology-container = "mcp_synology_container.cli:main"
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/mcp_synology_container"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
src = ["src", "tests"]
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "W", "I", "N", "UP", "B", "SIM", "TCH"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"ruff>=0.15.10",
|
|
]
|