Skip to content

waygraph / requestSession

Function: requestSession() ​

Call Signature ​

requestSession(projectDir, sessionId, request, timeoutMs?): Promise<StatusOrSendResponse>

Defined in: src/live/auto-session/ipc.ts:74

Client-side: sends one request to a running session and returns its response. Reports a stale/unreachable session as an error within timeoutMs, never hangs indefinitely.

Parameters ​

projectDir ​

string

sessionId ​

string

request ​

{ op: "status"; } | { data?: Record<string, unknown>; op: "send"; pick: string; } | { op: "click"; selector: string; } | { op: "type"; selector: string; text: string; } | { key: string; op: "press"; selector: string; } | { op: "goto"; url: string; } | { op: "reload"; } | { op: "resync"; } | { on: boolean; op: "coverage"; } | { key: string; op: "register"; page: string; selector: string; } | { op: "upload"; selector: string; stub: StubFileKind | { filePath: string; }; }

timeoutMs? ​

number

Returns ​

Promise<StatusOrSendResponse>

Call Signature ​

requestSession(projectDir, sessionId, request, timeoutMs?): Promise<DomResponse>

Defined in: src/live/auto-session/ipc.ts:91

Client-side: sends one request to a running session and returns its response. Reports a stale/unreachable session as an error within timeoutMs, never hangs indefinitely.

Parameters ​

projectDir ​

string

sessionId ​

string

request ​

object & InspectDomOptions

timeoutMs? ​

number

Returns ​

Promise<DomResponse>

Call Signature ​

requestSession(projectDir, sessionId, request, timeoutMs?): Promise<TraceResponse>

Defined in: src/live/auto-session/ipc.ts:97

Client-side: sends one request to a running session and returns its response. Reports a stale/unreachable session as an error within timeoutMs, never hangs indefinitely.

Parameters ​

projectDir ​

string

sessionId ​

string

request ​

op ​

"trace"

timeoutMs? ​

number

Returns ​

Promise<TraceResponse>

Call Signature ​

requestSession(projectDir, sessionId, request, timeoutMs?): Promise<ConsoleResponse>

Defined in: src/live/auto-session/ipc.ts:103

Client-side: sends one request to a running session and returns its response. Reports a stale/unreachable session as an error within timeoutMs, never hangs indefinitely.

Parameters ​

projectDir ​

string

sessionId ​

string

request ​

op ​

"console"

timeoutMs? ​

number

Returns ​

Promise<ConsoleResponse>

Call Signature ​

requestSession(projectDir, sessionId, request, timeoutMs?): Promise<StorageResponse>

Defined in: src/live/auto-session/ipc.ts:109

Client-side: sends one request to a running session and returns its response. Reports a stale/unreachable session as an error within timeoutMs, never hangs indefinitely.

Parameters ​

projectDir ​

string

sessionId ​

string

request ​

op ​

"storage"

timeoutMs? ​

number

Returns ​

Promise<StorageResponse>

Call Signature ​

requestSession(projectDir, sessionId, request, timeoutMs?): Promise<HelloResponse | { error: string; ok: false; }>

Defined in: src/live/auto-session/ipc.ts:115

Client-side: sends one request to a running session and returns its response. Reports a stale/unreachable session as an error within timeoutMs, never hangs indefinitely.

Parameters ​

projectDir ​

string

sessionId ​

string

request ​

op ​

"hello"

timeoutMs? ​

number

Returns ​

Promise<HelloResponse | { error: string; ok: false; }>

Call Signature ​

requestSession(projectDir, sessionId, request, timeoutMs?): Promise<ReadResponse>

Defined in: src/live/auto-session/ipc.ts:121

Client-side: sends one request to a running session and returns its response. Reports a stale/unreachable session as an error within timeoutMs, never hangs indefinitely.

Parameters ​

projectDir ​

string

sessionId ​

string

request ​

op ​

"read"

path? ​

string

rows? ​

{ from: number; to?: number; }

rows.from ​

number

rows.to? ​

number

where? ​

Record<string, string>

timeoutMs? ​

number

Returns ​

Promise<ReadResponse>

Call Signature ​

requestSession(projectDir, sessionId, request, timeoutMs?): Promise<ApplyPathResult>

Defined in: src/live/auto-session/ipc.ts:127

Client-side: sends one request to a running session and returns its response. Reports a stale/unreachable session as an error within timeoutMs, never hangs indefinitely.

Parameters ​

projectDir ​

string

sessionId ​

string

request ​

checkpoint ​

string

data? ​

Record<string, unknown>

op ​

"reach"

timeoutMs? ​

number

Returns ​

Promise<ApplyPathResult>

Call Signature ​

requestSession(projectDir, sessionId, request, timeoutMs?): Promise<HighlightResponse>

Defined in: src/live/auto-session/ipc.ts:133

Client-side: sends one request to a running session and returns its response. Reports a stale/unreachable session as an error within timeoutMs, never hangs indefinitely.

Parameters ​

projectDir ​

string

sessionId ​

string

request ​

object & PilotHighlightFixtures

timeoutMs? ​

number

Returns ​

Promise<HighlightResponse>

Call Signature ​

requestSession(projectDir, sessionId, request, timeoutMs?): Promise<SessionResponse>

Defined in: src/live/auto-session/ipc.ts:140

Any request, answered with any reply (the CLI prints it as it comes).

Parameters ​

projectDir ​

string

sessionId ​

string

request ​

SessionRequest

timeoutMs? ​

number

Returns ​

Promise<SessionResponse>

waygraph 0.18.3 (alpha) · Node 24+ · peer @playwright/test ^1.40.0 · syntax may change before 1.0: see what was removed