graph-mind-memory 0.3.2__tar.gz → 0.3.3__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 (33) hide show
  1. {graph_mind_memory-0.3.2/graph_mind_memory.egg-info → graph_mind_memory-0.3.3}/PKG-INFO +1 -1
  2. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/brain_log.py +29 -0
  3. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/graph_mind_mcp_server.py +2 -1
  4. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3/graph_mind_memory.egg-info}/PKG-INFO +1 -1
  5. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/pyproject.toml +1 -1
  6. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/LICENSE +0 -0
  7. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/README.md +0 -0
  8. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/associative_memory.py +0 -0
  9. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/automatic_capture.py +0 -0
  10. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/automatic_capture_cli.py +0 -0
  11. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/clock.py +0 -0
  12. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/coding_memory.py +0 -0
  13. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/conversation_memory.py +0 -0
  14. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/development_memory.py +0 -0
  15. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/development_paths.py +0 -0
  16. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/embedding_warmup.py +0 -0
  17. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/entity_timeline.py +0 -0
  18. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/forget.py +0 -0
  19. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/graph_mind_memory.egg-info/SOURCES.txt +0 -0
  20. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/graph_mind_memory.egg-info/dependency_links.txt +0 -0
  21. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/graph_mind_memory.egg-info/entry_points.txt +0 -0
  22. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/graph_mind_memory.egg-info/requires.txt +0 -0
  23. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/graph_mind_memory.egg-info/top_level.txt +0 -0
  24. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/install.py +0 -0
  25. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/local_brain.py +0 -0
  26. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/local_embedder.py +0 -0
  27. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/semantic_llm_extractor.py +0 -0
  28. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/semantic_memory.py +0 -0
  29. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/semantic_recall.py +0 -0
  30. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/setup.cfg +0 -0
  31. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/temporal_resolver.py +0 -0
  32. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/universal_personal_memory.py +0 -0
  33. {graph_mind_memory-0.3.2 → graph_mind_memory-0.3.3}/vector_cache.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graph-mind-memory
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Local-first memory for AI coding assistants: verbatim, on your own PC, no LLM calls at write time.
5
5
  Author-email: Yohan Ko <goyohan0611@gmail.com>
6
6
  License-Expression: AGPL-3.0-only
@@ -304,6 +304,31 @@ def append_many(shared: Path, items) -> int:
304
304
  return len(lines)
305
305
 
306
306
 
307
+ def _shared_ids(shared) -> set:
308
+ """(kind, id) of every turn and memory the shared log holds, forgotten ones included."""
309
+ if is_database(shared):
310
+ with _pg(shared) as connection:
311
+ lines = [row[0] for row in connection.execute("SELECT line FROM brain_log")]
312
+ else:
313
+ lines = [line for log in (Path(shared) / "log").glob("*.jsonl")
314
+ for line in log.read_text(encoding="utf-8", errors="replace").splitlines()]
315
+ ids = set()
316
+ for line in lines:
317
+ try:
318
+ item = json.loads(line)
319
+ except ValueError:
320
+ continue
321
+ record = item.get("record", {})
322
+ if item.get("kind") == "turn":
323
+ ids.add(("turn", record.get("turn_id")))
324
+ elif item.get("kind") == "memory":
325
+ ids.add(("memory", record.get("memory_id")))
326
+ elif item.get("kind") == "forget": # never resend what was deleted
327
+ ids |= {("turn", t) for t in record.get("turn_ids", [])}
328
+ ids |= {("memory", m) for m in record.get("memory_ids", [])}
329
+ return ids
330
+
331
+
307
332
  def export_history(shared: Path, index: Path) -> dict:
308
333
  """Put what this machine remembered before the folder existed into its log, once.
309
334
 
@@ -318,6 +343,10 @@ def export_history(shared: Path, index: Path) -> dict:
318
343
  "kind TEXT NOT NULL, id TEXT NOT NULL, PRIMARY KEY(kind, id))")
319
344
  tables = {row[0] for row in db.execute("SELECT name FROM sqlite_master")}
320
345
  done = {(row[0], row[1]) for row in db.execute("SELECT kind, id FROM brain_log_exported")}
346
+ # what the shared log already holds, whoever wrote it: a turn published as it was
347
+ # captured is never marked exported, so without this a re-share sent everything again,
348
+ # and a PC whose turns missed a downed hub had no way to send just those
349
+ done |= _shared_ids(shared)
321
350
  items = []
322
351
  if "local_brain_memories" in tables:
323
352
  for row in db.execute("SELECT * FROM local_brain_memories ORDER BY revision"):
@@ -582,7 +582,8 @@ def build_server(db_path=None):
582
582
  the AI on the other PC; it contains the password, so say not to post it anywhere public.
583
583
  On the other PC, when the user pastes a "gm1." code, call this with `path=<the code>`.
584
584
 
585
- `share_existing=true` copies what this PC already remembered into the folder, which uploads
585
+ `share_existing=true` sends what this PC remembers and the shared memory lacks (only that:
586
+ it also repairs turns that missed a hub that was down). It uploads
586
587
  it to wherever the folder syncs. Set it only when the user has explicitly agreed to that.
587
588
 
588
589
  `reindex=true` brings the search index up to date (links new memories, embeds unembedded
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graph-mind-memory
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Local-first memory for AI coding assistants: verbatim, on your own PC, no LLM calls at write time.
5
5
  Author-email: Yohan Ko <goyohan0611@gmail.com>
6
6
  License-Expression: AGPL-3.0-only
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "graph-mind-memory"
7
- version = "0.3.2"
7
+ version = "0.3.3"
8
8
  description = "Local-first memory for AI coding assistants: verbatim, on your own PC, no LLM calls at write time."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"