/** * Plan Builder (formerly Anthropic Client) * * Generates deterministic workflow plans from resolved workflow configurations. * The plan structure is built programmatically from the resolved workflow — * no LLM call is needed because the plan is a direct representation of the * workflow definition with issue/branch metadata attached. * * This aligns the CLI plan format with the faber-planner agent format, * ensuring workflow-run can consume plans from either source. */ import { type ResolvedWorkflow } from '@fractary/faber'; import type { LoadedFaberConfig } from '../types/config.js'; interface GeneratePlanInput { workflow: string; issueTitle: string; issueDescription: string; issueNumber: number; } export interface WorkflowPlanItem { target: string; work_id: string; planning_mode: 'work_id'; issue: { number: number; title: string; url: string; }; target_context: null; branch: { name: string; status: 'new' | 'ready' | 'resume'; }; worktree: string | null; } export interface WorkflowPlan { id: string; created: string; created_by: string; cli_version: string; metadata: { org: string; project: string; subproject: string; year: string; month: string; day: string; hour: string; minute: string; second: string; }; source: { input: string; work_id: string; planning_mode: 'work_id'; target_match: null; expanded_from: null; }; workflow: { id: string; resolved_at: string; inheritance_chain: string[]; phases: ResolvedWorkflow['phases']; }; autonomy: string; phases_to_run: string[] | null; step_to_run: string | null; additional_instructions: string | null; items: WorkflowPlanItem[]; execution: { mode: 'sequential' | 'parallel'; max_concurrent: number; status: 'pending'; started_at: null; completed_at: null; results: never[]; }; [key: string]: any; } /** * Plan Builder (exported as AnthropicClient for backward compatibility) */ export declare class AnthropicClient { private config; private git; private ajv; private planSchema; constructor(config: LoadedFaberConfig); /** * Load plan JSON schema for validation */ private loadPlanSchema; /** * Validate plan JSON against schema */ private validatePlan; /** * Generate deterministic workflow plan. * * Builds the plan structure directly from the resolved workflow configuration, * matching the format produced by the faber-planner agent. No LLM call is needed * because the plan is a direct representation of the workflow definition. */ generatePlan(input: GeneratePlanInput): Promise; /** * Extract repository organization and project name using SDK Git class */ private extractRepoInfo; } export {}; //# sourceMappingURL=anthropic-client.d.ts.map