feat(tools): apiKey option, type re-exports, and two reliability fixes - #1594
Conversation
How to use the Graphite Merge QueueAdd the label Main to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
2d19164 to
5b10659
Compare
|
Claude finished @MaheshtheDev's task in 1m 36s —— View job Review Complete
Result: No issues found. All four changes are correctly implemented — |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-mcp | e4afc77 | Aug 24 2026, 10:41 PM |
There was a problem hiding this comment.
Overview: Cherry-picks four contributor fixes into @supermemory/tools v2.2.0, adding options.apiKey support, type re-exports, malformed tool-call handling, and an awaited VoltAgent conversation save.
Issues found: None — this looks good to ship.
Details:
-
apiKeyoption — Correctly threads through the existingvalidateApiKeyhelper which falls back toprocess.env.SUPERMEMORY_API_KEY. The double validation inwithSupermemory→createOpenAIMiddlewareis mildly redundant but not incorrect. -
Type re-exports — Clean fix for the documented custom-template example that referenced unexported types from the non-published
./vercelsubpath. -
Malformed JSON handling (
tools.ts) — Good defensive change. Returns a structured error result instead of throwing, preventing unhandled exceptions from corrupted tool arguments. -
VoltAgent
onEndawait — Correct fix for serverless reliability. The outer try-catch preserves error logging, so behavior is equivalent except the save is now guaranteed to complete before the handler returns.
Score: 10/10
Merge activity
|
#1594) Cherry-picks four contributor PRs for `@supermemory/tools` onto one branch, and bumps the package to 2.2.0. - #1244 (@rajarshidattapy): `withSupermemory` accepts `options.apiKey` instead of only reading `SUPERMEMORY_API_KEY`, matching the Vercel, Mastra and Voltagent integrations. Unblocks secrets managers, edge runtimes and per-request keys. - #1574 (@Agnik47): re-exports `PromptTemplate`, `MemoryPromptData` and `WithSupermemoryOptions` from `ai-sdk`. `./vercel` is not a published subpath, so the documented custom-template example did not compile. - #1488 (@abhinav7x94): malformed tool-call JSON returns an error result instead of throwing out of the request. - #1507 (@abhinav7x94): VoltAgent `onEnd` awaits the conversation save, which was fire-and-forget and could be dropped when a serverless runtime tore down. Dropped the `middleware.test.ts` added by #1244. Note that editing `packages/tools/package.json` triggers the npm publish workflow on merge. Co-Authored-By: rajarshidattapy <138959719+rajarshidattapy@users.noreply.github.com> Co-Authored-By: Agnik47 <140933190+Agnik47@users.noreply.github.com> Co-Authored-By: abhinav7x94 <204053250+abhinav7x94@users.noreply.github.com>
5b10659 to
e4afc77
Compare

Cherry-picks four contributor PRs for
@supermemory/toolsonto one branch, and bumps the package to 2.2.0.withSupermemoryacceptsoptions.apiKeyinstead of only readingSUPERMEMORY_API_KEY, matching the Vercel, Mastra and Voltagent integrations. Unblocks secrets managers, edge runtimes and per-request keys.PromptTemplate,MemoryPromptDataandWithSupermemoryOptionsfromai-sdk../vercelis not a published subpath, so the documented custom-template example did not compile.onEndawaits the conversation save, which was fire-and-forget and could be dropped when a serverless runtime tore down.Dropped the
middleware.test.tsadded by #1244. Note that editingpackages/tools/package.jsontriggers the npm publish workflow on merge.Co-Authored-By: rajarshidattapy 138959719+rajarshidattapy@users.noreply.github.com
Co-Authored-By: Agnik47 140933190+Agnik47@users.noreply.github.com
Co-Authored-By: abhinav7x94 204053250+abhinav7x94@users.noreply.github.com