ebe3baba78
Replace the delete-before-start workaround with the real mechanism: SYNO.Docker.Project/build_stream is what the DSM "Erstellen" button calls (confirmed via DevTools). It pulls updated images and starts the project. DsmClient.trigger_build_stream(project_id): fires a streaming GET to build_stream, reads the first SSE chunk to confirm DSM accepted the request, then closes. ReadTimeout is swallowed (build running server-side). Immediate JSON error responses are parsed and raised as SynologyError. redeploy_project simplified from 4 steps to 3: 1. Stop (skip for STOPPED, suppress for BUILD_FAILED) 2. trigger_build_stream — DSM pulls images + starts project 3. Poll for RUNNING (timeout raised from 30s → 5min for large pulls) build_stream errors are now fatal (abort with clear message). Removes _read_compose_images_for_project, _try_delete_image and their json/yaml/re imports — no longer needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
45 lines
837 B
TOML
45 lines
837 B
TOML
[project]
|
|
name = "mcp-synology-container"
|
|
version = "0.2.5"
|
|
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",
|
|
]
|