The blade had no write gate and no confirm parameter anywhere — every mutating tool (override, revert, restart, accept-device, replace-stignore, …) fired ungated, unlike every sibling blade. This brings syncthing up to the class baseline: - All 13 mutating tools now require SYNCTHING_WRITE_ENABLED=true (models.require_write, env read at call time) and refuse with a clear message when the gate is off. - Destructive/disruptive operations additionally require confirm=true: syncthing_override_folder, syncthing_revert_folder, syncthing_restart, syncthing_accept_device, syncthing_accept_folder, syncthing_set_ignores. Refusals explain what the operation would do. These six are now annotated destructiveHint: true. - New ConfirmWriteParams / ConfirmFolderWriteParams models; confirm field added to AcceptDeviceInput, AcceptFolderInput, SetIgnoresInput. - Server-level FastMCP instructions document the gate + confirm contract; README, SKILL.md, and stallari-plugin.yaml (setup field + env entry) updated to match. - Regression suite tests/test_write_gate.py: gated-off refusal (all 13, unset + non-"true" value), gated-on-without-confirm refusal (all 6 destructive), gated-on-with-confirm proceeds (mocked), and non-destructive-needs-no-confirm. Existing write-tool tests updated to enable the gate + pass confirm. 201 tests green. Version 0.8.0 → 0.9.0 (behaviour-affecting safety gate). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
36 lines
790 B
TOML
36 lines
790 B
TOML
[project]
|
|
name = "syncthing-blade-mcp"
|
|
version = "0.9.0"
|
|
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",
|
|
"stallari-mcp-helpers>=0.1.0,<1.0.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"]
|