Go to file
z.zhang 967ae3703a feat(fallback): FB-02 智能兜底 P2——写操作过确认卡门禁(计划锁 + checkpoint + diff 验证)
- _POWER_MAP 新增 agent.fallback.execute=P2 / execute.highrisk=P3(默认拒绝)
- 计划锁:结构化计划草稿 + 指纹冻结进确认卡;execute 逐步比对,偏离即熔断 blocked + 自动回滚
- checkpoint 成对快照强制前置;失败/熔断自动回滚并在 restore 后补写审计
- 新建 fallback_verify.py(core-fallback-verify):world diff 对账,数字只许来自冻结快照
- pi_bridge 写面:fs_write/aps_invoke 经 ActionMailbox;桥侧事件流为唯一凭证源,Pi 自述一律不作执行依据
- workflow execute_confirmed +1 分支(唯一写入口);FROZEN/ASSISTED 双模式规避 90s 同步超时
- 验证:P2 目标 44 passed;全量黄金 1090 passed / 3 failed / 14 errors(均既有问题,stash 基线逐例一致);S3 真实冒烟 16/16(真实 Kimi K2.6:陌生格式文件 → 计划 → 确认卡 → 导入 → +15 逐值对账);注入攻击 21/21(计划外工具熔断回滚/自述确认物理无效/数据藏注入拦截)
- 文档:fallback.md P2 章节、harness.md 权力矩阵、CHANGELOG
- 边界:S4/S6/S7 与 highrisk 白名单属 P3;桌面打包未做
2026-09-03 23:29:43 +08:00
.claude/skills/gitnexus feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
.github/workflows feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
_refs feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
apps feat(features): FF-01 功能开关文件化配置(fail-open 可见性开关) 2026-09-02 02:46:18 +08:00
aps-frontend first commit 2026-07-21 11:05:57 +08:00
demo-data feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
docs feat(fallback): FB-02 智能兜底 P2——写操作过确认卡门禁(计划锁 + checkpoint + diff 验证) 2026-09-03 23:29:43 +08:00
packaging feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
poc poc(fallback): Pi Agent 兜底 P0 验证设施与方案文档 2026-09-03 13:48:20 +08:00
scripts feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
server feat(fallback): FB-02 智能兜底 P2——写操作过确认卡门禁(计划锁 + checkpoint + diff 验证) 2026-09-03 23:29:43 +08:00
shared/schemas feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
tests feat(fallback): FB-02 智能兜底 P2——写操作过确认卡门禁(计划锁 + checkpoint + diff 验证) 2026-09-03 23:29:43 +08:00
video feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
.codex-uvicorn.err.log first commit 2026-07-21 11:05:57 +08:00
.codex-uvicorn.out.log first commit 2026-07-21 11:05:57 +08:00
.codex-vite.err.log first commit 2026-07-21 11:05:57 +08:00
.codex-vite.out.log first commit 2026-07-21 11:05:57 +08:00
.dockerignore feat: 完善 APS 工作台、租户认证与桌面授权 2026-07-28 02:14:13 +08:00
.env.example feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
.gitignore feat(fallback): FB-01 智能兜底 P1(只读)——Pi Agent 兜底车道进产品路径 2026-09-03 13:48:03 +08:00
AGENTS.md feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
APS智能体演示视频.mp4 feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
APS智能体演示讲解稿.md feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
APS智能体演讲稿-功能对照版.md feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
APS智能体演讲稿-架构汇报版(20-30分钟).md feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
APS智能体演讲稿-领导汇报版.md feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
APS智能体演讲稿.md feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
CLAUDE.md feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
Dockerfile feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
PROJECT_OPERATING_RULES.md feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
Pi-Agent兜底能力详细方案.md poc(fallback): Pi Agent 兜底 P0 验证设施与方案文档 2026-09-03 13:48:20 +08:00
Pi-Agent接入计划.md poc(fallback): Pi Agent 兜底 P0 验证设施与方案文档 2026-09-03 13:48:20 +08:00
Pi-Agent接入详细计划.md poc(fallback): Pi Agent 兜底 P0 验证设施与方案文档 2026-09-03 13:48:20 +08:00
README.md feat(auth): integrate JMS login 2026-07-29 23:22:40 +08:00
Tauri迁移可行性评估.md poc(fallback): Pi Agent 兜底 P0 验证设施与方案文档 2026-09-03 13:48:20 +08:00
alembic.ini feat: 完善 APS 工作台、租户认证与桌面授权 2026-07-28 02:14:13 +08:00
docker-image-tag.txt feat: 完善 APS 工作台、租户认证与桌面授权 2026-07-28 02:14:13 +08:00
package.json feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
plan.md feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
pyproject.toml feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
requirements.txt feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00
锐扬演示-操作手册.md feat: APS 智能排产智能体全量实现(M-POC~M6 + 跨阶段治理 + round-1~66) 2026-08-20 11:39:21 +08:00

README.md

APS 计划排产智能体

左手自然语言对话、右手可视化排产盘的计划排产智能体。
文档入口(大管家):docs/README.md
架构蓝图:plan.md(目标态多,落地以 docs/ 分类文档为准)
交互验证原型:poc/workbench.html

仓库结构

aps-agent/
├─ apps/web/           # React 18 + TS + Vite(左说右动 UI,Web/桌面共用)
├─ apps/desktop/       # Electron 壳(数据落 ~/.aps,对标 Codex)
├─ server/             # FastAPI(Gateway + Agent Core + 规则引擎 + 世界状态)
├─ scripts/            # dev:web / dev:desktop 启动脚本
├─ shared/             # 跨语言契约(JSON Schema)
├─ tests/golden/       # 黄金测试(pytest)
├─ docs/               # 活文档(大管家 + 产品/架构/算法)
├─ aps-frontend/       # 早期静态原型(对照用)
├─ poc/                # 「左说右动」POC
└─ plan.md             # 架构蓝图

文档怎么找

你是谁 从哪读
产品 / 业务 docs/product/
架构 / 研发 docs/architecture/
算法 docs/algorithm/
每次改动记账 docs/CHANGELOG.md

快速开始

形态说明

形态 用户数据 开发命令 打包 部署
Web 仓库 server/data/(或 APS_HOME) npm run dev:web npm run build:web 静态前端 + 后端服务
桌面 ~/.aps/(skills/sessions/data…,对标 Codex) npm run dev:desktop npm run build:desktop 发安装包,无需服务器托管 UI

详见 docs/architecture/desktop.md。

1. 依赖

python -m venv .venv
.venv\Scripts\activate          # Windows;Linux/macOS: source .venv/bin/activate
pip install -r requirements.txt
copy .env.example .env          # 可选

npm run bootstrap                   # 安装 apps/web + apps/desktop 依赖

2. 开发运行

联调 Web 用户登录前,在 .env 中设置 JMS 地址与本地会话密钥:

APS_AUTH_PROVIDER=jms
JMS_AUTH_BASE_URL=https://jms-mes-api.jzplat.com
JMS_AUTH_SESSION_SECRET=至少32个随机字符
APS_LICENSE_PROVIDER=mock

Web 端会从 JMS 读取启用企业,用户选择所属企业后使用真实账号密码登录;如需限制为单一企业, 可配置 JMS_AUTH_TENANT_CODE 与 JMS_AUTH_TENANT_NAME。JMS 当前没有自助注册或未登录自助 找回密码接口,账号创建与密码重置由所属企业管理员处理。 桌面端不使用账号,开发授权码为 APS-HOUR-DEMO、APS-DAY-DEMO、APS-WEEK-DEMO、APS-MONTH-DEMO、 APS-YEAR-DEMO、APS-PERP-DEMO。

# Web(浏览器 http://localhost:5173 ,API :8000)
npm run dev:web

# 桌面(Electron 窗口;数据写入 %USERPROFILE%\.aps)
npm run dev:desktop

3. 打包

npm run build:web               # apps/web/dist → 部署静态站
npm run build:desktop           # Electron 安装包 → apps/desktop/release

4. 验收路径(摘录)

打开 http://localhost:5173 :

  1. 「对比几种策略」→ 方案卡 → 采用 → 右侧甘特刷新
  2. 「存个档」→ 时间线检查点 → 点检查点回滚(P2 确认卡)
  3. 「试排一版交期优先」/ 「发布这个版本」
  4. pytest tests/golden -q(当前期望全绿,见 CHANGELOG 最新验证数)

完整旅程说明:docs/product/journeys.md

大模型接入

DeepSeek / KIMI(OpenAI 兼容),.env 配置 LLM_PROVIDER / LLM_API_KEY 等。
意图:正则快路 → LLM JSON;失败自动降级。详见 plan.md §9.6。

代码规范

遵循 plan.md §12:中文意图注释、权力等级、moduleId、文档同轮同步(见 docs 大管家)。