diff --git a/.vscode/settings.json b/.vscode/settings.json index 58d26bc..af0c0e6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,5 +9,6 @@ // Turn off tsc task auto detection since we have the necessary tasks as npm scripts "typescript.tsc.autoDetect": "off", "liveServer.settings.port": 5501, - -} + "editor.fontSize": 16, + "generativeAi.option": "Gemini", +} \ No newline at end of file diff --git a/README.md b/README.md index 2d209d5..f6ce3e3 100644 --- a/README.md +++ b/README.md @@ -1,143 +1,249 @@ -# CodeBuddy: AI-Powered Coding Assistant +# CodeBuddy: AI-Powered Agentic Coding Assistant [![Version](https://img.shields.io/visual-studio-marketplace/v/fiatinnovations.ola-code-buddy)](https://marketplace.visualstudio.com/items?itemName=fiatinnovations.ola-code-buddy) [![Downloads](https://img.shields.io/visual-studio-marketplace/d/fiatinnovations.ola-code-buddy)](https://marketplace.visualstudio.com/items?itemName=fiatinnovations.ola-code-buddy) [![Rating](https://img.shields.io/visual-studio-marketplace/r/fiatinnovations.ola-code-buddy)](https://marketplace.visualstudio.com/items?itemName=fiatinnovations.ola-code-buddy) -**CodeBuddy** is a revolutionary Visual Studio Code extension that transforms your development workflow with AI-powered assistance. +**CodeBuddy** is an advanced AI-powered VS Code extension featuring an **agentic architecture** with specialized sub-agents, tool orchestration, and multi-model support. It transforms your development workflow with intelligent code assistance, autonomous task execution, and deep codebase understanding. -## ✨ What's New in v3.4.8 +## ✨ What's New in v3.7.x -🚀 **Enhanced Vector Database** - Advanced semantic search with LanceDB integration -📚 **Smart Context Extraction** - Intelligent context retrieval for AI responses -🔍 **Improved Prompt Engineering** - Sophisticated prompt building for better AI responses -🤖 **Production-Ready Performance** - Optimized memory usage and faster response times -💡 **Advanced Embedding Service** - Better code understanding with intelligent chunking -�️ **Enhanced Error Handling** - Robust fallback mechanisms and better diagnostics +🤖 **Agentic Architecture** - DeepAgents-powered autonomous developer agent with specialized sub-agents +🧠 **LangGraph Integration** - Sophisticated multi-agent orchestration with stateful workflows +🔧 **Tool Orchestration** - Web search, file operations, and think tools for complex reasoning +📊 **Mermaid Diagram Rendering** - Visual diagram rendering with auto-fix for LLM syntax errors +🔍 **PR Review System** - Intelligent pull request analysis with change detection +📚 **Persistent Codebase Understanding** - SQLite-backed analysis caching across sessions +⚡ **Streaming Responses** - Real-time token streaming for responsive interactions -## 🌟 Support the Project +--- -If CodeBuddy enhances your development workflow: -- ⭐ Star the repository -- 📝 Leave a review on the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=fiatinnovations.ola-code-buddy) -- 🐛 Report bugs or suggest features -- 🤝 Contribute to the codebase -- 💬 Share with fellow developers +## 🏗️ Architecture Overview + +CodeBuddy employs a sophisticated **multi-agent architecture** built on modern AI orchestration patterns: + +```mermaid +flowchart TB + subgraph Extension["🧩 CodeBuddy Extension"] + subgraph UI["User Interface Layer"] + Webview["💬 Webview
(React UI)"] + Commands["⚡ Commands
(Actions)"] + Orchestrator["🎯 Orchestrator
(Event Publisher)"] + end + + subgraph AgentLayer["🤖 Agent Service Layer"] + DeveloperAgent["🧠 Developer Agent
(DeepAgents)"] + + subgraph SubAgents["Specialized Sub-Agents"] + CodeAnalyzer["🔍 Code
Analyzer"] + DocWriter["📝 Doc
Writer"] + Debugger["🐛 Debugger"] + FileOrganizer["📁 File
Organizer"] + end + end + + subgraph Tools["🔧 Tool Provider"] + WebSearch["🌐 Web
Search"] + FileTool["📄 File
Tool"] + ThinkTool["💭 Think
Tool"] + TavilySearch["🔎 Tavily
Search"] + end + + subgraph Backends["💾 Backend Systems"] + Filesystem["📂 Filesystem
(/workspace/)"] + Store["🗄️ Store
(/docs/)"] + State["⚡ State
(/ ephemeral)"] + end + end + + subgraph External["☁️ External Services"] + Gemini["Gemini"] + Anthropic["Anthropic"] + Groq["Groq"] + Deepseek["Deepseek"] + Tavily["Tavily API"] + end + + Webview --> DeveloperAgent + Commands --> DeveloperAgent + Orchestrator --> DeveloperAgent + + DeveloperAgent --> SubAgents + DeveloperAgent --> Tools + + Tools --> Backends + Tools --> External + + style Extension fill:#1e1b4b,stroke:#7c3aed,color:#e2e8f0 + style AgentLayer fill:#312e81,stroke:#8b5cf6,color:#e2e8f0 + style SubAgents fill:#3730a3,stroke:#a78bfa,color:#e2e8f0 + style Tools fill:#4c1d95,stroke:#8b5cf6,color:#e2e8f0 + style Backends fill:#5b21b6,stroke:#a78bfa,color:#e2e8f0 + style External fill:#6d28d9,stroke:#c4b5fd,color:#e2e8f0 +``` + +### 🤖 Agentic System + +The core of CodeBuddy is built on **DeepAgents** and **LangGraph**, providing: + +- **Developer Agent**: Main orchestrating agent with access to tools and sub-agents +- **Specialized Sub-Agents**: + - **Code Analyzer**: Deep code review, architecture analysis, bug detection + - **Doc Writer**: Comprehensive documentation generation + - **Debugger**: Error investigation with web search for solutions + - **File Organizer**: Project structure refactoring and organization + +### 🗄️ Hybrid Storage Architecture + +CodeBuddy uses a sophisticated three-tier storage system: + +| Path | Backend | Persistence | Purpose | +|------|---------|-------------|---------| +| `/workspace/` | Filesystem | Permanent | Real file operations on your codebase | +| `/docs/` | Store | Cross-session | Long-term knowledge and documentation | +| `/` (root) | State | Session only | Temporary scratch space | + +--- ## 🎯 Core Features -### 🧠 **AI-Powered Code Assistance** +### 🧠 AI-Powered Developer Agent -- **Multiple AI Models**: Choose from Gemini, Anthropic Claude, Groq, Deepseek, and XGrok -- **Intelligent Code Review**: Deep analysis of code quality, security, and best practices -- **Smart Refactoring**: Context-aware code improvements and restructuring -- **Performance Optimization**: AI-driven suggestions for better performance -- **Bug Detection & Fixes**: Automatic error detection with intelligent fix suggestions -- **Vector Database Integration**: Semantic search across your entire codebase +- **Autonomous Task Execution**: Agent can plan, execute, and verify multi-step tasks +- **Tool Usage**: Web search, file analysis, and structured thinking capabilities +- **Sub-Agent Delegation**: Complex tasks are delegated to specialized agents +- **Human-in-the-Loop**: Optional approval for file write/edit operations -### 💫 **Context-Aware Code Completion** +### 💬 Interactive Chat Interface -- **Inline Suggestions**: Copilot-style grey text completions as you type -- **Pattern Learning**: Learns from your codebase to suggest relevant completions -- **Function Signatures**: Smart parameter suggestions based on your patterns -- **Variable Naming**: Intelligent variable name suggestions following your conventions -- **Block Completion**: Auto-completes common code structures (if/for/try blocks) +- **Modern React UI**: Beautiful, responsive chat with syntax highlighting +- **Real-time Streaming**: Token-by-token response streaming +- **Mermaid Diagrams**: Visual diagram rendering with auto-fix for syntax errors +- **File Upload**: Support for PDF, DOCX, CSV, JSON, TXT analysis +- **Customizable Themes**: Multiple themes to match your preferences -### 📚 **Intelligent Documentation Generator** +### 🔍 Code Intelligence -- **Comprehensive README**: Auto-generates professional README.md files -- **API Documentation**: Extracts and documents REST endpoints automatically -- **Architecture Analysis**: Creates Mermaid diagrams and architectural overviews -- **Component Documentation**: Documents classes, interfaces, and modules -- **Smart Analysis**: Understands project structure and generates relevant docs +- **Code Review**: Comprehensive analysis of code quality, security, and best practices +- **Refactoring**: Context-aware code improvements and restructuring +- **Optimization**: AI-driven performance enhancement suggestions +- **Explanation**: Clear explanations of complex code logic +- **Comment Generation**: Intelligent documentation for your code -### 🔍 **Deep Codebase Understanding** +### 📊 Mermaid Diagram Support -- **Vector-Powered Search**: LanceDB integration for semantic code search and retrieval -- **Smart Context Extraction**: Intelligent context selection for AI conversations -- **Architectural Recommendations**: Suggests improvements based on your project structure -- **Framework Detection**: Identifies and analyzes technologies in use -- **Pattern Recognition**: Understands your coding patterns and conventions -- **Context-Aware Q&A**: Answer questions about your specific codebase with precise context -- **Fallback Mechanisms**: Robust search with multiple strategies for maximum reliability +- **Visual Rendering**: Automatic detection and rendering of Mermaid diagrams +- **Dark Theme**: Beautiful purple-accented dark theme matching VS Code +- **Auto-Fix**: Intelligent repair of common LLM syntax errors: + - `&` symbol conversion to `and` + - Smart quote normalization + - Bracket balancing + - Sequence/flowchart-specific fixes +- **Copy & Collapsible Source**: Easy access to diagram code -### 💬 **Interactive Chat Interface** +### 🔄 Pull Request Review -- **Modern React UI**: Beautiful, responsive chat interface with enhanced UX -- **Smart Context Integration**: Automatic semantic context inclusion in conversations -- **File Upload**: Support for various file formats (PDF, DOCX, CSV, JSON, TXT) -- **Advanced Syntax Highlighting**: Code blocks with proper language detection -- **Customizable Themes**: Multiple chat themes to match your preferences -- **Enhanced Prompt Engineering**: Sophisticated prompt building for optimal AI responses -- **Performance Monitoring**: Real-time performance metrics and diagnostics +- **Branch Comparison**: Compare current branch against any target branch +- **Change Detection**: Multi-provider fallback for robust change detection +- **Comprehensive Analysis**: Security, performance, and best practice review +- **Git CLI Integration**: Direct integration with Git for accurate diffs + +### 📚 Documentation Generation + +- **README Generation**: Auto-generates professional README files +- **API Documentation**: Extracts and documents REST endpoints +- **Architecture Diagrams**: Creates Mermaid diagrams for system visualization +- **Component Documentation**: Documents classes, interfaces, and modules + +### 🌐 Web Search Integration + +- **Tavily Search**: High-quality search results for current information +- **URL Reranking**: Prioritizes authoritative sources +- **Content Extraction**: Readability-based article parsing +- **Solution Discovery**: Find fixes for errors and best practices + +--- ## 🚀 Quick Start ### Installation 1. Open VS Code -2. Go to Extensions (Ctrl+Shift+X) +2. Go to Extensions (`Ctrl+Shift+X` / `Cmd+Shift+X`) 3. Search for "CodeBuddy" 4. Click Install ### Setup -1. **Select AI Model**: Choose your preferred AI provider in VS Code settings +1. **Select AI Model**: Choose your preferred AI provider in settings 2. **Add API Key**: Configure your API key for the chosen model -3. **Start Coding**: CodeBuddy is now ready to assist! +3. **Start Coding**: CodeBuddy is ready to assist! ### Getting Your API Keys -- **Gemini**: [Get API Key](https://aistudio.google.com/app/apikey) -- **Anthropic**: [Get API Key](https://docs.anthropic.com/en/docs/about-claude/models) -- **Groq**: [Get API Key](https://console.groq.com/keys) -- **Deepseek**: [Get API Key](https://platform.deepseek.com/api_keys) -- **XGrok**: [Get API Key](https://console.x.ai/) +| Provider | Get API Key | +|----------|-------------| +| Gemini | [Google AI Studio](https://aistudio.google.com/app/apikey) | +| Anthropic | [Anthropic Console](https://docs.anthropic.com/en/docs/about-claude/models) | +| Groq | [Groq Console](https://console.groq.com/keys) | +| Deepseek | [Deepseek Platform](https://platform.deepseek.com/api_keys) | +| XGrok | [X.AI Console](https://console.x.ai/) | +| Tavily | [Tavily Dashboard](https://app.tavily.com/home) (for web search) | + +--- ## 📋 How to Use ### Right-Click Context Menu -Right-click on selected code to access these features: - -- 💭 **Add Comments** - Intelligent code documentation -- 🔍 **Review Code** - Comprehensive code analysis -- 🔄 **Refactor Code** - Smart code improvements -- ⚡ **Optimize Code** - Performance enhancements -- 💬 **Explain Code** - Clear explanations of complex logic -- 📝 **Generate Commit Message** - Smart Git commit messages -- 💫 **Inline Chat** - Context-aware code discussions -- 📚 **Interview Questions** - Technical interview preparation -- 📊 **Generate Diagram** - Mermaid diagram creation -- 🏗️ **Analyze Codebase** - Deep architectural analysis +Right-click on selected code to access: + +| Feature | Description | +|---------|-------------| +| 💭 Add Comments | Intelligent code documentation | +| 🔍 Review Code | Comprehensive code analysis | +| 🔄 Refactor Code | Smart code improvements | +| ⚡ Optimize Code | Performance enhancements | +| 💬 Explain Code | Clear explanations | +| 📝 Generate Commit | Smart Git commit messages | +| 💫 Inline Chat | Context-aware discussions | +| 📚 Interview Me | Technical interview prep | +| 📊 Generate Diagram | Mermaid diagram creation | +| 🏗️ Analyze Codebase | Deep architectural analysis | +| 🔍 Review PR | Pull request review | + +### ⌨️ Keyboard Shortcuts + +| Command | Windows/Linux | macOS | +|---------|---------------|-------| +| Add Comment | `Ctrl+Shift+C` | `Cmd+Shift+C` | +| Review Code | `Ctrl+Shift+R` | `Cmd+Shift+R` | +| Refactor Code | `Ctrl+Shift+F` | `Cmd+Shift+F` | +| Optimize Code | `Ctrl+Shift+O` | `Cmd+Shift+O` | +| Explain Code | `Ctrl+Shift+E` | `Cmd+Shift+E` | +| Generate Commit | `Ctrl+Shift+G` | `Cmd+Shift+G` | +| Inline Chat | `Ctrl+Shift+I` | `Cmd+Shift+I` | +| Interview Me | `Ctrl+Shift+M` | `Cmd+Shift+M` | +| Generate Diagram | `Ctrl+Shift+D` | `Cmd+Shift+D` | +| Analyze Codebase | `Ctrl+Shift+A` | `Cmd+Shift+A` | +| Review PR | `Ctrl+Shift+P` | `Cmd+Shift+P` | + +> **Note:** Customize shortcuts in VS Code's Keyboard Shortcuts settings (`Cmd+K Cmd+S` / `Ctrl+K Ctrl+S`) ### Command Palette -Access additional features via Ctrl+Shift+P: - -- **CodeBuddy: Generate Documentation** - Create comprehensive docs -- **CodeBuddy: Show Vector Database Statistics** - View indexing and search stats -- **CodeBuddy: Force Full Reindex** - Rebuild vector database index -- **CodeBuddy: Show Indexing Status** - Check current indexing progress -- **CodeBuddy: Vector Database Diagnostic** - Run comprehensive diagnostics -- **CodeBuddy: Show Performance Report** - View performance metrics -- **CodeBuddy: Clear Vector Cache** - Reset vector database cache -- **CodeBuddy: Emergency Stop** - Stop all background operations -- **CodeBuddy: Optimize Performance** - Run performance optimizations +Access via `Ctrl+Shift+P` / `Cmd+Shift+P`: -### Chat Interface +- `CodeBuddy: Generate Documentation` +- `CodeBuddy: Show Cache Status` +- `CodeBuddy: Clear Cache` +- `CodeBuddy: Refresh Analysis` +- `CodeBuddy: Restart` -Click the CodeBuddy icon in the Activity Bar to open the interactive chat: - -- Ask questions about your code -- Upload files for analysis -- Get architectural recommendations -- Discuss implementation strategies +--- ## 🔧 Configuration -Access CodeBuddy settings in VS Code preferences: - ### AI Model Selection ```json @@ -146,15 +252,18 @@ Access CodeBuddy settings in VS Code preferences: } ``` -### Model-Specific Settings +### API Keys ```json { "google.gemini.apiKeys": "your-gemini-api-key", - "google.gemini.model": "gemini-1.5-flash", + "google.gemini.model": "gemini-2.5-pro", "anthropic.apiKey": "your-anthropic-api-key", + "anthropic.model": "claude-sonnet-4-5", "groq.llama3.apiKey": "your-groq-api-key", - "deepseek.apiKey": "your-deepseek-api-key" + "groq.llama3.model": "llama-3.1-70b-versatile", + "deepseek.apiKey": "your-deepseek-api-key", + "tavily.apiKey": "your-tavily-api-key" } ``` @@ -168,174 +277,171 @@ Access CodeBuddy settings in VS Code preferences: } ``` -## 🏗️ Architecture - -CodeBuddy follows a layered architecture pattern designed for scalability and maintainability: - -### Frontend Layer - -- **VS Code Integration**: Native VS Code commands and context menus -- **React WebView**: Modern chat interface with responsive design -- **Command Palette**: Rich set of developer commands - -### Core Application Layer - -- **AI Agent Orchestration**: Multi-agent system for complex tasks -- **Memory System**: Persistent context and conversation management -- **Business Logic**: Core application services and workflows -- **Application Interfaces**: Clean contracts between layers - -### Service Layer - -- **Vector Database Service**: LanceDB integration for semantic search -- **Smart Context Extraction**: Intelligent context retrieval -- **Enhanced Prompt Building**: Sophisticated AI prompt engineering -- **Embedding Service**: Code analysis and intelligent chunking -- **Documentation Generator**: Automated documentation creation +--- -### Infrastructure Layer +## 📁 Project Structure -- **HTTP Services**: External API integrations -- **Logging System**: Comprehensive logging and monitoring -- **Repository Layer**: Data access and persistence -- **Local Storage**: SQLite database and file system management +``` +codebuddy/ +├── src/ +│ ├── extension.ts # Extension entry point +│ ├── orchestrator.ts # Event orchestration system +│ ├── agents/ +│ │ ├── agentService.ts # Main agent service +│ │ ├── developer/ +│ │ │ ├── agent.ts # Developer agent (DeepAgents) +│ │ │ ├── prompts.ts # System prompts +│ │ │ └── subagents.ts # Specialized sub-agents +│ │ ├── backends/ +│ │ │ └── filesystem.ts # VS Code filesystem backend +│ │ ├── langgraph/ +│ │ │ ├── tools/ # LangGraph tool implementations +│ │ │ ├── nodes/ # Graph nodes (planner, responder, etc.) +│ │ │ └── state/ # State management +│ │ └── tools/ +│ │ └── provider.ts # Tool factory and provider +│ ├── commands/ # VS Code command implementations +│ │ ├── pr/ # PR review system +│ │ └── *.ts # Individual commands +│ ├── services/ +│ │ ├── codebase-understanding.service.ts +│ │ ├── documentation-generator.service.ts +│ │ ├── context-retriever.ts +│ │ ├── web-search-service.ts +│ │ ├── embedding.ts +│ │ └── *.ts +│ ├── tools/ +│ │ └── tools.ts # Tool definitions (Web, File, Think) +│ ├── llms/ # AI provider integrations +│ ├── infrastructure/ # Logging, database, etc. +│ └── webview-providers/ # Webview provider management +├── webviewUi/ # React chat interface +│ ├── src/ +│ │ ├── components/ +│ │ │ ├── MermaidDiagram.tsx +│ │ │ ├── thinkingComponent.tsx +│ │ │ └── *.tsx +│ │ └── App.tsx +│ └── package.json +└── package.json # Extension manifest +``` -### AI Provider Integration +--- -- **Multiple LLM Support**: Gemini, Anthropic, Groq, Deepseek, XGrok -- **Fallback Mechanisms**: Robust error handling and service switching -- **Performance Optimization**: Smart caching and request batching +## 🔌 Supported AI Models -### Storage Layer +| Provider | Models | Best For | +|----------|--------|----------| +| **Gemini** | gemini-2.5-pro, gemini-1.5-flash | General purpose, embeddings | +| **Anthropic** | claude-sonnet-4-5, claude-3-opus | Complex reasoning, code review | +| **Groq** | llama-3.1-70b-versatile | Fast responses | +| **Deepseek** | deepseek-chat | Cost-effective coding | +| **XGrok** | grok-beta | Latest capabilities | -- **SQLite Database**: Metadata and conversation storage -- **LanceDB Vector Database**: High-performance semantic search -- **File System**: Local file management and caching -- **Apache Arrow**: Efficient data serialization and storage +--- ## 🚀 Roadmap -### ✅ Completed Features +### ✅ Completed -- [x] **Vector Database Integration** - LanceDB-powered semantic search -- [x] **Smart Context Extraction** - Intelligent context retrieval system -- [x] **Enhanced Prompt Engineering** - Sophisticated prompt building service -- [x] **Production Safeguards** - Memory management and performance monitoring -- [x] **Advanced Embedding Service** - Intelligent code chunking and embedding -- [x] **React Webview UI** - Modern, responsive interface -- [x] **AI Agent Orchestration** - Multi-agent workflow coordination -- [x] **Documentation Generation** - Automated comprehensive docs -- [x] **Multiple AI Models** - Support for 5 different providers -- [x] **Robust Error Handling** - Fallback mechanisms and diagnostics +- [x] Multi-model AI support (5 providers) +- [x] Agentic architecture with DeepAgents +- [x] LangGraph integration for orchestration +- [x] Specialized sub-agents (Code Analyzer, Doc Writer, Debugger, File Organizer) +- [x] Web search with Tavily integration +- [x] Mermaid diagram rendering with auto-fix +- [x] PR review system +- [x] Persistent codebase analysis (SQLite) +- [x] Real-time streaming responses +- [x] Keyboard shortcuts ### 🔜 Coming Soon -- [ ] **MCP Integration** - Model Context Protocol support for enhanced tool usage -- [ ] **Agent-to-Agent Communication** - Advanced multi-agent coordination +- [ ] **MCP Integration** - Model Context Protocol for enhanced tool usage +- [ ] **Agent-to-Agent Communication** - A2A protocol support - [ ] **Local LLM Support** - Ollama integration for offline usage -- [ ] **Multi-language Support** - Python, Java, Go, and more language support -- [ ] **Advanced Caching** - Redis support for distributed caching -- [ ] **Team Collaboration** - Share contexts and documentation across teams -- [ ] **Custom Templates** - Personalized documentation and code templates -- [ ] **Real-time Collaboration** - Live coding assistance and pair programming +- [ ] **Multi-language Support** - Extended language support +- [ ] **Team Collaboration** - Shared contexts across teams +- [ ] **Custom Agents** - User-defined specialized agents -## 📁 Repository Structure - -``` -codebuddy/ -├── src/ # Source code -│ ├── agents/ # AI agent orchestration -│ ├── commands/ # VS Code command implementations -│ ├── llms/ # AI provider integrations -│ ├── services/ # Core business logic -│ │ ├── vector-database.service.ts # Vector database integration -│ │ ├── smart-context-extractor.ts # Context extraction service -│ │ ├── enhanced-prompt-builder.service.ts # Prompt engineering -│ │ ├── embedding-service.ts # Code embedding service -│ │ ├── documentation-generator.service.ts # Documentation generation -│ │ └── codebase-understanding.service.ts # Codebase analysis -│ ├── webview-providers/ # VS Code webview providers -│ ├── infrastructure/ # Infrastructure layer -│ └── extension.ts # Main extension entry point -├── webviewUi/ # React-based chat interface -├── docs/ # Documentation -└── package.json # Extension configuration -``` - -## 🤝 Contributing +--- -We welcome contributions! Here's how to get started: +## 🛠️ Troubleshooting -1. **Fork the repository** -2. **Create a feature branch** from `development` -3. **Install dependencies**: `npm install` -4. **Start development**: Run → Start Debugging (F5) -5. **Make your changes** in the new VS Code instance -6. **Test thoroughly** with various scenarios -7. **Submit a pull request** +### Common Issues -### Development Setup +**❓ Agent not responding** +- Verify API key is correct in settings +- Check API quota/billing status +- Try a different AI model -- Main entry point: `src/extension.ts` -- React UI entry: `webviewUi/src/App.tsx` -- Testing: New VS Code instance opens automatically -- Build: `npm run compile` and `npm run build:webview` +**❓ Mermaid diagrams not rendering** +- Diagrams auto-fix common syntax errors +- Check console for specific parse errors +- Try "Show Source Code" to see raw diagram -For detailed contribution guidelines, see [CONTRIBUTING.md](CONTRIBUTING.md) +**❓ PR Review not working** +- Ensure you're in a Git repository +- Check that you have multiple branches +- Verify Git CLI is accessible -## 🛠️ Troubleshooting +**❓ Slow responses** +- Try Groq for faster responses +- Check internet connection +- Clear cache with `CodeBuddy: Clear Cache` -### Common Issues +### Getting Help -**❓ Vector database not working** +- 📖 [Documentation](docs/) +- 🐛 [Report Issues](https://github.com/olasunkanmi-SE/codebuddy/issues) +- 📧 Contact: oyinolasunkanmi@gmail.com -- Check if API key is properly configured for embeddings -- Use "CodeBuddy: Vector Database Diagnostic" command -- Try "CodeBuddy: Force Full Reindex" to rebuild the database -- Check the output panel for detailed error messages +--- -**❓ API Key Issues** +## 🤝 Contributing -- Verify your API key is correctly entered in VS Code settings -- Check that you've selected the matching AI model -- Ensure your API key has sufficient credits/quota +We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. -**❓ Documentation generation fails** +### Development Setup -- Make sure you have proper file permissions in the workspace -- Check that your project structure is supported -- Review the output panel for detailed error messages +```bash +# Clone the repository +git clone https://github.com/olasunkanmi-SE/codebuddy.git -**❓ Performance Issues** +# Install dependencies +npm install +cd webviewUi && npm install -- Try switching to a faster AI model (Groq is typically fastest) -- Clear the extension cache: Use "CodeBuddy: Restart" command -- Check your internet connection stability +# Build +npm run compile +cd webviewUi && npm run build -### Getting Help +# Run in development +# Press F5 in VS Code to launch extension development host +``` -- 📖 Check our [documentation](docs/) -- 🐛 Report issues on [GitHub](https://github.com/olasunkanmi-SE/codebuddy/issues) -- 💬 Join our community discussions -- 📧 Contact: oyinolasunkanmi@gmail.com +--- -## 📊 Analytics & Performance +## 📊 Technical Specs -- **Bundle Size**: ~8.99MB (Extension) + ~397KB (UI) -- **Supported Languages**: TypeScript, JavaScript, React, Vue, Python, Java, C++, and more +- **Bundle Size**: ~9MB (Extension) + ~800KB (UI) - **VS Code Version**: 1.78.0+ -- **AI Models**: 5 providers supported (Gemini, Anthropic, Groq, Deepseek, XGrok) -- **Database**: SQLite for metadata, LanceDB for vector embeddings -- **Vector Database**: Apache Arrow format with high-performance search -- **Memory Management**: Intelligent caching and cleanup mechanisms +- **AI Models**: 5 providers supported +- **Database**: SQLite for metadata, LanceDB for vectors +- **Agent Framework**: DeepAgents + LangGraph +- **UI Framework**: React + styled-components + +--- ## 📄 License -MIT License - see [LICENSE](LICENSE) file for details. +MIT License - see [LICENSE](LICENSE) for details. + +--- ## 🌟 Support the Project -If CodeBuddy enhances your development workflow: +If CodeBuddy enhances your workflow: - ⭐ Star the repository - 📝 Leave a review on the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=fiatinnovations.ola-code-buddy) @@ -347,6 +453,6 @@ If CodeBuddy enhances your development workflow: **Made with ❤️ by [Olasunkanmi Raymond](https://olasunkanmi.app)** -_Transform your coding experience with AI-powered assistance. Install CodeBuddy today and code smarter, not harder!_ +_Transform your coding experience with AI-powered agentic assistance. Install CodeBuddy today and code smarter, not harder!_ [![Install Now](https://img.shields.io/badge/Install%20Now-VS%20Code%20Marketplace-blue?style=for-the-badge&logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=fiatinnovations.ola-code-buddy) diff --git a/docs/INTERRUPT_SYSTEM.md b/docs/INTERRUPT_SYSTEM.md new file mode 100644 index 0000000..bf0c30b --- /dev/null +++ b/docs/INTERRUPT_SYSTEM.md @@ -0,0 +1,409 @@ +# Human-in-the-Loop Interrupt System + +## Overview + +The CodeBuddy agent supports **human-in-the-loop (HITL) interrupts** for critical operations that require user approval before execution. This ensures safety and gives users control over file modifications. + +## What Was Fixed + +### ❌ **Before (Broken)** +```typescript +// In agent.ts line 152 +interruptOn: {}, // Empty object - interrupts disabled! +``` + +The interrupt configuration method existed but was **never being used**. All file operations would execute without user approval. + +### ✅ **After (Fixed)** +```typescript +// In agent.ts line 152 +interruptOn: this.getInterruptConfiguration(), // Properly configured! +``` + +Now interrupts are properly enabled for file write and edit operations. + +## How It Works + +### 1. Default Interrupt Configuration + +By default, the following tools require user approval: + +```typescript +{ + write_file: { + allowedDecisions: ["approve", "edit", "reject"] + }, + edit_file: { + allowedDecisions: ["approve", "edit", "reject"] + } +} +``` + +### 2. Decision Types + +Users can make three types of decisions: + +- **`approve`** - Execute the operation as proposed +- **`edit`** - Modify the operation before executing +- **`reject`** - Cancel the operation + +### 3. Interrupt Flow + +``` +Agent wants to write file + ↓ +Interrupt triggered + ↓ +User presented with: + - Tool name (write_file) + - Tool input (file path, content) + - Decision options (approve/edit/reject) + ↓ +User makes decision + ↓ +Agent proceeds based on decision +``` + +## Configuration + +### Type Definitions + +```typescript +/** + * Human-in-the-loop interrupt decision types + */ +export type InterruptDecision = "approve" | "edit" | "reject"; + +/** + * Configuration for a specific tool interrupt + */ +export interface IToolInterruptConfig { + allowedDecisions: InterruptDecision[]; +} + +/** + * Interrupt configuration for human-in-the-loop approval + * Maps tool names to their interrupt configurations + */ +export type InterruptConfiguration = Record; +``` + +### Default Configuration + +```typescript +private getInterruptConfiguration(): InterruptConfiguration { + const defaultInterruptOn: InterruptConfiguration = { + write_file: { + allowedDecisions: ["approve", "edit", "reject"], + }, + edit_file: { + allowedDecisions: ["approve", "edit", "reject"], + }, + }; + + return this.config.interruptOn + ? { ...defaultInterruptOn, ...this.config.interruptOn } + : defaultInterruptOn; +} +``` + +## Customizing Interrupts + +### Example 1: Add More Tools + +```typescript +const agent = createAdvancedDeveloperAgent({ + interruptOn: { + write_file: { allowedDecisions: ["approve", "edit", "reject"] }, + edit_file: { allowedDecisions: ["approve", "edit", "reject"] }, + delete_file: { allowedDecisions: ["approve", "reject"] }, // NEW + run_command: { allowedDecisions: ["approve", "reject"] }, // NEW + } +}); +``` + +### Example 2: Approve-Only Mode + +```typescript +const agent = createAdvancedDeveloperAgent({ + interruptOn: { + write_file: { allowedDecisions: ["approve"] }, // Only approve, no edit/reject + edit_file: { allowedDecisions: ["approve"] }, + } +}); +``` + +### Example 3: Disable Interrupts + +```typescript +const agent = createAdvancedDeveloperAgent({ + interruptOn: {} // No interrupts - auto-approve everything (dangerous!) +}); +``` + +### Example 4: Override Defaults + +```typescript +const agent = createAdvancedDeveloperAgent({ + interruptOn: { + // write_file and edit_file still use defaults + // Add custom interrupt for new tool + execute_code: { allowedDecisions: ["approve", "reject"] }, + } +}); +``` + +## Implementation Details + +### Agent Configuration + +```typescript +// In DeveloperAgent.create() +return createDeepAgent({ + model: this.model, + tools: this.tools, + systemPrompt: this.getSystemPrompt(), + backend: this.getBackendFactory(), + store, + checkpointer: checkPointer, + name: "DeveloperAgent", + subagents, + interruptOn: this.getInterruptConfiguration(), // ✅ Properly configured +}); +``` + +### Interrupt Handler (DeepAgents) + +When an interrupt is triggered, DeepAgents will: + +1. **Pause execution** at the tool call +2. **Save state** to checkpointer +3. **Wait for user decision** +4. **Resume execution** based on decision: + - `approve` → Execute tool with original input + - `edit` → Execute tool with modified input + - `reject` → Skip tool execution, continue with next step + +## UI Integration + +### WebView Provider Example + +```typescript +export class GeminiWebViewProvider { + async handleInterrupt(interrupt: any) { + // Show interrupt UI to user + const decision = await this.showInterruptDialog({ + toolName: interrupt.toolName, + toolInput: interrupt.toolInput, + allowedDecisions: interrupt.allowedDecisions, + }); + + // Send decision back to agent + await this.resumeWithDecision(interrupt.id, decision); + } + + private async showInterruptDialog(options: any): Promise { + // Show modal with: + // - Tool name and description + // - Tool input (formatted) + // - Buttons for each allowed decision + + return new Promise((resolve) => { + this.postMessage({ + command: 'showInterrupt', + data: options, + callback: (decision: InterruptDecision) => resolve(decision) + }); + }); + } +} +``` + +### Frontend UI Example + +```tsx +function InterruptDialog({ interrupt, onDecision }) { + return ( +
+

🛑 Approval Required

+

The agent wants to: {interrupt.toolName}

+ +
+

Details:

+
{JSON.stringify(interrupt.toolInput, null, 2)}
+
+ +
+ {interrupt.allowedDecisions.includes('approve') && ( + + )} + {interrupt.allowedDecisions.includes('edit') && ( + + )} + {interrupt.allowedDecisions.includes('reject') && ( + + )} +
+
+ ); +} +``` + +## Best Practices + +### 1. Always Interrupt Destructive Operations + +```typescript +interruptOn: { + write_file: { allowedDecisions: ["approve", "edit", "reject"] }, + edit_file: { allowedDecisions: ["approve", "edit", "reject"] }, + delete_file: { allowedDecisions: ["approve", "reject"] }, + run_command: { allowedDecisions: ["approve", "reject"] }, +} +``` + +### 2. Provide Clear Context + +When showing interrupts to users, include: +- Tool name and description +- Full tool input (formatted) +- Expected outcome +- Potential risks + +### 3. Save State + +Always save agent state before showing interrupt: +```typescript +await checkpointer.put(config, checkpoint); +``` + +### 4. Handle Timeouts + +Set reasonable timeouts for user decisions: +```typescript +const decision = await Promise.race([ + getUserDecision(), + timeout(60000).then(() => 'reject') // Auto-reject after 1 minute +]); +``` + +### 5. Log Decisions + +Track user decisions for audit purposes: +```typescript +logger.info(`User decision for ${toolName}: ${decision}`, { + toolInput, + timestamp: Date.now(), +}); +``` + +## Debugging + +### Check Interrupt Configuration + +```typescript +// In agent.ts +console.log('Interrupt config:', this.getInterruptConfiguration()); +``` + +### Monitor Interrupts + +```typescript +// In your code +agent.on('interrupt', (interrupt) => { + console.log('Interrupt triggered:', interrupt); +}); +``` + +### Test Interrupts + +```typescript +// Trigger a file write to test +const result = await agent.invoke({ + messages: [{ role: 'user', content: 'Create a new file test.txt' }] +}); + +// Should pause at write_file and wait for approval +``` + +## Security Considerations + +### 1. Never Auto-Approve Dangerous Operations + +```typescript +// ❌ BAD - Auto-approves everything +interruptOn: {} + +// ✅ GOOD - Requires approval for file operations +interruptOn: { + write_file: { allowedDecisions: ["approve", "edit", "reject"] }, + edit_file: { allowedDecisions: ["approve", "edit", "reject"] }, +} +``` + +### 2. Validate User Input + +When allowing edits, validate the modified input: +```typescript +if (decision === 'edit') { + const modifiedInput = validateToolInput(editedInput); + if (!modifiedInput.isValid) { + throw new Error('Invalid tool input'); + } +} +``` + +### 3. Limit Interrupt Scope + +Only interrupt operations that truly need approval: +```typescript +// Don't interrupt read operations +interruptOn: { + // read_file: NOT NEEDED + write_file: { allowedDecisions: ["approve", "edit", "reject"] }, +} +``` + +## Troubleshooting + +### Interrupts Not Triggering + +**Problem**: File operations execute without approval +**Solution**: +1. Check `interruptOn` is not empty `{}` +2. Verify tool names match exactly (e.g., `write_file` not `writeFile`) +3. Ensure checkpointer is configured + +### Can't Resume After Interrupt + +**Problem**: Agent stuck after showing interrupt +**Solution**: +1. Verify state is saved to checkpointer +2. Check decision is sent back correctly +3. Ensure thread_id matches + +### Edit Decision Not Working + +**Problem**: Edited input not being used +**Solution**: +1. Verify `edit` is in `allowedDecisions` +2. Check modified input format matches tool schema +3. Ensure modified input is passed to tool correctly + +## Summary + +The interrupt system is now **fully functional**: + +- ✅ **Properly configured** - Uses `getInterruptConfiguration()` +- ✅ **Type-safe** - Strong TypeScript types +- ✅ **Customizable** - Easy to add/remove interrupts +- ✅ **Documented** - Complete guide provided +- ✅ **Secure** - Defaults to requiring approval for file operations + +Users now have **full control** over file modifications! 🛡️ diff --git a/docs/REACT_AGENT_COMMAND_ORCHESTRATION.md b/docs/REACT_AGENT_COMMAND_ORCHESTRATION.md new file mode 100644 index 0000000..b351648 --- /dev/null +++ b/docs/REACT_AGENT_COMMAND_ORCHESTRATION.md @@ -0,0 +1,1136 @@ +# ReAct Agent Command Orchestration + +> **Migrating CodeBuddy Commands to an Autonomous ReAct Agent Architecture** + +This document outlines the architecture and implementation strategy for transforming CodeBuddy's linear command handlers into an intelligent, self-orchestrating ReAct (Reasoning + Acting) agent using LangChain and LangGraph. + +--- + +## Table of Contents + +1. [Executive Summary](#1-executive-summary) +2. [Current Architecture Analysis](#2-current-architecture-analysis) +3. [ReAct Agent Architecture](#3-react-agent-architecture) +4. [Implementation Guide](#4-implementation-guide) +5. [Command-as-Tool Definitions](#5-command-as-tool-definitions) +6. [Orchestration Scenarios](#6-orchestration-scenarios) +7. [Advanced Patterns](#7-advanced-patterns) +8. [Migration Strategy](#8-migration-strategy) + +--- + +## 1. Executive Summary + +### The Vision + +Transform CodeBuddy from a **command executor** into an **intelligent code assistant** that can: + +- **Chain commands autonomously**: "Review this code and fix any issues" → Review → Identify problems → Refactor → Optimize → Done +- **Make intelligent decisions**: Choose the right tool based on context +- **Maintain conversation context**: Remember what was done and why +- **Self-correct**: If one approach fails, try another + +### Before vs After + +``` +┌─────────────────────────────────────────────────────────────────────────────┐ +│ BEFORE: Linear Command Execution │ +├─────────────────────────────────────────────────────────────────────────────┤ +│ │ +│ User: "Review my code" │ +│ ↓ │ +│ ReviewCode.execute() │ +│ ↓ │ +│ LLM → Response │ +│ ↓ │ +│ Done (User must manually run next command) │ +│ │ +└─────────────────────────────────────────────────────────────────────────────┘ + +┌─────────────────────────────────────────────────────────────────────────────┐ +│ AFTER: ReAct Agent Orchestration │ +├─────────────────────────────────────────────────────────────────────────────┤ +│ │ +│ User: "Review my code and fix any critical issues" │ +│ ↓ │ +│ ┌─────────────────────────────────────────────────────────────────┐ │ +│ │ AGENT LOOP │ │ +│ │ ┌────────────────────────────────────────────────────────────┐ │ │ +│ │ │ 1. REASON: "I need to review the code first" │ │ │ +│ │ │ 2. ACT: Call review_code tool │ │ │ +│ │ │ 3. OBSERVE: "Found SQL injection on line 45" │ │ │ +│ │ │ 4. REASON: "Critical issue found, need to fix it" │ │ │ +│ │ │ 5. ACT: Call refactor_code tool with fix instructions │ │ │ +│ │ │ 6. OBSERVE: "Code refactored with parameterized queries" │ │ │ +│ │ │ 7. REASON: "Should verify the fix is optimal" │ │ │ +│ │ │ 8. ACT: Call optimize_code tool │ │ │ +│ │ │ 9. OBSERVE: "No further optimizations needed" │ │ │ +│ │ │ 10. REASON: "Task complete, ready to respond" │ │ │ +│ │ └────────────────────────────────────────────────────────────┘ │ │ +│ └─────────────────────────────────────────────────────────────────┘ │ +│ ↓ │ +│ Final Response: "I reviewed your code, found a SQL injection │ +│ vulnerability, and fixed it using parameterized │ +│ queries. Here's the improved code..." │ +│ │ +└─────────────────────────────────────────────────────────────────────────────┘ +``` + +--- + +## 2. Current Architecture Analysis + +### Existing Command Structure + +```typescript +// src/commands/handler.ts - Base class pattern +abstract class CodeCommandHandler { + // Multi-LLM support: Gemini, Anthropic, Groq, Deepseek, XGrok + protected createModel(): { generativeAi: string; model: any; modelName: string }; + + // Entry point - gets selected code, sends to LLM + async execute(): Promise; + + // Generate response using configured LLM + protected async generateResponse(prompt: string): Promise; + + // Abstract methods each command implements + abstract formatResponse(comment: string): string; + abstract createPrompt(text?: string): any; +} +``` + +### Current Commands Inventory + +| Command | File | Capability | +|---------|------|------------| +| `ReviewCode` | `review.ts` | Security, performance, architecture analysis | +| `RefactorCode` | `refactor.ts` | Clean code, SOLID principles, design patterns | +| `OptimizeCode` | `optimize.ts` | Performance optimization, complexity reduction | +| `Comments` | `comment.ts` | JSDoc generation, code documentation | +| `ExplainCode` | `explain.ts` | Educational breakdowns, logic explanation | +| `FixError` | `fixError.ts` | Error diagnosis, defensive programming | +| `GenerateUnitTest` | `generate-unit-test.ts` | Test suite generation, mocking strategies | +| `InterviewMe` | `interview-me.ts` | Technical interview preparation | +| `GenerateCommitMessage` | `generate-commit-message.ts` | Git commit message generation | +| `GenerateCodeChart` | `generate-code-chart.ts` | Mermaid diagram generation | + +### Limitations of Current Approach + +1. **No Command Chaining**: User must manually trigger each command +2. **No Context Sharing**: Each command runs in isolation +3. **No Decision Making**: Cannot autonomously decide next steps +4. **No Self-Correction**: Cannot retry with different approaches + +--- + +## 3. ReAct Agent Architecture + +### Core Concepts + +```mermaid +flowchart TB + subgraph ReActLoop["🔄 ReAct Loop"] + Reason["🧠 REASON
Analyze situation,
decide next action"] + Act["⚡ ACT
Execute chosen
tool/command"] + Observe["👁️ OBSERVE
Process tool
output"] + end + + Input["📥 User Input"] --> Reason + Reason --> |"Tool Call"| Act + Act --> Observe + Observe --> |"More work needed"| Reason + Observe --> |"Task complete"| Output["📤 Final Response"] + + subgraph Tools["🔧 Command Tools"] + Review["review_code"] + Refactor["refactor_code"] + Optimize["optimize_code"] + Comment["add_comments"] + Explain["explain_code"] + FixError["fix_error"] + Test["generate_tests"] + Diagram["generate_diagram"] + end + + Act --> Tools + Tools --> Observe +``` + +### LangGraph State Machine + +```mermaid +stateDiagram-v2 + [*] --> Agent: User Message + + Agent --> Tools: tool_calls present + Agent --> [*]: No tool_calls (Final Response) + + Tools --> Agent: Tool Results + + state Agent { + [*] --> Reasoning + Reasoning --> Planning + Planning --> Decision + Decision --> [*] + } + + state Tools { + [*] --> Execute + Execute --> Format + Format --> [*] + } +``` + +### State Definition + +```typescript +// src/agents/langgraph/state/command-agent-state.ts + +import { Annotation, MessagesAnnotation } from "@langchain/langgraph"; +import { BaseMessage } from "@langchain/core/messages"; + +export const CommandAgentState = Annotation.Root({ + // Conversation history (extends MessagesAnnotation) + messages: Annotation({ + reducer: (current, update) => [...current, ...update], + default: () => [], + }), + + // Current code context + selectedCode: Annotation({ + reducer: (_, update) => update, + default: () => "", + }), + + // File context + activeFile: Annotation({ + reducer: (_, update) => update, + default: () => "", + }), + + // Chain of executed commands + executedCommands: Annotation({ + reducer: (current, update) => [...current, ...update], + default: () => [], + }), + + // Accumulated findings/issues + findings: Annotation({ + reducer: (current, update) => [...current, ...update], + default: () => [], + }), + + // Current task status + status: Annotation<"reasoning" | "acting" | "complete" | "error">({ + reducer: (_, update) => update, + default: () => "reasoning", + }), +}); + +interface CommandFinding { + type: "security" | "performance" | "quality" | "bug" | "suggestion"; + severity: "critical" | "high" | "medium" | "low"; + description: string; + location?: string; + fixed: boolean; +} +``` + +--- + +## 4. Implementation Guide + +### Step 1: Create the Command Tools Factory + +```typescript +// src/agents/langgraph/tools/command-tools.ts + +import { DynamicStructuredTool } from "@langchain/core/tools"; +import { z } from "zod"; +import * as vscode from "vscode"; + +// Shared schema for code input +const CodeInputSchema = z.object({ + code: z.string().describe("The source code to analyze"), + context: z.string().optional().describe("Additional context about the code"), + focus: z.string().optional().describe("Specific aspect to focus on"), +}); + +export class CommandToolsFactory { + constructor(private readonly context: vscode.ExtensionContext) {} + + createReviewTool(): DynamicStructuredTool { + return new DynamicStructuredTool({ + name: "review_code", + description: `Perform a comprehensive code review analyzing: + - Security vulnerabilities (SQL injection, XSS, auth issues) + - Performance problems (N+1 queries, memory leaks, complexity) + - Architecture concerns (SOLID violations, coupling) + - Code quality (readability, maintainability) + Returns structured findings with severity levels.`, + schema: CodeInputSchema, + func: async ({ code, context, focus }) => { + const prompt = this.buildReviewPrompt(code, context, focus); + const response = await this.invokeLLM(prompt); + return this.parseReviewResponse(response); + }, + }); + } + + createRefactorTool(): DynamicStructuredTool { + return new DynamicStructuredTool({ + name: "refactor_code", + description: `Refactor code to improve quality. Can: + - Fix identified issues from code review + - Apply design patterns + - Improve naming and structure + - Reduce complexity + - Apply SOLID principles + Specify the issues to fix or improvements to make.`, + schema: z.object({ + code: z.string().describe("The source code to refactor"), + issues: z.array(z.string()).describe("Specific issues to address"), + targetPatterns: z.array(z.string()).optional() + .describe("Design patterns to apply (e.g., 'Strategy', 'Factory')"), + }), + func: async ({ code, issues, targetPatterns }) => { + const prompt = this.buildRefactorPrompt(code, issues, targetPatterns); + return await this.invokeLLM(prompt); + }, + }); + } + + createOptimizeTool(): DynamicStructuredTool { + return new DynamicStructuredTool({ + name: "optimize_code", + description: `Optimize code for performance. Analyzes: + - Time complexity (Big O) + - Space complexity + - Database query efficiency + - Caching opportunities + - Async/parallel execution potential + Returns optimized code with performance annotations.`, + schema: z.object({ + code: z.string().describe("The source code to optimize"), + targetMetric: z.enum(["speed", "memory", "both"]).default("both") + .describe("Primary optimization target"), + constraints: z.string().optional() + .describe("Constraints to maintain (e.g., 'must keep same API')"), + }), + func: async ({ code, targetMetric, constraints }) => { + const prompt = this.buildOptimizePrompt(code, targetMetric, constraints); + return await this.invokeLLM(prompt); + }, + }); + } + + createExplainTool(): DynamicStructuredTool { + return new DynamicStructuredTool({ + name: "explain_code", + description: `Generate educational explanation of code. Provides: + - High-level overview + - Step-by-step logic breakdown + - Key concepts and patterns used + - Potential gotchas and edge cases + Useful for understanding unfamiliar code before modifying it.`, + schema: z.object({ + code: z.string().describe("The source code to explain"), + audienceLevel: z.enum(["beginner", "intermediate", "advanced"]).default("intermediate") + .describe("Target audience expertise level"), + }), + func: async ({ code, audienceLevel }) => { + const prompt = this.buildExplainPrompt(code, audienceLevel); + return await this.invokeLLM(prompt); + }, + }); + } + + createFixErrorTool(): DynamicStructuredTool { + return new DynamicStructuredTool({ + name: "fix_error", + description: `Diagnose and fix code errors. Handles: + - Runtime errors (TypeError, ReferenceError, etc.) + - Logic errors + - Type mismatches + - Edge case failures + Provide the error message and stack trace for best results.`, + schema: z.object({ + code: z.string().describe("The source code with the error"), + errorMessage: z.string().describe("The error message or stack trace"), + errorContext: z.string().optional().describe("When/how the error occurs"), + }), + func: async ({ code, errorMessage, errorContext }) => { + const prompt = this.buildFixErrorPrompt(code, errorMessage, errorContext); + return await this.invokeLLM(prompt); + }, + }); + } + + createGenerateTestsTool(): DynamicStructuredTool { + return new DynamicStructuredTool({ + name: "generate_tests", + description: `Generate comprehensive unit tests. Creates: + - Happy path tests + - Edge case tests + - Error handling tests + - Mock strategies for dependencies + Supports Jest, Mocha, Vitest patterns.`, + schema: z.object({ + code: z.string().describe("The source code to test"), + framework: z.enum(["jest", "mocha", "vitest"]).default("jest") + .describe("Testing framework to use"), + coverage: z.enum(["minimal", "standard", "comprehensive"]).default("standard") + .describe("Desired test coverage level"), + }), + func: async ({ code, framework, coverage }) => { + const prompt = this.buildGenerateTestsPrompt(code, framework, coverage); + return await this.invokeLLM(prompt); + }, + }); + } + + createAddCommentsTool(): DynamicStructuredTool { + return new DynamicStructuredTool({ + name: "add_comments", + description: `Add documentation comments to code. Generates: + - JSDoc/TSDoc for functions and classes + - Inline comments for complex logic + - Module-level documentation + Focuses on WHY, not WHAT.`, + schema: z.object({ + code: z.string().describe("The source code to document"), + style: z.enum(["jsdoc", "tsdoc", "inline"]).default("jsdoc") + .describe("Documentation style"), + }), + func: async ({ code, style }) => { + const prompt = this.buildAddCommentsPrompt(code, style); + return await this.invokeLLM(prompt); + }, + }); + } + + createGenerateDiagramTool(): DynamicStructuredTool { + return new DynamicStructuredTool({ + name: "generate_diagram", + description: `Generate Mermaid diagrams from code. Creates: + - Class diagrams + - Sequence diagrams + - Flowcharts + - Entity-relationship diagrams + Useful for visualizing architecture and flow.`, + schema: z.object({ + code: z.string().describe("The source code to visualize"), + diagramType: z.enum(["class", "sequence", "flowchart", "er"]).default("flowchart") + .describe("Type of diagram to generate"), + }), + func: async ({ code, diagramType }) => { + const prompt = this.buildGenerateDiagramPrompt(code, diagramType); + return await this.invokeLLM(prompt); + }, + }); + } + + // Utility tool for the agent to think through complex problems + createThinkTool(): DynamicStructuredTool { + return new DynamicStructuredTool({ + name: "think", + description: `Use this tool to reason through complex decisions. + When you need to: + - Analyze findings and prioritize next steps + - Decide between multiple approaches + - Plan a multi-step refactoring strategy + Write out your reasoning - this helps maintain context.`, + schema: z.object({ + thought: z.string().describe("Your reasoning and analysis"), + decision: z.string().optional().describe("The decision reached"), + }), + func: async ({ thought, decision }) => { + return `Thought recorded: ${thought}${decision ? `\nDecision: ${decision}` : ""}`; + }, + }); + } + + // Get all command tools + getAllTools(): DynamicStructuredTool[] { + return [ + this.createReviewTool(), + this.createRefactorTool(), + this.createOptimizeTool(), + this.createExplainTool(), + this.createFixErrorTool(), + this.createGenerateTestsTool(), + this.createAddCommentsTool(), + this.createGenerateDiagramTool(), + this.createThinkTool(), + ]; + } + + // Helper methods for prompt building (implement based on existing prompts) + private buildReviewPrompt(code: string, context?: string, focus?: string): string { + // Reuse prompt from ReviewCode command + return `Review the following code...`; + } + + private async invokeLLM(prompt: string): Promise { + // Use configured LLM (Anthropic, Gemini, etc.) + return `LLM response...`; + } + + private parseReviewResponse(response: string): string { + return response; + } + + private buildRefactorPrompt(code: string, issues: string[], patterns?: string[]): string { + return `Refactor the following code...`; + } + + private buildOptimizePrompt(code: string, target: string, constraints?: string): string { + return `Optimize the following code...`; + } + + private buildExplainPrompt(code: string, level: string): string { + return `Explain the following code...`; + } + + private buildFixErrorPrompt(code: string, error: string, context?: string): string { + return `Fix the error in the following code...`; + } + + private buildGenerateTestsPrompt(code: string, framework: string, coverage: string): string { + return `Generate tests for the following code...`; + } + + private buildAddCommentsPrompt(code: string, style: string): string { + return `Add comments to the following code...`; + } + + private buildGenerateDiagramPrompt(code: string, type: string): string { + return `Generate a ${type} diagram for the following code...`; + } +} +``` + +### Step 2: Build the ReAct Graph + +```typescript +// src/agents/langgraph/graphs/command-react-agent.ts + +import { StateGraph, END, START } from "@langchain/langgraph"; +import { ToolNode } from "@langchain/langgraph/prebuilt"; +import { ChatAnthropic } from "@langchain/anthropic"; +import { ChatGoogleGenerativeAI } from "@langchain/google-genai"; +import { AIMessage, BaseMessage, HumanMessage, SystemMessage } from "@langchain/core/messages"; +import { CommandAgentState } from "../state/command-agent-state"; +import { CommandToolsFactory } from "../tools/command-tools"; +import * as vscode from "vscode"; + +const COMMAND_AGENT_SYSTEM_PROMPT = `You are CodeBuddy, an intelligent code assistant that can analyze, review, refactor, and improve code autonomously. + +## Your Capabilities +You have access to these tools: +- **review_code**: Comprehensive code review (security, performance, architecture) +- **refactor_code**: Improve code quality and apply design patterns +- **optimize_code**: Performance optimization +- **explain_code**: Generate educational explanations +- **fix_error**: Diagnose and fix errors +- **generate_tests**: Create unit tests +- **add_comments**: Add documentation +- **generate_diagram**: Create Mermaid diagrams +- **think**: Reason through complex decisions + +## Decision Framework + +When given a task, follow this process: + +1. **UNDERSTAND**: What is the user asking for? What's the scope? + +2. **ANALYZE**: If working with code, start with review_code to understand the codebase + - If critical issues found → plan to fix them + - If performance issues → plan to optimize + - If code is unclear → consider explaining first + +3. **PLAN**: Use the 'think' tool to plan multi-step operations + - Prioritize: Critical security > Performance > Quality > Style + - Consider dependencies between changes + +4. **EXECUTE**: Run tools in logical order + - Review → Identify Issues → Fix/Refactor → Optimize → Verify + - After refactoring, consider if tests are needed + - After major changes, consider adding comments + +5. **VERIFY**: After changes, optionally re-review to confirm fixes + +## Guidelines + +- **Be thorough but focused**: Don't over-engineer simple requests +- **Explain your reasoning**: Tell the user what you found and why you're taking actions +- **Preserve intent**: When refactoring, maintain original functionality +- **Be conservative with changes**: Fix what's broken, improve what's bad, leave what's fine +- **Chain wisely**: Not every review needs a refactor; use judgment + +## Output Format + +When providing final responses: +1. Summarize what you found +2. Explain what actions you took +3. Present the improved code (if applicable) +4. Suggest follow-up actions (if any) +`; + +export class CommandReActAgent { + private graph: ReturnType; + + constructor( + private readonly context: vscode.ExtensionContext, + private readonly config: { + provider: "anthropic" | "gemini" | "groq"; + apiKey: string; + model: string; + } + ) { + this.graph = this.buildGraph(); + } + + private buildGraph() { + // Initialize tools + const toolsFactory = new CommandToolsFactory(this.context); + const tools = toolsFactory.getAllTools(); + const toolNode = new ToolNode(tools); + + // Initialize LLM with tools + const llm = this.createLLM().bindTools(tools); + + // Agent node - reasons and decides on actions + const agentNode = async (state: typeof CommandAgentState.State) => { + const messages = state.messages; + + // Add system message if not present + if (messages.length === 0 || !(messages[0] instanceof SystemMessage)) { + messages.unshift(new SystemMessage(COMMAND_AGENT_SYSTEM_PROMPT)); + } + + const response = await llm.invoke(messages); + + return { + messages: [response], + status: response.tool_calls?.length ? "acting" : "complete", + }; + }; + + // Routing function + const shouldContinue = (state: typeof CommandAgentState.State): string => { + const lastMessage = state.messages[state.messages.length - 1] as AIMessage; + + // If agent made tool calls, route to tools + if (lastMessage.tool_calls && lastMessage.tool_calls.length > 0) { + return "tools"; + } + + // Otherwise, we're done + return END; + }; + + // Build the graph + const workflow = new StateGraph(CommandAgentState) + .addNode("agent", agentNode) + .addNode("tools", toolNode) + .addEdge(START, "agent") + .addConditionalEdges("agent", shouldContinue, { + tools: "tools", + [END]: END, + }) + .addEdge("tools", "agent"); // After tools, go back to agent + + return workflow.compile(); + } + + private createLLM() { + switch (this.config.provider) { + case "anthropic": + return new ChatAnthropic({ + modelName: this.config.model, + anthropicApiKey: this.config.apiKey, + temperature: 0.1, + }); + case "gemini": + return new ChatGoogleGenerativeAI({ + modelName: this.config.model, + apiKey: this.config.apiKey, + temperature: 0.1, + }); + default: + throw new Error(`Unsupported provider: ${this.config.provider}`); + } + } + + async *run(userMessage: string, selectedCode?: string) { + const input = { + messages: [ + new HumanMessage( + selectedCode + ? `${userMessage}\n\nCode:\n\`\`\`\n${selectedCode}\n\`\`\`` + : userMessage + ), + ], + selectedCode: selectedCode || "", + executedCommands: [], + findings: [], + status: "reasoning" as const, + }; + + // Stream events from the graph + const stream = await this.graph.stream(input, { + streamMode: "values", + }); + + for await (const state of stream) { + yield state; + } + } + + async invoke(userMessage: string, selectedCode?: string) { + const input = { + messages: [ + new HumanMessage( + selectedCode + ? `${userMessage}\n\nCode:\n\`\`\`\n${selectedCode}\n\`\`\`` + : userMessage + ), + ], + selectedCode: selectedCode || "", + executedCommands: [], + findings: [], + status: "reasoning" as const, + }; + + return await this.graph.invoke(input); + } +} +``` + +### Step 3: Integration with VS Code Extension + +```typescript +// src/agents/command-agent.service.ts + +import * as vscode from "vscode"; +import { CommandReActAgent } from "./langgraph/graphs/command-react-agent"; +import { Orchestrator } from "../orchestrator"; +import { StreamEventType } from "./interface/agent.interface"; + +export class CommandAgentService { + private agent: CommandReActAgent; + private orchestrator: Orchestrator; + + constructor( + private readonly context: vscode.ExtensionContext, + config: { provider: "anthropic" | "gemini" | "groq"; apiKey: string; model: string } + ) { + this.agent = new CommandReActAgent(context, config); + this.orchestrator = Orchestrator.getInstance(); + } + + async executeWithStreaming( + userMessage: string, + selectedCode?: string, + requestId?: string + ): Promise { + try { + // Notify stream start + await this.orchestrator.publish(StreamEventType.START, { + requestId, + message: "Starting command agent...", + }); + + let fullResponse = ""; + + for await (const state of this.agent.run(userMessage, selectedCode)) { + const lastMessage = state.messages[state.messages.length - 1]; + + if (lastMessage.content && typeof lastMessage.content === "string") { + fullResponse = lastMessage.content; + + // Stream chunk + await this.orchestrator.publish(StreamEventType.CHUNK, { + requestId, + content: lastMessage.content, + accumulated: fullResponse, + }); + } + + // Notify tool usage + if (lastMessage.tool_calls?.length) { + for (const toolCall of lastMessage.tool_calls) { + await this.orchestrator.publish(StreamEventType.TOOL_START, { + requestId, + toolName: toolCall.name, + toolInput: toolCall.args, + }); + } + } + } + + // Notify stream end + await this.orchestrator.publish(StreamEventType.END, { + requestId, + content: fullResponse, + }); + } catch (error: any) { + await this.orchestrator.publish(StreamEventType.ERROR, { + requestId, + error: error.message, + }); + throw error; + } + } +} +``` + +--- + +## 5. Command-as-Tool Definitions + +### Tool Capability Matrix + +``` +┌─────────────────────┬──────────────────────────────────────────────────────────┐ +│ Tool │ Triggers Next Tool When... │ +├─────────────────────┼──────────────────────────────────────────────────────────┤ +│ review_code │ → refactor_code: Critical issues found │ +│ │ → optimize_code: Performance issues found │ +│ │ → fix_error: Bugs identified │ +│ │ → generate_tests: No tests exist for critical code │ +├─────────────────────┼──────────────────────────────────────────────────────────┤ +│ refactor_code │ → review_code: Verify refactoring didn't break anything │ +│ │ → add_comments: Complex refactoring needs documentation │ +│ │ → generate_tests: New code paths need tests │ +├─────────────────────┼──────────────────────────────────────────────────────────┤ +│ optimize_code │ → generate_tests: Performance tests needed │ +│ │ → add_comments: Optimization rationale documentation │ +├─────────────────────┼──────────────────────────────────────────────────────────┤ +│ fix_error │ → generate_tests: Regression test for the fix │ +│ │ → review_code: Verify fix didn't introduce issues │ +├─────────────────────┼──────────────────────────────────────────────────────────┤ +│ explain_code │ → generate_diagram: Visual aid for complex code │ +│ │ → add_comments: Document the explained logic │ +├─────────────────────┼──────────────────────────────────────────────────────────┤ +│ generate_tests │ → review_code: Review test quality │ +├─────────────────────┼──────────────────────────────────────────────────────────┤ +│ generate_diagram │ → (Usually terminal - visual output) │ +├─────────────────────┼──────────────────────────────────────────────────────────┤ +│ add_comments │ → (Usually terminal - documentation complete) │ +└─────────────────────┴──────────────────────────────────────────────────────────┘ +``` + +--- + +## 6. Orchestration Scenarios + +### Scenario 1: "Review and Fix" + +``` +User: "Review this code and fix any critical issues" + +┌─────────────────────────────────────────────────────────────────────────────┐ +│ Agent Execution Trace │ +├─────────────────────────────────────────────────────────────────────────────┤ +│ │ +│ [REASON] User wants review AND fixes. Start with review to identify issues. │ +│ ↓ │ +│ [ACT] Call: review_code({ code: "...", focus: "critical issues" }) │ +│ ↓ │ +│ [OBSERVE] Review Results: │ +│ - 🔴 CRITICAL: SQL Injection on line 23 │ +│ - 🔴 CRITICAL: Hardcoded credentials on line 45 │ +│ - 🟡 MODERATE: N+1 query pattern on line 67 │ +│ ↓ │ +│ [REASON] Found 2 critical issues. Must fix those. N+1 is moderate, │ +│ will address if time permits. │ +│ ↓ │ +│ [ACT] Call: refactor_code({ │ +│ code: "...", │ +│ issues: [ │ +│ "SQL Injection: Use parameterized queries", │ +│ "Hardcoded credentials: Move to environment variables" │ +│ ] │ +│ }) │ +│ ↓ │ +│ [OBSERVE] Refactored code with: │ +│ - Parameterized queries implemented │ +│ - Credentials moved to process.env │ +│ ↓ │ +│ [REASON] Critical issues fixed. Should verify the fix didn't break │ +│ anything and address the N+1 if straightforward. │ +│ ↓ │ +│ [ACT] Call: optimize_code({ │ +│ code: "[refactored code]", │ +│ targetMetric: "speed", │ +│ constraints: "maintain security fixes" │ +│ }) │ +│ ↓ │ +│ [OBSERVE] Optimized: Batch query replaces N+1 pattern │ +│ ↓ │ +│ [REASON] All issues addressed. Ready to respond to user. │ +│ ↓ │ +│ [RESPOND] "I reviewed your code and found 2 critical security │ +│ vulnerabilities and 1 performance issue. Here's what I fixed..." │ +│ │ +└─────────────────────────────────────────────────────────────────────────────┘ +``` + +### Scenario 2: "Make This Code Production-Ready" + +``` +User: "Make this code production-ready" + +┌─────────────────────────────────────────────────────────────────────────────┐ +│ Agent Execution Trace │ +├─────────────────────────────────────────────────────────────────────────────┤ +│ │ +│ [REASON] "Production-ready" is broad. Need comprehensive approach: │ +│ 1. Review for issues │ +│ 2. Fix problems │ +│ 3. Add documentation │ +│ 4. Add tests │ +│ Let me use 'think' to plan this. │ +│ ↓ │ +│ [ACT] Call: think({ │ +│ thought: "Production-ready checklist: │ +│ 1. Security audit │ +│ 2. Performance optimization │ +│ 3. Error handling │ +│ 4. Documentation │ +│ 5. Unit tests │ +│ Will execute review first to understand current state." │ +│ }) │ +│ ↓ │ +│ [ACT] Call: review_code({ code: "...", focus: "production readiness" }) │ +│ ↓ │ +│ [OBSERVE] Findings: │ +│ - No input validation │ +│ - Missing error handling │ +│ - No logging │ +│ - Undocumented functions │ +│ - No tests │ +│ ↓ │ +│ [ACT] Call: refactor_code({ │ +│ code: "...", │ +│ issues: ["Add input validation", "Add try-catch blocks", "Add logging"] │ +│ }) │ +│ ↓ │ +│ [ACT] Call: add_comments({ code: "[refactored]", style: "jsdoc" }) │ +│ ↓ │ +│ [ACT] Call: generate_tests({ │ +│ code: "[documented]", │ +│ framework: "jest", │ +│ coverage: "comprehensive" │ +│ }) │ +│ ↓ │ +│ [RESPOND] "I've made your code production-ready: │ +│ ✅ Added input validation │ +│ ✅ Implemented error handling with logging │ +│ ✅ Added JSDoc documentation │ +│ ✅ Generated comprehensive unit tests │ +│ Here's the improved code and test file..." │ +│ │ +└─────────────────────────────────────────────────────────────────────────────┘ +``` + +### Scenario 3: "I'm Getting This Error" + +``` +User: "I'm getting 'Cannot read property 'map' of undefined' on line 15" + +┌─────────────────────────────────────────────────────────────────────────────┐ +│ Agent Execution Trace │ +├─────────────────────────────────────────────────────────────────────────────┤ +│ │ +│ [REASON] User has a specific error. Use fix_error tool directly. │ +│ ↓ │ +│ [ACT] Call: fix_error({ │ +│ code: "...", │ +│ errorMessage: "Cannot read property 'map' of undefined", │ +│ errorContext: "line 15" │ +│ }) │ +│ ↓ │ +│ [OBSERVE] Diagnosis: │ +│ - `users` variable can be undefined when API returns empty │ +│ - Fix: Add null check or default to empty array │ +│ - Fixed code provided │ +│ ↓ │ +│ [REASON] Error fixed, but this type of bug suggests missing defensive │ +│ programming. Should suggest a test to prevent regression. │ +│ ↓ │ +│ [ACT] Call: generate_tests({ │ +│ code: "[fixed code]", │ +│ framework: "jest", │ +│ coverage: "minimal" // Just for the fixed function │ +│ }) │ +│ ↓ │ +│ [RESPOND] "I found the issue! The `users` variable is undefined when │ +│ the API returns empty. Here's the fix with a null check: │ +│ [code] │ +│ I also generated a test to prevent this regression: │ +│ [test code]" │ +│ │ +└─────────────────────────────────────────────────────────────────────────────┘ +``` + +--- + +## 7. Advanced Patterns + +### Human-in-the-Loop Interrupts + +For sensitive operations, require human approval: + +```typescript +// Define interrupt points +const interruptConfig = { + refactor_code: { + condition: (args) => args.issues.some(i => i.includes("security")), + message: "Agent wants to refactor security-related code. Approve?", + }, + fix_error: { + condition: (args) => args.code.includes("database") || args.code.includes("auth"), + message: "Agent wants to modify database/auth code. Approve?", + }, +}; + +// In graph, add interrupt before tool execution +const toolNodeWithInterrupt = async (state) => { + const lastMessage = state.messages[state.messages.length - 1]; + + for (const toolCall of lastMessage.tool_calls) { + const config = interruptConfig[toolCall.name]; + if (config?.condition(toolCall.args)) { + // Interrupt for approval + const approved = await requestHumanApproval(config.message, toolCall); + if (!approved) { + return { messages: [new AIMessage("Operation cancelled by user.")] }; + } + } + } + + // Execute tools + return toolNode.invoke(state); +}; +``` + +### Parallel Tool Execution + +When tools are independent, run them in parallel: + +```typescript +// Agent can request parallel execution +const agentNode = async (state) => { + // ... + // When agent determines tools can run in parallel: + // It returns multiple tool_calls in a single response + // LangGraph's ToolNode handles parallel execution automatically +}; +``` + +### Memory and Context Management + +```typescript +// Add checkpointing for conversation persistence +import { SqliteSaver } from "@langchain/langgraph-checkpoint-sqlite"; + +const checkpointer = new SqliteSaver(":memory:"); // or path to SQLite file + +const workflow = new StateGraph(CommandAgentState) + // ... nodes and edges + .compile({ checkpointer }); + +// Conversations are automatically persisted by thread_id +await workflow.invoke(input, { configurable: { thread_id: "user-123-session-456" } }); +``` + +### Tool Result Caching + +```typescript +// Cache expensive tool results +const cacheableToolNode = async (state) => { + const cache = new Map(); + + for (const toolCall of state.messages[state.messages.length - 1].tool_calls) { + const cacheKey = JSON.stringify({ name: toolCall.name, args: toolCall.args }); + + if (cache.has(cacheKey)) { + // Return cached result + continue; + } + + // Execute and cache + const result = await executeTool(toolCall); + cache.set(cacheKey, result); + } + + // ... return results +}; +``` + +--- + +## 8. Migration Strategy + +### Phase 1: Parallel Implementation (Week 1-2) + +1. Create `CommandToolsFactory` with all command tools +2. Build `CommandReActAgent` graph +3. Add new "Smart Mode" toggle in UI +4. Keep existing commands working alongside agent + +### Phase 2: Integration (Week 3-4) + +1. Integrate agent with existing webview providers +2. Add streaming support for agent responses +3. Implement human-in-the-loop for sensitive operations +4. Add tool execution visibility in UI + +### Phase 3: Enhancement (Week 5-6) + +1. Add conversation memory/persistence +2. Implement parallel tool execution +3. Add tool result caching +4. Performance optimization + +### Phase 4: Migration (Week 7-8) + +1. Default new users to agent mode +2. Migrate existing command shortcuts to agent +3. Deprecate direct command execution (keep as fallback) +4. Documentation and user guides + +--- + +## Appendix: File Structure + +``` +src/agents/ +├── langgraph/ +│ ├── graphs/ +│ │ ├── command-react-agent.ts # Main ReAct agent implementation +│ │ └── builder.ts # Graph builder utilities +│ ├── state/ +│ │ └── command-agent-state.ts # State annotation definition +│ ├── tools/ +│ │ ├── command-tools.ts # Command-as-tool wrappers +│ │ ├── provider.ts # Tool provider/factory +│ │ └── file.ts, web.ts, think.ts # Existing tools +│ └── interface.ts # Type definitions +├── command-agent.service.ts # VS Code integration service +└── interface/ + └── agent.interface.ts # Shared interfaces +``` + +--- + +## References + +- [LangGraph Documentation](https://langchain-ai.github.io/langgraph/) +- [ReAct Pattern Paper](https://arxiv.org/abs/2210.03629) +- [LangChain Tools Guide](https://js.langchain.com/docs/modules/agents/tools/) +- [Anthropic Tool Use](https://docs.anthropic.com/claude/docs/tool-use) diff --git a/package-lock.json b/package-lock.json index 37ce11a..be4613d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,21 +1,23 @@ { "name": "ola-code-buddy", - "version": "3.6.3", + "version": "3.7.30", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ola-code-buddy", - "version": "3.6.3", + "version": "3.7.30", "license": "MIT", "dependencies": { "@anthropic-ai/sdk": "^0.52.0", "@chroma-core/default-embed": "^0.1.8", "@google/genai": "^0.7.0", "@google/generative-ai": "^0.21.0", - "@langchain/core": "^0.3.79", - "@langchain/google-genai": "^0.2.18", - "@langchain/langgraph": "^0.4.9", + "@langchain/anthropic": "^1.0.0", + "@langchain/core": "^1.0.0", + "@langchain/groq": "^1.0.2", + "@langchain/langgraph": "^1.0.0", + "@langchain/langgraph-checkpoint-sqlite": "^1.0.0", "@mozilla/readability": "^0.4.1", "@types/fast-levenshtein": "^0.0.4", "@types/node-fetch": "^2.6.11", @@ -23,11 +25,13 @@ "@vscode/ripgrep": "^1.17.0", "apache-arrow": "18.1.0", "axios": "^1.7.9", + "deepagents": "^1.1.1", "dompurify": "^3.2.6", "dotenv": "^16.1.4", "fast-levenshtein": "^3.0.0", "groq-sdk": "^0.22.0", "jsdom": "^26.0.0", + "langchain": "^1.0.4", "llama3-tokenizer-js": "^1.2.0", "lru-cache": "^11.2.2", "markdown-it": "^14.1.0", @@ -68,7 +72,6 @@ "version": "0.52.0", "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.52.0.tgz", "integrity": "sha512-d4c+fg+xy9e46c8+YnrrgIQR45CZlAi7PwdzIfDXDM6ACxEZli1/fxhURsq30ZpMZy6LvSkr41jGq5aF5TD7rQ==", - "license": "MIT", "bin": { "anthropic-ai-sdk": "bin/cli" } @@ -77,7 +80,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-3.2.0.tgz", "integrity": "sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw==", - "license": "MIT", "dependencies": { "@csstools/css-calc": "^2.1.3", "@csstools/css-color-parser": "^3.0.9", @@ -89,15 +91,21 @@ "node_modules/@asamuzakjp/css-color/node_modules/lru-cache": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "license": "ISC" + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "node_modules/@babel/runtime": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", + "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", + "engines": { + "node": ">=6.9.0" + } }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@cfworker/json-schema": { "version": "4.1.1", @@ -105,9 +113,9 @@ "integrity": "sha512-gAmrUZSGtKc3AiBL71iNWxDsyUC5uMaKKGdvzYsBoTW/xi42JQHl7eKV2OYzCUqvc+D2RCcf7EXY2iCyFIk6og==" }, "node_modules/@chroma-core/ai-embeddings-common": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/@chroma-core/ai-embeddings-common/-/ai-embeddings-common-0.1.7.tgz", - "integrity": "sha512-9ToziKEz0gD+kkFKkZaeAUyGW0gRDVZcKtAmSO0d0xzFIVCkjWChND1VaHjvozRypEKzjjCqN8t1bzA+YxtBxQ==", + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/@chroma-core/ai-embeddings-common/-/ai-embeddings-common-0.1.9.tgz", + "integrity": "sha512-4KeOVWutaz9MaNfkBfvcSD0bTLIlDLErCKR5UAXGj1xPpzPuhpt1J04RcfN0L/hSXQlyHw+BU+9QFDcOQCw6NA==", "dependencies": { "ajv": "^8.17.1" }, @@ -115,34 +123,12 @@ "node": ">=20" } }, - "node_modules/@chroma-core/ai-embeddings-common/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@chroma-core/ai-embeddings-common/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "license": "MIT" - }, "node_modules/@chroma-core/default-embed": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/@chroma-core/default-embed/-/default-embed-0.1.8.tgz", - "integrity": "sha512-9FaSEvGhkO/JHud3SEwHn9BhqHHhcd8jBwI89hW+IBUu3peJ4O8Pq0CtQuuOulqhzhJMHP6Ya1HB4ESXwjEYdw==", + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/@chroma-core/default-embed/-/default-embed-0.1.9.tgz", + "integrity": "sha512-TBqdI9qstl06EiqeHmGZheMvAqRZDewFLn4We5JeNPDwxhrMRbZlD5mOs95z6+eyjkkDstdOjbPuZNNEDhc7FQ==", "dependencies": { - "@chroma-core/ai-embeddings-common": "^0.1.7", + "@chroma-core/ai-embeddings-common": "^0.1.9", "@huggingface/transformers": "^3.5.1" }, "engines": { @@ -150,9 +136,9 @@ } }, "node_modules/@csstools/color-helpers": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.0.2.tgz", - "integrity": "sha512-JqWH1vsgdGcw2RR6VliXXdA0/59LttzlU8UlRT/iUUsEeWfYq8I+K0yhihEUTTHLRm1EXvpsCx3083EU15ecsA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.1.0.tgz", + "integrity": "sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==", "funding": [ { "type": "github", @@ -163,7 +149,6 @@ "url": "https://opencollective.com/csstools" } ], - "license": "MIT-0", "engines": { "node": ">=18" } @@ -182,7 +167,6 @@ "url": "https://opencollective.com/csstools" } ], - "license": "MIT", "engines": { "node": ">=18" }, @@ -192,9 +176,9 @@ } }, "node_modules/@csstools/css-color-parser": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.0.10.tgz", - "integrity": "sha512-TiJ5Ajr6WRd1r8HSiwJvZBiJOqtH86aHpUjq5aEKWHiII2Qfjqd/HCWKPOW8EP4vcspXbHnXrwIDlu5savQipg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.1.0.tgz", + "integrity": "sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==", "funding": [ { "type": "github", @@ -205,9 +189,8 @@ "url": "https://opencollective.com/csstools" } ], - "license": "MIT", "dependencies": { - "@csstools/color-helpers": "^5.0.2", + "@csstools/color-helpers": "^5.1.0", "@csstools/css-calc": "^2.1.4" }, "engines": { @@ -232,7 +215,7 @@ "url": "https://opencollective.com/csstools" } ], - "license": "MIT", + "peer": true, "engines": { "node": ">=18" }, @@ -254,32 +237,25 @@ "url": "https://opencollective.com/csstools" } ], - "license": "MIT", + "peer": true, "engines": { "node": ">=18" } }, "node_modules/@emnapi/runtime": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.5.0.tgz", - "integrity": "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.7.1.tgz", + "integrity": "sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==", "license": "MIT", "optional": true, "dependencies": { "tslib": "^2.4.0" } }, - "node_modules/@emnapi/runtime/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD", - "optional": true - }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.8.tgz", - "integrity": "sha512-urAvrUedIqEiFR3FYSLTWQgLu5tb+m0qZw0NBEasUeo6wuqatkMDaRT+1uABiGXEu5vqgPd7FGE1BhsAIy9QVA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", "cpu": [ "ppc64" ], @@ -294,9 +270,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.8.tgz", - "integrity": "sha512-RONsAvGCz5oWyePVnLdZY/HHwA++nxYWIX1atInlaW6SEkwq6XkP3+cb825EUcRs5Vss/lGh/2YxAb5xqc07Uw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", "cpu": [ "arm" ], @@ -311,9 +287,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.8.tgz", - "integrity": "sha512-OD3p7LYzWpLhZEyATcTSJ67qB5D+20vbtr6vHlHWSQYhKtzUYrETuWThmzFpZtFsBIxRvhO07+UgVA9m0i/O1w==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", "cpu": [ "arm64" ], @@ -328,9 +304,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.8.tgz", - "integrity": "sha512-yJAVPklM5+4+9dTeKwHOaA+LQkmrKFX96BM0A/2zQrbS6ENCmxc4OVoBs5dPkCCak2roAD+jKCdnmOqKszPkjA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", "cpu": [ "x64" ], @@ -345,14 +321,13 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.8.tgz", - "integrity": "sha512-Jw0mxgIaYX6R8ODrdkLLPwBqHTtYHJSmzzd+QeytSugzQ0Vg4c5rDky5VgkoowbZQahCbsv1rT1KW72MPIkevw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "darwin" @@ -362,9 +337,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.8.tgz", - "integrity": "sha512-Vh2gLxxHnuoQ+GjPNvDSDRpoBCUzY4Pu0kBqMBDlK4fuWbKgGtmDIeEC081xi26PPjn+1tct+Bh8FjyLlw1Zlg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", "cpu": [ "x64" ], @@ -379,9 +354,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.8.tgz", - "integrity": "sha512-YPJ7hDQ9DnNe5vxOm6jaie9QsTwcKedPvizTVlqWG9GBSq+BuyWEDazlGaDTC5NGU4QJd666V0yqCBL2oWKPfA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", "cpu": [ "arm64" ], @@ -396,9 +371,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.8.tgz", - "integrity": "sha512-MmaEXxQRdXNFsRN/KcIimLnSJrk2r5H8v+WVafRWz5xdSVmWLoITZQXcgehI2ZE6gioE6HirAEToM/RvFBeuhw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", "cpu": [ "x64" ], @@ -413,9 +388,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.8.tgz", - "integrity": "sha512-FuzEP9BixzZohl1kLf76KEVOsxtIBFwCaLupVuk4eFVnOZfU+Wsn+x5Ryam7nILV2pkq2TqQM9EZPsOBuMC+kg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", "cpu": [ "arm" ], @@ -430,9 +405,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.8.tgz", - "integrity": "sha512-WIgg00ARWv/uYLU7lsuDK00d/hHSfES5BzdWAdAig1ioV5kaFNrtK8EqGcUBJhYqotlUByUKz5Qo6u8tt7iD/w==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", "cpu": [ "arm64" ], @@ -447,9 +422,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.8.tgz", - "integrity": "sha512-A1D9YzRX1i+1AJZuFFUMP1E9fMaYY+GnSQil9Tlw05utlE86EKTUA7RjwHDkEitmLYiFsRd9HwKBPEftNdBfjg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", "cpu": [ "ia32" ], @@ -464,9 +439,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.8.tgz", - "integrity": "sha512-O7k1J/dwHkY1RMVvglFHl1HzutGEFFZ3kNiDMSOyUrB7WcoHGf96Sh+64nTRT26l3GMbCW01Ekh/ThKM5iI7hQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", "cpu": [ "loong64" ], @@ -481,9 +456,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.8.tgz", - "integrity": "sha512-uv+dqfRazte3BzfMp8PAQXmdGHQt2oC/y2ovwpTteqrMx2lwaksiFZ/bdkXJC19ttTvNXBuWH53zy/aTj1FgGw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", "cpu": [ "mips64el" ], @@ -498,9 +473,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.8.tgz", - "integrity": "sha512-GyG0KcMi1GBavP5JgAkkstMGyMholMDybAf8wF5A70CALlDM2p/f7YFE7H92eDeH/VBtFJA5MT4nRPDGg4JuzQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", "cpu": [ "ppc64" ], @@ -515,9 +490,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.8.tgz", - "integrity": "sha512-rAqDYFv3yzMrq7GIcen3XP7TUEG/4LK86LUPMIz6RT8A6pRIDn0sDcvjudVZBiiTcZCY9y2SgYX2lgK3AF+1eg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", "cpu": [ "riscv64" ], @@ -532,9 +507,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.8.tgz", - "integrity": "sha512-Xutvh6VjlbcHpsIIbwY8GVRbwoviWT19tFhgdA7DlenLGC/mbc3lBoVb7jxj9Z+eyGqvcnSyIltYUrkKzWqSvg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", "cpu": [ "s390x" ], @@ -549,9 +524,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.8.tgz", - "integrity": "sha512-ASFQhgY4ElXh3nDcOMTkQero4b1lgubskNlhIfJrsH5OKZXDpUAKBlNS0Kx81jwOBp+HCeZqmoJuihTv57/jvQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", "cpu": [ "x64" ], @@ -566,9 +541,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.8.tgz", - "integrity": "sha512-d1KfruIeohqAi6SA+gENMuObDbEjn22olAR7egqnkCD9DGBG0wsEARotkLgXDu6c4ncgWTZJtN5vcgxzWRMzcw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", "cpu": [ "arm64" ], @@ -583,9 +558,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.8.tgz", - "integrity": "sha512-nVDCkrvx2ua+XQNyfrujIG38+YGyuy2Ru9kKVNyh5jAys6n+l44tTtToqHjino2My8VAY6Lw9H7RI73XFi66Cg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", "cpu": [ "x64" ], @@ -600,9 +575,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.8.tgz", - "integrity": "sha512-j8HgrDuSJFAujkivSMSfPQSAa5Fxbvk4rgNAS5i3K+r8s1X0p1uOO2Hl2xNsGFppOeHOLAVgYwDVlmxhq5h+SQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", "cpu": [ "arm64" ], @@ -617,9 +592,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.8.tgz", - "integrity": "sha512-1h8MUAwa0VhNCDp6Af0HToI2TJFAn1uqT9Al6DJVzdIBAd21m/G0Yfc77KDM3uF3T/YaOgQq3qTJHPbTOInaIQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", "cpu": [ "x64" ], @@ -634,9 +609,9 @@ } }, "node_modules/@esbuild/openharmony-arm64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.8.tgz", - "integrity": "sha512-r2nVa5SIK9tSWd0kJd9HCffnDHKchTGikb//9c7HX+r+wHYCpQrSgxhlY6KWV1nFo1l4KFbsMlHk+L6fekLsUg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", "cpu": [ "arm64" ], @@ -651,9 +626,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.8.tgz", - "integrity": "sha512-zUlaP2S12YhQ2UzUfcCuMDHQFJyKABkAjvO5YSndMiIkMimPmxA+BYSBikWgsRpvyxuRnow4nS5NPnf9fpv41w==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", "cpu": [ "x64" ], @@ -668,9 +643,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.8.tgz", - "integrity": "sha512-YEGFFWESlPva8hGL+zvj2z/SaK+pH0SwOM0Nc/d+rVnW7GSTFlLBGzZkuSU9kFIGIo8q9X3ucpZhu8PDN5A2sQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", "cpu": [ "arm64" ], @@ -685,9 +660,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.8.tgz", - "integrity": "sha512-hiGgGC6KZ5LZz58OL/+qVVoZiuZlUYlYHNAmczOm7bs2oE1XriPFi5ZHHrS8ACpV5EjySrnoCKmcbQMN+ojnHg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", "cpu": [ "ia32" ], @@ -702,9 +677,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.8.tgz", - "integrity": "sha512-cn3Yr7+OaaZq1c+2pe+8yxC8E144SReCQjN6/2ynubzYjvyqZjTXfQJpAcQpsdJq3My7XADANiYGHoFC69pLQw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", "cpu": [ "x64" ], @@ -719,11 +694,10 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", - "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", "dev": true, - "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.4.3" }, @@ -738,11 +712,10 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true, - "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -752,7 +725,6 @@ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, - "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -771,23 +743,43 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -800,7 +792,6 @@ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, - "license": "MIT", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -809,7 +800,6 @@ "version": "0.7.0", "resolved": "https://registry.npmjs.org/@google/genai/-/genai-0.7.0.tgz", "integrity": "sha512-r+Fwj/emnXZN5R+4JCxDXboY4AGTmTn7+Wnori5dgyJiStP0P82f9YYL0CVsCnDIumNY2i0UIcZ1zGZdtHJ34w==", - "license": "Apache-2.0", "dependencies": { "google-auth-library": "^9.14.2", "ws": "^8.18.0" @@ -822,151 +812,27 @@ "version": "0.21.0", "resolved": "https://registry.npmjs.org/@google/generative-ai/-/generative-ai-0.21.0.tgz", "integrity": "sha512-7XhUbtnlkSEZK15kN3t+tzIMxsbKm/dSkKBFalj+20NvPKe1kBY7mR2P7vuijEn+f06z5+A8bVGKO0v39cr6Wg==", - "license": "Apache-2.0", "engines": { "node": ">=18.0.0" } }, - "node_modules/@huggingface/transformers": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/@huggingface/transformers/-/transformers-3.7.3.tgz", - "integrity": "sha512-on3Y4Pn9oK/OqNKygojnAn6RePtOVlIZbMFwnP6Q8q9p6UiYPp5IDR08KWN0FSic5fBbrZvF+vVH67vNXBqZvA==", - "license": "Apache-2.0", - "dependencies": { - "@huggingface/jinja": "^0.5.1", - "onnxruntime-node": "1.21.0", - "onnxruntime-web": "1.22.0-dev.20250409-89f8206ba4", - "sharp": "^0.34.1" - } - }, - "node_modules/@huggingface/transformers/node_modules/@huggingface/jinja": { + "node_modules/@huggingface/jinja": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/@huggingface/jinja/-/jinja-0.5.1.tgz", "integrity": "sha512-yUZLld4lrM9iFxHCwFQ7D1HW2MWMwSbeB7WzWqFYDWK+rEb+WldkLdAJxUPOmgICMHZLzZGVcVjFh3w/YGubng==", - "license": "MIT", "engines": { "node": ">=18" } }, - "node_modules/@huggingface/transformers/node_modules/flatbuffers": { - "version": "25.2.10", - "resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-25.2.10.tgz", - "integrity": "sha512-7JlN9ZvLDG1McO3kbX0k4v+SUAg48L1rIwEvN6ZQl/eCtgJz9UylTMzE9wrmYrcorgxm3CX/3T/w5VAub99UUw==", - "license": "Apache-2.0" - }, - "node_modules/@huggingface/transformers/node_modules/long": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", - "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", - "license": "Apache-2.0" - }, - "node_modules/@huggingface/transformers/node_modules/onnxruntime-common": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/onnxruntime-common/-/onnxruntime-common-1.21.0.tgz", - "integrity": "sha512-Q632iLLrtCAVOTO65dh2+mNbQir/QNTVBG3h/QdZBpns7mZ0RYbLRBgGABPbpU9351AgYy7SJf1WaeVwMrBFPQ==", - "license": "MIT" - }, - "node_modules/@huggingface/transformers/node_modules/onnxruntime-node": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/onnxruntime-node/-/onnxruntime-node-1.21.0.tgz", - "integrity": "sha512-NeaCX6WW2L8cRCSqy3bInlo5ojjQqu2fD3D+9W5qb5irwxhEyWKXeH2vZ8W9r6VxaMPUan+4/7NDwZMtouZxEw==", - "hasInstallScript": true, - "license": "MIT", - "os": [ - "win32", - "darwin", - "linux" - ], - "dependencies": { - "global-agent": "^3.0.0", - "onnxruntime-common": "1.21.0", - "tar": "^7.0.1" - } - }, - "node_modules/@huggingface/transformers/node_modules/onnxruntime-web": { - "version": "1.22.0-dev.20250409-89f8206ba4", - "resolved": "https://registry.npmjs.org/onnxruntime-web/-/onnxruntime-web-1.22.0-dev.20250409-89f8206ba4.tgz", - "integrity": "sha512-0uS76OPgH0hWCPrFKlL8kYVV7ckM7t/36HfbgoFw6Nd0CZVVbQC4PkrR8mBX8LtNUFZO25IQBqV2Hx2ho3FlbQ==", - "license": "MIT", - "dependencies": { - "flatbuffers": "^25.1.24", - "guid-typescript": "^1.0.9", - "long": "^5.2.3", - "onnxruntime-common": "1.22.0-dev.20250409-89f8206ba4", - "platform": "^1.3.6", - "protobufjs": "^7.2.4" - } - }, - "node_modules/@huggingface/transformers/node_modules/onnxruntime-web/node_modules/onnxruntime-common": { - "version": "1.22.0-dev.20250409-89f8206ba4", - "resolved": "https://registry.npmjs.org/onnxruntime-common/-/onnxruntime-common-1.22.0-dev.20250409-89f8206ba4.tgz", - "integrity": "sha512-vDJMkfCfb0b1A836rgHj+ORuZf4B4+cc2bASQtpeoJLueuFc5DuYwjIZUBrSvx/fO5IrLjLz+oTrB3pcGlhovQ==", - "license": "MIT" - }, - "node_modules/@huggingface/transformers/node_modules/protobufjs": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz", - "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==", - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@huggingface/transformers/node_modules/sharp": { - "version": "0.34.3", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.3.tgz", - "integrity": "sha512-eX2IQ6nFohW4DbvHIOLRB3MHFpYqaqvXd3Tp5e/T/dSH83fxaNJQRvDMhASmkNTsNTVF2/OOopzRCt7xokgPfg==", - "hasInstallScript": true, - "license": "Apache-2.0", + "node_modules/@huggingface/transformers": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@huggingface/transformers/-/transformers-3.8.0.tgz", + "integrity": "sha512-bEvx9k/fnhjKtekc1pDYLGDhVwxW5mO3k4UkP/mJQtQI5dC34daCQ28O1B19lkyM0QYFwAj+RGl0qOjE9Upt/w==", "dependencies": { - "color": "^4.2.3", - "detect-libc": "^2.0.4", - "semver": "^7.7.2" - }, - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-darwin-arm64": "0.34.3", - "@img/sharp-darwin-x64": "0.34.3", - "@img/sharp-libvips-darwin-arm64": "1.2.0", - "@img/sharp-libvips-darwin-x64": "1.2.0", - "@img/sharp-libvips-linux-arm": "1.2.0", - "@img/sharp-libvips-linux-arm64": "1.2.0", - "@img/sharp-libvips-linux-ppc64": "1.2.0", - "@img/sharp-libvips-linux-s390x": "1.2.0", - "@img/sharp-libvips-linux-x64": "1.2.0", - "@img/sharp-libvips-linuxmusl-arm64": "1.2.0", - "@img/sharp-libvips-linuxmusl-x64": "1.2.0", - "@img/sharp-linux-arm": "0.34.3", - "@img/sharp-linux-arm64": "0.34.3", - "@img/sharp-linux-ppc64": "0.34.3", - "@img/sharp-linux-s390x": "0.34.3", - "@img/sharp-linux-x64": "0.34.3", - "@img/sharp-linuxmusl-arm64": "0.34.3", - "@img/sharp-linuxmusl-x64": "0.34.3", - "@img/sharp-wasm32": "0.34.3", - "@img/sharp-win32-arm64": "0.34.3", - "@img/sharp-win32-ia32": "0.34.3", - "@img/sharp-win32-x64": "0.34.3" + "@huggingface/jinja": "^0.5.1", + "onnxruntime-node": "1.21.0", + "onnxruntime-web": "1.22.0-dev.20250409-89f8206ba4", + "sharp": "^0.34.1" } }, "node_modules/@humanwhocodes/config-array": { @@ -975,7 +841,6 @@ "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", "deprecated": "Use @eslint/config-array instead", "dev": true, - "license": "Apache-2.0", "dependencies": { "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", @@ -986,11 +851,10 @@ } }, "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1001,7 +865,6 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -1014,7 +877,6 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=12.22" }, @@ -1028,17 +890,23 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "deprecated": "Use @eslint/object-schema instead", - "dev": true, - "license": "BSD-3-Clause" + "dev": true + }, + "node_modules/@img/colour": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.0.0.tgz", + "integrity": "sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==", + "engines": { + "node": ">=18" + } }, "node_modules/@img/sharp-darwin-arm64": { - "version": "0.34.3", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.3.tgz", - "integrity": "sha512-ryFMfvxxpQRsgZJqBd4wsttYQbCxsJksrv9Lw/v798JcQ8+w84mBWuXwl+TT0WJ/WrYOLaYpwQXi3sA9nTIaIg==", + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz", + "integrity": "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==", "cpu": [ "arm64" ], - "license": "Apache-2.0", "optional": true, "os": [ "darwin" @@ -1050,13 +918,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-darwin-arm64": "1.2.0" + "@img/sharp-libvips-darwin-arm64": "1.2.4" } }, "node_modules/@img/sharp-darwin-x64": { - "version": "0.34.3", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.3.tgz", - "integrity": "sha512-yHpJYynROAj12TA6qil58hmPmAwxKKC7reUqtGLzsOHfP7/rniNGTL8tjWX6L3CTV4+5P4ypcS7Pp+7OB+8ihA==", + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz", + "integrity": "sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==", "cpu": [ "x64" ], @@ -1072,17 +940,16 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-darwin-x64": "1.2.0" + "@img/sharp-libvips-darwin-x64": "1.2.4" } }, "node_modules/@img/sharp-libvips-darwin-arm64": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.0.tgz", - "integrity": "sha512-sBZmpwmxqwlqG9ueWFXtockhsxefaV6O84BMOrhtg/YqbTaRdqDE7hxraVE3y6gVM4eExmfzW4a8el9ArLeEiQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz", + "integrity": "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==", "cpu": [ "arm64" ], - "license": "LGPL-3.0-or-later", "optional": true, "os": [ "darwin" @@ -1092,9 +959,9 @@ } }, "node_modules/@img/sharp-libvips-darwin-x64": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.0.tgz", - "integrity": "sha512-M64XVuL94OgiNHa5/m2YvEQI5q2cl9d/wk0qFTDVXcYzi43lxuiFTftMR1tOnFQovVXNZJ5TURSDK2pNe9Yzqg==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz", + "integrity": "sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==", "cpu": [ "x64" ], @@ -1108,9 +975,9 @@ } }, "node_modules/@img/sharp-libvips-linux-arm": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.0.tgz", - "integrity": "sha512-mWd2uWvDtL/nvIzThLq3fr2nnGfyr/XMXlq8ZJ9WMR6PXijHlC3ksp0IpuhK6bougvQrchUAfzRLnbsen0Cqvw==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz", + "integrity": "sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==", "cpu": [ "arm" ], @@ -1124,9 +991,9 @@ } }, "node_modules/@img/sharp-libvips-linux-arm64": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.0.tgz", - "integrity": "sha512-RXwd0CgG+uPRX5YYrkzKyalt2OJYRiJQ8ED/fi1tq9WQW2jsQIn0tqrlR5l5dr/rjqq6AHAxURhj2DVjyQWSOA==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz", + "integrity": "sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==", "cpu": [ "arm64" ], @@ -1140,9 +1007,9 @@ } }, "node_modules/@img/sharp-libvips-linux-ppc64": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.0.tgz", - "integrity": "sha512-Xod/7KaDDHkYu2phxxfeEPXfVXFKx70EAFZ0qyUdOjCcxbjqyJOEUpDe6RIyaunGxT34Anf9ue/wuWOqBW2WcQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.4.tgz", + "integrity": "sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==", "cpu": [ "ppc64" ], @@ -1155,10 +1022,26 @@ "url": "https://opencollective.com/libvips" } }, + "node_modules/@img/sharp-libvips-linux-riscv64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.2.4.tgz", + "integrity": "sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==", + "cpu": [ + "riscv64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, "node_modules/@img/sharp-libvips-linux-s390x": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.0.tgz", - "integrity": "sha512-eMKfzDxLGT8mnmPJTNMcjfO33fLiTDsrMlUVcp6b96ETbnJmd4uvZxVJSKPQfS+odwfVaGifhsB07J1LynFehw==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.4.tgz", + "integrity": "sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==", "cpu": [ "s390x" ], @@ -1172,9 +1055,9 @@ } }, "node_modules/@img/sharp-libvips-linux-x64": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.0.tgz", - "integrity": "sha512-ZW3FPWIc7K1sH9E3nxIGB3y3dZkpJlMnkk7z5tu1nSkBoCgw2nSRTFHI5pB/3CQaJM0pdzMF3paf9ckKMSE9Tg==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.4.tgz", + "integrity": "sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==", "cpu": [ "x64" ], @@ -1188,9 +1071,9 @@ } }, "node_modules/@img/sharp-libvips-linuxmusl-arm64": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.0.tgz", - "integrity": "sha512-UG+LqQJbf5VJ8NWJ5Z3tdIe/HXjuIdo4JeVNADXBFuG7z9zjoegpzzGIyV5zQKi4zaJjnAd2+g2nna8TZvuW9Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.4.tgz", + "integrity": "sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==", "cpu": [ "arm64" ], @@ -1204,9 +1087,9 @@ } }, "node_modules/@img/sharp-libvips-linuxmusl-x64": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.0.tgz", - "integrity": "sha512-SRYOLR7CXPgNze8akZwjoGBoN1ThNZoqpOgfnOxmWsklTGVfJiGJoC/Lod7aNMGA1jSsKWM1+HRX43OP6p9+6Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.4.tgz", + "integrity": "sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==", "cpu": [ "x64" ], @@ -1220,9 +1103,9 @@ } }, "node_modules/@img/sharp-linux-arm": { - "version": "0.34.3", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.3.tgz", - "integrity": "sha512-oBK9l+h6KBN0i3dC8rYntLiVfW8D8wH+NPNT3O/WBHeW0OQWCjfWksLUaPidsrDKpJgXp3G3/hkmhptAW0I3+A==", + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.5.tgz", + "integrity": "sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==", "cpu": [ "arm" ], @@ -1238,13 +1121,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-arm": "1.2.0" + "@img/sharp-libvips-linux-arm": "1.2.4" } }, "node_modules/@img/sharp-linux-arm64": { - "version": "0.34.3", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.3.tgz", - "integrity": "sha512-QdrKe3EvQrqwkDrtuTIjI0bu6YEJHTgEeqdzI3uWJOH6G1O8Nl1iEeVYRGdj1h5I21CqxSvQp1Yv7xeU3ZewbA==", + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.5.tgz", + "integrity": "sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==", "cpu": [ "arm64" ], @@ -1260,13 +1143,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-arm64": "1.2.0" + "@img/sharp-libvips-linux-arm64": "1.2.4" } }, "node_modules/@img/sharp-linux-ppc64": { - "version": "0.34.3", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.3.tgz", - "integrity": "sha512-GLtbLQMCNC5nxuImPR2+RgrviwKwVql28FWZIW1zWruy6zLgA5/x2ZXk3mxj58X/tszVF69KK0Is83V8YgWhLA==", + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.5.tgz", + "integrity": "sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==", "cpu": [ "ppc64" ], @@ -1282,13 +1165,35 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-ppc64": "1.2.0" + "@img/sharp-libvips-linux-ppc64": "1.2.4" + } + }, + "node_modules/@img/sharp-linux-riscv64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.34.5.tgz", + "integrity": "sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==", + "cpu": [ + "riscv64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-riscv64": "1.2.4" } }, "node_modules/@img/sharp-linux-s390x": { - "version": "0.34.3", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.3.tgz", - "integrity": "sha512-3gahT+A6c4cdc2edhsLHmIOXMb17ltffJlxR0aC2VPZfwKoTGZec6u5GrFgdR7ciJSsHT27BD3TIuGcuRT0KmQ==", + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.5.tgz", + "integrity": "sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==", "cpu": [ "s390x" ], @@ -1304,13 +1209,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-s390x": "1.2.0" + "@img/sharp-libvips-linux-s390x": "1.2.4" } }, "node_modules/@img/sharp-linux-x64": { - "version": "0.34.3", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.3.tgz", - "integrity": "sha512-8kYso8d806ypnSq3/Ly0QEw90V5ZoHh10yH0HnrzOCr6DKAPI6QVHvwleqMkVQ0m+fc7EH8ah0BB0QPuWY6zJQ==", + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.5.tgz", + "integrity": "sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==", "cpu": [ "x64" ], @@ -1326,13 +1231,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-x64": "1.2.0" + "@img/sharp-libvips-linux-x64": "1.2.4" } }, "node_modules/@img/sharp-linuxmusl-arm64": { - "version": "0.34.3", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.3.tgz", - "integrity": "sha512-vAjbHDlr4izEiXM1OTggpCcPg9tn4YriK5vAjowJsHwdBIdx0fYRsURkxLG2RLm9gyBq66gwtWI8Gx0/ov+JKQ==", + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.5.tgz", + "integrity": "sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==", "cpu": [ "arm64" ], @@ -1348,13 +1253,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-arm64": "1.2.0" + "@img/sharp-libvips-linuxmusl-arm64": "1.2.4" } }, "node_modules/@img/sharp-linuxmusl-x64": { - "version": "0.34.3", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.3.tgz", - "integrity": "sha512-gCWUn9547K5bwvOn9l5XGAEjVTTRji4aPTqLzGXHvIr6bIDZKNTA34seMPgM0WmSf+RYBH411VavCejp3PkOeQ==", + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.5.tgz", + "integrity": "sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==", "cpu": [ "x64" ], @@ -1370,20 +1275,20 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-x64": "1.2.0" + "@img/sharp-libvips-linuxmusl-x64": "1.2.4" } }, "node_modules/@img/sharp-wasm32": { - "version": "0.34.3", - "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.3.tgz", - "integrity": "sha512-+CyRcpagHMGteySaWos8IbnXcHgfDn7pO2fiC2slJxvNq9gDipYBN42/RagzctVRKgxATmfqOSulgZv5e1RdMg==", + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.5.tgz", + "integrity": "sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==", "cpu": [ "wasm32" ], "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", "optional": true, "dependencies": { - "@emnapi/runtime": "^1.4.4" + "@emnapi/runtime": "^1.7.0" }, "engines": { "node": "^18.17.0 || ^20.3.0 || >=21.0.0" @@ -1393,9 +1298,9 @@ } }, "node_modules/@img/sharp-win32-arm64": { - "version": "0.34.3", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.3.tgz", - "integrity": "sha512-MjnHPnbqMXNC2UgeLJtX4XqoVHHlZNd+nPt1kRPmj63wURegwBhZlApELdtxM2OIZDRv/DFtLcNhVbd1z8GYXQ==", + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.5.tgz", + "integrity": "sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==", "cpu": [ "arm64" ], @@ -1412,9 +1317,9 @@ } }, "node_modules/@img/sharp-win32-ia32": { - "version": "0.34.3", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.3.tgz", - "integrity": "sha512-xuCdhH44WxuXgOM714hn4amodJMZl3OEvf0GVTm0BEyMeA2to+8HEdRPShH0SLYptJY1uBw+SCFP9WVQi1Q/cw==", + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.5.tgz", + "integrity": "sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==", "cpu": [ "ia32" ], @@ -1431,9 +1336,9 @@ } }, "node_modules/@img/sharp-win32-x64": { - "version": "0.34.3", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.3.tgz", - "integrity": "sha512-OWwz05d++TxzLEv4VnsTz5CmZ6mI6S05sfQGEMrNrQcOEERbX46332IvE7pO/EUiw7jUrrS40z/M7kPyjfl04g==", + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.5.tgz", + "integrity": "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==", "cpu": [ "x64" ], @@ -1454,7 +1359,6 @@ "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", @@ -1468,11 +1372,10 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -1481,11 +1384,10 @@ } }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -1500,7 +1402,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", - "license": "ISC", "dependencies": { "minipass": "^7.0.4" }, @@ -1513,7 +1414,6 @@ "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -1523,24 +1423,21 @@ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, - "license": "MIT" + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, - "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -1550,7 +1447,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz", "integrity": "sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==", - "license": "MIT", "dependencies": { "debug": "^4.1.1" } @@ -1558,112 +1454,157 @@ "node_modules/@kwsites/promise-deferred": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", - "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==", - "license": "MIT" + "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==" + }, + "node_modules/@langchain/anthropic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@langchain/anthropic/-/anthropic-1.1.3.tgz", + "integrity": "sha512-vJN7Rfl+8lDO+aVFfccDUFxIMwGtf8xHSWvqmeytOB5UBzGxNMRW2Zdu6Gv8vWrKlS6Ca7/8oB1suw1SN0FKGA==", + "dependencies": { + "@anthropic-ai/sdk": "^0.71.0" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@langchain/core": "^1.0.0" + } + }, + "node_modules/@langchain/anthropic/node_modules/@anthropic-ai/sdk": { + "version": "0.71.0", + "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.71.0.tgz", + "integrity": "sha512-go1XeWXmpxuiTkosSXpb8tokLk2ZLkIRcXpbWVwJM6gH5OBtHOVsfPfGuqI1oW7RRt4qc59EmYbrXRZ0Ng06Jw==", + "dependencies": { + "json-schema-to-ts": "^3.1.1" + }, + "bin": { + "anthropic-ai-sdk": "bin/cli" + }, + "peerDependencies": { + "zod": "^3.25.0 || ^4.0.0" + }, + "peerDependenciesMeta": { + "zod": { + "optional": true + } + } }, "node_modules/@langchain/core": { - "version": "0.3.79", - "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.3.79.tgz", - "integrity": "sha512-ZLAs5YMM5N2UXN3kExMglltJrKKoW7hs3KMZFlXUnD7a5DFKBYxPFMeXA4rT+uvTxuJRZPCYX0JKI5BhyAWx4A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@langchain/core/-/core-1.1.0.tgz", + "integrity": "sha512-yJ6JHcU9psjnQbzRFkXjIdNTA+3074dA+2pHdH8ewvQCSleSk6JcjkCMIb5+NASjeMoi1ZuntlLKVsNqF38YxA==", + "peer": true, "dependencies": { "@cfworker/json-schema": "^4.0.2", "ansi-styles": "^5.0.0", "camelcase": "6", "decamelize": "1.2.0", "js-tiktoken": "^1.0.12", - "langsmith": "^0.3.67", + "langsmith": "^0.3.64", "mustache": "^4.2.0", "p-queue": "^6.6.2", - "p-retry": "4", + "p-retry": "^7.0.0", "uuid": "^10.0.0", - "zod": "^3.25.32", - "zod-to-json-schema": "^3.22.3" + "zod": "^3.25.76 || ^4" }, "engines": { - "node": ">=18" + "node": ">=20" } }, - "node_modules/@langchain/core/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/@langchain/groq": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@langchain/groq/-/groq-1.0.2.tgz", + "integrity": "sha512-buD2oSPFv8QpJpkoTS+xkBLNUeOrplmPFdiipt/qmYvaL/YOz0/tnMzTARCyeq2+jJvxV609cbuyW5aGvRQ3Rg==", + "dependencies": { + "groq-sdk": "^0.19.0" + }, "engines": { - "node": ">=10" + "node": ">=20" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "peerDependencies": { + "@langchain/core": "^1.0.0" } }, - "node_modules/@langchain/core/node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "engines": { - "node": ">=0.10.0" + "node_modules/@langchain/groq/node_modules/@types/node": { + "version": "18.19.130", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", + "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", + "dependencies": { + "undici-types": "~5.26.4" } }, - "node_modules/@langchain/core/node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" + "node_modules/@langchain/groq/node_modules/groq-sdk": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/groq-sdk/-/groq-sdk-0.19.0.tgz", + "integrity": "sha512-vdh5h7ORvwvOvutA80dKF81b0gPWHxu6K/GOJBOM0n6p6CSqAVLhFfeS79Ef0j/yCycDR09jqY7jkYz9dLiS6w==", + "dependencies": { + "@types/node": "^18.11.18", + "@types/node-fetch": "^2.6.4", + "abort-controller": "^3.0.0", + "agentkeepalive": "^4.2.1", + "form-data-encoder": "1.7.2", + "formdata-node": "^4.3.2", + "node-fetch": "^2.6.7" } }, - "node_modules/@langchain/google-genai": { - "version": "0.2.18", - "resolved": "https://registry.npmjs.org/@langchain/google-genai/-/google-genai-0.2.18.tgz", - "integrity": "sha512-m9EiN3VKC01A7/625YQ6Q1Lqq8zueewADX4W5Tcme4RImN75zkg2Z7FYbD1Fo6Zwolc4wBNO6LUtbg3no4rv1Q==", + "node_modules/@langchain/groq/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { - "@google/generative-ai": "^0.24.0", - "uuid": "^11.1.0" + "whatwg-url": "^5.0.0" }, "engines": { - "node": ">=18" + "node": "4.x || >=6.0.0" }, "peerDependencies": { - "@langchain/core": ">=0.3.58 <0.4.0" + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } } }, - "node_modules/@langchain/google-genai/node_modules/@google/generative-ai": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/@google/generative-ai/-/generative-ai-0.24.1.tgz", - "integrity": "sha512-MqO+MLfM6kjxcKoy0p1wRzG3b4ZZXtPI+z2IE26UogS2Cm/XHO+7gGRBh6gcJsOiIVoH93UwKvW4HdgiOZCy9Q==", - "engines": { - "node": ">=18.0.0" - } + "node_modules/@langchain/groq/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, - "node_modules/@langchain/google-genai/node_modules/uuid": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", - "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/esm/bin/uuid" + "node_modules/@langchain/groq/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "node_modules/@langchain/groq/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/@langchain/groq/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } }, "node_modules/@langchain/langgraph": { - "version": "0.4.9", - "resolved": "https://registry.npmjs.org/@langchain/langgraph/-/langgraph-0.4.9.tgz", - "integrity": "sha512-+rcdTGi4Ium4X/VtIX3Zw4RhxEkYWpwUyz806V6rffjHOAMamg6/WZDxpJbrP33RV/wJG1GH12Z29oX3Pqq3Aw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@langchain/langgraph/-/langgraph-1.0.2.tgz", + "integrity": "sha512-syxzzWTnmpCL+RhUEvalUeOXFoZy/KkzHa2Da2gKf18zsf9Dkbh3rfnRDrTyUGS1XSTejq07s4rg1qntdEDs2A==", "dependencies": { - "@langchain/langgraph-checkpoint": "^0.1.1", - "@langchain/langgraph-sdk": "~0.1.0", - "uuid": "^10.0.0", - "zod": "^3.25.32" + "@langchain/langgraph-checkpoint": "^1.0.0", + "@langchain/langgraph-sdk": "~1.0.0", + "uuid": "^10.0.0" }, "engines": { "node": ">=18" }, "peerDependencies": { - "@langchain/core": ">=0.3.58 < 0.4.0", + "@langchain/core": "^1.0.1", + "zod": "^3.25.32 || ^4.1.0", "zod-to-json-schema": "^3.x" }, "peerDependenciesMeta": { @@ -1673,9 +1614,10 @@ } }, "node_modules/@langchain/langgraph-checkpoint": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@langchain/langgraph-checkpoint/-/langgraph-checkpoint-0.1.1.tgz", - "integrity": "sha512-h2bP0RUikQZu0Um1ZUPErQLXyhzroJqKRbRcxYRTAh49oNlsfeq4A3K4YEDRbGGuyPZI/Jiqwhks1wZwY73AZw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@langchain/langgraph-checkpoint/-/langgraph-checkpoint-1.0.0.tgz", + "integrity": "sha512-xrclBGvNCXDmi0Nz28t3vjpxSH6UYx6w5XAXSiiB1WEdc2xD2iY/a913I3x3a31XpInUW/GGfXXfePfaghV54A==", + "peer": true, "dependencies": { "uuid": "^10.0.0" }, @@ -1683,33 +1625,35 @@ "node": ">=18" }, "peerDependencies": { - "@langchain/core": ">=0.2.31 <0.4.0 || ^1.0.0-alpha" + "@langchain/core": "^1.0.1" } }, - "node_modules/@langchain/langgraph-checkpoint/node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" + "node_modules/@langchain/langgraph-checkpoint-sqlite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@langchain/langgraph-checkpoint-sqlite/-/langgraph-checkpoint-sqlite-1.0.0.tgz", + "integrity": "sha512-0YL5A5YiC7e85JGJqTXy92iLHWqIMKzbTw88/gnM1UjArG289s4fITPkJlD6I04j5uOcjHXUVeBfBLgRTm7R0w==", + "dependencies": { + "better-sqlite3": "^11.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@langchain/core": "^1.0.1", + "@langchain/langgraph-checkpoint": "^1.0.0" } }, "node_modules/@langchain/langgraph-sdk": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/@langchain/langgraph-sdk/-/langgraph-sdk-0.1.10.tgz", - "integrity": "sha512-9srSCb2bSvcvehMgjA2sMMwX0o1VUgPN6ghwm5Fwc9JGAKsQa6n1S4eCwy1h4abuYxwajH5n3spBw+4I2WYbgw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@langchain/langgraph-sdk/-/langgraph-sdk-1.0.2.tgz", + "integrity": "sha512-r3noE2KouUdfRCmHxZcS06Io8I3jplEXA+ORpYECa89VAdHWaknWRJMIBBwVJkQQJ9fvNBmOmyfTcbRkeTTakw==", "dependencies": { - "@types/json-schema": "^7.0.15", "p-queue": "^6.6.2", "p-retry": "4", "uuid": "^9.0.0" }, "peerDependencies": { - "@langchain/core": ">=0.2.31 <0.4.0 || ^1.0.0-alpha", + "@langchain/core": "^1.0.1", "react": "^18 || ^19", "react-dom": "^18 || ^19" }, @@ -1725,10 +1669,22 @@ } } }, - "node_modules/@langchain/langgraph/node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "node_modules/@langchain/langgraph-sdk/node_modules/p-retry": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", + "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", + "dependencies": { + "@types/retry": "0.12.0", + "retry": "^0.13.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@langchain/langgraph-sdk/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" @@ -1749,7 +1705,6 @@ "version": "0.4.4", "resolved": "https://registry.npmjs.org/@mozilla/readability/-/readability-0.4.4.tgz", "integrity": "sha512-MCgZyANpJ6msfvVMi6+A0UAsvZj//4OHREYUB9f2087uXHVoU+H+SWhuihvb1beKpM323bReQPRio0WNk2+V6g==", - "license": "Apache-2.0", "engines": { "node": ">=14.0.0" } @@ -1758,8 +1713,6 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -1772,8 +1725,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } @@ -1782,8 +1733,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -1797,7 +1746,6 @@ "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, - "license": "MIT", "optional": true, "engines": { "node": ">=14" @@ -1806,32 +1754,27 @@ "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", - "license": "BSD-3-Clause" + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" }, "node_modules/@protobufjs/base64": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", - "license": "BSD-3-Clause" + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" }, "node_modules/@protobufjs/codegen": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", - "license": "BSD-3-Clause" + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" }, "node_modules/@protobufjs/eventemitter": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", - "license": "BSD-3-Clause" + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" }, "node_modules/@protobufjs/fetch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.1", "@protobufjs/inquire": "^1.1.0" @@ -1840,32 +1783,27 @@ "node_modules/@protobufjs/float": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", - "license": "BSD-3-Clause" + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" }, "node_modules/@protobufjs/inquire": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", - "license": "BSD-3-Clause" + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" }, "node_modules/@protobufjs/path": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", - "license": "BSD-3-Clause" + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" }, "node_modules/@protobufjs/pool": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", - "license": "BSD-3-Clause" + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" }, "node_modules/@protobufjs/utf8": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", - "license": "BSD-3-Clause" + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, "node_modules/@redis/bloom": { "version": "1.2.0", @@ -1879,6 +1817,7 @@ "version": "1.6.1", "resolved": "https://registry.npmjs.org/@redis/client/-/client-1.6.1.tgz", "integrity": "sha512-/KCsg3xSlR+nCK8/8ZYSknYxvXHwubJrU82F3Lm1Fp6789VQ0/3RJKfsmRXjqfaTA++23CvC3hqmqe/2GEt6Kw==", + "peer": true, "dependencies": { "cluster-key-slot": "1.1.2", "generic-pool": "3.9.0", @@ -1888,11 +1827,6 @@ "node": ">=14" } }, - "node_modules/@redis/client/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, "node_modules/@redis/graph": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@redis/graph/-/graph-1.1.1.tgz", @@ -1929,7 +1863,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "license": "BSD-3-Clause", "dependencies": { "type-detect": "4.0.8" } @@ -1938,19 +1871,16 @@ "version": "11.3.1", "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.3.1.tgz", "integrity": "sha512-EVJO7nW5M/F5Tur0Rf2z/QoMo+1Ia963RiMtapiQrEWvY0iBUvADo8Beegwjpnle5BHkyHuoxSTW3jF43H1XRA==", - "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^3.0.1" } }, "node_modules/@sinonjs/samsam": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.2.tgz", - "integrity": "sha512-v46t/fwnhejRSFTGqbpn9u+LQ9xJDse10gNnPgAcxgdoCDMXj/G2asWAC/8Qs+BAZDicX+MNZouXT1A7c83kVw==", - "license": "BSD-3-Clause", + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.3.tgz", + "integrity": "sha512-hw6HbX+GyVZzmaYNh82Ecj1vdGZrqVIn/keDTg63IgAwiQPO+xCz99uG6Woqgb4tM0mUiFENKZ4cqd7IX94AXQ==", "dependencies": { "@sinonjs/commons": "^3.0.1", - "lodash.get": "^4.4.2", "type-detect": "^4.1.0" } }, @@ -1958,7 +1888,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", - "license": "MIT", "engines": { "node": ">=4" } @@ -1966,52 +1895,42 @@ "node_modules/@sinonjs/text-encoding": { "version": "0.7.3", "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.3.tgz", - "integrity": "sha512-DE427ROAphMQzU4ENbliGYrBSYPXF+TtLg9S8vzeA+OF4ZKzoDdzfL8sxuMUGS/lgRhM6j1URSk9ghf7Xo1tyA==", - "license": "(Unlicense OR Apache-2.0)" + "integrity": "sha512-DE427ROAphMQzU4ENbliGYrBSYPXF+TtLg9S8vzeA+OF4ZKzoDdzfL8sxuMUGS/lgRhM6j1URSk9ghf7Xo1tyA==" }, "node_modules/@swc/helpers": { "version": "0.5.17", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.17.tgz", "integrity": "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==", - "license": "Apache-2.0", "dependencies": { "tslib": "^2.8.0" } }, - "node_modules/@swc/helpers/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, "node_modules/@types/command-line-args": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-5.2.3.tgz", - "integrity": "sha512-uv0aG6R0Y8WHZLTamZwtfsDLVRnOa+n+n5rEvFWL5Na5gZ8V2Teab/duDPFzIIIhs9qizDpcavCusCLJZu62Kw==", - "license": "MIT" + "integrity": "sha512-uv0aG6R0Y8WHZLTamZwtfsDLVRnOa+n+n5rEvFWL5Na5gZ8V2Teab/duDPFzIIIhs9qizDpcavCusCLJZu62Kw==" }, "node_modules/@types/command-line-usage": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/@types/command-line-usage/-/command-line-usage-5.0.4.tgz", - "integrity": "sha512-BwR5KP3Es/CSht0xqBcUXS3qCAUVXwpRKsV2+arxeb65atasuXG9LykC9Ab10Cw3s2raH92ZqOeILaQbsB2ACg==", - "license": "MIT" + "integrity": "sha512-BwR5KP3Es/CSht0xqBcUXS3qCAUVXwpRKsV2+arxeb65atasuXG9LykC9Ab10Cw3s2raH92ZqOeILaQbsB2ACg==" }, "node_modules/@types/dompurify": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/dompurify/-/dompurify-3.0.5.tgz", - "integrity": "sha512-1Wg0g3BtQF7sSb27fJQAKck1HECM6zV1EB66j8JH9i3LCjYabJa0FSdiSgsD5K/RbrsR0SiraKacLB+T8ZVYAg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@types/dompurify/-/dompurify-3.2.0.tgz", + "integrity": "sha512-Fgg31wv9QbLDA0SpTOXO3MaxySc4DKGLi8sna4/Utjo4r3ZRPdCt4UQee8BWr+Q5z21yifghREPJGYaEOEIACg==", + "deprecated": "This is a stub types definition. dompurify provides its own type definitions, so you do not need this installed.", "dev": true, - "license": "MIT", "dependencies": { - "@types/trusted-types": "*" + "dompurify": "*" } }, "node_modules/@types/emscripten": { - "version": "1.40.1", - "resolved": "https://registry.npmjs.org/@types/emscripten/-/emscripten-1.40.1.tgz", - "integrity": "sha512-sr53lnYkQNhjHNN0oJDdUm5564biioI5DuOpycufDVK7D3y+GR3oUswe2rlwY1nPNyusHbrJ9WoTyIHl4/Bpwg==", + "version": "1.41.5", + "resolved": "https://registry.npmjs.org/@types/emscripten/-/emscripten-1.41.5.tgz", + "integrity": "sha512-cMQm7pxu6BxtHyqJ7mQZ2kXWV5SLmugybFdHCBbJ5eHzOo6VhBckEgAT3//rP5FwPHNPeEiq4SmQ5ucBwsOo4Q==", "devOptional": true, - "license": "MIT" + "peer": true }, "node_modules/@types/fast-levenshtein": { "version": "0.0.4", @@ -2022,15 +1941,13 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@types/jsdom": { "version": "21.1.7", "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.7.tgz", "integrity": "sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*", "@types/tough-cookie": "*", @@ -2041,21 +1958,19 @@ "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "license": "MIT" + "dev": true }, "node_modules/@types/linkify-it": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.5.tgz", "integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@types/markdown-it": { "version": "13.0.9", "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-13.0.9.tgz", "integrity": "sha512-1XPwR0+MgXLWfTn9gCsZ55AHOKW1WN+P9vr0PaQh5aerR9LLQXUbjfEAFhjmEmyoYFWAyuN2Mqkn40MZ4ukjBw==", "dev": true, - "license": "MIT", "dependencies": { "@types/linkify-it": "^3", "@types/mdurl": "^1" @@ -2065,38 +1980,33 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.5.tgz", "integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@types/mocha": { "version": "10.0.10", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@types/node": { "version": "20.2.5", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz", - "integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==", - "license": "MIT" + "integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==" }, "node_modules/@types/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==", - "license": "MIT", + "version": "2.6.13", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.13.tgz", + "integrity": "sha512-QGpRVpzSaUs30JBSGPjOg4Uveu384erbHBoT1zeONvyCfwQxIkUshLAOqN/k9EjGviPRmWTTe6aH2qySWKTVSw==", "dependencies": { "@types/node": "*", - "form-data": "^4.0.0" + "form-data": "^4.0.4" } }, "node_modules/@types/readable-stream": { - "version": "4.0.21", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.21.tgz", - "integrity": "sha512-19eKVv9tugr03IgfXlA9UVUVRbW6IuqRO5B92Dl4a6pT7K8uaGrNS0GkxiZD0BOk6PLuXl5FhWl//eX/pzYdTQ==", + "version": "4.0.22", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.22.tgz", + "integrity": "sha512-/FFhJpfCLAPwAcN3mFycNUa77ddnr8jTgF5VmSNetaemWB2cIlfCA9t0YTM3JAT0wOcv8D4tjPo7pkDhK3EJIg==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*" } @@ -2107,35 +2017,31 @@ "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==" }, "node_modules/@types/semver": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz", - "integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==", - "dev": true, - "license": "MIT" + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==", + "dev": true }, "node_modules/@types/sinon": { "version": "17.0.4", "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.4.tgz", "integrity": "sha512-RHnIrhfPO3+tJT0s7cFaXGZvsL4bbR3/k7z3P312qMS4JaS2Tk+KiwiLx1S0rQ56ERj00u1/BtdyVd0FY+Pdew==", "dev": true, - "license": "MIT", "dependencies": { "@types/sinonjs__fake-timers": "*" } }, "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.5", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz", - "integrity": "sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==", - "dev": true, - "license": "MIT" + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-15.0.1.tgz", + "integrity": "sha512-Ko2tjWJq8oozHzHV+reuvS5KYIRAokHnGbDwGh/J64LntgpbuylF74ipEL24HCyRjf9FOlBiBHWBR1RlVKsI1w==", + "dev": true }, "node_modules/@types/sql.js": { "version": "1.4.9", "resolved": "https://registry.npmjs.org/@types/sql.js/-/sql.js-1.4.9.tgz", "integrity": "sha512-ep8b36RKHlgWPqjNG9ToUrPiwkhwh0AEzy883mO5Xnd+cL6VBH1EvSjBAAuxLUFF2Vn/moE3Me6v9E1Lo+48GQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/emscripten": "*", "@types/node": "*" @@ -2145,15 +2051,13 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@types/trusted-types": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", - "devOptional": true, - "license": "MIT" + "optional": true }, "node_modules/@types/uuid": { "version": "10.0.0", @@ -2161,11 +2065,10 @@ "integrity": "sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==" }, "node_modules/@types/vscode": { - "version": "1.100.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.100.0.tgz", - "integrity": "sha512-4uNyvzHoraXEeCamR3+fzcBlh7Afs4Ifjs4epINyUX/jvdk0uzLnwiDY35UKDKnkCHP5Nu3dljl2H8lR6s+rQw==", - "dev": true, - "license": "MIT" + "version": "1.106.1", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.106.1.tgz", + "integrity": "sha512-R/HV8u2h8CAddSbX8cjpdd7B8/GnE4UjgjpuGuHcbp1xV6yh4OeqU4L1pKjlwujCrSFS0MOpwJAIs/NexMB1fQ==", + "dev": true }, "node_modules/@types/webidl-conversions": { "version": "7.0.3", @@ -2185,7 +2088,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", "dev": true, - "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.4.0", "@typescript-eslint/scope-manager": "5.62.0", @@ -2220,7 +2122,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", "dev": true, - "license": "BSD-2-Clause", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "5.62.0", "@typescript-eslint/types": "5.62.0", @@ -2248,7 +2150,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", "dev": true, - "license": "MIT", "dependencies": { "@typescript-eslint/types": "5.62.0", "@typescript-eslint/visitor-keys": "5.62.0" @@ -2266,7 +2167,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", "dev": true, - "license": "MIT", "dependencies": { "@typescript-eslint/typescript-estree": "5.62.0", "@typescript-eslint/utils": "5.62.0", @@ -2294,7 +2194,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", "dev": true, - "license": "MIT", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -2308,7 +2207,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "@typescript-eslint/types": "5.62.0", "@typescript-eslint/visitor-keys": "5.62.0", @@ -2336,7 +2234,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", "dev": true, - "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", @@ -2363,7 +2260,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", "dev": true, - "license": "MIT", "dependencies": { "@typescript-eslint/types": "5.62.0", "eslint-visitor-keys": "^3.3.0" @@ -2380,15 +2276,13 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", - "dev": true, - "license": "ISC" + "dev": true }, "node_modules/@vscode/ripgrep": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/@vscode/ripgrep/-/ripgrep-1.17.0.tgz", "integrity": "sha512-mBRKm+ASPkUcw4o9aAgfbusIu6H4Sdhw09bjeP1YOBFTJEZAnrnk6WZwzv8NEjgC82f7ILvhmb1WIElSugea6g==", "hasInstallScript": true, - "license": "MIT", "dependencies": { "https-proxy-agent": "^7.0.2", "proxy-from-env": "^1.1.0", @@ -2400,7 +2294,6 @@ "resolved": "https://registry.npmjs.org/@vscode/test-cli/-/test-cli-0.0.8.tgz", "integrity": "sha512-sBSMSDzJChiiDjmys2Q6uI4SIoUYf0t6oDsQO3ypaQ7udha9YD4e2On9e9VE5OBayZMpxbgJX+NudmCwJMdOIg==", "dev": true, - "license": "MIT", "dependencies": { "@types/mocha": "^10.0.2", "c8": "^9.1.0", @@ -2421,7 +2314,6 @@ "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.5.2.tgz", "integrity": "sha512-8ukpxv4wYe0iWMRQU18jhzJOHkeGKbnw7xWRX3Zw1WJA4cEKbHcmmLPdPrPtL6rhDcrlCZN+xKRpv09n4gRHYg==", "dev": true, - "license": "MIT", "dependencies": { "http-proxy-agent": "^7.0.2", "https-proxy-agent": "^7.0.5", @@ -2437,7 +2329,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "license": "MIT", "dependencies": { "event-target-shim": "^5.0.0" }, @@ -2446,11 +2337,11 @@ } }, "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, - "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2463,7 +2354,6 @@ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -2487,10 +2377,9 @@ } }, "node_modules/agent-base": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", - "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", - "license": "MIT", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", "engines": { "node": ">= 14" } @@ -2499,7 +2388,6 @@ "version": "4.6.0", "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz", "integrity": "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==", - "license": "MIT", "dependencies": { "humanize-ms": "^1.2.1" }, @@ -2508,16 +2396,14 @@ } }, "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -2529,7 +2415,6 @@ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -2539,21 +2424,16 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" @@ -2564,7 +2444,6 @@ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, - "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -2577,7 +2456,6 @@ "version": "18.1.0", "resolved": "https://registry.npmjs.org/apache-arrow/-/apache-arrow-18.1.0.tgz", "integrity": "sha512-v/ShMp57iBnBp4lDgV8Jx3d3Q5/Hac25FWmQ98eMahUiHPXcvwIMKJD0hBIgclm/FCG+LwPkAKtkRO1O/W0YGg==", - "license": "Apache-2.0", "dependencies": { "@swc/helpers": "^0.5.11", "@types/command-line-args": "^5.2.3", @@ -2594,32 +2472,13 @@ } }, "node_modules/apache-arrow/node_modules/@types/node": { - "version": "20.19.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.15.tgz", - "integrity": "sha512-W3bqcbLsRdFDVcmAM5l6oLlcl67vjevn8j1FPZ4nx+K5jNoWCh+FC/btxFoBPnvQlrHHDwfjp1kjIEDfwJ0Mog==", - "license": "MIT", + "version": "20.19.25", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.25.tgz", + "integrity": "sha512-ZsJzA5thDQMSQO788d7IocwwQbI8B5OPzmqNvpf3NY/+MHDAS759Wo0gd2WQeXYt5AAAQjzcrTVC6SKCuYgoCQ==", "dependencies": { "undici-types": "~6.21.0" } }, - "node_modules/apache-arrow/node_modules/flatbuffers": { - "version": "24.12.23", - "resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-24.12.23.tgz", - "integrity": "sha512-dLVCAISd5mhls514keQzmEG6QHmUUsNuWsb4tFafIUwvvgDjXhtfAYSKOzt5SWOy+qByV5pbsDZ+Vb7HUOBEdA==", - "license": "Apache-2.0" - }, - "node_modules/apache-arrow/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/apache-arrow/node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "license": "MIT" - }, "node_modules/apparatus": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/apparatus/-/apparatus-0.0.10.tgz", @@ -2634,16 +2493,14 @@ "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "license": "Python-2.0" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "node_modules/array-back": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz", - "integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==", - "license": "MIT", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", "engines": { - "node": ">=12.17" + "node": ">=6" } }, "node_modules/array-union": { @@ -2651,7 +2508,6 @@ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -2664,8 +2520,7 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { "version": "1.13.2", @@ -2681,8 +2536,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/base64-js": { "version": "1.5.1", @@ -2701,8 +2555,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/basic-auth": { "version": "2.0.1", @@ -2720,11 +2573,20 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "node_modules/better-sqlite3": { + "version": "11.10.0", + "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-11.10.0.tgz", + "integrity": "sha512-EwhOpyXiOEL/lKzHz9AW1msWFNzGc/z+LzeB3/jnFJpxu+th2yqvzsSWas1v9jgs9+xiXJcD5A8CJxAG2TaghQ==", + "hasInstallScript": true, + "dependencies": { + "bindings": "^1.5.0", + "prebuild-install": "^7.1.1" + } + }, "node_modules/bignumber.js": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.0.tgz", - "integrity": "sha512-EM7aMFTXbptt/wZdMlBv2t8IViwQL+h6SLHosp8Yf0dqJMTnY6iL32opnAB6kAdL0SZPuvcAzFr31o0c/R3/RA==", - "license": "MIT", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", + "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", "engines": { "node": "*" } @@ -2734,7 +2596,6 @@ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -2742,19 +2603,71 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/boolean": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz", "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==", - "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", - "license": "MIT" + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info." }, "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -2763,8 +2676,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", "dependencies": { "fill-range": "^7.1.1" }, @@ -2776,8 +2687,7 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true, - "license": "ISC" + "dev": true }, "node_modules/bson": { "version": "6.10.4", @@ -2805,7 +2715,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" @@ -2815,7 +2724,6 @@ "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "license": "MIT", "engines": { "node": "*" } @@ -2823,15 +2731,13 @@ "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", - "license": "BSD-3-Clause" + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" }, "node_modules/c8": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", "dev": true, - "license": "ISC", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@istanbuljs/schema": "^0.1.3", @@ -2856,7 +2762,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" @@ -2885,7 +2790,6 @@ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -2894,7 +2798,6 @@ "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "license": "MIT", "engines": { "node": ">=10" }, @@ -2906,7 +2809,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2922,7 +2824,6 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", - "license": "MIT", "dependencies": { "chalk": "^4.1.2" }, @@ -2933,11 +2834,24 @@ "url": "https://github.com/chalk/chalk-template?sponsor=1" } }, + "node_modules/chalk/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/chalk/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2950,7 +2864,6 @@ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -2974,7 +2887,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", - "license": "BlueOak-1.0.0", "engines": { "node": ">=18" } @@ -2984,7 +2896,6 @@ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", "dev": true, - "license": "MIT", "dependencies": { "restore-cursor": "^5.0.0" }, @@ -3000,7 +2911,6 @@ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" }, @@ -3013,7 +2923,6 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -3023,19 +2932,32 @@ "node": ">=12" } }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/cliui/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/cliui/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -3050,7 +2972,6 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -3071,24 +2992,10 @@ "node": ">=0.10.0" } }, - "node_modules/color": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", - "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1", - "color-string": "^1.9.0" - }, - "engines": { - "node": ">=12.5.0" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -3099,24 +3006,12 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/color-string": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", - "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "license": "MIT", - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -3128,7 +3023,6 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", - "license": "MIT", "dependencies": { "array-back": "^3.1.0", "find-replace": "^3.0.0", @@ -3139,29 +3033,10 @@ "node": ">=4.0.0" } }, - "node_modules/command-line-args/node_modules/array-back": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", - "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/command-line-args/node_modules/typical": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", - "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/command-line-usage": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-7.0.3.tgz", "integrity": "sha512-PqMLy5+YGwhMh1wS04mVG44oqDsgyLRSKJBdOo1bnYhMKBW65gZF1dRp2OZRhiTjgUHljy99qkO7bsctLaw35Q==", - "license": "MIT", "dependencies": { "array-back": "^6.2.2", "chalk-template": "^0.4.0", @@ -3172,12 +3047,27 @@ "node": ">=12.20.0" } }, + "node_modules/command-line-usage/node_modules/array-back": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz", + "integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==", + "engines": { + "node": ">=12.17" + } + }, + "node_modules/command-line-usage/node_modules/typical": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-7.3.0.tgz", + "integrity": "sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw==", + "engines": { + "node": ">=12.17" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/console-table-printer": { "version": "2.15.0", @@ -3191,15 +3081,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/corser": { "version": "2.0.1", @@ -3214,7 +3102,6 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -3225,12 +3112,11 @@ } }, "node_modules/cssstyle": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.3.1.tgz", - "integrity": "sha512-ZgW+Jgdd7i52AaLYCriF8Mxqft0gD/R9i9wi6RWBhs1pqdPEzPjym7rvRKi397WmQFf3SlyUsszhw+VVCbx79Q==", - "license": "MIT", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.6.0.tgz", + "integrity": "sha512-2z+rWdzbbSZv6/rhtvzvqeZQHrBaqgogqt85sqFNbabZOuFbCVFb8kPeEtZjiKkbrm395irpNKiYeFeLiQnFPg==", "dependencies": { - "@asamuzakjp/css-color": "^3.1.2", + "@asamuzakjp/css-color": "^3.2.0", "rrweb-cssom": "^0.8.0" }, "engines": { @@ -3241,7 +3127,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "license": "MIT", "engines": { "node": ">= 12" } @@ -3250,7 +3135,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", - "license": "MIT", "dependencies": { "whatwg-mimetype": "^4.0.0", "whatwg-url": "^14.0.0" @@ -3260,10 +3144,9 @@ } }, "node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", - "license": "MIT", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dependencies": { "ms": "^2.1.3" }, @@ -3277,11 +3160,25 @@ } }, "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "license": "MIT", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decimal.js": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", + "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==" + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dependencies": { + "mimic-response": "^3.1.0" + }, "engines": { "node": ">=10" }, @@ -3289,24 +3186,46 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/decimal.js": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.5.0.tgz", - "integrity": "sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==", - "license": "MIT" - }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" + "dev": true + }, + "node_modules/deepagents": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deepagents/-/deepagents-1.1.1.tgz", + "integrity": "sha512-P75Iy3pv591WKKvtr1KCemdm/zFSLts8FbNwI0Ci5gK8X3wWmTpCqRFTgIvs6+AC4RwNALBeyYUjIV9Td2Q/ug==", + "dependencies": { + "@langchain/anthropic": "^1.0.0", + "@langchain/core": "^1.0.0", + "@langchain/langgraph": "^1.0.0", + "fast-glob": "^3.3.3", + "langchain": "^1.0.4", + "micromatch": "^4.0.8", + "zod": "^4.1.11" + } + }, + "node_modules/deepagents/node_modules/zod": { + "version": "4.1.13", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.13.tgz", + "integrity": "sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig==", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -3323,7 +3242,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "license": "MIT", "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", @@ -3340,16 +3258,14 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/detect-libc": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", - "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", - "license": "Apache-2.0", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", "engines": { "node": ">=8" } @@ -3357,14 +3273,12 @@ "node_modules/detect-node": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", - "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", - "license": "MIT" + "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==" }, "node_modules/diff": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", - "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -3374,7 +3288,6 @@ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, - "license": "MIT", "dependencies": { "path-type": "^4.0.0" }, @@ -3387,7 +3300,6 @@ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, - "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -3396,19 +3308,17 @@ } }, "node_modules/dompurify": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.6.tgz", - "integrity": "sha512-/2GogDQlohXPZe6D6NOgQvXLPSYBqIWMnZ8zzOhn09REE4eyAzb+Hed3jhoM9OkuaJ8P6ZGTTVWQKAi8ieIzfQ==", - "license": "(MPL-2.0 OR Apache-2.0)", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.3.0.tgz", + "integrity": "sha512-r+f6MYR1gGN1eJv0TVQbhA7if/U7P87cdPl3HN5rikqaBSBxLiCb/b9O+2eG0cxz0ghyU+mU1QkbsOwERMYlWQ==", "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "node_modules/dotenv": { - "version": "16.5.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz", - "integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==", - "license": "BSD-2-Clause", + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", "engines": { "node": ">=12" }, @@ -3420,7 +3330,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", @@ -3434,14 +3343,12 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" } @@ -3450,15 +3357,21 @@ "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" + "dev": true + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "dependencies": { + "once": "^1.4.0" + } }, "node_modules/enhanced-resolve": { - "version": "5.18.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", - "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", + "version": "5.18.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz", + "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", "dev": true, - "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -3471,7 +3384,6 @@ "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "license": "BSD-2-Clause", "engines": { "node": ">=0.12" }, @@ -3483,7 +3395,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "license": "MIT", "engines": { "node": ">= 0.4" } @@ -3492,7 +3403,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "license": "MIT", "engines": { "node": ">= 0.4" } @@ -3501,7 +3411,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "license": "MIT", "dependencies": { "es-errors": "^1.3.0" }, @@ -3513,7 +3422,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", @@ -3527,16 +3435,14 @@ "node_modules/es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "license": "MIT" + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==" }, "node_modules/esbuild": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.8.tgz", - "integrity": "sha512-vVC0USHGtMi8+R4Kz8rt6JhEWLxsv9Rnu/lGYbPR8u47B+DCBksq9JarW0zOO7bs37hyOK1l2/oqtbciutL5+Q==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", "dev": true, "hasInstallScript": true, - "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -3544,32 +3450,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.8", - "@esbuild/android-arm": "0.25.8", - "@esbuild/android-arm64": "0.25.8", - "@esbuild/android-x64": "0.25.8", - "@esbuild/darwin-arm64": "0.25.8", - "@esbuild/darwin-x64": "0.25.8", - "@esbuild/freebsd-arm64": "0.25.8", - "@esbuild/freebsd-x64": "0.25.8", - "@esbuild/linux-arm": "0.25.8", - "@esbuild/linux-arm64": "0.25.8", - "@esbuild/linux-ia32": "0.25.8", - "@esbuild/linux-loong64": "0.25.8", - "@esbuild/linux-mips64el": "0.25.8", - "@esbuild/linux-ppc64": "0.25.8", - "@esbuild/linux-riscv64": "0.25.8", - "@esbuild/linux-s390x": "0.25.8", - "@esbuild/linux-x64": "0.25.8", - "@esbuild/netbsd-arm64": "0.25.8", - "@esbuild/netbsd-x64": "0.25.8", - "@esbuild/openbsd-arm64": "0.25.8", - "@esbuild/openbsd-x64": "0.25.8", - "@esbuild/openharmony-arm64": "0.25.8", - "@esbuild/sunos-x64": "0.25.8", - "@esbuild/win32-arm64": "0.25.8", - "@esbuild/win32-ia32": "0.25.8", - "@esbuild/win32-x64": "0.25.8" + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" } }, "node_modules/escalade": { @@ -3577,7 +3483,6 @@ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -3586,7 +3491,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "license": "MIT", "engines": { "node": ">=10" }, @@ -3600,7 +3504,7 @@ "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, - "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -3656,7 +3560,6 @@ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -3670,7 +3573,6 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, - "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -3678,12 +3580,27 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3694,7 +3611,6 @@ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -3711,7 +3627,6 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -3721,7 +3636,6 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, @@ -3729,12 +3643,17 @@ "node": ">=10.13.0" } }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -3747,7 +3666,6 @@ "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -3765,7 +3683,6 @@ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -3778,7 +3695,6 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -3788,7 +3704,6 @@ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -3801,7 +3716,6 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -3811,7 +3725,6 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -3821,7 +3734,6 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } @@ -3830,7 +3742,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "license": "MIT", "engines": { "node": ">=6" } @@ -3844,29 +3755,32 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "license": "MIT", "engines": { "node": ">=0.8.x" } }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "engines": { + "node": ">=6" + } + }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "license": "MIT" + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "license": "MIT" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-glob": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -3882,8 +3796,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/fast-levenshtein": { "version": "3.0.0", @@ -3906,8 +3819,7 @@ "type": "opencollective", "url": "https://opencollective.com/fastify" } - ], - "license": "BSD-3-Clause" + ] }, "node_modules/fastest-levenshtein": { "version": "1.0.16", @@ -3921,8 +3833,6 @@ "version": "1.19.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", - "dev": true, - "license": "ISC", "dependencies": { "reusify": "^1.0.4" } @@ -3931,7 +3841,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "license": "MIT", "dependencies": { "pend": "~1.2.0" } @@ -3950,7 +3859,6 @@ "url": "https://paypal.me/jimmywarting" } ], - "license": "MIT", "dependencies": { "node-domexception": "^1.0.0", "web-streams-polyfill": "^3.0.3" @@ -3963,7 +3871,6 @@ "version": "3.3.3", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", - "license": "MIT", "engines": { "node": ">= 8" } @@ -3973,7 +3880,6 @@ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, - "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" }, @@ -3981,12 +3887,15 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -3998,7 +3907,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", - "license": "MIT", "dependencies": { "array-back": "^3.0.1" }, @@ -4006,21 +3914,11 @@ "node": ">=4.0.0" } }, - "node_modules/find-replace/node_modules/array-back": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", - "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -4037,7 +3935,6 @@ "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, - "license": "BSD-3-Clause", "bin": { "flat": "cli.js" } @@ -4047,7 +3944,6 @@ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, - "license": "MIT", "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.3", @@ -4057,24 +3953,27 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/flatbuffers": { + "version": "24.12.23", + "resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-24.12.23.tgz", + "integrity": "sha512-dLVCAISd5mhls514keQzmEG6QHmUUsNuWsb4tFafIUwvvgDjXhtfAYSKOzt5SWOy+qByV5pbsDZ+Vb7HUOBEdA==" + }, "node_modules/flatted": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", - "dev": true, - "license": "ISC" + "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], - "license": "MIT", "engines": { "node": ">=4.0" }, @@ -4089,7 +3988,6 @@ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", "dev": true, - "license": "ISC", "dependencies": { "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" @@ -4102,9 +4000,9 @@ } }, "node_modules/form-data": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", - "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -4119,14 +4017,12 @@ "node_modules/form-data-encoder": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz", - "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==", - "license": "MIT" + "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==" }, "node_modules/formdata-node": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz", "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==", - "license": "MIT", "dependencies": { "node-domexception": "1.0.0", "web-streams-polyfill": "4.0.0-beta.3" @@ -4139,7 +4035,6 @@ "version": "4.0.10", "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "license": "MIT", "dependencies": { "fetch-blob": "^3.1.2" }, @@ -4147,12 +4042,16 @@ "node": ">=12.20.0" } }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" + "dev": true }, "node_modules/fsevents": { "version": "2.3.3", @@ -4160,7 +4059,6 @@ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, - "license": "MIT", "optional": true, "os": [ "darwin" @@ -4173,7 +4071,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4182,7 +4079,6 @@ "version": "6.7.1", "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.7.1.tgz", "integrity": "sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ==", - "license": "Apache-2.0", "dependencies": { "extend": "^3.0.2", "https-proxy-agent": "^7.0.1", @@ -4198,7 +4094,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -4217,20 +4112,29 @@ "node_modules/gaxios/node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "license": "MIT" + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/gaxios/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } }, "node_modules/gaxios/node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "license": "BSD-2-Clause" + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/gaxios/node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "license": "MIT", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -4240,7 +4144,6 @@ "version": "6.1.1", "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.1.1.tgz", "integrity": "sha512-a4tiq7E0/5fTjxPAaH4jpjkSv/uCaU2p5KC6HVGrvl0cDjA8iBZv4vv1gyzlmK0ZUKqwpOyQMKzZQe3lTit77A==", - "license": "Apache-2.0", "dependencies": { "gaxios": "^6.1.1", "google-logging-utils": "^0.0.2", @@ -4263,17 +4166,15 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, - "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, "node_modules/get-east-asian-width": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", - "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", + "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=18" }, @@ -4285,7 +4186,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", @@ -4309,7 +4209,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "license": "MIT", "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" @@ -4318,12 +4217,16 @@ "node": ">= 0.4" } }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" + }, "node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "dev": true, - "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", @@ -4343,8 +4246,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -4356,7 +4257,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz", "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==", - "license": "BSD-3-Clause", "dependencies": { "boolean": "^3.0.1", "es6-error": "^4.1.1", @@ -4374,7 +4274,6 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, - "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -4389,7 +4288,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", - "license": "MIT", "dependencies": { "define-properties": "^1.2.1", "gopd": "^1.0.1" @@ -4406,7 +4304,6 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, - "license": "MIT", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -4426,7 +4323,6 @@ "version": "9.15.1", "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.15.1.tgz", "integrity": "sha512-Jb6Z0+nvECVz+2lzSMt9u98UsoakXxA2HGHMCxh+so3n90XgYWkq5dur19JAJV7ONiJY22yBTyJB1TSkvPq9Ng==", - "license": "Apache-2.0", "dependencies": { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", @@ -4443,7 +4339,6 @@ "version": "0.0.2", "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-0.0.2.tgz", "integrity": "sha512-NEgUnEcBiP5HrPzufUkBzJOD/Sxsco3rLNo1F1TNf7ieU8ryUzBhqba8r756CjLX7rn3fHl6iLEwPYuqpoKgQQ==", - "license": "Apache-2.0", "engines": { "node": ">=14" } @@ -4452,7 +4347,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -4464,21 +4358,18 @@ "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" + "dev": true }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/groq-sdk": { "version": "0.22.0", "resolved": "https://registry.npmjs.org/groq-sdk/-/groq-sdk-0.22.0.tgz", "integrity": "sha512-wLkIFlfbi6u9BM8x79wt+yKYqUHoF//od2P5U0MMZRvj/hR+sCZxx1E/ymSGP+M5/fER85MHhPOd/8q3BP4BbQ==", - "license": "Apache-2.0", "dependencies": { "@types/node": "^18.11.18", "@types/node-fetch": "^2.6.4", @@ -4490,10 +4381,9 @@ } }, "node_modules/groq-sdk/node_modules/@types/node": { - "version": "18.19.110", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.110.tgz", - "integrity": "sha512-WW2o4gTmREtSnqKty9nhqF/vA0GKd0V/rbC0OyjSk9Bz6bzlsXKT+i7WDdS/a0z74rfT2PO4dArVCSnapNLA5Q==", - "license": "MIT", + "version": "18.19.130", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", + "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", "dependencies": { "undici-types": "~5.26.4" } @@ -4502,7 +4392,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -4521,20 +4410,22 @@ "node_modules/groq-sdk/node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "license": "MIT" + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/groq-sdk/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, "node_modules/groq-sdk/node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "license": "BSD-2-Clause" + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/groq-sdk/node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "license": "MIT", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -4544,7 +4435,6 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz", "integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==", - "license": "MIT", "dependencies": { "gaxios": "^6.0.0", "jws": "^4.0.0" @@ -4556,14 +4446,12 @@ "node_modules/guid-typescript": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/guid-typescript/-/guid-typescript-1.0.9.tgz", - "integrity": "sha512-Y8T4vYhEfwJOTbouREvG+3XDsjr8E3kIr7uf+JZ0BYloFsttiHU0WfvANVsR7TxNUJa/WpCnw/Ino/p+DeBhBQ==", - "license": "ISC" + "integrity": "sha512-Y8T4vYhEfwJOTbouREvG+3XDsjr8E3kIr7uf+JZ0BYloFsttiHU0WfvANVsR7TxNUJa/WpCnw/Ino/p+DeBhBQ==" }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "license": "MIT", "engines": { "node": ">=8" } @@ -4572,7 +4460,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" }, @@ -4584,7 +4471,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -4596,7 +4482,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" }, @@ -4611,7 +4496,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -4623,7 +4507,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "license": "MIT", "bin": { "he": "bin/he" } @@ -4632,7 +4515,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", - "license": "MIT", "dependencies": { "whatwg-encoding": "^3.1.1" }, @@ -4644,8 +4526,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/http-proxy": { "version": "1.18.1", @@ -4664,7 +4545,6 @@ "version": "7.0.2", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", - "license": "MIT", "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -4725,7 +4605,6 @@ "version": "7.0.6", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", - "license": "MIT", "dependencies": { "agent-base": "^7.1.2", "debug": "4" @@ -4738,7 +4617,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", - "license": "MIT", "dependencies": { "ms": "^2.0.0" } @@ -4747,7 +4625,6 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -4772,15 +4649,13 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "BSD-3-Clause" + ] }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } @@ -4789,15 +4664,13 @@ "version": "3.0.6", "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/import-fresh": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, - "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -4814,7 +4687,6 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8.19" } @@ -4825,7 +4697,6 @@ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, - "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -4834,22 +4705,18 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "node_modules/is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", - "license": "MIT" + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, - "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -4861,8 +4728,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -4872,7 +4737,6 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -4881,8 +4745,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -4895,7 +4757,6 @@ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -4903,12 +4764,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-network-error": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-network-error/-/is-network-error-1.3.0.tgz", + "integrity": "sha512-6oIwpsgRfnDiyEDLMay/GqCl3HoAtH5+RUKW29gYkL0QA+ipzpDLA16yQs7/RHCSu+BwgbJaOUqa4A99qNVQVw==", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -4918,7 +4788,6 @@ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -4928,7 +4797,6 @@ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -4936,14 +4804,12 @@ "node_modules/is-potential-custom-element-name": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "license": "MIT" + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "license": "MIT", "engines": { "node": ">=8" }, @@ -4956,7 +4822,6 @@ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -4968,22 +4833,19 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" + "dev": true }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=8" } @@ -4993,7 +4855,6 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", @@ -5008,7 +4869,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -5017,11 +4877,10 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -5035,7 +4894,6 @@ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, - "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -5055,11 +4913,10 @@ } }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -5071,7 +4928,6 @@ "version": "26.1.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-26.1.0.tgz", "integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==", - "license": "MIT", "dependencies": { "cssstyle": "^4.2.1", "data-urls": "^5.0.0", @@ -5110,7 +4966,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "license": "MIT", "dependencies": { "bignumber.js": "^9.0.0" } @@ -5127,35 +4982,41 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" + "dev": true + }, + "node_modules/json-schema-to-ts": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-3.1.1.tgz", + "integrity": "sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "ts-algebra": "^2.0.0" + }, + "engines": { + "node": ">=16" + } }, "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "license": "ISC" + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" }, "node_modules/jszip": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", "dev": true, - "license": "(MIT OR GPL-3.0-or-later)", "dependencies": { "lie": "~3.3.0", "pako": "~1.0.2", @@ -5168,7 +5029,6 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, - "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -5183,15 +5043,13 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/jszip/node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, - "license": "MIT", "dependencies": { "safe-buffer": "~5.1.0" } @@ -5199,14 +5057,12 @@ "node_modules/just-extend": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", - "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==", - "license": "MIT" + "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==" }, "node_modules/jwa": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz", "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==", - "license": "MIT", "dependencies": { "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", @@ -5217,7 +5073,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", - "license": "MIT", "dependencies": { "jwa": "^2.0.0", "safe-buffer": "^5.0.1" @@ -5236,15 +5091,32 @@ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, - "license": "MIT", "dependencies": { "json-buffer": "3.0.1" } }, + "node_modules/langchain": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/langchain/-/langchain-1.1.1.tgz", + "integrity": "sha512-z7cOFhLOzbu/lRlIE8GZ5rlfi7obvvHThhMdts1KsUBusJmWLmh1Yik28MHYzJRXclUbqs4u/9D2yNmr36wf0A==", + "dependencies": { + "@langchain/langgraph": "^1.0.0", + "@langchain/langgraph-checkpoint": "^1.0.0", + "langsmith": "~0.3.74", + "uuid": "^10.0.0", + "zod": "^3.25.76 || ^4" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@langchain/core": "1.1.0" + } + }, "node_modules/langsmith": { - "version": "0.3.79", - "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.3.79.tgz", - "integrity": "sha512-j5uiAsyy90zxlxaMuGjb7EdcL51Yx61SpKfDOI1nMPBbemGju+lf47he4e59Hp5K63CY8XWgFP42WeZ+zuIU4Q==", + "version": "0.3.81", + "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.3.81.tgz", + "integrity": "sha512-NFmp7TDrrbCE6TIfHqutN9xhdgvx0EOhULVo8bDW+ib5idprwjMTvmS0S1n9uVFwjN03zU2zVEWViXnwy5XPrw==", "dependencies": { "@types/uuid": "^10.0.0", "chalk": "^4.1.2", @@ -5275,16 +5147,16 @@ } } }, - "node_modules/langsmith/node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" + "node_modules/langsmith/node_modules/p-retry": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", + "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", + "dependencies": { + "@types/retry": "0.12.0", + "retry": "^0.13.1" + }, + "engines": { + "node": ">=8" } }, "node_modules/levn": { @@ -5292,7 +5164,6 @@ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, - "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -5306,7 +5177,6 @@ "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", "dev": true, - "license": "MIT", "dependencies": { "immediate": "~3.0.5" } @@ -5315,7 +5185,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", - "license": "MIT", "dependencies": { "uc.micro": "^2.0.0" } @@ -5330,7 +5199,6 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -5344,29 +5212,19 @@ "node_modules/lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", - "license": "MIT" - }, - "node_modules/lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", - "deprecated": "This package is deprecated. Use the optional chaining (?.) operator instead.", - "license": "MIT" + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -5378,11 +5236,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==" + }, "node_modules/lru-cache": { "version": "11.2.2", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", - "license": "ISC", "engines": { "node": "20 || >=22" } @@ -5392,7 +5254,6 @@ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, - "license": "MIT", "dependencies": { "semver": "^7.5.3" }, @@ -5407,7 +5268,6 @@ "version": "14.1.0", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", - "license": "MIT", "dependencies": { "argparse": "^2.0.1", "entities": "^4.4.0", @@ -5424,7 +5284,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", - "license": "MIT", "dependencies": { "escape-string-regexp": "^4.0.0" }, @@ -5436,7 +5295,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "license": "MIT", "engines": { "node": ">= 0.4" } @@ -5444,8 +5302,7 @@ "node_modules/mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", - "license": "MIT" + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==" }, "node_modules/memjs": { "version": "1.3.2", @@ -5464,8 +5321,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } @@ -5474,8 +5329,6 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -5499,7 +5352,6 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -5508,7 +5360,6 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -5521,7 +5372,6 @@ "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", "dev": true, - "license": "MIT", "engines": { "node": ">=18" }, @@ -5529,12 +5379,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -5557,16 +5417,14 @@ "version": "7.1.2", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } }, "node_modules/minizlib": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.2.tgz", - "integrity": "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==", - "license": "MIT", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", + "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", "dependencies": { "minipass": "^7.1.2" }, @@ -5574,27 +5432,16 @@ "node": ">= 18" } }, - "node_modules/mkdirp": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "license": "MIT", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, "node_modules/mocha": { "version": "10.8.2", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", "dev": true, - "license": "MIT", "dependencies": { "ansi-colors": "^4.1.3", "browser-stdout": "^1.3.1", @@ -5625,12 +5472,26 @@ "node": ">= 14.0.0" } }, + "node_modules/mocha/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/mocha/node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -5641,8 +5502,7 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/mocha/node_modules/glob": { "version": "8.1.0", @@ -5650,7 +5510,6 @@ "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -5670,7 +5529,6 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -5683,7 +5541,6 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -5698,7 +5555,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -5714,7 +5570,6 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -5732,7 +5587,6 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, - "license": "MIT", "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -5751,7 +5605,6 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } @@ -5766,9 +5619,9 @@ } }, "node_modules/mongoose": { - "version": "8.19.3", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.19.3.tgz", - "integrity": "sha512-fTAGaIohkk8wCggMuBuqTVD4YrM1/J8cBr1ekqzFqtz65qkLjtX2dcy3NH1e+2rk2365dyrrsPAnt4YTxBhEiQ==", + "version": "8.20.1", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.20.1.tgz", + "integrity": "sha512-G+n3maddlqkQrP1nXxsI0q20144OSo+pe+HzRRGqaC4yK3FLYKqejqB9cbIi+SX7eoRsnG23LHGYNp8n7mWL2Q==", "dependencies": { "bson": "^6.10.4", "kareem": "2.6.3", @@ -5791,7 +5644,6 @@ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "optional": true, - "peer": true, "dependencies": { "debug": "4" }, @@ -5804,7 +5656,6 @@ "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.1.3.tgz", "integrity": "sha512-95hVgBRgEIRQQQHIbnxBXeHbW4TqFk4ZDJW7wmVtvYar72FdhRIo1UGOLS2eRAKCPEdPBWu+M7+A33D9CdX9rA==", "optional": true, - "peer": true, "dependencies": { "extend": "^3.0.2", "https-proxy-agent": "^5.0.0", @@ -5815,26 +5666,11 @@ "node": ">=12" } }, - "node_modules/mongoose/node_modules/gcp-metadata": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz", - "integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==", - "optional": true, - "peer": true, - "dependencies": { - "gaxios": "^5.0.0", - "json-bigint": "^1.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/mongoose/node_modules/https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "optional": true, - "peer": true, "dependencies": { "agent-base": "6", "debug": "4" @@ -5893,7 +5729,6 @@ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "optional": true, - "peer": true, "dependencies": { "whatwg-url": "^5.0.0" }, @@ -5913,22 +5748,19 @@ "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "optional": true, - "peer": true + "optional": true }, "node_modules/mongoose/node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "optional": true, - "peer": true + "optional": true }, "node_modules/mongoose/node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "optional": true, - "peer": true, "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -5956,8 +5788,7 @@ "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/mustache": { "version": "4.2.0", @@ -5967,6 +5798,11 @@ "mustache": "bin/mustache" } }, + "node_modules/napi-build-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz", + "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==" + }, "node_modules/natural": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/natural/-/natural-8.1.0.tgz", @@ -5996,21 +5832,30 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/natural-compare-lite": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true, - "license": "MIT" + "dev": true + }, + "node_modules/natural/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } }, "node_modules/nise": { "version": "5.1.9", "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.9.tgz", "integrity": "sha512-qOnoujW4SV6e40dYxJOb3uvuoPHtmLzIk4TFo+j0jPJoC+5Z9xja5qH5JZobEPsa8+YYphMrOSwnrshEhG2qww==", - "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^3.0.0", "@sinonjs/fake-timers": "^11.2.2", @@ -6019,6 +5864,17 @@ "path-to-regexp": "^6.2.1" } }, + "node_modules/node-abi": { + "version": "3.85.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.85.0.tgz", + "integrity": "sha512-zsFhmbkAzwhTft6nd3VxcG0cvJsT70rL+BIGHWVq5fi6MwGrHwzqKaxXE+Hl2GmnGItnDKPPkO5/LQqjVkIdFg==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/node-domexception": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", @@ -6034,7 +5890,6 @@ "url": "https://paypal.me/jimmywarting" } ], - "license": "MIT", "engines": { "node": ">=10.5.0" } @@ -6043,7 +5898,6 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "license": "MIT", "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", @@ -6062,16 +5916,14 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/nwsapi": { - "version": "2.2.20", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.20.tgz", - "integrity": "sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==", - "license": "MIT" + "version": "2.2.22", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.22.tgz", + "integrity": "sha512-ujSMe1OWVn55euT1ihwCI1ZcAaAU3nxUiDwfDQldc51ZXaB9m2AyOn6/jh1BLe2t/G8xd6uKG1UBF2aZJeg2SQ==" }, "node_modules/object-inspect": { "version": "1.13.4", @@ -6088,7 +5940,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "license": "MIT", "engines": { "node": ">= 0.4" } @@ -6097,8 +5948,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", "dependencies": { "wrappy": "1" } @@ -6108,7 +5957,6 @@ "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", "dev": true, - "license": "MIT", "dependencies": { "mimic-function": "^5.0.0" }, @@ -6119,11 +5967,55 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/onnxruntime-common": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/onnxruntime-common/-/onnxruntime-common-1.21.0.tgz", + "integrity": "sha512-Q632iLLrtCAVOTO65dh2+mNbQir/QNTVBG3h/QdZBpns7mZ0RYbLRBgGABPbpU9351AgYy7SJf1WaeVwMrBFPQ==" + }, + "node_modules/onnxruntime-node": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/onnxruntime-node/-/onnxruntime-node-1.21.0.tgz", + "integrity": "sha512-NeaCX6WW2L8cRCSqy3bInlo5ojjQqu2fD3D+9W5qb5irwxhEyWKXeH2vZ8W9r6VxaMPUan+4/7NDwZMtouZxEw==", + "hasInstallScript": true, + "os": [ + "win32", + "darwin", + "linux" + ], + "dependencies": { + "global-agent": "^3.0.0", + "onnxruntime-common": "1.21.0", + "tar": "^7.0.1" + } + }, + "node_modules/onnxruntime-web": { + "version": "1.22.0-dev.20250409-89f8206ba4", + "resolved": "https://registry.npmjs.org/onnxruntime-web/-/onnxruntime-web-1.22.0-dev.20250409-89f8206ba4.tgz", + "integrity": "sha512-0uS76OPgH0hWCPrFKlL8kYVV7ckM7t/36HfbgoFw6Nd0CZVVbQC4PkrR8mBX8LtNUFZO25IQBqV2Hx2ho3FlbQ==", + "dependencies": { + "flatbuffers": "^25.1.24", + "guid-typescript": "^1.0.9", + "long": "^5.2.3", + "onnxruntime-common": "1.22.0-dev.20250409-89f8206ba4", + "platform": "^1.3.6", + "protobufjs": "^7.2.4" + } + }, + "node_modules/onnxruntime-web/node_modules/flatbuffers": { + "version": "25.9.23", + "resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-25.9.23.tgz", + "integrity": "sha512-MI1qs7Lo4Syw0EOzUl0xjs2lsoeqFku44KpngfIduHBYvzm8h2+7K8YMQh1JtVVVrUvhLpNwqVi4DERegUJhPQ==" + }, + "node_modules/onnxruntime-web/node_modules/onnxruntime-common": { + "version": "1.22.0-dev.20250409-89f8206ba4", + "resolved": "https://registry.npmjs.org/onnxruntime-common/-/onnxruntime-common-1.22.0-dev.20250409-89f8206ba4.tgz", + "integrity": "sha512-vDJMkfCfb0b1A836rgHj+ORuZf4B4+cc2bASQtpeoJLueuFc5DuYwjIZUBrSvx/fO5IrLjLz+oTrB3pcGlhovQ==" + }, "node_modules/openai": { "version": "4.104.0", "resolved": "https://registry.npmjs.org/openai/-/openai-4.104.0.tgz", "integrity": "sha512-p99EFNsA/yX6UhVO93f5kJsDRLAg+CTA2RBqdHK4RtK8u5IJw32Hyb2dTGKbnnFmnuoBv5r7Z2CURI9sGZpSuA==", - "license": "Apache-2.0", + "peer": true, "dependencies": { "@types/node": "^18.11.18", "@types/node-fetch": "^2.6.4", @@ -6150,10 +6042,9 @@ } }, "node_modules/openai/node_modules/@types/node": { - "version": "18.19.110", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.110.tgz", - "integrity": "sha512-WW2o4gTmREtSnqKty9nhqF/vA0GKd0V/rbC0OyjSk9Bz6bzlsXKT+i7WDdS/a0z74rfT2PO4dArVCSnapNLA5Q==", - "license": "MIT", + "version": "18.19.130", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", + "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", "dependencies": { "undici-types": "~5.26.4" } @@ -6162,7 +6053,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -6181,20 +6071,22 @@ "node_modules/openai/node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "license": "MIT" + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/openai/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, "node_modules/openai/node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "license": "BSD-2-Clause" + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/openai/node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "license": "MIT", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -6213,7 +6105,6 @@ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, - "license": "MIT", "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -6237,7 +6128,6 @@ "resolved": "https://registry.npmjs.org/ora/-/ora-8.2.0.tgz", "integrity": "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^5.3.0", "cli-cursor": "^5.0.0", @@ -6257,11 +6147,10 @@ } }, "node_modules/ora/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -6270,11 +6159,10 @@ } }, "node_modules/ora/node_modules/chalk": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", - "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", "dev": true, - "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -6283,18 +6171,16 @@ } }, "node_modules/ora/node_modules/emoji-regex": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", - "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", - "dev": true, - "license": "MIT" + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true }, "node_modules/ora/node_modules/is-unicode-supported": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=18" }, @@ -6307,7 +6193,6 @@ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz", "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^5.3.0", "is-unicode-supported": "^1.3.0" @@ -6324,7 +6209,6 @@ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -6337,7 +6221,6 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", @@ -6351,11 +6234,10 @@ } }, "node_modules/ora/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -6379,7 +6261,6 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -6395,7 +6276,6 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -6422,15 +6302,17 @@ } }, "node_modules/p-retry": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", - "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-7.1.0.tgz", + "integrity": "sha512-xL4PiFRQa/f9L9ZvR4/gUCRNus4N8YX80ku8kv9Jqz+ZokkiZLM0bcvX0gm1F3PDi9SPRsww1BDsTWgE6Y1GLQ==", "dependencies": { - "@types/retry": "0.12.0", - "retry": "^0.13.1" + "is-network-error": "^1.1.0" }, "engines": { - "node": ">=8" + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-timeout": { @@ -6448,22 +6330,19 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true, - "license": "BlueOak-1.0.0" + "dev": true }, "node_modules/pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true, - "license": "(MIT AND Zlib)" + "dev": true }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, - "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -6475,7 +6354,6 @@ "version": "7.3.0", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", - "license": "MIT", "dependencies": { "entities": "^6.0.0" }, @@ -6484,10 +6362,9 @@ } }, "node_modules/parse5/node_modules/entities": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.0.tgz", - "integrity": "sha512-aKstq2TDOndCn4diEyp9Uq/Flu2i1GlLkc6XIDQSDMuaFE3OPW5OphLCyQ5SpSJZTb4reN+kTcYru5yIfXoRPw==", - "license": "BSD-2-Clause", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", "engines": { "node": ">=0.12" }, @@ -6500,7 +6377,6 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -6510,7 +6386,6 @@ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -6520,7 +6395,6 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -6530,7 +6404,6 @@ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, - "license": "BlueOak-1.0.0", "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" @@ -6546,21 +6419,18 @@ "version": "10.4.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" + "dev": true }, "node_modules/path-to-regexp": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", - "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", - "license": "MIT" + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==" }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -6568,13 +6438,13 @@ "node_modules/pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "license": "MIT" + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" }, "node_modules/pg": { "version": "8.16.3", "resolved": "https://registry.npmjs.org/pg/-/pg-8.16.3.tgz", "integrity": "sha512-enxc1h0jA/aq5oSDMvqyW3q89ra6XIIDZgCX9vkMrnz5DFTw/Ny3Li2lFQ+pt3L6MCgm/5o2o8HW9hiJji+xvw==", + "peer": true, "dependencies": { "pg-connection-string": "^2.9.1", "pg-pool": "^3.10.1", @@ -6656,8 +6526,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", "engines": { "node": ">=8.6" }, @@ -6668,8 +6536,7 @@ "node_modules/platform": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", - "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==", - "license": "MIT" + "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==" }, "node_modules/portfinder": { "version": "1.0.38", @@ -6718,21 +6585,44 @@ "node": ">=0.10.0" } }, + "node_modules/prebuild-install": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", + "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^2.0.0", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/prettier": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", - "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", - "license": "MIT", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "bin": { "prettier": "bin/prettier.cjs" }, @@ -6747,7 +6637,6 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "license": "MIT", "engines": { "node": ">= 0.6.0" } @@ -6756,20 +6645,49 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true, - "license": "MIT" + "dev": true + }, + "node_modules/protobufjs": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz", + "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "license": "MIT" + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "node_modules/pump": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz", + "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "license": "MIT", "engines": { "node": ">=6" } @@ -6778,7 +6696,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", - "license": "MIT", "engines": { "node": ">=6" } @@ -6801,7 +6718,6 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, "funding": [ { "type": "github", @@ -6815,24 +6731,43 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, - "license": "MIT", "dependencies": { - "safe-buffer": "^5.1.0" + "safe-buffer": "^5.1.0" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "engines": { + "node": ">=0.10.0" } }, "node_modules/readable-stream": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", - "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", "buffer": "^6.0.3", @@ -6849,7 +6784,6 @@ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -6875,7 +6809,6 @@ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -6884,7 +6817,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -6899,7 +6831,6 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } @@ -6909,7 +6840,6 @@ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", "dev": true, - "license": "MIT", "dependencies": { "onetime": "^7.0.0", "signal-exit": "^4.1.0" @@ -6933,8 +6863,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "dev": true, - "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -6946,7 +6874,6 @@ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, - "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -6958,11 +6885,10 @@ } }, "node_modules/rimraf/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6974,7 +6900,6 @@ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -6995,7 +6920,6 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -7007,7 +6931,6 @@ "version": "2.15.4", "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz", "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==", - "license": "BSD-3-Clause", "dependencies": { "boolean": "^3.0.1", "detect-node": "^2.0.4", @@ -7023,14 +6946,12 @@ "node_modules/rrweb-cssom": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.8.0.tgz", - "integrity": "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==", - "license": "MIT" + "integrity": "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==" }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, "funding": [ { "type": "github", @@ -7045,7 +6966,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } @@ -7067,8 +6987,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/safe-stable-stringify": { "version": "2.5.0", @@ -7081,14 +7000,12 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/saxes": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", - "license": "ISC", "dependencies": { "xmlchars": "^2.2.0" }, @@ -7102,10 +7019,9 @@ "integrity": "sha512-AckIIV90rPDcBcglUwXPF3kg0P0qmPsPXAj6BBEENQE1p5yA1xfmDJzfi1Tappj37Pv2mVbKpL3Z1T+Nn7k1Qw==" }, "node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "license": "ISC", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "bin": { "semver": "bin/semver.js" }, @@ -7116,14 +7032,12 @@ "node_modules/semver-compare": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==", - "license": "MIT" + "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==" }, "node_modules/serialize-error": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz", "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==", - "license": "MIT", "dependencies": { "type-fest": "^0.13.1" }, @@ -7138,7 +7052,6 @@ "version": "0.13.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -7151,7 +7064,6 @@ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } @@ -7160,15 +7072,56 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "dev": true, - "license": "MIT" + "dev": true + }, + "node_modules/sharp": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.5.tgz", + "integrity": "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==", + "hasInstallScript": true, + "dependencies": { + "@img/colour": "^1.0.0", + "detect-libc": "^2.1.2", + "semver": "^7.7.3" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.34.5", + "@img/sharp-darwin-x64": "0.34.5", + "@img/sharp-libvips-darwin-arm64": "1.2.4", + "@img/sharp-libvips-darwin-x64": "1.2.4", + "@img/sharp-libvips-linux-arm": "1.2.4", + "@img/sharp-libvips-linux-arm64": "1.2.4", + "@img/sharp-libvips-linux-ppc64": "1.2.4", + "@img/sharp-libvips-linux-riscv64": "1.2.4", + "@img/sharp-libvips-linux-s390x": "1.2.4", + "@img/sharp-libvips-linux-x64": "1.2.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.2.4", + "@img/sharp-libvips-linuxmusl-x64": "1.2.4", + "@img/sharp-linux-arm": "0.34.5", + "@img/sharp-linux-arm64": "0.34.5", + "@img/sharp-linux-ppc64": "0.34.5", + "@img/sharp-linux-riscv64": "0.34.5", + "@img/sharp-linux-s390x": "0.34.5", + "@img/sharp-linux-x64": "0.34.5", + "@img/sharp-linuxmusl-arm64": "0.34.5", + "@img/sharp-linuxmusl-x64": "0.34.5", + "@img/sharp-wasm32": "0.34.5", + "@img/sharp-win32-arm64": "0.34.5", + "@img/sharp-win32-ia32": "0.34.5", + "@img/sharp-win32-x64": "0.34.5" + } }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -7181,7 +7134,6 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -7264,7 +7216,6 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, - "license": "ISC", "engines": { "node": ">=14" }, @@ -7272,30 +7223,63 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "node_modules/simple-git": { - "version": "3.27.0", - "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.27.0.tgz", - "integrity": "sha512-ivHoFS9Yi9GY49ogc6/YAi3Fl9ROnF4VyubNylgCkA+RVqLaKWnDSzXOVzya8csELIaWaYNutsEuAhZrtOjozA==", - "license": "MIT", + "version": "3.30.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.30.0.tgz", + "integrity": "sha512-q6lxyDsCmEal/MEGhP1aVyQ3oxnagGlBDOVSIB4XUVLl1iZh0Pah6ebC9V4xBap/RfgP2WlI8EKs0WS0rMEJHg==", "dependencies": { "@kwsites/file-exists": "^1.1.1", "@kwsites/promise-deferred": "^1.1.1", - "debug": "^4.3.5" + "debug": "^4.4.0" }, "funding": { "type": "github", "url": "https://github.com/steveukx/git-js?sponsor=1" } }, - "node_modules/simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, "node_modules/simple-wcswidth": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/simple-wcswidth/-/simple-wcswidth-1.1.2.tgz", @@ -7305,7 +7289,6 @@ "version": "17.0.1", "resolved": "https://registry.npmjs.org/sinon/-/sinon-17.0.1.tgz", "integrity": "sha512-wmwE19Lie0MLT+ZYNpDymasPHUKTaZHUH/pKEubRXIzySv9Atnlw+BUMGCzWgV7b7wO+Hw6f1TEOr0IUnmU8/g==", - "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^3.0.0", "@sinonjs/fake-timers": "^11.2.2", @@ -7323,7 +7306,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -7336,7 +7318,6 @@ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -7360,21 +7341,18 @@ "node_modules/sprintf-js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", - "license": "BSD-3-Clause" + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" }, "node_modules/sql.js": { "version": "1.13.0", "resolved": "https://registry.npmjs.org/sql.js/-/sql.js-1.13.0.tgz", - "integrity": "sha512-RJbVP1HRDlUUXahJ7VMTcu9Rm1Nzw+EBpoPr94vnbD4LwR715F3CcxE2G2k45PewcaZ57pjetYa+LoSJLAASgA==", - "license": "MIT" + "integrity": "sha512-RJbVP1HRDlUUXahJ7VMTcu9Rm1Nzw+EBpoPr94vnbD4LwR715F3CcxE2G2k45PewcaZ57pjetYa+LoSJLAASgA==" }, "node_modules/stdin-discarder": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=18" }, @@ -7394,7 +7372,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" } @@ -7404,7 +7381,6 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, - "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -7423,7 +7399,6 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -7437,15 +7412,13 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -7454,11 +7427,10 @@ } }, "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -7474,7 +7446,6 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -7488,7 +7459,6 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -7501,7 +7471,6 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -7514,7 +7483,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz", "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -7533,14 +7501,12 @@ "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "license": "MIT" + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" }, "node_modules/table-layout": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-4.1.1.tgz", "integrity": "sha512-iK5/YhZxq5GO5z8wb0bY1317uDF3Zjpha0QFFLA8/trAoiLbQD0HUbMesEaxyzUgDxi2QlcbM8IvqOlEjgoXBA==", - "license": "MIT", "dependencies": { "array-back": "^6.2.2", "wordwrapjs": "^5.1.0" @@ -7549,39 +7515,99 @@ "node": ">=12.17" } }, + "node_modules/table-layout/node_modules/array-back": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz", + "integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==", + "engines": { + "node": ">=12.17" + } + }, "node_modules/tapable": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz", - "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", + "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" } }, "node_modules/tar": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", - "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", - "license": "ISC", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.2.tgz", + "integrity": "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==", "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", "minipass": "^7.1.2", - "minizlib": "^3.0.1", - "mkdirp": "^3.0.1", + "minizlib": "^3.1.0", "yallist": "^5.0.0" }, "engines": { "node": ">=18" } }, + "node_modules/tar-fs": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz", + "integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-fs/node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "engines": { + "node": ">=18" + } + }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, - "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", @@ -7592,11 +7618,10 @@ } }, "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7608,7 +7633,6 @@ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -7629,7 +7653,6 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -7641,14 +7664,12 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/tldts": { "version": "6.1.86", "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz", "integrity": "sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==", - "license": "MIT", "dependencies": { "tldts-core": "^6.1.86" }, @@ -7659,15 +7680,12 @@ "node_modules/tldts-core": { "version": "6.1.86", "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.86.tgz", - "integrity": "sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==", - "license": "MIT" + "integrity": "sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==" }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -7679,7 +7697,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.2.tgz", "integrity": "sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==", - "license": "BSD-3-Clause", "dependencies": { "tldts": "^6.1.32" }, @@ -7691,7 +7708,6 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz", "integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==", - "license": "MIT", "dependencies": { "punycode": "^2.3.1" }, @@ -7699,19 +7715,21 @@ "node": ">=18" } }, + "node_modules/ts-algebra": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ts-algebra/-/ts-algebra-2.0.0.tgz", + "integrity": "sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw==" + }, "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "node_modules/tsutils": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, - "license": "MIT", "dependencies": { "tslib": "^1.8.1" }, @@ -7722,12 +7740,28 @@ "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, - "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -7739,7 +7773,6 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "license": "MIT", "engines": { "node": ">=4" } @@ -7749,7 +7782,6 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -7758,11 +7790,11 @@ } }, "node_modules/typescript": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", - "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, - "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -7772,19 +7804,17 @@ } }, "node_modules/typical": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-7.3.0.tgz", - "integrity": "sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw==", - "license": "MIT", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", "engines": { - "node": ">=12.17" + "node": ">=8" } }, "node_modules/uc.micro": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", - "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", - "license": "MIT" + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==" }, "node_modules/underscore": { "version": "1.13.7", @@ -7792,10 +7822,9 @@ "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==" }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "license": "MIT" + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==" }, "node_modules/union": { "version": "0.5.0", @@ -7813,7 +7842,6 @@ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } @@ -7826,19 +7854,16 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true, - "license": "MIT" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], - "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } @@ -7848,7 +7873,6 @@ "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, - "license": "ISC", "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", @@ -7862,7 +7886,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", - "license": "MIT", "dependencies": { "xml-name-validator": "^5.0.0" }, @@ -7874,7 +7897,6 @@ "version": "4.0.0-beta.3", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz", "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==", - "license": "MIT", "engines": { "node": ">= 14" } @@ -7883,7 +7905,6 @@ "version": "0.25.10", "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.25.10.tgz", "integrity": "sha512-Y09sF44/13XvgVKgO2cNDw5rGk6s26MgoZPXLESvMXeefBf7i6/73eFurre0IsTW6E14Y0ArIzhUMmjoc7xyzA==", - "license": "MIT", "peerDependencies": { "@types/emscripten": "^1.40.0" }, @@ -7897,7 +7918,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "license": "BSD-2-Clause", "engines": { "node": ">=12" } @@ -7906,7 +7926,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", - "license": "MIT", "dependencies": { "iconv-lite": "0.6.3" }, @@ -7918,7 +7937,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", - "license": "MIT", "engines": { "node": ">=18" } @@ -7927,7 +7945,6 @@ "version": "14.2.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz", "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==", - "license": "MIT", "dependencies": { "tr46": "^5.1.0", "webidl-conversions": "^7.0.0" @@ -7941,7 +7958,6 @@ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -7957,7 +7973,6 @@ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7971,10 +7986,9 @@ } }, "node_modules/wordwrapjs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-5.1.0.tgz", - "integrity": "sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg==", - "license": "MIT", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-5.1.1.tgz", + "integrity": "sha512-0yweIbkINJodk27gX9LBGMzyQdBDan3s/dEAiwBOj+Mf0PPyWL6/rikalkv8EeD0E8jm4o5RXEOrFTP3NXbhJg==", "engines": { "node": ">=12.17" } @@ -7983,15 +7997,13 @@ "version": "6.5.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", - "dev": true, - "license": "Apache-2.0" + "dev": true }, "node_modules/wrap-ansi": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -8010,7 +8022,6 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -8023,19 +8034,32 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/wrap-ansi-cjs/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -8046,11 +8070,10 @@ } }, "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -8059,11 +8082,10 @@ } }, "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -8072,11 +8094,10 @@ } }, "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -8090,15 +8111,12 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/ws": { - "version": "8.18.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", - "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", - "license": "MIT", + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "engines": { "node": ">=10.0.0" }, @@ -8119,7 +8137,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", - "license": "Apache-2.0", "engines": { "node": ">=18" } @@ -8127,8 +8144,7 @@ "node_modules/xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "license": "MIT" + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" }, "node_modules/xtend": { "version": "4.0.2", @@ -8143,26 +8159,20 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yallist": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", - "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, - "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -8181,7 +8191,6 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, - "license": "ISC", "engines": { "node": ">=12" } @@ -8191,7 +8200,6 @@ "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, - "license": "MIT", "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", @@ -8202,19 +8210,29 @@ "node": ">=10" } }, + "node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/yargs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/yargs/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -8228,7 +8246,6 @@ "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" @@ -8239,7 +8256,6 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -8251,17 +8267,10 @@ "version": "3.25.76", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } - }, - "node_modules/zod-to-json-schema": { - "version": "3.24.6", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.6.tgz", - "integrity": "sha512-h/z3PKvcTcTetyjl1fkj79MHNEjm+HpD6NXheWjzOekY7kV+lwDYnHw+ivHkijnCSMz1yJaWBD9vu/Fcmk+vEg==", - "peerDependencies": { - "zod": "^3.24.1" - } } } } diff --git a/package.json b/package.json index b7b7e83..6b4fb47 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "publisher": "fiatinnovations", "description": "CodeBuddy is a Visual Studio Code extension that enhances developer productivity through AI-powered code assistance. It provides intelligent code review, refactoring suggestions, optimization tips, and interactive chat capabilities powered by multiple AI models including Gemini, Groq, Anthropic, and Deepseek.", - "version": "3.7.3", + "version": "3.7.31", "engines": { "vscode": "^1.78.0" }, @@ -153,6 +153,59 @@ "title": "CodeBuddy. Review Pull Request" } ], + "keybindings": [ + { + "command": "CodeBuddy.commentCode", + "key": "ctrl+shift+j", + "mac": "cmd+shift+j", + "when": "editorHasSelection" + }, + { + "command": "CodeBuddy.reviewCode", + "key": "ctrl+shift+r", + "mac": "cmd+shift+r", + "when": "editorHasSelection" + }, + { + "command": "CodeBuddy.codeRefactor", + "key": "ctrl+shift+;", + "mac": "cmd+shift+;", + "when": "editorHasSelection" + }, + { + "command": "CodeBuddy.codeOptimize", + "key": "ctrl+shift+0", + "mac": "cmd+shift+0", + "when": "editorHasSelection" + }, + { + "command": "CodeBuddy.explain", + "key": "ctrl+shift+1", + "mac": "cmd+shift+1", + "when": "editorHasSelection" + }, + { + "command": "CodeBuddy.generateCommitMessage", + "key": "ctrl+shift+2", + "mac": "cmd+shift+2" + }, + { + "command": "CodeBuddy.inLineChat", + "key": "ctrl+shift+8", + "mac": "cmd+shift+8" + }, + { + "command": "CodeBuddy.generateMermaidDiagram", + "key": "ctrl+shift+7", + "mac": "cmd+shift+7", + "when": "editorHasSelection" + }, + { + "command": "CodeBuddy.codebaseAnalysis", + "key": "ctrl+shift+6", + "mac": "cmd+shift+6" + } + ], "viewsContainers": { "activitybar": [ { @@ -178,12 +231,20 @@ "default": "Gemini", "description": "Select Model" }, + "tavily.apiKey": { + "type": [ + "string", + "null" + ], + "default": "apiKey", + "markdownDescription": "Enter your [API Key](https://app.tavily.com/home) for Tavily." + }, "google.gemini.apiKeys": { "type": [ "string", "null" ], - "default": null, + "default": "apiKey", "markdownDescription": "Enter your [API Key](https://aistudio.google.com/app/apikey) for Gemini." }, "google.gemini.model": { @@ -191,7 +252,7 @@ "string", "null" ], - "default": "gemini-1.5-flash", + "default": "gemini-2.5-pro", "markdownDescription": "Provide the name of the model you want to use. Choose from the [base models](https://ai.google.dev/models/gemini) or your own [tuned model](https://ai.google.dev/docs/model_tuning_guidance)." }, "groq.llama3.apiKey": { @@ -199,7 +260,7 @@ "string", "null" ], - "default": "llama-3.1-70b-versatile", + "default": "apiKey", "markdownDescription": "Enter your [API Key](https://console.groq.com/keys) Groq" }, "groq.llama3.model": { @@ -207,7 +268,7 @@ "string", "null" ], - "default": null, + "default": "llama-3.1-70b-versatile", "markdownDescription": "Provide the name of the Groq model you want to use. Choose from the ..." }, "anthropic.model": { @@ -215,7 +276,7 @@ "string", "null" ], - "default": null, + "default": "claude-sonnet-4-5", "markdownDescription": "Provide the name of the Anthropic model you want to use. Choose from the ..." }, "anthropic.apiKey": { @@ -223,25 +284,9 @@ "string", "null" ], - "default": null, + "default": "apiKey", "markdownDescription": "Enter your [API Key](https://docs.anthropic.com/en/docs/about-claude/models) Anthropic" }, - "grok.model": { - "type": [ - "string", - "null" - ], - "default": null, - "markdownDescription": "Provide the name of the [Grok Model](https://console.x.ai/) you want to use." - }, - "grok.apiKey": { - "type": [ - "string", - "null" - ], - "default": null, - "markdownDescription": "Enter your [Grok API Key](https://console.x.ai/)" - }, "deepseek.model": { "type": [ "string", @@ -255,7 +300,7 @@ "string", "null" ], - "default": null, + "default": "apiKey", "markdownDescription": "Enter your Deepseek API Key" }, "font.family": { @@ -342,6 +387,11 @@ "@chroma-core/default-embed": "^0.1.8", "@google/genai": "^0.7.0", "@google/generative-ai": "^0.21.0", + "@langchain/anthropic": "^1.0.0", + "@langchain/core": "^1.0.0", + "@langchain/groq": "^1.0.2", + "@langchain/langgraph": "^1.0.0", + "@langchain/langgraph-checkpoint-sqlite": "^1.0.0", "@mozilla/readability": "^0.4.1", "@types/fast-levenshtein": "^0.0.4", "@types/node-fetch": "^2.6.11", @@ -349,11 +399,13 @@ "@vscode/ripgrep": "^1.17.0", "apache-arrow": "18.1.0", "axios": "^1.7.9", + "deepagents": "^1.1.1", "dompurify": "^3.2.6", "dotenv": "^16.1.4", "fast-levenshtein": "^3.0.0", "groq-sdk": "^0.22.0", "jsdom": "^26.0.0", + "langchain": "^1.0.4", "llama3-tokenizer-js": "^1.2.0", "lru-cache": "^11.2.2", "markdown-it": "^14.1.0", @@ -365,10 +417,7 @@ "simple-git": "^3.25.0", "sinon": "^17.0.1", "sql.js": "^1.13.0", - "web-tree-sitter": "^0.25.10", - "@langchain/core": "^0.3.79", - "@langchain/google-genai": "^0.2.18", - "@langchain/langgraph": "^0.4.9" + "web-tree-sitter": "^0.25.10" }, "license": "MIT" } diff --git a/src/agents/agentService.ts b/src/agents/agentService.ts new file mode 100644 index 0000000..8f52053 --- /dev/null +++ b/src/agents/agentService.ts @@ -0,0 +1,127 @@ +import { InMemoryStore, MemorySaver } from "@langchain/langgraph"; +import * as vscode from "vscode"; +import { Logger, LogLevel } from "../infrastructure/logger/logger"; +import { Orchestrator } from "../orchestrator"; +import { createAdvancedDeveloperAgent } from "./developer/agent"; + +export class CodebuddyAgentService { + private agent: any = null; + private store = new InMemoryStore(); + private checkpointer = new MemorySaver(); + private logger: any; + private orchestrator: any; + private static instance: CodebuddyAgentService; + + constructor() { + this.logger = Logger.initialize("AgentService", { + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, + }); + this.orchestrator = Orchestrator.getInstance(); + } + + static getInstance() { + return (CodebuddyAgentService.instance ??= new CodebuddyAgentService()); + } + + private async getAgent() { + if (!this.agent) { + this.agent = await createAdvancedDeveloperAgent({ + checkPointer: this.checkpointer, + store: this.store, + // ✅ Disable HITL for smooth streaming + enableHITL: false, + }); + this.logger.log(LogLevel.INFO, "Agent initialized"); + } + return this.agent; + } + + async *runx(userMessage: string, threadId?: string) { + try { + const agent = await this.getAgent(); + const conversationId = threadId || `thread-${Date.now()}`; + + const config = { + configurable: { thread_id: conversationId }, + }; + + let result = await agent.stream( + { + messages: [{ role: "user", content: userMessage }], + }, + config, + ); + + for await (const event of result) { + for (const [nodeName, update] of Object.entries( + event as Record, + )) { + // Handle interrupts if they occur + if (nodeName === "__interrupt__") { + this.logger.log(LogLevel.INFO, "Auto-approving interrupt"); + + // Auto-approve and continue + const interrupts = update as any[]; + for (const interrupt of interrupts) { + if (interrupt?.value?.id) { + result = await agent.stream( + { + command: { + resume: { + [interrupt.value.id]: "approve", + }, + }, + }, + config, + ); + } + } + continue; + } + + yield { node: nodeName, update }; + this.logger.log(LogLevel.INFO, `Stream event from node: ${nodeName}`); + } + } + } catch (error: any) { + this.logger.error("Agent execution failed:", error); + if ( + error.message?.includes("token") || + error.message?.includes("billing") || + error.message?.includes("token usage") || + error.message?.includes("billing issue") || + error.message?.includes("quota") || + error.message?.includes("authorization") || + error.message?.includes("401") || + error.message?.includes("403") + ) { + vscode.window.showErrorMessage( + `token usage or billing issues, kindly check your billing informationon your AI platform`, + ); + throw new Error(`Authorization or billing error: ${error.message}`); + } + throw error; + } + } + + async processUserQuery(userInput: string, threadId?: string): Promise { + const stream = this.runx(userInput, threadId); + for await (const update of stream) { + if (update?.update?.messages) { + const lastMessageContent = this.handleUserQuery(update.update.messages); + if (lastMessageContent) { + this.orchestrator.publish("onQuery", String(lastMessageContent)); + } + } + } + } + + private handleUserQuery(messages: any[]): string | null { + if (!messages || messages.length === 0) return null; + const lastMessage = messages[messages.length - 1]; + return lastMessage?.content || null; + } +} diff --git a/src/agents/backends/filesystem.ts b/src/agents/backends/filesystem.ts new file mode 100644 index 0000000..40f39c8 --- /dev/null +++ b/src/agents/backends/filesystem.ts @@ -0,0 +1,552 @@ +/** + * VS Code / Node-friendly Filesystem Backend for deepagentsjs + * + * This file implements a production-ready BackendFactory that: + * - writes/reads real files under a configured rootDir (workspace- or extension-scoped) + * - supports assistant-scoped namespaces (StateAndStore.assistantId) + * - performs atomic writes and serializes mutations + * - uses ripgrep for fast grep when available, integrating either via provided JS wrapper + * (preferred, e.g. @vscode/ripgrep) or by spawning a ripgrep binary (ripgrepExec). + * - allows disabling spawn fallback to guarantee portability in restricted environments + * + * API summary: + * - createVscodeFsBackendFactory(opts): BackendFactory + * opts.rootDir: string // on-disk root that maps to "/" seen by agent + * opts.ripgrepSearch?: RipgrepSearchFn // preferred: JS wrapper to run ripgrep + * opts.ripgrepExec?: string // optional binary path to ripgrep + * opts.useRipgrep?: boolean // default true + * opts.disableSpawnFallback?: boolean // default false + * opts.ripgrepArgs?: string[] // additional args to ripgrep + * opts.maxGrepBuffer?: number // spawnSync buffer size + * + * The returned BackendFactory will be called with StateAndStore by the middleware and will + * return a BackendProtocol instance bound to the assistantId present in StateAndStore. + * + * Drop this file into your extension source and import the factory when wiring createDeepAgent. + */ + +import * as fs from "fs"; +import * as fsp from "fs/promises"; +import * as path from "path"; +import * as readline from "readline"; // Optimization: Import readline for efficient stream processing. +import { spawnSync } from "child_process"; + +import type { + BackendProtocol, + BackendFactory, + FileInfo, + GrepMatch, + WriteResult, + EditResult, +} from "deepagents"; + +type StateAndStore = Parameters[0]; + +/** Type for a JS wrapper that runs ripgrep and returns stdout (string). */ +export type RipgrepSearchFn = (opts: { + pattern: string; + cwd: string; + glob?: string | null; + extraArgs?: string[]; + maxBuffer?: number; +}) => Promise; + +/** Options for the factory creation. */ +export interface VscodeFsBackendFactoryOptions { + rootDir: string; + useRipgrep?: boolean; + disableSpawnFallback?: boolean; + ripgrepArgs?: string[]; + ripgrepExec?: string; + ripgrepSearch?: RipgrepSearchFn; + maxGrepBuffer?: number; +} + +/** Simple in-process mutex to serialize write/edit operations. */ +class SimpleMutex { + private _p: Promise = Promise.resolve(); + async lock(fn: () => Promise): Promise { + const next = this._p.then( + () => fn(), + () => fn(), + ); + this._p = next.then( + () => undefined, + () => undefined, + ); + return next; + } +} + +/** Convert basic glob pattern to RegExp (supports *, **, ?). */ +function globToRegExp(pattern: string): RegExp { + let normalized = pattern.replace(/^\/+|\/+$/g, ""); + + if (!normalized) { + return new RegExp("^.*$"); + } + + let escaped = normalized.replace(/[.+^${}()|[\]\\]/g, "\\$&"); + + escaped = escaped + .replace(/\*\*/g, "§DOUBLESTAR§") + .replace(/\*/g, "[^/]*") + .replace(/§DOUBLESTAR§/g, ".*") + .replace(/\?/g, "[^/]"); + + return new RegExp(`^${escaped}$`); +} + +/** + * Implementation of BackendProtocol that uses the host filesystem. + */ +class VscodeFsBackend implements BackendProtocol { + readonly rootDir: string; + private mutex = new SimpleMutex(); + private ripgrepArgs: string[]; + private useRipgrep: boolean; + private disableSpawnFallback: boolean; + private ripgrepExec?: string; + private ripgrepSearch?: RipgrepSearchFn; + private maxGrepBuffer: number; + private assistantId?: string; + + constructor(params: { + rootDir: string; + ripgrepArgs?: string[]; + useRipgrep?: boolean; + disableSpawnFallback?: boolean; + ripgrepExec?: string; + ripgrepSearch?: RipgrepSearchFn; + maxGrepBuffer?: number; + assistantId?: string | undefined; + }) { + this.rootDir = path.resolve(params.rootDir); + this.ripgrepArgs = params.ripgrepArgs ?? ["--hidden", "--no-ignore"]; + this.useRipgrep = params.useRipgrep ?? true; + this.disableSpawnFallback = params.disableSpawnFallback ?? false; + this.ripgrepExec = params.ripgrepExec; + this.ripgrepSearch = params.ripgrepSearch; + this.maxGrepBuffer = params.maxGrepBuffer ?? 10 * 1024 * 1024; + this.assistantId = params.assistantId; + + fs.mkdirSync(this.rootDir, { recursive: true }); + if (this.assistantId) { + fs.mkdirSync(path.join(this.rootDir, String(this.assistantId)), { + recursive: true, + }); + } + } + + private assistantBase(): string { + if (!this.assistantId) return this.rootDir; + return path.join(this.rootDir, String(this.assistantId)); + } + + private resolveAgentPath(agentPath: string): string { + let normalized = agentPath; + if (!normalized.startsWith("/")) normalized = `/${normalized}`; + const rel = normalized.replace(/^\/+/, ""); + const base = this.assistantBase(); + const abs = path.resolve(base, rel); + const baseResolved = path.resolve(base); + + if (abs !== baseResolved && !abs.startsWith(baseResolved + path.sep)) { + throw new Error("Invalid path: outside of permitted root"); + } + return abs; + } + + async lsInfo(dir: string): Promise { + const absDir = this.resolveAgentPath(dir); + try { + const entries = await fsp.readdir(absDir, { withFileTypes: true }); + + // Optimization: Use Promise.all to execute 'stat' calls concurrently. + // This significantly speeds up directory listing for directories with many files + // by parallelizing the I/O operations. + const infoPromises = entries.map(async (e): Promise => { + const child = path.join(absDir, e.name); + try { + const st = await fsp.stat(child); + const rel = `/${path.relative(this.rootDir, child).replace(/\\/g, "/")}`; + return { + path: e.isDirectory() ? `${rel.replace(/\/+$/, "")}/` : rel, + is_dir: e.isDirectory(), + size: e.isDirectory() ? undefined : st.size, + modified_at: st.mtime.toISOString(), + }; + } catch (err) { + console.warn(`[VscodeFsBackend] Could not stat ${child}: ${err}`); + return null; // Handle cases where file is deleted during operation + } + }); + + const infos = await Promise.all(infoPromises); + // Filter out any null results from failed stats and sort + return infos + .filter((info): info is FileInfo => info !== null) + .sort((a, b) => a.path.localeCompare(b.path)); + } catch (e: any) { + if (e.code === "ENOENT") return []; + throw e; + } + } + + async read(filePath: string, offset = 0, limit = 2000): Promise { + try { + const abs = this.resolveAgentPath(filePath); + + // Optimization: Use streams to read the file line-by-line. This avoids loading + // the entire file into memory, providing O(1) memory usage regardless of file size. + const fileStream = fs.createReadStream(abs, { encoding: "utf-8" }); + const rl = readline.createInterface({ + input: fileStream, + crlfDelay: Infinity, + }); + + const out: string[] = []; + let currentLine = 0; + let fileIsEmpty = true; + + for await (const line of rl) { + fileIsEmpty = false; + if (currentLine >= offset) { + if (out.length < limit) { + const truncatedLine = line.slice(0, 2000); + out.push( + `${String(currentLine + 1).padStart(6, " ")}\t${truncatedLine}`, + ); + } + } + currentLine++; + if (out.length >= limit) { + rl.close(); // Stop reading once the limit is reached + fileStream.destroy(); + break; + } + } + + if (fileIsEmpty) + return "System reminder: File exists but has empty contents"; + if (offset > 0 && out.length === 0) + return `Error: Line offset ${offset} exceeds file length (${currentLine} lines)`; + + return out.join("\n"); + } catch (e: any) { + if (e && e.code === "ENOENT") + return `Error: File '${filePath}' not found`; + console.error( + `[VscodeFsBackend] Unexpected error reading ${filePath}:`, + e, + ); + return `Error: An unexpected error occurred while reading the file.`; + } + } + + async grepRaw( + pattern: string, + basePath: string | null = "/", + glob: string | null = null, + ): Promise { + let re: RegExp; + try { + re = new RegExp(pattern, "i"); + } catch (err: any) { + return `Invalid regex: ${err.message ?? String(err)}`; + } + + const absBase = this.resolveAgentPath(basePath ?? "/"); + + if (this.useRipgrep) { + if (this.ripgrepSearch) { + try { + const stdout = await this.ripgrepSearch({ + pattern, + cwd: absBase, + glob, + extraArgs: this.ripgrepArgs, + maxBuffer: this.maxGrepBuffer, + }); + return parseRipgrepStdout(stdout, this.rootDir); + } catch (err: any) { + if (this.disableSpawnFallback) + return `Error: ripgrep invocation failed: ${err?.message ?? String(err)}`; + } + } + + try { + const rgBin = this.ripgrepExec ?? "rg"; + const args = [ + "-n", + "-H", + ...(this.ripgrepArgs ?? []), + ...(glob ? ["-g", glob] : []), + pattern, + absBase, + ]; + const rg = spawnSync(rgBin, args, { + encoding: "utf-8", + maxBuffer: this.maxGrepBuffer, + }); + if (!rg.error && (rg.status === 0 || rg.status === 1)) { + if (!rg.stdout) return []; + return parseRipgrepStdout(rg.stdout, this.rootDir); + } else { + if (this.disableSpawnFallback) { + const msg = rg.error ? rg.error.message : `rg exit ${rg.status}`; + return `Error: ripgrep invocation failed: ${msg}`; + } + } + } catch { + if (this.disableSpawnFallback) return "Error: ripgrep not available"; + } + } else if (this.disableSpawnFallback) { + return "Error: ripgrep usage disabled by configuration"; + } + + // --- JS Fallback: Optimized with parallel, streaming directory traversal --- + const globRegex = glob + ? globToRegExp(glob.startsWith("/") ? glob : `/${glob}`) + : null; + + const walkAndSearch = async (dir: string): Promise => { + let entries: fs.Dirent[]; + try { + entries = await fsp.readdir(dir, { withFileTypes: true }); + } catch { + return []; + } + + const promises = entries.map(async (e): Promise => { + const child = path.join(dir, e.name); + if (e.isDirectory()) { + return walkAndSearch(child); // Recurse into subdirectories + } + + const relPosix = `/${path.relative(this.rootDir, child).replace(/\\/g, "/")}`; + if (globRegex && !globRegex.test(relPosix)) return []; + + // Optimization: Stream files to avoid high memory usage and process line-by-line. + const fileMatches: GrepMatch[] = []; + try { + const fileStream = fs.createReadStream(child, { encoding: "utf-8" }); + fileStream.on("error", () => fileStream.destroy()); + const rl = readline.createInterface({ + input: fileStream, + crlfDelay: Infinity, + }); + + let lineNum = 0; + for await (const line of rl) { + lineNum++; + if (re.test(line)) { + fileMatches.push({ path: relPosix, line: lineNum, text: line }); + } + } + } catch (err) { + console.warn( + `[VscodeFsBackend] Failed to grep file ${child}: ${err}`, + ); + } + return fileMatches; + }); + + const nestedMatches = await Promise.all(promises); + return ([] as GrepMatch[]).concat(...nestedMatches); + }; + + try { + return await walkAndSearch(absBase); + } catch (err: any) { + return `Error: ${err?.message ?? String(err)}`; + } + } + + async globInfo(pattern: string, basePath: string = "/"): Promise { + const absBase = this.resolveAgentPath(basePath); + + const normalizedPattern = pattern.startsWith("/") + ? pattern.substring(1) + : pattern; + + const regex = globToRegExp(normalizedPattern); + + const walk = async (dir: string): Promise => { + let entries: fs.Dirent[]; + try { + entries = await fsp.readdir(dir, { withFileTypes: true }); + } catch { + return []; + } + + const promises = entries.map(async (e): Promise => { + const child = path.join(dir, e.name); + + if (e.isDirectory()) { + return walk(child); + } + const pathRelativeToSearchBase = path + .relative(absBase, child) + .split(path.sep) + .join("/"); + + if (!regex.test(pathRelativeToSearchBase)) return []; + + const virtualPath = `/${path.relative(this.rootDir, child).split(path.sep).join("/")}`; + + try { + const st = await fsp.stat(child); + return [ + { + path: virtualPath, + is_dir: false, + size: st.size, + modified_at: st.mtime.toISOString(), + }, + ]; + } catch { + return []; + } + }); + const nestedResults = await Promise.all(promises); + return ([] as FileInfo[]).concat(...nestedResults); + }; + + const results = await walk(absBase); + + return results.sort((a, b) => a.path.localeCompare(b.path)); + } + + async write(filePath: string, content: string): Promise { + return this.mutex.lock(async () => { + try { + const abs = this.resolveAgentPath(filePath); + + try { + const stat = await fsp.lstat(abs); + if (stat.isSymbolicLink()) { + return { + error: `Cannot write to ${filePath} because it is a symlink. Symlinks are not allowed.`, + }; + } + return { + error: `Cannot write to ${filePath} because it already exists. Read and then make an edit, or write to a new path.`, + }; + } catch (error: any) { + if (error.code !== "ENOENT") { + throw error; + } + } + await fsp.mkdir(path.dirname(abs), { recursive: true }); + const tmp = `${abs}.tmp-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`; + + await fsp.writeFile(tmp, content, { encoding: "utf-8" }); + await fsp.rename(tmp, abs); + + return { path: filePath, filesUpdate: null }; + } catch (err: any) { + return { error: String(err?.message ?? err) }; + } + }); + } + + async edit( + filePath: string, + oldString: string, + newString: string, + replaceAll = false, + ): Promise { + // Note: For extremely large files, a streaming approach would be more memory-efficient. + // This implementation reads the whole file, which is a pragmatic trade-off for typical source files. + return this.mutex.lock(async () => { + try { + const abs = this.resolveAgentPath(filePath); + let current: string; + try { + current = await fsp.readFile(abs, { encoding: "utf-8" }); + } catch (err: any) { + if (err.code === "ENOENT") + return { error: `Error: File '${filePath}' not found` }; + return { error: String(err?.message ?? err) }; + } + + if (!current.includes(oldString)) { + return { path: filePath, filesUpdate: null, occurrences: 0 }; + } + + let newContent: string; + let occurrences = 0; + if (replaceAll) { + const parts = current.split(oldString); + occurrences = parts.length - 1; + newContent = parts.join(newString); + } else { + const idx = current.indexOf(oldString); + if (idx === -1) + return { path: filePath, filesUpdate: null, occurrences: 0 }; + occurrences = 1; + newContent = + current.slice(0, idx) + + newString + + current.slice(idx + oldString.length); + } + + const tmp = `${abs}.tmp-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`; + await fsp.writeFile(tmp, newContent, { encoding: "utf-8" }); + await fsp.rename(tmp, abs); + return { path: filePath, filesUpdate: null, occurrences }; + } catch (err: any) { + return { error: String(err?.message ?? err) }; + } + }); + } +} + +/** Parse ripgrep stdout lines into GrepMatch[] */ +function parseRipgrepStdout(stdout: string, rootDir: string): GrepMatch[] { + const lines = String(stdout).trim().split("\n").filter(Boolean); + const results: GrepMatch[] = []; + for (const l of lines) { + // Format: /abs/path:line:match. The lazy quantifier is safer for paths that might contain colons. + const m = l.match(/^(.+?):(\d+):(.*)$/s); + if (!m) continue; + const absPath = m[1]; + const lineNum = Number(m[2]); + const text = m[3]; + const rel = `/${path.relative(rootDir, absPath).replace(/\\/g, "/")}`; + results.push({ path: rel, line: lineNum, text }); + } + return results; +} + +/** + * Return a BackendFactory bound to the given options. + */ +export function createVscodeFsBackendFactory( + opts: VscodeFsBackendFactoryOptions, +): VscodeFsBackend { + const { rootDir, ...rest } = opts; + + let probeRgAvailable = false; + if (opts.useRipgrep !== false && !opts.ripgrepSearch) { + try { + const probe = spawnSync(opts.ripgrepExec ?? "rg", ["--version"], { + encoding: "utf-8", + maxBuffer: 1024, + }); + probeRgAvailable = !probe.error && probe.status === 0; + } catch { + probeRgAvailable = false; + } + } + + const useRipgrep = opts.useRipgrep !== false; + + const backend = new VscodeFsBackend({ rootDir, ...rest }); + + if (useRipgrep && !opts.ripgrepSearch && !probeRgAvailable) { + (backend as any).useRipgrep = false; + } + return backend; +} diff --git a/src/agents/developer/agent.ts b/src/agents/developer/agent.ts new file mode 100644 index 0000000..b70d5d6 --- /dev/null +++ b/src/agents/developer/agent.ts @@ -0,0 +1,248 @@ +import { ChatAnthropic } from "@langchain/anthropic"; +// import { ChatGoogleGenerativeAI } from "@langchain/google-genai"; +import { ChatGroq } from "@langchain/groq"; +import { BaseStore } from "@langchain/langgraph"; +import { rgPath } from "@vscode/ripgrep"; +import { spawnSync } from "child_process"; +import { + BackendProtocol, + CompositeBackend, + createDeepAgent, + StateBackend, + StoreBackend, +} from "deepagents"; +import { StructuredTool } from "langchain"; +import * as vscode from "vscode"; +import { IEventPayload } from "../../emitter/interface"; +import { Logger, LogLevel } from "../../infrastructure/logger/logger"; +import { Memory } from "../../memory/base"; +import { Orchestrator } from "../../orchestrator"; +import { getAPIKeyAndModel } from "../../utils/utils"; +import { createVscodeFsBackendFactory } from "../backends/filesystem"; +import { + ICodeBuddyAgentConfig, + InterruptConfiguration, +} from "../interface/agent.interface"; +import { ToolProvider } from "../langgraph/tools/provider"; +import { DEVELOPER_SYSTEM_PROMPT } from "./prompts"; +import { createDeveloperSubagents } from "./subagents"; + +export class DeveloperAgent { + private config: ICodeBuddyAgentConfig; + private model: ChatAnthropic | ChatGroq | undefined; + private tools: StructuredTool[]; + private readonly logger: Logger; + private readonly disposables: vscode.Disposable[] = []; + protected readonly orchestrator: Orchestrator; + + constructor(config: ICodeBuddyAgentConfig = {}) { + this.orchestrator = Orchestrator.getInstance(); + this.config = config; + ToolProvider.initialize(); + const providerTools = ToolProvider.getTools(); + this.tools = [...(config.additionalTools || []), ...providerTools]; + + this.logger = Logger.initialize("DeveloperAgent", { + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, + }); + this.disposables.push( + this.orchestrator.onModelChangeSuccess(this.handleModelChange.bind(this)), + ); + } + + private handleModelChange(event: IEventPayload) { + try { + if (!event.message) { + return; + } + const msg = JSON.parse(event.message); + const model = msg.modelName; + this.getAIConfigFromWebProvider(model); + } catch (error) {} + } + + private getAIConfigFromWebProvider(model: string) { + const apiKeyAndModel = getAPIKeyAndModel(model.toLowerCase()); + let currentModel: ChatAnthropic | ChatGroq | undefined; + switch (model.toLowerCase()) { + case "anthropic": + currentModel = new ChatAnthropic({ + apiKey: apiKeyAndModel.apiKey, + model: apiKeyAndModel.model!, + }); + break; + case "groq": + currentModel = new ChatGroq({ + apiKey: apiKeyAndModel.apiKey, + model: apiKeyAndModel.model!, + }); + break; + case "gemini": + // Temporary mesaure to prevent an error being throwned to the user + // The current genai package isnt compatible with langchain 1.0.0 package + currentModel = new ChatAnthropic({ + apiKey: apiKeyAndModel.apiKey, + model: apiKeyAndModel.model!, + }); + break; + default: + break; + } + this.model = currentModel; + Memory.set("agentModel", currentModel); + } + + /** + * Creates the VSCode FileSystem Backend with Ripgrep support + */ + private createVscodeBackend() { + const workspacePath = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath; + + if (!workspacePath) { + console.warn("No workspace folder found for DeveloperAgent."); + } + + return createVscodeFsBackendFactory({ + rootDir: workspacePath || "", + ripgrepSearch: async (opts) => { + const result = spawnSync( + rgPath, + [ + "-n", + "-H", + ...(opts.extraArgs || []), + ...(opts.glob ? ["-g", opts.glob] : []), + opts.pattern, + opts.cwd, + ], + { encoding: "utf-8", maxBuffer: opts.maxBuffer }, + ); + + if (result.error) throw result.error; + return result.stdout; + }, + disableSpawnFallback: false, + useRipgrep: true, + }); + } + + /** + * Constructs the Backend Factory specifically for DeepAgents + */ + private getBackendFactory() { + const vscodeFsBackend = this.createVscodeBackend(); + const { assistantId, store: configStore } = this.config; + + return (stateAndStore: { + state: unknown; + store?: BaseStore; + }): BackendProtocol => { + const defaultBackend = new StateBackend(stateAndStore); + const routes: Record = {}; + + // Mount Documentation/Store backend if store exists + if (stateAndStore.store) { + routes["/docs/"] = new StoreBackend({ + ...stateAndStore, + assistantId: assistantId || "developer-agent", + }); + } + + // Mount Workspace backend + routes["/workspace/"] = vscodeFsBackend; + + return new CompositeBackend(defaultBackend, routes); + }; + } + + /** + * Generates the final System Prompt + */ + private getSystemPrompt(): string { + const { customSystemPrompt } = this.config; + return customSystemPrompt + ? `${DEVELOPER_SYSTEM_PROMPT}\n\n## 📋 Additional Instructions:\n${customSystemPrompt}` + : DEVELOPER_SYSTEM_PROMPT; + } + + /** + * Configures Human-in-the-loop interrupts + * By default, file write and edit operations require user approval + */ + private getInterruptConfiguration(): InterruptConfiguration { + const defaultInterruptOn: InterruptConfiguration = { + write_file: { + allowedDecisions: ["approve", "edit", "reject"], + }, + edit_file: { + allowedDecisions: ["approve", "edit", "reject"], + }, + }; + + return this.config.interruptOn + ? { ...defaultInterruptOn, ...this.config.interruptOn } + : defaultInterruptOn; + } + + /** + * Main entry point to build and return the agent runnable + */ + public create() { + const cachedModel = Memory.get("agentModel"); + if (!this.model && !cachedModel) { + this.logger.error("Error creating DeveloperAgent: No model found"); + vscode.window.showWarningMessage( + "Please make sure that you have selected a valid model with correct API key in the settings.", + ); + throw new Error("Error creating DeveloperAgent: No model found"); + } + + this.model = cachedModel as ChatAnthropic | ChatGroq; + const { store, enableSubAgents = true, checkPointer } = this.config; + + const subagents = enableSubAgents + ? createDeveloperSubagents(this.model, this.tools) + : undefined; + + return createDeepAgent({ + model: this.model, + tools: this.tools, + systemPrompt: this.getSystemPrompt(), + backend: this.getBackendFactory(), + store, + checkpointer: checkPointer, + name: "DeveloperAgent", + subagents, + interruptOn: {}, // FIX: Use the interrupt configuration + }); + } + + /** + * Static factory for the "Advanced" configuration + */ + public static createAdvanced(config: ICodeBuddyAgentConfig = {}) { + const agent = new DeveloperAgent({ + enableWebSearch: true, + enableSubAgents: true, + ...config, + }); + return agent.create(); + } +} + +/** + * Legacy wrapper to maintain backward compatibility if needed, + * or for simple functional usage. + */ +export function createDeveloperAgent(config: ICodeBuddyAgentConfig = {}) { + return new DeveloperAgent(config).create(); +} + +export function createAdvancedDeveloperAgent( + config: ICodeBuddyAgentConfig = {}, +) { + return DeveloperAgent.createAdvanced(config); +} diff --git a/src/agents/developer/prompts.ts b/src/agents/developer/prompts.ts new file mode 100644 index 0000000..f488f77 --- /dev/null +++ b/src/agents/developer/prompts.ts @@ -0,0 +1,96 @@ +/** + * System prompt for the Developer Agent + * This provides comprehensive guidance on using the hybrid storage architecture + */ +export const DEVELOPER_SYSTEM_PROMPT = `You are an expert software developer with access to multiple storage systems: + +## 🗄️ Storage System Architecture: + +### 1. **/workspace/** - Local Filesystem (FilesystemBackend) +- **Purpose**: Active development work on real files +- **Persistence**: Files persist to the actual filesystem on disk +- **Use For**: + - Reading/writing code files you're actively developing + - Editing existing project files + - Creating new source code, configs, or scripts + - Any file operations that should affect the real filesystem +- **Example**: \`/workspace/src/components/Button.tsx\` + +### 2. **/docs/** - Persistent Documentation (StoreBackend) +- **Purpose**: Long-term knowledge storage across all conversations +- **Persistence**: Persists indefinitely across all threads and sessions +- **Use For**: + - API documentation and references + - Architecture decisions and design docs + - Code patterns and best practices + - Learning notes and discoveries + - Project guidelines and standards +- **Example**: \`/docs/api/authentication.md\` + +### 3. **/ (root)** - Ephemeral Session Storage (StateBackend) +- **Purpose**: Temporary scratch space for current conversation +- **Persistence**: Only lasts for this conversation +- **Use For**: + - Quick calculations or temporary data + - Scratch notes during problem-solving + - Intermediate results you don't need to save + - Temporary file processing +- **Example**: \`/temp/analysis-results.txt\` + +## 🌐 Web Search Capability: +You have access to web search for current information and external resources. + +**When to Use Web Search**: +- Looking up latest library versions and releases +- Finding solutions to specific error messages +- Checking current API documentation +- Researching best practices and patterns +- Discovering new tools or libraries +- Understanding unfamiliar concepts + +**Search Strategy**: +1. Check local /docs/ first for known information +2. Search the web for current/external info +3. Save valuable findings to /docs/ for future reference + +## 🎯 Best Practices: + +### File Operations +1. **Read before writing**: Always use \`read_file\` to check existing content before editing +2. **Search before creating**: Use \`grep\` or \`glob\` to find existing files before creating new ones +3. **Organize logically**: Use clear directory structures in all backends +4. **Verify paths**: Double-check which storage backend you're targeting + +### Documentation +1. **Document discoveries**: Save important learnings to /docs/ immediately +2. **Structure docs well**: Use clear hierarchies (e.g., /docs/api/, /docs/guides/) +3. **Keep docs updated**: Update documentation when code changes +4. **Link references**: Include URLs and sources in documentation + +### Development Workflow +1. **Plan first**: Use the \`write_todos\` tool for complex tasks +2. **Test changes**: Verify modifications before moving on +3. **Search strategically**: Balance local knowledge with web research +4. **Clean up**: Remove temporary files from root when done + +### Error Handling +1. **Read error messages carefully**: Extract key information +2. **Search for solutions**: Use web_search with specific error messages +3. **Document fixes**: Save solutions to /docs/troubleshooting/ +4. **Verify fixes**: Test that solutions actually work + +## 🤖 Task Delegation: +You can spawn specialized subagents for complex subtasks: +- **code-analyzer**: Deep code analysis and architecture review +- **doc-writer**: Creating comprehensive documentation +- **debugger**: Finding and fixing bugs, searching for solutions +- **file-organizer**: Refactoring directory structures + +Use the \`task\` tool to delegate when a subtask would benefit from isolated context. + +## 💡 Remember: +- You're helping developers build, debug, and understand their code efficiently +- Always explain your reasoning and decisions +- Be proactive in suggesting improvements +- Keep context clean by using appropriate storage backends +- Balance thoroughness with efficiency`; diff --git a/src/agents/developer/subagents.ts b/src/agents/developer/subagents.ts new file mode 100644 index 0000000..ccb1e93 --- /dev/null +++ b/src/agents/developer/subagents.ts @@ -0,0 +1,97 @@ +import { ChatAnthropic } from "@langchain/anthropic"; +import { ChatGroq } from "@langchain/groq"; +import { SubAgent } from "deepagents"; +import { StructuredTool } from "langchain"; + +/** + * Create specialized subagents for the Developer Agent + * Each subagent has a specific role and optimized prompting + */ +export function createDeveloperSubagents( + model: ChatAnthropic | ChatGroq, // this should be either anthropic or groq or Gemini + tools: StructuredTool[], +): SubAgent[] { + return [ + { + name: "code-analyzer", + description: + "Expert at analyzing code structure, identifying bugs, and suggesting improvements. Use for deep code review and architecture analysis.", + systemPrompt: `You are a code analysis expert specializing in: +- Understanding complex codebases and architectures +- Identifying bugs, code smells, and anti-patterns +- Suggesting refactorings and optimizations +- Explaining complex code patterns clearly + +**Workflow**: +1. Always read files completely before analyzing +2. Use grep to find related code and dependencies +3. Consider edge cases and error handling +4. Provide specific, actionable recommendations +5. Save analysis results to /docs/code-reviews/ for future reference`, + tools: [], + model, + }, + + { + name: "doc-writer", + description: + "Specialist in creating clear, comprehensive documentation. Use for writing docs, guides, and API references.", + systemPrompt: `You are a documentation specialist who creates: +- Clear, comprehensive technical documentation +- API references with examples +- Architecture decision records (ADRs) +- Tutorials and guides + +**Important**: ALWAYS save documentation to /docs/ for persistence. + +**Best Practices**: +- Use markdown formatting for readability +- Include code examples with explanations +- Add tables of contents for long documents +- Link to related documentation +- Include version information where relevant`, + tools: [], + model, + }, + + { + name: "debugger", + description: + "Debugging specialist for finding and fixing issues. Use for investigating bugs, errors, and unexpected behavior.", + systemPrompt: `You are a debugging expert who: +- Analyzes error messages and stack traces +- Searches for solutions to unfamiliar errors +- Tests potential fixes systematically +- Documents root causes and solutions + +**Workflow**: +1. Read the error message/stack trace carefully +2. Check /docs/troubleshooting/ for known issues +3. Search web for solutions if needed +4. Test potential fixes +5. Document the solution in /docs/troubleshooting/`, + tools, + model, + }, + + { + name: "file-organizer", + description: + "Expert at organizing code and refactoring directory structures. Use for project organization tasks.", + systemPrompt: `You are a file organization expert who: +- Creates logical, scalable directory structures +- Moves files to appropriate locations +- Renames files for clarity and consistency +- Cleans up unused or duplicate files + +**Before making changes**: +1. Use ls to explore current structure +2. Use grep to find file references and imports +3. Plan the new structure +4. Execute moves carefully, checking dependencies +5. Update any affected import paths`, + tools: [], + model, + }, + ]; +} diff --git a/src/agents/factory/agent.factory.ts b/src/agents/factory/agent.factory.ts new file mode 100644 index 0000000..e297b0c --- /dev/null +++ b/src/agents/factory/agent.factory.ts @@ -0,0 +1,42 @@ +// src/agents/factory/agent.factory.ts +import { + AnnotationRoot, + InMemoryStore, + MemorySaver, +} from "@langchain/langgraph"; +import { createAdvancedDeveloperAgent } from "../developer/agent"; +import { ICodeBuddyAgentConfig } from "../interface/agent.interface"; +import { ReactAgent } from "langchain"; + +interface IAgentFactory { + createAgent(): Promise, any>>; +} + +export interface AgentFactoryConfig { + enableHITL?: boolean; +} + +export class AgentFactory implements IAgentFactory { + private agent: ReactAgent, any> | null = null; + private readonly config: AgentFactoryConfig; + + private readonly checkpointer = new MemorySaver(); + private readonly store = new InMemoryStore(); + + constructor(config: AgentFactoryConfig = {}) { + this.config = { enableHITL: false, ...config }; + } + + public async createAgent( + config?: ICodeBuddyAgentConfig, + ): Promise, any>> { + if (!this.agent) { + this.agent = await createAdvancedDeveloperAgent({ + checkPointer: config?.checkPointer ?? this.checkpointer, + store: config?.store ?? this.store, + enableHITL: this.config.enableHITL, + }); + } + return this.agent; + } +} diff --git a/src/agents/handlers/message-handler.ts b/src/agents/handlers/message-handler.ts new file mode 100644 index 0000000..f1b9bc1 --- /dev/null +++ b/src/agents/handlers/message-handler.ts @@ -0,0 +1,105 @@ +import { Logger, LogLevel } from "../../infrastructure/logger/logger"; +import { Orchestrator } from "../../orchestrator"; +import { StreamEventType } from "../interface/agent.interface"; +import { CodeBuddyAgentService } from "../services/codebuddy-agent.service"; + +export class MessageHandler { + protected readonly orchestrator: Orchestrator; + private agentService: CodeBuddyAgentService; + private logger: Logger; + private static instance: MessageHandler; + private activeRequests: Map = new Map< + string, + { threadId?: string } + >(); + + constructor() { + this.orchestrator = Orchestrator.getInstance(); + this.agentService = CodeBuddyAgentService.getInstance(); + this.logger = Logger.initialize("MessageHandler", { + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, + }); + } + + static getInstance() { + return (MessageHandler.instance ??= new MessageHandler()); + } + + async handleUserMessage(message: string, metaData?: any) { + const requestId = `request-${Date.now()}`; + const threadId = metaData?.threadId; + this.activeRequests.set(requestId, { threadId }); + try { + await this.orchestrator.publish(StreamEventType.START, { + requestId, + threadId, + metadata: { timestamp: Date.now() }, + }); + + await this.agentService.processUserQuery( + message, + async (chunk) => { + if (!this.activeRequests.has(requestId)) return; + await this.orchestrator.publish(StreamEventType.CHUNK, { + requestId, + threadId, + content: chunk.content, + accumulated: chunk.accumulated, + metadata: { timestamp: Date.now() }, + }); + }, + async (finalContent) => { + if (!this.activeRequests.has(requestId)) return; + await this.orchestrator.publish(StreamEventType.END, { + requestId, + threadId, + content: finalContent, + metadata: { timestamp: Date.now() }, + }); + this.activeRequests.delete(requestId); + this.logger.info(`Request ${requestId} completed`); + }, + async (error) => { + if (!this.activeRequests.has(requestId)) return; + await this.orchestrator.publish(StreamEventType.ERROR, { + requestId, + threadId, + error: `Request ${requestId} failed`, + metadata: { timestamp: Date.now() }, + }); + this.activeRequests.delete(requestId); + this.logger.error(`Request ${requestId} failed`, error); + }, + threadId, + ); + } catch (error: any) { + this.logger.error(`Request ${requestId} failed`, error); + await this.orchestrator.publish(StreamEventType.ERROR, { + requestId, + threadId, + error: `Request ${requestId} failed`, + metadata: { timestamp: Date.now() }, + }); + this.activeRequests.delete(requestId); + } + } + + cancelRequest(requestId: string) { + const requestInfo = this.activeRequests.get(requestId); + if (requestInfo?.threadId) { + this.agentService.cancelStream(requestInfo.threadId); + this.activeRequests.delete(requestId); + this.logger.log( + LogLevel.INFO, + `Request ${requestId} (thread: ${requestInfo.threadId}) cancelled`, + ); + } + } + + dispose() { + this.activeRequests.clear(); + } +} diff --git a/src/agents/interface/agent.interface.ts b/src/agents/interface/agent.interface.ts index efb071d..7456eb0 100644 --- a/src/agents/interface/agent.interface.ts +++ b/src/agents/interface/agent.interface.ts @@ -1,3 +1,6 @@ +import { StructuredTool } from "@langchain/core/tools"; +import { BaseStore } from "@langchain/langgraph"; + export enum AGENT_NODES { LLM_CALL = "llmCall", TOOL_NODE = "tools", @@ -5,3 +8,125 @@ export enum AGENT_NODES { export enum AGENT_EDGES { CONTINUE = "Action", } + +/** + * Human-in-the-loop interrupt decision types + */ +export type InterruptDecision = "approve" | "edit" | "reject"; + +/** + * Configuration for a specific tool interrupt + */ +export interface IToolInterruptConfig { + allowedDecisions: InterruptDecision[]; +} + +/** + * Interrupt configuration for human-in-the-loop approval + * Maps tool names to their interrupt configurations + */ +export type InterruptConfiguration = Record; + +export interface ICodeBuddyAgentConfig { + model?: string; + workspaceRoot?: string; + store?: BaseStore; + assistantId?: string; + additionalTools?: StructuredTool[]; + customSystemPrompt?: string; + enableWebSearch?: boolean; + checkPointer?: any; + enableSubAgents?: boolean; + maxFileSizeMb?: number; + enableHITL?: boolean; + interruptOn?: InterruptConfiguration; + streamOptions?: IStreamOptions; +} + +export interface ISubAgentConfig { + model?: string; + enableWebSearch?: boolean; +} + +export interface IBackendRoute { + path: string; + description: string; + persistent?: boolean; +} + +export interface IAgentResult { + messages: any[]; + state?: any; + error?: any; +} + +export interface IStorageStats { + stateFiles: number; + storeFiles: number; + workspaceFiles: number; + totalSize: number; +} + +export interface IWebsearchConfig { + maxResults?: number; + includeRawContent?: boolean; + timeout?: number; +} + +export enum MessageRole { + USER = "user", + ASSISTANT = "assistant", + SYSTEM = "system", +} + +export enum StreamEventType { + START = "onStreamStart", + END = "onStreamEnd", + CHUNK = "onStreamChunk", + TOOL_START = "toolStart", + TOOL_END = "toolEnd", + ERROR = "onStreamError", + METADATA = "streamMetadata", +} + +export interface IStreamEvent { + type: StreamEventType; + content: string; + metadata?: IStreamMetadata; + accumulated?: string; +} + +interface IStreamMetadata { + node?: string; + toolName?: string; + timestamp?: number; + tokens?: number; +} + +export interface IStreamChunk { + id: string; + content: string; + type: StreamEventType; + metadata?: IStreamMetadata; +} + +export interface IStreamMessage { + id: string; + role: MessageRole; + content: string; + timestamp: number; + isStreaming: boolean; + metadata?: Record; +} + +export interface IVSCodeMessage { + type: string; + payload: any; + requestId?: string; +} + +export interface IStreamOptions { + maxBufferSize: number; + flushInterval: number; + enableBackPressure: boolean; +} diff --git a/src/agents/langgraph/graphs/agent.ts b/src/agents/langgraph/graphs/agent.ts index e78e8df..1eee652 100644 --- a/src/agents/langgraph/graphs/agent.ts +++ b/src/agents/langgraph/graphs/agent.ts @@ -1,149 +1,152 @@ -import { - AIMessage, - BaseMessage, - HumanMessage, - SystemMessage, -} from "@langchain/core/messages"; -import { Runnable, RunnableConfig } from "@langchain/core/runnables"; -import { IterableReadableStream } from "@langchain/core/utils/stream"; -import { END, MessagesAnnotation } from "@langchain/langgraph"; -import { ToolNode } from "@langchain/langgraph/prebuilt"; -import { Logger, LogLevel } from "../../../infrastructure/logger/logger"; -import { agentPrompt } from "../../../utils/prompt"; -import { Orchestrator } from "../../orchestrator"; -import { LLMFactory } from "../llm/factory"; -import { ToolProvider } from "../tools/provider"; -import { GraphBuilder, IGraphBuilder } from "./builder"; -import { Memory } from "../../../memory/base"; -import { generateUUID } from "../../../utils/utils"; +// import { +// AIMessage, +// BaseMessage, +// HumanMessage, +// SystemMessage, +// } from "@langchain/core/messages"; +// import { Runnable, RunnableConfig } from "@langchain/core/runnables"; +// import { IterableReadableStream } from "@langchain/core/utils/stream"; +// import { END, MessagesAnnotation } from "@langchain/langgraph"; +// import { ToolNode } from "@langchain/langgraph/prebuilt"; +// import { Logger, LogLevel } from "../../../infrastructure/logger/logger"; +// import { agentPrompt } from "../../../utils/prompt"; +// import { Orchestrator } from "../../orchestrator"; +// import { LLMFactory } from "../llm/factory"; +// import { ToolProvider } from "../tools/provider"; +// import { GraphBuilder, IGraphBuilder } from "./builder"; +// import { Memory } from "../../../memory/base"; +// import { generateUUID } from "../../../utils/utils"; -export class langGraphAgent { - private readonly compiledGraph: Runnable; - private readonly orchestrator: Orchestrator; +// export class langGraphAgent { +// private readonly compiledGraph: Runnable; +// private readonly orchestrator: Orchestrator; - private conversationHistory: BaseMessage[] = []; - private readonly maxHistoryLength = 3; - private readonly threadId: string; +// private conversationHistory: BaseMessage[] = []; +// private readonly maxHistoryLength = 3; +// private readonly threadId: string; - constructor( - private readonly llm: Runnable, - private readonly toolNode: ToolNode, - private readonly globalSystemInstruction?: string, - private readonly graphBuilder: IGraphBuilder = new GraphBuilder(), - private readonly logger: Logger = Logger.initialize("langGraphAgent", { - minLevel: LogLevel.DEBUG, - }), - ) { - this.llmCall = this.llmCall.bind(this); - this.shouldContinue = this.shouldContinue.bind(this); - this.compiledGraph = this.graphBuilder.build( - this.llmCall, - this.shouldContinue, - this.toolNode, - ); +// constructor( +// private readonly llm: Runnable, +// private readonly toolNode: ToolNode, +// private readonly globalSystemInstruction?: string, +// private readonly graphBuilder: IGraphBuilder = new GraphBuilder(), +// private readonly logger: Logger = Logger.initialize("langGraphAgent", { +// minLevel: LogLevel.DEBUG, +// enableConsole: true, +// enableFile: true, +// enableTelemetry: true, +// }), +// ) { +// this.llmCall = this.llmCall.bind(this); +// this.shouldContinue = this.shouldContinue.bind(this); +// this.compiledGraph = this.graphBuilder.build( +// this.llmCall, +// this.shouldContinue, +// this.toolNode, +// ); - this.orchestrator = Orchestrator.getInstance(); - this.initializeHistory(); - this.threadId = generateUUID(); - } +// this.orchestrator = Orchestrator.getInstance(); +// this.initializeHistory(); +// this.threadId = generateUUID(); +// } - private initializeHistory() { - const savedHistory = Memory.get(`agent-state-${this.threadId}`); - if (savedHistory?.length) { - this.conversationHistory = savedHistory; - } else { - this.conversationHistory = [ - new SystemMessage(this.globalSystemInstruction ?? agentPrompt), - ]; - } - } +// private initializeHistory() { +// const savedHistory = Memory.get(`agent-state-${this.threadId}`); +// if (savedHistory?.length) { +// this.conversationHistory = savedHistory; +// } else { +// this.conversationHistory = [ +// new SystemMessage(this.globalSystemInstruction ?? agentPrompt), +// ]; +// } +// } - private pruneHistory(): void { - if (this.conversationHistory.length > this.maxHistoryLength) { - const systemMessage = this.conversationHistory[0]; - const recentMessages = this.conversationHistory.slice( - -this.maxHistoryLength, - ); - this.conversationHistory = [systemMessage, ...recentMessages]; - Memory.set(`agent-state-${this.threadId}`, this.conversationHistory); - } - } +// private pruneHistory(): void { +// if (this.conversationHistory.length > this.maxHistoryLength) { +// const systemMessage = this.conversationHistory[0]; +// const recentMessages = this.conversationHistory.slice( +// -this.maxHistoryLength, +// ); +// this.conversationHistory = [systemMessage, ...recentMessages]; +// Memory.set(`agent-state-${this.threadId}`, this.conversationHistory); +// } +// } - async llmCall(state: typeof MessagesAnnotation.State) { - const result = await this.llm.invoke(state.messages); - return { - messages: [result], - }; - } +// async llmCall(state: typeof MessagesAnnotation.State) { +// const result = await this.llm.invoke(state.messages); +// return { +// messages: [result], +// }; +// } - /** - * Decides whether the agent should retrieve more information or end the process. - * This function checks the last message in the state for a function call. If a tool call is - * present, the process continues to retrieve information. Otherwise, it ends the process. - * @param {typeof GraphState.State} state - The current state of the agent, including all messages. - * @returns {string} - A decision to either "continue" the retrieval process or "end" it. - */ - shouldContinue(state: typeof MessagesAnnotation.State): string { - const messages: BaseMessage[] = state.messages; - const lastMessage: BaseMessage | undefined = messages.at(-1); - if ( - lastMessage && - "tool_calls" in lastMessage && - Array.isArray(lastMessage.tool_calls) && - lastMessage.tool_calls.length - ) { - return "Action"; - } - return END; - } +// /** +// * Decides whether the agent should retrieve more information or end the process. +// * This function checks the last message in the state for a function call. If a tool call is +// * present, the process continues to retrieve information. Otherwise, it ends the process. +// * @param {typeof GraphState.State} state - The current state of the agent, including all messages. +// * @returns {string} - A decision to either "continue" the retrieval process or "end" it. +// */ +// shouldContinue(state: typeof MessagesAnnotation.State): string { +// const messages: BaseMessage[] = state.messages; +// const lastMessage: BaseMessage | undefined = messages.at(-1); +// if ( +// lastMessage && +// "tool_calls" in lastMessage && +// Array.isArray(lastMessage.tool_calls) && +// lastMessage.tool_calls.length +// ) { +// return "Action"; +// } +// return END; +// } - static create(config: { - apiKey: string; - model: string; - systemInstruction?: string; - }): langGraphAgent { - ToolProvider.initialize(); - const tools = ToolProvider.getTools(); - const toolNode = new ToolNode(tools); +// static create(config: { +// apiKey: string; +// model: string; +// systemInstruction?: string; +// }): langGraphAgent { +// ToolProvider.initialize(); +// const tools = ToolProvider.getTools(); +// const toolNode = new ToolNode(tools); - const llmFactory = new LLMFactory({ ...config, tools }); - const llm = llmFactory.createModel(); +// const llmFactory = new LLMFactory({ ...config, tools }); +// const llm = llmFactory.createModel(); - return new langGraphAgent(llm, toolNode, config.systemInstruction); - } +// return new langGraphAgent(llm, toolNode, config.systemInstruction); +// } - updateAgentConversations(userMessage: string) { - this.conversationHistory.push(new HumanMessage(userMessage)); - } +// updateAgentConversations(userMessage: string) { +// this.conversationHistory.push(new HumanMessage(userMessage)); +// } - async *runx(userMessage: string) { - try { - this.updateAgentConversations(userMessage); - const config: RunnableConfig = { - configurable: { thread_id: this.threadId }, - }; - const stream: IterableReadableStream = - await this.compiledGraph.stream( - { messages: this.conversationHistory }, - config, - ); - for await (const event of stream) { - for (const [nodeName, update] of Object.entries( - event as Record, - )) { - if (update?.messages) { - this.conversationHistory.push(...update.messages); - } - yield { node: nodeName, update }; - this.logger.log(LogLevel.INFO, `Stream event from node: ${nodeName}`); - } - } - this.pruneHistory(); - } catch (error: any) { - this.conversationHistory.pop(); - Memory.set(`agent-state-${this.threadId}`, this.conversationHistory); - this.logger.error("Agent execution failed:", error); - throw error; - } - } -} +// async *runx(userMessage: string) { +// try { +// this.updateAgentConversations(userMessage); +// const config: RunnableConfig = { +// configurable: { thread_id: this.threadId }, +// }; +// const stream: IterableReadableStream = +// await this.compiledGraph.stream( +// { messages: this.conversationHistory }, +// config, +// ); +// for await (const event of stream) { +// for (const [nodeName, update] of Object.entries( +// event as Record, +// )) { +// if (update?.messages) { +// this.conversationHistory.push(...update.messages); +// } +// yield { node: nodeName, update }; +// this.logger.log(LogLevel.INFO, `Stream event from node: ${nodeName}`); +// } +// } +// this.pruneHistory(); +// } catch (error: any) { +// this.conversationHistory.pop(); +// Memory.set(`agent-state-${this.threadId}`, this.conversationHistory); +// this.logger.error("Agent execution failed:", error); +// throw error; +// } +// } +// } diff --git a/src/agents/langgraph/graphs/builder.ts b/src/agents/langgraph/graphs/builder.ts index 28c547f..5551dc3 100644 --- a/src/agents/langgraph/graphs/builder.ts +++ b/src/agents/langgraph/graphs/builder.ts @@ -1,44 +1,44 @@ -import { BaseMessage } from "@langchain/core/messages"; -import { Runnable } from "@langchain/core/runnables"; -import { - END, - MemorySaver, - MessagesAnnotation, - START, - StateGraph, -} from "@langchain/langgraph"; -import { ToolNode } from "@langchain/langgraph/prebuilt"; -import { AGENT_NODES } from "../../interface/agent.interface"; +// import { BaseMessage } from "@langchain/core/messages"; +// import { Runnable } from "@langchain/core/runnables"; +// import { +// END, +// MemorySaver, +// MessagesAnnotation, +// START, +// StateGraph, +// } from "@langchain/langgraph"; +// import { ToolNode } from "@langchain/langgraph/prebuilt"; +// import { AGENT_NODES } from "../../interface/agent.interface"; -export interface IGraphBuilder { - build( - llmCall: ( - state: typeof MessagesAnnotation.State, - ) => Promise<{ messages: BaseMessage[] }>, - shouldContinue: (state: typeof MessagesAnnotation.State) => string, - toolNode: ToolNode, - ): Runnable; -} +// export interface IGraphBuilder { +// build( +// llmCall: ( +// state: typeof MessagesAnnotation.State, +// ) => Promise<{ messages: BaseMessage[] }>, +// shouldContinue: (state: typeof MessagesAnnotation.State) => string, +// toolNode: ToolNode, +// ): Runnable; +// } -export class GraphBuilder implements IGraphBuilder { - build( - llmCall: ( - state: typeof MessagesAnnotation.State, - ) => Promise<{ messages: BaseMessage[] }>, - shouldContinue: (state: typeof MessagesAnnotation.State) => string, - toolNode: ToolNode, - ): Runnable { - const checkpointer = new MemorySaver(); +// export class GraphBuilder implements IGraphBuilder { +// build( +// llmCall: ( +// state: typeof MessagesAnnotation.State, +// ) => Promise<{ messages: BaseMessage[] }>, +// shouldContinue: (state: typeof MessagesAnnotation.State) => string, +// toolNode: ToolNode, +// ): Runnable { +// const checkpointer = new MemorySaver(); - return new StateGraph(MessagesAnnotation) - .addNode(AGENT_NODES.LLM_CALL, llmCall) - .addNode(AGENT_NODES.TOOL_NODE, toolNode) - .addEdge(START, AGENT_NODES.LLM_CALL) - .addConditionalEdges(AGENT_NODES.LLM_CALL, shouldContinue, { - Action: AGENT_NODES.TOOL_NODE, - __end__: END, - }) - .addEdge(AGENT_NODES.TOOL_NODE, AGENT_NODES.LLM_CALL) - .compile({ checkpointer }); - } -} +// return new StateGraph(MessagesAnnotation) +// .addNode(AGENT_NODES.LLM_CALL, llmCall) +// .addNode(AGENT_NODES.TOOL_NODE, toolNode) +// .addEdge(START, AGENT_NODES.LLM_CALL) +// .addConditionalEdges(AGENT_NODES.LLM_CALL, shouldContinue, { +// Action: AGENT_NODES.TOOL_NODE, +// __end__: END, +// }) +// .addEdge(AGENT_NODES.TOOL_NODE, AGENT_NODES.LLM_CALL) +// .compile({ checkpointer }); +// } +// } diff --git a/src/agents/interface.ts b/src/agents/langgraph/interface.ts similarity index 100% rename from src/agents/interface.ts rename to src/agents/langgraph/interface.ts diff --git a/src/agents/langgraph/llm/factory.ts b/src/agents/langgraph/llm/factory.ts index f54a6af..beaa2d5 100644 --- a/src/agents/langgraph/llm/factory.ts +++ b/src/agents/langgraph/llm/factory.ts @@ -1,6 +1,6 @@ +import { ChatAnthropic } from "@langchain/anthropic"; import { Runnable } from "@langchain/core/runnables"; import { StructuredTool } from "@langchain/core/tools"; -import { ChatGoogleGenerativeAI } from "@langchain/google-genai"; export interface ILLMProvider { createModel(): Runnable; @@ -16,11 +16,10 @@ export class LLMFactory implements ILLMProvider { ) {} createModel(): Runnable { - return new ChatGoogleGenerativeAI({ + return new ChatAnthropic({ apiKey: this.config.apiKey, model: this.config.model, temperature: 0.7, - maxOutputTokens: 8192, stopSequences: ["stuck in a loop", "infinite loop detected"], }).bindTools(this.config.tools); } diff --git a/src/agents/langgraph/tools/file.ts b/src/agents/langgraph/tools/file.ts index 77b417e..486bc8a 100644 --- a/src/agents/langgraph/tools/file.ts +++ b/src/agents/langgraph/tools/file.ts @@ -9,7 +9,10 @@ export class LangChainFileTool extends StructuredTool { constructor(private readonly toolInstance: FileTool) { super(); this.logger = Logger.initialize("LangChainFileTool", { - minLevel: LogLevel.INFO, + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } name = "analyze_file_for_question"; diff --git a/src/agents/langgraph/tools/provider.ts b/src/agents/langgraph/tools/provider.ts index d78e9d1..5081beb 100644 --- a/src/agents/langgraph/tools/provider.ts +++ b/src/agents/langgraph/tools/provider.ts @@ -1,12 +1,23 @@ import { Logger, LogLevel } from "../../../infrastructure/logger/logger"; import { ContextRetriever } from "./../../../services/context-retriever"; import { StructuredTool } from "@langchain/core/tools"; -import { FileTool, ThinkTool, WebTool } from "../../../tools/tools"; +import { + FileTool, + ThinkTool, + TravilySearchTool, + WebTool, +} from "../../../tools/tools"; import { LangChainFileTool } from "./file"; import { LangChainThinkTool } from "./think"; import { LangChainWebTool } from "./web"; +import { LangChainTravilySearchTool } from "./travily"; -const logger = Logger.initialize("ToolProvider", { minLevel: LogLevel.INFO }); +const logger = Logger.initialize("ToolProvider", { + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, +}); interface IToolFactory { createTool(): StructuredTool; @@ -19,10 +30,19 @@ class FileToolFactory implements IToolFactory { } } +// class WebToolFactory implements IToolFactory { +// constructor(private contextRetriever: ContextRetriever) { } +// createTool(): StructuredTool { +// return new LangChainWebTool(new WebTool(this.contextRetriever)); +// } +// } + class WebToolFactory implements IToolFactory { constructor(private contextRetriever: ContextRetriever) {} createTool(): StructuredTool { - return new LangChainWebTool(new WebTool(this.contextRetriever)); + return new LangChainTravilySearchTool( + new TravilySearchTool(this.contextRetriever), + ); } } @@ -41,9 +61,9 @@ export class ToolProvider { private constructor() { this.contextRetriever ??= ContextRetriever.initialize(); this.toolFactories = [ - new FileToolFactory(this.contextRetriever), + // new FileToolFactory(this.contextRetriever), new WebToolFactory(this.contextRetriever), - new ThinkToolFactory(), + // new ThinkToolFactory(), ]; this.tools = this.toolFactories.map( (factory): StructuredTool => factory.createTool(), diff --git a/src/agents/langgraph/tools/think.ts b/src/agents/langgraph/tools/think.ts index 3e8cde4..c48b178 100644 --- a/src/agents/langgraph/tools/think.ts +++ b/src/agents/langgraph/tools/think.ts @@ -13,7 +13,10 @@ export class LangChainThinkTool extends StructuredTool { constructor(private readonly toolInstance: ThinkTool) { super(); this.logger = Logger.initialize("LangChainThinkTool", { - minLevel: LogLevel.INFO, + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/agents/langgraph/tools/travily.ts b/src/agents/langgraph/tools/travily.ts new file mode 100644 index 0000000..7cc6243 --- /dev/null +++ b/src/agents/langgraph/tools/travily.ts @@ -0,0 +1,63 @@ +import { Logger, LogLevel } from "../../../infrastructure/logger/logger"; +import { z } from "zod"; +import { StructuredTool } from "@langchain/core/tools"; +import { TravilySearchTool } from "../../../tools/tools"; + +export class LangChainTravilySearchTool extends StructuredTool { + private readonly logger: Logger; + + constructor(private readonly toolInstance: TravilySearchTool) { + super(); + this.logger = Logger.initialize("TravilySearchTool", { + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, + }); + } + + name = "web_search"; + schema = z.object({ + query: z.string().min(1).describe("Search query"), + maxResults: z + .number() + .optional() + .default(5) + .describe("Maximum number of results"), + includeRawContent: z + .boolean() + .optional() + .default(false) + .describe("Include raw HTML content"), + timeout: z + .number() + .optional() + .default(30000) + .describe("Timeout in milliseconds"), + }); + + description = `Search the web for current information, documentation, or solutions. + Use this when you need: + - Current events or real-time data + - External documentation + - Stack Overflow solutions + - API references + + Returns formatted results with titles, URLs, and content snippets.`; + + async _call(input: { query: string }): Promise { + this.logger.info( + `Executing tool: ${this.name} with args: ${JSON.stringify(input)}`, + ); + try { + const result = await this.toolInstance.execute(input.query); + return result ?? ""; + } catch (error: any) { + this.logger.error(`Error in tool ${this.name}: ${error.message}`, { + input, + error, + }); + throw error; + } + } +} diff --git a/src/agents/langgraph/tools/web.ts b/src/agents/langgraph/tools/web.ts index 820279d..f3294d6 100644 --- a/src/agents/langgraph/tools/web.ts +++ b/src/agents/langgraph/tools/web.ts @@ -7,7 +7,12 @@ export class LangChainWebTool extends StructuredTool { private readonly logger: Logger; constructor(private readonly toolInstance: WebTool) { super(); - this.logger = Logger.initialize("GeminiLLM", { minLevel: LogLevel.INFO }); + this.logger = Logger.initialize("GeminiLLM", { + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, + }); } name = "web_search"; diff --git a/src/agents/services/codebuddy-agent.service.ts b/src/agents/services/codebuddy-agent.service.ts new file mode 100644 index 0000000..351c9b2 --- /dev/null +++ b/src/agents/services/codebuddy-agent.service.ts @@ -0,0 +1,190 @@ +import { InMemoryStore, MemorySaver } from "@langchain/langgraph"; +import { Logger, LogLevel } from "../../infrastructure/logger/logger"; +import { createAdvancedDeveloperAgent } from "../developer/agent"; +import { + ICodeBuddyAgentConfig, + StreamEventType, +} from "../interface/agent.interface"; +import { StreamManager } from "./stream-manager.service"; + +export class CodeBuddyAgentService { + private agent: any = null; + private store = new InMemoryStore(); + private checkpointer = new MemorySaver(); + private readonly logger: Logger; + private static instance: CodeBuddyAgentService; + private activeStreams = new Map(); + + constructor() { + this.logger = Logger.initialize("CodeBuddyAgentService", { + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, + }); + } + + static getInstance(): CodeBuddyAgentService { + return (CodeBuddyAgentService.instance ??= new CodeBuddyAgentService()); + } + + private async getAgent(config?: ICodeBuddyAgentConfig) { + if (!this.agent) { + this.agent = await createAdvancedDeveloperAgent({ + checkPointer: config?.checkPointer ?? this.checkpointer, + store: config?.store ?? this.store, + enableHITL: config?.enableHITL ?? false, + }); + this.logger.log(LogLevel.INFO, "Agent initialized"); + } + return this.agent; + } + + async *streamResponse( + userMessage: string, + threadId?: string, + onChunk?: (chunk: any) => void, + ) { + const conversationId = threadId ?? `thread-${Date.now()}`; + const streamManger = new StreamManager({ + maxBufferSize: 10, + flushInterval: 50, + enableBackPressure: true, + }); + this.activeStreams.set(conversationId, streamManger); + const maxIterations = 50; + let iterationCount = 0; + try { + const agent = await this.getAgent(); + const streamId = streamManger.startStream(); + this.logger.log( + LogLevel.INFO, + `Starting stream ${streamId} for thread ${conversationId}`, + ); + const config = { + configurable: { thread_id: conversationId }, + recursionLimit: 100, + }; + let result = await agent.stream( + { messages: [{ role: "user", content: userMessage }] }, + config, + ); + let accumulatedContent = ""; + for await (const event of result) { + iterationCount++; + if (iterationCount >= maxIterations) { + this.logger.log( + LogLevel.ERROR, + `Force stopping: exceeded ${maxIterations} iterations`, + ); + + yield { + type: StreamEventType.ERROR, + content: + "The agent exceeded maximum iterations. Please rephrase your question or try a simpler query.", + metadata: { threadId: conversationId, reason: "max_iterations" }, + }; + break; + } + for (const [nodeName, update] of Object.entries( + event as Record, + )) { + if (update?.messages && Array.isArray(update.messages)) { + const lastMessage = update.messages[update.messages.length - 1]; + if (lastMessage?.content) { + const newContent = String(lastMessage.content); + const delta = newContent.slice(accumulatedContent.length); + if (delta) { + accumulatedContent = newContent; + streamManger.addChunk(delta, { + node: nodeName, + messageType: lastMessage.type, + }); + + yield { + type: StreamEventType.CHUNK, + content: delta, + metadata: { node: nodeName, messageType: lastMessage.type }, + accumulated: accumulatedContent, + }; + onChunk?.({ + type: StreamEventType.CHUNK, + content: delta, + metadata: { node: nodeName, messageType: lastMessage.type }, + accumulated: accumulatedContent, + }); + } + } + } + if (update?.toolCalls) { + for (const toolCall of update.toolCalls) { + streamManger.addToolEvent(toolCall.name, true, toolCall); + yield { + type: StreamEventType.TOOL_START, + content: JSON.stringify(toolCall), + metadata: { + toolName: toolCall.name, + node: nodeName, + }, + }; + } + } + } + } + streamManger.endStream(accumulatedContent); + yield { + type: StreamEventType.END, + content: accumulatedContent, + metadata: { threadId: conversationId }, + }; + } catch (error: any) { + yield { + type: StreamEventType.ERROR, + content: "An unexpected error occurred while processing your request.", + metadata: { threadId: conversationId }, + }; + this.logger.log( + LogLevel.ERROR, + `Stream failed for thread ${conversationId}`, + error, + ); + + throw error; + } finally { + this.activeStreams.delete(conversationId); + } + } + + async processUserQuery( + userInput: string, + onChunk: (chunk: any) => void, + onComplete: (finalContent: string) => void, + onError: (error: Error) => void, + threadId?: string, + ) { + try { + let finalContent = ""; + for await (const chunk of this.streamResponse( + userInput, + threadId, + onChunk, + )) { + if (chunk.type === StreamEventType.END) { + finalContent = chunk.content; + } + } + onComplete(finalContent); + } catch (error: any) { + onError(error); + } + } + + cancelStream(threadId: string) { + const streamManager = this.activeStreams.get(threadId); + if (streamManager && streamManager.isActive()) { + streamManager.endStream(); + this.activeStreams.delete(threadId); + this.logger.log(LogLevel.INFO, `Stream cancelled for thread ${threadId}`); + } + } +} diff --git a/src/agents/services/stream-manager.service.ts b/src/agents/services/stream-manager.service.ts new file mode 100644 index 0000000..f11cd60 --- /dev/null +++ b/src/agents/services/stream-manager.service.ts @@ -0,0 +1,195 @@ +import { Logger, LogLevel } from "../../infrastructure/logger/logger"; +import { Orchestrator } from "../../orchestrator"; +import { generateUUID } from "../../utils/utils"; +import { + IStreamChunk, + IStreamOptions, + StreamEventType, +} from "../interface/agent.interface"; + +/** + * Manages the lifecycle of a data stream by buffering chunks and flushing them periodically + * or when the buffer is full. This class ensures that data is sent in manageable batches, + * provides back-pressure, and handles the start, end, and error states of a stream. + */ +export class StreamManager { + protected readonly orchestrator: Orchestrator; + private buffer: IStreamChunk[] = []; + private flushTimer: NodeJS.Timeout | null = null; + private readonly options: Required; + private readonly logger: Logger; + private isStreaming = false; + private streamId: string | null = null; + + /** + * Initializes a new StreamManager with specific configuration options. + * @param {IStreamOptions} options - Configuration for buffer size, flush interval, and back-pressure. + * Defaults are provided for any omitted options. + */ + constructor(options: IStreamOptions) { + this.orchestrator = Orchestrator.getInstance(); + this.options = { + maxBufferSize: options.maxBufferSize ?? 10, + flushInterval: options.flushInterval ?? 50, + enableBackPressure: options.enableBackPressure ?? true, + }; + this.logger = Logger.initialize("StreamManager", { + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, + }); + } + + /** + * Starts a new streaming session. + * This generates a unique stream ID, resets the state, publishes a start event, + * and schedules the first buffer flush. + * @returns {string} The unique identifier for the newly started stream. + */ + async startStream(): Promise { + this.streamId = generateUUID(); + this.isStreaming = true; + this.buffer = []; + await this.orchestrator.publish(StreamEventType.START, { + id: this.streamId, + content: "", + metadata: { timestamp: Date.now() }, + }); + this.scheduleFlush(); + return this.streamId; + } + + /** + * Sets up a recurring timer to flush the buffer. + * This uses a self-rescheduling `setTimeout` instead of `setInterval` to prevent + * overlapping flushes. The next flush is only scheduled after the current one completes, + * which is more robust if the flush operation takes a variable amount of time. + */ + private scheduleFlush() { + if (this.flushTimer) return; + const run = () => { + if (this.buffer.length > 0) { + this.flush(); + } + // Only continue scheduling if the stream is still active. + if (this.isStreaming) { + this.flushTimer = setTimeout(run, this.options.flushInterval); + } + }; + this.flushTimer = setTimeout(run, this.options.flushInterval); + } + + /** + * Immediately sends all chunks currently in the buffer via the orchestrator. + */ + private flush() { + if (this.buffer.length === 0) return; + + // Atomically swap the buffer to avoid race conditions. New chunks can be + // added to the new empty buffer while the old one is being flushed. + const chunksToFlush = this.buffer; + this.buffer = []; + this.orchestrator.publish("onStreamFlush", chunksToFlush); + } + + /** + * Adds a data chunk to the stream buffer. + * If the buffer reaches its maximum configured size, it will be flushed immediately. + * @param {string} content - The string content of the chunk. + * @param {Record} [metadata] - Optional metadata to associate with the chunk. + */ + addChunk(content: string, metadata?: Record): void { + if (!this.isStreaming) { + this.logger.warn("Attempt to add chunk to a non-streaming session"); + return; + } + const chunk: IStreamChunk = { + id: this.streamId ?? generateUUID(), + type: StreamEventType.CHUNK, + content, + metadata: { ...metadata, timestamp: Date.now() }, + }; + this.buffer.push(chunk); + + // Enforce back-pressure by flushing immediately when the buffer is full. + if (this.buffer.length >= this.options.maxBufferSize) { + this.flush(); + } + } + + /** + * Adds a special event chunk to mark the start or end of a tool's execution. + * These events are flushed immediately to ensure consumers are notified of these + * important state changes without delay. + * @param {string} toolName - The name of the tool. + * @param {boolean} isStart - True if the tool is starting, false if it's ending. + * @param {any} [data] - Optional data associated with the tool event. + */ + addToolEvent(toolName: string, isStart: boolean, data?: any): void { + const chunk: IStreamChunk = { + id: this.streamId ?? generateUUID(), + type: isStart ? StreamEventType.TOOL_START : StreamEventType.TOOL_END, + content: JSON.stringify(data ?? {}), + metadata: { toolName, timestamp: Date.now() }, + }; + this.buffer.push(chunk); + // IMPORTANT: Flush immediately to notify consumers about tool usage right away. + this.flush(); + } + + /** + * Gracefully ends the streaming session. + * This performs a final flush of any remaining data in the buffer, cleans up + * the timer, and publishes an end event. + * @param {string} [finalContent] - Optional final message to include in the end event. + */ + async endStream(finalContent?: string): Promise { + // Ensure any lingering chunks are sent before closing the stream. + this.flush(); + + if (this.flushTimer) { + clearTimeout(this.flushTimer); + this.flushTimer = null; + } + await this.orchestrator.publish("onStreamEnd", { + id: this.streamId, + type: StreamEventType.END, + content: finalContent ?? "", + metadata: { timestamp: Date.now() }, + }); + this.isStreaming = false; + this.streamId = null; + } + + /** + * Handles an error that occurred during the stream. + * It flushes any pending data, publishes an error event, and then terminates the stream. + * @param {Error} error - The error object to be reported. + */ + async handleError(error: Error): Promise { + this.flush(); + const metadata: { timestamp: number; stack?: string; message?: string } = { + timestamp: Date.now(), + }; + this.logger.error("Stream error occurred", { + error, + streamId: this.streamId, + }); + await this.orchestrator.publish("onStreamError", { + id: this.streamId, + type: StreamEventType.ERROR, + content: error.message, + metadata, + }); + await this.endStream(); + } + + /** + * Checks if the stream is currently active. + * @returns {boolean} True if the stream is active, otherwise false. + */ + isActive(): boolean { + return this.isStreaming; + } +} diff --git a/src/agents/tools/websearch.ts b/src/agents/tools/websearch.ts new file mode 100644 index 0000000..0cf60a1 --- /dev/null +++ b/src/agents/tools/websearch.ts @@ -0,0 +1,121 @@ +// src/tools/websearch.ts + +import { getAPIKeyAndModel } from "../../utils/utils"; + +export interface SearchResultItem { + title: string; + url: string; + content: string; + score?: number; +} + +export interface SearchResponse { + answer?: string; + results: SearchResultItem[]; + query: string; +} + +export interface ISearchProvider { + search(query: string, options: SearchOptions): Promise; +} + +export interface SearchOptions { + maxResults: number; + includeRawContent: boolean; + timeout: number; +} + +// --- Concrete Implementation (Tavily) --- + +export class TavilySearchProvider implements ISearchProvider { + private readonly API_URL = "https://api.tavily.com/search"; + private static instance: TavilySearchProvider; + private readonly apiKey = getAPIKeyAndModel("tavily").apiKey; + + static getInstance(): TavilySearchProvider { + return (TavilySearchProvider.instance ??= new TavilySearchProvider()); + } + + async search( + query: string, + options?: SearchOptions, + ): Promise { + const controller = new AbortController(); + const timeoutId = setTimeout(() => controller.abort(), options?.timeout); + + try { + const response = await fetch(this.API_URL, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ + api_key: this.apiKey, + query: query, + max_results: options?.maxResults, + include_answer: true, + include_raw_content: options?.includeRawContent, + search_depth: "advanced", + }), + signal: controller.signal, + }); + + if (!response.ok) { + const errorText = await response.text(); + throw new Error(`API Error ${response.status}: ${errorText}`); + } + + const data = await response.json(); + return this.normalizeResponse(data, query); + } catch (error: any) { + if (error.name === "AbortError") { + throw new Error(`Request timed out after ${options?.timeout}ms`); + } + throw error; + } finally { + clearTimeout(timeoutId); + } + } + + private normalizeResponse(data: any, query: string): SearchResponse { + return { + query, + answer: data.answer, + results: (data.results || []).map((r: any) => ({ + title: r.title || "No Title", + url: r.url || "N/A", + content: r.content || "No content available", + score: r.score, + })), + }; + } +} + +export class SearchResponseFormatter { + static format(response: SearchResponse): string { + const { answer, results, query } = response; + const parts: string[] = []; + + if (answer) { + parts.push(`## Quick Answer:\n${answer}\n`); + } + + parts.push(`## Search Results for: "${query}"`); + parts.push(`Found ${results.length} results\n`); + + if (results.length === 0) { + parts.push(`No results found. Try different keywords.`); + return parts.join("\n"); + } + + results.forEach((result, index) => { + parts.push(`### ${index + 1}. ${result.title}`); + parts.push(`**URL:** ${result.url}`); + parts.push(`**Content:** ${result.content}`); + if (result.score) { + parts.push(`**Relevance:** ${(result.score * 100).toFixed(1)}%`); + } + parts.push(""); + }); + + return parts.join("\n"); + } +} diff --git a/src/application/constant.ts b/src/application/constant.ts index e9e24b9..0f1e754 100644 --- a/src/application/constant.ts +++ b/src/application/constant.ts @@ -56,6 +56,7 @@ export const APP_CONFIG = { font: "font.family", chatview: "chatview.theme", chatviewFont: "chatview.font.size", + tavilyApiKey: "tavily.apiKey", }; export enum generativeAiModels { diff --git a/src/ast/analysis/code.analyser.ts b/src/ast/analysis/code.analyser.ts index 348f1a4..e6d5209 100644 --- a/src/ast/analysis/code.analyser.ts +++ b/src/ast/analysis/code.analyser.ts @@ -23,6 +23,9 @@ export class CodeAnalyzer { ) { this.logger = Logger.initialize("QueryExecutor", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.lairExtractor = LairExtractor.getInstance(); this.relevanceScorer = RelevanceScorer.getInstance(); diff --git a/src/ast/analysis/code.search.ts b/src/ast/analysis/code.search.ts index 529b44a..b332f47 100644 --- a/src/ast/analysis/code.search.ts +++ b/src/ast/analysis/code.search.ts @@ -11,6 +11,9 @@ export class CodeSearch { constructor(private readonly outputChannel: vscode.OutputChannel) { this.logger = Logger.initialize("QueryExecutor", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/ast/analysis/file.parser.ts b/src/ast/analysis/file.parser.ts index 8a7b02d..492662d 100644 --- a/src/ast/analysis/file.parser.ts +++ b/src/ast/analysis/file.parser.ts @@ -17,6 +17,9 @@ export class FileParser { ) { this.logger = Logger.initialize("QueryExecutor", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/ast/commands/analyze-code-command.ts b/src/ast/commands/analyze-code-command.ts index 00272d3..b1d6391 100644 --- a/src/ast/commands/analyze-code-command.ts +++ b/src/ast/commands/analyze-code-command.ts @@ -37,6 +37,9 @@ export class AnalyzeCodeCommand { this.logger = Logger.initialize("QueryExecutor", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/ast/language-config.ts b/src/ast/language-config.ts index 6200825..b78a118 100644 --- a/src/ast/language-config.ts +++ b/src/ast/language-config.ts @@ -18,6 +18,9 @@ export interface ILanguageConfig { const logger = Logger.initialize("extension-main", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); export const languageConfigs: Readonly> = { diff --git a/src/ast/parser/grammar-loader.ts b/src/ast/parser/grammar-loader.ts index b6044d3..d0837ff 100644 --- a/src/ast/parser/grammar-loader.ts +++ b/src/ast/parser/grammar-loader.ts @@ -15,6 +15,9 @@ export class GrammarLoader { ) { this.logger = Logger.initialize("QueryExecutor", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/ast/parser/tree-sitter.parser.ts b/src/ast/parser/tree-sitter.parser.ts index d3b80f6..d704a8e 100644 --- a/src/ast/parser/tree-sitter.parser.ts +++ b/src/ast/parser/tree-sitter.parser.ts @@ -18,6 +18,9 @@ export class TreeSitterParser { ) { this.logger = Logger.initialize("TreeSitterParser", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.grammarLoader = GrammarLoader.getInstance( this.extensionPath, diff --git a/src/ast/query-executor.ts b/src/ast/query-executor.ts index 06fd673..1c13066 100644 --- a/src/ast/query-executor.ts +++ b/src/ast/query-executor.ts @@ -8,6 +8,9 @@ export class QueryExecutor { constructor() { this.logger = Logger.initialize("QueryExecutor", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/ast/smart-truncate.ts b/src/ast/smart-truncate.ts index 1754c37..f7934f2 100644 --- a/src/ast/smart-truncate.ts +++ b/src/ast/smart-truncate.ts @@ -37,6 +37,9 @@ export class LLMOutputTruncator { constructor() { this.logger = Logger.initialize("EnhancedPromptBuilderService", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/commands/architectural-recommendation.ts b/src/commands/architectural-recommendation.ts index d3ab208..599a0ee 100644 --- a/src/commands/architectural-recommendation.ts +++ b/src/commands/architectural-recommendation.ts @@ -6,7 +6,7 @@ import { getAPIKeyAndModel } from "../utils/utils"; import { LLMOutputSanitizer } from "../utils/llm-output-sanitizer"; import { Logger } from "../infrastructure/logger/logger"; import { LogLevel } from "../services/telemetry"; -import { Orchestrator } from "../agents/orchestrator"; +import { Orchestrator } from "../orchestrator"; let orchestrator = Orchestrator.getInstance(); @@ -30,6 +30,9 @@ async function shouldRefreshAnalysis(summary: any): Promise { const logger = Logger.initialize("extension-main", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); /** diff --git a/src/commands/generate-code-chart.ts b/src/commands/generate-code-chart.ts index 04572f7..a4c0b80 100644 --- a/src/commands/generate-code-chart.ts +++ b/src/commands/generate-code-chart.ts @@ -15,79 +15,10 @@ export class GenerateMermaidDiagram extends CodeCommandHandler { ### 🎯 **Visualization Goals** - **Architecture Overview**: High-level system structure - **Data Flow**: Information movement through components -- **Component Relationships**: Dependencies and interactions - **Process Flow**: Step-by-step execution paths ### 📊 **Diagram Types** -#### 🏗️ **System Architecture** -\`\`\`mermaid -graph TB - subgraph "Presentation Layer" - UI[User Interface] - API[REST API] - end - - subgraph "Business Logic Layer" - SVC[Services] - CTRL[Controllers] - VAL[Validators] - end - - subgraph "Data Layer" - REPO[Repositories] - DB[(Database)] - CACHE[(Cache)] - end - - UI --> API - API --> CTRL - CTRL --> SVC - SVC --> VAL - SVC --> REPO - REPO --> DB - REPO --> CACHE -\`\`\` - -#### 🔄 **Data Flow Diagram** -\`\`\`mermaid -flowchart LR - A[User Request] --> B{Authentication} - B -->|Valid| C[Validate Input] - B -->|Invalid| D[Return 401] - C -->|Valid| E[Process Business Logic] - C -->|Invalid| F[Return 400] - E --> G[Update Database] - G --> H[Send Notification] - H --> I[Return Response] -\`\`\` - -#### 🗂️ **Class Relationships** -\`\`\`mermaid -classDiagram - class UserService { - +createUser(userData) - +getUserById(id) - +updateUser(id, data) - +deleteUser(id) - } - - class UserRepository { - +save(user) - +findById(id) - +update(id, data) - +delete(id) - } - - class EmailService { - +sendWelcomeEmail(user) - +sendNotification(user, message) - } - - UserService --> UserRepository: uses - UserService --> EmailService: uses -\`\`\` - #### ⏱️ **Sequence Diagram** \`\`\`mermaid sequenceDiagram @@ -134,67 +65,6 @@ erDiagram } \`\`\` -### 🎨 **Diagram Guidelines** - -#### **Component Identification** -1. **Controllers**: Entry points for requests -2. **Services**: Business logic containers -3. **Repositories**: Data access abstractions -4. **Models**: Data structures and entities -5. **Utilities**: Helper functions and shared logic - -#### **Relationship Mapping** -- **Dependencies**: A uses B -- **Composition**: A contains B -- **Inheritance**: A extends B -- **Association**: A relates to B - -#### **Flow Documentation** -- **Happy Path**: Normal execution flow -- **Error Paths**: Exception handling routes -- **Async Operations**: Background processes -- **External Dependencies**: Third-party services - -### 🔧 **Advanced Visualizations** - -#### **Microservices Architecture** -\`\`\`mermaid -graph TB - subgraph "API Gateway" - GW[Load Balancer] - end - - subgraph "User Service" - US[User API] - UDB[(User DB)] - end - - subgraph "Order Service" - OS[Order API] - ODB[(Order DB)] - end - - subgraph "Payment Service" - PS[Payment API] - PDB[(Payment DB)] - end - - subgraph "Notification Service" - NS[Notification API] - QUEUE[Message Queue] - end - - GW --> US - GW --> OS - GW --> PS - OS --> NS - PS --> NS - US --> UDB - OS --> ODB - PS --> PDB - NS --> QUEUE -\`\`\` - #### **State Machine** \`\`\`mermaid stateDiagram-v2 diff --git a/src/commands/generate-documentation.ts b/src/commands/generate-documentation.ts index 4e01f19..ec852ba 100644 --- a/src/commands/generate-documentation.ts +++ b/src/commands/generate-documentation.ts @@ -5,6 +5,9 @@ import { Logger, LogLevel } from "../infrastructure/logger/logger"; const logger = Logger.initialize("extension-main", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); /** diff --git a/src/commands/handler.ts b/src/commands/handler.ts index 075c1bb..a28aef0 100644 --- a/src/commands/handler.ts +++ b/src/commands/handler.ts @@ -21,7 +21,7 @@ import { } from "../utils/utils"; import { Memory } from "../memory/base"; import { Logger, LogLevel } from "../infrastructure/logger/logger"; -import { Orchestrator } from "../agents/orchestrator"; +import { Orchestrator } from "../orchestrator"; import { architecturalRecommendationCommand } from "./architectural-recommendation"; interface ICodeCommandHandler { @@ -72,6 +72,9 @@ export abstract class CodeCommandHandler implements ICodeCommandHandler { this.xGrokModel = getConfigValue(grokModel); this.logger = Logger.initialize("CodeCommandHandler", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.orchestrator = Orchestrator.getInstance(); } diff --git a/src/commands/pr/change-detector.service.ts b/src/commands/pr/change-detector.service.ts new file mode 100644 index 0000000..62091d3 --- /dev/null +++ b/src/commands/pr/change-detector.service.ts @@ -0,0 +1,32 @@ +// src/services/change-detection/change-detector.service.ts +import * as vscode from "vscode"; +import { IChangeProvider, ChangeDetails } from "./types"; + +export class ChangeDetector { + constructor(private readonly providers: IChangeProvider[]) {} + + async findChanges(targetBranch: string): Promise { + for (const provider of this.providers) { + try { + const result = await provider.getChanges(targetBranch); + if (result) { + console.log(`Successfully found changes using: ${provider.name}`); + return result; + } + } catch (error) { + console.warn(`Provider ${provider.name} failed:`, error); + } + } + + // Final fallback if no providers succeed + vscode.window.showWarningMessage( + "Could not detect any Git changes. The review might be less accurate.", + ); + return { + branchInfo: `Current branch vs ${targetBranch} (No changes detected)`, + changedFiles: [], + diffContent: + "Note: No specific file changes were detected. Performing a general code quality assessment.", + }; + } +} diff --git a/src/commands/pr/git-cli.provider.ts b/src/commands/pr/git-cli.provider.ts new file mode 100644 index 0000000..19d5ea7 --- /dev/null +++ b/src/commands/pr/git-cli.provider.ts @@ -0,0 +1,30 @@ +// src/services/change-detection/git-cli.provider.ts +import * as vscode from "vscode"; +import { GitActions } from "../../services/git-actions"; +import { IChangeProvider, ChangeDetails } from "./types"; + +export class GitCliProvider implements IChangeProvider { + public readonly name = "Git CLI"; + + constructor(private readonly gitActions: GitActions) {} + + async getChanges(targetBranch: string): Promise { + const modifiedFiles = await this.gitActions.getModifiedFiles(targetBranch); + if (modifiedFiles.length === 0) { + return null; // No changes found, let the next provider try + } + + const prDiff = await this.gitActions.getPRDifferenceSummary(targetBranch); + const currentBranchInfo = await this.gitActions.getCurrentBranchInfo(); + + vscode.window.showInformationMessage( + `🔍 Reviewing PR via Git CLI: ${currentBranchInfo.current} → ${targetBranch} (${modifiedFiles.length} files changed)`, + ); + + return { + branchInfo: `${currentBranchInfo.current} → ${targetBranch}`, + changedFiles: modifiedFiles, + diffContent: prDiff, + }; + } +} diff --git a/src/commands/pr/pr-prompt-builder.service.ts b/src/commands/pr/pr-prompt-builder.service.ts new file mode 100644 index 0000000..9df5a1d --- /dev/null +++ b/src/commands/pr/pr-prompt-builder.service.ts @@ -0,0 +1,96 @@ +import { ChangeDetails } from "./types"; + +export class PRPromptBuilder { + build(details: ChangeDetails): string { + return `You are CodeBuddy, a senior software engineer conducting a comprehensive Pull Request review. Provide thorough, constructive feedback with actionable code examples. + +## PR Context +- **Branch Info**: ${details.branchInfo} +- **Files Modified**: ${details.changedFiles.length} files +- **Changed Files**: +${details.changedFiles.map((file) => ` - ${file}`).join("\n")} + +## Review Areas +Analyze for: **Code Quality** (readability, SOLID principles), **Security** (input validation, auth), **Performance** (algorithms, memory), **Architecture** (design patterns, complexity), **Testing** (coverage, edge cases). + +## Output Format + +### 🔍 **Assessment** +- **Status**: APPROVED/APPROVED WITH COMMENTS/CHANGES REQUESTED +- **Risk**: HIGH/MEDIUM/LOW +- **Summary**: Brief change overview + +### ✅ **Strengths** & ⚠️ **Issues** +List positive aspects and areas needing improvement. + +### 🔧 **Code Optimizations** +For each issue, provide: +- **File:Line**: Specific location +- **Problem**: What's wrong +- **Solution**: Optimized code example +- **Pattern**: Recommended design pattern +- **Benefit**: Why it's better + + +**Example Format:** +\`\`\`typescript +// Before: Complex nested conditions +if (user.isActive && user.hasSubscription && user.subscription.isPaid) { + // logic +} + +// After: Guard clauses + Strategy pattern +if (!user.isActive) return 'inactive'; +if (!user.hasSubscription) return 'trial'; +return user.subscription.isPaid ? 'premium' : 'unpaid'; +\`\`\` + +### 🏗️ **Design Recommendations** +- **Patterns**: Factory, Observer, Strategy, Command for specific scenarios +- **SOLID**: Single responsibility, dependency inversion applications +- **Architecture**: Clean/hexagonal architecture, DDD alignment +- **Refactoring**: Extract method, reduce complexity (target CC < 10) + +### 🔀 **Complexity Analysis** +- **High Complexity Functions**: Break down >10 CC functions +- **Nested Logic**: Use early returns, polymorphism over conditionals +- **Long Methods**: Extract to single-purpose functions +- **Technical Debt**: Identify accumulation areas + +### 🚀 **Performance Examples** +\`\`\`typescript +// N+1 Query Fix +const orders = await orderService.getByUserIds(userIds); +// Memory Leak Fix +return () => listeners.delete(event); // cleanup +\`\`\` + +### 🎯 **Action Items** +- **Must Fix**: Critical security/performance issues +- **Should Fix**: Code quality improvements +- **Consider**: Future architecture enhancements + +**Guidelines**: Be specific, show concrete examples, explain benefits, prioritize by impact. + +### **Mermaid SEQUENCE DIAGRAM for the overall flow** + +### **Learning resources for identified gaps** + +## Code Content +${details.diffContent} + +Provide comprehensive review with optimization examples above.`; + } + + buildErrorPrompt(error: unknown): string { + return `You are CodeBuddy, a senior software engineer. An error occurred while preparing a PR review. + +Please analyze the current workspace for general improvements in: +1. Code quality and maintainability +2. Security vulnerabilities +3. Performance optimizations +4. Design patterns and architecture + +Error encountered: ${error instanceof Error ? error.message : String(error)}`; + } +} diff --git a/src/commands/pr/review-pr.ts b/src/commands/pr/review-pr.ts new file mode 100644 index 0000000..481a327 --- /dev/null +++ b/src/commands/pr/review-pr.ts @@ -0,0 +1,83 @@ +// src/commands/review-pr.ts +import * as vscode from "vscode"; +import { CodeCommandHandler } from "../handler"; +import { GitActions } from "../../services/git-actions"; +import { ChangeDetector } from "./change-detector.service"; +import { formatText } from "../../utils/utils"; +import { GitCliProvider } from "./git-cli.provider"; +import { PRPromptBuilder } from "./pr-prompt-builder.service"; + +export class ReviewPR extends CodeCommandHandler { + private readonly changeDetector: ChangeDetector; + private readonly promptBuilder: PRPromptBuilder; + // private readonly branchSelector: BranchSelector; + + constructor(action: string, context: vscode.ExtensionContext) { + super(action, context); + + // Dependency Injection: Compose services here + const gitActions = new GitActions(); + // this.branchSelector = new BranchSelector(gitActions); + this.promptBuilder = new PRPromptBuilder(); + + // The order of providers determines the fallback strategy + const changeProviders = [ + new GitCliProvider(gitActions), + // new VscodeApiProvider(new VscodeGitApi()), + // new RecentFileChangeProvider(), // Another potential provider + ]; + + this.changeDetector = new ChangeDetector(changeProviders); + } + + private async selectTargetBranch(): Promise { + // This logic can be moved to a dedicated BranchSelector service + // For brevity, it is kept here but should ideally be extracted. + const gitActions = new GitActions(); // Or inject it + const branches = await gitActions.getAvailableBranches(); + const currentBranch = await gitActions.getCurrentBranchInfo(); + const availableBranches = branches.filter( + (b) => b !== currentBranch.current, + ); + if (availableBranches.length === 0) { + vscode.window.showWarningMessage( + "No other branches found to compare against.", + ); + return undefined; + } + const selected = await vscode.window.showQuickPick(availableBranches, { + placeHolder: `Select target branch to review ${currentBranch.current} against`, + }); + return selected; + } + + public async generatePrompt(): Promise { + try { + // 1. User Interaction + const targetBranch = await this.selectTargetBranch(); + if (!targetBranch) { + throw new Error("PR review cancelled - no target branch selected."); + } + + // 2. Data Fetching (Delegated) + const changeDetails = await this.changeDetector.findChanges(targetBranch); + + // 3. Prompt Construction (Delegated) + return this.promptBuilder.build(changeDetails); + } catch (error) { + console.error("Error generating PR review prompt:", error); + vscode.window.showErrorMessage( + error instanceof Error ? error.message : "An unknown error occurred.", + ); + return this.promptBuilder.buildErrorPrompt(error); + } + } + + formatResponse(review: string): string { + return formatText(review); + } + + async createPrompt(selectedCode: string): Promise { + return this.generatePrompt(); + } +} diff --git a/src/commands/pr/types.ts b/src/commands/pr/types.ts new file mode 100644 index 0000000..03622ac --- /dev/null +++ b/src/commands/pr/types.ts @@ -0,0 +1,22 @@ +import * as vscode from "vscode"; + +export interface ChangeDetails { + branchInfo: string; + changedFiles: string[]; + diffContent: string; +} + +export interface IChangeProvider { + getChanges(targetBranch: string): Promise; + readonly name: string; // For logging purposes +} + +export interface VscodeGitApi { + getChanges(): Promise; + + getBranchName(): Promise; + + getChangesContent( + changes: vscode.SourceControlResourceState[], + ): Promise; +} diff --git a/src/commands/pr/vscode-api.provider.ts b/src/commands/pr/vscode-api.provider.ts new file mode 100644 index 0000000..7a69cc2 --- /dev/null +++ b/src/commands/pr/vscode-api.provider.ts @@ -0,0 +1,31 @@ +// src/services/change-detection/vscode-api.provider.ts +import * as vscode from "vscode"; +import { IChangeProvider, ChangeDetails, VscodeGitApi } from "./types"; + +export class VscodeApiProvider implements IChangeProvider { + public readonly name = "VS Code Git API"; + + constructor(private readonly vscodeGit: VscodeGitApi) {} + + async getChanges(targetBranch: string): Promise { + const changes = await this.vscodeGit.getChanges(); + if (changes.length === 0) { + return null; + } + + const changedFiles = changes.map( + (change) => + `${vscode.workspace.asRelativePath(change.resourceUri)} (${change.decorations?.tooltip || "modified"})`, + ); + + const currentBranch = (await this.vscodeGit.getBranchName()) || "HEAD"; + const branchInfo = `Current branch: ${currentBranch} (target: ${targetBranch})`; + + const diffContent = await this.vscodeGit.getChangesContent( + changes.slice(0, 5), + ); + + return { branchInfo, changedFiles, diffContent }; + } +} +// Note: You would create a VscodeGitApi class to wrap the complex API interactions from the original code. diff --git a/src/commands/review-pr.ts b/src/commands/review-pr.ts deleted file mode 100644 index 2074cdc..0000000 --- a/src/commands/review-pr.ts +++ /dev/null @@ -1,451 +0,0 @@ -import * as vscode from "vscode"; -import { CodeCommandHandler } from "./handler"; -import { GitActions } from "../services/git-actions"; -import { formatText } from "../utils/utils"; - -export class ReviewPR extends CodeCommandHandler { - private readonly gitActions: GitActions; - - constructor(action: string, context: vscode.ExtensionContext) { - super(action, context); - this.gitActions = new GitActions(); - } - - /** - * Get VS Code git changes (more reliable than manual git commands) - */ - private async getVSCodeGitChanges(): Promise<{ - changes: vscode.SourceControlResourceState[]; - repository: any; - }> { - // Get the git extension - const gitExtension = vscode.extensions.getExtension("vscode.git")?.exports; - const api = gitExtension?.getAPI(1); - - if (!api) { - throw new Error("Git extension not available"); - } - - // Get the repository for the current workspace - const workspaceUri = vscode.workspace.workspaceFolders?.[0]?.uri; - if (!workspaceUri) { - throw new Error("No workspace folder found"); - } - - const repository = api.getRepository(workspaceUri); - if (!repository) { - throw new Error("No git repository found in workspace"); - } - - // Get all changes (staged and unstaged) - const changes = [ - ...repository.state.indexChanges, - ...repository.state.workingTreeChanges, - ]; - - return { changes, repository }; - } - - /** - * Get changed files from VS Code's git integration - */ - private async getChangedFilesFromVSCode(): Promise<{ - files: string[]; - content: string; - }> { - try { - // Use VS Code's workspace to find recently modified files - const changedFiles: string[] = []; - let content = ""; - - // Optimized file retrieval: only fetch files modified in the last 24 hours - const now = Date.now(); - const oneDayAgo = now - 24 * 60 * 60 * 1000; // 24 hours ago - - // First get all potential files (limit to reduce I/O) - const allFiles = await vscode.workspace.findFiles( - "**/*.{ts,js,tsx,jsx,json,md,py,java,cs,php}", - "**/node_modules/**", - 50, // Reduced from 100 to limit initial fetch - ); - - // Filter files based on last modified time more efficiently - const recentFiles: vscode.Uri[] = []; - const batchSize = 10; // Process files in batches to avoid blocking - - for (let i = 0; i < allFiles.length; i += batchSize) { - const batch = allFiles.slice(i, i + batchSize); - const batchResults = await Promise.allSettled( - batch.map(async (fileUri) => { - try { - const stat = await vscode.workspace.fs.stat(fileUri); - if (stat.mtime >= oneDayAgo && stat.mtime <= now) { - return fileUri; - } - } catch (error: any) { - this.logger.error( - `Error getting file stat for ${fileUri.fsPath}:`, - error, - ); - } - return null; - }), - ); - - // Collect successful results - batchResults.forEach((result) => { - if (result.status === "fulfilled" && result.value) { - recentFiles.push(result.value); - } - }); - - // Stop if we have enough files - if (recentFiles.length >= 10) break; - } - - // If we have recent files, use them - if (recentFiles.length > 0) { - for (const fileUri of recentFiles.slice(0, 5)) { - const relativePath = vscode.workspace.asRelativePath(fileUri); - changedFiles.push(relativePath); - - try { - const document = await vscode.workspace.openTextDocument(fileUri); - const fileContent = document.getText(); - const truncatedContent = - fileContent.length > 800 - ? fileContent.substring(0, 800) + "... [truncated]" - : fileContent; - content += `\n\n## File: ${relativePath}\n\`\`\`${this.getFileExtension(relativePath)}\n${truncatedContent}\n\`\`\``; - } catch (error: any) { - content += `\n\n## File: ${relativePath}\n[Error reading file: ${error}]`; - } - } - } - - return { files: changedFiles, content }; - } catch (error: any) { - this.logger.error("Error getting changed files from VS Code:", error); - return { files: [], content: "Error detecting changed files" }; - } - } - - private getFileExtension(filePath: string): string { - const ext = filePath.split(".").pop()?.toLowerCase(); - switch (ext) { - case "ts": - case "tsx": - return "typescript"; - case "js": - case "jsx": - return "javascript"; - case "py": - return "python"; - case "java": - return "java"; - case "cs": - return "csharp"; - case "php": - return "php"; - case "md": - return "markdown"; - case "json": - return "json"; - default: - return ext || "text"; - } - } - - /** - * Get file content from VS Code - */ - private async getFileContent(filePath: string): Promise { - try { - const workspaceUri = vscode.workspace.workspaceFolders?.[0]?.uri; - if (!workspaceUri) { - return "Could not access workspace"; - } - - const fileUri = vscode.Uri.joinPath(workspaceUri, filePath); - const document = await vscode.workspace.openTextDocument(fileUri); - return document.getText(); - } catch (error: any) { - return `Error reading file: ${error}`; - } - } - - /** - * Allow user to select target branch for PR review - */ - private async selectTargetBranch(): Promise { - try { - const branches = await this.gitActions.getAvailableBranches(); - const currentBranch = await this.gitActions.getCurrentBranchInfo(); - - // Filter out the current branch from the options - const availableBranches = branches.filter( - (b) => b !== currentBranch.current, - ); - - // Try to detect common base branches and put them first - const commonBaseBranches = [ - "main", - "master", - "develop", - "dev", - "staging", - ]; - const priorityBranches = commonBaseBranches.filter((b) => - availableBranches.includes(b), - ); - const otherBranches = availableBranches.filter( - (b) => !commonBaseBranches.includes(b), - ); - - const sortedBranches = [...priorityBranches, ...otherBranches]; - - if (sortedBranches.length === 0) { - vscode.window.showWarningMessage( - "No other branches found to compare against", - ); - return undefined; - } - - // Create quick pick items with additional context - const quickPickItems = sortedBranches.map((branch) => ({ - label: branch, - description: commonBaseBranches.includes(branch) - ? "(common base branch)" - : "", - detail: `Compare ${currentBranch.current} → ${branch}`, - })); - - const selected = await vscode.window.showQuickPick(quickPickItems, { - placeHolder: `Select target branch to review ${currentBranch.current} against`, - title: "Pull Request Review - Target Branch", - matchOnDescription: true, - matchOnDetail: true, - }); - - return selected?.label; - } catch (error: any) { - this.logger.error("Error selecting target branch:", error); - vscode.window.showErrorMessage( - `Failed to get available branches: ${error}`, - ); - return undefined; - } - } - - /** - * Generate comprehensive PR review prompt using VS Code git integration - */ - async generatePrompt(): Promise { - try { - let changedFiles: string[] = []; - let diffContent = ""; - let branchInfo = "Unknown branch"; - - // First, always ask user to select target branch for PR review - const targetBranch = await this.selectTargetBranch(); - if (!targetBranch) { - vscode.window.showInformationMessage( - "PR review cancelled - no target branch selected", - ); - throw new Error("No target branch selected for PR review"); - } - - try { - // Try to use git commands first for PR diff against specific branch - const modifiedFiles = - await this.gitActions.getModifiedFiles(targetBranch); - const prDiff = - await this.gitActions.getPRDifferenceSummary(targetBranch); - const currentBranchInfo = await this.gitActions.getCurrentBranchInfo(); - - changedFiles = modifiedFiles; - diffContent = prDiff; - branchInfo = `${currentBranchInfo.current} → ${targetBranch}`; - - this.logger.info( - `PR review: comparing ${currentBranchInfo.current} against ${targetBranch}`, - ); - - // Show user confirmation of what's being reviewed - vscode.window.showInformationMessage( - `🔍 Reviewing PR: ${currentBranchInfo.current} → ${targetBranch} (${modifiedFiles.length} files changed)`, - ); - } catch (gitError) { - this.logger.info( - "Git commands failed, falling back to VS Code git integration:", - gitError, - ); - - // Fallback to VS Code's git integration - try { - const { changes, repository } = await this.getVSCodeGitChanges(); - - if (changes.length > 0) { - changedFiles = changes.map((change) => { - const relativePath = vscode.workspace.asRelativePath( - change.resourceUri, - ); - return `${relativePath} (${change.decorations?.tooltip || "modified"})`; - }); - - // Get current branch info - const currentBranch = repository.state.HEAD?.name || "HEAD"; - branchInfo = `Current branch: ${currentBranch} (target: ${targetBranch})`; - - // Get sample of changed file content for context - const sampleFiles = changes.slice(0, 5); // Limit to first 5 files - for (const change of sampleFiles) { - const filePath = vscode.workspace.asRelativePath( - change.resourceUri, - ); - const content = await this.getFileContent(filePath); - const truncatedContent = - content.length > 1000 - ? content.substring(0, 1000) + "... [truncated]" - : content; - - diffContent += `\n\n## File: ${filePath}\n${truncatedContent}`; - } - } - } catch (vscodeError) { - this.logger.error( - "Both git commands and VS Code git integration failed:", - vscodeError, - ); - - // Provide user-friendly error notification - vscode.window - .showErrorMessage( - `Failed to retrieve changes between current branch and ${targetBranch}. ` + - "Please ensure Git is properly configured and accessible. " + - "The review will proceed with recently modified files as a fallback.", - "View Output", - ) - .then((selection) => { - if (selection === "View Output") { - vscode.window.showInformationMessage( - "Check the VS Code Developer Console (Help > Toggle Developer Tools) for detailed error information.", - ); - } - }); - } - } - - // If we still have no changes, let's check for any recent modifications in the workspace - if (changedFiles.length === 0) { - this.logger.info("No git changes found, using recent file detection"); - const { files, content } = await this.getChangedFilesFromVSCode(); - changedFiles = files; - if (content) { - diffContent = content; - } else { - diffContent = - "Note: No recent changes detected. Performing general code quality assessment of workspace files."; - } - } - - return `You are CodeBuddy, a senior software engineer conducting a comprehensive Pull Request review. Provide thorough, constructive feedback with actionable code examples. - -## PR Context -- **Branch Info**: ${branchInfo} -- **Files Modified**: ${changedFiles.length} files -- **Changed Files**: -${changedFiles.map((file) => ` - ${file}`).join("\n")} - -## Review Areas -Analyze for: **Code Quality** (readability, SOLID principles), **Security** (input validation, auth), **Performance** (algorithms, memory), **Architecture** (design patterns, complexity), **Testing** (coverage, edge cases). - -## Output Format - -### 🔍 **Assessment** -- **Status**: APPROVED/APPROVED WITH COMMENTS/CHANGES REQUESTED -- **Risk**: HIGH/MEDIUM/LOW -- **Summary**: Brief change overview - -### ✅ **Strengths** & ⚠️ **Issues** -List positive aspects and areas needing improvement. - -### 🔧 **Code Optimizations** -For each issue, provide: -- **File:Line**: Specific location -- **Problem**: What's wrong -- **Solution**: Optimized code example -- **Pattern**: Recommended design pattern -- **Benefit**: Why it's better - -**Example Format:** -\`\`\`typescript -// Before: Complex nested conditions -if (user.isActive && user.hasSubscription && user.subscription.isPaid) { - // logic -} - -// After: Guard clauses + Strategy pattern -if (!user.isActive) return 'inactive'; -if (!user.hasSubscription) return 'trial'; -return user.subscription.isPaid ? 'premium' : 'unpaid'; -\`\`\` - -### 🏗️ **Design Recommendations** -- **Patterns**: Factory, Observer, Strategy, Command for specific scenarios -- **SOLID**: Single responsibility, dependency inversion applications -- **Architecture**: Clean/hexagonal architecture, DDD alignment -- **Refactoring**: Extract method, reduce complexity (target CC < 10) - -### 🔀 **Complexity Analysis** -- **High Complexity Functions**: Break down >10 CC functions -- **Nested Logic**: Use early returns, polymorphism over conditionals -- **Long Methods**: Extract to single-purpose functions -- **Technical Debt**: Identify accumulation areas - -### 🚀 **Performance Examples** -\`\`\`typescript -// N+1 Query Fix -const orders = await orderService.getByUserIds(userIds); -// Memory Leak Fix -return () => listeners.delete(event); // cleanup -\`\`\` - -### 🎯 **Action Items** -- **Must Fix**: Critical security/performance issues -- **Should Fix**: Code quality improvements -- **Consider**: Future architecture enhancements - -**Guidelines**: Be specific, show concrete examples, explain benefits, prioritize by impact. - -## Code Content -${diffContent} - -Provide comprehensive review with optimization examples above.`; - } catch (error: any) { - this.logger.error("Error generating PR review prompt:", error); - - // Return a basic prompt even if everything fails - return `You are CodeBuddy, a senior software engineer conducting a code review. - -Please analyze the current workspace for: -1. Code quality and maintainability -2. Security vulnerabilities -3. Performance optimizations -4. Design patterns and architecture - -Since no specific changes were detected, provide a general assessment of the codebase and suggest improvements. - -Error encountered: ${error}`; - } - } - - formatResponse(review: string): string { - return formatText(review); - } - - async createPrompt(selectedCode: string): Promise { - // For PR review, we don't use selectedCode as we analyze the entire PR diff - return await this.generatePrompt(); - } -} diff --git a/src/commands/review.ts b/src/commands/review.ts index 0711f13..5ddb93c 100644 --- a/src/commands/review.ts +++ b/src/commands/review.ts @@ -119,6 +119,12 @@ const posts = useMemo(() => loadPosts(), [dependency]); - [ ] Documentation updated - [ ] Code follows style guidelines +**Guidelines**: Be specific, show concrete examples, explain benefits, prioritize by impact. + +### **Mermaid SEQUENCE DIAGRAM for the overall flow** + +### **Learning resources for identified gaps** + **Focus**: Provide specific, actionable feedback with concrete examples and measurable improvements.`; return PROMPT; } diff --git a/src/config/vector-db.config.ts b/src/config/vector-db.config.ts index 028cf1a..750a7ab 100644 --- a/src/config/vector-db.config.ts +++ b/src/config/vector-db.config.ts @@ -89,7 +89,10 @@ export class VectorDbConfigurationManager implements vscode.Disposable { constructor() { this.logger = Logger.initialize("VectorDbConfigurationManager", { - minLevel: LogLevel.INFO, + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.setupConfigurationWatcher(); diff --git a/src/emitter/base.ts b/src/emitter/base.ts index 09eee33..6cdcf0c 100644 --- a/src/emitter/base.ts +++ b/src/emitter/base.ts @@ -6,6 +6,9 @@ export class BaseEmitter> { constructor() { this.logger = Logger.initialize("CodeCommandHandler", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } private readonly emitters: Map> = diff --git a/src/emitter/interface.ts b/src/emitter/interface.ts index 3dd9f71..c58b381 100644 --- a/src/emitter/interface.ts +++ b/src/emitter/interface.ts @@ -31,7 +31,12 @@ type AgentEventKeys = | "onRefactoring" | "onUpdateUserPreferences" | "onGetUserPreferences" - | "onUpdateThemePreferences"; + | "onUpdateThemePreferences" + | "onStreamStart" + | "onStreamChunk" + | "onStreamEnd" + | "onStreamError" + | "onStreamFlush"; export type IAgentEventMap = Record; export interface IEventPayload { @@ -39,4 +44,10 @@ export interface IEventPayload { message?: any; timestamp: string; data?: any; + requestId?: string; + threadId?: string; + content?: string; + accumulated?: string; + metadata?: Record; + error?: string; } diff --git a/src/emitter/publisher.ts b/src/emitter/publisher.ts index 058de36..b52f80d 100644 --- a/src/emitter/publisher.ts +++ b/src/emitter/publisher.ts @@ -36,15 +36,35 @@ export class EventEmitter extends BaseEmitter> { "onUpdateThemePreferences", ); + // NEW: Streaming events + onPlanStep: vscode.Event = this.createEvent("onPlanStep"); + onToolCall: vscode.Event = this.createEvent("onToolCall"); + onContentDelta: vscode.Event = + this.createEvent("onContentDelta"); + onComplete: vscode.Event = this.createEvent("onComplete"); + onStreamStart: vscode.Event = + this.createEvent("onStreamStart"); + onStreamChunk: vscode.Event = + this.createEvent("onStreamChunk"); + onStreamEnd: vscode.Event = this.createEvent("onStreamEnd"); + onStreamError: vscode.Event = + this.createEvent("onStreamError"); + onStreamFlush: vscode.Event = + this.createEvent("onStreamFlush"); + onModelChangeSuccess: vscode.Event = this.createEvent( + "onModelChangeSuccess", + ); + /** * Emits a generic event with specified status, message, and optional data. * * @template T The type of the optional data. * @param {string} eventName The name of the event to emit. - * @param {string} message The message associated with the event (optional). + * @param {any} message The message associated with the event (can be string or object). */ - publish(eventName: keyof IAgentEventMap, message?: string, data?: any) { + + publish(eventName: keyof IAgentEventMap, message?: any, data?: any) { const payload: IEventPayload = { type: eventName, message, diff --git a/src/extension.ts b/src/extension.ts index 2f0f718..9aa0b00 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1,7 +1,7 @@ import * as fs from "fs"; import * as path from "path"; import * as vscode from "vscode"; -import { Orchestrator } from "./agents/orchestrator"; +import { Orchestrator } from "./orchestrator"; import { APP_CONFIG, CODEBUDDY_ACTIONS, @@ -23,23 +23,30 @@ import { InterviewMe } from "./commands/interview-me"; import { OptimizeCode } from "./commands/optimize"; import { RefactorCode } from "./commands/refactor"; import { ReviewCode } from "./commands/review"; -import { ReviewPR } from "./commands/review-pr"; +import { ReviewPR } from "./commands/pr/review-pr"; import { EventEmitter } from "./emitter/publisher"; import { Logger, LogLevel } from "./infrastructure/logger/logger"; import { Memory } from "./memory/base"; -import { FileUploadService } from "./services/file-upload"; import { PersistentCodebaseUnderstandingService } from "./services/persistent-codebase-understanding.service"; import { SqliteDatabaseService } from "./services/sqlite-database.service"; -import { getAPIKeyAndModel, getConfigValue } from "./utils/utils"; +import { + getAPIKeyAndModel, + getConfigValue, + setConfigValue, +} from "./utils/utils"; import { AnthropicWebViewProvider } from "./webview-providers/anthropic"; import { CodeActionsProvider } from "./webview-providers/code-actions"; import { DeepseekWebViewProvider } from "./webview-providers/deepseek"; import { GeminiWebViewProvider } from "./webview-providers/gemini"; import { GroqWebViewProvider } from "./webview-providers/groq"; import { WebViewProviderManager } from "./webview-providers/manager"; +import { DeveloperAgent } from "./agents/developer/agent"; const logger = Logger.initialize("extension-main", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); const { @@ -106,6 +113,13 @@ function initializeWebViewProviders( }; const providerManager = WebViewProviderManager.getInstance(context); + let apiKeys = ""; + + for (const [key, value] of Object.entries(modelConfigurations)) { + if (getConfigValue(value.key) === "apiKey") { + apiKeys += `${key}, `; + } + } if (selectedGenerativeAiModel in modelConfigurations) { const modelConfig = modelConfigurations[selectedGenerativeAiModel]; @@ -124,6 +138,13 @@ function initializeWebViewProviders( ); } + if (apiKeys.length > 0) { + vscode.window.showErrorMessage( + `${apiKeys} APIkeys are required \n + Check out the FAQ and SETTINGS section to configure your AI assistant`, + ); + } + // Store providerManager globally and add to subscriptions (globalThis as any).providerManager = providerManager; context.subscriptions.push(providerManager); @@ -138,6 +159,10 @@ function initializeWebViewProviders( export async function activate(context: vscode.ExtensionContext) { try { + new DeveloperAgent({}); + const selectedGenerativeAiModel = getConfigValue("generativeAi.option"); + setConfigValue("generativeAi.option", "Gemini"); + initializeWebViewProviders(context, selectedGenerativeAiModel); Logger.sessionId = Logger.generateId(); const databaseService: SqliteDatabaseService = @@ -440,7 +465,6 @@ export async function activate(context: vscode.ExtensionContext) { logger.info(`Total commands registered: ${subscriptions.length}`); - // ⚡ FAST: Essential UI components only const quickFix = new CodeActionsProvider(); quickFixCodeAction = vscode.languages.registerCodeActionsProvider( { scheme: "file", language: "*" }, @@ -448,20 +472,11 @@ export async function activate(context: vscode.ExtensionContext) { ); agentEventEmmitter = new EventEmitter(); - - // Vector database commands are already registered in initializePhase4Orchestration - // No need to register them again here - - // ⚡ DEFER: Initialize WebView providers lazily - const selectedGenerativeAiModel = getConfigValue("generativeAi.option"); - initializeWebViewProviders(context, selectedGenerativeAiModel); context.subscriptions.push( ...subscriptions, quickFixCodeAction, agentEventEmmitter, orchestrator, - // Note: providerManager is handled in initializeWebViewProviders - // secretStorageService, ); } catch (error: any) { // Memory.clear(); diff --git a/src/infrastructure/http/http-service.ts b/src/infrastructure/http/http-service.ts index 197d741..98bd295 100644 --- a/src/infrastructure/http/http-service.ts +++ b/src/infrastructure/http/http-service.ts @@ -13,7 +13,12 @@ export class HttpClient implements IHttpClient { private static instance: HttpClient; constructor() { - this.logger = Logger.initialize("HttpClient", { minLevel: LogLevel.DEBUG }); + this.logger = Logger.initialize("HttpClient", { + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, + }); } static getInstance() { diff --git a/src/infrastructure/repository/code.ts b/src/infrastructure/repository/code.ts index 3715944..6acc1d1 100644 --- a/src/infrastructure/repository/code.ts +++ b/src/infrastructure/repository/code.ts @@ -8,6 +8,9 @@ export class CodeRepository implements ICodeRepository { private constructor() { this.logger = Logger.initialize("CodeRepository", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/llms/base.ts b/src/llms/base.ts index 8c4e58c..ab64aa7 100644 --- a/src/llms/base.ts +++ b/src/llms/base.ts @@ -8,7 +8,12 @@ export abstract class BaseLLM> { protected logger: Logger; constructor(protected config: ILlmConfig) { - this.logger = Logger.initialize("BaseLLM", { minLevel: LogLevel.DEBUG }); + this.logger = Logger.initialize("BaseLLM", { + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, + }); this.validateConfig(); } diff --git a/src/llms/deepseek/deepseek.ts b/src/llms/deepseek/deepseek.ts index 9999c96..2d71995 100644 --- a/src/llms/deepseek/deepseek.ts +++ b/src/llms/deepseek/deepseek.ts @@ -1,5 +1,5 @@ import * as vscode from "vscode"; -import { Orchestrator } from "../../agents/orchestrator"; +import { Orchestrator } from "../../orchestrator"; import { COMMON } from "../../application/constant"; import { Memory } from "../../memory/base"; import { CodeBuddyToolProvider } from "../../tools/factory/tool"; @@ -43,6 +43,9 @@ export class DeepseekLLM this.orchestrator = Orchestrator.getInstance(); this.logger = Logger.initialize("DeepseekLLM", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); CodeBuddyToolProvider.initialize(); this.initializeDisposable(); diff --git a/src/llms/gemini/gemini.ts b/src/llms/gemini/gemini.ts index 8e2e3e1..f5a77a4 100644 --- a/src/llms/gemini/gemini.ts +++ b/src/llms/gemini/gemini.ts @@ -6,8 +6,8 @@ import { } from "@google/generative-ai"; import { BaseMessage } from "@langchain/core/messages"; import * as vscode from "vscode"; -import { langGraphAgent } from "../../agents/langgraph/graphs/agent"; -import { Orchestrator } from "../../agents/orchestrator"; +// import { langGraphAgent } from "../../agents/langgraph/graphs/agent"; +import { Orchestrator } from "../../orchestrator"; import { COMMON } from "../../application/constant"; import { Logger } from "../../infrastructure/logger/logger"; import { Memory } from "../../memory/base"; @@ -18,6 +18,7 @@ import { BaseLLM } from "../base"; import { GroqLLM } from "../groq/groq"; import { GeminiLLMSnapShot, ILlmConfig } from "../interface"; import { Message } from "../message"; +import { createAdvancedDeveloperAgent } from "../../agents/developer/agent"; export class GeminiLLM extends BaseLLM @@ -45,7 +46,12 @@ export class GeminiLLM this.orchestrator = Orchestrator.getInstance(); CodeBuddyToolProvider.initialize(); this.intializeDisposable(); - this.logger = Logger.initialize("GeminiLLM", { minLevel: LogLevel.DEBUG }); + this.logger = Logger.initialize("GeminiLLM", { + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, + }); this.groqLLM = GroqLLM.getInstance({ apiKey: getAPIKeyAndModel("groq").apiKey, model: "meta-llama/Llama-4-Scout-17B-16E-Instruct", @@ -169,11 +175,33 @@ export class GeminiLLM return JSON.stringify(content); } + async *runx(userMessage: string) { + try { + const agent = await createAdvancedDeveloperAgent({}); + const result = await agent.stream({ + messages: [ + { + role: "user", + content: userMessage, + }, + ], + }); + for await (const event of result) { + for (const [nodeName, update] of Object.entries( + event as Record, + )) { + yield { node: nodeName, update }; + this.logger.log(LogLevel.INFO, `Stream event from node: ${nodeName}`); + } + } + } catch (error: any) { + this.logger.error("Agent execution failed:", error); + throw error; + } + } + async processUserQuery(userInput: string): Promise { - const apiKey = getAPIKeyAndModel("gemini").apiKey; - const model = getAPIKeyAndModel("gemini").model; - const agent = langGraphAgent.create({ apiKey, model: model ?? "" }); - const stream = await agent.runx(userInput); + const stream = await this.runx(userInput); for await (const update of stream) { if (update?.update?.messages) { const lastMessageContent = this.handleUserQuery(update.update.messages); @@ -184,18 +212,33 @@ export class GeminiLLM } } - async run(userQuery: string) { - try { - const traceId = generateUUID(); - Logger.setTraceId(traceId); - this.userQuery = userQuery; - const result = await this.processUserQuery(userQuery); - return result; - } catch (error) { - console.error("Error occured will running the agent", error); - throw error; - } - } + // async processUserQuery(userInput: string): Promise { + // const apiKey = getAPIKeyAndModel("gemini").apiKey; + // const model = getAPIKeyAndModel("gemini").model; + // const agent = langGraphAgent.create({ apiKey, model: model ?? "" }); + // const stream = await agent.runx(userInput); + // for await (const update of stream) { + // if (update?.update?.messages) { + // const lastMessageContent = this.handleUserQuery(update.update.messages); + // if (lastMessageContent) { + // this.orchestrator.publish("onQuery", String(lastMessageContent)); + // } + // } + // } + // } + + // async run(userQuery: string) { + // try { + // const traceId = generateUUID(); + // Logger.setTraceId(traceId); + // this.userQuery = userQuery; + // const result = await this.processUserQuery(userQuery); + // return result; + // } catch (error) { + // console.error("Error occured will running the agent", error); + // throw error; + // } + // } public createSnapShot(data?: any): GeminiLLMSnapShot { const snapshot: GeminiLLMSnapShot = { diff --git a/src/agents/orchestrator.ts b/src/orchestrator.ts similarity index 81% rename from src/agents/orchestrator.ts rename to src/orchestrator.ts index d9159d2..829ebbc 100644 --- a/src/agents/orchestrator.ts +++ b/src/orchestrator.ts @@ -1,6 +1,6 @@ import * as vscode from "vscode"; -import { IEventPayload } from "../emitter/interface"; -import { EventEmitter } from "../emitter/publisher"; +import { IEventPayload } from "./emitter/interface"; +import { EventEmitter } from "./emitter/publisher"; export class Orchestrator extends EventEmitter implements vscode.Disposable { private static instance: Orchestrator; @@ -31,9 +31,7 @@ export class Orchestrator extends EventEmitter implements vscode.Disposable { } this.disposables.push( - this.onStatusChange(this.handleStatus.bind(this)), this.onPromptGenerated(this.handlePromptGeneratedEvent.bind(this)), - // this.onError(this.handleError.bind(this)), ); this.isInitialized = true; } @@ -44,7 +42,12 @@ export class Orchestrator extends EventEmitter implements vscode.Disposable { public handlePromptGeneratedEvent(event: IEventPayload) { console.error(`Error: ${event.message})`); - this.publish("onResponse", event.message); + this.publish("onResponse", event.message ?? event); + } + + public handleComplete(event: IEventPayload) { + console.log(`✅ Complete: ${JSON.stringify(event.message)}`); + // Can forward to webview or process further } public dispose(): void { diff --git a/src/services/agent-state.ts b/src/services/agent-state.ts index 1a2b6ff..1a6d2ac 100644 --- a/src/services/agent-state.ts +++ b/src/services/agent-state.ts @@ -1,4 +1,4 @@ -import { AgentState } from "../agents/interface"; +import { AgentState } from "../agents/langgraph/interface"; import { COMMON } from "../application/constant"; import { GeminiLLMSnapShot } from "../llms/interface"; import { FileStorage, IStorage } from "./file-storage"; diff --git a/src/services/analysis-strategies/base-analysis-strategy.ts b/src/services/analysis-strategies/base-analysis-strategy.ts index 0a5c230..5f6bd6f 100644 --- a/src/services/analysis-strategies/base-analysis-strategy.ts +++ b/src/services/analysis-strategies/base-analysis-strategy.ts @@ -13,6 +13,9 @@ export abstract class BaseAnalysisStrategy implements IAnalysisStrategy { constructor(protected readonly strategyName: string) { this.logger = Logger.initialize(`${strategyName}Strategy`, { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/services/chat-history-worker.ts b/src/services/chat-history-worker.ts index 693ed74..5ada6f9 100644 --- a/src/services/chat-history-worker.ts +++ b/src/services/chat-history-worker.ts @@ -85,6 +85,9 @@ export class ChatHistoryWorker { this.chatHistoryRepo = ChatHistoryRepository.getInstance(); this.logger = Logger.initialize(ChatHistoryWorker.name, { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/services/code-indexing.ts b/src/services/code-indexing.ts index 71a6a1b..0e9fff7 100644 --- a/src/services/code-indexing.ts +++ b/src/services/code-indexing.ts @@ -19,6 +19,9 @@ export class CodeIndexingService { constructor() { this.logger = Logger.initialize("CodeIndexingService", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); const { apiKey, model } = getAPIKeyAndModel("gemini"); this.embeddingService = new EmbeddingService(apiKey); diff --git a/src/services/code-structure.mapper.ts b/src/services/code-structure.mapper.ts index a6ac7cd..feff7f8 100644 --- a/src/services/code-structure.mapper.ts +++ b/src/services/code-structure.mapper.ts @@ -23,6 +23,9 @@ export class CodeStructureMapper { this.code = code; this.logger = Logger.initialize("CodeStructureMapper", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/services/codebase-analysis-cache.ts b/src/services/codebase-analysis-cache.ts index f6e5347..190b4df 100644 --- a/src/services/codebase-analysis-cache.ts +++ b/src/services/codebase-analysis-cache.ts @@ -19,6 +19,9 @@ export class CodebaseAnalysisCache { private constructor() { this.logger = Logger.initialize("CodebaseAnalysisCache", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); // Clean up expired entries every 10 minutes diff --git a/src/services/codebase-understanding.service.ts b/src/services/codebase-understanding.service.ts index 4a3307a..17f0cea 100644 --- a/src/services/codebase-understanding.service.ts +++ b/src/services/codebase-understanding.service.ts @@ -54,6 +54,9 @@ export class CodebaseUnderstandingService { private constructor() { this.logger = Logger.initialize("CodebaseUnderstandingService", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.workspaceService = WorkspaceService.getInstance(); this.cache = CodebaseAnalysisCache.getInstance(); diff --git a/src/services/context-retriever.ts b/src/services/context-retriever.ts index 000e468..2c67f2e 100644 --- a/src/services/context-retriever.ts +++ b/src/services/context-retriever.ts @@ -1,5 +1,5 @@ import * as vscode from "vscode"; -import { Orchestrator } from "../agents/orchestrator"; +import { Orchestrator } from "../orchestrator"; import { IFileToolConfig, IFileToolResponse, @@ -9,6 +9,10 @@ import { getAPIKeyAndModel, getGenerativeAiModel } from "./../utils/utils"; import { EmbeddingService } from "./embedding"; import { LogLevel } from "./telemetry"; import { WebSearchService } from "./web-search-service"; +import { + TavilySearchProvider, + SearchResponseFormatter, +} from "../agents/tools/websearch"; export class ContextRetriever { // private readonly codeRepository: CodeRepository; @@ -18,6 +22,7 @@ export class ContextRetriever { private static instance: ContextRetriever; private readonly webSearchService: WebSearchService; protected readonly orchestrator: Orchestrator; + private readonly tavilySearch: TavilySearchProvider; constructor() { // this.codeRepository = CodeRepository.getInstance(); // Always use Gemini for embeddings to ensure consistency @@ -27,8 +32,12 @@ export class ContextRetriever { this.embeddingService = new EmbeddingService(embeddingApiKey); this.logger = Logger.initialize("ContextRetriever", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.webSearchService = WebSearchService.getInstance(); + this.tavilySearch = TavilySearchProvider.getInstance(); this.orchestrator = Orchestrator.getInstance(); } @@ -95,4 +104,19 @@ export class ContextRetriever { throw error; } } + + async travilySearch(query: string) { + const defaults = { + maxResults: 5, + includeRawContent: false, + timeout: 30000, + }; + try { + const result = await this.tavilySearch.search(query, defaults); + return SearchResponseFormatter.format(result); + } catch (error: any) { + this.logger.error("[WebSearch] Execution Error:", error); + return `Error performing web search: ${error.message}`; + } + } } diff --git a/src/services/documentation-generator.service.ts b/src/services/documentation-generator.service.ts index be813d4..ca6d735 100644 --- a/src/services/documentation-generator.service.ts +++ b/src/services/documentation-generator.service.ts @@ -80,6 +80,9 @@ export class DocumentationGeneratorService { constructor() { this.logger = Logger.initialize("DocumentationGeneratorService", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.codebaseService = CodebaseUnderstandingService.getInstance(); this.workspaceService = WorkspaceService.getInstance(); diff --git a/src/services/embedding.ts b/src/services/embedding.ts index 24f6165..8101c34 100644 --- a/src/services/embedding.ts +++ b/src/services/embedding.ts @@ -48,6 +48,9 @@ export class EmbeddingService { this.genAI = new GoogleGenerativeAI(this.apiKey); this.logger = Logger.initialize("EmbeddingService", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); // Always use Gemini models for consistent embedding space const embeddingModel = this.getEmbeddingModelFromConfig(); diff --git a/src/services/enhanced-cache-manager.service.ts b/src/services/enhanced-cache-manager.service.ts index 0b77e07..d11d47e 100644 --- a/src/services/enhanced-cache-manager.service.ts +++ b/src/services/enhanced-cache-manager.service.ts @@ -68,7 +68,10 @@ export class EnhancedCacheManager implements vscode.Disposable { constructor(config: Partial = {}, performanceProfiler?: any) { this.logger = Logger.initialize("EnhancedCacheManager", { - minLevel: LogLevel.INFO, + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.performanceProfiler = performanceProfiler; diff --git a/src/services/enhanced-prompt-builder.service.ts b/src/services/enhanced-prompt-builder.service.ts index 2232319..fe8e387 100644 --- a/src/services/enhanced-prompt-builder.service.ts +++ b/src/services/enhanced-prompt-builder.service.ts @@ -44,6 +44,9 @@ export class EnhancedPromptBuilderService { constructor(context: vscode.ExtensionContext) { this.logger = Logger.initialize("EnhancedPromptBuilderService", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); const { apiKey, model } = getAPIKeyAndModel("groq"); const config = { diff --git a/src/services/error.ts b/src/services/error.ts index 04eaf71..bb4d867 100644 --- a/src/services/error.ts +++ b/src/services/error.ts @@ -49,6 +49,9 @@ export class RetryableOperation { ) { this.logger = Logger.initialize("RetryableOperation", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/services/file-manager.ts b/src/services/file-manager.ts index fbe6a8a..c055ea3 100644 --- a/src/services/file-manager.ts +++ b/src/services/file-manager.ts @@ -3,7 +3,7 @@ import * as path from "path"; import * as vscode from "vscode"; import { IFileUploader } from "../application/interfaces"; import { Logger, LogLevel } from "../infrastructure/logger/logger"; -import { Orchestrator } from "../agents/orchestrator"; +import { Orchestrator } from "../orchestrator"; export class FileManager implements IFileUploader { private static instance: FileManager; @@ -16,6 +16,9 @@ export class FileManager implements IFileUploader { this.orchestrator = Orchestrator.getInstance(); this.logger = Logger.initialize("FileManager", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.fileDir = path.join(this.context.extensionPath, this.fileDir); if (!fs.existsSync(this.fileDir)) { diff --git a/src/services/file-service.ts b/src/services/file-service.ts index 347e1d3..5edb27b 100644 --- a/src/services/file-service.ts +++ b/src/services/file-service.ts @@ -32,7 +32,10 @@ export class FileService { constructor() { this.logger = Logger.initialize("FileService", { - minLevel: LogLevel.INFO, + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/services/file-storage.ts b/src/services/file-storage.ts index 0fc787a..c68fab3 100644 --- a/src/services/file-storage.ts +++ b/src/services/file-storage.ts @@ -20,6 +20,9 @@ export class FileStorage implements IStorage { this.createCodeBuddyFolder(); this.logger = Logger.initialize(FileStorage.name, { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/services/file-system.ts b/src/services/file-system.ts index 6f54256..4a61313 100644 --- a/src/services/file-system.ts +++ b/src/services/file-system.ts @@ -10,6 +10,9 @@ export class FileService { constructor() { this.logger = Logger.initialize("FileService", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/services/file-upload.ts b/src/services/file-upload.ts index 5e14199..81fbea2 100644 --- a/src/services/file-upload.ts +++ b/src/services/file-upload.ts @@ -9,7 +9,7 @@ import * as path from "path"; import * as vscode from "vscode"; import { IEventPayload } from "../emitter/interface"; import { Logger, LogLevel } from "../infrastructure/logger/logger"; -import { Orchestrator } from "../agents/orchestrator"; +import { Orchestrator } from "../orchestrator"; export class FileUploadService implements vscode.Disposable { private readonly ai: GoogleGenAI; @@ -28,6 +28,9 @@ export class FileUploadService implements vscode.Disposable { ); this.logger = Logger.initialize("FileUploadService", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/services/file-watcher.ts b/src/services/file-watcher.ts deleted file mode 100644 index 950da27..0000000 --- a/src/services/file-watcher.ts +++ /dev/null @@ -1,87 +0,0 @@ -// import * as vscode from "vscode"; -// import { Logger } from "../infrastructure/logger/logger"; -// import { LogLevel } from "./telemetry"; -// import { Orchestrator } from "../agents/orchestrator"; - -// export class FileWatcherService implements vscode.Disposable { -// //Note Look into this file watcher use this to update the DB -// private static instance: FileWatcherService | undefined; -// private readonly disposables: vscode.Disposable[] = []; -// protected logger: Logger; -// protected readonly orchestrator: Orchestrator; - -// private constructor() { -// this.orchestrator = Orchestrator.getInstance(); -// this.logger = Logger.initialize(FileWatcherService.name, { -// minLevel: LogLevel.DEBUG, -// }); -// this.registerDisposables(); -// } - -// public static getInstance(): FileWatcherService { -// FileWatcherService.instance ??= new FileWatcherService(); -// return FileWatcherService.instance; -// } - -// registerDisposables() { -// this.disposables.push( -// // vscode.workspace.onDidChangeTextDocument( -// // this.handleTextChangeEvent.bind(this) -// // ), -// vscode.workspace.onDidCreateFiles(this.handleFileCreatedEvent.bind(this)), -// vscode.workspace.onDidSaveTextDocument( -// this.handleSaveTextEvent.bind(this), -// ), -// vscode.workspace.onDidSaveTextDocument((e: vscode.TextDocument) => { -// this.handleSaveTextEvent.bind(this); -// }), -// vscode.workspace.onDidRenameFiles(this.handleFileRenamedEvent.bind(this)), -// vscode.workspace.onDidDeleteFiles(this.handleFileDeletedEvent.bind(this)), // Add this line -// ); -// } - -// handleFileDeletedEvent(e: vscode.FileDeleteEvent) { -// e.files.forEach((file) => { -// this.logger.debug(`File deleted: ${file.fsPath}`); -// this.orchestrator.publish("onFileDeleted", JSON.stringify(file.fsPath)); -// }); -// } - -// handleFileRenamedEvent(e: vscode.FileRenameEvent) { -// e.files.forEach((file) => { -// this.logger.debug( -// `File renamed from ${file.oldUri.fsPath} to ${file.newUri.fsPath}`, -// ); -// this.orchestrator.publish( -// "onFileRenamed", -// JSON.stringify({ -// oldUri: file.oldUri.fsPath, -// newUri: file.newUri.fsPath, -// }), -// ); -// }); -// } - -// handleFileCreatedEvent(e: vscode.FileCreateEvent) { -// this.logger.debug(`New file created: ${e.files}`); -// this.orchestrator.publish("onFileCreated", JSON.stringify(e.files)); -// } - -// // handleTextChangeEvent(e: vscode.TextDocumentChangeEvent) { -// // this.logger.debug(`File changed: ${e.document.uri.fsPath}`); -// // this.orchestrator.publish( -// // "onTextChange", -// // JSON.stringify(e.document.uri.fsPath) -// // ); -// // } - -// handleSaveTextEvent(e: vscode.TextDocument) { -// this.logger.debug(`File saved: ${e.uri.fsPath}`); -// this.orchestrator.publish("OnSaveText", JSON.stringify(e.uri.fsPath)); -// } - -// dispose() { -// this.disposables.forEach((d) => d.dispose()); -// FileWatcherService.instance = undefined; // Allow re-initialization, optional -// } -// } diff --git a/src/services/git-actions.ts b/src/services/git-actions.ts index 2f820ca..3300e83 100644 --- a/src/services/git-actions.ts +++ b/src/services/git-actions.ts @@ -30,6 +30,9 @@ export class GitActions { this.git = simpleGit(options); this.logger = Logger.initialize(GitActions.name, { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/services/input-validator.ts b/src/services/input-validator.ts index a28bffa..3de6695 100644 --- a/src/services/input-validator.ts +++ b/src/services/input-validator.ts @@ -24,6 +24,9 @@ export class InputValidator { private constructor() { this.logger = Logger.initialize("InputValidator", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/services/performance-profiler.service.ts b/src/services/performance-profiler.service.ts index db21ee7..aa11782 100644 --- a/src/services/performance-profiler.service.ts +++ b/src/services/performance-profiler.service.ts @@ -130,7 +130,10 @@ export class PerformanceProfiler implements vscode.Disposable { constructor(configManager?: VectorDbConfigurationManager) { this.logger = Logger.initialize("PerformanceProfiler", { - minLevel: LogLevel.INFO, + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.configManager = configManager; diff --git a/src/services/persistent-codebase-understanding.service.ts b/src/services/persistent-codebase-understanding.service.ts index 7899050..e419ad7 100644 --- a/src/services/persistent-codebase-understanding.service.ts +++ b/src/services/persistent-codebase-understanding.service.ts @@ -48,6 +48,9 @@ export class PersistentCodebaseUnderstandingService { private constructor() { this.logger = Logger.initialize("PersistentCodebaseUnderstandingService", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.workspaceService = WorkspaceService.getInstance(); this.databaseService = SqliteDatabaseService.getInstance(); diff --git a/src/services/production-safeguards.service.ts b/src/services/production-safeguards.service.ts index 88baee6..0b55095 100644 --- a/src/services/production-safeguards.service.ts +++ b/src/services/production-safeguards.service.ts @@ -91,7 +91,10 @@ export class ProductionSafeguards implements vscode.Disposable { serviceStatusChecker?: ServiceStatusChecker, ) { this.logger = Logger.initialize("ProductionSafeguards", { - minLevel: LogLevel.INFO, + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.serviceStatusChecker = serviceStatusChecker; diff --git a/src/services/question-classifier.service.ts b/src/services/question-classifier.service.ts index ee7bd86..4c6b221 100644 --- a/src/services/question-classifier.service.ts +++ b/src/services/question-classifier.service.ts @@ -18,6 +18,9 @@ export class QuestionClassifierService { constructor() { this.logger = Logger.initialize("QuestionClassifierService", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.config = this.loadConfig(); } diff --git a/src/services/secret-storage.ts b/src/services/secret-storage.ts index a0563bd..18a510c 100644 --- a/src/services/secret-storage.ts +++ b/src/services/secret-storage.ts @@ -1,7 +1,7 @@ import * as vscode from "vscode"; import { Logger, LogLevel } from "../infrastructure/logger/logger"; import { APP_CONFIG } from "../application/constant"; -import { Orchestrator } from "../agents/orchestrator"; +import { Orchestrator } from "../orchestrator"; import { IEventPayload } from "../emitter/interface"; export class SecretStorageService implements vscode.Disposable { @@ -14,6 +14,9 @@ export class SecretStorageService implements vscode.Disposable { this.localStorage = context.secrets; this.logger = Logger.initialize("LocalStorageManager", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.orchestrator = Orchestrator.getInstance(); this.registerDisposables(); diff --git a/src/services/sqlite-database.service.ts b/src/services/sqlite-database.service.ts index ab2bd19..044773d 100644 --- a/src/services/sqlite-database.service.ts +++ b/src/services/sqlite-database.service.ts @@ -38,6 +38,9 @@ export class SqliteDatabaseService { private constructor() { this.logger = Logger.initialize("SqliteDatabaseService", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/services/typescript-ats.service.ts b/src/services/typescript-ats.service.ts index 6d408cc..25b699f 100644 --- a/src/services/typescript-ats.service.ts +++ b/src/services/typescript-ats.service.ts @@ -1,7 +1,7 @@ import * as path from "path"; import * as ts from "typescript"; import * as vscode from "vscode"; -import { Orchestrator } from "../agents/orchestrator"; +import { Orchestrator } from "../orchestrator"; import { FSPROPS } from "../application/constant"; import { DeclarationFunctionNode, diff --git a/src/services/user-feedback.service.ts b/src/services/user-feedback.service.ts index 0329bfb..221afb2 100644 --- a/src/services/user-feedback.service.ts +++ b/src/services/user-feedback.service.ts @@ -36,7 +36,10 @@ export class UserFeedbackService implements vscode.Disposable { constructor(options: UserFeedbackOptions = {}) { this.logger = Logger.initialize("UserFeedbackService", { - minLevel: LogLevel.INFO, + minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.options = { diff --git a/src/services/web-search-service.ts b/src/services/web-search-service.ts index d2adb7e..46ee1a8 100644 --- a/src/services/web-search-service.ts +++ b/src/services/web-search-service.ts @@ -1,7 +1,7 @@ import { Readability } from "@mozilla/readability"; import axios from "axios"; import { JSDOM } from "jsdom"; -import { Orchestrator } from "../agents/orchestrator"; +import { Orchestrator } from "../orchestrator"; import { PRIORITY_URLS, WEB_SEARCH_CONFIG } from "../application/constant"; import { Logger } from "../infrastructure/logger/logger"; import { generateQueryString } from "../utils/utils"; diff --git a/src/services/workspace-service.ts b/src/services/workspace-service.ts index f802c97..40466d0 100644 --- a/src/services/workspace-service.ts +++ b/src/services/workspace-service.ts @@ -9,7 +9,7 @@ import * as fs from "fs"; import * as path from "path"; import { Logger, LogLevel } from "../infrastructure/logger/logger"; import { randomUUID } from "crypto"; -import { Orchestrator } from "../agents/orchestrator"; +import { Orchestrator } from "../orchestrator"; export class WorkspaceService implements IWorkspaceService { protected readonly orchestrator: Orchestrator; @@ -26,6 +26,9 @@ export class WorkspaceService implements IWorkspaceService { private constructor() { this.logger = Logger.initialize("WorkspaceService", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.orchestrator = Orchestrator.getInstance(); } diff --git a/src/tools/tools.ts b/src/tools/tools.ts index edc2533..428091a 100644 --- a/src/tools/tools.ts +++ b/src/tools/tools.ts @@ -1,6 +1,7 @@ import { SchemaType } from "@google/generative-ai"; import { IFileToolConfig } from "../application/interfaces/agent.interface"; import { ContextRetriever } from "../services/context-retriever"; +import { z } from "zod"; // class SearchTool { // constructor(private readonly contextRetriever?: ContextRetriever) {} @@ -60,6 +61,48 @@ export class WebTool { } } +export class TravilySearchTool { + constructor(private readonly contextRetriever?: ContextRetriever) {} + + async execute(query: string) { + return await this.contextRetriever?.travilySearch(query); + } + + SearchSchema = z.object({ + query: z.string().min(1).describe("Search query"), + maxResults: z + .number() + .optional() + .default(5) + .describe("Maximum number of results"), + includeRawContent: z + .boolean() + .optional() + .default(false) + .describe("Include raw HTML content"), + timeout: z + .number() + .optional() + .default(30000) + .describe("Timeout in milliseconds"), + }); + + config() { + return { + name: "web_search", + description: `Search the web for current information, documentation, or solutions. + Use this when you need: + - Current events or real-time data + - External documentation + - Stack Overflow solutions + - API references + + Returns formatted results with titles, URLs, and content snippets.`, + schema: this.SearchSchema, + }; + } +} + export class FileTool { constructor(private readonly contextRetriever?: ContextRetriever) {} diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 74c7e8e..f55836a 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -8,6 +8,7 @@ import { import Anthropic from "@anthropic-ai/sdk"; import { Memory } from "../memory/base"; import * as crypto from "crypto"; +import { Buffer } from "buffer"; type GetConfigValueType = (key: string) => T | undefined; @@ -53,7 +54,28 @@ export const formatText = (text?: string): string => { let processedText = fixIncompleteMarkdown(text); processedText = fixUnmatchedBoldFormatting(processedText); - const md = markdownit(); + // Extract mermaid blocks before markdown-it processing to keep syntax intact + processedText = processedText.replace( + /```mermaid\s*([\s\S]*?)```/g, + (_, codeBlock: string) => { + const trimmedCode = codeBlock.trim(); + if (!trimmedCode) { + return ""; + } + + const encodedCode = Buffer.from(trimmedCode, "utf-8").toString( + "base64", + ); + return `\n\n
\n\n`; + }, + ); + + const md = markdownit({ + html: true, + linkify: true, + breaks: true, + }); + return md.render(processedText); } catch (error: any) { // If markdown parsing fails, provide a more robust fallback @@ -87,6 +109,10 @@ export const getConfigValue: GetConfigValueType = ( return vscode.workspace.getConfiguration().get(key); }; +export const setConfigValue = (key: string, value: T) => { + vscode.workspace.getConfiguration().update(key, value); +}; + export const vscodeErrorMessage = (error: string, metaData?: any) => { return vscode.window.showErrorMessage(error); }; @@ -189,6 +215,7 @@ export const getAPIKeyAndModel = ( anthropicApiKey, geminiModel, anthropicModel, + tavilyApiKey, } = APP_CONFIG; let apiKey: string | undefined; let modelName: string | undefined; @@ -208,6 +235,9 @@ export const getAPIKeyAndModel = ( apiKey = getConfigValue(anthropicApiKey); modelName = getConfigValue(anthropicModel); break; + case "tavily": + apiKey = getConfigValue(tavilyApiKey); + break; default: throw new Error(`Unsupported model: ${model}`); } @@ -231,3 +261,7 @@ export const generateId = (): string => { export const generateUUID = () => { return crypto.randomUUID(); }; + +export const isWebSearchConfigured = (): boolean => { + return Boolean(getAPIKeyAndModel("tavily").apiKey); +}; diff --git a/src/webview-providers/base.ts b/src/webview-providers/base.ts index 1c79de7..e619a38 100644 --- a/src/webview-providers/base.ts +++ b/src/webview-providers/base.ts @@ -1,5 +1,5 @@ import * as vscode from "vscode"; -import { Orchestrator } from "../agents/orchestrator"; +import { Orchestrator } from "../orchestrator"; import { FolderEntry, IContextInfo, @@ -24,11 +24,12 @@ import { ProductionSafeguards } from "../services/production-safeguards.service" import { LogLevel } from "../services/telemetry"; import { UserFeedbackService } from "../services/user-feedback.service"; import { WorkspaceService } from "../services/workspace-service"; -import { formatText, getAPIKeyAndModel } from "../utils/utils"; +import { formatText, getAPIKeyAndModel, getConfigValue } from "../utils/utils"; import { getWebviewContent } from "../webview/chat"; import { QuestionClassifierService } from "../services/question-classifier.service"; import { GroqLLM } from "../llms/groq/groq"; import { Role } from "../llms/message"; +import { MessageHandler } from "../agents/handlers/message-handler"; type SummaryGenerator = (historyToSummarize: any[]) => Promise; @@ -72,6 +73,7 @@ export abstract class BaseWebViewProvider implements vscode.Disposable { // Prompt enhancement service protected promptBuilderService: EnhancedPromptBuilderService; private readonly groqLLM: GroqLLM | null; + private readonly codeBuddyAgent: MessageHandler; constructor( private readonly _extensionUri: vscode.Uri, @@ -91,6 +93,9 @@ export abstract class BaseWebViewProvider implements vscode.Disposable { this.orchestrator = Orchestrator.getInstance(); this.logger = Logger.initialize("BaseWebViewProvider", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.workspaceService = WorkspaceService.getInstance(); this.agentService = AgentService.getInstance(); @@ -128,6 +133,7 @@ export abstract class BaseWebViewProvider implements vscode.Disposable { this.contextRetriever = new ContextRetriever(); this.promptBuilderService = new EnhancedPromptBuilderService(context); + this.codeBuddyAgent = MessageHandler.getInstance(); } registerDisposables() { @@ -217,9 +223,6 @@ export abstract class BaseWebViewProvider implements vscode.Disposable { metadata: msg.metadata, })); - // Update the provider's chatHistory array (this should be overridden in child classes) - await this.updateProviderChatHistory(providerHistory); - this.logger.debug( `Synchronized ${persistentHistory.length} chat messages from database`, ); @@ -235,18 +238,6 @@ export abstract class BaseWebViewProvider implements vscode.Disposable { } } - /** - * Update the provider's specific chatHistory array - * Should be overridden by child classes to update their specific chatHistory type - */ - protected updateProviderChatHistory(history: any[]): void { - // Base implementation - child classes should override this - // to update their specific chatHistory arrays - this.logger.debug( - "Base provider - no specific chat history array to update", - ); - } - private async setWebviewHtml(view: vscode.WebviewView): Promise { view.webview.html = getWebviewContent( this.currentWebView?.webview!, @@ -323,6 +314,10 @@ export abstract class BaseWebViewProvider implements vscode.Disposable { switch (message.command) { case "user-input": { this.UserMessageCounter += 1; + const selectedGenerativeAiModel = getConfigValue( + "generativeAi.option", + ); + console.log(selectedGenerativeAiModel); // Validate user input for security const validation = this.inputValidator.validateInput( @@ -380,6 +375,18 @@ export abstract class BaseWebViewProvider implements vscode.Disposable { } } + if (message.metaData?.mode === "Agent") { + let context: string | undefined; + if (message.metaData?.context.length > 0) { + context = await this.getContext(message.metaData.context); + } + return await this.codeBuddyAgent.handleUserMessage( + context + ? JSON.stringify(`${message} \n context: ${context}`) + : JSON.stringify(message), + ); + } + const messageAndSystemInstruction = await this.enhanceMessageWithCodebaseContext( sanitizedMessage, diff --git a/src/webview-providers/deepseek.ts b/src/webview-providers/deepseek.ts index 1187e0a..bff99b3 100644 --- a/src/webview-providers/deepseek.ts +++ b/src/webview-providers/deepseek.ts @@ -23,6 +23,9 @@ export class DeepseekWebViewProvider extends BaseWebViewProvider { super(extensionUri, apiKey, generativeAiModel, context); this.logger = Logger.initialize("DeepseekWebViewProvider", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.deepseekLLM = DeepseekLLM.getInstance({ apiKey: this.apiKey, diff --git a/src/webview-providers/events-provider.ts b/src/webview-providers/events-provider.ts index d43e817..4b9c643 100644 --- a/src/webview-providers/events-provider.ts +++ b/src/webview-providers/events-provider.ts @@ -16,6 +16,9 @@ export class WebViewEventsProvider { // Note: Use factory method for the logger this.logger = Logger.initialize("WebViewEventsProvider", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } diff --git a/src/webview-providers/gemini.ts b/src/webview-providers/gemini.ts index f72f38c..e50f66c 100644 --- a/src/webview-providers/gemini.ts +++ b/src/webview-providers/gemini.ts @@ -4,6 +4,8 @@ import { GeminiLLM } from "../llms/gemini/gemini"; import { IMessageInput, Message } from "../llms/message"; import { Memory } from "../memory/base"; import { BaseWebViewProvider, LLMMessage } from "./base"; +import { CodebuddyAgentService } from "../agents/agentService"; +import { MessageHandler } from "../agents/handlers/message-handler"; export class GeminiWebViewProvider extends BaseWebViewProvider { chatHistory: IMessageInput[] = []; @@ -106,15 +108,6 @@ export class GeminiWebViewProvider extends BaseWebViewProvider { if (metaData?.context.length > 0) { context = await this.getContext(metaData.context); } - if (metaData?.mode === "Agent") { - this.orchestrator.publish("onThinking", "...thinking"); - await this.gemini.run( - context - ? JSON.stringify(`${message} \n context: ${context}`) - : JSON.stringify(message), - ); - return; - } const msg = userMessage?.length ? userMessage : message; diff --git a/src/webview-providers/manager.ts b/src/webview-providers/manager.ts index b656df8..618d4fc 100644 --- a/src/webview-providers/manager.ts +++ b/src/webview-providers/manager.ts @@ -1,15 +1,16 @@ import * as vscode from "vscode"; -import { Orchestrator } from "../agents/orchestrator"; +import { StreamEventType } from "../agents/interface/agent.interface"; import { generativeAiModels } from "../application/constant"; import { IEventPayload } from "../emitter/interface"; +import { Logger, LogLevel } from "../infrastructure/logger/logger"; +import { Orchestrator } from "../orchestrator"; import { ChatHistoryManager } from "../services/chat-history-manager"; -import { getAPIKeyAndModel } from "../utils/utils"; +import { formatText, getAPIKeyAndModel } from "../utils/utils"; import { AnthropicWebViewProvider } from "./anthropic"; import { BaseWebViewProvider } from "./base"; import { DeepseekWebViewProvider } from "./deepseek"; import { GeminiWebViewProvider } from "./gemini"; import { GroqWebViewProvider } from "./groq"; -import { Logger, LogLevel } from "../infrastructure/logger/logger"; export class WebViewProviderManager implements vscode.Disposable { private static instance: WebViewProviderManager; @@ -39,9 +40,13 @@ export class WebViewProviderManager implements vscode.Disposable { this.orchestrator = Orchestrator.getInstance(); this.chatHistoryManager = ChatHistoryManager.getInstance(); this.registerProviders(); + this.registerWebViewProvider(); // Don't register event listeners immediately - do it lazily this.logger = Logger.initialize("WebViewProviderManager", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); } @@ -54,6 +59,10 @@ export class WebViewProviderManager implements vscode.Disposable { this.disposables.push( this.orchestrator.onModelChange(this.handleModelChange.bind(this)), this.orchestrator.onClearHistory(this.handleClearHistory.bind(this)), + this.orchestrator.onStreamStart(this.handleStreamStart.bind(this)), + this.orchestrator.onStreamChunk(this.handleStreamChunk.bind(this)), + this.orchestrator.onStreamEnd(this.handleStreamEnd.bind(this)), + this.orchestrator.onStreamError(this.handleStreamError.bind(this)), ); this.isInitialized = true; } @@ -168,7 +177,7 @@ export class WebViewProviderManager implements vscode.Disposable { this.extensionContext.subscriptions.push(webviewProviderDisposable); } - this.orchestrator.publish( + await this.orchestrator.publish( "onModelChangeSuccess", JSON.stringify({ success: true, @@ -177,7 +186,7 @@ export class WebViewProviderManager implements vscode.Disposable { ); } catch (error: any) { this.logger.error(`Error switching provider: ${error}`); - this.orchestrator.publish( + await this.orchestrator.publish( "onModelChangeSuccess", JSON.stringify({ success: false, @@ -266,6 +275,66 @@ export class WebViewProviderManager implements vscode.Disposable { return this.currentProvider; } + private async handleStreamStart(event: IEventPayload) { + try { + if (this.webviewView?.webview) { + await this.webviewView.webview.postMessage({ + type: StreamEventType.START, + payload: { + requestId: event.message.requestId, + threadId: event.message.threadId, + timestamp: Date.now(), + }, + }); + } + } catch (error: any) { + this.logger.error("Failed to send stream start:", error); + throw error; + } + } + + private async handleStreamChunk(event: IEventPayload) { + if (this.webviewView?.webview) { + await this.webviewView.webview.postMessage({ + type: StreamEventType.CHUNK, + payload: { + requestId: event.message.requestId, + content: event.message.content, + timestamp: Date.now(), + accumulated: formatText(event.message.accumulated), + metadata: event.message.metadata, + }, + }); + } + } + + private async handleStreamEnd(event: IEventPayload) { + if (this.webviewView?.webview) { + await this.webviewView.webview.postMessage({ + type: StreamEventType.END, + payload: { + requestId: event.message.requestId, + content: formatText(event.message.content), + timestamp: event.message.timestamp, + }, + }); + } + } + + private async handleStreamError(event: IEventPayload) { + if (this.webviewView?.webview) { + await this.webviewView.webview.postMessage({ + type: StreamEventType.END, + payload: { + requestId: event.message.requestId, + threadId: event.threadId, + timestamp: event.timestamp, + error: event.error, + }, + }); + } + } + dispose(): void { this.logger.info("WebViewProviderManager disposing..."); diff --git a/src/webview-providers/secret-storage-provider.ts b/src/webview-providers/secret-storage-provider.ts index 68d299f..deb4bd9 100644 --- a/src/webview-providers/secret-storage-provider.ts +++ b/src/webview-providers/secret-storage-provider.ts @@ -1,6 +1,6 @@ import * as vscode from "vscode"; import { Logger } from "../infrastructure/logger/logger"; -import { Orchestrator } from "../agents/orchestrator"; +import { Orchestrator } from "../orchestrator"; import { LogLevel } from "../services/telemetry"; export class VSCodeSecretStorage { @@ -13,6 +13,9 @@ export class VSCodeSecretStorage { this.context = context; this.logger = Logger.initialize("VSCodeSecretStorage", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); this.orchestrator = Orchestrator.getInstance(); } diff --git a/src/workers/embedding-worker.ts b/src/workers/embedding-worker.ts index dd26994..4cca0d5 100644 --- a/src/workers/embedding-worker.ts +++ b/src/workers/embedding-worker.ts @@ -28,6 +28,9 @@ export interface EmbeddingWorkerOptions { const logger = Logger.initialize("extension-main", { minLevel: LogLevel.DEBUG, + enableConsole: true, + enableFile: true, + enableTelemetry: true, }); // Worker thread code (runs when this file is executed as a worker) diff --git a/tsconfig.json b/tsconfig.json index 9ba75cb..9f29018 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,9 @@ "module": "commonjs", "target": "ESNext", "outDir": "out", - "lib": ["ESNext"], + "lib": [ + "ESNext" + ], "skipLibCheck": true, "sourceMap": true, "rootDir": "src", @@ -15,5 +17,11 @@ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, /* Report errors on unused parameters. */ }, - "exclude": ["node_modules", ".vscode-test", "webviewUi", "docs", "src/test/**/*"] -} + "exclude": [ + "node_modules", + ".vscode-test", + "webviewUi", + "docs", + "src/test/**/*" + ] +} \ No newline at end of file diff --git a/webviewUi/package-lock.json b/webviewUi/package-lock.json index aac5a06..621e546 100644 --- a/webviewUi/package-lock.json +++ b/webviewUi/package-lock.json @@ -11,6 +11,7 @@ "@vscode/webview-ui-toolkit": "^1.4.0", "dompurify": "^3.2.4", "highlight.js": "^11.11.0", + "mermaid": "^11.12.2", "react": "^18.3.1", "react-dom": "^18.3.1", "styled-components": "^6.1.19", @@ -33,6 +34,64 @@ "vite": "^6.0.3" } }, + "node_modules/@antfu/install-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-1.1.0.tgz", + "integrity": "sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ==", + "license": "MIT", + "dependencies": { + "package-manager-detector": "^1.3.0", + "tinyexec": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@braintree/sanitize-url": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.1.tgz", + "integrity": "sha512-i1L7noDNxtFyL5DmZafWy1wRVhGehQmzZaz1HiN5e7iylJMSZR7ekOV7NsIqa5qBldlLrsKv4HbgFUVlQrz8Mw==", + "license": "MIT" + }, + "node_modules/@chevrotain/cst-dts-gen": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.0.3.tgz", + "integrity": "sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ==", + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/gast": "11.0.3", + "@chevrotain/types": "11.0.3", + "lodash-es": "4.17.21" + } + }, + "node_modules/@chevrotain/gast": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-11.0.3.tgz", + "integrity": "sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q==", + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/types": "11.0.3", + "lodash-es": "4.17.21" + } + }, + "node_modules/@chevrotain/regexp-to-ast": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/regexp-to-ast/-/regexp-to-ast-11.0.3.tgz", + "integrity": "sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA==", + "license": "Apache-2.0" + }, + "node_modules/@chevrotain/types": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.0.3.tgz", + "integrity": "sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ==", + "license": "Apache-2.0" + }, + "node_modules/@chevrotain/utils": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-11.0.3.tgz", + "integrity": "sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ==", + "license": "Apache-2.0" + }, "node_modules/@emotion/is-prop-valid": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz", @@ -629,6 +688,32 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@iconify/types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz", + "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==", + "license": "MIT" + }, + "node_modules/@iconify/utils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-3.1.0.tgz", + "integrity": "sha512-Zlzem1ZXhI1iHeeERabLNzBHdOa4VhQbqAcOQaMKuTuyZCpwKbC2R4Dd0Zo3g9EAc+Y4fiarO8HIHRAth7+skw==", + "license": "MIT", + "dependencies": { + "@antfu/install-pkg": "^1.1.0", + "@iconify/types": "^2.0.0", + "mlly": "^1.8.0" + } + }, + "node_modules/@mermaid-js/parser": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-0.6.3.tgz", + "integrity": "sha512-lnjOhe7zyHjc+If7yT4zoedx2vo4sHaTmtkl1+or8BRTnCtDmcTpAjpzDSfCZrshM5bCoz0GyidzadJAH1xobA==", + "license": "MIT", + "dependencies": { + "langium": "3.3.1" + } + }, "node_modules/@microsoft/fast-element": { "version": "1.14.0", "resolved": "https://registry.npmjs.org/@microsoft/fast-element/-/fast-element-1.14.0.tgz", @@ -1165,6 +1250,259 @@ "@swc/counter": "^0.1.3" } }, + "node_modules/@types/d3": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz", + "integrity": "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==", + "license": "MIT", + "dependencies": { + "@types/d3-array": "*", + "@types/d3-axis": "*", + "@types/d3-brush": "*", + "@types/d3-chord": "*", + "@types/d3-color": "*", + "@types/d3-contour": "*", + "@types/d3-delaunay": "*", + "@types/d3-dispatch": "*", + "@types/d3-drag": "*", + "@types/d3-dsv": "*", + "@types/d3-ease": "*", + "@types/d3-fetch": "*", + "@types/d3-force": "*", + "@types/d3-format": "*", + "@types/d3-geo": "*", + "@types/d3-hierarchy": "*", + "@types/d3-interpolate": "*", + "@types/d3-path": "*", + "@types/d3-polygon": "*", + "@types/d3-quadtree": "*", + "@types/d3-random": "*", + "@types/d3-scale": "*", + "@types/d3-scale-chromatic": "*", + "@types/d3-selection": "*", + "@types/d3-shape": "*", + "@types/d3-time": "*", + "@types/d3-time-format": "*", + "@types/d3-timer": "*", + "@types/d3-transition": "*", + "@types/d3-zoom": "*" + } + }, + "node_modules/@types/d3-array": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz", + "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==", + "license": "MIT" + }, + "node_modules/@types/d3-axis": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.6.tgz", + "integrity": "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==", + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-brush": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-3.0.6.tgz", + "integrity": "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==", + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-chord": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-3.0.6.tgz", + "integrity": "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==", + "license": "MIT" + }, + "node_modules/@types/d3-color": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", + "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==", + "license": "MIT" + }, + "node_modules/@types/d3-contour": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-3.0.6.tgz", + "integrity": "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==", + "license": "MIT", + "dependencies": { + "@types/d3-array": "*", + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-delaunay": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz", + "integrity": "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==", + "license": "MIT" + }, + "node_modules/@types/d3-dispatch": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-3.0.7.tgz", + "integrity": "sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA==", + "license": "MIT" + }, + "node_modules/@types/d3-drag": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-3.0.7.tgz", + "integrity": "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==", + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-dsv": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-3.0.7.tgz", + "integrity": "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==", + "license": "MIT" + }, + "node_modules/@types/d3-ease": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz", + "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==", + "license": "MIT" + }, + "node_modules/@types/d3-fetch": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-3.0.7.tgz", + "integrity": "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==", + "license": "MIT", + "dependencies": { + "@types/d3-dsv": "*" + } + }, + "node_modules/@types/d3-force": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-3.0.10.tgz", + "integrity": "sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==", + "license": "MIT" + }, + "node_modules/@types/d3-format": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.4.tgz", + "integrity": "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==", + "license": "MIT" + }, + "node_modules/@types/d3-geo": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.1.0.tgz", + "integrity": "sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==", + "license": "MIT", + "dependencies": { + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-hierarchy": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-3.1.7.tgz", + "integrity": "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==", + "license": "MIT" + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz", + "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==", + "license": "MIT", + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz", + "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==", + "license": "MIT" + }, + "node_modules/@types/d3-polygon": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-3.0.2.tgz", + "integrity": "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==", + "license": "MIT" + }, + "node_modules/@types/d3-quadtree": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz", + "integrity": "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==", + "license": "MIT" + }, + "node_modules/@types/d3-random": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-3.0.3.tgz", + "integrity": "sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ==", + "license": "MIT" + }, + "node_modules/@types/d3-scale": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz", + "integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==", + "license": "MIT", + "dependencies": { + "@types/d3-time": "*" + } + }, + "node_modules/@types/d3-scale-chromatic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", + "integrity": "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==", + "license": "MIT" + }, + "node_modules/@types/d3-selection": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.11.tgz", + "integrity": "sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==", + "license": "MIT" + }, + "node_modules/@types/d3-shape": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.7.tgz", + "integrity": "sha512-VLvUQ33C+3J+8p+Daf+nYSOsjB4GXp19/S/aGo60m9h1v6XaxjiT82lKVWJCfzhtuZ3yD7i/TPeC/fuKLLOSmg==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/d3-time": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz", + "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==", + "license": "MIT" + }, + "node_modules/@types/d3-time-format": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-4.0.3.tgz", + "integrity": "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==", + "license": "MIT" + }, + "node_modules/@types/d3-timer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz", + "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==", + "license": "MIT" + }, + "node_modules/@types/d3-transition": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-3.0.9.tgz", + "integrity": "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==", + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-zoom": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.8.tgz", + "integrity": "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==", + "license": "MIT", + "dependencies": { + "@types/d3-interpolate": "*", + "@types/d3-selection": "*" + } + }, "node_modules/@types/dompurify": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@types/dompurify/-/dompurify-3.2.0.tgz", @@ -1181,6 +1519,12 @@ "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true }, + "node_modules/@types/geojson": { + "version": "7946.0.16", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", + "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==", + "license": "MIT" + }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -1198,6 +1542,7 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.18.tgz", "integrity": "sha512-t4yC+vtgnkYjNSKlFx1jkAhH8LgTo2N/7Qvi83kdEaUtMDiwpbLAktKDaAMlRcJ5eSxZkH74eEGt1ky31d7kfQ==", "dev": true, + "peer": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" @@ -1267,6 +1612,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.1.tgz", "integrity": "sha512-rBnTWHCdbYM2lh7hjyXqxk70wvon3p2FyaniZuey5TrcGBpfhVp0OxOa6gxr9Q9YhZFKyfbEnxc24ZnVbbUkCA==", "dev": true, + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.18.1", "@typescript-eslint/types": "8.18.1", @@ -1456,10 +1802,11 @@ } }, "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", - "dev": true, + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1575,6 +1922,33 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/chevrotain": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.0.3.tgz", + "integrity": "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@chevrotain/cst-dts-gen": "11.0.3", + "@chevrotain/gast": "11.0.3", + "@chevrotain/regexp-to-ast": "11.0.3", + "@chevrotain/types": "11.0.3", + "@chevrotain/utils": "11.0.3", + "lodash-es": "4.17.21" + } + }, + "node_modules/chevrotain-allstar": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/chevrotain-allstar/-/chevrotain-allstar-0.3.1.tgz", + "integrity": "sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw==", + "license": "MIT", + "dependencies": { + "lodash-es": "^4.17.21" + }, + "peerDependencies": { + "chevrotain": "^11.0.0" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1593,12 +1967,36 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "license": "MIT" + }, + "node_modules/cose-base": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-1.0.3.tgz", + "integrity": "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==", + "license": "MIT", + "dependencies": { + "layout-base": "^1.0.0" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -1638,6 +2036,513 @@ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, + "node_modules/cytoscape": { + "version": "3.33.1", + "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.33.1.tgz", + "integrity": "sha512-iJc4TwyANnOGR1OmWhsS9ayRS3s+XQ185FmuHObThD+5AeJCakAAbWv8KimMTt08xCCLNgneQwFp+JRJOr9qGQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/cytoscape-cose-bilkent": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cytoscape-cose-bilkent/-/cytoscape-cose-bilkent-4.1.0.tgz", + "integrity": "sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==", + "license": "MIT", + "dependencies": { + "cose-base": "^1.0.0" + }, + "peerDependencies": { + "cytoscape": "^3.2.0" + } + }, + "node_modules/cytoscape-fcose": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz", + "integrity": "sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==", + "license": "MIT", + "dependencies": { + "cose-base": "^2.2.0" + }, + "peerDependencies": { + "cytoscape": "^3.2.0" + } + }, + "node_modules/cytoscape-fcose/node_modules/cose-base": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-2.2.0.tgz", + "integrity": "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==", + "license": "MIT", + "dependencies": { + "layout-base": "^2.0.0" + } + }, + "node_modules/cytoscape-fcose/node_modules/layout-base": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-2.0.1.tgz", + "integrity": "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==", + "license": "MIT" + }, + "node_modules/d3": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz", + "integrity": "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==", + "license": "ISC", + "dependencies": { + "d3-array": "3", + "d3-axis": "3", + "d3-brush": "3", + "d3-chord": "3", + "d3-color": "3", + "d3-contour": "4", + "d3-delaunay": "6", + "d3-dispatch": "3", + "d3-drag": "3", + "d3-dsv": "3", + "d3-ease": "3", + "d3-fetch": "3", + "d3-force": "3", + "d3-format": "3", + "d3-geo": "3", + "d3-hierarchy": "3", + "d3-interpolate": "3", + "d3-path": "3", + "d3-polygon": "3", + "d3-quadtree": "3", + "d3-random": "3", + "d3-scale": "4", + "d3-scale-chromatic": "3", + "d3-selection": "3", + "d3-shape": "3", + "d3-time": "3", + "d3-time-format": "4", + "d3-timer": "3", + "d3-transition": "3", + "d3-zoom": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "license": "ISC", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-axis": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz", + "integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-brush": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz", + "integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-drag": "2 - 3", + "d3-interpolate": "1 - 3", + "d3-selection": "3", + "d3-transition": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-chord": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz", + "integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==", + "license": "ISC", + "dependencies": { + "d3-path": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-contour": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz", + "integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==", + "license": "ISC", + "dependencies": { + "d3-array": "^3.2.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-delaunay": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz", + "integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==", + "license": "ISC", + "dependencies": { + "delaunator": "5" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-dispatch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz", + "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-drag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz", + "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-selection": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-dsv": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz", + "integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==", + "license": "ISC", + "dependencies": { + "commander": "7", + "iconv-lite": "0.6", + "rw": "1" + }, + "bin": { + "csv2json": "bin/dsv2json.js", + "csv2tsv": "bin/dsv2dsv.js", + "dsv2dsv": "bin/dsv2dsv.js", + "dsv2json": "bin/dsv2json.js", + "json2csv": "bin/json2dsv.js", + "json2dsv": "bin/json2dsv.js", + "json2tsv": "bin/json2dsv.js", + "tsv2csv": "bin/dsv2dsv.js", + "tsv2json": "bin/dsv2json.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-ease": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", + "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-fetch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz", + "integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==", + "license": "ISC", + "dependencies": { + "d3-dsv": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-force": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz", + "integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-quadtree": "1 - 3", + "d3-timer": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", + "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-geo": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz", + "integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==", + "license": "ISC", + "dependencies": { + "d3-array": "2.5.0 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-hierarchy": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz", + "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-polygon": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz", + "integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-quadtree": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz", + "integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-random": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz", + "integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-sankey": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/d3-sankey/-/d3-sankey-0.12.3.tgz", + "integrity": "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==", + "license": "BSD-3-Clause", + "dependencies": { + "d3-array": "1 - 2", + "d3-shape": "^1.2.0" + } + }, + "node_modules/d3-sankey/node_modules/d3-array": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz", + "integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==", + "license": "BSD-3-Clause", + "dependencies": { + "internmap": "^1.0.0" + } + }, + "node_modules/d3-sankey/node_modules/d3-path": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", + "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==", + "license": "BSD-3-Clause" + }, + "node_modules/d3-sankey/node_modules/d3-shape": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz", + "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==", + "license": "BSD-3-Clause", + "dependencies": { + "d3-path": "1" + } + }, + "node_modules/d3-sankey/node_modules/internmap": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz", + "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==", + "license": "ISC" + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "license": "ISC", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale-chromatic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", + "integrity": "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3", + "d3-interpolate": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-selection": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", + "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", + "license": "ISC", + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "license": "ISC", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", + "license": "ISC", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", + "license": "ISC", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-timer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", + "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-transition": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz", + "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3", + "d3-dispatch": "1 - 3", + "d3-ease": "1 - 3", + "d3-interpolate": "1 - 3", + "d3-timer": "1 - 3" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "d3-selection": "2 - 3" + } + }, + "node_modules/d3-zoom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz", + "integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-drag": "2 - 3", + "d3-interpolate": "1 - 3", + "d3-selection": "2 - 3", + "d3-transition": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/dagre-d3-es": { + "version": "7.0.13", + "resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.13.tgz", + "integrity": "sha512-efEhnxpSuwpYOKRm/L5KbqoZmNNukHa/Flty4Wp62JRvgH2ojwVgPgdYyr4twpieZnyRDdIH7PY2mopX26+j2Q==", + "license": "MIT", + "dependencies": { + "d3": "^7.9.0", + "lodash-es": "^4.17.21" + } + }, + "node_modules/dayjs": { + "version": "1.11.19", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz", + "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==", + "license": "MIT" + }, "node_modules/debug": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", @@ -1661,10 +2566,20 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/delaunator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.0.1.tgz", + "integrity": "sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==", + "license": "ISC", + "dependencies": { + "robust-predicates": "^3.0.2" + } + }, "node_modules/dompurify": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.4.tgz", - "integrity": "sha512-ysFSFEDVduQpyhzAob/kkuJjf5zWkZD8/A9ywSp1byueyuCfHamrCBa14/Oc2iiB0e51B+NpxSl5gmzn+Ms/mg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.3.1.tgz", + "integrity": "sha512-qkdCKzLNtrgPFP1Vo+98FRzJnBRGe4ffyCea9IwHB1fyxPOeNTHpLKYGd4Uk9xvNoH0ZoOjwZxNptyMwqrId1Q==", + "license": "(MPL-2.0 OR Apache-2.0)", "optionalDependencies": { "@types/trusted-types": "^2.0.7" } @@ -1725,6 +2640,7 @@ "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz", "integrity": "sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==", "dev": true, + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", @@ -2050,6 +2966,12 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, + "node_modules/hachure-fill": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/hachure-fill/-/hachure-fill-0.5.2.tgz", + "integrity": "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==", + "license": "MIT" + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -2067,6 +2989,18 @@ "node": ">=12.0.0" } }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -2101,6 +3035,15 @@ "node": ">=0.8.19" } }, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2172,6 +3115,31 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "node_modules/katex": { + "version": "0.16.27", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.27.tgz", + "integrity": "sha512-aeQoDkuRWSqQN6nSvVCEFvfXdqo1OQiCmmW1kc9xSdjutPv7BGO7pqY9sQRJpMOGrEdfDgF2TfRXe5eUAD2Waw==", + "funding": [ + "https://opencollective.com/katex", + "https://github.com/sponsors/katex" + ], + "license": "MIT", + "dependencies": { + "commander": "^8.3.0" + }, + "bin": { + "katex": "cli.js" + } + }, + "node_modules/katex/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -2181,6 +3149,33 @@ "json-buffer": "3.0.1" } }, + "node_modules/khroma": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/khroma/-/khroma-2.1.0.tgz", + "integrity": "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw==" + }, + "node_modules/langium": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/langium/-/langium-3.3.1.tgz", + "integrity": "sha512-QJv/h939gDpvT+9SiLVlY7tZC3xB2qK57v0J04Sh9wpMb6MP1q8gB21L3WIo8T5P1MSMg3Ep14L7KkDCFG3y4w==", + "license": "MIT", + "dependencies": { + "chevrotain": "~11.0.3", + "chevrotain-allstar": "~0.3.0", + "vscode-languageserver": "~9.0.1", + "vscode-languageserver-textdocument": "~1.0.11", + "vscode-uri": "~3.0.8" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/layout-base": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-1.0.2.tgz", + "integrity": "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==", + "license": "MIT" + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -2209,6 +3204,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", + "license": "MIT" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -2226,6 +3227,18 @@ "loose-envify": "cli.js" } }, + "node_modules/marked": { + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz", + "integrity": "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==", + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 20" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -2235,6 +3248,40 @@ "node": ">= 8" } }, + "node_modules/mermaid": { + "version": "11.12.2", + "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.12.2.tgz", + "integrity": "sha512-n34QPDPEKmaeCG4WDMGy0OT6PSyxKCfy2pJgShP+Qow2KLrvWjclwbc3yXfSIf4BanqWEhQEpngWwNp/XhZt6w==", + "license": "MIT", + "dependencies": { + "@braintree/sanitize-url": "^7.1.1", + "@iconify/utils": "^3.0.1", + "@mermaid-js/parser": "^0.6.3", + "@types/d3": "^7.4.3", + "cytoscape": "^3.29.3", + "cytoscape-cose-bilkent": "^4.1.0", + "cytoscape-fcose": "^2.2.0", + "d3": "^7.9.0", + "d3-sankey": "^0.12.3", + "dagre-d3-es": "7.0.13", + "dayjs": "^1.11.18", + "dompurify": "^3.2.5", + "katex": "^0.16.22", + "khroma": "^2.1.0", + "lodash-es": "^4.17.21", + "marked": "^16.2.1", + "roughjs": "^4.6.6", + "stylis": "^4.3.6", + "ts-dedent": "^2.2.0", + "uuid": "^11.1.0" + } + }, + "node_modules/mermaid/node_modules/stylis": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.6.tgz", + "integrity": "sha512-yQ3rwFWRfwNUY7H5vpU0wfdkNSnvnJinhF9830Swlaxl03zsOjCfmX0ugac+3LtK0lYSgwL/KXc8oYL3mG4YFQ==", + "license": "MIT" + }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -2260,6 +3307,18 @@ "node": "*" } }, + "node_modules/mlly": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.0.tgz", + "integrity": "sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==", + "license": "MIT", + "dependencies": { + "acorn": "^8.15.0", + "pathe": "^2.0.3", + "pkg-types": "^1.3.1", + "ufo": "^1.6.1" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -2336,6 +3395,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/package-manager-detector": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.6.0.tgz", + "integrity": "sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==", + "license": "MIT" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -2348,6 +3413,12 @@ "node": ">=6" } }, + "node_modules/path-data-parser": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz", + "integrity": "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==", + "license": "MIT" + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -2366,6 +3437,12 @@ "node": ">=8" } }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -2383,6 +3460,33 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pkg-types": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", + "license": "MIT", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" + } + }, + "node_modules/points-on-curve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz", + "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==", + "license": "MIT" + }, + "node_modules/points-on-path": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.1.tgz", + "integrity": "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==", + "license": "MIT", + "dependencies": { + "path-data-parser": "0.1.0", + "points-on-curve": "0.2.0" + } + }, "node_modules/postcss": { "version": "8.4.49", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", @@ -2458,6 +3562,7 @@ "version": "18.3.1", "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -2469,6 +3574,7 @@ "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -2496,6 +3602,12 @@ "node": ">=0.10.0" } }, + "node_modules/robust-predicates": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", + "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==", + "license": "Unlicense" + }, "node_modules/rollup": { "version": "4.28.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.28.1.tgz", @@ -2534,6 +3646,18 @@ "fsevents": "~2.3.2" } }, + "node_modules/roughjs": { + "version": "4.6.6", + "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.6.6.tgz", + "integrity": "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==", + "license": "MIT", + "dependencies": { + "hachure-fill": "^0.5.2", + "path-data-parser": "^0.1.0", + "points-on-curve": "^0.2.0", + "points-on-path": "^0.2.1" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -2557,6 +3681,18 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/rw": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", + "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==", + "license": "BSD-3-Clause" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, "node_modules/scheduler": { "version": "0.23.2", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", @@ -2681,6 +3817,15 @@ "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-5.3.3.tgz", "integrity": "sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA==" }, + "node_modules/tinyexec": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz", + "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -2705,6 +3850,15 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-dedent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", + "integrity": "sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==", + "license": "MIT", + "engines": { + "node": ">=6.10" + } + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -2727,6 +3881,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -2757,6 +3912,12 @@ "typescript": ">=4.8.4 <5.8.0" } }, + "node_modules/ufo": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz", + "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==", + "license": "MIT" + }, "node_modules/uninstall": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/uninstall/-/uninstall-0.0.0.tgz", @@ -2771,11 +3932,25 @@ "punycode": "^2.1.0" } }, + "node_modules/uuid": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", + "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/esm/bin/uuid" + } + }, "node_modules/vite": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.4.tgz", "integrity": "sha512-zwlH6ar+6o6b4Wp+ydhtIKLrGM/LoqZzcdVmkGAFun0KHTzIzjh+h0kungEx7KJg/PYnC80I4TII9WkjciSR6Q==", "dev": true, + "peer": true, "dependencies": { "esbuild": "^0.24.0", "postcss": "^8.4.49", @@ -2842,6 +4017,55 @@ } } }, + "node_modules/vscode-jsonrpc": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/vscode-languageserver": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "license": "MIT", + "dependencies": { + "vscode-languageserver-protocol": "3.17.5" + }, + "bin": { + "installServerIntoExtension": "bin/installServerIntoExtension" + } + }, + "node_modules/vscode-languageserver-protocol": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", + "license": "MIT", + "dependencies": { + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" + } + }, + "node_modules/vscode-languageserver-textdocument": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", + "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", + "license": "MIT" + }, + "node_modules/vscode-languageserver-types": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", + "license": "MIT" + }, + "node_modules/vscode-uri": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", + "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", + "license": "MIT" + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/webviewUi/package.json b/webviewUi/package.json index 6c23e3a..5ae8d84 100644 --- a/webviewUi/package.json +++ b/webviewUi/package.json @@ -13,6 +13,7 @@ "@vscode/webview-ui-toolkit": "^1.4.0", "dompurify": "^3.2.4", "highlight.js": "^11.11.0", + "mermaid": "^11.12.2", "react": "^18.3.1", "react-dom": "^18.3.1", "styled-components": "^6.1.19", diff --git a/webviewUi/src/assets/codebuddylogo.png b/webviewUi/src/assets/codebuddylogo.png new file mode 100644 index 0000000..f6b800a Binary files /dev/null and b/webviewUi/src/assets/codebuddylogo.png differ diff --git a/webviewUi/src/components/MermaidDiagram.tsx b/webviewUi/src/components/MermaidDiagram.tsx new file mode 100644 index 0000000..88d8628 --- /dev/null +++ b/webviewUi/src/components/MermaidDiagram.tsx @@ -0,0 +1,490 @@ +import React, { useEffect, useRef, useState } from "react"; +import mermaid from "mermaid"; +import styled, { keyframes } from "styled-components"; + +// Initialize mermaid with dark theme settings +mermaid.initialize({ + startOnLoad: false, + theme: "dark", + securityLevel: "loose", + themeVariables: { + primaryColor: "#7c3aed", + primaryTextColor: "#e2e8f0", + primaryBorderColor: "#8b5cf6", + lineColor: "#a78bfa", + secondaryColor: "#1e1b4b", + tertiaryColor: "#312e81", + background: "#1a1a2e", + mainBkg: "#1e1b4b", + nodeBorder: "#8b5cf6", + clusterBkg: "#1e1b4b", + clusterBorder: "#7c3aed", + titleColor: "#e2e8f0", + edgeLabelBackground: "#312e81", + actorBorder: "#8b5cf6", + actorBkg: "#1e1b4b", + actorTextColor: "#e2e8f0", + actorLineColor: "#a78bfa", + signalColor: "#e2e8f0", + signalTextColor: "#e2e8f0", + labelBoxBkgColor: "#1e1b4b", + labelBoxBorderColor: "#7c3aed", + labelTextColor: "#e2e8f0", + loopTextColor: "#e2e8f0", + noteBorderColor: "#7c3aed", + noteBkgColor: "#312e81", + noteTextColor: "#e2e8f0", + activationBorderColor: "#8b5cf6", + activationBkgColor: "#1e1b4b", + sequenceNumberColor: "#e2e8f0", + }, + flowchart: { + htmlLabels: true, + curve: "basis", + }, + sequence: { + diagramMarginX: 50, + diagramMarginY: 10, + actorMargin: 50, + width: 150, + height: 65, + boxMargin: 10, + boxTextMargin: 5, + noteMargin: 10, + messageMargin: 35, + mirrorActors: true, + useMaxWidth: true, + }, +}); + +interface MermaidDiagramProps { + chart: string; +} + +const pulse = keyframes` + 0%, 100% { opacity: 0.5; } + 50% { opacity: 1; } +`; + +const DiagramContainer = styled.div` + margin: 16px 0; + padding: 20px; + background: linear-gradient(135deg, rgba(30, 27, 75, 0.8) 0%, rgba(49, 46, 129, 0.6) 100%); + border-radius: 12px; + border: 1px solid rgba(139, 92, 246, 0.3); + overflow-x: auto; + + &:hover { + border-color: rgba(139, 92, 246, 0.5); + box-shadow: 0 0 20px rgba(124, 58, 237, 0.2); + } + + /* Style the SVG generated by mermaid */ + svg { + max-width: 100%; + height: auto; + } + + .error { + color: #f87171; + padding: 16px; + background: rgba(248, 113, 113, 0.1); + border-radius: 8px; + border: 1px solid rgba(248, 113, 113, 0.3); + } +`; + +const DiagramHeader = styled.div` + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 16px; + padding-bottom: 12px; + border-bottom: 1px solid rgba(139, 92, 246, 0.2); +`; + +const DiagramLabel = styled.span` + display: flex; + align-items: center; + gap: 8px; + font-size: 12px; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 1px; + color: #a78bfa; +`; + +const DiagramIcon = styled.span` + font-size: 16px; +`; + +const CopyButton = styled.button<{ $copied: boolean }>` + padding: 6px 12px; + background: ${props => props.$copied + ? 'linear-gradient(135deg, #10b981 0%, #059669 100%)' + : 'rgba(139, 92, 246, 0.2)' + }; + color: ${props => props.$copied ? '#fff' : '#a78bfa'}; + border: 1px solid ${props => props.$copied + ? 'rgba(16, 185, 129, 0.5)' + : 'rgba(139, 92, 246, 0.3)' + }; + border-radius: 6px; + cursor: pointer; + font-size: 11px; + font-weight: 500; + transition: all 0.2s ease; + + &:hover { + background: ${props => props.$copied + ? 'linear-gradient(135deg, #10b981 0%, #059669 100%)' + : 'rgba(139, 92, 246, 0.3)' + }; + } +`; + +const LoadingState = styled.div` + display: flex; + align-items: center; + justify-content: center; + padding: 40px; + color: #a78bfa; + font-size: 14px; + animation: ${pulse} 1.5s ease-in-out infinite; +`; + +const ErrorState = styled.div` + padding: 16px; + background: rgba(248, 113, 113, 0.1); + border-radius: 8px; + border: 1px solid rgba(248, 113, 113, 0.3); + color: #f87171; + font-size: 13px; +`; + +const ErrorMessage = styled.div` + display: flex; + align-items: center; + gap: 8px; + margin-bottom: 12px; + font-weight: 600; +`; + +const ErrorDetails = styled.pre` + margin: 8px 0; + padding: 12px; + background: rgba(0, 0, 0, 0.3); + border-radius: 6px; + overflow-x: auto; + font-size: 12px; + color: #fca5a5; + white-space: pre-wrap; + word-break: break-word; +`; + +const CodeToggle = styled.button` + display: flex; + align-items: center; + gap: 6px; + margin-top: 12px; + padding: 8px 12px; + background: rgba(139, 92, 246, 0.15); + border: 1px solid rgba(139, 92, 246, 0.3); + border-radius: 6px; + color: #a78bfa; + font-size: 12px; + cursor: pointer; + transition: all 0.2s ease; + + &:hover { + background: rgba(139, 92, 246, 0.25); + border-color: rgba(139, 92, 246, 0.5); + } +`; + +const RawCode = styled.pre` + margin-top: 12px; + padding: 16px; + background: rgba(20, 20, 35, 0.8); + border-radius: 8px; + border: 1px solid rgba(139, 92, 246, 0.2); + overflow-x: auto; + font-size: 12px; + line-height: 1.6; + color: #e2e8f0; + font-family: 'Fira Code', 'Consolas', monospace; + + .keyword { + color: #c792ea; + } + .arrow { + color: #89ddff; + } + .node { + color: #82aaff; + } + .text { + color: #c3e88d; + } +`; + +export const MermaidDiagram: React.FC = ({ chart }) => { + const containerRef = useRef(null); + const [svg, setSvg] = useState(""); + const [error, setError] = useState(""); + const [isLoading, setIsLoading] = useState(true); + const [copied, setCopied] = useState(false); + const [showRawCode, setShowRawCode] = useState(false); + + // Minimal sanitization - the code should now come through cleanly via base64 + const sanitizeMermaidCode = (code: string): string => { + let sanitized = code; + + // Only decode any remaining HTML entities (shouldn't be many now) + sanitized = sanitized.replace(/&/g, '&'); + sanitized = sanitized.replace(/</g, '<'); + sanitized = sanitized.replace(/>/g, '>'); + sanitized = sanitized.replace(/"/g, '"'); + sanitized = sanitized.replace(/'/g, "'"); + + // Normalize line endings + sanitized = sanitized.replace(/\r\n/g, '\n'); + sanitized = sanitized.replace(/\r/g, '\n'); + + return sanitized.trim(); + }; + + // Auto-fix common LLM mermaid syntax errors + const autoFixMermaidCode = (code: string): string[] => { + const fixes: string[] = []; + + // Fix 1: Replace & with 'and' in labels (very common LLM error) + if (code.includes('&')) { + const fixed = code.replace(/(\w)\s*&\s*(\w)/g, '$1 and $2'); + if (fixed !== code) fixes.push(fixed); + } + + // Fix 2: Remove problematic characters from labels + const fixedChars = code + .replace(/[""'']/g, '"') // Smart quotes to regular + .replace(/–/g, '-') // En-dash to hyphen + .replace(/—/g, '-') // Em-dash to hyphen + .replace(/…/g, '...'); // Ellipsis + if (fixedChars !== code) fixes.push(fixedChars); + + // Fix 3: Fix unbalanced brackets in node definitions + const lines = code.split('\n'); + const fixedLines = lines.map(line => { + // Count brackets + const openSquare = (line.match(/\[/g) || []).length; + const closeSquare = (line.match(/\]/g) || []).length; + const openParen = (line.match(/\(/g) || []).length; + const closeParen = (line.match(/\)/g) || []).length; + const openCurly = (line.match(/\{/g) || []).length; + const closeCurly = (line.match(/\}/g) || []).length; + + let fixedLine = line; + // Add missing closing brackets + if (openSquare > closeSquare) fixedLine += ']'.repeat(openSquare - closeSquare); + if (openParen > closeParen) fixedLine += ')'.repeat(openParen - closeParen); + if (openCurly > closeCurly) fixedLine += '}'.repeat(openCurly - closeCurly); + + return fixedLine; + }); + const bracketFixed = fixedLines.join('\n'); + if (bracketFixed !== code) fixes.push(bracketFixed); + + // Fix 4: Fix sequence diagram specific issues + if (code.includes('sequenceDiagram')) { + // Fix missing colons after participant/actor + let seqFixed = code.replace(/^(\s*(?:participant|actor)\s+\w+)\s*$/gm, '$1'); + // Fix Note syntax + seqFixed = seqFixed.replace(/Note\s+over\s+/gi, 'Note over '); + seqFixed = seqFixed.replace(/Note\s+left\s+of\s+/gi, 'Note left of '); + seqFixed = seqFixed.replace(/Note\s+right\s+of\s+/gi, 'Note right of '); + if (seqFixed !== code) fixes.push(seqFixed); + } + + // Fix 5: Fix flowchart specific issues + if (code.includes('flowchart') || code.includes('graph')) { + // Fix arrow syntax issues + let flowFixed = code + .replace(/-->\|([^|]+)\|>/g, '-->|$1|') // Remove extra > after label + .replace(/-+>/g, '-->') // Normalize arrows + .replace(/=+>/g, '==>'); // Normalize thick arrows + if (flowFixed !== code) fixes.push(flowFixed); + } + + // Fix 6: Fix classDiagram issues + if (code.includes('classDiagram')) { + let classFixed = code + .replace(/:\s*\+/g, ': +') // Ensure space before visibility + .replace(/:\s*-/g, ': -') + .replace(/:\s*#/g, ': #'); + if (classFixed !== code) fixes.push(classFixed); + } + + // Fix 7: Remove any HTML tags that might have leaked in + const noHtml = code.replace(/<[^>]+>/g, ''); + if (noHtml !== code) fixes.push(noHtml); + + // Fix 8: Combine multiple fixes + let combinedFix = code + .replace(/(\w)\s*&\s*(\w)/g, '$1 and $2') + .replace(/[""'']/g, '"') + .replace(/–/g, '-') + .replace(/—/g, '-') + .replace(/<[^>]+>/g, ''); + + // Also fix brackets in combined + const combinedLines = combinedFix.split('\n').map(line => { + const openSquare = (line.match(/\[/g) || []).length; + const closeSquare = (line.match(/\]/g) || []).length; + if (openSquare > closeSquare) return line + ']'.repeat(openSquare - closeSquare); + return line; + }); + combinedFix = combinedLines.join('\n'); + + if (combinedFix !== code) fixes.push(combinedFix); + + // Remove duplicates and the original code + return [...new Set(fixes)].filter(f => f !== code); + }; + + useEffect(() => { + const renderDiagram = async () => { + if (!chart || !containerRef.current) return; + + setIsLoading(true); + setError(""); + setSvg(""); + + const cleanChart = sanitizeMermaidCode(chart); + + // Try to render with auto-fix attempts + const tryRender = async (code: string): Promise<{ success: boolean; svg?: string; error?: string }> => { + try { + const id = `mermaid-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`; + const { svg: renderedSvg } = await mermaid.render(id, code); + return { success: true, svg: renderedSvg }; + } catch (err) { + return { success: false, error: err instanceof Error ? err.message : String(err) }; + } + }; + + // First attempt with original code + let result = await tryRender(cleanChart); + + if (!result.success) { + console.log('Mermaid: Initial render failed, attempting auto-fix...'); + + // Get potential fixes + const fixes = autoFixMermaidCode(cleanChart); + + // Try each fix + for (const fix of fixes) { + console.log('Mermaid: Trying auto-fix variant...'); + result = await tryRender(fix); + if (result.success) { + console.log('Mermaid: Auto-fix successful!'); + break; + } + } + } + + if (result.success && result.svg) { + setSvg(result.svg); + } else { + console.error("Mermaid rendering error (all fixes failed):", result.error); + setError(result.error || "Failed to render diagram"); + } + + setIsLoading(false); + }; + + renderDiagram(); + }, [chart]); + + const handleCopy = async () => { + try { + await navigator.clipboard.writeText(chart); + setCopied(true); + setTimeout(() => setCopied(false), 2000); + } catch (err) { + console.error("Failed to copy:", err); + } + }; + + // Simple syntax highlighting for Mermaid code + const highlightMermaidCode = (code: string): string => { + return code + // Highlight diagram type keywords + .replace(/^(flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt|pie|journey|gitGraph|mindmap|timeline|sankey|block|architecture)/gm, + '$1') + // Highlight direction keywords + .replace(/\b(TD|TB|BT|RL|LR|participant|actor|Note|loop|alt|else|end|opt|par|critical|break)\b/g, + '$1') + // Highlight arrows + .replace(/(-->|--o|--x|-.->|-.-|==>|==|---|\|>|<\||--\||>|<)/g, + '$1') + // Highlight node IDs (before brackets) + .replace(/\b([A-Z][a-zA-Z0-9_]*)\s*[\[\{\(]/g, + '$1['); + }; + + return ( + + + + 📊 + Mermaid Diagram + + + {copied ? "Copied!" : "Copy Code"} + + + + {isLoading && Rendering diagram...} + + {error && ( + + + ⚠️ + Diagram Syntax Error + +

+ The LLM generated invalid Mermaid syntax. The diagram could not be rendered. +

+ {error} + + setShowRawCode(!showRawCode)}> + {showRawCode ? '▼' : '▶'} + {showRawCode ? 'Hide' : 'Show'} Raw Diagram Code + + + {showRawCode && ( + + )} +
+ )} + + {svg && !error && ( + <> +
+ + {/* Collapsible raw code section for reference */} + setShowRawCode(!showRawCode)} style={{ marginTop: '16px' }}> + {showRawCode ? '▼' : '▶'} + {showRawCode ? 'Hide' : 'Show'} Source Code + + + {showRawCode && ( + + )} + + )} + + ); +}; + +export default MermaidDiagram; diff --git a/webviewUi/src/components/accordion.tsx b/webviewUi/src/components/accordion.tsx index 60dd81e..e29a3ce 100644 --- a/webviewUi/src/components/accordion.tsx +++ b/webviewUi/src/components/accordion.tsx @@ -1,9 +1,10 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import React, { useState } from "react"; +import styled from "styled-components"; export interface FAQItem { question: string; - answer: string; + answer: string | React.ReactNode; } interface FAQAccordionProps { @@ -16,6 +17,126 @@ interface FAQAccordionProps { itemClassName?: string; } +const AccordionContainer = styled.div` + width: 100%; + max-width: 100%; + margin: 0 auto; +`; + +const AccordionItem = styled.div` + border-bottom: 1px solid rgba(255, 255, 255, 0.06); + transition: all 0.2s ease; + + &:hover { + background: rgba(255, 255, 255, 0.02); + } +`; + +const AccordionButton = styled.button` + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + padding: 16px 0; + text-align: left; + font-weight: 500; + background-color: transparent; + border: none; + cursor: pointer; + font-size: 13px; + color: rgba(255, 255, 255, 0.8); + transition: color 0.2s ease; + + &:hover { + color: rgba(255, 255, 255, 0.95); + } +`; + +const IconWrapper = styled.span` + margin-left: 10px; + display: flex; + align-items: center; + justify-content: center; + color: rgba(255, 255, 255, 0.4); + transition: color 0.2s ease; + + ${AccordionButton}:hover & { + color: rgba(255, 255, 255, 0.6); + } + + svg { + width: 18px; + height: 18px; + } +`; + +const AnswerWrapper = styled.div<{ $isOpen: boolean }>` + overflow: hidden; + transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease; + max-height: ${props => props.$isOpen ? '5000px' : '0'}; + opacity: ${props => props.$isOpen ? '1' : '0'}; + padding: ${props => props.$isOpen ? '0 0 16px 0' : '0'}; +`; + +const AnswerContent = styled.div` + font-size: 12px; + line-height: 1.7; + color: rgba(255, 255, 255, 0.6); + text-align: left; + + p { + margin: 0 0 12px 0; + text-align: left; + } + + p:last-child { + margin-bottom: 0; + } + + h3 { + font-size: 13px; + font-weight: 500; + color: rgba(255, 255, 255, 0.7); + margin: 16px 0 10px 0; + } + + ul, ol { + margin: 8px 0; + padding-left: 20px; + } + + li { + margin: 6px 0; + color: rgba(255, 255, 255, 0.55); + } + + strong { + color: rgba(255, 255, 255, 0.75); + font-weight: 500; + } + + a { + color: rgba(255, 255, 255, 0.7); + text-decoration: none; + border-bottom: 1px solid rgba(255, 255, 255, 0.2); + transition: all 0.2s ease; + + &:hover { + color: rgba(255, 255, 255, 0.9); + border-bottom-color: rgba(255, 255, 255, 0.5); + } + } + + code { + background: rgba(255, 255, 255, 0.04); + padding: 2px 6px; + border-radius: 3px; + font-size: 11px; + border: 1px solid rgba(255, 255, 255, 0.08); + font-family: 'Consolas', 'Monaco', monospace; + } +`; + export const FAQAccordion: React.FC = ({ items, questionClassName = "", @@ -29,81 +150,19 @@ export const FAQAccordion: React.FC = ({ setOpenIndex(openIndex === index ? null : index); }; - // Custom CSS styles - const styles = { - container: { - fontFamily: "Arial, sans-serif", - maxWidth: "100%", - margin: "0 auto", - }, - title: { - fontSize: "20px", - fontWeight: "bold", - marginBottom: "20px", - color: "#c8a750", - textAlign: "left" as const, - borderBottom: "", - paddingBottom: "10px", - }, - item: { - borderBottom: "", - }, - question: { - display: "flex", - justifyContent: "space-between", - alignItems: "center", - width: "100%", - padding: "16px 0", - textAlign: "left" as const, - fontWeight: "bold", - backgroundColor: "transparent", - border: "none", - cursor: "pointer", - fontSize: "16px", - }, - icon: { - marginLeft: "10px", - }, - answer: { - overflow: "hidden", - transition: "max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease", - maxHeight: "0", - opacity: "0", - padding: "0", - fontSize: "15px", - }, - answerOpen: { - maxHeight: "5000px", - opacity: "1", - padding: "16px 0", - }, - paragraph: { - margin: "0", - lineHeight: "1.5", - }, - }; - return ( -
+
{items.map((item, index) => ( -
- -
+ + -

{item.answer}

-
-
+ + {React.isValidElement(item.answer) ? ( + item.answer + ) : ( +
+ )} + + + ))}
-
+
); -}; +}; \ No newline at end of file diff --git a/webviewUi/src/components/botMessage.tsx b/webviewUi/src/components/botMessage.tsx index 5386ee4..01aa66c 100644 --- a/webviewUi/src/components/botMessage.tsx +++ b/webviewUi/src/components/botMessage.tsx @@ -7,15 +7,20 @@ import { IParseURL, parseUrl } from "../utils/parseUrl"; import UrlCardList from "./urlCardList"; import { ThinkingComponent } from "./thinkingComponent"; -interface CodeBlockProps { - language?: string; +interface BotMessageProps { content: string; + language?: string; + isStreaming?: boolean; } -export const BotMessage: React.FC = ({ language, content }) => { +export const BotMessage: React.FC = ({ + content, + isStreaming = false +}) => { const sanitizedContent = DOMPurify.sanitize(content); - const action = "Researching..."; + // const action = "Researching..."; let parsedUrls: IParseURL[] = []; + if (sanitizedContent.includes("favicon")) { parsedUrls = parseUrl(sanitizedContent); } @@ -107,31 +112,64 @@ export const BotMessage: React.FC = ({ language, content }) => { } }; + // Show streaming indicator + if (isStreaming && !content) { + return ( +
+ + Generating response... + +
+ ); + } + + // Show thinking state + // if (content.includes("thinking")) { + // return ( + //
+ // + // {action} + // + //
+ // ); + // } + + // Show normal message with streaming cursor if applicable return ( - <> - {content.includes("thinking") ? ( +
+
+ {/* {language} */} +
+ {isStreaming && ( + + Streaming... + + )} + +
+
+ {parsedUrls.length > 0 ? (
- - {action} - +
) : ( -
-
- {language} -
- -
-
- {parsedUrls.length > 0 ? ( -
- -
- ) : ( - +
+ + {isStreaming && ( + )}
)} - +
); -}; +}; \ No newline at end of file diff --git a/webviewUi/src/components/extensions.tsx b/webviewUi/src/components/extensions.tsx new file mode 100644 index 0000000..13dedd4 --- /dev/null +++ b/webviewUi/src/components/extensions.tsx @@ -0,0 +1,584 @@ +import React, { useState } from "react"; +import styled from "styled-components"; + +interface MCPServer { + id: string; + name: string; + description: string; + status: "active" | "inactive" | "error"; + type: "filesystem" | "database" | "api" | "custom"; + icon?: string; + config?: Record; +} + +interface CustomAgent { + id: string; + name: string; + description: string; + model: string; + status: "active" | "inactive"; + avatar?: string; + capabilities?: string[]; +} + +interface ExtensionsProps { + onAddMCPServer?: (server: MCPServer) => void; + onAddAgent?: (agent: CustomAgent) => void; +} + +const Container = styled.div` + width: 100%; + padding: 20px; + max-height: calc(100vh - 100px); + overflow-y: auto; +`; + +const Header = styled.div` + margin-bottom: 32px; +`; + +const Title = styled.h2` + font-size: 16px; + font-weight: 600; + color: rgba(255, 255, 255, 0.9); + margin: 0 0 8px 0; + text-align: left; +`; + +const Subtitle = styled.p` + font-size: 12px; + color: rgba(255, 255, 255, 0.5); + margin: 0; + text-align: left; + line-height: 1.5; +`; + +const TabContainer = styled.div` + display: flex; + gap: 8px; + margin-bottom: 24px; + border-bottom: 1px solid rgba(255, 255, 255, 0.06); +`; + +const Tab = styled.button<{ $active: boolean }>` + background: ${props => props.$active ? 'rgba(255, 255, 255, 0.08)' : 'transparent'}; + border: none; + border-bottom: 2px solid ${props => props.$active ? 'rgba(255, 255, 255, 0.6)' : 'transparent'}; + padding: 12px 20px; + font-size: 13px; + font-weight: 500; + color: ${props => props.$active ? 'rgba(255, 255, 255, 0.95)' : 'rgba(255, 255, 255, 0.5)'}; + cursor: pointer; + transition: all 0.2s ease; + margin-bottom: -1px; + + &:hover { + color: rgba(255, 255, 255, 0.8); + background: rgba(255, 255, 255, 0.04); + } +`; + +const Section = styled.div` + margin-bottom: 32px; +`; + +const SectionHeader = styled.div` + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 16px; +`; + +const SectionTitle = styled.h3` + font-size: 11px; + font-weight: 600; + color: rgba(255, 255, 255, 0.5); + margin: 0; + text-transform: uppercase; + letter-spacing: 1px; + text-align: left; +`; + +const AddButton = styled.button` + background: rgba(255, 255, 255, 0.06); + border: 1px solid rgba(255, 255, 255, 0.12); + border-radius: 6px; + padding: 8px 16px; + font-size: 12px; + font-weight: 500; + color: rgba(255, 255, 255, 0.9); + cursor: pointer; + transition: all 0.2s ease; + display: flex; + align-items: center; + gap: 6px; + + &:hover { + background: rgba(255, 255, 255, 0.1); + border-color: rgba(255, 255, 255, 0.2); + } + + &:active { + transform: scale(0.98); + } +`; + +const CardGrid = styled.div` + display: grid; + gap: 12px; +`; + +const Card = styled.div` + background: rgba(255, 255, 255, 0.02); + border: 1px solid rgba(255, 255, 255, 0.08); + border-radius: 8px; + padding: 16px; + transition: all 0.2s ease; + + &:hover { + background: rgba(255, 255, 255, 0.04); + border-color: rgba(255, 255, 255, 0.12); + } +`; + +const CardHeader = styled.div` + display: flex; + justify-content: space-between; + align-items: start; + margin-bottom: 12px; +`; + +const CardInfo = styled.div` + flex: 1; + display: flex; + align-items: start; + gap: 12px; +`; + +const CardIcon = styled.div` + width: 40px; + height: 40px; + border-radius: 8px; + background: rgba(255, 255, 255, 0.06); + display: flex; + align-items: center; + justify-content: center; + font-size: 20px; + flex-shrink: 0; +`; + +const CardContent = styled.div` + flex: 1; + text-align: left; +`; + +const CardTitle = styled.h4` + font-size: 14px; + font-weight: 500; + color: rgba(255, 255, 255, 0.9); + margin: 0 0 4px 0; +`; + +const CardDescription = styled.p` + font-size: 12px; + color: rgba(255, 255, 255, 0.5); + margin: 0; + line-height: 1.4; +`; + +const StatusBadge = styled.span<{ $status: string }>` + padding: 4px 10px; + border-radius: 12px; + font-size: 10px; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.5px; + background: ${props => { + switch (props.$status) { + case 'active': return 'rgba(34, 197, 94, 0.15)'; + case 'error': return 'rgba(239, 68, 68, 0.15)'; + default: return 'rgba(255, 255, 255, 0.1)'; + } + }}; + color: ${props => { + switch (props.$status) { + case 'active': return 'rgba(34, 197, 94, 0.9)'; + case 'error': return 'rgba(239, 68, 68, 0.9)'; + default: return 'rgba(255, 255, 255, 0.6)'; + } + }}; + border: 1px solid ${props => { + switch (props.$status) { + case 'active': return 'rgba(34, 197, 94, 0.3)'; + case 'error': return 'rgba(239, 68, 68, 0.3)'; + default: return 'rgba(255, 255, 255, 0.15)'; + } + }}; +`; + +const CardFooter = styled.div` + display: flex; + gap: 8px; + margin-top: 12px; + padding-top: 12px; + border-top: 1px solid rgba(255, 255, 255, 0.06); +`; + +const IconButton = styled.button` + background: transparent; + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 4px; + padding: 6px 12px; + font-size: 11px; + color: rgba(255, 255, 255, 0.7); + cursor: pointer; + transition: all 0.2s ease; + + &:hover { + background: rgba(255, 255, 255, 0.06); + border-color: rgba(255, 255, 255, 0.2); + color: rgba(255, 255, 255, 0.9); + } +`; + +const EmptyState = styled.div` + text-align: center; + padding: 48px 20px; + background: rgba(255, 255, 255, 0.02); + border: 1px dashed rgba(255, 255, 255, 0.1); + border-radius: 8px; +`; + +const EmptyIcon = styled.div` + font-size: 48px; + margin-bottom: 16px; + opacity: 0.3; +`; + +const EmptyTitle = styled.h3` + font-size: 14px; + font-weight: 500; + color: rgba(255, 255, 255, 0.7); + margin: 0 0 8px 0; +`; + +const EmptyDescription = styled.p` + font-size: 12px; + color: rgba(255, 255, 255, 0.5); + margin: 0 0 20px 0; + line-height: 1.5; +`; + +const MarketplaceGrid = styled.div` + display: grid; + grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); + gap: 12px; +`; + +const MarketplaceCard = styled(Card)` + cursor: pointer; + position: relative; + overflow: hidden; + + &::before { + content: ''; + position: absolute; + top: 0; + left: -100%; + width: 100%; + height: 100%; + background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); + transition: left 0.5s ease; + } + + &:hover::before { + left: 100%; + } +`; + +const TagsContainer = styled.div` + display: flex; + flex-wrap: wrap; + gap: 6px; + margin-top: 8px; +`; + +const Tag = styled.span` + padding: 3px 8px; + border-radius: 4px; + font-size: 10px; + background: rgba(255, 255, 255, 0.06); + color: rgba(255, 255, 255, 0.6); + border: 1px solid rgba(255, 255, 255, 0.08); +`; + +const InstallButton = styled.button` + width: 100%; + background: rgba(255, 255, 255, 0.08); + border: 1px solid rgba(255, 255, 255, 0.15); + border-radius: 4px; + padding: 8px 16px; + font-size: 12px; + font-weight: 500; + color: rgba(255, 255, 255, 0.9); + cursor: pointer; + transition: all 0.2s ease; + margin-top: 12px; + + &:hover { + background: rgba(255, 255, 255, 0.12); + border-color: rgba(255, 255, 255, 0.25); + } +`; + +export const Extensions: React.FC = ({ onAddMCPServer, onAddAgent }) => { + const [activeTab, setActiveTab] = useState<"servers" | "agents" | "marketplace">("servers"); + + // Mock data + const mcpServers: MCPServer[] = [ + { + id: "1", + name: "Filesystem MCP", + description: "Access and manipulate files in your workspace", + status: "active", + type: "filesystem", + icon: "📁" + }, + { + id: "2", + name: "PostgreSQL MCP", + description: "Query and manage PostgreSQL databases", + status: "inactive", + type: "database", + icon: "🗄️" + } + ]; + + const customAgents: CustomAgent[] = [ + { + id: "1", + name: "Code Reviewer", + description: "Specialized agent for code reviews and best practices", + model: "GPT-4", + status: "active", + avatar: "👨‍💻", + capabilities: ["Code Review", "Best Practices", "Security"] + } + ]; + + const marketplace = [ + { + id: "m1", + name: "GitHub MCP Server", + description: "Integrate with GitHub repos, issues, and PRs", + icon: "🐙", + tags: ["Git", "API", "Popular"], + downloads: "12.5k" + }, + { + id: "m2", + name: "Slack MCP Server", + description: "Send messages and notifications to Slack channels", + icon: "💬", + tags: ["Communication", "API"], + downloads: "8.2k" + }, + { + id: "m3", + name: "Docker Agent", + description: "Manage Docker containers and images", + icon: "🐳", + tags: ["DevOps", "Containers"], + downloads: "6.1k" + }, + { + id: "m4", + name: "Testing Agent", + description: "Automated test generation and debugging", + icon: "🧪", + tags: ["Testing", "QA"], + downloads: "4.8k" + } + ]; + + return ( + +
+ Extensions & Integrations + + Extend CodeBuddy with MCP servers, custom agents, and third-party integrations + +
+ + + setActiveTab("servers")}> + MCP Servers + + setActiveTab("agents")}> + Custom Agents + + setActiveTab("marketplace")}> + Marketplace + + + + {activeTab === "servers" && ( +
+ + Installed MCP Servers + onAddMCPServer?.({ + id: Date.now().toString(), + name: "New Server", + description: "", + status: "inactive", + type: "custom" + })}> + + + Add Server + + + + {mcpServers.length > 0 ? ( + + {mcpServers.map((server) => ( + + + + {server.icon} + + {server.name} + {server.description} + + + {server.status} + + + Configure + Logs + Remove + + + ))} + + ) : ( + + 🔌 + No MCP Servers Installed + + MCP (Model Context Protocol) servers extend CodeBuddy's capabilities by connecting to external tools and services. + + onAddMCPServer?.({ + id: Date.now().toString(), + name: "New Server", + description: "", + status: "inactive", + type: "custom" + })}> + + + Add Your First Server + + + )} +
+ )} + + {activeTab === "agents" && ( +
+ + Custom Agents + onAddAgent?.({ + id: Date.now().toString(), + name: "New Agent", + description: "", + model: "GPT-4", + status: "inactive" + })}> + + + Create Agent + + + + {customAgents.length > 0 ? ( + + {customAgents.map((agent) => ( + + + + {agent.avatar} + + {agent.name} + {agent.description} + + {agent.capabilities?.map((cap, idx) => ( + {cap} + ))} + + + + {agent.status} + + + Edit + Test + Delete + + + ))} + + ) : ( + + 🤖 + No Custom Agents + + Create specialized AI agents with custom instructions, tools, and capabilities tailored to your workflow. + + onAddAgent?.({ + id: Date.now().toString(), + name: "New Agent", + description: "", + model: "GPT-4", + status: "inactive" + })}> + + + Create Your First Agent + + + )} +
+ )} + + {activeTab === "marketplace" && ( +
+ + Discover Extensions + + + + {marketplace.map((item) => ( + + + + {item.icon} + + {item.name} + {item.description} + + {item.tags.map((tag, idx) => ( + {tag} + ))} + + + + +
+ ⬇️ {item.downloads} downloads +
+ Install +
+ ))} +
+
+ )} +
+ ); +}; \ No newline at end of file diff --git a/webviewUi/src/components/futureFeatures.tsx b/webviewUi/src/components/futureFeatures.tsx new file mode 100644 index 0000000..5a95b98 --- /dev/null +++ b/webviewUi/src/components/futureFeatures.tsx @@ -0,0 +1,308 @@ +import React, { useState } from "react"; +import styled from "styled-components"; + +interface FeatureCardProps { + title: string; + description: string; + icon: string; + status: "coming-soon" | "beta" | "experimental"; + category: string; +} + +const Container = styled.div` + width: 100%; + padding: 20px; + max-height: calc(100vh - 100px); + overflow-y: auto; +`; + +const Header = styled.div` + margin-bottom: 32px; +`; + +const Title = styled.h2` + font-size: 16px; + font-weight: 600; + color: rgba(255, 255, 255, 0.9); + margin: 0 0 8px 0; + text-align: left; +`; + +const Subtitle = styled.p` + font-size: 12px; + color: rgba(255, 255, 255, 0.5); + margin: 0; + text-align: left; + line-height: 1.5; +`; + +const FilterContainer = styled.div` + display: flex; + gap: 8px; + margin-bottom: 24px; + flex-wrap: wrap; +`; + +const FilterButton = styled.button<{ $active: boolean }>` + background: ${props => props.$active ? 'rgba(255, 255, 255, 0.1)' : 'rgba(255, 255, 255, 0.04)'}; + border: 1px solid ${props => props.$active ? 'rgba(255, 255, 255, 0.2)' : 'rgba(255, 255, 255, 0.08)'}; + border-radius: 6px; + padding: 8px 14px; + font-size: 12px; + font-weight: 500; + color: ${props => props.$active ? 'rgba(255, 255, 255, 0.95)' : 'rgba(255, 255, 255, 0.6)'}; + cursor: pointer; + transition: all 0.2s ease; + + &:hover { + background: rgba(255, 255, 255, 0.08); + border-color: rgba(255, 255, 255, 0.15); + } +`; + +const Grid = styled.div` + display: grid; + grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); + gap: 16px; +`; + +const FeatureCard = styled.div` + background: rgba(255, 255, 255, 0.02); + border: 1px solid rgba(255, 255, 255, 0.08); + border-radius: 10px; + padding: 20px; + transition: all 0.3s ease; + cursor: pointer; + position: relative; + overflow: hidden; + + &::before { + content: ''; + position: absolute; + top: 0; + left: -100%; + width: 100%; + height: 100%; + background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent); + transition: left 0.5s ease; + } + + &:hover { + background: rgba(255, 255, 255, 0.04); + border-color: rgba(255, 255, 255, 0.15); + transform: translateY(-2px); + } + + &:hover::before { + left: 100%; + } +`; + +const CardHeader = styled.div` + display: flex; + justify-content: space-between; + align-items: start; + margin-bottom: 12px; +`; + +const IconWrapper = styled.div` + font-size: 32px; + margin-bottom: 12px; +`; + +const StatusBadge = styled.span<{ $status: string }>` + padding: 4px 8px; + border-radius: 4px; + font-size: 9px; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.5px; + background: ${props => { + switch (props.$status) { + case 'beta': return 'rgba(59, 130, 246, 0.15)'; + case 'experimental': return 'rgba(168, 85, 247, 0.15)'; + default: return 'rgba(255, 255, 255, 0.1)'; + } + }}; + color: ${props => { + switch (props.$status) { + case 'beta': return 'rgba(96, 165, 250, 0.9)'; + case 'experimental': return 'rgba(192, 132, 252, 0.9)'; + default: return 'rgba(255, 255, 255, 0.6)'; + } + }}; + border: 1px solid ${props => { + switch (props.$status) { + case 'beta': return 'rgba(59, 130, 246, 0.3)'; + case 'experimental': return 'rgba(168, 85, 247, 0.3)'; + default: return 'rgba(255, 255, 255, 0.15)'; + } + }}; +`; + +const CardTitle = styled.h3` + font-size: 15px; + font-weight: 600; + color: rgba(255, 255, 255, 0.95); + margin: 0 0 8px 0; + text-align: left; +`; + +const CardDescription = styled.p` + font-size: 12px; + color: rgba(255, 255, 255, 0.6); + margin: 0; + line-height: 1.6; + text-align: left; +`; + +const CategoryTag = styled.span` + display: inline-block; + padding: 4px 8px; + border-radius: 4px; + font-size: 10px; + background: rgba(255, 255, 255, 0.04); + color: rgba(255, 255, 255, 0.5); + margin-top: 12px; + border: 1px solid rgba(255, 255, 255, 0.06); +`; + +const VoteButton = styled.button` + width: 100%; + background: rgba(255, 255, 255, 0.04); + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 6px; + padding: 10px; + font-size: 12px; + font-weight: 500; + color: rgba(255, 255, 255, 0.7); + cursor: pointer; + transition: all 0.2s ease; + margin-top: 16px; + display: flex; + align-items: center; + justify-content: center; + gap: 6px; + + &:hover { + background: rgba(255, 255, 255, 0.08); + border-color: rgba(255, 255, 255, 0.2); + color: rgba(255, 255, 255, 0.9); + } + + &:active { + transform: scale(0.98); + } +`; + +export const FutureFeatures: React.FC = () => { + const [filter, setFilter] = useState("all"); + + const features: FeatureCardProps[] = [ + { + title: "Voice Coding", + description: "Code with your voice using natural language. Hands-free programming with real-time transcription", + icon: "🎤", + status: "experimental", + category: "Accessibility" + }, + { + title: "Team Collaboration", + description: "Share AI conversations, custom agents, and context with your team. Real-time collaborative debugging", + icon: "👥", + status: "coming-soon", + category: "Collaboration" + }, + { + title: "Documentation Generator", + description: "Auto-generate comprehensive documentation from your code with examples and usage guides", + icon: "📚", + status: "coming-soon", + category: "Documentation" + }, + { + title: "Test Generator", + description: "Intelligent test generation with edge cases, mocks, and fixtures based on your code structure", + icon: "🧪", + status: "beta", + category: "Testing" + }, + { + title: "Performance Profiler", + description: "AI-driven performance analysis with bottleneck detection and optimization recommendations", + icon: "⚡", + status: "coming-soon", + category: "Performance" + }, + { + title: "Security Scanner", + description: "Real-time vulnerability detection with CVE database integration and fix suggestions", + icon: "🔒", + status: "coming-soon", + category: "Security" + }, + { + title: "API Integration Hub", + description: "Connect to external APIs with auto-generated clients and documentation", + icon: "🔌", + status: "coming-soon", + category: "Integration" + }, + { + title: "Custom Prompts", + description: "Create and share prompt templates for common coding tasks and workflows", + icon: "✏️", + status: "coming-soon", + category: "Productivity" + }, + ]; + + const categories = ["all", ...Array.from(new Set(features.map(f => f.category)))]; + + const filteredFeatures = filter === "all" + ? features + : features.filter(f => f.category === filter); + + return ( + +
+ Future Roadmap + + Upcoming features and experiments. Vote for what you'd like to see next! + +
+ + + {categories.map(category => ( + setFilter(category)} + > + {category === "all" ? "All Features" : category} + + ))} + + + + {filteredFeatures.map((feature, index) => ( + + + {feature.icon} + + {feature.status.replace("-", " ")} + + + {feature.title} + {feature.description} + {feature.category} + + 👍 + Vote for this feature + + + ))} + +
+ ); +}; \ No newline at end of file diff --git a/webviewUi/src/components/settings.tsx b/webviewUi/src/components/settings.tsx new file mode 100644 index 0000000..cabf9bc --- /dev/null +++ b/webviewUi/src/components/settings.tsx @@ -0,0 +1,438 @@ +import React from "react"; +import styled from "styled-components"; + +interface SettingsProps { + username: string; + selectedTheme: string; + selectedModel: string; + selectedCodeBuddyMode: string; + enableStreaming: boolean; + darkMode: boolean; + themeOptions: { value: string; label: string }[]; + modelOptions: { value: string; label: string }[]; + codeBuddyMode: { value: string; label: string }[]; + onUsernameChange: (value: string) => void; + onThemeChange: (value: string) => void; + onModelChange: (value: string) => void; + onCodeBuddyModeChange: (value: string) => void; + onStreamingChange: (value: boolean) => void; + onDarkModeChange: (value: boolean) => void; + onClearHistory: () => void; + onSavePreferences?: () => void; +} + +const SettingsContainer = styled.div` + width: 100%; + max-width: 100%; + padding: 20px; +`; + +const Section = styled.div` + margin-bottom: 40px; + + &:last-child { + margin-bottom: 0; + } +`; + +const SectionTitle = styled.h3` + font-size: 11px; + font-weight: 600; + color: rgba(255, 255, 255, 0.5); + margin: 0 0 20px 0; + text-transform: uppercase; + letter-spacing: 1px; + text-align: left; +`; + +const SettingRow = styled.div` + display: grid; + grid-template-columns: 1fr auto; + align-items: start; + padding: 16px 0; + border-bottom: 1px solid rgba(255, 255, 255, 0.06); + gap: 24px; + + &:first-of-type { + padding-top: 0; + } + + &:last-child { + border-bottom: none; + } +`; + +const SettingInfo = styled.div` + display: flex; + flex-direction: column; + gap: 4px; + text-align: left; +`; + +const SettingLabel = styled.label` + font-size: 14px; + font-weight: 500; + color: rgba(255, 255, 255, 0.9); + display: block; + text-align: left; +`; + +const SettingDescription = styled.p` + font-size: 12px; + color: rgba(255, 255, 255, 0.5); + margin: 0; + line-height: 1.5; + text-align: left; +`; + +const SettingControl = styled.div` + flex-shrink: 0; + display: flex; + align-items: center; + gap: 8px; +`; + +// Toggle Switch +const ToggleSwitch = styled.label` + position: relative; + display: inline-block; + width: 40px; + height: 22px; + cursor: pointer; +`; + +const ToggleInput = styled.input` + opacity: 0; + width: 0; + height: 0; + + &:checked + span { + background: rgba(255, 255, 255, 0.15); + } + + &:checked + span:before { + transform: translateX(18px); + background: rgba(255, 255, 255, 0.9); + } + + &:disabled + span { + opacity: 0.4; + cursor: not-allowed; + } +`; + +const ToggleSlider = styled.span` + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(255, 255, 255, 0.1); + transition: 0.2s; + border-radius: 22px; + border: 1px solid rgba(255, 255, 255, 0.1); + + &:before { + position: absolute; + content: ""; + height: 16px; + width: 16px; + left: 3px; + bottom: 2px; + background: rgba(255, 255, 255, 0.6); + transition: 0.2s; + border-radius: 50%; + } +`; + +// Text Input +const TextInput = styled.input` + background: rgba(255, 255, 255, 0.04); + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 6px; + padding: 10px 14px; + font-size: 13px; + color: rgba(255, 255, 255, 0.9); + min-width: 200px; + transition: all 0.2s ease; + + &:focus { + outline: none; + border-color: rgba(255, 255, 255, 0.25); + background: rgba(255, 255, 255, 0.06); + } + + &:disabled { + opacity: 0.5; + cursor: not-allowed; + } + + &::placeholder { + color: rgba(255, 255, 255, 0.3); + } +`; + +// Select Dropdown +const Select = styled.select` + background: rgba(255, 255, 255, 0.04); + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 6px; + padding: 10px 14px; + font-size: 13px; + color: rgba(255, 255, 255, 0.9); + min-width: 200px; + cursor: pointer; + transition: all 0.2s ease; + + &:focus { + outline: none; + border-color: rgba(255, 255, 255, 0.25); + background: rgba(255, 255, 255, 0.06); + } + + &:disabled { + opacity: 0.5; + cursor: not-allowed; + } + + option { + background: #1a1a1a; + color: rgba(255, 255, 255, 0.9); + padding: 8px; + } +`; + +// Button +const Button = styled.button` + background: rgba(255, 255, 255, 0.06); + border: 1px solid rgba(255, 255, 255, 0.12); + border-radius: 6px; + padding: 10px 20px; + font-size: 13px; + font-weight: 500; + color: rgba(255, 255, 255, 0.9); + cursor: pointer; + transition: all 0.2s ease; + white-space: nowrap; + + &:hover:not(:disabled) { + background: rgba(255, 255, 255, 0.1); + border-color: rgba(255, 255, 255, 0.2); + } + + &:active:not(:disabled) { + transform: scale(0.98); + } + + &:disabled { + opacity: 0.5; + cursor: not-allowed; + } +`; + +export const Settings: React.FC = ({ + username, + selectedTheme, + selectedModel, + selectedCodeBuddyMode, + enableStreaming, + darkMode, + themeOptions, + modelOptions, + codeBuddyMode, + onUsernameChange, + onThemeChange, + onModelChange, + onCodeBuddyModeChange, + onStreamingChange, + onDarkModeChange, + onClearHistory, + onSavePreferences, +}) => { + return ( + + {/* General Section */} +
+ General + + + + Nickname + Your display name in chat + + + onUsernameChange(e.target.value)} + placeholder="Enter nickname" + maxLength={10} + disabled + /> + {onSavePreferences && ( + + )} + + + + + + Code Theme + Syntax highlighting theme for code blocks + + + + + + + + + AI Model + Choose your preferred AI model + + + + + + + + + CodeBuddy Mode + Agent mode or Ask mode + + + + + +
+ + {/* Features Section */} +
+ Features + + + + Enable Streaming + Stream responses in real-time + + + + onStreamingChange(e.target.checked)} + /> + + + + + + + + Index Codebase + Index your workspace for better context + + + + onDarkModeChange(e.target.checked)} + disabled + /> + + + + + + + + Auto Suggestions + Show inline code suggestions automatically + + + + + + + + + + + + Web Search + Allow AI to search the web for information + + + + + + + + +
+ + {/* Privacy & Data Section */} +
+ Privacy & Data + + + + Save Chat History + Store conversations locally + + + + + + + + + + + + Anonymous Telemetry + Help improve CodeBuddy by sharing usage data + + + + + + + + + + + + Clear Chat History + Permanently delete all saved conversations + + + + + +
+
+ ); +}; \ No newline at end of file diff --git a/webviewUi/src/components/skeletonLoader.tsx b/webviewUi/src/components/skeletonLoader.tsx index 5a7c467..2806c28 100644 --- a/webviewUi/src/components/skeletonLoader.tsx +++ b/webviewUi/src/components/skeletonLoader.tsx @@ -1,67 +1,158 @@ import React from "react"; import { BotIcon } from "./botIcon"; - import styled, { keyframes } from "styled-components"; const shimmer = keyframes` 0% { - background-position: -1000px 0; + transform: translateX(-100%); } 100% { - background-position: 1000px 0; + transform: translateX(100%); + } +`; + +const pulse = keyframes` + 0%, 100% { + opacity: 0.4; + } + 50% { + opacity: 0.8; + } +`; + +const scanline = keyframes` + 0% { + transform: translateY(-100%); + } + 100% { + transform: translateY(100%); } `; export const SkeletonLoaderContainer = styled.div` - background-color: transparent; - border-radius: 8px; - padding: 16px; + background: linear-gradient(135deg, rgba(20, 20, 30, 0.3) 0%, rgba(30, 30, 45, 0.3) 100%); + border: 1px solid rgba(100, 200, 255, 0.2); + border-radius: 12px; + padding: 20px; width: 100%; - max-width: 500px; /* Adjust as needed */ - margin: 0 auto; /* Center the loader */ + max-width: 500px; + margin: 0 auto; + position: relative; + overflow: hidden; + box-shadow: 0 4px 20px rgba(0, 150, 255, 0.1); + + &::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + height: 2px; + background: linear-gradient(90deg, transparent, rgba(100, 200, 255, 0.5), transparent); + animation: ${scanline} 3s linear infinite; + } `; export const SkeletonHeader = styled.div` display: flex; align-items: center; - margin-bottom: 16px; + gap: 12px; + margin-bottom: 20px; `; export const SkeletonLine = styled.div` - height: 12px; - background: linear-gradient(to right, #333, #444, #333); - background-size: 2000px 100%; - animation: ${shimmer} 2s linear infinite; - border-radius: 4px; - margin-bottom: 8px; + height: 10px; + background: rgba(100, 200, 255, 0.1); + border-radius: 5px; + margin-bottom: 12px; + position: relative; + overflow: hidden; + + &::before { + content: ''; + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + background: linear-gradient( + 90deg, + transparent 0%, + rgba(100, 200, 255, 0.3) 50%, + transparent 100% + ); + animation: ${shimmer} 2s ease-in-out infinite; + } + + &::after { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: linear-gradient( + 90deg, + transparent 0%, + rgba(100, 200, 255, 0.05) 50%, + transparent 100% + ); + animation: ${pulse} 2s ease-in-out infinite; + } `; export const SkeletonLineShort = styled(SkeletonLine)` - width: 30%; + width: 35%; `; export const SkeletonLineMedium = styled(SkeletonLine)` - width: 70%; + width: 65%; `; export const SkeletonLineLong = styled(SkeletonLine)` - width: 90%; + width: 85%; +`; + +const BotIconWrapper = styled.div` + animation: ${pulse} 2s ease-in-out infinite; +`; + +const StatusIndicator = styled.div` + display: flex; + align-items: center; + gap: 6px; + font-size: 11px; + color: rgba(100, 200, 255, 0.7); + text-transform: uppercase; + letter-spacing: 1px; + + &::before { + content: ''; + width: 6px; + height: 6px; + border-radius: 50%; + background: #00d9ff; + box-shadow: 0 0 10px rgba(0, 217, 255, 0.8); + animation: ${pulse} 1s ease-in-out infinite; + } `; export const SkeletonLoader: React.FC = () => { return ( - - + + + + Processing
- - + +
); -}; +}; \ No newline at end of file diff --git a/webviewUi/src/components/thinkingComponent.tsx b/webviewUi/src/components/thinkingComponent.tsx index 17907cc..e1005a7 100644 --- a/webviewUi/src/components/thinkingComponent.tsx +++ b/webviewUi/src/components/thinkingComponent.tsx @@ -1,23 +1,303 @@ -import React, { useState } from "react"; +import React, { useState, useMemo } from "react"; import DOMPurify from "dompurify"; +import styled, { keyframes } from "styled-components"; +import { MermaidDiagram } from "./MermaidDiagram"; interface ThinkingComponentProps { content: string; } +const glow = keyframes` + 0%, 100% { + box-shadow: 0 0 5px rgba(138, 43, 226, 0.3), 0 0 10px rgba(138, 43, 226, 0.2); + } + 50% { + box-shadow: 0 0 10px rgba(138, 43, 226, 0.5), 0 0 20px rgba(138, 43, 226, 0.3); + } +`; + +const pulse = keyframes` + 0%, 100% { + opacity: 0.6; + transform: scale(1); + } + 50% { + opacity: 1; + transform: scale(1.05); + } +`; + +const slideDown = keyframes` + from { + opacity: 0; + transform: translateY(-10px); + } + to { + opacity: 1; + transform: translateY(0); + } +`; + +const ThinkingContainer = styled.div` + margin: 16px 0; + border-radius: 12px; + overflow: hidden; + background: linear-gradient(135deg, rgba(138, 43, 226, 0.05) 0%, rgba(75, 0, 130, 0.05) 100%); + border: 1px solid rgba(138, 43, 226, 0.2); + transition: all 0.3s ease; + + &:hover { + border-color: rgba(138, 43, 226, 0.4); + animation: ${glow} 2s ease-in-out infinite; + } +`; + +const ThinkingHeader = styled.button` + width: 100%; + padding: 14px 18px; + background: linear-gradient(135deg, rgba(138, 43, 226, 0.1) 0%, rgba(75, 0, 130, 0.1) 100%); + border: none; + cursor: pointer; + display: flex; + justify-content: space-between; + align-items: center; + transition: all 0.3s ease; + position: relative; + overflow: hidden; + + &::before { + content: ''; + position: absolute; + top: 0; + left: -200%; + width: 200%; + height: 100%; + background: linear-gradient( + 90deg, + transparent 0%, + rgba(138, 43, 226, 0.1) 50%, + transparent 100% + ); + transition: left 0.5s ease; + } + + &:hover::before { + left: 200%; + } + + &:hover { + background: linear-gradient(135deg, rgba(138, 43, 226, 0.15) 0%, rgba(75, 0, 130, 0.15) 100%); + } + + &:active { + transform: scale(0.98); + } +`; + +const ThinkingHeaderLeft = styled.div` + display: flex; + align-items: center; + gap: 10px; + z-index: 1; +`; + +const ThinkingIcon = styled.span` + font-size: 20px; + animation: ${pulse} 2s ease-in-out infinite; + filter: drop-shadow(0 0 8px rgba(138, 43, 226, 0.6)); +`; + +const ThinkingTitle = styled.span` + font-weight: 600; + font-size: 14px; + color: #a855f7; + text-transform: uppercase; + letter-spacing: 1px; + background: linear-gradient(90deg, #a855f7, #8b5cf6, #a855f7); + background-size: 200% auto; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; +`; + +const ThinkingHeaderRight = styled.div` + display: flex; + align-items: center; + gap: 8px; + z-index: 1; +`; + +const ThinkingStatus = styled.span` + font-size: 11px; + color: rgba(168, 85, 247, 0.7); + text-transform: uppercase; + letter-spacing: 0.5px; + padding: 4px 10px; + background: rgba(138, 43, 226, 0.15); + border-radius: 12px; + border: 1px solid rgba(138, 43, 226, 0.3); +`; + +const ThinkingChevron = styled.span<{ $isExpanded: boolean }>` + font-size: 12px; + color: #a855f7; + transition: transform 0.3s ease; + transform: ${props => props.$isExpanded ? 'rotate(180deg)' : 'rotate(0deg)'}; +`; + +const ThinkingContent = styled.div` + animation: ${slideDown} 0.3s ease-out; + border-top: 1px solid rgba(138, 43, 226, 0.2); + background: rgba(20, 20, 30, 0.3); +`; + +const ThinkingContentHeader = styled.div` + display: flex; + justify-content: space-between; + align-items: center; + padding: 12px 18px; + background: linear-gradient(90deg, rgba(138, 43, 226, 0.08) 0%, transparent 100%); + border-bottom: 1px solid rgba(138, 43, 226, 0.15); +`; + +const ThinkingExpandText = styled.div` + font-size: 12px; + color: rgba(168, 85, 247, 0.8); + font-weight: 500; + display: flex; + align-items: center; + gap: 6px; + + &::before { + content: '⚡'; + font-size: 14px; + animation: ${pulse} 1.5s ease-in-out infinite; + } +`; + +const ThinkingCopyButton = styled.button<{ $copied: boolean }>` + padding: 6px 14px; + background: ${props => props.$copied + ? 'linear-gradient(135deg, #10b981 0%, #059669 100%)' + : 'linear-gradient(135deg, rgba(138, 43, 226, 0.2) 0%, rgba(75, 0, 130, 0.2) 100%)' + }; + color: ${props => props.$copied ? '#fff' : '#a855f7'}; + border: 1px solid ${props => props.$copied + ? 'rgba(16, 185, 129, 0.5)' + : 'rgba(138, 43, 226, 0.3)' + }; + border-radius: 8px; + cursor: pointer; + font-size: 11px; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.5px; + transition: all 0.3s ease; + position: relative; + overflow: hidden; + + &::before { + content: ''; + position: absolute; + top: 50%; + left: 50%; + width: 0; + height: 0; + border-radius: 50%; + background: rgba(255, 255, 255, 0.3); + transform: translate(-50%, -50%); + transition: width 0.3s ease, height 0.3s ease; + } + + &:hover::before { + width: 200px; + height: 200px; + } + + &:hover { + background: ${props => props.$copied + ? 'linear-gradient(135deg, #10b981 0%, #059669 100%)' + : 'linear-gradient(135deg, rgba(138, 43, 226, 0.3) 0%, rgba(75, 0, 130, 0.3) 100%)' + }; + border-color: ${props => props.$copied + ? 'rgba(16, 185, 129, 0.7)' + : 'rgba(138, 43, 226, 0.5)' + }; + transform: translateY(-1px); + box-shadow: 0 4px 12px ${props => props.$copied + ? 'rgba(16, 185, 129, 0.3)' + : 'rgba(138, 43, 226, 0.3)' + }; + } + + &:active { + transform: translateY(0); + } + + span { + position: relative; + z-index: 1; + } +`; + +const ThinkingText = styled.div` + padding: 18px; + color: rgba(200, 200, 220, 0.9); + font-size: 13px; + line-height: 1.7; + font-family: 'Segoe UI', system-ui, sans-serif; + text-align: left; + + /* Styling for code blocks within thinking */ + code { + background: rgba(138, 43, 226, 0.1); + padding: 2px 6px; + border-radius: 4px; + font-size: 12px; + border: 1px solid rgba(138, 43, 226, 0.2); + } + + /* Styling for paragraphs */ + p { + margin: 8px 0; + } + + /* Styling for lists */ + ul, ol { + margin: 8px 0; + padding-left: 20px; + } + + li { + margin: 4px 0; + } + + /* Add a subtle gradient overlay at the bottom */ + position: relative; + + &::after { + content: ''; + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 30px; + background: linear-gradient(to bottom, transparent, rgba(20, 20, 30, 0.3)); + pointer-events: none; + } +`; + export const ThinkingComponent: React.FC = ({ content }) => { const [isExpanded, setIsExpanded] = useState(false); const [copyStatus, setCopyStatus] = useState(""); - // Parse the content to extract thinking and regular content + // Parse content to extract thinking blocks const parseContent = (rawContent: string) => { - // First decode HTML entities if they exist let decodedContent = rawContent; if (rawContent.includes("<think>")) { decodedContent = rawContent.replace(/<think>/g, "").replace(/<\/think>/g, ""); } - // Look for ... tags const thinkRegex = /([\s\S]*?)<\/think>/gi; const matches = [...decodedContent.matchAll(thinkRegex)]; @@ -25,10 +305,7 @@ export const ThinkingComponent: React.FC = ({ content }) let regularContent = decodedContent; if (matches.length > 0) { - // Extract all thinking content thinkingContent = matches.map((match) => match[1]).join("\n\n"); - - // Remove thinking tags and content from regular content regularContent = decodedContent.replace(thinkRegex, "").trim(); } @@ -39,10 +316,172 @@ export const ThinkingComponent: React.FC = ({ content }) }; }; + // Parse content to extract and render Mermaid diagrams + const parseMermaidContent = useMemo(() => { + return (htmlContent: string): React.ReactNode[] => { + const elements: React.ReactNode[] = []; + + // Check for new-style mermaid containers (base64 encoded, from formatText) + const hasNewStyleMermaid = htmlContent.includes('mermaid-container') && htmlContent.includes('data-mermaid'); + + // Check for old-style mermaid code blocks (for backwards compatibility) + const hasOldStyleMermaid = + htmlContent.includes('language-mermaid') || + htmlContent.includes('```mermaid'); + + if (!hasNewStyleMermaid && !hasOldStyleMermaid) { + // No mermaid content, return as regular HTML + return [
]; + } + + // Pattern for new-style mermaid containers with base64-encoded data + // More flexible patterns to handle attribute order variations + const newStylePatterns = [ + /]*class="mermaid-container"[^>]*data-mermaid="([^"]+)"[^>]*>(?:<\/div>)?/gi, + /]*data-mermaid="([^"]+)"[^>]*class="mermaid-container"[^>]*>(?:<\/div>)?/gi, + ]; + + // Pattern for old-style code blocks (fallback) + const oldStylePatterns = [ + /
([\s\S]*?)<\/code><\/pre>/gi,
+        /```mermaid\n?([\s\S]*?)```/gi,
+      ];
+      
+      let lastIndex = 0;
+      
+      interface MermaidMatch {
+        fullMatch: string;
+        code: string;
+        startIndex: number;
+        endIndex: number;
+        isBase64: boolean;
+      }
+      
+      const mermaidMatches: MermaidMatch[] = [];
+      
+      // First, find new-style (base64) mermaid blocks
+      let match;
+      for (const newStylePattern of newStylePatterns) {
+        newStylePattern.lastIndex = 0;
+        while ((match = newStylePattern.exec(htmlContent)) !== null) {
+          try {
+            // Decode base64 to get the original mermaid code
+            const decodedCode = atob(match[1]);
+            mermaidMatches.push({
+              fullMatch: match[0],
+              code: decodedCode,
+              startIndex: match.index,
+              endIndex: match.index + match[0].length,
+              isBase64: true,
+            });
+          } catch (e) {
+            console.error('Failed to decode mermaid base64:', e);
+          }
+        }
+      }
+      
+      // If no new-style matches, try old-style patterns
+      if (mermaidMatches.length === 0) {
+        for (const pattern of oldStylePatterns) {
+          pattern.lastIndex = 0;
+          while ((match = pattern.exec(htmlContent)) !== null) {
+            let mermaidCode = match[1];
+            
+            // Decode HTML entities
+            mermaidCode = mermaidCode
+              .replace(/</g, '<')
+              .replace(/>/g, '>')
+              .replace(/&/g, '&')
+              .replace(/"/g, '"')
+              .replace(/'/g, "'")
+              .replace(/ /g, ' ')
+              .replace(//gi, '\n')
+              .replace(/<[^>]+>/g, '')
+              .trim();
+            
+            mermaidMatches.push({
+              fullMatch: match[0],
+              code: mermaidCode,
+              startIndex: match.index,
+              endIndex: match.index + match[0].length,
+              isBase64: false,
+            });
+          }
+        }
+      }
+      
+      if (mermaidMatches.length === 0) {
+        // No mermaid matches found, return as regular HTML
+        return [
]; + } + + // Sort matches by start index + mermaidMatches.sort((a, b) => a.startIndex - b.startIndex); + + // Remove overlapping matches (keep the first one) + const uniqueMatches: MermaidMatch[] = []; + for (const m of mermaidMatches) { + const overlaps = uniqueMatches.some( + (existing) => m.startIndex < existing.endIndex && m.endIndex > existing.startIndex + ); + if (!overlaps) { + uniqueMatches.push(m); + } + } + + if (uniqueMatches.length === 0) { + // No mermaid content, return as regular HTML + return [
]; + } + + // Process content with mermaid diagrams + for (const match of uniqueMatches) { + // Add content before this mermaid block + if (match.startIndex > lastIndex) { + const beforeContent = htmlContent.substring(lastIndex, match.startIndex); + if (beforeContent.trim()) { + elements.push( +
+ ); + } + } + + // Add the mermaid diagram + elements.push( + + ); + + lastIndex = match.endIndex; + } + + // Add any remaining content after the last mermaid block + if (lastIndex < htmlContent.length) { + const afterContent = htmlContent.substring(lastIndex); + if (afterContent.trim()) { + elements.push( +
+ ); + } + } + + return elements; + }; + }, []); + const { thinkingContent, regularContent, hasThinking } = parseContent(content); const sanitizedThinkingContent = DOMPurify.sanitize(thinkingContent); - const sanitizedRegularContent = DOMPurify.sanitize(regularContent); const toggleExpanded = () => { setIsExpanded(!isExpanded); @@ -55,51 +494,56 @@ export const ThinkingComponent: React.FC = ({ content }) setTimeout(() => setCopyStatus(""), 2000); } catch (error) { console.error("Failed to copy thinking content:", error); - setCopyStatus("Error"); + setCopyStatus("Failed"); setTimeout(() => setCopyStatus(""), 2000); } }; + // Render regular content with Mermaid support + const renderedRegularContent = useMemo(() => { + return parseMermaidContent(regularContent); + }, [regularContent, parseMermaidContent]); + if (!hasThinking) { - // If no thinking content, just return the regular content - return
; + return <>{renderedRegularContent}; } return ( <> - {/* Thinking section */} -
- + + 💭 + Thoughts + + + {isExpanded ? 'Visible' : 'Hidden'} + + + {isExpanded && ( -
-
-
Model reasoning process
- -
-
-
+ + + Model reasoning process + + {copyStatus || "Copy"} + + + + )} -
+ - {/* Regular content */} - {regularContent &&
} + {regularContent && renderedRegularContent} ); -}; +}; \ No newline at end of file diff --git a/webviewUi/src/components/webview.tsx b/webviewUi/src/components/webview.tsx index f9fa7fd..8feac07 100644 --- a/webviewUi/src/components/webview.tsx +++ b/webviewUi/src/components/webview.tsx @@ -1,36 +1,25 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -export interface Message { - type: "user" | "bot"; - content: string; - language?: string; - alias?: string; -} - -export interface ExtensionMessage { - type: string; - payload: any; -} - import { VSCodePanels, VSCodePanelTab, VSCodePanelView } from "@vscode/webview-ui-toolkit/react"; import type hljs from "highlight.js"; -import { useCallback, useEffect, useRef, useState, useMemo } from "react"; // Use useCallback and useMemo +import { useCallback, useEffect, useMemo, useState } from "react"; import { codeBuddyMode, faqItems, modelOptions, themeOptions } from "../constants/constant"; +import { IWebviewMessage, useStreamingChat } from "../hooks/useStreamingChat"; import { getChatCss } from "../themes/chat_css"; import { updateStyles } from "../utils/dynamicCss"; import { highlightCodeBlocks } from "../utils/highlightCode"; +import { FAQAccordion } from "./accordion"; import AttachmentIcon from "./attachmentIcon"; import { BotMessage } from "./botMessage"; -import { UserMessage } from "./personMessage"; -import { ModelDropdown } from "./select"; +import ChatInput from "./ChatInput"; +import { CommandFeedbackLoader } from "./commandFeedbackLoader"; import WorkspaceSelector from "./context"; -import TextInput from "./textInput"; -import ToggleButton from "./toggleButton"; -import Button from "./button"; -import { FAQAccordion } from "./accordion"; +import { Extensions } from "./extensions"; +import { FutureFeatures } from "./futureFeatures"; +import { UserMessage } from "./personMessage"; +import { Settings } from "./settings"; import { SkeletonLoader } from "./skeletonLoader"; -import { CommandFeedbackLoader } from "./commandFeedbackLoader"; -import ChatInput from "./ChatInput"; +import { WelcomeScreen } from "./welcomeUI"; const hljsApi = window["hljs" as any] as unknown as typeof hljs; @@ -46,10 +35,10 @@ const vsCode = (() => { }; })(); -// Define a type for configuration data for better type safety interface ConfigData { username?: string; theme?: string; + enableStreaming?: boolean; } export const WebviewUI = () => { @@ -57,8 +46,6 @@ export const WebviewUI = () => { const [selectedTheme, setSelectedTheme] = useState("tokyo night"); const [selectedModel, setSelectedModel] = useState("Gemini"); const [selectedCodeBuddyMode, setSelectedCodeBuddyMode] = useState("Ask"); - const [messages, setMessages] = useState([]); - const [isBotLoading, setIsBotLoading] = useState(false); const [commandAction, setCommandAction] = useState(""); const [commandDescription, setCommandDescription] = useState(""); const [isCommandExecuting, setIsCommandExecuting] = useState(false); @@ -68,70 +55,109 @@ export const WebviewUI = () => { const [activeEditor, setActiveEditor] = useState(""); const [username, setUsername] = useState(""); const [darkMode, setDarkMode] = useState(false); + const [enableStreaming, setEnableStreaming] = useState(true); // Ref for username input element - const nameInputRef = useRef(null); + // const nameInputRef = useRef(null); + + // Initialize streaming chat hook + const { + messages: streamedMessages, + isStreaming, + isLoading: isBotLoading, + sendMessage, + clearMessages, + setMessages, + } = useStreamingChat(vsCode, { + enableStreaming, + onLegacyMessage: (messages) => { + console.log("Legacy message received:", messages); + }, + }); // Memoize the chat CSS to prevent unnecessary re-renders const chatCss = useMemo(() => getChatCss(selectedTheme), [selectedTheme]); - // Use useCallback to prevent unnecessary re-renders of the message handler - const messageHandler = useCallback((event: any) => { + // Legacy message handler for non-streaming events + const legacyMessageHandler = useCallback((event: any) => { const message = event.data; - switch (message.type) { - case "bot-response": - // Use functional updates to ensure we're working with the most recent state - setMessages((prevMessages) => [ - ...(prevMessages || []), - { - type: "bot", - content: message.message, - language: "Typescript", - alias: "O", - }, - ]); - setIsBotLoading(false); - setIsCommandExecuting(false); - setCommandAction(""); - setCommandDescription(""); - break; + const messageType = message.command || message.type; + + // Handle stream end to clear command execution state + // (the actual message handling is done by useStreamingChat hook) + if (messageType === 'onStreamEnd' || messageType === 'onStreamError') { + setIsCommandExecuting(false); + setCommandAction(""); + setCommandDescription(""); + return; + } + + // Skip other streaming-related messages as they're handled by the hook + if (message.command?.includes('stream') || message.type?.includes('stream')) { + return; + } + + switch (messageType) { case "codebuddy-commands": - // Handle command feedback - show what action is being performed console.log("Command feedback received:", message.message); setIsCommandExecuting(true); if (typeof message.message === "object" && message.message.action && message.message.description) { setCommandAction(message.message.action); setCommandDescription(message.message.description); } else { - // Fallback for legacy string format setCommandAction(message.message || "Processing request"); setCommandDescription("CodeBuddy is analyzing your code and generating a response..."); } break; + case "bootstrap": setFolders(message); break; + case "chat-history": try { - // Parse the chat history efficiently using JSON.parse const parsedMessages = JSON.parse(message.message); - setMessages((prevMessages) => [...parsedMessages, ...(prevMessages || [])]); + const formattedMessages: IWebviewMessage[] = parsedMessages.map((msg: any) => ({ + id: `history-${Date.now()}-${Math.random()}`, + type: msg.type, + content: msg.content, + language: msg.language, + alias: msg.alias, + timestamp: Date.now(), + })); + setMessages((prev: IWebviewMessage[]) => [...formattedMessages, ...prev]); } catch (error: any) { - console.log(error); - throw new Error(error.message); + console.error("Error parsing chat history:", error); } break; + case "error": console.error("Extension error", message.payload); - setIsBotLoading(false); + setIsCommandExecuting(false); + setCommandAction(""); + setCommandDescription(""); + break; + + case "bot-response": + // Clear command execution state when bot response is received + // The actual message handling is done by useStreamingChat hook + setIsCommandExecuting(false); + setCommandAction(""); + setCommandDescription(""); break; + case "onActiveworkspaceUpdate": setActiveEditor(message.message ?? ""); break; + case "onConfigurationChange": { const data = JSON.parse(message.message); - return data; + if (data.enableStreaming !== undefined) { + setEnableStreaming(data.enableStreaming); + } + break; } + case "onGetUserPreferences": { const data: ConfigData = JSON.parse(message.message); if (data.username) { @@ -140,41 +166,54 @@ export const WebviewUI = () => { if (data.theme) { setSelectedTheme(data.theme); } - return data; + if (data.enableStreaming !== undefined) { + setEnableStreaming(data.enableStreaming); + } + break; } + case "theme-settings": - // Handle theme settings from extension if (message.theme) { setSelectedTheme(message.theme); } break; + default: - console.warn("Unknown message type", message.type); + // Ignore unknown message types + break; } - }, []); + }, [setMessages]); - // Update CSS whenever theme changes using useEffect + // Update CSS whenever theme changes useEffect(() => { - // Update styles using dynamicCss utility updateStyles(chatCss); }, [chatCss]); - // Initialize event listener for messages from VS Code + // Initialize legacy event listener useEffect(() => { - window.addEventListener("message", messageHandler); + window.addEventListener("message", legacyMessageHandler); return () => { - window.removeEventListener("message", messageHandler); + window.removeEventListener("message", legacyMessageHandler); }; - }, [messageHandler]); // Dependency array includes messageHandler + }, [legacyMessageHandler]); - // Separate effect for highlighting code blocks using highlightCodeBlocks utility + // Highlight code blocks when messages update useEffect(() => { - highlightCodeBlocks(hljsApi, messages); - }, [messages]); + highlightCodeBlocks(hljsApi, streamedMessages); + }, [streamedMessages]); + + // Clear command execution state when streaming completes + useEffect(() => { + if (!isStreaming && !isBotLoading) { + setIsCommandExecuting(false); + setCommandAction(""); + setCommandDescription(""); + } + }, [isStreaming, isBotLoading]); const handleClearHistory = useCallback(() => { - setMessages([]); - }, []); + clearMessages(); + }, [clearMessages]); const handleUserPreferences = useCallback(() => { vsCode.postMessage({ @@ -189,70 +228,26 @@ export const WebviewUI = () => { setSelectedContext(value); }, []); - const handleNameChange = useCallback((e: React.ChangeEvent) => { - setUsername(e.target.value); - }, []); + // const handleNameChange = useCallback((e: React.ChangeEvent) => { + // setUsername(e.target.value); + // }, []); const handleToggle = useCallback((isActive: boolean) => { setDarkMode(isActive); - // Apply theme change logic here document.body.classList.toggle("dark-mode", isActive); }, []); - const handleModelChange = useCallback((e: any) => { - const newValue = e.target.value; - setSelectedModel(newValue); - vsCode.postMessage({ - command: "update-model-event", - message: newValue, - }); - }, []); - - const handleCodeBuddyMode = useCallback((e: any) => { - const newValue = e.target.value; - setSelectedCodeBuddyMode(newValue); - vsCode.postMessage({ - command: "codebuddy-model-change-event", - message: newValue, - }); - }, []); - - const handleThemeChange = useCallback((e: any) => { - const newValue = e.target.value; - setSelectedTheme(newValue); - // Optionally save theme preference to extension storage - vsCode.postMessage({ - command: "theme-change-event", - message: newValue, - }); - }, []); - - // Use useCallback to prevent unnecessary re-renders of the handleSend function const handleSend = useCallback( (message: string) => { if (!message.trim()) return; - setMessages((previousMessages) => [ - ...(previousMessages || []), - { - type: "user", - content: message, - alias: "O", - }, - ]); - - setIsBotLoading(true); - - vsCode.postMessage({ - command: "user-input", - message: message, - metaData: { - mode: selectedCodeBuddyMode, - context: selectedContext.split("@"), - }, + sendMessage(message, { + mode: selectedCodeBuddyMode, + context: selectedContext.split("@"), + alias: "O", }); }, - [selectedCodeBuddyMode, selectedContext] + [sendMessage, selectedCodeBuddyMode, selectedContext] ); const handleGetContext = useCallback(() => { @@ -268,14 +263,23 @@ export const WebviewUI = () => { }, [selectedContext]); const memoizedMessages = useMemo(() => { - return messages.map((msg) => + return streamedMessages.map((msg) => msg.type === "bot" ? ( - + ) : ( - + ) ); - }, [messages]); + }, [streamedMessages]); return (
@@ -287,72 +291,100 @@ export const WebviewUI = () => { SETTINGS setActiveTab("tab-3")}> - FAQ + EXTENSIONS setActiveTab("tab-4")}> - OTHERS + FAQ + + setActiveTab("tab-5")}> + FUTURE -
- {memoizedMessages} - {isCommandExecuting && ( - + {/* Show welcome screen when there are no messages */} + {streamedMessages.length === 0 && !isBotLoading && !isCommandExecuting ? ( + { + // Optional: Focus on the input or trigger a sample prompt + console.log("User is ready to start!"); + }} + /> + ) : ( + <> + {memoizedMessages} + {isCommandExecuting && ( + + )} + {isBotLoading && !isCommandExecuting && !isStreaming && } + )} - {isBotLoading && !isCommandExecuting && }
-
-
- Nickname - - - - - - -
-
- {" "} - Index Codebase - - {" "} - - -
-
+ { + setSelectedTheme(value); + vsCode.postMessage({ command: "theme-change-event", message: value }); + }} + onModelChange={(value) => { + setSelectedModel(value); + vsCode.postMessage({ command: "update-model-event", message: value }); + }} + onCodeBuddyModeChange={(value) => { + setSelectedCodeBuddyMode(value); + vsCode.postMessage({ command: "codebuddy-model-change-event", message: value }); + }} + onStreamingChange={setEnableStreaming} + onDarkModeChange={handleToggle} + onClearHistory={handleClearHistory} + onSavePreferences={handleUserPreferences} + />
+ + console.log('Add server:', server)} + onAddAgent={(agent) => console.log('Add agent:', agent)} + /> + + +
- ({ - question: i.question, - answer:
, - }))} - /> + +
+ +
+ +
+
+
+
- In Dev + + + +
{
- {/* Replace VSCodeTextArea with ChatInput */} +
- - - -
); -}; +}; \ No newline at end of file diff --git a/webviewUi/src/components/welcomeUI.tsx b/webviewUi/src/components/welcomeUI.tsx new file mode 100644 index 0000000..b1865bb --- /dev/null +++ b/webviewUi/src/components/welcomeUI.tsx @@ -0,0 +1,139 @@ +import React, { useEffect, useState } from "react"; +import styled, { keyframes } from "styled-components"; + +interface WelcomeScreenProps { + username?: string; + onGetStarted?: () => void; +} + +const fadeIn = keyframes` + from { + opacity: 0; + transform: translateY(10px); + } + to { + opacity: 1; + transform: translateY(0); + } +`; + + +const WelcomeContainer = styled.div` + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + min-height: 60vh; + padding: 40px 20px; + animation: ${fadeIn} 0.6s ease-out; +`; + + +const WelcomeTitle = styled.h1` + font-size: 28px; + font-weight: 600; + color: rgba(255, 255, 255, 0.9); + margin: 0 0 8px 0; + animation: ${fadeIn} 0.6s ease-out 0.1s both; + letter-spacing: -0.5px; +`; + +const WelcomeSubtitle = styled.p` + font-size: 14px; + color: rgba(255, 255, 255, 0.5); + margin: 0 0 48px 0; + animation: ${fadeIn} 0.6s ease-out 0.2s both; + text-align: center; + max-width: 380px; + line-height: 1.6; +`; + + +const TipsContainer = styled.div` + max-width: 480px; + width: 100%; + background: rgba(255, 255, 255, 0.03); + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 12px; + padding: 24px; + animation: ${fadeIn} 0.6s ease-out 0.4s both; +`; + +const TipsTitle = styled.div` + font-size: 14px; + font-weight: 600; + color: rgba(255, 255, 255, 0.9); + margin-bottom: 20px; + display: flex; + align-items: center; + gap: 8px; + text-align: left; +`; + +const TipsList = styled.div` + display: flex; + flex-direction: column; + gap: 16px; +`; + +const TipItem = styled.div` + display: flex; + align-items: start; + gap: 12px; + padding: 14px; + background: rgba(255, 255, 255, 0.02); + border: 1px solid rgba(255, 255, 255, 0.06); + border-radius: 8px; + transition: all 0.2s ease; + text-align: left; + + &:hover { + background: rgba(255, 255, 255, 0.04); + border-color: rgba(255, 255, 255, 0.12); + transform: translateX(4px); + } + +`; + +export const WelcomeScreen: React.FC = ({ username }) => { + const [displayedText, setDisplayedText] = useState(""); + const greeting = username ? `Welcome back, ${username}` : "Welcome to CodeBuddy"; + + useEffect(() => { + let currentIndex = 0; + const interval = setInterval(() => { + if (currentIndex <= greeting.length) { + setDisplayedText(greeting.slice(0, currentIndex)); + currentIndex++; + } else { + clearInterval(interval); + } + }, 40); + + return () => clearInterval(interval); + }, [greeting]); + + + return ( + + {displayedText} + + + Your AI coding assistant ready to help you build better software + + + + + 💡 + Quick Tips + + + Check out the FAQ and SETTINGS section to configure your AI assistant + Select code in editor to ask questions about it + Use context selector to include multiple files + Switch modes for different assistance types + + + + ); +}; \ No newline at end of file diff --git a/webviewUi/src/hooks/useStreamingChat.ts b/webviewUi/src/hooks/useStreamingChat.ts new file mode 100644 index 0000000..876fc8d --- /dev/null +++ b/webviewUi/src/hooks/useStreamingChat.ts @@ -0,0 +1,255 @@ +import { useCallback, useEffect, useMemo, useRef, useState } from "react"; + +export interface IWebviewMessage { + id: string; + type: "user" | "bot"; + content: string; + language?: string; + alias?: string; + senderInitial?: string; + isStreaming?: boolean; + timestamp?: number; +} + +interface UseStreamingChatOptions { + enableStreaming?: boolean; + onLegacyMessage?: (messages: IWebviewMessage[]) => void; +} + +export const useStreamingChat = ( + vscodeApi: any, + options: UseStreamingChatOptions = {}, +) => { + const { enableStreaming = true, onLegacyMessage } = options; + + const [completedMessages, setCompletedMessages] = useState( + [], + ); + const [streamingMessage, setStreamingMessage] = + useState(null); + const [isLegacyLoading, setIsLegacyLoading] = useState(false); + + const currentRequestIdRef = useRef(null); + + // Combine completed and streaming messages + const streamedMessages = useMemo(() => { + return streamingMessage + ? [...completedMessages, streamingMessage] + : completedMessages; + }, [completedMessages, streamingMessage]); + + // Add a message directly (for legacy or manual additions) + const addMessage = useCallback( + (message: Omit) => { + const fullMessage: IWebviewMessage = { + ...message, + id: `msg-${Date.now()}-${Math.random()}`, + timestamp: Date.now(), + }; + setCompletedMessages((prev) => [...prev, fullMessage]); + return fullMessage; + }, + [], + ); + + // Clear all messages + const clearMessages = useCallback(() => { + setCompletedMessages([]); + setStreamingMessage(null); + currentRequestIdRef.current = null; + }, []); + + // Streaming handlers + const handleStreamStart = useCallback( + (payload: any) => { + console.log("payload", payload); + if (!enableStreaming) return; + + const tempId = `temp-${payload.requestId || Date.now()}`; + currentRequestIdRef.current = payload.requestId; + setIsLegacyLoading(false); + setStreamingMessage({ + id: tempId, + type: "bot", + content: "", + isStreaming: true, + timestamp: Date.now(), + language: payload.language || "Typescript", + alias: payload.alias || "O", + }); + }, + [enableStreaming], + ); + + const handleStreamChunk = useCallback( + (payload: any) => { + if (!enableStreaming) return; + if (payload.requestId !== currentRequestIdRef.current) return; + + setStreamingMessage((prev) => { + if (!prev) return null; + const newContent = + payload.accumulated ?? prev.content + payload.content; + return { ...prev, content: newContent }; + }); + }, + [enableStreaming], + ); + + const handleStreamEnd = useCallback( + (payload: any) => { + if (!enableStreaming) return; + if (payload.requestId !== currentRequestIdRef.current) return; + + setStreamingMessage((prev) => { + if (!prev) return null; + const finalContent = payload.content ?? prev.content; + const finalMessage: IWebviewMessage = { + ...prev, + id: `bot-${Date.now()}`, + isStreaming: false, + content: finalContent, + }; + setCompletedMessages((prevCompleted) => [ + ...prevCompleted, + finalMessage, + ]); + return null; + }); + + currentRequestIdRef.current = null; + }, + [enableStreaming], + ); + + const handleStreamError = useCallback( + (payload: any) => { + if (!enableStreaming) return; + if (payload.requestId !== currentRequestIdRef.current) return; + + setStreamingMessage((prev) => { + if (!prev) return null; + const errorMessage: IWebviewMessage = { + ...prev, + id: `error-${Date.now()}`, + isStreaming: false, + content: payload.error || "An error occurred during streaming", + }; + setCompletedMessages((prevCompleted) => [ + ...prevCompleted, + errorMessage, + ]); + return null; + }); + + currentRequestIdRef.current = null; + setIsLegacyLoading(false); + }, + [enableStreaming], + ); + + // Legacy bot response handler + const handleLegacyBotResponse = useCallback( + (payload: any) => { + const botMessage: IWebviewMessage = { + id: `bot-${Date.now()}`, + type: "bot", + content: payload.message || payload.content || "", + language: payload.language || "Typescript", + alias: payload.alias || "O", + isStreaming: false, + timestamp: Date.now(), + }; + setCompletedMessages((prev) => [...prev, botMessage]); + setIsLegacyLoading(false); + + if (onLegacyMessage) { + onLegacyMessage([botMessage]); + } + }, + [onLegacyMessage], + ); + + // Send message + const sendMessage = useCallback( + (content: string, metadata?: Record) => { + const userMessage: IWebviewMessage = { + id: `user-${Date.now()}`, + type: "user", + content, + timestamp: Date.now(), + alias: metadata?.alias || "O", + ...metadata, + }; + setCompletedMessages((prev) => [...prev, userMessage]); + setIsLegacyLoading(true); + + vscodeApi.postMessage({ + command: "user-input", + message: content, + metaData: metadata, + }); + }, + [vscodeApi], + ); + + // Message event listener + useEffect(() => { + const messageHandler = (event: any) => { + console.log("event", event); + const message = event.data; + const { command, type } = message; + + // Handle both 'command' and 'type' for backward compatibility + const messageType = command || type; + + switch (messageType) { + // Streaming commands + case "onStreamStart": + handleStreamStart(message.payload); + break; + case "onStreamChunk": + handleStreamChunk(message.payload); + break; + case "onStreamEnd": + handleStreamEnd(message.payload); + break; + case "onStreamError": + handleStreamError(message.payload); + break; + + // Legacy non-streaming response + case "bot-response": + if (!enableStreaming || !currentRequestIdRef.current) { + handleLegacyBotResponse(message); + } + break; + + default: + break; + } + }; + + window.addEventListener("message", messageHandler); + return () => { + window.removeEventListener("message", messageHandler); + }; + }, [ + enableStreaming, + handleStreamStart, + handleStreamChunk, + handleStreamEnd, + handleStreamError, + handleLegacyBotResponse, + ]); + + return { + messages: streamedMessages, + isStreaming: !!streamingMessage, + isLoading: isLegacyLoading || !!streamingMessage, + sendMessage, + addMessage, + clearMessages, + setMessages: setCompletedMessages, + }; +}; diff --git a/webviewUi/src/index.css b/webviewUi/src/index.css index b5d56c0..d93eb7a 100644 --- a/webviewUi/src/index.css +++ b/webviewUi/src/index.css @@ -1039,7 +1039,6 @@ hr { .thinking-content { border-top: 1px solid var(--vscode-widget-border, #454545); padding: 12px; - background: var(--vscode-editor-background); } .thinking-content-header { @@ -1165,4 +1164,80 @@ hr { justify-content: space-between; align-items: center; z-index: 1000; +} + +/* Streaming cursor animation */ +@keyframes blink { + 0%, 49% { + opacity: 1; + } + 50%, 100% { + opacity: 0; + } +} + +.streaming-cursor { + display: inline-block; + width: 8px; + height: 16px; + background-color: currentColor; + margin-left: 2px; + animation: blink 1s infinite; + vertical-align: text-bottom; +} + +/* Optional: Add a subtle glow effect during streaming */ +.code-block.streaming { + position: relative; +} + +.code-block.streaming::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: linear-gradient(90deg, transparent, rgba(100, 200, 255, 0.1), transparent); + animation: shimmer 2s infinite; + pointer-events: none; +} + +@keyframes shimmer { + 0% { + transform: translateX(-100%); + } + 100% { + transform: translateX(100%); + } +} + +/* Streaming indicator in header */ +.streaming-indicator { + display: inline-flex; + align-items: center; + gap: 4px; + font-size: 12px; + color: #888; +} + +.streaming-indicator::after { + content: ''; + display: inline-block; + width: 4px; + height: 4px; + border-radius: 50%; + background-color: #4CAF50; + animation: pulse 1.5s ease-in-out infinite; +} + +@keyframes pulse { + 0%, 100% { + opacity: 1; + transform: scale(1); + } + 50% { + opacity: 0.5; + transform: scale(1.2); + } } \ No newline at end of file diff --git a/webviewUi/src/types/streaming.types.ts b/webviewUi/src/types/streaming.types.ts new file mode 100644 index 0000000..55f39d0 --- /dev/null +++ b/webviewUi/src/types/streaming.types.ts @@ -0,0 +1,129 @@ +/** + * Streaming event types for WebView UI + * Matches the backend streaming.types.ts + */ + +export enum StreamEventType { + // Planning & Thinking + THINKING_START = "thinking_start", + THINKING_UPDATE = "thinking_update", + THINKING_END = "thinking_end", + + // Task Planning + PLAN_START = "plan_start", + PLAN_STEP_ADDED = "plan_step_added", + PLAN_COMPLETE = "plan_complete", + + // Tool Execution + TOOL_CALL_START = "tool_call_start", + TOOL_CALL_PROGRESS = "tool_call_progress", + TOOL_CALL_END = "tool_call_end", + TOOL_CALL_ERROR = "tool_call_error", + + // Content Generation + CONTENT_START = "content_start", + CONTENT_DELTA = "content_delta", + CONTENT_END = "content_end", + + // File Operations + FILE_OPERATION_START = "file_operation_start", + FILE_OPERATION_COMPLETE = "file_operation_complete", + + // Error Handling + ERROR = "error", + + // Completion + DONE = "done", +} + +export interface BaseStreamEvent { + type: StreamEventType; + timestamp: number; + threadId?: string; +} + +export interface ThinkingEvent extends BaseStreamEvent { + type: + | StreamEventType.THINKING_START + | StreamEventType.THINKING_UPDATE + | StreamEventType.THINKING_END; + content?: string; +} + +export interface PlanStep { + id: string; + description: string; + status: "pending" | "in_progress" | "completed" | "failed"; + order: number; +} + +export interface PlanStepEvent extends BaseStreamEvent { + type: StreamEventType.PLAN_STEP_ADDED; + step: PlanStep; +} + +export interface PlanEvent extends BaseStreamEvent { + type: StreamEventType.PLAN_START | StreamEventType.PLAN_COMPLETE; + totalSteps?: number; + steps?: PlanStep[]; +} + +export interface ToolCallEvent extends BaseStreamEvent { + type: + | StreamEventType.TOOL_CALL_START + | StreamEventType.TOOL_CALL_PROGRESS + | StreamEventType.TOOL_CALL_END + | StreamEventType.TOOL_CALL_ERROR; + toolName: string; + toolInput?: any; + toolOutput?: any; + progress?: number; + error?: string; +} + +export interface ContentEvent extends BaseStreamEvent { + type: + | StreamEventType.CONTENT_START + | StreamEventType.CONTENT_DELTA + | StreamEventType.CONTENT_END; + content: string; + role?: "assistant" | "system"; +} + +export interface FileOperationEvent extends BaseStreamEvent { + type: + | StreamEventType.FILE_OPERATION_START + | StreamEventType.FILE_OPERATION_COMPLETE; + operation: "create" | "update" | "delete" | "read"; + filePath: string; + status?: "success" | "failed"; +} + +export interface ErrorEvent extends BaseStreamEvent { + type: StreamEventType.ERROR; + error: { + message: string; + code?: string; + stack?: string; + }; +} + +export interface DoneEvent extends BaseStreamEvent { + type: StreamEventType.DONE; + summary?: { + totalSteps: number; + completedSteps: number; + failedSteps: number; + filesModified: number; + }; +} + +export type StreamEvent = + | ThinkingEvent + | PlanEvent + | PlanStepEvent + | ToolCallEvent + | ContentEvent + | FileOperationEvent + | ErrorEvent + | DoneEvent; diff --git a/webviewUi/src/utils/highlightCode.ts b/webviewUi/src/utils/highlightCode.ts index 5365a25..e11fc17 100644 --- a/webviewUi/src/utils/highlightCode.ts +++ b/webviewUi/src/utils/highlightCode.ts @@ -10,87 +10,96 @@ function decodeHtml(html: string): string { export const highlightCodeBlocks = (hljsApi: HLJSApi, messages: any) => { if (!hljsApi || messages?.length <= 0) return; - document.querySelectorAll("pre code:not(.hljs-done)").forEach((block) => { - let language = null; - const languageClass = Array.from(block.classList).find((className) => - className.startsWith("language-"), - ); - if (languageClass) { - language = languageClass.substring("language-".length); - } + document + .querySelectorAll("pre code:not(.hljs-done):not(.mermaid-processed)") + .forEach((block) => { + let language = null; + const languageClass = Array.from(block.classList).find((className) => + className.startsWith("language-"), + ); + if (languageClass) { + language = languageClass.substring("language-".length); + } - try { - const decodedCode = decodeHtml(block.textContent ?? ""); - const detectedLanguage = - language ?? hljsApi.highlightAuto(decodedCode).language; - if (detectedLanguage != undefined) { - const highlightedCode = hljsApi.highlight(decodedCode, { - language: detectedLanguage, - }).value; - block.setHTMLUnsafe(highlightedCode); - block.classList.add("hljs-done"); + // Skip mermaid code blocks - they will be handled by the MermaidDiagram component + if (language === "mermaid") { + block.classList.add("mermaid-processed"); + return; + } - const copyButton = document.createElement("button"); - copyButton.innerHTML = "Copy"; - copyButton.classList.add("copy-button"); - copyButton.setAttribute("aria-label", "Copy code to clipboard"); + try { + const decodedCode = decodeHtml(block.textContent ?? ""); + const detectedLanguage = + language ?? hljsApi.highlightAuto(decodedCode).language; + if (detectedLanguage != undefined) { + const highlightedCode = hljsApi.highlight(decodedCode, { + language: detectedLanguage, + }).value; + block.setHTMLUnsafe(highlightedCode); + block.classList.add("hljs-done"); - copyButton.addEventListener("click", () => { - try { - navigator.clipboard.writeText(block.textContent ?? ""); - copyButton.textContent = "Copied!"; - setTimeout(() => { - copyButton.textContent = "Copy"; - }, 2000); - } catch (err) { - console.error("Failed to copy text: ", err); - copyButton.textContent = "Error"; - } - }); + const copyButton = document.createElement("button"); + copyButton.innerHTML = "Copy"; + copyButton.classList.add("copy-button"); + copyButton.setAttribute("aria-label", "Copy code to clipboard"); - // Create a wrapper for the code block with its own copy button - const preElement = block.closest("pre"); - if (preElement && !preElement.querySelector(".code-block-wrapper")) { - // Create a wrapper div for this specific code block - const wrapper = document.createElement("div"); - wrapper.classList.add("code-block-wrapper"); - wrapper.style.position = "relative"; - wrapper.style.marginBottom = "1rem"; + copyButton.addEventListener("click", () => { + try { + navigator.clipboard.writeText(block.textContent ?? ""); + copyButton.textContent = "Copied!"; + setTimeout(() => { + copyButton.textContent = "Copy"; + }, 2000); + } catch (err) { + console.error("Failed to copy text: ", err); + copyButton.textContent = "Error"; + } + }); - // Create a header for this code block - const codeHeader = document.createElement("div"); - codeHeader.classList.add("individual-code-header"); - codeHeader.style.display = "flex"; - codeHeader.style.justifyContent = "space-between"; - codeHeader.style.alignItems = "center"; - codeHeader.style.padding = "0.5rem 1rem"; - codeHeader.style.backgroundColor = "var(--vscode-editor-background)"; - codeHeader.style.borderBottom = - "1px solid var(--vscode-panel-border)"; - codeHeader.style.fontSize = "0.875rem"; + // Create a wrapper for the code block with its own copy button + const preElement = block.closest("pre"); + if (preElement && !preElement.querySelector(".code-block-wrapper")) { + // Create a wrapper div for this specific code block + const wrapper = document.createElement("div"); + wrapper.classList.add("code-block-wrapper"); + wrapper.style.position = "relative"; + wrapper.style.marginBottom = "1rem"; - // Add language label - const languageLabel = document.createElement("span"); - languageLabel.textContent = detectedLanguage || "code"; - languageLabel.style.color = "var(--vscode-editor-foreground)"; - languageLabel.style.opacity = "0.8"; + // Create a header for this code block + const codeHeader = document.createElement("div"); + codeHeader.classList.add("individual-code-header"); + codeHeader.style.display = "flex"; + codeHeader.style.justifyContent = "space-between"; + codeHeader.style.alignItems = "center"; + codeHeader.style.padding = "0.5rem 1rem"; + codeHeader.style.backgroundColor = + "var(--vscode-editor-background)"; + codeHeader.style.borderBottom = + "1px solid var(--vscode-panel-border)"; + codeHeader.style.fontSize = "0.875rem"; - // Add copy button to the header - copyButton.style.position = "static"; - copyButton.style.margin = "0"; + // Add language label + const languageLabel = document.createElement("span"); + languageLabel.textContent = detectedLanguage || "code"; + languageLabel.style.color = "var(--vscode-editor-foreground)"; + languageLabel.style.opacity = "0.8"; - codeHeader.appendChild(languageLabel); - codeHeader.appendChild(copyButton); + // Add copy button to the header + copyButton.style.position = "static"; + copyButton.style.margin = "0"; - // Wrap the pre element - preElement.parentNode?.insertBefore(wrapper, preElement); - wrapper.appendChild(codeHeader); - wrapper.appendChild(preElement); + codeHeader.appendChild(languageLabel); + codeHeader.appendChild(copyButton); + + // Wrap the pre element + preElement.parentNode?.insertBefore(wrapper, preElement); + wrapper.appendChild(codeHeader); + wrapper.appendChild(preElement); + } } + } catch (error) { + console.error("Highlighting failed:", error); + block.classList.add("hljs-error"); } - } catch (error) { - console.error("Highlighting failed:", error); - block.classList.add("hljs-error"); - } - }); + }); };