@memoryrelay/plugin-memoryrelay-ai 0.12.2 → 0.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.ts +19 -5
- package/openclaw.plugin.json +2 -2
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OpenClaw Memory Plugin - MemoryRelay
|
|
3
|
-
* Version: 0.12.
|
|
3
|
+
* Version: 0.12.3 (Phase 1 - Adoption Framework)
|
|
4
4
|
*
|
|
5
5
|
* Long-term memory with vector search using MemoryRelay API.
|
|
6
6
|
* Provides auto-recall and auto-capture via lifecycle hooks.
|
|
7
7
|
* Includes: memories, entities, agents, sessions, decisions, patterns, projects.
|
|
8
|
-
* New in v0.12.
|
|
8
|
+
* New in v0.12.3: Smart auto-capture, daily stats, CLI commands, onboarding
|
|
9
9
|
*
|
|
10
10
|
* API: https://api.memoryrelay.net
|
|
11
11
|
* Docs: https://memoryrelay.ai
|
|
@@ -790,12 +790,26 @@ class MemoryRelayClient {
|
|
|
790
790
|
tier?: string;
|
|
791
791
|
},
|
|
792
792
|
): Promise<Memory> {
|
|
793
|
-
|
|
793
|
+
// Extract session_id from metadata if present and move to top-level
|
|
794
|
+
const { session_id, ...cleanMetadata } = metadata || {};
|
|
795
|
+
|
|
796
|
+
const payload: any = {
|
|
794
797
|
content,
|
|
795
|
-
metadata,
|
|
796
798
|
agent_id: this.agentId,
|
|
797
799
|
...options,
|
|
798
|
-
}
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
// Only include metadata if there's something left after extracting session_id
|
|
803
|
+
if (Object.keys(cleanMetadata).length > 0) {
|
|
804
|
+
payload.metadata = cleanMetadata;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
// Add session_id as top-level parameter if provided
|
|
808
|
+
if (session_id) {
|
|
809
|
+
payload.session_id = session_id;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
return this.request<Memory>("POST", "/v1/memories", payload);
|
|
799
813
|
}
|
|
800
814
|
|
|
801
815
|
async search(
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"id": "plugin-memoryrelay-ai",
|
|
3
3
|
"kind": "memory",
|
|
4
4
|
"name": "MemoryRelay AI",
|
|
5
|
-
"description": "MemoryRelay v0.
|
|
6
|
-
"version": "0.
|
|
5
|
+
"description": "MemoryRelay v0.12.3 - Long-term memory with sessions, decisions, patterns & projects (api.memoryrelay.net)",
|
|
6
|
+
"version": "0.12.3",
|
|
7
7
|
"uiHints": {
|
|
8
8
|
"apiKey": {
|
|
9
9
|
"label": "MemoryRelay API Key",
|
package/package.json
CHANGED