@shawnowen/comet-mcp 2.3.1 → 2.4.2
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 +97 -19
- package/dist/alert-dispatcher.d.ts +23 -0
- package/dist/alert-dispatcher.js +101 -0
- package/dist/binding-reaper.d.ts +46 -0
- package/dist/binding-reaper.js +73 -0
- package/dist/bound-session.d.ts +23 -0
- package/dist/bound-session.js +119 -0
- package/dist/bridge-config.d.ts +6 -0
- package/dist/bridge-config.js +78 -0
- package/dist/cdp-client.d.ts +40 -4
- package/dist/cdp-client.js +502 -155
- package/dist/comet-ai.d.ts +15 -0
- package/dist/comet-ai.js +114 -38
- package/dist/delegate-binding.d.ts +19 -0
- package/dist/delegate-binding.js +73 -0
- package/dist/http-server.js +2188 -47
- package/dist/index.js +3545 -788
- package/dist/observer.d.ts +47 -0
- package/dist/observer.js +516 -0
- package/dist/project-config.d.ts +46 -0
- package/dist/project-config.js +166 -0
- package/dist/session-registry.d.ts +57 -0
- package/dist/session-registry.js +500 -0
- package/dist/sidecar-artifacts.d.ts +49 -0
- package/dist/sidecar-artifacts.js +146 -0
- package/dist/snapshot-capture.d.ts +3 -0
- package/dist/snapshot-capture.js +91 -0
- package/dist/tab-group-archive.js +3 -1
- package/dist/tab-groups.d.ts +28 -1
- package/dist/tab-groups.js +205 -3
- package/dist/types.d.ts +237 -0
- package/dist/window-bindings.d.ts +160 -0
- package/dist/window-bindings.js +561 -0
- package/extension/background.js +1577 -300
- package/extension/icons/icon.svg +9 -0
- package/extension/icons/icon128.png +0 -0
- package/extension/icons/icon16.png +0 -0
- package/extension/icons/icon48.png +0 -0
- package/extension/manifest.json +34 -4
- package/extension/perplexity-capability-manifest.json +1181 -0
- package/extension/perplexity-capability-manifest.schema.json +142 -0
- package/extension/session-logic.js +3054 -0
- package/extension/session-manager.html +311 -0
- package/extension/sidepanel.css +5338 -528
- package/extension/sidepanel.html +282 -2
- package/extension/sidepanel.js +10604 -950
- package/extension/window-policy.js +162 -0
- package/package.json +10 -7
- package/vendor/lifecycle-mcp-adapter.mjs +103 -0
- package/vendor/lifecycle-metadata.mjs +252 -0
- package/vendor/readiness-report.mjs +742 -0
- package/dist/cdp-client.d.ts.map +0 -1
- package/dist/cdp-client.js.map +0 -1
- package/dist/comet-ai.d.ts.map +0 -1
- package/dist/comet-ai.js.map +0 -1
- package/dist/http-server.d.ts.map +0 -1
- package/dist/http-server.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/tab-group-archive.d.ts.map +0 -1
- package/dist/tab-group-archive.js.map +0 -1
- package/dist/tab-groups.d.ts.map +0 -1
- package/dist/tab-groups.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
package/dist/cdp-client.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import CDP from "chrome-remote-interface";
|
|
1
2
|
import type { CDPTarget, CDPVersion, NavigateResult, ScreenshotResult, EvaluateResult, CometState, NetworkIdleResult } from "./types.js";
|
|
2
3
|
export declare class CometCDPClient {
|
|
3
4
|
private client;
|
|
@@ -8,6 +9,12 @@ export declare class CometCDPClient {
|
|
|
8
9
|
private maxReconnectAttempts;
|
|
9
10
|
private isReconnecting;
|
|
10
11
|
get isConnected(): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Access the raw CDP protocol client for direct domain calls
|
|
14
|
+
* (e.g., Page.printToPDF, Network.enable, Input.dispatchKeyEvent).
|
|
15
|
+
* Throws if not connected — always check isConnected or call connect() first.
|
|
16
|
+
*/
|
|
17
|
+
get protocol(): CDP.Client;
|
|
11
18
|
/**
|
|
12
19
|
* Health check - verify connection is actually alive (not just "connected" in state)
|
|
13
20
|
* This catches cases where WebSocket died silently
|
|
@@ -41,15 +48,26 @@ export declare class CometCDPClient {
|
|
|
41
48
|
* Check if Comet process is running
|
|
42
49
|
*/
|
|
43
50
|
private isCometProcessRunning;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
private readCrashHistory;
|
|
52
|
+
private writeCrashHistory;
|
|
53
|
+
recordCrash(): void;
|
|
54
|
+
checkCrashLoopCap(): {
|
|
55
|
+
blocked: boolean;
|
|
56
|
+
count: number;
|
|
57
|
+
windowMinutes: number;
|
|
58
|
+
};
|
|
48
59
|
/**
|
|
49
60
|
* Start Comet browser with remote debugging enabled
|
|
50
61
|
* Handles macOS, Windows, and WSL environments
|
|
51
62
|
*/
|
|
52
63
|
startComet(port?: number): Promise<string>;
|
|
64
|
+
/**
|
|
65
|
+
* Position the Comet browser window on the top display using full-screen bounds.
|
|
66
|
+
* Top display staging bounds: origin (0, -1440), size 2560x1440.
|
|
67
|
+
* Keep the native window state normal so browser tabs and toolbar remain visible.
|
|
68
|
+
* Uses CDP Browser.getWindowForTarget + Browser.setWindowBounds.
|
|
69
|
+
*/
|
|
70
|
+
positionOnTopDisplay(targetId?: string): Promise<void>;
|
|
53
71
|
/**
|
|
54
72
|
* Get CDP version info
|
|
55
73
|
*/
|
|
@@ -58,6 +76,9 @@ export declare class CometCDPClient {
|
|
|
58
76
|
* List all available tabs/targets
|
|
59
77
|
*/
|
|
60
78
|
listTargets(): Promise<CDPTarget[]>;
|
|
79
|
+
waitForTargetUrl(url: string, timeoutMs?: number): Promise<CDPTarget>;
|
|
80
|
+
private getWindowIdForTarget;
|
|
81
|
+
private findSidecarTargetForWindow;
|
|
61
82
|
/**
|
|
62
83
|
* Connect to a specific tab
|
|
63
84
|
*/
|
|
@@ -89,6 +110,21 @@ export declare class CometCDPClient {
|
|
|
89
110
|
* Press a key
|
|
90
111
|
*/
|
|
91
112
|
pressKey(key: string): Promise<void>;
|
|
113
|
+
/**
|
|
114
|
+
* Return the existing Perplexity sidecar CDP target without activating Comet
|
|
115
|
+
* or sending OS-level keyboard shortcuts.
|
|
116
|
+
*/
|
|
117
|
+
ensureSidecarOpen(options?: {
|
|
118
|
+
windowId?: number;
|
|
119
|
+
targetId?: string;
|
|
120
|
+
}): Promise<CDPTarget | null>;
|
|
121
|
+
/**
|
|
122
|
+
* Connect a separate CDP client to the sidecar target for isolated interaction.
|
|
123
|
+
*/
|
|
124
|
+
connectToSidecar(options?: {
|
|
125
|
+
windowId?: number;
|
|
126
|
+
targetId?: string;
|
|
127
|
+
}): Promise<CometCDPClient | null>;
|
|
92
128
|
/**
|
|
93
129
|
* Create a new tab
|
|
94
130
|
*/
|