Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
docs(hooks): describe when ExtractionState::NotApplicable is reported
lhzapata705aa2c282b3
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 59954396..975a95dc 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -11,6 +11,12 @@ version in [`docs/changelog/`](docs/changelog/):## [Unreleased]+### Fixed+- Fixed the `ExtractionState::NotApplicable` doc-comment, which described+ `extraction_state: "not-applicable"` as a property of the tool. It now says+ the value comes from an active policy dropping a search/list tool, or from+ `ai-memory hook --check-capture` when no policy was evaluated. (#1352)+## [3.1.0] - 2026-10-16### Addeddiff --git a/crates/ai-memory-hooks/src/capture_policy.rs b/crates/ai-memory-hooks/src/capture_policy.rsindex 3753390d..85ac0407 100644--- a/crates/ai-memory-hooks/src/capture_policy.rs+++ b/crates/ai-memory-hooks/src/capture_policy.rs@@ -103,7 +103,17 @@ pub enum PolicyState {#[derive(Clone, Copy, Debug, Default, Deserialize, Serialize, PartialEq, Eq)]#[serde(rename_all = "kebab-case")]pub enum ExtractionState {- /// Tool does not require path extraction.+ /// No path extraction applied to this event. Two cases produce it:+ ///+ /// - An active policy met a search/list tool ([`ToolFamily::SearchList`]).+ /// The policy drops it whatever its arguments say, so no path is+ /// extracted or counted. Under an inactive or invalid policy the same+ /// tool reports [`Self::Extracted`]: the state depends on the policy,+ /// not only on the tool.+ /// - `ai-memory hook --check-capture` evaluated no policy at all, because+ /// the event is not a tool event or no working directory was found. The+ /// report then pairs it with `policy_state: inactive` and+ /// `tool_family: unknown`.NotApplicable,/// Direct fields were extracted successfully.Extracted,