Add armed plugin-originated file watches across VFS mutations
Register core.watch before its armed notification, coalesce later changes without losing post-notification writes, and clean up on caller death. Observe mounted layers and open file handles, including descriptor/stream writes, truncation, both rename paths and deletion. Track cancelled mutations through process idle and retain visible paths across renames. Document the protocol, expose native core discovery, and exercise watches through SDK callbacks and raw WASI filesystem operations. Card: SAU-359
This commit is contained in:
@@ -26,6 +26,11 @@ impl Call {
|
||||
self
|
||||
}
|
||||
/// Receive progress notifications before the result arrives.
|
||||
///
|
||||
/// For `core.watch`, await this call in a background task for the process's
|
||||
/// lifetime. Scan only after `armed`, and rescan on `changed`; events can
|
||||
/// coalesce. The call has no cancellation API. Do not use endpoint connect
|
||||
/// retries to wait for file publication.
|
||||
pub fn on_notify(mut self, f: impl FnMut(&str, Value) + 'static) -> Self {
|
||||
self.notify = Some(Box::new(f));
|
||||
self
|
||||
|
||||
Reference in New Issue
Block a user