|
|
17 ساعت پیش | |
|---|---|---|
| .. | ||
| .cache | 2 روز پیش | |
| backend | 17 ساعت پیش | |
| frontend | 17 ساعت پیش | |
| test-artifacts | 2 روز پیش | |
| .gitignore | 17 ساعت پیش | |
| DATA_CONTRACT.md | 17 ساعت پیش | |
| README.md | 17 ساعت پیش | |
当前智能创作构建系统的独立可视化。后端是只提供确定性 fake 数据的 FastAPI,前端是 Next.js + React Flow 的 n8n 风格节点画布。
画布按真实新流程展开:输入快照与 Mission Binding → Direction → 多路 Evidence → Structure / Paragraph / ElementSet → Compare / Compose / Portfolio → Phase 3 Root Delivery → 原子发布 → 旧 API 回读。每个任务继续细分为冻结合同、Operation、Worker Attempt、Artifact、Validator、Validation 和 Planner Decision。
cd visualization/backend
python -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/uvicorn app.main:app --host 127.0.0.1 --port 8788
cd visualization/frontend
npm install
NEXT_PUBLIC_API_BASE=http://127.0.0.1:8788 npm run dev
访问 http://127.0.0.1:3008。后端不会读取数据库;所有接口都明确返回 data_mode=fake。
GET /api/healthGET /api/runsGET /api/runs/{script_build_id}/graphGET /api/runs/{script_build_id}/nodes/{node_id}GET /api/schema-catalogcd visualization/backend && python -m pytest -q
cd visualization/frontend && npm test && npm run typecheck && npm run build
在父项目依赖已安装的开发环境中,还可直接用当前 Host/Agent constructors、Pydantic wire models 与 SQLAlchemy table metadata 交叉验证:
cd visualization/backend
PYTHONPATH=.:/tmp/scriptbuild-dbdeps:../../agent:../../script_build_host/src \
../../agent/.venv/bin/python scripts/validate_host_contracts.py
backend/app/contracts.py 固化了当前项目领域对象与 Agent wire model 的字段清单。测试要求每个 fake payload 与对应清单完全同键,防止为了展示而发明字段或漏字段。
字段来源、开放 JSON 边界和接真实数据仍缺的接口见 DATA_CONTRACT.md。