# Window Sync

> Browse, copy, and auto-sync files with a peer machine over SSH.

| | |
|---|---|
| Version | 1.0.1 |
| Category | Networking |
| Permissions | filesystem.read, filesystem.write, network.localhost, ssh-tunnel.use |
| Depends on | ssh-reverse-proxy, ai-chat |

# Window Sync

Browse, copy, and auto-sync files with a peer machine over SSH.

**Type:** `backend` — see `.claude/skills/kazuo-create-plugin/references/plugin-examples.md`

**Requires:** `ssh-reverse-proxy`, `ai-chat` — checked when installing, not installed for you.

**Permissions declared:** `filesystem.read`, `filesystem.write`, `network.localhost`, `ssh-tunnel.use` — shown to the user before install; the host does not sandbox on them.

## What it does

- Browses the file tree on a peer machine, copies files in either direction, and can keep a folder pair in sync automatically.
- It reaches the peer over the tunnel ssh-reverse-proxy holds open, which is why it depends on that plugin.

## Files

- `manifest.json` — metadata, `defaultSettings`, `defaultWidgetConfig`
- `widget.html` / `js/widget.js` / `css/widget.css` — the widget, including its own gear button and settings overlay (the host draws no per-widget gear icon)
- `settings.html` / `js/settings.js` / `css/settings.css` — the same fields again, for the Plugin Manager screen and the pop-out window
- `locales/en.json5` / `locales/vi.json5` — UI strings under `widget.*` and `settings.*`
- `main/index.ts` (compiled to `main/index.js`) — runs in the Electron main process: `activate` / `deactivate`
- `icon.png` — Store and Plugin Manager icon

## Default settings

- `localServerPort` — default: `9999`
- `peerHost` — default: `"127.0.0.1"`
- `peerPort` — default: `10000`
- `peerAlias` — default: `"Peer"`
- `syncDirectory` — default: `""`
- `peerSyncDirectory` — default: `""`
- `autoSync` — default: `false`
- `watchDebounceMs` — default: `750`
- `includeGlobs` — default: array, 1 entry by default
- `excludeGlobs` — default: array, 2 entries by default
- `authToken` — default: `""`

## Test

Open Kazuo AI → Plugin Manager — the plugin appears on its own (the host scans `plugins-library/`,
nothing to register) → Install → Enable.

After editing `main/index.ts`, recompile before testing: `npx tsc -p tsconfig.plugins.json`
(from the project root).
