Add unified mcpLog for relay server and stderr logging

This commit is contained in:
Tommy D. Rossi
2025-12-31 22:41:32 +01:00
parent 240ce5be74
commit c15cf5947a
4 changed files with 31 additions and 20 deletions
+4 -3
View File
@@ -3,7 +3,7 @@
## Types
```ts
import type { CDPSession } from './cdp-session.js';
import type { ICDPSession } from './cdp-session.js';
export interface BreakpointInfo {
id: string;
file: string;
@@ -57,7 +57,8 @@ export declare class Debugger {
* Creates a new Debugger instance.
*
* @param options - Configuration options
* @param options.cdp - A CDPSession instance for sending CDP commands
* @param options.cdp - A CDPSession instance for sending CDP commands (works with both
* our CDPSession and Playwright's CDPSession)
*
* @example
* ```ts
@@ -66,7 +67,7 @@ export declare class Debugger {
* ```
*/
constructor({ cdp }: {
cdp: CDPSession;
cdp: ICDPSession;
});
private setupEventListeners;
/**
+2 -2
View File
@@ -5,7 +5,7 @@ The Editor class provides a Claude Code-like interface for viewing and editing w
## Types
```ts
import type { CDPSession } from './cdp-session.js';
import type { ICDPSession } from './cdp-session.js';
export interface ReadResult {
content: string;
totalLines: number;
@@ -55,7 +55,7 @@ export declare class Editor {
private stylesheets;
private sourceCache;
constructor({ cdp }: {
cdp: CDPSession;
cdp: ICDPSession;
});
private setupEventListeners;
/**
+3 -3
View File
@@ -5,7 +5,7 @@ The getStylesForLocator function inspects CSS styles applied to an element, simi
## Types
```ts
import type { CDPSession } from './cdp-session.js';
import type { ICDPSession } from './cdp-session.js';
import type { Locator } from 'playwright-core';
export interface StyleSource {
url: string;
@@ -25,9 +25,9 @@ export interface StylesResult {
inlineStyle: StyleDeclarations | null;
rules: StyleRule[];
}
export declare function getStylesForLocator({ locator, cdp, includeUserAgentStyles, }: {
export declare function getStylesForLocator({ locator, cdp: cdpSession, includeUserAgentStyles, }: {
locator: Locator;
cdp: CDPSession;
cdp: ICDPSession;
includeUserAgentStyles?: boolean;
}): Promise<StylesResult>;
export declare function formatStylesAsText(styles: StylesResult): string;