supermemory/packages/tools/test
Rikinshah787 0efc7b9d33 fix(tools): handle the memory tool commands Claude actually sends
Three places where ClaudeMemoryTool diverges from the documented
memory_20250818 wire format:

- rename sends old_path/new_path, not path. handleCommand validated
  command.path, so every rename coming from a real model died with
  "Cannot read properties of undefined (reading 'startsWith')".
  path is still accepted as the source for existing callers.
- insert_line means "insert after this line" (0 = top of file), but we
  spliced at insertLine - 1 and rejected 0, so every insert landed one
  line above where Claude asked and inserting at the top was impossible.
- str_replace with new_str omitted is a deletion per the spec; we
  rejected it.

The new tests mock the supermemory client so they run without an API
key. Also fixed the rename example in the docs, which showed the same
path shape the code expected.
2026-10-12 13:43:04 -07:00
..
ai-sdk-compat fix(tools): save AI SDK 7 images and keep provider peer optional (3.1.1) (#1796) 2026-10-12 13:39:50 -07:00
chatapp feat(tools)!: @supermemory/tools 3.0 on the v5 API, retire @supermemory/ai-sdk (#1773) 2026-10-06 17:03:47 +00:00
mastra feat(tools)!: @supermemory/tools 3.0 on the v5 API, retire @supermemory/ai-sdk (#1773) 2026-10-06 17:03:47 +00:00
with-supermemory feat(tools)!: @supermemory/tools 3.0 on the v5 API, retire @supermemory/ai-sdk (#1773) 2026-10-06 17:03:47 +00:00
ai-sdk-test.ts feat(tools)!: @supermemory/tools 3.0 on the v5 API, retire @supermemory/ai-sdk (#1773) 2026-10-06 17:03:47 +00:00
anthropic-example.ts feat(tools)!: @supermemory/tools 3.0 on the v5 API, retire @supermemory/ai-sdk (#1773) 2026-10-06 17:03:47 +00:00
claude-memory-commands.test.ts fix(tools): handle the memory tool commands Claude actually sends 2026-10-12 13:43:04 -07:00
claude-memory-examples.ts feat(tools)!: @supermemory/tools 3.0 on the v5 API, retire @supermemory/ai-sdk (#1773) 2026-10-06 17:03:47 +00:00
claude-memory-real-example.ts feat(tools)!: @supermemory/tools 3.0 on the v5 API, retire @supermemory/ai-sdk (#1773) 2026-10-06 17:03:47 +00:00
claude-memory.test.ts feat(tools)!: @supermemory/tools 3.0 on the v5 API, retire @supermemory/ai-sdk (#1773) 2026-10-06 17:03:47 +00:00
openai-middleware.unit.test.ts feat(tools)!: @supermemory/tools 3.0 on the v5 API, retire @supermemory/ai-sdk (#1773) 2026-10-06 17:03:47 +00:00
openai-responses-test.ts feat(tools)!: @supermemory/tools 3.0 on the v5 API, retire @supermemory/ai-sdk (#1773) 2026-10-06 17:03:47 +00:00
test-memory-tool.ts feat(tools)!: @supermemory/tools 3.0 on the v5 API, retire @supermemory/ai-sdk (#1773) 2026-10-06 17:03:47 +00:00
v5-fetch.ts feat(tools)!: @supermemory/tools 3.0 on the v5 API, retire @supermemory/ai-sdk (#1773) 2026-10-06 17:03:47 +00:00
voltagent.unit.test.ts feat(tools)!: @supermemory/tools 3.0 on the v5 API, retire @supermemory/ai-sdk (#1773) 2026-10-06 17:03:47 +00:00