@memoryrelay/plugin-memoryrelay-ai 0.11.0 → 0.11.2
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 +12 -2
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OpenClaw Memory Plugin - MemoryRelay
|
|
3
|
-
* Version: 0.11.
|
|
3
|
+
* Version: 0.11.2 (Full Single-File)
|
|
4
4
|
*
|
|
5
5
|
* Long-term memory with vector search using MemoryRelay API.
|
|
6
6
|
* Provides auto-recall and auto-capture via lifecycle hooks.
|
|
@@ -12,6 +12,16 @@
|
|
|
12
12
|
|
|
13
13
|
import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
|
|
14
14
|
|
|
15
|
+
// ============================================================================
|
|
16
|
+
// Constants
|
|
17
|
+
// ============================================================================
|
|
18
|
+
|
|
19
|
+
const DEFAULT_API_URL = "https://api.memoryrelay.net";
|
|
20
|
+
const VALID_HEALTH_STATUSES = ["ok", "healthy", "up"];
|
|
21
|
+
const REQUEST_TIMEOUT_MS = 30000; // 30 seconds
|
|
22
|
+
const MAX_RETRIES = 3;
|
|
23
|
+
const INITIAL_RETRY_DELAY_MS = 1000; // 1 second
|
|
24
|
+
|
|
15
25
|
// ============================================================================
|
|
16
26
|
// DebugLogger (Inlined from src/debug-logger.ts)
|
|
17
27
|
// ============================================================================
|
|
@@ -842,7 +852,7 @@ function shouldCapture(text: string): boolean {
|
|
|
842
852
|
|
|
843
853
|
// ============================================================================
|
|
844
854
|
// Plugin Export
|
|
845
|
-
export default function plugin(api: OpenClawPluginApi): void {
|
|
855
|
+
export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
846
856
|
const cfg = api.pluginConfig as MemoryRelayConfig | undefined;
|
|
847
857
|
|
|
848
858
|
// Fall back to environment variables
|
package/package.json
CHANGED