openclaw-agent-dashboard 1.0.4

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.
Files changed (111) hide show
  1. package/.github/workflows/release.yml +56 -0
  2. package/README.md +302 -0
  3. package/docs/CHANGELOG_AGENT_MODIFICATIONS.md +132 -0
  4. package/docs/RELEASE-LATEST.md +189 -0
  5. package/docs/RELEASE-MODEL-CONFIG.md +95 -0
  6. package/docs/release-guide.md +259 -0
  7. package/docs/release-operations-manual.md +167 -0
  8. package/docs/specs/tr3-install-system.md +580 -0
  9. package/docs/windows-collaboration-model-paths-troubleshooting.md +0 -0
  10. package/frontend/index.html +12 -0
  11. package/frontend/package-lock.json +1240 -0
  12. package/frontend/package.json +19 -0
  13. package/frontend/src/App.vue +331 -0
  14. package/frontend/src/components/AgentCard.vue +796 -0
  15. package/frontend/src/components/AgentConfigPanel.vue +539 -0
  16. package/frontend/src/components/AgentDetailPanel.vue +738 -0
  17. package/frontend/src/components/ErrorAnalysisView.vue +546 -0
  18. package/frontend/src/components/ErrorCenterPanel.vue +844 -0
  19. package/frontend/src/components/PerformanceMonitor.vue +515 -0
  20. package/frontend/src/components/SettingsPanel.vue +236 -0
  21. package/frontend/src/components/TokenAnalysisPanel.vue +683 -0
  22. package/frontend/src/components/chain/ChainEdge.vue +85 -0
  23. package/frontend/src/components/chain/ChainNode.vue +166 -0
  24. package/frontend/src/components/chain/TaskChainView.vue +425 -0
  25. package/frontend/src/components/chain/index.ts +3 -0
  26. package/frontend/src/components/chain/types.ts +70 -0
  27. package/frontend/src/components/collaboration/CollaborationFlowSection.vue +1032 -0
  28. package/frontend/src/components/collaboration/CollaborationFlowWrapper.vue +113 -0
  29. package/frontend/src/components/performance/PerformancePanel.vue +119 -0
  30. package/frontend/src/components/performance/PerformanceSection.vue +1137 -0
  31. package/frontend/src/components/tasks/TaskStatusSection.vue +973 -0
  32. package/frontend/src/components/timeline/TimelineConnector.vue +31 -0
  33. package/frontend/src/components/timeline/TimelineRound.vue +135 -0
  34. package/frontend/src/components/timeline/TimelineStep.vue +691 -0
  35. package/frontend/src/components/timeline/TimelineToolLink.vue +109 -0
  36. package/frontend/src/components/timeline/TimelineView.vue +540 -0
  37. package/frontend/src/components/timeline/index.ts +5 -0
  38. package/frontend/src/components/timeline/types.ts +120 -0
  39. package/frontend/src/composables/index.ts +7 -0
  40. package/frontend/src/composables/useDebounce.ts +48 -0
  41. package/frontend/src/composables/useRealtime.ts +52 -0
  42. package/frontend/src/composables/useState.ts +52 -0
  43. package/frontend/src/composables/useThrottle.ts +46 -0
  44. package/frontend/src/composables/useVirtualScroll.ts +106 -0
  45. package/frontend/src/main.ts +4 -0
  46. package/frontend/src/managers/EventDispatcher.ts +127 -0
  47. package/frontend/src/managers/RealtimeDataManager.ts +293 -0
  48. package/frontend/src/managers/StateManager.ts +128 -0
  49. package/frontend/src/managers/index.ts +5 -0
  50. package/frontend/src/types/collaboration.ts +135 -0
  51. package/frontend/src/types/index.ts +20 -0
  52. package/frontend/src/types/performance.ts +105 -0
  53. package/frontend/src/types/task.ts +38 -0
  54. package/frontend/vite.config.ts +18 -0
  55. package/package.json +22 -0
  56. package/plugin/README.md +99 -0
  57. package/plugin/config.json.example +1 -0
  58. package/plugin/index.js +250 -0
  59. package/plugin/openclaw.plugin.json +17 -0
  60. package/plugin/package.json +21 -0
  61. package/scripts/build-plugin.js +67 -0
  62. package/scripts/bundle.sh +62 -0
  63. package/scripts/install-plugin.sh +162 -0
  64. package/scripts/install-python-deps.js +346 -0
  65. package/scripts/install-python-deps.sh +226 -0
  66. package/scripts/install.js +512 -0
  67. package/scripts/install.sh +367 -0
  68. package/scripts/lib/common.js +490 -0
  69. package/scripts/lib/common.sh +137 -0
  70. package/scripts/release-pack.sh +110 -0
  71. package/scripts/start.js +50 -0
  72. package/scripts/test_available_models.py +284 -0
  73. package/scripts/test_websocket_ping.py +44 -0
  74. package/src/backend/agents.py +73 -0
  75. package/src/backend/api/__init__.py +1 -0
  76. package/src/backend/api/agent_config_api.py +90 -0
  77. package/src/backend/api/agents.py +73 -0
  78. package/src/backend/api/agents_config.py +75 -0
  79. package/src/backend/api/chains.py +126 -0
  80. package/src/backend/api/collaboration.py +902 -0
  81. package/src/backend/api/debug_paths.py +39 -0
  82. package/src/backend/api/error_analysis.py +146 -0
  83. package/src/backend/api/errors.py +281 -0
  84. package/src/backend/api/performance.py +784 -0
  85. package/src/backend/api/subagents.py +770 -0
  86. package/src/backend/api/timeline.py +144 -0
  87. package/src/backend/api/websocket.py +251 -0
  88. package/src/backend/collaboration.py +405 -0
  89. package/src/backend/data/__init__.py +1 -0
  90. package/src/backend/data/agent_config_manager.py +270 -0
  91. package/src/backend/data/chain_reader.py +299 -0
  92. package/src/backend/data/config_reader.py +153 -0
  93. package/src/backend/data/error_analyzer.py +430 -0
  94. package/src/backend/data/session_reader.py +445 -0
  95. package/src/backend/data/subagent_reader.py +244 -0
  96. package/src/backend/data/task_history.py +118 -0
  97. package/src/backend/data/timeline_reader.py +981 -0
  98. package/src/backend/errors.py +63 -0
  99. package/src/backend/main.py +89 -0
  100. package/src/backend/mechanism_reader.py +131 -0
  101. package/src/backend/mechanisms.py +32 -0
  102. package/src/backend/performance.py +474 -0
  103. package/src/backend/requirements.txt +5 -0
  104. package/src/backend/session_reader.py +238 -0
  105. package/src/backend/status/__init__.py +1 -0
  106. package/src/backend/status/error_detector.py +122 -0
  107. package/src/backend/status/status_calculator.py +301 -0
  108. package/src/backend/status_calculator.py +121 -0
  109. package/src/backend/subagent_reader.py +229 -0
  110. package/src/backend/watchers/__init__.py +4 -0
  111. package/src/backend/watchers/file_watcher.py +159 -0
@@ -0,0 +1,95 @@
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 收集 |
@@ -0,0 +1,259 @@
1
+ # 发布与使用指南
2
+
3
+ > 本文档说明如何提交更改、发布新版本以及使用一键安装功能。
4
+
5
+ ---
6
+
7
+ ## 一、提交当前更改
8
+
9
+ ### 1.1 查看待提交文件
10
+
11
+ ```bash
12
+ git status --short
13
+ ```
14
+
15
+ ### 1.2 提交更改
16
+
17
+ ```bash
18
+ # 方式一:提交所有更改
19
+ git add .
20
+ git commit -m "feat: 添加一键安装支持 + GitHub Actions 发布流程
21
+
22
+ - 新增 scripts/install.sh 一键安装入口
23
+ - 新增 scripts/install-python-deps.sh Python 依赖安装
24
+ - 新增 scripts/release-pack.sh 发布打包
25
+ - 新增 .github/workflows/release.yml CI/CD
26
+ - 优化 plugin/index.js 优先使用 venv Python
27
+ - 重构 scripts/install-plugin.sh 支持 VERBOSE/DRY_RUN
28
+ - 更新 README.md 添加一键安装说明"
29
+
30
+ git push origin main
31
+ ```
32
+
33
+ ```bash
34
+ # 方式二:选择性提交
35
+ git add .github/workflows/release.yml \
36
+ scripts/install.sh \
37
+ scripts/install-python-deps.sh \
38
+ scripts/release-pack.sh \
39
+ scripts/install-plugin.sh \
40
+ plugin/index.js \
41
+ README.md \
42
+ docs/
43
+
44
+ git commit -m "feat: 添加一键安装支持 + GitHub Actions 发布流程"
45
+ git push origin main
46
+ ```
47
+
48
+ ---
49
+
50
+ ## 二、发布新版本
51
+
52
+ ### 2.1 更新版本号
53
+
54
+ 编辑 `plugin/openclaw.plugin.json`,修改 version 字段:
55
+
56
+ ```json
57
+ {
58
+ "id": "openclaw-agent-dashboard",
59
+ "name": "OpenClaw Agent Dashboard",
60
+ "version": "1.0.1", // 修改此处
61
+ ...
62
+ }
63
+ ```
64
+
65
+ ### 2.2 提交并打 Tag
66
+
67
+ ```bash
68
+ # 提交版本更新
69
+ git add plugin/openclaw.plugin.json
70
+ git commit -m "release: v1.0.1"
71
+ git push origin main
72
+
73
+ # 创建 tag 并推送(触发 GitHub Actions 自动构建发布)
74
+ git tag v1.0.1
75
+ git push origin v1.0.1
76
+ ```
77
+
78
+ ### 2.3 GitHub Actions 自动流程
79
+
80
+ 推送 tag 后,GitHub Actions 会自动执行:
81
+
82
+ | 步骤 | 说明 |
83
+ |------|------|
84
+ | 1 | Checkout 代码 |
85
+ | 2 | 安装 Node.js 依赖 |
86
+ | 3 | 构建前端 (`npm run pack`) |
87
+ | 4 | 生成 tgz 包 (`release-pack.sh`) |
88
+ | 5 | 创建 GitHub Release |
89
+ | 6 | 上传 tgz 到 Release Assets |
90
+
91
+ ### 2.4 验证发布
92
+
93
+ 1. 访问 GitHub Releases 页面:`https://github.com/Umarchen/openclaw-agent-dashboard/releases`
94
+ 2. 确认新版本已创建
95
+ 3. 确认 tgz 文件已上传
96
+
97
+ ---
98
+
99
+ ## 三、本地测试
100
+
101
+ ### 3.1 构建并打包
102
+
103
+ ```bash
104
+ # 构建前端 + 打包插件
105
+ npm run pack
106
+
107
+ # 生成发布 tgz
108
+ bash scripts/release-pack.sh
109
+ ```
110
+
111
+ ### 3.2 测试一键安装脚本
112
+
113
+ ```bash
114
+ # 预览模式(不执行实际安装)
115
+ DRY_RUN=1 bash scripts/install.sh
116
+
117
+ # 使用本地 tgz 测试安装
118
+ DASHBOARD_RELEASE_URL="file://$(pwd)/openclaw-agent-dashboard-v1.0.0.tgz" \
119
+ bash scripts/install.sh
120
+
121
+ # 跳过 Python 依赖安装(快速测试)
122
+ DASHBOARD_RELEASE_URL="file://$(pwd)/openclaw-agent-dashboard-v1.0.0.tgz" \
123
+ DASHBOARD_SKIP_PYTHON=1 \
124
+ bash scripts/install.sh
125
+ ```
126
+
127
+ ### 3.3 测试源码安装脚本
128
+
129
+ ```bash
130
+ # 预览模式
131
+ DRY_RUN=1 bash scripts/install-plugin.sh
132
+
133
+ # 详细输出模式
134
+ VERBOSE=1 bash scripts/install-plugin.sh
135
+ ```
136
+
137
+ ### 3.4 验证安装结果
138
+
139
+ ```bash
140
+ # 检查插件目录
141
+ ls -la ~/.openclaw/extensions/openclaw-agent-dashboard/
142
+
143
+ # 检查插件配置
144
+ openclaw plugins list
145
+ ```
146
+
147
+ ---
148
+
149
+ ## 四、清理构建产物
150
+
151
+ ```bash
152
+ # 删除本地测试生成的 tgz(不需要提交到仓库)
153
+ rm -f openclaw-agent-dashboard-v*.tgz
154
+
155
+ # 清理前端构建产物
156
+ rm -rf frontend/dist
157
+
158
+ # 清理插件打包产物
159
+ rm -rf plugin/dashboard plugin/frontend-dist
160
+ ```
161
+
162
+ ---
163
+
164
+ ## 五、用户安装方式
165
+
166
+ ### 5.1 一键安装(推荐)
167
+
168
+ ```bash
169
+ curl -fsSL https://raw.githubusercontent.com/Umarchen/openclaw-agent-dashboard/main/scripts/install.sh | bash
170
+ ```
171
+
172
+ ### 5.2 指定版本安装
173
+
174
+ ```bash
175
+ DASHBOARD_VERSION=1.0.1 curl -fsSL https://raw.githubusercontent.com/Umarchen/openclaw-agent-dashboard/main/scripts/install.sh | bash
176
+ ```
177
+
178
+ ### 5.3 从源码安装
179
+
180
+ ```bash
181
+ git clone https://github.com/Umarchen/openclaw-agent-dashboard.git
182
+ cd openclaw-agent-dashboard
183
+ npm run deploy
184
+ ```
185
+
186
+ ---
187
+
188
+ ## 六、环境变量参考
189
+
190
+ ### install.sh 支持的环境变量
191
+
192
+ | 变量 | 说明 | 默认值 |
193
+ |------|------|--------|
194
+ | `DASHBOARD_VERSION` | 指定安装版本 | `latest` |
195
+ | `DASHBOARD_RELEASE_URL` | 自定义下载地址 | GitHub Releases URL |
196
+ | `DASHBOARD_SKIP_PYTHON` | 跳过 Python 依赖安装 | `0` |
197
+ | `VERBOSE` | 显示详细输出 | `0` |
198
+ | `DRY_RUN` | 仅预览,不执行 | `0` |
199
+
200
+ ### install-plugin.sh 支持的环境变量
201
+
202
+ | 变量 | 说明 | 默认值 |
203
+ |------|------|--------|
204
+ | `VERBOSE` | 显示详细输出 | `0` |
205
+ | `DRY_RUN` | 仅预览,不执行 | `0` |
206
+ | `OPENCLAW_STATE_DIR` | OpenClaw 配置目录 | - |
207
+ | `OPENCLAW_HOME` | 替代 HOME | `$HOME` |
208
+
209
+ ---
210
+
211
+ ## 七、常见问题
212
+
213
+ ### Q1: GitHub Actions 构建失败
214
+
215
+ 检查:
216
+ - `plugin/openclaw.plugin.json` 格式是否正确
217
+ - `npm run pack` 本地是否能正常运行
218
+ - package.json 中的依赖是否完整
219
+
220
+ ### Q2: 下载 tgz 失败
221
+
222
+ 用户可能遇到网络问题,建议:
223
+ - 设置代理:`export https_proxy=http://proxy:port`
224
+ - 手动下载后使用本地文件:`DASHBOARD_RELEASE_URL=file:///path/to/tgz`
225
+
226
+ ### Q3: Python 依赖安装失败
227
+
228
+ 常见于 Debian/Ubuntu PEP 668 环境:
229
+ ```bash
230
+ # 安装 python3-venv
231
+ sudo apt install python3-venv python3-pip
232
+
233
+ # 或手动安装依赖
234
+ python3 -m pip install -r ~/.openclaw/extensions/openclaw-agent-dashboard/dashboard/requirements.txt --user
235
+ ```
236
+
237
+ ---
238
+
239
+ ## 八、快速命令参考
240
+
241
+ ```bash
242
+ # 开发流程
243
+ npm run pack # 构建前端 + 打包插件
244
+ npm run deploy # 打包 + 安装到本地
245
+ bash scripts/release-pack.sh # 生成发布 tgz
246
+
247
+ # 测试流程
248
+ DRY_RUN=1 bash scripts/install.sh # 预览安装
249
+ DASHBOARD_RELEASE_URL=file://... bash scripts/install.sh # 本地 tgz 测试
250
+
251
+ # 发布流程
252
+ vim plugin/openclaw.plugin.json # 更新版本号
253
+ git add . && git commit -m "release: vX.X.X"
254
+ git push origin main
255
+ git tag vX.X.X && git push origin vX.X.X # 触发 CI/CD
256
+
257
+ # 清理
258
+ rm -f openclaw-agent-dashboard-v*.tgz
259
+ ```
@@ -0,0 +1,167 @@
1
+ # OpenClaw Agent Dashboard 发布操作手册
2
+
3
+ > 面向小白的发布流程说明,包含操作步骤和原理讲解。
4
+
5
+ ---
6
+
7
+ ## 一、整体流程概览
8
+
9
+ ```
10
+ 你写代码 → 推送到 GitHub → 打 tag → 自动构建 → 别人可以安装
11
+ ```
12
+
13
+ | 阶段 | 你做什么 | 系统做什么 |
14
+ |------|----------|------------|
15
+ | 1. 开发 | 修改代码 | - |
16
+ | 2. 提交 | `git add`、`git commit` | 记录到本地 |
17
+ | 3. 推送 | `git push origin main` | 代码同步到 GitHub |
18
+ | 4. 打 tag | `git tag v1.0.0` | 给当前代码打个「版本号」 |
19
+ | 5. 发布 | `git push origin v1.0.0` | **触发自动构建**,生成安装包 |
20
+ | 6. 完成 | 无 | 别人可以一键安装 |
21
+
22
+ ---
23
+
24
+ ## 二、核心概念
25
+
26
+ ### 2.1 什么是 tag?
27
+
28
+ tag 就像给某次提交贴一个「版本标签」,例如 `v1.0.0`。
29
+
30
+ - **作用**:标记「这是 1.0.0 正式版」
31
+ - **和分支的区别**:分支会继续往前走,tag 一般固定在那次提交上
32
+ - **命名习惯**:`v` + 版本号,如 `v1.0.0`、`v1.0.1`、`v2.0.0`
33
+
34
+ ### 2.2 什么是 GitHub Actions?
35
+
36
+ GitHub 提供的**自动化流水线**,可以在你推送代码或 tag 时自动执行脚本。
37
+
38
+ - **不是**:GitHub 自带的通用测试
39
+ - **是**:项目里自己配置的「发布流水线」
40
+ - **配置文件**:`.github/workflows/release.yml`
41
+
42
+ ### 2.3 为什么推送 tag 会触发构建?
43
+
44
+ 在 `release.yml` 里写了:
45
+
46
+ ```yaml
47
+ on:
48
+ push:
49
+ tags:
50
+ - 'v*' # 只要推送的 tag 以 v 开头,就触发
51
+ ```
52
+
53
+ 所以:`git push origin v1.0.0` → GitHub 检测到 tag 推送 → 自动跑 workflow。
54
+
55
+ ### 2.4 构建完成后会发生什么?
56
+
57
+ 1. 在 frontend 目录安装依赖、构建前端
58
+ 2. 打包 backend 和 frontend,生成 `.tgz` 安装包
59
+ 3. 在 GitHub 上创建 **Release**
60
+ 4. 把 `.tgz` 作为附件上传到 Release
61
+
62
+ 别人就可以通过 Release 下载安装包,或使用一键安装脚本。
63
+
64
+ ---
65
+
66
+ ## 三、常用操作
67
+
68
+ ### 3.1 首次发布(第一次发 v1.0.0)
69
+
70
+ ```bash
71
+ # 1. 确保代码已提交并推送到 main
72
+ git add .
73
+ git commit -m "你的提交说明"
74
+ git push origin main
75
+
76
+ # 2. 打 tag
77
+ git tag v1.0.0
78
+
79
+ # 3. 推送 tag,触发构建
80
+ git push origin v1.0.0
81
+ ```
82
+
83
+ ### 3.2 发布新版本(如 v1.0.1)
84
+
85
+ ```bash
86
+ # 1. 代码已推送到 main 后
87
+ git tag v1.0.1
88
+ git push origin v1.0.1
89
+ ```
90
+
91
+ ### 3.3 重新触发构建(tag 已存在,想再跑一次)
92
+
93
+ 有时 workflow 失败,修好代码后想用同一个版本号再跑一次:
94
+
95
+ ```bash
96
+ # 删除本地 tag
97
+ git tag -d v1.0.0
98
+
99
+ # 在最新提交上重新打 tag
100
+ git tag v1.0.0
101
+
102
+ # 删除远程 tag
103
+ git push origin :refs/tags/v1.0.0
104
+
105
+ # 推送新 tag,触发构建
106
+ git push origin v1.0.0
107
+ ```
108
+
109
+ ### 3.4 手动触发构建(不推 tag)
110
+
111
+ 在 GitHub 网页上:
112
+
113
+ 1. 打开 https://github.com/Umarchen/openclaw-agent-dashboard/actions
114
+ 2. 左侧选择 **Release** workflow
115
+ 3. 点击 **Run workflow** → **Run workflow**
116
+
117
+ ---
118
+
119
+ ## 四、重要说明
120
+
121
+ ### 4.1 推送 main 不会触发 Release
122
+
123
+ - `git push origin main`:只同步代码,**不会**触发 Release workflow
124
+ - `git push origin v1.0.0`:推送 tag,**会**触发 Release workflow
125
+
126
+ ### 4.2 tag 指向哪次提交,就用哪次提交的代码构建
127
+
128
+ 如果 tag 是之前打的,后来改了 `.github/workflows/release.yml` 但没重新打 tag,workflow 用的还是**旧配置**。需要把 tag 挪到最新提交上(见 3.3)。
129
+
130
+ ### 4.3 别人怎么安装
131
+
132
+ | 方式 | 命令 |
133
+ |------|------|
134
+ | 一键安装 | `curl -fsSL https://raw.githubusercontent.com/Umarchen/openclaw-agent-dashboard/main/scripts/install.sh \| bash` |
135
+ | 源码安装 | `git clone ... && npm run deploy` |
136
+ | 手动下载 | 从 [Releases](https://github.com/Umarchen/openclaw-agent-dashboard/releases) 下载 tgz,`openclaw plugins install xxx.tgz` |
137
+
138
+ ---
139
+
140
+ ## 五、故障排查
141
+
142
+ ### 5.1 构建失败:Dependencies lock file is not found
143
+
144
+ **原因**:`setup-node` 的 `cache: 'npm'` 需要在根目录有 `package-lock.json`,本项目锁文件在 `frontend/` 下。
145
+
146
+ **解决**:已在 `release.yml` 中移除 `cache: 'npm'`,无需再改。
147
+
148
+ ### 5.2 推送 tag 后没看到 workflow 运行
149
+
150
+ - 检查:https://github.com/Umarchen/openclaw-agent-dashboard/actions
151
+ - 确认 tag 已推送成功:`git ls-remote --tags origin`
152
+
153
+ ### 5.3 Release 里没有 tgz 附件
154
+
155
+ 说明 workflow 某一步失败了。在 Actions 里点进那次运行,查看失败步骤的日志。
156
+
157
+ ---
158
+
159
+ ## 六、快速参考
160
+
161
+ | 目标 | 命令 |
162
+ |------|------|
163
+ | 发布 v1.0.0 | `git tag v1.0.0` → `git push origin v1.0.0` |
164
+ | 发布 v1.0.1 | `git tag v1.0.1` → `git push origin v1.0.1` |
165
+ | 重新触发 v1.0.0 构建 | 见 3.3 |
166
+ | 查看构建状态 | https://github.com/Umarchen/openclaw-agent-dashboard/actions |
167
+ | 查看 Release | https://github.com/Umarchen/openclaw-agent-dashboard/releases |