takt/src/core/models/global-config.ts

73 lines
2.3 KiB
TypeScript

/**
* Configuration types (global and project)
*/
/** Custom agent configuration */
export interface CustomAgentConfig {
name: string;
promptFile?: string;
prompt?: string;
allowedTools?: string[];
claudeAgent?: string;
claudeSkill?: string;
provider?: 'claude' | 'codex' | 'mock';
model?: string;
}
/** Debug configuration for takt */
export interface DebugConfig {
enabled: boolean;
logFile?: string;
}
/** Language setting for takt */
export type Language = 'en' | 'ja';
/** Pipeline execution configuration */
export interface PipelineConfig {
/** Branch name prefix for pipeline-created branches (default: "takt/") */
defaultBranchPrefix?: string;
/** Commit message template. Variables: {title}, {issue} */
commitMessageTemplate?: string;
/** PR body template. Variables: {issue_body}, {report}, {issue} */
prBodyTemplate?: string;
}
/** Global configuration for takt */
export interface GlobalConfig {
language: Language;
trustedDirectories: string[];
defaultWorkflow: string;
logLevel: 'debug' | 'info' | 'warn' | 'error';
provider?: 'claude' | 'codex' | 'mock';
model?: string;
debug?: DebugConfig;
/** Directory for shared clones (worktree_dir in config). If empty, uses ../{clone-name} relative to project */
worktreeDir?: string;
/** List of builtin workflow/agent names to exclude from fallback loading */
disabledBuiltins?: string[];
/** Anthropic API key for Claude Code SDK (overridden by TAKT_ANTHROPIC_API_KEY env var) */
anthropicApiKey?: string;
/** OpenAI API key for Codex SDK (overridden by TAKT_OPENAI_API_KEY env var) */
openaiApiKey?: string;
/** Pipeline execution settings */
pipeline?: PipelineConfig;
/** Minimal output mode for CI - suppress AI output to prevent sensitive information leaks */
minimalOutput?: boolean;
/** Bookmarked workflow names for quick access in selection UI */
bookmarkedWorkflows?: string[];
/** Workflow category configuration (name -> workflow list) */
workflowCategories?: Record<string, string[]>;
/** Show uncategorized workflows under Others category */
showOthersCategory?: boolean;
/** Display name for Others category */
othersCategoryName?: string;
}
/** Project-level configuration */
export interface ProjectConfig {
workflow?: string;
agents?: CustomAgentConfig[];
provider?: 'claude' | 'codex' | 'mock';
}