@vectorx/cloud-toolkit
Version:
VectorX Cloud Toolkit
69 lines (68 loc) • 1.78 kB
TypeScript
import { AgentSimulator } from "@vectorx/agent-simulator";
export interface AgentDevOptions {
workDir?: string;
port?: number;
simulatorPort?: number;
watch?: boolean;
open?: boolean;
nodePath?: string;
}
export interface IUploadOptions {
version: string;
desc: string;
}
export interface AgentBuildOptions {
workDir?: string;
outputDir?: string;
filename?: string;
upload?: boolean;
validator?: IProjectValidator;
uploadInfo?: IUploadOptions;
}
export interface AgentNewOptions {
projectName: string;
targetDir?: string;
}
export interface AgentDeployOptions {
targetPath: string;
projectConfigPath?: string;
agentId?: string;
version?: string;
desc?: string;
}
export interface ValidationResult {
valid: boolean;
errors: string[];
}
export interface IProjectValidator {
validate(): Promise<ValidationResult>;
}
export interface BuildResult {
outputPath: string;
size: number;
}
export interface DeployResult {
success: boolean;
code: number;
message?: string;
}
export interface IDeployService {
deploy(options: {
targetPath: string;
agentId: string;
version: string;
desc: string;
}): Promise<DeployResult>;
}
export declare function startRcbFramework(workDir: string, port: number, watch: boolean, nodePath?: string): Promise<void>;
export declare function startDev(options: AgentDevOptions): Promise<{
port: number;
simulatorPort: number;
simulator: AgentSimulator;
rcbProcess: any;
}>;
export declare function build(options: AgentBuildOptions): Promise<BuildResult>;
export declare function createNew(options: AgentNewOptions): Promise<{
projectDir: string;
}>;
export declare function cleanup(): void;