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

推荐订阅源

Recent Announcements
Recent Announcements
博客园 - Franky
博客园 - 三生石上(FineUI控件)
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
人人都是产品经理
人人都是产品经理
博客园 - 【当耐特】
L
LangChain Blog
Stack Overflow Blog
Stack Overflow Blog
H
Help Net Security
爱范儿
爱范儿
罗磊的独立博客
博客园_首页
美团技术团队
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
量子位
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
V
Visual Studio Blog
T
Tailwind CSS Blog

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
docs(updating): group advanced npm topics in AccordionGro...
vincentkoc · 2026-04-27 · via Recent Commits to openclaw:main

@@ -101,52 +101,33 @@ pnpm add -g openclaw@latest

101101

bun add -g openclaw@latest

102102

```

103103104-

### Global npm installs and runtime dependencies

105-106-

OpenClaw treats packaged global installs as read-only at runtime, even when the

107-

global package directory is writable by the current user. Bundled plugin runtime

108-

dependencies are staged into a writable runtime directory instead of mutating the

109-

package tree. This keeps `openclaw update` from racing with a running gateway or

110-

local agent that is repairing plugin dependencies during the same install.

111-112-

Some Linux npm setups install global packages under root-owned directories such

113-

as `/usr/lib/node_modules/openclaw`. OpenClaw supports that layout through the

114-

same external staging path.

115-116-

For hardened systemd units, set a writable stage directory that is included in

117-

`ReadWritePaths`:

118-119-

```ini

120-

Environment=OPENCLAW_PLUGIN_STAGE_DIR=/var/lib/openclaw/plugin-runtime-deps

121-

ReadWritePaths=/var/lib/openclaw /home/openclaw/.openclaw /tmp

122-

```

123-124-

If `OPENCLAW_PLUGIN_STAGE_DIR` is not set, OpenClaw uses `$STATE_DIRECTORY` when

125-

systemd provides it, then falls back to `~/.openclaw/plugin-runtime-deps`.

126-

The repair step treats that stage as an OpenClaw-owned local package root and

127-

ignores user npm prefix/global settings, so global-install npm config does not

128-

redirect bundled plugin dependencies into `~/node_modules` or the global package

129-

tree.

130-131-

Before package updates and bundled runtime-dependency repairs, OpenClaw tries a

132-

best-effort disk-space check for the target volume. Low space produces a warning

133-

with the checked path, but does not block the update because filesystem quotas,

134-

snapshots, and network volumes can change after the check. The actual npm

135-

install, copy, and post-install verification remain authoritative.

136-137-

### Bundled plugin runtime dependencies

138-139-

Packaged installs keep bundled plugin runtime dependencies out of the read-only

140-

package tree. On startup and during `openclaw doctor --fix`, OpenClaw repairs

141-

runtime dependencies only for bundled plugins that are active in config, active

142-

through legacy channel config, or enabled by their bundled manifest default.

143-

Persisted channel auth state alone does not trigger Gateway startup

144-

runtime-dependency repair.

145-146-

Explicit disablement wins. A disabled plugin or channel does not get its

147-

runtime dependencies repaired just because it exists in the package. External

148-

plugins and custom load paths still use `openclaw plugins install` or

149-

`openclaw plugins update`.

104+

### Advanced npm install topics

105+106+

<AccordionGroup>

107+

<Accordion title="Read-only package tree">

108+

OpenClaw treats packaged global installs as read-only at runtime, even when the global package directory is writable by the current user. Bundled plugin runtime dependencies are staged into a writable runtime directory instead of mutating the package tree. This keeps `openclaw update` from racing with a running gateway or local agent that is repairing plugin dependencies during the same install.

109+110+

Some Linux npm setups install global packages under root-owned directories such as `/usr/lib/node_modules/openclaw`. OpenClaw supports that layout through the same external staging path.

111+

</Accordion>

112+

<Accordion title="Hardened systemd units">

113+

Set a writable stage directory that is included in `ReadWritePaths`:

114+115+

```ini

116+

Environment=OPENCLAW_PLUGIN_STAGE_DIR=/var/lib/openclaw/plugin-runtime-deps

117+

ReadWritePaths=/var/lib/openclaw /home/openclaw/.openclaw /tmp

118+

```

119+120+

If `OPENCLAW_PLUGIN_STAGE_DIR` is not set, OpenClaw uses `$STATE_DIRECTORY` when systemd provides it, then falls back to `~/.openclaw/plugin-runtime-deps`. The repair step treats that stage as an OpenClaw-owned local package root and ignores user npm prefix and global settings, so global-install npm config does not redirect bundled plugin dependencies into `~/node_modules` or the global package tree.

121+

</Accordion>

122+

<Accordion title="Disk-space preflight">

123+

Before package updates and bundled runtime-dependency repairs, OpenClaw tries a best-effort disk-space check for the target volume. Low space produces a warning with the checked path, but does not block the update because filesystem quotas, snapshots, and network volumes can change after the check. The actual npm install, copy, and post-install verification remain authoritative.

124+

</Accordion>

125+

<Accordion title="Bundled plugin runtime dependencies">

126+

Packaged installs keep bundled plugin runtime dependencies out of the read-only package tree. On startup and during `openclaw doctor --fix`, OpenClaw repairs runtime dependencies only for bundled plugins that are active in config, active through legacy channel config, or enabled by their bundled manifest default. Persisted channel auth state alone does not trigger Gateway startup runtime-dependency repair.

127+128+

Explicit disablement wins. A disabled plugin or channel does not get its runtime dependencies repaired just because it exists in the package. External plugins and custom load paths still use `openclaw plugins install` or `openclaw plugins update`.

129+

</Accordion>

130+

</AccordionGroup>

150131151132

## Auto-updater

152133

@@ -210,7 +191,9 @@ openclaw doctor

210191

openclaw gateway restart

211192

```

212193213-

Tip: `npm view openclaw version` shows the current published version.

194+

<Tip>

195+

`npm view openclaw version` shows the current published version.

196+

</Tip>

214197215198

### Pin a commit (source)

216199

@@ -232,6 +215,6 @@ To return to latest: `git checkout main && git pull`.

232215233216

## Related

234217235-

- [Install Overview](/install)all installation methods

236-

- [Doctor](/gateway/doctor)health checks after updates

237-

- [Migrating](/install/migrating)major version migration guides

218+

- [Install overview](/install): all installation methods.

219+

- [Doctor](/gateway/doctor): health checks after updates.

220+

- [Migrating](/install/migrating): major version migration guides.