import { CancellationToken } from 'vscode-languageserver'; import { ImportLogger } from '../analyzer/importLogger'; import { PythonPathResult } from '../analyzer/pythonPathUtils'; import { PythonPlatform } from './configOptions'; import { PythonVersion } from './pythonVersion'; import { Uri } from './uri/uri'; export declare const enum HostKind { FullAccess = 0, LimitedAccess = 1, NoAccess = 2 } export interface ScriptOutput { stdout: string; stderr: string; output?: string; exitCode?: number; } export interface Host { readonly kind: HostKind; getPythonSearchPaths(pythonPath?: Uri, failureLogger?: ImportLogger): PythonPathResult; getPythonVersion(pythonPath?: Uri, failureLogger?: ImportLogger): PythonVersion | undefined; getPythonPlatform(failureLogger?: ImportLogger): PythonPlatform | undefined; runScript(pythonPath: Uri | undefined, script: Uri, args: string[], cwd: Uri, token: CancellationToken): Promise; runSnippet(pythonPath: Uri | undefined, code: string, args: string[], cwd: Uri, token: CancellationToken, forceIsolated?: boolean): Promise; } export declare class NoAccessHost implements Host { get kind(): HostKind; getPythonSearchPaths(pythonPath?: Uri, failureLogger?: ImportLogger): PythonPathResult; getPythonVersion(pythonPath?: Uri, failureLogger?: ImportLogger): PythonVersion | undefined; getPythonPlatform(failureLogger?: ImportLogger): PythonPlatform | undefined; runScript(pythonPath: Uri | undefined, scriptPath: Uri, args: string[], cwd: Uri, token: CancellationToken): Promise; runSnippet(pythonPath: Uri | undefined, code: string, args: string[], cwd: Uri, token: CancellationToken): Promise; } export type HostFactory = () => Host;