export interface AutomationJob { id: string; name: string; type: 'cleanup-approvals' | 'cleanup-specs' | 'cleanup-archived-specs'; enabled: boolean; config: { daysOld: number; }; schedule: string; lastRun?: string; nextRun?: string; createdAt: string; } export interface SecurityConfig { rateLimitEnabled: boolean; rateLimitPerMinute: number; auditLogEnabled: boolean; auditLogPath?: string; auditLogRetentionDays: number; corsEnabled: boolean; allowedOrigins: string[]; } export interface GlobalSettings { automationJobs: AutomationJob[]; security?: SecurityConfig; createdAt?: string; lastModified?: string; } export interface JobExecutionHistory { jobId: string; jobName: string; jobType: string; executedAt: string; success: boolean; duration: number; itemsProcessed: number; itemsDeleted: number; error?: string; } export interface JobExecutionLog { executions: JobExecutionHistory[]; lastUpdated?: string; } export interface ToolContext { /** Shared workflow root — where `.spec-workflow` lives. Translated, as `workspacePath` is. */ projectPath: string; /** * Workspace/worktree root — the tree whose code is read, diffed and compiled. * REQUIRED: an optional field would default to `undefined` at every * construction site the compiler would otherwise report. * * Both roots are **translated** paths (`PathUtils.translatePath`), which is * what the dashboard routes supply (`project-manager.ts:116-117`, requirement * 5.6): in-process consumers — diff, typecheck, file resolution — do * filesystem access with them, so they must be in this process's view. * Untranslated host paths are kept separately for display and the registry. * (`design.md:110` says "untranslated host path"; that is wrong.) */ workspacePath: string; dashboardUrl?: string; lang?: string; } export interface SpecData { name: string; description?: string; createdAt: string; lastModified: string; phases: { requirements: PhaseStatus; design: PhaseStatus; tasks: PhaseStatus; implementation: PhaseStatus; }; taskProgress?: { total: number; completed: number; /** Tasks marked `[-]`. A task is marked in-progress *before* work starts on it. */ inProgress: number; pending: number; /** Still-open checkbox lines the task parser could not read. See TaskParserResult.summary. */ unparsed: number; }; } export interface PhaseStatus { exists: boolean; approved?: boolean; lastModified?: string; content?: string; } /** Marker file (.spec-workflow/specs//deferred.json) flagging a spec as deferred. */ export interface DeferredSpecMarker { deferred: true; reason: string; deferredAt: string; } /** * A spec currently marked deferred, resolved from its marker file. * A deferred SPEC is a whole spec postponed in the build order — distinct from a * deferred DECISION (see `Deferral`), which is a choice punted within a spec. */ export interface DeferredSpec { name: string; reason: string; deferredAt: string; } /** One spec's entry in the generated INDEX.md roadmap roll-up. */ export interface SpecIndexEntry { name: string; currentPhase: string; overallStatus: string; taskProgress: { total: number; completed: number; inProgress: number; pending: number; unparsed: number; }; createdAt: string; deferred: boolean; deferredReason?: string; /** True if the spec name is mentioned in decomposition.md. */ inDecomposition: boolean; } export interface SteeringStatus { exists: boolean; /** Keyed by steering doc name (see STEERING_DOCS registry), e.g. product, tech, structure, design-system. */ documents: Record; lastModified?: string; } export interface PromptSection { key: string; value: string; } export interface TaskInfo { id: string; description: string; leverage?: string; requirements?: string; completed: boolean; details?: string[]; prompt?: string; promptStructured?: PromptSection[]; } export interface ImplementationLogEntry { id: string; taskId: string; timestamp: string; summary: string; filesModified: string[]; filesCreated: string[]; statistics: { linesAdded: number; linesRemoved: number; filesChanged: number; }; artifacts: { apiEndpoints?: Array<{ method: string; path: string; purpose: string; requestFormat?: string; responseFormat?: string; location: string; }>; components?: Array<{ name: string; type: string; purpose: string; location: string; props?: string; exports?: string[]; }>; functions?: Array<{ name: string; purpose: string; location: string; signature?: string; isExported: boolean; }>; classes?: Array<{ name: string; purpose: string; location: string; methods?: string[]; isExported: boolean; }>; integrations?: Array<{ description: string; frontendComponent: string; backendEndpoint: string; dataFlow: string; }>; }; } export interface ImplementationLog { entries: ImplementationLogEntry[]; lastUpdated?: string; } export interface ToolResponse { success: boolean; message: string; data?: any; nextSteps?: string[]; projectContext?: { projectPath: string; workflowRoot: string; specName?: string; currentPhase?: string; dashboardUrl?: string; }; } export interface MCPToolResponse { content: Array<{ type: "text"; text: string; }>; isError?: boolean; _meta?: Record; } export interface ReviewFinding { severity: 'critical' | 'warning' | 'info'; title: string; file?: string; line?: number; description: string; taskRequirement?: string; category?: 'spec-compliance' | 'hygiene'; classification?: 'novel' | 'compounding' | 'recurring'; } export interface TaskReview { id: string; taskId: string; specName: string; version: number; timestamp: string; verdict: 'pass' | 'fail' | 'findings'; summary: string; findings: ReviewFinding[]; } export interface Deferral { id: string; status: 'deferred' | 'resolved' | 'superseded'; title: string; createdAt: string; updatedAt: string; resolvedAt: string | null; originSpec: string | null; originPhase: 'requirements' | 'design' | 'tasks' | 'implementation' | null; revisitTrigger: string; tags: string[]; resolution: string | null; resolvedInSpec: string | null; supersededBy: string | null; supersedes: string | null; body: { context: string; decision: string; revisitCriteria: string; }; } export declare function toMCPResponse(response: ToolResponse, isError?: boolean): MCPToolResponse; //# sourceMappingURL=types.d.ts.map