cli-memory-os 0.1.3__tar.gz → 0.1.4__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.
- {cli_memory_os-0.1.3/cli_memory_os.egg-info → cli_memory_os-0.1.4}/PKG-INFO +1 -1
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4/cli_memory_os.egg-info}/PKG-INFO +1 -1
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli_memory_os.egg-info/top_level.txt +1 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/connectors/github.py +28 -15
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/connectors/gmail.py +48 -11
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/core/vector_store.py +2 -2
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/pyproject.toml +1 -1
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/LICENSE +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/MANIFEST.in +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/README.md +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/__init__.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/__init__.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/ask.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/benchmark.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/config_cmd.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/doctor.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/export.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/import_cmd.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/init.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/logs.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/monitor.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/plugins.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/restart.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/start.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/status.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/stop.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/sync.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/version.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/workspace.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/main.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/parser.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli_memory_os.egg-info/SOURCES.txt +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli_memory_os.egg-info/dependency_links.txt +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli_memory_os.egg-info/entry_points.txt +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli_memory_os.egg-info/requires.txt +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/connectors/__init__.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/connectors/base.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/connectors/notion.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/connectors/registry.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/core/__init__.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/core/chunker.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/core/context_builder.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/core/embedder.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/core/llm.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/infrastructure/__init__.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/infrastructure/compose.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/infrastructure/config.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/infrastructure/docker.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/infrastructure/health.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/infrastructure/observability.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/infrastructure/workspace.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/models/__init__.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/models/memory.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/setup.cfg +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/storage/__init__.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/storage/db.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/storage/graph.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/storage/schema.sql +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/storage/tech_detector.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/tests/test_cli_integration.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/tests/test_commands_phase2.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/tests/test_compose_manager.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/tests/test_first_time_user_experience.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/tests/test_infrastructure_stabilization.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/tests/test_sync_ask_cli.py +0 -0
- {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/tests/test_v1_features.py +0 -0
|
@@ -67,23 +67,36 @@ def sync_github():
|
|
|
67
67
|
|
|
68
68
|
print("Syncing GitHub...\n")
|
|
69
69
|
|
|
70
|
-
# Fetch repositories
|
|
71
|
-
resp = s.execute(tool_slug="github_list_repositories_for_the_authenticated_user", arguments={})
|
|
72
|
-
if resp.error or not resp.data:
|
|
73
|
-
print("No repositories found.")
|
|
74
|
-
return
|
|
75
|
-
|
|
76
|
-
resp_data = resp.data
|
|
77
|
-
if isinstance(resp_data, dict) and "response_data" in resp_data:
|
|
78
|
-
resp_data = resp_data["response_data"]
|
|
79
|
-
|
|
70
|
+
# Fetch repositories with pagination
|
|
80
71
|
repos = []
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
72
|
+
page = 1
|
|
73
|
+
while True:
|
|
74
|
+
resp = s.execute(
|
|
75
|
+
tool_slug="github_list_repositories_for_the_authenticated_user",
|
|
76
|
+
arguments={"per_page": 100, "page": page}
|
|
77
|
+
)
|
|
78
|
+
if resp.error or not resp.data:
|
|
79
|
+
break
|
|
80
|
+
|
|
81
|
+
resp_data = resp.data
|
|
82
|
+
if isinstance(resp_data, dict) and "response_data" in resp_data:
|
|
83
|
+
resp_data = resp_data["response_data"]
|
|
84
|
+
|
|
85
|
+
page_repos = []
|
|
86
|
+
if isinstance(resp_data, list):
|
|
87
|
+
page_repos = resp_data
|
|
88
|
+
elif isinstance(resp_data, dict):
|
|
89
|
+
page_repos = resp_data.get("repositories") or resp_data.get("items") or []
|
|
90
|
+
|
|
91
|
+
if not isinstance(page_repos, list) or not page_repos:
|
|
92
|
+
break
|
|
93
|
+
|
|
94
|
+
repos.extend(page_repos)
|
|
95
|
+
if len(page_repos) < 100:
|
|
96
|
+
break
|
|
97
|
+
page += 1
|
|
85
98
|
|
|
86
|
-
if not
|
|
99
|
+
if not repos:
|
|
87
100
|
print("No repositories found.")
|
|
88
101
|
return
|
|
89
102
|
|
|
@@ -23,19 +23,56 @@ def sync_gmail():
|
|
|
23
23
|
print("Gmail connection not active.")
|
|
24
24
|
return
|
|
25
25
|
|
|
26
|
-
#
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
# Determine last fetched date from stored emails to optimize retrieval query
|
|
27
|
+
query = ""
|
|
28
|
+
try:
|
|
29
|
+
conn = get_connection()
|
|
30
|
+
cursor = conn.cursor()
|
|
31
|
+
cursor.execute("SELECT MAX(received_at) FROM emails WHERE received_at IS NOT NULL AND received_at != ''")
|
|
32
|
+
row = cursor.fetchone()
|
|
33
|
+
conn.close()
|
|
34
|
+
if row and row[0]:
|
|
35
|
+
import re
|
|
36
|
+
m = re.match(r"(\d{4})[-/](\d{2})[-/](\d{2})", row[0])
|
|
37
|
+
if m:
|
|
38
|
+
query = f"after:{m.group(1)}/{m.group(2)}/{m.group(3)}"
|
|
39
|
+
except Exception as e:
|
|
40
|
+
import logging
|
|
41
|
+
logging.getLogger("gmail").warning(f"Failed to query last fetched date from SQLite: {e}")
|
|
42
|
+
|
|
43
|
+
# Fetch emails with pagination
|
|
44
|
+
emails = []
|
|
45
|
+
page_token = None
|
|
46
|
+
while True:
|
|
47
|
+
args = {"max_results": 100, "include_payload": True}
|
|
48
|
+
if query:
|
|
49
|
+
args["q"] = query
|
|
50
|
+
if page_token:
|
|
51
|
+
args["page_token"] = page_token
|
|
52
|
+
|
|
53
|
+
resp = s.execute(tool_slug="gmail_fetch_emails", arguments=args)
|
|
54
|
+
if not resp or resp.error or not resp.data:
|
|
55
|
+
break
|
|
56
|
+
|
|
57
|
+
page_emails = resp.data.get("messages", [])
|
|
58
|
+
if not page_emails:
|
|
59
|
+
page_emails = resp.data.get("response_data", {}).get("messages", [])
|
|
60
|
+
|
|
61
|
+
if not page_emails:
|
|
62
|
+
break
|
|
63
|
+
|
|
64
|
+
emails.extend(page_emails)
|
|
65
|
+
page_token = resp.data.get("nextPageToken")
|
|
66
|
+
if not page_token:
|
|
67
|
+
break
|
|
68
|
+
|
|
69
|
+
# Safety check: avoid infinite loops if user has thousands of new emails
|
|
70
|
+
if len(emails) >= 500:
|
|
71
|
+
break
|
|
31
72
|
|
|
32
|
-
emails = resp.data.get("messages", [])
|
|
33
73
|
if not emails:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if not emails:
|
|
37
|
-
print("No emails found.")
|
|
38
|
-
return
|
|
74
|
+
print("No emails found.")
|
|
75
|
+
return
|
|
39
76
|
|
|
40
77
|
print(f"Found {len(emails)} emails")
|
|
41
78
|
|
|
@@ -19,10 +19,10 @@ def get_qdrant_client() -> QdrantClient:
|
|
|
19
19
|
if _qdrant_client is None:
|
|
20
20
|
url = os.getenv("QDRANT_URL")
|
|
21
21
|
if url:
|
|
22
|
-
_qdrant_client = QdrantClient(url=url)
|
|
22
|
+
_qdrant_client = QdrantClient(url=url, timeout=60.0)
|
|
23
23
|
else:
|
|
24
24
|
path = os.getenv("MEMORY_OS_QDRANT_PATH", "qdrant_storage")
|
|
25
|
-
_qdrant_client = QdrantClient(path=path)
|
|
25
|
+
_qdrant_client = QdrantClient(path=path, timeout=60.0)
|
|
26
26
|
return _qdrant_client
|
|
27
27
|
|
|
28
28
|
|
|
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
|
|
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
|
|
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
|