@mearl/native-host 2.7.2 → 2.8.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.
- package/dist/index.js +903 -32513
- package/dist/install.js +9 -268
- package/package.json +12 -7
- package/dist/agent/codex-provider.d.ts +0 -60
- package/dist/agent/event-transport.d.ts +0 -3
- package/dist/agent/executable-resolver.d.ts +0 -46
- package/dist/agent/manager.d.ts +0 -41
- package/dist/agent/process-env.d.ts +0 -2
- package/dist/agent/provider.d.ts +0 -47
- package/dist/agent/qoder-provider.d.ts +0 -65
- package/dist/agent/skill-manager.d.ts +0 -21
- package/dist/agent/workspace-directory.d.ts +0 -4
- package/dist/agentbay-browser.d.ts +0 -168
- package/dist/agentbay-file-upload.d.ts +0 -12
- package/dist/agentbay-lifecycle.d.ts +0 -38
- package/dist/analytics.d.ts +0 -3
- package/dist/browser-inventory.d.ts +0 -8
- package/dist/browser-registry.d.ts +0 -78
- package/dist/cdp-backend/action-registry.d.ts +0 -36
- package/dist/cdp-backend/browser-handlers.d.ts +0 -8
- package/dist/cdp-backend/buffers.d.ts +0 -53
- package/dist/cdp-backend/cdp-session.d.ts +0 -74
- package/dist/cdp-backend/cdp-utils.d.ts +0 -67
- package/dist/cdp-backend/client.d.ts +0 -34
- package/dist/cdp-backend/composite-handlers.d.ts +0 -17
- package/dist/cdp-backend/controlled-indicator.d.ts +0 -18
- package/dist/cdp-backend/cookie-handlers.d.ts +0 -5
- package/dist/cdp-backend/cookie-transfer.d.ts +0 -30
- package/dist/cdp-backend/discover.d.ts +0 -28
- package/dist/cdp-backend/domain-manager.d.ts +0 -4
- package/dist/cdp-backend/handlers.d.ts +0 -31
- package/dist/cdp-backend/http-handlers.d.ts +0 -8
- package/dist/cdp-backend/interaction-handlers.d.ts +0 -18
- package/dist/cdp-backend/mock-handlers.d.ts +0 -9
- package/dist/cdp-backend/navigation-observer.d.ts +0 -9
- package/dist/cdp-backend/page-observer.d.ts +0 -5
- package/dist/cdp-backend/page-refs.d.ts +0 -9
- package/dist/cdp-backend/recording-handlers.d.ts +0 -12
- package/dist/cdp-backend/release-control.d.ts +0 -13
- package/dist/cdp-backend/request-handlers.d.ts +0 -10
- package/dist/cdp-backend/send-request.d.ts +0 -2
- package/dist/cdp-backend/snapshot-handlers.d.ts +0 -7
- package/dist/cdp-backend/tab-handlers.d.ts +0 -8
- package/dist/cdp-backend/tdbank-handlers.d.ts +0 -14
- package/dist/cdp-backend/timezone-handlers.d.ts +0 -4
- package/dist/cloud-connector.d.ts +0 -61
- package/dist/extension-file-transfer.d.ts +0 -7
- package/dist/host-updater.d.ts +0 -39
- package/dist/index.d.ts +0 -2
- package/dist/internal-extension-actions.d.ts +0 -9
- package/dist/managed-browser.d.ts +0 -78
- package/dist/send-request-file-utils.d.ts +0 -14
- package/dist/version.d.ts +0 -1
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CDP target discovery.
|
|
3
|
-
*
|
|
4
|
-
* Strategy (in order):
|
|
5
|
-
* 1. Read Chrome's DevToolsActivePort file — written by Chrome when remote
|
|
6
|
-
* debugging is enabled (including via chrome://inspect/#remote-debugging).
|
|
7
|
-
* Contains the actual port and browser WebSocket path.
|
|
8
|
-
* 2. Fall back to HTTP /json REST API on the given port (requires Chrome
|
|
9
|
-
* launched with --remote-debugging-port).
|
|
10
|
-
*/
|
|
11
|
-
export interface CdpTarget {
|
|
12
|
-
id: string;
|
|
13
|
-
title: string;
|
|
14
|
-
type: string;
|
|
15
|
-
url: string;
|
|
16
|
-
webSocketDebuggerUrl: string;
|
|
17
|
-
faviconUrl?: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Read Chrome's DevToolsActivePort file.
|
|
21
|
-
* Returns { port, browserWsPath } or null if unavailable.
|
|
22
|
-
*/
|
|
23
|
-
export declare function readDevToolsActivePort(userDataDir?: string): {
|
|
24
|
-
port: number;
|
|
25
|
-
browserWsPath: string;
|
|
26
|
-
} | null;
|
|
27
|
-
export declare function discoverTargets(port?: number): Promise<CdpTarget[]>;
|
|
28
|
-
export declare function isCdpAvailable(port?: number, userDataDir?: string): Promise<boolean>;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CDP backend action handlers — re-export hub.
|
|
3
|
-
*
|
|
4
|
-
* All handler implementations live in dedicated sub-modules.
|
|
5
|
-
* Importing this file triggers side-effect registrations in the action registry.
|
|
6
|
-
*/
|
|
7
|
-
import './request-handlers.js';
|
|
8
|
-
import './mock-handlers.js';
|
|
9
|
-
import './http-handlers.js';
|
|
10
|
-
import './browser-handlers.js';
|
|
11
|
-
import './tdbank-handlers.js';
|
|
12
|
-
import './tab-handlers.js';
|
|
13
|
-
import './interaction-handlers.js';
|
|
14
|
-
import './timezone-handlers.js';
|
|
15
|
-
import './cookie-handlers.js';
|
|
16
|
-
import './snapshot-handlers.js';
|
|
17
|
-
import './recording-handlers.js';
|
|
18
|
-
import './composite-handlers.js';
|
|
19
|
-
export { dispatchCdpAction, getRegisteredActionNames } from './action-registry.js';
|
|
20
|
-
export { cdpGetRequests, cdpGetLogs, cdpGetEvents } from './request-handlers.js';
|
|
21
|
-
export { cdpSetMock, cdpGetMocks } from './mock-handlers.js';
|
|
22
|
-
export { cdpSendRequest, cdpSendMtopRequest, cdpGetApiSchema } from './http-handlers.js';
|
|
23
|
-
export { cdpPageScreenshot, cdpPageSelectedElement, cdpGetUserInfo } from './browser-handlers.js';
|
|
24
|
-
export { cdpTdbankAccount } from './tdbank-handlers.js';
|
|
25
|
-
export { cdpTabOpen, cdpTabClose, cdpTabList } from './tab-handlers.js';
|
|
26
|
-
export { cdpPageClick, cdpPageType, cdpPageScroll, cdpPageEval, cdpPagePress, cdpPageWait, cdpPageNavigate, cdpPageUpload, cdpSetDeviceEmulation, } from './interaction-handlers.js';
|
|
27
|
-
export { cdpPageSnapshot, cdpPageFrames } from './snapshot-handlers.js';
|
|
28
|
-
export { cdpRecordStart, cdpRecordStop } from './recording-handlers.js';
|
|
29
|
-
export { cdpRunActions, cdpObservedPageAction } from './composite-handlers.js';
|
|
30
|
-
export { cdpSetTimezone } from './timezone-handlers.js';
|
|
31
|
-
export { cdpGetCookie, cdpSetCookie } from './cookie-handlers.js';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CDP HTTP proxy / MTOP request / API schema handlers.
|
|
3
|
-
*/
|
|
4
|
-
import { type GetApiSchemaParams, type SendMtopRequestParams, type SendRequestParams } from '@mearl/browser-core';
|
|
5
|
-
import type { PageSession } from './cdp-session.js';
|
|
6
|
-
export declare function cdpSendRequest(session: PageSession, data: SendRequestParams): Promise<any>;
|
|
7
|
-
export declare function cdpSendMtopRequest(session: PageSession, data: SendMtopRequestParams): Promise<any>;
|
|
8
|
-
export declare function cdpGetApiSchema(session: PageSession, data: GetApiSchemaParams): Promise<any>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CDP page interaction handlers.
|
|
3
|
-
*
|
|
4
|
-
* Covers: click, type, scroll, eval, press, wait, navigate, upload, device emulation.
|
|
5
|
-
*/
|
|
6
|
-
import { type PageClickParams, type PageDragParams, type PageDragResultData, type PageEvalParams, type PageHoverParams, type PageNavigateParams, type PagePressParams, type PageScrollParams, type PageTypeParams, type PageUploadParams, type PageWaitParams, type SetDeviceEmulationParams } from '@mearl/browser-core';
|
|
7
|
-
import type { PageSession } from './cdp-session.js';
|
|
8
|
-
export declare function cdpPageClick(session: PageSession, data: PageClickParams): Promise<any>;
|
|
9
|
-
export declare function cdpPageDrag(session: PageSession, data: PageDragParams): Promise<PageDragResultData>;
|
|
10
|
-
export declare function cdpPageType(session: PageSession, data: PageTypeParams): Promise<any>;
|
|
11
|
-
export declare function cdpPageScroll(session: PageSession, data: PageScrollParams): Promise<any>;
|
|
12
|
-
export declare function cdpPageEval(session: PageSession, data: PageEvalParams): Promise<any>;
|
|
13
|
-
export declare function cdpPagePress(session: PageSession, data: PagePressParams): Promise<any>;
|
|
14
|
-
export declare function cdpPageWait(session: PageSession, data: PageWaitParams): Promise<any>;
|
|
15
|
-
export declare function cdpPageNavigate(session: PageSession, data: PageNavigateParams): Promise<any>;
|
|
16
|
-
export declare function cdpPageUpload(session: PageSession, data: PageUploadParams): Promise<any>;
|
|
17
|
-
export declare function cdpSetDeviceEmulation(session: PageSession, data: SetDeviceEmulationParams): Promise<any>;
|
|
18
|
-
export declare function cdpPageHover(session: PageSession, data: PageHoverParams): Promise<any>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CDP mock interception handlers.
|
|
3
|
-
*/
|
|
4
|
-
import { type GetMocksParams, type SetMockParams } from '@mearl/browser-core';
|
|
5
|
-
import type { PageSession } from './cdp-session.js';
|
|
6
|
-
/** browser_release 使用:丢弃所有依赖当前 CDP 会话的 mock 状态。 */
|
|
7
|
-
export declare function clearCdpMockState(): void;
|
|
8
|
-
export declare function cdpSetMock(session: PageSession, data: SetMockParams): Promise<any>;
|
|
9
|
-
export declare function cdpGetMocks(_session: PageSession, _data: GetMocksParams): any;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type PageActNavigationObserver } from '@mearl/browser-core';
|
|
2
|
-
import type { CdpSession, PageSession } from './cdp-session.js';
|
|
3
|
-
export declare function startCdpNavigationObserver(cdpSession: CdpSession, pageSession: PageSession, urlBefore: string, options?: {
|
|
4
|
-
trackNetwork?: boolean;
|
|
5
|
-
networkIdleMs?: number;
|
|
6
|
-
contentReadyAfterMs?: number;
|
|
7
|
-
trackOpenedTabs?: boolean;
|
|
8
|
-
sourceTabId?: number;
|
|
9
|
-
}): Promise<PageActNavigationObserver>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type PageChangeSet, type PageObservationCheckpoint, type PageObservationWaitOptions } from '@mearl/browser-core';
|
|
2
|
-
import type { PageSession } from './cdp-session.js';
|
|
3
|
-
export declare function startPageObservation(session: PageSession): Promise<PageObservationCheckpoint>;
|
|
4
|
-
export declare function finishPageObservation(session: PageSession, checkpoint: PageObservationCheckpoint, options?: PageObservationWaitOptions): Promise<PageChangeSet>;
|
|
5
|
-
export declare function disposePageObservation(session: PageSession): Promise<void>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BackendNodeRefRegistry, type BackendNodeSnapshotRefAllocator, type PageChangeSet, type PageEffectRefEntry } from '@mearl/browser-core';
|
|
2
|
-
import type { PageSession } from './cdp-session.js';
|
|
3
|
-
export type PageRefEntry = PageEffectRefEntry;
|
|
4
|
-
export declare function getPageRefRegistry(session: PageSession): BackendNodeRefRegistry<PageRefEntry>;
|
|
5
|
-
export declare function beginPageSnapshotRefs(session: PageSession): BackendNodeSnapshotRefAllocator<PageRefEntry>;
|
|
6
|
-
export declare function resolvePageRef(session: PageSession, ref: string): PageRefEntry | undefined;
|
|
7
|
-
export declare function deletePageRef(session: PageSession, ref: string): void;
|
|
8
|
-
export declare function clearPageRefsForNavigation(session: PageSession): void;
|
|
9
|
-
export declare function enrichCdpPageChangeSetWithRefs(session: PageSession, observation: PageChangeSet): Promise<PageChangeSet>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CDP recording session handlers.
|
|
3
|
-
*
|
|
4
|
-
* Manages browser-side action recording via Runtime.addBinding +
|
|
5
|
-
* Page.addScriptToEvaluateOnNewDocument.
|
|
6
|
-
*/
|
|
7
|
-
import { type RecordParams } from '@mearl/browser-core';
|
|
8
|
-
import type { PageSession } from './cdp-session.js';
|
|
9
|
-
export declare function cdpRecordStart(session: PageSession, _data: RecordParams): Promise<any>;
|
|
10
|
-
export declare function cdpRecordStop(session: PageSession, _data: RecordParams): Promise<any>;
|
|
11
|
-
/** browser_release 使用:停止仍存活页面的录制,并丢弃已失效 target 的残留状态。 */
|
|
12
|
-
export declare function releaseCdpRecordings(sessions: PageSession[]): Promise<void>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Browser-level CDP control release.
|
|
3
|
-
*
|
|
4
|
-
* Closes Mearl's browser/page WebSocket sessions while keeping Chrome and all
|
|
5
|
-
* targets alive. A later browser action may create a fresh CdpSession.
|
|
6
|
-
*/
|
|
7
|
-
import type { CdpSession } from './cdp-session.js';
|
|
8
|
-
export interface CdpReleaseResult {
|
|
9
|
-
released: boolean;
|
|
10
|
-
hadActiveControl: boolean;
|
|
11
|
-
affectedTabIds: number[];
|
|
12
|
-
}
|
|
13
|
-
export declare function releaseCdpControl(session: CdpSession): Promise<CdpReleaseResult>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CDP request/log/event buffer query handlers.
|
|
3
|
-
*/
|
|
4
|
-
import type { CaptureCheckpointParams, GetEventsParams, GetLogsParams, GetRequestsParams, PageDiagnosticsOptions } from '@mearl/browser-core';
|
|
5
|
-
import type { PageSession } from './cdp-session.js';
|
|
6
|
-
export declare function cdpGetRequests(session: PageSession, data: GetRequestsParams): Promise<any>;
|
|
7
|
-
export declare function cdpGetLogs(session: PageSession, data: GetLogsParams): Promise<any>;
|
|
8
|
-
export declare function cdpCaptureCheckpoint(session: PageSession, _data: CaptureCheckpointParams): Promise<any>;
|
|
9
|
-
export declare function collectCdpPageDiagnostics(session: PageSession, after: string, diagnostics: PageDiagnosticsOptions): Promise<Record<string, any>>;
|
|
10
|
-
export declare function cdpGetEvents(session: PageSession, data: GetEventsParams): Promise<any>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CDP accessibility tree snapshot and frame handlers.
|
|
3
|
-
*/
|
|
4
|
-
import { type PageFramesParams, type PageSnapshotParams } from '@mearl/browser-core';
|
|
5
|
-
import type { PageSession } from './cdp-session.js';
|
|
6
|
-
export declare function cdpPageSnapshot(session: PageSession, data: PageSnapshotParams): Promise<any>;
|
|
7
|
-
export declare function cdpPageFrames(session: PageSession, _data: PageFramesParams): Promise<any>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CDP tab management handlers.
|
|
3
|
-
*/
|
|
4
|
-
import { type ControlSource, type TabCloseParams, type TabOpenParams } from '@mearl/browser-core';
|
|
5
|
-
import type { CdpSession } from './cdp-session.js';
|
|
6
|
-
export declare function cdpTabOpen(session: CdpSession, data: TabOpenParams, controlSource?: ControlSource): Promise<any>;
|
|
7
|
-
export declare function cdpTabClose(session: CdpSession, data: TabCloseParams): Promise<any>;
|
|
8
|
-
export declare function cdpTabList(session: CdpSession, _data: any): Promise<any>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CDP TDBank account handlers.
|
|
3
|
-
*
|
|
4
|
-
* Manages TDBank account listing, switching, borrowing via CDP cookie-based auth.
|
|
5
|
-
*/
|
|
6
|
-
import { type TdbankAccountParams } from '@mearl/browser-core';
|
|
7
|
-
import type { CdpSession } from './cdp-session.js';
|
|
8
|
-
/** Prepare a TDBank SSO ticket without changing the controller browser account. */
|
|
9
|
-
export declare function cdpPrepareTdbankSso(cdpSession: CdpSession, data: TdbankAccountParams): Promise<any>;
|
|
10
|
-
/** Consume a TDBank SSO ticket inside an isolated managed browser. */
|
|
11
|
-
export declare function cdpConsumeTdbankSso(cdpSession: CdpSession, ssoUrl: string, expectedLoginId?: string): Promise<{
|
|
12
|
-
nickname: string;
|
|
13
|
-
}>;
|
|
14
|
-
export declare function cdpTdbankAccount(cdpSession: CdpSession, data: TdbankAccountParams): Promise<any>;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cloud connector process management — start/stop/list cloud-connector
|
|
3
|
-
* child processes that bridge the local native-host to remote cloud servers.
|
|
4
|
-
*
|
|
5
|
-
* Lifecycle design
|
|
6
|
-
* ----------------
|
|
7
|
-
* cloud-connector processes are spawned `detached` and intentionally OUTLIVE
|
|
8
|
-
* the native-host that started them. The native-host is an ephemeral broker:
|
|
9
|
-
* Chrome kills it whenever the extension reloads / updates (stdin EOF). If a
|
|
10
|
-
* connector were a normal child it would die with that broker, tearing down the
|
|
11
|
-
* cloud bridge on every extension reload.
|
|
12
|
-
*
|
|
13
|
-
* Shared registry & ownership
|
|
14
|
-
* ---------------------------
|
|
15
|
-
* Connectors are also self-manageable from the terminal (`cloud-connector start
|
|
16
|
-
* <url>`), so the host-managed and self-managed modes must not fight over the
|
|
17
|
-
* same connector. They interoperate through a single shared registry under
|
|
18
|
-
* ~/.mearl/connectors/ (one JSON record per serverUrl), with paths
|
|
19
|
-
* derived via @mearl/daemon-core so both sides agree on locations.
|
|
20
|
-
*
|
|
21
|
-
* The CONNECTOR PROCESS is the sole writer of its own record (it writes on
|
|
22
|
-
* connect, removes on graceful exit). This native-host only READS the registry
|
|
23
|
-
* to adopt/list connectors, and best-effort removes a record when it stops or
|
|
24
|
-
* reaps one. A freshly started native-host reads the registry, verifies the
|
|
25
|
-
* recorded pids are still alive, and ADOPTS them instead of spawning duplicates.
|
|
26
|
-
* Starting a connector is therefore idempotent: if a healthy one already exists
|
|
27
|
-
* for the serverUrl (started by us, a previous host, or the daemon CLI) we reuse
|
|
28
|
-
* it. Connectors die only when explicitly stopped, when they exit on their own,
|
|
29
|
-
* or when the machine reboots — never merely because the broker restarted.
|
|
30
|
-
*/
|
|
31
|
-
export interface CloudConnectorListItem {
|
|
32
|
-
serverUrl: string;
|
|
33
|
-
pid: number;
|
|
34
|
-
connectorId?: string;
|
|
35
|
-
name?: string;
|
|
36
|
-
}
|
|
37
|
-
export interface CloudConnectorListResult {
|
|
38
|
-
connectors: CloudConnectorListItem[];
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Initialise module-level dependencies. Must be called before any other export.
|
|
42
|
-
*/
|
|
43
|
-
export declare function initCloudConnector(deps: {
|
|
44
|
-
log: (...args: any[]) => void;
|
|
45
|
-
isDaemonMode: boolean;
|
|
46
|
-
sendToExtension: (message: Record<string, any>) => void;
|
|
47
|
-
version: string;
|
|
48
|
-
}): void;
|
|
49
|
-
export declare function startCloudConnector(serverUrl: string): Promise<{
|
|
50
|
-
success: boolean;
|
|
51
|
-
pid?: number;
|
|
52
|
-
connectorId?: string;
|
|
53
|
-
name?: string;
|
|
54
|
-
reused?: boolean;
|
|
55
|
-
error?: string;
|
|
56
|
-
}>;
|
|
57
|
-
export declare function stopCloudConnector(serverUrl: string): {
|
|
58
|
-
success: boolean;
|
|
59
|
-
error?: string;
|
|
60
|
-
};
|
|
61
|
-
export declare function listCloudConnectors(): CloudConnectorListResult;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type RunActionsParams, type SendRequestParams } from '@mearl/browser-core';
|
|
2
|
-
type SendExtensionTransferAction = (action: string, data: any, timeoutMs: number) => Promise<any>;
|
|
3
|
-
export declare function hasSendRequestFiles(data: unknown): boolean;
|
|
4
|
-
export declare function hasRunActionsSendRequestFiles(data: unknown): boolean;
|
|
5
|
-
export declare function sendRequestWithTransferredFiles(data: SendRequestParams, send: SendExtensionTransferAction): Promise<any>;
|
|
6
|
-
export declare function sendRunActionsWithTransferredFiles(data: RunActionsParams, send: SendExtensionTransferAction, resolveTimeoutMs: (data: RunActionsParams) => number): Promise<any>;
|
|
7
|
-
export {};
|
package/dist/host-updater.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { type CommandRunner } from '@mearl/setup/process';
|
|
2
|
-
export declare const NATIVE_HOST_UPDATE_TIMEOUT_MS: number;
|
|
3
|
-
export type NativeHostUpdateError = 'lock-timeout' | 'network' | 'package-unavailable' | 'setup-failed' | 'timeout' | 'verification-failed' | 'unknown';
|
|
4
|
-
export interface NativeHostUpdateCommand {
|
|
5
|
-
args: string[];
|
|
6
|
-
}
|
|
7
|
-
type UpdateLockRunner = <T>(targetVersion: string, operation: () => Promise<T>) => Promise<T>;
|
|
8
|
-
export interface RunNativeHostUpdateOptions {
|
|
9
|
-
areTargetsInstalled?: (targetReleaseLine: string, environment: NodeJS.ProcessEnv) => Promise<boolean>;
|
|
10
|
-
environment?: NodeJS.ProcessEnv;
|
|
11
|
-
nodePath?: string;
|
|
12
|
-
packageBinDirectory?: string | null;
|
|
13
|
-
packageManagerCommand?: string | null;
|
|
14
|
-
packageRunner?: string;
|
|
15
|
-
platform?: NodeJS.Platform;
|
|
16
|
-
runner?: CommandRunner;
|
|
17
|
-
timeoutMs?: number;
|
|
18
|
-
updateLockPath?: string;
|
|
19
|
-
withUpdateLock?: UpdateLockRunner;
|
|
20
|
-
}
|
|
21
|
-
export interface NativeHostUpdateCoordinatorOptions {
|
|
22
|
-
hostVersion: string;
|
|
23
|
-
log: (...args: unknown[]) => void;
|
|
24
|
-
requestRestart: () => void | Promise<void>;
|
|
25
|
-
runUpdate: (targetVersion: string) => Promise<void>;
|
|
26
|
-
}
|
|
27
|
-
export declare class NativeHostUpdateFailure extends Error {
|
|
28
|
-
readonly updateError: NativeHostUpdateError;
|
|
29
|
-
constructor(updateError: NativeHostUpdateError, message: string);
|
|
30
|
-
}
|
|
31
|
-
export declare function nativeHostUpdateCommand(targetVersion: string): NativeHostUpdateCommand;
|
|
32
|
-
export declare function runNativeHostUpdate(targetVersion: string, options?: RunNativeHostUpdateOptions): Promise<void>;
|
|
33
|
-
export declare class NativeHostUpdateCoordinator {
|
|
34
|
-
#private;
|
|
35
|
-
private readonly options;
|
|
36
|
-
constructor(options: NativeHostUpdateCoordinatorOptions);
|
|
37
|
-
evaluate(extensionVersion: unknown, checkForUpdates: unknown): void;
|
|
38
|
-
}
|
|
39
|
-
export {};
|
package/dist/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type ControlSource, type ControlSourceWireValue } from '@mearl/browser-core';
|
|
2
|
-
export declare function isInternalExtensionAction(action: unknown): boolean;
|
|
3
|
-
export declare function createExtensionRequestMessage(id: string, action: string, data: any, trustedInternal?: boolean, controlSource?: ControlSource): {
|
|
4
|
-
id: string;
|
|
5
|
-
action: string;
|
|
6
|
-
data: any;
|
|
7
|
-
controlSource: ControlSourceWireValue;
|
|
8
|
-
trustedInternal?: true;
|
|
9
|
-
};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/** Managed Chrome lifecycle for isolated, optionally headless browser instances. */
|
|
2
|
-
import { type DaemonRecord } from '@mearl/daemon-core';
|
|
3
|
-
import { type TransferableCookie } from './cdp-backend/cookie-transfer.js';
|
|
4
|
-
import type { BrowserLaunchParams } from '@mearl/browser-core';
|
|
5
|
-
export type ManagedBrowserUserAgentMode = NonNullable<BrowserLaunchParams['userAgentMode']>;
|
|
6
|
-
export interface TdbankSsoTicket {
|
|
7
|
-
ssoUrl: string;
|
|
8
|
-
account: {
|
|
9
|
-
accountId?: string;
|
|
10
|
-
havanaId: string;
|
|
11
|
-
site: string;
|
|
12
|
-
loginId?: string;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
interface ManagedBrowserRecord extends DaemonRecord {
|
|
16
|
-
pid: number;
|
|
17
|
-
hostPid: number;
|
|
18
|
-
browserId: string;
|
|
19
|
-
name: string;
|
|
20
|
-
headless: boolean;
|
|
21
|
-
persistent: boolean;
|
|
22
|
-
userDataDir: string;
|
|
23
|
-
executablePath: string;
|
|
24
|
-
cdpPort: number;
|
|
25
|
-
createdAt: string;
|
|
26
|
-
account?: {
|
|
27
|
-
accountId?: string;
|
|
28
|
-
loginId?: string;
|
|
29
|
-
nickname: string;
|
|
30
|
-
};
|
|
31
|
-
copiedCookies?: {
|
|
32
|
-
domains: string[];
|
|
33
|
-
count: number;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
export interface ManagedBrowserSummary {
|
|
37
|
-
browserId: string;
|
|
38
|
-
name: string;
|
|
39
|
-
provider: 'local';
|
|
40
|
-
headless: boolean;
|
|
41
|
-
persistent: boolean;
|
|
42
|
-
cdpPort: number;
|
|
43
|
-
createdAt: string;
|
|
44
|
-
account?: ManagedBrowserRecord['account'];
|
|
45
|
-
copiedCookies?: ManagedBrowserRecord['copiedCookies'];
|
|
46
|
-
running: boolean;
|
|
47
|
-
}
|
|
48
|
-
export interface ManagedBrowserManagerDeps {
|
|
49
|
-
nativeHostScript: string;
|
|
50
|
-
prepareTdbankSso: (data: BrowserLaunchParams) => Promise<TdbankSsoTicket>;
|
|
51
|
-
exportCookies: (domains: string[]) => Promise<TransferableCookie[]>;
|
|
52
|
-
log: (...args: any[]) => void;
|
|
53
|
-
}
|
|
54
|
-
export declare function validateName(value: unknown): string;
|
|
55
|
-
/** Use one case-insensitive identity for registry, locking, and persistent profile paths. */
|
|
56
|
-
export declare function managedBrowserId(name: string): string;
|
|
57
|
-
export declare function chromeExecutableCandidates(platform?: NodeJS.Platform): string[];
|
|
58
|
-
export declare function resolveChromeExecutable(explicitPath?: string): string;
|
|
59
|
-
export declare function desktopChromeUserAgent(version: string, platform?: NodeJS.Platform): string;
|
|
60
|
-
export declare function resolveChromeVersion(executablePath: string): string;
|
|
61
|
-
export declare function resolveUserAgentMode(value: unknown): ManagedBrowserUserAgentMode;
|
|
62
|
-
export declare function buildManagedChromeArgs(options: {
|
|
63
|
-
userDataDir: string;
|
|
64
|
-
headless: boolean;
|
|
65
|
-
userAgent?: string;
|
|
66
|
-
}): string[];
|
|
67
|
-
/** Verify both PID liveness and the instance-specific command line before managing a process. */
|
|
68
|
-
export declare function isManagedProcess(pid: number, commandMarker: string, platform?: NodeJS.Platform): boolean;
|
|
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;
|
|
74
|
-
export declare function launchManagedBrowser(input: BrowserLaunchParams, deps: ManagedBrowserManagerDeps): Promise<Record<string, any>>;
|
|
75
|
-
export declare function closeManagedBrowser(selector: string, options?: {
|
|
76
|
-
deleteProfile?: boolean;
|
|
77
|
-
}): Promise<Record<string, any>>;
|
|
78
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type SendRequestFile } from '@mearl/browser-core';
|
|
2
|
-
interface SendRequestFileDescriptor {
|
|
3
|
-
fieldName: string;
|
|
4
|
-
filename: string;
|
|
5
|
-
contentType: string;
|
|
6
|
-
byteLength: number;
|
|
7
|
-
}
|
|
8
|
-
export interface ResolvedSendRequestFile {
|
|
9
|
-
descriptor: SendRequestFileDescriptor;
|
|
10
|
-
filePath?: string;
|
|
11
|
-
content?: Buffer;
|
|
12
|
-
}
|
|
13
|
-
export declare function resolveSendRequestFiles(files: SendRequestFile[]): Promise<ResolvedSendRequestFile[]>;
|
|
14
|
-
export {};
|
package/dist/version.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const NATIVE_HOST_VERSION: string;
|