fix: update search() return type to match v3 response format

Change TS client search() return type from Promise<Array<Memory>>
to Promise<{ results: Array<Memory> }> to match v3 API envelope.
Update unit test mocks to return {results: []} and fix assertions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Soumil Rathi
2026-04-13 13:19:26 -07:00
co-authored by Claude Opus 4.6
parent 7f19c499ca
commit 7c313add10
2 changed files with 30 additions and 12 deletions
+1 -1
View File
@@ -280,7 +280,7 @@ export default class MemoryClient {
async search(
query: string,
options?: SearchMemoryOptions,
): Promise<Array<Memory>> {
): Promise<{ results: Array<Memory> }> {
if (this.telemetryId === "") await this.ping();
const payloadKeys = Object.keys(options || {});
this._captureEvent("search", [payloadKeys]);