stelo 1.0.1
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/LICENSE +184 -0
- package/README.md +853 -0
- package/dist/accessibility.d.ts +227 -0
- package/dist/accessibility.d.ts.map +1 -0
- package/dist/accessibility.js +602 -0
- package/dist/accessibility.js.map +1 -0
- package/dist/agent.d.ts +870 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +1107 -0
- package/dist/agent.js.map +1 -0
- package/dist/audio-stream.d.ts +114 -0
- package/dist/audio-stream.d.ts.map +1 -0
- package/dist/audio-stream.js +167 -0
- package/dist/audio-stream.js.map +1 -0
- package/dist/clipboard.d.ts +99 -0
- package/dist/clipboard.d.ts.map +1 -0
- package/dist/clipboard.js +352 -0
- package/dist/clipboard.js.map +1 -0
- package/dist/config.d.ts +183 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +477 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +213 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +387 -0
- package/dist/context.js.map +1 -0
- package/dist/cortex.d.ts +548 -0
- package/dist/cortex.d.ts.map +1 -0
- package/dist/cortex.js +1479 -0
- package/dist/cortex.js.map +1 -0
- package/dist/errors.d.ts +133 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +278 -0
- package/dist/errors.js.map +1 -0
- package/dist/events.d.ts +227 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +429 -0
- package/dist/events.js.map +1 -0
- package/dist/executor.d.ts +212 -0
- package/dist/executor.d.ts.map +1 -0
- package/dist/executor.js +545 -0
- package/dist/executor.js.map +1 -0
- package/dist/index.d.ts +69 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +167 -0
- package/dist/index.js.map +1 -0
- package/dist/integration.d.ts +159 -0
- package/dist/integration.d.ts.map +1 -0
- package/dist/integration.js +533 -0
- package/dist/integration.js.map +1 -0
- package/dist/keyboard.d.ts +276 -0
- package/dist/keyboard.d.ts.map +1 -0
- package/dist/keyboard.js +404 -0
- package/dist/keyboard.js.map +1 -0
- package/dist/logger.d.ts +198 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +516 -0
- package/dist/logger.js.map +1 -0
- package/dist/middleware.d.ts +183 -0
- package/dist/middleware.d.ts.map +1 -0
- package/dist/middleware.js +493 -0
- package/dist/middleware.js.map +1 -0
- package/dist/monitor.d.ts +136 -0
- package/dist/monitor.d.ts.map +1 -0
- package/dist/monitor.js +341 -0
- package/dist/monitor.js.map +1 -0
- package/dist/mouse.d.ts +290 -0
- package/dist/mouse.d.ts.map +1 -0
- package/dist/mouse.js +466 -0
- package/dist/mouse.js.map +1 -0
- package/dist/plugin.d.ts +157 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +409 -0
- package/dist/plugin.js.map +1 -0
- package/dist/process.d.ts +106 -0
- package/dist/process.d.ts.map +1 -0
- package/dist/process.js +326 -0
- package/dist/process.js.map +1 -0
- package/dist/recorder.d.ts +100 -0
- package/dist/recorder.d.ts.map +1 -0
- package/dist/recorder.js +258 -0
- package/dist/recorder.js.map +1 -0
- package/dist/safety.d.ts +59 -0
- package/dist/safety.d.ts.map +1 -0
- package/dist/safety.js +98 -0
- package/dist/safety.js.map +1 -0
- package/dist/scheduler.d.ts +152 -0
- package/dist/scheduler.d.ts.map +1 -0
- package/dist/scheduler.js +615 -0
- package/dist/scheduler.js.map +1 -0
- package/dist/screen.d.ts +96 -0
- package/dist/screen.d.ts.map +1 -0
- package/dist/screen.js +154 -0
- package/dist/screen.js.map +1 -0
- package/dist/session.d.ts +209 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +479 -0
- package/dist/session.js.map +1 -0
- package/dist/stream.d.ts +168 -0
- package/dist/stream.d.ts.map +1 -0
- package/dist/stream.js +298 -0
- package/dist/stream.js.map +1 -0
- package/dist/telemetry.d.ts +223 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +433 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/types.d.ts +165 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/bezier.d.ts +51 -0
- package/dist/utils/bezier.d.ts.map +1 -0
- package/dist/utils/bezier.js +117 -0
- package/dist/utils/bezier.js.map +1 -0
- package/dist/utils/helpers.d.ts +90 -0
- package/dist/utils/helpers.d.ts.map +1 -0
- package/dist/utils/helpers.js +143 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +18 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/validation.d.ts +254 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +478 -0
- package/dist/validation.js.map +1 -0
- package/dist/vision.d.ts +719 -0
- package/dist/vision.d.ts.map +1 -0
- package/dist/vision.js +1197 -0
- package/dist/vision.js.map +1 -0
- package/dist/window.d.ts +80 -0
- package/dist/window.d.ts.map +1 -0
- package/dist/window.js +170 -0
- package/dist/window.js.map +1 -0
- package/dist/workflow.d.ts +224 -0
- package/dist/workflow.d.ts.map +1 -0
- package/dist/workflow.js +578 -0
- package/dist/workflow.js.map +1 -0
- package/index.d.ts +840 -0
- package/index.js +495 -0
- package/package.json +91 -0
package/index.js
ADDED
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/* prettier-ignore */
|
|
4
|
+
|
|
5
|
+
/* auto-generated by NAPI-RS */
|
|
6
|
+
|
|
7
|
+
const { existsSync, readFileSync } = require('fs')
|
|
8
|
+
const { join } = require('path')
|
|
9
|
+
|
|
10
|
+
const { platform, arch } = process
|
|
11
|
+
|
|
12
|
+
let nativeBinding = null
|
|
13
|
+
let localFileExisted = false
|
|
14
|
+
let loadError = null
|
|
15
|
+
|
|
16
|
+
function isMusl() {
|
|
17
|
+
// For Node 10
|
|
18
|
+
if (!process.report || typeof process.report.getReport !== 'function') {
|
|
19
|
+
try {
|
|
20
|
+
const lddPath = require('child_process').execSync('which ldd').toString().trim()
|
|
21
|
+
return readFileSync(lddPath, 'utf8').includes('musl')
|
|
22
|
+
} catch (e) {
|
|
23
|
+
return true
|
|
24
|
+
}
|
|
25
|
+
} else {
|
|
26
|
+
const { glibcVersionRuntime } = process.report.getReport().header
|
|
27
|
+
return !glibcVersionRuntime
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
switch (platform) {
|
|
32
|
+
case 'android':
|
|
33
|
+
switch (arch) {
|
|
34
|
+
case 'arm64':
|
|
35
|
+
localFileExisted = existsSync(join(__dirname, 'stelo.android-arm64.node'))
|
|
36
|
+
try {
|
|
37
|
+
if (localFileExisted) {
|
|
38
|
+
nativeBinding = require('./stelo.android-arm64.node')
|
|
39
|
+
} else {
|
|
40
|
+
nativeBinding = require('stelo-android-arm64')
|
|
41
|
+
}
|
|
42
|
+
} catch (e) {
|
|
43
|
+
loadError = e
|
|
44
|
+
}
|
|
45
|
+
break
|
|
46
|
+
case 'arm':
|
|
47
|
+
localFileExisted = existsSync(join(__dirname, 'stelo.android-arm-eabi.node'))
|
|
48
|
+
try {
|
|
49
|
+
if (localFileExisted) {
|
|
50
|
+
nativeBinding = require('./stelo.android-arm-eabi.node')
|
|
51
|
+
} else {
|
|
52
|
+
nativeBinding = require('stelo-android-arm-eabi')
|
|
53
|
+
}
|
|
54
|
+
} catch (e) {
|
|
55
|
+
loadError = e
|
|
56
|
+
}
|
|
57
|
+
break
|
|
58
|
+
default:
|
|
59
|
+
throw new Error(`Unsupported architecture on Android ${arch}`)
|
|
60
|
+
}
|
|
61
|
+
break
|
|
62
|
+
case 'win32':
|
|
63
|
+
switch (arch) {
|
|
64
|
+
case 'x64':
|
|
65
|
+
localFileExisted = existsSync(
|
|
66
|
+
join(__dirname, 'stelo.win32-x64-msvc.node')
|
|
67
|
+
)
|
|
68
|
+
try {
|
|
69
|
+
if (localFileExisted) {
|
|
70
|
+
nativeBinding = require('./stelo.win32-x64-msvc.node')
|
|
71
|
+
} else {
|
|
72
|
+
nativeBinding = require('stelo-win32-x64-msvc')
|
|
73
|
+
}
|
|
74
|
+
} catch (e) {
|
|
75
|
+
loadError = e
|
|
76
|
+
}
|
|
77
|
+
break
|
|
78
|
+
case 'ia32':
|
|
79
|
+
localFileExisted = existsSync(
|
|
80
|
+
join(__dirname, 'stelo.win32-ia32-msvc.node')
|
|
81
|
+
)
|
|
82
|
+
try {
|
|
83
|
+
if (localFileExisted) {
|
|
84
|
+
nativeBinding = require('./stelo.win32-ia32-msvc.node')
|
|
85
|
+
} else {
|
|
86
|
+
nativeBinding = require('stelo-win32-ia32-msvc')
|
|
87
|
+
}
|
|
88
|
+
} catch (e) {
|
|
89
|
+
loadError = e
|
|
90
|
+
}
|
|
91
|
+
break
|
|
92
|
+
case 'arm64':
|
|
93
|
+
localFileExisted = existsSync(
|
|
94
|
+
join(__dirname, 'stelo.win32-arm64-msvc.node')
|
|
95
|
+
)
|
|
96
|
+
try {
|
|
97
|
+
if (localFileExisted) {
|
|
98
|
+
nativeBinding = require('./stelo.win32-arm64-msvc.node')
|
|
99
|
+
} else {
|
|
100
|
+
nativeBinding = require('stelo-win32-arm64-msvc')
|
|
101
|
+
}
|
|
102
|
+
} catch (e) {
|
|
103
|
+
loadError = e
|
|
104
|
+
}
|
|
105
|
+
break
|
|
106
|
+
default:
|
|
107
|
+
throw new Error(`Unsupported architecture on Windows: ${arch}`)
|
|
108
|
+
}
|
|
109
|
+
break
|
|
110
|
+
case 'darwin':
|
|
111
|
+
localFileExisted = existsSync(join(__dirname, 'stelo.darwin-universal.node'))
|
|
112
|
+
try {
|
|
113
|
+
if (localFileExisted) {
|
|
114
|
+
nativeBinding = require('./stelo.darwin-universal.node')
|
|
115
|
+
} else {
|
|
116
|
+
nativeBinding = require('stelo-darwin-universal')
|
|
117
|
+
}
|
|
118
|
+
break
|
|
119
|
+
} catch {}
|
|
120
|
+
switch (arch) {
|
|
121
|
+
case 'x64':
|
|
122
|
+
localFileExisted = existsSync(join(__dirname, 'stelo.darwin-x64.node'))
|
|
123
|
+
try {
|
|
124
|
+
if (localFileExisted) {
|
|
125
|
+
nativeBinding = require('./stelo.darwin-x64.node')
|
|
126
|
+
} else {
|
|
127
|
+
nativeBinding = require('stelo-darwin-x64')
|
|
128
|
+
}
|
|
129
|
+
} catch (e) {
|
|
130
|
+
loadError = e
|
|
131
|
+
}
|
|
132
|
+
break
|
|
133
|
+
case 'arm64':
|
|
134
|
+
localFileExisted = existsSync(
|
|
135
|
+
join(__dirname, 'stelo.darwin-arm64.node')
|
|
136
|
+
)
|
|
137
|
+
try {
|
|
138
|
+
if (localFileExisted) {
|
|
139
|
+
nativeBinding = require('./stelo.darwin-arm64.node')
|
|
140
|
+
} else {
|
|
141
|
+
nativeBinding = require('stelo-darwin-arm64')
|
|
142
|
+
}
|
|
143
|
+
} catch (e) {
|
|
144
|
+
loadError = e
|
|
145
|
+
}
|
|
146
|
+
break
|
|
147
|
+
default:
|
|
148
|
+
throw new Error(`Unsupported architecture on macOS: ${arch}`)
|
|
149
|
+
}
|
|
150
|
+
break
|
|
151
|
+
case 'freebsd':
|
|
152
|
+
if (arch !== 'x64') {
|
|
153
|
+
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
|
|
154
|
+
}
|
|
155
|
+
localFileExisted = existsSync(join(__dirname, 'stelo.freebsd-x64.node'))
|
|
156
|
+
try {
|
|
157
|
+
if (localFileExisted) {
|
|
158
|
+
nativeBinding = require('./stelo.freebsd-x64.node')
|
|
159
|
+
} else {
|
|
160
|
+
nativeBinding = require('stelo-freebsd-x64')
|
|
161
|
+
}
|
|
162
|
+
} catch (e) {
|
|
163
|
+
loadError = e
|
|
164
|
+
}
|
|
165
|
+
break
|
|
166
|
+
case 'linux':
|
|
167
|
+
switch (arch) {
|
|
168
|
+
case 'x64':
|
|
169
|
+
if (isMusl()) {
|
|
170
|
+
localFileExisted = existsSync(
|
|
171
|
+
join(__dirname, 'stelo.linux-x64-musl.node')
|
|
172
|
+
)
|
|
173
|
+
try {
|
|
174
|
+
if (localFileExisted) {
|
|
175
|
+
nativeBinding = require('./stelo.linux-x64-musl.node')
|
|
176
|
+
} else {
|
|
177
|
+
nativeBinding = require('stelo-linux-x64-musl')
|
|
178
|
+
}
|
|
179
|
+
} catch (e) {
|
|
180
|
+
loadError = e
|
|
181
|
+
}
|
|
182
|
+
} else {
|
|
183
|
+
localFileExisted = existsSync(
|
|
184
|
+
join(__dirname, 'stelo.linux-x64-gnu.node')
|
|
185
|
+
)
|
|
186
|
+
try {
|
|
187
|
+
if (localFileExisted) {
|
|
188
|
+
nativeBinding = require('./stelo.linux-x64-gnu.node')
|
|
189
|
+
} else {
|
|
190
|
+
nativeBinding = require('stelo-linux-x64-gnu')
|
|
191
|
+
}
|
|
192
|
+
} catch (e) {
|
|
193
|
+
loadError = e
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
break
|
|
197
|
+
case 'arm64':
|
|
198
|
+
if (isMusl()) {
|
|
199
|
+
localFileExisted = existsSync(
|
|
200
|
+
join(__dirname, 'stelo.linux-arm64-musl.node')
|
|
201
|
+
)
|
|
202
|
+
try {
|
|
203
|
+
if (localFileExisted) {
|
|
204
|
+
nativeBinding = require('./stelo.linux-arm64-musl.node')
|
|
205
|
+
} else {
|
|
206
|
+
nativeBinding = require('stelo-linux-arm64-musl')
|
|
207
|
+
}
|
|
208
|
+
} catch (e) {
|
|
209
|
+
loadError = e
|
|
210
|
+
}
|
|
211
|
+
} else {
|
|
212
|
+
localFileExisted = existsSync(
|
|
213
|
+
join(__dirname, 'stelo.linux-arm64-gnu.node')
|
|
214
|
+
)
|
|
215
|
+
try {
|
|
216
|
+
if (localFileExisted) {
|
|
217
|
+
nativeBinding = require('./stelo.linux-arm64-gnu.node')
|
|
218
|
+
} else {
|
|
219
|
+
nativeBinding = require('stelo-linux-arm64-gnu')
|
|
220
|
+
}
|
|
221
|
+
} catch (e) {
|
|
222
|
+
loadError = e
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
break
|
|
226
|
+
case 'arm':
|
|
227
|
+
if (isMusl()) {
|
|
228
|
+
localFileExisted = existsSync(
|
|
229
|
+
join(__dirname, 'stelo.linux-arm-musleabihf.node')
|
|
230
|
+
)
|
|
231
|
+
try {
|
|
232
|
+
if (localFileExisted) {
|
|
233
|
+
nativeBinding = require('./stelo.linux-arm-musleabihf.node')
|
|
234
|
+
} else {
|
|
235
|
+
nativeBinding = require('stelo-linux-arm-musleabihf')
|
|
236
|
+
}
|
|
237
|
+
} catch (e) {
|
|
238
|
+
loadError = e
|
|
239
|
+
}
|
|
240
|
+
} else {
|
|
241
|
+
localFileExisted = existsSync(
|
|
242
|
+
join(__dirname, 'stelo.linux-arm-gnueabihf.node')
|
|
243
|
+
)
|
|
244
|
+
try {
|
|
245
|
+
if (localFileExisted) {
|
|
246
|
+
nativeBinding = require('./stelo.linux-arm-gnueabihf.node')
|
|
247
|
+
} else {
|
|
248
|
+
nativeBinding = require('stelo-linux-arm-gnueabihf')
|
|
249
|
+
}
|
|
250
|
+
} catch (e) {
|
|
251
|
+
loadError = e
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
break
|
|
255
|
+
case 'riscv64':
|
|
256
|
+
if (isMusl()) {
|
|
257
|
+
localFileExisted = existsSync(
|
|
258
|
+
join(__dirname, 'stelo.linux-riscv64-musl.node')
|
|
259
|
+
)
|
|
260
|
+
try {
|
|
261
|
+
if (localFileExisted) {
|
|
262
|
+
nativeBinding = require('./stelo.linux-riscv64-musl.node')
|
|
263
|
+
} else {
|
|
264
|
+
nativeBinding = require('stelo-linux-riscv64-musl')
|
|
265
|
+
}
|
|
266
|
+
} catch (e) {
|
|
267
|
+
loadError = e
|
|
268
|
+
}
|
|
269
|
+
} else {
|
|
270
|
+
localFileExisted = existsSync(
|
|
271
|
+
join(__dirname, 'stelo.linux-riscv64-gnu.node')
|
|
272
|
+
)
|
|
273
|
+
try {
|
|
274
|
+
if (localFileExisted) {
|
|
275
|
+
nativeBinding = require('./stelo.linux-riscv64-gnu.node')
|
|
276
|
+
} else {
|
|
277
|
+
nativeBinding = require('stelo-linux-riscv64-gnu')
|
|
278
|
+
}
|
|
279
|
+
} catch (e) {
|
|
280
|
+
loadError = e
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
break
|
|
284
|
+
case 's390x':
|
|
285
|
+
localFileExisted = existsSync(
|
|
286
|
+
join(__dirname, 'stelo.linux-s390x-gnu.node')
|
|
287
|
+
)
|
|
288
|
+
try {
|
|
289
|
+
if (localFileExisted) {
|
|
290
|
+
nativeBinding = require('./stelo.linux-s390x-gnu.node')
|
|
291
|
+
} else {
|
|
292
|
+
nativeBinding = require('stelo-linux-s390x-gnu')
|
|
293
|
+
}
|
|
294
|
+
} catch (e) {
|
|
295
|
+
loadError = e
|
|
296
|
+
}
|
|
297
|
+
break
|
|
298
|
+
default:
|
|
299
|
+
throw new Error(`Unsupported architecture on Linux: ${arch}`)
|
|
300
|
+
}
|
|
301
|
+
break
|
|
302
|
+
default:
|
|
303
|
+
throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`)
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
if (!nativeBinding) {
|
|
307
|
+
if (loadError) {
|
|
308
|
+
throw loadError
|
|
309
|
+
}
|
|
310
|
+
throw new Error(`Failed to load native binding`)
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
const { ensureDpiAwareness, mouseMove, mouseGetPosition, mouseMoveSmooth, mouseMoveHumanized, mouseClick, mouseDoubleClick, mouseTripleClick, mouseDown, mouseUp, mouseScroll, mouseScrollSmooth, mouseDrag, mouseClickAt, mouseClickObserved, keyboardType, keyboardTypeHumanized, keyboardPress, keyboardDown, keyboardUp, keyboardHotkey, keyboardTap, keyboardIsPressed, keyboardAllKeys, keyboardTypeBatch, keyboardHotkeyString, keyboardSequence, keyboardTypeWithModifiers, keyboardIsToggled, keyboardToggleKey, keyboardArePressed, keyboardWaitForKey, keyboardWaitForKeyRelease, screenSize, screenPixelColor, screenCapture, screenCaptureBgra, screenDisplays, screenFindColor, windowGetActive, windowGetAll, windowFind, windowFocus, windowFocusByTitle, windowResize, windowMove, windowMinimize, windowMaximize, windowRestore, windowClose, windowSetBounds, safetyEnableFailsafe, safetyDisableFailsafe, safetyIsFailsafeEnabled, safetySetRateLimit, safetyDisableRateLimit, safetyEmergencyStop, safetyIsStopped, safetyReset, streamStart, streamStop, streamIsRunning, streamGetLatestFrame, streamGetRecentFrames, streamWaitForFrame, streamGetStats, audioStreamStart, audioStreamStop, audioStreamIsRunning, audioStreamGetFormat, audioStreamGetLatestChunk, audioStreamGetRecentChunks, audioStreamDrainChunks, audioStreamGetStats, micStreamStart, micStreamStop, micStreamIsRunning, micStreamGetFormat, micStreamGetLatestChunk, micStreamGetRecentChunks, micStreamDrainChunks, micStreamGetStats, speakerStart, speakerStop, speakerIsRunning, speakerWrite, speakerClear, speakerGetStats, visionDiff, visionAnalyzeGrid, visionWaitForChange, visionWaitForStable, visionPerceptualHash, visionHashDistance, visionFindAllColors, visionFindColorClusters, agentExecuteBatch, agentClickAndVerify, agentHotkeyAndVerify, agentMoveRelative, agentMoveRelativeSmooth, agentTypeAndWaitStable, agentReleaseAllModifiers, agentRecordMouseTrail, agentReplayMouseTrail, clipboardReadText, clipboardWriteText, clipboardReadHtml, clipboardWriteHtml, clipboardReadImage, clipboardFormats, clipboardClear, processList, processFind, processIsRunning, processKill, processLaunch, processLaunchAndWait, processForegroundPid, sysCpuCount, sysOsInfo, sysMemoryInfo, sysUptime, sysUsername, sysHomeDir, sysTempDir, recorderStart, recorderStop, recorderIsRecording, recorderMouseMove, recorderMouseButton, recorderKeyEvent, recorderReplay, hooksStart, hooksStop, hooksIsActive, hooksDrainEvents, hooksEventCount, templateFindOnScreen, templateFindAllOnScreen, templateWaitFor, screenCapturePng, screenCaptureJpeg, screenSaveScreenshot, mouseMoveRelative, mouseMoveRelativeSmooth, mouseRightClick, mouseMiddleClick, mouseHover, mouseDistanceTo, mouseMoveThroughPoints, mouseGestureCircle, mouseGestureSwipe, mouseGestureDragPath, mouseGestureSpiral, mouseGestureZigzag, mouseGestureRectangle, waitForText, waitForTextAndClick, watchRegionOnce, windowFindByProcess, windowFindByPid, windowSetAlwaysOnTop, windowSetOpacity, windowGetBounds, windowIsForeground, windowBringToFront, windowWaitFor, windowCenter, windowCapture, windowCaptureJpeg, windowSendClick, windowSendKey, getPlatform, getVersion, delay, parallelExecute, interleavedExecute, ocrRecognize, ocrFindText, ocrClickText } = nativeBinding
|
|
314
|
+
|
|
315
|
+
module.exports.ensureDpiAwareness = ensureDpiAwareness
|
|
316
|
+
module.exports.mouseMove = mouseMove
|
|
317
|
+
module.exports.mouseGetPosition = mouseGetPosition
|
|
318
|
+
module.exports.mouseMoveSmooth = mouseMoveSmooth
|
|
319
|
+
module.exports.mouseMoveHumanized = mouseMoveHumanized
|
|
320
|
+
module.exports.mouseClick = mouseClick
|
|
321
|
+
module.exports.mouseDoubleClick = mouseDoubleClick
|
|
322
|
+
module.exports.mouseTripleClick = mouseTripleClick
|
|
323
|
+
module.exports.mouseDown = mouseDown
|
|
324
|
+
module.exports.mouseUp = mouseUp
|
|
325
|
+
module.exports.mouseScroll = mouseScroll
|
|
326
|
+
module.exports.mouseScrollSmooth = mouseScrollSmooth
|
|
327
|
+
module.exports.mouseDrag = mouseDrag
|
|
328
|
+
module.exports.mouseClickAt = mouseClickAt
|
|
329
|
+
module.exports.mouseClickObserved = mouseClickObserved
|
|
330
|
+
module.exports.keyboardType = keyboardType
|
|
331
|
+
module.exports.keyboardTypeHumanized = keyboardTypeHumanized
|
|
332
|
+
module.exports.keyboardPress = keyboardPress
|
|
333
|
+
module.exports.keyboardDown = keyboardDown
|
|
334
|
+
module.exports.keyboardUp = keyboardUp
|
|
335
|
+
module.exports.keyboardHotkey = keyboardHotkey
|
|
336
|
+
module.exports.keyboardTap = keyboardTap
|
|
337
|
+
module.exports.keyboardIsPressed = keyboardIsPressed
|
|
338
|
+
module.exports.keyboardAllKeys = keyboardAllKeys
|
|
339
|
+
module.exports.keyboardTypeBatch = keyboardTypeBatch
|
|
340
|
+
module.exports.keyboardHotkeyString = keyboardHotkeyString
|
|
341
|
+
module.exports.keyboardSequence = keyboardSequence
|
|
342
|
+
module.exports.keyboardTypeWithModifiers = keyboardTypeWithModifiers
|
|
343
|
+
module.exports.keyboardIsToggled = keyboardIsToggled
|
|
344
|
+
module.exports.keyboardToggleKey = keyboardToggleKey
|
|
345
|
+
module.exports.keyboardArePressed = keyboardArePressed
|
|
346
|
+
module.exports.keyboardWaitForKey = keyboardWaitForKey
|
|
347
|
+
module.exports.keyboardWaitForKeyRelease = keyboardWaitForKeyRelease
|
|
348
|
+
module.exports.screenSize = screenSize
|
|
349
|
+
module.exports.screenPixelColor = screenPixelColor
|
|
350
|
+
module.exports.screenCapture = screenCapture
|
|
351
|
+
module.exports.screenCaptureBgra = screenCaptureBgra
|
|
352
|
+
module.exports.screenDisplays = screenDisplays
|
|
353
|
+
module.exports.screenFindColor = screenFindColor
|
|
354
|
+
module.exports.windowGetActive = windowGetActive
|
|
355
|
+
module.exports.windowGetAll = windowGetAll
|
|
356
|
+
module.exports.windowFind = windowFind
|
|
357
|
+
module.exports.windowFocus = windowFocus
|
|
358
|
+
module.exports.windowFocusByTitle = windowFocusByTitle
|
|
359
|
+
module.exports.windowResize = windowResize
|
|
360
|
+
module.exports.windowMove = windowMove
|
|
361
|
+
module.exports.windowMinimize = windowMinimize
|
|
362
|
+
module.exports.windowMaximize = windowMaximize
|
|
363
|
+
module.exports.windowRestore = windowRestore
|
|
364
|
+
module.exports.windowClose = windowClose
|
|
365
|
+
module.exports.windowSetBounds = windowSetBounds
|
|
366
|
+
module.exports.safetyEnableFailsafe = safetyEnableFailsafe
|
|
367
|
+
module.exports.safetyDisableFailsafe = safetyDisableFailsafe
|
|
368
|
+
module.exports.safetyIsFailsafeEnabled = safetyIsFailsafeEnabled
|
|
369
|
+
module.exports.safetySetRateLimit = safetySetRateLimit
|
|
370
|
+
module.exports.safetyDisableRateLimit = safetyDisableRateLimit
|
|
371
|
+
module.exports.safetyEmergencyStop = safetyEmergencyStop
|
|
372
|
+
module.exports.safetyIsStopped = safetyIsStopped
|
|
373
|
+
module.exports.safetyReset = safetyReset
|
|
374
|
+
module.exports.streamStart = streamStart
|
|
375
|
+
module.exports.streamStop = streamStop
|
|
376
|
+
module.exports.streamIsRunning = streamIsRunning
|
|
377
|
+
module.exports.streamGetLatestFrame = streamGetLatestFrame
|
|
378
|
+
module.exports.streamGetRecentFrames = streamGetRecentFrames
|
|
379
|
+
module.exports.streamWaitForFrame = streamWaitForFrame
|
|
380
|
+
module.exports.streamGetStats = streamGetStats
|
|
381
|
+
module.exports.audioStreamStart = audioStreamStart
|
|
382
|
+
module.exports.audioStreamStop = audioStreamStop
|
|
383
|
+
module.exports.audioStreamIsRunning = audioStreamIsRunning
|
|
384
|
+
module.exports.audioStreamGetFormat = audioStreamGetFormat
|
|
385
|
+
module.exports.audioStreamGetLatestChunk = audioStreamGetLatestChunk
|
|
386
|
+
module.exports.audioStreamGetRecentChunks = audioStreamGetRecentChunks
|
|
387
|
+
module.exports.audioStreamDrainChunks = audioStreamDrainChunks
|
|
388
|
+
module.exports.audioStreamGetStats = audioStreamGetStats
|
|
389
|
+
module.exports.micStreamStart = micStreamStart
|
|
390
|
+
module.exports.micStreamStop = micStreamStop
|
|
391
|
+
module.exports.micStreamIsRunning = micStreamIsRunning
|
|
392
|
+
module.exports.micStreamGetFormat = micStreamGetFormat
|
|
393
|
+
module.exports.micStreamGetLatestChunk = micStreamGetLatestChunk
|
|
394
|
+
module.exports.micStreamGetRecentChunks = micStreamGetRecentChunks
|
|
395
|
+
module.exports.micStreamDrainChunks = micStreamDrainChunks
|
|
396
|
+
module.exports.micStreamGetStats = micStreamGetStats
|
|
397
|
+
module.exports.speakerStart = speakerStart
|
|
398
|
+
module.exports.speakerStop = speakerStop
|
|
399
|
+
module.exports.speakerIsRunning = speakerIsRunning
|
|
400
|
+
module.exports.speakerWrite = speakerWrite
|
|
401
|
+
module.exports.speakerClear = speakerClear
|
|
402
|
+
module.exports.speakerGetStats = speakerGetStats
|
|
403
|
+
module.exports.visionDiff = visionDiff
|
|
404
|
+
module.exports.visionAnalyzeGrid = visionAnalyzeGrid
|
|
405
|
+
module.exports.visionWaitForChange = visionWaitForChange
|
|
406
|
+
module.exports.visionWaitForStable = visionWaitForStable
|
|
407
|
+
module.exports.visionPerceptualHash = visionPerceptualHash
|
|
408
|
+
module.exports.visionHashDistance = visionHashDistance
|
|
409
|
+
module.exports.visionFindAllColors = visionFindAllColors
|
|
410
|
+
module.exports.visionFindColorClusters = visionFindColorClusters
|
|
411
|
+
module.exports.agentExecuteBatch = agentExecuteBatch
|
|
412
|
+
module.exports.agentClickAndVerify = agentClickAndVerify
|
|
413
|
+
module.exports.agentHotkeyAndVerify = agentHotkeyAndVerify
|
|
414
|
+
module.exports.agentMoveRelative = agentMoveRelative
|
|
415
|
+
module.exports.agentMoveRelativeSmooth = agentMoveRelativeSmooth
|
|
416
|
+
module.exports.agentTypeAndWaitStable = agentTypeAndWaitStable
|
|
417
|
+
module.exports.agentReleaseAllModifiers = agentReleaseAllModifiers
|
|
418
|
+
module.exports.agentRecordMouseTrail = agentRecordMouseTrail
|
|
419
|
+
module.exports.agentReplayMouseTrail = agentReplayMouseTrail
|
|
420
|
+
module.exports.clipboardReadText = clipboardReadText
|
|
421
|
+
module.exports.clipboardWriteText = clipboardWriteText
|
|
422
|
+
module.exports.clipboardReadHtml = clipboardReadHtml
|
|
423
|
+
module.exports.clipboardWriteHtml = clipboardWriteHtml
|
|
424
|
+
module.exports.clipboardReadImage = clipboardReadImage
|
|
425
|
+
module.exports.clipboardFormats = clipboardFormats
|
|
426
|
+
module.exports.clipboardClear = clipboardClear
|
|
427
|
+
module.exports.processList = processList
|
|
428
|
+
module.exports.processFind = processFind
|
|
429
|
+
module.exports.processIsRunning = processIsRunning
|
|
430
|
+
module.exports.processKill = processKill
|
|
431
|
+
module.exports.processLaunch = processLaunch
|
|
432
|
+
module.exports.processLaunchAndWait = processLaunchAndWait
|
|
433
|
+
module.exports.processForegroundPid = processForegroundPid
|
|
434
|
+
module.exports.sysCpuCount = sysCpuCount
|
|
435
|
+
module.exports.sysOsInfo = sysOsInfo
|
|
436
|
+
module.exports.sysMemoryInfo = sysMemoryInfo
|
|
437
|
+
module.exports.sysUptime = sysUptime
|
|
438
|
+
module.exports.sysUsername = sysUsername
|
|
439
|
+
module.exports.sysHomeDir = sysHomeDir
|
|
440
|
+
module.exports.sysTempDir = sysTempDir
|
|
441
|
+
module.exports.recorderStart = recorderStart
|
|
442
|
+
module.exports.recorderStop = recorderStop
|
|
443
|
+
module.exports.recorderIsRecording = recorderIsRecording
|
|
444
|
+
module.exports.recorderMouseMove = recorderMouseMove
|
|
445
|
+
module.exports.recorderMouseButton = recorderMouseButton
|
|
446
|
+
module.exports.recorderKeyEvent = recorderKeyEvent
|
|
447
|
+
module.exports.recorderReplay = recorderReplay
|
|
448
|
+
module.exports.hooksStart = hooksStart
|
|
449
|
+
module.exports.hooksStop = hooksStop
|
|
450
|
+
module.exports.hooksIsActive = hooksIsActive
|
|
451
|
+
module.exports.hooksDrainEvents = hooksDrainEvents
|
|
452
|
+
module.exports.hooksEventCount = hooksEventCount
|
|
453
|
+
module.exports.templateFindOnScreen = templateFindOnScreen
|
|
454
|
+
module.exports.templateFindAllOnScreen = templateFindAllOnScreen
|
|
455
|
+
module.exports.templateWaitFor = templateWaitFor
|
|
456
|
+
module.exports.screenCapturePng = screenCapturePng
|
|
457
|
+
module.exports.screenCaptureJpeg = screenCaptureJpeg
|
|
458
|
+
module.exports.screenSaveScreenshot = screenSaveScreenshot
|
|
459
|
+
module.exports.mouseMoveRelative = mouseMoveRelative
|
|
460
|
+
module.exports.mouseMoveRelativeSmooth = mouseMoveRelativeSmooth
|
|
461
|
+
module.exports.mouseRightClick = mouseRightClick
|
|
462
|
+
module.exports.mouseMiddleClick = mouseMiddleClick
|
|
463
|
+
module.exports.mouseHover = mouseHover
|
|
464
|
+
module.exports.mouseDistanceTo = mouseDistanceTo
|
|
465
|
+
module.exports.mouseMoveThroughPoints = mouseMoveThroughPoints
|
|
466
|
+
module.exports.mouseGestureCircle = mouseGestureCircle
|
|
467
|
+
module.exports.mouseGestureSwipe = mouseGestureSwipe
|
|
468
|
+
module.exports.mouseGestureDragPath = mouseGestureDragPath
|
|
469
|
+
module.exports.mouseGestureSpiral = mouseGestureSpiral
|
|
470
|
+
module.exports.mouseGestureZigzag = mouseGestureZigzag
|
|
471
|
+
module.exports.mouseGestureRectangle = mouseGestureRectangle
|
|
472
|
+
module.exports.waitForText = waitForText
|
|
473
|
+
module.exports.waitForTextAndClick = waitForTextAndClick
|
|
474
|
+
module.exports.watchRegionOnce = watchRegionOnce
|
|
475
|
+
module.exports.windowFindByProcess = windowFindByProcess
|
|
476
|
+
module.exports.windowFindByPid = windowFindByPid
|
|
477
|
+
module.exports.windowSetAlwaysOnTop = windowSetAlwaysOnTop
|
|
478
|
+
module.exports.windowSetOpacity = windowSetOpacity
|
|
479
|
+
module.exports.windowGetBounds = windowGetBounds
|
|
480
|
+
module.exports.windowIsForeground = windowIsForeground
|
|
481
|
+
module.exports.windowBringToFront = windowBringToFront
|
|
482
|
+
module.exports.windowWaitFor = windowWaitFor
|
|
483
|
+
module.exports.windowCenter = windowCenter
|
|
484
|
+
module.exports.windowCapture = windowCapture
|
|
485
|
+
module.exports.windowCaptureJpeg = windowCaptureJpeg
|
|
486
|
+
module.exports.windowSendClick = windowSendClick
|
|
487
|
+
module.exports.windowSendKey = windowSendKey
|
|
488
|
+
module.exports.getPlatform = getPlatform
|
|
489
|
+
module.exports.getVersion = getVersion
|
|
490
|
+
module.exports.delay = delay
|
|
491
|
+
module.exports.parallelExecute = parallelExecute
|
|
492
|
+
module.exports.interleavedExecute = interleavedExecute
|
|
493
|
+
module.exports.ocrRecognize = ocrRecognize
|
|
494
|
+
module.exports.ocrFindText = ocrFindText
|
|
495
|
+
module.exports.ocrClickText = ocrClickText
|
package/package.json
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "stelo",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Give your AI hands. Computer-use SDK for building agents that see, click, type and hear — native Rust performance, zero compromise.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"napi": {
|
|
8
|
+
"name": "stelo",
|
|
9
|
+
"triples": {
|
|
10
|
+
"defaults": true,
|
|
11
|
+
"additional": [
|
|
12
|
+
"aarch64-apple-darwin",
|
|
13
|
+
"aarch64-unknown-linux-gnu",
|
|
14
|
+
"aarch64-unknown-linux-musl",
|
|
15
|
+
"x86_64-unknown-linux-musl",
|
|
16
|
+
"aarch64-pc-windows-msvc"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "napi build --release --platform && tsc",
|
|
22
|
+
"build:debug": "napi build --platform && tsc",
|
|
23
|
+
"build:native": "napi build --release --platform",
|
|
24
|
+
"build:ts": "tsc",
|
|
25
|
+
"prepublishOnly": "napi prepublish -t npm",
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"test:watch": "vitest",
|
|
28
|
+
"lint": "eslint ts/ --ext .ts",
|
|
29
|
+
"clean": "rimraf dist index.js index.d.ts *.node",
|
|
30
|
+
"artifacts": "napi artifacts",
|
|
31
|
+
"version": "napi version"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"computer-use",
|
|
35
|
+
"ai-agent",
|
|
36
|
+
"agentic",
|
|
37
|
+
"automation",
|
|
38
|
+
"mouse",
|
|
39
|
+
"keyboard",
|
|
40
|
+
"screen-capture",
|
|
41
|
+
"window-management",
|
|
42
|
+
"desktop-automation",
|
|
43
|
+
"cortex",
|
|
44
|
+
"llm",
|
|
45
|
+
"gemini",
|
|
46
|
+
"openai",
|
|
47
|
+
"robotjs",
|
|
48
|
+
"input-simulation",
|
|
49
|
+
"cross-platform",
|
|
50
|
+
"native",
|
|
51
|
+
"napi",
|
|
52
|
+
"rust",
|
|
53
|
+
"hotkey",
|
|
54
|
+
"recording",
|
|
55
|
+
"playback"
|
|
56
|
+
],
|
|
57
|
+
"author": "Stelo Contributors",
|
|
58
|
+
"license": "Apache-2.0",
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": ">= 18"
|
|
61
|
+
},
|
|
62
|
+
"files": [
|
|
63
|
+
"dist/",
|
|
64
|
+
"index.js",
|
|
65
|
+
"index.d.ts",
|
|
66
|
+
"package.json",
|
|
67
|
+
"README.md",
|
|
68
|
+
"LICENSE"
|
|
69
|
+
],
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@napi-rs/cli": "^2.18.4",
|
|
72
|
+
"@types/node": "^20.19.35",
|
|
73
|
+
"@typescript-eslint/eslint-plugin": "^6.19.1",
|
|
74
|
+
"@typescript-eslint/parser": "^6.19.1",
|
|
75
|
+
"eslint": "^8.56.0",
|
|
76
|
+
"rimraf": "^5.0.5",
|
|
77
|
+
"ts-node": "^10.9.2",
|
|
78
|
+
"typescript": "^5.9.3",
|
|
79
|
+
"vitest": "^1.6.1"
|
|
80
|
+
},
|
|
81
|
+
"optionalDependencies": {
|
|
82
|
+
"stelo-win32-x64-msvc": "1.0.1",
|
|
83
|
+
"stelo-darwin-x64": "1.0.1",
|
|
84
|
+
"stelo-linux-x64-gnu": "1.0.1",
|
|
85
|
+
"stelo-darwin-arm64": "1.0.1",
|
|
86
|
+
"stelo-linux-arm64-gnu": "1.0.1",
|
|
87
|
+
"stelo-linux-arm64-musl": "1.0.1",
|
|
88
|
+
"stelo-linux-x64-musl": "1.0.1",
|
|
89
|
+
"stelo-win32-arm64-msvc": "1.0.1"
|
|
90
|
+
}
|
|
91
|
+
}
|