dev3000 0.0.24 → 0.0.30

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
@@ -9,13 +9,20 @@ pnpm install -g dev3000
9
9
  dev3000
10
10
  ```
11
11
 
12
+ **You can also connect claude code to the mcp-server to have it issue commands to the browser.**
13
+
14
+ ```bash
15
+ claude mcp add dev3000 http://localhost:3684/api/mcp/mcp
16
+ ```
17
+
12
18
  ## What it does
13
19
 
14
20
  Creates a comprehensive log of your development session that AI assistants can easily understand. When you have a bug or issue, Claude can see your server output, browser console, network requests, and screenshots all in chronological order.
15
21
 
16
22
  The tool monitors your app in a real browser and captures:
23
+
17
24
  - Server logs and console output
18
- - Browser console messages and errors
25
+ - Browser console messages and errors
19
26
  - Network requests and responses
20
27
  - Automatic screenshots on navigation, errors, and key events
21
28
  - Visual timeline at `http://localhost:3684/logs`
@@ -30,10 +37,12 @@ Read /tmp/dev3000.log
30
37
 
31
38
  Logs are automatically saved with timestamps in `/var/log/dev3000/` (or temp directory) and rotated to keep the 10 most recent per project. The current session is always symlinked to `/tmp/dev3000.log` for easy access.
32
39
 
33
- Or use the MCP server at `http://localhost:3684/api/mcp/http` for advanced querying:
40
+ Or use the MCP server at `http://localhost:3684/api/mcp/mcp` for advanced querying:
41
+
34
42
  - `read_consolidated_logs` - Get recent logs with filtering
35
- - `search_logs` - Regex search with context
43
+ - `search_logs` - Regex search with context
36
44
  - `get_browser_errors` - Extract browser errors by time period
45
+ - `execute_browser_action` - Control the browser (click, navigate, screenshot, evaluate, scroll, type)
37
46
 
38
47
  ## Options
39
48
 
@@ -41,14 +50,15 @@ Or use the MCP server at `http://localhost:3684/api/mcp/http` for advanced query
41
50
  dev3000 [options]
42
51
 
43
52
  -p, --port <port> Your app's port (default: 3000)
44
- --mcp-port <port> MCP server port (default: 3684)
53
+ --mcp-port <port> MCP server port (default: 3684)
45
54
  -s, --script <script> Package.json script to run (default: dev)
46
55
  --profile-dir <dir> Chrome profile directory (persists cookies/login state)
47
56
  ```
48
57
 
49
58
  Examples:
59
+
50
60
  ```bash
51
- # Custom port for Vite
61
+ # Custom port for Vite
52
62
  dev3000 --port 5173
53
63
 
54
64
  # Persistent login state
@@ -0,0 +1,39 @@
1
+ import { WebSocket } from 'ws';
2
+ export interface CDPEvent {
3
+ method: string;
4
+ params: any;
5
+ timestamp: number;
6
+ sessionId?: string;
7
+ }
8
+ export interface CDPConnection {
9
+ ws: WebSocket;
10
+ sessionId: string | null;
11
+ nextId: number;
12
+ }
13
+ export declare class CDPMonitor {
14
+ private browser;
15
+ private connection;
16
+ private debugPort;
17
+ private eventHandlers;
18
+ private profileDir;
19
+ private logger;
20
+ private debug;
21
+ private isShuttingDown;
22
+ constructor(profileDir: string, logger: (source: string, message: string) => void, debug?: boolean);
23
+ private debugLog;
24
+ start(): Promise<void>;
25
+ private createLoadingPage;
26
+ private launchChrome;
27
+ private connectToCDP;
28
+ private sendCDPCommand;
29
+ private enableCDPDomains;
30
+ private setupEventHandlers;
31
+ private onCDPEvent;
32
+ private handleCDPMessage;
33
+ navigateToApp(port: string): Promise<void>;
34
+ private setupInteractionTracking;
35
+ private takeScreenshot;
36
+ executeInteraction(interaction: any): Promise<void>;
37
+ shutdown(): Promise<void>;
38
+ }
39
+ //# sourceMappingURL=cdp-monitor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdp-monitor.d.ts","sourceRoot":"","sources":["../src/cdp-monitor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAK/B,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,GAAG,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,SAAS,CAAC;IACd,SAAS,EAAE,MAAM,GAAG,IAAI,CAA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