-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatch3.diff
More file actions
25 lines (23 loc) · 939 Bytes
/
patch3.diff
File metadata and controls
25 lines (23 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- codex-rs/core/src/agentmemory/mod.rs
+++ codex-rs/core/src/agentmemory/mod.rs
@@ -5,6 +5,7 @@
//! as a replacement for Codex's native memory engine.
use std::path::Path;
+use serde::Serialize;
/// A placeholder adapter struct for agentmemory integration.
#[derive(Debug, Default, Clone)]
@@ -34,5 +35,16 @@
.to_string(),
)
}
+
+ /// Asynchronously captures and stores lifecycle events in `agentmemory`.
+ ///
+ /// This method allows Codex hooks (like `SessionStart`, `PostToolUse`) to
+ /// be transmitted without blocking the hot path of the shell or model output.
+ pub async fn capture_event<P: Serialize + Send + 'static>(&self, _event_name: &str, _payload: P) {
+ // TODO: Transmit the event to agentmemory's ingestion endpoint.
+ // The payload will typically be a hook request (e.g. `PostToolUseRequest`).
+ // This is a stub for future PRs.
+ }
}