@auv-js/cli 0.0.22 → 0.0.24

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
@@ -19,6 +19,52 @@ import { startAuv } from '@auv-js/sdk/node'
19
19
  const daemon = await startAuv({ binaryPath: binaryPath() })
20
20
  ```
21
21
 
22
+ On macOS, the native binding exposes the same helper setup module as the CLI:
23
+
24
+ ```ts
25
+ import {
26
+ installMacosHelper,
27
+ macosHelperStatus,
28
+ openMacosHelperAccessibilitySettings,
29
+ openMacosHelperBackgroundItemsSettings,
30
+ uninstallMacosHelper,
31
+ } from '@auv-js/cli'
32
+
33
+ const before = await macosHelperStatus()
34
+ const installed = await installMacosHelper()
35
+
36
+ if (installed.state === 'requires-approval') {
37
+ openMacosHelperBackgroundItemsSettings()
38
+ }
39
+ else if (installed.state === 'running') {
40
+ openMacosHelperAccessibilitySettings()
41
+ }
42
+
43
+ // Removes only the helper app and its Accessibility decision. Enrollment is
44
+ // retained so a later reinstall does not require credential entry again.
45
+ await uninstallMacosHelper()
46
+ ```
47
+
48
+ `installMacosHelper()` validates and installs the embedded app under the
49
+ current user's AUV Application Support directory, then registers its embedded
50
+ LaunchAgent through `SMAppService`. It needs neither `sudo` nor an
51
+ administrator password. Development bindings report `helperEmbedded=false`;
52
+ official macOS release bindings carry the same signed and notarized helper app
53
+ as the CLI.
54
+
55
+ The CLI and every package that bundles `@auv-js/cli` are independent frontends
56
+ for one per-user helper. Any helper whose declared protocol range includes this
57
+ binding's protocol is usable, whatever its version. `installMacosHelper()`
58
+ replaces it only when it is older than the embedded helper or does not support
59
+ this protocol, and never downgrades it. If the installed helper dropped this
60
+ binding's protocol, status reports `frontend-outdated`: update this package
61
+ rather than the helper.
62
+
63
+ `uninstallMacosHelper()` waits for ServiceManagement to stop any in-flight
64
+ helper process, resets the helper bundle's Accessibility decision, and removes
65
+ only the installed app. It preserves enrollment and all other AUV Application
66
+ Support content.
67
+
22
68
  ## Electron packaging
23
69
 
24
70
  Do not execute the binary from inside `app.asar`. During packaging, copy the
package/binding.d.ts CHANGED
@@ -1,5 +1,27 @@
1
1
  /* auto-generated by NAPI-RS */
2
2
  /* eslint-disable */
3
+ /**
4
+ * Install and register the signed AUV Helper embedded in this build.
5
+ *
6
+ * The work runs off the JavaScript thread because archive verification and
7
+ * ServiceManagement registration perform blocking platform calls.
8
+ */
9
+ export declare function installMacosHelper(): Promise<MacosHelperStatus>
10
+
11
+ /**
12
+ * Inspect the AUV Helper installation used for locked macOS sessions.
13
+ *
14
+ * Signature validation and ServiceManagement inspection run off the
15
+ * JavaScript thread because they perform blocking platform calls.
16
+ */
17
+ export declare function macosHelperStatus(): Promise<MacosHelperStatus>
18
+
19
+ export interface MacosHelperStatus {
20
+ state: string
21
+ detail?: string
22
+ helperEmbedded: boolean
23
+ }
24
+
3
25
  /**
4
26
  * Return the version embedded into the native binding.
5
27
  *
@@ -7,3 +29,18 @@
7
29
  * a partially published release fails before it starts an AUV sidecar.
8
30
  */
9
31
  export declare function nativePackageVersion(): string
32
+
33
+ /** Open System Settings at Privacy & Security > Accessibility. */
34
+ export declare function openMacosHelperAccessibilitySettings(): void
35
+
36
+ /** Open System Settings at General > Login Items & Extensions. */
37
+ export declare function openMacosHelperBackgroundItemsSettings(): void
38
+
39
+ /**
40
+ * Unregister the helper, reset its Accessibility decision, and remove its app.
41
+ *
42
+ * Enrollment remains in the current user's login Keychain. The work runs off
43
+ * the JavaScript thread because it waits for ServiceManagement termination and
44
+ * performs filesystem and TCC operations.
45
+ */
46
+ export declare function uninstallMacosHelper(): Promise<MacosHelperStatus>
package/binding.js CHANGED
@@ -81,8 +81,8 @@ function requireNative() {
81
81
  try {
82
82
  const binding = require('@auv-js/cli-android-arm64')
83
83
  const bindingPackageVersion = require('@auv-js/cli-android-arm64/package.json').version
84
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
85
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
84
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
85
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
86
86
  }
87
87
  return binding
88
88
  } catch (e) {
@@ -97,8 +97,8 @@ function requireNative() {
97
97
  try {
98
98
  const binding = require('@auv-js/cli-android-arm-eabi')
99
99
  const bindingPackageVersion = require('@auv-js/cli-android-arm-eabi/package.json').version
100
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
101
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
100
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
101
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
102
102
  }
103
103
  return binding
104
104
  } catch (e) {
@@ -118,8 +118,8 @@ function requireNative() {
118
118
  try {
119
119
  const binding = require('@auv-js/cli-win32-x64-gnu')
120
120
  const bindingPackageVersion = require('@auv-js/cli-win32-x64-gnu/package.json').version
121
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
122
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
121
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
122
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
123
123
  }
124
124
  return binding
125
125
  } catch (e) {
@@ -134,8 +134,8 @@ function requireNative() {
134
134
  try {
135
135
  const binding = require('@auv-js/cli-win32-x64-msvc')
136
136
  const bindingPackageVersion = require('@auv-js/cli-win32-x64-msvc/package.json').version
137
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
138
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
137
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
138
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
139
139
  }
140
140
  return binding
141
141
  } catch (e) {
@@ -151,8 +151,8 @@ function requireNative() {
151
151
  try {
152
152
  const binding = require('@auv-js/cli-win32-ia32-msvc')
153
153
  const bindingPackageVersion = require('@auv-js/cli-win32-ia32-msvc/package.json').version
154
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
155
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
154
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
155
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
156
156
  }
157
157
  return binding
158
158
  } catch (e) {
@@ -167,8 +167,8 @@ function requireNative() {
167
167
  try {
168
168
  const binding = require('@auv-js/cli-win32-arm64-msvc')
169
169
  const bindingPackageVersion = require('@auv-js/cli-win32-arm64-msvc/package.json').version
170
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
171
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
170
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
171
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
172
172
  }
173
173
  return binding
174
174
  } catch (e) {
@@ -186,8 +186,8 @@ function requireNative() {
186
186
  try {
187
187
  const binding = require('@auv-js/cli-darwin-universal')
188
188
  const bindingPackageVersion = require('@auv-js/cli-darwin-universal/package.json').version
189
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
190
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
189
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
190
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
191
191
  }
192
192
  return binding
193
193
  } catch (e) {
@@ -202,8 +202,8 @@ function requireNative() {
202
202
  try {
203
203
  const binding = require('@auv-js/cli-darwin-x64')
204
204
  const bindingPackageVersion = require('@auv-js/cli-darwin-x64/package.json').version
205
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
206
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
205
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
206
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
207
207
  }
208
208
  return binding
209
209
  } catch (e) {
@@ -218,8 +218,8 @@ function requireNative() {
218
218
  try {
219
219
  const binding = require('@auv-js/cli-darwin-arm64')
220
220
  const bindingPackageVersion = require('@auv-js/cli-darwin-arm64/package.json').version
221
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
222
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
221
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
222
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
223
223
  }
224
224
  return binding
225
225
  } catch (e) {
@@ -238,8 +238,8 @@ function requireNative() {
238
238
  try {
239
239
  const binding = require('@auv-js/cli-freebsd-x64')
240
240
  const bindingPackageVersion = require('@auv-js/cli-freebsd-x64/package.json').version
241
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
242
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
241
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
242
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
243
243
  }
244
244
  return binding
245
245
  } catch (e) {
@@ -254,8 +254,8 @@ function requireNative() {
254
254
  try {
255
255
  const binding = require('@auv-js/cli-freebsd-arm64')
256
256
  const bindingPackageVersion = require('@auv-js/cli-freebsd-arm64/package.json').version
257
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
258
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
257
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
258
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
259
259
  }
260
260
  return binding
261
261
  } catch (e) {
@@ -275,8 +275,8 @@ function requireNative() {
275
275
  try {
276
276
  const binding = require('@auv-js/cli-linux-x64-musl')
277
277
  const bindingPackageVersion = require('@auv-js/cli-linux-x64-musl/package.json').version
278
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
279
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
278
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
279
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
280
280
  }
281
281
  return binding
282
282
  } catch (e) {
@@ -291,8 +291,8 @@ function requireNative() {
291
291
  try {
292
292
  const binding = require('@auv-js/cli-linux-x64-gnu')
293
293
  const bindingPackageVersion = require('@auv-js/cli-linux-x64-gnu/package.json').version
294
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
295
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
294
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
295
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
296
296
  }
297
297
  return binding
298
298
  } catch (e) {
@@ -309,8 +309,8 @@ function requireNative() {
309
309
  try {
310
310
  const binding = require('@auv-js/cli-linux-arm64-musl')
311
311
  const bindingPackageVersion = require('@auv-js/cli-linux-arm64-musl/package.json').version
312
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
313
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
312
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
313
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
314
314
  }
315
315
  return binding
316
316
  } catch (e) {
@@ -325,8 +325,8 @@ function requireNative() {
325
325
  try {
326
326
  const binding = require('@auv-js/cli-linux-arm64-gnu')
327
327
  const bindingPackageVersion = require('@auv-js/cli-linux-arm64-gnu/package.json').version
328
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
329
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
328
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
329
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
330
330
  }
331
331
  return binding
332
332
  } catch (e) {
@@ -343,8 +343,8 @@ function requireNative() {
343
343
  try {
344
344
  const binding = require('@auv-js/cli-linux-arm-musleabihf')
345
345
  const bindingPackageVersion = require('@auv-js/cli-linux-arm-musleabihf/package.json').version
346
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
347
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
346
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
347
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
348
348
  }
349
349
  return binding
350
350
  } catch (e) {
@@ -359,8 +359,8 @@ function requireNative() {
359
359
  try {
360
360
  const binding = require('@auv-js/cli-linux-arm-gnueabihf')
361
361
  const bindingPackageVersion = require('@auv-js/cli-linux-arm-gnueabihf/package.json').version
362
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
363
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
362
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
363
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
364
364
  }
365
365
  return binding
366
366
  } catch (e) {
@@ -377,8 +377,8 @@ function requireNative() {
377
377
  try {
378
378
  const binding = require('@auv-js/cli-linux-loong64-musl')
379
379
  const bindingPackageVersion = require('@auv-js/cli-linux-loong64-musl/package.json').version
380
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
381
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
380
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
381
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
382
382
  }
383
383
  return binding
384
384
  } catch (e) {
@@ -393,8 +393,8 @@ function requireNative() {
393
393
  try {
394
394
  const binding = require('@auv-js/cli-linux-loong64-gnu')
395
395
  const bindingPackageVersion = require('@auv-js/cli-linux-loong64-gnu/package.json').version
396
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
397
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
396
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
397
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
398
398
  }
399
399
  return binding
400
400
  } catch (e) {
@@ -411,8 +411,8 @@ function requireNative() {
411
411
  try {
412
412
  const binding = require('@auv-js/cli-linux-riscv64-musl')
413
413
  const bindingPackageVersion = require('@auv-js/cli-linux-riscv64-musl/package.json').version
414
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
415
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
414
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
415
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
416
416
  }
417
417
  return binding
418
418
  } catch (e) {
@@ -427,8 +427,8 @@ function requireNative() {
427
427
  try {
428
428
  const binding = require('@auv-js/cli-linux-riscv64-gnu')
429
429
  const bindingPackageVersion = require('@auv-js/cli-linux-riscv64-gnu/package.json').version
430
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
431
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
430
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
431
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
432
432
  }
433
433
  return binding
434
434
  } catch (e) {
@@ -444,8 +444,8 @@ function requireNative() {
444
444
  try {
445
445
  const binding = require('@auv-js/cli-linux-ppc64-gnu')
446
446
  const bindingPackageVersion = require('@auv-js/cli-linux-ppc64-gnu/package.json').version
447
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
448
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
447
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
448
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
449
449
  }
450
450
  return binding
451
451
  } catch (e) {
@@ -460,8 +460,8 @@ function requireNative() {
460
460
  try {
461
461
  const binding = require('@auv-js/cli-linux-s390x-gnu')
462
462
  const bindingPackageVersion = require('@auv-js/cli-linux-s390x-gnu/package.json').version
463
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
464
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
463
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
464
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
465
465
  }
466
466
  return binding
467
467
  } catch (e) {
@@ -480,8 +480,8 @@ function requireNative() {
480
480
  try {
481
481
  const binding = require('@auv-js/cli-openharmony-arm64')
482
482
  const bindingPackageVersion = require('@auv-js/cli-openharmony-arm64/package.json').version
483
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
484
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
483
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
484
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
485
485
  }
486
486
  return binding
487
487
  } catch (e) {
@@ -496,8 +496,8 @@ function requireNative() {
496
496
  try {
497
497
  const binding = require('@auv-js/cli-openharmony-x64')
498
498
  const bindingPackageVersion = require('@auv-js/cli-openharmony-x64/package.json').version
499
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
500
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
499
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
500
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
501
501
  }
502
502
  return binding
503
503
  } catch (e) {
@@ -512,8 +512,8 @@ function requireNative() {
512
512
  try {
513
513
  const binding = require('@auv-js/cli-openharmony-arm')
514
514
  const bindingPackageVersion = require('@auv-js/cli-openharmony-arm/package.json').version
515
- if (bindingPackageVersion !== '0.0.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
516
- throw new Error(`Native binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
515
+ if (bindingPackageVersion !== '0.0.22' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
516
+ throw new Error(`Native binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
517
517
  }
518
518
  return binding
519
519
  } catch (e) {
@@ -652,8 +652,8 @@ if (!nativeBinding || forceWasi) {
652
652
  if (!candidateFailed) {
653
653
  if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
654
654
  const bindingPackageVersion = require('@auv-js/cli-wasm32-wasi/package.json').version
655
- if (bindingPackageVersion !== '0.0.6') {
656
- throw new Error(`WASI binding package version mismatch, expected 0.0.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
655
+ if (bindingPackageVersion !== '0.0.22') {
656
+ throw new Error(`WASI binding package version mismatch, expected 0.0.22 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
657
657
  }
658
658
  }
659
659
  wasiBinding = require('@auv-js/cli-wasm32-wasi')
@@ -703,5 +703,10 @@ if (!nativeBinding) {
703
703
  throw new Error(`Failed to load native binding`)
704
704
  }
705
705
 
706
- const { nativePackageVersion } = nativeBinding
706
+ const { installMacosHelper, macosHelperStatus, nativePackageVersion, openMacosHelperAccessibilitySettings, openMacosHelperBackgroundItemsSettings, uninstallMacosHelper } = nativeBinding
707
+ export { installMacosHelper }
708
+ export { macosHelperStatus }
707
709
  export { nativePackageVersion }
710
+ export { openMacosHelperAccessibilitySettings }
711
+ export { openMacosHelperBackgroundItemsSettings }
712
+ export { uninstallMacosHelper }
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  import { AuvBinaryError, binaryPath } from "./binary.js";
2
- export * from "../binding.js";
3
- export { AuvBinaryError, binaryPath };
2
+ import { MacosHelperState, MacosHelperStatus, installMacosHelper, macosHelperStatus, openMacosHelperAccessibilitySettings, openMacosHelperBackgroundItemsSettings, uninstallMacosHelper } from "./setup.js";
3
+ import { nativePackageVersion } from "../binding.js";
4
+ export { AuvBinaryError, MacosHelperState, MacosHelperStatus, binaryPath, installMacosHelper, macosHelperStatus, nativePackageVersion, openMacosHelperAccessibilitySettings, openMacosHelperBackgroundItemsSettings, uninstallMacosHelper };
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { AuvBinaryError, binaryPath } from "./binary.js";
2
+ import { installMacosHelper, macosHelperStatus, openMacosHelperAccessibilitySettings, openMacosHelperBackgroundItemsSettings, uninstallMacosHelper } from "./setup.js";
2
3
  import { readFileSync } from "node:fs";
3
- import { nativePackageVersion } from "../binding.js";
4
- export * from "../binding.js";
4
+ import { nativePackageVersion, nativePackageVersion as nativePackageVersion$1 } from "../binding.js";
5
5
  //#region src-js/index.ts
6
6
  const packageVersion = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
7
- const bindingVersion = nativePackageVersion();
7
+ const bindingVersion = nativePackageVersion$1();
8
8
  if (bindingVersion !== packageVersion) console.warn(`The AUV native binding version (${bindingVersion}) does not match @auv-js/cli (${packageVersion}). This may cause unexpected behavior.`);
9
9
  //#endregion
10
- export { AuvBinaryError, binaryPath };
10
+ export { AuvBinaryError, binaryPath, installMacosHelper, macosHelperStatus, nativePackageVersion, openMacosHelperAccessibilitySettings, openMacosHelperBackgroundItemsSettings, uninstallMacosHelper };
11
11
 
12
12
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src-js/index.ts"],"sourcesContent":["import { readFileSync } from 'node:fs'\n\nimport { nativePackageVersion } from '../binding.js'\n\nconst packageVersion = (JSON.parse(\n readFileSync(new URL('../package.json', import.meta.url), 'utf8'),\n) as { version: string }).version\n\nconst bindingVersion = nativePackageVersion()\nif (bindingVersion !== packageVersion) {\n console.warn(`The AUV native binding version (${bindingVersion}) does not match @auv-js/cli (${packageVersion}). This may cause unexpected behavior.`)\n}\n\nexport * from '../binding.js'\nexport * from './binary.js'\n"],"mappings":";;;;;AAIA,MAAM,iBAAkB,KAAK,MAC3B,aAAa,IAAI,IAAI,mBAAmB,OAAO,KAAK,GAAG,GAAG,MAAM,CAClE,CAAC,CAAyB;AAE1B,MAAM,iBAAiB,qBAAqB;AAC5C,IAAI,mBAAmB,gBACrB,QAAQ,KAAK,mCAAmC,eAAe,gCAAgC,eAAe,uCAAuC"}
1
+ {"version":3,"file":"index.js","names":["nativePackageVersion"],"sources":["../src-js/index.ts"],"sourcesContent":["import { readFileSync } from 'node:fs'\n\nimport { nativePackageVersion } from '../binding.js'\n\nconst packageVersion = (JSON.parse(\n readFileSync(new URL('../package.json', import.meta.url), 'utf8'),\n) as { version: string }).version\n\nconst bindingVersion = nativePackageVersion()\nif (bindingVersion !== packageVersion) {\n console.warn(`The AUV native binding version (${bindingVersion}) does not match @auv-js/cli (${packageVersion}). This may cause unexpected behavior.`)\n}\n\nexport { nativePackageVersion } from '../binding.js'\nexport * from './binary.js'\nexport * from './setup.js'\n"],"mappings":";;;;;AAIA,MAAM,iBAAkB,KAAK,MAC3B,aAAa,IAAI,IAAI,mBAAmB,OAAO,KAAK,GAAG,GAAG,MAAM,CAClE,CAAC,CAAyB;AAE1B,MAAM,iBAAiBA,uBAAqB;AAC5C,IAAI,mBAAmB,gBACrB,QAAQ,KAAK,mCAAmC,eAAe,gCAAgC,eAAe,uCAAuC"}
@@ -0,0 +1,19 @@
1
+ import { MacosHelperStatus as MacosHelperStatus$1 } from "../binding.js";
2
+ //#region src-js/setup.d.ts
3
+ type MacosHelperState = 'busy' | 'frontend-outdated' | 'installed' | 'invalid' | 'not-installed' | 'requires-approval' | 'running' | 'unsupported' | 'update-required';
4
+ interface MacosHelperStatus extends Omit<MacosHelperStatus$1, 'state'> {
5
+ state: MacosHelperState;
6
+ }
7
+ /** Install and register the signed helper embedded in this build. */
8
+ declare function installMacosHelper(): Promise<MacosHelperStatus>;
9
+ /** Inspect the installed AUV Helper identity and current-user readiness. */
10
+ declare function macosHelperStatus(): Promise<MacosHelperStatus>;
11
+ /** Open System Settings at Privacy & Security > Accessibility. */
12
+ declare function openMacosHelperAccessibilitySettings(): void;
13
+ /** Open System Settings at General > Login Items & Extensions. */
14
+ declare function openMacosHelperBackgroundItemsSettings(): void;
15
+ /** Unregister the helper, reset Accessibility, and remove only its app bundle. */
16
+ declare function uninstallMacosHelper(): Promise<MacosHelperStatus>;
17
+ //#endregion
18
+ export { MacosHelperState, MacosHelperStatus, installMacosHelper, macosHelperStatus, openMacosHelperAccessibilitySettings, openMacosHelperBackgroundItemsSettings, uninstallMacosHelper };
19
+ //# sourceMappingURL=setup.d.ts.map
package/dist/setup.js ADDED
@@ -0,0 +1,35 @@
1
+ import { installMacosHelper as installMacosHelper$1, macosHelperStatus as macosHelperStatus$1, openMacosHelperAccessibilitySettings as openMacosHelperAccessibilitySettings$1, openMacosHelperBackgroundItemsSettings as openMacosHelperBackgroundItemsSettings$1, uninstallMacosHelper as uninstallMacosHelper$1 } from "../binding.js";
2
+ import { isMacOS } from "std-env";
3
+ //#region src-js/setup.ts
4
+ /** Install and register the signed helper embedded in this build. */
5
+ async function installMacosHelper() {
6
+ requireMacOS();
7
+ return installMacosHelper$1();
8
+ }
9
+ /** Inspect the installed AUV Helper identity and current-user readiness. */
10
+ async function macosHelperStatus() {
11
+ requireMacOS();
12
+ return macosHelperStatus$1();
13
+ }
14
+ /** Open System Settings at Privacy & Security > Accessibility. */
15
+ function openMacosHelperAccessibilitySettings() {
16
+ requireMacOS();
17
+ openMacosHelperAccessibilitySettings$1();
18
+ }
19
+ /** Open System Settings at General > Login Items & Extensions. */
20
+ function openMacosHelperBackgroundItemsSettings() {
21
+ requireMacOS();
22
+ openMacosHelperBackgroundItemsSettings$1();
23
+ }
24
+ /** Unregister the helper, reset Accessibility, and remove only its app bundle. */
25
+ async function uninstallMacosHelper() {
26
+ requireMacOS();
27
+ return uninstallMacosHelper$1();
28
+ }
29
+ function requireMacOS() {
30
+ if (!isMacOS) throw new Error("AUV Helper setup is available only on macOS.");
31
+ }
32
+ //#endregion
33
+ export { installMacosHelper, macosHelperStatus, openMacosHelperAccessibilitySettings, openMacosHelperBackgroundItemsSettings, uninstallMacosHelper };
34
+
35
+ //# sourceMappingURL=setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.js","names":["installNativeMacosHelper","nativeMacosHelperStatus","uninstallNativeMacosHelper"],"sources":["../src-js/setup.ts"],"sourcesContent":["import type { MacosHelperStatus as NativeMacosHelperStatus } from '../binding.js'\n\nimport { isMacOS } from 'std-env'\n\nimport {\n installMacosHelper as installNativeMacosHelper,\n macosHelperStatus as nativeMacosHelperStatus,\n openMacosHelperAccessibilitySettings as openNativeMacosHelperAccessibilitySettings,\n openMacosHelperBackgroundItemsSettings as openNativeMacosHelperBackgroundItemsSettings,\n uninstallMacosHelper as uninstallNativeMacosHelper,\n} from '../binding.js'\n\nexport type MacosHelperState\n = | 'busy'\n | 'frontend-outdated'\n | 'installed'\n | 'invalid'\n | 'not-installed'\n | 'requires-approval'\n | 'running'\n | 'unsupported'\n | 'update-required'\n\nexport interface MacosHelperStatus extends Omit<NativeMacosHelperStatus, 'state'> {\n state: MacosHelperState\n}\n\n/** Install and register the signed helper embedded in this build. */\nexport async function installMacosHelper(): Promise<MacosHelperStatus> {\n requireMacOS()\n return installNativeMacosHelper() as Promise<MacosHelperStatus>\n}\n\n/** Inspect the installed AUV Helper identity and current-user readiness. */\nexport async function macosHelperStatus(): Promise<MacosHelperStatus> {\n requireMacOS()\n return nativeMacosHelperStatus() as Promise<MacosHelperStatus>\n}\n\n/** Open System Settings at Privacy & Security > Accessibility. */\nexport function openMacosHelperAccessibilitySettings(): void {\n requireMacOS()\n openNativeMacosHelperAccessibilitySettings()\n}\n\n/** Open System Settings at General > Login Items & Extensions. */\nexport function openMacosHelperBackgroundItemsSettings(): void {\n requireMacOS()\n openNativeMacosHelperBackgroundItemsSettings()\n}\n\n/** Unregister the helper, reset Accessibility, and remove only its app bundle. */\nexport async function uninstallMacosHelper(): Promise<MacosHelperStatus> {\n requireMacOS()\n return uninstallNativeMacosHelper() as Promise<MacosHelperStatus>\n}\n\nfunction requireMacOS(): void {\n if (!isMacOS) {\n throw new Error('AUV Helper setup is available only on macOS.')\n }\n}\n"],"mappings":";;;;AA4BA,eAAsB,qBAAiD;CACrE,aAAa;CACb,OAAOA,qBAAyB;AAClC;;AAGA,eAAsB,oBAAgD;CACpE,aAAa;CACb,OAAOC,oBAAwB;AACjC;;AAGA,SAAgB,uCAA6C;CAC3D,aAAa;CACb,uCAA2C;AAC7C;;AAGA,SAAgB,yCAA+C;CAC7D,aAAa;CACb,yCAA6C;AAC/C;;AAGA,eAAsB,uBAAmD;CACvE,aAAa;CACb,OAAOC,uBAA2B;AACpC;AAEA,SAAS,eAAqB;CAC5B,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,8CAA8C;AAElE"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@auv-js/cli",
3
3
  "type": "module",
4
- "version": "0.0.22",
4
+ "version": "0.0.24",
5
5
  "description": "NAPI bindings and the platform-matched AUV command-line executable",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -25,6 +25,10 @@
25
25
  "types": "./dist/binary.d.ts",
26
26
  "import": "./dist/binary.js"
27
27
  },
28
+ "./setup": {
29
+ "types": "./dist/setup.d.ts",
30
+ "import": "./dist/setup.js"
31
+ },
28
32
  "./package.json": "./package.json"
29
33
  },
30
34
  "main": "./dist/index.js",
@@ -52,12 +56,15 @@
52
56
  "x86_64-unknown-linux-gnu"
53
57
  ]
54
58
  },
59
+ "dependencies": {
60
+ "std-env": "4.2.0"
61
+ },
55
62
  "optionalDependencies": {
56
- "@auv-js/cli-darwin-arm64": "0.0.22",
57
- "@auv-js/cli-linux-arm64-gnu": "0.0.22",
58
- "@auv-js/cli-darwin-x64": "0.0.22",
59
- "@auv-js/cli-win32-x64-msvc": "0.0.22",
60
- "@auv-js/cli-linux-x64-gnu": "0.0.22"
63
+ "@auv-js/cli-darwin-arm64": "0.0.24",
64
+ "@auv-js/cli-linux-arm64-gnu": "0.0.24",
65
+ "@auv-js/cli-darwin-x64": "0.0.24",
66
+ "@auv-js/cli-win32-x64-msvc": "0.0.24",
67
+ "@auv-js/cli-linux-x64-gnu": "0.0.24"
61
68
  },
62
69
  "devDependencies": {
63
70
  "@emnapi/core": "^1.11.2",
@@ -72,8 +79,8 @@
72
79
  },
73
80
  "scripts": {
74
81
  "artifacts": "napi artifacts && tsx ./scripts/stage-platform-packages.ts ./artifacts",
75
- "build": "pnpm run build:js && napi build --platform --release --esm --js binding.js --dts binding.d.ts",
76
- "build:debug": "pnpm run build:js && napi build --platform --esm --js binding.js --dts binding.d.ts",
82
+ "build": "pnpm run build:js && napi build --platform --release --esm --js binding.js --dts binding.d.ts -- --locked",
83
+ "build:debug": "pnpm run build:js && napi build --platform --esm --js binding.js --dts binding.d.ts -- --locked",
77
84
  "build:js": "tsdown",
78
85
  "create:npm-dirs": "napi create-npm-dirs",
79
86
  "typecheck": "tsc -p tsconfig.json --noEmit"