Coding
PromptBeginner5 minmarkdown
Nano Banana Pro
Agent skill for nano-banana-pro
7
MonPere is a cross-platform desktop application that provides an AI agent capable of controlling a user's computer in real-time while maintaining human oversight and safety controls.
Sign in to like and favorite skills
MonPere is a cross-platform desktop application that provides an AI agent capable of controlling a user's computer in real-time while maintaining human oversight and safety controls.
// Example pattern for React components interface ComponentProps { onAction: (action: ActionType) => void; isAIActive: boolean; canStop: boolean; } const SafeComponent: React.FC<ComponentProps> = ({ onAction, isAIActive, canStop, }) => { // Always include emergency controls const handleEmergencyStop = useCallback(() => { onAction({ type: "EMERGENCY_STOP", timestamp: Date.now() }); }, [onAction]); return ( <div> {/* Main UI */} {isAIActive && ( <EmergencyStopButton onClick={handleEmergencyStop} disabled={!canStop} /> )} </div> ); };
// Example pattern for AI service integration interface AIService { processCommand(command: string, context: Context): Promise<ActionPlan>; validateAction(action: Action): Promise<ValidationResult>; explainDecision(action: Action): string; } class SafeAIService implements AIService { async processCommand(command: string, context: Context): Promise<ActionPlan> { // Validate input if (this.containsUnsafeOperations(command)) { throw new Error("Unsafe operation detected"); } // Process with AI const plan = await this.llmService.generatePlan(command, context); // Validate output await this.validateActionPlan(plan); return plan; } }
// Example pattern for system operations interface SystemController { executeAction(action: Action): Promise<ActionResult>; validatePermissions(action: Action): boolean; createRollbackPoint(): string; rollback(pointId: string): Promise<void>; } class SafeSystemController implements SystemController { async executeAction(action: Action): Promise<ActionResult> { // Check permissions if (!this.validatePermissions(action)) { throw new Error("Insufficient permissions"); } // Create rollback point const rollbackId = this.createRollbackPoint(); try { const result = await this.performSystemAction(action); this.logAction(action, result); return result; } catch (error) { await this.rollback(rollbackId); throw error; } } }
// Always use comprehensive error handling try { const result = await riskyOperation(); return { success: true, data: result }; } catch (error) { logger.error("Operation failed", { error, context }); await this.handleFailure(error); return { success: false, error: error.message }; }
// Include structured logging for all operations const logger = createLogger({ service: "monpere", level: "info", format: "json", }); logger.info("AI action executed", { action: action.type, duration: Date.now() - startTime, success: true, userId: user.id, });
// Use type-safe configuration interface AppConfig { ai: { provider: "openai" | "anthropic"; model: string; apiKey: string; }; safety: { maxActions: number; requireConfirmation: boolean; allowedOperations: string[]; }; ui: { theme: "light" | "dark"; language: string; }; } const config = loadConfig<AppConfig>();
src/ ├── ui/ # Frontend components │ ├── components/ # Reusable UI components │ ├── pages/ # Main application pages │ ├── hooks/ # Custom React hooks │ └── styles/ # Styling and themes ├── core/ # Core business logic │ ├── ai/ # AI service integration │ ├── system/ # System control layer │ ├── safety/ # Safety and validation │ └── models/ # Data models and types ├── services/ # External service integrations ├── utils/ # Utility functions ├── config/ # Configuration management └── tests/ # Test suites
This software has the potential to significantly impact users' systems. Approach development with appropriate caution and responsibility.