/** * Framework Router types. * Defines request/response contracts for unified output generation. * @module */ /** * Output approaches supported by the router. * Maps to strategy implementations. */ export type OutputApproach = "speckit" | "togaf" | "adr" | "rfc" | "enterprise" | "sdd" | "chat"; /** * Cross-cutting capabilities that can be added to any output. */ export type CrossCuttingCapability = "workflow" | "shell-script" | "diagram" | "config" | "issues" | "pr-template"; /** * Supported output formats. */ export type OutputFormat = "markdown" | "json" | "html" | "yaml"; /** * Router request - what MCP tools send to the router. */ export interface RouterRequest { /** Which output approach to use */ approach: OutputApproach; /** Input data for the strategy */ input: TInput; /** Optional cross-cutting capabilities to enable */ capabilities?: CrossCuttingCapability[]; /** Output format preference */ format?: OutputFormat; /** Request metadata */ metadata?: { requestId?: string; correlationId?: string; timeout?: number; }; } /** * Router response - what the router returns to MCP tools. */ export interface RouterResponse { /** Whether execution succeeded */ success: boolean; /** Strategy output (if success) */ output?: TOutput; /** Cross-cutting outputs (diagrams, scripts, etc.) */ artifacts?: CrossCuttingArtifacts; /** Error information (if failure) */ error?: RouterError; /** Execution trace for debugging */ trace: ExecutionSummary; } /** * Artifacts generated by cross-cutting plugins. */ export interface CrossCuttingArtifacts { diagrams?: DiagramArtifact[]; scripts?: ScriptArtifact[]; configs?: ConfigArtifact[]; workflows?: WorkflowArtifact[]; issues?: IssueArtifact[]; } export interface DiagramArtifact { name: string; type: "mermaid" | "plantuml" | "graphviz"; content: string; } export interface ScriptArtifact { name: string; platform: "bash" | "powershell" | "cross-platform"; content: string; } export interface ConfigArtifact { name: string; format: "json" | "yaml" | "toml"; content: string; } export interface WorkflowArtifact { name: string; platform: "github" | "gitlab" | "azure"; content: string; } export interface IssueArtifact { title: string; body: string; labels: string[]; } /** * Router error with categorization. */ export interface RouterError { code: RouterErrorCode; message: string; approach?: OutputApproach; cause?: Error; } export type RouterErrorCode = "UNKNOWN_APPROACH" | "STRATEGY_NOT_FOUND" | "VALIDATION_FAILED" | "EXECUTION_FAILED" | "PLUGIN_FAILED" | "FORMAT_FAILED" | "TIMEOUT"; /** * Summary of execution for tracing. */ export interface ExecutionSummary { requestId: string; approach: OutputApproach; startedAt: Date; completedAt: Date; durationMs: number; strategyVersion: string; pluginsExecuted: string[]; metrics: Record; } //# sourceMappingURL=types.d.ts.map