ai-planning-val
Version:
Javascript/typescript wrapper for VAL (AI Planning plan validation and evaluation tools from KCL Planning department and the planning community around the ICAPS conference).
52 lines (51 loc) • 2.44 kB
TypeScript
export declare class UnsupportedOperatingSystem implements Error {
readonly supportedOperatingSystems: string[];
readonly yourOperatingSystem: string;
readonly yourCpuArchitecture: string;
constructor(supportedOperatingSystems: string[], yourOperatingSystem: string, yourCpuArchitecture: string);
get name(): string;
get message(): string;
stack?: string | undefined;
}
export declare const WIN32 = "win32";
export declare const LINUX = "linux";
export declare const DARWIN = "darwin";
export type Platform = "win32" | "linux" | "darwin" | undefined;
export declare const X64 = "x64";
export declare const X32 = "x32";
export type Architecture = "x64" | "x32" | undefined;
export declare class ValDownloader {
static readonly VAL_BINARY_PROJECT = "https://dev.azure.com/schlumberger/ai-planning-validation";
static readonly VAL_REPO = "https://github.com/KCL-Planning/VAL";
protected downloadDelegate(url: string, zipPath: string, message: string): Promise<void>;
/**
* Downloads given version of VAL.
* @param buildId VAL build ID to download artifacts from
* @param destinationDirectory Directory where VAL binaries are to be downloaded locally.
* @param platform optionally specify the platform
* @param architecture optionally specify the architecture
*/
download(buildId: number, destinationDirectory: string, platform?: Platform, architecture?: Architecture): Promise<ValVersion>;
decompress(compressedFilePath: string, destinationDirectory: string): Promise<string[]>;
private unzip;
static deleteAll(files: string[]): Promise<void>;
/**
* Calculates the artifact name for this computer, or given the specified `platform` and `architecture`.
* @param platform optionally specify the platform
* @param architecture optionally specify the architecture
*/
private static getBuildArtifactName;
private allowExecution;
private unsupportedOperatingSystem;
}
export interface ValVersion {
readonly buildId: number;
readonly version: string;
readonly files: string[];
readonly parserPath?: string;
readonly validatePath?: string;
readonly valueSeqPath?: string;
readonly valStepPath?: string;
}
export declare function readValManifest(manifestPath: string): Promise<ValVersion>;
export declare function writeValManifest(manifestPath: string, valVersion: ValVersion): Promise<void>;