phernandez
6f99d2e551
perf: lightweight permalink resolution to avoid eager loading
...
Add optimized repository methods for resolve_permalink() that skip
eager loading of observations and relations:
- permalink_exists(): Check existence without loading entity
- get_file_path_for_permalink(): Get only file_path column
- get_permalink_for_file_path(): Get only permalink column
- get_all_permalinks(): Get all permalinks as strings
- get_permalink_to_file_path_map(): Bulk lookup mapping
- get_file_path_to_permalink_map(): Reverse mapping
Updated entity_service.resolve_permalink() to use these lightweight
methods instead of loading full entities with all relationships.
Also added logfire instrumentation to markdown utils.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-30 14:34:31 -06:00
phernandez
73d940e064
fix: observation parsing and permalink limits ( #446 )
...
1. Hashtag detection now checks for standalone words starting with #
instead of just checking if # appears anywhere in content.
This prevents HTML color codes like #4285F4 from being
interpreted as hashtags.
2. Observation permalinks now truncate content to 200 chars
to stay under PostgreSQL's btree index limit of 2704 bytes.
Added tests for both fixes.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-30 00:12:04 -06:00
phernandez
c3678a11d2
truncate content_stems to fix Postgres 8KB index row limit
...
Large documents (like ~1MB conversation imports) exceed Postgres's 8KB
index row limit, causing ProgramLimitExceededError. Truncate content_stems
to 6000 characters (with headroom for other columns) before indexing.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-29 20:23:09 -06:00
phernandez
203d684c24
fix integrity error handling when setting forward relation refs
...
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-29 19:03:12 -06:00
phernandez
a872220924
disable pooling for postgres db
...
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-29 13:24:47 -06:00
phernandez
7d763a66ff
use entity.mtime for updated at in api
...
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-29 13:21:58 -06:00
phernandez
b5d4fb559c
fix: postgres/neon connection settings and search index dedupe
...
- Reduce db_pool_recycle from 3600s to 180s for Neon scale-to-zero
- Add connect_args for Neon serverless (statement cache, timeouts, app name)
- Dedupe observation permalinks in search indexing to avoid unique constraint violations
- Add tests for duplicate observation permalink handling
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-29 11:24:08 -06:00
phernandez
830775276d
remove record_return=True from logfire spans
...
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-28 18:36:09 -06:00
phernandez
ed894fc3ed
get db pool sizes from config
...
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-28 16:50:57 -06:00
phernandez
704338edcf
remove logfire.instrument_fastapi(app) from app.py
...
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-28 13:52:18 -06:00
phernandez
0ca02a7ebe
add logfire instrumentation to services and repository code
...
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-28 12:47:29 -06:00
jope-bm
28cc5225a7
feat: Implement API v2 with ID-based endpoints (Phase 1) ( #441 )
...
Signed-off-by: Joe P <joe@basicmemory.com >
Signed-off-by: phernandez <paul@basicmachines.co >
Signed-off-by: Claude <noreply@anthropic.com >
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: Paul Hernandez <60959+phernandez@users.noreply.github.com >
Co-authored-by: phernandez <paul@basicmachines.co >
2025-11-27 10:35:55 -06:00
phernandez
9b7bbc7116
formatting and logic change to resolve_relations, remove fuzzy search
2025-11-25 22:54:37 -06:00
phernandez
138c283d6c
add postgres db type
2025-11-25 20:25:56 -06:00
phernandez
7a8954c37e
add extra logic for cloud-indexing improvements
2025-11-25 13:52:58 -06:00
phernandez
10c7c19c03
fix db url for sqlite migrations
...
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-21 13:21:20 -06:00
Paul Hernandez
fb5e9e1d77
feat: Add PostgreSQL database backend support ( #439 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: Claude <noreply@anthropic.com >
2025-11-20 11:20:29 -06:00
phernandez
66b91b2847
ci: Add PostgreSQL testing to GitHub Actions workflow
...
Add Postgres service container and separate test step for PostgreSQL backend testing.
The Postgres tests only run on Linux runners since GitHub Actions service containers
are only available on Linux.
- Add postgres:17 service container with health checks
- Add 'Run tests (Postgres)' step with Linux-only condition
- Rename existing test step to 'Run tests (SQLite)' for clarity
This enables CI testing of dual database backend support introduced in the
postgres-support feature branch.
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-18 12:25:18 -06:00
Cedric Hurst
b004565df9
fix: handle periods in kebab_filenames mode ( #424 )
2025-11-18 06:49:55 -05:00
Drew Cain
a258b73e1d
chore: update version to 0.16.2 for v0.16.2 release
v0.16.2
2025-11-16 21:30:59 -06:00
Drew Cain
9a845f2906
docs: prepare for v0.16.2 release
2025-11-16 21:28:13 -06:00
Drew Cain
6517e9845f
fix: Use platform-native path separators in config.json ( #429 )
...
Signed-off-by: Drew Cain <groksrc@gmail.com >
Co-authored-by: Claude <noreply@anthropic.com >
2025-11-13 09:12:26 -06:00
Drew Cain
1af05392ee
fix: Add rclone installation checks for Windows bisync commands ( #427 )
2025-11-12 14:22:14 -06:00
Brandon Mayes
cad7019c89
fix: main project always recreated on project list command ( #421 )
2025-11-12 09:57:08 -05:00
phernandez
099c334e3d
chore: update version to 0.16.1 for v0.16.1 release
v0.16.1
2025-11-11 09:21:47 -06:00
phernandez
7685586178
docs: Add v0.16.1 CHANGELOG entry for Windows line ending fix
...
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-11 09:10:26 -06:00
Paul Hernandez
e9d0a944a9
fix: Handle Windows line endings in rclone bisync ( #422 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-11 09:08:20 -06:00
phernandez
caf3c14bb1
chore: update version to 0.16.0 for v0.16.0 release
v0.16.0
2025-11-10 19:19:48 -06:00
phernandez
c5d9067754
docs: Add v0.16.0 CHANGELOG entry with comprehensive release notes
...
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-10 19:17:29 -06:00
phernandez
e0fc59ea97
style: Format upload.py for better readability
...
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-10 19:15:03 -06:00
Paul Hernandez
49b2adc35c
fix: skip archive files during cloud upload ( #420 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
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:04:49 -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
f0d7398815
fix: Quote string values in YAML frontmatter to handle special characters ( #418 )
...
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: Paul Hernandez <phernandez@users.noreply.github.com >
2025-11-10 18:13:48 -06:00
Paul Hernandez
581b7b17c6
fix: Add explicit type annotations to MCP tool parameters ( #394 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com >
2025-11-10 17:02:17 -06:00
Paul Hernandez
d775f7bab9
fix: Simplify search_notes schema by removing Optional wrappers ( #395 )
...
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com >
2025-11-10 16:30:59 -06:00
Drew Cain
fc01f6abaf
fix: Replace Unicode arrows with ASCII for Windows compatibility ( #414 )
2025-11-10 16:30:41 -06:00
Paul Hernandez
4614fd09d5
fix: Handle dict objects in write_resource endpoint ( #415 )
...
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com >
2025-11-10 16:30:27 -06:00
phernandez
0d4ad7bbf0
remove v0.15.0 info from assistant-guide
...
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-10 16:25:49 -06:00
jope-bm
7ccec7eba2
feat: Add run_in_background parameter to sync endpoint with tests ( #417 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-11-07 09:04:43 -07:00
Paul Hernandez
021af74545
fix: Strip duplicate headers in edit_note replace_section ( #396 )
...
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Drew Cain <groksrc@users.noreply.github.com >
2025-11-02 14:20:11 -06:00
phernandez
2ad0ee9d5d
fix: Use force_full=true for database sync after project sync/bisync
...
After rclone synchronizes files between local and cloud storage, the
database needs to perform a full scan to ensure it captures all changes.
Previously, incremental sync (watermark optimization) could miss files
that were changed remotely.
Changes:
- project sync command now calls /project/sync?force_full=true
- project bisync command now calls /project/sync?force_full=true
- Ensures complete database refresh after file synchronization
This guarantees the database is fully in sync with the filesystem
after any rclone sync or bisync operation.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
Signed-off-by: phernandez <paul@basicmachines.co >
2025-11-02 13:26:08 -06:00
Brandon Mayes
c9946ecf1e
fix: Various rclone fixes for cloud sync on Windows ( #410 )
...
Signed-off-by: Brandon Mayes <5610870+bdmayes@users.noreply.github.com >
Signed-off-by: Paul Hernandez <60959+phernandez@users.noreply.github.com >
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: Paul Hernandez <60959+phernandez@users.noreply.github.com >
Co-authored-by: phernandez <paul@basicmachines.co >
2025-11-02 11:26:57 -06:00
Drew Cain
0ba6f219f1
fix: Windows CLI Unicode encoding errors ( #411 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Signed-off-by: Claude <noreply@anthropic.com >
Signed-off-by: Paul Hernandez <60959+phernandez@users.noreply.github.com >
Co-authored-by: phernandez <paul@basicmachines.co >
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: Paul Hernandez <60959+phernandez@users.noreply.github.com >
2025-11-02 10:20:48 -06:00
Paul Hernandez
0b3272ae6e
feat: SPEC-20 Simplified Project-Scoped Rclone Sync ( #405 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Signed-off-by: Claude <noreply@anthropic.com >
Co-authored-by: Claude <noreply@anthropic.com >
2025-11-02 09:35:26 -06:00
Paul Hernandez
a7d7cc5ee6
fix: Normalize YAML frontmatter types to prevent AttributeError ( #236 ) ( #402 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: Claude <noreply@anthropic.com >
2025-10-27 09:19:50 -05:00
Paul Hernandez
a7e696b039
Add free trial information to README
...
Added information about a 7-day free trial.
Signed-off-by: Paul Hernandez <60959+phernandez@users.noreply.github.com >
2025-10-24 10:05:11 -05:00
Paul Hernandez
8aaddb6d45
Add free trial information to README
...
Added information about a 7-day free trial to the README.
Signed-off-by: Paul Hernandez <60959+phernandez@users.noreply.github.com >
2025-10-24 10:04:41 -05:00
Paul Hernandez
d7565312fc
Announce Basic Memory Cloud launch in README
...
Added a section announcing the launch of Basic Memory Cloud with details on cross-device support and early supporter pricing.
Signed-off-by: Paul Hernandez <60959+phernandez@users.noreply.github.com >
2025-10-24 09:53:14 -05:00
Paul Hernandez
c7e6eab02f
feat: Add delete_notes parameter to remove project endpoint ( #391 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: Claude <noreply@anthropic.com >
2025-10-21 14:09:20 -05:00
Paul Hernandez
bb8da31472
fix: Handle null, empty, and string 'None' title in markdown frontmatter ( #387 ) ( #389 )
...
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com >
2025-10-21 09:29:19 -05:00