@alfe.ai/openclaw-sync
v0.3.14
Published
AlfeSync — agent workspace backup and sync skill for OpenClaw
Readme
packages/openclaw-sync (@alfe.ai/openclaw-sync)
AlfeSync — agent workspace backup and sync skill for OpenClaw.
Syncs an agent's local workspace (config, conversations, memory) to/from S3 with hash-based change detection, conflict resolution, and flexible scheduling. Works as both an OpenClaw plugin and a standalone CLI.
Key Files
src/
├── index.ts # Package exports
├── manifest.ts # Atomic, cross-process-locked local manifest + diffing
├── ignore.ts # Forced defaults + .alfesyncignore parsing
├── path-contract.ts # Canonical private paths + symlink containment
├── uploader.ts # S3 upload via presigned URLs with retries
├── downloader.ts # S3 download via presigned URLs with retries
├── watcher.ts # Chokidar watcher, debounce, live ignore reload
├── sync-engine.ts # Orchestration (push/pull/fullSync)
├── plugin.ts # OpenClaw plugin lifecycle + gateway IPC
├── shared-sync.ts # Org/team/project shared-file mirror
└── cli/
└── index.ts # Commander-based CLI (alfesync)OpenClaw Plugin
Follows the standard plugin pattern — exports id, name, activate, deactivate, configure. On activation:
- Initializes the sync engine for the workspace
- Starts a file watcher (realtime mode) or scheduled interval (hourly/daily/weekly)
- Connects to the Alfe daemon IPC for capability registration (
sync.push,sync.pull,sync.fullSync) - Registers
sync.nowandsync.statusgateway RPC methods - Gracefully degrades if the daemon is unavailable
Lifecycle hooks (openclaw.plugin.json):
- onAgentStart —
alfesync pull --quiet - onAgentStop —
alfesync push --quiet - onCompaction —
alfesync push --quiet --filter=context/
Development
pnpm install
pnpm --filter @alfe.ai/openclaw-sync buildTesting
pnpm --filter @alfe.ai/openclaw-sync testDependencies
- chokidar — file watching
- commander — CLI framework
- micromatch — glob pattern matching
See SKILL.md for full CLI usage, storage classes, conflict resolution, and programmatic API docs.
Links
- 🌐 Website: https://alfe.ai
- 📚 Docs: https://docs.alfe.ai
