惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
B
Blog
博客园_首页
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
MyScale Blog
MyScale Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog RSS Feed
M
MIT News - Artificial intelligence
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
量子位
V
V2EX
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - Blog
Martin Fowler
Martin Fowler
Recent Announcements
Recent Announcements
I
InfoQ
博客园 - 【当耐特】

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
refactor(plugins): simplify plugin cache boundaries · ope...
steipete · 2026-04-29 · via Recent Commits to openclaw:main

@@ -87,35 +87,51 @@ discovery order. When setup runtime does execute, registry diagnostics report

8787

drift between `setup.providers` / `setup.cliBackends` and the providers or CLI

8888

backends registered by setup-api without blocking legacy plugins.

898990-

### What the loader caches

91-92-

OpenClaw keeps short in-process caches for:

90+

### Plugin cache boundary

91+92+

OpenClaw does not cache plugin discovery results or direct manifest registry

93+

data behind wall-clock windows. Installs, manifest edits, and load-path changes

94+

must become visible on the next explicit metadata read or snapshot rebuild.

95+96+

The safe metadata fast path is explicit object ownership, not a hidden cache.

97+

Gateway startup hot paths should pass the current `PluginMetadataSnapshot`, the

98+

derived `PluginLookUpTable`, or an explicit manifest registry through the call

99+

chain. Config validation, startup auto-enable, plugin bootstrap, setup lookup,

100+

and provider selection can reuse those objects while they represent the current

101+

config and plugin inventory. When that input changes, rebuild and replace the

102+

snapshot instead of mutating it or keeping historical copies.

103+

Views over the active plugin registry and bundled channel bootstrap helpers

104+

should be recomputed from the current registry/root. Short-lived maps are fine

105+

inside one call to dedupe work or guard reentry; they must not become process

106+

metadata caches.

107+108+

For plugin loading, the persistent cache layer is runtime loading. It may reuse

109+

loader state when code or installed artifacts are actually loaded, such as:

110+111+

- `PluginLoaderCacheState` and compatible active runtime registries

112+

- jiti/module caches and public-surface loader caches used to avoid importing

113+

the same runtime surface repeatedly

114+

- runtime dependency mirrors and filesystem caches for installed plugin

115+

artifacts

116+

- short-lived per-call maps for path normalization or duplicate resolution

117+118+

Those caches are data-plane implementation details. They must not answer

119+

control-plane questions such as "which plugin owns this provider?" unless the

120+

caller deliberately asked for runtime loading.

121+122+

Do not add persistent or wall-clock caches for:

9312394124

- discovery results

95-

- manifest registry data

96-

- loaded plugin registries

97-98-

These caches reduce bursty startup and repeated command overhead. They are safe

99-

to think of as short-lived performance caches, not persistence.

100-101-

Gateway startup hot paths should prefer the current `PluginMetadataSnapshot`,

102-

the derived `PluginLookUpTable`, or an explicit manifest registry passed through

103-

the call chain. Config validation, startup auto-enable, and plugin bootstrap use

104-

the same snapshot when available. For callers that still rebuild manifest

105-

metadata from the persisted installed plugin index, OpenClaw also keeps a small

106-

bounded fallback cache keyed by the installed index, request shape, config

107-

policy, runtime roots, and manifest/package file signatures. That cache is only a

108-

fallback for repeated installed-index reconstruction; it is not a mutable runtime

109-

plugin registry.

110-111-

Performance note:

112-113-

- Set `OPENCLAW_DISABLE_PLUGIN_DISCOVERY_CACHE=1` or

114-

`OPENCLAW_DISABLE_PLUGIN_MANIFEST_CACHE=1` to disable these caches.

115-

- Set `OPENCLAW_DISABLE_INSTALLED_PLUGIN_MANIFEST_REGISTRY_CACHE=1` to disable

116-

only the installed-index manifest-registry fallback cache.

117-

- Tune cache windows with `OPENCLAW_PLUGIN_DISCOVERY_CACHE_MS` and

118-

`OPENCLAW_PLUGIN_MANIFEST_CACHE_MS`.

125+

- direct manifest registries

126+

- manifest registries reconstructed from the installed plugin index

127+

- provider owner lookup, model suppression, provider policy, or public-artifact

128+

metadata

129+

- any other manifest-derived answer where a changed manifest, installed index,

130+

or load path should be visible on the next metadata read

131+132+

Callers that rebuild manifest metadata from the persisted installed plugin

133+

index reconstruct that registry on demand. The installed index is durable

134+

source-plane state; it is not a hidden in-process metadata cache.

119135120136

## Registry model

121137

@@ -944,7 +960,7 @@ source-plane diagnostics without adding a second raw filesystem-path disclosure

944960

surface. The persisted `plugins/installs.json` plugin index is the install

945961

source of truth and can be refreshed without loading plugin runtime modules.

946962

Its `installRecords` map is durable even when a plugin manifest is missing or

947-

invalid; its `plugins` array is a rebuildable manifest/cache view.

963+

invalid; its `plugins` array is a rebuildable manifest view.

948964949965

## Context engine plugins

950966