@promptbook/utils
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
44 lines (43 loc) • 1.51 kB
TypeScript
import type { HarnessDefinition } from './HarnessDefinition';
/**
* What one harness installation command does with the harness.
*
* @private internal utility of `promptbookCli`
*/
export type HarnessInstallationOperation = 'install' | 'update';
/**
* Options of one command which installs or updates a CLI coding harness.
*
* @private internal utility of `$runHarnessInstallationCommand`
*/
type HarnessInstallationCommandOptions = {
/**
* Harness which is installed or updated.
*/
readonly definition: HarnessDefinition;
/**
* What the command does with the harness.
*/
readonly operation: HarnessInstallationOperation;
/**
* Shell command which does it.
*/
readonly command: string;
/**
* Extra environment variables required by the command.
*/
readonly environment?: Readonly<Record<string, string>>;
};
/**
* Runs one command which installs or updates a CLI coding harness.
*
* A failed installation is reported but never aborts the running command, because the harness check
* is only an assistant - the command itself may still work with a manually managed harness.
*
* Note: `$` is used to indicate that this function is not a pure function - it installs software
*
* @returns `true` when the command succeeded, `false` when it failed
* @private internal utility of `promptbookCli`
*/
export declare function $runHarnessInstallationCommand(options: HarnessInstallationCommandOptions): Promise<boolean>;
export {};