Commit Graph

36 Commits

Author SHA1 Message Date
Peter Steinberger da4a656cdb improve: doctor migration checks no longer load every bundled plugin runtime (#120678)
* perf(plugins): declare doctor contract surfaces

* perf(doctor): slim migration import closures

* perf(plugins): narrow doctor declaration record surface and wire owner-test lane

Registry records carry only the doctorContract declaration instead of the whole
parsed manifest, and check:changed now selects the src/plugins-owned declaration
honesty and closure-guard tests for extension module/manifest changes so
cross-lane drift cannot pass PR classification.

* fix(doctor): keep control-plane dist imports require-safe

Keep doctor and channel control-plane chunks off exec-class dependencies, and enforce native require(esm) loading during postbuild.

* chore(plugin-sdk): regenerate API baseline

* chore(plugin-sdk): sync export ordering

* fix(plugins): satisfy doctor contract CI boundaries

* perf(doctor): make qqbot doctor closure dependency-light

qqbot was the last plugin above 5s in doctor state-migration enumeration
(~8s under tsx/jiti). The cost was not the state-key builder (already a
leaf): its doctor closure value-imported the runtime-doctor SDK barrel,
whose plugin-state-store/state-db re-exports pull kysely (~330 modules),
plus security-runtime for one fileExists (~200 modules), all resolved
per-module by jiti during enumeration.

Split the migration-define helpers and light re-exports into a new
private-local plugin-sdk/runtime-doctor-migrations subpath; runtime-doctor
re-exports it so its public surface is byte-identical (API baseline hash
unchanged). qqbot's doctor-contract and state-migrations now import only
the light subpath, swapping fileExists for the equivalent async
legacyStateFileExists already in the closure.

qqbot enumeration: ~8.0s/531 modules -> ~0.25s/18 modules.

* chore(plugin-sdk): drop private-local subpath from API baseline

runtime-doctor-migrations is private-local-only; the baseline tracks public
modules, and the earlier line was generated before the classification.

* fix(plugins): register runtime-doctor-migrations boundary paths

The private-local subpath list feeds the extension package boundary map;
the shared paths config and xai's derived overrides must carry the same
entry or the boundary contract test fails.
2026-08-08 13:29:18 -07:00
Vincent Koc 1d446ad2cc fix(plugins): remove stale load paths during uninstall (#118930)
* test(qa): prove marketplace plugin updates

* fix(plugins): clean exact install load paths on uninstall

* fix(ci): register marketplace lifecycle assertions
2026-08-03 21:57:54 +00:00
Vincent Koc ed0dae17bc fix(plugins): remove managed peers after npm override errors (#116675)
* fix(plugins): retry npm override cleanup on uninstall

* fix(plugins): satisfy uninstall cleanup checks
2026-07-31 13:32:51 +08:00
Peter Steinberger a12e0f26ee fix(plugins): serialize lifecycle mutations and preserve setup-required installs (#112763)
* fix(plugins): harden concurrent lifecycle mutations

* fix(update): preserve post-core restart snapshot

* fix(update): retain authoritative plugin records on resume

* fix(update): reconcile plugin records after handoff
2026-07-22 23:25:48 -04:00
Peter Steinberger 011d0279ca refactor(plugins): centralize slot reset policy (#108763) 2026-07-16 01:45:22 -07:00
Peter Steinberger 98e3f729bc refactor: remove dead plugin loader exports (#105937)
* refactor(plugins): trim activation and contract exports

* test(plugins): restore fixture cleanup

* refactor(plugins): trim install and loader exports

* test(plugins): fully reset loader caches

* refactor(plugins): trim metadata and catalog exports

* test(plugins): preserve catalog trust coverage

* refactor(plugins): trim provider and plugin exports

* refactor(plugins): trim runtime and tool exports

* test(plugins): update dead-export consumers

* test(plugins): remove empty dead-export suites

* refactor(plugins): align exports with split registry

* refactor(plugins): trim drifted loader exports

* style(plugins): format test fixtures

* refactor(scripts): use supported plugin APIs

* refactor(plugins): finish dead export cleanup

* chore(deadcode): refresh export baseline

* test(cli): mock production memory state

* chore(deadcode): sync latest export baseline

* fix(tests): keep plugin fixtures inside core

* chore(deadcode): refresh rebased export baseline

* chore(deadcode): sync current ratchets

* fix(plugins): retain reserved slot invariant

* fix(plugins): preserve dead-export invariants

* test(plugins): use neutral catalog query fixture

* test(plugins): satisfy catalog lint

* test(plugins): preserve integrity drift coverage

* fix(ci): register skill experience live proof
2026-07-13 01:29:33 -07:00
Peter Steinberger a99ecff78a fix(plugins): enforce own install record lookups (#102872)
* fix(plugins): enforce own install record lookups

Co-authored-by: Alix-007 <li.long15@xydigit.com>

* test(plugins): use valid prototype-key package fixtures

---------

Co-authored-by: Alix-007 <li.long15@xydigit.com>
2026-07-09 15:54:21 +01:00
Peter Steinberger d33664aef0 docs: document plugin provider helpers 2026-06-04 04:25:18 -04:00
Peter Steinberger ea682182d0 fix: isolate npm plugin installs per package (#87647)
* fix: isolate npm plugin installs per package

* test: assert isolated npm plugin projects in upgrade survivor

* test: assert plugin lifecycle npm project roots

* test: resolve npm project deps in live assertions

* fix: resolve codex bins from isolated npm projects

* docs: document isolated npm plugin projects

* ci: configure testbox workflow for crabbox

* fix: stabilize npm project fingerprint

* fix: keep fetch runtime import side-effect free

* test: keep dynamic live model unit hermetic

* ci: handle empty node toolcache roots

* test: make nounset toolcache probe deterministic
2026-05-28 21:16:07 +01:00
Josh Lehman 85a3d5312f fix: bypass npm freshness for managed installs (#83761)
* fix: bypass npm freshness for managed installs

* test: tolerate npm config json differences

* test: align npm freshness bypass expectation

* fix: resolve npm config path expansions

* test: tolerate npm zero config encoding

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-19 00:31:02 +02:00
Vincent Koc 2a67a7f65e fix(plugins): prune managed peers on uninstall 2026-05-13 22:53:58 +08:00
Vincent Koc 3ba2ce6694 fix(plugins): avoid managed npm prefix on Windows
Fixes #78514.
2026-05-09 07:51:49 +08:00
Peter Steinberger 3e8b5b4ee7 fix: skip npm uninstall when managed root is absent 2026-05-06 22:06:59 +01:00
Peter Steinberger 858038320d fix: clean stale managed npm plugin deps on uninstall 2026-05-06 22:06:59 +01:00
Vincent Koc 0ddbf2e258 fix(plugins): keep managed npm mutations in legacy peer mode 2026-05-06 01:29:52 -07:00
Peter Steinberger 8e533490ab fix(plugins): repair managed npm openclaw peers
Remove stale managed-root openclaw manifests, locks, hidden locks, and installed copies before npm plugin installs.

Relink plugin-local openclaw peer symlinks after shared-root npm install, rollback, update, and uninstall mutations so SDK-using plugins keep resolving openclaw/plugin-sdk/*.

Force safe npm commands out of inherited legacy/strict peer-dependency modes.

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-05-06 07:32:25 +01:00
Peter Steinberger 41bbc4c048 test(plugins): cover pinned npm installs 2026-05-03 14:27:58 +01:00
Vincent Koc f249b1c6df fix(plugins): clean managed git uninstall roots 2026-05-02 23:30:01 -07:00
Vincent Koc 336303e48b fix(plugins): make uninstall teardown idempotent 2026-05-02 10:51:02 -07:00
Peter Steinberger dc848c94b8 refactor: hide plugin helper internals 2026-05-02 07:04:54 +01:00
Peter Steinberger bcd6499abd test: harden plugin update validation 2026-05-01 23:33:05 +01:00
Vincent Koc e302353d61 fix(plugins): harden managed plugin install lifecycle 2026-05-01 14:09:04 -07:00
Peter Steinberger ed8f50f240 refactor: simplify plugin dependency handling
Simplify plugin installation and runtime loading around package-manager-owned dependencies, with Jiti reserved for local/TS fallback paths.

Also scans npm plugin install roots so hoisted transitive dependencies are covered by dependency denylist and node_modules symlink checks.
2026-05-01 21:32:22 +01:00
Shakker 1bd4b7ac4d fix: keep plugin uninstall on metadata path 2026-04-28 11:25:09 +01:00
Peter Steinberger 6bc5fe6952 fix: harden plugin install and uninstall transactions 2026-04-26 10:27:23 +01:00
Peter Steinberger 6cd047e7c2 refactor: clean up update and plugin uninstall helpers 2026-04-26 10:07:39 +01:00
Peter Steinberger c6b7444d16 fix(plugins): reset context engine slot on uninstall 2026-04-26 09:50:34 +01:00
Shakker 6428440086 fix: remove plugins from recorded install roots 2026-04-26 08:11:09 +01:00
Shakker 862b39976d fix: remove managed plugin files on uninstall 2026-04-26 04:16:33 +01:00
Vincent Koc 1e8dc2389e feat(plugins): record local onboarding installs
Record onboarding plugin install source metadata for npm and local paths, while keeping local path install records portable and preserving uninstall cleanup for relative source paths.
2026-04-24 00:27:09 -07:00
Vincent Koc 7198a9f0ee fix(cycles): reduce remaining static import seams 2026-04-11 02:46:41 +01:00
Peter Steinberger 09b31f9123 refactor: dedupe plugin task error formatting 2026-04-07 02:03:34 +01:00
qer 8c079a804c Plugins: clean up channel config on uninstall (#35915)
* Plugins: clean up channel config on uninstall

`openclaw plugins uninstall` only removed `plugins.*` entries but left
`channels.<id>` config behind, causing errors when the gateway
referenced a channel whose plugin no longer existed.

Now `removePluginFromConfig` also deletes the matching
`channels.<pluginId>` entry (exact match only), and the CLI
previews/reports the removal. Shared config keys like `defaults`
and `modelByChannel` are guarded from accidental removal.

* Plugins: sync uninstall preview with channel cleanup

* fix: clean up channel config on uninstall (#35915) (thanks @wbxl2000)

---------

Co-authored-by: George Zhang <georgezhangtj97@gmail.com>
2026-03-27 17:28:38 -07:00
George Zhang 6b72de77ba Revert "Plugins: sync channel uninstall cleanup" 2026-03-27 17:12:57 -07:00
George Zhang 958e3a4c69 Plugins: sync channel uninstall cleanup 2026-03-27 17:10:32 -07:00
JustasM 57d0f65e7d CLI: add plugins uninstall command (#5985) (openclaw#6141) thanks @JustasMonkev
Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test

Co-authored-by: JustasMonkev <59362982+JustasMonkev@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-02-12 20:11:26 -06:00