Skip to content

Turn meetings into live agent loops. Record, transcribe, and analyze meetings with real-time AI intelligence — before, during, and after calls.

init: meeting copilot

Om Gate41e0a94826e1
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9ec845a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,39 @@
+# Dependencies
+node_modules/
+
+# Build output
+dist/
+release/
+
+# Database
+data/
+*.db
+
+# Drizzle
+drizzle/
+
+# Logs
+logs/
+*.log
+
+# OS files
+.DS_Store
+Thumbs.db
+
+# IDE
+.idea/
+.vscode/
+*.swp
+*.swo
+
+# Environment
+.env
+.env.local
+.env.*.local
+
+# Config files with secrets
+config.json
+auth_config.json
+
+# TypeScript cache
+*.tsbuildinfo
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..5e3bb69
--- /dev/null
+++ b/README.md
@@ -0,0 +1,331 @@
+<!-- PROJECT SHIELDS -->
+[![Electron][electron-shield]][electron-url]
+[![Node][node-shield]][node-url]
+[![React][react-shield]][react-url]
+[![TypeScript][typescript-shield]][typescript-url]
+[![License][license-shield]][license-url]
+[![Stargazers][stars-shield]][stars-url]
+[![Issues][issues-shield]][issues-url]
+[![Website][website-shield]][website-url]
+
+<!-- PROJECT LOGO -->
+<br />
+<p align="center">
+ <a href="https://videodb.io/">
+ <img src="https://codaio.imgix.net/docs/_s5lUnUCIU/blobs/bl-RgjcFrrJjj/d3cbc44f8584ecd42f2a97d981a144dce6a66d83ddd5864f723b7808c7d1dfbc25034f2f25e1b2188e78f78f37bcb79d3c34ca937cbb08ca8b3da1526c29da9a897ab38eb39d084fd715028b7cc60eb595c68ecfa6fa0bb125ec2b09da65664a4f172c2f" alt="Logo" width="300" height="">
+ </a>
+
+ <h1 align="center">Meeting Copilot</h1>
+
+ <p align="center">
+ Real-time AI meeting assistant with live transcription, sentiment analysis, cue cards, and post-meeting summaries — powered by <a href="https://videodb.io">VideoDB</a>.
+ <br />
+ <a href="https://docs.videodb.io"><strong>Explore the docs »</strong></a>
+ <br />
+ <br />
+ <a href="#demo">View Demo</a>
+ ·
+ <a href="#download">Download</a>
+ ·
+ <a href="https://github.com/video-db/sales-copilot/issues">Report Bug</a>
+ </p>
+</p>
+
+---
+
+## Demo
+
+https://github.com/user-attachments/assets/e3cd2dcc-d9ab-4f5f-8904-52c56133ed2d
+
+## Download
+
+- **Apple Silicon**: [sales-copilot-1.0.0-arm64.dmg](https://artifacts.videodb.io/sales-copilot/sales-copilot-1.0.0-arm64.dmg)
+- **Apple Intel**: [sales-copilot-1.0.0.dmg](https://artifacts.videodb.io/sales-copilot/sales-copilot-1.0.0.dmg)
+
+<p>
+ <em>Currently available for macOS — Windows and Linux support coming soon</em>
+</p>
+
+---
+
+## Installation (Pre-built App)
+
+If you downloaded the pre-built app from the links above:
+
+1. **Mount the DMG** and drag Meeting Copilot to your Applications folder
+
+2. **Remove quarantine attributes** to allow the app to run:
+ ```bash
+ xattr -cr /Applications/Meeting\ Copilot.app
+ ```
+
+3. **Launch the app** from Applications or Spotlight
+
+4. **Grant system permissions** when prompted (Microphone and Screen Recording are required)
+
+---
+
+## Overview
+
+Meeting Copilot records your meetings and provides real-time insights while you talk. It captures screen, microphone, and system audio through VideoDB's capture SDK, runs dual-channel transcription (your mic vs. other participants' system audio), and feeds the conversation into a parallel analysis pipeline that produces sentiment scores, cue cards, nudges, talk ratio monitoring, and playbook tracking — all updated live during the meeting. When the meeting ends, it generates a structured summary with action items, objections, and risk assessment.
+
+## Features
+
+### Recording & Transcription
+- **Screen & Audio Recording** - Capture screen, microphone, and system audio simultaneously
+- **Real-time Transcription** - Live speech-to-text powered by VideoDB
+- **Recording History** - Browse and review past recordings with full transcripts
+
+### AI Meeting Copilot
+- **Cue Cards** - Context-aware prompts and talking points based on conversation
+- **Sentiment Analysis** - Track participant sentiment throughout the meeting
+- **Conversation Metrics** - Monitor talk ratio, speaking pace, questions asked, and more
+- **Playbook Tracking** - Ensure you cover all discussion items with progress tracking
+- **Nudges** - Timely reminders based on conversation context (e.g., "You haven't covered budget")
+- **Meeting Summary** - AI-generated summary with key points, action items, objections, and risks
+- **Bookmarking** - Mark important moments during meetings for easy reference
+- **MCP Agent Support** - Connect MCP servers and let the app auto-trigger tool calls from conversation context
+- **MCP Result Cards** - Inline tool outputs (including links) shown live during meetings
+
+### Technical
+- **Modern UI** - Built with React, Tailwind CSS, and shadcn/ui
+- **Type-safe API** - End-to-end type safety with tRPC
+- **Local Database** - SQLite with Drizzle ORM for offline-first storage
+- **Secure Webhooks** - Cloudflare tunnel for receiving real-time transcription events
+
+## Architecture
+
+![Meeting Copilot Architecture](assets/sales-copilot-architecture.png)
+
+## How the Copilot Works
+
+The copilot pipeline processes conversation in real-time through several parallel analyzers:
+
+- **Dual-channel transcription** — Mic is labeled as "you", system audio as other participants. This separation powers all downstream analysis.
+- **Sentiment analysis** — Tracks participant sentiment using pattern-based detection and optional LLM analysis. Sentiment is scored per transcript segment and trended over time.
+- **Talk ratio monitoring** — Calculates the balance between your speaking time and others. Alerts when ratio drifts outside the ideal 40-60% range.
+- **Cue card engine** — Detects objection types (pricing, competition, timing, authority) from participant speech and surfaces matching response suggestions in real-time.
+- **Nudge engine** — Generates contextual alerts: monologue warnings when you've been talking too long, sentiment dip alerts when participant tone drops, and ratio alerts when conversation is one-sided.
+- **Playbook tracker** — Tracks which discussion items from your playbook have been covered, showing completion percentage and highlighting gaps.
+- **Post-meeting summary** — When the meeting ends, runs parallel extraction of action items, objections raised, competitive mentions, risks identified, and next steps.
+
+## Tech Stack
+
+- **Electron 34** - Desktop application shell
+- **TypeScript 5.8** - Full type coverage
+- **React 19** - Modern UI framework
+- **Tailwind CSS** - Utility-first styling with Geist font
+- **shadcn/ui** - High-quality component primitives
+- **tRPC 11** - Type-safe API layer
+- **Hono** - Fast HTTP server for webhooks
+- **Drizzle ORM** - Type-safe database operations
+- **Zustand** - Lightweight state management
+- **Vite** - Fast frontend bundling
+- **VideoDB SDK** - Screen recording and transcription (includes OpenAI-compatible API for LLM calls)
+
+## Prerequisites
+
+- **Operating System**: macOS 12+ (for screen recording features)
+- **Node.js**: 18 or higher
+- **npm**: 10 or higher
+- **VideoDB API Key**: Sign up at [console.videodb.io](https://console.videodb.io)
+
+## Getting Started
+
+1. **Clone the repository:**
+ ```bash
+ git clone https://github.com/video-db/meeting-copilot.git
+ cd meeting-copilot
+ ```
+
+2. **Install dependencies:**
+ ```bash
+ npm install
+ ```
+
+3. **Rebuild native modules for Electron:**
+ ```bash
+ npm run rebuild
+ ```
+
+4. **Start development mode:**
+ ```bash
+ npm run dev
+ ```
+
+5. **Register with your VideoDB API key** when the app opens
+
+## MCP Server Setup
+
+### Where to Configure
+
+Open **Settings → MCP Servers** in the app.
+
+### How to Add a Server
+
+1. Click **Add Server**
+2. Choose transport:
+ - **stdio** (local command-based MCP server)
+ - **http** (remote MCP endpoint)
+3. Fill required fields (command/args/env or URL/headers)
+4. Save and click **Connect**
+
+### Triggering Behavior
+
+- MCP agent runs automatically during active meetings when trigger keywords are detected in transcript context.
+- You can customize trigger keywords from the MCP settings panel.
+- Tool outputs appear in the **MCP Results** panel during the call.
+
+### Capabilities
+
+- Multiple MCP server connections
+- Aggregated tool discovery across connected servers
+- Auto-triggered tool execution from call context
+- Live MCP result rendering (cards, markdown, links, structured fields)
+- Result actions like pin/dismiss while in-meeting
+
+## Development
+
+### Available Scripts
+
+| Command | Description |
+|---------|-------------|
+| `npm run dev` | Start development mode (main + renderer) |
+| `npm run build` | Build for production |
+| `npm run typecheck` | Run TypeScript type checking |
+| `npm run lint` | Run ESLint |
+| `npm run rebuild` | Rebuild native modules for Electron |
+| `npm run db:generate` | Generate database migration files |
+| `npm run db:migrate` | Apply database migrations |
+
+### Project Structure
+
+```
+src/
+├── main/ # Electron Main Process
+│ ├── db/ # Database layer (Drizzle + SQLite)
+│ ├── ipc/ # IPC handlers
+│ ├── lib/ # Utilities (logger, paths, permissions)
+│ ├── server/ # HTTP server (Hono + tRPC)
+│ │ ├── routes/ # Webhook routes
+│ │ └── trpc/ # tRPC router and procedures
+│ └── services/ # Business logic
+│ ├── copilot/ # AI copilot services
+│ │ ├── context-manager.service.ts
+│ │ ├── conversation-metrics.service.ts
+│ │ ├── cue-card-engine.service.ts
+│ │ ├── nudge-engine.service.ts
+│ │ ├── playbook-tracker.service.ts
+│ │ ├── sales-copilot.service.ts
+│ │ ├── sentiment-analyzer.service.ts
+│ │ ├── summary-generator.service.ts
+│ │ └── transcript-buffer.service.ts
+│ ├── mcp/ # MCP orchestration and tool execution services
+│ ├── llm.service.ts
+│ ├── tunnel.service.ts
+│ └── videodb.service.ts
+├── preload/ # Preload scripts (IPC bridge)
+├── renderer/ # React Frontend
+│ ├── api/ # tRPC client
+│ ├── components/ # UI components
+│ │ ├── auth/ # Authentication modal
+│ │ ├── copilot/ # Copilot UI components
+│ │ ├── history/ # Recording history views
+│ │ ├── layout/ # App layout (sidebar, titlebar)
+│ │ ├── mcp/ # MCP results/status components
+│ │ ├── recording/ # Recording controls
+│ │ ├── settings/ # Settings editors
+│ │ ├── transcription/ # Live transcription panel
+│ │ └── ui/ # shadcn/ui components
+│ ├── hooks/ # Custom React hooks
+│ ├── lib/ # Utilities
+│ └── stores/ # Zustand state stores (session, copilot, mcp)
+└── shared/ # Shared types & schemas
+ ├── schemas/ # Zod validation schemas
+ └── types/ # TypeScript types
+```
+
+### IPC API
+
+The app exposes IPC APIs through the preload script:
+
+- `window.electronAPI.mcp.*` - MCP server and tool operations
+- `window.electronAPI.mcpOn.*` - MCP event subscriptions
+
+## Permissions (macOS)
+
+The app requires the following permissions:
+- **Microphone** - For voice recording
+- **Screen Recording** - For screen capture
+
+Grant these in **System Preferences > Privacy & Security**.
+
+## Troubleshooting
+
+### Recording not starting
+- Verify VideoDB API key is registered (enter via registration modal on first launch)
+- Check microphone and screen recording permissions in System Settings
+- Try `npm run rebuild` to rebuild native modules
+
+### Transcription not appearing
+- Ensure both mic and system audio are enabled in recording settings
+- Check that the Cloudflare tunnel is active (shown in recording status)
+- Wait 5-10 seconds for first transcripts to appear
+
+### Copilot features not updating
+- Verify that transcription is working first
+- Check that at least 2-3 transcript segments exist
+- Some features (cue cards, nudges) require specific conversation patterns
+
+### Build/Installation issues
+- Delete `node_modules` and reinstall: `rm -rf node_modules && npm install`
+- Rebuild native modules: `npm run rebuild`
+- Check Node.js version: `node --version` (requires 18+)
+- Review logs in `~/Library/Application Support/meeting-copilot/logs/`
+
+### Webhook delivery fails
+- Cloudflare tunnel auto-creates on recording start
+- Check internet connectivity
+- Restart the recording to reinitialize tunnel
+
+## Data Storage
+
+Application data is stored in:
+```
+~/Library/Application Support/meeting-copilot/
+├── data/
+│ └── meeting-copilot.db # SQLite database
+└── logs/
+ └── app-YYYY-MM-DD.log # Daily log files
+```
+
+## Community & Support
+
+- **Docs**: [docs.videodb.io](https://docs.videodb.io)
+- **Issues**: [GitHub Issues](https://github.com/video-db/sales-copilot/issues)
+- **Discord**: [Join community](https://discord.gg/py9P639jGz)
+- **Console**: [Get API key](https://console.videodb.io)
+
+---
+
+<p align="center">Made with ❤️ by the <a href="https://videodb.io">VideoDB</a> team</p>
+
+---
+
+<!-- MARKDOWN LINKS & IMAGES -->
+[electron-shield]: https://img.shields.io/badge/Electron-34-47848F?style=for-the-badge&logo=electron&logoColor=white
+[electron-url]: https://www.electronjs.org/
+[node-shield]: https://img.shields.io/badge/Node.js-18+-339933?style=for-the-badge&logo=node.js&logoColor=white
+[node-url]: https://nodejs.org/
+[react-shield]: https://img.shields.io/badge/React-19-61DAFB?style=for-the-badge&logo=react&logoColor=black
+[react-url]: https://reactjs.org/
+[typescript-shield]: https://img.shields.io/badge/TypeScript-5.8-3178C6?style=for-the-badge&logo=typescript&logoColor=white
+[typescript-url]: https://www.typescriptlang.org/
+[license-shield]: https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge
+[license-url]: https://opensource.org/licenses/MIT
+[stars-shield]: https://img.shields.io/github/stars/video-db/sales-copilot.svg?style=for-the-badge
+[stars-url]: https://github.com/video-db/sales-copilot/stargazers
+[issues-shield]: https://img.shields.io/github/issues/video-db/sales-copilot.svg?style=for-the-badge
+[issues-url]: https://github.com/video-db/sales-copilot/issues
+[website-shield]: https://img.shields.io/website?url=https%3A%2F%2Fvideodb.io%2F&style=for-the-badge&label=videodb.io
+[website-url]: https://videodb.io/
diff --git a/drizzle.config.ts b/drizzle.config.ts
new file mode 100644
index 0000000..940bf47
--- /dev/null
+++ b/drizzle.config.ts
@@ -0,0 +1,10 @@
+import { defineConfig } from 'drizzle-kit';
+
+export default defineConfig({
+ schema: './src/main/db/schema.ts',
+ out: './drizzle',
+ dialect: 'sqlite',
+ dbCredentials: {
+ url: './data/meeting-copilot.db',
+ },
+});
diff --git a/electron-builder.config.js b/electron-builder.config.js
new file mode 100644
index 0000000..b4a3a00
--- /dev/null
+++ b/electron-builder.config.js
@@ -0,0 +1,312 @@
+const fs = require('fs');
+const path = require('path');
+const https = require('https');
+const { execSync } = require('child_process');
+
+function downloadFile(url, dest) {
+ return new Promise((resolve, reject) => {
+ const file = fs.createWriteStream(dest);
+ https
+ .get(url, (response) => {
+ if (response.statusCode === 302 || response.statusCode === 301) {
+ file.close();
+ fs.unlinkSync(dest);
+ downloadFile(response.headers.location, dest).then(resolve).catch(reject);
+ return;
+ }
+ if (response.statusCode !== 200) {
+ file.close();
+ fs.unlinkSync(dest);
+ reject(new Error(`Failed to download: ${response.statusCode}`));
+ return;
+ }
+ response.pipe(file);
+ file.on('finish', () => {
+ file.close();
+ resolve();
+ });
+ })
+ .on('error', (err) => {
+ file.close();
+ fs.unlink(dest, () => {});
+ reject(err);
+ });
+ });
+}
+
+function getTargetArchName(arch) {
+ if (arch === 1 || arch === 'x64') return 'x64';
+ if (arch === 3 || arch === 'arm64') return 'arm64';
+
+ if (process.arch === 'arm64') return 'arm64';
+ if (process.arch === 'x64') return 'x64';
+
+ return 'x64';
+}
+
+function getCloudflaredDownloadUrl(archName) {
+ const archSuffix = archName === 'arm64' ? 'arm64' : 'amd64';
+ return `https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-darwin-${archSuffix}.tgz`;
+}
+
+function matchesCloudflaredArch(fileOutput, archName) {
+ if (archName === 'arm64') return fileOutput.includes('arm64');
+ if (archName === 'x64') return fileOutput.includes('x86_64');
+ return false;
+}
+
+/**
+ * @type {import('electron-builder').Configuration}
+ */
+const config = {
+ appId: 'com.videodb.meeting-copilot',
+ productName: 'Meeting Copilot',
+ directories: {
+ output: 'release',
+ buildResources: 'resources',
+ },
+ files: [
+ 'dist/**/*',
+ 'package.json',
+ 'node_modules/**/*',
+ '!node_modules/*/{CHANGELOG.md,README.md,readme.md,README,readme}',
+ '!node_modules/*/{test,__tests__,tests,powered-test,example,examples}',
+ '!node_modules/.cache/**/*',
+ '!**/*.{ts,tsx,map,md}',
+ ],
+ extraResources: [
+ {
+ from: 'resources/',
+ to: 'resources/',
+ filter: ['**/*', '!.gitkeep'],
+ },
+ ],
+ asar: true,
+ // Only unpack binary directories - simpler and more reliable
+ asarUnpack: [
+ 'node_modules/videodb/bin/**',
+ 'node_modules/better-sqlite3/build/**',
+ 'node_modules/cloudflared/bin/**',
+ ],
+ npmRebuild: true,
+ nodeGypRebuild: false,
+ buildDependenciesFromSource: false,
+ mac: {
+ target: [
+ {
+ target: 'dmg',
+ arch: ['x64', 'arm64'],
+ },
+ {
+ target: 'zip',
+ arch: ['x64', 'arm64'],
+ },
+ ],
+ category: 'public.app-category.productivity',
+ icon: 'resources/icon.icns',
+ hardenedRuntime: true,
+ gatekeeperAssess: false,
+ entitlements: 'build/entitlements.mac.plist',
+ entitlementsInherit: 'build/entitlements.mac.plist',
+ extendInfo: {
+ NSMicrophoneUsageDescription: 'Meeting Copilot needs microphone access to record audio.',
+ NSCameraUsageDescription: 'Meeting Copilot needs camera access to record video.',
+ NSScreenCaptureUsageDescription:
+ 'Meeting Copilot needs screen capture access to record your screen.',
+ },
+ },
+ dmg: {
+ title: 'Meeting Copilot ${version}${arch}',
+ icon: 'resources/icon.icns',
+ window: {
+ width: 540,
+ height: 380,
+ },
+ contents: [
+ {
+ x: 140,
+ y: 200,
+ type: 'file',
+ },
+ {
+ x: 400,
+ y: 200,
+ type: 'link',
+ path: '/Applications',
+ },
+ ],
+ },
+ win: {
+ target: ['nsis'],
+ icon: 'resources/icon.ico',
+ },
+ linux: {
+ target: ['AppImage'],
+ category: 'Office',
+ },
+ beforePack: async (context) => {
+ const targetArch = context.arch;
+ const archName = getTargetArchName(targetArch);
+ console.log('Before pack - target arch:', targetArch, archName);
+
+ const cloudflaredBinDir = path.join(__dirname, 'node_modules', 'cloudflared', 'bin');
+ const cloudflaredPath = path.join(cloudflaredBinDir, 'cloudflared');
+
+ if (!fs.existsSync(cloudflaredBinDir)) {
+ console.warn('Cloudflared bin directory missing:', cloudflaredBinDir);
+ return;
+ }
+
+ // Clean up any leftover backups from previous builds to avoid bundling them.
+ for (const entry of fs.readdirSync(cloudflaredBinDir)) {
+ if (entry.startsWith('cloudflared') && entry.endsWith('.bak')) {
+ fs.unlinkSync(path.join(cloudflaredBinDir, entry));
+ }
+ }
+
+ let shouldDownload = true;
+ if (fs.existsSync(cloudflaredPath)) {
+ try {
+ const fileOutput = execSync(`file "${cloudflaredPath}"`).toString();
+ shouldDownload = !matchesCloudflaredArch(fileOutput, archName);
+ console.log('Existing cloudflared binary type:', fileOutput.trim());
+ } catch (error) {
+ console.warn('Failed to inspect cloudflared binary:', error.message);
+ }
+ }
+
+ if (!shouldDownload) {
+ console.log('Cloudflared binary matches target arch, skipping download');
+ return;
+ }
+
+ console.log('Downloading cloudflared binary for target:', archName);
+
+ const backupPath = path.join(cloudflaredBinDir, 'cloudflared.bak');
+ if (fs.existsSync(cloudflaredPath)) {
+ fs.renameSync(cloudflaredPath, backupPath);
+ console.log('Backed up existing cloudflared binary');
+ }
+
+ const downloadUrl = getCloudflaredDownloadUrl(archName);
+ const tgzPath = path.join(cloudflaredBinDir, `cloudflared-darwin-${archName}.tgz`);
+
+ try {
+ await downloadFile(downloadUrl, tgzPath);
+ console.log('Downloaded cloudflared archive:', downloadUrl);
+
+ execSync(`tar -xzf "${tgzPath}" -C "${cloudflaredBinDir}"`, { stdio: 'inherit' });
+ console.log('Extracted cloudflared binary');
+
+ fs.unlinkSync(tgzPath);
+
+ const fileOutput = execSync(`file "${cloudflaredPath}"`).toString();
+ console.log('New cloudflared binary type:', fileOutput.trim());
+
+ fs.chmodSync(cloudflaredPath, 0o755);
+
+ if (fs.existsSync(backupPath)) {
+ fs.unlinkSync(backupPath);
+ }
+ } catch (error) {
+ console.error('Failed to download cloudflared:', error.message);
+ if (fs.existsSync(backupPath)) {
+ fs.renameSync(backupPath, cloudflaredPath);
+ console.log('Restored previous cloudflared binary');
+ }
+ throw error;
+ }
+ },
+ afterPack: async (context) => {
+ const appOutDir = context.appOutDir;
+ const platform = context.packager.platform.name;
+
+ console.log('After pack:', appOutDir);
+ console.log('Platform:', platform);
+
+ if (platform === 'mac') {
+ const appName = context.packager.appInfo.productFilename;
+ const resourcesPath = path.join(appOutDir, `${appName}.app`, 'Contents', 'Resources');
+ const unpackedPath = path.join(resourcesPath, 'app.asar.unpacked');
+
+ const videodbBinPath = path.join(unpackedPath, 'node_modules', 'videodb', 'bin');
+ const cloudflaredBinPath = path.join(unpackedPath, 'node_modules', 'cloudflared', 'bin');
+
+ console.log('Checking videodb binaries at:', videodbBinPath);
+ console.log('Checking cloudflared binaries at:', cloudflaredBinPath);
+
+ const recorderPath = path.join(videodbBinPath, 'recorder');
+ const librecorderPath = path.join(videodbBinPath, 'librecorder.dylib');
+
+ if (fs.existsSync(recorderPath)) {
+ console.log('Found recorder binary');
+
+ try {
+ const fileOutput = execSync(`file "${recorderPath}"`).toString();
+ console.log('Recorder binary type:', fileOutput.trim());
+
+ const targetArch = context.arch;
+ const isArm64 = targetArch === 'arm64' || targetArch === 3; // arch 3 = arm64 in electron-builder
+ const isX64 = targetArch === 'x64' || targetArch === 1; // arch 1 = x64 in electron-builder
+
+ if (isArm64 && fileOutput.includes('x86_64') && !fileOutput.includes('arm64')) {
+ console.warn('WARNING: Recorder binary is x86_64 but building for arm64!');
+ console.warn('The binary will run under Rosetta 2, which may cause issues.');
+ console.warn('Consider requesting arm64 binaries from the videodb package maintainers.');
+ } else if (isX64 && fileOutput.includes('arm64') && !fileOutput.includes('x86_64')) {
+ console.warn('WARNING: Recorder binary is arm64 but building for x64!');
+ console.warn('This may cause compatibility issues.');
+ }
+
+ fs.chmodSync(recorderPath, 0o755);
+ console.log('Set recorder binary permissions to 755');
+ } catch (error) {
+ console.error('Error checking recorder binary:', error.message);
+ }
+ } else {
+ console.error('ERROR: Recorder binary not found at', recorderPath);
+ }
+
+ if (fs.existsSync(librecorderPath)) {
+ console.log('Found librecorder.dylib');
+ fs.chmodSync(librecorderPath, 0o644);
+ console.log('Set librecorder.dylib permissions to 644');
+ } else {
+ console.error('ERROR: librecorder.dylib not found at', librecorderPath);
+ }
+
+ const cloudflaredPath = path.join(cloudflaredBinPath, 'cloudflared');
+ if (fs.existsSync(cloudflaredPath)) {
+ console.log('Found cloudflared binary');
+
+ try {
+ const fileOutput = execSync(`file "${cloudflaredPath}"`).toString();
+ console.log('Cloudflared binary type:', fileOutput.trim());
+
+ fs.chmodSync(cloudflaredPath, 0o755);
+ console.log('Set cloudflared binary permissions to 755');
+ } catch (error) {
+ console.error('Error checking cloudflared binary:', error.message);
+ }
+ } else {
+ console.error('ERROR: cloudflared binary not found at', cloudflaredPath);
+ }
+
+ const betterSqlitePath = path.join(
+ unpackedPath,
+ 'node_modules',
+ 'better-sqlite3',
+ 'build',
+ 'Release',
+ 'better_sqlite3.node'
+ );
+ if (fs.existsSync(betterSqlitePath)) {
+ console.log('Found better-sqlite3 native module');
+ } else {
+ console.warn('WARNING: better-sqlite3 native module not found');
+ }
+ }
+ },
+};
+
+module.exports = config;
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..dcfffaa
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,12760 @@
+{
+ "name": "meeting-copilot",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "meeting-copilot",
+ "version": "1.0.0",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "dependencies": {
+ "@hono/node-server": "^1.14.1",
+ "@hono/trpc-server": "^0.3.4",
+ "@modelcontextprotocol/sdk": "^1.0.0",
+ "@radix-ui/react-accordion": "^1.2.12",
+ "@radix-ui/react-alert-dialog": "^1.1.15",
+ "@radix-ui/react-label": "^2.1.8",
+ "@radix-ui/react-select": "^2.2.6",
+ "@radix-ui/react-tabs": "^1.1.13",
+ "@tanstack/react-query": "^5.75.5",
+ "@trpc/client": "^11.1.2",
+ "@trpc/react-query": "^11.1.2",
+ "@trpc/server": "^11.1.2",
+ "@videodb/recorder": "^0.2.4",
+ "better-sqlite3": "^12.6.2",
+ "cloudflared": "^0.7.1",
+ "drizzle-orm": "^0.44.1",
+ "hono": "^4.7.5",
+ "openai": "^6.19.0",
+ "pino": "^9.6.0",
+ "pino-pretty": "^13.0.0",
+ "react": "^19.1.0",
+ "react-dom": "^19.1.0",
+ "react-markdown": "^10.1.0",
+ "uuid": "^11.1.0",
+ "videodb": "^0.2.0",
+ "zod": "^3.25.4",
+ "zustand": "^5.0.4"
+ },
+ "devDependencies": {
+ "@electron/rebuild": "^3.7.1",
+ "@types/better-sqlite3": "^7.6.13",
+ "@types/node": "^22.15.16",
+ "@types/react": "^19.1.4",
+ "@types/react-dom": "^19.1.3",
+ "@types/uuid": "^10.0.0",
+ "@vitejs/plugin-react": "^4.4.1",
+ "autoprefixer": "^10.4.21",
+ "class-variance-authority": "^0.7.1",
+ "clsx": "^2.1.1",
+ "concurrently": "^9.1.2",
+ "drizzle-kit": "^0.31.0",
+ "electron": "^34.3.0",
+ "electron-builder": "^25.1.8",
+ "lucide-react": "^0.510.0",
+ "postcss": "^8.5.3",
+ "tailwind-merge": "^3.2.0",
+ "tailwindcss": "^3.4.17",
+ "tailwindcss-animate": "^1.0.7",
+ "tsx": "^4.19.4",
+ "typescript": "^5.8.3",
+ "vite": "^6.3.5"
+ }
+ },
+ "node_modules/@alloc/quick-lru": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",
+ "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@babel/code-frame": {
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz",
+ "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.28.5",
+ "js-tokens": "^4.0.0",
+ "picocolors": "^1.1.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/compat-data": {
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz",
+ "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/core": {
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz",
+ "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@babel/code-frame": "^7.29.0",
+ "@babel/generator": "^7.29.0",
+ "@babel/helper-compilation-targets": "^7.28.6",
+ "@babel/helper-module-transforms": "^7.28.6",
+ "@babel/helpers": "^7.28.6",
+ "@babel/parser": "^7.29.0",
+ "@babel/template": "^7.28.6",
+ "@babel/traverse": "^7.29.0",
+ "@babel/types": "^7.29.0",
+ "@jridgewell/remapping": "^2.3.5",
+ "convert-source-map": "^2.0.0",
+ "debug": "^4.1.0",
+ "gensync": "^1.0.0-beta.2",
+ "json5": "^2.2.3",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/babel"
+ }
+ },
+ "node_modules/@babel/core/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/@babel/generator": {
+ "version": "7.29.1",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz",
+ "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.29.0",
+ "@babel/types": "^7.29.0",
+ "@jridgewell/gen-mapping": "^0.3.12",
+ "@jridgewell/trace-mapping": "^0.3.28",
+ "jsesc": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-compilation-targets": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz",
+ "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/compat-data": "^7.28.6",
+ "@babel/helper-validator-option": "^7.27.1",
+ "browserslist": "^4.24.0",
+ "lru-cache": "^5.1.1",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-compilation-targets/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/@babel/helper-globals": {
+ "version": "7.28.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz",
+ "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-module-imports": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz",
+ "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/traverse": "^7.28.6",
+ "@babel/types": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-module-transforms": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz",
+ "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-module-imports": "^7.28.6",
+ "@babel/helper-validator-identifier": "^7.28.5",
+ "@babel/traverse": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-plugin-utils": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz",
+ "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-string-parser": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
+ "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",
+ "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-option": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz",
+ "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helpers": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.6.tgz",
+ "integrity": "sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/template": "^7.28.6",
+ "@babel/types": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/parser": {
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.0.tgz",
+ "integrity": "sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.29.0"
+ },
+ "bin": {
+ "parser": "bin/babel-parser.js"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-react-jsx-self": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz",
+ "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-react-jsx-source": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz",
+ "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/template": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz",
+ "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.28.6",
+ "@babel/parser": "^7.28.6",
+ "@babel/types": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/traverse": {
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz",
+ "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.29.0",
+ "@babel/generator": "^7.29.0",
+ "@babel/helper-globals": "^7.28.0",
+ "@babel/parser": "^7.29.0",
+ "@babel/template": "^7.28.6",
+ "@babel/types": "^7.29.0",
+ "debug": "^4.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/types": {
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz",
+ "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-string-parser": "^7.27.1",
+ "@babel/helper-validator-identifier": "^7.28.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@develar/schema-utils": {
+ "version": "2.6.5",
+ "resolved": "https://registry.npmjs.org/@develar/schema-utils/-/schema-utils-2.6.5.tgz",
+ "integrity": "sha512-0cp4PsWQ/9avqTVMCtZ+GirikIA36ikvjtHweU4/j8yLtgObI0+JUPhYFScgwlteveGB1rt3Cm8UhN04XayDig==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ajv": "^6.12.0",
+ "ajv-keywords": "^3.4.1"
+ },
+ "engines": {
+ "node": ">= 8.9.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/@develar/schema-utils/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",
+ "peer": 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/@develar/schema-utils/node_modules/ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "ajv": "^6.9.1"
+ }
+ },
+ "node_modules/@develar/schema-utils/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"
+ },
+ "node_modules/@drizzle-team/brocli": {
+ "version": "0.10.2",
+ "resolved": "https://registry.npmjs.org/@drizzle-team/brocli/-/brocli-0.10.2.tgz",
+ "integrity": "sha512-z33Il7l5dKjUgGULTqBsQBQwckHh5AbIuxhdsIxDDiZAzBOrZO6q9ogcWC65kU382AfynTfgNumVcNIjuIua6w==",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
+ "node_modules/@electron/asar": {
+ "version": "3.4.1",
+ "resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.4.1.tgz",
+ "integrity": "sha512-i4/rNPRS84t0vSRa2HorerGRXWyF4vThfHesw0dmcWHp+cspK743UanA0suA5Q5y8kzY2y6YKrvbIUn69BCAiA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "commander": "^5.0.0",
+ "glob": "^7.1.6",
+ "minimatch": "^3.0.4"
+ },
+ "bin": {
+ "asar": "bin/asar.js"
+ },
+ "engines": {
+ "node": ">=10.12.0"
+ }
+ },
+ "node_modules/@electron/asar/node_modules/balanced-match": {
+ "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"
+ },
+ "node_modules/@electron/asar/node_modules/brace-expansion": {
+ "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/@electron/asar/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/@electron/asar/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"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/@electron/get": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@electron/get/-/get-2.0.3.tgz",
+ "integrity": "sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.1.1",
+ "env-paths": "^2.2.0",
+ "fs-extra": "^8.1.0",
+ "got": "^11.8.5",
+ "progress": "^2.0.3",
+ "semver": "^6.2.0",
+ "sumchecker": "^3.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "global-agent": "^3.0.0"
+ }
+ },
+ "node_modules/@electron/get/node_modules/fs-extra": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
+ "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^4.0.0",
+ "universalify": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=6 <7 || >=8"
+ }
+ },
+ "node_modules/@electron/get/node_modules/jsonfile": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
+ "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
+ "dev": true,
+ "license": "MIT",
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "node_modules/@electron/get/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/@electron/get/node_modules/universalify": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
+ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+ },
+ "node_modules/@electron/node-gyp": {
+ "version": "10.2.0-electron.1",
+ "resolved": "git+ssh://[email protected]/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2",
+ "integrity": "sha512-CrYo6TntjpoMO1SHjl5Pa/JoUsECNqNdB7Kx49WLQpWzPw53eEITJ2Hs9fh/ryUYDn4pxZz11StaBYBrLFJdqg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "env-paths": "^2.2.0",
+ "exponential-backoff": "^3.1.1",
+ "glob": "^8.1.0",
+ "graceful-fs": "^4.2.6",
+ "make-fetch-happen": "^10.2.1",
+ "nopt": "^6.0.0",
+ "proc-log": "^2.0.1",
+ "semver": "^7.3.5",
+ "tar": "^6.2.1",
+ "which": "^2.0.2"
+ },
+ "bin": {
+ "node-gyp": "bin/node-gyp.js"
+ },
+ "engines": {
+ "node": ">=12.13.0"
+ }
+ },
+ "node_modules/@electron/notarize": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-2.5.0.tgz",
+ "integrity": "sha512-jNT8nwH1f9X5GEITXaQ8IF/KdskvIkOFfB2CvwumsveVidzpSc+mvhhTMdAGSYF3O+Nq49lJ7y+ssODRXu06+A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.1.1",
+ "fs-extra": "^9.0.1",
+ "promise-retry": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
+ "node_modules/@electron/notarize/node_modules/fs-extra": {
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
+ "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "at-least-node": "^1.0.0",
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@electron/osx-sign": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.3.1.tgz",
+ "integrity": "sha512-BAfviURMHpmb1Yb50YbCxnOY0wfwaLXH5KJ4+80zS0gUkzDX3ec23naTlEqKsN+PwYn+a1cCzM7BJ4Wcd3sGzw==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "compare-version": "^0.1.2",
+ "debug": "^4.3.4",
+ "fs-extra": "^10.0.0",
+ "isbinaryfile": "^4.0.8",
+ "minimist": "^1.2.6",
+ "plist": "^3.0.5"
+ },
+ "bin": {
+ "electron-osx-flat": "bin/electron-osx-flat.js",
+ "electron-osx-sign": "bin/electron-osx-sign.js"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/@electron/osx-sign/node_modules/isbinaryfile": {
+ "version": "4.0.10",
+ "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz",
+ "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/gjtorikian/"
+ }
+ },
+ "node_modules/@electron/rebuild": {
+ "version": "3.7.2",
+ "resolved": "https://registry.npmjs.org/@electron/rebuild/-/rebuild-3.7.2.tgz",
+ "integrity": "sha512-19/KbIR/DAxbsCkiaGMXIdPnMCJLkcf8AvGnduJtWBs/CBwiAjY1apCqOLVxrXg+rtXFCngbXhBanWjxLUt1Mg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@electron/node-gyp": "git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2",
+ "@malept/cross-spawn-promise": "^2.0.0",
+ "chalk": "^4.0.0",
+ "debug": "^4.1.1",
+ "detect-libc": "^2.0.1",
+ "fs-extra": "^10.0.0",
+ "got": "^11.7.0",
+ "node-abi": "^3.45.0",
+ "node-api-version": "^0.2.0",
+ "ora": "^5.1.0",
+ "read-binary-file-arch": "^1.0.6",
+ "semver": "^7.3.5",
+ "tar": "^6.0.5",
+ "yargs": "^17.0.1"
+ },
+ "bin": {
+ "electron-rebuild": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=12.13.0"
+ }
+ },
+ "node_modules/@electron/universal": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@electron/universal/-/universal-2.0.1.tgz",
+ "integrity": "sha512-fKpv9kg4SPmt+hY7SVBnIYULE9QJl8L3sCfcBsnqbJwwBwAeTLokJ9TRt9y7bK0JAzIW2y78TVVjvnQEms/yyA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@electron/asar": "^3.2.7",
+ "@malept/cross-spawn-promise": "^2.0.0",
+ "debug": "^4.3.1",
+ "dir-compare": "^4.2.0",
+ "fs-extra": "^11.1.1",
+ "minimatch": "^9.0.3",
+ "plist": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=16.4"
+ }
+ },
+ "node_modules/@electron/universal/node_modules/balanced-match": {
+ "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"
+ },
+ "node_modules/@electron/universal/node_modules/brace-expansion": {
+ "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"
+ }
+ },
+ "node_modules/@electron/universal/node_modules/fs-extra": {
+ "version": "11.3.3",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.3.tgz",
+ "integrity": "sha512-VWSRii4t0AFm6ixFFmLLx1t7wS1gh+ckoa84aOeapGum0h+EZd1EhEumSB+ZdDLnEPuucsVB9oB7cxJHap6Afg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=14.14"
+ }
+ },
+ "node_modules/@electron/universal/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"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@esbuild-kit/core-utils/-/core-utils-3.3.2.tgz",
+ "integrity": "sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==",
+ "deprecated": "Merged into tsx: https://tsx.is",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "esbuild": "~0.18.20",
+ "source-map-support": "^0.5.21"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-arm": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz",
+ "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz",
+ "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz",
+ "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz",
+ "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz",
+ "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz",
+ "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/freebsd-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz",
+ "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-arm": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz",
+ "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz",
+ "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-ia32": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz",
+ "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-loong64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz",
+ "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-mips64el": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz",
+ "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-ppc64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz",
+ "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-riscv64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz",
+ "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-s390x": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz",
+ "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz",
+ "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/netbsd-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz",
+ "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/openbsd-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz",
+ "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/sunos-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz",
+ "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz",
+ "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-ia32": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz",
+ "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz",
+ "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/esbuild": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz",
+ "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "@esbuild/android-arm": "0.18.20",
+ "@esbuild/android-arm64": "0.18.20",
+ "@esbuild/android-x64": "0.18.20",
+ "@esbuild/darwin-arm64": "0.18.20",
+ "@esbuild/darwin-x64": "0.18.20",
+ "@esbuild/freebsd-arm64": "0.18.20",
+ "@esbuild/freebsd-x64": "0.18.20",
+ "@esbuild/linux-arm": "0.18.20",
+ "@esbuild/linux-arm64": "0.18.20",
+ "@esbuild/linux-ia32": "0.18.20",
+ "@esbuild/linux-loong64": "0.18.20",
+ "@esbuild/linux-mips64el": "0.18.20",
+ "@esbuild/linux-ppc64": "0.18.20",
+ "@esbuild/linux-riscv64": "0.18.20",
+ "@esbuild/linux-s390x": "0.18.20",
+ "@esbuild/linux-x64": "0.18.20",
+ "@esbuild/netbsd-x64": "0.18.20",
+ "@esbuild/openbsd-x64": "0.18.20",
+ "@esbuild/sunos-x64": "0.18.20",
+ "@esbuild/win32-arm64": "0.18.20",
+ "@esbuild/win32-ia32": "0.18.20",
+ "@esbuild/win32-x64": "0.18.20"
+ }
+ },
+ "node_modules/@esbuild-kit/esm-loader": {
+ "version": "2.6.5",
+ "resolved": "https://registry.npmjs.org/@esbuild-kit/esm-loader/-/esm-loader-2.6.5.tgz",
+ "integrity": "sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==",
+ "deprecated": "Merged into tsx: https://tsx.is",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@esbuild-kit/core-utils": "^3.3.2",
+ "get-tsconfig": "^4.7.0"
+ }
+ },
+ "node_modules/@esbuild/aix-ppc64": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "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"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz",
+ "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz",
+ "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz",
+ "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz",
+ "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openharmony-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz",
+ "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz",
+ "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "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"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz",
+ "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz",
+ "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@floating-ui/core": {
+ "version": "1.7.4",
+ "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.4.tgz",
+ "integrity": "sha512-C3HlIdsBxszvm5McXlB8PeOEWfBhcGBTZGkGlWc2U0KFY5IwG5OQEuQ8rq52DZmcHDlPLd+YFBK+cZcytwIFWg==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/utils": "^0.2.10"
+ }
+ },
+ "node_modules/@floating-ui/dom": {
+ "version": "1.7.5",
+ "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.5.tgz",
+ "integrity": "sha512-N0bD2kIPInNHUHehXhMke1rBGs1dwqvC9O9KYMyyjK7iXt7GAhnro7UlcuYcGdS/yYOlq0MAVgrow8IbWJwyqg==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/core": "^1.7.4",
+ "@floating-ui/utils": "^0.2.10"
+ }
+ },
+ "node_modules/@floating-ui/react-dom": {
+ "version": "2.1.7",
+ "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.7.tgz",
+ "integrity": "sha512-0tLRojf/1Go2JgEVm+3Frg9A3IW8bJgKgdO0BN5RkF//ufuz2joZM63Npau2ff3J6lUVYgDSNzNkR+aH3IVfjg==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/dom": "^1.7.5"
+ },
+ "peerDependencies": {
+ "react": ">=16.8.0",
+ "react-dom": ">=16.8.0"
+ }
+ },
+ "node_modules/@floating-ui/utils": {
+ "version": "0.2.10",
+ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.10.tgz",
+ "integrity": "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==",
+ "license": "MIT"
+ },
+ "node_modules/@gar/promisify": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz",
+ "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@hono/node-server": {
+ "version": "1.19.9",
+ "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.9.tgz",
+ "integrity": "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.14.1"
+ },
+ "peerDependencies": {
+ "hono": "^4"
+ }
+ },
+ "node_modules/@hono/trpc-server": {
+ "version": "0.3.4",
+ "resolved": "https://registry.npmjs.org/@hono/trpc-server/-/trpc-server-0.3.4.tgz",
+ "integrity": "sha512-xFOPjUPnII70FgicDzOJy1ufIoBTu8eF578zGiDOrYOrYN8CJe140s9buzuPkX+SwJRYK8LjEBHywqZtxdm8aA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16.0.0"
+ },
+ "peerDependencies": {
+ "@trpc/server": "^10.10.0 || >11.0.0-rc",
+ "hono": ">=4.*"
+ }
+ },
+ "node_modules/@isaacs/cliui": {
+ "version": "8.0.2",
+ "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",
+ "strip-ansi": "^7.0.1",
+ "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
+ "wrap-ansi": "^8.1.0",
+ "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@isaacs/cliui/node_modules/ansi-regex": {
+ "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"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ }
+ },
+ "node_modules/@isaacs/cliui/node_modules/ansi-styles": {
+ "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"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/@isaacs/cliui/node_modules/emoji-regex": {
+ "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"
+ },
+ "node_modules/@isaacs/cliui/node_modules/string-width": {
+ "version": "5.1.2",
+ "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",
+ "strip-ansi": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@isaacs/cliui/node_modules/strip-ansi": {
+ "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"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
+ }
+ },
+ "node_modules/@isaacs/cliui/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",
+ "strip-ansi": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/@isaacs/fs-minipass": {
+ "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"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@isaacs/fs-minipass/node_modules/minipass": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
+ "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
+ "license": "BlueOak-1.0.0",
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ }
+ },
+ "node_modules/@jridgewell/gen-mapping": {
+ "version": "0.3.13",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
+ "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.5.0",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ }
+ },
+ "node_modules/@jridgewell/remapping": {
+ "version": "2.3.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",
+ "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.5",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.2",
+ "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.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
+ "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "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"
+ }
+ },
+ "node_modules/@malept/cross-spawn-promise": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-2.0.0.tgz",
+ "integrity": "sha512-1DpKU0Z5ThltBwjNySMC14g0CkbyhCaz9FkhxqNsZI6uAPJXFS8cMXlBKo26FJ8ZuW6S9GCMcR9IO5k2X5/9Fg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/malept"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/subscription/pkg/npm-.malept-cross-spawn-promise?utm_medium=referral&utm_source=npm_fund"
+ }
+ ],
+ "license": "Apache-2.0",
+ "dependencies": {
+ "cross-spawn": "^7.0.1"
+ },
+ "engines": {
+ "node": ">= 12.13.0"
+ }
+ },
+ "node_modules/@malept/flatpak-bundler": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/@malept/flatpak-bundler/-/flatpak-bundler-0.4.0.tgz",
+ "integrity": "sha512-9QOtNffcOF/c1seMCDnjckb3R9WHcG34tky+FHpNKKCW0wc/scYLwMtO+ptyGUfMW0/b/n4qRiALlaFHc9Oj7Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.1.1",
+ "fs-extra": "^9.0.0",
+ "lodash": "^4.17.15",
+ "tmp-promise": "^3.0.2"
+ },
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
+ "node_modules/@malept/flatpak-bundler/node_modules/fs-extra": {
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
+ "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "at-least-node": "^1.0.0",
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@modelcontextprotocol/sdk": {
+ "version": "1.26.0",
+ "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.26.0.tgz",
+ "integrity": "sha512-Y5RmPncpiDtTXDbLKswIJzTqu2hyBKxTNsgKqKclDbhIgg1wgtf1fRuvxgTnRfcnxtvvgbIEcqUOzZrJ6iSReg==",
+ "license": "MIT",
+ "dependencies": {
+ "@hono/node-server": "^1.19.9",
+ "ajv": "^8.17.1",
+ "ajv-formats": "^3.0.1",
+ "content-type": "^1.0.5",
+ "cors": "^2.8.5",
+ "cross-spawn": "^7.0.5",
+ "eventsource": "^3.0.2",
+ "eventsource-parser": "^3.0.0",
+ "express": "^5.2.1",
+ "express-rate-limit": "^8.2.1",
+ "hono": "^4.11.4",
+ "jose": "^6.1.3",
+ "json-schema-typed": "^8.0.2",
+ "pkce-challenge": "^5.0.0",
+ "raw-body": "^3.0.0",
+ "zod": "^3.25 || ^4.0",
+ "zod-to-json-schema": "^3.25.1"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@cfworker/json-schema": "^4.1.1",
+ "zod": "^3.25 || ^4.0"
+ },
+ "peerDependenciesMeta": {
+ "@cfworker/json-schema": {
+ "optional": true
+ },
+ "zod": {
+ "optional": false
+ }
+ }
+ },
+ "node_modules/@nodelib/fs.scandir": {
+ "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"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.stat": {
+ "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"
+ }
+ },
+ "node_modules/@nodelib/fs.walk": {
+ "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"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@npmcli/fs": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz",
+ "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "@gar/promisify": "^1.1.3",
+ "semver": "^7.3.5"
+ },
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ }
+ },
+ "node_modules/@npmcli/move-file": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz",
+ "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==",
+ "deprecated": "This functionality has been moved to @npmcli/fs",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "mkdirp": "^1.0.4",
+ "rimraf": "^3.0.2"
+ },
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ }
+ },
+ "node_modules/@pinojs/redact": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/@pinojs/redact/-/redact-0.4.0.tgz",
+ "integrity": "sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg==",
+ "license": "MIT"
+ },
+ "node_modules/@pkgjs/parseargs": {
+ "version": "0.11.0",
+ "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"
+ }
+ },
+ "node_modules/@radix-ui/number": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.1.tgz",
+ "integrity": "sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g==",
+ "license": "MIT"
+ },
+ "node_modules/@radix-ui/primitive": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.3.tgz",
+ "integrity": "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==",
+ "license": "MIT"
+ },
+ "node_modules/@radix-ui/react-accordion": {
+ "version": "1.2.12",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.2.12.tgz",
+ "integrity": "sha512-T4nygeh9YE9dLRPhAHSeOZi7HBXo+0kYIPJXayZfvWOWA0+n3dESrZbjfDPUABkUNym6Hd+f2IR113To8D2GPA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collapsible": "1.1.12",
+ "@radix-ui/react-collection": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-controllable-state": "1.2.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-alert-dialog": {
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-alert-dialog/-/react-alert-dialog-1.1.15.tgz",
+ "integrity": "sha512-oTVLkEw5GpdRe29BqJ0LSDFWI3qu0vR1M0mUkOQWDIUnY/QIkLpgDMWuKxP94c2NAC2LGcgVhG1ImF3jkZ5wXw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-dialog": "1.1.15",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-slot": "1.2.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-arrow": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.7.tgz",
+ "integrity": "sha512-F+M1tLhO+mlQaOWspE8Wstg+z6PwxwRd8oQ8IXceWz92kfAmalTRf0EjrouQeo7QssEPfCn05B4Ihs1K9WQ/7w==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.1.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-collapsible": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.1.12.tgz",
+ "integrity": "sha512-Uu+mSh4agx2ib1uIGPP4/CKNULyajb3p92LsVXmH2EHVMTfZWpll88XJ0j4W0z3f8NK1eYl1+Mf/szHPmcHzyA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-controllable-state": "1.2.2",
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-collection": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.7.tgz",
+ "integrity": "sha512-Fh9rGN0MoI4ZFUNyfFVNU4y9LUz93u9/0K+yLgA2bwRojxM8JU1DyvvMBabnZPBgMWREAJvU2jjVzq+LrFUglw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-slot": "1.2.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-compose-refs": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz",
+ "integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-context": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.2.tgz",
+ "integrity": "sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dialog": {
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.15.tgz",
+ "integrity": "sha512-TCglVRtzlffRNxRMEyR36DGBLJpeusFcgMVD9PZEzAKnUs1lKCgX5u9BmC2Yg+LL9MgZDugFFs1Vl+Jp4t/PGw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-focus-guards": "1.1.3",
+ "@radix-ui/react-focus-scope": "1.1.7",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-slot": "1.2.3",
+ "@radix-ui/react-use-controllable-state": "1.2.2",
+ "aria-hidden": "^1.2.4",
+ "react-remove-scroll": "^2.6.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-direction": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.1.tgz",
+ "integrity": "sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dismissable-layer": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.11.tgz",
+ "integrity": "sha512-Nqcp+t5cTB8BinFkZgXiMJniQH0PsUt2k51FUhbdfeKvc4ACcG2uQniY/8+h1Yv6Kza4Q7lD7PQV0z0oicE0Mg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-escape-keydown": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-focus-guards": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.3.tgz",
+ "integrity": "sha512-0rFg/Rj2Q62NCm62jZw0QX7a3sz6QCQU0LpZdNrJX8byRGaGVTqbrW9jAoIAHyMQqsNpeZ81YgSizOt5WXq0Pw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-focus-scope": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.7.tgz",
+ "integrity": "sha512-t2ODlkXBQyn7jkl6TNaw/MtVEVvIGelJDCG41Okq/KwUsJBwQ4XVZsHAVUkK4mBv3ewiAS3PGuUWuY2BoK4ZUw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-id": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.1.tgz",
+ "integrity": "sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-label": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.1.8.tgz",
+ "integrity": "sha512-FmXs37I6hSBVDlO4y764TNz1rLgKwjJMQ0EGte6F3Cb3f4bIuHB/iLa/8I9VKkmOy+gNHq8rql3j686ACVV21A==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.1.4"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-label/node_modules/@radix-ui/react-primitive": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.4.tgz",
+ "integrity": "sha512-9hQc4+GNVtJAIEPEqlYqW5RiYdrr8ea5XQ0ZOnD6fgru+83kqT15mq2OCcbe8KnjRZl5vF3ks69AKz3kh1jrhg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-slot": "1.2.4"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-label/node_modules/@radix-ui/react-slot": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.4.tgz",
+ "integrity": "sha512-Jl+bCv8HxKnlTLVrcDE8zTMJ09R9/ukw4qBs/oZClOfoQk/cOTbDn+NceXfV7j09YPVQUryJPHurafcSg6EVKA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-popper": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.8.tgz",
+ "integrity": "sha512-0NJQ4LFFUuWkE7Oxf0htBKS6zLkkjBH+hM1uk7Ng705ReR8m/uelduy1DBo0PyBXPKVnBA6YBlU94MBGXrSBCw==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/react-dom": "^2.0.0",
+ "@radix-ui/react-arrow": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-layout-effect": "1.1.1",
+ "@radix-ui/react-use-rect": "1.1.1",
+ "@radix-ui/react-use-size": "1.1.1",
+ "@radix-ui/rect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-portal": {
+ "version": "1.1.9",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.9.tgz",
+ "integrity": "sha512-bpIxvq03if6UNwXZ+HTK71JLh4APvnXntDc6XOX8UVq4XQOVl7lwok0AvIl+b8zgCw3fSaVTZMpAPPagXbKmHQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-presence": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.5.tgz",
+ "integrity": "sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-primitive": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz",
+ "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-slot": "1.2.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-roving-focus": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.11.tgz",
+ "integrity": "sha512-7A6S9jSgm/S+7MdtNDSb+IU859vQqJ/QAtcYQcfFC6W8RS4IxIZDldLR0xqCFZ6DCyrQLjLPsxtTNch5jVA4lA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-controllable-state": "1.2.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-select": {
+ "version": "2.2.6",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.2.6.tgz",
+ "integrity": "sha512-I30RydO+bnn2PQztvo25tswPH+wFBjehVGtmagkU78yMdwTwVf12wnAOF+AeP8S2N8xD+5UPbGhkUfPyvT+mwQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/number": "1.1.1",
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-focus-guards": "1.1.3",
+ "@radix-ui/react-focus-scope": "1.1.7",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-popper": "1.2.8",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-slot": "1.2.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-controllable-state": "1.2.2",
+ "@radix-ui/react-use-layout-effect": "1.1.1",
+ "@radix-ui/react-use-previous": "1.1.1",
+ "@radix-ui/react-visually-hidden": "1.2.3",
+ "aria-hidden": "^1.2.4",
+ "react-remove-scroll": "^2.6.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-slot": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
+ "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-tabs": {
+ "version": "1.1.13",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.13.tgz",
+ "integrity": "sha512-7xdcatg7/U+7+Udyoj2zodtI9H/IIopqo+YOIcZOq1nJwXWBZ9p8xiu5llXlekDbZkca79a/fozEYQXIA4sW6A==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-roving-focus": "1.1.11",
+ "@radix-ui/react-use-controllable-state": "1.2.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-callback-ref": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.1.tgz",
+ "integrity": "sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-controllable-state": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.2.tgz",
+ "integrity": "sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-effect-event": "0.0.2",
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-effect-event": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.2.tgz",
+ "integrity": "sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-escape-keydown": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.1.tgz",
+ "integrity": "sha512-Il0+boE7w/XebUHyBjroE+DbByORGR9KKmITzbR7MyQ4akpORYP/ZmbhAr0DG7RmmBqoOnZdy2QlvajJ2QA59g==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-callback-ref": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-layout-effect": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz",
+ "integrity": "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-previous": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.1.tgz",
+ "integrity": "sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-rect": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.1.tgz",
+ "integrity": "sha512-QTYuDesS0VtuHNNvMh+CjlKJ4LJickCMUAqjlE3+j8w+RlRpwyX3apEQKGFzbZGdo7XNG1tXa+bQqIE7HIXT2w==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/rect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-size": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.1.tgz",
+ "integrity": "sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-visually-hidden": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.2.3.tgz",
+ "integrity": "sha512-pzJq12tEaaIhqjbzpCuv/OypJY/BPavOofm+dbab+MHLajy277+1lLm6JFcGgF5eskJ6mquGirhXY2GD/8u8Ug==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.1.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/rect": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.1.tgz",
+ "integrity": "sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==",
+ "license": "MIT"
+ },
+ "node_modules/@rolldown/pluginutils": {
+ "version": "1.0.0-beta.27",
+ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz",
+ "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@rollup/rollup-android-arm-eabi": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.57.1.tgz",
+ "integrity": "sha512-A6ehUVSiSaaliTxai040ZpZ2zTevHYbvu/lDoeAteHI8QnaosIzm4qwtezfRg1jOYaUmnzLX1AOD6Z+UJjtifg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-android-arm64": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.57.1.tgz",
+ "integrity": "sha512-dQaAddCY9YgkFHZcFNS/606Exo8vcLHwArFZ7vxXq4rigo2bb494/xKMMwRRQW6ug7Js6yXmBZhSBRuBvCCQ3w==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-arm64": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.57.1.tgz",
+ "integrity": "sha512-crNPrwJOrRxagUYeMn/DZwqN88SDmwaJ8Cvi/TN1HnWBU7GwknckyosC2gd0IqYRsHDEnXf328o9/HC6OkPgOg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-x64": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.57.1.tgz",
+ "integrity": "sha512-Ji8g8ChVbKrhFtig5QBV7iMaJrGtpHelkB3lsaKzadFBe58gmjfGXAOfI5FV0lYMH8wiqsxKQ1C9B0YTRXVy4w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-arm64": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.57.1.tgz",
+ "integrity": "sha512-R+/WwhsjmwodAcz65guCGFRkMb4gKWTcIeLy60JJQbXrJ97BOXHxnkPFrP+YwFlaS0m+uWJTstrUA9o+UchFug==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-x64": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.57.1.tgz",
+ "integrity": "sha512-IEQTCHeiTOnAUC3IDQdzRAGj3jOAYNr9kBguI7MQAAZK3caezRrg0GxAb6Hchg4lxdZEI5Oq3iov/w/hnFWY9Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.57.1.tgz",
+ "integrity": "sha512-F8sWbhZ7tyuEfsmOxwc2giKDQzN3+kuBLPwwZGyVkLlKGdV1nvnNwYD0fKQ8+XS6hp9nY7B+ZeK01EBUE7aHaw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.57.1.tgz",
+ "integrity": "sha512-rGfNUfn0GIeXtBP1wL5MnzSj98+PZe/AXaGBCRmT0ts80lU5CATYGxXukeTX39XBKsxzFpEeK+Mrp9faXOlmrw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-gnu": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.57.1.tgz",
+ "integrity": "sha512-MMtej3YHWeg/0klK2Qodf3yrNzz6CGjo2UntLvk2RSPlhzgLvYEB3frRvbEF2wRKh1Z2fDIg9KRPe1fawv7C+g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-musl": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.57.1.tgz",
+ "integrity": "sha512-1a/qhaaOXhqXGpMFMET9VqwZakkljWHLmZOX48R0I/YLbhdxr1m4gtG1Hq7++VhVUmf+L3sTAf9op4JlhQ5u1Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-gnu": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.57.1.tgz",
+ "integrity": "sha512-QWO6RQTZ/cqYtJMtxhkRkidoNGXc7ERPbZN7dVW5SdURuLeVU7lwKMpo18XdcmpWYd0qsP1bwKPf7DNSUinhvA==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-musl": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.57.1.tgz",
+ "integrity": "sha512-xpObYIf+8gprgWaPP32xiN5RVTi/s5FCR+XMXSKmhfoJjrpRAjCuuqQXyxUa/eJTdAE6eJ+KDKaoEqjZQxh3Gw==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.57.1.tgz",
+ "integrity": "sha512-4BrCgrpZo4hvzMDKRqEaW1zeecScDCR+2nZ86ATLhAoJ5FQ+lbHVD3ttKe74/c7tNT9c6F2viwB3ufwp01Oh2w==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-musl": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.57.1.tgz",
+ "integrity": "sha512-NOlUuzesGauESAyEYFSe3QTUguL+lvrN1HtwEEsU2rOwdUDeTMJdO5dUYl/2hKf9jWydJrO9OL/XSSf65R5+Xw==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.57.1.tgz",
+ "integrity": "sha512-ptA88htVp0AwUUqhVghwDIKlvJMD/fmL/wrQj99PRHFRAG6Z5nbWoWG4o81Nt9FT+IuqUQi+L31ZKAFeJ5Is+A==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-musl": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.57.1.tgz",
+ "integrity": "sha512-S51t7aMMTNdmAMPpBg7OOsTdn4tySRQvklmL3RpDRyknk87+Sp3xaumlatU+ppQ+5raY7sSTcC2beGgvhENfuw==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-s390x-gnu": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.57.1.tgz",
+ "integrity": "sha512-Bl00OFnVFkL82FHbEqy3k5CUCKH6OEJL54KCyx2oqsmZnFTR8IoNqBF+mjQVcRCT5sB6yOvK8A37LNm/kPJiZg==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-gnu": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.57.1.tgz",
+ "integrity": "sha512-ABca4ceT4N+Tv/GtotnWAeXZUZuM/9AQyCyKYyKnpk4yoA7QIAuBt6Hkgpw8kActYlew2mvckXkvx0FfoInnLg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-musl": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.57.1.tgz",
+ "integrity": "sha512-HFps0JeGtuOR2convgRRkHCekD7j+gdAuXM+/i6kGzQtFhlCtQkpwtNzkNj6QhCDp7DRJ7+qC/1Vg2jt5iSOFw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-openbsd-x64": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.57.1.tgz",
+ "integrity": "sha512-H+hXEv9gdVQuDTgnqD+SQffoWoc0Of59AStSzTEj/feWTBAnSfSD3+Dql1ZruJQxmykT/JVY0dE8Ka7z0DH1hw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-openharmony-arm64": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.57.1.tgz",
+ "integrity": "sha512-4wYoDpNg6o/oPximyc/NG+mYUejZrCU2q+2w6YZqrAs2UcNUChIZXjtafAiiZSUc7On8v5NyNj34Kzj/Ltk6dQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-arm64-msvc": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.57.1.tgz",
+ "integrity": "sha512-O54mtsV/6LW3P8qdTcamQmuC990HDfR71lo44oZMZlXU4tzLrbvTii87Ni9opq60ds0YzuAlEr/GNwuNluZyMQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-ia32-msvc": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.57.1.tgz",
+ "integrity": "sha512-P3dLS+IerxCT/7D2q2FYcRdWRl22dNbrbBEtxdWhXrfIMPP9lQhb5h4Du04mdl5Woq05jVCDPCMF7Ub0NAjIew==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-gnu": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.57.1.tgz",
+ "integrity": "sha512-VMBH2eOOaKGtIJYleXsi2B8CPVADrh+TyNxJ4mWPnKfLB/DBUmzW+5m1xUrcwWoMfSLagIRpjUFeW5CO5hyciQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-msvc": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.57.1.tgz",
+ "integrity": "sha512-mxRFDdHIWRxg3UfIIAwCm6NzvxG0jDX/wBN6KsQFTvKFqqg9vTrWUE68qEjHt19A5wwx5X5aUi2zuZT7YR0jrA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@sindresorhus/is": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
+ "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/is?sponsor=1"
+ }
+ },
+ "node_modules/@szmarczak/http-timer": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz",
+ "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "defer-to-connect": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@tanstack/query-core": {
+ "version": "5.90.20",
+ "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.90.20.tgz",
+ "integrity": "sha512-OMD2HLpNouXEfZJWcKeVKUgQ5n+n3A2JFmBaScpNDUqSrQSjiveC7dKMe53uJUg1nDG16ttFPz2xfilz6i2uVg==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ }
+ },
+ "node_modules/@tanstack/react-query": {
+ "version": "5.90.21",
+ "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.90.21.tgz",
+ "integrity": "sha512-0Lu6y5t+tvlTJMTO7oh5NSpJfpg/5D41LlThfepTixPYkJ0sE2Jj0m0f6yYqujBwIXlId87e234+MxG3D3g7kg==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@tanstack/query-core": "5.90.20"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ },
+ "peerDependencies": {
+ "react": "^18 || ^19"
+ }
+ },
+ "node_modules/@tootallnate/once": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",
+ "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@trpc/client": {
+ "version": "11.10.0",
+ "resolved": "https://registry.npmjs.org/@trpc/client/-/client-11.10.0.tgz",
+ "integrity": "sha512-h0s2AwDtuhS8INRb4hlo4z3RKCkarWqlOy+3ffJgrlDxzzW6aLUN+9nDrcN4huPje1Em15tbCOqhIc6oaKYTRw==",
+ "funding": [
+ "https://trpc.io/sponsor"
+ ],
+ "license": "MIT",
+ "peer": true,
+ "peerDependencies": {
+ "@trpc/server": "11.10.0",
+ "typescript": ">=5.7.2"
+ }
+ },
+ "node_modules/@trpc/react-query": {
+ "version": "11.10.0",
+ "resolved": "https://registry.npmjs.org/@trpc/react-query/-/react-query-11.10.0.tgz",
+ "integrity": "sha512-SKLpwEMU32mpDTCc3msMxb0fx113x4Jsiw0/t+ENY6AtyvhvDMRF1bpWtoNyY6zpX5wN4JCQMhHef8k0T1rJIw==",
+ "funding": [
+ "https://trpc.io/sponsor"
+ ],
+ "license": "MIT",
+ "peerDependencies": {
+ "@tanstack/react-query": "^5.80.3",
+ "@trpc/client": "11.10.0",
+ "@trpc/server": "11.10.0",
+ "react": ">=18.2.0",
+ "typescript": ">=5.7.2"
+ }
+ },
+ "node_modules/@trpc/server": {
+ "version": "11.10.0",
+ "resolved": "https://registry.npmjs.org/@trpc/server/-/server-11.10.0.tgz",
+ "integrity": "sha512-zZjTrR6He61e5TiT7e/bQqab/jRcXBZM8Fg78Yoo8uh5pz60dzzbYuONNUCOkafv5ppXVMms4NHYfNZgzw50vg==",
+ "funding": [
+ "https://trpc.io/sponsor"
+ ],
+ "license": "MIT",
+ "peer": true,
+ "peerDependencies": {
+ "typescript": ">=5.7.2"
+ }
+ },
+ "node_modules/@types/babel__core": {
+ "version": "7.20.5",
+ "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
+ "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.20.7",
+ "@babel/types": "^7.20.7",
+ "@types/babel__generator": "*",
+ "@types/babel__template": "*",
+ "@types/babel__traverse": "*"
+ }
+ },
+ "node_modules/@types/babel__generator": {
+ "version": "7.27.0",
+ "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz",
+ "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.0.0"
+ }
+ },
+ "node_modules/@types/babel__template": {
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz",
+ "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.1.0",
+ "@babel/types": "^7.0.0"
+ }
+ },
+ "node_modules/@types/babel__traverse": {
+ "version": "7.28.0",
+ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz",
+ "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.28.2"
+ }
+ },
+ "node_modules/@types/better-sqlite3": {
+ "version": "7.6.13",
+ "resolved": "https://registry.npmjs.org/@types/better-sqlite3/-/better-sqlite3-7.6.13.tgz",
+ "integrity": "sha512-NMv9ASNARoKksWtsq/SHakpYAYnhBrQgGD8zkLYk/jaK8jUGn08CfEdTRgYhMypUQAfzSP8W6gNLe0q19/t4VA==",
+ "devOptional": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/cacheable-request": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz",
+ "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/http-cache-semantics": "*",
+ "@types/keyv": "^3.1.4",
+ "@types/node": "*",
+ "@types/responselike": "^1.0.0"
+ }
+ },
+ "node_modules/@types/debug": {
+ "version": "4.1.12",
+ "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz",
+ "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/ms": "*"
+ }
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
+ "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
+ "license": "MIT"
+ },
+ "node_modules/@types/estree-jsx": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.5.tgz",
+ "integrity": "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "*"
+ }
+ },
+ "node_modules/@types/fs-extra": {
+ "version": "9.0.13",
+ "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz",
+ "integrity": "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/hast": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz",
+ "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "*"
+ }
+ },
+ "node_modules/@types/http-cache-semantics": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz",
+ "integrity": "sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/keyv": {
+ "version": "3.1.4",
+ "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz",
+ "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/mdast": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz",
+ "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "*"
+ }
+ },
+ "node_modules/@types/ms": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz",
+ "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==",
+ "license": "MIT"
+ },
+ "node_modules/@types/node": {
+ "version": "22.19.11",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.11.tgz",
+ "integrity": "sha512-BH7YwL6rA93ReqeQS1c4bsPpcfOmJasG+Fkr6Y59q83f9M1WcBRHR2vM+P9eOisYRcN3ujQoiZY8uk5W+1WL8w==",
+ "devOptional": true,
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~6.21.0"
+ }
+ },
+ "node_modules/@types/plist": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/@types/plist/-/plist-3.0.5.tgz",
+ "integrity": "sha512-E6OCaRmAe4WDmWNsL/9RMqdkkzDCY1etutkflWk4c+AcjDU07Pcz1fQwTX0TQz+Pxqn9i4L1TU3UFpjnrcDgxA==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@types/node": "*",
+ "xmlbuilder": ">=11.0.1"
+ }
+ },
+ "node_modules/@types/react": {
+ "version": "19.2.14",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz",
+ "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "csstype": "^3.2.2"
+ }
+ },
+ "node_modules/@types/react-dom": {
+ "version": "19.2.3",
+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz",
+ "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==",
+ "devOptional": true,
+ "license": "MIT",
+ "peer": true,
+ "peerDependencies": {
+ "@types/react": "^19.2.0"
+ }
+ },
+ "node_modules/@types/responselike": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz",
+ "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/unist": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
+ "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==",
+ "license": "MIT"
+ },
+ "node_modules/@types/uuid": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-10.0.0.tgz",
+ "integrity": "sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/verror": {
+ "version": "1.10.11",
+ "resolved": "https://registry.npmjs.org/@types/verror/-/verror-1.10.11.tgz",
+ "integrity": "sha512-RlDm9K7+o5stv0Co8i8ZRGxDbrTxhJtgjqjFyVh/tXQyl/rYtTKlnTvZ88oSTeYREWurwx20Js4kTuKCsFkUtg==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true
+ },
+ "node_modules/@types/yauzl": {
+ "version": "2.10.3",
+ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz",
+ "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@ungap/structured-clone": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz",
+ "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==",
+ "license": "ISC"
+ },
+ "node_modules/@videodb/recorder": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/@videodb/recorder/-/recorder-0.2.4.tgz",
+ "integrity": "sha512-vkeZAehXE3IsHzOEZR6KHCJUtJ/8dCpIKh+Eww1hbcXUudwCglMkOwvCtSzDkiKZU638sUivvtOAWetTRBUJ9A==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "dependencies": {
+ "tar": "^7.4.3",
+ "uuid": "^11.0.3"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@videodb/recorder/node_modules/chownr": {
+ "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"
+ }
+ },
+ "node_modules/@videodb/recorder/node_modules/minipass": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
+ "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
+ "license": "BlueOak-1.0.0",
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ }
+ },
+ "node_modules/@videodb/recorder/node_modules/minizlib": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz",
+ "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==",
+ "license": "MIT",
+ "dependencies": {
+ "minipass": "^7.1.2"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/@videodb/recorder/node_modules/tar": {
+ "version": "7.5.9",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.9.tgz",
+ "integrity": "sha512-BTLcK0xsDh2+PUe9F6c2TlRp4zOOBMTkoQHQIWSIzI0R7KG46uEwq4OPk2W7bZcprBMsuaeFsqwYr7pjh6CuHg==",
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "@isaacs/fs-minipass": "^4.0.0",
+ "chownr": "^3.0.0",
+ "minipass": "^7.1.2",
+ "minizlib": "^3.1.0",
+ "yallist": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@videodb/recorder/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"
+ }
+ },
+ "node_modules/@vitejs/plugin-react": {
+ "version": "4.7.0",
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz",
+ "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/core": "^7.28.0",
+ "@babel/plugin-transform-react-jsx-self": "^7.27.1",
+ "@babel/plugin-transform-react-jsx-source": "^7.27.1",
+ "@rolldown/pluginutils": "1.0.0-beta.27",
+ "@types/babel__core": "^7.20.5",
+ "react-refresh": "^0.17.0"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "peerDependencies": {
+ "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
+ }
+ },
+ "node_modules/@xmldom/xmldom": {
+ "version": "0.8.11",
+ "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.11.tgz",
+ "integrity": "sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/7zip-bin": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/7zip-bin/-/7zip-bin-5.2.0.tgz",
+ "integrity": "sha512-ukTPVhqG4jNzMro2qA9HSCSSVJN3aN7tlb+hfqYCt3ER0yWroeA2VR38MNrOHLQ/cVj+DaIMad0kFCtWWowh/A==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/abbrev": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/accepts": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
+ "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-types": "^3.0.0",
+ "negotiator": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/agent-base": {
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",
+ "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/agentkeepalive": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz",
+ "integrity": "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "humanize-ms": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 8.0.0"
+ }
+ },
+ "node_modules/aggregate-error": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
+ "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "clean-stack": "^2.0.0",
+ "indent-string": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ajv": {
+ "version": "8.18.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz",
+ "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==",
+ "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/ajv-formats": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz",
+ "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "ajv": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "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==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/any-promise": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
+ "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "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"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/app-builder-bin": {
+ "version": "5.0.0-alpha.10",
+ "resolved": "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-5.0.0-alpha.10.tgz",
+ "integrity": "sha512-Ev4jj3D7Bo+O0GPD2NMvJl+PGiBAfS7pUGawntBNpCbxtpncfUixqFj9z9Jme7V7s3LBGqsWZZP54fxBX3JKJw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/app-builder-lib": {
+ "version": "25.1.8",
+ "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-25.1.8.tgz",
+ "integrity": "sha512-pCqe7dfsQFBABC1jeKZXQWhGcCPF3rPCXDdfqVKjIeWBcXzyC1iOWZdfFhGl+S9MyE/k//DFmC6FzuGAUudNDg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@develar/schema-utils": "~2.6.5",
+ "@electron/notarize": "2.5.0",
+ "@electron/osx-sign": "1.3.1",
+ "@electron/rebuild": "3.6.1",
+ "@electron/universal": "2.0.1",
+ "@malept/flatpak-bundler": "^0.4.0",
+ "@types/fs-extra": "9.0.13",
+ "async-exit-hook": "^2.0.1",
+ "bluebird-lst": "^1.0.9",
+ "builder-util": "25.1.7",
+ "builder-util-runtime": "9.2.10",
+ "chromium-pickle-js": "^0.2.0",
+ "config-file-ts": "0.2.8-rc1",
+ "debug": "^4.3.4",
+ "dotenv": "^16.4.5",
+ "dotenv-expand": "^11.0.6",
+ "ejs": "^3.1.8",
+ "electron-publish": "25.1.7",
+ "form-data": "^4.0.0",
+ "fs-extra": "^10.1.0",
+ "hosted-git-info": "^4.1.0",
+ "is-ci": "^3.0.0",
+ "isbinaryfile": "^5.0.0",
+ "js-yaml": "^4.1.0",
+ "json5": "^2.2.3",
+ "lazy-val": "^1.0.5",
+ "minimatch": "^10.0.0",
+ "resedit": "^1.7.0",
+ "sanitize-filename": "^1.6.3",
+ "semver": "^7.3.8",
+ "tar": "^6.1.12",
+ "temp-file": "^3.4.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "dmg-builder": "25.1.8",
+ "electron-builder-squirrel-windows": "25.1.8"
+ }
+ },
+ "node_modules/app-builder-lib/node_modules/@electron/rebuild": {
+ "version": "3.6.1",
+ "resolved": "https://registry.npmjs.org/@electron/rebuild/-/rebuild-3.6.1.tgz",
+ "integrity": "sha512-f6596ZHpEq/YskUd8emYvOUne89ij8mQgjYFA5ru25QwbrRO+t1SImofdDv7kKOuWCmVOuU5tvfkbgGxIl3E/w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@malept/cross-spawn-promise": "^2.0.0",
+ "chalk": "^4.0.0",
+ "debug": "^4.1.1",
+ "detect-libc": "^2.0.1",
+ "fs-extra": "^10.0.0",
+ "got": "^11.7.0",
+ "node-abi": "^3.45.0",
+ "node-api-version": "^0.2.0",
+ "node-gyp": "^9.0.0",
+ "ora": "^5.1.0",
+ "read-binary-file-arch": "^1.0.6",
+ "semver": "^7.3.5",
+ "tar": "^6.0.5",
+ "yargs": "^17.0.1"
+ },
+ "bin": {
+ "electron-rebuild": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=12.13.0"
+ }
+ },
+ "node_modules/aproba": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.1.0.tgz",
+ "integrity": "sha512-tLIEcj5GuR2RSTnxNKdkK0dJ/GrC7P38sUkiDmDuHfsHmbagTFAxDVIBltoklXEVIQ/f14IL8IMJ5pn9Hez1Ew==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/archiver": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.2.tgz",
+ "integrity": "sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "archiver-utils": "^2.1.0",
+ "async": "^3.2.4",
+ "buffer-crc32": "^0.2.1",
+ "readable-stream": "^3.6.0",
+ "readdir-glob": "^1.1.2",
+ "tar-stream": "^2.2.0",
+ "zip-stream": "^4.1.0"
+ },
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/archiver-utils": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz",
+ "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "glob": "^7.1.4",
+ "graceful-fs": "^4.2.0",
+ "lazystream": "^1.0.0",
+ "lodash.defaults": "^4.2.0",
+ "lodash.difference": "^4.5.0",
+ "lodash.flatten": "^4.4.0",
+ "lodash.isplainobject": "^4.0.6",
+ "lodash.union": "^4.6.0",
+ "normalize-path": "^3.0.0",
+ "readable-stream": "^2.0.0"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/archiver-utils/node_modules/balanced-match": {
+ "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"
+ },
+ "node_modules/archiver-utils/node_modules/brace-expansion": {
+ "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/archiver-utils/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/archiver-utils/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"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/archiver-utils/node_modules/readable-stream": {
+ "version": "2.3.8",
+ "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",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "node_modules/archiver-utils/node_modules/safe-buffer": {
+ "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"
+ },
+ "node_modules/archiver-utils/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"
+ }
+ },
+ "node_modules/are-we-there-yet": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz",
+ "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==",
+ "deprecated": "This package is no longer supported.",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "delegates": "^1.0.0",
+ "readable-stream": "^3.6.0"
+ },
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ }
+ },
+ "node_modules/arg": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
+ "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "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==",
+ "dev": true,
+ "license": "Python-2.0"
+ },
+ "node_modules/aria-hidden": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.6.tgz",
+ "integrity": "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/assert-plus": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/astral-regex": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
+ "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/async": {
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",
+ "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/async-exit-hook": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/async-exit-hook/-/async-exit-hook-2.0.1.tgz",
+ "integrity": "sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "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"
+ },
+ "node_modules/at-least-node": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
+ "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==",
+ "dev": true,
+ "license": "ISC",
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+ },
+ "node_modules/atomic-sleep": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz",
+ "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/autoprefixer": {
+ "version": "10.4.24",
+ "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.24.tgz",
+ "integrity": "sha512-uHZg7N9ULTVbutaIsDRoUkoS8/h3bdsmVJYZ5l3wv8Cp/6UIIoRDm90hZ+BwxUj/hGBEzLxdHNSKuFpn8WOyZw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/autoprefixer"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "browserslist": "^4.28.1",
+ "caniuse-lite": "^1.0.30001766",
+ "fraction.js": "^5.3.4",
+ "picocolors": "^1.1.1",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "bin": {
+ "autoprefixer": "bin/autoprefixer"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
+ "node_modules/axios": {
+ "version": "1.13.5",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz",
+ "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==",
+ "license": "MIT",
+ "dependencies": {
+ "follow-redirects": "^1.15.11",
+ "form-data": "^4.0.5",
+ "proxy-from-env": "^1.1.0"
+ }
+ },
+ "node_modules/bail": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz",
+ "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/balanced-match": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.3.tgz",
+ "integrity": "sha512-1pHv8LX9CpKut1Zp4EXey7Z8OfH11ONNH6Dhi2WDUt31VVZFXZzKwXcysBgqSumFCmR+0dqjMK5v5JiFHzi0+g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "20 || >=22"
+ }
+ },
+ "node_modules/base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/baseline-browser-mapping": {
+ "version": "2.10.0",
+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.0.tgz",
+ "integrity": "sha512-lIyg0szRfYbiy67j9KN8IyeD7q7hcmqnJ1ddWmNt19ItGpNN64mnllmxUNFIOdOm6by97jlL6wfpTTJrmnjWAA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "baseline-browser-mapping": "dist/cli.cjs"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/better-sqlite3": {
+ "version": "12.6.2",
+ "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-12.6.2.tgz",
+ "integrity": "sha512-8VYKM3MjCa9WcaSAI3hzwhmyHVlH8tiGFwf0RlTsZPWJ1I5MkzjiudCo4KC4DxOaL/53A5B1sI/IbldNFDbsKA==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "bindings": "^1.5.0",
+ "prebuild-install": "^7.1.1"
+ },
+ "engines": {
+ "node": "20.x || 22.x || 23.x || 24.x || 25.x"
+ }
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.3.0",
+ "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"
+ },
+ "funding": {
+ "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==",
+ "license": "MIT",
+ "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==",
+ "license": "MIT",
+ "dependencies": {
+ "buffer": "^5.5.0",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0"
+ }
+ },
+ "node_modules/bluebird": {
+ "version": "3.7.2",
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
+ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/bluebird-lst": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/bluebird-lst/-/bluebird-lst-1.0.9.tgz",
+ "integrity": "sha512-7B1Rtx82hjnSD4PGLAjVWeYH3tHAcVUmChh85a3lltKQm6FresXh9ErQo6oAv6CqxttczC3/kEg8SY5NluPuUw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "bluebird": "^3.5.5"
+ }
+ },
+ "node_modules/body-parser": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz",
+ "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "^3.1.2",
+ "content-type": "^1.0.5",
+ "debug": "^4.4.3",
+ "http-errors": "^2.0.0",
+ "iconv-lite": "^0.7.0",
+ "on-finished": "^2.4.1",
+ "qs": "^6.14.1",
+ "raw-body": "^3.0.1",
+ "type-is": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/body-parser/node_modules/iconv-lite": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz",
+ "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==",
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "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.",
+ "dev": true,
+ "license": "MIT",
+ "optional": true
+ },
+ "node_modules/brace-expansion": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.2.tgz",
+ "integrity": "sha512-Pdk8c9poy+YhOgVWw1JNN22/HcivgKWwpxKq04M/jTmHyCZn12WPJebZxdjSa5TmBqISrUSgNYU3eRORljfCCw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^4.0.2"
+ },
+ "engines": {
+ "node": "20 || >=22"
+ }
+ },
+ "node_modules/braces": {
+ "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"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/browserslist": {
+ "version": "4.28.1",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz",
+ "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "baseline-browser-mapping": "^2.9.0",
+ "caniuse-lite": "^1.0.30001759",
+ "electron-to-chromium": "^1.5.263",
+ "node-releases": "^2.0.27",
+ "update-browserslist-db": "^1.2.0"
+ },
+ "bin": {
+ "browserslist": "cli.js"
+ },
+ "engines": {
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
+ }
+ },
+ "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"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.1.13"
+ }
+ },
+ "node_modules/buffer-crc32": {
+ "version": "0.2.13",
+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
+ "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/buffer-from": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/builder-util": {
+ "version": "25.1.7",
+ "resolved": "https://registry.npmjs.org/builder-util/-/builder-util-25.1.7.tgz",
+ "integrity": "sha512-7jPjzBwEGRbwNcep0gGNpLXG9P94VA3CPAZQCzxkFXiV2GMQKlziMbY//rXPI7WKfhsvGgFXjTcXdBEwgXw9ww==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/debug": "^4.1.6",
+ "7zip-bin": "~5.2.0",
+ "app-builder-bin": "5.0.0-alpha.10",
+ "bluebird-lst": "^1.0.9",
+ "builder-util-runtime": "9.2.10",
+ "chalk": "^4.1.2",
+ "cross-spawn": "^7.0.3",
+ "debug": "^4.3.4",
+ "fs-extra": "^10.1.0",
+ "http-proxy-agent": "^7.0.0",
+ "https-proxy-agent": "^7.0.0",
+ "is-ci": "^3.0.0",
+ "js-yaml": "^4.1.0",
+ "source-map-support": "^0.5.19",
+ "stat-mode": "^1.0.0",
+ "temp-file": "^3.4.0"
+ }
+ },
+ "node_modules/builder-util-runtime": {
+ "version": "9.2.10",
+ "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-9.2.10.tgz",
+ "integrity": "sha512-6p/gfG1RJSQeIbz8TK5aPNkoztgY1q5TgmGFMAXcY8itsGW6Y2ld1ALsZ5UJn8rog7hKF3zHx5iQbNQ8uLcRlw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.4",
+ "sax": "^1.2.4"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/cacache": {
+ "version": "16.1.3",
+ "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz",
+ "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "@npmcli/fs": "^2.1.0",
+ "@npmcli/move-file": "^2.0.0",
+ "chownr": "^2.0.0",
+ "fs-minipass": "^2.1.0",
+ "glob": "^8.0.1",
+ "infer-owner": "^1.0.4",
+ "lru-cache": "^7.7.1",
+ "minipass": "^3.1.6",
+ "minipass-collect": "^1.0.2",
+ "minipass-flush": "^1.0.5",
+ "minipass-pipeline": "^1.2.4",
+ "mkdirp": "^1.0.4",
+ "p-map": "^4.0.0",
+ "promise-inflight": "^1.0.1",
+ "rimraf": "^3.0.2",
+ "ssri": "^9.0.0",
+ "tar": "^6.1.11",
+ "unique-filename": "^2.0.0"
+ },
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ }
+ },
+ "node_modules/cacache/node_modules/lru-cache": {
+ "version": "7.18.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",
+ "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",
+ "dev": true,
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/cacheable-lookup": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz",
+ "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.6.0"
+ }
+ },
+ "node_modules/cacheable-request": {
+ "version": "7.0.4",
+ "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz",
+ "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "clone-response": "^1.0.2",
+ "get-stream": "^5.1.0",
+ "http-cache-semantics": "^4.0.0",
+ "keyv": "^4.0.0",
+ "lowercase-keys": "^2.0.0",
+ "normalize-url": "^6.0.1",
+ "responselike": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/call-bind-apply-helpers": {
+ "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"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/call-bound": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "get-intrinsic": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/camelcase-css": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz",
+ "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/caniuse-lite": {
+ "version": "1.0.30001770",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001770.tgz",
+ "integrity": "sha512-x/2CLQ1jHENRbHg5PSId2sXq1CIO1CISvwWAj027ltMVG2UNgW+w9oH2+HzgEIRFembL8bUlXtfbBHR1fCg2xw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "CC-BY-4.0"
+ },
+ "node_modules/ccount": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz",
+ "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/character-entities": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz",
+ "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/character-entities-html4": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz",
+ "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/character-entities-legacy": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz",
+ "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/character-reference-invalid": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz",
+ "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "3.6.0",
+ "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",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/chokidar/node_modules/glob-parent": {
+ "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"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/chownr": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
+ "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
+ "dev": true,
+ "license": "ISC",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/chromium-pickle-js": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz",
+ "integrity": "sha512-1R5Fho+jBq0DDydt+/vHWj5KJNJCKdARKOCwZUen84I5BreWoLqRLANH1U87eJy1tiASPtMnGqJJq0ZsLoRPOw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/ci-info": {
+ "version": "3.9.0",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz",
+ "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/sibiraj-s"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/class-variance-authority": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz",
+ "integrity": "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "clsx": "^2.1.1"
+ },
+ "funding": {
+ "url": "https://polar.sh/cva"
+ }
+ },
+ "node_modules/clean-stack": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
+ "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/cli-cursor": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
+ "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "restore-cursor": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/cli-spinners": {
+ "version": "2.9.2",
+ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz",
+ "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/cli-truncate": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz",
+ "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "slice-ansi": "^3.0.0",
+ "string-width": "^4.2.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/cliui": {
+ "version": "8.0.1",
+ "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",
+ "wrap-ansi": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/clone": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
+ "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/clone-response": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz",
+ "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "mimic-response": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/cloudflared": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/cloudflared/-/cloudflared-0.7.1.tgz",
+ "integrity": "sha512-jJn1Gu9Tf4qnIu8tfiHZ25Hs8rNcRYSVf8zAd97wvYdOCzftm1CTs1S/RPhijjGi8gUT1p9yzfDi9zYlU/0RwA==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "cloudflared": "lib/cloudflared.js"
+ }
+ },
+ "node_modules/clsx": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",
+ "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "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==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "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==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/color-support": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
+ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "color-support": "bin.js"
+ }
+ },
+ "node_modules/colorette": {
+ "version": "2.0.20",
+ "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz",
+ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==",
+ "license": "MIT"
+ },
+ "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"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/comma-separated-tokens": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz",
+ "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/commander": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz",
+ "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/compare-version": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/compare-version/-/compare-version-0.1.2.tgz",
+ "integrity": "sha512-pJDh5/4wrEnXX/VWRZvruAGHkzKdr46z11OlTPN+VrATlWWhSKewNCJ1futCO5C7eJB3nPMFZA1LeYtcFboZ2A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/compress-commons": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.2.tgz",
+ "integrity": "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "buffer-crc32": "^0.2.13",
+ "crc32-stream": "^4.0.2",
+ "normalize-path": "^3.0.0",
+ "readable-stream": "^3.6.0"
+ },
+ "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,
+ "license": "MIT"
+ },
+ "node_modules/concurrently": {
+ "version": "9.2.1",
+ "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.1.tgz",
+ "integrity": "sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "chalk": "4.1.2",
+ "rxjs": "7.8.2",
+ "shell-quote": "1.8.3",
+ "supports-color": "8.1.1",
+ "tree-kill": "1.2.2",
+ "yargs": "17.7.2"
+ },
+ "bin": {
+ "conc": "dist/bin/concurrently.js",
+ "concurrently": "dist/bin/concurrently.js"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/open-cli-tools/concurrently?sponsor=1"
+ }
+ },
+ "node_modules/concurrently/node_modules/supports-color": {
+ "version": "8.1.1",
+ "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"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/supports-color?sponsor=1"
+ }
+ },
+ "node_modules/config-file-ts": {
+ "version": "0.2.8-rc1",
+ "resolved": "https://registry.npmjs.org/config-file-ts/-/config-file-ts-0.2.8-rc1.tgz",
+ "integrity": "sha512-GtNECbVI82bT4RiDIzBSVuTKoSHufnU7Ce7/42bkWZJZFLjmDF2WBpVsvRkhKCfKBnTBb3qZrBwPpFBU/Myvhg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "glob": "^10.3.12",
+ "typescript": "^5.4.3"
+ }
+ },
+ "node_modules/config-file-ts/node_modules/balanced-match": {
+ "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"
+ },
+ "node_modules/config-file-ts/node_modules/brace-expansion": {
+ "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"
+ }
+ },
+ "node_modules/config-file-ts/node_modules/glob": {
+ "version": "10.5.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz",
+ "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==",
+ "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "foreground-child": "^3.1.0",
+ "jackspeak": "^3.1.2",
+ "minimatch": "^9.0.4",
+ "minipass": "^7.1.2",
+ "package-json-from-dist": "^1.0.0",
+ "path-scurry": "^1.11.1"
+ },
+ "bin": {
+ "glob": "dist/esm/bin.mjs"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/config-file-ts/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"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/config-file-ts/node_modules/minipass": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
+ "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
+ "dev": true,
+ "license": "BlueOak-1.0.0",
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ }
+ },
+ "node_modules/console-control-strings": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
+ "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/content-disposition": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz",
+ "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/convert-source-map": {
+ "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"
+ },
+ "node_modules/cookie": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie-signature": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",
+ "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.6.0"
+ }
+ },
+ "node_modules/core-util-is": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/cors": {
+ "version": "2.8.6",
+ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz",
+ "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==",
+ "license": "MIT",
+ "dependencies": {
+ "object-assign": "^4",
+ "vary": "^1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/crc": {
+ "version": "3.8.0",
+ "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz",
+ "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "buffer": "^5.1.0"
+ }
+ },
+ "node_modules/crc-32": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
+ "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "crc32": "bin/crc32.njs"
+ },
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/crc32-stream": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.3.tgz",
+ "integrity": "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "crc-32": "^1.2.0",
+ "readable-stream": "^3.4.0"
+ },
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/cssesc": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
+ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "cssesc": "bin/cssesc"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/csstype": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
+ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
+ "license": "MIT"
+ },
+ "node_modules/dateformat": {
+ "version": "4.6.3",
+ "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz",
+ "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==",
+ "license": "MIT",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/decode-named-character-reference": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.3.0.tgz",
+ "integrity": "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==",
+ "license": "MIT",
+ "dependencies": {
+ "character-entities": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "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==",
+ "license": "MIT",
+ "dependencies": {
+ "mimic-response": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/decompress-response/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==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "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==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/defaults": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz",
+ "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "clone": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/defer-to-connect": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",
+ "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "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==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "es-define-property": "^1.0.0",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/define-properties": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",
+ "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "define-data-property": "^1.0.1",
+ "has-property-descriptors": "^1.0.0",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/delayed-stream": {
+ "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/delegates": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
+ "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/dequal": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
+ "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/detect-libc": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "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==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true
+ },
+ "node_modules/detect-node-es": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz",
+ "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==",
+ "license": "MIT"
+ },
+ "node_modules/devlop": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz",
+ "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==",
+ "license": "MIT",
+ "dependencies": {
+ "dequal": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/didyoumean": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
+ "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
+ "node_modules/dir-compare": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/dir-compare/-/dir-compare-4.2.0.tgz",
+ "integrity": "sha512-2xMCmOoMrdQIPHdsTawECdNPwlVFB9zGcz3kuhmBO6U3oU+UQjsue0i8ayLKpgBcm+hcXPMVSGUN9d+pvJ6+VQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "minimatch": "^3.0.5",
+ "p-limit": "^3.1.0 "
+ }
+ },
+ "node_modules/dir-compare/node_modules/balanced-match": {
+ "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"
+ },
+ "node_modules/dir-compare/node_modules/brace-expansion": {
+ "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/dir-compare/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"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/dlv": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz",
+ "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/dmg-builder": {
+ "version": "25.1.8",
+ "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-25.1.8.tgz",
+ "integrity": "sha512-NoXo6Liy2heSklTI5OIZbCgXC1RzrDQsZkeEwXhdOro3FT1VBOvbubvscdPnjVuQ4AMwwv61oaH96AbiYg9EnQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "app-builder-lib": "25.1.8",
+ "builder-util": "25.1.7",
+ "builder-util-runtime": "9.2.10",
+ "fs-extra": "^10.1.0",
+ "iconv-lite": "^0.6.2",
+ "js-yaml": "^4.1.0"
+ },
+ "optionalDependencies": {
+ "dmg-license": "^1.0.11"
+ }
+ },
+ "node_modules/dmg-license": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/dmg-license/-/dmg-license-1.0.11.tgz",
+ "integrity": "sha512-ZdzmqwKmECOWJpqefloC5OJy1+WZBBse5+MR88z9g9Zn4VY+WYUkAyojmhzJckH5YbbZGcYIuGAkY5/Ys5OM2Q==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "dependencies": {
+ "@types/plist": "^3.0.1",
+ "@types/verror": "^1.10.3",
+ "ajv": "^6.10.0",
+ "crc": "^3.8.0",
+ "iconv-corefoundation": "^1.1.7",
+ "plist": "^3.0.4",
+ "smart-buffer": "^4.0.2",
+ "verror": "^1.10.0"
+ },
+ "bin": {
+ "dmg-license": "bin/dmg-license.js"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/dmg-license/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",
+ "optional": 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/dmg-license/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",
+ "optional": true
+ },
+ "node_modules/dotenv": {
+ "version": "16.6.1",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",
+ "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
+ "node_modules/dotenv-expand": {
+ "version": "11.0.7",
+ "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.7.tgz",
+ "integrity": "sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "dotenv": "^16.4.5"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
+ "node_modules/drizzle-kit": {
+ "version": "0.31.9",
+ "resolved": "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.31.9.tgz",
+ "integrity": "sha512-GViD3IgsXn7trFyBUUHyTFBpH/FsHTxYJ66qdbVggxef4UBPHRYxQaRzYLTuekYnk9i5FIEL9pbBIwMqX/Uwrg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@drizzle-team/brocli": "^0.10.2",
+ "@esbuild-kit/esm-loader": "^2.5.5",
+ "esbuild": "^0.25.4",
+ "esbuild-register": "^3.5.0"
+ },
+ "bin": {
+ "drizzle-kit": "bin.cjs"
+ }
+ },
+ "node_modules/drizzle-orm": {
+ "version": "0.44.7",
+ "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.44.7.tgz",
+ "integrity": "sha512-quIpnYznjU9lHshEOAYLoZ9s3jweleHlZIAWR/jX9gAWNg/JhQ1wj0KGRf7/Zm+obRrYd9GjPVJg790QY9N5AQ==",
+ "license": "Apache-2.0",
+ "peerDependencies": {
+ "@aws-sdk/client-rds-data": ">=3",
+ "@cloudflare/workers-types": ">=4",
+ "@electric-sql/pglite": ">=0.2.0",
+ "@libsql/client": ">=0.10.0",
+ "@libsql/client-wasm": ">=0.10.0",
+ "@neondatabase/serverless": ">=0.10.0",
+ "@op-engineering/op-sqlite": ">=2",
+ "@opentelemetry/api": "^1.4.1",
+ "@planetscale/database": ">=1.13",
+ "@prisma/client": "*",
+ "@tidbcloud/serverless": "*",
+ "@types/better-sqlite3": "*",
+ "@types/pg": "*",
+ "@types/sql.js": "*",
+ "@upstash/redis": ">=1.34.7",
+ "@vercel/postgres": ">=0.8.0",
+ "@xata.io/client": "*",
+ "better-sqlite3": ">=7",
+ "bun-types": "*",
+ "expo-sqlite": ">=14.0.0",
+ "gel": ">=2",
+ "knex": "*",
+ "kysely": "*",
+ "mysql2": ">=2",
+ "pg": ">=8",
+ "postgres": ">=3",
+ "sql.js": ">=1",
+ "sqlite3": ">=5"
+ },
+ "peerDependenciesMeta": {
+ "@aws-sdk/client-rds-data": {
+ "optional": true
+ },
+ "@cloudflare/workers-types": {
+ "optional": true
+ },
+ "@electric-sql/pglite": {
+ "optional": true
+ },
+ "@libsql/client": {
+ "optional": true
+ },
+ "@libsql/client-wasm": {
+ "optional": true
+ },
+ "@neondatabase/serverless": {
+ "optional": true
+ },
+ "@op-engineering/op-sqlite": {
+ "optional": true
+ },
+ "@opentelemetry/api": {
+ "optional": true
+ },
+ "@planetscale/database": {
+ "optional": true
+ },
+ "@prisma/client": {
+ "optional": true
+ },
+ "@tidbcloud/serverless": {
+ "optional": true
+ },
+ "@types/better-sqlite3": {
+ "optional": true
+ },
+ "@types/pg": {
+ "optional": true
+ },
+ "@types/sql.js": {
+ "optional": true
+ },
+ "@upstash/redis": {
+ "optional": true
+ },
+ "@vercel/postgres": {
+ "optional": true
+ },
+ "@xata.io/client": {
+ "optional": true
+ },
+ "better-sqlite3": {
+ "optional": true
+ },
+ "bun-types": {
+ "optional": true
+ },
+ "expo-sqlite": {
+ "optional": true
+ },
+ "gel": {
+ "optional": true
+ },
+ "knex": {
+ "optional": true
+ },
+ "kysely": {
+ "optional": true
+ },
+ "mysql2": {
+ "optional": true
+ },
+ "pg": {
+ "optional": true
+ },
+ "postgres": {
+ "optional": true
+ },
+ "prisma": {
+ "optional": true
+ },
+ "sql.js": {
+ "optional": true
+ },
+ "sqlite3": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/dunder-proto": {
+ "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",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/eastasianwidth": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
+ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+ "license": "MIT"
+ },
+ "node_modules/ejs": {
+ "version": "3.1.10",
+ "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz",
+ "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "jake": "^10.8.5"
+ },
+ "bin": {
+ "ejs": "bin/cli.js"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/electron": {
+ "version": "34.5.8",
+ "resolved": "https://registry.npmjs.org/electron/-/electron-34.5.8.tgz",
+ "integrity": "sha512-vxLD65mabTzYmEVa9KceMHM0+zO+vqgrhcyNVlmTd0IGV5J7XZ8v/qElm0o4YQ4wPeq7olZkUjZkBQQEdr23/g==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "dependencies": {
+ "@electron/get": "^2.0.0",
+ "@types/node": "^20.9.0",
+ "extract-zip": "^2.0.1"
+ },
+ "bin": {
+ "electron": "cli.js"
+ },
+ "engines": {
+ "node": ">= 12.20.55"
+ }
+ },
+ "node_modules/electron-builder": {
+ "version": "25.1.8",
+ "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-25.1.8.tgz",
+ "integrity": "sha512-poRgAtUHHOnlzZnc9PK4nzG53xh74wj2Jy7jkTrqZ0MWPoHGh1M2+C//hGeYdA+4K8w4yiVCNYoLXF7ySj2Wig==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "app-builder-lib": "25.1.8",
+ "builder-util": "25.1.7",
+ "builder-util-runtime": "9.2.10",
+ "chalk": "^4.1.2",
+ "dmg-builder": "25.1.8",
+ "fs-extra": "^10.1.0",
+ "is-ci": "^3.0.0",
+ "lazy-val": "^1.0.5",
+ "simple-update-notifier": "2.0.0",
+ "yargs": "^17.6.2"
+ },
+ "bin": {
+ "electron-builder": "cli.js",
+ "install-app-deps": "install-app-deps.js"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/electron-builder-squirrel-windows": {
+ "version": "25.1.8",
+ "resolved": "https://registry.npmjs.org/electron-builder-squirrel-windows/-/electron-builder-squirrel-windows-25.1.8.tgz",
+ "integrity": "sha512-2ntkJ+9+0GFP6nAISiMabKt6eqBB0kX1QqHNWFWAXgi0VULKGisM46luRFpIBiU3u/TDmhZMM8tzvo2Abn3ayg==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "app-builder-lib": "25.1.8",
+ "archiver": "^5.3.1",
+ "builder-util": "25.1.7",
+ "fs-extra": "^10.1.0"
+ }
+ },
+ "node_modules/electron-publish": {
+ "version": "25.1.7",
+ "resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-25.1.7.tgz",
+ "integrity": "sha512-+jbTkR9m39eDBMP4gfbqglDd6UvBC7RLh5Y0MhFSsc6UkGHj9Vj9TWobxevHYMMqmoujL11ZLjfPpMX+Pt6YEg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/fs-extra": "^9.0.11",
+ "builder-util": "25.1.7",
+ "builder-util-runtime": "9.2.10",
+ "chalk": "^4.1.2",
+ "fs-extra": "^10.1.0",
+ "lazy-val": "^1.0.5",
+ "mime": "^2.5.2"
+ }
+ },
+ "node_modules/electron-to-chromium": {
+ "version": "1.5.286",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.286.tgz",
+ "integrity": "sha512-9tfDXhJ4RKFNerfjdCcZfufu49vg620741MNs26a9+bhLThdB+plgMeou98CAaHu/WATj2iHOOHTp1hWtABj2A==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/electron/node_modules/@types/node": {
+ "version": "20.19.33",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.33.tgz",
+ "integrity": "sha512-Rs1bVAIdBs5gbTIKza/tgpMuG1k3U/UMJLWecIMxNdJFDMzcM5LOiLVRYh3PilWEYDIeUDv7bpiHPLPsbydGcw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~6.21.0"
+ }
+ },
+ "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"
+ },
+ "node_modules/encodeurl": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/encoding": {
+ "version": "0.1.13",
+ "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
+ "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "iconv-lite": "^0.6.2"
+ }
+ },
+ "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==",
+ "license": "MIT",
+ "dependencies": {
+ "once": "^1.4.0"
+ }
+ },
+ "node_modules/env-paths": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
+ "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/err-code": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz",
+ "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/es-define-property": {
+ "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"
+ }
+ },
+ "node_modules/es-errors": {
+ "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"
+ }
+ },
+ "node_modules/es-object-atoms": {
+ "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"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-set-tostringtag": {
+ "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",
+ "has-tostringtag": "^1.0.2",
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "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==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true
+ },
+ "node_modules/esbuild": {
+ "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",
+ "peer": true,
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@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/esbuild-register": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/esbuild-register/-/esbuild-register-3.6.0.tgz",
+ "integrity": "sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.4"
+ },
+ "peerDependencies": {
+ "esbuild": ">=0.12 <1"
+ }
+ },
+ "node_modules/escalade": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+ "license": "MIT"
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/estree-util-is-identifier-name": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz",
+ "integrity": "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/eventsource": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz",
+ "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==",
+ "license": "MIT",
+ "dependencies": {
+ "eventsource-parser": "^3.0.1"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/eventsource-parser": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz",
+ "integrity": "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "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==",
+ "license": "(MIT OR WTFPL)",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/exponential-backoff": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.3.tgz",
+ "integrity": "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
+ "node_modules/express": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
+ "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "accepts": "^2.0.0",
+ "body-parser": "^2.2.1",
+ "content-disposition": "^1.0.0",
+ "content-type": "^1.0.5",
+ "cookie": "^0.7.1",
+ "cookie-signature": "^1.2.1",
+ "debug": "^4.4.0",
+ "depd": "^2.0.0",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "etag": "^1.8.1",
+ "finalhandler": "^2.1.0",
+ "fresh": "^2.0.0",
+ "http-errors": "^2.0.0",
+ "merge-descriptors": "^2.0.0",
+ "mime-types": "^3.0.0",
+ "on-finished": "^2.4.1",
+ "once": "^1.4.0",
+ "parseurl": "^1.3.3",
+ "proxy-addr": "^2.0.7",
+ "qs": "^6.14.0",
+ "range-parser": "^1.2.1",
+ "router": "^2.2.0",
+ "send": "^1.1.0",
+ "serve-static": "^2.2.0",
+ "statuses": "^2.0.1",
+ "type-is": "^2.0.1",
+ "vary": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/express-rate-limit": {
+ "version": "8.2.1",
+ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.2.1.tgz",
+ "integrity": "sha512-PCZEIEIxqwhzw4KF0n7QF4QqruVTcF73O5kFKUnGOyjbCCgizBBiFaYpd/fnBLUMPw/BWw9OsiN7GgrNYr7j6g==",
+ "license": "MIT",
+ "dependencies": {
+ "ip-address": "10.0.1"
+ },
+ "engines": {
+ "node": ">= 16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/express-rate-limit"
+ },
+ "peerDependencies": {
+ "express": ">= 4.11"
+ }
+ },
+ "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"
+ },
+ "node_modules/extract-zip": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
+ "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "debug": "^4.1.1",
+ "get-stream": "^5.1.0",
+ "yauzl": "^2.10.0"
+ },
+ "bin": {
+ "extract-zip": "cli.js"
+ },
+ "engines": {
+ "node": ">= 10.17.0"
+ },
+ "optionalDependencies": {
+ "@types/yauzl": "^2.9.1"
+ }
+ },
+ "node_modules/extsprintf": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz",
+ "integrity": "sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==",
+ "dev": true,
+ "engines": [
+ "node >=0.6.0"
+ ],
+ "license": "MIT",
+ "optional": true
+ },
+ "node_modules/fast-copy": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-4.0.2.tgz",
+ "integrity": "sha512-ybA6PDXIXOXivLJK/z9e+Otk7ve13I4ckBvGO5I2RRmBU1gMHLVDJYEuJYhGwez7YNlYji2M2DvVU+a9mSFDlw==",
+ "license": "MIT"
+ },
+ "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"
+ },
+ "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",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.8"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ },
+ "node_modules/fast-glob/node_modules/glob-parent": {
+ "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"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/fast-json-stable-stringify": {
+ "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"
+ },
+ "node_modules/fast-safe-stringify": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz",
+ "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==",
+ "license": "MIT"
+ },
+ "node_modules/fast-uri": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz",
+ "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fastify"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/fastify"
+ }
+ ],
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/fastq": {
+ "version": "1.20.1",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz",
+ "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "node_modules/fd-slicer": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
+ "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "pend": "~1.2.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==",
+ "license": "MIT"
+ },
+ "node_modules/filelist": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz",
+ "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "minimatch": "^5.0.1"
+ }
+ },
+ "node_modules/filelist/node_modules/balanced-match": {
+ "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"
+ },
+ "node_modules/filelist/node_modules/brace-expansion": {
+ "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"
+ }
+ },
+ "node_modules/filelist/node_modules/minimatch": {
+ "version": "5.1.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"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "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"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/finalhandler": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",
+ "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.0",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "on-finished": "^2.4.1",
+ "parseurl": "^1.3.3",
+ "statuses": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/follow-redirects": {
+ "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"
+ },
+ "peerDependenciesMeta": {
+ "debug": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/foreground-child": {
+ "version": "3.3.1",
+ "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"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/foreground-child/node_modules/signal-exit": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
+ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
+ "dev": true,
+ "license": "ISC",
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/form-data": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
+ "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
+ "license": "MIT",
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "es-set-tostringtag": "^2.1.0",
+ "hasown": "^2.0.2",
+ "mime-types": "^2.1.12"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/form-data/node_modules/mime-db": {
+ "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"
+ }
+ },
+ "node_modules/form-data/node_modules/mime-types": {
+ "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"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fraction.js": {
+ "version": "5.3.4",
+ "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz",
+ "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/rawify"
+ }
+ },
+ "node_modules/fresh": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
+ "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "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==",
+ "license": "MIT"
+ },
+ "node_modules/fs-extra": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/fs-minipass": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
+ "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "minipass": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "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"
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/function-bind": {
+ "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"
+ }
+ },
+ "node_modules/gauge": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz",
+ "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==",
+ "deprecated": "This package is no longer supported.",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "aproba": "^1.0.3 || ^2.0.0",
+ "color-support": "^1.1.3",
+ "console-control-strings": "^1.1.0",
+ "has-unicode": "^2.0.1",
+ "signal-exit": "^3.0.7",
+ "string-width": "^4.2.3",
+ "strip-ansi": "^6.0.1",
+ "wide-align": "^1.1.5"
+ },
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ }
+ },
+ "node_modules/gensync": {
+ "version": "1.0.0-beta.2",
+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/get-caller-file": {
+ "version": "2.0.5",
+ "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-intrinsic": {
+ "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",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "function-bind": "^1.1.2",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-nonce": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz",
+ "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/get-proto": {
+ "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"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/get-stream": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
+ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "pump": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/get-tsconfig": {
+ "version": "4.13.6",
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.6.tgz",
+ "integrity": "sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "resolve-pkg-maps": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
+ }
+ },
+ "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==",
+ "license": "MIT"
+ },
+ "node_modules/glob": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
+ "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
+ "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^5.0.1",
+ "once": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "6.0.2",
+ "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"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/glob/node_modules/balanced-match": {
+ "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"
+ },
+ "node_modules/glob/node_modules/brace-expansion": {
+ "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"
+ }
+ },
+ "node_modules/glob/node_modules/minimatch": {
+ "version": "5.1.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"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/global-agent": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz",
+ "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "optional": true,
+ "dependencies": {
+ "boolean": "^3.0.1",
+ "es6-error": "^4.1.1",
+ "matcher": "^3.0.0",
+ "roarr": "^2.15.3",
+ "semver": "^7.3.2",
+ "serialize-error": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=10.0"
+ }
+ },
+ "node_modules/globalthis": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",
+ "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "define-properties": "^1.2.1",
+ "gopd": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/gopd": {
+ "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"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/got": {
+ "version": "11.8.6",
+ "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz",
+ "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@sindresorhus/is": "^4.0.0",
+ "@szmarczak/http-timer": "^4.0.5",
+ "@types/cacheable-request": "^6.0.1",
+ "@types/responselike": "^1.0.0",
+ "cacheable-lookup": "^5.0.3",
+ "cacheable-request": "^7.0.2",
+ "decompress-response": "^6.0.0",
+ "http2-wrapper": "^1.0.0-beta.5.2",
+ "lowercase-keys": "^2.0.0",
+ "p-cancelable": "^2.0.0",
+ "responselike": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10.19.0"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/got?sponsor=1"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "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"
+ },
+ "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==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/has-property-descriptors": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
+ "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "es-define-property": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "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"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-tostringtag": {
+ "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"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-unicode": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
+ "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/hasown": {
+ "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"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/hast-util-to-jsx-runtime": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz",
+ "integrity": "sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "@types/unist": "^3.0.0",
+ "comma-separated-tokens": "^2.0.0",
+ "devlop": "^1.0.0",
+ "estree-util-is-identifier-name": "^3.0.0",
+ "hast-util-whitespace": "^3.0.0",
+ "mdast-util-mdx-expression": "^2.0.0",
+ "mdast-util-mdx-jsx": "^3.0.0",
+ "mdast-util-mdxjs-esm": "^2.0.0",
+ "property-information": "^7.0.0",
+ "space-separated-tokens": "^2.0.0",
+ "style-to-js": "^1.0.0",
+ "unist-util-position": "^5.0.0",
+ "vfile-message": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/hast-util-whitespace": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz",
+ "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/help-me": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/help-me/-/help-me-5.0.0.tgz",
+ "integrity": "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==",
+ "license": "MIT"
+ },
+ "node_modules/hono": {
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.0.tgz",
+ "integrity": "sha512-NekXntS5M94pUfiVZ8oXXK/kkri+5WpX2/Ik+LVsl+uvw+soj4roXIsPqO+XsWrAw20mOzaXOZf3Q7PfB9A/IA==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=16.9.0"
+ }
+ },
+ "node_modules/hosted-git-info": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz",
+ "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/hosted-git-info/node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/hosted-git-info/node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/html-url-attributes": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.1.tgz",
+ "integrity": "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/http-cache-semantics": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz",
+ "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==",
+ "dev": true,
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/http-errors": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
+ "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
+ "license": "MIT",
+ "dependencies": {
+ "depd": "~2.0.0",
+ "inherits": "~2.0.4",
+ "setprototypeof": "~1.2.0",
+ "statuses": "~2.0.2",
+ "toidentifier": "~1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/http-proxy-agent": {
+ "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==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "^7.1.0",
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/http2-wrapper": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz",
+ "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "quick-lru": "^5.1.1",
+ "resolve-alpn": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=10.19.0"
+ }
+ },
+ "node_modules/https-proxy-agent": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
+ "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "^7.1.2",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/humanize-ms": {
+ "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==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.0.0"
+ }
+ },
+ "node_modules/iconv-corefoundation": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/iconv-corefoundation/-/iconv-corefoundation-1.1.7.tgz",
+ "integrity": "sha512-T10qvkw0zz4wnm560lOEg0PovVqUXuOFhhHAkixw8/sycy7TJt7v/RrkEKEQnAw2viPSJu6iAkErxnzR0g8PpQ==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "dependencies": {
+ "cli-truncate": "^2.1.0",
+ "node-addon-api": "^1.6.3"
+ },
+ "engines": {
+ "node": "^8.11.2 || >=10"
+ }
+ },
+ "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==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.8.19"
+ }
+ },
+ "node_modules/indent-string": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
+ "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/infer-owner": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz",
+ "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "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"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "license": "ISC"
+ },
+ "node_modules/ini": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
+ "license": "ISC"
+ },
+ "node_modules/inline-style-parser": {
+ "version": "0.2.7",
+ "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.7.tgz",
+ "integrity": "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==",
+ "license": "MIT"
+ },
+ "node_modules/ip-address": {
+ "version": "10.0.1",
+ "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.0.1.tgz",
+ "integrity": "sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 12"
+ }
+ },
+ "node_modules/ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/is-alphabetical": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz",
+ "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/is-alphanumerical": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz",
+ "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==",
+ "license": "MIT",
+ "dependencies": {
+ "is-alphabetical": "^2.0.0",
+ "is-decimal": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "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"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-ci": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz",
+ "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ci-info": "^3.2.0"
+ },
+ "bin": {
+ "is-ci": "bin.js"
+ }
+ },
+ "node_modules/is-core-module": {
+ "version": "2.16.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
+ "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-decimal": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz",
+ "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/is-extglob": {
+ "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"
+ }
+ },
+ "node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "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"
+ }
+ },
+ "node_modules/is-glob": {
+ "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"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-hexadecimal": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz",
+ "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/is-interactive": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",
+ "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-lambda": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz",
+ "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "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"
+ }
+ },
+ "node_modules/is-plain-obj": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz",
+ "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-promise": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
+ "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
+ "license": "MIT"
+ },
+ "node_modules/is-unicode-supported": {
+ "version": "0.1.0",
+ "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"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/isbinaryfile": {
+ "version": "5.0.7",
+ "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-5.0.7.tgz",
+ "integrity": "sha512-gnWD14Jh3FzS3CPhF0AxNOJ8CxqeblPTADzI38r0wt8ZyQl5edpy75myt08EG2oKvpyiqSqsx+Wkz9vtkbTqYQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 18.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/gjtorikian/"
+ }
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "license": "ISC"
+ },
+ "node_modules/jackspeak": {
+ "version": "3.4.3",
+ "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"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ },
+ "optionalDependencies": {
+ "@pkgjs/parseargs": "^0.11.0"
+ }
+ },
+ "node_modules/jake": {
+ "version": "10.9.4",
+ "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz",
+ "integrity": "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "async": "^3.2.6",
+ "filelist": "^1.0.4",
+ "picocolors": "^1.1.1"
+ },
+ "bin": {
+ "jake": "bin/cli.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/jiti": {
+ "version": "1.21.7",
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz",
+ "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "bin": {
+ "jiti": "bin/jiti.js"
+ }
+ },
+ "node_modules/jose": {
+ "version": "6.1.3",
+ "resolved": "https://registry.npmjs.org/jose/-/jose-6.1.3.tgz",
+ "integrity": "sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/panva"
+ }
+ },
+ "node_modules/joycon": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz",
+ "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/js-yaml": {
+ "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"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/jsesc": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
+ "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "jsesc": "bin/jsesc"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/json-buffer": {
+ "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"
+ },
+ "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/json-schema-typed": {
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.2.tgz",
+ "integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==",
+ "license": "BSD-2-Clause"
+ },
+ "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==",
+ "dev": true,
+ "license": "ISC",
+ "optional": true
+ },
+ "node_modules/json5": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "json5": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/jsonfile": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz",
+ "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "universalify": "^2.0.0"
+ },
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "node_modules/keyv": {
+ "version": "4.5.4",
+ "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/lazy-val": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/lazy-val/-/lazy-val-1.0.5.tgz",
+ "integrity": "sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/lazystream": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz",
+ "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "readable-stream": "^2.0.5"
+ },
+ "engines": {
+ "node": ">= 0.6.3"
+ }
+ },
+ "node_modules/lazystream/node_modules/readable-stream": {
+ "version": "2.3.8",
+ "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",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "node_modules/lazystream/node_modules/safe-buffer": {
+ "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"
+ },
+ "node_modules/lazystream/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"
+ }
+ },
+ "node_modules/lilconfig": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz",
+ "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antonk52"
+ }
+ },
+ "node_modules/lines-and-columns": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/lodash": {
+ "version": "4.17.23",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
+ "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.defaults": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",
+ "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/lodash.difference": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz",
+ "integrity": "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/lodash.flatten": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz",
+ "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/lodash.isplainobject": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+ "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/lodash.union": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz",
+ "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "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"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/longest-streak": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz",
+ "integrity": "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/lowercase-keys": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
+ "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^3.0.2"
+ }
+ },
+ "node_modules/lucide-react": {
+ "version": "0.510.0",
+ "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.510.0.tgz",
+ "integrity": "sha512-p8SQRAMVh7NhsAIETokSqDrc5CHnDLbV29mMnzaXx+Vc/hnqQzwI2r0FMWCcoTXnbw2KEjy48xwpGdEL+ck06Q==",
+ "dev": true,
+ "license": "ISC",
+ "peerDependencies": {
+ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
+ "node_modules/make-fetch-happen": {
+ "version": "10.2.1",
+ "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz",
+ "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "agentkeepalive": "^4.2.1",
+ "cacache": "^16.1.0",
+ "http-cache-semantics": "^4.1.0",
+ "http-proxy-agent": "^5.0.0",
+ "https-proxy-agent": "^5.0.0",
+ "is-lambda": "^1.0.1",
+ "lru-cache": "^7.7.1",
+ "minipass": "^3.1.6",
+ "minipass-collect": "^1.0.2",
+ "minipass-fetch": "^2.0.3",
+ "minipass-flush": "^1.0.5",
+ "minipass-pipeline": "^1.2.4",
+ "negotiator": "^0.6.3",
+ "promise-retry": "^2.0.1",
+ "socks-proxy-agent": "^7.0.0",
+ "ssri": "^9.0.0"
+ },
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ }
+ },
+ "node_modules/make-fetch-happen/node_modules/agent-base": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 6.0.0"
+ }
+ },
+ "node_modules/make-fetch-happen/node_modules/http-proxy-agent": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz",
+ "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@tootallnate/once": "2",
+ "agent-base": "6",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/make-fetch-happen/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==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "6",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/make-fetch-happen/node_modules/lru-cache": {
+ "version": "7.18.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",
+ "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",
+ "dev": true,
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/make-fetch-happen/node_modules/negotiator": {
+ "version": "0.6.4",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz",
+ "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/matcher": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
+ "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "escape-string-regexp": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/math-intrinsics": {
+ "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"
+ }
+ },
+ "node_modules/mdast-util-from-markdown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz",
+ "integrity": "sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "@types/unist": "^3.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-to-string": "^4.0.0",
+ "micromark": "^4.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-decode-string": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0",
+ "unist-util-stringify-position": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-mdx-expression": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz",
+ "integrity": "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree-jsx": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-mdx-jsx": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.2.0.tgz",
+ "integrity": "sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree-jsx": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "@types/unist": "^3.0.0",
+ "ccount": "^2.0.0",
+ "devlop": "^1.1.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0",
+ "parse-entities": "^4.0.0",
+ "stringify-entities": "^4.0.0",
+ "unist-util-stringify-position": "^4.0.0",
+ "vfile-message": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-mdxjs-esm": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz",
+ "integrity": "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree-jsx": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-phrasing": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz",
+ "integrity": "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "unist-util-is": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-to-hast": {
+ "version": "13.2.1",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz",
+ "integrity": "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "@ungap/structured-clone": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "trim-lines": "^3.0.0",
+ "unist-util-position": "^5.0.0",
+ "unist-util-visit": "^5.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-to-markdown": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.2.tgz",
+ "integrity": "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "@types/unist": "^3.0.0",
+ "longest-streak": "^3.0.0",
+ "mdast-util-phrasing": "^4.0.0",
+ "mdast-util-to-string": "^4.0.0",
+ "micromark-util-classify-character": "^2.0.0",
+ "micromark-util-decode-string": "^2.0.0",
+ "unist-util-visit": "^5.0.0",
+ "zwitch": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-to-string": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz",
+ "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/media-typer": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
+ "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/merge-descriptors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
+ "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/merge2": {
+ "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"
+ }
+ },
+ "node_modules/micromark": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz",
+ "integrity": "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "@types/debug": "^4.0.0",
+ "debug": "^4.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-core-commonmark": "^2.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-combine-extensions": "^2.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-encode": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-resolve-all": "^2.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "micromark-util-subtokenize": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-core-commonmark": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz",
+ "integrity": "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-factory-destination": "^2.0.0",
+ "micromark-factory-label": "^2.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-factory-title": "^2.0.0",
+ "micromark-factory-whitespace": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-classify-character": "^2.0.0",
+ "micromark-util-html-tag-name": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-resolve-all": "^2.0.0",
+ "micromark-util-subtokenize": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-destination": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz",
+ "integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-label": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz",
+ "integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-space": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz",
+ "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-title": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz",
+ "integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-whitespace": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz",
+ "integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-character": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz",
+ "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-chunked": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz",
+ "integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-classify-character": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz",
+ "integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-combine-extensions": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz",
+ "integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-decode-numeric-character-reference": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz",
+ "integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-decode-string": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz",
+ "integrity": "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "decode-named-character-reference": "^1.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-encode": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz",
+ "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromark-util-html-tag-name": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz",
+ "integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromark-util-normalize-identifier": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz",
+ "integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-resolve-all": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz",
+ "integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-sanitize-uri": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz",
+ "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-encode": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-subtokenize": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz",
+ "integrity": "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-symbol": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz",
+ "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromark-util-types": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz",
+ "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromatch": {
+ "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"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/mime": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz",
+ "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.54.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
+ "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",
+ "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "^1.54.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/mimic-fn": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/mimic-response": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
+ "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "10.2.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.2.tgz",
+ "integrity": "sha512-+G4CpNBxa5MprY+04MbgOw1v7So6n5JY166pFi9KfYwT78fxScCeSNQSNzp6dpPSW2rONOps6Ocam1wFhCgoVw==",
+ "dev": true,
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "brace-expansion": "^5.0.2"
+ },
+ "engines": {
+ "node": "18 || 20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/minipass": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/minipass-collect": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz",
+ "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "minipass": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/minipass-fetch": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz",
+ "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "minipass": "^3.1.6",
+ "minipass-sized": "^1.0.3",
+ "minizlib": "^2.1.2"
+ },
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ },
+ "optionalDependencies": {
+ "encoding": "^0.1.13"
+ }
+ },
+ "node_modules/minipass-flush": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz",
+ "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "minipass": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/minipass-pipeline": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz",
+ "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "minipass": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/minipass-sized": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz",
+ "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "minipass": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/minipass/node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/minizlib": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
+ "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "minipass": "^3.0.0",
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/minizlib/node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/mkdirp": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "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==",
+ "license": "MIT"
+ },
+ "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"
+ },
+ "node_modules/mz": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
+ "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "any-promise": "^1.0.0",
+ "object-assign": "^4.0.1",
+ "thenify-all": "^1.0.0"
+ }
+ },
+ "node_modules/nanoid": {
+ "version": "3.3.11",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
+ "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "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==",
+ "license": "MIT"
+ },
+ "node_modules/negotiator": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
+ "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/node-abi": {
+ "version": "3.87.0",
+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.87.0.tgz",
+ "integrity": "sha512-+CGM1L1CgmtheLcBuleyYOn7NWPVu0s0EJH2C4puxgEZb9h8QpR9G2dBfZJOAUhi7VQxuBPMd0hiISWcTyiYyQ==",
+ "license": "MIT",
+ "dependencies": {
+ "semver": "^7.3.5"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/node-addon-api": {
+ "version": "1.7.2",
+ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
+ "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true
+ },
+ "node_modules/node-api-version": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/node-api-version/-/node-api-version-0.2.1.tgz",
+ "integrity": "sha512-2xP/IGGMmmSQpI1+O/k72jF/ykvZ89JeuKX3TLJAYPDVLUalrshrLHkeVcCCZqG/eEa635cr8IBYzgnDvM2O8Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "semver": "^7.3.5"
+ }
+ },
+ "node_modules/node-gyp": {
+ "version": "9.4.1",
+ "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.4.1.tgz",
+ "integrity": "sha512-OQkWKbjQKbGkMf/xqI1jjy3oCTgMKJac58G2+bjZb3fza6gW2YrCSdMQYaoTb70crvE//Gngr4f0AgVHmqHvBQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "env-paths": "^2.2.0",
+ "exponential-backoff": "^3.1.1",
+ "glob": "^7.1.4",
+ "graceful-fs": "^4.2.6",
+ "make-fetch-happen": "^10.0.3",
+ "nopt": "^6.0.0",
+ "npmlog": "^6.0.0",
+ "rimraf": "^3.0.2",
+ "semver": "^7.3.5",
+ "tar": "^6.1.2",
+ "which": "^2.0.2"
+ },
+ "bin": {
+ "node-gyp": "bin/node-gyp.js"
+ },
+ "engines": {
+ "node": "^12.13 || ^14.13 || >=16"
+ }
+ },
+ "node_modules/node-gyp/node_modules/balanced-match": {
+ "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"
+ },
+ "node_modules/node-gyp/node_modules/brace-expansion": {
+ "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/node-gyp/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/node-gyp/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"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/node-releases": {
+ "version": "2.0.27",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz",
+ "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/nopt": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz",
+ "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "abbrev": "^1.0.0"
+ },
+ "bin": {
+ "nopt": "bin/nopt.js"
+ },
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ }
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "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/normalize-url": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",
+ "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/npmlog": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz",
+ "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==",
+ "deprecated": "This package is no longer supported.",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "are-we-there-yet": "^3.0.0",
+ "console-control-strings": "^1.1.0",
+ "gauge": "^4.0.3",
+ "set-blocking": "^2.0.0"
+ },
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ }
+ },
+ "node_modules/object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/object-hash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
+ "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/object-inspect": {
+ "version": "1.13.4",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
+ "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/on-exit-leak-free": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz",
+ "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "license": "MIT",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "license": "ISC",
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/onetime": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "mimic-fn": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/openai": {
+ "version": "6.22.0",
+ "resolved": "https://registry.npmjs.org/openai/-/openai-6.22.0.tgz",
+ "integrity": "sha512-7Yvy17F33Bi9RutWbsaYt5hJEEJ/krRPOrwan+f9aCPuMat1WVsb2VNSII5W1EksKT6fF69TG/xj4XzodK3JZw==",
+ "license": "Apache-2.0",
+ "bin": {
+ "openai": "bin/cli"
+ },
+ "peerDependencies": {
+ "ws": "^8.18.0",
+ "zod": "^3.25 || ^4.0"
+ },
+ "peerDependenciesMeta": {
+ "ws": {
+ "optional": true
+ },
+ "zod": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ora": {
+ "version": "5.4.1",
+ "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz",
+ "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "bl": "^4.1.0",
+ "chalk": "^4.1.0",
+ "cli-cursor": "^3.1.0",
+ "cli-spinners": "^2.5.0",
+ "is-interactive": "^1.0.0",
+ "is-unicode-supported": "^0.1.0",
+ "log-symbols": "^4.1.0",
+ "strip-ansi": "^6.0.0",
+ "wcwidth": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-cancelable": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz",
+ "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "3.1.0",
+ "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"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-map": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
+ "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "aggregate-error": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/package-json-from-dist": {
+ "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"
+ },
+ "node_modules/parse-entities": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz",
+ "integrity": "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^2.0.0",
+ "character-entities-legacy": "^3.0.0",
+ "character-reference-invalid": "^2.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "is-alphanumerical": "^2.0.0",
+ "is-decimal": "^2.0.0",
+ "is-hexadecimal": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/parse-entities/node_modules/@types/unist": {
+ "version": "2.0.11",
+ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz",
+ "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==",
+ "license": "MIT"
+ },
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "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"
+ }
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/path-scurry": {
+ "version": "1.11.1",
+ "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"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/path-scurry/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==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/path-scurry/node_modules/minipass": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
+ "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
+ "dev": true,
+ "license": "BlueOak-1.0.0",
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ }
+ },
+ "node_modules/path-to-regexp": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz",
+ "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/pe-library": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/pe-library/-/pe-library-0.4.1.tgz",
+ "integrity": "sha512-eRWB5LBz7PpDu4PUlwT0PhnQfTQJlDDdPa35urV4Osrm0t0AqQFGn+UIkU3klZvwJ8KPO3VbBFsXquA6p6kqZw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12",
+ "npm": ">=6"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/jet2jet"
+ }
+ },
+ "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==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/picocolors": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/picomatch": {
+ "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"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/pino": {
+ "version": "9.14.0",
+ "resolved": "https://registry.npmjs.org/pino/-/pino-9.14.0.tgz",
+ "integrity": "sha512-8OEwKp5juEvb/MjpIc4hjqfgCNysrS94RIOMXYvpYCdm/jglrKEiAYmiumbmGhCvs+IcInsphYDFwqrjr7398w==",
+ "license": "MIT",
+ "dependencies": {
+ "@pinojs/redact": "^0.4.0",
+ "atomic-sleep": "^1.0.0",
+ "on-exit-leak-free": "^2.1.0",
+ "pino-abstract-transport": "^2.0.0",
+ "pino-std-serializers": "^7.0.0",
+ "process-warning": "^5.0.0",
+ "quick-format-unescaped": "^4.0.3",
+ "real-require": "^0.2.0",
+ "safe-stable-stringify": "^2.3.1",
+ "sonic-boom": "^4.0.1",
+ "thread-stream": "^3.0.0"
+ },
+ "bin": {
+ "pino": "bin.js"
+ }
+ },
+ "node_modules/pino-abstract-transport": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-2.0.0.tgz",
+ "integrity": "sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw==",
+ "license": "MIT",
+ "dependencies": {
+ "split2": "^4.0.0"
+ }
+ },
+ "node_modules/pino-pretty": {
+ "version": "13.1.3",
+ "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-13.1.3.tgz",
+ "integrity": "sha512-ttXRkkOz6WWC95KeY9+xxWL6AtImwbyMHrL1mSwqwW9u+vLp/WIElvHvCSDg0xO/Dzrggz1zv3rN5ovTRVowKg==",
+ "license": "MIT",
+ "dependencies": {
+ "colorette": "^2.0.7",
+ "dateformat": "^4.6.3",
+ "fast-copy": "^4.0.0",
+ "fast-safe-stringify": "^2.1.1",
+ "help-me": "^5.0.0",
+ "joycon": "^3.1.1",
+ "minimist": "^1.2.6",
+ "on-exit-leak-free": "^2.1.0",
+ "pino-abstract-transport": "^3.0.0",
+ "pump": "^3.0.0",
+ "secure-json-parse": "^4.0.0",
+ "sonic-boom": "^4.0.1",
+ "strip-json-comments": "^5.0.2"
+ },
+ "bin": {
+ "pino-pretty": "bin.js"
+ }
+ },
+ "node_modules/pino-pretty/node_modules/pino-abstract-transport": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-3.0.0.tgz",
+ "integrity": "sha512-wlfUczU+n7Hy/Ha5j9a/gZNy7We5+cXp8YL+X+PG8S0KXxw7n/JXA3c46Y0zQznIJ83URJiwy7Lh56WLokNuxg==",
+ "license": "MIT",
+ "dependencies": {
+ "split2": "^4.0.0"
+ }
+ },
+ "node_modules/pino-std-serializers": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.1.0.tgz",
+ "integrity": "sha512-BndPH67/JxGExRgiX1dX0w1FvZck5Wa4aal9198SrRhZjH3GxKQUKIBnYJTdj2HDN3UQAS06HlfcSbQj2OHmaw==",
+ "license": "MIT"
+ },
+ "node_modules/pirates": {
+ "version": "4.0.7",
+ "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz",
+ "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/pkce-challenge": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz",
+ "integrity": "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/plist": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/plist/-/plist-3.1.0.tgz",
+ "integrity": "sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@xmldom/xmldom": "^0.8.8",
+ "base64-js": "^1.5.1",
+ "xmlbuilder": "^15.1.1"
+ },
+ "engines": {
+ "node": ">=10.4.0"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.5.6",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
+ "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "nanoid": "^3.3.11",
+ "picocolors": "^1.1.1",
+ "source-map-js": "^1.2.1"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/postcss-import": {
+ "version": "15.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz",
+ "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "postcss-value-parser": "^4.0.0",
+ "read-cache": "^1.0.0",
+ "resolve": "^1.1.7"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.0.0"
+ }
+ },
+ "node_modules/postcss-js": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.1.0.tgz",
+ "integrity": "sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "camelcase-css": "^2.0.1"
+ },
+ "engines": {
+ "node": "^12 || ^14 || >= 16"
+ },
+ "peerDependencies": {
+ "postcss": "^8.4.21"
+ }
+ },
+ "node_modules/postcss-load-config": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz",
+ "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "lilconfig": "^3.1.1"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "peerDependencies": {
+ "jiti": ">=1.21.0",
+ "postcss": ">=8.0.9",
+ "tsx": "^4.8.1",
+ "yaml": "^2.4.2"
+ },
+ "peerDependenciesMeta": {
+ "jiti": {
+ "optional": true
+ },
+ "postcss": {
+ "optional": true
+ },
+ "tsx": {
+ "optional": true
+ },
+ "yaml": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/postcss-nested": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz",
+ "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "postcss-selector-parser": "^6.1.1"
+ },
+ "engines": {
+ "node": ">=12.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.14"
+ }
+ },
+ "node_modules/postcss-selector-parser": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz",
+ "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "cssesc": "^3.0.0",
+ "util-deprecate": "^1.0.2"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/postcss-value-parser": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
+ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "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==",
+ "deprecated": "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.",
+ "license": "MIT",
+ "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/proc-log": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz",
+ "integrity": "sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==",
+ "dev": true,
+ "license": "ISC",
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ }
+ },
+ "node_modules/process-nextick-args": {
+ "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"
+ },
+ "node_modules/process-warning": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-5.0.0.tgz",
+ "integrity": "sha512-a39t9ApHNx2L4+HBnQKqxxHNs1r7KF+Intd8Q/g1bUh6q0WIp9voPXJ/x0j+ZL45KF1pJd9+q2jLIRMfvEshkA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fastify"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/fastify"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/progress": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/promise-inflight": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz",
+ "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/promise-retry": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz",
+ "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "err-code": "^2.0.2",
+ "retry": "^0.12.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/property-information": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.1.0.tgz",
+ "integrity": "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "license": "MIT",
+ "dependencies": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "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"
+ },
+ "node_modules/pump": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz",
+ "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==",
+ "license": "MIT",
+ "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==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/qs": {
+ "version": "6.15.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.0.tgz",
+ "integrity": "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "side-channel": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/queue-microtask": {
+ "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",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/quick-format-unescaped": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz",
+ "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==",
+ "license": "MIT"
+ },
+ "node_modules/quick-lru": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
+ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/raw-body": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz",
+ "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "~3.1.2",
+ "http-errors": "~2.0.1",
+ "iconv-lite": "~0.7.0",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/raw-body/node_modules/iconv-lite": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz",
+ "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==",
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/rc": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
+ "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
+ "license": "(BSD-2-Clause OR MIT OR Apache-2.0)",
+ "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==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/react": {
+ "version": "19.2.4",
+ "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz",
+ "integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/react-dom": {
+ "version": "19.2.4",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.4.tgz",
+ "integrity": "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "scheduler": "^0.27.0"
+ },
+ "peerDependencies": {
+ "react": "^19.2.4"
+ }
+ },
+ "node_modules/react-markdown": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-10.1.0.tgz",
+ "integrity": "sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "hast-util-to-jsx-runtime": "^2.0.0",
+ "html-url-attributes": "^3.0.0",
+ "mdast-util-to-hast": "^13.0.0",
+ "remark-parse": "^11.0.0",
+ "remark-rehype": "^11.0.0",
+ "unified": "^11.0.0",
+ "unist-util-visit": "^5.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ },
+ "peerDependencies": {
+ "@types/react": ">=18",
+ "react": ">=18"
+ }
+ },
+ "node_modules/react-refresh": {
+ "version": "0.17.0",
+ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz",
+ "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/react-remove-scroll": {
+ "version": "2.7.2",
+ "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.7.2.tgz",
+ "integrity": "sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q==",
+ "license": "MIT",
+ "dependencies": {
+ "react-remove-scroll-bar": "^2.3.7",
+ "react-style-singleton": "^2.2.3",
+ "tslib": "^2.1.0",
+ "use-callback-ref": "^1.3.3",
+ "use-sidecar": "^1.1.3"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/react-remove-scroll-bar": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.8.tgz",
+ "integrity": "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==",
+ "license": "MIT",
+ "dependencies": {
+ "react-style-singleton": "^2.2.2",
+ "tslib": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/react-style-singleton": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.3.tgz",
+ "integrity": "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==",
+ "license": "MIT",
+ "dependencies": {
+ "get-nonce": "^1.0.0",
+ "tslib": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/read-binary-file-arch": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/read-binary-file-arch/-/read-binary-file-arch-1.0.6.tgz",
+ "integrity": "sha512-BNg9EN3DD3GsDXX7Aa8O4p92sryjkmzYYgmgTAc6CA4uGLEDzFfxOxugu21akOxpcXHiEgsYkC6nPsQvLLLmEg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.4"
+ },
+ "bin": {
+ "read-binary-file-arch": "cli.js"
+ }
+ },
+ "node_modules/read-cache": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
+ "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "pify": "^2.3.0"
+ }
+ },
+ "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==",
+ "license": "MIT",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/readdir-glob": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz",
+ "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "minimatch": "^5.1.0"
+ }
+ },
+ "node_modules/readdir-glob/node_modules/balanced-match": {
+ "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"
+ },
+ "node_modules/readdir-glob/node_modules/brace-expansion": {
+ "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"
+ }
+ },
+ "node_modules/readdir-glob/node_modules/minimatch": {
+ "version": "5.1.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"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
+ "node_modules/real-require": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz",
+ "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 12.13.0"
+ }
+ },
+ "node_modules/remark-parse": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz",
+ "integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "micromark-util-types": "^2.0.0",
+ "unified": "^11.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/remark-rehype": {
+ "version": "11.1.2",
+ "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.2.tgz",
+ "integrity": "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "mdast-util-to-hast": "^13.0.0",
+ "unified": "^11.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/require-directory": {
+ "version": "2.1.1",
+ "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"
+ }
+ },
+ "node_modules/require-from-string": {
+ "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"
+ }
+ },
+ "node_modules/resedit": {
+ "version": "1.7.2",
+ "resolved": "https://registry.npmjs.org/resedit/-/resedit-1.7.2.tgz",
+ "integrity": "sha512-vHjcY2MlAITJhC0eRD/Vv8Vlgmu9Sd3LX9zZvtGzU5ZImdTN3+d6e/4mnTyV8vEbyf1sgNIrWxhWlrys52OkEA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "pe-library": "^0.4.1"
+ },
+ "engines": {
+ "node": ">=12",
+ "npm": ">=6"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/jet2jet"
+ }
+ },
+ "node_modules/resolve": {
+ "version": "1.22.11",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz",
+ "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-core-module": "^2.16.1",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/resolve-alpn": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",
+ "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/resolve-pkg-maps": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
+ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
+ }
+ },
+ "node_modules/responselike": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz",
+ "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "lowercase-keys": "^2.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/restore-cursor": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
+ "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "onetime": "^5.1.0",
+ "signal-exit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/retry": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz",
+ "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/reusify": {
+ "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"
+ }
+ },
+ "node_modules/rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "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"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/rimraf/node_modules/balanced-match": {
+ "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"
+ },
+ "node_modules/rimraf/node_modules/brace-expansion": {
+ "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/rimraf/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/rimraf/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"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/roarr": {
+ "version": "2.15.4",
+ "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz",
+ "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "optional": true,
+ "dependencies": {
+ "boolean": "^3.0.1",
+ "detect-node": "^2.0.4",
+ "globalthis": "^1.0.1",
+ "json-stringify-safe": "^5.0.1",
+ "semver-compare": "^1.0.0",
+ "sprintf-js": "^1.1.2"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/rollup": {
+ "version": "4.57.1",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.57.1.tgz",
+ "integrity": "sha512-oQL6lgK3e2QZeQ7gcgIkS2YZPg5slw37hYufJ3edKlfQSGGm8ICoxswK15ntSzF/a8+h7ekRy7k7oWc3BQ7y8A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "1.0.8"
+ },
+ "bin": {
+ "rollup": "dist/bin/rollup"
+ },
+ "engines": {
+ "node": ">=18.0.0",
+ "npm": ">=8.0.0"
+ },
+ "optionalDependencies": {
+ "@rollup/rollup-android-arm-eabi": "4.57.1",
+ "@rollup/rollup-android-arm64": "4.57.1",
+ "@rollup/rollup-darwin-arm64": "4.57.1",
+ "@rollup/rollup-darwin-x64": "4.57.1",
+ "@rollup/rollup-freebsd-arm64": "4.57.1",
+ "@rollup/rollup-freebsd-x64": "4.57.1",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.57.1",
+ "@rollup/rollup-linux-arm-musleabihf": "4.57.1",
+ "@rollup/rollup-linux-arm64-gnu": "4.57.1",
+ "@rollup/rollup-linux-arm64-musl": "4.57.1",
+ "@rollup/rollup-linux-loong64-gnu": "4.57.1",
+ "@rollup/rollup-linux-loong64-musl": "4.57.1",
+ "@rollup/rollup-linux-ppc64-gnu": "4.57.1",
+ "@rollup/rollup-linux-ppc64-musl": "4.57.1",
+ "@rollup/rollup-linux-riscv64-gnu": "4.57.1",
+ "@rollup/rollup-linux-riscv64-musl": "4.57.1",
+ "@rollup/rollup-linux-s390x-gnu": "4.57.1",
+ "@rollup/rollup-linux-x64-gnu": "4.57.1",
+ "@rollup/rollup-linux-x64-musl": "4.57.1",
+ "@rollup/rollup-openbsd-x64": "4.57.1",
+ "@rollup/rollup-openharmony-arm64": "4.57.1",
+ "@rollup/rollup-win32-arm64-msvc": "4.57.1",
+ "@rollup/rollup-win32-ia32-msvc": "4.57.1",
+ "@rollup/rollup-win32-x64-gnu": "4.57.1",
+ "@rollup/rollup-win32-x64-msvc": "4.57.1",
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/router": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",
+ "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.0",
+ "depd": "^2.0.0",
+ "is-promise": "^4.0.0",
+ "parseurl": "^1.3.3",
+ "path-to-regexp": "^8.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "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",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "node_modules/rxjs": {
+ "version": "7.8.2",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
+ "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.1.0"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/safe-stable-stringify": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz",
+ "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "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/sanitize-filename": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
+ "integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==",
+ "dev": true,
+ "license": "WTFPL OR ISC",
+ "dependencies": {
+ "truncate-utf8-bytes": "^1.0.0"
+ }
+ },
+ "node_modules/sax": {
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.4.tgz",
+ "integrity": "sha512-1n3r/tGXO6b6VXMdFT54SHzT9ytu9yr7TaELowdYpMqY/Ao7EnlQGmAQ1+RatX7Tkkdm6hONI2owqNx2aZj5Sw==",
+ "dev": true,
+ "license": "BlueOak-1.0.0",
+ "engines": {
+ "node": ">=11.0.0"
+ }
+ },
+ "node_modules/scheduler": {
+ "version": "0.27.0",
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz",
+ "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",
+ "license": "MIT"
+ },
+ "node_modules/secure-json-parse": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-4.1.0.tgz",
+ "integrity": "sha512-l4KnYfEyqYJxDwlNVyRfO2E4NTHfMKAWdUuA8J0yve2Dz/E/PdBepY03RvyJpssIpRFwJoCD55wA+mEDs6ByWA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fastify"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/fastify"
+ }
+ ],
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/semver": {
+ "version": "7.7.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",
+ "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "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==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true
+ },
+ "node_modules/send": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz",
+ "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.3",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "etag": "^1.8.1",
+ "fresh": "^2.0.0",
+ "http-errors": "^2.0.1",
+ "mime-types": "^3.0.2",
+ "ms": "^2.1.3",
+ "on-finished": "^2.4.1",
+ "range-parser": "^1.2.1",
+ "statuses": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "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==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "type-fest": "^0.13.1"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/serve-static": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz",
+ "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",
+ "license": "MIT",
+ "dependencies": {
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "parseurl": "^1.3.3",
+ "send": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/set-blocking": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "license": "ISC"
+ },
+ "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==",
+ "license": "MIT",
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shell-quote": {
+ "version": "1.8.3",
+ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz",
+ "integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
+ "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3",
+ "side-channel-list": "^1.0.0",
+ "side-channel-map": "^1.0.1",
+ "side-channel-weakmap": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-list": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
+ "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-map": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
+ "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-weakmap": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
+ "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3",
+ "side-channel-map": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "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"
+ }
+ ],
+ "license": "MIT"
+ },
+ "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"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "decompress-response": "^6.0.0",
+ "once": "^1.3.1",
+ "simple-concat": "^1.0.0"
+ }
+ },
+ "node_modules/simple-update-notifier": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
+ "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "semver": "^7.5.3"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/slice-ansi": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz",
+ "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "astral-regex": "^2.0.0",
+ "is-fullwidth-code-point": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/smart-buffer": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
+ "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6.0.0",
+ "npm": ">= 3.0.0"
+ }
+ },
+ "node_modules/socks": {
+ "version": "2.8.7",
+ "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz",
+ "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ip-address": "^10.0.1",
+ "smart-buffer": "^4.2.0"
+ },
+ "engines": {
+ "node": ">= 10.0.0",
+ "npm": ">= 3.0.0"
+ }
+ },
+ "node_modules/socks-proxy-agent": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz",
+ "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "^6.0.2",
+ "debug": "^4.3.3",
+ "socks": "^2.6.2"
+ },
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/socks-proxy-agent/node_modules/agent-base": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 6.0.0"
+ }
+ },
+ "node_modules/sonic-boom": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.1.tgz",
+ "integrity": "sha512-w6AxtubXa2wTXAUsZMMWERrsIRAdrK0Sc+FUytWvYAhBJLyuI4llrMIC1DtlNSdI99EI86KZum2MMq3EAZlF9Q==",
+ "license": "MIT",
+ "dependencies": {
+ "atomic-sleep": "^1.0.0"
+ }
+ },
+ "node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-js": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-support": {
+ "version": "0.5.21",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
+ "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "source-map": "^0.6.0"
+ }
+ },
+ "node_modules/space-separated-tokens": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz",
+ "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/split2": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
+ "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
+ "license": "ISC",
+ "engines": {
+ "node": ">= 10.x"
+ }
+ },
+ "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==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "optional": true
+ },
+ "node_modules/ssri": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz",
+ "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "minipass": "^3.1.1"
+ },
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ }
+ },
+ "node_modules/stat-mode": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-1.0.0.tgz",
+ "integrity": "sha512-jH9EhtKIjuXZ2cWxmXS8ZP80XyC3iasQxMDV8jzhNJpfDb7VbQLVW4Wvsxz9QZvzV+G4YoSfBUVKDOyxLzi/sg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/statuses": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
+ "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/string_decoder": {
+ "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"
+ }
+ },
+ "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",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/string-width-cjs": {
+ "name": "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",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/stringify-entities": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz",
+ "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==",
+ "license": "MIT",
+ "dependencies": {
+ "character-entities-html4": "^2.0.0",
+ "character-entities-legacy": "^3.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "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"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-ansi-cjs": {
+ "name": "strip-ansi",
+ "version": "6.0.1",
+ "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"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-json-comments": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.0.3.tgz",
+ "integrity": "sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/style-to-js": {
+ "version": "1.1.21",
+ "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.21.tgz",
+ "integrity": "sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==",
+ "license": "MIT",
+ "dependencies": {
+ "style-to-object": "1.0.14"
+ }
+ },
+ "node_modules/style-to-object": {
+ "version": "1.0.14",
+ "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.14.tgz",
+ "integrity": "sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw==",
+ "license": "MIT",
+ "dependencies": {
+ "inline-style-parser": "0.2.7"
+ }
+ },
+ "node_modules/sucrase": {
+ "version": "3.35.1",
+ "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz",
+ "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.2",
+ "commander": "^4.0.0",
+ "lines-and-columns": "^1.1.6",
+ "mz": "^2.7.0",
+ "pirates": "^4.0.1",
+ "tinyglobby": "^0.2.11",
+ "ts-interface-checker": "^0.1.9"
+ },
+ "bin": {
+ "sucrase": "bin/sucrase",
+ "sucrase-node": "bin/sucrase-node"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ }
+ },
+ "node_modules/sucrase/node_modules/commander": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
+ "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/sumchecker": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz",
+ "integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "debug": "^4.1.0"
+ },
+ "engines": {
+ "node": ">= 8.0"
+ }
+ },
+ "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==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/tailwind-merge": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.5.0.tgz",
+ "integrity": "sha512-I8K9wewnVDkL1NTGoqWmVEIlUcB9gFriAEkXkfCjX5ib8ezGxtR3xD7iZIxrfArjEsH7F1CHD4RFUtxefdqV/A==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/dcastil"
+ }
+ },
+ "node_modules/tailwindcss": {
+ "version": "3.4.19",
+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.19.tgz",
+ "integrity": "sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@alloc/quick-lru": "^5.2.0",
+ "arg": "^5.0.2",
+ "chokidar": "^3.6.0",
+ "didyoumean": "^1.2.2",
+ "dlv": "^1.1.3",
+ "fast-glob": "^3.3.2",
+ "glob-parent": "^6.0.2",
+ "is-glob": "^4.0.3",
+ "jiti": "^1.21.7",
+ "lilconfig": "^3.1.3",
+ "micromatch": "^4.0.8",
+ "normalize-path": "^3.0.0",
+ "object-hash": "^3.0.0",
+ "picocolors": "^1.1.1",
+ "postcss": "^8.4.47",
+ "postcss-import": "^15.1.0",
+ "postcss-js": "^4.0.1",
+ "postcss-load-config": "^4.0.2 || ^5.0 || ^6.0",
+ "postcss-nested": "^6.2.0",
+ "postcss-selector-parser": "^6.1.2",
+ "resolve": "^1.22.8",
+ "sucrase": "^3.35.0"
+ },
+ "bin": {
+ "tailwind": "lib/cli.js",
+ "tailwindcss": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/tailwindcss-animate": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/tailwindcss-animate/-/tailwindcss-animate-1.0.7.tgz",
+ "integrity": "sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "tailwindcss": ">=3.0.0 || insiders"
+ }
+ },
+ "node_modules/tar": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",
+ "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==",
+ "deprecated": "Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "chownr": "^2.0.0",
+ "fs-minipass": "^2.0.0",
+ "minipass": "^5.0.0",
+ "minizlib": "^2.1.1",
+ "mkdirp": "^1.0.3",
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "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==",
+ "license": "MIT",
+ "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==",
+ "license": "ISC"
+ },
+ "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==",
+ "license": "MIT",
+ "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/node_modules/minipass": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",
+ "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",
+ "dev": true,
+ "license": "ISC",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tar/node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/temp-file": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/temp-file/-/temp-file-3.4.0.tgz",
+ "integrity": "sha512-C5tjlC/HCtVUOi3KWVokd4vHVViOmGjtLwIh4MuzPo/nMYTV/p1urt3RnMz2IWXDdKEGJH3k5+KPxtqRsUYGtg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "async-exit-hook": "^2.0.1",
+ "fs-extra": "^10.0.0"
+ }
+ },
+ "node_modules/thenify": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",
+ "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "any-promise": "^1.0.0"
+ }
+ },
+ "node_modules/thenify-all": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
+ "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "thenify": ">= 3.1.0 < 4"
+ },
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/thread-stream": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-3.1.0.tgz",
+ "integrity": "sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==",
+ "license": "MIT",
+ "dependencies": {
+ "real-require": "^0.2.0"
+ }
+ },
+ "node_modules/tinyglobby": {
+ "version": "0.2.15",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
+ "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.3"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/SuperchupuDev"
+ }
+ },
+ "node_modules/tinyglobby/node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/tinyglobby/node_modules/picomatch": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/tmp": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz",
+ "integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=14.14"
+ }
+ },
+ "node_modules/tmp-promise": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-3.0.3.tgz",
+ "integrity": "sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "tmp": "^0.2.0"
+ }
+ },
+ "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"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/tree-kill": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
+ "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "tree-kill": "cli.js"
+ }
+ },
+ "node_modules/trim-lines": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz",
+ "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/trough": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz",
+ "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/truncate-utf8-bytes": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
+ "integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==",
+ "dev": true,
+ "license": "WTFPL",
+ "dependencies": {
+ "utf8-byte-length": "^1.0.1"
+ }
+ },
+ "node_modules/ts-interface-checker": {
+ "version": "0.1.13",
+ "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",
+ "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
+ "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/tsx": {
+ "version": "4.21.0",
+ "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz",
+ "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "esbuild": "~0.27.0",
+ "get-tsconfig": "^4.7.5"
+ },
+ "bin": {
+ "tsx": "dist/cli.mjs"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/aix-ppc64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.3.tgz",
+ "integrity": "sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/android-arm": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.3.tgz",
+ "integrity": "sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/android-arm64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.3.tgz",
+ "integrity": "sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/android-x64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.3.tgz",
+ "integrity": "sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/darwin-arm64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.3.tgz",
+ "integrity": "sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/darwin-x64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.3.tgz",
+ "integrity": "sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.3.tgz",
+ "integrity": "sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/freebsd-x64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.3.tgz",
+ "integrity": "sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-arm": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.3.tgz",
+ "integrity": "sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-arm64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.3.tgz",
+ "integrity": "sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-ia32": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.3.tgz",
+ "integrity": "sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-loong64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.3.tgz",
+ "integrity": "sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-mips64el": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.3.tgz",
+ "integrity": "sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-ppc64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.3.tgz",
+ "integrity": "sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-riscv64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.3.tgz",
+ "integrity": "sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-s390x": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.3.tgz",
+ "integrity": "sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-x64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.3.tgz",
+ "integrity": "sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.3.tgz",
+ "integrity": "sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/netbsd-x64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.3.tgz",
+ "integrity": "sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.3.tgz",
+ "integrity": "sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/openbsd-x64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.3.tgz",
+ "integrity": "sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/openharmony-arm64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.3.tgz",
+ "integrity": "sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/sunos-x64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.3.tgz",
+ "integrity": "sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/win32-arm64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.3.tgz",
+ "integrity": "sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/win32-ia32": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.3.tgz",
+ "integrity": "sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/win32-x64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.3.tgz",
+ "integrity": "sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/esbuild": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz",
+ "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.27.3",
+ "@esbuild/android-arm": "0.27.3",
+ "@esbuild/android-arm64": "0.27.3",
+ "@esbuild/android-x64": "0.27.3",
+ "@esbuild/darwin-arm64": "0.27.3",
+ "@esbuild/darwin-x64": "0.27.3",
+ "@esbuild/freebsd-arm64": "0.27.3",
+ "@esbuild/freebsd-x64": "0.27.3",
+ "@esbuild/linux-arm": "0.27.3",
+ "@esbuild/linux-arm64": "0.27.3",
+ "@esbuild/linux-ia32": "0.27.3",
+ "@esbuild/linux-loong64": "0.27.3",
+ "@esbuild/linux-mips64el": "0.27.3",
+ "@esbuild/linux-ppc64": "0.27.3",
+ "@esbuild/linux-riscv64": "0.27.3",
+ "@esbuild/linux-s390x": "0.27.3",
+ "@esbuild/linux-x64": "0.27.3",
+ "@esbuild/netbsd-arm64": "0.27.3",
+ "@esbuild/netbsd-x64": "0.27.3",
+ "@esbuild/openbsd-arm64": "0.27.3",
+ "@esbuild/openbsd-x64": "0.27.3",
+ "@esbuild/openharmony-arm64": "0.27.3",
+ "@esbuild/sunos-x64": "0.27.3",
+ "@esbuild/win32-arm64": "0.27.3",
+ "@esbuild/win32-ia32": "0.27.3",
+ "@esbuild/win32-x64": "0.27.3"
+ }
+ },
+ "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==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/type-fest": {
+ "version": "0.13.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",
+ "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",
+ "dev": true,
+ "license": "(MIT OR CC0-1.0)",
+ "optional": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/type-is": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
+ "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
+ "license": "MIT",
+ "dependencies": {
+ "content-type": "^1.0.5",
+ "media-typer": "^1.1.0",
+ "mime-types": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/typescript": {
+ "version": "5.9.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
+ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
+ "license": "Apache-2.0",
+ "peer": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "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==",
+ "devOptional": true,
+ "license": "MIT"
+ },
+ "node_modules/unified": {
+ "version": "11.0.5",
+ "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz",
+ "integrity": "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "bail": "^2.0.0",
+ "devlop": "^1.0.0",
+ "extend": "^3.0.0",
+ "is-plain-obj": "^4.0.0",
+ "trough": "^2.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unique-filename": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz",
+ "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "unique-slug": "^3.0.0"
+ },
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ }
+ },
+ "node_modules/unique-slug": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz",
+ "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "imurmurhash": "^0.1.4"
+ },
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ }
+ },
+ "node_modules/unist-util-is": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz",
+ "integrity": "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-position": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz",
+ "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-stringify-position": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz",
+ "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-visit": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.1.0.tgz",
+ "integrity": "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "unist-util-is": "^6.0.0",
+ "unist-util-visit-parents": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-visit-parents": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.2.tgz",
+ "integrity": "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "unist-util-is": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/universalify": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
+ "node_modules/unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/update-browserslist-db": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",
+ "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "escalade": "^3.2.0",
+ "picocolors": "^1.1.1"
+ },
+ "bin": {
+ "update-browserslist-db": "cli.js"
+ },
+ "peerDependencies": {
+ "browserslist": ">= 4.21.0"
+ }
+ },
+ "node_modules/uri-js": {
+ "version": "4.4.1",
+ "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"
+ }
+ },
+ "node_modules/use-callback-ref": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.3.tgz",
+ "integrity": "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/use-sidecar": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.3.tgz",
+ "integrity": "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==",
+ "license": "MIT",
+ "dependencies": {
+ "detect-node-es": "^1.1.0",
+ "tslib": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/utf8-byte-length": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz",
+ "integrity": "sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA==",
+ "dev": true,
+ "license": "(WTFPL OR MIT)"
+ },
+ "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==",
+ "license": "MIT"
+ },
+ "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/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/verror": {
+ "version": "1.10.1",
+ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.1.tgz",
+ "integrity": "sha512-veufcmxri4e3XSrT0xwfUR7kguIkaxBeosDg00yDWhk49wdwkSUrvvsm7nc75e1PUyvIeZj6nS8VQRYz2/S4Xg==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "assert-plus": "^1.0.0",
+ "core-util-is": "1.0.2",
+ "extsprintf": "^1.2.0"
+ },
+ "engines": {
+ "node": ">=0.6.0"
+ }
+ },
+ "node_modules/vfile": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz",
+ "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "vfile-message": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/vfile-message": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.3.tgz",
+ "integrity": "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "unist-util-stringify-position": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/videodb": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/videodb/-/videodb-0.2.0.tgz",
+ "integrity": "sha512-Gb87/7+Sm9LyRm4nA4f/jwe6Lx5xzJtr+L+9Q2hkqbj0wXryIDrzvXzFaCbc+du9tuaNeMwsUHeA1WNb1lVOww==",
+ "hasInstallScript": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "axios": "^1.6.2",
+ "form-data": "^4.0.0",
+ "lodash": "^4.17.21",
+ "tar": "^7.4.3",
+ "uuid": "^9.0.1",
+ "ws": "^8.19.0"
+ }
+ },
+ "node_modules/videodb/node_modules/chownr": {
+ "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"
+ }
+ },
+ "node_modules/videodb/node_modules/minipass": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
+ "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
+ "license": "BlueOak-1.0.0",
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ }
+ },
+ "node_modules/videodb/node_modules/minizlib": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz",
+ "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==",
+ "license": "MIT",
+ "dependencies": {
+ "minipass": "^7.1.2"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/videodb/node_modules/tar": {
+ "version": "7.5.9",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.9.tgz",
+ "integrity": "sha512-BTLcK0xsDh2+PUe9F6c2TlRp4zOOBMTkoQHQIWSIzI0R7KG46uEwq4OPk2W7bZcprBMsuaeFsqwYr7pjh6CuHg==",
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "@isaacs/fs-minipass": "^4.0.0",
+ "chownr": "^3.0.0",
+ "minipass": "^7.1.2",
+ "minizlib": "^3.1.0",
+ "yallist": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/videodb/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"
+ ],
+ "license": "MIT",
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
+ "node_modules/videodb/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"
+ }
+ },
+ "node_modules/vite": {
+ "version": "6.4.1",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz",
+ "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "esbuild": "^0.25.0",
+ "fdir": "^6.4.4",
+ "picomatch": "^4.0.2",
+ "postcss": "^8.5.3",
+ "rollup": "^4.34.9",
+ "tinyglobby": "^0.2.13"
+ },
+ "bin": {
+ "vite": "bin/vite.js"
+ },
+ "engines": {
+ "node": "^18.0.0 || ^20.0.0 || >=22.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ },
+ "peerDependencies": {
+ "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
+ "jiti": ">=1.21.0",
+ "less": "*",
+ "lightningcss": "^1.21.0",
+ "sass": "*",
+ "sass-embedded": "*",
+ "stylus": "*",
+ "sugarss": "*",
+ "terser": "^5.16.0",
+ "tsx": "^4.8.1",
+ "yaml": "^2.4.2"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
+ "jiti": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "lightningcss": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "sass-embedded": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
+ "optional": true
+ },
+ "tsx": {
+ "optional": true
+ },
+ "yaml": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vite/node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vite/node_modules/picomatch": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/wcwidth": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
+ "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "defaults": "^1.0.3"
+ }
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "license": "ISC",
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/wide-align": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",
+ "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "string-width": "^1.0.2 || 2 || 3 || 4"
+ }
+ },
+ "node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "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",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/wrap-ansi-cjs": {
+ "name": "wrap-ansi",
+ "version": "7.0.0",
+ "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",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "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==",
+ "license": "ISC"
+ },
+ "node_modules/ws": {
+ "version": "8.19.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz",
+ "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/xmlbuilder": {
+ "version": "15.1.1",
+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz",
+ "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/y18n": {
+ "version": "5.0.8",
+ "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": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "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",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "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"
+ }
+ },
+ "node_modules/yauzl": {
+ "version": "2.10.0",
+ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
+ "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "buffer-crc32": "~0.2.3",
+ "fd-slicer": "~1.1.0"
+ }
+ },
+ "node_modules/yocto-queue": {
+ "version": "0.1.0",
+ "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"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/zip-stream": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.1.tgz",
+ "integrity": "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "archiver-utils": "^3.0.4",
+ "compress-commons": "^4.1.2",
+ "readable-stream": "^3.6.0"
+ },
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/zip-stream/node_modules/archiver-utils": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-3.0.4.tgz",
+ "integrity": "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "glob": "^7.2.3",
+ "graceful-fs": "^4.2.0",
+ "lazystream": "^1.0.0",
+ "lodash.defaults": "^4.2.0",
+ "lodash.difference": "^4.5.0",
+ "lodash.flatten": "^4.4.0",
+ "lodash.isplainobject": "^4.0.6",
+ "lodash.union": "^4.6.0",
+ "normalize-path": "^3.0.0",
+ "readable-stream": "^3.6.0"
+ },
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/zip-stream/node_modules/balanced-match": {
+ "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"
+ },
+ "node_modules/zip-stream/node_modules/brace-expansion": {
+ "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/zip-stream/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/zip-stream/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"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/zod": {
+ "version": "3.25.76",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
+ "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
+ "license": "MIT",
+ "peer": true,
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ },
+ "node_modules/zod-to-json-schema": {
+ "version": "3.25.1",
+ "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz",
+ "integrity": "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==",
+ "license": "ISC",
+ "peerDependencies": {
+ "zod": "^3.25 || ^4"
+ }
+ },
+ "node_modules/zustand": {
+ "version": "5.0.11",
+ "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.11.tgz",
+ "integrity": "sha512-fdZY+dk7zn/vbWNCYmzZULHRrss0jx5pPFiOuMZ/5HJN6Yv3u+1Wswy/4MpZEkEGhtNH+pwxZB8OKgUBPzYAGg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.20.0"
+ },
+ "peerDependencies": {
+ "@types/react": ">=18.0.0",
+ "immer": ">=9.0.6",
+ "react": ">=18.0.0",
+ "use-sync-external-store": ">=1.2.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "immer": {
+ "optional": true
+ },
+ "react": {
+ "optional": true
+ },
+ "use-sync-external-store": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/zwitch": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz",
+ "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..a996244
--- /dev/null
+++ b/package.json
@@ -0,0 +1,86 @@
+{
+ "name": "meeting-copilot",
+ "version": "1.0.0",
+ "type": "commonjs",
+ "description": "Meeting Copilot - Record meetings with real-time transcription and AI-powered insights",
+ "author": {
+ "name": "VideoDB",
+ "email": "[email protected]",
+ "url": "https://videodb.io"
+ },
+ "license": "MIT",
+ "main": "dist/main/index.js",
+ "scripts": {
+ "dev": "npm run build:main && concurrently -k \"npm run dev:renderer\" \"sleep 2 && electron .\"",
+ "dev:renderer": "vite",
+ "build": "npm run build:renderer && npm run build:main",
+ "build:main": "tsc -p tsconfig.node.json",
+ "build:renderer": "vite build",
+ "preview": "vite preview",
+ "start": "electron .",
+ "rebuild": "electron-rebuild -f -w better-sqlite3",
+ "postinstall": "electron-rebuild -f -w better-sqlite3 || true",
+ "dist": "npm run build && electron-builder",
+ "dist:mac": "npm run build && electron-builder --mac",
+ "typecheck": "tsc --noEmit && tsc -p tsconfig.node.json --noEmit",
+ "lint": "eslint src --ext .ts,.tsx",
+ "db:generate": "drizzle-kit generate",
+ "db:migrate": "drizzle-kit migrate"
+ },
+ "dependencies": {
+ "@hono/node-server": "^1.14.1",
+ "@hono/trpc-server": "^0.3.4",
+ "@modelcontextprotocol/sdk": "^1.0.0",
+ "@radix-ui/react-accordion": "^1.2.12",
+ "@radix-ui/react-alert-dialog": "^1.1.15",
+ "@radix-ui/react-label": "^2.1.8",
+ "@radix-ui/react-select": "^2.2.6",
+ "@radix-ui/react-tabs": "^1.1.13",
+ "@tanstack/react-query": "^5.75.5",
+ "@trpc/client": "^11.1.2",
+ "@trpc/react-query": "^11.1.2",
+ "@trpc/server": "^11.1.2",
+ "@videodb/recorder": "^0.2.4",
+ "better-sqlite3": "^12.6.2",
+ "cloudflared": "^0.7.1",
+ "drizzle-orm": "^0.44.1",
+ "hono": "^4.7.5",
+ "openai": "^6.19.0",
+ "pino": "^9.6.0",
+ "pino-pretty": "^13.0.0",
+ "react": "^19.1.0",
+ "react-dom": "^19.1.0",
+ "react-markdown": "^10.1.0",
+ "uuid": "^11.1.0",
+ "videodb": "^0.2.0",
+ "zod": "^3.25.4",
+ "zustand": "^5.0.4"
+ },
+ "devDependencies": {
+ "@electron/rebuild": "^3.7.1",
+ "@types/better-sqlite3": "^7.6.13",
+ "@types/node": "^22.15.16",
+ "@types/react": "^19.1.4",
+ "@types/react-dom": "^19.1.3",
+ "@types/uuid": "^10.0.0",
+ "@vitejs/plugin-react": "^4.4.1",
+ "autoprefixer": "^10.4.21",
+ "class-variance-authority": "^0.7.1",
+ "clsx": "^2.1.1",
+ "concurrently": "^9.1.2",
+ "drizzle-kit": "^0.31.0",
+ "electron": "^34.3.0",
+ "electron-builder": "^25.1.8",
+ "lucide-react": "^0.510.0",
+ "postcss": "^8.5.3",
+ "tailwind-merge": "^3.2.0",
+ "tailwindcss": "^3.4.17",
+ "tailwindcss-animate": "^1.0.7",
+ "tsx": "^4.19.4",
+ "typescript": "^5.8.3",
+ "vite": "^6.3.5"
+ },
+ "build": {
+ "extends": "./electron-builder.config.js"
+ }
+}
diff --git a/postcss.config.js b/postcss.config.js
new file mode 100644
index 0000000..12a703d
--- /dev/null
+++ b/postcss.config.js
@@ -0,0 +1,6 @@
+module.exports = {
+ plugins: {
+ tailwindcss: {},
+ autoprefixer: {},
+ },
+};
diff --git a/resources/.gitkeep b/resources/.gitkeep
new file mode 100644
index 0000000..53a6dcb
--- /dev/null
+++ b/resources/.gitkeep
@@ -0,0 +1,11 @@
+# Resources Directory
+
+Place your app icon here:
+- icon.icns (macOS)
+- icon.ico (Windows)
+- icon.png (Linux, 512x512)
+
+You can generate icons from a source PNG using tools like:
+- electron-icon-maker
+- iconutil (macOS)
+- ImageMagick
diff --git a/resources/icon.icns b/resources/icon.icns
new file mode 100644
index 0000000..af116bc
Binary files /dev/null and b/resources/icon.icns differ
diff --git a/resources/logo.jpeg b/resources/logo.jpeg
new file mode 100644
index 0000000..368a154
Binary files /dev/null and b/resources/logo.jpeg differ
diff --git a/screenshot.png b/screenshot.png
new file mode 100644
index 0000000..79696ca
Binary files /dev/null and b/screenshot.png differ
diff --git a/src/main/config/mcp-server-templates.ts b/src/main/config/mcp-server-templates.ts
new file mode 100644
index 0000000..555f3b1
--- /dev/null
+++ b/src/main/config/mcp-server-templates.ts
@@ -0,0 +1,245 @@
+import type { MCPServerTemplate } from '../../shared/types/mcp.types';
+
+/**
+ * Pre-configured MCP Server Templates
+ * These templates provide quick setup for common MCP servers
+ */
+export const mcpServerTemplates: MCPServerTemplate[] = [
+ // CRM Integrations
+ {
+ id: 'hubspot',
+ name: 'HubSpot CRM',
+ description: 'Access HubSpot contacts, deals, and company information during calls',
+ icon: 'hubspot',
+ transport: 'stdio',
+ defaultCommand: 'npx',
+ defaultArgs: ['-y', '@anthropic/hubspot-mcp-server'],
+ requiredEnvVars: [
+ {
+ key: 'HUBSPOT_ACCESS_TOKEN',
+ label: 'HubSpot Access Token',
+ description: 'Your HubSpot private app access token',
+ placeholder: 'pat-na1-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
+ secret: true,
+ },
+ ],
+ docsUrl: 'https://developers.hubspot.com/docs/api/private-apps',
+ setupInstructions:
+ '1. Go to HubSpot Settings > Integrations > Private Apps\n2. Create a new private app\n3. Grant scopes for contacts, companies, and deals\n4. Copy the access token',
+ },
+ {
+ id: 'salesforce',
+ name: 'Salesforce CRM',
+ description: 'Query Salesforce contacts, opportunities, and accounts',
+ icon: 'salesforce',
+ transport: 'stdio',
+ defaultCommand: 'npx',
+ defaultArgs: ['-y', '@anthropic/salesforce-mcp-server'],
+ requiredEnvVars: [
+ {
+ key: 'SALESFORCE_INSTANCE_URL',
+ label: 'Salesforce Instance URL',
+ description: 'Your Salesforce instance URL',
+ placeholder: 'https://yourcompany.my.salesforce.com',
+ secret: false,
+ },
+ {
+ key: 'SALESFORCE_ACCESS_TOKEN',
+ label: 'Salesforce Access Token',
+ description: 'OAuth access token',
+ placeholder: '',
+ secret: true,
+ },
+ ],
+ docsUrl: 'https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/',
+ },
+
+ // Documentation & Knowledge
+ {
+ id: 'notion',
+ name: 'Notion',
+ description: 'Search and retrieve content from your Notion workspace',
+ icon: 'notion',
+ transport: 'stdio',
+ defaultCommand: 'npx',
+ defaultArgs: ['-y', '@anthropic/notion-mcp-server'],
+ requiredEnvVars: [
+ {
+ key: 'NOTION_API_KEY',
+ label: 'Notion Integration Token',
+ description: 'Your Notion internal integration token',
+ placeholder: 'secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
+ secret: true,
+ },
+ ],
+ docsUrl: 'https://developers.notion.com/docs/getting-started',
+ setupInstructions:
+ '1. Go to notion.so/my-integrations\n2. Create a new integration\n3. Copy the Internal Integration Token\n4. Share relevant pages with your integration',
+ },
+ {
+ id: 'confluence',
+ name: 'Confluence',
+ description: 'Access Confluence pages and spaces for product documentation',
+ icon: 'confluence',
+ transport: 'stdio',
+ defaultCommand: 'npx',
+ defaultArgs: ['-y', '@anthropic/confluence-mcp-server'],
+ requiredEnvVars: [
+ {
+ key: 'CONFLUENCE_URL',
+ label: 'Confluence URL',
+ description: 'Your Confluence site URL',
+ placeholder: 'https://yourcompany.atlassian.net/wiki',
+ secret: false,
+ },
+ {
+ key: 'CONFLUENCE_EMAIL',
+ label: 'Email',
+ description: 'Your Atlassian account email',
+ placeholder: '[email protected]',
+ secret: false,
+ },
+ {
+ key: 'CONFLUENCE_API_TOKEN',
+ label: 'API Token',
+ description: 'Atlassian API token',
+ placeholder: '',
+ secret: true,
+ },
+ ],
+ docsUrl: 'https://developer.atlassian.com/cloud/confluence/rest/v1/intro/',
+ },
+
+ // Calendar & Scheduling
+ {
+ id: 'google-calendar',
+ name: 'Google Calendar',
+ description: 'Check availability and schedule follow-up meetings',
+ icon: 'google-calendar',
+ transport: 'stdio',
+ defaultCommand: 'npx',
+ defaultArgs: ['-y', '@anthropic/google-calendar-mcp-server'],
+ requiredEnvVars: [
+ {
+ key: 'GOOGLE_CREDENTIALS_PATH',
+ label: 'Credentials File Path',
+ description: 'Path to your Google OAuth credentials JSON file',
+ placeholder: '/path/to/credentials.json',
+ secret: false,
+ },
+ ],
+ docsUrl: 'https://developers.google.com/calendar/api/quickstart/nodejs',
+ setupInstructions:
+ '1. Enable the Google Calendar API in Google Cloud Console\n2. Create OAuth 2.0 credentials\n3. Download the credentials JSON file\n4. Set the path to the file',
+ },
+
+ // Search & Research
+ {
+ id: 'brave-search',
+ name: 'Brave Search',
+ description: 'Search the web for competitor info, news, and research',
+ icon: 'brave',
+ transport: 'stdio',
+ defaultCommand: 'npx',
+ defaultArgs: ['-y', '@modelcontextprotocol/server-brave-search'],
+ requiredEnvVars: [
+ {
+ key: 'BRAVE_API_KEY',
+ label: 'Brave Search API Key',
+ description: 'Your Brave Search API key',
+ placeholder: 'BSAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
+ secret: true,
+ },
+ ],
+ docsUrl: 'https://brave.com/search/api/',
+ setupInstructions:
+ '1. Go to api.search.brave.com\n2. Sign up for an API key\n3. Copy your API key',
+ },
+
+ // Memory & Context
+ {
+ id: 'memory',
+ name: 'Memory Server',
+ description: 'Store and retrieve notes, insights, and context across calls',
+ icon: 'brain',
+ transport: 'stdio',
+ defaultCommand: 'npx',
+ defaultArgs: ['-y', '@modelcontextprotocol/server-memory'],
+ requiredEnvVars: [],
+ setupInstructions: 'No configuration required. Memory is stored locally.',
+ },
+
+ // File System
+ {
+ id: 'filesystem',
+ name: 'File System',
+ description: 'Access local files like presentation decks and documents',
+ icon: 'folder',
+ transport: 'stdio',
+ defaultCommand: 'npx',
+ defaultArgs: ['-y', '@modelcontextprotocol/server-filesystem', '/path/to/allowed/directory'],
+ requiredEnvVars: [],
+ setupInstructions:
+ 'Update the args to specify which directories the server should have access to.',
+ },
+
+ // Custom Templates
+ {
+ id: 'custom-stdio',
+ name: 'Custom Stdio Server',
+ description: 'Configure a custom MCP server using stdio transport',
+ icon: 'terminal',
+ transport: 'stdio',
+ requiredEnvVars: [],
+ setupInstructions: 'Enter the command and arguments to start your MCP server.',
+ },
+ {
+ id: 'custom-http',
+ name: 'Custom HTTP Server',
+ description: 'Connect to an MCP server over HTTP/SSE',
+ icon: 'globe',
+ transport: 'http',
+ requiredEnvVars: [],
+ setupInstructions: 'Enter the URL of your MCP server endpoint.',
+ },
+];
+
+/**
+ * Get a template by ID
+ */
+export function getMCPServerTemplate(id: string): MCPServerTemplate | undefined {
+ return mcpServerTemplates.find((t) => t.id === id);
+}
+
+/**
+ * Get all available templates
+ */
+export function getAllMCPServerTemplates(): MCPServerTemplate[] {
+ return mcpServerTemplates;
+}
+
+/**
+ * Get templates by category (based on template ID patterns)
+ */
+export function getMCPServerTemplatesByCategory(): Record<string, MCPServerTemplate[]> {
+ return {
+ CRM: mcpServerTemplates.filter((t) =>
+ ['hubspot', 'salesforce'].includes(t.id)
+ ),
+ Documentation: mcpServerTemplates.filter((t) =>
+ ['notion', 'confluence'].includes(t.id)
+ ),
+ Calendar: mcpServerTemplates.filter((t) =>
+ ['google-calendar'].includes(t.id)
+ ),
+ Search: mcpServerTemplates.filter((t) =>
+ ['brave-search'].includes(t.id)
+ ),
+ Utilities: mcpServerTemplates.filter((t) =>
+ ['memory', 'filesystem'].includes(t.id)
+ ),
+ Custom: mcpServerTemplates.filter((t) =>
+ ['custom-stdio', 'custom-http'].includes(t.id)
+ ),
+ };
+}
diff --git a/src/main/db/index.ts b/src/main/db/index.ts
new file mode 100644
index 0000000..a751ac1
--- /dev/null
+++ b/src/main/db/index.ts
@@ -0,0 +1,1258 @@
+import Database from 'better-sqlite3';
+import { drizzle } from 'drizzle-orm/better-sqlite3';
+import { eq, desc, and, gte, lte } from 'drizzle-orm';
+import { app } from 'electron';
+import path from 'path';
+import fs from 'fs';
+import * as schema from './schema';
+import { logger } from '../lib/logger';
+
+let db: ReturnType<typeof drizzle<typeof schema>> | null = null;
+let sqlite: Database.Database | null = null;
+
+export function getDbPath(): string {
+ const userDataPath = app.getPath('userData');
+ const dbDir = path.join(userDataPath, 'data');
+
+ if (!fs.existsSync(dbDir)) {
+ fs.mkdirSync(dbDir, { recursive: true });
+ }
+
+ return path.join(dbDir, 'meeting-copilot.db');
+}
+
+export function initDatabase(): ReturnType<typeof drizzle<typeof schema>> {
+ if (db) return db;
+
+ const dbPath = getDbPath();
+ logger.info({ dbPath }, 'Initializing database');
+
+ sqlite = new Database(dbPath);
+ db = drizzle(sqlite, { schema });
+
+ sqlite.exec(`
+ -- Core tables
+ CREATE TABLE IF NOT EXISTS users (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ name TEXT NOT NULL,
+ api_key TEXT NOT NULL,
+ access_token TEXT NOT NULL UNIQUE
+ );
+
+ CREATE TABLE IF NOT EXISTS recordings (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ video_id TEXT,
+ stream_url TEXT,
+ player_url TEXT,
+ session_id TEXT NOT NULL,
+ duration INTEGER,
+ created_at TEXT NOT NULL DEFAULT (datetime('now')),
+ status TEXT NOT NULL DEFAULT 'recording' CHECK(status IN ('recording', 'processing', 'available', 'failed')),
+ insights TEXT,
+ insights_status TEXT NOT NULL DEFAULT 'pending' CHECK(insights_status IN ('pending', 'processing', 'ready', 'failed')),
+ call_summary TEXT,
+ playbook_snapshot TEXT,
+ metrics_snapshot TEXT
+ );
+
+ -- Meeting Co-Pilot tables
+ CREATE TABLE IF NOT EXISTS transcript_segments (
+ id TEXT PRIMARY KEY,
+ recording_id INTEGER NOT NULL,
+ session_id TEXT NOT NULL,
+ channel TEXT NOT NULL CHECK(channel IN ('me', 'them')),
+ text TEXT NOT NULL,
+ start_time REAL NOT NULL,
+ end_time REAL NOT NULL,
+ is_final INTEGER NOT NULL DEFAULT 0,
+ processed_by_agent INTEGER NOT NULL DEFAULT 0,
+ sentiment TEXT CHECK(sentiment IN ('positive', 'neutral', 'negative')),
+ triggers TEXT,
+ created_at TEXT NOT NULL DEFAULT (datetime('now'))
+ );
+
+ CREATE TABLE IF NOT EXISTS bookmarks (
+ id TEXT PRIMARY KEY,
+ recording_id INTEGER NOT NULL,
+ segment_id TEXT,
+ timestamp REAL NOT NULL,
+ category TEXT NOT NULL CHECK(category IN ('important', 'follow_up', 'pricing', 'competitor', 'risk', 'decision', 'action_item')),
+ note TEXT,
+ created_at TEXT NOT NULL DEFAULT (datetime('now'))
+ );
+
+ CREATE TABLE IF NOT EXISTS cue_cards (
+ id TEXT PRIMARY KEY,
+ objection_type TEXT NOT NULL CHECK(objection_type IN ('pricing', 'timing', 'competitor', 'authority', 'security', 'integration', 'not_interested', 'send_info')),
+ title TEXT NOT NULL,
+ talk_tracks TEXT NOT NULL,
+ follow_up_questions TEXT NOT NULL,
+ proof_points TEXT,
+ avoid_saying TEXT,
+ source_doc TEXT,
+ is_default INTEGER NOT NULL DEFAULT 0,
+ created_at TEXT NOT NULL DEFAULT (datetime('now')),
+ updated_at TEXT NOT NULL DEFAULT (datetime('now'))
+ );
+
+ CREATE TABLE IF NOT EXISTS cue_card_triggers (
+ id TEXT PRIMARY KEY,
+ recording_id INTEGER NOT NULL,
+ segment_id TEXT,
+ cue_card_id TEXT,
+ objection_type TEXT NOT NULL,
+ trigger_text TEXT NOT NULL,
+ confidence REAL,
+ status TEXT NOT NULL DEFAULT 'active' CHECK(status IN ('active', 'pinned', 'dismissed')),
+ feedback TEXT CHECK(feedback IN ('helpful', 'wrong', 'irrelevant')),
+ timestamp REAL NOT NULL,
+ created_at TEXT NOT NULL DEFAULT (datetime('now'))
+ );
+
+ CREATE TABLE IF NOT EXISTS playbooks (
+ id TEXT PRIMARY KEY,
+ name TEXT NOT NULL,
+ type TEXT NOT NULL CHECK(type IN ('MEDDIC', 'Challenger', 'SPIN', 'Custom')),
+ description TEXT,
+ items TEXT NOT NULL,
+ is_default INTEGER NOT NULL DEFAULT 0,
+ created_at TEXT NOT NULL DEFAULT (datetime('now')),
+ updated_at TEXT NOT NULL DEFAULT (datetime('now'))
+ );
+
+ CREATE TABLE IF NOT EXISTS playbook_sessions (
+ id TEXT PRIMARY KEY,
+ recording_id INTEGER NOT NULL,
+ playbook_id TEXT NOT NULL,
+ items_coverage TEXT NOT NULL,
+ completion_snapshot TEXT,
+ created_at TEXT NOT NULL DEFAULT (datetime('now')),
+ updated_at TEXT NOT NULL DEFAULT (datetime('now'))
+ );
+
+ CREATE TABLE IF NOT EXISTS call_metrics_history (
+ id TEXT PRIMARY KEY,
+ recording_id INTEGER NOT NULL,
+ timestamp REAL NOT NULL,
+ talk_ratio_me REAL NOT NULL,
+ talk_ratio_them REAL NOT NULL,
+ pace_wpm REAL,
+ questions_asked INTEGER NOT NULL DEFAULT 0,
+ monologue_detected INTEGER NOT NULL DEFAULT 0,
+ sentiment_trend TEXT CHECK(sentiment_trend IN ('improving', 'stable', 'declining')),
+ created_at TEXT NOT NULL DEFAULT (datetime('now'))
+ );
+
+ CREATE TABLE IF NOT EXISTS nudges_history (
+ id TEXT PRIMARY KEY,
+ recording_id INTEGER NOT NULL,
+ type TEXT NOT NULL CHECK(type IN ('monologue', 'sentiment', 'talk_ratio', 'next_steps', 'pricing', 'playbook', 'questions', 'pace')),
+ message TEXT NOT NULL,
+ severity TEXT NOT NULL CHECK(severity IN ('low', 'medium', 'high')),
+ timestamp REAL NOT NULL,
+ dismissed INTEGER NOT NULL DEFAULT 0,
+ created_at TEXT NOT NULL DEFAULT (datetime('now'))
+ );
+
+ CREATE TABLE IF NOT EXISTS copilot_settings (
+ key TEXT PRIMARY KEY,
+ value TEXT NOT NULL,
+ category TEXT NOT NULL CHECK(category IN ('prompt', 'config', 'threshold')),
+ label TEXT NOT NULL,
+ description TEXT,
+ updated_at TEXT NOT NULL DEFAULT (datetime('now'))
+ );
+
+ -- MCP Tables
+ CREATE TABLE IF NOT EXISTS mcp_servers (
+ id TEXT PRIMARY KEY,
+ name TEXT NOT NULL,
+ transport TEXT NOT NULL CHECK(transport IN ('stdio', 'http')),
+ command TEXT,
+ args TEXT,
+ env TEXT,
+ url TEXT,
+ headers TEXT,
+ template_id TEXT,
+ is_enabled INTEGER NOT NULL DEFAULT 1,
+ auto_connect INTEGER NOT NULL DEFAULT 0,
+ connection_status TEXT NOT NULL DEFAULT 'disconnected' CHECK(connection_status IN ('disconnected', 'connecting', 'connected', 'error')),
+ last_error TEXT,
+ last_connected_at TEXT,
+ created_at TEXT NOT NULL DEFAULT (datetime('now')),
+ updated_at TEXT NOT NULL DEFAULT (datetime('now'))
+ );
+
+ CREATE TABLE IF NOT EXISTS mcp_tool_calls (
+ id TEXT PRIMARY KEY,
+ server_id TEXT NOT NULL,
+ recording_id INTEGER,
+ tool_name TEXT NOT NULL,
+ tool_input TEXT,
+ tool_output TEXT,
+ status TEXT NOT NULL CHECK(status IN ('pending', 'success', 'error')),
+ error_message TEXT,
+ duration_ms INTEGER,
+ trigger_type TEXT NOT NULL CHECK(trigger_type IN ('intent', 'manual', 'test')),
+ created_at TEXT NOT NULL DEFAULT (datetime('now'))
+ );
+
+ -- Indexes
+ CREATE INDEX IF NOT EXISTS idx_users_access_token ON users(access_token);
+ CREATE INDEX IF NOT EXISTS idx_recordings_session_id ON recordings(session_id);
+ CREATE INDEX IF NOT EXISTS idx_transcript_segments_session ON transcript_segments(session_id);
+ CREATE INDEX IF NOT EXISTS idx_transcript_segments_recording ON transcript_segments(recording_id);
+ CREATE INDEX IF NOT EXISTS idx_transcript_segments_channel ON transcript_segments(channel);
+ CREATE INDEX IF NOT EXISTS idx_bookmarks_recording ON bookmarks(recording_id);
+ CREATE INDEX IF NOT EXISTS idx_cue_cards_objection_type ON cue_cards(objection_type);
+ CREATE INDEX IF NOT EXISTS idx_cue_card_triggers_recording ON cue_card_triggers(recording_id);
+ CREATE INDEX IF NOT EXISTS idx_playbook_sessions_recording ON playbook_sessions(recording_id);
+ CREATE INDEX IF NOT EXISTS idx_call_metrics_history_recording ON call_metrics_history(recording_id);
+ CREATE INDEX IF NOT EXISTS idx_nudges_history_recording ON nudges_history(recording_id);
+ CREATE INDEX IF NOT EXISTS idx_mcp_tool_calls_server ON mcp_tool_calls(server_id);
+ CREATE INDEX IF NOT EXISTS idx_mcp_tool_calls_recording ON mcp_tool_calls(recording_id);
+ `);
+
+ ensureRecordingColumns();
+ ensureNudgesHistorySchema();
+
+ seedDefaultCueCards();
+
+ seedDefaultPlaybooks();
+
+ seedDefaultSettings();
+
+ logger.info('Database initialized successfully');
+ return db;
+}
+
+function ensureRecordingColumns(): void {
+ if (!sqlite) return;
+
+ const columns = sqlite
+ .prepare("PRAGMA table_info('recordings')")
+ .all()
+ .map((row: any) => row.name);
+
+ const addColumnIfMissing = (name: string, ddl: string) => {
+ if (!columns.includes(name)) {
+ sqlite!.exec(ddl);
+ logger.info({ column: name }, 'Added missing recordings column');
+ }
+ };
+
+ addColumnIfMissing('call_summary', "ALTER TABLE recordings ADD COLUMN call_summary TEXT");
+ addColumnIfMissing('playbook_snapshot', "ALTER TABLE recordings ADD COLUMN playbook_snapshot TEXT");
+ addColumnIfMissing('metrics_snapshot', "ALTER TABLE recordings ADD COLUMN metrics_snapshot TEXT");
+}
+
+function ensureNudgesHistorySchema(): void {
+ if (!sqlite) return;
+
+ const row = sqlite
+ .prepare("SELECT sql FROM sqlite_master WHERE type='table' AND name='nudges_history'")
+ .get() as { sql?: string } | undefined;
+
+ const tableSql = row?.sql || '';
+ const hasQuestions = tableSql.includes("'questions'");
+ const hasPace = tableSql.includes("'pace'");
+
+ if (hasQuestions && hasPace) {
+ return;
+ }
+
+ logger.warn(
+ { hasQuestions, hasPace },
+ 'nudges_history table is missing newer enum values; rebuilding table'
+ );
+
+ sqlite.exec(`
+ ALTER TABLE nudges_history RENAME TO nudges_history_old;
+
+ CREATE TABLE nudges_history (
+ id TEXT PRIMARY KEY,
+ recording_id INTEGER NOT NULL,
+ type TEXT NOT NULL CHECK(type IN ('monologue', 'sentiment', 'talk_ratio', 'next_steps', 'pricing', 'playbook', 'questions', 'pace')),
+ message TEXT NOT NULL,
+ severity TEXT NOT NULL CHECK(severity IN ('low', 'medium', 'high')),
+ timestamp REAL NOT NULL,
+ dismissed INTEGER NOT NULL DEFAULT 0,
+ created_at TEXT NOT NULL DEFAULT (datetime('now'))
+ );
+
+ INSERT INTO nudges_history (id, recording_id, type, message, severity, timestamp, dismissed, created_at)
+ SELECT id, recording_id, type, message, severity, timestamp, dismissed, created_at
+ FROM nudges_history_old;
+
+ DROP TABLE nudges_history_old;
+ `);
+
+ logger.info('nudges_history table rebuilt with updated enum values');
+}
+
+export function getDatabase(): ReturnType<typeof drizzle<typeof schema>> {
+ if (!db) {
+ throw new Error('Database not initialized. Call initDatabase() first.');
+ }
+ return db;
+}
+
+export function closeDatabase(): void {
+ if (sqlite) {
+ sqlite.close();
+ sqlite = null;
+ db = null;
+ logger.info('Database connection closed');
+ }
+}
+
+export function getUserByAccessToken(accessToken: string) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.users)
+ .where(eq(schema.users.accessToken, accessToken))
+ .get();
+}
+
+export function createUser(data: schema.NewUser) {
+ const database = getDatabase();
+ return database.insert(schema.users).values(data).returning().get();
+}
+
+export function getRecordingById(id: number) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.recordings)
+ .where(eq(schema.recordings.id, id))
+ .get();
+}
+
+export function getRecordingBySessionId(sessionId: string) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.recordings)
+ .where(eq(schema.recordings.sessionId, sessionId))
+ .get();
+}
+
+export function getAllRecordings() {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.recordings)
+ .orderBy(schema.recordings.createdAt)
+ .all();
+}
+
+export function createRecording(data: schema.NewRecording) {
+ const database = getDatabase();
+ return database.insert(schema.recordings).values(data).returning().get();
+}
+
+export function updateRecording(id: number, data: Partial<schema.Recording>) {
+ const database = getDatabase();
+ return database
+ .update(schema.recordings)
+ .set(data)
+ .where(eq(schema.recordings.id, id))
+ .returning()
+ .get();
+}
+
+export function updateRecordingBySessionId(
+ sessionId: string,
+ data: Partial<schema.Recording>
+) {
+ const database = getDatabase();
+ return database
+ .update(schema.recordings)
+ .set(data)
+ .where(eq(schema.recordings.sessionId, sessionId))
+ .returning()
+ .get();
+}
+
+
+export function createTranscriptSegment(data: schema.NewTranscriptSegment) {
+ const database = getDatabase();
+ return database.insert(schema.transcriptSegments).values(data).returning().get();
+}
+
+export function getTranscriptSegmentsByRecording(recordingId: number) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.transcriptSegments)
+ .where(eq(schema.transcriptSegments.recordingId, recordingId))
+ .orderBy(schema.transcriptSegments.startTime)
+ .all();
+}
+
+export function getTranscriptSegmentsBySession(sessionId: string) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.transcriptSegments)
+ .where(eq(schema.transcriptSegments.sessionId, sessionId))
+ .orderBy(schema.transcriptSegments.startTime)
+ .all();
+}
+
+export function getRecentTranscriptSegments(sessionId: string, limit: number = 50) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.transcriptSegments)
+ .where(and(
+ eq(schema.transcriptSegments.sessionId, sessionId),
+ eq(schema.transcriptSegments.isFinal, true)
+ ))
+ .orderBy(desc(schema.transcriptSegments.startTime))
+ .limit(limit)
+ .all()
+ .reverse();
+}
+
+export function updateTranscriptSegment(id: string, data: Partial<schema.TranscriptSegment>) {
+ const database = getDatabase();
+ return database
+ .update(schema.transcriptSegments)
+ .set(data)
+ .where(eq(schema.transcriptSegments.id, id))
+ .returning()
+ .get();
+}
+
+export function deleteTranscriptSegmentsBySession(sessionId: string) {
+ const database = getDatabase();
+ return database
+ .delete(schema.transcriptSegments)
+ .where(eq(schema.transcriptSegments.sessionId, sessionId));
+}
+
+
+export function createBookmark(data: schema.NewBookmark) {
+ const database = getDatabase();
+ return database.insert(schema.bookmarks).values(data).returning().get();
+}
+
+export function getBookmarksByRecording(recordingId: number) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.bookmarks)
+ .where(eq(schema.bookmarks.recordingId, recordingId))
+ .orderBy(schema.bookmarks.timestamp)
+ .all();
+}
+
+export function deleteBookmark(id: string) {
+ const database = getDatabase();
+ return database.delete(schema.bookmarks).where(eq(schema.bookmarks.id, id));
+}
+
+
+export function getCueCardsByType(objectionType: string) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.cueCards)
+ .where(eq(schema.cueCards.objectionType, objectionType as any))
+ .all();
+}
+
+export function getAllCueCards() {
+ const database = getDatabase();
+ return database.select().from(schema.cueCards).all();
+}
+
+export function createCueCard(data: schema.NewCueCard) {
+ const database = getDatabase();
+ return database.insert(schema.cueCards).values(data).returning().get();
+}
+
+export function updateCueCard(id: string, data: Partial<schema.CueCard>) {
+ const database = getDatabase();
+ return database
+ .update(schema.cueCards)
+ .set({ ...data, updatedAt: new Date().toISOString() })
+ .where(eq(schema.cueCards.id, id))
+ .returning()
+ .get();
+}
+
+
+export function createCueCardTrigger(data: schema.NewCueCardTrigger) {
+ const database = getDatabase();
+ return database.insert(schema.cueCardTriggers).values(data).returning().get();
+}
+
+export function getCueCardTriggersByRecording(recordingId: number) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.cueCardTriggers)
+ .where(eq(schema.cueCardTriggers.recordingId, recordingId))
+ .orderBy(schema.cueCardTriggers.timestamp)
+ .all();
+}
+
+export function updateCueCardTrigger(id: string, data: Partial<schema.CueCardTrigger>) {
+ const database = getDatabase();
+ return database
+ .update(schema.cueCardTriggers)
+ .set(data)
+ .where(eq(schema.cueCardTriggers.id, id))
+ .returning()
+ .get();
+}
+
+
+export function getPlaybookById(id: string) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.playbooks)
+ .where(eq(schema.playbooks.id, id))
+ .get();
+}
+
+export function getAllPlaybooks() {
+ const database = getDatabase();
+ return database.select().from(schema.playbooks).all();
+}
+
+export function getDefaultPlaybook() {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.playbooks)
+ .where(eq(schema.playbooks.isDefault, true))
+ .get();
+}
+
+export function createPlaybook(data: schema.NewPlaybook) {
+ const database = getDatabase();
+ return database.insert(schema.playbooks).values(data).returning().get();
+}
+
+
+export function createPlaybookSession(data: schema.NewPlaybookSession) {
+ const database = getDatabase();
+ return database.insert(schema.playbookSessions).values(data).returning().get();
+}
+
+export function getPlaybookSessionByRecording(recordingId: number) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.playbookSessions)
+ .where(eq(schema.playbookSessions.recordingId, recordingId))
+ .get();
+}
+
+export function updatePlaybookSession(id: string, data: Partial<schema.PlaybookSession>) {
+ const database = getDatabase();
+ return database
+ .update(schema.playbookSessions)
+ .set({ ...data, updatedAt: new Date().toISOString() })
+ .where(eq(schema.playbookSessions.id, id))
+ .returning()
+ .get();
+}
+
+
+export function createCallMetricsSnapshot(data: schema.NewCallMetricsHistory) {
+ const database = getDatabase();
+ return database.insert(schema.callMetricsHistory).values(data).returning().get();
+}
+
+export function getCallMetricsHistory(recordingId: number) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.callMetricsHistory)
+ .where(eq(schema.callMetricsHistory.recordingId, recordingId))
+ .orderBy(schema.callMetricsHistory.timestamp)
+ .all();
+}
+
+
+export function createNudge(data: schema.NewNudgeHistory) {
+ const database = getDatabase();
+ return database.insert(schema.nudgesHistory).values(data).returning().get();
+}
+
+export function getNudgesByRecording(recordingId: number) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.nudgesHistory)
+ .where(eq(schema.nudgesHistory.recordingId, recordingId))
+ .orderBy(schema.nudgesHistory.timestamp)
+ .all();
+}
+
+export function dismissNudge(id: string) {
+ const database = getDatabase();
+ return database
+ .update(schema.nudgesHistory)
+ .set({ dismissed: true })
+ .where(eq(schema.nudgesHistory.id, id))
+ .returning()
+ .get();
+}
+
+
+export function getSetting(key: string) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.copilotSettings)
+ .where(eq(schema.copilotSettings.key, key))
+ .get();
+}
+
+export function getSettingsByCategory(category: 'prompt' | 'config' | 'threshold') {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.copilotSettings)
+ .where(eq(schema.copilotSettings.category, category))
+ .all();
+}
+
+export function getAllSettings() {
+ const database = getDatabase();
+ return database.select().from(schema.copilotSettings).all();
+}
+
+export function upsertSetting(data: schema.NewCopilotSetting) {
+ const database = getDatabase();
+ const existing = database
+ .select()
+ .from(schema.copilotSettings)
+ .where(eq(schema.copilotSettings.key, data.key))
+ .get();
+
+ if (existing) {
+ return database
+ .update(schema.copilotSettings)
+ .set({ ...data, updatedAt: new Date().toISOString() })
+ .where(eq(schema.copilotSettings.key, data.key))
+ .returning()
+ .get();
+ }
+ return database.insert(schema.copilotSettings).values(data).returning().get();
+}
+
+export function deleteSetting(key: string) {
+ const database = getDatabase();
+ return database.delete(schema.copilotSettings).where(eq(schema.copilotSettings.key, key));
+}
+
+
+export function deleteCueCard(id: string) {
+ const database = getDatabase();
+ return database.delete(schema.cueCards).where(eq(schema.cueCards.id, id));
+}
+
+export function updatePlaybook(id: string, data: Partial<schema.Playbook>) {
+ const database = getDatabase();
+ return database
+ .update(schema.playbooks)
+ .set({ ...data, updatedAt: new Date().toISOString() })
+ .where(eq(schema.playbooks.id, id))
+ .returning()
+ .get();
+}
+
+export function deletePlaybook(id: string) {
+ const database = getDatabase();
+ return database.delete(schema.playbooks).where(eq(schema.playbooks.id, id));
+}
+
+export function setDefaultPlaybook(id: string) {
+ const database = getDatabase();
+ database.update(schema.playbooks).set({ isDefault: false }).run();
+ return database
+ .update(schema.playbooks)
+ .set({ isDefault: true })
+ .where(eq(schema.playbooks.id, id))
+ .returning()
+ .get();
+}
+
+
+function seedDefaultCueCards() {
+ const database = getDatabase();
+
+ const existing = database
+ .select()
+ .from(schema.cueCards)
+ .where(eq(schema.cueCards.isDefault, true))
+ .get();
+
+ if (existing) return;
+
+ const defaultCueCards: schema.NewCueCard[] = [
+ {
+ id: 'cue-pricing-default',
+ objectionType: 'pricing',
+ title: 'Handling Pricing Objections',
+ talkTracks: JSON.stringify([
+ "I understand budget is a concern. Let's talk about the ROI you'd see.",
+ "What would the cost of NOT solving this problem be?",
+ "Many customers initially had the same concern, but found the value exceeded expectations.",
+ "Let's break down the investment relative to the results you'd achieve."
+ ]),
+ followUpQuestions: JSON.stringify([
+ "What budget range were you expecting?",
+ "How do you typically evaluate ROI on tools like this?",
+ "What's the cost of your current approach?"
+ ]),
+ proofPoints: JSON.stringify([
+ "Average customer sees 3x ROI within 6 months",
+ "Reduces manual work by 40%"
+ ]),
+ avoidSaying: JSON.stringify([
+ "I can give you a discount",
+ "It's not that expensive"
+ ]),
+ isDefault: true,
+ },
+ {
+ id: 'cue-timing-default',
+ objectionType: 'timing',
+ title: 'Handling Timing Objections',
+ talkTracks: JSON.stringify([
+ "I hear that timing is a factor. What would need to change for this to become a priority?",
+ "What's happening next quarter that makes it better timing?",
+ "Many customers felt the same, but found that starting now gave them a head start.",
+ "Let's identify what a pilot might look like to build confidence."
+ ]),
+ followUpQuestions: JSON.stringify([
+ "What other initiatives are competing for attention?",
+ "Who else would need to be involved in this decision?",
+ "What would make this urgent?"
+ ]),
+ isDefault: true,
+ },
+ {
+ id: 'cue-competitor-default',
+ objectionType: 'competitor',
+ title: 'Handling Competitor Mentions',
+ talkTracks: JSON.stringify([
+ "That's a solid option. What specifically drew you to them?",
+ "We often see customers compare us. Here's where we differentiate...",
+ "What criteria are most important in your evaluation?",
+ "Happy to do a side-by-side comparison on the areas that matter most to you."
+ ]),
+ followUpQuestions: JSON.stringify([
+ "What's working well with your current solution?",
+ "What gaps are you hoping to fill?",
+ "Are you actively evaluating alternatives?"
+ ]),
+ isDefault: true,
+ },
+ {
+ id: 'cue-authority-default',
+ objectionType: 'authority',
+ title: 'Handling Authority Objections',
+ talkTracks: JSON.stringify([
+ "Totally understand. Who else would be involved in this decision?",
+ "What would they need to see to feel confident?",
+ "Would it help if I prepared materials for your internal discussion?",
+ "Let's make sure we address their concerns proactively."
+ ]),
+ followUpQuestions: JSON.stringify([
+ "What's your typical buying process?",
+ "Who signs off on purchases like this?",
+ "Would a meeting with all stakeholders be helpful?"
+ ]),
+ isDefault: true,
+ },
+ {
+ id: 'cue-security-default',
+ objectionType: 'security',
+ title: 'Handling Security Concerns',
+ talkTracks: JSON.stringify([
+ "Security is critical. Here's how we approach it...",
+ "We're SOC 2 Type II certified and GDPR compliant.",
+ "I can connect you with our security team for a detailed review.",
+ "What specific security requirements do you have?"
+ ]),
+ followUpQuestions: JSON.stringify([
+ "What compliance frameworks do you need to meet?",
+ "Who handles security reviews on your side?",
+ "Would you like to see our security documentation?"
+ ]),
+ isDefault: true,
+ },
+ {
+ id: 'cue-integration-default',
+ objectionType: 'integration',
+ title: 'Handling Integration Questions',
+ talkTracks: JSON.stringify([
+ "Great question on integrations. We connect with...",
+ "Our API is well-documented and our team can support custom integrations.",
+ "What systems would this need to work with?",
+ "Let me show you how other customers have integrated."
+ ]),
+ followUpQuestions: JSON.stringify([
+ "What's your current tech stack?",
+ "What data would need to flow between systems?",
+ "Do you have internal resources for integrations?"
+ ]),
+ isDefault: true,
+ },
+ ];
+
+ for (const card of defaultCueCards) {
+ database.insert(schema.cueCards).values(card).run();
+ }
+
+ logger.info('Seeded default cue cards');
+}
+
+function seedDefaultPlaybooks() {
+ const database = getDatabase();
+
+ const existing = database
+ .select()
+ .from(schema.playbooks)
+ .where(eq(schema.playbooks.id, 'playbook-meddic'))
+ .get();
+
+ if (existing) return;
+
+ const meddicPlaybook: schema.NewPlaybook = {
+ id: 'playbook-meddic',
+ name: 'MEDDIC Methodology',
+ type: 'MEDDIC',
+ description: 'A qualification framework focusing on Metrics, Economic Buyer, Decision Criteria, Decision Process, Identify Pain, and Champion.',
+ items: JSON.stringify([
+ {
+ id: 'm-metrics',
+ label: 'Metrics',
+ description: 'Quantify the business impact and ROI',
+ keywords: ['ROI', 'cost savings', 'revenue', 'efficiency', 'metrics', 'numbers', 'measure', 'KPI'],
+ suggestedQuestions: [
+ 'What metrics matter most to your team?',
+ 'How do you measure success today?',
+ 'What would success look like in numbers?',
+ 'What\'s the potential impact on revenue/costs?'
+ ],
+ detectionPrompt: 'Did the conversation discuss quantifiable business metrics, ROI, or measurable outcomes?',
+ status: 'missing',
+ evidence: []
+ },
+ {
+ id: 'e-economic-buyer',
+ label: 'Economic Buyer',
+ description: 'Identify who has budget authority',
+ keywords: ['budget', 'decision maker', 'approve', 'CFO', 'procurement', 'sign off', 'authority'],
+ suggestedQuestions: [
+ 'Who controls the budget for this initiative?',
+ 'Who needs to sign off on this purchase?',
+ 'What\'s your procurement process?',
+ 'Who else should be involved in this discussion?'
+ ],
+ detectionPrompt: 'Was the economic buyer or budget authority identified in the conversation?',
+ status: 'missing',
+ evidence: []
+ },
+ {
+ id: 'd-decision-criteria',
+ label: 'Decision Criteria',
+ description: 'Understand how they will evaluate solutions',
+ keywords: ['criteria', 'requirements', 'must have', 'evaluate', 'compare', 'features', 'needs'],
+ suggestedQuestions: [
+ 'What criteria will you use to make this decision?',
+ 'What are your must-have requirements?',
+ 'How will you evaluate different options?',
+ 'What would make one solution stand out?'
+ ],
+ detectionPrompt: 'Were the decision criteria or evaluation requirements discussed?',
+ status: 'missing',
+ evidence: []
+ },
+ {
+ id: 'd-decision-process',
+ label: 'Decision Process',
+ description: 'Map out the buying process and timeline',
+ keywords: ['process', 'timeline', 'steps', 'approval', 'buying', 'next steps', 'when'],
+ suggestedQuestions: [
+ 'What\'s your typical buying process?',
+ 'What are the steps to get this approved?',
+ 'What\'s your timeline for making a decision?',
+ 'Who else needs to be involved?'
+ ],
+ detectionPrompt: 'Was the decision-making process or timeline discussed?',
+ status: 'missing',
+ evidence: []
+ },
+ {
+ id: 'i-identify-pain',
+ label: 'Identify Pain',
+ description: 'Uncover the business problems and challenges',
+ keywords: ['problem', 'challenge', 'pain', 'issue', 'struggle', 'difficulty', 'frustration', 'bottleneck'],
+ suggestedQuestions: [
+ 'What challenges are you facing today?',
+ 'What\'s the impact of this problem on your business?',
+ 'How long has this been an issue?',
+ 'What happens if you don\'t solve this?'
+ ],
+ detectionPrompt: 'Were specific pain points, challenges, or problems discussed?',
+ status: 'missing',
+ evidence: []
+ },
+ {
+ id: 'c-champion',
+ label: 'Champion',
+ description: 'Identify an internal advocate',
+ keywords: ['champion', 'advocate', 'internal', 'support', 'sponsor', 'push', 'drive'],
+ suggestedQuestions: [
+ 'Who internally would champion this initiative?',
+ 'Who else is excited about solving this problem?',
+ 'Who can help drive this forward internally?',
+ 'Who would benefit most from this solution?'
+ ],
+ detectionPrompt: 'Was an internal champion or advocate identified?',
+ status: 'missing',
+ evidence: []
+ }
+ ]),
+ isDefault: true,
+ };
+
+ database.insert(schema.playbooks).values(meddicPlaybook).run();
+
+ const challengerPlaybook: schema.NewPlaybook = {
+ id: 'playbook-challenger',
+ name: 'Challenger Method',
+ type: 'Challenger',
+ description: 'A methodology focused on teaching, tailoring, and taking control of the conversation.',
+ items: JSON.stringify([
+ {
+ id: 'teach',
+ label: 'Teach',
+ description: 'Share unique insights and perspectives',
+ keywords: ['insight', 'research', 'data', 'trend', 'industry', 'benchmark', 'best practice'],
+ suggestedQuestions: [
+ 'Have you seen the latest research on...?',
+ 'What trends are you noticing in your industry?',
+ 'How does your approach compare to industry benchmarks?'
+ ],
+ detectionPrompt: 'Did you share unique insights or teach the participant something new?',
+ status: 'missing',
+ evidence: []
+ },
+ {
+ id: 'tailor',
+ label: 'Tailor',
+ description: 'Customize the message to the participant',
+ keywords: ['specific', 'your situation', 'customize', 'relevant', 'for you', 'in your case'],
+ suggestedQuestions: [
+ 'How does this apply to your specific situation?',
+ 'What\'s unique about your environment?',
+ 'How would this work in your context?'
+ ],
+ detectionPrompt: 'Was the conversation tailored to the participant\'s specific situation?',
+ status: 'missing',
+ evidence: []
+ },
+ {
+ id: 'take-control',
+ label: 'Take Control',
+ description: 'Guide the conversation and next steps',
+ keywords: ['next step', 'recommend', 'suggest', 'should', 'let\'s', 'I propose'],
+ suggestedQuestions: [
+ 'I recommend we...',
+ 'The next step should be...',
+ 'Let\'s set up...'
+ ],
+ detectionPrompt: 'Did you take control by guiding next steps and recommendations?',
+ status: 'missing',
+ evidence: []
+ }
+ ]),
+ isDefault: false,
+ };
+
+ database.insert(schema.playbooks).values(challengerPlaybook).run();
+
+ logger.info('Seeded default playbooks');
+}
+
+function seedDefaultSettings() {
+ const database = getDatabase();
+
+ const existing = database
+ .select()
+ .from(schema.copilotSettings)
+ .get();
+
+ if (existing) return;
+
+ const defaultSettings: schema.NewCopilotSetting[] = [
+ {
+ key: 'prompt_sentiment_analysis',
+ category: 'prompt',
+ label: 'Sentiment Analysis Prompt',
+ description: 'Prompt used to analyze participant sentiment when pattern matching is inconclusive',
+ value: `Analyze the sentiment of this participant statement in a meeting context.
+Return ONLY one word: "positive", "neutral", or "negative"
+
+Statement: "{text}"
+
+Sentiment:`,
+ },
+ {
+ key: 'prompt_objection_detection',
+ category: 'prompt',
+ label: 'Objection Detection Prompt',
+ description: 'Prompt used to detect objections in participant speech',
+ value: `Analyze this participant statement from a meeting for objections.
+
+Statement: "{text}"
+
+Identify if this contains an objection. If yes, classify it as one of:
+- pricing (cost, budget, expensive)
+- timing (not now, later, next quarter)
+- competitor (using another solution)
+- authority (need approval, decision maker)
+- security (data, compliance, privacy)
+- integration (technical fit, compatibility)
+- not_interested (no need, not a priority)
+- send_info (just send materials)
+
+Return JSON: {"hasObjection": boolean, "type": string or null, "confidence": 0-1}`,
+ },
+ {
+ key: 'prompt_summary_bullets',
+ category: 'prompt',
+ label: 'Summary Bullets Prompt',
+ description: 'Prompt used to generate meeting summary bullet points',
+ value: `Analyze this meeting transcript and extract 3-5 key summary bullets.
+Focus on main discussion points, decisions, and outcomes.
+
+Transcript:
+{transcript}
+
+Return JSON array of strings: ["bullet1", "bullet2", ...]`,
+ },
+ {
+ key: 'prompt_pain_points',
+ category: 'prompt',
+ label: 'Pain Points Extraction Prompt',
+ description: 'Prompt used to extract pain points from the meeting',
+ value: `Analyze this meeting transcript and identify participant pain points.
+Look for problems, challenges, frustrations, and inefficiencies mentioned.
+
+Transcript:
+{transcript}
+
+Return JSON array of strings: ["pain1", "pain2", ...]`,
+ },
+ {
+ key: 'prompt_next_steps',
+ category: 'prompt',
+ label: 'Next Steps Extraction Prompt',
+ description: 'Prompt used to extract action items and next steps',
+ value: `Analyze this meeting transcript and identify all action items and next steps.
+For each, identify who is responsible (me=you, them=other participant, both).
+
+Transcript:
+{transcript}
+
+Return JSON array: [{"action": "string", "owner": "me"|"them"|"both", "priority": "high"|"medium"|"low"}]`,
+ },
+ {
+ key: 'threshold_monologue_seconds',
+ category: 'threshold',
+ label: 'Monologue Alert Threshold',
+ description: 'Seconds of continuous talking before triggering a monologue nudge',
+ value: '60',
+ },
+ {
+ key: 'threshold_talk_ratio_max',
+ category: 'threshold',
+ label: 'Max Talk Ratio',
+ description: 'Maximum percentage you should be talking (triggers nudge if exceeded)',
+ value: '70',
+ },
+ {
+ key: 'threshold_pace_max_wpm',
+ category: 'threshold',
+ label: 'Max Speaking Pace',
+ description: 'Maximum words per minute before pace nudge (typical conversation is 120-150)',
+ value: '180',
+ },
+ {
+ key: 'threshold_nudge_cooldown_ms',
+ category: 'threshold',
+ label: 'Nudge Cooldown',
+ description: 'Minimum milliseconds between nudges',
+ value: '120000',
+ },
+ {
+ key: 'config_llm_detection',
+ category: 'config',
+ label: 'Use LLM for Detection',
+ description: 'Use AI for objection/sentiment detection (more accurate but slower)',
+ value: 'true',
+ },
+ {
+ key: 'config_auto_bookmark_objections',
+ category: 'config',
+ label: 'Auto-Bookmark Objections',
+ description: 'Automatically create bookmarks when objections are detected',
+ value: 'true',
+ },
+ ];
+
+ for (const setting of defaultSettings) {
+ database.insert(schema.copilotSettings).values(setting).run();
+ }
+
+ logger.info('Seeded default copilot settings');
+}
+
+// MCP Server CRUD Operations
+
+export function createMCPServer(data: schema.NewMCPServer) {
+ const database = getDatabase();
+ return database.insert(schema.mcpServers).values(data).returning().get();
+}
+
+export function getMCPServerById(id: string) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.mcpServers)
+ .where(eq(schema.mcpServers.id, id))
+ .get();
+}
+
+export function getAllMCPServers() {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.mcpServers)
+ .orderBy(schema.mcpServers.createdAt)
+ .all();
+}
+
+export function getEnabledMCPServers() {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.mcpServers)
+ .where(eq(schema.mcpServers.isEnabled, true))
+ .all();
+}
+
+export function getAutoConnectMCPServers() {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.mcpServers)
+ .where(and(
+ eq(schema.mcpServers.isEnabled, true),
+ eq(schema.mcpServers.autoConnect, true)
+ ))
+ .all();
+}
+
+export function updateMCPServer(id: string, data: Partial<schema.MCPServer>) {
+ const database = getDatabase();
+ return database
+ .update(schema.mcpServers)
+ .set({ ...data, updatedAt: new Date().toISOString() })
+ .where(eq(schema.mcpServers.id, id))
+ .returning()
+ .get();
+}
+
+export function updateMCPServerStatus(
+ id: string,
+ status: 'disconnected' | 'connecting' | 'connected' | 'error',
+ error?: string
+) {
+ const database = getDatabase();
+ const updates: Partial<schema.MCPServer> = {
+ connectionStatus: status,
+ updatedAt: new Date().toISOString(),
+ };
+
+ if (status === 'connected') {
+ updates.lastConnectedAt = new Date().toISOString();
+ updates.lastError = null;
+ } else if (status === 'error' && error) {
+ updates.lastError = error;
+ }
+
+ return database
+ .update(schema.mcpServers)
+ .set(updates)
+ .where(eq(schema.mcpServers.id, id))
+ .returning()
+ .get();
+}
+
+export function deleteMCPServer(id: string) {
+ const database = getDatabase();
+ return database.delete(schema.mcpServers).where(eq(schema.mcpServers.id, id));
+}
+
+// MCP Tool Call CRUD Operations
+
+export function createMCPToolCall(data: schema.NewMCPToolCall) {
+ const database = getDatabase();
+ return database.insert(schema.mcpToolCalls).values(data).returning().get();
+}
+
+export function getMCPToolCallById(id: string) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.mcpToolCalls)
+ .where(eq(schema.mcpToolCalls.id, id))
+ .get();
+}
+
+export function getMCPToolCallsByServer(serverId: string) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.mcpToolCalls)
+ .where(eq(schema.mcpToolCalls.serverId, serverId))
+ .orderBy(desc(schema.mcpToolCalls.createdAt))
+ .all();
+}
+
+export function getMCPToolCallsByRecording(recordingId: number) {
+ const database = getDatabase();
+ return database
+ .select()
+ .from(schema.mcpToolCalls)
+ .where(eq(schema.mcpToolCalls.recordingId, recordingId))
+ .orderBy(schema.mcpToolCalls.createdAt)
+ .all();
+}
+
+export function updateMCPToolCall(id: string, data: Partial<schema.MCPToolCall>) {
+ const database = getDatabase();
+ return database
+ .update(schema.mcpToolCalls)
+ .set(data)
+ .where(eq(schema.mcpToolCalls.id, id))
+ .returning()
+ .get();
+}
+
+export { schema };
diff --git a/src/main/db/schema.ts b/src/main/db/schema.ts
new file mode 100644
index 0000000..3c3c124
--- /dev/null
+++ b/src/main/db/schema.ts
@@ -0,0 +1,291 @@
+import { sqliteTable, text, integer, real, index } from 'drizzle-orm/sqlite-core';
+import { sql } from 'drizzle-orm';
+
+// Core Tables (Existing)
+
+export const users = sqliteTable('users', {
+ id: integer('id').primaryKey({ autoIncrement: true }),
+ name: text('name').notNull(),
+ apiKey: text('api_key').notNull(),
+ accessToken: text('access_token').notNull().unique(),
+});
+
+export const recordings = sqliteTable('recordings', {
+ id: integer('id').primaryKey({ autoIncrement: true }),
+ videoId: text('video_id'),
+ streamUrl: text('stream_url'),
+ playerUrl: text('player_url'),
+ sessionId: text('session_id').notNull(),
+ duration: integer('duration'),
+ createdAt: text('created_at').notNull().default(sql`(datetime('now'))`),
+ status: text('status', { enum: ['recording', 'processing', 'available', 'failed'] })
+ .notNull()
+ .default('recording'),
+ insights: text('insights'),
+ insightsStatus: text('insights_status', { enum: ['pending', 'processing', 'ready', 'failed'] })
+ .notNull()
+ .default('pending'),
+ // Enhanced fields for Meeting Co-Pilot
+ callSummary: text('call_summary'), // JSON: CallSummary object
+ playbookSnapshot: text('playbook_snapshot'), // JSON: final playbook coverage
+ metricsSnapshot: text('metrics_snapshot'), // JSON: final conversation metrics
+});
+
+// Meeting Co-Pilot Tables
+
+/**
+ * Transcript Segments
+ * Stores individual transcript segments with rich metadata for real-time processing
+ * Note: WebSocket provides: text, is_final, start (epoch), end (epoch)
+ * We infer channel from WebSocket source (mic = 'me', system_audio = 'them')
+ */
+export const transcriptSegments = sqliteTable('transcript_segments', {
+ id: text('id').primaryKey(), // UUID generated on insert
+ recordingId: integer('recording_id').notNull(),
+ sessionId: text('session_id').notNull(),
+ channel: text('channel', { enum: ['me', 'them'] }).notNull(),
+ text: text('text').notNull(),
+ startTime: real('start_time').notNull(), // seconds from call start
+ endTime: real('end_time').notNull(),
+ isFinal: integer('is_final', { mode: 'boolean' }).notNull().default(false),
+ processedByAgent: integer('processed_by_agent', { mode: 'boolean' }).notNull().default(false),
+ sentiment: text('sentiment', { enum: ['positive', 'neutral', 'negative'] }),
+ triggers: text('triggers'), // JSON array: ['objection:pricing', 'playbook:pain']
+ createdAt: text('created_at').notNull().default(sql`(datetime('now'))`),
+}, (table) => ({
+ sessionIdx: index('idx_transcript_segments_session').on(table.sessionId),
+ recordingIdx: index('idx_transcript_segments_recording').on(table.recordingId),
+ channelIdx: index('idx_transcript_segments_channel').on(table.channel),
+}));
+
+/**
+ * Bookmarks
+ * User-created markers on important moments during calls
+ */
+export const bookmarks = sqliteTable('bookmarks', {
+ id: text('id').primaryKey(),
+ recordingId: integer('recording_id').notNull(),
+ segmentId: text('segment_id'),
+ timestamp: real('timestamp').notNull(), // seconds from call start
+ category: text('category', {
+ enum: ['important', 'follow_up', 'pricing', 'competitor', 'risk', 'decision', 'action_item']
+ }).notNull(),
+ note: text('note'),
+ createdAt: text('created_at').notNull().default(sql`(datetime('now'))`),
+}, (table) => ({
+ recordingIdx: index('idx_bookmarks_recording').on(table.recordingId),
+}));
+
+/**
+ * Cue Cards
+ * Pre-configured objection handling cards with talk tracks
+ */
+export const cueCards = sqliteTable('cue_cards', {
+ id: text('id').primaryKey(),
+ objectionType: text('objection_type', {
+ enum: ['pricing', 'timing', 'competitor', 'authority', 'security', 'integration', 'not_interested', 'send_info']
+ }).notNull(),
+ title: text('title').notNull(),
+ talkTracks: text('talk_tracks').notNull(), // JSON array of strings
+ followUpQuestions: text('follow_up_questions').notNull(), // JSON array
+ proofPoints: text('proof_points'), // JSON array, optional
+ avoidSaying: text('avoid_saying'), // JSON array, optional
+ sourceDoc: text('source_doc'), // reference to enablement doc
+ isDefault: integer('is_default', { mode: 'boolean' }).notNull().default(false),
+ createdAt: text('created_at').notNull().default(sql`(datetime('now'))`),
+ updatedAt: text('updated_at').notNull().default(sql`(datetime('now'))`),
+}, (table) => ({
+ objectionTypeIdx: index('idx_cue_cards_objection_type').on(table.objectionType),
+}));
+
+/**
+ * Cue Card Triggers
+ * Track when cue cards are shown during calls
+ */
+export const cueCardTriggers = sqliteTable('cue_card_triggers', {
+ id: text('id').primaryKey(),
+ recordingId: integer('recording_id').notNull(),
+ segmentId: text('segment_id'),
+ cueCardId: text('cue_card_id'),
+ objectionType: text('objection_type').notNull(),
+ triggerText: text('trigger_text').notNull(),
+ confidence: real('confidence'),
+ status: text('status', { enum: ['active', 'pinned', 'dismissed'] }).notNull().default('active'),
+ feedback: text('feedback', { enum: ['helpful', 'wrong', 'irrelevant'] }),
+ timestamp: real('timestamp').notNull(), // seconds from call start
+ createdAt: text('created_at').notNull().default(sql`(datetime('now'))`),
+}, (table) => ({
+ recordingIdx: index('idx_cue_card_triggers_recording').on(table.recordingId),
+}));
+
+/**
+ * Playbooks
+ * Meeting methodology definitions (MEDDIC, Challenger, Custom)
+ */
+export const playbooks = sqliteTable('playbooks', {
+ id: text('id').primaryKey(),
+ name: text('name').notNull(),
+ type: text('type', { enum: ['MEDDIC', 'Challenger', 'SPIN', 'Custom'] }).notNull(),
+ description: text('description'),
+ items: text('items').notNull(), // JSON array of PlaybookItem
+ isDefault: integer('is_default', { mode: 'boolean' }).notNull().default(false),
+ createdAt: text('created_at').notNull().default(sql`(datetime('now'))`),
+ updatedAt: text('updated_at').notNull().default(sql`(datetime('now'))`),
+});
+
+/**
+ * Playbook Sessions
+ * Track playbook coverage per call
+ */
+export const playbookSessions = sqliteTable('playbook_sessions', {
+ id: text('id').primaryKey(),
+ recordingId: integer('recording_id').notNull(),
+ playbookId: text('playbook_id').notNull(),
+ itemsCoverage: text('items_coverage').notNull(), // JSON with coverage status per item
+ completionSnapshot: text('completion_snapshot'), // JSON final summary
+ createdAt: text('created_at').notNull().default(sql`(datetime('now'))`),
+ updatedAt: text('updated_at').notNull().default(sql`(datetime('now'))`),
+}, (table) => ({
+ recordingIdx: index('idx_playbook_sessions_recording').on(table.recordingId),
+}));
+
+/**
+ * Call Metrics History
+ * Store periodic snapshots of conversation metrics during call
+ */
+export const callMetricsHistory = sqliteTable('call_metrics_history', {
+ id: text('id').primaryKey(),
+ recordingId: integer('recording_id').notNull(),
+ timestamp: real('timestamp').notNull(), // seconds from call start
+ talkRatioMe: real('talk_ratio_me').notNull(),
+ talkRatioThem: real('talk_ratio_them').notNull(),
+ paceWpm: real('pace_wpm'),
+ questionsAsked: integer('questions_asked').notNull().default(0),
+ monologueDetected: integer('monologue_detected', { mode: 'boolean' }).notNull().default(false),
+ sentimentTrend: text('sentiment_trend', { enum: ['improving', 'stable', 'declining'] }),
+ createdAt: text('created_at').notNull().default(sql`(datetime('now'))`),
+}, (table) => ({
+ recordingIdx: index('idx_call_metrics_history_recording').on(table.recordingId),
+}));
+
+/**
+ * Nudges History
+ * Track nudges shown during calls
+ */
+export const nudgesHistory = sqliteTable('nudges_history', {
+ id: text('id').primaryKey(),
+ recordingId: integer('recording_id').notNull(),
+ type: text('type', {
+ enum: ['monologue', 'sentiment', 'talk_ratio', 'next_steps', 'pricing', 'playbook', 'questions', 'pace']
+ }).notNull(),
+ message: text('message').notNull(),
+ severity: text('severity', { enum: ['low', 'medium', 'high'] }).notNull(),
+ timestamp: real('timestamp').notNull(),
+ dismissed: integer('dismissed', { mode: 'boolean' }).notNull().default(false),
+ createdAt: text('created_at').notNull().default(sql`(datetime('now'))`),
+}, (table) => ({
+ recordingIdx: index('idx_nudges_history_recording').on(table.recordingId),
+}));
+
+/**
+ * Copilot Settings
+ * Store customizable prompts and configuration
+ */
+export const copilotSettings = sqliteTable('copilot_settings', {
+ key: text('key').primaryKey(),
+ value: text('value').notNull(), // JSON string for complex values
+ category: text('category', {
+ enum: ['prompt', 'config', 'threshold']
+ }).notNull(),
+ label: text('label').notNull(),
+ description: text('description'),
+ updatedAt: text('updated_at').notNull().default(sql`(datetime('now'))`),
+});
+
+// Type Exports
+
+export type User = typeof users.$inferSelect;
+export type NewUser = typeof users.$inferInsert;
+export type Recording = typeof recordings.$inferSelect;
+export type NewRecording = typeof recordings.$inferInsert;
+
+export type TranscriptSegment = typeof transcriptSegments.$inferSelect;
+export type NewTranscriptSegment = typeof transcriptSegments.$inferInsert;
+
+export type Bookmark = typeof bookmarks.$inferSelect;
+export type NewBookmark = typeof bookmarks.$inferInsert;
+
+export type CueCard = typeof cueCards.$inferSelect;
+export type NewCueCard = typeof cueCards.$inferInsert;
+
+export type CueCardTrigger = typeof cueCardTriggers.$inferSelect;
+export type NewCueCardTrigger = typeof cueCardTriggers.$inferInsert;
+
+export type Playbook = typeof playbooks.$inferSelect;
+export type NewPlaybook = typeof playbooks.$inferInsert;
+
+export type PlaybookSession = typeof playbookSessions.$inferSelect;
+export type NewPlaybookSession = typeof playbookSessions.$inferInsert;
+
+export type CallMetricsHistory = typeof callMetricsHistory.$inferSelect;
+export type NewCallMetricsHistory = typeof callMetricsHistory.$inferInsert;
+
+export type NudgeHistory = typeof nudgesHistory.$inferSelect;
+export type NewNudgeHistory = typeof nudgesHistory.$inferInsert;
+
+export type CopilotSetting = typeof copilotSettings.$inferSelect;
+export type NewCopilotSetting = typeof copilotSettings.$inferInsert;
+
+// MCP (Model Context Protocol) Tables
+
+/**
+ * MCP Servers
+ * Configuration for connected MCP servers (CRMs, docs, calendars, search tools)
+ */
+export const mcpServers = sqliteTable('mcp_servers', {
+ id: text('id').primaryKey(),
+ name: text('name').notNull(),
+ transport: text('transport', { enum: ['stdio', 'http'] }).notNull(),
+ command: text('command'), // For stdio transport
+ args: text('args'), // JSON array of arguments
+ env: text('env'), // JSON object, encrypted (environment variables)
+ url: text('url'), // For HTTP/SSE transport
+ headers: text('headers'), // JSON object, encrypted (HTTP headers)
+ templateId: text('template_id'), // Reference to server template
+ isEnabled: integer('is_enabled', { mode: 'boolean' }).default(true),
+ autoConnect: integer('auto_connect', { mode: 'boolean' }).default(false),
+ connectionStatus: text('connection_status', {
+ enum: ['disconnected', 'connecting', 'connected', 'error']
+ }).default('disconnected'),
+ lastError: text('last_error'),
+ lastConnectedAt: text('last_connected_at'),
+ createdAt: text('created_at').notNull().default(sql`(datetime('now'))`),
+ updatedAt: text('updated_at').notNull().default(sql`(datetime('now'))`),
+});
+
+/**
+ * MCP Tool Calls
+ * History of tool invocations during calls
+ */
+export const mcpToolCalls = sqliteTable('mcp_tool_calls', {
+ id: text('id').primaryKey(),
+ serverId: text('server_id').notNull(),
+ recordingId: integer('recording_id'),
+ toolName: text('tool_name').notNull(),
+ toolInput: text('tool_input'), // JSON input parameters
+ toolOutput: text('tool_output'), // JSON output result
+ status: text('status', { enum: ['pending', 'success', 'error'] }).notNull(),
+ errorMessage: text('error_message'),
+ durationMs: integer('duration_ms'),
+ triggerType: text('trigger_type', { enum: ['intent', 'manual', 'test'] }).notNull(),
+ createdAt: text('created_at').notNull().default(sql`(datetime('now'))`),
+}, (table) => ({
+ serverIdx: index('idx_mcp_tool_calls_server').on(table.serverId),
+ recordingIdx: index('idx_mcp_tool_calls_recording').on(table.recordingId),
+}));
+
+export type MCPServer = typeof mcpServers.$inferSelect;
+export type NewMCPServer = typeof mcpServers.$inferInsert;
+
+export type MCPToolCall = typeof mcpToolCalls.$inferSelect;
+export type NewMCPToolCall = typeof mcpToolCalls.$inferInsert;
diff --git a/src/main/index.ts b/src/main/index.ts
new file mode 100644
index 0000000..a8cefc6
--- /dev/null
+++ b/src/main/index.ts
@@ -0,0 +1,333 @@
+import { app, BrowserWindow, Menu } from 'electron';
+import path from 'path';
+import fs from 'fs';
+import { initDatabase, closeDatabase } from './db';
+import { startServer, stopServer } from './server';
+import { getTunnelService } from './services/tunnel.service';
+import {
+ setupIpcHandlers,
+ removeIpcHandlers,
+ setMainWindow,
+ setCopilotMainWindow,
+ setMCPMainWindow,
+ sendToRenderer,
+ shutdownCaptureClient,
+} from './ipc';
+import {
+ getConnectionOrchestrator,
+ resetConnectionOrchestrator,
+} from './services/mcp';
+import {
+ loadAppConfig,
+ loadRuntimeConfig,
+ loadAuthConfig,
+ deleteAuthConfig,
+ saveAppConfig,
+} from './lib/config';
+import { logger } from './lib/logger';
+import { applyVideoDBPatches } from './lib/videodb-patch';
+import { getLockFilePath } from './lib/paths';
+
+let mainWindow: BrowserWindow | null = null;
+const isDev = !app.isPackaged;
+
+/**
+ * Clean up stale recorder lock files so the recorder can start after crashes.
+ */
+function cleanupStaleLockFiles(): void {
+ // Use stable paths because process.cwd() is unreliable in packaged apps.
+ const lockFilePaths = [
+ getLockFilePath('videodb-recorder.lock'),
+ path.join(app.getPath('temp'), 'videodb-recorder.lock'),
+ path.join(app.getPath('home'), '.videodb-recorder.lock'),
+ ];
+
+ for (const lockFile of lockFilePaths) {
+ try {
+ if (fs.existsSync(lockFile)) {
+ fs.unlinkSync(lockFile);
+ logger.info({ lockFile }, 'Removed stale recorder lock file');
+ }
+ } catch (error) {
+ logger.warn({ error, lockFile }, 'Failed to remove lock file');
+ }
+ }
+}
+
+async function createWindow(): Promise<void> {
+ mainWindow = new BrowserWindow({
+ width: 1200,
+ height: 800,
+ minWidth: 800,
+ minHeight: 600,
+ title: 'Meeting Copilot',
+ titleBarStyle: 'hiddenInset',
+ trafficLightPosition: { x: 16, y: 16 },
+ webPreferences: {
+ preload: path.join(__dirname, '..', 'preload', 'index.js'),
+ nodeIntegration: false,
+ contextIsolation: true,
+ sandbox: false,
+ },
+ });
+
+ setMainWindow(mainWindow);
+ setCopilotMainWindow(mainWindow);
+ setMCPMainWindow(mainWindow);
+
+ if (isDev) {
+ const VITE_DEV_PORT = 51730;
+ await mainWindow.loadURL(`http://localhost:${VITE_DEV_PORT}`);
+ } else {
+ await mainWindow.loadFile(path.join(__dirname, '..', 'renderer', 'index.html'));
+ }
+
+ mainWindow.on('closed', () => {
+ mainWindow = null;
+ });
+}
+
+function createMenu(): void {
+ const template: Electron.MenuItemConstructorOptions[] = [
+ {
+ label: app.name,
+ submenu: [
+ { role: 'about' },
+ { type: 'separator' },
+ { role: 'services' },
+ { type: 'separator' },
+ { role: 'hide' },
+ { role: 'hideOthers' },
+ { role: 'unhide' },
+ { type: 'separator' },
+ { role: 'quit' },
+ ],
+ },
+ {
+ label: 'Edit',
+ submenu: [
+ { role: 'undo' },
+ { role: 'redo' },
+ { type: 'separator' },
+ { role: 'cut' },
+ { role: 'copy' },
+ { role: 'paste' },
+ { role: 'selectAll' },
+ ],
+ },
+ {
+ label: 'View',
+ submenu: [
+ { role: 'reload' },
+ { role: 'forceReload' },
+ { role: 'toggleDevTools' },
+ { type: 'separator' },
+ { role: 'resetZoom' },
+ { role: 'zoomIn' },
+ { role: 'zoomOut' },
+ { type: 'separator' },
+ { role: 'togglefullscreen' },
+ ],
+ },
+ {
+ label: 'Window',
+ submenu: [
+ { role: 'minimize' },
+ { role: 'zoom' },
+ { type: 'separator' },
+ { role: 'front' },
+ ],
+ },
+ ];
+
+ const menu = Menu.buildFromTemplate(template);
+ Menu.setApplicationMenu(menu);
+}
+
+async function autoRegister(): Promise<void> {
+ const authConfig = loadAuthConfig();
+ if (!authConfig) return;
+
+ logger.info({ name: authConfig.name }, 'Auto-registering from auth_config.json');
+
+ try {
+ const runtimeConfig = loadRuntimeConfig();
+ const response = await fetch(
+ `http://localhost:${runtimeConfig.apiPort}/api/trpc/auth.register`,
+ {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({
+ json: {
+ name: authConfig.name,
+ apiKey: authConfig.apiKey,
+ },
+ }),
+ }
+ );
+
+ const result = (await response.json()) as {
+ result?: { data?: { json?: { success?: boolean; accessToken?: string; name?: string; error?: string } } };
+ };
+
+ if (result.result?.data?.json?.success) {
+ const { accessToken, name } = result.result.data.json as { accessToken: string; name: string };
+
+ saveAppConfig({
+ accessToken,
+ userName: name,
+ apiKey: authConfig.apiKey,
+ });
+
+ logger.info({ name }, 'Auto-registration successful');
+
+ if (mainWindow) {
+ sendToRenderer('auth-success', { name, accessToken });
+ }
+ } else {
+ logger.error({ error: result.result?.data?.json?.error }, 'Auto-registration failed');
+ }
+ } catch (error) {
+ logger.error({ error }, 'Auto-registration error');
+ } finally {
+ deleteAuthConfig();
+ }
+}
+
+async function startServices(): Promise<void> {
+ const runtimeConfig = loadRuntimeConfig();
+ const port = runtimeConfig.apiPort;
+
+ initDatabase();
+
+ const actualPort = await startServer(port);
+
+ logger.info({ port: actualPort }, '🚇 About to start tunnel service...');
+ try {
+ const tunnelService = getTunnelService(actualPort);
+ logger.info('🚇 Got tunnel service instance, calling start()...');
+ const tunnelStatus = await tunnelService.start();
+ logger.info({ tunnelStatus }, '🚇 Tunnel service start() completed');
+ } catch (tunnelError) {
+ logger.error({ error: tunnelError }, '❌ Tunnel startup threw an exception');
+ }
+
+ // Initialize MCP orchestrator and connect to auto-connect servers
+ logger.info('🔌 Initializing MCP Connection Orchestrator...');
+ try {
+ const mcpOrchestrator = getConnectionOrchestrator();
+ await mcpOrchestrator.initialize();
+ logger.info('🔌 MCP Connection Orchestrator initialized');
+ } catch (mcpError) {
+ logger.error({ error: mcpError }, '❌ MCP Orchestrator initialization failed');
+ }
+}
+
+let isShuttingDown = false;
+
+async function stopServices(): Promise<void> {
+ if (isShuttingDown) {
+ logger.info('Shutdown already in progress');
+ return;
+ }
+ isShuttingDown = true;
+
+ await shutdownCaptureClient();
+
+ // Shutdown MCP orchestrator
+ logger.info('🔌 Shutting down MCP Connection Orchestrator...');
+ try {
+ const mcpOrchestrator = getConnectionOrchestrator();
+ await mcpOrchestrator.shutdown();
+ resetConnectionOrchestrator();
+ logger.info('🔌 MCP Connection Orchestrator shut down');
+ } catch (mcpError) {
+ logger.error({ error: mcpError }, '❌ MCP Orchestrator shutdown failed');
+ }
+
+ const tunnelService = getTunnelService(0);
+ await tunnelService.stop();
+
+ await stopServer();
+
+ closeDatabase();
+
+ removeIpcHandlers();
+}
+
+app.whenReady().then(async () => {
+ logger.info('App starting');
+
+ // Only packaged apps need VideoDB binary path and DYLD_LIBRARY_PATH patches.
+ if (app.isPackaged) {
+ try {
+ applyVideoDBPatches();
+ } catch (error) {
+ logger.error({ error }, 'Failed to apply VideoDB patches - recording may not work in production');
+ }
+ } else {
+ logger.info('Skipping VideoDB patches in development mode');
+ }
+
+ cleanupStaleLockFiles();
+
+ try {
+ await startServices();
+
+ setupIpcHandlers();
+
+ createMenu();
+
+ await createWindow();
+
+ await autoRegister();
+
+ logger.info('App started successfully');
+ } catch (error) {
+ logger.error({ error }, 'Failed to start app');
+ app.quit();
+ }
+});
+
+app.on('window-all-closed', () => {
+ if (process.platform !== 'darwin') {
+ app.quit();
+ }
+});
+
+app.on('activate', async () => {
+ if (BrowserWindow.getAllWindows().length === 0) {
+ await createWindow();
+ }
+});
+
+app.on('before-quit', async (event) => {
+ if (!isShuttingDown) {
+ event.preventDefault();
+ logger.info('App shutting down');
+ await stopServices();
+ app.exit(0);
+ }
+});
+
+process.on('SIGINT', async () => {
+ logger.info('Received SIGINT (Ctrl+C)');
+ await stopServices();
+ process.exit(0);
+});
+
+process.on('SIGTERM', async () => {
+ logger.info('Received SIGTERM');
+ await stopServices();
+ process.exit(0);
+});
+
+process.on('uncaughtException', (error) => {
+ logger.error({ error }, 'Uncaught exception');
+});
+
+process.on('unhandledRejection', (reason) => {
+ logger.error({ reason }, 'Unhandled rejection');
+});
diff --git a/src/main/ipc/app.ts b/src/main/ipc/app.ts
new file mode 100644
index 0000000..ac88316
--- /dev/null
+++ b/src/main/ipc/app.ts
@@ -0,0 +1,75 @@
+import { ipcMain, shell, Notification, BrowserWindow } from 'electron';
+import { loadAppConfig, loadRuntimeConfig, clearAppConfig } from '../lib/config';
+import { VideoDBService } from '../services/videodb.service';
+import { getServerStatus } from '../server';
+import { createChildLogger } from '../lib/logger';
+
+const logger = createChildLogger('ipc-app');
+
+export function setupAppHandlers(): void {
+ ipcMain.handle(
+ 'get-settings',
+ async (): Promise<{
+ accessToken?: string;
+ userName?: string;
+ apiKey?: string;
+ apiUrl?: string;
+ webhookUrl?: string;
+ }> => {
+ const appConfig = loadAppConfig();
+ const runtimeConfig = loadRuntimeConfig();
+
+ return {
+ accessToken: appConfig.accessToken,
+ userName: appConfig.userName,
+ apiKey: appConfig.apiKey,
+ apiUrl: runtimeConfig.apiUrl,
+ webhookUrl: runtimeConfig.webhookUrl,
+ };
+ }
+ );
+
+ ipcMain.handle('get-server-port', async (): Promise<number> => {
+ const status = getServerStatus();
+ return status.port || 51731; // fallback to default
+ });
+
+ ipcMain.handle('logout', async (): Promise<void> => {
+ logger.info('User logging out');
+ clearAppConfig();
+ VideoDBService.clearCache();
+ });
+
+ ipcMain.handle('open-external-link', async (_event, url: string): Promise<void> => {
+ if (url.startsWith('http://') || url.startsWith('https://')) {
+ await shell.openExternal(url);
+ }
+ });
+
+ ipcMain.handle(
+ 'show-notification',
+ async (_event, title: string, body: string): Promise<void> => {
+ if (Notification.isSupported()) {
+ const notification = new Notification({
+ title,
+ body,
+ });
+ notification.show();
+ }
+ }
+ );
+
+ ipcMain.handle('open-player-window', async (_event, url: string): Promise<void> => {
+ const playerWindow = new BrowserWindow({
+ width: 1024,
+ height: 768,
+ title: 'Meeting Copilot - Player',
+ webPreferences: {
+ nodeIntegration: false,
+ contextIsolation: true,
+ },
+ });
+
+ await playerWindow.loadURL(url);
+ });
+}
diff --git a/src/main/ipc/capture.ts b/src/main/ipc/capture.ts
new file mode 100644
index 0000000..761b3e6
--- /dev/null
+++ b/src/main/ipc/capture.ts
@@ -0,0 +1,598 @@
+import { ipcMain, BrowserWindow, app } from 'electron';
+import { CaptureClient } from 'videodb/capture';
+import { connect } from 'videodb';
+import type { WebSocketConnection, WebSocketMessage } from 'videodb';
+import type { Channel } from '../../shared/schemas/capture.schema';
+import type { RecorderEvent, TranscriptEvent, StartRecordingParams } from '../../shared/types/ipc.types';
+import { registerSessionUser } from '../server/routes/webhook';
+import { createChildLogger } from '../lib/logger';
+import { applyVideoDBPatches } from '../lib/videodb-patch';
+
+const logger = createChildLogger('ipc-capture');
+
+let mainWindow: BrowserWindow | null = null;
+let captureClient: CaptureClient | null = null;
+
+// Store bound event handlers so we can remove them later to prevent memory leaks
+const captureEventHandlers: {
+ 'recording:started'?: () => void;
+ 'recording:stopped'?: () => void;
+ 'recording:error'?: (error: unknown) => void;
+ 'upload:progress'?: (progress: unknown) => void;
+ 'upload:complete'?: (data: unknown) => void;
+ 'error'?: (error: unknown) => void;
+} = {};
+
+let micWebSocket: WebSocketConnection | null = null;
+let sysAudioWebSocket: WebSocketConnection | null = null;
+let transcriptListenerActive = false;
+
+function ensureVideoDBPatched(): void {
+ if (!app.isPackaged) return;
+ try {
+ applyVideoDBPatches();
+ } catch (error) {
+ logger.error({ error }, 'Failed to apply VideoDB patches before CaptureClient usage');
+ }
+}
+
+async function setupTranscriptWebSockets(
+ sessionToken: string,
+ apiUrl?: string
+): Promise<{ micWsId: string | null; sysAudioWsId: string | null } | null> {
+ try {
+ if (!sessionToken) {
+ logger.warn('[WS] No session token');
+ return null;
+ }
+
+ const connectOptions: { sessionToken: string; baseUrl?: string } = { sessionToken };
+ if (apiUrl) {
+ connectOptions.baseUrl = apiUrl;
+ }
+ const videodbConnection = connect(connectOptions);
+
+ const [micWsResult, sysWsResult] = await Promise.all([
+ (async () => {
+ try {
+ const wsConnection = await videodbConnection.connectWebsocket();
+ micWebSocket = await wsConnection.connect();
+ logger.info({ connectionId: micWebSocket.connectionId }, '[WS] Mic WebSocket connected');
+ return { ws: micWebSocket, id: micWebSocket.connectionId || null };
+ } catch (err) {
+ logger.error({ error: err }, '[WS] Failed to create mic WebSocket');
+ return { ws: null, id: null };
+ }
+ })(),
+ (async () => {
+ try {
+ const wsConnection = await videodbConnection.connectWebsocket();
+ sysAudioWebSocket = await wsConnection.connect();
+ logger.info({ connectionId: sysAudioWebSocket.connectionId }, '[WS] SysAudio WebSocket connected');
+ return { ws: sysAudioWebSocket, id: sysAudioWebSocket.connectionId || null };
+ } catch (err) {
+ logger.error({ error: err }, '[WS] Failed to create sys_audio WebSocket');
+ return { ws: null, id: null };
+ }
+ })(),
+ ]);
+
+ if (!micWsResult.id && !sysWsResult.id) {
+ logger.error('[WS] Failed to create any WebSocket connections');
+ return null;
+ }
+
+ transcriptListenerActive = true;
+ if (micWsResult.ws) listenForMessages(micWsResult.ws, 'mic');
+ if (sysWsResult.ws) listenForMessages(sysWsResult.ws, 'system_audio');
+
+ return { micWsId: micWsResult.id, sysAudioWsId: sysWsResult.id };
+ } catch (err) {
+ logger.error({ error: err }, '[WS] Error setting up WebSockets');
+ return null;
+ }
+}
+
+async function listenForMessages(ws: WebSocketConnection, source: 'mic' | 'system_audio'): Promise<void> {
+ try {
+ for await (const msg of ws.receive()) {
+ if (!transcriptListenerActive) break;
+
+ const channel = (msg.channel || msg.type || msg.event_type || 'event') as string;
+
+ if (channel === 'transcript' || msg.text) {
+ const msgData = msg.data as Record<string, unknown>;
+ const text = (msgData.text || msg.text || '') as string;
+ const isFinal = (msgData.is_final ?? msg.is_final ?? msg.isFinal ?? false) as boolean;
+ const start = (msgData.start ?? msg.start) as number;
+ const end = (msgData.end ?? msg.end) as number;
+
+ if (isFinal) {
+ }
+
+ const transcriptEvent: TranscriptEvent = {
+ text,
+ isFinal,
+ source,
+ start,
+ end,
+ };
+
+ sendRecorderEvent({
+ event: 'transcript',
+ data: transcriptEvent,
+ });
+ }
+ }
+ } catch (err) {
+ if (transcriptListenerActive) {
+ logger.error({ error: err, source }, '[WS] Error in listener');
+ }
+ }
+}
+
+async function cleanupTranscriptWebSockets(): Promise<void> {
+ transcriptListenerActive = false;
+
+ if (micWebSocket) {
+ try {
+ await micWebSocket.close();
+ } catch (e) {
+ // Ignore close errors
+ }
+ micWebSocket = null;
+ }
+
+ if (sysAudioWebSocket) {
+ try {
+ await sysAudioWebSocket.close();
+ } catch (e) {
+ // Ignore close errors
+ }
+ sysAudioWebSocket = null;
+ }
+}
+
+export function setMainWindow(window: BrowserWindow): void {
+ mainWindow = window;
+}
+
+export function getMainWindow(): BrowserWindow | null {
+ return mainWindow;
+}
+
+export function sendToRenderer(channel: string, data: unknown): void {
+ if (mainWindow && !mainWindow.isDestroyed()) {
+ mainWindow.webContents.send(channel, data);
+ }
+}
+
+function sendRecorderEvent(event: RecorderEvent): void {
+ sendToRenderer('recorder-event', event);
+}
+
+// Set up event listeners with stored references to prevent memory leaks
+function setupCaptureEventListeners(): void {
+ if (!captureClient) return;
+
+ captureEventHandlers['recording:started'] = () => {
+ logger.info('Recording started');
+ sendRecorderEvent({ event: 'recording:started' });
+ };
+
+ captureEventHandlers['recording:stopped'] = () => {
+ logger.info('Recording stopped');
+ sendRecorderEvent({ event: 'recording:stopped' });
+ };
+
+ captureEventHandlers['recording:error'] = (error: unknown) => {
+ logger.error({ error }, 'Recording error');
+ sendRecorderEvent({ event: 'recording:error', data: error });
+ };
+
+ captureEventHandlers['upload:progress'] = (progress: unknown) => {
+ sendRecorderEvent({ event: 'upload:progress', data: progress });
+ };
+
+ captureEventHandlers['upload:complete'] = (data: unknown) => {
+ logger.info('Upload complete');
+ sendRecorderEvent({ event: 'upload:complete', data });
+ };
+
+ captureEventHandlers['error'] = (error: unknown) => {
+ logger.error({ error }, 'CaptureClient error');
+ sendRecorderEvent({ event: 'error', data: error });
+ };
+
+ captureClient.on('recording:started', captureEventHandlers['recording:started']);
+ captureClient.on('recording:stopped', captureEventHandlers['recording:stopped']);
+ captureClient.on('recording:error', captureEventHandlers['recording:error']);
+ captureClient.on('upload:progress', captureEventHandlers['upload:progress']);
+ captureClient.on('upload:complete', captureEventHandlers['upload:complete']);
+ captureClient.on('error', captureEventHandlers['error']);
+}
+
+function removeCaptureEventListeners(): void {
+ if (!captureClient) return;
+
+ // Cast to access EventEmitter methods not in CaptureClient's type definition
+ const emitter = captureClient as unknown as {
+ removeListener: (event: string, listener: (...args: unknown[]) => void) => void;
+ };
+
+ if (captureEventHandlers['recording:started']) {
+ emitter.removeListener('recording:started', captureEventHandlers['recording:started']);
+ }
+ if (captureEventHandlers['recording:stopped']) {
+ emitter.removeListener('recording:stopped', captureEventHandlers['recording:stopped']);
+ }
+ if (captureEventHandlers['recording:error']) {
+ emitter.removeListener('recording:error', captureEventHandlers['recording:error']);
+ }
+ if (captureEventHandlers['upload:progress']) {
+ emitter.removeListener('upload:progress', captureEventHandlers['upload:progress']);
+ }
+ if (captureEventHandlers['upload:complete']) {
+ emitter.removeListener('upload:complete', captureEventHandlers['upload:complete']);
+ }
+ if (captureEventHandlers['error']) {
+ emitter.removeListener('error', captureEventHandlers['error']);
+ }
+
+ Object.keys(captureEventHandlers).forEach((key) => {
+ delete captureEventHandlers[key as keyof typeof captureEventHandlers];
+ });
+}
+
+export function setupCaptureHandlers(): void {
+ ipcMain.handle(
+ 'recorder-start-recording',
+ async (
+ _event,
+ params: StartRecordingParams
+ ): Promise<{
+ success: boolean;
+ sessionId?: string;
+ error?: string;
+ micWsConnectionId?: string;
+ sysAudioWsConnectionId?: string;
+ }> => {
+ const { config, sessionToken, accessToken, apiUrl, enableTranscription } = params;
+
+ logger.info({ sessionId: config.sessionId, enableTranscription }, 'Starting recording - IPC handler called');
+
+ try {
+ registerSessionUser(config.sessionId, accessToken);
+
+ let wsConnectionIds: { micWsId: string | null; sysAudioWsId: string | null } | null = null;
+ if (enableTranscription) {
+ wsConnectionIds = await setupTranscriptWebSockets(sessionToken, apiUrl);
+ if (wsConnectionIds) {
+ logger.info(
+ { micWsId: wsConnectionIds.micWsId, sysAudioWsId: wsConnectionIds.sysAudioWsId },
+ '[WS] WebSocket connections established'
+ );
+ }
+ }
+
+ // Create fresh CaptureClient each time (Python pattern)
+ if (captureClient) {
+ logger.info('Cleaning up existing CaptureClient before creating new one');
+ removeCaptureEventListeners();
+ try {
+ await captureClient.shutdown();
+ } catch (e) {
+ // Ignore shutdown errors
+ }
+ captureClient = null;
+ }
+
+ ensureVideoDBPatched();
+ logger.info('Creating new CaptureClient');
+ captureClient = new CaptureClient({
+ sessionToken,
+ ...(apiUrl && { apiUrl }),
+ });
+
+ // Set up event listeners BEFORE listing channels (Python pattern)
+ setupCaptureEventListeners();
+
+ let captureChannels: Array<{ channelId: string; type: 'audio' | 'video'; record: boolean; transcript?: boolean }> = [];
+
+ try {
+ logger.info('Listing available channels');
+ const channels = await captureClient.listChannels();
+ logger.info({ channelCount: channels.all().length }, 'Channels listed successfully');
+
+ const micChannel = channels.mics.default;
+ if (micChannel && config.streams?.microphone !== false) {
+ captureChannels.push({
+ channelId: micChannel.id,
+ type: 'audio',
+ record: true,
+ transcript: enableTranscription,
+ });
+ }
+
+ const systemAudioChannel = channels.systemAudio.default;
+ if (systemAudioChannel && config.streams?.systemAudio !== false) {
+ captureChannels.push({
+ channelId: systemAudioChannel.id,
+ type: 'audio',
+ record: true,
+ transcript: enableTranscription,
+ });
+ }
+
+ const displayChannel = channels.displays.default;
+ if (displayChannel && config.streams?.screen !== false) {
+ captureChannels.push({
+ channelId: displayChannel.id,
+ type: 'video',
+ record: true,
+ });
+ }
+
+ logger.info({ captureChannels }, 'Channel configs prepared from listed channels');
+ } catch (listError) {
+ logger.warn({ error: listError }, 'listChannels failed, using fallback channel IDs');
+
+ if (config.streams?.microphone !== false) {
+ captureChannels.push({ channelId: 'mic', type: 'audio', record: true, transcript: enableTranscription });
+ }
+ if (config.streams?.systemAudio !== false) {
+ captureChannels.push({ channelId: 'system_audio', type: 'audio', record: true, transcript: enableTranscription });
+ }
+ if (config.streams?.screen !== false) {
+ captureChannels.push({ channelId: 'screen', type: 'video', record: true });
+ }
+
+ logger.info({ captureChannels }, 'Using fallback channel IDs');
+ }
+
+ if (captureChannels.length === 0) {
+ throw new Error('No capture channels available. Check permissions.');
+ }
+
+ if (captureChannels.length === 0) {
+ throw new Error('No capture channels available. Check permissions.');
+ }
+
+ logger.info({ captureChannels }, 'Starting capture with channels');
+ try {
+ await captureClient.startSession({
+ sessionId: config.sessionId,
+ channels: captureChannels,
+ });
+ logger.info({ sessionId: config.sessionId }, 'Capture session started');
+ } catch (captureError) {
+ const msg = captureError instanceof Error ? captureError.message : String(captureError);
+ const stack = captureError instanceof Error ? captureError.stack : undefined;
+ logger.error({ err: captureError, message: msg, stack }, 'CaptureClient.startSession failed');
+ throw captureError;
+ }
+
+ // Manually emit recording:started immediately (matches Python behavior, doesn't wait for SDK event)
+ logger.info({ sessionId: config.sessionId }, 'Emitting recording:started event to renderer');
+ sendRecorderEvent({
+ event: 'recording:started',
+ data: { sessionId: config.sessionId },
+ });
+ logger.info({ sessionId: config.sessionId }, 'recording:started event emitted');
+
+ return {
+ success: true,
+ sessionId: config.sessionId,
+ micWsConnectionId: wsConnectionIds?.micWsId || undefined,
+ sysAudioWsConnectionId: wsConnectionIds?.sysAudioWsId || undefined,
+ };
+ } catch (error) {
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
+ const errorStack = error instanceof Error ? error.stack : undefined;
+ logger.error({ err: error, errorMessage, errorStack }, 'Failed to start recording');
+ await cleanupTranscriptWebSockets();
+ cleanupCapture();
+ return {
+ success: false,
+ error: errorMessage,
+ };
+ }
+ }
+ );
+
+ ipcMain.handle(
+ 'recorder-stop-recording',
+ async (): Promise<{ success: boolean; error?: string }> => {
+ logger.info('Stopping recording');
+
+ try {
+ if (captureClient) {
+ removeCaptureEventListeners();
+
+ await captureClient.stopSession();
+ logger.info('Capture session stopped');
+
+ await captureClient.shutdown();
+ logger.info('CaptureClient shutdown complete');
+ captureClient = null;
+
+ // Manually emit recording:stopped immediately (ensures UI updates without waiting for SDK events)
+ sendRecorderEvent({
+ event: 'recording:stopped',
+ data: {},
+ });
+
+ // Manually emit upload:complete since we've already shutdown the client
+ // (the SDK event listener was removed before upload could complete)
+ sendRecorderEvent({
+ event: 'upload:complete',
+ data: {},
+ });
+ } else {
+ logger.warn('No active capture client to stop');
+ }
+
+ await cleanupTranscriptWebSockets();
+
+ return { success: true };
+ } catch (error) {
+ logger.error({ error }, 'Failed to stop recording');
+ await cleanupTranscriptWebSockets();
+ cleanupCapture();
+ return {
+ success: false,
+ error: error instanceof Error ? error.message : 'Unknown error',
+ };
+ }
+ }
+ );
+
+ ipcMain.handle(
+ 'recorder-pause-tracks',
+ async (_event, tracks: string[]): Promise<void> => {
+ if (captureClient) {
+ await captureClient.pauseTracks(tracks as ('mic' | 'system_audio' | 'screen')[]);
+ }
+ }
+ );
+
+ ipcMain.handle(
+ 'recorder-resume-tracks',
+ async (_event, tracks: string[]): Promise<void> => {
+ if (captureClient) {
+ await captureClient.resumeTracks(tracks as ('mic' | 'system_audio' | 'screen')[]);
+ }
+ }
+ );
+
+ ipcMain.handle(
+ 'recorder-list-channels',
+ async (_event, sessionToken: string, apiUrl?: string): Promise<Channel[]> => {
+ logger.info('recorder-list-channels IPC handler called');
+
+ // Reuse existing captureClient to prevent "Another recorder instance" error
+ if (!captureClient) {
+ logger.info('Creating CaptureClient for listing channels');
+ ensureVideoDBPatched();
+ captureClient = new CaptureClient({
+ sessionToken,
+ ...(apiUrl && { apiUrl }),
+ });
+
+ // Set up minimal error listener immediately (required for SDK to function properly)
+ captureClient.on('error', (error: unknown) => {
+ logger.error({ error }, 'CaptureClient error during channel listing');
+ });
+
+ logger.info('CaptureClient created, calling listChannels...');
+ } else {
+ logger.info('Reusing existing CaptureClient for listing channels');
+ }
+
+ try {
+ logger.info('Calling captureClient.listChannels()...');
+
+ const listChannelsWithTimeout = async (timeoutMs: number = 30000) => {
+ return Promise.race([
+ captureClient!.listChannels(),
+ new Promise<never>((_, reject) =>
+ setTimeout(() => reject(new Error(`listChannels timed out after ${timeoutMs}ms`)), timeoutMs)
+ )
+ ]);
+ };
+
+ const channels = await listChannelsWithTimeout(30000);
+ const allChannels = channels.all();
+ logger.info({ channelCount: allChannels.length, channels: allChannels }, 'listChannels returned');
+ return allChannels.map((ch) => ({
+ channelId: ch.id,
+ type: ch.type as 'audio' | 'video',
+ name: ch.name,
+ }));
+ } catch (error) {
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
+ const errorCode = errorMessage.includes('exited') ? errorMessage.match(/\d+/)?.[0] : undefined;
+
+ logger.error(
+ { error, errorMessage, errorCode },
+ 'Failed to list channels - this may indicate a binary execution issue'
+ );
+
+ if (captureClient) {
+ try {
+ await captureClient.shutdown();
+ } catch (e) {
+ // Ignore shutdown errors during cleanup
+ }
+ captureClient = null;
+ }
+
+ const detailedError = new Error(
+ `Failed to list recording channels: ${errorMessage}` +
+ (errorCode === '101' ? '. This may be a binary compatibility issue - check if the recorder binary matches your system architecture.' : '')
+ );
+ throw detailedError;
+ }
+ }
+ );
+}
+
+// Cleanup capture client for synchronous cleanup (doesn't wait for shutdown)
+function cleanupCapture(): void {
+ if (captureClient) {
+ removeCaptureEventListeners();
+
+ const client = captureClient;
+ captureClient = null;
+
+ client.shutdown().catch((error) => {
+ logger.warn({ error }, 'Error shutting down CaptureClient during cleanup');
+ });
+ }
+}
+
+// Async cleanup that waits for shutdown to complete (for tests or external cleanup)
+export async function cleanupCaptureAsync(): Promise<void> {
+ if (captureClient) {
+ removeCaptureEventListeners();
+
+ const client = captureClient;
+ captureClient = null;
+
+ try {
+ await client.shutdown();
+ logger.info('CaptureClient shutdown completed');
+ } catch (error) {
+ logger.warn({ error }, 'Error during async CaptureClient shutdown');
+ }
+ }
+}
+
+export async function shutdownCaptureClient(): Promise<void> {
+ await cleanupTranscriptWebSockets();
+
+ if (captureClient) {
+ logger.info('Shutting down CaptureClient before app quit');
+
+ removeCaptureEventListeners();
+
+ const client = captureClient;
+ captureClient = null;
+
+ try {
+ await client.stopSession();
+ } catch (error) {
+ logger.warn({ error }, 'Error stopping capture session during shutdown');
+ }
+ try {
+ await client.shutdown();
+ } catch (error) {
+ logger.warn({ error }, 'Error shutting down CaptureClient during shutdown');
+ }
+ logger.info('CaptureClient shutdown complete');
+ }
+}
+
+export function isCaptureActive(): boolean {
+ return captureClient !== null;
+}
diff --git a/src/main/ipc/copilot.ts b/src/main/ipc/copilot.ts
new file mode 100644
index 0000000..b9dbea4
--- /dev/null
+++ b/src/main/ipc/copilot.ts
@@ -0,0 +1,351 @@
+/**
+ * Meeting Co-Pilot IPC Handlers
+ *
+ * Handles IPC communication between main and renderer processes
+ * for the Meeting Co-Pilot features.
+ */
+
+import { ipcMain, BrowserWindow } from 'electron';
+import { createChildLogger } from '../lib/logger';
+import {
+ getMeetingCopilot,
+ type CopilotConfig,
+ type ConversationMetrics,
+ type SentimentTrend,
+ type Nudge,
+ type CueCardTriggerData,
+ type PlaybookItem,
+ type PlaybookSnapshot,
+ type CallSummary,
+} from '../services/copilot';
+import { getAllPlaybooks, getAllCueCards, getBookmarksByRecording, createBookmark } from '../db';
+import { v4 as uuid } from 'uuid';
+
+const logger = createChildLogger('copilot-ipc');
+
+let mainWindow: BrowserWindow | null = null;
+
+/**
+ * Set the main window reference for sending events
+ */
+export function setCopilotMainWindow(window: BrowserWindow): void {
+ mainWindow = window;
+}
+
+/**
+ * Send event to renderer
+ */
+function sendToRenderer(channel: string, data: any): void {
+ if (mainWindow && !mainWindow.isDestroyed()) {
+ mainWindow.webContents.send(channel, data);
+ }
+}
+
+/**
+ * Setup Meeting Co-Pilot IPC handlers
+ */
+export function setupCopilotHandlers(): void {
+ logger.info('Setting up Meeting Co-Pilot IPC handlers');
+
+ const copilot = getMeetingCopilot();
+
+ // Forward events to renderer
+ copilot.on('transcript-segment', (segment) => {
+ sendToRenderer('copilot:transcript', segment);
+ });
+
+ copilot.on('metrics-update', (data: { metrics: ConversationMetrics; health: number }) => {
+ sendToRenderer('copilot:metrics', data);
+ });
+
+ copilot.on('sentiment-update', (data: { sentiment: SentimentTrend }) => {
+ sendToRenderer('copilot:sentiment', data);
+ });
+
+ copilot.on('nudge', (data: { nudge: Nudge }) => {
+ sendToRenderer('copilot:nudge', data);
+ });
+
+ copilot.on('cue-card', (data: { cueCard: CueCardTriggerData }) => {
+ sendToRenderer('copilot:cue-card', data);
+ });
+
+ copilot.on('playbook-update', (data: { item: PlaybookItem; snapshot: PlaybookSnapshot }) => {
+ sendToRenderer('copilot:playbook', data);
+ });
+
+ copilot.on('call-ended', (data: {
+ summary: CallSummary;
+ playbook?: PlaybookSnapshot;
+ metrics: ConversationMetrics;
+ duration: number;
+ }) => {
+ sendToRenderer('copilot:call-ended', data);
+ });
+
+ copilot.on('error', (data: { error: string; context?: string }) => {
+ sendToRenderer('copilot:error', data);
+ });
+
+ // IPC Handlers
+
+ /**
+ * Initialize the copilot with API key
+ */
+ ipcMain.handle('copilot:initialize', async (_event, apiKey: string) => {
+ try {
+ copilot.initialize(apiKey);
+ return { success: true };
+ } catch (error) {
+ logger.error({ error }, 'Failed to initialize copilot');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Start call tracking
+ */
+ ipcMain.handle('copilot:start-call', async (_event, recordingId: number, sessionId: string) => {
+ try {
+ await copilot.startCall(recordingId, sessionId);
+ return { success: true };
+ } catch (error) {
+ logger.error({ error }, 'Failed to start call');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * End call and get summary
+ */
+ ipcMain.handle('copilot:end-call', async () => {
+ try {
+ const summary = await copilot.endCall();
+ return { success: true, summary };
+ } catch (error) {
+ logger.error({ error }, 'Failed to end call');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Process transcript segment
+ */
+ ipcMain.handle('copilot:transcript', async (_event, channel: 'me' | 'them', data: {
+ text: string;
+ is_final: boolean;
+ start: number;
+ end: number;
+ }) => {
+ try {
+ await copilot.onTranscriptReceived(channel, data);
+ return { success: true };
+ } catch (error) {
+ logger.error({ error }, 'Failed to process transcript');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Update copilot configuration
+ */
+ ipcMain.handle('copilot:update-config', async (_event, config: Partial<CopilotConfig>) => {
+ try {
+ copilot.updateConfig(config);
+ return { success: true };
+ } catch (error) {
+ logger.error({ error }, 'Failed to update config');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Get current call state
+ */
+ ipcMain.handle('copilot:get-state', async () => {
+ try {
+ const state = copilot.getCallState();
+ const metrics = copilot.getCurrentMetrics();
+ const sentiment = copilot.getCurrentSentiment();
+ const playbook = copilot.getPlaybookSnapshot();
+
+ return {
+ success: true,
+ data: {
+ state,
+ metrics,
+ sentiment,
+ playbook,
+ isActive: copilot.isCallActive(),
+ },
+ };
+ } catch (error) {
+ logger.error({ error }, 'Failed to get state');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Dismiss a cue card
+ */
+ ipcMain.handle('copilot:dismiss-cue-card', async (_event, triggerId: string) => {
+ try {
+ copilot.dismissCueCard(triggerId);
+ return { success: true };
+ } catch (error) {
+ logger.error({ error }, 'Failed to dismiss cue card');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Pin a cue card
+ */
+ ipcMain.handle('copilot:pin-cue-card', async (_event, triggerId: string) => {
+ try {
+ copilot.pinCueCard(triggerId);
+ return { success: true };
+ } catch (error) {
+ logger.error({ error }, 'Failed to pin cue card');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Submit cue card feedback
+ */
+ ipcMain.handle('copilot:cue-card-feedback', async (_event, triggerId: string, feedback: 'helpful' | 'wrong' | 'irrelevant') => {
+ try {
+ copilot.submitCueCardFeedback(triggerId, feedback);
+ return { success: true };
+ } catch (error) {
+ logger.error({ error }, 'Failed to submit feedback');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Dismiss a nudge
+ */
+ ipcMain.handle('copilot:dismiss-nudge', async (_event, nudgeId: string) => {
+ try {
+ copilot.dismissNudge(nudgeId);
+ return { success: true };
+ } catch (error) {
+ logger.error({ error }, 'Failed to dismiss nudge');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Get all playbooks
+ */
+ ipcMain.handle('copilot:get-playbooks', async () => {
+ try {
+ const playbooks = getAllPlaybooks();
+ return {
+ success: true,
+ playbooks: playbooks.map(p => ({
+ id: p.id,
+ name: p.name,
+ type: p.type,
+ description: p.description,
+ isDefault: p.isDefault,
+ items: JSON.parse(p.items),
+ })),
+ };
+ } catch (error) {
+ logger.error({ error }, 'Failed to get playbooks');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Get all cue cards
+ */
+ ipcMain.handle('copilot:get-cue-cards', async () => {
+ try {
+ const cards = getAllCueCards();
+ return {
+ success: true,
+ cueCards: cards.map(c => ({
+ id: c.id,
+ objectionType: c.objectionType,
+ title: c.title,
+ talkTracks: JSON.parse(c.talkTracks),
+ followUpQuestions: JSON.parse(c.followUpQuestions),
+ proofPoints: c.proofPoints ? JSON.parse(c.proofPoints) : undefined,
+ avoidSaying: c.avoidSaying ? JSON.parse(c.avoidSaying) : undefined,
+ sourceDoc: c.sourceDoc,
+ isDefault: c.isDefault,
+ })),
+ };
+ } catch (error) {
+ logger.error({ error }, 'Failed to get cue cards');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Create a bookmark
+ */
+ ipcMain.handle('copilot:create-bookmark', async (_event, data: {
+ recordingId: number;
+ segmentId?: string;
+ timestamp: number;
+ category: string;
+ note?: string;
+ }) => {
+ try {
+ const bookmark = createBookmark({
+ id: uuid(),
+ recordingId: data.recordingId,
+ segmentId: data.segmentId || null,
+ timestamp: data.timestamp,
+ category: data.category as any,
+ note: data.note || null,
+ });
+ return { success: true, bookmark };
+ } catch (error) {
+ logger.error({ error }, 'Failed to create bookmark');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Get bookmarks for a recording
+ */
+ ipcMain.handle('copilot:get-bookmarks', async (_event, recordingId: number) => {
+ try {
+ const bookmarks = getBookmarksByRecording(recordingId);
+ return { success: true, bookmarks };
+ } catch (error) {
+ logger.error({ error }, 'Failed to get bookmarks');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ logger.info('Meeting Co-Pilot IPC handlers registered');
+}
+
+/**
+ * Remove Meeting Co-Pilot IPC handlers
+ */
+export function removeCopilotHandlers(): void {
+ ipcMain.removeHandler('copilot:initialize');
+ ipcMain.removeHandler('copilot:start-call');
+ ipcMain.removeHandler('copilot:end-call');
+ ipcMain.removeHandler('copilot:transcript');
+ ipcMain.removeHandler('copilot:update-config');
+ ipcMain.removeHandler('copilot:get-state');
+ ipcMain.removeHandler('copilot:dismiss-cue-card');
+ ipcMain.removeHandler('copilot:pin-cue-card');
+ ipcMain.removeHandler('copilot:cue-card-feedback');
+ ipcMain.removeHandler('copilot:dismiss-nudge');
+ ipcMain.removeHandler('copilot:get-playbooks');
+ ipcMain.removeHandler('copilot:get-cue-cards');
+ ipcMain.removeHandler('copilot:create-bookmark');
+ ipcMain.removeHandler('copilot:get-bookmarks');
+
+ logger.info('Meeting Co-Pilot IPC handlers removed');
+}
diff --git a/src/main/ipc/index.ts b/src/main/ipc/index.ts
new file mode 100644
index 0000000..a9d6ed5
--- /dev/null
+++ b/src/main/ipc/index.ts
@@ -0,0 +1,59 @@
+import { ipcMain } from 'electron';
+import { setupCaptureHandlers } from './capture';
+import { setupPermissionHandlers } from './permissions';
+import { setupAppHandlers } from './app';
+import { setupCopilotHandlers, removeCopilotHandlers, setCopilotMainWindow } from './copilot';
+import { setupMCPHandlers, removeMCPHandlers, setMCPMainWindow } from './mcp';
+import { createChildLogger } from '../lib/logger';
+
+const logger = createChildLogger('ipc');
+
+export function setupIpcHandlers(): void {
+ logger.info('Setting up IPC handlers');
+
+ setupCaptureHandlers();
+ setupPermissionHandlers();
+ setupAppHandlers();
+ setupCopilotHandlers();
+ setupMCPHandlers();
+
+ logger.info('IPC handlers registered');
+}
+
+export function removeIpcHandlers(): void {
+ // Capture handlers
+ ipcMain.removeHandler('recorder-start-recording');
+ ipcMain.removeHandler('recorder-stop-recording');
+ ipcMain.removeHandler('recorder-pause-tracks');
+ ipcMain.removeHandler('recorder-resume-tracks');
+ ipcMain.removeHandler('recorder-list-channels');
+
+ // Permission handlers
+ ipcMain.removeHandler('check-mic-permission');
+ ipcMain.removeHandler('check-screen-permission');
+ ipcMain.removeHandler('check-accessibility-permission');
+ ipcMain.removeHandler('request-mic-permission');
+ ipcMain.removeHandler('request-screen-permission');
+ ipcMain.removeHandler('open-system-settings');
+ ipcMain.removeHandler('get-permission-status');
+
+ // App handlers
+ ipcMain.removeHandler('get-settings');
+ ipcMain.removeHandler('get-server-port');
+ ipcMain.removeHandler('logout');
+ ipcMain.removeHandler('open-external-link');
+ ipcMain.removeHandler('show-notification');
+ ipcMain.removeHandler('open-player-window');
+
+ // Meeting Co-Pilot handlers
+ removeCopilotHandlers();
+
+ // MCP handlers
+ removeMCPHandlers();
+
+ logger.info('IPC handlers removed');
+}
+
+export { sendToRenderer, getMainWindow, setMainWindow, shutdownCaptureClient, isCaptureActive } from './capture';
+export { setCopilotMainWindow } from './copilot';
+export { setMCPMainWindow } from './mcp';
diff --git a/src/main/ipc/mcp.ts b/src/main/ipc/mcp.ts
new file mode 100644
index 0000000..9055bdc
--- /dev/null
+++ b/src/main/ipc/mcp.ts
@@ -0,0 +1,417 @@
+/**
+ * MCP (Model Context Protocol) IPC Handlers
+ *
+ * Handles IPC communication between main and renderer processes
+ * for MCP server management and tool execution.
+ */
+
+import { ipcMain, BrowserWindow } from 'electron';
+import { createChildLogger } from '../lib/logger';
+import {
+ getConnectionOrchestrator,
+ getToolAggregator,
+ getResultHandler,
+} from '../services/mcp';
+import { getMeetingCopilot } from '../services/copilot';
+import { getAllMCPServerTemplates, getMCPServerTemplate } from '../config/mcp-server-templates';
+import { getMCPToolCallsByRecording, createMCPToolCall, updateMCPToolCall, getSetting, upsertSetting } from '../db';
+import { getMCPAgent } from '../services/mcp';
+import type {
+ CreateMCPServerRequest,
+ UpdateMCPServerRequest,
+ MCPDisplayResult,
+} from '../../shared/types/mcp.types';
+import { v4 as uuid } from 'uuid';
+
+const logger = createChildLogger('mcp-ipc');
+
+let mainWindow: BrowserWindow | null = null;
+
+/**
+ * Set the main window reference for sending events
+ */
+export function setMCPMainWindow(window: BrowserWindow): void {
+ mainWindow = window;
+}
+
+/**
+ * Send event to renderer
+ */
+function sendToRenderer(channel: string, data: unknown): void {
+ if (mainWindow && !mainWindow.isDestroyed()) {
+ mainWindow.webContents.send(channel, data);
+ }
+}
+
+/**
+ * Setup MCP IPC handlers
+ */
+export function setupMCPHandlers(): void {
+ logger.info('Setting up MCP IPC handlers');
+
+ const orchestrator = getConnectionOrchestrator();
+ const copilot = getMeetingCopilot();
+
+ // Load saved trigger keywords and initialize MCP agent
+ try {
+ const setting = getSetting('mcp.triggerKeywords');
+ if (setting) {
+ const keywords = JSON.parse(setting.value);
+ const mcpAgent = getMCPAgent();
+ mcpAgent.setCustomTriggerKeywords(keywords);
+ logger.info({ keywordCount: keywords.length }, 'Loaded saved MCP trigger keywords');
+ }
+ } catch (error) {
+ logger.warn({ error }, 'Failed to load saved trigger keywords');
+ }
+
+ // Forward MCP events from copilot to renderer
+ copilot.on('mcp-result', (data: { result: MCPDisplayResult }) => {
+ logger.info({
+ resultId: data.result.id,
+ toolName: data.result.toolName,
+ displayType: data.result.displayType,
+ hasContent: !!data.result.content,
+ contentPreview: data.result.content?.text?.slice(0, 100),
+ }, 'Forwarding MCP result to renderer');
+ sendToRenderer('mcp:result', data);
+ });
+
+ copilot.on('mcp-error', (data: { serverId: string; toolName: string; error: string }) => {
+ sendToRenderer('mcp:error', data);
+ });
+
+ // Forward orchestrator events to renderer
+ orchestrator.on('server-connected', (data) => {
+ sendToRenderer('mcp:server-connected', data);
+ });
+
+ orchestrator.on('server-disconnected', (data) => {
+ sendToRenderer('mcp:server-disconnected', data);
+ });
+
+ orchestrator.on('server-error', (data) => {
+ sendToRenderer('mcp:server-error', data);
+ });
+
+ // Server Management Handlers
+
+ /**
+ * Get all configured MCP servers
+ */
+ ipcMain.handle('mcp:get-servers', async () => {
+ try {
+ const servers = orchestrator.getServers();
+ const connectionStates = orchestrator.getConnectionStates();
+
+ return {
+ success: true,
+ servers,
+ connectionStates,
+ };
+ } catch (error) {
+ logger.error({ error }, 'Failed to get servers');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Get a specific server by ID
+ */
+ ipcMain.handle('mcp:get-server', async (_event, serverId: string) => {
+ try {
+ const server = orchestrator.getServer(serverId);
+ if (!server) {
+ return { success: false, error: 'Server not found' };
+ }
+ return { success: true, server };
+ } catch (error) {
+ logger.error({ error }, 'Failed to get server');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Create a new MCP server
+ */
+ ipcMain.handle('mcp:create-server', async (_event, request: CreateMCPServerRequest) => {
+ try {
+ const server = await orchestrator.createServer(request);
+ return { success: true, server };
+ } catch (error) {
+ logger.error({ error }, 'Failed to create server');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Update an MCP server
+ */
+ ipcMain.handle('mcp:update-server', async (_event, serverId: string, request: UpdateMCPServerRequest) => {
+ try {
+ const server = await orchestrator.updateServer(serverId, request);
+ if (!server) {
+ return { success: false, error: 'Server not found' };
+ }
+ return { success: true, server };
+ } catch (error) {
+ logger.error({ error }, 'Failed to update server');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Delete an MCP server
+ */
+ ipcMain.handle('mcp:delete-server', async (_event, serverId: string) => {
+ try {
+ await orchestrator.deleteServer(serverId);
+ return { success: true };
+ } catch (error) {
+ logger.error({ error }, 'Failed to delete server');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ // Connection Management Handlers
+
+ /**
+ * Connect to a server
+ */
+ ipcMain.handle('mcp:connect', async (_event, serverId: string) => {
+ try {
+ const tools = await orchestrator.connect(serverId);
+ return { success: true, tools };
+ } catch (error) {
+ logger.error({ error }, 'Failed to connect to server');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Disconnect from a server
+ */
+ ipcMain.handle('mcp:disconnect', async (_event, serverId: string) => {
+ try {
+ await orchestrator.disconnect(serverId);
+ return { success: true };
+ } catch (error) {
+ logger.error({ error }, 'Failed to disconnect from server');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Test connection to a server
+ */
+ ipcMain.handle('mcp:test-connection', async (_event, serverId: string) => {
+ try {
+ const result = await orchestrator.testConnection(serverId);
+ return { success: true, result };
+ } catch (error) {
+ logger.error({ error }, 'Failed to test connection');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ // Tool Management Handlers
+
+ /**
+ * Get all available tools from connected servers
+ */
+ ipcMain.handle('mcp:get-tools', async () => {
+ try {
+ const toolAggregator = getToolAggregator();
+ const tools = toolAggregator.getAllTools();
+ return { success: true, tools };
+ } catch (error) {
+ logger.error({ error }, 'Failed to get tools');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Execute a tool manually
+ */
+ ipcMain.handle('mcp:execute-tool', async (_event, serverId: string, toolName: string, input?: Record<string, unknown>) => {
+ try {
+ const toolAggregator = getToolAggregator();
+ const resultHandler = getResultHandler();
+
+ // Create tool call record
+ const toolCallId = uuid();
+ createMCPToolCall({
+ id: toolCallId,
+ serverId,
+ toolName,
+ toolInput: input ? JSON.stringify(input) : undefined,
+ status: 'pending',
+ triggerType: 'manual',
+ });
+
+ // Execute tool
+ const result = await orchestrator.executeTool(serverId, toolName, input);
+
+ // Update tool call record
+ updateMCPToolCall(toolCallId, {
+ toolOutput: result.result ? JSON.stringify(result.result) : undefined,
+ status: result.status,
+ errorMessage: result.error,
+ durationMs: result.durationMs,
+ });
+
+ // Transform for display
+ const tool = toolAggregator.findToolByNamespace(`${serverId}:${toolName}`);
+ const displayResult = resultHandler.transformResult(result, tool?.tool, tool?.serverName);
+
+ return { success: true, result: displayResult };
+ } catch (error) {
+ logger.error({ error }, 'Failed to execute tool');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ // Template Handlers
+
+ /**
+ * Get all server templates
+ */
+ ipcMain.handle('mcp:get-templates', async () => {
+ try {
+ const templates = getAllMCPServerTemplates();
+ return { success: true, templates };
+ } catch (error) {
+ logger.error({ error }, 'Failed to get templates');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Get a specific template
+ */
+ ipcMain.handle('mcp:get-template', async (_event, templateId: string) => {
+ try {
+ const template = getMCPServerTemplate(templateId);
+ if (!template) {
+ return { success: false, error: 'Template not found' };
+ }
+ return { success: true, template };
+ } catch (error) {
+ logger.error({ error }, 'Failed to get template');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ // History Handlers
+
+ /**
+ * Get tool calls for a recording
+ */
+ ipcMain.handle('mcp:get-tool-calls', async (_event, recordingId: number) => {
+ try {
+ const calls = getMCPToolCallsByRecording(recordingId);
+ return { success: true, calls };
+ } catch (error) {
+ logger.error({ error }, 'Failed to get tool calls');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ // Result Management Handlers
+
+ /**
+ * Dismiss an MCP result
+ */
+ ipcMain.handle('mcp:dismiss-result', async (_event, resultId: string) => {
+ try {
+ // This is handled client-side in the store, but we can track it if needed
+ logger.info({ resultId }, 'MCP result dismissed');
+ return { success: true };
+ } catch (error) {
+ logger.error({ error }, 'Failed to dismiss result');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ /**
+ * Pin an MCP result
+ */
+ ipcMain.handle('mcp:pin-result', async (_event, resultId: string) => {
+ try {
+ // This is handled client-side in the store, but we can track it if needed
+ logger.info({ resultId }, 'MCP result pinned');
+ return { success: true };
+ } catch (error) {
+ logger.error({ error }, 'Failed to pin result');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ // Trigger Keywords Handlers
+
+ /**
+ * Get custom trigger keywords
+ */
+ ipcMain.handle('mcp:get-trigger-keywords', async () => {
+ try {
+ const setting = getSetting('mcp.triggerKeywords');
+ const keywords = setting ? JSON.parse(setting.value) : [];
+ return { success: true, keywords };
+ } catch (error) {
+ logger.error({ error }, 'Failed to get trigger keywords');
+ return { success: false, error: (error as Error).message, keywords: [] };
+ }
+ });
+
+ /**
+ * Set custom trigger keywords
+ */
+ ipcMain.handle('mcp:set-trigger-keywords', async (_event, keywords: string[]) => {
+ try {
+ upsertSetting({
+ key: 'mcp.triggerKeywords',
+ value: JSON.stringify(keywords),
+ category: 'config',
+ label: 'MCP Trigger Keywords',
+ description: 'Custom keywords that trigger MCP agent tool lookups',
+ });
+
+ // Update the MCP agent with the new keywords
+ const mcpAgent = getMCPAgent();
+ mcpAgent.setCustomTriggerKeywords(keywords);
+
+ logger.info({ keywordCount: keywords.length }, 'MCP trigger keywords updated');
+ return { success: true };
+ } catch (error) {
+ logger.error({ error }, 'Failed to set trigger keywords');
+ return { success: false, error: (error as Error).message };
+ }
+ });
+
+ logger.info('MCP IPC handlers registered');
+}
+
+/**
+ * Remove MCP IPC handlers
+ */
+export function removeMCPHandlers(): void {
+ ipcMain.removeHandler('mcp:get-servers');
+ ipcMain.removeHandler('mcp:get-server');
+ ipcMain.removeHandler('mcp:create-server');
+ ipcMain.removeHandler('mcp:update-server');
+ ipcMain.removeHandler('mcp:delete-server');
+ ipcMain.removeHandler('mcp:connect');
+ ipcMain.removeHandler('mcp:disconnect');
+ ipcMain.removeHandler('mcp:test-connection');
+ ipcMain.removeHandler('mcp:get-tools');
+ ipcMain.removeHandler('mcp:execute-tool');
+ ipcMain.removeHandler('mcp:get-templates');
+ ipcMain.removeHandler('mcp:get-template');
+ ipcMain.removeHandler('mcp:get-tool-calls');
+ ipcMain.removeHandler('mcp:dismiss-result');
+ ipcMain.removeHandler('mcp:pin-result');
+ ipcMain.removeHandler('mcp:get-trigger-keywords');
+ ipcMain.removeHandler('mcp:set-trigger-keywords');
+
+ logger.info('MCP IPC handlers removed');
+}
diff --git a/src/main/ipc/permissions.ts b/src/main/ipc/permissions.ts
new file mode 100644
index 0000000..04eb4f1
--- /dev/null
+++ b/src/main/ipc/permissions.ts
@@ -0,0 +1,96 @@
+import { ipcMain, systemPreferences, shell } from 'electron';
+import type { PermissionStatus } from '../../shared/types/ipc.types';
+import { createChildLogger } from '../lib/logger';
+
+const logger = createChildLogger('ipc-permissions');
+
+export function setupPermissionHandlers(): void {
+ ipcMain.handle('check-mic-permission', async (): Promise<boolean> => {
+ if (process.platform !== 'darwin') return true;
+
+ const status = systemPreferences.getMediaAccessStatus('microphone');
+ logger.debug({ status }, 'Microphone permission status');
+ return status === 'granted';
+ });
+
+ ipcMain.handle('check-screen-permission', async (): Promise<boolean> => {
+ if (process.platform !== 'darwin') return true;
+
+ const status = systemPreferences.getMediaAccessStatus('screen');
+ logger.debug({ status }, 'Screen permission status');
+ return status === 'granted';
+ });
+
+ ipcMain.handle('check-accessibility-permission', async (): Promise<boolean> => {
+ if (process.platform !== 'darwin') return true;
+
+ // On macOS, we check if we have accessibility permissions
+ // This is typically required for screen recording
+ const isTrusted = systemPreferences.isTrustedAccessibilityClient(false);
+ logger.debug({ isTrusted }, 'Accessibility permission status');
+ return isTrusted;
+ });
+
+ ipcMain.handle('request-mic-permission', async (): Promise<boolean> => {
+ if (process.platform !== 'darwin') return true;
+
+ try {
+ const granted = await systemPreferences.askForMediaAccess('microphone');
+ logger.info({ granted }, 'Microphone permission request result');
+ return granted;
+ } catch (error) {
+ logger.error({ error }, 'Failed to request microphone permission');
+ return false;
+ }
+ });
+
+ ipcMain.handle('request-screen-permission', async (): Promise<boolean> => {
+ if (process.platform !== 'darwin') return true;
+
+ // Screen capture permission cannot be requested programmatically on macOS
+ // We need to direct users to System Preferences
+ const status = systemPreferences.getMediaAccessStatus('screen');
+
+ if (status !== 'granted') {
+ // Open System Preferences to Screen Recording
+ await shell.openExternal(
+ 'x-apple.systempreferences:com.apple.preference.security?Privacy_ScreenCapture'
+ );
+ return false;
+ }
+
+ return true;
+ });
+
+ ipcMain.handle('open-system-settings', async (_event, pane: string): Promise<void> => {
+ if (process.platform !== 'darwin') return;
+
+ const paneMap: Record<string, string> = {
+ microphone: 'x-apple.systempreferences:com.apple.preference.security?Privacy_Microphone',
+ screen: 'x-apple.systempreferences:com.apple.preference.security?Privacy_ScreenCapture',
+ accessibility: 'x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility',
+ camera: 'x-apple.systempreferences:com.apple.preference.security?Privacy_Camera',
+ };
+
+ const url = paneMap[pane];
+ if (url) {
+ await shell.openExternal(url);
+ }
+ });
+
+ ipcMain.handle('get-permission-status', async (): Promise<PermissionStatus> => {
+ if (process.platform !== 'darwin') {
+ return {
+ microphone: true,
+ screen: true,
+ accessibility: true,
+ };
+ }
+
+ return {
+ microphone: systemPreferences.getMediaAccessStatus('microphone') === 'granted',
+ screen: systemPreferences.getMediaAccessStatus('screen') === 'granted',
+ accessibility: systemPreferences.isTrustedAccessibilityClient(false),
+ };
+ });
+}
diff --git a/src/main/lib/config.ts b/src/main/lib/config.ts
new file mode 100644
index 0000000..fda1856
--- /dev/null
+++ b/src/main/lib/config.ts
@@ -0,0 +1,112 @@
+import { app } from 'electron';
+import path from 'path';
+import fs from 'fs';
+import type { AppConfig, RuntimeConfig } from '../../shared/schemas/config.schema';
+import { logger } from './logger';
+
+const CONFIG_FILENAME = 'config.json';
+const RUNTIME_FILENAME = 'runtime.json';
+const AUTH_CONFIG_FILENAME = 'auth_config.json';
+
+export function getConfigPath(): string {
+ return path.join(app.getPath('userData'), CONFIG_FILENAME);
+}
+
+export function getRuntimeConfigPath(): string {
+ // Runtime config is in the app directory (for development) or resources (for production)
+ if (app.isPackaged) {
+ return path.join(process.resourcesPath, 'resources', RUNTIME_FILENAME);
+ }
+ return path.join(app.getAppPath(), RUNTIME_FILENAME);
+}
+
+export function getAuthConfigPath(): string {
+ // Auth config is in the app directory (for auto-registration on startup)
+ if (app.isPackaged) {
+ return path.join(process.resourcesPath, 'resources', AUTH_CONFIG_FILENAME);
+ }
+ return path.join(app.getAppPath(), AUTH_CONFIG_FILENAME);
+}
+
+export function loadAppConfig(): AppConfig {
+ const configPath = getConfigPath();
+ try {
+ if (fs.existsSync(configPath)) {
+ const data = fs.readFileSync(configPath, 'utf-8');
+ return JSON.parse(data) as AppConfig;
+ }
+ } catch (error) {
+ logger.error({ error, configPath }, 'Failed to load app config');
+ }
+ return {};
+}
+
+export function saveAppConfig(config: AppConfig): void {
+ const configPath = getConfigPath();
+ try {
+ const dir = path.dirname(configPath);
+ if (!fs.existsSync(dir)) {
+ fs.mkdirSync(dir, { recursive: true });
+ }
+ fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
+ logger.info({ configPath }, 'App config saved');
+ } catch (error) {
+ logger.error({ error, configPath }, 'Failed to save app config');
+ throw error;
+ }
+}
+
+export function loadRuntimeConfig(): RuntimeConfig {
+ const configPath = getRuntimeConfigPath();
+ try {
+ if (fs.existsSync(configPath)) {
+ const data = fs.readFileSync(configPath, 'utf-8');
+ return JSON.parse(data) as RuntimeConfig;
+ }
+ } catch (error) {
+ logger.warn({ error, configPath }, 'Failed to load runtime config, using defaults');
+ }
+ return {
+ apiPort: 51731,
+ };
+}
+
+export function loadAuthConfig(): { apiKey: string; name: string } | null {
+ const configPath = getAuthConfigPath();
+ try {
+ if (fs.existsSync(configPath)) {
+ const data = fs.readFileSync(configPath, 'utf-8');
+ const config = JSON.parse(data);
+ if (config.apiKey && config.name) {
+ return config;
+ }
+ }
+ } catch (error) {
+ logger.warn({ error, configPath }, 'Failed to load auth config');
+ }
+ return null;
+}
+
+export function deleteAuthConfig(): void {
+ const configPath = getAuthConfigPath();
+ try {
+ if (fs.existsSync(configPath)) {
+ fs.unlinkSync(configPath);
+ logger.info({ configPath }, 'Auth config deleted');
+ }
+ } catch (error) {
+ logger.warn({ error, configPath }, 'Failed to delete auth config');
+ }
+}
+
+export function clearAppConfig(): void {
+ const configPath = getConfigPath();
+ try {
+ if (fs.existsSync(configPath)) {
+ fs.unlinkSync(configPath);
+ logger.info({ configPath }, 'App config cleared');
+ }
+ } catch (error) {
+ logger.error({ error, configPath }, 'Failed to clear app config');
+ }
+}
diff --git a/src/main/lib/logger.ts b/src/main/lib/logger.ts
new file mode 100644
index 0000000..eb4bd6f
--- /dev/null
+++ b/src/main/lib/logger.ts
@@ -0,0 +1,101 @@
+import pino from 'pino';
+import { app } from 'electron';
+import path from 'path';
+import fs from 'fs';
+
+function getLogsDir(): string {
+ try {
+ const userDataPath = app.getPath('userData');
+ const logsDir = path.join(userDataPath, 'logs');
+
+ if (!fs.existsSync(logsDir)) {
+ fs.mkdirSync(logsDir, { recursive: true });
+ }
+
+ return logsDir;
+ } catch {
+ // App not ready yet, use temp
+ return '/tmp';
+ }
+}
+
+function getLogFilePath(): string {
+ const logsDir = getLogsDir();
+ const date = new Date().toISOString().split('T')[0];
+ return path.join(logsDir, `app-${date}.log`);
+}
+
+const isDev = process.env.NODE_ENV === 'development' || !app.isPackaged;
+
+// Create file stream for logging in production
+let fileStream: fs.WriteStream | null = null;
+
+function getFileStream(): fs.WriteStream {
+ if (!fileStream) {
+ const logPath = getLogFilePath();
+ fileStream = fs.createWriteStream(logPath, { flags: 'a' });
+
+ // Log the log file location at startup
+ console.log(`[Logger] Writing logs to: ${logPath}`);
+ }
+ return fileStream;
+}
+
+// Custom destination that writes to both console and file
+const multiStream = {
+ write(msg: string) {
+ // Always write to stdout
+ process.stdout.write(msg);
+
+ // In production, also write to file
+ if (!isDev) {
+ try {
+ getFileStream().write(msg);
+ } catch (e) {
+ // Ignore file write errors
+ }
+ }
+ },
+};
+
+export const logger = pino(
+ {
+ level: isDev ? 'debug' : 'info',
+ transport: isDev
+ ? {
+ target: 'pino-pretty',
+ options: {
+ colorize: true,
+ translateTime: 'SYS:standard',
+ ignore: 'pid,hostname',
+ },
+ }
+ : undefined,
+ base: {
+ pid: process.pid,
+ },
+ },
+ // In production, use our multi-stream; in dev, let pino-pretty handle it
+ isDev ? undefined : multiStream
+);
+
+export function createChildLogger(name: string) {
+ return logger.child({ module: name });
+}
+
+/**
+ * Get the path to the logs directory for the user to access
+ */
+export function getLogsPath(): string {
+ return getLogsDir();
+}
+
+/**
+ * Close the log file stream (call on app exit)
+ */
+export function closeLogger(): void {
+ if (fileStream) {
+ fileStream.end();
+ fileStream = null;
+ }
+}
diff --git a/src/main/lib/paths.ts b/src/main/lib/paths.ts
new file mode 100644
index 0000000..845c0a6
--- /dev/null
+++ b/src/main/lib/paths.ts
@@ -0,0 +1,133 @@
+import { app } from 'electron';
+import path from 'path';
+import fs from 'fs';
+
+/**
+ * Fix a path to use app.asar.unpacked instead of app.asar
+ * This is needed for binary files that need to be executed
+ */
+export function getUnpackedPath(originalPath: string): string {
+ if (!app.isPackaged) {
+ return originalPath;
+ }
+
+ // Replace app.asar with app.asar.unpacked
+ return originalPath.replace('app.asar', 'app.asar.unpacked');
+}
+
+/**
+ * Get the path to a binary in node_modules, handling asar unpacking
+ */
+function getModuleRoot(moduleName: string): string {
+ try {
+ // Resolve from cwd to avoid relying on process.cwd() being the app root
+ // This matches Node's normal module resolution behavior.
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
+ const resolved = require.resolve(`${moduleName}/package.json`, { paths: [process.cwd()] });
+ return path.dirname(resolved);
+ } catch {
+ return path.join(process.cwd(), 'node_modules', moduleName);
+ }
+}
+
+export function getNodeModulesBinaryPath(moduleName: string, binaryPath: string): string {
+ // In development, resolve via Node module resolution
+ if (!app.isPackaged) {
+ return path.join(getModuleRoot(moduleName), binaryPath);
+ }
+
+ // In production, use the unpacked path
+ const resourcesPath = process.resourcesPath;
+ return path.join(resourcesPath, 'app.asar.unpacked', 'node_modules', moduleName, binaryPath);
+}
+
+/**
+ * Get the directory containing a binary in node_modules
+ */
+export function getNodeModulesBinaryDir(moduleName: string, binaryDir: string): string {
+ if (!app.isPackaged) {
+ return path.join(getModuleRoot(moduleName), binaryDir);
+ }
+
+ const resourcesPath = process.resourcesPath;
+ return path.join(resourcesPath, 'app.asar.unpacked', 'node_modules', moduleName, binaryDir);
+}
+
+/**
+ * Get the cloudflared binary path
+ */
+export function getCloudflaredBinaryPath(): string {
+ return getNodeModulesBinaryPath('cloudflared', 'bin/cloudflared');
+}
+
+/**
+ * Get the videodb recorder binary path
+ */
+export function getVideoDBRecorderPath(): string {
+ return getNodeModulesBinaryPath('videodb', 'bin/recorder');
+}
+
+/**
+ * Get the videodb recorder binary directory (contains recorder and librecorder.dylib)
+ */
+export function getVideoDBRecorderDir(): string {
+ return getNodeModulesBinaryDir('videodb', 'bin');
+}
+
+/**
+ * Get the videodb meet_detector binary path
+ */
+export function getVideoDBMeetDetectorPath(): string {
+ return getNodeModulesBinaryPath('videodb', 'bin/meet_detector');
+}
+
+/**
+ * Get environment variables needed for running the videodb recorder binary
+ * This ensures librecorder.dylib can be found via DYLD_LIBRARY_PATH
+ */
+export function getVideoDBRecorderEnv(): NodeJS.ProcessEnv {
+ const binDir = getVideoDBRecorderDir();
+ const currentDyldPath = process.env.DYLD_LIBRARY_PATH || '';
+
+ return {
+ ...process.env,
+ // Add the bin directory to DYLD_LIBRARY_PATH so librecorder.dylib can be found
+ DYLD_LIBRARY_PATH: currentDyldPath ? `${binDir}:${currentDyldPath}` : binDir,
+ // Also set DYLD_FALLBACK_LIBRARY_PATH as a fallback mechanism
+ DYLD_FALLBACK_LIBRARY_PATH: binDir,
+ };
+}
+
+/**
+ * Verify that the videodb recorder binary exists and is accessible
+ */
+export function verifyVideoDBRecorder(): { exists: boolean; path: string; error?: string } {
+ const recorderPath = getVideoDBRecorderPath();
+ const binDir = getVideoDBRecorderDir();
+ const dylibPath = path.join(binDir, 'librecorder.dylib');
+
+ if (!fs.existsSync(recorderPath)) {
+ return { exists: false, path: recorderPath, error: `Recorder binary not found at ${recorderPath}` };
+ }
+
+ if (process.platform === 'darwin' && !fs.existsSync(dylibPath)) {
+ return { exists: false, path: recorderPath, error: `librecorder.dylib not found at ${dylibPath}` };
+ }
+
+ return { exists: true, path: recorderPath };
+}
+
+/**
+ * Get the user data directory for storing app-specific files
+ * This is safe to use in both dev and production
+ */
+export function getUserDataPath(): string {
+ return app.getPath('userData');
+}
+
+/**
+ * Get a safe path for lock files that works in both dev and production
+ */
+export function getLockFilePath(filename: string): string {
+ return path.join(getUserDataPath(), filename);
+}
diff --git a/src/main/lib/videodb-patch.ts b/src/main/lib/videodb-patch.ts
new file mode 100644
index 0000000..23f39fe
--- /dev/null
+++ b/src/main/lib/videodb-patch.ts
@@ -0,0 +1,109 @@
+/**
+ * Ensures VideoDB recorder binaries work in packaged Electron apps.
+ *
+ * The VideoDB recorder binary creates a lock file in its own directory.
+ * In a packaged .app bundle, that directory is read-only (inside asar.unpacked).
+ *
+ * This module:
+ * 1. Copies binaries from asar.unpacked to a writable userData/bin directory
+ * 2. Intercepts child_process.spawn to redirect recorder calls to the writable copy
+ *
+ * This approach is simpler and more robust than patching the BinaryManager prototype.
+ */
+
+import { app } from 'electron';
+import fs from 'fs';
+import path from 'path';
+import { createChildLogger } from './logger';
+
+const logger = createChildLogger('videodb-patch');
+
+let spawnPatched = false;
+
+/**
+ * Ensures VideoDB binaries are in a writable location and patches spawn() to use them.
+ * Call this once at app startup, before any CaptureClient usage.
+ */
+export function applyVideoDBPatches(): void {
+ if (spawnPatched) {
+ logger.debug('VideoDB patches already applied');
+ return;
+ }
+
+ try {
+ // Source: binaries from the unpacked asar
+ // In packaged app: /path/to/App.app/Contents/Resources/app.asar.unpacked/node_modules/videodb/bin
+ // Use app.getAppPath() for reliable root path (works regardless of __dirname depth)
+ const srcDir = path
+ .join(app.getAppPath(), 'node_modules', 'videodb', 'bin')
+ .replace('app.asar', 'app.asar.unpacked');
+
+ // Destination: writable userData directory
+ // e.g., ~/Library/Application Support/meeting-copilot/bin
+ const destDir = path.join(app.getPath('userData'), 'bin');
+
+ logger.info({ srcDir, destDir }, 'Setting up writable binaries');
+
+ // Create destination directory if needed
+ if (!fs.existsSync(destDir)) {
+ fs.mkdirSync(destDir, { recursive: true });
+ logger.info({ destDir }, 'Created bin directory');
+ }
+
+ // Copy binaries if source exists (won't exist in dev mode)
+ if (fs.existsSync(srcDir)) {
+ for (const file of fs.readdirSync(srcDir)) {
+ const src = path.join(srcDir, file);
+ const dest = path.join(destDir, file);
+
+ const srcStat = fs.statSync(src);
+ if (!srcStat.isFile()) continue;
+
+ // Only copy if file doesn't exist or size changed
+ if (!fs.existsSync(dest) || fs.statSync(dest).size !== srcStat.size) {
+ fs.copyFileSync(src, dest);
+ fs.chmodSync(dest, 0o755);
+ logger.info({ file, dest }, 'Copied binary');
+ }
+ }
+ } else {
+ logger.info({ srcDir }, 'No bundled binaries found (dev mode - skipping copy)');
+ }
+
+ // Intercept child_process.spawn to redirect recorder binary to writable copy
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
+ const cp = require('child_process');
+ const origSpawn = cp.spawn;
+ const binName = process.platform === 'win32' ? 'recorder.exe' : 'recorder';
+ const writableBin = path.join(destDir, binName);
+
+ cp.spawn = function (cmd: string, args: string[], opts: Record<string, unknown>) {
+ // Intercept calls to the recorder binary
+ if (
+ typeof cmd === 'string' &&
+ cmd.includes('recorder') &&
+ !cmd.startsWith(destDir) &&
+ fs.existsSync(writableBin)
+ ) {
+ // Set cwd to the bin directory so lock files are created there
+ const patchedOpts = { ...opts, cwd: destDir };
+ logger.debug({ original: cmd, patched: writableBin, cwd: destDir }, 'Intercepted spawn');
+ return origSpawn.call(this, writableBin, args, patchedOpts);
+ }
+ return origSpawn.call(this, cmd, args, opts);
+ };
+
+ spawnPatched = true;
+ logger.info({ writableBin }, 'spawn() patched - recorder will use writable binary');
+ } catch (error) {
+ logger.error({ error }, 'Failed to apply VideoDB patches');
+ throw error;
+ }
+}
+
+/**
+ * Check if patches have been applied
+ */
+export function isVideoDBPatched(): boolean {
+ return spawnPatched;
+}
diff --git a/src/main/server/index.ts b/src/main/server/index.ts
new file mode 100644
index 0000000..06895f5
--- /dev/null
+++ b/src/main/server/index.ts
@@ -0,0 +1,105 @@
+import { Hono } from 'hono';
+import { cors } from 'hono/cors';
+import { trpcServer } from '@hono/trpc-server';
+import { serve } from '@hono/node-server';
+import { appRouter } from './trpc/router';
+import { createContext } from './trpc/context';
+import { webhookRouter } from './routes/webhook';
+import { createChildLogger } from '../lib/logger';
+
+const logger = createChildLogger('http-server');
+
+let server: ReturnType<typeof serve> | null = null;
+
+export function createServer(port: number) {
+ const app = new Hono();
+
+ // CORS middleware
+ app.use(
+ '*',
+ cors({
+ origin: '*',
+ allowMethods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
+ allowHeaders: ['Content-Type', 'x-access-token'],
+ })
+ );
+
+ // Health check
+ app.get('/api', (c) => {
+ return c.json({
+ status: 'ok',
+ message: 'Meeting Copilot Server Running',
+ });
+ });
+
+ // tRPC handler
+ app.use(
+ '/api/trpc/*',
+ trpcServer({
+ router: appRouter,
+ endpoint: '/api/trpc',
+ createContext: async (_opts, c) => createContext(c),
+ })
+ );
+
+ // Webhook routes (raw Hono, not tRPC)
+ app.route('/api', webhookRouter);
+
+ return app;
+}
+
+let currentPort: number | undefined;
+
+export async function startServer(port: number, maxRetries: number = 10): Promise<number> {
+ if (server) {
+ logger.warn('Server already running');
+ return currentPort || port;
+ }
+
+ const app = createServer(port);
+
+ const tryPort = (attemptPort: number, retriesLeft: number): Promise<number> => {
+ return new Promise((resolve, reject) => {
+ const serverInstance = serve(
+ {
+ fetch: app.fetch,
+ port: attemptPort,
+ },
+ (info) => {
+ server = serverInstance;
+ currentPort = info.port;
+ logger.info({ port: info.port }, 'HTTP server started');
+ resolve(info.port);
+ }
+ );
+
+ // Handle errors (like EADDRINUSE)
+ serverInstance.on('error', (err: NodeJS.ErrnoException) => {
+ if (err.code === 'EADDRINUSE' && retriesLeft > 0) {
+ logger.warn({ port: attemptPort }, 'Port in use, trying next port');
+ serverInstance.close();
+ resolve(tryPort(attemptPort + 1, retriesLeft - 1));
+ } else {
+ reject(err);
+ }
+ });
+ });
+ };
+
+ return tryPort(port, maxRetries);
+}
+
+export async function stopServer(): Promise<void> {
+ if (server) {
+ logger.info('Stopping HTTP server');
+ server.close();
+ server = null;
+ }
+}
+
+export function getServerStatus(): { running: boolean; port?: number } {
+ return {
+ running: !!server,
+ port: currentPort,
+ };
+}
diff --git a/src/main/server/routes/webhook.ts b/src/main/server/routes/webhook.ts
new file mode 100644
index 0000000..54f65ef
--- /dev/null
+++ b/src/main/server/routes/webhook.ts
@@ -0,0 +1,169 @@
+import { Hono } from 'hono';
+import type { WebhookPayload } from '../../../shared/schemas/webhook.schema';
+import {
+ getRecordingBySessionId,
+ updateRecordingBySessionId,
+} from '../../db';
+import { createInsightsService } from '../../services/insights.service';
+import { getUserByAccessToken } from '../../db';
+import { createChildLogger } from '../../lib/logger';
+
+const logger = createChildLogger('webhook-route');
+
+export const webhookRouter = new Hono();
+
+const sessionUserMap = new Map<string, string>();
+
+export function registerSessionUser(sessionId: string, accessToken: string): void {
+ sessionUserMap.set(sessionId, accessToken);
+ logger.debug({ sessionId }, 'Registered session user mapping');
+}
+
+webhookRouter.post('/webhook', async (c) => {
+ try {
+ const payload = (await c.req.json()) as WebhookPayload;
+
+ logger.info({
+ event: payload.event,
+ sessionId: payload.capture_session_id,
+ data: payload.data,
+ }, 'Webhook received');
+
+ const sessionId = payload.capture_session_id;
+
+ if (!sessionId) {
+ logger.debug({ event: payload.event, data: payload.data }, 'Webhook received without session ID');
+ return c.json({ status: 'ok', received: true });
+ }
+
+ switch (payload.event) {
+ case 'capture_session.exported': {
+ logger.info({ sessionId, data: payload.data }, 'Processing capture_session.exported');
+ await handleCaptureSessionExported(sessionId, payload.data);
+ break;
+ }
+
+ case 'capture_session.active': {
+ logger.info({ sessionId }, 'Capture session is now active');
+ break;
+ }
+
+ case 'capture_session.created': {
+ logger.debug({ sessionId }, 'Capture session created acknowledgment received');
+ break;
+ }
+
+ case 'capture_session.stopped': {
+ logger.info({ sessionId }, 'Capture session stopped, waiting for export');
+ break;
+ }
+
+ case 'capture_session.starting': {
+ logger.info({ sessionId }, 'Capture session starting');
+ break;
+ }
+
+ default: {
+ if (payload.event.startsWith('transcript.')) {
+ logger.debug({ event: payload.event, sessionId }, 'Transcript event received');
+ } else {
+ logger.info({ event: payload.event, data: payload.data }, 'Unhandled webhook event');
+ }
+ }
+ }
+
+ return c.json({ status: 'ok', received: true });
+ } catch (error) {
+ logger.error({ error }, 'Webhook processing error');
+ return c.json({ status: 'error', message: 'Internal server error' }, 500);
+ }
+});
+
+async function handleCaptureSessionExported(
+ sessionId: string,
+ data: Record<string, unknown> | undefined
+): Promise<void> {
+ logger.info({ sessionId, data }, '[Webhook] handleCaptureSessionExported called');
+
+ if (!data) {
+ logger.warn({ sessionId }, '[Webhook] No data in capture_session.exported event');
+ return;
+ }
+
+ logger.info({ sessionId, dataKeys: Object.keys(data) }, '[Webhook] Data keys available');
+
+ // Use exported_video_id (matching Python webhook handler)
+ const videoId = data.exported_video_id as string | undefined;
+ const streamUrl = data.stream_url as string | undefined;
+ const playerUrl = data.player_url as string | undefined;
+ const duration = data.duration as number | undefined;
+
+ logger.info({
+ sessionId,
+ videoId,
+ streamUrl,
+ playerUrl,
+ duration,
+ }, '[Webhook] Extracted data from payload');
+
+ if (!videoId) {
+ logger.warn({ sessionId, data }, '[Webhook] No exported_video_id in capture_session.exported event');
+ return;
+ }
+
+ logger.info({ sessionId, videoId }, '[Webhook] Processing capture session export');
+
+ const recording = updateRecordingBySessionId(sessionId, {
+ videoId,
+ streamUrl: streamUrl || null,
+ playerUrl: playerUrl || null,
+ duration: duration || null,
+ status: 'available',
+ insightsStatus: 'pending',
+ });
+
+ if (!recording) {
+ logger.warn({ sessionId }, '[Webhook] Recording not found for session');
+ return;
+ }
+
+ logger.info({
+ recordingId: recording.id,
+ videoId,
+ status: recording.status,
+ insightsStatus: recording.insightsStatus,
+ }, '[Webhook] Recording updated with video info');
+
+ const accessToken = sessionUserMap.get(sessionId);
+ logger.info({
+ sessionId,
+ hasAccessToken: !!accessToken,
+ sessionUserMapSize: sessionUserMap.size,
+ sessionUserMapKeys: Array.from(sessionUserMap.keys()),
+ }, '[Webhook] Looking up user for session');
+
+ if (!accessToken) {
+ logger.warn({ sessionId }, '[Webhook] No user mapping found for session, skipping insights');
+ return;
+ }
+
+ const user = getUserByAccessToken(accessToken);
+ if (!user) {
+ logger.warn({ sessionId }, '[Webhook] User not found for session, skipping insights');
+ return;
+ }
+
+ logger.info({ sessionId, userId: user.id, userName: user.name }, '[Webhook] Starting insights processing');
+
+ const insightsService = createInsightsService(user.apiKey);
+
+ // Fire and forget - don't await
+ insightsService.processRecording(recording.id, videoId).then((result) => {
+ logger.info({ recordingId: recording.id, result }, '[Webhook] Insights processing completed');
+ }).catch((error) => {
+ logger.error({ error, recordingId: recording.id }, '[Webhook] Background insights processing failed');
+ });
+
+ sessionUserMap.delete(sessionId);
+ logger.info({ sessionId }, '[Webhook] Session user mapping cleaned up');
+}
diff --git a/src/main/server/trpc/context.ts b/src/main/server/trpc/context.ts
new file mode 100644
index 0000000..aa3ce0f
--- /dev/null
+++ b/src/main/server/trpc/context.ts
@@ -0,0 +1,30 @@
+import type { Context as HonoContext } from 'hono';
+import { getUserByAccessToken } from '../../db';
+import type { User } from '../../db/schema';
+import { createChildLogger } from '../../lib/logger';
+
+const logger = createChildLogger('trpc-context');
+
+export interface TrpcContext extends Record<string, unknown> {
+ user: User | null;
+ accessToken: string | null;
+}
+
+export async function createContext(c: HonoContext): Promise<TrpcContext> {
+ const accessToken = c.req.header('x-access-token') || null;
+
+ let user: User | null = null;
+
+ if (accessToken) {
+ try {
+ user = getUserByAccessToken(accessToken) || null;
+ } catch (error) {
+ logger.error({ error }, 'Failed to get user from access token');
+ }
+ }
+
+ return {
+ user,
+ accessToken,
+ };
+}
diff --git a/src/main/server/trpc/procedures/auth.ts b/src/main/server/trpc/procedures/auth.ts
new file mode 100644
index 0000000..e0509e1
--- /dev/null
+++ b/src/main/server/trpc/procedures/auth.ts
@@ -0,0 +1,71 @@
+import { TRPCError } from '@trpc/server';
+import { v4 as uuidv4 } from 'uuid';
+import { router, publicProcedure } from '../trpc';
+import { RegisterInputSchema, RegisterOutputSchema } from '../../../../shared/schemas/auth.schema';
+import { createUser, getUserByAccessToken } from '../../../db';
+import { createVideoDBService } from '../../../services/videodb.service';
+import { createChildLogger } from '../../../lib/logger';
+import { loadRuntimeConfig } from '../../../lib/config';
+
+const logger = createChildLogger('auth-procedure');
+
+export const authRouter = router({
+ register: publicProcedure
+ .input(RegisterInputSchema)
+ .output(RegisterOutputSchema)
+ .mutation(async ({ input }) => {
+ const { name, apiKey } = input;
+
+ logger.info({ name }, 'Registration attempt');
+
+ // Verify API key with VideoDB
+ const runtimeConfig = loadRuntimeConfig();
+ const videodbService = createVideoDBService(apiKey, runtimeConfig.apiUrl);
+
+ const isValid = await videodbService.verifyApiKey();
+
+ if (!isValid) {
+ logger.warn({ name }, 'Registration failed: Invalid API key');
+ return {
+ success: false,
+ error: 'Invalid API key',
+ };
+ }
+
+ // Generate access token
+ const accessToken = uuidv4();
+
+ // Check if user with this token already exists (shouldn't happen with UUID)
+ const existingUser = getUserByAccessToken(accessToken);
+ if (existingUser) {
+ logger.error({ name }, 'Token collision detected');
+ throw new TRPCError({
+ code: 'INTERNAL_SERVER_ERROR',
+ message: 'Token generation failed, please try again',
+ });
+ }
+
+ // Create user
+ try {
+ const user = createUser({
+ name,
+ apiKey,
+ accessToken,
+ });
+
+ logger.info({ userId: user.id, name }, 'User registered successfully');
+
+ return {
+ success: true,
+ accessToken: user.accessToken,
+ name: user.name,
+ };
+ } catch (error) {
+ logger.error({ error, name }, 'Failed to create user');
+ throw new TRPCError({
+ code: 'INTERNAL_SERVER_ERROR',
+ message: 'Failed to create user',
+ });
+ }
+ }),
+});
diff --git a/src/main/server/trpc/procedures/capture.ts b/src/main/server/trpc/procedures/capture.ts
new file mode 100644
index 0000000..a0d0a95
--- /dev/null
+++ b/src/main/server/trpc/procedures/capture.ts
@@ -0,0 +1,62 @@
+import { router, protectedProcedure } from '../trpc';
+import {
+ CreateCaptureSessionInputSchema,
+ CaptureSessionSchema,
+} from '../../../../shared/schemas/capture.schema';
+import { createVideoDBService } from '../../../services/videodb.service';
+import { loadRuntimeConfig } from '../../../lib/config';
+import { getTunnelUrl } from '../../../services/tunnel.service';
+import { createChildLogger } from '../../../lib/logger';
+
+const logger = createChildLogger('capture-procedure');
+
+export const captureRouter = router({
+ createSession: protectedProcedure
+ .input(CreateCaptureSessionInputSchema)
+ .output(CaptureSessionSchema)
+ .mutation(async ({ ctx, input }) => {
+ const { user } = ctx;
+
+ const runtimeConfig = loadRuntimeConfig();
+ const tunnelUrl = getTunnelUrl();
+
+ logger.info({
+ tunnelUrl,
+ runtimeConfigApiPort: runtimeConfig.apiPort,
+ hasTunnel: !!tunnelUrl,
+ }, '[Capture] Checking tunnel status');
+
+ // Use tunnel URL for webhook if available, otherwise use localhost
+ const webhookUrl = tunnelUrl
+ ? `${tunnelUrl}/api/webhook`
+ : `http://localhost:${runtimeConfig.apiPort}/api/webhook`;
+
+ if (!tunnelUrl) {
+ logger.warn('⚠️ No tunnel URL available - using localhost. Webhooks from VideoDB will NOT work!')
+ }
+
+ const callbackUrl = input.callbackUrl || webhookUrl;
+
+ logger.info({
+ userId: user.id,
+ callbackUrl,
+ webhookUrl,
+ inputCallbackUrl: input.callbackUrl,
+ }, '[Capture] Creating capture session with callback URL');
+
+ const videodbService = createVideoDBService(user.apiKey, runtimeConfig.apiUrl);
+
+ const session = await videodbService.createCaptureSession({
+ endUserId: `user-${user.id}`,
+ callbackUrl,
+ metadata: input.metadata,
+ });
+
+ logger.info(
+ { sessionId: session.sessionId },
+ 'Capture session created'
+ );
+
+ return session;
+ }),
+});
diff --git a/src/main/server/trpc/procedures/config.ts b/src/main/server/trpc/procedures/config.ts
new file mode 100644
index 0000000..bdee78b
--- /dev/null
+++ b/src/main/server/trpc/procedures/config.ts
@@ -0,0 +1,29 @@
+import { router, protectedProcedure } from '../trpc';
+import { ServerConfigOutputSchema, TunnelStatusSchema } from '../../../../shared/schemas/config.schema';
+import { loadRuntimeConfig } from '../../../lib/config';
+import { getTunnelUrl, getTunnelStatus } from '../../../services/tunnel.service';
+
+export const configRouter = router({
+ get: protectedProcedure
+ .output(ServerConfigOutputSchema)
+ .query(async () => {
+ const runtimeConfig = loadRuntimeConfig();
+ const tunnelUrl = getTunnelUrl();
+
+ return {
+ webhookUrl: tunnelUrl
+ ? `${tunnelUrl}/api/webhook`
+ : `http://localhost:${runtimeConfig.apiPort}/api/webhook`,
+ apiPort: runtimeConfig.apiPort,
+ backendBaseUrl: runtimeConfig.apiUrl,
+ };
+ }),
+});
+
+export const tunnelRouter = router({
+ status: protectedProcedure
+ .output(TunnelStatusSchema)
+ .query(async () => {
+ return getTunnelStatus();
+ }),
+});
diff --git a/src/main/server/trpc/procedures/recordings.ts b/src/main/server/trpc/procedures/recordings.ts
new file mode 100644
index 0000000..daa830c
--- /dev/null
+++ b/src/main/server/trpc/procedures/recordings.ts
@@ -0,0 +1,186 @@
+import { z } from 'zod';
+import { router, protectedProcedure } from '../trpc';
+import {
+ RecordingSchema,
+ CreateRecordingInputSchema,
+ StopRecordingInputSchema,
+ GetRecordingInputSchema,
+ CallSummarySchema,
+ PlaybookSnapshotSchema,
+ MetricsSnapshotSchema,
+ type CallSummary,
+ type PlaybookSnapshot,
+ type MetricsSnapshot,
+} from '../../../../shared/schemas/recording.schema';
+import {
+ getAllRecordings,
+ createRecording,
+ updateRecordingBySessionId,
+ getRecordingById,
+} from '../../../db';
+import { createChildLogger } from '../../../lib/logger';
+
+const logger = createChildLogger('recordings-procedure');
+
+// Safely parse and validate JSON against schema
+function safeJsonParse<T>(
+ json: string | null | undefined,
+ schema: z.ZodType<T>
+): T | undefined {
+ if (!json) return undefined;
+ try {
+ const parsed = JSON.parse(json);
+ const result = schema.safeParse(parsed);
+ return result.success ? result.data : undefined;
+ } catch {
+ return undefined;
+ }
+}
+
+// Transform database recording to API schema
+function toApiRecording(dbRecording: ReturnType<typeof getRecordingById>) {
+ if (!dbRecording) return null;
+
+ return {
+ id: dbRecording.id,
+ videoId: dbRecording.videoId,
+ streamUrl: dbRecording.streamUrl,
+ playerUrl: dbRecording.playerUrl,
+ sessionId: dbRecording.sessionId,
+ duration: dbRecording.duration,
+ createdAt: dbRecording.createdAt,
+ status: dbRecording.status as 'recording' | 'processing' | 'available' | 'failed',
+ insights: dbRecording.insights,
+ insightsStatus: dbRecording.insightsStatus as 'pending' | 'processing' | 'ready' | 'failed',
+ // Parse and validate copilot data from JSON strings
+ callSummary: safeJsonParse<CallSummary>(dbRecording.callSummary, CallSummarySchema),
+ playbookSnapshot: safeJsonParse<PlaybookSnapshot>(dbRecording.playbookSnapshot, PlaybookSnapshotSchema),
+ metricsSnapshot: safeJsonParse<MetricsSnapshot>(dbRecording.metricsSnapshot, MetricsSnapshotSchema),
+ };
+}
+
+export const recordingsRouter = router({
+ list: protectedProcedure
+ .output(z.array(RecordingSchema))
+ .query(async () => {
+ logger.info('Fetching all recordings');
+ const recordings = getAllRecordings();
+ logger.info({
+ count: recordings.length,
+ recordings: recordings.map(r => ({
+ id: r.id,
+ sessionId: r.sessionId,
+ status: r.status,
+ insightsStatus: r.insightsStatus,
+ videoId: r.videoId,
+ })),
+ }, 'Recordings fetched');
+ return recordings.map((r) => toApiRecording(r)!);
+ }),
+
+ get: protectedProcedure
+ .input(GetRecordingInputSchema)
+ .output(RecordingSchema.nullable())
+ .query(async ({ input }) => {
+ logger.debug({ recordingId: input.recordingId }, 'Fetching recording');
+ const recording = getRecordingById(input.recordingId);
+ return toApiRecording(recording);
+ }),
+
+ start: protectedProcedure
+ .input(CreateRecordingInputSchema)
+ .output(RecordingSchema)
+ .mutation(async ({ input }) => {
+ logger.info({ sessionId: input.sessionId }, 'Starting recording');
+
+ const recording = createRecording({
+ sessionId: input.sessionId,
+ status: 'recording',
+ });
+
+ logger.info(
+ { recordingId: recording.id, sessionId: input.sessionId },
+ 'Recording started'
+ );
+
+ return toApiRecording(recording)!;
+ }),
+
+ stop: protectedProcedure
+ .input(StopRecordingInputSchema)
+ .output(RecordingSchema.nullable())
+ .mutation(async ({ input }) => {
+ logger.info({ sessionId: input.sessionId }, 'Stopping recording');
+
+ const recording = updateRecordingBySessionId(input.sessionId, {
+ status: 'processing',
+ });
+
+ if (!recording) {
+ logger.warn({ sessionId: input.sessionId }, 'Recording not found');
+ return null;
+ }
+
+ logger.info(
+ { recordingId: recording.id, sessionId: input.sessionId },
+ 'Recording stopped, status set to processing'
+ );
+
+ return toApiRecording(recording);
+ }),
+
+ markFailed: protectedProcedure
+ .input(z.object({ sessionId: z.string() }))
+ .output(RecordingSchema.nullable())
+ .mutation(async ({ input }) => {
+ logger.info({ sessionId: input.sessionId }, 'Marking recording as failed');
+
+ const recording = updateRecordingBySessionId(input.sessionId, {
+ status: 'failed',
+ });
+
+ if (!recording) {
+ logger.warn({ sessionId: input.sessionId }, 'Recording not found');
+ return null;
+ }
+
+ logger.info(
+ { recordingId: recording.id, sessionId: input.sessionId },
+ 'Recording marked as failed'
+ );
+
+ return toApiRecording(recording);
+ }),
+
+ cleanupStale: protectedProcedure
+ .input(z.object({ maxAgeMinutes: z.number().default(30) }))
+ .output(z.object({ cleaned: z.number() }))
+ .mutation(async ({ input }) => {
+ logger.info({ maxAgeMinutes: input.maxAgeMinutes }, 'Cleaning up stale recordings');
+
+ const recordings = getAllRecordings();
+ const now = Date.now();
+ const maxAgeMs = input.maxAgeMinutes * 60 * 1000;
+ let cleaned = 0;
+
+ for (const recording of recordings) {
+ // Only clean up recordings that are stuck AND have no useful data
+ if ((recording.status === 'processing' || recording.status === 'recording') && !recording.callSummary) {
+ const createdAt = new Date(recording.createdAt).getTime();
+ const age = now - createdAt;
+
+ if (age > maxAgeMs) {
+ updateRecordingBySessionId(recording.sessionId, { status: 'failed' });
+ logger.info(
+ { recordingId: recording.id, sessionId: recording.sessionId, ageMinutes: Math.round(age / 60000) },
+ 'Marked stale recording as failed'
+ );
+ cleaned++;
+ }
+ }
+ }
+
+ logger.info({ cleaned }, 'Stale recordings cleanup complete');
+ return { cleaned };
+ }),
+});
diff --git a/src/main/server/trpc/procedures/settings.ts b/src/main/server/trpc/procedures/settings.ts
new file mode 100644
index 0000000..ed4a983
--- /dev/null
+++ b/src/main/server/trpc/procedures/settings.ts
@@ -0,0 +1,270 @@
+/**
+ * Settings Procedures
+ *
+ * tRPC procedures for managing copilot settings, cue cards, and playbooks.
+ */
+
+import { z } from 'zod';
+import { router, publicProcedure, protectedProcedure } from '../trpc';
+import {
+ getAllCueCards,
+ getCueCardsByType,
+ createCueCard,
+ updateCueCard,
+ deleteCueCard,
+ getAllPlaybooks,
+ getPlaybookById,
+ createPlaybook,
+ updatePlaybook,
+ deletePlaybook,
+ setDefaultPlaybook,
+ getAllSettings,
+ getSettingsByCategory,
+ getSetting,
+ upsertSetting,
+} from '../../../db';
+import { v4 as uuid } from 'uuid';
+
+// Input Schemas
+
+const cueCardSchema = z.object({
+ objectionType: z.enum(['pricing', 'timing', 'competitor', 'authority', 'security', 'integration', 'not_interested', 'send_info']),
+ title: z.string().min(1),
+ talkTracks: z.array(z.string()),
+ followUpQuestions: z.array(z.string()),
+ proofPoints: z.array(z.string()).optional(),
+ avoidSaying: z.array(z.string()).optional(),
+ sourceDoc: z.string().optional(),
+});
+
+const playbookItemSchema = z.object({
+ id: z.string(),
+ label: z.string(),
+ description: z.string(),
+ keywords: z.array(z.string()),
+ suggestedQuestions: z.array(z.string()),
+ detectionPrompt: z.string().optional(),
+});
+
+const playbookSchema = z.object({
+ name: z.string().min(1),
+ type: z.enum(['MEDDIC', 'Challenger', 'SPIN', 'Custom']),
+ description: z.string().optional(),
+ items: z.array(playbookItemSchema),
+});
+
+const settingSchema = z.object({
+ key: z.string(),
+ value: z.string(),
+ category: z.enum(['prompt', 'config', 'threshold']),
+ label: z.string(),
+ description: z.string().optional(),
+});
+
+// Router
+
+export const settingsRouter = router({
+ // -------------------------------------------------------------------------
+ // Cue Cards
+ // -------------------------------------------------------------------------
+
+ getCueCards: protectedProcedure.query(async () => {
+ const cards = getAllCueCards();
+ return cards.map(card => ({
+ ...card,
+ talkTracks: JSON.parse(card.talkTracks),
+ followUpQuestions: JSON.parse(card.followUpQuestions),
+ proofPoints: card.proofPoints ? JSON.parse(card.proofPoints) : [],
+ avoidSaying: card.avoidSaying ? JSON.parse(card.avoidSaying) : [],
+ }));
+ }),
+
+ getCueCardsByType: protectedProcedure
+ .input(z.object({ type: z.string() }))
+ .query(async ({ input }) => {
+ const cards = getCueCardsByType(input.type);
+ return cards.map(card => ({
+ ...card,
+ talkTracks: JSON.parse(card.talkTracks),
+ followUpQuestions: JSON.parse(card.followUpQuestions),
+ proofPoints: card.proofPoints ? JSON.parse(card.proofPoints) : [],
+ avoidSaying: card.avoidSaying ? JSON.parse(card.avoidSaying) : [],
+ }));
+ }),
+
+ createCueCard: protectedProcedure
+ .input(cueCardSchema)
+ .mutation(async ({ input }) => {
+ const card = createCueCard({
+ id: `cue-${uuid()}`,
+ objectionType: input.objectionType,
+ title: input.title,
+ talkTracks: JSON.stringify(input.talkTracks),
+ followUpQuestions: JSON.stringify(input.followUpQuestions),
+ proofPoints: input.proofPoints ? JSON.stringify(input.proofPoints) : null,
+ avoidSaying: input.avoidSaying ? JSON.stringify(input.avoidSaying) : null,
+ sourceDoc: input.sourceDoc || null,
+ isDefault: false,
+ });
+ return {
+ ...card,
+ talkTracks: input.talkTracks,
+ followUpQuestions: input.followUpQuestions,
+ proofPoints: input.proofPoints || [],
+ avoidSaying: input.avoidSaying || [],
+ };
+ }),
+
+ updateCueCard: protectedProcedure
+ .input(z.object({
+ id: z.string(),
+ data: cueCardSchema.partial(),
+ }))
+ .mutation(async ({ input }) => {
+ const updateData: Record<string, unknown> = {};
+ if (input.data.objectionType) updateData.objectionType = input.data.objectionType;
+ if (input.data.title) updateData.title = input.data.title;
+ if (input.data.talkTracks) updateData.talkTracks = JSON.stringify(input.data.talkTracks);
+ if (input.data.followUpQuestions) updateData.followUpQuestions = JSON.stringify(input.data.followUpQuestions);
+ if (input.data.proofPoints !== undefined) updateData.proofPoints = JSON.stringify(input.data.proofPoints);
+ if (input.data.avoidSaying !== undefined) updateData.avoidSaying = JSON.stringify(input.data.avoidSaying);
+ if (input.data.sourceDoc !== undefined) updateData.sourceDoc = input.data.sourceDoc;
+
+ const card = updateCueCard(input.id, updateData as any);
+ return card ? {
+ ...card,
+ talkTracks: JSON.parse(card.talkTracks),
+ followUpQuestions: JSON.parse(card.followUpQuestions),
+ proofPoints: card.proofPoints ? JSON.parse(card.proofPoints) : [],
+ avoidSaying: card.avoidSaying ? JSON.parse(card.avoidSaying) : [],
+ } : null;
+ }),
+
+ deleteCueCard: protectedProcedure
+ .input(z.object({ id: z.string() }))
+ .mutation(async ({ input }) => {
+ deleteCueCard(input.id);
+ return { success: true };
+ }),
+
+ // -------------------------------------------------------------------------
+ // Playbooks
+ // -------------------------------------------------------------------------
+
+ getPlaybooks: protectedProcedure.query(async () => {
+ const playbooks = getAllPlaybooks();
+ return playbooks.map(pb => ({
+ ...pb,
+ items: JSON.parse(pb.items),
+ }));
+ }),
+
+ getPlaybook: protectedProcedure
+ .input(z.object({ id: z.string() }))
+ .query(async ({ input }) => {
+ const playbook = getPlaybookById(input.id);
+ return playbook ? {
+ ...playbook,
+ items: JSON.parse(playbook.items),
+ } : null;
+ }),
+
+ createPlaybook: protectedProcedure
+ .input(playbookSchema)
+ .mutation(async ({ input }) => {
+ const playbook = createPlaybook({
+ id: `playbook-${uuid()}`,
+ name: input.name,
+ type: input.type,
+ description: input.description || null,
+ items: JSON.stringify(input.items.map(item => ({
+ ...item,
+ status: 'missing',
+ evidence: [],
+ }))),
+ isDefault: false,
+ });
+ return {
+ ...playbook,
+ items: input.items,
+ };
+ }),
+
+ updatePlaybook: protectedProcedure
+ .input(z.object({
+ id: z.string(),
+ data: playbookSchema.partial(),
+ }))
+ .mutation(async ({ input }) => {
+ const updateData: Record<string, unknown> = {};
+ if (input.data.name) updateData.name = input.data.name;
+ if (input.data.type) updateData.type = input.data.type;
+ if (input.data.description !== undefined) updateData.description = input.data.description;
+ if (input.data.items) {
+ updateData.items = JSON.stringify(input.data.items.map(item => ({
+ ...item,
+ status: 'missing',
+ evidence: [],
+ })));
+ }
+
+ const playbook = updatePlaybook(input.id, updateData as any);
+ return playbook ? {
+ ...playbook,
+ items: JSON.parse(playbook.items),
+ } : null;
+ }),
+
+ deletePlaybook: protectedProcedure
+ .input(z.object({ id: z.string() }))
+ .mutation(async ({ input }) => {
+ deletePlaybook(input.id);
+ return { success: true };
+ }),
+
+ setDefaultPlaybook: protectedProcedure
+ .input(z.object({ id: z.string() }))
+ .mutation(async ({ input }) => {
+ const playbook = setDefaultPlaybook(input.id);
+ return playbook ? {
+ ...playbook,
+ items: JSON.parse(playbook.items),
+ } : null;
+ }),
+
+ // -------------------------------------------------------------------------
+ // Settings (Prompts, Thresholds, Config)
+ // -------------------------------------------------------------------------
+
+ getSettings: protectedProcedure.query(async () => {
+ return getAllSettings();
+ }),
+
+ getSettingsByCategory: protectedProcedure
+ .input(z.object({ category: z.enum(['prompt', 'config', 'threshold']) }))
+ .query(async ({ input }) => {
+ return getSettingsByCategory(input.category);
+ }),
+
+ getSetting: protectedProcedure
+ .input(z.object({ key: z.string() }))
+ .query(async ({ input }) => {
+ return getSetting(input.key);
+ }),
+
+ updateSetting: protectedProcedure
+ .input(settingSchema)
+ .mutation(async ({ input }) => {
+ return upsertSetting(input);
+ }),
+
+ updateSettings: protectedProcedure
+ .input(z.array(settingSchema))
+ .mutation(async ({ input }) => {
+ const results = [];
+ for (const setting of input) {
+ results.push(upsertSetting(setting));
+ }
+ return results;
+ }),
+});
diff --git a/src/main/server/trpc/procedures/token.ts b/src/main/server/trpc/procedures/token.ts
new file mode 100644
index 0000000..925d236
--- /dev/null
+++ b/src/main/server/trpc/procedures/token.ts
@@ -0,0 +1,28 @@
+import { router, protectedProcedure } from '../trpc';
+import { GenerateTokenInputSchema, SessionTokenSchema } from '../../../../shared/schemas/auth.schema';
+import { createVideoDBService } from '../../../services/videodb.service';
+import { loadRuntimeConfig } from '../../../lib/config';
+import { createChildLogger } from '../../../lib/logger';
+
+const logger = createChildLogger('token-procedure');
+
+export const tokenRouter = router({
+ generate: protectedProcedure
+ .input(GenerateTokenInputSchema)
+ .output(SessionTokenSchema)
+ .mutation(async ({ ctx, input }) => {
+ const { user } = ctx;
+ const userId = input.userId || `user-${user.id}`;
+
+ logger.info({ userId }, 'Generating session token');
+
+ const runtimeConfig = loadRuntimeConfig();
+ const videodbService = createVideoDBService(user.apiKey, runtimeConfig.apiUrl);
+
+ const token = await videodbService.createSessionToken(userId);
+
+ logger.info({ userId, expiresAt: token.expiresAt }, 'Session token generated');
+
+ return token;
+ }),
+});
diff --git a/src/main/server/trpc/procedures/transcription.ts b/src/main/server/trpc/procedures/transcription.ts
new file mode 100644
index 0000000..d0724c5
--- /dev/null
+++ b/src/main/server/trpc/procedures/transcription.ts
@@ -0,0 +1,239 @@
+import { router, protectedProcedure } from '../trpc';
+import {
+ StartTranscriptionInputSchema,
+ StartTranscriptionOutputSchema,
+} from '../../../../shared/schemas/capture.schema';
+import { createChildLogger } from '../../../lib/logger';
+import { loadRuntimeConfig } from '../../../lib/config';
+import { connect } from 'videodb';
+import type { CaptureSessionFull, RTStream } from 'videodb';
+
+const logger = createChildLogger('transcription-procedure');
+
+// Polling configuration (like Python meeting-copilot)
+const MAX_RETRIES = 150;
+const RETRY_DELAY_MS = 2000;
+
+/**
+ * Sleep helper
+ */
+function sleep(ms: number): Promise<void> {
+ return new Promise((resolve) => setTimeout(resolve, ms));
+}
+
+/**
+ * Background task to start real-time transcription for a capture session.
+ * Polls for RTStreams to exist (they're created after capture_session.active),
+ * then calls startTranscript with the provided WebSocket connection IDs.
+ *
+ * This mirrors the Python meeting-copilot's start_realtime_transcription_with_ws function.
+ */
+async function startRealtimeTranscriptionWithWs(
+ captureSessionId: string,
+ apiKey: string,
+ micWsConnectionId?: string,
+ sysAudioWsConnectionId?: string,
+ apiUrl?: string
+): Promise<void> {
+ try {
+ logger.info(
+ { sessionId: captureSessionId, micWsConnectionId, sysAudioWsConnectionId },
+ '[Transcript] Starting transcription for session'
+ );
+
+ // Connect to VideoDB with API key (like Python version)
+ const connectOptions: { apiKey: string; baseUrl?: string } = { apiKey };
+ if (apiUrl) {
+ connectOptions.baseUrl = apiUrl;
+ }
+ const conn = connect(connectOptions);
+
+ let mics: RTStream[] = [];
+ let systemAudios: RTStream[] = [];
+ const needsMic = Boolean(micWsConnectionId);
+ const needsSystemAudio = Boolean(sysAudioWsConnectionId);
+
+ for (let attempt = 0; attempt < MAX_RETRIES; attempt++) {
+ try {
+ const session: CaptureSessionFull = await conn.getCaptureSession(captureSessionId);
+
+ if (!session) {
+ logger.warn(
+ { attempt: attempt + 1 },
+ '[Transcript] Session not found yet'
+ );
+ await sleep(RETRY_DELAY_MS);
+ continue;
+ }
+
+ logger.info(
+ { attempt: attempt + 1, status: session.status },
+ '[Transcript] Session status'
+ );
+
+ // Refresh to get RTStreams
+ await session.refresh();
+
+ mics = (session.rtstreams || []).filter((stream) => {
+ const name = (stream.name || '').toLowerCase();
+ const channelId = (stream.channelId || '').toLowerCase();
+ return name === 'mic' || channelId.startsWith('mic');
+ });
+ systemAudios = session.getRTStream('system_audio');
+
+ if (mics.length === 0) {
+ mics = session.getRTStream('mics');
+ }
+
+ if (systemAudios.length === 0) {
+ systemAudios = (session.rtstreams || []).filter((stream) => {
+ const name = (stream.name || '').toLowerCase();
+ const channelId = (stream.channelId || '').toLowerCase();
+ return (
+ name === 'system_audio' ||
+ name === 'system-audio' ||
+ channelId.startsWith('system_audio') ||
+ channelId.startsWith('system-audio')
+ );
+ });
+ }
+
+ const hasRequiredMic = !needsMic || mics.length > 0;
+ const hasRequiredSystemAudio = !needsSystemAudio || systemAudios.length > 0;
+
+ if (hasRequiredMic && hasRequiredSystemAudio) {
+ logger.info(
+ {
+ mics: mics.length,
+ systemAudios: systemAudios.length,
+ needsMic,
+ needsSystemAudio,
+ },
+ '[Transcript] Found required RTStreams'
+ );
+ break;
+ } else {
+ logger.info(
+ {
+ attempt: attempt + 1,
+ mics: mics.length,
+ systemAudios: systemAudios.length,
+ needsMic,
+ needsSystemAudio,
+ },
+ '[Transcript] Required RTStreams not ready yet, waiting...'
+ );
+ await sleep(RETRY_DELAY_MS);
+ }
+ } catch (error) {
+ logger.warn(
+ { attempt: attempt + 1, error },
+ '[Transcript] Attempt error'
+ );
+ await sleep(RETRY_DELAY_MS);
+ }
+ }
+
+ if ((needsMic && mics.length === 0) || (needsSystemAudio && systemAudios.length === 0)) {
+ logger.error(
+ {
+ maxRetries: MAX_RETRIES,
+ mics: mics.length,
+ systemAudios: systemAudios.length,
+ needsMic,
+ needsSystemAudio,
+ },
+ '[Transcript] Failed to find required RTStreams after max retries'
+ );
+ return;
+ }
+
+ // Start transcription on mic stream with WebSocket connection ID
+ if (mics.length > 0 && micWsConnectionId) {
+ const micStream = mics[0];
+ logger.info(
+ { rtstreamId: micStream.id, wsConnectionId: micWsConnectionId },
+ '[Transcript] Starting transcript on mic'
+ );
+ await micStream.startTranscript(micWsConnectionId);
+ logger.info('[Transcript] Mic transcription started');
+ } else if (mics.length > 0) {
+ logger.info('[Transcript] Mic stream found but no ws_connection_id provided, skipping');
+ }
+
+ // Start transcription on system audio stream with WebSocket connection ID
+ if (systemAudios.length > 0 && sysAudioWsConnectionId) {
+ const sysStream = systemAudios[0];
+ logger.info(
+ { rtstreamId: sysStream.id, wsConnectionId: sysAudioWsConnectionId },
+ '[Transcript] Starting transcript on sys_audio'
+ );
+ await sysStream.startTranscript(sysAudioWsConnectionId);
+ logger.info('[Transcript] System audio transcription started');
+ } else if (systemAudios.length > 0) {
+ logger.info('[Transcript] System audio stream found but no ws_connection_id provided, skipping');
+ }
+ } catch (error) {
+ logger.error(
+ { error, sessionId: captureSessionId },
+ '[Transcript] Failed to start transcription'
+ );
+ }
+}
+
+export const transcriptionRouter = router({
+ start: protectedProcedure
+ .input(StartTranscriptionInputSchema)
+ .output(StartTranscriptionOutputSchema)
+ .mutation(async ({ input, ctx }) => {
+ const { sessionId, micWsConnectionId, sysAudioWsConnectionId } = input;
+
+ logger.info(
+ { sessionId, micWsConnectionId, sysAudioWsConnectionId },
+ 'Starting transcription'
+ );
+
+ // Validate that at least one WebSocket connection ID is provided
+ if (!micWsConnectionId && !sysAudioWsConnectionId) {
+ logger.warn({ sessionId }, 'No WebSocket connection IDs provided');
+ return {
+ status: 'skipped',
+ sessionId,
+ message: 'No WebSocket connection IDs provided, skipping transcription setup',
+ };
+ }
+
+ // Get user's API key from context
+ const apiKey = ctx.user?.apiKey;
+ if (!apiKey) {
+ logger.error({ sessionId }, 'No API key available');
+ return {
+ status: 'error',
+ sessionId,
+ message: 'No API key available for transcription',
+ };
+ }
+
+ // Get apiUrl from runtime config if available
+ const runtimeConfig = loadRuntimeConfig();
+ const apiUrl = runtimeConfig.apiUrl;
+
+ // Start transcription in background (like Python's background_tasks.add_task)
+ // We don't await this - it runs in the background
+ startRealtimeTranscriptionWithWs(
+ sessionId,
+ apiKey,
+ micWsConnectionId,
+ sysAudioWsConnectionId,
+ apiUrl
+ ).catch((error) => {
+ logger.error({ error, sessionId }, 'Background transcription task failed');
+ });
+
+ return {
+ status: 'started',
+ sessionId,
+ message: 'Transcription startup initiated. Will poll for RTStreams and start when ready.',
+ };
+ }),
+});
diff --git a/src/main/server/trpc/router.ts b/src/main/server/trpc/router.ts
new file mode 100644
index 0000000..5972bd8
--- /dev/null
+++ b/src/main/server/trpc/router.ts
@@ -0,0 +1,24 @@
+import { router } from './trpc';
+import { authRouter } from './procedures/auth';
+import { configRouter, tunnelRouter } from './procedures/config';
+import { tokenRouter } from './procedures/token';
+import { captureRouter } from './procedures/capture';
+import { recordingsRouter } from './procedures/recordings';
+import { transcriptionRouter } from './procedures/transcription';
+import { settingsRouter } from './procedures/settings';
+
+export const appRouter = router({
+ auth: authRouter,
+ config: configRouter,
+ tunnel: tunnelRouter,
+ token: tokenRouter,
+ capture: captureRouter,
+ recordings: recordingsRouter,
+ transcription: transcriptionRouter,
+ settings: settingsRouter,
+});
+
+export type AppRouter = typeof appRouter;
+
+// Re-export for convenience
+export { router, publicProcedure, protectedProcedure } from './trpc';
diff --git a/src/main/server/trpc/trpc.ts b/src/main/server/trpc/trpc.ts
new file mode 100644
index 0000000..6beb0e1
--- /dev/null
+++ b/src/main/server/trpc/trpc.ts
@@ -0,0 +1,25 @@
+import { initTRPC, TRPCError } from '@trpc/server';
+import type { TrpcContext } from './context';
+
+const t = initTRPC.context<TrpcContext>().create();
+
+export const router = t.router;
+export const publicProcedure = t.procedure;
+
+// Middleware to require authentication
+const isAuthed = t.middleware(({ ctx, next }) => {
+ if (!ctx.user) {
+ throw new TRPCError({
+ code: 'UNAUTHORIZED',
+ message: 'You must be logged in to access this resource',
+ });
+ }
+ return next({
+ ctx: {
+ user: ctx.user,
+ accessToken: ctx.accessToken,
+ },
+ });
+});
+
+export const protectedProcedure = t.procedure.use(isAuthed);
diff --git a/src/main/services/copilot/context-manager.service.ts b/src/main/services/copilot/context-manager.service.ts
new file mode 100644
index 0000000..13cd15a
--- /dev/null
+++ b/src/main/services/copilot/context-manager.service.ts
@@ -0,0 +1,257 @@
+/**
+ * Context Manager Service
+ *
+ * Compresses older transcript segments into summaries to manage context
+ * window size for LLM processing. Maintains compressed 5-minute chunks
+ * for history while keeping recent segments in full detail.
+ */
+
+import { logger } from '../../lib/logger';
+import { getLLMService } from '../llm.service';
+import type { TranscriptSegmentData } from './transcript-buffer.service';
+
+const log = logger.child({ module: 'context-manager' });
+
+// Types
+
+export interface CompressedChunk {
+ id: number; // chunk number (0, 1, 2...)
+ startTime: number;
+ endTime: number;
+ summary: string;
+ keyTopics: string[];
+ importantMoments: Array<{
+ time: number;
+ type: 'objection' | 'commitment' | 'question' | 'pain_point' | 'decision';
+ text: string;
+ }>;
+}
+
+export interface ContextBuilderOptions {
+ maxTokens?: number;
+ includeHistory?: boolean;
+ includeRecent?: boolean;
+ recentWindowSize?: number;
+}
+
+// Context Manager Service
+
+export class ContextManagerService {
+ private compressedHistory: Map<string, CompressedChunk[]> = new Map(); // sessionId -> chunks
+ private readonly CHUNK_DURATION = 300; // 5 minutes in seconds
+ private readonly MAX_CONTEXT_TOKENS = 8000;
+ private readonly CHARS_PER_TOKEN = 4; // Rough estimate
+
+ constructor() {}
+
+ /**
+ * Compress segments into a summary chunk
+ */
+ async compressSegments(
+ sessionId: string,
+ segments: TranscriptSegmentData[]
+ ): Promise<CompressedChunk | null> {
+ if (segments.length === 0) return null;
+
+ const chunkId = Math.floor(segments[0].startTime / this.CHUNK_DURATION);
+
+ if (!this.compressedHistory.has(sessionId)) {
+ this.compressedHistory.set(sessionId, []);
+ }
+
+ const chunks = this.compressedHistory.get(sessionId)!;
+
+ // Check if chunk already exists
+ let chunk = chunks.find(c => c.id === chunkId);
+ if (chunk) {
+ // Chunk already compressed
+ return chunk;
+ }
+
+ // Create new chunk
+ chunk = {
+ id: chunkId,
+ startTime: chunkId * this.CHUNK_DURATION,
+ endTime: (chunkId + 1) * this.CHUNK_DURATION,
+ summary: '',
+ keyTopics: [],
+ importantMoments: [],
+ };
+
+ // Format transcript for compression
+ const transcript = segments
+ .map(s => `[${s.channel.toUpperCase()}] ${s.text}`)
+ .join('\n');
+
+ const prompt = `Summarize this 5-minute meeting segment in 3-4 bullet points.
+Extract key information to reference later.
+
+Transcript:
+${transcript}
+
+Respond with JSON:
+{
+ "summary": "3-4 bullet point summary (one string with line breaks)",
+ "topics": ["topic1", "topic2"],
+ "important_moments": [
+ {"time": 305, "type": "objection|commitment|question|pain_point|decision", "text": "brief description"}
+ ]
+}`;
+
+ try {
+ const llm = getLLMService();
+ const response = await llm.completeJSON<{
+ summary: string;
+ topics: string[];
+ important_moments: Array<{ time: number; type: string; text: string }>;
+ }>(prompt, 'You are a meeting analyst. Return valid JSON only.');
+
+ if (response.success && response.data) {
+ chunk.summary = response.data.summary || '';
+ chunk.keyTopics = response.data.topics || [];
+ chunk.importantMoments = (response.data.important_moments || []).map(m => ({
+ time: m.time,
+ type: m.type as CompressedChunk['importantMoments'][0]['type'],
+ text: m.text,
+ }));
+ }
+ } catch (error) {
+ log.error({ error }, 'Failed to compress chunk');
+ // Fallback to simple concatenation
+ chunk.summary = `Call segment ${chunkId + 1} (${segments.length} exchanges)`;
+ }
+
+ chunks.push(chunk);
+ chunks.sort((a, b) => a.id - b.id);
+
+ return chunk;
+ }
+
+ /**
+ * Build relevant context for agent processing
+ */
+ buildContext(
+ sessionId: string,
+ currentSegment: TranscriptSegmentData,
+ recentSegments: TranscriptSegmentData[],
+ options: ContextBuilderOptions = {}
+ ): string {
+ const {
+ maxTokens = this.MAX_CONTEXT_TOKENS,
+ includeHistory = true,
+ includeRecent = true,
+ recentWindowSize = 20,
+ } = options;
+
+ const chunks = this.compressedHistory.get(sessionId) || [];
+ const parts: string[] = [];
+
+ // Add compressed history
+ if (includeHistory && chunks.length > 0) {
+ const historySummary = chunks
+ .map(chunk => {
+ const topics = chunk.keyTopics.length > 0
+ ? `Topics: ${chunk.keyTopics.join(', ')}`
+ : '';
+ return `[${this.formatTime(chunk.startTime)}-${this.formatTime(chunk.endTime)}]\n${chunk.summary}${topics ? '\n' + topics : ''}`;
+ })
+ .join('\n\n');
+
+ parts.push('# Call History (compressed):\n' + historySummary);
+ }
+
+ // Add recent transcript
+ if (includeRecent && recentSegments.length > 0) {
+ const recentTranscript = recentSegments
+ .slice(-recentWindowSize)
+ .map(s => `[${s.channel.toUpperCase()} @ ${this.formatTime(s.startTime)}] ${s.text}`)
+ .join('\n');
+
+ parts.push('# Recent conversation:\n' + recentTranscript);
+ }
+
+ // Add current segment
+ parts.push(
+ `# Current statement:\n[${currentSegment.channel.toUpperCase()} @ ${this.formatTime(currentSegment.startTime)}] ${currentSegment.text}`
+ );
+
+ let context = parts.join('\n\n');
+
+ // Trim if too long
+ const estimatedTokens = context.length / this.CHARS_PER_TOKEN;
+ if (estimatedTokens > maxTokens) {
+ // Keep only recent transcript + current
+ const recentTranscript = recentSegments
+ .slice(-10)
+ .map(s => `[${s.channel.toUpperCase()} @ ${this.formatTime(s.startTime)}] ${s.text}`)
+ .join('\n');
+
+ context = `# Recent conversation:\n${recentTranscript}\n\n# Current:\n[${currentSegment.channel.toUpperCase()} @ ${this.formatTime(currentSegment.startTime)}] ${currentSegment.text}`;
+ }
+
+ return context;
+ }
+
+ /**
+ * Build context for specific analysis (e.g., objection detection)
+ */
+ buildAnalysisContext(
+ sessionId: string,
+ recentSegments: TranscriptSegmentData[],
+ windowSize: number = 5
+ ): string {
+ const recent = recentSegments.slice(-windowSize);
+ return recent
+ .map(s => `[${s.channel.toUpperCase()}] ${s.text}`)
+ .join('\n');
+ }
+
+ /**
+ * Get all compressed chunks for a session
+ */
+ getCompressedHistory(sessionId: string): CompressedChunk[] {
+ return this.compressedHistory.get(sessionId) || [];
+ }
+
+ /**
+ * Get important moments from all chunks
+ */
+ getImportantMoments(sessionId: string): CompressedChunk['importantMoments'] {
+ const chunks = this.compressedHistory.get(sessionId) || [];
+ return chunks.flatMap(c => c.importantMoments);
+ }
+
+ /**
+ * Format time in MM:SS
+ */
+ private formatTime(seconds: number): string {
+ const mins = Math.floor(seconds / 60);
+ const secs = Math.floor(seconds % 60);
+ return `${mins}:${secs.toString().padStart(2, '0')}`;
+ }
+
+ /**
+ * Clear context for a session
+ */
+ clear(sessionId: string): void {
+ this.compressedHistory.delete(sessionId);
+ log.info({ sessionId }, 'Cleared context history');
+ }
+}
+
+// Singleton Instance
+
+let instance: ContextManagerService | null = null;
+
+export function getContextManager(): ContextManagerService {
+ if (!instance) {
+ instance = new ContextManagerService();
+ }
+ return instance;
+}
+
+export function resetContextManager(): void {
+ instance = null;
+}
+
+export default ContextManagerService;
diff --git a/src/main/services/copilot/conversation-metrics.service.ts b/src/main/services/copilot/conversation-metrics.service.ts
new file mode 100644
index 0000000..98dba5d
--- /dev/null
+++ b/src/main/services/copilot/conversation-metrics.service.ts
@@ -0,0 +1,385 @@
+/**
+ * Conversation Metrics Calculator Service
+ *
+ * Real-time calculation of conversation intelligence metrics.
+ * Pure statistics - no LLM required.
+ *
+ * Metrics calculated:
+ * - Talk ratio (Me vs Them speaking time)
+ * - Pace (Words per minute for "me")
+ * - Questions asked by "me"
+ * - Monologue detection
+ * - Interruption count
+ * - Average response time
+ */
+
+import { logger } from '../../lib/logger';
+import type { TranscriptSegmentData } from './transcript-buffer.service';
+
+const log = logger.child({ module: 'conversation-metrics' });
+
+export interface ConversationMetrics {
+ talkRatio: {
+ me: number; // 0-1 percentage
+ them: number;
+ };
+ pace: number; // words per minute for "me"
+ questionsAsked: number; // count from "me"
+ monologueDetected: boolean; // "me" speaking > 45s continuously
+ longestMonologue: number; // seconds
+ totalDuration: number; // total speaking time in seconds
+ callDuration: number; // elapsed time since call start
+ wordCount: {
+ me: number;
+ them: number;
+ };
+ segmentCount: {
+ me: number;
+ them: number;
+ };
+ averageSegmentLength: {
+ me: number; // seconds
+ them: number;
+ };
+ interruptionCount: number;
+}
+
+export interface MetricsTrend {
+ current: ConversationMetrics;
+ previous?: ConversationMetrics;
+ talkRatioTrend: 'improving' | 'stable' | 'declining'; // improving = more balanced
+ paceTrend: 'faster' | 'stable' | 'slower';
+}
+
+export class ConversationMetricsService {
+ private readonly MONOLOGUE_THRESHOLD = 45; // seconds
+ private readonly IDEAL_TALK_RATIO_MIN = 0.35;
+ private readonly IDEAL_TALK_RATIO_MAX = 0.55;
+ private previousMetrics: Map<string, ConversationMetrics> = new Map();
+
+ constructor() {}
+
+ /**
+ * Calculate all metrics from segments
+ */
+ calculate(segments: TranscriptSegmentData[], elapsedTimeSeconds?: number): ConversationMetrics {
+ const meSegments = segments.filter(s => s.isFinal && s.channel === 'me');
+ const themSegments = segments.filter(s => s.isFinal && s.channel === 'them');
+
+ if (meSegments.length > 0) {
+ const totalWords = meSegments.reduce((sum, s) => sum + s.text.trim().split(/\s+/).filter(w => w.length > 0).length, 0);
+ const totalDuration = meSegments.reduce((sum, s) => sum + (s.endTime - s.startTime), 0);
+ }
+
+ const meDuration = this.calculateDuration(meSegments);
+ const themDuration = this.calculateDuration(themSegments);
+ const totalDuration = meDuration + themDuration;
+
+ const meWordCount = this.countWords(meSegments);
+ const themWordCount = this.countWords(themSegments);
+
+ // Calculate call duration from segments or use provided elapsed time
+ const callDurationFromSegments = segments.length > 0
+ ? Math.max(...segments.map(s => s.endTime))
+ : 0;
+ const callDuration = Math.max(callDurationFromSegments, elapsedTimeSeconds || 0);
+
+ return {
+ talkRatio: {
+ me: totalDuration > 0 ? meDuration / totalDuration : 0.5,
+ them: totalDuration > 0 ? themDuration / totalDuration : 0.5,
+ },
+ pace: this.calculatePace(meSegments, callDuration),
+ questionsAsked: this.countQuestions(meSegments),
+ monologueDetected: this.detectMonologue(meSegments),
+ longestMonologue: this.findLongestMonologue(meSegments),
+ totalDuration,
+ callDuration,
+ wordCount: {
+ me: meWordCount,
+ them: themWordCount,
+ },
+ segmentCount: {
+ me: meSegments.length,
+ them: themSegments.length,
+ },
+ averageSegmentLength: {
+ me: meSegments.length > 0 ? meDuration / meSegments.length : 0,
+ them: themSegments.length > 0 ? themDuration / themSegments.length : 0,
+ },
+ interruptionCount: this.countInterruptions(segments),
+ };
+ }
+
+ /**
+ * Calculate metrics with trend comparison
+ */
+ calculateWithTrend(sessionId: string, segments: TranscriptSegmentData[], elapsedTimeSeconds?: number): MetricsTrend {
+ const current = this.calculate(segments, elapsedTimeSeconds);
+ const previous = this.previousMetrics.get(sessionId);
+
+ // Store current for next comparison
+ this.previousMetrics.set(sessionId, current);
+
+ if (!previous) {
+ return {
+ current,
+ talkRatioTrend: 'stable',
+ paceTrend: 'stable',
+ };
+ }
+
+ // Calculate talk ratio trend (closer to 50/50 is "improving")
+ const currentBalance = Math.abs(current.talkRatio.me - 0.5);
+ const previousBalance = Math.abs(previous.talkRatio.me - 0.5);
+ let talkRatioTrend: 'improving' | 'stable' | 'declining' = 'stable';
+
+ if (currentBalance < previousBalance - 0.05) {
+ talkRatioTrend = 'improving';
+ } else if (currentBalance > previousBalance + 0.05) {
+ talkRatioTrend = 'declining';
+ }
+
+ // Calculate pace trend
+ let paceTrend: 'faster' | 'stable' | 'slower' = 'stable';
+ if (current.pace > previous.pace + 10) {
+ paceTrend = 'faster';
+ } else if (current.pace < previous.pace - 10) {
+ paceTrend = 'slower';
+ }
+
+ return {
+ current,
+ previous,
+ talkRatioTrend,
+ paceTrend,
+ };
+ }
+
+ /**
+ * Calculate total speaking duration
+ */
+ private calculateDuration(segments: TranscriptSegmentData[]): number {
+ return segments.reduce((sum, s) => sum + (s.endTime - s.startTime), 0);
+ }
+
+ /**
+ * Calculate words per minute
+ * Falls back to call duration if segment durations are not available
+ */
+ private calculatePace(segments: TranscriptSegmentData[], callDurationSeconds?: number): number {
+ if (segments.length === 0) return 0;
+
+ const totalWords = this.countWords(segments);
+
+ // First try to use actual speaking duration from segments
+ const speakingDuration = this.calculateDuration(segments);
+
+ // If we have valid speaking duration, use it
+ if (speakingDuration > 0) {
+ const speakingMinutes = speakingDuration / 60;
+ return speakingMinutes > 0 ? Math.round(totalWords / speakingMinutes) : 0;
+ }
+
+ // Fallback: estimate based on call duration (assume ~40% speaking time)
+ if (callDurationSeconds && callDurationSeconds > 0 && totalWords > 0) {
+ // Estimate speaking time as 40% of call duration for "me" channel
+ const estimatedSpeakingMinutes = (callDurationSeconds * 0.4) / 60;
+ if (estimatedSpeakingMinutes > 0) {
+ return Math.round(totalWords / estimatedSpeakingMinutes);
+ }
+ }
+
+ // Last fallback: if we have words but no duration info, estimate based on average WPM
+ // Average speaking rate is ~130 WPM, so we can reverse-estimate
+ if (totalWords > 0 && segments.length > 0) {
+ // Assume each segment represents ~3 seconds of speech on average
+ const estimatedMinutes = (segments.length * 3) / 60;
+ return estimatedMinutes > 0 ? Math.round(totalWords / estimatedMinutes) : 130; // Default to average
+ }
+
+ return 0;
+ }
+
+ /**
+ * Count total words
+ */
+ private countWords(segments: TranscriptSegmentData[]): number {
+ return segments.reduce((sum, s) => {
+ const words = s.text.trim().split(/\s+/).filter(w => w.length > 0);
+ return sum + words.length;
+ }, 0);
+ }
+
+ /**
+ * Count questions asked
+ */
+ private countQuestions(segments: TranscriptSegmentData[]): number {
+ return segments.filter(s => /\?/.test(s.text)).length;
+ }
+
+ /**
+ * Detect if currently in a monologue
+ */
+ private detectMonologue(segments: TranscriptSegmentData[]): boolean {
+ if (segments.length < 3) return false;
+
+ // Check last 5 segments
+ const recent = segments.slice(-5);
+ if (recent.length < 3) return false;
+
+ const firstStart = recent[0].startTime;
+ const lastEnd = recent[recent.length - 1].endTime;
+ const duration = lastEnd - firstStart;
+
+ return duration > this.MONOLOGUE_THRESHOLD;
+ }
+
+ /**
+ * Find the longest continuous speaking stretch
+ */
+ private findLongestMonologue(segments: TranscriptSegmentData[]): number {
+ if (segments.length === 0) return 0;
+
+ let maxDuration = 0;
+ let currentStreak: TranscriptSegmentData[] = [];
+
+ for (let i = 0; i < segments.length; i++) {
+ const segment = segments[i];
+
+ if (currentStreak.length === 0) {
+ currentStreak.push(segment);
+ } else {
+ const lastSegment = currentStreak[currentStreak.length - 1];
+ // Consider continuous if gap is less than 2 seconds
+ if (segment.startTime - lastSegment.endTime < 2) {
+ currentStreak.push(segment);
+ } else {
+ // End current streak, check duration
+ const streakDuration =
+ currentStreak[currentStreak.length - 1].endTime - currentStreak[0].startTime;
+ maxDuration = Math.max(maxDuration, streakDuration);
+ currentStreak = [segment];
+ }
+ }
+ }
+
+ // Check final streak
+ if (currentStreak.length > 0) {
+ const streakDuration =
+ currentStreak[currentStreak.length - 1].endTime - currentStreak[0].startTime;
+ maxDuration = Math.max(maxDuration, streakDuration);
+ }
+
+ return maxDuration;
+ }
+
+ /**
+ * Count potential interruptions
+ * (When one speaker starts before another finishes with overlap)
+ */
+ private countInterruptions(segments: TranscriptSegmentData[]): number {
+ if (segments.length < 2) return 0;
+
+ let interruptions = 0;
+ const sortedSegments = [...segments].sort((a, b) => a.startTime - b.startTime);
+
+ for (let i = 1; i < sortedSegments.length; i++) {
+ const current = sortedSegments[i];
+ const previous = sortedSegments[i - 1];
+
+ // Different speakers and overlap
+ if (
+ current.channel !== previous.channel &&
+ current.startTime < previous.endTime
+ ) {
+ interruptions++;
+ }
+ }
+
+ return interruptions;
+ }
+
+ /**
+ * Get a health score for the conversation (0-100)
+ */
+ getConversationHealthScore(metrics: ConversationMetrics): number {
+ let score = 100;
+
+ // Talk ratio penalty (ideal is 40-60%)
+ const talkRatioDeviation = Math.abs(metrics.talkRatio.me - 0.5);
+ score -= talkRatioDeviation * 100; // Max -50 for all one-sided
+
+ // Monologue penalty
+ if (metrics.monologueDetected) {
+ score -= 15;
+ }
+
+ // Pace penalty (too fast > 180, too slow < 100)
+ if (metrics.pace > 180) {
+ score -= Math.min(20, (metrics.pace - 180) / 5);
+ } else if (metrics.pace < 100 && metrics.pace > 0) {
+ score -= Math.min(10, (100 - metrics.pace) / 5);
+ }
+
+ // Questions bonus (asking questions is good)
+ if (metrics.questionsAsked > 0) {
+ score += Math.min(10, metrics.questionsAsked * 2);
+ }
+
+ return Math.max(0, Math.min(100, Math.round(score)));
+ }
+
+ /**
+ * Get recommendations based on metrics
+ */
+ getRecommendations(metrics: ConversationMetrics): string[] {
+ const recommendations: string[] = [];
+
+ if (metrics.talkRatio.me > 0.65) {
+ recommendations.push('Consider letting the customer speak more');
+ }
+
+ if (metrics.talkRatio.me < 0.35) {
+ recommendations.push('You may need to provide more information');
+ }
+
+ if (metrics.monologueDetected) {
+ recommendations.push('Try breaking up long explanations with questions');
+ }
+
+ if (metrics.questionsAsked < 2 && metrics.callDuration > 120) {
+ recommendations.push('Consider asking more discovery questions');
+ }
+
+ if (metrics.pace > 180) {
+ recommendations.push('Try slowing down your speaking pace');
+ }
+
+ return recommendations;
+ }
+
+ /**
+ * Clear stored data for a session
+ */
+ clear(sessionId: string): void {
+ this.previousMetrics.delete(sessionId);
+ }
+}
+
+// Singleton Instance
+
+let instance: ConversationMetricsService | null = null;
+
+export function getMetricsService(): ConversationMetricsService {
+ if (!instance) {
+ instance = new ConversationMetricsService();
+ }
+ return instance;
+}
+
+export function resetMetricsService(): void {
+ instance = null;
+}
+
+export default ConversationMetricsService;
diff --git a/src/main/services/copilot/cue-card-engine.service.ts b/src/main/services/copilot/cue-card-engine.service.ts
new file mode 100644
index 0000000..1fa21b7
--- /dev/null
+++ b/src/main/services/copilot/cue-card-engine.service.ts
@@ -0,0 +1,503 @@
+/**
+ * Cue Card Engine Service
+ *
+ * Detects objections in participant statements using keyword patterns and LLM
+ * classification. Retrieves relevant cue card content with talk tracks
+ * and follow-up questions.
+ */
+
+import { v4 as uuid } from 'uuid';
+import { logger } from '../../lib/logger';
+import { getLLMService } from '../llm.service';
+import {
+ getCueCardsByType,
+ createCueCardTrigger,
+ updateCueCardTrigger,
+} from '../../db';
+import type { TranscriptSegmentData } from './transcript-buffer.service';
+
+const log = logger.child({ module: 'cue-card-engine' });
+
+// Types
+
+export type ObjectionType =
+ | 'pricing'
+ | 'timing'
+ | 'competitor'
+ | 'authority'
+ | 'security'
+ | 'integration'
+ | 'not_interested'
+ | 'send_info';
+
+export interface CueCardContent {
+ id: string;
+ objectionType: ObjectionType;
+ title: string;
+ talkTracks: string[];
+ followUpQuestions: string[];
+ proofPoints?: string[];
+ avoidSaying?: string[];
+ sourceDoc?: string;
+ confidence: number;
+}
+
+export interface CueCardTriggerData extends CueCardContent {
+ triggerId: string;
+ triggerText: string;
+ segmentId: string;
+ timestamp: number;
+ status: 'active' | 'pinned' | 'dismissed';
+}
+
+export interface ObjectionDetectionResult {
+ detected: boolean;
+ objectionType?: ObjectionType;
+ confidence: number;
+ triggerText?: string;
+}
+
+// Detection Patterns
+
+const DETECTION_PATTERNS: Record<ObjectionType, RegExp[]> = {
+ pricing: [
+ /\b(too expensive|budget|cost|price|cheaper|affordable|expensive)\b/i,
+ /\b(out of our budget|can't afford|cost.*concern|pricing.*issue)\b/i,
+ /\b(how much|what.*price|what.*cost)\b/i,
+ ],
+ timing: [
+ /\b(not ready|later|next quarter|timing|busy|bandwidth)\b/i,
+ /\b(not the right time|maybe.*later|revisit.*later)\b/i,
+ /\b(too busy|lot going on|other priorities)\b/i,
+ ],
+ competitor: [
+ /\b(already using|current solution|competitor|alternative)\b/i,
+ /\b(salesforce|hubspot|zendesk|other.*tool|similar.*product)\b/i,
+ /\b(comparing|evaluate|looking at.*options)\b/i,
+ ],
+ authority: [
+ /\b(need to ask|check with|decision maker|not my decision)\b/i,
+ /\b(run.*by|get approval|boss|manager|team)\b/i,
+ /\b(can't decide|not authorized|need.*sign off)\b/i,
+ ],
+ security: [
+ /\b(security|compliance|GDPR|SOC2|data privacy|secure)\b/i,
+ /\b(where.*data.*stored|encryption|audit)\b/i,
+ /\b(privacy.*concern|data.*protection)\b/i,
+ ],
+ integration: [
+ /\b(integrate|integration|API|compatible|works with)\b/i,
+ /\b(connect.*with|sync.*with|work.*with.*existing)\b/i,
+ /\b(technical.*requirements|implementation)\b/i,
+ ],
+ not_interested: [
+ /\b(not interested|don't need|not for us|pass)\b/i,
+ /\b(happy with|satisfied|don't see.*need)\b/i,
+ /\b(not.*priority|not looking)\b/i,
+ ],
+ send_info: [
+ /\b(send.*info|send.*details|email.*information)\b/i,
+ /\b(follow up|get back|more.*information)\b/i,
+ /\b(think about|consider)\b/i,
+ ],
+};
+
+// Cue Card Engine Service
+
+export class CueCardEngineService {
+ private recentTriggers: Map<string, number> = new Map(); // objectionType -> timestamp
+ private readonly TRIGGER_COOLDOWN = 60000; // 1 minute between same type
+
+ constructor() {}
+
+ /**
+ * Detect objection in a segment (fast, pattern-based)
+ */
+ detectObjectionFast(segment: TranscriptSegmentData): ObjectionDetectionResult {
+ // Only check other participant ("them") statements
+ if (segment.channel !== 'them') {
+ return { detected: false, confidence: 0 };
+ }
+
+ const text = segment.text.toLowerCase();
+
+ for (const [type, patterns] of Object.entries(DETECTION_PATTERNS)) {
+ for (const pattern of patterns) {
+ if (pattern.test(text)) {
+ // Check cooldown
+ const lastTrigger = this.recentTriggers.get(type);
+ if (lastTrigger && Date.now() - lastTrigger < this.TRIGGER_COOLDOWN) {
+ continue;
+ }
+
+ return {
+ detected: true,
+ objectionType: type as ObjectionType,
+ confidence: 0.7,
+ triggerText: segment.text,
+ };
+ }
+ }
+ }
+
+ return { detected: false, confidence: 0 };
+ }
+
+ /**
+ * Detect objection using LLM for ambiguous cases
+ */
+ async detectObjectionWithLLM(
+ segment: TranscriptSegmentData,
+ context: string
+ ): Promise<ObjectionDetectionResult> {
+ if (segment.channel !== 'them') {
+ return { detected: false, confidence: 0 };
+ }
+
+ const llm = getLLMService();
+
+ const prompt = `Analyze this participant statement in a meeting for objections.
+
+Context (recent conversation):
+${context}
+
+Current statement: "${segment.text}"
+
+Objection categories:
+- pricing: concerns about cost, budget, affordability
+- timing: not ready now, wants to wait
+- competitor: mentions other solutions, already using something
+- authority: not the decision maker, needs approval
+- security: data privacy, compliance concerns
+- integration: technical compatibility questions
+- not_interested: explicitly not interested
+- send_info: wants information sent instead of continuing
+
+Respond with JSON:
+{
+ "detected": true/false,
+ "objection_type": "pricing" | "timing" | "competitor" | "authority" | "security" | "integration" | "not_interested" | "send_info" | null,
+ "confidence": 0.0-1.0,
+ "reasoning": "brief explanation"
+}`;
+
+ try {
+ const response = await llm.completeJSON<{
+ detected: boolean;
+ objection_type: ObjectionType | null;
+ confidence: number;
+ reasoning: string;
+ }>(prompt, 'You are an objection detection expert. Return valid JSON only.');
+
+ if (response.success && response.data) {
+ if (response.data.detected && response.data.objection_type && response.data.confidence > 0.6) {
+ return {
+ detected: true,
+ objectionType: response.data.objection_type,
+ confidence: response.data.confidence,
+ triggerText: segment.text,
+ };
+ }
+ }
+ } catch (error) {
+ log.warn({ error }, 'LLM objection detection failed');
+ }
+
+ return { detected: false, confidence: 0 };
+ }
+
+ /**
+ * Retrieve cue card for an objection type
+ */
+ async getCueCard(
+ objectionType: ObjectionType,
+ triggerText: string,
+ context: string
+ ): Promise<CueCardContent | null> {
+ // Get cue cards from database
+ const cards = getCueCardsByType(objectionType);
+
+ if (cards.length === 0) {
+ // Generate a cue card using LLM
+ return this.generateCueCard(objectionType, triggerText, context);
+ }
+
+ // If multiple cards, use LLM to pick the best one
+ if (cards.length > 1) {
+ return this.selectBestCueCard(cards, triggerText, context);
+ }
+
+ // Single card - parse and return
+ const card = cards[0];
+ return {
+ id: card.id,
+ objectionType: card.objectionType as ObjectionType,
+ title: card.title,
+ talkTracks: JSON.parse(card.talkTracks),
+ followUpQuestions: JSON.parse(card.followUpQuestions),
+ proofPoints: card.proofPoints ? JSON.parse(card.proofPoints) : undefined,
+ avoidSaying: card.avoidSaying ? JSON.parse(card.avoidSaying) : undefined,
+ sourceDoc: card.sourceDoc || undefined,
+ confidence: 0.9,
+ };
+ }
+
+ /**
+ * Process a segment and potentially return a cue card trigger
+ */
+ async processSegment(
+ segment: TranscriptSegmentData,
+ context: string,
+ recordingId: number,
+ useLLM: boolean = false
+ ): Promise<CueCardTriggerData | null> {
+ // Fast detection first
+ let detection = this.detectObjectionFast(segment);
+
+ // If not detected and LLM is enabled, try LLM
+ if (!detection.detected && useLLM) {
+ detection = await this.detectObjectionWithLLM(segment, context);
+ }
+
+ if (!detection.detected || !detection.objectionType) {
+ return null;
+ }
+
+ // Update cooldown
+ this.recentTriggers.set(detection.objectionType, Date.now());
+
+ // Get cue card
+ const cueCard = await this.getCueCard(
+ detection.objectionType,
+ detection.triggerText || segment.text,
+ context
+ );
+
+ if (!cueCard) {
+ return null;
+ }
+
+ // Create trigger record
+ const triggerId = uuid();
+ try {
+ createCueCardTrigger({
+ id: triggerId,
+ recordingId,
+ segmentId: segment.id,
+ cueCardId: cueCard.id,
+ objectionType: detection.objectionType,
+ triggerText: segment.text,
+ confidence: cueCard.confidence,
+ status: 'active',
+ timestamp: segment.startTime,
+ });
+ } catch (error) {
+ log.error({ error }, 'Failed to save cue card trigger');
+ }
+
+ return {
+ ...cueCard,
+ triggerId,
+ triggerText: segment.text,
+ segmentId: segment.id,
+ timestamp: segment.startTime,
+ status: 'active',
+ };
+ }
+
+ /**
+ * Generate a cue card using LLM
+ */
+ private async generateCueCard(
+ objectionType: ObjectionType,
+ triggerText: string,
+ context: string
+ ): Promise<CueCardContent> {
+ const llm = getLLMService();
+
+ const prompt = `Generate a cue card to help handle this objection.
+
+Objection type: ${objectionType}
+Participant said: "${triggerText}"
+
+Context:
+${context}
+
+Respond with JSON:
+{
+ "title": "Brief title for this objection",
+ "talk_tracks": ["3-5 response suggestions"],
+ "follow_up_questions": ["2-4 clarifying questions to ask"],
+ "proof_points": ["1-2 supporting facts if relevant"],
+ "avoid_saying": ["1-2 things NOT to say"]
+}`;
+
+ try {
+ const response = await llm.completeJSON<{
+ title: string;
+ talk_tracks: string[];
+ follow_up_questions: string[];
+ proof_points?: string[];
+ avoid_saying?: string[];
+ }>(prompt, 'You are a meeting enablement expert. Return valid JSON only.');
+
+ if (response.success && response.data) {
+ return {
+ id: `generated-${uuid()}`,
+ objectionType,
+ title: response.data.title || `Handling ${objectionType} objection`,
+ talkTracks: response.data.talk_tracks || [],
+ followUpQuestions: response.data.follow_up_questions || [],
+ proofPoints: response.data.proof_points,
+ avoidSaying: response.data.avoid_saying,
+ confidence: 0.6,
+ };
+ }
+ } catch (error) {
+ log.warn({ error }, 'Failed to generate cue card');
+ }
+
+ // Fallback
+ return {
+ id: `fallback-${uuid()}`,
+ objectionType,
+ title: `Handling ${objectionType} objection`,
+ talkTracks: ['Address the concern directly', 'Ask for more details about their situation'],
+ followUpQuestions: ['Can you tell me more about that?', 'What would help address this concern?'],
+ confidence: 0.3,
+ };
+ }
+
+ /**
+ * Select the best cue card from multiple options
+ */
+ private async selectBestCueCard(
+ cards: Array<{
+ id: string;
+ objectionType: string;
+ title: string;
+ talkTracks: string;
+ followUpQuestions: string;
+ proofPoints: string | null;
+ avoidSaying: string | null;
+ sourceDoc: string | null;
+ }>,
+ triggerText: string,
+ context: string
+ ): Promise<CueCardContent> {
+ const llm = getLLMService();
+
+ const cardsContext = cards.map((card, idx) => {
+ const tracks = JSON.parse(card.talkTracks);
+ return `Card ${idx + 1} (${card.id}):\nTitle: ${card.title}\nTalk tracks: ${tracks.slice(0, 2).join('; ')}`;
+ }).join('\n\n');
+
+ const prompt = `Select the most relevant cue card for this objection.
+
+Objection: "${triggerText}"
+
+Context:
+${context}
+
+Available cue cards:
+${cardsContext}
+
+Respond with JSON:
+{
+ "selected_index": 0-${cards.length - 1},
+ "confidence": 0.0-1.0,
+ "reasoning": "why this card is best"
+}`;
+
+ try {
+ const response = await llm.completeJSON<{
+ selected_index: number;
+ confidence: number;
+ reasoning: string;
+ }>(prompt, 'You are a meeting enablement expert. Return valid JSON only.');
+
+ if (response.success && response.data) {
+ const selectedIndex = Math.max(0, Math.min(response.data.selected_index, cards.length - 1));
+ const selected = cards[selectedIndex];
+
+ return {
+ id: selected.id,
+ objectionType: selected.objectionType as ObjectionType,
+ title: selected.title,
+ talkTracks: JSON.parse(selected.talkTracks),
+ followUpQuestions: JSON.parse(selected.followUpQuestions),
+ proofPoints: selected.proofPoints ? JSON.parse(selected.proofPoints) : undefined,
+ avoidSaying: selected.avoidSaying ? JSON.parse(selected.avoidSaying) : undefined,
+ sourceDoc: selected.sourceDoc || undefined,
+ confidence: response.data.confidence,
+ };
+ }
+ } catch (error) {
+ log.warn({ error }, 'Failed to select best cue card');
+ }
+
+ // Fallback to first card
+ const card = cards[0];
+ return {
+ id: card.id,
+ objectionType: card.objectionType as ObjectionType,
+ title: card.title,
+ talkTracks: JSON.parse(card.talkTracks),
+ followUpQuestions: JSON.parse(card.followUpQuestions),
+ proofPoints: card.proofPoints ? JSON.parse(card.proofPoints) : undefined,
+ avoidSaying: card.avoidSaying ? JSON.parse(card.avoidSaying) : undefined,
+ sourceDoc: card.sourceDoc || undefined,
+ confidence: 0.7,
+ };
+ }
+
+ /**
+ * Update cue card trigger status
+ */
+ updateTriggerStatus(triggerId: string, status: 'active' | 'pinned' | 'dismissed'): void {
+ try {
+ updateCueCardTrigger(triggerId, { status });
+ } catch (error) {
+ log.error({ error, triggerId, status }, 'Failed to update trigger status');
+ }
+ }
+
+ /**
+ * Submit feedback for a cue card trigger
+ */
+ submitFeedback(triggerId: string, feedback: 'helpful' | 'wrong' | 'irrelevant'): void {
+ try {
+ updateCueCardTrigger(triggerId, { feedback });
+ log.info({ triggerId, feedback }, 'Cue card feedback submitted');
+ } catch (error) {
+ log.error({ error, triggerId, feedback }, 'Failed to submit feedback');
+ }
+ }
+
+ /**
+ * Reset cooldowns
+ */
+ reset(): void {
+ this.recentTriggers.clear();
+ }
+}
+
+// Singleton Instance
+
+let instance: CueCardEngineService | null = null;
+
+export function getCueCardEngine(): CueCardEngineService {
+ if (!instance) {
+ instance = new CueCardEngineService();
+ }
+ return instance;
+}
+
+export function resetCueCardEngine(): void {
+ if (instance) {
+ instance.reset();
+ }
+ instance = null;
+}
+
+export default CueCardEngineService;
diff --git a/src/main/services/copilot/index.ts b/src/main/services/copilot/index.ts
new file mode 100644
index 0000000..54b589e
--- /dev/null
+++ b/src/main/services/copilot/index.ts
@@ -0,0 +1,101 @@
+/**
+ * Meeting Co-Pilot Services
+ *
+ * Export all copilot services for use in IPC handlers.
+ */
+
+// Main orchestrator
+export {
+ MeetingCopilotService,
+ getMeetingCopilot,
+ resetMeetingCopilot,
+ SalesCopilotService,
+ getSalesCopilot,
+ resetSalesCopilot,
+ type CopilotConfig,
+ type CopilotEvents,
+ type CallState,
+} from './sales-copilot.service';
+
+// Transcript management
+export {
+ TranscriptBufferService,
+ getTranscriptBuffer,
+ resetTranscriptBuffer,
+ type RawTranscriptData,
+ type TranscriptSegmentData,
+} from './transcript-buffer.service';
+
+// Context compression
+export {
+ ContextManagerService,
+ getContextManager,
+ resetContextManager,
+ type CompressedChunk,
+} from './context-manager.service';
+
+// Conversation metrics
+export {
+ ConversationMetricsService,
+ getMetricsService,
+ resetMetricsService,
+ type ConversationMetrics,
+ type MetricsTrend,
+} from './conversation-metrics.service';
+
+// Sentiment analysis
+export {
+ SentimentAnalyzerService,
+ getSentimentAnalyzer,
+ resetSentimentAnalyzer,
+ type Sentiment,
+ type SentimentResult,
+ type SentimentTrend,
+} from './sentiment-analyzer.service';
+
+// Nudge engine
+export {
+ NudgeEngineService,
+ getNudgeEngine,
+ resetNudgeEngine,
+ type Nudge,
+ type NudgeType,
+ type NudgeSeverity,
+ type NudgeConfig,
+} from './nudge-engine.service';
+
+// Cue card engine
+export {
+ CueCardEngineService,
+ getCueCardEngine,
+ resetCueCardEngine,
+ type ObjectionType,
+ type CueCardContent,
+ type CueCardTriggerData,
+ type ObjectionDetectionResult,
+} from './cue-card-engine.service';
+
+// Playbook tracker
+export {
+ PlaybookTrackerService,
+ getPlaybookTracker,
+ resetPlaybookTracker,
+ type Playbook,
+ type PlaybookItem,
+ type PlaybookItemStatus,
+ type PlaybookItemEvidence,
+ type PlaybookSnapshot,
+} from './playbook-tracker.service';
+
+// Summary generator
+export {
+ SummaryGeneratorService,
+ getSummaryGenerator,
+ resetSummaryGenerator,
+ type CallSummary,
+ type ActionItem,
+ type Objection,
+ type Commitment,
+ type Evidence,
+ type FullCallReport,
+} from './summary-generator.service';
diff --git a/src/main/services/copilot/nudge-engine.service.ts b/src/main/services/copilot/nudge-engine.service.ts
new file mode 100644
index 0000000..9e2a7d3
--- /dev/null
+++ b/src/main/services/copilot/nudge-engine.service.ts
@@ -0,0 +1,384 @@
+/**
+ * Live Nudge Engine Service
+ *
+ * Generates gentle, rate-limited coaching nudges based on conversation
+ * metrics and sentiment. Maximum 1 nudge per 2 minutes to avoid distraction.
+ */
+
+import { v4 as uuid } from 'uuid';
+import { logger } from '../../lib/logger';
+import type { ConversationMetrics } from './conversation-metrics.service';
+import type { SentimentTrend } from './sentiment-analyzer.service';
+
+const log = logger.child({ module: 'nudge-engine' });
+
+// Types
+
+export type NudgeType =
+ | 'monologue'
+ | 'sentiment'
+ | 'talk_ratio'
+ | 'next_steps'
+ | 'pricing'
+ | 'playbook'
+ | 'questions'
+ | 'pace';
+
+export type NudgeSeverity = 'low' | 'medium' | 'high';
+
+export interface Nudge {
+ id: string;
+ type: NudgeType;
+ message: string;
+ severity: NudgeSeverity;
+ dismissible: boolean;
+ timestamp: number; // epoch ms
+ actionLabel?: string;
+ actionType?: 'ask_question' | 'pause' | 'clarify' | 'confirm';
+}
+
+export interface NudgeConfig {
+ enabled: boolean;
+ cooldownMs: number; // Minimum time between nudges
+ suppressedTypes: NudgeType[];
+}
+
+// Nudge Templates
+
+const NUDGE_TEMPLATES: Record<NudgeType, Array<{
+ message: string;
+ severity: NudgeSeverity;
+ actionLabel?: string;
+ actionType?: Nudge['actionType'];
+}>> = {
+ monologue: [
+ {
+ message: "You've been speaking for a while — try asking a question",
+ severity: 'medium',
+ actionLabel: 'Suggest question',
+ actionType: 'ask_question',
+ },
+ {
+ message: 'Consider pausing to let the customer respond',
+ severity: 'low',
+ actionType: 'pause',
+ },
+ ],
+ sentiment: [
+ {
+ message: 'Customer sentiment seems to be dipping — consider clarifying',
+ severity: 'high',
+ actionLabel: 'Address concern',
+ actionType: 'clarify',
+ },
+ {
+ message: 'The customer may have concerns — check in with them',
+ severity: 'medium',
+ actionType: 'clarify',
+ },
+ ],
+ talk_ratio: [
+ {
+ message: 'Talk ratio is high — let the customer speak more',
+ severity: 'low',
+ },
+ {
+ message: 'You\'re doing most of the talking — try asking open-ended questions',
+ severity: 'medium',
+ actionType: 'ask_question',
+ },
+ ],
+ next_steps: [
+ {
+ message: 'Consider confirming next steps before ending the call',
+ severity: 'medium',
+ actionLabel: 'Confirm next steps',
+ actionType: 'confirm',
+ },
+ {
+ message: 'Good time to discuss action items and timeline',
+ severity: 'low',
+ actionType: 'confirm',
+ },
+ ],
+ pricing: [
+ {
+ message: 'Pricing came up — make sure to address value before discussing cost',
+ severity: 'medium',
+ },
+ ],
+ playbook: [
+ {
+ message: 'Some playbook items haven\'t been covered yet',
+ severity: 'low',
+ },
+ ],
+ questions: [
+ {
+ message: 'You haven\'t asked many questions — discovery is key',
+ severity: 'low',
+ actionType: 'ask_question',
+ },
+ ],
+ pace: [
+ {
+ message: 'You\'re speaking quite fast — try slowing down',
+ severity: 'low',
+ },
+ ],
+};
+
+// Nudge Engine Service
+
+export class NudgeEngineService {
+ private lastNudgeTime: number = 0;
+ private nudgeHistory: Nudge[] = [];
+ private config: NudgeConfig;
+
+ private readonly DEFAULT_COOLDOWN = 120000; // 2 minutes
+
+ constructor(config?: Partial<NudgeConfig>) {
+ this.config = {
+ enabled: true,
+ cooldownMs: config?.cooldownMs || this.DEFAULT_COOLDOWN,
+ suppressedTypes: config?.suppressedTypes || [],
+ };
+ }
+
+ /**
+ * Evaluate current state and potentially generate a nudge
+ */
+ evaluate(
+ metrics: ConversationMetrics,
+ sentiment: SentimentTrend,
+ callDuration: number,
+ playbookCoverage?: number // 0-100
+ ): Nudge | null {
+ if (!this.config.enabled) return null;
+
+ // Rate limiting
+ const now = Date.now();
+ if (now - this.lastNudgeTime < this.config.cooldownMs) {
+ return null;
+ }
+
+ // Priority-ordered checks
+ const nudge =
+ this.checkMonologue(metrics) ||
+ this.checkSentimentDip(sentiment) ||
+ this.checkTalkRatio(metrics) ||
+ this.checkQuestions(metrics, callDuration) ||
+ this.checkPace(metrics) ||
+ this.checkNextSteps(callDuration) ||
+ this.checkPlaybook(playbookCoverage, callDuration);
+
+ if (nudge && !this.config.suppressedTypes.includes(nudge.type)) {
+ this.lastNudgeTime = now;
+ nudge.timestamp = now;
+ this.nudgeHistory.push(nudge);
+ log.info({ nudge: nudge.type, message: nudge.message }, 'Nudge triggered');
+ return nudge;
+ }
+
+ return null;
+ }
+
+ /**
+ * Check for monologue
+ */
+ private checkMonologue(metrics: ConversationMetrics): Nudge | null {
+ if (metrics.monologueDetected || metrics.longestMonologue > 60) {
+ return this.createNudge('monologue');
+ }
+ return null;
+ }
+
+ /**
+ * Check for sentiment dip
+ */
+ private checkSentimentDip(sentiment: SentimentTrend): Nudge | null {
+ if (
+ sentiment.trend === 'declining' &&
+ sentiment.current === 'negative'
+ ) {
+ return this.createNudge('sentiment', 0); // High severity
+ }
+
+ if (sentiment.trend === 'declining' && sentiment.averageScore < -0.2) {
+ return this.createNudge('sentiment', 1); // Medium severity
+ }
+
+ return null;
+ }
+
+ /**
+ * Check talk ratio
+ */
+ private checkTalkRatio(metrics: ConversationMetrics): Nudge | null {
+ // Only nudge after enough data (at least 60s of speaking)
+ if (metrics.totalDuration < 60) return null;
+
+ if (metrics.talkRatio.me > 0.75) {
+ return this.createNudge('talk_ratio', 1);
+ }
+
+ if (metrics.talkRatio.me > 0.65) {
+ return this.createNudge('talk_ratio', 0);
+ }
+
+ return null;
+ }
+
+ /**
+ * Check if asking enough questions
+ */
+ private checkQuestions(metrics: ConversationMetrics, callDuration: number): Nudge | null {
+ // Only after 3 minutes
+ if (callDuration < 180) return null;
+
+ // Expect at least 1 question per 2 minutes
+ const expectedQuestions = callDuration / 120;
+ if (metrics.questionsAsked < expectedQuestions * 0.5) {
+ return this.createNudge('questions');
+ }
+
+ return null;
+ }
+
+ /**
+ * Check speaking pace
+ */
+ private checkPace(metrics: ConversationMetrics): Nudge | null {
+ if (metrics.pace > 180) {
+ return this.createNudge('pace');
+ }
+ return null;
+ }
+
+ /**
+ * Check for next steps reminder
+ */
+ private checkNextSteps(callDuration: number): Nudge | null {
+ // Nudge about next steps after 20 minutes
+ // Only trigger once (within a 30s window)
+ if (callDuration > 1200 && callDuration < 1230) {
+ return this.createNudge('next_steps');
+ }
+
+ // Also nudge at 30 minutes
+ if (callDuration > 1800 && callDuration < 1830) {
+ return this.createNudge('next_steps', 1);
+ }
+
+ return null;
+ }
+
+ /**
+ * Check playbook coverage
+ */
+ private checkPlaybook(coverage?: number, callDuration?: number): Nudge | null {
+ if (coverage === undefined || callDuration === undefined) return null;
+
+ // After 15 minutes, if coverage is low
+ if (callDuration > 900 && coverage < 30) {
+ return this.createNudge('playbook');
+ }
+
+ return null;
+ }
+
+ /**
+ * Create a nudge from template
+ */
+ private createNudge(type: NudgeType, templateIndex: number = 0): Nudge {
+ const templates = NUDGE_TEMPLATES[type];
+ const template = templates[Math.min(templateIndex, templates.length - 1)];
+
+ return {
+ id: uuid(),
+ type,
+ message: template.message,
+ severity: template.severity,
+ dismissible: true,
+ timestamp: 0, // Will be set when returned
+ actionLabel: template.actionLabel,
+ actionType: template.actionType,
+ };
+ }
+
+ /**
+ * Force a specific nudge (for testing or manual triggers)
+ */
+ forceNudge(type: NudgeType): Nudge {
+ const nudge = this.createNudge(type);
+ nudge.timestamp = Date.now();
+ this.nudgeHistory.push(nudge);
+ return nudge;
+ }
+
+ /**
+ * Get nudge history
+ */
+ getHistory(): Nudge[] {
+ return [...this.nudgeHistory];
+ }
+
+ /**
+ * Update configuration
+ */
+ updateConfig(config: Partial<NudgeConfig>): void {
+ this.config = { ...this.config, ...config };
+ }
+
+ /**
+ * Suppress a nudge type
+ */
+ suppressType(type: NudgeType): void {
+ if (!this.config.suppressedTypes.includes(type)) {
+ this.config.suppressedTypes.push(type);
+ }
+ }
+
+ /**
+ * Unsuppress a nudge type
+ */
+ unsuppressType(type: NudgeType): void {
+ this.config.suppressedTypes = this.config.suppressedTypes.filter(t => t !== type);
+ }
+
+ /**
+ * Reset for new call
+ */
+ reset(): void {
+ this.lastNudgeTime = 0;
+ this.nudgeHistory = [];
+ log.info('Nudge engine reset');
+ }
+
+ /**
+ * Enable/disable nudges
+ */
+ setEnabled(enabled: boolean): void {
+ this.config.enabled = enabled;
+ }
+}
+
+// Singleton Instance
+
+let instance: NudgeEngineService | null = null;
+
+export function getNudgeEngine(): NudgeEngineService {
+ if (!instance) {
+ instance = new NudgeEngineService();
+ }
+ return instance;
+}
+
+export function resetNudgeEngine(): void {
+ if (instance) {
+ instance.reset();
+ }
+ instance = null;
+}
+
+export default NudgeEngineService;
diff --git a/src/main/services/copilot/playbook-tracker.service.ts b/src/main/services/copilot/playbook-tracker.service.ts
new file mode 100644
index 0000000..7f6e7fe
--- /dev/null
+++ b/src/main/services/copilot/playbook-tracker.service.ts
@@ -0,0 +1,417 @@
+/**
+ * Playbook Tracker Service
+ *
+ * Tracks coverage of meeting methodology items (MEDDIC, Challenger, etc.)
+ * by matching transcript content to required topics. Uses LLM to verify
+ * if playbook items were genuinely covered with evidence linking.
+ */
+
+import { v4 as uuid } from 'uuid';
+import { logger } from '../../lib/logger';
+import { getLLMService } from '../llm.service';
+import {
+ getPlaybookById,
+ getDefaultPlaybook,
+ createPlaybookSession,
+ updatePlaybookSession,
+} from '../../db';
+import type { TranscriptSegmentData } from './transcript-buffer.service';
+
+const log = logger.child({ module: 'playbook-tracker' });
+
+// Types
+
+export type PlaybookItemStatus = 'missing' | 'partial' | 'covered';
+
+export interface PlaybookItemEvidence {
+ segmentId: string;
+ timestamp: number;
+ excerpt: string;
+ confidence: number;
+}
+
+export interface PlaybookItem {
+ id: string;
+ label: string;
+ description: string;
+ keywords: string[];
+ suggestedQuestions: string[];
+ detectionPrompt: string;
+ status: PlaybookItemStatus;
+ evidence: PlaybookItemEvidence[];
+}
+
+export interface Playbook {
+ id: string;
+ name: string;
+ type: 'MEDDIC' | 'Challenger' | 'SPIN' | 'Custom';
+ description?: string;
+ items: PlaybookItem[];
+}
+
+export interface PlaybookSnapshot {
+ playbookId: string;
+ playbookName: string;
+ covered: number;
+ partial: number;
+ missing: number;
+ total: number;
+ coveragePercentage: number;
+ items: PlaybookItem[];
+ recommendations: string[];
+}
+
+// Playbook Tracker Service
+
+export class PlaybookTrackerService {
+ private activePlaybook: Playbook | null = null;
+ private sessionId: string | null = null;
+ private recordingId: number | null = null;
+
+ constructor() {}
+
+ /**
+ * Initialize tracker with a playbook
+ */
+ async initialize(
+ playbookId: string | null,
+ recordingId: number
+ ): Promise<Playbook | null> {
+ this.recordingId = recordingId;
+
+ // Get playbook from database
+ let dbPlaybook;
+ if (playbookId) {
+ dbPlaybook = getPlaybookById(playbookId);
+ } else {
+ dbPlaybook = getDefaultPlaybook();
+ }
+
+ if (!dbPlaybook) {
+ log.warn('No playbook found');
+ return null;
+ }
+
+ // Parse playbook items
+ const items: PlaybookItem[] = JSON.parse(dbPlaybook.items).map((item: any) => ({
+ ...item,
+ status: 'missing' as PlaybookItemStatus,
+ evidence: [],
+ }));
+
+ this.activePlaybook = {
+ id: dbPlaybook.id,
+ name: dbPlaybook.name,
+ type: dbPlaybook.type as Playbook['type'],
+ description: dbPlaybook.description || undefined,
+ items,
+ };
+
+ // Create session record
+ this.sessionId = uuid();
+ try {
+ createPlaybookSession({
+ id: this.sessionId,
+ recordingId,
+ playbookId: dbPlaybook.id,
+ itemsCoverage: JSON.stringify(
+ items.map(i => ({ id: i.id, status: i.status, evidence: [] }))
+ ),
+ });
+ } catch (error) {
+ log.error({ error }, 'Failed to create playbook session');
+ }
+
+ log.info({ playbookId: dbPlaybook.id, playbookName: dbPlaybook.name }, 'Playbook tracker initialized');
+ return this.activePlaybook;
+ }
+
+ /**
+ * Get the active playbook
+ */
+ getPlaybook(): Playbook | null {
+ return this.activePlaybook;
+ }
+
+ /**
+ * Check if a segment covers any playbook items (fast, keyword-based)
+ */
+ checkCoverageFast(segment: TranscriptSegmentData): PlaybookItem | null {
+ if (!this.activePlaybook) return null;
+
+ const text = segment.text.toLowerCase();
+
+ for (const item of this.activePlaybook.items) {
+ // Skip if already covered
+ if (item.status === 'covered') continue;
+
+ // Check keywords
+ const hasKeywords = item.keywords.some(kw =>
+ text.includes(kw.toLowerCase())
+ );
+
+ if (hasKeywords) {
+ // Mark as partial if first match
+ if (item.status === 'missing') {
+ item.status = 'partial';
+ item.evidence.push({
+ segmentId: segment.id,
+ timestamp: segment.startTime,
+ excerpt: segment.text.substring(0, 150),
+ confidence: 0.5,
+ });
+ this.saveSession();
+ return item;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Check coverage with LLM verification
+ */
+ async checkCoverageWithLLM(
+ segment: TranscriptSegmentData,
+ context: string
+ ): Promise<PlaybookItem | null> {
+ if (!this.activePlaybook) return null;
+
+ // First do fast check
+ const fastResult = this.checkCoverageFast(segment);
+
+ // For items that are partially covered, verify with LLM
+ for (const item of this.activePlaybook.items) {
+ if (item.status === 'covered') continue;
+
+ // Check if this segment might cover the item
+ const hasKeywords = item.keywords.some(kw =>
+ segment.text.toLowerCase().includes(kw.toLowerCase())
+ );
+
+ if (!hasKeywords && item.status !== 'partial') continue;
+
+ // Verify with LLM
+ const verification = await this.verifyCoverage(item, segment, context);
+
+ if (verification.isCovered) {
+ item.status = 'covered';
+ item.evidence.push({
+ segmentId: segment.id,
+ timestamp: segment.startTime,
+ excerpt: segment.text.substring(0, 150),
+ confidence: verification.confidence,
+ });
+ this.saveSession();
+
+ log.info({ itemId: item.id, itemLabel: item.label }, 'Playbook item covered');
+ return item;
+ } else if (verification.isPartial && item.status === 'missing') {
+ item.status = 'partial';
+ item.evidence.push({
+ segmentId: segment.id,
+ timestamp: segment.startTime,
+ excerpt: segment.text.substring(0, 150),
+ confidence: verification.confidence,
+ });
+ this.saveSession();
+ return item;
+ }
+ }
+
+ return fastResult;
+ }
+
+ /**
+ * Verify coverage using LLM
+ */
+ private async verifyCoverage(
+ item: PlaybookItem,
+ segment: TranscriptSegmentData,
+ context: string
+ ): Promise<{ isCovered: boolean; isPartial: boolean; confidence: number }> {
+ const llm = getLLMService();
+
+ const prompt = `Analyze this meeting conversation to determine if a playbook item has been covered.
+
+Playbook Item: ${item.label}
+Description: ${item.description}
+Detection Question: ${item.detectionPrompt}
+
+Recent conversation context:
+${context}
+
+Current statement: "${segment.text}"
+
+Determine if this playbook item has been adequately covered in the conversation.
+
+Respond with JSON:
+{
+ "covered": true/false,
+ "partial": true/false,
+ "confidence": 0.0-1.0,
+ "reasoning": "brief explanation"
+}`;
+
+ try {
+ const response = await llm.completeJSON<{
+ covered: boolean;
+ partial: boolean;
+ confidence: number;
+ reasoning: string;
+ }>(prompt, 'You are a meeting methodology expert. Return valid JSON only.');
+
+ if (response.success && response.data) {
+ return {
+ isCovered: response.data.covered && response.data.confidence > 0.7,
+ isPartial: response.data.partial || (response.data.confidence > 0.4 && response.data.confidence <= 0.7),
+ confidence: response.data.confidence,
+ };
+ }
+ } catch (error) {
+ log.warn({ error, itemId: item.id }, 'LLM verification failed');
+ }
+
+ return { isCovered: false, isPartial: false, confidence: 0 };
+ }
+
+ /**
+ * Get current coverage snapshot
+ */
+ getSnapshot(): PlaybookSnapshot | null {
+ if (!this.activePlaybook) return null;
+
+ const covered = this.activePlaybook.items.filter(i => i.status === 'covered').length;
+ const partial = this.activePlaybook.items.filter(i => i.status === 'partial').length;
+ const missing = this.activePlaybook.items.filter(i => i.status === 'missing').length;
+ const total = this.activePlaybook.items.length;
+
+ // Weight: covered = 1, partial = 0.5, missing = 0
+ const coveragePercentage = total > 0
+ ? Math.round(((covered + partial * 0.5) / total) * 100)
+ : 0;
+
+ // Generate recommendations
+ const recommendations: string[] = [];
+ for (const item of this.activePlaybook.items) {
+ if (item.status === 'missing') {
+ recommendations.push(`Consider covering: ${item.label}`);
+ if (item.suggestedQuestions.length > 0) {
+ recommendations.push(` Try asking: "${item.suggestedQuestions[0]}"`);
+ }
+ }
+ }
+
+ return {
+ playbookId: this.activePlaybook.id,
+ playbookName: this.activePlaybook.name,
+ covered,
+ partial,
+ missing,
+ total,
+ coveragePercentage,
+ items: this.activePlaybook.items,
+ recommendations: recommendations.slice(0, 4), // Limit to 4
+ };
+ }
+
+ /**
+ * Get missing items with suggested questions
+ */
+ getMissingItems(): Array<{ item: PlaybookItem; suggestedQuestion: string }> {
+ if (!this.activePlaybook) return [];
+
+ return this.activePlaybook.items
+ .filter(i => i.status === 'missing')
+ .map(item => ({
+ item,
+ suggestedQuestion: item.suggestedQuestions[0] || '',
+ }));
+ }
+
+ /**
+ * Manually mark an item as covered
+ */
+ markAsCovered(itemId: string, evidence?: PlaybookItemEvidence): void {
+ if (!this.activePlaybook) return;
+
+ const item = this.activePlaybook.items.find(i => i.id === itemId);
+ if (item) {
+ item.status = 'covered';
+ if (evidence) {
+ item.evidence.push(evidence);
+ }
+ this.saveSession();
+ }
+ }
+
+ /**
+ * Save session to database
+ */
+ private saveSession(): void {
+ if (!this.sessionId || !this.activePlaybook) return;
+
+ try {
+ const itemsCoverage = this.activePlaybook.items.map(i => ({
+ id: i.id,
+ status: i.status,
+ evidence: i.evidence,
+ }));
+
+ updatePlaybookSession(this.sessionId, {
+ itemsCoverage: JSON.stringify(itemsCoverage),
+ });
+ } catch (error) {
+ log.error({ error }, 'Failed to save playbook session');
+ }
+ }
+
+ /**
+ * Finalize and save completion snapshot
+ */
+ async finalize(): Promise<PlaybookSnapshot | null> {
+ const snapshot = this.getSnapshot();
+ if (!snapshot || !this.sessionId) return snapshot;
+
+ try {
+ updatePlaybookSession(this.sessionId, {
+ completionSnapshot: JSON.stringify(snapshot),
+ });
+ log.info({ coverage: snapshot.coveragePercentage }, 'Playbook session finalized');
+ } catch (error) {
+ log.error({ error }, 'Failed to finalize playbook session');
+ }
+
+ return snapshot;
+ }
+
+ /**
+ * Reset tracker
+ */
+ reset(): void {
+ this.activePlaybook = null;
+ this.sessionId = null;
+ this.recordingId = null;
+ }
+}
+
+// Singleton Instance
+
+let instance: PlaybookTrackerService | null = null;
+
+export function getPlaybookTracker(): PlaybookTrackerService {
+ if (!instance) {
+ instance = new PlaybookTrackerService();
+ }
+ return instance;
+}
+
+export function resetPlaybookTracker(): void {
+ if (instance) {
+ instance.reset();
+ }
+ instance = null;
+}
+
+export default PlaybookTrackerService;
diff --git a/src/main/services/copilot/sales-copilot.service.ts b/src/main/services/copilot/sales-copilot.service.ts
new file mode 100644
index 0000000..2b8b8f3
--- /dev/null
+++ b/src/main/services/copilot/sales-copilot.service.ts
@@ -0,0 +1,823 @@
+/**
+ * Meeting Co-Pilot Agent Orchestrator
+ *
+ * Central coordinator that receives transcript segments, manages context,
+ * and triggers all agent processing pipelines. Emits events for UI updates.
+ */
+
+import { EventEmitter } from 'events';
+import { v4 as uuid } from 'uuid';
+import { logger } from '../../lib/logger';
+import { initLLMService } from '../llm.service';
+import {
+ updateRecording,
+ createCallMetricsSnapshot,
+ createNudge,
+} from '../../db';
+
+import {
+ TranscriptBufferService,
+ getTranscriptBuffer,
+ type RawTranscriptData,
+ type TranscriptSegmentData,
+} from './transcript-buffer.service';
+
+import {
+ ContextManagerService,
+ getContextManager,
+} from './context-manager.service';
+
+import {
+ ConversationMetricsService,
+ getMetricsService,
+ type ConversationMetrics,
+} from './conversation-metrics.service';
+
+import {
+ SentimentAnalyzerService,
+ getSentimentAnalyzer,
+ type SentimentTrend,
+} from './sentiment-analyzer.service';
+
+import {
+ NudgeEngineService,
+ getNudgeEngine,
+ type Nudge,
+} from './nudge-engine.service';
+
+import {
+ CueCardEngineService,
+ getCueCardEngine,
+ type CueCardTriggerData,
+} from './cue-card-engine.service';
+
+import {
+ PlaybookTrackerService,
+ getPlaybookTracker,
+ type PlaybookSnapshot,
+ type PlaybookItem,
+} from './playbook-tracker.service';
+
+import {
+ SummaryGeneratorService,
+ getSummaryGenerator,
+ type CallSummary,
+} from './summary-generator.service';
+
+// MCP Services
+import {
+ getConnectionOrchestrator,
+ getIntentDetector,
+ getResultHandler,
+ getToolAggregator,
+ getMCPAgent,
+ resetMCPAgent,
+} from '../mcp';
+import { createMCPToolCall, updateMCPToolCall } from '../../db';
+import type { MCPDisplayResult, MCPIntentDetection } from '../../../shared/types/mcp.types';
+
+const log = logger.child({ module: 'meeting-copilot' });
+
+// Types
+
+export interface CopilotConfig {
+ enableTranscription: boolean;
+ enableMetrics: boolean;
+ enableSentiment: boolean;
+ enableNudges: boolean;
+ enableCueCards: boolean;
+ enablePlaybook: boolean;
+ playbookId?: string;
+ useLLMForDetection: boolean;
+ metricsUpdateInterval: number; // ms
+ compressionInterval: number; // ms
+ // MCP Configuration
+ enableMCP: boolean;
+ mcpAutoTrigger: boolean;
+}
+
+export interface CopilotEvents {
+ 'call-started': { recordingId: number; sessionId: string };
+ 'transcript-segment': TranscriptSegmentData;
+ 'metrics-update': { metrics: ConversationMetrics; health: number };
+ 'sentiment-update': { sentiment: SentimentTrend };
+ 'nudge': { nudge: Nudge };
+ 'cue-card': { cueCard: CueCardTriggerData };
+ 'playbook-update': { item: PlaybookItem; snapshot: PlaybookSnapshot };
+ 'call-ended': {
+ summary: CallSummary;
+ playbook?: PlaybookSnapshot;
+ metrics: ConversationMetrics;
+ duration: number;
+ };
+ 'error': { error: string; context?: string };
+ // MCP Events
+ 'mcp-result': { result: import('../../../shared/types/mcp.types').MCPDisplayResult };
+ 'mcp-error': { serverId: string; toolName: string; error: string };
+}
+
+export interface CallState {
+ recordingId: number;
+ sessionId: string;
+ startTime: number;
+ isActive: boolean;
+}
+
+// Meeting Co-Pilot Service
+
+export class MeetingCopilotService extends EventEmitter {
+ private transcriptBuffer: TranscriptBufferService;
+ private contextManager: ContextManagerService;
+ private metricsService: ConversationMetricsService;
+ private sentimentAnalyzer: SentimentAnalyzerService;
+ private nudgeEngine: NudgeEngineService;
+ private cueCardEngine: CueCardEngineService;
+ private playbookTracker: PlaybookTrackerService;
+ private summaryGenerator: SummaryGeneratorService;
+
+ private config: CopilotConfig;
+ private callState: CallState | null = null;
+ private metricsTimer: NodeJS.Timeout | null = null;
+ private compressionTimer: NodeJS.Timeout | null = null;
+ private processingQueue: TranscriptSegmentData[] = [];
+ private isProcessing: boolean = false;
+
+ private readonly DEFAULT_CONFIG: CopilotConfig = {
+ enableTranscription: true,
+ enableMetrics: true,
+ enableSentiment: true,
+ enableNudges: true,
+ enableCueCards: true,
+ enablePlaybook: true,
+ useLLMForDetection: false, // Start with fast detection
+ metricsUpdateInterval: 10000, // 10 seconds
+ compressionInterval: 300000, // 5 minutes
+ // MCP defaults
+ enableMCP: true,
+ mcpAutoTrigger: true,
+ };
+
+ constructor(config?: Partial<CopilotConfig>) {
+ super();
+ this.config = { ...this.DEFAULT_CONFIG, ...config };
+
+ // Initialize services
+ this.transcriptBuffer = getTranscriptBuffer();
+ this.contextManager = getContextManager();
+ this.metricsService = getMetricsService();
+ this.sentimentAnalyzer = getSentimentAnalyzer();
+ this.nudgeEngine = getNudgeEngine();
+ this.cueCardEngine = getCueCardEngine();
+ this.playbookTracker = getPlaybookTracker();
+ this.summaryGenerator = getSummaryGenerator();
+
+ // Listen for transcript segments ready for processing
+ this.transcriptBuffer.on('segment-ready', this.onSegmentReady.bind(this));
+ }
+
+ /**
+ * Initialize with API key
+ */
+ initialize(apiKey: string): void {
+ initLLMService(apiKey);
+ log.info('Meeting Co-Pilot initialized with API key');
+ }
+
+ /**
+ * Start tracking a call
+ */
+ async startCall(recordingId: number, sessionId: string): Promise<void> {
+ if (this.callState?.isActive) {
+ log.warn('Call already in progress, ending previous call');
+ await this.endCall();
+ }
+
+ this.callState = {
+ recordingId,
+ sessionId,
+ startTime: Date.now(),
+ isActive: true,
+ };
+
+ // Initialize services
+ this.transcriptBuffer.startCall(sessionId, recordingId);
+ this.nudgeEngine.reset();
+ this.cueCardEngine.reset();
+ this.sentimentAnalyzer.clear();
+ this.metricsService.clear(sessionId);
+
+ // Initialize playbook if enabled
+ if (this.config.enablePlaybook) {
+ await this.playbookTracker.initialize(this.config.playbookId || null, recordingId);
+ }
+
+ // Reset MCP Agent conversation for the new call
+ getMCPAgent().resetConversation();
+
+ // Start periodic metrics updates
+ if (this.config.enableMetrics) {
+ this.startMetricsTimer();
+ }
+
+ // Start context compression timer
+ this.startCompressionTimer();
+
+ this.emit('call-started', { recordingId, sessionId });
+ log.info({ recordingId, sessionId }, 'Call tracking started');
+ }
+
+ /**
+ * Process incoming transcript from WebSocket
+ */
+ async onTranscriptReceived(
+ channel: 'me' | 'them',
+ data: RawTranscriptData
+ ): Promise<void> {
+ if (!this.callState?.isActive) {
+ log.warn('Received transcript but no active call');
+ return;
+ }
+
+ // Add to buffer
+ const segment = await this.transcriptBuffer.addRawSegment(
+ this.callState.sessionId,
+ this.callState.recordingId,
+ channel,
+ data
+ );
+
+ if (segment) {
+ this.emit('transcript-segment', segment);
+ }
+ }
+
+ /**
+ * Handle segment ready for agent processing
+ */
+ private async onSegmentReady(segment: TranscriptSegmentData): Promise<void> {
+ if (!this.callState?.isActive) return;
+
+ // Add to processing queue
+ this.processingQueue.push(segment);
+
+ // Process queue if not already processing
+ if (!this.isProcessing) {
+ await this.processQueue();
+ }
+ }
+
+ /**
+ * Process the segment queue
+ */
+ private async processQueue(): Promise<void> {
+ if (this.isProcessing || this.processingQueue.length === 0) return;
+
+ this.isProcessing = true;
+
+ while (this.processingQueue.length > 0) {
+ const segment = this.processingQueue.shift()!;
+
+ try {
+ await this.processSegment(segment);
+ } catch (error) {
+ log.error({ error, segmentId: segment.id }, 'Error processing segment');
+ this.emit('error', { error: 'Segment processing failed', context: segment.id });
+ }
+ }
+
+ this.isProcessing = false;
+ }
+
+ /**
+ * Process a single segment through all pipelines
+ */
+ private async processSegment(segment: TranscriptSegmentData): Promise<void> {
+ if (!this.callState) return;
+
+ const recentSegments = this.transcriptBuffer.getFinalSegments(this.callState.sessionId);
+ const context = this.contextManager.buildAnalysisContext(
+ this.callState.sessionId,
+ recentSegments,
+ 5
+ );
+
+ // Run processing in parallel where possible
+ const promises: Promise<void>[] = [];
+
+ // Cue card detection (only for customer statements)
+ if (this.config.enableCueCards && segment.channel === 'them') {
+ promises.push(this.processCueCards(segment, context));
+ }
+
+ // Playbook tracking
+ if (this.config.enablePlaybook) {
+ promises.push(this.processPlaybook(segment, context));
+ }
+
+ // Sentiment update (only for customer statements)
+ if (this.config.enableSentiment && segment.channel === 'them') {
+ this.processSentiment();
+ }
+
+ // MCP intent detection (for both channels - user may ask for info too)
+ if (this.config.enableMCP && this.config.mcpAutoTrigger) {
+ log.debug({
+ text: segment.text.slice(0, 50),
+ channel: segment.channel,
+ enableMCP: this.config.enableMCP,
+ mcpAutoTrigger: this.config.mcpAutoTrigger,
+ }, 'MCP: Checking segment for intent detection');
+ promises.push(this.processMCPIntents(segment, context));
+ } else {
+ log.debug({
+ enableMCP: this.config.enableMCP,
+ mcpAutoTrigger: this.config.mcpAutoTrigger,
+ }, 'MCP: Skipped - MCP not enabled or auto-trigger disabled');
+ }
+
+ await Promise.all(promises);
+
+ // Mark segment as processed
+ this.transcriptBuffer.markProcessed(segment.id, this.callState.sessionId);
+ }
+
+ /**
+ * Process cue card detection
+ */
+ private async processCueCards(segment: TranscriptSegmentData, context: string): Promise<void> {
+ if (!this.callState) return;
+
+ const cueCard = await this.cueCardEngine.processSegment(
+ segment,
+ context,
+ this.callState.recordingId,
+ this.config.useLLMForDetection
+ );
+
+ if (cueCard) {
+ this.emit('cue-card', { cueCard });
+ }
+ }
+
+ /**
+ * Process playbook tracking
+ */
+ private async processPlaybook(segment: TranscriptSegmentData, context: string): Promise<void> {
+ let updatedItem: PlaybookItem | null = null;
+
+ if (this.config.useLLMForDetection) {
+ updatedItem = await this.playbookTracker.checkCoverageWithLLM(segment, context);
+ } else {
+ updatedItem = this.playbookTracker.checkCoverageFast(segment);
+ }
+
+ if (updatedItem) {
+ const snapshot = this.playbookTracker.getSnapshot();
+ if (snapshot) {
+ this.emit('playbook-update', { item: updatedItem, snapshot });
+ }
+ }
+ }
+
+ /**
+ * Process sentiment update (LLM-driven)
+ */
+ private async processSentiment(): Promise<void> {
+ if (!this.callState) return;
+
+ const recentSegments = this.transcriptBuffer.getFinalSegments(this.callState.sessionId);
+ const sentiment = await this.sentimentAnalyzer.getSentimentTrend(recentSegments);
+
+
+ this.emit('sentiment-update', { sentiment });
+ }
+
+ /**
+ * Process MCP intents - use agentic loop to detect and execute tool calls
+ */
+ private async processMCPIntents(segment: TranscriptSegmentData, context: string): Promise<void> {
+ if (!this.callState) {
+ log.debug('MCP: No active call state, skipping');
+ return;
+ }
+
+ const mcpAgent = getMCPAgent();
+ const toolAggregator = getToolAggregator();
+
+ // Check if any tools are available
+ const availableTools = toolAggregator.getAllTools();
+
+ // Quick check if we should even trigger the agent
+ const shouldTrigger = mcpAgent.shouldTrigger(segment, context);
+
+ if (!shouldTrigger) {
+ return;
+ }
+
+ // Get last 5 segments for context
+ const allSegments = this.transcriptBuffer.getFinalSegments(this.callState.sessionId);
+ const recentSegments = allSegments.slice(-5);
+
+ log.info({
+ text: segment.text.slice(0, 100),
+ fullText: segment.text,
+ toolCount: availableTools.length,
+ toolNames: availableTools.map(t => `${t.serverId}:${t.name}`),
+ recentSegmentCount: recentSegments.length,
+ channel: segment.channel,
+ }, 'MCP Agent triggered, starting agentic loop');
+
+ // Create a record for this agent run
+ const agentRunId = `mcp-agent-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`;
+
+ log.debug({
+ agentRunId,
+ recentSegments: recentSegments.map(s => ({ channel: s.channel, text: s.text.slice(0, 50) })),
+ }, 'MCP Agent: Recent segments being sent');
+
+ try {
+ // Run the agentic loop with recent segments
+ const startTime = Date.now();
+ const result = await mcpAgent.run(recentSegments, availableTools);
+ const elapsedMs = Date.now() - startTime;
+
+ log.info({
+ agentRunId,
+ elapsedMs,
+ success: result.success,
+ hasResponse: !!result.response,
+ responsePreview: result.response?.slice(0, 200),
+ toolsCalledCount: result.toolsCalled.length,
+ toolsCalledNames: result.toolsCalled.map(tc => tc.toolName),
+ error: result.error,
+ }, 'MCP Agent run completed');
+
+ // Log all tool calls to database
+ for (const toolCall of result.toolsCalled) {
+ const toolCallId = `${agentRunId}-${toolCall.toolName}`;
+ try {
+ createMCPToolCall({
+ id: toolCallId,
+ serverId: toolCall.serverId,
+ recordingId: this.callState.recordingId,
+ toolName: toolCall.toolName,
+ toolInput: JSON.stringify(toolCall.input),
+ toolOutput: toolCall.output ? JSON.stringify(toolCall.output) : undefined,
+ status: toolCall.success ? 'success' : 'error',
+ errorMessage: !toolCall.success ? 'Tool execution failed' : undefined,
+ triggerType: 'intent',
+ });
+ } catch (dbError) {
+ log.error({ error: dbError }, 'Failed to create MCP tool call record');
+ }
+ }
+
+ // If we got a response, create a display result
+ if (result.success && (result.response || result.toolsCalled.length > 0)) {
+ // Build a display result with the agent's response
+ const displayResult: MCPDisplayResult = {
+ id: agentRunId,
+ toolCallId: agentRunId,
+ serverId: result.toolsCalled[0]?.serverId || 'agent',
+ toolName: result.toolsCalled.map(tc => tc.toolName).join(', ') || 'MCP Agent',
+ serverName: 'MCP Agent',
+ displayType: 'cue-card',
+ title: result.toolsCalled.length > 0
+ ? `${result.toolsCalled[0].toolName} Results`
+ : 'MCP Agent Response',
+ content: {
+ // Only use markdown since response may contain links/formatting
+ markdown: result.response || 'Tool executed successfully',
+ },
+ timestamp: new Date().toISOString(),
+ };
+
+ // Emit result event
+ this.emit('mcp-result', { result: displayResult });
+
+ log.info({
+ agentRunId,
+ toolsCalledCount: result.toolsCalled.length,
+ hasResponse: !!result.response,
+ }, 'MCP Agent completed, result emitted');
+ } else if (result.error) {
+ log.warn({ agentRunId, error: result.error }, 'MCP Agent completed with error');
+ }
+ } catch (error) {
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
+
+ // Emit error event
+ this.emit('mcp-error', {
+ serverId: 'agent',
+ toolName: 'MCP Agent',
+ error: errorMessage,
+ });
+
+ log.error({ error: errorMessage, agentRunId }, 'MCP Agent failed');
+ }
+ }
+
+ /**
+ * Start periodic metrics updates
+ */
+ private startMetricsTimer(): void {
+ if (this.metricsTimer) return;
+
+ this.metricsTimer = setInterval(() => {
+ this.updateMetrics();
+ }, this.config.metricsUpdateInterval);
+ }
+
+ /**
+ * Update metrics and check for nudges
+ */
+ private async updateMetrics(): Promise<void> {
+ if (!this.callState?.isActive) return;
+
+ const segments = this.transcriptBuffer.getFinalSegments(this.callState.sessionId);
+ const callDuration = (Date.now() - this.callState.startTime) / 1000;
+ const metrics = this.metricsService.calculate(segments, callDuration);
+ const health = this.metricsService.getConversationHealthScore(metrics);
+ const sentiment = await this.sentimentAnalyzer.getSentimentTrend(segments);
+ const playbookSnapshot = this.playbookTracker.getSnapshot();
+
+ // Emit metrics update
+ this.emit('metrics-update', { metrics, health });
+
+ // Check for nudges
+ if (this.config.enableNudges) {
+ const nudge = this.nudgeEngine.evaluate(
+ metrics,
+ sentiment,
+ callDuration,
+ playbookSnapshot?.coveragePercentage
+ );
+
+ if (nudge) {
+ // Save nudge to database
+ try {
+ createNudge({
+ id: nudge.id,
+ recordingId: this.callState.recordingId,
+ type: nudge.type,
+ message: nudge.message,
+ severity: nudge.severity,
+ timestamp: callDuration,
+ });
+ } catch (error) {
+ log.error({ error }, 'Failed to save nudge');
+ }
+
+ this.emit('nudge', { nudge });
+ }
+ }
+
+ // Save metrics snapshot periodically (every minute)
+ if (Math.floor(callDuration) % 60 < 10) {
+ try {
+ createCallMetricsSnapshot({
+ id: uuid(),
+ recordingId: this.callState.recordingId,
+ timestamp: callDuration,
+ talkRatioMe: metrics.talkRatio.me,
+ talkRatioThem: metrics.talkRatio.them,
+ paceWpm: metrics.pace,
+ questionsAsked: metrics.questionsAsked,
+ monologueDetected: metrics.monologueDetected,
+ sentimentTrend: sentiment.trend,
+ });
+ } catch (error) {
+ log.error({ error }, 'Failed to save metrics snapshot');
+ }
+ }
+ }
+
+ /**
+ * Start context compression timer
+ */
+ private startCompressionTimer(): void {
+ if (this.compressionTimer) return;
+
+ this.compressionTimer = setInterval(async () => {
+ await this.compressContext();
+ }, this.config.compressionInterval);
+ }
+
+ /**
+ * Compress older context
+ */
+ private async compressContext(): Promise<void> {
+ if (!this.callState?.isActive) return;
+
+ const segments = this.transcriptBuffer.getFinalSegments(this.callState.sessionId);
+
+ // Compress segments older than 5 minutes
+ const cutoffTime = (Date.now() - this.callState.startTime) / 1000 - 300;
+ const oldSegments = segments.filter(s => s.endTime < cutoffTime);
+
+ if (oldSegments.length > 20) {
+ await this.contextManager.compressSegments(this.callState.sessionId, oldSegments);
+ }
+ }
+
+ /**
+ * End call and generate summary
+ */
+ async endCall(): Promise<CallSummary | null> {
+ if (!this.callState) {
+ log.warn('No active call to end');
+ return null;
+ }
+
+ const { recordingId, sessionId, startTime } = this.callState;
+ const duration = (Date.now() - startTime) / 1000;
+
+ log.info({ recordingId, sessionId, duration }, 'Ending call');
+
+ // Stop timers
+ if (this.metricsTimer) {
+ clearInterval(this.metricsTimer);
+ this.metricsTimer = null;
+ }
+ if (this.compressionTimer) {
+ clearInterval(this.compressionTimer);
+ this.compressionTimer = null;
+ }
+
+ // Mark call as inactive
+ this.callState.isActive = false;
+
+ // Get final segments
+ const segments = this.transcriptBuffer.getFinalSegments(sessionId);
+
+ // Calculate final metrics
+ const metrics = this.metricsService.calculate(segments, duration);
+
+ // Finalize playbook
+ const playbookSnapshot = await this.playbookTracker.finalize();
+
+ // Generate summary
+ let summary: CallSummary;
+ try {
+ log.info({ recordingId, segmentCount: segments.length }, 'Starting summary generation');
+ const summaryStartTime = Date.now();
+ summary = await this.summaryGenerator.generate(segments);
+ const summaryElapsed = Date.now() - summaryStartTime;
+ log.info({
+ recordingId,
+ elapsedMs: summaryElapsed,
+ bullets: summary.bullets.length,
+ objections: summary.objections.length,
+ nextSteps: summary.nextSteps.length,
+ }, 'Summary generation completed');
+ } catch (error) {
+ const errMsg = error instanceof Error ? error.message : 'Unknown error';
+ log.error({ err: error, errorMessage: errMsg, recordingId }, 'Failed to generate summary');
+ summary = {
+ bullets: [],
+ customerPain: [],
+ customerGoals: [],
+ objections: [],
+ commitments: [],
+ nextSteps: [],
+ keyDecisions: [],
+ riskFlags: ['Summary generation failed: ' + errMsg],
+ generatedAt: Date.now(),
+ };
+ }
+
+ // Save to database
+ try {
+ log.info({ recordingId, hasSummary: summary.bullets.length > 0 }, 'Saving call data to database');
+ updateRecording(recordingId, {
+ callSummary: JSON.stringify(summary),
+ playbookSnapshot: playbookSnapshot ? JSON.stringify(playbookSnapshot) : undefined,
+ metricsSnapshot: JSON.stringify(metrics),
+ duration: Math.round(duration),
+ });
+ log.info({ recordingId }, 'Call data saved to database');
+ } catch (error) {
+ const errMsg = error instanceof Error ? error.message : 'Unknown error';
+ log.error({ err: error, errorMessage: errMsg, recordingId }, 'Failed to save call data');
+ }
+
+ // Emit end event
+ log.info({ recordingId, hasSummary: summary.bullets.length > 0 }, 'Emitting call-ended event');
+ this.emit('call-ended', {
+ summary,
+ playbook: playbookSnapshot || undefined,
+ metrics,
+ duration,
+ });
+
+ // Cleanup
+ this.transcriptBuffer.clear(sessionId);
+ this.contextManager.clear(sessionId);
+ this.playbookTracker.reset();
+ this.callState = null;
+
+ return summary;
+ }
+
+ /**
+ * Update configuration
+ */
+ updateConfig(config: Partial<CopilotConfig>): void {
+ this.config = { ...this.config, ...config };
+
+ // Update nudge engine
+ this.nudgeEngine.setEnabled(this.config.enableNudges);
+ }
+
+ /**
+ * Get current call state
+ */
+ getCallState(): CallState | null {
+ return this.callState;
+ }
+
+ /**
+ * Check if call is active
+ */
+ isCallActive(): boolean {
+ return this.callState?.isActive ?? false;
+ }
+
+ /**
+ * Get current metrics
+ */
+ getCurrentMetrics(): ConversationMetrics | null {
+ if (!this.callState?.isActive) return null;
+
+ const segments = this.transcriptBuffer.getFinalSegments(this.callState.sessionId);
+ const callDuration = (Date.now() - this.callState.startTime) / 1000;
+ return this.metricsService.calculate(segments, callDuration);
+ }
+
+ /**
+ * Get current playbook snapshot
+ */
+ getPlaybookSnapshot(): PlaybookSnapshot | null {
+ return this.playbookTracker.getSnapshot();
+ }
+
+ /**
+ * Get current sentiment
+ */
+ async getCurrentSentiment(): Promise<SentimentTrend | null> {
+ if (!this.callState?.isActive) return null;
+
+ const segments = this.transcriptBuffer.getFinalSegments(this.callState.sessionId);
+ return this.sentimentAnalyzer.getSentimentTrend(segments);
+ }
+
+ /**
+ * Dismiss a cue card
+ */
+ dismissCueCard(triggerId: string): void {
+ this.cueCardEngine.updateTriggerStatus(triggerId, 'dismissed');
+ }
+
+ /**
+ * Pin a cue card
+ */
+ pinCueCard(triggerId: string): void {
+ this.cueCardEngine.updateTriggerStatus(triggerId, 'pinned');
+ }
+
+ /**
+ * Submit cue card feedback
+ */
+ submitCueCardFeedback(triggerId: string, feedback: 'helpful' | 'wrong' | 'irrelevant'): void {
+ this.cueCardEngine.submitFeedback(triggerId, feedback);
+ }
+
+ /**
+ * Dismiss a nudge
+ */
+ dismissNudge(nudgeId: string): void {
+ // Nudges are already tracked in history, nothing to update
+ log.info({ nudgeId }, 'Nudge dismissed');
+ }
+}
+
+// Singleton Instance
+
+let instance: MeetingCopilotService | null = null;
+
+export function getMeetingCopilot(config?: Partial<CopilotConfig>): MeetingCopilotService {
+ if (!instance) {
+ instance = new MeetingCopilotService(config);
+ }
+ return instance;
+}
+
+export function resetMeetingCopilot(): void {
+ instance = null;
+}
+
+export { MeetingCopilotService as SalesCopilotService };
+export { getMeetingCopilot as getSalesCopilot };
+export { resetMeetingCopilot as resetSalesCopilot };
+
+export default MeetingCopilotService;
diff --git a/src/main/services/copilot/sentiment-analyzer.service.ts b/src/main/services/copilot/sentiment-analyzer.service.ts
new file mode 100644
index 0000000..7c1101b
--- /dev/null
+++ b/src/main/services/copilot/sentiment-analyzer.service.ts
@@ -0,0 +1,414 @@
+/**
+ * Sentiment Analyzer Service
+ *
+ * Analyzes sentiment of participant ("them") statements to track mood trends.
+ * Uses pattern-based detection for speed with optional LLM fallback.
+ */
+
+import { logger } from '../../lib/logger';
+import { getLLMService } from '../llm.service';
+import type { TranscriptSegmentData } from './transcript-buffer.service';
+
+const log = logger.child({ module: 'sentiment-analyzer' });
+
+// Types
+
+export type Sentiment = 'positive' | 'neutral' | 'negative';
+
+export interface SentimentResult {
+ sentiment: Sentiment;
+ confidence: number;
+ signals: string[]; // Words/phrases that triggered the sentiment
+}
+
+export interface SentimentTrend {
+ current: Sentiment;
+ trend: 'improving' | 'stable' | 'declining';
+ history: Array<{
+ time: number;
+ sentiment: Sentiment;
+ text: string;
+ }>;
+ averageScore: number; // -1 to 1
+}
+
+// Sentiment Patterns
+
+const POSITIVE_PATTERNS = [
+ // Strong positive
+ /\b(love|excellent|perfect|amazing|fantastic|wonderful|great|awesome|outstanding)\b/i,
+ // Agreement
+ /\b(yes|agree|absolutely|definitely|certainly|exactly|right|correct)\b/i,
+ // Interest
+ /\b(interested|exciting|impressive|sounds good|makes sense|like that|appreciate)\b/i,
+ // Progress indicators
+ /\b(moving forward|next step|let's do|ready to|looking forward)\b/i,
+];
+
+const NEGATIVE_PATTERNS = [
+ // Strong negative
+ /\b(hate|terrible|awful|horrible|worst|disappointed|frustrated|annoyed)\b/i,
+ // Concerns
+ /\b(concern|worried|issue|problem|difficult|complicated|expensive|costly)\b/i,
+ // Disagreement
+ /\b(no|disagree|don't think|not sure|doubt|skeptical|hesitant)\b/i,
+ // Objections
+ /\b(but|however|although|unfortunately|can't|won't|impossible)\b/i,
+ // Delays
+ /\b(not now|later|maybe|perhaps|need to think|not ready|busy)\b/i,
+];
+
+const QUESTION_WEIGHT = -0.1; // Questions are slightly negative (indicate uncertainty)
+
+// Sentiment Analyzer Service
+
+export class SentimentAnalyzerService {
+ private cache: Map<string, Sentiment> = new Map(); // segmentId -> sentiment
+ private useLLMFallback: boolean = true;
+
+ constructor(useLLMFallback: boolean = true) {
+ this.useLLMFallback = useLLMFallback;
+ }
+
+ /**
+ * Analyze sentiment of a single text (fast, pattern-based)
+ */
+ analyze(text: string): SentimentResult {
+ const signals: string[] = [];
+ let score = 0;
+
+ // Check positive patterns
+ for (const pattern of POSITIVE_PATTERNS) {
+ const matches = text.match(pattern);
+ if (matches) {
+ score += 0.3;
+ signals.push(matches[0]);
+ }
+ }
+
+ // Check negative patterns
+ for (const pattern of NEGATIVE_PATTERNS) {
+ const matches = text.match(pattern);
+ if (matches) {
+ score -= 0.3;
+ signals.push(matches[0]);
+ }
+ }
+
+ // Questions indicate uncertainty
+ if (/\?/.test(text)) {
+ score += QUESTION_WEIGHT;
+ }
+
+ // Normalize score to -1 to 1
+ score = Math.max(-1, Math.min(1, score));
+
+ // Determine sentiment
+ let sentiment: Sentiment;
+ if (score > 0.15) {
+ sentiment = 'positive';
+ } else if (score < -0.15) {
+ sentiment = 'negative';
+ } else {
+ sentiment = 'neutral';
+ }
+
+ return {
+ sentiment,
+ confidence: Math.abs(score),
+ signals,
+ };
+ }
+
+ /**
+ * Analyze sentiment of multiple statements using LLM (batch analysis)
+ * More efficient than analyzing one at a time
+ */
+ async analyzeBatchWithLLM(statements: Array<{ id: string; text: string; time: number }>): Promise<Map<string, SentimentResult>> {
+ const llm = getLLMService();
+ const results = new Map<string, SentimentResult>();
+
+ if (statements.length === 0) {
+ return results;
+ }
+
+ const statementsText = statements
+ .map((s, i) => `[${i + 1}] "${s.text}"`)
+ .join('\n');
+
+ const prompt = `Analyze the sentiment of each participant statement from a meeting.
+Consider the emotional tone, concerns, satisfaction, and engagement level.
+Statements like "this is bad", "killing myself", "hate this" are clearly NEGATIVE.
+Statements showing interest, agreement, or positivity are POSITIVE.
+
+Statements:
+${statementsText}
+
+Respond with JSON array (one entry per statement, in order):
+[
+ {
+ "index": 1,
+ "sentiment": "positive" | "neutral" | "negative",
+ "confidence": 0.0-1.0,
+ "signals": ["key words or phrases that indicate sentiment"]
+ },
+ ...
+]`;
+
+ try {
+ const response = await llm.completeJSON<Array<{
+ index: number;
+ sentiment: Sentiment;
+ confidence: number;
+ signals: string[];
+ }>>(prompt, 'You are a sentiment analysis expert for meetings. Analyze participant emotions accurately. Return valid JSON array only.');
+
+ if (response.success && response.data && Array.isArray(response.data)) {
+ for (const item of response.data) {
+ const statement = statements[item.index - 1];
+ if (statement) {
+ const result: SentimentResult = {
+ sentiment: item.sentiment || 'neutral',
+ confidence: item.confidence || 0.5,
+ signals: item.signals || [],
+ };
+ results.set(statement.id, result);
+ this.cache.set(statement.id, result.sentiment);
+ }
+ }
+ log.debug({
+ statementCount: statements.length,
+ resultsCount: results.size,
+ sentiments: Array.from(results.values()).map(r => r.sentiment),
+ }, 'LLM batch sentiment analysis completed');
+ return results;
+ }
+ } catch (error) {
+ log.warn({ error }, 'LLM batch sentiment analysis failed, falling back to pattern-based');
+ }
+
+ // Fallback: analyze each with pattern matching
+ for (const statement of statements) {
+ const result = this.analyze(statement.text);
+ results.set(statement.id, result);
+ this.cache.set(statement.id, result.sentiment);
+ }
+ return results;
+ }
+
+ /**
+ * Analyze sentiment using LLM for a single statement
+ */
+ async analyzeWithLLM(text: string): Promise<SentimentResult> {
+ const llm = getLLMService();
+
+ const prompt = `Analyze the sentiment of this participant statement in a meeting.
+Consider emotional tone, concerns, frustration, satisfaction level.
+Statements expressing distress, negativity, or complaints are NEGATIVE.
+
+Statement: "${text}"
+
+Respond with JSON:
+{
+ "sentiment": "positive" | "neutral" | "negative",
+ "confidence": 0.0-1.0,
+ "reasoning": "brief explanation",
+ "signals": ["key words or phrases"]
+}`;
+
+ try {
+ const response = await llm.completeJSON<{
+ sentiment: Sentiment;
+ confidence: number;
+ reasoning: string;
+ signals: string[];
+ }>(prompt, 'You are a sentiment analysis expert. Return valid JSON only.');
+
+ if (response.success && response.data) {
+ return {
+ sentiment: response.data.sentiment || 'neutral',
+ confidence: response.data.confidence || 0.5,
+ signals: response.data.signals || [],
+ };
+ }
+ } catch (error) {
+ log.warn({ error }, 'LLM sentiment analysis failed, using pattern-based');
+ }
+
+ // Fallback to pattern-based
+ return this.analyze(text);
+ }
+
+ /**
+ * Analyze a segment with caching
+ */
+ analyzeSegment(segment: TranscriptSegmentData): SentimentResult {
+ // Check cache
+ const cached = this.cache.get(segment.id);
+ if (cached) {
+ return { sentiment: cached, confidence: 0.8, signals: [] };
+ }
+
+ const result = this.analyze(segment.text);
+
+ // Cache result
+ this.cache.set(segment.id, result.sentiment);
+
+ return result;
+ }
+
+ /**
+ * Get sentiment trend from recent customer segments (LLM-driven)
+ * Uses batch LLM analysis for accurate sentiment detection
+ */
+ async getSentimentTrend(segments: TranscriptSegmentData[]): Promise<SentimentTrend> {
+ // Filter to other participant ("them") segments only
+ const themSegments = segments
+ .filter(s => s.isFinal && s.channel === 'them')
+ .slice(-15); // Last 15 customer statements
+
+ if (themSegments.length === 0) {
+ return {
+ current: 'neutral',
+ trend: 'stable',
+ history: [],
+ averageScore: 0,
+ };
+ }
+
+ // Find segments that need analysis (not in cache)
+ const uncachedSegments = themSegments.filter(s => !this.cache.has(s.id));
+
+ // Batch analyze uncached segments with LLM
+ if (uncachedSegments.length > 0) {
+ const statements = uncachedSegments.map(s => ({
+ id: s.id,
+ text: s.text,
+ time: s.startTime,
+ }));
+ await this.analyzeBatchWithLLM(statements);
+ }
+
+ // Build history from cache
+ const history: SentimentTrend['history'] = [];
+ let totalScore = 0;
+
+ for (const segment of themSegments) {
+ const cached = this.cache.get(segment.id);
+ const sentiment = cached || 'neutral';
+
+ history.push({
+ time: segment.startTime,
+ sentiment,
+ text: segment.text.substring(0, 100),
+ });
+
+ // Convert to score
+ if (sentiment === 'positive') totalScore += 1;
+ else if (sentiment === 'negative') totalScore -= 1;
+ }
+
+ const averageScore = totalScore / themSegments.length;
+
+ // Compare recent vs earlier
+ const recentCount = Math.min(5, history.length);
+ const recent = history.slice(-recentCount);
+ const earlier = history.slice(0, recentCount);
+
+ const recentScore = this.calculateAverageScore(recent.map(h => h.sentiment));
+ const earlierScore = this.calculateAverageScore(earlier.map(h => h.sentiment));
+
+ // Determine trend
+ let trend: SentimentTrend['trend'] = 'stable';
+ if (recentScore > earlierScore + 0.3) {
+ trend = 'improving';
+ } else if (recentScore < earlierScore - 0.3) {
+ trend = 'declining';
+ }
+
+ // Current sentiment is the most recent
+ const current = history.length > 0
+ ? history[history.length - 1].sentiment
+ : 'neutral';
+
+ return {
+ current,
+ trend,
+ history,
+ averageScore,
+ };
+ }
+
+ /**
+ * Calculate average sentiment score from sentiment values
+ */
+ private calculateAverageScore(sentiments: Sentiment[]): number {
+ if (sentiments.length === 0) return 0;
+
+ const scores: number[] = sentiments.map(s => {
+ if (s === 'positive') return 1;
+ if (s === 'negative') return -1;
+ return 0;
+ });
+
+ return scores.reduce((a, b) => a + b, 0) / scores.length;
+ }
+
+ /**
+ * Check if sentiment is concerning (needs attention)
+ */
+ isConcerning(trend: SentimentTrend): boolean {
+ return (
+ trend.current === 'negative' ||
+ trend.trend === 'declining' ||
+ trend.averageScore < -0.3
+ );
+ }
+
+ /**
+ * Get a human-readable summary
+ */
+ getSentimentSummary(trend: SentimentTrend): string {
+ if (trend.history.length === 0) {
+ return 'Not enough data';
+ }
+
+ const trendText = {
+ improving: 'improving',
+ stable: 'stable',
+ declining: 'declining',
+ }[trend.trend];
+
+ const currentText = {
+ positive: 'positive',
+ neutral: 'neutral',
+ negative: 'concerned',
+ }[trend.current];
+
+ return `Participant sentiment is ${currentText} and ${trendText}`;
+ }
+
+ /**
+ * Clear cache for a session
+ */
+ clear(): void {
+ this.cache.clear();
+ }
+}
+
+// Singleton Instance
+
+let instance: SentimentAnalyzerService | null = null;
+
+export function getSentimentAnalyzer(): SentimentAnalyzerService {
+ if (!instance) {
+ instance = new SentimentAnalyzerService();
+ }
+ return instance;
+}
+
+export function resetSentimentAnalyzer(): void {
+ instance = null;
+}
+
+export default SentimentAnalyzerService;
diff --git a/src/main/services/copilot/summary-generator.service.ts b/src/main/services/copilot/summary-generator.service.ts
new file mode 100644
index 0000000..45a12c8
--- /dev/null
+++ b/src/main/services/copilot/summary-generator.service.ts
@@ -0,0 +1,515 @@
+/**
+ * Summary Generator Service
+ *
+ * Fast extraction of key call outcomes using parallel LLM calls.
+ * Generates summary bullets, pain points, objections, commitments,
+ * and next steps with evidence linking to transcript timestamps.
+ */
+
+import { logger } from '../../lib/logger';
+import { getLLMService } from '../llm.service';
+import type { TranscriptSegmentData } from './transcript-buffer.service';
+import type { PlaybookSnapshot } from './playbook-tracker.service';
+import type { ConversationMetrics } from './conversation-metrics.service';
+
+const log = logger.child({ module: 'summary-generator' });
+
+// Types
+
+export interface Evidence {
+ segmentId: string;
+ timestamp: number;
+ excerpt: string;
+ channel: 'me' | 'them';
+}
+
+export interface ActionItem {
+ action: string;
+ owner: 'me' | 'them' | 'both';
+ deadline?: string;
+ priority: 'high' | 'medium' | 'low';
+ evidence: Evidence[];
+}
+
+export interface Objection {
+ type: string;
+ text: string;
+ response?: string;
+ resolved: boolean;
+ timestamp: number;
+}
+
+export interface Commitment {
+ who: 'me' | 'them';
+ commitment: string;
+ timestamp: number;
+ context?: string;
+}
+
+export interface CallSummary {
+ bullets: string[]; // 5-10 bullet summary
+ customerPain: string[]; // Pain points mentioned
+ customerGoals: string[]; // Goals/objectives mentioned
+ objections: Objection[];
+ commitments: Commitment[];
+ nextSteps: ActionItem[];
+ keyDecisions: string[];
+ riskFlags: string[];
+ generatedAt: number;
+}
+
+export interface FullCallReport {
+ summary: CallSummary;
+ playbook?: PlaybookSnapshot;
+ metrics?: ConversationMetrics;
+ callDuration: number;
+ segmentCount: number;
+}
+
+// Summary Generator Service
+
+export class SummaryGeneratorService {
+ constructor() {}
+
+ /**
+ * Generate full call summary using parallel extraction
+ */
+ async generate(segments: TranscriptSegmentData[]): Promise<CallSummary> {
+ const finalSegments = segments.filter(s => s.isFinal);
+
+ if (finalSegments.length === 0) {
+ return this.emptyResults();
+ }
+
+ log.info({ segmentCount: finalSegments.length }, 'Generating call summary');
+
+ // Run extractions in parallel for speed with error handling
+ let bullets: string[] = [];
+ let painAndGoals: { pain: string[]; goals: string[] } = { pain: [], goals: [] };
+ let objections: Objection[] = [];
+ let commitments: Commitment[] = [];
+ let nextSteps: ActionItem[] = [];
+ let decisions: string[] = [];
+
+ try {
+ const results = await Promise.allSettled([
+ this.extractBullets(finalSegments),
+ this.extractPainAndGoals(finalSegments),
+ this.extractObjections(finalSegments),
+ this.extractCommitments(finalSegments),
+ this.extractNextSteps(finalSegments),
+ this.extractDecisions(finalSegments),
+ ]);
+
+ // Process results, using defaults for any that failed
+ bullets = results[0].status === 'fulfilled' ? results[0].value : [];
+ painAndGoals = results[1].status === 'fulfilled' ? results[1].value : { pain: [], goals: [] };
+ objections = results[2].status === 'fulfilled' ? results[2].value : [];
+ commitments = results[3].status === 'fulfilled' ? results[3].value : [];
+ nextSteps = results[4].status === 'fulfilled' ? results[4].value : [];
+ decisions = results[5].status === 'fulfilled' ? results[5].value : [];
+
+ // Log any failures
+ const failures = results.filter(r => r.status === 'rejected');
+ if (failures.length > 0) {
+ log.warn({
+ failedCount: failures.length,
+ errors: failures.map((f, i) => ({
+ index: i,
+ reason: f.status === 'rejected' ? f.reason?.message || f.reason : 'unknown'
+ }))
+ }, 'Some summary extractions failed');
+ }
+
+ log.info({
+ bullets: bullets.length,
+ painPoints: painAndGoals.pain.length,
+ goals: painAndGoals.goals.length,
+ objections: objections.length,
+ commitments: commitments.length,
+ nextSteps: nextSteps.length,
+ decisions: decisions.length,
+ }, 'Summary extraction complete');
+ } catch (error) {
+ log.error({ error }, 'Summary generation failed completely');
+ }
+
+ // Extract risk flags from various sources
+ const riskFlags = this.identifyRisks(objections, painAndGoals.pain, commitments);
+
+ return {
+ bullets,
+ customerPain: painAndGoals.pain,
+ customerGoals: painAndGoals.goals,
+ objections,
+ commitments,
+ nextSteps,
+ keyDecisions: decisions,
+ riskFlags,
+ generatedAt: Date.now(),
+ };
+ }
+
+ /**
+ * Generate quick summary (faster, less detailed)
+ */
+ async generateQuick(segments: TranscriptSegmentData[]): Promise<Partial<CallSummary>> {
+ const finalSegments = segments.filter(s => s.isFinal);
+
+ if (finalSegments.length === 0) {
+ return { bullets: [], nextSteps: [] };
+ }
+
+ // Just extract bullets and next steps
+ const [bullets, nextSteps] = await Promise.all([
+ this.extractBullets(finalSegments),
+ this.extractNextSteps(finalSegments),
+ ]);
+
+ return {
+ bullets,
+ nextSteps,
+ generatedAt: Date.now(),
+ };
+ }
+
+ /**
+ * Extract summary bullets
+ */
+ private async extractBullets(segments: TranscriptSegmentData[]): Promise<string[]> {
+ const transcript = this.formatTranscript(segments);
+ const llm = getLLMService();
+
+ const prompt = `Summarize this meeting in 5-8 concise bullet points.
+Focus on: what was discussed, key decisions, main concerns, and outcomes.
+
+${transcript}
+
+Respond with JSON:
+{
+ "bullets": ["bullet 1", "bullet 2", ...]
+}`;
+
+ try {
+ const response = await llm.completeJSON<{ bullets: string[] }>(
+ prompt,
+ 'You are a meeting summarization expert. Return valid JSON only.'
+ );
+
+ if (response.success && response.data) {
+ return response.data.bullets || [];
+ }
+ } catch (error) {
+ log.warn({ error }, 'Bullet extraction failed');
+ }
+
+ return [];
+ }
+
+ /**
+ * Extract pain points and goals
+ */
+ private async extractPainAndGoals(
+ segments: TranscriptSegmentData[]
+ ): Promise<{ pain: string[]; goals: string[] }> {
+ // Focus on customer statements
+ const themSegments = segments.filter(s => s.channel === 'them');
+ const transcript = this.formatTranscript(themSegments);
+ const llm = getLLMService();
+
+ const prompt = `Extract the participant's pain points and goals from this meeting.
+
+Customer statements:
+${transcript}
+
+Respond with JSON:
+{
+ "pain_points": ["pain 1", "pain 2"],
+ "goals": ["goal 1", "goal 2"]
+}`;
+
+ try {
+ const response = await llm.completeJSON<{
+ pain_points: string[];
+ goals: string[];
+ }>(prompt, 'You are a meeting analysis expert. Return valid JSON only.');
+
+ if (response.success && response.data) {
+ return {
+ pain: response.data.pain_points || [],
+ goals: response.data.goals || [],
+ };
+ }
+ } catch (error) {
+ log.warn({ error }, 'Pain/goals extraction failed');
+ }
+
+ return { pain: [], goals: [] };
+ }
+
+ /**
+ * Extract objections and responses
+ */
+ private async extractObjections(segments: TranscriptSegmentData[]): Promise<Objection[]> {
+ const transcript = this.formatFullTranscript(segments);
+ const llm = getLLMService();
+
+ const prompt = `Extract objections or concerns raised and how they were addressed.
+
+${transcript}
+
+Respond with JSON:
+{
+ "objections": [
+ {
+ "type": "pricing|timing|competitor|authority|other",
+ "text": "what customer said",
+ "response": "how rep responded (if captured)",
+ "resolved": true/false,
+ "timestamp": seconds from start
+ }
+ ]
+}`;
+
+ try {
+ const response = await llm.completeJSON<{
+ objections: Array<{
+ type: string;
+ text: string;
+ response?: string;
+ resolved: boolean;
+ timestamp: number;
+ }>;
+ }>(prompt, 'You are a meeting objection analysis expert. Return valid JSON only.');
+
+ if (response.success && response.data) {
+ return response.data.objections || [];
+ }
+ } catch (error) {
+ log.warn({ error }, 'Objection extraction failed');
+ }
+
+ return [];
+ }
+
+ /**
+ * Extract commitments
+ */
+ private async extractCommitments(segments: TranscriptSegmentData[]): Promise<Commitment[]> {
+ const transcript = this.formatFullTranscript(segments);
+ const llm = getLLMService();
+
+ const prompt = `Extract commitments or promises made by either party in this meeting.
+Look for statements like "I will...", "We'll send...", "Let me...", "I promise...".
+
+${transcript}
+
+Respond with JSON:
+{
+ "commitments": [
+ {
+ "who": "me" | "them",
+ "commitment": "what was committed to",
+ "timestamp": seconds from start,
+ "context": "surrounding context"
+ }
+ ]
+}`;
+
+ try {
+ const response = await llm.completeJSON<{
+ commitments: Array<{
+ who: 'me' | 'them';
+ commitment: string;
+ timestamp: number;
+ context?: string;
+ }>;
+ }>(prompt, 'You are a meeting commitment tracking expert. Return valid JSON only.');
+
+ if (response.success && response.data) {
+ return response.data.commitments || [];
+ }
+ } catch (error) {
+ log.warn({ error }, 'Commitment extraction failed');
+ }
+
+ return [];
+ }
+
+ /**
+ * Extract next steps and action items
+ */
+ private async extractNextSteps(segments: TranscriptSegmentData[]): Promise<ActionItem[]> {
+ // Focus on last 30% of call for next steps
+ const endSegments = segments.slice(-Math.max(10, Math.floor(segments.length * 0.3)));
+ const transcript = this.formatFullTranscript(endSegments);
+ const llm = getLLMService();
+
+ const prompt = `Extract action items and next steps from the end of this meeting.
+
+${transcript}
+
+Respond with JSON:
+{
+ "action_items": [
+ {
+ "action": "what needs to be done",
+ "owner": "me" | "them" | "both",
+ "deadline": "when (if mentioned)" | null,
+ "priority": "high" | "medium" | "low"
+ }
+ ]
+}`;
+
+ try {
+ const response = await llm.completeJSON<{
+ action_items: Array<{
+ action: string;
+ owner: 'me' | 'them' | 'both';
+ deadline?: string;
+ priority: 'high' | 'medium' | 'low';
+ }>;
+ }>(prompt, 'You are a meeting action item expert. Return valid JSON only.');
+
+ if (response.success && response.data) {
+ return (response.data.action_items || []).map(item => ({
+ ...item,
+ evidence: [],
+ }));
+ }
+ } catch (error) {
+ log.warn({ error }, 'Next steps extraction failed');
+ }
+
+ return [];
+ }
+
+ /**
+ * Extract key decisions
+ */
+ private async extractDecisions(segments: TranscriptSegmentData[]): Promise<string[]> {
+ const transcript = this.formatTranscript(segments);
+ const llm = getLLMService();
+
+ const prompt = `Extract key decisions made during this meeting.
+Look for agreements, choices made, or conclusions reached.
+
+${transcript}
+
+Respond with JSON:
+{
+ "decisions": ["decision 1", "decision 2"]
+}`;
+
+ try {
+ const response = await llm.completeJSON<{ decisions: string[] }>(
+ prompt,
+ 'You are a meeting analysis expert. Return valid JSON only.'
+ );
+
+ if (response.success && response.data) {
+ return response.data.decisions || [];
+ }
+ } catch (error) {
+ log.warn({ error }, 'Decision extraction failed');
+ }
+
+ return [];
+ }
+
+ /**
+ * Identify risk flags from extracted data
+ */
+ private identifyRisks(
+ objections: Objection[],
+ painPoints: string[],
+ commitments: Commitment[]
+ ): string[] {
+ const risks: string[] = [];
+
+ // Unresolved objections
+ const unresolvedObjections = objections.filter(o => !o.resolved);
+ if (unresolvedObjections.length > 0) {
+ risks.push(`${unresolvedObjections.length} unresolved objection(s)`);
+ }
+
+ // Authority objection (decision maker not identified)
+ if (objections.some(o => o.type === 'authority')) {
+ risks.push('Decision maker may not be identified');
+ }
+
+ // No pain points identified
+ if (painPoints.length === 0) {
+ risks.push('Pain points not clearly identified');
+ }
+
+ // No commitments from other participant
+ const theirCommitments = commitments.filter(c => c.who === 'them');
+ if (theirCommitments.length === 0) {
+ risks.push('No commitments from other participant');
+ }
+
+ return risks;
+ }
+
+ /**
+ * Format transcript as simple text
+ */
+ private formatTranscript(segments: TranscriptSegmentData[]): string {
+ return segments
+ .map(s => `[${s.channel.toUpperCase()}] ${s.text}`)
+ .join('\n');
+ }
+
+ /**
+ * Format transcript with timestamps
+ */
+ private formatFullTranscript(segments: TranscriptSegmentData[]): string {
+ return segments
+ .map(s => `[${s.channel.toUpperCase()} @ ${this.formatTime(s.startTime)}] ${s.text}`)
+ .join('\n');
+ }
+
+ /**
+ * Format time as MM:SS
+ */
+ private formatTime(seconds: number): string {
+ const mins = Math.floor(seconds / 60);
+ const secs = Math.floor(seconds % 60);
+ return `${mins}:${secs.toString().padStart(2, '0')}`;
+ }
+
+ /**
+ * Return empty results
+ */
+ private emptyResults(): CallSummary {
+ return {
+ bullets: [],
+ customerPain: [],
+ customerGoals: [],
+ objections: [],
+ commitments: [],
+ nextSteps: [],
+ keyDecisions: [],
+ riskFlags: [],
+ generatedAt: Date.now(),
+ };
+ }
+}
+
+// Singleton Instance
+
+let instance: SummaryGeneratorService | null = null;
+
+export function getSummaryGenerator(): SummaryGeneratorService {
+ if (!instance) {
+ instance = new SummaryGeneratorService();
+ }
+ return instance;
+}
+
+export function resetSummaryGenerator(): void {
+ instance = null;
+}
+
+export default SummaryGeneratorService;
diff --git a/src/main/services/copilot/transcript-buffer.service.ts b/src/main/services/copilot/transcript-buffer.service.ts
new file mode 100644
index 0000000..c66d6c0
--- /dev/null
+++ b/src/main/services/copilot/transcript-buffer.service.ts
@@ -0,0 +1,270 @@
+/**
+ * Transcript Buffer Service
+ *
+ * Maintains a rolling window of recent transcript segments for real-time
+ * agent processing while persisting full history to database.
+ */
+
+import { EventEmitter } from 'events';
+import { v4 as uuid } from 'uuid';
+import { logger } from '../../lib/logger';
+import {
+ createTranscriptSegment,
+ getRecentTranscriptSegments,
+} from '../../db';
+import type { TranscriptSegment, NewTranscriptSegment } from '../../db/schema';
+
+const log = logger.child({ module: 'transcript-buffer' });
+
+export interface RawTranscriptData {
+ text: string;
+ is_final: boolean;
+ start: number; // epoch seconds
+ end: number; // epoch seconds
+}
+
+export interface TranscriptSegmentData {
+ id: string;
+ recordingId: number;
+ sessionId: string;
+ channel: 'me' | 'them';
+ text: string;
+ startTime: number; // seconds from call start
+ endTime: number;
+ isFinal: boolean;
+ processedByAgent: boolean;
+ sentiment?: 'positive' | 'neutral' | 'negative';
+ triggers?: string[];
+}
+
+export interface TranscriptBufferEvents {
+ 'segment-added': (segment: TranscriptSegmentData) => void;
+ 'segment-ready': (segment: TranscriptSegmentData) => void;
+}
+
+export class TranscriptBufferService extends EventEmitter {
+ private segments: Map<string, TranscriptSegmentData[]> = new Map();
+ private callStartTimes: Map<string, number> = new Map();
+ private readonly MAX_ACTIVE_WINDOW = 100;
+ private readonly MAX_MEMORY_SEGMENTS = 200;
+
+ constructor() {
+ super();
+ }
+
+ startCall(sessionId: string, recordingId: number): void {
+ this.segments.set(sessionId, []);
+ this.callStartTimes.set(sessionId, Date.now() / 1000);
+ log.info({ sessionId, recordingId }, 'Started tracking call');
+ }
+
+ getCallStartTime(sessionId: string): number {
+ return this.callStartTimes.get(sessionId) || Date.now() / 1000;
+ }
+
+ async addRawSegment(
+ sessionId: string,
+ recordingId: number,
+ channel: 'me' | 'them',
+ rawData: RawTranscriptData
+ ): Promise<TranscriptSegmentData | null> {
+ if (!this.segments.has(sessionId)) {
+ this.startCall(sessionId, recordingId);
+ }
+
+ const callStart = this.getCallStartTime(sessionId);
+
+ const startTime = rawData.start - callStart;
+ const endTime = rawData.end - callStart;
+
+ const segment: TranscriptSegmentData = {
+ id: uuid(),
+ recordingId,
+ sessionId,
+ channel,
+ text: rawData.text,
+ startTime: Math.max(0, startTime), // Ensure non-negative
+ endTime: Math.max(0, endTime),
+ isFinal: rawData.is_final,
+ processedByAgent: false,
+ };
+
+ // Add to in-memory buffer
+ const callSegments = this.segments.get(sessionId)!;
+ callSegments.push(segment);
+
+ // Persist final segments to database
+ if (segment.isFinal) {
+ try {
+ const dbSegment: NewTranscriptSegment = {
+ id: segment.id,
+ recordingId: segment.recordingId,
+ sessionId: segment.sessionId,
+ channel: segment.channel,
+ text: segment.text,
+ startTime: segment.startTime,
+ endTime: segment.endTime,
+ isFinal: segment.isFinal,
+ processedByAgent: false,
+ };
+ createTranscriptSegment(dbSegment);
+ } catch (error) {
+ log.error({ error, segment }, 'Failed to persist transcript segment');
+ }
+
+ // Emit event for agent processing
+ this.emit('segment-ready', segment);
+ }
+
+ this.emit('segment-added', segment);
+
+ // Memory management - trim old non-final segments
+ this.trimBuffer(sessionId);
+
+ return segment;
+ }
+
+ /**
+ * Add a pre-constructed segment
+ */
+ addSegment(segment: TranscriptSegmentData): void {
+ if (!this.segments.has(segment.sessionId)) {
+ this.segments.set(segment.sessionId, []);
+ }
+
+ const callSegments = this.segments.get(segment.sessionId)!;
+ callSegments.push(segment);
+
+ this.emit('segment-added', segment);
+
+ if (segment.isFinal && !segment.processedByAgent) {
+ this.emit('segment-ready', segment);
+ }
+
+ this.trimBuffer(segment.sessionId);
+ }
+
+ /**
+ * Get the active window of recent segments
+ */
+ getActiveWindow(sessionId: string): TranscriptSegmentData[] {
+ const segments = this.segments.get(sessionId) || [];
+ return segments.slice(-this.MAX_ACTIVE_WINDOW);
+ }
+
+ /**
+ * Get only final segments from active window
+ */
+ getFinalSegments(sessionId: string): TranscriptSegmentData[] {
+ const segments = this.segments.get(sessionId) || [];
+ return segments.filter(s => s.isFinal).slice(-this.MAX_ACTIVE_WINDOW);
+ }
+
+ /**
+ * Get recent final segments by channel
+ */
+ getSegmentsByChannel(sessionId: string, channel: 'me' | 'them', limit: number = 20): TranscriptSegmentData[] {
+ const segments = this.segments.get(sessionId) || [];
+ return segments
+ .filter(s => s.isFinal && s.channel === channel)
+ .slice(-limit);
+ }
+
+ /**
+ * Get the full transcript as formatted text
+ */
+ getFullTranscript(sessionId: string): string {
+ const segments = this.getFinalSegments(sessionId);
+ return segments.map(s => `[${s.channel.toUpperCase()}] ${s.text}`).join('\n');
+ }
+
+ /**
+ * Get recent context as formatted text
+ */
+ getRecentContext(sessionId: string, windowSize: number = 10): string {
+ const segments = this.getFinalSegments(sessionId).slice(-windowSize);
+ return segments
+ .map(s => `[${s.channel.toUpperCase()} @ ${s.startTime.toFixed(1)}s] ${s.text}`)
+ .join('\n');
+ }
+
+ /**
+ * Get transcript duration based on segments
+ */
+ getDuration(sessionId: string): number {
+ const segments = this.segments.get(sessionId) || [];
+ if (segments.length === 0) return 0;
+
+ const lastSegment = segments[segments.length - 1];
+ return lastSegment.endTime;
+ }
+
+ /**
+ * Mark a segment as processed by agent
+ */
+ markProcessed(segmentId: string, sessionId: string): void {
+ const segments = this.segments.get(sessionId) || [];
+ const segment = segments.find(s => s.id === segmentId);
+ if (segment) {
+ segment.processedByAgent = true;
+ }
+ }
+
+ /**
+ * Update segment with analysis results
+ */
+ updateSegment(segmentId: string, sessionId: string, updates: Partial<TranscriptSegmentData>): void {
+ const segments = this.segments.get(sessionId) || [];
+ const segment = segments.find(s => s.id === segmentId);
+ if (segment) {
+ Object.assign(segment, updates);
+ }
+ }
+
+ /**
+ * Trim buffer to prevent memory issues
+ */
+ private trimBuffer(sessionId: string): void {
+ const segments = this.segments.get(sessionId);
+ if (!segments) return;
+
+ if (segments.length > this.MAX_MEMORY_SEGMENTS) {
+ // Keep only recent segments in memory (older ones are in DB)
+ const trimCount = segments.length - this.MAX_ACTIVE_WINDOW;
+ segments.splice(0, trimCount);
+ }
+ }
+
+ /**
+ * Clear all data for a session
+ */
+ clear(sessionId: string): void {
+ this.segments.delete(sessionId);
+ this.callStartTimes.delete(sessionId);
+ log.info({ sessionId }, 'Cleared transcript buffer');
+ }
+
+ /**
+ * Get all sessions being tracked
+ */
+ getSessions(): string[] {
+ return Array.from(this.segments.keys());
+ }
+}
+
+// Singleton Instance
+
+let instance: TranscriptBufferService | null = null;
+
+export function getTranscriptBuffer(): TranscriptBufferService {
+ if (!instance) {
+ instance = new TranscriptBufferService();
+ }
+ return instance;
+}
+
+export function resetTranscriptBuffer(): void {
+ instance = null;
+}
+
+export default TranscriptBufferService;
diff --git a/src/main/services/insights.service.ts b/src/main/services/insights.service.ts
new file mode 100644
index 0000000..38fe4ae
--- /dev/null
+++ b/src/main/services/insights.service.ts
@@ -0,0 +1,115 @@
+import { createVideoDBService } from './videodb.service';
+import { updateRecording, getRecordingById } from '../db';
+import { createChildLogger } from '../lib/logger';
+
+const logger = createChildLogger('insights-service');
+
+export interface InsightsResult {
+ success: boolean;
+ insights?: string;
+ error?: string;
+}
+
+export class InsightsService {
+ private apiKey: string;
+ private baseUrl?: string;
+
+ constructor(apiKey: string, baseUrl?: string) {
+ this.apiKey = apiKey;
+ this.baseUrl = baseUrl;
+ }
+
+ async processRecording(
+ recordingId: number,
+ videoId: string
+ ): Promise<InsightsResult> {
+ const videodbService = createVideoDBService(this.apiKey, this.baseUrl);
+
+ try {
+ // Mark as processing
+ updateRecording(recordingId, { insightsStatus: 'processing' });
+ logger.info({ recordingId, videoId }, 'Starting insights processing');
+
+ // Index the video for spoken words (like Python version)
+ logger.info({ videoId }, 'Indexing video for spoken words');
+ const indexSuccess = await this.safeIndexVideo(videodbService, videoId);
+
+ if (!indexSuccess) {
+ updateRecording(recordingId, { insightsStatus: 'failed' });
+ logger.warn({ recordingId, videoId }, 'Failed to index video');
+ return {
+ success: false,
+ error: 'Failed to index video',
+ };
+ }
+
+ logger.info({ videoId }, 'Video indexed successfully');
+
+ // Generate insights (videodb.service now handles transcript fetching and prompt construction)
+ logger.info({ recordingId, videoId }, 'Starting insight generation');
+ const insights = await videodbService.generateInsights(videoId);
+
+ if (insights && insights.length > 0) {
+ // Update recording with insights
+ updateRecording(recordingId, {
+ insights,
+ insightsStatus: 'ready',
+ });
+ logger.info({ recordingId, videoId }, 'Generated insights successfully');
+ } else {
+ // No insights (likely no transcript), but indexing succeeded
+ updateRecording(recordingId, { insightsStatus: 'ready' });
+ logger.info({ recordingId, videoId }, 'Video indexed but no insights generated (no transcript or empty)');
+ }
+
+ logger.info({ recordingId, videoId }, 'Insights processing completed');
+
+ return {
+ success: true,
+ insights: insights || undefined,
+ };
+ } catch (error) {
+ logger.error({ error, recordingId, videoId }, 'Insights processing failed');
+
+ updateRecording(recordingId, { insightsStatus: 'failed' });
+
+ return {
+ success: false,
+ error: error instanceof Error ? error.message : 'Unknown error',
+ };
+ }
+ }
+
+ private async safeIndexVideo(videodbService: ReturnType<typeof createVideoDBService>, videoId: string): Promise<boolean> {
+ try {
+ await videodbService.indexVideo(videoId);
+ return true;
+ } catch (error) {
+ logger.error({ error, videoId }, 'Failed to index video');
+ return false;
+ }
+ }
+
+ async retryProcessing(recordingId: number): Promise<InsightsResult> {
+ const recording = getRecordingById(recordingId);
+ if (!recording) {
+ return {
+ success: false,
+ error: 'Recording not found',
+ };
+ }
+
+ if (!recording.videoId) {
+ return {
+ success: false,
+ error: 'Recording has no video ID',
+ };
+ }
+
+ return this.processRecording(recordingId, recording.videoId);
+ }
+}
+
+export function createInsightsService(apiKey: string, baseUrl?: string): InsightsService {
+ return new InsightsService(apiKey, baseUrl);
+}
diff --git a/src/main/services/llm.service.ts b/src/main/services/llm.service.ts
new file mode 100644
index 0000000..d91a3e4
--- /dev/null
+++ b/src/main/services/llm.service.ts
@@ -0,0 +1,484 @@
+/**
+ * LLM Service - VideoDB Proxy
+ *
+ * Provides LLM capabilities through VideoDB's OpenAI-compatible API proxy.
+ * Uses the OpenAI SDK for cleaner API interactions.
+ */
+
+import OpenAI from 'openai';
+import type {
+ ChatCompletionMessageParam,
+ ChatCompletionTool,
+ ChatCompletionToolMessageParam,
+ ChatCompletionAssistantMessageParam,
+} from 'openai/resources/chat/completions';
+import { logger } from '../lib/logger';
+import { loadAppConfig, loadRuntimeConfig } from '../lib/config';
+
+const log = logger.child({ module: 'llm-service' });
+
+export interface LLMConfig {
+ apiKey: string;
+ apiBase: string;
+ model: string;
+ maxTokens: number;
+ temperature: number;
+}
+
+export interface ChatMessage {
+ role: 'system' | 'user' | 'assistant' | 'tool';
+ content: string | null;
+ tool_calls?: ToolCall[];
+ tool_call_id?: string;
+}
+
+export interface ToolCall {
+ id: string;
+ type: 'function';
+ function: {
+ name: string;
+ arguments: string;
+ };
+}
+
+export interface Tool {
+ type: 'function';
+ function: {
+ name: string;
+ description: string;
+ parameters: {
+ type: 'object';
+ properties: Record<string, {
+ type: string;
+ description?: string;
+ enum?: string[];
+ }>;
+ required?: string[];
+ };
+ };
+}
+
+export interface ToolCallResponse {
+ content: string | null;
+ tool_calls: ToolCall[] | null;
+ success: boolean;
+ error?: string;
+ finishReason?: string;
+}
+
+export interface LLMResponse {
+ content: string;
+ success: boolean;
+ error?: string;
+ usage?: {
+ promptTokens: number;
+ completionTokens: number;
+ totalTokens: number;
+ };
+}
+
+export interface JSONLLMResponse<T = unknown> {
+ data: T | null;
+ success: boolean;
+ error?: string;
+ raw?: string;
+}
+
+export class LLMService {
+ private config: LLMConfig;
+ private client: OpenAI;
+ private static instance: LLMService | null = null;
+
+ constructor(config?: Partial<LLMConfig>) {
+ const appConfig = loadAppConfig();
+ const runtimeConfig = loadRuntimeConfig();
+
+ this.config = {
+ apiKey: config?.apiKey || appConfig.apiKey || '',
+ apiBase: config?.apiBase || runtimeConfig.apiUrl || 'https://api.videodb.io',
+ model: config?.model || 'ultra',
+ maxTokens: config?.maxTokens || 4096,
+ temperature: config?.temperature || 0.7,
+ };
+
+ // Initialize OpenAI client with VideoDB proxy base URL
+ this.client = new OpenAI({
+ apiKey: this.config.apiKey,
+ baseURL: this.config.apiBase,
+ });
+
+ log.info({
+ apiBase: this.config.apiBase,
+ model: this.config.model,
+ }, 'LLM Service initialized with OpenAI SDK');
+ }
+
+ static getInstance(config?: Partial<LLMConfig>): LLMService {
+ if (!LLMService.instance) {
+ LLMService.instance = new LLMService(config);
+ }
+ return LLMService.instance;
+ }
+
+ static resetInstance(): void {
+ LLMService.instance = null;
+ }
+
+ setApiKey(apiKey: string): void {
+ this.config.apiKey = apiKey;
+ // Reinitialize client with new API key
+ this.client = new OpenAI({
+ apiKey: this.config.apiKey,
+ baseURL: this.config.apiBase,
+ });
+ }
+
+ /**
+ * Convert our ChatMessage format to OpenAI's format
+ */
+ private formatMessages(messages: ChatMessage[]): ChatCompletionMessageParam[] {
+ return messages.map((msg): ChatCompletionMessageParam => {
+ if (msg.role === 'tool') {
+ return {
+ role: 'tool',
+ content: msg.content || '',
+ tool_call_id: msg.tool_call_id || '',
+ } as ChatCompletionToolMessageParam;
+ }
+
+ if (msg.role === 'assistant' && msg.tool_calls) {
+ return {
+ role: 'assistant',
+ content: msg.content,
+ tool_calls: msg.tool_calls.map(tc => ({
+ id: tc.id,
+ type: 'function' as const,
+ function: {
+ name: tc.function.name,
+ arguments: tc.function.arguments,
+ },
+ })),
+ } as ChatCompletionAssistantMessageParam;
+ }
+
+ return {
+ role: msg.role as 'system' | 'user' | 'assistant',
+ content: msg.content || '',
+ };
+ });
+ }
+
+ /**
+ * Convert our Tool format to OpenAI's format
+ */
+ private formatTools(tools: Tool[]): ChatCompletionTool[] {
+ return tools.map((tool): ChatCompletionTool => ({
+ type: 'function',
+ function: {
+ name: tool.function.name,
+ description: tool.function.description,
+ parameters: tool.function.parameters as Record<string, unknown>,
+ },
+ }));
+ }
+
+ async chatCompletion(messages: ChatMessage[]): Promise<LLMResponse> {
+ if (!this.config.apiKey) {
+ log.error('LLM API key not configured');
+ return {
+ content: '',
+ success: false,
+ error: 'API key not configured',
+ };
+ }
+
+ const startTime = Date.now();
+ const messagePreview = messages[messages.length - 1]?.content?.slice(0, 100) || '';
+ log.info({
+ apiBase: this.config.apiBase,
+ model: this.config.model,
+ messageCount: messages.length,
+ messagePreview,
+ }, 'LLM request starting');
+
+ try {
+ const response = await this.client.chat.completions.create({
+ model: this.config.model,
+ messages: this.formatMessages(messages),
+ max_tokens: this.config.maxTokens,
+ temperature: this.config.temperature,
+ });
+
+ const elapsed = Date.now() - startTime;
+ const content = response.choices[0]?.message?.content || '';
+ const usage = response.usage;
+
+ log.info({
+ elapsedMs: elapsed,
+ contentLength: content.length,
+ promptTokens: usage?.prompt_tokens,
+ completionTokens: usage?.completion_tokens,
+ totalTokens: usage?.total_tokens,
+ finishReason: response.choices[0]?.finish_reason,
+ }, 'LLM request completed');
+
+ return {
+ content,
+ success: true,
+ usage: usage ? {
+ promptTokens: usage.prompt_tokens || 0,
+ completionTokens: usage.completion_tokens || 0,
+ totalTokens: usage.total_tokens || 0,
+ } : undefined,
+ };
+ } catch (error) {
+ const elapsed = Date.now() - startTime;
+ const errMsg = error instanceof Error ? error.message : 'Unknown error';
+
+ // OpenAI SDK provides structured errors
+ if (error instanceof OpenAI.APIError) {
+ log.error({
+ status: error.status,
+ code: error.code,
+ type: error.type,
+ message: error.message,
+ elapsedMs: elapsed,
+ }, 'LLM API error');
+ return {
+ content: '',
+ success: false,
+ error: `API error ${error.status}: ${error.message}`,
+ };
+ }
+
+ log.error({ err: error, errorMessage: errMsg, elapsedMs: elapsed }, 'LLM request error');
+ return {
+ content: '',
+ success: false,
+ error: errMsg,
+ };
+ }
+ }
+
+ async chatCompletionJSON<T = unknown>(
+ messages: ChatMessage[],
+ parseResponse?: (content: string) => T
+ ): Promise<JSONLLMResponse<T>> {
+ const response = await this.chatCompletion(messages);
+
+ if (!response.success) {
+ return {
+ data: null,
+ success: false,
+ error: response.error,
+ raw: response.content,
+ };
+ }
+
+ try {
+ let jsonString = response.content.trim();
+
+ // Strip markdown code blocks if present
+ const jsonMatch = jsonString.match(/```(?:json)?\s*([\s\S]*?)```/);
+ if (jsonMatch) {
+ jsonString = jsonMatch[1].trim();
+ }
+
+ const data = parseResponse
+ ? parseResponse(jsonString)
+ : JSON.parse(jsonString) as T;
+
+ return {
+ data,
+ success: true,
+ raw: response.content,
+ };
+ } catch (parseError) {
+ log.warn({ error: parseError, content: response.content }, 'Failed to parse JSON response');
+ return {
+ data: null,
+ success: false,
+ error: 'Failed to parse JSON response',
+ raw: response.content,
+ };
+ }
+ }
+
+ /**
+ * Chat completion with tool calling support
+ */
+ async chatCompletionWithTools(
+ messages: ChatMessage[],
+ tools: Tool[]
+ ): Promise<ToolCallResponse> {
+ if (!this.config.apiKey) {
+ log.error('LLM API key not configured');
+ return {
+ content: null,
+ tool_calls: null,
+ success: false,
+ error: 'API key not configured',
+ };
+ }
+
+ const startTime = Date.now();
+ log.info({
+ apiBase: this.config.apiBase,
+ model: this.config.model,
+ toolCount: tools.length,
+ toolNames: tools.map(t => t.function.name),
+ messageCount: messages.length,
+ messageRoles: messages.map(m => m.role),
+ }, 'LLM tool call request starting');
+
+ // Debug: Log the full request payload
+ log.debug({
+ messages: messages.map(m => ({
+ role: m.role,
+ contentPreview: typeof m.content === 'string' ? m.content.slice(0, 200) : m.content,
+ hasToolCalls: !!m.tool_calls,
+ toolCallId: m.tool_call_id,
+ })),
+ tools: tools.map(t => ({
+ name: t.function.name,
+ description: t.function.description?.slice(0, 100),
+ paramKeys: Object.keys(t.function.parameters.properties || {}),
+ })),
+ }, 'LLM tool call request payload');
+
+ try {
+ const formattedMessages = this.formatMessages(messages);
+ const formattedTools = tools.length > 0 ? this.formatTools(tools) : undefined;
+
+ const response = await this.client.chat.completions.create({
+ model: this.config.model,
+ messages: formattedMessages,
+ tools: formattedTools,
+ tool_choice: formattedTools ? 'auto' : undefined,
+ max_tokens: this.config.maxTokens,
+ temperature: this.config.temperature,
+ });
+
+ const elapsed = Date.now() - startTime;
+ const message = response.choices[0]?.message;
+ const finishReason = response.choices[0]?.finish_reason;
+
+ // Convert OpenAI tool_calls to our format (filter for function type only)
+ const toolCalls: ToolCall[] | null = message?.tool_calls
+ ? message.tool_calls
+ .filter((tc): tc is typeof tc & { type: 'function'; function: { name: string; arguments: string } } =>
+ tc.type === 'function' && 'function' in tc
+ )
+ .map(tc => ({
+ id: tc.id,
+ type: 'function' as const,
+ function: {
+ name: tc.function.name,
+ arguments: tc.function.arguments,
+ },
+ }))
+ : null;
+
+ log.info({
+ elapsedMs: elapsed,
+ hasContent: !!message?.content,
+ contentPreview: message?.content?.slice(0, 100),
+ toolCallCount: toolCalls?.length || 0,
+ toolCallNames: toolCalls?.map(tc => tc.function.name),
+ finishReason,
+ promptTokens: response.usage?.prompt_tokens,
+ completionTokens: response.usage?.completion_tokens,
+ }, 'LLM tool call request completed');
+
+ return {
+ content: message?.content || null,
+ tool_calls: toolCalls,
+ success: true,
+ finishReason: finishReason || undefined,
+ };
+ } catch (error) {
+ const elapsed = Date.now() - startTime;
+
+ // OpenAI SDK provides structured errors
+ if (error instanceof OpenAI.APIError) {
+ log.error({
+ status: error.status,
+ code: error.code,
+ type: error.type,
+ message: error.message,
+ elapsedMs: elapsed,
+ }, 'LLM tool call API error');
+ return {
+ content: null,
+ tool_calls: null,
+ success: false,
+ error: `API error ${error.status}: ${error.message}`,
+ };
+ }
+
+ const errMsg = error instanceof Error ? error.message : 'Unknown error';
+ log.error({ err: error, errorMessage: errMsg, elapsedMs: elapsed }, 'LLM tool call request error');
+ return {
+ content: null,
+ tool_calls: null,
+ success: false,
+ error: errMsg,
+ };
+ }
+ }
+
+ async complete(prompt: string, systemPrompt?: string): Promise<LLMResponse> {
+ const messages: ChatMessage[] = [];
+
+ if (systemPrompt) {
+ messages.push({ role: 'system', content: systemPrompt });
+ }
+
+ messages.push({ role: 'user', content: prompt });
+
+ return this.chatCompletion(messages);
+ }
+
+ async completeJSON<T = unknown>(
+ prompt: string,
+ systemPrompt?: string
+ ): Promise<JSONLLMResponse<T>> {
+ const messages: ChatMessage[] = [];
+
+ if (systemPrompt) {
+ messages.push({ role: 'system', content: systemPrompt });
+ }
+
+ messages.push({ role: 'user', content: prompt });
+
+ return this.chatCompletionJSON<T>(messages);
+ }
+
+ async analyze<T = unknown>(
+ text: string,
+ analysisPrompt: string,
+ jsonSchema?: string
+ ): Promise<JSONLLMResponse<T>> {
+ const systemPrompt = `You are an AI assistant that analyzes text and returns structured JSON responses.
+${jsonSchema ? `\nExpected JSON schema:\n${jsonSchema}` : ''}
+Always respond with valid JSON only, no additional text.`;
+
+ const userPrompt = `${analysisPrompt}
+
+Text to analyze:
+"${text}"`;
+
+ return this.completeJSON<T>(userPrompt, systemPrompt);
+ }
+}
+
+export function getLLMService(): LLMService {
+ return LLMService.getInstance();
+}
+
+export function initLLMService(apiKey: string): LLMService {
+ LLMService.resetInstance();
+ return LLMService.getInstance({ apiKey });
+}
+
+export default LLMService;
diff --git a/src/main/services/mcp/connection-orchestrator.service.ts b/src/main/services/mcp/connection-orchestrator.service.ts
new file mode 100644
index 0000000..5eff6f8
--- /dev/null
+++ b/src/main/services/mcp/connection-orchestrator.service.ts
@@ -0,0 +1,408 @@
+/**
+ * Connection Orchestrator Service
+ *
+ * Central coordinator for MCP server connections. Manages lifecycle of all
+ * MCP connections, handles auto-connect, and coordinates tool discovery.
+ */
+
+import { EventEmitter } from 'events';
+import { v4 as uuid } from 'uuid';
+import { logger } from '../../lib/logger';
+import { getConnectionRegistry, ConnectionRegistryService } from './connection-registry.service';
+import { getHealthMonitor, HealthMonitorService } from './health-monitor.service';
+import { MCPClientService } from './mcp-client.service';
+import {
+ getAllMCPServers,
+ getAutoConnectMCPServers,
+ getMCPServerById,
+ createMCPServer,
+ updateMCPServer,
+ updateMCPServerStatus,
+ deleteMCPServer,
+} from '../../db';
+import { encryptCredentials } from '../../utils/encryption';
+import type {
+ MCPServerConfig,
+ MCPTool,
+ MCPToolResult,
+ MCPEvents,
+ CreateMCPServerRequest,
+ UpdateMCPServerRequest,
+ MCPTestConnectionResult,
+} from '../../../shared/types/mcp.types';
+
+const log = logger.child({ module: 'mcp-orchestrator' });
+
+export class ConnectionOrchestratorService extends EventEmitter {
+ private registry: ConnectionRegistryService;
+ private healthMonitor: HealthMonitorService;
+ private initialized: boolean = false;
+
+ constructor() {
+ super();
+ this.registry = getConnectionRegistry();
+ this.healthMonitor = getHealthMonitor();
+ }
+
+ /**
+ * Initialize the orchestrator and connect to auto-connect servers
+ */
+ async initialize(): Promise<void> {
+ if (this.initialized) {
+ log.warn('Orchestrator already initialized');
+ return;
+ }
+
+ log.info('Initializing MCP Connection Orchestrator');
+
+ // Load all servers from database
+ const servers = getAllMCPServers();
+
+ // Register all servers
+ for (const server of servers) {
+ const config = this.dbServerToConfig(server);
+ this.registry.register(config);
+ }
+
+ // Connect to auto-connect servers
+ const autoConnectServers = getAutoConnectMCPServers();
+ log.info({ count: autoConnectServers.length }, 'Connecting to auto-connect servers');
+
+ for (const server of autoConnectServers) {
+ try {
+ await this.connect(server.id);
+ } catch (error) {
+ log.error({ serverId: server.id, error }, 'Failed to auto-connect server');
+ }
+ }
+
+ this.initialized = true;
+ log.info('MCP Connection Orchestrator initialized');
+ }
+
+ /**
+ * Shutdown the orchestrator and disconnect all servers
+ */
+ async shutdown(): Promise<void> {
+ log.info('Shutting down MCP Connection Orchestrator');
+
+ // Stop health monitoring
+ this.healthMonitor.stopAll();
+
+ // Disconnect all servers
+ await this.registry.clearAll();
+
+ this.initialized = false;
+ log.info('MCP Connection Orchestrator shut down');
+ }
+
+ /**
+ * Create a new MCP server
+ */
+ async createServer(request: CreateMCPServerRequest): Promise<MCPServerConfig> {
+ const id = `mcp-${uuid()}`;
+
+ // Encrypt sensitive data
+ const env = request.env ? encryptCredentials(request.env) : undefined;
+ const headers = request.headers ? encryptCredentials(request.headers) : undefined;
+
+ // Create in database
+ const server = createMCPServer({
+ id,
+ name: request.name,
+ transport: request.transport,
+ command: request.command,
+ args: request.args ? JSON.stringify(request.args) : undefined,
+ env,
+ url: request.url,
+ headers,
+ templateId: request.templateId,
+ isEnabled: request.isEnabled ?? true,
+ autoConnect: request.autoConnect ?? false,
+ });
+
+ const config = this.dbServerToConfig(server);
+
+ // Register the connection
+ this.registry.register(config);
+
+ log.info({ serverId: id, name: request.name }, 'Created new MCP server');
+
+ return config;
+ }
+
+ /**
+ * Update an existing MCP server
+ */
+ async updateServer(serverId: string, request: UpdateMCPServerRequest): Promise<MCPServerConfig | null> {
+ // Check if connected, disconnect first
+ const currentStatus = this.registry.getStatus(serverId);
+ if (currentStatus === 'connected') {
+ await this.disconnect(serverId);
+ }
+
+ // Encrypt sensitive data if provided
+ const env = request.env ? encryptCredentials(request.env) : undefined;
+ const headers = request.headers ? encryptCredentials(request.headers) : undefined;
+
+ // Update in database
+ const server = updateMCPServer(serverId, {
+ name: request.name,
+ command: request.command,
+ args: request.args ? JSON.stringify(request.args) : undefined,
+ env,
+ url: request.url,
+ headers,
+ isEnabled: request.isEnabled,
+ autoConnect: request.autoConnect,
+ });
+
+ if (!server) {
+ log.warn({ serverId }, 'Server not found');
+ return null;
+ }
+
+ const config = this.dbServerToConfig(server);
+
+ // Update the client config
+ const client = this.registry.get(serverId);
+ if (client) {
+ client.updateConfig(config);
+ }
+
+ log.info({ serverId }, 'Updated MCP server');
+
+ return config;
+ }
+
+ /**
+ * Delete an MCP server
+ */
+ async deleteServer(serverId: string): Promise<void> {
+ // Unregister connection first
+ await this.registry.unregister(serverId);
+
+ // Delete from database
+ deleteMCPServer(serverId);
+
+ log.info({ serverId }, 'Deleted MCP server');
+ }
+
+ /**
+ * Connect to a server
+ */
+ async connect(serverId: string): Promise<MCPTool[]> {
+ const client = this.registry.get(serverId);
+ if (!client) {
+ throw new Error(`Server ${serverId} not registered`);
+ }
+
+ // Update status in database
+ updateMCPServerStatus(serverId, 'connecting');
+
+ try {
+ await client.connect();
+
+ // Update status in database
+ updateMCPServerStatus(serverId, 'connected');
+
+ // Start health monitoring
+ this.healthMonitor.startMonitoring(serverId);
+
+ const tools = client.getTools();
+ this.emit('server-connected', { serverId, tools });
+
+ return tools;
+ } catch (error) {
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
+ updateMCPServerStatus(serverId, 'error', errorMessage);
+ this.emit('server-error', { serverId, error: errorMessage });
+ throw error;
+ }
+ }
+
+ /**
+ * Disconnect from a server
+ */
+ async disconnect(serverId: string): Promise<void> {
+ const client = this.registry.get(serverId);
+ if (!client) {
+ log.warn({ serverId }, 'Server not registered');
+ return;
+ }
+
+ // Stop health monitoring
+ this.healthMonitor.stopMonitoring(serverId);
+
+ await client.disconnect('Manual disconnect');
+
+ // Update status in database
+ updateMCPServerStatus(serverId, 'disconnected');
+
+ this.emit('server-disconnected', { serverId, reason: 'Manual disconnect' });
+ }
+
+ /**
+ * Test connection to a server without persisting
+ */
+ async testConnection(serverId: string): Promise<MCPTestConnectionResult> {
+ const startTime = Date.now();
+
+ const client = this.registry.get(serverId);
+ if (!client) {
+ return {
+ success: false,
+ serverId,
+ error: 'Server not registered',
+ };
+ }
+
+ try {
+ // If already connected, just return the tools
+ if (client.getStatus() === 'connected') {
+ return {
+ success: true,
+ serverId,
+ tools: client.getTools(),
+ latencyMs: Date.now() - startTime,
+ };
+ }
+
+ // Try to connect
+ await client.connect();
+ const tools = client.getTools();
+
+ // Disconnect since this is just a test
+ await client.disconnect('Test connection complete');
+
+ return {
+ success: true,
+ serverId,
+ tools,
+ latencyMs: Date.now() - startTime,
+ };
+ } catch (error) {
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
+
+ return {
+ success: false,
+ serverId,
+ error: errorMessage,
+ latencyMs: Date.now() - startTime,
+ };
+ }
+ }
+
+ /**
+ * Execute a tool
+ */
+ async executeTool(
+ serverId: string,
+ toolName: string,
+ input?: Record<string, unknown>
+ ): Promise<MCPToolResult> {
+ const client = this.registry.get(serverId);
+ if (!client) {
+ throw new Error(`Server ${serverId} not registered`);
+ }
+
+ if (client.getStatus() !== 'connected') {
+ throw new Error(`Server ${serverId} is not connected`);
+ }
+
+ const result = await client.executeTool(toolName, input);
+
+ // Emit event
+ if (result.status === 'success') {
+ this.emit('tool-call-completed', result);
+ } else {
+ this.emit('tool-call-error', {
+ callId: result.id,
+ serverId,
+ toolName,
+ error: result.error || 'Unknown error',
+ });
+ }
+
+ return result;
+ }
+
+ /**
+ * Get all servers
+ */
+ getServers(): MCPServerConfig[] {
+ const servers = getAllMCPServers();
+ return servers.map((s) => this.dbServerToConfig(s));
+ }
+
+ /**
+ * Get a specific server
+ */
+ getServer(serverId: string): MCPServerConfig | null {
+ const server = getMCPServerById(serverId);
+ return server ? this.dbServerToConfig(server) : null;
+ }
+
+ /**
+ * Get all available tools from connected servers
+ */
+ getAvailableTools(): MCPTool[] {
+ return this.registry.getAllTools();
+ }
+
+ /**
+ * Get connection status for all servers
+ */
+ getConnectionStates(): Record<string, { status: string; error?: string }> {
+ const states: Record<string, { status: string; error?: string }> = {};
+
+ for (const entry of this.registry.getAll()) {
+ states[entry.config.id] = {
+ status: entry.status,
+ error: entry.lastError,
+ };
+ }
+
+ return states;
+ }
+
+ /**
+ * Convert database server record to MCPServerConfig
+ */
+ private dbServerToConfig(server: any): MCPServerConfig {
+ return {
+ id: server.id,
+ name: server.name,
+ transport: server.transport,
+ command: server.command || undefined,
+ args: server.args ? JSON.parse(server.args) : undefined,
+ env: server.env || undefined, // Keep encrypted for storage
+ url: server.url || undefined,
+ headers: server.headers || undefined, // Keep encrypted for storage
+ templateId: server.templateId || undefined,
+ isEnabled: server.isEnabled ?? true,
+ autoConnect: server.autoConnect ?? false,
+ connectionStatus: server.connectionStatus || 'disconnected',
+ lastError: server.lastError || undefined,
+ lastConnectedAt: server.lastConnectedAt || undefined,
+ createdAt: server.createdAt,
+ updatedAt: server.updatedAt,
+ };
+ }
+}
+
+// Singleton instance
+let instance: ConnectionOrchestratorService | null = null;
+
+export function getConnectionOrchestrator(): ConnectionOrchestratorService {
+ if (!instance) {
+ instance = new ConnectionOrchestratorService();
+ }
+ return instance;
+}
+
+export function resetConnectionOrchestrator(): void {
+ instance = null;
+}
+
+export default ConnectionOrchestratorService;
diff --git a/src/main/services/mcp/connection-registry.service.ts b/src/main/services/mcp/connection-registry.service.ts
new file mode 100644
index 0000000..94ff0b4
--- /dev/null
+++ b/src/main/services/mcp/connection-registry.service.ts
@@ -0,0 +1,264 @@
+/**
+ * Connection Registry Service
+ *
+ * In-memory registry for managing MCP client instances and their connection states.
+ * Provides centralized access to all active MCP connections.
+ */
+
+import { logger } from '../../lib/logger';
+import { MCPClientService } from './mcp-client.service';
+import type {
+ MCPServerConfig,
+ MCPTool,
+ MCPConnectionStatus,
+} from '../../../shared/types/mcp.types';
+
+const log = logger.child({ module: 'mcp-connection-registry' });
+
+interface ConnectionEntry {
+ client: MCPClientService;
+ config: MCPServerConfig;
+ status: MCPConnectionStatus;
+ lastError?: string;
+ connectedAt?: Date;
+}
+
+export class ConnectionRegistryService {
+ private connections: Map<string, ConnectionEntry> = new Map();
+
+ /**
+ * Register a new connection
+ */
+ register(config: MCPServerConfig): MCPClientService {
+ if (this.connections.has(config.id)) {
+ log.warn({ serverId: config.id }, 'Connection already registered, returning existing');
+ return this.connections.get(config.id)!.client;
+ }
+
+ const client = new MCPClientService(config);
+
+ // Set up event listeners
+ client.on('connected', ({ tools }) => {
+ this.updateStatus(config.id, 'connected');
+ log.info({ serverId: config.id, toolCount: tools.length }, 'Connection established');
+ });
+
+ client.on('disconnected', ({ reason }) => {
+ this.updateStatus(config.id, 'disconnected');
+ log.info({ serverId: config.id, reason }, 'Connection closed');
+ });
+
+ client.on('error', ({ error }) => {
+ this.updateStatus(config.id, 'error', error);
+ log.error({ serverId: config.id, error }, 'Connection error');
+ });
+
+ this.connections.set(config.id, {
+ client,
+ config,
+ status: 'disconnected',
+ });
+
+ log.info({ serverId: config.id }, 'Connection registered');
+ return client;
+ }
+
+ /**
+ * Unregister a connection
+ */
+ async unregister(serverId: string): Promise<void> {
+ const entry = this.connections.get(serverId);
+ if (!entry) {
+ log.warn({ serverId }, 'Connection not found in registry');
+ return;
+ }
+
+ // Disconnect if connected
+ if (entry.status === 'connected' || entry.status === 'connecting') {
+ await entry.client.disconnect('Unregistering connection');
+ }
+
+ // Remove all listeners
+ entry.client.removeAllListeners();
+
+ this.connections.delete(serverId);
+ log.info({ serverId }, 'Connection unregistered');
+ }
+
+ /**
+ * Get a client by server ID
+ */
+ get(serverId: string): MCPClientService | undefined {
+ return this.connections.get(serverId)?.client;
+ }
+
+ /**
+ * Get connection entry by server ID
+ */
+ getEntry(serverId: string): ConnectionEntry | undefined {
+ return this.connections.get(serverId);
+ }
+
+ /**
+ * Update connection status
+ */
+ updateStatus(serverId: string, status: MCPConnectionStatus, error?: string): void {
+ const entry = this.connections.get(serverId);
+ if (!entry) return;
+
+ entry.status = status;
+
+ if (status === 'connected') {
+ entry.connectedAt = new Date();
+ entry.lastError = undefined;
+ } else if (status === 'error' && error) {
+ entry.lastError = error;
+ }
+ }
+
+ /**
+ * Get status of a connection
+ */
+ getStatus(serverId: string): MCPConnectionStatus | undefined {
+ return this.connections.get(serverId)?.status;
+ }
+
+ /**
+ * Get all registered server IDs
+ */
+ getServerIds(): string[] {
+ return Array.from(this.connections.keys());
+ }
+
+ /**
+ * Get all connected server IDs
+ */
+ getConnectedServerIds(): string[] {
+ return Array.from(this.connections.entries())
+ .filter(([, entry]) => entry.status === 'connected')
+ .map(([id]) => id);
+ }
+
+ /**
+ * Get all connection entries
+ */
+ getAll(): ConnectionEntry[] {
+ return Array.from(this.connections.values());
+ }
+
+ /**
+ * Get all connected clients
+ */
+ getConnectedClients(): MCPClientService[] {
+ return Array.from(this.connections.values())
+ .filter((entry) => entry.status === 'connected')
+ .map((entry) => entry.client);
+ }
+
+ /**
+ * Get aggregated tools from all connected servers
+ */
+ getAllTools(): MCPTool[] {
+ const tools: MCPTool[] = [];
+ const serverStatuses: Array<{ id: string; name: string; status: string; toolCount: number }> = [];
+
+ for (const entry of this.connections.values()) {
+ const serverTools = entry.status === 'connected' ? entry.client.getTools() : [];
+ serverStatuses.push({
+ id: entry.config.id,
+ name: entry.config.name,
+ status: entry.status,
+ toolCount: serverTools.length,
+ });
+
+ if (entry.status === 'connected') {
+ tools.push(...serverTools);
+ }
+ }
+
+ log.info({
+ totalConnections: this.connections.size,
+ connectedServers: serverStatuses.filter(s => s.status === 'connected').length,
+ totalTools: tools.length,
+ serverStatuses,
+ }, 'MCP Registry: getAllTools called');
+
+ return tools;
+ }
+
+ /**
+ * Find a tool by name across all connected servers
+ */
+ findTool(toolName: string): { tool: MCPTool; client: MCPClientService } | undefined {
+ for (const entry of this.connections.values()) {
+ if (entry.status === 'connected') {
+ const tool = entry.client.getTool(toolName);
+ if (tool) {
+ return { tool, client: entry.client };
+ }
+ }
+ }
+ return undefined;
+ }
+
+ /**
+ * Find a tool by namespaced name (serverId:toolName)
+ */
+ findToolByNamespace(namespacedName: string): { tool: MCPTool; client: MCPClientService } | undefined {
+ const [serverId, toolName] = namespacedName.split(':');
+ if (!serverId || !toolName) return undefined;
+
+ const entry = this.connections.get(serverId);
+ if (!entry || entry.status !== 'connected') return undefined;
+
+ const tool = entry.client.getTool(toolName);
+ if (!tool) return undefined;
+
+ return { tool, client: entry.client };
+ }
+
+ /**
+ * Check if any servers are connected
+ */
+ hasConnections(): boolean {
+ return this.getConnectedServerIds().length > 0;
+ }
+
+ /**
+ * Get connection count
+ */
+ getConnectionCount(): { total: number; connected: number } {
+ const total = this.connections.size;
+ const connected = this.getConnectedServerIds().length;
+ return { total, connected };
+ }
+
+ /**
+ * Clear all connections
+ */
+ async clearAll(): Promise<void> {
+ const serverIds = Array.from(this.connections.keys());
+
+ for (const serverId of serverIds) {
+ await this.unregister(serverId);
+ }
+
+ log.info('All connections cleared');
+ }
+}
+
+// Singleton instance
+let instance: ConnectionRegistryService | null = null;
+
+export function getConnectionRegistry(): ConnectionRegistryService {
+ if (!instance) {
+ instance = new ConnectionRegistryService();
+ }
+ return instance;
+}
+
+export function resetConnectionRegistry(): void {
+ instance = null;
+}
+
+export default ConnectionRegistryService;
diff --git a/src/main/services/mcp/health-monitor.service.ts b/src/main/services/mcp/health-monitor.service.ts
new file mode 100644
index 0000000..7dd38e1
--- /dev/null
+++ b/src/main/services/mcp/health-monitor.service.ts
@@ -0,0 +1,292 @@
+/**
+ * Health Monitor Service
+ *
+ * Monitors the health of MCP server connections and handles
+ * automatic reconnection with exponential backoff.
+ */
+
+import { EventEmitter } from 'events';
+import { logger } from '../../lib/logger';
+import { getConnectionRegistry, ConnectionRegistryService } from './connection-registry.service';
+import { updateMCPServerStatus } from '../../db';
+
+const log = logger.child({ module: 'mcp-health-monitor' });
+
+interface MonitoredServer {
+ serverId: string;
+ healthCheckTimer: NodeJS.Timeout | null;
+ reconnectTimer: NodeJS.Timeout | null;
+ reconnectAttempts: number;
+ lastHealthCheck: Date | null;
+ isHealthy: boolean;
+}
+
+export interface HealthMonitorEvents {
+ 'health-check-passed': { serverId: string };
+ 'health-check-failed': { serverId: string; error: string };
+ 'reconnecting': { serverId: string; attempt: number };
+ 'reconnected': { serverId: string };
+ 'reconnect-failed': { serverId: string; error: string };
+}
+
+// Configuration
+const HEALTH_CHECK_INTERVAL = 30000; // 30 seconds
+const MAX_RECONNECT_ATTEMPTS = 5;
+const INITIAL_RECONNECT_DELAY = 1000; // 1 second
+const MAX_RECONNECT_DELAY = 60000; // 1 minute
+
+export class HealthMonitorService extends EventEmitter {
+ private registry: ConnectionRegistryService;
+ private monitoredServers: Map<string, MonitoredServer> = new Map();
+
+ constructor() {
+ super();
+ this.registry = getConnectionRegistry();
+ }
+
+ /**
+ * Start monitoring a server
+ */
+ startMonitoring(serverId: string): void {
+ if (this.monitoredServers.has(serverId)) {
+ log.warn({ serverId }, 'Server already being monitored');
+ return;
+ }
+
+ const server: MonitoredServer = {
+ serverId,
+ healthCheckTimer: null,
+ reconnectTimer: null,
+ reconnectAttempts: 0,
+ lastHealthCheck: null,
+ isHealthy: true,
+ };
+
+ // Start health check timer
+ server.healthCheckTimer = setInterval(() => {
+ this.performHealthCheck(serverId);
+ }, HEALTH_CHECK_INTERVAL);
+
+ this.monitoredServers.set(serverId, server);
+ log.info({ serverId }, 'Started health monitoring');
+ }
+
+ /**
+ * Stop monitoring a server
+ */
+ stopMonitoring(serverId: string): void {
+ const server = this.monitoredServers.get(serverId);
+ if (!server) return;
+
+ // Clear timers
+ if (server.healthCheckTimer) {
+ clearInterval(server.healthCheckTimer);
+ }
+ if (server.reconnectTimer) {
+ clearTimeout(server.reconnectTimer);
+ }
+
+ this.monitoredServers.delete(serverId);
+ log.info({ serverId }, 'Stopped health monitoring');
+ }
+
+ /**
+ * Stop monitoring all servers
+ */
+ stopAll(): void {
+ for (const serverId of this.monitoredServers.keys()) {
+ this.stopMonitoring(serverId);
+ }
+ }
+
+ /**
+ * Perform a health check on a server
+ */
+ private async performHealthCheck(serverId: string): Promise<void> {
+ const server = this.monitoredServers.get(serverId);
+ if (!server) return;
+
+ const client = this.registry.get(serverId);
+ if (!client) {
+ log.warn({ serverId }, 'Client not found for health check');
+ return;
+ }
+
+ const status = client.getStatus();
+
+ if (status === 'connected') {
+ // Server is healthy
+ server.isHealthy = true;
+ server.lastHealthCheck = new Date();
+ server.reconnectAttempts = 0;
+
+ this.emit('health-check-passed', { serverId });
+ } else if (status === 'disconnected' || status === 'error') {
+ // Server is unhealthy, attempt reconnection
+ server.isHealthy = false;
+
+ this.emit('health-check-failed', {
+ serverId,
+ error: `Connection status: ${status}`,
+ });
+
+ // Start reconnection if not already reconnecting
+ if (!server.reconnectTimer) {
+ this.startReconnection(serverId);
+ }
+ }
+ }
+
+ /**
+ * Start the reconnection process with exponential backoff
+ */
+ private startReconnection(serverId: string): void {
+ const server = this.monitoredServers.get(serverId);
+ if (!server) return;
+
+ if (server.reconnectAttempts >= MAX_RECONNECT_ATTEMPTS) {
+ log.error({ serverId }, 'Max reconnect attempts reached');
+ this.emit('reconnect-failed', {
+ serverId,
+ error: 'Max reconnect attempts reached',
+ });
+ return;
+ }
+
+ // Calculate delay with exponential backoff
+ const delay = Math.min(
+ INITIAL_RECONNECT_DELAY * Math.pow(2, server.reconnectAttempts),
+ MAX_RECONNECT_DELAY
+ );
+
+ server.reconnectAttempts++;
+
+ log.info({ serverId, attempt: server.reconnectAttempts, delay }, 'Scheduling reconnection');
+ this.emit('reconnecting', { serverId, attempt: server.reconnectAttempts });
+
+ // Schedule reconnection
+ server.reconnectTimer = setTimeout(async () => {
+ server.reconnectTimer = null;
+ await this.attemptReconnection(serverId);
+ }, delay);
+ }
+
+ /**
+ * Attempt to reconnect to a server
+ */
+ private async attemptReconnection(serverId: string): Promise<void> {
+ const server = this.monitoredServers.get(serverId);
+ if (!server) return;
+
+ const client = this.registry.get(serverId);
+ if (!client) {
+ log.warn({ serverId }, 'Client not found for reconnection');
+ return;
+ }
+
+ try {
+ log.info({ serverId, attempt: server.reconnectAttempts }, 'Attempting reconnection');
+
+ // Update status in database
+ updateMCPServerStatus(serverId, 'connecting');
+
+ await client.connect();
+
+ // Success
+ server.isHealthy = true;
+ server.reconnectAttempts = 0;
+ server.lastHealthCheck = new Date();
+
+ updateMCPServerStatus(serverId, 'connected');
+
+ this.emit('reconnected', { serverId });
+ log.info({ serverId }, 'Reconnection successful');
+ } catch (error) {
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
+
+ updateMCPServerStatus(serverId, 'error', errorMessage);
+
+ log.error({ serverId, error, attempt: server.reconnectAttempts }, 'Reconnection failed');
+
+ // Schedule another attempt
+ this.startReconnection(serverId);
+ }
+ }
+
+ /**
+ * Force a reconnection attempt for a server
+ */
+ async forceReconnect(serverId: string): Promise<void> {
+ const server = this.monitoredServers.get(serverId);
+ if (!server) {
+ log.warn({ serverId }, 'Server not being monitored');
+ return;
+ }
+
+ // Clear any existing reconnect timer
+ if (server.reconnectTimer) {
+ clearTimeout(server.reconnectTimer);
+ server.reconnectTimer = null;
+ }
+
+ // Reset reconnect attempts
+ server.reconnectAttempts = 0;
+
+ // Attempt reconnection immediately
+ await this.attemptReconnection(serverId);
+ }
+
+ /**
+ * Get health status for all monitored servers
+ */
+ getHealthStatus(): Record<string, {
+ isHealthy: boolean;
+ lastHealthCheck: Date | null;
+ reconnectAttempts: number;
+ }> {
+ const status: Record<string, any> = {};
+
+ for (const [serverId, server] of this.monitoredServers.entries()) {
+ status[serverId] = {
+ isHealthy: server.isHealthy,
+ lastHealthCheck: server.lastHealthCheck,
+ reconnectAttempts: server.reconnectAttempts,
+ };
+ }
+
+ return status;
+ }
+
+ /**
+ * Check if a server is being monitored
+ */
+ isMonitoring(serverId: string): boolean {
+ return this.monitoredServers.has(serverId);
+ }
+
+ /**
+ * Get the number of monitored servers
+ */
+ getMonitoredCount(): number {
+ return this.monitoredServers.size;
+ }
+}
+
+// Singleton instance
+let instance: HealthMonitorService | null = null;
+
+export function getHealthMonitor(): HealthMonitorService {
+ if (!instance) {
+ instance = new HealthMonitorService();
+ }
+ return instance;
+}
+
+export function resetHealthMonitor(): void {
+ if (instance) {
+ instance.stopAll();
+ }
+ instance = null;
+}
+
+export default HealthMonitorService;
diff --git a/src/main/services/mcp/index.ts b/src/main/services/mcp/index.ts
new file mode 100644
index 0000000..19846ec
--- /dev/null
+++ b/src/main/services/mcp/index.ts
@@ -0,0 +1,64 @@
+/**
+ * MCP Services Barrel Export
+ *
+ * Export all MCP services for external use.
+ */
+
+// Core Client
+export {
+ MCPClientService,
+ type MCPClientEvents,
+} from './mcp-client.service';
+
+// Connection Registry
+export {
+ ConnectionRegistryService,
+ getConnectionRegistry,
+ resetConnectionRegistry,
+} from './connection-registry.service';
+
+// Connection Orchestrator
+export {
+ ConnectionOrchestratorService,
+ getConnectionOrchestrator,
+ resetConnectionOrchestrator,
+} from './connection-orchestrator.service';
+
+// Tool Aggregator
+export {
+ ToolAggregatorService,
+ getToolAggregator,
+ resetToolAggregator,
+ type NamespacedTool,
+ type ToolLookupResult,
+} from './tool-aggregator.service';
+
+// Health Monitor
+export {
+ HealthMonitorService,
+ getHealthMonitor,
+ resetHealthMonitor,
+ type HealthMonitorEvents,
+} from './health-monitor.service';
+
+// Intent Detection (will be added in Phase 3)
+export {
+ IntentDetectorService,
+ getIntentDetector,
+ resetIntentDetector,
+} from './intent-detector.service';
+
+// Result Handler (will be added in Phase 3)
+export {
+ ResultHandlerService,
+ getResultHandler,
+ resetResultHandler,
+} from './result-handler.service';
+
+// MCP Agent (Agentic tool calling loop)
+export {
+ MCPAgentService,
+ getMCPAgent,
+ resetMCPAgent,
+ type MCPAgentResult,
+} from './mcp-agent.service';
diff --git a/src/main/services/mcp/intent-detector.service.ts b/src/main/services/mcp/intent-detector.service.ts
new file mode 100644
index 0000000..ae562da
--- /dev/null
+++ b/src/main/services/mcp/intent-detector.service.ts
@@ -0,0 +1,361 @@
+/**
+ * Intent Detector Service
+ *
+ * Detects when transcript content suggests an MCP tool call would be helpful.
+ * Uses pattern matching for fast detection and LLM for more accurate detection.
+ */
+
+import { logger } from '../../lib/logger';
+import { getLLMService } from '../llm.service';
+import { getToolAggregator, ToolAggregatorService, NamespacedTool } from './tool-aggregator.service';
+import type { MCPIntentDetection, MCPTool } from '../../../shared/types/mcp.types';
+import type { TranscriptSegmentData } from '../copilot/transcript-buffer.service';
+
+const log = logger.child({ module: 'mcp-intent-detector' });
+
+// Intent patterns for fast detection
+interface IntentPattern {
+ pattern: RegExp;
+ intent: string;
+ toolKeywords: string[];
+ confidence: number;
+}
+
+const INTENT_PATTERNS: IntentPattern[] = [
+ // CRM lookups
+ {
+ pattern: /who\s+(is|are|was)\s+\w+\s+(at|from|with)\s+\w+/i,
+ intent: 'crm_lookup',
+ toolKeywords: ['contact', 'get_contact', 'search', 'lookup'],
+ confidence: 0.7,
+ },
+ {
+ pattern: /(can you|could you|please)\s+(look up|find|get|check)\s+.*(contact|customer|account|company)/i,
+ intent: 'crm_lookup',
+ toolKeywords: ['contact', 'company', 'account', 'search'],
+ confidence: 0.8,
+ },
+ {
+ pattern: /what('s| is| are)\s+(the|their)\s+(deal|opportunity|pipeline|stage)/i,
+ intent: 'deal_lookup',
+ toolKeywords: ['deal', 'opportunity', 'pipeline'],
+ confidence: 0.75,
+ },
+
+ // Calendar/scheduling
+ {
+ pattern: /(schedule|book|set up|arrange)\s+a?\s*(call|meeting|demo|follow-?up)/i,
+ intent: 'schedule_meeting',
+ toolKeywords: ['calendar', 'schedule', 'meeting', 'availability'],
+ confidence: 0.8,
+ },
+ {
+ pattern: /when\s+(are you|is .*)\s+(free|available)/i,
+ intent: 'check_availability',
+ toolKeywords: ['calendar', 'availability', 'schedule'],
+ confidence: 0.7,
+ },
+ {
+ pattern: /(next|this)\s+(week|monday|tuesday|wednesday|thursday|friday)/i,
+ intent: 'check_availability',
+ toolKeywords: ['calendar', 'schedule'],
+ confidence: 0.5,
+ },
+
+ // Documentation lookup
+ {
+ pattern: /(what('s| is| are)\s+(the|our)|do you have)\s+.*(documentation|doc|guide|spec)/i,
+ intent: 'doc_lookup',
+ toolKeywords: ['document', 'search', 'page', 'content'],
+ confidence: 0.7,
+ },
+ {
+ pattern: /(how does|explain|tell me about)\s+.*(feature|product|integration|api)/i,
+ intent: 'doc_lookup',
+ toolKeywords: ['document', 'search', 'page'],
+ confidence: 0.6,
+ },
+
+ // Competitor/research
+ {
+ pattern: /(how|what)\s+(do|does)\s+(you|your|it)\s+(compare|differ|stack up)/i,
+ intent: 'competitor_research',
+ toolKeywords: ['search', 'compare'],
+ confidence: 0.7,
+ },
+ {
+ pattern: /\b(competitor|vs|versus|alternative|compared to)\b/i,
+ intent: 'competitor_research',
+ toolKeywords: ['search', 'brave_search'],
+ confidence: 0.6,
+ },
+
+ // Pricing/quote
+ {
+ pattern: /(what('s| is| are)\s+(the|your)|how much)\s+.*(price|pricing|cost|rate)/i,
+ intent: 'pricing_lookup',
+ toolKeywords: ['pricing', 'quote', 'product'],
+ confidence: 0.8,
+ },
+
+ // Previous conversation/memory
+ {
+ pattern: /(remember|recall|last time|previous(ly)?|earlier|before)\s+.*(discussion|call|meeting|talked|mentioned)/i,
+ intent: 'memory_recall',
+ toolKeywords: ['memory', 'recall', 'remember'],
+ confidence: 0.7,
+ },
+];
+
+export class IntentDetectorService {
+ private toolAggregator: ToolAggregatorService;
+ private cooldownMap: Map<string, number> = new Map();
+ private readonly COOLDOWN_MS = 30000; // 30 seconds between same intent detections
+
+ constructor() {
+ this.toolAggregator = getToolAggregator();
+ }
+
+ /**
+ * Fast pattern-based intent detection
+ */
+ detectFast(segment: TranscriptSegmentData, context: string): MCPIntentDetection {
+ const text = segment.text;
+
+ for (const intentPattern of INTENT_PATTERNS) {
+ const match = text.match(intentPattern.pattern);
+
+ if (match) {
+ // Check cooldown
+ if (this.isOnCooldown(intentPattern.intent)) {
+ continue;
+ }
+
+ // Find matching tool
+ const tool = this.findToolForIntent(intentPattern.toolKeywords);
+
+ if (tool) {
+ this.setCooldown(intentPattern.intent);
+
+ log.info({
+ intent: intentPattern.intent,
+ tool: tool.namespacedName,
+ confidence: intentPattern.confidence,
+ matchedText: match[0],
+ }, 'Intent detected (fast)');
+
+ return {
+ detected: true,
+ toolName: tool.namespacedName,
+ serverId: tool.serverId,
+ confidence: intentPattern.confidence,
+ reason: `Pattern matched: "${match[0]}"`,
+ triggerText: text,
+ suggestedInput: this.extractSuggestedInput(text, tool),
+ };
+ }
+ }
+ }
+
+ return {
+ detected: false,
+ confidence: 0,
+ };
+ }
+
+ /**
+ * LLM-based intent detection (more accurate but slower)
+ */
+ async detectWithLLM(
+ segment: TranscriptSegmentData,
+ context: string,
+ tools: MCPTool[]
+ ): Promise<MCPIntentDetection> {
+ if (tools.length === 0) {
+ return { detected: false, confidence: 0 };
+ }
+
+ const llmService = getLLMService();
+ if (!llmService) {
+ log.warn('LLM service not available, falling back to fast detection');
+ return this.detectFast(segment, context);
+ }
+
+ // Build tools description for the prompt
+ const toolsDescription = tools.map((t) =>
+ `- ${t.serverId}:${t.name}: ${t.description || 'No description'}`
+ ).join('\n');
+
+ const prompt = `Analyze this conversation segment to determine if calling an external tool would be helpful.
+
+Available MCP Tools:
+${toolsDescription}
+
+Recent Conversation Context:
+${context}
+
+Current Statement:
+Speaker: ${segment.channel === 'me' ? 'You' : 'Other Participant'}
+Text: "${segment.text}"
+
+Determine if any tool should be called. Consider:
+1. Is there a specific information request that a tool could answer?
+2. Would tool data enhance the conversation?
+3. Is this a natural moment to look something up?
+
+Return JSON:
+{
+ "detected": boolean,
+ "toolName": "serverId:toolName" or null,
+ "confidence": 0.0-1.0,
+ "reason": "explanation",
+ "suggestedInput": { key: value } or null
+}`;
+
+ try {
+ const response = await llmService.completeJSON<{
+ detected: boolean;
+ toolName: string | null;
+ confidence: number;
+ reason: string;
+ suggestedInput: Record<string, unknown> | null;
+ }>(prompt);
+
+ if (!response.success || !response.data) {
+ log.warn({ error: response.error }, 'LLM intent detection returned no data');
+ return this.detectFast(segment, context);
+ }
+
+ const result = response.data;
+
+ if (result.detected && result.toolName) {
+ // Check cooldown
+ if (this.isOnCooldown(result.toolName)) {
+ return { detected: false, confidence: 0, reason: 'On cooldown' };
+ }
+
+ this.setCooldown(result.toolName);
+
+ log.info({
+ tool: result.toolName,
+ confidence: result.confidence,
+ reason: result.reason,
+ }, 'Intent detected (LLM)');
+ }
+
+ return {
+ detected: result.detected,
+ toolName: result.toolName || undefined,
+ serverId: result.toolName?.split(':')[0],
+ confidence: result.confidence,
+ reason: result.reason,
+ suggestedInput: result.suggestedInput ?? undefined,
+ triggerText: segment.text,
+ };
+ } catch (error) {
+ log.error({ error }, 'LLM intent detection failed');
+ // Fall back to fast detection
+ return this.detectFast(segment, context);
+ }
+ }
+
+ /**
+ * Find a tool that matches the given keywords
+ */
+ private findToolForIntent(keywords: string[]): NamespacedTool | undefined {
+ for (const keyword of keywords) {
+ const tools = this.toolAggregator.searchTools(keyword);
+ if (tools.length > 0) {
+ return tools[0];
+ }
+ }
+ return undefined;
+ }
+
+ /**
+ * Extract suggested input parameters from the text
+ */
+ private extractSuggestedInput(
+ text: string,
+ tool: NamespacedTool
+ ): Record<string, unknown> | undefined {
+ // Try to extract common parameters
+ const input: Record<string, unknown> = {};
+
+ // Extract email
+ const emailMatch = text.match(/\b[\w.-]+@[\w.-]+\.\w+\b/);
+ if (emailMatch) {
+ input.email = emailMatch[0];
+ }
+
+ // Extract company names (capitalized words that might be companies)
+ const companyMatch = text.match(/\b([A-Z][a-zA-Z]+(?:\s+[A-Z][a-zA-Z]+)*)\b/);
+ if (companyMatch) {
+ input.company = companyMatch[0];
+ input.query = companyMatch[0];
+ }
+
+ // Extract person names after "who is" or similar
+ const personMatch = text.match(/(?:who is|find|look up)\s+([A-Z][a-z]+(?:\s+[A-Z][a-z]+)?)/i);
+ if (personMatch) {
+ input.name = personMatch[1];
+ input.query = personMatch[1];
+ }
+
+ // Extract search query
+ const searchMatch = text.match(/(?:search|find|look up|get)\s+(?:for\s+)?(.+)/i);
+ if (searchMatch && !input.query) {
+ input.query = searchMatch[1].trim();
+ }
+
+ return Object.keys(input).length > 0 ? input : undefined;
+ }
+
+ /**
+ * Check if an intent is on cooldown
+ */
+ private isOnCooldown(intent: string): boolean {
+ const lastTriggered = this.cooldownMap.get(intent);
+ if (!lastTriggered) return false;
+
+ return Date.now() - lastTriggered < this.COOLDOWN_MS;
+ }
+
+ /**
+ * Set cooldown for an intent
+ */
+ private setCooldown(intent: string): void {
+ this.cooldownMap.set(intent, Date.now());
+ }
+
+ /**
+ * Clear all cooldowns
+ */
+ clearCooldowns(): void {
+ this.cooldownMap.clear();
+ }
+
+ /**
+ * Update cooldown duration
+ */
+ setCooldownDuration(ms: number): void {
+ // Note: This would need a class property change for runtime updates
+ log.info({ ms }, 'Cooldown duration update requested');
+ }
+}
+
+// Singleton instance
+let instance: IntentDetectorService | null = null;
+
+export function getIntentDetector(): IntentDetectorService {
+ if (!instance) {
+ instance = new IntentDetectorService();
+ }
+ return instance;
+}
+
+export function resetIntentDetector(): void {
+ instance = null;
+}
+
+export default IntentDetectorService;
diff --git a/src/main/services/mcp/mcp-agent.service.ts b/src/main/services/mcp/mcp-agent.service.ts
new file mode 100644
index 0000000..72ff5c1
--- /dev/null
+++ b/src/main/services/mcp/mcp-agent.service.ts
@@ -0,0 +1,464 @@
+/**
+ * MCP Agent Service
+ *
+ * Agentic loop that listens to transcripts and automatically calls MCP tools
+ * using LLM function calling. Maintains conversation context across runs
+ * for coherent multi-turn interactions.
+ */
+
+import { logger } from '../../lib/logger';
+import { getLLMService, type ChatMessage, type Tool, type ToolCall } from '../llm.service';
+import { getToolAggregator } from './tool-aggregator.service';
+import { getConnectionOrchestrator } from './connection-orchestrator.service';
+import type { MCPTool } from '../../../shared/types/mcp.types';
+import type { TranscriptSegmentData } from '../copilot/transcript-buffer.service';
+
+const log = logger.child({ module: 'mcp-agent' });
+
+const MAX_TOOL_CALLS = 5; // Prevent infinite loops
+const MAX_CONVERSATION_HISTORY = 20; // Limit conversation history to prevent token overflow
+
+export interface MCPAgentResult {
+ success: boolean;
+ response: string | null;
+ toolsCalled: Array<{
+ serverId: string;
+ toolName: string;
+ input: Record<string, unknown>;
+ output: unknown;
+ success: boolean;
+ }>;
+ error?: string;
+}
+
+export class MCPAgentService {
+ private toolAggregator = getToolAggregator();
+ private orchestrator = getConnectionOrchestrator();
+
+ // Map short tool names to full serverId + toolName (reset per run)
+ private toolNameMap: Map<string, { serverId: string; toolName: string }> = new Map();
+
+ // Persistent conversation history for coherent multi-turn interactions
+ private conversationHistory: ChatMessage[] = [];
+ private systemPrompt: string | null = null;
+
+ // Custom trigger keywords set by user in settings
+ private customTriggerKeywords: string[] = [];
+
+ /**
+ * Generate a short, unique tool name (max 32 chars for OpenAI compatibility)
+ * Format: serverPrefix_toolName (truncated if needed)
+ */
+ private generateShortToolName(serverId: string, toolName: string, index: number): string {
+ // Extract a short server prefix (first 8 chars of server name/id after 'mcp-')
+ const serverPrefix = serverId.replace(/^mcp-/, '').slice(0, 6);
+
+ // Tool name limit: 32 - serverPrefix(6) - underscore(1) - index(2) = 23 chars max
+ const truncatedToolName = toolName.slice(0, 20);
+
+ // Format: s{prefix}_{index}_{tool} to ensure uniqueness
+ const shortName = `s${serverPrefix}_${index}_${truncatedToolName}`;
+
+ // Final safety check - truncate to 32 chars
+ return shortName.slice(0, 32);
+ }
+
+ /**
+ * Convert MCP tools to OpenAI function calling format
+ * Tool names must be <= 32 characters for OpenAI API
+ */
+ private mcpToolsToOpenAIFormat(mcpTools: MCPTool[]): Tool[] {
+ // Clear the map for this run
+ this.toolNameMap.clear();
+
+ return mcpTools.map((tool, index) => {
+ const shortName = this.generateShortToolName(tool.serverId, tool.name, index);
+
+ this.toolNameMap.set(shortName, {
+ serverId: tool.serverId,
+ toolName: tool.name,
+ });
+
+ return {
+ type: 'function' as const,
+ function: {
+ name: shortName,
+ description: tool.description || `Tool from ${tool.serverName}: ${tool.name}`,
+ parameters: this.convertInputSchema(tool.inputSchema),
+ },
+ };
+ });
+ }
+
+ /**
+ * Convert MCP input schema to OpenAI format
+ */
+ private convertInputSchema(inputSchema: MCPTool['inputSchema']): Tool['function']['parameters'] {
+ if (!inputSchema || typeof inputSchema !== 'object') {
+ return {
+ type: 'object',
+ properties: {},
+ };
+ }
+
+ // Handle JSON Schema format
+ const schema = inputSchema as Record<string, unknown>;
+
+ return {
+ type: 'object',
+ properties: (schema.properties as Record<string, { type: string; description?: string; enum?: string[] }>) || {},
+ required: (schema.required as string[]) || undefined,
+ };
+ }
+
+ /**
+ * Parse tool name from OpenAI format back to serverId and toolName
+ * Uses the toolNameMap created during mcpToolsToOpenAIFormat
+ */
+ private parseToolName(openAIToolName: string): { serverId: string; toolName: string } | null {
+ const mapping = this.toolNameMap.get(openAIToolName);
+ if (!mapping) {
+ return null;
+ }
+
+ return mapping;
+ }
+
+ /**
+ * Execute a tool call
+ */
+ private async executeToolCall(toolCall: ToolCall): Promise<{
+ serverId: string;
+ toolName: string;
+ input: Record<string, unknown>;
+ output: unknown;
+ success: boolean;
+ error?: string;
+ }> {
+ const parsed = this.parseToolName(toolCall.function.name);
+ if (!parsed) {
+ return {
+ serverId: 'unknown',
+ toolName: toolCall.function.name,
+ input: {},
+ output: null,
+ success: false,
+ error: 'Invalid tool name format',
+ };
+ }
+
+ const { serverId, toolName } = parsed;
+ let input: Record<string, unknown> = {};
+
+ try {
+ input = JSON.parse(toolCall.function.arguments || '{}');
+ } catch (e) {
+ log.warn({ arguments: toolCall.function.arguments }, 'Failed to parse tool arguments');
+ }
+
+
+ try {
+ const result = await this.orchestrator.executeTool(serverId, toolName, input);
+
+ return {
+ serverId,
+ toolName,
+ input,
+ output: result.result,
+ success: result.status === 'success',
+ error: result.error,
+ };
+ } catch (error) {
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
+
+ return {
+ serverId,
+ toolName,
+ input,
+ output: null,
+ success: false,
+ error: errorMessage,
+ };
+ }
+ }
+
+ /**
+ * Build the system prompt for the MCP agent
+ */
+ private buildSystemPrompt(mcpTools: MCPTool[]): string {
+ return `You are a helpful meeting assistant that has access to external tools to fetch information during meetings.
+
+You are listening to a live conversation. When the conversation mentions something that could be enhanced with information from the available tools, you should call the appropriate tool to fetch that information.
+
+IMPORTANT GUIDELINES:
+1. Only call tools when the conversation clearly indicates a need for external information
+2. Pay attention to keywords like: "documentation", "docs", "CRM", "customer info", "schedule", "calendar", "look up", "find", "fetch", "get me"
+3. When you hear a request for information that matches a tool's capability, call that tool
+4. After getting tool results, provide a brief, helpful summary of the relevant information
+5. If no tools are relevant, respond with a brief message saying no relevant information was found
+6. Remember previous context from this conversation - don't repeat yourself unnecessarily
+
+Available tool servers and their purposes:
+${mcpTools.map(t => `- ${t.serverName} (${t.serverId}): ${t.name} - ${t.description || 'No description'}`).join('\n')}`;
+ }
+
+ /**
+ * Format recent transcript segments for context
+ */
+ private formatRecentSegments(segments: TranscriptSegmentData[]): string {
+ return segments.map(seg => {
+ const speaker = seg.channel === 'me' ? '[ME]' : '[THEM]';
+ return `${speaker} ${seg.text}`;
+ }).join('\n');
+ }
+
+ /**
+ * Reset conversation history (call when a new recording/call starts)
+ */
+ resetConversation(): void {
+ this.conversationHistory = [];
+ this.systemPrompt = null;
+ }
+
+ /**
+ * Set custom trigger keywords from user settings
+ */
+ setCustomTriggerKeywords(keywords: string[]): void {
+ this.customTriggerKeywords = keywords.map(k => k.toLowerCase().trim()).filter(Boolean);
+ }
+
+ /**
+ * Get combined trigger keywords (default + custom)
+ */
+ private getCombinedTriggerKeywords(): string[] {
+ // Default keywords that suggest external information might be helpful
+ const defaultKeywords = [
+ // Documentation
+ 'documentation', 'docs', 'document', 'guide', 'spec', 'specification',
+ // CRM/Customer
+ 'customer', 'account', 'contact', 'deal', 'opportunity', 'crm', 'hubspot', 'salesforce',
+ // Calendar/Scheduling
+ 'schedule', 'calendar', 'meeting', 'availability', 'book', 'appointment',
+ // Search/Lookup
+ 'look up', 'find', 'fetch', 'get me', 'search', 'check',
+ // Memory/History
+ 'remember', 'last time', 'previous', 'recall',
+ // Specific platforms
+ 'coda', 'notion', 'confluence', 'wiki', 'jira', 'asana', 'trello',
+ // Pricing/Product
+ 'pricing', 'price', 'cost', 'feature', 'integration',
+ ];
+
+ // Combine with custom keywords, avoiding duplicates
+ const combined = [...defaultKeywords];
+ for (const keyword of this.customTriggerKeywords) {
+ if (!combined.includes(keyword)) {
+ combined.push(keyword);
+ }
+ }
+
+ return combined;
+ }
+
+ /**
+ * Run the agentic loop with persistent conversation context
+ *
+ * Takes recent transcript segments and available tools, runs a while loop
+ * calling tools until the LLM returns a text response.
+ * Maintains conversation history for coherent multi-turn interactions.
+ */
+ async run(
+ recentSegments: TranscriptSegmentData[],
+ mcpTools: MCPTool[]
+ ): Promise<MCPAgentResult> {
+ const latestSegment = recentSegments[recentSegments.length - 1];
+
+
+ if (mcpTools.length === 0) {
+ return {
+ success: false,
+ response: null,
+ toolsCalled: [],
+ error: 'No MCP tools available',
+ };
+ }
+
+ const llmService = getLLMService();
+ if (!llmService) {
+ return {
+ success: false,
+ response: null,
+ toolsCalled: [],
+ error: 'LLM service not available',
+ };
+ }
+
+ // Convert MCP tools to OpenAI format
+ const tools = this.mcpToolsToOpenAIFormat(mcpTools);
+
+ // Initialize or update system prompt
+ if (!this.systemPrompt) {
+ this.systemPrompt = this.buildSystemPrompt(mcpTools);
+ }
+
+ // Build the new user message with recent context
+ const recentContext = this.formatRecentSegments(recentSegments);
+ const userMessage = `RECENT CONVERSATION (last ${recentSegments.length} statements):
+${recentContext}
+
+LATEST STATEMENT:
+Speaker: ${latestSegment?.channel === 'me' ? 'You' : 'Other Participant'}
+"${latestSegment?.text || ''}"
+
+Based on the conversation above, determine if any tools should be called to fetch relevant information.`;
+
+ // Add new user message to conversation history
+ this.conversationHistory.push({ role: 'user', content: userMessage });
+
+ // Trim history if too long (keep system + recent messages)
+ if (this.conversationHistory.length > MAX_CONVERSATION_HISTORY) {
+ // Keep first few and last few messages
+ const keepStart = 2;
+ const keepEnd = MAX_CONVERSATION_HISTORY - keepStart;
+ this.conversationHistory = [
+ ...this.conversationHistory.slice(0, keepStart),
+ ...this.conversationHistory.slice(-keepEnd),
+ ];
+ }
+
+ // Build messages array with system prompt + conversation history
+ const messages: ChatMessage[] = [
+ { role: 'system', content: this.systemPrompt },
+ ...this.conversationHistory,
+ ];
+
+ const toolsCalled: MCPAgentResult['toolsCalled'] = [];
+ let iterations = 0;
+
+ // Agentic loop - keep calling tools until we get a text response
+ while (iterations < MAX_TOOL_CALLS) {
+ iterations++
+
+ const response = await llmService.chatCompletionWithTools(messages, tools);
+
+ if (!response.success) {
+ return {
+ success: false,
+ response: null,
+ toolsCalled,
+ error: response.error,
+ };
+ }
+
+ // Check if we got tool calls
+ if (response.tool_calls && response.tool_calls.length > 0) {
+
+ // Add assistant message with tool calls to messages and history
+ const assistantMessage: ChatMessage = {
+ role: 'assistant',
+ content: response.content,
+ tool_calls: response.tool_calls,
+ };
+ messages.push(assistantMessage);
+ this.conversationHistory.push(assistantMessage);
+
+ // Execute each tool call
+ for (let i = 0; i < response.tool_calls.length; i++) {
+ const toolCall = response.tool_calls[i];
+
+ const toolStartTime = Date.now();
+ const result = await this.executeToolCall(toolCall);
+ const toolElapsedMs = Date.now() - toolStartTime;
+
+ toolsCalled.push(result);
+
+ // Add tool result to messages and history
+ const toolResultContent = result.success
+ ? JSON.stringify(result.output, null, 2)
+ : `Error: ${result.error}`;
+
+ const toolMessage: ChatMessage = {
+ role: 'tool',
+ tool_call_id: toolCall.id,
+ content: toolResultContent,
+ };
+ messages.push(toolMessage);
+ this.conversationHistory.push(toolMessage);
+ }
+
+ // Continue the loop to let LLM process the tool results
+ continue;
+ }
+
+ // No tool calls - we got a final text response
+ if (response.content) {
+ // Add assistant response to history for future context
+ this.conversationHistory.push({
+ role: 'assistant',
+ content: response.content,
+ });
+
+ return {
+ success: true,
+ response: response.content,
+ toolsCalled,
+ };
+ }
+
+ break;
+ }
+
+ return {
+ success: toolsCalled.length > 0,
+ response: toolsCalled.length > 0
+ ? `Called ${toolsCalled.length} tool(s) but reached iteration limit.`
+ : null,
+ toolsCalled,
+ error: iterations >= MAX_TOOL_CALLS ? 'Reached maximum tool call limit' : undefined,
+ };
+ }
+
+ /**
+ * Determine if a transcript segment should trigger the agent
+ * Uses simple heuristics to avoid calling the agent on every segment
+ */
+ shouldTrigger(segment: TranscriptSegmentData, conversationContext: string): boolean {
+ const text = segment.text.toLowerCase();
+
+ // Get combined default + custom keywords
+ const triggerKeywords = this.getCombinedTriggerKeywords();
+
+ // Check if any trigger keywords are present
+ const matchedKeywords: string[] = [];
+ for (const keyword of triggerKeywords) {
+ if (text.includes(keyword)) {
+ matchedKeywords.push(keyword);
+ }
+ }
+
+ if (matchedKeywords.length > 0) {
+ return true;
+ }
+
+ return false;
+ }
+}
+
+// Singleton instance
+let instance: MCPAgentService | null = null;
+
+export function getMCPAgent(): MCPAgentService {
+ if (!instance) {
+ instance = new MCPAgentService();
+ }
+ return instance;
+}
+
+export function resetMCPAgent(): void {
+ if (instance) {
+ instance.resetConversation();
+ }
+ instance = null;
+}
+
+export default MCPAgentService;
diff --git a/src/main/services/mcp/mcp-client.service.ts b/src/main/services/mcp/mcp-client.service.ts
new file mode 100644
index 0000000..14eed6e
--- /dev/null
+++ b/src/main/services/mcp/mcp-client.service.ts
@@ -0,0 +1,336 @@
+/**
+ * MCP Client Service
+ *
+ * Wrapper around the MCP SDK for managing a single MCP server connection.
+ * Handles connection lifecycle, tool discovery, and tool execution.
+ */
+
+import { EventEmitter } from 'events';
+import { Client } from '@modelcontextprotocol/sdk/client/index.js';
+import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
+import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
+import { logger } from '../../lib/logger';
+import type {
+ MCPServerConfig,
+ MCPTool,
+ MCPToolResult,
+ MCPConnectionStatus,
+} from '../../../shared/types/mcp.types';
+import { decryptCredentials } from '../../utils/encryption';
+
+const log = logger.child({ module: 'mcp-client' });
+
+export interface MCPClientEvents {
+ 'connected': { serverId: string; tools: MCPTool[] };
+ 'disconnected': { serverId: string; reason: string };
+ 'error': { serverId: string; error: string };
+ 'tool-result': MCPToolResult;
+}
+
+export class MCPClientService extends EventEmitter {
+ private client: Client | null = null;
+ private transport: StdioClientTransport | SSEClientTransport | null = null;
+ private config: MCPServerConfig;
+ private tools: MCPTool[] = [];
+ private connectionStatus: MCPConnectionStatus = 'disconnected';
+
+ constructor(config: MCPServerConfig) {
+ super();
+ this.config = config;
+ }
+
+ /**
+ * Get the server ID
+ */
+ get serverId(): string {
+ return this.config.id;
+ }
+
+ /**
+ * Get the server name
+ */
+ get serverName(): string {
+ return this.config.name;
+ }
+
+ /**
+ * Get current connection status
+ */
+ getStatus(): MCPConnectionStatus {
+ return this.connectionStatus;
+ }
+
+ /**
+ * Get available tools
+ */
+ getTools(): MCPTool[] {
+ return this.tools;
+ }
+
+ /**
+ * Connect to the MCP server
+ */
+ async connect(): Promise<void> {
+ if (this.connectionStatus === 'connected' || this.connectionStatus === 'connecting') {
+ log.warn({ serverId: this.config.id }, 'Already connected or connecting');
+ return;
+ }
+
+ this.connectionStatus = 'connecting';
+ log.info({ serverId: this.config.id, transport: this.config.transport }, 'Connecting to MCP server');
+
+ try {
+ // Create client
+ this.client = new Client(
+ {
+ name: 'meeting-copilot',
+ version: '1.0.0',
+ },
+ {
+ capabilities: {},
+ }
+ );
+
+ // Create transport based on type
+ if (this.config.transport === 'stdio') {
+ await this.connectStdio();
+ } else {
+ await this.connectHttp();
+ }
+
+ // Discover tools
+ await this.discoverTools();
+
+ this.connectionStatus = 'connected';
+ this.emit('connected', { serverId: this.config.id, tools: this.tools });
+ log.info({ serverId: this.config.id, toolCount: this.tools.length }, 'Connected to MCP server');
+ } catch (error) {
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
+ this.connectionStatus = 'error';
+ this.emit('error', { serverId: this.config.id, error: errorMessage });
+ log.error({ serverId: this.config.id, error }, 'Failed to connect to MCP server');
+ throw error;
+ }
+ }
+
+ /**
+ * Connect via stdio transport
+ */
+ private async connectStdio(): Promise<void> {
+ if (!this.config.command) {
+ throw new Error('Command is required for stdio transport');
+ }
+
+ // Decrypt environment variables if present
+ let env: Record<string, string> = { ...process.env } as Record<string, string>;
+ if (this.config.env) {
+ try {
+ const decryptedEnv = typeof this.config.env === 'string'
+ ? decryptCredentials(this.config.env)
+ : this.config.env;
+ env = { ...env, ...decryptedEnv };
+ } catch (error) {
+ log.warn({ serverId: this.config.id }, 'Failed to decrypt env, using as-is');
+ if (typeof this.config.env === 'object') {
+ env = { ...env, ...this.config.env };
+ }
+ }
+ }
+
+ // Parse args
+ const args = typeof this.config.args === 'string'
+ ? JSON.parse(this.config.args)
+ : this.config.args || [];
+
+ this.transport = new StdioClientTransport({
+ command: this.config.command,
+ args,
+ env,
+ });
+
+ await this.client!.connect(this.transport);
+ }
+
+ /**
+ * Connect via HTTP/SSE transport
+ */
+ private async connectHttp(): Promise<void> {
+ if (!this.config.url) {
+ throw new Error('URL is required for HTTP transport');
+ }
+
+ // Decrypt headers if present
+ let headers: Record<string, string> = {};
+ if (this.config.headers) {
+ try {
+ headers = typeof this.config.headers === 'string'
+ ? decryptCredentials(this.config.headers)
+ : this.config.headers;
+ } catch (error) {
+ log.warn({ serverId: this.config.id }, 'Failed to decrypt headers, using as-is');
+ if (typeof this.config.headers === 'object') {
+ headers = this.config.headers;
+ }
+ }
+ }
+
+ this.transport = new SSEClientTransport(new URL(this.config.url), {
+ requestInit: {
+ headers,
+ },
+ });
+
+ await this.client!.connect(this.transport);
+ }
+
+ /**
+ * Discover available tools from the server
+ */
+ private async discoverTools(): Promise<void> {
+ if (!this.client) {
+ throw new Error('Client not initialized');
+ }
+
+ const result = await this.client.listTools();
+
+ this.tools = result.tools.map((tool) => ({
+ name: tool.name,
+ description: tool.description,
+ inputSchema: tool.inputSchema as MCPTool['inputSchema'],
+ serverId: this.config.id,
+ serverName: this.config.name,
+ }));
+
+ log.info({ serverId: this.config.id, tools: this.tools.map(t => t.name) }, 'Discovered tools');
+ }
+
+ /**
+ * Execute a tool
+ */
+ async executeTool(
+ toolName: string,
+ input?: Record<string, unknown>
+ ): Promise<MCPToolResult> {
+ if (!this.client || this.connectionStatus !== 'connected') {
+ throw new Error('Not connected to MCP server');
+ }
+
+ const startTime = Date.now();
+ const id = `${this.config.id}:${toolName}:${startTime}`;
+
+ log.info({
+ serverId: this.config.id,
+ serverName: this.config.name,
+ toolName,
+ input,
+ inputKeys: input ? Object.keys(input) : [],
+ }, 'MCP Tool: Executing tool call');
+
+ try {
+ log.debug({
+ serverId: this.config.id,
+ toolName,
+ fullInput: JSON.stringify(input, null, 2),
+ }, 'MCP Tool: Full input payload');
+
+ const result = await this.client.callTool({
+ name: toolName,
+ arguments: input || {},
+ });
+
+ const durationMs = Date.now() - startTime;
+
+ log.info({
+ serverId: this.config.id,
+ toolName,
+ durationMs,
+ resultType: typeof result.content,
+ resultLength: JSON.stringify(result.content).length,
+ }, 'MCP Tool: Raw result received');
+
+ const toolResult: MCPToolResult = {
+ id,
+ serverId: this.config.id,
+ toolName,
+ status: 'success',
+ result: result.content,
+ durationMs,
+ timestamp: new Date().toISOString(),
+ };
+
+ this.emit('tool-result', toolResult);
+ log.info({ serverId: this.config.id, toolName, durationMs }, 'Tool execution completed');
+
+ return toolResult;
+ } catch (error) {
+ const durationMs = Date.now() - startTime;
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
+
+ const toolResult: MCPToolResult = {
+ id,
+ serverId: this.config.id,
+ toolName,
+ status: 'error',
+ error: errorMessage,
+ durationMs,
+ timestamp: new Date().toISOString(),
+ };
+
+ this.emit('tool-result', toolResult);
+ log.error({ serverId: this.config.id, toolName, error }, 'Tool execution failed');
+
+ return toolResult;
+ }
+ }
+
+ /**
+ * Disconnect from the server
+ */
+ async disconnect(reason: string = 'Manual disconnect'): Promise<void> {
+ if (this.connectionStatus === 'disconnected') {
+ return;
+ }
+
+ log.info({ serverId: this.config.id, reason }, 'Disconnecting from MCP server');
+
+ try {
+ if (this.transport) {
+ await this.transport.close();
+ this.transport = null;
+ }
+
+ this.client = null;
+ this.tools = [];
+ this.connectionStatus = 'disconnected';
+
+ this.emit('disconnected', { serverId: this.config.id, reason });
+ } catch (error) {
+ log.error({ serverId: this.config.id, error }, 'Error during disconnect');
+ this.connectionStatus = 'disconnected';
+ this.emit('disconnected', { serverId: this.config.id, reason: 'Error during disconnect' });
+ }
+ }
+
+ /**
+ * Update configuration (requires reconnect)
+ */
+ updateConfig(config: Partial<MCPServerConfig>): void {
+ this.config = { ...this.config, ...config };
+ }
+
+ /**
+ * Check if a specific tool is available
+ */
+ hasTool(toolName: string): boolean {
+ return this.tools.some((t) => t.name === toolName);
+ }
+
+ /**
+ * Get a specific tool by name
+ */
+ getTool(toolName: string): MCPTool | undefined {
+ return this.tools.find((t) => t.name === toolName);
+ }
+}
+
+export default MCPClientService;
diff --git a/src/main/services/mcp/result-handler.service.ts b/src/main/services/mcp/result-handler.service.ts
new file mode 100644
index 0000000..dde21b3
--- /dev/null
+++ b/src/main/services/mcp/result-handler.service.ts
@@ -0,0 +1,382 @@
+/**
+ * Result Handler Service
+ *
+ * Transforms MCP tool results into display format for the UI.
+ * Determines the best display type (cue-card, panel, modal, toast) based on content.
+ */
+
+import { v4 as uuid } from 'uuid';
+import { logger } from '../../lib/logger';
+import type {
+ MCPToolResult,
+ MCPDisplayResult,
+ MCPDisplayType,
+ MCPDisplayContent,
+ MCPTool,
+} from '../../../shared/types/mcp.types';
+
+const log = logger.child({ module: 'mcp-result-handler' });
+
+// Content type detection patterns
+const CONTENT_PATTERNS = {
+ markdown: /^#|^\*\*|^\-\s|^```|^\|/m,
+ table: /^\|.*\|$/m,
+ json: /^\{[\s\S]*\}$|^\[[\s\S]*\]$/,
+ list: /^[\-\*]\s+/m,
+};
+
+export class ResultHandlerService {
+ /**
+ * Transform a tool result into a display result
+ */
+ transformResult(
+ result: MCPToolResult,
+ tool?: MCPTool,
+ serverName?: string
+ ): MCPDisplayResult {
+ const displayType = this.determineDisplayType(result, tool);
+ const content = this.extractContent(result);
+ const title = this.generateTitle(result, tool);
+
+ const displayResult: MCPDisplayResult = {
+ id: uuid(),
+ toolCallId: result.id,
+ serverId: result.serverId,
+ serverName: serverName || result.serverId,
+ toolName: result.toolName,
+ displayType,
+ title,
+ content,
+ timestamp: result.timestamp,
+ dismissed: false,
+ pinned: false,
+ };
+
+ log.info({
+ toolCallId: result.id,
+ displayType,
+ hasContent: !!content,
+ }, 'Transformed tool result for display');
+
+ return displayResult;
+ }
+
+ /**
+ * Determine the best display type based on content
+ */
+ private determineDisplayType(result: MCPToolResult, tool?: MCPTool): MCPDisplayType {
+ // Errors should be toasts
+ if (result.status === 'error') {
+ return 'toast';
+ }
+
+ const content = result.result;
+
+ // No content or minimal content -> toast
+ if (!content) {
+ return 'toast';
+ }
+
+ // Check content size and type
+ const contentStr = typeof content === 'string' ? content : JSON.stringify(content);
+
+ // Large content -> panel
+ if (contentStr.length > 1000) {
+ return 'panel';
+ }
+
+ // Structured data (tables, lists) -> cue-card
+ if (this.isStructuredData(content)) {
+ return 'cue-card';
+ }
+
+ // Based on tool type
+ if (tool) {
+ const toolName = tool.name.toLowerCase();
+
+ // CRM results -> cue-card
+ if (toolName.includes('contact') || toolName.includes('company') || toolName.includes('deal')) {
+ return 'cue-card';
+ }
+
+ // Search results -> panel
+ if (toolName.includes('search')) {
+ return 'panel';
+ }
+
+ // Calendar -> cue-card
+ if (toolName.includes('calendar') || toolName.includes('schedule')) {
+ return 'cue-card';
+ }
+
+ // Memory/notes -> toast for small, cue-card for larger
+ if (toolName.includes('memory') || toolName.includes('note')) {
+ return contentStr.length > 200 ? 'cue-card' : 'toast';
+ }
+ }
+
+ // Default to cue-card
+ return 'cue-card';
+ }
+
+ /**
+ * Check if content is structured data
+ */
+ private isStructuredData(content: unknown): boolean {
+ if (typeof content === 'object' && content !== null) {
+ // Arrays or objects with multiple keys
+ if (Array.isArray(content) && content.length > 0) {
+ return true;
+ }
+ if (Object.keys(content).length > 2) {
+ return true;
+ }
+ }
+
+ if (typeof content === 'string') {
+ // Check for table or list patterns
+ return CONTENT_PATTERNS.table.test(content) || CONTENT_PATTERNS.list.test(content);
+ }
+
+ return false;
+ }
+
+ /**
+ * Extract and format content from the result
+ */
+ private extractContent(result: MCPToolResult): MCPDisplayContent {
+ const content: MCPDisplayContent = {};
+
+ if (result.status === 'error') {
+ content.text = result.error || 'Unknown error';
+ return content;
+ }
+
+ const rawContent = result.result;
+
+ if (!rawContent) {
+ content.text = 'No results found';
+ return content;
+ }
+
+ // Handle MCP tool result format (array of content blocks)
+ if (Array.isArray(rawContent)) {
+ return this.extractFromContentBlocks(rawContent);
+ }
+
+ // Handle string content
+ if (typeof rawContent === 'string') {
+ if (CONTENT_PATTERNS.markdown.test(rawContent)) {
+ content.markdown = rawContent;
+ } else {
+ content.text = rawContent;
+ }
+ return content;
+ }
+
+ // Handle object content
+ if (typeof rawContent === 'object') {
+ return this.extractFromObject(rawContent as Record<string, unknown>);
+ }
+
+ // Fallback
+ content.raw = rawContent;
+ return content;
+ }
+
+ /**
+ * Extract content from MCP content blocks
+ */
+ private extractFromContentBlocks(blocks: unknown[]): MCPDisplayContent {
+ const content: MCPDisplayContent = {};
+ const textParts: string[] = [];
+
+ for (const block of blocks) {
+ if (typeof block === 'object' && block !== null) {
+ const b = block as Record<string, unknown>;
+
+ // Text content block
+ if (b.type === 'text' && typeof b.text === 'string') {
+ textParts.push(b.text);
+ }
+
+ // Resource content block
+ if (b.type === 'resource' && b.resource) {
+ const resource = b.resource as Record<string, unknown>;
+ if (typeof resource.text === 'string') {
+ textParts.push(resource.text);
+ }
+ }
+ }
+ }
+
+ if (textParts.length > 0) {
+ const combinedText = textParts.join('\n\n');
+
+ if (CONTENT_PATTERNS.markdown.test(combinedText)) {
+ content.markdown = combinedText;
+ } else {
+ content.text = combinedText;
+ }
+ } else {
+ content.raw = blocks;
+ }
+
+ return content;
+ }
+
+ /**
+ * Extract content from an object
+ */
+ private extractFromObject(obj: Record<string, unknown>): MCPDisplayContent {
+ const content: MCPDisplayContent = {};
+
+ // Check for specific known formats
+ if (obj.text && typeof obj.text === 'string') {
+ content.text = obj.text;
+ return content;
+ }
+
+ if (obj.markdown && typeof obj.markdown === 'string') {
+ content.markdown = obj.markdown;
+ return content;
+ }
+
+ // Extract as properties
+ const properties: Record<string, string | number | boolean> = {};
+ const items: MCPDisplayContent['items'] = [];
+
+ for (const [key, value] of Object.entries(obj)) {
+ // Skip internal/metadata fields
+ if (key.startsWith('_') || key === 'id') continue;
+
+ if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
+ properties[key] = value;
+
+ // Also add as items for display
+ items.push({
+ label: this.formatLabel(key),
+ value: String(value),
+ type: this.detectValueType(value),
+ });
+ }
+ }
+
+ if (Object.keys(properties).length > 0) {
+ content.properties = properties;
+ content.items = items;
+ } else {
+ content.raw = obj;
+ }
+
+ return content;
+ }
+
+ /**
+ * Format a key as a label
+ */
+ private formatLabel(key: string): string {
+ return key
+ .replace(/_/g, ' ')
+ .replace(/([a-z])([A-Z])/g, '$1 $2')
+ .replace(/\b\w/g, (c) => c.toUpperCase());
+ }
+
+ /**
+ * Detect value type for display
+ */
+ private detectValueType(value: unknown): 'text' | 'link' | 'badge' {
+ if (typeof value === 'string') {
+ if (value.match(/^https?:\/\//)) return 'link';
+ if (value.match(/^[\w.-]+@[\w.-]+\.\w+$/)) return 'link';
+ }
+ return 'text';
+ }
+
+ /**
+ * Generate a title for the display result
+ */
+ private generateTitle(result: MCPToolResult, tool?: MCPTool): string {
+ if (result.status === 'error') {
+ return `Error: ${result.toolName}`;
+ }
+
+ // Use tool description if available
+ if (tool?.description) {
+ return tool.description.split('.')[0]; // First sentence
+ }
+
+ // Format tool name as title
+ return result.toolName
+ .replace(/_/g, ' ')
+ .replace(/([a-z])([A-Z])/g, '$1 $2')
+ .replace(/\b\w/g, (c) => c.toUpperCase());
+ }
+
+ /**
+ * Create an error display result
+ */
+ createErrorResult(
+ serverId: string,
+ serverName: string,
+ toolName: string,
+ error: string
+ ): MCPDisplayResult {
+ return {
+ id: uuid(),
+ toolCallId: uuid(),
+ serverId,
+ serverName,
+ toolName,
+ displayType: 'toast',
+ title: `Error: ${toolName}`,
+ content: {
+ text: error,
+ },
+ timestamp: new Date().toISOString(),
+ dismissed: false,
+ pinned: false,
+ };
+ }
+
+ /**
+ * Create a loading/pending display result
+ */
+ createPendingResult(
+ serverId: string,
+ serverName: string,
+ toolName: string
+ ): MCPDisplayResult {
+ return {
+ id: uuid(),
+ toolCallId: uuid(),
+ serverId,
+ serverName,
+ toolName,
+ displayType: 'toast',
+ title: `Loading: ${this.formatLabel(toolName)}`,
+ content: {
+ text: 'Fetching data...',
+ },
+ timestamp: new Date().toISOString(),
+ dismissed: false,
+ pinned: false,
+ };
+ }
+}
+
+// Singleton instance
+let instance: ResultHandlerService | null = null;
+
+export function getResultHandler(): ResultHandlerService {
+ if (!instance) {
+ instance = new ResultHandlerService();
+ }
+ return instance;
+}
+
+export function resetResultHandler(): void {
+ instance = null;
+}
+
+export default ResultHandlerService;
diff --git a/src/main/services/mcp/tool-aggregator.service.ts b/src/main/services/mcp/tool-aggregator.service.ts
new file mode 100644
index 0000000..ff8ad5b
--- /dev/null
+++ b/src/main/services/mcp/tool-aggregator.service.ts
@@ -0,0 +1,215 @@
+/**
+ * Tool Aggregator Service
+ *
+ * Aggregates tools from all connected MCP servers and provides
+ * namespaced access to prevent naming conflicts. Format: serverId:toolName
+ */
+
+import { logger } from '../../lib/logger';
+import { getConnectionRegistry, ConnectionRegistryService } from './connection-registry.service';
+import type { MCPTool, MCPToolResult } from '../../../shared/types/mcp.types';
+
+const log = logger.child({ module: 'mcp-tool-aggregator' });
+
+export interface NamespacedTool extends MCPTool {
+ namespacedName: string;
+}
+
+export interface ToolLookupResult {
+ tool: MCPTool;
+ serverId: string;
+ serverName: string;
+}
+
+export class ToolAggregatorService {
+ private registry: ConnectionRegistryService;
+
+ constructor() {
+ this.registry = getConnectionRegistry();
+ }
+
+ /**
+ * Get all tools with namespaced names
+ */
+ getAllTools(): NamespacedTool[] {
+ const tools = this.registry.getAllTools();
+
+ return tools.map((tool) => ({
+ ...tool,
+ namespacedName: `${tool.serverId}:${tool.name}`,
+ }));
+ }
+
+ /**
+ * Get tools grouped by server
+ */
+ getToolsByServer(): Record<string, MCPTool[]> {
+ const toolsByServer: Record<string, MCPTool[]> = {};
+
+ for (const entry of this.registry.getAll()) {
+ if (entry.status === 'connected') {
+ toolsByServer[entry.config.id] = entry.client.getTools();
+ }
+ }
+
+ return toolsByServer;
+ }
+
+ /**
+ * Find a tool by its simple name (returns first match)
+ */
+ findToolByName(toolName: string): ToolLookupResult | undefined {
+ const result = this.registry.findTool(toolName);
+ if (!result) return undefined;
+
+ return {
+ tool: result.tool,
+ serverId: result.tool.serverId,
+ serverName: result.tool.serverName,
+ };
+ }
+
+ /**
+ * Find a tool by its namespaced name (serverId:toolName)
+ */
+ findToolByNamespace(namespacedName: string): ToolLookupResult | undefined {
+ const result = this.registry.findToolByNamespace(namespacedName);
+ if (!result) return undefined;
+
+ return {
+ tool: result.tool,
+ serverId: result.tool.serverId,
+ serverName: result.tool.serverName,
+ };
+ }
+
+ /**
+ * Find all tools matching a name pattern
+ */
+ findToolsByPattern(pattern: string | RegExp): NamespacedTool[] {
+ const tools = this.getAllTools();
+ const regex = typeof pattern === 'string' ? new RegExp(pattern, 'i') : pattern;
+
+ return tools.filter((tool) =>
+ regex.test(tool.name) || regex.test(tool.description || '')
+ );
+ }
+
+ /**
+ * Search tools by keywords in name or description
+ */
+ searchTools(query: string): NamespacedTool[] {
+ const tools = this.getAllTools();
+ const queryLower = query.toLowerCase();
+ const keywords = queryLower.split(/\s+/);
+
+ return tools.filter((tool) => {
+ const searchText = `${tool.name} ${tool.description || ''}`.toLowerCase();
+ return keywords.some((kw) => searchText.includes(kw));
+ });
+ }
+
+ /**
+ * Get tools that match specific categories/intents
+ */
+ getToolsForIntent(intent: string): NamespacedTool[] {
+ const intentKeywords: Record<string, string[]> = {
+ crm: ['contact', 'deal', 'company', 'lead', 'account', 'opportunity', 'customer'],
+ search: ['search', 'find', 'lookup', 'query', 'get'],
+ calendar: ['calendar', 'schedule', 'meeting', 'event', 'availability'],
+ docs: ['document', 'page', 'content', 'note', 'wiki'],
+ memory: ['memory', 'remember', 'store', 'recall', 'note'],
+ };
+
+ const keywords = intentKeywords[intent.toLowerCase()] || [intent.toLowerCase()];
+ const tools = this.getAllTools();
+
+ return tools.filter((tool) => {
+ const searchText = `${tool.name} ${tool.description || ''}`.toLowerCase();
+ return keywords.some((kw) => searchText.includes(kw));
+ });
+ }
+
+ /**
+ * Execute a tool by namespaced name
+ */
+ async executeTool(
+ namespacedName: string,
+ input?: Record<string, unknown>
+ ): Promise<MCPToolResult> {
+ const result = this.registry.findToolByNamespace(namespacedName);
+ if (!result) {
+ throw new Error(`Tool ${namespacedName} not found`);
+ }
+
+ return result.client.executeTool(result.tool.name, input);
+ }
+
+ /**
+ * Check if a specific tool is available
+ */
+ hasTool(nameOrNamespace: string): boolean {
+ // Try namespaced first
+ if (nameOrNamespace.includes(':')) {
+ return !!this.registry.findToolByNamespace(nameOrNamespace);
+ }
+
+ // Then try simple name
+ return !!this.registry.findTool(nameOrNamespace);
+ }
+
+ /**
+ * Get tool count
+ */
+ getToolCount(): { total: number; byServer: Record<string, number> } {
+ const byServer: Record<string, number> = {};
+ let total = 0;
+
+ for (const entry of this.registry.getAll()) {
+ if (entry.status === 'connected') {
+ const count = entry.client.getTools().length;
+ byServer[entry.config.id] = count;
+ total += count;
+ }
+ }
+
+ return { total, byServer };
+ }
+
+ /**
+ * Get a summary of available tools for LLM context
+ */
+ getToolsSummary(): string {
+ const toolsByServer = this.getToolsByServer();
+ const lines: string[] = ['Available MCP Tools:'];
+
+ for (const [serverId, tools] of Object.entries(toolsByServer)) {
+ const entry = this.registry.getEntry(serverId);
+ const serverName = entry?.config.name || serverId;
+
+ lines.push(`\n## ${serverName}`);
+
+ for (const tool of tools) {
+ lines.push(`- ${tool.name}: ${tool.description || 'No description'}`);
+ }
+ }
+
+ return lines.join('\n');
+ }
+}
+
+// Singleton instance
+let instance: ToolAggregatorService | null = null;
+
+export function getToolAggregator(): ToolAggregatorService {
+ if (!instance) {
+ instance = new ToolAggregatorService();
+ }
+ return instance;
+}
+
+export function resetToolAggregator(): void {
+ instance = null;
+}
+
+export default ToolAggregatorService;
diff --git a/src/main/services/tunnel.service.ts b/src/main/services/tunnel.service.ts
new file mode 100644
index 0000000..9601cd1
--- /dev/null
+++ b/src/main/services/tunnel.service.ts
@@ -0,0 +1,175 @@
+import { spawn, ChildProcess } from 'child_process';
+import { EventEmitter } from 'events';
+import { createChildLogger } from '../lib/logger';
+import { getCloudflaredBinaryPath } from '../lib/paths';
+import type { TunnelStatus } from '../../shared/schemas/config.schema';
+
+const logger = createChildLogger('tunnel-service');
+
+interface TunnelConnection {
+ url: string;
+ process: ChildProcess;
+ stop: () => void;
+}
+
+let activeTunnel: TunnelConnection | null = null;
+let tunnelStatus: TunnelStatus = {
+ connected: false,
+};
+
+// Regex to extract the tunnel URL from cloudflared output
+const URL_REGEX = /https:\/\/[a-z0-9-]+\.trycloudflare\.com/i;
+
+export class TunnelService {
+ private _port: number;
+
+ constructor(port: number) {
+ this._port = port;
+ }
+
+ /**
+ * Get the port this tunnel service is configured for
+ */
+ getPort(): number {
+ return this._port;
+ }
+
+ async start(): Promise<TunnelStatus> {
+ logger.info({ port: this._port, hasActiveTunnel: !!activeTunnel }, '🚇 TunnelService.start() called');
+
+ if (activeTunnel) {
+ logger.info('🚇 Tunnel already running at: ' + activeTunnel.url);
+ return tunnelStatus;
+ }
+
+ try {
+ logger.info({ port: this._port }, '🚇 Starting cloudflare tunnel...');
+
+ const binPath = getCloudflaredBinaryPath();
+ logger.info({ binPath }, '🚇 Using cloudflared binary');
+
+ // Spawn cloudflared with quick tunnel
+ const args = ['tunnel', '--url', `http://localhost:${this._port}`];
+ const child = spawn(binPath, args, { stdio: ['ignore', 'pipe', 'pipe'] });
+
+ // Wait for the URL with a timeout
+ const timeoutMs = 30000;
+
+ const url = await new Promise<string>((resolve, reject) => {
+ let resolved = false;
+
+ const timeout = setTimeout(() => {
+ if (!resolved) {
+ resolved = true;
+ child.kill('SIGTERM');
+ reject(new Error(`Tunnel startup timed out after ${timeoutMs}ms`));
+ }
+ }, timeoutMs);
+
+ const handleOutput = (data: Buffer) => {
+ const output = data.toString();
+ logger.debug({ output: output.trim() }, 'Cloudflared output');
+
+ const match = output.match(URL_REGEX);
+ if (match && !resolved) {
+ resolved = true;
+ clearTimeout(timeout);
+ resolve(match[0]);
+ }
+ };
+
+ child.stdout?.on('data', handleOutput);
+ child.stderr?.on('data', handleOutput);
+
+ child.on('error', (err) => {
+ if (!resolved) {
+ resolved = true;
+ clearTimeout(timeout);
+ reject(err);
+ }
+ });
+
+ child.on('exit', (code) => {
+ if (!resolved) {
+ resolved = true;
+ clearTimeout(timeout);
+ reject(new Error(`Cloudflared exited with code ${code} before URL was received`));
+ }
+ });
+ });
+
+ logger.info({ url }, '🚇 Tunnel started successfully - webhook URL: ' + url + '/api/webhook');
+
+ activeTunnel = {
+ url,
+ process: child,
+ stop: () => child.kill('SIGTERM'),
+ };
+
+ tunnelStatus = {
+ connected: true,
+ url,
+ };
+
+ // Handle process exit after successful start
+ child.on('exit', (code: number | null) => {
+ logger.info({ code }, 'Tunnel process exited');
+ activeTunnel = null;
+ tunnelStatus = {
+ connected: false,
+ error: code !== 0 ? `Process exited with code ${code}` : undefined,
+ };
+ });
+
+ return tunnelStatus;
+ } catch (error) {
+ logger.error({ error }, '❌ Failed to start tunnel - webhooks will NOT work!');
+ logger.error('Make sure cloudflared is installed or the binary is accessible');
+ tunnelStatus = {
+ connected: false,
+ error: error instanceof Error ? error.message : 'Unknown error',
+ };
+ return tunnelStatus;
+ }
+ }
+
+ async stop(): Promise<void> {
+ if (activeTunnel) {
+ logger.info('Stopping tunnel');
+ activeTunnel.stop();
+ activeTunnel = null;
+ tunnelStatus = {
+ connected: false,
+ };
+ }
+ }
+
+ getStatus(): TunnelStatus {
+ return tunnelStatus;
+ }
+
+ getUrl(): string | undefined {
+ return activeTunnel?.url;
+ }
+
+ isConnected(): boolean {
+ return tunnelStatus.connected;
+ }
+}
+
+let tunnelServiceInstance: TunnelService | null = null;
+
+export function getTunnelService(port: number): TunnelService {
+ if (!tunnelServiceInstance || tunnelServiceInstance.getPort() !== port) {
+ tunnelServiceInstance = new TunnelService(port);
+ }
+ return tunnelServiceInstance;
+}
+
+export function getTunnelStatus(): TunnelStatus {
+ return tunnelStatus;
+}
+
+export function getTunnelUrl(): string | undefined {
+ return activeTunnel?.url;
+}
diff --git a/src/main/services/videodb.service.ts b/src/main/services/videodb.service.ts
new file mode 100644
index 0000000..72a4f2f
--- /dev/null
+++ b/src/main/services/videodb.service.ts
@@ -0,0 +1,216 @@
+// eslint-disable-next-line @typescript-eslint/no-var-requires
+const videodb = require('videodb');
+const { connect } = videodb;
+type Connection = ReturnType<typeof connect>;
+
+import { createChildLogger } from '../lib/logger';
+
+const logger = createChildLogger('videodb-service');
+
+interface CachedConnection {
+ connection: Connection;
+ apiKey: string;
+}
+
+let cachedConnection: CachedConnection | null = null;
+
+export class VideoDBService {
+ private apiKey: string;
+ private baseUrl?: string;
+
+ constructor(apiKey: string, baseUrl?: string) {
+ this.apiKey = apiKey;
+ this.baseUrl = baseUrl;
+ }
+
+ private getConnection(): Connection {
+ if (cachedConnection && cachedConnection.apiKey === this.apiKey) {
+ return cachedConnection.connection;
+ }
+
+ logger.info('Creating new VideoDB connection');
+
+ const connection = this.baseUrl
+ ? connect({ apiKey: this.apiKey, baseUrl: this.baseUrl })
+ : connect({ apiKey: this.apiKey });
+
+ cachedConnection = {
+ connection,
+ apiKey: this.apiKey,
+ };
+
+ return connection;
+ }
+
+ async verifyApiKey(): Promise<boolean> {
+ try {
+ const conn = this.getConnection();
+ logger.info('Attempting to verify API key by getting collection...');
+ await conn.getCollection();
+ logger.info('API key verified successfully');
+ return true;
+ } catch (error: unknown) {
+ const errorMessage = error instanceof Error ? error.message : String(error);
+ const errorStack = error instanceof Error ? error.stack : undefined;
+ logger.error({
+ errorMessage,
+ errorStack,
+ errorType: error?.constructor?.name
+ }, 'API key verification failed');
+ return false;
+ }
+ }
+
+ async createSessionToken(
+ userId: string = 'default-user',
+ expiresIn: number = 86400
+ ): Promise<{
+ sessionToken: string;
+ expiresIn: number;
+ expiresAt: number;
+ }> {
+ const conn = this.getConnection();
+
+ logger.info({ userId, expiresIn }, 'Creating session token');
+
+ // SDK signature: generateClientToken(expiresIn?: number) => Promise<string>
+ const sessionToken = await conn.generateClientToken(expiresIn);
+
+ const expiresAt = Math.floor(Date.now() / 1000) + expiresIn;
+
+ return {
+ sessionToken,
+ expiresIn,
+ expiresAt,
+ };
+ }
+
+ async createCaptureSession(params: {
+ endUserId: string;
+ callbackUrl?: string;
+ metadata?: Record<string, unknown>;
+ wsConnectionId?: string;
+ }): Promise<{
+ sessionId: string;
+ collectionId: string;
+ endUserId: string;
+ status: string;
+ callbackUrl: string;
+ }> {
+ const conn = this.getConnection();
+
+ logger.info({ endUserId: params.endUserId, callbackUrl: params.callbackUrl }, 'Creating capture session');
+
+ const collection = await conn.getCollection();
+
+ const sessionOptions: {
+ endUserId: string;
+ callbackUrl?: string;
+ metadata?: Record<string, unknown>;
+ } = {
+ endUserId: params.endUserId,
+ };
+
+ if (params.callbackUrl) {
+ sessionOptions.callbackUrl = params.callbackUrl;
+ }
+
+ if (params.metadata) {
+ sessionOptions.metadata = params.metadata;
+ }
+
+ const session = await collection.createCaptureSession(sessionOptions);
+
+ logger.info({ sessionId: session.id }, 'Capture session created');
+
+ return {
+ sessionId: session.id,
+ collectionId: collection.id,
+ endUserId: params.endUserId,
+ status: 'created',
+ callbackUrl: params.callbackUrl || '',
+ };
+ }
+
+ async getVideo(videoId: string) {
+ const conn = this.getConnection();
+ const collection = await conn.getCollection();
+ return collection.getVideo(videoId);
+ }
+
+ async indexVideo(videoId: string): Promise<void> {
+ logger.info({ videoId }, 'Indexing video for spoken words');
+ const video = await this.getVideo(videoId);
+ await video.indexSpokenWords();
+ logger.info({ videoId }, 'Video indexed successfully');
+ }
+
+ async generateInsights(videoId: string, customPrompt?: string): Promise<string | null> {
+ logger.info({ videoId }, 'Generating AI insights');
+ const conn = this.getConnection();
+ const collection = await conn.getCollection();
+ const video = await this.getVideo(videoId);
+
+ // Fetch transcript text (like Python version)
+ let transcriptText: string | null = null;
+ try {
+ transcriptText = await video.getTranscriptText();
+ } catch (error) {
+ logger.warn({ error, videoId }, 'Failed to get transcript');
+ }
+
+ // Check if transcript exists (like Python version)
+ if (!transcriptText || transcriptText.trim().length === 0) {
+ logger.info({ videoId }, 'No transcript available, skipping insight generation');
+ return null;
+ }
+
+ // Construct the full prompt with transcript (matching Python's format exactly)
+ const prompt = customPrompt || `Analyze the following meeting transcript and generate a comprehensive meeting report in markdown format.
+
+**Output Structure:**
+## 📋 Meeting Summary
+A brief 2-3 sentence executive summary of the meeting.
+
+## 🎯 Key Discussion Points
+- Bullet points of the main topics discussed
+
+## 💡 Key Decisions
+- Any decisions that were made during the meeting
+---
+
+Transcript:
+${transcriptText}`;
+
+ const result = await collection.generateText(prompt, 'ultra');
+
+ logger.info({ videoId }, 'Insights generated successfully');
+
+ // Handle both string and object responses (like Python version)
+ let generatedText: string;
+ if (typeof result === 'string') {
+ generatedText = result;
+ } else {
+ const resultObj = result as Record<string, unknown>;
+ generatedText = (resultObj.output as string) ||
+ (resultObj.text as string) ||
+ ((resultObj.data as Record<string, unknown>)?.text as string) || '';
+ }
+
+ if (!generatedText) {
+ logger.warn({ videoId }, 'Empty response from text generation SDK');
+ return null;
+ }
+
+ return generatedText.trim();
+ }
+
+ static clearCache(): void {
+ cachedConnection = null;
+ logger.info('VideoDB connection cache cleared');
+ }
+}
+
+export function createVideoDBService(apiKey: string, baseUrl?: string): VideoDBService {
+ return new VideoDBService(apiKey, baseUrl);
+}
diff --git a/src/main/utils/encryption.ts b/src/main/utils/encryption.ts
new file mode 100644
index 0000000..c8cada3
--- /dev/null
+++ b/src/main/utils/encryption.ts
@@ -0,0 +1,162 @@
+import crypto from 'crypto';
+import { app } from 'electron';
+import path from 'path';
+import fs from 'fs';
+import { logger } from '../lib/logger';
+
+const ALGORITHM = 'aes-256-gcm';
+const KEY_LENGTH = 32; // 256 bits
+const IV_LENGTH = 16; // 128 bits
+const AUTH_TAG_LENGTH = 16;
+const KEY_FILE_NAME = '.mcp-encryption-key';
+
+let encryptionKey: Buffer | null = null;
+
+/**
+ * Gets the path to the encryption key file
+ */
+function getKeyPath(): string {
+ const userDataPath = app.getPath('userData');
+ return path.join(userDataPath, KEY_FILE_NAME);
+}
+
+/**
+ * Generates a new encryption key and saves it to disk
+ */
+function generateKey(): Buffer {
+ const key = crypto.randomBytes(KEY_LENGTH);
+ const keyPath = getKeyPath();
+
+ // Write key with restricted permissions
+ fs.writeFileSync(keyPath, key.toString('hex'), { mode: 0o600 });
+ logger.info('Generated new MCP encryption key');
+
+ return key;
+}
+
+/**
+ * Loads the encryption key from disk, generating one if it doesn't exist
+ */
+function loadKey(): Buffer {
+ if (encryptionKey) {
+ return encryptionKey;
+ }
+
+ const keyPath = getKeyPath();
+
+ try {
+ if (fs.existsSync(keyPath)) {
+ const keyHex = fs.readFileSync(keyPath, 'utf-8');
+ encryptionKey = Buffer.from(keyHex, 'hex');
+
+ if (encryptionKey.length !== KEY_LENGTH) {
+ logger.warn('Invalid encryption key length, regenerating');
+ encryptionKey = generateKey();
+ }
+ } else {
+ encryptionKey = generateKey();
+ }
+ } catch (error) {
+ logger.error({ error }, 'Failed to load encryption key, generating new one');
+ encryptionKey = generateKey();
+ }
+
+ return encryptionKey;
+}
+
+/**
+ * Encrypts a plaintext string using AES-256-GCM
+ * @param plaintext - The string to encrypt
+ * @returns Base64-encoded ciphertext with IV and auth tag
+ */
+export function encrypt(plaintext: string): string {
+ const key = loadKey();
+ const iv = crypto.randomBytes(IV_LENGTH);
+
+ const cipher = crypto.createCipheriv(ALGORITHM, key, iv);
+
+ let encrypted = cipher.update(plaintext, 'utf8');
+ encrypted = Buffer.concat([encrypted, cipher.final()]);
+
+ const authTag = cipher.getAuthTag();
+
+ // Combine IV + authTag + ciphertext
+ const combined = Buffer.concat([iv, authTag, encrypted]);
+
+ return combined.toString('base64');
+}
+
+/**
+ * Decrypts a ciphertext string encrypted with encrypt()
+ * @param ciphertext - Base64-encoded ciphertext with IV and auth tag
+ * @returns Decrypted plaintext string
+ */
+export function decrypt(ciphertext: string): string {
+ const key = loadKey();
+ const combined = Buffer.from(ciphertext, 'base64');
+
+ // Extract IV, authTag, and ciphertext
+ const iv = combined.subarray(0, IV_LENGTH);
+ const authTag = combined.subarray(IV_LENGTH, IV_LENGTH + AUTH_TAG_LENGTH);
+ const encrypted = combined.subarray(IV_LENGTH + AUTH_TAG_LENGTH);
+
+ const decipher = crypto.createDecipheriv(ALGORITHM, key, iv);
+ decipher.setAuthTag(authTag);
+
+ let decrypted = decipher.update(encrypted);
+ decrypted = Buffer.concat([decrypted, decipher.final()]);
+
+ return decrypted.toString('utf8');
+}
+
+/**
+ * Encrypts a credentials object (for env vars or headers)
+ * @param creds - Record of credential key-value pairs
+ * @returns Encrypted JSON string
+ */
+export function encryptCredentials(creds: Record<string, string>): string {
+ const json = JSON.stringify(creds);
+ return encrypt(json);
+}
+
+/**
+ * Decrypts credentials encrypted with encryptCredentials()
+ * @param encrypted - Encrypted credentials string
+ * @returns Decrypted credentials object
+ */
+export function decryptCredentials(encrypted: string): Record<string, string> {
+ try {
+ const json = decrypt(encrypted);
+ return JSON.parse(json);
+ } catch (error) {
+ logger.error({ error }, 'Failed to decrypt credentials');
+ return {};
+ }
+}
+
+/**
+ * Tests if encryption/decryption is working properly
+ * @returns true if working, false otherwise
+ */
+export function testEncryption(): boolean {
+ try {
+ const testData = 'test-encryption-' + Date.now();
+ const encrypted = encrypt(testData);
+ const decrypted = decrypt(encrypted);
+ return decrypted === testData;
+ } catch (error) {
+ logger.error({ error }, 'Encryption test failed');
+ return false;
+ }
+}
+
+/**
+ * Resets the encryption key (for testing purposes)
+ */
+export function resetEncryptionKey(): void {
+ encryptionKey = null;
+ const keyPath = getKeyPath();
+ if (fs.existsSync(keyPath)) {
+ fs.unlinkSync(keyPath);
+ }
+}
diff --git a/src/preload/index.ts b/src/preload/index.ts
new file mode 100644
index 0000000..6389c5b
--- /dev/null
+++ b/src/preload/index.ts
@@ -0,0 +1,459 @@
+import { contextBridge, ipcRenderer } from 'electron';
+import type { IpcApi, RecorderEvent, PermissionStatus, StartRecordingParams } from '../shared/types/ipc.types';
+import type { Channel } from '../shared/schemas/capture.schema';
+
+// Copilot event types
+export interface CopilotTranscriptSegment {
+ id: string;
+ recordingId: number;
+ sessionId: string;
+ channel: 'me' | 'them';
+ text: string;
+ startTime: number;
+ endTime: number;
+ isFinal: boolean;
+}
+
+export interface CopilotMetrics {
+ talkRatio: { me: number; them: number };
+ pace: number;
+ questionsAsked: number;
+ monologueDetected: boolean;
+ longestMonologue: number;
+ totalDuration: number;
+ callDuration: number;
+ wordCount: { me: number; them: number };
+ segmentCount: { me: number; them: number };
+}
+
+export interface CopilotSentiment {
+ current: 'positive' | 'neutral' | 'negative';
+ trend: 'improving' | 'stable' | 'declining';
+ averageScore: number;
+ history: Array<{ time: number; sentiment: string; text: string }>;
+}
+
+export interface CopilotNudge {
+ id: string;
+ type: string;
+ message: string;
+ severity: 'low' | 'medium' | 'high';
+ dismissible: boolean;
+ timestamp: number;
+}
+
+export interface CopilotCueCard {
+ triggerId: string;
+ id: string;
+ objectionType: string;
+ title: string;
+ talkTracks: string[];
+ followUpQuestions: string[];
+ proofPoints?: string[];
+ avoidSaying?: string[];
+ triggerText: string;
+ segmentId: string;
+ timestamp: number;
+ status: 'active' | 'pinned' | 'dismissed';
+ confidence: number;
+}
+
+export interface CopilotPlaybookItem {
+ id: string;
+ label: string;
+ description: string;
+ status: 'missing' | 'partial' | 'covered';
+ keywords: string[];
+ suggestedQuestions: string[];
+ evidence: Array<{ segmentId: string; timestamp: number; excerpt: string; confidence: number }>;
+}
+
+export interface CopilotPlaybookSnapshot {
+ playbookId: string;
+ playbookName: string;
+ covered: number;
+ partial: number;
+ missing: number;
+ total: number;
+ coveragePercentage: number;
+ items: CopilotPlaybookItem[];
+ recommendations: string[];
+}
+
+export interface CopilotCallSummary {
+ bullets: string[];
+ customerPain: string[];
+ customerGoals: string[];
+ objections: Array<{ type: string; text: string; response?: string; resolved: boolean; timestamp: number }>;
+ commitments: Array<{ who: 'me' | 'them'; commitment: string; timestamp: number }>;
+ nextSteps: Array<{ action: string; owner: 'me' | 'them' | 'both'; priority: string; deadline?: string }>;
+ keyDecisions: string[];
+ riskFlags: string[];
+ generatedAt: number;
+}
+
+export interface CopilotApi {
+ initialize: (apiKey: string) => Promise<{ success: boolean; error?: string }>;
+ startCall: (recordingId: number, sessionId: string) => Promise<{ success: boolean; error?: string }>;
+ endCall: () => Promise<{ success: boolean; summary?: CopilotCallSummary; error?: string }>;
+ sendTranscript: (channel: 'me' | 'them', data: { text: string; is_final: boolean; start: number; end: number }) => Promise<{ success: boolean; error?: string }>;
+ updateConfig: (config: Partial<{
+ enableTranscription: boolean;
+ enableMetrics: boolean;
+ enableSentiment: boolean;
+ enableNudges: boolean;
+ enableCueCards: boolean;
+ enablePlaybook: boolean;
+ playbookId?: string;
+ useLLMForDetection: boolean;
+ }>) => Promise<{ success: boolean; error?: string }>;
+ getState: () => Promise<{
+ success: boolean;
+ data?: {
+ state: { recordingId: number; sessionId: string; startTime: number; isActive: boolean } | null;
+ metrics: CopilotMetrics | null;
+ sentiment: CopilotSentiment | null;
+ playbook: CopilotPlaybookSnapshot | null;
+ isActive: boolean;
+ };
+ error?: string;
+ }>;
+ dismissCueCard: (triggerId: string) => Promise<{ success: boolean; error?: string }>;
+ pinCueCard: (triggerId: string) => Promise<{ success: boolean; error?: string }>;
+ cueCardFeedback: (triggerId: string, feedback: 'helpful' | 'wrong' | 'irrelevant') => Promise<{ success: boolean; error?: string }>;
+ dismissNudge: (nudgeId: string) => Promise<{ success: boolean; error?: string }>;
+ getPlaybooks: () => Promise<{ success: boolean; playbooks?: any[]; error?: string }>;
+ getCueCards: () => Promise<{ success: boolean; cueCards?: any[]; error?: string }>;
+ createBookmark: (data: { recordingId: number; timestamp: number; category: string; note?: string }) => Promise<{ success: boolean; bookmark?: any; error?: string }>;
+ getBookmarks: (recordingId: number) => Promise<{ success: boolean; bookmarks?: any[]; error?: string }>;
+}
+
+export interface CopilotEvents {
+ onTranscript: (callback: (segment: CopilotTranscriptSegment) => void) => () => void;
+ onMetrics: (callback: (data: { metrics: CopilotMetrics; health: number }) => void) => () => void;
+ onSentiment: (callback: (data: { sentiment: CopilotSentiment }) => void) => () => void;
+ onNudge: (callback: (data: { nudge: CopilotNudge }) => void) => () => void;
+ onCueCard: (callback: (data: { cueCard: CopilotCueCard }) => void) => () => void;
+ onPlaybook: (callback: (data: { item: CopilotPlaybookItem; snapshot: CopilotPlaybookSnapshot }) => void) => () => void;
+ onCallEnded: (callback: (data: { summary: CopilotCallSummary; playbook?: CopilotPlaybookSnapshot; metrics: CopilotMetrics; duration: number }) => void) => () => void;
+ onError: (callback: (data: { error: string; context?: string }) => void) => () => void;
+}
+
+// MCP Types
+export interface MCPServerConfig {
+ id: string;
+ name: string;
+ transport: 'stdio' | 'http';
+ command?: string;
+ args?: string[];
+ url?: string;
+ templateId?: string;
+ isEnabled: boolean;
+ autoConnect: boolean;
+ connectionStatus: 'disconnected' | 'connecting' | 'connected' | 'error';
+ lastError?: string | null;
+ lastConnectedAt?: string | null;
+ createdAt: string;
+ updatedAt: string;
+}
+
+export interface MCPTool {
+ name: string;
+ description?: string;
+ inputSchema?: object;
+ serverId: string;
+ serverName: string;
+}
+
+export interface MCPDisplayResult {
+ id: string;
+ toolCallId: string;
+ serverId: string;
+ serverName: string;
+ toolName: string;
+ displayType: 'cue-card' | 'panel' | 'modal' | 'toast';
+ title: string;
+ content: {
+ text?: string;
+ markdown?: string;
+ items?: Array<{ label: string; value: string; type?: string }>;
+ properties?: Record<string, string | number | boolean>;
+ raw?: unknown;
+ };
+ timestamp: string;
+ dismissed?: boolean;
+ pinned?: boolean;
+}
+
+export interface MCPServerTemplate {
+ id: string;
+ name: string;
+ description: string;
+ icon?: string;
+ transport: 'stdio' | 'http';
+ defaultCommand?: string;
+ defaultArgs?: string[];
+ defaultUrl?: string;
+ requiredEnvVars?: Array<{ key: string; label: string; description?: string; placeholder?: string; secret?: boolean }>;
+ requiredHeaders?: Array<{ key: string; label: string; description?: string; placeholder?: string; secret?: boolean }>;
+ docsUrl?: string;
+ setupInstructions?: string;
+}
+
+export interface MCPApi {
+ // Server management
+ getServers: () => Promise<{ success: boolean; servers?: MCPServerConfig[]; connectionStates?: Record<string, { status: string; error?: string }>; error?: string }>;
+ getServer: (serverId: string) => Promise<{ success: boolean; server?: MCPServerConfig; error?: string }>;
+ createServer: (request: {
+ name: string;
+ transport: 'stdio' | 'http';
+ command?: string;
+ args?: string[];
+ env?: Record<string, string>;
+ url?: string;
+ headers?: Record<string, string>;
+ templateId?: string;
+ isEnabled?: boolean;
+ autoConnect?: boolean;
+ }) => Promise<{ success: boolean; server?: MCPServerConfig; error?: string }>;
+ updateServer: (serverId: string, request: {
+ name?: string;
+ command?: string;
+ args?: string[];
+ env?: Record<string, string>;
+ url?: string;
+ headers?: Record<string, string>;
+ isEnabled?: boolean;
+ autoConnect?: boolean;
+ }) => Promise<{ success: boolean; server?: MCPServerConfig; error?: string }>;
+ deleteServer: (serverId: string) => Promise<{ success: boolean; error?: string }>;
+
+ // Connection management
+ connect: (serverId: string) => Promise<{ success: boolean; tools?: MCPTool[]; error?: string }>;
+ disconnect: (serverId: string) => Promise<{ success: boolean; error?: string }>;
+ testConnection: (serverId: string) => Promise<{ success: boolean; result?: { success: boolean; tools?: MCPTool[]; latencyMs?: number; error?: string }; error?: string }>;
+
+ // Tools
+ getTools: () => Promise<{ success: boolean; tools?: MCPTool[]; error?: string }>;
+ executeTool: (serverId: string, toolName: string, input?: Record<string, unknown>) => Promise<{ success: boolean; result?: MCPDisplayResult; error?: string }>;
+
+ // Templates
+ getTemplates: () => Promise<{ success: boolean; templates?: MCPServerTemplate[]; error?: string }>;
+ getTemplate: (templateId: string) => Promise<{ success: boolean; template?: MCPServerTemplate; error?: string }>;
+
+ // History
+ getToolCalls: (recordingId: number) => Promise<{ success: boolean; calls?: any[]; error?: string }>;
+
+ // Results
+ dismissResult: (resultId: string) => Promise<{ success: boolean; error?: string }>;
+ pinResult: (resultId: string) => Promise<{ success: boolean; error?: string }>;
+
+ // Trigger Keywords
+ getTriggerKeywords: () => Promise<{ success: boolean; keywords: string[]; error?: string }>;
+ setTriggerKeywords: (keywords: string[]) => Promise<{ success: boolean; error?: string }>;
+}
+
+export interface MCPEvents {
+ onResult: (callback: (data: { result: MCPDisplayResult }) => void) => () => void;
+ onError: (callback: (data: { serverId: string; toolName: string; error: string }) => void) => () => void;
+ onServerConnected: (callback: (data: { serverId: string; tools: MCPTool[] }) => void) => () => void;
+ onServerDisconnected: (callback: (data: { serverId: string; reason: string }) => void) => () => void;
+ onServerError: (callback: (data: { serverId: string; error: string }) => void) => () => void;
+}
+
+const api: IpcApi = {
+ capture: {
+ startRecording: (params: StartRecordingParams) =>
+ ipcRenderer.invoke('recorder-start-recording', params),
+ stopRecording: () => ipcRenderer.invoke('recorder-stop-recording'),
+ pauseTracks: (tracks: string[]) => ipcRenderer.invoke('recorder-pause-tracks', tracks),
+ resumeTracks: (tracks: string[]) => ipcRenderer.invoke('recorder-resume-tracks', tracks),
+ listChannels: (sessionToken: string, apiUrl?: string) =>
+ ipcRenderer.invoke('recorder-list-channels', sessionToken, apiUrl),
+ },
+
+ permissions: {
+ checkMicPermission: () => ipcRenderer.invoke('check-mic-permission'),
+ checkScreenPermission: () => ipcRenderer.invoke('check-screen-permission'),
+ checkAccessibilityPermission: () => ipcRenderer.invoke('check-accessibility-permission'),
+ requestMicPermission: () => ipcRenderer.invoke('request-mic-permission'),
+ requestScreenPermission: () => ipcRenderer.invoke('request-screen-permission'),
+ openSystemSettings: (pane: string) => ipcRenderer.invoke('open-system-settings', pane),
+ getStatus: (): Promise<PermissionStatus> => ipcRenderer.invoke('get-permission-status'),
+ },
+
+ app: {
+ getSettings: () => ipcRenderer.invoke('get-settings'),
+ getServerPort: () => ipcRenderer.invoke('get-server-port'),
+ logout: () => ipcRenderer.invoke('logout'),
+ openExternalLink: (url: string) => ipcRenderer.invoke('open-external-link', url),
+ showNotification: (title: string, body: string) =>
+ ipcRenderer.invoke('show-notification', title, body),
+ openPlayerWindow: (url: string) => ipcRenderer.invoke('open-player-window', url),
+ },
+
+ on: {
+ recorderEvent: (callback: (event: RecorderEvent) => void) => {
+ const listener = (_event: Electron.IpcRendererEvent, data: RecorderEvent) => {
+ callback(data);
+ };
+ ipcRenderer.on('recorder-event', listener);
+ return () => {
+ ipcRenderer.removeListener('recorder-event', listener);
+ };
+ },
+
+ authRequired: (callback: () => void) => {
+ const listener = () => {
+ callback();
+ };
+ ipcRenderer.on('auth-required', listener);
+ return () => {
+ ipcRenderer.removeListener('auth-required', listener);
+ };
+ },
+ },
+
+ // Meeting Co-Pilot API
+ copilot: {
+ initialize: (apiKey: string) => ipcRenderer.invoke('copilot:initialize', apiKey),
+ startCall: (recordingId: number, sessionId: string) => ipcRenderer.invoke('copilot:start-call', recordingId, sessionId),
+ endCall: () => ipcRenderer.invoke('copilot:end-call'),
+ sendTranscript: (channel: 'me' | 'them', data: { text: string; is_final: boolean; start: number; end: number }) =>
+ ipcRenderer.invoke('copilot:transcript', channel, data),
+ updateConfig: (config: any) => ipcRenderer.invoke('copilot:update-config', config),
+ getState: () => ipcRenderer.invoke('copilot:get-state'),
+ dismissCueCard: (triggerId: string) => ipcRenderer.invoke('copilot:dismiss-cue-card', triggerId),
+ pinCueCard: (triggerId: string) => ipcRenderer.invoke('copilot:pin-cue-card', triggerId),
+ cueCardFeedback: (triggerId: string, feedback: 'helpful' | 'wrong' | 'irrelevant') =>
+ ipcRenderer.invoke('copilot:cue-card-feedback', triggerId, feedback),
+ dismissNudge: (nudgeId: string) => ipcRenderer.invoke('copilot:dismiss-nudge', nudgeId),
+ getPlaybooks: () => ipcRenderer.invoke('copilot:get-playbooks'),
+ getCueCards: () => ipcRenderer.invoke('copilot:get-cue-cards'),
+ createBookmark: (data: { recordingId: number; timestamp: number; category: string; note?: string }) =>
+ ipcRenderer.invoke('copilot:create-bookmark', data),
+ getBookmarks: (recordingId: number) => ipcRenderer.invoke('copilot:get-bookmarks', recordingId),
+ } as CopilotApi,
+
+ // Copilot event listeners
+ copilotOn: {
+ onTranscript: (callback: (segment: CopilotTranscriptSegment) => void) => {
+ const listener = (_event: Electron.IpcRendererEvent, data: CopilotTranscriptSegment) => callback(data);
+ ipcRenderer.on('copilot:transcript', listener);
+ return () => ipcRenderer.removeListener('copilot:transcript', listener);
+ },
+ onMetrics: (callback: (data: { metrics: CopilotMetrics; health: number }) => void) => {
+ const listener = (_event: Electron.IpcRendererEvent, data: any) => callback(data);
+ ipcRenderer.on('copilot:metrics', listener);
+ return () => ipcRenderer.removeListener('copilot:metrics', listener);
+ },
+ onSentiment: (callback: (data: { sentiment: CopilotSentiment }) => void) => {
+ const listener = (_event: Electron.IpcRendererEvent, data: any) => callback(data);
+ ipcRenderer.on('copilot:sentiment', listener);
+ return () => ipcRenderer.removeListener('copilot:sentiment', listener);
+ },
+ onNudge: (callback: (data: { nudge: CopilotNudge }) => void) => {
+ const listener = (_event: Electron.IpcRendererEvent, data: any) => callback(data);
+ ipcRenderer.on('copilot:nudge', listener);
+ return () => ipcRenderer.removeListener('copilot:nudge', listener);
+ },
+ onCueCard: (callback: (data: { cueCard: CopilotCueCard }) => void) => {
+ const listener = (_event: Electron.IpcRendererEvent, data: any) => callback(data);
+ ipcRenderer.on('copilot:cue-card', listener);
+ return () => ipcRenderer.removeListener('copilot:cue-card', listener);
+ },
+ onPlaybook: (callback: (data: { item: CopilotPlaybookItem; snapshot: CopilotPlaybookSnapshot }) => void) => {
+ const listener = (_event: Electron.IpcRendererEvent, data: any) => callback(data);
+ ipcRenderer.on('copilot:playbook', listener);
+ return () => ipcRenderer.removeListener('copilot:playbook', listener);
+ },
+ onCallEnded: (callback: (data: { summary: CopilotCallSummary; playbook?: CopilotPlaybookSnapshot; metrics: CopilotMetrics; duration: number }) => void) => {
+ const listener = (_event: Electron.IpcRendererEvent, data: any) => callback(data);
+ ipcRenderer.on('copilot:call-ended', listener);
+ return () => ipcRenderer.removeListener('copilot:call-ended', listener);
+ },
+ onError: (callback: (data: { error: string; context?: string }) => void) => {
+ const listener = (_event: Electron.IpcRendererEvent, data: any) => callback(data);
+ ipcRenderer.on('copilot:error', listener);
+ return () => ipcRenderer.removeListener('copilot:error', listener);
+ },
+ } as CopilotEvents,
+
+ // MCP API
+ mcp: {
+ // Server management
+ getServers: () => ipcRenderer.invoke('mcp:get-servers'),
+ getServer: (serverId: string) => ipcRenderer.invoke('mcp:get-server', serverId),
+ createServer: (request: any) => ipcRenderer.invoke('mcp:create-server', request),
+ updateServer: (serverId: string, request: any) => ipcRenderer.invoke('mcp:update-server', serverId, request),
+ deleteServer: (serverId: string) => ipcRenderer.invoke('mcp:delete-server', serverId),
+
+ // Connection management
+ connect: (serverId: string) => ipcRenderer.invoke('mcp:connect', serverId),
+ disconnect: (serverId: string) => ipcRenderer.invoke('mcp:disconnect', serverId),
+ testConnection: (serverId: string) => ipcRenderer.invoke('mcp:test-connection', serverId),
+
+ // Tools
+ getTools: () => ipcRenderer.invoke('mcp:get-tools'),
+ executeTool: (serverId: string, toolName: string, input?: Record<string, unknown>) =>
+ ipcRenderer.invoke('mcp:execute-tool', serverId, toolName, input),
+
+ // Templates
+ getTemplates: () => ipcRenderer.invoke('mcp:get-templates'),
+ getTemplate: (templateId: string) => ipcRenderer.invoke('mcp:get-template', templateId),
+
+ // History
+ getToolCalls: (recordingId: number) => ipcRenderer.invoke('mcp:get-tool-calls', recordingId),
+
+ // Results
+ dismissResult: (resultId: string) => ipcRenderer.invoke('mcp:dismiss-result', resultId),
+ pinResult: (resultId: string) => ipcRenderer.invoke('mcp:pin-result', resultId),
+
+ // Trigger Keywords
+ getTriggerKeywords: () => ipcRenderer.invoke('mcp:get-trigger-keywords'),
+ setTriggerKeywords: (keywords: string[]) => ipcRenderer.invoke('mcp:set-trigger-keywords', keywords),
+ } as MCPApi,
+
+ // MCP event listeners
+ mcpOn: {
+ onResult: (callback: (data: { result: MCPDisplayResult }) => void) => {
+ const listener = (_event: Electron.IpcRendererEvent, data: any) => callback(data);
+ ipcRenderer.on('mcp:result', listener);
+ return () => ipcRenderer.removeListener('mcp:result', listener);
+ },
+ onError: (callback: (data: { serverId: string; toolName: string; error: string }) => void) => {
+ const listener = (_event: Electron.IpcRendererEvent, data: any) => callback(data);
+ ipcRenderer.on('mcp:error', listener);
+ return () => ipcRenderer.removeListener('mcp:error', listener);
+ },
+ onServerConnected: (callback: (data: { serverId: string; tools: MCPTool[] }) => void) => {
+ const listener = (_event: Electron.IpcRendererEvent, data: any) => callback(data);
+ ipcRenderer.on('mcp:server-connected', listener);
+ return () => ipcRenderer.removeListener('mcp:server-connected', listener);
+ },
+ onServerDisconnected: (callback: (data: { serverId: string; reason: string }) => void) => {
+ const listener = (_event: Electron.IpcRendererEvent, data: any) => callback(data);
+ ipcRenderer.on('mcp:server-disconnected', listener);
+ return () => ipcRenderer.removeListener('mcp:server-disconnected', listener);
+ },
+ onServerError: (callback: (data: { serverId: string; error: string }) => void) => {
+ const listener = (_event: Electron.IpcRendererEvent, data: any) => callback(data);
+ ipcRenderer.on('mcp:server-error', listener);
+ return () => ipcRenderer.removeListener('mcp:server-error', listener);
+ },
+ } as MCPEvents,
+};
+
+contextBridge.exposeInMainWorld('electronAPI', api);
+
+// Type declaration for window.electronAPI
+declare global {
+ interface Window {
+ electronAPI: IpcApi & {
+ copilot: CopilotApi;
+ copilotOn: CopilotEvents;
+ mcp: MCPApi;
+ mcpOn: MCPEvents;
+ };
+ }
+}
diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx
new file mode 100644
index 0000000..d9ba99e
--- /dev/null
+++ b/src/renderer/App.tsx
@@ -0,0 +1,535 @@
+import { useState } from 'react';
+import { Sidebar } from './components/layout/Sidebar';
+import { MainContent } from './components/layout/MainContent';
+import { AuthView } from './components/auth/AuthView';
+import { StreamToggles } from './components/recording/StreamToggles';
+import { TopStatusBar } from './components/recording/TopStatusBar';
+import { TranscriptionPanel } from './components/transcription/TranscriptionPanel';
+import { HistoryView } from './components/history/HistoryView';
+import { useConfigStore } from './stores/config.store';
+import { useSession } from './hooks/useSession';
+import { useSessionStore } from './stores/session.store';
+import { usePermissions } from './hooks/usePermissions';
+import { useGlobalRecorderEvents } from './hooks/useGlobalRecorderEvents';
+import { useCopilot } from './hooks/useCopilot';
+import { Card, CardContent, CardHeader, CardTitle, CardDescription } from './components/ui/card';
+import { Button } from './components/ui/button';
+import { Badge } from './components/ui/badge';
+import { ErrorToast } from './components/ui/error-toast';
+import { AlertCircle, Shield, BookOpen, X, Mic, Users, Gauge, Loader2 } from 'lucide-react';
+import {
+ CueCardOverlay,
+ PlaybookPanel,
+ NudgeToast,
+ SentimentIndicator,
+ CallSummaryView,
+} from './components/copilot';
+import { MCPResultsOverlay } from './components/mcp';
+import { useCopilotStore } from './stores/copilot.store';
+import { CueCardEditor } from './components/settings/CueCardEditor';
+import { PlaybookEditor } from './components/settings/PlaybookEditor';
+import { PromptsEditor } from './components/settings/PromptsEditor';
+import { MCPServersPanel } from './components/settings/MCPServersPanel';
+import { cn } from './lib/utils';
+
+type Tab = 'recording' | 'history' | 'settings';
+
+function PermissionsView() {
+ const { status, requestMicPermission, openSettings } = usePermissions();
+
+ return (
+ <div className="max-w-md mx-auto mt-20">
+ <Card>
+ <CardHeader>
+ <div className="flex items-center gap-2">
+ <Shield className="h-5 w-5 text-primary" />
+ <CardTitle>Permissions Required</CardTitle>
+ </div>
+ <CardDescription>
+ Meeting Copilot needs access to record your screen and microphone.
+ </CardDescription>
+ </CardHeader>
+ <CardContent className="space-y-4">
+ <div className="flex items-center justify-between p-3 rounded-lg border">
+ <div>
+ <p className="font-medium text-sm">Microphone</p>
+ <p className="text-xs text-muted-foreground">Required for voice recording</p>
+ </div>
+ {status.microphone ? (
+ <span className="text-xs text-green-600 font-medium">Granted</span>
+ ) : (
+ <Button size="sm" onClick={requestMicPermission}>
+ Grant
+ </Button>
+ )}
+ </div>
+
+ <div className="flex items-center justify-between p-3 rounded-lg border">
+ <div>
+ <p className="font-medium text-sm">Screen Recording</p>
+ <p className="text-xs text-muted-foreground">Required for screen capture</p>
+ </div>
+ {status.screen ? (
+ <span className="text-xs text-green-600 font-medium">Granted</span>
+ ) : (
+ <Button size="sm" onClick={() => openSettings('screen')}>
+ Open Settings
+ </Button>
+ )}
+ </div>
+
+ {!status.screen && (
+ <div className="flex items-start gap-2 p-3 bg-muted rounded-lg">
+ <AlertCircle className="h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5" />
+ <p className="text-xs text-muted-foreground">
+ Screen Recording permission must be granted in System Preferences. Click "Open
+ Settings" and enable Meeting Copilot in the list.
+ </p>
+ </div>
+ )}
+ </CardContent>
+ </Card>
+ </div>
+ );
+}
+
+function PlaybookModal({
+ isOpen,
+ onClose,
+}: {
+ isOpen: boolean;
+ onClose: () => void;
+}) {
+ if (!isOpen) return null;
+
+ return (
+ <div
+ className="fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 animate-in fade-in duration-200 p-8"
+ onClick={onClose}
+ >
+ <Card
+ className="w-full max-w-2xl max-h-full overflow-hidden flex flex-col animate-in zoom-in-95 duration-200"
+ onClick={(e) => e.stopPropagation()}
+ >
+ <CardHeader className="border-b flex flex-row items-center justify-between shrink-0">
+ <div>
+ <CardTitle>Playbook Progress</CardTitle>
+ <CardDescription>Track your discovery progress</CardDescription>
+ </div>
+ <Button variant="ghost" size="icon" onClick={onClose}>
+ <X className="h-5 w-5" />
+ </Button>
+ </CardHeader>
+ <CardContent className="p-4 flex-1 overflow-hidden min-h-0">
+ <PlaybookPanel className="h-full" />
+ </CardContent>
+ </Card>
+ </div>
+ );
+}
+
+function MetricsSidebar() {
+ const { metrics, healthScore, isCallActive } = useCopilotStore();
+
+ if (!isCallActive || !metrics) {
+ return null;
+ }
+
+ const mePercent = Math.round(metrics.talkRatio.me * 100);
+ const themPercent = Math.round(metrics.talkRatio.them * 100);
+
+ const getHealthColor = () => {
+ if (healthScore >= 80) return 'text-green-500';
+ if (healthScore >= 60) return 'text-amber-500';
+ return 'text-red-500';
+ };
+
+ const getHealthLabel = () => {
+ if (healthScore >= 80) return 'Great';
+ if (healthScore >= 60) return 'Good';
+ if (healthScore >= 40) return 'Fair';
+ return 'Needs Work';
+ };
+
+ return (
+ <Card>
+ <CardHeader className="pb-2">
+ <div className="flex items-center justify-between">
+ <CardTitle className="text-sm font-medium flex items-center gap-2">
+ <Gauge className="h-4 w-4" />
+ Conversation Metrics
+ </CardTitle>
+ <Badge variant="outline" className="text-xs">
+ {Math.floor(metrics.callDuration / 60)}:{String(Math.floor(metrics.callDuration % 60)).padStart(2, '0')}
+ </Badge>
+ </div>
+ </CardHeader>
+ <CardContent className="space-y-4">
+ {/* Health Score */}
+ <div className="flex items-center justify-between p-3 bg-gradient-to-r from-muted/50 to-muted rounded-lg">
+ <div>
+ <p className="text-sm font-medium">Conversation Health</p>
+ <p className="text-xs text-muted-foreground">{getHealthLabel()}</p>
+ </div>
+ <div className="flex items-center gap-2">
+ <div className={cn('text-3xl font-bold', getHealthColor())}>{healthScore}</div>
+ <span className="text-sm text-muted-foreground">/100</span>
+ </div>
+ </div>
+
+ {/* Talk Ratio */}
+ <div>
+ <p className="text-xs font-medium text-muted-foreground mb-2">Talk Ratio</p>
+ <div className="space-y-2">
+ <div className="flex justify-between text-xs text-muted-foreground">
+ <span className="flex items-center gap-1">
+ <Mic className="h-3 w-3" />
+ You: {mePercent}%
+ </span>
+ <span className="flex items-center gap-1">
+ <Users className="h-3 w-3" />
+ Them: {themPercent}%
+ </span>
+ </div>
+ <div className="h-3 flex rounded-full overflow-hidden bg-muted">
+ <div
+ className={cn(
+ 'transition-all duration-500',
+ mePercent > 65 ? 'bg-amber-500' : mePercent >= 35 ? 'bg-green-500' : 'bg-blue-500'
+ )}
+ style={{ width: `${mePercent}%` }}
+ />
+ <div className="bg-slate-400 transition-all duration-500" style={{ width: `${themPercent}%` }} />
+ </div>
+ </div>
+ </div>
+
+ {/* Speaking Pace */}
+ <div className="flex items-center justify-between p-2 rounded-lg bg-muted/50">
+ <div className="flex items-center gap-2">
+ <Gauge className="h-4 w-4 text-muted-foreground" />
+ <span className="text-sm">Speaking Pace</span>
+ </div>
+ <span className={cn('text-lg font-semibold', metrics.pace > 180 ? 'text-amber-500' : '')}>
+ {metrics.pace} WPM
+ </span>
+ </div>
+ </CardContent>
+ </Card>
+ );
+}
+
+function RecordingView() {
+ const [showPlaybookModal, setShowPlaybookModal] = useState(false);
+ const { isCallActive, callSummary, playbook } = useCopilotStore();
+ const { status, streams, toggleStream, isStarting, isStopping } = useSession();
+
+ const isRecording = status === 'recording';
+ const isProcessing = status === 'processing' || status === 'stopping';
+
+ useCopilot();
+
+ // Show call summary view if call ended and summary available
+ if (callSummary && !isCallActive) {
+ return (
+ <div className="flex flex-col h-full overflow-hidden">
+ <TopStatusBar />
+ <div className="flex-1 overflow-hidden p-6">
+ <div className="max-w-4xl mx-auto h-full flex flex-col">
+ <div className="flex items-center justify-between mb-4 shrink-0">
+ <h2 className="text-lg font-semibold">Call Complete</h2>
+ <Button variant="outline" size="sm" onClick={() => useCopilotStore.getState().reset()}>
+ Start New Call
+ </Button>
+ </div>
+ <div className="flex-1 min-h-0 overflow-auto">
+ <CallSummaryView />
+ </div>
+ </div>
+ </div>
+ </div>
+ );
+ }
+
+ // Show processing state while generating summary (only after recording stopped)
+ if (isProcessing) {
+ return (
+ <div className="flex flex-col h-full overflow-hidden">
+ <TopStatusBar />
+ <div className="flex-1 flex items-center justify-center">
+ <div className="text-center space-y-4">
+ <div className="w-16 h-16 mx-auto rounded-full bg-primary/10 flex items-center justify-center">
+ <Loader2 className="w-8 h-8 text-primary animate-spin" />
+ </div>
+ <div>
+ <h2 className="text-lg font-semibold">Generating Call Summary</h2>
+ <p className="text-sm text-muted-foreground mt-1">
+ Analyzing your conversation and preparing insights...
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ );
+ }
+
+ return (
+ <div className="flex flex-col h-full bg-gradient-to-br from-slate-50 to-slate-100 dark:from-slate-950 dark:to-slate-900">
+ {/* Top Status Bar */}
+ <TopStatusBar />
+
+ {/* Main Content Area */}
+ <div className="flex-1 flex gap-4 p-4 overflow-hidden">
+ {/* Left Column - Transcription */}
+ <div className="flex-1 flex flex-col gap-4 min-w-0">
+ {/* Stream Toggles (only show when not recording) */}
+ {!isRecording && (
+ <Card className="shrink-0">
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm">Recording Sources</CardTitle>
+ </CardHeader>
+ <CardContent>
+ <StreamToggles
+ streams={streams}
+ onToggle={toggleStream}
+ disabled={isStarting || isStopping}
+ />
+ </CardContent>
+ </Card>
+ )}
+
+ {/* Transcription Panel */}
+ <div className="flex-1 min-h-0">
+ <TranscriptionPanel />
+ </div>
+ </div>
+
+ {/* Right Column - Assistance + Metrics */}
+ <div className="w-96 flex flex-col gap-4 shrink-0 overflow-hidden">
+ {/* Scrollable container for right panel */}
+ <div className="flex-1 overflow-y-auto space-y-4 pr-1">
+ {/* MCP Results Overlay - Shows tool call results */}
+ <MCPResultsOverlay />
+
+ {/* Cue Card Overlay */}
+ <CueCardOverlay />
+
+ {/* Sentiment Indicator */}
+ <SentimentIndicator />
+
+ {/* Metrics Sidebar */}
+ <MetricsSidebar />
+ </div>
+ </div>
+ </div>
+
+ {/* Floating Playbook Button */}
+ {isCallActive && playbook && (
+ <button
+ onClick={() => setShowPlaybookModal(true)}
+ className="fixed bottom-6 right-6 w-14 h-14 bg-gradient-to-br from-blue-600 to-purple-600 rounded-full shadow-lg hover:shadow-xl transition-all hover:scale-110 flex items-center justify-center text-white z-40"
+ title="View Playbook Progress"
+ >
+ <BookOpen className="w-6 h-6" />
+ {playbook.coveragePercentage < 70 && (
+ <span className="absolute -top-1 -right-1 w-5 h-5 bg-red-500 rounded-full text-xs flex items-center justify-center font-bold">
+ {playbook.missing}
+ </span>
+ )}
+ </button>
+ )}
+
+ {/* Playbook Modal */}
+ <PlaybookModal isOpen={showPlaybookModal} onClose={() => setShowPlaybookModal(false)} />
+ </div>
+ );
+}
+
+function SettingsView() {
+ const [activeSettingsTab, setActiveSettingsTab] = useState<
+ 'account' | 'cueCards' | 'playbooks' | 'prompts' | 'mcpServers'
+ >('account');
+ const configStore = useConfigStore();
+
+ const settingsTabs = [
+ { id: 'account' as const, label: 'Account' },
+ { id: 'cueCards' as const, label: 'Cue Cards' },
+ { id: 'playbooks' as const, label: 'Playbooks' },
+ { id: 'prompts' as const, label: 'AI Settings' },
+ { id: 'mcpServers' as const, label: 'MCP Servers' },
+ ];
+
+ return (
+ <div className="space-y-4 h-full overflow-auto">
+ {/* Settings Tabs */}
+ <div className="flex gap-1 p-1 bg-muted rounded-lg w-fit">
+ {settingsTabs.map((tab) => (
+ <Button
+ key={tab.id}
+ variant={activeSettingsTab === tab.id ? 'default' : 'ghost'}
+ size="sm"
+ onClick={() => setActiveSettingsTab(tab.id)}
+ >
+ {tab.label}
+ </Button>
+ ))}
+ </div>
+
+ {/* Tab Content */}
+ <div className="max-w-4xl">
+ {activeSettingsTab === 'account' && (
+ <div className="max-w-md space-y-4">
+ <Card>
+ <CardHeader>
+ <CardTitle>Account</CardTitle>
+ </CardHeader>
+ <CardContent className="space-y-2">
+ <div>
+ <p className="text-sm text-muted-foreground">Name</p>
+ <p className="font-medium">{configStore.userName || 'Not set'}</p>
+ </div>
+ <div>
+ <p className="text-sm text-muted-foreground">API Key</p>
+ <p className="font-mono text-xs">
+ {configStore.apiKey ? `${configStore.apiKey.slice(0, 8)}...` : 'Not set'}
+ </p>
+ </div>
+ </CardContent>
+ </Card>
+
+ <Card>
+ <CardHeader>
+ <CardTitle>About</CardTitle>
+ </CardHeader>
+ <CardContent className="space-y-2">
+ <p className="text-sm text-muted-foreground">
+ Meeting Copilot is a desktop app for recording meetings with real-time
+ transcription and AI-powered insights.
+ </p>
+ <p className="text-xs text-muted-foreground">
+ Built with Electron, React, and VideoDB.
+ </p>
+ </CardContent>
+ </Card>
+ </div>
+ )}
+
+ {activeSettingsTab === 'cueCards' && <CueCardEditor />}
+ {activeSettingsTab === 'playbooks' && <PlaybookEditor />}
+ {activeSettingsTab === 'prompts' && <PromptsEditor />}
+ {activeSettingsTab === 'mcpServers' && <MCPServersPanel />}
+ </div>
+ </div>
+ );
+}
+
+export function App() {
+ const [activeTab, setActiveTab] = useState<Tab>('recording');
+
+ const configStore = useConfigStore();
+ const sessionStore = useSessionStore();
+ const { allGranted, loading: permissionsLoading } = usePermissions();
+
+ // Global listener for recorder events - persists during navigation
+ useGlobalRecorderEvents();
+
+ const isAuthenticated = configStore.isAuthenticated();
+
+ // Handle clearing session errors
+ const handleDismissError = () => {
+ sessionStore.setError(null);
+ };
+
+ const getTitle = () => {
+ switch (activeTab) {
+ case 'recording':
+ return 'Recording';
+ case 'history':
+ return 'History';
+ case 'settings':
+ return 'Settings';
+ }
+ };
+
+ const renderContent = () => {
+ if (!isAuthenticated) {
+ return <AuthView />;
+ }
+
+ if (permissionsLoading) {
+ return (
+ <div className="flex items-center justify-center h-full">
+ <p className="text-muted-foreground">Checking permissions...</p>
+ </div>
+ );
+ }
+
+ if (!allGranted && activeTab === 'recording') {
+ return <PermissionsView />;
+ }
+
+ switch (activeTab) {
+ case 'recording':
+ return <RecordingView />;
+ case 'history':
+ return <HistoryView />;
+ case 'settings':
+ return <SettingsView />;
+ }
+ };
+
+ // Special layout for recording view - no MainContent header
+ if (isAuthenticated && activeTab === 'recording' && allGranted && !permissionsLoading) {
+ return (
+ <div className="flex flex-col h-screen bg-background">
+ {/* Shared titlebar for macOS traffic lights */}
+ <div className="h-12 flex items-center justify-center border-b bg-background/80 backdrop-blur-lg shrink-0 drag-region relative">
+ {/* Space for traffic lights (absolute so title can center) */}
+ <div className="absolute left-0 w-20 shrink-0" />
+ <span className="text-sm font-medium text-muted-foreground">Meeting Copilot</span>
+ </div>
+
+ {/* Main layout below titlebar */}
+ <div className="flex flex-1 overflow-hidden">
+ <Sidebar activeTab={activeTab} onTabChange={setActiveTab} />
+ <div className="flex-1 overflow-hidden">
+ <RecordingView />
+ </div>
+ </div>
+
+ {/* Global Copilot Components */}
+ <NudgeToast position="bottom" />
+ <ErrorToast
+ message={sessionStore.error}
+ onDismiss={handleDismissError}
+ position="bottom"
+ />
+ </div>
+ );
+ }
+
+ return (
+ <div className="flex flex-col h-screen bg-background">
+ {/* Shared titlebar for macOS traffic lights */}
+ <div className="h-12 flex items-center justify-center border-b bg-background/80 backdrop-blur-lg shrink-0 drag-region relative">
+ {/* Space for traffic lights (absolute so title can center) */}
+ <div className="absolute left-0 w-20 shrink-0" />
+ <span className="text-sm font-medium text-muted-foreground">Meeting Copilot</span>
+ </div>
+
+ {/* Main layout below titlebar */}
+ <div className="flex flex-1 overflow-hidden">
+ {isAuthenticated && <Sidebar activeTab={activeTab} onTabChange={setActiveTab} />}
+ <MainContent title={getTitle()}>{renderContent()}</MainContent>
+ </div>
+
+ {/* Global Copilot Components */}
+ {isAuthenticated && <NudgeToast position="bottom" />}
+ <ErrorToast
+ message={sessionStore.error}
+ onDismiss={handleDismissError}
+ position="bottom"
+ />
+ </div>
+ );
+}
diff --git a/src/renderer/api/ipc.ts b/src/renderer/api/ipc.ts
new file mode 100644
index 0000000..a8424f8
--- /dev/null
+++ b/src/renderer/api/ipc.ts
@@ -0,0 +1,17 @@
+import type { IpcApi } from '../../shared/types/ipc.types';
+
+/**
+ * Get the Electron API exposed via the preload script.
+ * Always use this function instead of a cached value to ensure the API
+ * is available even if the module loads before the preload script runs.
+ */
+export function getElectronAPI(): IpcApi | null {
+ if (typeof window !== 'undefined' && window.electronAPI) {
+ return window.electronAPI as IpcApi;
+ }
+ return null;
+}
+
+// Deprecated: Use getElectronAPI() instead for reliable access
+// This is kept for backwards compatibility but may be null if accessed too early
+export const electronAPI = getElectronAPI();
diff --git a/src/renderer/api/trpc.ts b/src/renderer/api/trpc.ts
new file mode 100644
index 0000000..5924915
--- /dev/null
+++ b/src/renderer/api/trpc.ts
@@ -0,0 +1,44 @@
+import { createTRPCReact } from '@trpc/react-query';
+import { httpBatchLink } from '@trpc/client';
+import type { AppRouter } from '../../main/server/trpc/router';
+
+export const trpc = createTRPCReact<AppRouter>();
+
+const DEFAULT_API_PORT = 51731;
+let cachedPort: number | null = null;
+
+async function getApiPort(): Promise<number> {
+ if (cachedPort !== null) return cachedPort;
+
+ try {
+ if (window.electronAPI?.app?.getServerPort) {
+ cachedPort = await window.electronAPI.app.getServerPort();
+ return cachedPort;
+ }
+ } catch {
+ // Fallback to default
+ }
+ return DEFAULT_API_PORT;
+}
+
+export function createTrpcClient(getAccessToken: () => string | null, port?: number) {
+ const apiPort = port || cachedPort || DEFAULT_API_PORT;
+
+ return trpc.createClient({
+ links: [
+ httpBatchLink({
+ url: `http://localhost:${apiPort}/api/trpc`,
+ headers() {
+ const token = getAccessToken();
+ return token
+ ? {
+ 'x-access-token': token,
+ }
+ : {};
+ },
+ }),
+ ],
+ });
+}
+
+export { getApiPort };
diff --git a/src/renderer/components/auth/AuthModal.tsx b/src/renderer/components/auth/AuthModal.tsx
new file mode 100644
index 0000000..4eb00d3
--- /dev/null
+++ b/src/renderer/components/auth/AuthModal.tsx
@@ -0,0 +1,113 @@
+import React, { useState } from 'react';
+import {
+ Dialog,
+ DialogContent,
+ DialogHeader,
+ DialogTitle,
+ DialogDescription,
+ DialogFooter,
+} from '../ui/dialog';
+import { Button } from '../ui/button';
+import { Input } from '../ui/input';
+import { useConfigStore } from '../../stores/config.store';
+import { trpc } from '../../api/trpc';
+
+interface AuthModalProps {
+ open: boolean;
+ onOpenChange: (open: boolean) => void;
+}
+
+export function AuthModal({ open, onOpenChange }: AuthModalProps) {
+ const [name, setName] = useState('');
+ const [apiKey, setApiKey] = useState('');
+ const [error, setError] = useState<string | null>(null);
+
+ const configStore = useConfigStore();
+ const registerMutation = trpc.auth.register.useMutation();
+
+ const handleSubmit = async (e: React.FormEvent) => {
+ e.preventDefault();
+ setError(null);
+
+ if (!name.trim() || !apiKey.trim()) {
+ setError('Please enter your name and API key');
+ return;
+ }
+
+ try {
+ const result = await registerMutation.mutateAsync({
+ name: name.trim(),
+ apiKey: apiKey.trim(),
+ });
+
+ if (result.success && result.accessToken) {
+ configStore.setAuth(result.accessToken, result.name || name, apiKey.trim());
+ onOpenChange(false);
+ setName('');
+ setApiKey('');
+ } else {
+ setError(result.error || 'Registration failed');
+ }
+ } catch (err) {
+ setError(err instanceof Error ? err.message : 'Registration failed');
+ }
+ };
+
+ return (
+ <Dialog open={open} onOpenChange={onOpenChange}>
+ <DialogContent>
+ <DialogHeader>
+ <DialogTitle>Welcome to Meeting Copilot</DialogTitle>
+ <DialogDescription>
+ Enter your VideoDB API key to get started. You can get one at{' '}
+ <a
+ href="https://console.videodb.io"
+ target="_blank"
+ rel="noopener noreferrer"
+ className="text-primary hover:underline"
+ >
+ console.videodb.io
+ </a>
+ </DialogDescription>
+ </DialogHeader>
+
+ <form onSubmit={handleSubmit} className="space-y-4">
+ <div className="space-y-2">
+ <label htmlFor="name" className="text-sm font-medium">
+ Your Name
+ </label>
+ <Input
+ id="name"
+ type="text"
+ placeholder="John Doe"
+ value={name}
+ onChange={(e) => setName(e.target.value)}
+ autoFocus
+ />
+ </div>
+
+ <div className="space-y-2">
+ <label htmlFor="apiKey" className="text-sm font-medium">
+ VideoDB API Key
+ </label>
+ <Input
+ id="apiKey"
+ type="password"
+ placeholder="sk-..."
+ value={apiKey}
+ onChange={(e) => setApiKey(e.target.value)}
+ />
+ </div>
+
+ {error && <p className="text-sm text-destructive">{error}</p>}
+
+ <DialogFooter>
+ <Button type="submit" disabled={registerMutation.isPending}>
+ {registerMutation.isPending ? 'Connecting...' : 'Get Started'}
+ </Button>
+ </DialogFooter>
+ </form>
+ </DialogContent>
+ </Dialog>
+ );
+}
diff --git a/src/renderer/components/auth/AuthView.tsx b/src/renderer/components/auth/AuthView.tsx
new file mode 100644
index 0000000..f00bf62
--- /dev/null
+++ b/src/renderer/components/auth/AuthView.tsx
@@ -0,0 +1,125 @@
+/**
+ * AuthView Component
+ *
+ * Inline authentication view (not a modal) for initial setup.
+ * Displays as a centered card similar to PermissionsView.
+ */
+
+import React, { useState } from 'react';
+import { Key, User } from 'lucide-react';
+import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '../ui/card';
+import { Button } from '../ui/button';
+import { Input } from '../ui/input';
+import { useConfigStore } from '../../stores/config.store';
+import { trpc } from '../../api/trpc';
+
+export function AuthView() {
+ const [name, setName] = useState('');
+ const [apiKey, setApiKey] = useState('');
+ const [error, setError] = useState<string | null>(null);
+
+ const configStore = useConfigStore();
+ const registerMutation = trpc.auth.register.useMutation();
+
+ const handleSubmit = async (e: React.FormEvent) => {
+ e.preventDefault();
+ setError(null);
+
+ if (!name.trim() || !apiKey.trim()) {
+ setError('Please enter your name and API key');
+ return;
+ }
+
+ try {
+ const result = await registerMutation.mutateAsync({
+ name: name.trim(),
+ apiKey: apiKey.trim(),
+ });
+
+ if (result.success && result.accessToken) {
+ configStore.setAuth(result.accessToken, result.name || name, apiKey.trim());
+ setName('');
+ setApiKey('');
+ } else {
+ setError(result.error || 'Registration failed');
+ }
+ } catch (err) {
+ setError(err instanceof Error ? err.message : 'Registration failed');
+ }
+ };
+
+ return (
+ <div className="max-w-md mx-auto mt-20">
+ <Card>
+ <CardHeader>
+ <div className="flex items-center gap-2">
+ <Key className="h-5 w-5 text-primary" />
+ <CardTitle>Welcome to Meeting Copilot</CardTitle>
+ </div>
+ <CardDescription>
+ Enter your details to get started. You can get a VideoDB API key at{' '}
+ <a
+ href="https://console.videodb.io"
+ target="_blank"
+ rel="noopener noreferrer"
+ className="text-primary hover:underline"
+ >
+ console.videodb.io
+ </a>
+ </CardDescription>
+ </CardHeader>
+ <CardContent>
+ <form onSubmit={handleSubmit} className="space-y-4">
+ <div className="space-y-2">
+ <label htmlFor="name" className="text-sm font-medium flex items-center gap-2">
+ <User className="h-4 w-4 text-muted-foreground" />
+ Your Name
+ </label>
+ <Input
+ id="name"
+ type="text"
+ placeholder="John Doe"
+ value={name}
+ onChange={(e) => setName(e.target.value)}
+ autoFocus
+ />
+ </div>
+
+ <div className="space-y-2">
+ <label htmlFor="apiKey" className="text-sm font-medium flex items-center gap-2">
+ <Key className="h-4 w-4 text-muted-foreground" />
+ VideoDB API Key
+ </label>
+ <Input
+ id="apiKey"
+ type="password"
+ placeholder="sk-..."
+ value={apiKey}
+ onChange={(e) => setApiKey(e.target.value)}
+ />
+ <p className="text-xs text-muted-foreground">
+ Your API key is stored locally and never shared.
+ </p>
+ </div>
+
+ {error && (
+ <div className="p-3 bg-destructive/10 border border-destructive/20 rounded-lg">
+ <p className="text-sm text-destructive">{error}</p>
+ </div>
+ )}
+
+ <Button
+ type="submit"
+ className="w-full"
+ disabled={registerMutation.isPending || !name.trim() || !apiKey.trim()}
+ >
+ {registerMutation.isPending ? 'Connecting...' : 'Get Started'}
+ </Button>
+ </form>
+ </CardContent>
+ </Card>
+ </div>
+ );
+}
+
+export default AuthView;
diff --git a/src/renderer/components/copilot/CallSummaryView.tsx b/src/renderer/components/copilot/CallSummaryView.tsx
new file mode 100644
index 0000000..2879485
--- /dev/null
+++ b/src/renderer/components/copilot/CallSummaryView.tsx
@@ -0,0 +1,398 @@
+/**
+ * Call Summary View Component
+ *
+ * Displays post-call AI-generated summary with:
+ * - Summary bullets
+ * - Customer pain points and goals
+ * - Objections and responses
+ * - Commitments
+ * - Next steps / action items
+ * - Risk flags
+ */
+
+import React, { useState } from 'react';
+import { Card, CardContent, CardHeader, CardTitle } from '../ui/card';
+import { Button } from '../ui/button';
+import { Badge } from '../ui/badge';
+import {
+ FileText,
+ Target,
+ AlertTriangle,
+ CheckCircle2,
+ Clock,
+ ChevronDown,
+ ChevronUp,
+ Copy,
+ MessageSquare,
+ Users,
+ Flag,
+ Lightbulb,
+ ArrowRight,
+} from 'lucide-react';
+import { useCopilotStore } from '../../stores/copilot.store';
+import { cn } from '../../lib/utils';
+import type { CopilotCallSummary, CopilotPlaybookSnapshot } from '../../../shared/types/ipc.types';
+
+interface SectionProps {
+ title: string;
+ icon: React.ReactNode;
+ children: React.ReactNode;
+ defaultOpen?: boolean;
+ count?: number;
+ badge?: { text: string; variant?: 'default' | 'secondary' | 'destructive' };
+}
+
+function Section({ title, icon, children, defaultOpen = true, count, badge }: SectionProps) {
+ const [isOpen, setIsOpen] = useState(defaultOpen);
+
+ return (
+ <div className="border rounded-lg">
+ <button
+ className="w-full flex items-center justify-between p-3 hover:bg-muted/50 transition-colors"
+ onClick={() => setIsOpen(!isOpen)}
+ >
+ <div className="flex items-center gap-2">
+ {icon}
+ <span className="font-medium text-sm">{title}</span>
+ {count !== undefined && (
+ <Badge variant="secondary" className="text-xs">
+ {count}
+ </Badge>
+ )}
+ {badge && (
+ <Badge variant={badge.variant || 'default'} className="text-xs">
+ {badge.text}
+ </Badge>
+ )}
+ </div>
+ {isOpen ? (
+ <ChevronUp className="h-4 w-4 text-muted-foreground" />
+ ) : (
+ <ChevronDown className="h-4 w-4 text-muted-foreground" />
+ )}
+ </button>
+ {isOpen && <div className="px-3 pb-3">{children}</div>}
+ </div>
+ );
+}
+
+function BulletList({ items, icon }: { items: string[]; icon?: React.ReactNode }) {
+ if (!items || items.length === 0) {
+ return <p className="text-sm text-muted-foreground italic">None identified</p>;
+ }
+
+ return (
+ <ul className="space-y-1.5">
+ {items.map((item, i) => (
+ <li key={i} className="text-sm flex items-start gap-2">
+ {icon || <ArrowRight className="h-3 w-3 mt-1 text-muted-foreground shrink-0" />}
+ <span>{item}</span>
+ </li>
+ ))}
+ </ul>
+ );
+}
+
+function ObjectionsList({ objections }: { objections: CopilotCallSummary['objections'] }) {
+ if (!objections || objections.length === 0) {
+ return <p className="text-sm text-muted-foreground italic">No objections raised</p>;
+ }
+
+ return (
+ <div className="space-y-2">
+ {objections.map((obj, i) => (
+ <div key={i} className="p-2 bg-muted/50 rounded-lg">
+ <div className="flex items-center gap-2 mb-1">
+ <Badge variant="outline" className="text-xs capitalize">
+ {obj.type}
+ </Badge>
+ {obj.resolved ? (
+ <Badge variant="default" className="text-xs bg-green-500">
+ Resolved
+ </Badge>
+ ) : (
+ <Badge variant="destructive" className="text-xs">
+ Open
+ </Badge>
+ )}
+ </div>
+ <p className="text-sm">{obj.text}</p>
+ {obj.response && (
+ <p className="text-xs text-muted-foreground mt-1 italic">
+ Response: "{obj.response}"
+ </p>
+ )}
+ </div>
+ ))}
+ </div>
+ );
+}
+
+function CommitmentsList({ commitments }: { commitments: CopilotCallSummary['commitments'] }) {
+ if (!commitments || commitments.length === 0) {
+ return <p className="text-sm text-muted-foreground italic">No commitments made</p>;
+ }
+
+ return (
+ <div className="space-y-2">
+ {commitments.map((com, i) => (
+ <div key={i} className="flex items-start gap-2 p-2 bg-muted/50 rounded-lg">
+ <Badge variant={com.who === 'me' ? 'default' : 'secondary'} className="text-xs shrink-0">
+ {com.who === 'me' ? 'You' : 'Customer'}
+ </Badge>
+ <p className="text-sm">{com.commitment}</p>
+ </div>
+ ))}
+ </div>
+ );
+}
+
+function NextStepsList({ nextSteps }: { nextSteps: CopilotCallSummary['nextSteps'] }) {
+ if (!nextSteps || nextSteps.length === 0) {
+ return <p className="text-sm text-muted-foreground italic">No next steps identified</p>;
+ }
+
+ const getPriorityColor = (priority: string) => {
+ switch (priority) {
+ case 'high':
+ return 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200';
+ case 'medium':
+ return 'bg-amber-100 text-amber-800 dark:bg-amber-900 dark:text-amber-200';
+ default:
+ return 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200';
+ }
+ };
+
+ return (
+ <div className="space-y-2">
+ {nextSteps.map((step, i) => (
+ <div key={i} className="flex items-start gap-2 p-2 bg-muted/50 rounded-lg">
+ <CheckCircle2 className="h-4 w-4 text-muted-foreground shrink-0 mt-0.5" />
+ <div className="flex-1 min-w-0">
+ <p className="text-sm">{step.action}</p>
+ <div className="flex items-center gap-2 mt-1">
+ <Badge variant="outline" className="text-xs">
+ {step.owner === 'me' ? 'You' : step.owner === 'them' ? 'Customer' : 'Both'}
+ </Badge>
+ <Badge className={cn("text-xs", getPriorityColor(step.priority))}>
+ {step.priority}
+ </Badge>
+ {step.deadline && (
+ <span className="text-xs text-muted-foreground flex items-center gap-1">
+ <Clock className="h-3 w-3" />
+ {step.deadline}
+ </span>
+ )}
+ </div>
+ </div>
+ </div>
+ ))}
+ </div>
+ );
+}
+
+// Main Component
+
+interface CallSummaryViewProps {
+ className?: string;
+ summary?: CopilotCallSummary;
+ playbook?: CopilotPlaybookSnapshot;
+ duration?: number;
+}
+
+export function CallSummaryView({ className, summary: propSummary, playbook: propPlaybook, duration: propDuration }: CallSummaryViewProps) {
+ const store = useCopilotStore();
+ const summary = propSummary || store.callSummary;
+ const playbook = propPlaybook || store.playbook;
+ const duration = propDuration || store.callDuration;
+ const [copied, setCopied] = useState(false);
+
+ if (!summary) {
+ return (
+ <Card className={cn("", className)}>
+ <CardHeader>
+ <CardTitle className="text-lg flex items-center gap-2">
+ <FileText className="h-5 w-5" />
+ Call Summary
+ </CardTitle>
+ </CardHeader>
+ <CardContent>
+ <p className="text-muted-foreground text-center py-8">
+ Call summary will appear here after the recording ends
+ </p>
+ </CardContent>
+ </Card>
+ );
+ }
+
+ const formatDuration = (seconds: number) => {
+ const mins = Math.floor(seconds / 60);
+ const secs = Math.floor(seconds % 60);
+ return `${mins}:${secs.toString().padStart(2, '0')}`;
+ };
+
+ const copyToClipboard = () => {
+ const text = [
+ '# Call Summary',
+ '',
+ '## Key Points',
+ ...summary.bullets.map(b => `- ${b}`),
+ '',
+ '## Customer Pain Points',
+ ...summary.customerPain.map(p => `- ${p}`),
+ '',
+ '## Next Steps',
+ ...summary.nextSteps.map(s => `- [${s.owner}] ${s.action}`),
+ ].join('\n');
+
+ navigator.clipboard.writeText(text);
+ setCopied(true);
+ setTimeout(() => setCopied(false), 2000);
+ };
+
+ const unresolvedObjections = summary.objections?.filter(o => !o.resolved).length || 0;
+
+ return (
+ <Card className={cn("", className)}>
+ <CardHeader className="pb-2">
+ <div className="flex items-center justify-between">
+ <CardTitle className="text-lg flex items-center gap-2">
+ <FileText className="h-5 w-5" />
+ Call Summary
+ </CardTitle>
+ <div className="flex items-center gap-2">
+ <Badge variant="outline" className="text-xs">
+ {formatDuration(duration)}
+ </Badge>
+ <Button variant="outline" size="sm" onClick={copyToClipboard}>
+ <Copy className="h-3 w-3 mr-1" />
+ {copied ? 'Copied!' : 'Copy'}
+ </Button>
+ </div>
+ </div>
+ </CardHeader>
+
+ <CardContent>
+ <div className="space-y-3">
+ {/* Risk Flags */}
+ {summary.riskFlags && summary.riskFlags.length > 0 && (
+ <div className="p-3 bg-red-50 dark:bg-red-950/20 rounded-lg border border-red-200 dark:border-red-800">
+ <p className="text-sm font-medium text-red-700 dark:text-red-400 flex items-center gap-2 mb-2">
+ <AlertTriangle className="h-4 w-4" />
+ Risk Flags
+ </p>
+ <ul className="space-y-1">
+ {summary.riskFlags.map((flag, i) => (
+ <li key={i} className="text-sm text-red-600 dark:text-red-300 flex items-center gap-2">
+ <Flag className="h-3 w-3" />
+ {flag}
+ </li>
+ ))}
+ </ul>
+ </div>
+ )}
+
+ {/* Summary Bullets */}
+ <Section
+ title="Summary"
+ icon={<FileText className="h-4 w-4" />}
+ count={summary.bullets?.length}
+ >
+ <BulletList items={summary.bullets} />
+ </Section>
+
+ {/* Customer Pain & Goals */}
+ <Section
+ title="Customer Pain Points"
+ icon={<Target className="h-4 w-4" />}
+ count={summary.customerPain?.length}
+ >
+ <BulletList items={summary.customerPain} />
+ </Section>
+
+ {summary.customerGoals && summary.customerGoals.length > 0 && (
+ <Section
+ title="Customer Goals"
+ icon={<Lightbulb className="h-4 w-4" />}
+ count={summary.customerGoals.length}
+ defaultOpen={false}
+ >
+ <BulletList items={summary.customerGoals} />
+ </Section>
+ )}
+
+ {/* Objections */}
+ <Section
+ title="Objections"
+ icon={<MessageSquare className="h-4 w-4" />}
+ count={summary.objections?.length}
+ badge={unresolvedObjections > 0 ? { text: `${unresolvedObjections} open`, variant: 'destructive' } : undefined}
+ >
+ <ObjectionsList objections={summary.objections} />
+ </Section>
+
+ {/* Commitments */}
+ <Section
+ title="Commitments"
+ icon={<Users className="h-4 w-4" />}
+ count={summary.commitments?.length}
+ defaultOpen={false}
+ >
+ <CommitmentsList commitments={summary.commitments} />
+ </Section>
+
+ {/* Next Steps */}
+ <Section
+ title="Next Steps"
+ icon={<CheckCircle2 className="h-4 w-4" />}
+ count={summary.nextSteps?.length}
+ >
+ <NextStepsList nextSteps={summary.nextSteps} />
+ </Section>
+
+ {/* Key Decisions */}
+ {summary.keyDecisions && summary.keyDecisions.length > 0 && (
+ <Section
+ title="Key Decisions"
+ icon={<Flag className="h-4 w-4" />}
+ count={summary.keyDecisions.length}
+ defaultOpen={false}
+ >
+ <BulletList items={summary.keyDecisions} />
+ </Section>
+ )}
+
+ {/* Playbook Summary */}
+ {playbook && (
+ <Section
+ title={`Playbook: ${playbook.playbookName}`}
+ icon={<Target className="h-4 w-4" />}
+ badge={{ text: `${playbook.coveragePercentage}%`, variant: playbook.coveragePercentage >= 70 ? 'default' : 'secondary' }}
+ defaultOpen={false}
+ >
+ <div className="space-y-2">
+ <div className="flex items-center gap-2 text-sm">
+ <span className="text-green-600">✓ {playbook.covered} covered</span>
+ <span className="text-amber-600">◐ {playbook.partial} partial</span>
+ <span className="text-muted-foreground">○ {playbook.missing} missing</span>
+ </div>
+ {playbook.recommendations && playbook.recommendations.length > 0 && (
+ <div className="pt-2">
+ <p className="text-xs font-medium text-muted-foreground mb-1">Recommendations:</p>
+ <ul className="space-y-1">
+ {playbook.recommendations.slice(0, 3).map((rec, i) => (
+ <li key={i} className="text-xs text-muted-foreground">• {rec}</li>
+ ))}
+ </ul>
+ </div>
+ )}
+ </div>
+ </Section>
+ )}
+ </div>
+ </CardContent>
+ </Card>
+ );
+}
+
+export default CallSummaryView;
diff --git a/src/renderer/components/copilot/CueCardOverlay.tsx b/src/renderer/components/copilot/CueCardOverlay.tsx
new file mode 100644
index 0000000..e3f8031
--- /dev/null
+++ b/src/renderer/components/copilot/CueCardOverlay.tsx
@@ -0,0 +1,319 @@
+/**
+ * Cue Card Overlay (Assistance Panel) Component
+ *
+ * Redesigned as a slide-in panel with:
+ * - Gradient header with objection type
+ * - Talk tracks in green boxes
+ * - Follow-up questions in blue boxes
+ * - Proof points in purple boxes
+ * - Feedback buttons
+ */
+
+import React, { useState } from 'react';
+import { Card, CardContent, CardHeader } from '../ui/card';
+import { Button } from '../ui/button';
+import { Badge } from '../ui/badge';
+import { ScrollArea } from '../ui/scroll-area';
+import {
+ X,
+ Pin,
+ ThumbsUp,
+ ThumbsDown,
+ Lightbulb,
+ Check,
+ HelpCircle,
+ BarChart3,
+ AlertCircle,
+} from 'lucide-react';
+import { useCopilotStore } from '../../stores/copilot.store';
+import { useCopilot } from '../../hooks/useCopilot';
+import { cn } from '../../lib/utils';
+import type { CopilotCueCard } from '../../../shared/types/ipc.types';
+
+// Sub-components
+
+interface CueCardItemProps {
+ cueCard: CopilotCueCard;
+ isPinned?: boolean;
+ onDismiss: (triggerId: string) => void;
+ onPin: (triggerId: string) => void;
+ onFeedback: (triggerId: string, feedback: 'helpful' | 'wrong' | 'irrelevant') => void;
+}
+
+function CueCardItem({ cueCard, isPinned, onDismiss, onPin, onFeedback }: CueCardItemProps) {
+ const [showFeedback, setShowFeedback] = useState(false);
+
+ const getObjectionGradient = (type: string) => {
+ switch (type) {
+ case 'pricing':
+ return 'from-green-50 to-emerald-50 dark:from-green-950/30 dark:to-emerald-950/30';
+ case 'timing':
+ return 'from-amber-50 to-orange-50 dark:from-amber-950/30 dark:to-orange-950/30';
+ case 'competitor':
+ return 'from-purple-50 to-violet-50 dark:from-purple-950/30 dark:to-violet-950/30';
+ case 'authority':
+ return 'from-blue-50 to-indigo-50 dark:from-blue-950/30 dark:to-indigo-950/30';
+ case 'security':
+ return 'from-red-50 to-rose-50 dark:from-red-950/30 dark:to-rose-950/30';
+ case 'integration':
+ return 'from-cyan-50 to-teal-50 dark:from-cyan-950/30 dark:to-teal-950/30';
+ default:
+ return 'from-slate-50 to-gray-50 dark:from-slate-950/30 dark:to-gray-950/30';
+ }
+ };
+
+ const getObjectionColor = (type: string) => {
+ switch (type) {
+ case 'pricing':
+ return 'bg-green-500 text-white';
+ case 'timing':
+ return 'bg-amber-500 text-white';
+ case 'competitor':
+ return 'bg-purple-500 text-white';
+ case 'authority':
+ return 'bg-blue-500 text-white';
+ case 'security':
+ return 'bg-red-500 text-white';
+ case 'integration':
+ return 'bg-cyan-500 text-white';
+ default:
+ return 'bg-slate-500 text-white';
+ }
+ };
+
+ return (
+ <Card className="overflow-hidden shadow-lg border-2 animate-in slide-in-from-right duration-300">
+ {/* Header with gradient */}
+ <CardHeader
+ className={cn('border-b p-4 bg-gradient-to-r', getObjectionGradient(cueCard.objectionType))}
+ >
+ <div className="flex items-start justify-between mb-2">
+ <div className="flex-1">
+ <Badge className={cn('mb-2 text-xs', getObjectionColor(cueCard.objectionType))}>
+ {cueCard.objectionType}
+ </Badge>
+ <h3 className="font-semibold text-base leading-tight">{cueCard.title}</h3>
+ </div>
+ <div className="flex gap-1 shrink-0">
+ {!isPinned && (
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-7 w-7"
+ onClick={() => onPin(cueCard.triggerId)}
+ title="Pin this card"
+ >
+ <Pin className="h-4 w-4" />
+ </Button>
+ )}
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-7 w-7"
+ onClick={() => onDismiss(cueCard.triggerId)}
+ title="Dismiss"
+ >
+ <X className="h-4 w-4" />
+ </Button>
+ </div>
+ </div>
+ <p className="text-sm text-slate-600 dark:text-slate-400 italic line-clamp-2">
+ "{cueCard.triggerText}"
+ </p>
+ </CardHeader>
+
+ {/* Content */}
+ <CardContent className="p-4 space-y-4">
+ {/* Talk Tracks - Say This */}
+ <div>
+ <h4 className="text-sm font-semibold text-green-600 dark:text-green-400 mb-2 flex items-center gap-2">
+ <Check className="h-4 w-4" />
+ Say This
+ </h4>
+ <div className="space-y-2">
+ {cueCard.talkTracks.slice(0, 3).map((track, idx) => (
+ <div
+ key={idx}
+ className="p-3 bg-green-50 dark:bg-green-950/30 rounded-lg border border-green-200 dark:border-green-800 hover:shadow-md transition-shadow cursor-pointer group"
+ >
+ <p className="text-sm leading-relaxed text-slate-700 dark:text-slate-300">{track}</p>
+ </div>
+ ))}
+ </div>
+ </div>
+
+ {/* Follow-up Questions - Ask This */}
+ <div>
+ <h4 className="text-sm font-semibold text-blue-600 dark:text-blue-400 mb-2 flex items-center gap-2">
+ <HelpCircle className="h-4 w-4" />
+ Ask This
+ </h4>
+ <div className="space-y-2">
+ {cueCard.followUpQuestions.slice(0, 3).map((question, idx) => (
+ <div
+ key={idx}
+ className="p-3 bg-blue-50 dark:bg-blue-950/30 rounded-lg border border-blue-200 dark:border-blue-800 hover:shadow-md transition-shadow cursor-pointer"
+ >
+ <p className="text-sm leading-relaxed text-slate-700 dark:text-slate-300">
+ {question}
+ </p>
+ </div>
+ ))}
+ </div>
+ </div>
+
+ {/* Proof Points */}
+ {cueCard.proofPoints && cueCard.proofPoints.length > 0 && (
+ <div>
+ <h4 className="text-sm font-semibold text-purple-600 dark:text-purple-400 mb-2 flex items-center gap-2">
+ <BarChart3 className="h-4 w-4" />
+ Proof Points
+ </h4>
+ <div className="space-y-2">
+ {cueCard.proofPoints.slice(0, 2).map((point, idx) => (
+ <div
+ key={idx}
+ className="p-2 bg-purple-50 dark:bg-purple-950/30 rounded-lg text-sm text-slate-600 dark:text-slate-400"
+ >
+ {point}
+ </div>
+ ))}
+ </div>
+ </div>
+ )}
+
+ {/* Avoid Saying */}
+ {cueCard.avoidSaying && cueCard.avoidSaying.length > 0 && (
+ <div>
+ <h4 className="text-sm font-semibold text-red-600 dark:text-red-400 mb-2 flex items-center gap-2">
+ <AlertCircle className="h-4 w-4" />
+ Avoid Saying
+ </h4>
+ <div className="space-y-2">
+ {cueCard.avoidSaying.slice(0, 2).map((avoid, idx) => (
+ <div
+ key={idx}
+ className="p-2 bg-red-50 dark:bg-red-950/30 rounded-lg text-sm text-slate-600 dark:text-slate-400 border border-red-200 dark:border-red-800"
+ >
+ {avoid}
+ </div>
+ ))}
+ </div>
+ </div>
+ )}
+ </CardContent>
+
+ {/* Footer - Feedback */}
+ <div className="border-t p-3 bg-slate-50 dark:bg-slate-900">
+ {!showFeedback ? (
+ <button
+ className="text-xs text-slate-500 hover:text-slate-700 dark:hover:text-slate-300"
+ onClick={() => setShowFeedback(true)}
+ >
+ Was this helpful?
+ </button>
+ ) : (
+ <div className="flex gap-2">
+ <Button
+ variant="outline"
+ size="sm"
+ className="flex-1 gap-2 h-8 text-xs"
+ onClick={() => {
+ onFeedback(cueCard.triggerId, 'helpful');
+ setShowFeedback(false);
+ }}
+ >
+ <ThumbsUp className="w-3 h-3" />
+ Helpful
+ </Button>
+ <Button
+ variant="outline"
+ size="sm"
+ className="flex-1 gap-2 h-8 text-xs"
+ onClick={() => {
+ onFeedback(cueCard.triggerId, 'wrong');
+ setShowFeedback(false);
+ }}
+ >
+ <ThumbsDown className="w-3 h-3" />
+ Wrong
+ </Button>
+ </div>
+ )}
+ </div>
+ </Card>
+ );
+}
+
+// Main Component
+
+interface CueCardOverlayProps {
+ className?: string;
+ maxCards?: number;
+}
+
+export function CueCardOverlay({ className, maxCards = 2 }: CueCardOverlayProps) {
+ const { activeCueCards, pinnedCueCards, isCallActive } = useCopilotStore();
+ const { dismissCueCard, pinCueCard, submitCueCardFeedback } = useCopilot();
+
+ const allCards = [
+ ...pinnedCueCards,
+ ...activeCueCards.slice(0, maxCards - pinnedCueCards.length),
+ ];
+
+ if (!isCallActive || allCards.length === 0) {
+ return (
+ <div className={cn('flex flex-col', className)}>
+ <div className="flex items-center justify-between mb-3">
+ <div className="flex items-center gap-2">
+ <Lightbulb className="h-4 w-4 text-amber-500" />
+ <span className="text-sm font-medium">Live Assist</span>
+ </div>
+ </div>
+ <Card className="flex-1">
+ <CardContent className="flex items-center justify-center h-full min-h-[200px]">
+ <div className="text-center">
+ <Lightbulb className="h-8 w-8 text-slate-300 dark:text-slate-600 mx-auto mb-2" />
+ <p className="text-sm text-slate-500 dark:text-slate-400">
+ {isCallActive
+ ? 'Cue cards will appear when objections are detected'
+ : 'Start recording to see live assistance'}
+ </p>
+ </div>
+ </CardContent>
+ </Card>
+ </div>
+ );
+ }
+
+ return (
+ <div className={cn('flex flex-col', className)}>
+ <div className="flex items-center justify-between mb-3">
+ <div className="flex items-center gap-2">
+ <Lightbulb className="h-4 w-4 text-amber-500" />
+ <span className="text-sm font-semibold">Live Assist</span>
+ </div>
+ <Badge variant="secondary" className="text-xs">
+ {allCards.length} active
+ </Badge>
+ </div>
+
+ <ScrollArea className="flex-1">
+ <div className="space-y-3 pr-2">
+ {allCards.map((card) => (
+ <CueCardItem
+ key={card.triggerId}
+ cueCard={card}
+ isPinned={card.status === 'pinned'}
+ onDismiss={dismissCueCard}
+ onPin={pinCueCard}
+ onFeedback={submitCueCardFeedback}
+ />
+ ))}
+ </div>
+ </ScrollArea>
+ </div>
+ );
+}
+
+export default CueCardOverlay;
diff --git a/src/renderer/components/copilot/MetricsPanel.tsx b/src/renderer/components/copilot/MetricsPanel.tsx
new file mode 100644
index 0000000..e762d73
--- /dev/null
+++ b/src/renderer/components/copilot/MetricsPanel.tsx
@@ -0,0 +1,266 @@
+/**
+ * Metrics Panel Component
+ *
+ * Displays real-time conversation metrics:
+ * - Talk ratio visualization
+ * - Speaking pace
+ * - Questions asked
+ * - Conversation health score
+ */
+
+import React from 'react';
+import { Card, CardContent, CardHeader, CardTitle } from '../ui/card';
+import { Badge } from '../ui/badge';
+import {
+ Mic,
+ Users,
+ Gauge,
+ HelpCircle,
+ AlertTriangle,
+ TrendingUp,
+ TrendingDown,
+ Minus,
+} from 'lucide-react';
+import { useCopilotStore } from '../../stores/copilot.store';
+import { cn } from '../../lib/utils';
+
+// Sub-components
+
+interface TalkRatioBarProps {
+ meRatio: number;
+ themRatio: number;
+}
+
+function TalkRatioBar({ meRatio, themRatio }: TalkRatioBarProps) {
+ const mePercent = Math.round(meRatio * 100);
+ const themPercent = Math.round(themRatio * 100);
+
+ // Ideal range is 35-55% for "me"
+ const isBalanced = meRatio >= 0.35 && meRatio <= 0.55;
+
+ return (
+ <div className="space-y-2">
+ <div className="flex justify-between text-xs text-muted-foreground">
+ <span className="flex items-center gap-1">
+ <Mic className="h-3 w-3" />
+ You: {mePercent}%
+ </span>
+ <span className="flex items-center gap-1">
+ <Users className="h-3 w-3" />
+ Them: {themPercent}%
+ </span>
+ </div>
+ <div className="h-3 flex rounded-full overflow-hidden bg-muted">
+ <div
+ className={cn(
+ "transition-all duration-500",
+ isBalanced ? "bg-green-500" : meRatio > 0.55 ? "bg-amber-500" : "bg-blue-500"
+ )}
+ style={{ width: `${mePercent}%` }}
+ />
+ <div
+ className="bg-slate-400 transition-all duration-500"
+ style={{ width: `${themPercent}%` }}
+ />
+ </div>
+ {!isBalanced && meRatio > 0.65 && (
+ <p className="text-xs text-amber-600 flex items-center gap-1">
+ <AlertTriangle className="h-3 w-3" />
+ Consider letting the customer speak more
+ </p>
+ )}
+ </div>
+ );
+}
+
+interface MetricItemProps {
+ icon: React.ReactNode;
+ label: string;
+ value: string | number;
+ subtext?: string;
+ trend?: 'up' | 'down' | 'stable';
+ warning?: boolean;
+}
+
+function MetricItem({ icon, label, value, subtext, trend, warning }: MetricItemProps) {
+ return (
+ <div className={cn(
+ "flex items-center justify-between p-2 rounded-lg",
+ warning ? "bg-amber-50 dark:bg-amber-950/20" : "bg-muted/50"
+ )}>
+ <div className="flex items-center gap-2">
+ <div className={cn(
+ "p-1.5 rounded-md",
+ warning ? "bg-amber-100 text-amber-700" : "bg-background text-muted-foreground"
+ )}>
+ {icon}
+ </div>
+ <div>
+ <p className="text-sm font-medium">{label}</p>
+ {subtext && (
+ <p className="text-xs text-muted-foreground">{subtext}</p>
+ )}
+ </div>
+ </div>
+ <div className="flex items-center gap-1">
+ <span className={cn(
+ "text-lg font-semibold",
+ warning ? "text-amber-700" : ""
+ )}>
+ {value}
+ </span>
+ {trend && (
+ <span className="text-muted-foreground">
+ {trend === 'up' && <TrendingUp className="h-4 w-4 text-green-500" />}
+ {trend === 'down' && <TrendingDown className="h-4 w-4 text-red-500" />}
+ {trend === 'stable' && <Minus className="h-4 w-4" />}
+ </span>
+ )}
+ </div>
+ </div>
+ );
+}
+
+function HealthScore({ score }: { score: number }) {
+ const getColor = () => {
+ if (score >= 80) return 'text-green-500';
+ if (score >= 60) return 'text-amber-500';
+ return 'text-red-500';
+ };
+
+ const getLabel = () => {
+ if (score >= 80) return 'Great';
+ if (score >= 60) return 'Good';
+ if (score >= 40) return 'Fair';
+ return 'Needs Work';
+ };
+
+ return (
+ <div className="flex items-center justify-between p-3 bg-gradient-to-r from-muted/50 to-muted rounded-lg">
+ <div>
+ <p className="text-sm font-medium">Conversation Health</p>
+ <p className="text-xs text-muted-foreground">{getLabel()}</p>
+ </div>
+ <div className="flex items-center gap-2">
+ <div className={cn("text-3xl font-bold", getColor())}>
+ {score}
+ </div>
+ <span className="text-sm text-muted-foreground">/100</span>
+ </div>
+ </div>
+ );
+}
+
+// Main Component
+
+interface MetricsPanelProps {
+ className?: string;
+ compact?: boolean;
+}
+
+export function MetricsPanel({ className, compact = false }: MetricsPanelProps) {
+ const { metrics, healthScore, isCallActive } = useCopilotStore();
+
+ if (!isCallActive || !metrics) {
+ return (
+ <Card className={cn("", className)}>
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium flex items-center gap-2">
+ <Gauge className="h-4 w-4" />
+ Conversation Metrics
+ </CardTitle>
+ </CardHeader>
+ <CardContent>
+ <p className="text-sm text-muted-foreground text-center py-4">
+ Start a recording to see live metrics
+ </p>
+ </CardContent>
+ </Card>
+ );
+ }
+
+ const formatDuration = (seconds: number) => {
+ const mins = Math.floor(seconds / 60);
+ const secs = Math.floor(seconds % 60);
+ return `${mins}:${secs.toString().padStart(2, '0')}`;
+ };
+
+ if (compact) {
+ return (
+ <div className={cn("space-y-2", className)}>
+ <TalkRatioBar
+ meRatio={metrics.talkRatio.me}
+ themRatio={metrics.talkRatio.them}
+ />
+ <div className="flex items-center justify-between text-xs">
+ <span className="flex items-center gap-1">
+ <Gauge className="h-3 w-3" />
+ {metrics.pace} WPM
+ </span>
+ <span className="flex items-center gap-1">
+ <HelpCircle className="h-3 w-3" />
+ {metrics.questionsAsked} questions
+ </span>
+ <Badge variant={healthScore >= 70 ? "default" : "destructive"} className="text-xs">
+ Health: {healthScore}
+ </Badge>
+ </div>
+ </div>
+ );
+ }
+
+ return (
+ <Card className={cn("", className)}>
+ <CardHeader className="pb-2">
+ <div className="flex items-center justify-between">
+ <CardTitle className="text-sm font-medium flex items-center gap-2">
+ <Gauge className="h-4 w-4" />
+ Conversation Metrics
+ </CardTitle>
+ <Badge variant="outline" className="text-xs">
+ {formatDuration(metrics.callDuration)}
+ </Badge>
+ </div>
+ </CardHeader>
+ <CardContent className="space-y-4">
+ <HealthScore score={healthScore} />
+
+ <div>
+ <p className="text-xs font-medium text-muted-foreground mb-2">Talk Ratio</p>
+ <TalkRatioBar
+ meRatio={metrics.talkRatio.me}
+ themRatio={metrics.talkRatio.them}
+ />
+ </div>
+
+ <div className="space-y-2">
+ <MetricItem
+ icon={<Gauge className="h-4 w-4" />}
+ label="Speaking Pace"
+ value={`${metrics.pace}`}
+ subtext="words per minute"
+ warning={metrics.pace > 180}
+ />
+
+ <MetricItem
+ icon={<HelpCircle className="h-4 w-4" />}
+ label="Questions Asked"
+ value={metrics.questionsAsked}
+ subtext="discovery questions"
+ />
+
+ {metrics.monologueDetected && (
+ <div className="p-2 bg-amber-50 dark:bg-amber-950/20 rounded-lg border border-amber-200 dark:border-amber-800">
+ <p className="text-xs text-amber-700 dark:text-amber-400 flex items-center gap-1">
+ <AlertTriangle className="h-3 w-3" />
+ Long monologue detected - consider asking a question
+ </p>
+ </div>
+ )}
+ </div>
+ </CardContent>
+ </Card>
+ );
+}
+
+export default MetricsPanel;
diff --git a/src/renderer/components/copilot/NudgeToast.tsx b/src/renderer/components/copilot/NudgeToast.tsx
new file mode 100644
index 0000000..11b97bd
--- /dev/null
+++ b/src/renderer/components/copilot/NudgeToast.tsx
@@ -0,0 +1,156 @@
+/**
+ * Nudge Toast Component
+ *
+ * Non-intrusive coaching suggestions that appear during calls.
+ * Auto-dismisses after a timeout or can be manually dismissed.
+ */
+
+import React, { useEffect, useState } from 'react';
+import { Button } from '../ui/button';
+import {
+ X,
+ MessageCircle,
+ TrendingDown,
+ BarChart3,
+ Clock,
+ HelpCircle,
+ Gauge,
+ Lightbulb,
+} from 'lucide-react';
+import { useCopilotStore } from '../../stores/copilot.store';
+import { useCopilot } from '../../hooks/useCopilot';
+import { cn } from '../../lib/utils';
+import type { CopilotNudge } from '../../../shared/types/ipc.types';
+
+// Sub-components
+
+function getNudgeIcon(type: string) {
+ switch (type) {
+ case 'monologue':
+ return <MessageCircle className="h-4 w-4" />;
+ case 'sentiment':
+ return <TrendingDown className="h-4 w-4" />;
+ case 'talk_ratio':
+ return <BarChart3 className="h-4 w-4" />;
+ case 'next_steps':
+ return <Clock className="h-4 w-4" />;
+ case 'questions':
+ return <HelpCircle className="h-4 w-4" />;
+ case 'pace':
+ return <Gauge className="h-4 w-4" />;
+ default:
+ return <Lightbulb className="h-4 w-4" />;
+ }
+}
+
+function getSeverityStyles(severity: string) {
+ switch (severity) {
+ case 'high':
+ return 'bg-red-50 dark:bg-red-950/30 border-red-200 dark:border-red-800 text-red-900 dark:text-red-100';
+ case 'medium':
+ return 'bg-amber-50 dark:bg-amber-950/30 border-amber-200 dark:border-amber-800 text-amber-900 dark:text-amber-100';
+ default:
+ return 'bg-blue-50 dark:bg-blue-950/30 border-blue-200 dark:border-blue-800 text-blue-900 dark:text-blue-100';
+ }
+}
+
+// Main Component
+
+interface NudgeToastProps {
+ className?: string;
+ position?: 'top' | 'bottom';
+ autoDismissMs?: number;
+}
+
+export function NudgeToast({
+ className,
+ position = 'bottom',
+ autoDismissMs = 10000,
+}: NudgeToastProps) {
+ const { activeNudge, isCallActive } = useCopilotStore();
+ const { dismissNudge } = useCopilot();
+ const [isVisible, setIsVisible] = useState(false);
+ const [isAnimating, setIsAnimating] = useState(false);
+
+ useEffect(() => {
+ if (activeNudge && isCallActive) {
+ setIsAnimating(true);
+ setTimeout(() => setIsVisible(true), 10);
+
+ // Auto-dismiss
+ const timer = setTimeout(() => {
+ handleDismiss();
+ }, autoDismissMs);
+
+ return () => clearTimeout(timer);
+ } else {
+ setIsVisible(false);
+ setTimeout(() => setIsAnimating(false), 300);
+ }
+ }, [activeNudge, isCallActive, autoDismissMs]);
+
+ const handleDismiss = () => {
+ setIsVisible(false);
+ setTimeout(() => {
+ setIsAnimating(false);
+ dismissNudge();
+ }, 300);
+ };
+
+ if (!isAnimating || !activeNudge) {
+ return null;
+ }
+
+ return (
+ <div
+ className={cn(
+ "fixed z-50 left-1/2 -translate-x-1/2 transition-all duration-300 ease-out",
+ position === 'top' ? "top-4" : "bottom-4",
+ isVisible
+ ? "opacity-100 translate-y-0"
+ : position === 'top'
+ ? "opacity-0 -translate-y-4"
+ : "opacity-0 translate-y-4",
+ className
+ )}
+ >
+ <div
+ className={cn(
+ "flex items-center gap-3 px-4 py-3 rounded-lg border shadow-lg backdrop-blur-sm max-w-md",
+ getSeverityStyles(activeNudge.severity)
+ )}
+ >
+ <div className={cn(
+ "p-2 rounded-full",
+ activeNudge.severity === 'high'
+ ? "bg-red-200 dark:bg-red-900"
+ : activeNudge.severity === 'medium'
+ ? "bg-amber-200 dark:bg-amber-900"
+ : "bg-blue-200 dark:bg-blue-900"
+ )}>
+ {getNudgeIcon(activeNudge.type)}
+ </div>
+
+ <div className="flex-1 min-w-0">
+ <p className="text-sm font-medium">{activeNudge.message}</p>
+ {activeNudge.actionLabel && (
+ <p className="text-xs opacity-75 mt-0.5">{activeNudge.actionLabel}</p>
+ )}
+ </div>
+
+ {activeNudge.dismissible && (
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-6 w-6 shrink-0 hover:bg-white/20"
+ onClick={handleDismiss}
+ >
+ <X className="h-4 w-4" />
+ </Button>
+ )}
+ </div>
+ </div>
+ );
+}
+
+export default NudgeToast;
diff --git a/src/renderer/components/copilot/PlaybookPanel.tsx b/src/renderer/components/copilot/PlaybookPanel.tsx
new file mode 100644
index 0000000..b21e0d4
--- /dev/null
+++ b/src/renderer/components/copilot/PlaybookPanel.tsx
@@ -0,0 +1,268 @@
+/**
+ * Playbook Panel Component
+ *
+ * Displays meeting methodology progress:
+ * - MEDDIC/Challenger checklist
+ * - Coverage status per item
+ * - Suggested questions
+ * - Evidence links
+ */
+
+import React, { useState } from 'react';
+import { Card, CardContent, CardHeader, CardTitle } from '../ui/card';
+import { Button } from '../ui/button';
+import { Badge } from '../ui/badge';
+import { ScrollArea } from '../ui/scroll-area';
+import {
+ CheckCircle2,
+ Circle,
+ CircleDot,
+ ChevronDown,
+ ChevronUp,
+ BookOpen,
+ Target,
+ Lightbulb,
+ Clock,
+} from 'lucide-react';
+import { useCopilotStore } from '../../stores/copilot.store';
+import { cn } from '../../lib/utils';
+import type { CopilotPlaybookItem, CopilotPlaybookSnapshot } from '../../../shared/types/ipc.types';
+
+// Sub-components
+
+function CoverageProgress({ snapshot }: { snapshot: CopilotPlaybookSnapshot }) {
+ const { covered, partial, missing, total, coveragePercentage } = snapshot;
+
+ return (
+ <div className="space-y-2">
+ <div className="flex items-center justify-between text-sm">
+ <span className="font-medium">{coveragePercentage}% Complete</span>
+ <div className="flex items-center gap-2 text-xs text-muted-foreground">
+ <span className="flex items-center gap-1">
+ <CheckCircle2 className="h-3 w-3 text-green-500" />
+ {covered}
+ </span>
+ <span className="flex items-center gap-1">
+ <CircleDot className="h-3 w-3 text-amber-500" />
+ {partial}
+ </span>
+ <span className="flex items-center gap-1">
+ <Circle className="h-3 w-3 text-muted-foreground" />
+ {missing}
+ </span>
+ </div>
+ </div>
+ <div className="h-2 flex rounded-full overflow-hidden bg-muted">
+ <div
+ className="bg-green-500 transition-all duration-500"
+ style={{ width: `${(covered / total) * 100}%` }}
+ />
+ <div
+ className="bg-amber-500 transition-all duration-500"
+ style={{ width: `${(partial / total) * 100}%` }}
+ />
+ </div>
+ </div>
+ );
+}
+
+interface PlaybookItemRowProps {
+ item: CopilotPlaybookItem;
+ isExpanded: boolean;
+ onToggle: () => void;
+}
+
+function PlaybookItemRow({ item, isExpanded, onToggle }: PlaybookItemRowProps) {
+ const getStatusIcon = () => {
+ switch (item.status) {
+ case 'covered':
+ return <CheckCircle2 className="h-4 w-4 text-green-500" />;
+ case 'partial':
+ return <CircleDot className="h-4 w-4 text-amber-500" />;
+ default:
+ return <Circle className="h-4 w-4 text-muted-foreground" />;
+ }
+ };
+
+ const getStatusBg = () => {
+ switch (item.status) {
+ case 'covered':
+ return 'bg-green-50 dark:bg-green-950/20 border-green-200 dark:border-green-800';
+ case 'partial':
+ return 'bg-amber-50 dark:bg-amber-950/20 border-amber-200 dark:border-amber-800';
+ default:
+ return 'bg-background border-border';
+ }
+ };
+
+ return (
+ <div className={cn("rounded-lg border transition-colors", getStatusBg())}>
+ <button
+ className="w-full flex items-center justify-between p-3 text-left"
+ onClick={onToggle}
+ >
+ <div className="flex items-center gap-3">
+ {getStatusIcon()}
+ <div>
+ <p className="font-medium text-sm">{item.label}</p>
+ <p className="text-xs text-muted-foreground">{item.description}</p>
+ </div>
+ </div>
+ {isExpanded ? (
+ <ChevronUp className="h-4 w-4 text-muted-foreground" />
+ ) : (
+ <ChevronDown className="h-4 w-4 text-muted-foreground" />
+ )}
+ </button>
+
+ {isExpanded && (
+ <div className="px-3 pb-3 space-y-3">
+ {/* Suggested Questions */}
+ {item.suggestedQuestions && item.suggestedQuestions.length > 0 && (
+ <div>
+ <p className="text-xs font-semibold text-muted-foreground mb-1 flex items-center gap-1">
+ <Lightbulb className="h-3 w-3" />
+ Suggested Questions
+ </p>
+ <ul className="space-y-1">
+ {item.suggestedQuestions.slice(0, 3).map((q, i) => (
+ <li key={i} className="text-sm text-muted-foreground pl-3 border-l-2 border-blue-400 py-0.5">
+ {q}
+ </li>
+ ))}
+ </ul>
+ </div>
+ )}
+
+ {/* Evidence (if covered/partial) */}
+ {item.evidence && item.evidence.length > 0 && (
+ <div>
+ <p className="text-xs font-semibold text-muted-foreground mb-1 flex items-center gap-1">
+ <Clock className="h-3 w-3" />
+ Evidence
+ </p>
+ <ul className="space-y-1">
+ {item.evidence.slice(0, 2).map((e, i) => (
+ <li key={i} className="text-xs p-2 bg-muted/50 rounded">
+ <span className="text-muted-foreground">
+ @ {Math.floor(e.timestamp / 60)}:{String(Math.floor(e.timestamp % 60)).padStart(2, '0')}
+ </span>
+ <p className="mt-0.5 italic">"{e.excerpt}"</p>
+ </li>
+ ))}
+ </ul>
+ </div>
+ )}
+ </div>
+ )}
+ </div>
+ );
+}
+
+// Main Component
+
+interface PlaybookPanelProps {
+ className?: string;
+ compact?: boolean;
+}
+
+export function PlaybookPanel({ className, compact = false }: PlaybookPanelProps) {
+ const { playbook, isCallActive } = useCopilotStore();
+ const [expandedItem, setExpandedItem] = useState<string | null>(null);
+
+ if (!playbook) {
+ return (
+ <Card className={cn("", className)}>
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium flex items-center gap-2">
+ <BookOpen className="h-4 w-4" />
+ Playbook
+ </CardTitle>
+ </CardHeader>
+ <CardContent>
+ <p className="text-sm text-muted-foreground text-center py-4">
+ {isCallActive ? 'Loading playbook...' : 'Start a recording to track playbook progress'}
+ </p>
+ </CardContent>
+ </Card>
+ );
+ }
+
+ if (compact) {
+ const missingItems = playbook.items.filter(i => i.status === 'missing');
+
+ return (
+ <div className={cn("space-y-2", className)}>
+ <div className="flex items-center justify-between">
+ <span className="text-sm font-medium flex items-center gap-1">
+ <Target className="h-3 w-3" />
+ {playbook.playbookName}
+ </span>
+ <Badge variant={playbook.coveragePercentage >= 70 ? "default" : "secondary"}>
+ {playbook.coveragePercentage}%
+ </Badge>
+ </div>
+ <CoverageProgress snapshot={playbook} />
+ {missingItems.length > 0 && (
+ <p className="text-xs text-muted-foreground">
+ Missing: {missingItems.slice(0, 2).map(i => i.label).join(', ')}
+ {missingItems.length > 2 && ` +${missingItems.length - 2} more`}
+ </p>
+ )}
+ </div>
+ );
+ }
+
+ return (
+ <Card className={cn("flex flex-col overflow-hidden", className)}>
+ <CardHeader className="pb-2 shrink-0">
+ <div className="flex items-center justify-between">
+ <CardTitle className="text-sm font-medium flex items-center gap-2">
+ <BookOpen className="h-4 w-4" />
+ {playbook.playbookName}
+ </CardTitle>
+ <Badge variant={playbook.coveragePercentage >= 70 ? "default" : "secondary"}>
+ {playbook.coveragePercentage}% Complete
+ </Badge>
+ </div>
+ </CardHeader>
+ <CardContent className="flex flex-col gap-4 min-h-0 flex-1 overflow-hidden p-4 pt-0">
+ <CoverageProgress snapshot={playbook} />
+
+ <ScrollArea className="flex-1 -mx-4 px-4">
+ <div className="space-y-2 pr-2">
+ {playbook.items.map((item) => (
+ <PlaybookItemRow
+ key={item.id}
+ item={item}
+ isExpanded={expandedItem === item.id}
+ onToggle={() => setExpandedItem(
+ expandedItem === item.id ? null : item.id
+ )}
+ />
+ ))}
+ </div>
+ </ScrollArea>
+
+ {/* Recommendations */}
+ {playbook.recommendations && playbook.recommendations.length > 0 && (
+ <div className="pt-2 border-t shrink-0">
+ <p className="text-xs font-semibold text-muted-foreground mb-2 flex items-center gap-1">
+ <Lightbulb className="h-3 w-3" />
+ Recommendations
+ </p>
+ <ul className="space-y-1">
+ {playbook.recommendations.slice(0, 2).map((rec, i) => (
+ <li key={i} className="text-xs text-muted-foreground">
+ • {rec}
+ </li>
+ ))}
+ </ul>
+ </div>
+ )}
+ </CardContent>
+ </Card>
+ );
+}
+
+export default PlaybookPanel;
diff --git a/src/renderer/components/copilot/SentimentIndicator.tsx b/src/renderer/components/copilot/SentimentIndicator.tsx
new file mode 100644
index 0000000..eaf4963
--- /dev/null
+++ b/src/renderer/components/copilot/SentimentIndicator.tsx
@@ -0,0 +1,238 @@
+/**
+ * Sentiment Indicator Component
+ *
+ * Displays customer sentiment with trend visualization.
+ * Compact view for sidebar, expanded view with history.
+ */
+
+import React from 'react';
+import { Card, CardContent, CardHeader, CardTitle } from '../ui/card';
+import { Badge } from '../ui/badge';
+import {
+ SmilePlus,
+ Meh,
+ Frown,
+ TrendingUp,
+ TrendingDown,
+ Minus,
+ Heart,
+} from 'lucide-react';
+import { useCopilotStore } from '../../stores/copilot.store';
+import { cn } from '../../lib/utils';
+import type { CopilotSentiment } from '../../../shared/types/ipc.types';
+
+// Sub-components
+
+function SentimentIcon({ sentiment, className }: { sentiment: string; className?: string }) {
+ switch (sentiment) {
+ case 'positive':
+ return <SmilePlus className={cn("text-green-500", className)} />;
+ case 'negative':
+ return <Frown className={cn("text-red-500", className)} />;
+ default:
+ return <Meh className={cn("text-amber-500", className)} />;
+ }
+}
+
+function TrendIcon({ trend, className }: { trend: string; className?: string }) {
+ switch (trend) {
+ case 'improving':
+ return <TrendingUp className={cn("text-green-500", className)} />;
+ case 'declining':
+ return <TrendingDown className={cn("text-red-500", className)} />;
+ default:
+ return <Minus className={cn("text-muted-foreground", className)} />;
+ }
+}
+
+function SentimentMeter({ averageScore }: { averageScore: number }) {
+ // averageScore is -1 to 1, convert to 0-100 for display
+ const percentage = Math.round((averageScore + 1) * 50);
+
+ const getColor = () => {
+ if (percentage >= 60) return 'bg-green-500';
+ if (percentage >= 40) return 'bg-amber-500';
+ return 'bg-red-500';
+ };
+
+ return (
+ <div className="space-y-1">
+ <div className="h-2 rounded-full bg-muted overflow-hidden">
+ <div
+ className={cn("h-full transition-all duration-500 rounded-full", getColor())}
+ style={{ width: `${percentage}%` }}
+ />
+ </div>
+ <div className="flex justify-between text-xs text-muted-foreground">
+ <span>Negative</span>
+ <span>Neutral</span>
+ <span>Positive</span>
+ </div>
+ </div>
+ );
+}
+
+function SentimentHistory({ history }: { history: CopilotSentiment['history'] }) {
+ if (!history || history.length === 0) {
+ return null;
+ }
+
+ // Take last 10 entries
+ const recentHistory = history.slice(-10);
+
+ return (
+ <div className="flex items-center gap-0.5">
+ {recentHistory.map((entry, i) => (
+ <div
+ key={i}
+ className={cn(
+ "w-2 h-4 rounded-sm transition-colors",
+ entry.sentiment === 'positive'
+ ? "bg-green-400"
+ : entry.sentiment === 'negative'
+ ? "bg-red-400"
+ : "bg-amber-400"
+ )}
+ title={`${entry.text.substring(0, 50)}...`}
+ />
+ ))}
+ </div>
+ );
+}
+
+// Main Component
+
+interface SentimentIndicatorProps {
+ className?: string;
+ compact?: boolean;
+}
+
+export function SentimentIndicator({ className, compact = false }: SentimentIndicatorProps) {
+ const { sentiment, isCallActive } = useCopilotStore();
+
+ if (!isCallActive || !sentiment) {
+ if (compact) {
+ return (
+ <div className={cn("flex items-center gap-2 text-muted-foreground", className)}>
+ <Heart className="h-4 w-4" />
+ <span className="text-xs">--</span>
+ </div>
+ );
+ }
+
+ return (
+ <Card className={cn("", className)}>
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium flex items-center gap-2">
+ <Heart className="h-4 w-4" />
+ Customer Sentiment
+ </CardTitle>
+ </CardHeader>
+ <CardContent>
+ <p className="text-sm text-muted-foreground text-center py-2">
+ Sentiment analysis will appear here
+ </p>
+ </CardContent>
+ </Card>
+ );
+ }
+
+ const getSentimentLabel = () => {
+ switch (sentiment.current) {
+ case 'positive':
+ return 'Positive';
+ case 'negative':
+ return 'Concerned';
+ default:
+ return 'Neutral';
+ }
+ };
+
+ const getTrendLabel = () => {
+ switch (sentiment.trend) {
+ case 'improving':
+ return 'Improving';
+ case 'declining':
+ return 'Declining';
+ default:
+ return 'Stable';
+ }
+ };
+
+ if (compact) {
+ return (
+ <div className={cn("flex items-center gap-2", className)}>
+ <SentimentIcon sentiment={sentiment.current} className="h-4 w-4" />
+ <span className="text-xs font-medium">{getSentimentLabel()}</span>
+ <TrendIcon trend={sentiment.trend} className="h-3 w-3" />
+ </div>
+ );
+ }
+
+ return (
+ <Card className={cn("", className)}>
+ <CardHeader className="pb-2">
+ <div className="flex items-center justify-between">
+ <CardTitle className="text-sm font-medium flex items-center gap-2">
+ <Heart className="h-4 w-4" />
+ Customer Sentiment
+ </CardTitle>
+ <Badge
+ variant={
+ sentiment.current === 'positive'
+ ? 'default'
+ : sentiment.current === 'negative'
+ ? 'destructive'
+ : 'secondary'
+ }
+ className="text-xs"
+ >
+ {getSentimentLabel()}
+ </Badge>
+ </div>
+ </CardHeader>
+ <CardContent className="space-y-4">
+ {/* Current Status */}
+ <div className="flex items-center justify-between p-3 bg-muted/50 rounded-lg">
+ <div className="flex items-center gap-3">
+ <SentimentIcon sentiment={sentiment.current} className="h-8 w-8" />
+ <div>
+ <p className="font-medium">{getSentimentLabel()}</p>
+ <p className="text-xs text-muted-foreground flex items-center gap-1">
+ <TrendIcon trend={sentiment.trend} className="h-3 w-3" />
+ {getTrendLabel()}
+ </p>
+ </div>
+ </div>
+ </div>
+
+ {/* Sentiment Meter */}
+ <div>
+ <p className="text-xs font-medium text-muted-foreground mb-2">Overall Sentiment</p>
+ <SentimentMeter averageScore={sentiment.averageScore} />
+ </div>
+
+ {/* History Timeline */}
+ {sentiment.history && sentiment.history.length > 0 && (
+ <div>
+ <p className="text-xs font-medium text-muted-foreground mb-2">Recent Trend</p>
+ <SentimentHistory history={sentiment.history} />
+ </div>
+ )}
+
+ {/* Warning for negative/declining */}
+ {(sentiment.current === 'negative' || sentiment.trend === 'declining') && (
+ <div className="p-2 bg-amber-50 dark:bg-amber-950/20 rounded border border-amber-200 dark:border-amber-800">
+ <p className="text-xs text-amber-700 dark:text-amber-400">
+ {sentiment.current === 'negative'
+ ? 'Customer may have concerns - consider addressing them'
+ : 'Sentiment is declining - check in with the customer'}
+ </p>
+ </div>
+ )}
+ </CardContent>
+ </Card>
+ );
+}
+
+export default SentimentIndicator;
diff --git a/src/renderer/components/copilot/index.ts b/src/renderer/components/copilot/index.ts
new file mode 100644
index 0000000..65b8e10
--- /dev/null
+++ b/src/renderer/components/copilot/index.ts
@@ -0,0 +1,12 @@
+/**
+ * Meeting Co-Pilot Components
+ *
+ * Export all copilot UI components.
+ */
+
+export { MetricsPanel } from './MetricsPanel';
+export { CueCardOverlay } from './CueCardOverlay';
+export { PlaybookPanel } from './PlaybookPanel';
+export { NudgeToast } from './NudgeToast';
+export { SentimentIndicator } from './SentimentIndicator';
+export { CallSummaryView } from './CallSummaryView';
diff --git a/src/renderer/components/history/HistoryView.tsx b/src/renderer/components/history/HistoryView.tsx
new file mode 100644
index 0000000..aa8bd92
--- /dev/null
+++ b/src/renderer/components/history/HistoryView.tsx
@@ -0,0 +1,114 @@
+import React, { useState, useEffect } from 'react';
+import { RefreshCw, Inbox, Trash2 } from 'lucide-react';
+import { Button } from '../ui/button';
+import { ScrollArea } from '../ui/scroll-area';
+import { RecordingCard } from './RecordingCard';
+import { RecordingDetailsModal } from './RecordingDetailsModal';
+import { trpc } from '../../api/trpc';
+import type { Recording } from '../../../shared/schemas/recording.schema';
+
+export function HistoryView() {
+ const [selectedRecording, setSelectedRecording] = useState<Recording | null>(null);
+ const [hasCleanedUp, setHasCleanedUp] = useState(false);
+
+ const { data: recordings, isLoading, refetch, isRefetching } = trpc.recordings.list.useQuery(
+ undefined,
+ {
+ refetchInterval: 10000,
+ }
+ );
+
+ const cleanupMutation = trpc.recordings.cleanupStale.useMutation({
+ onSuccess: (result) => {
+ if (result.cleaned > 0) {
+ refetch();
+ }
+ },
+ });
+
+ useEffect(() => {
+ if (!hasCleanedUp && recordings) {
+ const staleCount = recordings.filter(
+ r => (r.status === 'processing' || r.status === 'recording') &&
+ Date.now() - new Date(r.createdAt).getTime() > 30 * 60 * 1000
+ ).length;
+
+ if (staleCount > 0) {
+ cleanupMutation.mutate({ maxAgeMinutes: 30 });
+ }
+ setHasCleanedUp(true);
+ }
+ }, [recordings, hasCleanedUp]);
+
+ const sortedRecordings = [...(recordings || [])].sort(
+ (a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
+ );
+
+ return (
+ <div className="h-full flex flex-col">
+ {/* Header */}
+ <div className="flex items-center justify-between mb-4">
+ <div>
+ <h2 className="text-lg font-semibold">Recording History</h2>
+ <p className="text-sm text-muted-foreground">
+ {recordings?.length || 0} recording{recordings?.length !== 1 ? 's' : ''}
+ </p>
+ </div>
+ <div className="flex gap-2">
+ {recordings && recordings.some(r => r.status === 'processing' || r.status === 'recording') && (
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => cleanupMutation.mutate({ maxAgeMinutes: 30 })}
+ disabled={cleanupMutation.isPending}
+ >
+ <Trash2 className="h-4 w-4 mr-2" />
+ Clean Stale
+ </Button>
+ )}
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => refetch()}
+ disabled={isRefetching}
+ >
+ <RefreshCw className={`h-4 w-4 mr-2 ${isRefetching ? 'animate-spin' : ''}`} />
+ Refresh
+ </Button>
+ </div>
+ </div>
+
+ {/* Recordings List */}
+ <ScrollArea className="flex-1">
+ {isLoading ? (
+ <div className="flex items-center justify-center h-32">
+ <RefreshCw className="h-6 w-6 animate-spin text-muted-foreground" />
+ </div>
+ ) : sortedRecordings.length === 0 ? (
+ <div className="flex flex-col items-center justify-center h-32 text-muted-foreground">
+ <Inbox className="h-10 w-10 mb-2" />
+ <p className="text-sm">No recordings yet</p>
+ <p className="text-xs">Start a recording to see it here</p>
+ </div>
+ ) : (
+ <div className="space-y-3 pr-4">
+ {sortedRecordings.map((recording) => (
+ <RecordingCard
+ key={recording.id}
+ recording={recording}
+ onViewDetails={() => setSelectedRecording(recording)}
+ />
+ ))}
+ </div>
+ )}
+ </ScrollArea>
+
+ {/* Details Modal */}
+ <RecordingDetailsModal
+ recording={selectedRecording}
+ open={!!selectedRecording}
+ onOpenChange={(open) => !open && setSelectedRecording(null)}
+ />
+ </div>
+ );
+}
diff --git a/src/renderer/components/history/RecordingCard.tsx b/src/renderer/components/history/RecordingCard.tsx
new file mode 100644
index 0000000..d558f60
--- /dev/null
+++ b/src/renderer/components/history/RecordingCard.tsx
@@ -0,0 +1,133 @@
+import React from 'react';
+import { Play, Clock, FileText, Loader2 } from 'lucide-react';
+import { Card, CardContent } from '../ui/card';
+import { Button } from '../ui/button';
+import { Badge } from '../ui/badge';
+import type { Recording } from '../../../shared/schemas/recording.schema';
+import { formatDuration, formatRelativeTime, stripMarkdown } from '../../lib/utils';
+import { getElectronAPI } from '../../api/ipc';
+
+interface RecordingCardProps {
+ recording: Recording;
+ onViewDetails: () => void;
+}
+
+export function RecordingCard({ recording, onViewDetails }: RecordingCardProps) {
+ const handlePlay = async () => {
+ const api = getElectronAPI();
+ if (recording.playerUrl && api) {
+ await api.app.openPlayerWindow(recording.playerUrl);
+ }
+ };
+
+ const getStatusBadge = () => {
+ switch (recording.status) {
+ case 'recording':
+ return <Badge variant="destructive">Recording</Badge>;
+ case 'processing':
+ return (
+ <Badge variant="warning" className="gap-1">
+ <Loader2 className="h-3 w-3 animate-spin" />
+ Processing
+ </Badge>
+ );
+ case 'available':
+ return <Badge variant="success">Ready</Badge>;
+ case 'failed':
+ return <Badge variant="destructive">Failed</Badge>;
+ default:
+ return null;
+ }
+ };
+
+ const getSummaryBadge = () => {
+ // Prioritize call summary over insights
+ if (recording.callSummary?.bullets && recording.callSummary.bullets.length > 0) {
+ return <Badge variant="default">Summary ready</Badge>;
+ }
+
+ if (recording.status !== 'available') return null;
+
+ switch (recording.insightsStatus) {
+ case 'pending':
+ return <Badge variant="secondary">Insights pending</Badge>;
+ case 'processing':
+ return (
+ <Badge variant="secondary" className="gap-1">
+ <Loader2 className="h-3 w-3 animate-spin" />
+ Generating insights
+ </Badge>
+ );
+ case 'ready':
+ return <Badge variant="outline">Insights ready</Badge>;
+ case 'failed':
+ return <Badge variant="outline">Insights failed</Badge>;
+ default:
+ return null;
+ }
+ };
+
+ return (
+ <Card className="hover:bg-muted/50 transition-colors">
+ <CardContent className="p-4">
+ <div className="flex items-start justify-between gap-4">
+ <div className="flex-1 min-w-0">
+ <div className="flex items-center gap-2 mb-2">
+ {getStatusBadge()}
+ {getSummaryBadge()}
+ </div>
+
+ <p className="text-sm font-medium truncate">
+ Session: {recording.sessionId.slice(0, 20)}...
+ </p>
+
+ <div className="flex items-center gap-4 mt-2 text-xs text-muted-foreground">
+ <span className="flex items-center gap-1">
+ <Clock className="h-3 w-3" />
+ {formatRelativeTime(recording.createdAt)}
+ </span>
+ {recording.duration && (
+ <span className="flex items-center gap-1">
+ <FileText className="h-3 w-3" />
+ {formatDuration(recording.duration)}
+ </span>
+ )}
+ </div>
+ </div>
+
+ <div className="flex items-center gap-2">
+ {recording.status === 'available' && recording.playerUrl && (
+ <Button size="sm" variant="outline" onClick={handlePlay}>
+ <Play className="h-4 w-4 mr-1" />
+ Play
+ </Button>
+ )}
+ <Button size="sm" variant="ghost" onClick={onViewDetails}>
+ Details
+ </Button>
+ </div>
+ </div>
+
+ {/* Call Summary preview (prioritized) */}
+ {recording.callSummary?.bullets && recording.callSummary.bullets.length > 0 && (
+ <div className="mt-3 pt-3 border-t">
+ <p className="text-xs font-medium text-muted-foreground mb-1">Call Summary</p>
+ <ul className="text-sm space-y-0.5">
+ {recording.callSummary.bullets.slice(0, 2).map((bullet, i) => (
+ <li key={i} className="line-clamp-1">• {bullet}</li>
+ ))}
+ </ul>
+ </div>
+ )}
+
+ {/* Fallback to insights if no call summary */}
+ {!recording.callSummary?.bullets?.length && recording.insightsStatus === 'ready' && recording.insights && (
+ <div className="mt-3 pt-3 border-t">
+ <p className="text-xs font-medium text-muted-foreground mb-1">AI Summary</p>
+ <p className="text-sm line-clamp-2">{stripMarkdown(recording.insights)}</p>
+ </div>
+ )}
+ </CardContent>
+ </Card>
+ );
+}
diff --git a/src/renderer/components/history/RecordingDetailsModal.tsx b/src/renderer/components/history/RecordingDetailsModal.tsx
new file mode 100644
index 0000000..12afe9a
--- /dev/null
+++ b/src/renderer/components/history/RecordingDetailsModal.tsx
@@ -0,0 +1,448 @@
+import React, { useState } from 'react';
+import ReactMarkdown from 'react-markdown';
+import {
+ Play,
+ ExternalLink,
+ Clock,
+ FileText,
+ Video,
+ Mic,
+ Users,
+ Gauge,
+ Target,
+ ChevronDown,
+ ChevronUp,
+ AlertTriangle,
+ CheckCircle2,
+ MessageSquare,
+} from 'lucide-react';
+import {
+ Dialog,
+ DialogContent,
+ DialogHeader,
+ DialogTitle,
+ DialogDescription,
+} from '../ui/dialog';
+import { Button } from '../ui/button';
+import { Badge } from '../ui/badge';
+import { ScrollArea } from '../ui/scroll-area';
+import type { Recording } from '../../../shared/schemas/recording.schema';
+import { formatDuration, formatRelativeTime, unwrapMarkdownCodeBlock, cn } from '../../lib/utils';
+import { getElectronAPI } from '../../api/ipc';
+
+interface RecordingDetailsModalProps {
+ recording: Recording | null;
+ open: boolean;
+ onOpenChange: (open: boolean) => void;
+}
+
+interface CollapsibleSectionProps {
+ title: string;
+ icon: React.ReactNode;
+ children: React.ReactNode;
+ defaultOpen?: boolean;
+ badge?: string;
+}
+
+function CollapsibleSection({ title, icon, children, defaultOpen = false, badge }: CollapsibleSectionProps) {
+ const [isOpen, setIsOpen] = useState(defaultOpen);
+
+ return (
+ <div className="border rounded-lg">
+ <button
+ className="w-full flex items-center justify-between p-3 hover:bg-muted/50 transition-colors"
+ onClick={() => setIsOpen(!isOpen)}
+ >
+ <div className="flex items-center gap-2">
+ {icon}
+ <span className="font-medium text-sm">{title}</span>
+ {badge && (
+ <Badge variant="secondary" className="text-xs">
+ {badge}
+ </Badge>
+ )}
+ </div>
+ {isOpen ? (
+ <ChevronUp className="h-4 w-4 text-muted-foreground" />
+ ) : (
+ <ChevronDown className="h-4 w-4 text-muted-foreground" />
+ )}
+ </button>
+ {isOpen && <div className="px-3 pb-3">{children}</div>}
+ </div>
+ );
+}
+
+export function RecordingDetailsModal({
+ recording,
+ open,
+ onOpenChange,
+}: RecordingDetailsModalProps) {
+ if (!recording) return null;
+
+ const handlePlay = async () => {
+ const api = getElectronAPI();
+ if (recording.playerUrl && api) {
+ await api.app.openPlayerWindow(recording.playerUrl);
+ }
+ };
+
+ const handleOpenExternal = async () => {
+ const api = getElectronAPI();
+ if (recording.playerUrl && api) {
+ await api.app.openExternalLink(recording.playerUrl);
+ }
+ };
+
+ const metrics = recording.metricsSnapshot;
+ const playbook = recording.playbookSnapshot;
+ const callSummary = recording.callSummary;
+
+ return (
+ <Dialog open={open} onOpenChange={onOpenChange}>
+ <DialogContent className="max-w-3xl max-h-[85vh] flex flex-col">
+ <DialogHeader>
+ <DialogTitle className="flex items-center gap-2">
+ <Video className="h-5 w-5" />
+ Recording Details
+ </DialogTitle>
+ <DialogDescription>Session: {recording.sessionId.slice(0, 20)}...</DialogDescription>
+ </DialogHeader>
+
+ <ScrollArea className="flex-1 pr-4">
+ <div className="space-y-4">
+ {/* Status and Metadata */}
+ <div className="grid grid-cols-2 md:grid-cols-4 gap-4">
+ <div>
+ <p className="text-xs font-medium text-muted-foreground mb-1">Status</p>
+ <Badge
+ variant={
+ recording.status === 'available'
+ ? 'success'
+ : recording.status === 'failed'
+ ? 'destructive'
+ : 'secondary'
+ }
+ >
+ {recording.status}
+ </Badge>
+ </div>
+
+ <div>
+ <p className="text-xs font-medium text-muted-foreground mb-1">Created</p>
+ <p className="text-sm flex items-center gap-1">
+ <Clock className="h-3 w-3" />
+ {formatRelativeTime(recording.createdAt)}
+ </p>
+ </div>
+
+ {recording.duration && (
+ <div>
+ <p className="text-xs font-medium text-muted-foreground mb-1">Duration</p>
+ <p className="text-sm flex items-center gap-1">
+ <FileText className="h-3 w-3" />
+ {formatDuration(recording.duration)}
+ </p>
+ </div>
+ )}
+
+ {recording.videoId && (
+ <div>
+ <p className="text-xs font-medium text-muted-foreground mb-1">Video ID</p>
+ <p className="text-sm font-mono text-xs truncate">{recording.videoId}</p>
+ </div>
+ )}
+ </div>
+
+ {/* Action Buttons */}
+ {recording.status === 'available' && recording.playerUrl && (
+ <div className="flex gap-2">
+ <Button onClick={handlePlay}>
+ <Play className="h-4 w-4 mr-2" />
+ Play in App
+ </Button>
+ <Button variant="outline" onClick={handleOpenExternal}>
+ <ExternalLink className="h-4 w-4 mr-2" />
+ Open in Browser
+ </Button>
+ </div>
+ )}
+
+ {/* Conversation Metrics */}
+ {metrics && (
+ <CollapsibleSection
+ title="Conversation Metrics"
+ icon={<Gauge className="h-4 w-4" />}
+ defaultOpen={true}
+ >
+ <div className="space-y-4 pt-2">
+ {/* Talk Ratio */}
+ <div>
+ <p className="text-xs font-medium text-muted-foreground mb-2">Talk Ratio</p>
+ <div className="flex items-center gap-3">
+ <div className="flex items-center gap-1">
+ <Mic className="h-3 w-3 text-blue-500" />
+ <span className="text-sm font-medium">{Math.round(metrics.talkRatio.me * 100)}%</span>
+ </div>
+ <div className="flex-1 h-2 bg-muted rounded-full overflow-hidden">
+ <div
+ className={cn(
+ 'h-full transition-all',
+ metrics.talkRatio.me > 0.65 ? 'bg-amber-500' : 'bg-blue-500'
+ )}
+ style={{ width: `${metrics.talkRatio.me * 100}%` }}
+ />
+ </div>
+ <div className="flex items-center gap-1">
+ <span className="text-sm font-medium">{Math.round(metrics.talkRatio.them * 100)}%</span>
+ <Users className="h-3 w-3 text-purple-500" />
+ </div>
+ </div>
+ </div>
+
+ {/* Stats Grid */}
+ <div className="grid grid-cols-2 md:grid-cols-4 gap-3">
+ <div className="bg-muted/50 rounded-lg p-2">
+ <p className="text-xs text-muted-foreground">Speaking Pace</p>
+ <p className={cn('text-lg font-semibold', metrics.pace > 180 ? 'text-amber-500' : '')}>
+ {metrics.pace} <span className="text-xs font-normal">WPM</span>
+ </p>
+ </div>
+ <div className="bg-muted/50 rounded-lg p-2">
+ <p className="text-xs text-muted-foreground">Questions Asked</p>
+ <p className="text-lg font-semibold">{metrics.questionsAsked}</p>
+ </div>
+ <div className="bg-muted/50 rounded-lg p-2">
+ <p className="text-xs text-muted-foreground">Longest Monologue</p>
+ <p className={cn('text-lg font-semibold', metrics.longestMonologue > 45 ? 'text-amber-500' : '')}>
+ {Math.round(metrics.longestMonologue)}s
+ </p>
+ </div>
+ <div className="bg-muted/50 rounded-lg p-2">
+ <p className="text-xs text-muted-foreground">Interruptions</p>
+ <p className="text-lg font-semibold">{metrics.interruptionCount}</p>
+ </div>
+ </div>
+
+ {/* Word Counts */}
+ <div className="grid grid-cols-2 gap-3">
+ <div className="bg-blue-50 dark:bg-blue-950/20 rounded-lg p-2">
+ <p className="text-xs text-blue-600 dark:text-blue-400">Your Words</p>
+ <p className="text-lg font-semibold text-blue-700 dark:text-blue-300">{metrics.wordCount.me}</p>
+ </div>
+ <div className="bg-purple-50 dark:bg-purple-950/20 rounded-lg p-2">
+ <p className="text-xs text-purple-600 dark:text-purple-400">Their Words</p>
+ <p className="text-lg font-semibold text-purple-700 dark:text-purple-300">{metrics.wordCount.them}</p>
+ </div>
+ </div>
+ </div>
+ </CollapsibleSection>
+ )}
+
+ {/* Playbook Progress */}
+ {playbook && (
+ <CollapsibleSection
+ title={`Playbook: ${playbook.playbookName}`}
+ icon={<Target className="h-4 w-4" />}
+ badge={`${playbook.coveragePercentage}%`}
+ defaultOpen={true}
+ >
+ <div className="space-y-3 pt-2">
+ {/* Coverage Summary */}
+ <div className="flex items-center gap-4 text-sm">
+ <span className="text-green-600 flex items-center gap-1">
+ <CheckCircle2 className="h-3 w-3" />
+ {playbook.covered} covered
+ </span>
+ <span className="text-amber-600">{playbook.partial} partial</span>
+ <span className="text-muted-foreground">{playbook.missing} missing</span>
+ </div>
+
+ {/* Progress Bar */}
+ <div className="h-2 bg-muted rounded-full overflow-hidden">
+ <div
+ className={cn(
+ 'h-full transition-all',
+ playbook.coveragePercentage >= 70 ? 'bg-green-500' : 'bg-amber-500'
+ )}
+ style={{ width: `${playbook.coveragePercentage}%` }}
+ />
+ </div>
+
+ {/* Items List */}
+ {playbook.items && playbook.items.length > 0 && (
+ <div className="space-y-1 mt-2">
+ {playbook.items.map((item) => (
+ <div
+ key={item.id}
+ className="flex items-center justify-between py-1.5 px-2 rounded bg-muted/30"
+ >
+ <span className="text-sm">{item.label}</span>
+ <Badge
+ variant={
+ item.status === 'covered'
+ ? 'default'
+ : item.status === 'partial'
+ ? 'secondary'
+ : 'outline'
+ }
+ className="text-xs"
+ >
+ {item.status}
+ </Badge>
+ </div>
+ ))}
+ </div>
+ )}
+
+ {/* Recommendations */}
+ {playbook.recommendations && playbook.recommendations.length > 0 && (
+ <div className="pt-2 border-t">
+ <p className="text-xs font-medium text-muted-foreground mb-1">Recommendations</p>
+ <ul className="space-y-1">
+ {playbook.recommendations.map((rec, i) => (
+ <li key={i} className="text-xs text-muted-foreground">• {rec}</li>
+ ))}
+ </ul>
+ </div>
+ )}
+ </div>
+ </CollapsibleSection>
+ )}
+
+ {/* Call Summary (Real-time) - Primary section */}
+ {callSummary && (
+ <CollapsibleSection
+ title="Call Summary"
+ icon={<MessageSquare className="h-4 w-4" />}
+ defaultOpen={true}
+ badge={`${callSummary.bullets?.length || 0} points`}
+ >
+ <div className="space-y-3 pt-2">
+ {/* Risk Flags */}
+ {callSummary.riskFlags && callSummary.riskFlags.length > 0 && (
+ <div className="p-2 bg-red-50 dark:bg-red-950/20 rounded-lg border border-red-200 dark:border-red-800">
+ <p className="text-xs font-medium text-red-700 dark:text-red-400 flex items-center gap-1 mb-1">
+ <AlertTriangle className="h-3 w-3" />
+ Risk Flags
+ </p>
+ <ul className="space-y-0.5">
+ {callSummary.riskFlags.map((flag, i) => (
+ <li key={i} className="text-xs text-red-600 dark:text-red-300">• {flag}</li>
+ ))}
+ </ul>
+ </div>
+ )}
+
+ {/* Summary Bullets */}
+ {callSummary.bullets && callSummary.bullets.length > 0 && (
+ <div>
+ <p className="text-xs font-medium text-muted-foreground mb-1">Key Points</p>
+ <ul className="space-y-0.5">
+ {callSummary.bullets.map((bullet, i) => (
+ <li key={i} className="text-sm">• {bullet}</li>
+ ))}
+ </ul>
+ </div>
+ )}
+
+ {/* Customer Pain */}
+ {callSummary.customerPain && callSummary.customerPain.length > 0 && (
+ <div>
+ <p className="text-xs font-medium text-muted-foreground mb-1">Customer Pain Points</p>
+ <ul className="space-y-0.5">
+ {callSummary.customerPain.map((pain, i) => (
+ <li key={i} className="text-sm">• {pain}</li>
+ ))}
+ </ul>
+ </div>
+ )}
+
+ {/* Next Steps */}
+ {callSummary.nextSteps && callSummary.nextSteps.length > 0 && (
+ <div>
+ <p className="text-xs font-medium text-muted-foreground mb-1">Next Steps</p>
+ <div className="space-y-1">
+ {callSummary.nextSteps.map((step, i) => (
+ <div key={i} className="flex items-center gap-2 text-sm">
+ <Badge variant="outline" className="text-xs">
+ {step.owner === 'me' ? 'You' : step.owner === 'them' ? 'Customer' : 'Both'}
+ </Badge>
+ <span>{step.action}</span>
+ </div>
+ ))}
+ </div>
+ </div>
+ )}
+
+ {/* Objections */}
+ {callSummary.objections && callSummary.objections.length > 0 && (
+ <div>
+ <p className="text-xs font-medium text-muted-foreground mb-1">Objections Raised</p>
+ <div className="space-y-1">
+ {callSummary.objections.map((obj, i) => (
+ <div key={i} className="p-2 bg-muted/30 rounded text-sm">
+ <div className="flex items-center gap-2 mb-0.5">
+ <Badge variant="outline" className="text-xs">{obj.type}</Badge>
+ {obj.resolved && <Badge className="text-xs bg-green-500">Resolved</Badge>}
+ </div>
+ <p className="text-sm">{obj.text}</p>
+ </div>
+ ))}
+ </div>
+ </div>
+ )}
+ </div>
+ </CollapsibleSection>
+ )}
+
+ {/* AI Insights (from VideoDB) */}
+ {recording.insightsStatus === 'ready' && recording.insights && (
+ <CollapsibleSection
+ title="AI Summary"
+ icon={<FileText className="h-4 w-4" />}
+ defaultOpen={!callSummary}
+ >
+ <div className="prose prose-sm dark:prose-invert max-w-none pt-2">
+ <ReactMarkdown
+ components={{
+ h2: ({ children }) => (
+ <h2 className="text-base font-semibold mt-4 mb-2 first:mt-0">{children}</h2>
+ ),
+ h3: ({ children }) => (
+ <h3 className="text-sm font-semibold mt-3 mb-1">{children}</h3>
+ ),
+ ul: ({ children }) => (
+ <ul className="list-disc list-inside space-y-1 my-2">{children}</ul>
+ ),
+ li: ({ children }) => <li className="text-sm">{children}</li>,
+ p: ({ children }) => <p className="text-sm my-2">{children}</p>,
+ }}
+ >
+ {unwrapMarkdownCodeBlock(recording.insights)}
+ </ReactMarkdown>
+ </div>
+ </CollapsibleSection>
+ )}
+
+ {recording.insightsStatus === 'processing' && (
+ <div className="bg-muted rounded-lg p-4 text-center">
+ <p className="text-sm text-muted-foreground">
+ Generating AI insights... This may take a moment.
+ </p>
+ </div>
+ )}
+
+ {recording.insightsStatus === 'failed' && (
+ <div className="bg-destructive/10 rounded-lg p-4 text-center">
+ <p className="text-sm text-destructive">
+ Failed to generate insights for this recording.
+ </p>
+ </div>
+ )}
+ </div>
+ </ScrollArea>
+ </DialogContent>
+ </Dialog>
+ );
+}
diff --git a/src/renderer/components/layout/MainContent.tsx b/src/renderer/components/layout/MainContent.tsx
new file mode 100644
index 0000000..d92e913
--- /dev/null
+++ b/src/renderer/components/layout/MainContent.tsx
@@ -0,0 +1,20 @@
+import React from 'react';
+
+interface MainContentProps {
+ title: string;
+ children: React.ReactNode;
+}
+
+export function MainContent({ title, children }: MainContentProps) {
+ return (
+ <div className="flex-1 flex flex-col overflow-hidden">
+ {/* Page header */}
+ <header className="h-12 flex items-center px-6 border-b bg-background shrink-0">
+ <h1 className="text-lg font-semibold">{title}</h1>
+ </header>
+
+ {/* Content */}
+ <main className="flex-1 overflow-auto p-6">{children}</main>
+ </div>
+ );
+}
diff --git a/src/renderer/components/layout/Sidebar.tsx b/src/renderer/components/layout/Sidebar.tsx
new file mode 100644
index 0000000..bb36108
--- /dev/null
+++ b/src/renderer/components/layout/Sidebar.tsx
@@ -0,0 +1,73 @@
+import React from 'react';
+import { Video, History, Settings, LogOut } from 'lucide-react';
+import { Button } from '../ui/button';
+import { useConfigStore } from '../../stores/config.store';
+import { getElectronAPI } from '../../api/ipc';
+import { cn } from '../../lib/utils';
+
+interface SidebarProps {
+ activeTab: 'recording' | 'history' | 'settings';
+ onTabChange: (tab: 'recording' | 'history' | 'settings') => void;
+}
+
+export function Sidebar({ activeTab, onTabChange }: SidebarProps) {
+ const configStore = useConfigStore();
+
+ const handleLogout = async () => {
+ const api = getElectronAPI();
+ if (api) {
+ await api.app.logout();
+ }
+ configStore.clearAuth();
+ };
+
+ const tabs = [
+ { id: 'recording' as const, icon: Video, label: 'Recording' },
+ { id: 'history' as const, icon: History, label: 'History' },
+ { id: 'settings' as const, icon: Settings, label: 'Settings' },
+ ];
+
+ return (
+ <div className="flex flex-col h-full w-16 border-r bg-muted/30">
+ {/* Navigation */}
+ <nav className="flex-1 flex flex-col items-center gap-2 py-4">
+ {tabs.map(({ id, icon: Icon, label }) => (
+ <Button
+ key={id}
+ variant="ghost"
+ size="icon"
+ className={cn(
+ 'w-10 h-10 no-drag',
+ activeTab === id && 'bg-accent text-accent-foreground'
+ )}
+ onClick={() => onTabChange(id)}
+ title={label}
+ >
+ <Icon className="h-5 w-5" />
+ </Button>
+ ))}
+ </nav>
+
+ {/* User section */}
+ <div className="flex flex-col items-center gap-2 py-4 border-t">
+ {configStore.userName && (
+ <div
+ className="w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-xs font-medium"
+ title={configStore.userName}
+ >
+ {configStore.userName.charAt(0).toUpperCase()}
+ </div>
+ )}
+ <Button
+ variant="ghost"
+ size="icon"
+ className="w-10 h-10 no-drag text-muted-foreground hover:text-destructive"
+ onClick={handleLogout}
+ title="Logout"
+ >
+ <LogOut className="h-4 w-4" />
+ </Button>
+ </div>
+ </div>
+ );
+}
diff --git a/src/renderer/components/layout/TitleBar.tsx b/src/renderer/components/layout/TitleBar.tsx
new file mode 100644
index 0000000..959c381
--- /dev/null
+++ b/src/renderer/components/layout/TitleBar.tsx
@@ -0,0 +1,36 @@
+/**
+ * TitleBar Component
+ *
+ * Native-looking macOS title bar with:
+ * - Space for traffic lights (window controls)
+ * - App title
+ * - Draggable region
+ */
+
+import React from 'react';
+import { cn } from '../../lib/utils';
+
+interface TitleBarProps {
+ title?: string;
+ className?: string;
+}
+
+export function TitleBar({ title = 'Meeting Copilot', className }: TitleBarProps) {
+ return (
+ <div
+ className={cn(
+ 'h-12 flex items-center justify-center border-b bg-background/80 backdrop-blur-lg shrink-0',
+ 'drag-region select-none',
+ className
+ )}
+ >
+ {/* Space for traffic lights - about 80px on macOS */}
+ <div className="absolute left-0 w-20 h-full" />
+
+ {/* App title */}
+ <span className="text-sm font-medium text-muted-foreground">{title}</span>
+ </div>
+ );
+}
+
+export default TitleBar;
diff --git a/src/renderer/components/mcp/MCPResultCard.tsx b/src/renderer/components/mcp/MCPResultCard.tsx
new file mode 100644
index 0000000..cff1ae6
--- /dev/null
+++ b/src/renderer/components/mcp/MCPResultCard.tsx
@@ -0,0 +1,233 @@
+/**
+ * MCP Result Card Component
+ *
+ * Displays MCP tool results in a cue-card style format.
+ * Supports text, markdown, properties, and structured data.
+ */
+
+import React from 'react';
+import ReactMarkdown from 'react-markdown';
+import { Card, CardContent, CardHeader } from '../ui/card';
+import { Button } from '../ui/button';
+import { Badge } from '../ui/badge';
+import { ScrollArea } from '../ui/scroll-area';
+import {
+ X,
+ Pin,
+ ExternalLink,
+ Zap,
+ Server,
+} from 'lucide-react';
+import { cn } from '../../lib/utils';
+import type { MCPDisplayResult } from '../../../preload/index';
+
+interface MCPResultCardProps {
+ result: MCPDisplayResult;
+ isPinned?: boolean;
+ onDismiss: (resultId: string) => void;
+ onPin: (resultId: string) => void;
+ className?: string;
+}
+
+function getServerGradient(serverName: string): string {
+ // Generate consistent gradient based on server name
+ const hash = serverName.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0);
+ const gradients = [
+ 'from-blue-50 to-indigo-50 dark:from-blue-950/30 dark:to-indigo-950/30',
+ 'from-green-50 to-emerald-50 dark:from-green-950/30 dark:to-emerald-950/30',
+ 'from-purple-50 to-violet-50 dark:from-purple-950/30 dark:to-violet-950/30',
+ 'from-amber-50 to-orange-50 dark:from-amber-950/30 dark:to-orange-950/30',
+ 'from-cyan-50 to-teal-50 dark:from-cyan-950/30 dark:to-teal-950/30',
+ 'from-rose-50 to-pink-50 dark:from-rose-950/30 dark:to-pink-950/30',
+ ];
+ return gradients[hash % gradients.length];
+}
+
+function getServerBadgeColor(serverName: string): string {
+ const hash = serverName.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0);
+ const colors = [
+ 'bg-blue-500 text-white',
+ 'bg-green-500 text-white',
+ 'bg-purple-500 text-white',
+ 'bg-amber-500 text-white',
+ 'bg-cyan-500 text-white',
+ 'bg-rose-500 text-white',
+ ];
+ return colors[hash % colors.length];
+}
+
+function formatToolName(toolName: string): string {
+ return toolName
+ .replace(/_/g, ' ')
+ .replace(/([a-z])([A-Z])/g, '$1 $2')
+ .replace(/\b\w/g, (c) => c.toUpperCase());
+}
+
+export function MCPResultCard({
+ result,
+ isPinned,
+ onDismiss,
+ onPin,
+ className,
+}: MCPResultCardProps) {
+ const { content } = result;
+ const openExternal = (url?: string) => {
+ if (!url) return;
+ void window.electronAPI.app.openExternalLink(url);
+ };
+
+ return (
+ <Card className={cn('overflow-hidden border-2 animate-in slide-in-from-right duration-300', className)}>
+ <CardHeader
+ className={cn('border-b p-4 bg-gradient-to-r', getServerGradient(result.serverName))}
+ >
+ <div className="flex items-start justify-between mb-2">
+ <div className="flex-1">
+ <div className="flex items-center gap-2 mb-2">
+ <Badge className={cn('text-xs', getServerBadgeColor(result.serverName))}>
+ <Server className="h-3 w-3 mr-1" />
+ {result.serverName}
+ </Badge>
+ {isPinned && (
+ <Badge variant="secondary" className="text-xs">
+ <Pin className="h-3 w-3 mr-1" />
+ Pinned
+ </Badge>
+ )}
+ </div>
+ <h3 className="font-semibold text-base leading-tight flex items-center gap-2">
+ <Zap className="h-4 w-4 text-amber-500" />
+ {result.title}
+ </h3>
+ <p className="text-xs text-slate-500 dark:text-slate-400 mt-1">
+ {formatToolName(result.toolName)}
+ </p>
+ </div>
+ <div className="flex gap-1 shrink-0">
+ {!isPinned && (
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-7 w-7"
+ onClick={() => onPin(result.id)}
+ title="Pin this result"
+ >
+ <Pin className="h-4 w-4" />
+ </Button>
+ )}
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-7 w-7"
+ onClick={() => onDismiss(result.id)}
+ title="Dismiss"
+ >
+ <X className="h-4 w-4" />
+ </Button>
+ </div>
+ </div>
+ </CardHeader>
+
+ <CardContent className="p-4">
+ <ScrollArea className="max-h-[300px]">
+ {content.text && (
+ <p className="text-sm text-slate-700 dark:text-slate-300 whitespace-pre-wrap">
+ {content.text}
+ </p>
+ )}
+
+ {content.markdown && (
+ <div className="prose prose-sm dark:prose-invert max-w-none text-sm">
+ <ReactMarkdown
+ components={{
+ a: ({ href, children }) => (
+ <a
+ href={href || '#'}
+ className="text-blue-600 dark:text-blue-400 hover:underline"
+ onClick={(e) => {
+ e.preventDefault();
+ openExternal(href);
+ }}
+ >
+ {children}
+ </a>
+ ),
+ }}
+ >
+ {content.markdown}
+ </ReactMarkdown>
+ </div>
+ )}
+
+ {content.items && content.items.length > 0 && (
+ <div className="space-y-2">
+ {content.items.map((item, idx) => (
+ <div
+ key={idx}
+ className="flex items-start justify-between p-2 bg-slate-50 dark:bg-slate-800/50 rounded-lg"
+ >
+ <span className="text-xs font-medium text-slate-500 dark:text-slate-400">
+ {item.label}
+ </span>
+ {item.type === 'link' ? (
+ <a
+ href={item.value || '#'}
+ className="text-sm text-blue-600 dark:text-blue-400 hover:underline flex items-center gap-1"
+ onClick={(e) => {
+ e.preventDefault();
+ openExternal(item.value);
+ }}
+ >
+ {item.value.length > 30 ? item.value.substring(0, 30) + '...' : item.value}
+ <ExternalLink className="h-3 w-3" />
+ </a>
+ ) : item.type === 'badge' ? (
+ <Badge variant="secondary" className="text-xs">
+ {item.value}
+ </Badge>
+ ) : (
+ <span className="text-sm text-slate-700 dark:text-slate-300 text-right max-w-[60%]">
+ {item.value}
+ </span>
+ )}
+ </div>
+ ))}
+ </div>
+ )}
+
+ {content.properties && Object.keys(content.properties).length > 0 && !content.items && (
+ <div className="space-y-2">
+ {Object.entries(content.properties).map(([key, value], idx) => (
+ <div
+ key={idx}
+ className="flex items-start justify-between p-2 bg-slate-50 dark:bg-slate-800/50 rounded-lg"
+ >
+ <span className="text-xs font-medium text-slate-500 dark:text-slate-400">
+ {key.replace(/_/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase())}
+ </span>
+ <span className="text-sm text-slate-700 dark:text-slate-300 text-right max-w-[60%]">
+ {String(value)}
+ </span>
+ </div>
+ ))}
+ </div>
+ )}
+
+ {content.raw !== undefined && !content.text && !content.items && !content.properties && (
+ <pre className="text-xs bg-slate-100 dark:bg-slate-800 p-3 rounded-lg overflow-auto">
+ {JSON.stringify(content.raw, null, 2)}
+ </pre>
+ )}
+ </ScrollArea>
+ </CardContent>
+
+ <div className="border-t px-4 py-2 bg-slate-50 dark:bg-slate-900 flex items-center justify-between">
+ <span className="text-xs text-slate-400">
+ {new Date(result.timestamp).toLocaleTimeString()}
+ </span>
+ </div>
+ </Card>
+ );
+}
+
+export default MCPResultCard;
diff --git a/src/renderer/components/mcp/MCPResultsOverlay.tsx b/src/renderer/components/mcp/MCPResultsOverlay.tsx
new file mode 100644
index 0000000..de30557
--- /dev/null
+++ b/src/renderer/components/mcp/MCPResultsOverlay.tsx
@@ -0,0 +1,105 @@
+/**
+ * MCP Results Overlay Component
+ *
+ * Displays MCP tool results alongside cue cards during calls.
+ * Shows active results with pinning and dismissal support.
+ */
+
+import React, { useMemo } from 'react';
+import { Card, CardContent } from '../ui/card';
+import { Badge } from '../ui/badge';
+import { ScrollArea } from '../ui/scroll-area';
+import { Zap, Server } from 'lucide-react';
+import { useShallow } from 'zustand/react/shallow';
+import { useMCPStore } from '../../stores/mcp.store';
+import { useMCP } from '../../hooks/useMCP';
+import { MCPResultCard } from './MCPResultCard';
+import { cn } from '../../lib/utils';
+
+interface MCPResultsOverlayProps {
+ className?: string;
+ maxResults?: number;
+}
+
+export function MCPResultsOverlay({ className, maxResults = 2 }: MCPResultsOverlayProps) {
+ // Use useShallow to prevent infinite loops from array selectors
+ const activeResults = useMCPStore(useShallow((state) => state.activeResults));
+
+ // Memoize the filtered results
+ const visibleResults = useMemo(
+ () => activeResults.filter((r) => !r.dismissed),
+ [activeResults]
+ );
+ const pinnedResults = useMemo(
+ () => activeResults.filter((r) => r.pinned && !r.dismissed),
+ [activeResults]
+ );
+
+ const { connectedServerCount, dismissResult, pinResult } = useMCP();
+
+ const allResults = [
+ ...pinnedResults,
+ ...visibleResults.filter(r => !r.pinned).slice(0, maxResults - pinnedResults.length),
+ ];
+
+ if (allResults.length === 0) {
+ return (
+ <div className={cn('flex flex-col', className)}>
+ <div className="flex items-center justify-between mb-3">
+ <div className="flex items-center gap-2">
+ <Zap className="h-4 w-4 text-amber-500" />
+ <span className="text-sm font-medium">MCP Results</span>
+ </div>
+ {connectedServerCount > 0 && (
+ <Badge variant="secondary" className="text-xs">
+ <Server className="h-3 w-3 mr-1" />
+ {connectedServerCount} connected
+ </Badge>
+ )}
+ </div>
+ <Card className="flex-1">
+ <CardContent className="flex items-center justify-center h-full min-h-[150px]">
+ <div className="text-center">
+ <Zap className="h-8 w-8 text-slate-300 dark:text-slate-600 mx-auto mb-2" />
+ <p className="text-sm text-slate-500 dark:text-slate-400">
+ {connectedServerCount > 0
+ ? 'MCP results will appear when tools are triggered'
+ : 'Connect MCP servers to see results'}
+ </p>
+ </div>
+ </CardContent>
+ </Card>
+ </div>
+ );
+ }
+
+ return (
+ <div className={cn('flex flex-col', className)}>
+ <div className="flex items-center justify-between mb-3">
+ <div className="flex items-center gap-2">
+ <Zap className="h-4 w-4 text-amber-500" />
+ <span className="text-sm font-semibold">MCP Results</span>
+ </div>
+ <Badge variant="secondary" className="text-xs">
+ {allResults.length} active
+ </Badge>
+ </div>
+
+ <ScrollArea className="flex-1">
+ <div className="space-y-3 pr-2">
+ {allResults.map((result) => (
+ <MCPResultCard
+ key={result.id}
+ result={result}
+ isPinned={result.pinned}
+ onDismiss={dismissResult}
+ onPin={pinResult}
+ />
+ ))}
+ </div>
+ </ScrollArea>
+ </div>
+ );
+}
+
+export default MCPResultsOverlay;
diff --git a/src/renderer/components/mcp/MCPStatusIndicator.tsx b/src/renderer/components/mcp/MCPStatusIndicator.tsx
new file mode 100644
index 0000000..f6cbf08
--- /dev/null
+++ b/src/renderer/components/mcp/MCPStatusIndicator.tsx
@@ -0,0 +1,146 @@
+/**
+ * MCP Status Indicator Component
+ *
+ * Shows connection status for MCP servers as a compact badge or indicator.
+ */
+
+import React from 'react';
+import { Badge } from '../ui/badge';
+import { Server, Wifi, WifiOff, Loader2, AlertCircle } from 'lucide-react';
+import { useMCPStore, selectConnectionStates, selectAvailableTools } from '../../stores/mcp.store';
+import { cn } from '../../lib/utils';
+
+type MCPConnectionStatus = 'disconnected' | 'connecting' | 'connected' | 'error';
+
+interface MCPStatusIndicatorProps {
+ variant?: 'badge' | 'dot' | 'compact';
+ showToolCount?: boolean;
+ className?: string;
+}
+
+function getStatusInfo(status: MCPConnectionStatus) {
+ switch (status) {
+ case 'connected':
+ return {
+ icon: Wifi,
+ color: 'text-green-500',
+ bgColor: 'bg-green-500',
+ badgeVariant: 'default' as const,
+ label: 'Connected',
+ };
+ case 'connecting':
+ return {
+ icon: Loader2,
+ color: 'text-amber-500',
+ bgColor: 'bg-amber-500',
+ badgeVariant: 'secondary' as const,
+ label: 'Connecting...',
+ };
+ case 'error':
+ return {
+ icon: AlertCircle,
+ color: 'text-red-500',
+ bgColor: 'bg-red-500',
+ badgeVariant: 'destructive' as const,
+ label: 'Error',
+ };
+ default:
+ return {
+ icon: WifiOff,
+ color: 'text-slate-400',
+ bgColor: 'bg-slate-400',
+ badgeVariant: 'outline' as const,
+ label: 'Disconnected',
+ };
+ }
+}
+
+export function MCPStatusIndicator({
+ variant = 'badge',
+ showToolCount = false,
+ className,
+}: MCPStatusIndicatorProps) {
+ const connectionStates = useMCPStore(selectConnectionStates);
+ const availableTools = useMCPStore(selectAvailableTools);
+
+ // Determine overall status
+ const statuses = Object.values(connectionStates);
+ let overallStatus: MCPConnectionStatus = 'disconnected';
+
+ if (statuses.some((s) => s.status === 'connected')) {
+ overallStatus = 'connected';
+ } else if (statuses.some((s) => s.status === 'connecting')) {
+ overallStatus = 'connecting';
+ } else if (statuses.some((s) => s.status === 'error')) {
+ overallStatus = 'error';
+ }
+
+ const connectedCount = statuses.filter((s) => s.status === 'connected').length;
+ const totalCount = statuses.length;
+ const toolCount = availableTools.length;
+
+ const statusInfo = getStatusInfo(overallStatus);
+ const StatusIcon = statusInfo.icon;
+
+ if (totalCount === 0) {
+ return null;
+ }
+
+ if (variant === 'dot') {
+ return (
+ <div className={cn('flex items-center gap-1', className)}>
+ <div
+ className={cn(
+ 'w-2 h-2 rounded-full',
+ statusInfo.bgColor,
+ overallStatus === 'connecting' && 'animate-pulse'
+ )}
+ />
+ {showToolCount && toolCount > 0 && (
+ <span className="text-xs text-slate-500">{toolCount}</span>
+ )}
+ </div>
+ );
+ }
+
+ if (variant === 'compact') {
+ return (
+ <div className={cn('flex items-center gap-1.5', className)}>
+ <StatusIcon
+ className={cn(
+ 'h-3.5 w-3.5',
+ statusInfo.color,
+ overallStatus === 'connecting' && 'animate-spin'
+ )}
+ />
+ <span className="text-xs font-medium">
+ {connectedCount}/{totalCount}
+ </span>
+ {showToolCount && toolCount > 0 && (
+ <span className="text-xs text-slate-500">({toolCount} tools)</span>
+ )}
+ </div>
+ );
+ }
+
+ // Badge variant
+ return (
+ <Badge variant={statusInfo.badgeVariant} className={cn('gap-1.5', className)}>
+ <Server className="h-3 w-3" />
+ <StatusIcon
+ className={cn(
+ 'h-3 w-3',
+ overallStatus === 'connecting' && 'animate-spin'
+ )}
+ />
+ <span>
+ {connectedCount}/{totalCount} MCP
+ </span>
+ {showToolCount && toolCount > 0 && (
+ <span className="text-xs opacity-75">| {toolCount} tools</span>
+ )}
+ </Badge>
+ );
+}
+
+export default MCPStatusIndicator;
diff --git a/src/renderer/components/mcp/index.ts b/src/renderer/components/mcp/index.ts
new file mode 100644
index 0000000..dd5a6c3
--- /dev/null
+++ b/src/renderer/components/mcp/index.ts
@@ -0,0 +1,7 @@
+/**
+ * MCP Components Barrel Export
+ */
+
+export { MCPResultCard } from './MCPResultCard';
+export { MCPResultsOverlay } from './MCPResultsOverlay';
+export { MCPStatusIndicator } from './MCPStatusIndicator';
diff --git a/src/renderer/components/recording/SessionControls.tsx b/src/renderer/components/recording/SessionControls.tsx
new file mode 100644
index 0000000..9aa1ab8
--- /dev/null
+++ b/src/renderer/components/recording/SessionControls.tsx
@@ -0,0 +1,100 @@
+import React from 'react';
+import { Circle, Square, AlertCircle } from 'lucide-react';
+import { Button } from '../ui/button';
+import { Card, CardContent } from '../ui/card';
+import { useSession } from '../../hooks/useSession';
+import { formatDuration } from '../../lib/utils';
+import { StreamToggles } from './StreamToggles';
+
+export function SessionControls() {
+ const {
+ status,
+ elapsedTime,
+ error,
+ streams,
+ isRecording,
+ isStarting,
+ isStopping,
+ startRecording,
+ stopRecording,
+ toggleStream,
+ } = useSession();
+
+ return (
+ <div className="space-y-6">
+ {/* Timer and Controls */}
+ <Card>
+ <CardContent className="pt-6">
+ <div className="flex flex-col items-center gap-6">
+ {/* Timer Display */}
+ <div className="text-center">
+ <div className="text-5xl font-mono font-bold tracking-wider">
+ {formatDuration(elapsedTime)}
+ </div>
+ <p className="text-sm text-muted-foreground mt-2">
+ {status === 'idle' && 'Ready to record'}
+ {status === 'starting' && 'Starting...'}
+ {status === 'recording' && 'Recording in progress'}
+ {status === 'stopping' && 'Stopping...'}
+ {status === 'processing' && 'Processing recording...'}
+ </p>
+ </div>
+
+ {/* Recording Indicator */}
+ {isRecording && (
+ <div className="flex items-center gap-2">
+ <span className="w-3 h-3 bg-red-500 rounded-full recording-indicator" />
+ <span className="text-sm font-medium text-red-500">REC</span>
+ </div>
+ )}
+
+ {/* Main Control Button */}
+ <div className="flex gap-4">
+ {!isRecording ? (
+ <Button
+ size="lg"
+ className="w-32 h-12"
+ onClick={startRecording}
+ disabled={isStarting || isStopping}
+ >
+ <Circle className="mr-2 h-4 w-4 fill-current" />
+ {isStarting ? 'Starting...' : 'Record'}
+ </Button>
+ ) : (
+ <Button
+ size="lg"
+ variant="destructive"
+ className="w-32 h-12"
+ onClick={stopRecording}
+ disabled={isStopping}
+ >
+ <Square className="mr-2 h-4 w-4 fill-current" />
+ {isStopping ? 'Stopping...' : 'Stop'}
+ </Button>
+ )}
+ </div>
+ </div>
+ </CardContent>
+ </Card>
+
+ {/* Stream Toggles */}
+ <StreamToggles
+ streams={streams}
+ onToggle={toggleStream}
+ disabled={isStarting || isStopping}
+ />
+
+ {/* Error Display */}
+ {error && (
+ <Card className="border-destructive">
+ <CardContent className="pt-4">
+ <div className="flex items-start gap-2 text-destructive">
+ <AlertCircle className="h-5 w-5 flex-shrink-0 mt-0.5" />
+ <p className="text-sm">{error}</p>
+ </div>
+ </CardContent>
+ </Card>
+ )}
+ </div>
+ );
+}
diff --git a/src/renderer/components/recording/StreamToggles.tsx b/src/renderer/components/recording/StreamToggles.tsx
new file mode 100644
index 0000000..1664c25
--- /dev/null
+++ b/src/renderer/components/recording/StreamToggles.tsx
@@ -0,0 +1,67 @@
+import React from 'react';
+import { Mic, Volume2, Monitor } from 'lucide-react';
+import { Card, CardContent, CardHeader, CardTitle } from '../ui/card';
+import { Switch } from '../ui/switch';
+
+interface StreamState {
+ microphone: boolean;
+ systemAudio: boolean;
+ screen: boolean;
+}
+
+interface StreamTogglesProps {
+ streams: StreamState;
+ onToggle: (stream: keyof StreamState) => void;
+ disabled?: boolean;
+}
+
+export function StreamToggles({ streams, onToggle, disabled }: StreamTogglesProps) {
+ const toggles = [
+ {
+ id: 'microphone' as const,
+ icon: Mic,
+ label: 'Microphone',
+ description: 'Capture audio from your microphone',
+ },
+ {
+ id: 'systemAudio' as const,
+ icon: Volume2,
+ label: 'System Audio',
+ description: 'Capture audio from your computer',
+ },
+ {
+ id: 'screen' as const,
+ icon: Monitor,
+ label: 'Screen',
+ description: 'Capture your screen',
+ },
+ ];
+
+ return (
+ <Card>
+ <CardHeader className="pb-3">
+ <CardTitle className="text-base">Sources</CardTitle>
+ </CardHeader>
+ <CardContent className="space-y-4">
+ {toggles.map(({ id, icon: Icon, label, description }) => (
+ <div key={id} className="flex items-center justify-between gap-4">
+ <div className="flex items-center gap-3">
+ <div className="p-2 rounded-lg bg-muted">
+ <Icon className="h-4 w-4" />
+ </div>
+ <div>
+ <p className="text-sm font-medium">{label}</p>
+ <p className="text-xs text-muted-foreground">{description}</p>
+ </div>
+ </div>
+ <Switch
+ checked={streams[id]}
+ onCheckedChange={() => onToggle(id)}
+ disabled={disabled}
+ />
+ </div>
+ ))}
+ </CardContent>
+ </Card>
+ );
+}
diff --git a/src/renderer/components/recording/TopStatusBar.tsx b/src/renderer/components/recording/TopStatusBar.tsx
new file mode 100644
index 0000000..9cacb83
--- /dev/null
+++ b/src/renderer/components/recording/TopStatusBar.tsx
@@ -0,0 +1,228 @@
+/**
+ * Top Status Bar Component
+ *
+ * Compact status bar showing recording info:
+ * - Recording time with indicator
+ * - Talk ratio visualization
+ * - Sentiment indicator
+ * - Playbook progress
+ * - Stop recording button
+ */
+
+import React from 'react';
+import { Circle, Square, Smile, Meh, Frown, BookOpen, Mic, Users, Loader2 } from 'lucide-react';
+import { Button } from '../ui/button';
+import { Badge } from '../ui/badge';
+import { useSession } from '../../hooks/useSession';
+import { useCopilotStore } from '../../stores/copilot.store';
+import { formatDuration, cn } from '../../lib/utils';
+
+export function TopStatusBar() {
+ const { status, elapsedTime, isRecording, isStopping, stopRecording, startRecording, isStarting } =
+ useSession();
+ const { metrics, healthScore, sentiment, playbook, isCallActive } = useCopilotStore();
+
+ const mePercent = metrics ? Math.round(metrics.talkRatio.me * 100) : 0;
+ const themPercent = metrics ? Math.round(metrics.talkRatio.them * 100) : 0;
+
+ const getSentimentIcon = () => {
+ if (!sentiment) return <Meh className="w-5 h-5 text-slate-400" />;
+ switch (sentiment.current) {
+ case 'positive':
+ return <Smile className="w-5 h-5 text-green-500" />;
+ case 'negative':
+ return <Frown className="w-5 h-5 text-red-500" />;
+ default:
+ return <Meh className="w-5 h-5 text-amber-500" />;
+ }
+ };
+
+ const getSentimentLabel = () => {
+ if (!sentiment) return 'Neutral';
+ switch (sentiment.current) {
+ case 'positive':
+ return 'Positive';
+ case 'negative':
+ return 'Concerned';
+ default:
+ return 'Neutral';
+ }
+ };
+
+ if (!isRecording && status === 'idle') {
+ return (
+ <div className="h-16 border-b bg-white/80 dark:bg-slate-900/80 backdrop-blur-lg flex items-center px-6 gap-6">
+ <div className="flex items-center gap-3">
+ <div className="flex items-center gap-2">
+ <Circle className="w-3 h-3 text-slate-400" />
+ <span className="text-2xl font-mono font-bold tracking-tight text-slate-400">0:00</span>
+ </div>
+ <Badge variant="secondary" className="text-xs">
+ READY
+ </Badge>
+ </div>
+
+ <div className="flex-1" />
+
+ <Button size="sm" className="gap-2" onClick={startRecording} disabled={isStarting}>
+ <Circle className="w-3 h-3 fill-current" />
+ Start Recording
+ </Button>
+ </div>
+ );
+ }
+
+ if (status === 'starting') {
+ return (
+ <div className="h-16 border-b bg-white/80 dark:bg-slate-900/80 backdrop-blur-lg flex items-center px-6 gap-6">
+ <div className="flex items-center gap-3">
+ <div className="flex items-center gap-2">
+ <Loader2 className="w-4 h-4 text-blue-500 animate-spin" />
+ <span className="text-2xl font-mono font-bold tracking-tight text-slate-400">0:00</span>
+ </div>
+ <Badge variant="secondary" className="text-xs bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400">
+ STARTING
+ </Badge>
+ </div>
+
+ <div className="flex-1" />
+
+ <Button size="sm" className="gap-2" disabled>
+ <Loader2 className="w-3 h-3 animate-spin" />
+ Starting...
+ </Button>
+ </div>
+ );
+ }
+
+ if (status === 'processing') {
+ return (
+ <div className="h-16 border-b bg-white/80 dark:bg-slate-900/80 backdrop-blur-lg flex items-center px-6 gap-6">
+ <div className="flex items-center gap-3">
+ <div className="flex items-center gap-2">
+ <Loader2 className="w-4 h-4 text-amber-500 animate-spin" />
+ <span className="text-2xl font-mono font-bold tracking-tight text-slate-500">
+ {formatDuration(elapsedTime)}
+ </span>
+ </div>
+ <Badge variant="secondary" className="text-xs bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400">
+ PROCESSING
+ </Badge>
+ </div>
+
+ <div className="flex-1" />
+
+ <span className="text-sm text-muted-foreground flex items-center gap-2">
+ <Loader2 className="w-4 h-4 animate-spin" />
+ Uploading recording...
+ </span>
+ </div>
+ );
+ }
+
+ return (
+ <div className="h-16 border-b bg-white/80 dark:bg-slate-900/80 backdrop-blur-lg flex items-center px-6 gap-6">
+ {/* Recording Status */}
+ <div className="flex items-center gap-3">
+ <div className="flex items-center gap-2">
+ <Circle
+ className={cn(
+ 'w-3 h-3',
+ isRecording ? 'fill-red-500 text-red-500 animate-pulse' : 'text-slate-400'
+ )}
+ />
+ <span className="text-2xl font-mono font-bold tracking-tight">
+ {formatDuration(elapsedTime)}
+ </span>
+ </div>
+ {isRecording && (
+ <Badge variant="secondary" className="text-xs bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400">
+ REC
+ </Badge>
+ )}
+ </div>
+
+ <div className="h-8 w-px bg-slate-200 dark:bg-slate-700" />
+
+ {/* Talk Ratio */}
+ <div className="flex items-center gap-3">
+ <div className="flex items-center gap-2">
+ <Mic className="w-4 h-4 text-blue-500" />
+ <div className="text-sm font-medium text-slate-600 dark:text-slate-400">You</div>
+ <div className="text-lg font-bold text-blue-600">{mePercent}%</div>
+ </div>
+ <div className="w-24 h-2 bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden">
+ <div
+ className={cn(
+ 'h-full transition-all duration-500',
+ mePercent > 65 ? 'bg-amber-500' : mePercent >= 35 ? 'bg-blue-500' : 'bg-blue-400'
+ )}
+ style={{ width: `${mePercent}%` }}
+ />
+ </div>
+ <div className="flex items-center gap-2">
+ <div className="text-lg font-bold text-purple-600">{themPercent}%</div>
+ <div className="text-sm font-medium text-slate-600 dark:text-slate-400">Them</div>
+ <Users className="w-4 h-4 text-purple-500" />
+ </div>
+ </div>
+
+ <div className="h-8 w-px bg-slate-200 dark:bg-slate-700" />
+
+ {/* Sentiment */}
+ <div className="flex items-center gap-2">
+ {getSentimentIcon()}
+ <span className="text-sm font-medium">{getSentimentLabel()}</span>
+ </div>
+
+ {playbook && (
+ <>
+ <div className="h-8 w-px bg-slate-200 dark:bg-slate-700" />
+ <div className="flex items-center gap-2">
+ <BookOpen className="w-4 h-4 text-slate-500" />
+ <span className="text-sm font-medium">{playbook.playbookName}</span>
+ <Badge
+ variant={playbook.coveragePercentage >= 70 ? 'default' : 'outline'}
+ className="ml-1"
+ >
+ {playbook.covered}/{playbook.total}
+ </Badge>
+ </div>
+ </>
+ )}
+
+ {/* Health Score */}
+ {isCallActive && (
+ <>
+ <div className="h-8 w-px bg-slate-200 dark:bg-slate-700" />
+ <Badge
+ variant={healthScore >= 70 ? 'default' : healthScore >= 50 ? 'secondary' : 'destructive'}
+ className="text-sm px-3 py-1"
+ >
+ Health: {healthScore}
+ </Badge>
+ </>
+ )}
+
+ <div className="flex-1" />
+
+ {/* Recording Controls */}
+ {isRecording && !isStopping && (
+ <Button variant="destructive" size="sm" className="gap-2" onClick={stopRecording}>
+ <Square className="w-3 h-3 fill-white" />
+ Stop
+ </Button>
+ )}
+
+ {/* Stopping state */}
+ {isStopping && (
+ <Button variant="secondary" size="sm" className="gap-2" disabled>
+ <Loader2 className="w-3 h-3 animate-spin" />
+ Stopping...
+ </Button>
+ )}
+ </div>
+ );
+}
+
+export default TopStatusBar;
diff --git a/src/renderer/components/settings/CueCardEditor.tsx b/src/renderer/components/settings/CueCardEditor.tsx
new file mode 100644
index 0000000..b72c942
--- /dev/null
+++ b/src/renderer/components/settings/CueCardEditor.tsx
@@ -0,0 +1,440 @@
+/**
+ * Cue Card Editor Component
+ *
+ * Allows users to view, create, edit, and delete cue cards
+ * for objection handling.
+ */
+
+import React, { useState } from 'react';
+import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '../ui/card';
+import { Button } from '../ui/button';
+import { Input } from '../ui/input';
+import { Label } from '../ui/label';
+import { Textarea } from '../ui/textarea';
+import { Badge } from '../ui/badge';
+import { ScrollArea } from '../ui/scroll-area';
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+ DialogTrigger,
+} from '../ui/dialog';
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from '../ui/select';
+import {
+ AlertDialog,
+ AlertDialogAction,
+ AlertDialogCancel,
+ AlertDialogContent,
+ AlertDialogDescription,
+ AlertDialogFooter,
+ AlertDialogHeader,
+ AlertDialogTitle,
+ AlertDialogTrigger,
+} from '../ui/alert-dialog';
+import { Plus, Pencil, Trash2, MessageSquare, HelpCircle, X } from 'lucide-react';
+import { trpc } from '../../api/trpc';
+import { cn } from '../../lib/utils';
+
+const OBJECTION_TYPES = [
+ { value: 'pricing', label: 'Pricing', color: 'bg-green-100 text-green-800' },
+ { value: 'timing', label: 'Timing', color: 'bg-amber-100 text-amber-800' },
+ { value: 'competitor', label: 'Competitor', color: 'bg-purple-100 text-purple-800' },
+ { value: 'authority', label: 'Authority', color: 'bg-blue-100 text-blue-800' },
+ { value: 'security', label: 'Security', color: 'bg-red-100 text-red-800' },
+ { value: 'integration', label: 'Integration', color: 'bg-cyan-100 text-cyan-800' },
+ { value: 'not_interested', label: 'Not Interested', color: 'bg-gray-100 text-gray-800' },
+ { value: 'send_info', label: 'Send Info', color: 'bg-indigo-100 text-indigo-800' },
+] as const;
+
+type ObjectionType = typeof OBJECTION_TYPES[number]['value'];
+
+interface CueCard {
+ id: string;
+ objectionType: ObjectionType;
+ title: string;
+ talkTracks: string[];
+ followUpQuestions: string[];
+ proofPoints?: string[];
+ avoidSaying?: string[];
+ sourceDoc?: string;
+ isDefault: boolean;
+}
+
+interface CueCardFormData {
+ objectionType: ObjectionType;
+ title: string;
+ talkTracks: string;
+ followUpQuestions: string;
+ proofPoints: string;
+ avoidSaying: string;
+ sourceDoc: string;
+}
+
+const emptyForm: CueCardFormData = {
+ objectionType: 'pricing',
+ title: '',
+ talkTracks: '',
+ followUpQuestions: '',
+ proofPoints: '',
+ avoidSaying: '',
+ sourceDoc: '',
+};
+
+function CueCardForm({
+ initialData,
+ onSubmit,
+ onCancel,
+ isLoading,
+}: {
+ initialData?: CueCard;
+ onSubmit: (data: CueCardFormData) => void;
+ onCancel: () => void;
+ isLoading: boolean;
+}) {
+ const [form, setForm] = useState<CueCardFormData>(
+ initialData
+ ? {
+ objectionType: initialData.objectionType,
+ title: initialData.title,
+ talkTracks: initialData.talkTracks.join('\n'),
+ followUpQuestions: initialData.followUpQuestions.join('\n'),
+ proofPoints: initialData.proofPoints?.join('\n') || '',
+ avoidSaying: initialData.avoidSaying?.join('\n') || '',
+ sourceDoc: initialData.sourceDoc || '',
+ }
+ : emptyForm
+ );
+
+ const handleSubmit = (e: React.FormEvent) => {
+ e.preventDefault();
+ onSubmit(form);
+ };
+
+ return (
+ <form onSubmit={handleSubmit} className="space-y-4">
+ <div className="grid grid-cols-2 gap-4">
+ <div className="space-y-2">
+ <Label htmlFor="objectionType">Objection Type</Label>
+ <Select
+ value={form.objectionType}
+ onValueChange={(v) => setForm({ ...form, objectionType: v as ObjectionType })}
+ >
+ <SelectTrigger>
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ {OBJECTION_TYPES.map((type) => (
+ <SelectItem key={type.value} value={type.value}>
+ {type.label}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ <div className="space-y-2">
+ <Label htmlFor="title">Title</Label>
+ <Input
+ id="title"
+ value={form.title}
+ onChange={(e) => setForm({ ...form, title: e.target.value })}
+ placeholder="e.g., Handling Pricing Objections"
+ required
+ />
+ </div>
+ </div>
+
+ <div className="space-y-2">
+ <Label htmlFor="talkTracks">
+ Talk Tracks <span className="text-muted-foreground text-xs">(one per line)</span>
+ </Label>
+ <Textarea
+ id="talkTracks"
+ value={form.talkTracks}
+ onChange={(e) => setForm({ ...form, talkTracks: e.target.value })}
+ placeholder="I understand budget is a concern. Let's talk about the ROI...&#10;What would the cost of NOT solving this problem be?"
+ rows={4}
+ required
+ />
+ </div>
+
+ <div className="space-y-2">
+ <Label htmlFor="followUpQuestions">
+ Follow-up Questions <span className="text-muted-foreground text-xs">(one per line)</span>
+ </Label>
+ <Textarea
+ id="followUpQuestions"
+ value={form.followUpQuestions}
+ onChange={(e) => setForm({ ...form, followUpQuestions: e.target.value })}
+ placeholder="What budget range were you expecting?&#10;How do you typically evaluate ROI?"
+ rows={3}
+ required
+ />
+ </div>
+
+ <div className="grid grid-cols-2 gap-4">
+ <div className="space-y-2">
+ <Label htmlFor="proofPoints">
+ Proof Points <span className="text-muted-foreground text-xs">(optional, one per line)</span>
+ </Label>
+ <Textarea
+ id="proofPoints"
+ value={form.proofPoints}
+ onChange={(e) => setForm({ ...form, proofPoints: e.target.value })}
+ placeholder="Average customer sees 3x ROI&#10;Reduces manual work by 40%"
+ rows={2}
+ />
+ </div>
+ <div className="space-y-2">
+ <Label htmlFor="avoidSaying">
+ Avoid Saying <span className="text-muted-foreground text-xs">(optional, one per line)</span>
+ </Label>
+ <Textarea
+ id="avoidSaying"
+ value={form.avoidSaying}
+ onChange={(e) => setForm({ ...form, avoidSaying: e.target.value })}
+ placeholder="I can give you a discount&#10;It's not that expensive"
+ rows={2}
+ />
+ </div>
+ </div>
+
+ <div className="space-y-2">
+ <Label htmlFor="sourceDoc">
+ Source Document <span className="text-muted-foreground text-xs">(optional reference)</span>
+ </Label>
+ <Input
+ id="sourceDoc"
+ value={form.sourceDoc}
+ onChange={(e) => setForm({ ...form, sourceDoc: e.target.value })}
+ placeholder="e.g., Meeting Playbook v2.0, Page 15"
+ />
+ </div>
+
+ <DialogFooter>
+ <Button type="button" variant="outline" onClick={onCancel}>
+ Cancel
+ </Button>
+ <Button type="submit" disabled={isLoading}>
+ {isLoading ? 'Saving...' : initialData ? 'Update' : 'Create'}
+ </Button>
+ </DialogFooter>
+ </form>
+ );
+}
+
+export function CueCardEditor() {
+ const [editingCard, setEditingCard] = useState<CueCard | null>(null);
+ const [isCreateOpen, setIsCreateOpen] = useState(false);
+ const [isEditOpen, setIsEditOpen] = useState(false);
+
+ const { data: cueCards, refetch } = trpc.settings.getCueCards.useQuery();
+ const createMutation = trpc.settings.createCueCard.useMutation({
+ onSuccess: () => {
+ refetch();
+ setIsCreateOpen(false);
+ },
+ });
+ const updateMutation = trpc.settings.updateCueCard.useMutation({
+ onSuccess: () => {
+ refetch();
+ setIsEditOpen(false);
+ setEditingCard(null);
+ },
+ });
+ const deleteMutation = trpc.settings.deleteCueCard.useMutation({
+ onSuccess: () => refetch(),
+ });
+
+ const handleCreate = (data: CueCardFormData) => {
+ createMutation.mutate({
+ objectionType: data.objectionType,
+ title: data.title,
+ talkTracks: data.talkTracks.split('\n').filter(Boolean),
+ followUpQuestions: data.followUpQuestions.split('\n').filter(Boolean),
+ proofPoints: data.proofPoints ? data.proofPoints.split('\n').filter(Boolean) : undefined,
+ avoidSaying: data.avoidSaying ? data.avoidSaying.split('\n').filter(Boolean) : undefined,
+ sourceDoc: data.sourceDoc || undefined,
+ });
+ };
+
+ const handleUpdate = (data: CueCardFormData) => {
+ if (!editingCard) return;
+ updateMutation.mutate({
+ id: editingCard.id,
+ data: {
+ objectionType: data.objectionType,
+ title: data.title,
+ talkTracks: data.talkTracks.split('\n').filter(Boolean),
+ followUpQuestions: data.followUpQuestions.split('\n').filter(Boolean),
+ proofPoints: data.proofPoints ? data.proofPoints.split('\n').filter(Boolean) : [],
+ avoidSaying: data.avoidSaying ? data.avoidSaying.split('\n').filter(Boolean) : [],
+ sourceDoc: data.sourceDoc || undefined,
+ },
+ });
+ };
+
+ const getTypeColor = (type: string) => {
+ return OBJECTION_TYPES.find((t) => t.value === type)?.color || 'bg-gray-100 text-gray-800';
+ };
+
+ return (
+ <div className="space-y-4">
+ <div className="flex items-center justify-between">
+ <div>
+ <h3 className="text-lg font-medium">Cue Cards</h3>
+ <p className="text-sm text-muted-foreground">
+ Customize objection handling cards shown during calls
+ </p>
+ </div>
+ <Dialog open={isCreateOpen} onOpenChange={setIsCreateOpen}>
+ <DialogTrigger asChild>
+ <Button>
+ <Plus className="h-4 w-4 mr-2" />
+ Add Cue Card
+ </Button>
+ </DialogTrigger>
+ <DialogContent className="max-w-2xl max-h-[90vh] overflow-y-auto">
+ <DialogHeader>
+ <DialogTitle>Create Cue Card</DialogTitle>
+ <DialogDescription>
+ Add a new objection handling card with talk tracks and questions.
+ </DialogDescription>
+ </DialogHeader>
+ <CueCardForm
+ onSubmit={handleCreate}
+ onCancel={() => setIsCreateOpen(false)}
+ isLoading={createMutation.isPending}
+ />
+ </DialogContent>
+ </Dialog>
+ </div>
+
+ <ScrollArea className="h-[500px]">
+ <div className="space-y-3 pr-4">
+ {cueCards?.map((card) => (
+ <Card key={card.id} className="relative">
+ <CardHeader className="pb-2">
+ <div className="flex items-start justify-between">
+ <div>
+ <div className="flex items-center gap-2">
+ <CardTitle className="text-base">{card.title}</CardTitle>
+ {card.isDefault && (
+ <Badge variant="secondary" className="text-xs">
+ Default
+ </Badge>
+ )}
+ </div>
+ <Badge className={cn('mt-1 text-xs', getTypeColor(card.objectionType))}>
+ {OBJECTION_TYPES.find((t) => t.value === card.objectionType)?.label}
+ </Badge>
+ </div>
+ <div className="flex items-center gap-1">
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-8 w-8"
+ onClick={() => {
+ setEditingCard(card as CueCard);
+ setIsEditOpen(true);
+ }}
+ >
+ <Pencil className="h-4 w-4" />
+ </Button>
+ <AlertDialog>
+ <AlertDialogTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8 text-destructive">
+ <Trash2 className="h-4 w-4" />
+ </Button>
+ </AlertDialogTrigger>
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>Delete Cue Card</AlertDialogTitle>
+ <AlertDialogDescription>
+ Are you sure you want to delete "{card.title}"? This action cannot be
+ undone.
+ </AlertDialogDescription>
+ </AlertDialogHeader>
+ <AlertDialogFooter>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
+ <AlertDialogAction
+ onClick={() => deleteMutation.mutate({ id: card.id })}
+ className="bg-destructive text-destructive-foreground"
+ >
+ Delete
+ </AlertDialogAction>
+ </AlertDialogFooter>
+ </AlertDialogContent>
+ </AlertDialog>
+ </div>
+ </div>
+ </CardHeader>
+ <CardContent className="space-y-2">
+ <div className="flex items-start gap-2">
+ <MessageSquare className="h-4 w-4 mt-0.5 text-muted-foreground" />
+ <div className="text-sm">
+ <span className="font-medium">Talk Tracks:</span>{' '}
+ {card.talkTracks.slice(0, 2).join(' • ')}
+ {card.talkTracks.length > 2 && (
+ <span className="text-muted-foreground"> +{card.talkTracks.length - 2} more</span>
+ )}
+ </div>
+ </div>
+ <div className="flex items-start gap-2">
+ <HelpCircle className="h-4 w-4 mt-0.5 text-muted-foreground" />
+ <div className="text-sm">
+ <span className="font-medium">Questions:</span>{' '}
+ {card.followUpQuestions.slice(0, 2).join(' • ')}
+ {card.followUpQuestions.length > 2 && (
+ <span className="text-muted-foreground">
+ {' '}
+ +{card.followUpQuestions.length - 2} more
+ </span>
+ )}
+ </div>
+ </div>
+ </CardContent>
+ </Card>
+ ))}
+
+ {(!cueCards || cueCards.length === 0) && (
+ <div className="text-center py-8 text-muted-foreground">
+ No cue cards yet. Create one to get started.
+ </div>
+ )}
+ </div>
+ </ScrollArea>
+
+ {/* Edit Dialog */}
+ <Dialog open={isEditOpen} onOpenChange={setIsEditOpen}>
+ <DialogContent className="max-w-2xl max-h-[90vh] overflow-y-auto">
+ <DialogHeader>
+ <DialogTitle>Edit Cue Card</DialogTitle>
+ <DialogDescription>Update the objection handling card.</DialogDescription>
+ </DialogHeader>
+ {editingCard && (
+ <CueCardForm
+ initialData={editingCard}
+ onSubmit={handleUpdate}
+ onCancel={() => {
+ setIsEditOpen(false);
+ setEditingCard(null);
+ }}
+ isLoading={updateMutation.isPending}
+ />
+ )}
+ </DialogContent>
+ </Dialog>
+ </div>
+ );
+}
+
+export default CueCardEditor;
diff --git a/src/renderer/components/settings/MCPServersPanel.tsx b/src/renderer/components/settings/MCPServersPanel.tsx
new file mode 100644
index 0000000..4202ca4
--- /dev/null
+++ b/src/renderer/components/settings/MCPServersPanel.tsx
@@ -0,0 +1,938 @@
+/**
+ * MCP Servers Panel Component
+ *
+ * Settings panel for managing MCP server connections.
+ * Allows adding, editing, and removing MCP servers.
+ */
+
+import React, { useState, useEffect } from 'react';
+import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '../ui/card';
+import { Button } from '../ui/button';
+import { Input } from '../ui/input';
+import { Label } from '../ui/label';
+import { Badge } from '../ui/badge';
+import { Switch } from '../ui/switch';
+import { ScrollArea } from '../ui/scroll-area';
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from '../ui/dialog';
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from '../ui/select';
+import {
+ AlertDialog,
+ AlertDialogAction,
+ AlertDialogCancel,
+ AlertDialogContent,
+ AlertDialogDescription,
+ AlertDialogFooter,
+ AlertDialogHeader,
+ AlertDialogTitle,
+ AlertDialogTrigger,
+} from '../ui/alert-dialog';
+import {
+ Plus,
+ Pencil,
+ Trash2,
+ Server,
+ Wifi,
+ WifiOff,
+ Loader2,
+ AlertCircle,
+ Check,
+ RefreshCw,
+ ExternalLink,
+ Zap,
+ X,
+} from 'lucide-react';
+import { useMCP } from '../../hooks/useMCP';
+import { cn } from '../../lib/utils';
+import type { MCPServerConfig, MCPServerTemplate } from '../../../preload/index';
+
+// Server Card Component
+
+interface ServerCardProps {
+ server: MCPServerConfig;
+ connectionState?: { status: string; error?: string };
+ onEdit: (server: MCPServerConfig) => void;
+ onDelete: (serverId: string) => void;
+ onConnect: (serverId: string) => void;
+ onDisconnect: (serverId: string) => void;
+ onToggleEnabled: (serverId: string, enabled: boolean) => void;
+ isConnecting?: boolean;
+}
+
+function ServerCard({
+ server,
+ connectionState,
+ onEdit,
+ onDelete,
+ onConnect,
+ onDisconnect,
+ onToggleEnabled,
+ isConnecting,
+}: ServerCardProps) {
+ const status = connectionState?.status || 'disconnected';
+
+ const getStatusBadge = () => {
+ switch (status) {
+ case 'connected':
+ return (
+ <Badge className="bg-green-500 text-white">
+ <Wifi className="h-3 w-3 mr-1" />
+ Connected
+ </Badge>
+ );
+ case 'connecting':
+ return (
+ <Badge variant="secondary" className="animate-pulse">
+ <Loader2 className="h-3 w-3 mr-1 animate-spin" />
+ Connecting
+ </Badge>
+ );
+ case 'error':
+ return (
+ <Badge variant="destructive">
+ <AlertCircle className="h-3 w-3 mr-1" />
+ Error
+ </Badge>
+ );
+ default:
+ return (
+ <Badge variant="outline">
+ <WifiOff className="h-3 w-3 mr-1" />
+ Disconnected
+ </Badge>
+ );
+ }
+ };
+
+ return (
+ <Card className={cn('transition-all', !server.isEnabled && 'opacity-60')}>
+ <CardHeader className="pb-2">
+ <div className="flex items-start justify-between">
+ <div className="flex-1">
+ <div className="flex items-center gap-2 mb-1">
+ <Server className="h-4 w-4 text-slate-500" />
+ <CardTitle className="text-base">{server.name}</CardTitle>
+ </div>
+ <CardDescription className="text-xs">
+ {server.transport === 'stdio' ? server.command : server.url}
+ </CardDescription>
+ </div>
+ {getStatusBadge()}
+ </div>
+ </CardHeader>
+ <CardContent className="pt-2">
+ {connectionState?.error && (
+ <p className="text-xs text-red-500 mb-3 p-2 bg-red-50 dark:bg-red-950/30 rounded">
+ {connectionState.error}
+ </p>
+ )}
+
+ <div className="flex items-center justify-between">
+ <div className="flex items-center gap-4">
+ <div className="flex items-center gap-2">
+ <Switch
+ checked={server.isEnabled}
+ onCheckedChange={(checked) => onToggleEnabled(server.id, checked)}
+ id={`enabled-${server.id}`}
+ />
+ <Label htmlFor={`enabled-${server.id}`} className="text-xs">
+ Enabled
+ </Label>
+ </div>
+ <Badge variant="outline" className="text-xs">
+ {server.transport}
+ </Badge>
+ {server.autoConnect && (
+ <Badge variant="secondary" className="text-xs">
+ Auto-connect
+ </Badge>
+ )}
+ </div>
+
+ <div className="flex gap-1">
+ {status === 'connected' ? (
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => onDisconnect(server.id)}
+ disabled={isConnecting}
+ >
+ Disconnect
+ </Button>
+ ) : (
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => onConnect(server.id)}
+ disabled={isConnecting || !server.isEnabled}
+ >
+ {isConnecting ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ 'Connect'
+ )}
+ </Button>
+ )}
+ <Button variant="ghost" size="icon" onClick={() => onEdit(server)}>
+ <Pencil className="h-4 w-4" />
+ </Button>
+ <AlertDialog>
+ <AlertDialogTrigger asChild>
+ <Button variant="ghost" size="icon">
+ <Trash2 className="h-4 w-4 text-red-500" />
+ </Button>
+ </AlertDialogTrigger>
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>Delete Server</AlertDialogTitle>
+ <AlertDialogDescription>
+ Are you sure you want to delete "{server.name}"? This action cannot be undone.
+ </AlertDialogDescription>
+ </AlertDialogHeader>
+ <AlertDialogFooter>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
+ <AlertDialogAction
+ onClick={() => onDelete(server.id)}
+ className="bg-red-500 hover:bg-red-600"
+ >
+ Delete
+ </AlertDialogAction>
+ </AlertDialogFooter>
+ </AlertDialogContent>
+ </AlertDialog>
+ </div>
+ </div>
+ </CardContent>
+ </Card>
+ );
+}
+
+// Add Server Dialog
+
+interface AddServerDialogProps {
+ open: boolean;
+ onOpenChange: (open: boolean) => void;
+ templates: MCPServerTemplate[];
+ editingServer?: MCPServerConfig | null;
+ onSubmit: (data: any) => Promise<void>;
+}
+
+function AddServerDialog({
+ open,
+ onOpenChange,
+ templates,
+ editingServer,
+ onSubmit,
+}: AddServerDialogProps) {
+ const [selectedTemplate, setSelectedTemplate] = useState<string>('');
+ const [form, setForm] = useState({
+ name: '',
+ transport: 'stdio' as 'stdio' | 'http',
+ command: '',
+ args: '',
+ url: '',
+ env: {} as Record<string, string>,
+ headers: {} as Record<string, string>,
+ isEnabled: true,
+ autoConnect: false,
+ });
+ const [isSubmitting, setIsSubmitting] = useState(false);
+
+ useEffect(() => {
+ if (editingServer) {
+ setForm({
+ name: editingServer.name,
+ transport: editingServer.transport,
+ command: editingServer.command || '',
+ args: editingServer.args?.join(' ') || '',
+ url: editingServer.url || '',
+ env: {},
+ headers: {},
+ isEnabled: editingServer.isEnabled,
+ autoConnect: editingServer.autoConnect,
+ });
+ setSelectedTemplate(editingServer.templateId || '');
+ } else {
+ setForm({
+ name: '',
+ transport: 'stdio',
+ command: '',
+ args: '',
+ url: '',
+ env: {},
+ headers: {},
+ isEnabled: true,
+ autoConnect: false,
+ });
+ setSelectedTemplate('');
+ }
+ }, [editingServer, open]);
+
+ const handleTemplateSelect = (templateId: string) => {
+ setSelectedTemplate(templateId);
+ const template = templates.find((t) => t.id === templateId);
+ if (template) {
+ setForm({
+ ...form,
+ name: template.name,
+ transport: template.transport,
+ command: template.defaultCommand || '',
+ args: template.defaultArgs?.join(' ') || '',
+ url: template.defaultUrl || '',
+ });
+ }
+ };
+
+ const handleSubmit = async () => {
+ setIsSubmitting(true);
+ try {
+ await onSubmit({
+ name: form.name,
+ transport: form.transport,
+ command: form.transport === 'stdio' ? form.command : undefined,
+ args: form.transport === 'stdio' && form.args
+ ? form.args.split(' ').filter(Boolean)
+ : undefined,
+ url: form.transport === 'http' ? form.url : undefined,
+ env: Object.keys(form.env).length > 0 ? form.env : undefined,
+ headers: Object.keys(form.headers).length > 0 ? form.headers : undefined,
+ templateId: selectedTemplate || undefined,
+ isEnabled: form.isEnabled,
+ autoConnect: form.autoConnect,
+ });
+ onOpenChange(false);
+ } finally {
+ setIsSubmitting(false);
+ }
+ };
+
+ const selectedTemplateData = templates.find((t) => t.id === selectedTemplate);
+
+ return (
+ <Dialog open={open} onOpenChange={onOpenChange}>
+ <DialogContent className="max-w-xl max-h-[85vh] flex flex-col p-0 gap-0">
+ <DialogHeader className="shrink-0 px-6 pt-6 pb-4">
+ <DialogTitle>
+ {editingServer ? 'Edit MCP Server' : 'Add MCP Server'}
+ </DialogTitle>
+ <DialogDescription>
+ {editingServer
+ ? 'Update the server configuration.'
+ : 'Connect to an MCP server for CRM, docs, or other integrations.'}
+ </DialogDescription>
+ </DialogHeader>
+
+ <ScrollArea className="flex-1">
+ <div className="space-y-4 pl-6 pr-8 pb-4">
+ {/* Template Selection */}
+ {!editingServer && (
+ <div className="space-y-2">
+ <Label>Start from template (optional)</Label>
+ <Select value={selectedTemplate} onValueChange={handleTemplateSelect}>
+ <SelectTrigger>
+ <SelectValue placeholder="Choose a template..." />
+ </SelectTrigger>
+ <SelectContent>
+ {templates.map((template) => (
+ <SelectItem key={template.id} value={template.id}>
+ <div className="flex items-center gap-2">
+ <Server className="h-4 w-4" />
+ <span>{template.name}</span>
+ </div>
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ {selectedTemplateData && (
+ <p className="text-xs text-slate-500">{selectedTemplateData.description}</p>
+ )}
+ </div>
+ )}
+
+ {/* Name */}
+ <div className="space-y-2">
+ <Label htmlFor="name">Server Name</Label>
+ <Input
+ id="name"
+ value={form.name}
+ onChange={(e) => setForm({ ...form, name: e.target.value })}
+ placeholder="e.g., HubSpot CRM"
+ required
+ />
+ </div>
+
+ {/* Transport Type */}
+ <div className="space-y-2">
+ <Label>Transport Type</Label>
+ <Select
+ value={form.transport}
+ onValueChange={(v) => setForm({ ...form, transport: v as 'stdio' | 'http' })}
+ >
+ <SelectTrigger>
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="stdio">Stdio (Local Process)</SelectItem>
+ <SelectItem value="http">HTTP/SSE (Remote)</SelectItem>
+ </SelectContent>
+ </Select>
+ </div>
+
+ {/* Stdio Config */}
+ {form.transport === 'stdio' && (
+ <>
+ <div className="space-y-2">
+ <Label htmlFor="command">Command</Label>
+ <Input
+ id="command"
+ value={form.command}
+ onChange={(e) => setForm({ ...form, command: e.target.value })}
+ placeholder="e.g., npx"
+ required
+ />
+ </div>
+ <div className="space-y-2">
+ <Label htmlFor="args">Arguments (space-separated)</Label>
+ <Input
+ id="args"
+ value={form.args}
+ onChange={(e) => setForm({ ...form, args: e.target.value })}
+ placeholder="e.g., -y @modelcontextprotocol/server-memory"
+ />
+ </div>
+
+ {/* Environment Variables for STDIO */}
+ <div className="space-y-4 p-4 bg-slate-50 dark:bg-slate-800/50 rounded-lg border border-slate-200 dark:border-slate-700">
+ <div className="flex items-center justify-between">
+ <div>
+ <Label className="text-sm font-medium">Environment Variables</Label>
+ <p className="text-xs text-slate-500 mt-1">
+ Add environment variables for the process (e.g., API_KEY, CODA_TOKEN)
+ </p>
+ </div>
+ <Button
+ type="button"
+ variant="outline"
+ size="sm"
+ onClick={() => {
+ const key = `ENV_VAR_${Object.keys(form.env).length + 1}`;
+ setForm({
+ ...form,
+ env: { ...form.env, [key]: '' },
+ });
+ }}
+ >
+ <Plus className="h-3 w-3 mr-1" />
+ Add Variable
+ </Button>
+ </div>
+ {Object.keys(form.env).length > 0 && (
+ <div className="space-y-3 pt-2">
+ {Object.entries(form.env).map(([key, value], index) => (
+ <div key={index} className="flex gap-3 items-center">
+ <div className="flex-1">
+ <Input
+ placeholder="Variable name (e.g., API_KEY)"
+ value={key}
+ onChange={(e) => {
+ const newEnv = { ...form.env };
+ delete newEnv[key];
+ newEnv[e.target.value] = value;
+ setForm({ ...form, env: newEnv });
+ }}
+ className="font-mono text-sm"
+ />
+ </div>
+ <div className="flex-1">
+ <Input
+ placeholder="Value (stored securely)"
+ type="password"
+ value={value}
+ onChange={(e) => {
+ setForm({
+ ...form,
+ env: { ...form.env, [key]: e.target.value },
+ });
+ }}
+ />
+ </div>
+ <Button
+ type="button"
+ variant="ghost"
+ size="icon"
+ className="shrink-0 hover:bg-red-50 dark:hover:bg-red-950/30"
+ onClick={() => {
+ const newEnv = { ...form.env };
+ delete newEnv[key];
+ setForm({ ...form, env: newEnv });
+ }}
+ >
+ <Trash2 className="h-4 w-4 text-red-500" />
+ </Button>
+ </div>
+ ))}
+ </div>
+ )}
+ {Object.keys(form.env).length === 0 && (
+ <p className="text-xs text-slate-400 dark:text-slate-500 italic pt-1">
+ No environment variables configured
+ </p>
+ )}
+ </div>
+ </>
+ )}
+
+ {/* HTTP Config */}
+ {form.transport === 'http' && (
+ <>
+ <div className="space-y-2">
+ <Label htmlFor="url">Server URL</Label>
+ <Input
+ id="url"
+ value={form.url}
+ onChange={(e) => setForm({ ...form, url: e.target.value })}
+ placeholder="https://mcp-server.example.com"
+ required
+ />
+ </div>
+
+ {/* Custom Headers */}
+ <div className="space-y-4 p-4 bg-slate-50 dark:bg-slate-800/50 rounded-lg border border-slate-200 dark:border-slate-700">
+ <div className="flex items-center justify-between">
+ <div>
+ <Label className="text-sm font-medium">Custom Headers</Label>
+ <p className="text-xs text-slate-500 mt-1">
+ Add custom HTTP headers for authentication (e.g., Authorization, X-API-Key)
+ </p>
+ </div>
+ <Button
+ type="button"
+ variant="outline"
+ size="sm"
+ onClick={() => {
+ const key = `Header-${Object.keys(form.headers).length + 1}`;
+ setForm({
+ ...form,
+ headers: { ...form.headers, [key]: '' },
+ });
+ }}
+ >
+ <Plus className="h-3 w-3 mr-1" />
+ Add Header
+ </Button>
+ </div>
+ {Object.keys(form.headers).length > 0 && (
+ <div className="space-y-3 pt-2">
+ {Object.entries(form.headers).map(([key, value], index) => (
+ <div key={index} className="flex gap-3 items-center">
+ <div className="flex-1">
+ <Input
+ placeholder="Header name (e.g., Authorization)"
+ value={key}
+ onChange={(e) => {
+ const newHeaders = { ...form.headers };
+ delete newHeaders[key];
+ newHeaders[e.target.value] = value;
+ setForm({ ...form, headers: newHeaders });
+ }}
+ className="font-mono text-sm"
+ />
+ </div>
+ <div className="flex-1">
+ <Input
+ placeholder="Value (stored securely)"
+ type="password"
+ value={value}
+ onChange={(e) => {
+ setForm({
+ ...form,
+ headers: { ...form.headers, [key]: e.target.value },
+ });
+ }}
+ />
+ </div>
+ <Button
+ type="button"
+ variant="ghost"
+ size="icon"
+ className="shrink-0 hover:bg-red-50 dark:hover:bg-red-950/30"
+ onClick={() => {
+ const newHeaders = { ...form.headers };
+ delete newHeaders[key];
+ setForm({ ...form, headers: newHeaders });
+ }}
+ >
+ <Trash2 className="h-4 w-4 text-red-500" />
+ </Button>
+ </div>
+ ))}
+ </div>
+ )}
+ {Object.keys(form.headers).length === 0 && (
+ <p className="text-xs text-slate-400 dark:text-slate-500 italic pt-1">
+ No custom headers configured
+ </p>
+ )}
+ </div>
+ </>
+ )}
+
+ {/* Environment Variables (for templates that require them) */}
+ {selectedTemplateData?.requiredEnvVars && selectedTemplateData.requiredEnvVars.length > 0 && (
+ <div className="space-y-4 p-4 bg-amber-50 dark:bg-amber-950/20 rounded-lg border border-amber-200 dark:border-amber-800">
+ <div>
+ <Label className="text-sm font-medium text-amber-800 dark:text-amber-200">Required Credentials</Label>
+ <p className="text-xs text-amber-600 dark:text-amber-400 mt-1">
+ These credentials are required for this template to work
+ </p>
+ </div>
+ <div className="space-y-4 pt-2">
+ {selectedTemplateData.requiredEnvVars.map((envVar) => (
+ <div key={envVar.key} className="space-y-2">
+ <Label htmlFor={envVar.key} className="text-sm font-medium">
+ {envVar.label}
+ </Label>
+ <Input
+ id={envVar.key}
+ type={envVar.secret ? 'password' : 'text'}
+ value={form.env[envVar.key] || ''}
+ onChange={(e) =>
+ setForm({
+ ...form,
+ env: { ...form.env, [envVar.key]: e.target.value },
+ })
+ }
+ placeholder={envVar.placeholder}
+ />
+ {envVar.description && (
+ <p className="text-xs text-slate-500">{envVar.description}</p>
+ )}
+ </div>
+ ))}
+ </div>
+ </div>
+ )}
+
+ {/* Options */}
+ <div className="flex items-center gap-6 pt-2">
+ <div className="flex items-center gap-2">
+ <Switch
+ checked={form.isEnabled}
+ onCheckedChange={(checked) => setForm({ ...form, isEnabled: checked })}
+ id="isEnabled"
+ />
+ <Label htmlFor="isEnabled" className="text-sm">
+ Enabled
+ </Label>
+ </div>
+ <div className="flex items-center gap-2">
+ <Switch
+ checked={form.autoConnect}
+ onCheckedChange={(checked) => setForm({ ...form, autoConnect: checked })}
+ id="autoConnect"
+ />
+ <Label htmlFor="autoConnect" className="text-sm">
+ Auto-connect on startup
+ </Label>
+ </div>
+ </div>
+
+ {/* Setup Instructions */}
+ {selectedTemplateData?.setupInstructions && (
+ <div className="p-3 bg-blue-50 dark:bg-blue-950/30 rounded-lg">
+ <Label className="text-sm font-medium text-blue-700 dark:text-blue-300">
+ Setup Instructions
+ </Label>
+ <p className="text-xs text-blue-600 dark:text-blue-400 mt-1 whitespace-pre-line">
+ {selectedTemplateData.setupInstructions}
+ </p>
+ {selectedTemplateData.docsUrl && (
+ <a
+ href={selectedTemplateData.docsUrl}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="text-xs text-blue-500 hover:underline flex items-center gap-1 mt-2"
+ >
+ View documentation
+ <ExternalLink className="h-3 w-3" />
+ </a>
+ )}
+ </div>
+ )}
+ </div>
+ </ScrollArea>
+
+ <DialogFooter className="shrink-0 px-6 py-4 border-t border-slate-200 dark:border-slate-700">
+ <Button variant="outline" onClick={() => onOpenChange(false)}>
+ Cancel
+ </Button>
+ <Button onClick={handleSubmit} disabled={isSubmitting || !form.name}>
+ {isSubmitting ? (
+ <Loader2 className="h-4 w-4 animate-spin mr-2" />
+ ) : editingServer ? (
+ <Check className="h-4 w-4 mr-2" />
+ ) : (
+ <Plus className="h-4 w-4 mr-2" />
+ )}
+ {editingServer ? 'Save Changes' : 'Add Server'}
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ );
+}
+
+// Main Component
+
+export function MCPServersPanel() {
+ const {
+ servers,
+ templates,
+ connectionStates,
+ connectedServerCount,
+ toolCount,
+ customTriggerKeywords,
+ loadData,
+ createServer,
+ updateServer,
+ deleteServer,
+ connect,
+ disconnect,
+ updateTriggerKeywords,
+ } = useMCP();
+
+ const [dialogOpen, setDialogOpen] = useState(false);
+ const [editingServer, setEditingServer] = useState<MCPServerConfig | null>(null);
+ const [connectingServers, setConnectingServers] = useState<Set<string>>(new Set());
+ const [newKeyword, setNewKeyword] = useState('');
+ const [isSavingKeywords, setIsSavingKeywords] = useState(false);
+
+ const handleConnect = async (serverId: string) => {
+ setConnectingServers((prev) => new Set([...prev, serverId]));
+ try {
+ await connect(serverId);
+ } finally {
+ setConnectingServers((prev) => {
+ const next = new Set(prev);
+ next.delete(serverId);
+ return next;
+ });
+ }
+ };
+
+ const handleDisconnect = async (serverId: string) => {
+ await disconnect(serverId);
+ };
+
+ const handleToggleEnabled = async (serverId: string, enabled: boolean) => {
+ await updateServer(serverId, { isEnabled: enabled });
+ };
+
+ const handleEdit = (server: MCPServerConfig) => {
+ setEditingServer(server);
+ setDialogOpen(true);
+ };
+
+ const handleDelete = async (serverId: string) => {
+ await deleteServer(serverId);
+ };
+
+ const handleSubmit = async (data: any) => {
+ if (editingServer) {
+ await updateServer(editingServer.id, data);
+ } else {
+ await createServer(data);
+ }
+ setEditingServer(null);
+ };
+
+ const handleDialogClose = (open: boolean) => {
+ setDialogOpen(open);
+ if (!open) {
+ setEditingServer(null);
+ }
+ };
+
+ const handleAddKeyword = async () => {
+ const keyword = newKeyword.trim().toLowerCase();
+ if (!keyword || customTriggerKeywords.includes(keyword)) {
+ setNewKeyword('');
+ return;
+ }
+
+ setIsSavingKeywords(true);
+ try {
+ await updateTriggerKeywords([...customTriggerKeywords, keyword]);
+ setNewKeyword('');
+ } finally {
+ setIsSavingKeywords(false);
+ }
+ };
+
+ const handleRemoveKeyword = async (keyword: string) => {
+ setIsSavingKeywords(true);
+ try {
+ await updateTriggerKeywords(customTriggerKeywords.filter(k => k !== keyword));
+ } finally {
+ setIsSavingKeywords(false);
+ }
+ };
+
+ return (
+ <div className="space-y-6">
+ {/* Header */}
+ <div className="flex items-center justify-between">
+ <div>
+ <h2 className="text-lg font-semibold flex items-center gap-2">
+ <Server className="h-5 w-5" />
+ MCP Servers
+ </h2>
+ <p className="text-sm text-slate-500 dark:text-slate-400">
+ Connect external tools like CRMs, docs, and calendars
+ </p>
+ </div>
+ <div className="flex items-center gap-2">
+ <Badge variant="secondary">
+ {connectedServerCount}/{servers.length} connected
+ </Badge>
+ {toolCount > 0 && (
+ <Badge variant="outline">{toolCount} tools available</Badge>
+ )}
+ <Button variant="outline" size="icon" onClick={() => loadData()}>
+ <RefreshCw className="h-4 w-4" />
+ </Button>
+ <Button onClick={() => setDialogOpen(true)}>
+ <Plus className="h-4 w-4 mr-2" />
+ Add Server
+ </Button>
+ </div>
+ </div>
+
+ {/* Trigger Keywords Section */}
+ <Card>
+ <CardHeader className="pb-3">
+ <div className="flex items-center gap-2">
+ <Zap className="h-4 w-4 text-amber-500" />
+ <CardTitle className="text-base">Trigger Keywords</CardTitle>
+ </div>
+ <CardDescription className="text-xs">
+ Custom keywords that trigger MCP tool lookups during calls. These are added to the default keywords.
+ </CardDescription>
+ </CardHeader>
+ <CardContent className="space-y-3">
+ {/* Add new keyword */}
+ <div className="flex gap-2">
+ <Input
+ placeholder="Add a keyword (e.g., 'competitor', 'demo')..."
+ value={newKeyword}
+ onChange={(e) => setNewKeyword(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter') {
+ e.preventDefault();
+ handleAddKeyword();
+ }
+ }}
+ className="flex-1"
+ />
+ <Button
+ size="sm"
+ onClick={handleAddKeyword}
+ disabled={!newKeyword.trim() || isSavingKeywords}
+ >
+ {isSavingKeywords ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ <Plus className="h-4 w-4" />
+ )}
+ </Button>
+ </div>
+
+ {/* Keywords list */}
+ {customTriggerKeywords.length > 0 ? (
+ <div className="flex flex-wrap gap-2">
+ {customTriggerKeywords.map((keyword) => (
+ <Badge
+ key={keyword}
+ variant="secondary"
+ className="flex items-center gap-1 pr-1"
+ >
+ {keyword}
+ <button
+ onClick={() => handleRemoveKeyword(keyword)}
+ className="ml-1 hover:bg-slate-300 dark:hover:bg-slate-600 rounded-full p-0.5"
+ disabled={isSavingKeywords}
+ >
+ <X className="h-3 w-3" />
+ </button>
+ </Badge>
+ ))}
+ </div>
+ ) : (
+ <p className="text-xs text-slate-500 dark:text-slate-400 italic">
+ No custom keywords added. Default keywords like "documentation", "CRM", "calendar", etc. are always active.
+ </p>
+ )}
+ </CardContent>
+ </Card>
+
+ {/* Server List */}
+ {servers.length === 0 ? (
+ <Card>
+ <CardContent className="flex flex-col items-center justify-center py-12">
+ <Server className="h-12 w-12 text-slate-300 dark:text-slate-600 mb-4" />
+ <h3 className="font-medium mb-2">No MCP Servers Configured</h3>
+ <p className="text-sm text-slate-500 dark:text-slate-400 text-center max-w-sm mb-4">
+ Add MCP servers to connect CRMs, documentation, calendars, and other tools
+ that provide contextual insights during calls.
+ </p>
+ <Button onClick={() => setDialogOpen(true)}>
+ <Plus className="h-4 w-4 mr-2" />
+ Add Your First Server
+ </Button>
+ </CardContent>
+ </Card>
+ ) : (
+ <ScrollArea className="h-[500px]">
+ <div className="space-y-3 pr-4">
+ {servers.map((server) => (
+ <ServerCard
+ key={server.id}
+ server={server}
+ connectionState={connectionStates[server.id]}
+ onEdit={handleEdit}
+ onDelete={handleDelete}
+ onConnect={handleConnect}
+ onDisconnect={handleDisconnect}
+ onToggleEnabled={handleToggleEnabled}
+ isConnecting={connectingServers.has(server.id)}
+ />
+ ))}
+ </div>
+ </ScrollArea>
+ )}
+
+ {/* Add/Edit Dialog */}
+ <AddServerDialog
+ open={dialogOpen}
+ onOpenChange={handleDialogClose}
+ templates={templates}
+ editingServer={editingServer}
+ onSubmit={handleSubmit}
+ />
+ </div>
+ );
+}
+
+export default MCPServersPanel;
diff --git a/src/renderer/components/settings/PlaybookEditor.tsx b/src/renderer/components/settings/PlaybookEditor.tsx
new file mode 100644
index 0000000..fc166dc
--- /dev/null
+++ b/src/renderer/components/settings/PlaybookEditor.tsx
@@ -0,0 +1,542 @@
+/**
+ * Playbook Editor Component
+ *
+ * Allows users to view, create, edit, and manage playbooks
+ * (meeting methodologies like MEDDIC, Challenger, etc.)
+ */
+
+import React, { useState } from 'react';
+import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '../ui/card';
+import { Button } from '../ui/button';
+import { Input } from '../ui/input';
+import { Label } from '../ui/label';
+import { Textarea } from '../ui/textarea';
+import { Badge } from '../ui/badge';
+import { ScrollArea } from '../ui/scroll-area';
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+ DialogTrigger,
+} from '../ui/dialog';
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from '../ui/select';
+import {
+ AlertDialog,
+ AlertDialogAction,
+ AlertDialogCancel,
+ AlertDialogContent,
+ AlertDialogDescription,
+ AlertDialogFooter,
+ AlertDialogHeader,
+ AlertDialogTitle,
+ AlertDialogTrigger,
+} from '../ui/alert-dialog';
+import {
+ Accordion,
+ AccordionContent,
+ AccordionItem,
+ AccordionTrigger,
+} from '../ui/accordion';
+import { Plus, Pencil, Trash2, Star, BookOpen, X } from 'lucide-react';
+import { trpc } from '../../api/trpc';
+import { cn } from '../../lib/utils';
+
+const PLAYBOOK_TYPES = [
+ { value: 'MEDDIC', label: 'MEDDIC' },
+ { value: 'Challenger', label: 'Challenger' },
+ { value: 'SPIN', label: 'SPIN' },
+ { value: 'Custom', label: 'Custom' },
+] as const;
+
+type PlaybookType = typeof PLAYBOOK_TYPES[number]['value'];
+
+interface PlaybookItem {
+ id: string;
+ label: string;
+ description: string;
+ keywords: string[];
+ suggestedQuestions: string[];
+ detectionPrompt?: string;
+}
+
+interface Playbook {
+ id: string;
+ name: string;
+ type: PlaybookType;
+ description?: string;
+ items: PlaybookItem[];
+ isDefault: boolean;
+}
+
+interface PlaybookItemFormData {
+ id: string;
+ label: string;
+ description: string;
+ keywords: string;
+ suggestedQuestions: string;
+}
+
+interface PlaybookFormData {
+ name: string;
+ type: PlaybookType;
+ description: string;
+ items: PlaybookItemFormData[];
+}
+
+function PlaybookItemForm({
+ item,
+ index,
+ onChange,
+ onRemove,
+}: {
+ item: PlaybookItemFormData;
+ index: number;
+ onChange: (index: number, data: PlaybookItemFormData) => void;
+ onRemove: (index: number) => void;
+}) {
+ return (
+ <Card className="p-4 space-y-3">
+ <div className="flex items-center justify-between">
+ <span className="font-medium text-sm">Item {index + 1}</span>
+ <Button
+ type="button"
+ variant="ghost"
+ size="icon"
+ className="h-8 w-8 text-destructive"
+ onClick={() => onRemove(index)}
+ >
+ <X className="h-4 w-4" />
+ </Button>
+ </div>
+ <div className="grid grid-cols-2 gap-3">
+ <div className="space-y-1">
+ <Label className="text-xs">Label</Label>
+ <Input
+ value={item.label}
+ onChange={(e) => onChange(index, { ...item, label: e.target.value })}
+ placeholder="e.g., Metrics"
+ required
+ />
+ </div>
+ <div className="space-y-1">
+ <Label className="text-xs">ID (unique)</Label>
+ <Input
+ value={item.id}
+ onChange={(e) => onChange(index, { ...item, id: e.target.value.toLowerCase().replace(/\s+/g, '-') })}
+ placeholder="e.g., m-metrics"
+ required
+ />
+ </div>
+ </div>
+ <div className="space-y-1">
+ <Label className="text-xs">Description</Label>
+ <Input
+ value={item.description}
+ onChange={(e) => onChange(index, { ...item, description: e.target.value })}
+ placeholder="What this item tracks"
+ required
+ />
+ </div>
+ <div className="space-y-1">
+ <Label className="text-xs">Keywords (comma-separated)</Label>
+ <Input
+ value={item.keywords}
+ onChange={(e) => onChange(index, { ...item, keywords: e.target.value })}
+ placeholder="ROI, cost savings, revenue, metrics"
+ />
+ </div>
+ <div className="space-y-1">
+ <Label className="text-xs">Suggested Questions (one per line)</Label>
+ <Textarea
+ value={item.suggestedQuestions}
+ onChange={(e) => onChange(index, { ...item, suggestedQuestions: e.target.value })}
+ placeholder="What metrics matter most?&#10;How do you measure success?"
+ rows={2}
+ />
+ </div>
+ </Card>
+ );
+}
+
+function PlaybookForm({
+ initialData,
+ onSubmit,
+ onCancel,
+ isLoading,
+}: {
+ initialData?: Playbook;
+ onSubmit: (data: PlaybookFormData) => void;
+ onCancel: () => void;
+ isLoading: boolean;
+}) {
+ const [form, setForm] = useState<PlaybookFormData>(
+ initialData
+ ? {
+ name: initialData.name,
+ type: initialData.type,
+ description: initialData.description || '',
+ items: initialData.items.map((item) => ({
+ id: item.id,
+ label: item.label,
+ description: item.description,
+ keywords: item.keywords.join(', '),
+ suggestedQuestions: item.suggestedQuestions.join('\n'),
+ })),
+ }
+ : {
+ name: '',
+ type: 'Custom',
+ description: '',
+ items: [
+ { id: '', label: '', description: '', keywords: '', suggestedQuestions: '' },
+ ],
+ }
+ );
+
+ const handleItemChange = (index: number, data: PlaybookItemFormData) => {
+ const newItems = [...form.items];
+ newItems[index] = data;
+ setForm({ ...form, items: newItems });
+ };
+
+ const handleRemoveItem = (index: number) => {
+ if (form.items.length <= 1) return;
+ const newItems = form.items.filter((_, i) => i !== index);
+ setForm({ ...form, items: newItems });
+ };
+
+ const handleAddItem = () => {
+ setForm({
+ ...form,
+ items: [
+ ...form.items,
+ { id: '', label: '', description: '', keywords: '', suggestedQuestions: '' },
+ ],
+ });
+ };
+
+ const handleSubmit = (e: React.FormEvent) => {
+ e.preventDefault();
+ onSubmit(form);
+ };
+
+ return (
+ <form onSubmit={handleSubmit} className="space-y-4">
+ <div className="grid grid-cols-2 gap-4">
+ <div className="space-y-2">
+ <Label htmlFor="name">Playbook Name</Label>
+ <Input
+ id="name"
+ value={form.name}
+ onChange={(e) => setForm({ ...form, name: e.target.value })}
+ placeholder="e.g., Enterprise MEDDIC"
+ required
+ />
+ </div>
+ <div className="space-y-2">
+ <Label htmlFor="type">Type</Label>
+ <Select
+ value={form.type}
+ onValueChange={(v) => setForm({ ...form, type: v as PlaybookType })}
+ >
+ <SelectTrigger>
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ {PLAYBOOK_TYPES.map((type) => (
+ <SelectItem key={type.value} value={type.value}>
+ {type.label}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ </div>
+
+ <div className="space-y-2">
+ <Label htmlFor="description">Description</Label>
+ <Textarea
+ id="description"
+ value={form.description}
+ onChange={(e) => setForm({ ...form, description: e.target.value })}
+ placeholder="A brief description of this playbook..."
+ rows={2}
+ />
+ </div>
+
+ <div className="space-y-2">
+ <div className="flex items-center justify-between">
+ <Label>Checklist Items</Label>
+ <Button type="button" variant="outline" size="sm" onClick={handleAddItem}>
+ <Plus className="h-3 w-3 mr-1" />
+ Add Item
+ </Button>
+ </div>
+ <ScrollArea className="h-[300px] pr-4">
+ <div className="space-y-3">
+ {form.items.map((item, index) => (
+ <PlaybookItemForm
+ key={index}
+ item={item}
+ index={index}
+ onChange={handleItemChange}
+ onRemove={handleRemoveItem}
+ />
+ ))}
+ </div>
+ </ScrollArea>
+ </div>
+
+ <DialogFooter>
+ <Button type="button" variant="outline" onClick={onCancel}>
+ Cancel
+ </Button>
+ <Button type="submit" disabled={isLoading}>
+ {isLoading ? 'Saving...' : initialData ? 'Update' : 'Create'}
+ </Button>
+ </DialogFooter>
+ </form>
+ );
+}
+
+export function PlaybookEditor() {
+ const [editingPlaybook, setEditingPlaybook] = useState<Playbook | null>(null);
+ const [isCreateOpen, setIsCreateOpen] = useState(false);
+ const [isEditOpen, setIsEditOpen] = useState(false);
+
+ const { data: playbooks, refetch } = trpc.settings.getPlaybooks.useQuery();
+ const createMutation = trpc.settings.createPlaybook.useMutation({
+ onSuccess: () => {
+ refetch();
+ setIsCreateOpen(false);
+ },
+ });
+ const updateMutation = trpc.settings.updatePlaybook.useMutation({
+ onSuccess: () => {
+ refetch();
+ setIsEditOpen(false);
+ setEditingPlaybook(null);
+ },
+ });
+ const deleteMutation = trpc.settings.deletePlaybook.useMutation({
+ onSuccess: () => refetch(),
+ });
+ const setDefaultMutation = trpc.settings.setDefaultPlaybook.useMutation({
+ onSuccess: () => refetch(),
+ });
+
+ const handleCreate = (data: PlaybookFormData) => {
+ createMutation.mutate({
+ name: data.name,
+ type: data.type,
+ description: data.description || undefined,
+ items: data.items.map((item) => ({
+ id: item.id,
+ label: item.label,
+ description: item.description,
+ keywords: item.keywords.split(',').map((k) => k.trim()).filter(Boolean),
+ suggestedQuestions: item.suggestedQuestions.split('\n').filter(Boolean),
+ })),
+ });
+ };
+
+ const handleUpdate = (data: PlaybookFormData) => {
+ if (!editingPlaybook) return;
+ updateMutation.mutate({
+ id: editingPlaybook.id,
+ data: {
+ name: data.name,
+ type: data.type,
+ description: data.description || undefined,
+ items: data.items.map((item) => ({
+ id: item.id,
+ label: item.label,
+ description: item.description,
+ keywords: item.keywords.split(',').map((k) => k.trim()).filter(Boolean),
+ suggestedQuestions: item.suggestedQuestions.split('\n').filter(Boolean),
+ })),
+ },
+ });
+ };
+
+ return (
+ <div className="space-y-4">
+ <div className="flex items-center justify-between">
+ <div>
+ <h3 className="text-lg font-medium">Playbooks</h3>
+ <p className="text-sm text-muted-foreground">
+ Manage meeting methodology checklists (MEDDIC, Challenger, etc.)
+ </p>
+ </div>
+ <Dialog open={isCreateOpen} onOpenChange={setIsCreateOpen}>
+ <DialogTrigger asChild>
+ <Button>
+ <Plus className="h-4 w-4 mr-2" />
+ Add Playbook
+ </Button>
+ </DialogTrigger>
+ <DialogContent className="max-w-2xl max-h-[90vh] overflow-y-auto">
+ <DialogHeader>
+ <DialogTitle>Create Playbook</DialogTitle>
+ <DialogDescription>
+ Create a new meeting methodology checklist.
+ </DialogDescription>
+ </DialogHeader>
+ <PlaybookForm
+ onSubmit={handleCreate}
+ onCancel={() => setIsCreateOpen(false)}
+ isLoading={createMutation.isPending}
+ />
+ </DialogContent>
+ </Dialog>
+ </div>
+
+ <ScrollArea className="h-[500px]">
+ <div className="space-y-3 pr-4">
+ {playbooks?.map((playbook) => (
+ <Card key={playbook.id}>
+ <CardHeader className="pb-2">
+ <div className="flex items-start justify-between">
+ <div>
+ <div className="flex items-center gap-2">
+ <BookOpen className="h-4 w-4" />
+ <CardTitle className="text-base">{playbook.name}</CardTitle>
+ {playbook.isDefault && (
+ <Badge className="bg-amber-100 text-amber-800">
+ <Star className="h-3 w-3 mr-1 fill-current" />
+ Active
+ </Badge>
+ )}
+ </div>
+ <div className="flex items-center gap-2 mt-1">
+ <Badge variant="outline">{playbook.type}</Badge>
+ <span className="text-xs text-muted-foreground">
+ {playbook.items.length} items
+ </span>
+ </div>
+ </div>
+ <div className="flex items-center gap-1">
+ {!playbook.isDefault && (
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => setDefaultMutation.mutate({ id: playbook.id })}
+ >
+ <Star className="h-4 w-4 mr-1" />
+ Set Active
+ </Button>
+ )}
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-8 w-8"
+ onClick={() => {
+ setEditingPlaybook(playbook as Playbook);
+ setIsEditOpen(true);
+ }}
+ >
+ <Pencil className="h-4 w-4" />
+ </Button>
+ <AlertDialog>
+ <AlertDialogTrigger asChild>
+ <Button variant="ghost" size="icon" className="h-8 w-8 text-destructive">
+ <Trash2 className="h-4 w-4" />
+ </Button>
+ </AlertDialogTrigger>
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>Delete Playbook</AlertDialogTitle>
+ <AlertDialogDescription>
+ Are you sure you want to delete "{playbook.name}"? This action cannot be
+ undone.
+ </AlertDialogDescription>
+ </AlertDialogHeader>
+ <AlertDialogFooter>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
+ <AlertDialogAction
+ onClick={() => deleteMutation.mutate({ id: playbook.id })}
+ className="bg-destructive text-destructive-foreground"
+ >
+ Delete
+ </AlertDialogAction>
+ </AlertDialogFooter>
+ </AlertDialogContent>
+ </AlertDialog>
+ </div>
+ </div>
+ {playbook.description && (
+ <CardDescription className="mt-2">{playbook.description}</CardDescription>
+ )}
+ </CardHeader>
+ <CardContent>
+ <Accordion type="single" collapsible className="w-full">
+ <AccordionItem value="items" className="border-none">
+ <AccordionTrigger className="py-2 text-sm">
+ View Checklist Items
+ </AccordionTrigger>
+ <AccordionContent>
+ <div className="space-y-2">
+ {playbook.items.map((item: PlaybookItem, index: number) => (
+ <div
+ key={item.id}
+ className="flex items-start gap-2 p-2 bg-muted/50 rounded"
+ >
+ <span className="text-xs font-medium text-muted-foreground w-6">
+ {index + 1}.
+ </span>
+ <div>
+ <p className="text-sm font-medium">{item.label}</p>
+ <p className="text-xs text-muted-foreground">{item.description}</p>
+ </div>
+ </div>
+ ))}
+ </div>
+ </AccordionContent>
+ </AccordionItem>
+ </Accordion>
+ </CardContent>
+ </Card>
+ ))}
+
+ {(!playbooks || playbooks.length === 0) && (
+ <div className="text-center py-8 text-muted-foreground">
+ No playbooks yet. Create one to get started.
+ </div>
+ )}
+ </div>
+ </ScrollArea>
+
+ {/* Edit Dialog */}
+ <Dialog open={isEditOpen} onOpenChange={setIsEditOpen}>
+ <DialogContent className="max-w-2xl max-h-[90vh] overflow-y-auto">
+ <DialogHeader>
+ <DialogTitle>Edit Playbook</DialogTitle>
+ <DialogDescription>Update the meeting methodology playbook.</DialogDescription>
+ </DialogHeader>
+ {editingPlaybook && (
+ <PlaybookForm
+ initialData={editingPlaybook}
+ onSubmit={handleUpdate}
+ onCancel={() => {
+ setIsEditOpen(false);
+ setEditingPlaybook(null);
+ }}
+ isLoading={updateMutation.isPending}
+ />
+ )}
+ </DialogContent>
+ </Dialog>
+ </div>
+ );
+}
+
+export default PlaybookEditor;
diff --git a/src/renderer/components/settings/PromptsEditor.tsx b/src/renderer/components/settings/PromptsEditor.tsx
new file mode 100644
index 0000000..31065f2
--- /dev/null
+++ b/src/renderer/components/settings/PromptsEditor.tsx
@@ -0,0 +1,289 @@
+/**
+ * Prompts & Settings Editor Component
+ *
+ * Allows users to customize AI prompts, thresholds, and configuration.
+ */
+
+import React, { useState, useEffect } from 'react';
+import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '../ui/card';
+import { Button } from '../ui/button';
+import { Input } from '../ui/input';
+import { Label } from '../ui/label';
+import { Textarea } from '../ui/textarea';
+import { Switch } from '../ui/switch';
+import { ScrollArea } from '../ui/scroll-area';
+import { Tabs, TabsContent, TabsList, TabsTrigger } from '../ui/tabs';
+import { Save, RotateCcw, Sparkles, Gauge, Settings2 } from 'lucide-react';
+import { trpc } from '../../api/trpc';
+import { cn } from '../../lib/utils';
+
+interface Setting {
+ key: string;
+ value: string;
+ category: 'prompt' | 'config' | 'threshold';
+ label: string;
+ description?: string | null;
+}
+
+function PromptCard({
+ setting,
+ value,
+ onChange,
+}: {
+ setting: Setting;
+ value: string;
+ onChange: (value: string) => void;
+}) {
+ return (
+ <Card>
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm">{setting.label}</CardTitle>
+ {setting.description && (
+ <CardDescription className="text-xs">{setting.description}</CardDescription>
+ )}
+ </CardHeader>
+ <CardContent>
+ <Textarea
+ value={value}
+ onChange={(e) => onChange(e.target.value)}
+ rows={6}
+ className="font-mono text-xs"
+ placeholder="Enter prompt..."
+ />
+ <p className="text-xs text-muted-foreground mt-2">
+ Use <code className="bg-muted px-1 rounded">{'{text}'}</code> or{' '}
+ <code className="bg-muted px-1 rounded">{'{transcript}'}</code> as placeholders.
+ </p>
+ </CardContent>
+ </Card>
+ );
+}
+
+function ThresholdCard({
+ setting,
+ value,
+ onChange,
+}: {
+ setting: Setting;
+ value: string;
+ onChange: (value: string) => void;
+}) {
+ const numValue = parseFloat(value) || 0;
+
+ return (
+ <Card>
+ <CardHeader className="pb-2">
+ <div className="flex items-center justify-between">
+ <div>
+ <CardTitle className="text-sm">{setting.label}</CardTitle>
+ {setting.description && (
+ <CardDescription className="text-xs">{setting.description}</CardDescription>
+ )}
+ </div>
+ <span className="text-2xl font-bold text-primary">{value}</span>
+ </div>
+ </CardHeader>
+ <CardContent>
+ <Input
+ type="number"
+ value={value}
+ onChange={(e) => onChange(e.target.value)}
+ className="w-full"
+ />
+ </CardContent>
+ </Card>
+ );
+}
+
+function ConfigCard({
+ setting,
+ value,
+ onChange,
+}: {
+ setting: Setting;
+ value: string;
+ onChange: (value: string) => void;
+}) {
+ const boolValue = value === 'true';
+
+ return (
+ <Card>
+ <CardContent className="pt-4">
+ <div className="flex items-center justify-between">
+ <div className="space-y-0.5">
+ <Label className="text-sm font-medium">{setting.label}</Label>
+ {setting.description && (
+ <p className="text-xs text-muted-foreground">{setting.description}</p>
+ )}
+ </div>
+ <Switch
+ checked={boolValue}
+ onCheckedChange={(checked) => onChange(checked ? 'true' : 'false')}
+ />
+ </div>
+ </CardContent>
+ </Card>
+ );
+}
+
+export function PromptsEditor() {
+ const [localSettings, setLocalSettings] = useState<Record<string, string>>({});
+ const [hasChanges, setHasChanges] = useState(false);
+
+ const { data: settings, refetch } = trpc.settings.getSettings.useQuery();
+ const updateMutation = trpc.settings.updateSettings.useMutation({
+ onSuccess: () => {
+ refetch();
+ setHasChanges(false);
+ },
+ });
+
+ // Initialize local settings from server data
+ useEffect(() => {
+ if (settings) {
+ const settingsMap: Record<string, string> = {};
+ settings.forEach((s) => {
+ settingsMap[s.key] = s.value;
+ });
+ setLocalSettings(settingsMap);
+ }
+ }, [settings]);
+
+ const handleChange = (key: string, value: string) => {
+ setLocalSettings((prev) => ({ ...prev, [key]: value }));
+ setHasChanges(true);
+ };
+
+ const handleSave = () => {
+ if (!settings) return;
+
+ const updates = settings.map((s) => ({
+ key: s.key,
+ value: localSettings[s.key] ?? s.value,
+ category: s.category as 'prompt' | 'config' | 'threshold',
+ label: s.label,
+ description: s.description || undefined,
+ }));
+
+ updateMutation.mutate(updates);
+ };
+
+ const handleReset = () => {
+ if (settings) {
+ const settingsMap: Record<string, string> = {};
+ settings.forEach((s) => {
+ settingsMap[s.key] = s.value;
+ });
+ setLocalSettings(settingsMap);
+ setHasChanges(false);
+ }
+ };
+
+ const prompts = settings?.filter((s) => s.category === 'prompt') || [];
+ const thresholds = settings?.filter((s) => s.category === 'threshold') || [];
+ const configs = settings?.filter((s) => s.category === 'config') || [];
+
+ return (
+ <div className="space-y-4">
+ <div className="flex items-center justify-between">
+ <div>
+ <h3 className="text-lg font-medium">AI Prompts & Settings</h3>
+ <p className="text-sm text-muted-foreground">
+ Customize AI behavior, thresholds, and detection settings
+ </p>
+ </div>
+ <div className="flex items-center gap-2">
+ {hasChanges && (
+ <Button variant="outline" onClick={handleReset}>
+ <RotateCcw className="h-4 w-4 mr-2" />
+ Reset
+ </Button>
+ )}
+ <Button onClick={handleSave} disabled={!hasChanges || updateMutation.isPending}>
+ <Save className="h-4 w-4 mr-2" />
+ {updateMutation.isPending ? 'Saving...' : 'Save Changes'}
+ </Button>
+ </div>
+ </div>
+
+ <Tabs defaultValue="prompts" className="w-full">
+ <TabsList className="grid w-full grid-cols-3">
+ <TabsTrigger value="prompts" className="flex items-center gap-2">
+ <Sparkles className="h-4 w-4" />
+ AI Prompts
+ </TabsTrigger>
+ <TabsTrigger value="thresholds" className="flex items-center gap-2">
+ <Gauge className="h-4 w-4" />
+ Thresholds
+ </TabsTrigger>
+ <TabsTrigger value="config" className="flex items-center gap-2">
+ <Settings2 className="h-4 w-4" />
+ Config
+ </TabsTrigger>
+ </TabsList>
+
+ <TabsContent value="prompts" className="mt-4">
+ <ScrollArea className="h-[450px]">
+ <div className="space-y-4 pr-4">
+ {prompts.map((setting) => (
+ <PromptCard
+ key={setting.key}
+ setting={setting}
+ value={localSettings[setting.key] ?? setting.value}
+ onChange={(v) => handleChange(setting.key, v)}
+ />
+ ))}
+ {prompts.length === 0 && (
+ <div className="text-center py-8 text-muted-foreground">
+ No prompts configured. Run the app to seed defaults.
+ </div>
+ )}
+ </div>
+ </ScrollArea>
+ </TabsContent>
+
+ <TabsContent value="thresholds" className="mt-4">
+ <ScrollArea className="h-[450px]">
+ <div className="grid grid-cols-2 gap-4 pr-4">
+ {thresholds.map((setting) => (
+ <ThresholdCard
+ key={setting.key}
+ setting={setting}
+ value={localSettings[setting.key] ?? setting.value}
+ onChange={(v) => handleChange(setting.key, v)}
+ />
+ ))}
+ </div>
+ {thresholds.length === 0 && (
+ <div className="text-center py-8 text-muted-foreground">
+ No thresholds configured. Run the app to seed defaults.
+ </div>
+ )}
+ </ScrollArea>
+ </TabsContent>
+
+ <TabsContent value="config" className="mt-4">
+ <ScrollArea className="h-[450px]">
+ <div className="space-y-3 pr-4">
+ {configs.map((setting) => (
+ <ConfigCard
+ key={setting.key}
+ setting={setting}
+ value={localSettings[setting.key] ?? setting.value}
+ onChange={(v) => handleChange(setting.key, v)}
+ />
+ ))}
+ </div>
+ {configs.length === 0 && (
+ <div className="text-center py-8 text-muted-foreground">
+ No config options available. Run the app to seed defaults.
+ </div>
+ )}
+ </ScrollArea>
+ </TabsContent>
+ </Tabs>
+ </div>
+ );
+}
+
+export default PromptsEditor;
diff --git a/src/renderer/components/transcription/BookmarkDialog.tsx b/src/renderer/components/transcription/BookmarkDialog.tsx
new file mode 100644
index 0000000..4f60278
--- /dev/null
+++ b/src/renderer/components/transcription/BookmarkDialog.tsx
@@ -0,0 +1,210 @@
+/**
+ * Bookmark Dialog Component
+ *
+ * Modal for creating bookmarks with category selection
+ */
+
+import React, { useState } from 'react';
+import {
+ Dialog,
+ DialogContent,
+ DialogHeader,
+ DialogTitle,
+ DialogDescription,
+ DialogFooter,
+} from '../ui/dialog';
+import { Button } from '../ui/button';
+import { Textarea } from '../ui/textarea';
+import { cn } from '../../lib/utils';
+import {
+ Flag,
+ AlertTriangle,
+ DollarSign,
+ Users,
+ CheckCircle,
+ ArrowRight,
+ Star,
+} from 'lucide-react';
+
+export type BookmarkCategory =
+ | 'important'
+ | 'follow_up'
+ | 'pricing'
+ | 'competitor'
+ | 'risk'
+ | 'decision'
+ | 'action_item';
+
+interface BookmarkDialogProps {
+ open: boolean;
+ onOpenChange: (open: boolean) => void;
+ onSubmit: (category: BookmarkCategory, note?: string) => void;
+ transcriptText?: string;
+}
+
+const BOOKMARK_CATEGORIES: Array<{
+ id: BookmarkCategory;
+ label: string;
+ icon: React.ElementType;
+ color: string;
+ description: string;
+}> = [
+ {
+ id: 'important',
+ label: 'Important',
+ icon: Star,
+ color: 'text-yellow-600 bg-yellow-100 dark:bg-yellow-900/30',
+ description: 'Key moment to remember',
+ },
+ {
+ id: 'action_item',
+ label: 'Action Item',
+ icon: CheckCircle,
+ color: 'text-green-600 bg-green-100 dark:bg-green-900/30',
+ description: 'Task or follow-up needed',
+ },
+ {
+ id: 'follow_up',
+ label: 'Follow Up',
+ icon: ArrowRight,
+ color: 'text-blue-600 bg-blue-100 dark:bg-blue-900/30',
+ description: 'Requires follow-up later',
+ },
+ {
+ id: 'pricing',
+ label: 'Pricing',
+ icon: DollarSign,
+ color: 'text-emerald-600 bg-emerald-100 dark:bg-emerald-900/30',
+ description: 'Pricing discussion',
+ },
+ {
+ id: 'competitor',
+ label: 'Competitor',
+ icon: Users,
+ color: 'text-purple-600 bg-purple-100 dark:bg-purple-900/30',
+ description: 'Competitor mention',
+ },
+ {
+ id: 'risk',
+ label: 'Risk',
+ icon: AlertTriangle,
+ color: 'text-red-600 bg-red-100 dark:bg-red-900/30',
+ description: 'Potential risk or objection',
+ },
+ {
+ id: 'decision',
+ label: 'Decision',
+ icon: Flag,
+ color: 'text-orange-600 bg-orange-100 dark:bg-orange-900/30',
+ description: 'Decision point',
+ },
+];
+
+export function BookmarkDialog({
+ open,
+ onOpenChange,
+ onSubmit,
+ transcriptText,
+}: BookmarkDialogProps) {
+ const [selectedCategory, setSelectedCategory] = useState<BookmarkCategory | null>(null);
+ const [note, setNote] = useState('');
+ const [isSubmitting, setIsSubmitting] = useState(false);
+
+ const handleSubmit = async () => {
+ if (!selectedCategory) return;
+
+ setIsSubmitting(true);
+ try {
+ await onSubmit(selectedCategory, note.trim() || undefined);
+ // Reset state
+ setSelectedCategory(null);
+ setNote('');
+ onOpenChange(false);
+ } finally {
+ setIsSubmitting(false);
+ }
+ };
+
+ const handleOpenChange = (open: boolean) => {
+ if (!open) {
+ setSelectedCategory(null);
+ setNote('');
+ }
+ onOpenChange(open);
+ };
+
+ return (
+ <Dialog open={open} onOpenChange={handleOpenChange}>
+ <DialogContent className="sm:max-w-md">
+ <DialogHeader>
+ <DialogTitle>Create Bookmark</DialogTitle>
+ <DialogDescription>
+ Mark this moment for easy reference later
+ </DialogDescription>
+ </DialogHeader>
+
+ {transcriptText && (
+ <div className="bg-muted/50 rounded-lg p-3 text-sm text-muted-foreground italic border">
+ "{transcriptText.slice(0, 100)}{transcriptText.length > 100 ? '...' : ''}"
+ </div>
+ )}
+
+ <div className="space-y-3">
+ <label className="text-sm font-medium">Category</label>
+ <div className="grid grid-cols-2 gap-2">
+ {BOOKMARK_CATEGORIES.map((cat) => {
+ const Icon = cat.icon;
+ const isSelected = selectedCategory === cat.id;
+ return (
+ <button
+ key={cat.id}
+ onClick={() => setSelectedCategory(cat.id)}
+ className={cn(
+ 'flex items-center gap-2 p-3 rounded-lg border text-left transition-all',
+ isSelected
+ ? 'border-primary bg-primary/5 ring-2 ring-primary/20'
+ : 'border-border hover:border-primary/50 hover:bg-muted/50'
+ )}
+ >
+ <div className={cn('p-1.5 rounded', cat.color)}>
+ <Icon className="w-4 h-4" />
+ </div>
+ <div className="flex-1 min-w-0">
+ <div className="text-sm font-medium">{cat.label}</div>
+ <div className="text-xs text-muted-foreground truncate">
+ {cat.description}
+ </div>
+ </div>
+ </button>
+ );
+ })}
+ </div>
+ </div>
+
+ <div className="space-y-2">
+ <label className="text-sm font-medium">Note (optional)</label>
+ <Textarea
+ placeholder="Add a note about this moment..."
+ value={note}
+ onChange={(e) => setNote(e.target.value)}
+ rows={2}
+ />
+ </div>
+
+ <DialogFooter>
+ <Button variant="outline" onClick={() => handleOpenChange(false)}>
+ Cancel
+ </Button>
+ <Button
+ onClick={handleSubmit}
+ disabled={!selectedCategory || isSubmitting}
+ >
+ {isSubmitting ? 'Saving...' : 'Save Bookmark'}
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ );
+}
+
+export default BookmarkDialog;
diff --git a/src/renderer/components/transcription/TranscriptionPanel.tsx b/src/renderer/components/transcription/TranscriptionPanel.tsx
new file mode 100644
index 0000000..0fa9517
--- /dev/null
+++ b/src/renderer/components/transcription/TranscriptionPanel.tsx
@@ -0,0 +1,288 @@
+/**
+ * Transcription Panel Component
+ *
+ * Modern chat-like interface for live transcription:
+ * - Avatar indicators (Me/Customer)
+ * - Timestamp badges
+ * - Styled message bubbles
+ * - Objection detection highlighting
+ * - Auto-scroll to latest
+ * - Bookmarking support
+ */
+
+import React, { useEffect, useRef, useState, useCallback } from 'react';
+import { Mic, Volume2, Bookmark, BookmarkCheck } from 'lucide-react';
+import { Card, CardContent, CardHeader, CardTitle } from '../ui/card';
+import { ScrollArea } from '../ui/scroll-area';
+import { Switch } from '../ui/switch';
+import { Badge } from '../ui/badge';
+import { Button } from '../ui/button';
+import { useTranscriptionStore, TranscriptItem } from '../../stores/transcription.store';
+import { useSessionStore } from '../../stores/session.store';
+import { useCopilot } from '../../hooks/useCopilot';
+import { cn } from '../../lib/utils';
+import { BookmarkDialog, BookmarkCategory } from './BookmarkDialog';
+
+interface TranscriptMessageProps {
+ item: TranscriptItem;
+ isLive?: boolean;
+ onBookmark?: (item: TranscriptItem) => void;
+}
+
+function TranscriptMessage({ item, isLive, onBookmark }: TranscriptMessageProps) {
+ const isMe = item.source === 'mic';
+
+ // Format timestamp from epoch to MM:SS relative to recording start
+ const formatTime = (timestamp: number) => {
+ // For now, just show time since we don't have recording start time here
+ const date = new Date(timestamp);
+ return date.toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit' });
+ };
+
+ return (
+ <div
+ className={cn(
+ 'group relative animate-in slide-in-from-bottom-2 duration-300',
+ isLive && 'opacity-90'
+ )}
+ >
+ <div className="flex gap-3">
+ {/* Avatar */}
+ <div
+ className={cn(
+ 'w-8 h-8 rounded-full flex items-center justify-center text-xs font-semibold shrink-0 mt-1',
+ isMe
+ ? 'bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300'
+ : 'bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-300'
+ )}
+ >
+ {isMe ? (
+ <Mic className="w-4 h-4" />
+ ) : (
+ <Volume2 className="w-4 h-4" />
+ )}
+ </div>
+
+ {/* Content */}
+ <div className="flex-1 max-w-3xl">
+ <div className="flex items-center gap-2 mb-1">
+ <span
+ className={cn(
+ 'text-xs font-medium',
+ isMe ? 'text-blue-600 dark:text-blue-400' : 'text-purple-600 dark:text-purple-400'
+ )}
+ >
+ {isMe ? 'You' : 'Customer'}
+ </span>
+ <span className="text-xs text-slate-400">{formatTime(item.timestamp)}</span>
+ {isLive && (
+ <Badge variant="secondary" className="text-xs px-1.5 py-0 h-4">
+ LIVE
+ </Badge>
+ )}
+ </div>
+
+ <div
+ className={cn(
+ 'rounded-2xl px-4 py-3 text-sm leading-relaxed',
+ isMe
+ ? 'bg-blue-50 dark:bg-blue-950/30 text-slate-900 dark:text-slate-100'
+ : 'bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 text-slate-900 dark:text-slate-100',
+ isLive && 'italic opacity-80'
+ )}
+ >
+ {item.text}
+ </div>
+ </div>
+
+ {/* Quick Actions (on hover) */}
+ {onBookmark && (
+ <div className="opacity-0 group-hover:opacity-100 transition-opacity shrink-0 pt-6">
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-8 w-8 hover:text-primary"
+ title="Bookmark this moment"
+ onClick={() => onBookmark(item)}
+ >
+ <Bookmark className="w-4 h-4" />
+ </Button>
+ </div>
+ )}
+ </div>
+ </div>
+ );
+}
+
+function PendingMessage({ text, source }: { text: string; source: 'mic' | 'system_audio' }) {
+ const isMe = source === 'mic';
+
+ return (
+ <div className="flex gap-3 opacity-60">
+ <div
+ className={cn(
+ 'w-8 h-8 rounded-full flex items-center justify-center text-xs font-semibold shrink-0 mt-1',
+ isMe
+ ? 'bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300'
+ : 'bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-300'
+ )}
+ >
+ {isMe ? <Mic className="w-4 h-4" /> : <Volume2 className="w-4 h-4" />}
+ </div>
+ <div className="flex-1 max-w-3xl">
+ <div className="flex items-center gap-2 mb-1">
+ <span
+ className={cn(
+ 'text-xs font-medium',
+ isMe ? 'text-blue-600 dark:text-blue-400' : 'text-purple-600 dark:text-purple-400'
+ )}
+ >
+ {isMe ? 'You' : 'Customer'}
+ </span>
+ <Badge variant="outline" className="text-xs px-1.5 py-0 h-4 animate-pulse">
+ Speaking...
+ </Badge>
+ </div>
+ <div
+ className={cn(
+ 'rounded-2xl px-4 py-3 text-sm leading-relaxed italic',
+ isMe
+ ? 'bg-blue-50/50 dark:bg-blue-950/20'
+ : 'bg-slate-50 dark:bg-slate-800/50 border border-slate-200/50 dark:border-slate-700/50'
+ )}
+ >
+ {text}
+ </div>
+ </div>
+ </div>
+ );
+}
+
+export function TranscriptionPanel() {
+ const { items, enabled, pendingMic, pendingSystemAudio, setEnabled } = useTranscriptionStore();
+ const { status, elapsedTime } = useSessionStore();
+ const { createBookmark, recordingId } = useCopilot();
+ const scrollRef = useRef<HTMLDivElement>(null);
+
+ const [bookmarkDialogOpen, setBookmarkDialogOpen] = useState(false);
+ const [bookmarkItem, setBookmarkItem] = useState<TranscriptItem | null>(null);
+
+ const isRecording = status === 'recording';
+
+ // Handle bookmark button click on a specific transcript item
+ const handleBookmarkItem = useCallback((item: TranscriptItem) => {
+ setBookmarkItem(item);
+ setBookmarkDialogOpen(true);
+ }, []);
+
+ // Handle bookmark button in header (bookmark current moment)
+ const handleBookmarkNow = useCallback(() => {
+ setBookmarkItem(null); // No specific item, just the current moment
+ setBookmarkDialogOpen(true);
+ }, []);
+
+ // Handle bookmark submission
+ const handleBookmarkSubmit = useCallback(async (category: BookmarkCategory, note?: string) => {
+ // Calculate timestamp - use item timestamp or current elapsed time
+ const timestamp = bookmarkItem
+ ? (bookmarkItem.timestamp - (items[0]?.timestamp || bookmarkItem.timestamp)) / 1000
+ : elapsedTime;
+
+ const success = await createBookmark(timestamp, category, note);
+ if (success) {
+ console.log('Bookmark created successfully');
+ } else {
+ console.error('Failed to create bookmark');
+ }
+ }, [bookmarkItem, items, elapsedTime, createBookmark]);
+
+ // Auto-scroll to bottom when new items arrive
+ useEffect(() => {
+ if (scrollRef.current) {
+ const scrollElement = scrollRef.current.querySelector('[data-radix-scroll-area-viewport]');
+ if (scrollElement) {
+ scrollElement.scrollTop = scrollElement.scrollHeight;
+ }
+ }
+ }, [items, pendingMic, pendingSystemAudio]);
+
+ return (
+ <Card className="h-full flex flex-col overflow-hidden">
+ <CardHeader className="pb-3 flex-shrink-0 border-b">
+ <div className="flex items-center justify-between">
+ <div>
+ <CardTitle className="text-base font-semibold">Live Transcription</CardTitle>
+ <p className="text-xs text-slate-500 mt-0.5">Real-time conversation feed</p>
+ </div>
+ <div className="flex items-center gap-3">
+ <Button
+ variant="outline"
+ size="sm"
+ className="gap-2 h-8"
+ onClick={handleBookmarkNow}
+ disabled={!isRecording || !recordingId}
+ title={!isRecording ? 'Start recording to bookmark' : 'Bookmark this moment'}
+ >
+ <Bookmark className="w-3 h-3" />
+ Bookmark
+ </Button>
+ <div className="flex items-center gap-2 pl-3 border-l">
+ <span className="text-xs text-muted-foreground">
+ {enabled ? 'Enabled' : 'Disabled'}
+ </span>
+ <Switch checked={enabled} onCheckedChange={setEnabled} disabled={isRecording} />
+ </div>
+ </div>
+ </div>
+ </CardHeader>
+
+ <CardContent className="flex-1 overflow-hidden p-0">
+ <ScrollArea className="h-full" ref={scrollRef}>
+ <div className="p-6 space-y-4">
+ {items.length === 0 && !pendingMic && !pendingSystemAudio ? (
+ <div className="flex flex-col items-center justify-center h-64 text-center">
+ <div className="w-16 h-16 rounded-full bg-slate-100 dark:bg-slate-800 flex items-center justify-center mb-4">
+ <Mic className="w-8 h-8 text-slate-400" />
+ </div>
+ <p className="text-slate-500 dark:text-slate-400 font-medium">
+ {enabled
+ ? isRecording
+ ? 'Waiting for speech...'
+ : 'Start recording to see transcription'
+ : 'Enable transcription to see live text'}
+ </p>
+ <p className="text-xs text-slate-400 mt-1">
+ {enabled && !isRecording && 'Click the Start Recording button above'}
+ </p>
+ </div>
+ ) : (
+ <>
+ {items.map((item) => (
+ <TranscriptMessage
+ key={item.id}
+ item={item}
+ onBookmark={recordingId ? handleBookmarkItem : undefined}
+ />
+ ))}
+
+ {/* Pending transcripts */}
+ {pendingMic && <PendingMessage text={pendingMic} source="mic" />}
+ {pendingSystemAudio && <PendingMessage text={pendingSystemAudio} source="system_audio" />}
+ </>
+ )}
+ </div>
+ </ScrollArea>
+ </CardContent>
+
+ {/* Bookmark Dialog */}
+ <BookmarkDialog
+ open={bookmarkDialogOpen}
+ onOpenChange={setBookmarkDialogOpen}
+ onSubmit={handleBookmarkSubmit}
+ transcriptText={bookmarkItem?.text}
+ />
+ </Card>
+ );
+}
+
+export default TranscriptionPanel;
diff --git a/src/renderer/components/ui/accordion.tsx b/src/renderer/components/ui/accordion.tsx
new file mode 100644
index 0000000..1d60cf3
--- /dev/null
+++ b/src/renderer/components/ui/accordion.tsx
@@ -0,0 +1,55 @@
+import * as React from 'react';
+import * as AccordionPrimitive from '@radix-ui/react-accordion';
+import { ChevronDown } from 'lucide-react';
+import { cn } from '../../lib/utils';
+
+const Accordion = AccordionPrimitive.Root;
+
+const AccordionItem = React.forwardRef<
+ React.ElementRef<typeof AccordionPrimitive.Item>,
+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
+>(({ className, ...props }, ref) => (
+ <AccordionPrimitive.Item
+ ref={ref}
+ className={cn('border-b', className)}
+ {...props}
+ />
+));
+AccordionItem.displayName = 'AccordionItem';
+
+const AccordionTrigger = React.forwardRef<
+ React.ElementRef<typeof AccordionPrimitive.Trigger>,
+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
+>(({ className, children, ...props }, ref) => (
+ <AccordionPrimitive.Header className="flex">
+ <AccordionPrimitive.Trigger
+ ref={ref}
+ className={cn(
+ 'flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',
+ className
+ )}
+ {...props}
+ >
+ {children}
+ <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
+ </AccordionPrimitive.Trigger>
+ </AccordionPrimitive.Header>
+));
+AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
+
+const AccordionContent = React.forwardRef<
+ React.ElementRef<typeof AccordionPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
+>(({ className, children, ...props }, ref) => (
+ <AccordionPrimitive.Content
+ ref={ref}
+ className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
+ {...props}
+ >
+ <div className={cn('pb-4 pt-0', className)}>{children}</div>
+ </AccordionPrimitive.Content>
+));
+
+AccordionContent.displayName = AccordionPrimitive.Content.displayName;
+
+export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
diff --git a/src/renderer/components/ui/alert-dialog.tsx b/src/renderer/components/ui/alert-dialog.tsx
new file mode 100644
index 0000000..ba985dc
--- /dev/null
+++ b/src/renderer/components/ui/alert-dialog.tsx
@@ -0,0 +1,138 @@
+import * as React from 'react';
+import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
+import { cn } from '../../lib/utils';
+import { buttonVariants } from './button';
+
+const AlertDialog = AlertDialogPrimitive.Root;
+
+const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
+
+const AlertDialogPortal = AlertDialogPrimitive.Portal;
+
+const AlertDialogOverlay = React.forwardRef<
+ React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
+>(({ className, ...props }, ref) => (
+ <AlertDialogPrimitive.Overlay
+ className={cn(
+ 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
+ className
+ )}
+ {...props}
+ ref={ref}
+ />
+));
+AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
+
+const AlertDialogContent = React.forwardRef<
+ React.ElementRef<typeof AlertDialogPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
+>(({ className, ...props }, ref) => (
+ <AlertDialogPortal>
+ <AlertDialogOverlay />
+ <AlertDialogPrimitive.Content
+ ref={ref}
+ className={cn(
+ 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',
+ className
+ )}
+ {...props}
+ />
+ </AlertDialogPortal>
+));
+AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
+
+const AlertDialogHeader = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) => (
+ <div
+ className={cn(
+ 'flex flex-col space-y-2 text-center sm:text-left',
+ className
+ )}
+ {...props}
+ />
+);
+AlertDialogHeader.displayName = 'AlertDialogHeader';
+
+const AlertDialogFooter = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) => (
+ <div
+ className={cn(
+ 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',
+ className
+ )}
+ {...props}
+ />
+);
+AlertDialogFooter.displayName = 'AlertDialogFooter';
+
+const AlertDialogTitle = React.forwardRef<
+ React.ElementRef<typeof AlertDialogPrimitive.Title>,
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
+>(({ className, ...props }, ref) => (
+ <AlertDialogPrimitive.Title
+ ref={ref}
+ className={cn('text-lg font-semibold', className)}
+ {...props}
+ />
+));
+AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
+
+const AlertDialogDescription = React.forwardRef<
+ React.ElementRef<typeof AlertDialogPrimitive.Description>,
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
+>(({ className, ...props }, ref) => (
+ <AlertDialogPrimitive.Description
+ ref={ref}
+ className={cn('text-sm text-muted-foreground', className)}
+ {...props}
+ />
+));
+AlertDialogDescription.displayName =
+ AlertDialogPrimitive.Description.displayName;
+
+const AlertDialogAction = React.forwardRef<
+ React.ElementRef<typeof AlertDialogPrimitive.Action>,
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
+>(({ className, ...props }, ref) => (
+ <AlertDialogPrimitive.Action
+ ref={ref}
+ className={cn(buttonVariants(), className)}
+ {...props}
+ />
+));
+AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
+
+const AlertDialogCancel = React.forwardRef<
+ React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
+>(({ className, ...props }, ref) => (
+ <AlertDialogPrimitive.Cancel
+ ref={ref}
+ className={cn(
+ buttonVariants({ variant: 'outline' }),
+ 'mt-2 sm:mt-0',
+ className
+ )}
+ {...props}
+ />
+));
+AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
+
+export {
+ AlertDialog,
+ AlertDialogPortal,
+ AlertDialogOverlay,
+ AlertDialogTrigger,
+ AlertDialogContent,
+ AlertDialogHeader,
+ AlertDialogFooter,
+ AlertDialogTitle,
+ AlertDialogDescription,
+ AlertDialogAction,
+ AlertDialogCancel,
+};
diff --git a/src/renderer/components/ui/badge.tsx b/src/renderer/components/ui/badge.tsx
new file mode 100644
index 0000000..a4247b6
--- /dev/null
+++ b/src/renderer/components/ui/badge.tsx
@@ -0,0 +1,34 @@
+import * as React from 'react';
+import { cva, type VariantProps } from 'class-variance-authority';
+import { cn } from '../../lib/utils';
+
+const badgeVariants = cva(
+ 'inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
+ {
+ variants: {
+ variant: {
+ default: 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',
+ secondary:
+ 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
+ destructive:
+ 'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80',
+ outline: 'text-foreground',
+ success: 'border-transparent bg-green-500 text-white shadow',
+ warning: 'border-transparent bg-yellow-500 text-white shadow',
+ },
+ },
+ defaultVariants: {
+ variant: 'default',
+ },
+ }
+);
+
+export interface BadgeProps
+ extends React.HTMLAttributes<HTMLDivElement>,
+ VariantProps<typeof badgeVariants> {}
+
+function Badge({ className, variant, ...props }: BadgeProps) {
+ return <div className={cn(badgeVariants({ variant }), className)} {...props} />;
+}
+
+export { Badge, badgeVariants };
diff --git a/src/renderer/components/ui/button.tsx b/src/renderer/components/ui/button.tsx
new file mode 100644
index 0000000..04ed820
--- /dev/null
+++ b/src/renderer/components/ui/button.tsx
@@ -0,0 +1,48 @@
+import * as React from 'react';
+import { cva, type VariantProps } from 'class-variance-authority';
+import { cn } from '../../lib/utils';
+
+const buttonVariants = cva(
+ 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',
+ {
+ variants: {
+ variant: {
+ default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',
+ destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
+ outline: 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',
+ secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
+ ghost: 'hover:bg-accent hover:text-accent-foreground',
+ link: 'text-primary underline-offset-4 hover:underline',
+ },
+ size: {
+ default: 'h-9 px-4 py-2',
+ sm: 'h-8 rounded-md px-3 text-xs',
+ lg: 'h-10 rounded-md px-8',
+ icon: 'h-9 w-9',
+ },
+ },
+ defaultVariants: {
+ variant: 'default',
+ size: 'default',
+ },
+ }
+);
+
+export interface ButtonProps
+ extends React.ButtonHTMLAttributes<HTMLButtonElement>,
+ VariantProps<typeof buttonVariants> {}
+
+const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
+ ({ className, variant, size, ...props }, ref) => {
+ return (
+ <button
+ className={cn(buttonVariants({ variant, size, className }))}
+ ref={ref}
+ {...props}
+ />
+ );
+ }
+);
+Button.displayName = 'Button';
+
+export { Button, buttonVariants };
diff --git a/src/renderer/components/ui/card.tsx b/src/renderer/components/ui/card.tsx
new file mode 100644
index 0000000..590a19d
--- /dev/null
+++ b/src/renderer/components/ui/card.tsx
@@ -0,0 +1,55 @@
+import * as React from 'react';
+import { cn } from '../../lib/utils';
+
+const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
+ ({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn('rounded-xl border bg-card text-card-foreground shadow', className)}
+ {...props}
+ />
+ )
+);
+Card.displayName = 'Card';
+
+const CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
+ ({ className, ...props }, ref) => (
+ <div ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />
+ )
+);
+CardHeader.displayName = 'CardHeader';
+
+const CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(
+ ({ className, ...props }, ref) => (
+ <h3
+ ref={ref}
+ className={cn('font-semibold leading-none tracking-tight', className)}
+ {...props}
+ />
+ )
+);
+CardTitle.displayName = 'CardTitle';
+
+const CardDescription = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes<HTMLParagraphElement>
+>(({ className, ...props }, ref) => (
+ <p ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />
+));
+CardDescription.displayName = 'CardDescription';
+
+const CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
+ ({ className, ...props }, ref) => (
+ <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />
+ )
+);
+CardContent.displayName = 'CardContent';
+
+const CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
+ ({ className, ...props }, ref) => (
+ <div ref={ref} className={cn('flex items-center p-6 pt-0', className)} {...props} />
+ )
+);
+CardFooter.displayName = 'CardFooter';
+
+export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
diff --git a/src/renderer/components/ui/dialog.tsx b/src/renderer/components/ui/dialog.tsx
new file mode 100644
index 0000000..f451d5f
--- /dev/null
+++ b/src/renderer/components/ui/dialog.tsx
@@ -0,0 +1,138 @@
+import * as React from 'react';
+import { cn } from '../../lib/utils';
+import { X } from 'lucide-react';
+
+interface DialogContextValue {
+ open: boolean;
+ onOpenChange: (open: boolean) => void;
+}
+
+const DialogContext = React.createContext<DialogContextValue | null>(null);
+
+interface DialogProps {
+ open?: boolean;
+ onOpenChange?: (open: boolean) => void;
+ children: React.ReactNode;
+}
+
+const Dialog: React.FC<DialogProps> = ({ open = false, onOpenChange, children }) => {
+ const [internalOpen, setInternalOpen] = React.useState(open);
+
+ const isControlled = onOpenChange !== undefined;
+ const isOpen = isControlled ? open : internalOpen;
+
+ const handleOpenChange = React.useCallback(
+ (newOpen: boolean) => {
+ if (isControlled) {
+ onOpenChange?.(newOpen);
+ } else {
+ setInternalOpen(newOpen);
+ }
+ },
+ [isControlled, onOpenChange]
+ );
+
+ return (
+ <DialogContext.Provider value={{ open: isOpen, onOpenChange: handleOpenChange }}>
+ {children}
+ </DialogContext.Provider>
+ );
+};
+
+const useDialog = () => {
+ const context = React.useContext(DialogContext);
+ if (!context) {
+ throw new Error('Dialog components must be used within a Dialog');
+ }
+ return context;
+};
+
+interface DialogTriggerProps {
+ asChild?: boolean;
+ children: React.ReactNode;
+}
+
+const DialogTrigger: React.FC<DialogTriggerProps> = ({ children }) => {
+ const { onOpenChange } = useDialog();
+
+ return (
+ <span onClick={() => onOpenChange(true)} className="cursor-pointer">
+ {children}
+ </span>
+ );
+};
+
+interface DialogContentProps extends React.HTMLAttributes<HTMLDivElement> {}
+
+const DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps>(
+ ({ className, children, ...props }, ref) => {
+ const { open, onOpenChange } = useDialog();
+
+ if (!open) return null;
+
+ return (
+ <div className="fixed inset-0 z-50">
+ <div
+ className="fixed inset-0 bg-black/80 animate-in fade-in-0"
+ onClick={() => onOpenChange(false)}
+ />
+ <div className="fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg animate-in fade-in-0 zoom-in-95 sm:rounded-lg">
+ <div ref={ref} className={cn('', className)} {...props}>
+ {children}
+ </div>
+ <button
+ className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"
+ onClick={() => onOpenChange(false)}
+ >
+ <X className="h-4 w-4" />
+ <span className="sr-only">Close</span>
+ </button>
+ </div>
+ </div>
+ );
+ }
+);
+DialogContent.displayName = 'DialogContent';
+
+const DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
+ <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />
+);
+DialogHeader.displayName = 'DialogHeader';
+
+const DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
+ <div
+ className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}
+ {...props}
+ />
+);
+DialogFooter.displayName = 'DialogFooter';
+
+const DialogTitle = React.forwardRef<
+ HTMLHeadingElement,
+ React.HTMLAttributes<HTMLHeadingElement>
+>(({ className, ...props }, ref) => (
+ <h2
+ ref={ref}
+ className={cn('text-lg font-semibold leading-none tracking-tight', className)}
+ {...props}
+ />
+));
+DialogTitle.displayName = 'DialogTitle';
+
+const DialogDescription = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes<HTMLParagraphElement>
+>(({ className, ...props }, ref) => (
+ <p ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />
+));
+DialogDescription.displayName = 'DialogDescription';
+
+export {
+ Dialog,
+ DialogTrigger,
+ DialogContent,
+ DialogHeader,
+ DialogFooter,
+ DialogTitle,
+ DialogDescription,
+};
diff --git a/src/renderer/components/ui/error-toast.tsx b/src/renderer/components/ui/error-toast.tsx
new file mode 100644
index 0000000..bef72d2
--- /dev/null
+++ b/src/renderer/components/ui/error-toast.tsx
@@ -0,0 +1,96 @@
+/**
+ * Error Toast Component
+ *
+ * Shows error messages as a toast notification.
+ * Auto-dismisses after a timeout or can be manually dismissed.
+ */
+
+import React, { useEffect, useState } from 'react';
+import { Button } from './button';
+import { X, AlertCircle } from 'lucide-react';
+import { cn } from '../../lib/utils';
+
+interface ErrorToastProps {
+ message: string | null;
+ onDismiss: () => void;
+ className?: string;
+ position?: 'top' | 'bottom';
+ autoDismissMs?: number;
+}
+
+export function ErrorToast({
+ message,
+ onDismiss,
+ className,
+ position = 'bottom',
+ autoDismissMs = 8000,
+}: ErrorToastProps) {
+ const [isVisible, setIsVisible] = useState(false);
+ const [isAnimating, setIsAnimating] = useState(false);
+
+ useEffect(() => {
+ if (message) {
+ setIsAnimating(true);
+ setTimeout(() => setIsVisible(true), 10);
+
+ // Auto-dismiss
+ const timer = setTimeout(() => {
+ handleDismiss();
+ }, autoDismissMs);
+
+ return () => clearTimeout(timer);
+ } else {
+ setIsVisible(false);
+ setTimeout(() => setIsAnimating(false), 300);
+ }
+ }, [message, autoDismissMs]);
+
+ const handleDismiss = () => {
+ setIsVisible(false);
+ setTimeout(() => {
+ setIsAnimating(false);
+ onDismiss();
+ }, 300);
+ };
+
+ if (!isAnimating || !message) {
+ return null;
+ }
+
+ return (
+ <div
+ className={cn(
+ 'fixed z-50 left-1/2 -translate-x-1/2 transition-all duration-300 ease-out',
+ position === 'top' ? 'top-4' : 'bottom-20',
+ isVisible
+ ? 'opacity-100 translate-y-0'
+ : position === 'top'
+ ? 'opacity-0 -translate-y-4'
+ : 'opacity-0 translate-y-4',
+ className
+ )}
+ >
+ <div className="flex items-center gap-3 px-4 py-3 rounded-lg border shadow-lg backdrop-blur-sm max-w-md bg-red-50 dark:bg-red-950/30 border-red-200 dark:border-red-800 text-red-900 dark:text-red-100">
+ <div className="p-2 rounded-full bg-red-200 dark:bg-red-900">
+ <AlertCircle className="h-4 w-4" />
+ </div>
+
+ <div className="flex-1 min-w-0">
+ <p className="text-sm font-medium">Error</p>
+ <p className="text-xs opacity-90 mt-0.5">{message}</p>
+ </div>
+
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-6 w-6 shrink-0 hover:bg-white/20"
+ onClick={handleDismiss}
+ >
+ <X className="h-4 w-4" />
+ </Button>
+ </div>
+ </div>
+ );
+}
+
+export default ErrorToast;
diff --git a/src/renderer/components/ui/input.tsx b/src/renderer/components/ui/input.tsx
new file mode 100644
index 0000000..eb42a19
--- /dev/null
+++ b/src/renderer/components/ui/input.tsx
@@ -0,0 +1,23 @@
+import * as React from 'react';
+import { cn } from '../../lib/utils';
+
+export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
+
+const Input = React.forwardRef<HTMLInputElement, InputProps>(
+ ({ className, type, ...props }, ref) => {
+ return (
+ <input
+ type={type}
+ className={cn(
+ 'flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50',
+ className
+ )}
+ ref={ref}
+ {...props}
+ />
+ );
+ }
+);
+Input.displayName = 'Input';
+
+export { Input };
diff --git a/src/renderer/components/ui/label.tsx b/src/renderer/components/ui/label.tsx
new file mode 100644
index 0000000..ac4b457
--- /dev/null
+++ b/src/renderer/components/ui/label.tsx
@@ -0,0 +1,23 @@
+import * as React from 'react';
+import * as LabelPrimitive from '@radix-ui/react-label';
+import { cva, type VariantProps } from 'class-variance-authority';
+import { cn } from '../../lib/utils';
+
+const labelVariants = cva(
+ 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70'
+);
+
+const Label = React.forwardRef<
+ React.ElementRef<typeof LabelPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
+ VariantProps<typeof labelVariants>
+>(({ className, ...props }, ref) => (
+ <LabelPrimitive.Root
+ ref={ref}
+ className={cn(labelVariants(), className)}
+ {...props}
+ />
+));
+Label.displayName = LabelPrimitive.Root.displayName;
+
+export { Label };
diff --git a/src/renderer/components/ui/scroll-area.tsx b/src/renderer/components/ui/scroll-area.tsx
new file mode 100644
index 0000000..4f8134a
--- /dev/null
+++ b/src/renderer/components/ui/scroll-area.tsx
@@ -0,0 +1,32 @@
+import * as React from 'react';
+import { cn } from '../../lib/utils';
+
+interface ScrollAreaProps extends React.HTMLAttributes<HTMLDivElement> {}
+
+const ScrollArea = React.forwardRef<HTMLDivElement, ScrollAreaProps>(
+ ({ className, children, ...props }, ref) => (
+ <div ref={ref} className={cn('relative overflow-hidden', className)} {...props}>
+ <div
+ className={cn(
+ 'h-full w-full overflow-auto',
+ // Subtle scrollbar styling
+ '[&::-webkit-scrollbar]:w-2',
+ '[&::-webkit-scrollbar-track]:bg-transparent',
+ '[&::-webkit-scrollbar-thumb]:bg-slate-200',
+ '[&::-webkit-scrollbar-thumb]:rounded-full',
+ '[&::-webkit-scrollbar-thumb]:border-2',
+ '[&::-webkit-scrollbar-thumb]:border-transparent',
+ '[&::-webkit-scrollbar-thumb]:bg-clip-padding',
+ 'hover:[&::-webkit-scrollbar-thumb]:bg-slate-300',
+ 'dark:[&::-webkit-scrollbar-thumb]:bg-slate-700',
+ 'dark:hover:[&::-webkit-scrollbar-thumb]:bg-slate-600',
+ )}
+ >
+ {children}
+ </div>
+ </div>
+ )
+);
+ScrollArea.displayName = 'ScrollArea';
+
+export { ScrollArea };
diff --git a/src/renderer/components/ui/select.tsx b/src/renderer/components/ui/select.tsx
new file mode 100644
index 0000000..8f386ce
--- /dev/null
+++ b/src/renderer/components/ui/select.tsx
@@ -0,0 +1,157 @@
+import * as React from 'react';
+import * as SelectPrimitive from '@radix-ui/react-select';
+import { Check, ChevronDown, ChevronUp } from 'lucide-react';
+import { cn } from '../../lib/utils';
+
+const Select = SelectPrimitive.Root;
+
+const SelectGroup = SelectPrimitive.Group;
+
+const SelectValue = SelectPrimitive.Value;
+
+const SelectTrigger = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.Trigger>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
+>(({ className, children, ...props }, ref) => (
+ <SelectPrimitive.Trigger
+ ref={ref}
+ className={cn(
+ 'flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',
+ className
+ )}
+ {...props}
+ >
+ {children}
+ <SelectPrimitive.Icon asChild>
+ <ChevronDown className="h-4 w-4 opacity-50" />
+ </SelectPrimitive.Icon>
+ </SelectPrimitive.Trigger>
+));
+SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
+
+const SelectScrollUpButton = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
+>(({ className, ...props }, ref) => (
+ <SelectPrimitive.ScrollUpButton
+ ref={ref}
+ className={cn(
+ 'flex cursor-default items-center justify-center py-1',
+ className
+ )}
+ {...props}
+ >
+ <ChevronUp className="h-4 w-4" />
+ </SelectPrimitive.ScrollUpButton>
+));
+SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
+
+const SelectScrollDownButton = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
+>(({ className, ...props }, ref) => (
+ <SelectPrimitive.ScrollDownButton
+ ref={ref}
+ className={cn(
+ 'flex cursor-default items-center justify-center py-1',
+ className
+ )}
+ {...props}
+ >
+ <ChevronDown className="h-4 w-4" />
+ </SelectPrimitive.ScrollDownButton>
+));
+SelectScrollDownButton.displayName =
+ SelectPrimitive.ScrollDownButton.displayName;
+
+const SelectContent = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
+>(({ className, children, position = 'popper', ...props }, ref) => (
+ <SelectPrimitive.Portal>
+ <SelectPrimitive.Content
+ ref={ref}
+ className={cn(
+ 'relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
+ position === 'popper' &&
+ 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
+ className
+ )}
+ position={position}
+ {...props}
+ >
+ <SelectScrollUpButton />
+ <SelectPrimitive.Viewport
+ className={cn(
+ 'p-1',
+ position === 'popper' &&
+ 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]'
+ )}
+ >
+ {children}
+ </SelectPrimitive.Viewport>
+ <SelectScrollDownButton />
+ </SelectPrimitive.Content>
+ </SelectPrimitive.Portal>
+));
+SelectContent.displayName = SelectPrimitive.Content.displayName;
+
+const SelectLabel = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.Label>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
+>(({ className, ...props }, ref) => (
+ <SelectPrimitive.Label
+ ref={ref}
+ className={cn('py-1.5 pl-8 pr-2 text-sm font-semibold', className)}
+ {...props}
+ />
+));
+SelectLabel.displayName = SelectPrimitive.Label.displayName;
+
+const SelectItem = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.Item>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
+>(({ className, children, ...props }, ref) => (
+ <SelectPrimitive.Item
+ ref={ref}
+ className={cn(
+ 'relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
+ className
+ )}
+ {...props}
+ >
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <SelectPrimitive.ItemIndicator>
+ <Check className="h-4 w-4" />
+ </SelectPrimitive.ItemIndicator>
+ </span>
+
+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
+ </SelectPrimitive.Item>
+));
+SelectItem.displayName = SelectPrimitive.Item.displayName;
+
+const SelectSeparator = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.Separator>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
+>(({ className, ...props }, ref) => (
+ <SelectPrimitive.Separator
+ ref={ref}
+ className={cn('-mx-1 my-1 h-px bg-muted', className)}
+ {...props}
+ />
+));
+SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
+
+export {
+ Select,
+ SelectGroup,
+ SelectValue,
+ SelectTrigger,
+ SelectContent,
+ SelectLabel,
+ SelectItem,
+ SelectSeparator,
+ SelectScrollUpButton,
+ SelectScrollDownButton,
+};
diff --git a/src/renderer/components/ui/switch.tsx b/src/renderer/components/ui/switch.tsx
new file mode 100644
index 0000000..fe173c6
--- /dev/null
+++ b/src/renderer/components/ui/switch.tsx
@@ -0,0 +1,38 @@
+import * as React from 'react';
+import { cn } from '../../lib/utils';
+
+interface SwitchProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
+ checked?: boolean;
+ onCheckedChange?: (checked: boolean) => void;
+}
+
+const Switch = React.forwardRef<HTMLButtonElement, SwitchProps>(
+ ({ className, checked = false, onCheckedChange, disabled, ...props }, ref) => {
+ return (
+ <button
+ type="button"
+ role="switch"
+ aria-checked={checked}
+ disabled={disabled}
+ ref={ref}
+ onClick={() => onCheckedChange?.(!checked)}
+ className={cn(
+ 'peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50',
+ checked ? 'bg-primary' : 'bg-input',
+ className
+ )}
+ {...props}
+ >
+ <span
+ className={cn(
+ 'pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform',
+ checked ? 'translate-x-4' : 'translate-x-0'
+ )}
+ />
+ </button>
+ );
+ }
+);
+Switch.displayName = 'Switch';
+
+export { Switch };
diff --git a/src/renderer/components/ui/tabs.tsx b/src/renderer/components/ui/tabs.tsx
new file mode 100644
index 0000000..11dff30
--- /dev/null
+++ b/src/renderer/components/ui/tabs.tsx
@@ -0,0 +1,52 @@
+import * as React from 'react';
+import * as TabsPrimitive from '@radix-ui/react-tabs';
+import { cn } from '../../lib/utils';
+
+const Tabs = TabsPrimitive.Root;
+
+const TabsList = React.forwardRef<
+ React.ElementRef<typeof TabsPrimitive.List>,
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
+>(({ className, ...props }, ref) => (
+ <TabsPrimitive.List
+ ref={ref}
+ className={cn(
+ 'inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground',
+ className
+ )}
+ {...props}
+ />
+));
+TabsList.displayName = TabsPrimitive.List.displayName;
+
+const TabsTrigger = React.forwardRef<
+ React.ElementRef<typeof TabsPrimitive.Trigger>,
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
+>(({ className, ...props }, ref) => (
+ <TabsPrimitive.Trigger
+ ref={ref}
+ className={cn(
+ 'inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm',
+ className
+ )}
+ {...props}
+ />
+));
+TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
+
+const TabsContent = React.forwardRef<
+ React.ElementRef<typeof TabsPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
+>(({ className, ...props }, ref) => (
+ <TabsPrimitive.Content
+ ref={ref}
+ className={cn(
+ 'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
+ className
+ )}
+ {...props}
+ />
+));
+TabsContent.displayName = TabsPrimitive.Content.displayName;
+
+export { Tabs, TabsList, TabsTrigger, TabsContent };
diff --git a/src/renderer/components/ui/textarea.tsx b/src/renderer/components/ui/textarea.tsx
new file mode 100644
index 0000000..79aa189
--- /dev/null
+++ b/src/renderer/components/ui/textarea.tsx
@@ -0,0 +1,23 @@
+import * as React from 'react';
+import { cn } from '../../lib/utils';
+
+export interface TextareaProps
+ extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
+
+const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
+ ({ className, ...props }, ref) => {
+ return (
+ <textarea
+ className={cn(
+ 'flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
+ className
+ )}
+ ref={ref}
+ {...props}
+ />
+ );
+ }
+);
+Textarea.displayName = 'Textarea';
+
+export { Textarea };
diff --git a/src/renderer/hooks/useCopilot.ts b/src/renderer/hooks/useCopilot.ts
new file mode 100644
index 0000000..e29ec16
--- /dev/null
+++ b/src/renderer/hooks/useCopilot.ts
@@ -0,0 +1,302 @@
+/**
+ * useCopilot Hook
+ *
+ * Provides integration between the Meeting Co-Pilot backend and React components.
+ * Handles IPC event subscriptions and state synchronization.
+ */
+
+import { useEffect, useCallback, useRef } from 'react';
+import { useCopilotStore } from '../stores/copilot.store';
+import { useConfigStore } from '../stores/config.store';
+
+// Hook
+
+export function useCopilot() {
+ const {
+ config,
+ isInitialized,
+ isCallActive,
+ recordingId,
+ metrics,
+ healthScore,
+ sentiment,
+ activeCueCards,
+ pinnedCueCards,
+ playbook,
+ activeNudge,
+ callSummary,
+ callDuration,
+ setConfig,
+ setInitialized,
+ startCall,
+ endCall,
+ setMetrics,
+ setSentiment,
+ addCueCard,
+ dismissCueCard,
+ pinCueCard,
+ setPlaybook,
+ updatePlaybookItem,
+ setNudge,
+ dismissNudge,
+ setCallSummary,
+ addTranscriptSegment,
+ reset,
+ } = useCopilotStore();
+
+ const { apiKey } = useConfigStore();
+ const unsubscribersRef = useRef<Array<() => void>>([]);
+
+ /**
+ * Initialize copilot with API key
+ */
+ const initialize = useCallback(async () => {
+ if (!apiKey || isInitialized) return;
+
+ try {
+ const result = await window.electronAPI.copilot.initialize(apiKey);
+ if (result.success) {
+ setInitialized(true);
+ } else {
+ console.error('Failed to initialize copilot:', result.error);
+ }
+ } catch (error) {
+ console.error('Error initializing copilot:', error);
+ }
+ }, [apiKey, isInitialized, setInitialized]);
+
+ /**
+ * Start copilot for a call
+ */
+ const startCopilot = useCallback(async (recId: number, sessionId: string) => {
+ if (!isInitialized) {
+ await initialize();
+ }
+
+ try {
+ const result = await window.electronAPI.copilot.startCall(recId, sessionId);
+ if (result.success) {
+ startCall(recId);
+ } else {
+ console.error('Failed to start copilot:', result.error);
+ }
+ } catch (error) {
+ console.error('Error starting copilot:', error);
+ }
+ }, [isInitialized, initialize, startCall]);
+
+ /**
+ * End copilot and get summary
+ */
+ const stopCopilot = useCallback(async () => {
+ try {
+ const result = await window.electronAPI.copilot.endCall();
+ if (result.success && result.summary) {
+ // Summary will come through the event listener
+ }
+ endCall();
+ } catch (error) {
+ console.error('Error stopping copilot:', error);
+ endCall();
+ }
+ }, [endCall]);
+
+ /**
+ * Update copilot configuration
+ */
+ const updateConfig = useCallback(async (newConfig: Partial<typeof config>) => {
+ setConfig(newConfig);
+ try {
+ await window.electronAPI.copilot.updateConfig(newConfig);
+ } catch (error) {
+ console.error('Error updating copilot config:', error);
+ }
+ }, [setConfig]);
+
+ /**
+ * Dismiss a cue card
+ */
+ const handleDismissCueCard = useCallback(async (triggerId: string) => {
+ dismissCueCard(triggerId);
+ try {
+ await window.electronAPI.copilot.dismissCueCard(triggerId);
+ } catch (error) {
+ console.error('Error dismissing cue card:', error);
+ }
+ }, [dismissCueCard]);
+
+ /**
+ * Pin a cue card
+ */
+ const handlePinCueCard = useCallback(async (triggerId: string) => {
+ pinCueCard(triggerId);
+ try {
+ await window.electronAPI.copilot.pinCueCard(triggerId);
+ } catch (error) {
+ console.error('Error pinning cue card:', error);
+ }
+ }, [pinCueCard]);
+
+ /**
+ * Submit cue card feedback
+ */
+ const submitCueCardFeedback = useCallback(async (
+ triggerId: string,
+ feedback: 'helpful' | 'wrong' | 'irrelevant'
+ ) => {
+ try {
+ await window.electronAPI.copilot.cueCardFeedback(triggerId, feedback);
+ } catch (error) {
+ console.error('Error submitting feedback:', error);
+ }
+ }, []);
+
+ /**
+ * Dismiss active nudge
+ */
+ const handleDismissNudge = useCallback(async () => {
+ if (activeNudge) {
+ dismissNudge();
+ try {
+ await window.electronAPI.copilot.dismissNudge(activeNudge.id);
+ } catch (error) {
+ console.error('Error dismissing nudge:', error);
+ }
+ }
+ }, [activeNudge, dismissNudge]);
+
+ /**
+ * Create a bookmark
+ */
+ const createBookmark = useCallback(async (
+ timestamp: number,
+ category: string,
+ note?: string
+ ) => {
+ if (!recordingId) return;
+
+ try {
+ const result = await window.electronAPI.copilot.createBookmark({
+ recordingId,
+ timestamp,
+ category,
+ note,
+ });
+ return result.success;
+ } catch (error) {
+ console.error('Error creating bookmark:', error);
+ return false;
+ }
+ }, [recordingId]);
+
+ /**
+ * Setup IPC event listeners
+ */
+ useEffect(() => {
+ // Clean up previous listeners
+ unsubscribersRef.current.forEach(unsub => unsub());
+ unsubscribersRef.current = [];
+
+ // Subscribe to copilot events
+ const unsubTranscript = window.electronAPI.copilotOn.onTranscript((segment) => {
+ addTranscriptSegment(segment);
+ });
+
+ const unsubMetrics = window.electronAPI.copilotOn.onMetrics(({ metrics, health }) => {
+ setMetrics(metrics, health);
+ });
+
+ const unsubSentiment = window.electronAPI.copilotOn.onSentiment(({ sentiment }) => {
+ setSentiment(sentiment);
+ });
+
+ const unsubNudge = window.electronAPI.copilotOn.onNudge(({ nudge }) => {
+ setNudge(nudge);
+ });
+
+ const unsubCueCard = window.electronAPI.copilotOn.onCueCard(({ cueCard }) => {
+ addCueCard(cueCard);
+ });
+
+ const unsubPlaybook = window.electronAPI.copilotOn.onPlaybook(({ item, snapshot }) => {
+ setPlaybook(snapshot);
+ updatePlaybookItem(item);
+ });
+
+ const unsubCallEnded = window.electronAPI.copilotOn.onCallEnded(({ summary, playbook, metrics, duration }) => {
+ setCallSummary(summary, duration);
+ if (playbook) {
+ setPlaybook(playbook);
+ }
+ setMetrics(metrics, 0);
+ });
+
+ const unsubError = window.electronAPI.copilotOn.onError(({ error, context }) => {
+ console.error('Copilot error:', error, context);
+ });
+
+ unsubscribersRef.current = [
+ unsubTranscript,
+ unsubMetrics,
+ unsubSentiment,
+ unsubNudge,
+ unsubCueCard,
+ unsubPlaybook,
+ unsubCallEnded,
+ unsubError,
+ ];
+
+ return () => {
+ unsubscribersRef.current.forEach(unsub => unsub());
+ };
+ }, [
+ addTranscriptSegment,
+ setMetrics,
+ setSentiment,
+ setNudge,
+ addCueCard,
+ setPlaybook,
+ updatePlaybookItem,
+ setCallSummary,
+ ]);
+
+ /**
+ * Initialize on mount if API key is available
+ */
+ useEffect(() => {
+ if (apiKey && !isInitialized) {
+ initialize();
+ }
+ }, [apiKey, isInitialized, initialize]);
+
+ return {
+ // State
+ config,
+ isInitialized,
+ isCallActive,
+ recordingId,
+ metrics,
+ healthScore,
+ sentiment,
+ activeCueCards,
+ pinnedCueCards,
+ playbook,
+ activeNudge,
+ callSummary,
+ callDuration,
+
+ // Actions
+ initialize,
+ startCopilot,
+ stopCopilot,
+ updateConfig,
+ dismissCueCard: handleDismissCueCard,
+ pinCueCard: handlePinCueCard,
+ submitCueCardFeedback,
+ dismissNudge: handleDismissNudge,
+ createBookmark,
+ reset,
+ };
+}
+
+export default useCopilot;
diff --git a/src/renderer/hooks/useGlobalRecorderEvents.ts b/src/renderer/hooks/useGlobalRecorderEvents.ts
new file mode 100644
index 0000000..b954f9f
--- /dev/null
+++ b/src/renderer/hooks/useGlobalRecorderEvents.ts
@@ -0,0 +1,109 @@
+import { useEffect, useRef } from 'react';
+import { useSessionStore } from '../stores/session.store';
+import { useTranscriptionStore } from '../stores/transcription.store';
+import { useCopilotStore } from '../stores/copilot.store';
+import { getElectronAPI } from '../api/ipc';
+import type { RecorderEvent, TranscriptEvent } from '../../shared/types/ipc.types';
+
+/**
+ * Global hook to listen for recorder events from the main process.
+ * This should be called ONCE at the App level to ensure transcript events
+ * are captured even when navigating between pages.
+ */
+export function useGlobalRecorderEvents() {
+ const sessionStore = useSessionStore();
+ const transcriptionStore = useTranscriptionStore();
+
+ // Use refs to avoid re-subscribing when stores change
+ const sessionStoreRef = useRef(sessionStore);
+ const transcriptionStoreRef = useRef(transcriptionStore);
+
+ // Keep refs updated
+ useEffect(() => {
+ sessionStoreRef.current = sessionStore;
+ }, [sessionStore]);
+
+ useEffect(() => {
+ transcriptionStoreRef.current = transcriptionStore;
+ }, [transcriptionStore]);
+
+ useEffect(() => {
+ const api = getElectronAPI();
+ if (!api) return;
+
+ console.log('[Global] Setting up recorder event listener');
+
+ const unsubscribe = api.on.recorderEvent((event: RecorderEvent) => {
+ const session = sessionStoreRef.current;
+ const transcription = transcriptionStoreRef.current;
+
+ console.log('[GlobalRecorderEvents] Event received:', event.event, event.data);
+
+ switch (event.event) {
+ case 'recording:started':
+ console.log('[GlobalRecorderEvents] Recording started, setting status to recording');
+ session.setStatus('recording');
+ break;
+
+ case 'recording:stopped':
+ console.log('[GlobalRecorderEvents] Recording stopped, setting status to processing');
+ session.setStatus('processing');
+ break;
+
+ case 'recording:error':
+ console.error('[GlobalRecorderEvents] Recording error:', event.data);
+ session.setError(String(event.data));
+ session.setStatus('idle');
+ break;
+
+ case 'transcript':
+ if (event.data && transcription.enabled) {
+ const transcript = event.data as TranscriptEvent;
+ if (transcript.isFinal) {
+ transcription.finalizePending(transcript.source, transcript.text);
+ } else {
+ transcription.updatePending(transcript.source, transcript.text);
+ }
+
+ // Forward transcript to copilot backend (for final segments only)
+ const currentApi = getElectronAPI();
+ if (transcript.isFinal && useCopilotStore.getState().isCallActive && currentApi) {
+ // Map source to channel: 'mic' -> 'me', 'system_audio' -> 'them'
+ const channel: 'me' | 'them' = transcript.source === 'mic' ? 'me' : 'them';
+
+ currentApi.copilot.sendTranscript(channel, {
+ text: transcript.text,
+ is_final: true,
+ start: transcript.start,
+ end: transcript.end,
+ }).catch((err: Error) => {
+ console.warn('[GlobalRecorderEvents] Error forwarding transcript to copilot:', err);
+ });
+ }
+ }
+ break;
+
+ case 'upload:progress':
+ console.log('[GlobalRecorderEvents] Upload progress:', event.data);
+ break;
+
+ case 'upload:complete':
+ // Don't reset session here - let stopRecording() handle the transition
+ // after copilot summary generation completes
+ console.log('[GlobalRecorderEvents] Upload complete (stopRecording will handle state transition)');
+ break;
+
+ case 'error':
+ console.error('[GlobalRecorderEvents] Error:', event.data);
+ session.setError(String(event.data));
+ break;
+ }
+ });
+
+ // Only unsubscribe when the entire app unmounts (which shouldn't happen during normal use)
+ return () => {
+ console.log('[Global] Cleaning up recorder event listener');
+ unsubscribe();
+ };
+ }, []); // Empty deps - only run once on mount
+}
diff --git a/src/renderer/hooks/useMCP.ts b/src/renderer/hooks/useMCP.ts
new file mode 100644
index 0000000..8efcc04
--- /dev/null
+++ b/src/renderer/hooks/useMCP.ts
@@ -0,0 +1,392 @@
+/**
+ * useMCP Hook
+ *
+ * Provides integration between the MCP backend and React components.
+ * Handles IPC event subscriptions and state synchronization.
+ */
+
+import { useEffect, useCallback, useRef } from 'react';
+import { useMCPStore } from '../stores/mcp.store';
+
+// Hook
+
+export function useMCP() {
+ const {
+ servers,
+ templates,
+ connectionStates,
+ availableTools,
+ activeResults,
+ pendingCalls,
+ isInitialized,
+ autoTriggerEnabled,
+ customTriggerKeywords,
+ lastError,
+ setInitialized,
+ setAutoTriggerEnabled,
+ setCustomTriggerKeywords,
+ setServers,
+ addServer,
+ updateServer,
+ removeServer,
+ setTemplates,
+ setConnectionStates,
+ updateConnectionState,
+ setAvailableTools,
+ addToolsFromServer,
+ removeToolsFromServer,
+ addResult,
+ dismissResult,
+ pinResult,
+ clearResults,
+ addPendingCall,
+ removePendingCall,
+ setError,
+ reset,
+ } = useMCPStore();
+
+ const unsubscribersRef = useRef<Array<() => void>>([]);
+
+ /**
+ * Load servers and templates from backend
+ */
+ const loadData = useCallback(async () => {
+ try {
+ // Load servers
+ const serversResult = await window.electronAPI.mcp.getServers();
+ if (serversResult.success && serversResult.servers) {
+ setServers(serversResult.servers);
+ if (serversResult.connectionStates) {
+ setConnectionStates(serversResult.connectionStates as any);
+ }
+ }
+
+ // Load templates
+ const templatesResult = await window.electronAPI.mcp.getTemplates();
+ if (templatesResult.success && templatesResult.templates) {
+ setTemplates(templatesResult.templates);
+ }
+
+ // Load tools from connected servers
+ const toolsResult = await window.electronAPI.mcp.getTools();
+ if (toolsResult.success && toolsResult.tools) {
+ setAvailableTools(toolsResult.tools);
+ }
+
+ // Load custom trigger keywords
+ const keywordsResult = await window.electronAPI.mcp.getTriggerKeywords();
+ if (keywordsResult.success && keywordsResult.keywords) {
+ setCustomTriggerKeywords(keywordsResult.keywords);
+ }
+
+ setInitialized(true);
+ } catch (error) {
+ console.error('Error loading MCP data:', error);
+ setError(error instanceof Error ? error.message : 'Failed to load MCP data');
+ }
+ }, [setServers, setConnectionStates, setTemplates, setAvailableTools, setCustomTriggerKeywords, setInitialized, setError]);
+
+ /**
+ * Create a new server
+ */
+ const createServer = useCallback(async (request: Parameters<typeof window.electronAPI.mcp.createServer>[0]) => {
+ try {
+ const result = await window.electronAPI.mcp.createServer(request);
+ if (result.success && result.server) {
+ addServer(result.server);
+ return result.server;
+ } else {
+ setError(result.error || 'Failed to create server');
+ return null;
+ }
+ } catch (error) {
+ console.error('Error creating server:', error);
+ setError(error instanceof Error ? error.message : 'Failed to create server');
+ return null;
+ }
+ }, [addServer, setError]);
+
+ /**
+ * Update an existing server
+ */
+ const handleUpdateServer = useCallback(async (
+ serverId: string,
+ request: Parameters<typeof window.electronAPI.mcp.updateServer>[1]
+ ) => {
+ try {
+ const result = await window.electronAPI.mcp.updateServer(serverId, request);
+ if (result.success && result.server) {
+ updateServer(serverId, result.server);
+ return true;
+ } else {
+ setError(result.error || 'Failed to update server');
+ return false;
+ }
+ } catch (error) {
+ console.error('Error updating server:', error);
+ setError(error instanceof Error ? error.message : 'Failed to update server');
+ return false;
+ }
+ }, [updateServer, setError]);
+
+ /**
+ * Delete a server
+ */
+ const deleteServer = useCallback(async (serverId: string) => {
+ try {
+ const result = await window.electronAPI.mcp.deleteServer(serverId);
+ if (result.success) {
+ removeServer(serverId);
+ return true;
+ } else {
+ setError(result.error || 'Failed to delete server');
+ return false;
+ }
+ } catch (error) {
+ console.error('Error deleting server:', error);
+ setError(error instanceof Error ? error.message : 'Failed to delete server');
+ return false;
+ }
+ }, [removeServer, setError]);
+
+ /**
+ * Connect to a server
+ */
+ const connect = useCallback(async (serverId: string) => {
+ updateConnectionState(serverId, 'connecting');
+
+ try {
+ const result = await window.electronAPI.mcp.connect(serverId);
+ if (result.success && result.tools) {
+ updateConnectionState(serverId, 'connected');
+ addToolsFromServer(serverId, result.tools);
+ return result.tools;
+ } else {
+ updateConnectionState(serverId, 'error', result.error);
+ setError(result.error || 'Failed to connect');
+ return null;
+ }
+ } catch (error) {
+ console.error('Error connecting to server:', error);
+ const errorMessage = error instanceof Error ? error.message : 'Failed to connect';
+ updateConnectionState(serverId, 'error', errorMessage);
+ setError(errorMessage);
+ return null;
+ }
+ }, [updateConnectionState, addToolsFromServer, setError]);
+
+ /**
+ * Disconnect from a server
+ */
+ const disconnect = useCallback(async (serverId: string) => {
+ try {
+ const result = await window.electronAPI.mcp.disconnect(serverId);
+ if (result.success) {
+ updateConnectionState(serverId, 'disconnected');
+ removeToolsFromServer(serverId);
+ return true;
+ } else {
+ setError(result.error || 'Failed to disconnect');
+ return false;
+ }
+ } catch (error) {
+ console.error('Error disconnecting from server:', error);
+ setError(error instanceof Error ? error.message : 'Failed to disconnect');
+ return false;
+ }
+ }, [updateConnectionState, removeToolsFromServer, setError]);
+
+ /**
+ * Test connection to a server
+ */
+ const testConnection = useCallback(async (serverId: string) => {
+ try {
+ const result = await window.electronAPI.mcp.testConnection(serverId);
+ return result.success ? result.result : null;
+ } catch (error) {
+ console.error('Error testing connection:', error);
+ return null;
+ }
+ }, []);
+
+ /**
+ * Execute a tool
+ */
+ const executeTool = useCallback(async (
+ serverId: string,
+ toolName: string,
+ input?: Record<string, unknown>
+ ) => {
+ const callId = `${serverId}:${toolName}:${Date.now()}`;
+ addPendingCall(callId);
+
+ try {
+ const result = await window.electronAPI.mcp.executeTool(serverId, toolName, input);
+
+ removePendingCall(callId);
+
+ if (result.success && result.result) {
+ addResult(result.result);
+ return result.result;
+ } else {
+ setError(result.error || 'Failed to execute tool');
+ return null;
+ }
+ } catch (error) {
+ console.error('Error executing tool:', error);
+ removePendingCall(callId);
+ setError(error instanceof Error ? error.message : 'Failed to execute tool');
+ return null;
+ }
+ }, [addPendingCall, removePendingCall, addResult, setError]);
+
+ /**
+ * Dismiss a result
+ */
+ const handleDismissResult = useCallback(async (resultId: string) => {
+ dismissResult(resultId);
+ try {
+ await window.electronAPI.mcp.dismissResult(resultId);
+ } catch (error) {
+ console.error('Error dismissing result:', error);
+ }
+ }, [dismissResult]);
+
+ /**
+ * Pin a result
+ */
+ const handlePinResult = useCallback(async (resultId: string) => {
+ pinResult(resultId);
+ try {
+ await window.electronAPI.mcp.pinResult(resultId);
+ } catch (error) {
+ console.error('Error pinning result:', error);
+ }
+ }, [pinResult]);
+
+ /**
+ * Update custom trigger keywords
+ */
+ const updateTriggerKeywords = useCallback(async (keywords: string[]) => {
+ try {
+ const result = await window.electronAPI.mcp.setTriggerKeywords(keywords);
+ if (result.success) {
+ setCustomTriggerKeywords(keywords);
+ return true;
+ } else {
+ setError(result.error || 'Failed to update trigger keywords');
+ return false;
+ }
+ } catch (error) {
+ console.error('Error updating trigger keywords:', error);
+ setError(error instanceof Error ? error.message : 'Failed to update trigger keywords');
+ return false;
+ }
+ }, [setCustomTriggerKeywords, setError]);
+
+ /**
+ * Setup IPC event listeners
+ */
+ useEffect(() => {
+ // Clean up previous listeners
+ unsubscribersRef.current.forEach(unsub => unsub());
+ unsubscribersRef.current = [];
+
+ // Subscribe to MCP events
+ const unsubResult = window.electronAPI.mcpOn.onResult(({ result }) => {
+ console.log('[MCP] Received result from main process:', {
+ id: result.id,
+ toolName: result.toolName,
+ displayType: result.displayType,
+ contentPreview: result.content?.text?.slice(0, 100),
+ });
+ addResult(result);
+ });
+
+ const unsubError = window.electronAPI.mcpOn.onError(({ serverId, toolName, error }) => {
+ console.error('MCP error:', serverId, toolName, error);
+ setError(`${toolName}: ${error}`);
+ });
+
+ const unsubConnected = window.electronAPI.mcpOn.onServerConnected(({ serverId, tools }) => {
+ updateConnectionState(serverId, 'connected');
+ addToolsFromServer(serverId, tools);
+ });
+
+ const unsubDisconnected = window.electronAPI.mcpOn.onServerDisconnected(({ serverId, reason }) => {
+ updateConnectionState(serverId, 'disconnected');
+ removeToolsFromServer(serverId);
+ console.log('Server disconnected:', serverId, reason);
+ });
+
+ const unsubServerError = window.electronAPI.mcpOn.onServerError(({ serverId, error }) => {
+ updateConnectionState(serverId, 'error', error);
+ setError(`Server ${serverId}: ${error}`);
+ });
+
+ unsubscribersRef.current = [
+ unsubResult,
+ unsubError,
+ unsubConnected,
+ unsubDisconnected,
+ unsubServerError,
+ ];
+
+ return () => {
+ unsubscribersRef.current.forEach(unsub => unsub());
+ };
+ }, [
+ addResult,
+ setError,
+ updateConnectionState,
+ addToolsFromServer,
+ removeToolsFromServer,
+ ]);
+
+ /**
+ * Load data on mount
+ */
+ useEffect(() => {
+ if (!isInitialized) {
+ loadData();
+ }
+ }, [isInitialized, loadData]);
+
+ return {
+ // State
+ servers,
+ templates,
+ connectionStates,
+ availableTools,
+ activeResults,
+ visibleResults: activeResults.filter(r => !r.dismissed),
+ pinnedResults: activeResults.filter(r => r.pinned && !r.dismissed),
+ pendingCalls,
+ isInitialized,
+ autoTriggerEnabled,
+ customTriggerKeywords,
+ lastError,
+
+ // Computed
+ connectedServerCount: Object.values(connectionStates).filter(s => s.status === 'connected').length,
+ toolCount: availableTools.length,
+
+ // Actions
+ loadData,
+ createServer,
+ updateServer: handleUpdateServer,
+ deleteServer,
+ connect,
+ disconnect,
+ testConnection,
+ executeTool,
+ dismissResult: handleDismissResult,
+ pinResult: handlePinResult,
+ clearResults,
+ setAutoTriggerEnabled,
+ updateTriggerKeywords,
+ reset,
+ };
+}
+
+export default useMCP;
diff --git a/src/renderer/hooks/usePermissions.ts b/src/renderer/hooks/usePermissions.ts
new file mode 100644
index 0000000..8dbce86
--- /dev/null
+++ b/src/renderer/hooks/usePermissions.ts
@@ -0,0 +1,71 @@
+import { useState, useEffect, useCallback } from 'react';
+import { getElectronAPI } from '../api/ipc';
+import type { PermissionStatus } from '../../shared/types/ipc.types';
+
+export function usePermissions() {
+ const [status, setStatus] = useState<PermissionStatus>({
+ microphone: false,
+ screen: false,
+ accessibility: false,
+ });
+ const [loading, setLoading] = useState(true);
+
+ const checkPermissions = useCallback(async () => {
+ const api = getElectronAPI();
+ if (!api) {
+ setLoading(false);
+ return;
+ }
+
+ try {
+ const permStatus = await api.permissions.getStatus();
+ setStatus(permStatus);
+ } catch (error) {
+ console.error('Failed to check permissions:', error);
+ } finally {
+ setLoading(false);
+ }
+ }, []);
+
+ useEffect(() => {
+ checkPermissions();
+ }, [checkPermissions]);
+
+ const requestMicPermission = useCallback(async () => {
+ const api = getElectronAPI();
+ if (!api) return false;
+
+ const granted = await api.permissions.requestMicPermission();
+ if (granted) {
+ setStatus((prev) => ({ ...prev, microphone: true }));
+ }
+ return granted;
+ }, []);
+
+ const requestScreenPermission = useCallback(async () => {
+ const api = getElectronAPI();
+ if (!api) return false;
+
+ const granted = await api.permissions.requestScreenPermission();
+ await checkPermissions(); // Re-check since user needs to grant manually
+ return granted;
+ }, [checkPermissions]);
+
+ const openSettings = useCallback(async (pane: string) => {
+ const api = getElectronAPI();
+ if (!api) return;
+ await api.permissions.openSystemSettings(pane);
+ }, []);
+
+ const allGranted = status.microphone && status.screen;
+
+ return {
+ status,
+ loading,
+ allGranted,
+ checkPermissions,
+ requestMicPermission,
+ requestScreenPermission,
+ openSettings,
+ };
+}
diff --git a/src/renderer/hooks/useSession.ts b/src/renderer/hooks/useSession.ts
new file mode 100644
index 0000000..4d6f3ad
--- /dev/null
+++ b/src/renderer/hooks/useSession.ts
@@ -0,0 +1,237 @@
+import { useEffect, useCallback, useRef } from 'react';
+import { useSessionStore } from '../stores/session.store';
+import { useTranscriptionStore } from '../stores/transcription.store';
+import { useConfigStore } from '../stores/config.store';
+import { useCopilotStore } from '../stores/copilot.store';
+import { useMCPStore } from '../stores/mcp.store';
+import { trpc } from '../api/trpc';
+import { getElectronAPI } from '../api/ipc';
+
+export function useSession() {
+ const sessionStore = useSessionStore();
+ const transcriptionStore = useTranscriptionStore();
+ const configStore = useConfigStore();
+
+ const timerRef = useRef<NodeJS.Timeout | null>(null);
+
+ const generateTokenMutation = trpc.token.generate.useMutation();
+ const createSessionMutation = trpc.capture.createSession.useMutation();
+ const startRecordingMutation = trpc.recordings.start.useMutation();
+ const stopRecordingMutation = trpc.recordings.stop.useMutation();
+ const startTranscriptionMutation = trpc.transcription.start.useMutation();
+
+ // Recorder events are global to prevent transcript loss on navigation.
+
+ useEffect(() => {
+ if (sessionStore.status === 'recording' && sessionStore.startTime) {
+ timerRef.current = setInterval(() => {
+ const elapsed = Math.floor((Date.now() - sessionStore.startTime!) / 1000);
+ sessionStore.setElapsedTime(elapsed);
+ }, 1000);
+ } else {
+ if (timerRef.current) {
+ clearInterval(timerRef.current);
+ timerRef.current = null;
+ }
+ }
+
+ return () => {
+ if (timerRef.current) {
+ clearInterval(timerRef.current);
+ }
+ };
+ }, [sessionStore.status, sessionStore.startTime]);
+
+ const startRecording = useCallback(async () => {
+ const api = getElectronAPI();
+ if (!api) {
+ sessionStore.setError('Electron API not available');
+ return;
+ }
+
+ sessionStore.setStatus('starting');
+ transcriptionStore.clear();
+ useMCPStore.getState().clearResults();
+
+ try {
+ let sessionToken = sessionStore.sessionToken;
+ let tokenExpiresAt = sessionStore.tokenExpiresAt;
+
+ if (sessionStore.isTokenExpired()) {
+ const tokenResult = await generateTokenMutation.mutateAsync({});
+ sessionToken = tokenResult.sessionToken;
+ tokenExpiresAt = tokenResult.expiresAt;
+ sessionStore.setSessionToken(sessionToken, tokenExpiresAt);
+ }
+
+ if (!sessionToken) {
+ throw new Error('Failed to get session token');
+ }
+
+ const accessToken = configStore.accessToken;
+ const apiUrl = configStore.apiUrl;
+
+ if (!accessToken) {
+ throw new Error('Not authenticated');
+ }
+
+ const captureSession = await createSessionMutation.mutateAsync({});
+
+ const streamsConfig = {
+ microphone: sessionStore.streams.microphone,
+ systemAudio: sessionStore.streams.systemAudio,
+ screen: sessionStore.streams.screen,
+ };
+
+ if (!streamsConfig.microphone && !streamsConfig.systemAudio && !streamsConfig.screen) {
+ throw new Error('No streams enabled for recording');
+ }
+
+ const result = await api.capture.startRecording({
+ config: {
+ sessionId: captureSession.sessionId,
+ streams: streamsConfig,
+ },
+ sessionToken,
+ accessToken,
+ apiUrl: apiUrl || undefined,
+ enableTranscription: transcriptionStore.enabled,
+ });
+
+ if (!result.success) {
+ throw new Error(result.error || 'Failed to start recording');
+ }
+
+ const recordingResult = await startRecordingMutation.mutateAsync({
+ sessionId: captureSession.sessionId,
+ });
+
+ if (transcriptionStore.enabled && (result.micWsConnectionId || result.sysAudioWsConnectionId)) {
+ await startTranscriptionMutation.mutateAsync({
+ sessionId: captureSession.sessionId,
+ micWsConnectionId: result.micWsConnectionId,
+ sysAudioWsConnectionId: result.sysAudioWsConnectionId,
+ });
+ }
+
+ if (transcriptionStore.enabled && recordingResult?.id) {
+ try {
+ const copilotResult = await api.copilot.startCall(
+ recordingResult.id,
+ captureSession.sessionId
+ );
+ if (copilotResult.success) {
+ useCopilotStore.getState().startCall(recordingResult.id);
+ }
+ } catch (copilotError) {
+ // Ignore copilot errors
+ }
+ }
+
+ sessionStore.startSession(captureSession.sessionId, sessionToken!, tokenExpiresAt!);
+ } catch (error) {
+ sessionStore.setError(error instanceof Error ? error.message : 'Failed to start recording');
+ sessionStore.setStatus('idle');
+ }
+ }, [
+ sessionStore,
+ transcriptionStore,
+ configStore,
+ generateTokenMutation,
+ createSessionMutation,
+ startRecordingMutation,
+ startTranscriptionMutation,
+ ]);
+
+ const stopRecording = useCallback(async () => {
+ const api = getElectronAPI();
+ if (!api) return;
+
+ sessionStore.setStatus('stopping');
+
+ try {
+ const result = await api.capture.stopRecording();
+
+ if (!result.success) {
+ throw new Error(result.error || 'Failed to stop recording');
+ }
+
+ useMCPStore.getState().clearResults();
+
+ if (sessionStore.sessionId) {
+ await stopRecordingMutation.mutateAsync({
+ sessionId: sessionStore.sessionId,
+ });
+ }
+
+ if (useCopilotStore.getState().isCallActive) {
+ try {
+ const copilotResult = await api.copilot.endCall();
+ if (copilotResult.success && copilotResult.summary) {
+ const duration = useCopilotStore.getState().callDuration || 0;
+ useCopilotStore.getState().setCallSummary(copilotResult.summary, duration);
+ }
+ } catch (copilotError) {
+ // Ignore copilot errors
+ }
+ }
+
+ transcriptionStore.clear();
+
+ const copilotState = useCopilotStore.getState();
+ if (!copilotState.callSummary) {
+ copilotState.reset();
+ } else {
+ copilotState.endCall();
+ }
+
+ // Transition session to idle now that all work (including copilot) is complete
+ sessionStore.setElapsedTime(0);
+ sessionStore.stopSession();
+ } catch (error) {
+ sessionStore.setError(error instanceof Error ? error.message : 'Failed to stop recording');
+ sessionStore.stopSession();
+
+ transcriptionStore.clear();
+ useCopilotStore.getState().reset();
+ }
+ }, [sessionStore, transcriptionStore, stopRecordingMutation]);
+
+ const toggleStream = useCallback(
+ async (stream: 'microphone' | 'systemAudio' | 'screen') => {
+ const api = getElectronAPI();
+ if (!api) return;
+
+ const currentState = sessionStore.streams[stream];
+ sessionStore.toggleStream(stream);
+
+ if (sessionStore.status === 'recording') {
+ const channelIdMap: Record<string, string> = {
+ microphone: 'mic',
+ systemAudio: 'system_audio',
+ screen: 'screen',
+ };
+ const channelId = channelIdMap[stream];
+
+ if (channelId) {
+ if (currentState) {
+ await api.capture.pauseTracks([channelId]);
+ } else {
+ await api.capture.resumeTracks([channelId]);
+ }
+ }
+ }
+ },
+ [sessionStore]
+ );
+
+ return {
+ ...sessionStore,
+ startRecording,
+ stopRecording,
+ toggleStream,
+ isRecording: sessionStore.status === 'recording',
+ isStarting: sessionStore.status === 'starting',
+ isStopping: sessionStore.status === 'stopping',
+ };
+}
diff --git a/src/renderer/index.html b/src/renderer/index.html
new file mode 100644
index 0000000..13c3d46
--- /dev/null
+++ b/src/renderer/index.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta
+ http-equiv="Content-Security-Policy"
+ content="default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; connect-src 'self' http://localhost:* https://*.trycloudflare.com https://fonts.googleapis.com https://fonts.gstatic.com; img-src 'self' data: https:;"
+ />
+ <title>Meeting Copilot</title>
+ </head>
+ <body>
+ <div id="root"></div>
+ <script type="module" src="./main.tsx"></script>
+ </body>
+</html>
diff --git a/src/renderer/lib/utils.ts b/src/renderer/lib/utils.ts
new file mode 100644
index 0000000..2193df2
--- /dev/null
+++ b/src/renderer/lib/utils.ts
@@ -0,0 +1,95 @@
+import { type ClassValue, clsx } from 'clsx';
+import { twMerge } from 'tailwind-merge';
+
+export function cn(...inputs: ClassValue[]) {
+ return twMerge(clsx(inputs));
+}
+
+export function formatDuration(seconds: number): string {
+ const hours = Math.floor(seconds / 3600);
+ const minutes = Math.floor((seconds % 3600) / 60);
+ const secs = Math.floor(seconds % 60);
+
+ if (hours > 0) {
+ return `${hours}:${minutes.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`;
+ }
+ return `${minutes}:${secs.toString().padStart(2, '0')}`;
+}
+
+export function formatRelativeTime(date: Date | string): string {
+ const now = new Date();
+ // SQLite datetime('now') returns UTC without timezone indicator (e.g., "2024-01-15 10:00:00")
+ // JavaScript interprets strings without 'Z' as local time, causing timezone offset issues
+ // Append 'Z' to indicate UTC if the string doesn't already have timezone info
+ let dateStr = typeof date === 'string' ? date : date.toISOString();
+ if (typeof date === 'string' && !date.endsWith('Z') && !date.includes('+') && !date.includes('-', 10)) {
+ dateStr = date.replace(' ', 'T') + 'Z';
+ }
+ const then = new Date(dateStr);
+ const diffMs = now.getTime() - then.getTime();
+ const diffSecs = Math.floor(diffMs / 1000);
+ const diffMins = Math.floor(diffSecs / 60);
+ const diffHours = Math.floor(diffMins / 60);
+ const diffDays = Math.floor(diffHours / 24);
+
+ if (diffDays > 0) {
+ return diffDays === 1 ? 'Yesterday' : `${diffDays} days ago`;
+ }
+ if (diffHours > 0) {
+ return diffHours === 1 ? '1 hour ago' : `${diffHours} hours ago`;
+ }
+ if (diffMins > 0) {
+ return diffMins === 1 ? '1 minute ago' : `${diffMins} minutes ago`;
+ }
+ return 'Just now';
+}
+
+/**
+ * Unwrap markdown code block wrapper if present
+ * Handles cases where AI returns content wrapped in ```markdown ... ```
+ */
+export function unwrapMarkdownCodeBlock(text: string): string {
+ if (!text) return text;
+
+ // Match content wrapped in ```markdown or ``` code blocks
+ const codeBlockMatch = text.match(/^```(?:markdown|md)?\s*\n?([\s\S]*?)\n?```\s*$/);
+ if (codeBlockMatch) {
+ return codeBlockMatch[1].trim();
+ }
+
+ return text;
+}
+
+/**
+ * Strip markdown formatting from text for plain text previews
+ */
+export function stripMarkdown(text: string): string {
+ // First unwrap any code block wrapper
+ const unwrapped = unwrapMarkdownCodeBlock(text);
+
+ return unwrapped
+ // Remove headers
+ .replace(/^#{1,6}\s+/gm, '')
+ // Remove bold/italic
+ .replace(/\*\*(.+?)\*\*/g, '$1')
+ .replace(/\*(.+?)\*/g, '$1')
+ .replace(/__(.+?)__/g, '$1')
+ .replace(/_(.+?)_/g, '$1')
+ // Remove bullet points
+ .replace(/^[\s]*[-*+]\s+/gm, '')
+ // Remove numbered lists
+ .replace(/^[\s]*\d+\.\s+/gm, '')
+ // Remove links
+ .replace(/\[(.+?)\]\(.+?\)/g, '$1')
+ // Remove code blocks
+ .replace(/```[\s\S]*?```/g, '')
+ .replace(/`(.+?)`/g, '$1')
+ // Remove emojis (common ones used in headings)
+ .replace(/[\u{1F300}-\u{1F9FF}]/gu, '')
+ // Collapse multiple newlines
+ .replace(/\n{2,}/g, ' ')
+ .replace(/\n/g, ' ')
+ // Remove extra spaces
+ .replace(/\s{2,}/g, ' ')
+ .trim();
+}
diff --git a/src/renderer/main.tsx b/src/renderer/main.tsx
new file mode 100644
index 0000000..511b180
--- /dev/null
+++ b/src/renderer/main.tsx
@@ -0,0 +1,63 @@
+import React, { useState, useEffect } from 'react';
+import ReactDOM from 'react-dom/client';
+import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
+import { trpc, createTrpcClient, getApiPort } from './api/trpc';
+import { useConfigStore } from './stores/config.store';
+import { App } from './App';
+import './styles/globals.css';
+
+function TrpcProvider({ children, port }: { children: React.ReactNode; port: number }) {
+ const configStore = useConfigStore();
+
+ const [queryClient] = useState(
+ () =>
+ new QueryClient({
+ defaultOptions: {
+ queries: {
+ staleTime: 5000,
+ refetchOnWindowFocus: false,
+ },
+ },
+ })
+ );
+
+ const [trpcClient] = useState(() =>
+ createTrpcClient(() => useConfigStore.getState().accessToken, port)
+ );
+
+ return (
+ <trpc.Provider client={trpcClient} queryClient={queryClient}>
+ <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
+ </trpc.Provider>
+ );
+}
+
+function Root() {
+ const [port, setPort] = useState<number | null>(null);
+
+ useEffect(() => {
+ getApiPort().then(setPort);
+ }, []);
+
+ if (port === null) {
+ return (
+ <div className="flex h-screen items-center justify-center bg-background">
+ <p className="text-muted-foreground">Connecting...</p>
+ </div>
+ );
+ }
+
+ return (
+ <TrpcProvider port={port}>
+ <App />
+ </TrpcProvider>
+ );
+}
+
+const root = ReactDOM.createRoot(document.getElementById('root')!);
+
+root.render(
+ <React.StrictMode>
+ <Root />
+ </React.StrictMode>
+);
diff --git a/src/renderer/stores/config.store.ts b/src/renderer/stores/config.store.ts
new file mode 100644
index 0000000..6778d8c
--- /dev/null
+++ b/src/renderer/stores/config.store.ts
@@ -0,0 +1,55 @@
+import { create } from 'zustand';
+import { persist } from 'zustand/middleware';
+
+interface ConfigState {
+ accessToken: string | null;
+ userName: string | null;
+ apiKey: string | null;
+ apiUrl: string | null;
+ webhookUrl: string | null;
+
+ setAuth: (accessToken: string, userName: string, apiKey: string) => void;
+ setConfig: (config: Partial<ConfigState>) => void;
+ clearAuth: () => void;
+ isAuthenticated: () => boolean;
+}
+
+export const useConfigStore = create<ConfigState>()(
+ persist(
+ (set, get) => ({
+ accessToken: null,
+ userName: null,
+ apiKey: null,
+ apiUrl: null,
+ webhookUrl: null,
+
+ setAuth: (accessToken, userName, apiKey) => {
+ set({ accessToken, userName, apiKey });
+ },
+
+ setConfig: (config) => {
+ set(config);
+ },
+
+ clearAuth: () => {
+ set({
+ accessToken: null,
+ userName: null,
+ apiKey: null,
+ });
+ },
+
+ isAuthenticated: () => {
+ return !!get().accessToken;
+ },
+ }),
+ {
+ name: 'meeting-copilot-config',
+ partialize: (state) => ({
+ accessToken: state.accessToken,
+ userName: state.userName,
+ apiKey: state.apiKey,
+ }),
+ }
+ )
+);
diff --git a/src/renderer/stores/copilot.store.ts b/src/renderer/stores/copilot.store.ts
new file mode 100644
index 0000000..f47e423
--- /dev/null
+++ b/src/renderer/stores/copilot.store.ts
@@ -0,0 +1,320 @@
+/**
+ * Meeting Co-Pilot Store
+ *
+ * Centralized state management for all Meeting Co-Pilot features:
+ * - Conversation metrics
+ * - Sentiment tracking
+ * - Cue cards
+ * - Playbook progress
+ * - Nudges
+ * - Call summary
+ */
+
+import { create } from 'zustand';
+import type {
+ CopilotMetrics,
+ CopilotSentiment,
+ CopilotNudge,
+ CopilotCueCard,
+ CopilotPlaybookItem,
+ CopilotPlaybookSnapshot,
+ CopilotCallSummary,
+ CopilotConfig,
+ CopilotTranscriptSegment,
+} from '../../shared/types/ipc.types';
+
+// Types
+
+export interface CopilotState {
+ // Configuration
+ config: CopilotConfig;
+ isInitialized: boolean;
+ isCallActive: boolean;
+ recordingId: number | null;
+
+ // Metrics
+ metrics: CopilotMetrics | null;
+ healthScore: number;
+
+ // Sentiment
+ sentiment: CopilotSentiment | null;
+
+ // Cue Cards
+ activeCueCards: CopilotCueCard[];
+ pinnedCueCards: CopilotCueCard[];
+ dismissedCueCardIds: Set<string>;
+
+ // Playbook
+ playbook: CopilotPlaybookSnapshot | null;
+ selectedPlaybookId: string | null;
+
+ // Nudges
+ activeNudge: CopilotNudge | null;
+ nudgeHistory: CopilotNudge[];
+
+ // Call Summary
+ callSummary: CopilotCallSummary | null;
+ callDuration: number;
+
+ // Transcript segments (for UI display with copilot annotations)
+ transcriptSegments: CopilotTranscriptSegment[];
+
+ // Actions
+ setConfig: (config: Partial<CopilotConfig>) => void;
+ setInitialized: (value: boolean) => void;
+ startCall: (recordingId: number) => void;
+ endCall: () => void;
+
+ // Metrics actions
+ setMetrics: (metrics: CopilotMetrics, health: number) => void;
+
+ // Sentiment actions
+ setSentiment: (sentiment: CopilotSentiment) => void;
+
+ // Cue card actions
+ addCueCard: (cueCard: CopilotCueCard) => void;
+ dismissCueCard: (triggerId: string) => void;
+ pinCueCard: (triggerId: string) => void;
+ clearCueCards: () => void;
+
+ // Playbook actions
+ setPlaybook: (playbook: CopilotPlaybookSnapshot) => void;
+ updatePlaybookItem: (item: CopilotPlaybookItem) => void;
+ setSelectedPlaybook: (id: string | null) => void;
+
+ // Nudge actions
+ setNudge: (nudge: CopilotNudge) => void;
+ dismissNudge: () => void;
+
+ // Summary actions
+ setCallSummary: (summary: CopilotCallSummary, duration: number) => void;
+
+ // Transcript actions
+ addTranscriptSegment: (segment: CopilotTranscriptSegment) => void;
+ clearTranscripts: () => void;
+
+ // Reset
+ reset: () => void;
+}
+
+// Initial State
+
+const initialConfig: CopilotConfig = {
+ enableTranscription: true,
+ enableMetrics: true,
+ enableSentiment: true,
+ enableNudges: true,
+ enableCueCards: true,
+ enablePlaybook: true,
+ useLLMForDetection: false,
+};
+
+const initialState = {
+ config: initialConfig,
+ isInitialized: false,
+ isCallActive: false,
+ recordingId: null,
+ metrics: null,
+ healthScore: 100,
+ sentiment: null,
+ activeCueCards: [],
+ pinnedCueCards: [],
+ dismissedCueCardIds: new Set<string>(),
+ playbook: null,
+ selectedPlaybookId: null,
+ activeNudge: null,
+ nudgeHistory: [],
+ callSummary: null,
+ callDuration: 0,
+ transcriptSegments: [],
+};
+
+// Store
+
+export const useCopilotStore = create<CopilotState>((set, get) => ({
+ ...initialState,
+
+ // Configuration
+ setConfig: (config) => {
+ set((state) => ({
+ config: { ...state.config, ...config },
+ }));
+ },
+
+ setInitialized: (value) => set({ isInitialized: value }),
+
+ startCall: (recordingId) => {
+ set({
+ isCallActive: true,
+ recordingId,
+ metrics: null,
+ healthScore: 100,
+ sentiment: null,
+ activeCueCards: [],
+ pinnedCueCards: [],
+ dismissedCueCardIds: new Set(),
+ playbook: null,
+ activeNudge: null,
+ nudgeHistory: [],
+ callSummary: null,
+ callDuration: 0,
+ transcriptSegments: [],
+ });
+ },
+
+ endCall: () => {
+ set({
+ isCallActive: false,
+ activeNudge: null,
+ });
+ },
+
+ // Metrics
+ setMetrics: (metrics, health) => {
+ set({ metrics, healthScore: health });
+ },
+
+ // Sentiment
+ setSentiment: (sentiment) => {
+ set({ sentiment });
+ },
+
+ // Cue Cards
+ addCueCard: (cueCard) => {
+ const { dismissedCueCardIds, activeCueCards } = get();
+
+ // Don't add if already dismissed
+ if (dismissedCueCardIds.has(cueCard.triggerId)) {
+ return;
+ }
+
+ // Check if already exists
+ const exists = activeCueCards.some(c => c.triggerId === cueCard.triggerId);
+ if (exists) {
+ return;
+ }
+
+ set((state) => ({
+ activeCueCards: [...state.activeCueCards, cueCard],
+ }));
+ },
+
+ dismissCueCard: (triggerId) => {
+ set((state) => {
+ const newDismissed = new Set(state.dismissedCueCardIds);
+ newDismissed.add(triggerId);
+
+ return {
+ activeCueCards: state.activeCueCards.filter(c => c.triggerId !== triggerId),
+ pinnedCueCards: state.pinnedCueCards.filter(c => c.triggerId !== triggerId),
+ dismissedCueCardIds: newDismissed,
+ };
+ });
+ },
+
+ pinCueCard: (triggerId) => {
+ set((state) => {
+ const card = state.activeCueCards.find(c => c.triggerId === triggerId);
+ if (!card) return state;
+
+ const pinnedCard = { ...card, status: 'pinned' as const };
+
+ return {
+ activeCueCards: state.activeCueCards.filter(c => c.triggerId !== triggerId),
+ pinnedCueCards: [...state.pinnedCueCards, pinnedCard],
+ };
+ });
+ },
+
+ clearCueCards: () => {
+ set({
+ activeCueCards: [],
+ pinnedCueCards: [],
+ dismissedCueCardIds: new Set(),
+ });
+ },
+
+ // Playbook
+ setPlaybook: (playbook) => {
+ set({ playbook });
+ },
+
+ updatePlaybookItem: (item) => {
+ set((state) => {
+ if (!state.playbook) return state;
+
+ const updatedItems = state.playbook.items.map(i =>
+ i.id === item.id ? item : i
+ );
+
+ const covered = updatedItems.filter(i => i.status === 'covered').length;
+ const partial = updatedItems.filter(i => i.status === 'partial').length;
+ const missing = updatedItems.filter(i => i.status === 'missing').length;
+ const total = updatedItems.length;
+
+ return {
+ playbook: {
+ ...state.playbook,
+ items: updatedItems,
+ covered,
+ partial,
+ missing,
+ coveragePercentage: total > 0 ? Math.round(((covered + partial * 0.5) / total) * 100) : 0,
+ },
+ };
+ });
+ },
+
+ setSelectedPlaybook: (id) => {
+ set({ selectedPlaybookId: id });
+ },
+
+ // Nudges
+ setNudge: (nudge) => {
+ set((state) => ({
+ activeNudge: nudge,
+ nudgeHistory: [...state.nudgeHistory, nudge],
+ }));
+ },
+
+ dismissNudge: () => {
+ set({ activeNudge: null });
+ },
+
+ // Summary
+ setCallSummary: (summary, duration) => {
+ set({ callSummary: summary, callDuration: duration });
+ },
+
+ // Transcripts
+ addTranscriptSegment: (segment) => {
+ set((state) => ({
+ transcriptSegments: [...state.transcriptSegments.slice(-200), segment], // Keep last 200
+ }));
+ },
+
+ clearTranscripts: () => {
+ set({ transcriptSegments: [] });
+ },
+
+ // Reset
+ reset: () => {
+ set({
+ ...initialState,
+ dismissedCueCardIds: new Set(),
+ });
+ },
+}));
+
+// Selectors (for optimized re-renders)
+
+export const selectMetrics = (state: CopilotState) => state.metrics;
+export const selectSentiment = (state: CopilotState) => state.sentiment;
+export const selectActiveCueCards = (state: CopilotState) => state.activeCueCards;
+export const selectPinnedCueCards = (state: CopilotState) => state.pinnedCueCards;
+export const selectPlaybook = (state: CopilotState) => state.playbook;
+export const selectActiveNudge = (state: CopilotState) => state.activeNudge;
+export const selectCallSummary = (state: CopilotState) => state.callSummary;
+export const selectIsCallActive = (state: CopilotState) => state.isCallActive;
+export const selectConfig = (state: CopilotState) => state.config;
+export const selectHealthScore = (state: CopilotState) => state.healthScore;
diff --git a/src/renderer/stores/mcp.store.ts b/src/renderer/stores/mcp.store.ts
new file mode 100644
index 0000000..8f3dac8
--- /dev/null
+++ b/src/renderer/stores/mcp.store.ts
@@ -0,0 +1,268 @@
+/**
+ * MCP Store
+ *
+ * Centralized state management for MCP (Model Context Protocol) features:
+ * - Server configurations
+ * - Connection states
+ * - Available tools
+ * - Active results
+ * - Templates
+ */
+
+import { create } from 'zustand';
+import type {
+ MCPServerConfig,
+ MCPTool,
+ MCPDisplayResult,
+ MCPServerTemplate,
+} from '../../preload/index';
+
+// Types
+
+export type MCPConnectionStatus = 'disconnected' | 'connecting' | 'connected' | 'error';
+
+export interface MCPState {
+ // Server management
+ servers: MCPServerConfig[];
+ templates: MCPServerTemplate[];
+
+ // Connection state
+ connectionStates: Record<string, { status: MCPConnectionStatus; error?: string }>;
+
+ // Available tools (aggregated from all connected servers)
+ availableTools: MCPTool[];
+
+ // Active results to display
+ activeResults: MCPDisplayResult[];
+
+ // Pending tool calls
+ pendingCalls: Set<string>;
+
+ // Configuration
+ isInitialized: boolean;
+ autoTriggerEnabled: boolean;
+
+ // Custom trigger keywords for MCP agent
+ customTriggerKeywords: string[];
+
+ // Error state
+ lastError?: string;
+
+ // Actions
+ setInitialized: (value: boolean) => void;
+ setAutoTriggerEnabled: (value: boolean) => void;
+ setCustomTriggerKeywords: (keywords: string[]) => void;
+
+ // Server actions
+ setServers: (servers: MCPServerConfig[]) => void;
+ addServer: (server: MCPServerConfig) => void;
+ updateServer: (serverId: string, updates: Partial<MCPServerConfig>) => void;
+ removeServer: (serverId: string) => void;
+
+ // Template actions
+ setTemplates: (templates: MCPServerTemplate[]) => void;
+
+ // Connection state actions
+ setConnectionStates: (states: Record<string, { status: MCPConnectionStatus; error?: string }>) => void;
+ updateConnectionState: (serverId: string, status: MCPConnectionStatus, error?: string) => void;
+
+ // Tool actions
+ setAvailableTools: (tools: MCPTool[]) => void;
+ addToolsFromServer: (serverId: string, tools: MCPTool[]) => void;
+ removeToolsFromServer: (serverId: string) => void;
+
+ // Result actions
+ addResult: (result: MCPDisplayResult) => void;
+ dismissResult: (resultId: string) => void;
+ pinResult: (resultId: string) => void;
+ clearResults: () => void;
+
+ // Pending calls actions
+ addPendingCall: (callId: string) => void;
+ removePendingCall: (callId: string) => void;
+
+ // Error actions
+ setError: (error: string | undefined) => void;
+
+ // Reset
+ reset: () => void;
+}
+
+// Initial State
+
+const initialState = {
+ servers: [] as MCPServerConfig[],
+ templates: [] as MCPServerTemplate[],
+ connectionStates: {} as Record<string, { status: MCPConnectionStatus; error?: string }>,
+ availableTools: [] as MCPTool[],
+ activeResults: [] as MCPDisplayResult[],
+ pendingCalls: new Set<string>(),
+ isInitialized: false,
+ autoTriggerEnabled: true,
+ customTriggerKeywords: [] as string[],
+ lastError: undefined,
+};
+
+// Store
+
+export const useMCPStore = create<MCPState>((set, get) => ({
+ ...initialState,
+
+ // Initialization
+ setInitialized: (value) => set({ isInitialized: value }),
+ setAutoTriggerEnabled: (value) => set({ autoTriggerEnabled: value }),
+ setCustomTriggerKeywords: (keywords) => set({ customTriggerKeywords: keywords }),
+
+ // Server management
+ setServers: (servers) => set({ servers }),
+
+ addServer: (server) => {
+ set((state) => ({
+ servers: [...state.servers, server],
+ }));
+ },
+
+ updateServer: (serverId, updates) => {
+ set((state) => ({
+ servers: state.servers.map((s) =>
+ s.id === serverId ? { ...s, ...updates } : s
+ ),
+ }));
+ },
+
+ removeServer: (serverId) => {
+ const { removeToolsFromServer } = get();
+ removeToolsFromServer(serverId);
+
+ set((state) => ({
+ servers: state.servers.filter((s) => s.id !== serverId),
+ connectionStates: Object.fromEntries(
+ Object.entries(state.connectionStates).filter(([id]) => id !== serverId)
+ ),
+ }));
+ },
+
+ // Templates
+ setTemplates: (templates) => set({ templates }),
+
+ // Connection states
+ setConnectionStates: (states) => set({ connectionStates: states }),
+
+ updateConnectionState: (serverId, status, error) => {
+ set((state) => ({
+ connectionStates: {
+ ...state.connectionStates,
+ [serverId]: { status, error },
+ },
+ }));
+ },
+
+ // Tools
+ setAvailableTools: (tools) => set({ availableTools: tools }),
+
+ addToolsFromServer: (serverId, tools) => {
+ set((state) => {
+ // Remove existing tools from this server, then add new ones
+ const existingTools = state.availableTools.filter((t) => t.serverId !== serverId);
+ return {
+ availableTools: [...existingTools, ...tools],
+ };
+ });
+ },
+
+ removeToolsFromServer: (serverId) => {
+ set((state) => ({
+ availableTools: state.availableTools.filter((t) => t.serverId !== serverId),
+ }));
+ },
+
+ // Results
+ addResult: (result) => {
+ set((state) => {
+ if (state.activeResults.some((existing) => existing.id === result.id)) {
+ return state;
+ }
+ return {
+ activeResults: [...state.activeResults, result],
+ };
+ });
+ },
+
+ dismissResult: (resultId) => {
+ set((state) => ({
+ activeResults: state.activeResults.map((r) =>
+ r.id === resultId ? { ...r, dismissed: true } : r
+ ),
+ }));
+ },
+
+ pinResult: (resultId) => {
+ set((state) => ({
+ activeResults: state.activeResults.map((r) =>
+ r.id === resultId ? { ...r, pinned: true } : r
+ ),
+ }));
+ },
+
+ clearResults: () => {
+ set({ activeResults: [] });
+ },
+
+ // Pending calls
+ addPendingCall: (callId) => {
+ set((state) => ({
+ pendingCalls: new Set([...state.pendingCalls, callId]),
+ }));
+ },
+
+ removePendingCall: (callId) => {
+ set((state) => {
+ const newPending = new Set(state.pendingCalls);
+ newPending.delete(callId);
+ return { pendingCalls: newPending };
+ });
+ },
+
+ // Errors
+ setError: (error) => set({ lastError: error }),
+
+ // Reset
+ reset: () => {
+ set({
+ ...initialState,
+ pendingCalls: new Set(),
+ });
+ },
+}));
+
+// Selectors (for optimized re-renders)
+
+export const selectServers = (state: MCPState) => state.servers;
+export const selectTemplates = (state: MCPState) => state.templates;
+export const selectConnectionStates = (state: MCPState) => state.connectionStates;
+export const selectAvailableTools = (state: MCPState) => state.availableTools;
+export const selectActiveResults = (state: MCPState) => state.activeResults;
+export const selectVisibleResults = (state: MCPState) =>
+ state.activeResults.filter((r) => !r.dismissed);
+export const selectPinnedResults = (state: MCPState) =>
+ state.activeResults.filter((r) => r.pinned && !r.dismissed);
+export const selectPendingCalls = (state: MCPState) => state.pendingCalls;
+export const selectIsInitialized = (state: MCPState) => state.isInitialized;
+export const selectAutoTriggerEnabled = (state: MCPState) => state.autoTriggerEnabled;
+export const selectCustomTriggerKeywords = (state: MCPState) => state.customTriggerKeywords;
+export const selectLastError = (state: MCPState) => state.lastError;
+
+// Computed selectors
+export const selectConnectedServerCount = (state: MCPState) =>
+ Object.values(state.connectionStates).filter((s) => s.status === 'connected').length;
+
+export const selectToolCount = (state: MCPState) => state.availableTools.length;
+
+export const selectServerById = (serverId: string) => (state: MCPState) =>
+ state.servers.find((s) => s.id === serverId);
+
+export const selectConnectionStateById = (serverId: string) => (state: MCPState) =>
+ state.connectionStates[serverId];
+
+export const selectToolsByServer = (serverId: string) => (state: MCPState) =>
+ state.availableTools.filter((t) => t.serverId === serverId);
diff --git a/src/renderer/stores/session.store.ts b/src/renderer/stores/session.store.ts
new file mode 100644
index 0000000..3babbee
--- /dev/null
+++ b/src/renderer/stores/session.store.ts
@@ -0,0 +1,121 @@
+import { create } from 'zustand';
+
+export type SessionStatus = 'idle' | 'starting' | 'recording' | 'stopping' | 'processing';
+
+interface StreamState {
+ microphone: boolean;
+ systemAudio: boolean;
+ screen: boolean;
+}
+
+interface SessionState {
+ status: SessionStatus;
+ sessionId: string | null;
+ sessionToken: string | null;
+ tokenExpiresAt: number | null;
+ startTime: number | null;
+ elapsedTime: number;
+ streams: StreamState;
+ error: string | null;
+
+ // Actions
+ setStatus: (status: SessionStatus) => void;
+ startSession: (sessionId: string, sessionToken: string, expiresAt: number) => void;
+ stopSession: () => void;
+ setSessionToken: (token: string, expiresAt: number) => void;
+ setElapsedTime: (time: number) => void;
+ toggleStream: (stream: keyof StreamState) => void;
+ setStreams: (streams: Partial<StreamState>) => void;
+ setError: (error: string | null) => void;
+ reset: () => void;
+ isTokenExpired: () => boolean;
+}
+
+const initialStreams: StreamState = {
+ microphone: true,
+ systemAudio: true,
+ screen: true,
+};
+
+export const useSessionStore = create<SessionState>((set, get) => ({
+ status: 'idle',
+ sessionId: null,
+ sessionToken: null,
+ tokenExpiresAt: null,
+ startTime: null,
+ elapsedTime: 0,
+ streams: initialStreams,
+ error: null,
+
+ setStatus: (status) => set({ status }),
+
+ startSession: (sessionId, sessionToken, expiresAt) => {
+ set({
+ status: 'recording',
+ sessionId,
+ sessionToken,
+ tokenExpiresAt: expiresAt,
+ startTime: Date.now(),
+ elapsedTime: 0,
+ error: null,
+ });
+ },
+
+ stopSession: () => {
+ set({
+ status: 'idle',
+ sessionId: null,
+ startTime: null,
+ elapsedTime: 0,
+ });
+ },
+
+ setSessionToken: (token, expiresAt) => {
+ set({
+ sessionToken: token,
+ tokenExpiresAt: expiresAt,
+ });
+ },
+
+ setElapsedTime: (time) => set({ elapsedTime: time }),
+
+ toggleStream: (stream) => {
+ const currentStreams = get().streams;
+ set({
+ streams: {
+ ...currentStreams,
+ [stream]: !currentStreams[stream],
+ },
+ });
+ },
+
+ setStreams: (streams) => {
+ set({
+ streams: {
+ ...get().streams,
+ ...streams,
+ },
+ });
+ },
+
+ setError: (error) => set({ error }),
+
+ reset: () => {
+ set({
+ status: 'idle',
+ sessionId: null,
+ startTime: null,
+ elapsedTime: 0,
+ streams: initialStreams,
+ error: null,
+ });
+ },
+
+ isTokenExpired: () => {
+ const { tokenExpiresAt } = get();
+ if (!tokenExpiresAt) return true;
+ // Consider expired if less than 5 minutes remaining
+ const bufferSeconds = 5 * 60;
+ return Date.now() / 1000 > tokenExpiresAt - bufferSeconds;
+ },
+}));
diff --git a/src/renderer/stores/transcription.store.ts b/src/renderer/stores/transcription.store.ts
new file mode 100644
index 0000000..b3194fe
--- /dev/null
+++ b/src/renderer/stores/transcription.store.ts
@@ -0,0 +1,77 @@
+import { create } from 'zustand';
+
+export interface TranscriptItem {
+ id: string;
+ text: string;
+ source: 'mic' | 'system_audio';
+ isFinal: boolean;
+ timestamp: number;
+}
+
+interface TranscriptionState {
+ items: TranscriptItem[];
+ enabled: boolean;
+ pendingMic: string;
+ pendingSystemAudio: string;
+
+ // Actions
+ addItem: (item: Omit<TranscriptItem, 'id' | 'timestamp'>) => void;
+ updatePending: (source: 'mic' | 'system_audio', text: string) => void;
+ finalizePending: (source: 'mic' | 'system_audio', text: string) => void;
+ setEnabled: (enabled: boolean) => void;
+ clear: () => void;
+}
+
+let itemIdCounter = 0;
+
+export const useTranscriptionStore = create<TranscriptionState>((set) => ({
+ items: [],
+ enabled: true,
+ pendingMic: '',
+ pendingSystemAudio: '',
+
+ addItem: (item) => {
+ const newItem: TranscriptItem = {
+ ...item,
+ id: `transcript-${++itemIdCounter}`,
+ timestamp: Date.now(),
+ };
+
+ set((state) => ({
+ items: [...state.items, newItem],
+ }));
+ },
+
+ updatePending: (source, text) => {
+ if (source === 'mic') {
+ set({ pendingMic: text });
+ } else {
+ set({ pendingSystemAudio: text });
+ }
+ },
+
+ finalizePending: (source, text) => {
+ const newItem: TranscriptItem = {
+ id: `transcript-${++itemIdCounter}`,
+ text,
+ source,
+ isFinal: true,
+ timestamp: Date.now(),
+ };
+
+ set((state) => ({
+ items: [...state.items, newItem],
+ ...(source === 'mic' ? { pendingMic: '' } : { pendingSystemAudio: '' }),
+ }));
+ },
+
+ setEnabled: (enabled) => set({ enabled }),
+
+ clear: () => {
+ set({
+ items: [],
+ pendingMic: '',
+ pendingSystemAudio: '',
+ });
+ },
+}));
diff --git a/src/renderer/styles/globals.css b/src/renderer/styles/globals.css
new file mode 100644
index 0000000..4308cee
--- /dev/null
+++ b/src/renderer/styles/globals.css
@@ -0,0 +1,105 @@
+@import url('https://fonts.googleapis.com/css2?family=Geist:[email protected]&family=Geist+Mono:[email protected]&display=swap');
+
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
+
+@layer base {
+ :root {
+ --background: 0 0% 100%;
+ --foreground: 222.2 84% 4.9%;
+ --card: 0 0% 100%;
+ --card-foreground: 222.2 84% 4.9%;
+ --popover: 0 0% 100%;
+ --popover-foreground: 222.2 84% 4.9%;
+ --primary: 221.2 83.2% 53.3%;
+ --primary-foreground: 210 40% 98%;
+ --secondary: 210 40% 96.1%;
+ --secondary-foreground: 222.2 47.4% 11.2%;
+ --muted: 210 40% 96.1%;
+ --muted-foreground: 215.4 16.3% 46.9%;
+ --accent: 210 40% 96.1%;
+ --accent-foreground: 222.2 47.4% 11.2%;
+ --destructive: 0 84.2% 60.2%;
+ --destructive-foreground: 210 40% 98%;
+ --border: 214.3 31.8% 91.4%;
+ --input: 214.3 31.8% 91.4%;
+ --ring: 221.2 83.2% 53.3%;
+ --radius: 0.5rem;
+ }
+
+ .dark {
+ --background: 222.2 84% 4.9%;
+ --foreground: 210 40% 98%;
+ --card: 222.2 84% 4.9%;
+ --card-foreground: 210 40% 98%;
+ --popover: 222.2 84% 4.9%;
+ --popover-foreground: 210 40% 98%;
+ --primary: 217.2 91.2% 59.8%;
+ --primary-foreground: 222.2 47.4% 11.2%;
+ --secondary: 217.2 32.6% 17.5%;
+ --secondary-foreground: 210 40% 98%;
+ --muted: 217.2 32.6% 17.5%;
+ --muted-foreground: 215 20.2% 65.1%;
+ --accent: 217.2 32.6% 17.5%;
+ --accent-foreground: 210 40% 98%;
+ --destructive: 0 62.8% 30.6%;
+ --destructive-foreground: 210 40% 98%;
+ --border: 217.2 32.6% 17.5%;
+ --input: 217.2 32.6% 17.5%;
+ --ring: 224.3 76.3% 48%;
+ }
+}
+
+@layer base {
+ * {
+ @apply border-border;
+ }
+
+ body {
+ @apply bg-background text-foreground font-sans;
+ font-feature-settings: "rlig" 1, "calt" 1;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ }
+}
+
+::-webkit-scrollbar {
+ width: 8px;
+ height: 8px;
+}
+
+::-webkit-scrollbar-track {
+ @apply bg-muted;
+}
+
+::-webkit-scrollbar-thumb {
+ @apply bg-muted-foreground/30 rounded-full;
+}
+
+::-webkit-scrollbar-thumb:hover {
+ @apply bg-muted-foreground/50;
+}
+
+.drag-region {
+ -webkit-app-region: drag;
+}
+
+.no-drag {
+ -webkit-app-region: no-drag;
+}
+
+@keyframes recording-pulse {
+ 0%, 100% {
+ opacity: 1;
+ transform: scale(1);
+ }
+ 50% {
+ opacity: 0.7;
+ transform: scale(1.1);
+ }
+}
+
+.recording-indicator {
+ animation: recording-pulse 1.5s ease-in-out infinite;
+}
diff --git a/src/shared/schemas/auth.schema.ts b/src/shared/schemas/auth.schema.ts
new file mode 100644
index 0000000..ec6b5d6
--- /dev/null
+++ b/src/shared/schemas/auth.schema.ts
@@ -0,0 +1,36 @@
+import { z } from 'zod';
+
+export const RegisterInputSchema = z.object({
+ name: z.string().min(1, 'Name is required'),
+ apiKey: z.string().min(1, 'API key is required'),
+});
+
+export const RegisterOutputSchema = z.object({
+ success: z.boolean(),
+ accessToken: z.string().optional(),
+ name: z.string().optional(),
+ error: z.string().optional(),
+});
+
+export const UserSchema = z.object({
+ id: z.number(),
+ name: z.string(),
+ apiKey: z.string(),
+ accessToken: z.string(),
+});
+
+export const SessionTokenSchema = z.object({
+ sessionToken: z.string(),
+ expiresIn: z.number(),
+ expiresAt: z.number(),
+});
+
+export const GenerateTokenInputSchema = z.object({
+ userId: z.string().optional(),
+});
+
+export type RegisterInput = z.infer<typeof RegisterInputSchema>;
+export type RegisterOutput = z.infer<typeof RegisterOutputSchema>;
+export type User = z.infer<typeof UserSchema>;
+export type SessionToken = z.infer<typeof SessionTokenSchema>;
+export type GenerateTokenInput = z.infer<typeof GenerateTokenInputSchema>;
diff --git a/src/shared/schemas/capture.schema.ts b/src/shared/schemas/capture.schema.ts
new file mode 100644
index 0000000..275b96b
--- /dev/null
+++ b/src/shared/schemas/capture.schema.ts
@@ -0,0 +1,55 @@
+import { z } from 'zod';
+
+export const CreateCaptureSessionInputSchema = z.object({
+ callbackUrl: z.string().optional(),
+ metadata: z.record(z.unknown()).optional(),
+ wsConnectionId: z.string().optional(),
+});
+
+export const CaptureSessionSchema = z.object({
+ sessionId: z.string(),
+ collectionId: z.string(),
+ endUserId: z.string(),
+ status: z.string(),
+ callbackUrl: z.string(),
+});
+
+export const StartTranscriptionInputSchema = z.object({
+ sessionId: z.string(),
+ micWsConnectionId: z.string().optional(),
+ sysAudioWsConnectionId: z.string().optional(),
+});
+
+export const StartTranscriptionOutputSchema = z.object({
+ status: z.string(),
+ sessionId: z.string(),
+ message: z.string(),
+});
+
+export const ChannelSchema = z.object({
+ channelId: z.string(),
+ type: z.enum(['audio', 'video']),
+ name: z.string().optional(),
+});
+
+export const CaptureConfigSchema = z.object({
+ sessionId: z.string(),
+ channels: z.array(z.object({
+ channelId: z.string(),
+ type: z.enum(['audio', 'video']),
+ record: z.boolean(),
+ transcript: z.boolean().optional(),
+ })).optional(),
+ streams: z.object({
+ microphone: z.boolean().optional(),
+ systemAudio: z.boolean().optional(),
+ screen: z.boolean().optional(),
+ }).optional(),
+});
+
+export type CreateCaptureSessionInput = z.infer<typeof CreateCaptureSessionInputSchema>;
+export type CaptureSession = z.infer<typeof CaptureSessionSchema>;
+export type StartTranscriptionInput = z.infer<typeof StartTranscriptionInputSchema>;
+export type StartTranscriptionOutput = z.infer<typeof StartTranscriptionOutputSchema>;
+export type Channel = z.infer<typeof ChannelSchema>;
+export type CaptureConfig = z.infer<typeof CaptureConfigSchema>;
diff --git a/src/shared/schemas/config.schema.ts b/src/shared/schemas/config.schema.ts
new file mode 100644
index 0000000..2583859
--- /dev/null
+++ b/src/shared/schemas/config.schema.ts
@@ -0,0 +1,30 @@
+import { z } from 'zod';
+
+export const AppConfigSchema = z.object({
+ accessToken: z.string().optional(),
+ userName: z.string().optional(),
+ apiKey: z.string().optional(),
+});
+
+export const RuntimeConfigSchema = z.object({
+ apiUrl: z.string().optional(),
+ webhookUrl: z.string().optional(),
+ apiPort: z.number().default(51731),
+});
+
+export const ServerConfigOutputSchema = z.object({
+ webhookUrl: z.string(),
+ apiPort: z.number(),
+ backendBaseUrl: z.string().optional(),
+});
+
+export const TunnelStatusSchema = z.object({
+ connected: z.boolean(),
+ url: z.string().optional(),
+ error: z.string().optional(),
+});
+
+export type AppConfig = z.infer<typeof AppConfigSchema>;
+export type RuntimeConfig = z.infer<typeof RuntimeConfigSchema>;
+export type ServerConfigOutput = z.infer<typeof ServerConfigOutputSchema>;
+export type TunnelStatus = z.infer<typeof TunnelStatusSchema>;
diff --git a/src/shared/schemas/index.ts b/src/shared/schemas/index.ts
new file mode 100644
index 0000000..c5eba56
--- /dev/null
+++ b/src/shared/schemas/index.ts
@@ -0,0 +1,5 @@
+export * from './auth.schema';
+export * from './config.schema';
+export * from './recording.schema';
+export * from './capture.schema';
+export * from './webhook.schema';
diff --git a/src/shared/schemas/recording.schema.ts b/src/shared/schemas/recording.schema.ts
new file mode 100644
index 0000000..411fd72
--- /dev/null
+++ b/src/shared/schemas/recording.schema.ts
@@ -0,0 +1,112 @@
+import { z } from 'zod';
+
+export const RecordingStatusSchema = z.enum(['recording', 'processing', 'available', 'failed']);
+export const InsightsStatusSchema = z.enum(['pending', 'processing', 'ready', 'failed']);
+
+// Copilot data schemas
+export const CallSummarySchema = z.object({
+ bullets: z.array(z.string()).optional(),
+ customerPain: z.array(z.string()).optional(),
+ customerGoals: z.array(z.string()).optional(),
+ objections: z.array(z.object({
+ type: z.string(),
+ text: z.string(),
+ response: z.string().optional(),
+ resolved: z.boolean().optional(),
+ })).optional(),
+ commitments: z.array(z.object({
+ who: z.enum(['me', 'them']),
+ commitment: z.string(),
+ })).optional(),
+ nextSteps: z.array(z.object({
+ action: z.string(),
+ owner: z.enum(['me', 'them', 'both']),
+ priority: z.enum(['high', 'medium', 'low']),
+ deadline: z.string().optional(),
+ })).optional(),
+ keyDecisions: z.array(z.string()).optional(),
+ riskFlags: z.array(z.string()).optional(),
+ generatedAt: z.number().optional(),
+}).nullable();
+
+export const PlaybookSnapshotSchema = z.object({
+ playbookId: z.string(),
+ playbookName: z.string(),
+ total: z.number(),
+ covered: z.number(),
+ partial: z.number(),
+ missing: z.number(),
+ coveragePercentage: z.number(),
+ items: z.array(z.object({
+ id: z.string(),
+ label: z.string(),
+ status: z.enum(['covered', 'partial', 'missing']),
+ evidence: z.string().optional(),
+ })).optional(),
+ recommendations: z.array(z.string()).optional(),
+}).nullable();
+
+export const MetricsSnapshotSchema = z.object({
+ talkRatio: z.object({
+ me: z.number(),
+ them: z.number(),
+ }),
+ pace: z.number(),
+ questionsAsked: z.number(),
+ monologueDetected: z.boolean(),
+ longestMonologue: z.number(),
+ totalDuration: z.number(),
+ callDuration: z.number(),
+ wordCount: z.object({
+ me: z.number(),
+ them: z.number(),
+ }),
+ segmentCount: z.object({
+ me: z.number(),
+ them: z.number(),
+ }),
+ averageSegmentLength: z.object({
+ me: z.number(),
+ them: z.number(),
+ }),
+ interruptionCount: z.number(),
+}).nullable();
+
+export const RecordingSchema = z.object({
+ id: z.number(),
+ videoId: z.string().nullable(),
+ streamUrl: z.string().nullable(),
+ playerUrl: z.string().nullable(),
+ sessionId: z.string(),
+ duration: z.number().nullable(),
+ createdAt: z.string(),
+ status: RecordingStatusSchema,
+ insights: z.string().nullable(),
+ insightsStatus: InsightsStatusSchema,
+ // Copilot data
+ callSummary: CallSummarySchema.optional(),
+ playbookSnapshot: PlaybookSnapshotSchema.optional(),
+ metricsSnapshot: MetricsSnapshotSchema.optional(),
+});
+
+export const CreateRecordingInputSchema = z.object({
+ sessionId: z.string(),
+});
+
+export const StopRecordingInputSchema = z.object({
+ sessionId: z.string(),
+});
+
+export const GetRecordingInputSchema = z.object({
+ recordingId: z.number(),
+});
+
+export type RecordingStatus = z.infer<typeof RecordingStatusSchema>;
+export type InsightsStatus = z.infer<typeof InsightsStatusSchema>;
+export type Recording = z.infer<typeof RecordingSchema>;
+export type CallSummary = z.infer<typeof CallSummarySchema>;
+export type PlaybookSnapshot = z.infer<typeof PlaybookSnapshotSchema>;
+export type MetricsSnapshot = z.infer<typeof MetricsSnapshotSchema>;
+export type CreateRecordingInput = z.infer<typeof CreateRecordingInputSchema>;
+export type StopRecordingInput = z.infer<typeof StopRecordingInputSchema>;
+export type GetRecordingInput = z.infer<typeof GetRecordingInputSchema>;
diff --git a/src/shared/schemas/webhook.schema.ts b/src/shared/schemas/webhook.schema.ts
new file mode 100644
index 0000000..ee0402c
--- /dev/null
+++ b/src/shared/schemas/webhook.schema.ts
@@ -0,0 +1,42 @@
+import { z } from 'zod';
+
+export const WebhookEventTypeSchema = z.enum([
+ 'capture_session.exported',
+ 'capture_session.active',
+ 'transcript.partial',
+ 'transcript.final',
+]);
+
+export const CaptureSessionExportedDataSchema = z.object({
+ video_id: z.string(),
+ stream_url: z.string().optional(),
+ player_url: z.string().optional(),
+ duration: z.number().optional(),
+});
+
+export const CaptureSessionActiveDataSchema = z.object({
+ rt_streams: z.array(z.object({
+ stream_id: z.string(),
+ type: z.string(),
+ })).optional(),
+});
+
+export const TranscriptDataSchema = z.object({
+ text: z.string(),
+ is_final: z.boolean().optional(),
+ source: z.string().optional(),
+ channel: z.string().optional(),
+});
+
+export const WebhookPayloadSchema = z.object({
+ event: z.string(),
+ capture_session_id: z.string().optional(),
+ data: z.record(z.unknown()).optional(),
+ timestamp: z.string().optional(),
+});
+
+export type WebhookEventType = z.infer<typeof WebhookEventTypeSchema>;
+export type CaptureSessionExportedData = z.infer<typeof CaptureSessionExportedDataSchema>;
+export type CaptureSessionActiveData = z.infer<typeof CaptureSessionActiveDataSchema>;
+export type TranscriptData = z.infer<typeof TranscriptDataSchema>;
+export type WebhookPayload = z.infer<typeof WebhookPayloadSchema>;
diff --git a/src/shared/types/api.types.ts b/src/shared/types/api.types.ts
new file mode 100644
index 0000000..f53b47b
--- /dev/null
+++ b/src/shared/types/api.types.ts
@@ -0,0 +1,29 @@
+import type { AppRouter } from '../../main/server/trpc/router';
+import type { inferRouterInputs, inferRouterOutputs } from '@trpc/server';
+
+export type RouterInput = inferRouterInputs<AppRouter>;
+export type RouterOutput = inferRouterOutputs<AppRouter>;
+
+export type AuthRegisterInput = RouterInput['auth']['register'];
+export type AuthRegisterOutput = RouterOutput['auth']['register'];
+
+export type ConfigGetOutput = RouterOutput['config']['get'];
+
+export type TokenGenerateInput = RouterInput['token']['generate'];
+export type TokenGenerateOutput = RouterOutput['token']['generate'];
+
+export type CaptureCreateSessionInput = RouterInput['capture']['createSession'];
+export type CaptureCreateSessionOutput = RouterOutput['capture']['createSession'];
+
+export type RecordingsListOutput = RouterOutput['recordings']['list'];
+export type RecordingsStartInput = RouterInput['recordings']['start'];
+export type RecordingsStartOutput = RouterOutput['recordings']['start'];
+export type RecordingsStopInput = RouterInput['recordings']['stop'];
+export type RecordingsStopOutput = RouterOutput['recordings']['stop'];
+export type RecordingsGetInput = RouterInput['recordings']['get'];
+export type RecordingsGetOutput = RouterOutput['recordings']['get'];
+
+export type TranscriptionStartInput = RouterInput['transcription']['start'];
+export type TranscriptionStartOutput = RouterOutput['transcription']['start'];
+
+export type TunnelStatusOutput = RouterOutput['tunnel']['status'];
diff --git a/src/shared/types/index.ts b/src/shared/types/index.ts
new file mode 100644
index 0000000..4aa11b8
--- /dev/null
+++ b/src/shared/types/index.ts
@@ -0,0 +1,2 @@
+export * from './ipc.types';
+export * from './api.types';
diff --git a/src/shared/types/ipc.types.ts b/src/shared/types/ipc.types.ts
new file mode 100644
index 0000000..952c637
--- /dev/null
+++ b/src/shared/types/ipc.types.ts
@@ -0,0 +1,265 @@
+import type { CaptureConfig, Channel } from '../schemas/capture.schema';
+
+export interface StartRecordingParams {
+ config: CaptureConfig;
+ sessionToken: string;
+ accessToken: string;
+ apiUrl?: string;
+ enableTranscription?: boolean;
+}
+
+export interface RecorderEvent {
+ event:
+ | 'recording:started'
+ | 'recording:stopped'
+ | 'recording:error'
+ | 'transcript'
+ | 'upload:progress'
+ | 'upload:complete'
+ | 'error';
+ data?: unknown;
+}
+
+export interface TranscriptEvent {
+ text: string;
+ isFinal: boolean;
+ source: 'mic' | 'system_audio';
+ start: number; // epoch seconds from WebSocket
+ end: number; // epoch seconds from WebSocket
+}
+
+export interface UploadProgressEvent {
+ progress: number;
+ total: number;
+}
+
+export interface PermissionStatus {
+ microphone: boolean;
+ screen: boolean;
+ accessibility: boolean;
+}
+
+export interface StartRecordingResult {
+ success: boolean;
+ sessionId?: string;
+ error?: string;
+ // WebSocket connection IDs for real-time transcription (like Python meeting-copilot)
+ micWsConnectionId?: string;
+ sysAudioWsConnectionId?: string;
+}
+
+export interface StopRecordingResult {
+ success: boolean;
+ error?: string;
+}
+
+// Copilot types
+export interface CopilotTranscriptSegment {
+ id: string;
+ recordingId: number;
+ sessionId: string;
+ channel: 'me' | 'them';
+ text: string;
+ startTime: number;
+ endTime: number;
+ isFinal: boolean;
+}
+
+export interface CopilotMetrics {
+ talkRatio: { me: number; them: number };
+ pace: number;
+ questionsAsked: number;
+ monologueDetected: boolean;
+ longestMonologue: number;
+ totalDuration: number;
+ callDuration: number;
+ wordCount: { me: number; them: number };
+ segmentCount: { me: number; them: number };
+}
+
+export interface CopilotSentiment {
+ current: 'positive' | 'neutral' | 'negative';
+ trend: 'improving' | 'stable' | 'declining';
+ averageScore: number;
+ history: Array<{ time: number; sentiment: string; text: string }>;
+}
+
+export interface CopilotNudge {
+ id: string;
+ type: string;
+ message: string;
+ severity: 'low' | 'medium' | 'high';
+ dismissible: boolean;
+ timestamp: number;
+ actionLabel?: string;
+ actionType?: string;
+}
+
+export interface CopilotCueCard {
+ triggerId: string;
+ id: string;
+ objectionType: string;
+ title: string;
+ talkTracks: string[];
+ followUpQuestions: string[];
+ proofPoints?: string[];
+ avoidSaying?: string[];
+ triggerText: string;
+ segmentId: string;
+ timestamp: number;
+ status: 'active' | 'pinned' | 'dismissed';
+ confidence: number;
+}
+
+export interface CopilotPlaybookItem {
+ id: string;
+ label: string;
+ description: string;
+ status: 'missing' | 'partial' | 'covered';
+ keywords: string[];
+ suggestedQuestions: string[];
+ evidence: Array<{ segmentId: string; timestamp: number; excerpt: string; confidence: number }>;
+}
+
+export interface CopilotPlaybookSnapshot {
+ playbookId: string;
+ playbookName: string;
+ covered: number;
+ partial: number;
+ missing: number;
+ total: number;
+ coveragePercentage: number;
+ items: CopilotPlaybookItem[];
+ recommendations: string[];
+}
+
+export interface CopilotCallSummary {
+ bullets: string[];
+ customerPain: string[];
+ customerGoals: string[];
+ objections: Array<{ type: string; text: string; response?: string; resolved: boolean; timestamp: number }>;
+ commitments: Array<{ who: 'me' | 'them'; commitment: string; timestamp: number }>;
+ nextSteps: Array<{ action: string; owner: 'me' | 'them' | 'both'; priority: string; deadline?: string }>;
+ keyDecisions: string[];
+ riskFlags: string[];
+ generatedAt: number;
+}
+
+export interface CopilotConfig {
+ enableTranscription: boolean;
+ enableMetrics: boolean;
+ enableSentiment: boolean;
+ enableNudges: boolean;
+ enableCueCards: boolean;
+ enablePlaybook: boolean;
+ playbookId?: string;
+ useLLMForDetection: boolean;
+}
+
+export interface IpcApi {
+ capture: {
+ startRecording: (params: StartRecordingParams) => Promise<StartRecordingResult>;
+ stopRecording: () => Promise<StopRecordingResult>;
+ pauseTracks: (tracks: string[]) => Promise<void>;
+ resumeTracks: (tracks: string[]) => Promise<void>;
+ listChannels: (sessionToken: string, apiUrl?: string) => Promise<Channel[]>;
+ };
+ permissions: {
+ checkMicPermission: () => Promise<boolean>;
+ checkScreenPermission: () => Promise<boolean>;
+ checkAccessibilityPermission: () => Promise<boolean>;
+ requestMicPermission: () => Promise<boolean>;
+ requestScreenPermission: () => Promise<boolean>;
+ openSystemSettings: (pane: string) => Promise<void>;
+ getStatus: () => Promise<PermissionStatus>;
+ };
+ app: {
+ getSettings: () => Promise<{
+ accessToken?: string;
+ userName?: string;
+ apiKey?: string;
+ apiUrl?: string;
+ webhookUrl?: string;
+ }>;
+ getServerPort: () => Promise<number>;
+ logout: () => Promise<void>;
+ openExternalLink: (url: string) => Promise<void>;
+ showNotification: (title: string, body: string) => Promise<void>;
+ openPlayerWindow: (url: string) => Promise<void>;
+ };
+ on: {
+ recorderEvent: (callback: (event: RecorderEvent) => void) => () => void;
+ authRequired: (callback: () => void) => () => void;
+ };
+ copilot: {
+ initialize: (apiKey: string) => Promise<{ success: boolean; error?: string }>;
+ startCall: (recordingId: number, sessionId: string) => Promise<{ success: boolean; error?: string }>;
+ endCall: () => Promise<{ success: boolean; summary?: CopilotCallSummary; error?: string }>;
+ sendTranscript: (channel: 'me' | 'them', data: { text: string; is_final: boolean; start: number; end: number }) => Promise<{ success: boolean; error?: string }>;
+ updateConfig: (config: Partial<CopilotConfig>) => Promise<{ success: boolean; error?: string }>;
+ getState: () => Promise<{ success: boolean; data?: any; error?: string }>;
+ dismissCueCard: (triggerId: string) => Promise<{ success: boolean; error?: string }>;
+ pinCueCard: (triggerId: string) => Promise<{ success: boolean; error?: string }>;
+ cueCardFeedback: (triggerId: string, feedback: 'helpful' | 'wrong' | 'irrelevant') => Promise<{ success: boolean; error?: string }>;
+ dismissNudge: (nudgeId: string) => Promise<{ success: boolean; error?: string }>;
+ getPlaybooks: () => Promise<{ success: boolean; playbooks?: any[]; error?: string }>;
+ getCueCards: () => Promise<{ success: boolean; cueCards?: any[]; error?: string }>;
+ createBookmark: (data: { recordingId: number; timestamp: number; category: string; note?: string }) => Promise<{ success: boolean; bookmark?: any; error?: string }>;
+ getBookmarks: (recordingId: number) => Promise<{ success: boolean; bookmarks?: any[]; error?: string }>;
+ };
+ copilotOn: {
+ onTranscript: (callback: (segment: CopilotTranscriptSegment) => void) => () => void;
+ onMetrics: (callback: (data: { metrics: CopilotMetrics; health: number }) => void) => () => void;
+ onSentiment: (callback: (data: { sentiment: CopilotSentiment }) => void) => () => void;
+ onNudge: (callback: (data: { nudge: CopilotNudge }) => void) => () => void;
+ onCueCard: (callback: (data: { cueCard: CopilotCueCard }) => void) => () => void;
+ onPlaybook: (callback: (data: { item: CopilotPlaybookItem; snapshot: CopilotPlaybookSnapshot }) => void) => () => void;
+ onCallEnded: (callback: (data: { summary: CopilotCallSummary; playbook?: CopilotPlaybookSnapshot; metrics: CopilotMetrics; duration: number }) => void) => () => void;
+ onError: (callback: (data: { error: string; context?: string }) => void) => () => void;
+ };
+ mcp: {
+ getServers: () => Promise<{ success: boolean; servers?: any[]; connectionStates?: Record<string, any>; error?: string }>;
+ getServer: (serverId: string) => Promise<{ success: boolean; server?: any; error?: string }>;
+ createServer: (request: any) => Promise<{ success: boolean; server?: any; error?: string }>;
+ updateServer: (serverId: string, request: any) => Promise<{ success: boolean; server?: any; error?: string }>;
+ deleteServer: (serverId: string) => Promise<{ success: boolean; error?: string }>;
+ connect: (serverId: string) => Promise<{ success: boolean; tools?: any[]; error?: string }>;
+ disconnect: (serverId: string) => Promise<{ success: boolean; error?: string }>;
+ testConnection: (serverId: string) => Promise<{ success: boolean; result?: any; error?: string }>;
+ getTools: () => Promise<{ success: boolean; tools?: any[]; error?: string }>;
+ executeTool: (serverId: string, toolName: string, input?: Record<string, unknown>) => Promise<{ success: boolean; result?: any; error?: string }>;
+ getTemplates: () => Promise<{ success: boolean; templates?: any[]; error?: string }>;
+ getTemplate: (templateId: string) => Promise<{ success: boolean; template?: any; error?: string }>;
+ getToolCalls: (recordingId: number) => Promise<{ success: boolean; calls?: any[]; error?: string }>;
+ dismissResult: (resultId: string) => Promise<{ success: boolean; error?: string }>;
+ pinResult: (resultId: string) => Promise<{ success: boolean; error?: string }>;
+ };
+ mcpOn: {
+ onResult: (callback: (data: { result: any }) => void) => () => void;
+ onError: (callback: (data: { serverId: string; toolName: string; error: string }) => void) => () => void;
+ onServerConnected: (callback: (data: { serverId: string; tools: any[] }) => void) => () => void;
+ onServerDisconnected: (callback: (data: { serverId: string; reason: string }) => void) => () => void;
+ onServerError: (callback: (data: { serverId: string; error: string }) => void) => () => void;
+ };
+}
+
+export type IpcChannel =
+ | 'recorder-start-recording'
+ | 'recorder-stop-recording'
+ | 'recorder-pause-tracks'
+ | 'recorder-resume-tracks'
+ | 'recorder-list-channels'
+ | 'check-mic-permission'
+ | 'check-screen-permission'
+ | 'check-accessibility-permission'
+ | 'request-mic-permission'
+ | 'request-screen-permission'
+ | 'open-system-settings'
+ | 'get-permission-status'
+ | 'get-settings'
+ | 'logout'
+ | 'open-external-link'
+ | 'show-notification'
+ | 'open-player-window'
+ | 'recorder-event'
+ | 'auth-required';
diff --git a/src/shared/types/mcp.types.ts b/src/shared/types/mcp.types.ts
new file mode 100644
index 0000000..502f8c2
--- /dev/null
+++ b/src/shared/types/mcp.types.ts
@@ -0,0 +1,279 @@
+/**
+ * MCP (Model Context Protocol) Types
+ * Shared types for MCP client integration
+ */
+
+// Transport types
+export type MCPTransport = 'stdio' | 'http';
+
+// Connection status
+export type MCPConnectionStatus = 'disconnected' | 'connecting' | 'connected' | 'error';
+
+// Trigger types for tool calls
+export type MCPTriggerType = 'intent' | 'manual' | 'test';
+
+// Tool call status
+export type MCPToolCallStatus = 'pending' | 'success' | 'error';
+
+/**
+ * MCP Server Configuration
+ * Used for creating and managing MCP server connections
+ */
+export interface MCPServerConfig {
+ id: string;
+ name: string;
+ transport: MCPTransport;
+
+ // For stdio transport
+ command?: string;
+ args?: string[];
+ env?: Record<string, string>;
+
+ // For HTTP/SSE transport
+ url?: string;
+ headers?: Record<string, string>;
+
+ // Metadata
+ templateId?: string;
+ isEnabled: boolean;
+ autoConnect: boolean;
+
+ // Connection state
+ connectionStatus: MCPConnectionStatus;
+ lastError?: string | null;
+ lastConnectedAt?: string | null;
+
+ // Timestamps
+ createdAt: string;
+ updatedAt: string;
+}
+
+/**
+ * MCP Tool Definition
+ * Describes a tool available from an MCP server
+ */
+export interface MCPTool {
+ name: string;
+ description?: string;
+ inputSchema?: {
+ type: 'object';
+ properties?: Record<string, MCPToolInputProperty>;
+ required?: string[];
+ };
+ serverId: string;
+ serverName: string;
+}
+
+export interface MCPToolInputProperty {
+ type: string;
+ description?: string;
+ enum?: string[];
+ default?: unknown;
+}
+
+/**
+ * MCP Tool Call Request
+ */
+export interface MCPToolCallRequest {
+ serverId: string;
+ toolName: string;
+ input?: Record<string, unknown>;
+ triggerType: MCPTriggerType;
+ recordingId?: number;
+}
+
+/**
+ * MCP Tool Call Result
+ */
+export interface MCPToolResult {
+ id: string;
+ serverId: string;
+ toolName: string;
+ status: MCPToolCallStatus;
+ result?: unknown;
+ error?: string;
+ durationMs?: number;
+ timestamp: string;
+}
+
+/**
+ * Display configuration for MCP results
+ */
+export type MCPDisplayType = 'cue-card' | 'panel' | 'modal' | 'toast';
+
+/**
+ * MCP Display Result
+ * Transformed tool result for UI rendering
+ */
+export interface MCPDisplayResult {
+ id: string;
+ toolCallId: string;
+ serverId: string;
+ serverName: string;
+ toolName: string;
+ displayType: MCPDisplayType;
+ title: string;
+ content: MCPDisplayContent;
+ timestamp: string;
+ dismissed?: boolean;
+ pinned?: boolean;
+}
+
+export interface MCPDisplayContent {
+ // For text content
+ text?: string;
+ markdown?: string;
+
+ // For structured data
+ items?: Array<{
+ label: string;
+ value: string;
+ type?: 'text' | 'link' | 'badge';
+ }>;
+
+ // For tabular data
+ table?: {
+ headers: string[];
+ rows: string[][];
+ };
+
+ // For key-value pairs
+ properties?: Record<string, string | number | boolean>;
+
+ // Raw data fallback
+ raw?: unknown;
+}
+
+/**
+ * MCP Server Template
+ * Pre-configured templates for common MCP servers
+ */
+export interface MCPServerTemplate {
+ id: string;
+ name: string;
+ description: string;
+ icon?: string;
+ transport: MCPTransport;
+
+ // Default configuration
+ defaultCommand?: string;
+ defaultArgs?: string[];
+ defaultUrl?: string;
+
+ // Required credentials
+ requiredEnvVars?: Array<{
+ key: string;
+ label: string;
+ description?: string;
+ placeholder?: string;
+ secret?: boolean;
+ }>;
+
+ requiredHeaders?: Array<{
+ key: string;
+ label: string;
+ description?: string;
+ placeholder?: string;
+ secret?: boolean;
+ }>;
+
+ // Documentation
+ docsUrl?: string;
+ setupInstructions?: string;
+}
+
+/**
+ * Intent detection result
+ * When transcript analysis suggests a tool should be called
+ */
+export interface MCPIntentDetection {
+ detected: boolean;
+ toolName?: string;
+ serverId?: string;
+ confidence: number;
+ reason?: string;
+ suggestedInput?: Record<string, unknown>;
+ triggerText?: string;
+}
+
+/**
+ * MCP Event types for EventEmitter
+ */
+export interface MCPEvents {
+ 'server-connected': { serverId: string; tools: MCPTool[] };
+ 'server-disconnected': { serverId: string; reason: string };
+ 'server-error': { serverId: string; error: string };
+ 'tool-call-started': { callId: string; serverId: string; toolName: string };
+ 'tool-call-completed': MCPToolResult;
+ 'tool-call-error': { callId: string; serverId: string; toolName: string; error: string };
+ 'intent-detected': MCPIntentDetection;
+}
+
+/**
+ * MCP Store State (for Zustand)
+ */
+export interface MCPState {
+ // Server management
+ servers: MCPServerConfig[];
+ templates: MCPServerTemplate[];
+
+ // Connection state
+ connectionStates: Record<string, MCPConnectionStatus>;
+
+ // Available tools (aggregated from all connected servers)
+ availableTools: MCPTool[];
+
+ // Active results to display
+ activeResults: MCPDisplayResult[];
+
+ // Pending tool calls
+ pendingCalls: Set<string>;
+
+ // Configuration
+ isInitialized: boolean;
+ autoTriggerEnabled: boolean;
+
+ // Error state
+ lastError?: string;
+}
+
+/**
+ * Create server request payload
+ */
+export interface CreateMCPServerRequest {
+ name: string;
+ transport: MCPTransport;
+ command?: string;
+ args?: string[];
+ env?: Record<string, string>;
+ url?: string;
+ headers?: Record<string, string>;
+ templateId?: string;
+ isEnabled?: boolean;
+ autoConnect?: boolean;
+}
+
+/**
+ * Update server request payload
+ */
+export interface UpdateMCPServerRequest {
+ name?: string;
+ command?: string;
+ args?: string[];
+ env?: Record<string, string>;
+ url?: string;
+ headers?: Record<string, string>;
+ isEnabled?: boolean;
+ autoConnect?: boolean;
+}
+
+/**
+ * Test connection result
+ */
+export interface MCPTestConnectionResult {
+ success: boolean;
+ serverId: string;
+ tools?: MCPTool[];
+ error?: string;
+ latencyMs?: number;
+}
diff --git a/src/types/global.d.ts b/src/types/global.d.ts
new file mode 100644
index 0000000..a0f7007
--- /dev/null
+++ b/src/types/global.d.ts
@@ -0,0 +1,9 @@
+import type { IpcApi } from '../shared/types/ipc.types';
+
+declare global {
+ interface Window {
+ electronAPI: IpcApi;
+ }
+}
+
+export {};
diff --git a/src/types/videodb.d.ts b/src/types/videodb.d.ts
new file mode 100644
index 0000000..0e4b41c
--- /dev/null
+++ b/src/types/videodb.d.ts
@@ -0,0 +1,214 @@
+declare module 'videodb' {
+ export interface ConnectionConfig {
+ apiKey?: string;
+ sessionToken?: string;
+ baseUrl?: string;
+ }
+
+ export interface CreateCaptureSessionOptions {
+ endUserId: string;
+ callbackUrl?: string;
+ metadata?: Record<string, unknown>;
+ wsConnectionId?: string;
+ }
+
+ export interface CaptureSession {
+ id: string;
+ collectionId: string;
+ status: string;
+ endUserId?: string;
+ callbackUrl?: string;
+ metadata?: Record<string, unknown>;
+ }
+
+ export interface Video {
+ id: string;
+ collectionId: string;
+ name: string;
+ streamUrl: string;
+ playerUrl: string;
+ length: string;
+ // Correct methods from SDK
+ indexSpokenWords(
+ languageCode?: string,
+ segmentationType?: string,
+ force?: boolean,
+ callbackUrl?: string
+ ): Promise<{ success: boolean; message?: string }>;
+ getTranscript(): Promise<Array<{ start: number; end: number; text: string }>>;
+ getTranscriptText(): Promise<string>;
+ generateStream(timeline?: Array<[number, number]>): Promise<string>;
+ generateThumbnail(time?: number): Promise<string>;
+ search(query: string, searchType?: string, indexType?: string): Promise<unknown>;
+ }
+
+ export interface Collection {
+ id: string;
+ createCaptureSession(options: CreateCaptureSessionOptions): Promise<CaptureSession>;
+ getVideo(videoId: string): Promise<Video>;
+ generateText(
+ prompt: string,
+ modelName?: 'basic' | 'pro' | 'ultra',
+ responseType?: 'text' | 'json'
+ ): Promise<string | Record<string, unknown>>;
+ }
+
+ export type RTStreamCategory =
+ | 'mic'
+ | 'mics'
+ | 'screen'
+ | 'displays'
+ | 'system_audio'
+ | 'cameras';
+
+ export class RTStream {
+ id: string;
+ name?: string;
+ collectionId?: string;
+ status?: string;
+ channelId?: string;
+ startTranscript(socketId?: string, engine?: string): Promise<Record<string, unknown>>;
+ stopTranscript(mode?: 'graceful' | 'force', engine?: string): Promise<Record<string, unknown>>;
+ getTranscript(config?: {
+ page?: number;
+ pageSize?: number;
+ start?: number;
+ end?: number;
+ since?: number;
+ engine?: string;
+ }): Promise<Record<string, unknown>>;
+ }
+
+ export class CaptureSessionFull {
+ id: string;
+ collectionId: string;
+ status?: string;
+ endUserId?: string;
+ callbackUrl?: string;
+ metadata?: Record<string, unknown>;
+ rtstreams: RTStream[];
+ refresh(): Promise<void>;
+ getRTStream(category: RTStreamCategory): RTStream[];
+ }
+
+ export class Connection {
+ getCollection(id?: string): Promise<Collection>;
+ getCollections(): Promise<Collection[]>;
+ generateClientToken(expiresIn?: number): Promise<string>;
+ createCaptureSession(config: CreateCaptureSessionOptions): Promise<CaptureSession>;
+ connectWebsocket(collectionId?: string): Promise<WebSocketConnection>;
+ getCaptureSession(sessionId: string, collectionId?: string): Promise<CaptureSessionFull>;
+ }
+
+ export function connect(config: ConnectionConfig): Connection;
+ export function connect(apiKey?: string, baseURL?: string): Connection;
+
+ // WebSocket types
+ export interface WebSocketMessage {
+ [key: string]: unknown;
+ }
+
+ export interface WebSocketStreamFilter {
+ channel?: string;
+ id?: string;
+ }
+
+ export class WebSocketConnection {
+ url: string;
+ connectionId?: string;
+ connect(): Promise<WebSocketConnection>;
+ close(): Promise<void>;
+ send(message: WebSocketMessage): Promise<void>;
+ onMessage(handler: (message: WebSocketMessage) => void): void;
+ onClose(handler: () => void): void;
+ onError(handler: (error: Error) => void): void;
+ get isConnected(): boolean;
+ receive(): AsyncGenerator<WebSocketMessage, void, unknown>;
+ stream(filter?: WebSocketStreamFilter): AsyncGenerator<WebSocketMessage, void, unknown>;
+ }
+}
+
+declare module 'videodb/capture' {
+ export interface CaptureClientOptions {
+ sessionToken: string;
+ apiUrl?: string;
+ dev?: boolean;
+ restartOnError?: boolean;
+ }
+
+ export interface BinaryChannel {
+ channelId: string;
+ type: 'audio' | 'video';
+ name: string;
+ isDefault?: boolean;
+ }
+
+ export class Channel {
+ id: string;
+ name: string;
+ type: 'audio' | 'video';
+ store: boolean;
+ pause(): Promise<void>;
+ resume(): Promise<void>;
+ toDict(): { channel_id: string; type: string; name: string; record: boolean; store: boolean };
+ }
+
+ export class AudioChannel extends Channel {}
+ export class VideoChannel extends Channel {}
+
+ export class ChannelList<T extends Channel> extends Array<T> {
+ get default(): T | undefined;
+ }
+
+ export class Channels {
+ mics: ChannelList<AudioChannel>;
+ displays: ChannelList<VideoChannel>;
+ systemAudio: ChannelList<AudioChannel>;
+ all(): Channel[];
+ }
+
+ export interface RecordingChannelConfig {
+ channelId: string;
+ type: 'audio' | 'video';
+ record?: boolean;
+ transcript?: boolean;
+ store?: boolean;
+ wsConnectionId?: string;
+ }
+
+ export interface StartSessionConfig {
+ sessionId: string;
+ channels: RecordingChannelConfig[];
+ }
+
+ export type TrackType = 'mic' | 'system_audio' | 'screen';
+ export type PermissionType = 'microphone' | 'screen_capture' | 'accessibility';
+ export type PermissionStatus = 'granted' | 'denied' | 'not_determined' | 'restricted';
+
+ export class CaptureClient {
+ constructor(options: CaptureClientOptions);
+ requestPermission(kind: PermissionType): Promise<PermissionStatus>;
+ listChannels(): Promise<Channels>;
+ startSession(config: StartSessionConfig): Promise<void>;
+ stopSession(): Promise<void>;
+ pauseTracks(tracks: TrackType[]): Promise<void>;
+ resumeTracks(tracks: TrackType[]): Promise<void>;
+ shutdown(): Promise<void>;
+ get initialized(): boolean;
+ get isCapturing(): boolean;
+ on(event: string, callback: (data?: unknown) => void): void;
+ emit(event: string, data?: unknown): boolean;
+ }
+
+ export class RecorderInstaller {
+ static isInstalled(): Promise<boolean>;
+ static install(): Promise<void>;
+ }
+
+ export class BinaryManager {
+ start(options: { sessionToken: string; apiUrl: string }): Promise<void>;
+ stop(): Promise<void>;
+ sendCommand<T>(command: string, params: Record<string, unknown>): Promise<T>;
+ on(event: string, callback: (data?: unknown) => void): void;
+ }
+}
diff --git a/tailwind.config.ts b/tailwind.config.ts
new file mode 100644
index 0000000..be4349f
--- /dev/null
+++ b/tailwind.config.ts
@@ -0,0 +1,76 @@
+import type { Config } from 'tailwindcss';
+
+const config: Config = {
+ darkMode: ['class'],
+ content: ['./src/renderer/**/*.{ts,tsx}'],
+ theme: {
+ extend: {
+ fontFamily: {
+ sans: ['Geist', 'ui-sans-serif', 'system-ui', 'sans-serif'],
+ mono: ['Geist Mono', 'ui-monospace', 'monospace'],
+ },
+ colors: {
+ border: 'hsl(var(--border))',
+ input: 'hsl(var(--input))',
+ ring: 'hsl(var(--ring))',
+ background: 'hsl(var(--background))',
+ foreground: 'hsl(var(--foreground))',
+ primary: {
+ DEFAULT: 'hsl(var(--primary))',
+ foreground: 'hsl(var(--primary-foreground))',
+ },
+ secondary: {
+ DEFAULT: 'hsl(var(--secondary))',
+ foreground: 'hsl(var(--secondary-foreground))',
+ },
+ destructive: {
+ DEFAULT: 'hsl(var(--destructive))',
+ foreground: 'hsl(var(--destructive-foreground))',
+ },
+ muted: {
+ DEFAULT: 'hsl(var(--muted))',
+ foreground: 'hsl(var(--muted-foreground))',
+ },
+ accent: {
+ DEFAULT: 'hsl(var(--accent))',
+ foreground: 'hsl(var(--accent-foreground))',
+ },
+ popover: {
+ DEFAULT: 'hsl(var(--popover))',
+ foreground: 'hsl(var(--popover-foreground))',
+ },
+ card: {
+ DEFAULT: 'hsl(var(--card))',
+ foreground: 'hsl(var(--card-foreground))',
+ },
+ },
+ borderRadius: {
+ lg: 'var(--radius)',
+ md: 'calc(var(--radius) - 2px)',
+ sm: 'calc(var(--radius) - 4px)',
+ },
+ keyframes: {
+ 'accordion-down': {
+ from: { height: '0' },
+ to: { height: 'var(--radix-accordion-content-height)' },
+ },
+ 'accordion-up': {
+ from: { height: 'var(--radix-accordion-content-height)' },
+ to: { height: '0' },
+ },
+ pulse: {
+ '0%, 100%': { opacity: '1' },
+ '50%': { opacity: '0.5' },
+ },
+ },
+ animation: {
+ 'accordion-down': 'accordion-down 0.2s ease-out',
+ 'accordion-up': 'accordion-up 0.2s ease-out',
+ pulse: 'pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite',
+ },
+ },
+ },
+ plugins: [require('tailwindcss-animate')],
+};
+
+export default config;
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..069e9a7
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,23 @@
+{
+ "compilerOptions": {
+ "target": "ES2022",
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
+ "module": "ESNext",
+ "moduleResolution": "bundler",
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "esModuleInterop": true,
+ "strict": true,
+ "skipLibCheck": true,
+ "noEmit": true,
+ "jsx": "react-jsx",
+ "baseUrl": ".",
+ "paths": {
+ "@shared/*": ["src/shared/*"],
+ "@main/*": ["src/main/*"],
+ "@renderer/*": ["src/renderer/*"]
+ }
+ },
+ "include": ["src/renderer/**/*", "src/shared/**/*", "src/types/**/*"],
+ "exclude": ["node_modules", "dist"]
+}
diff --git a/tsconfig.node.json b/tsconfig.node.json
new file mode 100644
index 0000000..e918170
--- /dev/null
+++ b/tsconfig.node.json
@@ -0,0 +1,24 @@
+{
+ "compilerOptions": {
+ "target": "ES2022",
+ "lib": ["ES2022"],
+ "module": "CommonJS",
+ "moduleResolution": "node",
+ "resolveJsonModule": true,
+ "esModuleInterop": true,
+ "strict": true,
+ "skipLibCheck": true,
+ "outDir": "dist",
+ "rootDir": "src",
+ "declaration": true,
+ "declarationMap": true,
+ "sourceMap": true,
+ "baseUrl": ".",
+ "paths": {
+ "@shared/*": ["src/shared/*"],
+ "@main/*": ["src/main/*"]
+ }
+ },
+ "include": ["src/main/**/*", "src/preload/**/*", "src/shared/**/*", "src/types/**/*"],
+ "exclude": ["node_modules", "dist", "src/renderer"]
+}
diff --git a/vite.config.ts b/vite.config.ts
new file mode 100644
index 0000000..71a1e83
--- /dev/null
+++ b/vite.config.ts
@@ -0,0 +1,24 @@
+import { defineConfig } from 'vite';
+import react from '@vitejs/plugin-react';
+import path from 'path';
+
+export default defineConfig({
+ plugins: [react()],
+ root: 'src/renderer',
+ base: './',
+ build: {
+ outDir: '../../dist/renderer',
+ emptyOutDir: true,
+ sourcemap: true,
+ },
+ resolve: {
+ alias: {
+ '@shared': path.resolve(__dirname, 'src/shared'),
+ '@renderer': path.resolve(__dirname, 'src/renderer'),
+ },
+ },
+ server: {
+ port: 51730,
+ strictPort: false, // Will find next available port if busy
+ },
+});