@maaxyz/maa-node 5.3.0-beta.5 → 5.3.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.
- package/dist/constant.d.ts +0 -33
- package/dist/controller.d.ts +4 -0
- package/dist/pipeline.d.ts +66 -2
- package/dist/resource.d.ts +3 -0
- package/dist/tasker.d.ts +11 -0
- package/package.json +7 -7
package/dist/constant.d.ts
CHANGED
|
@@ -125,39 +125,6 @@ declare global {
|
|
|
125
125
|
ScreencapOrInputMethods
|
|
126
126
|
>
|
|
127
127
|
const DbgControllerType: Record<'CarouselImage' | 'ReplayRecording', Uint64>
|
|
128
|
-
const RecognitionType: Record<
|
|
129
|
-
| 'DirectHit'
|
|
130
|
-
| 'TemplateMatch'
|
|
131
|
-
| 'FeatureMatch'
|
|
132
|
-
| 'ColorMatch'
|
|
133
|
-
| 'OCR'
|
|
134
|
-
| 'NeuralNetworkClassify'
|
|
135
|
-
| 'NeuralNetworkDetect'
|
|
136
|
-
| 'Custom',
|
|
137
|
-
string
|
|
138
|
-
>
|
|
139
|
-
const ActionType: Record<
|
|
140
|
-
| 'DoNothing'
|
|
141
|
-
| 'Click'
|
|
142
|
-
| 'LongPress'
|
|
143
|
-
| 'Swipe'
|
|
144
|
-
| 'MultiSwipe'
|
|
145
|
-
| 'TouchDown'
|
|
146
|
-
| 'TouchMove'
|
|
147
|
-
| 'TouchUp'
|
|
148
|
-
| 'ClickKey'
|
|
149
|
-
| 'LongPressKey'
|
|
150
|
-
| 'KeyDown'
|
|
151
|
-
| 'KeyUp'
|
|
152
|
-
| 'InputText'
|
|
153
|
-
| 'StartApp'
|
|
154
|
-
| 'StopApp'
|
|
155
|
-
| 'StopTask'
|
|
156
|
-
| 'Scroll'
|
|
157
|
-
| 'Command'
|
|
158
|
-
| 'Custom',
|
|
159
|
-
string
|
|
160
|
-
>
|
|
161
128
|
}
|
|
162
129
|
}
|
|
163
130
|
export {}
|
package/dist/controller.d.ts
CHANGED
|
@@ -218,6 +218,10 @@ declare global {
|
|
|
218
218
|
static find(): Promise<DesktopDevice[] | null>
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
+
class PlayCoverController extends Controller {
|
|
222
|
+
constructor(address: string, uuid: string)
|
|
223
|
+
}
|
|
224
|
+
|
|
221
225
|
class DbgController extends Controller {
|
|
222
226
|
constructor(
|
|
223
227
|
read_path: string,
|
package/dist/pipeline.d.ts
CHANGED
|
@@ -24,10 +24,19 @@ declare global {
|
|
|
24
24
|
ColorMatch: 'Horizontal' | 'Vertical' | 'Score' | 'Area' | 'Random'
|
|
25
25
|
OCR: 'Horizontal' | 'Vertical' | 'Area' | 'Length' | 'Random' | 'Expected'
|
|
26
26
|
NeuralNetworkClassify: 'Horizontal' | 'Vertical' | 'Score' | 'Random' | 'Expected'
|
|
27
|
-
NeuralNetworkDetect:
|
|
27
|
+
NeuralNetworkDetect:
|
|
28
|
+
| 'Horizontal'
|
|
29
|
+
| 'Vertical'
|
|
30
|
+
| 'Score'
|
|
31
|
+
| 'Area'
|
|
32
|
+
| 'Random'
|
|
33
|
+
| 'Expected'
|
|
28
34
|
}
|
|
29
35
|
|
|
30
|
-
type RecognitionDirectHit = {
|
|
36
|
+
type RecognitionDirectHit = {
|
|
37
|
+
roi?: Rect | NodeName
|
|
38
|
+
roi_offset?: Rect
|
|
39
|
+
}
|
|
31
40
|
|
|
32
41
|
type RecognitionTemplateMatch<Mode> = RequiredIfStrict<
|
|
33
42
|
{
|
|
@@ -139,6 +148,23 @@ declare global {
|
|
|
139
148
|
Mode
|
|
140
149
|
>
|
|
141
150
|
|
|
151
|
+
type RecognitionAnd<Mode> = RequiredIfStrict<
|
|
152
|
+
{
|
|
153
|
+
all_of?: Recognition<Mode>['recognition'][]
|
|
154
|
+
box_index?: number
|
|
155
|
+
},
|
|
156
|
+
'all_of',
|
|
157
|
+
Mode
|
|
158
|
+
>
|
|
159
|
+
|
|
160
|
+
type RecognitionOr<Mode> = RequiredIfStrict<
|
|
161
|
+
{
|
|
162
|
+
any_of: Recognition<Mode>['recognition'][]
|
|
163
|
+
},
|
|
164
|
+
'any_of',
|
|
165
|
+
Mode
|
|
166
|
+
>
|
|
167
|
+
|
|
142
168
|
type MixReco<Type extends string, Param, Mode> =
|
|
143
169
|
| {
|
|
144
170
|
recognition: {
|
|
@@ -153,6 +179,18 @@ declare global {
|
|
|
153
179
|
Mode
|
|
154
180
|
>
|
|
155
181
|
|
|
182
|
+
type RecognitionType =
|
|
183
|
+
| 'DirectHit'
|
|
184
|
+
| 'TemplateMatch'
|
|
185
|
+
| 'FeatureMatch'
|
|
186
|
+
| 'ColorMatch'
|
|
187
|
+
| 'OCR'
|
|
188
|
+
| 'NeuralNetworkClassify'
|
|
189
|
+
| 'NeuralNetworkDetect'
|
|
190
|
+
| 'And'
|
|
191
|
+
| 'Or'
|
|
192
|
+
| 'Custom'
|
|
193
|
+
|
|
156
194
|
type Recognition<Mode> =
|
|
157
195
|
| RemoveIfDump<
|
|
158
196
|
{
|
|
@@ -170,6 +208,8 @@ declare global {
|
|
|
170
208
|
| MixReco<'OCR', RecognitionOCR<Mode>, Mode>
|
|
171
209
|
| MixReco<'NeuralNetworkClassify', RecognitionNeuralNetworkClassify<Mode>, Mode>
|
|
172
210
|
| MixReco<'NeuralNetworkDetect', RecognitionNeuralNetworkDetect<Mode>, Mode>
|
|
211
|
+
| MixReco<'And', RecognitionAnd<Mode>, Mode>
|
|
212
|
+
| MixReco<'Or', RecognitionOr<Mode>, Mode>
|
|
173
213
|
| MixReco<'Custom', RecognitionCustom<Mode>, Mode>
|
|
174
214
|
|
|
175
215
|
type ActionDoNothing = {}
|
|
@@ -297,6 +337,7 @@ declare global {
|
|
|
297
337
|
args?: string[]
|
|
298
338
|
detach?: boolean
|
|
299
339
|
},
|
|
340
|
+
'exec',
|
|
300
341
|
Mode
|
|
301
342
|
>
|
|
302
343
|
|
|
@@ -334,6 +375,29 @@ declare global {
|
|
|
334
375
|
}
|
|
335
376
|
}
|
|
336
377
|
|
|
378
|
+
type ActionType =
|
|
379
|
+
| 'DoNothing'
|
|
380
|
+
| 'Click'
|
|
381
|
+
| 'LongPress'
|
|
382
|
+
| 'Swipe'
|
|
383
|
+
| 'MultiSwipe'
|
|
384
|
+
| 'TouchDown'
|
|
385
|
+
| 'TouchMove'
|
|
386
|
+
| 'TouchUp'
|
|
387
|
+
| 'Key'
|
|
388
|
+
| 'ClickKey'
|
|
389
|
+
| 'LongPressKey'
|
|
390
|
+
| 'KeyDown'
|
|
391
|
+
| 'KeyUp'
|
|
392
|
+
| 'InputText'
|
|
393
|
+
| 'StartApp'
|
|
394
|
+
| 'StopApp'
|
|
395
|
+
| 'Scroll'
|
|
396
|
+
| 'StopTask'
|
|
397
|
+
| 'Command'
|
|
398
|
+
| 'Shell'
|
|
399
|
+
| 'Custom'
|
|
400
|
+
|
|
337
401
|
type Action<Mode> =
|
|
338
402
|
| RemoveIfDump<
|
|
339
403
|
{
|
package/dist/resource.d.ts
CHANGED
|
@@ -26,6 +26,9 @@ declare global {
|
|
|
26
26
|
unregister_custom_action(name: string): void
|
|
27
27
|
clear_custom_action(): void
|
|
28
28
|
post_bundle(path: string): Job<ResId, Resource>
|
|
29
|
+
post_ocr_model(path: string): Job<ResId, Resource>
|
|
30
|
+
post_pipeline(path: string): Job<ResId, Resource>
|
|
31
|
+
post_image(path: string): Job<ResId, Resource>
|
|
29
32
|
override_pipeline(
|
|
30
33
|
pipeline_override: Record<string, unknown> | Record<string, unknown>[],
|
|
31
34
|
): void
|
package/dist/tasker.d.ts
CHANGED
|
@@ -137,6 +137,17 @@ declare global {
|
|
|
137
137
|
entry: string,
|
|
138
138
|
pipeline_override?: Record<string, unknown> | Record<string, unknown>[],
|
|
139
139
|
): TaskJob
|
|
140
|
+
post_recognition(
|
|
141
|
+
reco_type: RecognitionType,
|
|
142
|
+
reco_param: Record<string, unknown> | Record<string, unknown>[],
|
|
143
|
+
image: ImageData,
|
|
144
|
+
): TaskJob
|
|
145
|
+
post_action(
|
|
146
|
+
action_type: ActionType,
|
|
147
|
+
action_param: Record<string, unknown> | Record<string, unknown>[],
|
|
148
|
+
box: maa.Rect,
|
|
149
|
+
reco_detail?: string,
|
|
150
|
+
): TaskJob
|
|
140
151
|
post_stop(): TaskJob
|
|
141
152
|
status(id: TaskId): Status
|
|
142
153
|
wait(id: TaskId): Promise<Status>
|
package/package.json
CHANGED
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"prettier": "^3.5.2",
|
|
29
29
|
"typescript": "^5.8.2"
|
|
30
30
|
},
|
|
31
|
-
"version": "5.3.0
|
|
31
|
+
"version": "5.3.0",
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@maaxyz/maa-node-darwin-arm64": "5.3.0
|
|
34
|
-
"@maaxyz/maa-node-darwin-x64": "5.3.0
|
|
35
|
-
"@maaxyz/maa-node-linux-arm64": "5.3.0
|
|
36
|
-
"@maaxyz/maa-node-linux-x64": "5.3.0
|
|
37
|
-
"@maaxyz/maa-node-win32-arm64": "5.3.0
|
|
38
|
-
"@maaxyz/maa-node-win32-x64": "5.3.0
|
|
33
|
+
"@maaxyz/maa-node-darwin-arm64": "5.3.0",
|
|
34
|
+
"@maaxyz/maa-node-darwin-x64": "5.3.0",
|
|
35
|
+
"@maaxyz/maa-node-linux-arm64": "5.3.0",
|
|
36
|
+
"@maaxyz/maa-node-linux-x64": "5.3.0",
|
|
37
|
+
"@maaxyz/maa-node-win32-arm64": "5.3.0",
|
|
38
|
+
"@maaxyz/maa-node-win32-x64": "5.3.0"
|
|
39
39
|
}
|
|
40
40
|
}
|