From 3b2a17d299265176444ddf5614f45855941a0ab2 Mon Sep 17 00:00:00 2001 From: Tomas Valenta Date: Fri, 15 Nov 2024 12:32:10 -0800 Subject: [PATCH] Fix process info type --- packages/js-sdk/src/sandbox/commands/index.ts | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/js-sdk/src/sandbox/commands/index.ts b/packages/js-sdk/src/sandbox/commands/index.ts index e274d822f..8ba6d4723 100644 --- a/packages/js-sdk/src/sandbox/commands/index.ts +++ b/packages/js-sdk/src/sandbox/commands/index.ts @@ -5,10 +5,9 @@ import { PromiseClient, Transport, } from '@connectrpc/connect' -import { PlainMessage } from '@bufbuild/protobuf' import { Process as ProcessService } from '../../envd/process/process_connect' -import { Signal, ProcessConfig } from '../../envd/process/process_pb' +import { Signal } from '../../envd/process/process_pb' import { ConnectionConfig, Username, @@ -84,7 +83,7 @@ export type CommandConnectOpts = Pick< /** * Information about a command, PTY session or start command running in the sandbox as process. */ -export interface ProcessInfo extends PlainMessage { +export interface ProcessInfo { /** * Process ID. */ @@ -93,8 +92,25 @@ export interface ProcessInfo extends PlainMessage { * Custom tag used for identifying special commands like start command in the custom template. */ tag?: string + /** + * Command that was executed. + */ + cmd: string + /** + * Command arguments. + */ + args: string[] + /** + * Environment variables used for the command. + */ + envs: Record + /** + * Executed command working directory. + */ + cwd?: string } + /** * Module for starting and interacting with commands in the sandbox. */