Skip to content

Rust Backend: Memory API endpoints#50

Merged
AvivK5498 merged 3 commits into
mainfrom
bd-beads-kanban-ui-t25.1
Jan 27, 2026
Merged

Rust Backend: Memory API endpoints#50
AvivK5498 merged 3 commits into
mainfrom
bd-beads-kanban-ui-t25.1

Conversation

@AvivK5498

Copy link
Copy Markdown
Owner

Closes beads-kanban-ui-t25.1

Add memory API endpoints to the Rust server for reading, editing, archiving, and deleting knowledge.jsonl entries. Endpoints: GET /api/memory, GET /api/memory/stats, PUT /api/memory, DELETE /api/memory. See design doc .designs/beads-kanban-ui-t25.md for full API contract, Rust types, and implementation notes. Follow existing beads.rs JSONL read-modify-write pattern. Apply validate_path_security to all endpoints.

AvivK5498 and others added 3 commits January 23, 2026 19:27
Change from non-existent @anthropic/mcp-server-github to the correct
@modelcontextprotocol/server-github package.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add 4 new Axum route handlers in server/src/routes/memory.rs:
- GET /api/memory - list all knowledge entries with stats
- GET /api/memory/stats - lightweight stats-only endpoint
- PUT /api/memory - edit entry content/tags by key
- DELETE /api/memory - remove or archive entry by key

Follows existing JSONL read-modify-write pattern from beads.rs.
Includes path security validation, graceful handling of missing
files and malformed lines, and 12 unit tests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change knowledge_path() and archive_path() signatures from &PathBuf
to &Path to satisfy clippy::ptr_arg lint. Callers auto-deref so no
other changes needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@AvivK5498 AvivK5498 merged commit dcf329a into main Jan 27, 2026
2 checks passed
AvivK5498 added a commit that referenced this pull request Jan 27, 2026
* fix: correct MCP server-github package name

Change from non-existent @anthropic/mcp-server-github to the correct
@modelcontextprotocol/server-github package.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(server): add Memory API endpoints for knowledge base CRUD

Add 4 new Axum route handlers in server/src/routes/memory.rs:
- GET /api/memory - list all knowledge entries with stats
- GET /api/memory/stats - lightweight stats-only endpoint
- PUT /api/memory - edit entry content/tags by key
- DELETE /api/memory - remove or archive entry by key

Follows existing JSONL read-modify-write pattern from beads.rs.
Includes path security validation, graceful handling of missing
files and malformed lines, and 12 unit tests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(server): use &Path instead of &PathBuf in memory helper functions

Change knowledge_path() and archive_path() signatures from &PathBuf
to &Path to satisfy clippy::ptr_arg lint. Callers auto-deref so no
other changes needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Aviv Kaplan <AvivK5498@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant