optivise
Version:
Optivise - The Ultimate Optimizely Development Assistant with AI-powered features, zero-config setup, and comprehensive development support
249 lines • 6.67 kB
TypeScript
/**
* Project Helper Tool (optidev_project_helper)
* Project setup, migration assistance, and development guidance
*/
import type { Logger, LLMRequest, PromptContext } from '../types/index.js';
import { z } from 'zod';
export declare const ProjectHelperRequestSchema: z.ZodObject<{
requestType: z.ZodEnum<["setup", "migration", "configuration", "best-practices"]>;
projectDetails: z.ZodString;
targetVersion: z.ZodOptional<z.ZodString>;
userPrompt: z.ZodOptional<z.ZodString>;
promptContext: z.ZodOptional<z.ZodAny>;
projectPath: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
requestType: "best-practices" | "configuration" | "migration" | "setup";
projectDetails: string;
projectPath?: string | undefined;
promptContext?: any;
userPrompt?: string | undefined;
targetVersion?: string | undefined;
}, {
requestType: "best-practices" | "configuration" | "migration" | "setup";
projectDetails: string;
projectPath?: string | undefined;
promptContext?: any;
userPrompt?: string | undefined;
targetVersion?: string | undefined;
}>;
export interface ProjectHelperRequest {
requestType: 'setup' | 'migration' | 'configuration' | 'best-practices';
projectDetails: string;
targetVersion?: string;
userPrompt?: string;
promptContext?: PromptContext;
projectPath?: string;
}
export interface ProjectSetupGuide {
steps: Array<{
step: number;
title: string;
description: string;
commands?: string[];
files?: Array<{
path: string;
content: string;
description: string;
}>;
verification: string;
}>;
estimatedTime: string;
prerequisites: string[];
troubleshooting: Array<{
issue: string;
solution: string;
}>;
}
export interface MigrationPlan {
fromVersion: string;
toVersion: string;
compatibility: 'full' | 'partial' | 'breaking';
breakingChanges: Array<{
component: string;
change: string;
impact: 'low' | 'medium' | 'high';
action: string;
}>;
migrationSteps: Array<{
phase: string;
tasks: string[];
duration: string;
risks: string[];
}>;
testingStrategy: string[];
rollbackPlan: string[];
}
export interface ConfigurationGuide {
environment: string;
settings: Array<{
category: string;
key: string;
value: string;
description: string;
required: boolean;
}>;
securityConsiderations: string[];
performanceOptimizations: string[];
monitoringSetup: string[];
}
export interface BestPracticesGuide {
architecture: Array<{
principle: string;
description: string;
examples: string[];
benefits: string[];
}>;
codeOrganization: Array<{
pattern: string;
description: string;
structure: string;
}>;
developmentWorkflow: Array<{
stage: string;
activities: string[];
tools: string[];
}>;
qualityAssurance: Array<{
aspect: string;
practices: string[];
metrics: string[];
}>;
}
export interface ProjectHelperResponse {
requestType: string;
detectedProducts: string[];
projectSetup?: ProjectSetupGuide;
migrationPlan?: MigrationPlan;
configurationGuide?: ConfigurationGuide;
bestPracticesGuide?: BestPracticesGuide;
recommendations: Array<{
category: string;
recommendation: string;
priority: 'low' | 'medium' | 'high';
effort: string;
}>;
resources: Array<{
title: string;
type: 'documentation' | 'tutorial' | 'tool' | 'template';
url?: string;
description: string;
}>;
llm_request?: LLMRequest;
}
export declare class ProjectHelperTool {
private productDetection;
private logger;
private ruleService;
private static readonly VERSION_COMPATIBILITY;
constructor(logger: Logger);
initialize(): Promise<void>;
/**
* Provide project assistance based on request type
*/
provideAssistance(request: ProjectHelperRequest): Promise<ProjectHelperResponse>;
/**
* Detect products from project details
*/
private detectProducts;
/**
* Generate project setup guide
*/
private generateSetupGuide;
/**
* Generate setup steps for specific product
*/
private generateSetupSteps;
/**
* Calculate estimated setup time
*/
private calculateSetupTime;
/**
* Get prerequisites for product
*/
private getPrerequisites;
/**
* Get common troubleshooting tips
*/
private getCommonTroubleshooting;
/**
* Generate migration plan
*/
private generateMigrationPlan;
/**
* Extract current version from project details
*/
private extractCurrentVersion;
/**
* Assess compatibility between versions
*/
private assessCompatibility;
/**
* Identify breaking changes between versions
*/
private identifyBreakingChanges;
/**
* Generate migration steps
*/
private generateMigrationSteps;
/**
* Generate testing strategy
*/
private generateTestingStrategy;
/**
* Generate rollback plan
*/
private generateRollbackPlan;
/**
* Generate configuration guide
*/
private generateConfigurationGuide;
/**
* Detect environment from project details
*/
private detectEnvironment;
/**
* Generate configuration settings
*/
private generateConfigurationSettings;
/**
* Generate security considerations
*/
private generateSecurityConsiderations;
/**
* Generate performance optimizations
*/
private generatePerformanceOptimizations;
/**
* Generate monitoring setup
*/
private generateMonitoringSetup;
/**
* Generate best practices guide
*/
private generateBestPracticesGuide;
/**
* Generate architecture principles
*/
private generateArchitecturePrinciples;
/**
* Generate code organization patterns
*/
private generateCodeOrganizationPatterns;
/**
* Generate development workflow
*/
private generateDevelopmentWorkflow;
/**
* Generate quality assurance practices
*/
private generateQualityAssurancePractices;
/**
* Generate recommendations
*/
private generateRecommendations;
/**
* Compile relevant resources
*/
private compileResources;
}
//# sourceMappingURL=project-helper-tool.d.ts.map