basic-memory 0.2.5__tar.gz → 0.2.7__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.
- {basic_memory-0.2.5 → basic_memory-0.2.7}/.github/workflows/release.yml +2 -3
- {basic_memory-0.2.5 → basic_memory-0.2.7}/CHANGELOG.md +14 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/PKG-INFO +1 -1
- {basic_memory-0.2.5 → basic_memory-0.2.7}/installer/setup.py +14 -5
- {basic_memory-0.2.5 → basic_memory-0.2.7}/pyproject.toml +1 -1
- basic_memory-0.2.5/tasks.md +0 -458
- {basic_memory-0.2.5 → basic_memory-0.2.7}/.github/workflows/pr-title.yml +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/.github/workflows/test.yml +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/.gitignore +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/.python-version +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/CITATION.cff +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/CODE_OF_CONDUCT.md +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/CONTRIBUTING.md +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/LICENSE +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/Makefile +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/README.md +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/alembic.ini +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/basic-memory.md +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/installer/Basic.icns +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/installer/README.md +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/installer/icon.svg +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/installer/installer.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/installer/make_icons.sh +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/memory.json +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/scripts/install.sh +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/__init__.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/alembic/README +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/alembic/env.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/alembic/migrations.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/alembic/script.py.mako +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/alembic/versions/3dae7c7b1564_initial_schema.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/api/__init__.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/api/app.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/api/routers/__init__.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/api/routers/knowledge_router.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/api/routers/memory_router.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/api/routers/resource_router.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/api/routers/search_router.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/cli/__init__.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/cli/app.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/cli/commands/__init__.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/cli/commands/db.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/cli/commands/import_memory_json.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/cli/commands/mcp.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/cli/commands/status.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/cli/commands/sync.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/cli/main.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/config.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/db.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/deps.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/file_utils.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/markdown/__init__.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/markdown/entity_parser.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/markdown/markdown_processor.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/markdown/plugins.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/markdown/schemas.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/markdown/utils.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/mcp/__init__.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/mcp/async_client.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/mcp/server.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/mcp/tools/__init__.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/mcp/tools/knowledge.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/mcp/tools/memory.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/mcp/tools/notes.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/mcp/tools/search.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/mcp/tools/utils.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/models/__init__.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/models/base.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/models/knowledge.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/models/search.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/repository/__init__.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/repository/entity_repository.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/repository/observation_repository.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/repository/relation_repository.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/repository/repository.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/repository/search_repository.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/schemas/__init__.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/schemas/base.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/schemas/delete.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/schemas/discovery.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/schemas/memory.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/schemas/request.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/schemas/response.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/schemas/search.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/services/__init__.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/services/context_service.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/services/entity_service.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/services/exceptions.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/services/file_service.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/services/link_resolver.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/services/search_service.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/services/service.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/sync/__init__.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/sync/file_change_scanner.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/sync/sync_service.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/sync/utils.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/sync/watch_service.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/utils.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/api/conftest.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/api/test_knowledge_router.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/api/test_memory_router.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/api/test_resource_router.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/api/test_search_router.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/cli/test_import_memory_json.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/cli/test_status.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/cli/test_sync.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/conftest.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/edit_file_test.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/markdown/__init__.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/markdown/test_entity_parser.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/markdown/test_markdown_plugins.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/markdown/test_markdown_processor.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/markdown/test_observation_edge_cases.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/markdown/test_parser_edge_cases.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/markdown/test_relation_edge_cases.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/markdown/test_task_detection.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/mcp/conftest.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/mcp/test_tool_get_entity.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/mcp/test_tool_knowledge.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/mcp/test_tool_memory.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/mcp/test_tool_notes.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/mcp/test_tool_search.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/mcp/test_tool_utils.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/repository/test_entity_repository.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/repository/test_observation_repository.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/repository/test_relation_repository.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/repository/test_repository.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/schemas/test_memory_url.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/schemas/test_schemas.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/schemas/test_search.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/services/test_context_service.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/services/test_entity_service.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/services/test_file_service.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/services/test_link_resolver.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/services/test_search_service.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/sync/test_file_change_scanner.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/sync/test_sync_service.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/sync/test_watch_service.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/test_basic_memory.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/utils/test_file_utils.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/tests/utils/test_permalink_formatting.py +0 -0
- {basic_memory-0.2.5 → basic_memory-0.2.7}/uv.lock +0 -0
|
@@ -82,10 +82,9 @@ jobs:
|
|
|
82
82
|
- name: Build macOS installer
|
|
83
83
|
run: |
|
|
84
84
|
uv pip install -e ".[dev]"
|
|
85
|
-
|
|
86
|
-
uv run python setup.py bdist_mac
|
|
85
|
+
make installer-mac
|
|
87
86
|
# Remove quarantine attribute
|
|
88
|
-
xattr -dr com.apple.quarantine "
|
|
87
|
+
xattr -dr com.apple.quarantine "build/Basic Memory Installer.app"
|
|
89
88
|
|
|
90
89
|
- name: Zip macOS installer
|
|
91
90
|
run: |
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## v0.2.7 (2025-02-14)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## v0.2.6 (2025-02-14)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- Bump project patch version
|
|
12
|
+
([`01d4672`](https://github.com/basicmachines-co/basic-memory/commit/01d46727b40c24b017ea9db4b741daef565ac73e))
|
|
13
|
+
|
|
14
|
+
- Fix installer setup.py change ci to use make
|
|
15
|
+
([`3e78fcc`](https://github.com/basicmachines-co/basic-memory/commit/3e78fcc2c208d83467fe7199be17174d7ffcad1a))
|
|
16
|
+
|
|
17
|
+
|
|
4
18
|
## v0.2.5 (2025-02-14)
|
|
5
19
|
|
|
6
20
|
### Bug Fixes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: basic-memory
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
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
|
|
@@ -4,7 +4,18 @@ import sys
|
|
|
4
4
|
# Build options for all platforms
|
|
5
5
|
build_exe_options = {
|
|
6
6
|
"packages": ["json", "pathlib"],
|
|
7
|
-
"excludes": [
|
|
7
|
+
"excludes": [
|
|
8
|
+
"tkinter",
|
|
9
|
+
"unittest",
|
|
10
|
+
"email",
|
|
11
|
+
"html",
|
|
12
|
+
"http",
|
|
13
|
+
"xml",
|
|
14
|
+
"pydoc",
|
|
15
|
+
"_tkinter",
|
|
16
|
+
"test"
|
|
17
|
+
],
|
|
18
|
+
"include_msvcr": False,
|
|
8
19
|
}
|
|
9
20
|
|
|
10
21
|
# Platform-specific options
|
|
@@ -14,18 +25,16 @@ if sys.platform == "win32":
|
|
|
14
25
|
"include_msvcr": True, # Include Visual C++ runtime
|
|
15
26
|
})
|
|
16
27
|
target_name = "Basic Memory Installer.exe"
|
|
17
|
-
icon = None # We'll add Windows icon later
|
|
18
28
|
else: # darwin
|
|
19
29
|
base = None # Don't use GUI base for macOS
|
|
20
30
|
target_name = "Basic Memory Installer"
|
|
21
|
-
icon = "Basic.icns"
|
|
22
31
|
|
|
23
32
|
executables = [
|
|
24
33
|
Executable(
|
|
25
34
|
script="installer.py",
|
|
26
35
|
target_name=target_name,
|
|
27
36
|
base=base,
|
|
28
|
-
icon=
|
|
37
|
+
icon="Basic.icns"
|
|
29
38
|
)
|
|
30
39
|
]
|
|
31
40
|
|
|
@@ -37,7 +46,7 @@ setup(
|
|
|
37
46
|
"build_exe": build_exe_options,
|
|
38
47
|
"bdist_mac": {
|
|
39
48
|
"bundle_name": "Basic Memory Installer",
|
|
40
|
-
"iconfile":
|
|
49
|
+
"iconfile": "Basic.icns"
|
|
41
50
|
}
|
|
42
51
|
},
|
|
43
52
|
executables=executables,
|
basic_memory-0.2.5/tasks.md
DELETED
|
@@ -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
|
|
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
|
{basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/cli/commands/import_memory_json.py
RENAMED
|
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
|
{basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/repository/observation_repository.py
RENAMED
|
File without changes
|
{basic_memory-0.2.5 → basic_memory-0.2.7}/src/basic_memory/repository/relation_repository.py
RENAMED
|
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
|
|
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
|