@promptbook/google
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
58 lines (57 loc) • 2.43 kB
TypeScript
import type { Command as Program } from 'commander';
import type { $side_effect } from '../../../utils/organization/$side_effect';
import { type ResolvedCoderPromptTemplate } from './boilerplateTemplates';
/**
* Initializes `coder add` command for Promptbook CLI utilities
*
* Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI
*
* @private internal function of `promptbookCli`
*/
export declare function $initializeCoderAddCommand(program: Program): $side_effect;
/**
* Result of adding one prompt file with `coder add`.
*
* @private internal utility of `coder add` command
*/
export type AddCoderPromptResult = {
/**
* Project-relative path of the created prompt file.
*/
readonly filePath: string;
/**
* Emoji tag assigned to the created prompt, for example `[✨🪴]`.
*/
readonly emojiTag: string;
};
/**
* Adds one ready-to-run prompt file containing a single prompt built from the description and template.
*
* @private internal utility of `coder add` command
*/
export declare function addCoderPrompt({ projectPath, description, priority, templateOption, promptTemplate, }: {
readonly projectPath: string;
readonly description: string;
readonly priority: number;
readonly templateOption?: string;
/** Internal authoring workflows may supply their own bounded instructions instead of the feature template. */
readonly promptTemplate?: ResolvedCoderPromptTemplate;
}): Promise<AddCoderPromptResult>;
/**
* Prepares a numbered, emoji-tagged prompt for preview without writing the prompt file.
* The offset reserves consecutive identities when a planning turn proposes several files.
*
* @private internal utility shared by `coder add` and `coder plan`
*/
export declare function prepareCoderPrompt({ projectPath, description, priority, templateOption, numberOffset, reservedEmojiTag, promptTemplate: providedPromptTemplate, }: {
readonly projectPath: string;
readonly description: string;
readonly priority: number;
readonly templateOption?: string;
readonly numberOffset?: number;
readonly reservedEmojiTag?: string;
/** Shared repair authoring preserves numbering and tags without appending ordinary implementation instructions. */
readonly promptTemplate?: ResolvedCoderPromptTemplate;
}): Promise<AddCoderPromptResult & {
readonly content: string;
}>;