Skip to content

Declare openclaw as a peer dependency of the OpenClaw plugin - #1891

Open
edwinyyyu wants to merge 4 commits into
MemMachine:mainfrom
edwinyyyu:deps/openclaw-peer-dependency
Open

edwinyyyu wants to merge 4 commits into
MemMachine:mainfrom
edwinyyyu:deps/openclaw-peer-dependency

Conversation

@edwinyyyu

@edwinyyyu edwinyyyu commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Purpose of the change

Stop counting OpenClaw's own dependency tree as runtime dependencies of the OpenClaw plugin. integrations/openclaw/package-lock.json has 219 open Dependabot alerts, 205 of them runtime scope. The plugin listed openclaw, the whole host application, as a regular dependency, and the lockfile has not changed since May (#1393).

Description

  • openclaw moves from dependencies to peerDependencies and keeps the plugin's range, ^2026.4.10. OpenClaw's plugin guide declares the host this way. Its dependency resolution page says managed plugin installs run npm install --omit=dev --omit=peer ... and link the host's own package into plugins that declare the host peer.
  • openclaw is also a development dependency, ~2026.7.35, so the type check, build, and smoke test have a host package to run against. 2026.7 is the newest line the plugin builds against (see Further comments). tsup still keeps openclaw/plugin-sdk/core external in dist.
  • The lockfile is refreshed with npm update within the declared ranges, with no range changes. This moves @memmachine/client from 0.3.4 to 0.3.9, axios from 1.16.0 to 1.21.0, and the development tree to the newest versions its ranges allow.

After this change the runtime tree is @memmachine/client, @sinclair/typebox, and their dependencies, 27 packages in all. npm audit --omit=dev reports no advisories for it; it reads the GitHub Advisory Database, the same source Dependabot uses. The remaining advisories are all in the development tree.

Type of change

  • Project Maintenance (updates to build scripts, CI, etc., that do not affect the main project)
  • Security (improves security without changing functionality)

How Has This Been Tested?

  • Unit Test
  • Manual verification

Run at the head in integrations/openclaw/, on Node 22.23.4, macOS arm64:

  • npm ci --ignore-scripts, npm run lint, npm test (3 suites, 37 tests passed), and npm run test:smoke (builds dist and imports dist/index.mjs against the installed OpenClaw) pass.
  • npm audit --omit=dev reports 0 advisories. npm audit reports 49, all in development scope. On main's lockfile, npm audit reports 224.

Test Results: as listed above.

Checklist

  • I have signed the commit(s) within this pull request
  • I have performed a self-review of my own code
  • New and existing unit tests pass locally with my changes

Further comments

  • The plugin does not build against OpenClaw 2026.8.1 or later, and this PR does not change that. OpenClaw 2026.8.1 (2026-08-31) removed three things index.mts uses: the root openclaw/plugin-sdk entry point, api.registerMemoryPromptSection (OpenClaw's migration notes replace it with registerMemoryCapability), and the before_agent_start hook. The type check passes against 2026.7.35 and fails on exactly these three against 2026.8.1, 2026.8.2, 2026.8.33, 2026.8.34, 2026.9.36, and 2026.10.9. The 2026.10.9 runtime defines no registerMemoryPromptSection, and register() calls it before registering anything else. The plugin's ^2026.4.10 range admits all of those hosts. Porting the plugin to the current SDK is separate work; once that lands, the development pin can move to the current release.
  • Dependabot still reports the development-scope advisories. A repository admin can triage them with a custom auto-triage rule scoped to this manifest and to development scope.
  • Build(deps): Bump the npm_and_yarn group across 2 directories with 13 updates #1718 bumps this lockfile and packages/ts-client's. This PR supersedes its integrations/openclaw half.

🤖 Written by Claude Code (Claude Opus 5.5) on behalf of @edwinyyyu.

edwinyyyu and others added 4 commits November 2, 2026 10:47
The plugin runs inside an OpenClaw host and imports the host's SDK
through openclaw/plugin-sdk/*. OpenClaw's plugin guide declares the
host as a peer dependency: managed plugin installs omit peers and link
the host's own package into plugins that declare it. As a regular
dependency, openclaw put the host's whole dependency tree into the
plugin's dependency graph, and the repository lockfile counted that
tree as runtime dependencies of the plugin.

The peer range keeps the hosts the plugin already accepted
(^2026.4.10). The plugin's type check, build, and smoke test need a
concrete host package, so openclaw is also a development dependency,
pinned to the 2026.7 line (~2026.7.35): it is the newest line the
plugin builds against. OpenClaw 2026.8.1 removed the root
openclaw/plugin-sdk entry point, api.registerMemoryPromptSection, and
the before_agent_start hook, all of which index.mts uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Edwin Yu <edwinyyyu@gmail.com>
npm update within the ranges package.json already declares; no range
changes. The runtime tree moves to @memmachine/client 0.3.9 and axios
1.21.0, and the development tree to the newest releases its ranges
allow. Lockfile only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Edwin Yu <edwinyyyu@gmail.com>
No workflow checked integrations/openclaw before a release: the
publish workflow was the only one that built it. Changes to the
plugin, including dependency update pull requests for its lockfile,
merged without a type check, test run, or build.

The workflow installs from the lockfile with npm ci, then runs the
plugin's type check, Jest suite, and smoke test, which builds dist and
imports the built module against the installed OpenClaw package. It
runs on Node 22, the version the publish workflow builds with, and
follows ts-client-test.yml's triggers and draft skip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Edwin Yu <edwinyyyu@gmail.com>
No other integration or example has its own CI workflow, and the
dependency change does not need one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Edwin Yu <edwinyyyu@gmail.com>
@edwinyyyu edwinyyyu changed the title Declare openclaw as a peer dependency of the OpenClaw plugin and test the plugin on pull requests Declare openclaw as a peer dependency of the OpenClaw plugin Nov 2, 2026
@edwinyyyu
edwinyyyu requested a review from malatewang November 2, 2026 19:38

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant