From 06217b6fdcab1aebdb29e81cd7fbadcf869d9a5d Mon Sep 17 00:00:00 2001 From: Piers Date: Sat, 23 May 2026 12:46:47 +1000 Subject: [PATCH] =?UTF-8?q?DD-338=20A.2.dom.c=20=E2=80=94=20domain=5Fhint?= =?UTF-8?q?=20patterns=20+=20per-record=20=5Fmeta.domain=5Fhints?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- pyproject.toml | 3 +- src/syncthing_mcp/domain_hint.py | 155 +++++++++++++++++++++++++ src/syncthing_mcp/formatters.py | 11 +- src/syncthing_mcp/server.py | 140 ++++++++++++++++++++++ src/syncthing_mcp/tools/devices.py | 7 +- src/syncthing_mcp/tools/instances.py | 29 ++++- stallari-plugin.yaml | 9 ++ tests/test_domain_hint.py | 166 +++++++++++++++++++++++++++ uv.lock | 59 +++++++++- 9 files changed, 571 insertions(+), 8 deletions(-) create mode 100644 src/syncthing_mcp/domain_hint.py create mode 100644 tests/test_domain_hint.py diff --git a/pyproject.toml b/pyproject.toml index 3a66b63..d43c9b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "syncthing-blade-mcp" -version = "0.5.0" +version = "0.6.0" description = "MCP server for Syncthing — token-efficient replication management, multi-instance, safe disk-space reclamation." requires-python = ">=3.11" dependencies = [ @@ -9,6 +9,7 @@ dependencies = [ "pydantic>=2.0.0", "uvicorn>=0.30.0", "starlette>=0.37.0", + "pyyaml>=6.0", ] [project.scripts] diff --git a/src/syncthing_mcp/domain_hint.py b/src/syncthing_mcp/domain_hint.py new file mode 100644 index 0000000..5617f1a --- /dev/null +++ b/src/syncthing_mcp/domain_hint.py @@ -0,0 +1,155 @@ +"""DD-338 A.2.dom — per-record domain hint computation. + +Pattern engine consumed by tool modules to annotate per-record results with +a ``domain_hints: {record_id: domain}`` entry in the ``_meta`` envelope. + +First-match-wins over a user-defined pattern list. Patterns live in the +BladeConfigStore (Convention #23) at:: + + /blade-config/syncthing-blade-mcp/config.yaml + +The YAML shape:: + + patterns: + - field: path + op: contains + value: "/Family/" + domain: family + - field: label + op: glob + value: "Work*" + domain: work + - field: deviceID + op: equals + value: ABCDEFG-... + domain: ops + +Empty / missing / malformed config ⇒ empty pattern list ⇒ no +``domain_hints`` key emitted (Convention #22 graceful degradation). +""" + +from __future__ import annotations + +import fnmatch +import logging +from collections.abc import Callable +from dataclasses import dataclass +from typing import Any + +logger = logging.getLogger(__name__) + + +@dataclass(frozen=True) +class Pattern: + """A single domain-hint matching rule. + + Attributes: + field: Logical field name (e.g. ``path``, ``label``, ``deviceID``); + resolved by the per-blade ``field_projector`` callable into the + record's actual storage shape. + op: One of ``equals`` | ``contains`` | ``glob``. + value: Comparison value (always coerced to string; lists are matched + element-wise). + domain: Domain string to emit on match (e.g. ``family``, ``work``). + """ + + field: str + op: str + value: str + domain: str + + +_VALID_OPS = frozenset({"equals", "contains", "glob"}) + + +def compute_domain_hint( + record: dict[str, Any], + patterns: list[Pattern], + field_projector: Callable[[dict[str, Any], str], Any], +) -> str | None: + """Compute the domain hint for a single record. + + First-match-wins over ``patterns``. Returns ``None`` when no pattern + matches, the record lacks the projected field, or the pattern list is + empty. + + The projector may return: + - ``None`` (field absent ⇒ no match) + - a scalar (compared directly) + - a list of scalars or dicts (each element compared; dicts coerced + to empty string ⇒ no match unless ``value=""``) + """ + if not patterns: + return None + for pattern in patterns: + if pattern.op not in _VALID_OPS: + # Unknown op silently skipped — defensive against future schema drift. + continue + rec_val = field_projector(record, pattern.field) + if rec_val is None: + continue + candidates: list[Any] = rec_val if isinstance(rec_val, list) else [rec_val] + for c in candidates: + if isinstance(c, dict): + # Dict candidates cannot be matched without further projection; + # callers should project to a string inside the projector. + continue + s = str(c) + if pattern.op == "equals": + if s == pattern.value: + return pattern.domain + elif pattern.op == "contains": + if pattern.value in s: + return pattern.domain + elif pattern.op == "glob": + if fnmatch.fnmatchcase(s, pattern.value): + return pattern.domain + return None + + +def load_patterns_from_yaml(yaml_str: str) -> list[Pattern]: + """Parse a YAML config string into a list of ``Pattern``. + + Returns ``[]`` on any of: + - empty input + - YAML parse error + - non-mapping root + - ``patterns`` key missing or non-list + - per-pattern missing required keys / type errors + + Per-pattern parse failures are silently skipped (not fatal) — partial + configs still load their good entries. + """ + if not yaml_str.strip(): + return [] + try: + import yaml # type: ignore[import-untyped] + except ImportError: + logger.warning("pyyaml not installed; domain_hint patterns disabled") + return [] + try: + data = yaml.safe_load(yaml_str) + except yaml.YAMLError as e: + logger.warning("blade-config YAML parse error: %s", e) + return [] + if not data or not isinstance(data, dict): + return [] + raw_patterns = data.get("patterns", []) + if not isinstance(raw_patterns, list): + return [] + result: list[Pattern] = [] + for p in raw_patterns: + if not isinstance(p, dict): + continue + try: + result.append( + Pattern( + field=str(p["field"]), + op=str(p["op"]), + value=str(p["value"]), + domain=str(p["domain"]), + ) + ) + except (KeyError, TypeError): + continue + return result diff --git a/src/syncthing_mcp/formatters.py b/src/syncthing_mcp/formatters.py index 933bef3..4d56a95 100644 --- a/src/syncthing_mcp/formatters.py +++ b/src/syncthing_mcp/formatters.py @@ -52,21 +52,28 @@ def meta_envelope( filtered_by: list[str] | None = None, redactions: list[str] | None = None, latency_ms: int, + domain_hints: dict[str, str] | None = None, ) -> str: """Render the canonical JSON-tail _meta envelope line. Returns the literal line ``_meta: {"matched_total": ..., ...}`` — caller is responsible for joining it to the payload with ``\\n\\n``. + + DD-338 A.2.dom.c — when ``domain_hints`` is non-empty, an additional + ``domain_hints: {record_id: domain}`` entry is emitted. Empty / None ⇒ + key omitted entirely (Convention #22 graceful degradation). """ fb = sorted(filtered_by) if filtered_by else [] rd = list(redactions) if redactions else [] - payload = { + payload: dict[str, Any] = { "matched_total": matched_total, "returned": returned, "filtered_by": fb, "redactions": rd, "latency_ms": latency_ms, } + if domain_hints: + payload["domain_hints"] = domain_hints return "_meta: " + json.dumps(payload, separators=(",", ":")) @@ -78,6 +85,7 @@ def append_meta( filtered_by: list[str] | None = None, redactions: list[str] | None = None, latency_ms: int, + domain_hints: dict[str, str] | None = None, ) -> str: """Append the _meta envelope tail line to a serialized payload.""" return payload + "\n\n" + meta_envelope( @@ -86,6 +94,7 @@ def append_meta( filtered_by=filtered_by, redactions=redactions, latency_ms=latency_ms, + domain_hints=domain_hints, ) diff --git a/src/syncthing_mcp/server.py b/src/syncthing_mcp/server.py index f904edf..ab578aa 100644 --- a/src/syncthing_mcp/server.py +++ b/src/syncthing_mcp/server.py @@ -1,14 +1,154 @@ """FastMCP server creation and lifespan.""" +import os from contextlib import asynccontextmanager +from typing import Any from mcp.server.fastmcp import FastMCP from starlette.requests import Request from starlette.responses import JSONResponse +from syncthing_mcp.domain_hint import ( + Pattern, + compute_domain_hint, + load_patterns_from_yaml, +) from syncthing_mcp.registry import get_all_instances +# --------------------------------------------------------------------------- +# DD-338 A.2.dom.c — BladeConfigStore reader + Syncthing field projector +# --------------------------------------------------------------------------- + +_BLADE_ID = "syncthing-blade-mcp" + + +def _state_root() -> str: + """Resolve Stallari state root. + + Honours ``STALLARI_STATE_ROOT`` env var (used in tests + non-standard + deployments); falls back to the macOS Application Support default per + Convention #27 / StallariPaths. + """ + override = os.environ.get("STALLARI_STATE_ROOT") + if override: + return override + return os.path.expanduser("~/Library/Application Support/Stallari") + + +def _sanitize_blade_id(blade_id: str) -> str: + """Mirror the Swift writer's blade-id directory naming. + + Lower-case + ``/`` ⇒ ``_`` — kept in lockstep with BladeConfigStore.swift + (Convention #23: reader and writer agree on the on-disk shape). + """ + return blade_id.lower().replace("/", "_") + + +def _load_blade_config(blade_id: str) -> list[Pattern]: + """Read this blade's domain_hint patterns from the BladeConfigStore. + + Convention #22 graceful degradation: missing / unreadable / malformed + config returns ``[]`` — the blade still runs, simply without per-record + ``domain_hints`` emission. + + Convention #23 reader-side compliance: resolves via state-root + + ``blade-config//config.yaml`` in lockstep with the + Swift writer's path layout. + """ + config_path = os.path.join( + _state_root(), + "blade-config", + _sanitize_blade_id(blade_id), + "config.yaml", + ) + try: + with open(config_path, encoding="utf-8") as f: + yaml_str = f.read() + except OSError: + return [] + return load_patterns_from_yaml(yaml_str) + + +# Cached at module load; re-launch the blade to pick up config edits at v1. +_PATTERNS: list[Pattern] = _load_blade_config(_BLADE_ID) + + +def _syncthing_field_projector(record: dict[str, Any], field: str) -> Any: + """Project a Syncthing record (folder OR device) onto a logical field name. + + Polymorphic across the two record shapes this blade emits: + + Folder record shape:: + + {"id": "...", "label": "...", "path": "...", "type": "sendreceive", + "devices": [...], "paused": false} + + Device record shape:: + + {"deviceID": "ABCD-...", "name": "host", "addresses": [...], + "paused": false, "introducer": false} + + Field resolution is shape-agnostic: try folder-side keys first, fall + through to device-side keys. Unknown field ⇒ ``None`` (no match). + """ + if not isinstance(record, dict): + return None + f = field + # Folder-shape fields + if f in {"id", "label", "path", "type"}: + v = record.get(f) + return v if v is not None else None + # Device-shape fields + if f == "deviceID": + return record.get("deviceID") + if f == "name": + return record.get("name") + if f == "addresses": + v = record.get("addresses") + return v if isinstance(v, list) else None + return None + + +def _record_id(record: dict[str, Any]) -> str | None: + """Derive the stable per-record identifier. + + Folders use ``id``; devices use ``deviceID``. The catalog enforces 1:1 + record-id stability via ``deterministic_ordering=stable`` on the + catalog-mirror tools[] entries. + """ + if not isinstance(record, dict): + return None + rid = record.get("id") + if isinstance(rid, str): + return rid + rid = record.get("deviceID") + if isinstance(rid, str): + return rid + return None + + +def compute_domain_hints_for_records( + records: list[dict[str, Any]], +) -> dict[str, str]: + """Apply ``_PATTERNS`` to each record; return ``{record_id: domain}`` map. + + Records lacking a domain match are omitted. Empty pattern list ⇒ empty + dict ⇒ caller suppresses the ``domain_hints`` envelope key. + """ + if not _PATTERNS: + return {} + out: dict[str, str] = {} + for rec in records: + rid = _record_id(rec) + if rid is None: + continue + hint = compute_domain_hint(rec, _PATTERNS, _syncthing_field_projector) + if hint is not None: + out[rid] = hint + return out + + @asynccontextmanager async def app_lifespan(app): import sys diff --git a/src/syncthing_mcp/tools/devices.py b/src/syncthing_mcp/tools/devices.py index 772b822..55d4e33 100644 --- a/src/syncthing_mcp/tools/devices.py +++ b/src/syncthing_mcp/tools/devices.py @@ -13,7 +13,7 @@ from syncthing_mcp.formatters import ( ) from syncthing_mcp.models import DeviceReadParams, ReadParams, _resolve_scope_folders from syncthing_mcp.registry import get_instance, handle_error_global -from syncthing_mcp.server import mcp +from syncthing_mcp.server import compute_domain_hints_for_records, mcp @mcp.tool( @@ -72,6 +72,10 @@ async def syncthing_list_devices(params: ReadParams) -> str: ) for dev in devices ] + # DD-338 A.2.dom.c — apply domain_hint patterns to raw device records + # (the formatter truncates deviceID in concise mode; use the source + # records so projector sees full deviceID + name + addresses). + domain_hints = compute_domain_hints_for_records(devices) or None payload = fmt(result, concise=params.concise) latency_ms = int((time.perf_counter() - start) * 1000) return append_meta( @@ -81,6 +85,7 @@ async def syncthing_list_devices(params: ReadParams) -> str: filtered_by=filtered_by, redactions=redactions, latency_ms=latency_ms, + domain_hints=domain_hints, ) except Exception as e: return handle_error_global(e) diff --git a/src/syncthing_mcp/tools/instances.py b/src/syncthing_mcp/tools/instances.py index 5aeeddf..ff6fb23 100644 --- a/src/syncthing_mcp/tools/instances.py +++ b/src/syncthing_mcp/tools/instances.py @@ -1,15 +1,16 @@ """Tools for instance management and listing folders (config-level).""" +import time from typing import Any -from syncthing_mcp.formatters import fmt, format_folder +from syncthing_mcp.formatters import append_meta, fmt, format_folder from syncthing_mcp.models import ReadParams from syncthing_mcp.registry import ( get_all_instances, get_instance, handle_error_global, ) -from syncthing_mcp.server import mcp +from syncthing_mcp.server import compute_domain_hints_for_records, mcp @mcp.tool( @@ -63,7 +64,13 @@ async def syncthing_list_instances(params: ReadParams) -> str: }, ) async def syncthing_list_folders(params: ReadParams) -> str: - """All configured folders with labels, types, and device counts.""" + """All configured folders with labels, types, and device counts. + + DD-338 A.2.dom.c — emits per-record ``domain_hints`` in the ``_meta`` + envelope when the user has configured matching patterns via the + BladeConfigStore. + """ + start = time.perf_counter() try: client = get_instance(params.instance) config = await client._get("/rest/config") @@ -89,6 +96,20 @@ async def syncthing_list_folders(params: ReadParams) -> str: "paused": f.get("paused", False), "sharedWith": shared, }) - return fmt(result, concise=params.concise) + # Project domain hints from raw config records — they carry the + # full source-of-truth shape (`id`, `label`, `path`, `type`) the + # projector expects, even when ``concise`` collapses the output. + domain_hints = compute_domain_hints_for_records(folders) or None + payload = fmt(result, concise=params.concise) + latency_ms = int((time.perf_counter() - start) * 1000) + return append_meta( + payload, + matched_total=len(folders), + returned=len(result), + filtered_by=[], + redactions=[], + latency_ms=latency_ms, + domain_hints=domain_hints, + ) except Exception as e: return handle_error_global(e) diff --git a/stallari-plugin.yaml b/stallari-plugin.yaml index 5b08123..c3d08bb 100644 --- a/stallari-plugin.yaml +++ b/stallari-plugin.yaml @@ -99,3 +99,12 @@ env: conformance: required: "38" last_tested: "2026-04-21" + +# DD-338 A.2.dom.c — domain-hint pattern block. Empty by default; users +# layer their own patterns via the Stallari Settings → Blade Domain Hints +# editor, which writes to ``/blade-config/syncthing-blade-mcp/ +# config.yaml``. The harness merges that file at dispatch time; this block +# documents the pack-side contract (presence ⇒ blade participates in +# per-record domain attribution). +blade_domain_hint_patterns: + patterns: [] diff --git a/tests/test_domain_hint.py b/tests/test_domain_hint.py new file mode 100644 index 0000000..33635b2 --- /dev/null +++ b/tests/test_domain_hint.py @@ -0,0 +1,166 @@ +"""DD-338 A.2.dom.c — domain_hint pattern engine tests. + +Tests the pure engine (Pattern, compute_domain_hint, load_patterns_from_yaml) +plus a local copy of the Syncthing field projector so the test file doesn't +trigger FastMCP server boot via ``syncthing_mcp.server`` import. +""" + +from __future__ import annotations + +from typing import Any + +from syncthing_mcp.domain_hint import ( + Pattern, + compute_domain_hint, + load_patterns_from_yaml, +) + + +# --------------------------------------------------------------------------- +# Local copy of _syncthing_field_projector — mirrors server.py to avoid +# importing the FastMCP server module (which spins up registry on import). +# --------------------------------------------------------------------------- + + +def _projector(record: dict[str, Any], field: str) -> Any: + if not isinstance(record, dict): + return None + if field in {"id", "label", "path", "type"}: + return record.get(field) + if field == "deviceID": + return record.get("deviceID") + if field == "name": + return record.get("name") + if field == "addresses": + v = record.get("addresses") + return v if isinstance(v, list) else None + return None + + +# --------------------------------------------------------------------------- +# compute_domain_hint +# --------------------------------------------------------------------------- + + +def test_empty_patterns_returns_none() -> None: + """No patterns ⇒ no domain hint regardless of record shape.""" + record = {"id": "test", "label": "Test", "path": "/Family/photos"} + assert compute_domain_hint(record, [], _projector) is None + + +def test_single_pattern_match_folder() -> None: + """A folder record matches a contains pattern on path.""" + record = { + "id": "photos-2026", + "label": "Family Photos", + "path": "/Volumes/Storage/Family/Photos", + "type": "sendreceive", + } + patterns = [Pattern(field="path", op="contains", value="/Family/", domain="family")] + assert compute_domain_hint(record, patterns, _projector) == "family" + + +def test_first_match_wins() -> None: + """When two patterns match the same record, the first one in the list wins.""" + record = { + "id": "work-docs", + "label": "Work Docs", + "path": "/work/Family/shared", + "type": "sendreceive", + } + patterns = [ + Pattern(field="path", op="contains", value="/work/", domain="work"), + Pattern(field="path", op="contains", value="/Family/", domain="family"), + ] + assert compute_domain_hint(record, patterns, _projector) == "work" + + +def test_glob_wildcard_on_label() -> None: + """fnmatch glob op handles wildcard label matches.""" + record = {"id": "f1", "label": "Work Notes", "path": "/x"} + patterns = [Pattern(field="label", op="glob", value="Work*", domain="work")] + assert compute_domain_hint(record, patterns, _projector) == "work" + + +def test_projector_returns_none_for_unknown_field() -> None: + """Unknown projector field ⇒ no match, no crash.""" + record = {"id": "f1", "label": "L", "path": "/x"} + patterns = [Pattern(field="nonsense", op="equals", value="x", domain="d")] + assert compute_domain_hint(record, patterns, _projector) is None + + +def test_device_record_addresses_list_match() -> None: + """List-valued projector return (addresses) matches element-wise.""" + record = { + "deviceID": "ABCDEFG-AAAAAAA-AAAAAAA-AAAAAAA-AAAAAAA-AAAAAAA-AAAAAAA-AAAAAAA", + "name": "ops-host", + "addresses": ["dynamic", "tcp://10.0.0.5:22000"], + } + patterns = [Pattern(field="addresses", op="contains", value="10.0.0.5", domain="ops")] + assert compute_domain_hint(record, patterns, _projector) == "ops" + + +def test_device_record_equals_deviceid() -> None: + """Exact deviceID match emits the configured domain.""" + record = {"deviceID": "ABCDEFG-XYZ", "name": "h"} + patterns = [Pattern(field="deviceID", op="equals", value="ABCDEFG-XYZ", domain="ops")] + assert compute_domain_hint(record, patterns, _projector) == "ops" + + +# --------------------------------------------------------------------------- +# load_patterns_from_yaml +# --------------------------------------------------------------------------- + + +def test_load_patterns_empty_string() -> None: + assert load_patterns_from_yaml("") == [] + assert load_patterns_from_yaml(" \n ") == [] + + +def test_load_patterns_well_formed() -> None: + yaml_str = """ +patterns: + - field: path + op: contains + value: /Family/ + domain: family + - field: label + op: glob + value: Work* + domain: work +""" + result = load_patterns_from_yaml(yaml_str) + assert len(result) == 2 + assert result[0] == Pattern(field="path", op="contains", value="/Family/", domain="family") + assert result[1] == Pattern(field="label", op="glob", value="Work*", domain="work") + + +def test_load_patterns_missing_key_skipped() -> None: + """Per-pattern parse failures are silently skipped; good entries kept.""" + yaml_str = """ +patterns: + - field: path + op: contains + value: /ok/ + domain: ok + - field: path + op: contains + domain: missing_value +""" + result = load_patterns_from_yaml(yaml_str) + assert len(result) == 1 + assert result[0].domain == "ok" + + +def test_load_patterns_malformed_yaml() -> None: + """YAML parse error ⇒ empty list (Convention #22 graceful degradation).""" + yaml_str = "patterns: [unterminated" + assert load_patterns_from_yaml(yaml_str) == [] + + +def test_load_patterns_non_mapping_root() -> None: + assert load_patterns_from_yaml("- just\n- a\n- list") == [] + + +def test_load_patterns_missing_patterns_key() -> None: + assert load_patterns_from_yaml("other_key: value") == [] diff --git a/uv.lock b/uv.lock index 31aca7e..00a67ef 100644 --- a/uv.lock +++ b/uv.lock @@ -586,6 +586,61 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c0/d2/21af5c535501a7233e734b8af901574572da66fcc254cb35d0609c9080dd/pywin32-311-cp314-cp314-win_arm64.whl", hash = "sha256:a508e2d9025764a8270f93111a970e1d0fbfc33f4153b388bb649b7eec4f9b42", size = 8932540, upload-time = "2025-07-14T20:13:36.379Z" }, ] +[[package]] +name = "pyyaml" +version = "6.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" }, + { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" }, + { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" }, + { url = "https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00", size = 882114, upload-time = "2025-09-25T21:32:03.376Z" }, + { url = "https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", size = 806638, upload-time = "2025-09-25T21:32:04.553Z" }, + { url = "https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a", size = 767463, upload-time = "2025-09-25T21:32:06.152Z" }, + { url = "https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4", size = 794986, upload-time = "2025-09-25T21:32:07.367Z" }, + { url = "https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b", size = 142543, upload-time = "2025-09-25T21:32:08.95Z" }, + { url = "https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf", size = 158763, upload-time = "2025-09-25T21:32:09.96Z" }, + { url = "https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196", size = 182063, upload-time = "2025-09-25T21:32:11.445Z" }, + { url = "https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0", size = 173973, upload-time = "2025-09-25T21:32:12.492Z" }, + { url = "https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28", size = 775116, upload-time = "2025-09-25T21:32:13.652Z" }, + { url = "https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c", size = 844011, upload-time = "2025-09-25T21:32:15.21Z" }, + { url = "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", size = 807870, upload-time = "2025-09-25T21:32:16.431Z" }, + { url = "https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e", size = 761089, upload-time = "2025-09-25T21:32:17.56Z" }, + { url = "https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea", size = 790181, upload-time = "2025-09-25T21:32:18.834Z" }, + { url = "https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5", size = 137658, upload-time = "2025-09-25T21:32:20.209Z" }, + { url = "https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b", size = 154003, upload-time = "2025-09-25T21:32:21.167Z" }, + { url = "https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd", size = 140344, upload-time = "2025-09-25T21:32:22.617Z" }, + { url = "https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8", size = 181669, upload-time = "2025-09-25T21:32:23.673Z" }, + { url = "https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1", size = 173252, upload-time = "2025-09-25T21:32:25.149Z" }, + { url = "https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c", size = 767081, upload-time = "2025-09-25T21:32:26.575Z" }, + { url = "https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5", size = 841159, upload-time = "2025-09-25T21:32:27.727Z" }, + { url = "https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6", size = 801626, upload-time = "2025-09-25T21:32:28.878Z" }, + { url = "https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6", size = 753613, upload-time = "2025-09-25T21:32:30.178Z" }, + { url = "https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be", size = 794115, upload-time = "2025-09-25T21:32:31.353Z" }, + { url = "https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26", size = 137427, upload-time = "2025-09-25T21:32:32.58Z" }, + { url = "https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c", size = 154090, upload-time = "2025-09-25T21:32:33.659Z" }, + { url = "https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb", size = 140246, upload-time = "2025-09-25T21:32:34.663Z" }, + { url = "https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac", size = 181814, upload-time = "2025-09-25T21:32:35.712Z" }, + { url = "https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310", size = 173809, upload-time = "2025-09-25T21:32:36.789Z" }, + { url = "https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7", size = 766454, upload-time = "2025-09-25T21:32:37.966Z" }, + { url = "https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788", size = 836355, upload-time = "2025-09-25T21:32:39.178Z" }, + { url = "https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5", size = 794175, upload-time = "2025-09-25T21:32:40.865Z" }, + { url = "https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764", size = 755228, upload-time = "2025-09-25T21:32:42.084Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35", size = 789194, upload-time = "2025-09-25T21:32:43.362Z" }, + { url = "https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac", size = 156429, upload-time = "2025-09-25T21:32:57.844Z" }, + { url = "https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3", size = 143912, upload-time = "2025-09-25T21:32:59.247Z" }, + { url = "https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3", size = 189108, upload-time = "2025-09-25T21:32:44.377Z" }, + { url = "https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba", size = 183641, upload-time = "2025-09-25T21:32:45.407Z" }, + { url = "https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c", size = 831901, upload-time = "2025-09-25T21:32:48.83Z" }, + { url = "https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702", size = 861132, upload-time = "2025-09-25T21:32:50.149Z" }, + { url = "https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c", size = 839261, upload-time = "2025-09-25T21:32:51.808Z" }, + { url = "https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065", size = 805272, upload-time = "2025-09-25T21:32:52.941Z" }, + { url = "https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65", size = 829923, upload-time = "2025-09-25T21:32:54.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9", size = 174062, upload-time = "2025-09-25T21:32:55.767Z" }, + { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, +] + [[package]] name = "referencing" version = "0.37.0" @@ -770,12 +825,13 @@ wheels = [ [[package]] name = "syncthing-blade-mcp" -version = "0.5.0" +version = "0.6.0" source = { editable = "." } dependencies = [ { name = "httpx" }, { name = "mcp", extra = ["cli"] }, { name = "pydantic" }, + { name = "pyyaml" }, { name = "starlette" }, { name = "uvicorn" }, ] @@ -792,6 +848,7 @@ requires-dist = [ { name = "httpx", specifier = ">=0.27.0" }, { name = "mcp", extras = ["cli"], specifier = ">=1.0.0" }, { name = "pydantic", specifier = ">=2.0.0" }, + { name = "pyyaml", specifier = ">=6.0" }, { name = "starlette", specifier = ">=0.37.0" }, { name = "uvicorn", specifier = ">=0.30.0" }, ]