@yorha2b-lab/autodev 6.1.0 → 6.1.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/bin/bunker.js +2 -2
- package/example/example.json +25 -12
- package/package.json +1 -1
- package/src/gateway/index.js +3 -3
- package/src/headquarters/recruiter.js +3 -3
- package/src/logistics/presenter.js +4 -4
- package/src/units/raider.js +2 -2
- package/src/units/reconciler.js +1 -1
- package/src/units/striker.js +2 -2
- /package/src/workshop/react/briefings/{part.js → raider.js} +0 -0
- /package/src/workshop/react/briefings/{response.js → reconciler.js} +0 -0
- /package/src/workshop/react/briefings/{page.js → striker.js} +0 -0
package/bin/bunker.js
CHANGED
|
@@ -5,7 +5,7 @@ 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,
|
|
8
|
+
const { matchDialog, terminalCollapse } = require('../src/logistics/presenter')
|
|
9
9
|
const recruiter = require('../src/headquarters/recruiter')
|
|
10
10
|
const dialogues = recruiter(path.join(__dirname, '../src/dialogues'))
|
|
11
11
|
const dialog = matchDialog(local, dialogues) ?? dialogues['EN-US']
|
|
@@ -46,7 +46,7 @@ program
|
|
|
46
46
|
process.on('SIGINT', () => {
|
|
47
47
|
result.yorha.commander.report(dialog.bunker.systemOffline, 'gray')
|
|
48
48
|
result.labs?.scout?.close()
|
|
49
|
-
|
|
49
|
+
terminalCollapse(500, dialog, result)
|
|
50
50
|
})
|
|
51
51
|
})
|
|
52
52
|
|
package/example/example.json
CHANGED
|
@@ -21,11 +21,13 @@
|
|
|
21
21
|
"columns": [
|
|
22
22
|
{
|
|
23
23
|
"title": "职业",
|
|
24
|
-
"dataIndex": "profession"
|
|
24
|
+
"dataIndex": "profession",
|
|
25
|
+
"type": "text"
|
|
25
26
|
},
|
|
26
27
|
{
|
|
27
28
|
"title": "一觉",
|
|
28
|
-
"dataIndex": "firstAwakening"
|
|
29
|
+
"dataIndex": "firstAwakening",
|
|
30
|
+
"type": "text"
|
|
29
31
|
},
|
|
30
32
|
{
|
|
31
33
|
"title": "一觉立绘",
|
|
@@ -34,7 +36,8 @@
|
|
|
34
36
|
},
|
|
35
37
|
{
|
|
36
38
|
"title": "二觉",
|
|
37
|
-
"dataIndex": "secondAwakening"
|
|
39
|
+
"dataIndex": "secondAwakening",
|
|
40
|
+
"type": "text"
|
|
38
41
|
},
|
|
39
42
|
{
|
|
40
43
|
"title": "二觉立绘",
|
|
@@ -43,7 +46,8 @@
|
|
|
43
46
|
},
|
|
44
47
|
{
|
|
45
48
|
"title": "三觉",
|
|
46
|
-
"dataIndex": "thirdAwakening"
|
|
49
|
+
"dataIndex": "thirdAwakening",
|
|
50
|
+
"type": "text"
|
|
47
51
|
},
|
|
48
52
|
{
|
|
49
53
|
"title": "三觉立绘",
|
|
@@ -64,29 +68,38 @@
|
|
|
64
68
|
"title": "登场时间",
|
|
65
69
|
"dataIndex": "releaseDate",
|
|
66
70
|
"type": "date"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"title": "操作",
|
|
74
|
+
"dataIndex": "operation",
|
|
75
|
+
"type": "text"
|
|
67
76
|
}
|
|
68
77
|
],
|
|
69
78
|
"operation": [
|
|
70
79
|
{
|
|
71
80
|
"uri": "BUNKER_API_ANCHOR_view",
|
|
72
81
|
"label": "查看",
|
|
73
|
-
"action": "
|
|
82
|
+
"action": "view"
|
|
74
83
|
},
|
|
75
84
|
{
|
|
76
85
|
"uri": "BUNKER_API_ANCHOR_edit",
|
|
77
86
|
"label": "编辑",
|
|
78
|
-
"action": "
|
|
87
|
+
"action": "edit"
|
|
79
88
|
},
|
|
80
89
|
{
|
|
81
90
|
"uri": "BUNKER_API_ANCHOR_delete",
|
|
82
91
|
"label": "删除",
|
|
83
|
-
"action": "
|
|
92
|
+
"action": "delete"
|
|
84
93
|
}
|
|
85
94
|
],
|
|
86
95
|
"pagination": true,
|
|
87
96
|
"expandable": true,
|
|
88
97
|
"rowSelection": true
|
|
89
98
|
},
|
|
99
|
+
"title": {
|
|
100
|
+
"chinese": "职业觉醒管理",
|
|
101
|
+
"english": "professionAwakeningManagement"
|
|
102
|
+
},
|
|
90
103
|
"formItems": [
|
|
91
104
|
{
|
|
92
105
|
"label": "转职职业",
|
|
@@ -127,7 +140,7 @@
|
|
|
127
140
|
},
|
|
128
141
|
{
|
|
129
142
|
"label": "太刀",
|
|
130
|
-
"value": "
|
|
143
|
+
"value": "longSword"
|
|
131
144
|
},
|
|
132
145
|
{
|
|
133
146
|
"label": "巨剑",
|
|
@@ -157,13 +170,13 @@
|
|
|
157
170
|
"functionButton": [
|
|
158
171
|
{
|
|
159
172
|
"btn": "批量删除",
|
|
160
|
-
"uri": "
|
|
161
|
-
"action": "
|
|
173
|
+
"uri": "BUNKER_API_ANCHOR_deleteProfessions",
|
|
174
|
+
"action": "deleteProfessions"
|
|
162
175
|
},
|
|
163
176
|
{
|
|
164
177
|
"btn": "批量导出",
|
|
165
|
-
"uri": "
|
|
166
|
-
"action": "
|
|
178
|
+
"uri": "BUNKER_API_ANCHOR_exportProfessions",
|
|
179
|
+
"action": "exportProfessions"
|
|
167
180
|
}
|
|
168
181
|
]
|
|
169
182
|
}
|
package/package.json
CHANGED
package/src/gateway/index.js
CHANGED
|
@@ -3,9 +3,9 @@ module.exports = ({ yorha, dialog, logistics, briefings }) => {
|
|
|
3
3
|
const sharp = require('sharp')
|
|
4
4
|
|
|
5
5
|
const { sleep } = logistics.presenter
|
|
6
|
-
const { mock,
|
|
7
|
-
const { UI_DESIGNER, API_DESIGNER, MOCK_DESIGNER } = system
|
|
6
|
+
const { mock, council, similarity, reconciler } = briefings
|
|
8
7
|
const { textModel, visionModel } = logistics.supporter.getConfig()
|
|
8
|
+
const { UI_DESIGNER, API_DESIGNER, MOCK_DESIGNER } = briefings.system
|
|
9
9
|
|
|
10
10
|
const openAI = require('./client')()
|
|
11
11
|
const askAI = require('./protocol')({ yorha, sleep, dialog, openAI })
|
|
@@ -65,7 +65,7 @@ module.exports = ({ yorha, dialog, logistics, briefings }) => {
|
|
|
65
65
|
model: textModel,
|
|
66
66
|
messages: [
|
|
67
67
|
{ role: 'system', content: API_DESIGNER },
|
|
68
|
-
{ role: 'user', content:
|
|
68
|
+
{ role: 'user', content: reconciler({ responseStr, resourceStr }) }
|
|
69
69
|
]
|
|
70
70
|
})
|
|
71
71
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* This file is part of
|
|
4
|
-
*
|
|
2
|
+
* YoRHa Bunker Construction System
|
|
3
|
+
* This file is part of Bunker.
|
|
4
|
+
* Bunker is free software: you can redistribute it and/or modify
|
|
5
5
|
* it under the terms of the GNU Affero General Public License as
|
|
6
6
|
* published by the Free Software Foundation, either version 3 of the
|
|
7
7
|
* License, or (at your option) any later version.
|
|
@@ -48,8 +48,8 @@ const matchDialog = (locale, dialogs) => {
|
|
|
48
48
|
const bootSequence = async (version, local) => {
|
|
49
49
|
|
|
50
50
|
const lines = [
|
|
51
|
-
chalk.cyan(figlet.textSync('
|
|
52
|
-
chalk.gray('
|
|
51
|
+
chalk.cyan(figlet.textSync('Bunker', { horizontalLayout: 'full' })),
|
|
52
|
+
chalk.gray('Booting System...'),
|
|
53
53
|
chalk.white('[BUNKER] ') + chalk.green('Locale Detection: ') + chalk.cyan(local),
|
|
54
54
|
chalk.white('[BUNKER] ') + chalk.green('YoRHa No.2 Type B Unit: ') + chalk.cyan('Online'),
|
|
55
55
|
chalk.white('[BUNKER] ') + chalk.green('Scanner Type 9S Unit: ') + chalk.cyan('Standby'),
|
|
@@ -65,7 +65,7 @@ const bootSequence = async (version, local) => {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
const
|
|
68
|
+
const terminalCollapse = async (duration = 1500, dialog, result) => {
|
|
69
69
|
|
|
70
70
|
let currentTotal = 0
|
|
71
71
|
const MIRROR_URL = 'https://cdn.jsdelivr.net/gh/yorha2b-lab/autodev@github-repo-stats/bunker-stats.json'
|
|
@@ -142,5 +142,5 @@ module.exports = {
|
|
|
142
142
|
yorha,
|
|
143
143
|
matchDialog,
|
|
144
144
|
bootSequence,
|
|
145
|
-
|
|
145
|
+
terminalCollapse
|
|
146
146
|
}
|
package/src/units/raider.js
CHANGED
|
@@ -8,8 +8,8 @@ module.exports = {
|
|
|
8
8
|
const { llm, yorha, dialog, builder, logistics, briefings } = require('../awakening').get()
|
|
9
9
|
|
|
10
10
|
const { pod042 } = yorha
|
|
11
|
+
const { raider } = briefings
|
|
11
12
|
const { recognizePage } = llm
|
|
12
|
-
const { part: prompt } = briefings
|
|
13
13
|
const { formatFormItemAndColumns } = builder
|
|
14
14
|
const { cleanCode, contextStringify } = logistics.builder
|
|
15
15
|
|
|
@@ -20,7 +20,7 @@ module.exports = {
|
|
|
20
20
|
try {
|
|
21
21
|
pod042.update(spinner, dialog.pod042.extractingUiMetadata)
|
|
22
22
|
|
|
23
|
-
const pageConfig = await recognizePage({ prompt, filePath })
|
|
23
|
+
const pageConfig = await recognizePage({ prompt: raider, filePath })
|
|
24
24
|
|
|
25
25
|
const { formItems, dictBlocks, processedColumns } = formatFormItemAndColumns({ pageConfig })
|
|
26
26
|
|
package/src/units/reconciler.js
CHANGED
|
@@ -17,7 +17,7 @@ module.exports = {
|
|
|
17
17
|
const startTime = Date.now()
|
|
18
18
|
const fileName = liveResponse?.fileName ?? path.basename(filePath, path.extname(filePath))
|
|
19
19
|
const resourcePath = path.join(process.cwd(), pagesDir, fileName, 'resource.js')
|
|
20
|
-
const enumParams = (await labs?.council)?.[fileName] ?? ''
|
|
20
|
+
const enumParams = (await labs?.council)?.[fileName] ?? '{}'
|
|
21
21
|
|
|
22
22
|
const spinner = pod153.start(dialog.pod153.reconEncryptedData(fileName))
|
|
23
23
|
|
package/src/units/striker.js
CHANGED
|
@@ -7,7 +7,7 @@ module.exports = {
|
|
|
7
7
|
|
|
8
8
|
const { llm, yorha, dialog, builder, template, logistics, briefings } = require('../awakening').get()
|
|
9
9
|
|
|
10
|
-
const {
|
|
10
|
+
const { striker } = briefings
|
|
11
11
|
const { nineS, pod042 } = yorha
|
|
12
12
|
const { index, resource } = builder
|
|
13
13
|
const { contextStringify } = logistics.builder
|
|
@@ -33,7 +33,7 @@ module.exports = {
|
|
|
33
33
|
pageConfig = require('../../example/example.json')
|
|
34
34
|
} else {
|
|
35
35
|
pod042.update(spinner, dialog.pod042.uploadVisualMetadata)
|
|
36
|
-
pageConfig = await recognizePage({ prompt:
|
|
36
|
+
pageConfig = await recognizePage({ prompt: striker, filePath, schema: require(`../workshop/${template}/protocols/striker.json`) })
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
const { similarity } = await nameSimilarity({ fileName, english: pageConfig.title.english })
|
|
File without changes
|
|
File without changes
|
|
File without changes
|