diff --git a/packages/core/src/server/client.ts b/packages/core/src/server/client.ts index 24904d02fb..d2ab7c0276 100644 --- a/packages/core/src/server/client.ts +++ b/packages/core/src/server/client.ts @@ -29,6 +29,9 @@ import { ContainerStartResponse, ContainerStart, ContainerRemove, + PromptScriptRunOptions, + PromptScriptStart, + PromptScriptAbort, } from "./messages" export class WebSocketClient @@ -195,6 +198,29 @@ export class WebSocketClient return res.response } + async startScript( + script: string, + files: string[], + options: PromptScriptRunOptions + ): Promise { + const res = await this.queue({ + type: "script.start", + script, + files, + options, + }) + return res.response + } + + async abortScript(runId: string, reason?: string): Promise { + const res = await this.queue({ + type: "script.abort", + runId, + reason, + }) + return res.response + } + async runTest( script: PromptScript, options?: PromptScriptTestRunOptions