Files
syncthing-blade-mcp/stallari-plugin.yaml
T
PiersandClaude Opus 4.7 06217b6fdc DD-338 A.2.dom.c — domain_hint patterns + per-record _meta.domain_hints
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>
2026-05-23 12:46:47 +10:00

111 lines
3.6 KiB
YAML

name: syncthing-blade-mcp
version: "0.3.1"
description: "Syncthing replication management MCP — multi-instance, token-efficient output, safe disk-space reclamation"
author: groupthink-dev
license: MIT
tier: certified
author_type: first-party
readiness: beta
contract: sync-v1
services:
instances:
list: syncthing_list_instances
system:
status: syncthing_system_status
health: syncthing_health_summary
errors: syncthing_system_errors
clear_errors: syncthing_clear_errors
log: syncthing_system_log
recent_changes: syncthing_recent_changes
restart_required: syncthing_restart_required
restart: syncthing_restart
check_upgrade: syncthing_check_upgrade
folders:
list: syncthing_list_folders
status: syncthing_folder_status
completion: syncthing_folder_completion
replication_report: syncthing_replication_report
errors: syncthing_folder_errors
scan: syncthing_scan_folder
pause: syncthing_pause_folder
resume: syncthing_resume_folder
override: syncthing_override_folder
revert: syncthing_revert_folder
files:
browse: syncthing_browse_folder
info: syncthing_file_info
need: syncthing_folder_need
remote_need: syncthing_remote_need
devices:
list: syncthing_list_devices
completion: syncthing_device_completion
connections: syncthing_connections
stats: syncthing_device_stats
config:
pending_devices: syncthing_pending_devices
pending_folders: syncthing_pending_folders
accept_device: syncthing_accept_device
reject_device: syncthing_reject_device
accept_folder: syncthing_accept_folder
reject_folder: syncthing_reject_folder
get_ignores: syncthing_get_ignores
set_ignores: syncthing_set_ignores
get_default_ignores: syncthing_get_default_ignores
set_default_ignores: syncthing_set_default_ignores
setup:
icon: "🔄"
blurb: "Syncthing file sync — multi-instance replication status, safe disk-space reclamation, device management"
auth_model: api_key
complexity: simple
fields:
- key: SYNCTHING_API_KEY
label: "API Key"
secret: true
required: true
help: "Syncthing REST API key — find in Actions → Settings → API Key"
- key: SYNCTHING_URL
label: "Server URL"
required: false
placeholder: "http://localhost:8384"
help: "Syncthing web GUI URL. Defaults to localhost:8384"
- key: SYNCTHING_INSTANCES
label: "Multi-Instance Config"
secret: true
required: false
placeholder: '{"name": {"url": "...", "apiKey": "..."}}'
help: "JSON object for multi-instance mode. Overrides API Key and URL above"
install:
runtime: uv
package: syncthing-blade-mcp
command: syncthing-blade-mcp
env:
- name: SYNCTHING_API_KEY
secret: true
required: true
description: "Syncthing REST API key (single-instance mode)"
- name: SYNCTHING_URL
secret: false
required: false
description: "Syncthing base URL (default: http://localhost:8384)"
- name: SYNCTHING_INSTANCES
secret: true
required: false
description: "JSON object for multi-instance mode (overrides API_KEY/URL)"
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 ``<state-root>/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: []