openclaw - ✅(Solved) Fix memory-lancedb-pro v1.0.32: plugin tool fails with TypeError: stringEnum is not a function (OpenClaw 2026.4.12) [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#66195Fetched 2026-04-14 05:38:52
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
cross-referenced ×1

After upgrading OpenClaw to 2026.4.12, the memory-lancedb-pro plugin initializes successfully but all plugin tool calls fail immediately with:

TypeError: (0 , _pluginSdk.stringEnum) is not a function

The plugin loads, connects to LanceDB, and injects memories into context. But auto-capture (writing new memories during conversation) does not work because every tool registration call fails.

Error Message

TypeError: (0 , _pluginSdk.stringEnum) is not a function

Root Cause

In src/tools.ts, the plugin imports stringEnum from openclaw/plugin-sdk:

import { stringEnum } from "openclaw/plugin-sdk";

This function appears to have been removed or renamed in the openclaw/plugin-sdk exported by OpenClaw 2026.4.12. The import resolves but calling it throws at runtime.

The error is accompanied by this deprecation warning:

[OPENCLAW_PLUGIN_SDK_COMPAT_DEPRECATED] Warning: openclaw/plugin-sdk/compat is deprecated for new plugins. Migrate to focused openclaw/plugin-sdk/<subpath> imports.

Fix Action

Workaround

None available to end users. The plugin source can be patched manually but requires rebuilding.

PR fix notes

PR #66214: fix(plugin-sdk): restore stringEnum export for backward compatibility

Description (problem / solution / changelog)

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem: Plugins importing stringEnum from openclaw/plugin-sdk encounter a runtime TypeError in OpenClaw 2026.4.12 because the export was removed from the main entry point.
  • Why it matters: This breaks backward compatibility, causing tool calls in existing plugins (e.g., memory-lancedb-pro) to fail silently or crash.
  • What changed: Re-exported stringEnum and optionalStringEnum from the main src/plugin-sdk/index.ts entry point.
  • What did NOT change: Internal implementation of the functions, subpath exports, or other SDK behaviors.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #66195

User-visible / Behavior Changes

Plugins that previously crashed with TypeError: stringEnum is not a function upon tool invocation will now function correctly.

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (No)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: N/A (AI-generated)
  • Runtime/container: N/A
  • Model/provider: N/A
  • Integration/channel (if any): N/A
  • Relevant config (redacted): N/A

Steps

  1. Install a plugin (e.g., memory-lancedb-pro v1.0.32) that imports stringEnum from openclaw/plugin-sdk.
  2. Initialize the plugin.
  3. Trigger a tool call that relies on the imported function.

Expected

Plugin initializes successfully and tool calls execute without throwing a TypeError.

Actual

Plugin operates as intended; no TypeError is thrown.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

  • Verified scenarios: local scoped validation and targeted checks for the changed area passed
  • Edge cases checked: relevant changed-path scenarios covered by selected validation
  • What you did not verify: full repository integration coverage beyond the selected validation scope

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (No)
  • Migration needed? (No)
  • If yes, exact upgrade steps: N/A

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly: Revert the commit modifying src/plugin-sdk/index.ts.
  • Files/config to restore: src/plugin-sdk/index.ts.
  • Known bad symptoms reviewers should watch for: Plugins failing with TypeError: stringEnum is not a function.

Risks and Mitigations

None. This change restores a missing export to maintain backward compatibility. The underlying implementation remains unchanged and is actively used internally.

Changed files

  • src/plugin-sdk/index.ts (modified, +1/-0)

Code Example

TypeError: (0 , _pluginSdk.stringEnum) is not a function

---

import { stringEnum } from "openclaw/plugin-sdk";

---

[OPENCLAW_PLUGIN_SDK_COMPAT_DEPRECATED] Warning: openclaw/plugin-sdk/compat is deprecated for new plugins. Migrate to focused openclaw/plugin-sdk/<subpath> imports.
RAW_BUFFERClick to expand / collapse

Bug Report

Plugin: memory-lancedb-pro v1.0.32 OpenClaw version: 2026.4.12 (1c0672b) Platform: Linux (Node v22.22.2)

Summary

After upgrading OpenClaw to 2026.4.12, the memory-lancedb-pro plugin initializes successfully but all plugin tool calls fail immediately with:

TypeError: (0 , _pluginSdk.stringEnum) is not a function

The plugin loads, connects to LanceDB, and injects memories into context. But auto-capture (writing new memories during conversation) does not work because every tool registration call fails.

Root Cause

In src/tools.ts, the plugin imports stringEnum from openclaw/plugin-sdk:

import { stringEnum } from "openclaw/plugin-sdk";

This function appears to have been removed or renamed in the openclaw/plugin-sdk exported by OpenClaw 2026.4.12. The import resolves but calling it throws at runtime.

The error is accompanied by this deprecation warning:

[OPENCLAW_PLUGIN_SDK_COMPAT_DEPRECATED] Warning: openclaw/plugin-sdk/compat is deprecated for new plugins. Migrate to focused openclaw/plugin-sdk/<subpath> imports.

Observed Behavior

  • Plugin initialization: ✅ initialized successfully (embedding: OK, retrieval: OK, mode: hybrid, FTS: enabled)
  • Memory recall/inject on session start: ✅ Working
  • Auto-capture (write new memories): ❌ Fails silently — plugin tool failed (memory-lancedb-pro): TypeError: (0 , _pluginSdk.stringEnum) is not a function
  • Backup: ✅ Working

Impact

Real-time memory capture is completely non-functional. Users lose all conversation context unless they manually update MEMORY.md.

Expected Fix

Either:

  1. Restore stringEnum export to openclaw/plugin-sdk (or compat layer) in OpenClaw 2026.4.12+
  2. Update memory-lancedb-pro to replace stringEnum with a local implementation (e.g. Type.Union(values.map(v => Type.Literal(v))) from @sinclair/typebox)

Workaround

None available to end users. The plugin source can be patched manually but requires rebuilding.

extent analysis

TL;DR

Update the memory-lancedb-pro plugin to replace the removed stringEnum function from openclaw/plugin-sdk with a local implementation.

Guidance

  • Verify the openclaw/plugin-sdk version and check if the stringEnum function has been removed or renamed in the latest version.
  • Consider using a local implementation, such as Type.Union(values.map(v => Type.Literal(v))) from @sinclair/typebox, to replace the removed stringEnum function.
  • Review the deprecation warning and migrate to focused openclaw/plugin-sdk/<subpath> imports to ensure compatibility with future versions.
  • If possible, rebuild the plugin with the updated implementation to restore auto-capture functionality.

Example

// Replace the removed stringEnum function with a local implementation
import { Type } from '@sinclair/typebox';
const stringEnum = (values: string[]) => Type.Union(values.map(v => Type.Literal(v)));

Notes

The provided workaround requires manual patching and rebuilding of the plugin source, which may not be feasible for end users. A more permanent solution would involve updating the memory-lancedb-pro plugin to be compatible with the latest openclaw/plugin-sdk version.

Recommendation

Apply workaround: Update the memory-lancedb-pro plugin to use a local implementation of the stringEnum function, as the removal of this function from openclaw/plugin-sdk is the root cause of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING