Description
Live Local Folder Cloud Sync keeps a hosted Dotabase aligned with an active local Markdown binding. It converts persisted binding records into watch targets, schedules directory sweeps, and sends the resulting changes through an injected hosted apply backend. Both the CLI watch command and desktop cloud-folder watcher can use the same host-neutral engine.
The watcher favors correctness over reacting to every low-level filesystem event individually. A sweep reuses Markdown Directory Import’s hashing and classification, making replay idempotent and allowing missed or coalesced events to converge on the actual directory state. Binding status and summaries expose whether each target succeeded, failed, or needs another pass.
Selling Points
- Keeps local Markdown and cloud knowledge aligned without manual re-import commands.
- Shares one watcher core across desktop and CLI surfaces.
- Uses full diff sweeps so event coalescing does not silently lose file changes.
- Preserves binding-level status and observable per-sweep counts.
- Defers heavy enrichment behavior during rapid sync, avoiding repeated expensive work.
User Story
As a user who edits notes in a local editor, I bind the folder once and continue working normally. Dots detects the changes, updates the hosted Dotabase, and reports sync health without requiring me to remember a refresh command after every edit.
Extension Surface
The rating is configurable because watch targets derive from binding records in packages/ingestion/src/local-source-watch/bindings.ts, and packages/ingestion/src/local-source-watch/index.ts accepts injected scheduling, clocks, status updates, apply behavior, and enrichment deferral. Users can activate, pause, or alter bindings through owning surfaces, but the watcher does not load arbitrary executable plug-ins.
Capabilities & Limits
Capabilities include multi-binding target conversion, scheduled sweeps, idempotent replay, status transitions, containment checks, progress summaries, and deferred heavy enrichment. The same normalizer and source namespace used by one-shot import are preserved. Limits are explicit: this is folder-to-cloud Markdown sync, not a general bidirectional filesystem mirror; remote edits are not written back to local files, and inaccessible roots surface an error instead of silently appearing synchronized.
Implementation Map
packages/ingestion/src/local-source-watch/index.tspackages/ingestion/src/local-source-watch/bindings.tspackages/ingestion/src/markdown/index-directory.tspackages/ingestion/src/markdown/http-apply.ts