@mearl/native-host 2.3.0 → 2.5.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.
@@ -36,6 +36,7 @@ interface ManagedBrowserRecord extends DaemonRecord {
36
36
  export interface ManagedBrowserSummary {
37
37
  browserId: string;
38
38
  name: string;
39
+ provider: 'local';
39
40
  headless: boolean;
40
41
  persistent: boolean;
41
42
  cdpPort: number;
@@ -50,6 +51,7 @@ export interface ManagedBrowserManagerDeps {
50
51
  exportCookies: (domains: string[]) => Promise<TransferableCookie[]>;
51
52
  log: (...args: any[]) => void;
52
53
  }
54
+ export declare function validateName(value: unknown): string;
53
55
  /** Use one case-insensitive identity for registry, locking, and persistent profile paths. */
54
56
  export declare function managedBrowserId(name: string): string;
55
57
  export declare function chromeExecutableCandidates(platform?: NodeJS.Platform): string[];
@@ -65,6 +67,10 @@ export declare function buildManagedChromeArgs(options: {
65
67
  /** Verify both PID liveness and the instance-specific command line before managing a process. */
66
68
  export declare function isManagedProcess(pid: number, commandMarker: string, platform?: NodeJS.Platform): boolean;
67
69
  export declare function listManagedBrowsers(): ManagedBrowserSummary[];
70
+ export declare function hasManagedBrowser(selector: string): boolean;
71
+ export declare function waitForBrowserRegistration(browserId: string, expectedPid: number): Promise<void>;
72
+ export declare function stopProcess(pid: number, commandMarker: string): Promise<void>;
73
+ export declare function acquireLaunchLock(browserId: string): () => void;
68
74
  export declare function launchManagedBrowser(input: BrowserLaunchParams, deps: ManagedBrowserManagerDeps): Promise<Record<string, any>>;
69
75
  export declare function closeManagedBrowser(selector: string, options?: {
70
76
  deleteProfile?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mearl/native-host",
3
- "version": "2.3.0",
3
+ "version": "2.5.0",
4
4
  "description": "Native Messaging Host for Mearl — bridges Chrome Extension and local socket server",
5
5
  "type": "module",
6
6
  "main": "dist/install.js",
@@ -27,14 +27,19 @@
27
27
  "publishConfig": {
28
28
  "registry": "https://registry.npmjs.org"
29
29
  },
30
+ "dependencies": {
31
+ "ws": "^8.18.3",
32
+ "wuying-agentbay-sdk": "^0.22.0"
33
+ },
30
34
  "devDependencies": {
31
35
  "@agentclientprotocol/sdk": "^1.2.1",
32
36
  "@types/node": "^24.9.1",
37
+ "@types/ws": "^8.18.1",
33
38
  "esbuild": "^0.25.2",
34
39
  "typescript": "^5.8.3",
35
- "@mearl/daemon-core": "2.3.0",
36
- "@mearl/browser-core": "2.3.0",
37
- "@mearl/setup": "2.3.0"
40
+ "@mearl/browser-core": "2.5.0",
41
+ "@mearl/daemon-core": "2.5.0",
42
+ "@mearl/setup": "2.5.0"
38
43
  },
39
44
  "scripts": {
40
45
  "build": "rm -rf dist/ && node build.mjs",