@boundless-oss/atlas
Version:
Atlas - MCP Server for comprehensive startup project management
70 lines (64 loc) • 2.3 kB
text/typescript
/**
* Local AI Module - 12-Factor MCP Implementation
*
* This module provides AI-powered code analysis, semantic search, and embeddings
* using local processing with SQLite storage for persistence.
*
* Key Features:
* - Semantic code search using local embeddings
* - Code similarity detection
* - Dependency analysis
* - Code change tracking
* - Pattern recognition
*
* 12-Factor Compliance:
* ✅ Factor 1: Separation of Concerns - Pure function-based tools
* ✅ Factor 2: Deterministic Execution - Consistent outputs
* ✅ Factor 3: Stateless Processes - No module-level state
* ✅ Factor 4: Structured Outputs - JSON Schema validation
* ✅ Factor 5: Contextual Memory - SQLite persistence
* ✅ Factor 6: Configuration as Code - Environment-driven config
* ✅ Factor 7: Contact Humans - Approval for destructive operations
* ✅ Factor 8: Capabilities-based Authorization - Security layer
* ✅ Factor 9: Error Self-Healing - Structured error handling
* ✅ Factor 10: Performance Observability - Metrics and monitoring
* ✅ Factor 11: Request Context - Full tracing support
* ✅ Factor 12: Production Infrastructure - Deployment ready
*/
import { setupLocalAITools } from './tools.js';
// Re-export the setup function for the new architecture
export { setupLocalAITools };
// Module metadata
export const LOCAL_AI_MODULE = {
name: 'local-ai',
version: '2.0.0',
description: 'AI-powered code analysis and semantic search with local processing',
// 12-Factor compliance indicators
factors: {
separationOfConcerns: true,
deterministicExecution: true,
statelessProcesses: true,
structuredOutputs: true,
contextualMemory: true,
configurationAsCode: true,
contactHumans: true,
capabilitiesAuth: true,
errorSelfHealing: true,
performanceObservability: true,
requestContext: true,
productionInfrastructure: true
},
// Migration status
migration: {
from: 'file-based',
to: 'sqlite',
status: 'migrated',
version: '2.0.0'
},
// Dependencies
dependencies: {
storage: ['ai_embeddings', 'ai_indexing_sessions', 'ai_search_sessions', 'ai_code_changes', 'ai_dependency_analyses'],
core: ['tool-framework', 'validation', 'sqlite-manager'],
optional: []
}
} as const;