Commit Graph
3 Commits
Author SHA1 Message Date
PiersandClaude Opus 4.7 14ce0cafa1 DD-338 Phase A.2 (narrowed) — syncthing list_folders + recent_changes cat-B scope= promotion
Wire the existing A.1 _resolve_scope_folders substrate into the two
remaining cat-B tools surfaced by the spec's Phase 0 audit:

* syncthing_list_folders — filter config.folders to the resolved
  SYNCTHING_<SCOPE>_FOLDERS[_<INSTANCE>] set; honest matched_total /
  returned / filtered_by counts via the existing append_meta envelope
  (already shipped for domain_hints in A.2.dom.c).
* syncthing_recent_changes — filter the /rest/events stream to events
  whose data.folderID is in the scoped set; gain _meta envelope via
  append_meta. Events without a folderID (system-level events) drop out
  under an active scope filter — system events do not partition by
  folder scope.

OQ-4 resolution (Syncthing event key): events carry `data.folderID` not
`data.folder` (confirmed at branch checkout against the existing concise
projection at tools/system.py:158 + Syncthing 1.27.x REST schema). Filter
keys on `e.get("data", {}).get("folderID")`.

Reuses A.1 substrate verbatim — no greenfield scope mechanism.

Tests: +15 cases in tests/test_a2_catB.py (7 list_folders + 8
recent_changes), incl. determinism harnesses (N=5 byte-equal modulo
latency_ms). 1 modified existing recent_changes test in
test_tools_system.py to use split_meta after the envelope addition.
Suite: 133 → 151 (all green).

Per architect amendment 2026-05-23: spec narrowed from 34-tool sweep to
this 2-tool cat-B promotion. The 32 cat-A (honest scope_none) + cat-D
(write verb) tools in the original spec are already conformant via
pack-spec v4.4.0's honest-declaration path; no edits to those rows.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 15:27:19 +10:00
Claude 41f1018477 Token-efficient output, SKILL.md, Cloudflare Tunnel, new tools (v0.3.0)
Major improvements following best-in-class MCP patterns:

- Token efficiency: new formatters.py with compact JSON (no indent),
  short device IDs, character-limit truncation; all read tools gain
  concise=true (default) / concise=false toggle via ReadParams base
- Models: ReadParams/WriteParams hierarchy replaces flat models;
  backward-compatible aliases preserved for tests
- New tools: syncthing_remote_need (debug remote sync gaps),
  syncthing_device_stats (per-device statistics)
- SKILL.md: LLM skill guide with token rules, quick-start table,
  workflows, tool reference, and troubleshooting
- Cloudflare Tunnel: docker-compose.tunnel.yml for zero-trust HTTP
  deployment alongside existing Traefik/ACME support
- Fix duplicate dependencies in pyproject.toml; bump to v0.3.0

https://claude.ai/code/session_018efEinU8ypT2jHeex6o9PC
2026-02-17 03:44:48 +00:00
Piers Dawson-DamerandClaude Opus 4.6 3a33d34bd1 Refactor into package, add 6 new tools, add 96 tests
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>
2026-02-15 10:13:37 +11:00