feat(ai-sdk): re-export 7-tool surface - #1433
Conversation
…ools Thin @supermemory/ai-sdk package now mirrors the canonical 7-tool surface with updated tests. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Claude finished @ved015's task in 1m 7s —— View job Code Review: feat(ai-sdk): re-export 7-tool surface
Overview: This PR replaces inline tool implementations in Issues found: Cursor Bugbot correctly identified that However, this bug exists in the base branch ( The other review comments are style nits:
No bugs introduced by this PR itself. The re-export is correct, tests are properly updated to skip without API keys, and the README documentation is comprehensive. Score: 9/10 The code change is clean and well-structured. One point deducted because the stack carries forward the |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9c3f84b. Configure here.
| export { | ||
| supermemoryTools, | ||
| searchMemoriesTool, | ||
| addMemoryTool, |
There was a problem hiding this comment.
Search ignores includeFullDocs
Medium Severity
Replacing the inline tools with re-exports from @supermemory/tools/ai-sdk changes searchMemories: the tool schema still accepts includeFullDocs, but the shared implementation never passes it to client.search, unlike the removed @supermemory/ai-sdk code that forwarded it to search. Callers and models cannot control full-document inclusion in results.
Reviewed by Cursor Bugbot for commit 9c3f84b. Configure here.
| const testApiKey = process.env.SUPERMEMORY_API_KEY as string | ||
| const testOpenAIKey = process.env.OPENAI_API_KEY as string |
There was a problem hiding this comment.
The variables testApiKey and testOpenAIKey use type assertions (as string) to cast string | undefined to string. According to the style guide rule on Type assertions and casting, unnecessary type assertions should be avoided and type annotations should be used instead of assertions for object literals. While this is not an object literal, the spirit of the rule is to prefer type annotations over assertions. More importantly, using as string here is unsafe — it suppresses the undefined possibility without a runtime check. Consider using a non-null assertion only after a guard, or restructuring so the type is narrowed properly (e.g., via a runtime check before assignment).
| const testApiKey = process.env.SUPERMEMORY_API_KEY as string | |
| const testOpenAIKey = process.env.OPENAI_API_KEY as string | |
| const testApiKey = process.env.SUPERMEMORY_API_KEY ?? (() => { throw new Error("SUPERMEMORY_API_KEY is not set") })() | |
| const testOpenAIKey = process.env.OPENAI_API_KEY ?? (() => { throw new Error("OPENAI_API_KEY is not set") })() | |
Spotted by Graphite (based on custom rule: TypeScript style guide (Google))
Is this helpful? React 👍 or 👎 to let us know.
acb8dc0 to
9c3f84b
Compare
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-mcp | ace3a76 | Aug 23 2026, 02:34 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-app | ace3a76 | Commit Preview URL Branch Preview URL |
Aug 23 2026, 02:36 PM |
There was a problem hiding this comment.
Overview: This PR replaces inline tool implementations in @supermemory/ai-sdk with re-exports from @supermemory/tools/ai-sdk, adding 5 new tools to the surface.
Issues found:
Cursor Bugbot correctly identified that includeFullDocs is accepted in the searchMemories schema but not passed to client.search() in packages/tools/src/ai-sdk.ts:59-65. I verified this — the parameter is destructured on line 55 but never used. This bug exists in the base branch (feat/tools-seven-tool-parity) and should be fixed in PR #1432, not here.
The re-export itself is correct — this PR simply surfaces whatever the shared package provides.
Score: 8/10
The code change is straightforward and the test coverage looks good. Fix the includeFullDocs bug in the base PR before merging this stack.
84e2149 to
9c3f84b
Compare
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>



Summary
@supermemory/tools/ai-sdkStacked on #1432
Test plan
bun run test:unitinpackages/ai-sdkMade with Cursor