kokorobox-native 0.16.5 → 0.16.7

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,21 @@ 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.
package/index.d.ts CHANGED
@@ -24,6 +24,10 @@ export interface UwpLoopbackApp {
24
24
  }
25
25
 
26
26
  export interface NativeCapabilities {
27
+ serviceProcessStatus: boolean;
28
+ coreProfileValidation: boolean;
29
+ macosRoutingReconcile: boolean;
30
+ coreProcessControl: boolean;
27
31
  applicationInspection: boolean;
28
32
  executableDiscovery: boolean;
29
33
  windowsApplicationScan: boolean;
@@ -430,3 +434,24 @@ export interface SystemDnsDiagnostics {
430
434
  }
431
435
  /** Read-only system resolver probes and the current primary network DNS. */
432
436
  export declare function getSystemDnsDiagnostics(): Promise<SystemDnsDiagnostics>
437
+
438
+ export interface CoreProcessIdentity { pid: number; executable: string; started: string; }
439
+ export function inspectCoreProcess(pid: number, executable: string): Promise<CoreProcessIdentity | null>;
440
+ export function stopCoreProcess(identity: CoreProcessIdentity): Promise<boolean>;
441
+
442
+ export function reconcileMacosApplicationRouting(configuration: MacosApplicationRoutingConfiguration): Promise<MacosApplicationRoutingStatus & { proxyAvailable: boolean }>;
443
+
444
+ export interface CoreValidationOptions { executable: string; configPath: string; workDir: string; safePaths: string[]; }
445
+ export interface CoreValidationResult { outcome: 'valid' | 'invalid' | 'timeout' | 'output-limit'; output: string; }
446
+ export function validateCoreProfile(options: CoreValidationOptions): Promise<CoreValidationResult>;
447
+
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
@@ -203,3 +203,15 @@ export const deleteServiceIdentity = diagnosticBinding.deleteServiceIdentity;
203
203
  export const getSystemProxyDiagnostics = diagnosticBinding.getSystemProxyDiagnostics;
204
204
  export const setSystemProxy = diagnosticBinding.setSystemProxy;
205
205
  export const getSystemDnsDiagnostics = diagnosticBinding.getSystemDnsDiagnostics;
206
+
207
+ export const inspectCoreProcess = diagnosticBinding.inspectCoreProcess;
208
+ export const stopCoreProcess = diagnosticBinding.stopCoreProcess;
209
+
210
+ export const reconcileMacosApplicationRouting = diagnosticBinding.reconcileMacosApplicationRouting;
211
+
212
+ export const validateCoreProfile = diagnosticBinding.validateCoreProfile;
213
+
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.5",
3
+ "version": "0.16.7",
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.5",
54
- "kokorobox-native-win32-arm64-msvc": "0.16.5",
55
- "kokorobox-native-darwin-x64": "0.16.5",
56
- "kokorobox-native-darwin-arm64": "0.16.5",
57
- "kokorobox-native-linux-x64-gnu": "0.16.5",
58
- "kokorobox-native-linux-arm64-gnu": "0.16.5"
53
+ "kokorobox-native-win32-x64-msvc": "0.16.7",
54
+ "kokorobox-native-win32-arm64-msvc": "0.16.7",
55
+ "kokorobox-native-darwin-x64": "0.16.7",
56
+ "kokorobox-native-darwin-arm64": "0.16.7",
57
+ "kokorobox-native-linux-x64-gnu": "0.16.7",
58
+ "kokorobox-native-linux-arm64-gnu": "0.16.7"
59
59
  }
60
60
  }