chore: Run pnpm format:fix.

This commit is contained in:
cpojer
2026-01-31 21:13:13 +09:00
parent dcc2de15a6
commit 8cab78abbc
624 changed files with 10729 additions and 7514 deletions

View File

@@ -148,6 +148,7 @@ Note: This is idempotent and safe to run multiple times.
### Firewall blocks my connection
If you're locked out:
- Ensure you can access via Tailscale VPN first
- SSH access (port 22) is always allowed
- The gateway is **only** accessible via Tailscale by design
@@ -193,6 +194,7 @@ openclaw channels login
## Advanced Configuration
For detailed security architecture and troubleshooting:
- [Security Architecture](https://github.com/openclaw/openclaw-ansible/blob/main/docs/security.md)
- [Technical Details](https://github.com/openclaw/openclaw-ansible/blob/main/docs/architecture.md)
- [Troubleshooting Guide](https://github.com/openclaw/openclaw-ansible/blob/main/docs/troubleshooting.md)

View File

@@ -26,7 +26,7 @@ Default:
bun install
```
Note: `bun.lock`/`bun.lockb` are gitignored, so theres no repo churn either way. If you want *no lockfile writes*:
Note: `bun.lock`/`bun.lockb` are gitignored, so theres no repo churn either way. If you want _no lockfile writes_:
```sh
bun install --no-save

View File

@@ -1,5 +1,5 @@
---
summary: 'Optional Docker-based setup and onboarding for OpenClaw'
summary: "Optional Docker-based setup and onboarding for OpenClaw"
read_when:
- You want a containerized gateway instead of local installs
- You are validating the Docker flow
@@ -281,32 +281,32 @@ If you plan to install packages in `setupCommand`, note:
agents: {
defaults: {
sandbox: {
mode: 'non-main', // off | non-main | all
scope: 'agent', // session | agent | shared (agent is default)
workspaceAccess: 'none', // none | ro | rw
workspaceRoot: '~/.openclaw/sandboxes',
mode: "non-main", // off | non-main | all
scope: "agent", // session | agent | shared (agent is default)
workspaceAccess: "none", // none | ro | rw
workspaceRoot: "~/.openclaw/sandboxes",
docker: {
image: 'openclaw-sandbox:bookworm-slim',
workdir: '/workspace',
image: "openclaw-sandbox:bookworm-slim",
workdir: "/workspace",
readOnlyRoot: true,
tmpfs: ['/tmp', '/var/tmp', '/run'],
network: 'none',
user: '1000:1000',
capDrop: ['ALL'],
env: { LANG: 'C.UTF-8' },
setupCommand: 'apt-get update && apt-get install -y git curl jq',
tmpfs: ["/tmp", "/var/tmp", "/run"],
network: "none",
user: "1000:1000",
capDrop: ["ALL"],
env: { LANG: "C.UTF-8" },
setupCommand: "apt-get update && apt-get install -y git curl jq",
pidsLimit: 256,
memory: '1g',
memorySwap: '2g',
memory: "1g",
memorySwap: "2g",
cpus: 1,
ulimits: {
nofile: { soft: 1024, hard: 2048 },
nproc: 256,
},
seccompProfile: '/path/to/seccomp.json',
apparmorProfile: 'openclaw-sandbox',
dns: ['1.1.1.1', '8.8.8.8'],
extraHosts: ['internal.service:10.0.0.5'],
seccompProfile: "/path/to/seccomp.json",
apparmorProfile: "openclaw-sandbox",
dns: ["1.1.1.1", "8.8.8.8"],
extraHosts: ["internal.service:10.0.0.5"],
},
prune: {
idleHours: 24, // 0 disables idle pruning
@@ -319,18 +319,18 @@ If you plan to install packages in `setupCommand`, note:
sandbox: {
tools: {
allow: [
'exec',
'process',
'read',
'write',
'edit',
'sessions_list',
'sessions_history',
'sessions_send',
'sessions_spawn',
'session_status',
"exec",
"process",
"read",
"write",
"edit",
"sessions_list",
"sessions_history",
"sessions_send",
"sessions_spawn",
"session_status",
],
deny: ['browser', 'canvas', 'nodes', 'cron', 'discord', 'gateway'],
deny: ["browser", "canvas", "nodes", "cron", "discord", "gateway"],
},
},
},
@@ -366,7 +366,7 @@ This builds `openclaw-sandbox-common:bookworm-slim`. To use it:
{
agents: {
defaults: {
sandbox: { docker: { image: 'openclaw-sandbox-common:bookworm-slim' } },
sandbox: { docker: { image: "openclaw-sandbox-common:bookworm-slim" } },
},
},
}
@@ -410,7 +410,7 @@ Custom browser image:
{
agents: {
defaults: {
sandbox: { browser: { image: 'my-openclaw-browser' } },
sandbox: { browser: { image: "my-openclaw-browser" } },
},
},
}
@@ -437,7 +437,7 @@ docker build -t my-openclaw-sbx -f Dockerfile.sandbox .
{
agents: {
defaults: {
sandbox: { docker: { image: 'my-openclaw-sbx' } },
sandbox: { docker: { image: "my-openclaw-sbx" } },
},
},
}

View File

@@ -12,7 +12,7 @@ OpenClaw ships two installer scripts (served from `openclaw.ai`):
- `https://openclaw.bot/install.sh` — “recommended” installer (global npm install by default; can also install from a GitHub checkout)
- `https://openclaw.bot/install-cli.sh` — non-root-friendly CLI installer (installs into a prefix with its own Node)
- `https://openclaw.ai/install.ps1` — Windows PowerShell installer (npm by default; optional git install)
- `https://openclaw.ai/install.ps1` — Windows PowerShell installer (npm by default; optional git install)
To see the current flags/behavior, run:
@@ -42,7 +42,7 @@ What it does (high level):
- For git installs: runs `openclaw doctor --non-interactive` after install/update (best effort).
- Mitigates `sharp` native install gotchas by defaulting `SHARP_IGNORE_GLOBAL_LIBVIPS=1` (avoids building against system libvips).
If you *want* `sharp` to link against a globally-installed libvips (or youre debugging), set:
If you _want_ `sharp` to link against a globally-installed libvips (or youre debugging), set:
```bash
SHARP_IGNORE_GLOBAL_LIBVIPS=0 curl -fsSL https://openclaw.bot/install.sh | bash
@@ -61,7 +61,7 @@ In non-interactive contexts (no TTY / `--no-prompt`), you must pass `--install-m
Git is required for the `--install-method git` path (clone / pull).
For `npm` installs, Git is *usually* not required, but some environments still end up needing it (e.g. when a package or dependency is fetched via a git URL). The installer currently ensures Git is present to avoid `spawn git ENOENT` surprises on fresh distros.
For `npm` installs, Git is _usually_ not required, but some environments still end up needing it (e.g. when a package or dependency is fetched via a git URL). The installer currently ensures Git is present to avoid `spawn git ENOENT` surprises on fresh distros.
### Why npm hits `EACCES` on fresh Linux

View File

@@ -4,6 +4,7 @@ read_when:
- You are moving OpenClaw to a new laptop/server
- You want to preserve sessions, auth, and channel logins (WhatsApp, etc.)
---
# Migrating OpenClaw to a new machine
This guide migrates a OpenClaw Gateway from one machine to another **without redoing onboarding**.

View File

@@ -28,13 +28,13 @@ If `$(npm prefix -g)/bin` (macOS/Linux) or `$(npm prefix -g)` (Windows) is **not
## Fix: put npms global bin dir on PATH
1) Find your global npm prefix:
1. Find your global npm prefix:
```bash
npm prefix -g
```
2) Add the global npm bin directory to your shell startup file:
2. Add the global npm bin directory to your shell startup file:
- zsh: `~/.zshrc`
- bash: `~/.bashrc`

View File

@@ -8,6 +8,7 @@ read_when:
# Uninstall
Two paths:
- **Easy path** if `openclaw` is still installed.
- **Manual service removal** if the CLI is gone but the service is still running.
@@ -28,19 +29,19 @@ npx -y openclaw uninstall --all --yes --non-interactive
Manual steps (same result):
1) Stop the gateway service:
1. Stop the gateway service:
```bash
openclaw gateway stop
```
2) Uninstall the gateway service (launchd/systemd/schtasks):
2. Uninstall the gateway service (launchd/systemd/schtasks):
```bash
openclaw gateway uninstall
```
3) Delete state + config:
3. Delete state + config:
```bash
rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"
@@ -48,13 +49,13 @@ rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"
If you set `OPENCLAW_CONFIG_PATH` to a custom location outside the state dir, delete that file too.
4) Delete your workspace (optional, removes agent files):
4. Delete your workspace (optional, removes agent files):
```bash
rm -rf ~/.openclaw/workspace
```
5) Remove the CLI install (pick the one you used):
5. Remove the CLI install (pick the one you used):
```bash
npm rm -g openclaw
@@ -62,13 +63,14 @@ pnpm remove -g openclaw
bun remove -g openclaw
```
6) If you installed the macOS app:
6. If you installed the macOS app:
```bash
rm -rf /Applications/OpenClaw.app
```
Notes:
- If you used profiles (`--profile` / `OPENCLAW_PROFILE`), repeat step 3 for each state dir (defaults are `~/.openclaw-<profile>`).
- In remote mode, the state dir lives on the **gateway host**, so run steps 1-4 there too.
@@ -120,6 +122,6 @@ Remove it with `npm rm -g openclaw` (or `pnpm remove -g` / `bun remove -g` if yo
If you run from a repo checkout (`git clone` + `openclaw ...` / `bun run openclaw ...`):
1) Uninstall the gateway service **before** deleting the repo (use the easy path above or manual service removal).
2) Delete the repo directory.
3) Remove state + workspace as shown above.
1. Uninstall the gateway service **before** deleting the repo (use the easy path above or manual service removal).
2. Delete the repo directory.
3. Remove state + workspace as shown above.

View File

@@ -20,6 +20,7 @@ curl -fsSL https://openclaw.bot/install.sh | bash
```
Notes:
- Add `--no-onboard` if you dont want the onboarding wizard to run again.
- For **source installs**, use:
```bash
@@ -49,6 +50,7 @@ npm i -g openclaw@latest
```bash
pnpm add -g openclaw@latest
```
We do **not** recommend Bun for the Gateway runtime (WhatsApp/Telegram bugs).
To switch update channels (git + npm installs):
@@ -74,6 +76,7 @@ openclaw health
```
Notes:
- If your Gateway runs as a service, `openclaw gateway restart` is preferred over killing PIDs.
- If youre pinned to a specific version, see “Rollback / pinning” below.
@@ -86,6 +89,7 @@ openclaw update
```
It runs a safe-ish update flow:
- Requires a clean worktree.
- Switches to the selected channel (tag or branch).
- Fetches + rebases against the configured upstream (dev channel).
@@ -97,9 +101,10 @@ If you installed via **npm/pnpm** (no git metadata), `openclaw update` will try
## Update (Control UI / RPC)
The Control UI has **Update & Restart** (RPC: `update.run`). It:
1) Runs the same source-update flow as `openclaw update` (git checkout only).
2) Writes a restart sentinel with a structured report (stdout/stderr tail).
3) Restarts the gateway and pings the last active session with the report.
1. Runs the same source-update flow as `openclaw update` (git checkout only).
2. Writes a restart sentinel with a structured report (stdout/stderr tail).
3. Restarts the gateway and pings the last active session with the report.
If the rebase fails, the gateway aborts and restarts without applying the update.
@@ -125,6 +130,7 @@ openclaw health
```
Notes:
- `pnpm build` matters when you run the packaged `openclaw` binary ([`openclaw.mjs`](https://github.com/openclaw/openclaw/blob/main/openclaw.mjs)) or use Node to run `dist/`.
- If you run from a repo checkout without a global install, use `pnpm openclaw ...` for CLI commands.
- If you run directly from TypeScript (`pnpm openclaw ...`), a rebuild is usually unnecessary, but **config migrations still apply** → run doctor.
@@ -137,6 +143,7 @@ Doctor is the “safe update” command. Its intentionally boring: repair + m
Note: if youre on a **source install** (git checkout), `openclaw doctor` will offer to run `openclaw update` first.
Typical things it does:
- Migrate deprecated config keys / legacy config file locations.
- Audit DM policies and warn on risky “open” settings.
- Check Gateway health and can offer to restart.
@@ -158,6 +165,7 @@ openclaw logs --follow
```
If youre supervised:
- macOS launchd (app-bundled LaunchAgent): `launchctl kickstart -k gui/$UID/bot.molt.gateway` (use `bot.molt.<profile>`; legacy `com.openclaw.*` still works)
- Linux systemd user service: `systemctl --user restart openclaw-gateway[-<profile>].service`
- Windows (WSL2): `systemctl --user restart openclaw-gateway[-<profile>].service`