@yorha2b-lab/autodev 7.4.0 → 7.4.2

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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # AutoDev (YoRHa Bunker Engine v6.0)
1
+ # AutoDev (YoRHa Bunker Engine)
2
2
 
3
3
  [English](./README_EN.md) | 简体中文
4
4
 
@@ -69,7 +69,7 @@ BASE_URL=your_api_base_url_here
69
69
 
70
70
  🚗 **获取API Key直通车**: [阿里云百炼控制台](https://bailian.console.aliyun.com/cn-beijing?tab=doc#/doc/)
71
71
 
72
- ## 📖 指挥中心操作指南 (v6.0 工作流)
72
+ ## 📖 指挥中心操作指南
73
73
 
74
74
  启动主监控网络:
75
75
 
@@ -79,28 +79,27 @@ bunker boot
79
79
 
80
80
  启动后,地堡系统将进入全频道联动监听状态:
81
81
 
82
- | 战术操作 | 传感器/动作 | 构筑效果 |
82
+ | 战术操作 | 传感器 / 触发动作 | 作战构筑效果 |
83
83
  | :--- | :--- | :--- |
84
- | **全页构筑** | `./bunker/screenShot` | 自动生成 `index.js`、`resource.js` 并追加同步 `menus.js` |
85
- | **碎片提取** | `./bunker/screenPart` | 终端实时弹出紫色代码框,即拷即用 |
86
- | **右键考古** | 浏览器【鼠标右键】 | 触发 `scout.js` 侦察兵,一键捕获当前页面降维重构 |
87
- | **接口 JSON** | `./bunker/response` | 自动执行语义对齐,修正 `resource.js` 中的字段名 |
84
+ | **任务空投**<br>*(智能分流)* | 拖入设计图/截图至<br>`./bunker/mission/` | **司令部(commander)视觉雷达自动研判分流**:<br>• **完整 CRUD 页面** $\rightarrow$ 派出 `striker`(重装打击):生成全套目录、`index.js`、`resource.js`、Mock 数据并同步 `menus.js`<br>• **局部 UI 碎片/下拉字典** $\rightarrow$ 派出 `raider`(轻装突袭):终端弹出紫色代码框,即拷即用 |
85
+ | **遗迹考古**<br>*(一键克隆)* | 目标老系统浏览器中<br>【鼠标右键】点击任意位置 | 调起 `scout.js` 侦察兵,全屏秒级截屏并自动推导路由命名,空投至 `./bunker/mission/` 触发自动构筑 |
86
+ | **全频道通电**<br>*(Swagger 对齐)* | 配置 `apiDoc` 启动地堡 | `council.js` 启动语义雷达与本地 NLP 分词,自动匹配真实接口、请求方式(GET/POST/DELETE)与路径变量,并同步后端 Enum 基因字典 |
87
+ | **神之塔嗅探**<br>*(抓包自愈)* | 将业务代理目标指向<br>`http://localhost:42153` | `tower.js` 实时拦截真实网络响应,`reconciler.js` 自动比对并物理覆写修正 `resource.js` 中的字段名 |
88
88
 
89
89
  ## 📁 地堡结构说明
90
90
 
91
91
  ```text
92
92
  your-project/
93
- ├── bunker/ # 地堡传感器与配置
94
- │ ├── config.js # 地堡配置文件
95
- │ ├── screenShot/ # 全页截图接收站
96
- │ ├── screenPart/ # 碎片截图接收站
97
- │ └── response/ # 响应对齐接收站
98
- ├── mock/ # 自动伪造的 Mock 数据
93
+ ├── bunker/ # 地堡前哨基地与战术传感器
94
+ │ ├── .env # 神经云连接密钥 (API Key)
95
+ │ ├── config.js # 地堡战略配置文件 (支持热重载)
96
+ │ ├── mission/ # 统一作战任务空投舱 (设计图/截图投放点,司令部自动分流)
97
+ │ └── .chrome_session/ # 侦察兵 (scout) 浏览器会话与缓存持久化目录
98
+ ├── mock/ # 9S 自动执行数据伪装的 Mock 数据包
99
99
  └── src/
100
- ├── pages/ # 自动构建的前端页面代码
100
+ ├── pages/ # 寄叶部队自动构筑的前端业务页面 (视图与 Schema 解耦)
101
101
  └── utils/
102
- └── menus.js # 自动同步的动态菜单配置
103
- ```
102
+ └── menus.js # 自动同步的战区菜单路由配置
104
103
 
105
104
  ## ⚙️ 配置
106
105
 
package/README_EN.md CHANGED
@@ -1,4 +1,4 @@
1
- # AutoDev (YoRHa Bunker Engine v6.0)
1
+ # AutoDev (YoRHa Bunker Engine)
2
2
 
3
3
  English | [简体中文](./README.md)
4
4
 
@@ -69,7 +69,7 @@ BASE_URL=your_api_base_url_here
69
69
 
70
70
  🚗 **Get API Key**: [Alibaba Cloud Bailian Console](https://bailian.console.aliyun.com/)
71
71
 
72
- ## 📖 Command Center Operations Guide (v6.0 Workflow)
72
+ ## 📖 Command Center Operations Guide
73
73
 
74
74
  Start the main monitoring network:
75
75
 
@@ -77,30 +77,29 @@ Start the main monitoring network:
77
77
  bunker boot
78
78
  ```
79
79
 
80
- Upon launch, the Bunker system enters all-channel monitoring mode:
80
+ Upon booting, the Bunker enters **Full-Channel Active Reconnaissance State**:
81
81
 
82
- | Tactical Action | Sensor / Target | Construction Output |
82
+ | Tactical Operation | Sensor / Trigger | Construction Objective & Output |
83
83
  | :--- | :--- | :--- |
84
- | **Full Page** | `./bunker/screenShot` | Auto-generates `index.js`, `resource.js`, and syncs `menus.js` |
85
- | **Fragment** | `./bunker/screenPart` | Terminal outputs copy-pasteable UI code snippets in real-time |
86
- | **Archeology** | Browser [Right-Click] | Triggers `scout.js` unit to capture and refactor current page |
87
- | **API Alignment** | `./bunker/response` | Auto-aligns semantics and fixes field names in `resource.js` |
84
+ | **Mission Drop**<br>*(Autonomous Routing)* | Drop mockups/screenshots into<br>`./bunker/mission/` | **Headquarters (`commander`) visual radar automatically analyzes and routes:**<br>• **Full CRUD Page** $\rightarrow$ Dispatches `striker` (Heavy Assault): Generates complete directory, `index.js`, `resource.js`, 9S Data Camouflage (Mock), and synchronizes `menus.js`.<br>• **UI Fragment / Dropdown Enum** $\rightarrow$ Dispatches `raider` (Tactical Extraction): Outputs styled terminal code block, ready for instant physical assembly. |
85
+ | **Remains Archaeology**<br>*(One-Click Clone)* | **[Right-Click]** anywhere on the target legacy web application | Awakens `scout.js` reconnaissance unit to capture a full-page snapshot, derive semantic route naming, and auto-airdrop the asset into `./bunker/mission/` to trigger immediate construction. |
86
+ | **Full-Channel Link**<br>*(Swagger / OpenAPI)* | Configure `apiDoc` and boot Bunker | `council.js` engages local NLP semantic radar to automatically match real endpoints, HTTP methods (GET/POST/DELETE), and RESTful path variables via ES6 template literals, while synchronizing backend Enum genomes. |
87
+ | **The Tower Sniffing**<br>*(Runtime Self-Healing)* | Direct local proxy target to<br>`http://localhost:42153` | `tower.js` intercepts live runtime JSON responses, prompting `reconciler.js` to physically mutate and self-heal field discrepancies in `resource.js` in-place. |
88
88
 
89
- ## 📁 Bunker Architecture Overview
89
+ ## 📁 Bunker Outpost Topology
90
90
 
91
91
  ```text
92
92
  your-project/
93
- ├── bunker/ # Bunker sensors and configuration
94
- │ ├── config.js # Bunker configuration file
95
- │ ├── screenShot/ # Full-page screenshot receiver
96
- │ ├── screenPart/ # UI fragment receiver
97
- │ └── response/ # Response alignment receiver
98
- ├── mock/ # Auto-generated Mock data
93
+ ├── bunker/ # Bunker Tactical Outpost & Sensors
94
+ │ ├── .env # Neural Cloud Link Credentials (API Key)
95
+ │ ├── config.js # Strategic Configuration (Hot-reloadable)
96
+ │ ├── mission/ # Unified Tactical Airdrop Bay (Drag & drop screenshots here)
97
+ │ └── .chrome_session/ # Scout Browser Persistent Session & Cache
98
+ ├── mock/ # 9S Automated Data Camouflage Payloads (Mock APIs)
99
99
  └── src/
100
- ├── pages/ # Auto-built frontend page code
100
+ ├── pages/ # YoRHa-Constructed Frontend Units (Decoupled View & Schema)
101
101
  └── utils/
102
- └── menus.js # Auto-synced dynamic menu configuration
103
- ```
102
+ └── menus.js # Synchronized Theater Menu & Routing Configurations
104
103
 
105
104
  ## ⚙️ Configuration
106
105
 
package/bin/bunker.js CHANGED
@@ -8,6 +8,7 @@ const local = Intl.DateTimeFormat().resolvedOptions().locale.toUpperCase()
8
8
 
9
9
  const { matchDialog, terminalCollapse } = require('../src/logistics/presenter')
10
10
 
11
+ let isTerminating = false
11
12
  const recruiter = require('../src/headquarters/recruiter')
12
13
  const dialogues = recruiter(path.join(__dirname, '../src/dialogues'))
13
14
  const dialog = matchDialog(local, dialogues) ?? dialogues['EN-US']
@@ -62,10 +63,13 @@ program
62
63
  require('../src/headquarters/observer')(bunker)
63
64
  result.yorha.operator6O.report(dialog.operator6O.call2B)
64
65
  process.on('SIGINT', async () => {
66
+ if (isTerminating) return
67
+ isTerminating = true
65
68
  process.stdout.write('\r\x1b[K')
66
- result.yorha.commander.report(dialog.bunker.systemOffline, 'gray')
67
- terminalCollapse(500, dialog, result)
68
- const scout = await result.labs?.scout
69
+ const currentBunker = bunker.get()
70
+ currentBunker.yorha.commander.report(dialog.bunker.systemOffline, 'gray')
71
+ terminalCollapse(500, dialog, currentBunker)
72
+ const scout = await currentBunker.labs?.scout
69
73
  scout?.close()
70
74
  })
71
75
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yorha2b-lab/autodev",
3
- "version": "7.4.0",
3
+ "version": "7.4.2",
4
4
  "description": "基于 AI 视觉与语义协议的前端 (React+Antd) 代码构筑与旧系统重构引擎",
5
5
  "bin": {
6
6
  "bunker": "bin/bunker.js"
@@ -11,6 +11,7 @@ const {{this.action}} = async params => {
11
11
 
12
12
  {{#each functionButtons}}
13
13
  const {{this.action}} = () => {
14
+ const params = {}
14
15
  Modal.confirm({
15
16
  title: '确认',
16
17
  centered: true,