Skip to main content

NoteMutationHookFn

Type Alias NoteMutationHookFn 

Source
pub type NoteMutationHookFn = Arc<dyn Fn(String, Uuid) -> Pin<Box<dyn Future<Output = ()> + Send>> + Send + Sync>;
Expand description

Callback type for a pack-installed note-mutation hook.

Invoked by update_note (when the note’s text/embedding actually changed) and delete_note (soft or hard) with (note_kind, note_id), after the mutation has been durably applied. Returns a boxed future so the hook can await async cache-invalidation work (e.g. khive-pack-memory’s ANN warm-cache generation bump) without khive-runtime depending on any pack crate: dependencies point the other way, so the runtime exposes an extension point and the pack installs into it, same shape as EntityTypeValidatorFn, just async.

Aliased Type§

pub struct NoteMutationHookFn { /* private fields */ }