@harness-engineering/dashboard (英语)
地方网络仪表板,用于利用项目保健、路线图可视化、管弦乐器监测和知识图表探索。 由React + Hono所建,由Server-Sent Events进行直播更新.
快速启动
# From any harness-enabled project:
harness dashboard
# Or during development (from packages/dashboard):
pnpm dev
仪表板打开 http://localhost:3701 默认。 这个 harness dashboard 命令自动打开浏览器(通过) --no-open (d) 禁止.
CLI 选项
harness dashboard [options]
--port <port> Client dev server port (default: 3700)
--api-port <port> API server port (default: 3701)
--no-open Do not automatically open browser
--cwd <path> Project directory (defaults to cwd)
页 次
仪表板有11页:
| 页次 | 路线 | 说明 |
|---|---|---|
| 概览 | / | At-a-grance项目摘要:路线图进展、健康得分、图表统计、安全/perf/arch检查结果 |
| 请注意 | /attention | 需要人文审查的管弦乐团的加速互动,并带有丰富的光谱和关切信号 |
| 收 养 | /adoption | 技能使用衡量标准:引用计数、成功率、平均持续时间和最后使用的时间戳 |
| 卫生 | /health | 以嵌入为基础的项目保健,并设有可折叠的科室,用于安全检查、尸检和拱门违规 |
| 分析 | /analyze | 互动智能管道:实时提交任务描述和流 SEL、CML和PESL结果 |
| 路线图 | /roadmap | Stats 栏,具有索赔工作流程、依赖性图表和任务历史的里程碑组合特征表 |
| 整形仪 | /orchestrator | 活式管弦乐器状态:运行的代理、速率限制、货币、符号使用、勾选活性以及代理流 |
| 飞行中的工作 | /s/kanban | 管弦乐/平行协调员的活干道:排队 / 在进步中/被封堵 / 装有每张任务卡的干道(拥有代理、工作树、相位、经过时间、阻塞原因,以及 blockedBy 依赖芯片)。 仅读- 从同一端衍生客户端 useOrchestratorSocket WebSocket快照, 没有服务器侧更改 . |
| 影响 | /impact | 图像异常探测(显示点、外线)和交互式爆炸半径可视化 |
| 图 | /graph | 知识图统计:节点/尖端计数,类型分解,密度,相通组件 |
| 聊天 | /chat | 全屏幕 AI 聊天界面,包含技能意识背景,命令调色板和会话管理 |
建筑
packages/dashboard/
src/
client/ React SPA (Vite + Tailwind CSS)
pages/ 10 page components (one per route)
components/ Shared UI: KpiCard, BlastRadiusGraph, chat system, roadmap components
hooks/ useSSE, useOrchestratorSocket, useApi, useChatContext, etc.
utils/ Type guards, chat streaming, context-to-prompt
server/ Hono API server
routes/ Route handlers (one file per domain)
gather/ Data gatherers: roadmap, health, graph, security, perf, arch, anomalies
sse.ts SSEManager: shared polling loop, broadcast to all connected clients
cache.ts In-memory cache with configurable TTL (default 60s)
gather-cache.ts Cache for expensive one-shot gatherers (security, perf, arch, anomalies)
context.ts ServerContext: project path, cache, SSE manager
shared/ Types, constants, and type guards shared between client and server
客户-服务器通信
仪表板采用两种交流模式:
SSE( 仆人事件) - 概览、保健、路线图和图页 /api/sse。服务器运行一个共享的投票回路(默认30s间隔),收集路线图、健康和图表数据,并对所有连接客户进行广播。 贵重检查(安全检查,perf检查,拱门检查,异常检查)在第一次连接上运行一次并被缓存给后续客户.
网络安全套 - Orchestrator和注意的页面连接到指挥家的WebSocket at /ws 用于实时显示运行中的代理,待互动,速率限制和代理流事件.
资源 -- 所有页面也可以通过REST端点获取数据. "领养","影响","聊天"等页面使用直接API调用.
服务器 API 路由
| 方法 | 终点 | 说明 |
|---|---|---|
| 获取 | /api/health-check | 服务器活性检查( E){ status: "ok" }(中文(简体) ) |
| 获取 | /api/overview | 综合路线图+健康+图示 |
| 获取 | /api/roadmap | 解析的路线图数据(里程碑、特征) |
| 获取 | /api/roadmap/charts | 图表特定数据(里程碑、特征、阻断器边缘) |
| 获取 | /api/health | 带有可选安全/perf/arch数据的健康结果 |
| 获取 | /api/graph | 知识图表统计 |
| 获取 | /api/adoption | 技术收养快照 |
| 获取 | /api/ci | CI 从收集缓存中检查数据 |
| 获取 | /api/impact/anomalies | 图表异常(插出点、出站点) |
| 邮政 | /api/impact/blast-radius | 计算一个节点的爆炸半径({ nodeId, maxDepth? }(中文(简体) ) |
| 获取 | /api/sse | SSE 事件流( 概览+检查事件) |
| 邮政 | /api/actions/roadmap-status | 更新地图上的特性状态( M) |
| 邮政 | /api/actions/validate | 运行 harness validate 返回输出 |
| 邮政 | /api/actions/regen-charts | 无效缓存和再生成图表标记 |
| 邮政 | /api/actions/refresh-checks | 重新进行安保/perf/arch/异常检查,并通过SSE广播 |
配置
环境变量
| 变量 | 默认 | 说明 |
|---|---|---|
DASHBOARD_API_PORT | 3701 | Hono API 服务器端口 |
DASHBOARD_CLIENT_PORT | 3700 | Vite Dev 服务器端口 |
HARNESS_PROJECT_PATH | cwd() | 数据收集项目根 |
常数
| 常数 | 数值 | 说明 |
|---|---|---|
API_PORT | 3701 | 默认 API 服务器端口 |
DASHBOARD_PORT | 3700 | 默认客户端 Dev 服务器端口 |
DEFAULT_POLL_INTERVAL_MS | 30000 | SSE 投票间隔(30秒) |
GRAPH_DIR | .harness/graph | 知识图表目录路径 |
发展
# Install dependencies
pnpm install
# Start dev mode (Vite client + tsx server, hot reload)
pnpm dev
# Build for production
pnpm build
# Run tests
pnpm test
# Type check
pnpm typecheck
# Lint
pnpm lint
在 dev 模式下, pnpm dev 运行 Vite 客户端 Dev 服务器(3700端口)和 Hono API 服务器(3701端口口口) 。 在生产中,Hono服务器同时服务API和从单一端口(3701)建立的客户端资产.
依赖关系
@harness-engineering/core -> project health, entropy detection
@harness-engineering/graph -> knowledge graph queries, blast radius
@harness-engineering/types -> shared type definitions
hono -> API server framework
@hono/node-server -> Node.js adapter for Hono
react / react-dom -> UI framework
react-router -> client-side routing
tailwindcss -> utility-first CSS
framer-motion -> animations
lucide-react -> icons
react-virtuoso -> virtualized lists (Attention page)
react-markdown -> markdown rendering (Chat, Attention)
react-syntax-highlighter -> code block highlighting
许可证
麻省理工学院