@promptbook/templates
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
131 lines (130 loc) • 4.77 kB
TypeScript
import { Command as Program } from 'commander';
import type { ThinkingLevel } from '../coder/ThinkingLevel';
/**
* Runner identifiers supported by Promptbook CLI agent orchestration commands.
*
* @private internal utility of `promptbookCli`
*/
export declare const PROMPT_RUNNER_AGENT_NAMES: readonly ["openai-codex", "github-copilot", "cline", "claude-code", "opencode", "gemini"];
/**
* Environment variable used as the default runner identifier when `--agent` is omitted.
*
* @private internal utility of `promptbookCli`
*/
export declare const PTBK_AGENT_ENV = "PTBK_AGENT";
/**
* Environment variable used as the default runner model when `--model` is omitted.
*
* @private internal utility of `promptbookCli`
*/
export declare const PTBK_MODEL_ENV = "PTBK_MODEL";
/**
* Environment variable used as the default runner thinking level when `--thinking-level` is omitted.
*
* @private internal utility of `promptbookCli`
*/
export declare const PTBK_THINKING_LEVEL_ENV = "PTBK_THINKING_LEVEL";
/**
* Runner identifier supported by Promptbook CLI agent orchestration commands.
*
* @private internal utility of `promptbookCli`
*/
export type PromptRunnerAgentName = (typeof PROMPT_RUNNER_AGENT_NAMES)[number];
/**
* Commander option bag for shared runner flags.
*
* @private internal utility of `promptbookCli`
*/
export type PromptRunnerCliOptions = {
readonly agent?: string;
readonly model?: string;
readonly ui: boolean;
readonly thinkingLevel?: ThinkingLevel;
readonly commit: boolean;
readonly ignoreGitChanges: boolean;
readonly allowCredits: boolean;
readonly normalizeLineEndings: boolean;
readonly autoPush: boolean;
readonly autoPull: boolean;
};
/**
* Commander option bag for runner selection plus terminal/runtime switches shared with server orchestration.
*
* @private internal utility of `promptbookCli`
*/
export type PromptRunnerSelectionCliOptions = Pick<PromptRunnerCliOptions, 'agent' | 'model' | 'ui' | 'thinkingLevel' | 'allowCredits'>;
/**
* Normalized runner options used by runner-backed CLI commands.
*
* @private internal utility of `promptbookCli`
*/
export type NormalizedPromptRunnerCliOptions = {
readonly agentName?: PromptRunnerAgentName;
readonly model?: string;
readonly noUi: boolean;
readonly thinkingLevel?: ThinkingLevel;
readonly noCommit: boolean;
readonly ignoreGitChanges: boolean;
readonly allowCredits: boolean;
readonly normalizeLineEndings: boolean;
readonly autoPush: boolean;
readonly autoPull: boolean;
};
/**
* Normalized runner selection plus terminal/runtime switches shared with server orchestration.
*
* @private internal utility of `promptbookCli`
*/
export type NormalizedPromptRunnerSelectionCliOptions = Pick<NormalizedPromptRunnerCliOptions, 'agentName' | 'model' | 'noUi' | 'thinkingLevel' | 'allowCredits'>;
/**
* Description block shared by runner-backed CLI commands.
*
* @private internal utility of `promptbookCli`
*/
export declare const PROMPT_RUNNER_DESCRIPTION: string;
/**
* Commander description for the `--agent` option.
*
* @private internal utility of `promptbookCli`
*/
export declare const PROMPT_RUNNER_AGENT_OPTION_DESCRIPTION = "Select runner: openai-codex, github-copilot, cline, claude-code, opencode, gemini (required for non-dry-run)";
/**
* Commander description for the `--model` option.
*
* @private internal utility of `promptbookCli`
*/
export declare const PROMPT_RUNNER_MODEL_OPTION_DESCRIPTION: string;
/**
* Registers runner selection flags on a command.
*
* @private internal utility of `promptbookCli`
*/
export declare function addPromptRunnerSelectionOptions(command: Program): void;
/**
* Registers shared runner terminal/runtime flags on a command.
*
* @private internal utility of `promptbookCli`
*/
export declare function addPromptRunnerRuntimeOptions(command: Program): void;
/**
* Registers shared runner execution flags on a command.
*
* @private internal utility of `promptbookCli`
*/
export declare function addPromptRunnerExecutionOptions(command: Program): void;
/**
* Converts Commander runner flags into normalized runner options.
*
* @private internal utility of `promptbookCli`
*/
export declare function normalizePromptRunnerCliOptions(cliOptions: PromptRunnerCliOptions, options: {
readonly isAgentRequired: boolean;
}): NormalizedPromptRunnerCliOptions;
/**
* Converts Commander runner selection/runtime flags into the normalized runner shape.
*
* @private internal utility of `promptbookCli`
*/
export declare function normalizePromptRunnerSelectionCliOptions(cliOptions: PromptRunnerSelectionCliOptions, options: {
readonly isAgentRequired: boolean;
}): NormalizedPromptRunnerSelectionCliOptions;