merge: preserve active plans and document archive in integration

Bring the reviewed planning, archival index, release controls and local startup workflow into the consolidated development tree without changing the frozen release candidate.
This commit is contained in:
2026-10-08 19:52:29 +08:00
66 changed files with 4846 additions and 58 deletions
+25
View File
@@ -41,3 +41,28 @@ Health checks:
- Contract API: `http://localhost:8100/health`
- AI Platform API: `http://localhost:8101/health`
- MinIO Console: `http://localhost:9001`
## Windows 本地启动(合同与 Prompt 测试)
在 PowerShell 中执行:
```powershell
cd D:\yuqei-project\ai-contract-platform
powershell -ExecutionPolicy Bypass -File .\start-dev.ps1
```
看到 `Ready: http://localhost:3000/login` 后,在谷歌浏览器访问这个地址,用已有账号登录。脚本优先打开 Chrome;只想启动服务、自己打开浏览器时,加上 `-NoBrowser`。
启动脚本检查已有的 `.venv-project` 和前端依赖,执行两个 API 的数据库迁移,然后在后台启动前端(3000)、合同 API(8100)、AI 平台 API(8101)、合同审查任务和起草续处理任务。关闭 PowerShell 窗口不会关闭这些后台服务。`-WithReviewWorker` 参数仍兼容,但现在默认已经启动审查任务。
配置继续使用两个 API 目录的 `.env` 和前端目录的 `.env.local`。脚本从前端配置读取内部服务通信密钥,使前后端保持一致,保留现有数据库和模型供应商配置。数据库需要能够从本机访问;模型调用需要已配置的供应商可用。本机服务通信会自动绕过系统代理。
重复执行启动命令会复用本项目已正常运行的服务。端口被其他程序占用、数据库迁移失败或服务未就绪时,脚本会报错。日志位于项目根目录的 `.runtime\dev-logs\`,每个服务分别保存 `.out.log` 和 `.err.log`;数据库迁移也有单独日志。
停止脚本管理的服务:
```powershell
powershell -ExecutionPolicy Bypass -File .\stop-dev.ps1
```
停止脚本会核对进程编号、创建时间和命令,只停止记录中仍属于本项目的进程。修改配置或升级代码后,先停止再启动。重启电脑后,重新执行启动命令即可。