fix: replace broken stringEnum import with inline equivalent#32
Closed
GodsBoy wants to merge 1 commit intosupermemoryai:mainfrom
Closed
fix: replace broken stringEnum import with inline equivalent#32GodsBoy wants to merge 1 commit intosupermemoryai:mainfrom
GodsBoy wants to merge 1 commit intosupermemoryai:mainfrom
Conversation
stringEnum is declared in openclaw/plugin-sdk type definitions but is not exported at runtime, causing a TypeError on plugin register: TypeError: (0 , _pluginSdk.stringEnum) is not a function Replace the import with an inline equivalent using Type.Union + Type.Literal from @sinclair/typebox (already a dependency). This produces the same schema output without depending on the plugin-sdk internal export. Fixes supermemoryai#31
Member
|
just package import change would have been simple, anyways changes are already merged. thanks for the contribution |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
stringEnumimport fromopenclaw/plugin-sdkwith an inline equivalent usingType.Union+Type.Literalfrom@sinclair/typeboxstringEnumis declared in the plugin-sdk type definitions but is not available as a runtime export, causing the plugin to crash on register withTypeError: (0 , _pluginSdk.stringEnum) is not a functionFixes #31
Test plan
stringEnum(MEMORY_CATEGORIES)produces the sameType.Unionschema as beforestringEnum— this is the only call site