Dennis Hempel
4fd9cae293
fix(mcp): resolve write_note overwrite conflicts by file_path strictly
...
`write_note(overwrite=True)` caught the 409 from create_entity and then
called `knowledge_client.resolve_entity(entity.permalink)` with the
default `strict=False`. In workspace-prefixed palaces the client-built
permalink omits the workspace slug, so exact permalink lookup misses
and the fuzzy fallback could pick an orphan row that shares tokens with
the canonical permalink. The update then wrote to the orphan, leaving
the canonical row stale. On the next overwrite the permalink uniqueness
check in `_resolve_schema_permalink` found duplicate rows and minted
`-1`/`-2` suffixes on the canonical entity, accumulating orphans on
every re-synthesis run.
The 409 came from a `file_service.exists(file_path)` check in
`prepare_create_entity_content`, so the file_path is the authoritative
key for the canonical row — no fuzzy matching needed. Resolve by
file_path with `strict=True`, POSIX-normalized so Windows clients send
the form the server stores.
Adds a regression test that spies on `resolve_entity` and asserts the
identifier and `strict` flag, plus checks that no `-1`/`-2` suffix is
minted under the canonical permalink.
Reported in basic-memory-bug-report Issue 1.
Signed-off-by: Dennis Hempel <uhg.dennnis@gmail.com >
2026-05-28 09:26:38 +02:00
Paul Hernandez
4cba7ba01c
fix(core): parse prose wikilinks as inline links ( #824 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
2026-05-14 11:43:11 -05:00
Paul Hernandez
052545b661
chore(core): make ty the default typechecker ( #736 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
2026-04-13 10:34:01 -05:00
Drew Cain
db60942267
fix(core): invalidate config cache when file is modified by another process ( #662 )
...
Signed-off-by: Drew Cain <groksrc@gmail.com >
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-10 23:05:55 -05:00
Paul Hernandez
bd5923a370
feat: add overwrite guard to write_note tool ( #632 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-27 16:12:38 -06:00
Paul Hernandez
c44291830c
chore: rename entity_type to note_type ( #600 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-22 20:28:57 -06:00
Paul Hernandez
9515130b2a
feat: upgrade fastmcp 2.12.3 to 3.0.1 with tool annotations ( #598 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-21 12:28:30 -06:00
Paul Hernandez
55d675e278
feat: min_similarity override, cloud promo improvements ( #570 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-16 16:44:02 -06:00
Paul Hernandez
545804f194
feat: Add project-prefixed permalinks and memory URL routing ( #544 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-13 17:45:50 -06:00
Paul Hernandez
0b2080114b
feat: add directory support to move_note and delete_note tools ( #518 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-26 19:52:10 -06:00
Paul Hernandez
1646572f69
fix: Rename write_note entity_type to note_type for clarity ( #419 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Signed-off-by: Paul Hernandez <60959+phernandez@users.noreply.github.com >
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com >
2025-11-10 19:02:50 -06:00
Paul Hernandez
a1d7792bdb
feat: Implement SPEC-6 Stateless Architecture for MCP Tools ( #298 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Signed-off-by: Paul Hernandez <60959+phernandez@users.noreply.github.com >
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: Drew Cain <groksrc@users.noreply.github.com >
2025-09-21 20:39:19 -05:00
jope-bm
ec2fa07350
chore: apply lint and formatting fixes for 0.14.4 release ( #290 )
...
Signed-off-by: Joe P <joe@basicmemory.com >
Co-authored-by: Claude <noreply@anthropic.com >
2025-09-05 10:00:52 -06:00
manuelbliemel
9aa40246a8
Addressed issues when running basic-memory on the Windows platform ( #252 )
...
Signed-off-by: Manuel Bliemel <manuel.bliemel@gmail.com >
2025-08-24 19:12:40 -07:00
jope-bm
a4a3b1b689
fix: handle missing 'name' key in memory JSON import ( #241 )
...
Signed-off-by: Joe P <joe@basicmemory.com >
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: jope-bm <jope-bm@users.noreply.github.com >
2025-07-28 14:52:15 -06:00
jope-bm
24a1d6195d
fix: path traversal security vulnerability in mcp tools ( #223 )
...
Signed-off-by: Joe P <joe@basicmemory.com >
2025-07-15 09:05:11 -06:00
Drew Cain
7be001ca68
fix: fastmcp deprecation warning ( #150 )
...
Signed-off-by: Drew Cain <groksrc@gmail.com >
Signed-off-by: Paul Hernandez <60959+phernandez@users.noreply.github.com >
Co-authored-by: Paul Hernandez <60959+phernandez@users.noreply.github.com >
2025-06-19 19:59:17 -05:00
Paul Hernandez
7789864493
fix: add entity_type parameter to write_note MCP tool ( #145 )
...
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com >
Co-authored-by: Claude <noreply@anthropic.com >
2025-06-18 17:10:15 -05:00
Drew Cain
c6215fd819
fix: UNIQUE constraint failed: entity.permalink issue #139 ( #140 )
...
Signed-off-by: Drew Cain <groksrc@users.noreply.github.com >
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Co-authored-by: phernandez <paul@basicmachines.co >
Co-authored-by: Claude <noreply@anthropic.com >
2025-06-18 15:03:11 -05:00
phernandez
35884ef3a7
fix: update MCP tool/prompt/resource calls to use .fn attribute
...
FastMCP library changes now require calling decorated functions via the .fn attribute:
- Tools: @mcp.tool() functions return FunctionTool, call with tool.fn()
- Prompts: @mcp.prompt() functions return FunctionPrompt, call with prompt.fn()
- Resources: @mcp.resource() functions return FunctionResource, call with resource.fn()
Updated core files:
- view_note.py: read_note() → read_note.fn()
- read_note.py: search_notes() → search_notes.fn() (2 locations)
- tool.py: 6 MCP tool calls updated to use .fn
- recent_activity.py: recent_activity() → recent_activity.fn()
- project.py: project_info() → project_info.fn() with type ignore
Updated 100+ test files systematically to use .fn attribute and fixed mock targets.
All 869 tests now pass. Fixes view_note tool error in Claude Desktop.
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-06-08 11:52:23 -05:00
Paul Hernandez
634486107b
feat: v0.13.0 pre ( #122 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: Claude <noreply@anthropic.com >
2025-06-03 01:00:40 -05:00
Paul Hernandez
3f4d9e4d87
fix: write_note preserves frontmatter fields in content ( #84 )
2025-04-06 18:39:51 -05:00
Paul Hernandez
617e60bda4
feat: permalink enhancements ( #82 )
...
- Avoiding "useless permalink values" for files without metadata
- Enable permalinks to be updated on move via config setting
2025-04-06 14:54:59 -05:00