OpenClaw plugin: coexist with memory-core + consolidate #49 + #58#66
OpenClaw plugin: coexist with memory-core + consolidate #49 + #58#66
Conversation
Check GitHub for newer versions on plugin registration. Since child_process is stubbed in the OpenClaw bundle, auto-update isn't possible — log a notice with the update command instead.
- Use npm registry instead of GitHub raw to avoid false update notices for unreleased versions on main - Strip pre-release suffix before version comparison - Add string type guard on pkg.version from registry response
auth.ts imports unlinkSync from node:fs but the OpenClaw esbuild fs-wrap didn't export it, breaking the build.
npm registry has a different package named hivemind (0.1.2). The OpenClaw plugin is published on ClawHub, not npm. GitHub raw is the correct source for the latest version.
Checks GitHub for newer version and tells the user what command to run. Cannot auto-update since child_process is stubbed in the OpenClaw bundle.
…, update READMEs and SKILL.md
Resolves conflict by keeping both the org/workspace commands from main (PR #52) and the hivemind_update command from the autoupdate branch. Also fixes a reference to undefined GITHUB_RAW_PKG — the declared constant is VERSION_URL. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ner-clean After merging PR #58 (removes kind:memory, drops readFileSync import) with PR #49 (adds hivemind_update version-check that needs readFileSync), the merged source had undefined readFileSync references. Moving the node:fs and node:path imports inside getInstalledVersion() via dynamic import keeps the version-check functional while satisfying the security scanner intent from PR #58 (no top-level node:fs import in source). Also adds /hivemind_update to the openclaw/README commands table. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- README: clarify hivemind runs alongside memory-core (dreaming cron, other memory-slot jobs unaffected) - README: troubleshooting for agent-model tuning, allowlist rejects, disabled model CLI, elevated-command gotchas, EACCES on self-update - openclaw/README: same troubleshooting, plus coexist callout - Add /hivemind_update to global README commands table Source: debug session 2026-04-17 diagnosing a user-reported "hivemind broken in openclaw" that was actually the Opus-4 default model, the disabled openclaw model CLI, and the strict model allowlist rejecting legacy IDs. Documenting so the next user doesn't rediscover. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Claude finished @kaghni's task in 2m 39s —— View job Two issues found:
|
Coverage ReportNo Generated for commit 6c4a3dc. |
| - **Does NOT** modify OpenClaw configuration or replace the built-in memory plugin. | ||
| - All network requests go to `api.deeplake.ai` only. | ||
|
|
||
| ## Commands |
There was a problem hiding this comment.
The new ## Commands block added here creates a duplicate — the original ## Commands section (lines 37–45 of the resulting file) was not removed, leaving two identical headings.
Delete the old ## Commands block (lines 37–45, starting with ## Commands through - \/hivemind_switch_workspace ``) to keep only the new, more detailed list above.
There was a problem hiding this comment.
Fixed in this same commit (4cb3bde) — the diff removes the duplicate block. Only one ## Commands section remains, at line 27 of the resulting file. Verified locally and on origin.
| const manifest = await res.json() as { version?: string }; | ||
| const latest = manifest.version ?? null; | ||
| if (latest && isNewer(latest, current)) { | ||
| logger.info?.(`⬆️ Hivemind update available: ${current} → ${latest}. Run: openclaw plugins install clawhub:hivemind`); |
There was a problem hiding this comment.
The passive update log says openclaw plugins install clawhub:hivemind (install a new plugin), but the explicit /hivemind_update command (line 289) correctly says openclaw plugins update hivemind — these two messages should be consistent, and update is the right verb for an already-installed plugin.
| logger.info?.(`⬆️ Hivemind update available: ${current} → ${latest}. Run: openclaw plugins install clawhub:hivemind`); | |
| logger.info?.(`⬆️ Hivemind update available: ${current} → ${latest}. Run: openclaw plugins update hivemind`); |
- SKILL.md had a duplicated `## Commands` H2 section (two identical headings break markdown anchors and confuse the reader). Consolidated into one section and added /hivemind_update. - Passive update-available log said `openclaw plugins install clawhub:hivemind` but the explicit /hivemind_update command correctly says `openclaw plugins update hivemind`. Aligned both on the `update` verb — `update` is the right action for an already-installed plugin. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pre-bumps from 0.6.39 to 0.6.40 so the ClawHub publish of this branch matches the GitHub release version produced by release.yml on merge. release.yml skips its auto-bump when the last commit message contains 'chore: bump version', so we avoid a double-bump on merge. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Revert PR #66 (OpenClaw coexist) — merged by mistake
Summary
Consolidates and lands the two open OpenClaw plugin PRs (#49 autoupdate, #58 coexist-with-memory-core), resolves their merge conflicts cleanly, and adds real-world troubleshooting docs from a 2026-04-17 debug session.
Closes #49 and closes #58 — both OPEN and conflicting with recent main; rather than rebasing two branches in parallel, they're merged here with conflicts resolved and bugs fixed.
What's in this branch
From PR #58 (coexist with
memory-core)kind: "memory"fromopenclaw/openclaw.plugin.json— hivemind no longer claims OpenClaw's memory slotaddToLoadPaths()— plugin no longer mutates~/.openclaw/openclaw.jsonopenclaw/README.md(didn't exist on main)README.mdandSKILL.mdWhy it matters:
extensions/memory-coreowns the dreaming cron ("0 3 * * *") and the light/REM/deep memory-consolidation phases. When hivemind declaredkind: "memory", it grabbed the singular memory slot and silently killed those jobs. This is the openclaw-sanctioned coexist pattern (same asextensions/memory-wiki, documented indocs/plugins/memory-wiki.md): a memory-adjacent plugin that augments the active memory backend rather than replacing it.From PR #49 (autoupdate / version-check)
/hivemind_updatecommand for explicit checkFixes discovered during merge
GITHUB_RAW_PKG— the declared constant isVERSION_URL. Fixed.readFileSync/joinimports (security scanner), but PR Add version check to OpenClaw plugin #49'sgetInstalledVersion()uses them. Resolved by movingnode:fs/node:pathto dynamic imports inside the function — source stays scanner-clean, functionality preserved.New documentation
Troubleshooting section in both global and openclaw READMEs covering issues found during the 2026-04-17 debug:
anthropic/claude-haiku-4-5-20251001)-latestand unprefixed IDs)openclaw model <id>CLI being disabled by default (plugins.allowexcludesmodel)tools.elevated.allowFrom.<provider>gate for channel-triggered elevated commandsnpm EACCESon self-update when OpenClaw is installed under a root-owned npm prefixTest plan
npm run typecheck— cleannpm run build— 8 CC + 8 Codex + 1 OpenClaw bundles builtnpm test— 918/918 passing across 41 filesopenclaw plugins install clawhub:hivemindand verifymemory-coredreaming cron still runs/hivemind_updatereports correct state against current mainFollow-ups (not in this PR)
getInstalledVersion/isNewerto the sharedsrc/utils/version-check.tshelper (needs a small extension for openclaw's non-standard manifest filename)ESCAPE '\\', release-lock observability,src/utils/helper migration🤖 Generated with Claude Code