fix(openclaw): use exported memory SDK subpath#98
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughThis PR upgrades OpenClaw SDK compatibility from 2026.3.22 to 2026.4.10 with coordinated version and import path updates across configuration and code, and introduces defensive parameter normalization to protect memory tool implementations from malformed inputs. ChangesOpenClaw compatibility and tool robustness
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@ajspig @VVoruganti this is ready for review. It is a narrow OpenClaw SDK import compatibility fix from the Crabpot beta report; build, tests, and plugin-inspector are in the PR body. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 314: Update the README section so the two version notes are explicit and
not contradictory: change the line that currently reads "Fix: 2026.4.6 or
later." to say something like "Upstream hook bug fixed in OpenClaw 2026.4.6+
(this fix is upstream)" and change or augment the line that reads "Verified
working: OpenClaw 2026.4.10+." to say "Plugin requires OpenClaw 2026.4.10+
(tested/verified on 2026.4.10+)" so both the upstream fix and the plugin
requirement are shown together in the same paragraph.
In `@tools/memory-passthrough.ts`:
- Around line 104-109: The code currently lets validation errors from
requireToolParams/readStringParam/readNumberParam be swallowed by the provider
try/catch and reported as provider outages; instead, perform all input
validation up front (call requireToolParams, readStringParam, readNumberParam
and buildSessionKey) outside the provider try/catch and if those functions throw
return or throw a validation-style error payload, then only wrap the actual
provider interaction in the try/catch that maps to provider-unavailable errors;
apply the same separation for the other block referenced (lines 146-149) so
parameter validation never gets classified as provider failure.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9c1f885d-e7e1-4c1b-8895-5382d308da9a
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (5)
CHANGELOG.mdREADME.mdindex.tspackage.jsontools/memory-passthrough.ts
|
@vincentkoc Thanks for this. BTW the clawhub is currently broken in a way I can't publish this package there any more. :( I posted about it in discord. https://discord.com/channels/1456350064065904867/1504936568073486597 I'm hitting a scope mismatch publishing openclaw-honcho v1.5.0: my package.json uses |
|
@ajspig followed up with you on your other issue here: openclaw/openclaw#82322 (comment) Thanks for bringing these issues up to us! |
Why
I maintain OpenClaw core and am working through visible plugin compatibility issues from Crabpot so plugins keep loading cleanly as the public SDK surface narrows.
Crabpot beta flagged Honcho because
index.tsimportsopenclaw/plugin-sdk/memory-core, but current OpenClaw package exports no longer expose that broad memory-core SDK alias.Immutable Crabpot evidence: https://github.com/openclaw/crabpot/blob/28bc58ae049933afdf6eed8466d1e6db0778f3e8/reports/crabpot-issues.md#L63-L67
What changed
MemoryPromptSectionBuilderfromopenclaw/plugin-sdk/memory-core-host-runtime-core, which is the exported SDK subpath OpenClaw uses for this memory prompt-section contract.>=2026.4.10, the first OpenClaw tag that exportsmemory-core-host-runtime-core.openclaw@2026.4.10as a dev dependency so local builds validate against the minimum supported host instead of floating to latest.memory-passthroughtool params fromunknownto plain records so TypeScript passes against current OpenClaw tool API types.Validation
pnpm install --lockfile-only --ignore-scriptspnpm install --frozen-lockfile --ignore-scriptspnpm buildpnpm exec tsc --noEmitpnpm exec vitest run- 35 tests passednpx --yes @openclaw/plugin-inspector@latest check --plugin-root . --openclaw /Users/USER/openclaw --jsonPlugin Inspector now reports:
all observed plugin SDK imports exist in target OpenClaw package exportsforopenclaw/plugin-sdk,openclaw/plugin-sdk/memory-core-host-runtime-core, andopenclaw/plugin-sdk/plugin-entry.Remaining inspector findings
This PR removes the
sdk-export-missingP1. The remaining P1 isconversation-access-hook, which is an OpenClaw/plugin-inspector privacy-boundary probe coverage item foragent_endhooks, not an upstream Honcho code fix.Summary by CodeRabbit
Bug Fixes
Documentation
Chores