@memoryrelay/plugin-memoryrelay-ai 0.8.3 → 0.8.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * OpenClaw Memory Plugin - MemoryRelay
3
- * Version: 0.8.3 (Security & Installation Fixes)
3
+ * Version: 0.8.4 (OpenClaw Security Compliance)
4
4
  *
5
5
  * Long-term memory with vector search using MemoryRelay API.
6
6
  * Provides auto-recall and auto-capture via lifecycle hooks.
@@ -9,11 +9,16 @@
9
9
  * API: https://api.memoryrelay.net
10
10
  * Docs: https://memoryrelay.ai
11
11
  *
12
+ * ENHANCEMENTS (v0.8.4):
13
+ * - Removed file logging feature to pass OpenClaw security validation
14
+ * - All debug logs now in-memory only (circular buffer)
15
+ * - logFile config option deprecated (ignored with warning)
16
+ * - Clean npm installation without security warnings
17
+ * - Gateway methods for log access coming in v0.9.0
18
+ *
12
19
  * ENHANCEMENTS (v0.8.3):
13
- * - Security fix: logFile now restricted to relative paths only
14
- * - Rejects absolute paths and path traversal attempts
15
- * - Passes OpenClaw security validation for npm installation
16
- * - Clean installation without security warnings
20
+ * - Security fix: logFile restricted to relative paths
21
+ * - Path validation (reject absolute paths and traversal)
17
22
  *
18
23
  * ENHANCEMENTS (v0.8.2):
19
24
  * - Human-readable gateway logs with memory previews
@@ -853,31 +858,8 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
853
858
  const verboseEnabled = cfg?.verbose || false;
854
859
  const maxLogEntries = cfg?.maxLogEntries || 100;
855
860
 
856
- // Security fix (v0.8.3): logFile must be relative to workspace/plugin directory
857
- // Absolute paths and path traversal are rejected
858
- let logFile: string | undefined;
859
- if (cfg?.logFile) {
860
- const requestedPath = cfg.logFile;
861
-
862
- // Reject absolute paths
863
- if (requestedPath.startsWith('/') || requestedPath.startsWith('~') || /^[A-Za-z]:/.test(requestedPath)) {
864
- api.logger.warn(
865
- `memory-memoryrelay: logFile must be relative path (got: ${requestedPath}). Using default location.`
866
- );
867
- logFile = undefined;
868
- }
869
- // Reject path traversal
870
- else if (requestedPath.includes('..')) {
871
- api.logger.warn(
872
- `memory-memoryrelay: logFile cannot contain '..' (got: ${requestedPath}). Using default location.`
873
- );
874
- logFile = undefined;
875
- }
876
- // Accept relative path (will be resolved by DebugLogger relative to workspace)
877
- else {
878
- logFile = requestedPath;
879
- }
880
- }
861
+ // Note: logFile is deprecated in v0.8.4 (removed for OpenClaw security compliance)
862
+ // All debug logs are in-memory only. Use gateway methods to access logs.
881
863
 
882
864
  let debugLogger: DebugLogger | undefined;
883
865
  let statusReporter: StatusReporter | undefined;
@@ -887,12 +869,10 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
887
869
  enabled: true,
888
870
  verbose: verboseEnabled,
889
871
  maxEntries: maxLogEntries,
890
- logFile: logFile,
891
872
  });
892
873
 
893
- const logLocation = logFile ? ` → ${logFile}` : '';
894
874
  api.logger.info(
895
- `memory-memoryrelay: debug mode enabled (verbose: ${verboseEnabled}, maxEntries: ${maxLogEntries}${logLocation})`
875
+ `memory-memoryrelay: debug mode enabled (verbose: ${verboseEnabled}, maxEntries: ${maxLogEntries}, in-memory only)`
896
876
  );
897
877
  }
898
878
 
@@ -3,7 +3,7 @@
3
3
  "kind": "memory",
4
4
  "name": "MemoryRelay AI",
5
5
  "description": "AI memory service with sessions, decisions, patterns & projects (api.memoryrelay.net)",
6
- "version": "0.8.3",
6
+ "version": "0.8.4",
7
7
  "uiHints": {
8
8
  "apiKey": {
9
9
  "label": "MemoryRelay API Key",
@@ -113,7 +113,7 @@
113
113
  },
114
114
  "logFile": {
115
115
  "type": "string",
116
- "description": "Relative file path for persistent debug logs (e.g., 'memoryrelay-debug.log'). Absolute paths and path traversal (..) are rejected for security."
116
+ "description": "DEPRECATED (v0.8.4): File logging removed for OpenClaw security compliance. This option is ignored. Use gateway methods to access in-memory logs (coming in v0.9.0)."
117
117
  },
118
118
  "maxLogEntries": {
119
119
  "type": "number",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memoryrelay/plugin-memoryrelay-ai",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "OpenClaw memory plugin for MemoryRelay API - sessions, decisions, patterns, projects & semantic search",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -3,6 +3,9 @@
3
3
  *
4
4
  * Provides comprehensive logging of API calls with request/response capture
5
5
  * for troubleshooting and performance analysis.
6
+ *
7
+ * Note: File logging has been removed in v0.8.4 to pass OpenClaw security validation.
8
+ * All logs are kept in-memory only. Use gateway methods (coming in v0.9.0) to access logs.
6
9
  */
7
10
 
8
11
  export interface LogEntry {
@@ -23,24 +26,22 @@ export interface DebugLoggerConfig {
23
26
  enabled: boolean;
24
27
  verbose: boolean;
25
28
  maxEntries: number;
26
- logFile?: string;
29
+ logFile?: string; // Deprecated: File logging removed for security compliance
27
30
  }
28
31
 
29
32
  export class DebugLogger {
30
33
  private logs: LogEntry[] = [];
31
34
  private config: DebugLoggerConfig;
32
- private fs?: typeof import("fs");
33
35
 
34
36
  constructor(config: DebugLoggerConfig) {
35
37
  this.config = config;
36
38
 
37
- // Only load fs if logFile is specified
39
+ // logFile is no longer supported (v0.8.4)
38
40
  if (config.logFile) {
39
- try {
40
- this.fs = require("fs");
41
- } catch (err) {
42
- console.warn("fs module not available, file logging disabled");
43
- }
41
+ console.warn(
42
+ "memoryrelay: logFile is deprecated and ignored. " +
43
+ "Use gateway methods to access debug logs (coming in v0.9.0)"
44
+ );
44
45
  }
45
46
  }
46
47
 
@@ -57,11 +58,6 @@ export class DebugLogger {
57
58
  if (this.logs.length > this.config.maxEntries) {
58
59
  this.logs.shift();
59
60
  }
60
-
61
- // Write to file if configured
62
- if (this.config.logFile && this.fs) {
63
- this.writeToFile(entry);
64
- }
65
61
  }
66
62
 
67
63
  /**
@@ -123,20 +119,6 @@ export class DebugLogger {
123
119
  };
124
120
  }
125
121
 
126
- /**
127
- * Write log entry to file
128
- */
129
- private writeToFile(entry: LogEntry): void {
130
- if (!this.fs || !this.config.logFile) return;
131
-
132
- try {
133
- const logLine = JSON.stringify(entry) + "\n";
134
- this.fs.appendFileSync(this.config.logFile, logLine, "utf8");
135
- } catch (err) {
136
- console.error(`Failed to write debug log: ${err}`);
137
- }
138
- }
139
-
140
122
  /**
141
123
  * Format log entry for display
142
124
  */