File size: 700 Bytes
68d7816 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | import { createDecorator, type ServiceIdentifier } from '#/_base/di/instantiation';
export interface RunShellCommandInput {
readonly command: string;
readonly commandId?: string;
}
export interface RunShellCommandResult {
readonly stdout: string;
readonly stderr: string;
readonly isError?: boolean;
readonly backgrounded?: boolean;
}
export interface IAgentShellCommandService {
readonly _serviceBrand: undefined;
run(input: RunShellCommandInput): Promise<RunShellCommandResult>;
cancel(commandId: string): void;
}
export const IAgentShellCommandService: ServiceIdentifier<IAgentShellCommandService> =
createDecorator<IAgentShellCommandService>('agentShellCommandService');
|