-
Notifications
You must be signed in to change notification settings - Fork 192
feat: Implement API v2 with ID-based endpoints (Phase 1) #441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 17 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
6329d05
feat: Implement API v2 with ID-based endpoints and v1 deprecation (Ph…
jope-bm f799ffb
fix: Complete v2 API project ID implementation
jope-bm d683a0e
feat: Add v2 project management endpoints
jope-bm 8b339e4
test: Add comprehensive tests for v2 API endpoints
jope-bm d6d238c
feat: Add PostgreSQL database backend support (#439)
phernandez 86ef63c
fix: Use create_search_repository factory for v2 API
jope-bm 95862c0
fix: Normalize path comparison in v2 project router test for Windows
jope-bm 23ecfbd
feat: Add v2 memory, search, and resource routers with tests
jope-bm fdb7da3
fix: Update v2 memory router tests - replace 'entities' with 'results'
jope-bm 82c2ba3
fix: Fix v2 API test failures and add numeric ID support
jope-bm 3f90e87
security: Add path traversal protection to v2 resource router
jope-bm a3800bc
security: Add path traversal protection to v1 resource router
jope-bm 8b65d31
revert: Remove v1 resource router security changes
jope-bm 3de403c
refactor: Remove deprecation middleware and metrics
jope-bm 659b67e
refactor: Remove unused deprecation middleware files
jope-bm 39719be
try to make sure claude always signs commits
jope-bm de78e23
fix: Handle Windows line endings and paths in tests
jope-bm c1e4b4e
Merge branch 'main' into feature/api-v2-migration
jope-bm 897f43e
fix: Export all v2 routers from v2 module
jope-bm 02482a7
fix: Use EntityResponseV2 in v2 knowledge router endpoints
jope-bm bb64d87
test: Update v2 knowledge router tests to verify id field is returned
jope-bm 1a2d073
feat: Fix v2 API path structure and add directory endpoints
jope-bm 94c56af
feat: Redesign v2 resource endpoints to use entity IDs
jope-bm 8ae3e90
fix: Handle missing 'name' field in Claude conversations import
jope-bm e1174f3
feat: Add v2 prompt endpoints for continue-conversation and search
jope-bm 887da3f
feat: Add v2 import endpoints for ChatGPT, Claude, and memory JSON
jope-bm 231c795
feat: Add database IDs to all V2 API entity responses
jope-bm 2bdcd74
fix: Correct V2 move endpoint to use entity ID in URL path
jope-bm 7ef7d7f
Merge branch 'main' into feature/api-v2-migration
phernandez b16b9d9
Merge branch 'main' into feature/api-v2-migration
phernandez 0f34994
update from main, fix search_index for postgres
phernandez c19b96f
Merge branch 'feature/api-v2-migration' of github.com:basicmachines-c…
phernandez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Basic Memory Environment Variables Example | ||
| # Copy this file to .env and customize as needed | ||
| # Note: .env files are gitignored and should never be committed | ||
|
|
||
| # ============================================================================ | ||
| # PostgreSQL Test Database Configuration | ||
| # ============================================================================ | ||
| # These variables allow you to override the default test database credentials | ||
| # Default values match docker-compose-postgres.yml for local development | ||
| # | ||
| # Only needed if you want to use different credentials or a remote test database | ||
| # By default, tests use: postgresql://basic_memory_user:dev_password@localhost:5433/basic_memory_test | ||
|
|
||
| # Full PostgreSQL test database URL (used by tests and migrations) | ||
| # POSTGRES_TEST_URL=postgresql+asyncpg://basic_memory_user:dev_password@localhost:5433/basic_memory_test | ||
|
|
||
| # Individual components (used by justfile postgres-reset command) | ||
| # POSTGRES_USER=basic_memory_user | ||
| # POSTGRES_TEST_DB=basic_memory_test | ||
|
|
||
| # ============================================================================ | ||
| # Production Database Configuration | ||
| # ============================================================================ | ||
| # For production use, set these in your deployment environment | ||
| # DO NOT use the test credentials above in production! | ||
|
|
||
| # BASIC_MEMORY_DATABASE_BACKEND=postgres # or "sqlite" | ||
| # BASIC_MEMORY_DATABASE_URL=postgresql+asyncpg://user:password@host:port/database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,4 +52,5 @@ ENV/ | |
|
|
||
| # claude action | ||
| claude-output | ||
| **/.claude/settings.local.json | ||
| **/.claude/settings.local.json | ||
| .mcp.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Docker Compose configuration for Basic Memory with PostgreSQL | ||
| # Use this for local development and testing with Postgres backend | ||
| # | ||
| # Usage: | ||
| # docker-compose -f docker-compose-postgres.yml up -d | ||
| # docker-compose -f docker-compose-postgres.yml down | ||
|
|
||
| services: | ||
| postgres: | ||
| image: postgres:17 | ||
| container_name: basic-memory-postgres | ||
| environment: | ||
| # Local development/test credentials - NOT for production | ||
| # These values are referenced by tests and justfile commands | ||
| POSTGRES_DB: basic_memory | ||
| POSTGRES_USER: basic_memory_user | ||
| POSTGRES_PASSWORD: dev_password # Simple password for local testing only | ||
| ports: | ||
| - "5433:5432" | ||
| volumes: | ||
| - postgres_data:/var/lib/postgresql/data | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "pg_isready -U basic_memory_user -d basic_memory"] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 5 | ||
| restart: unless-stopped | ||
|
|
||
| volumes: | ||
| # Named volume for Postgres data | ||
| postgres_data: | ||
| driver: local | ||
|
|
||
| # Named volume for persistent configuration | ||
| # Database will be stored in Postgres, not in this volume | ||
| basic-memory-config: | ||
| driver: local | ||
|
|
||
| # Network configuration (optional) | ||
| # networks: | ||
| # basic-memory-net: | ||
| # driver: bridge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.