Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
030fbd3
feat: add portfolio MCP tool baseline
SiriThree Jul 23, 2026
6ba7a9d
docs: expand resume baseline dataset
SiriThree Jul 23, 2026
0c77870
docs: add Olist real data baseline
SiriThree Jul 23, 2026
6dec881
docs: add public real data baseline
SiriThree Jul 23, 2026
57af980
docs: align portfolio report with public real baseline
SiriThree Jul 23, 2026
d51d603
docs: add resume claim evidence report
SiriThree Jul 23, 2026
16bebdf
feat: generate real Excel report exports
SiriThree Jul 23, 2026
b1d8dbc
docs: add operation timing evidence workflow
SiriThree Jul 23, 2026
57f2e64
docs: add real anomaly signal evaluation
SiriThree Jul 23, 2026
ae2e3fd
feat: add Feishu webhook sync connector
SiriThree Jul 23, 2026
335a5b9
test: add Feishu webhook batch verification
SiriThree Jul 23, 2026
f178fdf
docs: record Feishu webhook batch evidence
SiriThree Jul 23, 2026
08ba697
docs: add estimated manual timing baseline
SiriThree Jul 23, 2026
4c25d55
docs: highlight portfolio evidence in README
SiriThree Jul 23, 2026
d8258bc
docs: add resume LaTeX project description
SiriThree Jul 23, 2026
85a0d02
docs: shorten resume LaTeX description
SiriThree Jul 23, 2026
49cb426
docs: refine resume project description
SiriThree Jul 23, 2026
c6a8f4e
docs: clarify resume data sources
SiriThree Jul 23, 2026
3f4bc18
chore: add one-command demo launcher
SiriThree Jul 26, 2026
834b908
chore: harden demo launcher
SiriThree Jul 28, 2026
d8a4a16
chore: add demo health check script
SiriThree Jul 28, 2026
96879fe
chore: add reproducible demo delivery and ci
SiriThree Jul 28, 2026
7878d34
feat: polish agent demo and audit workflow
SiriThree Jul 28, 2026
0f4a83d
Merge branch 'main' into codex/audit-center-polish
SiriThree Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.git
.agents
.idea
.vscode
**/target
**/node_modules
**/dist
data
mall-master
docs/evaluation
*.log
*.iml
*.tsbuildinfo
93 changes: 93 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: ShopOps CI

on:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: shopops-ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
backend-test:
name: Backend tests
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"
cache: maven

- name: Run Maven tests
run: mvn --batch-mode --no-transfer-progress -pl shopops-admin -am test

- name: Upload test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: backend-test-reports
path: "**/target/surefire-reports/**"
if-no-files-found: ignore
retention-days: 7

frontend-build:
name: Frontend build
runs-on: ubuntu-latest
timeout-minutes: 10

defaults:
run:
working-directory: shopops-admin-ui

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: shopops-admin-ui/package-lock.json

- name: Install dependencies
run: npm ci

- name: Build React admin
run: npm run build

docker-build:
name: Docker demo image
runs-on: ubuntu-latest
timeout-minutes: 25

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Validate Docker Compose
run: docker compose -p shopops-demo -f deploy/docker-compose.demo.yml config --quiet

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build demo image
uses: docker/build-push-action@v6
with:
context: .
file: deploy/Dockerfile
push: false
tags: shopops-agent:ci
cache-from: type=gha
cache-to: type=gha,mode=max
144 changes: 128 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,32 @@ ShopOps 是一个面向电商运营场景的 AgentOps 管理平台。项目目

> 运营人员在 Agent 工作台用自然语言发起日常任务,系统自动识别意图,调用订单、评价、商品、投放等工具,生成结构化运营日报、异常告警和改进建议,并沉淀任务、工具、报告、审批、审计和量化评测数据。

## 可验证结果

| 指标 | 当前结果 | 证据 |
|---|---:|---|
| 公开真实数据业务样例 | 760 | Olist、Criteo、UCI Online Retail、Store Sales |
| 派生 MCP 工具调用 | 2670 | `docs/ShopOps-public-real-baseline.json` |
| 高风险审批路由调用 | 450 | 退款、商品标题、广告预算建议 |
| Agent 自动化评测 | 14/14 通过 | `shopops-admin/target/evaluation` |
| 工具调用成功率 | 98.6% | `docs/ShopOps-resume-claim-evidence.md` |
| 异常信号评测 | Precision 94.81%, Recall 100% | `docs/ShopOps-real-anomaly-evaluation.md` |
| 飞书 webhook 批量验收 | 100/100 成功,HTTP 200 率 100% | `docs/evaluation/feishu-webhook-batch-summary.json` |
| 飞书 webhook 平均耗时 | 311.9 ms | 100 次连续真实 webhook 调用 |
| Excel 报表导出 | 真实 `.xlsx`,4 个 worksheet | `docs/evaluation/shopops-operation-report-sample.xlsx` |
| 日报耗时收益 | 估算 35.4 分钟 -> 4.2 分钟 | 标记为 `ESTIMATED`,不是实测人工计时 |

## 项目亮点

- 自然语言 Agent 工作台:支持“生成今天店铺运营日报”“分析最近差评原因”“找出低点击商品并给优化建议”等任务输入。
- MCP 风格工具层:统一注册和调用订单、评价、商品、广告、外部报表等工具,调用过程进入工具日志和审计链路。
- Agent 任务编排:支持任务创建、意图路由、步骤执行、异步调度、失败重试、降级处理和任务追踪。
- 运营报告生成:输出 Markdown 运营日报、量化指标、证据链、配置快照和动作建议。
- 审批与风控:高风险工具支持人工审批、确认语校验、审批撤回、批量处理和过期处理。
- 店铺运行配置:退款率阈值、差评阈值、审批开关、模型策略可按店铺配置,并在 Agent 执行中真实生效。
- 全链路审计:任务、工具、报告、审批、模型调用、配置变更都可追踪,便于排障和验收展示。
- 真实数据演示:已接入 Olist 公开电商数据,覆盖订单、评价、商品候选三类业务输入。
- React 管理前端:管理后台已迁移到 React + TypeScript + Axios + ECharts + Ant Design。
- 量化评测基线:提供 Agent 评测脚本、作品集报告和可复现的验收数据。
- 自然语言 Agent 工作台:运营人员可以输入“生成今天店铺运营日报”“分析最近差评原因”“找出低点击商品并给优化建议”等任务,系统自动路由并展示执行步骤、工具调用和最终报告。
- MCP 风格工具编排:统一封装订单查询、评价分析、商品优化、投放复盘、Excel 导出、飞书同步等 18 个工具,所有调用进入工具日志、审计链路和评测统计。
- Agent 执行闭环:支持任务创建、意图路由、步骤执行、同步/异步调度、失败重试、降级处理、任务追踪和报告落库。
- 风控与人工审批:退款执行、商品标题修改、广告预算建议等高风险工具进入审批流程,支持确认语、撤回、批量处理、过期处理和审计追踪。
- 店铺运行配置:退款率阈值、差评阈值、审批开关、模型策略可按店铺配置,并在 Agent 报告和工具执行中真实生效。
- 真实数据与评测:Olist 作为在线演示主链路,Criteo、UCI Online Retail、Store Sales 补齐广告、退款/取消代理和外部事件评测缺口。
- 报表输出闭环:运营日报可查看 Markdown 证据链,可导出真实 Excel 文件,并已通过 100 次真实飞书 webhook 批量同步验收。
- React 管理前端:后台已迁移到 React + TypeScript + Axios + ECharts + Ant Design,覆盖工作台、任务、报告、审计、工具、审批、模型和组织配置等页面。
- 可复现作品集证据:提供基线生成、Agent 评测、异常信号评测、飞书批量验收、耗时收益估算等脚本和文档。

## 当前完成度

Expand All @@ -34,7 +48,7 @@ ShopOps 是一个面向电商运营场景的 AgentOps 管理平台。项目目
| Model Gateway | 已完成基础版 | Provider、Prompt 模板、调用日志、OpenAI-compatible 适配、规则 fallback |
| React 前端 | 已完成主页面迁移 | 工作台、Dashboard、任务、报告、审计、工具、审批、模型、组织等页面 |
| Olist 数据 | 已完成演示版 | 订单、评价、商品候选真实数据接入 |
| 广告/外部指标真实数据 | 待扩展 | 当前使用内置演示数据 |
| 公开多源真实数据基线 | 已完成 v1 | Criteo 广告、UCI 退款/取消代理、Store Sales 外部事件已纳入评测基线 |

## 快速开始

Expand All @@ -46,6 +60,72 @@ ShopOps 是一个面向电商运营场景的 AgentOps 管理平台。项目目
- Python 3.10+
- 可选:Docker、MySQL、Redis、RabbitMQ

一键启动演示:

```powershell
powershell -ExecutionPolicy Bypass -File scripts/start-shopops.ps1
```

脚本会自动准备 Olist 演示数据、安装 `shopops-common`、检查/启动本地 MySQL 持久化存储、启动后端,并在启动成功后打开工作台。若 `8080` 被占用,会自动尝试 `8081` 到 `8100`。

如果只安装了 Docker Desktop,可以直接构建、启动并预置完整演示链路:

```powershell
powershell -ExecutionPolicy Bypass -File scripts/start-shopops-docker.ps1
```

Docker Hub 访问受限时:

```powershell
powershell -ExecutionPolicy Bypass -File scripts/start-shopops-docker.ps1 -UseChinaMirror
```

停止容器:

```powershell
docker compose -p shopops-demo -f deploy/docker-compose.demo.yml down
```

启动后访问:

```text
http://localhost:8080/admin/workbench.html
```

如果脚本自动切换了端口,以脚本输出的 `Workbench` 地址为准。

常用选项:

```powershell
powershell -ExecutionPolicy Bypass -File scripts/start-shopops.ps1 -Port 8081
powershell -ExecutionPolicy Bypass -File scripts/start-shopops.ps1 -NoOpenBrowser
powershell -ExecutionPolicy Bypass -File scripts/start-shopops.ps1 -StrictPort
powershell -ExecutionPolicy Bypass -File scripts/start-shopops.ps1 -Memory
```

演示前健康检查:

```powershell
powershell -ExecutionPolicy Bypass -File scripts/check-shopops.ps1
```

一键预置完整演示链路:

```powershell
powershell -ExecutionPolicy Bypass -File scripts/seed-shopops-demo.ps1
```

该脚本会等待服务就绪、执行健康检查,并创建经营日报任务、报告、高风险工具审批、审批后重试和审计记录。完成后会输出任务、报告、工具、审批、审计页面地址并打开工作台。默认 JDBC / MySQL 模式下,任务、报告、工具日志、审批和审计记录会保留;如需临时清空式演示,可用 `start-shopops.ps1 -Memory`。

如果后端不在 8080:

```powershell
powershell -ExecutionPolicy Bypass -File scripts/check-shopops.ps1 -Port 8081
powershell -ExecutionPolicy Bypass -File scripts/seed-shopops-demo.ps1 -Port 8081
```

也可以手动分步启动:

准备 Olist 演示数据:

```powershell
Expand All @@ -55,7 +135,7 @@ python scripts/prepare_olist_demo.py
启动后端:

```powershell
mvn -pl shopops-admin spring-boot:run "-Dspring-boot.run.arguments=--server.port=8080"
mvn -pl shopops-admin spring-boot:run "-Dspring-boot.run.profiles=dev" "-Dspring-boot.run.arguments=--server.port=8080"
```

打开 Agent 工作台:
Expand Down Expand Up @@ -116,8 +196,8 @@ python scripts/prepare_olist_demo.py
说明:

- Olist 不包含真实退款金额,项目使用 `canceled / unavailable` 订单支付金额作为售后风险代理值。
- Olist 不包含真实广告投放数据,广告表现当前使用内置演示数据
- Olist 不包含平台外部环境指标,外部报表当前使用内置演示数据
- Olist 不包含真实广告投放数据,广告表现已在公开多源基线中使用 Criteo Attribution 数据补齐;当前 Olist 在线演示连接器仍可回退到内置演示数据
- Olist 不包含平台外部环境指标,外部事件已在公开多源基线中使用 Store Sales `holidays_events.csv` 补齐;当前 Olist 在线演示连接器仍可回退到内置演示数据
- Olist 不提供商品标题,当前使用英文类目和 productId 前缀生成展示名称。

## Agent 主链路
Expand Down Expand Up @@ -226,6 +306,8 @@ Agent 与平台能力:

## 常用命令

GitHub Actions 会在每次 push 和 Pull Request 时并行执行后端测试、React 前端构建以及 Docker Compose/镜像构建,工作流位于 `.github/workflows/ci.yml`。

后端全量测试:

```powershell
Expand Down Expand Up @@ -287,7 +369,25 @@ mvn -pl shopops-admin spring-boot:run "-Dspring-boot.run.profiles=dev"
| Tool invocation success rate | 98.6% |
| Approval decision accuracy | 100% |
| Config effect accuracy | 100% |
| 最近全量测试 | 83 tests, 0 failures, 8 skipped |
| Public real-data business samples | 760 |
| Public real-data derived MCP tool calls | 2670 |
| Public real-data high-risk approval-routed calls | 450 |
| Olist real orders | 99441 |
| Olist real reviews | 99224 |
| Olist real products | 32951 |
| Criteo real ad impressions | 16468027 |
| Criteo real ad clicks | 5947563 |
| Criteo real ad conversions | 806196 |
| UCI Online Retail lines | 541909 |
| UCI cancellation/refund proxy lines | 10624 |
| Store Sales holiday events | 350 |
| Real anomaly signal precision | 94.81% |
| Real anomaly signal recall | 100% |
| Feishu webhook batch success rate | 100/100 |
| Feishu webhook HTTP 200 rate | 100% |
| Feishu webhook average latency | 311.9 ms |
| Estimated daily report time saving | 35.4 min -> 4.2 min |
| 最近全量测试 | 88 tests, 0 failures, 8 skipped |

评测覆盖:

Expand All @@ -300,6 +400,10 @@ mvn -pl shopops-admin spring-boot:run "-Dspring-boot.run.profiles=dev"
- 店铺阈值配置生效
- 模型策略进入报告 evidence
- 模型失败后的降级完成
- 飞书 webhook 真实 HTTP 同步
- Excel 报表真实导出

说明:`Estimated daily report time saving` 来自固定工作流估算基线,证据项标记为 `ESTIMATED`;真实人工计时仍需补充至少 5 次人工流程记录。

## Model Gateway

Expand Down Expand Up @@ -342,6 +446,15 @@ powershell -ExecutionPolicy Bypass -File scripts/verify-model-gateway-demo.ps1 -

- [Agent 工作台作品集演示脚本](docs/Agent工作台作品集演示脚本.md)
- [ShopOps 作品集量化报告](docs/ShopOps-portfolio-report.md)
- [ShopOps 公开多源真实数据基线](docs/ShopOps-public-real-baseline.md)
- [ShopOps 真实异常信号评测](docs/ShopOps-real-anomaly-evaluation.md)
- [ShopOps 简历指标证据表](docs/ShopOps-resume-claim-evidence.md)
- [ShopOps 简历项目描述 LaTeX](docs/ShopOps简历项目描述-LaTeX.md)
- [ShopOps 日报耗时证据表](docs/ShopOps-operation-timing-evidence.md)
- [ShopOps Olist 真实数据基线](docs/ShopOps-olist-real-baseline.md)
- [ShopOps 简历量化基线](docs/ShopOps-resume-baseline.md)
- [Feishu 同步 Webhook 验收说明](docs/Feishu同步Webhook验收说明.md)
- [Feishu 批量同步验收记录](docs/Feishu批量同步验收记录.md)
- [ShopOps 作品集中文演示讲稿](docs/ShopOps作品集中文演示讲稿.md)
- [Olist 真实数据接入说明](docs/Olist真实数据接入说明.md)
- [Agent 评测基线与作品集数据](docs/Agent评测基线与作品集数据.md)
Expand All @@ -350,4 +463,3 @@ powershell -ExecutionPolicy Bypass -File scripts/verify-model-gateway-demo.ps1 -
- [文档索引](docs/README.md)



37 changes: 37 additions & 0 deletions deploy/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
ARG BUILDER_IMAGE=eclipse-temurin:17-jdk
ARG RUNTIME_IMAGE=eclipse-temurin:17-jre

FROM ${BUILDER_IMAGE} AS build

RUN apt-get update \
&& apt-get install -y --no-install-recommends maven \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /workspace

COPY pom.xml .
COPY shopops-common/pom.xml shopops-common/pom.xml
COPY shopops-admin/pom.xml shopops-admin/pom.xml

COPY shopops-common/src shopops-common/src
COPY shopops-admin/src shopops-admin/src
RUN --mount=type=cache,target=/root/.m2 \
mvn -pl shopops-admin -am package -DskipTests

FROM ${RUNTIME_IMAGE}

RUN apt-get update \
&& apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY --from=build /workspace/shopops-admin/target/shopops-admin-*.jar /app/shopops-admin.jar
COPY docs/demo-data/olist /app/docs/demo-data/olist

EXPOSE 8080

HEALTHCHECK --interval=10s --timeout=5s --start-period=20s --retries=6 \
CMD curl --fail --silent http://localhost:8080/admin/workbench.html > /dev/null || exit 1

ENTRYPOINT ["java", "-jar", "/app/shopops-admin.jar"]
28 changes: 28 additions & 0 deletions deploy/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Deploy

## Portfolio demo

The demo image contains the Spring Boot application, React static assets, and generated Olist connector files. It runs in memory mode and does not require MySQL, Redis, or RabbitMQ.

From the repository root on Windows:

```powershell
powershell -ExecutionPolicy Bypass -File scripts/start-shopops-docker.ps1
```

The launcher builds the image, starts the container, waits for health checks, and seeds a complete task/report/approval/audit chain. Use `-Port 8081` when port 8080 is occupied.

If Docker Hub is unavailable in the current network:

```powershell
powershell -ExecutionPolicy Bypass -File scripts/start-shopops-docker.ps1 -UseChinaMirror
```

Stop the demo:

```powershell
docker compose -p shopops-demo -f deploy/docker-compose.demo.yml down
```

Re-running the launcher after `down` starts with clean in-memory task data. The Docker image does not contain local raw datasets, secrets, evaluation files, or Git metadata.

## Development infrastructure

Development infrastructure:

```bash
Expand Down
Loading
Loading