kokorobox-native 0.16.6 → 0.16.8

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
@@ -83,3 +83,31 @@ NetworkManager/systemd-resolved and falls back to resolv.conf for inspection.
83
83
  Bootstrap repair is Desktop configuration policy: Desktop copies the observed
84
84
  system DNS addresses into `dns.default-nameserver` and restarts the core. Native
85
85
  does not expose an OS DNS mutation API for diagnostics.
86
+
87
+ ## macOS application routing logs
88
+
89
+ `getMacosApplicationRoutingLogs(): Promise<MacosApplicationRoutingLog[]>` drains
90
+ up to 100 activity/connection entries from the approved KokoroBox Network
91
+ Extension via its provider-message channel. Records have `time`, `message` and
92
+ `level`; connection messages contain protocol, application, destination, port and
93
+ routing result. Older provider connection entries without timestamps return an
94
+ empty `time` so the caller can use its receipt time.
95
+
96
+ `clearMacosApplicationRoutingLogs(): Promise<void>` clears provider history after
97
+ checking its acknowledgement. A stopped or absent session returns an empty batch
98
+ and clearing it is a no-op. Other OS/provider failures reject. Calls run on N-API
99
+ workers; the provider send runs on the main dispatch queue with a five-second
100
+ reply timeout, following the bounded preferences load. Responses are checked for
101
+ version, schema, count, size and invalid fields before crossing into JavaScript.
102
+ The caller should serialize reads and clears and retain its own bounded history.
103
+ These operations require macOS and do not activate an extension or change policy.
104
+
105
+ ### macOS Settings navigation regression check
106
+
107
+ After building a macOS `.node`, run `sh scripts/check-macos-routing.sh path/to/binary.node`.
108
+ The check verifies Settings destinations for macOS 13/14 and 15+, then checks the
109
+ actual Rust-linked library for unresolved Clang availability helpers. N-API uses
110
+ `dynamic_lookup` for Node exports, so an accidentally unresolved availability
111
+ helper can survive linking and crash the Electron main thread. Settings routing
112
+ uses `NSProcessInfo.operatingSystemVersion` to avoid this compiler-runtime dependency.
113
+ The check opens no apps and requests no System Extension activation or approval.
package/index.d.ts CHANGED
@@ -446,3 +446,12 @@ export interface CoreValidationResult { outcome: 'valid' | 'invalid' | 'timeout'
446
446
  export function validateCoreProfile(options: CoreValidationOptions): Promise<CoreValidationResult>;
447
447
 
448
448
  export function getServiceProcessStatus(executable: string): Promise<'running' | 'stopped' | 'paused' | 'not-installed' | 'unknown'>;
449
+
450
+ export interface MacosApplicationRoutingLog {
451
+ time: string;
452
+ message: string;
453
+ level: string;
454
+ }
455
+ /** Drains at most 100 entries from the Network Extension. */
456
+ export function getMacosApplicationRoutingLogs(): Promise<MacosApplicationRoutingLog[]>;
457
+ export function clearMacosApplicationRoutingLogs(): Promise<void>;
package/index.js CHANGED
@@ -212,3 +212,6 @@ export const reconcileMacosApplicationRouting = diagnosticBinding.reconcileMacos
212
212
  export const validateCoreProfile = diagnosticBinding.validateCoreProfile;
213
213
 
214
214
  export const getServiceProcessStatus = diagnosticBinding.getServiceProcessStatus;
215
+
216
+ export const getMacosApplicationRoutingLogs = diagnosticBinding.getMacosApplicationRoutingLogs;
217
+ export const clearMacosApplicationRoutingLogs = diagnosticBinding.clearMacosApplicationRoutingLogs;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kokorobox-native",
3
- "version": "0.16.6",
3
+ "version": "0.16.8",
4
4
  "description": "KokoroBox native bridge",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -50,11 +50,11 @@
50
50
  "access": "public"
51
51
  },
52
52
  "optionalDependencies": {
53
- "kokorobox-native-win32-x64-msvc": "0.16.6",
54
- "kokorobox-native-win32-arm64-msvc": "0.16.6",
55
- "kokorobox-native-darwin-x64": "0.16.6",
56
- "kokorobox-native-darwin-arm64": "0.16.6",
57
- "kokorobox-native-linux-x64-gnu": "0.16.6",
58
- "kokorobox-native-linux-arm64-gnu": "0.16.6"
53
+ "kokorobox-native-win32-x64-msvc": "0.16.8",
54
+ "kokorobox-native-win32-arm64-msvc": "0.16.8",
55
+ "kokorobox-native-darwin-x64": "0.16.8",
56
+ "kokorobox-native-darwin-arm64": "0.16.8",
57
+ "kokorobox-native-linux-x64-gnu": "0.16.8",
58
+ "kokorobox-native-linux-arm64-gnu": "0.16.8"
59
59
  }
60
60
  }