chore: fix formatting and CI

This commit is contained in:
Shakker
2026-02-02 16:41:49 +00:00
parent 777756e1c2
commit 3711143549
10 changed files with 56 additions and 64 deletions

View File

@@ -45,7 +45,7 @@ Docs: https://docs.openclaw.ai
- Streaming: stabilize partial streaming filters.
- Auto-reply: avoid referencing workspace files in /new greeting prompt. (#5706) Thanks @bravostation.
- Tools: align tool execute adapters/signatures (legacy + parameter order + arg normalization).
- Tools: treat "*" tool allowlist entries as valid to avoid spurious unknown-entry warnings.
- Tools: treat "\*" tool allowlist entries as valid to avoid spurious unknown-entry warnings.
- Skills: update session-logs paths from .clawdbot to .openclaw. (#4502)
- Slack: harden media fetch limits and Slack file URL validation. (#6639) Thanks @davidiach.
- Lint: satisfy curly rule after import sorting. (#6310)

View File

@@ -865,11 +865,7 @@
},
{
"group": "Help",
"pages": [
"help/index",
"help/troubleshooting",
"help/faq"
]
"pages": ["help/index", "help/troubleshooting", "help/faq"]
},
{
"group": "Install & Updates",
@@ -1002,13 +998,7 @@
},
{
"group": "Web & Interfaces",
"pages": [
"web/index",
"web/control-ui",
"web/dashboard",
"web/webchat",
"tui"
]
"pages": ["web/index", "web/control-ui", "web/dashboard", "web/webchat", "tui"]
},
{
"group": "Channels",
@@ -1186,11 +1176,7 @@
},
{
"group": "Help",
"pages": [
"zh-CN/help/index",
"zh-CN/help/troubleshooting",
"zh-CN/help/faq"
]
"pages": ["zh-CN/help/index", "zh-CN/help/troubleshooting", "zh-CN/help/faq"]
},
{
"group": "Install & Updates",

View File

@@ -49,7 +49,7 @@ Client Gateway网关
| 消息 | `send``poll``agent``agent.wait` | 有副作用的操作需要 `idempotencyKey` |
| 聊天 | `chat.history``chat.send``chat.abort``chat.inject` | WebChat 使用这些 |
| 会话 | `sessions.list``sessions.patch``sessions.delete` | 会话管理 |
| 节点 | `node.list``node.invoke``node.pair.*` | Gateway网关 WS + 节点操作 |
| 节点 | `node.list``node.invoke``node.pair.*` | Gateway网关 WS + 节点操作 |
| 事件 | `tick``presence``agent``chat``health``shutdown` | 服务器推送 |
权威列表位于 `src/gateway/server.ts``METHODS``EVENTS`)。

View File

@@ -24,15 +24,15 @@ x-i18n:
快速分诊命令(按顺序执行):
| 命令 | 告诉你什么 | 何时使用 |
| ---------------------------------- | --------------------------------------------------------------------------------- | -------------------------------- |
| 命令 | 告诉你什么 | 何时使用 |
| ---------------------------------- | ------------------------------------------------------------------------------------ | -------------------------------- |
| `openclaw status` | 本地摘要:操作系统 + 更新、Gateway网关可达性/模式、服务、智能体/会话、提供商配置状态 | 首次检查,快速概览 |
| `openclaw status --all` | 完整本地诊断(只读、可粘贴、基本安全)包含日志尾部 | 需要分享调试报告时 |
| `openclaw status --deep` | 运行 Gateway网关健康检查包括提供商探测需要 Gateway网关可达 | 当"已配置"不等于"正常工作"时 |
| `openclaw gateway probe` | Gateway网关发现 + 可达性(本地 + 远程目标) | 怀疑探测了错误的 Gateway网关时 |
| `openclaw channels status --probe` | 向运行中的 Gateway网关查询渠道状态可选探测 | Gateway网关可达但渠道异常时 |
| `openclaw status --all` | 完整本地诊断(只读、可粘贴、基本安全)包含日志尾部 | 需要分享调试报告时 |
| `openclaw status --deep` | 运行 Gateway网关健康检查包括提供商探测需要 Gateway网关可达 | 当"已配置"不等于"正常工作"时 |
| `openclaw gateway probe` | Gateway网关发现 + 可达性(本地 + 远程目标) | 怀疑探测了错误的 Gateway网关时 |
| `openclaw channels status --probe` | 向运行中的 Gateway网关查询渠道状态可选探测 | Gateway网关可达但渠道异常时 |
| `openclaw gateway status` | 管理器状态launchd/systemd/schtasks、运行时 PID/退出码、最后一次 Gateway网关错误 | 服务"看起来已加载"但实际未运行时 |
| `openclaw logs --follow` | 实时日志(运行时问题的最佳信号源) | 需要查看实际失败原因时 |
| `openclaw logs --follow` | 实时日志(运行时问题的最佳信号源) | 需要查看实际失败原因时 |
**分享输出:** 优先使用 `openclaw status --all`(它会脱敏令牌)。如果粘贴 `openclaw status` 的输出,建议先设置 `OPENCLAW_SHOW_SECRETS=0`(令牌预览)。
@@ -685,13 +685,13 @@ openclaw channels login --verbose
## 日志位置
| 日志 | 位置 |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Gateway网关文件日志结构化 | `/tmp/openclaw/openclaw-YYYY-MM-DD.log`(或 `logging.file` |
| 日志 | 位置 |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Gateway网关文件日志结构化 | `/tmp/openclaw/openclaw-YYYY-MM-DD.log`(或 `logging.file` |
| Gateway网关服务日志管理器 | macOS`$OPENCLAW_STATE_DIR/logs/gateway.log` + `gateway.err.log`(默认:`~/.openclaw/logs/...`profile 使用 `~/.openclaw-<profile>/logs/...`<br />Linux`journalctl --user -u openclaw-gateway[-<profile>].service -n 200 --no-pager`<br />Windows`schtasks /Query /TN "OpenClaw Gateway网关 (<profile>)" /V /FO LIST` |
| 会话文件 | `$OPENCLAW_STATE_DIR/agents/<agentId>/sessions/` |
| 媒体缓存 | `$OPENCLAW_STATE_DIR/media/` |
| 凭据 | `$OPENCLAW_STATE_DIR/credentials/` |
| 会话文件 | `$OPENCLAW_STATE_DIR/agents/<agentId>/sessions/` |
| 媒体缓存 | `$OPENCLAW_STATE_DIR/media/` |
| 凭据 | `$OPENCLAW_STATE_DIR/credentials/` |
## 健康检查

View File

@@ -87,7 +87,7 @@ primary_region = "iad"
| 设置 | 原因 |
| ------------------------------ | ------------------------------------------------------------------------- |
| `--bind lan` | 绑定到 `0.0.0.0`,使 Fly 的代理能够访问 Gateway网关 |
| `--bind lan` | 绑定到 `0.0.0.0`,使 Fly 的代理能够访问 Gateway网关 |
| `--allow-unconfigured` | 无需配置文件即可启动(之后再创建) |
| `internal_port = 3000` | 必须与 `--port 3000`(或 `OPENCLAW_GATEWAY_PORT`)匹配,用于 Fly 健康检查 |
| `memory = "2048mb"` | 512MB 太小;推荐 2GB |

View File

@@ -414,18 +414,18 @@ gcloud compute ssh openclaw-gateway --zone=us-central1-a -- -L 18789:127.0.0.1:1
OpenClaw 在 Docker 中运行,但 Docker 并非数据来源。
所有长期状态必须在重启、重建和重启动后仍然存在。
| 组件 | 位置 | 持久化机制 | 备注 |
| -------------- | --------------------------------- | --------------- | --------------------------- |
| Gateway网关配置 | `/home/node/.openclaw/` | 宿主机卷挂载 | 包含 `openclaw.json`、令牌 |
| 模型认证配置 | `/home/node/.openclaw/` | 宿主机卷挂载 | OAuth 令牌、API 密钥 |
| Skills配置 | `/home/node/.openclaw/skills/` | 宿主机卷挂载 | Skills 级别状态 |
| 智能体工作区 | `/home/node/.openclaw/workspace/` | 宿主机卷挂载 | 代码和智能体产物 |
| WhatsApp 会话 | `/home/node/.openclaw/` | 宿主机卷挂载 | 保留二维码登录 |
| Gmail 密钥环 | `/home/node/.openclaw/` | 宿主机卷 + 密码 | 需要 `GOG_KEYRING_PASSWORD` |
| 外部二进制文件 | `/usr/local/bin/` | Docker 镜像 | 必须在构建时内置 |
| Node 运行时 | 容器文件系统 | Docker 镜像 | 每次镜像构建时重建 |
| 操作系统软件包 | 容器文件系统 | Docker 镜像 | 请勿在运行时安装 |
| Docker 容器 | 临时性 | 可重启 | 可安全销毁 |
| 组件 | 位置 | 持久化机制 | 备注 |
| --------------- | --------------------------------- | --------------- | --------------------------- |
| Gateway网关配置 | `/home/node/.openclaw/` | 宿主机卷挂载 | 包含 `openclaw.json`、令牌 |
| 模型认证配置 | `/home/node/.openclaw/` | 宿主机卷挂载 | OAuth 令牌、API 密钥 |
| Skills配置 | `/home/node/.openclaw/skills/` | 宿主机卷挂载 | Skills 级别状态 |
| 智能体工作区 | `/home/node/.openclaw/workspace/` | 宿主机卷挂载 | 代码和智能体产物 |
| WhatsApp 会话 | `/home/node/.openclaw/` | 宿主机卷挂载 | 保留二维码登录 |
| Gmail 密钥环 | `/home/node/.openclaw/` | 宿主机卷 + 密码 | 需要 `GOG_KEYRING_PASSWORD` |
| 外部二进制文件 | `/usr/local/bin/` | Docker 镜像 | 必须在构建时内置 |
| Node 运行时 | 容器文件系统 | Docker 镜像 | 每次镜像构建时重建 |
| 操作系统软件包 | 容器文件系统 | Docker 镜像 | 请勿在运行时安装 |
| Docker 容器 | 临时性 | 可重启 | 可安全销毁 |
---

View File

@@ -323,15 +323,15 @@ ssh -N -L 18789:127.0.0.1:18789 root@YOUR_VPS_IP
OpenClaw 在 Docker 中运行,但 Docker 不是数据源。
所有长期状态必须能在重启、重建和重启后保留。
| 组件 | 位置 | 持久化机制 | 备注 |
| -------------- | --------------------------------- | --------------- | --------------------------- |
| Gateway网关配置 | `/home/node/.openclaw/` | 宿主机卷挂载 | 包含 `openclaw.json`、令牌 |
| 模型认证配置 | `/home/node/.openclaw/` | 宿主机卷挂载 | OAuth 令牌、API 密钥 |
| Skills配置 | `/home/node/.openclaw/skills/` | 宿主机卷挂载 | Skills 级别状态 |
| 智能体工作区 | `/home/node/.openclaw/workspace/` | 宿主机卷挂载 | 代码和智能体产物 |
| WhatsApp 会话 | `/home/node/.openclaw/` | 宿主机卷挂载 | 保留二维码登录状态 |
| Gmail 密钥环 | `/home/node/.openclaw/` | 宿主机卷 + 密码 | 需要 `GOG_KEYRING_PASSWORD` |
| 外部二进制文件 | `/usr/local/bin/` | Docker 镜像 | 必须在构建时内置 |
| Node 运行时 | 容器文件系统 | Docker 镜像 | 每次构建镜像时重建 |
| 操作系统软件包 | 容器文件系统 | Docker 镜像 | 不要在运行时安装 |
| Docker 容器 | 临时性 | 可重启 | 可安全销毁 |
| 组件 | 位置 | 持久化机制 | 备注 |
| --------------- | --------------------------------- | --------------- | --------------------------- |
| Gateway网关配置 | `/home/node/.openclaw/` | 宿主机卷挂载 | 包含 `openclaw.json`、令牌 |
| 模型认证配置 | `/home/node/.openclaw/` | 宿主机卷挂载 | OAuth 令牌、API 密钥 |
| Skills配置 | `/home/node/.openclaw/skills/` | 宿主机卷挂载 | Skills 级别状态 |
| 智能体工作区 | `/home/node/.openclaw/workspace/` | 宿主机卷挂载 | 代码和智能体产物 |
| WhatsApp 会话 | `/home/node/.openclaw/` | 宿主机卷挂载 | 保留二维码登录状态 |
| Gmail 密钥环 | `/home/node/.openclaw/` | 宿主机卷 + 密码 | 需要 `GOG_KEYRING_PASSWORD` |
| 外部二进制文件 | `/usr/local/bin/` | Docker 镜像 | 必须在构建时内置 |
| Node 运行时 | 容器文件系统 | Docker 镜像 | 每次构建镜像时重建 |
| 操作系统软件包 | 容器文件系统 | Docker 镜像 | 不要在运行时安装 |
| Docker 容器 | 临时性 | 可重启 | 可安全销毁 |

View File

@@ -176,6 +176,7 @@ pnpm ui:dev # 首次运行时自动安装 UI 依赖
然后将 UI 指向你的 Gateway网关 WS URL例如 `ws://127.0.0.1:18789`)。
## 调试/测试:开发服务器 + 远程 Gateway网关控制界面是静态文件WebSocket 目标可配置,可以
与 HTTP 源不同。当你想在本地使用 Vite 开发服务器但 Gateway网关运行在其他地方时这很方便。
1. 启动 UI 开发服务器:`pnpm ui:dev`

View File

@@ -6,12 +6,14 @@ import { handleChatScroll, scheduleChatScroll, resetChatScroll } from "./app-scr
/* ------------------------------------------------------------------ */
/** Minimal ScrollHost stub for unit tests. */
function createScrollHost(overrides: {
scrollHeight?: number;
scrollTop?: number;
clientHeight?: number;
overflowY?: string;
} = {}) {
function createScrollHost(
overrides: {
scrollHeight?: number;
scrollTop?: number;
clientHeight?: number;
overflowY?: string;
} = {},
) {
const {
scrollHeight = 2000,
scrollTop = 1500,

View File

@@ -323,7 +323,10 @@ export class OpenClawApp extends LitElement {
scrollToBottom() {
resetChatScrollInternal(this as unknown as Parameters<typeof resetChatScrollInternal>[0]);
scheduleChatScrollInternal(this as unknown as Parameters<typeof scheduleChatScrollInternal>[0], true);
scheduleChatScrollInternal(
this as unknown as Parameters<typeof scheduleChatScrollInternal>[0],
true,
);
}
async loadAssistantIdentity() {