Adds handler-level deterministic ordering to the one multi-record tool in
this blade. Sort key is canonical deviceID ascending (dict key from the
Syncthing REST API's `/rest/system/connections` response).
Implementer-verified shape (architect OQ-5 deferred): the upstream Syncthing
REST API returns `connections.connections` as a dict keyed by canonical
deviceID — a fixed 64-character base32-shaped hex-class string (e.g.
`AAAAAAA-AAAAAAA-...`). The dict key IS the canonical id; `format_connection`
consumes `did` as its first positional arg and renders the device's name
(or first 8 chars of the deviceID as fallback) at the top of each per-device
section. Sort by `kv[0]` (the deviceID) is the canonical Track 2 contract.
The change is in-place — a `sorted(..., key=lambda kv: kv[0])` wraps the
existing `.items()` view inside the list-comprehension. No LOC delta.
Adds tests/test_determinism.py with N=5 byte-equal harness, sort-key
correctness, and empty-connections edge case (3 new cases / 136 total).
Catalog declaration flip from `unstable → stable` lands in the paired
stallari-plugins PR.
Version bump 0.6.0 → 0.6.1 (patch — single-tool additive contract).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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>
Brings syncthing-blade-mcp into compliance with DD-242 transport policy
(directives/access-policy.md): blade MCPs invoked manually with HTTP
enabled MUST default to 127.0.0.1, never 0.0.0.0. Users who want to
expose the server beyond loopback set MCP_HOST=0.0.0.0 explicitly.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Combined Track 1 + Track 2 + Track 3 single-PR (heaviest A.1 spec, only
top-5 blade in both scope AND determinism gap).
Track 1: scope= arg with env-var folder-ID list indirection
(SYNCTHING_{WORK,PERSONAL,FAMILY,HOME,INFRASTRUCTURE}_FOLDERS
comma-separated; per-instance _<INSTANCE> override). Server-side
from blade-process perspective (Syncthing REST has no native
folder filter; blade-internal filter IS the over-fetch boundary
per DD-333).
Track 2: canonical sort on device.deviceID + folder id tie-breaker on
replication_report (fixes sort-key collision case).
Track 3: structured _meta envelope (canonical JSON-tail wire shape per
architect amendment 2026-05-21) with matched_total / returned /
filtered_by / redactions / latency_ms; filtered_by alphabetised
for hash reproducibility.
Touched tools: syncthing_list_devices, syncthing_folder_status,
syncthing_replication_report. Other 35 tools unchanged.
scope=public raises through the standard error path (folders are not
public in Syncthing's model). Unconfigured scope passes through with a
honest scope=<name>_unconfigured redaction.
Tests: 120 pass (97 baseline + 23 new). Determinism check is N=5
byte-equal (modulo latency_ms) per tool.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add setup.fields with labels, placeholders, and help text
- Remove MCP_TRANSPORT, MCP_AUTH_TOKEN from env
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Align naming with the Blade MCP server convention used across the
Sidereal platform. Updates package name, console script entry point,
Docker configs, deploy script, and documentation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Enable stateless_http + json_response on FastMCP for scalable HTTP
serving without sticky sessions (Traefik-friendly)
- Add MCP_TRANSPORT env var to select stdio (default) vs streamable-http
- Add bearer token auth middleware (MCP_AUTH_TOKEN) with /health bypass
- Add Dockerfile (Python 3.12-slim + uv) and docker-compose.yml with
Traefik v2/v3 labels, ACME TLS, and health check routing
- Add .env.example with multi-instance config for mini/tn-sb/tn-mr2/p-mba
- Add uvicorn + starlette as runtime dependencies
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Enable stateless_http + json_response on FastMCP for scalable HTTP
serving without sticky sessions (Traefik-friendly)
- Add MCP_TRANSPORT env var to select stdio (default) vs streamable-http
- Add bearer token auth middleware (MCP_AUTH_TOKEN) with /health bypass
- Add Dockerfile (Python 3.12-slim + uv) and docker-compose.yml with
Traefik v2/v3 labels, ACME TLS, and health check routing
- Add .env.example with multi-instance config for mini/tn-sb/tn-mr2/p-mba
- Add uvicorn + starlette as runtime dependencies
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split the monolithic syncthing_mcp.py into a proper src/syncthing_mcp/
package with focused modules: client, models, registry, server, and
tool submodules (system, folders, devices, config, instances).
New tools: browse_folder, file_info, folder_need (file-level queries),
override_folder, revert_folder (conflict resolution), check_upgrade
(system management). Bumps tool count from 30 to 36.
Adds comprehensive test suite (96 tests) using pytest + respx for
HTTP mocking, covering client methods, registry logic, model validation,
and all tool functions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>