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.
Files changed (135) hide show
  1. package/README.md +55 -321
  2. package/frontend-dist/assets/index-B7XqKAxm.css +1 -0
  3. package/frontend-dist/assets/index-CxJaSYyo.js +24 -0
  4. package/{frontend → frontend-dist}/index.html +2 -1
  5. package/{plugin/openclaw.plugin.json → openclaw.plugin.json} +2 -2
  6. package/package.json +21 -13
  7. package/.github/workflows/release.yml +0 -56
  8. package/VERSION_DISPLAY_delivery.md +0 -242
  9. package/VERSION_DISPLAY_implementation_summary.md +0 -315
  10. package/design_manifest.md +0 -100
  11. package/docs/CHANGELOG_AGENT_MODIFICATIONS.md +0 -132
  12. package/docs/MAINTAINER_RELEASE_WORKFLOW.md +0 -211
  13. package/docs/Openclaw-Agent-Dashboard/345/217/221/345/270/203/344/270/216/346/233/264/346/226/260.md +0 -147
  14. package/docs/RELEASE-LATEST.md +0 -189
  15. package/docs/RELEASE-MODEL-CONFIG.md +0 -95
  16. package/docs/WINDOWS_INSTALL_TROUBLESHOOTING.md +0 -171
  17. package/docs/design/.gitkeep +0 -0
  18. package/docs/design/VERSION_DISPLAY_design.md +0 -1236
  19. package/docs/release-guide.md +0 -259
  20. package/docs/release-operations-manual.md +0 -167
  21. package/docs/reviews/.gitkeep +0 -0
  22. package/docs/reviews/approval_history.json +0 -14
  23. package/docs/reviews/cr_VERSION_DISPLAY.md +0 -397
  24. package/docs/reviews/traceability_manifest.json +0 -279
  25. package/docs/specs/VERSION_DISPLAY_spec.md +0 -371
  26. package/docs/specs/tr3-install-system.md +0 -580
  27. package/docs/windows-collaboration-model-paths-troubleshooting.md +0 -0
  28. package/frontend/package-lock.json +0 -1240
  29. package/frontend/package.json +0 -19
  30. package/frontend/src/App.vue +0 -355
  31. package/frontend/src/components/AgentCard.vue +0 -796
  32. package/frontend/src/components/AgentConfigPanel.vue +0 -539
  33. package/frontend/src/components/AgentDetailPanel.vue +0 -738
  34. package/frontend/src/components/ErrorAnalysisView.vue +0 -546
  35. package/frontend/src/components/ErrorCenterPanel.vue +0 -844
  36. package/frontend/src/components/PerformanceMonitor.vue +0 -515
  37. package/frontend/src/components/SettingsPanel.vue +0 -236
  38. package/frontend/src/components/TokenAnalysisPanel.vue +0 -683
  39. package/frontend/src/components/chain/ChainEdge.vue +0 -85
  40. package/frontend/src/components/chain/ChainNode.vue +0 -166
  41. package/frontend/src/components/chain/TaskChainView.vue +0 -425
  42. package/frontend/src/components/chain/index.ts +0 -3
  43. package/frontend/src/components/chain/types.ts +0 -70
  44. package/frontend/src/components/collaboration/CollaborationFlowSection.vue +0 -1032
  45. package/frontend/src/components/collaboration/CollaborationFlowWrapper.vue +0 -113
  46. package/frontend/src/components/common/VersionDisplay.vue +0 -187
  47. package/frontend/src/components/performance/PerformancePanel.vue +0 -119
  48. package/frontend/src/components/performance/PerformanceSection.vue +0 -1137
  49. package/frontend/src/components/tasks/TaskStatusSection.vue +0 -973
  50. package/frontend/src/components/timeline/TimelineConnector.vue +0 -31
  51. package/frontend/src/components/timeline/TimelineRound.vue +0 -135
  52. package/frontend/src/components/timeline/TimelineStep.vue +0 -691
  53. package/frontend/src/components/timeline/TimelineToolLink.vue +0 -109
  54. package/frontend/src/components/timeline/TimelineView.vue +0 -540
  55. package/frontend/src/components/timeline/index.ts +0 -5
  56. package/frontend/src/components/timeline/types.ts +0 -120
  57. package/frontend/src/composables/index.ts +0 -7
  58. package/frontend/src/composables/useDebounce.ts +0 -48
  59. package/frontend/src/composables/useRealtime.ts +0 -52
  60. package/frontend/src/composables/useState.ts +0 -52
  61. package/frontend/src/composables/useThrottle.ts +0 -46
  62. package/frontend/src/composables/useVirtualScroll.ts +0 -106
  63. package/frontend/src/main.ts +0 -4
  64. package/frontend/src/managers/EventDispatcher.ts +0 -127
  65. package/frontend/src/managers/RealtimeDataManager.ts +0 -302
  66. package/frontend/src/managers/StateManager.ts +0 -128
  67. package/frontend/src/managers/index.ts +0 -5
  68. package/frontend/src/types/collaboration.ts +0 -135
  69. package/frontend/src/types/index.ts +0 -20
  70. package/frontend/src/types/performance.ts +0 -105
  71. package/frontend/src/types/task.ts +0 -38
  72. package/frontend/vite.config.ts +0 -18
  73. package/legacy_code_anatomy.md +0 -518
  74. package/plugin/README.md +0 -99
  75. package/plugin/config.json.example +0 -1
  76. package/plugin/package.json +0 -26
  77. package/scripts/build-plugin.js +0 -81
  78. package/scripts/bundle.sh +0 -62
  79. package/scripts/install-plugin.sh +0 -162
  80. package/scripts/install-python-deps.sh +0 -226
  81. package/scripts/install.js +0 -684
  82. package/scripts/install.sh +0 -367
  83. package/scripts/lib/common.sh +0 -137
  84. package/scripts/release-pack.sh +0 -110
  85. package/scripts/start.js +0 -50
  86. package/scripts/test_available_models.py +0 -284
  87. package/scripts/test_version_display.sh +0 -128
  88. package/scripts/test_websocket_ping.py +0 -44
  89. package/session_registry.json +0 -58
  90. package/tests/.gitkeep +0 -0
  91. package/tests/qa_regression_report.md +0 -359
  92. package/tests/qa_version_display_report.md +0 -598
  93. /package/{src/backend → dashboard}/agents.py +0 -0
  94. /package/{src/backend → dashboard}/api/__init__.py +0 -0
  95. /package/{src/backend → dashboard}/api/agent_config_api.py +0 -0
  96. /package/{src/backend → dashboard}/api/agents.py +0 -0
  97. /package/{src/backend → dashboard}/api/agents_config.py +0 -0
  98. /package/{src/backend → dashboard}/api/chains.py +0 -0
  99. /package/{src/backend → dashboard}/api/collaboration.py +0 -0
  100. /package/{src/backend → dashboard}/api/debug_paths.py +0 -0
  101. /package/{src/backend → dashboard}/api/error_analysis.py +0 -0
  102. /package/{src/backend → dashboard}/api/errors.py +0 -0
  103. /package/{src/backend → dashboard}/api/performance.py +0 -0
  104. /package/{src/backend → dashboard}/api/subagents.py +0 -0
  105. /package/{src/backend → dashboard}/api/timeline.py +0 -0
  106. /package/{src/backend → dashboard}/api/version.py +0 -0
  107. /package/{src/backend → dashboard}/api/websocket.py +0 -0
  108. /package/{src/backend → dashboard}/collaboration.py +0 -0
  109. /package/{src/backend → dashboard}/data/__init__.py +0 -0
  110. /package/{src/backend → dashboard}/data/agent_config_manager.py +0 -0
  111. /package/{src/backend → dashboard}/data/chain_reader.py +0 -0
  112. /package/{src/backend → dashboard}/data/config_reader.py +0 -0
  113. /package/{src/backend → dashboard}/data/error_analyzer.py +0 -0
  114. /package/{src/backend → dashboard}/data/session_reader.py +0 -0
  115. /package/{src/backend → dashboard}/data/subagent_reader.py +0 -0
  116. /package/{src/backend → dashboard}/data/task_history.py +0 -0
  117. /package/{src/backend → dashboard}/data/timeline_reader.py +0 -0
  118. /package/{src/backend → dashboard}/data/version_info_reader.py +0 -0
  119. /package/{src/backend → dashboard}/errors.py +0 -0
  120. /package/{src/backend → dashboard}/main.py +0 -0
  121. /package/{src/backend → dashboard}/mechanism_reader.py +0 -0
  122. /package/{src/backend → dashboard}/mechanisms.py +0 -0
  123. /package/{src/backend → dashboard}/performance.py +0 -0
  124. /package/{src/backend → dashboard}/requirements.txt +0 -0
  125. /package/{src/backend → dashboard}/session_reader.py +0 -0
  126. /package/{src/backend → dashboard}/status/__init__.py +0 -0
  127. /package/{src/backend → dashboard}/status/change_tracker.py +0 -0
  128. /package/{src/backend → dashboard}/status/error_detector.py +0 -0
  129. /package/{src/backend → dashboard}/status/status_cache.py +0 -0
  130. /package/{src/backend → dashboard}/status/status_calculator.py +0 -0
  131. /package/{src/backend → dashboard}/status_calculator.py +0 -0
  132. /package/{src/backend → dashboard}/subagent_reader.py +0 -0
  133. /package/{src/backend → dashboard}/watchers/__init__.py +0 -0
  134. /package/{src/backend → dashboard}/watchers/file_watcher.py +0 -0
  135. /package/{plugin/index.js → index.js} +0 -0
@@ -1,284 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- 测试模型配置:get_all_available_models、update_agent_model 与 OpenClaw 配置格式一致性。
4
- 用法: cd 项目根目录 && python3 scripts/test_available_models.py
5
- """
6
- import json
7
- import os
8
- import sys
9
- import tempfile
10
- from pathlib import Path
11
-
12
- # 添加 backend 到 path
13
- ROOT = Path(__file__).resolve().parent.parent
14
- sys.path.insert(0, str(ROOT / "src" / "backend"))
15
-
16
-
17
- def run_test_env(config: dict):
18
- """创建临时 openclaw.json 并设置 OPENCLAW_HOME,返回 (tmp_dir, old_home)"""
19
- tmp_dir = tempfile.mkdtemp()
20
- config_path = Path(tmp_dir) / "openclaw.json"
21
- with open(config_path, 'w', encoding='utf-8') as f:
22
- json.dump(config, f, indent=2, ensure_ascii=False)
23
- old_home = os.environ.get('OPENCLAW_HOME')
24
- os.environ['OPENCLAW_HOME'] = tmp_dir
25
- for mod in list(sys.modules.keys()):
26
- if 'data.config_reader' in mod or 'data.agent_config_manager' in mod:
27
- del sys.modules[mod]
28
- return tmp_dir, old_home, config_path
29
-
30
-
31
- def run_test(name: str, config: dict) -> list:
32
- """用临时 openclaw.json 运行 get_all_available_models"""
33
- tmp_dir, old_home, _ = run_test_env(config)
34
- try:
35
- from data.agent_config_manager import get_all_available_models
36
- return get_all_available_models()
37
- finally:
38
- if old_home is not None:
39
- os.environ['OPENCLAW_HOME'] = old_home
40
- else:
41
- os.environ.pop('OPENCLAW_HOME', None)
42
- import shutil
43
- shutil.rmtree(tmp_dir, ignore_errors=True)
44
-
45
-
46
- def main():
47
- print("=" * 60)
48
- print("测试:模型列表(白名单 / providers / agents 收集)")
49
- print("=" * 60)
50
-
51
- # 场景1: agents.defaults.model + agents.list 中 agent 有 model
52
- config1 = {
53
- "agents": {
54
- "defaults": {
55
- "model": {
56
- "primary": "zhipu/glm-4",
57
- "fallbacks": ["zhipu/glm-4-flash"]
58
- }
59
- },
60
- "list": [
61
- {"id": "main", "name": "PM", "model": {"primary": "zhipu/glm-4.5", "fallbacks": []}},
62
- {"id": "analyst", "name": "BA"}
63
- ]
64
- }
65
- }
66
- # 注意:没有 models.providers
67
-
68
- print("\n场景1: defaults.model + list 中部分 agent 有 model")
69
- print(" defaults: primary=zhipu/glm-4, fallbacks=[zhipu/glm-4-flash]")
70
- print(" main: primary=zhipu/glm-4.5")
71
- print(" analyst: 无 model,继承 defaults")
72
- try:
73
- r1 = run_test("scene1", config1)
74
- ids = [m['id'] for m in r1]
75
- print(f" 结果: {ids}")
76
- expected = {"zhipu/glm-4.5", "zhipu/glm-4", "zhipu/glm-4-flash"}
77
- if set(ids) == expected:
78
- print(" ✓ 通过")
79
- else:
80
- print(f" 期望: {expected}, 实际: {set(ids)}")
81
- except Exception as e:
82
- print(f" ✗ 异常: {e}")
83
- import traceback
84
- traceback.print_exc()
85
-
86
- # 场景2: 仅 defaults,list 中 agent 都无 model
87
- config2 = {
88
- "agents": {
89
- "defaults": {
90
- "model": {"primary": "openai/gpt-4", "fallbacks": []}
91
- },
92
- "list": [
93
- {"id": "main", "name": "PM"}
94
- ]
95
- }
96
- }
97
- print("\n场景2: 仅 defaults.model,agent 无 model")
98
- try:
99
- r2 = run_test("scene2", config2)
100
- ids = [m['id'] for m in r2]
101
- print(f" 结果: {ids}")
102
- if ids == ["openai/gpt-4"]:
103
- print(" ✓ 通过")
104
- else:
105
- print(f" 期望: ['openai/gpt-4'], 实际: {ids}")
106
- except Exception as e:
107
- print(f" ✗ 异常: {e}")
108
-
109
- # 场景3: agents.list 为空
110
- config3 = {
111
- "agents": {
112
- "defaults": {"model": {"primary": "zhipu/glm-4", "fallbacks": []}},
113
- "list": []
114
- }
115
- }
116
- print("\n场景3: agents.list 为空,仅有 defaults.model")
117
- try:
118
- r3 = run_test("scene3", config3)
119
- ids = [m['id'] for m in r3]
120
- print(f" 结果: {ids}")
121
- if set(ids) == {"zhipu/glm-4"}:
122
- print(" ✓ 通过")
123
- else:
124
- print(f" 期望: ['zhipu/glm-4'], 实际: {ids}")
125
- except Exception as e:
126
- print(f" ✗ 异常: {e}")
127
-
128
- # 场景3b: 有 defaults.models 但 model 中未用
129
- config3b = {
130
- "agents": {
131
- "defaults": {
132
- "model": {"primary": "zhipu/glm-4", "fallbacks": []},
133
- "models": {
134
- "zhipu/glm-4": {"alias": "GLM-4"},
135
- "zhipu/glm-4-flash": {"alias": "GLM-4 Flash"},
136
- "moonshot/kimi-k2": {"alias": "Kimi K2"}
137
- }
138
- },
139
- "list": []
140
- }
141
- }
142
- print("\n场景3b: agents.defaults.models 作为白名单(有则仅显示白名单)")
143
- try:
144
- r3b = run_test("scene3b", config3b)
145
- ids = [m['id'] for m in r3b]
146
- names = [m['name'] for m in r3b]
147
- print(f" 结果: {ids}")
148
- print(f" 展示名(name): {names} (应使用 id 不用别名)")
149
- expected = {"zhipu/glm-4", "zhipu/glm-4-flash", "moonshot/kimi-k2"}
150
- if set(ids) == expected:
151
- # 展示名应为 id 简短形式,非 alias
152
- expected_names = {"glm-4", "glm-4-flash", "kimi-k2"}
153
- if set(names) == expected_names:
154
- print(" ✓ 通过(白名单 + 展示用 id)")
155
- else:
156
- print(f" ⚠ id 正确,但 name 应为 id 形式: {expected_names}, 实际: {set(names)}")
157
- else:
158
- print(f" 期望: {sorted(expected)}, 实际: {ids}")
159
- except Exception as e:
160
- print(f" ✗ 异常: {e}")
161
-
162
- # 场景3c: 有 providers + 白名单,应仅显示白名单
163
- config3c = {
164
- "models": {
165
- "providers": {
166
- "zhipu": {"models": [{"id": "glm-4"}, {"id": "glm-4-flash"}, {"id": "glm-4.5"}]},
167
- "openai": {"models": [{"id": "gpt-4"}]}
168
- }
169
- },
170
- "agents": {
171
- "defaults": {
172
- "model": {"primary": "zhipu/glm-4", "fallbacks": []},
173
- "models": {
174
- "zhipu/glm-4": {"alias": "GLM-4"},
175
- "zhipu/glm-4-flash": {"alias": "Flash"}
176
- }
177
- },
178
- "list": [{"id": "main", "name": "PM"}]
179
- }
180
- }
181
- print("\n场景3c: 有 providers + 白名单,应仅显示白名单中的模型")
182
- try:
183
- r3c = run_test("scene3c", config3c)
184
- ids = [m['id'] for m in r3c]
185
- print(f" 结果: {ids}")
186
- expected = {"zhipu/glm-4", "zhipu/glm-4-flash"}
187
- if set(ids) == expected:
188
- print(" ✓ 通过")
189
- else:
190
- print(f" 期望: {sorted(expected)}, 实际: {ids}")
191
- except Exception as e:
192
- print(f" ✗ 异常: {e}")
193
-
194
- # 场景3e: 协作流程模型面板应仅显示 agent 配置的(不含白名单未使用的)
195
- config3e = {
196
- "agents": {
197
- "defaults": {
198
- "model": {"primary": "zhipu/glm-4", "fallbacks": []},
199
- "models": {
200
- "zhipu/glm-4": {"alias": "GLM-4"},
201
- "zhipu/glm-4-flash": {"alias": "Flash"},
202
- "moonshot/kimi-k2": {"alias": "Kimi"}
203
- }
204
- },
205
- "list": [{"id": "main", "name": "PM"}]
206
- }
207
- }
208
- print("\n场景3e: 协作流程模型面板(get_models_configured_by_agents)仅 agent 配置")
209
- tmp_dir, old_home, _ = run_test_env(config3e)
210
- try:
211
- from data.config_reader import get_models_configured_by_agents
212
- configured = get_models_configured_by_agents()
213
- print(f" 结果: {configured}")
214
- if configured == ["zhipu/glm-4"]:
215
- print(" ✓ 通过(仅 primary,不含白名单中未用的 kimi-k2、glm-4-flash)")
216
- else:
217
- print(f" 期望: ['zhipu/glm-4'], 实际: {configured}")
218
- except Exception as e:
219
- print(f" ✗ 异常: {e}")
220
- finally:
221
- if old_home is not None:
222
- os.environ['OPENCLAW_HOME'] = old_home
223
- else:
224
- os.environ.pop('OPENCLAW_HOME', None)
225
- import shutil
226
- shutil.rmtree(tmp_dir, ignore_errors=True)
227
-
228
- # 场景3d: 配置保存格式(update_agent_model 写入格式与 OpenClaw 一致)
229
- config3d = {
230
- "agents": {
231
- "defaults": {"model": {"primary": "zhipu/glm-4", "fallbacks": []}},
232
- "list": [{"id": "main", "name": "PM", "model": {"primary": "zhipu/glm-4", "fallbacks": []}}]
233
- }
234
- }
235
- print("\n场景3d: 配置保存格式(OpenClaw agents.list[].model.primary/fallbacks)")
236
- tmp_dir, old_home, config_path = run_test_env(config3d)
237
- try:
238
- from data.agent_config_manager import update_agent_model, load_full_config
239
- res = update_agent_model("main", primary="openai/gpt-4", fallbacks=["zhipu/glm-4-flash"])
240
- if not res.get('success'):
241
- print(f" ✗ update_agent_model 失败: {res.get('error')}")
242
- else:
243
- saved = json.loads(config_path.read_text(encoding='utf-8'))
244
- agent = next((a for a in saved.get('agents', {}).get('list', []) if a.get('id') == 'main'), None)
245
- primary = agent and agent.get('model', {}).get('primary')
246
- fallbacks = agent and agent.get('model', {}).get('fallbacks', [])
247
- if primary == "openai/gpt-4" and fallbacks == ["zhipu/glm-4-flash"]:
248
- print(" ✓ 通过(格式符合 OpenClaw agents.list[].model)")
249
- else:
250
- print(f" 期望 primary=openai/gpt-4 fallbacks=[zhipu/glm-4-flash]")
251
- print(f" 实际 primary={primary} fallbacks={fallbacks}")
252
- except Exception as e:
253
- print(f" ✗ 异常: {e}")
254
- finally:
255
- if old_home is not None:
256
- os.environ['OPENCLAW_HOME'] = old_home
257
- else:
258
- os.environ.pop('OPENCLAW_HOME', None)
259
- import shutil
260
- shutil.rmtree(tmp_dir, ignore_errors=True)
261
-
262
- # 场景4: 使用真实 openclaw.json(若存在)
263
- real_path = Path.home() / ".openclaw" / "openclaw.json"
264
- if real_path.exists():
265
- print("\n场景4: 使用真实 ~/.openclaw/openclaw.json")
266
- os.environ.pop('OPENCLAW_HOME', None)
267
- try:
268
- from data.agent_config_manager import get_all_available_models
269
- r4 = get_all_available_models()
270
- print(f" 结果: {len(r4)} 个模型")
271
- for m in r4[:5]:
272
- print(f" - {m['id']} ({m['name']})")
273
- if len(r4) > 5:
274
- print(f" ... 共 {len(r4)} 个")
275
- except Exception as e:
276
- print(f" ✗ 异常: {e}")
277
- else:
278
- print("\n场景4: 跳过(无 ~/.openclaw/openclaw.json)")
279
-
280
- print("\n" + "=" * 60)
281
-
282
-
283
- if __name__ == "__main__":
284
- main()
@@ -1,128 +0,0 @@
1
- #!/bin/bash
2
- # 版本号显示功能 - 快速测试脚本
3
-
4
- set -e
5
-
6
- PROJECT_DIR="/home/ubuntu/vrt-projects/projects/openclaw-agent-dashboard"
7
- cd "$PROJECT_DIR"
8
-
9
- echo "=================================="
10
- echo "版本号显示功能 - 快速测试"
11
- echo "=================================="
12
- echo ""
13
-
14
- # 颜色定义
15
- GREEN='\033[0;32m'
16
- RED='\033[0;31m'
17
- YELLOW='\033[1;33m'
18
- NC='\033[0m' # No Color
19
-
20
- # 测试函数
21
- test_passed() {
22
- echo -e "${GREEN}✅ 通过${NC}: $1"
23
- }
24
-
25
- test_failed() {
26
- echo -e "${RED}❌ 失败${NC}: $1"
27
- }
28
-
29
- test_info() {
30
- echo -e "${YELLOW}ℹ️ 信息${NC}: $1"
31
- }
32
-
33
- echo "1. 检查文件是否存在"
34
- echo "----------------------------------"
35
-
36
- FILES=(
37
- "src/backend/data/version_info_reader.py"
38
- "src/backend/api/version.py"
39
- "frontend/src/components/common/VersionDisplay.vue"
40
- ".staging/traceability_manifest.json"
41
- ".staging/VERSION_DISPLAY_implementation_summary.md"
42
- )
43
-
44
- for file in "${FILES[@]}"; do
45
- if [ -f "$file" ]; then
46
- test_passed "文件存在: $file"
47
- else
48
- test_failed "文件缺失: $file"
49
- fi
50
- done
51
-
52
- echo ""
53
- echo "2. 检查 Python 语法"
54
- echo "----------------------------------"
55
-
56
- python3 -m py_compile src/backend/data/version_info_reader.py && \
57
- test_passed "version_info_reader.py 语法正确" || \
58
- test_failed "version_info_reader.py 语法错误"
59
-
60
- python3 -m py_compile src/backend/api/version.py && \
61
- test_passed "version.py 语法正确" || \
62
- test_failed "version.py 语法错误"
63
-
64
- echo ""
65
- echo "3. 检查 API 路由注册"
66
- echo "----------------------------------"
67
-
68
- if grep -q "from api import.*version" src/backend/main.py; then
69
- test_passed "main.py 已导入 version 模块"
70
- else
71
- test_failed "main.py 未导入 version 模块"
72
- fi
73
-
74
- if grep -q "app.include_router(version.router" src/backend/main.py; then
75
- test_passed "main.py 已注册 version 路由"
76
- else
77
- test_failed "main.py 未注册 version 路由"
78
- fi
79
-
80
- echo ""
81
- echo "4. 检查前端组件集成"
82
- echo "----------------------------------"
83
-
84
- if grep -q "import VersionDisplay from './components/common/VersionDisplay.vue'" frontend/src/App.vue; then
85
- test_passed "App.vue 已导入 VersionDisplay 组件"
86
- else
87
- test_failed "App.vue 未导入 VersionDisplay 组件"
88
- fi
89
-
90
- if grep -q "<VersionDisplay />" frontend/src/App.vue; then
91
- test_passed "App.vue 模板包含 VersionDisplay 标签"
92
- else
93
- test_failed "App.vue 模板缺少 VersionDisplay 标签"
94
- fi
95
-
96
- echo ""
97
- echo "5. 检查版本号数据源"
98
- echo "----------------------------------"
99
-
100
- if [ -f "package.json" ]; then
101
- VERSION=$(python3 -c "import json; print(json.load(open('package.json')).get('version', 'unknown'))")
102
- test_info "当前版本号: $VERSION"
103
- test_passed "package.json 存在且可解析"
104
- else
105
- test_failed "package.json 不存在"
106
- fi
107
-
108
- echo ""
109
- echo "6. 检查组件目录结构"
110
- echo "----------------------------------"
111
-
112
- if [ -d "frontend/src/components/common" ]; then
113
- test_passed "common 目录已创建"
114
- else
115
- test_failed "common 目录缺失"
116
- fi
117
-
118
- echo ""
119
- echo "=================================="
120
- echo "测试完成"
121
- echo "=================================="
122
- echo ""
123
- echo "后续步骤:"
124
- echo "1. 启动服务: npm start"
125
- echo "2. 测试 API: curl http://localhost:8000/api/version"
126
- echo "3. 打开浏览器访问: http://localhost:8000"
127
- echo "4. 检查右下角是否显示版本号"
128
- echo ""
@@ -1,44 +0,0 @@
1
- #!/usr/bin/env python3
2
- """测试 WebSocket JSON 心跳"""
3
- import asyncio
4
- import json
5
- import sys
6
-
7
- try:
8
- import websockets
9
- except ImportError:
10
- print("请安装: pip install websockets")
11
- sys.exit(1)
12
-
13
-
14
- async def test():
15
- uri = "ws://localhost:38272/ws"
16
- print("连接 WebSocket...")
17
- async with websockets.connect(uri, close_timeout=2) as ws:
18
- # 1. 可能收到 full_state(若后端正常),或直接进入 ping 测试
19
- # 先发送 JSON ping 测试心跳逻辑
20
- print("1. 发送 JSON ping...")
21
- await ws.send(json.dumps({"type": "ping", "timestamp": 1234567}))
22
- msg = await asyncio.wait_for(ws.recv(), timeout=3)
23
- data = json.loads(msg)
24
- if data.get("type") != "pong":
25
- print(f"FAIL: 期望 pong, 收到 {data.get('type')}")
26
- return False
27
- print("2. JSON ping -> pong: OK")
28
-
29
- # 3. 发送纯文本 ping
30
- await ws.send("ping")
31
- msg = await asyncio.wait_for(ws.recv(), timeout=3)
32
- data = json.loads(msg)
33
- if data.get("type") != "pong":
34
- print(f"FAIL: 期望 pong, 收到 {data.get('type')}")
35
- return False
36
- print("3. 文本 ping -> pong: OK")
37
-
38
- print("所有 WebSocket 测试通过!")
39
- return True
40
-
41
-
42
- if __name__ == "__main__":
43
- ok = asyncio.run(test())
44
- sys.exit(0 if ok else 1)
@@ -1,58 +0,0 @@
1
- {
2
- "schema_version": "1.0",
3
- "project_id": "openclaw-agent-dashboard",
4
- "updated_at": "2026-03-19T12:41:29.232499Z",
5
- "sessions": [
6
- {
7
- "sessionId": "agent:architect-agent:subagent:576757a3-3e3f-40b8-95e3-b91cfeecc038",
8
- "agentId": "architect-agent",
9
- "phase": "analysis",
10
- "label": "SA-legacy-anatomy-retry",
11
- "taskSummary": "存量代码摸排 openclaw-agent-dashboard",
12
- "spawnedAt": "2026-03-19T12:31:15.960549Z",
13
- "lastActivityAt": "2026-03-19T12:31:15.960549Z",
14
- "completedAt": "2026-03-19T12:33:40.413958Z",
15
- "status": "COMPLETED",
16
- "failureType": null,
17
- "retryCount": 0,
18
- "retryHistory": [],
19
- "expectedArtifacts": [
20
- "/home/ubuntu/vrt-projects/projects/openclaw-agent-dashboard/.staging/legacy_code_anatomy.md"
21
- ],
22
- "actualArtifacts": [
23
- "/home/ubuntu/vrt-projects/projects/openclaw-agent-dashboard/.staging/legacy_code_anatomy.md"
24
- ],
25
- "parentId": null,
26
- "lastError": null
27
- },
28
- {
29
- "sessionId": "agent:analyst-agent:subagent:a0a08020-d544-4695-9efe-24d5948cd928",
30
- "agentId": "analyst-agent",
31
- "phase": "requirements",
32
- "label": "BA-PRD-version-display",
33
- "taskSummary": "编写界面显示版本号PRD",
34
- "spawnedAt": "2026-03-19T12:34:29.817387Z",
35
- "lastActivityAt": "2026-03-19T12:34:29.817387Z",
36
- "completedAt": "2026-03-19T12:41:29.232476Z",
37
- "status": "COMPLETED",
38
- "failureType": null,
39
- "retryCount": 0,
40
- "retryHistory": [],
41
- "expectedArtifacts": [
42
- "/home/ubuntu/vrt-projects/projects/openclaw-agent-dashboard/.staging/specs/VERSION_DISPLAY_spec.md"
43
- ],
44
- "actualArtifacts": [
45
- "/home/ubuntu/vrt-projects/projects/openclaw-agent-dashboard/.staging/specs/VERSION_DISPLAY_spec.md"
46
- ],
47
- "parentId": null,
48
- "lastError": null
49
- }
50
- ],
51
- "statistics": {
52
- "total": 2,
53
- "running": 0,
54
- "completed": 2,
55
- "stuck": 0,
56
- "failed": 0
57
- }
58
- }
package/tests/.gitkeep DELETED
File without changes