Description
Expose long-running Backscroll synchronization through the optional MCP Tasks extension. Instead of holding a tool request open while discovery, hashing, parsing, and indexing complete, the server can return a durable task handle that clients poll or observe until completion.
MCP Tasks supports durable taskId handles, status polling, progress visibility, reconnect-safe retrieval, mid-flight input, and cooperative cancellation:
Tasks provide the protocol lifecycle for long operations; they do not provide mutual exclusion or automatic deduplication.
Prerequisites
This issue must use those components rather than introduce another synchronization implementation.
Goals
Return a durable MCP task when synchronization is expected to be long-running.
Map Backscroll sync progress and terminal errors into MCP task status.
Let disconnected clients resume polling with the same task ID within its TTL.
Deduplicate concurrent sync requests through Startup sync has quadratic session-text aggregation and can stall commands #46 's coordinator so callers observe the same active operation where appropriate.
Keep search and other read operations available against the last committed snapshot while the task runs.
Define cancellation semantics that preserve database atomicity and index integrity.
Proposed Task Lifecycle
A capable client calls the agreed sync operation.
The server durably creates a task before returning resultType: "task".
The task enters working while the Startup sync has quadratic session-text aggregation and can stall commands #46 coordinator owns synchronization.
Progress/status messages report bounded phases such as discovery, hashing, parsing, and commit.
tasks/get returns the current state and final result or error.
Terminal states are immutable: completed, failed, or cancelled.
Cooperative cancellation stops at a safe boundary and never exposes a partial transaction.
Non-goals
Acceptance Criteria
Tasks support is negotiated explicitly by both client and server.
Long-running sync can return a durable task handle with documented TTL and polling interval.
tasks/get exposes progress and a stable terminal result or structured error.
Reconnecting clients can retrieve a non-expired task without depending on the original connection or conversation.
Concurrent sync requests do not launch duplicate work and integrate with Startup sync has quadratic session-text aggregation and can stall commands #46 's coordinator.
Cancellation is cooperative, documented, and cannot leave a partial SQLite transaction visible.
Clients without Tasks support receive a documented synchronous or unsupported-capability behavior.
Integration tests cover polling, reconnect, deduplication, failure, expiry, and cancellation.
Description
Expose long-running Backscroll synchronization through the optional MCP Tasks extension. Instead of holding a tool request open while discovery, hashing, parsing, and indexing complete, the server can return a durable task handle that clients poll or observe until completion.
MCP Tasks supports durable
taskIdhandles, status polling, progress visibility, reconnect-safe retrieval, mid-flight input, and cooperative cancellation:Tasks provide the protocol lifecycle for long operations; they do not provide mutual exclusion or automatic deduplication.
Prerequisites
This issue must use those components rather than introduce another synchronization implementation.
Goals
Proposed Task Lifecycle
resultType: "task".workingwhile the Startup sync has quadratic session-text aggregation and can stall commands #46 coordinator owns synchronization.tasks/getreturns the current state and final result or error.completed,failed, orcancelled.Non-goals
Acceptance Criteria
tasks/getexposes progress and a stable terminal result or structured error.