New per-blade lib (src/syncthing_mcp/domain_hint.py, ~155 LOC) implementing the shared DD-338 Pattern engine: equals / contains / glob ops, first-match- wins, YAML pattern loading with graceful degradation (Convention #22). Server module gains a BladeConfigStore reader honouring STALLARI_STATE_ROOT override + the sanitized blade-id directory layout the Swift writer ships (Convention #23 reader-side compliance), plus a polymorphic Syncthing field projector covering both folder records (id/label/path/type) and device records (deviceID/name/addresses). Wired into the two list-returning read tools: - syncthing_list_folders (instances.py — newly gains _meta envelope; was previously bare fmt(); start time now tracked for latency_ms) - syncthing_list_devices (devices.py — extends existing envelope with domain_hints kwarg) formatters.{meta_envelope,append_meta} extended with an optional domain_hints kwarg; key omitted from the JSON tail when empty / None. stallari-plugin.yaml gains a blade_domain_hint_patterns: { patterns: [] } block (0 defaults; users layer their own via the Settings → Blade Domain Hints editor). No tools[] block exists in this manifest — per-tool domain_scope flips land in the catalog mirror at stallari-plugins/plugins/ in a separate parent-session action. pyyaml>=6.0 added to runtime dependencies (gated by ImportError inside load_patterns_from_yaml so the blade still boots if the wheel is absent). Version bump 0.5.0 → 0.6.0 (minor — new substrate capability). Tests: 13 new cases in tests/test_domain_hint.py covering empty-patterns, folder+device matches, first-match-wins, glob wildcards, unknown-field projector handoff, YAML well-formed / partial / malformed / non-mapping root / missing-patterns-key. Full suite 133/133 green. 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.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",
|
|
]
|
|
|
|
[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"]
|