refactor mastra to object-based API (v2.0.0)#829
refactor mastra to object-based API (v2.0.0)#829sreedharsreeram wants to merge 4 commits intomainfrom
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-mcp | e32f66a | Apr 14 2026, 03:02 PM |
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. |
|
Claude finished @sreedharsreeram's task in 1m 26s —— View job Review Complete
Result: No issues found — this PR is ready to ship. This refactor cleanly migrates the Mastra integration to an object-based API with proper validation. The dead code issue in |
There was a problem hiding this comment.
Overview: Refactors Mastra integration from positional arguments (containerTag, options) to a single object-based API with containerTag and conversationId as required properties.
Issues found: None — this looks good to ship.
Details:
- Clean API migration:
threadId→conversationId, both now required with proper validation - Input validation is thorough (checks empty strings, whitespace)
getEffectiveConversationIdstill supports fallback to Mastra'sRequestContextfor flexibility- Tests comprehensively updated to match new API
- No security concerns, no race conditions, no breaking logic changes
Score: 10/10
This is a well-executed breaking change with good validation and error messages. The object-based API is cleaner and more explicit about required parameters.
66b2183 to
090ad8f
Compare
Confidence Score: 3/5 - Review RecommendedNot safe to merge without review — while this PR successfully unifies the Mastra integration API and adds meaningful eager validation in Key Findings:
Files requiring special attention
|
Confidence Score: 4/5 - Mostly SafeSafe to merge — the refactor cleanly redesigns Key Findings:
Files requiring special attention
|
0658cdd to
83baa43
Compare
Confidence Score: 4/5 - Mostly SafeSafe to merge — this v2.0.0 breaking-change refactor cleanly unifies the API surface of Key Findings:
Files requiring special attention
|
packages/tools/README.md
Outdated
| #### Migration from v1.x to v2.0.0 | ||
|
|
||
| **v1.x (old API with positional parameters):** | ||
| ```typescript |
There was a problem hiding this comment.
I think we can remove it from here, the docs will be updated anyways
| "name": "@supermemory/tools", | ||
| "type": "module", | ||
| "version": "1.4.01", | ||
| "version": "2.0.0", |
There was a problem hiding this comment.
do we need to update to version v2?
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
83baa43 to
56ac4c6
Compare
There was a problem hiding this comment.
Overview: Refactors Mastra integration from positional arguments (containerTag, options) to a single object-based API with containerTag and customId as required properties.
Issues found: None — this looks good to ship.
Details:
- Clean API migration:
threadId→customId, both now required with proper validation - Input validation is thorough (checks empty strings, whitespace)
getEffectiveCustomIdcorrectly prioritizes RequestContext for per-request overrides, falling back to the defaultcustomId— the dead code issue from earlier commits has been fixed- Tests comprehensively updated to match new API
- Version bump to 2.0.0 is appropriate for this breaking change
- No security concerns, no race conditions, no breaking logic changes
Score: 10/10
This is a well-executed breaking change with good validation and error messages. The object-based API is cleaner and more explicit about required parameters.
There was a problem hiding this comment.
Overview: Refactors Mastra integration from positional arguments (containerTag, options) to a single object-based API with containerTag and customId as required properties.
Issues found: None — this looks good to ship.
Details:
- Clean API migration:
threadId→customId, both now required with proper validation - Input validation is thorough (checks empty strings, whitespace)
getEffectiveCustomIdcorrectly prioritizes RequestContext for per-request overrides, falling back to the defaultcustomId— the dead code issue from earlier commits has been fixed- Tests comprehensively updated to match new API
- Version bump to 2.0.0 is appropriate for this breaking change
- No security concerns, no race conditions, no breaking logic changes
Score: 10/10
This is a well-executed breaking change with good validation and error messages. The object-based API is cleaner and more explicit about required parameters.

No description provided.