UNPKG

@promptbook/remote-server

Version:

Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action

87 lines (86 loc) 2.97 kB
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"]; /** * 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; }; /** * 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; }; /** * 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 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;