Weave documentation
Agentfs Diff

Streaming

DiffStream::new(source, target, options) starts an asynchronous comparison with an event receiver.

Workflow and current contract

DiffStream::new(source, target, options) starts an asynchronous comparison with an event receiver. Its event enum declares Started, DiffFound(Box<Diff>), Progress, Completed, and Error; abort cancels its task. The current implementation first awaits the complete comparison and then emits its DiffFound results. It does not incrementally emit individual differences while hashing, and the declared Progress variant is not emitted by this path.

Match the terminal event explicitly. Completed contains total differences and duration, while Error is a failed comparison. The event channel is unbounded in the current implementation, so consumers should continue draining it rather than treating it as a durable progress log.

Source reference

On this page