From a488360d460c71f7c920ccb69fbc2a2ea516f378 Mon Sep 17 00:00:00 2001 From: Guichumo <836061373@qq.com> Date: Sat, 21 Nov 2026 17:22:13 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=B7=BB=E5=8A=A0=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E6=A0=B9=20README=20=E4=B8=8E=E7=9B=AE=E5=BD=95=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..40744c3 --- /dev/null +++ b/README.md @@ -0,0 +1,47 @@ +# halo-ops-audit + +Halo 2.x 操作审计插件仓库:回答"**谁、在什么时候、对什么资源、做了什么操作、结果如何**"。 +主项目位于 [`plugin-operation-audit/`](plugin-operation-audit/README.md),其 README 覆盖功能、安装、设置与已知局限。 + +## 目录结构 + +| 路径 | 说明 | +|---|---| +| `plugin-operation-audit/` | 插件主项目:Java 服务端(捕获过滤器、审计模型、查询端点、保留期清理)+ Console UI(Vue)+ 单元测试 | +| `demo/` | Console UI 静态演示页(纯前端、模拟数据,无构建依赖),开发真实插件前用于验证界面布局与操作流程;含独立 Node 测试 | +| `docs/` | 设计文档:[产品设计](docs/operation-audit-design.md) · [技术方案](docs/operation-audit-tech-design.md) | +| `AGENTS.md` | AI 协作约定(每次改动需 commit、测试全绿后交付) | + +## 快速开始 + +### 构建与测试插件 + +```bash +cd plugin-operation-audit +./gradlew build # 构建插件 jar(含前端),产物在 build/libs/ +./gradlew test # 运行全部单元测试 +./gradlew haloServer # 启动开发用 Halo(devtools,需 Docker) +``` + +要求 JDK 21,目标平台 Halo 2.26.1。前端独立开发:`cd ui && npm install && npm run dev`。 + +### 查看 UI 演示 + +直接双击打开 `demo/index.html`,或: + +```bash +cd demo +python -m http.server 8721 # 访问 http://127.0.0.1:8721/ +``` + +### 运行演示测试 + +```bash +node --test demo/test/audit-core.test.mjs +``` + +## 相关文档 + +- 功能、安装、设置、已知局限:[plugin-operation-audit/README.md](plugin-operation-audit/README.md) +- 产品设计(MVP 范围、设计原则):[docs/operation-audit-design.md](docs/operation-audit-design.md) +- 技术方案(架构、数据模型、风险预案):[docs/operation-audit-tech-design.md](docs/operation-audit-tech-design.md)