phernandez
74e6afdc0f
fix: create search_vector_chunks in test fixtures for Postgres compatibility
...
Embedding status tests were creating search_vector_chunks inline using
SQLite-only DDL (AUTOINCREMENT). Added Postgres DDL constants to
models/search.py and wired them into the test fixture so both backends
create the table at setup time — matching what the Alembic migration
does in production.
Also fixed stub search_vector_embeddings to use chunk_id (Postgres
column name) instead of rowid, and added inter-test cleanup to prevent
ordering-dependent failures.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
Signed-off-by: phernandez <paul@basicmachines.co >
2026-02-25 17:30:35 -06:00
jope-bm
da4d369c32
feat: add created_by and last_updated_by user tracking to Entity ( #602 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-23 11:20:59 -07: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
07778790d3
feat: add semantic vector search for SQLite and Postgres ( #550 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Signed-off-by: bm-clawd <clawd@basicmemory.com >
Co-authored-by: bm-clawd <clawd@basicmemory.com >
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-12 15:44:47 -06:00
Paul Hernandez
863e0a4e24
fix: prevent CLI commands from hanging on exit (Python 3.14) ( #505 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-11 16:47:35 -06:00
jope-bm
a4000f64ce
feat: add stable external_id (UUID) to Project and Entity models ( #485 )
...
Signed-off-by: Joe P <joe@basicmemory.com >
Signed-off-by: Paul Hernandez <60959+phernandez@users.noreply.github.com >
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com >
Co-authored-by: Paul Hernandez <60959+phernandez@users.noreply.github.com >
Co-authored-by: phernandez <paul@basicmachines.co >
2026-01-02 13:00:35 -06:00
phernandez
4ce21984a4
fix: use upsert to prevent IntegrityError during parallel search indexing
...
Replace delete-then-insert pattern with INSERT ... ON CONFLICT for
PostgreSQL search index operations. This fixes race conditions where
parallel entity indexing could cause UniqueViolationError on the
uix_search_index_permalink_project constraint.
Changes:
- Add index_item() override in PostgresSearchRepository with upsert
- Update bulk_index_items() to use ON CONFLICT (permalink, project_id)
- Add CREATE_POSTGRES_SEARCH_INDEX_PERMALINK DDL for test fixtures
- Add tests for upsert behavior on duplicate permalinks
Technical note: Use column-based ON CONFLICT syntax instead of
ON CONSTRAINT (which only works for table constraints, not indexes).
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
Signed-off-by: phernandez <paul@basicmachines.co >
2025-12-30 21:55:43 -06:00
Paul Hernandez
4a43d7df4a
remove logfire instrumentation
...
Signed-off-by: phernandez <paul@basicmachines.co >
2025-12-13 15:22:14 -06:00
phernandez
391feb639f
add delete cascade to entity to delete search_index (postgres only)
...
Signed-off-by: phernandez <paul@basicmachines.co >
2025-12-02 10:04:21 -06:00
phernandez
a920a9ff29
feat: Add project_id to Relation and Observation for efficient project-scoped queries
...
Denormalizes project_id onto Relation and Observation tables to enable
efficient project-scoped queries without joins. Migration backfills
from associated entity and adds pg_trgm extension with GIN indexes
for fuzzy link resolution on PostgreSQL.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
Signed-off-by: phernandez <paul@basicmachines.co >
2025-12-01 21:54:56 -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
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
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
Paul Hernandez
e78345ff25
feat: Streaming Foundation & Async I/O Consolidation (SPEC-19) ( #384 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: Claude <noreply@anthropic.com >
2025-10-21 09:03:59 -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
jope-bm
cd7cee650f
fix: complete project management special character support ( #272 ) ( #279 )
...
Signed-off-by: Joe P <joe@basicmemory.com >
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: jope-bm <jope-bm@users.noreply.github.com >
Co-authored-by: Claude <noreply@anthropic.com >
2025-08-29 10:57:13 -06:00
jope-bm
2cd2a62f30
fix: Ensure all datetime operations return timezone-aware objects ( #268 )
...
Signed-off-by: Joe P <joe@basicmemory.com >
Co-authored-by: Claude <noreply@anthropic.com >
2025-08-22 13:43:55 -06:00
Drew Cain
752c78c379
chore: minor cleanup ( #228 )
...
Signed-off-by: Drew Cain <groksrc@gmail.com >
2025-07-31 21:32:56 -05:00
phernandez
d8c13bf1d3
fix project table unique constraint bug
...
Signed-off-by: phernandez <paul@basicmachines.co >
2025-06-03 14:23:15 -05:00
bm-claudeai
020957cd76
feat: Multi-project support, OAuth authentication, and major improvements ( #119 )
...
Signed-off-by: phernandez <paul@basicmachines.co >
Co-authored-by: phernandez <paul@basicmachines.co >
Co-authored-by: Claude <noreply@anthropic.com >
2025-05-25 10:07:34 -05:00
Paul Hernandez
f8078cdd46
Fix: Beta testing fixes ( #16 )
...
Co-authored-by: phernandez <phernandez@basicmachines.co >
2025-02-28 20:23:53 -06:00
Paul Hernandez
37a01b806d
feat: Incremental sync on watch ( #13 )
...
- incremental sync on watch
- sync non-markdown files in knowledge base
- experimental `read_resource` tool for reading non-markdown files in raw form (pdf, image)
2025-02-24 22:13:15 -06:00
phernandez
28513c8b8d
lint code
2025-02-12 22:39:22 -06:00
Paul Hernandez
5b4f0eafcc
Pre release fixups ( #5 )
...
* configure logging
* set mcp output logging also
* fix type check errors
* fix type check
* rename Permalink schema type
* fix type errors
* add typechecks to ci workflow
* pytest coverage setup
* add tests for status cli
* sync tests coverage
* watch_service test coverage
* tests for tool_utils.py
* clean up imports
* file_utils coverage
* markdown plugins coverage
* 99% test coverage
* more test coverage, remove ObservationCategory
* more tool coverage
* fix type-check
* format, upgrade deps
---------
Co-authored-by: phernandez <phernandez@basicmachines.co >
2025-02-12 08:23:10 -06:00
phernandez
ffbd091ad3
add db check at startup
2025-02-07 16:03:31 -06:00
phernandez
e2882dbf84
add schema version model
2025-02-07 14:56:01 -06:00
phernandez
2ef48bb34c
db_version_service
2025-02-06 21:22:48 -06:00
phernandez
c2aa947be9
remove observation, relation services
2025-01-27 17:01:34 -06:00
phernandez
18bd850019
fix updates and save content. remove entity.summary
2025-01-26 00:00:37 -06:00
phernandez
9f35f8b8d2
fix unresolved links on sync
2025-01-22 22:37:34 -06:00
phernandez
bd1d91081e
use dates from frontmatter on sync
2025-01-22 17:03:21 -06:00
phernandez
220914879b
delete relations/observations from search_index on delete entity during sync
2025-01-22 15:30:57 -06:00
phernandez
32606d771d
fix tests for context and permalinks
2025-01-18 23:54:28 -06:00
phernandez
d65fca0a3c
fixes for sync
2025-01-18 20:04:45 -06:00
phernandez
e2a4fa63e5
fix context_service tests
2025-01-16 22:38:19 -06:00
phernandez
a509ef1e2a
add pattern match to search index, index permalink
2025-01-15 16:02:53 -06:00
phernandez
73e8c5bee7
add relations and observations to search index
2025-01-14 19:06:00 -06:00
phernandez
9dff24746d
index relations and observations
2025-01-14 18:14:24 -06:00
phernandez
ef13b3b30a
refactor sync to use link_resolver
2025-01-13 22:31:32 -06:00
phernandez
44221e3f78
search testing wip
2025-01-12 21:27:18 -06:00
phernandez
abe80f74b2
revert search service changes
2025-01-12 19:56:35 -06:00
phernandez
bdedf53566
add link_resolver.py
2025-01-12 17:44:26 -06:00
phernandez
c5d21276de
change entity.path_id to entity.permalink
2025-01-12 16:47:21 -06:00
phernandez
761fb708c6
rename entity.name to entity.title
2025-01-12 12:50:03 -06:00
phernandez
621154eaec
add tags to observation
2025-01-09 23:36:31 -06:00
phernandez
1c6836d83f
fix tests
2025-01-07 20:29:59 -06:00
phernandez
6686c331a5
refactor entity.entity_type to be freeform, add summary and content_type
2025-01-07 19:00:08 -06:00
phernandez
545c1a77f3
remove document code
2025-01-07 00:20:11 -06:00
phernandez
ea359d2484
update entity/repostitory/service
2025-01-06 18:57:04 -06:00
phernandez
905ff78aea
search service implementation
2025-01-04 16:37:02 -06:00