mem0-cli 0.2.7__tar.gz → 0.2.8__tar.gz
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.
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/.gitignore +2 -1
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/PKG-INFO +1 -1
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/pyproject.toml +1 -1
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/__init__.py +1 -1
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/telemetry.py +9 -2
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/telemetry_sender.py +13 -2
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/README.md +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/__main__.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/agent_detect.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/app.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/backend/__init__.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/backend/base.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/backend/platform.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/branding.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/commands/__init__.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/commands/agent_mode_cmd.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/commands/agent_rush_cmd.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/commands/config_cmd.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/commands/entities.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/commands/events_cmd.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/commands/identify_cmd.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/commands/init_cmd.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/commands/memory.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/commands/utils.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/commands/whoami_cmd.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/config.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/output.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/plugin_sync.py +0 -0
- {mem0_cli-0.2.7 → mem0_cli-0.2.8}/src/mem0_cli/state.py +0 -0
|
@@ -137,12 +137,19 @@ def capture_event(
|
|
|
137
137
|
"anon_distinct_id_to_alias": anon_id_to_alias,
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
subprocess.Popen(
|
|
141
|
-
[sys.executable, "-m", "mem0_cli.telemetry_sender"
|
|
140
|
+
child = subprocess.Popen(
|
|
141
|
+
[sys.executable, "-m", "mem0_cli.telemetry_sender"],
|
|
142
|
+
stdin=subprocess.PIPE,
|
|
142
143
|
stdout=subprocess.DEVNULL,
|
|
143
144
|
stderr=subprocess.DEVNULL,
|
|
144
145
|
start_new_session=True,
|
|
145
146
|
close_fds=True,
|
|
147
|
+
text=True,
|
|
146
148
|
)
|
|
149
|
+
if child.stdin:
|
|
150
|
+
with contextlib.suppress(Exception):
|
|
151
|
+
child.stdin.write(json.dumps(context))
|
|
152
|
+
with contextlib.suppress(Exception):
|
|
153
|
+
child.stdin.close()
|
|
147
154
|
except Exception:
|
|
148
155
|
pass
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Standalone telemetry sender — runs as a detached subprocess.
|
|
2
2
|
|
|
3
|
-
Usage: python -m mem0_cli.telemetry_sender
|
|
3
|
+
Usage: python -m mem0_cli.telemetry_sender (JSON context is read from stdin;
|
|
4
|
+
a single argv argument is still accepted as a legacy fallback)
|
|
4
5
|
|
|
5
6
|
This module is spawned by telemetry.capture_event() and runs independently
|
|
6
7
|
of the parent CLI process. It:
|
|
@@ -20,8 +21,18 @@ import sys
|
|
|
20
21
|
import urllib.request
|
|
21
22
|
|
|
22
23
|
|
|
24
|
+
def _load_context() -> dict:
|
|
25
|
+
"""Load telemetry context from stdin, falling back to argv for compatibility."""
|
|
26
|
+
raw = ""
|
|
27
|
+
if not sys.stdin.isatty():
|
|
28
|
+
raw = sys.stdin.read().strip()
|
|
29
|
+
if not raw and len(sys.argv) > 1:
|
|
30
|
+
raw = sys.argv[1]
|
|
31
|
+
return json.loads(raw)
|
|
32
|
+
|
|
33
|
+
|
|
23
34
|
def main() -> None:
|
|
24
|
-
ctx =
|
|
35
|
+
ctx = _load_context()
|
|
25
36
|
payload = ctx["payload"]
|
|
26
37
|
|
|
27
38
|
if ctx.get("needs_email") and ctx.get("mem0_api_key"):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|