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.
Files changed (66) hide show
  1. {cli_memory_os-0.1.3/cli_memory_os.egg-info → cli_memory_os-0.1.4}/PKG-INFO +1 -1
  2. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4/cli_memory_os.egg-info}/PKG-INFO +1 -1
  3. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli_memory_os.egg-info/top_level.txt +1 -0
  4. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/connectors/github.py +28 -15
  5. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/connectors/gmail.py +48 -11
  6. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/core/vector_store.py +2 -2
  7. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/pyproject.toml +1 -1
  8. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/LICENSE +0 -0
  9. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/MANIFEST.in +0 -0
  10. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/README.md +0 -0
  11. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/__init__.py +0 -0
  12. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/__init__.py +0 -0
  13. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/ask.py +0 -0
  14. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/benchmark.py +0 -0
  15. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/config_cmd.py +0 -0
  16. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/doctor.py +0 -0
  17. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/export.py +0 -0
  18. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/import_cmd.py +0 -0
  19. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/init.py +0 -0
  20. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/logs.py +0 -0
  21. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/monitor.py +0 -0
  22. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/plugins.py +0 -0
  23. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/restart.py +0 -0
  24. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/start.py +0 -0
  25. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/status.py +0 -0
  26. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/stop.py +0 -0
  27. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/sync.py +0 -0
  28. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/version.py +0 -0
  29. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/commands/workspace.py +0 -0
  30. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/main.py +0 -0
  31. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli/parser.py +0 -0
  32. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli_memory_os.egg-info/SOURCES.txt +0 -0
  33. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli_memory_os.egg-info/dependency_links.txt +0 -0
  34. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli_memory_os.egg-info/entry_points.txt +0 -0
  35. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/cli_memory_os.egg-info/requires.txt +0 -0
  36. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/connectors/__init__.py +0 -0
  37. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/connectors/base.py +0 -0
  38. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/connectors/notion.py +0 -0
  39. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/connectors/registry.py +0 -0
  40. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/core/__init__.py +0 -0
  41. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/core/chunker.py +0 -0
  42. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/core/context_builder.py +0 -0
  43. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/core/embedder.py +0 -0
  44. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/core/llm.py +0 -0
  45. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/infrastructure/__init__.py +0 -0
  46. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/infrastructure/compose.py +0 -0
  47. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/infrastructure/config.py +0 -0
  48. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/infrastructure/docker.py +0 -0
  49. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/infrastructure/health.py +0 -0
  50. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/infrastructure/observability.py +0 -0
  51. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/infrastructure/workspace.py +0 -0
  52. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/models/__init__.py +0 -0
  53. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/models/memory.py +0 -0
  54. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/setup.cfg +0 -0
  55. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/storage/__init__.py +0 -0
  56. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/storage/db.py +0 -0
  57. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/storage/graph.py +0 -0
  58. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/storage/schema.sql +0 -0
  59. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/storage/tech_detector.py +0 -0
  60. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/tests/test_cli_integration.py +0 -0
  61. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/tests/test_commands_phase2.py +0 -0
  62. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/tests/test_compose_manager.py +0 -0
  63. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/tests/test_first_time_user_experience.py +0 -0
  64. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/tests/test_infrastructure_stabilization.py +0 -0
  65. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/tests/test_sync_ask_cli.py +0 -0
  66. {cli_memory_os-0.1.3 → cli_memory_os-0.1.4}/tests/test_v1_features.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cli-memory-os
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: CLI-based Personal Knowledge Operating System
5
5
  Author-email: Anirudh T <anirudh200584@gmail.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cli-memory-os
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: CLI-based Personal Knowledge Operating System
5
5
  Author-email: Anirudh T <anirudh200584@gmail.com>
6
6
  License-Expression: MIT
@@ -5,4 +5,5 @@ dist
5
5
  infrastructure
6
6
  logs
7
7
  models
8
+ scratch
8
9
  storage
@@ -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
- if isinstance(resp_data, list):
82
- repos = resp_data
83
- elif isinstance(resp_data, dict):
84
- repos = resp_data.get("repositories") or resp_data.get("items") or []
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 isinstance(repos, list) or not repos:
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
- # Fetch emails
27
- resp = s.execute(tool_slug="gmail_fetch_emails", arguments={"max_results": 50, "include_payload": True})
28
- if not resp or resp.error or not resp.data:
29
- print("No emails found.")
30
- return
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
- # Check response_data structure just in case
35
- emails = resp.data.get("response_data", {}).get("messages", [])
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
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cli-memory-os"
3
- version = "0.1.3"
3
+ version = "0.1.4"
4
4
  description = "CLI-based Personal Knowledge Operating System"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes