UNPKG

pddl-planning-service-client

Version:
29 lines (28 loc) 1.26 kB
import { Plan, ProblemInfo, DomainInfo, parser, planner } from 'pddl-workspace'; import { PlannerService, ServerRequest, ServerResponse } from './PlannerService'; /** Wraps the `/solve` planning web service interface. */ export declare class PlannerSyncService extends PlannerService<SyncServerRequest, SyncServerResponse> { constructor(plannerUrl: string, plannerConfiguration: planner.PlannerRunConfiguration, providerConfiguration: planner.ProviderConfiguration); createUrl(): string; getTimeout(): number; createRequestBody(domainFileInfo: DomainInfo, problemFileInfo: ProblemInfo): Promise<SyncServerRequest | null>; processServerResponseBody(_origUrl: string, responseBody: SyncServerResponse, planParser: parser.PddlPlannerOutputParser, callbacks: planner.PlannerResponseHandler): Promise<Plan[]>; } /** Sync service request body. */ interface SyncServerRequest extends ServerRequest { domain: string; problem: string; } /** Sync service response body. */ interface SyncServerResponse extends ServerResponse { status?: "error" | "ok"; result?: SyncServerResponseResult; } interface SyncServerResponseResult { output: string; error: string; plan?: any; stderr?: string; stdout?: string; } export {};