fix: add OpenClaw 2026.5 compiled runtime compatibility#755
Conversation
a04a2e1 to
ab56da4
Compare
|
Thanks for catching this. I updated this PR to use the cross-platform ESM-safe CJS loader pattern instead of dynamic import():
Validation run locally:
New commit: 8bece29 |
|
Tested locally on OpenClaw 2026.5.6. Current openclaw plugins install memory-lancedb-pro@betabecause the package still points at Runtime after manual install:
One additional OpenClaw 2026.5.6 compatibility issue: "hooks": {
"allowConversationAccess": true
}Without this, smart extraction / auto-capture hooks are blocked for non-bundled plugins. This overlaps with #727. It may be worth folding #727 into this PR so the compiled runtime compatibility PR fixes both installability and runtime hook behavior. |
|
Thanks for testing this on OpenClaw 2026.5.6. I pushed one more commit to address the conversation hook gate you pointed out:
I also re-checked the packaging side on this PR branch. The currently published npm beta is still So the fresh-install failure should be covered once a beta is published from this branch, and the OpenClaw 2026.5.6 hook access requirement should now be declared in the manifest. |
99cc8ca to
73c1911
Compare
|
Local verification passed on the PR branch:
Installed extension verification on OpenClaw 2026.5.7 also passed after syncing the same patch into
GitHub Actions for the new head currently show |
app3apps
left a comment
There was a problem hiding this comment.
Reviewing current head 9ffcbb4. Requesting changes because the compiled-runtime compatibility direction is valuable, but the current branch still has build/runtime blockers.
-
./node_modules/.bin/tsc -p tsconfig.json --noEmit --pretty falsestill exits with code 2 on this PR branch. Representative errors includeindex.ts:2285(parseReflectionMetadatais not defined),index.ts:2286(isReflectionMetadataType/isOwnedByAgentare not defined), multipleconfig.declaredAgentserrors againstPluginConfig, and retrieval-context object literals passingsourcewhere the type does not allow it. Sincetsconfig.json:18hasnoEmitOnError: false,distcan be generated even while these errors remain, which is risky for a PR whose purpose is to ship compiled runtime output. -
The generated
dist/index.jsstill contains undefined runtime references in the legacy reflection fallback path:dist/index.js:1735-1736callsparseReflectionMetadata(...),isReflectionMetadataType(...), andisOwnedByAgent(...), but those symbols are not imported or defined indist/index.js. A top-levelimport('./dist/index.js')succeeds, but this fallback branch will throwReferenceErrorwhen executed. The source has the same unresolved calls atindex.ts:2285-2286;src/reflection-store.tsexportsisOwnedByAgent, butisReflectionMetadataTypeis currently local-only. -
npm pack --dry-run --jsonconfirms the important runtime files are included (dist/index.js,dist/src/*,openclaw.plugin.json), but the package also includes.github, tests, examples, andcommit_msg.txt. This is not a blocker for runtime correctness, but for the published plugin package I would add apackage.jsonfileswhitelist so npm only ships the runtime, manifest, docs that are intended for users, and required metadata.
Checks I ran against this head: git diff --check origin/master...origin/pr/755 passed, node test/plugin-manifest-regression.mjs passed, and node -e "import('./dist/index.js')..." passed. The TypeScript failures and the undefined reflection fallback symbols above are the blockers.
|
Thanks for the review. I confirmed the three issues you called out were real and pushed a follow-up fix in What changed:
Validation run locally:
Local runtime verification:
Current PR status:
|
Summary
This PR is scoped to OpenClaw 2026.5 runtime/plugin-contract compatibility for
memory-lancedb-pro.It includes:
dist/package.json/openclaw.extensionsat./dist/index.js1.1.0-beta.11openclaw.plugin.json→contracts.toolsregisterMemoryCapabilityfor hosts/test stubs that do not expose itapi.resolvePathimport()instead ofrequire()so the compiled ESM runtime works under OpenClaw 2026.5What this fixes
Validated locally against OpenClaw 2026.5.4:
openclaw doctorcontracts.toolsregistration error for this pluginrequire is not definedduring retrieval / auto-recallrunBackupno longer fails from double-resolving an already-absolutedbPathembedding: OK,retrieval: OK,FTS: enabledmemory_store/memory_recallwrite-read path works against the existing LanceDB databaseRelated upstream work
Related to / overlaps parts of:
contracts.toolsmanifest declarationrunBackuppath-resolution failuresThis PR intentionally does not pull in the full broad changes from #743/#750. It only applies the minimal path-resolution fix needed for backup/admission audit paths.
It also does not claim to resolve all OpenClaw 2026.5 issues in the repo; other categories like broader backup workflows, locks/bulk-store, reflection/dreaming, retrieval-quality, and import-markdown remain separate work.
Validation
Local validation performed:
npx tsc -p tsconfig.jsonnode --test test/reflection-bypass-hook.test.mjsnode test/plugin-manifest-regression.mjsnode --test test/sync-plugin-version.test.mjsopenclaw doctor --non-interactivememory_store+memory_recallwrite-read marker testRuntime result after installing/syncing this branch locally:
~/.openclaw/extensions/memory-lancedb-pro/dist/index.js1.1.0-beta.11embedding: OK,retrieval: OK,FTS: enabled