fix(mem0-plugin): graceful degradation without API key, stdin support

- SessionStart shows "Mem0 Inactive" banner with identity info when no
  API key set, instead of silently exiting with zero output
- on_user_prompt.sh fires error/file-path detection even without API key
  (local pattern matching, no API needed). Search rubric still gated.
- parse_export_file.py supports '-' argument for stdin piping
This commit is contained in:
kartik-mem0
2026-05-21 19:13:13 +05:30
parent 1daa7ece66
commit c5bb11b8b1
3 changed files with 29 additions and 16 deletions
+5 -2
View File
@@ -131,8 +131,11 @@ def main() -> None:
filepath = sys.argv[1]
try:
with open(filepath, encoding="utf-8", errors="replace") as f:
content = f.read()
if filepath == "-":
content = sys.stdin.read()
else:
with open(filepath, encoding="utf-8", errors="replace") as f:
content = f.read()
except OSError as e:
print(f"Error reading file: {e}", file=sys.stderr)
print("[]")