///
import { ConfigureMachine, ParametersDefinition } from "@atomist/sdm";
import { CommandInvocationListener } from "./runCommandOnColocatedAutomationClient";
import { YargBuilder } from "./yargBuilder";
import { Arguments } from "./yargBuilder/interfaces";
/**
* Spec for running an embedded command on an ephemeral SDM
*/
export interface EmbeddedCommandSpec {
/**
* Command name
*/
name: string;
cliCommand: string;
cliDescription: string;
parameters?: ParametersDefinition;
build?: (argv: YargBuilder) => void;
/**
* Listeners to command invocation
*/
listeners?: CommandInvocationListener[];
/**
* Configure the sdm.machine to run the command
*/
configurer: (argv: Arguments) => Promise;
/** Is this command deprecated? */
deprecated?: boolean;
}
/**
* Add a command, asking for repositoryOwnerParentDirectory, and spawn an SDM
* to execute it. Shut the sdm.machine down afterwards.
* Once the client connects, it will prompt for parameters required by the command.
* These parameters can also be passed through using the initial yargs request,
* being exposed as optional command parameters.
* @param {yargs.Argv} yargs
*/
export declare function addEmbeddedCommand(yargs: YargBuilder, spec: EmbeddedCommandSpec): void;