You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8640e42
Browse filesBrowse the repository at this point in the historyBrowse files
perf(plugins): keep state-db write machinery out of metadata read paths
Metadata-only CLI reads (openclaw plugins list --json and friends) loaded
the full Kysely-backed state-db graph (~250 modules) through three
read-path fusions. Split them, behavior-neutral (module layout and
imports only):
- installed-plugin-index-store.ts now only reads/parses; the write,
restore, and refresh functions move verbatim to
installed-plugin-index-store-write.ts (write transactions are sync per
the SQLite commit doctrine, so this is a module split, not a dynamic
import). Writer callers and test mocks route to the write module.
- refreshPluginRegistry moves out of plugin-registry-snapshot.ts into
plugin-registry-refresh.ts, and the plugin-registry.ts barrel no
longer re-exports it: ESM evaluates every barrel re-export source, so
that one writer re-export dragged the write graph into every barrel
consumer on the metadata path.
- openclaw-state-db-readonly.ts no longer imports the heavy
openclaw-state-db.js module: cache-trio calls go straight to
openClawStateDatabaseCache, constants come from
openclaw-state-db-contract.js, and
registerNodeSqliteKyselyQueryErrorHandler moves into
kysely-sync-cache-state.ts (that module's stated charter). Doctor and
gateway schema preflights read OPENCLAW_STATE_SCHEMA_VERSION from the
contract module instead of value-loading the heavy module; the
now-dead wrapper exports are deleted or un-exported.
Module-load census on the built CLI (module.registerHooks recorder,
isolated HOME): the installed-plugin-index / manifest-registry / store /
readonly / snapshot chain no longer imports the openclaw-state-db chunk,
and the write module does not load on plugins list --json. kysely itself
still loads via the separately owned config-io fusions (io.health-state,
legacy-config-migrations -> config-machine-state,
sqlite-audit-record-store, cron store) - the remaining named follow-ups
from #131181.
Named follow-up from #131181 (f49d250).
0 commit comments