Metadata-Version: 2.4
Name: synclave
Version: 2.4.1
Summary: Synclave — encrypted multi-node backup, replication, and agent mesh (A2A + Syncthing + restic + shared state). Formerly hermes-sync.
Author-email: Ahmet Hüdayioğlu <ahmethudayioglu@cumulusnet.io>
License: MIT
Project-URL: Homepage, https://github.com/yolgezerahmet/synclave
Project-URL: Documentation, https://github.com/yolgezerahmet/synclave#readme
Project-URL: Bug Reports, https://github.com/yolgezerahmet/synclave/issues
Project-URL: Repository, https://github.com/yolgezerahmet/synclave
Keywords: synclave,hermes,sync,backup,a2a,agent-mesh,restic,syncthing,ed25519,encryption
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Archiving :: Backup
Classifier: Topic :: System :: Networking
Classifier: Topic :: System :: Systems Administration
Classifier: Framework :: AsyncIO
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=42
Provides-Extra: a2a
Requires-Dist: fastapi>=0.100; extra == "a2a"
Requires-Dist: uvicorn>=0.20; extra == "a2a"
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Dynamic: license-file

# Synclave — Encrypted Multi-Node Backup, Sync & Agent Mesh

**Şifreli, non-destructive, versiyonlu çok-makine senkron + restic yedek + A2A ajan mesh motoru.**
Hermes / OpenClaw / bağımsız ajan ağları için. **Çekirdek MIT, kurumsal katman ayrı lisanslı.**

[![PyPI](https://img.shields.io/pypi/v/synclave)](https://pypi.org/project/synclave/)
[![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
[![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/)

> Önceki adı `hermes-sync` (v2.3.1) → rebrand **Synclave** (v2.4.0).

---

## Ne yapar?

| Yetenek | Açıklama |
|---------|-----------|
| **Çok-makine senkron** | GitHub manifest merkezi + GDrive versiyonlu snapshot; H1/H2/H3/OpenClaw arası dosya replikasyonu. `push` / `pull` / `both`. |
| **Non-destructive** | Asla üzerine yazmaz; çakışan dosya `.conflict.TS` ile korunur, otomatik veri kaybı yok. |
| **Restic incremental yedek** | GDrive üzerinde CDC dedup; snapshot, restore, retention (`keep-daily 7 / weekly 4 / monthly 6`). |
| **A2A ajan mesh** | JSON-RPC (Tailscale), senkron + asenkron + canlı (SSE) 3 mod; kimlik doğrulamalı görev dağıtımı + FAILOVER (stale devralma). |
| **Ortak hafıza** | `shared/memory/` GDrive hub — makineler arası fact paylaşımı (`memory export/push/pull`). |
| **Versiyon + rollback** | Her node timestamp'li tar.gz; `versions` / `rollback --version X`. |
| **Akıllı kurulum** | `probe` (CPU/RAM/GPU ölç) → `propose` (kaynak-farkındalıklı öneri) → `apply` (kur). |

## Güvenlik

- **Kimlik:** her runtime kendi Ed25519 kimliğini üretir; `agent_id = pubkey özeti` (`hx-` / `oc-`), donanım parmak izine bağlı. Klon şüphesi → mesh 403 (fail-closed). Meşru taşıma `rekey --confirm`.
- **Uçtan uca şifre:** X25519 ECDH + AES-GCM (her mesaj ephemeral → PFS) + Ed25519 imza + ts/nonce replay koruması.
- **Secret tarama:** `.env`/`*.key`/`id_rsa` + `sk-`/`cr_`/`ghp_` prefix'leri içeren config/dosyalar **manifest'e asla girmez** (ad + içerik katmanı).
- **Path traversal koruması:** 3 katman (`_safe_target`, `_is_safe_path`, `_safe_tar_member`) — `../`, mutlak yol, Windows sürücü harfi yasak.
- **Rate limiting:** 429 (120 req/60s), brute-force koruması.
- **Concurrency:** flock kilit — üst üste mutating koşu reddedilir (exit 0, 'ATLANDI').

## Kurulum

```bash
pip install synclave==2.4.0          # PyPI
# veya kaynaktan
git clone https://github.com/yolgezerahmet/synclave && cd synclave && pip install -e .

synclave status                      # durum (JSON: synclave status --json)
synclave both --skip-unchanged       # tam eşitleme
synclave mesh status                 # makineleri gör
synclave backup                      # restic yedek
synclave memory export               # ortak hafıza
```

### Hızlı başlangıç (yeni makine)
```bash
synclave init                        # ilk config
synclave add-node <ad> --path <dizin> --include "*" --max-kb 1024
synclave both                        # ilk eşitleme
```

## Hermes entegrasyonu (tam eklenti)

Synclave artık Hermes Agent'a **3 kanaldan** bağlı:

1. **MCP** (`config.yaml → mcp_servers.synclave`): 8 tool —
   `sync_status`, `sync_push`, `sync_pull`, `sync_both`, `mesh_status`,
   `agent_status`, `sync_conflicts`, `backup_now`.
2. **Plugin** (`plugins/synclave_sync`): `synclave_status()`, `synclave_both()`,
   `synclave_mesh()`, `synclave_backup()`, `synclave_conflicts()`.
3. **Skill** (`synclave`): iş kuralları + sorun giderme rehberi.

Hermes ajanına "sync yap" / "mesh durumu göster" demeniz yeterli.

## Karşılaştırma

| Özellik | Synclave | Syncthing | borg | restic |
|---------|----------|-----------|------|--------|
| Çok-makine replikasyon | ✅ GitHub+GDrive | ✅ P2P | ❌ | ❌ |
| Şifreli A2A mesh (3 mod) | ✅ | ❌ | ❌ | ❌ |
| Ajan kimliği (klon fail-closed) | ✅ | ❌ | ❌ | ❌ |
| Non-destructive conflict | ✅ `.conflict.TS` | ❌ last-wins | ⚠️ | ⚠️ |
| Secret tarama (ad+içerik) | ✅ | ❌ | ❌ | ❌ |
| Kaynak-farkındalıklı kurulum | ✅ | ❌ | ❌ | ❌ |
| Ortak hafıza (multi-agent) | ✅ | ❌ | ❌ | ❌ |
| Versiyon + rollback | ✅ | ⚠️ file versioning | ✅ | ✅ snapshot |

## Sürüm geçmişi

- **v2.4.0 (9 Eyl 2026):** Hermes MCP + plugin + skill (tam eklenti); `--json`
  çıktı; UTC zaman standardı; `sync_events.log` olay akışı; hash önbelleği;
  secret tarama gerçek-bug fix'leri (`.env.*` + config.yaml içerik).
- **v2.3 (30 Ağu):** kriptografik kimlik + şifreli mesh + sohbet köprüsü.
- **v2.1 (29 Ağu):** ajan mesh + restic + 3 katmanlı akıllı kanal.

## Kurumsal katman (ayrı lisans)

Çekirdek motor MIT. Kurumsal destek (SLA, öncelikli düzeltme, özel transport
adaptörleri, SSO/audit log) `support@cumulusnet.io` üzerinden ayrıca lisanslanır.

## Windows

```powershell
# 1) Python 3.10+ (PATH'e ekle) + git
pip install synclave
synclave init --machine H2
synclave both
```
Detaylı kurulum: `docs/windows.md` (yakında).

## Lisans

Core: [MIT](LICENSE). Enterprise: ayrı sözleşme — `support@cumulusnet.io`.
