Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 11, 2025

Add search-memory and export-memory by ID capability

This PR implements the ability to search and export memories by ID, enabling quick batch operations for LLM workflows.

Completed:

  • Add ids parameter to search-memory tool (MCP schema + CLI)
  • Add ids parameter to export-memory tool (MCP schema + CLI)
  • Implement ID-based search in MemoryService.search()
  • Update ExportFilters type to support ids parameter
  • Update export executor to handle ID filtering
  • Update all existing search() calls to match new signature
  • Verify existing tests still pass
  • Add comprehensive tests for search-by-id functionality
  • Add comprehensive tests for export-by-id functionality
  • Fix CLI parser to handle single ID values
  • Manually test CLI commands with new parameters
  • Update README and CHANGELOG documentation
  • Run security scan with codeql_checker (0 alerts)
  • Refactor ID search logic to use private helper method

Summary:

✅ All 15 tests passing
✅ No security vulnerabilities detected
✅ Documentation updated
✅ Manual CLI testing successful
✅ Code refactored per review feedback

The feature is complete and ready for use!

Original prompt

This section details on the original issue you should resolve

<issue_title>search-memory, export-memory by id</issue_title>
<issue_description>We should allow an optional search by id to allow quick batch operations.
Use case: Wanted to export a set of memories but query was limited to text or tags and not all memories matched.

Allowing by id allows the llm to create a batch of ids that can be used to export or search.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits November 11, 2025 14:17
Co-authored-by: chrisribe <1999791+chrisribe@users.noreply.github.com>
Co-authored-by: chrisribe <1999791+chrisribe@users.noreply.github.com>
Co-authored-by: chrisribe <1999791+chrisribe@users.noreply.github.com>
Co-authored-by: chrisribe <1999791+chrisribe@users.noreply.github.com>
Copilot AI changed the title [WIP] Add optional search and export by memory id Add ID-based filtering to search-memory and export-memory Nov 11, 2025
Copilot AI requested a review from chrisribe November 11, 2025 14:37
Copilot finished work on behalf of chrisribe November 11, 2025 14:37
}

const placeholders = ids.map(() => '?').join(',');
const stmt = this.db.prepare(`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot please use this.stmts pattern add this query there so everything is in the same place

Co-authored-by: chrisribe <1999791+chrisribe@users.noreply.github.com>
Copilot AI requested a review from chrisribe November 12, 2025 03:43
Copilot finished work on behalf of chrisribe November 12, 2025 03:43
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.

search-memory, export-memory by id

2 participants