Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore(ci): clear the three red lanes\n\nLayout: the door wiring pushed three part files past the 750-line limit\n(guard/families_part_01 at 836, guard/test_support_part_01 at 788,\nmodules/memory_part_02 at 790). Each is stitched by `include!`, so a\ncontiguous tail of complete items moves to the head of its next part with\nthe global token order unchanged -- no code change, verified by a clean\nproduct check.\n\nModule pin gate: nine records fail on drift this branch did not create --\nthe pointer refresh #5858 (this branch's own base) moved every submodule\none release ahead of its registry pin, byte-identical to current\nupstream/main. Reconciling means re-pinning seven registries with fresh\nchecksums, which is not this PR's scope, so each drift is declared in\nmodule-pin-exemptions.json with the exact `git describe` output the gate\ndemands: five new entries plus the two existing ones (tinymcp, tinywallet)\nrefreshed from their superseded drifts to the tags #5858 landed on.\ntinymemory itself is consistent across all four pin sites and carries no\nexemption.\n\nPrettier: rpcMethods.test.ts reformatted.\n

Shanude030614ba49
diff --git a/scripts/ci/module-pin-exemptions.json b/scripts/ci/module-pin-exemptions.json
index 9be012fc65..59518cbb23 100644
--- a/scripts/ci/module-pin-exemptions.json
+++ b/scripts/ci/module-pin-exemptions.json
@@ -9,20 +9,62 @@
"is a deliberate edit to this file, which is a reviewable diff.",
"",
"Delete an entry the moment the pins are reconciled. An exemption that has",
- "stopped being true fails the gate too — `expect` must still match."
+ "stopped being true fails the gate too \u2014 `expect` must still match."
],
"exemptions": [
{
"id": "tinymcp",
"submodule": "vendor/tinymcp",
- "expect": "v0.3.1-15-g5909bd1",
- "reason": "openhuman takes tinymcp with default-features = false (Cargo.toml:296), which switches the module adapter off, so the 0.3.1 artifact this record would download is never loaded. The submodule is the compile-time contract; the record is inert. Tracked by openhuman#5727."
+ "expect": "v0.3.2",
+ "reason": "openhuman takes tinymcp with default-features = false (Cargo.toml), which switches the module adapter off, so the 0.3.1 artifact this record would download is never loaded; the submodule is the compile-time contract only. #5858 moved it to the v0.3.2 release tag. Tracked by openhuman#5727."
},
{
"id": "tinywallet",
"submodule": "vendor/tinywallet",
- "expect": "v0.5.0-8-g8c728de",
- "reason": "v0.5.0 is still the newest tinywallet release, so there is no tag to re-pin the record to. The eight commits past it are dependabot bumps, two of them major (coins-bip32 0.8.7 to 0.13.1, sha3 0.10.9 to 0.12.0). Whether the loaded 0.5.0 cdylib and the compiled 8c728de bus crate still agree on the wire is UNDETERMINED. Tracked by openhuman#5727."
+ "expect": "v0.5.1",
+ "reason": "#5858 moved the submodule to the v0.5.1 release tag (superseding the v0.5.0-8-g8c728de drift this entry used to accept); the registry still pins v0.5.0 pending an artifact re-pin with v0.5.1 checksums, out of scope for the memory shed (#5875). Tracked by openhuman#5727."
+ },
+ {
+ "id": "tinydocs",
+ "submodule": "vendor/tinydocs",
+ "expect": "v0.1.15",
+ "reason": "The module-pointer refresh #5858 (merged 2026-08-31) moved the submodule to the v0.1.15 release tag while the registry record still pins 0.1.14 \u2014 the compile-time contract is one release ahead of the loaded artifact. Reconciling needs a registry re-pin with v0.1.15 checksums, out of scope for the memory shed (#5875). Tracked by openhuman#5727."
+ },
+ {
+ "id": "tinyjuice",
+ "submodule": "vendor/tinyjuice",
+ "expect": "v0.2.5",
+ "reason": "The module-pointer refresh #5858 (merged 2026-08-31) moved the submodule to the v0.2.5 release tag while the registry record still pins 0.2.4 \u2014 the compile-time contract is one release ahead of the loaded artifact. Reconciling needs a registry re-pin with v0.2.5 checksums, out of scope for the memory shed (#5875). Tracked by openhuman#5727."
+ },
+ {
+ "id": "tinyvoice",
+ "submodule": "vendor/tinyvoice",
+ "expect": "v0.1.6",
+ "reason": "The module-pointer refresh #5858 (merged 2026-08-31) moved the submodule to the v0.1.6 release tag while the registry record still pins 0.1.5 \u2014 the compile-time contract is one release ahead of the loaded artifact. Reconciling needs a registry re-pin with v0.1.6 checksums, out of scope for the memory shed (#5875). Tracked by openhuman#5727."
+ },
+ {
+ "id": "tinyruntime",
+ "submodule": "vendor/tinyruntime",
+ "expect": "v0.2.4",
+ "reason": "The module-pointer refresh #5858 (merged 2026-08-31) moved the submodule to the v0.2.4 release tag while the registry record still pins 0.2.2 \u2014 the compile-time contract is one release ahead of the loaded artifact. Reconciling needs a registry re-pin with v0.2.4 checksums, out of scope for the memory shed (#5875). Tracked by openhuman#5727."
+ },
+ {
+ "id": "tinyruntime-nodejs",
+ "submodule": "vendor/tinyruntime",
+ "expect": "v0.2.4",
+ "reason": "The module-pointer refresh #5858 (merged 2026-08-31) moved the submodule to the v0.2.4 release tag while the registry record still pins 0.2.2 \u2014 the compile-time contract is one release ahead of the loaded artifact. Reconciling needs a registry re-pin with v0.2.4 checksums, out of scope for the memory shed (#5875). Tracked by openhuman#5727."
+ },
+ {
+ "id": "tinyruntime-python",
+ "submodule": "vendor/tinyruntime",
+ "expect": "v0.2.4",
+ "reason": "The module-pointer refresh #5858 (merged 2026-08-31) moved the submodule to the v0.2.4 release tag while the registry record still pins 0.2.2 \u2014 the compile-time contract is one release ahead of the loaded artifact. Reconciling needs a registry re-pin with v0.2.4 checksums, out of scope for the memory shed (#5875). Tracked by openhuman#5727."
+ },
+ {
+ "id": "tinyconnectors",
+ "submodule": "vendor/tinyconnectors",
+ "expect": "v0.7.1",
+ "reason": "The module-pointer refresh #5858 (merged 2026-08-31) moved the submodule to the v0.7.1 release tag while the registry record still pins 0.7.0 \u2014 the compile-time contract is one release ahead of the loaded artifact. Reconciling needs a registry re-pin with v0.7.1 checksums, out of scope for the memory shed (#5875). Tracked by openhuman#5727."
}
]
}
diff --git a/src/openhuman/memory/guard/families_part_01.rs b/src/openhuman/memory/guard/families_part_01.rs
index 49009f9b59..aa5f6baefd 100644
--- a/src/openhuman/memory/guard/families_part_01.rs
+++ b/src/openhuman/memory/guard/families_part_01.rs
@@ -720,117 +720,3 @@ impl MemoryTree for GuardedTree {
self.family()?.flavour_profile(scope).await
}
}
-
-// ── Entities ─────────────────────────────────────────────────────────────────
-
-#[async_trait]
-impl MemoryEntities for GuardedEntities {
- async fn entities(
- &self,
- namespace: &str,
- query: Option<&str>,
- limit: usize,
- ) -> Result<Vec<EntityHit>, MemoryError> {
- self.policy.admit_read(
- Capability::Entities,
- "entities.entities",
- namespace,
- query.is_some(),
- )?;
- let redacted = query.map(|q| self.policy.redact_outbound(q).into_owned());
- self.family()?
- .entities(namespace, redacted.as_deref(), limit)
- .await
- }
-
- async fn entity_edges(
- &self,
- namespace: &str,
- entity_id: &str,
- limit: usize,
- ) -> Result<Vec<GraphRelationRecord>, MemoryError> {
- self.policy.admit_read(
- Capability::Entities,
- "entities.entity_edges",
- namespace,
- false,
- )?;
- self.family()?
- .entity_edges(namespace, entity_id, limit)
- .await
- }
-
- async fn touch_entities(
- &self,
- namespace: &str,
- entity_ids: &[String],
- ) -> Result<(), MemoryError> {
- self.policy.admit_write(
- Capability::Entities,
- "entities.touch_entities",
- namespace,
- false,
- )?;
- self.family()?.touch_entities(namespace, entity_ids).await
- }
-
- /// The occurrence index has no namespace and the contract gives this member
- /// no scope argument, so there is nothing to intersect — the tier check is
- /// the whole gate. Worth stating rather than leaving as an apparent
- /// omission beside the scoped members above.
- async fn top_entities(
- &self,
- kind: Option<&str>,
- limit: usize,
- ) -> Result<Vec<EntityOccurrence>, MemoryError> {
- self.policy.admit_read(
- Capability::Entities,
- "entities.top_entities",
- NO_NAMESPACE,
- false,
- )?;
- self.family()?.top_entities(kind, limit).await
- }
-
- /// Scoped by the chunk ids the caller already holds: it can only name
- /// chunks a previous, scoped read handed it, so this adds no reach beyond
- /// the read that produced them.
- async fn chunk_entities(
- &self,
- chunk_ids: &[String],
- kinds: Option<&[String]>,
- ) -> Result<Vec<ChunkEntityOccurrence>, MemoryError> {
- self.policy.admit_read(
- Capability::Entities,
- "entities.chunk_entities",
- NO_NAMESPACE,
- false,
- )?;
- self.family()?.chunk_entities(chunk_ids, kinds).await
- }
-
- /// Returns ids only, never content. A caller still has to read those chunks
- /// through [`MemoryChunks`] to see anything, and that path applies the
- /// scope intersection.
- async fn entity_chunk_ids(
- &self,
- entity_id: &str,
- limit: usize,
- ) -> Result<Vec<String>, MemoryError> {
- self.policy.admit_read(
- Capability::Entities,
- "entities.entity_chunk_ids",
- NO_NAMESPACE,
- false,
- )?;
- self.family()?.entity_chunk_ids(entity_id, limit).await
- }
-}
-
-// ── Graph ────────────────────────────────────────────────────────────────────
-
-/// Namespace label for the graph family's `Option<&str>` namespace — `None`
-/// addresses the global, namespace-less slice.
-fn graph_ns(namespace: Option<&str>) -> &str {
- namespace.unwrap_or(NO_NAMESPACE)
-}
diff --git a/src/openhuman/memory/guard/families_part_02.rs b/src/openhuman/memory/guard/families_part_02.rs
index fdd2c8a0de..865f3ee66f 100644
--- a/src/openhuman/memory/guard/families_part_02.rs
+++ b/src/openhuman/memory/guard/families_part_02.rs
@@ -1,3 +1,116 @@
+// ── Entities ─────────────────────────────────────────────────────────────────
+
+#[async_trait]
+impl MemoryEntities for GuardedEntities {
+ async fn entities(
+ &self,
+ namespace: &str,
+ query: Option<&str>,
+ limit: usize,
+ ) -> Result<Vec<EntityHit>, MemoryError> {
+ self.policy.admit_read(
+ Capability::Entities,
+ "entities.entities",
+ namespace,
+ query.is_some(),
+ )?;
+ let redacted = query.map(|q| self.policy.redact_outbound(q).into_owned());
+ self.family()?
+ .entities(namespace, redacted.as_deref(), limit)
+ .await
+ }
+
+ async fn entity_edges(
+ &self,
+ namespace: &str,
+ entity_id: &str,
+ limit: usize,
+ ) -> Result<Vec<GraphRelationRecord>, MemoryError> {
+ self.policy.admit_read(
+ Capability::Entities,
+ "entities.entity_edges",
+ namespace,
+ false,
+ )?;
+ self.family()?
+ .entity_edges(namespace, entity_id, limit)
+ .await
+ }
+
+ async fn touch_entities(
+ &self,
+ namespace: &str,
+ entity_ids: &[String],
+ ) -> Result<(), MemoryError> {
+ self.policy.admit_write(
+ Capability::Entities,
+ "entities.touch_entities",
+ namespace,
+ false,
+ )?;
+ self.family()?.touch_entities(namespace, entity_ids).await
+ }
+
+ /// The occurrence index has no namespace and the contract gives this member
+ /// no scope argument, so there is nothing to intersect — the tier check is
+ /// the whole gate. Worth stating rather than leaving as an apparent
+ /// omission beside the scoped members above.
+ async fn top_entities(
+ &self,
+ kind: Option<&str>,
+ limit: usize,
+ ) -> Result<Vec<EntityOccurrence>, MemoryError> {
+ self.policy.admit_read(
+ Capability::Entities,
+ "entities.top_entities",
+ NO_NAMESPACE,
+ false,
+ )?;
+ self.family()?.top_entities(kind, limit).await
+ }
+
+ /// Scoped by the chunk ids the caller already holds: it can only name
+ /// chunks a previous, scoped read handed it, so this adds no reach beyond
+ /// the read that produced them.
+ async fn chunk_entities(
+ &self,
+ chunk_ids: &[String],
+ kinds: Option<&[String]>,
+ ) -> Result<Vec<ChunkEntityOccurrence>, MemoryError> {
+ self.policy.admit_read(
+ Capability::Entities,
+ "entities.chunk_entities",
+ NO_NAMESPACE,
+ false,
+ )?;
+ self.family()?.chunk_entities(chunk_ids, kinds).await
+ }
+
+ /// Returns ids only, never content. A caller still has to read those chunks
+ /// through [`MemoryChunks`] to see anything, and that path applies the
+ /// scope intersection.
+ async fn entity_chunk_ids(
+ &self,
+ entity_id: &str,
+ limit: usize,
+ ) -> Result<Vec<String>, MemoryError> {
+ self.policy.admit_read(
+ Capability::Entities,
+ "entities.entity_chunk_ids",
+ NO_NAMESPACE,
+ false,
+ )?;
+ self.family()?.entity_chunk_ids(entity_id, limit).await
+ }
+}
+
+// ── Graph ────────────────────────────────────────────────────────────────────
+
+/// Namespace label for the graph family's `Option<&str>` namespace — `None`
+/// addresses the global, namespace-less slice.
+fn graph_ns(namespace: Option<&str>) -> &str {
+ namespace.unwrap_or(NO_NAMESPACE)
+}
#[async_trait]
impl MemoryGraph for GuardedGraph {
diff --git a/src/openhuman/memory/guard/test_support_part_01.rs b/src/openhuman/memory/guard/test_support_part_01.rs
index d66f380431..933249b605 100644
--- a/src/openhuman/memory/guard/test_support_part_01.rs
+++ b/src/openhuman/memory/guard/test_support_part_01.rs
@@ -526,10 +526,7 @@ impl MemoryTree for RecordingProvider {
&self,
_namespace: &str,
_node_id: &str,
- ) -> Result<
- Option<crate::openhuman::memory::api::tree::TreeNode>,
- MemoryError,
- > {
+ ) -> Result<Option<crate::openhuman::memory::api::tree::TreeNode>, MemoryError> {
self.record(Call::plain("tree.runtime_read_node"));
Ok(None)
}
@@ -552,10 +549,7 @@ impl MemoryTree for RecordingProvider {
&self,
_namespace: &str,
_timestamp: chrono::DateTime<chrono::Utc>,
- ) -> Result<
- Option<crate::openhuman::memory::api::tree::TreeNode>,
- MemoryError,
- > {
+ ) -> Result<Option<crate::openhuman::memory::api::tree::TreeNode>, MemoryError> {
self.record(Call::plain("tree.runtime_summarize"));
Ok(None)
}
@@ -722,67 +716,3 @@ impl MemoryToolMemory for RecordingProvider {
Ok(false)
}
}
-
-#[async_trait]
-impl MemorySourceSink for RecordingProvider {
- async fn accept_source_items(
- &self,
- _source_id: &str,
- _source_kind: &str,
- items: Vec<SourceItem>,
- taint: MemoryTaint,
- ) -> Result<IngestOutcome, MemoryError> {
- self.record(Call {
- method: "sources.accept_source_items".into(),
- content: items.first().map(|i| i.content.clone()),
- taint: Some(taint),
- scoped: None,
- });
- Ok(IngestOutcome::default())
- }
-
- async fn forget_source(&self, _source_id: &str) -> Result<u64, MemoryError> {
- self.record(Call::plain("sources.forget_source"));
- Ok(0)
- }
-}
-
-#[async_trait]
-impl MemoryMaintenance for RecordingProvider {
- async fn reembed(&self) -> Result<MaintenanceReport, MemoryError> {
- self.record(Call::plain("maintenance.reembed"));
- Ok(MaintenanceReport::default())
- }
-
- async fn compact(&self) -> Result<MaintenanceReport, MemoryError> {
- self.record(Call::plain("maintenance.compact"));
- Ok(MaintenanceReport::default())
- }
-
- async fn consolidate(&self) -> Result<MaintenanceReport, MemoryError> {
- self.record(Call::plain("maintenance.consolidate"));
- Ok(MaintenanceReport::default())
- }
-
- async fn doctor(&self) -> Result<MaintenanceReport, MemoryError> {
- self.record(Call::plain("maintenance.doctor"));
- Ok(MaintenanceReport::default())
- }
-
- async fn diagnose(
- &self,
- ) -> Result<crate::openhuman::memory::api::provider::diagnosis::Diagnosis, MemoryError> {
- self.record(Call::plain("maintenance.diagnose"));
- Ok(Default::default())
- }
-
- async fn degraded_state(
- &self,
- ) -> Result<
- crate::openhuman::memory::api::provider::diagnosis::DegradedCapabilities,
- MemoryError,
- > {
- self.record(Call::plain("maintenance.degraded_state"));
- Ok(Default::default())
- }
-}
diff --git a/src/openhuman/memory/guard/test_support_part_02.rs b/src/openhuman/memory/guard/test_support_part_02.rs
index 33282616b5..c4eeb586cd 100644
--- a/src/openhuman/memory/guard/test_support_part_02.rs
+++ b/src/openhuman/memory/guard/test_support_part_02.rs
@@ -1,3 +1,64 @@
+#[async_trait]
+impl MemorySourceSink for RecordingProvider {
+ async fn accept_source_items(
+ &self,
+ _source_id: &str,
+ _source_kind: &str,
+ items: Vec<SourceItem>,
+ taint: MemoryTaint,
+ ) -> Result<IngestOutcome, MemoryError> {
+ self.record(Call {
+ method: "sources.accept_source_items".into(),
+ content: items.first().map(|i| i.content.clone()),
+ taint: Some(taint),
+ scoped: None,
+ });
+ Ok(IngestOutcome::default())
+ }
+
+ async fn forget_source(&self, _source_id: &str) -> Result<u64, MemoryError> {
+ self.record(Call::plain("sources.forget_source"));
+ Ok(0)
+ }
+}
+
+#[async_trait]
+impl MemoryMaintenance for RecordingProvider {
+ async fn reembed(&self) -> Result<MaintenanceReport, MemoryError> {
+ self.record(Call::plain("maintenance.reembed"));
+ Ok(MaintenanceReport::default())
+ }
+
+ async fn compact(&self) -> Result<MaintenanceReport, MemoryError> {
+ self.record(Call::plain("maintenance.compact"));
+ Ok(MaintenanceReport::default())
+ }
+
+ async fn consolidate(&self) -> Result<MaintenanceReport, MemoryError> {
+ self.record(Call::plain("maintenance.consolidate"));
+ Ok(MaintenanceReport::default())
+ }
+
+ async fn doctor(&self) -> Result<MaintenanceReport, MemoryError> {
+ self.record(Call::plain("maintenance.doctor"));
+ Ok(MaintenanceReport::default())
+ }
+
+ async fn diagnose(
+ &self,
+ ) -> Result<crate::openhuman::memory::api::provider::diagnosis::Diagnosis, MemoryError> {
+ self.record(Call::plain("maintenance.diagnose"));
+ Ok(Default::default())
+ }
+
+ async fn degraded_state(
+ &self,
+ ) -> Result<crate::openhuman::memory::api::provider::diagnosis::DegradedCapabilities, MemoryError>
+ {
+ self.record(Call::plain("maintenance.degraded_state"));
+ Ok(Default::default())
+ }
+}
#[async_trait]
impl MemoryProvider for RecordingProvider {
@@ -371,10 +432,8 @@ impl MemoryChunks for RecordingProvider {
async fn source_ingest_status(
&self,
_source_prefixes: &[crate::openhuman::memory::api::provider::chunks::SourceIngestQuery],
- ) -> Result<
- Vec<crate::openhuman::memory::api::provider::chunks::SourceIngestStatus>,
- MemoryError,
- > {
+ ) -> Result<Vec<crate::openhuman::memory::api::provider::chunks::SourceIngestStatus>, MemoryError>
+ {
self.record(Call::plain("chunks.source_ingest_status"));
Ok(vec![])
}
diff --git a/src/openhuman/modules/memory_part_02.rs b/src/openhuman/modules/memory_part_02.rs
index c39a0cafef..52179f00e3 100644
--- a/src/openhuman/modules/memory_part_02.rs
+++ b/src/openhuman/modules/memory_part_02.rs
@@ -1,4 +1,3 @@
-
#[async_trait]
impl MemoryDocuments for ModuleMemoryProvider {
async fn put_document(&self, input: NamespaceDocumentInput) -> Result<String, MemoryError> {
@@ -695,96 +694,3 @@ impl MemoryCodingSessions for ModuleMemoryProvider {
/// budget rather than the wire member. Anything comfortably longer than the
/// scheduling jitter between the two `tokio::time::timeout` arms would do.
const INGEST_BUS_GRACE: std::time::Duration = std::time::Duration::from_secs(30);
-
-#[async_trait]
-impl MemoryEpisodic for ModuleMemoryProvider {
- async fn insert_turn(&self, turn: &EpisodicTurn) -> Result<i64, MemoryError> {
- module_call!(self, "insert_turn", "InsertTurn", (turn,))
- }
- async fn session_turns(&self, session_id: &str) -> Result<Vec<EpisodicTurn>, MemoryError> {
- module_call!(self, "session_turns", "SessionTurns", (session_id,))
- }
- async fn open_segment(
- &self,
- session_id: &str,
- ) -> Result<Option<ConversationSegment>, MemoryError> {
- module_call!(self, "open_segment", "OpenSegment", (session_id,))
- }
- #[allow(
- clippy::too_many_arguments,
- reason = "trait signature; see the contract's rationale"
- )]
- async fn create_segment(
- &self,
- segment_id: &str,
- session_id: &str,
- namespace: &str,
- start_episodic_id: i64,
- start_seq: Option<u32>,
- start_timestamp: f64,
- now: f64,
- ) -> Result<(), MemoryError> {
- module_call!(
- self,
- "create_segment",
- "CreateSegment",
- (
- segment_id,
- session_id,
- namespace,
- start_episodic_id,
- start_seq,
- start_timestamp,
- now
- )
- )
- }
- async fn append_turn(
- &self,
- segment_id: &str,
- episodic_id: i64,
- seq: Option<u32>,
- timestamp: f64,
- now: f64,
- ) -> Result<(), MemoryError> {
- module_call!(
- self,
- "append_turn",
- "AppendTurn",
- (segment_id, episodic_id, seq, timestamp, now)
- )
- }
- async fn insert_event(&self, event: &EpisodicEvent) -> Result<(), MemoryError> {
- module_call!(self, "insert_event", "InsertEvent", (event,))
- }
- async fn close_segment(&self, segment_id: &str, now: f64) -> Result<(), MemoryError> {
- module_call!(self, "close_segment", "CloseSegment", (segment_id, now))
- }
- async fn set_segment_summary(
- &self,
- segment_id: &str,
- summary: &str,
- now: f64,
- ) -> Result<(), MemoryError> {
- module_call!(
- self,
- "set_segment_summary",
- "SetSegmentSummary",
- (segment_id, summary, now)
- )
- }
- async fn upsert_segment_embedding(
- &self,
- segment_id: &str,
- model_signature: &str,
- embedding: &[f32],
- created_at: f64,
- ) -> Result<(), MemoryError> {
- module_call!(
- self,
- "upsert_segment_embedding",
- "UpsertSegmentEmbedding",
- (segment_id, model_signature, embedding, created_at)
- )
- }
-}
diff --git a/src/openhuman/modules/memory_part_03.rs b/src/openhuman/modules/memory_part_03.rs
index 7b3bf0dba1..e50d075f0b 100644
--- a/src/openhuman/modules/memory_part_03.rs
+++ b/src/openhuman/modules/memory_part_03.rs
@@ -1,3 +1,95 @@
+#[async_trait]
+impl MemoryEpisodic for ModuleMemoryProvider {
+ async fn insert_turn(&self, turn: &EpisodicTurn) -> Result<i64, MemoryError> {
+ module_call!(self, "insert_turn", "InsertTurn", (turn,))
+ }
+ async fn session_turns(&self, session_id: &str) -> Result<Vec<EpisodicTurn>, MemoryError> {
+ module_call!(self, "session_turns", "SessionTurns", (session_id,))
+ }
+ async fn open_segment(
+ &self,
+ session_id: &str,
+ ) -> Result<Option<ConversationSegment>, MemoryError> {
+ module_call!(self, "open_segment", "OpenSegment", (session_id,))
+ }
+ #[allow(
+ clippy::too_many_arguments,
+ reason = "trait signature; see the contract's rationale"
+ )]
+ async fn create_segment(
+ &self,
+ segment_id: &str,
+ session_id: &str,
+ namespace: &str,
+ start_episodic_id: i64,
+ start_seq: Option<u32>,
+ start_timestamp: f64,
+ now: f64,
+ ) -> Result<(), MemoryError> {
+ module_call!(
+ self,
+ "create_segment",
+ "CreateSegment",
+ (
+ segment_id,
+ session_id,
+ namespace,
+ start_episodic_id,
+ start_seq,
+ start_timestamp,
+ now
+ )
+ )
+ }
+ async fn append_turn(
+ &self,
+ segment_id: &str,
+ episodic_id: i64,
+ seq: Option<u32>,
+ timestamp: f64,
+ now: f64,
+ ) -> Result<(), MemoryError> {
+ module_call!(
+ self,
+ "append_turn",
+ "AppendTurn",
+ (segment_id, episodic_id, seq, timestamp, now)
+ )
+ }
+ async fn insert_event(&self, event: &EpisodicEvent) -> Result<(), MemoryError> {
+ module_call!(self, "insert_event", "InsertEvent", (event,))
+ }
+ async fn close_segment(&self, segment_id: &str, now: f64) -> Result<(), MemoryError> {
+ module_call!(self, "close_segment", "CloseSegment", (segment_id, now))
+ }
+ async fn set_segment_summary(
+ &self,
+ segment_id: &str,
+ summary: &str,
+ now: f64,
+ ) -> Result<(), MemoryError> {
+ module_call!(
+ self,
+ "set_segment_summary",
+ "SetSegmentSummary",
+ (segment_id, summary, now)
+ )
+ }
+ async fn upsert_segment_embedding(
+ &self,
+ segment_id: &str,
+ model_signature: &str,
+ embedding: &[f32],
+ created_at: f64,
+ ) -> Result<(), MemoryError> {
+ module_call!(
+ self,
+ "upsert_segment_embedding",
+ "UpsertSegmentEmbedding",
+ (segment_id, model_signature, embedding, created_at)
+ )
+ }
+}
#[async_trait]
impl MemoryPeople for ModuleMemoryProvider {