- 新增 app_metadata 模型、仓储与服务 - 将默认 edge 验证步骤改为由 app_metadata 驱动生成 - 新增 chat_session / chat_message 会话层模型与 chat service - 新增 demo chat API,支持会话创建、消息发送、任务确认 - 新增最小 Web Demo 页面,形成聊天式演示入口 - 增强任务报告,补充 audit_summary 与更细粒度 task_metrics - 增强 edge-agent 执行器:tcp_probe、日志时间范围过滤、进程指标与更灵活健康检查 - 更新 README 与当前进度总结,MVP 进度推进到约 94%
Smart Deploy Agent Demo Edge Agent
Setup
python -m venv .venv
.venv\Scripts\python -m pip install -e edge-agent
Run Once
set PYTHONPATH=edge-agent
.venv\Scripts\python -m app.main --once
Run Loop
set PYTHONPATH=edge-agent
.venv\Scripts\python -m app.main
Test
set PYTHONPATH=edge-agent
C:\Users\MH\AppData\Local\Programs\Python\Python311\python.exe -m pytest edge-agent/tests -q -p no:cacheprovider
Default Runtime Notes
- default backend url:
http://127.0.0.1:8000 - default edge id:
edge-shanghai-001 - current registered tools:
http_health_checktcp_probecheck_portcheck_processgrep_logwindows_service_controllinux_service_control - current bootstrap implements: heartbeat pull task execute registered tools report result report event
Package Scripts
Current repo includes:
scripts/start-windows.ps1scripts/start-linux.shscripts/package-windows.ps1scripts/package-linux.shscripts/package-linux.ps1
These scripts currently prepare a portable package skeleton and startup entrypoints.
Current Windows package script already bundles a private Python runtime into:
runtime/python/
Current Linux package script supports bundling a private Python runtime directory passed in by argument or EDGE_PYTHON_HOME.
Current repo also provides package-linux.ps1 as a Windows-hosted equivalent for validating Linux artifact structure when bash/WSL is unavailable.
Packaging Direction
For user-side delivery, this edge agent is intended to be bundled as:
- Windows:
zipportable package - Linux:
tar.gzself-contained runtime directory
Current Verification Baseline
Current edge-agent baseline: 20 passed
Verified Packaging
Current verified artifact:
- Windows portable package zip has been generated and verified to include:
start.ps1app/main.pyruntime/python/python.exe - Linux portable package tar.gz has been generated and verified to include:
start.shapp/main.pyruntime/python/bin/python3
Native Linux Verification Steps
When a real Linux/bash environment is available, validate native packaging with:
export EDGE_PYTHON_HOME=/path/to/private/python/runtime
chmod +x edge-agent/scripts/package-linux.sh
./edge-agent/scripts/package-linux.sh
tar -tf edge-agent/dist/edge-agent-linux-*.tar.gz | grep -E 'start.sh|app/main.py|runtime/python/bin/python3'
Recommended follow-up checks:
- verify
runtime/python/bin/python3can start - verify
start.sh --oncecan run against backend - verify file permissions are preserved after extraction