openclaw-agent-dashboard 1.0.21 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -321
- package/frontend-dist/assets/index-B7XqKAxm.css +1 -0
- package/frontend-dist/assets/index-CxJaSYyo.js +24 -0
- package/{frontend → frontend-dist}/index.html +2 -1
- package/{plugin/openclaw.plugin.json → openclaw.plugin.json} +2 -2
- package/package.json +21 -13
- package/.github/workflows/release.yml +0 -56
- package/VERSION_DISPLAY_delivery.md +0 -242
- package/VERSION_DISPLAY_implementation_summary.md +0 -315
- package/design_manifest.md +0 -100
- package/docs/CHANGELOG_AGENT_MODIFICATIONS.md +0 -132
- package/docs/MAINTAINER_RELEASE_WORKFLOW.md +0 -211
- package/docs/Openclaw-Agent-Dashboard/345/217/221/345/270/203/344/270/216/346/233/264/346/226/260.md +0 -147
- package/docs/RELEASE-LATEST.md +0 -189
- package/docs/RELEASE-MODEL-CONFIG.md +0 -95
- package/docs/WINDOWS_INSTALL_TROUBLESHOOTING.md +0 -171
- package/docs/design/.gitkeep +0 -0
- package/docs/design/VERSION_DISPLAY_design.md +0 -1236
- package/docs/release-guide.md +0 -259
- package/docs/release-operations-manual.md +0 -167
- package/docs/reviews/.gitkeep +0 -0
- package/docs/reviews/approval_history.json +0 -14
- package/docs/reviews/cr_VERSION_DISPLAY.md +0 -397
- package/docs/reviews/traceability_manifest.json +0 -279
- package/docs/specs/VERSION_DISPLAY_spec.md +0 -371
- package/docs/specs/tr3-install-system.md +0 -580
- package/docs/windows-collaboration-model-paths-troubleshooting.md +0 -0
- package/frontend/package-lock.json +0 -1240
- package/frontend/package.json +0 -19
- package/frontend/src/App.vue +0 -355
- package/frontend/src/components/AgentCard.vue +0 -796
- package/frontend/src/components/AgentConfigPanel.vue +0 -539
- package/frontend/src/components/AgentDetailPanel.vue +0 -738
- package/frontend/src/components/ErrorAnalysisView.vue +0 -546
- package/frontend/src/components/ErrorCenterPanel.vue +0 -844
- package/frontend/src/components/PerformanceMonitor.vue +0 -515
- package/frontend/src/components/SettingsPanel.vue +0 -236
- package/frontend/src/components/TokenAnalysisPanel.vue +0 -683
- package/frontend/src/components/chain/ChainEdge.vue +0 -85
- package/frontend/src/components/chain/ChainNode.vue +0 -166
- package/frontend/src/components/chain/TaskChainView.vue +0 -425
- package/frontend/src/components/chain/index.ts +0 -3
- package/frontend/src/components/chain/types.ts +0 -70
- package/frontend/src/components/collaboration/CollaborationFlowSection.vue +0 -1032
- package/frontend/src/components/collaboration/CollaborationFlowWrapper.vue +0 -113
- package/frontend/src/components/common/VersionDisplay.vue +0 -187
- package/frontend/src/components/performance/PerformancePanel.vue +0 -119
- package/frontend/src/components/performance/PerformanceSection.vue +0 -1137
- package/frontend/src/components/tasks/TaskStatusSection.vue +0 -973
- package/frontend/src/components/timeline/TimelineConnector.vue +0 -31
- package/frontend/src/components/timeline/TimelineRound.vue +0 -135
- package/frontend/src/components/timeline/TimelineStep.vue +0 -691
- package/frontend/src/components/timeline/TimelineToolLink.vue +0 -109
- package/frontend/src/components/timeline/TimelineView.vue +0 -540
- package/frontend/src/components/timeline/index.ts +0 -5
- package/frontend/src/components/timeline/types.ts +0 -120
- package/frontend/src/composables/index.ts +0 -7
- package/frontend/src/composables/useDebounce.ts +0 -48
- package/frontend/src/composables/useRealtime.ts +0 -52
- package/frontend/src/composables/useState.ts +0 -52
- package/frontend/src/composables/useThrottle.ts +0 -46
- package/frontend/src/composables/useVirtualScroll.ts +0 -106
- package/frontend/src/main.ts +0 -4
- package/frontend/src/managers/EventDispatcher.ts +0 -127
- package/frontend/src/managers/RealtimeDataManager.ts +0 -302
- package/frontend/src/managers/StateManager.ts +0 -128
- package/frontend/src/managers/index.ts +0 -5
- package/frontend/src/types/collaboration.ts +0 -135
- package/frontend/src/types/index.ts +0 -20
- package/frontend/src/types/performance.ts +0 -105
- package/frontend/src/types/task.ts +0 -38
- package/frontend/vite.config.ts +0 -18
- package/legacy_code_anatomy.md +0 -518
- package/plugin/README.md +0 -99
- package/plugin/config.json.example +0 -1
- package/plugin/package.json +0 -26
- package/scripts/build-plugin.js +0 -81
- package/scripts/bundle.sh +0 -62
- package/scripts/install-plugin.sh +0 -162
- package/scripts/install-python-deps.sh +0 -226
- package/scripts/install.js +0 -684
- package/scripts/install.sh +0 -367
- package/scripts/lib/common.sh +0 -137
- package/scripts/release-pack.sh +0 -110
- package/scripts/start.js +0 -50
- package/scripts/test_available_models.py +0 -284
- package/scripts/test_version_display.sh +0 -128
- package/scripts/test_websocket_ping.py +0 -44
- package/session_registry.json +0 -58
- package/tests/.gitkeep +0 -0
- package/tests/qa_regression_report.md +0 -359
- package/tests/qa_version_display_report.md +0 -598
- /package/{src/backend → dashboard}/agents.py +0 -0
- /package/{src/backend → dashboard}/api/__init__.py +0 -0
- /package/{src/backend → dashboard}/api/agent_config_api.py +0 -0
- /package/{src/backend → dashboard}/api/agents.py +0 -0
- /package/{src/backend → dashboard}/api/agents_config.py +0 -0
- /package/{src/backend → dashboard}/api/chains.py +0 -0
- /package/{src/backend → dashboard}/api/collaboration.py +0 -0
- /package/{src/backend → dashboard}/api/debug_paths.py +0 -0
- /package/{src/backend → dashboard}/api/error_analysis.py +0 -0
- /package/{src/backend → dashboard}/api/errors.py +0 -0
- /package/{src/backend → dashboard}/api/performance.py +0 -0
- /package/{src/backend → dashboard}/api/subagents.py +0 -0
- /package/{src/backend → dashboard}/api/timeline.py +0 -0
- /package/{src/backend → dashboard}/api/version.py +0 -0
- /package/{src/backend → dashboard}/api/websocket.py +0 -0
- /package/{src/backend → dashboard}/collaboration.py +0 -0
- /package/{src/backend → dashboard}/data/__init__.py +0 -0
- /package/{src/backend → dashboard}/data/agent_config_manager.py +0 -0
- /package/{src/backend → dashboard}/data/chain_reader.py +0 -0
- /package/{src/backend → dashboard}/data/config_reader.py +0 -0
- /package/{src/backend → dashboard}/data/error_analyzer.py +0 -0
- /package/{src/backend → dashboard}/data/session_reader.py +0 -0
- /package/{src/backend → dashboard}/data/subagent_reader.py +0 -0
- /package/{src/backend → dashboard}/data/task_history.py +0 -0
- /package/{src/backend → dashboard}/data/timeline_reader.py +0 -0
- /package/{src/backend → dashboard}/data/version_info_reader.py +0 -0
- /package/{src/backend → dashboard}/errors.py +0 -0
- /package/{src/backend → dashboard}/main.py +0 -0
- /package/{src/backend → dashboard}/mechanism_reader.py +0 -0
- /package/{src/backend → dashboard}/mechanisms.py +0 -0
- /package/{src/backend → dashboard}/performance.py +0 -0
- /package/{src/backend → dashboard}/requirements.txt +0 -0
- /package/{src/backend → dashboard}/session_reader.py +0 -0
- /package/{src/backend → dashboard}/status/__init__.py +0 -0
- /package/{src/backend → dashboard}/status/change_tracker.py +0 -0
- /package/{src/backend → dashboard}/status/error_detector.py +0 -0
- /package/{src/backend → dashboard}/status/status_cache.py +0 -0
- /package/{src/backend → dashboard}/status/status_calculator.py +0 -0
- /package/{src/backend → dashboard}/status_calculator.py +0 -0
- /package/{src/backend → dashboard}/subagent_reader.py +0 -0
- /package/{src/backend → dashboard}/watchers/__init__.py +0 -0
- /package/{src/backend → dashboard}/watchers/file_watcher.py +0 -0
- /package/{plugin/index.js → index.js} +0 -0
package/docs/RELEASE-LATEST.md
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
# 发布新 Latest 版本指南
|
|
2
|
-
|
|
3
|
-
> 修改工程后,按本文步骤推送新 release,该版本会自动成为 GitHub 上的 **Latest**,用户一键安装即会装到该版本。
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 一、发布前必读
|
|
8
|
-
|
|
9
|
-
### 1.1 版本号从哪里来?
|
|
10
|
-
|
|
11
|
-
Release 的 **tag 和安装包版本** 由仓库里**两个文件**的 `version` 字段决定(不是由你打的 git tag 名决定):
|
|
12
|
-
|
|
13
|
-
| 文件 | 作用 |
|
|
14
|
-
|------|------|
|
|
15
|
-
| `plugin/openclaw.plugin.json` | 插件元数据,**Release 流程会读这里的 version** 来创建 tag 和 tgz 包名。 |
|
|
16
|
-
| `plugin/package.json` | Node 包配置,需与上面保持一致,否则包版本和展示会错乱。 |
|
|
17
|
-
|
|
18
|
-
**重要**:先改这两个文件里的版本号并提交,再打同版本的 git tag。否则会出现「tag 是 v1.0.2、Release 却是 v1.0.0」的情况。
|
|
19
|
-
|
|
20
|
-
### 1.2 流程概览
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
改代码 → 改两处 version → 提交并 push main → 打 tag 并 push tag → 自动构建并设为 Latest
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## 二、操作步骤(以发布 v1.0.2 为例)
|
|
29
|
-
|
|
30
|
-
### 步骤 1:在 main 上并拉取最新
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
git checkout main
|
|
34
|
-
git pull origin main
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### 步骤 2:修改两处版本号
|
|
38
|
-
|
|
39
|
-
将 **`plugin/openclaw.plugin.json`** 和 **`plugin/package.json`** 中的 `"version"` 改为新版本,例如 `"1.0.2"`。
|
|
40
|
-
|
|
41
|
-
- 编辑 `plugin/openclaw.plugin.json`,找到 `"version": "x.x.x"` 改为 `"1.0.2"`。
|
|
42
|
-
- 编辑 `plugin/package.json`,同样把 `"version"` 改为 `"1.0.2"`。
|
|
43
|
-
|
|
44
|
-
或用一条命令同时改(把下面的 `1.0.1` 换成你当前版本,`1.0.2` 换成目标版本):
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
sed -i 's/"version": "1.0.1"/"version": "1.0.2"/' plugin/openclaw.plugin.json plugin/package.json
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### 步骤 3:提交并推送到 main
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
git add plugin/openclaw.plugin.json plugin/package.json
|
|
54
|
-
git commit -m "chore: bump version to 1.0.2"
|
|
55
|
-
git push origin main
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
> 注意:提交信息用 `-m "..."`,不要写成 `git commit "..."`(会报错 pathspec)。
|
|
59
|
-
|
|
60
|
-
### 步骤 4:打 tag 并推送(触发 Release)
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
git tag v1.0.2
|
|
64
|
-
git push origin v1.0.2
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
推送 tag 后,GitHub Actions 会自动:
|
|
68
|
-
|
|
69
|
-
1. 用该 tag 对应的 commit 构建
|
|
70
|
-
2. 读取 `plugin/openclaw.plugin.json` 的 version,创建 Release 和 tgz
|
|
71
|
-
3. 将本次 Release 设为 **Latest**
|
|
72
|
-
|
|
73
|
-
### 步骤 5:验证
|
|
74
|
-
|
|
75
|
-
- **Actions**:打开 [Actions](https://github.com/Umarchen/openclaw-agent-dashboard/actions),确认 Release workflow 成功。
|
|
76
|
-
- **Releases**:打开 [Releases](https://github.com/Umarchen/openclaw-agent-dashboard/releases),确认出现 **v1.0.2**,且为 **Latest release**。
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## 三、用户如何安装
|
|
81
|
-
|
|
82
|
-
默认一键安装即安装 **Latest**(即你刚发布的版本):
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
curl -fsSL https://raw.githubusercontent.com/Umarchen/openclaw-agent-dashboard/main/scripts/install.sh | bash
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
安装指定版本:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
DASHBOARD_VERSION=1.0.2 curl -fsSL https://raw.githubusercontent.com/Umarchen/openclaw-agent-dashboard/main/scripts/install.sh | bash
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## 四、快速命令清单(复制用)
|
|
97
|
-
|
|
98
|
-
发布新版本时,把 `1.0.2` 换成你的目标版本号即可:
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
# 1. 同步 main
|
|
102
|
-
git checkout main && git pull origin main
|
|
103
|
-
|
|
104
|
-
# 2. 改版本号(两处文件,或手动编辑)
|
|
105
|
-
# 编辑 plugin/openclaw.plugin.json 和 plugin/package.json 的 "version"
|
|
106
|
-
|
|
107
|
-
# 3. 提交并推送
|
|
108
|
-
git add plugin/openclaw.plugin.json plugin/package.json
|
|
109
|
-
git commit -m "chore: bump version to 1.0.2"
|
|
110
|
-
git push origin main
|
|
111
|
-
|
|
112
|
-
# 4. 打 tag 并推送,触发 Release
|
|
113
|
-
git tag v1.0.2
|
|
114
|
-
git push origin v1.0.2
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## 五、常见问题
|
|
120
|
-
|
|
121
|
-
### 为什么 GitHub 上有的 release 没有「Set as latest」按钮?
|
|
122
|
-
|
|
123
|
-
若该 release 被标成了 **Pre-release**,GitHub 不允许把它设为 Latest,所以只会显示 Pre-release 相关选项。当前流程发布的是正式版并自动设为 Latest,不会出现这种情况。
|
|
124
|
-
|
|
125
|
-
### 推送 main 或 tag 报错:Could not read from remote repository / Connection closed
|
|
126
|
-
|
|
127
|
-
多为网络或权限问题:检查本机能否访问 GitHub、SSH 密钥或 token 是否有效、仓库是否存在且有写权限。
|
|
128
|
-
|
|
129
|
-
### 想重新用同一版本号再发一次(例如 workflow 之前失败了)
|
|
130
|
-
|
|
131
|
-
需要**先删本地 tag、再删远程 tag**,在要发布的 commit(例如当前 main)上重新打 tag 并推送。否则你 push 的仍是旧 tag 指向的旧 commit,Release 会错。完整步骤见下方 [六、Git tag 说明](#六git-tag-说明)。也可参见 `docs/release-operations-manual.md` 的「重新触发构建」一节。
|
|
132
|
-
|
|
133
|
-
---
|
|
134
|
-
|
|
135
|
-
## 六、Git tag 说明
|
|
136
|
-
|
|
137
|
-
发布流程依赖 **git tag**。了解其行为可以避免「改了版本号、删了远程 tag 再 push,结果 Release 还是错的」。
|
|
138
|
-
|
|
139
|
-
### 6.1 tag 是什么?
|
|
140
|
-
|
|
141
|
-
- 每个 **commit** 有一个唯一的 SHA-1(如 `f7db4d1...`)。
|
|
142
|
-
- **tag** 是给某个 commit 起的**固定名字**(如 `v1.0.1`),在 Git 里就是一个「名字 → 该 commit」的引用。
|
|
143
|
-
- 可以理解为:**tag = 钉在某个 commit 上的书签**,不会跟着你后续的新提交自动移动。
|
|
144
|
-
|
|
145
|
-
### 6.2 两种 tag
|
|
146
|
-
|
|
147
|
-
| 类型 | 命令 | 说明 |
|
|
148
|
-
|------|------|------|
|
|
149
|
-
| **轻量 tag** | `git tag v1.0.1` | 只记录「名字 → 当前 commit」,常用。 |
|
|
150
|
-
| **附注 tag** | `git tag -a v1.0.1 -m "Release 1.0.1"` | 会生成带作者、时间、说明的 tag 对象,再让名字指向它。 |
|
|
151
|
-
|
|
152
|
-
本项目的发布用轻量 tag 即可。
|
|
153
|
-
|
|
154
|
-
### 6.3 常用操作实际做了什么?
|
|
155
|
-
|
|
156
|
-
| 操作 | 实际效果 |
|
|
157
|
-
|------|----------|
|
|
158
|
-
| `git tag v1.0.1` | 在当前 HEAD 指向的 commit 上,创建引用 `refs/tags/v1.0.1`,不提交、不改文件。 |
|
|
159
|
-
| `git tag -d v1.0.1` | 删除**本地**的 `v1.0.1` 引用,commit 仍在。 |
|
|
160
|
-
| `git push origin v1.0.1` | 把本地 `v1.0.1` 指向的 commit 的「名字」同步到远程。 |
|
|
161
|
-
| `git push origin --delete v1.0.1` | 删除**远程**的 `v1.0.1` 引用,不删 commit。 |
|
|
162
|
-
|
|
163
|
-
### 6.4 为什么 tag「不会自己更新」?
|
|
164
|
-
|
|
165
|
-
Tag 的设计就是**给历史某一点打标签**(如「这是 1.0.1 正式版」),所以不会随 `git commit` 自动挪到新 commit。要换指向,只能:删掉旧 tag(本地 + 远程),在**新的** commit 上重新打 tag 再 push。
|
|
166
|
-
|
|
167
|
-
### 6.5 把已有版本号重新发布到当前 main(完整步骤)
|
|
168
|
-
|
|
169
|
-
例如 v1.0.1 已存在但指向了旧 commit,想让它指向当前 main 并重新跑 Release:
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
# 1. 确保在最新 main(已改好 version 的提交)
|
|
173
|
-
git checkout main
|
|
174
|
-
git pull origin main
|
|
175
|
-
|
|
176
|
-
# 2. 删本地 tag(否则会一直指向旧 commit)
|
|
177
|
-
git tag -d v1.0.1
|
|
178
|
-
|
|
179
|
-
# 3. 在当前 commit 上重新打 tag
|
|
180
|
-
git tag v1.0.1
|
|
181
|
-
|
|
182
|
-
# 4. 删远程 tag(若存在)
|
|
183
|
-
git push origin --delete v1.0.1
|
|
184
|
-
|
|
185
|
-
# 5. 推送新 tag,触发 Release workflow
|
|
186
|
-
git push origin v1.0.1
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
之后到 Actions / Releases 确认 v1.0.1 的 Release 和 tgz 是否正常。
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
# openclaw-agent-dashboard 模型配置修改总结
|
|
2
|
-
|
|
3
|
-
## 一、修改概览
|
|
4
|
-
|
|
5
|
-
本工程对模型配置模块进行了调整,使显示与配置生效逻辑与 OpenClaw 保持一致。
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 二、涉及文件
|
|
10
|
-
|
|
11
|
-
| 文件 | 修改内容 |
|
|
12
|
-
|------|----------|
|
|
13
|
-
| `src/backend/data/agent_config_manager.py` | 白名单过滤、展示用 id、`_get_allowlist_model_ids` |
|
|
14
|
-
| `src/backend/data/config_reader.py` | `get_model_display_name` 改为仅用 id |
|
|
15
|
-
| `scripts/test_available_models.py` | 新增白名单、保存格式测试 |
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## 三、与 OpenClaw 配置格式的对应关系
|
|
20
|
-
|
|
21
|
-
### 3.1 配置读取(Agent 生效时使用)
|
|
22
|
-
|
|
23
|
-
| OpenClaw 配置路径 | 含义 | Dashboard 读取 |
|
|
24
|
-
|-------------------|------|----------------|
|
|
25
|
-
| `agents.defaults.model.primary` | 默认主模型 | `get_agent_model_config` 合并 |
|
|
26
|
-
| `agents.defaults.model.fallbacks` | 默认备选 | 同上 |
|
|
27
|
-
| `agents.list[].model.primary` | Agent 主模型 | 覆盖 defaults |
|
|
28
|
-
| `agents.list[].model.fallbacks` | Agent 备选 | 覆盖 defaults |
|
|
29
|
-
|
|
30
|
-
**生效格式**:`provider/model`(如 `zhipu/glm-4`、`openai/gpt-4`)
|
|
31
|
-
|
|
32
|
-
### 3.2 配置写入(用户保存后)
|
|
33
|
-
|
|
34
|
-
| 写入路径 | 格式 | 示例 |
|
|
35
|
-
|----------|------|------|
|
|
36
|
-
| `agents.list[id].model.primary` | model_id 字符串 | `"openai/gpt-4"` |
|
|
37
|
-
| `agents.list[id].model.fallbacks` | model_id 数组 | `["zhipu/glm-4-flash"]` |
|
|
38
|
-
|
|
39
|
-
**与 OpenClaw 一致**:`update_agent_model` 直接写入上述字段。
|
|
40
|
-
|
|
41
|
-
### 3.3 可选模型列表(白名单)
|
|
42
|
-
|
|
43
|
-
| 条件 | 显示来源 | 与 OpenClaw 一致 |
|
|
44
|
-
|------|----------|------------------|
|
|
45
|
-
| 有 `agents.defaults.models` | 仅白名单中的 model_id | ✓ buildAllowedModelSet |
|
|
46
|
-
| 无白名单 + 有 `models.providers` | providers 全量 + agents 已用 | ✓ |
|
|
47
|
-
| 无白名单 + 无 providers | 从 agents 收集 | ✓ |
|
|
48
|
-
|
|
49
|
-
### 3.4 展示策略
|
|
50
|
-
|
|
51
|
-
| 策略 | 实现 | 说明 |
|
|
52
|
-
|------|------|------|
|
|
53
|
-
| 使用 id 不用别名 | `_model_id_to_display_name` | `zhipu/glm-4` → `glm-4` |
|
|
54
|
-
| 下拉 option value | `model.id`(model_id) | 保存时写入 primary/fallbacks |
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## 四、数据流
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
用户选择模型(下拉 option value = model_id)
|
|
62
|
-
↓
|
|
63
|
-
PUT /api/agent-config/{id}/model { primary, fallbacks }
|
|
64
|
-
↓
|
|
65
|
-
update_agent_model() 写入 agents.list[].model
|
|
66
|
-
↓
|
|
67
|
-
openclaw.json 格式符合 OpenClaw 约定
|
|
68
|
-
↓
|
|
69
|
-
OpenClaw 重启后读取 model.primary / model.fallbacks 生效
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## 五、测试场景
|
|
75
|
-
|
|
76
|
-
| 场景 | 验证点 |
|
|
77
|
-
|------|--------|
|
|
78
|
-
| 1 | 无 providers,从 agents 收集 |
|
|
79
|
-
| 2 | 仅 defaults.model |
|
|
80
|
-
| 3 | agents.list 为空 |
|
|
81
|
-
| 3b | 白名单 + 展示用 id |
|
|
82
|
-
| 3c | providers + 白名单,仅显示白名单 |
|
|
83
|
-
| 3d | 配置保存格式(primary/fallbacks) |
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## 六、符合性结论
|
|
88
|
-
|
|
89
|
-
| 维度 | 符合预期 |
|
|
90
|
-
|------|----------|
|
|
91
|
-
| 配置读取格式 | ✓ agents.list[].model.primary/fallbacks |
|
|
92
|
-
| 配置写入格式 | ✓ 同上 |
|
|
93
|
-
| 白名单逻辑 | ✓ agents.defaults.models 与 buildAllowedModelSet 一致 |
|
|
94
|
-
| 展示策略 | ✓ 使用 id 不用别名 |
|
|
95
|
-
| 无白名单时 | ✓ providers 或 agents 收集 |
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
# Windows 安装问题排查指南
|
|
2
|
-
|
|
3
|
-
本文档针对 `npx openclaw-agent-dashboard@1.0.8 --verbose` 在 Windows 下的安装问题进行说明和解决方案。
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 一、问题概览
|
|
8
|
-
|
|
9
|
-
根据安装日志,主要有以下几类问题:
|
|
10
|
-
|
|
11
|
-
| 问题 | 严重程度 | 影响 |
|
|
12
|
-
|------|----------|------|
|
|
13
|
-
| Python 依赖安装失败 | 高 | Dashboard 后端无法启动 |
|
|
14
|
-
| Node.js DEP0190 警告 | 低 | 仅提示,不影响功能 |
|
|
15
|
-
| 安全模式警告 | 低 | 需配置 `plugins.allow` |
|
|
16
|
-
|
|
17
|
-
> **v1.0.9+** 已移除 `plugins install` 步骤,openclaw 会自动发现 extensions 下的插件,不再出现「插件注册失败」。
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## 二、Python 依赖安装失败(核心问题)
|
|
22
|
-
|
|
23
|
-
### 2.1 错误现象
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
[Errno 11001] getaddrinfo failed
|
|
27
|
-
Failed to establish a new connection
|
|
28
|
-
ERROR: Could not find a version that satisfies the requirement fastapi==0.109.0
|
|
29
|
-
ERROR: No matching distribution found for fastapi==0.109.0
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### 2.2 根本原因
|
|
33
|
-
|
|
34
|
-
`[Errno 11001] getaddrinfo failed` 是 **Windows 网络/DNS 解析错误**,表示 pip 无法连接到 PyPI (pypi.org) 下载包。
|
|
35
|
-
|
|
36
|
-
常见原因:
|
|
37
|
-
|
|
38
|
-
1. **企业网络限制**:公司防火墙或代理阻止访问 pypi.org
|
|
39
|
-
2. **代理未配置**:使用代理上网但 pip 未设置代理
|
|
40
|
-
3. **DNS 解析失败**:无法解析 pypi.org 域名
|
|
41
|
-
4. **VPN 或网络策略**:限制外网访问
|
|
42
|
-
|
|
43
|
-
### 2.3 解决方案
|
|
44
|
-
|
|
45
|
-
#### 方案 A:配置 pip 代理(如有 HTTP/HTTPS 代理)
|
|
46
|
-
|
|
47
|
-
```powershell
|
|
48
|
-
# 临时设置(当前会话)
|
|
49
|
-
$env:HTTP_PROXY = "http://代理地址:端口"
|
|
50
|
-
$env:HTTPS_PROXY = "http://代理地址:端口"
|
|
51
|
-
|
|
52
|
-
# 或使用 pip 配置
|
|
53
|
-
python -m pip config set global.proxy "http://代理地址:端口"
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
#### 方案 B:使用国内 PyPI 镜像
|
|
57
|
-
|
|
58
|
-
```powershell
|
|
59
|
-
# 使用清华镜像
|
|
60
|
-
python -m pip install -r C:\Users\h00427263\.openclaw\extensions\openclaw-agent-dashboard\dashboard\requirements.txt --user -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
61
|
-
|
|
62
|
-
# 或阿里云镜像
|
|
63
|
-
python -m pip install -r C:\Users\h00427263\.openclaw\extensions\openclaw-agent-dashboard\dashboard\requirements.txt --user -i https://mirrors.aliyun.com/pypi/simple/
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
#### 方案 C:离线安装(完全无外网时)
|
|
67
|
-
|
|
68
|
-
1. 在有网络的机器上下载依赖:
|
|
69
|
-
|
|
70
|
-
```powershell
|
|
71
|
-
pip download -r requirements.txt -d ./pip-packages
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
2. 将 `pip-packages` 目录和 `requirements.txt` 拷贝到目标机器
|
|
75
|
-
3. 在目标机器执行:
|
|
76
|
-
|
|
77
|
-
```powershell
|
|
78
|
-
pip install --no-index --find-links=./pip-packages -r requirements.txt --user
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
#### 方案 D:跳过 Python 依赖安装
|
|
82
|
-
|
|
83
|
-
若暂时无法解决网络问题,可先完成插件安装,后续再手动安装:
|
|
84
|
-
|
|
85
|
-
```powershell
|
|
86
|
-
npx openclaw-agent-dashboard@1.0.8 --verbose --skip-python
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
然后等网络恢复后手动执行:
|
|
90
|
-
|
|
91
|
-
```powershell
|
|
92
|
-
python -m pip install -r C:\Users\h00427263\.openclaw\extensions\openclaw-agent-dashboard\dashboard\requirements.txt --user
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
> **注意**:Windows 下若 `python3` 不可用,请使用 `python` 命令。
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## 三、插件注册(已修复)
|
|
100
|
-
|
|
101
|
-
**v1.0.9+** 安装流程已优化:仅将文件复制到 `extensions` 目录,不再调用 `openclaw plugins install`。
|
|
102
|
-
openclaw 会自动发现并加载 `extensions` 下的插件,无需手动注册。若仍看到 "plugin already exists" 等提示,请升级到最新版本。
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
## 四、其他警告说明
|
|
107
|
-
|
|
108
|
-
### 4.1 Node.js DEP0190 警告
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
(node:32244) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true...
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
- **含义**:在 `shell: true` 下传递参数时,Node.js 提示存在潜在安全风险。
|
|
115
|
-
- **影响**:当前仅为警告,不影响安装和运行。
|
|
116
|
-
- **处理**:可忽略,或等待后续版本改用更安全的调用方式。
|
|
117
|
-
|
|
118
|
-
### 4.2 安全模式警告
|
|
119
|
-
|
|
120
|
-
```
|
|
121
|
-
WARNING: Plugin "openclaw-agent-dashboard" contains dangerous code patterns: Shell command execution detected (child_process)
|
|
122
|
-
plugins.allow is empty; discovered non-bundled plugins may auto-load
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
- **含义**:插件使用了 `child_process` 执行命令,被识别为“危险模式”。
|
|
126
|
-
- **影响**:插件可能被当作未受信任代码,需要显式允许。
|
|
127
|
-
- **处理**:在 openclaw 配置中设置 `plugins.allow: ["openclaw-agent-dashboard"]`。
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## 五、推荐安装流程(Windows + 企业网络)
|
|
132
|
-
|
|
133
|
-
1. **删除旧版本(若存在)**:
|
|
134
|
-
|
|
135
|
-
```powershell
|
|
136
|
-
Remove-Item -Recurse -Force "$env:USERPROFILE\.openclaw\extensions\openclaw-agent-dashboard" -ErrorAction SilentlyContinue
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
2. **使用国内镜像安装**:
|
|
140
|
-
|
|
141
|
-
```powershell
|
|
142
|
-
npx openclaw-agent-dashboard@1.0.8 --verbose --skip-python
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
3. **手动安装 Python 依赖(使用镜像)**:
|
|
146
|
-
|
|
147
|
-
```powershell
|
|
148
|
-
python -m pip install -r "$env:USERPROFILE\.openclaw\extensions\openclaw-agent-dashboard\dashboard\requirements.txt" --user -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
4. **配置 openclaw 信任插件**(如仍有警告):
|
|
152
|
-
|
|
153
|
-
编辑 `%USERPROFILE%\.openclaw\config.json`,添加:
|
|
154
|
-
|
|
155
|
-
```json
|
|
156
|
-
{
|
|
157
|
-
"plugins": {
|
|
158
|
-
"allow": ["openclaw-agent-dashboard"]
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
5. **验证**:执行 `openclaw tui`,Dashboard 应自动启动,访问 http://localhost:38271。
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
## 六、后续改进建议(项目维护者)
|
|
168
|
-
|
|
169
|
-
1. **Python 安装**:支持通过环境变量或参数指定 pip 镜像(如 `PIP_INDEX_URL`)。
|
|
170
|
-
2. **帮助信息**:在 Windows 下增加代理、镜像、离线安装的说明。
|
|
171
|
-
3. **runCommand**:考虑使用 `execSync(cmd, args, { shell: false })` 或 `spawn` 传参,消除 DEP0190 警告。
|
package/docs/design/.gitkeep
DELETED
|
File without changes
|