@yorha2b-lab/autodev 5.7.2 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/.github/cla.json +7 -0
  2. package/.github/workflows/cla.yml +7 -2
  3. package/CONTRIBUTING.md +2 -2
  4. package/README.md +86 -79
  5. package/README_EN.md +93 -89
  6. package/bin/{autodev.js → bunker.js} +10 -10
  7. package/package.json +26 -23
  8. package/src/{bootstrap → awakening}/index.js +9 -10
  9. package/src/dialogs/DE-DE.js +1 -1
  10. package/src/dialogs/EN-US.js +1 -1
  11. package/src/dialogs/ES-ES.js +1 -1
  12. package/src/dialogs/FR-FR.js +1 -1
  13. package/src/dialogs/ID-ID.js +1 -1
  14. package/src/dialogs/IT-IT.js +1 -1
  15. package/src/dialogs/JA-JP.js +1 -1
  16. package/src/dialogs/KO-KR.js +1 -1
  17. package/src/dialogs/PT-BR.js +1 -1
  18. package/src/dialogs/RU-RU.js +1 -1
  19. package/src/dialogs/TR-TR.js +1 -1
  20. package/src/dialogs/ZH-CN.js +1 -1
  21. package/src/dialogs/ZH-TW.js +1 -1
  22. package/src/framework/react/components/MyBaseForm.js +1 -1
  23. package/src/framework/react/components/MyModalForm.js +14 -2
  24. package/src/framework/react/generator/index.js +4 -4
  25. package/src/{ai/openai.js → gateway/client.js} +2 -2
  26. package/src/{ai → gateway}/index.js +5 -35
  27. package/src/gateway/protocol.js +36 -0
  28. package/src/{kernel/engine.js → headquarters/builder.js} +3 -3
  29. package/src/{kernel/queue.js → headquarters/dispatcher.js} +1 -1
  30. package/src/{kernel/deployment.js → headquarters/engineer.js} +4 -4
  31. package/src/headquarters/observer.js +36 -0
  32. package/src/labs/council.js +4 -4
  33. package/src/labs/index.js +1 -1
  34. package/src/labs/tower.js +4 -9
  35. package/src/{utils → logistics}/foundation.js +3 -3
  36. package/src/{utils → logistics}/ux.js +3 -2
  37. package/src/{handlers → units}/page.js +10 -7
  38. package/src/{handlers → units}/part.js +3 -3
  39. package/src/{handlers → units}/response.js +5 -5
  40. package/src/commands/watch.js +0 -38
  41. /package/src/{utils/installer.js → headquarters/quartermaster.js} +0 -0
  42. /package/src/{kernel → headquarters}/recruiter.js +0 -0
  43. /package/src/{utils → logistics}/generator.js +0 -0
  44. /package/src/{utils → logistics}/semantic.js +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "signedContributors": [
3
+ {
4
+ "name": "yorha2b-lab"
5
+ }
6
+ ]
7
+ }
@@ -16,13 +16,18 @@ jobs:
16
16
  CLA:
17
17
  runs-on: ubuntu-latest
18
18
  steps:
19
+ # ⚠️ 必须有这一步!先把代码 Checkout 下来
20
+ - name: Checkout
21
+ uses: actions/checkout@v4
22
+
23
+ # 2. 运行 CLA 机器人
19
24
  - name: "CLA Assistant Check"
20
25
  if: (github.event.comment.issue.pull_request != null || github.event_name == 'pull_request_target')
21
26
  uses: contributor-assistant/github-action@v2.4.0
22
27
  env:
23
28
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24
29
  with:
25
- path-to-signatures: 'bunker/signatures/cla.json'
30
+ path-to-signatures: '.github/cla.json'
26
31
  path-to-document: 'https://github.com/${{ github.repository }}/blob/main/CLA.md'
27
32
  branch: 'main'
28
- allowlist: 'bot*'
33
+ allowlist: 'bot*,dependabot[bot],renovate[bot],github-actions[bot],yorha2b-lab'
package/CONTRIBUTING.md CHANGED
@@ -60,8 +60,8 @@ Contributors retain copyright in their original contributions; this does not con
60
60
 
61
61
  1. 克隆仓库
62
62
  ```bash
63
- git clone https://github.com/yorha2b-lab/auto-crud-copilot.git
64
- cd auto-crud-copilot
63
+ git clone https://github.com/yorha2b-lab/autodev.git
64
+ cd autodev
65
65
  ```
66
66
 
67
67
  2. 安装依赖
package/README.md CHANGED
@@ -1,48 +1,33 @@
1
- # Auto CRUD Copilot
1
+ # AutoDev (YoRHa Bunker Engine v6.0)
2
2
 
3
3
  [English](./README_EN.md) | 简体中文
4
4
 
5
5
  ![Auto CRUD Copilot Banner](https://github.com/user-attachments/assets/e168ef33-7616-434c-91e6-e2c9eef017c0)
6
6
 
7
-
8
7
  [![NPM Version](https://img.shields.io/npm/v/@yorha2b-lab/autodev.svg?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@yorha2b-lab/autodev)
9
8
  [![NPM Downloads](https://img.shields.io/npm/dm/@yorha2b-lab/autodev.svg?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@yorha2b-lab/autodev)
10
- [![GitHub Stars](https://img.shields.io/github/stars/yorha2b-lab/auto-crud-copilot.svg?style=flat-square&logo=github&logoColor=white)](https://github.com/yorha2b-lab/auto-crud-copilot/stargazers)
11
- [![License](https://img.shields.io/npm/l/@yorha2b-lab/autodev.svg?style=flat-square&logo=gnu&logoColor=white)](https://github.com/yorha2b-lab/auto-crud-copilot/blob/main/LICENSE)
12
- ![Total Clones](https://img.shields.io/badge/dynamic/json?query=total_clones&url=https%3A%2F%2Fraw.githubusercontent.com%2Fyorha2b-lab%2Fauto-crud-copilot%2Fgithub-repo-stats%2Fbunker-stats.json&label=Total%20Clones&color=33cc33&style=flat-square&logo=github&logoColor=white)
9
+ [![GitHub Stars](https://img.shields.io/github/stars/yorha2b-lab/autodev.svg?style=flat-square&logo=github&logoColor=white)](https://github.com/yorha2b-lab/autodev/stargazers)
10
+ [![License](https://img.shields.io/npm/l/@yorha2b-lab/autodev.svg?style=flat-square&logo=gnu&logoColor=white)](https://github.com/yorha2b-lab/autodev/blob/main/LICENSE)
11
+ ![Total Clones](https://img.shields.io/badge/dynamic/json?query=total_clones&url=https%3A%2F%2Fraw.githubusercontent.com%2Fyorha2b-lab%2Fautodev%2Fgithub-repo-stats%2Fbunker-stats.json&label=Total%20Clones&color=33cc33&style=flat-square&logo=github&logoColor=white)
13
12
 
14
- 基于视觉大模型的前端(React+Antd)全自动 CRUD 代码生成器 🚀
13
+ 基于 AI 视觉与语义协议的前端(React + Ant Design)代码构筑与旧系统重构引擎 🚀
15
14
 
16
15
  ![Auto CRUD Copilot 2.0 Demo](https://github.com/user-attachments/assets/287d0db1-d0b0-4290-87da-751ba638655e)
17
16
 
18
- ## 💡 为什么选择 2.0 版本?
19
- 在 2.0 时代,我们放弃了繁琐的分散指令,全面进化为 “全频道集成指挥中心”
20
- - 全频道联动:不再需要开启多个进程。一个 watch 指令,同时监听 页面、组件、API 三大传感器。
21
- - 语义化骇入:不仅仅是复刻 UI,通过 9S 专用语义桥接协议,自动抹平前后端字段差异。
22
- - 工程级质量:生成的代码不是“演示用”,而是带 useTableQuery、EditableCell、OSS上传 等实战逻辑的高质量代码。
23
-
24
- ## 🛡️ 开源协议升级公告
25
-
26
- > **[重要] 自 v2.1.0 起,本项目由 MIT 协议正式升级为 AGPL-3.0 协议。**
27
-
28
- **💡 为什么要调整协议?**
29
- 随着“地堡”系统的影响力扩大,我们希望确保本项目的核心技术能够始终保持开放与透明。采用 **AGPL-3.0** 旨在鼓励开发者在改进本工具的同时,能将这些优化回馈给社区,共同构建一个可持续进化的“前端自动化构筑”生态。
30
-
31
- **✅ 开发者友好声明 (重要):**
32
- 我们深知开发者在实际业务场景中的合规需求。为了让地堡工具在商业环境中更安全、顺畅地运行,特此声明:
33
- 1. **源码约束**:AGPL-3.0 仅约束 **AutoDev 工具自身的源代码**。
34
- 2. **产出物豁免**:使用本工具生成的所有代码、Mock数据及配置文件被视为 **独立** 作品,不具备 AGPL 的传染性特征。
35
- 3. **商业兼容**:您可以在商业项目、企业环境中使用本工具,且 **无需** 因此开源您的业务逻辑代码。
17
+ ## 🌟 v6.0 地堡架构升级
36
18
 
37
- *一句话总结:地堡的进化归属于社区,您构筑的战果归属于您自己。*
19
+ 在 v6.0 时代,AutoDev 全面升级为模块化地堡架构,以 Headquarters 为核心,通过独立单位完成监听、调度、构筑与外部通信。
20
+ - 🕵️ **旧系统侦察 (Scout)**:Puppeteer 无头侦察兵,在旧项目网页上**【单击右键】**即可秒级捕获快照并自动重构!
21
+ - 🗼 **现网防御塔 (Tower)**:搭建 42153 战术代理端口,代理真实 XHR/Fetch 流量,自动将现网数据反向填装入 `resource.js`。
22
+ - 🏛️ **议会自动通电 (Council)**:自动对接 OpenAPI/Swagger 文档,自动提炼枚举信息,并更新 `BUNKER_API_ANCHOR` 语义锚点。
38
23
 
39
24
  ## ✨ 特性
40
25
 
41
- - 🖼️ 视觉构筑 (Page): 截图丢入 screenShot,Pod 042 自动生成带 Table/Form/Tabs 的完整 CRUD 页面。
42
- - 🧩 碎片提取 (Part): 局部截图丢入 screenPart,终端瞬间弹出“即插即用”的 UI 配置片段。
43
- - 🔌 语义对齐 (API): 接口 JSON 丢入 response,自动修正前端字段名,达成前后端 100% 协议一致。
44
- - 🔧 智能装配: 自动补全 import 语句,处理日期格式转换、金额千分位、上传授权等所有脏活累活。
45
- - 📱 **响应式**: 生成的代码支持响应式布局
26
+ - 🖼️ **全页构筑 (Page)**: 截图丢入 `./bunker/screenShot`,Pod 042 自动生成带 Table/Form/Tabs 的完整 CRUD 页面并追加菜单。
27
+ - 🧩 **碎片提取 (Part)**: 局部截图丢入 `./bunker/screenPart`,终端瞬间弹出“即插即用”的 UI 配置代码块。
28
+ - 🕵️ **右键考古 (Scout)**: Puppeteer 无头浏览器巡检,网页任意处点击【鼠标右键】即可秒级一键捕获页面重构。
29
+ - 🔌 **语义对齐 (API)**: 接口 JSON 丢入 `./bunker/response`,自动发现并修正前后端字段语义差异,减少手工对齐工作。
30
+ - 🔧 **智能装配**: 自动补全 import 语句、日期格式转换、金额千分位、枚举字典以及 OSS 上传等实战逻辑。
46
31
 
47
32
  ## 🚀 快速开始
48
33
 
@@ -52,18 +37,19 @@
52
37
  npm install -g @yorha2b-lab/autodev
53
38
  ```
54
39
 
55
- ### 环境配置
40
+ ### 环境配置与初始化
41
+
42
+ 在您的目标项目根目录下执行:
56
43
 
57
44
  ```bash
58
- autodev init
45
+ bunker init
59
46
  ```
60
47
 
61
- > ### 💡 零配置快速体验 (模拟模式)
48
+ > **💡 零配置演示模式 (Demo Mode)**
62
49
  > 项目默认开启 Demo 模式:
63
- > 1. **无需配置 API_KEY**,直接运行 `autodev watch`。
64
- > 2. 向 `screenShot` 目录丢入任意图片(系统将忽略图片内容,自动空投标准 `example.json` 构筑包)。
65
- > 3. **观察效果**:你会看到命令行刷刷闪过,React 代码瞬间物理装配完成。
66
- > *注:若想识别真实截图,请在 `config.js` 中将 `useDemo` 设为 `false` 并配置下方环境变量。*
50
+ > 1. 无需配置 API_KEY,直接运行 `bunker boot`。
51
+ > 2. 向 `./bunker/screenShot` 目录丢入任意图片(系统自动空投标准 `example.json` 构筑包)。
52
+ > 3. 若想识别真实代码/截图,请在 `bunker/config.js` 中将 `useDemo` 设为 `false` 并配置 `.env`。
67
53
 
68
54
  创建 `.env` 文件并配置以下环境变量:
69
55
 
@@ -75,63 +61,85 @@ BASE_URL=your_api_base_url_here
75
61
 
76
62
  🚗 **获取API Key直通车**: [阿里云百炼控制台](https://bailian.console.aliyun.com/cn-beijing?tab=doc#/doc/)
77
63
 
78
- ### 📖 指挥中心操作指南 (v2.0 工作流)
79
- 进入 2.0 时代,你只需要记住一个指令:
64
+ ## 📖 指挥中心操作指南 (v6.0 工作流)
65
+
66
+ 启动主监控网络:
80
67
 
81
68
  ```bash
82
- autodev watch
69
+ bunker boot
83
70
  ```
84
- 启动后,地堡系统将进入 全频道联动监听状态:
85
71
 
86
- | 动作 | 目标目录 | 构筑效果 |
72
+ 启动后,地堡系统将进入全频道联动监听状态:
73
+
74
+ | 战术操作 | 传感器/动作 | 构筑效果 |
87
75
  | :--- | :--- | :--- |
88
- | **全页截图** | `./screenShot` | 自动生成 `index.js`、`resource.js` 并同步路由配置 |
89
- | **局部截图** | `./screenPart` | 终端实时打印代码片段 (随拷随用) |
90
- | **接口 JSON** | `./response` | 自动执行语义对齐,修正 `resource.js` 中的字段名 |
76
+ | **全页构筑** | `./bunker/screenShot` | 自动生成 `index.js`、`resource.js` 并追加同步 `menus.js` |
77
+ | **碎片提取** | `./bunker/screenPart` | 终端实时弹出紫色代码框,即拷即用 |
78
+ | **右键考古** | 浏览器【鼠标右键】 | 触发 `scout.js` 侦察兵,一键捕获当前页面降维重构 |
79
+ | **接口 JSON** | `./bunker/response` | 自动执行语义对齐,修正 `resource.js` 中的字段名 |
91
80
 
92
- ## 📁 2.0 地堡结构说明
81
+ ## 📁 地堡结构说明
93
82
 
94
- ```
83
+ ```text
95
84
  your-project/
96
- ├── screenShot/ # 页面截图目录
97
- ├── screenPart/ # 组件截图目录
98
- ├── response/ # Response目录
99
- ├── mock/ # 生成的Mock数据
100
- ├── src/
101
- │ ├── pages/ # 生成的页面代码
102
- │ ├── components/ # 生成的组件代码
103
- │ ├── hooks/ # 生成的Hook代码
104
- └── config.js # 配置文件
85
+ ├── bunker/ # 地堡传感器与配置
86
+ │ ├── config.js # 地堡配置文件
87
+ │ ├── screenShot/ # 全页截图接收站
88
+ │ ├── screenPart/ # 碎片截图接收站
89
+ │ └── response/ # 响应对齐接收站
90
+ ├── mock/ # 自动伪造的 Mock 数据
91
+ └── src/
92
+ ├── pages/ # 自动构建的前端页面代码
93
+ └── utils/
94
+ └── menus.js # 自动同步的动态菜单配置
105
95
  ```
106
96
 
107
97
  ## ⚙️ 配置
108
98
 
109
- 在 `config.js` 中可以配置以下选项:
99
+ 在 `bunker/config.js` 中可以配置以下选项:
110
100
 
111
101
  ```javascript
112
102
  module.exports = {
113
- // 是否使用演示模式
103
+ // 是否开启 Demo 演示模式
114
104
  useDemo: true,
115
- // 是否需要生成 Mock 数据
105
+ // 是否自动伪造生成 Mock 数据
116
106
  needMock: false,
117
- // 使用的 AI 模型类型
118
- visionModel: 'qwen3.5-plus',
107
+
108
+ // 地堡黑科技开关:
109
+ // 是否开启 42153 战术代理塔 (现网流量劫持与对齐)
110
+ enableAutoAlignment: false,
111
+ // 是否开启 GitHub 克隆数彩蛋
112
+ fetchClone: true,
113
+
114
+ // AI 模型配置
119
115
  textModel: 'qwen-turbo',
120
- // 自定义模板目录
121
- // 如果为空,将使用内置模板
122
- // 自定义模板需要在hbsdir目录创建自己的index.hbs和resource.hbs文件
123
- hbsDir: '',
124
- // 目标项目的目录路径
125
- hooksDir: 'src/hooks',
116
+ visionModel: 'qwen3.7-plus',
117
+
118
+ // 🕸️ 遗迹与对齐配置 (考古与代理)
119
+ // 1. 旧项目运行 URL (配置后自动启动 Scout 右键考古侦察兵)
120
+ remains: 'http://localhost:8000',
121
+ // 2. 公司 Swagger / OpenAPI JSON 文档地址
122
+ apiDoc: 'http://api.company.com/v2/api-docs',
123
+ // 3. 真实后端代理目标地址 (Tower 转发目标)
124
+ proxyTarget: 'http://backend.company.com',
125
+ // 4. 后端接口成功断言表达式
126
+ responseSuccess: `response?.code === 200`,
127
+
128
+ // 前端源码构建目录路径
126
129
  pagesDir: 'src/pages',
127
- utilsDir: 'src/utils',
128
130
  componentsDir: 'src/components',
131
+ hooksDir: 'src/hooks',
132
+ utilsDir: 'src/utils',
133
+
134
+ // 自定义 Handlebars 模板目录 (留空使用内置模版)
135
+ hbsDir: '',
129
136
  }
130
137
  ```
131
138
 
132
- ## 🤝 贡献
139
+ ## 🤝 贡献与 CLA
133
140
 
134
- 欢迎贡献代码!请阅读 [CONTRIBUTING.md](CONTRIBUTING.md) 了解如何参与项目开发。
141
+ 欢迎贡献代码!请阅读 [CONTRIBUTING.md](CONTRIBUTING.md) 了解参与流程。
142
+ 所有 Pull Request 在合并前需要自动化签署 [CLA 贡献者协议](CLA.md)。
135
143
 
136
144
  ## 📄 许可证
137
145
 
@@ -142,29 +150,28 @@ module.exports = {
142
150
  感谢以下开源项目为地堡提供核心动力:
143
151
  - [OpenAI](https://openai.com/) / [Alibaba Qwen](https://tongyi.aliyun.com/) - 强大的 AI 视觉与语言能力
144
152
  - [Ant Design](https://ant.design/) - 优秀的企业级 UI 组件库
145
- - [Handlebars](https://handlebarsjs.com/) / [Chokidar](https://github.com/paulmillr/chokidar) - 稳定的构筑引擎与监听机制
153
+ - [Handlebars](https://handlebarsjs.com/) / [Chokidar](https://github.com/paulmillr/chokidar) / [Puppeteer](https://pptr.dev/) - 稳定的构筑与侦察引擎
146
154
 
147
155
  ## 📞 联系方式
148
156
 
149
- 如有问题或建议,欢迎提交 [Issue](https://github.com/yorha2b-lab/auto-crud-copilot/issues)。
157
+ 如有问题或建议,欢迎提交 [Issue](https://github.com/yorha2b-lab/autodev/issues)。
150
158
 
151
159
  ## 🛠️ 常见问题 (FAQ)
160
+
152
161
  Q: 这个工具收费吗?
153
- A: 工具本身开源免费,但调用的 AI 模型(如 GPT-4v, Qwen-VL)可能需要你配置自己的 API Key。建议使用阿里云 Qwen-VL 等高性价比模型。
162
+ A: 工具本身开源免费,但调用的 AI 模型(如 Qwen-VL, GPT-4v)需要配置 API Key。建议使用阿里云通义千问等高性价比模型。
154
163
 
155
164
  Q: 如何自定义生成的代码风格?
156
- A: 你可以配置 hbsDir 指向你自己的 Handlebars 模板目录,打造专属的地堡构筑规范。
165
+ A: 您可以配置 `hbsDir` 指向您自己的 Handlebars 模板目录,打造专属的团队代码构建规范。
157
166
 
158
167
  ---
159
168
 
160
169
  ## ⚖️ Disclaimer
161
170
 
162
- Auto CRUD Copilot is a **fan-made, non-commercial, open-source tool**.
171
+ AutoDev is a **fan-made, non-commercial, open-source tool**.
163
172
 
164
- - The themes, names (YoRHa, 2B, etc.), and catchphrases included in this project are inspired by **NieR:Automata**, which is a trademark and copyright of **Square Enix Co., Ltd. / PlatinumGames Inc.**
173
+ - The themes, names (YoRHa, 2B, 9S, Pod042, etc.), and catchphrases included in this project are inspired by **NieR:Automata**, which is a trademark and copyright of **Square Enix Co., Ltd. / PlatinumGames Inc.**
165
174
  - This project is not affiliated with, endorsed by, or representative of Square Enix in any way.
166
175
  - Please support the original masterpiece: [NieR:Automata Official Site](https://nierautomata.square-enix-games.com/).
167
176
 
168
- **Glory to Mankind.**
169
-
170
- ⭐ 如果这个项目对你有帮助,请给个Star支持一下!
177
+ **Glory to Mankind.** 🤖⚔️
package/README_EN.md CHANGED
@@ -1,48 +1,33 @@
1
- # Auto CRUD Copilot
1
+ # AutoDev (YoRHa Bunker Engine v6.0)
2
2
 
3
- [简体中文](./README.md) | English
3
+ English | [简体中文](./README.md)
4
4
 
5
5
  ![Auto CRUD Copilot Banner](https://github.com/user-attachments/assets/e168ef33-7616-434c-91e6-e2c9eef017c0)
6
6
 
7
-
8
7
  [![NPM Version](https://img.shields.io/npm/v/@yorha2b-lab/autodev.svg?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@yorha2b-lab/autodev)
9
8
  [![NPM Downloads](https://img.shields.io/npm/dm/@yorha2b-lab/autodev.svg?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@yorha2b-lab/autodev)
10
- [![GitHub Stars](https://img.shields.io/github/stars/yorha2b-lab/auto-crud-copilot.svg?style=flat-square&logo=github&logoColor=white)](https://github.com/yorha2b-lab/auto-crud-copilot/stargazers)
11
- [![License](https://img.shields.io/npm/l/@yorha2b-lab/autodev.svg?style=flat-square&logo=gnu&logoColor=white)](https://github.com/yorha2b-lab/auto-crud-copilot/blob/main/LICENSE)
12
- ![Total Clones](https://img.shields.io/badge/dynamic/json?query=total_clones&url=https%3A%2F%2Fraw.githubusercontent.com%2Fyorha2b-lab%2Fauto-crud-copilot%2Fgithub-repo-stats%2Fbunker-stats.json&label=Total%20Clones&color=33cc33&style=flat-square&logo=github&logoColor=white)
9
+ [![GitHub Stars](https://img.shields.io/github/stars/yorha2b-lab/autodev.svg?style=flat-square&logo=github&logoColor=white)](https://github.com/yorha2b-lab/autodev/stargazers)
10
+ [![License](https://img.shields.io/npm/l/@yorha2b-lab/autodev.svg?style=flat-square&logo=gnu&logoColor=white)](https://github.com/yorha2b-lab/autodev/blob/main/LICENSE)
11
+ ![Total Clones](https://img.shields.io/badge/dynamic/json?query=total_clones&url=https%3A%2F%2Fraw.githubusercontent.com%2Fyorha2b-lab%2Fautodev%2Fgithub-repo-stats%2Fbunker-stats.json&label=Total%20Clones&color=33cc33&style=flat-square&logo=github&logoColor=white)
13
12
 
14
- Vision-based LLM-powered frontend (React+Antd) fully automatic CRUD code generator 🚀
13
+ AI Vision and Semantic Protocol-based Frontend (React + Ant Design) Code Construction and Legacy System Refactoring Engine 🚀
15
14
 
16
15
  ![Auto CRUD Copilot 2.0 Demo](https://github.com/user-attachments/assets/287d0db1-d0b0-4290-87da-751ba638655e)
17
16
 
18
- ## 💡 Why Choose Version 2.0?
19
- In the 2.0 era, we abandoned cumbersome scattered instructions and fully evolved into a "Full-Channel Integrated Command Center"
20
- - Full-Channel Linkage: No need to open multiple processes. One watch command listens to Page, Component, and API sensors simultaneously.
21
- - Semantic Hacking: Not just replicating UI, but automatically smoothing out frontend-backend field differences through the 9S dedicated semantic bridge protocol.
22
- - Engineering-Grade Quality: Generated code is not "demo-grade" but high-quality code with useTableQuery, EditableCell, OSS upload, and other practical logic.
23
-
24
- ## 🛡️ Open Source License Upgrade
25
-
26
- **[IMPORTANT] Since v2.1.0, this project has been officially upgraded from MIT to the AGPL-3.0 License.**
27
-
28
- **💡 Why the change?**
29
- As the "Bunker" system continues to evolve, we aim to ensure the core technology remains open and transparent for everyone. Adopting **AGPL-3.0** encourages the community to contribute improvements back, fostering a sustainable ecosystem for frontend automation.
30
-
31
- **✅ Developer-Friendly Clause (Crucial):**
32
- We value the contribution of developers in corporate environments. To ensure a smooth and safe operational experience:
33
- 1. **Scope**: The AGPL-3.0 license applies strictly to the **AutoDev source code itself**.
34
- 2. **Output Exemption**: All generated code, mock data, and configurations produced by this tool are legally considered **separate** works and are NOT affected by the copyleft (infectious) nature of the AGPL.
35
- 3. **Commercial Usage**: You are permitted to use this CLI in commercial/corporate environments. Your business logic remains **Private** and is NOT affected by the AGPL's nature.
17
+ ## 🌟 v6.0 Bunker Architecture Upgrade
36
18
 
37
- *Summary: The Bunker's evolution belongs to the community; the armor you forge belongs to you.*
19
+ In the v6.0 era, AutoDev has fully upgraded to a modular Bunker architecture. Centered around Headquarters, it accomplishes monitoring, dispatching, construction, and external communication through independent units.
20
+ - 🕵️ **Legacy System Recon (Scout)**: Puppeteer headless scout unit. Simply **[Right-Click]** anywhere on legacy web pages to capture instant snapshots and auto-refactor!
21
+ - 🗼 **Live Proxy Tower (Tower)**: Tactical proxy server on port 42153. Proxies live XHR/Fetch traffic and automatically hot-loads real production data into `resource.js`.
22
+ - 🏛️ **OpenAPI Council (Council)**: Auto-connects Swagger/OpenAPI docs, automatically extracts enum information, and updates `BUNKER_API_ANCHOR` semantic anchors.
38
23
 
39
24
  ## ✨ Features
40
25
 
41
- - 🖼️ **Visual Construction (Page)**: Drop screenshots into screenShot, Pod 042 automatically generates complete CRUD pages with Table/Form/Tabs.
42
- - 🧩 **Fragment Extraction (Part)**: Drop partial screenshots into screenPart, terminal instantly pops up "plug-and-play" UI configuration snippets.
43
- - 🔌 **Semantic Alignment (API)**: Drop interface JSON into response, automatically corrects frontend field names to achieve 100% protocol consistency between frontend and backend.
44
- - 🔧 **Smart Assembly**: Automatically completes import statements, handles date format conversion, currency thousand separators, upload authorization, and all other dirty work.
45
- - 📱 **Responsive**: Generated code supports responsive layout
26
+ - 🖼️ **Full-Page Construction (Page)**: Drop a screenshot into `./bunker/screenShot`, and Pod 042 auto-generates complete CRUD pages with Table/Form/Tabs and appends menus.
27
+ - 🧩 **Fragment Extraction (Part)**: Drop a partial screenshot into `./bunker/screenPart`, and the terminal instantly outputs plug-and-play UI config code blocks.
28
+ - 🕵️ **Right-Click Archeology (Scout)**: Puppeteer headless browser inspection. Right-click anywhere in the browser to capture and refactor pages in seconds.
29
+ - 🔌 **Semantic Alignment (API)**: Drop an API JSON into `./bunker/response` to automatically discover and fix frontend/backend field semantic differences, reducing manual alignment work.
30
+ - 🔧 **Smart Assembly**: Auto-completes import statements, date format conversions, currency separators, enum dictionaries, and OSS upload logic.
46
31
 
47
32
  ## 🚀 Quick Start
48
33
 
@@ -52,20 +37,21 @@ We value the contribution of developers in corporate environments. To ensure a s
52
37
  npm install -g @yorha2b-lab/autodev
53
38
  ```
54
39
 
55
- ### Environment Configuration
40
+ ### Environment Configuration & Initialization
41
+
42
+ Run the following in your target project root directory:
56
43
 
57
44
  ```bash
58
- autodev init
45
+ bunker init
59
46
  ```
60
47
 
61
- > ### 💡 Zero-Configuration Quick Experience (Demo Mode)
62
- > The project enables Demo mode by default:
63
- > 1. **No API_KEY configuration required**, just run `autodev watch`.
64
- > 2. Drop any image into the `screenShot` directory (the system will ignore image content and automatically airdrop the standard `example.json` construction package).
65
- > 3. **Observe the effect**: You'll see the command line flash by, and React code is instantly physically assembled.
66
- > *Note: To recognize real screenshots, please set `useDemo` to `false` in `config.js` and configure the environment variables below.*
48
+ > **💡 Zero-Config Demo Mode**
49
+ > Demo mode is enabled by default:
50
+ > 1. No `API_KEY` required, run `bunker boot` directly.
51
+ > 2. Drop any image into `./bunker/screenShot` (system ignores image content and drops standard `example.json` construction package).
52
+ > 3. To recognize real screenshots, set `useDemo: false` in `bunker/config.js` and configure `.env`.
67
53
 
68
- Create a `.env` file and configure the following environment variables:
54
+ Create a `.env` file and configure environment variables:
69
55
 
70
56
  ```bash
71
57
  # AI Model API Configuration
@@ -73,101 +59,119 @@ API_KEY=your_api_key_here
73
59
  BASE_URL=your_api_base_url_here
74
60
  ```
75
61
 
76
- 🚗 **Direct Link to Get API Key**: [Alibaba Cloud Bailian Console](https://bailian.console.aliyun.com/cn-beijing?tab=doc#/doc/)
62
+ 🚗 **Get API Key**: [Alibaba Cloud Bailian Console](https://bailian.console.aliyun.com/)
63
+
64
+ ## 📖 Command Center Operations Guide (v6.0 Workflow)
77
65
 
78
- ### 📖 Command Center Operation Guide (v2.0 Workflow)
79
- Entering the 2.0 era, you only need to remember one command:
66
+ Start the main monitoring network:
80
67
 
81
68
  ```bash
82
- autodev watch
69
+ bunker boot
83
70
  ```
84
71
 
85
- After startup, the bunker system will enter Full-Channel Linkage Listening State:
72
+ Upon launch, the Bunker system enters all-channel monitoring mode:
86
73
 
87
- | Action | Target Directory | Construction Effect |
74
+ | Tactical Action | Sensor / Target | Construction Output |
88
75
  | :--- | :--- | :--- |
89
- | **Full Page Screenshot** | `./screenShot` | Automatically generates `index.js`, `resource.js` and synchronizes route configuration |
90
- | **Partial Screenshot** | `./screenPart` | Terminal prints code snippets in real-time (copy and use instantly) |
91
- | **API JSON** | `./response` | Automatically executes semantic alignment, correcting field names in `resource.js` |
76
+ | **Full Page** | `./bunker/screenShot` | Auto-generates `index.js`, `resource.js`, and syncs `menus.js` |
77
+ | **Fragment** | `./bunker/screenPart` | Terminal outputs copy-pasteable UI code snippets in real-time |
78
+ | **Archeology** | Browser [Right-Click] | Triggers `scout.js` unit to capture and refactor current page |
79
+ | **API Alignment** | `./bunker/response` | Auto-aligns semantics and fixes field names in `resource.js` |
92
80
 
93
- ## 📁 2.0 Bunker Structure Description
81
+ ## 📁 Bunker Architecture Overview
94
82
 
95
- ```
83
+ ```text
96
84
  your-project/
97
- ├── screenShot/ # Page screenshot directory
98
- ├── screenPart/ # Component screenshot directory
99
- ├── response/ # Response directory
100
- ├── mock/ # Generated Mock data
101
- ├── src/
102
- │ ├── pages/ # Generated page code
103
- │ ├── components/ # Generated component code
104
- │ ├── hooks/ # Generated Hook code
105
- └── config.js # Configuration file
85
+ ├── bunker/ # Bunker sensors and configuration
86
+ │ ├── config.js # Bunker configuration file
87
+ │ ├── screenShot/ # Full-page screenshot receiver
88
+ │ ├── screenPart/ # UI fragment receiver
89
+ │ └── response/ # Response alignment receiver
90
+ ├── mock/ # Auto-generated Mock data
91
+ └── src/
92
+ ├── pages/ # Auto-built frontend page code
93
+ └── utils/
94
+ └── menus.js # Auto-synced dynamic menu configuration
106
95
  ```
107
96
 
108
97
  ## ⚙️ Configuration
109
98
 
110
- The following options can be configured in `config.js`:
99
+ Set the following options in `bunker/config.js`:
111
100
 
112
101
  ```javascript
113
102
  module.exports = {
114
- // Whether to use demo mode
103
+ // Enable demo mode
115
104
  useDemo: true,
116
- // Whether to generate Mock data
105
+ // Enable Mock data generation
117
106
  needMock: false,
118
- // AI model type used
119
- visionModel: 'qwen3.5-plus',
107
+
108
+ // Bunker Black-Tech Toggles:
109
+ // Enable 42153 Tactical Proxy Tower (Live traffic interception & alignment)
110
+ enableAutoAlignment: false,
111
+ // Enable GitHub clone counter easter egg
112
+ fetchClone: true,
113
+
114
+ // AI Model Configuration
120
115
  textModel: 'qwen-turbo',
121
- // Custom template directory
122
- // If empty, built-in templates will be used
123
- // Custom templates need to create your own index.hbs and resource.hbs files in the hbsdir directory
124
- hbsDir: '',
125
- // Target project directory paths
126
- hooksDir: 'src/hooks',
116
+ visionModel: 'qwen3.7-plus',
117
+
118
+ // 🕸️ Archeology & Alignment Configuration
119
+ // 1. Legacy project URL (auto-launches Scout right-click archeology unit)
120
+ remains: 'http://localhost:8000',
121
+ // 2. Company Swagger / OpenAPI JSON URL
122
+ apiDoc: 'http://api.company.com/v2/api-docs',
123
+ // 3. Backend proxy target URL (Tower forwarding target)
124
+ proxyTarget: 'http://backend.company.com',
125
+ // 4. Backend API success assertion expression
126
+ responseSuccess: `response?.code === 200`,
127
+
128
+ // Frontend source code build paths
127
129
  pagesDir: 'src/pages',
128
- utilsDir: 'src/utils',
129
130
  componentsDir: 'src/components',
131
+ hooksDir: 'src/hooks',
132
+ utilsDir: 'src/utils',
133
+
134
+ // Custom Handlebars template directory (leave empty to use built-in templates)
135
+ hbsDir: '',
130
136
  }
131
137
  ```
132
138
 
133
- ## 🤝 Contributing
139
+ ## 🤝 Contributing & CLA
134
140
 
135
- Contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) to learn how to participate in project development.
141
+ Contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.
142
+ All Pull Requests require automated signing of the [CLA Agreement](CLA.md) prior to merging.
136
143
 
137
144
  ## 📄 License
138
145
 
139
- This project is licensed under the [GNU AGPL v3.0](LICENSE) License.
146
+ This project is licensed under [GNU AGPL v3.0](LICENSE).
140
147
 
141
148
  ## 🙏 Acknowledgments
142
149
 
143
- Thanks to the following open source projects for providing the core power of the bunker system:
144
-
145
- - [OpenAI](https://openai.com/) / [Alibaba Qwen](https://tongyi.aliyun.com/) - Powerful AI capabilities
146
- - [Ant Design](https://ant.design/) - Excellent enterprise-level UI design language
147
- - [Handlebars](https://handlebarsjs.com/) / [Chokidar](https://github.com/paulmillr/chokidar) - Stable construction engine and listener mechanism
150
+ Special thanks to the following open-source projects for powering the Bunker engine:
151
+ - [OpenAI](https://openai.com/) / [Alibaba Qwen](https://tongyi.aliyun.com/) - Advanced AI Vision & Language capabilities
152
+ - [Ant Design](https://ant.design/) - Enterprise-grade UI component library
153
+ - [Handlebars](https://handlebarsjs.com/) / [Chokidar](https://github.com/paulmillr/chokidar) / [Puppeteer](https://pptr.dev/) - Reliable construction and scouting engines
148
154
 
149
155
  ## 📞 Contact
150
156
 
151
- If you have any questions or suggestions, please submit an [Issue](https://github.com/yorha2b-lab/auto-crud-copilot/issues).
157
+ If you have questions or suggestions, please submit an [Issue](https://github.com/yorha2b-lab/autodev/issues).
152
158
 
153
159
  ## 🛠️ FAQ
154
160
 
155
161
  Q: Is this tool free?
156
- A: The tool itself is open source and free, but the AI models called (such as GPT-4v, Qwen-VL) may require you to configure your own API Key. It is recommended to use cost-effective models like Alibaba Cloud Qwen-VL.
162
+ A: The tool itself is open-source and free, but calling AI models (e.g., Qwen-VL, GPT-4v) requires your own API Key. Alibaba Cloud Qwen-VL is recommended for high cost-performance.
157
163
 
158
- Q: How to customize the generated code style?
159
- A: You can configure hbsDir to point to your own Handlebars template directory to create your own exclusive bunker construction specifications.
164
+ Q: How do I customize generated code styles?
165
+ A: Set `hbsDir` to point to your custom Handlebars templates directory to build team-specific code construction standards.
160
166
 
161
167
  ---
162
168
 
163
169
  ## ⚖️ Disclaimer
164
170
 
165
- Auto CRUD Copilot is a **fan-made, non-commercial, open-source tool**.
171
+ AutoDev is a **fan-made, non-commercial, open-source tool**.
166
172
 
167
- - The themes, names (YoRHa, 2B, etc.), and catchphrases included in this project are inspired by **NieR:Automata**, which is a trademark and copyright of **Square Enix Co., Ltd. / PlatinumGames Inc.**
173
+ - The themes, names (YoRHa, 2B, 9S, Pod042, etc.), and catchphrases included in this project are inspired by **NieR:Automata**, which is a trademark and copyright of **Square Enix Co., Ltd. / PlatinumGames Inc.**
168
174
  - This project is not affiliated with, endorsed by, or representative of Square Enix in any way.
169
175
  - Please support the original masterpiece: [NieR:Automata Official Site](https://nierautomata.square-enix-games.com/).
170
176
 
171
- **Glory to Mankind.**
172
-
173
- ⭐ If this project helps you, please give it a Star!
177
+ **Glory to Mankind.** 🤖⚔️
@@ -5,8 +5,8 @@ const pkg = require('../package.json')
5
5
  const { program } = require('commander')
6
6
  const local = Intl.DateTimeFormat().resolvedOptions().locale.toUpperCase()
7
7
 
8
- const { matchDialog, matrixEffect } = require('../src/utils/ux')
9
- const recruiter = require('../src/kernel/recruiter')
8
+ const { matchDialog, matrixEffect } = require('../src/logistics/ux')
9
+ const recruiter = require('../src/headquarters/recruiter')
10
10
  const dialogs = recruiter(path.join(__dirname, '../src/dialogs'))
11
11
  const dialog = matchDialog(local, dialogs) ?? dialogs['EN-US']
12
12
 
@@ -20,29 +20,29 @@ program
20
20
  .command('init')
21
21
  .description(dialog.bunker.initDesc)
22
22
  .action(() => {
23
- const battlefield = {
23
+ const outpost = {
24
24
  files: [
25
25
  { from: '.env.example', to: '.env', exist: 'envCheck', success: 'envCopy' },
26
26
  { from: 'config.js', to: 'config.js', exist: 'configCheck', success: 'configCopy' }
27
27
  ]
28
28
  }
29
- const installer = require('../src/utils/installer')({ root: process.cwd(), dialog })
30
- Object.entries(battlefield).forEach(([type, items]) => items.forEach(installer[type]))
31
- const bunkerCmd = chalk.yellow(`'bunker': 'autodev watch'`)
29
+ const quartermaster = require('../src/headquarters/quartermaster')({ root: process.cwd(), dialog })
30
+ Object.entries(outpost).forEach(([type, items]) => items.forEach(quartermaster[type]))
31
+ const bunkerCmd = chalk.yellow(`'bunker': 'bunker boot'`)
32
32
  console.log(chalk.cyan(dialog.bunker.initComplete(bunkerCmd)))
33
33
  })
34
34
 
35
35
  program
36
- .command('watch')
36
+ .command('boot')
37
37
  .alias('start')
38
- .description(dialog.bunker.watchDesc)
38
+ .description(dialog.bunker.bootDesc)
39
39
  .action(async () => {
40
- const bunker = require('../src/bootstrap')
40
+ const bunker = require('../src/awakening')
41
41
  const result = await bunker.init(program.opts(), dialog, pkg.version, local)
42
42
  if (!result) {
43
43
  return
44
44
  }
45
- require('../src/commands/watch')()
45
+ require('../src/headquarters/observer')(bunker)
46
46
  process.on('SIGINT', () => {
47
47
  result.yorha.commander.report(dialog.bunker.systemOffline, 'gray')
48
48
  result.labs?.scout?.close()