Skip to content

Compatibility issue: legacy openclaw/extension-api runtime loading on newer OpenClaw builds #357

@superfat1988

Description

@superfat1988

Summary

memory-lancedb-pro appears to rely on the legacy OpenClaw embedded runtime API loading path (openclaw/extension-api / dist/extensionAPI.js). On newer OpenClaw builds, reflection execution can fall back because the plugin cannot reliably resolve the host runtime API unless OPENCLAW_EXTENSION_API_PATH is manually set.

OpenClaw currently emits a deprecation warning:

[OPENCLAW_EXTENSION_API_DEPRECATED] Warning: openclaw/extension-api is deprecated.
Migrate to api.runtime.agent.* or focused openclaw/plugin-sdk/<subpath> imports.
This compatibility bridge is temporary.

So this looks like a near-term compatibility issue rather than a local misconfiguration.

Environment

  • Host OpenClaw installed at:
    • /home/kaitzh/.npm-global/lib/node_modules/openclaw
  • Confirmed runtime API file exists at:
    • /home/kaitzh/.npm-global/lib/node_modules/openclaw/dist/extensionAPI.js
  • Plugin version:
    • memory-lancedb-pro@1.1.0-beta.10

Observed behavior

During reflection execution, logs showed fallback behavior due to embedded runtime API loading failure:

memory-reflection: command:new reflection generation done for session ...; runner=fallback; usedFallback=yes
memory-reflection: fallback used for session ... (embedded: Error: Unable to load OpenClaw embedded runtime API. Set OPENCLAW_EXTENSION_API_PATH if runtime layout differs.
Attempts:
openclaw/dist/extensionAPI.js: Cannot find module 'openclaw/dist/extensionAPI.js'
...
cli: empty stdout)

After applying this environment workaround:

OPENCLAW_EXTENSION_API_PATH=/home/kaitzh/.npm-global/lib/node_modules/openclaw/dist/extensionAPI.js

OpenClaw then emitted:

[OPENCLAW_EXTENSION_API_DEPRECATED] Warning: openclaw/extension-api is deprecated. Migrate to api.runtime.agent.* or focused openclaw/plugin-sdk/<subpath> imports.

This strongly suggests the plugin is still using the legacy compatibility bridge.

Expected behavior

memory-lancedb-pro should work on current OpenClaw installs without requiring a manual OPENCLAW_EXTENSION_API_PATH shim, and should avoid deprecated host-side imports if the new plugin runtime / SDK path is now the supported mechanism.

Why this matters

Right now the failure mode is confusing:

  • reflection may "complete" via fallback
  • a placeholder/fallback reflection file may still be written
  • downstream symptoms can look like a missing-file bug even though the upstream problem is runtime API resolution

Suggested direction

Please migrate the plugin away from legacy openclaw/extension-api / direct dist/extensionAPI.js assumptions and onto the current OpenClaw plugin SDK / injected runtime path described here:

At minimum, it would help if the plugin:

  1. preferred the modern SDK/runtime path
  2. treated the legacy bridge only as temporary compatibility
  3. surfaced a clearer diagnostic when embedded runtime loading fails and fallback is used

Temporary workaround

Setting:

OPENCLAW_EXTENSION_API_PATH=/home/kaitzh/.npm-global/lib/node_modules/openclaw/dist/extensionAPI.js

appears to be the fastest recovery path on this host.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions