basic-memory 0.2.4__tar.gz → 0.2.6__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.

Potentially problematic release.


This version of basic-memory might be problematic. Click here for more details.

Files changed (142) hide show
  1. {basic_memory-0.2.4 → basic_memory-0.2.6}/.github/workflows/release.yml +6 -3
  2. {basic_memory-0.2.4 → basic_memory-0.2.6}/CHANGELOG.md +16 -0
  3. {basic_memory-0.2.4 → basic_memory-0.2.6}/PKG-INFO +1 -1
  4. {basic_memory-0.2.4 → basic_memory-0.2.6}/pyproject.toml +1 -1
  5. basic_memory-0.2.4/tasks.md +0 -458
  6. {basic_memory-0.2.4 → basic_memory-0.2.6}/.github/workflows/pr-title.yml +0 -0
  7. {basic_memory-0.2.4 → basic_memory-0.2.6}/.github/workflows/test.yml +0 -0
  8. {basic_memory-0.2.4 → basic_memory-0.2.6}/.gitignore +0 -0
  9. {basic_memory-0.2.4 → basic_memory-0.2.6}/.python-version +0 -0
  10. {basic_memory-0.2.4 → basic_memory-0.2.6}/CITATION.cff +0 -0
  11. {basic_memory-0.2.4 → basic_memory-0.2.6}/CODE_OF_CONDUCT.md +0 -0
  12. {basic_memory-0.2.4 → basic_memory-0.2.6}/CONTRIBUTING.md +0 -0
  13. {basic_memory-0.2.4 → basic_memory-0.2.6}/LICENSE +0 -0
  14. {basic_memory-0.2.4 → basic_memory-0.2.6}/Makefile +0 -0
  15. {basic_memory-0.2.4 → basic_memory-0.2.6}/README.md +0 -0
  16. {basic_memory-0.2.4 → basic_memory-0.2.6}/alembic.ini +0 -0
  17. {basic_memory-0.2.4 → basic_memory-0.2.6}/basic-memory.md +0 -0
  18. {basic_memory-0.2.4 → basic_memory-0.2.6}/installer/Basic.icns +0 -0
  19. {basic_memory-0.2.4 → basic_memory-0.2.6}/installer/README.md +0 -0
  20. {basic_memory-0.2.4 → basic_memory-0.2.6}/installer/icon.svg +0 -0
  21. {basic_memory-0.2.4 → basic_memory-0.2.6}/installer/installer.py +0 -0
  22. {basic_memory-0.2.4 → basic_memory-0.2.6}/installer/make_icons.sh +0 -0
  23. {basic_memory-0.2.4 → basic_memory-0.2.6}/installer/setup.py +0 -0
  24. {basic_memory-0.2.4 → basic_memory-0.2.6}/memory.json +0 -0
  25. {basic_memory-0.2.4 → basic_memory-0.2.6}/scripts/install.sh +0 -0
  26. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/__init__.py +0 -0
  27. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/alembic/README +0 -0
  28. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/alembic/env.py +0 -0
  29. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/alembic/migrations.py +0 -0
  30. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/alembic/script.py.mako +0 -0
  31. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/alembic/versions/3dae7c7b1564_initial_schema.py +0 -0
  32. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/api/__init__.py +0 -0
  33. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/api/app.py +0 -0
  34. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/api/routers/__init__.py +0 -0
  35. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/api/routers/knowledge_router.py +0 -0
  36. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/api/routers/memory_router.py +0 -0
  37. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/api/routers/resource_router.py +0 -0
  38. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/api/routers/search_router.py +0 -0
  39. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/cli/__init__.py +0 -0
  40. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/cli/app.py +0 -0
  41. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/cli/commands/__init__.py +0 -0
  42. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/cli/commands/db.py +0 -0
  43. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/cli/commands/import_memory_json.py +0 -0
  44. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/cli/commands/mcp.py +0 -0
  45. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/cli/commands/status.py +0 -0
  46. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/cli/commands/sync.py +0 -0
  47. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/cli/main.py +0 -0
  48. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/config.py +0 -0
  49. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/db.py +0 -0
  50. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/deps.py +0 -0
  51. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/file_utils.py +0 -0
  52. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/markdown/__init__.py +0 -0
  53. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/markdown/entity_parser.py +0 -0
  54. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/markdown/markdown_processor.py +0 -0
  55. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/markdown/plugins.py +0 -0
  56. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/markdown/schemas.py +0 -0
  57. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/markdown/utils.py +0 -0
  58. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/mcp/__init__.py +0 -0
  59. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/mcp/async_client.py +0 -0
  60. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/mcp/server.py +0 -0
  61. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/mcp/tools/__init__.py +0 -0
  62. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/mcp/tools/knowledge.py +0 -0
  63. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/mcp/tools/memory.py +0 -0
  64. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/mcp/tools/notes.py +0 -0
  65. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/mcp/tools/search.py +0 -0
  66. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/mcp/tools/utils.py +0 -0
  67. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/models/__init__.py +0 -0
  68. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/models/base.py +0 -0
  69. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/models/knowledge.py +0 -0
  70. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/models/search.py +0 -0
  71. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/repository/__init__.py +0 -0
  72. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/repository/entity_repository.py +0 -0
  73. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/repository/observation_repository.py +0 -0
  74. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/repository/relation_repository.py +0 -0
  75. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/repository/repository.py +0 -0
  76. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/repository/search_repository.py +0 -0
  77. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/schemas/__init__.py +0 -0
  78. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/schemas/base.py +0 -0
  79. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/schemas/delete.py +0 -0
  80. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/schemas/discovery.py +0 -0
  81. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/schemas/memory.py +0 -0
  82. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/schemas/request.py +0 -0
  83. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/schemas/response.py +0 -0
  84. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/schemas/search.py +0 -0
  85. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/services/__init__.py +0 -0
  86. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/services/context_service.py +0 -0
  87. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/services/entity_service.py +0 -0
  88. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/services/exceptions.py +0 -0
  89. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/services/file_service.py +0 -0
  90. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/services/link_resolver.py +0 -0
  91. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/services/search_service.py +0 -0
  92. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/services/service.py +0 -0
  93. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/sync/__init__.py +0 -0
  94. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/sync/file_change_scanner.py +0 -0
  95. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/sync/sync_service.py +0 -0
  96. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/sync/utils.py +0 -0
  97. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/sync/watch_service.py +0 -0
  98. {basic_memory-0.2.4 → basic_memory-0.2.6}/src/basic_memory/utils.py +0 -0
  99. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/api/conftest.py +0 -0
  100. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/api/test_knowledge_router.py +0 -0
  101. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/api/test_memory_router.py +0 -0
  102. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/api/test_resource_router.py +0 -0
  103. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/api/test_search_router.py +0 -0
  104. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/cli/test_import_memory_json.py +0 -0
  105. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/cli/test_status.py +0 -0
  106. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/cli/test_sync.py +0 -0
  107. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/conftest.py +0 -0
  108. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/edit_file_test.py +0 -0
  109. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/markdown/__init__.py +0 -0
  110. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/markdown/test_entity_parser.py +0 -0
  111. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/markdown/test_markdown_plugins.py +0 -0
  112. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/markdown/test_markdown_processor.py +0 -0
  113. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/markdown/test_observation_edge_cases.py +0 -0
  114. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/markdown/test_parser_edge_cases.py +0 -0
  115. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/markdown/test_relation_edge_cases.py +0 -0
  116. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/markdown/test_task_detection.py +0 -0
  117. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/mcp/conftest.py +0 -0
  118. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/mcp/test_tool_get_entity.py +0 -0
  119. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/mcp/test_tool_knowledge.py +0 -0
  120. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/mcp/test_tool_memory.py +0 -0
  121. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/mcp/test_tool_notes.py +0 -0
  122. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/mcp/test_tool_search.py +0 -0
  123. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/mcp/test_tool_utils.py +0 -0
  124. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/repository/test_entity_repository.py +0 -0
  125. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/repository/test_observation_repository.py +0 -0
  126. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/repository/test_relation_repository.py +0 -0
  127. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/repository/test_repository.py +0 -0
  128. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/schemas/test_memory_url.py +0 -0
  129. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/schemas/test_schemas.py +0 -0
  130. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/schemas/test_search.py +0 -0
  131. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/services/test_context_service.py +0 -0
  132. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/services/test_entity_service.py +0 -0
  133. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/services/test_file_service.py +0 -0
  134. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/services/test_link_resolver.py +0 -0
  135. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/services/test_search_service.py +0 -0
  136. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/sync/test_file_change_scanner.py +0 -0
  137. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/sync/test_sync_service.py +0 -0
  138. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/sync/test_watch_service.py +0 -0
  139. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/test_basic_memory.py +0 -0
  140. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/utils/test_file_utils.py +0 -0
  141. {basic_memory-0.2.4 → basic_memory-0.2.6}/tests/utils/test_permalink_formatting.py +0 -0
  142. {basic_memory-0.2.4 → basic_memory-0.2.6}/uv.lock +0 -0
@@ -64,8 +64,11 @@ jobs:
64
64
 
65
65
  - name: Install uv
66
66
  run: |
67
- curl -LsSf https://astral.sh/uv/install.sh | sh
68
- echo "$HOME/.cargo/bin" >> $GITHUB_PATH
67
+ pip install uv
68
+
69
+ - name: Create virtual env
70
+ run: |
71
+ uv venv
69
72
 
70
73
  - name: Install librsvg
71
74
  run: brew install librsvg
@@ -82,7 +85,7 @@ jobs:
82
85
  cd installer
83
86
  uv run python setup.py bdist_mac
84
87
  # Remove quarantine attribute
85
- xattr -dr com.apple.quarantine "dist/Basic Memory Installer.app"
88
+ xattr -dr com.apple.quarantine "build/Basic Memory Installer.app"
86
89
 
87
90
  - name: Zip macOS installer
88
91
  run: |
@@ -1,6 +1,22 @@
1
1
  # CHANGELOG
2
2
 
3
3
 
4
+ ## v0.2.6 (2025-02-14)
5
+
6
+ ### Bug Fixes
7
+
8
+ - Bump project patch version
9
+ ([`01d4672`](https://github.com/basicmachines-co/basic-memory/commit/01d46727b40c24b017ea9db4b741daef565ac73e))
10
+
11
+
12
+ ## v0.2.5 (2025-02-14)
13
+
14
+ ### Bug Fixes
15
+
16
+ - Refix vitual env in installer build
17
+ ([`052f491`](https://github.com/basicmachines-co/basic-memory/commit/052f491fff629e8ead629c9259f8cb46c608d584))
18
+
19
+
4
20
  ## v0.2.4 (2025-02-14)
5
21
 
6
22
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: basic-memory
3
- Version: 0.2.4
3
+ Version: 0.2.6
4
4
  Summary: Local-first knowledge management combining Zettelkasten with knowledge graphs
5
5
  Project-URL: Homepage, https://github.com/basicmachines-co/basic-memory
6
6
  Project-URL: Repository, https://github.com/basicmachines-co/basic-memory
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "basic-memory"
3
- version = "0.2.4"
3
+ version = "0.2.6"
4
4
  description = "Local-first knowledge management combining Zettelkasten with knowledge graphs"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12.1"
@@ -1,458 +0,0 @@
1
- # Basic Memory Tasks
2
-
3
- ## Current Focus
4
-
5
- ### Observation Management
6
-
7
- Implement update/remove functionality for observations with a focus on maintainability and consistency with our "
8
- filesystem is source of truth" principle.
9
-
10
- Options under consideration:
11
-
12
- 1. Bulk Update Approach
13
- - Update all observations at once
14
- - Pros:
15
- - Simpler file operations
16
- - No need to match on observation content
17
- - Easier database synchronization
18
- - Very consistent with "filesystem is source of truth"
19
- - Cons:
20
- - Less efficient - rewrites everything for small changes
21
- - Potential concurrency implications
22
-
23
- 2. Tracked Observations Approach
24
- - Use markdown comments for observation IDs
25
- ```markdown
26
- # Entity Name
27
- type: entity_type
28
-
29
- ## Observations
30
- - <!-- obs-id: abc123 -->
31
- This is an observation
32
- ```
33
- - Pros:
34
- - Can track individual observations
35
- - Enables precise updates/deletes
36
- - Cons:
37
- - More complex markdown parsing
38
- - IDs visible in markdown
39
-
40
- 3. Diff-based Approach
41
- - Implement observation-aware diffing
42
- - Track changes at observation level
43
- - Pros:
44
- - More efficient updates
45
- - Preserves manual edits
46
- - Cons:
47
- - More complex implementation
48
- - Need to handle merge conflicts
49
-
50
- 4. Position-based Management
51
- - Track observations by their position/order
52
- - Pros:
53
- - No need for explicit IDs
54
- - Clean markdown
55
- - Cons:
56
- - Fragile if order changes
57
- - Hard to handle concurrent edits
58
-
59
- ## Completed
60
-
61
- - [x] Extract file operations to fileio.py module
62
- - [x] Update EntityService to use fileio functions
63
- - [x] Initial ObservationService implementation
64
- - [x] Basic test coverage
65
-
66
- ## Future Work
67
-
68
- - [ ] Implement observation updates/removals (exploring options above)
69
- - [ ] Proper session management for concurrent operations
70
- - [ ] EntityService tests using new fileio module
71
- - [ ] More sophisticated search functionality
72
- - [ ] Handle markdown formatting edge cases
73
-
74
- ## TODO
75
-
76
- ### refactor input schema
77
-
78
- 1. Observations Format:
79
- Old (JSON) way I tried first:
80
-
81
- ```python
82
- "observations": ["First observation", "Second observation"] # Simple string array
83
- ```
84
-
85
- New required format:
86
-
87
- ```python
88
- "observations": [
89
- {"content": "First observation"},
90
- {"content": "Second observation"}
91
- ] # Array of objects with content field
92
- ```
93
-
94
- 2. Relations Format:
95
- Old way:
96
-
97
- ```python
98
- "relations": [
99
- {"from": "EntityName", "to": "OtherEntity", "relationType": "relates_to"} # Using names
100
- ]
101
- ```
102
-
103
- New format:
104
-
105
- ```python
106
- "relations": [
107
- {"fromId": "20241210-entity-id", "toId": "20241210-other-id", "relationType": "relates_to"} # Using IDs
108
- ]
109
- ```
110
-
111
- My preferences:
112
-
113
- 1. For observations: The simple string array felt more intuitive for basic use, but I can see the benefits of the object
114
- format:
115
- - Allows for additional metadata (context, timestamps, etc.)
116
- - More explicit about what each field means
117
- - Consistent with how we'd want to store this in a database
118
-
119
- 2. For relations: Using IDs is technically better but requires an extra lookup step in my workflow:
120
- - I have to first create the entities to get their IDs
121
- - Then use those IDs to create relations
122
- - Makes it harder to create entities and relations in a single step
123
-
124
- Suggestions for making it more intuitive:
125
-
126
- 1. For observations: We could have a helper function that accepts either format:
127
-
128
- ```python
129
- # Both would work:
130
- create_entities([{
131
- "name": "Entity",
132
- "entityType": "type",
133
- "observations": ["Simple string obs"] # Auto-converted to object format
134
- }])
135
-
136
- create_entities([{
137
- "name": "Entity",
138
- "entityType": "type",
139
- "observations": [{"content": "Full object obs"}] # Native format
140
- }])
141
- ```
142
-
143
- 2. For relations: Maybe allow a name-based helper function:
144
-
145
- ```python
146
- # Instead of requiring IDs:
147
- create_relations_by_name([{
148
- "from": "EntityName",
149
- "to": "OtherEntity",
150
- "relationType": "relates_to"
151
- }])
152
- ```
153
-
154
- 3. A combined creation function for when we want to create entities and their relations together:
155
-
156
- ```python
157
- create_entity_with_relations({
158
- "entity": {
159
- "name": "NewEntity",
160
- "entityType": "type",
161
- "observations": ["Obs 1", "Obs 2"]
162
- },
163
- "relations": [{
164
- "to": "ExistingEntity",
165
- "relationType": "relates_to"
166
- }]
167
- })
168
- ```
169
-
170
- The current schema is more "correct" from a software engineering perspective, but these helpers could make it more
171
- natural to use while maintaining the rigorous underlying structure. What do you think about these suggestions? Would you
172
- prefer to keep it strict for clarity, or add some convenience layers?
173
-
174
- ### entity file organization
175
-
176
- - my problems
177
- - wall of text is hard to scan visually
178
- - files are not ordered or grouped granular enough. Only `<date>_<entity_name>.md`
179
- - hard to tell when a new entity file is added
180
-
181
- Possible fixes:
182
-
183
- - use subdirectories?
184
-
185
- ## TASKS
186
-
187
- 1. **Core Functionality Improvements**
188
- - [x] entity.description addition
189
- - [x] subdirectories
190
- - Paul needs this for markdown view
191
- - [x] refine directory sprawl
192
- - [ ] improve tool api
193
- - [ ] Choose and implement observation update/removal strategy
194
- - [ ] Handle relationship updates in files
195
- - [ ] Complete full CRUD operations
196
- - delete
197
- - [ ] Improve search functionality (currently broken as we discovered)
198
-
199
- ### Suggested Sequence
200
-
201
- 1. **Schema Update First**
202
- - Add `entity.description` field
203
- - rename entity.references?
204
- - This affects database, Pydantic models, and file format
205
- - Good foundation for other changes
206
-
207
- 2. **File Organization**
208
- - Add subdirectory support
209
- - Affects:
210
- - File path handling
211
- - Entity loading/saving
212
- - URI resolution
213
- - Will make Paul's markdown viewing experience better
214
-
215
- 3. **Tool API Improvements**
216
- - Cleaner input/output schemas
217
- - More consistent patterns
218
- - Better error handling
219
- - This sets us up for implementing the remaining operations
220
-
221
- 4. **Core Operations**
222
- - Implement delete operations
223
- - Update/remove observations
224
- - Relationship updates in files
225
- - Building on the improved API
226
-
227
- 5. **Search Fix**
228
- - Can properly tackle this after file organization
229
- - Will benefit from improved schema
230
-
231
- Would you like me to:
232
- 1. Start with the schema update for entity.description?
233
- 2. Plan out the subdirectory implementation?
234
- 3. Or focus on a different area?
235
-
236
- I think the schema update would be a clean, contained change to start with, but I'm happy to tackle whichever part you think would be most valuable first.
237
-
238
-
239
- 2. **Robustness & Testing**
240
- - Fix DI issues
241
- - Learn from fastmcp patterns
242
- - Markdown service
243
- - markdown.py
244
- -python-frontmatter
245
- - Complete test coverage
246
- - Expand testing across services
247
- - 100% coverate
248
- - Improve error handling and logging
249
- - Add comprehensive type hints
250
-
251
- 3. **Architecture Improvements**
252
- - Handle concurrent file operations safely
253
- - Implement proper session management
254
- - Balance file operations and DB sync
255
- - Handle markdown formatting edge cases
256
-
257
- 4. **Documentation & Infrastructure**
258
- - Document core modules
259
- - Implement proper backup strategy
260
- - Add file change versioning
261
- - Improve CLI interface
262
-
263
-
264
- ## Ideas
265
-
266
- - need update tool
267
-
268
- ### 2-way sync
269
-
270
- - Enable updates to the markdown files to be able to be seen by AI
271
- - possible via tool sync
272
- - filesystem notifications via agent?
273
- - Claude can use `file_write` tool to edit Entity files also
274
-
275
- ### Projects
276
-
277
- - support multiple projects
278
- - figure out flow
279
- - load project at startup?
280
- - switch project during chat?
281
-
282
- ### References
283
-
284
- - better support for ref:// references
285
- - should we call them memory://<project>/<entity>
286
- - use Prompt to invoke reference uri
287
-
288
- ### Entity File format
289
-
290
- - Consider using wiki link format:
291
- [[20241210-ai_human_collaboration_model]] improves
292
-
293
- instead of
294
- [20241210-basic-memory] validates_design_of
295
-
296
- - use frontmatter for file header
297
-
298
- ### Code
299
-
300
- - cleanup server.py
301
- - use markdown.py?
302
- - fastmcp?
303
- - Entity.description
304
-
305
- ### Other Features
306
-
307
- - Search
308
- - webui
309
- - python notebook?
310
- - vector eb extension for sqlite
311
-
312
- #### Obsidian
313
-
314
- - use as file viewer editor
315
- - create knowledge graph?
316
-
317
- #### Save chats
318
-
319
- I'll sketch out a potential schema for chat sessions in our system:
320
-
321
- ```
322
- {
323
- `entities`: [
324
- {
325
- `name`: `Chat_Entity_Design`,
326
- `entityType`: `design_proposal`,
327
- `observations`: [
328
- {
329
- `content`: `Entity Schema:
330
- type: chat_session
331
- date: ISO timestamp
332
- participants: [human, ai]
333
- topic: string
334
- context_refs: [memory://<project>/<entity_id>]
335
- key_decisions: [string]
336
- summary: string`
337
- },
338
- {
339
- `content`: `File Format (frontmatter):
340
- ---
341
- type: chat_session
342
- date: 2024-12-10T10:30:00Z
343
- participants:
344
- - human: paul
345
- - ai: claude
346
- topic: Chat Session Storage Design
347
- context_refs:
348
- - memory://basic-memory/20241210-chat-entity-design
349
- key_decisions:
350
- - Store chats as first-class entities
351
- - Use memory:// URI scheme
352
- summary: Designed schema for chat storage
353
- ---`
354
- },
355
- {
356
- `content`: `Example Relations:
357
- - chat_session references design_proposal
358
- - chat_session implements feature
359
- - chat_session discusses concept
360
- - chat_session continues_from previous_chat`
361
- },
362
- {
363
- `content`: `Auto-generation approach:
364
- 1. At end of chat, Claude summarizes key points
365
- 2. Creates chat entity with metadata
366
- 3. Adds relations to referenced entities
367
- 4. Updates any entities modified during chat`
368
- },
369
- {
370
- `content`: `Integration points:
371
- - memory:// URI scheme for references
372
- - Relations to track context chain
373
- - File format matches entity schema
374
- - Automatic metadata generation`
375
- }
376
- ]
377
- }
378
- ]
379
- }
380
- ```
381
-
382
- ```
383
- {
384
- `entities`: [
385
- {
386
- `name`: `Chat_Session_Workflow`,
387
- `entityType`: `process`,
388
- `observations`: [
389
- {
390
- `content`: `Start of chat:
391
- - Load any referenced context via memory:// URIs
392
- - Initialize new chat session metadata
393
- - Track entities being discussed/modified`
394
- },
395
- {
396
- `content`: `During chat:
397
- - Update references as new entities are mentioned
398
- - Track key decisions and changes
399
- - Note any new relations discovered`
400
- },
401
- {
402
- `content`: `End of chat:
403
- - Generate summary and key points
404
- - Create chat session entity
405
- - Add relations to referenced entities
406
- - Update any modified entities`
407
- },
408
- {
409
- `content`: `Future chat reference:
410
- - Can reference previous chat via memory:// URI
411
- - Loads relevant context and decisions
412
- - Creates continues_from relation automatically`
413
- }
414
- ]
415
- }
416
- ]
417
- }
418
- ```
419
-
420
- Key aspects of this design:
421
-
422
- 1. Chat Session as Entity
423
-
424
- - Clear metadata (participants, date, topic)
425
- - Explicit references to other entities via memory:// URIs
426
- - Captures key decisions and summary
427
- - Uses frontmatter for clean file format
428
-
429
- 2. Rich Relations
430
-
431
- - Can track chat-to-chat continuity
432
- - Links to entities discussed/modified
433
- - Captures purpose (discusses, implements, etc.)
434
- - Maintains context chain
435
-
436
- 3. Automated Workflow
437
-
438
- - I could generate metadata during chat
439
- - Create summary and relations at end
440
- - Update any modified entities
441
- - Makes context loading explicit
442
-
443
- 4. Integration
444
-
445
- - memory:// URI scheme fits naturally
446
- - File format matches our entity pattern
447
- - Two-way links between chats and entities
448
- - Clear context persistence model
449
-
450
- The nice thing about this design is that it makes chat sessions "first-class citizens" in our knowledge graph while
451
- keeping everything in human-readable markdown files.
452
-
453
- Would you like me to:
454
-
455
- 1. Sketch out what this chat would look like as an entity?
456
- 2. Detail the MCP tool changes needed?
457
- 3. Mock up the file format more precisely?
458
- 4. Something else?
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes