Skip to content

fix(memory-lancedb): ship @lancedb/lancedb for bundled extension#13671

Closed
CryptoJym wants to merge 3 commits intoopenclaw:mainfrom
CryptoJym:fix/memory-lancedb-root-dep
Closed

fix(memory-lancedb): ship @lancedb/lancedb for bundled extension#13671
CryptoJym wants to merge 3 commits intoopenclaw:mainfrom
CryptoJym:fix/memory-lancedb-root-dep

Conversation

@CryptoJym
Copy link
Copy Markdown

@CryptoJym CryptoJym commented Feb 10, 2026

Problem

Bundled extensions under extensions/* ship in the npm package, but their dependency graphs are not guaranteed to be installed for end users.

This caused the bundled memory-lancedb extension to break in fresh installs (e.g. openclaw ltm stats) when required deps were missing or only available via transitive hoisting.

Additionally, workspace-generated extensions/*/node_modules/.bin/* artifacts can end up in the packed tarball, and those scripts contain absolute paths from the build machine.

Fix

  • Declare @lancedb/lancedb at the root as an optionalDependency so installs can succeed even on platforms where LanceDB native bindings may not be available.
  • Declare openai at the root so memory-lancedb does not rely on transitive hoisting/version drift.
  • Add a regression test asserting the root declares all extensions/memory-lancedb runtime deps.
  • Add extensions/.npmignore to exclude workspace-installed node_modules artifacts from the published package.
  • Minor lint cleanup (remove redundant cast).

Verification

  • pnpm lint
  • pnpm test
  • npm pack --dry-run --json shows node_modules entries 0

Bundled extensions under extensions/* rely on the root node_modules at runtime in packaged installs, so memory-lancedb was failing with missing @lancedb/lancedb.

Add it as an optionalDependency at the root and add a regression test to prevent future packaging regressions.
@openclaw-barnacle openclaw-barnacle bot added the agents Agent runtime and tooling label Feb 10, 2026
- Declare openai at the root so bundled memory-lancedb doesn't rely on transitive hoisting.
- Extend the regression test to assert root declares all memory-lancedb deps.
- Prevent workspace-generated extensions/*/node_modules artifacts from being packed.
@openclaw-barnacle openclaw-barnacle bot added the scripts Repository scripts label Feb 10, 2026
@CryptoJym
Copy link
Copy Markdown
Author

Follow-up guardrails (kept intentionally light):

  • Plugin loader now detects common "missing module/package" failures and returns an actionable error for bundled plugins, including an install hint when openclaw.install.npmSpec is present (plus a note about --omit=optional).
  • Release gate now rejects any npm pack contents that include node_modules/ or .pnpm/ anywhere, to prevent shipping dependency trees by accident.

Verified locally: pnpm test src/plugins/loader.test.ts, pnpm release:check.

@openclaw-barnacle
Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle bot added stale Marked as stale due to inactivity and removed stale Marked as stale due to inactivity labels Feb 21, 2026
@openclaw-barnacle
Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle bot added the stale Marked as stale due to inactivity label Mar 10, 2026
@openclaw-barnacle
Copy link
Copy Markdown

Closing due to inactivity.
If you believe this PR should be revived, post in #pr-thunderdome-dangerzone on Discord to talk to a maintainer.
That channel is the escape hatch for high-quality PRs that get auto-closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling scripts Repository scripts stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant