Commit Graph

4 Commits

Author SHA1 Message Date
Peter Steinberger
89db948bb6 refactor(core): consolidate plugin install pipeline, migrate worktree ledger, carry prepared runtime metadata (#114749)
* refactor(plugins): consolidate install execution

* fix(worktrees): retire pre-ledger registry rows

Release note: Very old managed worktrees without provisioned-file ledgers are retired by openclaw doctor --fix and provision fresh on next use; existing checkout and branch data remain untouched.

* perf(plugins): reuse prepared runtime metadata

* fix(plugins): restore shared install result typing

* refactor(plugins): keep install helpers private
2026-07-27 19:34:01 -04:00
Peter Steinberger
431da14410 fix(plugins): load standalone files without manifests (#111515) 2026-07-19 12:21:11 -07:00
Yuval Dinodia
c17a81b470 fix(plugins): roll back cleared runtime registrations when an activating reload aborts (#103812)
* fix(plugins): roll back cleared runtime registrations when an activating reload aborts

loadOpenClawPlugins clears the process-global agent-harness, plugin-command,
compaction, detached-task, interactive-handler, embedding, memory-embedding,
and memory stores up front on an activating load and only re-registers them at
the end via activatePluginRegistry. The body has a finally with no catch, so a
throw during discovery or manifest load (a corrupted or half-written plugin
manifest mid-upgrade) leaves the previously active registry marked active while
its runtime stores are gone process-wide; the gateway reload driver only logs
and swallows the error.

Snapshot the process-global stores before the clear with the existing
snapshotPluginProcessGlobalState helper and restore them on any throw before
activation. clearActivatedPluginRuntimeState moves next to the snapshot and
restore helpers it pairs with in plugin-registration-transaction.ts, which
already owns atomic plugin registration state and imports from every module the
clear touches; loader.ts re-exports it so existing callers are unchanged.

* fix(plugins): make reload rollback activation-safe

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-18 18:11:16 -07:00
Peter Steinberger
ab3f057cfd refactor: split plugin loader by responsibility (#108513)
* refactor(plugins): split plugin loader

* refactor(plugins): keep loader helpers internal

* refactor(plugins): remove unused loader type import

* test(plugins): cover split runtime registry boundary
2026-07-15 17:51:13 -07:00