diff --git a/.claude/mod0-release-sync.skill b/.claude/mod0-release-sync.skill new file mode 100644 index 0000000..709252f Binary files /dev/null and b/.claude/mod0-release-sync.skill differ diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..56f3b6b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..a9d9b27 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +* text=auto eol=lf +*.bmp binary +*.png binary +*.ico binary +*.icns binary diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..99d4c26 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @Luke1606 diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml deleted file mode 100644 index 83aa0ba..0000000 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Bug Report -description: Reporta un error en Mod0. -title: "[BUG]: " -body: - - type: textarea - attributes: - label: Descripción - description: ¿Qué está fallando? - validations: - required: true - - type: dropdown - attributes: - label: Sistema Operativo - options: - - Windows - - macOS - - Linux - - type: textarea - attributes: - label: Pasos para reproducir - placeholder: | - 1. Abrir carpeta... - 2. Click en... - 3. El IDE se cierra. - - type: textarea - attributes: - label: Logs / Errores - description: Pega aquí la salida / respuesta. - render: shell diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..4fe9429 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,43 @@ +name: Reportar un error +description: Algo no funciona como debería +labels: [bug] +body: + - type: textarea + id: what + attributes: + label: ¿Qué pasó? + description: Describe el problema y lo que esperabas que ocurriera. + validations: + required: true + - type: textarea + id: steps + attributes: + label: Pasos para reproducirlo + placeholder: | + 1. Abrir el proyecto… + 2. Lanzar una sesión con… + 3. … + validations: + required: true + - type: dropdown + id: os + attributes: + label: Sistema operativo + options: [Windows, macOS, Linux] + validations: + required: true + - type: input + id: version + attributes: + label: Versión de MOD0 + description: Ajustes → Acerca de. + - type: input + id: cli + attributes: + label: CLI y versión + description: Por ejemplo, Claude Code 2.x. Indica si el perfil usa hooks. + - type: textarea + id: logs + attributes: + label: Registros o capturas + description: Salida de `npm run tauri dev` o una captura de pantalla (sin claves ni datos privados). diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 7f5babf..149988f 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: - - name: Documentación Mod0 - url: https://github.com/ModusZero/Mod0/wiki - about: Revisa la doc antes de crear un issue. + - name: Preguntas y conversación + url: https://github.com/moduszero/mod0/discussions + about: Para dudas de uso o ideas abiertas, usa las discusiones. diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml deleted file mode 100644 index 3c3a48a..0000000 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Feature Request -description: Propón una mejora o nueva función. -title: "[FEAT]: " -body: - - type: textarea - attributes: - label: ¿Qué quieres lograr? - description: Describe la funcionalidad. - validations: - required: true - - type: textarea - attributes: - label: Notas de Implementación - description: ¿Alguna idea de cómo hacerlo? diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..5310ce9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,19 @@ +name: Proponer una mejora +description: Una idea para el flujo de trabajo con sesiones de CLI +labels: [enhancement] +body: + - type: textarea + id: problem + attributes: + label: ¿Qué problema de tu flujo resuelve? + description: MOD0 optimiza un flujo concreto (muchas sesiones en paralelo). Cuéntalo desde ahí. + validations: + required: true + - type: textarea + id: proposal + attributes: + label: ¿Cómo lo imaginas? + - type: textarea + id: alternatives + attributes: + label: Alternativas consideradas diff --git a/.github/ISSUE_TEMPLATE/task.yml b/.github/ISSUE_TEMPLATE/task.yml deleted file mode 100644 index 7052ef6..0000000 --- a/.github/ISSUE_TEMPLATE/task.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Task Item -description: Implementación de lógica o componentes. -title: "[TASK]: " -labels: ["backlog", "development"] -body: - - type: checkboxes - id: milestone - attributes: - label: Milestone Relacionado - options: - - label: M1 Code Editor - - label: M2 UI Features - - label: M3 AI Bridge - - label: M4 MCP Bridge - - label: M5 Refining and FoodDogging - - type: textarea - id: description - attributes: - label: Descripción del Objetivo - placeholder: ¿Qué es exactamente lo que vamos a construir? - validations: - required: true - - type: textarea - id: rust-tasks - attributes: - label: Implementación Rust (Backend) - placeholder: Lista de comandos Tauri, structs o módulos necesarios. - - type: textarea - id: svelte-tasks - attributes: - label: Implementación Svelte (Frontend) - placeholder: Runes, componentes o estilos CSS. - - type: input - id: test-plan - attributes: - label: Plan de Pruebas - placeholder: ¿Cómo sabemos que funciona? diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ab58c5d --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,20 @@ +## Qué cambia + + + +## Por qué + + + +## Cómo se probó + +- [ ] `npm run lint` y `npm run check` +- [ ] `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings` y `cargo test` en `src-tauri` +- [ ] Probado a mano con `npm run tauri dev` (indica con qué CLI y sistema operativo) + +## Checklist + +- [ ] Sigo el estilo del proyecto (Prettier 110 columnas, 4 espacios, `#lib/`, runes `*.svelte.ts`) +- [ ] Textos nuevos en `es.json` **y** `en.json` +- [ ] Actualicé `docs/PLAN.md` (y `docs/CONTEXT.md` si cambia la arquitectura) y el `CHANGELOG.md` +- [ ] Si cambia la interfaz: adjunto captura (`scripts/capture-screenshots.py`) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fabf6bb..73ca08d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,12 +1,24 @@ version: 2 updates: - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "weekly" - open-pull-requests-limit: 5 + - package-ecosystem: npm + directory: / + schedule: + interval: weekly + groups: + frontend: + patterns: ['*'] + open-pull-requests-limit: 5 - - package-ecosystem: "cargo" - directory: "/src-tauri" - schedule: - interval: "weekly" \ No newline at end of file + - package-ecosystem: cargo + directory: /src-tauri + schedule: + interval: weekly + groups: + rust: + patterns: ['*'] + open-pull-requests-limit: 5 + + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly diff --git a/.github/workflows/auto-assign.yml b/.github/workflows/auto-assign.yml deleted file mode 100644 index 6a8f381..0000000 --- a/.github/workflows/auto-assign.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Auto Assign -on: - issues: - types: [opened] - pull_request: - types: [opened] -jobs: - run: - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - name: 'Auto-assign issue' - uses: pozil/auto-assign-issue@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - assignees: Luke1606 - numOfAssignee: 1 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml deleted file mode 100644 index b8a3d90..0000000 --- a/.github/workflows/check.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: "Code Quality" - -on: [pull_request] - -jobs: - lint-frontend: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm install - - run: npm run check - - lint-rust: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - components: clippy, rustfmt - - name: Rust Check - run: | - cd src-tauri - cargo fmt --all -- --check - cargo clippy -- -D warnings \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..18183fc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,66 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + frontend: + name: Frontend (formato, tipos, build) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v5 + with: + node-version: '24' + cache: npm + - run: npm ci + - run: npm run lint + - run: npm run check + - run: npm run build + + backend: + name: Backend Rust (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + steps: + - uses: actions/checkout@v5 + + - name: Dependencias de Tauri (Linux) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev + + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + - uses: Swatinem/rust-cache@v2 + with: + workspaces: src-tauri + + # Tauri exige que exista la carpeta del frontend al compilar. + - name: Carpeta de frontend vacía + shell: bash + run: mkdir -p build && touch build/index.html + + - name: Formato + working-directory: src-tauri + run: cargo fmt --check + - name: Clippy + working-directory: src-tauri + run: cargo clippy --all-targets -- -D warnings + - name: Pruebas + working-directory: src-tauri + run: cargo test diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 0a5841c..0000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: "Security Scan" - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - schedule: - - cron: '0 0 * * 1' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'javascript-typescript', 'rust' ] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - # Se usa 'autobuild' para JS, pero para Rust es mejor compilar manual - queries: security-extended,security-and-quality - - # Instalamos dependencias de sistema para que Rust pueda compilar en Ubuntu - - if: matrix.language == 'rust' - run: | - sudo apt-get update - sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev - - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d86e0fa..895d20e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,68 +1,79 @@ -name: "Build & Release" +name: Release +# Se publica un borrador de release al subir una etiqueta `vX.Y.Z`. on: - push: - branches: [ "**" ] # Cualquier rama genera binarios de prueba - tags: - - 'v*' # Solo los tags generan la Release oficial - pull_request: # Los PRs también se prueban + push: + tags: ['v*'] + workflow_dispatch: -jobs: - build-and-release: - permissions: - contents: write - strategy: - fail-fast: false - matrix: - include: - - platform: "macos-latest" - - platform: "ubuntu-22.04" - - platform: "windows-latest" - - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v4 +permissions: + contents: write - - name: setup node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'npm' +jobs: + verify-version: + name: Versión coherente con la etiqueta + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: Comparar etiqueta, package.json, Cargo.toml y tauri.conf.json + if: startsWith(github.ref, 'refs/tags/v') + run: | + tag="${GITHUB_REF_NAME#v}" + pkg=$(node -p "require('./package.json').version") + cargo=$(grep -m1 '^version' src-tauri/Cargo.toml | cut -d'"' -f2) + tauri=$(node -p "require('./src-tauri/tauri.conf.json').version") + echo "tag=$tag package=$pkg cargo=$cargo tauri=$tauri" + [ "$tag" = "$pkg" ] && [ "$tag" = "$cargo" ] && [ "$tag" = "$tauri" ] - - name: install Rust stable - uses: dtolnay/rust-toolchain@stable + publish: + name: Compilar (${{ matrix.label }}) + needs: verify-version + strategy: + fail-fast: false + matrix: + include: + - label: Windows + os: windows-latest + args: --bundles nsis + - label: macOS (Apple Silicon) + os: macos-latest + args: --target aarch64-apple-darwin --bundles dmg + - label: macOS (Intel) + os: macos-latest + args: --target x86_64-apple-darwin --bundles dmg + - label: Linux + os: ubuntu-22.04 + args: --bundles appimage,deb + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v5 - - name: install dependencies (ubuntu only) - if: matrix.platform == 'ubuntu-22.04' - run: | - sudo apt-get update - sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf + - name: Dependencias de Tauri (Linux) + if: matrix.os == 'ubuntu-22.04' + run: | + sudo apt-get update + sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev - - name: install frontend dependencies - run: npm install + - uses: actions/setup-node@v5 + with: + node-version: '24' + cache: npm + - uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ startsWith(matrix.os, 'macos') && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} + - uses: Swatinem/rust-cache@v2 + with: + workspaces: src-tauri - # Construir la app - # Si es un tag, tauri-action intentará crear la release. - # Si no es un tag, simplemente compilará los binarios. - - name: tauri build - uses: tauri-apps/tauri-action@v0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tagName: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || '' }} - releaseName: "MOD0 Release ${{ github.ref_name }}" - releaseDraft: true - prerelease: false + - run: npm ci - # Subir Artifacts (en cada push a cualquier rama obtener los .exe, .dmg, etc) - - name: upload test artifacts - uses: actions/upload-artifact@v4 - with: - name: MOD0-Test-Build-${{ matrix.platform }} - path: | - src-tauri/target/release/bundle/msi/*.msi - src-tauri/target/release/bundle/setup.exe - src-tauri/target/release/bundle/dmg/*.dmg - src-tauri/target/release/bundle/deb/*.deb - src-tauri/target/release/bundle/appimage/*.AppImage - retention-days: 5 # Los builds de prueba se borran en 5 días para no llenar la cuota \ No newline at end of file + - uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tagName: ${{ github.ref_name }} + releaseName: 'MOD0 ${{ github.ref_name }}' + releaseBody: 'Consulta el CHANGELOG para ver los cambios. Los instaladores no están firmados: Windows y macOS pueden mostrar una advertencia la primera vez.' + releaseDraft: true + prerelease: false + args: ${{ matrix.args }} diff --git a/.gitignore b/.gitignore index 51ff375..22a8be2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,24 @@ -# Wiki Repo Docs -/docs - +# Dependencias y salidas de build node_modules -debug -target /build -/package -/.vscode /.svelte-kit - -**/mutants.out*/ -**/*.rs.bk -*.pdb - -.DS_Store - +/package .env .env.* !.env.example - vite.config.js.timestamp-* vite.config.ts.timestamp-* + +# Sistema operativo / editores +.DS_Store +Thumbs.db +.idea +.vscode/* +!.vscode/extensions.json + +# Rust / Tauri +/src-tauri/target +/src-tauri/gen/schemas + +# Datos locales +*.log diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..25a3db4 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,9 @@ +build +.svelte-kit +node_modules +package-lock.json +src-tauri/target +src-tauri/gen +src-tauri/icons +src-tauri/Cargo.lock +static diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..998e95c --- /dev/null +++ b/.prettierrc @@ -0,0 +1,12 @@ +{ + "semi": true, + "singleQuote": true, + "trailingComma": "all", + "printWidth": 110, + "tabWidth": 4, + "useTabs": false, + "endOfLine": "lf", + "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], + "tailwindStylesheet": "./src/app.css", + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..4ef01b0 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": [] +} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..be1a6e6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,56 @@ +# Changelog + +Formato basado en [Keep a Changelog](https://keepachangelog.com/es-ES/1.1.0/) y versionado semántico. + +## [0.3.0] - 2026-11-16 + +"Cualquier CLI": proveedores, plan de la sesión y un mapa del proyecto explorable. + +### Añadido + +- **Perfiles**: plantillas para Claude Code con OpenRouter, Z.ai, Qwen/DashScope, DeepSeek o endpoint propio, y para + Aider, OpenCode, Qwen Code, Codex, Gemini y un Codespace remoto (`gh`). Comprobación de que la CLI está instalada y de + las variables de entorno definidas. Valores `$NOMBRE` leídos del entorno del sistema (las claves no se guardan). +- **Thinking Graph como diagrama** de fases con flechas y reintentos (además de la cronología) y **plan** de la sesión + (`TodoWrite`) con progreso en la tarjeta y en la barra lateral. +- **Mapa del proyecto expandible**: abre carpetas hasta archivos con doble clic o con el control de nivel; resalta los + archivos cambiados (M/A/U/D) y calcula el **impacto** (qué depende de lo que cambió la sesión). +- **Árbol de archivos** con letras M/A/U/D y marca de carpetas con cambios de la sesión enfocada. +- **Revisión** con lista plana o árbol por carpetas; selección automática del primer archivo. +- Guardado automático opcional del editor (pendiente de la configuración antigua). +- Documentación para personas en `docs/` (guías, primeros pasos, proveedores, problemas típicos), `llms.txt`. +- Configuración de Cargo para conexiones lentas (`src-tauri/.cargo/config.toml`). + +### Cambiado + +- Paquetes npm de Tauri fijados a la misma versión menor que los crates (`~2.11`), para evitar el aviso de versiones + desalineadas. +- `fs_graph` recibe las carpetas expandidas en vez de una profundidad. +- Hoja de ruta: 0.3 Cualquier CLI · 0.4 Triggers · 0.5 Insight · 0.6 Remoto y conectores. + +## [0.2.0] - 2026-11-10 + +Reescritura completa: de IDE genérico y comercial a **mission control** para el flujo personal de trabajo con +sesiones de CLI con IA en paralelo. + +### Añadido + +- Sesiones con terminal real (PTY, `portable-pty`), perfiles de CLI (BYOK/IA local por variables de entorno), + worktrees aislados, reanudación (`--resume`) y persistencia entre reinicios. +- Observación sin tokens de Claude Code: hooks HTTP locales + lectura incremental del transcript. +- Mission Control, panel de atención, Thinking Graph, grafo de dependencias del proyecto, revisión con diff y commit, + Kanban ligado a sesiones, editor CodeMirror 6, paleta de comandos y atajos. +- Avisos de escritorio y webhooks (plantillas ntfy, Telegram, WhatsApp/CallMeBot, JSON). +- Interfaz en español e inglés; temas oscuro/claro con acento configurable y baja fatiga visual. +- Instalador NSIS moderno (modo usuario, imágenes de marca) en lugar de MSI. +- Documentación (`docs/CONTEXT.md`, `docs/PLAN.md`), CI/CD, plantillas de GitHub y guía de contribución. + +### Cambiado + +- Stack actualizado: SvelteKit 3 (configuración en el plugin de Vite, `#lib/` en vez de `$lib/`), Vite 8, + TypeScript 6, Tailwind 4 con `@tailwindcss/vite`, `@lucide/svelte`, xterm 6, Tauri 2. + +### Eliminado + +- Chat, artefactos, contexto, workflow, plugins, LSP, SQLite/sqlx y el sistema de extensiones: la CLI ya cubre esas + funciones y el IDE era un envoltorio comercial genérico que no compilaba. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..fde0b87 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,85 @@ +# Contribuir a MOD0 + +Gracias por el interés. MOD0 es una herramienta personal con un objetivo claro: **optimizar el flujo de trabajo con +muchas sesiones de CLI con IA en paralelo**. Las contribuciones que encajan con eso son bienvenidas; si dudas, abre +primero un issue o una discusión. + +## Entorno + +Requisitos: Node.js 22+, Rust 1.85+, `git` y los [requisitos de Tauri](https://v2.tauri.app/start/prerequisites/). + +```bash +npm install +npm run tauri dev # app completa (frontend + backend) +npm run dev # solo frontend (necesita el backend de Tauri para funcionar; ver "Capturas") +``` + +| Comando | Qué hace | +| -------------------------------------------------------------------------- | ------------------------------- | +| `npm run lint` | Comprueba el formato (Prettier) | +| `npm run format` | Aplica el formato | +| `npm run check` | Tipos y a11y con `svelte-check` | +| `npm run build` | Build del frontend (`build/`) | +| `cargo fmt` / `cargo clippy --all-targets` / `cargo test` (en `src-tauri`) | Formato, lint y pruebas de Rust | + +La CI ejecuta todo lo anterior; un PR debe pasarlo. + +## Estilo de código + +El formato lo imponen las herramientas, no la memoria: + +- **Prettier**: punto y coma, comillas simples, comas finales, **110 columnas**, **4 espacios** (`.prettierrc` y + `.editorconfig`). Los saltos de línea al pasar el ancho los decide Prettier: ejecuta `npm run format`. +- **rustfmt**: `max_width = 110`, 4 espacios (`src-tauri/rustfmt.toml`). +- Fin de línea `lf` (`.gitattributes` lo fuerza aunque trabajes en Windows). +- Comentarios y textos de interfaz en **español**; identificadores y mensajes de commit en inglés o español, con + coherencia dentro del archivo. Los comentarios explican el _porqué_, no el _qué_. + +### Organización + +- **Frontend** (`src/lib`): `core/` (types, constants, runes, services, registry, i18n, utils) · `components/` + (common, layout) · `features/` (funcionalidades y `system-atoms/` con las piezas de cada pantalla) · `systems/` + (una carpeta por sección → actividad, con `XMainSpace.svelte` y `XSidebar.svelte`). +- El estado vive en clases con runes (`*.svelte.ts`) exportadas como singletons (`sessionsStack`, `filesStack`…). +- Los imports internos usan `#lib/…` (subpath imports de SvelteKit 3; el alias `$lib` está deprecado). +- **Backend** (`src-tauri/src`): `commands/` es solo el puente IPC; la lógica vive en `features/`. Los comandos son + `async` y mandan el trabajo bloqueante a `infrastructure::process::blocking`. +- Textos nuevos: `src/lib/core/i18n/locales/es.json` **y** `en.json` (claves planas con puntos). + +## Añadir un comando IPC + +1. Función en `src-tauri/src/commands/<área>.rs` con `#[tauri::command]` y `AppResult`. +2. Registrarla en `tauri::generate_handler![…]` de `src-tauri/src/lib.rs`. +3. Tipos en `src/lib/core/types/` (los structs de Rust usan `camelCase` con serde). +4. Método en el servicio correspondiente de `src/lib/core/services/`. +5. Prueba unitaria en Rust si hay lógica no trivial (parsers, reductores de estado, grafos). + +## Actualizar Tauri + +Los paquetes npm y los crates deben coincidir en versión mayor y menor (si no, `tauri dev` avisa de «versiones +desalineadas»). Actualiza ambos a la vez; el detalle está en [docs/guide/troubleshooting.md](docs/guide/troubleshooting.md). + +## Capturas de pantalla reproducibles + +`scripts/mock-tauri.js` simula el backend de Tauri para ver la interfaz en un navegador. Con él, +`scripts/capture-screenshots.py` genera las capturas del README y del landing: + +```bash +pip install playwright && playwright install chromium +npm run build +python scripts/capture-screenshots.py docs/screenshots es,en +``` + +## Commits y PR + +- Commits pequeños, con [Conventional Commits](https://www.conventionalcommits.org/es/) (`feat:`, `fix:`, `docs:`…). +- Rellena la plantilla del PR. Si cambias la interfaz, adjunta una captura. +- Actualiza `docs/PLAN.md` (tareas y registro de releases) y el `CHANGELOG.md`. Si cambia la arquitectura, también + `docs/CONTEXT.md`. + +## Publicar una versión + +1. Sube la versión en `package.json`, `src-tauri/Cargo.toml` y `src-tauri/tauri.conf.json` (deben coincidir). +2. Mueve lo pendiente de `CHANGELOG.md` a la nueva versión. +3. `git tag vX.Y.Z && git push --tags`: el workflow `release.yml` valida la coherencia y publica un **borrador** de + release con los instaladores (Windows NSIS, macOS DMG, Linux AppImage/deb). No están firmados. diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..28b1c18 --- /dev/null +++ b/README.en.md @@ -0,0 +1,47 @@ +
+ +MOD0 + +# MOD0 + +**Mission control for your AI CLI sessions.** + +Run 8–15 Claude Code sessions in parallel without losing the thread: see what each one is doing, which file it touches, +what it's thinking and which one needs you — without reading walls of terminal text. + +[Español](README.md) · [Landing](https://moduszero.github.io/landing/en/products/mod0/) · [Project context](docs/CONTEXT.md) · [Current plan](docs/PLAN.md) + +Mission Control with eight sessions + +
+ +> [!NOTE] +> MOD0 is **no longer a commercial product**. It's the tool I build for my own workflow, published as it is. + +## What it is + +With AI doing the heavy lifting, the human stops "throwing prompts" and starts **reviewing and orchestrating**. The +bottleneck is following several flows at once. MOD0 **wraps the CLI you already use** and puts a cockpit on top: +Mission Control (one card per session), an always-visible attention panel, a **Thinking Graph**, a **project +dependency graph**, per-session **review** with commit, a **Kanban** that launches sessions in their own git worktrees, +a CodeMirror editor for quick fixes, and native + webhook alerts (WhatsApp, Telegram, ntfy). + +It observes **without spending tokens**: Claude Code is launched with `--settings` registering HTTP hooks to a local +server (`127.0.0.1`, random port, per-run token) and its JSONL transcript is read for the "why" of each step. Other CLIs +get state inferred from terminal activity. + +## Getting started + +Requirements: Node.js 22+, Rust 1.85+, [Tauri prerequisites](https://v2.tauri.app/start/prerequisites/), `git` and your CLI. + +```bash +git clone https://github.com/moduszero/mod0.git +cd mod0 +npm install +npm run tauri dev +``` + +BYOK / local AI: define environment variables per CLI profile (Settings → CLI profiles); keep secrets in your system +environment, not in the profile. See [CONTRIBUTING.md](CONTRIBUTING.md) and [docs/CONTEXT.md](docs/CONTEXT.md). + +License: [Apache-2.0](LICENSE). diff --git a/README.md b/README.md index a08fca8..20f39a9 100644 --- a/README.md +++ b/README.md @@ -1,146 +1,138 @@ -# `MOD0` | The Architect’s Interface +
- - - - - -
-

[ES]

-

- MOD0 es un IDE Autónomo, Agnóstico y Agéntico diseñado para el paradigma Mind-to-Action y desarrollado por Modus Zero. Este permite liderar, gestionar y auditar el desarrollo de software ya no con "apoyo" de la IA, sino mediante el "uso" de esta, todo esto con precisión quirúrgica, máxima eficiencia y carga visual/mental mínima, permitiendo eliminar la fricción entre la intención y la ejecución. -

-
-

[EN]

-

- MOD0 is an Autonomic, Agnostic, and Agentic IDE built for the Mind-to-Action paradigm and developed by Modus Zero. It allows to lead, manage and audit software development—not by "teaming" with AI, but "using" it, all this with swarms with surgical precision, maximum efficiency and minimum visual/mental overload, leading to the removal of the friction between intent and execution. -

-
- - - - logo-unified - -
- -## 🌐 Index / Índice - -* **[Español (Especificaciones y Features)](#description-es)** -* **[English (Specifications & Features)](#description-en)** -* **[Manual (Instalación)](#bilingual-manual)** +MOD0 ---- +# MOD0 -
+**Mission control para tus sesiones de CLI con IA.** -# 🇪🇸 Versión en Español +Corre 8–15 sesiones de Claude Code en paralelo sin perder el hilo: ve qué hace cada una, en qué archivo trabaja, +qué está pensando y cuál te necesita, sin leer muros de texto de terminal. -## Tecnologías +[![CI](https://github.com/moduszero/mod0/actions/workflows/ci.yml/badge.svg)](https://github.com/moduszero/mod0/actions/workflows/ci.yml) +![Tauri 2](https://img.shields.io/badge/Tauri-2-24c8db) +![Svelte 5](https://img.shields.io/badge/Svelte-5-ff3e00) +![Licencia](https://img.shields.io/badge/licencia-Apache--2.0-blue) -| Componente | Tecnología | Propósito | -| --- | --- | --- | -| **Logic Core** | **Rust** | Orquestación de grafos, indexación SQLite y bridge con el SO. | -| **Desktop Shell** | **Tauri v2** | Seguridad nativa, alto rendimiento y footprint mínimo (<20MB). | -| **UI Framework** | **Svelte 5 (Runes)** | Interfaz reactiva de ultra-baja latencia para visualización de datos. | -| **Protocolo** | **Native MCP** | Integración nativa con Model Context Protocol sin intermediarios. | -| **Protocolo** | **Native LSP** | Múltiples intérpretes de lenguajes y tecnologías sin necesidad de plugins externos. | +[English](README.en.md) · [Landing](https://moduszero.github.io/landing/es/products/mod0/) · [Documentación](docs/README.md) · [Contexto (IA)](docs/CONTEXT.md) · [Plan actual](docs/PLAN.md) ---- +Mission Control con ocho sesiones -## Principales Características +
-### UI Mente-Plan (Blueprint Mode) -* **Comunicación Usuario-IA:** A diferencia de un chat, no es para "leer" las respuestas de la IA (nadie las lee realmente de todas formas), escribe prompts y obtén respuestas simples y eficientes usando artefactos (dibujos simples, diagramas, tablas, etc) para transmitir la información sin un solo scroll y en un parrafo como máximo (los devs entendemos mejor 10 diagramas que un párrafo). Esta es accesible y completamente conectada con cualquier seccion del IDE. -* **Planeación & Artifacts:** Espacio dedicado a diagramas ERD, de arquitectura o flujo (dependiendo de la tarea) o incluso un canvas de prototipos UI, todo antes de tocar una sola línea de código, completamente generado por IA pero igualmente customizable y traducible a código. +> [!NOTE] +> MOD0 **ya no es un producto comercial**. Es la herramienta que construyo para mi propio flujo de trabajo y se publica +> tal cual: con opiniones, abierta y en cambio constante. +## La idea -### Control y Auditoría (Forge Mode) -* **Grafo de pensamiento & Tablero Kanban:** Visualiza el razonamiento, acciones y decisiones del agente en tiempo real (permite tambien controlar decisiones en caso de bifurcaciones o posibles opciones, tú sigues teniendo el control siempre que lo decidas) y visualiza/gestiona tareas en un tablero kanban. -* **Sesiones de Agentes:** Worktrees/Branches gestionadas por agentes para multi-tasking masivo sin conflictos en el workspace, el límite es tu capacidad de control. +Con la IA haciendo el trabajo pesado, el humano deja de "tirar prompts" y pasa a **revisar y orquestar**. El cuello de +botella ya no es escribir código: es seguirle el hilo a varios flujos a la vez. Las CLI muestran un registro de texto que +nadie lee de verdad, y los IDE clásicos traen mil funciones que no se tocan. -### Revisión especializada para evolución iterativa (Pulse Mode) -* **Vista Híbrida:** Alterna entre Explorador de Archivos tradicional y Árbol de Archivos Visual usando grafos de dependencias. -* **Control de Versiones Visual:** Incluido en el File Tree Visual, gestiona commits y ramas visualmente; entiende el impacto de cada cambio en lugar de leer Pull Requests kilométricas (también con una sección apartada para Control de Versiones con la UI tradicional). +MOD0 **envuelve la CLI que ya usas** y le pone una cabina encima: -### Autonomía segura por TDD y eficiencia de tokens -* **Ghost Runner Sandboxing:** Uso de worktrees/branches junto con un sandbox agresivo en para validar lógica y tests (TDD) antes de la implementación real. -* **Inferencia-por-Dificultad:** Estrategia de asignación automática de modelos basada en dificultad de tasks para eficiencia de tokens. +| Pantalla | Qué resuelve | +| ---------------------- | ------------------------------------------------------------------------------------------------------------ | +| **Mission Control** | Una tarjeta por sesión: estado, acción actual, tiempo en estado, contexto usado y cambios. | +| **Panel de atención** | Siempre visible: quién trabaja, quién está bloqueada pidiéndote algo y quién terminó. `Alt+1…9` para saltar. | +| **Thinking Graph** | El razonamiento de la sesión como grafo (lecturas, ediciones, comandos, ramas paralelas y su porqué). | +| **Grafo del proyecto** | Carpetas como módulos e imports como flechas, con anillos de color de la sesión que trabaja en cada módulo. | +| **Revisión** | Diff por sesión contra el commit con el que empezó, archivos marcados como revisados y commit en un clic. | +| **Kanban** | Tareas que lanzan sesiones (con su propio `git worktree`) y se mueven solas según el estado de la sesión. | +| **Editor** | CodeMirror 6 para revisar y retocar. No pretende ser tu editor principal. | +| **Avisos** | Escritorio + webhook (WhatsApp, Telegram, ntfy…) cuando una sesión te necesita o cuando _todo_ terminó. | -### Contexto Agéntico -* **Biblioteca de Skills Integrada :** Deja de instalar o gestionar skills manualmente en tu proyecto, conecta tu repositorio de skills a la base de datos, aunque sean miles de skills la IA los usará eficientemente. -* **Gestión de Contexto:** Gestiona las skills activas (si quieres optimizar y controlar aún más y minimizar posibles alucinaciones) puedes activar o desactivar las que usas, como si fueran extensiones o plugins, no más skills como deps! -* **Aprendizaje Reforzado Nativo:** Capacidad nativa de utilizar el TDD para aprender de casos de uso anteriores sin necesidad de configuraciones extra, todo en un entorno controlado (tú decides si guarda el conocimiento en tu pc para todos tus proyectos o si es solo por repositorio para total privacidad). +
+Thinking graph +Grafo del proyecto +Revisión +Kanban +
-> [!TIP] -> ### Aprovecha de la mejor forma el entorno sin cambiar drásticamente tu flujo de trabajo -> * **Editor de código tradicional:** Cómo olvidar esto, la IA hará la mayoría pero siempre es bueno poder revisar o editar cambios pequeños, la idea no es que sea la forma principal de trabajo, pero no puede faltar de ninguna forma. -> * **Flujos de trabajo personalizables:** Parecido a flujos de CI/CD, permite controlar la forma en que trabaja la IA, si usar o no generación de artefactos, si prefieres multi-tasking y/o control total, grado de libertad concedido a la IA para decisiones técnicas, si prefieres que la IA haga el control de versiones o avise de vez en cuando para que revises y subas cambios. Dependiendo de tu rol en el proyecto y dependiendo de tu forma de trabajar todo cambia, tú defines tu estilo. -> * **Orientado a Local / BYOK:** Conexión personalizada con modelos cloud (BYOK) y self-host. Soporte total para modelos locales, trabajo offline y privacidad absoluta. -> * **Plugins o extensiones:** Soporte para extensiones basadas en WASM usando Rust, Go, JavaScript o C/C++. +## Cómo observa sin gastar tokens ---- +- Cada sesión es una **terminal real (PTY)** que ejecuta tu shell y, dentro, la CLI. +- Para **Claude Code**, MOD0 lanza la CLI con `--settings ` que registra _hooks HTTP_ hacia un servidor local + (`127.0.0.1`, puerto aleatorio y token por ejecución). Los hooks se **combinan** con los tuyos, no los reemplazan. +- El _porqué_ de cada paso sale del **transcript JSONL** que Claude Code ya escribe (lectura incremental, solo lectura). +- Con otras CLI (Codex, Gemini, cualquier comando) el estado se **infiere de la actividad de la terminal**; el thinking + graph y los estados exactos requieren los hooks de Claude Code. -
+Observar **nunca** cuesta una llamada a un modelo. -# 🇺🇸 English Version +## Empezar -## Technologies +Requisitos: [Node.js](https://nodejs.org) 22+, [Rust](https://rustup.rs) 1.85+ y los +[requisitos de Tauri](https://v2.tauri.app/start/prerequisites/) de tu sistema. Además, `git` y la CLI que quieras usar. -| Component | Technology | Purpose | -| --- | --- | --- | -| **Logic Core** | **Rust** | Graph orchestration, SQLite indexing, and OS bridge. | -| **Desktop Shell** | **Tauri v2** | Native security, high performance, and minimal footprint (<20MB). | -| **UI Framework** | **Svelte 5 (Runes)** | Ultra-low latency reactive interface for data visualization. | -| **Protocol** | **Native MCP** | Native Model Context Protocol integration without intermediaries. | -| **Protocol** | **Native LSP** | Multiple language and technology interpreters without the need for external plugins. | +```bash +git clone https://github.com/moduszero/mod0.git +cd mod0 +npm install +npm run tauri dev # desarrollo +npm run tauri build # instalador (en src-tauri/target/release/bundle) +``` ---- +### Perfiles de CLI y proveedores -## Key Features +Ajustes → _Perfiles de CLI_ → _Añadir desde una plantilla_. MOD0 no implementa ningún proveedor: envuelve una CLI. -### Mind-to-Plan UI (Blueprint Mode) -* **User-AI Communication:** Unlike a chat, this is not for "reading" AI responses (no one really reads them anyway); write prompts and get simple, efficient responses using artifacts (simple drawings, diagrams, tables, etc.) to convey information without a single scroll and in one paragraph at most (devs understand 10 diagrams better than a paragraph). This is accessible and fully connected to any section of the IDE. -* **Planning & Artifacts:** Dedicated space for ERD, architecture, or flow diagrams (depending on the task) or even a UI prototype canvas—all before touching a single line of code. Fully AI-generated but equally customizable and translatable to code. +- **Claude Code con otros proveedores** (OpenRouter, Z.ai, Qwen, DeepSeek, tu gateway): mantienes toda la observación. +- **Aider, OpenCode, Qwen Code, Codex, Gemini**: terminal, revisión y estado inferido por actividad. +- **Claves**: escribe `CLAVE=$VARIABLE` y MOD0 la lee del entorno de tu sistema al lanzar la sesión; no se guarda en ningún + archivo. Cada perfil muestra si la CLI está instalada y si faltan variables. -### Control and Audit (Forge Mode) -* **Thought Graph & Kanban Board:** Visualize agent reasoning, actions, and decisions in real-time (also allows for decision control in case of bifurcations or potential options; you remain in control whenever you choose) and visualize/manage tasks on a kanban board. -* **Agent Sessions:** Agent-managed worktrees/branches for massive multitasking without workspace conflicts; the limit is your control capacity. +Detalles en [docs/guide/providers.md](docs/guide/providers.md). -### Specialized revision for incremental evolution (Pulse Mode) -* **Hybrid View:** Switch between a traditional File Explorer and a Visual File Tree using dependency graphs. -* **Visual Source Control:** Included in the Visual File Tree; manage commits and branches visually. Understand the impact of each change instead of reading kilometer-long Pull Requests (also features a separate section for Version Control with a traditional UI). +### Avisos al móvil -### Safe Autonomy by using TDD, Multi-tasking and token efficiency -* **Ghost Runner Sandboxing:** Use of worktrees/branches along with an aggressive sandbox to validate logic and tests (TDD) before actual implementation. -* **Inference-by-Difficulty:** Automated model assignment strategy based on task difficulty for token efficiency. +Ajustes → _Notificaciones_ → _Webhook_ y elige una plantilla (ntfy, Telegram, WhatsApp vía CallMeBot, JSON). Los +marcadores disponibles son `{title}`, `{message}`, `{session}`, `{status}` y sus variantes `_url` y `_json`. -### Agentic Context -* **Integrated Skills Library:** Stop installing or managing skills manually in your project; connect your skills repository to the database. Even with thousands of skills, the AI will use them efficiently. -* **Context Management:** Manage active skills (to further optimize, control, and minimize potential hallucinations); you can activate or deactivate the ones you use, as if they were extensions or plugins—no more skills as deps! -* **Native Reinforcement Learning:** Native ability to use TDD to learn from previous use cases without extra configurations, all within a controlled environment (you decide if knowledge is saved on your PC for all projects or per repository for total privacy). +## Atajos -> [!TIP] -> ### Use the best of the environment without drastically changing your workflow -> * **Traditional Code Editor:** Can't forget this—the AI will do most of the work, but it's always good to be able to review or edit small changes. It’s not intended as the primary way of working, but it’s absolutely essential. -> * **Customizable Workflows:** Similar to CI/CD flows, this allows you to control how the AI works—whether or not to use artifact generation, if you prefer multi-tasking and/or total control, the degree of freedom granted to the AI for technical decisions, and whether the AI handles version control or prompts you to review and push changes. Everything changes depending on your role and your way of working; you define your style. -> * **Local-First / BYOK:** Custom connection with cloud models (BYOK) and self-hosting. Full support for local models, offline work, and absolute privacy. -> * **Plugins or Extensions:** Support for WASM-based extensions using Rust, Go, JavaScript, or C/C++. +| Atajo | Acción | +| ------------------------------- | --------------------------------- | +| `Ctrl+K` / `Ctrl+Shift+P` | Paleta de comandos | +| `Ctrl+P` / `Ctrl+Shift+O` | Abrir archivo | +| `Ctrl+Shift+N` | Nueva sesión | +| `Alt+1…9` | Saltar a la sesión _n_ | +| `Ctrl+Shift+A` | Siguiente sesión que te necesita | +| `Ctrl+1…6` | Cambiar de vista | +| `` Ctrl+` `` | Mostrar/ocultar la terminal | +| `Ctrl+Shift+B` / `Ctrl+Shift+R` | Panel lateral / panel de atención | +| `Ctrl +` / `Ctrl -` / `Ctrl 0` | Zoom de la interfaz | ---- +Dentro de la terminal solo se interceptan los atajos con `Ctrl+Shift` o `Alt+número`; el resto llega a la CLI. -
+## Estructura -## 📖 Manual +```text +src/ Frontend (SvelteKit 3 en modo SPA, Svelte 5 con runes, Tailwind 4) + lib/core/ types · constants · runes (estado) · services (IPC) · registry · i18n · utils + lib/components/ common (piezas reutilizables) · layout (marco del IDE) + lib/features/ terminal · editor · workbench · system-atoms (piezas de cada pantalla) + lib/systems/ una carpeta por sección/actividad (MainSpace + Sidebar) +src-tauri/src/ Backend (Rust, Tauri 2) + commands/ puente IPC: una función por comando + features/ sessions · terminal · observer · workspace · git · notifications · kanban + core/ · infrastructure/ errores, eventos, estado; almacenamiento atómico y procesos +docs/ CONTEXT.md (visión y arquitectura) · PLAN.md (tareas y releases) +scripts/ backend simulado y capturas de pantalla reproducibles +``` -```bash -# 1. Instalar dependencias | Install deps -npm install +## Estado -# 2. Iniciar entorno de desarrollo (Tauri + Svelte) | Start Dev -npm run tauri dev +Versión **0.3.0**. El backend compila, pasa `clippy` y sus pruebas unitarias, y el frontend pasa `svelte-check` y el +build. Lo que **aún no está verificado** en una máquina real (ver [PLAN](docs/PLAN.md)): el arranque completo con Claude +Code real, ConPTY en Windows y los hooks HTTP de tu versión concreta de la CLI. Si algo falla, abre un issue con la +plantilla. -# 3. Construir ejecutable nativo | Build native app -npm run tauri build -``` +## Contribuir + +Lee [CONTRIBUTING.md](CONTRIBUTING.md). Para reportar vulnerabilidades, [SECURITY.md](SECURITY.md). + +## Licencia -

Autónomo | Autonomic • Agnóstico | Agnostic • Agéntico | Agentic • 2026 • MOD0 por | by Modus Zero

+[Apache-2.0](LICENSE) © Luis Alberto Hernández Roselló diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..b245944 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Política de seguridad + +## Reportar una vulnerabilidad + +No abras un issue público. Usa los +[avisos de seguridad privados de GitHub](https://github.com/moduszero/mod0/security/advisories/new) o escribe al +mantenedor. Intento responder en una semana. + +## Modelo de amenazas (resumen) + +- **Servidor de hooks**: escucha solo en `127.0.0.1`, en un puerto aleatorio, y exige un token aleatorio por + ejecución en la ruta. Otro proceso local con acceso a tu usuario podría descubrirlo; no es un límite entre + usuarios del mismo equipo. +- **Archivos de ajustes por sesión**: se escriben en la carpeta de datos de la app (`hooks/.json`) y contienen + la URL con el token de la ejecución actual. +- **Perfiles y webhooks**: se guardan en texto plano en `config.json`. **No pongas claves de API en los perfiles**: + usa variables de entorno del sistema. Las URL de webhook con tokens (Telegram, CallMeBot…) también quedan en ese + archivo. +- **Ejecución de comandos**: MOD0 ejecuta lo que configures en los perfiles, con tus permisos. No ejecuta nada que no + hayas configurado o escrito tú. +- **Red**: la app solo hace peticiones por su cuenta al webhook de avisos que configures. diff --git a/docs/CONTEXT.md b/docs/CONTEXT.md new file mode 100644 index 0000000..94388f1 --- /dev/null +++ b/docs/CONTEXT.md @@ -0,0 +1,166 @@ +# MOD0 · Contexto global del proyecto + +> Documento de contexto para Claude (fuente del proyecto) y para cualquier persona que llegue al repo. +> **Se actualiza en cada release** junto con `docs/PLAN.md`. Última actualización: **0.3.0 · 2026-11-16**. + +## 1. Qué es MOD0 + +Una app de escritorio (Tauri 2 + SvelteKit 3/Svelte 5) que funciona como **mission control para sesiones de CLI con IA** +(principalmente Claude Code). No es un IDE clásico: es "una UI con tres tallitas y la CLI". + +**Dueño y único usuario objetivo**: Luis (Luke1606), tech lead; trabaja en Windows. Español como idioma de trabajo. + +### Por qué existe (el flujo real) + +- Trabaja con **8–15 sesiones de Claude abiertas a la vez** (llegó a 15 durante 5+ horas). Su límite no es escribir + código sino _seguirle el hilo_ a varios flujos en paralelo. +- El "human in the loop" ya no es tirar prompts: es **revisar, orquestar y decidir**. Las CLI muestran texto que + nadie lee de verdad; los IDE clásicos traen funciones que no se tocan. +- Con Claude trabajando 24/7 hace falta: ver en todo momento **en qué archivo trabaja, qué piensa y quién te necesita**, + saltar entre sesiones, revisar cómodo y recibir un **aviso al móvil** cuando algo requiere atención o cuando todo terminó. + +### Decisiones de producto (no revertir sin hablar) + +1. **Ya no es comercial.** Nació como IDE genérico/personalizable/comercial; hoy es herramienta personal. Cualquier + afirmación comercial (SOC 2, "swarms", cifrado bancario…) es falsa y no debe reaparecer. +2. **Es un envoltorio de la CLI**, no un reemplazo. BYOK e IA local se resuelven con variables de entorno por perfil. +3. **Observar no cuesta tokens**: hooks HTTP de Claude Code + lectura del transcript. Nunca llamar a un modelo para observar. +4. **Baja fatiga visual/cognitiva**: superficies mate, colores de estado desaturados, un movimiento por estado, sin blur + ni transparencia de ventana, nada que parpadee sin motivo, `prefers-reduced-motion` respetado. +5. **Mantener el editor** (CodeMirror 6) para revisar y retocar, pero sin competir con VS Code. +6. El **landing** (`moduszero.github.io/landing`) se conserva; **`pricing` no se toca** (puede que se use algún día). +7. **Agnóstico a la CLI/proveedor, pero Claude Code primero.** Luis aún no paga Claude Code: la vía principal es usar la CLI + de Claude con **endpoints compatibles** (OpenRouter, Z.ai, Qwen/DashScope, DeepSeek, gateway propio) para conservar los + hooks; las demás CLI (Aider, OpenCode, Qwen Code, Codex, Gemini) funcionan con estado inferido. Las claves se + referencian como **`$NOMBRE`** (se leen del entorno del sistema al lanzar); no se construye un asistente de + proveedores: "keep it simple", la configuración fina se hace desde la propia CLI. +8. **Documentación para humanos en `docs/`** (el landing renderiza `docs/README.md` y `docs/getting-started.md` desde + `ModusZero/mod0`). **Sin wiki de GitHub**: es otro repo, no se revisa en PR y las IAs lo leen peor. `CONTEXT.md` y + `PLAN.md` son para la IA; `README.md`, `getting-started.md` y `guide/*` para personas. Hay un `llms.txt` en la raíz. +9. **Mapa del proyecto**: sirve para orientarse en una base de código nueva, ver dónde trabaja cada sesión y estimar el + **impacto** de un cambio; **no** para revisar (para eso, lista/árbol de cambios). +10. **Hoja de ruta**: 0.2 Mission Control · 0.3 Cualquier CLI · 0.4 Triggers · 0.5 Insight · 0.6 Remoto y conectores (MCP). + +### KPIs que merecen atención (por sesión) + +Estado (`starting/working/waiting/review/idle/exited`) · acción actual + archivo · **tiempo en estado** · plan (`TodoWrite`) · turnos · +cambios (+/− líneas, archivos) · errores de herramientas · **contexto usado** (tokens del último mensaje vs límite). +`waiting` (bloqueada esperando una decisión) y `review` (terminó con cambios) son las que mandan en el panel de atención. + +## 2. Arquitectura + +```text + Claude Code (PTY) ──hooks HTTP──▶ hook_server (127.0.0.1:puerto, token) ──▶ SessionManager::on_hook + │ │ reduce(): estado + grafo + avisos + └──escribe──▶ transcript.jsonl ──lectura incremental──▶ TranscriptCursor ──┘ + │ emit + Frontend (Svelte 5 runes) ◀── eventos session:upsert · graph:delta · fs:changed ┘ + ▲ invoke(comandos) ◀── Channel (salida cruda del PTY) ── xterm.js +``` + +### Backend (`src-tauri/src`, Rust 2024, Tauri 2) + +| Módulo | Responsabilidad | +| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `config.rs` | `AppConfig` (serde `camelCase`, todos los campos con valor por defecto) + `ConfigStore` (RwLock + JSON atómico). | +| `core/` | `AppError` (se serializa como texto), nombres/payloads de eventos, `AppState` y `Paths`. | +| `infrastructure/` | `storage` (JSON atómico, hash estable), `process` (`blocking`, `command` sin ventana en Windows, `now_ms`). | +| `features/sessions/` | `model` (Session, estados, KPIs, **plan**), `profile` (perfiles de CLI; valores `$NOMBRE` resueltos en `launcher`), `launcher` (shell + comillas + línea de comandos), `manager` (registro de sesiones y **reductor de hooks**). | +| `features/terminal/` | `pty` (portable-pty; historial 1 MiB; `attach` atómico historial+canal), `ring_buffer`. | +| `features/observer/` | `hook_server` (tiny_http), `hooks_settings` (JSON de `--settings`), `transcript` (cursor JSONL), `graph` (thinking graph). | +| `features/workspace/` | `tree` (carga perezosa, respeta `.gitignore`), `io` (leer/escribir con límites), `deps` (grafo de dependencias **expandible**: `graph(root, expanded)` abre las carpetas indicadas hasta archivos; `impact` = recorrido inverso). | +| `features/git/` | Usa el binario `git` (sin libgit2): `changes` vs commit base, `file_pair`, `commit_all`, worktrees. | +| `features/notifications/` | Escritorio (plugin) + webhook (`ureq`) con plantillas `{title} {message} {session} {status}` y `_url`/`_json`. | +| `features/kanban/` | Persistencia atómica del tablero por proyecto (la forma del JSON la define el frontend). | +| `commands/` | Puente IPC (async; trabajo bloqueante a `spawn_blocking`). | + +**Reductor de estado** (`manager::reduce`, función pura probada): `UserPromptSubmit → working` · `PreToolUse/PostToolUse → +working` (+ nodos del grafo, archivos tocados) · `Notification(permission_prompt|elicitation_dialog) → waiting` +(`idle_prompt` se ignora) · `Stop → review` si hubo ediciones en el turno, si no `idle` · `SessionEnd → idle`. +Las CLI **sin hooks** (`observed=false`) infieren `working/idle` por silencio del PTY (2,5 s); el ticker (1 s) también +dispara el aviso "todo terminó" y, si los hooks no llegan en 20 s, degrada a inferencia. + +**Hooks**: se pasa `--settings /hooks/.json` con eventos _estables_ (`SessionStart, SessionEnd, +UserPromptSubmit, PreToolUse, PostToolUse, Notification, Stop, SubagentStop, PreCompact`), cada uno +`{"type":"http","url":"http://127.0.0.1:PUERTO/hook//","timeout":5}`. El servidor responde `{}` al instante. +Se evitan eventos nuevos para que versiones antiguas no rechacen el archivo. + +**Persistencia** (carpeta de config/datos de Tauri): `config.json`, `sessions.json` (al reiniciar las sesiones quedan +`exited` y se reanudan con `--resume {session}`), `graphs/.json`, `hooks/.json`, `boards/.json`. + +### Frontend (`src`, Svelte 5 runes, Tailwind 4) + +- `lib/core/types` · `constants` (`work-config`, `family-config`, `default-config`, `webhook-presets`) · `runes` + (singletons con estado: `sessionsStack`, `graphStack`, `filesStack`, `editorStack`, `reviewStack`, `kanbanStack`, + `settingsStack`, `toggleUIStack`, `workStack`, `toastStack`) · `services` (un archivo por dominio sobre `invoke`) · + `registry` (`actions`, `commands` de la paleta) · `i18n` (`t()` reactivo, es/en planos) · `utils`. +- **Layout**: `Header` (marca, proyecto, paleta, contadores, controles de ventana propios) · `ActivityBar` · `Sidebar` + (según actividad) · `Workspace` (vista + dock de terminal redimensionable) · `AttentionRail` (derecha) · `Footer`. +- **Secciones/actividades** (`ActivityIDs`): _Forge_ = `sessions` (Mission Control), `thinking-graph`, `kanban` · + _Pulse_ = `files` (árbol + grafo), `review`, `editor` · _Workspace_ = `settings`. `systems///` + tiene `XMainSpace` y `XSidebar`; las piezas viven en `features/system-atoms/…`. +- **Terminal**: una instancia xterm por sesión, creada al verla por primera vez; WebGL solo en la visible; el historial + y los bytes en vivo llegan por `term_attach` (retorno = historial, `Channel` = vivo, sin duplicados). +- **Thinking graph**: vista **diagrama** (por defecto; `buildDiagram` agrupa pasos consecutivos en fases y marca reintentos) y + **cronología** (`layoutGraph`, estilo `git log`); el **plan** sale de `TodoWrite`. **Grafo del proyecto**: `force-layout.ts` + (determinista, ajustado a la vista), nodos `dir`/`file` expandibles, letras M/A/U/D e **impacto**. **Revisión**: lista plana + o árbol por carpetas (`core/utils/tree.ts`). +- **Atajos** globales en `features/workbench/hotkeys.ts` (dentro de la terminal solo `Ctrl+Shift+…` y `Alt+n`). + +### Contratos IPC + +Comandos: `app_info` `notify_test` `profile_check` · `config_get/update/set_project` · `session_list/create/restart/stop/remove/rename/ +set_reviewed/graph/refresh` · `term_attach/detach/write/resize` · `fs_list_dir/list_files/read/write/create_file/ +create_dir/rename/delete/graph/impact` · `git_info` `review_changes/file/commit` · `kanban_load/save`. +Eventos: `session:upsert` (Session completa) · `session:removed` (id) · `graph:delta` (`{sessionId,nodes}`) · +`fs:changed` (`{cwd}`; **sin watchers**: se emite tras actividad de las sesiones y al recuperar el foco). + +## 3. Convenciones (ver también `CONTRIBUTING.md`) + +- **Formato**: Prettier (`semi`, `singleQuote`, `trailingComma: all`, `printWidth: 110`, `tabWidth: 4`) y EditorConfig + (lf, 4 espacios, sin espacios finales salvo `.md`); rustfmt `max_width = 110`. **Siempre** formatear antes de entregar. +- Organización por carpetas descrita arriba; JSDoc/comentarios en español; claves i18n planas `area.clave`. +- Nombres: `*.svelte.ts` para runes, `XMainSpace/XSidebar` para sistemas, `*-service.ts`, tipos en `core/types`. +- Rust: errores con `AppResult`, structs serde `camelCase`, lógica pura separada para poder probarla. + +## 4. Stack y versiones (verificado el 2026-11-10) + +**Tauri fijado**: los paquetes npm (`~2.11`) y los crates (`Cargo.lock`) deben coincidir en minor; al actualizar, ambos a la vez. +SvelteKit **3.1** (sin `svelte.config.js`: la config va en `sveltekit({...})` dentro de `vite.config.ts`; `$lib` fue +reemplazado por **`#lib`** → `package.json#imports` + `tsconfig.paths`), Svelte 5.57, Vite 8, TypeScript **~6.0** +(svelte-check/kit aún no admiten TS 7), Tailwind 4.3 (`@tailwindcss/vite`), `@lucide/svelte` (el nombre `Trash`, no +`Trash2`), xterm 6 + addon-fit/webgl, CodeMirror 6 (+ merge, language-data), Tauri 2 + plugins dialog/notification/ +opener/os/window-state, `portable-pty` 0.9, `tiny_http`, `ureq` 3, `ignore`, `regex`. Landing: **Astro 7** (Node ≥ 22.23.4), +`@astrojs/svelte` 9 + React 7, Tailwind vía `@tailwindcss/vite`. + +Instalador: **NSIS** en modo usuario con imágenes de marca (`src-tauri/installer/*.bmp`); ya no se genera MSI. + +## 5. Landing (`moduszero/landing`, Astro) + +Pantalla de producto `components/products/Mod0.astro` rehecha: hero con captura real, filosofía, **recorrido interactivo** +(`components/ide/*.svelte`: maquetas vivas portadas de los componentes del IDE con datos de ejemplo y simulación +compartida), sección "observa sin tokens", features, workflow, galería (`public/images/ide/{es,en}`), compilar y FAQ/ +roadmap. Textos en `i18n/locales/{es,en}.json` → `products.mod0.*`. **Rendimiento**: fondo de Vanta/three.js (CDN, blur +de pantalla completa) sustituido por un canvas 2D que se pausa; cursor personalizado solo con ratón y con `quickTo`. +Cuando cambie la UI del IDE hay que **regenerar capturas** y **actualizar las maquetas** (ver `docs/PLAN.md`). + +## 6. Verificación y límites conocidos + +- **Verificado**: `cargo clippy` limpio y 22 pruebas unitarias de Rust (reductor de hooks y plan, grafo, transcript, deps + expandibles e impacto, quoting, referencias `$VAR`, notificaciones, git slug); `svelte-check` 0 errores; build del frontend; build del landing (31 páginas); + renderizado de las pantallas con un backend simulado (`scripts/`). +- **No verificado** (entorno sin GUI ni Claude Code): arranque completo de la ventana Tauri, ConPTY en Windows, hooks + HTTP con tu versión real de Claude Code, `--settings`, notificaciones nativas y el instalador NSIS. Probar primero. +- Límites de diseño: sin búsqueda de contenido en archivos; sin LSP; los estados exactos, el grafo y el plan requieren hooks + (solo Claude Code); el trabajo remoto (SSH/Codespaces) solo ofrece terminal (revisión y grafos son locales); el prompt inicial se aplana a una línea; los perfiles/webhooks se guardan en texto plano; los + nodos del grafo se limitan a 1200 por sesión. + +## 7. Cómo trabajar este proyecto con Claude + +1. Entrega por **release**: carpetas completas listas para reemplazar (`src`, `src-tauri`, config, docs) en zip, con el + formato ya aplicado (Prettier/rustfmt) y verificadas (check, build, tests). +2. En **cada release** actualizar `docs/CONTEXT.md` (si cambia algo estructural), `docs/PLAN.md` (tareas, registro), + `CHANGELOG.md` y las versiones (`package.json`, `Cargo.toml`, `tauri.conf.json`). La skill `mod0-release-sync` + automatiza y comprueba esto. +3. No introducir dependencias pesadas sin motivo; preferir lo simple (p. ej. `git` CLI en vez de libgit2). +4. Ser honesto con lo no verificado y anotarlo en `PLAN.md`. diff --git a/docs/PLAN.md b/docs/PLAN.md new file mode 100644 index 0000000..b276b27 --- /dev/null +++ b/docs/PLAN.md @@ -0,0 +1,91 @@ +# MOD0 · Plan actual + +> Tareas vivas y registro de releases. **Claude lo actualiza en cada release** (ver `docs/CONTEXT.md` §7). +> Versión actual: **0.3.0** · Última actualización: **2026-11-16**. + +## Estado en una línea + +0.3.0 entregada: proveedores/CLI agnóstico, plan de la sesión, thinking graph como diagrama, mapa del proyecto expandible +con impacto, revisión en lista/árbol, documentación para personas. **Sigue pendiente la verificación en una máquina real +con Claude Code**: es lo primero antes de añadir más funciones. + +## Ahora (v0.3.1 · verificación en máquina real) — prioridad alta + +- [ ] `npm run tauri dev` en Windows (la compilación de Rust necesita buena conexión la primera vez: ver + `docs/guide/troubleshooting.md`). La ventana abre, la barra de título propia y el redimensionado funcionan. +- [ ] Sesión con el perfil **Claude Code**: la CLI arranca dentro del PTY (ConPTY), el estado pasa a `idle`/`working` y el + «Observador» del pie está en verde. Comprobar que **`--settings` + hooks HTTP** funcionan con tu versión. +- [ ] Un turno completo: thinking graph (diagrama y cronología), **plan** (`TodoWrite`), `waiting` al pedir un permiso, + `review` al terminar con ediciones, aviso de escritorio y webhook. +- [ ] **Claude Code con otro proveedor** (plantilla OpenRouter/Z.ai…): comprobar que arranca con las variables `$NOMBRE` + y que los hooks siguen llegando. +- [ ] Probar una CLI sin hooks (Aider/OpenCode) y el estado inferido por actividad. +- [ ] Worktrees: crear, revisar (diff contra el commit base, lista y árbol) y eliminar con su worktree; reanudar (`--resume`). +- [ ] Mapa del proyecto en un repo real: expandir, cambios M/U/A/D e impacto; revisar el tiempo en una base de código grande. +- [ ] xterm con WebGL al 125 % / 150 % en Windows (si falla, desactivar WebGL por defecto). +- [ ] Instalador NSIS: aspecto, instalación por usuario, desinstalación. +- [ ] Verificar los endpoints y variables de cada plantilla de proveedor con las claves reales (cambian con frecuencia). +- [ ] Anotar aquí cualquier ajuste necesario y corregirlo. + +## Siguiente (v0.4 · Triggers) + +- [ ] Triggers: lanzar una sesión cuando ocurre un evento (release nuevo, CI que falla, ticket). +- [ ] Plantillas de prompt por tarea del Kanban. +- [ ] Búsqueda de contenido en archivos (`ignore` + regex), si hace falta. + +## Backlog + +- [ ] v0.5 _Insight_: coste por sesión, tendencia de contexto, historial de lo que hizo cada sesión. +- [ ] v0.6 _Remoto y conectores_: espacio de trabajo remoto (git y archivos por SSH, túnel inverso para los hooks) para + Codespaces/SSH; conectores MCP (Jira, Notion) para planear fuera del IDE; acompañante móvil para aprobaciones. +- [ ] Observación exacta para más CLI (p. ej. si OpenCode/Codex exponen eventos). +- [ ] Guardar secretos de webhooks en el llavero del sistema. +- [ ] Reordenar sesiones (arrastrar) y agruparlas por proyecto; terminales en mosaico. +- [ ] Documentación de `docs/` también en inglés. +- [ ] Landing: actualizar maquetas (`components/ide/`) y capturas cada vez que cambie la UI. + +## Decisiones recientes + +| Fecha | Decisión | +| ---------- | -------------------------------------------------------------------------------------------------------------- | +| 2026-11-10 | El proyecto deja de ser comercial; se rehace para el flujo personal (mission control de sesiones de CLI). | +| 2026-11-10 | Observación por hooks HTTP + transcript (cero tokens); sin hooks se infiere por actividad del PTY. | +| 2026-11-10 | `git` CLI en vez de libgit2; sin SQLite ni extensiones; sin watchers de archivos. | +| 2026-11-10 | SvelteKit 3: configuración en `vite.config.ts` y alias `#lib` (en vez de `$lib`). | +| 2026-11-16 | Agnóstico: Claude Code con endpoints compatibles primero; claves como `$NOMBRE`; sin asistente de proveedores. | +| 2026-11-16 | Thinking graph como diagrama de fases por defecto; plan de `TodoWrite` visible. | +| 2026-11-16 | Mapa del proyecto: expandible hasta archivos, con cambios e impacto; la revisión usa lista/árbol, no el grafo. | +| 2026-11-16 | Sin wiki de GitHub: la documentación vive en `docs/` (la renderiza el landing) y hay `llms.txt`. | +| 2026-11-16 | Paquetes npm de Tauri fijados al mismo minor que los crates (evita el aviso de versiones desalineadas). | + +## Deuda técnica conocida + +- Sin pruebas del frontend (solo `svelte-check` y render con backend simulado). +- `docs/` era antes un clon del wiki (el `.gitignore` lo ignoraba): ahora es parte del repo; mueve el clon del wiki fuera + y desactiva la wiki en GitHub si no la vas a usar. +- El landing instala `oxc-transform-react` por el peer de `@astrojs/react` 7 y `@lucide/svelte` requiere `noExternal` en Vite. +- Las plantillas de proveedores son referencias: los endpoints y nombres de modelo cambian y deben comprobarse. + +## Registro de releases + +### 0.3.0 · 2026-11-16 · "Cualquier CLI" + +**IDE**: plantillas de perfiles (Claude Code + OpenRouter/Z.ai/Qwen/DeepSeek/gateway; Aider, OpenCode, Qwen Code, Codex, +Gemini, Codespace), comprobación de CLI y de variables `$NOMBRE`; plan de la sesión; thinking graph como diagrama; +mapa del proyecto expandible con cambios e impacto; árbol de archivos con M/U/A/D; revisión en lista/árbol; auto-guardado; +npm de Tauri alineado con los crates; configuración de Cargo para redes lentas. +**Landing**: maquetas realmente explorables (aprobar, filtrar, arrastrar, expandir, impacto, árbol/lista, commit) y una +historia guionada más larga; cursor personalizado corregido (sin doble puntero y también con ventana estrecha); hoja de +ruta y copy actualizados; `llms.txt`. +**Documentación**: `docs/README.md`, `getting-started.md` y `guide/*` para personas; `llms.txt`. +**Verificación**: clippy limpio, 22 pruebas Rust, svelte-check 0 errores, builds de IDE y landing, render con mock y prueba +de las maquetas con Playwright. +**Pendiente**: lo de la sección «Ahora». + +### 0.2.0 · 2026-11-10 · "Mission Control" + +**IDE**: reescritura de `src/` y `src-tauri/` (sesiones con PTY real, perfiles de CLI, hooks + transcript, thinking graph, +grafo del proyecto, revisión con diff/commit, Kanban, editor, paleta, atajos, avisos, es/en, temas). Instalador NSIS. +Docs, CI/CD, plantillas de GitHub, CONTRIBUTING, SECURITY, CHANGELOG. +**Landing**: pantalla de producto rehecha (maquetas Svelte, capturas reales, copy no comercial), fondo y cursor +optimizados, Astro 7, `pricing` intacto. diff --git a/docs/README.md b/docs/README.md index 2758731..3795afe 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1 +1,33 @@ -# Próximamente | Comming Soon +# Documentación de MOD0 + +MOD0 es **mission control para tus sesiones de CLI con IA**: corres varias sesiones en paralelo (Claude Code y otras) y +ves de un vistazo qué hace cada una, en qué archivo trabaja, qué está pensando y cuál te necesita. No reemplaza tu CLI: +la envuelve y le pone una cabina encima. + +> MOD0 es una herramienta personal, abierta y **no comercial**. Esta documentación es la que usa quien quiera +> probarla, estudiarla o contribuir. Si buscas el contexto que usa la IA del proyecto, mira `CONTEXT.md` y `PLAN.md`. + +## Empezar + +- [Primeros pasos](https://github.com/ModusZero/mod0/blob/main/docs/getting-started.md): requisitos, instalación y tu primera sesión. +- [Solución de problemas](https://github.com/ModusZero/mod0/blob/main/docs/guide/troubleshooting.md): errores típicos de instalación y de uso. + +## Guías + +| Guía | Para qué sirve | +| -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| [Conceptos](https://github.com/ModusZero/mod0/blob/main/docs/guide/concepts.md) | Sesiones, estados, indicadores y cómo observa MOD0 sin gastar tokens. | +| [Sesiones](https://github.com/ModusZero/mod0/blob/main/docs/guide/sessions.md) | Crear, aislar con worktrees, reanudar y saltar entre sesiones. | +| [Thinking Graph](https://github.com/ModusZero/mod0/blob/main/docs/guide/thinking-graph.md) | El razonamiento de una sesión como diagrama o cronología, y su plan. | +| [Mapa del proyecto](https://github.com/ModusZero/mod0/blob/main/docs/guide/project-graph.md) | Grafo expandible por niveles, cambios resaltados e impacto. | +| [Revisión](https://github.com/ModusZero/mod0/blob/main/docs/guide/review.md) | Diff por sesión, lista o árbol, marcar revisado y commit. | +| [Kanban](https://github.com/ModusZero/mod0/blob/main/docs/guide/kanban.md) | Tareas que lanzan sesiones y se mueven solas. | +| [Proveedores y CLI](https://github.com/ModusZero/mod0/blob/main/docs/guide/providers.md) | Claude Code con otros modelos, Aider, OpenCode, Qwen Code, Codex, Gemini, claves y modelos gratuitos. | +| [Avisos](https://github.com/ModusZero/mod0/blob/main/docs/guide/notifications.md) | Escritorio y webhooks (WhatsApp, Telegram, ntfy). | +| [Trabajo remoto](https://github.com/ModusZero/mod0/blob/main/docs/guide/remote.md) | Sesiones en Codespaces o por SSH y sus límites actuales. | +| [Arquitectura](https://github.com/ModusZero/mod0/blob/main/docs/guide/architecture.md) | Cómo funciona por dentro, para quien quiera contribuir. | + +## Para IA + +El archivo [llms.txt](https://github.com/ModusZero/mod0/blob/main/llms.txt) resume dónde está cada cosa para que otras IAs +puedan consultar el proyecto. diff --git a/docs/getting-started.md b/docs/getting-started.md index 2758731..9e19f9c 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -1 +1,48 @@ -# Próximamente | Comming Soon +# Primeros pasos + +## Requisitos + +- **Node.js 22+** y **Rust 1.85+** ([rustup.rs](https://rustup.rs)). +- Los [requisitos de Tauri](https://v2.tauri.app/start/prerequisites/) de tu sistema (en Windows: WebView2 y las + herramientas de compilación de C++). +- **git** (la revisión y los worktrees lo usan) y la **CLI de IA** que quieras (por ejemplo Claude Code). + +## Instalar desde el código + +```bash +git clone https://github.com/ModusZero/mod0.git +cd mod0 +npm install +npm run tauri dev # modo desarrollo +npm run tauri build # instalador +``` + +La primera compilación de Rust descarga y compila unas 400 dependencias y puede tardar varios minutos. Si tu conexión es +lenta, consulta [Solución de problemas](https://github.com/ModusZero/mod0/blob/main/docs/guide/troubleshooting.md). + +Cuando haya versiones publicadas, los instaladores aparecen en la sección _Releases_ del repositorio (no están firmados: +Windows o macOS pueden mostrar una advertencia la primera vez). + +## Tu primera sesión + +1. **Abre un proyecto**: el selector de arriba a la izquierda → _Abrir carpeta…_ (o `Ctrl+K` → _Abrir carpeta_). +2. **Revisa los perfiles** en _Ajustes → Perfiles de CLI_. Cada perfil muestra si su comando está instalado (✓) y si + faltan variables de entorno. Para usar otros proveedores, mira [Proveedores y CLI](https://github.com/ModusZero/mod0/blob/main/docs/guide/providers.md). +3. **Crea una sesión** con `Ctrl+Shift+N`: ponle nombre, elige el perfil y, si quieres aislarla, marca _Worktree propio_. + Puedes escribir un prompt inicial (se aplana a una línea). +4. **Mira Mission Control**: la sesión aparece como tarjeta y en el panel de atención de la derecha. Con Claude Code + verás el estado exacto, el archivo que toca y su thinking graph; con otras CLI, el estado se infiere por actividad. +5. **Revisa lo que hizo** en la pestaña _Revisión_ y haz commit desde ahí. + +## Atajos que conviene saber + +| Atajo | Acción | +| ------------------- | ---------------------------------- | +| `Ctrl+Shift+N` | Nueva sesión | +| `Alt+1…9` | Saltar a la sesión _n_ | +| `Ctrl+Shift+A` | Siguiente sesión que te necesita | +| `Ctrl+K` / `Ctrl+P` | Paleta de comandos / abrir archivo | +| `Ctrl+1…6` | Cambiar de vista | +| ``Ctrl+` `` | Mostrar u ocultar la terminal | + +Dentro de la terminal solo se interceptan los atajos con `Ctrl+Shift` o `Alt+número`; el resto llega a la CLI. diff --git a/docs/guide/architecture.md b/docs/guide/architecture.md new file mode 100644 index 0000000..af1fb0c --- /dev/null +++ b/docs/guide/architecture.md @@ -0,0 +1,22 @@ +# Arquitectura (para contribuir) + +Versión resumida. El detalle completo, pensado también para IA, está en [`CONTEXT.md`](../CONTEXT.md). + +```text + Claude Code (PTY) ──hooks HTTP──▶ servidor local 127.0.0.1 ──▶ reductor de estado de la sesión + └──escribe──▶ transcript.jsonl ──lectura incremental──────────┘ │ eventos + Frontend (Svelte 5) ◀───── session:upsert · graph:delta · fs:changed ◀───────────┘ + ▲ comandos (invoke) · terminal por canal de bytes crudos +``` + +- **Backend** (`src-tauri/src`, Rust): `features/` con la lógica (sesiones, terminal, observador, archivos, git, + avisos, kanban) y `commands/` como puente IPC. El reductor de estado (`sessions/manager.rs::reduce`) es una función + pura con pruebas. +- **Frontend** (`src`, SvelteKit 3 en modo SPA, Svelte 5 con _runes_): `core/` (tipos, estado, servicios, i18n), + `components/` (piezas comunes y marco), `features/` y `systems/` (una carpeta por sección → actividad). +- **Terminal**: un PTY por sesión; la salida se guarda en un búfer y solo viaja al frontend mientras haya una terminal + visible, así 15 sesiones no cuestan nada en la interfaz. +- **Grafos**: el análisis de imports se calcula en Rust y se cachea; el diseño por fuerzas se hace en el frontend. +- **Sin base de datos ni vigilantes de archivos**: JSON atómico y refresco por actividad de las sesiones. + +Convenciones y flujo de trabajo: [`CONTRIBUTING.md`](../../CONTRIBUTING.md). diff --git a/docs/guide/concepts.md b/docs/guide/concepts.md new file mode 100644 index 0000000..c146b16 --- /dev/null +++ b/docs/guide/concepts.md @@ -0,0 +1,34 @@ +# Conceptos + +## Sesión + +Una **sesión** es una terminal real (un PTY) que ejecuta tu shell y, dentro, una CLI de IA, en una carpeta de trabajo: +la del proyecto o un **worktree** propio. MOD0 puede tener 8–15 sesiones a la vez y recuerda las que cerraste para que +puedas **reanudarlas** (con Claude Code, usando `--resume`). + +## Estados + +| Estado | Significado | Qué hacer | +| --------------- | ------------------------------------------- | ------------------------------ | +| **Trabajando** | La IA está ejecutando pasos. | Nada: déjala. | +| **Esperando** | Bloqueada: pidió un permiso o una decisión. | Atenderla ya (`Ctrl+Shift+A`). | +| **Por revisar** | Terminó un turno **con cambios**. | Revisar lo que hizo. | +| **En reposo** | Sin nada pendiente. | — | +| **Finalizada** | El proceso terminó. | Reanudar o eliminar. | + +_Esperando_ y _Por revisar_ mandan en el panel de atención. + +## Indicadores por sesión + +Estado · acción actual y archivo · **tiempo en ese estado** · turnos · líneas +/− y archivos cambiados · errores de +herramientas · **contexto usado** (tokens del último mensaje frente al límite) · progreso del **plan** si la CLI lo usa. + +## Cómo observa MOD0 (sin gastar tokens) + +- **Claude Code**: se lanza con `--settings ` que registra _hooks HTTP_ hacia un servidor local + (`127.0.0.1`, puerto aleatorio y token por ejecución). Los hooks **se suman** a los tuyos. El _porqué_ de cada paso sale + del **transcript** que Claude Code ya escribe (lectura incremental, solo lectura). +- **Otras CLI**: el estado se **infiere de la actividad de la terminal** (salida reciente = trabajando). No hay thinking + graph, plan ni estados exactos. + +Observar **nunca** llama a un modelo. diff --git a/docs/guide/kanban.md b/docs/guide/kanban.md new file mode 100644 index 0000000..e7c19cf --- /dev/null +++ b/docs/guide/kanban.md @@ -0,0 +1,11 @@ +# Kanban + +Un tablero **por proyecto** con cuatro columnas: _Pendiente_, _En curso_, _Revisar_ y _Hecho_. + +- **Lanzar sesión** en una tarjeta abre _Nueva sesión_ con el título y las notas como prompt inicial; al crearla, la + tarjeta queda ligada a la sesión. +- Las tarjetas ligadas **se mueven solas**: _En curso_ mientras la sesión trabaja o espera, _Revisar_ cuando termina con + cambios. Lo que muevas a _Hecho_ a mano no se vuelve a tocar. +- Arrastra y suelta para reordenar; el lápiz edita título y notas. + +El tablero se guarda en la carpeta de datos de MOD0 (por proyecto), no dentro del repositorio. diff --git a/docs/guide/notifications.md b/docs/guide/notifications.md new file mode 100644 index 0000000..c9dfca6 --- /dev/null +++ b/docs/guide/notifications.md @@ -0,0 +1,28 @@ +# Avisos + +Para no tener que vigilar las sesiones. _Ajustes → Notificaciones_. + +## Cuándo avisa + +- **Una sesión te necesita**: pidió un permiso o una decisión y se queda bloqueada (recomendado). +- **Una sesión terminó un turno**: con 8–15 sesiones puede ser ruidoso. +- **Todo terminó**: un solo aviso cuando ninguna sesión sigue trabajando, con el número de sesiones por revisar. + +## Canales + +- **Escritorio**: notificación nativa; por defecto solo cuando MOD0 no tiene el foco. +- **Webhook**: cualquier servicio que acepte una petición HTTP. El botón _Probar_ envía un aviso de prueba. + +Plantillas incluidas (cámbialas por tus datos): + +| Servicio | Método | URL / cuerpo | +| -------------------- | ------ | -------------------------------------------------------------------------------------------------- | +| ntfy.sh | POST | `https://ntfy.sh/TU-TEMA-SECRETO`, cuerpo `{title}: {message}` | +| Telegram | GET | `https://api.telegram.org/botTOKEN/sendMessage?chat_id=ID&text={title_url}%0A{message_url}` | +| WhatsApp (CallMeBot) | GET | `https://api.callmebot.com/whatsapp.php?phone=NUM&apikey=KEY&text={title_url}%20-%20{message_url}` | +| JSON genérico | POST | cuerpo `{"title":"{title_json}","message":"{message_json}"}` | + +Marcadores: `{title}`, `{message}`, `{session}`, `{status}` y sus variantes `_url` (codificada para URL) y `_json` +(escapada para JSON). + +> La URL del webhook, con sus tokens, se guarda en texto plano en `config.json`. No compartas ese archivo. diff --git a/docs/guide/project-graph.md b/docs/guide/project-graph.md new file mode 100644 index 0000000..47f8d97 --- /dev/null +++ b/docs/guide/project-graph.md @@ -0,0 +1,24 @@ +# Mapa del proyecto + +Una forma de ver la base de código que **ni el árbol ni una lista de archivos permiten**: a grandes rasgos, a la +escala que elijas. + +## Qué muestra + +- **Módulos y archivos**: las carpetas se agregan en un nodo (con su número de archivos); **doble clic** abre una + carpeta en sus hijos y puedes llegar hasta archivos sueltos. El control **Nivel** abre o cierra todo hasta una + profundidad. Las flechas son _imports_; su grosor, cuántos. +- **Dónde trabaja cada sesión**: anillos del color de la sesión (pulsan mientras la IA trabaja). +- **Qué cambió**: los nodos con archivos modificados se resaltan con sus letras `M` modificado, `A` añadido, `U` sin + seguimiento, `D` borrado (las mismas que ves en el árbol de archivos). +- **Impacto**: el botón ⚡ resalta, con un borde discontinuo, los módulos o archivos que **dependen** (directa o + indirectamente) de lo que cambió la sesión enfocada: el radio de alcance del cambio. + +Se analizan TS/JS, Svelte, Vue, Astro, Python y Rust. Las dependencias se calculan por heurística (imports, `$lib`/`#lib`, +`mod`/`use crate`): úsalas como mapa, no como verdad absoluta. + +## Cuándo usarlo y cuándo no + +- **Sí**: entender una base de código por primera vez, ver dónde trabajan las sesiones y estimar el alcance de un cambio. +- **No**: para revisar. Para eso están la **lista o el árbol de archivos cambiados** de [Revisión](https://github.com/ModusZero/mod0/blob/main/docs/guide/review.md) + y las letras M/U/A/D en el árbol de archivos. diff --git a/docs/guide/providers.md b/docs/guide/providers.md new file mode 100644 index 0000000..6ab5502 --- /dev/null +++ b/docs/guide/providers.md @@ -0,0 +1,66 @@ +# Proveedores y CLI + +MOD0 **no implementa ningún proveedor de IA**: envuelve una CLI. Tu clave y tu modelo siguen siendo tuyos. Hay dos +caminos, según cuánta observación quieras. + +> Los nombres de modelo y los endpoints de cada proveedor cambian con frecuencia. Lo de esta página es lo que indicaban +> sus documentaciones en noviembre de 2026: verifícalo antes de usarlo. + +## Camino 1: Claude Code con otro proveedor (observación completa) + +Claude Code puede apuntar a **cualquier endpoint compatible con la API de Anthropic** mediante variables de entorno. +Así mantienes todo lo que ofrece MOD0 (hooks, thinking graph, plan, estados exactos) con otros modelos. + +| Plantilla de MOD0 | `ANTHROPIC_BASE_URL` | Clave (variable del sistema) | +| ------------------------------ | ---------------------------------------------------- | ---------------------------- | +| Claude Code · OpenRouter | `https://openrouter.ai/api` | `OPENROUTER_API_KEY` | +| Claude Code · Z.ai (GLM) | `https://api.z.ai/api/anthropic` | `ZAI_API_KEY` | +| Claude Code · Qwen (DashScope) | `https://dashscope-intl.aliyuncs.com/apps/anthropic` | `DASHSCOPE_API_KEY` | +| Claude Code · DeepSeek | `https://api.deepseek.com/anthropic` | `DEEPSEEK_API_KEY` | +| Claude Code · endpoint propio | tu gateway (LiteLLM, proxy local…) | la que definas | + +Cada plantilla rellena `ANTHROPIC_BASE_URL` y `ANTHROPIC_AUTH_TOKEN=$VARIABLE`. Con OpenRouter además se deja +`ANTHROPIC_API_KEY` **vacía a propósito**. Para elegir el modelo, añade en el perfil las variables +`ANTHROPIC_DEFAULT_SONNET_MODEL`, `ANTHROPIC_DEFAULT_OPUS_MODEL` y `ANTHROPIC_DEFAULT_HAIKU_MODEL` (o `ANTHROPIC_MODEL`) +con el identificador del modelo de ese proveedor. + +**Límites**: OpenRouter solo garantiza el funcionamiento con modelos de Anthropic; con otros puede fallar, sobre todo si +el modelo es débil usando herramientas. Instalar Claude Code: `npm install -g @anthropic-ai/claude-code`. + +## Camino 2: otras CLI (estado por actividad) + +| CLI | Comando | Instalación (referencia) | Configuración | +| ---------- | ---------- | ------------------------------------------------------ | ----------------------------------------------------------------------------- | +| Aider | `aider` | `python -m pip install aider-install && aider-install` | `OPENROUTER_API_KEY` y `--model openrouter/` | +| OpenCode | `opencode` | `npm install -g opencode-ai` | dentro de la CLI (`opencode auth login`) | +| Qwen Code | `qwen` | `npm install -g @qwen-code/qwen-code` | variables estilo OpenAI (`OPENAI_API_KEY`, `OPENAI_BASE_URL`, `OPENAI_MODEL`) | +| Codex CLI | `codex` | `npm install -g @openai/codex` | dentro de la CLI | +| Gemini CLI | `gemini` | `npm install -g @google/gemini-cli` | dentro de la CLI | + +Con estas CLI obtienes la terminal, el estado inferido por actividad (_trabajando_ mientras hay salida reciente, _en +reposo_ tras 2,5 s de silencio), la revisión, los worktrees, el kanban, el mapa del proyecto y los avisos. **No** hay +thinking graph, plan ni estado _esperando_ exacto: dependen de los hooks de Claude Code. + +## Claves: `$NOMBRE` + +En el perfil escribe `CLAVE=$VARIABLE`: MOD0 lee `VARIABLE` de las variables de entorno **de tu sistema** al lanzar la +sesión, así la clave no se guarda en ningún archivo. En Windows: + +```powershell +setx OPENROUTER_API_KEY "sk-or-..." # reinicia MOD0 después +``` + +En _Ajustes → Perfiles de CLI_ cada perfil muestra ✓ si el comando está instalado y avisa de las variables sin definir. +Si prefieres, configura la CLI como siempre desde la terminal de la sesión: MOD0 no se interpone. + +## Probar modelos gratuitos (p. ej. los `:free` de OpenRouter o NVIDIA) + +Sirven para tareas acotadas, pero **no hay garantía** de que un modelo pequeño o gratuito sea fiable en un bucle +agéntico (llamadas a herramientas encadenadas, ediciones largas). Cómo probarlos con criterio: + +1. Crea un perfil con el modelo (plantilla de Claude Code · OpenRouter, o Aider con `--model openrouter/`). +2. Lanza **dos sesiones con la misma tarea**, cada una en su worktree y con un modelo distinto, y compara los diffs en + _Revisión_. Es exactamente el caso para el que sirven los worktrees. +3. Fíjate en errores de herramientas, reintentos en el diagrama y contexto consumido. +4. **Privacidad**: los modelos gratuitos suelen tener límites de uso y políticas de datos distintas (algunos usan los + prompts para entrenar). No envíes código privado de terceros sin leer la política del proveedor. diff --git a/docs/guide/remote.md b/docs/guide/remote.md new file mode 100644 index 0000000..451d81d --- /dev/null +++ b/docs/guide/remote.md @@ -0,0 +1,24 @@ +# Trabajo remoto + +Idea: que el agente siga trabajando aunque tu conexión o tu equipo se caigan, ejecutándolo en un servidor (por ejemplo un +**GitHub Codespace** o una máquina por SSH). + +## Lo que funciona hoy + +Una sesión es una terminal: puedes lanzar una conexión remota como si fuera una CLI. + +- Plantilla **Codespace remoto (gh)**: ejecuta `gh codespace ssh`. Dentro del Codespace usa **tmux** + (`tmux new -A -s mod0`) y lanza allí la CLI: si se corta la conexión, la sesión sigue viva y al reconectar la retomas. +- También sirve un perfil con `ssh usuario@servidor`. + +## Límites actuales + +- La **revisión**, el **mapa del proyecto** y el **árbol de archivos** trabajan sobre carpetas **locales**: no ven los + archivos del servidor. +- Los **hooks** de Claude Code apuntan a `127.0.0.1` de tu equipo: en remoto no llegan, así que el estado se infiere por + actividad (sin thinking graph ni plan). + +## Hacia dónde va + +El plan (v0.6) es un espacio de trabajo remoto de verdad: ejecutar `git` y leer archivos por SSH y reenviar los hooks con +un túnel inverso, para tener revisión, grafos y observación completa también en remoto. Mira `PLAN.md`. diff --git a/docs/guide/review.md b/docs/guide/review.md new file mode 100644 index 0000000..4b08a54 --- /dev/null +++ b/docs/guide/review.md @@ -0,0 +1,25 @@ +# Revisión + +El trabajo real del humano es **revisar**. Cada sesión se compara contra el **commit con el que empezó** (no solo contra +`HEAD`), así ves todo lo que hizo aunque haya hecho commits por su cuenta. + +## Lista de archivos cambiados + +Panel lateral, con estado `M`/`A`/`D`/`U`, líneas +/− y una marca de **revisado** por archivo. Dos vistas: + +- **Lista plana**: todos los archivos con su carpeta. +- **Árbol por carpetas**: como el control de versiones de un editor, con carpetas compactadas (`src/auth`) y el número + de archivos cambiados en cada una. + +Al abrir la pestaña se selecciona el primer archivo para revisar sin clics extra. + +## Diff + +Lado a lado (CodeMirror), con lo no modificado colapsado. Desde ahí puedes **abrir el archivo en el editor** para +retocar (con _Guardado automático_ opcional en Ajustes). + +## Aprobar y hacer commit + +- **Marcar revisada** marca la sesión como revisada (sale de _Por revisar_). +- **Commit** hace `git add -A` + `git commit` con tu mensaje (por defecto, el nombre de la sesión) y marca la sesión + como revisada. diff --git a/docs/guide/sessions.md b/docs/guide/sessions.md new file mode 100644 index 0000000..c10695b --- /dev/null +++ b/docs/guide/sessions.md @@ -0,0 +1,26 @@ +# Sesiones + +## Crear una sesión + +`Ctrl+Shift+N` (o el botón **Nueva sesión**). Campos: + +- **Nombre**: se usa también para el worktree y la rama. +- **CLI**: un perfil de _Ajustes → Perfiles de CLI_. +- **Aislamiento**: _Misma carpeta_ (dos sesiones pueden pisarse archivos) o **Worktree propio**: crea una rama + (`mod0/`) y una carpeta hermana del proyecto. Ideal para varias sesiones en paralelo. +- **Prompt inicial** (opcional): se pasa a la CLI como argumento y se aplana a una línea. + +## Moverte entre sesiones + +- `Alt+1…9` salta a la sesión _n_ (en orden de creación). +- `Ctrl+Shift+A` salta a la siguiente que te necesita (bloqueada o por revisar). +- El panel de la derecha muestra todas, siempre visible; doble clic abre su thinking graph. + +## Detener, reanudar, eliminar + +En cada tarjeta: **Detener**, **Reanudar** (con Claude Code retoma la conversación con `--resume`), **Renombrar** y +**Eliminar** (te pregunta si quieres borrar también el worktree: los cambios sin commit se pierden). + +## Persistencia + +Al cerrar MOD0, las sesiones quedan como _finalizadas_ con su historial de pasos; al abrirlo puedes reanudarlas. diff --git a/docs/guide/thinking-graph.md b/docs/guide/thinking-graph.md new file mode 100644 index 0000000..395d765 --- /dev/null +++ b/docs/guide/thinking-graph.md @@ -0,0 +1,28 @@ +# Thinking Graph + +El razonamiento de una sesión como **grafo** en lugar de un muro de texto. + +## Dos vistas + +- **Diagrama** (por defecto): cada turno se resume en **fases** encadenadas con flechas. Pasos consecutivos del mismo + tipo se agrupan en una caja (_Lectura ×4_, _Edición ×3_, _Comando ×2_…). Así se ve de lejos el patrón + explorar → editar → verificar → reintentar → listo. Las llamadas en paralelo y los reintentos tras un fallo (una + fase de edición justo después de una que falló) se dibujan como tales. Haz clic en una fase para ver sus pasos. +- **Cronología**: paso a paso, como un historial de git, con las ramas paralelas a la derecha y el _porqué_ de cada paso. + +Los turnos antiguos se colapsan solos; _Seguir_ mantiene la vista en lo último que hace la IA. + +## El plan + +Si la CLI usa su lista de tareas (`TodoWrite` en Claude Code), MOD0 muestra el **plan** en la barra lateral y un +progreso `3/7` en la tarjeta de la sesión: cómo va **desagregando tareas** y cuál está haciendo ahora. + +## De dónde salen los datos + +De los hooks de Claude Code (`PreToolUse`, `PostToolUse`, `Stop`…) y del transcript (el texto previo a cada +herramienta, los errores y el contexto usado). No cuesta tokens. Con otras CLI no hay thinking graph. + +## ¿Una sesión hace una sola cosa a la vez? + +Casi siempre es una cadena secuencial; a veces lanza varias herramientas en paralelo (ramas hermanas) o delega en +subagentes. Por eso el diagrama agrupa por fases y la cronología admite ramas. diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.md new file mode 100644 index 0000000..987b4f9 --- /dev/null +++ b/docs/guide/troubleshooting.md @@ -0,0 +1,49 @@ +# Solución de problemas + +## `npm run tauri dev`: «Found version mismatched Tauri packages» + +Los paquetes npm de Tauri y los crates de Rust deben coincidir en versión mayor y **menor**. El proyecto los fija a la +misma (npm con `~`, Rust con `Cargo.lock`). Si actualizas uno, actualiza el otro: + +```bash +cd src-tauri && cargo update -p tauri -p tauri-plugin-dialog -p tauri-plugin-opener -p tauri-plugin-os +cd .. && npm install @tauri-apps/api@latest @tauri-apps/cli@latest @tauri-apps/plugin-dialog@latest \ + @tauri-apps/plugin-opener@latest @tauri-apps/plugin-os@latest +``` + +## Cargo: «[28] Timeout was reached (Operation too slow…)» al descargar crates + +Es un problema de **conexión**, no del proyecto: Cargo descarga unas 400 dependencias y aborta si la velocidad baja de +10 bytes/s durante 30 s. Qué hacer: + +- `src-tauri/.cargo/config.toml` ya sube el tiempo límite y los reintentos (`timeout = 300`, `low-speed-limit = 1`, + `retry = 10`, sin multiplexado). +- **Descarga primero con buena conexión** (datos del móvil, otra red) y compila después sin red: + `cd src-tauri && cargo fetch` y luego `cargo build --offline`. +- Reintenta: lo ya descargado queda en caché y cada intento avanza. +- Un _mirror_ de crates.io (`[source]` en `~/.cargo/config.toml`) también ayuda si tu red lo bloquea. + +## «No se encontró `claude` en el PATH» + +Instala la CLI (`npm install -g @anthropic-ai/claude-code`) y comprueba que su carpeta está en el `PATH` del sistema. +Tras cambiar el `PATH` o variables de entorno **reinicia MOD0**: las lee al arrancar. + +## La sesión se queda en «Iniciando» y no aparece el thinking graph + +MOD0 espera 20 s los hooks de Claude Code; si no llegan, pasa a inferir el estado por actividad. Comprueba: +_Ajustes → Acerca de → Observador_ (debe mostrar un puerto), que el perfil tenga **hooks** activados, y que tu +configuración de Claude Code no restrinja los hooks HTTP (`allowedHttpHookUrls`). + +## Variables de entorno sin definir + +El perfil muestra «Variables de entorno sin definir: X». Define `X` en el sistema (`setx X "valor"` en Windows) y +reinicia MOD0. + +## La terminal se ve mal o con letra enorme + +xterm usa WebGL en la sesión visible. Si en tu equipo (p. ej. con escala del 125 % o 150 %) se ve distorsionado, +cámbialo en un issue indicando tarjeta gráfica y escala; el plan es desactivar WebGL por defecto si hace falta. + +## Windows pide confirmación al instalar + +Los instaladores no están firmados. SmartScreen puede avisar la primera vez: _Más información → Ejecutar de todas formas_. diff --git a/docs/screenshots/en/files-graph.webp b/docs/screenshots/en/files-graph.webp new file mode 100644 index 0000000..140a073 Binary files /dev/null and b/docs/screenshots/en/files-graph.webp differ diff --git a/docs/screenshots/en/files-impact.webp b/docs/screenshots/en/files-impact.webp new file mode 100644 index 0000000..d83a185 Binary files /dev/null and b/docs/screenshots/en/files-impact.webp differ diff --git a/docs/screenshots/en/kanban.webp b/docs/screenshots/en/kanban.webp new file mode 100644 index 0000000..f45f239 Binary files /dev/null and b/docs/screenshots/en/kanban.webp differ diff --git a/docs/screenshots/en/review-tree.webp b/docs/screenshots/en/review-tree.webp new file mode 100644 index 0000000..67fb92e Binary files /dev/null and b/docs/screenshots/en/review-tree.webp differ diff --git a/docs/screenshots/en/review.webp b/docs/screenshots/en/review.webp new file mode 100644 index 0000000..fc0fc34 Binary files /dev/null and b/docs/screenshots/en/review.webp differ diff --git a/docs/screenshots/en/sessions.webp b/docs/screenshots/en/sessions.webp new file mode 100644 index 0000000..978e053 Binary files /dev/null and b/docs/screenshots/en/sessions.webp differ diff --git a/docs/screenshots/en/thinking-graph.webp b/docs/screenshots/en/thinking-graph.webp new file mode 100644 index 0000000..ecb4214 Binary files /dev/null and b/docs/screenshots/en/thinking-graph.webp differ diff --git a/docs/screenshots/en/thinking-timeline.webp b/docs/screenshots/en/thinking-timeline.webp new file mode 100644 index 0000000..fe36386 Binary files /dev/null and b/docs/screenshots/en/thinking-timeline.webp differ diff --git a/docs/screenshots/es/files-graph.webp b/docs/screenshots/es/files-graph.webp new file mode 100644 index 0000000..f87b710 Binary files /dev/null and b/docs/screenshots/es/files-graph.webp differ diff --git a/docs/screenshots/es/files-impact.webp b/docs/screenshots/es/files-impact.webp new file mode 100644 index 0000000..79b83ae Binary files /dev/null and b/docs/screenshots/es/files-impact.webp differ diff --git a/docs/screenshots/es/kanban.webp b/docs/screenshots/es/kanban.webp new file mode 100644 index 0000000..f8ed53b Binary files /dev/null and b/docs/screenshots/es/kanban.webp differ diff --git a/docs/screenshots/es/review-tree.webp b/docs/screenshots/es/review-tree.webp new file mode 100644 index 0000000..855effe Binary files /dev/null and b/docs/screenshots/es/review-tree.webp differ diff --git a/docs/screenshots/es/review.webp b/docs/screenshots/es/review.webp new file mode 100644 index 0000000..39e5e1a Binary files /dev/null and b/docs/screenshots/es/review.webp differ diff --git a/docs/screenshots/es/sessions.webp b/docs/screenshots/es/sessions.webp new file mode 100644 index 0000000..93f2b6c Binary files /dev/null and b/docs/screenshots/es/sessions.webp differ diff --git a/docs/screenshots/es/thinking-graph.webp b/docs/screenshots/es/thinking-graph.webp new file mode 100644 index 0000000..124e22d Binary files /dev/null and b/docs/screenshots/es/thinking-graph.webp differ diff --git a/docs/screenshots/es/thinking-timeline.webp b/docs/screenshots/es/thinking-timeline.webp new file mode 100644 index 0000000..3bc7f64 Binary files /dev/null and b/docs/screenshots/es/thinking-timeline.webp differ diff --git a/llms.txt b/llms.txt new file mode 100644 index 0000000..09f32e8 --- /dev/null +++ b/llms.txt @@ -0,0 +1,23 @@ +# MOD0 (ModusZero) + +> Mission control para sesiones de CLI con IA (Claude Code y otras): ve qué hace cada sesión, en qué archivo trabaja, +> qué piensa y cuál te necesita. Herramienta personal, abierta y no comercial. App de escritorio (Tauri 2 + Svelte 5). + +## Documentación para personas + +- [Índice](docs/README.md) +- [Primeros pasos](docs/getting-started.md) +- [Conceptos](docs/guide/concepts.md) +- [Proveedores y CLI](docs/guide/providers.md) +- [Solución de problemas](docs/guide/troubleshooting.md) +- [Arquitectura](docs/guide/architecture.md) + +## Contexto para IA + +- [Contexto global del proyecto](docs/CONTEXT.md): visión, decisiones, arquitectura, contratos IPC y convenciones. +- [Plan actual](docs/PLAN.md): tareas y registro de releases. +- [Guía de contribución](CONTRIBUTING.md) + +## Código + +- `src/`: frontend. `src-tauri/src/`: backend en Rust. `scripts/`: backend simulado y capturas. diff --git a/package-lock.json b/package-lock.json index 234a9ef..a118823 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,3311 +1,2740 @@ { - "name": "mod0", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "mod0", - "version": "0.1.0", - "license": "Apache-2.0", - "dependencies": { - "@codemirror/lang-javascript": "^6.2.4", - "@codemirror/language-data": "^6.5.2", - "@codemirror/theme-one-dark": "^6.1.3", - "@tauri-apps/api": "^2", - "@tauri-apps/plugin-dialog": "^2.6.0", - "@tauri-apps/plugin-opener": "^2", - "@tauri-apps/plugin-os": "^2.3.2", - "@tauri-apps/plugin-window-state": "^2.4.1", - "codemirror": "^6.0.2", - "lucide-svelte": "^0.563.0" - }, - "devDependencies": { - "@sveltejs/adapter-static": "^3.0.6", - "@sveltejs/kit": "^2.9.0", - "@sveltejs/vite-plugin-svelte": "^5.0.0", - "@tailwindcss/postcss": "^4.1.18", - "@tauri-apps/cli": "^2", - "autoprefixer": "^10.4.24", - "postcss": "^8.5.6", - "svelte": "^5.0.0", - "svelte-check": "^4.0.0", - "tailwindcss": "^4.1.18", - "typescript": "~5.6.2", - "vite": "^6.0.3" - } - }, - "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/@codemirror/autocomplete": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.0.tgz", - "integrity": "sha512-bOwvTOIJcG5FVo5gUUupiwYh8MioPLQ4UcqbcRf7UQ98X90tCa9E1kZ3Z7tqwpZxYyOvh1YTYbmZE9RTfTp5hg==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.17.0", - "@lezer/common": "^1.0.0" - } - }, - "node_modules/@codemirror/commands": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.10.2.tgz", - "integrity": "sha512-vvX1fsih9HledO1c9zdotZYUZnE4xV0m6i3m25s5DIfXofuprk6cRcLUZvSk3CASUbwjQX21tOGbkY2BH8TpnQ==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.4.0", - "@codemirror/view": "^6.27.0", - "@lezer/common": "^1.1.0" - } - }, - "node_modules/@codemirror/lang-angular": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@codemirror/lang-angular/-/lang-angular-0.1.4.tgz", - "integrity": "sha512-oap+gsltb/fzdlTQWD6BFF4bSLKcDnlxDsLdePiJpCVNKWXSTAbiiQeYI3UmES+BLAdkmIC1WjyztC1pi/bX4g==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-html": "^6.0.0", - "@codemirror/lang-javascript": "^6.1.2", - "@codemirror/language": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.3.3" - } - }, - "node_modules/@codemirror/lang-cpp": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@codemirror/lang-cpp/-/lang-cpp-6.0.3.tgz", - "integrity": "sha512-URM26M3vunFFn9/sm6rzqrBzDgfWuDixp85uTY49wKudToc2jTHUrKIGGKs+QWND+YLofNNZpxcNGRynFJfvgA==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@lezer/cpp": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-css": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/@codemirror/lang-css/-/lang-css-6.3.1.tgz", - "integrity": "sha512-kr5fwBGiGtmz6l0LSJIbno9QrifNMUusivHbnA1H6Dmqy4HZFte3UAICix1VuKo0lMPKQr2rqB+0BkKi/S3Ejg==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.0.2", - "@lezer/css": "^1.1.7" - } - }, - "node_modules/@codemirror/lang-go": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@codemirror/lang-go/-/lang-go-6.0.1.tgz", - "integrity": "sha512-7fNvbyNylvqCphW9HD6WFnRpcDjr+KXX/FgqXy5H5ZS0eC5edDljukm/yNgYkwTsgp2busdod50AOTIy6Jikfg==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.6.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/go": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-html": { - "version": "6.4.11", - "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.11.tgz", - "integrity": "sha512-9NsXp7Nwp891pQchI7gPdTwBuSuT3K65NGTHWHNJ55HjYcHLllr0rbIZNdOzas9ztc1EUVBlHou85FFZS4BNnw==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/lang-css": "^6.0.0", - "@codemirror/lang-javascript": "^6.0.0", - "@codemirror/language": "^6.4.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.17.0", - "@lezer/common": "^1.0.0", - "@lezer/css": "^1.1.0", - "@lezer/html": "^1.3.12" - } - }, - "node_modules/@codemirror/lang-java": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-java/-/lang-java-6.0.2.tgz", - "integrity": "sha512-m5Nt1mQ/cznJY7tMfQTJchmrjdjQ71IDs+55d1GAa8DGaB8JXWsVCkVT284C3RTASaY43YknrK2X3hPO/J3MOQ==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@lezer/java": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-javascript": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.2.4.tgz", - "integrity": "sha512-0WVmhp1QOqZ4Rt6GlVGwKJN3KW7Xh4H2q8ZZNGZaP6lRdxXJzmjm4FqvmOojVj6khWJHIb9sp7U/72W7xQgqAA==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.6.0", - "@codemirror/lint": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.17.0", - "@lezer/common": "^1.0.0", - "@lezer/javascript": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-jinja": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@codemirror/lang-jinja/-/lang-jinja-6.0.0.tgz", - "integrity": "sha512-47MFmRcR8UAxd8DReVgj7WJN1WSAMT7OJnewwugZM4XiHWkOjgJQqvEM1NpMj9ALMPyxmlziEI1opH9IaEvmaw==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-html": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.2.0", - "@lezer/lr": "^1.4.0" - } - }, - "node_modules/@codemirror/lang-json": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-json/-/lang-json-6.0.2.tgz", - "integrity": "sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@lezer/json": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-less": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-less/-/lang-less-6.0.2.tgz", - "integrity": "sha512-EYdQTG22V+KUUk8Qq582g7FMnCZeEHsyuOJisHRft/mQ+ZSZ2w51NupvDUHiqtsOy7It5cHLPGfHQLpMh9bqpQ==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-css": "^6.2.0", - "@codemirror/language": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-liquid": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/@codemirror/lang-liquid/-/lang-liquid-6.3.1.tgz", - "integrity": "sha512-S/jE/D7iij2Pu70AC65ME6AYWxOOcX20cSJvaPgY5w7m2sfxsArAcUAuUgm/CZCVmqoi9KiOlS7gj/gyLipABw==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/lang-html": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.3.1" - } - }, - "node_modules/@codemirror/lang-markdown": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@codemirror/lang-markdown/-/lang-markdown-6.5.0.tgz", - "integrity": "sha512-0K40bZ35jpHya6FriukbgaleaqzBLZfOh7HuzqbMxBXkbYMJDxfF39c23xOgxFezR+3G+tR2/Mup+Xk865OMvw==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.7.1", - "@codemirror/lang-html": "^6.0.0", - "@codemirror/language": "^6.3.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.2.1", - "@lezer/markdown": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-php": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-php/-/lang-php-6.0.2.tgz", - "integrity": "sha512-ZKy2v1n8Fc8oEXj0Th0PUMXzQJ0AIR6TaZU+PbDHExFwdu+guzOA4jmCHS1Nz4vbFezwD7LyBdDnddSJeScMCA==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-html": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/php": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-python": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@codemirror/lang-python/-/lang-python-6.2.1.tgz", - "integrity": "sha512-IRjC8RUBhn9mGR9ywecNhB51yePWCGgvHfY1lWN/Mrp3cKuHr0isDKia+9HnvhiWNnMpbGhWrkhuWOc09exRyw==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.3.2", - "@codemirror/language": "^6.8.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.2.1", - "@lezer/python": "^1.1.4" - } - }, - "node_modules/@codemirror/lang-rust": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-rust/-/lang-rust-6.0.2.tgz", - "integrity": "sha512-EZaGjCUegtiU7kSMvOfEZpaCReowEf3yNidYu7+vfuGTm9ow4mthAparY5hisJqOHmJowVH3Upu+eJlUji6qqA==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@lezer/rust": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-sass": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-sass/-/lang-sass-6.0.2.tgz", - "integrity": "sha512-l/bdzIABvnTo1nzdY6U+kPAC51czYQcOErfzQ9zSm9D8GmNPD0WTW8st/CJwBTPLO8jlrbyvlSEcN20dc4iL0Q==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-css": "^6.2.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.0.2", - "@lezer/sass": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-sql": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@codemirror/lang-sql/-/lang-sql-6.10.0.tgz", - "integrity": "sha512-6ayPkEd/yRw0XKBx5uAiToSgGECo/GY2NoJIHXIIQh1EVwLuKoU8BP/qK0qH5NLXAbtJRLuT73hx7P9X34iO4w==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-vue": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@codemirror/lang-vue/-/lang-vue-0.1.3.tgz", - "integrity": "sha512-QSKdtYTDRhEHCfo5zOShzxCmqKJvgGrZwDQSdbvCRJ5pRLWBS7pD/8e/tH44aVQT6FKm0t6RVNoSUWHOI5vNug==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-html": "^6.0.0", - "@codemirror/lang-javascript": "^6.1.2", - "@codemirror/language": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.3.1" - } - }, - "node_modules/@codemirror/lang-wast": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-wast/-/lang-wast-6.0.2.tgz", - "integrity": "sha512-Imi2KTpVGm7TKuUkqyJ5NRmeFWF7aMpNiwHnLQe0x9kmrxElndyH0K6H/gXtWwY6UshMRAhpENsgfpSwsgmC6Q==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-xml": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@codemirror/lang-xml/-/lang-xml-6.1.0.tgz", - "integrity": "sha512-3z0blhicHLfwi2UgkZYRPioSgVTo9PV5GP5ducFH6FaHy0IAJRg+ixj5gTR1gnT/glAIC8xv4w2VL1LoZfs+Jg==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.4.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/xml": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-yaml": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-yaml/-/lang-yaml-6.1.2.tgz", - "integrity": "sha512-dxrfG8w5Ce/QbT7YID7mWZFKhdhsaTNOYjOkSIMt1qmC4VQnXSDSYVHHHn8k6kJUfIhtLo8t1JJgltlxWdsITw==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.2.0", - "@lezer/lr": "^1.0.0", - "@lezer/yaml": "^1.0.0" - } - }, - "node_modules/@codemirror/language": { - "version": "6.12.1", - "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.12.1.tgz", - "integrity": "sha512-Fa6xkSiuGKc8XC8Cn96T+TQHYj4ZZ7RdFmXA3i9xe/3hLHfwPZdM+dqfX0Cp0zQklBKhVD8Yzc8LS45rkqcwpQ==", - "license": "MIT", - "dependencies": { - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.23.0", - "@lezer/common": "^1.5.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0", - "style-mod": "^4.0.0" - } - }, - "node_modules/@codemirror/language-data": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/@codemirror/language-data/-/language-data-6.5.2.tgz", - "integrity": "sha512-CPkWBKrNS8stYbEU5kwBwTf3JB1kghlbh4FSAwzGW2TEscdeHHH4FGysREW86Mqnj3Qn09s0/6Ea/TutmoTobg==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-angular": "^0.1.0", - "@codemirror/lang-cpp": "^6.0.0", - "@codemirror/lang-css": "^6.0.0", - "@codemirror/lang-go": "^6.0.0", - "@codemirror/lang-html": "^6.0.0", - "@codemirror/lang-java": "^6.0.0", - "@codemirror/lang-javascript": "^6.0.0", - "@codemirror/lang-jinja": "^6.0.0", - "@codemirror/lang-json": "^6.0.0", - "@codemirror/lang-less": "^6.0.0", - "@codemirror/lang-liquid": "^6.0.0", - "@codemirror/lang-markdown": "^6.0.0", - "@codemirror/lang-php": "^6.0.0", - "@codemirror/lang-python": "^6.0.0", - "@codemirror/lang-rust": "^6.0.0", - "@codemirror/lang-sass": "^6.0.0", - "@codemirror/lang-sql": "^6.0.0", - "@codemirror/lang-vue": "^0.1.1", - "@codemirror/lang-wast": "^6.0.0", - "@codemirror/lang-xml": "^6.0.0", - "@codemirror/lang-yaml": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/legacy-modes": "^6.4.0" - } - }, - "node_modules/@codemirror/legacy-modes": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/@codemirror/legacy-modes/-/legacy-modes-6.5.2.tgz", - "integrity": "sha512-/jJbwSTazlQEDOQw2FJ8LEEKVS72pU0lx6oM54kGpL8t/NJ2Jda3CZ4pcltiKTdqYSRk3ug1B3pil1gsjA6+8Q==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0" - } - }, - "node_modules/@codemirror/lint": { - "version": "6.9.3", - "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.9.3.tgz", - "integrity": "sha512-y3YkYhdnhjDBAe0VIA0c4wVoFOvnp8CnAvfLqi0TqotIv92wIlAAP7HELOpLBsKwjAX6W92rSflA6an/2zBvXw==", - "license": "MIT", - "dependencies": { - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.35.0", - "crelt": "^1.0.5" - } - }, - "node_modules/@codemirror/search": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.6.0.tgz", - "integrity": "sha512-koFuNXcDvyyotWcgOnZGmY7LZqEOXZaaxD/j6n18TCLx2/9HieZJ5H6hs1g8FiRxBD0DNfs0nXn17g872RmYdw==", - "license": "MIT", - "dependencies": { - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.37.0", - "crelt": "^1.0.5" - } - }, - "node_modules/@codemirror/state": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.5.4.tgz", - "integrity": "sha512-8y7xqG/hpB53l25CIoit9/ngxdfoG+fx+V3SHBrinnhOtLvKHRyAJJuHzkWrR4YXXLX8eXBsejgAAxHUOdW1yw==", - "license": "MIT", - "dependencies": { - "@marijn/find-cluster-break": "^1.0.0" - } - }, - "node_modules/@codemirror/theme-one-dark": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/@codemirror/theme-one-dark/-/theme-one-dark-6.1.3.tgz", - "integrity": "sha512-NzBdIvEJmx6fjeremiGp3t/okrLPYT0d9orIc7AFun8oZcRk58aejkqhv6spnz4MLAevrKNPMQYXEWMg4s+sKA==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/highlight": "^1.0.0" - } - }, - "node_modules/@codemirror/view": { - "version": "6.39.12", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.39.12.tgz", - "integrity": "sha512-f+/VsHVn/kOA9lltk/GFzuYwVVAKmOnNjxbrhkk3tPHntFqjWeI2TbIXx006YkBkqC10wZ4NsnWXCQiFPeAISQ==", - "license": "MIT", - "dependencies": { - "@codemirror/state": "^6.5.0", - "crelt": "^1.0.6", - "style-mod": "^4.1.0", - "w3c-keyname": "^2.2.4" - } - }, - "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/@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==", - "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==", - "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==", - "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==", - "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==", - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@lezer/common": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.5.1.tgz", - "integrity": "sha512-6YRVG9vBkaY7p1IVxL4s44n5nUnaNnGM2/AckNgYOnxTG2kWh1vR8BMxPseWPjRNpb5VtXnMpeYAEAADoRV1Iw==", - "license": "MIT" - }, - "node_modules/@lezer/cpp": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@lezer/cpp/-/cpp-1.1.5.tgz", - "integrity": "sha512-DIhSXmYtJKLehrjzDFN+2cPt547ySQ41nA8yqcDf/GxMc+YM736xqltFkvADL2M0VebU5I+3+4ks2Vv+Kyq3Aw==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/css": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.3.1.tgz", - "integrity": "sha512-PYAKeUVBo3HFThruRyp/iK91SwiZJnzXh8QzkQlwijB5y+N5iB28+iLk78o2zmKqqV0uolNhCwFqB8LA7b0Svg==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.3.0" - } - }, - "node_modules/@lezer/go": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@lezer/go/-/go-1.0.1.tgz", - "integrity": "sha512-xToRsYxwsgJNHTgNdStpcvmbVuKxTapV0dM0wey1geMMRc9aggoVyKgzYp41D2/vVOx+Ii4hmE206kvxIXBVXQ==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.3.0" - } - }, - "node_modules/@lezer/highlight": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.3.tgz", - "integrity": "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.3.0" - } - }, - "node_modules/@lezer/html": { - "version": "1.3.13", - "resolved": "https://registry.npmjs.org/@lezer/html/-/html-1.3.13.tgz", - "integrity": "sha512-oI7n6NJml729m7pjm9lvLvmXbdoMoi2f+1pwSDJkl9d68zGr7a9Btz8NdHTGQZtW2DA25ybeuv/SyDb9D5tseg==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/java": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@lezer/java/-/java-1.1.3.tgz", - "integrity": "sha512-yHquUfujwg6Yu4Fd1GNHCvidIvJwi/1Xu2DaKl/pfWIA2c1oXkVvawH3NyXhCaFx4OdlYBVX5wvz2f7Aoa/4Xw==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/javascript": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.5.4.tgz", - "integrity": "sha512-vvYx3MhWqeZtGPwDStM2dwgljd5smolYD2lR2UyFcHfxbBQebqx8yjmFmxtJ/E6nN6u1D9srOiVWm3Rb4tmcUA==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.1.3", - "@lezer/lr": "^1.3.0" - } - }, - "node_modules/@lezer/json": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@lezer/json/-/json-1.0.3.tgz", - "integrity": "sha512-BP9KzdF9Y35PDpv04r0VeSTKDeox5vVr3efE7eBbx3r4s3oNLfunchejZhjArmeieBH+nVOpgIiBJpEAv8ilqQ==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/lr": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.8.tgz", - "integrity": "sha512-bPWa0Pgx69ylNlMlPvBPryqeLYQjyJjqPx+Aupm5zydLIF3NE+6MMLT8Yi23Bd9cif9VS00aUebn+6fDIGBcDA==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.0.0" - } - }, - "node_modules/@lezer/markdown": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@lezer/markdown/-/markdown-1.6.3.tgz", - "integrity": "sha512-jpGm5Ps+XErS+xA4urw7ogEGkeZOahVQF21Z6oECF0sj+2liwZopd2+I8uH5I/vZsRuuze3OxBREIANLf6KKUw==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.5.0", - "@lezer/highlight": "^1.0.0" - } - }, - "node_modules/@lezer/php": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@lezer/php/-/php-1.0.5.tgz", - "integrity": "sha512-W7asp9DhM6q0W6DYNwIkLSKOvxlXRrif+UXBMxzsJUuqmhE7oVU+gS3THO4S/Puh7Xzgm858UNaFi6dxTP8dJA==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.1.0" - } - }, - "node_modules/@lezer/python": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/@lezer/python/-/python-1.1.18.tgz", - "integrity": "sha512-31FiUrU7z9+d/ElGQLJFXl+dKOdx0jALlP3KEOsGTex8mvj+SoE1FgItcHWK/axkxCHGUSpqIHt6JAWfWu9Rhg==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/rust": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@lezer/rust/-/rust-1.0.2.tgz", - "integrity": "sha512-Lz5sIPBdF2FUXcWeCu1//ojFAZqzTQNRga0aYv6dYXqJqPfMdCAI0NzajWUd4Xijj1IKJLtjoXRPMvTKWBcqKg==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/sass": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@lezer/sass/-/sass-1.1.0.tgz", - "integrity": "sha512-3mMGdCTUZ/84ArHOuXWQr37pnf7f+Nw9ycPUeKX+wu19b7pSMcZGLbaXwvD2APMBDOGxPmpK/O6S1v1EvLoqgQ==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/xml": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@lezer/xml/-/xml-1.0.6.tgz", - "integrity": "sha512-CdDwirL0OEaStFue/66ZmFSeppuL6Dwjlk8qk153mSQwiSH/Dlri4GNymrNWnUmPl2Um7QfV1FO9KFUyX3Twww==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/yaml": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@lezer/yaml/-/yaml-1.0.4.tgz", - "integrity": "sha512-2lrrHqxalACEbxIbsjhqGpSW8kWpUKuY6RHgnSAFZa6qK62wvnPxA8hGOwOoDbwHcOFs5M4o27mjGu+P7TvBmw==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.4.0" - } - }, - "node_modules/@marijn/find-cluster-break": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.2.tgz", - "integrity": "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==", - "license": "MIT" - }, - "node_modules/@polka/url": { - "version": "1.0.0-next.29", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz", - "integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==", - "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/@standard-schema/spec": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", - "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@sveltejs/acorn-typescript": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@sveltejs/acorn-typescript/-/acorn-typescript-1.0.8.tgz", - "integrity": "sha512-esgN+54+q0NjB0Y/4BomT9samII7jGwNy/2a3wNZbT2A2RpmXsXwUt24LvLhx6jUq2gVk4cWEvcRO6MFQbOfNA==", - "license": "MIT", - "peerDependencies": { - "acorn": "^8.9.0" - } - }, - "node_modules/@sveltejs/adapter-static": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-3.0.10.tgz", - "integrity": "sha512-7D9lYFWJmB7zxZyTE/qxjksvMqzMuYrrsyh1f4AlZqeZeACPRySjbC3aFiY55wb1tWUaKOQG9PVbm74JcN2Iew==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@sveltejs/kit": "^2.0.0" - } - }, - "node_modules/@sveltejs/kit": { - "version": "2.50.2", - "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.50.2.tgz", - "integrity": "sha512-875hTUkEbz+MyJIxWbQjfMaekqdmEKUUfR7JyKcpfMRZqcGyrO9Gd+iS1D/Dx8LpE5FEtutWGOtlAh4ReSAiOA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@standard-schema/spec": "^1.0.0", - "@sveltejs/acorn-typescript": "^1.0.5", - "@types/cookie": "^0.6.0", - "acorn": "^8.14.1", - "cookie": "^0.6.0", - "devalue": "^5.6.2", - "esm-env": "^1.2.2", - "kleur": "^4.1.5", - "magic-string": "^0.30.5", - "mrmime": "^2.0.0", - "sade": "^1.8.1", - "set-cookie-parser": "^3.0.0", - "sirv": "^3.0.0" - }, - "bin": { - "svelte-kit": "svelte-kit.js" - }, - "engines": { - "node": ">=18.13" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.0.0", - "@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1 || ^5.0.0 || ^6.0.0-next.0", - "svelte": "^4.0.0 || ^5.0.0-next.0", - "typescript": "^5.3.3", - "vite": "^5.0.3 || ^6.0.0 || ^7.0.0-beta.0" - }, - "peerDependenciesMeta": { - "@opentelemetry/api": { - "optional": true - }, - "typescript": { - "optional": true - } - } - }, - "node_modules/@sveltejs/vite-plugin-svelte": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-5.1.1.tgz", - "integrity": "sha512-Y1Cs7hhTc+a5E9Va/xwKlAJoariQyHY+5zBgCZg4PFWNYQ1nMN9sjK1zhw1gK69DuqVP++sht/1GZg1aRwmAXQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@sveltejs/vite-plugin-svelte-inspector": "^4.0.1", - "debug": "^4.4.1", - "deepmerge": "^4.3.1", - "kleur": "^4.1.5", - "magic-string": "^0.30.17", - "vitefu": "^1.0.6" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22" - }, - "peerDependencies": { - "svelte": "^5.0.0", - "vite": "^6.0.0" - } - }, - "node_modules/@sveltejs/vite-plugin-svelte-inspector": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-4.0.1.tgz", - "integrity": "sha512-J/Nmb2Q2y7mck2hyCX4ckVHcR5tu2J+MtBEQqpDrrgELZ2uvraQcK/ioCV61AqkdXFgriksOKIceDcQmqnGhVw==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.3.7" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22" - }, - "peerDependencies": { - "@sveltejs/vite-plugin-svelte": "^5.0.0", - "svelte": "^5.0.0", - "vite": "^6.0.0" - } - }, - "node_modules/@tailwindcss/node": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.18.tgz", - "integrity": "sha512-DoR7U1P7iYhw16qJ49fgXUlry1t4CpXeErJHnQ44JgTSKMaZUdf17cfn5mHchfJ4KRBZRFA/Coo+MUF5+gOaCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/remapping": "^2.3.4", - "enhanced-resolve": "^5.18.3", - "jiti": "^2.6.1", - "lightningcss": "1.30.2", - "magic-string": "^0.30.21", - "source-map-js": "^1.2.1", - "tailwindcss": "4.1.18" - } - }, - "node_modules/@tailwindcss/oxide": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.18.tgz", - "integrity": "sha512-EgCR5tTS5bUSKQgzeMClT6iCY3ToqE1y+ZB0AKldj809QXk1Y+3jB0upOYZrn9aGIzPtUsP7sX4QQ4XtjBB95A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - }, - "optionalDependencies": { - "@tailwindcss/oxide-android-arm64": "4.1.18", - "@tailwindcss/oxide-darwin-arm64": "4.1.18", - "@tailwindcss/oxide-darwin-x64": "4.1.18", - "@tailwindcss/oxide-freebsd-x64": "4.1.18", - "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.18", - "@tailwindcss/oxide-linux-arm64-gnu": "4.1.18", - "@tailwindcss/oxide-linux-arm64-musl": "4.1.18", - "@tailwindcss/oxide-linux-x64-gnu": "4.1.18", - "@tailwindcss/oxide-linux-x64-musl": "4.1.18", - "@tailwindcss/oxide-wasm32-wasi": "4.1.18", - "@tailwindcss/oxide-win32-arm64-msvc": "4.1.18", - "@tailwindcss/oxide-win32-x64-msvc": "4.1.18" - } - }, - "node_modules/@tailwindcss/oxide-android-arm64": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.18.tgz", - "integrity": "sha512-dJHz7+Ugr9U/diKJA0W6N/6/cjI+ZTAoxPf9Iz9BFRF2GzEX8IvXxFIi/dZBloVJX/MZGvRuFA9rqwdiIEZQ0Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-darwin-arm64": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.18.tgz", - "integrity": "sha512-Gc2q4Qhs660bhjyBSKgq6BYvwDz4G+BuyJ5H1xfhmDR3D8HnHCmT/BSkvSL0vQLy/nkMLY20PQ2OoYMO15Jd0A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-darwin-x64": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.18.tgz", - "integrity": "sha512-FL5oxr2xQsFrc3X9o1fjHKBYBMD1QZNyc1Xzw/h5Qu4XnEBi3dZn96HcHm41c/euGV+GRiXFfh2hUCyKi/e+yw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-freebsd-x64": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.18.tgz", - "integrity": "sha512-Fj+RHgu5bDodmV1dM9yAxlfJwkkWvLiRjbhuO2LEtwtlYlBgiAT4x/j5wQr1tC3SANAgD+0YcmWVrj8R9trVMA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.18.tgz", - "integrity": "sha512-Fp+Wzk/Ws4dZn+LV2Nqx3IilnhH51YZoRaYHQsVq3RQvEl+71VGKFpkfHrLM/Li+kt5c0DJe/bHXK1eHgDmdiA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.18.tgz", - "integrity": "sha512-S0n3jboLysNbh55Vrt7pk9wgpyTTPD0fdQeh7wQfMqLPM/Hrxi+dVsLsPrycQjGKEQk85Kgbx+6+QnYNiHalnw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-musl": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.18.tgz", - "integrity": "sha512-1px92582HkPQlaaCkdRcio71p8bc8i/ap5807tPRDK/uw953cauQBT8c5tVGkOwrHMfc2Yh6UuxaH4vtTjGvHg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-gnu": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.18.tgz", - "integrity": "sha512-v3gyT0ivkfBLoZGF9LyHmts0Isc8jHZyVcbzio6Wpzifg/+5ZJpDiRiUhDLkcr7f/r38SWNe7ucxmGW3j3Kb/g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-musl": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.18.tgz", - "integrity": "sha512-bhJ2y2OQNlcRwwgOAGMY0xTFStt4/wyU6pvI6LSuZpRgKQwxTec0/3Scu91O8ir7qCR3AuepQKLU/kX99FouqQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-wasm32-wasi": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.18.tgz", - "integrity": "sha512-LffYTvPjODiP6PT16oNeUQJzNVyJl1cjIebq/rWWBF+3eDst5JGEFSc5cWxyRCJ0Mxl+KyIkqRxk1XPEs9x8TA==", - "bundleDependencies": [ - "@napi-rs/wasm-runtime", - "@emnapi/core", - "@emnapi/runtime", - "@tybys/wasm-util", - "@emnapi/wasi-threads", - "tslib" - ], - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "^1.7.1", - "@emnapi/runtime": "^1.7.1", - "@emnapi/wasi-threads": "^1.1.0", - "@napi-rs/wasm-runtime": "^1.1.0", - "@tybys/wasm-util": "^0.10.1", - "tslib": "^2.4.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.18.tgz", - "integrity": "sha512-HjSA7mr9HmC8fu6bdsZvZ+dhjyGCLdotjVOgLA2vEqxEBZaQo9YTX4kwgEvPCpRh8o4uWc4J/wEoFzhEmjvPbA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-win32-x64-msvc": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.18.tgz", - "integrity": "sha512-bJWbyYpUlqamC8dpR7pfjA0I7vdF6t5VpUGMWRkXVE3AXgIZjYUYAK7II1GNaxR8J1SSrSrppRar8G++JekE3Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/postcss": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.1.18.tgz", - "integrity": "sha512-Ce0GFnzAOuPyfV5SxjXGn0CubwGcuDB0zcdaPuCSzAa/2vII24JTkH+I6jcbXLb1ctjZMZZI6OjDaLPJQL1S0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@alloc/quick-lru": "^5.2.0", - "@tailwindcss/node": "4.1.18", - "@tailwindcss/oxide": "4.1.18", - "postcss": "^8.4.41", - "tailwindcss": "4.1.18" - } - }, - "node_modules/@tauri-apps/api": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.10.1.tgz", - "integrity": "sha512-hKL/jWf293UDSUN09rR69hrToyIXBb8CjGaWC7gfinvnQrBVvnLr08FeFi38gxtugAVyVcTa5/FD/Xnkb1siBw==", - "license": "Apache-2.0 OR MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/tauri" - } - }, - "node_modules/@tauri-apps/cli": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.10.0.tgz", - "integrity": "sha512-ZwT0T+7bw4+DPCSWzmviwq5XbXlM0cNoleDKOYPFYqcZqeKY31KlpoMW/MOON/tOFBPgi31a2v3w9gliqwL2+Q==", - "dev": true, - "license": "Apache-2.0 OR MIT", - "bin": { - "tauri": "tauri.js" - }, - "engines": { - "node": ">= 10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/tauri" - }, - "optionalDependencies": { - "@tauri-apps/cli-darwin-arm64": "2.10.0", - "@tauri-apps/cli-darwin-x64": "2.10.0", - "@tauri-apps/cli-linux-arm-gnueabihf": "2.10.0", - "@tauri-apps/cli-linux-arm64-gnu": "2.10.0", - "@tauri-apps/cli-linux-arm64-musl": "2.10.0", - "@tauri-apps/cli-linux-riscv64-gnu": "2.10.0", - "@tauri-apps/cli-linux-x64-gnu": "2.10.0", - "@tauri-apps/cli-linux-x64-musl": "2.10.0", - "@tauri-apps/cli-win32-arm64-msvc": "2.10.0", - "@tauri-apps/cli-win32-ia32-msvc": "2.10.0", - "@tauri-apps/cli-win32-x64-msvc": "2.10.0" - } - }, - "node_modules/@tauri-apps/cli-darwin-arm64": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.10.0.tgz", - "integrity": "sha512-avqHD4HRjrMamE/7R/kzJPcAJnZs0IIS+1nkDP5b+TNBn3py7N2aIo9LIpy+VQq0AkN8G5dDpZtOOBkmWt/zjA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 OR MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tauri-apps/cli-darwin-x64": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.10.0.tgz", - "integrity": "sha512-keDmlvJRStzVFjZTd0xYkBONLtgBC9eMTpmXnBXzsHuawV2q9PvDo2x6D5mhuoMVrJ9QWjgaPKBBCFks4dK71Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 OR MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.10.0.tgz", - "integrity": "sha512-e5u0VfLZsMAC9iHaOEANumgl6lfnJx0Dtjkd8IJpysZ8jp0tJ6wrIkto2OzQgzcYyRCKgX72aKE0PFgZputA8g==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "Apache-2.0 OR MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tauri-apps/cli-linux-arm64-gnu": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.10.0.tgz", - "integrity": "sha512-YrYYk2dfmBs5m+OIMCrb+JH/oo+4FtlpcrTCgiFYc7vcs6m3QDd1TTyWu0u01ewsCtK2kOdluhr/zKku+KP7HA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 OR MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tauri-apps/cli-linux-arm64-musl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.10.0.tgz", - "integrity": "sha512-GUoPdVJmrJRIXFfW3Rkt+eGK9ygOdyISACZfC/bCSfOnGt8kNdQIQr5WRH9QUaTVFIwxMlQyV3m+yXYP+xhSVA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 OR MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tauri-apps/cli-linux-riscv64-gnu": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.10.0.tgz", - "integrity": "sha512-JO7s3TlSxshwsoKNCDkyvsx5gw2QAs/Y2GbR5UE2d5kkU138ATKoPOtxn8G1fFT1aDW4LH0rYAAfBpGkDyJJnw==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "Apache-2.0 OR MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tauri-apps/cli-linux-x64-gnu": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.10.0.tgz", - "integrity": "sha512-Uvh4SUUp4A6DVRSMWjelww0GnZI3PlVy7VS+DRF5napKuIehVjGl9XD0uKoCoxwAQBLctvipyEK+pDXpJeoHng==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 OR MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tauri-apps/cli-linux-x64-musl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.10.0.tgz", - "integrity": "sha512-AP0KRK6bJuTpQ8kMNWvhIpKUkQJfcPFeba7QshOQZjJ8wOS6emwTN4K5g/d3AbCMo0RRdnZWwu67MlmtJyxC1Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 OR MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tauri-apps/cli-win32-arm64-msvc": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.10.0.tgz", - "integrity": "sha512-97DXVU3dJystrq7W41IX+82JEorLNY+3+ECYxvXWqkq7DBN6FsA08x/EFGE8N/b0LTOui9X2dvpGGoeZKKV08g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 OR MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tauri-apps/cli-win32-ia32-msvc": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.10.0.tgz", - "integrity": "sha512-EHyQ1iwrWy1CwMalEm9z2a6L5isQ121pe7FcA2xe4VWMJp+GHSDDGvbTv/OPdkt2Lyr7DAZBpZHM6nvlHXEc4A==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "Apache-2.0 OR MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tauri-apps/cli-win32-x64-msvc": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.10.0.tgz", - "integrity": "sha512-NTpyQxkpzGmU6ceWBTY2xRIEaS0ZLbVx1HE1zTA3TY/pV3+cPoPPOs+7YScr4IMzXMtOw7tLw5LEXo5oIG3qaQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 OR MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tauri-apps/plugin-dialog": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-dialog/-/plugin-dialog-2.6.0.tgz", - "integrity": "sha512-q4Uq3eY87TdcYzXACiYSPhmpBA76shgmQswGkSVio4C82Sz2W4iehe9TnKYwbq7weHiL88Yw19XZm7v28+Micg==", - "license": "MIT OR Apache-2.0", - "dependencies": { - "@tauri-apps/api": "^2.8.0" - } - }, - "node_modules/@tauri-apps/plugin-opener": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-opener/-/plugin-opener-2.5.3.tgz", - "integrity": "sha512-CCcUltXMOfUEArbf3db3kCE7Ggy1ExBEBl51Ko2ODJ6GDYHRp1nSNlQm5uNCFY5k7/ufaK5Ib3Du/Zir19IYQQ==", - "license": "MIT OR Apache-2.0", - "dependencies": { - "@tauri-apps/api": "^2.8.0" - } - }, - "node_modules/@tauri-apps/plugin-os": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-os/-/plugin-os-2.3.2.tgz", - "integrity": "sha512-n+nXWeuSeF9wcEsSPmRnBEGrRgOy6jjkSU+UVCOV8YUGKb2erhDOxis7IqRXiRVHhY8XMKks00BJ0OAdkpf6+A==", - "license": "MIT OR Apache-2.0", - "dependencies": { - "@tauri-apps/api": "^2.8.0" - } - }, - "node_modules/@tauri-apps/plugin-window-state": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-window-state/-/plugin-window-state-2.4.1.tgz", - "integrity": "sha512-OuvdrzyY8Q5Dbzpj+GcrnV1iCeoZbcFdzMjanZMMcAEUNy/6PH5pxZPXpaZLOR7whlzXiuzx0L9EKZbH7zpdRw==", - "license": "MIT OR Apache-2.0", - "dependencies": { - "@tauri-apps/api": "^2.8.0" - } - }, - "node_modules/@types/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", - "dev": true, - "license": "MIT" - }, - "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/acorn": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", - "license": "MIT", - "peer": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/aria-query": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", - "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, - "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/axobject-query": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", - "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/baseline-browser-mapping": { - "version": "2.9.19", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz", - "integrity": "sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "baseline-browser-mapping": "dist/cli.js" - } - }, - "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/caniuse-lite": { - "version": "1.0.30001769", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001769.tgz", - "integrity": "sha512-BCfFL1sHijQlBGWBMuJyhZUhzo7wer5sVj9hqekB/7xn0Ypy+pER/edCYQm4exbXj4WiySGp40P8UuTh6w1srg==", - "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/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/clsx": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", - "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/codemirror": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.2.tgz", - "integrity": "sha512-VhydHotNW5w1UGK0Qj96BwSk/Zqbp9WbnyK2W/eVMv4QyF41INRGpjUhFJY7/uDNuudSc33a/PKr4iDqRduvHw==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/commands": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/lint": "^6.0.0", - "@codemirror/search": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0" - } - }, - "node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/crelt": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", - "integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==", - "license": "MIT" - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "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==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "node_modules/devalue": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.6.2.tgz", - "integrity": "sha512-nPRkjWzzDQlsejL1WVifk5rvcFi/y1onBRxjaFMjZeR9mFpqu2gmAZ9xUB9/IEanEP/vBtGeGganC/GO1fmufg==", - "license": "MIT" - }, - "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/enhanced-resolve": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.19.0.tgz", - "integrity": "sha512-phv3E1Xl4tQOShqSte26C7Fl84EwUdZsyOuSSk9qtAGyyQs2s3jJzComh+Abf4g187lUUAvH+H26omrqia2aGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.3.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "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", - "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/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/esm-env": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.2.2.tgz", - "integrity": "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==", - "license": "MIT" - }, - "node_modules/esrap": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/esrap/-/esrap-2.2.2.tgz", - "integrity": "sha512-zA6497ha+qKvoWIK+WM9NAh5ni17sKZKhbS5B3PoYbBvaYHZWoS33zmFybmyqpn07RLUxSmn+RCls2/XF+d0oQ==", - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" - } - }, - "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/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/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/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/is-reference": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz", - "integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==", - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.6" - } - }, - "node_modules/jiti": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", - "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", - "dev": true, - "license": "MIT", - "bin": { - "jiti": "lib/jiti-cli.mjs" - } - }, - "node_modules/kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/lightningcss": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.2.tgz", - "integrity": "sha512-utfs7Pr5uJyyvDETitgsaqSyjCb2qNRAtuqUeWIAKztsOYdcACf2KtARYXg2pSvhkt+9NfoaNY7fxjl6nuMjIQ==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "detect-libc": "^2.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-android-arm64": "1.30.2", - "lightningcss-darwin-arm64": "1.30.2", - "lightningcss-darwin-x64": "1.30.2", - "lightningcss-freebsd-x64": "1.30.2", - "lightningcss-linux-arm-gnueabihf": "1.30.2", - "lightningcss-linux-arm64-gnu": "1.30.2", - "lightningcss-linux-arm64-musl": "1.30.2", - "lightningcss-linux-x64-gnu": "1.30.2", - "lightningcss-linux-x64-musl": "1.30.2", - "lightningcss-win32-arm64-msvc": "1.30.2", - "lightningcss-win32-x64-msvc": "1.30.2" - } - }, - "node_modules/lightningcss-android-arm64": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.30.2.tgz", - "integrity": "sha512-BH9sEdOCahSgmkVhBLeU7Hc9DWeZ1Eb6wNS6Da8igvUwAe0sqROHddIlvU06q3WyXVEOYDZ6ykBZQnjTbmo4+A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-arm64": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.30.2.tgz", - "integrity": "sha512-ylTcDJBN3Hp21TdhRT5zBOIi73P6/W0qwvlFEk22fkdXchtNTOU4Qc37SkzV+EKYxLouZ6M4LG9NfZ1qkhhBWA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-x64": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.30.2.tgz", - "integrity": "sha512-oBZgKchomuDYxr7ilwLcyms6BCyLn0z8J0+ZZmfpjwg9fRVZIR5/GMXd7r9RH94iDhld3UmSjBM6nXWM2TfZTQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-freebsd-x64": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.30.2.tgz", - "integrity": "sha512-c2bH6xTrf4BDpK8MoGG4Bd6zAMZDAXS569UxCAGcA7IKbHNMlhGQ89eRmvpIUGfKWNVdbhSbkQaWhEoMGmGslA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.30.2.tgz", - "integrity": "sha512-eVdpxh4wYcm0PofJIZVuYuLiqBIakQ9uFZmipf6LF/HRj5Bgm0eb3qL/mr1smyXIS1twwOxNWndd8z0E374hiA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.30.2.tgz", - "integrity": "sha512-UK65WJAbwIJbiBFXpxrbTNArtfuznvxAJw4Q2ZGlU8kPeDIWEX1dg3rn2veBVUylA2Ezg89ktszWbaQnxD/e3A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.30.2.tgz", - "integrity": "sha512-5Vh9dGeblpTxWHpOx8iauV02popZDsCYMPIgiuw97OJ5uaDsL86cnqSFs5LZkG3ghHoX5isLgWzMs+eD1YzrnA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.30.2.tgz", - "integrity": "sha512-Cfd46gdmj1vQ+lR6VRTTadNHu6ALuw2pKR9lYq4FnhvgBc4zWY1EtZcAc6EffShbb1MFrIPfLDXD6Xprbnni4w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.30.2.tgz", - "integrity": "sha512-XJaLUUFXb6/QG2lGIW6aIk6jKdtjtcffUT0NKvIqhSBY3hh9Ch+1LCeH80dR9q9LBjG3ewbDjnumefsLsP6aiA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.30.2.tgz", - "integrity": "sha512-FZn+vaj7zLv//D/192WFFVA0RgHawIcHqLX9xuWiQt7P0PtdFEVaxgF9rjM/IRYHQXNnk61/H/gb2Ei+kUQ4xQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.30.2.tgz", - "integrity": "sha512-5g1yc73p+iAkid5phb4oVFMB45417DkRevRbt/El/gKXJk4jid+vPFF/AXbxn05Aky8PapwzZrdJShv5C0avjw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/locate-character": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", - "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", - "license": "MIT" - }, - "node_modules/lucide-svelte": { - "version": "0.563.0", - "resolved": "https://registry.npmjs.org/lucide-svelte/-/lucide-svelte-0.563.0.tgz", - "integrity": "sha512-pjZKw7TpQcamfQrx7YdbOHgmrcNeKiGGMD0tKZQaVktwSsbqw28CsKc2Q97ttwjytiCWkJyOa8ij2Q+Og0nPfQ==", - "license": "ISC", - "peerDependencies": { - "svelte": "^3 || ^4 || ^5.0.0-next.42" - } - }, - "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, - "node_modules/mri": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", - "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/mrmime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", - "integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "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==", - "dev": true, - "license": "MIT" - }, - "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/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/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": "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/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-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/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, - "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/sade": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", - "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", - "dev": true, - "license": "MIT", - "dependencies": { - "mri": "^1.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/set-cookie-parser": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-3.0.1.tgz", - "integrity": "sha512-n7Z7dXZhJbwuAHhNzkTti6Aw9QDDjZtm3JTpTGATIdNzdQz5GuFs22w90BcvF4INfnrL5xrX3oGsuqO5Dx3A1Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/sirv": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.2.tgz", - "integrity": "sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@polka/url": "^1.0.0-next.24", - "mrmime": "^2.0.0", - "totalist": "^3.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "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/style-mod": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.3.tgz", - "integrity": "sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==", - "license": "MIT" - }, - "node_modules/svelte": { - "version": "5.50.0", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.50.0.tgz", - "integrity": "sha512-FR9kTLmX5i0oyeQ5j/+w8DuagIkQ7MWMuPpPVioW2zx9Dw77q+1ufLzF1IqNtcTXPRnIIio4PlasliVn43OnbQ==", - "license": "MIT", - "peer": true, - "dependencies": { - "@jridgewell/remapping": "^2.3.4", - "@jridgewell/sourcemap-codec": "^1.5.0", - "@sveltejs/acorn-typescript": "^1.0.5", - "@types/estree": "^1.0.5", - "acorn": "^8.12.1", - "aria-query": "^5.3.1", - "axobject-query": "^4.1.0", - "clsx": "^2.1.1", - "devalue": "^5.6.2", - "esm-env": "^1.2.1", - "esrap": "^2.2.2", - "is-reference": "^3.0.3", - "locate-character": "^3.0.0", - "magic-string": "^0.30.11", - "zimmerframe": "^1.1.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/svelte-check": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.3.6.tgz", - "integrity": "sha512-uBkz96ElE3G4pt9E1Tw0xvBfIUQkeH794kDQZdAUk795UVMr+NJZpuFSS62vcmO/DuSalK83LyOwhgWq8YGU1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.25", - "chokidar": "^4.0.1", - "fdir": "^6.2.0", - "picocolors": "^1.0.0", - "sade": "^1.7.4" - }, - "bin": { - "svelte-check": "bin/svelte-check" - }, - "engines": { - "node": ">= 18.0.0" - }, - "peerDependencies": { - "svelte": "^4.0.0 || ^5.0.0-next.0", - "typescript": ">=5.0.0" - } - }, - "node_modules/tailwindcss": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.18.tgz", - "integrity": "sha512-4+Z+0yiYyEtUVCScyfHCxOYP06L5Ne+JiHhY2IjR2KWMIWhJOYZKLSGZaP5HkZ8+bY0cxfzwDE5uOmzFXyIwxw==", - "dev": true, - "license": "MIT" - }, - "node_modules/tapable": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", - "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/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/totalist": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", - "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/typescript": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "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/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/vitefu": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.1.tgz", - "integrity": "sha512-B/Fegf3i8zh0yFbpzZ21amWzHmuNlLlmJT6n7bu5e+pCHUKQIfXSYokrqOBGEMMe9UG2sostKQF9mml/vYaWJQ==", - "dev": true, - "license": "MIT", - "workspaces": [ - "tests/deps/*", - "tests/projects/*", - "tests/projects/workspace/packages/*" - ], - "peerDependencies": { - "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0-beta.0" - }, - "peerDependenciesMeta": { - "vite": { - "optional": true + "name": "mod0", + "version": "0.3.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "mod0", + "version": "0.3.0", + "license": "Apache-2.0", + "dependencies": { + "@codemirror/language": "^6.11.3", + "@codemirror/language-data": "^6.5.2", + "@codemirror/merge": "^6.12.3", + "@codemirror/state": "^6.5.2", + "@codemirror/view": "^6.38.0", + "@lezer/highlight": "^1.2.1", + "@lucide/svelte": "^1.70.0", + "@tauri-apps/api": "~2.11.1", + "@tauri-apps/plugin-dialog": "~2.7.3", + "@tauri-apps/plugin-opener": "~2.5.5", + "@tauri-apps/plugin-os": "~2.3.2", + "@xterm/addon-fit": "^0.11.0", + "@xterm/addon-webgl": "^0.19.0", + "@xterm/xterm": "^6.0.0", + "codemirror": "^6.0.2" + }, + "devDependencies": { + "@sveltejs/adapter-static": "^4.0.1", + "@sveltejs/kit": "^3.1.1", + "@sveltejs/vite-plugin-svelte": "^7.3.1", + "@tailwindcss/vite": "^4.3.5", + "@tauri-apps/cli": "~2.11.5", + "@types/node": "^22.0.0", + "prettier": "^3.9.10", + "prettier-plugin-svelte": "^4.1.1", + "prettier-plugin-tailwindcss": "^0.8.1", + "svelte": "^5.57.3", + "svelte-check": "^4.7.8", + "tailwindcss": "^4.3.5", + "typescript": "~6.0.3", + "vite": "^8.3.6" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@codemirror/autocomplete": { + "version": "6.20.4", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.4.tgz", + "integrity": "sha512-yF8RhOf2SXlg00+qtupzLhrglcas61boqaONiNcbPIebHCpJocpqTBA6dyrtUrQO47hqyTdeob/3XnYilT7TaQ==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@codemirror/commands": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.11.1.tgz", + "integrity": "sha512-O/4hG3SC1YwcmQ0d2UVNDs+AsaNWd1iHVxbTeEBuqH+6bExAiPK3iS/BvpY6rZGURALv4ZD3sIgcCmRvw3ehBg==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.7.0", + "@codemirror/view": "^6.27.0", + "@lezer/common": "^1.1.0" + } + }, + "node_modules/@codemirror/lang-angular": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@codemirror/lang-angular/-/lang-angular-0.1.4.tgz", + "integrity": "sha512-oap+gsltb/fzdlTQWD6BFF4bSLKcDnlxDsLdePiJpCVNKWXSTAbiiQeYI3UmES+BLAdkmIC1WjyztC1pi/bX4g==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-html": "^6.0.0", + "@codemirror/lang-javascript": "^6.1.2", + "@codemirror/language": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.3" + } + }, + "node_modules/@codemirror/lang-cpp": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@codemirror/lang-cpp/-/lang-cpp-6.0.3.tgz", + "integrity": "sha512-URM26M3vunFFn9/sm6rzqrBzDgfWuDixp85uTY49wKudToc2jTHUrKIGGKs+QWND+YLofNNZpxcNGRynFJfvgA==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/cpp": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-css": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-css/-/lang-css-6.3.1.tgz", + "integrity": "sha512-kr5fwBGiGtmz6l0LSJIbno9QrifNMUusivHbnA1H6Dmqy4HZFte3UAICix1VuKo0lMPKQr2rqB+0BkKi/S3Ejg==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.0.2", + "@lezer/css": "^1.1.7" + } + }, + "node_modules/@codemirror/lang-go": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-go/-/lang-go-6.0.1.tgz", + "integrity": "sha512-7fNvbyNylvqCphW9HD6WFnRpcDjr+KXX/FgqXy5H5ZS0eC5edDljukm/yNgYkwTsgp2busdod50AOTIy6Jikfg==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.6.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.0.0", + "@lezer/go": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-html": { + "version": "6.4.12", + "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.12.tgz", + "integrity": "sha512-pw2ReWKUqSkbvh76RAT4NYxiogRu+PWkR2ukAwO9uOgrm8uipkzjtKKtNpyeAQwHOqxEeSvAXZ6vr3AfyB9y/w==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/lang-css": "^6.0.0", + "@codemirror/lang-javascript": "^6.0.0", + "@codemirror/language": "^6.4.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0", + "@lezer/css": "^1.1.0", + "@lezer/html": "^1.3.12" + } + }, + "node_modules/@codemirror/lang-java": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-java/-/lang-java-6.0.2.tgz", + "integrity": "sha512-m5Nt1mQ/cznJY7tMfQTJchmrjdjQ71IDs+55d1GAa8DGaB8JXWsVCkVT284C3RTASaY43YknrK2X3hPO/J3MOQ==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/java": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-javascript": { + "version": "6.2.5", + "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.2.5.tgz", + "integrity": "sha512-zD4e5mS+50htS7F+TYjBPsiIFGanfVqg4HyUz6WNFikgOPf2BgKlx+TQedI1w6n/IqRBVBbBWmGFdLB/7uxO4A==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.6.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0", + "@lezer/javascript": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-jinja": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-jinja/-/lang-jinja-6.0.1.tgz", + "integrity": "sha512-P5kyHLObzjtbGj16h+hyvZTxJhSjBEeSx4wMjbnAf3b0uwTy2+F0zGjMZL4PQOm/mh2eGZ5xUDVZXgwP783Nsw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/lang-html": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.2.0", + "@lezer/lr": "^1.4.0" + } + }, + "node_modules/@codemirror/lang-json": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-json/-/lang-json-6.0.2.tgz", + "integrity": "sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/json": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-less": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-less/-/lang-less-6.0.2.tgz", + "integrity": "sha512-EYdQTG22V+KUUk8Qq582g7FMnCZeEHsyuOJisHRft/mQ+ZSZ2w51NupvDUHiqtsOy7It5cHLPGfHQLpMh9bqpQ==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-css": "^6.2.0", + "@codemirror/language": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-liquid": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/@codemirror/lang-liquid/-/lang-liquid-6.3.3.tgz", + "integrity": "sha512-U9EnyzWuAx1TX3MZSKDXydKH734n1Aogk/ijKdW+jdIwmbf9zSPQYOIKggC/b2PTRjQb7ddvMktmxnfTLuv/SQ==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/lang-html": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/common": "^1.0.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.1" + } + }, + "node_modules/@codemirror/lang-markdown": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-markdown/-/lang-markdown-6.5.2.tgz", + "integrity": "sha512-AwBOdkWYuA//WcM0xO5PfHPUcmz/O2i5o0Nsg1U69SII/loCJlFI1Romd9xp2HYb1kYJRGZotyqRghuHH5n8Kw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.7.1", + "@codemirror/lang-html": "^6.0.0", + "@codemirror/language": "^6.3.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/common": "^1.2.1", + "@lezer/markdown": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-php": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-php/-/lang-php-6.0.2.tgz", + "integrity": "sha512-ZKy2v1n8Fc8oEXj0Th0PUMXzQJ0AIR6TaZU+PbDHExFwdu+guzOA4jmCHS1Nz4vbFezwD7LyBdDnddSJeScMCA==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-html": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.0.0", + "@lezer/php": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-python": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-python/-/lang-python-6.2.1.tgz", + "integrity": "sha512-IRjC8RUBhn9mGR9ywecNhB51yePWCGgvHfY1lWN/Mrp3cKuHr0isDKia+9HnvhiWNnMpbGhWrkhuWOc09exRyw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.3.2", + "@codemirror/language": "^6.8.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.2.1", + "@lezer/python": "^1.1.4" + } + }, + "node_modules/@codemirror/lang-rust": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-rust/-/lang-rust-6.0.2.tgz", + "integrity": "sha512-EZaGjCUegtiU7kSMvOfEZpaCReowEf3yNidYu7+vfuGTm9ow4mthAparY5hisJqOHmJowVH3Upu+eJlUji6qqA==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/rust": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-sass": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-sass/-/lang-sass-6.0.2.tgz", + "integrity": "sha512-l/bdzIABvnTo1nzdY6U+kPAC51czYQcOErfzQ9zSm9D8GmNPD0WTW8st/CJwBTPLO8jlrbyvlSEcN20dc4iL0Q==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-css": "^6.2.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.0.2", + "@lezer/sass": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-sql": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@codemirror/lang-sql/-/lang-sql-6.10.0.tgz", + "integrity": "sha512-6ayPkEd/yRw0XKBx5uAiToSgGECo/GY2NoJIHXIIQh1EVwLuKoU8BP/qK0qH5NLXAbtJRLuT73hx7P9X34iO4w==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-vue": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@codemirror/lang-vue/-/lang-vue-0.1.3.tgz", + "integrity": "sha512-QSKdtYTDRhEHCfo5zOShzxCmqKJvgGrZwDQSdbvCRJ5pRLWBS7pD/8e/tH44aVQT6FKm0t6RVNoSUWHOI5vNug==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-html": "^6.0.0", + "@codemirror/lang-javascript": "^6.1.2", + "@codemirror/language": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.1" + } + }, + "node_modules/@codemirror/lang-wast": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-wast/-/lang-wast-6.0.2.tgz", + "integrity": "sha512-Imi2KTpVGm7TKuUkqyJ5NRmeFWF7aMpNiwHnLQe0x9kmrxElndyH0K6H/gXtWwY6UshMRAhpENsgfpSwsgmC6Q==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-xml": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@codemirror/lang-xml/-/lang-xml-6.1.0.tgz", + "integrity": "sha512-3z0blhicHLfwi2UgkZYRPioSgVTo9PV5GP5ducFH6FaHy0IAJRg+ixj5gTR1gnT/glAIC8xv4w2VL1LoZfs+Jg==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.4.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/common": "^1.0.0", + "@lezer/xml": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-yaml": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@codemirror/lang-yaml/-/lang-yaml-6.1.3.tgz", + "integrity": "sha512-AZ8DJBuXGVHybpBQhmZtgew5//4hv3tdkXnr3vDmOUMJRuB6vn/uuwtmTOTlqEaQFg3hQSVeA90NmvIQyUV6FQ==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.2.0", + "@lezer/lr": "^1.0.0", + "@lezer/yaml": "^1.0.0" + } + }, + "node_modules/@codemirror/language": { + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.13.1.tgz", + "integrity": "sha512-zfvU2r3TyylQLMj/te+5CnQ0rSqZi8B1oTCBbQkagcLW4Xc6imab6qN+pEJhsuNOLaJqiRyBXp9UhWA1DhVvDw==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/streamparser": "^6.0.0", + "@codemirror/view": "^6.23.0", + "@lezer/common": "^1.5.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0", + "style-mod": "^4.0.0" + } + }, + "node_modules/@codemirror/language-data": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@codemirror/language-data/-/language-data-6.5.2.tgz", + "integrity": "sha512-CPkWBKrNS8stYbEU5kwBwTf3JB1kghlbh4FSAwzGW2TEscdeHHH4FGysREW86Mqnj3Qn09s0/6Ea/TutmoTobg==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-angular": "^0.1.0", + "@codemirror/lang-cpp": "^6.0.0", + "@codemirror/lang-css": "^6.0.0", + "@codemirror/lang-go": "^6.0.0", + "@codemirror/lang-html": "^6.0.0", + "@codemirror/lang-java": "^6.0.0", + "@codemirror/lang-javascript": "^6.0.0", + "@codemirror/lang-jinja": "^6.0.0", + "@codemirror/lang-json": "^6.0.0", + "@codemirror/lang-less": "^6.0.0", + "@codemirror/lang-liquid": "^6.0.0", + "@codemirror/lang-markdown": "^6.0.0", + "@codemirror/lang-php": "^6.0.0", + "@codemirror/lang-python": "^6.0.0", + "@codemirror/lang-rust": "^6.0.0", + "@codemirror/lang-sass": "^6.0.0", + "@codemirror/lang-sql": "^6.0.0", + "@codemirror/lang-vue": "^0.1.1", + "@codemirror/lang-wast": "^6.0.0", + "@codemirror/lang-xml": "^6.0.0", + "@codemirror/lang-yaml": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/legacy-modes": "^6.4.0" + } + }, + "node_modules/@codemirror/legacy-modes": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/@codemirror/legacy-modes/-/legacy-modes-6.5.5.tgz", + "integrity": "sha512-9ltT214oMb3Y1w5eAZMSigzrjzZnMI2Wa3Feq73rU/i4C56MkwrpfswfQYOr28C5pXr6dWwspNTMyeHXlzWMxg==", + "license": "MIT", + "dependencies": { + "@codemirror/streamparser": "^6.0.0" + } + }, + "node_modules/@codemirror/lint": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.9.7.tgz", + "integrity": "sha512-28/+iWLYxKxsvGYhSYL7zaCZqLz5+FFFDq9tVsvGv9kv8RY4fFAchJ5WX9M3YrrRlTIsECjsXPqeNgnSmNP2dg==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.42.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/merge": { + "version": "6.12.3", + "resolved": "https://registry.npmjs.org/@codemirror/merge/-/merge-6.12.3.tgz", + "integrity": "sha512-Wq9wXrp41cW/nIpi1CQPyNwD+36kg8KIX676ym0Hyfn3Dpr+XQHNAIsZYVNlaivuVB4SAASbreG3V0VXinbqZA==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/highlight": "^1.0.0", + "style-mod": "^4.1.0" + } + }, + "node_modules/@codemirror/search": { + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.7.2.tgz", + "integrity": "sha512-gUYkYhT2+n/+VGZ+8EzE5WFkYZUZYm1VOKDudIsNqh42uRVQJ0a6Yss9sdKT3MeOYfuL1N6AZA57oza0Oyr0LA==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.37.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/state": { + "version": "6.7.6", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.7.6.tgz", + "integrity": "sha512-kAz+AncRtKuIknedxT1bq4XwXv4UowhbkHU1myPrtVb/jZtImWuV5BXzv5vK6i3kYACsdiZiQKFQQ5Mq7elW8w==", + "license": "MIT", + "dependencies": { + "@marijn/find-cluster-break": "^1.0.0" + } + }, + "node_modules/@codemirror/streamparser": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@codemirror/streamparser/-/streamparser-6.0.0.tgz", + "integrity": "sha512-JTFPF6xrfjt0mnfGPgzcLiMwYmvIyNaoizp8BYzv8FE8KrT6GBGDZ190rtt+O7Wke3gG/MFHyiY9YGNeimof4w==", + "license": "MIT" + }, + "node_modules/@codemirror/view": { + "version": "6.43.15", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.15.tgz", + "integrity": "sha512-HHsfpqFeHyXLs983pSRe38Xajs0vFWZQ2BuX0m7Ki8w3jZ5iD8cuR3lBz2/5/X53Dhf32SBHKh6rtSTB6tKeGw==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.7.0", + "crelt": "^1.0.6", + "style-mod": "^4.1.0", + "w3c-keyname": "^2.2.4" + } + }, + "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==", + "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==", + "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==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "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==", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@lezer/common": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.5.5.tgz", + "integrity": "sha512-Pw7PVCndruF1pb3ebCxpSVpkMHSDjwRCLcTRw+RizUKco5QbWylwq2g4lnG/RYN7yTTQDXE9F77MwtkAyphrjg==", + "license": "MIT" + }, + "node_modules/@lezer/cpp": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@lezer/cpp/-/cpp-1.1.6.tgz", + "integrity": "sha512-vh9gWWJOXFVY8HBHK3Twzq8MgwG2iN4GSyzBP9sCGTe37P15x2R14VaBQk0VA0ezTRN1KHYBBsHhvpGZ2Xy/pA==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/css": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.3.9.tgz", + "integrity": "sha512-ZmzgvTOBdJWGIsY/ItAfN7UW8DV802oZG+jeG6E508SwEzz5YhuAajptpWPICvIyqYAD2+VjMdOS40GgGkyEOQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.0" + } + }, + "node_modules/@lezer/go": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@lezer/go/-/go-1.0.1.tgz", + "integrity": "sha512-xToRsYxwsgJNHTgNdStpcvmbVuKxTapV0dM0wey1geMMRc9aggoVyKgzYp41D2/vVOx+Ii4hmE206kvxIXBVXQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.0" + } + }, + "node_modules/@lezer/highlight": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.5.tgz", + "integrity": "sha512-O1GMVKgtf5YspFaRzpmqkVgMtIk2HG9uMAbH6wdAIdNh3TVzCsch/+cRi+6l2//UGDKe6NB9BW3cvuR5ezMQ0w==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.3.0" + } + }, + "node_modules/@lezer/html": { + "version": "1.3.13", + "resolved": "https://registry.npmjs.org/@lezer/html/-/html-1.3.13.tgz", + "integrity": "sha512-oI7n6NJml729m7pjm9lvLvmXbdoMoi2f+1pwSDJkl9d68zGr7a9Btz8NdHTGQZtW2DA25ybeuv/SyDb9D5tseg==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/java": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@lezer/java/-/java-1.1.5.tgz", + "integrity": "sha512-JppTd1iKHpeNlLYw/Zl8JX7zSY5HqAzK4zZ05lpn8l8Sk7Fo5KAKiDiMiezKoT5lfeC2xZf8HeKp1tSctj4G6Q==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/javascript": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.5.6.tgz", + "integrity": "sha512-sEvOqpl4vJQca0NugSQK02vQPbc5KrvoojnYGoqqFgFO0MtcYhwGiHKVEB+LuXYJnfyXo4QPA8ztbrEa4Fw5NA==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.1.3", + "@lezer/lr": "^1.3.0" + } + }, + "node_modules/@lezer/json": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@lezer/json/-/json-1.0.3.tgz", + "integrity": "sha512-BP9KzdF9Y35PDpv04r0VeSTKDeox5vVr3efE7eBbx3r4s3oNLfunchejZhjArmeieBH+nVOpgIiBJpEAv8ilqQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/lr": { + "version": "1.4.12", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.12.tgz", + "integrity": "sha512-On9HU4oMMiHPMkQDgoTnGahjgG5n/MkN38CgG77sMraKLL+3JBbeQNi1FcCXV9QRqwF9/BUXP3caHyJC1fBOTQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@lezer/markdown": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@lezer/markdown/-/markdown-1.8.1.tgz", + "integrity": "sha512-M5YmEcKWO4mJ45Y1hECwqyu8cLv25EiXOK554PVOvDOWOP0olwelHHQUWr9sjF+d1bENVhy0nfJ8E57XZUTiXg==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.5.0", + "@lezer/highlight": "^1.0.0" + } + }, + "node_modules/@lezer/php": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@lezer/php/-/php-1.0.6.tgz", + "integrity": "sha512-QJ2xNXPmsm/Z3IpThq8fnJrEIVpxhsIoj6GZBW0JYEd/l9zxpJZW216X4fzqQY4vgpdGIumypvI4uQjd4tnYtw==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.1.0" + } + }, + "node_modules/@lezer/python": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/@lezer/python/-/python-1.1.19.tgz", + "integrity": "sha512-MhQIURHRytsNzP/YXnqpYKW6la6voAH3kyplTOOiCdjyFY6cWWGFVmYVdHIPrElqSDf4iCDktQCockB9FxuhzQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/rust": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@lezer/rust/-/rust-1.0.3.tgz", + "integrity": "sha512-XxErOjZzQ7yJt1agUT4fu9qQvESZ3acgoxpPaPTPOiUx+duCjaVAtZGFIgphkHxlN05djdVAIOy/wItShMEjqQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/sass": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lezer/sass/-/sass-1.1.0.tgz", + "integrity": "sha512-3mMGdCTUZ/84ArHOuXWQr37pnf7f+Nw9ycPUeKX+wu19b7pSMcZGLbaXwvD2APMBDOGxPmpK/O6S1v1EvLoqgQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/xml": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@lezer/xml/-/xml-1.0.6.tgz", + "integrity": "sha512-CdDwirL0OEaStFue/66ZmFSeppuL6Dwjlk8qk153mSQwiSH/Dlri4GNymrNWnUmPl2Um7QfV1FO9KFUyX3Twww==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/yaml": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@lezer/yaml/-/yaml-1.0.4.tgz", + "integrity": "sha512-2lrrHqxalACEbxIbsjhqGpSW8kWpUKuY6RHgnSAFZa6qK62wvnPxA8hGOwOoDbwHcOFs5M4o27mjGu+P7TvBmw==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.4.0" + } + }, + "node_modules/@lucide/svelte": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@lucide/svelte/-/svelte-1.70.0.tgz", + "integrity": "sha512-zvx7K/WLxo82c4ZYqbsfcYUPDVFrq4561xH0NHfSHJJbajj0AONTQ14EO095/WnfI4XUEl1tyS/nbjQNNiNxdQ==", + "license": "ISC", + "peerDependencies": { + "svelte": "^5" + } + }, + "node_modules/@marijn/find-cluster-break": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.4.tgz", + "integrity": "sha512-Wy0V7+SGUjnF9/TkiM1hKVDPj7jKXduPNboMVtHTA8dySMURWqfg/JZ9E2Sq8JgSJmkl7k7Qe9FLeMSrSraWmQ==", + "license": "MIT" + }, + "node_modules/@oxc-project/types": { + "version": "0.156.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.156.0.tgz", + "integrity": "sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/oxc-project" + } + }, + "node_modules/@polka/url": { + "version": "1.0.0-next.29", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz", + "integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rolldown/binding-android-arm-eabi": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.16.tgz", + "integrity": "sha512-ia3DwAs0OsMGS7+IConptSiyk9pEXkOx/AbJ2n/lAGxH3QkWQus1t8d7gnAT38FCU2sQu8lUbeR6AiZFv4JxaA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.16.tgz", + "integrity": "sha512-kx5wBiMB6E7TEvpl2B9gjLU004BkvEm2Dr941BFjx/SontPwSzNuQUIoVKxHHoSjpFIfHMmcguyLOtyn0hObRg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.16.tgz", + "integrity": "sha512-qslZrXnKJU4cUpjoAmtAo/KQM9e2IRMlmpig6Zpwj+8KWxW8v+nkAf9216Bsek9lOC1jvg2yCjygCFo2f83msQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.16.tgz", + "integrity": "sha512-FdF+y48ND13eAyM2mQn+85kvAqNlvRWROy2rhgA463X/0Gv4vGtazZtfaF1mRBLscYvtOlh4QnLjOWiFzX69OQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.16.tgz", + "integrity": "sha512-ddjqFM5e95AgLbUPtKIS7V1KTVlA0RUgCVr5mn+/IEhsdy3pr+Vuj/HZ7nlMN2FyxIwUktOH1LEPIQXO1v9y1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.16.tgz", + "integrity": "sha512-tHdKWbFkFBI687iim3LIyIvyL7j66VvQYkDPss5Stn/qyE2tWkR1YD0dXmXPFKKqT/o5ZEJVsaRsWS2meQwGOA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.16.tgz", + "integrity": "sha512-FJiLGAblPBMlBEdbOqw6kW6QcXDWAf/oJu7gYs9ZJZwmg+K+/zjFLxPTIY9izJUzxzc24FHvmseyA0IvJSl17w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.16.tgz", + "integrity": "sha512-hrJpblMsrQ58U9veWpbXzkhV5zStunds6HWLprqq1qauvgBr1E6P+24kLj6lSLI9vjRn/RYpjprhkHQPKGWpNg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.16.tgz", + "integrity": "sha512-qJd/dC6j6CwLG9/s/RP2nb1RZ0GIgj7Ioj7x/SYa3RzjVrlzrmH0fhIOpfvqQDeIsdP0loi+kHaMhJzY1PBIaA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.16.tgz", + "integrity": "sha512-Vx7Xg5uUJuNcujJjI70OICaH0EYj80BtOLZTSN7uOYg8QOLlyKnaG0IW7Fn/J0IpJsaKzmDKMhOQv1JBM9m9vg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.16.tgz", + "integrity": "sha512-TNKhgE3uJTsTzatUSSYt0Kgo+Oa2uSlSjz4r1aEIea7HX6ULBym4fAlYUhG1i6pjNf2njfCUAfKwr6C3E9Xg1w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.16.tgz", + "integrity": "sha512-7chXdpjXZ8qG0+mIxECN3cT9kvhZ3/oZhMX6Pp876P7CDrIy8nJswva6Mq357JR7eYXfuskwZxMeV1SzoZdHrA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.16.tgz", + "integrity": "sha512-Kwjt+7uNTJK5/MDkGWGVO2KQPnj8yAV75dMpfwyHZrJSXWHrniOB0aUEWlVYf3H1hOqFLIStLdM5QXq6bnKmOQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.16.tgz", + "integrity": "sha512-/LH6WfjDRXXJz/p5xl4TmU+jpcnwcxbKEQBW/GZE0JHfN0lGIyTtsUEGaQ/q/GikkGJ2yLKe6pwm7AnEWO8pdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.16.tgz", + "integrity": "sha512-1lv1KvX0Z871zfk7vw+dnXMMnHNyDwMzWG8Kv3HxDXMOhzCX4SHc7HK319fInP0i+0p9D8brkfzL7pJOaGl+tw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sveltejs/acorn-typescript": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@sveltejs/acorn-typescript/-/acorn-typescript-1.0.13.tgz", + "integrity": "sha512-wgKggnhZVL9Bfx1OaKKTrYY9BFRk6C8UAkQNUcIv1+llzYrIqy+RZm5HPKzn0NpEBvTVhTqB4kQyllZywsRBRQ==", + "license": "MIT", + "peerDependencies": { + "acorn": "^8.9.0" + } + }, + "node_modules/@sveltejs/adapter-static": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-4.0.1.tgz", + "integrity": "sha512-svOU1OcBiJ9Kn1cdxHDmJIsBy1/iQe9STPvUFkO2/iinxPFS7r8fc9TiCaWWUgbrE+7ox6Bt4MURv3RPi7sunQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@sveltejs/kit": "^3.0.0-next.0" + } + }, + "node_modules/@sveltejs/kit": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-3.1.1.tgz", + "integrity": "sha512-BiEMvekYXE9Gu/YhWJ/yJ0WDLH1PX/dmjuAeFp5rrtdmgdzkjt7DvimlSP+/U4tgposl7pkE20luHpcnc6BgRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rolldown/pluginutils": "^1.0.1", + "@standard-schema/spec": "^1.1.0", + "cookie": "^2.0.1", + "devalue": "^5.9.4", + "esm-env": "^1.2.2", + "magic-string": "^1.2.3", + "mrmime": "^2.0.1", + "sirv": "^3.0.2" + }, + "bin": { + "svelte-kit": "svelte-kit.js" + }, + "engines": { + "node": ">=22.17" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0", + "@sveltejs/vite-plugin-svelte": "^7.0.0", + "svelte": "^5.57.1", + "typescript": "^6.0.0", + "vite": "^8.0.12" + }, + "peerDependenciesMeta": { + "@opentelemetry/api": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/@sveltejs/load-config": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@sveltejs/load-config/-/load-config-0.2.3.tgz", + "integrity": "sha512-VT3qmUb8pRV2QrZjd8iAmtg8lf4W0TIjZbvXtz5MKei/q96teWZgGJyyidJzOjzZzvdq616eSRVeMYIQChUTAQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18.0.0" + } + }, + "node_modules/@sveltejs/vite-plugin-svelte": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-7.3.1.tgz", + "integrity": "sha512-ZPsLN8B1e/En+Ak5s4V7srFDT532oS0qieLsQwu63NGKsS+iAjoO2Js1BochlHlglcU+Pt7WAO3C5Ee+4f6gVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "deepmerge": "^4.3.1", + "magic-string": "^1.0.0", + "obug": "^2.1.0", + "vitefu": "^1.1.2" + }, + "engines": { + "node": "^20.19 || ^22.12 || >=24" + }, + "peerDependencies": { + "svelte": "^5.46.4", + "vite": "^8.0.0-beta.7 || ^8.0.0" + } + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.5.tgz", + "integrity": "sha512-yT53FzV4ke0cr/BguDxhWMpm5MJu1O2muzk+tKw6lKHjODAsYArBbWwFbJiaksfzFv1tpkO9QHGzmfs1hJT66g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "^5.24.5", + "jiti": "^2.7.0", + "lightningcss": "1.33.0", + "magic-string": "^1.1.0", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.5" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.5.tgz", + "integrity": "sha512-PynqGLZsZvwM9tqD/CUxkOIfyd6K5elZ2MooauzJryP/UqXYgi3yYbtt3N0Xe+MHV/eFKPFQCEfIKAqlAS1CBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.3.5", + "@tailwindcss/oxide-darwin-arm64": "4.3.5", + "@tailwindcss/oxide-darwin-x64": "4.3.5", + "@tailwindcss/oxide-freebsd-x64": "4.3.5", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.5", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.5", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.5", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.5", + "@tailwindcss/oxide-linux-x64-musl": "4.3.5", + "@tailwindcss/oxide-wasm32-wasi": "4.3.5", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.5", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.5" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.5.tgz", + "integrity": "sha512-Se0z5xMqcSQanJD1IYmO0cGpK3iv0fp3ZsIT7xRJZ1Da5PghvNoc46zz4jIQn+aan3dV9T8AermFNN9QPmsh0Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.5.tgz", + "integrity": "sha512-UPrgTDuUbvmqGMZuCnmI3FKee/tYKzKdp00/kuB4oSGB213VYg8QTdF7lVhnPoBXq/mIfJ+ILoBFqNOboWcMwQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.5.tgz", + "integrity": "sha512-E+p7HEtjI0b8D7kbbWxH067cGui6d4c79COGko9fAPVE3rwc1E7ld2HFCbaG86AOGWS5VKQYqZOaf38ya4uxTQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.5.tgz", + "integrity": "sha512-yWEWcWyAG7rWOcTpJTjdhQ3pcaFY2h+0bqTRfgU3G2fz87ZU3AKdvdZKhslD+kyHnjBUWKvNdRYwIYC5dI1tIg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.5.tgz", + "integrity": "sha512-WmeVjtJhZlr+smpqcdR2kQkkn6arHIJnUIBxTO2EJcTLGY1ecVXNo2hbSn8xc0IH2aEtys936iMWKGyj0GaKnA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.5.tgz", + "integrity": "sha512-DTCSyucc6ShMp1QMqV5R94Z7xlgNgUzkGmFF1rL5HH2Qjy4eSmEqy+YLGkqqYvWa4sILtgrBt1JjRKbneQtiFQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.5.tgz", + "integrity": "sha512-H9lsvO4x9E4nE4Hi8h7NHHw0O/kcVSu+iOyFHNGdYzazGgDjFHZbE6S3hQ8kMcbNXSBlMdNi67LV5EVqtpaJtw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.5.tgz", + "integrity": "sha512-4uxQvtBvPuIdl13WfUBj9xMZHH14PtHZ8OZdtLmdyDtG66sCa1t599NZT+jagkUzRtWhuul1qRZQ1nAJscXN5g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.5.tgz", + "integrity": "sha512-0JQAzs7jwbA7O6+z/adU+Jk3AXwsu3npAhtr5escXS7TqEqWcaDV7qHuI+0Vy/KQRuVGnLQREcSJWYauyV3oqg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.5.tgz", + "integrity": "sha512-OJhFmlEfdzMr+avACdi40RPtnkW0B6hXyxL/8r+tnEHBWZji36CYRjEXrrvgBmaYsD3oEOBqwYFRKsYvzFe7Bw==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.11.3", + "@emnapi/runtime": "^1.11.3", + "@emnapi/wasi-threads": "^1.2.3", + "@napi-rs/wasm-runtime": "^1.2.2", + "@tybys/wasm-util": "^0.10.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/core": { + "version": "1.11.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.3", + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/runtime": { + "version": "1.11.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/wasi-threads": { + "version": "1.2.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { + "version": "1.2.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1 || ^2.0.0-alpha.3", + "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.3" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@tybys/wasm-util": { + "version": "0.10.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/tslib": { + "version": "2.8.1", + "dev": true, + "inBundle": true, + "license": "0BSD", + "optional": true + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.5.tgz", + "integrity": "sha512-9o8jgthi+QE5eandnboiJT64VQfnIArfZzSTdgbhEK5aafdiu2jTW9Honi/mwYHxBZuH1vAC57IFyrh+0iK5Gg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.5.tgz", + "integrity": "sha512-XiKFfIy1RWe7qK4WqByxNW7Oz1/nkOy8o/BWhHminyV1PmpUd8Eedj5v2A8h2kpqeVlz6xRnwk9Fr/ZXNLcZfg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.5.tgz", + "integrity": "sha512-BCNiY0a1ZjdOHVqw7kyb7U72BwfMF3dfUuN+tQsLWky/J5JOI/r7abibglXfygrZhVO/3u3V+E25kkKTeMkXaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.3.5", + "@tailwindcss/oxide": "4.3.5", + "tailwindcss": "4.3.5" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7 || ^8" + } + }, + "node_modules/@tauri-apps/api": { + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.11.1.tgz", + "integrity": "sha512-M2FPuYND2m+wh5hfW9ZpSdxMPdEJovPBWwoHJmwUpysTYNHaOkVFN419m/K0LIgjb/7KU2vBgsUepJWugQCvAA==", + "license": "Apache-2.0 OR MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/tauri" + } + }, + "node_modules/@tauri-apps/cli": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.11.5.tgz", + "integrity": "sha512-YbeJ6tctNoo40purO4u3Eeo3RVqmsjJr0NoKQRu+4pvO4gMLzkjta7x0k96SxSLmx+rQ+8um1ThOlw+HLpgFug==", + "dev": true, + "license": "Apache-2.0 OR MIT", + "bin": { + "tauri": "tauri.js" + }, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/tauri" + }, + "optionalDependencies": { + "@tauri-apps/cli-darwin-arm64": "2.11.5", + "@tauri-apps/cli-darwin-x64": "2.11.5", + "@tauri-apps/cli-linux-arm-gnueabihf": "2.11.5", + "@tauri-apps/cli-linux-arm64-gnu": "2.11.5", + "@tauri-apps/cli-linux-arm64-musl": "2.11.5", + "@tauri-apps/cli-linux-riscv64-gnu": "2.11.5", + "@tauri-apps/cli-linux-x64-gnu": "2.11.5", + "@tauri-apps/cli-linux-x64-musl": "2.11.5", + "@tauri-apps/cli-win32-arm64-msvc": "2.11.5", + "@tauri-apps/cli-win32-ia32-msvc": "2.11.5", + "@tauri-apps/cli-win32-x64-msvc": "2.11.5" + } + }, + "node_modules/@tauri-apps/cli-darwin-arm64": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.11.5.tgz", + "integrity": "sha512-tggOiVOohjIHdiElbjeBfB41s6cmfsq+ZQ0PX0fEtCdsDdZ9cCi54e5gNK7tdPbR6JbdDe7RA4kbQdyyBUUk/Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-darwin-x64": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.11.5.tgz", + "integrity": "sha512-SrO+KCbqvG1IvVPdlzQX4GEGZRQDISrmDY9bGcW68DLVFBCC06H+Loz6oyUZETUxsSMR6B4oDfvbQVgD4hxsqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.11.5.tgz", + "integrity": "sha512-qLrOaCa8hLD5QVPQRjAgOXvhlTFKXmTliVF773GgvADYcWZSdmncnF5zBFAkdu1uQK8KfQbDlBUwqQYZqBfBRQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm64-gnu": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.11.5.tgz", + "integrity": "sha512-Tq32xpQjiQEdIrvwDq7lwHhXemn070CXWdbCvr9rdi9rsv9NFTbQ6izVSIfNE+59QaerxuwtUtZ5IxDNWaoYBw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm64-musl": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.11.5.tgz", + "integrity": "sha512-+OdWKj5Aq+C8HXypQ4t926V8cpVnc0ZcJIdhTXWjVAJHkaNuo8EuQR6KRZKHWIbJJgKdMPCDosvwzIFaBBqHKQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-riscv64-gnu": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.11.5.tgz", + "integrity": "sha512-Q0V2hjpllyDW8dWQZSsITuQDfcY9BpBZuhXkMa2T5AFLZAn+FJPXQSyvnxWNVxRowdQ59Xn0QVtGm6HEHNUEvw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-x64-gnu": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.11.5.tgz", + "integrity": "sha512-Xz1s87gFjZJZMQKAhLa77YeiCJM6yVog3f9OxDgVd/KxDIoB1dA5V2xOnMM+SRkOGk9juwIBqesVAjV0kUB0DA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-x64-musl": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.11.5.tgz", + "integrity": "sha512-6A88wqAZXZHgMaBrGiy/Bpa4GgUnftXM7uquKOeOXCuK78/XdBxEECicK/1oHgrT179XBFOaA6lQEHysjRmGig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-arm64-msvc": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.11.5.tgz", + "integrity": "sha512-sRGgF/ObRfLcS3PtUdyTbJtkGq3E+PNZTknvAURwMNUtHw9DU/BF6S5si43y9lS5yEO9bWJCA+GGYvnn6cphQw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-ia32-msvc": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.11.5.tgz", + "integrity": "sha512-bHOv/yxqfKpI7ioIFQi5wOfZ7jkbPzJD/UhXY52I/hrmE3qNh71cohIPyqZB5GQn3LZeJWdCUOqmIg/w6XX+Wg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-x64-msvc": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.11.5.tgz", + "integrity": "sha512-vaaOmavqdCeS7oMib2banBZemgrC5v54tSkwoBV+bxrXQZhQZrOwE2EO2i4x+CHNtvQUM/6bSs3iymZMAsycWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/plugin-dialog": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-dialog/-/plugin-dialog-2.7.3.tgz", + "integrity": "sha512-CRgE+7TP4tvq9MjBU6f04NLTFIqVMLKHk3hAqlhil00ngK9ACTrXPH3oHpKMProxILodd3YjBoKbMwSI4IEcfA==", + "license": "MIT OR Apache-2.0", + "dependencies": { + "@tauri-apps/api": "^2.11.0" + } + }, + "node_modules/@tauri-apps/plugin-opener": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-opener/-/plugin-opener-2.5.5.tgz", + "integrity": "sha512-xvzGai5aQds8j8R8RsUK/lW6pGG50YgOYIPLzvkqmkwAj7dfySOD7sGtejRzvVdMmv1EQfKVEFh1MvmDp8QR0g==", + "license": "MIT OR Apache-2.0", + "dependencies": { + "@tauri-apps/api": "^2.11.0" + } + }, + "node_modules/@tauri-apps/plugin-os": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-os/-/plugin-os-2.3.2.tgz", + "integrity": "sha512-n+nXWeuSeF9wcEsSPmRnBEGrRgOy6jjkSU+UVCOV8YUGKb2erhDOxis7IqRXiRVHhY8XMKks00BJ0OAdkpf6+A==", + "license": "MIT OR Apache-2.0", + "dependencies": { + "@tauri-apps/api": "^2.8.0" + } + }, + "node_modules/@types/estree": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz", + "integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==", + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.20.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.5.tgz", + "integrity": "sha512-U2+DNr+wSjpsTS/wZGYHq7GcwfuSmKiKvoPvK22zwTlRhU91yOniN4qRR5KhIjvif7ysw/dz/hKmfDH0Ris4aA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@xterm/addon-fit": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-fit/-/addon-fit-0.11.0.tgz", + "integrity": "sha512-jYcgT6xtVYhnhgxh3QgYDnnNMYTcf8ElbxxFzX0IZo+vabQqSPAjC3c1wJrKB5E19VwQei89QCiZZP86DCPF7g==", + "license": "MIT" + }, + "node_modules/@xterm/addon-webgl": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-webgl/-/addon-webgl-0.19.0.tgz", + "integrity": "sha512-b3fMOsyLVuCeNJWxolACEUED0vm7qC0cy4wRvf3oURSzDTYVQiGPhTnhWZwIHdvC48Y+oLhvYXnY4XDXPoJo6A==", + "license": "MIT" + }, + "node_modules/@xterm/xterm": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@xterm/xterm/-/xterm-6.0.0.tgz", + "integrity": "sha512-TQwDdQGtwwDt+2cgKDLn0IRaSxYu1tSUjgKarSDkUM0ZNiSRXFpjxEsvc/Zgc5kq5omJ+V0a8/kIM2WD3sMOYg==", + "license": "MIT", + "workspaces": [ + "addons/*" + ] + }, + "node_modules/acorn": { + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.19.0.tgz", + "integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/aria-query": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.1.tgz", + "integrity": "sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g==", + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/axobject-query": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", + "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/codemirror": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.2.tgz", + "integrity": "sha512-VhydHotNW5w1UGK0Qj96BwSk/Zqbp9WbnyK2W/eVMv4QyF41INRGpjUhFJY7/uDNuudSc33a/PKr4iDqRduvHw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/commands": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/search": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" + } + }, + "node_modules/cookie": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-2.0.2.tgz", + "integrity": "sha512-SL0cVuEdETEp7pN0FuZb01toc3vnODEfVUCooxG1SJN0yIirh7JMb9X9bvfCFf0vzzbT68RdbKDHYTiWy7a7iw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=22" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/crelt": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.7.tgz", + "integrity": "sha512-aK6BbWfhf4U/wCcLHKPJl/xa6VkVstRaPywWtMKGwuOLc/wZTyQYuoxgvZnNsBvv7Kg3YTBQYYBCggcviQczuA==", + "license": "MIT" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "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==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/devalue": { + "version": "5.9.4", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.9.4.tgz", + "integrity": "sha512-sPAT4pztbu6586/hrhOnMKS17IJrvg12mXiSPSS3W5qDeN2RGgvZ0diZCm31dBbnevfVmujNO3IM2wrS4Y2Rhg==", + "license": "MIT" + }, + "node_modules/enhanced-resolve": { + "version": "5.26.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.26.1.tgz", + "integrity": "sha512-PPnnSJq3azKOIewXR/uppBV/6h98dprBJ/WaQ9Qgj10xX1lJLNfg+XShpbsrSqcDSy2yYYyhfXM1wWhftqgyzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/esm-env": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.2.2.tgz", + "integrity": "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==", + "license": "MIT" + }, + "node_modules/esrap": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/esrap/-/esrap-2.4.0.tgz", + "integrity": "sha512-CQPcneEHw/czj32uwQC52nYnax8H4SXt25FCM+LIwGZ49cMIxpOj3bP8wmzcI+Z0HIy5KkClaPhRLfCySzwHPA==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "peerDependencies": { + "@typescript-eslint/types": "^8.2.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/types": { + "optional": true + } + } + }, + "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/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/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/is-reference": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz", + "integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.6" + } + }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/locate-character": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", + "license": "MIT" + }, + "node_modules/magic-string": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.5.tgz", + "integrity": "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.6.0" + } + }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/mrmime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", + "integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "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/obug": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.2.1.tgz", + "integrity": "sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT", + "engines": { + "node": ">=12.20.0" + } + }, + "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": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.32.tgz", + "integrity": "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==", + "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", + "dependencies": { + "nanoid": "^3.3.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prettier": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.10.tgz", + "integrity": "sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-svelte": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-4.1.1.tgz", + "integrity": "sha512-wXvbXMjSvb4C9ENWTHXyd+ihakKCsJ6rJhLP6/8HFNj4GkZr48jqL9PoKsl2sk7SyCZRTnJ7O2TTowUpOxP/KA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "prettier": "^3.0.0", + "svelte": "^5.0.0" + } + }, + "node_modules/prettier-plugin-tailwindcss": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.8.1.tgz", + "integrity": "sha512-iaFMYqDsE4ffdDkn5qup0j5f2aCEBFZrdrZnvu9QKTlWx/iGPeQ4HHu7b7fCPMxeo9nwQBiOAh2nSypdFYWJkw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.19" + }, + "peerDependencies": { + "@ianvs/prettier-plugin-sort-imports": "*", + "@prettier/plugin-hermes": "*", + "@prettier/plugin-oxc": "*", + "@prettier/plugin-pug": "*", + "@shopify/prettier-plugin-liquid": "*", + "@trivago/prettier-plugin-sort-imports": "*", + "@zackad/prettier-plugin-twig": "*", + "prettier": "^3.0", + "prettier-plugin-astro": "*", + "prettier-plugin-css-order": "*", + "prettier-plugin-jsdoc": "*", + "prettier-plugin-marko": "*", + "prettier-plugin-multiline-arrays": "*", + "prettier-plugin-organize-attributes": "*", + "prettier-plugin-organize-imports": "*", + "prettier-plugin-sort-imports": "*", + "prettier-plugin-svelte": "*" + }, + "peerDependenciesMeta": { + "@ianvs/prettier-plugin-sort-imports": { + "optional": true + }, + "@prettier/plugin-hermes": { + "optional": true + }, + "@prettier/plugin-oxc": { + "optional": true + }, + "@prettier/plugin-pug": { + "optional": true + }, + "@shopify/prettier-plugin-liquid": { + "optional": true + }, + "@trivago/prettier-plugin-sort-imports": { + "optional": true + }, + "@zackad/prettier-plugin-twig": { + "optional": true + }, + "prettier-plugin-astro": { + "optional": true + }, + "prettier-plugin-css-order": { + "optional": true + }, + "prettier-plugin-jsdoc": { + "optional": true + }, + "prettier-plugin-marko": { + "optional": true + }, + "prettier-plugin-multiline-arrays": { + "optional": true + }, + "prettier-plugin-organize-attributes": { + "optional": true + }, + "prettier-plugin-organize-imports": { + "optional": true + }, + "prettier-plugin-sort-imports": { + "optional": true + }, + "prettier-plugin-svelte": { + "optional": true + } + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/rolldown": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.16.tgz", + "integrity": "sha512-bWvlMpFKiTfDKfnK7FC2MPgPeWCf/Kpwsq49ApdW+FQaBZb6O6dZ4MAPbPUjp7hYQrw/RobqCzn64BRrQecGHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.156.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm-eabi": "1.2.16", + "@rolldown/binding-android-arm64": "1.2.16", + "@rolldown/binding-darwin-arm64": "1.2.16", + "@rolldown/binding-darwin-x64": "1.2.16", + "@rolldown/binding-freebsd-x64": "1.2.16", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.16", + "@rolldown/binding-linux-arm64-gnu": "1.2.16", + "@rolldown/binding-linux-arm64-musl": "1.2.16", + "@rolldown/binding-linux-ppc64-gnu": "1.2.16", + "@rolldown/binding-linux-s390x-gnu": "1.2.16", + "@rolldown/binding-linux-x64-gnu": "1.2.16", + "@rolldown/binding-linux-x64-musl": "1.2.16", + "@rolldown/binding-openharmony-arm64": "1.2.16", + "@rolldown/binding-win32-arm64-msvc": "1.2.16", + "@rolldown/binding-win32-x64-msvc": "1.2.16" + } + }, + "node_modules/sade": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/sirv": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.2.tgz", + "integrity": "sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/source-map-js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/style-mod": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.4.tgz", + "integrity": "sha512-XXWIQt633/EpAFx8aZDOTjBzrCaGmhvEQlQo6MVPfa2OzO2cWo+4hV9h+6UkHYlXGfy+ODXKUdP7Pthmcu5ATw==", + "license": "MIT" + }, + "node_modules/svelte": { + "version": "5.57.3", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.57.3.tgz", + "integrity": "sha512-5mAftM3SoDV9X0zdF386F9p2pv8iKOwi/KfBS1XnBAkVCKFzVOLHUoa8iGWAt4buoicLmyWVRpuuD5wplXOQsg==", + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "@jridgewell/sourcemap-codec": "^1.6.0", + "@sveltejs/acorn-typescript": "^1.0.13", + "@types/estree": "^1.0.9", + "acorn": "^8.18.0", + "aria-query": "5.3.1", + "axobject-query": "^4.1.0", + "clsx": "^2.1.1", + "devalue": "^5.9.2", + "esm-env": "^1.2.1", + "esrap": "^2.3.6", + "is-reference": "^3.0.3", + "locate-character": "^3.0.0", + "magic-string": "^0.30.11", + "zimmerframe": "^1.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/svelte-check": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.7.8.tgz", + "integrity": "sha512-laZ49GFHZ3b0z2PWinJWL0syehc/PTR8aHaUaTiBkWJ+4Y38nhxjmXsSz7CbGa3VdKopViVbrBH3bGNqIAI0bQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "@sveltejs/load-config": "^0.2.3", + "chokidar": "^4.0.1", + "fdir": "^6.2.0", + "picocolors": "^1.0.0", + "sade": "^1.7.4" + }, + "bin": { + "svelte-check": "bin/svelte-check" + }, + "engines": { + "node": ">= 18.0.0" + }, + "peerDependencies": { + "svelte": "^4.0.0 || ^5.0.0-next.0", + "typescript": "^5.0.0 || ^6.0.0" + } + }, + "node_modules/svelte/node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/tailwindcss": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.5.tgz", + "integrity": "sha512-FcQk9BuffmEHJP2G0XmB2SplU1aLTI7j07Kunk+U74Ny+XiWOtzXz9aujFZ/avntw1e2cOv/3PkgzflQ7gX2vQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/totalist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/typescript": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", + "dev": true, + "license": "Apache-2.0", + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/vite": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.6.tgz", + "integrity": "sha512-UI7dK29NnS54Fk+mmo7o+jI6U8Fp7hDl+X5Q1k45WH+d4dSlbLVUETGQ+hfkNgvLQGyoElPj837nZyv4MBc0VA==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.33.0", + "picomatch": "^4.0.7", + "postcss": "^8.5.32", + "rolldown": "~1.2.16", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.7.1 || ^0.8.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "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/vitefu": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.3.tgz", + "integrity": "sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg==", + "dev": true, + "license": "MIT", + "workspaces": [ + "tests/deps/*", + "tests/projects/*", + "tests/projects/workspace/packages/*" + ], + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } + } + }, + "node_modules/w3c-keyname": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", + "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", + "license": "MIT" + }, + "node_modules/zimmerframe": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.5.tgz", + "integrity": "sha512-msJxIvYDYcoNL+PJsu+7qmpDWsYmAxTY+2TNYXXF0hzBzBk0BMecOqDOG/EckUoKCuKwObfbugIl8QpqHDXeFA==", + "license": "MIT" } - } - }, - "node_modules/w3c-keyname": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", - "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", - "license": "MIT" - }, - "node_modules/zimmerframe": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.4.tgz", - "integrity": "sha512-B58NGBEoc8Y9MWWCQGl/gq9xBCe4IiKM0a2x7GZdQKOW5Exr8S1W24J6OgM1njK8xCRGvAJIL/MxXHf6SkmQKQ==", - "license": "MIT" } - } } diff --git a/package.json b/package.json index da3b084..89a8c66 100644 --- a/package.json +++ b/package.json @@ -1,44 +1,58 @@ { - "name": "mod0", - "version": "0.1.0", - "description": "IDE Autónomo, Agnóstico y Agéntico | Autonomic, Agnostic and Agentic IDE.", - "type": "module", - "author": "Luis Alberto Hernández Roselló", - "private": true, - "license": "Apache-2.0", - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview", - "lint": "prettier --check . && eslint .", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "tauri": "tauri" - }, - "dependencies": { - "@codemirror/lang-javascript": "^6.2.4", - "@codemirror/language-data": "^6.5.2", - "@codemirror/theme-one-dark": "^6.1.3", - "@tauri-apps/api": "^2", - "@tauri-apps/plugin-dialog": "^2.6.0", - "@tauri-apps/plugin-opener": "^2", - "@tauri-apps/plugin-os": "^2.3.2", - "@tauri-apps/plugin-window-state": "^2.4.1", - "codemirror": "^6.0.2", - "lucide-svelte": "^0.563.0" - }, - "devDependencies": { - "@sveltejs/adapter-static": "^3.0.6", - "@sveltejs/kit": "^2.9.0", - "@sveltejs/vite-plugin-svelte": "^5.0.0", - "@tailwindcss/postcss": "^4.1.18", - "@tauri-apps/cli": "^2", - "autoprefixer": "^10.4.24", - "postcss": "^8.5.6", - "svelte": "^5.0.0", - "svelte-check": "^4.0.0", - "tailwindcss": "^4.1.18", - "typescript": "~5.6.2", - "vite": "^6.0.3" - } + "name": "mod0", + "version": "0.3.0", + "description": "Mission control para tus sesiones de CLI con IA | Mission control for your AI CLI sessions.", + "type": "module", + "author": "Luis Alberto Hernández Roselló", + "private": true, + "license": "Apache-2.0", + "engines": { + "node": ">=22.12" + }, + "imports": { + "#lib/*": "./src/lib/*" + }, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "format": "prettier --write .", + "lint": "prettier --check .", + "tauri": "tauri" + }, + "dependencies": { + "@codemirror/language": "^6.11.3", + "@codemirror/language-data": "^6.5.2", + "@codemirror/merge": "^6.12.3", + "@codemirror/state": "^6.5.2", + "@codemirror/view": "^6.38.0", + "@lezer/highlight": "^1.2.1", + "@lucide/svelte": "^1.70.0", + "@tauri-apps/api": "~2.11.1", + "@tauri-apps/plugin-dialog": "~2.7.3", + "@tauri-apps/plugin-opener": "~2.5.5", + "@tauri-apps/plugin-os": "~2.3.2", + "@xterm/addon-fit": "^0.11.0", + "@xterm/addon-webgl": "^0.19.0", + "@xterm/xterm": "^6.0.0", + "codemirror": "^6.0.2" + }, + "devDependencies": { + "@sveltejs/adapter-static": "^4.0.1", + "@sveltejs/kit": "^3.1.1", + "@sveltejs/vite-plugin-svelte": "^7.3.1", + "@tailwindcss/vite": "^4.3.5", + "@tauri-apps/cli": "~2.11.5", + "@types/node": "^22.0.0", + "prettier": "^3.9.10", + "prettier-plugin-svelte": "^4.1.1", + "prettier-plugin-tailwindcss": "^0.8.1", + "svelte": "^5.57.3", + "svelte-check": "^4.7.8", + "tailwindcss": "^4.3.5", + "typescript": "~6.0.3", + "vite": "^8.3.6" + } } diff --git a/postcss.config.js b/postcss.config.js deleted file mode 100644 index af9d8dc..0000000 --- a/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - plugins: { - '@tailwindcss/postcss': {}, - autoprefixer: {}, - }, -} \ No newline at end of file diff --git a/scripts/capture-screenshots.py b/scripts/capture-screenshots.py new file mode 100644 index 0000000..7efe84d --- /dev/null +++ b/scripts/capture-screenshots.py @@ -0,0 +1,86 @@ +""" +Genera capturas de la interfaz de MOD0 con un backend simulado (scripts/mock-tauri.js). + +Requisitos: `pip install playwright && playwright install chromium`, y haber ejecutado `npm run build`. +Uso: python scripts/capture-screenshots.py [carpeta_salida] [idiomas, ej. es,en] +""" + +import subprocess +import sys +import time +from pathlib import Path + +from playwright.sync_api import sync_playwright + +ROOT = Path(__file__).resolve().parent.parent +OUT = Path(sys.argv[1]) if len(sys.argv) > 1 else ROOT / "docs" / "screenshots" +LANGS = sys.argv[2].split(",") if len(sys.argv) > 2 else ["es"] +PORT = 4173 + +SHOTS = [ + # nombre, actividad (atajo Ctrl+n), espera extra (ms), preparación opcional (JS) + ("sessions", "1", 700, None), + ("thinking-graph", "2", 900, "document.querySelector('[class*=\"row-hover\"]')"), + ("kanban", "3", 500, None), + ("files-graph", "4", 1400, None), + ("review", "5", 1100, None), +] + + +def main() -> None: + OUT.mkdir(parents=True, exist_ok=True) + server = subprocess.Popen( + ["npx", "vite", "preview", "--port", str(PORT), "--strictPort"], + cwd=ROOT, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, + ) + time.sleep(3) + + try: + with sync_playwright() as p: + # Sin WebGL: el rasterizador por software de Chromium headless escala mal xterm con DPR fraccionario. + browser = p.chromium.launch(args=["--disable-webgl"]) + for lang in LANGS: + context = browser.new_context(viewport={"width": 1600, "height": 1000}, device_scale_factor=1.5) + context.add_init_script(f"window.__MOCK_LANG = '{lang}'") + context.add_init_script(path=str(ROOT / "scripts" / "mock-tauri.js")) + page = context.new_page() + page.on("pageerror", lambda e: print("[pageerror]", e)) + + page.goto(f"http://localhost:{PORT}/") + page.wait_for_selector("header", timeout=15000) + page.wait_for_timeout(1200) + + folder = OUT / lang + folder.mkdir(parents=True, exist_ok=True) + for name, key, wait, _ in SHOTS: + page.keyboard.press(f"Control+{key}") + page.wait_for_timeout(wait) + page.screenshot(path=str(folder / f"{name}.png")) + print("captura:", lang, name) + + # Vistas alternativas (diagrama ↔ cronología, impacto, árbol de cambios) + def click(selector, shot, wait=900, key=None): + if key: + page.keyboard.press(key) + page.wait_for_timeout(500) + page.click(selector) + page.wait_for_timeout(wait) + page.screenshot(path=str(folder / f"{shot}.png")) + print("captura:", lang, shot) + + click("button:has-text('Impacto'), button:has-text('Impact')", "files-impact", 1500, "Control+4") + click("button[title='Árbol por carpetas'], button[title='Folder tree']", "review-tree", 900, "Control+5") + click("button:has-text('Cronología'), button:has-text('Timeline')", "thinking-timeline", 900, "Control+2") + + # Paleta de comandos + page.keyboard.press("Control+Shift+P") + page.wait_for_timeout(400) + page.screenshot(path=str(folder / "palette.png")) + context.close() + browser.close() + finally: + server.terminate() + + +if __name__ == "__main__": + main() diff --git a/scripts/mock-tauri.js b/scripts/mock-tauri.js new file mode 100644 index 0000000..32798cd --- /dev/null +++ b/scripts/mock-tauri.js @@ -0,0 +1,811 @@ +/** + * Backend simulado de Tauri para ver la interfaz de MOD0 en un navegador normal + * (capturas de pantalla, diseño, revisión visual). No forma parte de la app. + * + * Uso: inyectar este archivo antes de cargar la página (ver `capture-screenshots.py`). + */ +(() => { + const EN = window.__MOCK_LANG === 'en'; + const tx = (es, en) => (EN ? en : es); + const now = Date.now(); + const min = 60_000; + const callbacks = new Map(); + let nextCallback = 1; + const listeners = []; + + const base = 'C:\\dev\\acme-api'; + const abs = (rel) => `${base}\\${rel.replace(/\//g, '\\')}`; + + // ───────────── Sesiones ───────────── + const kpis = (o) => ({ + turns: 0, + toolCalls: 0, + errors: 0, + filesChanged: 0, + additions: 0, + deletions: 0, + contextTokens: 0, + ...o, + }); + const mk = (i, name, status, since, extra = {}) => ({ + id: `s${i}`, + name, + projectPath: base, + cwd: extra.worktree ? `${base}-${name}` : base, + branch: extra.worktree ? `mod0/${name}` : 'main', + baseSha: 'abc123', + worktree: !!extra.worktree, + profileId: 'claude', + profileName: 'Claude Code', + status, + statusSince: now - since * min, + createdAt: now - 90 * min, + now: null, + kpis: kpis({}), + plan: [], + model: 'claude-sonnet', + lastMessage: null, + claudeSessionId: `cs${i}`, + transcriptPath: null, + touched: [], + exitCode: null, + reviewed: false, + colorIdx: i % 8, + observed: true, + ...extra, + }); + + const sessions = [ + mk(0, 'auth-refactor', 'working', 2, { + worktree: true, + now: { + kind: 'write', + label: tx('Editar session.ts', 'Edit session.ts'), + target: abs('src/auth/session.ts'), + }, + kpis: kpis({ + turns: 4, + toolCalls: 31, + filesChanged: 6, + additions: 142, + deletions: 38, + contextTokens: 118000, + }), + touched: [abs('src/auth/session.ts'), abs('src/auth/tokens.ts'), abs('src/middleware/guard.ts')], + }), + mk(1, 'payments-webhook', 'waiting', 6, { + worktree: true, + now: { kind: 'exec', label: 'npm run migrate', target: null }, + kpis: kpis({ + turns: 2, + toolCalls: 14, + filesChanged: 3, + additions: 57, + deletions: 4, + contextTokens: 72000, + }), + touched: [abs('src/payments/webhook.ts')], + }), + mk(2, 'fix-flaky-tests', 'review', 11, { + worktree: true, + lastMessage: tx( + 'Estabilicé los 4 tests intermitentes: el problema era un temporizador compartido entre suites. Añadí aislamiento por prueba y subí la cobertura del módulo de colas.', + 'I stabilized the 4 flaky tests: the problem was a timer shared between suites. I added per-test isolation and raised coverage on the queue module.', + ), + kpis: kpis({ + turns: 3, + toolCalls: 22, + filesChanged: 6, + additions: 86, + deletions: 21, + contextTokens: 96000, + }), + }), + mk(3, 'docs-api', 'working', 1, { + now: { kind: 'read', label: tx('Leer README.md', 'Read README.md'), target: abs('README.md') }, + kpis: kpis({ turns: 1, toolCalls: 8, filesChanged: 1, additions: 12, contextTokens: 31000 }), + }), + mk(4, 'perf-queries', 'working', 4, { + worktree: true, + now: { kind: 'search', label: 'Grep "SELECT .* FROM orders"', target: null }, + kpis: kpis({ + turns: 2, + toolCalls: 17, + errors: 1, + filesChanged: 2, + additions: 29, + deletions: 11, + contextTokens: 164000, + }), + }), + mk(5, 'i18n-extract', 'idle', 18, { + lastMessage: tx( + 'Extraje 212 cadenas a los archivos de traducción.', + 'Extracted 212 strings into the translation files.', + ), + kpis: kpis({ turns: 2, toolCalls: 12, contextTokens: 54000 }), + }), + mk(6, 'ci-cache', 'review', 25, { + worktree: true, + lastMessage: tx( + 'Reduje el tiempo de CI de 9 a 4 minutos con caché de dependencias y compilación incremental.', + 'Cut CI time from 9 to 4 minutes with dependency caching and incremental builds.', + ), + kpis: kpis({ + turns: 3, + toolCalls: 19, + filesChanged: 2, + additions: 41, + deletions: 9, + contextTokens: 61000, + }), + }), + mk(7, 'scratch', 'exited', 40, { + profileId: 'shell', + profileName: 'Terminal', + observed: false, + exitCode: 0, + }), + ]; + + // Plan (checklist de TodoWrite) de algunas sesiones. + const todo = (content, status) => ({ content, status }); + sessions[0].plan = [ + todo(tx('Revisar cómo se crean las sesiones', 'Review how sessions are created'), 'completed'), + todo(tx('Diseñar la familia de refresh tokens', 'Design the refresh token family'), 'completed'), + todo(tx('Implementar la rotación en tokens.ts', 'Implement rotation in tokens.ts'), 'completed'), + todo(tx('Conectar session.ts con el nuevo flujo', 'Wire session.ts to the new flow'), 'in_progress'), + todo(tx('Ajustar el guard y las rutas', 'Adjust the guard and routes'), 'pending'), + todo(tx('Escribir tests de reutilización', 'Write reuse-detection tests'), 'pending'), + todo(tx('Actualizar la documentación', 'Update the docs'), 'pending'), + ]; + sessions[1].plan = [ + todo(tx('Verificar la firma del webhook', 'Verify the webhook signature'), 'completed'), + todo(tx('Hacer idempotente el procesamiento', 'Make processing idempotent'), 'in_progress'), + todo(tx('Migrar la tabla de eventos', 'Migrate the events table'), 'pending'), + ]; + sessions[4].plan = [ + todo(tx('Medir las consultas lentas', 'Measure the slow queries'), 'completed'), + todo(tx('Añadir índices a orders', 'Add indexes to orders'), 'in_progress'), + todo(tx('Reescribir el listado paginado', 'Rewrite the paginated list'), 'pending'), + todo(tx('Comparar planes de ejecución', 'Compare execution plans'), 'pending'), + ]; + + // ───────────── Thinking graph ───────────── + function graph(sessionIndex) { + const nodes = []; + let seq = 0; + let tail = null; + const t0 = now - 40 * min; + const push = (n) => { + nodes.push({ + detail: null, + intent: null, + target: null, + tool: null, + durationMs: null, + status: 'ok', + parent: tail, + ts: t0 + seq * 7000, + ...n, + seq: ++seq, + }); + return nodes[nodes.length - 1]; + }; + const tool = (turn, id, name, family, label, target, intent, ms, status = 'ok') => + push({ + id, + turn, + kind: 'tool', + family, + tool: name, + label, + target, + intent, + durationMs: ms, + status, + parent: tail, + }); + const prompts = [ + tx( + 'Refactoriza la autenticación para usar tokens rotativos', + 'Refactor authentication to use rotating tokens', + ), + tx('Los tests de integración fallan, arréglalos', 'Integration tests are failing, fix them'), + tx('Añade límite de intentos al login', 'Add attempt limiting to login'), + tx('Actualiza la documentación del endpoint', 'Update the endpoint documentation'), + ]; + const nTurns = [4, 3, 2, 2][sessionIndex % 4]; + + for (let turn = 1; turn <= nTurns; turn++) { + const p = push({ + id: `p${turn}`, + turn, + kind: 'prompt', + family: 'think', + label: prompts[(turn - 1) % 4], + detail: prompts[(turn - 1) % 4], + parent: null, + }); + tail = p.id; + const steps = [ + [ + 'Read', + 'read', + tx('Leer session.ts', 'Read session.ts'), + 'src/auth/session.ts', + tx( + 'Primero reviso cómo se crean las sesiones hoy.', + 'First I check how sessions are created today.', + ), + 420, + ], + [ + 'Grep', + 'search', + 'Grep "refreshToken"', + null, + tx( + 'Busco todos los usos del refresh token.', + 'I look for every use of the refresh token.', + ), + 310, + ], + ['Read', 'read', tx('Leer tokens.ts', 'Read tokens.ts'), 'src/auth/tokens.ts', null, 380], + [ + 'Edit', + 'write', + tx('Editar tokens.ts', 'Edit tokens.ts'), + 'src/auth/tokens.ts', + tx( + 'Implemento la rotación: cada refresh invalida el anterior.', + 'I implement rotation: every refresh invalidates the previous one.', + ), + 900, + ], + [ + 'Edit', + 'write', + tx('Editar session.ts', 'Edit session.ts'), + 'src/auth/session.ts', + tx('Conecto la sesión con el nuevo flujo.', 'I wire the session to the new flow.'), + 1200, + ], + [ + 'Bash', + 'exec', + 'npm test -- auth', + null, + tx('Corro los tests del módulo para validar.', 'I run the module tests to validate.'), + 8400, + ], + [ + 'Edit', + 'write', + tx('Editar guard.ts', 'Edit guard.ts'), + 'src/middleware/guard.ts', + tx('Ajusto el guard al nuevo formato.', 'I adjust the guard to the new format.'), + 700, + ], + ]; + const limit = turn === nTurns && sessionIndex === 0 ? 5 : steps.length; + let prev = p.id; + for (let i = 0; i < limit; i++) { + const [n, f, l, tg, intent, ms] = steps[i]; + const running = turn === nTurns && sessionIndex === 0 && i === limit - 1; + const failed = sessionIndex === 4 && turn === 2 && i === 5; + if (i === 1) { + // llamadas en paralelo: dos lecturas con el mismo padre + tail = prev; + tool(turn, `t${turn}${i}a`, n, f, l, tg && abs(tg), intent, ms); + tool( + turn, + `t${turn}${i}b`, + 'Read', + 'read', + tx('Leer routes.ts', 'Read routes.ts'), + abs('src/api/routes.ts'), + null, + 350, + ); + prev = `t${turn}${i}a`; + tail = prev; + continue; + } + const node = tool( + turn, + `t${turn}${i}`, + n, + f, + l, + tg && abs(tg), + intent, + running ? null : ms, + running ? 'running' : failed ? 'error' : 'ok', + ); + if (running) tail = prev; + else { + tail = node.id; + prev = node.id; + } + } + if (!(turn === nTurns && sessionIndex === 0)) { + const s = push({ + id: `s${turn}`, + turn, + kind: 'stop', + family: 'think', + label: 'Listo', + detail: tx('Cambios aplicados y tests en verde.', 'Changes applied and tests green.'), + parent: tail, + }); + tail = s.id; + } + } + return nodes; + } + + // ───────────── Archivos ───────────── + const dir = (name, parent) => ({ name, path: `${parent}\\${name}`, isDir: true }); + const file = (name, parent) => ({ name, path: `${parent}\\${name}`, isDir: false }); + const tree = { + [base]: [ + dir('docs', base), + dir('src', base), + dir('tests', base), + file('.gitignore', base), + file('package.json', base), + file('README.md', base), + file('tsconfig.json', base), + ], + [`${base}\\src`]: [ + dir('api', `${base}\\src`), + dir('auth', `${base}\\src`), + dir('db', `${base}\\src`), + dir('jobs', `${base}\\src`), + dir('middleware', `${base}\\src`), + dir('payments', `${base}\\src`), + file('index.ts', `${base}\\src`), + ], + [`${base}\\src\\auth`]: [ + file('session.ts', `${base}\\src\\auth`), + file('tokens.ts', `${base}\\src\\auth`), + file('login.ts', `${base}\\src\\auth`), + ], + [`${base}\\src\\payments`]: [ + file('webhook.ts', `${base}\\src\\payments`), + file('invoice.ts', `${base}\\src\\payments`), + ], + }; + + const names = (list) => list.map((n) => `${n}.ts`); + const unit = Array.from({ length: 14 }, (_, i) => `case${String(i + 1).padStart(2, '0')}.test.ts`).concat( + ['tokens.test.ts', 'webhook.test.ts'], + ); + const layout = { + 'src/api/routes': names(['users', 'orders', 'payments', 'auth', 'health', 'index']), + 'src/api/handlers': names(['create', 'update', 'remove', 'list', 'validate']), + 'src/auth': names([ + 'session', + 'tokens', + 'login', + 'rotation', + 'guard', + 'crypto', + 'claims', + 'logout', + 'index', + ]), + 'src/db': names(['client', 'pool', 'schema', 'queries', 'index', 'seed', 'types', 'utils']), + 'src/db/migrations': names(['m001_init', 'm002_users', 'm003_orders', 'm004_tokens']), + 'src/payments': names([ + 'webhook', + 'invoice', + 'refund', + 'stripe', + 'index', + 'types', + 'events', + 'retry', + 'ledger', + 'utils', + ]), + 'src/jobs': names(['mailer', 'cleanup', 'reports', 'scheduler', 'index', 'runner', 'types']), + 'src/middleware': names(['guard', 'cors', 'rate', 'logger', 'errors']), + 'src/config': names(['env', 'flags', 'index']), + 'src/lib': names([ + 'http', + 'log', + 'time', + 'ids', + 'retry', + 'cache', + 'json', + 'fs', + 'events', + 'math', + 'strings', + ]), + 'src/models': names(['user', 'order', 'payment', 'token', 'session', 'invoice', 'product', 'index']), + 'src/queue': names(['client', 'worker', 'types', 'retry', 'index', 'dlq']), + 'src/mail': names(['templates', 'send', 'types', 'index']), + 'tests/unit': unit, + 'tests/e2e': names(['login', 'checkout', 'refunds', 'health', 'tokens', 'admin']), + scripts: names(['seed', 'migrate', 'release']), + }; + const files = Object.entries(layout).flatMap(([dir, list]) => list.map((f) => `${dir}/${f}`)); + const under = (module) => files.filter((f) => f.startsWith(`${module}/`)); + const moduleLinks = [ + ['src/api', 'src/auth', 7], + ['src/api', 'src/payments', 5], + ['src/api', 'src/middleware', 4], + ['src/api', 'src/lib', 9], + ['src/auth', 'src/db', 6], + ['src/auth', 'src/models', 5], + ['src/auth', 'src/config', 2], + ['src/payments', 'src/db', 6], + ['src/payments', 'src/queue', 3], + ['src/payments', 'src/mail', 2], + ['src/jobs', 'src/queue', 5], + ['src/jobs', 'src/db', 4], + ['src/middleware', 'src/auth', 3], + ['src/db', 'src/models', 8], + ['src/db', 'src/config', 2], + ['src/queue', 'src/lib', 3], + ['src/mail', 'src/lib', 2], + ['tests/unit', 'src/auth', 6], + ['tests/unit', 'src/payments', 4], + ['tests/unit', 'src/lib', 5], + ['tests/e2e', 'src/api', 5], + ['scripts', 'src/db', 1], + ]; + const edges = new Set(); + for (const [a, b, weight] of moduleLinks) { + const from = under(a); + const to = under(b); + for (let i = 0; i < weight; i++) + edges.add( + `${files.indexOf(from[(i * 2) % from.length])}>${files.indexOf(to[(i * 3 + 1) % to.length])}`, + ); + } + // El módulo de autenticación gira alrededor de tokens.ts (lo importan casi todos sus archivos). + for (const f of ['session', 'login', 'rotation', 'guard', 'logout']) + edges.add(`${files.indexOf(`src/auth/${f}.ts`)}>${files.indexOf('src/auth/tokens.ts')}`); + edges.add(`${files.indexOf('src/middleware/guard.ts')}>${files.indexOf('src/auth/guard.ts')}`); + edges.add(`${files.indexOf('src/api/routes/auth.ts')}>${files.indexOf('src/auth/session.ts')}`); + edges.add(`${files.indexOf('tests/unit/tokens.test.ts')}>${files.indexOf('src/auth/tokens.ts')}`); + const edgeList = [...edges].map((e) => e.split('>').map(Number)); + + const groupOf = (path, expanded) => { + const parts = path.split('/'); + let prefix = ''; + for (let i = 0; i < parts.length; i++) { + prefix = prefix ? `${prefix}/${parts[i]}` : parts[i]; + if (i === parts.length - 1 || !expanded.has(prefix)) return prefix; + } + return prefix; + }; + const aggregate = (expanded) => { + const nodes = new Map(); + const dirs = new Set(); + let maxDepth = 0; + const groups = files.map((path) => { + maxDepth = Math.max(maxDepth, path.split('/').length - 1); + const parts = path.split('/'); + for (let end = 1; end < parts.length; end++) dirs.add(parts.slice(0, end).join('/')); + const id = groupOf(path, expanded); + const node = nodes.get(id) || { + id, + label: id.split('/').pop(), + files: 0, + bytes: 0, + kind: id === path ? 'file' : 'dir', + }; + node.files++; + node.bytes += 3100; + nodes.set(id, node); + return id; + }); + const weights = new Map(); + for (const [a, b] of edgeList) + if (groups[a] !== groups[b]) + weights.set(`${groups[a]}>${groups[b]}`, (weights.get(`${groups[a]}>${groups[b]}`) || 0) + 1); + return { + maxDepth, + fileCount: files.length, + dirs: [...dirs].sort(), + nodes: [...nodes.values()].sort((x, y) => x.id.localeCompare(y.id)), + edges: [...weights].map(([k, weight]) => ({ + from: k.split('>')[0], + to: k.split('>')[1], + weight, + })), + }; + }; + const impact = (seeds) => { + const rev = files.map(() => []); + for (const [a, b] of edgeList) rev[b].push(a); + const seen = new Set(seeds.map((p) => files.indexOf(p)).filter((i) => i >= 0)); + const start = new Set(seen); + const queue = [...seen]; + while (queue.length) + for (const d of rev[queue.pop()]) + if (!seen.has(d)) { + seen.add(d); + queue.push(d); + } + return [...seen] + .filter((i) => !start.has(i)) + .map((i) => files[i]) + .sort(); + }; + + // ───────────── Revisión ───────────── + const changes = [ + { path: 'src/auth/tokens.ts', status: 'M', additions: 48, deletions: 12 }, + { path: 'src/auth/session.ts', status: 'M', additions: 31, deletions: 9 }, + { path: 'src/middleware/guard.ts', status: 'M', additions: 14, deletions: 6 }, + { path: 'src/auth/rotation.ts', status: 'A', additions: 39, deletions: 0 }, + { path: 'tests/unit/tokens.test.ts', status: 'U', additions: 62, deletions: 0 }, + { path: 'src/auth/legacy.ts', status: 'D', additions: 0, deletions: 24 }, + ]; + const original = `import { sign, verify } from './crypto';\nimport { db } from '../db';\n\nconst TTL = 60 * 60;\n\nexport async function issueTokens(userId: string) {\n const access = sign({ sub: userId }, TTL);\n const refresh = sign({ sub: userId, kind: 'refresh' }, TTL * 24);\n return { access, refresh };\n}\n\nexport async function refreshTokens(token: string) {\n const payload = verify(token);\n if (!payload) throw new Error('invalid token');\n return issueTokens(payload.sub);\n}\n\nexport function revoke(userId: string) {\n return db.tokens.deleteMany({ userId });\n}\n`; + const modified = `import { sign, verify } from './crypto';\nimport { db } from '../db';\nimport { rotate } from './rotation';\n\nconst TTL = 60 * 15;\nconst REFRESH_TTL = 60 * 60 * 24 * 7;\n\nexport async function issueTokens(userId: string, family = crypto.randomUUID()) {\n const access = sign({ sub: userId }, TTL);\n const refresh = sign({ sub: userId, kind: 'refresh', family }, REFRESH_TTL);\n await db.tokens.create({ userId, family, hash: refresh });\n return { access, refresh };\n}\n\nexport async function refreshTokens(token: string) {\n const payload = verify(token);\n if (!payload) throw new Error('invalid token');\n\n // Cada refresh invalida el anterior: si se reutiliza uno viejo, se revoca toda la familia.\n const rotated = await rotate(payload.family, token);\n if (!rotated) {\n await revokeFamily(payload.family);\n throw new Error('token reuse detected');\n }\n return issueTokens(payload.sub, payload.family);\n}\n\nexport function revoke(userId: string) {\n return db.tokens.deleteMany({ userId });\n}\n\nexport function revokeFamily(family: string) {\n return db.tokens.deleteMany({ family });\n}\n`; + + // ───────────── Kanban ───────────── + const board = { + tasks: [ + { + id: 'k1', + title: tx('Migrar a tokens rotativos', 'Migrate to rotating tokens'), + notes: tx( + 'Familia de refresh tokens con detección de reutilización.', + 'Refresh token family with reuse detection.', + ), + column: 'doing', + sessionId: 's0', + createdAt: now, + }, + { + id: 'k2', + title: tx('Webhook de pagos idempotente', 'Idempotent payments webhook'), + notes: '', + column: 'doing', + sessionId: 's1', + createdAt: now, + }, + { + id: 'k3', + title: tx('Estabilizar tests intermitentes', 'Stabilize flaky tests'), + notes: '', + column: 'review', + sessionId: 's2', + createdAt: now, + }, + { + id: 'k4', + title: tx('Reducir tiempo de CI', 'Reduce CI time'), + notes: tx('Caché de dependencias.', 'Dependency caching.'), + column: 'review', + sessionId: 's6', + createdAt: now, + }, + { + id: 'k5', + title: tx('Rate limiting por IP', 'Per-IP rate limiting'), + notes: tx('Login y registro.', 'Login and sign-up.'), + column: 'backlog', + sessionId: null, + createdAt: now, + }, + { + id: 'k6', + title: tx('Paginación por cursor en /orders', 'Cursor pagination on /orders'), + notes: '', + column: 'backlog', + sessionId: null, + createdAt: now, + }, + { + id: 'k7', + title: tx('Exportar facturas a PDF', 'Export invoices to PDF'), + notes: '', + column: 'backlog', + sessionId: null, + createdAt: now, + }, + { + id: 'k8', + title: tx('Actualizar a Node 24', 'Upgrade to Node 24'), + notes: '', + column: 'done', + sessionId: null, + createdAt: now, + }, + ], + }; + + const config = { + theme: 'dark', + accent: 'blue', + language: EN ? 'en' : 'es', + uiScale: 1, + reduceMotion: false, + terminalFontSize: 13, + contextLimit: 200000, + shell: null, + lastProjectPath: base, + recentProjects: [base, 'C:\\dev\\infoshield', 'C:\\dev\\sggha'], + profiles: [ + { + id: 'claude', + name: 'Claude Code', + command: 'claude', + args: [], + env: {}, + hooks: true, + resumeArgs: ['--resume', '{session}'], + }, + { + id: 'codex', + name: 'Codex CLI', + command: 'codex', + args: [], + env: {}, + hooks: false, + resumeArgs: [], + }, + { + id: 'gemini', + name: 'Gemini CLI', + command: 'gemini', + args: [], + env: {}, + hooks: false, + resumeArgs: [], + }, + { id: 'shell', name: 'Terminal', command: '', args: [], env: {}, hooks: false, resumeArgs: [] }, + ], + defaultProfileId: 'claude', + notifications: { + desktop: true, + onlyWhenUnfocused: true, + onNeedsYou: true, + onSessionDone: false, + onAllIdle: true, + webhook: { + enabled: true, + url: 'https://ntfy.sh/mi-tema-secreto', + method: 'POST', + body: '{title}: {message}', + contentType: 'text/plain; charset=utf-8', + }, + }, + }; + + const esc = (code, text) => `\x1b[${code}m${text}\x1b[0m`; + const terminalText = + [ + esc('2', '╭─────────────────────────────────────────────────────────╮'), + `${esc('2', '│')} ${esc('38;5;216', '✻')} Welcome to ${esc('1', 'Claude Code')} ${esc('2', '│')}`, + esc('2', '╰─────────────────────────────────────────────────────────╯'), + '', + `${esc('1;38;5;111', '>')} ${tx('Refactoriza la autenticación para usar tokens rotativos', 'Refactor authentication to use rotating tokens')}`, + '', + `${esc('38;5;216', '●')} ${tx('Voy a empezar leyendo cómo se crean las sesiones hoy.', "I'll start by reading how sessions are created today.")}`, + `${esc('38;5;108', '●')} ${esc('1', 'Read')}(src/auth/session.ts)`, + `${esc('2', tx(' ⎿ Leídas 84 líneas', ' ⎿ Read 84 lines'))}`, + `${esc('38;5;216', '●')} ${tx('Implemento la rotación: cada refresh invalida el anterior.', 'I implement rotation: every refresh invalidates the previous one.')}`, + `${esc('38;5;108', '●')} ${esc('1', 'Update')}(src/auth/tokens.ts)`, + `${esc('2', tx(' ⎿ Actualizado con ', ' ⎿ Updated with '))}${esc('32', tx('48 adiciones', '48 additions'))}${esc('2', tx(' y ', ' and '))}${esc('31', tx('12 eliminaciones', '12 removals'))}`, + '', + `${esc('2', tx('✻ Trabajando… (esc para interrumpir)', '✻ Working… (esc to interrupt)'))}`, + ].join('\r\n') + '\r\n'; + + const handlers = { + config_get: () => config, + config_update: ({ config: c }) => Object.assign(config, c), + config_set_project: () => config, + app_info: () => ({ + version: '0.3.0', + hookPort: 51423, + dataDir: 'C:\\Users\\luke\\AppData\\Roaming\\com.luke.mod0', + configDir: 'C:\\Users\\luke\\AppData\\Roaming\\com.luke.mod0', + shell: 'pwsh.exe', + }), + notify_test: () => null, + session_list: () => sessions, + session_graph: ({ id }) => graph(Number(id.slice(1))), + session_create: ({ request }) => ({ + ...sessions[0], + id: `s${sessions.length}`, + name: request.name || 'nueva', + status: 'starting', + }), + session_stop: () => null, + session_restart: () => sessions[7], + session_remove: () => null, + session_refresh: () => null, + session_rename: ({ id, name }) => ({ ...sessions[Number(id.slice(1))], name }), + session_set_reviewed: ({ id }) => sessions[Number(id.slice(1))], + git_info: () => ({ isRepo: true, branch: 'main' }), + fs_list_dir: ({ path }) => tree[path] || [], + fs_list_files: () => [ + 'src/auth/session.ts', + 'src/auth/tokens.ts', + 'src/auth/login.ts', + 'src/payments/webhook.ts', + 'src/api/routes.ts', + 'src/db/index.ts', + 'tests/unit/tokens.test.ts', + 'README.md', + 'package.json', + ], + fs_read: () => modified, + fs_graph: ({ expanded }) => aggregate(new Set(expanded)), + fs_impact: ({ paths }) => impact(paths), + profile_check: ({ command }) => ({ + found: command !== 'gemini', + path: command ? `C:\\Users\\luke\\AppData\\Roaming\\npm\\${command}.cmd` : null, + missingEnv: [], + }), + review_changes: () => changes, + review_file: ({ path, status }) => ({ + path, + status, + original: status === 'A' || status === 'U' ? '' : original, + modified: status === 'D' ? '' : modified, + }), + review_commit: () => 'a1b2c3d', + kanban_load: () => board, + kanban_save: () => null, + term_attach: () => new TextEncoder().encode(terminalText).buffer, + term_write: () => null, + term_resize: () => null, + term_detach: () => null, + }; + + window.__TAURI_OS_PLUGIN_INTERNALS__ = { + platform: 'windows', + eol: '\r\n', + version: '11', + family: 'windows', + arch: 'x86_64', + type: 'windows', + }; + window.__TAURI_EVENT_PLUGIN_INTERNALS__ = { unregisterListener() {} }; + window.__TAURI_INTERNALS__ = { + metadata: { + currentWindow: { label: 'main' }, + currentWebview: { windowLabel: 'main', label: 'main' }, + }, + transformCallback(callback) { + const id = nextCallback++; + callbacks.set(id, callback); + return id; + }, + unregisterCallback(id) { + callbacks.delete(id); + }, + convertFileSrc: (p) => p, + async invoke(cmd, args = {}) { + if (cmd === 'plugin:event|listen') { + listeners.push({ event: args.event, handler: args.handler }); + return listeners.length; + } + if (cmd.startsWith('plugin:')) return null; + const handler = handlers[cmd]; + if (!handler) { + console.warn('[mock] comando sin implementar:', cmd); + return null; + } + return handler(args); + }, + }; + + /** Emite un evento hacia la app (para animar demos desde Playwright). */ + window.__mockEmit = (event, payload) => { + for (const l of listeners) + if (l.event === event) callbacks.get(l.handler)?.({ event, id: 0, payload }); + }; +})(); diff --git a/src-tauri/.cargo/config.toml b/src-tauri/.cargo/config.toml new file mode 100644 index 0000000..066da94 --- /dev/null +++ b/src-tauri/.cargo/config.toml @@ -0,0 +1,9 @@ +# Conexiones lentas o inestables: más paciencia y más reintentos al descargar crates. +# (El error típico es "[28] Timeout was reached (Operation too slow. Less than 10 bytes/sec...)".) +[http] +timeout = 300 +low-speed-limit = 1 +multiplexing = false + +[net] +retry = 10 diff --git a/src-tauri/.gitignore b/src-tauri/.gitignore deleted file mode 100644 index 12b835f..0000000 --- a/src-tauri/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -# Generated by Cargo -# will have compiled files and executables -/target/ - -# Generated by Tauri -# will have schema files for capabilities auto-completion -/gen/schemas - -.sqlx \ No newline at end of file diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 71a8ac5..5a2da8a 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -10,9 +10,9 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aho-corasick" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" dependencies = [ "memchr", ] @@ -25,33 +25,33 @@ checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" [[package]] name = "alloc-stdlib" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195" dependencies = [ "alloc-no-stdlib", ] -[[package]] -name = "allocator-api2" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" - [[package]] name = "android_system_properties" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" dependencies = [ "libc", ] [[package]] name = "anyhow" -version = "1.0.101" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "ascii" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" [[package]] name = "async-broadcast" @@ -79,9 +79,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.13.3" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497c00e0fd83a72a79a39fcbd8e3e2f055d6f6c7e025f3b3d91f4f8e76527fb8" +checksum = "f426a31126c735126297bc5ea7a521263c9faff4f63ca415267ee625651c4f37" dependencies = [ "async-task", "concurrent-queue", @@ -111,9 +111,9 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.4.2" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" +checksum = "0876700b0d007ad25d5508865a4259c3af9af6d296bf663a0d586d0bc3369f6f" dependencies = [ "event-listener", "event-listener-strategy", @@ -140,20 +140,20 @@ dependencies = [ [[package]] name = "async-recursion" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +checksum = "4f8abc12baad266b1c8cec146854c195b5864b4221d4b2ca7296a7ae82d9e451" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 3.0.9", ] [[package]] name = "async-signal" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" +checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485" dependencies = [ "async-io", "async-lock", @@ -175,13 +175,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.89" +version = "0.1.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 3.0.9", ] [[package]] @@ -207,15 +207,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "atoi" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" -dependencies = [ - "num-traits", -] - [[package]] name = "atomic-waker" version = "1.1.2" @@ -224,49 +215,42 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] -name = "aws-lc-rs" -version = "1.15.4" +name = "base64" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7b6141e96a8c160799cc2d5adecd5cbbe5054cb8c7c4af53da0f83bb7ad256" -dependencies = [ - "aws-lc-sys", - "zeroize", -] +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] -name = "aws-lc-sys" -version = "0.37.1" +name = "base64" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b092fe214090261288111db7a2b2c2118e5a7f30dc2569f1732c4069a6840549" -dependencies = [ - "cc", - "cmake", - "dunce", - "fs_extra", -] +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64" -version = "0.21.7" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" [[package]] -name = "base64" -version = "0.22.1" +name = "bit-set" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec", +] [[package]] -name = "base64ct" -version = "1.8.3" +name = "bit-vec" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitflags" @@ -276,9 +260,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.10.0" +version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" dependencies = [ "serde_core", ] @@ -303,9 +287,9 @@ dependencies = [ [[package]] name = "blocking" -version = "1.6.2" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" +checksum = "a70e4329df6cb94385eed412ec92375c3cdd8a6e502493d1229b6414e4036dfa" dependencies = [ "async-channel", "async-task", @@ -316,9 +300,9 @@ dependencies = [ [[package]] name = "brotli" -version = "8.0.2" +version = "8.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560" +checksum = "5cc91aac060a7a1e25823bdccbfb6af1875b88f17c6daac97894eed8207166b3" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -327,9 +311,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "5.0.0" +version = "5.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" +checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -337,25 +321,25 @@ dependencies = [ [[package]] name = "bstr" -version = "1.12.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" +checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f" dependencies = [ "memchr", - "serde", + "serde_core", ] [[package]] name = "bumpalo" -version = "3.19.1" +version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" [[package]] name = "bytemuck" -version = "1.25.0" +version = "1.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" [[package]] name = "byteorder" @@ -365,9 +349,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.11.1" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" dependencies = [ "serde", ] @@ -378,7 +362,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "cairo-sys-rs", "glib", "libc", @@ -399,9 +383,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.2.2" +version = "1.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48" +checksum = "bbbad30e4b4c14a39e3cc8aed085a12a327257c316619c93581e017bc52be591" dependencies = [ "serde_core", ] @@ -426,7 +410,7 @@ dependencies = [ "semver", "serde", "serde_json", - "thiserror 2.0.18", + "thiserror 2.0.21", ] [[package]] @@ -436,18 +420,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "374b7c592d9c00c1f4972ea58390ac6b18cbb6ab79011f3bdc90a0b82ca06b77" dependencies = [ "serde", - "toml 0.9.11+spec-1.1.0", + "toml 0.9.12+spec-1.1.0", ] [[package]] name = "cc" -version = "1.2.55" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29" +checksum = "4ff2a8126fff0f8c839080d619675a585e61720bb12d2baceae45769fd66f155" dependencies = [ "find-msvc-tools", - "jobserver", - "libc", "shlex", ] @@ -480,9 +462,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" [[package]] name = "cfg_aliases" @@ -492,38 +474,33 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "cfg_aliases" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" [[package]] name = "chrono" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" dependencies = [ "iana-time-zone", - "js-sys", "num-traits", "serde", - "wasm-bindgen", "windows-link 0.2.1", ] [[package]] -name = "cmake" -version = "0.1.57" +name = "chunked_transfer" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" -dependencies = [ - "cc", -] +checksum = "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901" [[package]] name = "combine" -version = "4.6.7" +version = "4.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92" dependencies = [ "bytes", "memchr", @@ -538,36 +515,33 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "cookie" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" +checksum = "1a373e3602691c3cdea496d2f0ee5935151e6168fe87739483c463db1b2f2f87" dependencies = [ + "percent-encoding", "time", "version_check", ] [[package]] -name = "core-foundation" -version = "0.9.4" +name = "cookie_store" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +checksum = "3fc4bff745c9b4c7fb1e97b25d13153da2bc7796260141df62378998d070207f" dependencies = [ - "core-foundation-sys", - "libc", + "cookie", + "document-features", + "idna", + "indexmap 2.14.2", + "log", + "serde", + "serde_derive", + "serde_json", + "time", + "url", ] [[package]] @@ -588,12 +562,12 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core-graphics" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" +checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97" dependencies = [ - "bitflags 2.10.0", - "core-foundation 0.10.1", + "bitflags 2.13.2", + "core-foundation", "core-graphics-types", "foreign-types", "libc", @@ -605,8 +579,8 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.10.0", - "core-foundation 0.10.1", + "bitflags 2.13.2", + "core-foundation", "libc", ] @@ -619,44 +593,29 @@ dependencies = [ "libc", ] -[[package]] -name = "crc" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" - [[package]] name = "crc32fast" -version = "1.5.0" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +checksum = "5f97d3416d5337d15c4b0d78c8c91df922ca143f57ec20e2d1c188333047ef04" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.15" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -664,27 +623,18 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-queue" -version = "0.3.12" +version = "0.9.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.21" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" [[package]] name = "crypto-common" @@ -698,19 +648,15 @@ dependencies = [ [[package]] name = "cssparser" -version = "0.29.6" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93d03419cb5950ccfd3daf3ff1c7a36ace64609a1a8746d493df1ca0afde0fa" +checksum = "dae61cf9c0abb83bd659dab65b7e4e38d8236824c85f0f804f173567bda257d2" dependencies = [ "cssparser-macros", "dtoa-short", "itoa", - "matches", - "phf 0.10.1", - "proc-macro2", - "quote", + "phf", "smallvec", - "syn 1.0.109", ] [[package]] @@ -720,19 +666,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] name = "ctor" -version = "0.2.9" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" +checksum = "352d39c2f7bef1d6ad73db6f5160efcaed66d94ef8c6c573a8410c00bf909a98" dependencies = [ - "quote", - "syn 2.0.114", + "ctor-proc-macro", + "dtor", ] +[[package]] +name = "ctor-proc-macro" +version = "0.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1" + [[package]] name = "darling" version = "0.21.3" @@ -754,7 +706,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] @@ -765,61 +717,49 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core", "quote", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] -name = "dashmap" -version = "6.1.0" +name = "dbus" +version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +checksum = "3ab69f03cc8c4340c9c8e315114e1658e6775a9b16a04357973aa21cec22b32e" dependencies = [ - "cfg-if", - "crossbeam-utils", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", + "libc", + "libdbus-sys", + "windows-sys 0.61.2", ] [[package]] -name = "data-encoding" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" - -[[package]] -name = "der" -version = "0.7.10" +name = "deranged" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e" dependencies = [ - "const-oid", - "pem-rfc7468", - "zeroize", + "powerfmt", + "serde_core", ] [[package]] -name = "deranged" -version = "0.5.5" +name = "derive_more" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" dependencies = [ - "powerfmt", - "serde_core", + "derive_more-impl", ] [[package]] -name = "derive_more" -version = "0.99.20" +name = "derive_more-impl" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ - "convert_case", "proc-macro2", "quote", "rustc_version", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] @@ -829,9 +769,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", - "const-oid", "crypto-common", - "subtle", ] [[package]] @@ -855,19 +793,13 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "dispatch" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" - [[package]] name = "dispatch2" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "block2", "libc", "objc2", @@ -875,13 +807,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 3.0.9", ] [[package]] @@ -904,14 +836,32 @@ checksum = "0fbbb781877580993a8707ec48672673ec7b81eeba04cfd2310bd28c08e47c8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", ] [[package]] -name = "dotenvy" -version = "0.15.7" +name = "dom_query" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" +checksum = "521e380c0c8afb8d9a1e83a1822ee03556fc3e3e7dbc1fd30be14e37f9cb3f89" +dependencies = [ + "bit-set", + "cssparser", + "foldhash", + "html5ever", + "precomputed-hash", + "selectors", + "tendril", +] [[package]] name = "downcast-rs" @@ -943,6 +893,21 @@ dependencies = [ "dtoa", ] +[[package]] +name = "dtor" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1057d6c64987086ff8ed0fd3fbf377a6b7d205cc7715868cd401705f715cbe4" +dependencies = [ + "dtor-proc-macro", +] + +[[package]] +name = "dtor-proc-macro" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5" + [[package]] name = "dunce" version = "1.0.5" @@ -955,27 +920,18 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" -dependencies = [ - "serde", -] - [[package]] name = "embed-resource" -version = "3.0.6" +version = "3.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55a075fc573c64510038d7ee9abc7990635863992f83ebc52c8b433b8411a02e" +checksum = "6168487b5e7eb2673e6efe1200b1848016e436a6ca0b8031bf04bd9d493a249f" dependencies = [ "cc", "memchr", "rustc_version", - "toml 0.9.11+spec-1.1.0", + "toml 1.2.1+spec-1.1.0", "vswhom", - "winreg 0.55.0", + "winreg 0.56.0", ] [[package]] @@ -984,15 +940,6 @@ version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" -[[package]] -name = "encoding_rs" -version = "0.8.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" -dependencies = [ - "cfg-if", -] - [[package]] name = "endi" version = "1.1.1" @@ -1017,20 +964,20 @@ checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] name = "equivalent" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" [[package]] name = "erased-serde" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e8918065695684b2b0702da20382d5ae6065cf3327bc2d6436bd49a71ce9f3" +checksum = "1e59b668157f32d3459d4bd634861a06ffa2503a461ca5f0916b9f0252605e66" dependencies = [ "serde", "serde_core", @@ -1047,24 +994,12 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "etcetera" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" -dependencies = [ - "cfg-if", - "home", - "windows-sys 0.48.0", -] - [[package]] name = "event-listener" -version = "5.4.1" +version = "5.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" dependencies = [ - "concurrent-queue", "parking", "pin-project-lite", ] @@ -1081,9 +1016,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" [[package]] name = "fdeflate" @@ -1117,29 +1052,19 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.9" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" +checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48" [[package]] name = "flate2" -version = "1.1.9" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +checksum = "626d4928326b646e70f65ed36fc7cf9f206bdb68a0019ee7c6b4709da4e084c4" dependencies = [ "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "flume" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" -dependencies = [ - "futures-core", - "futures-sink", - "spin", + "miniz_oxide 0.9.1", + "zlib-rs", ] [[package]] @@ -1150,9 +1075,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.5" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" [[package]] name = "foreign-types" @@ -1166,13 +1091,13 @@ dependencies = [ [[package]] name = "foreign-types-macros" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 3.0.9", ] [[package]] @@ -1190,89 +1115,37 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - -[[package]] -name = "fsevent-sys" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" -dependencies = [ - "libc", -] - -[[package]] -name = "futf" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" -dependencies = [ - "mac", - "new_debug_unreachable", -] - -[[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" dependencies = [ "futures-core", - "futures-sink", ] [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" [[package]] name = "futures-executor" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" dependencies = [ "futures-core", "futures-task", "futures-util", ] -[[package]] -name = "futures-intrusive" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" -dependencies = [ - "futures-core", - "lock_api", - "parking_lot", -] - [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" [[package]] name = "futures-lite" @@ -1289,34 +1162,33 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 3.0.9", ] [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" dependencies = [ - "futures-channel", "futures-core", "futures-io", "futures-macro", @@ -1324,19 +1196,9 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", "slab", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "gdk" version = "0.18.2" @@ -1456,17 +1318,6 @@ dependencies = [ "windows-link 0.2.1", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.17" @@ -1474,10 +1325,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", - "js-sys", "libc", - "wasi 0.11.1+wasi-snapshot-preview1", - "wasm-bindgen", + "wasi", ] [[package]] @@ -1487,24 +1336,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", - "js-sys", "libc", - "r-efi", + "r-efi 5.3.0", "wasip2", - "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" dependencies = [ "cfg-if", "libc", - "r-efi", - "wasip2", - "wasip3", + "r-efi 6.0.0", ] [[package]] @@ -1545,7 +1390,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "futures-channel", "futures-core", "futures-executor", @@ -1573,7 +1418,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] @@ -1588,15 +1433,15 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" [[package]] name = "globset" -version = "0.4.18" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3" +checksum = "e47d37d2ae4464254884b60ab7071be2b876a9c35b696bd018ddcc76847309cd" dependencies = [ "aho-corasick", "bstr", @@ -1665,26 +1510,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.114", -] - -[[package]] -name = "h2" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http", - "indexmap 2.13.0", - "slab", - "tokio", - "tokio-util", - "tracing", + "syn 2.0.119", ] [[package]] @@ -1695,35 +1521,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - -[[package]] -name = "hashbrown" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" -dependencies = [ - "allocator-api2", - "equivalent", - "foldhash", -] - -[[package]] -name = "hashbrown" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" - -[[package]] -name = "hashlink" -version = "0.10.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" -dependencies = [ - "hashbrown 0.15.5", -] +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" [[package]] name = "heck" @@ -1739,9 +1539,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" +checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284" [[package]] name = "hex" @@ -1749,50 +1549,21 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hkdf" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" -dependencies = [ - "hmac", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - -[[package]] -name = "home" -version = "0.5.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" -dependencies = [ - "windows-sys 0.61.2", -] - [[package]] name = "html5ever" -version = "0.29.1" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b7410cae13cbc75623c98ac4cbfd1f0bedddf3227afc24f370cf0f50a44a11c" +checksum = "1054432bae2f14e0061e33d23402fbaa67a921d319d56adc6bcf887ddad1cbc2" dependencies = [ "log", - "mac", "markup5ever", - "match_token", ] [[package]] name = "http" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" dependencies = [ "bytes", "itoa", @@ -1800,9 +1571,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" dependencies = [ "bytes", "http", @@ -1810,9 +1581,9 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" dependencies = [ "bytes", "futures-core", @@ -1827,67 +1598,53 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + [[package]] name = "hyper" -version = "1.8.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +checksum = "2c3e324da4c95177d6291d4c8730197c0d1822f8a9766814a4a44fa5ab797c9c" dependencies = [ "atomic-waker", "bytes", - "futures-channel", "futures-core", - "h2", "http", "http-body", "httparse", "itoa", "pin-project-lite", - "pin-utils", "smallvec", "tokio", "want", ] -[[package]] -name = "hyper-rustls" -version = "0.27.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" -dependencies = [ - "http", - "hyper", - "hyper-util", - "rustls", - "rustls-pki-types", - "tokio", - "tokio-rustls", - "tower-service", -] - [[package]] name = "hyper-util" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +checksum = "ddc03d96684f9226b8a787cdb71488417b53ab5ea8fdb1dac946cb9431cc8bff" dependencies = [ - "base64 0.22.1", + "base64 0.23.1", "bytes", "futures-channel", "futures-util", "http", "http-body", + "httparse", "hyper", "ipnet", "libc", "percent-encoding", "pin-project-lite", "socket2", - "system-configuration", "tokio", "tower-service", "tracing", - "windows-registry", ] [[package]] @@ -1921,7 +1678,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e795dff5605e0f04bff85ca41b51a96b83e80b281e96231bcaaf1ac35103371" dependencies = [ "byteorder", - "png", + "png 0.17.16", ] [[package]] @@ -2005,12 +1762,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "id-arena" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" - [[package]] name = "ident_case" version = "1.0.1" @@ -2040,9 +1791,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.25" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3d782a365a015e0f5c04902246139249abf769125006fbe7649e2ee88169b4a" +checksum = "7b009b6744c1445efd7244084e25e498636412effb6760b55067553baa925cc7" dependencies = [ "crossbeam-deque", "globset", @@ -2067,12 +1818,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.13.0" +version = "2.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" dependencies = [ "equivalent", - "hashbrown 0.16.1", + "hashbrown 0.17.1", "serde", "serde_core", ] @@ -2086,41 +1837,11 @@ dependencies = [ "cfb", ] -[[package]] -name = "inotify" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" -dependencies = [ - "bitflags 2.10.0", - "inotify-sys", - "libc", -] - -[[package]] -name = "inotify-sys" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" -dependencies = [ - "libc", -] - [[package]] name = "ipnet" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" - -[[package]] -name = "iri-string" -version = "0.7.10" +version = "2.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" -dependencies = [ - "memchr", - "serde", -] +checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" [[package]] name = "is-docker" @@ -2143,9 +1864,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "javascriptcore-rs" @@ -2179,7 +1900,7 @@ dependencies = [ "cesu8", "cfg-if", "combine", - "jni-sys", + "jni-sys 0.3.1", "log", "thiserror 1.0.69", "walkdir", @@ -2188,27 +1909,40 @@ dependencies = [ [[package]] name = "jni-sys" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] [[package]] -name = "jobserver" -version = "0.1.34" +name = "jni-sys" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" dependencies = [ - "getrandom 0.3.4", - "libc", + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", ] [[package]] name = "js-sys" -version = "0.3.85" +version = "0.3.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a" dependencies = [ - "once_cell", + "cfg-if", + "futures-util", "wasm-bindgen", ] @@ -2240,57 +1974,16 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "serde", "unicode-segmentation", ] -[[package]] -name = "kqueue" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac30106d7dce88daf4a3fcb4879ea939476d5074a9b7ddd0fb97fa4bed5596a" -dependencies = [ - "kqueue-sys", - "libc", -] - -[[package]] -name = "kqueue-sys" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" -dependencies = [ - "bitflags 1.3.2", - "libc", -] - -[[package]] -name = "kuchikiki" -version = "0.8.8-speedreader" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02cb977175687f33fa4afa0c95c112b987ea1443e5a51c8f8ff27dc618270cc2" -dependencies = [ - "cssparser", - "html5ever", - "indexmap 2.13.0", - "selectors", -] - [[package]] name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -dependencies = [ - "spin", -] - -[[package]] -name = "leb128fmt" -version = "0.1.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" +checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" [[package]] name = "libappindicator" @@ -2318,9 +2011,18 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.181" +version = "0.2.191" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" + +[[package]] +name = "libdbus-sys" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5" +checksum = "328c4789d42200f1eeec05bd86c9c13c7f091d2ba9a6ea35acdf51f31bc0f043" +dependencies = [ + "pkg-config", +] [[package]] name = "libloading" @@ -2332,45 +2034,32 @@ dependencies = [ "winapi", ] -[[package]] -name = "libm" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" - [[package]] name = "libredox" -version = "0.1.12" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" dependencies = [ - "bitflags 2.10.0", "libc", - "redox_syscall 0.7.1", ] [[package]] -name = "libsqlite3-sys" -version = "0.30.1" +name = "linux-raw-sys" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] -name = "linux-raw-sys" -version = "0.11.0" +name = "litemap" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" [[package]] -name = "litemap" -version = "0.8.1" +name = "litrs" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" +checksum = "4744e383959f0db86ede514b809b1c53251889093803c05267acc7d4e7030d70" [[package]] name = "lock_api" @@ -2383,68 +2072,40 @@ dependencies = [ [[package]] name = "log" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" - -[[package]] -name = "lru-slab" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" - -[[package]] -name = "mac" -version = "0.1.1" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" +checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" [[package]] -name = "markup5ever" -version = "0.14.1" +name = "mac-notification-sys" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7a7213d12e1864c0f002f52c2923d4556935a43dec5e71355c2760e0f6e7a18" +checksum = "fd604973958ddcc11b561193c0fb96ba146506ef2f231ef2e7c35fd2cbc9beca" dependencies = [ + "cc", "log", - "phf 0.11.3", - "phf_codegen 0.11.3", - "string_cache", - "string_cache_codegen", - "tendril", -] - -[[package]] -name = "match_token" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88a9689d8d44bf9964484516275f5cd4c9b59457a6940c1d5d0ecbb94510a36b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", + "objc2", + "objc2-foundation", + "time", + "uuid", ] [[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - -[[package]] -name = "md-5" -version = "0.10.6" +name = "markup5ever" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +checksum = "8983d30f2915feeaaab2d6babdd6bc7e9ed1a00b66b5e6d74df19aa9c0e91862" dependencies = [ - "cfg-if", - "digest", + "log", + "tendril", + "web_atoms", ] [[package]] name = "memchr" -version = "2.8.0" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] name = "memoffset" @@ -2457,9 +2118,9 @@ dependencies = [ [[package]] name = "mime" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +checksum = "d5848f5a9e8117cf94f2f90faac24a87ff81600ff8628c1e3deaab572e76bfa1" [[package]] name = "miniz_oxide" @@ -2471,53 +2132,54 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "miniz_oxide" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c" +dependencies = [ + "adler2", + "simd-adler32", +] + [[package]] name = "mio" -version = "1.1.1" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" dependencies = [ "libc", - "log", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "windows-sys 0.61.2", ] [[package]] name = "mod0" -version = "0.1.0" +version = "0.3.0" dependencies = [ - "async-trait", - "chrono", - "dashmap", - "futures", - "futures-util", "ignore", - "lazy_static", - "notify", "portable-pty", "regex", - "reqwest", "serde", "serde_json", - "sqlx", "tauri", "tauri-build", "tauri-plugin-dialog", + "tauri-plugin-notification", "tauri-plugin-opener", "tauri-plugin-os", "tauri-plugin-window-state", - "tokio", - "tokio-tungstenite", - "toml 1.0.2+spec-1.1.0", + "thiserror 2.0.21", + "tiny_http", + "ureq", "uuid", ] [[package]] name = "muda" -version = "0.17.1" +version = "0.19.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c1738382f66ed56b3b9c8119e794a2e23148ac8ea214eda86622d4cb9d415a" +checksum = "1dd04e60bc0b07438a6771710ee1698f98f6ebbc7f89b61264af1563b8aeb878" dependencies = [ "crossbeam-channel", "dpi", @@ -2528,10 +2190,10 @@ dependencies = [ "objc2-core-foundation", "objc2-foundation", "once_cell", - "png", + "png 0.18.1", "serde", - "thiserror 2.0.18", - "windows-sys 0.60.2", + "thiserror 2.0.21", + "windows-sys 0.61.2", ] [[package]] @@ -2540,8 +2202,8 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.10.0", - "jni-sys", + "bitflags 2.13.2", + "jni-sys 0.3.1", "log", "ndk-sys", "num_enum", @@ -2549,19 +2211,13 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "ndk-context" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" - [[package]] name = "ndk-sys" version = "0.6.0+11769913" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" dependencies = [ - "jni-sys", + "jni-sys 0.3.1", ] [[package]] @@ -2576,7 +2232,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "cfg-if", "cfg_aliases 0.1.1", "libc", @@ -2584,106 +2240,50 @@ dependencies = [ [[package]] name = "nix" -version = "0.30.1" +version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "cfg-if", - "cfg_aliases 0.2.1", + "cfg_aliases 0.2.2", "libc", ] [[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - -[[package]] -name = "notify" -version = "8.2.0" +name = "notify-rust" +version = "4.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3" +checksum = "50ff2e74231b72c832d82982193b417f230945be6bdb5575b251d941d31adb00" dependencies = [ - "bitflags 2.10.0", - "fsevent-sys", - "inotify", - "kqueue", - "libc", + "futures-lite", "log", - "mio", - "notify-types", - "walkdir", - "windows-sys 0.60.2", + "mac-notification-sys", + "serde", + "tauri-winrt-notification", + "zbus", ] [[package]] -name = "notify-types" -version = "2.1.0" +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-traits" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42b8cfee0e339a0337359f3c88165702ac6e600dc01c0cc9579a92d62b08477a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ - "bitflags 2.10.0", + "autocfg", ] [[package]] -name = "num-bigint-dig" -version = "0.8.6" +name = "num_enum" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" -dependencies = [ - "lazy_static", - "libm", - "num-integer", - "num-iter", - "num-traits", - "rand 0.8.5", - "smallvec", - "zeroize", -] - -[[package]] -name = "num-conv" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "num_enum" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" dependencies = [ "num_enum_derive", "rustversion", @@ -2691,21 +2291,21 @@ dependencies = [ [[package]] name = "num_enum_derive" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" dependencies = [ - "proc-macro-crate 3.4.0", + "proc-macro-crate 3.5.0", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] name = "objc2" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" +checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8" dependencies = [ "objc2-encode", "objc2-exception-helper", @@ -2717,19 +2317,11 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "block2", - "libc", "objc2", - "objc2-cloud-kit", - "objc2-core-data", "objc2-core-foundation", - "objc2-core-graphics", - "objc2-core-image", - "objc2-core-text", - "objc2-core-video", "objc2-foundation", - "objc2-quartz-core", ] [[package]] @@ -2738,7 +2330,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "objc2", "objc2-foundation", ] @@ -2749,7 +2341,6 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" dependencies = [ - "bitflags 2.10.0", "objc2", "objc2-foundation", ] @@ -2760,7 +2351,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "dispatch2", "objc2", ] @@ -2771,7 +2362,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "dispatch2", "objc2", "objc2-core-foundation", @@ -2804,23 +2395,10 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" dependencies = [ - "bitflags 2.10.0", - "objc2", - "objc2-core-foundation", - "objc2-core-graphics", -] - -[[package]] -name = "objc2-core-video" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d425caf1df73233f29fd8a5c3e5edbc30d2d4307870f802d18f00d83dc5141a6" -dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "objc2", "objc2-core-foundation", "objc2-core-graphics", - "objc2-io-surface", ] [[package]] @@ -2844,7 +2422,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "block2", "libc", "objc2", @@ -2857,17 +2435,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" dependencies = [ - "bitflags 2.10.0", - "objc2", - "objc2-core-foundation", -] - -[[package]] -name = "objc2-javascript-core" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a1e6550c4caed348956ce3370c9ffeca70bb1dbed4fa96112e7c6170e074586" -dependencies = [ + "bitflags 2.13.2", "objc2", "objc2-core-foundation", ] @@ -2878,30 +2446,19 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "objc2", "objc2-core-foundation", "objc2-foundation", ] -[[package]] -name = "objc2-security" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709fe137109bd1e8b5a99390f77a7d8b2961dafc1a1c5db8f2e60329ad6d895a" -dependencies = [ - "bitflags 2.10.0", - "objc2", - "objc2-core-foundation", -] - [[package]] name = "objc2-ui-kit" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "block2", "objc2", "objc2-cloud-kit", @@ -2932,40 +2489,31 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "block2", "objc2", "objc2-app-kit", "objc2-core-foundation", "objc2-foundation", - "objc2-javascript-core", - "objc2-security", ] [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "open" -version = "5.3.3" +version = "5.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43bb73a7fa3799b198970490a51174027ba0d4ec504b03cd08caf513d40024bc" +checksum = "8d8c8b8e725ad26404d6896eb2f064294a0a7b4f1d9120210d85544684c4ca95" dependencies = [ "dunce", "is-wsl", "libc", - "pathdiff", ] -[[package]] -name = "openssl-probe" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" - [[package]] name = "option-ext" version = "0.2.0" @@ -2984,13 +2532,13 @@ dependencies = [ [[package]] name = "os_info" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4022a17595a00d6a369236fdae483f0de7f0a339960a53118b818238e132224" +checksum = "9cf20a545b305cf1da722b236b5155c9bb35f1d5ceb28c048bd96ca842f41b5b" dependencies = [ "android_system_properties", "log", - "nix 0.30.1", + "nix 0.31.3", "objc2", "objc2-foundation", "objc2-ui-kit", @@ -3047,26 +2595,11 @@ checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.18", + "redox_syscall", "smallvec", "windows-link 0.2.1", ] -[[package]] -name = "pathdiff" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" - -[[package]] -name = "pem-rfc7468" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" -dependencies = [ - "base64ct", -] - [[package]] name = "percent-encoding" version = "2.3.2" @@ -3075,187 +2608,79 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "phf" -version = "0.8.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" dependencies = [ - "phf_shared 0.8.0", -] - -[[package]] -name = "phf" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" -dependencies = [ - "phf_macros 0.10.0", - "phf_shared 0.10.0", - "proc-macro-hack", -] - -[[package]] -name = "phf" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" -dependencies = [ - "phf_macros 0.11.3", - "phf_shared 0.11.3", -] - -[[package]] -name = "phf_codegen" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" -dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", + "phf_macros", + "phf_shared", + "serde", ] [[package]] name = "phf_codegen" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" -dependencies = [ - "phf_generator 0.11.3", - "phf_shared 0.11.3", -] - -[[package]] -name = "phf_generator" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" -dependencies = [ - "phf_shared 0.8.0", - "rand 0.7.3", -] - -[[package]] -name = "phf_generator" -version = "0.10.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1" dependencies = [ - "phf_shared 0.10.0", - "rand 0.8.5", + "phf_generator", + "phf_shared", ] [[package]] name = "phf_generator" -version = "0.11.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" dependencies = [ - "phf_shared 0.11.3", - "rand 0.8.5", -] - -[[package]] -name = "phf_macros" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" -dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", - "proc-macro-hack", - "proc-macro2", - "quote", - "syn 1.0.109", + "fastrand", + "phf_shared", ] [[package]] name = "phf_macros" -version = "0.11.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" dependencies = [ - "phf_generator 0.11.3", - "phf_shared 0.11.3", + "phf_generator", + "phf_shared", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] name = "phf_shared" -version = "0.8.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" dependencies = [ - "siphasher 0.3.11", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher 0.3.11", -] - -[[package]] -name = "phf_shared" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" -dependencies = [ - "siphasher 1.0.2", + "siphasher", ] [[package]] name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "piper" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" dependencies = [ "atomic-waker", "fastrand", "futures-io", ] -[[package]] -name = "pkcs1" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" -dependencies = [ - "der", - "pkcs8", - "spki", -] - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - [[package]] name = "pkg-config" -version = "0.3.32" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" [[package]] name = "plist" @@ -3264,7 +2689,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "740ebea15c5d1428f910cd1a5f52cebf8d25006245ed8ade92702f4943d91e07" dependencies = [ "base64 0.22.1", - "indexmap 2.13.0", + "indexmap 2.14.2", "quick-xml", "serde", "time", @@ -3280,7 +2705,20 @@ dependencies = [ "crc32fast", "fdeflate", "flate2", - "miniz_oxide", + "miniz_oxide 0.8.9", +] + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", ] [[package]] @@ -3320,18 +2758,18 @@ dependencies = [ [[package]] name = "potential_utf" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" dependencies = [ "zerovec", ] [[package]] name = "powerfmt" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" [[package]] name = "ppv-lite86" @@ -3348,16 +2786,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" -[[package]] -name = "prettyplease" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" -dependencies = [ - "proc-macro2", - "syn 2.0.114", -] - [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -3380,11 +2808,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.23.10+spec-1.0.0", + "toml_edit 0.25.19+spec-1.1.0", ] [[package]] @@ -3411,17 +2839,11 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" dependencies = [ "unicode-ident", ] @@ -3435,67 +2857,11 @@ dependencies = [ "memchr", ] -[[package]] -name = "quinn" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" -dependencies = [ - "bytes", - "cfg_aliases 0.2.1", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls", - "socket2", - "thiserror 2.0.18", - "tokio", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-proto" -version = "0.11.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" -dependencies = [ - "aws-lc-rs", - "bytes", - "getrandom 0.3.4", - "lru-slab", - "rand 0.9.2", - "ring", - "rustc-hash", - "rustls", - "rustls-pki-types", - "slab", - "thiserror 2.0.18", - "tinyvec", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-udp" -version = "0.5.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" -dependencies = [ - "cfg_aliases 0.2.1", - "libc", - "once_cell", - "socket2", - "tracing", - "windows-sys 0.60.2", -] - [[package]] name = "quote" -version = "1.0.44" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2", ] @@ -3507,58 +2873,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", - "rand_pcg", -] - -[[package]] -name = "rand" -version = "0.8.5" +name = "r-efi" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "rand" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" -dependencies = [ - "rand_chacha 0.9.0", - "rand_core 0.9.5", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", + "rand_chacha", + "rand_core", ] [[package]] @@ -3568,25 +2895,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.5", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.17", + "rand_core", ] [[package]] @@ -3598,24 +2907,6 @@ dependencies = [ "getrandom 0.3.4", ] -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "raw-window-handle" version = "0.6.2" @@ -3628,54 +2919,44 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.10.0", -] - -[[package]] -name = "redox_syscall" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35985aa610addc02e24fc232012c86fd11f14111180f902b67e2d5331f8ebf2b" -dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", ] [[package]] name = "redox_users" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +checksum = "60dc65c0ff1a7ae1294b0c67b9f14baf70b644404010370171787bfac1038fc0" dependencies = [ - "getrandom 0.2.17", "libredox", - "thiserror 2.0.18", + "thiserror 2.0.21", ] [[package]] name = "ref-cast" -version = "1.0.25" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +checksum = "7e440fb4e4b4147295338efb76001ab9e4efc0e5839df2c47fc5ac2381d365c3" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.25" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 3.0.9", ] [[package]] name = "regex" -version = "1.12.3" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" dependencies = [ "aho-corasick", "memchr", @@ -3685,9 +2966,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.14" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" dependencies = [ "aho-corasick", "memchr", @@ -3696,42 +2977,33 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.9" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" [[package]] name = "reqwest" -version = "0.13.2" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801" +checksum = "16a1cfa75cc186dd73d5818e510e042e40927bccc9c236b061cea97e1eb08029" dependencies = [ - "base64 0.22.1", + "base64 0.23.1", "bytes", - "encoding_rs", "futures-core", "futures-util", - "h2", "http", "http-body", "http-body-util", "hyper", - "hyper-rustls", "hyper-util", "js-sys", "log", - "mime", "percent-encoding", "pin-project-lite", - "quinn", - "rustls", - "rustls-pki-types", - "rustls-platform-verifier", "serde", "serde_json", "sync_wrapper", "tokio", - "tokio-rustls", "tokio-util", "tower", "tower-http", @@ -3745,9 +3017,9 @@ dependencies = [ [[package]] name = "rfd" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15ad77d9e70a92437d8f74c35d99b4e4691128df018833e99f90bcd36152672" +checksum = "f4fe518b6db89699d59862e4d1e3a0226316090f4e4ec09f7dd686be25634c7c" dependencies = [ "block2", "dispatch2", @@ -3781,31 +3053,11 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rsa" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" -dependencies = [ - "const-oid", - "digest", - "num-bigint-dig", - "num-integer", - "num-traits", - "pkcs1", - "pkcs8", - "rand_core 0.6.4", - "signature", - "spki", - "subtle", - "zeroize", -] - [[package]] name = "rustc-hash" -version = "2.1.1" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" [[package]] name = "rustc_version" @@ -3818,11 +3070,11 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.3" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "errno", "libc", "linux-raw-sys", @@ -3831,74 +3083,34 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.36" +version = "0.23.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" +checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" dependencies = [ - "aws-lc-rs", + "log", "once_cell", + "ring", "rustls-pki-types", "rustls-webpki", "subtle", "zeroize", ] -[[package]] -name = "rustls-native-certs" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" -dependencies = [ - "openssl-probe", - "rustls-pki-types", - "schannel", - "security-framework", -] - [[package]] name = "rustls-pki-types" -version = "1.14.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" dependencies = [ - "web-time", "zeroize", ] -[[package]] -name = "rustls-platform-verifier" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" -dependencies = [ - "core-foundation 0.10.1", - "core-foundation-sys", - "jni", - "log", - "once_cell", - "rustls", - "rustls-native-certs", - "rustls-platform-verifier-android", - "rustls-webpki", - "security-framework", - "security-framework-sys", - "webpki-root-certs", - "windows-sys 0.61.2", -] - -[[package]] -name = "rustls-platform-verifier-android" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" - [[package]] name = "rustls-webpki" -version = "0.103.9" +version = "0.103.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281" dependencies = [ - "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -3906,15 +3118,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - -[[package]] -name = "ryu" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "same-file" @@ -3925,15 +3131,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "schannel" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" -dependencies = [ - "windows-sys 0.61.2", -] - [[package]] name = "schemars" version = "0.8.22" @@ -3963,9 +3160,9 @@ dependencies = [ [[package]] name = "schemars" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" +checksum = "ab508826f74a77ca9d5aba6ff19b522583ee3eaf28a19384ff3d0e5835fadf6e" dependencies = [ "dyn-clone", "ref-cast", @@ -3982,7 +3179,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] @@ -3991,52 +3188,30 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "security-framework" -version = "3.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d17b898a6d6948c3a8ee4372c17cb384f90d2e6e912ef00895b14fd7ab54ec38" -dependencies = [ - "bitflags 2.10.0", - "core-foundation 0.10.1", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "321c8673b092a9a42605034a9879d73cb79101ed5fd117bc9a597b89b4e9e61a" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "selectors" -version = "0.24.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c37578180969d00692904465fb7f6b3d50b9a2b952b87c23d0e2e5cb5013416" +checksum = "c5d9c0c92a92d33f08817311cf3f2c29a3538a8240e94a6a3c622ce652d7e00c" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.13.2", "cssparser", "derive_more", - "fxhash", "log", - "phf 0.8.0", - "phf_codegen 0.8.0", + "new_debug_unreachable", + "phf", + "phf_codegen", "precomputed-hash", + "rustc-hash", "servo_arc", "smallvec", ] [[package]] name = "semver" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" dependencies = [ "serde", "serde_core", @@ -4044,9 +3219,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" dependencies = [ "serde_core", "serde_derive", @@ -4066,22 +3241,22 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 3.0.9", ] [[package]] @@ -4092,14 +3267,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" dependencies = [ "itoa", "memchr", @@ -4110,13 +3285,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 3.0.9", ] [[package]] @@ -4130,38 +3305,26 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.0.4" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" +checksum = "9c187e0a369471c550af028cba56d4f4fa2a489ad28151ae95a4d340a2a8b782" dependencies = [ "serde_core", ] -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - [[package]] name = "serde_with" -version = "3.16.1" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fa237f2807440d238e0364a218270b98f767a00d3dada77b1c53ae88940e2e7" +checksum = "381b283ce7bc6b476d903296fb59d0d36633652b633b27f64db4fb46dcbfc3b9" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.13.0", + "indexmap 2.14.2", "schemars 0.9.0", - "schemars 1.2.1", + "schemars 1.2.3", "serde_core", "serde_json", "serde_with_macros", @@ -4170,25 +3333,25 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.16.1" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c" +checksum = "a6d4e30573c8cb306ed6ab1dca8423eec9a463ea0e155f45399455e0368b27e0" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] name = "serial2" -version = "0.2.33" +version = "0.2.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cc76fa68e25e771492ca1e3c53d447ef0be3093e05cd3b47f4b712ba10c6f3c" +checksum = "c924c7ef58d1fb741cfecb65b9b38a9e049841edd1e419544089f0cbb5a127e7" dependencies = [ "cfg-if", "libc", - "winapi", + "windows-sys 0.61.2", ] [[package]] @@ -4210,30 +3373,18 @@ checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] name = "servo_arc" -version = "0.2.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52aa42f8fdf0fed91e5ce7f23d8138441002fa31dca008acf47e6fd4721f741" +checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930" dependencies = [ - "nodrop", "stable_deref_trait", ] -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - [[package]] name = "sha2" version = "0.10.9" @@ -4263,9 +3414,9 @@ checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77" [[package]] name = "shlex" -version = "1.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" [[package]] name = "signal-hook-registry" @@ -4277,33 +3428,17 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest", - "rand_core 0.6.4", -] - [[package]] name = "simd-adler32" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" [[package]] name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - -[[package]] -name = "siphasher" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" +checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256" [[package]] name = "slab" @@ -4312,22 +3447,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -dependencies = [ - "serde", -] +name = "smallvec" +version = "1.16.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "149309498a5f7334b12ddae0cad8aba81ce785fe91755068867e017cf98fee46" [[package]] name = "socket2" -version = "0.6.2" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -4345,7 +3477,7 @@ dependencies = [ "objc2-foundation", "objc2-quartz-core", "raw-window-handle", - "redox_syscall 0.5.18", + "redox_syscall", "tracing", "wasm-bindgen", "web-sys", @@ -4378,217 +3510,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "sqlx" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fefb893899429669dcdd979aff487bd78f4064e5e7907e4269081e0ef7d97dc" -dependencies = [ - "sqlx-core", - "sqlx-macros", - "sqlx-mysql", - "sqlx-postgres", - "sqlx-sqlite", -] - -[[package]] -name = "sqlx-core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee6798b1838b6a0f69c007c133b8df5866302197e404e8b6ee8ed3e3a5e68dc6" -dependencies = [ - "base64 0.22.1", - "bytes", - "chrono", - "crc", - "crossbeam-queue", - "either", - "event-listener", - "futures-core", - "futures-intrusive", - "futures-io", - "futures-util", - "hashbrown 0.15.5", - "hashlink", - "indexmap 2.13.0", - "log", - "memchr", - "once_cell", - "percent-encoding", - "serde", - "serde_json", - "sha2", - "smallvec", - "thiserror 2.0.18", - "tokio", - "tokio-stream", - "tracing", - "url", -] - -[[package]] -name = "sqlx-macros" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2d452988ccaacfbf5e0bdbc348fb91d7c8af5bee192173ac3636b5fb6e6715d" -dependencies = [ - "proc-macro2", - "quote", - "sqlx-core", - "sqlx-macros-core", - "syn 2.0.114", -] - -[[package]] -name = "sqlx-macros-core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19a9c1841124ac5a61741f96e1d9e2ec77424bf323962dd894bdb93f37d5219b" -dependencies = [ - "dotenvy", - "either", - "heck 0.5.0", - "hex", - "once_cell", - "proc-macro2", - "quote", - "serde", - "serde_json", - "sha2", - "sqlx-core", - "sqlx-mysql", - "sqlx-postgres", - "sqlx-sqlite", - "syn 2.0.114", - "tokio", - "url", -] - -[[package]] -name = "sqlx-mysql" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa003f0038df784eb8fecbbac13affe3da23b45194bd57dba231c8f48199c526" -dependencies = [ - "atoi", - "base64 0.22.1", - "bitflags 2.10.0", - "byteorder", - "bytes", - "chrono", - "crc", - "digest", - "dotenvy", - "either", - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "generic-array", - "hex", - "hkdf", - "hmac", - "itoa", - "log", - "md-5", - "memchr", - "once_cell", - "percent-encoding", - "rand 0.8.5", - "rsa", - "serde", - "sha1", - "sha2", - "smallvec", - "sqlx-core", - "stringprep", - "thiserror 2.0.18", - "tracing", - "whoami", -] - -[[package]] -name = "sqlx-postgres" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db58fcd5a53cf07c184b154801ff91347e4c30d17a3562a635ff028ad5deda46" -dependencies = [ - "atoi", - "base64 0.22.1", - "bitflags 2.10.0", - "byteorder", - "chrono", - "crc", - "dotenvy", - "etcetera", - "futures-channel", - "futures-core", - "futures-util", - "hex", - "hkdf", - "hmac", - "home", - "itoa", - "log", - "md-5", - "memchr", - "once_cell", - "rand 0.8.5", - "serde", - "serde_json", - "sha2", - "smallvec", - "sqlx-core", - "stringprep", - "thiserror 2.0.18", - "tracing", - "whoami", -] - -[[package]] -name = "sqlx-sqlite" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2d12fe70b2c1b4401038055f90f151b78208de1f9f89a7dbfd41587a10c3eea" -dependencies = [ - "atoi", - "chrono", - "flume", - "futures-channel", - "futures-core", - "futures-executor", - "futures-intrusive", - "futures-util", - "libsqlite3-sys", - "log", - "percent-encoding", - "serde", - "serde_urlencoded", - "sqlx-core", - "thiserror 2.0.18", - "tracing", - "url", -] - [[package]] name = "stable_deref_trait" version = "1.2.1" @@ -4597,40 +3518,28 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "string_cache" -version = "0.8.9" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" +checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901" dependencies = [ "new_debug_unreachable", "parking_lot", - "phf_shared 0.11.3", + "phf_shared", "precomputed-hash", - "serde", ] [[package]] name = "string_cache_codegen" -version = "0.5.4" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0" +checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69" dependencies = [ - "phf_generator 0.11.3", - "phf_shared 0.11.3", + "phf_generator", + "phf_shared", "proc-macro2", "quote", ] -[[package]] -name = "stringprep" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" -dependencies = [ - "unicode-bidi", - "unicode-normalization", - "unicode-properties", -] - [[package]] name = "strsim" version = "0.11.1" @@ -4645,9 +3554,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "swift-rs" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4057c98e2e852d51fdcfca832aac7b571f6b351ad159f9eda5db1655f8d0c4d7" +checksum = "cefd87076fd385308ee4aff597256c902f1fbb4d031de1558efc12f8ffefadd9" dependencies = [ "base64 0.21.7", "serde", @@ -4659,6 +3568,16 @@ name = "syn" version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" dependencies = [ "proc-macro2", "quote", @@ -4667,9 +3586,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.114" +version = "3.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" dependencies = [ "proc-macro2", "quote", @@ -4687,13 +3606,13 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 3.0.9", ] [[package]] @@ -4705,27 +3624,6 @@ dependencies = [ "libc", ] -[[package]] -name = "system-configuration" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" -dependencies = [ - "bitflags 2.10.0", - "core-foundation 0.9.4", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "system-deps" version = "6.2.2" @@ -4741,35 +3639,35 @@ dependencies = [ [[package]] name = "tao" -version = "0.34.5" +version = "0.35.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3a753bdc39c07b192151523a3f77cd0394aa75413802c883a0f6f6a0e5ee2e7" +checksum = "d1c93047acf68669466a34690ac58cca7010bd1b201e1ec86f1fd0a75d3dd4a9" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "block2", - "core-foundation 0.10.1", + "core-foundation", "core-graphics", "crossbeam-channel", - "dispatch", + "dbus", + "dispatch2", "dlopen2", "dpi", "gdkwayland-sys", "gdkx11-sys", "gtk", "jni", - "lazy_static", "libc", "log", "ndk", - "ndk-context", "ndk-sys", "objc2", "objc2-app-kit", "objc2-foundation", + "objc2-ui-kit", "once_cell", "parking_lot", + "percent-encoding", "raw-window-handle", - "scopeguard", "tao-macros", "unicode-segmentation", "url", @@ -4781,13 +3679,13 @@ dependencies = [ [[package]] name = "tao-macros" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd" +checksum = "5f7eeb6d99155545da6150a1795945f16ac9c178deb2a5f2e74d776107bd5849" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] @@ -4798,9 +3696,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.10.2" +version = "2.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463ae8677aa6d0f063a900b9c41ecd4ac2b7ca82f0b058cc4491540e55b20129" +checksum = "6fa5bacdb9bbad5954af3d1bd6cf6ae9192cab1b2e270f4a07f904610b9e85f4" dependencies = [ "anyhow", "bytes", @@ -4837,7 +3735,7 @@ dependencies = [ "tauri-runtime", "tauri-runtime-wry", "tauri-utils", - "thiserror 2.0.18", + "thiserror 2.0.21", "tokio", "tray-icon", "url", @@ -4849,9 +3747,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.5.5" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca7bd893329425df750813e95bd2b643d5369d929438da96d5bbb7cc2c918f74" +checksum = "bc9ce40b16101cb6ea63d3e221567affd1c3a9205f95d7bc574941a10636b632" dependencies = [ "anyhow", "cargo_toml", @@ -4865,31 +3763,30 @@ dependencies = [ "serde_json", "tauri-utils", "tauri-winres", - "toml 0.9.11+spec-1.1.0", "walkdir", ] [[package]] name = "tauri-codegen" -version = "2.5.4" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac423e5859d9f9ccdd32e3cf6a5866a15bedbf25aa6630bcb2acde9468f6ae3" +checksum = "08279169ff42f8fc45a1dbc9dcae888893ba95288142e5880c59b93a26d2cfc5" dependencies = [ "base64 0.22.1", "brotli", "ico", "json-patch", "plist", - "png", + "png 0.17.16", "proc-macro2", "quote", "semver", "serde", "serde_json", "sha2", - "syn 2.0.114", + "syn 2.0.119", "tauri-utils", - "thiserror 2.0.18", + "thiserror 2.0.21", "time", "url", "uuid", @@ -4898,23 +3795,23 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.5.4" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6a1bd2861ff0c8766b1d38b32a6a410f6dc6532d4ef534c47cfb2236092f59" +checksum = "e8b394794f399a421811d06966343e7933fcae92d59f5180b9388d1174497a45" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", "tauri-codegen", "tauri-utils", ] [[package]] name = "tauri-plugin" -version = "2.5.3" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692a77abd8b8773e107a42ec0e05b767b8d2b7ece76ab36c6c3947e34df9f53f" +checksum = "74be5dd4bed9afbd145e5716b5fa2ec28cbc29c34ffa61c258c9273d896c8020" dependencies = [ "anyhow", "glob", @@ -4923,15 +3820,14 @@ dependencies = [ "serde", "serde_json", "tauri-utils", - "toml 0.9.11+spec-1.1.0", "walkdir", ] [[package]] name = "tauri-plugin-dialog" -version = "2.6.0" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9204b425d9be8d12aa60c2a83a289cf7d1caae40f57f336ed1155b3a5c0e359b" +checksum = "61854a36651aa48381e5e209f69a01273b77f3f9f91f0c430b1b98d33bd47229" dependencies = [ "log", "raw-window-handle", @@ -4941,19 +3837,21 @@ dependencies = [ "tauri", "tauri-plugin", "tauri-plugin-fs", - "thiserror 2.0.18", + "thiserror 2.0.21", "url", ] [[package]] name = "tauri-plugin-fs" -version = "2.4.5" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed390cc669f937afeb8b28032ce837bac8ea023d975a2e207375ec05afaf1804" +checksum = "de22eef34fd78c0da050e748710edd50bf127e651d02ea1b2bfada1523cc5c51" dependencies = [ "anyhow", "dunce", "glob", + "log", + "objc2-foundation", "percent-encoding", "schemars 0.8.22", "serde", @@ -4962,16 +3860,35 @@ dependencies = [ "tauri", "tauri-plugin", "tauri-utils", - "thiserror 2.0.18", - "toml 0.9.11+spec-1.1.0", + "thiserror 2.0.21", + "toml 1.2.1+spec-1.1.0", + "url", +] + +[[package]] +name = "tauri-plugin-notification" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad2fd40946aef810c4be9fd33a2d1b9b397cb79042b2d21c81a0a8f204354fd1" +dependencies = [ + "log", + "notify-rust", + "rand", + "serde", + "serde_json", + "serde_repr", + "tauri", + "tauri-plugin", + "thiserror 2.0.21", + "time", "url", ] [[package]] name = "tauri-plugin-opener" -version = "2.5.3" +version = "2.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc624469b06f59f5a29f874bbc61a2ed737c0f9c23ef09855a292c389c42e83f" +checksum = "60d60366174b745b4ef5824b8bbc1c457fd08f0ce101ff643c0a49181a9f4e91" dependencies = [ "dunce", "glob", @@ -4983,7 +3900,7 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "thiserror 2.0.18", + "thiserror 2.0.21", "url", "windows", "zbus", @@ -5004,7 +3921,7 @@ dependencies = [ "sys-locale", "tauri", "tauri-plugin", - "thiserror 2.0.18", + "thiserror 2.0.21", ] [[package]] @@ -5013,20 +3930,20 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73736611e14142408d15353e21e3cca2f12a3cfb523ad0ce85999b6d2ef1a704" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "log", "serde", "serde_json", "tauri", "tauri-plugin", - "thiserror 2.0.18", + "thiserror 2.0.21", ] [[package]] name = "tauri-runtime" -version = "2.10.0" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b885ffeac82b00f1f6fd292b6e5aabfa7435d537cef57d11e38a489956535651" +checksum = "b0b4bc95aed361b0019067d189a1174a603d460d0f6c72606512d59fc9c12ec8" dependencies = [ "cookie", "dpi", @@ -5040,7 +3957,7 @@ dependencies = [ "serde", "serde_json", "tauri-utils", - "thiserror 2.0.18", + "thiserror 2.0.21", "url", "webkit2gtk", "webview2-com", @@ -5049,9 +3966,9 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.10.0" +version = "2.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5204682391625e867d16584fedc83fc292fb998814c9f7918605c789cd876314" +checksum = "4e6fac707727b7a2f48e4ded90976324267371073edbb415ffb73bb0458d203f" dependencies = [ "gtk", "http", @@ -5059,7 +3976,6 @@ dependencies = [ "log", "objc2", "objc2-app-kit", - "objc2-foundation", "once_cell", "percent-encoding", "raw-window-handle", @@ -5076,24 +3992,24 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.8.2" +version = "2.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcd169fccdff05eff2c1033210b9b94acd07a47e6fa9a3431cf09cfd4f01c87e" +checksum = "3e176a18e67764923c4f1ce66f25ae4abe5f688384d5eb1a0fa6c77f3d90f887" dependencies = [ "anyhow", "brotli", "cargo_metadata", "ctor", + "dom_query", "dunce", "glob", - "html5ever", "http", "infer", "json-patch", - "kuchikiki", "log", "memchr", - "phf 0.11.3", + "phf", + "plist", "proc-macro2", "quote", "regex", @@ -5104,8 +4020,8 @@ dependencies = [ "serde_json", "serde_with", "swift-rs", - "thiserror 2.0.18", - "toml 0.9.11+spec-1.1.0", + "thiserror 2.0.21", + "toml 1.2.1+spec-1.1.0", "url", "urlpattern", "uuid", @@ -5114,23 +4030,34 @@ dependencies = [ [[package]] name = "tauri-winres" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1087b111fe2b005e42dbdc1990fc18593234238d47453b0c99b7de1c9ab2c1e0" +checksum = "c52bb6904475a6ca662f15ef787f18ade61d5740a1ee12c45d3b748efdb6f796" dependencies = [ "dunce", "embed-resource", - "toml 0.9.11+spec-1.1.0", + "toml 1.2.1+spec-1.1.0", +] + +[[package]] +name = "tauri-winrt-notification" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed071c670382e85fc2f48ae706492d8c338f4f89bf72520d32f8abfe880aade" +dependencies = [ + "thiserror 2.0.21", + "windows", + "windows-version", ] [[package]] name = "tempfile" -version = "3.25.0" +version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.1", + "getrandom 0.4.3", "once_cell", "rustix", "windows-sys 0.61.2", @@ -5138,13 +4065,11 @@ dependencies = [ [[package]] name = "tendril" -version = "0.4.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" +checksum = "5fed54709c5b3a53d09bb1c113ea4f5ceafd1e772ddcb0030a82e1d56c087b08" dependencies = [ - "futf", - "mac", - "utf-8", + "new_debug_unreachable", ] [[package]] @@ -5158,11 +4083,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.18" +version = "2.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" dependencies = [ - "thiserror-impl 2.0.18", + "thiserror-impl 2.0.21", ] [[package]] @@ -5173,25 +4098,25 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] name = "thiserror-impl" -version = "2.0.18" +version = "2.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 3.0.9", ] [[package]] name = "time" -version = "0.3.47" +version = "0.3.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +checksum = "f9e442fc33d7fdb45aa9bfeb312c095964abdf596f7567261062b2a7107aaabd" dependencies = [ "deranged", "itoa", @@ -5204,111 +4129,61 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.8" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" +checksum = "8b36ee98fd31ec7426d599183e8fe26932a8dc1fb76ddb6214d05493377d34ca" [[package]] name = "time-macros" -version = "0.2.27" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +checksum = "71e552d1249bf61ac2a52db88179fd0673def1e1ad8243a00d9ec9ed71fee3dd" dependencies = [ "num-conv", "time-core", ] [[package]] -name = "tinystr" -version = "0.8.2" +name = "tiny_http" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +checksum = "389915df6413a2e74fb181895f933386023c71110878cd0825588928e64cdc82" dependencies = [ - "displaydoc", - "zerovec", + "ascii", + "chunked_transfer", + "httpdate", + "log", ] [[package]] -name = "tinyvec" -version = "1.10.0" +name = "tinystr" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a" dependencies = [ - "tinyvec_macros", + "displaydoc", + "zerovec", ] -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" -version = "1.49.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" -dependencies = [ - "bytes", - "libc", - "mio", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.61.2", -] - -[[package]] -name = "tokio-macros" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" -dependencies = [ - "rustls", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.28.0" +version = "1.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25a406cddcc431a75d3d9afc6a7c0f7428d4891dd973e4d54c56b46127bf857" +checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3" dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite", + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "windows-sys 0.61.2", ] [[package]] name = "tokio-util" -version = "0.7.18" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +checksum = "e464cf451ba96ebfc6f9b6542f17ee8b8956e33f1e40d9690624e59d7a7f8a4b" dependencies = [ "bytes", "futures-core", @@ -5331,32 +4206,32 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.11+spec-1.1.0" +version = "0.9.12+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3afc9a848309fe1aaffaed6e1546a7a14de1f935dc9d89d32afd9a44bab7c46" +checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" dependencies = [ - "indexmap 2.13.0", + "indexmap 2.14.2", "serde_core", - "serde_spanned 1.0.4", + "serde_spanned 1.1.3", "toml_datetime 0.7.5+spec-1.1.0", "toml_parser", "toml_writer", - "winnow 0.7.14", + "winnow 0.7.15", ] [[package]] name = "toml" -version = "1.0.2+spec-1.1.0" +version = "1.2.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1dfefef6a142e93f346b64c160934eb13b5594b84ab378133ac6815cb2bd57f" +checksum = "d5755c51863cdac711f1956baf8eb9588e060755f7d3c4c979e70ea1e1f32cd7" dependencies = [ - "indexmap 2.13.0", + "indexmap 2.14.2", "serde_core", - "serde_spanned 1.0.4", - "toml_datetime 1.0.0+spec-1.1.0", + "serde_spanned 1.1.3", + "toml_datetime 1.1.3+spec-1.1.0", "toml_parser", "toml_writer", - "winnow 0.7.14", + "winnow 1.0.5", ] [[package]] @@ -5379,9 +4254,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "1.0.0+spec-1.1.0" +version = "1.1.3+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e" +checksum = "173f25c883cd2176a2d8212155638c0a60d484a9d84546d270866f40f56b6e49" dependencies = [ "serde_core", ] @@ -5392,7 +4267,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.13.0", + "indexmap 2.14.2", "toml_datetime 0.6.3", "winnow 0.5.40", ] @@ -5403,7 +4278,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.13.0", + "indexmap 2.14.2", "serde", "serde_spanned 0.6.9", "toml_datetime 0.6.3", @@ -5412,30 +4287,30 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.23.10+spec-1.0.0" +version = "0.25.19+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +checksum = "dd43688c4858d7264ae1cf9a9f874a67c3feb74a883b1cd7bebd6a4ea8307218" dependencies = [ - "indexmap 2.13.0", - "toml_datetime 0.7.5+spec-1.1.0", + "indexmap 2.14.2", + "toml_datetime 1.1.3+spec-1.1.0", "toml_parser", - "winnow 0.7.14", + "winnow 1.0.5", ] [[package]] name = "toml_parser" -version = "1.0.9+spec-1.1.0" +version = "1.1.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" +checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" dependencies = [ - "winnow 0.7.14", + "winnow 1.0.5", ] [[package]] name = "toml_writer" -version = "1.0.6+spec-1.1.0" +version = "1.2.0+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" +checksum = "009dbb7700f11c55ef83aebbe4c0e9cf1f1ac0844bd8d6f00dc38f302026e13a" [[package]] name = "tower" @@ -5454,20 +4329,20 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.8" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.2", "bytes", "futures-util", "http", "http-body", - "iri-string", "pin-project-lite", "tower", "tower-layer", "tower-service", + "url", ] [[package]] @@ -5488,7 +4363,6 @@ version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -5502,7 +4376,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] @@ -5516,9 +4390,9 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.21.3" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e85aa143ceb072062fc4d6356c1b520a51d636e7bc8e77ec94be3608e5e80c" +checksum = "045979e3f037cd18ad1cb2a419dfda133c5c29c9f3453370079f2255d46c257e" dependencies = [ "crossbeam-channel", "dirs", @@ -5530,10 +4404,10 @@ dependencies = [ "objc2-core-graphics", "objc2-foundation", "once_cell", - "png", + "png 0.18.1", "serde", - "thiserror 2.0.18", - "windows-sys 0.60.2", + "thiserror 2.0.21", + "windows-sys 0.61.2", ] [[package]] @@ -5542,23 +4416,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "tungstenite" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442" -dependencies = [ - "bytes", - "data-encoding", - "http", - "httparse", - "log", - "rand 0.9.2", - "sha1", - "thiserror 2.0.18", - "utf-8", -] - [[package]] name = "typeid" version = "1.0.3" @@ -5567,19 +4424,19 @@ checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" [[package]] name = "typenum" -version = "1.19.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" [[package]] name = "uds_windows" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" +checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" dependencies = [ "memoffset", "tempfile", - "winapi", + "windows-sys 0.61.2", ] [[package]] @@ -5623,50 +4480,55 @@ dependencies = [ "unic-common", ] -[[package]] -name = "unicode-bidi" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" - [[package]] name = "unicode-ident" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e" - -[[package]] -name = "unicode-normalization" -version = "0.1.25" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" -dependencies = [ - "tinyvec", -] +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" [[package]] -name = "unicode-properties" -version = "0.1.4" +name = "unicode-segmentation" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" [[package]] -name = "unicode-segmentation" -version = "1.12.0" +name = "untrusted" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] -name = "unicode-xid" -version = "0.2.6" +name = "ureq" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +checksum = "e7be76686bdf7198002062423ca0d8cf9b75a27c8e1de804513b97e97b555d9d" +dependencies = [ + "base64 0.23.1", + "cookie_store", + "flate2", + "log", + "percent-encoding", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "ureq-proto", + "utf8-zero", + "webpki-roots", +] [[package]] -name = "untrusted" -version = "0.9.0" +name = "ureq-proto" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +checksum = "622dce33c252115466d83f63e9744a18f12b4406aae51a01c15ad8fcf1185eb3" +dependencies = [ + "base64 0.23.1", + "http", + "httparse", + "log", +] [[package]] name = "url" @@ -5694,35 +4556,38 @@ dependencies = [ ] [[package]] -name = "utf-8" -version = "0.7.6" +name = "utf8-zero" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +checksum = "b8c0a043c9540bae7c578c88f91dda8bd82e59ae27c21baca69c8b191aaf5a6e" [[package]] name = "utf8_iter" -version = "1.0.4" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af3bd9d3e571c26fcce9d033b87ea5ab061b8d2ffe9b7a5675d810d68f03edf0" +dependencies = [ + "utf_types", +] + +[[package]] +name = "utf_types" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6" [[package]] name = "uuid" -version = "1.20.0" +version = "1.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f" +checksum = "2ef6dac1e96601b4fb3acccccff2139741fcb757cb9a36089bf5be91cfb285ce" dependencies = [ - "getrandom 0.3.4", + "getrandom 0.4.3", "js-sys", "serde_core", "wasm-bindgen", ] -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "version-compare" version = "0.2.1" @@ -5767,19 +4632,13 @@ dependencies = [ [[package]] name = "want" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +checksum = "ec4cdd0dd910afe868b7ef477227d8d538b46b3075031afee8a9f2acb0a2ed0b" dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" @@ -5788,36 +4647,20 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.2+wasi-0.2.9" +version = "1.0.1+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" dependencies = [ "wit-bindgen", ] -[[package]] -name = "wasip3" -version = "0.4.0+wasi-0.3.0-rc-2026-01-06" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" -dependencies = [ - "wit-bindgen", -] - -[[package]] -name = "wasite" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" - [[package]] name = "wasm-bindgen" -version = "0.2.108" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c" dependencies = [ "cfg-if", - "once_cell", "rustversion", "wasm-bindgen-macro", "wasm-bindgen-shared", @@ -5825,23 +4668,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.58" +version = "0.4.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" +checksum = "5e14e0327cb5368ad60ccb22d04a9827a693c95a926d8d125e9fa39e0baec501" dependencies = [ - "cfg-if", - "futures-util", "js-sys", - "once_cell", + "tokio", "wasm-bindgen", - "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.108" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5849,48 +4689,26 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.108" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.114", + "syn 3.0.9", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.108" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e" dependencies = [ "unicode-ident", ] -[[package]] -name = "wasm-encoder" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" -dependencies = [ - "leb128fmt", - "wasmparser", -] - -[[package]] -name = "wasm-metadata" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" -dependencies = [ - "anyhow", - "indexmap 2.13.0", - "wasm-encoder", - "wasmparser", -] - [[package]] name = "wasm-streams" version = "0.5.0" @@ -5904,36 +4722,26 @@ dependencies = [ "web-sys", ] -[[package]] -name = "wasmparser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" -dependencies = [ - "bitflags 2.10.0", - "hashbrown 0.15.5", - "indexmap 2.13.0", - "semver", -] - [[package]] name = "web-sys" -version = "0.3.85" +version = "0.3.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" +checksum = "d7d179596ff5ec0f6de4db64d54011bde6289cc49603d3a6e4ce3f329207ab88" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] -name = "web-time" -version = "1.1.0" +name = "web_atoms" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +checksum = "ba8b815c1b593dc0baf78dd0f4fc8fdb2de53198fb1163738093e9a311c33fb3" dependencies = [ - "js-sys", - "wasm-bindgen", + "phf", + "phf_codegen", + "string_cache", + "string_cache_codegen", ] [[package]] @@ -5981,10 +4789,10 @@ dependencies = [ ] [[package]] -name = "webpki-root-certs" -version = "1.0.6" +name = "webpki-roots" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804f18a4ac2676ffb4e8b5b5fa9ae38af06df08162314f96a68d2a363e21a8ca" +checksum = "f5f280bbb2b287bc8e7de7e3852945a0ff50d1bbcb5ed42b6c7a568c546df171" dependencies = [ "rustls-pki-types", ] @@ -6011,7 +4819,7 @@ checksum = "67a921c1b6914c367b2b823cd4cde6f96beec77d30a939c8199bb377cf9b9b54" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] @@ -6020,21 +4828,11 @@ version = "0.38.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "381336cfffd772377d291702245447a5251a2ffa5bad679c99e61bc48bacbf9c" dependencies = [ - "thiserror 2.0.18", + "thiserror 2.0.21", "windows", "windows-core 0.61.2", ] -[[package]] -name = "whoami" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" -dependencies = [ - "libredox", - "wasite", -] - [[package]] name = "winapi" version = "0.3.9" @@ -6148,7 +4946,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] @@ -6159,7 +4957,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] @@ -6184,17 +4982,6 @@ dependencies = [ "windows-link 0.1.3", ] -[[package]] -name = "windows-registry" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" -dependencies = [ - "windows-link 0.2.1", - "windows-result 0.4.1", - "windows-strings 0.5.1", -] - [[package]] name = "windows-result" version = "0.3.4" @@ -6240,15 +5027,6 @@ dependencies = [ "windows-targets 0.42.2", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -6300,21 +5078,6 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -6372,12 +5135,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -6396,12 +5153,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -6420,12 +5171,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -6456,12 +5201,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -6480,12 +5219,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -6504,12 +5237,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -6528,12 +5255,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -6557,9 +5278,18 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.14" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +checksum = "8c3b93199df0ab874cdf0c6a94f0a0dc3423fe41f1cafb62b8bd7b1deb277aef" dependencies = [ "memchr", ] @@ -6575,128 +5305,45 @@ dependencies = [ [[package]] name = "winreg" -version = "0.55.0" +version = "0.56.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97" +checksum = "7d6f32a0ff4a9f6f01231eb2059cc85479330739333e0e58cadf03b6af2cca10" dependencies = [ "cfg-if", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "wit-bindgen" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" -dependencies = [ - "wit-bindgen-rust-macro", -] - -[[package]] -name = "wit-bindgen-core" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" -dependencies = [ - "anyhow", - "heck 0.5.0", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" -dependencies = [ - "anyhow", - "heck 0.5.0", - "indexmap 2.13.0", - "prettyplease", - "syn 2.0.114", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", -] - -[[package]] -name = "wit-bindgen-rust-macro" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" -dependencies = [ - "anyhow", - "prettyplease", - "proc-macro2", - "quote", - "syn 2.0.114", - "wit-bindgen-core", - "wit-bindgen-rust", -] - -[[package]] -name = "wit-component" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" -dependencies = [ - "anyhow", - "bitflags 2.10.0", - "indexmap 2.13.0", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", -] - -[[package]] -name = "wit-parser" -version = "0.244.0" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" -dependencies = [ - "anyhow", - "id-arena", - "indexmap 2.13.0", - "log", - "semver", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser", -] +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "writeable" -version = "0.6.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" [[package]] name = "wry" -version = "0.54.1" +version = "0.55.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ed1a195b0375491dd15a7066a10251be217ce743cf4bbbbdcf5391d6473bee0" +checksum = "186f9871daa55fd9c016578b810d149de58367113db7fb72b462d2323ce19514" dependencies = [ "base64 0.22.1", "block2", "cookie", "crossbeam-channel", "dirs", + "dom_query", "dpi", "dunce", "gdkx11", "gtk", - "html5ever", "http", "javascriptcore-rs", "jni", - "kuchikiki", "libc", "ndk", "objc2", @@ -6711,7 +5358,7 @@ dependencies = [ "sha2", "soup3", "tao-macros", - "thiserror 2.0.18", + "thiserror 2.0.21", "url", "webkit2gtk", "webkit2gtk-sys", @@ -6745,9 +5392,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.8.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +checksum = "417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -6756,13 +5403,13 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 3.0.9", "synstructure", ] @@ -6795,7 +5442,7 @@ dependencies = [ "uds_windows", "uuid", "windows-sys 0.61.2", - "winnow 0.7.14", + "winnow 0.7.15", "zbus_macros", "zbus_names", "zvariant", @@ -6807,10 +5454,10 @@ version = "5.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bbd5a90dbe8feee5b13def448427ae314ccd26a49cac47905cafefb9ff846f1" dependencies = [ - "proc-macro-crate 3.4.0", + "proc-macro-crate 3.5.0", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", "zbus_names", "zvariant", "zvariant_utils", @@ -6823,62 +5470,62 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffd8af6d5b78619bab301ff3c560a5bd22426150253db278f164d6cf3b72c50f" dependencies = [ "serde", - "winnow 0.7.14", + "winnow 0.7.15", "zvariant", ] [[package]] name = "zerocopy" -version = "0.8.39" +version = "0.8.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6d35d663eadb6c932438e763b262fe1a70987f9ae936e60158176d710cae4a" +checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.39" +version = "0.8.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517" +checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", ] [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 3.0.9", "synstructure", ] [[package]] name = "zeroize" -version = "1.8.2" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" [[package]] name = "zerotrie" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" dependencies = [ "displaydoc", "yoke", @@ -6887,9 +5534,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.5" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40" dependencies = [ "yoke", "zerofrom", @@ -6898,20 +5545,26 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.2" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 3.0.9", ] +[[package]] +name = "zlib-rs" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112" + [[package]] name = "zmij" -version = "1.0.20" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4de98dfa5d5b7fef4ee834d0073d560c9ca7b6c46a71d058c48db7960f8cfaf7" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" [[package]] name = "zvariant" @@ -6922,7 +5575,7 @@ dependencies = [ "endi", "enumflags2", "serde", - "winnow 0.7.14", + "winnow 0.7.15", "zvariant_derive", "zvariant_utils", ] @@ -6933,10 +5586,10 @@ version = "5.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "484d5d975eb7afb52cc6b929c13d3719a20ad650fea4120e6310de3fc55e415c" dependencies = [ - "proc-macro-crate 3.4.0", + "proc-macro-crate 3.5.0", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.119", "zvariant_utils", ] @@ -6949,6 +5602,6 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.114", - "winnow 0.7.14", + "syn 2.0.119", + "winnow 0.7.15", ] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index a09d2ca..01187d0 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,16 +1,15 @@ [package] name = "mod0" -version = "0.1.0" -description = "Autónomo | Autonomic • Agnóstico | Agnostic • Agéntico | Agentic • 2026 • Mod0 por | by Modus Zero" +version = "0.3.0" +description = "Mission control para tus sesiones de CLI con IA | Mission control for your AI CLI sessions" authors = ["Luis Alberto Hernández Roselló"] +license = "Apache-2.0" edition = "2024" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +rust-version = "1.85" [lib] -# The `_lib` suffix may seem redundant but it is necessary -# to make the lib name unique and wouldn't conflict with the bin name. -# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519 +# El sufijo `_lib` evita un conflicto de nombres con el binario en Windows. +# Ver https://github.com/rust-lang/cargo/issues/8519 name = "mod0_lib" crate-type = ["staticlib", "cdylib", "rlib"] @@ -19,28 +18,20 @@ tauri-build = { version = "2", features = [] } [dependencies] tauri = { version = "2", features = [] } +tauri-plugin-dialog = "2" +tauri-plugin-notification = "2" tauri-plugin-opener = "2" tauri-plugin-os = "2" +tauri-plugin-window-state = "2" serde = { version = "1", features = ["derive"] } serde_json = "1" -tauri-plugin-window-state = "2.4.1" -futures = "0.3.31" -tauri-plugin-dialog = "2" -tokio = { version = "1.49.0", features = ["full"] } -sqlx = { version = "0.8.6", features = ["runtime-tokio", "sqlite", "macros", "chrono"] } -uuid = { version = "1.20.0", features = ["v4", "serde"] } -chrono = { version = "0.4.43", features = ["serde"] } +thiserror = "2" +uuid = { version = "1", features = ["v4"] } +portable-pty = "0.9" +tiny_http = "0.12" ignore = "0.4" -notify = "8.2.0" -portable-pty = "0.9.0" -dashmap = "6.1.0" -regex = "1.12.3" -lazy_static = "1.5.0" -tokio-tungstenite = "0.28.0" -futures-util = "0.3.31" -reqwest = { version = "0.13.2", features = ["json"] } -toml = "1.0.2" -async-trait = "0.1.89" +regex = "1" +ureq = { version = "3", features = ["json"] } [profile.release] opt-level = 3 @@ -48,4 +39,3 @@ lto = true codegen-units = 1 panic = "abort" strip = true - diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index 3a28c0d..dbba799 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -1,29 +1,23 @@ { - "$schema": "../gen/schemas/desktop-schema.json", - "identifier": "main-capability", - "description": "Capacidades de MOD0", - "windows": [ - "main" - ], - "permissions": [ - "core:default", - "core:window:allow-maximize", - "core:window:allow-minimize", - "core:window:allow-toggle-maximize", - "core:window:allow-close", - "core:window:allow-set-resizable", - "core:window:allow-start-dragging", - "core:path:default", - "core:event:default", - "core:window:default", - "core:webview:default", - "core:webview:allow-set-webview-zoom", - "core:resources:default", - "core:menu:default", - "core:image:default", - "core:tray:default", - "opener:default", - "os:default", - "dialog:default" - ] -} \ No newline at end of file + "$schema": "../gen/schemas/desktop-schema.json", + "identifier": "main-capability", + "description": "Capacidades de la ventana principal de MOD0", + "windows": ["main"], + "permissions": [ + "core:default", + "core:window:allow-minimize", + "core:window:allow-maximize", + "core:window:allow-unmaximize", + "core:window:allow-toggle-maximize", + "core:window:allow-is-maximized", + "core:window:allow-close", + "core:window:allow-start-dragging", + "core:window:allow-set-focus", + "core:webview:allow-set-webview-zoom", + "dialog:default", + "notification:default", + "opener:default", + "os:default", + "window-state:default" + ] +} diff --git a/src-tauri/installer/header.bmp b/src-tauri/installer/header.bmp new file mode 100644 index 0000000..7d5005b Binary files /dev/null and b/src-tauri/installer/header.bmp differ diff --git a/src-tauri/installer/sidebar.bmp b/src-tauri/installer/sidebar.bmp new file mode 100644 index 0000000..0b68e08 Binary files /dev/null and b/src-tauri/installer/sidebar.bmp differ diff --git a/src-tauri/migrations/20260213042036_init.sql b/src-tauri/migrations/20260213042036_init.sql deleted file mode 100644 index dfbfe73..0000000 --- a/src-tauri/migrations/20260213042036_init.sql +++ /dev/null @@ -1,135 +0,0 @@ -CREATE TABLE IF NOT EXISTS project ( - path TEXT PRIMARY KEY, - last_opened DATETIME NOT NULL, - is_favorite BOOLEAN DEFAULT 0, - custom_settings TEXT -); - -CREATE VIRTUAL TABLE IF NOT EXISTS file_index USING fts5( - path UNINDEXED, - project_path UNINDEXED, - content, - tokenize='unicode61' -); - -CREATE TABLE IF NOT EXISTS file_metadata ( - path TEXT PRIMARY KEY, - last_modified DATETIME NOT NULL, - size INTEGER NOT NULL, - file_type TEXT, - language_id TEXT, - project_path TEXT NOT NULL, - FOREIGN KEY(project_path) REFERENCES project(path) ON DELETE CASCADE -); - -CREATE TABLE IF NOT EXISTS extension ( - id TEXT PRIMARY KEY, - version TEXT NOT NULL, - local_path TEXT NOT NULL, - is_enabled BOOLEAN DEFAULT 1, - config_schema TEXT, - manifest_cache TEXT -); - -CREATE TABLE IF NOT EXISTS project_extension ( - project_path TEXT, - extension_id TEXT, - config_values TEXT, - PRIMARY KEY(project_path, extension_id), - FOREIGN KEY(project_path) REFERENCES project(path) ON DELETE CASCADE, - FOREIGN KEY(extension_id) REFERENCES extension(id) ON DELETE CASCADE -); - -CREATE TABLE IF NOT EXISTS skill ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - name TEXT NOT NULL, - code TEXT NOT NULL, - description TEXT, - tags TEXT, - usage_count INTEGER DEFAULT 0, - last_used DATETIME, - created_at DATETIME DEFAULT CURRENT_TIMESTAMP -); - -CREATE TABLE IF NOT EXISTS session ( - id TEXT PRIMARY KEY, - project_path TEXT NOT NULL, - session_type TEXT NOT NULL, - name TEXT, - branch_name TEXT, - worktree_path TEXT, - status TEXT NOT NULL, - is_ghost_session BOOLEAN DEFAULT 0, - base_commit_hash TEXT, - created_at DATETIME DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY(project_path) REFERENCES project(path) ON DELETE CASCADE -); - -CREATE TABLE IF NOT EXISTS thought_node ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - session_id TEXT NOT NULL, - parent_id INTEGER, - node_type TEXT NOT NULL, - content TEXT NOT NULL, - status TEXT DEFAULT 'pending', - metadata TEXT, - created_at DATETIME DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY(session_id) REFERENCES session(id) ON DELETE CASCADE, - FOREIGN KEY(parent_id) REFERENCES thought_node(id) ON DELETE SET NULL -); - -CREATE TABLE IF NOT EXISTS artifact ( - id TEXT PRIMARY KEY, - session_id TEXT NOT NULL, - thought_node_id INTEGER, - artifact_type TEXT NOT NULL, - content TEXT NOT NULL, - version INTEGER DEFAULT 1, - checksum TEXT, - status TEXT DEFAULT 'draft', - FOREIGN KEY(session_id) REFERENCES session(id) ON DELETE CASCADE, - FOREIGN KEY(thought_node_id) REFERENCES thought_node(id) ON DELETE SET NULL -); - -CREATE TABLE IF NOT EXISTS task ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - session_id TEXT NOT NULL, - skill_id INTEGER, - title TEXT NOT NULL, - status TEXT NOT NULL, - tdd_status TEXT NOT NULL, - error_log TEXT, - position INTEGER NOT NULL DEFAULT 0, - FOREIGN KEY(session_id) REFERENCES session(id) ON DELETE CASCADE, - FOREIGN KEY(skill_id) REFERENCES skill(id) ON DELETE SET NULL -); - -CREATE TABLE IF NOT EXISTS editor_state ( - project_path TEXT PRIMARY KEY, - open_tabs TEXT, - active_tab TEXT, - layout_config TEXT, - FOREIGN KEY(project_path) REFERENCES project(path) ON DELETE CASCADE -); - -CREATE TABLE IF NOT EXISTS chat_history ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - project_path TEXT NOT NULL, - session_id TEXT NOT NULL, - role TEXT NOT NULL, - content TEXT NOT NULL, - timestamp DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY(session_id) REFERENCES session(id) ON DELETE CASCADE, - FOREIGN KEY(project_path) REFERENCES project(path) ON DELETE CASCADE -); - -CREATE TABLE IF NOT EXISTS terminal_history ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - project_path TEXT NOT NULL, - session_id TEXT NOT NULL, - command TEXT NOT NULL, - exit_code INTEGER, - timestamp DATETIME DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY(session_id) REFERENCES session(id) ON DELETE CASCADE, - FOREIGN KEY(project_path) REFERENCES project(path) ON DELETE CASCADE -); \ No newline at end of file diff --git a/src-tauri/mod0.db b/src-tauri/mod0.db deleted file mode 100644 index e726746..0000000 Binary files a/src-tauri/mod0.db and /dev/null differ diff --git a/src-tauri/rustfmt.toml b/src-tauri/rustfmt.toml new file mode 100644 index 0000000..41a45ab --- /dev/null +++ b/src-tauri/rustfmt.toml @@ -0,0 +1,4 @@ +edition = "2024" +max_width = 110 +tab_spaces = 4 +newline_style = "Unix" diff --git a/src-tauri/src/commands/agent.rs b/src-tauri/src/commands/agent.rs deleted file mode 100644 index bed9855..0000000 --- a/src-tauri/src/commands/agent.rs +++ /dev/null @@ -1,120 +0,0 @@ -use tauri::State; -use crate::persistence::DbManager; -use crate::persistence::models::artifact::{ThoughtNode, Task}; -use crate::persistence::models::history::ChatHistory; - -// --- PERSISTENCIA DE CHAT & ARTEFACTOS (Blueprint Mode) --- - -/// Guarda un mensaje de chat. Si la IA genera un artefacto (diagrama, tabla, etc), -/// este se guarda en `artifact_data` para ser reconstruido en el Blueprint Mode. -#[tauri::command] -pub async fn send_chat_message( - db: State<'_, DbManager>, - message: ChatHistory -) -> Result<(), String> { - let repo = db.repository(); - repo.save_chat_message(&message) - .await - .map_err(|e| e.to_string()) -} - -/// Recupera los mensajes de la sesión para reconstruir el hilo de conversación -/// y el contexto visual de la IA. -#[tauri::command] -pub async fn get_chat_history( - db: State<'_, DbManager>, - session_id: String -) -> Result, String> { - let repo = db.repository(); - repo.get_session_chat(&session_id) - .await - .map_err(|e| e.to_string()) -} - -#[tauri::command] -pub async fn clear_chat_history( - session_id: String, - db: State<'_, DbManager> -) -> Result<(), String> { - let repo = db.repository(); - repo.clear_chat_history(&session_id) - .await - .map_err(|e| e.to_string()) -} - -// --- GRAFO DE PENSAMIENTO & TAREAS (Forge Mode) --- - -/// Registra un nuevo paso en el razonamiento interno de la IA. -#[tauri::command] -pub async fn add_agent_thought( - db: State<'_, DbManager>, - node: ThoughtNode -) -> Result { - let repo = db.repository(); - repo.add_thought(&node) - .await - .map_err(|e| e.to_string()) -} - -/// Obtiene el grafo de pensamientos para visualizar la lógica del agente en tiempo real. -#[tauri::command] -pub async fn get_agent_session_history( - db: State<'_, DbManager>, - session_id: String -) -> Result, String> { - let repo = db.repository(); - repo.get_session_thoughts(&session_id) - .await - .map_err(|e| e.to_string()) -} - -/// Permite al usuario aprobar o rechazar un pensamiento/decisión de la IA. -#[tauri::command] -pub async fn update_thought_status( - db: State<'_, DbManager>, - id: i64, - status: String -) -> Result<(), String> { - let repo = db.repository(); - repo.update_thought_status(id, &status) - .await - .map_err(|e| e.to_string()) -} - -/// Sincroniza el estado de las tareas en el tablero Kanban del agente. -#[tauri::command] -pub async fn sync_execution_task( - db: State<'_, DbManager>, - task: ExecutionTask -) -> Result<(), String> { - let repo = db.repository(); - repo.upsert_task(&task) - .await - .map_err(|e| e.to_string()) -} - -/// Reporta el resultado de una ejecución TDD para que la IA aprenda del error o confirme el éxito. -#[tauri::command] -pub async fn report_task_tdd_status( - db: State<'_, DbManager>, - id: i64, - tdd_status: String, - error_log: Option -) -> Result<(), String> { - let repo = db.repository(); - repo.update_task_tdd(id, &tdd_status, error_log) - .await - .map_err(|e| e.to_string()) -} - -/// Busca en la biblioteca de habilidades (Skills) las capacidades necesarias para el prompt actual. -#[tauri::command] -pub async fn discover_agent_skills( - db: State<'_, DbManager>, - tags: Vec -) -> Result, String> { - let repo = db.repository(); - repo.get_skills_by_tags(tags) - .await - .map_err(|e| e.to_string()) -} \ No newline at end of file diff --git a/src-tauri/src/commands/app.rs b/src-tauri/src/commands/app.rs new file mode 100644 index 0000000..07f2208 --- /dev/null +++ b/src-tauri/src/commands/app.rs @@ -0,0 +1,77 @@ +use std::collections::BTreeMap; + +use serde::Serialize; +use tauri::{AppHandle, State}; + +use crate::core::error::AppResult; +use crate::core::state::AppState; +use crate::features::notifications::{Notifier, NotifyKind}; +use crate::features::sessions::launcher::{detect_shell, env_reference, find_executable}; + +#[derive(Serialize)] +#[serde(rename_all = "camelCase")] +pub struct AppInfo { + pub version: String, + pub hook_port: Option, + pub data_dir: String, + pub config_dir: String, + pub shell: String, + /// Ruta de `git`, si está instalado (lo necesitan la revisión y los worktrees). + pub git: Option, +} + +#[derive(Serialize)] +#[serde(rename_all = "camelCase")] +pub struct CommandCheck { + pub found: bool, + pub path: Option, + /// Variables `$NOMBRE` del perfil que no existen en el entorno del sistema. + pub missing_env: Vec, +} + +#[tauri::command] +pub async fn app_info(state: State<'_, AppState>) -> AppResult { + let (shell, _, _) = detect_shell(&state.config.get()); + + Ok(AppInfo { + version: env!("CARGO_PKG_VERSION").to_string(), + hook_port: state.sessions.hook_port(), + data_dir: state.paths.data_dir.to_string_lossy().into_owned(), + config_dir: state.paths.config_dir.to_string_lossy().into_owned(), + shell, + git: find_executable("git").map(|path| path.to_string_lossy().into_owned()), + }) +} + +/// Comprueba si el ejecutable de un perfil está instalado y visible en el `PATH`. +#[tauri::command] +pub async fn profile_check(command: String, env: BTreeMap) -> AppResult { + let path = find_executable(&command); + let mut missing_env: Vec = env + .values() + .filter_map(|value| env_reference(value)) + .filter(|name| std::env::var(name).map(|v| v.is_empty()).unwrap_or(true)) + .map(String::from) + .collect(); + missing_env.sort(); + missing_env.dedup(); + + Ok(CommandCheck { + found: path.is_some(), + path: path.map(|p| p.to_string_lossy().into_owned()), + missing_env, + }) +} + +/// Envía una notificación de prueba por todos los canales habilitados. +#[tauri::command] +pub async fn notify_test(app: AppHandle, state: State<'_, AppState>) -> AppResult<()> { + Notifier::new(app, state.config.clone()).send( + NotifyKind::Test, + "MOD0", + "Notificación de prueba: si lees esto, el canal funciona.", + "prueba", + "idle", + ); + Ok(()) +} diff --git a/src-tauri/src/commands/bridge.rs b/src-tauri/src/commands/bridge.rs deleted file mode 100644 index 63419a7..0000000 --- a/src-tauri/src/commands/bridge.rs +++ /dev/null @@ -1,65 +0,0 @@ -use tauri::{command, State, AppHandle}; -use serde_json::Value; -use crate::services::bridge::BridgeService; -use crate::services::bridge::defs::{RuntimeDefinition, ProviderConfig}; - -// --- RUNTIMES (MCP/LSP) --- - -#[command] -pub async fn boot_runtime( - def: RuntimeDefinition, - service: State<'_, BridgeService>, - app: AppHandle -) -> Result<(), String> { - service.spawn_runtime(def, app).await -} - -#[command] -pub async fn stop_runtime( - id: String, - service: State<'_, BridgeService> -) -> Result<(), String> { - service.stop_runtime(&id) -} - -#[command] -pub async fn load_config( - service: State<'_, BridgeService> -) -> Result, String> { - Ok(service.load_runtime_configs()) -} - -// --- PROVIDERS (AI/VCS) --- - -#[command] -pub async fn register_provider( - config: ProviderConfig, - service: State<'_, BridgeService> -) -> Result<(), String> { - service.register_provider(config) -} - -#[command] -pub async fn activate_provider( - id: String, - service: State<'_, BridgeService> -) -> Result<(), String> { - service.activate_provider(&id).await -} - -#[command] -pub async fn ai_completion( - prompt: String, - service: State<'_, BridgeService> -) -> Result { - service.ask_ai(&prompt).await -} - -#[command] -pub async fn vcs_action( - action: String, - args: Value, - service: State<'_, BridgeService> -) -> Result { - service.execute_vcs_action(&action, args).await -} \ No newline at end of file diff --git a/src-tauri/src/commands/config.rs b/src-tauri/src/commands/config.rs index 2571dc8..9f6bb59 100644 --- a/src-tauri/src/commands/config.rs +++ b/src-tauri/src/commands/config.rs @@ -1,20 +1,20 @@ -use crate::AppState; +use tauri::State; + use crate::config::AppConfig; -use tauri::{State, AppHandle, Manager}; +use crate::core::error::AppResult; +use crate::core::state::AppState; #[tauri::command] -pub fn get_config(state: State) -> AppConfig { - state.config.lock().unwrap().clone() +pub async fn config_get(state: State<'_, AppState>) -> AppResult { + Ok(state.config.get()) } #[tauri::command] -pub fn update_config( - app_handle: AppHandle, - state: State, - new_config: AppConfig -) -> Result<(), String> { - let mut config = state.config.lock().unwrap(); - *config = new_config; - let config_dir = app_handle.path().app_config_dir().map_err(|e| e.to_string())?; - config.save(config_dir) -} \ No newline at end of file +pub async fn config_update(state: State<'_, AppState>, config: AppConfig) -> AppResult { + state.config.replace(config) +} + +#[tauri::command] +pub async fn config_set_project(state: State<'_, AppState>, path: String) -> AppResult { + state.config.touch_project(&path) +} diff --git a/src-tauri/src/commands/kanban.rs b/src-tauri/src/commands/kanban.rs new file mode 100644 index 0000000..147afbb --- /dev/null +++ b/src-tauri/src/commands/kanban.rs @@ -0,0 +1,16 @@ +use serde_json::Value; +use tauri::State; + +use crate::core::error::AppResult; +use crate::core::state::AppState; +use crate::features::kanban; + +#[tauri::command] +pub async fn kanban_load(state: State<'_, AppState>, project: String) -> AppResult { + kanban::load(&state.paths, &project) +} + +#[tauri::command] +pub async fn kanban_save(state: State<'_, AppState>, project: String, board: Value) -> AppResult<()> { + kanban::save(&state.paths, &project, &board) +} diff --git a/src-tauri/src/commands/kernel/fs.rs b/src-tauri/src/commands/kernel/fs.rs deleted file mode 100644 index aede98e..0000000 --- a/src-tauri/src/commands/kernel/fs.rs +++ /dev/null @@ -1,97 +0,0 @@ -use tauri::State; -use std::path::PathBuf; -use tokio::sync::mpsc; -use crate::persistence::DbManager; -use crate::kernel::fs::{ - nodes::FileNode, - scanner, - operations, - worker::IndexingTask, - search::SearchService -}; - -/// Obtiene el árbol de archivos de forma recursiva aplicando las reglas de categorización. -#[tauri::command] -pub async fn get_file_tree(path: PathBuf, root: PathBuf) -> Result, String> { - scanner::build_tree_recursive(path, root).await -} - -/// Lee el contenido de un archivo desde el disco. -#[tauri::command] -pub async fn read_file(path: PathBuf) -> Result { - operations::read_to_string(path) -} - -/// Guarda cambios en un archivo y solicita su re-indexación. -#[tauri::command] -pub async fn write_file( - path: PathBuf, - project_path: PathBuf, - content: String, - is_ai_generated: bool, - tx: State<'_, mpsc::Sender> -) -> Result<(), String> { - if is_ai_generated { - println!("IA editando archivo: {:?}", path); - } - - // Se pasa project_path para que el indexador sepa a qué proyecto pertenece el archivo - operations::save_to_file(path, project_path, content, &tx) -} - -/// Crea un nuevo archivo vacío y lo registra en el sistema de búsqueda. -#[tauri::command] -pub async fn create_new_file( - path: PathBuf, - project_path: PathBuf, - tx: State<'_, mpsc::Sender> -) -> Result<(), String> { - operations::create_file(path, project_path, &tx) -} - -/// Crea un directorio y todos sus padres necesarios. -#[tauri::command] -pub async fn create_new_dir(path: PathBuf) -> Result<(), String> { - operations::create_dir_all(path) -} - -/// Elimina un archivo o carpeta y limpia su rastro en el índice. -#[tauri::command] -pub async fn delete_path( - path: PathBuf, - project_path: PathBuf, - tx: State<'_, mpsc::Sender> -) -> Result<(), String> { - operations::delete_item(path, project_path, &tx) -} - -/// Renombra un recurso y actualiza las rutas en la base de datos. -#[tauri::command] -pub async fn rename_path( - old_path: PathBuf, - new_path: PathBuf, - project_path: PathBuf, - tx: State<'_, mpsc::Sender> -) -> Result<(), String> { - operations::rename_item(old_path, new_path, project_path, &tx) -} - -/// Realiza una búsqueda de texto completo (FTS5) en el contenido de los archivos del proyecto. -#[tauri::command] -pub async fn global_search( - db: State<'_, DbManager>, - query: String, - project_path: String -) -> Result, String> { - SearchService::find_code(&db, &query, &project_path).await -} - -/// Realiza una búsqueda rápida por nombre de archivo usando patrones LIKE. -#[tauri::command] -pub async fn quick_open( - db: State<'_, DbManager>, - query: String, - project_path: String -) -> Result, String> { - SearchService::find_filename(&db, &query, &project_path).await -} \ No newline at end of file diff --git a/src-tauri/src/commands/kernel/mod.rs b/src-tauri/src/commands/kernel/mod.rs deleted file mode 100644 index 7e662ab..0000000 --- a/src-tauri/src/commands/kernel/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod fs; -pub mod terminal; \ No newline at end of file diff --git a/src-tauri/src/commands/kernel/terminal.rs b/src-tauri/src/commands/kernel/terminal.rs deleted file mode 100644 index 30e2a3f..0000000 --- a/src-tauri/src/commands/kernel/terminal.rs +++ /dev/null @@ -1,77 +0,0 @@ -use tauri::{State}; -use crate::kernel::terminal::{TerminalManager, history::HistoryService}; -use crate::persistence::models::history::{TerminalHistory}; -use crate::persistence::DbManager; -use std::path::PathBuf; - -#[tauri::command] -pub async fn term_create_session( - id: String, - path: PathBuf, - manager: State<'_, TerminalManager> -) -> Result<(), String> { - if !path.exists() { return Err("Ruta inválida".into()); } - manager.create_session(id, path).await -} - -#[tauri::command] -pub async fn term_get_context(id: String, manager: State<'_, TerminalManager>) -> Result { - // Permite a la IA leer qué hay actualmente en la terminal - manager.get_capture(&id).await -} - -#[tauri::command] -pub async fn term_resize(id: String, rows: u16, cols: u16, manager: State<'_, TerminalManager>) -> Result<(), String> { - manager.resize(&id, rows, cols).await -} - -#[tauri::command] -pub async fn term_write( - id: String, - data: String, - is_ai: bool, - manager: State<'_, TerminalManager>, - db: State<'_, DbManager> -) -> Result<(), String> { - - // 1. Control de seguridad para IA - if is_ai { - // Aquí puedes consultar settings en el futuro - println!("IA ejecutando: {}", data); - } - - // 2. Ejecutar escritura - let project_path = manager.write(&id, &data).await?; - - // 3. Persistencia asíncrona (si es un comando) - if data.contains('\r') || data.contains('\n') { - let db_clone = db.inner().clone(); - let id_clone = id.clone(); - let data_clone = data.clone(); - let path_str = project_path.to_string_lossy().to_string(); - - tokio::spawn(async move { - HistoryService::log_command(db_clone, id_clone, path_str, data_clone).await; - }); - } - - Ok(()) -} - -#[tauri::command] -pub async fn term_get_history( - session_id: String, - db: State<'_, DbManager> -) -> Result, String> { - let db_clone = db.inner().clone(); - HistoryService::get_history(db_clone, session_id).await -} - -#[tauri::command] -pub async fn term_clear_history( - session_id: String, - db: State<'_, DbManager> -) -> Result<(), String> { - let db_clone = db.inner().clone(); - HistoryService::clear_history(db_clone, session_id).await -} \ No newline at end of file diff --git a/src-tauri/src/commands/mod.rs b/src-tauri/src/commands/mod.rs index c6674fc..8986917 100644 --- a/src-tauri/src/commands/mod.rs +++ b/src-tauri/src/commands/mod.rs @@ -1,4 +1,7 @@ -pub mod agent; -pub mod kernel; -pub mod services; -pub mod config; \ No newline at end of file +pub mod app; +pub mod config; +pub mod kanban; +pub mod review; +pub mod session; +pub mod terminal; +pub mod workspace; diff --git a/src-tauri/src/commands/orchestration.rs b/src-tauri/src/commands/orchestration.rs deleted file mode 100644 index 04a6901..0000000 --- a/src-tauri/src/commands/orchestration.rs +++ /dev/null @@ -1,16 +0,0 @@ -use tauri::{command, State}; -use std::path::PathBuf; -use crate::services::bridge::BridgeService; -use crate::services::orchestration::discovery::{DiscoveryEngine, DiscoveryResponse}; - -#[command] -pub async fn discover_recommendations_for_project( - project_root: String, - service: State<'_, BridgeService> -) -> Result { - let path = PathBuf::from(project_root); - let engine = DiscoveryEngine::new(&path); - - // Ejecuta el flujo: Scanner -> IA -> RuntimeDefinitions - engine.discover_recommendations_for_workspace(&service).await -} \ No newline at end of file diff --git a/src-tauri/src/commands/review.rs b/src-tauri/src/commands/review.rs new file mode 100644 index 0000000..415259a --- /dev/null +++ b/src-tauri/src/commands/review.rs @@ -0,0 +1,69 @@ +use std::path::PathBuf; + +use serde::Serialize; +use tauri::State; + +use crate::core::error::AppResult; +use crate::core::state::AppState; +use crate::features::git::{self, ChangedFile, FilePair}; +use crate::infrastructure::process::blocking; + +#[derive(Serialize)] +#[serde(rename_all = "camelCase")] +pub struct GitInfo { + pub is_repo: bool, + pub branch: Option, +} + +#[tauri::command] +pub async fn git_info(_state: State<'_, AppState>, path: String) -> AppResult { + blocking(move || { + let path = PathBuf::from(path); + Ok(GitInfo { + is_repo: git::is_repo(&path), + branch: git::current_branch(&path), + }) + }) + .await +} + +/// Archivos que la sesión cambió respecto a su commit base. +#[tauri::command] +pub async fn review_changes(state: State<'_, AppState>, session_id: String) -> AppResult> { + let session = state.sessions.session(&session_id)?; + blocking(move || git::changes(&PathBuf::from(&session.cwd), session.base_sha.as_deref())).await +} + +#[tauri::command] +pub async fn review_file( + state: State<'_, AppState>, + session_id: String, + path: String, + status: String, +) -> AppResult { + let session = state.sessions.session(&session_id)?; + blocking(move || { + git::file_pair( + &PathBuf::from(&session.cwd), + session.base_sha.as_deref(), + &path, + &status, + ) + }) + .await +} + +/// Confirma todos los cambios de la sesión y la marca como revisada. +#[tauri::command] +pub async fn review_commit( + state: State<'_, AppState>, + session_id: String, + message: String, +) -> AppResult { + let session = state.sessions.session(&session_id)?; + let sha = blocking(move || git::commit_all(&PathBuf::from(&session.cwd), &message)).await?; + + state.sessions.set_reviewed(&session_id, true)?; + state.sessions.refresh_changes(&session_id); + Ok(sha) +} diff --git a/src-tauri/src/commands/session.rs b/src-tauri/src/commands/session.rs new file mode 100644 index 0000000..bb1b72c --- /dev/null +++ b/src-tauri/src/commands/session.rs @@ -0,0 +1,60 @@ +use tauri::State; + +use crate::core::error::AppResult; +use crate::core::state::AppState; +use crate::features::observer::graph::ThoughtNode; +use crate::features::sessions::model::{CreateSessionRequest, Session}; +use crate::infrastructure::process::blocking; + +#[tauri::command] +pub async fn session_list(state: State<'_, AppState>) -> AppResult> { + Ok(state.sessions.list()) +} + +#[tauri::command] +pub async fn session_create(state: State<'_, AppState>, request: CreateSessionRequest) -> AppResult { + let sessions = state.sessions.clone(); + blocking(move || sessions.create(request)).await +} + +#[tauri::command] +pub async fn session_restart(state: State<'_, AppState>, id: String) -> AppResult { + let sessions = state.sessions.clone(); + blocking(move || sessions.restart(&id)).await +} + +#[tauri::command] +pub async fn session_stop(state: State<'_, AppState>, id: String) -> AppResult<()> { + state.sessions.stop(&id) +} + +#[tauri::command] +pub async fn session_remove(state: State<'_, AppState>, id: String, remove_worktree: bool) -> AppResult<()> { + let sessions = state.sessions.clone(); + blocking(move || sessions.remove(&id, remove_worktree)).await +} + +#[tauri::command] +pub async fn session_rename(state: State<'_, AppState>, id: String, name: String) -> AppResult { + state.sessions.rename(&id, &name) +} + +#[tauri::command] +pub async fn session_set_reviewed( + state: State<'_, AppState>, + id: String, + reviewed: bool, +) -> AppResult { + state.sessions.set_reviewed(&id, reviewed) +} + +#[tauri::command] +pub async fn session_graph(state: State<'_, AppState>, id: String) -> AppResult> { + state.sessions.graph(&id) +} + +#[tauri::command] +pub async fn session_refresh(state: State<'_, AppState>, id: String) -> AppResult<()> { + state.sessions.refresh_changes(&id); + Ok(()) +} diff --git a/src-tauri/src/commands/terminal.rs b/src-tauri/src/commands/terminal.rs new file mode 100644 index 0000000..57ca514 --- /dev/null +++ b/src-tauri/src/commands/terminal.rs @@ -0,0 +1,32 @@ +use tauri::State; +use tauri::ipc::{Channel, InvokeResponseBody, Response}; + +use crate::core::error::AppResult; +use crate::core::state::AppState; + +/// Conecta un canal de bytes crudos a la terminal de la sesión y devuelve su historial reciente +/// (bytes crudos) para reconstruirla al abrirla. +#[tauri::command] +pub async fn term_attach( + state: State<'_, AppState>, + id: String, + channel: Channel, +) -> AppResult { + Ok(Response::new(state.sessions.pty(&id)?.attach(channel))) +} + +#[tauri::command] +pub async fn term_detach(state: State<'_, AppState>, id: String) -> AppResult<()> { + state.sessions.pty(&id)?.detach(); + Ok(()) +} + +#[tauri::command] +pub async fn term_write(state: State<'_, AppState>, id: String, data: String) -> AppResult<()> { + state.sessions.pty(&id)?.write(data.as_bytes()) +} + +#[tauri::command] +pub async fn term_resize(state: State<'_, AppState>, id: String, rows: u16, cols: u16) -> AppResult<()> { + state.sessions.pty(&id)?.resize(rows.max(2), cols.max(2)) +} diff --git a/src-tauri/src/commands/workspace.rs b/src-tauri/src/commands/workspace.rs new file mode 100644 index 0000000..5634025 --- /dev/null +++ b/src-tauri/src/commands/workspace.rs @@ -0,0 +1,77 @@ +use std::path::PathBuf; + +use tauri::State; + +use crate::core::error::AppResult; +use crate::core::state::AppState; +use crate::features::workspace::deps::{self, DepGraph}; +use crate::features::workspace::io; +use crate::features::workspace::tree::{self, DirEntryInfo}; +use crate::infrastructure::process::blocking; + +/// Límite por defecto de archivos en el índice de búsqueda rápida. +const DEFAULT_FILE_LIMIT: usize = 30_000; + +#[tauri::command] +pub async fn fs_list_dir(_state: State<'_, AppState>, path: String) -> AppResult> { + blocking(move || tree::list_dir(&PathBuf::from(path))).await +} + +#[tauri::command] +pub async fn fs_list_files( + _state: State<'_, AppState>, + root: String, + limit: Option, +) -> AppResult> { + blocking(move || tree::list_files(&PathBuf::from(root), limit.unwrap_or(DEFAULT_FILE_LIMIT))).await +} + +#[tauri::command] +pub async fn fs_read(_state: State<'_, AppState>, path: String) -> AppResult { + blocking(move || io::read_text(&PathBuf::from(path))).await +} + +#[tauri::command] +pub async fn fs_write(_state: State<'_, AppState>, path: String, content: String) -> AppResult<()> { + blocking(move || io::write_text(&PathBuf::from(path), &content)).await +} + +#[tauri::command] +pub async fn fs_create_file(_state: State<'_, AppState>, path: String) -> AppResult<()> { + blocking(move || io::create_file(&PathBuf::from(path))).await +} + +#[tauri::command] +pub async fn fs_create_dir(_state: State<'_, AppState>, path: String) -> AppResult<()> { + blocking(move || io::create_dir(&PathBuf::from(path))).await +} + +#[tauri::command] +pub async fn fs_rename(_state: State<'_, AppState>, from: String, to: String) -> AppResult<()> { + blocking(move || io::rename(&PathBuf::from(from), &PathBuf::from(to))).await +} + +#[tauri::command] +pub async fn fs_delete(_state: State<'_, AppState>, path: String) -> AppResult<()> { + blocking(move || io::delete(&PathBuf::from(path))).await +} + +#[tauri::command] +pub async fn fs_graph( + _state: State<'_, AppState>, + root: String, + expanded: Vec, + refresh: bool, +) -> AppResult { + blocking(move || deps::graph(&PathBuf::from(root), &expanded, refresh)).await +} + +/// Archivos que dependen (directa o indirectamente) de los archivos indicados. +#[tauri::command] +pub async fn fs_impact( + _state: State<'_, AppState>, + root: String, + paths: Vec, +) -> AppResult> { + blocking(move || deps::impact(&PathBuf::from(root), &paths)).await +} diff --git a/src-tauri/src/config.rs b/src-tauri/src/config.rs index 2ac1d8d..6184313 100644 --- a/src-tauri/src/config.rs +++ b/src-tauri/src/config.rs @@ -1,46 +1,100 @@ -use serde::{Deserialize, Serialize}; -use std::fs; use std::path::PathBuf; +use std::sync::RwLock; + +use serde::{Deserialize, Serialize}; + +use crate::core::error::AppResult; +use crate::core::state::Paths; +use crate::features::notifications::NotificationConfig; +use crate::features::sessions::profile::{CliProfile, default_profiles}; +use crate::infrastructure::storage; -pub const CONFIG_FILE_NAME: &str = "config.json"; +/// Número máximo de proyectos recientes que se recuerdan. +const MAX_RECENT_PROJECTS: usize = 12; -#[derive(Serialize, Deserialize, Debug, Clone)] +/// Configuración global de MOD0 (persistida en `config.json`). +/// +/// Todos los campos tienen valor por defecto para que una configuración antigua +/// o parcial siga cargando después de actualizar la app. +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase", default)] pub struct AppConfig { pub theme: String, + pub accent: String, pub language: String, - pub last_project_path: Option, + pub ui_scale: f64, + pub reduce_motion: bool, + /// Guarda el archivo del editor automáticamente poco después de dejar de escribir. + pub auto_save: bool, + pub terminal_font_size: u8, + pub context_limit: u64, + pub shell: Option, + pub last_project_path: Option, + pub recent_projects: Vec, + pub profiles: Vec, + pub default_profile_id: String, + pub notifications: NotificationConfig, } impl Default for AppConfig { fn default() -> Self { Self { - theme: "dark".to_string(), - language: "es".to_string(), + theme: "dark".into(), + accent: "blue".into(), + language: "es".into(), + ui_scale: 1.0, + reduce_motion: false, + auto_save: false, + terminal_font_size: 13, + context_limit: 200_000, + shell: None, last_project_path: None, + recent_projects: Vec::new(), + profiles: default_profiles(), + default_profile_id: "claude".into(), + notifications: NotificationConfig::default(), } } } -impl AppConfig { - pub fn load(config_dir: PathBuf) -> Self { - let config_path = config_dir.join(CONFIG_FILE_NAME); +/// Acceso concurrente y persistencia de [`AppConfig`]. +pub struct ConfigStore { + path: PathBuf, + inner: RwLock, +} + +impl ConfigStore { + pub fn load(paths: &Paths) -> Self { + let path = paths.config_file(); + let mut config: AppConfig = storage::read_json(&path).ok().flatten().unwrap_or_default(); - if !config_path.exists() { - let _ = fs::create_dir_all(&config_dir); - let default_config = Self::default(); - let json = serde_json::to_string_pretty(&default_config).unwrap(); - let _ = fs::write(config_path, json); - return default_config; + if config.profiles.is_empty() { + config.profiles = default_profiles(); } - let data = fs::read_to_string(config_path).unwrap_or_default(); - serde_json::from_str(&data).unwrap_or_else(|_| Self::default()) + Self { + path, + inner: RwLock::new(config), + } + } + + pub fn get(&self) -> AppConfig { + self.inner.read().expect("config lock").clone() } - pub fn save(&self, config_dir: PathBuf) -> Result<(), String> { - let config_path = config_dir.join(CONFIG_FILE_NAME); - let json = serde_json::to_string_pretty(self).map_err(|e| e.to_string())?; - fs::write(config_path, json).map_err(|e| e.to_string())?; - Ok(()) + pub fn replace(&self, config: AppConfig) -> AppResult { + *self.inner.write().expect("config lock") = config.clone(); + storage::write_json_atomic(&self.path, &config)?; + Ok(config) } -} \ No newline at end of file + + /// Registra un proyecto como el último usado y lo sube al inicio de los recientes. + pub fn touch_project(&self, project: &str) -> AppResult { + let mut config = self.get(); + config.last_project_path = Some(project.to_string()); + config.recent_projects.retain(|p| p != project); + config.recent_projects.insert(0, project.to_string()); + config.recent_projects.truncate(MAX_RECENT_PROJECTS); + self.replace(config) + } +} diff --git a/src-tauri/src/core/error.rs b/src-tauri/src/core/error.rs new file mode 100644 index 0000000..393f943 --- /dev/null +++ b/src-tauri/src/core/error.rs @@ -0,0 +1,38 @@ +use serde::{Serialize, Serializer}; + +/// Error unificado de la aplicación. Se serializa como texto plano para que el +/// frontend reciba un `string` legible en el `catch` de cada `invoke`. +#[derive(Debug, thiserror::Error)] +pub enum AppError { + #[error("io: {0}")] + Io(#[from] std::io::Error), + + #[error("json: {0}")] + Json(#[from] serde_json::Error), + + #[error("tauri: {0}")] + Tauri(#[from] tauri::Error), + + #[error("git: {0}")] + Git(String), + + #[error("sesión no encontrada: {0}")] + SessionNotFound(String), + + #[error("{0}")] + Msg(String), +} + +impl AppError { + pub fn msg(message: impl Into) -> Self { + Self::Msg(message.into()) + } +} + +impl Serialize for AppError { + fn serialize(&self, serializer: S) -> Result { + serializer.serialize_str(&self.to_string()) + } +} + +pub type AppResult = Result; diff --git a/src-tauri/src/core/events.rs b/src-tauri/src/core/events.rs new file mode 100644 index 0000000..7a189db --- /dev/null +++ b/src-tauri/src/core/events.rs @@ -0,0 +1,24 @@ +use serde::Serialize; + +use crate::features::observer::graph::ThoughtNode; + +/// Nombres de los eventos que el backend emite hacia el frontend. +pub const SESSION_UPSERT: &str = "session:upsert"; +pub const SESSION_REMOVED: &str = "session:removed"; +pub const GRAPH_DELTA: &str = "graph:delta"; +pub const FS_CHANGED: &str = "fs:changed"; + +/// Nodos nuevos o actualizados del thinking graph de una sesión. +#[derive(Debug, Clone, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct GraphDelta { + pub session_id: String, + pub nodes: Vec, +} + +/// Indica que algo cambió en el disco dentro de `cwd` (activity-driven, sin watchers). +#[derive(Debug, Clone, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct FsChanged { + pub cwd: String, +} diff --git a/src-tauri/src/core/mod.rs b/src-tauri/src/core/mod.rs new file mode 100644 index 0000000..74dbb13 --- /dev/null +++ b/src-tauri/src/core/mod.rs @@ -0,0 +1,3 @@ +pub mod error; +pub mod events; +pub mod state; diff --git a/src-tauri/src/core/state.rs b/src-tauri/src/core/state.rs new file mode 100644 index 0000000..e329e86 --- /dev/null +++ b/src-tauri/src/core/state.rs @@ -0,0 +1,52 @@ +use std::path::PathBuf; +use std::sync::Arc; + +use tauri::{AppHandle, Manager}; + +use crate::config::ConfigStore; +use crate::core::error::AppResult; +use crate::features::sessions::manager::SessionManager; + +/// Rutas persistentes de la aplicación. +#[derive(Debug, Clone)] +pub struct Paths { + pub config_dir: PathBuf, + pub data_dir: PathBuf, +} + +impl Paths { + pub fn resolve(app: &AppHandle) -> AppResult { + let config_dir = app.path().app_config_dir()?; + let data_dir = app.path().app_data_dir()?; + std::fs::create_dir_all(&config_dir)?; + std::fs::create_dir_all(&data_dir)?; + Ok(Self { config_dir, data_dir }) + } + + pub fn config_file(&self) -> PathBuf { + self.config_dir.join("config.json") + } + + pub fn sessions_file(&self) -> PathBuf { + self.data_dir.join("sessions.json") + } + + pub fn graph_file(&self, session_id: &str) -> PathBuf { + self.data_dir.join("graphs").join(format!("{session_id}.json")) + } + + pub fn hooks_file(&self, session_id: &str) -> PathBuf { + self.data_dir.join("hooks").join(format!("{session_id}.json")) + } + + pub fn board_file(&self, project_key: &str) -> PathBuf { + self.data_dir.join("boards").join(format!("{project_key}.json")) + } +} + +/// Estado global inyectado en todos los comandos de Tauri. +pub struct AppState { + pub paths: Paths, + pub config: Arc, + pub sessions: Arc, +} diff --git a/src-tauri/src/features/core_features/mod.rs b/src-tauri/src/features/core_features/mod.rs deleted file mode 100644 index a630f01..0000000 --- a/src-tauri/src/features/core_features/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod workspace_discovery; \ No newline at end of file diff --git a/src-tauri/src/features/core_features/settings_management/mod.rs b/src-tauri/src/features/core_features/settings_management/mod.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/features/core_features/workspace_discovery/discovery.rs b/src-tauri/src/features/core_features/workspace_discovery/discovery.rs deleted file mode 100644 index d442c59..0000000 --- a/src-tauri/src/features/core_features/workspace_discovery/discovery.rs +++ /dev/null @@ -1,70 +0,0 @@ -use std::path::{Path, PathBuf}; -use crate::kernel::fs::scanner::build_tree_recursive; -use crate::services::bridge::BridgeService; -use crate::services::bridge::defs::RuntimeDefinition; -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Serialize, Deserialize)] -pub struct DiscoveryResponse { - pub summary: String, - pub recommendations: Vec, -} - -pub struct DiscoveryEngine { - project_root: PathBuf, -} - -impl DiscoveryEngine { - pub fn new(root: &Path) -> Self { - Self { - project_root: root.to_path_buf(), - } - } - - /// Orquesta el escaneo, consulta a la IA y devuelve las definiciones dinámicas. - pub async fn discover_recommendations_for_workspace(&self, bridge: &BridgeService) -> Result { - // 1. Obtener el filetree (Contexto) - let tree = build_tree_recursive(self.project_root.clone(), self.project_root.clone()).await?; - let tree_json = serde_json::to_string(&tree).map_err(|e| e.to_string())?; - - // 2. Obtener lo que ya está instalado/configurado - let installed = bridge.load_runtime_configs(); - let installed_json = serde_json::to_string(&installed).map_err(|e| e.to_string())?; - - // 3. Prompt para la IA especificando el formato RuntimeDefinition - let prompt = format!( - "Analiza este workspace y sugiere configuraciones de herramientas (LSP o MCP). - - WORKSPACE: - {} - - YA CONFIGURADO: - {} - - Responde ÚNICAMENTE con un JSON que cumpla esta estructura: - {{ - \"summary\": \"Breve explicación de qué detectaste\", - \"recommendations\": [ - {{ - \"id\": \"string-unico\", - \"capability\": \"Lsp\" | \"Mcp\", - \"name\": \"Nombre Herramienta\", - \"command\": \"ejecutable\", - \"args\": [\"--arg\"], - \"strategy\": {{ \"type\": \"Lsp\" | \"Line\" | \"Raw\" }} - }} - ] - }}", - tree_json, installed_json - ); - - // 4. Pedir recomendación a la IA - let ai_response = bridge.ask_ai(&prompt).await?; - - // 5. Parsear y devolver al frontend - let result: DiscoveryResponse = serde_json::from_str(&ai_response) - .map_err(|e| format!("Error parseando recomendación de IA: {}", e))?; - - Ok(result) - } -} \ No newline at end of file diff --git a/src-tauri/src/features/core_features/workspace_discovery/mod.rs b/src-tauri/src/features/core_features/workspace_discovery/mod.rs deleted file mode 100644 index bb70cdb..0000000 --- a/src-tauri/src/features/core_features/workspace_discovery/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod discovery; \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/ai/default/mod.rs b/src-tauri/src/features/extensible_features/ai/default/mod.rs deleted file mode 100644 index 6d089cb..0000000 --- a/src-tauri/src/features/extensible_features/ai/default/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod ollama_small_ai; \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/ai/default/ollama_small_ai.rs b/src-tauri/src/features/extensible_features/ai/default/ollama_small_ai.rs deleted file mode 100644 index 45819f0..0000000 --- a/src-tauri/src/features/extensible_features/ai/default/ollama_small_ai.rs +++ /dev/null @@ -1,105 +0,0 @@ -// TODO Algo asi - -// use async_trait::async_trait; -// use reqwest::Client; -// use serde_json::json; - -// use async_trait::async_trait; -// use std::process::Command; - -// use serde::{Deserialize, Serialize}; -// use crate::infrastructure::transport::codec::CodecStrategy; - -// #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Hash)] -// pub enum CapabilityType { Lsp, Mcp } - -// #[derive(Debug, Serialize, Deserialize, Clone)] -// pub struct RuntimeDefinition { -// pub id: String, -// pub capability: CapabilityType, -// pub name: String, -// pub command: String, -// pub args: Vec, -// pub strategy: CodecStrategy, -// } - -// #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Hash)] -// pub enum ProviderType { Vcs, Ai } - -// #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Hash)] -// pub enum AiDriver { -// Anthropic, -// Ollama, -// GoogleAI, -// } - -// #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Hash)] -// pub enum VcsDriver { -// Github, -// Gitlab, -// GitLocal, -// GitBucket, -// } - -// #[derive(Debug, Serialize, Deserialize, Clone)] -// pub struct VcsCapabilities { -// pub can_pull_request: bool, -// pub is_cloud: bool, -// } - -// #[derive(Debug, Serialize, Deserialize, sqlx::Type)] -// pub enum GitAction { -// Commit, -// PullRequest, -// Other -// } - -// #[derive(Debug, Serialize, Deserialize, Clone)] -// pub struct ProviderConfig { -// pub id: String, -// pub r#type: ProviderType, -// pub ai_driver: Option, -// pub vcs_driver: Option, -// pub token: String, -// pub endpoint: Option, -// pub settings: serde_json::Value, -// } - - -// /// Contrato fundamental para proveedores de Inteligencia Artificial. -// /// Define la estructura que cualquier driver debe implementar. -// #[async_trait] -// pub trait AiProvider: Send + Sync { -// /// Crea una nueva instancia del driver con su configuración. -// fn new(config: ProviderConfig) -> Self where Self: Sized; -// /// Ejecuta una solicitud de completado de texto. -// async fn completion(&self, prompt: &str) -> Result; -// } - -// pub struct OllamaProvider { -// config: ProviderConfig, -// client: Client, -// } - -// #[async_trait] -// impl AiProvider for OllamaProvider { -// fn new(config: ProviderConfig) -> Self { -// Self { config, client: Client::new() } -// } - -// async fn completion(&self, prompt: &str) -> Result { -// let url = self.config.endpoint.as_deref().unwrap_or("http://localhost:11434/api/generate"); -// let model = self.config.settings["model"].as_str().unwrap_or("llama3"); - -// let body = json!({ "model": model, "prompt": prompt, "stream": false }); - -// let res = self.client.post(url) -// .json(&body) -// .send().await.map_err(|e| e.to_string())?; - -// let data: serde_json::Value = res.json().await.map_err(|e| e.to_string())?; -// data["response"].as_str() -// .map(|s| s.to_string()) -// .ok_or_else(|| "Ollama no devolvió 'response'".into()) -// } -// } \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/ai/internal_logic/chat_persistence.rs b/src-tauri/src/features/extensible_features/ai/internal_logic/chat_persistence.rs deleted file mode 100644 index ce6baab..0000000 --- a/src-tauri/src/features/extensible_features/ai/internal_logic/chat_persistence.rs +++ /dev/null @@ -1,2 +0,0 @@ -// TODO usar el chat history repo para persistir cada peticion a la IA -// y el thought repo para persistir sus respuestas y acciones \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/ai/internal_logic/context_builder.rs b/src-tauri/src/features/extensible_features/ai/internal_logic/context_builder.rs deleted file mode 100644 index 8639886..0000000 --- a/src-tauri/src/features/extensible_features/ai/internal_logic/context_builder.rs +++ /dev/null @@ -1,10 +0,0 @@ -// Aqui se obtiene el contexto para inyectar, se obtiene el current file y su path si hay -// Se revisa: -// - Folder Structure -// Se revisa si hay: -// - Current File (para tareas especificas) -// - Readme (Para descripcion del proyecto, objetivo, etc, tambien posiblemente el stack) -// - Rules (Para saber stack, convenciones de formato, estilo, etc) -// - Skills -// - Artifacts -// - Documentation \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/ai/internal_logic/dev_workflow/mod.rs b/src-tauri/src/features/extensible_features/ai/internal_logic/dev_workflow/mod.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/features/extensible_features/ai/internal_logic/mod.rs b/src-tauri/src/features/extensible_features/ai/internal_logic/mod.rs deleted file mode 100644 index ca11ce1..0000000 --- a/src-tauri/src/features/extensible_features/ai/internal_logic/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod persistence; \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/ai/internal_logic/thinking_persistence.rs b/src-tauri/src/features/extensible_features/ai/internal_logic/thinking_persistence.rs deleted file mode 100644 index b857b12..0000000 --- a/src-tauri/src/features/extensible_features/ai/internal_logic/thinking_persistence.rs +++ /dev/null @@ -1 +0,0 @@ -// Aqui por cada peticion, accion, o etc se agregaran thought nodes para construir el thinking graph \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/ai/mod.rs b/src-tauri/src/features/extensible_features/ai/mod.rs deleted file mode 100644 index b272f7e..0000000 --- a/src-tauri/src/features/extensible_features/ai/mod.rs +++ /dev/null @@ -1,20 +0,0 @@ -pub mod default; -pub mod internal_logic; - -pub mod ai_events { - pub const ON_GENERATE: &str = "ai.onGenerate"; - pub const PROVIDE_CONTEXT: &str = "ai.provideContext"; -} - -// El proceso debe ser -// 1. LLega una request hacia la IA -// 2. Si es de un chat persiste el chat, si no, ignora ese paso -// 3. Construye el contexto para inyectar al modelo -// 4. Envia el request al modelo (Extensible) -// 5. Persiste los pensamientos -// 6. Devuelve la respuesta - -// Debe permitir multi agent, multi tenant, multi thread - -// TODO Aqui hay que implementar todo lo relacionado con el chat, el thinking graph -// (como un registro de pensamientos), la pantalla de manejo de contexto y uso y manejo de skills. \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/artifacts/default/flow_diagram_artifact.rs b/src-tauri/src/features/extensible_features/artifacts/default/flow_diagram_artifact.rs deleted file mode 100644 index 275365f..0000000 --- a/src-tauri/src/features/extensible_features/artifacts/default/flow_diagram_artifact.rs +++ /dev/null @@ -1,2 +0,0 @@ -// Permite generar, editar, exportar y consultar diagramas de flujo. -// Extensible mediante extensiones para permitir otros tipos de diagramas y otros formatos de exportacion \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/artifacts/default/mod.rs b/src-tauri/src/features/extensible_features/artifacts/default/mod.rs deleted file mode 100644 index 54e2876..0000000 --- a/src-tauri/src/features/extensible_features/artifacts/default/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod flow_diagram_artifact; \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/artifacts/internal_logic/artifact_persistence.rs b/src-tauri/src/features/extensible_features/artifacts/internal_logic/artifact_persistence.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/features/extensible_features/artifacts/internal_logic/metadata_persistence.rs b/src-tauri/src/features/extensible_features/artifacts/internal_logic/metadata_persistence.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/features/extensible_features/artifacts/internal_logic/mod.rs b/src-tauri/src/features/extensible_features/artifacts/internal_logic/mod.rs deleted file mode 100644 index bdc968e..0000000 --- a/src-tauri/src/features/extensible_features/artifacts/internal_logic/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod artifacts_persistence; -pub mod metadata_persistence; \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/artifacts/mod.rs b/src-tauri/src/features/extensible_features/artifacts/mod.rs deleted file mode 100644 index b430028..0000000 --- a/src-tauri/src/features/extensible_features/artifacts/mod.rs +++ /dev/null @@ -1,14 +0,0 @@ -pub mod default; -pub mod internal_logic; - -// Desde aqui hay que poder manejar como generar, editar, exportar y consultar artifacts. -// Para planear, documentar, y auditar las futuras acciones de la IA o del User -// Las peticiones llegan a este file sin distinguir entre made by user o made by AI -// simplemente ejecuta la accion dependiendo de la extension más indicada -// si no hay, usa el default que es para manejar diagramas de flujo -// Al terminarlos, deben poder persistirse como file y con su metadata correctamente -// para que sirva de contexto al context builder de la IA - -pub mod artifacts_events { - -} \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/filesystem/default/io_filesystem.rs b/src-tauri/src/features/extensible_features/filesystem/default/io_filesystem.rs deleted file mode 100644 index f6b07a7..0000000 --- a/src-tauri/src/features/extensible_features/filesystem/default/io_filesystem.rs +++ /dev/null @@ -1,35 +0,0 @@ -use std::fs; -use std::path::Path; - -/// Operaciones puras de entrada/salida. -pub struct DefaultFileIO; - -impl DefaultFileIO { - pub fn read(path: &Path) -> Result { - fs::read_to_string(path).map_err(|e| e.to_string()) - } - - pub fn write(path: &Path, content: &str) -> Result<(), String> { - fs::write(path, content).map_err(|e| e.to_string()) - } - - pub fn delete(path: &Path) -> Result<(), String> { - if path.is_dir() { - fs::remove_dir_all(path).map_err(|e| e.to_string()) - } else { - fs::remove_file(path).map_err(|e| e.to_string()) - } - } - - pub fn rename(old: &Path, new: &Path) -> Result<(), String> { - fs::rename(old, new).map_err(|e| e.to_string()) - } - - pub fn create_dir(path: &Path) -> Result<(), String> { - fs::create_dir_all(path).map_err(|e| e.to_string()) - } - - pub fn exists(path: &Path) -> bool { - path.exists() - } -} \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/filesystem/default/mod.rs b/src-tauri/src/features/extensible_features/filesystem/default/mod.rs deleted file mode 100644 index cb7251b..0000000 --- a/src-tauri/src/features/extensible_features/filesystem/default/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod io_filesystem; \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/filesystem/internal_logic/mod.rs b/src-tauri/src/features/extensible_features/filesystem/internal_logic/mod.rs deleted file mode 100644 index 19b88fa..0000000 --- a/src-tauri/src/features/extensible_features/filesystem/internal_logic/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub mod search; -pub mod scanner; -pub mod watcher; -pub mod worker; \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/filesystem/internal_logic/scanner.rs b/src-tauri/src/features/extensible_features/filesystem/internal_logic/scanner.rs deleted file mode 100644 index 17fb8be..0000000 --- a/src-tauri/src/features/extensible_features/filesystem/internal_logic/scanner.rs +++ /dev/null @@ -1,121 +0,0 @@ -// scanner.rs -use std::fs; -use std::path::{Path, PathBuf}; -use futures::future::{BoxFuture, FutureExt}; -use ignore::gitignore::{Gitignore, GitignoreBuilder}; -use std::sync::Arc; -use serde::{Deserialize, Serialize}; - -/// Categoría de un nodo para definir su comportamiento en la interfaz y motor de búsqueda. -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)] -#[serde(rename_all = "lowercase")] -pub enum FileCategory { - /// Archivos de código fuente indexables. - Source, - /// Archivos o Carpetas con prefijo punto. - Hidden, - /// Archivos excluidos por reglas de Git. - Ignored, - /// Archivos de sistema o configuración interna de la aplicación. - System, -} - -/// Estructura jerárquica que representa una entrada en el sistema de archivos. -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct FileNode { - /// Nombre base del archivo o carpeta. - pub name: String, - /// Ruta absoluta en el sistema de archivos. - pub path: PathBuf, - /// Define si el nodo es una carpeta. - pub is_dir: bool, - /// Clasificación basada en reglas de filtrado. - pub category: FileCategory, - /// Lista de nodos hijos en caso de ser un directorio. - pub children: Option>, -} - -pub struct FileScanner { - pub categorizer: Arc, -} - -impl FileScanner { - pub fn new(project_root: &Path) -> Self { - Self { - categorizer: Arc::new(FileCategorizer::new(project_root)), - } - } - - pub async fn build_tree(self: Arc, path: PathBuf) -> Result, String> { - Self::build_tree_recursive(self.clone(), path).await - } - - /// Función asociada que usa Arc en lugar de &self para evitar problemas de lifetime - fn build_tree_recursive(scanner: Arc, path: PathBuf) -> BoxFuture<'static, Result, String>> { - async move { - let mut nodes = Vec::new(); - // Leemos el directorio de forma síncrona (fs::read_dir es bloqueante, - // pero aceptable en workers si no saturas el runtime) - let entries = fs::read_dir(&path).map_err(|e| e.to_string())?; - - for entry in entries.flatten() { - let entry_path = entry.path(); - let metadata = entry.metadata().map_err(|e| e.to_string())?; - let is_dir = metadata.is_dir(); - - // Usamos el categorizer a través del Arc - let category = scanner.categorizer.categorize(&entry_path, is_dir); - - let children = if is_dir { - // Clonamos el Arc del scanner para la siguiente iteración recursiva - Some(Self::build_tree_recursive(scanner.clone(), entry_path.clone()).await?) - } else { - None - }; - - nodes.push(FileNode { - name: entry_path.file_name().unwrap_or_default().to_string_lossy().to_string(), - path: entry_path, - is_dir, - category, - children, - }); - } - - nodes.sort_by(|a, b| b.is_dir.cmp(&a.is_dir).then_with(|| a.name.cmp(&b.name))); - Ok(nodes) - }.boxed() - } -} - -pub struct FileCategorizer { - gitignore: Option, - scanignore: Option, -} - -impl FileCategorizer { - pub fn new(project_root: &Path) -> Self { - let mut git_builder = GitignoreBuilder::new(project_root); - git_builder.add(project_root.join(".gitignore")); - let mut scan_builder = GitignoreBuilder::new(project_root); - scan_builder.add(project_root.join(".mod0/.scanignore")); - - Self { - gitignore: git_builder.build().ok(), - scanignore: scan_builder.build().ok(), - } - } - - pub fn categorize(&self, path: &Path, is_dir: bool) -> FileCategory { - if let Some(ref si) = self.scanignore { - if si.matched(path, is_dir).is_ignore() { return FileCategory::System; } - } - if let Some(ref gi) = self.gitignore { - if gi.matched(path, is_dir).is_ignore() { return FileCategory::Ignored; } - } - if path.file_name().map_or(false, |n| n.to_string_lossy().starts_with('.')) { - return FileCategory::Hidden; - } - FileCategory::Source - } -} \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/filesystem/internal_logic/search.rs b/src-tauri/src/features/extensible_features/filesystem/internal_logic/search.rs deleted file mode 100644 index cce5646..0000000 --- a/src-tauri/src/features/extensible_features/filesystem/internal_logic/search.rs +++ /dev/null @@ -1,30 +0,0 @@ -use std::path::PathBuf; - -use crate::persistence::{DbManager, models::intelligence::skill::Skill}; - -pub struct FileSearch; - -impl FileSearch { - pub async fn find_code(db: &DbManager, query: &str, project_path: &str) -> Result, String> { - let repo = db.repository(); - repo.search_code_in_project(query, project_path) - .await - .map(|paths| paths.into_iter().map(PathBuf::from).collect()) - .map_err(|e| e.to_string()) - } - - pub async fn find_filename(db: &DbManager, query: &str, project_path: &str) -> Result, String> { - let repo = db.repository(); - repo.search_filename(query, project_path) - .await - .map(|paths| paths.into_iter().map(PathBuf::from).collect()) - .map_err(|e| e.to_string()) - } - - pub async fn find_skills_by_tags(db: &DbManager, tags: Vec) -> Result, String> { - let repo = db.repository(); - repo.get_skills_by_tags(tags) - .await - .map_err(|e| e.to_string()) - } -} \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/filesystem/internal_logic/watcher.rs b/src-tauri/src/features/extensible_features/filesystem/internal_logic/watcher.rs deleted file mode 100644 index 585499e..0000000 --- a/src-tauri/src/features/extensible_features/filesystem/internal_logic/watcher.rs +++ /dev/null @@ -1,47 +0,0 @@ -use notify::{Watcher, RecursiveMode, EventKind}; -use std::path::PathBuf; -use tokio::sync::mpsc; -use super::worker::IndexingTask; -use tauri::{AppHandle, Emitter}; - -/// Observador de eventos del sistema de archivos con integración a Tauri. -pub struct FSWatcher { - watcher: notify::RecommendedWatcher, -} - -impl FSWatcher { - /// Inicializa el observador y configura el callback de eventos. - pub fn new(app_handle: AppHandle, index_tx: mpsc::Sender, project_path: PathBuf) -> Result { - let watcher = notify::recommended_watcher(move |res: notify::Result| { - if let Ok(event) = res { - let tx = index_tx.clone(); - let handle = app_handle.clone(); - let p_path = project_path.clone(); - - match event.kind { - EventKind::Modify(_) | EventKind::Create(_) => { - for path in event.paths { - if path.is_file() { - let _ = tx.try_send(IndexingTask::IndexFile { path: path.clone(), project_path: p_path.clone() }); - let _ = handle.emit("fs:changed", path); - } - } - } - EventKind::Remove(_) => { - for path in event.paths { - let _ = tx.try_send(IndexingTask::RemoveFile { path: path.clone(), project_path: p_path.clone() }); - let _ = handle.emit("fs:removed", path); - } - } - _ => {} - } - } - })?; - Ok(Self { watcher }) - } - - /// Comienza a observar un directorio de forma recursiva. - pub fn watch(&mut self, path: &PathBuf) -> Result<(), notify::Error> { - self.watcher.watch(path, RecursiveMode::Recursive) - } -} \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/filesystem/internal_logic/worker.rs b/src-tauri/src/features/extensible_features/filesystem/internal_logic/worker.rs deleted file mode 100644 index 6025d4c..0000000 --- a/src-tauri/src/features/extensible_features/filesystem/internal_logic/worker.rs +++ /dev/null @@ -1,61 +0,0 @@ -use tokio::sync::mpsc; -use std::path::{Path, PathBuf}; -use std::fs; -use ignore::WalkBuilder; -use crate::persistence::DbManager; -use super::scanner::{FileCategorizer, FileCategory}; - -/// Tareas procesables por el trabajador de segundo plano. -pub enum IndexingTask { - /// Indexar o actualizar un archivo específico. - IndexFile { path: PathBuf, project_path: PathBuf }, - /// Eliminar una entrada del índice. - RemoveFile { path: PathBuf, project_path: PathBuf }, - /// Realizar un escaneo completo de un directorio. - FullScan(PathBuf), -} - -/// Gestor de tareas de persistencia e indexación de búsqueda. -pub struct IndexingWorker; - -impl IndexingWorker { - /// Inicia el bucle de eventos del worker en un hilo asíncrono. - pub fn spawn(db: DbManager) -> mpsc::Sender { - let (tx, mut rx) = mpsc::channel::(500); - - tokio::spawn(async move { - while let Some(task) = rx.recv().await { - let repo = db.repository(); - match task { - IndexingTask::IndexFile { path, project_path } => { - let _ = Self::process_file(&path, &project_path, &repo).await; - } - IndexingTask::RemoveFile { path, project_path } => { - let _ = repo.delete_from_index(&path.to_string_lossy(), &project_path.to_string_lossy()).await; - } - IndexingTask::FullScan(root) => { - let categorizer = FileCategorizer::new(&root); - let walker = WalkBuilder::new(&root).hidden(false).build(); - for result in walker.flatten() { - let path = result.path(); - if path.is_file() { - let cat = categorizer.categorize(path, false); - if matches!(cat, FileCategory::Source | FileCategory::Hidden) { - let _ = Self::process_file(path, &root, &repo).await; - } - } - } - } - } - } - }); - tx - } - - async fn process_file(path: &Path, project_root: &Path, repo: &crate::persistence::Repository<'_>) -> Result<(), String> { - let content = fs::read_to_string(path).map_err(|e| e.to_string())?; - repo.index_file(&path.to_string_lossy(), &project_root.to_string_lossy(), &content) - .await - .map_err(|e| e.to_string()) - } -} \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/filesystem/mod.rs b/src-tauri/src/features/extensible_features/filesystem/mod.rs deleted file mode 100644 index 6ff444a..0000000 --- a/src-tauri/src/features/extensible_features/filesystem/mod.rs +++ /dev/null @@ -1,138 +0,0 @@ -pub mod default; -pub mod internal_logic; - -use std::{path::PathBuf, sync::Arc}; -use tokio::sync::mpsc; -use default::io_filesystem::DefaultFileIO; - -use internal_logic::{ - worker::IndexingTask, - search::FileSearch, - scanner::{FileScanner, FileNode} -}; -use crate::persistence::database::{DbManager, models::skill::Skill}; - -pub mod filesystem_events { - pub const ON_WILL_SAVE: &str = "fs.onWillSave"; - pub const ON_DID_SAVE: &str = "fs.onDidSave"; - pub const ON_DID_CREATE: &str = "fs.onDidCreate"; - pub const ON_DID_DELETE: &str = "fs.onDidDelete"; -} - -pub struct FileSystem { - task_tx: mpsc::Sender, - db: DbManager, - scanner: Arc, -} - -// TODO implementarlo de forma que para cada accion busque si hay extensiones activas que contribuyan a ellas. -// De haber varias, debe buscar la de mayor prioridad, y delegarle la tarea, pero sincronizando de -// igual los `shared behaviors` - -// Algo como: - -// use std::path::PathBuf; -// use std::sync::Arc; -// use crate::infrastructure::events; -// use crate::infrastructure::extensions::ExtensionHost; -// use crate::infrastructure::filesystem::io::FileIO; -// use serde_json::json; - -// pub struct FileSystemDispatcher { -// extension_host: Arc, -// // Otros como indexer, watcher... -// } - -// impl FileSystemDispatcher { -// pub async fn save_file(&self, path: PathBuf, mut content: String) -> Result<(), String> { -// // 1. EVENTO "WILL_SAVE": Las extensiones pueden modificar el contenido (ej. Prettier) -// let payload = json!({ "path": path, "content": content }); -// if let Ok(modified_content) = self.extension_host -// .dispatch_with_result(events::fs::ON_WILL_SAVE, payload).await { -// if let Some(new_text) = modified_content.as_str() { -// content = new_text.to_string(); -// } -// } - -// // 2. FALLBACK LOCAL: Guardar en el disco -// FileIO::write(&path, &content)?; - -// // 3. EVENTO "DID_SAVE": Notificar (ej. para disparar un Linter o Build automático) -// let _ = self.extension_host.dispatch(events::fs::ON_DID_SAVE, json!({ "path": path })).await; - -// Ok(()) -// } - -// pub fn read_file(&self, path: PathBuf) -> Result { -// FileIO::read(&path) -// } -// } - -impl FileSystem { - pub fn new(task_tx: mpsc::Sender, db: DbManager, scanner: Arc) -> Self { - Self { task_tx, db, scanner } - } - - pub fn save_file(&self, path: PathBuf, project_path: PathBuf, content: String) -> Result<(), String> { - DefaultFileIO::write(&path, &content)?; - let _ = self.task_tx.try_send(IndexingTask::IndexFile { path, project_path }); - Ok(()) - } - - pub fn create_file(&self, path: PathBuf, project_path: PathBuf) -> Result<(), String> { - DefaultFileIO::write(&path, "")?; - let _ = self.task_tx.try_send(IndexingTask::IndexFile { path, project_path }); - Ok(()) - } - - pub fn create_directory(&self, path: PathBuf) -> Result<(), String> { - DefaultFileIO::create_dir(&path) - } - - pub fn delete_item(&self, path: PathBuf, project_path: PathBuf) -> Result<(), String> { - DefaultFileIO::delete(&path)?; - let _ = self.task_tx.try_send(IndexingTask::RemoveFile { path, project_path }); - Ok(()) - } - - pub fn rename_item(&self, old: PathBuf, new: PathBuf, project_path: PathBuf) -> Result<(), String> { - DefaultFileIO::rename(&old, &new)?; - let _ = self.task_tx.try_send(IndexingTask::RemoveFile { path: old, project_path: project_path.clone() }); - - if new.is_dir() { - let _ = self.task_tx.try_send(IndexingTask::FullScan(new)); - } else { - let _ = self.task_tx.try_send(IndexingTask::IndexFile { path: new, project_path }); - } - Ok(()) - } - - pub fn read_file(&self, path: PathBuf) -> Result { - DefaultFileIO::read(&path) - } - - pub fn exists(&self, path: PathBuf) -> bool { - DefaultFileIO::exists(&path) - } - - pub async fn get_tree(&self, root: PathBuf) -> Result, String> { - self.scanner.clone().build_tree(root).await - } - - pub async fn search_code(&self, query: &str, project_path: &str) -> Result, String> { - FileSearch::find_code(&self.db, query, project_path).await - } - - pub async fn search_filename(&self, query: &str, project_path: &str) -> Result, String> { - FileSearch::find_filename(&self.db, query, project_path).await - } - - pub async fn search_skills(&self, tags: Vec) -> Result, String> { - FileSearch::find_skills_by_tags(&self.db, tags).await - } - - pub fn sync_all(&self, project_path: PathBuf) -> Result<(), String> { - self.task_tx.try_send(IndexingTask::FullScan(project_path)) - .map_err(|e| e.to_string()) - } -} \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/ghost_runner/default/mod.rs b/src-tauri/src/features/extensible_features/ghost_runner/default/mod.rs deleted file mode 100644 index 9a10e17..0000000 --- a/src-tauri/src/features/extensible_features/ghost_runner/default/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod temporal_workspace_ghost_runner; \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/ghost_runner/default/termporal_workspace_ghost_runner.rs b/src-tauri/src/features/extensible_features/ghost_runner/default/termporal_workspace_ghost_runner.rs deleted file mode 100644 index 2d40e6c..0000000 --- a/src-tauri/src/features/extensible_features/ghost_runner/default/termporal_workspace_ghost_runner.rs +++ /dev/null @@ -1 +0,0 @@ -// Ghost runner que crea un workspace temporal para correr los tests ahi \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/ghost_runner/internal_logic/mod.rs b/src-tauri/src/features/extensible_features/ghost_runner/internal_logic/mod.rs deleted file mode 100644 index ca11ce1..0000000 --- a/src-tauri/src/features/extensible_features/ghost_runner/internal_logic/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod persistence; \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/ghost_runner/internal_logic/persistence.rs b/src-tauri/src/features/extensible_features/ghost_runner/internal_logic/persistence.rs deleted file mode 100644 index afe08a2..0000000 --- a/src-tauri/src/features/extensible_features/ghost_runner/internal_logic/persistence.rs +++ /dev/null @@ -1,2 +0,0 @@ -// Persistir temporalmente los resultados del analisis terminado -// para comparaciones entre runs \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/ghost_runner/mod.rs b/src-tauri/src/features/extensible_features/ghost_runner/mod.rs deleted file mode 100644 index 310b2e0..0000000 --- a/src-tauri/src/features/extensible_features/ghost_runner/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -pub mod default; -pub mod internal_logic; - -pub mod ghost_runner_events { - -} \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/mod.rs b/src-tauri/src/features/extensible_features/mod.rs deleted file mode 100644 index 0fb6d10..0000000 --- a/src-tauri/src/features/extensible_features/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -pub mod ai; -pub mod artifacts; -pub mod filesystem; -pub mod ghost_runner; -pub mod tasks; -pub mod terminal; -pub mod vcs; \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/tasks/mod.rs b/src-tauri/src/features/extensible_features/tasks/mod.rs deleted file mode 100644 index 6dc9b24..0000000 --- a/src-tauri/src/features/extensible_features/tasks/mod.rs +++ /dev/null @@ -1,12 +0,0 @@ -// Tasks: -// La IA debe poder generar backlogs a partir de lo hablado en el chat y lo planeado en artifacts -// Los backlogs deben ser editables y aprobados por el usuario antes de comenzar a ejecutarse -// De tener tareas de bajo acoplamiento (con poca relacion) y ser factible la division de dominios -// debe poder usar `branches` o `worktrees`` dependiendo de: -// - La dificultad -// - El acoplamiento de los files relacionados -// - Los planes hechos en chat y artifacts -// Estas divisiones son para multitasking, de forma que el backlog se pueda dividir en sub backlogs -// Uno por cada agent session, ya este trabajando en un branch o un worktree -// Si el backlog no es muy largo o dificil, o por el contrario, las tareas tienen demasiada relacion -// Se debe sacrificar el multitasking para dedicar todos los recursos a un avance lineal en las tasks \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/terminal/default/mod.rs b/src-tauri/src/features/extensible_features/terminal/default/mod.rs deleted file mode 100644 index b2ee9a4..0000000 --- a/src-tauri/src/features/extensible_features/terminal/default/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod pty_terminal; \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/terminal/default/pty_terminal.rs b/src-tauri/src/features/extensible_features/terminal/default/pty_terminal.rs deleted file mode 100644 index e933a66..0000000 --- a/src-tauri/src/features/extensible_features/terminal/default/pty_terminal.rs +++ /dev/null @@ -1,76 +0,0 @@ -use portable_pty::{native_pty_system, CommandBuilder, PtySize, MasterPty}; -use std::io::{Read, Write}; -use std::thread; -use std::sync::{Arc, Mutex}; -use std::collections::VecDeque; -use std::path::PathBuf; -use tauri::{AppHandle, Emitter}; -use crate::features::dispatchers::terminal::TerminalOutput; - -const MAX_BUFFER_CHARS: usize = 20000; - -pub struct PtyInstance { - master: Box, - writer: Box, - output_buffer: Arc>>, - pub cwd: PathBuf, -} - -impl PtyInstance { - pub fn new(session_id: String, cwd: PathBuf, app_handle: AppHandle) -> Result { - let pty_system = native_pty_system(); - let pair = pty_system.openpty(PtySize { - rows: 24, cols: 80, pixel_width: 0, pixel_height: 0, - }).map_err(|e| e.to_string())?; - - let shell = if cfg!(windows) { "powershell.exe" } else { "bash" }; - let mut cmd = CommandBuilder::new(shell); - cmd.cwd(cwd.clone()); - - pair.slave.spawn_command(cmd).map_err(|e| e.to_string())?; - - let master = pair.master; - let writer = master.take_writer().map_err(|e| e.to_string())?; - let mut reader = master.try_clone_reader().map_err(|e| e.to_string())?; - let output_buffer = Arc::new(Mutex::new(VecDeque::with_capacity(MAX_BUFFER_CHARS))); - let output_buffer_clone = Arc::clone(&output_buffer); - - let sid = session_id.clone(); - - thread::spawn(move || { - let mut buffer = [0u8; 1024]; - while let Ok(n) = reader.read(&mut buffer) { - if n == 0 { break; } - let data = String::from_utf8_lossy(&buffer[..n]).to_string(); - - if let Ok(mut buf) = output_buffer_clone.lock() { - for c in data.chars() { - if buf.len() >= MAX_BUFFER_CHARS { buf.pop_front(); } - buf.push_back(c); - } - } - - let _ = app_handle.emit("terminal:stdout", TerminalOutput { - session_id: sid.clone(), - data, - }); - } - }); - - Ok(Self { master, writer, output_buffer, cwd }) - } - - pub fn read_buffer(&self) -> String { - self.output_buffer.lock().map(|buf| buf.iter().collect()).unwrap_or_default() - } - - pub fn write(&mut self, data: &str) -> Result<(), String> { - self.writer.write_all(data.as_bytes()).map_err(|e| e.to_string()) - } - - pub fn resize(&mut self, rows: u16, cols: u16) -> Result<(), String> { - self.master.resize(PtySize { - rows, cols, pixel_width: 0, pixel_height: 0, - }).map_err(|e| e.to_string()) - } -} \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/terminal/internal_logic/mod.rs b/src-tauri/src/features/extensible_features/terminal/internal_logic/mod.rs deleted file mode 100644 index ca11ce1..0000000 --- a/src-tauri/src/features/extensible_features/terminal/internal_logic/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod persistence; \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/terminal/internal_logic/persistence.rs b/src-tauri/src/features/extensible_features/terminal/internal_logic/persistence.rs deleted file mode 100644 index df81c6e..0000000 --- a/src-tauri/src/features/extensible_features/terminal/internal_logic/persistence.rs +++ /dev/null @@ -1,52 +0,0 @@ -use regex::Regex; -use lazy_static::lazy_static; -use crate::persistence::{DbManager, models::kernel::terminal_history::TerminalHistory}; - -lazy_static! { - static ref ANSI_ESCAPE: Regex = Regex::new(r"[\u001b\u009b][\[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]").unwrap(); -} - -pub struct TerminalPersistence; - -impl TerminalPersistence { - pub async fn log_command( - db: DbManager, - session_id: String, - project_path: String, - data: String - ) { - let clean_cmd = ANSI_ESCAPE.replace_all(&data, "").trim().to_string(); - if !clean_cmd.is_empty() { - let repo = db.repository(); - let _ = repo.add_terminal_entry( - &project_path, - &session_id, - &clean_cmd, - None - ).await; - } - } - - pub async fn get_history( - db: DbManager, - session_id: String, - ) -> Result, String> { - db.repository() - .get_session_terminal(&session_id) - .await - .map_err(|e| e.to_string()) - } - - pub async fn clear_history( - db: DbManager, - session_id: String, - ) -> Result<(), String> { - let repo = db.repository(); - - repo.clear_terminal_history(&session_id) - .await - .map_err(|e| e.to_string())?; - - Ok(()) - } -} \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/terminal/mod.rs b/src-tauri/src/features/extensible_features/terminal/mod.rs deleted file mode 100644 index 0ba2c5a..0000000 --- a/src-tauri/src/features/extensible_features/terminal/mod.rs +++ /dev/null @@ -1,125 +0,0 @@ -pub mod default; -pub mod internal_logic; - -use std::sync::Arc; -use tokio::sync::Mutex; -use dashmap::DashMap; -use tauri::{AppHandle}; -use std::path::PathBuf; -use default::pty_terminal::PtyInstance; -use internal_logic::persistence::TerminalPersistence; -use crate::persistence::in_file::{DbManager, models::kernel::terminal_history::TerminalHistory}; - -pub mod terminal_events { - pub const ON_DATA: &str = "term.onData"; - pub const ON_COMMAND_EXECUTED: &str = "term.onCommandExecuted"; -} - -// TODO implementarlo de forma que para cada accion busque si hay extensiones activas que contribuyan a ellas. -// De haber varias, debe buscar la de mayor prioridad, y delegarle la tarea, pero sincronizando de -// igual los `shared behaviors` - -// Algo como: - -// use std::sync::Arc; -// use crate::infrastructure::events; -// use crate::infrastructure::terminal::TerminalManager; -// use crate::infrastructure::extensions::ExtensionHost; -// use serde_json::json; - -// pub struct TerminalDispatcher { -// local_manager: Arc, -// extension_host: Arc, -// } - -// impl TerminalDispatcher { -// pub async fn execute(&self, session_id: &str, command: &str) -> Result<(), String> { -// // 1. Notificar a las extensiones que un comando va a ejecutarse -// // Esto permite a una extensión de IA explicar el comando si falla -// let _ = self.extension_host.dispatch( -// events::terminal::ON_DATA, -// json!({ "session_id": session_id, "command": command }) -// ).await; - -// // 2. Ejecución local (PTY) -// self.local_manager.write_and_log(session_id, command).await?; - -// Ok(()) -// } -// } - -pub struct TerminalManager { - sessions: Arc>>>, - app_handle: AppHandle, - db: DbManager -} - -impl TerminalManager { - pub fn new(app_handle: AppHandle, db: DbManager) -> Self { - Self { - sessions: Arc::new(DashMap::new()), - app_handle, - db - } - } - - pub async fn create_session(&self, id: String, cwd: PathBuf) -> Result<(), String> { - let instance = PtyInstance::new(id.clone(), cwd, self.app_handle.clone())?; - self.sessions.insert(id, Arc::new(Mutex::new(instance))); - Ok(()) - } - - pub async fn write_and_log(&self, id: &str, data: &str) -> Result<(), String> { - let cwd = self.write(id, data).await?; - - let db_clone = self.db.clone(); - let id_clone = id.to_string(); - let data_clone = data.to_string(); - let cwd_str = cwd.to_string_lossy().to_string(); - - tokio::spawn(async move { - TerminalPersistence::log_command( - db_clone, - id_clone, - cwd_str, - data_clone - ).await; - }); - - Ok(()) - } - - async fn write(&self, id: &str, data: &str) -> Result { - if let Some(instance_arc) = self.sessions.get(id) { - let mut instance = instance_arc.lock().await; - instance.write(data)?; - Ok(instance.cwd.clone()) // Retornamos el CWD para que el command sepa dónde loguear - } else { - Err("Sesión no encontrada".into()) - } - } - - pub async fn resize(&self, id: &str, rows: u16, cols: u16) -> Result<(), String> { - if let Some(instance_arc) = self.sessions.get(id) { - instance_arc.lock().await.resize(rows, cols) - } else { - Err("Sesión no encontrada".into()) - } - } - - pub async fn get_capture(&self, id: &str) -> Result { - if let Some(instance_arc) = self.sessions.get(id) { - Ok(instance_arc.lock().await.read_buffer()) - } else { - Err("Sesión no encontrada".into()) - } - } - - pub async fn get_history(&self, session_id: &str) -> Result, String> { - TerminalPersistence::get_history(self.db.clone(), session_id.to_string()).await - } - - pub async fn clear_history(&self, session_id: &str) -> Result<(), String> { - TerminalPersistence::clear_history(self.db.clone(), session_id.to_string()).await - } -} \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/vcs/default/local_git_vcs.rs b/src-tauri/src/features/extensible_features/vcs/default/local_git_vcs.rs deleted file mode 100644 index e80c616..0000000 --- a/src-tauri/src/features/extensible_features/vcs/default/local_git_vcs.rs +++ /dev/null @@ -1,122 +0,0 @@ -// TODO Algo asi - -// use async_trait::async_trait; -// use std::process::Command; - -// use serde::{Deserialize, Serialize}; -// use crate::infrastructure::transport::codec::CodecStrategy; - -// #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Hash)] -// pub enum CapabilityType { Lsp, Mcp } - -// #[derive(Debug, Serialize, Deserialize, Clone)] -// pub struct RuntimeDefinition { -// pub id: String, -// pub capability: CapabilityType, -// pub name: String, -// pub command: String, -// pub args: Vec, -// pub strategy: CodecStrategy, -// } - -// #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Hash)] -// pub enum ProviderType { Vcs, Ai } - -// #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Hash)] -// pub enum AiDriver { -// Anthropic, -// Ollama, -// GoogleAI, -// } - -// #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Hash)] -// pub enum VcsDriver { -// Github, -// Gitlab, -// GitLocal, -// GitBucket, -// } - -// #[derive(Debug, Serialize, Deserialize, Clone)] -// pub struct VcsCapabilities { -// pub can_pull_request: bool, -// pub is_cloud: bool, -// } - -// #[derive(Debug, Serialize, Deserialize, sqlx::Type)] -// pub enum GitAction { -// Commit, -// PullRequest, -// Other -// } - -// #[derive(Debug, Serialize, Deserialize, Clone)] -// pub struct ProviderConfig { -// pub id: String, -// pub r#type: ProviderType, -// pub ai_driver: Option, -// pub vcs_driver: Option, -// pub token: String, -// pub endpoint: Option, -// pub settings: serde_json::Value, -// } - - -// /// Contrato fundamental para sistemas de control de versiones. -// #[async_trait] -// pub trait VcsProvider: Send + Sync { -// fn new(config: ProviderConfig) -> Self where Self: Sized; - -// /// Información sobre qué puede hacer este driver -// fn capabilities(&self) -> VcsCapabilities; - -// /// Método de salud para verificar si el token/config es válido antes de usarlo -// async fn check_health(&self) -> bool; - -// /// Ejecuta un comando git. -// async fn execute(&self, args: &[&str], path: &str) -> Result; - -// /// Crear un Pull Request (opcional, validado por capabilities) -// async fn create_pr(&self, title: &str, head: &str, base: &str) -> Result; -// } - -// pub struct LocalGitProvider { -// _config: ProviderConfig, -// } - -// #[async_trait] -// impl VcsProvider for LocalGitProvider { -// fn new(config: ProviderConfig) -> Self { -// Self { _config: config } -// } - -// fn capabilities(&self) -> VcsCapabilities { -// VcsCapabilities { -// can_pull_request: false, -// is_cloud: false, -// } -// } - -// async fn execute(&self, args: &[&str], path: &str) -> Result { -// let output = Command::new("git") -// .current_dir(path) -// .args(args) -// .output() -// .map_err(|e| e.to_string())?; - -// if output.status.success() { -// Ok(String::from_utf8_lossy(&output.stdout).to_string()) -// } else { -// Err(String::from_utf8_lossy(&output.stderr).to_string()) -// } -// } - -// async fn create_pr(&self, _: &str, _: &str, _: &str) -> Result { -// Err("Git Local no soporta Pull Requests.".into()) -// } - -// async fn check_health(&self) -> bool { -// // Verifica si git está instalado -// Command::new("git").arg("--version").status().is_ok() -// } -// } \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/vcs/default/mod.rs b/src-tauri/src/features/extensible_features/vcs/default/mod.rs deleted file mode 100644 index 570e715..0000000 --- a/src-tauri/src/features/extensible_features/vcs/default/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod local_git_vcs; \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/vcs/internal_logic/mod.rs b/src-tauri/src/features/extensible_features/vcs/internal_logic/mod.rs deleted file mode 100644 index 82b2b02..0000000 --- a/src-tauri/src/features/extensible_features/vcs/internal_logic/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod watcher; \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/vcs/internal_logic/watcher.rs b/src-tauri/src/features/extensible_features/vcs/internal_logic/watcher.rs deleted file mode 100644 index 402e867..0000000 --- a/src-tauri/src/features/extensible_features/vcs/internal_logic/watcher.rs +++ /dev/null @@ -1,4 +0,0 @@ -// TODO Al igual que el watcher del fs que por defecto detecta -// cada acción en los archivos, este detecta cada accion en el repo -// para que la IA en todo momento tenga el contexto del workspace -// más actualizado posible \ No newline at end of file diff --git a/src-tauri/src/features/extensible_features/vcs/mod.rs b/src-tauri/src/features/extensible_features/vcs/mod.rs deleted file mode 100644 index ca5bd0d..0000000 --- a/src-tauri/src/features/extensible_features/vcs/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -pub mod default; -pub mod internal_logic; - -pub mod vcs_events { - pub const COMMIT: &str = "vcs.commit"; - pub const ON_COMMIT: &str = "vcs.onCommit"; -} \ No newline at end of file diff --git a/src-tauri/src/features/git/mod.rs b/src-tauri/src/features/git/mod.rs new file mode 100644 index 0000000..b3594eb --- /dev/null +++ b/src-tauri/src/features/git/mod.rs @@ -0,0 +1,225 @@ +use std::collections::BTreeMap; +use std::fs; +use std::path::{Path, PathBuf}; + +use serde::Serialize; + +use crate::core::error::{AppError, AppResult}; +use crate::infrastructure::process::run; + +/// Se invoca el binario `git` del sistema: es lo que ya usa el usuario, evita compilar +/// libgit2 y mantiene el mismo comportamiento que su terminal. +fn git(cwd: &Path, args: &[&str]) -> AppResult { + Ok(String::from_utf8_lossy(&run("git", cwd, args)?).into_owned()) +} + +#[derive(Debug, Clone, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct ChangedFile { + pub path: String, + /// M modificado, A añadido, D borrado, U sin seguimiento. + pub status: String, + pub additions: u32, + pub deletions: u32, +} + +#[derive(Debug, Clone, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct FilePair { + pub path: String, + pub status: String, + pub original: String, + pub modified: String, +} + +pub fn is_repo(cwd: &Path) -> bool { + git(cwd, &["rev-parse", "--is-inside-work-tree"]) + .map(|out| out.trim() == "true") + .unwrap_or(false) +} + +pub fn head_sha(cwd: &Path) -> Option { + git(cwd, &["rev-parse", "HEAD"]) + .ok() + .map(|out| out.trim().to_string()) + .filter(|s| !s.is_empty()) +} + +pub fn current_branch(cwd: &Path) -> Option { + git(cwd, &["rev-parse", "--abbrev-ref", "HEAD"]) + .ok() + .map(|out| out.trim().to_string()) + .filter(|branch| !branch.is_empty() && branch != "HEAD") +} + +/// Cambios del directorio de trabajo respecto a `base` (por defecto `HEAD`), incluyendo +/// los archivos nuevos sin seguimiento. +pub fn changes(cwd: &Path, base: Option<&str>) -> AppResult> { + let base = base.unwrap_or("HEAD"); + let mut files: BTreeMap = BTreeMap::new(); + + // Sin commits o con una base inválida el diff falla: se ignora y solo se listan los nuevos. + if let Ok(raw) = git(cwd, &["diff", "--name-status", "--no-renames", "-z", base]) { + let mut tokens = raw.split('\0').filter(|t| !t.is_empty()); + while let (Some(status), Some(path)) = (tokens.next(), tokens.next()) { + let path = path.replace('\\', "/"); + files.insert( + path.clone(), + ChangedFile { + path, + status: status.chars().take(1).collect(), + additions: 0, + deletions: 0, + }, + ); + } + } + + if let Ok(raw) = git(cwd, &["diff", "--numstat", "--no-renames", "-z", base]) { + for record in raw.split('\0').filter(|r| !r.is_empty()) { + let mut cols = record.splitn(3, '\t'); + let (Some(added), Some(deleted), Some(path)) = (cols.next(), cols.next(), cols.next()) else { + continue; + }; + if let Some(file) = files.get_mut(&path.replace('\\', "/")) { + file.additions = added.parse().unwrap_or(0); + file.deletions = deleted.parse().unwrap_or(0); + } + } + } + + if let Ok(raw) = git(cwd, &["ls-files", "--others", "--exclude-standard", "-z"]) { + for path in raw.split('\0').filter(|p| !p.is_empty()) { + let path = path.replace('\\', "/"); + let additions = count_lines(&cwd.join(&path)); + files.insert( + path.clone(), + ChangedFile { + path, + status: "U".into(), + additions, + deletions: 0, + }, + ); + } + } + + Ok(files.into_values().collect()) +} + +fn count_lines(path: &Path) -> u32 { + match fs::metadata(path) { + Ok(meta) if meta.is_file() && meta.len() < 1_000_000 => fs::read(path) + .map(|bytes| bytes.iter().filter(|b| **b == b'\n').count() as u32 + 1) + .unwrap_or(0), + _ => 0, + } +} + +/// Contenido original (en `base`) y actual de un archivo para mostrar el diff. +pub fn file_pair(cwd: &Path, base: Option<&str>, path: &str, status: &str) -> AppResult { + let base = base.unwrap_or("HEAD"); + let spec = format!("{base}:{}", path.replace('\\', "/")); + + let original = match status { + "A" | "U" => String::new(), + _ => git(cwd, &["show", &spec]).unwrap_or_default(), + }; + let modified = match status { + "D" => String::new(), + _ => fs::read(cwd.join(path)) + .map(|b| String::from_utf8_lossy(&b).into_owned()) + .unwrap_or_default(), + }; + + Ok(FilePair { + path: path.to_string(), + status: status.to_string(), + original, + modified, + }) +} + +/// Confirma todos los cambios y devuelve el hash corto del nuevo commit. +pub fn commit_all(cwd: &Path, message: &str) -> AppResult { + if message.trim().is_empty() { + return Err(AppError::msg("el mensaje del commit no puede estar vacío")); + } + git(cwd, &["add", "-A"])?; + git(cwd, &["commit", "-m", message])?; + Ok(git(cwd, &["rev-parse", "--short", "HEAD"])?.trim().to_string()) +} + +pub fn slugify(name: &str) -> String { + let mut slug = String::new(); + for ch in name.to_lowercase().chars() { + if ch.is_ascii_alphanumeric() { + slug.push(ch); + } else if !slug.ends_with('-') && !slug.is_empty() { + slug.push('-'); + } + } + let slug = slug.trim_matches('-').to_string(); + if slug.is_empty() { + "sesion".to_string() + } else { + slug.chars().take(40).collect() + } +} + +/// Crea un worktree hermano del proyecto y devuelve su ruta. +pub fn worktree_add(project: &Path, slug: &str, branch: &str) -> AppResult { + if !is_repo(project) { + return Err(AppError::Git("el proyecto no es un repositorio git".into())); + } + + let name = project.file_name().and_then(|n| n.to_str()).unwrap_or("proyecto"); + let parent = project + .parent() + .ok_or_else(|| AppError::msg("el proyecto no tiene carpeta padre"))?; + + let mut path = parent.join(format!("{name}-{slug}")); + let mut n = 2; + while path.exists() { + path = parent.join(format!("{name}-{slug}-{n}")); + n += 1; + } + + let path_str = path.to_string_lossy().into_owned(); + let exists = git( + project, + &[ + "rev-parse", + "--verify", + "--quiet", + &format!("refs/heads/{branch}"), + ], + ) + .is_ok(); + + if exists { + git(project, &["worktree", "add", &path_str, branch])?; + } else { + git(project, &["worktree", "add", "-b", branch, &path_str])?; + } + Ok(path) +} + +pub fn worktree_remove(project: &Path, path: &Path) -> AppResult<()> { + git( + project, + &["worktree", "remove", "--force", &path.to_string_lossy()], + )?; + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn slugs_are_safe_for_paths_and_branches() { + assert_eq!(slugify("Refactor: Auth/JWT!!"), "refactor-auth-jwt"); + assert_eq!(slugify(" "), "sesion"); + } +} diff --git a/src-tauri/src/features/kanban/mod.rs b/src-tauri/src/features/kanban/mod.rs new file mode 100644 index 0000000..ad3fab8 --- /dev/null +++ b/src-tauri/src/features/kanban/mod.rs @@ -0,0 +1,16 @@ +use serde_json::Value; + +use crate::core::error::AppResult; +use crate::core::state::Paths; +use crate::infrastructure::storage; + +/// El tablero se guarda por proyecto. La forma del JSON la define el frontend +/// (`kanban-types.ts`); el backend solo lo persiste de forma atómica. +pub fn load(paths: &Paths, project: &str) -> AppResult { + let file = paths.board_file(&storage::stable_key(project)); + Ok(storage::read_json(&file)?.unwrap_or(Value::Null)) +} + +pub fn save(paths: &Paths, project: &str, board: &Value) -> AppResult<()> { + storage::write_json_atomic(&paths.board_file(&storage::stable_key(project)), board) +} diff --git a/src-tauri/src/features/mod.rs b/src-tauri/src/features/mod.rs index 04da58d..50d0204 100644 --- a/src-tauri/src/features/mod.rs +++ b/src-tauri/src/features/mod.rs @@ -1,2 +1,7 @@ -pub mod core_features; -pub mod extensible_features; \ No newline at end of file +pub mod git; +pub mod kanban; +pub mod notifications; +pub mod observer; +pub mod sessions; +pub mod terminal; +pub mod workspace; diff --git a/src-tauri/src/features/notifications/mod.rs b/src-tauri/src/features/notifications/mod.rs new file mode 100644 index 0000000..b68667f --- /dev/null +++ b/src-tauri/src/features/notifications/mod.rs @@ -0,0 +1,208 @@ +use std::sync::Arc; +use std::thread; +use std::time::Duration; + +use serde::{Deserialize, Serialize}; +use tauri::{AppHandle, Manager}; +use tauri_plugin_notification::NotificationExt; + +use crate::config::ConfigStore; + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase", default)] +pub struct WebhookConfig { + pub enabled: bool, + /// Admite `{title}`, `{message}`, `{session}`, `{status}` y sus variantes `_url` (codificada). + pub url: String, + /// `GET` o `POST`. + pub method: String, + /// Cuerpo del POST. Admite también `{title_json}` y `{message_json}`. + pub body: String, + pub content_type: String, +} + +impl Default for WebhookConfig { + fn default() -> Self { + Self { + enabled: false, + url: String::new(), + method: "POST".into(), + body: "{message}".into(), + content_type: "text/plain; charset=utf-8".into(), + } + } +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase", default)] +pub struct NotificationConfig { + pub desktop: bool, + pub only_when_unfocused: bool, + pub on_needs_you: bool, + pub on_session_done: bool, + pub on_all_idle: bool, + pub webhook: WebhookConfig, +} + +impl Default for NotificationConfig { + fn default() -> Self { + Self { + desktop: true, + only_when_unfocused: true, + on_needs_you: true, + on_session_done: false, + on_all_idle: true, + webhook: WebhookConfig::default(), + } + } +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum NotifyKind { + NeedsYou, + SessionDone, + AllIdle, + Test, +} + +/// Envía avisos por escritorio y por webhook (ntfy, Telegram, WhatsApp vía CallMeBot, etc.). +#[derive(Clone)] +pub struct Notifier { + app: AppHandle, + config: Arc, +} + +impl Notifier { + pub fn new(app: AppHandle, config: Arc) -> Self { + Self { app, config } + } + + pub fn send(&self, kind: NotifyKind, title: &str, message: &str, session: &str, status: &str) { + let config = self.config.get().notifications; + let enabled = match kind { + NotifyKind::NeedsYou => config.on_needs_you, + NotifyKind::SessionDone => config.on_session_done, + NotifyKind::AllIdle => config.on_all_idle, + NotifyKind::Test => true, + }; + if !enabled { + return; + } + + let focused = self + .app + .get_webview_window("main") + .and_then(|window| window.is_focused().ok()) + .unwrap_or(false); + + if config.desktop && (kind == NotifyKind::Test || !(config.only_when_unfocused && focused)) { + let _ = self + .app + .notification() + .builder() + .title(title) + .body(message) + .show(); + } + + if config.webhook.enabled && !config.webhook.url.trim().is_empty() { + let vars = Vars { + title: title.to_string(), + message: message.to_string(), + session: session.to_string(), + status: status.to_string(), + }; + let webhook = config.webhook.clone(); + thread::spawn(move || { + if let Err(error) = deliver(&webhook, &vars) { + eprintln!("[mod0] webhook falló: {error}"); + } + }); + } + } +} + +struct Vars { + title: String, + message: String, + session: String, + status: String, +} + +fn deliver(webhook: &WebhookConfig, vars: &Vars) -> Result<(), String> { + let url = fill(&webhook.url, vars); + let agent: ureq::Agent = ureq::Agent::config_builder() + .timeout_global(Some(Duration::from_secs(10))) + .build() + .into(); + + if webhook.method.eq_ignore_ascii_case("GET") { + agent.get(&url).call().map_err(|e| e.to_string())?; + } else { + agent + .post(&url) + .content_type(webhook.content_type.as_str()) + .send(fill(&webhook.body, vars)) + .map_err(|e| e.to_string())?; + } + Ok(()) +} + +/// Sustituye los marcadores de una plantilla. +fn fill(template: &str, vars: &Vars) -> String { + let pairs = [ + ("title", vars.title.as_str()), + ("message", vars.message.as_str()), + ("session", vars.session.as_str()), + ("status", vars.status.as_str()), + ]; + + let mut out = template.to_string(); + for (key, value) in pairs { + out = out + .replace(&format!("{{{key}_url}}"), &percent_encode(value)) + .replace(&format!("{{{key}_json}}"), &json_escape(value)) + .replace(&format!("{{{key}}}"), value); + } + out +} + +fn percent_encode(value: &str) -> String { + let mut out = String::with_capacity(value.len()); + for byte in value.bytes() { + match byte { + b'A'..=b'Z' | b'a'..=b'z' | b'0'..=b'9' | b'-' | b'_' | b'.' | b'~' => out.push(byte as char), + _ => out.push_str(&format!("%{byte:02X}")), + } + } + out +} + +fn json_escape(value: &str) -> String { + let quoted = serde_json::Value::String(value.to_string()).to_string(); + quoted[1..quoted.len() - 1].to_string() +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn fills_plain_url_and_json_variants() { + let vars = Vars { + title: "Listo".into(), + message: "a \"b\" c".into(), + session: "api".into(), + status: "review".into(), + }; + assert_eq!( + fill("https://x/?t={message_url}", &vars), + "https://x/?t=a%20%22b%22%20c" + ); + assert_eq!( + fill("{\"m\":\"{message_json}\"}", &vars), + "{\"m\":\"a \\\"b\\\" c\"}" + ); + assert_eq!(fill("{session}:{status}", &vars), "api:review"); + } +} diff --git a/src-tauri/src/features/observer/graph.rs b/src-tauri/src/features/observer/graph.rs new file mode 100644 index 0000000..370aa0c --- /dev/null +++ b/src-tauri/src/features/observer/graph.rs @@ -0,0 +1,365 @@ +use std::collections::HashMap; + +use serde::{Deserialize, Serialize}; +use serde_json::Value; + +/// Máximo de nodos que se conservan por sesión (se recortan los turnos más antiguos). +const MAX_NODES: usize = 1200; + +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "snake_case")] +pub enum NodeKind { + Prompt, + Tool, + Notice, + Stop, +} + +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "snake_case")] +pub enum NodeStatus { + Running, + Ok, + Error, +} + +/// Un paso del razonamiento de la IA: el prompt, una herramienta usada, un aviso o el cierre del turno. +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ThoughtNode { + pub id: String, + pub turn: u32, + pub seq: u32, + pub kind: NodeKind, + /// read | write | exec | search | web | agent | plan | think | other + pub family: String, + pub tool: Option, + pub label: String, + pub detail: Option, + /// Lo que la IA dijo antes de usar la herramienta (el "por qué"). + pub intent: Option, + pub target: Option, + pub status: NodeStatus, + pub parent: Option, + pub ts: i64, + pub duration_ms: Option, +} + +/// Descripción legible de una llamada a herramienta. +#[derive(Debug, Clone, PartialEq)] +pub struct ToolInfo { + pub family: &'static str, + pub label: String, + pub target: Option, + pub detail: Option, +} + +pub fn truncate(text: &str, max: usize) -> String { + let clean = text.trim(); + if clean.chars().count() <= max { + return clean.to_string(); + } + let mut cut: String = clean.chars().take(max.saturating_sub(1)).collect(); + cut.push('…'); + cut +} + +pub fn basename(path: &str) -> &str { + path.rsplit(['/', '\\']) + .find(|part| !part.is_empty()) + .unwrap_or(path) +} + +fn str_field<'a>(input: &'a Value, keys: &[&str]) -> Option<&'a str> { + keys.iter() + .find_map(|key| input.get(*key).and_then(Value::as_str)) +} + +/// Traduce una llamada a herramienta de la CLI en una etiqueta corta + el archivo objetivo. +pub fn describe_tool(tool: &str, input: &Value) -> ToolInfo { + let file = str_field(input, &["file_path", "notebook_path", "path"]); + + match tool { + "Read" | "NotebookRead" => ToolInfo { + family: "read", + label: format!("Leer {}", file.map(basename).unwrap_or("archivo")), + target: file.map(String::from), + detail: None, + }, + "Edit" | "MultiEdit" | "Write" | "NotebookEdit" => ToolInfo { + family: "write", + label: format!( + "{} {}", + if tool == "Write" { "Crear" } else { "Editar" }, + file.map(basename).unwrap_or("archivo") + ), + target: file.map(String::from), + detail: None, + }, + "Bash" | "BashOutput" | "KillShell" => { + let command = str_field(input, &["command"]).unwrap_or(tool); + ToolInfo { + family: "exec", + label: truncate(command.lines().next().unwrap_or(command), 70), + target: None, + detail: Some(truncate(command, 2000)), + } + } + "Grep" | "Glob" => { + let pattern = str_field(input, &["pattern"]).unwrap_or(""); + ToolInfo { + family: "search", + label: format!("{tool} {}", truncate(pattern, 50)), + target: str_field(input, &["path"]).map(String::from), + detail: Some(pattern.to_string()), + } + } + "WebFetch" | "WebSearch" => { + let what = str_field(input, &["url", "query"]).unwrap_or(""); + ToolInfo { + family: "web", + label: truncate(what, 70), + target: None, + detail: Some(what.to_string()), + } + } + "Task" | "Agent" => { + let description = str_field(input, &["description", "prompt"]).unwrap_or("subagente"); + ToolInfo { + family: "agent", + label: format!("Subagente: {}", truncate(description, 50)), + target: None, + detail: str_field(input, &["prompt"]).map(|p| truncate(p, 2000)), + } + } + "TodoWrite" | "ExitPlanMode" => ToolInfo { + family: "plan", + label: "Plan".to_string(), + target: None, + detail: None, + }, + other => ToolInfo { + family: "other", + label: other.trim_start_matches("mcp__").replace("__", " · "), + target: file.map(String::from), + detail: None, + }, + } +} + +/// Construye el thinking graph de una sesión a partir de los eventos de la CLI. +/// +/// Regla de aristas: cada nodo nuevo cuelga de la última "cola completada". Las llamadas +/// paralelas comparten padre, así que se dibujan como ramas hermanas. +#[derive(Debug, Default)] +pub struct GraphBuilder { + nodes: Vec, + turn: u32, + seq: u32, + tail: Option, + pending_intents: HashMap, +} + +impl GraphBuilder { + pub fn from_nodes(nodes: Vec) -> Self { + let turn = nodes.iter().map(|n| n.turn).max().unwrap_or(0); + let seq = nodes.iter().map(|n| n.seq).max().unwrap_or(0); + let tail = nodes.last().map(|n| n.id.clone()); + Self { + nodes, + turn, + seq, + tail, + pending_intents: HashMap::new(), + } + } + + pub fn nodes(&self) -> &[ThoughtNode] { + &self.nodes + } + + pub fn begin_turn(&mut self, prompt: &str, ts: i64) -> ThoughtNode { + self.turn += 1; + self.tail = None; + let node = self.node(format!("p{}", self.turn), NodeKind::Prompt, "think", "Prompt", ts); + let node = ThoughtNode { + detail: Some(truncate(prompt, 2000)), + label: truncate(prompt, 80), + ..node + }; + self.push(node, true) + } + + pub fn tool_start( + &mut self, + tool_use_id: Option<&str>, + tool: &str, + input: &Value, + ts: i64, + ) -> ThoughtNode { + let info = describe_tool(tool, input); + let id = tool_use_id + .map(String::from) + .unwrap_or_else(|| format!("t{}", self.seq + 1)); + let intent = self.pending_intents.remove(&id); + + let node = ThoughtNode { + tool: Some(tool.to_string()), + target: info.target, + detail: info.detail, + intent, + status: NodeStatus::Running, + ..self.node(id, NodeKind::Tool, info.family, &info.label, ts) + }; + self.push(node, false) + } + + /// Marca la herramienta como terminada. Devuelve `None` si el nodo no existe. + pub fn tool_end(&mut self, tool_use_id: Option<&str>, ts: i64) -> Option { + let index = match tool_use_id { + Some(id) => self.nodes.iter().rposition(|n| n.id == id), + None => self + .nodes + .iter() + .rposition(|n| n.kind == NodeKind::Tool && n.status == NodeStatus::Running), + }?; + + let node = &mut self.nodes[index]; + if node.status == NodeStatus::Running { + node.status = NodeStatus::Ok; + node.duration_ms = Some((ts - node.ts).max(0)); + } + self.tail = Some(node.id.clone()); + Some(node.clone()) + } + + /// Marca una herramienta como fallida (se descubre al leer el transcript). + pub fn mark_error(&mut self, tool_use_id: &str) -> Option { + let node = self.nodes.iter_mut().rev().find(|n| n.id == tool_use_id)?; + if node.status == NodeStatus::Error { + return None; + } + node.status = NodeStatus::Error; + Some(node.clone()) + } + + /// Asocia el "por qué" a una herramienta. Si el nodo aún no existe, se guarda para después. + pub fn set_intent(&mut self, tool_use_id: &str, text: &str) -> Option { + let text = truncate(text, 600); + match self.nodes.iter_mut().rev().find(|n| n.id == tool_use_id) { + Some(node) if node.intent.as_deref() != Some(text.as_str()) => { + node.intent = Some(text); + Some(node.clone()) + } + Some(_) => None, + None => { + self.pending_intents.insert(tool_use_id.to_string(), text); + None + } + } + } + + pub fn notice(&mut self, text: &str, ts: i64) -> ThoughtNode { + let id = format!("n{}", self.seq + 1); + let node = ThoughtNode { + detail: Some(truncate(text, 600)), + status: NodeStatus::Ok, + ..self.node(id, NodeKind::Notice, "other", &truncate(text, 80), ts) + }; + self.push(node, true) + } + + pub fn stop(&mut self, message: Option<&str>, ts: i64) -> ThoughtNode { + let node = ThoughtNode { + detail: message.map(|m| truncate(m, 2000)), + status: NodeStatus::Ok, + ..self.node(format!("s{}", self.turn), NodeKind::Stop, "think", "Listo", ts) + }; + self.push(node, true) + } + + fn node(&mut self, id: String, kind: NodeKind, family: &str, label: &str, ts: i64) -> ThoughtNode { + self.seq += 1; + ThoughtNode { + id, + turn: self.turn, + seq: self.seq, + kind, + family: family.to_string(), + tool: None, + label: label.to_string(), + detail: None, + intent: None, + target: None, + status: NodeStatus::Ok, + parent: self.tail.clone(), + ts, + duration_ms: None, + } + } + + fn push(&mut self, node: ThoughtNode, completes: bool) -> ThoughtNode { + if completes { + self.tail = Some(node.id.clone()); + } + self.nodes.push(node.clone()); + + if self.nodes.len() > MAX_NODES { + // Descarta el turno más antiguo completo para no dejar aristas rotas. + let oldest = self.nodes[0].turn; + self.nodes.retain(|n| n.turn != oldest); + } + node + } +} + +#[cfg(test)] +mod tests { + use serde_json::json; + + use super::*; + + #[test] + fn describes_common_tools() { + let read = describe_tool("Read", &json!({ "file_path": "C:\\proj\\src\\main.rs" })); + assert_eq!(read.family, "read"); + assert_eq!(read.label, "Leer main.rs"); + + let bash = describe_tool("Bash", &json!({ "command": "npm test\n--watch" })); + assert_eq!(bash.family, "exec"); + assert_eq!(bash.label, "npm test"); + } + + #[test] + fn parallel_tools_share_a_parent() { + let mut graph = GraphBuilder::default(); + let prompt = graph.begin_turn("arregla el bug", 1); + let a = graph.tool_start(Some("a"), "Read", &json!({ "file_path": "/x/a.ts" }), 2); + let b = graph.tool_start(Some("b"), "Read", &json!({ "file_path": "/x/b.ts" }), 2); + assert_eq!(a.parent.as_deref(), Some(prompt.id.as_str())); + assert_eq!(b.parent, a.parent); + + graph.tool_end(Some("a"), 5); + let edit = graph.tool_start(Some("c"), "Edit", &json!({ "file_path": "/x/a.ts" }), 6); + assert_eq!(edit.parent.as_deref(), Some("a")); + } + + #[test] + fn intent_can_arrive_before_the_node() { + let mut graph = GraphBuilder::default(); + graph.begin_turn("hola", 1); + assert!(graph.set_intent("t1", "Voy a leer el archivo").is_none()); + let node = graph.tool_start(Some("t1"), "Read", &json!({ "file_path": "/x/a.ts" }), 2); + assert_eq!(node.intent.as_deref(), Some("Voy a leer el archivo")); + } + + #[test] + fn errors_are_reported_once() { + let mut graph = GraphBuilder::default(); + graph.begin_turn("hola", 1); + graph.tool_start(Some("t1"), "Bash", &json!({ "command": "false" }), 2); + graph.tool_end(Some("t1"), 3); + assert!(graph.mark_error("t1").is_some()); + assert!(graph.mark_error("t1").is_none()); + } +} diff --git a/src-tauri/src/features/observer/hook_server.rs b/src-tauri/src/features/observer/hook_server.rs new file mode 100644 index 0000000..810da03 --- /dev/null +++ b/src-tauri/src/features/observer/hook_server.rs @@ -0,0 +1,75 @@ +use std::io::Read; +use std::sync::Arc; +use std::thread; + +use serde_json::Value; +use tiny_http::{Header, Response, Server}; + +use crate::core::error::{AppError, AppResult}; +use crate::features::sessions::manager::SessionManager; + +/// Límite de tamaño de un evento (PostToolUse puede incluir contenido de archivos). +const MAX_BODY_BYTES: u64 = 8 * 1024 * 1024; + +#[derive(Debug, Clone)] +pub struct HookInfo { + pub port: u16, + pub token: String, +} + +impl HookInfo { + pub fn url_for(&self, session_id: &str) -> String { + format!( + "http://127.0.0.1:{}/hook/{}/{}", + self.port, session_id, self.token + ) + } +} + +/// Servidor HTTP local (solo 127.0.0.1) que recibe los hooks de Claude Code. +/// Responde de inmediato `{}` para no frenar a la CLI y procesa el evento después. +pub fn start(sessions: Arc) -> AppResult { + let server = Server::http("127.0.0.1:0").map_err(|e| AppError::msg(format!("hook server: {e}")))?; + let port = server + .server_addr() + .to_ip() + .map(|addr| addr.port()) + .ok_or_else(|| AppError::msg("hook server sin dirección IP"))?; + let info = HookInfo { + port, + token: uuid::Uuid::new_v4().simple().to_string(), + }; + + let token = info.token.clone(); + thread::Builder::new().name("mod0-hooks".into()).spawn(move || { + for request in server.incoming_requests() { + let (sessions, token) = (sessions.clone(), token.clone()); + thread::spawn(move || handle(request, &sessions, &token)); + } + })?; + + Ok(info) +} + +fn handle(mut request: tiny_http::Request, sessions: &Arc, token: &str) { + let url = request.url().to_string(); + let parts: Vec<&str> = url.trim_start_matches('/').split('/').collect(); + let authorized = parts.len() == 3 && parts[0] == "hook" && parts[2] == token; + + let mut body = String::new(); + if authorized { + let _ = request.as_reader().take(MAX_BODY_BYTES).read_to_string(&mut body); + } + + let header = Header::from_bytes(&b"Content-Type"[..], &b"application/json"[..]).expect("static header"); + let response = Response::from_string("{}") + .with_status_code(if authorized { 200 } else { 403 }) + .with_header(header); + let _ = request.respond(response); + + if authorized { + if let Ok(payload) = serde_json::from_str::(&body) { + sessions.on_hook(parts[1], payload); + } + } +} diff --git a/src-tauri/src/features/observer/hooks_settings.rs b/src-tauri/src/features/observer/hooks_settings.rs new file mode 100644 index 0000000..9c8ad06 --- /dev/null +++ b/src-tauri/src/features/observer/hooks_settings.rs @@ -0,0 +1,49 @@ +use std::path::Path; + +use serde_json::{Value, json}; + +use crate::core::error::AppResult; +use crate::infrastructure::storage; + +/// Eventos estables de Claude Code que MOD0 observa. Se evitan eventos recientes para que +/// versiones antiguas de la CLI no rechacen el archivo de configuración. +const OBSERVED_EVENTS: [&str; 9] = [ + "SessionStart", + "SessionEnd", + "UserPromptSubmit", + "PreToolUse", + "PostToolUse", + "Notification", + "Stop", + "SubagentStop", + "PreCompact", +]; + +/// Settings adicionales (`claude --settings `) con hooks HTTP hacia MOD0. +/// Se combinan con los hooks propios del usuario en vez de reemplazarlos. +pub fn render(url: &str) -> Value { + let handler = json!([{ "hooks": [{ "type": "http", "url": url, "timeout": 5 }] }]); + let hooks: serde_json::Map = OBSERVED_EVENTS + .iter() + .map(|event| ((*event).to_string(), handler.clone())) + .collect(); + + json!({ "hooks": hooks }) +} + +pub fn write(path: &Path, url: &str) -> AppResult<()> { + storage::write_json_atomic(path, &render(url)) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn registers_every_observed_event_with_an_http_hook() { + let settings = render("http://127.0.0.1:1/hook/a/b"); + let hooks = settings["hooks"].as_object().unwrap(); + assert_eq!(hooks.len(), OBSERVED_EVENTS.len()); + assert_eq!(hooks["Stop"][0]["hooks"][0]["type"], "http"); + } +} diff --git a/src-tauri/src/features/observer/mod.rs b/src-tauri/src/features/observer/mod.rs new file mode 100644 index 0000000..dd5a87c --- /dev/null +++ b/src-tauri/src/features/observer/mod.rs @@ -0,0 +1,4 @@ +pub mod graph; +pub mod hook_server; +pub mod hooks_settings; +pub mod transcript; diff --git a/src-tauri/src/features/observer/transcript.rs b/src-tauri/src/features/observer/transcript.rs new file mode 100644 index 0000000..bec49f2 --- /dev/null +++ b/src-tauri/src/features/observer/transcript.rs @@ -0,0 +1,215 @@ +use std::collections::{HashMap, VecDeque}; +use std::fs::File; +use std::io::{Read, Seek, SeekFrom}; +use std::path::Path; + +use serde_json::Value; + +/// Cuántos mensajes recientes se recuerdan para asociar texto con herramientas. +const REMEMBERED_MESSAGES: usize = 64; + +/// Lo nuevo que apareció en el transcript desde la última lectura. +#[derive(Debug, Default, PartialEq)] +pub struct TranscriptUpdate { + /// `(tool_use_id, texto previo)`: lo que la IA dijo justo antes de llamar la herramienta. + pub intents: Vec<(String, String)>, + /// `tool_use_id` de herramientas que terminaron con error. + pub errors: Vec, + pub context_tokens: Option, + pub model: Option, +} + +/// Lector incremental del transcript JSONL que escribe Claude Code. Es de solo lectura y +/// no consume tokens: únicamente lee los bytes nuevos añadidos al archivo. +#[derive(Debug, Default)] +pub struct TranscriptCursor { + offset: u64, + texts: HashMap, + order: VecDeque, +} + +impl TranscriptCursor { + pub fn poll(&mut self, path: &Path) -> TranscriptUpdate { + let mut update = TranscriptUpdate::default(); + + let Ok(mut file) = File::open(path) else { + return update; + }; + let length = file.metadata().map(|m| m.len()).unwrap_or(0); + + // Si el archivo se truncó o rotó, vuelve a empezar. + if length < self.offset { + self.offset = 0; + } + if length == self.offset || file.seek(SeekFrom::Start(self.offset)).is_err() { + return update; + } + + let mut bytes = Vec::new(); + if file.read_to_end(&mut bytes).is_err() { + return update; + } + + // Solo se consumen líneas completas; el resto se relee en la próxima lectura. + let Some(last_newline) = bytes.iter().rposition(|b| *b == b'\n') else { + return update; + }; + self.offset += (last_newline + 1) as u64; + + for line in String::from_utf8_lossy(&bytes[..last_newline]).lines() { + if let Ok(value) = serde_json::from_str::(line) { + self.parse_line(&value, &mut update); + } + } + update + } + + fn parse_line(&mut self, line: &Value, update: &mut TranscriptUpdate) { + // Los subagentes (sidechain) tienen su propio contexto; no mezclarlos. + if line.get("isSidechain").and_then(Value::as_bool).unwrap_or(false) { + return; + } + + match line.get("type").and_then(Value::as_str) { + Some("assistant") => self.parse_assistant(line, update), + Some("user") => parse_user(line, update), + _ => {} + } + } + + fn parse_assistant(&mut self, line: &Value, update: &mut TranscriptUpdate) { + let Some(message) = line.get("message") else { + return; + }; + let message_id = message + .get("id") + .and_then(Value::as_str) + .unwrap_or("-") + .to_string(); + + if let Some(model) = message.get("model").and_then(Value::as_str) { + if !model.starts_with('<') { + update.model = Some(model.to_string()); + } + } + + if let Some(usage) = message.get("usage") { + let read = |key: &str| usage.get(key).and_then(Value::as_u64).unwrap_or(0); + let total = + read("input_tokens") + read("cache_read_input_tokens") + read("cache_creation_input_tokens"); + if total > 0 { + update.context_tokens = Some(total); + } + } + + let Some(blocks) = message.get("content").and_then(Value::as_array) else { + return; + }; + + for block in blocks { + match block.get("type").and_then(Value::as_str) { + Some("text") => { + let text = block.get("text").and_then(Value::as_str).unwrap_or("").trim(); + if !text.is_empty() { + self.remember(&message_id, text); + } + } + Some("tool_use") => { + let id = block.get("id").and_then(Value::as_str); + if let (Some(id), Some(text)) = (id, self.texts.get(&message_id)) { + update.intents.push((id.to_string(), text.clone())); + } + } + _ => {} + } + } + } + + fn remember(&mut self, message_id: &str, text: &str) { + if !self.texts.contains_key(message_id) { + self.order.push_back(message_id.to_string()); + if self.order.len() > REMEMBERED_MESSAGES { + if let Some(old) = self.order.pop_front() { + self.texts.remove(&old); + } + } + } + self.texts.insert(message_id.to_string(), text.to_string()); + } +} + +fn parse_user(line: &Value, update: &mut TranscriptUpdate) { + let Some(blocks) = line.pointer("/message/content").and_then(Value::as_array) else { + return; + }; + + for block in blocks { + let is_result = block.get("type").and_then(Value::as_str) == Some("tool_result"); + let is_error = block.get("is_error").and_then(Value::as_bool).unwrap_or(false); + + if is_result && is_error { + if let Some(id) = block.get("tool_use_id").and_then(Value::as_str) { + update.errors.push(id.to_string()); + } + } + } +} + +#[cfg(test)] +mod tests { + use std::io::Write; + + use super::*; + + #[test] + fn reads_intents_usage_and_errors_incrementally() { + let dir = std::env::temp_dir().join(format!("mod0-test-{}", std::process::id())); + std::fs::create_dir_all(&dir).unwrap(); + let path = dir.join("t.jsonl"); + + let mut file = File::create(&path).unwrap(); + writeln!( + file, + r#"{{"type":"assistant","message":{{"id":"m1","model":"claude-x","usage":{{"input_tokens":10,"cache_read_input_tokens":90,"cache_creation_input_tokens":5}},"content":[{{"type":"text","text":"Voy a leer el archivo"}}]}}}}"# + ) + .unwrap(); + writeln!( + file, + r#"{{"type":"assistant","message":{{"id":"m1","content":[{{"type":"tool_use","id":"tool1","name":"Read","input":{{}}}}]}}}}"# + ) + .unwrap(); + writeln!( + file, + r#"{{"type":"user","message":{{"content":[{{"type":"tool_result","tool_use_id":"tool1","is_error":true,"content":"x"}}]}}}}"# + ) + .unwrap(); + write!(file, r#"{{"type":"assistant","message":{{"id":"m2""#).unwrap(); + file.flush().unwrap(); + + let mut cursor = TranscriptCursor::default(); + let update = cursor.poll(&path); + assert_eq!( + update.intents, + vec![("tool1".to_string(), "Voy a leer el archivo".to_string())] + ); + assert_eq!(update.errors, vec!["tool1".to_string()]); + assert_eq!(update.context_tokens, Some(105)); + assert_eq!(update.model.as_deref(), Some("claude-x")); + + // La línea incompleta se conserva hasta que llegue su salto de línea. + assert_eq!(cursor.poll(&path), TranscriptUpdate::default()); + std::fs::remove_dir_all(&dir).ok(); + } + + #[test] + fn sidechain_lines_are_ignored() { + let mut cursor = TranscriptCursor::default(); + let mut update = TranscriptUpdate::default(); + let line: Value = serde_json::from_str( + r#"{"type":"assistant","isSidechain":true,"message":{"id":"x","usage":{"input_tokens":999}}}"#, + ) + .unwrap(); + cursor.parse_line(&line, &mut update); + assert_eq!(update, TranscriptUpdate::default()); + } +} diff --git a/src-tauri/src/features/sessions/launcher.rs b/src-tauri/src/features/sessions/launcher.rs new file mode 100644 index 0000000..3d30e3d --- /dev/null +++ b/src-tauri/src/features/sessions/launcher.rs @@ -0,0 +1,302 @@ +use std::path::{Path, PathBuf}; + +use crate::config::AppConfig; +use crate::core::error::{AppError, AppResult}; +use crate::features::sessions::model::Session; +use crate::features::sessions::profile::CliProfile; +use crate::features::terminal::pty::PtySpec; + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum ShellKind { + Posix, + PowerShell, + Cmd, +} + +/// Qué proceso abrir en el PTY y qué texto escribirle para arrancar la CLI. +pub struct LaunchPlan { + pub spec: PtySpec, + pub input: String, +} + +pub struct LaunchInput<'a> { + pub session: &'a Session, + pub profile: &'a CliProfile, + pub config: &'a AppConfig, + pub hook_url: Option, + pub settings_file: Option, + pub resume: bool, + pub prompt: Option<&'a str>, +} + +fn kind_of(program: &str) -> ShellKind { + let name = program + .rsplit(['/', '\\']) + .next() + .unwrap_or(program) + .to_lowercase(); + if name.contains("pwsh") || name.contains("powershell") { + ShellKind::PowerShell + } else if name.starts_with("cmd") { + ShellKind::Cmd + } else { + ShellKind::Posix + } +} + +fn default_args(kind: ShellKind) -> Vec { + match kind { + ShellKind::PowerShell => vec!["-NoLogo".into()], + ShellKind::Cmd => Vec::new(), + ShellKind::Posix => vec!["-l".into()], + } +} + +/// Ubica un ejecutable como lo haría la shell: ruta directa o búsqueda en `PATH` (con `PATHEXT` en Windows). +pub fn find_executable(command: &str) -> Option { + let command = command.trim(); + if command.is_empty() { + return None; + } + + let direct = Path::new(command); + if direct.components().count() > 1 { + return direct.is_file().then(|| direct.to_path_buf()); + } + + let extensions: Vec = if cfg!(windows) { + std::env::var("PATHEXT") + .unwrap_or_else(|_| ".COM;.EXE;.BAT;.CMD".into()) + .split(';') + .filter(|ext| !ext.is_empty()) + .map(str::to_lowercase) + .collect() + } else { + Vec::new() + }; + + std::env::split_paths(&std::env::var_os("PATH")?).find_map(|dir| { + let plain = dir.join(command); + if plain.is_file() { + return Some(plain); + } + extensions + .iter() + .find_map(|ext| Some(dir.join(format!("{command}{ext}"))).filter(|path| path.is_file())) + }) +} + +fn in_path(executable: &str) -> bool { + find_executable(executable).is_some() +} + +/// Elige la shell: la del usuario si la configuró; PowerShell 7 o 5 en Windows; `$SHELL` en el resto. +pub fn detect_shell(config: &AppConfig) -> (String, ShellKind, Vec) { + if let Some(custom) = config.shell.as_ref().map(|s| s.trim()).filter(|s| !s.is_empty()) { + let kind = kind_of(custom); + return (custom.to_string(), kind, default_args(kind)); + } + + if cfg!(windows) { + let program = if in_path("pwsh.exe") { + "pwsh.exe" + } else { + "powershell.exe" + }; + return ( + program.to_string(), + ShellKind::PowerShell, + default_args(ShellKind::PowerShell), + ); + } + + let program = std::env::var("SHELL") + .ok() + .filter(|s| !s.is_empty()) + .unwrap_or_else(|| "/bin/bash".into()); + let kind = kind_of(&program); + (program, kind, default_args(kind)) +} + +/// Nombre de la variable de entorno del sistema a la que apunta un valor `$NOMBRE` o `${NOMBRE}`. +pub fn env_reference(value: &str) -> Option<&str> { + let name = value.trim().strip_prefix('$')?; + let name = name + .strip_prefix('{') + .and_then(|rest| rest.strip_suffix('}')) + .unwrap_or(name); + let valid = !name.is_empty() + && !name.starts_with(|c: char| c.is_ascii_digit()) + && name.chars().all(|c| c.is_ascii_alphanumeric() || c == '_'); + valid.then_some(name) +} + +/// Los valores `$NOMBRE` se leen de las variables de entorno del sistema al lanzar la sesión: así las claves +/// de API viven en el entorno del usuario y no en `config.json`. +fn resolve_env_value(value: &str) -> String { + match env_reference(value) { + Some(name) => std::env::var(name).unwrap_or_default(), + None => value.to_string(), + } +} + +fn needs_quotes(arg: &str) -> bool { + arg.is_empty() + || !arg.chars().all(|c| { + c.is_ascii_alphanumeric() + || matches!( + c, + '_' | '@' | '%' | '+' | '=' | ':' | ',' | '.' | '/' | '\\' | '-' + ) + }) +} + +/// Escapa un argumento para la shell indicada. +pub fn quote(arg: &str, kind: ShellKind) -> String { + if !needs_quotes(arg) { + return arg.to_string(); + } + match kind { + ShellKind::Posix => format!("'{}'", arg.replace('\'', "'\\''")), + ShellKind::PowerShell => format!("'{}'", arg.replace('\'', "''")), + ShellKind::Cmd => format!("\"{}\"", arg.replace('"', "\\\"")), + } +} + +pub fn command_line(tokens: &[String], kind: ShellKind) -> String { + let mut parts: Vec = tokens.iter().map(|token| quote(token, kind)).collect(); + + // En PowerShell una ruta entre comillas solo se ejecuta con el operador de llamada. + if kind == ShellKind::PowerShell && tokens.first().is_some_and(|first| needs_quotes(first)) { + parts.insert(0, "&".to_string()); + } + parts.join(" ") +} + +pub fn plan(input: LaunchInput) -> AppResult { + let LaunchInput { + session, + profile, + config, + hook_url, + settings_file, + resume, + prompt, + } = input; + + if !Path::new(&session.cwd).is_dir() { + return Err(AppError::msg(format!( + "la carpeta de trabajo no existe: {}", + session.cwd + ))); + } + + let (program, kind, args) = detect_shell(config); + + let mut env = vec![ + ("TERM".to_string(), "xterm-256color".to_string()), + ("COLORTERM".to_string(), "truecolor".to_string()), + ("MOD0_SESSION_ID".to_string(), session.id.clone()), + ]; + if let Some(url) = hook_url { + env.push(("MOD0_HOOK_URL".to_string(), url)); + } + env.extend(profile.env.iter().map(|(k, v)| (k.clone(), resolve_env_value(v)))); + + let mut tokens: Vec = Vec::new(); + if !profile.command.trim().is_empty() { + tokens.push(profile.command.trim().to_string()); + tokens.extend(profile.args.iter().cloned()); + + if let Some(file) = settings_file { + tokens.push("--settings".into()); + tokens.push(file.to_string_lossy().into_owned()); + } + + match ( + &session.claude_session_id, + resume && !profile.resume_args.is_empty(), + ) { + (Some(cli_session), true) => { + tokens.extend( + profile + .resume_args + .iter() + .map(|arg| arg.replace("{session}", cli_session)), + ); + } + _ => { + // Se aplana a una línea: así es seguro en cualquier shell. + if let Some(text) = prompt.map(|p| p.split_whitespace().collect::>().join(" ")) { + if !text.is_empty() { + tokens.push(text); + } + } + } + } + } + + let input = if tokens.is_empty() { + String::new() + } else { + format!("{}\r", command_line(&tokens, kind)) + }; + + Ok(LaunchPlan { + spec: PtySpec { + program, + args, + cwd: session.cwd.clone(), + env, + rows: 30, + cols: 120, + }, + input, + }) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn quotes_per_shell() { + assert_eq!(quote("simple-arg", ShellKind::Posix), "simple-arg"); + assert_eq!(quote("it's ok", ShellKind::Posix), "'it'\\''s ok'"); + assert_eq!(quote("it's ok", ShellKind::PowerShell), "'it''s ok'"); + assert_eq!(quote("a b", ShellKind::Cmd), "\"a b\""); + } + + #[test] + fn powershell_uses_call_operator_for_quoted_commands() { + let tokens = vec!["C:\\Program Files\\cli.exe".to_string(), "--x".to_string()]; + assert_eq!( + command_line(&tokens, ShellKind::PowerShell), + "& 'C:\\Program Files\\cli.exe' --x" + ); + assert_eq!( + command_line(&["claude".to_string()], ShellKind::PowerShell), + "claude" + ); + } + + #[test] + fn env_references_are_recognized() { + assert_eq!(env_reference("$OPENROUTER_API_KEY"), Some("OPENROUTER_API_KEY")); + assert_eq!(env_reference("${Z_AI_KEY}"), Some("Z_AI_KEY")); + assert_eq!(env_reference("literal"), None); + assert_eq!(env_reference("$1abc"), None); + assert_eq!(env_reference("$"), None); + assert_eq!(resolve_env_value("sin-referencia"), "sin-referencia"); + } + + #[test] + fn detects_shell_kind_from_the_program_name() { + assert_eq!( + kind_of("C:\\Program Files\\PowerShell\\7\\pwsh.exe"), + ShellKind::PowerShell + ); + assert_eq!(kind_of("cmd.exe"), ShellKind::Cmd); + assert_eq!(kind_of("/usr/bin/zsh"), ShellKind::Posix); + } +} diff --git a/src-tauri/src/features/sessions/manager.rs b/src-tauri/src/features/sessions/manager.rs new file mode 100644 index 0000000..4412d4e --- /dev/null +++ b/src-tauri/src/features/sessions/manager.rs @@ -0,0 +1,969 @@ +use std::collections::HashMap; +use std::path::{Path, PathBuf}; +use std::sync::{Arc, Mutex, OnceLock}; +use std::thread; +use std::time::Duration; + +use serde_json::Value; +use tauri::{AppHandle, Emitter}; + +use super::launcher::{self, LaunchInput}; +use super::model::{CreateSessionRequest, NowInfo, PlanItem, Session, SessionKpis, SessionStatus}; +use super::profile::CliProfile; +use crate::config::ConfigStore; +use crate::core::error::{AppError, AppResult}; +use crate::core::events::{self, FsChanged, GraphDelta}; +use crate::core::state::Paths; +use crate::features::git; +use crate::features::notifications::{Notifier, NotifyKind}; +use crate::features::observer::graph::{GraphBuilder, ThoughtNode, describe_tool, truncate}; +use crate::features::observer::hook_server::{self, HookInfo}; +use crate::features::observer::hooks_settings; +use crate::features::observer::transcript::{TranscriptCursor, TranscriptUpdate}; +use crate::features::terminal::pty::Pty; +use crate::infrastructure::process::now_ms; +use crate::infrastructure::storage; + +/// Paleta de colores (índices) que se reparte entre sesiones para distinguirlas de un vistazo. +const COLOR_SLOTS: usize = 8; +/// Tiempo sin recibir hooks tras el cual se pasa a inferir el estado desde la salida del PTY. +const HOOKS_GRACE_MS: i64 = 20_000; +/// Silencio del PTY a partir del cual una CLI sin hooks se considera inactiva. +const QUIET_MS: i64 = 2_500; +const MAX_TOUCHED: usize = 200; + +struct Runtime { + session: Session, + pty: Option>, + run: u64, + graph: GraphBuilder, + graph_loaded: bool, + cursor: TranscriptCursor, + turn_edits: u32, + last_refresh: i64, + last_fs_emit: i64, +} + +impl Runtime { + fn new(session: Session) -> Self { + Self { + session, + pty: None, + run: 0, + graph: GraphBuilder::default(), + graph_loaded: false, + cursor: TranscriptCursor::default(), + turn_edits: 0, + last_refresh: 0, + last_fs_emit: 0, + } + } + + /// Carga el grafo guardado la primera vez que se necesita. + fn ensure_graph(&mut self, paths: &Paths) { + if self.graph_loaded { + return; + } + self.graph_loaded = true; + let nodes: Option> = storage::read_json(&paths.graph_file(&self.session.id)) + .ok() + .flatten(); + if let Some(nodes) = nodes { + self.graph = GraphBuilder::from_nodes(nodes); + } + } +} + +#[derive(Default)] +struct Inner { + sessions: HashMap, + order: Vec, + was_active: bool, +} + +pub struct SessionManager { + app: AppHandle, + paths: Paths, + config: Arc, + notifier: Notifier, + hook: OnceLock, + inner: Mutex, +} + +impl SessionManager { + pub fn new(app: AppHandle, paths: Paths, config: Arc) -> Arc { + let notifier = Notifier::new(app.clone(), config.clone()); + Arc::new(Self { + app, + paths, + config, + notifier, + hook: OnceLock::new(), + inner: Mutex::default(), + }) + } + + pub fn start_hook_server(self: &Arc) -> AppResult<()> { + let info = hook_server::start(self.clone())?; + let _ = self.hook.set(info); + Ok(()) + } + + pub fn hook_port(&self) -> Option { + self.hook.get().map(|info| info.port) + } + + /// Recupera las sesiones guardadas. Sus procesos ya no existen, así que quedan como + /// finalizadas y se pueden reanudar con la CLI. + pub fn load_persisted(&self) { + let saved: Vec = storage::read_json(&self.paths.sessions_file()) + .ok() + .flatten() + .unwrap_or_default(); + let mut inner = self.inner.lock().expect("sessions lock"); + + for mut session in saved { + session.status = SessionStatus::Exited; + session.now = None; + inner.order.push(session.id.clone()); + inner.sessions.insert(session.id.clone(), Runtime::new(session)); + } + } + + /// Vigila las sesiones sin hooks y dispara el aviso "todo terminó". + pub fn start_ticker(self: &Arc) { + let manager = self.clone(); + thread::Builder::new() + .name("mod0-ticker".into()) + .spawn(move || { + loop { + thread::sleep(Duration::from_secs(1)); + manager.tick(); + } + }) + .expect("ticker thread"); + } + + pub fn list(&self) -> Vec { + let inner = self.inner.lock().expect("sessions lock"); + inner + .order + .iter() + .filter_map(|id| inner.sessions.get(id).map(|rt| rt.session.clone())) + .collect() + } + + pub fn session(&self, id: &str) -> AppResult { + let inner = self.inner.lock().expect("sessions lock"); + inner + .sessions + .get(id) + .map(|rt| rt.session.clone()) + .ok_or_else(|| AppError::SessionNotFound(id.into())) + } + + pub fn pty(&self, id: &str) -> AppResult> { + let inner = self.inner.lock().expect("sessions lock"); + let runtime = inner + .sessions + .get(id) + .ok_or_else(|| AppError::SessionNotFound(id.into()))?; + runtime + .pty + .clone() + .ok_or_else(|| AppError::msg("la sesión no está en ejecución")) + } + + pub fn graph(&self, id: &str) -> AppResult> { + let mut inner = self.inner.lock().expect("sessions lock"); + let runtime = inner + .sessions + .get_mut(id) + .ok_or_else(|| AppError::SessionNotFound(id.into()))?; + runtime.ensure_graph(&self.paths); + Ok(runtime.graph.nodes().to_vec()) + } + + pub fn create(self: &Arc, req: CreateSessionRequest) -> AppResult { + let config = self.config.get(); + let profile = find_profile(&config.profiles, &req.profile_id) + .ok_or_else(|| AppError::msg("perfil de CLI desconocido"))?; + + let project = PathBuf::from(&req.project_path); + if !project.is_dir() { + return Err(AppError::msg("la carpeta del proyecto no existe")); + } + + let name = if req.name.trim().is_empty() { + profile.name.clone() + } else { + req.name.trim().to_string() + }; + let base_sha = git::head_sha(&project); + + let (cwd, branch) = if req.worktree { + let slug = git::slugify(&name); + let branch = req + .branch + .as_deref() + .map(str::trim) + .filter(|b| !b.is_empty()) + .map(String::from) + .unwrap_or_else(|| format!("mod0/{slug}")); + (git::worktree_add(&project, &slug, &branch)?, Some(branch)) + } else { + (project.clone(), git::current_branch(&project)) + }; + + let id = uuid::Uuid::new_v4().simple().to_string()[..12].to_string(); + let now = now_ms(); + let session = { + let mut inner = self.inner.lock().expect("sessions lock"); + let session = Session { + id: id.clone(), + name, + project_path: req.project_path.clone(), + cwd: cwd.to_string_lossy().into_owned(), + branch, + base_sha, + worktree: req.worktree, + profile_id: profile.id.clone(), + profile_name: profile.name.clone(), + status: SessionStatus::Starting, + status_since: now, + created_at: now, + now: None, + kpis: SessionKpis::default(), + plan: Vec::new(), + model: None, + last_message: None, + claude_session_id: None, + transcript_path: None, + touched: Vec::new(), + exit_code: None, + reviewed: false, + color_idx: (inner.order.len() % COLOR_SLOTS) as u8, + observed: false, + }; + inner.order.push(id.clone()); + inner.sessions.insert(id.clone(), Runtime::new(session.clone())); + session + }; + + if let Err(error) = self.spawn_pty(&id, false, req.prompt.as_deref()) { + self.inner.lock().expect("sessions lock").sessions.remove(&id); + self.inner + .lock() + .expect("sessions lock") + .order + .retain(|existing| existing != &id); + if req.worktree { + let _ = git::worktree_remove(&project, &cwd); + } + return Err(error); + } + + let created = self.session(&id).unwrap_or(session); + self.emit_session(&created); + self.persist(); + Ok(created) + } + + /// Reinicia una sesión finalizada, reanudando la conversación si la CLI lo permite. + pub fn restart(self: &Arc, id: &str) -> AppResult { + if self.pty(id).is_ok() { + return Err(AppError::msg("la sesión sigue en ejecución")); + } + self.spawn_pty(id, true, None)?; + let session = self.session(id)?; + self.emit_session(&session); + self.persist(); + Ok(session) + } + + pub fn stop(&self, id: &str) -> AppResult<()> { + self.pty(id)?.kill(); + Ok(()) + } + + pub fn remove(&self, id: &str, remove_worktree: bool) -> AppResult<()> { + let runtime = { + let mut inner = self.inner.lock().expect("sessions lock"); + inner.order.retain(|existing| existing != id); + inner + .sessions + .remove(id) + .ok_or_else(|| AppError::SessionNotFound(id.into()))? + }; + + if let Some(pty) = &runtime.pty { + pty.kill(); + } + let _ = std::fs::remove_file(self.paths.graph_file(id)); + let _ = std::fs::remove_file(self.paths.hooks_file(id)); + + if remove_worktree && runtime.session.worktree { + git::worktree_remove( + Path::new(&runtime.session.project_path), + Path::new(&runtime.session.cwd), + )?; + } + + let _ = self.app.emit(events::SESSION_REMOVED, id); + self.persist(); + Ok(()) + } + + pub fn rename(&self, id: &str, name: &str) -> AppResult { + let session = self.mutate(id, |rt| { + rt.session.name = name.trim().to_string(); + })?; + self.persist(); + Ok(session) + } + + pub fn set_reviewed(&self, id: &str, reviewed: bool) -> AppResult { + let session = self.mutate(id, |rt| { + rt.session.reviewed = reviewed; + if reviewed && rt.session.status == SessionStatus::Review { + set_status(&mut rt.session, SessionStatus::Idle); + } + })?; + self.persist(); + Ok(session) + } + + pub fn shutdown(&self) { + let inner = self.inner.lock().expect("sessions lock"); + for runtime in inner.sessions.values() { + if let Some(pty) = &runtime.pty { + pty.kill(); + } + } + } + + /// Procesa un evento de hook de Claude Code (ver `reduce`). + pub fn on_hook(self: &Arc, id: &str, payload: Value) { + let outcome = { + let mut inner = self.inner.lock().expect("sessions lock"); + let Some(runtime) = inner.sessions.get_mut(id) else { + return; + }; + runtime.ensure_graph(&self.paths); + reduce(runtime, &payload, now_ms()) + }; + + if let Some(session) = &outcome.session { + self.emit_session(session); + } + if !outcome.nodes.is_empty() { + let _ = self.app.emit( + events::GRAPH_DELTA, + GraphDelta { + session_id: id.into(), + nodes: outcome.nodes, + }, + ); + } + if let Some(cwd) = outcome.fs_changed { + let _ = self.app.emit(events::FS_CHANGED, FsChanged { cwd }); + } + if outcome.save_graph { + self.save_graph(id); + } + if outcome.persist { + self.persist(); + } + if outcome.refresh { + self.refresh_changes(id); + } + if let Some((kind, title, message)) = outcome.notify { + let name = outcome + .session + .as_ref() + .map(|s| s.name.clone()) + .unwrap_or_default(); + let status = outcome + .session + .as_ref() + .map(|s| format!("{:?}", s.status).to_lowercase()) + .unwrap_or_default(); + self.notifier.send(kind, &title, &message, &name, &status); + } + } + + /// Recalcula archivos cambiados y líneas +/- respecto a la base de la sesión. + pub fn refresh_changes(self: &Arc, id: &str) { + let manager = self.clone(); + let id = id.to_string(); + + thread::spawn(move || { + let Ok(session) = manager.session(&id) else { + return; + }; + let Ok(files) = git::changes(Path::new(&session.cwd), session.base_sha.as_deref()) else { + return; + }; + + let updated = manager.mutate(&id, |rt| { + rt.session.kpis.files_changed = files.len() as u32; + rt.session.kpis.additions = files.iter().map(|f| f.additions).sum(); + rt.session.kpis.deletions = files.iter().map(|f| f.deletions).sum(); + if rt.session.status == SessionStatus::Review && files.is_empty() { + set_status(&mut rt.session, SessionStatus::Idle); + } + }); + if let Ok(session) = updated { + manager.emit_session(&session); + } + }); + } + + fn spawn_pty(self: &Arc, id: &str, resume: bool, prompt: Option<&str>) -> AppResult<()> { + let config = self.config.get(); + let session = self.session(id)?; + let profile = find_profile(&config.profiles, &session.profile_id).unwrap_or_else(shell_profile); + + let (hook_url, settings_file) = match (profile.hooks, self.hook.get()) { + (true, Some(info)) => { + let url = info.url_for(id); + let file = self.paths.hooks_file(id); + hooks_settings::write(&file, &url)?; + (Some(url), Some(file)) + } + _ => (None, None), + }; + + let observed = settings_file.is_some(); + let plan = launcher::plan(LaunchInput { + session: &session, + profile: &profile, + config: &config, + hook_url, + settings_file, + resume, + prompt, + })?; + + let run = self.mutate_run(id)?; + let (manager, session_id) = (self.clone(), id.to_string()); + let pty = Pty::spawn(plan.spec, move |code| manager.on_pty_exit(&session_id, run, code))?; + if !plan.input.is_empty() { + pty.write(plan.input.as_bytes())?; + } + + self.mutate(id, |rt| { + rt.pty = Some(Arc::new(pty)); + rt.session.observed = observed; + rt.session.exit_code = None; + rt.session.now = None; + set_status(&mut rt.session, SessionStatus::Starting); + })?; + Ok(()) + } + + fn mutate_run(&self, id: &str) -> AppResult { + let mut inner = self.inner.lock().expect("sessions lock"); + let runtime = inner + .sessions + .get_mut(id) + .ok_or_else(|| AppError::SessionNotFound(id.into()))?; + runtime.run += 1; + Ok(runtime.run) + } + + fn on_pty_exit(&self, id: &str, run: u64, code: Option) { + let updated = { + let mut inner = self.inner.lock().expect("sessions lock"); + let Some(runtime) = inner.sessions.get_mut(id) else { + return; + }; + // Ignora la salida tardía de una ejecución anterior (tras reiniciar). + if runtime.run != run { + return; + } + runtime.pty = None; + runtime.session.exit_code = code; + runtime.session.now = None; + set_status(&mut runtime.session, SessionStatus::Exited); + runtime.session.clone() + }; + self.emit_session(&updated); + self.persist(); + } + + /// Aplica un cambio a una sesión y devuelve su estado resultante. + fn mutate(&self, id: &str, change: impl FnOnce(&mut Runtime)) -> AppResult { + let mut inner = self.inner.lock().expect("sessions lock"); + let runtime = inner + .sessions + .get_mut(id) + .ok_or_else(|| AppError::SessionNotFound(id.into()))?; + change(runtime); + Ok(runtime.session.clone()) + } + + fn tick(&self) { + let config = self.config.get(); + let plain_shell: Vec = config + .profiles + .iter() + .filter(|p| p.command.trim().is_empty()) + .map(|p| p.id.clone()) + .collect(); + let now = now_ms(); + + let mut changed: Vec = Vec::new(); + let mut digest: Option<(usize, usize)> = None; + + { + let mut inner = self.inner.lock().expect("sessions lock"); + for runtime in inner.sessions.values_mut() { + let Some(pty) = runtime.pty.clone() else { + continue; + }; + let session = &mut runtime.session; + + // Los hooks nunca llegaron (versión antigua de la CLI): se infiere desde la salida. + if session.observed + && session.status == SessionStatus::Starting + && now - session.status_since > HOOKS_GRACE_MS + { + session.observed = false; + } + if session.observed + || matches!( + session.status, + SessionStatus::Waiting | SessionStatus::Review | SessionStatus::Exited + ) + { + continue; + } + + let target = + if plain_shell.contains(&session.profile_id) || now - pty.last_output_ms() > QUIET_MS { + SessionStatus::Idle + } else { + SessionStatus::Working + }; + if session.status != target { + set_status(session, target); + changed.push(session.clone()); + } + } + + let active = inner + .sessions + .values() + .any(|rt| matches!(rt.session.status, SessionStatus::Working | SessionStatus::Waiting)); + if inner.was_active && !active { + let review = inner + .sessions + .values() + .filter(|rt| rt.session.status == SessionStatus::Review) + .count(); + digest = Some((inner.sessions.len(), review)); + } + inner.was_active = active; + } + + for session in &changed { + self.emit_session(session); + } + if let Some((total, review)) = digest { + let message = format!("{total} sesiones en reposo, {review} por revisar"); + self.notifier + .send(NotifyKind::AllIdle, "MOD0: todo terminó", &message, "", "idle"); + } + } + + fn emit_session(&self, session: &Session) { + let _ = self.app.emit(events::SESSION_UPSERT, session); + } + + fn persist(&self) { + if let Err(error) = storage::write_json_atomic(&self.paths.sessions_file(), &self.list()) { + eprintln!("[mod0] no se pudieron guardar las sesiones: {error}"); + } + } + + fn save_graph(&self, id: &str) { + if let Ok(nodes) = self.graph(id) { + let _ = storage::write_json_atomic(&self.paths.graph_file(id), &nodes); + } + } +} + +fn find_profile(profiles: &[CliProfile], id: &str) -> Option { + profiles.iter().find(|profile| profile.id == id).cloned() +} + +fn shell_profile() -> CliProfile { + CliProfile { + id: "shell".into(), + name: "Terminal".into(), + ..CliProfile::default() + } +} + +fn set_status(session: &mut Session, status: SessionStatus) { + if session.status != status { + session.status = status; + session.status_since = now_ms(); + } +} + +#[derive(Default)] +struct Outcome { + session: Option, + nodes: Vec, + notify: Option<(NotifyKind, String, String)>, + fs_changed: Option, + save_graph: bool, + persist: bool, + refresh: bool, +} + +/// Extrae el checklist de una llamada a `TodoWrite` (`tool_input.todos`). +fn parse_plan(input: &Value) -> Vec { + input + .get("todos") + .and_then(Value::as_array) + .map(|todos| { + todos + .iter() + .filter_map(|todo| { + let content = todo.get("content").and_then(Value::as_str)?.trim(); + let status = todo.get("status").and_then(Value::as_str).unwrap_or("pending"); + (!content.is_empty()).then(|| PlanItem { + content: truncate(content, 160), + status: status.to_string(), + }) + }) + .take(40) + .collect() + }) + .unwrap_or_default() +} + +fn is_write_tool(tool: &str) -> bool { + matches!(tool, "Edit" | "MultiEdit" | "Write" | "NotebookEdit") +} + +fn apply_transcript( + update: TranscriptUpdate, + runtime_graph: &mut GraphBuilder, + session: &mut Session, + out: &mut Outcome, +) { + for (tool_use_id, text) in update.intents { + out.nodes.extend(runtime_graph.set_intent(&tool_use_id, &text)); + } + for tool_use_id in update.errors { + if let Some(node) = runtime_graph.mark_error(&tool_use_id) { + session.kpis.errors += 1; + out.nodes.push(node); + } + } + if let Some(tokens) = update.context_tokens { + session.kpis.context_tokens = tokens; + } + if let Some(model) = update.model { + session.model = Some(model); + } +} + +/// Reductor de eventos: transforma un hook de Claude Code en cambios de estado, nodos del +/// thinking graph y avisos. Es una función pura sobre `Runtime` para poder probarla. +fn reduce(runtime: &mut Runtime, payload: &Value, now: i64) -> Outcome { + let Runtime { + session, + graph, + cursor, + turn_edits, + last_refresh, + last_fs_emit, + .. + } = runtime; + let mut out = Outcome::default(); + + let event = payload + .get("hook_event_name") + .and_then(Value::as_str) + .unwrap_or_default(); + let text = |key: &str| payload.get(key).and_then(Value::as_str); + let tool = text("tool_name").unwrap_or_default(); + let tool_input = payload.get("tool_input").cloned().unwrap_or(Value::Null); + let tool_use_id = text("tool_use_id"); + + if let Some(cli_session) = text("session_id") { + session.claude_session_id = Some(cli_session.to_string()); + } + if let Some(path) = text("transcript_path") { + session.transcript_path = Some(path.to_string()); + } + session.observed = true; + + let mut poll = false; + + match event { + "SessionStart" => { + if matches!(session.status, SessionStatus::Starting | SessionStatus::Exited) { + set_status(session, SessionStatus::Idle); + } + } + "UserPromptSubmit" => { + let prompt = text("prompt").or_else(|| text("user_input")).unwrap_or_default(); + session.kpis.turns += 1; + session.reviewed = false; + *turn_edits = 0; + out.nodes.push(graph.begin_turn(prompt, now)); + session.now = Some(NowInfo { + kind: "think".into(), + label: "Pensando…".into(), + target: None, + }); + set_status(session, SessionStatus::Working); + out.persist = true; + } + "PreToolUse" => { + let info = describe_tool(tool, &tool_input); + out.nodes + .push(graph.tool_start(tool_use_id, tool, &tool_input, now)); + session.now = Some(NowInfo { + kind: info.family.into(), + label: info.label, + target: info.target.clone(), + }); + set_status(session, SessionStatus::Working); + + if tool == "TodoWrite" { + session.plan = parse_plan(&tool_input); + } + + if is_write_tool(tool) { + if let Some(target) = info.target { + if !session.touched.contains(&target) { + session.touched.push(target); + if session.touched.len() > MAX_TOUCHED { + session.touched.remove(0); + } + } + } + } + poll = true; + } + "PostToolUse" => { + let finished = graph.tool_end(tool_use_id, now).unwrap_or_else(|| { + let started = graph.tool_start(tool_use_id, tool, &tool_input, now); + graph.tool_end(Some(&started.id), now).unwrap_or(started) + }); + out.nodes.push(finished); + session.kpis.tool_calls += 1; + session.now = Some(NowInfo { + kind: "think".into(), + label: "Pensando…".into(), + target: None, + }); + set_status(session, SessionStatus::Working); + + if is_write_tool(tool) { + *turn_edits += 1; + } + if (is_write_tool(tool) || tool == "Bash") && now - *last_fs_emit > 800 { + *last_fs_emit = now; + out.fs_changed = Some(session.cwd.clone()); + } + if is_write_tool(tool) && now - *last_refresh > 3_000 { + *last_refresh = now; + out.refresh = true; + } + poll = true; + } + "Notification" => { + let message = text("message").unwrap_or("Claude necesita tu atención"); + let kind = text("notification_type").unwrap_or_default(); + let blocking = matches!(kind, "permission_prompt" | "elicitation_dialog") + || (kind.is_empty() && message.to_lowercase().contains("permission")); + + if blocking { + out.nodes.push(graph.notice(message, now)); + set_status(session, SessionStatus::Waiting); + out.notify = Some(( + NotifyKind::NeedsYou, + format!("{}: te necesita", session.name), + truncate(message, 140), + )); + } + } + "Stop" => { + let message = text("last_assistant_message"); + out.nodes.push(graph.stop(message, now)); + session.now = None; + session.last_message = message.map(|m| truncate(m, 400)); + let next = if *turn_edits > 0 { + SessionStatus::Review + } else { + SessionStatus::Idle + }; + set_status(session, next); + out.notify = Some(( + NotifyKind::SessionDone, + format!("{}: listo", session.name), + truncate(message.unwrap_or("Terminó el turno"), 140), + )); + out.save_graph = true; + out.persist = true; + out.refresh = true; + out.fs_changed = Some(session.cwd.clone()); + poll = true; + } + "PreCompact" => out.nodes.push(graph.notice("Compactando contexto", now)), + "SessionEnd" => { + session.now = None; + set_status(session, SessionStatus::Idle); + } + _ => {} + } + + if poll { + if let Some(path) = session.transcript_path.clone() { + let update = cursor.poll(Path::new(&path)); + apply_transcript(update, graph, session, &mut out); + } + } + + out.session = Some(session.clone()); + out +} + +#[cfg(test)] +mod tests { + use serde_json::json; + + use super::*; + + fn runtime() -> Runtime { + Runtime::new(Session { + id: "s1".into(), + name: "api".into(), + project_path: "/p".into(), + cwd: "/p".into(), + branch: None, + base_sha: None, + worktree: false, + profile_id: "claude".into(), + profile_name: "Claude Code".into(), + status: SessionStatus::Starting, + status_since: 0, + created_at: 0, + now: None, + kpis: SessionKpis::default(), + plan: Vec::new(), + model: None, + last_message: None, + claude_session_id: None, + transcript_path: None, + touched: Vec::new(), + exit_code: None, + reviewed: false, + color_idx: 0, + observed: false, + }) + } + + #[test] + fn a_full_turn_goes_working_waiting_review() { + let mut rt = runtime(); + + reduce( + &mut rt, + &json!({ "hook_event_name": "SessionStart", "session_id": "abc" }), + 1, + ); + assert_eq!(rt.session.status, SessionStatus::Idle); + assert_eq!(rt.session.claude_session_id.as_deref(), Some("abc")); + + reduce( + &mut rt, + &json!({ "hook_event_name": "UserPromptSubmit", "prompt": "arregla" }), + 2, + ); + assert_eq!(rt.session.status, SessionStatus::Working); + assert_eq!(rt.session.kpis.turns, 1); + + let edit = + json!({ "tool_name": "Edit", "tool_use_id": "t1", "tool_input": { "file_path": "/p/a.ts" } }); + let mut pre = edit.clone(); + pre["hook_event_name"] = json!("PreToolUse"); + let out = reduce(&mut rt, &pre, 3); + assert_eq!( + out.session.unwrap().now.unwrap().target.as_deref(), + Some("/p/a.ts") + ); + assert_eq!(rt.session.touched, vec!["/p/a.ts".to_string()]); + + let out = reduce( + &mut rt, + &json!({ "hook_event_name": "Notification", "notification_type": "permission_prompt", "message": "Permiso para Bash" }), + 4, + ); + assert_eq!(rt.session.status, SessionStatus::Waiting); + assert!(matches!(out.notify, Some((NotifyKind::NeedsYou, _, _)))); + + let mut post = edit; + post["hook_event_name"] = json!("PostToolUse"); + reduce(&mut rt, &post, 5); + assert_eq!(rt.session.status, SessionStatus::Working); + assert_eq!(rt.session.kpis.tool_calls, 1); + + let out = reduce( + &mut rt, + &json!({ "hook_event_name": "Stop", "last_assistant_message": "Listo" }), + 6, + ); + assert_eq!(rt.session.status, SessionStatus::Review); + assert!(out.refresh && out.save_graph); + assert_eq!(rt.graph.nodes().len(), 4); + } + + #[test] + fn todowrite_updates_the_session_plan() { + let mut rt = runtime(); + reduce( + &mut rt, + &json!({ + "hook_event_name": "PreToolUse", + "tool_name": "TodoWrite", + "tool_use_id": "p1", + "tool_input": { "todos": [ + { "content": "Leer el módulo", "status": "completed" }, + { "content": "Implementar rotación", "status": "in_progress" }, + { "content": "", "status": "pending" } + ] } + }), + 1, + ); + assert_eq!(rt.session.plan.len(), 2); + assert_eq!(rt.session.plan[1].status, "in_progress"); + } + + #[test] + fn a_turn_without_edits_ends_idle_and_idle_prompt_is_ignored() { + let mut rt = runtime(); + reduce( + &mut rt, + &json!({ "hook_event_name": "UserPromptSubmit", "prompt": "explica" }), + 1, + ); + reduce(&mut rt, &json!({ "hook_event_name": "Stop" }), 2); + assert_eq!(rt.session.status, SessionStatus::Idle); + + reduce( + &mut rt, + &json!({ "hook_event_name": "Notification", "notification_type": "idle_prompt" }), + 3, + ); + assert_eq!(rt.session.status, SessionStatus::Idle); + } +} diff --git a/src-tauri/src/features/sessions/mod.rs b/src-tauri/src/features/sessions/mod.rs new file mode 100644 index 0000000..375e5a2 --- /dev/null +++ b/src-tauri/src/features/sessions/mod.rs @@ -0,0 +1,4 @@ +pub mod launcher; +pub mod manager; +pub mod model; +pub mod profile; diff --git a/src-tauri/src/features/sessions/model.rs b/src-tauri/src/features/sessions/model.rs new file mode 100644 index 0000000..caa100b --- /dev/null +++ b/src-tauri/src/features/sessions/model.rs @@ -0,0 +1,97 @@ +use serde::{Deserialize, Serialize}; + +/// Estado operativo de una sesión. Determina cuánta atención merece. +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "snake_case")] +pub enum SessionStatus { + /// Arrancando la CLI. + Starting, + /// La IA está trabajando. + Working, + /// Bloqueada esperando una decisión (permiso o pregunta). Requiere atención inmediata. + Waiting, + /// Terminó un turno con cambios: toca revisar. + Review, + /// Sin actividad ni nada pendiente. + Idle, + /// El proceso terminó. + Exited, +} + +/// Qué está haciendo la sesión ahora mismo. +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[serde(rename_all = "camelCase")] +pub struct NowInfo { + /// Familia de la acción: read | write | exec | search | web | agent | plan | think | other. + pub kind: String, + pub label: String, + pub target: Option, +} + +/// Indicadores que realmente merecen atención (ver `docs/CONTEXT.md`). +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase", default)] +pub struct SessionKpis { + pub turns: u32, + pub tool_calls: u32, + pub errors: u32, + pub files_changed: u32, + pub additions: u32, + pub deletions: u32, + /// Tokens de contexto del último mensaje (entrada + caché). + pub context_tokens: u64, +} + +/// Un punto del plan que la IA mantiene con la herramienta `TodoWrite`. +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[serde(rename_all = "camelCase")] +pub struct PlanItem { + pub content: String, + /// `pending`, `in_progress` o `completed`. + pub status: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Session { + pub id: String, + pub name: String, + pub project_path: String, + pub cwd: String, + pub branch: Option, + pub base_sha: Option, + pub worktree: bool, + pub profile_id: String, + pub profile_name: String, + pub status: SessionStatus, + pub status_since: i64, + pub created_at: i64, + pub now: Option, + pub kpis: SessionKpis, + /// Plan actual de la IA (checklist). Vacío si la CLI no usa `TodoWrite`. + #[serde(default)] + pub plan: Vec, + pub model: Option, + pub last_message: Option, + pub claude_session_id: Option, + pub transcript_path: Option, + /// Archivos tocados por la sesión (rutas absolutas, máximo 200). + pub touched: Vec, + pub exit_code: Option, + pub reviewed: bool, + pub color_idx: u8, + /// Si la CLI reporta eventos (hooks); si no, el estado se infiere de la salida del PTY. + pub observed: bool, +} + +#[derive(Debug, Clone, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct CreateSessionRequest { + pub name: String, + pub profile_id: String, + pub project_path: String, + #[serde(default)] + pub worktree: bool, + pub branch: Option, + pub prompt: Option, +} diff --git a/src-tauri/src/features/sessions/profile.rs b/src-tauri/src/features/sessions/profile.rs new file mode 100644 index 0000000..75aadbe --- /dev/null +++ b/src-tauri/src/features/sessions/profile.rs @@ -0,0 +1,52 @@ +use std::collections::BTreeMap; + +use serde::{Deserialize, Serialize}; + +/// Perfil de CLI: qué ejecutable lanzar en cada sesión y cómo. +/// +/// MOD0 no reimplementa ningún proveedor de IA: cada perfil es un envoltorio de una CLI +/// existente. BYOK e IA local se resuelven con `env` (por ejemplo `ANTHROPIC_BASE_URL`). +#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)] +#[serde(rename_all = "camelCase", default)] +pub struct CliProfile { + pub id: String, + pub name: String, + /// Ejecutable (vacío = solo una terminal). + pub command: String, + pub args: Vec, + pub env: BTreeMap, + /// Inyecta hooks HTTP (solo Claude Code) para observar la sesión con precisión. + pub hooks: bool, + /// Argumentos para reanudar; `{session}` se reemplaza por el id de sesión de la CLI. + pub resume_args: Vec, +} + +pub fn default_profiles() -> Vec { + vec![ + CliProfile { + id: "claude".into(), + name: "Claude Code".into(), + command: "claude".into(), + hooks: true, + resume_args: vec!["--resume".into(), "{session}".into()], + ..CliProfile::default() + }, + CliProfile { + id: "codex".into(), + name: "Codex CLI".into(), + command: "codex".into(), + ..CliProfile::default() + }, + CliProfile { + id: "gemini".into(), + name: "Gemini CLI".into(), + command: "gemini".into(), + ..CliProfile::default() + }, + CliProfile { + id: "shell".into(), + name: "Terminal".into(), + ..CliProfile::default() + }, + ] +} diff --git a/src-tauri/src/features/terminal/mod.rs b/src-tauri/src/features/terminal/mod.rs new file mode 100644 index 0000000..e1ced62 --- /dev/null +++ b/src-tauri/src/features/terminal/mod.rs @@ -0,0 +1,2 @@ +pub mod pty; +pub mod ring_buffer; diff --git a/src-tauri/src/features/terminal/pty.rs b/src-tauri/src/features/terminal/pty.rs new file mode 100644 index 0000000..16f4a38 --- /dev/null +++ b/src-tauri/src/features/terminal/pty.rs @@ -0,0 +1,156 @@ +use std::io::{Read, Write}; +use std::sync::atomic::{AtomicI64, Ordering}; +use std::sync::{Arc, Mutex}; +use std::thread; + +use portable_pty::{ChildKiller, CommandBuilder, MasterPty, PtySize, native_pty_system}; +use tauri::ipc::{Channel, InvokeResponseBody}; + +use super::ring_buffer::RingBuffer; +use crate::core::error::{AppError, AppResult}; +use crate::infrastructure::process::now_ms; + +/// Tamaño del historial que se conserva por sesión para re-adjuntar la terminal. +const SCROLLBACK_BYTES: usize = 1024 * 1024; + +/// Cómo arrancar el proceso dentro del PTY. +pub struct PtySpec { + pub program: String, + pub args: Vec, + pub cwd: String, + pub env: Vec<(String, String)>, + pub rows: u16, + pub cols: u16, +} + +type Sink = Arc>>>; + +/// Un pseudo-terminal en ejecución. La salida se guarda siempre en un búfer y solo se +/// envía al frontend mientras haya un canal adjunto, así las sesiones en segundo plano +/// no cuestan nada en la interfaz. +pub struct Pty { + master: Mutex>, + writer: Mutex>, + killer: Mutex>, + buffer: Arc>, + sink: Sink, + last_output: Arc, +} + +impl Pty { + pub fn spawn(spec: PtySpec, on_exit: impl FnOnce(Option) + Send + 'static) -> AppResult { + let pair = native_pty_system() + .openpty(PtySize { + rows: spec.rows, + cols: spec.cols, + pixel_width: 0, + pixel_height: 0, + }) + .map_err(|e| AppError::msg(format!("no se pudo abrir el PTY: {e}")))?; + + let mut command = CommandBuilder::new(&spec.program); + command.args(&spec.args); + command.cwd(&spec.cwd); + for (key, value) in &spec.env { + command.env(key, value); + } + + let mut child = pair + .slave + .spawn_command(command) + .map_err(|e| AppError::msg(format!("no se pudo iniciar `{}`: {e}", spec.program)))?; + // El extremo esclavo debe cerrarse en el padre para detectar EOF correctamente. + drop(pair.slave); + + let killer = child.clone_killer(); + let mut reader = pair + .master + .try_clone_reader() + .map_err(|e| AppError::msg(format!("no se pudo leer el PTY: {e}")))?; + let writer = pair + .master + .take_writer() + .map_err(|e| AppError::msg(format!("no se pudo escribir en el PTY: {e}")))?; + + let buffer = Arc::new(Mutex::new(RingBuffer::new(SCROLLBACK_BYTES))); + let sink: Sink = Arc::new(Mutex::new(None)); + let last_output = Arc::new(AtomicI64::new(now_ms())); + + { + let (buffer, sink, last_output) = (buffer.clone(), sink.clone(), last_output.clone()); + thread::spawn(move || { + let mut chunk = [0u8; 16 * 1024]; + loop { + match reader.read(&mut chunk) { + Ok(0) | Err(_) => break, + Ok(n) => { + last_output.store(now_ms(), Ordering::Relaxed); + + // Guardar y enviar bajo el mismo candado hace atómico el "adjuntar + historial". + let mut history = buffer.lock().expect("pty buffer"); + history.push(&chunk[..n]); + + if let Some(channel) = sink.lock().expect("pty sink").as_ref() { + let _ = channel.send(InvokeResponseBody::Raw(chunk[..n].to_vec())); + } + } + } + } + }); + } + + thread::spawn(move || { + let code = child.wait().ok().map(|status| status.exit_code() as i32); + on_exit(code); + }); + + Ok(Self { + master: Mutex::new(pair.master), + writer: Mutex::new(writer), + killer: Mutex::new(killer), + buffer, + sink, + last_output, + }) + } + + pub fn write(&self, data: &[u8]) -> AppResult<()> { + let mut writer = self.writer.lock().expect("pty writer"); + writer.write_all(data)?; + writer.flush()?; + Ok(()) + } + + pub fn resize(&self, rows: u16, cols: u16) -> AppResult<()> { + self.master + .lock() + .expect("pty master") + .resize(PtySize { + rows, + cols, + pixel_width: 0, + pixel_height: 0, + }) + .map_err(|e| AppError::msg(e.to_string())) + } + + pub fn kill(&self) { + let _ = self.killer.lock().expect("pty killer").kill(); + } + + /// Conecta un canal y devuelve el historial acumulado. Ningún byte se pierde ni se duplica: + /// lo que ya estaba en el historial viaja en el retorno y lo posterior llega por el canal. + pub fn attach(&self, channel: Channel) -> Vec { + let history = self.buffer.lock().expect("pty buffer"); + *self.sink.lock().expect("pty sink") = Some(channel); + history.snapshot() + } + + pub fn detach(&self) { + *self.sink.lock().expect("pty sink") = None; + } + + pub fn last_output_ms(&self) -> i64 { + self.last_output.load(Ordering::Relaxed) + } +} diff --git a/src-tauri/src/features/terminal/ring_buffer.rs b/src-tauri/src/features/terminal/ring_buffer.rs new file mode 100644 index 0000000..2e5e562 --- /dev/null +++ b/src-tauri/src/features/terminal/ring_buffer.rs @@ -0,0 +1,55 @@ +/// Búfer circular de bytes para repetir la salida de una terminal al re-adjuntarla. +pub struct RingBuffer { + data: Vec, + capacity: usize, +} + +impl RingBuffer { + pub fn new(capacity: usize) -> Self { + Self { + data: Vec::with_capacity(capacity.min(64 * 1024)), + capacity, + } + } + + pub fn push(&mut self, bytes: &[u8]) { + self.data.extend_from_slice(bytes); + + if self.data.len() > self.capacity { + let mut cut = self.data.len() - self.capacity; + + // Intenta cortar en un salto de línea para no partir secuencias de escape. + if let Some(pos) = self.data[cut..].iter().position(|b| *b == b'\n') { + cut += pos + 1; + } + + self.data.drain(..cut.min(self.data.len())); + } + } + + pub fn snapshot(&self) -> Vec { + self.data.clone() + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn keeps_only_the_tail() { + let mut buffer = RingBuffer::new(16); + buffer.push(b"0123456789\nabcdefghij\nXYZ"); + let snapshot = buffer.snapshot(); + assert!(snapshot.len() <= 16); + assert!(snapshot.ends_with(b"XYZ")); + } + + #[test] + fn small_writes_are_kept_whole() { + let mut buffer = RingBuffer::new(64); + buffer.push(b"hola "); + buffer.push(b"mundo"); + assert_eq!(buffer.snapshot(), b"hola mundo"); + } +} diff --git a/src-tauri/src/features/workspace/deps.rs b/src-tauri/src/features/workspace/deps.rs new file mode 100644 index 0000000..e57072e --- /dev/null +++ b/src-tauri/src/features/workspace/deps.rs @@ -0,0 +1,496 @@ +use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; +use std::fs; +use std::path::{Path, PathBuf}; +use std::sync::{Arc, LazyLock, Mutex}; + +use regex::Regex; +use serde::Serialize; + +use super::tree::walker; +use crate::core::error::AppResult; + +/// Tamaño máximo de un archivo fuente que se analiza. +const MAX_SOURCE_BYTES: u64 = 512 * 1024; +const MAX_FILES: usize = 20_000; +const MAX_DIRS: usize = 5_000; +const MAX_IMPACT: usize = 10_000; +const SOURCE_EXTENSIONS: [&str; 13] = [ + "ts", "tsx", "js", "jsx", "mjs", "cjs", "svelte", "vue", "astro", "py", "rs", "css", "scss", +]; +const JS_EXTENSIONS: [&str; 9] = ["ts", "tsx", "js", "jsx", "mjs", "cjs", "svelte", "vue", "astro"]; + +static JS_FROM: LazyLock = LazyLock::new(|| { + Regex::new(r#"(?:import|export)\s+(?:[^'";]*?\s+from\s+)?['"]([^'"\n]+)['"]"#).expect("regex") +}); +static JS_CALL: LazyLock = + LazyLock::new(|| Regex::new(r#"(?:import|require)\(\s*['"]([^'"\n]+)['"]\s*\)"#).expect("regex")); +static PY_FROM: LazyLock = + LazyLock::new(|| Regex::new(r"(?m)^\s*from\s+([.\w]+)\s+import").expect("regex")); +static PY_IMPORT: LazyLock = + LazyLock::new(|| Regex::new(r"(?m)^\s*import\s+([\w.]+)").expect("regex")); +static RS_MOD: LazyLock = + LazyLock::new(|| Regex::new(r"(?m)^\s*(?:pub(?:\([^)]*\))?\s+)?mod\s+(\w+)\s*;").expect("regex")); +static RS_USE: LazyLock = + LazyLock::new(|| Regex::new(r"(?m)^\s*(?:pub\s+)?use\s+crate::(\w+)").expect("regex")); + +#[derive(Debug, Clone, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct GraphNode { + pub id: String, + pub label: String, + pub files: u32, + pub bytes: u64, + /// `dir` (carpeta agregada, expandible) o `file` (archivo individual). + pub kind: &'static str, +} + +#[derive(Debug, Clone, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct GraphEdge { + pub from: String, + pub to: String, + pub weight: u32, +} + +#[derive(Debug, Clone, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct DepGraph { + /// Profundidad máxima de carpetas del proyecto. + pub max_depth: u32, + pub file_count: u32, + /// Todas las carpetas con código analizado (para expandir hasta un nivel dado). + pub dirs: Vec, + pub nodes: Vec, + pub edges: Vec, +} + +/// Grafo a nivel de archivo (se cachea; la agregación por carpeta es barata). +struct FileGraph { + files: Vec<(String, u64)>, + edges: Vec<(usize, usize)>, +} + +static CACHE: LazyLock>>> = LazyLock::new(Default::default); + +/// Grafo a nivel de archivo del proyecto (cacheado por raíz; `refresh` fuerza un nuevo análisis). +fn file_graph(root: &Path, refresh: bool) -> Arc { + let cached = if refresh { + None + } else { + CACHE.lock().expect("deps cache").get(root).cloned() + }; + + cached.unwrap_or_else(|| { + let built = Arc::new(scan(root)); + CACHE + .lock() + .expect("deps cache") + .insert(root.to_path_buf(), built.clone()); + built + }) +} + +/// Grafo de dependencias agregado. Las carpetas de `expanded` se abren en sus hijos (carpetas o archivos); +/// lo demás queda colapsado en un solo nodo. Con `expanded` vacío se ve el primer nivel. +pub fn graph(root: &Path, expanded: &[String], refresh: bool) -> AppResult { + let open: HashSet = expanded.iter().cloned().collect(); + Ok(aggregate(&file_graph(root, refresh), &open)) +} + +/// Archivos del proyecto que dependen (directa o indirectamente) de los archivos dados. +pub fn impact(root: &Path, paths: &[String]) -> AppResult> { + Ok(impact_of(&file_graph(root, false), paths)) +} + +fn scan(root: &Path) -> FileGraph { + let mut files: Vec<(String, u64)> = Vec::new(); + + for entry in walker(root).build().flatten() { + if !entry.file_type().is_some_and(|kind| kind.is_file()) { + continue; + } + let ext = entry.path().extension().and_then(|e| e.to_str()).unwrap_or(""); + let size = entry.metadata().map(|m| m.len()).unwrap_or(0); + + if SOURCE_EXTENSIONS.contains(&ext) && size <= MAX_SOURCE_BYTES { + if let Ok(relative) = entry.path().strip_prefix(root) { + files.push((relative.to_string_lossy().replace('\\', "/"), size)); + } + } + if files.len() >= MAX_FILES { + break; + } + } + + let index: HashMap<&str, usize> = files + .iter() + .enumerate() + .map(|(i, (path, _))| (path.as_str(), i)) + .collect(); + + let mut edges = Vec::new(); + for (from, (path, _)) in files.iter().enumerate() { + let Ok(source) = fs::read_to_string(root.join(path)) else { + continue; + }; + for target in imports_of(path, &source, &index) { + if target != from { + edges.push((from, target)); + } + } + } + edges.sort_unstable(); + edges.dedup(); + + FileGraph { files, edges } +} + +/// Archivos del proyecto a los que apunta `source` (resueltos contra `index`). +fn imports_of(path: &str, source: &str, index: &HashMap<&str, usize>) -> Vec { + let ext = path.rsplit('.').next().unwrap_or(""); + let dir = path.rsplit_once('/').map(|(dir, _)| dir).unwrap_or(""); + let mut found = Vec::new(); + + if JS_EXTENSIONS.contains(&ext) { + for pattern in [&*JS_FROM, &*JS_CALL] { + for capture in pattern.captures_iter(source) { + if let Some(target) = resolve_js(&capture[1], dir, index) { + found.push(target); + } + } + } + } else if ext == "py" { + for capture in PY_FROM + .captures_iter(source) + .chain(PY_IMPORT.captures_iter(source)) + { + if let Some(target) = resolve_py(&capture[1], dir, index) { + found.push(target); + } + } + } else if ext == "rs" { + for capture in RS_MOD.captures_iter(source) { + if let Some(target) = resolve_rs_mod(&capture[1], path, dir, index) { + found.push(target); + } + } + for capture in RS_USE.captures_iter(source) { + if let Some(target) = resolve_rs_use(&capture[1], dir, index) { + found.push(target); + } + } + } + found +} + +fn normalize(path: &str) -> String { + let mut out: Vec<&str> = Vec::new(); + for part in path.split('/') { + match part { + "" | "." => {} + ".." => { + out.pop(); + } + other => out.push(other), + } + } + out.join("/") +} + +fn join(dir: &str, rest: &str) -> String { + if dir.is_empty() { + normalize(rest) + } else { + normalize(&format!("{dir}/{rest}")) + } +} + +fn probe(base: &str, index: &HashMap<&str, usize>) -> Option { + if let Some(found) = index.get(base) { + return Some(*found); + } + // Los proyectos TS importan `./x.js` aunque el archivo sea `x.ts`. + let stem = ["js", "jsx", "mjs", "cjs"] + .iter() + .find_map(|ext| base.strip_suffix(&format!(".{ext}"))) + .unwrap_or(base); + + JS_EXTENSIONS.iter().find_map(|ext| { + index + .get(format!("{stem}.{ext}").as_str()) + .or_else(|| index.get(format!("{base}.{ext}").as_str())) + .or_else(|| index.get(format!("{base}/index.{ext}").as_str())) + .copied() + }) +} + +fn resolve_js(spec: &str, dir: &str, index: &HashMap<&str, usize>) -> Option { + let base = if spec.starts_with('.') { + join(dir, spec) + } else if let Some(rest) = spec.strip_prefix("$lib/") { + normalize(&format!("src/lib/{rest}")) + } else if let Some(rest) = spec.strip_prefix("@/").or_else(|| spec.strip_prefix("~/")) { + normalize(&format!("src/{rest}")) + } else { + return None; + }; + probe(&base, index) +} + +fn resolve_py(spec: &str, dir: &str, index: &HashMap<&str, usize>) -> Option { + let dots = spec.chars().take_while(|c| *c == '.').count(); + let module = spec[dots..].replace('.', "/"); + + let mut bases = Vec::new(); + if dots > 0 { + let mut up = dir.to_string(); + for _ in 1..dots { + up = up + .rsplit_once('/') + .map(|(parent, _)| parent.to_string()) + .unwrap_or_default(); + } + bases.push(join(&up, &module)); + } else { + bases.push(normalize(&module)); + bases.push(normalize(&format!("src/{module}"))); + } + + bases.iter().find_map(|base| { + index + .get(format!("{base}.py").as_str()) + .or_else(|| index.get(format!("{base}/__init__.py").as_str())) + .copied() + }) +} + +fn resolve_rs_mod(name: &str, path: &str, dir: &str, index: &HashMap<&str, usize>) -> Option { + let file = path.rsplit('/').next().unwrap_or(path); + let owner_dir = if matches!(file, "mod.rs" | "lib.rs" | "main.rs") { + dir.to_string() + } else { + join(dir, file.trim_end_matches(".rs")) + }; + + index + .get(join(&owner_dir, &format!("{name}.rs")).as_str()) + .or_else(|| index.get(join(&owner_dir, &format!("{name}/mod.rs")).as_str())) + .copied() +} + +fn resolve_rs_use(name: &str, dir: &str, index: &HashMap<&str, usize>) -> Option { + // Sube hasta la carpeta `src` más cercana: es la raíz del crate. + let mut cursor = dir; + loop { + if cursor == "src" || cursor.ends_with("/src") { + return index + .get(join(cursor, &format!("{name}.rs")).as_str()) + .or_else(|| index.get(join(cursor, &format!("{name}/mod.rs")).as_str())) + .copied(); + } + cursor = cursor.rsplit_once('/')?.0; + } +} + +/// Nodo al que pertenece un archivo: baja por las carpetas expandidas y se detiene en la primera colapsada. +fn group_of(path: &str, expanded: &HashSet) -> String { + let parts: Vec<&str> = path.split('/').collect(); + let mut prefix = String::new(); + + for (index, part) in parts.iter().enumerate() { + if !prefix.is_empty() { + prefix.push('/'); + } + prefix.push_str(part); + + if index == parts.len() - 1 || !expanded.contains(&prefix) { + return prefix; + } + } + prefix +} + +fn aggregate(graph: &FileGraph, expanded: &HashSet) -> DepGraph { + let mut nodes: BTreeMap = BTreeMap::new(); + let mut dirs: BTreeSet = BTreeSet::new(); + let mut max_depth = 0; + + let groups: Vec = graph + .files + .iter() + .map(|(path, bytes)| { + let depth = path.matches('/').count() as u32; + max_depth = max_depth.max(depth); + + let parts: Vec<&str> = path.split('/').collect(); + for end in 1..parts.len() { + dirs.insert(parts[..end].join("/")); + } + + let id = group_of(path, expanded); + let kind = if id == *path { "file" } else { "dir" }; + let label = id.rsplit('/').next().unwrap_or(&id).to_string(); + let node = nodes.entry(id.clone()).or_insert(GraphNode { + id: id.clone(), + label, + files: 0, + bytes: 0, + kind, + }); + node.files += 1; + node.bytes += bytes; + id + }) + .collect(); + + let mut weights: BTreeMap<(String, String), u32> = BTreeMap::new(); + for (from, to) in &graph.edges { + let (a, b) = (&groups[*from], &groups[*to]); + if a != b { + *weights.entry((a.clone(), b.clone())).or_insert(0) += 1; + } + } + + DepGraph { + max_depth, + file_count: graph.files.len() as u32, + dirs: dirs.into_iter().take(MAX_DIRS).collect(), + nodes: nodes.into_values().collect(), + edges: weights + .into_iter() + .map(|((from, to), weight)| GraphEdge { from, to, weight }) + .collect(), + } +} + +/// Recorrido inverso: quién importa (directa o transitivamente) a los archivos semilla. +fn impact_of(graph: &FileGraph, seeds: &[String]) -> Vec { + let index: HashMap<&str, usize> = graph + .files + .iter() + .enumerate() + .map(|(i, (path, _))| (path.as_str(), i)) + .collect(); + + let mut dependents: Vec> = vec![Vec::new(); graph.files.len()]; + for (from, to) in &graph.edges { + dependents[*to].push(*from); + } + + let seed_ids: HashSet = seeds + .iter() + .filter_map(|path| index.get(path.as_str()).copied()) + .collect(); + let mut seen = seed_ids.clone(); + let mut queue: Vec = seed_ids.iter().copied().collect(); + + while let Some(current) = queue.pop() { + for dependent in &dependents[current] { + if seen.insert(*dependent) { + queue.push(*dependent); + } + } + } + + let mut affected: Vec = seen + .difference(&seed_ids) + .map(|i| graph.files[*i].0.clone()) + .take(MAX_IMPACT) + .collect(); + affected.sort(); + affected +} + +#[cfg(test)] +mod tests { + use super::*; + + fn index(paths: &[&'static str]) -> HashMap<&'static str, usize> { + paths.iter().enumerate().map(|(i, p)| (*p, i)).collect() + } + + #[test] + fn resolves_relative_alias_and_ts_style_js_imports() { + let idx = index(&[ + "src/lib/a.ts", + "src/lib/b.svelte", + "src/lib/ui/index.ts", + "src/main.ts", + ]); + let source = "import a from './a.js';\nimport B from '$lib/b.svelte';\nexport * from './ui';\nimport x from 'react';"; + let mut found = imports_of("src/lib/c.ts", source, &idx); + found.sort_unstable(); + assert_eq!(found, vec![0, 1, 2]); + } + + #[test] + fn resolves_rust_modules() { + let idx = index(&[ + "src/lib.rs", + "src/core/mod.rs", + "src/core/error.rs", + "src/config.rs", + ]); + assert_eq!( + imports_of("src/lib.rs", "mod core;\nmod config;", &idx), + vec![1, 3] + ); + assert_eq!( + imports_of("src/core/mod.rs", "pub mod error;\nuse crate::config::X;", &idx), + vec![2, 3] + ); + } + + fn sample() -> FileGraph { + FileGraph { + files: vec![ + ("src/a/x.ts".into(), 10), + ("src/a/y.ts".into(), 5), + ("src/b/z.ts".into(), 1), + ("README.ts".into(), 1), + ], + // x -> z, y -> z, x -> y + edges: vec![(0, 2), (1, 2), (0, 1)], + } + } + + #[test] + fn collapsed_by_default_and_expandable_down_to_files() { + let graph = sample(); + let closed = aggregate(&graph, &HashSet::new()); + let ids: Vec<&str> = closed.nodes.iter().map(|n| n.id.as_str()).collect(); + assert_eq!(ids, vec!["README.ts", "src"]); + assert_eq!(closed.max_depth, 2); + assert_eq!(closed.dirs, vec!["src", "src/a", "src/b"]); + + let open: HashSet = ["src".to_string()].into(); + let folders = aggregate(&graph, &open); + assert_eq!(folders.nodes.len(), 3); + assert_eq!(folders.edges.len(), 1); + assert_eq!(folders.edges[0].weight, 2); + + let files: HashSet = ["src".to_string(), "src/a".to_string()].into(); + let deep = aggregate(&graph, &files); + assert!( + deep.nodes + .iter() + .any(|n| n.id == "src/a/x.ts" && n.kind == "file") + ); + assert!(deep.nodes.iter().any(|n| n.id == "src/b" && n.kind == "dir")); + } + + #[test] + fn impact_follows_dependents_transitively() { + let graph = sample(); + // z lo importan x e y; x importa a y, así que cambiar z afecta a x e y. + assert_eq!( + impact_of(&graph, &["src/b/z.ts".to_string()]), + vec!["src/a/x.ts", "src/a/y.ts"] + ); + assert_eq!( + impact_of(&graph, &["src/a/x.ts".to_string()]), + Vec::::new() + ); + assert_eq!(impact_of(&graph, &["nope.ts".to_string()]), Vec::::new()); + } +} diff --git a/src-tauri/src/features/workspace/io.rs b/src-tauri/src/features/workspace/io.rs new file mode 100644 index 0000000..921f6dc --- /dev/null +++ b/src-tauri/src/features/workspace/io.rs @@ -0,0 +1,55 @@ +use std::fs; +use std::path::Path; + +use crate::core::error::{AppError, AppResult}; + +/// Tamaño máximo que se abre en el editor. +const MAX_EDITABLE_BYTES: u64 = 5 * 1024 * 1024; + +pub fn read_text(path: &Path) -> AppResult { + let size = fs::metadata(path)?.len(); + if size > MAX_EDITABLE_BYTES { + return Err(AppError::msg( + "el archivo supera los 5 MB; ábrelo con otra herramienta", + )); + } + + let bytes = fs::read(path)?; + if bytes.iter().take(8192).any(|b| *b == 0) { + return Err(AppError::msg("archivo binario: no se puede editar como texto")); + } + Ok(String::from_utf8_lossy(&bytes).into_owned()) +} + +pub fn write_text(path: &Path, content: &str) -> AppResult<()> { + Ok(fs::write(path, content)?) +} + +pub fn create_file(path: &Path) -> AppResult<()> { + if path.exists() { + return Err(AppError::msg("ya existe un elemento con ese nombre")); + } + if let Some(parent) = path.parent() { + fs::create_dir_all(parent)?; + } + Ok(fs::write(path, "")?) +} + +pub fn create_dir(path: &Path) -> AppResult<()> { + Ok(fs::create_dir_all(path)?) +} + +pub fn rename(from: &Path, to: &Path) -> AppResult<()> { + if to.exists() { + return Err(AppError::msg("ya existe un elemento con ese nombre")); + } + Ok(fs::rename(from, to)?) +} + +pub fn delete(path: &Path) -> AppResult<()> { + if path.is_dir() { + Ok(fs::remove_dir_all(path)?) + } else { + Ok(fs::remove_file(path)?) + } +} diff --git a/src-tauri/src/features/workspace/mod.rs b/src-tauri/src/features/workspace/mod.rs new file mode 100644 index 0000000..a64cdd0 --- /dev/null +++ b/src-tauri/src/features/workspace/mod.rs @@ -0,0 +1,3 @@ +pub mod deps; +pub mod io; +pub mod tree; diff --git a/src-tauri/src/features/workspace/tree.rs b/src-tauri/src/features/workspace/tree.rs new file mode 100644 index 0000000..2d9b8d9 --- /dev/null +++ b/src-tauri/src/features/workspace/tree.rs @@ -0,0 +1,68 @@ +use std::path::Path; + +use ignore::WalkBuilder; +use serde::Serialize; + +use crate::core::error::{AppError, AppResult}; + +#[derive(Debug, Clone, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct DirEntryInfo { + pub name: String, + pub path: String, + pub is_dir: bool, +} + +/// Un walker que respeta `.gitignore` aunque la carpeta no sea (todavía) un repositorio. +pub fn walker(root: &Path) -> WalkBuilder { + let mut builder = WalkBuilder::new(root); + builder + .hidden(false) + .require_git(false) + .git_global(false) + .filter_entry(|entry| entry.file_name() != ".git"); + builder +} + +/// Contenido directo de una carpeta (carga perezosa: el árbol pide solo lo que expande). +pub fn list_dir(path: &Path) -> AppResult> { + if !path.is_dir() { + return Err(AppError::msg(format!("no es una carpeta: {}", path.display()))); + } + + let mut entries: Vec = walker(path) + .max_depth(Some(1)) + .build() + .flatten() + .filter(|entry| entry.depth() == 1) + .map(|entry| DirEntryInfo { + name: entry.file_name().to_string_lossy().into_owned(), + path: entry.path().to_string_lossy().into_owned(), + is_dir: entry.file_type().is_some_and(|kind| kind.is_dir()), + }) + .collect(); + + entries.sort_by(|a, b| { + b.is_dir + .cmp(&a.is_dir) + .then_with(|| a.name.to_lowercase().cmp(&b.name.to_lowercase())) + }); + Ok(entries) +} + +/// Lista plana de archivos (rutas relativas con `/`) para la búsqueda rápida. +pub fn list_files(root: &Path, limit: usize) -> AppResult> { + let mut files = Vec::new(); + + for entry in walker(root).build().flatten() { + if entry.file_type().is_some_and(|kind| kind.is_file()) { + if let Ok(relative) = entry.path().strip_prefix(root) { + files.push(relative.to_string_lossy().replace('\\', "/")); + } + if files.len() >= limit { + break; + } + } + } + Ok(files) +} diff --git a/src-tauri/src/infrastructure/extensions/loader.rs b/src-tauri/src/infrastructure/extensions/loader.rs deleted file mode 100644 index 577ca33..0000000 --- a/src-tauri/src/infrastructure/extensions/loader.rs +++ /dev/null @@ -1,14 +0,0 @@ -use tokio::fs; -use std::path::PathBuf; -use super::manifest::ExtensionManifest; - -pub struct ExtensionLoader; - -impl ExtensionLoader { - pub async fn load_from_dir(dir: PathBuf) -> Option<(ExtensionManifest, PathBuf)> { - let manifest_path = dir.join("manifest.json"); - let content = fs::read_to_string(manifest_path).await.ok()?; - let manifest: ExtensionManifest = serde_json::from_str(&content).ok()?; - Some((manifest, dir)) - } -} \ No newline at end of file diff --git a/src-tauri/src/infrastructure/extensions/manifest.rs b/src-tauri/src/infrastructure/extensions/manifest.rs deleted file mode 100644 index 7a6dd20..0000000 --- a/src-tauri/src/infrastructure/extensions/manifest.rs +++ /dev/null @@ -1,27 +0,0 @@ -use crate::infrastructure::utils::transport::ProtocolType; -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct ExtensionManifest { - pub id: String, - pub name: String, - pub version: String, - - /// Ruta al binario (relativa a la carpeta de la extensión) - pub main: String, - - pub activation_events: Vec, - pub contributions: Contributions, -} - -#[derive(Debug, Clone, Serialize, Deserialize, Default)] -pub struct Contributions { - pub commands: Vec, - pub protocol: ProtocolType, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct CommandContribution { - pub command: String, - pub title: String, -} \ No newline at end of file diff --git a/src-tauri/src/infrastructure/extensions/mod.rs b/src-tauri/src/infrastructure/extensions/mod.rs deleted file mode 100644 index 7bc1880..0000000 --- a/src-tauri/src/infrastructure/extensions/mod.rs +++ /dev/null @@ -1,108 +0,0 @@ -pub mod manifest; -pub mod runtime_proxy; -pub mod loader; - -use std::sync::Arc; -use std::path::PathBuf; -use dashmap::DashMap; -use tauri::AppHandle; -use serde_json::Value; - -use self::runtime_proxy::ExtensionRuntime; -use self::manifest::ExtensionManifest; -use crate::database::DbManager; -use crate::database::models::kernel::extension::Extension; - -pub struct ExtensionHost { - runtimes: DashMap>, - command_map: DashMap, - manifest_cache: DashMap, - app: AppHandle, - db: DbManager, -} - -impl ExtensionHost { - pub fn new(app: AppHandle, db: DbManager) -> Self { - Self { - runtimes: Arc::new(DashMap::new()), - command_map: Arc::new(DashMap::new()), - manifest_cache: Arc::new(DashMap::new()), - app, - db, - } - } - - pub async fn boot(&self, extensions: Vec) { - for ext in extensions { - if !ext.is_enabled { continue; } - - if let Some(raw_manifest) = ext.manifest_cache { - if let Ok(manifest) = serde_json::from_str::(&raw_manifest) { - let path = PathBuf::from(&ext.local_path); - self.register_internal(manifest, path); - } - } - } - } - - fn register_internal(&self, manifest: ExtensionManifest, path: PathBuf) { - for cmd in &manifest.contributions.commands { - self.command_map.insert(cmd.command.clone(), manifest.id.clone()); - } - self.manifest_cache.insert(manifest.id.clone(), (manifest, path)); - } - - pub async fn dispatch(&self, command: &str, params: Value) -> Result<(), String> { - let ext_id = match self.command_map.get(command) { - Some(id) => id.clone(), - None => return Ok(()), - }; - - if !self.runtimes.contains_key(&ext_id) { - self.activate(&ext_id).await?; - } - - let runtime = self.runtimes.get(&ext_id) - .ok_or_else(|| format!("Runtime lost for extension: {}", ext_id))?; - - runtime.send_request(command, params).await - } - - /// Despacha un evento y espera una respuesta (ej. para transformaciones de texto) - pub async fn dispatch_with_result(&self, command: &str, params: Value) -> Result { - let ext_id = match self.command_map.get(command) { - Some(id) => id.clone(), - None => return Ok(Value::Null), - }; - - if !self.runtimes.contains_key(&ext_id) { - self.activate(&ext_id).await?; - } - - let runtime = self.runtimes.get(&ext_id) - .ok_or_else(|| format!("Runtime lost for extension: {}", ext_id))?; - - // Nota: Asumimos que send_request en runtime_proxy puede retornar un Result - // Si tu implementación actual de runtime_proxy no lo tiene, deberás ajustarlo para retornar el Result del JSON-RPC - runtime.send_request_with_response(command, params).await - } - - async fn activate(&self, id: &str) -> Result<(), String> { - let (manifest, path) = self.manifest_cache.get(id) - .ok_or_else(|| format!("Manifest not found in cache for: {}", id))? - .clone(); - - let rt = ExtensionRuntime::start(&manifest, path, self.app.clone()).await?; - self.runtimes.insert(id.to_string(), Arc::new(rt)); - - Ok(()) - } - - pub fn shutdown_extension(&self, id: &str) { - self.runtimes.remove(id); - } - - pub fn get_registered_commands(&self) -> Vec { - self.command_map.iter().map(|kv| kv.key().clone()).collect() - } -} \ No newline at end of file diff --git a/src-tauri/src/infrastructure/extensions/runtime_proxy.rs b/src-tauri/src/infrastructure/extensions/runtime_proxy.rs deleted file mode 100644 index efbfdb4..0000000 --- a/src-tauri/src/infrastructure/extensions/runtime_proxy.rs +++ /dev/null @@ -1,76 +0,0 @@ -use super::manifest::ExtensionManifest; -use crate::infrastructure::utils::transport::{ - ProtocolType, - process::ProcessManager, - stdio::StdioTransport, - codec::CodecStrategy -}; -use std::sync::Arc; -use std::path::PathBuf; -use tauri::AppHandle; -use serde_json::{Value, json}; -use uuid::Uuid; - -pub struct ExtensionRuntime { - pub id: String, - pub transport: Arc, - pub strategy: CodecStrategy, -} - -impl ExtensionRuntime { - pub async fn start(manifest: &ExtensionManifest, base_path: PathBuf, app: AppHandle) -> Result { - let exe_path = base_path.join(&manifest.main); - - let mut child = ProcessManager::spawn_with_pipes(exe_path.to_str().unwrap(), &[])?; - let stdin = child.stdin.take().ok_or("STDIN_ERROR")?; - let stdout = child.stdout.take().ok_or("STDOUT_ERROR")?; - - let transport = Arc::new(StdioTransport::new(stdin)); - let strategy = match manifest.contributions.protocol { - ProtocolType::Stdio => CodecStrategy::LspHeader, - _ => CodecStrategy::NewLine - }; - - // Iniciamos el lector de fondo vinculando el transporte - transport.spawn_reader(stdout, format!("ext:{}", manifest.id), app); - - Ok(Self { id: manifest.id.clone(), transport, strategy }) - } - - /// Envía un comando y espera la respuesta del JSON-RPC - pub async fn send_request_with_response(&self, method: &str, params: Value) -> Result { - let id = Uuid::new_v4().to_string(); - - let request = json!({ - "jsonrpc": "2.0", - "id": id, - "method": method, - "params": params - }); - - let payload = match self.strategy { - CodecStrategy::LspHeader => { - let body = serde_json::to_string(&request).map_err(|e| e.to_string())?; - format!("Content-Length: {}\r\n\r\n{}", body.len(), body).into_bytes() - } - CodecStrategy::NewLine => { - let mut body = serde_json::to_vec(&request).map_err(|e| e.to_string())?; - body.push(b'\n'); - body - } - CodecStrategy::Raw => { - - } - }; - - // Usamos el transporte para enviar y esperar el oneshot - let response = self.transport.send_and_wait(id, payload).await?; - - // Extraer el campo "result" o "error" del estándar JSON-RPC - if let Some(error) = response.get("error") { - return Err(error.to_string()); - } - - Ok(response.get("result").unwrap_or(&Value::Null).clone()) - } -} \ No newline at end of file diff --git a/src-tauri/src/infrastructure/mod.rs b/src-tauri/src/infrastructure/mod.rs index 1f661fd..4a724ec 100644 --- a/src-tauri/src/infrastructure/mod.rs +++ b/src-tauri/src/infrastructure/mod.rs @@ -1,2 +1,2 @@ -pub mod extensions; -pub mod utils; \ No newline at end of file +pub mod process; +pub mod storage; diff --git a/src-tauri/src/infrastructure/process.rs b/src-tauri/src/infrastructure/process.rs new file mode 100644 index 0000000..d015dfc --- /dev/null +++ b/src-tauri/src/infrastructure/process.rs @@ -0,0 +1,59 @@ +use std::path::Path; +use std::process::{Command, Stdio}; + +use crate::core::error::{AppError, AppResult}; + +/// Crea un `Command` que no abre una ventana de consola en Windows. +pub fn command(program: &str) -> Command { + #[allow(unused_mut)] + let mut cmd = Command::new(program); + + #[cfg(windows)] + { + use std::os::windows::process::CommandExt; + const CREATE_NO_WINDOW: u32 = 0x0800_0000; + cmd.creation_flags(CREATE_NO_WINDOW); + } + + cmd +} + +/// Ejecuta un comando y devuelve su stdout (sin recortar). Si falla devuelve stderr. +pub fn run(program: &str, cwd: &Path, args: &[&str]) -> AppResult> { + let output = command(program) + .args(args) + .current_dir(cwd) + .stdin(Stdio::null()) + .output() + .map_err(|e| AppError::msg(format!("no se pudo ejecutar `{program}`: {e}")))?; + + if output.status.success() { + Ok(output.stdout) + } else { + let stderr = String::from_utf8_lossy(&output.stderr).trim().to_string(); + Err(AppError::Git(if stderr.is_empty() { + format!("`{program} {}` terminó con {}", args.join(" "), output.status) + } else { + stderr + })) + } +} + +/// Ejecuta trabajo bloqueante fuera del hilo principal de Tauri. +pub async fn blocking(work: F) -> AppResult +where + F: FnOnce() -> AppResult + Send + 'static, + T: Send + 'static, +{ + tauri::async_runtime::spawn_blocking(work) + .await + .map_err(|e| AppError::msg(e.to_string()))? +} + +/// Milisegundos desde epoch. +pub fn now_ms() -> i64 { + std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .map(|d| d.as_millis() as i64) + .unwrap_or(0) +} diff --git a/src-tauri/src/infrastructure/storage.rs b/src-tauri/src/infrastructure/storage.rs new file mode 100644 index 0000000..0da9676 --- /dev/null +++ b/src-tauri/src/infrastructure/storage.rs @@ -0,0 +1,40 @@ +use std::fs; +use std::path::Path; + +use serde::Serialize; +use serde::de::DeserializeOwned; + +use crate::core::error::AppResult; + +/// Lee un JSON tipado. Devuelve `None` si el archivo no existe. +pub fn read_json(path: &Path) -> AppResult> { + if !path.exists() { + return Ok(None); + } + + let raw = fs::read_to_string(path)?; + Ok(Some(serde_json::from_str(&raw)?)) +} + +/// Escribe un JSON de forma atómica (archivo temporal + rename) para no corromper +/// el estado si la app se cierra a mitad de la escritura. +pub fn write_json_atomic(path: &Path, value: &T) -> AppResult<()> { + if let Some(parent) = path.parent() { + fs::create_dir_all(parent)?; + } + + let tmp = path.with_extension("json.tmp"); + fs::write(&tmp, serde_json::to_vec_pretty(value)?)?; + fs::rename(&tmp, path)?; + Ok(()) +} + +/// Hash FNV-1a estable (no criptográfico) para derivar nombres de archivo de una ruta. +pub fn stable_key(input: &str) -> String { + let mut hash: u64 = 0xcbf29ce484222325; + for byte in input.as_bytes() { + hash ^= u64::from(*byte); + hash = hash.wrapping_mul(0x100000001b3); + } + format!("{hash:016x}") +} diff --git a/src-tauri/src/infrastructure/utils/mod.rs b/src-tauri/src/infrastructure/utils/mod.rs deleted file mode 100644 index 0867ed1..0000000 --- a/src-tauri/src/infrastructure/utils/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod transport; -pub mod validation_drivers; \ No newline at end of file diff --git a/src-tauri/src/infrastructure/utils/transport/codec/line_stream.rs b/src-tauri/src/infrastructure/utils/transport/codec/line_stream.rs deleted file mode 100644 index 425959f..0000000 --- a/src-tauri/src/infrastructure/utils/transport/codec/line_stream.rs +++ /dev/null @@ -1,13 +0,0 @@ -pub struct LineCodec; - -impl LineCodec { - /// Envuelve cualquier string en una línea para el transporte - pub fn encode(data: &str) -> Vec { - format!("{}\n", data).into_bytes() - } - - /// Limpia el input del stream - pub fn decode(data: &str) -> String { - data.trim().to_string() - } -} \ No newline at end of file diff --git a/src-tauri/src/infrastructure/utils/transport/codec/mod.rs b/src-tauri/src/infrastructure/utils/transport/codec/mod.rs deleted file mode 100644 index 947da8e..0000000 --- a/src-tauri/src/infrastructure/utils/transport/codec/mod.rs +++ /dev/null @@ -1,64 +0,0 @@ -pub mod rpc_json; -pub mod line_stream; -pub mod raw_bytes; - -use serde::{Deserialize, Serialize}; - -pub use rpc_json::JsonRpcMessage; -pub use line_stream::LineCodec; -pub use raw_bytes::RawCodec; - -/// Representa cualquier dato que pueda viajar por el bridge. -pub enum BridgePayload { - /// Para protocolos como LSP o MCP. - JsonRpc(JsonRpcMessage), - /// Para flujos de texto plano (logs, shell outputs). - Line(String), - /// Para datos binarios (VCS patches, imágenes, archivos). - Raw(Vec), -} - -/// Define cómo se debe empaquetar el payload para el transporte. -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] -pub enum CodecStrategy { - /// Formato: Content-Length: n\r\n\r\n{json} - LspHeader, - /// Formato: {data}\n - NewLine, - /// Formato: [bytes] - Raw, -} - -impl BridgePayload { - /// Helper maestro: Transforma cualquier payload en bytes según la estrategia. - /// Esto es lo que llamarán tus transports (Stdio, WS, HTTP). - pub fn encode(self, strategy: CodecStrategy) -> Result, String> { - match (self, strategy) { - // Caso LSP / MCP - (BridgePayload::JsonRpc(msg), CodecStrategy::LspHeader) => { - let json = serde_json::to_string(&msg).map_err(|e| e.to_string())?; - Ok(format!("Content-Length: {}\r\n\r\n{}", json.len(), json).into_bytes()) - }, - - // Caso JSON-RPC por línea (algunos MCPs simples) - (BridgePayload::JsonRpc(msg), CodecStrategy::NewLine) => { - let json = serde_json::to_string(&msg).map_err(|e| e.to_string())?; - Ok(LineCodec::encode(&json)) - }, - - // Caso Línea de texto - (BridgePayload::Line(text), CodecStrategy::NewLine) => { - Ok(LineCodec::encode(&text)) - }, - - // Caso Binario Puro - (BridgePayload::Raw(bytes), CodecStrategy::Raw) => { - Ok(RawCodec::encode(bytes)) - }, - - // Fallbacks de seguridad - (BridgePayload::Line(text), CodecStrategy::Raw) => Ok(text.into_bytes()), - _ => Err("Combinación de Payload y Estrategia no válida".into()), - } - } -} \ No newline at end of file diff --git a/src-tauri/src/infrastructure/utils/transport/codec/raw_bytes.rs b/src-tauri/src/infrastructure/utils/transport/codec/raw_bytes.rs deleted file mode 100644 index 376816c..0000000 --- a/src-tauri/src/infrastructure/utils/transport/codec/raw_bytes.rs +++ /dev/null @@ -1,13 +0,0 @@ -pub struct RawCodec; - -impl RawCodec { - /// Pasa los bytes directamente - pub fn encode(data: Vec) -> Vec { - data - } - - /// Simplemente un alias para consistencia - pub fn decode(data: Vec) -> Vec { - data - } -} \ No newline at end of file diff --git a/src-tauri/src/infrastructure/utils/transport/codec/rpc_json.rs b/src-tauri/src/infrastructure/utils/transport/codec/rpc_json.rs deleted file mode 100644 index 6549f2a..0000000 --- a/src-tauri/src/infrastructure/utils/transport/codec/rpc_json.rs +++ /dev/null @@ -1,26 +0,0 @@ -use serde::{Deserialize, Serialize}; -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize, Clone)] -pub struct JsonRpcMessage { - pub jsonrpc: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub id: Option, - pub method: Option, - pub params: Option, - pub result: Option, - pub error: Option, -} - -impl JsonRpcMessage { - pub fn notification(method: &str, params: Value) -> Self { - Self { - jsonrpc: "2.0".to_string(), - id: None, - method: Some(method.to_string()), - params: Some(params), - result: None, - error: None, - } - } -} \ No newline at end of file diff --git a/src-tauri/src/infrastructure/utils/transport/http.rs b/src-tauri/src/infrastructure/utils/transport/http.rs deleted file mode 100644 index 7e9292b..0000000 --- a/src-tauri/src/infrastructure/utils/transport/http.rs +++ /dev/null @@ -1,38 +0,0 @@ -use reqwest::Client; -use serde_json::Value; - -pub struct HttpTransport { - client: Client, - base_url: String, -} - -impl HttpTransport { - pub fn new(base_url: &str) -> Self { - Self { - client: Client::new(), - base_url: base_url.to_string(), - } - } - - /// Envía un JSON-RPC o petición REST vía POST - pub async fn post(&self, path: &str, body: Value) -> Result { - let url = format!("{}{}", self.base_url, path); - let res = self.client.post(&url) - .json(&body) - .send() - .await - .map_err(|e| e.to_string())?; - - res.json::().await.map_err(|e| e.to_string()) - } - - /// Para interactuar con APIs que devuelven streams (muy importante para AI) - pub async fn post_stream(&self, path: &str, body: Value) -> Result { - let url = format!("{}{}", self.base_url, path); - self.client.post(&url) - .json(&body) - .send() - .await - .map_err(|e| e.to_string()) - } -} \ No newline at end of file diff --git a/src-tauri/src/infrastructure/utils/transport/mod.rs b/src-tauri/src/infrastructure/utils/transport/mod.rs deleted file mode 100644 index 64e7224..0000000 --- a/src-tauri/src/infrastructure/utils/transport/mod.rs +++ /dev/null @@ -1,23 +0,0 @@ -pub mod ws; -pub mod tcp; -pub mod http; -pub mod stdio; -pub mod process; -pub mod codec; - -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] -#[serde(rename_all = "snake_case")] -pub enum ProtocolType { - Stdio, - Tcp, - Http, - WebSocket, -} - -impl Default for ProtocolType { - fn default() -> Self { - ProtocolType::Stdio - } -} \ No newline at end of file diff --git a/src-tauri/src/infrastructure/utils/transport/process.rs b/src-tauri/src/infrastructure/utils/transport/process.rs deleted file mode 100644 index 089e1e1..0000000 --- a/src-tauri/src/infrastructure/utils/transport/process.rs +++ /dev/null @@ -1,17 +0,0 @@ -use tokio::process::Command; -use std::process::Stdio; - -pub struct ProcessManager; - -impl ProcessManager { - /// Spawnea un comando y devuelve sus pipes - pub fn spawn_with_pipes(cmd: &str, args: &[&str]) -> Result { - Command::new(cmd) - .args(args) - .stdin(Stdio::piped()) - .stdout(Stdio::piped()) - .stderr(Stdio::piped()) - .spawn() - .map_err(|e| format!("Fallo al iniciar proceso {}: {}", cmd, e)) - } -} \ No newline at end of file diff --git a/src-tauri/src/infrastructure/utils/transport/stdio.rs b/src-tauri/src/infrastructure/utils/transport/stdio.rs deleted file mode 100644 index b249f5b..0000000 --- a/src-tauri/src/infrastructure/utils/transport/stdio.rs +++ /dev/null @@ -1,94 +0,0 @@ -use tokio::process::{ChildStdin, ChildStdout}; -use tokio::io::{AsyncReadExt, AsyncWriteExt, BufReader, AsyncBufReadExt}; -use tokio::sync::{Mutex, oneshot}; -use std::sync::Arc; -use dashmap::DashMap; -use tauri::{AppHandle, Emitter}; -use serde_json::Value; - -// Almacén de respuestas pendientes: ID -> Sender para notificar al awaiter -type ResponseMap = Arc>>; - -#[derive(Clone)] -pub struct StdioTransport { - stdin: Arc>, - pending_responses: ResponseMap, -} - -impl StdioTransport { - pub fn new(stdin: ChildStdin) -> Self { - Self { - stdin: Arc::new(Mutex::new(stdin)), - pending_responses: Arc::new(DashMap::new()), - } - } - - pub fn spawn_reader(&self, stdout: ChildStdout, event_channel: String, app: AppHandle) { - let pending_responses = Arc::clone(&self.pending_responses); - - tokio::spawn(async move { - let mut reader = BufReader::new(stdout); - let mut line = String::new(); - - loop { - line.clear(); - if reader.read_line(&mut line).await.unwrap_or(0) == 0 { break; } - - let mut message_body: Option = None; - - if line.starts_with("Content-Length: ") { - if let Ok(len) = line["Content-Length: ".len()..].trim().parse::() { - let mut separator = String::new(); - let _ = reader.read_line(&mut separator).await; // Leer el \r\n - let mut body = vec![0u8; len]; - if reader.read_exact(&mut body).await.is_ok() { - message_body = serde_json::from_slice(&body).ok(); - } - } - } else { - // Si es una línea simple de JSON - message_body = serde_json::from_str(&line).ok(); - } - - if let Some(json) = message_body { - // Si el mensaje tiene un "id" y no tiene "method", es una RESPUESTA a algo que enviamos - if let Some(id_val) = json.get("id") { - let id_str = id_val.to_string(); - if json.get("method").is_none() { - if let Some((_, tx)) = pending_responses.remove(&id_str) { - let _ = tx.send(json); - continue; // No emitir a la UI si es una respuesta interna capturada - } - } - } - - // Si no es una respuesta interna, es un evento/notificación para el frontend - let _ = app.emit(&event_channel, json); - } - } - }); - } - - pub async fn send_and_wait(&self, id: String, data: Vec) -> Result { - let (tx, rx) = oneshot::channel(); - - // CORRECCIÓN: Clonamos 'id' para que el original siga vivo en este scope - self.pending_responses.insert(id.clone(), tx); - - { - let mut stdin = self.stdin.lock().await; - stdin.write_all(&data).await.map_err(|e| e.to_string())?; - stdin.flush().await.map_err(|e| e.to_string())?; - } - - match tokio::time::timeout(std::time::Duration::from_secs(30), rx).await { - Ok(Ok(response)) => Ok(response), - Ok(Err(_)) => Err("Canal de respuesta cerrado prematuramente".to_string()), - Err(_) => { - // Ahora podemos usar 'id' aquí porque no se movió en el insert - self.pending_responses.remove(&id); - Err("Timeout esperando respuesta de la extensión".to_string()) - } - } - } -} \ No newline at end of file diff --git a/src-tauri/src/infrastructure/utils/transport/tcp.rs b/src-tauri/src/infrastructure/utils/transport/tcp.rs deleted file mode 100644 index ac0f9a4..0000000 --- a/src-tauri/src/infrastructure/utils/transport/tcp.rs +++ /dev/null @@ -1,27 +0,0 @@ -use tokio::net::TcpStream; -use tokio::io::{AsyncReadExt, AsyncWriteExt}; -use std::error::Error; - -pub struct TcpExternal { - addr: String, -} - -impl TcpExternal { - pub fn new(addr: &str) -> Self { - Self { addr: addr.to_string() } - } - - pub async fn send_and_receive(&self, payload: Vec) -> Result, Box> { - let mut stream = TcpStream::connect(&self.addr).await?; - - // Enviar - stream.write_all(&payload).await?; - - // Leer respuesta (buffer simple, idealmente usar Frames) - let mut buffer = vec![0; 4096]; - let n = stream.read(&mut buffer).await?; - buffer.truncate(n); - - Ok(buffer) - } -} \ No newline at end of file diff --git a/src-tauri/src/infrastructure/utils/transport/ws.rs b/src-tauri/src/infrastructure/utils/transport/ws.rs deleted file mode 100644 index 30a7778..0000000 --- a/src-tauri/src/infrastructure/utils/transport/ws.rs +++ /dev/null @@ -1,44 +0,0 @@ -use futures_util::{StreamExt, SinkExt}; -use tokio_tungstenite::{connect_async, tungstenite::protocol::Message}; -use tokio::sync::mpsc::{channel, Sender}; -use tauri::{AppHandle, Emitter}; - -pub struct WebSocketTransport { - tx: Sender, -} - -impl WebSocketTransport { - pub async fn connect(url: &str, event_channel: String, app: AppHandle) -> Result { - let (ws_stream, _) = connect_async(url).await.map_err(|e| e.to_string())?; - let (mut write, mut read) = ws_stream.split(); - let (tx, mut rx) = channel::(100); - - // Task: Outgoing (Escritura) - tokio::spawn(async move { - while let Some(msg) = rx.recv().await { - let _ = write.send(msg).await; - } - }); - - // Task: Incoming (Lectura) - tokio::spawn(async move { - while let Some(Ok(msg)) = read.next().await { - match msg { - Message::Text(text) => { - let _ = app.emit(&event_channel, text.to_string()); - }, - Message::Binary(bin) => { - let _ = app.emit(&format!("{}:raw", event_channel), bin.to_vec()); - }, - _ => {} - } - } - }); - - Ok(Self { tx }) - } - - pub async fn send(&self, text: &str) -> Result<(), String> { - self.tx.send(Message::Text(text.into())).await.map_err(|e| e.to_string()) - } -} \ No newline at end of file diff --git a/src-tauri/src/infrastructure/utils/validation_drivers/cli.rs b/src-tauri/src/infrastructure/utils/validation_drivers/cli.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/infrastructure/utils/validation_drivers/custom.rs b/src-tauri/src/infrastructure/utils/validation_drivers/custom.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/infrastructure/utils/validation_drivers/mod.rs b/src-tauri/src/infrastructure/utils/validation_drivers/mod.rs deleted file mode 100644 index f4e7b02..0000000 --- a/src-tauri/src/infrastructure/utils/validation_drivers/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod cli; -pub mod custom; -pub mod network; \ No newline at end of file diff --git a/src-tauri/src/infrastructure/utils/validation_drivers/network.rs b/src-tauri/src/infrastructure/utils/validation_drivers/network.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 43fec7a..86937f3 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -1,27 +1,16 @@ -mod config; mod commands; +mod config; +mod core; mod features; mod infrastructure; -mod persistence; -use std::sync::Mutex; -use std::path::PathBuf; -use tauri::Manager; -use crate::config::AppConfig; -use crate::persistence::DbManager; -use crate::domain::runtime::fs::worker::{IndexingWorker, IndexingTask}; -use crate::domain::runtime::terminal::manager::TerminalManager; +use std::sync::Arc; -use crate::commands::agent::*; -use crate::commands::kernel::{fs::*, terminal::*}; -use crate::commands::services::{bridge::*, orchestration::*}; -use crate::commands::config::*; -use crate::services::external::ExternalService; +use tauri::Manager; -/// Estado global de la aplicación para acceso rápido desde comandos -pub struct AppState { - pub config: Mutex, -} +use crate::config::ConfigStore; +use crate::core::state::{AppState, Paths}; +use crate::features::sessions::manager::SessionManager; #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { @@ -29,106 +18,82 @@ pub fn run() { .plugin(tauri_plugin_os::init()) .plugin(tauri_plugin_opener::init()) .plugin(tauri_plugin_dialog::init()) + .plugin(tauri_plugin_notification::init()) .plugin(tauri_plugin_window_state::Builder::default().build()) .setup(|app| { let handle = app.handle().clone(); - let config_dir = handle.path().app_config_dir().expect("No se pudo obtener config_dir"); - - if !config_dir.exists() { - std::fs::create_dir_all(&config_dir).unwrap(); - } - - let initial_config = AppConfig::load(config_dir.clone()); - let last_project = initial_config.last_project_path.clone(); - - // Determinar la raíz del proyecto para el BridgeService - let project_root = last_project - .as_ref() - .map(PathBuf::from) - .unwrap_or_else(|| config_dir.clone()); - - let external_service = ExternalService::new(project_root); - let terminal_manager = TerminalManager::new(handle.clone(), db.clone()); - - tauri::async_runtime::block_on(async move { - let db_path = config_dir.join("modus_zero.db"); - - let db_manager = DbManager::new(&db_path) - .await - .expect("Fallo crítico al inicializar la base de datos"); - - let indexer_tx = IndexingWorker::spawn(db_manager.clone()); - - if let Some(path_str) = last_project { - let project_path = PathBuf::from(path_str); - if project_path.exists() { - let _ = indexer_tx.send(IndexingTask::FullScan(project_path)).await; - } - } - - // Registramos los servicios en el estado de Tauri - handle.manage(db_manager); - handle.manage(indexer_tx); - handle.manage(terminal_manager); - handle.manage(external_service); - handle.manage(AppState { - config: Mutex::new(initial_config), - }); + let paths = Paths::resolve(&handle)?; + let config = Arc::new(ConfigStore::load(&paths)); + + let sessions = SessionManager::new(handle, paths.clone(), config.clone()); + sessions.load_persisted(); + sessions.start_hook_server()?; + sessions.start_ticker(); + + app.manage(AppState { + paths, + config, + sessions, }); + // En macOS se conservan los controles nativos de la ventana. + #[cfg(target_os = "macos")] + if let Some(window) = app.get_webview_window("main") { + let _ = window.set_decorations(true); + } Ok(()) }) + .on_window_event(|window, event| { + if let tauri::WindowEvent::Destroyed = event { + if let Some(state) = window.try_state::() { + state.sessions.shutdown(); + } + } + }) .invoke_handler(tauri::generate_handler![ + // --- App --- + commands::app::app_info, + commands::app::notify_test, + commands::app::profile_check, // --- Configuración --- - get_config, - update_config, - - // *** Kernel *** - - // --- Filesystem --- - get_file_tree, - read_file, - write_file, - create_new_file, - create_new_dir, - rename_path, - delete_path, - global_search, - quick_open, - + commands::config::config_get, + commands::config::config_update, + commands::config::config_set_project, + // --- Sesiones --- + commands::session::session_list, + commands::session::session_create, + commands::session::session_restart, + commands::session::session_stop, + commands::session::session_remove, + commands::session::session_rename, + commands::session::session_set_reviewed, + commands::session::session_graph, + commands::session::session_refresh, // --- Terminal --- - term_create_session, - term_write, - term_resize, - term_get_context, - term_get_history, - term_clear_history, - - // *** Services *** - - // --- Bridge (Comandos directos al BridgeService) --- - boot_runtime, - stop_runtime, - load_config, - register_provider, - activate_provider, - ai_completion, - vcs_action, - - // --- Orchestration --- - discover_recommendations_for_project, - - // --- Agents --- - send_chat_message, - get_chat_history, - clear_chat_history, - add_agent_thought, - get_agent_session_history, - sync_execution_task, - update_thought_status, - report_task_tdd_status, - discover_agent_skills, + commands::terminal::term_attach, + commands::terminal::term_detach, + commands::terminal::term_write, + commands::terminal::term_resize, + // --- Archivos --- + commands::workspace::fs_list_dir, + commands::workspace::fs_list_files, + commands::workspace::fs_read, + commands::workspace::fs_write, + commands::workspace::fs_create_file, + commands::workspace::fs_create_dir, + commands::workspace::fs_rename, + commands::workspace::fs_delete, + commands::workspace::fs_graph, + commands::workspace::fs_impact, + // --- Revisión (git) --- + commands::review::git_info, + commands::review::review_changes, + commands::review::review_file, + commands::review::review_commit, + // --- Kanban --- + commands::kanban::kanban_load, + commands::kanban::kanban_save, ]) .run(tauri::generate_context!()) .expect("error while running MOD0"); -} \ No newline at end of file +} diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 7cb26e7..975a7c7 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1,3 +1,4 @@ +// Evita la ventana de consola extra en Windows (release). #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] fn main() { diff --git a/src-tauri/src/persistence/database/mod.rs b/src-tauri/src/persistence/database/mod.rs deleted file mode 100644 index 38409e6..0000000 --- a/src-tauri/src/persistence/database/mod.rs +++ /dev/null @@ -1,36 +0,0 @@ -pub mod models; -pub mod repositories; - -use sqlx::sqlite::{SqliteConnectOptions, SqlitePool}; -use std::path::Path; -use std::str::FromStr; -pub use repositories::Repository; - -#[derive(Clone)] -pub struct DbManager { - pub pool: SqlitePool, -} - -impl DbManager { - pub async fn new(db_path: &Path) -> Result> { - let db_url = format!("sqlite:{}", db_path.to_string_lossy()); - - let opts = SqliteConnectOptions::from_str(&db_url)? - .create_if_missing(true) - .journal_mode(sqlx::sqlite::SqliteJournalMode::Wal) - .synchronous(sqlx::sqlite::SqliteSynchronous::Normal); - - let pool = SqlitePool::connect_with(opts).await?; - - sqlx::migrate!("./migrations") - .run(&pool) - .await?; - - Ok(Self { pool }) - } - - /// Crea una instancia del repositorio vinculada al ciclo de vida del pool de la DB. - pub fn repository(&self) -> Repository<'_> { - Repository::new(&self.pool) - } -} \ No newline at end of file diff --git a/src-tauri/src/persistence/database/models/file.rs b/src-tauri/src/persistence/database/models/file.rs deleted file mode 100644 index 323fe9b..0000000 --- a/src-tauri/src/persistence/database/models/file.rs +++ /dev/null @@ -1,23 +0,0 @@ -use serde::{Deserialize, Serialize}; -use chrono::{DateTime, Utc}; -use sqlx::FromRow; - -/// Categorización binaria de archivos para determinar estrategias de lectura y procesamiento por parte de la IA. -/// - `Text`: Archivo de texto visible y editable por el `Text Editor`. -/// - `Binary`: Archivo visible por previewers específicos, no editables. -#[derive(Debug, Serialize, Deserialize, sqlx::Type)] -#[sqlx(rename_all = "lowercase")] -pub enum FileType { - Text, - Binary, -} - -/// Almacena atributos físicos y lógicos de los archivos, permitiendo al sistema identificar lenguajes de programación y cambios recientes. -#[derive(Debug, Serialize, Deserialize, FromRow)] -pub struct FileMetadata { - pub path: String, - pub size: i64, - pub last_modified: DateTime, - pub file_type: Option, - pub project_path: String, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/database/models/mod.rs b/src-tauri/src/persistence/database/models/mod.rs deleted file mode 100644 index b048fcb..0000000 --- a/src-tauri/src/persistence/database/models/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod file; -pub mod skill; \ No newline at end of file diff --git a/src-tauri/src/persistence/database/models/skill.rs b/src-tauri/src/persistence/database/models/skill.rs deleted file mode 100644 index 5c40a34..0000000 --- a/src-tauri/src/persistence/database/models/skill.rs +++ /dev/null @@ -1,16 +0,0 @@ -use serde::{Deserialize, Serialize}; -use chrono::{DateTime, Utc}; -use sqlx::FromRow; - -/// Biblioteca de funciones y prompts especializados que el agente puede invocar para resolver problemas específicos. -#[derive(Debug, Serialize, Deserialize, FromRow)] -pub struct Skill { - pub id: i64, - pub name: String, - pub description: Option, - pub tags: String, - pub file_path: Option, - pub usage_count: i64, - pub last_used: Option>, - pub created_at: DateTime, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/database/repositories/files_repo/mod.rs b/src-tauri/src/persistence/database/repositories/files_repo/mod.rs deleted file mode 100644 index 2036909..0000000 --- a/src-tauri/src/persistence/database/repositories/files_repo/mod.rs +++ /dev/null @@ -1,19 +0,0 @@ -use super::file_metadata::FileMetadata; -use super::Repository; - -impl<'a> Repository<'a> { - /// Actualiza metadatos e índice de contenido en una transacción atómica. - /// - /// ### Parámetros - /// * `meta`: Estructura con los metadatos del archivo. - /// * `content`: Contenido para el índice FTS5. - pub async fn update_file_full(&self, meta: &FileMetadata, content: &str) -> sqlx::Result<()> { - sqlx::query!( - "INSERT OR REPLACE INTO file_metadata (path, last_modified, size, file_type, language_id, project_path) - VALUES (?, ?, ?, ?, ?, ?)", - meta.path, meta.last_modified, meta.size, meta.file_type, meta.language_id, meta.project_path - ).execute(&mut *tx).await?; - - Ok(()) - } -} \ No newline at end of file diff --git a/src-tauri/src/persistence/database/repositories/files_repo/test_files_repo.rs b/src-tauri/src/persistence/database/repositories/files_repo/test_files_repo.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/persistence/database/repositories/mod.rs b/src-tauri/src/persistence/database/repositories/mod.rs deleted file mode 100644 index 3d9af8f..0000000 --- a/src-tauri/src/persistence/database/repositories/mod.rs +++ /dev/null @@ -1,12 +0,0 @@ -pub mod skills_repo; -pub mod files_repo; - -pub struct Repository<'a> { - pub pool: &'a sqlx::SqlitePool, -} - -impl<'a> Repository<'a> { - pub fn new(pool: &'a sqlx::SqlitePool) -> Self { - Self { pool } - } -} \ No newline at end of file diff --git a/src-tauri/src/persistence/database/repositories/skills_repo/mod.rs b/src-tauri/src/persistence/database/repositories/skills_repo/mod.rs deleted file mode 100644 index df17c14..0000000 --- a/src-tauri/src/persistence/database/repositories/skills_repo/mod.rs +++ /dev/null @@ -1,87 +0,0 @@ -use sqlx::{QueryBuilder, Sqlite}; -use chrono::{DateTime, Utc}; -use super::skill::Skill; -use super::Repository; - -impl<'a> Repository<'a> { - /// Registra o actualiza una habilidad mediante una operación UPSERT. - /// - /// ### Parámetros - /// * `skill`: Estructura con la definición de la habilidad. - pub async fn upsert_skill(&self, skill: &Skill) -> sqlx::Result<()> { - sqlx::query!( - r#"INSERT INTO skill (id, name, description, file_path, tags) - VALUES (?, ?, ?, ?, ?) - ON CONFLICT(id) DO UPDATE SET - description = excluded.description, - file_path = excluded.file_path, - tags = excluded.tags"#, - skill.id, skill.name, skill.description, skill.file_path, skill.tags - ) - .execute(self.pool).await?; - Ok(()) - } - - /// Recupera el catálogo completo de habilidades registradas. - /// - /// ### Retorna - /// Un vector con todas las estructuras `Skill`. - pub async fn get_all_skills(&self) -> sqlx::Result> { - sqlx::query_as!( - Skill, - r#"SELECT - id as "id!", - name as "name!", - description, - file_path, - tags, - usage_count as "usage_count!", - last_used as "last_used: DateTime", - created_at as "created_at!: DateTime" - FROM skill"# - ) - .fetch_all(self.pool).await - } - - /// Filtra habilidades basadas en un conjunto de etiquetas (operación OR). - /// - /// ### Parámetros - /// * `tags`: Vector de cadenas de texto con las etiquetas a buscar. - pub async fn get_skills_by_tags(&self, tags: Vec) -> sqlx::Result> { - if tags.is_empty() { - return Ok(vec![]); - } - - let mut query_builder: QueryBuilder = QueryBuilder::new( - "SELECT id, name, description, file_path, tags FROM skill WHERE " - ); - - for (i, tag) in tags.iter().enumerate() { - if i > 0 { - query_builder.push(" OR "); - } - query_builder.push("tags LIKE "); - query_builder.push_bind(format!("%{}%", tag)); - } - - query_builder - .build_query_as::() - .fetch_all(self.pool) - .await - } - - /// Incrementa el contador de uso y actualiza la marca temporal de una habilidad. - /// - /// ### Parámetros - /// * `skill_id`: Identificador único de la habilidad. - pub async fn track_skill_usage(&self, skill_id: i64) -> sqlx::Result<()> { - let now = Utc::now(); - sqlx::query!( - "UPDATE skill SET usage_count = usage_count + 1, last_used = ? WHERE id = ?", - now, - skill_id - ) - .execute(self.pool).await?; - Ok(()) - } -} \ No newline at end of file diff --git a/src-tauri/src/persistence/database/repositories/skills_repo/test_skills_repo.rs b/src-tauri/src/persistence/database/repositories/skills_repo/test_skills_repo.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/persistence/in_file/mod.rs b/src-tauri/src/persistence/in_file/mod.rs deleted file mode 100644 index 772af98..0000000 --- a/src-tauri/src/persistence/in_file/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod models; -pub mod repositories; \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/global_config/ai_config.rs b/src-tauri/src/persistence/in_file/models/global_config/ai_config.rs deleted file mode 100644 index 9301837..0000000 --- a/src-tauri/src/persistence/in_file/models/global_config/ai_config.rs +++ /dev/null @@ -1,19 +0,0 @@ -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Serialize, Deserialize, Clone)] -pub struct AiAgentsConfig { - /// Activa la telemetría y métricas de uso de IA internas. - pub stats_enabled: bool, - - /// Habilita el Command Center de chat en la barra de título. - pub chat_command_center_enabled: bool, - - /// Habilita la galería y el soporte del Model Context Protocol (MCP). - pub mcp_gallery_enabled: bool, - - /// Proveedor por defecto (ej: "ollama", "anthropic"). - pub default_provider: String, - - /// Reglas globales inyectadas en todos los prompts. - pub global_system_instructions: Option, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/global_config/editor_config.rs b/src-tauri/src/persistence/in_file/models/global_config/editor_config.rs deleted file mode 100644 index 85aa588..0000000 --- a/src-tauri/src/persistence/in_file/models/global_config/editor_config.rs +++ /dev/null @@ -1,109 +0,0 @@ -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum AutoSaveStrategy { - /// No guardar automáticamente. - Off, - /// Guardar tras un retraso de inactividad (ms). - AfterDelay, - /// Guardar cuando el editor pierde el foco. - OnFocusChange, - /// Guardar cuando la ventana principal pierde el foco. - OnWindowChange, -} - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum FormatOnStrategy { - /// No formatear automáticamente. - Never, - /// Formatear al guardar. - Save, - /// Formatear al pegar código. - Paste, - /// Formatear mientras se escribe. - Type, -} - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum BracketPairColorization { - /// Desactivado. - Independent, - /// Los colores se comparten entre diferentes tipos de llaves. - Shared, - /// Los colores son independientes por tipo de llave (recomendado). - IndependentColorPoolPerBracketType, -} - - -#[derive(Debug, Serialize, Deserialize, Clone)] -#[serde(rename_all = "snake_case")] -pub enum RenderWhitespace { - None, - Boundary, - Selection, - All, -} - -#[derive(Debug, Serialize, Deserialize, Clone)] -#[serde(rename_all = "snake_case")] -pub enum CursorStyle { - Block, - Line, - Underline, - LineThin, -} - -/// Configuraciones exclusivas del motor de edición de texto. -#[derive(Debug, Serialize, Deserialize, Clone)] -pub struct EditorConfig { - /// Familia de fuente (ej: "Fira Code", "JetBrains Mono"). - pub font_family: String, - /// Tamaño de fuente en pixeles. - pub font_size: u32, - /// Habilita ligaduras de fuente. - pub font_ligatures: bool, - /// Altura de línea (proporcional). - pub line_height: f32, - /// Muestra u oculta números de línea. - pub line_numbers: bool, - /// Ancho de la indentación en espacios. - pub tab_size: u8, - /// Insertar espacios en lugar de tabs. - pub insert_spaces: bool, - - /// Autocompletado y Sugerencias - pub suggest_selection: String, - pub accept_suggestion_on_enter: String, - - /// Comportamiento visual y parseo - pub auto_indent_on_paste: bool, - pub bracket_pair_colorization: BracketPairColorization, - - /// Reglas de renderizado de espacios en blanco. - pub render_whitespace: super::terminal::RenderWhitespace, - pub empty_hint: String, // ej: "hidden" - - /// Formateo predeterminado - pub default_formatter: Option, - pub format_on: FormatOnStrategy, - - /// Opciones avanzadas de pegado y refactorización - pub paste_as_preferences: Vec, - pub update_imports_on_file_move: String, - - /// Minimapa - pub minimap_enabled: bool, - pub minimap_scale: f32, - - - /// Autoguardado de archivos. - pub auto_save: bool, - - /// Estilo del cursor en el editor. - pub cursor_style: CursorStyle, - /// Ajuste de línea automático (Word Wrap). - pub word_wrap: bool, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/global_config/extensions_registry.rs b/src-tauri/src/persistence/in_file/models/global_config/extensions_registry.rs deleted file mode 100644 index a476dd2..0000000 --- a/src-tauri/src/persistence/in_file/models/global_config/extensions_registry.rs +++ /dev/null @@ -1,39 +0,0 @@ -use serde::{Deserialize, Serialize}; -use sqlx::FromRow; - -// TODO Cambiar esto para que sea una lista de extensiones, dicha lista tiene que poder filtrarse por: -// - INSTALADAS globalmente (siempre se guardan en el rootPath de la app) -// - ACTIVADAS globalmente (El registro se guarda en un toml en el rootPath de la app y cada workspace tiene acceso a ellas inicialmente. -// - INSTALADAS desde un workspace (se guardan en el rootPath del workspace, se borran si se elimina el workspace contenedor, no se pueden desactivar, se supone que si la tienes instalada en un workspace y la quieres desactivar, es mejor desinstalarla) -// - ACTIVADAS en un workspace (Las instaladas globalmente pero no activadas globalmente, para casos frecuentes pero no absolutos) -// Tambien debe permitir simular la funcionalidad de VSCode de recomendar extensiones para un workspace, debe generar como un package.json de dependencias pero con los mcp, lsp, extensiones, rules y skills recomendados asociadas al workspace, que cada workspace sea como un docker container, sin importar el stack - -/// Inventario global de capacidades instaladas, gestionando versiones y esquemas de configuración de las extensiones. -#[derive(Debug, Serialize, Deserialize, FromRow)] -pub struct Extension { - pub id: String, - pub version: String, - pub local_path: String, - pub is_enabled: bool, - pub config_schema: Option, - pub manifest_cache: Option, -} - -#[derive(Debug, Serialize, Deserialize, sqlx::Type)] -pub enum ExtensionStatus { - Installed, - Updating, - Error, - Disabled, -} - -#[derive(Debug, FromRow)] -pub struct ExtensionRecord { - pub id: String, - pub version: String, - pub publisher: String, - pub entry_point: String, - pub status: ExtensionStatus, - /// Manifest completo en BSON para acceso instantáneo. - pub manifest_blob: Vec, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/global_config/files_config.rs b/src-tauri/src/persistence/in_file/models/global_config/files_config.rs deleted file mode 100644 index 77e6e91..0000000 --- a/src-tauri/src/persistence/in_file/models/global_config/files_config.rs +++ /dev/null @@ -1,17 +0,0 @@ -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Serialize, Deserialize, Clone)] -pub struct FilesConfig { - /// Guardado automático de archivos a nivel sistema. - pub auto_save: super::editor::AutoSaveStrategy, - /// Retraso en milisegundos si auto_save es 'AfterDelay'. - pub auto_save_delay: u64, - - /// Exclusiones globales de búsqueda y visualización. - /// Ej: "**/.git": true, "**/node_modules": true - pub exclude: std::collections::HashMap, - - /// Confirmaciones de UI - pub explorer_confirm_delete: bool, - pub explorer_confirm_drag_and_drop: bool, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/global_config/git_config.rs b/src-tauri/src/persistence/in_file/models/global_config/git_config.rs deleted file mode 100644 index c8ec569..0000000 --- a/src-tauri/src/persistence/in_file/models/global_config/git_config.rs +++ /dev/null @@ -1,21 +0,0 @@ -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum OpenRepositoryStrategy { - /// Siempre buscar repositorios en carpetas padre. - Always, - /// Nunca buscar. - Never, - /// Preguntar al usuario. - Prompt, -} - -#[derive(Debug, Serialize, Deserialize, Clone)] -pub struct GitConfig { - pub autofetch: bool, - pub confirm_sync: bool, - pub open_repository_in_parent_folders: OpenRepositoryStrategy, - /// Modelos de IA predeterminados para operaciones GitLens/Copilot equivalentes - pub ai_model: String, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/global_config/mod.rs b/src-tauri/src/persistence/in_file/models/global_config/mod.rs deleted file mode 100644 index 0aa7140..0000000 --- a/src-tauri/src/persistence/in_file/models/global_config/mod.rs +++ /dev/null @@ -1,35 +0,0 @@ -pub mod ai_config; -pub mod editor_config; -pub mod extensions_registry; -pub mod files_config; -pub mod git_config; -pub mod security_config; -pub mod terminal_config; -pub mod workbench_config; - -use serde::{Deserialize, Serialize}; -use std::collections::HashMap; - -/// Estructura raíz que representa el archivo de configuración completo. -/// Este mismo modelo se usa para Global (`~/.mod0/settings.toml`) -/// y Workspace (`[proyecto]/.mod0/settings.toml`). -/// En tiempo de ejecución, el Workspace hace un "merge" profundo sobre el Global. -#[derive(Debug, Serialize, Deserialize, Clone)] -pub struct Mod0Config { - pub editor: editor::EditorConfig, - pub workbench: workbench::WorkbenchConfig, - pub files: files::FilesConfig, - pub terminal: terminal::TerminalConfig, - pub git: git::GitConfig, - pub security: security::SecurityConfig, - pub ai_agents: ai_agents::AiAgentsConfig, - - /// Ajustes específicos por lenguaje (ej: "[typescriptreact]" -> EditorConfig parcial) - #[serde(default)] - pub language_overrides: HashMap, - - /// Ajustes inyectados por extensiones (Extension Configuration Space). - /// Ej: "python.defaultInterpreterPath": Value::String("...") - #[serde(flatten)] - pub extensions: HashMap, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/global_config/security_config.rs b/src-tauri/src/persistence/in_file/models/global_config/security_config.rs deleted file mode 100644 index 064a40e..0000000 --- a/src-tauri/src/persistence/in_file/models/global_config/security_config.rs +++ /dev/null @@ -1,19 +0,0 @@ -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum UntrustedFilesStrategy { - /// Abre archivos no confiables en modo de solo lectura estricto. - Restricted, - /// Abre archivos no confiables normalmente (peligroso). - Open, - /// Pregunta siempre antes de abrir. - Prompt, -} - -#[derive(Debug, Serialize, Deserialize, Clone)] -pub struct SecurityConfig { - pub workspace_trust_untrusted_files: UntrustedFilesStrategy, - /// Rutas de repositorios donde los agentes tienen permiso de ejecución total. - pub trusted_agent_workspaces: Vec, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/global_config/terminal_config.rs b/src-tauri/src/persistence/in_file/models/global_config/terminal_config.rs deleted file mode 100644 index ae9725f..0000000 --- a/src-tauri/src/persistence/in_file/models/global_config/terminal_config.rs +++ /dev/null @@ -1,27 +0,0 @@ -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Serialize, Deserialize, Clone)] -#[serde(rename_all = "snake_case")] -pub enum TerminalShell { - Bash, - Zsh, - Fish, - PowerShell, - CommandPrompt, -} - -#[derive(Debug, Serialize, Deserialize, Clone)] -pub struct TerminalConfig { - /// Shell por defecto a utilizar. - pub default_shell: TerminalShell, - /// Buffer de scrollback (líneas máximas). - pub scrollback_limit: u32, - /// Familia de fuente específica para terminal. - pub font_family: String, - /// Tamaño de fuente para terminal. - pub font_size: u32, - /// Habilita el renderizado por GPU (si está disponible). - pub gpu_acceleration: bool, - /// Copiar automáticamente al seleccionar con el mouse. - pub copy_on_selection: bool, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/global_config/workbench_config.rs b/src-tauri/src/persistence/in_file/models/global_config/workbench_config.rs deleted file mode 100644 index e014213..0000000 --- a/src-tauri/src/persistence/in_file/models/global_config/workbench_config.rs +++ /dev/null @@ -1,50 +0,0 @@ -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum StartupEditor { - /// Abre un editor vacío. - NewUntitledFile, - /// Abre la página de bienvenida. - WelcomePage, - /// Abre el editor de "Release Notes". - Readme, - /// No abre nada. - None, -} - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] -#[serde(rename_all = "snake_case")] -pub enum ControlsStyle { - /// Estilo nativo del sistema operativo (Windows, macOS, Linux). - Native, - /// Estilo renderizado internamente por Mod0. - Custom, -} - -/// Configuración visual y estructural de la aplicación. -#[derive(Debug, Serialize, Deserialize, Clone)] -pub struct WorkbenchConfig { - pub color_theme: String, - pub icon_theme: String, - pub startup_editor: StartupEditor, - pub controls_style: ControlsStyle, - - /// Animaciones del IDE (reflejando tu extensión de animaciones) - pub animations: AnimationsConfig, - - /// Asociaciones de editores para extensiones específicas - /// Ej: "*.copilotmd" -> "vscode.markdown.preview.editor" - pub editor_associations: std::collections::HashMap, -} - -#[derive(Debug, Serialize, Deserialize, Clone)] -#[serde(rename_all = "kebab-case")] -pub struct AnimationsConfig { - pub active: String, // ej: "Indent" - pub command_palette: String, // ej: "Fade" - pub cursor_animation: bool, - pub focus_dimming_mode: String, - pub scrolling: String, - pub tabs: String, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/mod.rs b/src-tauri/src/persistence/in_file/models/mod.rs deleted file mode 100644 index 657fcba..0000000 --- a/src-tauri/src/persistence/in_file/models/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub mod global_config; -pub mod workspace_config; -pub mod workspace_assets; -pub mod shared; \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/shared/mod.rs b/src-tauri/src/persistence/in_file/models/shared/mod.rs deleted file mode 100644 index 16a1865..0000000 --- a/src-tauri/src/persistence/in_file/models/shared/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod status; \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/shared/status.rs b/src-tauri/src/persistence/in_file/models/shared/status.rs deleted file mode 100644 index 1b550a8..0000000 --- a/src-tauri/src/persistence/in_file/models/shared/status.rs +++ /dev/null @@ -1,15 +0,0 @@ -use serde::{Deserialize, Serialize}; - -/// Estado vital de una sesión o pensamiento, controlando flujos de aprobación y ciclos de vida. -/// -`Active`: Sesión en la que se está trabajando actualmente. -/// -`Merging`: Sesión casi terminada, solo falta subir los cambios al main codebase. -/// -`Completed`: Sesión completada con cambios guardados. -/// -`Aborted`: Sesión abortada por el user. -#[derive(Debug, Serialize, Deserialize, sqlx::Type)] -#[sqlx(rename_all = "lowercase")] -pub enum Status { - Active, - Merging, - Completed, - Aborted, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/workspace_assets/artifact.rs b/src-tauri/src/persistence/in_file/models/workspace_assets/artifact.rs deleted file mode 100644 index 82e2153..0000000 --- a/src-tauri/src/persistence/in_file/models/workspace_assets/artifact.rs +++ /dev/null @@ -1,31 +0,0 @@ -use serde::{Deserialize, Serialize}; -use sqlx::FromRow; - -// TODO Definir mejor, esta demasiado estricto, contradice la dinamicidad esperada -// TODO redefinir para que en lugar de guardarlo en una BD, -// se guarden los artifacts en temp_files dentro del mismo workspace - -/// Clasificador de productos generados por la IA, permitiendo al frontend renderizar el slot adecuado (UI, Schemas, etc.). -#[derive(Debug, Serialize, Deserialize, sqlx::Type)] -#[sqlx(rename_all = "snake_case")] -pub enum ArtifactType { - UiLayout, - Schema, - Scene3d, - Flowchart, - Documentation, -} - -/// Resultado tangible y persistente de un proceso de pensamiento. -/// Versionado y validado mediante sumas de verificación. -#[derive(Debug, Serialize, Deserialize, FromRow)] -pub struct Artifact { - pub id: String, - pub session_id: String, - pub thought_node_id: Option, - pub artifact_type: ArtifactType, - pub content: String, - pub version: i64, - pub checksum: Option, - pub status: String, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/workspace_assets/chat_history.rs b/src-tauri/src/persistence/in_file/models/workspace_assets/chat_history.rs deleted file mode 100644 index e1a5184..0000000 --- a/src-tauri/src/persistence/in_file/models/workspace_assets/chat_history.rs +++ /dev/null @@ -1,26 +0,0 @@ -use serde::{Deserialize, Serialize}; -use chrono::{DateTime, Utc}; -use sqlx::FromRow; - -// TODO redefinir para que en lugar de guardarlo en una BD, -// se guarde el ultimo estado en temp_files en md dentro del mismo workspace cada cierto tiempo - -/// Define la autoridad y origen de los mensajes en el historial (Usuario, Asistente o Sistema). -#[derive(Debug, Serialize, Deserialize, sqlx::Type)] -#[sqlx(rename_all = "lowercase")] -pub enum ChatRole { - User, - Assistant, - System, -} - -/// Registro cronológico de la comunicación entre el usuario y la IA dentro de un proyecto y sesión específicos. -#[derive(Debug, Serialize, Deserialize, FromRow)] -pub struct ChatHistory { - pub id: i64, - pub project_path: String, - pub session_id: String, - pub role: ChatRole, - pub content: String, - pub timestamp: DateTime, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/workspace_assets/context_snapshot.rs b/src-tauri/src/persistence/in_file/models/workspace_assets/context_snapshot.rs deleted file mode 100644 index c75c31e..0000000 --- a/src-tauri/src/persistence/in_file/models/workspace_assets/context_snapshot.rs +++ /dev/null @@ -1,3 +0,0 @@ -// TODO Definir, aqui se guardara una cache del contexto construido antes de una request a la IA -// De forma que lo que casi nunca cambia se mantenga aqui ya estructurado (rules, skills generales, etc) -// y el resto se inyecta en cada request (contexto dinamico, como el chat history reciente, artifacts recientes, etc) \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/workspace_assets/editor_state.rs b/src-tauri/src/persistence/in_file/models/workspace_assets/editor_state.rs deleted file mode 100644 index b84d7f1..0000000 --- a/src-tauri/src/persistence/in_file/models/workspace_assets/editor_state.rs +++ /dev/null @@ -1,14 +0,0 @@ -use serde::{Deserialize, Serialize}; -use sqlx::FromRow; - -// TODO redefinir para que en lugar de guardarlo en una BD, -// se guarde el ultimo estado en temp_files dentro del mismo workspace cada cierto tiempo - -/// Gestiona la persistencia del estado visual por proyecto, incluyendo pestañas abiertas, el archivo activo y la configuración del layout de paneles. -#[derive(Debug, Serialize, Deserialize, FromRow)] -pub struct EditorState { - pub project_path: String, - pub open_tabs: String, - pub active_tab: Option, - pub layout_config: Option, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/workspace_assets/ghost_run_result.rs b/src-tauri/src/persistence/in_file/models/workspace_assets/ghost_run_result.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/persistence/in_file/models/workspace_assets/mod.rs b/src-tauri/src/persistence/in_file/models/workspace_assets/mod.rs deleted file mode 100644 index ffca4ac..0000000 --- a/src-tauri/src/persistence/in_file/models/workspace_assets/mod.rs +++ /dev/null @@ -1,10 +0,0 @@ -pub mod artifact; -pub mod chat_history; -pub mod context_snapshot; -pub mod editor_state; -pub mod ghost_run_result; -pub mod refined_learning; -pub mod session; -pub mod task; -pub mod terminal_history; -pub mod thought_node; \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/workspace_assets/refined_learning.rs b/src-tauri/src/persistence/in_file/models/workspace_assets/refined_learning.rs deleted file mode 100644 index 186c64e..0000000 --- a/src-tauri/src/persistence/in_file/models/workspace_assets/refined_learning.rs +++ /dev/null @@ -1 +0,0 @@ -// No se si usarlo realmente, habria que implementarlo \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/workspace_assets/session.rs b/src-tauri/src/persistence/in_file/models/workspace_assets/session.rs deleted file mode 100644 index b7acfd0..0000000 --- a/src-tauri/src/persistence/in_file/models/workspace_assets/session.rs +++ /dev/null @@ -1,36 +0,0 @@ -use serde::{Deserialize, Serialize}; -use chrono::{DateTime, Utc}; -use sqlx::FromRow; - -// TODO Definir todo esto de forma que en lugar de una tabla en la BD, -// se divida por folders en temp_files dentro del mismo workspace. -// Que guarde en cada folder (ai_chats, todo_tasks, terminal_logs) un folder por cada session -// de la misma forma que hace cline, guardarlo en la bd complica las cosas sin necesidad, -// y tampoco mejora la latencia, hacerlo en archivos es mas cercano al user y facil de editar y auditar - -/// Define el contexto de ejecución de una sesión. -/// - `UserChat`: Sesión iniciada por un user al abrir un chat nuevo. -/// - `AgentTask`: Sesión iniciada de forma autónoma por el agente para subdividir sus tasks. -/// - `Terminal`: Sesión de terminal iniciada por el user o por el agent. -#[derive(Debug, Serialize, Deserialize, sqlx::Type)] -#[sqlx(rename_all = "snake_case")] -pub enum SessionType { - UserChat, - AgentTask, - Terminal, -} - -/// Contenedor principal de un hilo de trabajo; incluye soporte para multitasking en entornos controlados y "Ghost Sessions" destinadas a pruebas en sandboxes. -#[derive(Debug, Serialize, Deserialize, FromRow)] -pub struct Session { - pub id: String, - pub project_path: String, - pub session_type: SessionType, - pub name: Option, - pub branch_name: Option, - pub worktree_path: Option, - pub status: super::super::shared::status::Status, - pub is_ghost_session: bool, - pub base_commit_hash: Option, - pub created_at: DateTime, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/workspace_assets/task.rs b/src-tauri/src/persistence/in_file/models/workspace_assets/task.rs deleted file mode 100644 index 0886b21..0000000 --- a/src-tauri/src/persistence/in_file/models/workspace_assets/task.rs +++ /dev/null @@ -1,34 +0,0 @@ -use serde::{Deserialize, Serialize}; -use sqlx::FromRow; - -/// Estados de control de tareas, permitiendo seguir el progreso de tareas bajo metodologías de desarrollo guiado por pruebas. -#[derive(Debug, Serialize, Deserialize, sqlx::Type)] -#[sqlx(rename_all = "PascalCase")] -pub enum TaskStatus { - Todo, - InProgress, - Check, - Done, -} - -/// Estados de control de pruebas, permitiendo seguir el progreso de tareas bajo metodologías de desarrollo guiado por pruebas. -#[derive(Debug, Serialize, Deserialize, sqlx::Type)] -#[sqlx(rename_all = "lowercase")] -pub enum TddStatus { - Red, - Green, - Refactor, -} - -/// Representa una unidad de trabajo ejecutable dentro de una sesión, con seguimiento de errores y posición en la cola. -#[derive(Debug, Serialize, Deserialize, FromRow)] -pub struct Task { - pub id: i64, - pub session_id: String, - pub skill_id: Option, - pub title: String, - pub status: TaskStatus, - pub tdd_status: TddStatus, - pub error_log: Option, - pub position: i64, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/workspace_assets/terminal_history.rs b/src-tauri/src/persistence/in_file/models/workspace_assets/terminal_history.rs deleted file mode 100644 index b756e95..0000000 --- a/src-tauri/src/persistence/in_file/models/workspace_assets/terminal_history.rs +++ /dev/null @@ -1,17 +0,0 @@ -use serde::{Deserialize, Serialize}; -use chrono::{DateTime, Utc}; -use sqlx::FromRow; - -// TODO redefinir para que en lugar de guardarlo en una BD, -// se guarden los logs en temp_files en txt dentro del mismo workspace - -/// Auditoría de comandos ejecutados, almacenando códigos de salida para aprendizaje y diagnóstico del sistema. -#[derive(Debug, Serialize, Deserialize, FromRow)] -pub struct TerminalHistory { - pub id: i64, - pub project_path: String, - pub session_id: String, - pub command: String, - pub exit_code: Option, - pub timestamp: DateTime, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/workspace_assets/thought_node.rs b/src-tauri/src/persistence/in_file/models/workspace_assets/thought_node.rs deleted file mode 100644 index 1aa132c..0000000 --- a/src-tauri/src/persistence/in_file/models/workspace_assets/thought_node.rs +++ /dev/null @@ -1,28 +0,0 @@ -use serde::{Deserialize, Serialize}; -use chrono::{DateTime, Utc}; -use sqlx::FromRow; - -/// Clasifica los pasos del "Grafo de Pensamiento" del agente (decisiones tomadas, acciones ejecutadas u observaciones recibidas). -/// -`Observation`: Pensamiento del agente, normalmente en planeación o en edge cases. -/// -`Decision`: Bifurcación de opciones en las que el user debe decidir. -/// -`Action`: Ejecución de un task específico. -#[derive(Debug, Serialize, Deserialize, sqlx::Type)] -#[sqlx(rename_all = "lowercase")] -pub enum NodeType { - Observation, - Decision, - Action, -} - -/// Unidad atómica de razonamiento vinculada a una sesión, permitiendo la trazabilidad jerárquica de la lógica de la IA. -#[derive(Debug, Serialize, Deserialize, FromRow)] -pub struct ThoughtNode { - pub id: i64, - pub session_id: String, - pub parent_id: Option, - pub node_type: NodeType, - pub content: String, - pub status: super::super::shared::status::Status, - pub metadata: Option, - pub created_at: DateTime, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/workspace_config/mod.rs b/src-tauri/src/persistence/in_file/models/workspace_config/mod.rs deleted file mode 100644 index 4c9484b..0000000 --- a/src-tauri/src/persistence/in_file/models/workspace_config/mod.rs +++ /dev/null @@ -1,26 +0,0 @@ -use serde::{Deserialize, Serialize}; -use chrono::{DateTime, Utc}; -use sqlx::FromRow; - -#[derive(Debug, Serialize, Deserialize, sqlx::Type)] -pub enum WorkspaceTrustLevel { - /// Workspace no confiable, funciones de ejecución desactivadas. - Restricted, - /// Workspace confiable, ejecución total permitida. - Trusted, -} - -/// Espacio de trabajo indexado, almacenando su ubicación física y preferencias globales.v -#[derive(Debug, FromRow)] -pub struct Workspace { - pub path: String, - pub name: String, - pub last_opened: DateTime, - pub trust_level: WorkspaceTrustLevel, - /// Tags para organización (persistido como JSON string). - pub tags: String, - // Estos dos siguientes deben ser listas - // Aqui se guardaran las instaladas especificamente en este workspace y las activadas (instaladas globalmente) solo en este workspace - // pub installed_extensions: ExtensionRecord, - // pub active_global_extensions: ExtensionRecord -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/models/workspace_config/ui_config(pending).rs b/src-tauri/src/persistence/in_file/models/workspace_config/ui_config(pending).rs deleted file mode 100644 index eb705e8..0000000 --- a/src-tauri/src/persistence/in_file/models/workspace_config/ui_config(pending).rs +++ /dev/null @@ -1,19 +0,0 @@ -use serde::{Deserialize, Serialize}; -use sqlx::{FromRow, Type}; - -#[derive(Debug, Serialize, Deserialize, Type)] -pub enum PanelSide { - Left, - Right, - Bottom, -} - -#[derive(Debug, FromRow)] -pub struct LayoutState { - pub view_id: String, - pub is_visible: bool, - pub side: PanelSide, - pub width: u32, - /// Estado interno de la vista (ej: scroll position) en JSON. - pub internal_state_json: String, -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/repositories/global_config_repos/extensions_repo.rs b/src-tauri/src/persistence/in_file/repositories/global_config_repos/extensions_repo.rs deleted file mode 100644 index fa5d6e5..0000000 --- a/src-tauri/src/persistence/in_file/repositories/global_config_repos/extensions_repo.rs +++ /dev/null @@ -1,44 +0,0 @@ -use super::{extension::Extension, project_extension::ProjectExtension}; -use super::Repository; - -impl<'a> Repository<'a> { - /// Registra una nueva extensión en el sistema global. - /// - /// ### Parámetros - /// * `ext`: Datos de la extensión, incluyendo versión y ruta local. - pub async fn register_extension(&self, ext: &Extension) -> sqlx::Result<()> { - sqlx::query!( - r#"INSERT OR REPLACE INTO extension_registry (id, version, local_path, is_enabled, config_schema, manifest_cache) - VALUES (?, ?, ?, ?, ?, ?)"#, - ext.id, ext.version, ext.local_path, ext.is_enabled, ext.config_schema, ext.manifest_cache - ).execute(self.pool).await?; - Ok(()) - } - - /// Vincula una extensión a un proyecto con una configuración específica. - pub async fn enable_extension_for_project( - &self, - project_path: &str, - extension_id: &str, - config: &str - ) -> sqlx::Result<()> { - sqlx::query!( - "INSERT OR REPLACE INTO project_extensions (project_path, extension_id, config_values) VALUES (?, ?, ?)", - project_path, extension_id, config - ).execute(self.pool).await?; - Ok(()) - } - - /// Recupera todas las extensiones activas para un proyecto. - pub async fn get_project_extensions(&self, project_path: &str) -> sqlx::Result> { - sqlx::query_as!( - ProjectExtension, - r#"SELECT - project_path as "project_path!", - extension_id as "extension_id!", - config_values as "config_values!" - FROM project_extensions WHERE project_path = ?"#, - project_path - ).fetch_all(self.pool).await - } -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/repositories/global_config_repos/mod.rs b/src-tauri/src/persistence/in_file/repositories/global_config_repos/mod.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/persistence/in_file/repositories/mod.rs b/src-tauri/src/persistence/in_file/repositories/mod.rs deleted file mode 100644 index b0eedf7..0000000 --- a/src-tauri/src/persistence/in_file/repositories/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod global_config_repos; -pub mod workspace_config_repos; -pub mod workspace_assets_repos; \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/artifacts_repo/mod.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/artifacts_repo/mod.rs deleted file mode 100644 index 7af6bf1..0000000 --- a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/artifacts_repo/mod.rs +++ /dev/null @@ -1,96 +0,0 @@ -use super::artifact::{Artifact, ArtifactType}; -use super::Repository; - -impl<'a> Repository<'a> { - /// Registra o actualiza un artefacto utilizando la lógica de conflicto sobre el ID. - /// - /// ### Parámetros - /// * `art`: Estructura que contiene los datos del artefacto (UI, esquemas, etc.). - pub async fn save_artifact(&self, art: &Artifact) -> sqlx::Result<()> { - sqlx::query!( - r#"INSERT OR REPLACE INTO artifact (id, session_id, thought_node_id, artifact_type, content, version, checksum, status) - VALUES (?, ?, ?, ?, ?, ?, ?, ?)"#, - art.id, - art.session_id, - art.thought_node_id, - art.artifact_type, - art.content, - art.version, - art.checksum, - art.status - ) - .execute(self.pool) - .await?; - Ok(()) - } - - /// Busca un artefacto específico en la base de datos. - /// - /// ### Parámetros - /// * `id`: Identificador único del artefacto. - /// - /// ### Retorna - /// Un `Option` con el mapeo de tipos y nulabilidad verificado. - pub async fn get_artifact(&self, id: &str) -> sqlx::Result> { - sqlx::query_as!( - Artifact, - r#"SELECT - id as "id!", - session_id as "session_id!", - thought_node_id, - artifact_type as "artifact_type: ArtifactType", - content as "content!", - version as "version!: i64", - checksum, - status as "status!" - FROM artifact WHERE id = ?"#, - id - ) - .fetch_optional(self.pool) - .await - } - - /// Obtiene la lista completa de artefactos producidos en una sesión. - /// - /// ### Parámetros - /// * `session_id`: Identificador de la sesión de trabajo. - /// - /// ### Retorna - /// Un vector de artefactos ordenados por versión de forma descendente. - pub async fn get_artifacts_by_session(&self, session_id: &str) -> sqlx::Result> { - sqlx::query_as!( - Artifact, - r#"SELECT - id as "id!", - session_id as "session_id!", - thought_node_id, - artifact_type as "artifact_type: ArtifactType", - content as "content!", - version as "version!: i64", - checksum, - status as "status!" - FROM artifact - WHERE session_id = ? - ORDER BY version DESC"#, - session_id - ) - .fetch_all(self.pool) - .await - } - - /// Actualiza la relación entre un artefacto y un nodo de pensamiento específico. - /// - /// ### Parámetros - /// * `artifact_id`: Identificador del artefacto a modificar. - /// * `thought_id`: ID del nodo de pensamiento que generó esta versión. - pub async fn link_to_thought(&self, artifact_id: &str, thought_id: i64) -> sqlx::Result<()> { - sqlx::query!( - "UPDATE artifact SET thought_node_id = ? WHERE id = ?", - thought_id, - artifact_id - ) - .execute(self.pool) - .await?; - Ok(()) - } -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/artifacts_repo/test_artifacts_repo.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/artifacts_repo/test_artifacts_repo.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/chats_history_repo/mod.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/chats_history_repo/mod.rs deleted file mode 100644 index 01d64b3..0000000 --- a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/chats_history_repo/mod.rs +++ /dev/null @@ -1,43 +0,0 @@ -use chrono::{DateTime, Utc}; -use super::chat_history::{ChatHistory, ChatRole}; -use super::Repository; - -impl<'a> Repository<'a> { - /// Almacena un mensaje de chat en el historial persistente. - /// - /// ### Parámetros - /// * `msg`: Estructura con los datos del mensaje (rol, contenido y vinculación). - pub async fn save_chat_message(&self, msg: &ChatHistory) -> sqlx::Result<()> { - sqlx::query!( - "INSERT INTO chat_history (project_path, session_id, role, content) VALUES (?, ?, ?, ?)", - msg.project_path, msg.session_id, msg.role, msg.content - ).execute(self.pool).await?; - Ok(()) - } - - /// Recupera el historial de chat de una sesión ordenado cronológicamente. - /// - /// ### Parámetros - /// * `session_id`: Identificador de la sesión. - pub async fn get_session_chat(&self, session_id: &str) -> sqlx::Result> { - sqlx::query_as!( - ChatHistory, - r#"SELECT - id as "id!", - project_path as "project_path!", - session_id as "session_id!", - role as "role!: ChatRole", - content as "content!", - timestamp as "timestamp!: DateTime" - FROM chat_history WHERE session_id = ? ORDER BY timestamp ASC"#, - session_id - ).fetch_all(self.pool).await - } - - /// Elimina el historial de chat de una sesión. - pub async fn clear_chat_history(&self, session_id: &str) -> sqlx::Result<()> { - sqlx::query!("DELETE FROM chat_history WHERE session_id = ?", session_id) - .execute(self.pool).await?; - Ok(()) - } -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/chats_history_repo/test_chats_history_repo.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/chats_history_repo/test_chats_history_repo.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/context_snapshots_repo.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/context_snapshots_repo.rs deleted file mode 100644 index 186c64e..0000000 --- a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/context_snapshots_repo.rs +++ /dev/null @@ -1 +0,0 @@ -// No se si usarlo realmente, habria que implementarlo \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/editor_state_repo/mod.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/editor_state_repo/mod.rs deleted file mode 100644 index 4b6fa5a..0000000 --- a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/editor_state_repo/mod.rs +++ /dev/null @@ -1,66 +0,0 @@ -use super::editor_state::EditorState; -use super::Repository; - -impl<'a> Repository<'a> { - /// Persiste el estado completo de la interfaz para su recuperación en futuras sesiones. - /// - /// Este método realiza un "upsert" sobre la ruta del proyecto, sobrescribiendo - /// cualquier configuración previa con el estado actual del frontend. - /// - /// ### Parámetros - /// * `state`: Estructura con la captura completa de pestañas, archivo activo y layout. - pub async fn save_editor_state(&self, state: &EditorState) -> sqlx::Result<()> { - sqlx::query!( - r#"INSERT INTO editor_state (project_path, open_tabs, active_tab, layout_config) - VALUES (?, ?, ?, ?) - ON CONFLICT(project_path) DO UPDATE SET - open_tabs = excluded.open_tabs, - active_tab = excluded.active_tab, - layout_config = excluded.layout_config"#, - state.project_path, - state.open_tabs, - state.active_tab, - state.layout_config - ) - .execute(self.pool).await?; - Ok(()) - } - - /// Recupera el estado guardado para restaurar la interfaz al abrir un proyecto. - /// - /// ### Parámetros - /// * `project_path`: Ruta absoluta que identifica el espacio de trabajo. - /// - /// ### Retorna - /// Un `Option` con los datos necesarios para reconstruir la sesión de UI. - pub async fn get_editor_state(&self, project_path: &str) -> sqlx::Result> { - sqlx::query_as!( - EditorState, - r#"SELECT - project_path as "project_path!", - open_tabs as "open_tabs!", - active_tab as "active_tab!", - layout_config as "layout_config!" - FROM editor_state - WHERE project_path = ?"#, - project_path - ) - .fetch_optional(self.pool).await - } - - /// Elimina la persistencia del estado de un proyecto. - /// - /// Útil para procesos de limpieza o cuando el usuario desea resetear la interfaz - /// a los valores por defecto. - /// - /// ### Parámetros - /// * `project_path`: Ruta del proyecto a limpiar. - pub async fn delete_editor_state(&self, project_path: &str) -> sqlx::Result<()> { - sqlx::query!( - "DELETE FROM editor_state WHERE project_path = ?", - project_path - ) - .execute(self.pool).await?; - Ok(()) - } -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/editor_state_repo/test_editor_state_repo.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/editor_state_repo/test_editor_state_repo.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/ghost_run_results_repo/mod.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/ghost_run_results_repo/mod.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/ghost_run_results_repo/test_ghost_run_results_repo.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/ghost_run_results_repo/test_ghost_run_results_repo.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/mod.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/mod.rs deleted file mode 100644 index cd8c207..0000000 --- a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/mod.rs +++ /dev/null @@ -1,13 +0,0 @@ -pub mod artifacts_repo; -pub mod chats_history_repo; -pub mod context_snapshots_repo; -pub mod editor_state_repo; -pub mod refined_learnings_repo; -pub mod sessions_repo; -pub mod tasks_repo; -pub mod terminals_history_repo; -pub mod thought_nodes_repo; - -pub use crate::persistence::in_file::models::workspace_assets::*; -pub use crate::persistence::in_file::models::shared::*; -pub use super::*; \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/refined_learnings_repo.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/refined_learnings_repo.rs deleted file mode 100644 index 186c64e..0000000 --- a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/refined_learnings_repo.rs +++ /dev/null @@ -1 +0,0 @@ -// No se si usarlo realmente, habria que implementarlo \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/sessions_repo/mod.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/sessions_repo/mod.rs deleted file mode 100644 index 14049b0..0000000 --- a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/sessions_repo/mod.rs +++ /dev/null @@ -1,99 +0,0 @@ -use chrono::{DateTime, Utc}; -use super::session::{Session, SessionType}; -use super::status::{Status}; -use super::Repository; - -impl<'a> Repository<'a> { - /// Registra una nueva sesión de trabajo vinculada a un proyecto específico. - /// - /// ### Parámetros - /// * `session`: Estructura con la configuración de la sesión. - pub async fn create_session(&self, session: &Session) -> sqlx::Result<()> { - sqlx::query!( - r#"INSERT INTO session ( - id, project_path, session_type, name, branch_name, - worktree_path, status, is_ghost_session, base_commit_hash - ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"#, - session.id, - session.project_path, - session.session_type, - session.name, - session.branch_name, - session.worktree_path, - session.status, - session.is_ghost_session, - session.base_commit_hash - ) - .execute(self.pool) - .await?; - Ok(()) - } - - /// Recupera la configuración y el estado actual de una sesión mediante su identificador. - /// - /// ### Parámetros - /// * `id`: Identificador único de la sesión (UUID o hash). - pub async fn get_session(&self, id: &str) -> sqlx::Result> { - sqlx::query_as!( - Session, - r#"SELECT - id as "id!", - project_path as "project_path!", - session_type as "session_type: SessionType", - name, - branch_name, - worktree_path, - status as "status: Status", - is_ghost_session as "is_ghost_session!", - base_commit_hash, - created_at as "created_at!: DateTime" - FROM session - WHERE id = ?"#, - id, - ) - .fetch_optional(self.pool) - .await - } - - /// Recupera la configuración y el estado actual de todas las sesiones a partir del `project_path`. - /// - /// ### Parámetros - /// * `project_path`: Identificador único del proyecto abierto. - pub async fn get_all_sessions(&self, project_path: &str) -> sqlx::Result> { - sqlx::query_as!( - Session, - r#"SELECT - id as "id!", - project_path as "project_path!", - session_type as "session_type: SessionType", - name, - branch_name, - worktree_path, - status as "status: Status", - is_ghost_session as "is_ghost_session!", - base_commit_hash, - created_at as "created_at!: DateTime" - FROM session - WHERE project_path = ? - ORDER BY created_at DESC"#, - project_path - ) - .fetch_all(self.pool).await - } - - /// Actualiza el estado vital de la sesión (e.g. de Active a Completed). - /// - /// ### Parámetros - /// * `id`: Identificador de la sesión. - /// * `status`: Nuevo estado a persistir. - pub async fn update_session_status(&self, id: &str, status: Status) -> sqlx::Result<()> { - sqlx::query!( - "UPDATE session SET status = ? WHERE id = ?", - status, - id - ) - .execute(self.pool) - .await?; - Ok(()) - } -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/sessions_repo/test_sessions_repo.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/sessions_repo/test_sessions_repo.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/tasks_repo/mod.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/tasks_repo/mod.rs deleted file mode 100644 index 414629a..0000000 --- a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/tasks_repo/mod.rs +++ /dev/null @@ -1,81 +0,0 @@ -use super::task::{Task, TaskStatus, TddStatus}; -use super::Repository; - -impl<'a> Repository<'a> { - /// Inserta una nueva tarea o actualiza una existente (Upsert). - /// - /// ### Parámetros - /// * `task`: Referencia a la tarea. Si el `id` es 0 o nulo (autoincremento), se insertará. - /// - /// ### Comportamiento - /// En caso de conflicto con el ID, actualiza el estado, el estado TDD, la posición y el log de errores. - pub async fn upsert_task(&self, task: &Task) -> sqlx::Result<()> { - sqlx::query!( - r#"INSERT INTO execution_tasks (id, session_id, skill_id, title, status, tdd_status, position, error_log) - VALUES (?, ?, ?, ?, ?, ?, ?, ?) - ON CONFLICT(id) DO UPDATE SET - status = excluded.status, - tdd_status = excluded.tdd_status, - position = excluded.position, - error_log = excluded.error_log"#, - task.id, task.session_id, task.skill_id, task.title, - task.status, task.tdd_status, task.position, task.error_log - ).execute(self.pool).await?; - Ok(()) - } - - /// Recupera todas las tareas de una sesión ordenadas por su posición jerárquica. - /// - /// ### Parámetros - /// * `session_id`: ID de la sesión vinculada. - /// - /// ### Retorna - /// Un vector de `ExecutionTask` con mapeo de tipos correcto y forzado de no-nulidad. - pub async fn get_session_tasks(&self, session_id: &str) -> sqlx::Result> { - sqlx::query_as!( - Task, - r#"SELECT - id as "id!", - session_id as "session_id!", - skill_id, - title as "title!", - status as "status!: TaskStatus", - tdd_status as "tdd_status!: TddStatus", - error_log, - position as "position!" - FROM execution_tasks - WHERE session_id = ? - ORDER BY position ASC"#, - session_id - ).fetch_all(self.pool).await - } - - /// Actualiza exclusivamente el estado vital de una tarea (e.g. Active -> Completed). - /// - /// ### Parámetros - /// * `id`: ID de la tarea. - /// * `status`: Nuevo estado basado en el enum `TaskStatus`. - pub async fn update_task_status(&self, id: i64, status: TaskStatus) -> sqlx::Result<()> { - sqlx::query!( - "UPDATE execution_tasks SET status = ? WHERE id = ?", - status, id - ) - .execute(self.pool).await?; - Ok(()) - } - - /// Actualiza el resultado de las pruebas TDD y registra logs de error si existen. - /// - /// ### Parámetros - /// * `id`: ID de la tarea. - /// * `tdd_status`: Cadena que representa el resultado del test (e.g. "passed", "failed"). - /// * `error_log`: Contenido opcional del error capturado en terminal. - pub async fn update_task_tdd(&self, id: i64, tdd_status: &str, error_log: Option) -> sqlx::Result<()> { - sqlx::query!( - "UPDATE execution_tasks SET tdd_status = ?, error_log = ? WHERE id = ?", - tdd_status, error_log, id - ) - .execute(self.pool).await?; - Ok(()) - } -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/tasks_repo/test_tasks_repo.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/tasks_repo/test_tasks_repo.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/terminals_history_repo/mod.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/terminals_history_repo/mod.rs deleted file mode 100644 index e74c717..0000000 --- a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/terminals_history_repo/mod.rs +++ /dev/null @@ -1,46 +0,0 @@ -use chrono::{DateTime, Utc}; -use super::terminal_history::{TerminalHistory}; -use super::Repository; - -impl<'a> Repository<'a> { - /// Registra una ejecución de comando en la terminal. - /// - /// ### Parámetros - /// * `project`: Ruta del proyecto. - /// * `session_id`: Sesión activa. - /// * `cmd`: Comando ejecutado. - /// * `exit_code`: Código de salida (opcional). - pub async fn add_terminal_entry( - &self, - project: &str, - session_id: &str, - cmd: &str, - exit_code: Option - ) -> sqlx::Result<()> { - sqlx::query!( - "INSERT INTO terminal_history (project_path, session_id, command, exit_code) VALUES (?, ?, ?, ?)", - project, session_id, cmd, exit_code - ).execute(self.pool).await?; - Ok(()) - } - - /// Obtiene el historial de terminal para análisis de contexto. - pub async fn get_session_terminal(&self, session_id: &str) -> sqlx::Result> { - sqlx::query_as!( - TerminalHistory, - r#"SELECT - id as "id!", project_path as "project_path!", session_id as "session_id!", - command as "command!", exit_code as "exit_code: i64", - timestamp as "timestamp!: DateTime" - FROM terminal_history WHERE session_id = ? ORDER BY timestamp ASC"#, - session_id - ).fetch_all(self.pool).await - } - - /// Elimina el historial de terminal de una sesión. - pub async fn clear_terminal_history(&self, session_id: &str) -> sqlx::Result<()> { - sqlx::query!("DELETE FROM terminal_history WHERE session_id = ?", session_id) - .execute(self.pool).await?; - Ok(()) - } -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/terminals_history_repo/test_terminals_history_repo.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/terminals_history_repo/test_terminals_history_repo.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/thought_nodes_repo/mod.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/thought_nodes_repo/mod.rs deleted file mode 100644 index 1407d34..0000000 --- a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/thought_nodes_repo/mod.rs +++ /dev/null @@ -1,52 +0,0 @@ -use chrono::{DateTime, Utc}; -use super::thought_node::{ThoughtNode, NodeType}; -use super::status::{Status}; -use super::Repository; - -impl<'a> Repository<'a> { - /// Inserta un nuevo nodo de pensamiento en la sesión. - /// - /// ### Parámetros - /// * `node`: Estructura con los datos del pensamiento. - /// - /// ### Retorna - /// El ID autonumérico del nodo insertado. - pub async fn add_thought(&self, node: &ThoughtNode) -> sqlx::Result { - let res = sqlx::query!( - "INSERT INTO thought_node (session_id, parent_id, node_type, content, status, metadata) - VALUES (?, ?, ?, ?, ?, ?)", - node.session_id, node.parent_id, node.node_type, node.content, node.status, node.metadata - ).execute(self.pool).await?; - Ok(res.last_insert_rowid()) - } - - /// Recupera todos los pensamientos asociados a una sesión específica. - /// - /// ### Parámetros - /// * `session_id`: Identificador único de la sesión. - pub async fn get_thoughts_by_session(&self, session_id: &str) -> sqlx::Result> { - sqlx::query_as!( - ThoughtNode, - r#"SELECT - id as "id!", - session_id as "session_id!", - parent_id, - node_type as "node_type!: NodeType", - content as "content!", - status as "status!: Status", - metadata, - created_at as "created_at!: DateTime" - FROM thought_node - WHERE session_id = ? - ORDER BY created_at ASC"#, - session_id - ).fetch_all(self.pool).await - } - - /// Actualiza el estado de un nodo de pensamiento (e.g., de 'pending' a 'completed'). - pub async fn update_thought_status(&self, id: i64, status: &str) -> sqlx::Result<()> { - sqlx::query!("UPDATE thought_node SET status = ? WHERE id = ?", status, id) - .execute(self.pool).await?; - Ok(()) - } -} \ No newline at end of file diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/thought_nodes_repo/test_thought_nodes_repo.rs b/src-tauri/src/persistence/in_file/repositories/workspace_assets_repos/thought_nodes_repo/test_thought_nodes_repo.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_config_repos/mod.rs b/src-tauri/src/persistence/in_file/repositories/workspace_config_repos/mod.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/src/persistence/in_file/repositories/workspace_config_repos/projects_repo.rs b/src-tauri/src/persistence/in_file/repositories/workspace_config_repos/projects_repo.rs deleted file mode 100644 index 1cf683a..0000000 --- a/src-tauri/src/persistence/in_file/repositories/workspace_config_repos/projects_repo.rs +++ /dev/null @@ -1,66 +0,0 @@ -use chrono::{DateTime, Utc}; -use super::project::Project; -use super::Repository; - -impl<'a> Repository<'a> { - /// Registra un nuevo proyecto o actualiza los metadatos de uno existente. - /// - /// ### Parámetros - /// * `project`: Estructura con la ruta, estado de favorito y configuración. - pub async fn upsert_project(&self, project: &Project) -> sqlx::Result<()> { - sqlx::query!( - r#"INSERT INTO project (path, last_opened, is_favorite, custom_settings) - VALUES (?, ?, ?, ?) - ON CONFLICT(path) DO UPDATE SET - last_opened = excluded.last_opened, - is_favorite = excluded.is_favorite, - custom_settings = excluded.custom_settings"#, - project.path, - project.last_opened, - project.is_favorite, - project.custom_settings - ) - .execute(self.pool).await?; - Ok(()) - } - - /// Recupera la configuración de un proyecto específico mediante su ruta. - /// - /// ### Parámetros - /// * `path`: Ruta absoluta del proyecto en el sistema de archivos. - /// - /// ### Retorna - /// Un `Option` con los datos persistidos si el proyecto existe. - pub async fn get_project(&self, path: &str) -> sqlx::Result> { - sqlx::query_as!( - Project, - r#"SELECT - path as "path!", - last_opened as "last_opened!: DateTime", - is_favorite as "is_favorite!: bool", - custom_settings - FROM project - WHERE path = ?"#, - path - ) - .fetch_optional(self.pool).await - } - - /// Obtiene la lista de todos los proyectos registrados, ordenados por acceso reciente. - /// - /// ### Retorna - /// Un vector de estructuras `Project`. - pub async fn get_all_projects(&self) -> sqlx::Result> { - sqlx::query_as!( - Project, - r#"SELECT - path as "path!", - last_opened as "last_opened!: DateTime", - is_favorite as "is_favorite!: bool", - custom_settings - FROM project - ORDER BY last_opened DESC"# - ) - .fetch_all(self.pool).await - } -} \ No newline at end of file diff --git a/src-tauri/src/persistence/mod.rs b/src-tauri/src/persistence/mod.rs deleted file mode 100644 index cd98fc9..0000000 --- a/src-tauri/src/persistence/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod database; -pub mod in_file; \ No newline at end of file diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 87c1816..b774f94 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,42 +1,58 @@ { - "$schema": "https://schema.tauri.app/config/2", - "productName": "MOD0", - "version": "0.1.0", - "identifier": "com.luke.mod0", - "build": { - "beforeDevCommand": "npm run dev", - "devUrl": "http://localhost:1420", - "beforeBuildCommand": "npm run build", - "frontendDist": "../build" - }, - "app": { - "windows": [ - { - "label": "main", - "title": "MOD0", - "width": 1920, - "height": 1080, - "minWidth": 800, - "minHeight": 600, - "maximized": true, - "center": true, - "resizable": true, - "decorations": false, - "transparent": true, - "shadow": false, - "windowEffects": { - "effects": ["mica", "acrylic"], - "state": "active" + "$schema": "https://schema.tauri.app/config/2", + "productName": "MOD0", + "version": "0.3.0", + "identifier": "com.luke.mod0", + "build": { + "beforeDevCommand": "npm run dev", + "devUrl": "http://localhost:1420", + "beforeBuildCommand": "npm run build", + "frontendDist": "../build" + }, + "app": { + "windows": [ + { + "label": "main", + "title": "MOD0", + "width": 1440, + "height": 900, + "minWidth": 960, + "minHeight": 600, + "center": true, + "resizable": true, + "decorations": false, + "transparent": false, + "shadow": true, + "backgroundColor": "#0e1013" + } + ], + "security": { + "csp": "default-src 'self'; img-src 'self' asset: data:; style-src 'self' 'unsafe-inline'; font-src 'self' data:; connect-src 'self' ipc: http://ipc.localhost", + "capabilities": ["main-capability"] + } + }, + "bundle": { + "active": true, + "targets": ["nsis", "appimage", "deb", "dmg"], + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.icns", + "icons/icon.ico" + ], + "category": "DeveloperTool", + "shortDescription": "Mission control para tus sesiones de CLI con IA", + "windows": { + "nsis": { + "installMode": "currentUser", + "compression": "lzma", + "displayLanguageSelector": false, + "languages": ["Spanish", "English"], + "installerIcon": "icons/icon.ico", + "headerImage": "installer/header.bmp", + "sidebarImage": "installer/sidebar.bmp" + } } - } - ], - "security": { - "capabilities": ["main-capability"] } - }, - "bundle": { - "active": true, - "targets": "all", - "icon": ["icons/32x32.png", "icons/128x128.png", "icons/icon.icns", "icons/icon.ico"] - } -} \ No newline at end of file +} diff --git a/src/app.css b/src/app.css index 9a21698..78731b2 100644 --- a/src/app.css +++ b/src/app.css @@ -1,70 +1,324 @@ -@import "tailwindcss"; - -@theme { - --color-main: var(--bg-main); - --color-sidebar: var(--bg-sidebar); - --color-accent: var(--accent); - --color-text: var(--text-main); - --color-border-subtle: var(--border-subtle); -} - -@layer base { - :root { - --bg-main: #ffffff; - --bg-sidebar: #f8f8f9; - --text-main: #09090b; - --accent: #2563eb; - --border-subtle: rgba(0, 0, 0, 0.08); - color-scheme: light; - } - - :root.dark, .dark { - --bg-main: #09090b; - --bg-sidebar: #0f0f11; - --text-main: #f4f4f5; - --accent: #3b82f6; - --border-subtle: rgba(255, 255, 255, 0.06); - color-scheme: dark; - } - - html, body { +@import 'tailwindcss'; + +@custom-variant dark (&:where(.dark, .dark *)); + +/* ───────────────────────── Tokens de color ───────────────────────── + * Principios de diseño: superficies mate (sin negro/blanco puros), contraste suave, + * colores de estado desaturados y cero efectos costosos (sin blur ni transparencias de ventana). + */ +:root { + --ui-scale: 1; + --hue: 255; + + --bg-main: #f4f5f7; + --bg-sidebar: #eceef2; + --bg-raised: #ffffff; + --bg-hover: rgb(22 32 52 / 0.06); + --bg-active: rgb(22 32 52 / 0.11); + --border-subtle: rgb(22 32 52 / 0.1); + + --text-main: #1d2432; + --text-muted: #566175; + --text-faint: #8791a3; + + --accent: oklch(0.52 0.15 var(--hue)); + --accent-soft: oklch(0.52 0.15 var(--hue) / 0.12); + --accent-fg: #ffffff; + + --st-working: #2f6fd6; + --st-waiting: #b4730a; + --st-review: #7650d6; + --st-idle: #6a7486; + --st-exited: #98a1b0; + --ok: #2b8a62; + --danger: #c4433b; + + --f-read: #4f7fbf; + --f-write: #b4730a; + --f-exec: #2b8a62; + --f-search: #7650d6; + --f-web: #1f8aa0; + --f-agent: #c4568a; + --f-plan: #8a7a2a; + --f-think: #6a7486; + --f-other: #6a7486; + + --s0: #3b78d8; + --s1: #2b8a62; + --s2: #b4730a; + --s3: #7650d6; + --s4: #c4568a; + --s5: #1f8aa0; + --s6: #c06a3c; + --s7: #7d8a3a; + + --syn-keyword: #8a3fbf; + --syn-string: #2b7a4b; + --syn-number: #b4530a; + --syn-comment: #8791a3; + --syn-function: #2f6fd6; + --syn-type: #b4730a; + --syn-punct: #566175; +} + +.dark { + --bg-main: #0f1115; + --bg-sidebar: #14171c; + --bg-raised: #1a1e25; + --bg-hover: rgb(255 255 255 / 0.045); + --bg-active: rgb(255 255 255 / 0.085); + --border-subtle: rgb(255 255 255 / 0.07); + + --text-main: #d3d8e0; + --text-muted: #8c95a5; + --text-faint: #5d6676; + + --accent: oklch(0.72 0.12 var(--hue)); + --accent-soft: oklch(0.72 0.12 var(--hue) / 0.14); + --accent-fg: #0f1115; + + --st-working: #6aa5f7; + --st-waiting: #e3ad4a; + --st-review: #ad94f2; + --st-idle: #77839a; + --st-exited: #4b5463; + --ok: #55b78c; + --danger: #e8706a; + + --f-read: #7aa7e0; + --f-write: #e3ad4a; + --f-exec: #55b78c; + --f-search: #ad94f2; + --f-web: #4fb8cf; + --f-agent: #e07aa8; + --f-plan: #c9b65a; + --f-think: #77839a; + --f-other: #77839a; + + --s0: #6aa5f7; + --s1: #55b78c; + --s2: #e3ad4a; + --s3: #ad94f2; + --s4: #e07aa8; + --s5: #4fb8cf; + --s6: #e0946a; + --s7: #b3c070; + + --syn-keyword: #c49bf0; + --syn-string: #8fcf9f; + --syn-number: #e8a76a; + --syn-comment: #5d6676; + --syn-function: #7db4f5; + --syn-type: #e3ad4a; + --syn-punct: #8c95a5; +} + +[data-accent='blue'] { + --hue: 255; +} +[data-accent='teal'] { + --hue: 195; +} +[data-accent='violet'] { + --hue: 295; +} +[data-accent='amber'] { + --hue: 75; +} +[data-accent='rose'] { + --hue: 12; +} + +@theme inline { + --color-main: var(--bg-main); + --color-sidebar: var(--bg-sidebar); + --color-raised: var(--bg-raised); + --color-hover: var(--bg-hover); + --color-active: var(--bg-active); + --color-border-subtle: var(--border-subtle); + --color-text: var(--text-main); + --color-muted: var(--text-muted); + --color-faint: var(--text-faint); + --color-accent: var(--accent); + --color-accent-soft: var(--accent-soft); + --color-accent-fg: var(--accent-fg); + --color-ok: var(--ok); + --color-danger: var(--danger); + + --color-st-working: var(--st-working); + --color-st-waiting: var(--st-waiting); + --color-st-review: var(--st-review); + --color-st-idle: var(--st-idle); + --color-st-exited: var(--st-exited); + + --color-f-read: var(--f-read); + --color-f-write: var(--f-write); + --color-f-exec: var(--f-exec); + --color-f-search: var(--f-search); + --color-f-web: var(--f-web); + --color-f-agent: var(--f-agent); + --color-f-plan: var(--f-plan); + --color-f-think: var(--f-think); + --color-f-other: var(--f-other); + + --font-sans: 'Inter', ui-sans-serif, system-ui, 'Segoe UI Variable Text', 'Segoe UI', Roboto, sans-serif; + --font-mono: + 'JetBrains Mono', 'Cascadia Code', 'Cascadia Mono', ui-monospace, Consolas, 'SF Mono', monospace; + + --text-ui: 0.8125rem; + --text-ui--line-height: 1.45; + --text-meta: 0.6875rem; + --text-meta--line-height: 1.3; +} + +/* ───────────────────────── Base ───────────────────────── */ +html { + font-size: calc(16px * var(--ui-scale)); + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; +} + +html, +body { + height: 100%; margin: 0; - padding: 0; - width: 100vw; - height: 100vh; overflow: hidden; - background-color: transparent; - } +} - body { - background-color: var(--bg-main); +body { + background: var(--bg-main); color: var(--text-main); - -webkit-font-smoothing: antialiased; - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - } + font-family: var(--font-sans); + font-size: var(--text-ui); + line-height: 1.45; +} - #app { - height: 100%; - width: 100%; - } +* { + scrollbar-width: thin; + scrollbar-color: var(--bg-active) transparent; +} + +::selection { + background: var(--accent-soft); +} + +:focus-visible { + outline: 2px solid var(--accent); + outline-offset: 1px; + border-radius: 4px; +} + +button { + cursor: default; +} + +/* ───────────────────────── Componentes base ───────────────────────── */ +@layer components { + .btn { + @apply inline-flex h-7 shrink-0 items-center justify-center gap-1.5 rounded-md border border-border-subtle bg-raised px-2.5 text-ui whitespace-nowrap text-text transition-colors hover:bg-hover disabled:pointer-events-none disabled:opacity-45; + } + .btn-primary { + @apply border-transparent bg-accent text-accent-fg hover:brightness-110; + } + .btn-ghost { + @apply border-transparent bg-transparent text-muted hover:bg-hover hover:text-text; + } + .btn-danger { + @apply text-danger hover:bg-danger/10; + } + .icon-btn { + @apply inline-flex size-7 shrink-0 items-center justify-center rounded-md text-muted transition-colors hover:bg-hover hover:text-text disabled:pointer-events-none disabled:opacity-40; + } + .input { + @apply h-8 w-full rounded-md border border-border-subtle bg-main px-2.5 text-ui text-text placeholder:text-faint focus:border-accent focus:outline-none; + } + textarea.input { + @apply h-auto min-h-16 resize-y py-1.5 leading-snug; + } + .label { + @apply mb-1 block text-meta font-medium tracking-wide text-muted uppercase; + } + .kbd { + @apply inline-flex h-4.5 items-center rounded border border-border-subtle bg-main px-1 font-mono text-[0.625rem] text-muted; + } + .panel-title { + @apply flex h-9 shrink-0 items-center justify-between px-3 text-meta font-semibold tracking-wider text-muted uppercase; + } + .row-hover { + @apply transition-colors hover:bg-hover; + } +} + +/* ───────────────────────── Movimiento ───────────────────────── */ +@keyframes spin-slow { + to { + transform: rotate(360deg); + } +} + +@keyframes pulse-soft { + 0%, + 100% { + opacity: 1; + } + 50% { + opacity: 0.45; + } +} + +.anim-spin { + animation: spin-slow 1.8s linear infinite; +} + +.anim-pulse { + animation: pulse-soft 2.2s ease-in-out infinite; +} - .theme-transitioning, - .theme-transitioning * { +.reduce-motion *, +.reduce-motion *::before, +.reduce-motion *::after { + animation: none !important; transition: none !important; - } - - .header-main { - @apply h-11 border-b border-border-subtle flex items-center bg-main/40 backdrop-blur-2xl justify-between relative z-50 select-none w-full; - -webkit-app-region: drag; - } - - .control-btn { - @apply h-full px-4 flex items-center justify-center transition-colors text-text/60 hover:text-text hover:bg-white/10; - -webkit-app-region: no-drag; - pointer-events: auto; - } - - .close-btn { - @apply hover:bg-red-500 hover:text-white; - } -} \ No newline at end of file +} + +@media (prefers-reduced-motion: reduce) { + .anim-spin, + .anim-pulse { + animation: none; + } +} + +/* ───────────────────────── Terminal y editor ───────────────────────── */ +.xterm { + height: 100%; + padding: 6px 4px 0 10px; +} + +.xterm-viewport { + background: transparent !important; +} + +/* ───────────────────────── Vista de diferencias (CodeMirror merge) ───────────────────────── */ +.cm-merge-a .cm-changedLine, +.cm-merge-a .cm-deletedLine { + background: color-mix(in srgb, var(--danger) 11%, transparent); +} + +.cm-merge-b .cm-changedLine, +.cm-merge-b .cm-insertedLine { + background: color-mix(in srgb, var(--ok) 11%, transparent); +} + +.cm-merge-a .cm-changedText { + background: color-mix(in srgb, var(--danger) 30%, transparent); +} + +.cm-merge-b .cm-changedText { + background: color-mix(in srgb, var(--ok) 30%, transparent); +} + +.cm-collapsedLines { + background: var(--bg-sidebar) !important; + color: var(--text-faint) !important; + font-size: 0.6875rem; +} diff --git a/src/app.html b/src/app.html index 4eb42fc..775a724 100644 --- a/src/app.html +++ b/src/app.html @@ -1,29 +1,14 @@ - - - - - - - - - - - MOD0 - - %sveltekit.head% - - -
%sveltekit.body%
- + + + + + + + MOD0 + %sveltekit.head% + + +
%sveltekit.body%
+ diff --git a/src/lib/assets/logo-unified.svg b/src/lib/assets/logo-unified.svg new file mode 100644 index 0000000..dd07eef --- /dev/null +++ b/src/lib/assets/logo-unified.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/lib/components/common/Badge.svelte b/src/lib/components/common/Badge.svelte deleted file mode 100644 index 82dea11..0000000 --- a/src/lib/components/common/Badge.svelte +++ /dev/null @@ -1,16 +0,0 @@ - - - - {count} - \ No newline at end of file diff --git a/src/lib/components/common/Card.svelte b/src/lib/components/common/Card.svelte deleted file mode 100644 index 6b05a62..0000000 --- a/src/lib/components/common/Card.svelte +++ /dev/null @@ -1,9 +0,0 @@ - - -
- {@render children()} -
\ No newline at end of file diff --git a/src/lib/components/common/Dialog.svelte b/src/lib/components/common/Dialog.svelte index d1e797e..27cbdbd 100644 --- a/src/lib/components/common/Dialog.svelte +++ b/src/lib/components/common/Dialog.svelte @@ -1,47 +1,52 @@ + let { open, title, width = '30rem', onclose, children, footer }: Props = $props(); - -
-
-

{title}

-
- -
- {@render children()} -
+ function onKeydown(event: KeyboardEvent) { + if (event.key === 'Escape') { + event.stopPropagation(); + onclose(); + } + } + -
- - {#if footer} - {@render footer()} - {:else} - - {/if} -
-
-
\ No newline at end of file +{#if open} + +
event.target === event.currentTarget && onclose()} + > + +
+{/if} diff --git a/src/lib/components/common/Dropdown.svelte b/src/lib/components/common/Dropdown.svelte deleted file mode 100644 index 9c8cf3a..0000000 --- a/src/lib/components/common/Dropdown.svelte +++ /dev/null @@ -1,44 +0,0 @@ - - -
- - - {#if isOpen} - -
- {#each options as opt} - - {/each} -
-
- {/if} -
\ No newline at end of file diff --git a/src/lib/components/common/EmptyState.svelte b/src/lib/components/common/EmptyState.svelte new file mode 100644 index 0000000..55c5a65 --- /dev/null +++ b/src/lib/components/common/EmptyState.svelte @@ -0,0 +1,21 @@ + + +
+
+
+

{title}

+ {#if hint}

{hint}

{/if} +
+ {@render children?.()} +
diff --git a/src/lib/components/common/Menu.svelte b/src/lib/components/common/Menu.svelte deleted file mode 100644 index 878cdfb..0000000 --- a/src/lib/components/common/Menu.svelte +++ /dev/null @@ -1,40 +0,0 @@ - - -
- {#each items as item, i} -
- - - {#if item.children && activeSubmenu === i} -
- -
- {/if} -
- {/each} -
\ No newline at end of file diff --git a/src/lib/components/common/Popover.svelte b/src/lib/components/common/Popover.svelte deleted file mode 100644 index cff9e25..0000000 --- a/src/lib/components/common/Popover.svelte +++ /dev/null @@ -1,21 +0,0 @@ - - - -
- {@render children()} -
-
\ No newline at end of file diff --git a/src/lib/components/common/ResizablePanel.svelte b/src/lib/components/common/ResizablePanel.svelte deleted file mode 100644 index 00ffcc1..0000000 --- a/src/lib/components/common/ResizablePanel.svelte +++ /dev/null @@ -1,81 +0,0 @@ - - - - -{#if isResizing} -
-{/if} - -
- - - {@render children()} -
\ No newline at end of file diff --git a/src/lib/components/common/ResizeHandle.svelte b/src/lib/components/common/ResizeHandle.svelte new file mode 100644 index 0000000..17d0bdd --- /dev/null +++ b/src/lib/components/common/ResizeHandle.svelte @@ -0,0 +1,42 @@ + + + +
(dragging = false)} +> +
+
diff --git a/src/lib/components/common/Segmented.svelte b/src/lib/components/common/Segmented.svelte new file mode 100644 index 0000000..f8d5e6f --- /dev/null +++ b/src/lib/components/common/Segmented.svelte @@ -0,0 +1,24 @@ + + +
+ {#each options as option (option.value)} + + {/each} +
diff --git a/src/lib/components/common/StatusIcon.svelte b/src/lib/components/common/StatusIcon.svelte new file mode 100644 index 0000000..cb38984 --- /dev/null +++ b/src/lib/components/common/StatusIcon.svelte @@ -0,0 +1,35 @@ + + + + + {#if status === 'working' || status === 'starting'} + + {:else if status === 'waiting'} + + {:else if status === 'review'} + + {:else if status === 'idle'} + + {:else} + + {/if} + diff --git a/src/lib/components/common/ToastHost.svelte b/src/lib/components/common/ToastHost.svelte new file mode 100644 index 0000000..47bd00f --- /dev/null +++ b/src/lib/components/common/ToastHost.svelte @@ -0,0 +1,22 @@ + + +
+ {#each toastStack.toasts as toast (toast.id)} + + {/each} +
diff --git a/src/lib/components/common/Toggle.svelte b/src/lib/components/common/Toggle.svelte new file mode 100644 index 0000000..46f0035 --- /dev/null +++ b/src/lib/components/common/Toggle.svelte @@ -0,0 +1,34 @@ + + + diff --git a/src/lib/components/common/Tooltip.svelte b/src/lib/components/common/Tooltip.svelte deleted file mode 100644 index 4153177..0000000 --- a/src/lib/components/common/Tooltip.svelte +++ /dev/null @@ -1,11 +0,0 @@ - - -
- {text} -
\ No newline at end of file diff --git a/src/lib/components/common/low-level/FloatingPanel.svelte b/src/lib/components/common/low-level/FloatingPanel.svelte deleted file mode 100644 index 5c57454..0000000 --- a/src/lib/components/common/low-level/FloatingPanel.svelte +++ /dev/null @@ -1,56 +0,0 @@ - - -{#if anchorEl} - - onclose?.()} /> - -
- {@render children()} -
-
-{/if} \ No newline at end of file diff --git a/src/lib/components/common/low-level/Modal.svelte b/src/lib/components/common/low-level/Modal.svelte deleted file mode 100644 index 89a9842..0000000 --- a/src/lib/components/common/low-level/Modal.svelte +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - -
-
- {@render children()} -
-
-
\ No newline at end of file diff --git a/src/lib/components/common/low-level/Overlay.svelte b/src/lib/components/common/low-level/Overlay.svelte deleted file mode 100644 index ef593f9..0000000 --- a/src/lib/components/common/low-level/Overlay.svelte +++ /dev/null @@ -1,12 +0,0 @@ - - - \ No newline at end of file diff --git a/src/lib/components/common/low-level/Portal.svelte b/src/lib/components/common/low-level/Portal.svelte deleted file mode 100644 index 1bb57e3..0000000 --- a/src/lib/components/common/low-level/Portal.svelte +++ /dev/null @@ -1,22 +0,0 @@ - - -{#if container} - {@render children()} -{/if} \ No newline at end of file diff --git a/src/lib/components/layout/ActivityBar.svelte b/src/lib/components/layout/ActivityBar.svelte index 3eeebd7..0316b83 100644 --- a/src/lib/components/layout/ActivityBar.svelte +++ b/src/lib/components/layout/ActivityBar.svelte @@ -1,50 +1,53 @@ + const sections = Object.values(WorkSectionIDs); - \ No newline at end of file + {/each} + diff --git a/src/lib/components/layout/AttentionRail.svelte b/src/lib/components/layout/AttentionRail.svelte new file mode 100644 index 0000000..89d55f8 --- /dev/null +++ b/src/lib/components/layout/AttentionRail.svelte @@ -0,0 +1,103 @@ + + +{#if toggleUIStack.railOpen} + +{/if} diff --git a/src/lib/components/layout/Footer.svelte b/src/lib/components/layout/Footer.svelte index ee85b5d..899f78b 100644 --- a/src/lib/components/layout/Footer.svelte +++ b/src/lib/components/layout/Footer.svelte @@ -1,20 +1,36 @@ -
-
-
-
- System Online -
+
+
+ {#if session?.branch ?? filesStack.git?.branch} + + + {session?.branch ?? filesStack.git?.branch} + + {/if} + {#if session} + {session.name} · {session.profileName} + {/if}
- -
- - {workStack.mode} + +
+ + + {t('footer.observer')} - {settingsStack.current.theme} mode + v{settingsStack.info?.version ?? ''}
-
\ No newline at end of file +
diff --git a/src/lib/components/layout/Header.svelte b/src/lib/components/layout/Header.svelte index 645ceab..5402a04 100644 --- a/src/lib/components/layout/Header.svelte +++ b/src/lib/components/layout/Header.svelte @@ -1,56 +1,178 @@ -
(menuOpen = false)} /> + +
-
-
- Logo - + +
+ MOD0 + +
event.stopPropagation()} role="presentation"> + + + {#if menuOpen} +
+ + + {#if recents.length > 0} +
+ {t('project.recent')} +
+ {#each recents as path (path)} + + {/each} + {/if} +
+ {/if}
-
-
- - - -
+ +
+
-
-
- + +
+
+ {#if counts.working > 0} + + + {counts.working} + + {/if} + {#if counts.waiting > 0} + + {/if} + {#if counts.review > 0} + + {/if}
-
-
- \ No newline at end of file + {#if os !== 'macos'} +
+ + + +
+ {/if} + +
diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index bc3de9e..b60e233 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -1,52 +1,39 @@ -{#if toggleUIStack.sidebarOpen} - - - -{/if} \ No newline at end of file + {#if workStack.activity === 'sessions'} + + {:else if workStack.activity === 'thinking-graph'} + + {:else if workStack.activity === 'files'} + + {:else if workStack.activity === 'review'} + + {:else if workStack.activity === 'settings'} + + {/if} + + (startWidth = toggleUIStack.sidebarWidth)} + ondrag={(delta) => toggleUIStack.setSidebarWidth(startWidth + delta)} + /> +{/if} diff --git a/src/lib/components/layout/Workspace.svelte b/src/lib/components/layout/Workspace.svelte index dba593a..5a9c570 100644 --- a/src/lib/components/layout/Workspace.svelte +++ b/src/lib/components/layout/Workspace.svelte @@ -1,52 +1,52 @@ - -
- {#if tabsStack.activeTab} - - -
- - {#if tabsStack.activeTab.type === 'code'} - - {:else} -
-
- -
-

- Activity: {tabsStack.activeTab.label} -

-
- {/if} - -
-
- {:else} -
-

MOD0

+ import { toggleUIStack } from '#lib/core/runes/toggle-ui.svelte'; + import { workStack } from '#lib/core/runes/work-modes.svelte'; + import ResizeHandle from '#lib/components/common/ResizeHandle.svelte'; + import TerminalDock from '#lib/features/terminal/TerminalDock.svelte'; + import EditorMainSpace from '#lib/systems/pulse/editor/EditorMainSpace.svelte'; + import FilesMainSpace from '#lib/systems/pulse/files/FilesMainSpace.svelte'; + import KanbanMainSpace from '#lib/systems/forge/kanban/KanbanMainSpace.svelte'; + import ReviewMainSpace from '#lib/systems/pulse/review/ReviewMainSpace.svelte'; + import SessionsMainSpace from '#lib/systems/forge/sessions/SessionsMainSpace.svelte'; + import SettingsMainSpace from '#lib/systems/workspace/settings/SettingsMainSpace.svelte'; + import ThinkingGraphMainSpace from '#lib/systems/forge/thinking-graph/ThinkingGraphMainSpace.svelte'; - Logo + let startHeight = 0; + -
-

Sin archivos abiertos

-

Presiona Ctrl+P para buscar

-
-
+
+
+ {#if workStack.activity === 'sessions'} + + {:else if workStack.activity === 'thinking-graph'} + + {:else if workStack.activity === 'kanban'} + + {:else if workStack.activity === 'files'} + + {:else if workStack.activity === 'review'} + + {:else if workStack.activity === 'editor'} + + {:else if workStack.activity === 'settings'} + {/if} -
\ No newline at end of file + + + + {#if toggleUIStack.terminalOpen} + (startHeight = toggleUIStack.terminalHeight)} + ondrag={(delta) => toggleUIStack.setTerminalHeight(startHeight - delta)} + /> + {/if} +
+ +
+ diff --git a/src/lib/components/settings(future-migration)/Settings.svelte b/src/lib/components/settings(future-migration)/Settings.svelte deleted file mode 100644 index d06a8f5..0000000 --- a/src/lib/components/settings(future-migration)/Settings.svelte +++ /dev/null @@ -1,78 +0,0 @@ - - -{#if toggleUIStack.settingsOpen} - - e.stopPropagation()} - in:scale={{ start: 0.95, duration: 200 }} - > -
-
- -

Ajustes

-
- -
-
- - Apariencia - -
- {#each ['light', 'dark'] as t} - - {/each} -
-
- - -
- -
- -
-
-
-
-{/if} \ No newline at end of file diff --git a/src/lib/core/constants/default-config.ts b/src/lib/core/constants/default-config.ts new file mode 100644 index 0000000..a08caea --- /dev/null +++ b/src/lib/core/constants/default-config.ts @@ -0,0 +1,32 @@ +import type { AppConfig } from '#lib/core/types/settings'; + +/** Valores iniciales mientras el backend entrega la configuración real. */ +export const defaultConfig: AppConfig = { + theme: 'dark', + accent: 'blue', + language: 'es', + uiScale: 1, + reduceMotion: false, + autoSave: false, + terminalFontSize: 13, + contextLimit: 200_000, + shell: null, + lastProjectPath: null, + recentProjects: [], + profiles: [], + defaultProfileId: 'claude', + notifications: { + desktop: true, + onlyWhenUnfocused: true, + onNeedsYou: true, + onSessionDone: false, + onAllIdle: true, + webhook: { + enabled: false, + url: '', + method: 'POST', + body: '{message}', + contentType: 'text/plain; charset=utf-8', + }, + }, +}; diff --git a/src/lib/core/constants/family-config.ts b/src/lib/core/constants/family-config.ts new file mode 100644 index 0000000..5f19024 --- /dev/null +++ b/src/lib/core/constants/family-config.ts @@ -0,0 +1,16 @@ +import { Bot, Brain, Globe, ListTodo, Pencil, Search, Terminal, Eye, Zap } from '@lucide/svelte'; +import type { Component } from 'svelte'; +import type { ActionFamily } from '#lib/core/types/session'; + +/** Icono, color y clave de i18n de cada familia de acción de la IA. */ +export const FamilyVisual: Record; text: string; label: string }> = { + read: { icon: Eye, text: 'text-f-read', label: 'family.read' }, + write: { icon: Pencil, text: 'text-f-write', label: 'family.write' }, + exec: { icon: Terminal, text: 'text-f-exec', label: 'family.exec' }, + search: { icon: Search, text: 'text-f-search', label: 'family.search' }, + web: { icon: Globe, text: 'text-f-web', label: 'family.web' }, + agent: { icon: Bot, text: 'text-f-agent', label: 'family.agent' }, + plan: { icon: ListTodo, text: 'text-f-plan', label: 'family.plan' }, + think: { icon: Brain, text: 'text-f-think', label: 'family.think' }, + other: { icon: Zap, text: 'text-f-other', label: 'family.other' }, +}; diff --git a/src/lib/core/constants/profile-presets.ts b/src/lib/core/constants/profile-presets.ts new file mode 100644 index 0000000..1ae1546 --- /dev/null +++ b/src/lib/core/constants/profile-presets.ts @@ -0,0 +1,175 @@ +import type { CliProfile } from '#lib/core/types/settings'; + +export type PresetGroup = 'claude' | 'other'; + +export interface ProfilePreset { + id: string; + group: PresetGroup; + profile: Omit; + /** Cómo instalar la CLI (referencia; verifica siempre con la documentación oficial). */ + install?: string; + /** Nota breve (es/en) que se muestra al elegir la plantilla. */ + note: { es: string; en: string }; +} + +const claude = (name: string, env: Record): Omit => ({ + name, + command: 'claude', + args: [], + env, + hooks: true, + resumeArgs: ['--resume', '{session}'], +}); + +const other = (name: string, command: string, env: Record = {}, args: string[] = []) => ({ + name, + command, + args, + env, + hooks: false, + resumeArgs: [] as string[], +}); + +/** + * Plantillas de perfiles. Las claves nunca se escriben aquí: se referencian con `$NOMBRE`, que MOD0 lee de las + * variables de entorno del sistema al lanzar la sesión (defínelas una vez, p. ej. con `setx` en Windows). + */ +export const profilePresets: ProfilePreset[] = [ + { + id: 'claude', + group: 'claude', + profile: claude('Claude Code', {}), + install: 'npm install -g @anthropic-ai/claude-code', + note: { + es: 'La CLI oficial. Observación completa: hooks, thinking graph, plan y estados exactos.', + en: 'The official CLI. Full observation: hooks, thinking graph, plan and exact states.', + }, + }, + { + id: 'claude-openrouter', + group: 'claude', + profile: claude('Claude Code · OpenRouter', { + ANTHROPIC_BASE_URL: 'https://openrouter.ai/api', + ANTHROPIC_AUTH_TOKEN: '$OPENROUTER_API_KEY', + ANTHROPIC_API_KEY: '', + }), + install: 'npm install -g @anthropic-ai/claude-code', + note: { + es: 'Usa Claude Code con modelos de OpenRouter. Define OPENROUTER_API_KEY en el sistema. OpenRouter garantiza el funcionamiento con modelos de Anthropic; con otros puede fallar.', + en: 'Claude Code through OpenRouter. Set OPENROUTER_API_KEY in your system. OpenRouter guarantees it with Anthropic models; others may not work.', + }, + }, + { + id: 'claude-zai', + group: 'claude', + profile: claude('Claude Code · Z.ai (GLM)', { + ANTHROPIC_BASE_URL: 'https://api.z.ai/api/anthropic', + ANTHROPIC_AUTH_TOKEN: '$ZAI_API_KEY', + }), + install: 'npm install -g @anthropic-ai/claude-code', + note: { + es: 'Endpoint compatible de Z.ai para modelos GLM. Define ZAI_API_KEY. El mapeo de modelos se ajusta con ANTHROPIC_DEFAULT_*_MODEL.', + en: "Z.ai's compatible endpoint for GLM models. Set ZAI_API_KEY. Map models with ANTHROPIC_DEFAULT_*_MODEL.", + }, + }, + { + id: 'claude-qwen', + group: 'claude', + profile: claude('Claude Code · Qwen (DashScope)', { + ANTHROPIC_BASE_URL: 'https://dashscope-intl.aliyuncs.com/apps/anthropic', + ANTHROPIC_AUTH_TOKEN: '$DASHSCOPE_API_KEY', + }), + install: 'npm install -g @anthropic-ai/claude-code', + note: { + es: 'Endpoint compatible de Alibaba (DashScope) para Qwen. Define DASHSCOPE_API_KEY.', + en: "Alibaba's (DashScope) compatible endpoint for Qwen. Set DASHSCOPE_API_KEY.", + }, + }, + { + id: 'claude-deepseek', + group: 'claude', + profile: claude('Claude Code · DeepSeek', { + ANTHROPIC_BASE_URL: 'https://api.deepseek.com/anthropic', + ANTHROPIC_AUTH_TOKEN: '$DEEPSEEK_API_KEY', + }), + install: 'npm install -g @anthropic-ai/claude-code', + note: { + es: 'Endpoint compatible de DeepSeek. Define DEEPSEEK_API_KEY.', + en: "DeepSeek's compatible endpoint. Set DEEPSEEK_API_KEY.", + }, + }, + { + id: 'claude-gateway', + group: 'claude', + profile: claude('Claude Code · endpoint propio / local', { + ANTHROPIC_BASE_URL: 'http://localhost:4000', + ANTHROPIC_AUTH_TOKEN: '$MY_GATEWAY_KEY', + }), + install: 'npm install -g @anthropic-ai/claude-code', + note: { + es: 'Para un gateway propio (LiteLLM, un proxy local, Ollama detrás de un traductor…). Ajusta la URL y la variable de la clave.', + en: 'For your own gateway (LiteLLM, a local proxy, Ollama behind a translator…). Adjust the URL and key variable.', + }, + }, + { + id: 'aider', + group: 'other', + profile: other('Aider', 'aider', { OPENROUTER_API_KEY: '$OPENROUTER_API_KEY' }, [ + '--model', + 'openrouter/', + ]), + install: 'python -m pip install aider-install && aider-install', + note: { + es: 'Sin hooks: el estado se infiere por actividad. Cambia por uno de OpenRouter (admite modelos :free).', + en: 'No hooks: state is inferred from activity. Replace with an OpenRouter model (:free models work).', + }, + }, + { + id: 'opencode', + group: 'other', + profile: other('OpenCode', 'opencode'), + install: 'npm install -g opencode-ai', + note: { + es: 'Sin hooks. Configura proveedores dentro de la propia CLI (opencode auth login).', + en: 'No hooks. Configure providers inside the CLI itself (opencode auth login).', + }, + }, + { + id: 'qwen-code', + group: 'other', + profile: other('Qwen Code', 'qwen', { + OPENAI_API_KEY: '$DASHSCOPE_API_KEY', + OPENAI_BASE_URL: 'https://dashscope-intl.aliyuncs.com/compatible-mode/v1', + OPENAI_MODEL: 'qwen3-coder-plus', + }), + install: 'npm install -g @qwen-code/qwen-code', + note: { + es: 'Sin hooks. Variables estilo OpenAI; ajusta el modelo según tu cuenta.', + en: 'No hooks. OpenAI-style variables; adjust the model for your account.', + }, + }, + { + id: 'codex', + group: 'other', + profile: other('Codex CLI', 'codex'), + install: 'npm install -g @openai/codex', + note: { es: 'Sin hooks.', en: 'No hooks.' }, + }, + { + id: 'gemini', + group: 'other', + profile: other('Gemini CLI', 'gemini'), + install: 'npm install -g @google/gemini-cli', + note: { es: 'Sin hooks.', en: 'No hooks.' }, + }, + { + id: 'codespace', + group: 'other', + profile: other('Codespace remoto (gh)', 'gh', {}, ['codespace', 'ssh']), + install: 'gh auth login', + note: { + es: 'Terminal remota en un Codespace: la sesión sobrevive a cortes si usas tmux dentro. La revisión y el grafo de archivos solo ven carpetas locales.', + en: 'Remote terminal in a Codespace: the session survives drops if you use tmux inside. Review and file graph only see local folders.', + }, + }, +]; diff --git a/src/lib/core/constants/webhook-presets.ts b/src/lib/core/constants/webhook-presets.ts new file mode 100644 index 0000000..cd4309c --- /dev/null +++ b/src/lib/core/constants/webhook-presets.ts @@ -0,0 +1,45 @@ +import type { WebhookConfig } from '#lib/core/types/settings'; + +/** Plantillas listas para los canales más comunes. Placeholders: {title} {message} {session} {status}. */ +export const webhookPresets: Array<{ id: string; label: string; webhook: Omit }> = [ + { + id: 'ntfy', + label: 'ntfy.sh', + webhook: { + url: 'https://ntfy.sh/TU-TEMA-SECRETO', + method: 'POST', + body: '{title}: {message}', + contentType: 'text/plain; charset=utf-8', + }, + }, + { + id: 'telegram', + label: 'Telegram', + webhook: { + url: 'https://api.telegram.org/botTOKEN/sendMessage?chat_id=CHAT_ID&text={title_url}%0A{message_url}', + method: 'GET', + body: '', + contentType: 'text/plain', + }, + }, + { + id: 'whatsapp', + label: 'WhatsApp (CallMeBot)', + webhook: { + url: 'https://api.callmebot.com/whatsapp.php?phone=TU_NUMERO&apikey=TU_APIKEY&text={title_url}%20-%20{message_url}', + method: 'GET', + body: '', + contentType: 'text/plain', + }, + }, + { + id: 'json', + label: 'JSON genérico', + webhook: { + url: 'https://example.com/hook', + method: 'POST', + body: '{"title":"{title_json}","message":"{message_json}","session":"{session}","status":"{status}"}', + contentType: 'application/json', + }, + }, +]; diff --git a/src/lib/core/constants/work-config.ts b/src/lib/core/constants/work-config.ts index 75d5fe7..cf3e8db 100644 --- a/src/lib/core/constants/work-config.ts +++ b/src/lib/core/constants/work-config.ts @@ -1,22 +1,18 @@ -import { - Box, - Cpu, - Zap, - Puzzle, - Folder, +import { + Network, + LayoutGrid, + SquareKanban, + FolderTree, + FileDiff, + FileCode, Settings, - GitGraph, - GitBranch, - ClipboardList, - MessageSquare, - TestTube, - BotMessageSquare -} from 'lucide-svelte'; -import type { ActivityID, DisplayNode, WorkSectionID } from "$lib/core/types/work"; + Zap, + GitFork, +} from '@lucide/svelte'; +import type { ActivityID, DisplayNode, WorkSectionID } from '#lib/core/types/work'; /** Identificadores de secciones operativas del IDE */ export const WorkSectionIDs = { - BLUEPRINT: 'blueprint', FORGE: 'forge', PULSE: 'pulse', WORKSPACE: 'workspace', @@ -24,153 +20,102 @@ export const WorkSectionIDs = { /** Identificadores de actividades disponibles en el IDE */ export const ActivityIDs = { - // Blueprint - CHAT: 'chat', - ARTIFACTS: 'artifacts', - - // Forge + // Forge: orquestar sesiones + SESSIONS: 'sessions', THINKING_GRAPH: 'thinking-graph', KANBAN: 'kanban', - // Pulse + // Pulse: entender y revisar el proyecto FILES: 'files', - TESTING: 'testing', - SOURCE_CONTROL: 'source-control', + REVIEW: 'review', + EDITOR: 'editor', - // Workspace - CONTEXT: 'context', - WORKFLOW: 'workflow', - PLUGINS: 'plugins', -}; + // Workspace: configuración + SETTINGS: 'settings', +} as const; export const WorkSectionVisual: Record = { - [WorkSectionIDs.BLUEPRINT]: { - id: WorkSectionIDs.BLUEPRINT, - label: 'Blueprint', - icon: Cpu, - color: 'text-blue-400', - description: 'Design and plan your projects with the Blueprint section, where you can create and manage your project blueprints, visualize dependencies, and organize your work in a structured way.' - }, - [WorkSectionIDs.FORGE]: { - id: WorkSectionIDs.FORGE, - label: 'Forge', - icon: Zap, - color: 'text-orange-400', - description: 'The Forge is where the magic happens. Here you can build, test, and iterate on your projects with powerful tools and integrations that help you bring your ideas to life.' - }, - [WorkSectionIDs.PULSE]: { - id: WorkSectionIDs.PULSE, - label: 'Pulse', - icon: GitGraph, - color: 'text-purple-400', - description: 'Monitor and track the progress of your projects in real-time with the Pulse section. Visualize project health, performance metrics, and key performance indicators (KPIs) to stay informed and make data-driven decisions.' - }, - [WorkSectionIDs.WORKSPACE]: { - id: WorkSectionIDs.WORKSPACE, - label: 'Workspace', - icon: Settings, - color: 'text-gray-400', - description: 'Manage your agile & personalized configurations in the IDE Workspace section. Customize your workspace, adjust preferences, and fine-tune your development environment to suit your needs.' - } -} as const; + [WorkSectionIDs.FORGE]: { id: WorkSectionIDs.FORGE, label: 'section.forge', icon: Zap }, + [WorkSectionIDs.PULSE]: { id: WorkSectionIDs.PULSE, label: 'section.pulse', icon: GitFork }, + [WorkSectionIDs.WORKSPACE]: { id: WorkSectionIDs.WORKSPACE, label: 'section.workspace', icon: Settings }, +}; export const ActivityVisual: Record = { - // Blueprint - [ActivityIDs.CHAT]: { - id: ActivityIDs.CHAT, - label: 'Chat', - icon: BotMessageSquare, - color: 'text-blue-400', - description: 'Engage in real-time conversations with your team and AI assistants in the Chat activity. Collaborate, brainstorm, and get instant feedback to keep your projects moving forward.' + [ActivityIDs.SESSIONS]: { + id: ActivityIDs.SESSIONS, + label: 'activity.sessions', + icon: LayoutGrid, + shortcut: 'Ctrl+1', }, - [ActivityIDs.ARTIFACTS]: { - id: ActivityIDs.ARTIFACTS, - label: 'Artifacts', - icon: Box, - color: 'text-green-400', - description: 'Manage and view your project artifacts in the Artifacts activity. Access and organize all the deliverables and components of your projects in one place.' + [ActivityIDs.THINKING_GRAPH]: { + id: ActivityIDs.THINKING_GRAPH, + label: 'activity.thinking', + icon: Network, + shortcut: 'Ctrl+2', }, - - // Forge - [ActivityIDs.THINKING_GRAPH]: { - id: ActivityIDs.THINKING_GRAPH, - label: 'Thinking Graph', - icon: GitBranch, - color: 'text-purple-400', - description: 'Visualize and analyze your project\'s thinking process in the Thinking Graph activity. Understand how ideas evolve and connect to build better projects.' + [ActivityIDs.KANBAN]: { + id: ActivityIDs.KANBAN, + label: 'activity.kanban', + icon: SquareKanban, + shortcut: 'Ctrl+3', }, - [ActivityIDs.KANBAN]: { - id: ActivityIDs.KANBAN, - label: 'Kanban Board', - icon: ClipboardList, - color: 'text-yellow-400', - description: 'Manage your workflow and tasks in the Kanban Board activity. Visualize your work in progress, identify bottlenecks, and optimize your team\'s productivity.' + [ActivityIDs.FILES]: { + id: ActivityIDs.FILES, + label: 'activity.files', + icon: FolderTree, + shortcut: 'Ctrl+4', }, - [ActivityIDs.TESTING]: { - id: ActivityIDs.TESTING, - label: 'Testing', - icon: TestTube, - color: 'text-red-400', - description: 'Manage and run your project tests in the Testing activity. Execute automated tests, view results, and ensure code quality and reliability.' + [ActivityIDs.REVIEW]: { + id: ActivityIDs.REVIEW, + label: 'activity.review', + icon: FileDiff, + shortcut: 'Ctrl+5', }, - - // Pulse - [ActivityIDs.FILES]: { - id: ActivityIDs.FILES, - label: 'Files', - icon: Folder, - color: 'text-gray-400', - description: 'Browse and manage your project files in the Files activity. View file hierarchies, access metadata, and organize your project assets efficiently.' + [ActivityIDs.EDITOR]: { + id: ActivityIDs.EDITOR, + label: 'activity.editor', + icon: FileCode, + shortcut: 'Ctrl+6', }, - [ActivityIDs.SOURCE_CONTROL]: { - id: ActivityIDs.SOURCE_CONTROL, - label: 'Source Control', - icon: GitBranch, - color: 'text-red-400', - description: 'Track changes and manage version control in the Source Control activity. Collaborate with team members, review history, and maintain a clean codebase.' - }, - - // Workspace - [ActivityIDs.CONTEXT]: { - id: ActivityIDs.CONTEXT, - label: 'Context', - icon: MessageSquare, - color: 'text-gray-400', - description: 'Manage your context and preferences in the Context activity. Customize your workspace and tailor your development environment to suit your needs.' - }, - [ActivityIDs.WORKFLOW]: { - id: ActivityIDs.WORKFLOW, - label: 'Workflow', - icon: GitGraph, - color: 'text-blue-400', - description: 'Define and manage your project workflows in the Workflow activity. Create custom workflows that match your team\'s processes and requirements.' - }, - [ActivityIDs.PLUGINS]: { - id: ActivityIDs.PLUGINS, - label: 'Plugins', - icon: Puzzle, - color: 'text-green-400', - description: 'Manage and configure extensions and MCP servers in the Plugins activity. Install, update, and customize extensions and MCP servers to enhance your IDE capabilities.' + [ActivityIDs.SETTINGS]: { + id: ActivityIDs.SETTINGS, + label: 'activity.settings', + icon: Settings, + shortcut: 'Ctrl+,', }, }; export const ActivityByWork: Record = { - [WorkSectionIDs.BLUEPRINT]: [ - ActivityIDs.CHAT, - ActivityIDs.ARTIFACTS, - ], - [WorkSectionIDs.FORGE]: [ - ActivityIDs.THINKING_GRAPH, - ActivityIDs.TESTING, - ActivityIDs.KANBAN - ], - [WorkSectionIDs.PULSE]: [ - ActivityIDs.FILES, - ActivityIDs.SOURCE_CONTROL, - ], - [WorkSectionIDs.WORKSPACE]: [ - ActivityIDs.CONTEXT, - ActivityIDs.WORKFLOW, - ActivityIDs.PLUGINS - ] -}; \ No newline at end of file + [WorkSectionIDs.FORGE]: [ActivityIDs.SESSIONS, ActivityIDs.THINKING_GRAPH, ActivityIDs.KANBAN], + [WorkSectionIDs.PULSE]: [ActivityIDs.FILES, ActivityIDs.REVIEW, ActivityIDs.EDITOR], + [WorkSectionIDs.WORKSPACE]: [ActivityIDs.SETTINGS], +}; + +/** Actividades que tienen panel lateral propio. */ +export const ActivitiesWithSidebar: ActivityID[] = [ + ActivityIDs.SESSIONS, + ActivityIDs.THINKING_GRAPH, + ActivityIDs.FILES, + ActivityIDs.REVIEW, + ActivityIDs.SETTINGS, +]; + +/** Colores de estado de sesión (clases de Tailwind sobre los tokens de `app.css`). */ +export const StatusStyle = { + starting: { text: 'text-st-idle', bg: 'bg-st-idle', ring: 'ring-st-idle' }, + working: { text: 'text-st-working', bg: 'bg-st-working', ring: 'ring-st-working' }, + waiting: { text: 'text-st-waiting', bg: 'bg-st-waiting', ring: 'ring-st-waiting' }, + review: { text: 'text-st-review', bg: 'bg-st-review', ring: 'ring-st-review' }, + idle: { text: 'text-st-idle', bg: 'bg-st-idle', ring: 'ring-st-idle' }, + exited: { text: 'text-st-exited', bg: 'bg-st-exited', ring: 'ring-st-exited' }, +} as const; + +/** Prioridad de atención: menor número = más urgente. */ +export const StatusPriority = { + waiting: 0, + review: 1, + working: 2, + starting: 3, + idle: 4, + exited: 5, +} as const; diff --git a/src/lib/core/i18n/locales/en.json b/src/lib/core/i18n/locales/en.json index e69de29..5072c77 100644 --- a/src/lib/core/i18n/locales/en.json +++ b/src/lib/core/i18n/locales/en.json @@ -0,0 +1,245 @@ +{ + "about.config": "Config", + "about.data": "Data", + "about.how": "How MOD0 observes your sessions", + "about.howText": "For Claude Code, MOD0 launches the CLI with an extra settings file that sends its events (HTTP hooks) to this local server. That's how it knows which file it touches, when it waits for your permission and when it's done, without spending tokens. For other CLIs it infers the state from terminal activity.", + "about.inactive": "inactive", + "about.observer": "Observer", + "about.open": "Open folder", + "about.runtime": "Runtime", + "about.shell": "Shell", + "about.shortcuts": "Keyboard shortcuts", + "about.tagline": "Mission control for your AI CLI sessions.", + "activity.editor": "Editor", + "activity.files": "Files", + "activity.kanban": "Kanban", + "activity.review": "Review", + "activity.sessions": "Sessions", + "activity.settings": "Settings", + "activity.thinking": "Thinking graph", + "boot.failed": "MOD0 couldn't start", + "boot.hint": "Run the app with `npm run tauri dev`: the Tauri backend is required.", + "common.add": "Add", + "common.cancel": "Cancel", + "common.close": "Close", + "common.delete": "Delete", + "common.edit": "Edit", + "common.refresh": "Refresh", + "common.save": "Save", + "common.saved": "Saved", + "common.starting": "Starting…", + "editor.empty": "No file open", + "editor.emptyHint": "The editor is for reviewing and small tweaks. Open a file from Files, Review or the graph.", + "family.agent": "Subagent", + "family.exec": "Command", + "family.other": "Other", + "family.plan": "Plan", + "family.read": "Read", + "family.search": "Search", + "family.think": "Thinking", + "family.web": "Web", + "family.write": "Write", + "files.affectedNodes": "affected nodes", + "files.changedBy": "files changed by", + "files.collapse": "Collapse", + "files.collapseAll": "Collapse all (first level)", + "files.depth": "Depth", + "files.expand": "Expand", + "files.graph": "Project graph", + "files.graphEmpty": "No dependencies to show", + "files.graphEmptyHint": "TS/JS, Svelte, Vue, Astro, Python and Rust are analyzed.", + "files.graphError": "Couldn't build the graph", + "files.graphTip": "Double-click a folder to open it · wheel to zoom · drag to pan", + "files.impact": "Impact", + "files.impactHint": "Highlights which files depend on what the focused session changed", + "files.noProjectHint": "Open a folder to see its structure.", + "files.title": "Files", + "files.usedBy": "Used by", + "files.uses": "Uses", + "filter.all": "All", + "filter.attention": "Need you", + "filter.idle": "Idle", + "filter.working": "Working", + "footer.observer": "Observer", + "graph.done": "Done", + "graph.empty": "No steps yet", + "graph.emptyHint": "Once the AI starts working, every step will show up here live.", + "graph.follow": "Follow", + "graph.noHooks": "This CLI doesn't report events: its state is only inferred. The graph needs Claude Code with hooks enabled on the profile.", + "graph.noSession": "No session selected", + "graph.noSessionHint": "Create or select a session to see its reasoning.", + "graph.retry": "Retry after a failure", + "graph.sessions": "Sessions", + "graph.turns": "Turns", + "graph.view": "View", + "graph.viewDiagram": "Diagram", + "graph.viewTimeline": "Timeline", + "header.rail": "Attention panel", + "header.terminal": "Terminal", + "kanban.add": "Add task…", + "kanban.backlog": "Backlog", + "kanban.doing": "In progress", + "kanban.done": "Done", + "kanban.editTask": "Edit task", + "kanban.noProject": "Open a project", + "kanban.noProjectHint": "Each project has its own board.", + "kanban.review": "Review", + "kanban.start": "Start session", + "kanban.taskNotes": "Notes", + "kanban.taskTitle": "Title", + "kpi.changes": "Lines added / removed", + "kpi.context": "Context used", + "kpi.errors": "Tools with errors", + "kpi.turns": "Turns", + "node.detail": "Detail", + "node.duration": "Duration", + "node.intent": "Why it does it", + "node.notice": "Notice", + "node.open": "Open", + "node.prompt": "Prompt", + "node.status": "Status", + "node.stop": "End of turn", + "node.target": "Target", + "node.time": "Time", + "node.tool": "Tool", + "notify.allIdle": "Everything finished", + "notify.allIdleHint": "A single alert once no session is still working.", + "notify.body": "Body (POST)", + "notify.desktop": "Desktop notifications", + "notify.method": "Method", + "notify.needsYou": "A session needs you", + "notify.needsYouHint": "It asks for a permission or decision and stays blocked.", + "notify.onlyUnfocused": "Only when MOD0 isn't focused", + "notify.onlyUnfocusedHint": "Avoids redundant alerts while you're already looking at the app.", + "notify.placeholders": "Placeholders", + "notify.presets": "Templates", + "notify.secretsWarning": "The URL is stored in plain text in your config folder: don't share that file.", + "notify.sessionDone": "A session finished a turn", + "notify.sessionDoneHint": "With 8-15 sessions this can be noisy; \"Everything finished\" is usually enough.", + "notify.test": "Test", + "notify.webhook": "Webhook (WhatsApp, Telegram, ntfy…)", + "notify.webhookHint": "Alerts your phone through any service that accepts an HTTP request.", + "palette.commands": "Commands", + "palette.empty": "No results", + "palette.files": "Files", + "palette.filesPlaceholder": "Search file by name…", + "palette.go": "Go to", + "palette.placeholder": "Type a command or a session name…", + "palette.session": "Session", + "palette.toggleSidebar": "Toggle sidebar", + "palette.toggleTheme": "Toggle light/dark theme", + "palette.trigger": "Search or run…", + "plan.title": "Plan", + "profiles.add": "Add profile", + "profiles.addEmpty": "Empty profile", + "profiles.args": "Arguments (one per line)", + "profiles.command": "Command", + "profiles.default": "Default", + "profiles.env": "Environment variables (KEY=value or KEY=$VARIABLE)", + "profiles.found": "Found", + "profiles.fromTemplate": "Add from a template", + "profiles.groupClaude": "Claude Code (full observation)", + "profiles.groupOther": "Other CLIs (state by activity)", + "profiles.hooks": "Observe with hooks (Claude Code)", + "profiles.hooksHint": "Enables the thinking graph, exact states and permission alerts.", + "profiles.install": "Install", + "profiles.keysTip": "Keys are referenced as $NAME: MOD0 reads them from your system environment variables when launching the session, so they never land in a file. If you set them with setx, restart MOD0.", + "profiles.makeDefault": "Make default", + "profiles.missingEnv": "Undefined environment variables:", + "profiles.newName": "New profile", + "profiles.notFound": "Couldn't find \"{command}\" on the PATH.", + "profiles.resume": "Resume arguments", + "profiles.secretsHint": "Avoid typing keys directly here: use $NAME to read them from the system environment. This file is stored in plain text.", + "profiles.templateEndpoint": "Template: custom endpoint / local AI", + "project.none": "No project", + "project.open": "Open folder…", + "project.recent": "Recent", + "project.title": "Project", + "rail.empty": "No sessions yet", + "rail.nextAttention": "Next one that needs you", + "rail.title": "Sessions", + "review.approve": "Mark reviewed", + "review.base": "Compared against the commit the session started from.", + "review.commit": "Commit", + "review.commitMessage": "Commit message…", + "review.files": "files", + "review.markFile": "Mark file as reviewed", + "review.noChanges": "No changes", + "review.noSession": "No session selected", + "review.noSessionHint": "Select a session to review what it did.", + "review.pick": "Pick a file to see its diff", + "review.reviewed": "reviewed", + "review.view": "File view", + "review.viewList": "Flat list", + "review.viewTree": "Folder tree", + "section.forge": "Forge", + "section.pulse": "Pulse", + "section.workspace": "Workspace", + "session.branchPlaceholder": "branch (default mod0/name)", + "session.isolation": "Isolation", + "session.name": "Name", + "session.namePlaceholder": "E.g. authentication refactor", + "session.needProject": "Open a project folder first.", + "session.new": "New session", + "session.profile": "CLI", + "session.prompt": "Initial prompt (optional)", + "session.promptPlaceholder": "What it should do. It's flattened to a single line.", + "session.remove": "Remove session", + "session.removeConfirm": "Remove session \"{name}\"? Its terminal will be closed.", + "session.removeWorktreeConfirm": "Also remove the worktree and its folder? Uncommitted changes will be lost.", + "session.rename": "Rename", + "session.restart": "Restart", + "session.resume": "Resume", + "session.sameFolder": "Same folder", + "session.sameFolderHint": "Works directly on the project. Two sessions may overwrite each other's files.", + "session.start": "Start", + "session.stop": "Stop", + "session.worktree": "Own worktree", + "session.worktreeHint": "Creates an isolated branch and sibling folder: ideal for several parallel sessions.", + "sessions.empty": "No sessions yet", + "sessions.emptyHint": "Launch several CLIs in parallel and MOD0 will tell you which one needs attention.", + "sessions.noMatch": "No session matches the filter.", + "settings.about": "About", + "settings.accent": "Accent color", + "settings.appearance": "Appearance", + "settings.appearanceHint": "Matte surfaces and soft colors to reduce eye strain.", + "settings.autoSave": "Auto-save", + "settings.autoSaveHint": "Saves the editor file one second after you stop typing.", + "settings.language": "Language", + "settings.notifications": "Notifications", + "settings.notificationsHint": "Let MOD0 tell you when something needs you, so you don't have to watch the sessions.", + "settings.profiles": "CLI profiles", + "settings.profilesHint": "Each profile is an AI CLI you can launch in a session. MOD0 only wraps it: your key and your model stay yours. With Claude Code you can use other providers through a compatible endpoint and keep full observation.", + "settings.reduceMotion": "Reduce motion", + "settings.reduceMotionHint": "Turns off spinning and pulsing indicators.", + "settings.scale": "Interface scale", + "settings.terminalFont": "Terminal font size", + "settings.theme": "Theme", + "shortcut.jump": "Jump to session n", + "shortcut.panels": "Sidebar / attention panel", + "shortcut.views": "Switch view", + "shortcut.zoom": "Interface zoom", + "sidebar.launch": "Launch", + "status.exited": "Exited", + "status.idle": "Idle", + "status.review": "To review", + "status.starting": "Starting", + "status.waiting": "Waiting for you", + "status.waitingYou": "Waiting for your decision", + "status.working": "Working", + "terminal.empty": "No terminal", + "terminal.emptyHint": "Create a session to open its terminal.", + "terminal.title": "Terminal", + "theme.dark": "Dark", + "theme.light": "Light", + "theme.system": "System", + "toast.nothingPending": "Nothing pending: no session needs you.", + "unit.commands": "commands", + "unit.files": "files", + "unit.links": "links", + "unit.modules": "modules", + "unit.nodes": "nodes", + "unit.phases": "phases", + "unit.steps": "steps", + "unit.turns": "turns" +} diff --git a/src/lib/core/i18n/locales/es.json b/src/lib/core/i18n/locales/es.json index e69de29..1bfa124 100644 --- a/src/lib/core/i18n/locales/es.json +++ b/src/lib/core/i18n/locales/es.json @@ -0,0 +1,245 @@ +{ + "about.config": "Configuración", + "about.data": "Datos", + "about.how": "Cómo observa MOD0 tus sesiones", + "about.howText": "Para Claude Code, MOD0 lanza la CLI con un archivo de ajustes extra que envía sus eventos (hooks HTTP) a este servidor local. Así sabe qué archivo toca, cuándo espera tu permiso y cuándo terminó, sin gastar tokens. Para otras CLI infiere el estado a partir de la actividad de la terminal.", + "about.inactive": "inactivo", + "about.observer": "Observador", + "about.open": "Abrir carpeta", + "about.runtime": "Entorno", + "about.shell": "Shell", + "about.shortcuts": "Atajos de teclado", + "about.tagline": "Mission control para tus sesiones de CLI con IA.", + "activity.editor": "Editor", + "activity.files": "Archivos", + "activity.kanban": "Kanban", + "activity.review": "Revisión", + "activity.sessions": "Sesiones", + "activity.settings": "Ajustes", + "activity.thinking": "Thinking graph", + "boot.failed": "No se pudo iniciar MOD0", + "boot.hint": "Ejecuta la app con `npm run tauri dev`: el backend de Tauri es necesario.", + "common.add": "Añadir", + "common.cancel": "Cancelar", + "common.close": "Cerrar", + "common.delete": "Eliminar", + "common.edit": "Editar", + "common.refresh": "Actualizar", + "common.save": "Guardar", + "common.saved": "Guardado", + "common.starting": "Iniciando…", + "editor.empty": "Ningún archivo abierto", + "editor.emptyHint": "El editor sirve para revisar y retocar. Abre un archivo desde Archivos, Revisión o el grafo.", + "family.agent": "Subagente", + "family.exec": "Comando", + "family.other": "Otro", + "family.plan": "Plan", + "family.read": "Lectura", + "family.search": "Búsqueda", + "family.think": "Pensando", + "family.web": "Web", + "family.write": "Escritura", + "files.affectedNodes": "nodos afectados", + "files.changedBy": "archivos cambiados por", + "files.collapse": "Colapsar", + "files.collapseAll": "Colapsar todo (primer nivel)", + "files.depth": "Nivel", + "files.expand": "Expandir", + "files.graph": "Grafo del proyecto", + "files.graphEmpty": "Sin dependencias que mostrar", + "files.graphEmptyHint": "Se analizan TS/JS, Svelte, Vue, Astro, Python y Rust.", + "files.graphError": "No se pudo construir el grafo", + "files.graphTip": "Doble clic en una carpeta para abrirla · rueda para zoom · arrastra para mover", + "files.impact": "Impacto", + "files.impactHint": "Resalta qué archivos dependen de lo que cambió la sesión enfocada", + "files.noProjectHint": "Abre una carpeta para ver su estructura.", + "files.title": "Archivos", + "files.usedBy": "Lo usan", + "files.uses": "Usa", + "filter.all": "Todas", + "filter.attention": "Te necesitan", + "filter.idle": "En reposo", + "filter.working": "Trabajando", + "footer.observer": "Observador", + "graph.done": "Listo", + "graph.empty": "Aún no hay pasos", + "graph.emptyHint": "Cuando la IA empiece a trabajar, cada paso aparecerá aquí en vivo.", + "graph.follow": "Seguir", + "graph.noHooks": "Esta CLI no reporta eventos: solo se infiere su estado. El grafo requiere Claude Code con hooks activados en el perfil.", + "graph.noSession": "Sin sesión seleccionada", + "graph.noSessionHint": "Crea o selecciona una sesión para ver su razonamiento.", + "graph.retry": "Reintento tras un fallo", + "graph.sessions": "Sesiones", + "graph.turns": "Turnos", + "graph.view": "Vista", + "graph.viewDiagram": "Diagrama", + "graph.viewTimeline": "Cronología", + "header.rail": "Panel de atención", + "header.terminal": "Terminal", + "kanban.add": "Añadir tarea…", + "kanban.backlog": "Pendiente", + "kanban.doing": "En curso", + "kanban.done": "Hecho", + "kanban.editTask": "Editar tarea", + "kanban.noProject": "Abre un proyecto", + "kanban.noProjectHint": "Cada proyecto tiene su propio tablero.", + "kanban.review": "Revisar", + "kanban.start": "Lanzar sesión", + "kanban.taskNotes": "Notas", + "kanban.taskTitle": "Título", + "kpi.changes": "Líneas añadidas / eliminadas", + "kpi.context": "Contexto usado", + "kpi.errors": "Herramientas con error", + "kpi.turns": "Turnos", + "node.detail": "Detalle", + "node.duration": "Duración", + "node.intent": "Por qué lo hace", + "node.notice": "Aviso", + "node.open": "Abrir", + "node.prompt": "Prompt", + "node.status": "Estado", + "node.stop": "Fin del turno", + "node.target": "Objetivo", + "node.time": "Hora", + "node.tool": "Herramienta", + "notify.allIdle": "Todo terminó", + "notify.allIdleHint": "Un solo aviso cuando ninguna sesión sigue trabajando.", + "notify.body": "Cuerpo (POST)", + "notify.desktop": "Notificaciones de escritorio", + "notify.method": "Método", + "notify.needsYou": "Una sesión te necesita", + "notify.needsYouHint": "Pide un permiso o una decisión y se queda bloqueada.", + "notify.onlyUnfocused": "Solo si MOD0 no tiene el foco", + "notify.onlyUnfocusedHint": "Evita avisos redundantes mientras ya estás mirando la app.", + "notify.placeholders": "Marcadores", + "notify.presets": "Plantillas", + "notify.secretsWarning": "La URL se guarda en texto plano en tu carpeta de configuración: no compartas ese archivo.", + "notify.sessionDone": "Una sesión terminó un turno", + "notify.sessionDoneHint": "Con 8-15 sesiones puede ser ruidoso; suele bastar «Todo terminó».", + "notify.test": "Probar", + "notify.webhook": "Webhook (WhatsApp, Telegram, ntfy…)", + "notify.webhookHint": "Te avisa en el móvil con cualquier servicio que acepte una petición HTTP.", + "palette.commands": "Comandos", + "palette.empty": "Sin resultados", + "palette.files": "Archivos", + "palette.filesPlaceholder": "Buscar archivo por nombre…", + "palette.go": "Ir a", + "palette.placeholder": "Escribe un comando o el nombre de una sesión…", + "palette.session": "Sesión", + "palette.toggleSidebar": "Mostrar/ocultar panel lateral", + "palette.toggleTheme": "Cambiar tema claro/oscuro", + "palette.trigger": "Buscar o ejecutar…", + "plan.title": "Plan", + "profiles.add": "Añadir perfil", + "profiles.addEmpty": "Perfil vacío", + "profiles.args": "Argumentos (uno por línea)", + "profiles.command": "Comando", + "profiles.default": "Predeterminado", + "profiles.env": "Variables de entorno (CLAVE=valor o CLAVE=$VARIABLE)", + "profiles.found": "Encontrada", + "profiles.fromTemplate": "Añadir desde una plantilla", + "profiles.groupClaude": "Claude Code (observación completa)", + "profiles.groupOther": "Otras CLI (estado por actividad)", + "profiles.hooks": "Observar con hooks (Claude Code)", + "profiles.hooksHint": "Activa el thinking graph, los estados exactos y los avisos de permiso.", + "profiles.install": "Instalar", + "profiles.keysTip": "Las claves se referencian con $NOMBRE: MOD0 las lee de las variables de entorno de tu sistema al lanzar la sesión, así no quedan en ningún archivo. Si las defines con setx, reinicia MOD0.", + "profiles.makeDefault": "Hacer predeterminado", + "profiles.missingEnv": "Variables de entorno sin definir:", + "profiles.newName": "Nuevo perfil", + "profiles.notFound": "No se encontró «{command}» en el PATH.", + "profiles.resume": "Argumentos para reanudar", + "profiles.secretsHint": "Evita escribir claves directamente aquí: usa $NOMBRE para leerlas del entorno del sistema. Este archivo se guarda en texto plano.", + "profiles.templateEndpoint": "Plantilla: endpoint propio / IA local", + "project.none": "Sin proyecto", + "project.open": "Abrir carpeta…", + "project.recent": "Recientes", + "project.title": "Proyecto", + "rail.empty": "Sin sesiones todavía", + "rail.nextAttention": "Siguiente que te necesita", + "rail.title": "Sesiones", + "review.approve": "Marcar revisada", + "review.base": "Se compara contra el commit con el que empezó la sesión.", + "review.commit": "Commit", + "review.commitMessage": "Mensaje del commit…", + "review.files": "archivos", + "review.markFile": "Marcar archivo como revisado", + "review.noChanges": "Sin cambios", + "review.noSession": "Sin sesión seleccionada", + "review.noSessionHint": "Selecciona una sesión para revisar lo que hizo.", + "review.pick": "Elige un archivo para ver su diff", + "review.reviewed": "revisados", + "review.view": "Vista de archivos", + "review.viewList": "Lista plana", + "review.viewTree": "Árbol por carpetas", + "section.forge": "Forja", + "section.pulse": "Pulso", + "section.workspace": "Espacio", + "session.branchPlaceholder": "rama (por defecto mod0/nombre)", + "session.isolation": "Aislamiento", + "session.name": "Nombre", + "session.namePlaceholder": "Ej.: refactor de autenticación", + "session.needProject": "Abre primero la carpeta de un proyecto.", + "session.new": "Nueva sesión", + "session.profile": "CLI", + "session.prompt": "Prompt inicial (opcional)", + "session.promptPlaceholder": "Qué debe hacer. Se aplana a una sola línea.", + "session.remove": "Eliminar sesión", + "session.removeConfirm": "¿Eliminar la sesión «{name}»? Se cerrará su terminal.", + "session.removeWorktreeConfirm": "¿Eliminar también el worktree y su carpeta? Los cambios sin commit se perderán.", + "session.rename": "Renombrar", + "session.restart": "Reiniciar", + "session.resume": "Reanudar", + "session.sameFolder": "Misma carpeta", + "session.sameFolderHint": "Trabaja directamente sobre el proyecto. Dos sesiones pueden pisarse los archivos.", + "session.start": "Iniciar", + "session.stop": "Detener", + "session.worktree": "Worktree propio", + "session.worktreeHint": "Crea una rama y una carpeta hermana aisladas: ideal para varias sesiones en paralelo.", + "sessions.empty": "Aún no hay sesiones", + "sessions.emptyHint": "Lanza varias CLI en paralelo y MOD0 te dirá cuál necesita atención.", + "sessions.noMatch": "Ninguna sesión coincide con el filtro.", + "settings.about": "Acerca de", + "settings.accent": "Color de acento", + "settings.appearance": "Apariencia", + "settings.appearanceHint": "Superficies mate y colores suaves para cansar menos la vista.", + "settings.autoSave": "Guardado automático", + "settings.autoSaveHint": "Guarda el archivo del editor un segundo después de dejar de escribir.", + "settings.language": "Idioma", + "settings.notifications": "Notificaciones", + "settings.notificationsHint": "Que MOD0 te avise cuando algo requiere tu atención, para no tener que vigilar las sesiones.", + "settings.profiles": "Perfiles de CLI", + "settings.profilesHint": "Cada perfil es una CLI de IA que puedes lanzar en una sesión. MOD0 solo la envuelve: tu clave y tu modelo siguen siendo tuyos. Con Claude Code puedes usar otros proveedores mediante un endpoint compatible y conservar toda la observación.", + "settings.reduceMotion": "Reducir movimiento", + "settings.reduceMotionHint": "Desactiva giros y parpadeos de los indicadores.", + "settings.scale": "Escala de la interfaz", + "settings.terminalFont": "Tamaño de letra de la terminal", + "settings.theme": "Tema", + "shortcut.jump": "Saltar a la sesión n", + "shortcut.panels": "Panel lateral / panel de atención", + "shortcut.views": "Cambiar de vista", + "shortcut.zoom": "Zoom de la interfaz", + "sidebar.launch": "Lanzar", + "status.exited": "Finalizada", + "status.idle": "En reposo", + "status.review": "Por revisar", + "status.starting": "Iniciando", + "status.waiting": "Esperando tu respuesta", + "status.waitingYou": "Esperando tu decisión", + "status.working": "Trabajando", + "terminal.empty": "Sin terminal", + "terminal.emptyHint": "Crea una sesión para abrir su terminal.", + "terminal.title": "Terminal", + "theme.dark": "Oscuro", + "theme.light": "Claro", + "theme.system": "Sistema", + "toast.nothingPending": "Nada pendiente: ninguna sesión te necesita.", + "unit.commands": "comandos", + "unit.files": "archivos", + "unit.links": "enlaces", + "unit.modules": "módulos", + "unit.nodes": "nodos", + "unit.phases": "fases", + "unit.steps": "pasos", + "unit.turns": "turnos" +} diff --git a/src/lib/core/i18n/utils.svelte.ts b/src/lib/core/i18n/utils.svelte.ts new file mode 100644 index 0000000..f31d928 --- /dev/null +++ b/src/lib/core/i18n/utils.svelte.ts @@ -0,0 +1,21 @@ +import en from '#lib/core/i18n/locales/en.json'; +import es from '#lib/core/i18n/locales/es.json'; +import type { Language } from '#lib/core/types/settings'; + +export type TranslationKey = keyof typeof es; + +const dictionaries: Record> = { es, en }; + +/** Idioma activo (lo actualiza `settingsStack`). Al ser reactivo, `t()` re-renderiza al cambiarlo. */ +export const i18n = $state<{ language: Language }>({ language: 'es' }); + +/** + * Traduce una clave. Admite parámetros `{nombre}`. Si falta en el idioma activo usa español + * y, como último recurso, la propia clave. + */ +export function t(key: TranslationKey | (string & {}), params?: Record): string { + const template = dictionaries[i18n.language][key] ?? dictionaries.es[key] ?? key; + return params + ? template.replace(/\{(\w+)\}/g, (_, name) => String(params[name] ?? `{${name}}`)) + : template; +} diff --git a/src/lib/core/i18n/utils.ts b/src/lib/core/i18n/utils.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/core/registry/actions.ts b/src/lib/core/registry/actions.ts new file mode 100644 index 0000000..f336fbc --- /dev/null +++ b/src/lib/core/registry/actions.ts @@ -0,0 +1,41 @@ +import { windowService } from '#lib/core/services/window-service'; +import { t } from '#lib/core/i18n/utils.svelte'; +import { filesStack } from '#lib/core/runes/files.svelte'; +import { sessionsStack } from '#lib/core/runes/sessions.svelte'; +import { toastStack } from '#lib/core/runes/toast-runes.svelte'; +import { toggleUIStack } from '#lib/core/runes/toggle-ui.svelte'; +import { workStack } from '#lib/core/runes/work-modes.svelte'; + +/** Acciones compartidas entre botones, atajos y la paleta de comandos. */ + +export async function openFolder() { + try { + const path = await windowService.pickFolder(t('project.open')); + if (path) await filesStack.openProject(path); + } catch (error) { + toastStack.error(error); + } +} + +/** Salta a la siguiente sesión que necesita atención y abre la vista adecuada. */ +export function jumpToAttention() { + const session = sessionsStack.focusNextAttention(); + if (!session) { + toastStack.info(t('toast.nothingPending')); + return; + } + + if (session.status === 'review') workStack.setActivity('review'); + else { + toggleUIStack.terminalOpen = true; + workStack.setActivity('thinking-graph'); + } +} + +/** Enfoca una sesión y, si no se está viendo una vista de sesión, abre su grafo. */ +export function openSession(id: string) { + sessionsStack.focus(id); + if (!['thinking-graph', 'review', 'sessions'].includes(workStack.activity)) { + workStack.setActivity('thinking-graph'); + } +} diff --git a/src/lib/core/registry/commands.ts b/src/lib/core/registry/commands.ts new file mode 100644 index 0000000..0b915bb --- /dev/null +++ b/src/lib/core/registry/commands.ts @@ -0,0 +1,84 @@ +import { Bell, FolderOpen, Moon, PanelLeft, PanelRight, Plus, SquareTerminal } from '@lucide/svelte'; +import { ActivityByWork, ActivityVisual, WorkSectionIDs } from '#lib/core/constants/work-config'; +import { t } from '#lib/core/i18n/utils.svelte'; +import { jumpToAttention, openFolder, openSession } from '#lib/core/registry/actions'; +import { sessionsStack } from '#lib/core/runes/sessions.svelte'; +import { settingsStack } from '#lib/core/runes/settings.svelte'; +import { toggleUIStack } from '#lib/core/runes/toggle-ui.svelte'; +import { workStack } from '#lib/core/runes/work-modes.svelte'; +import type { PaletteItem } from '#lib/core/types/menu'; + +/** Comandos de la paleta (se reconstruyen al abrirla para reflejar el estado actual). */ +export function buildCommands(): PaletteItem[] { + const items: PaletteItem[] = [ + { + id: 'new-session', + label: t('session.new'), + hint: 'Ctrl+Shift+N', + icon: Plus, + run: () => toggleUIStack.openNewSession(), + }, + { + id: 'attention', + label: t('rail.nextAttention'), + hint: 'Ctrl+Shift+A', + icon: Bell, + run: jumpToAttention, + }, + { id: 'open-folder', label: t('project.open'), icon: FolderOpen, run: openFolder }, + ]; + + for (const section of Object.values(WorkSectionIDs)) { + for (const activity of ActivityByWork[section]) { + const visual = ActivityVisual[activity]; + items.push({ + id: `go-${activity}`, + label: `${t('palette.go')} ${t(visual.label)}`, + hint: visual.shortcut, + icon: visual.icon, + run: () => workStack.setActivity(activity), + }); + } + } + + sessionsStack.sessions.forEach((session, index) => { + items.push({ + id: `session-${session.id}`, + label: `${t('palette.session')}: ${session.name}`, + hint: index < 9 ? `Alt+${index + 1}` : undefined, + keywords: `${session.profileName} ${session.branch ?? ''} ${session.status}`, + run: () => openSession(session.id), + }); + }); + + items.push( + { + id: 'toggle-terminal', + label: t('header.terminal'), + hint: 'Ctrl+`', + icon: SquareTerminal, + run: toggleUIStack.toggleTerminal, + }, + { + id: 'toggle-sidebar', + label: t('palette.toggleSidebar'), + hint: 'Ctrl+Shift+B', + icon: PanelLeft, + run: toggleUIStack.toggleSidebar, + }, + { + id: 'toggle-rail', + label: t('header.rail'), + hint: 'Ctrl+Shift+R', + icon: PanelRight, + run: toggleUIStack.toggleRail, + }, + { + id: 'toggle-theme', + label: t('palette.toggleTheme'), + icon: Moon, + run: () => void settingsStack.save({ theme: settingsStack.dark ? 'light' : 'dark' }), + }, + ); + return items; +} diff --git a/src/lib/core/registry/hotkeys-registry.ts b/src/lib/core/registry/hotkeys-registry.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/core/registry/settings-registry.ts b/src/lib/core/registry/settings-registry.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/core/registry/themes-registry.ts b/src/lib/core/registry/themes-registry.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/core/runes/editor.svelte.ts b/src/lib/core/runes/editor.svelte.ts new file mode 100644 index 0000000..dcdba6a --- /dev/null +++ b/src/lib/core/runes/editor.svelte.ts @@ -0,0 +1,69 @@ +import { ActivityIDs } from '#lib/core/constants/work-config'; +import { fsService } from '#lib/core/services/fs-service'; +import { workStack } from '#lib/core/runes/work-modes.svelte'; +import { settingsStack } from '#lib/core/runes/settings.svelte'; +import { toastStack } from '#lib/core/runes/toast-runes.svelte'; +import type { EditorTab } from '#lib/core/types/tab'; +import { basename } from '#lib/core/utils/format'; + +/** Archivos abiertos en el editor. */ +class EditorStack { + tabs = $state([]); + activePath = $state(null); + private saveTimer: ReturnType | undefined; + + active = $derived(this.tabs.find((tab) => tab.path === this.activePath) ?? null); + + isDirty(tab: EditorTab): boolean { + return tab.content !== tab.saved; + } + + /** Abre un archivo en el editor (y cambia a esa actividad). */ + async open(path: string) { + workStack.setActivity(ActivityIDs.EDITOR); + this.activePath = path; + if (this.tabs.some((tab) => tab.path === path)) return; + + try { + const content = await fsService.read(path); + this.tabs.push({ path, name: basename(path), content, saved: content, error: null }); + } catch (error) { + toastStack.error(error); + this.activePath = this.tabs.at(-1)?.path ?? null; + } + } + + setContent(path: string, content: string) { + const tab = this.tabs.find((existing) => existing.path === path); + if (!tab) return; + tab.content = content; + + // Guardado automático: espera a que se deje de escribir. + if (settingsStack.config.autoSave) { + clearTimeout(this.saveTimer); + this.saveTimer = setTimeout(() => void this.save(path), 1000); + } + } + + async save(path: string | null = this.activePath) { + const tab = this.tabs.find((existing) => existing.path === path); + if (!tab || !this.isDirty(tab)) return; + + try { + await fsService.write(tab.path, tab.content); + tab.saved = tab.content; + } catch (error) { + toastStack.error(error); + } + } + + close(path: string) { + const index = this.tabs.findIndex((tab) => tab.path === path); + if (index === -1) return; + + this.tabs.splice(index, 1); + if (this.activePath === path) this.activePath = this.tabs[Math.max(0, index - 1)]?.path ?? null; + } +} + +export const editorStack = new EditorStack(); diff --git a/src/lib/core/runes/files.svelte.ts b/src/lib/core/runes/files.svelte.ts new file mode 100644 index 0000000..0df5ab9 --- /dev/null +++ b/src/lib/core/runes/files.svelte.ts @@ -0,0 +1,144 @@ +import { configService } from '#lib/core/services/config-service'; +import { eventService } from '#lib/core/services/event-service'; +import { fsService } from '#lib/core/services/fs-service'; +import { reviewService } from '#lib/core/services/review-service'; +import type { DepGraph, DirEntryInfo, GitInfo } from '#lib/core/types/files'; +import { settingsStack } from '#lib/core/runes/settings.svelte'; + +/** Proyecto abierto, árbol de archivos (carga perezosa) y grafo de dependencias. */ +class FilesStack { + projectPath = $state(null); + /** Raíz que se está explorando: el proyecto o el worktree de una sesión. */ + rootPath = $state(null); + git = $state(null); + + children = $state>({}); + expanded = $state>({}); + index = $state([]); + + graph = $state(null); + /** Carpetas abiertas en el grafo (id = ruta relativa). Vacío = solo el primer nivel. */ + graphExpanded = $state([]); + graphLoading = $state(false); + graphError = $state(null); + /** Archivos (rutas relativas) que dependen de los cambios de la sesión enfocada. */ + impact = $state([]); + impactOn = $state(false); + private graphInitialized = false; + + private refreshTimer: ReturnType | undefined; + + async init(): Promise<() => void> { + const last = settingsStack.config.lastProjectPath; + if (last) await this.openProject(last).catch(() => undefined); + + return eventService.onFsChanged((cwd) => this.onFsChanged(cwd)); + } + + async openProject(path: string) { + await configService.setProject(path).then((config) => (settingsStack.config = config)); + this.projectPath = path; + await this.setRoot(path); + } + + async setRoot(path: string) { + this.rootPath = path; + this.children = {}; + this.expanded = { [path]: true }; + this.index = []; + this.graph = null; + this.graphError = null; + this.graphExpanded = []; + this.graphInitialized = false; + this.impact = []; + + this.git = await reviewService.gitInfo(path).catch(() => null); + await this.loadDir(path); + } + + async loadDir(path: string) { + this.children[path] = await fsService.listDir(path); + } + + async toggle(path: string) { + const open = !this.expanded[path]; + this.expanded[path] = open; + if (open && !this.children[path]) await this.loadDir(path).catch(() => (this.expanded[path] = false)); + } + + /** Recarga todas las carpetas expandidas (tras actividad de las sesiones). */ + async refresh() { + const open = Object.keys(this.expanded).filter((path) => this.expanded[path]); + await Promise.all(open.map((path) => this.loadDir(path).catch(() => delete this.children[path]))); + this.index = []; + } + + async ensureIndex(): Promise { + if (this.index.length === 0 && this.rootPath) this.index = await fsService.listFiles(this.rootPath); + return this.index; + } + + async loadGraph(refresh = false) { + if (!this.rootPath) return; + this.graphLoading = true; + this.graphError = null; + try { + this.graph = await fsService.graph(this.rootPath, $state.snapshot(this.graphExpanded), refresh); + + // Primera carga de una raíz: abre los dos primeros niveles para que el mapa sea útil de entrada. + if (!this.graphInitialized) { + this.graphInitialized = true; + if (this.graph.dirs.length <= 400) { + this.graphExpanded = this.dirsBelow(2); + this.graph = await fsService.graph( + this.rootPath, + $state.snapshot(this.graphExpanded), + false, + ); + } + } + } catch (error) { + this.graphError = error instanceof Error ? error.message : String(error); + } finally { + this.graphLoading = false; + } + } + + /** Carpetas con profundidad menor a `level` (1 = solo las de primer nivel). */ + dirsBelow(level: number): string[] { + return (this.graph?.dirs ?? []).filter((dir) => dir.split('/').length < level); + } + + async setGraphLevel(level: number) { + this.graphExpanded = this.dirsBelow(level); + await this.loadGraph(); + } + + async toggleExpand(id: string) { + const open = this.graphExpanded.includes(id); + this.graphExpanded = open + ? this.graphExpanded.filter((dir) => dir !== id && !dir.startsWith(`${id}/`)) + : [...this.graphExpanded, id]; + await this.loadGraph(); + } + + /** Calcula qué archivos se ven afectados por los cambios dados (dependientes directos e indirectos). */ + async loadImpact(changed: string[]) { + if (!this.rootPath || changed.length === 0) { + this.impact = []; + return; + } + this.impact = await fsService.impact(this.rootPath, changed).catch(() => []); + } + + /** Las sesiones avisan cuando hay cambios en disco; se agrupan en un solo refresco. */ + private onFsChanged(cwd: string) { + const root = this.rootPath?.replace(/\\/g, '/'); + if (!root || !cwd.replace(/\\/g, '/').startsWith(root)) return; + + clearTimeout(this.refreshTimer); + this.refreshTimer = setTimeout(() => void this.refresh(), 600); + } +} + +export const filesStack = new FilesStack(); diff --git a/src/lib/core/runes/graph.svelte.ts b/src/lib/core/runes/graph.svelte.ts new file mode 100644 index 0000000..25f1f8e --- /dev/null +++ b/src/lib/core/runes/graph.svelte.ts @@ -0,0 +1,71 @@ +import { loadLocal, saveLocal } from '#lib/core/utils/storage'; +import { sessionService } from '#lib/core/services/session-service'; +import { eventService } from '#lib/core/services/event-service'; +import type { GraphDelta, ThoughtNode } from '#lib/core/types/session'; + +/** Cuántos turnos recientes se muestran expandidos por defecto. */ +const EXPANDED_TURNS = 2; + +/** Thinking graph de cada sesión: se hidrata una vez y luego solo recibe deltas. */ +class GraphStack { + bySession = $state>({}); + selectedId = $state(null); + /** `diagram`: fases encadenadas con flechas. `timeline`: cronología paso a paso. */ + view = $state<'diagram' | 'timeline'>(loadLocal('graph.view', 'diagram')); + follow = $state(true); + /** Turno al que debe desplazarse el lienzo (lo pide la barra lateral). */ + jumpTurn = $state(null); + /** Turnos que el usuario expandió/colapsó a mano: `sessionId:turno` → expandido. */ + toggled = $state>({}); + + async init(): Promise<() => void> { + return eventService.onGraphDelta((delta) => this.apply(delta)); + } + + async load(sessionId: string) { + if (this.bySession[sessionId]) return; + this.bySession[sessionId] = await sessionService.graph(sessionId); + } + + apply({ sessionId, nodes }: GraphDelta) { + const current = [...(this.bySession[sessionId] ?? [])]; + + for (const node of nodes) { + const index = current.findLastIndex((existing) => existing.id === node.id); + if (index === -1) current.push(node); + else current[index] = node; + } + current.sort((a, b) => a.seq - b.seq); + this.bySession[sessionId] = current; + } + + setView(view: 'diagram' | 'timeline') { + this.view = view; + saveLocal('graph.view', view); + } + + nodes(sessionId: string | null): ThoughtNode[] { + return sessionId ? (this.bySession[sessionId] ?? []) : []; + } + + /** Últimos pasos de una sesión (para el rastro de las tarjetas). */ + trail(sessionId: string, count = 14): ThoughtNode[] { + return this.nodes(sessionId) + .filter((node) => node.kind === 'tool') + .slice(-count); + } + + isExpanded(sessionId: string, turn: number, lastTurn: number): boolean { + return this.toggled[`${sessionId}:${turn}`] ?? turn > lastTurn - EXPANDED_TURNS; + } + + toggleTurn(sessionId: string, turn: number, lastTurn: number) { + this.toggled[`${sessionId}:${turn}`] = !this.isExpanded(sessionId, turn, lastTurn); + } + + selected(sessionId: string | null): ThoughtNode | null { + return this.nodes(sessionId).find((node) => node.id === this.selectedId) ?? null; + } +} + +export const graphStack = new GraphStack(); diff --git a/src/lib/core/runes/kanban.svelte.ts b/src/lib/core/runes/kanban.svelte.ts new file mode 100644 index 0000000..55231f0 --- /dev/null +++ b/src/lib/core/runes/kanban.svelte.ts @@ -0,0 +1,91 @@ +import { kanbanService } from '#lib/core/services/kanban-service'; +import type { Session } from '#lib/core/types/session'; +import type { KanbanColumnID, KanbanTask } from '#lib/core/types/kanban'; + +export const kanbanColumns: KanbanColumnID[] = ['backlog', 'doing', 'review', 'done']; + +/** Tablero de tareas del proyecto abierto; las tareas ligadas a una sesión siguen su estado. */ +class KanbanStack { + tasks = $state([]); + project = $state(null); + + private saveTimer: ReturnType | undefined; + + async load(project: string | null) { + if (project === this.project) return; + this.project = project; + this.tasks = project ? ((await kanbanService.load(project))?.tasks ?? []) : []; + } + + inColumn(column: KanbanColumnID): KanbanTask[] { + return this.tasks.filter((task) => task.column === column); + } + + add(title: string, notes = '', column: KanbanColumnID = 'backlog'): KanbanTask { + const task: KanbanTask = { + id: crypto.randomUUID().slice(0, 8), + title: title.trim(), + notes: notes.trim(), + column, + sessionId: null, + createdAt: Date.now(), + }; + this.tasks.push(task); + this.queueSave(); + return task; + } + + update(id: string, patch: Partial>) { + const task = this.tasks.find((existing) => existing.id === id); + if (!task) return; + Object.assign(task, patch); + this.queueSave(); + } + + move(id: string, column: KanbanColumnID) { + this.update(id, { column }); + } + + remove(id: string) { + this.tasks = this.tasks.filter((task) => task.id !== id); + this.queueSave(); + } + + /** Mueve las tareas ligadas a sesiones según el estado actual de estas. */ + sync(sessions: Session[]) { + let changed = false; + + for (const task of this.tasks) { + if (!task.sessionId) continue; + + const session = sessions.find((existing) => existing.id === task.sessionId); + if (!session) { + task.sessionId = null; + changed = true; + continue; + } + + const target: KanbanColumnID | null = + session.status === 'working' || session.status === 'waiting' || session.status === 'starting' + ? 'doing' + : session.status === 'review' + ? 'review' + : null; + + if (target && task.column !== target && task.column !== 'done') { + task.column = target; + changed = true; + } + } + if (changed) this.queueSave(); + } + + private queueSave() { + clearTimeout(this.saveTimer); + this.saveTimer = setTimeout(() => { + if (this.project) void kanbanService.save(this.project, { tasks: $state.snapshot(this.tasks) }); + }, 400); + } +} + +export const kanbanStack = new KanbanStack(); diff --git a/src/lib/core/runes/review.svelte.ts b/src/lib/core/runes/review.svelte.ts new file mode 100644 index 0000000..f2ea19c --- /dev/null +++ b/src/lib/core/runes/review.svelte.ts @@ -0,0 +1,105 @@ +import { reviewService } from '#lib/core/services/review-service'; +import { sessionsStack } from '#lib/core/runes/sessions.svelte'; +import { toastStack } from '#lib/core/runes/toast-runes.svelte'; +import type { ChangedFile, FilePair } from '#lib/core/types/files'; +import { loadLocal, saveLocal } from '#lib/core/utils/storage'; + +/** Revisión de los cambios de la sesión enfocada contra su commit base. */ +class ReviewStack { + changes = $state([]); + selectedPath = $state(null); + pair = $state(null); + loading = $state(false); + committing = $state(false); + /** Cómo se listan los archivos cambiados: plano o agrupados por carpeta. */ + view = $state<'list' | 'tree'>(loadLocal('review.view', 'list')); + + /** Archivos marcados como revisados por sesión. */ + reviewed = $state>(loadLocal('review.files', {})); + + totals = $derived({ + additions: this.changes.reduce((sum, file) => sum + file.additions, 0), + deletions: this.changes.reduce((sum, file) => sum + file.deletions, 0), + }); + + setView(view: 'list' | 'tree') { + this.view = view; + saveLocal('review.view', view); + } + + isReviewed(path: string): boolean { + const id = sessionsStack.focusedId; + return !!id && (this.reviewed[id] ?? []).includes(path); + } + + toggleReviewed(path: string) { + const id = sessionsStack.focusedId; + if (!id) return; + + const list = this.reviewed[id] ?? []; + this.reviewed[id] = list.includes(path) ? list.filter((item) => item !== path) : [...list, path]; + saveLocal('review.files', $state.snapshot(this.reviewed)); + } + + /** `selectFile = false` solo actualiza la lista (sin leer el diff), p. ej. para marcar el árbol de archivos. */ + async reload(selectFile = true) { + const id = sessionsStack.focusedId; + if (!id) { + this.changes = []; + this.pair = null; + return; + } + + this.loading = true; + try { + this.changes = await reviewService.changes(id); + if (!selectFile) return; + // Mantiene el archivo abierto; si ya no existe, salta al primero para revisar sin clics extra. + const target = this.changes.find((file) => file.path === this.selectedPath) ?? this.changes[0]; + if (target) await this.select(target.path); + else { + this.pair = null; + this.selectedPath = null; + } + } catch (error) { + this.changes = []; + toastStack.error(error); + } finally { + this.loading = false; + } + } + + async select(path: string) { + const id = sessionsStack.focusedId; + const file = this.changes.find((change) => change.path === path); + if (!id || !file) return; + + this.selectedPath = path; + try { + this.pair = await reviewService.file(id, path, file.status); + } catch (error) { + this.pair = null; + toastStack.error(error); + } + } + + async commit(message: string): Promise { + const id = sessionsStack.focusedId; + if (!id) return false; + + this.committing = true; + try { + const sha = await reviewService.commit(id, message); + toastStack.success(`Commit ${sha}`); + await this.reload(); + return true; + } catch (error) { + toastStack.error(error); + return false; + } finally { + this.committing = false; + } + } +} + +export const reviewStack = new ReviewStack(); diff --git a/src/lib/core/runes/sessions.svelte.ts b/src/lib/core/runes/sessions.svelte.ts new file mode 100644 index 0000000..a013c56 --- /dev/null +++ b/src/lib/core/runes/sessions.svelte.ts @@ -0,0 +1,99 @@ +import { StatusPriority } from '#lib/core/constants/work-config'; +import { eventService } from '#lib/core/services/event-service'; +import { sessionService } from '#lib/core/services/session-service'; +import type { CreateSessionRequest, Session, SessionStatus } from '#lib/core/types/session'; + +/** Todas las sesiones de CLI en curso y cuál tiene el foco. */ +class SessionsStack { + sessions = $state([]); + focusedId = $state(null); + /** Filtro de la vista de sesiones. */ + filter = $state<'all' | 'attention' | 'working' | 'idle'>('all'); + /** Reloj que avanza cada pocos segundos para refrescar duraciones. */ + clock = $state(Date.now()); + + focused = $derived(this.sessions.find((session) => session.id === this.focusedId) ?? null); + + counts = $derived.by(() => { + const counts: Record = { + starting: 0, + working: 0, + waiting: 0, + review: 0, + idle: 0, + exited: 0, + }; + for (const session of this.sessions) counts[session.status]++; + return counts; + }); + + /** Sesiones que piden atención ahora (bloqueadas o por revisar), las más antiguas primero. */ + attention = $derived( + this.sessions + .filter((session) => session.status === 'waiting' || session.status === 'review') + .sort( + (a, b) => + StatusPriority[a.status] - StatusPriority[b.status] || a.statusSince - b.statusSince, + ), + ); + + async init(): Promise<() => void> { + this.sessions = await sessionService.list(); + this.focusedId = this.sessions[0]?.id ?? null; + + const unlisten = await Promise.all([ + eventService.onSession((session) => this.upsert(session)), + eventService.onSessionRemoved((id) => this.drop(id)), + ]); + const timer = setInterval(() => (this.clock = Date.now()), 5000); + + return () => { + unlisten.forEach((stop) => stop()); + clearInterval(timer); + }; + } + + upsert(session: Session) { + const index = this.sessions.findIndex((existing) => existing.id === session.id); + if (index === -1) this.sessions.push(session); + else this.sessions[index] = session; + this.focusedId ??= session.id; + } + + drop(id: string) { + this.sessions = this.sessions.filter((session) => session.id !== id); + if (this.focusedId === id) this.focusedId = this.sessions[0]?.id ?? null; + } + + focus(id: string) { + if (this.sessions.some((session) => session.id === id)) this.focusedId = id; + } + + /** Enfoca la n-ésima sesión (1-based) en orden de creación. */ + focusIndex(position: number) { + const session = this.sessions[position - 1]; + if (session) this.focusedId = session.id; + } + + /** Salta a la siguiente sesión que necesita atención. */ + focusNextAttention(): Session | null { + if (this.attention.length === 0) return null; + const current = this.attention.findIndex((session) => session.id === this.focusedId); + const next = this.attention[(current + 1) % this.attention.length]; + this.focusedId = next.id; + return next; + } + + async create(request: CreateSessionRequest): Promise { + const session = await sessionService.create(request); + this.upsert(session); + this.focusedId = session.id; + return session; + } + + byId(id: string | null): Session | undefined { + return id ? this.sessions.find((session) => session.id === id) : undefined; + } +} + +export const sessionsStack = new SessionsStack(); diff --git a/src/lib/core/runes/settings.svelte.ts b/src/lib/core/runes/settings.svelte.ts new file mode 100644 index 0000000..340ddec --- /dev/null +++ b/src/lib/core/runes/settings.svelte.ts @@ -0,0 +1,58 @@ +import { defaultConfig } from '#lib/core/constants/default-config'; +import { i18n } from '#lib/core/i18n/utils.svelte'; +import { configService } from '#lib/core/services/config-service'; +import type { AppConfig, AppInfo } from '#lib/core/types/settings'; + +/** Configuración global (persistida en el backend) y su aplicación visual. */ +class SettingsStack { + config = $state(structuredClone(defaultConfig)); + info = $state(null); + loaded = $state(false); + /** Sección visible en la pantalla de ajustes. */ + section = $state<'profiles' | 'notifications' | 'appearance' | 'about'>('profiles'); + + private media: MediaQueryList | null = null; + + dark = $derived( + this.config.theme === 'dark' || (this.config.theme === 'system' && (this.media?.matches ?? true)), + ); + + async load() { + const [config, info] = await Promise.all([configService.get(), configService.appInfo()]); + this.config = config; + this.info = info; + this.loaded = true; + this.apply(); + + this.media = window.matchMedia('(prefers-color-scheme: dark)'); + this.media.addEventListener('change', () => this.apply()); + } + + async save(patch: Partial) { + this.config = await configService.update({ ...$state.snapshot(this.config), ...patch }); + this.apply(); + } + + /** Aplica tema, acento, escala y movimiento al documento. */ + apply() { + const { theme, accent, uiScale, reduceMotion, language } = this.config; + const dark = + theme === 'dark' || + (theme === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches); + const root = document.documentElement; + + root.classList.toggle('dark', dark); + root.classList.toggle('reduce-motion', reduceMotion); + root.dataset.accent = accent; + root.style.setProperty('--ui-scale', String(uiScale)); + root.lang = language; + i18n.language = language; + } + + zoom(delta: number) { + const next = Math.min(1.4, Math.max(0.8, Math.round((this.config.uiScale + delta) * 100) / 100)); + void this.save({ uiScale: next }); + } +} + +export const settingsStack = new SettingsStack(); diff --git a/src/lib/core/runes/toast-runes.svelte.ts b/src/lib/core/runes/toast-runes.svelte.ts new file mode 100644 index 0000000..9691325 --- /dev/null +++ b/src/lib/core/runes/toast-runes.svelte.ts @@ -0,0 +1,29 @@ +export type ToastKind = 'info' | 'success' | 'error'; + +export interface Toast { + id: number; + kind: ToastKind; + message: string; +} + +/** Avisos efímeros en pantalla. */ +class ToastStack { + toasts = $state([]); + private nextId = 1; + + push(kind: ToastKind, message: string, ttl = 4500) { + const id = this.nextId++; + this.toasts.push({ id, kind, message }); + setTimeout(() => this.dismiss(id), kind === 'error' ? ttl * 1.6 : ttl); + } + + info = (message: string) => this.push('info', message); + success = (message: string) => this.push('success', message); + error = (error: unknown) => this.push('error', error instanceof Error ? error.message : String(error)); + + dismiss(id: number) { + this.toasts = this.toasts.filter((toast) => toast.id !== id); + } +} + +export const toastStack = new ToastStack(); diff --git a/src/lib/core/runes/toggle-ui.svelte.ts b/src/lib/core/runes/toggle-ui.svelte.ts index cd4febd..6ee63b8 100644 --- a/src/lib/core/runes/toggle-ui.svelte.ts +++ b/src/lib/core/runes/toggle-ui.svelte.ts @@ -1,22 +1,52 @@ -/* Este rune gestiona el estado de los paneles de la UI (configuración, terminal, sidebar) */ +import { loadLocal, saveLocal } from '#lib/core/utils/storage'; + +export interface NewSessionPreset { + name?: string; + profileId?: string; + prompt?: string; + taskId?: string; +} + +/** Estado de visibilidad y tamaño de los paneles del IDE. */ class ToggleUIStack { - /** * @type {boolean} Estado de expansión del panel de configuración - */ - settingsOpen: boolean = $state(false); - - /** * @type {boolean} Estado de expansión del panel de terminal - */ - terminalOpen: boolean = $state(true); - - /** * @type {boolean} Estado de expansión del panel lateral - */ - sidebarOpen: boolean = $state(true); - - /* Métodos para alternar cada panel */ - toggleSettings(): void { this.settingsOpen = !this.settingsOpen; } - toggleTerminal(): void { this.terminalOpen = !this.terminalOpen; } - toggleSidebar(): void { this.sidebarOpen = !this.sidebarOpen; } + sidebarOpen = $state(loadLocal('ui.sidebarOpen', true)); + railOpen = $state(loadLocal('ui.railOpen', true)); + terminalOpen = $state(loadLocal('ui.terminalOpen', true)); + sidebarWidth = $state(loadLocal('ui.sidebarWidth', 288)); + terminalHeight = $state(loadLocal('ui.terminalHeight', 300)); + + paletteOpen = $state(false); + paletteMode = $state<'commands' | 'files'>('commands'); + newSessionOpen = $state(false); + newSessionPreset = $state({}); + + toggleSidebar = () => this.persist('sidebarOpen', (this.sidebarOpen = !this.sidebarOpen)); + toggleRail = () => this.persist('railOpen', (this.railOpen = !this.railOpen)); + toggleTerminal = () => this.persist('terminalOpen', (this.terminalOpen = !this.terminalOpen)); + + setSidebarWidth(width: number) { + this.sidebarWidth = Math.min(520, Math.max(220, Math.round(width))); + saveLocal('ui.sidebarWidth', this.sidebarWidth); + } + + setTerminalHeight(height: number) { + this.terminalHeight = Math.min(900, Math.max(140, Math.round(height))); + saveLocal('ui.terminalHeight', this.terminalHeight); + } + + openPalette(mode: 'commands' | 'files' = 'commands') { + this.paletteMode = mode; + this.paletteOpen = true; + } + + openNewSession(preset: NewSessionPreset = {}) { + this.newSessionPreset = preset; + this.newSessionOpen = true; + } + + private persist(key: string, value: boolean) { + saveLocal(`ui.${key}`, value); + } } -/* Instancia única del estado de UI para toda la aplicación. */ -export const toggleUIStack = new ToggleUIStack(); \ No newline at end of file +export const toggleUIStack = new ToggleUIStack(); diff --git a/src/lib/core/runes/work-modes.svelte.ts b/src/lib/core/runes/work-modes.svelte.ts index 0a9ad13..800f493 100644 --- a/src/lib/core/runes/work-modes.svelte.ts +++ b/src/lib/core/runes/work-modes.svelte.ts @@ -1,58 +1,19 @@ -import { - WorkSectionIDs, - ActivityByWork -} from '$lib/core/constants/work-config'; -import type { - WorkSectionID, - ActivityID -} from '$lib/core/types/work'; -import { toggleUIStack } from './toggle-ui.svelte'; +import { ActivityByWork, ActivityIDs, WorkSectionIDs } from '#lib/core/constants/work-config'; +import type { ActivityID, WorkSectionID } from '#lib/core/types/work'; -/** - * UIStack centraliza el estado de navegación global. - * Utiliza el patrón de "Registry" para evitar condicionales innecesarios. - */ -class WorkModesStack { - /** * @type {WorkSectionID} Sección maestra actual (Blueprint, Forge, etc.) - */ - mode: WorkSectionID = $state(WorkSectionIDs.BLUEPRINT); - - /** * @type {ActivityID} Identificador de la actividad activa en el Sidebar - */ - activeActivity: ActivityID = $state(ActivityByWork[WorkSectionIDs.BLUEPRINT][0]); +/** Actividad activa del IDE y la sección a la que pertenece. */ +class WorkStack { + activity = $state(ActivityIDs.SESSIONS); - /** * @type {ActivityID[]} Lista de actividades disponibles para la sección actual - */ - currentActivities: ActivityID[] = $state(ActivityByWork[WorkSectionIDs.BLUEPRINT]); + section: WorkSectionID = $derived( + (Object.keys(ActivityByWork) as WorkSectionID[]).find((section) => + ActivityByWork[section].includes(this.activity), + ) ?? WorkSectionIDs.FORGE, + ); - /** - * Transiciona el IDE a un nuevo modo de trabajo. - * Reinicia automáticamente la actividad a la primera disponible del nuevo modo. - * * @param {WorkSectionID} newMode - El identificador de la sección deseada. - */ - setMode(newMode: WorkSectionID) { - if (this.mode === newMode) return; - - this.mode = newMode; - this.currentActivities = ActivityByWork[newMode]; - - if (this.currentActivities && this.currentActivities.length > 0) { - this.activeActivity = this.currentActivities[0]; - } - - } - - /** - * Cambia la actividad activa del sidebar y asegura que sea visible. - * * @param {ActivityID} activity - ID de la actividad a mostrar. - */ setActivity(activity: ActivityID) { - this.activeActivity = activity; - toggleUIStack.sidebarOpen = true; + this.activity = activity; } } -/** - * Instancia única del estado de UI para toda la aplicación. - */ -export const workStack = new WorkModesStack(); \ No newline at end of file +export const workStack = new WorkStack(); diff --git a/src/lib/core/services/bridge-service.ts b/src/lib/core/services/bridge-service.ts deleted file mode 100644 index b9521fc..0000000 --- a/src/lib/core/services/bridge-service.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { invoke } from '@tauri-apps/api/core'; -import { listen } from '@tauri-apps/api/event'; - -export interface RuntimeCapability { - id: string; - capability: 'Lsp' | 'Mcp'; - name: string; - command: string; -} - -export interface ProviderConfig { - id: string; - type: 'Ai' | 'Vcs'; - provider: string; // e.g., 'anthropic', 'github' - token: string; - settings: Record; -} - -const BRIDGE_COMMANDS = { - BOOT_RUNTIME: "boot_runtime", - REGISTER_PROVIDER: "register_provider", - -} - -class BridgeService { - private activeRuntimes = new Set(); - - /** - * AUTO: Para LSPs y MCPs detectados en el código - */ - async discoverAndBoot(projectPath: string) { - const suggestions = await invoke('discover_workspace', { projectPath }); - for (const def of suggestions) { - if (!this.activeRuntimes.has(def.id)) { - await invoke(BRIDGE_COMMANDS.BOOT_RUNTIME, { def }); - this.activeRuntimes.add(def.id); - } - } - } - - /** - * MANUAL: Para AI y Git configurados por el usuario - */ - async registerProvider(config: ProviderConfig) { - await invoke(BRIDGE_COMMANDS.REGISTER_PROVIDER, { config }); - console.log(`Provider ${config.type} listo: ${config.provider}`); - } - - async subscribe(runtimeId: string, callback: (payload: any) => void) { - return await listen(`runtime:${runtimeId}`, (event) => callback(event.payload)); - } -} - -export const bridgeService = new BridgeService(); \ No newline at end of file diff --git a/src/lib/core/services/config-service.ts b/src/lib/core/services/config-service.ts new file mode 100644 index 0000000..559f869 --- /dev/null +++ b/src/lib/core/services/config-service.ts @@ -0,0 +1,12 @@ +import { call } from '#lib/core/services/ipc'; +import type { AppConfig, AppInfo, CommandCheck } from '#lib/core/types/settings'; + +export const configService = { + get: () => call('config_get'), + update: (config: AppConfig) => call('config_update', { config }), + setProject: (path: string) => call('config_set_project', { path }), + appInfo: () => call('app_info'), + notifyTest: () => call('notify_test'), + profileCheck: (command: string, env: Record) => + call('profile_check', { command, env }), +}; diff --git a/src/lib/core/services/event-service.ts b/src/lib/core/services/event-service.ts new file mode 100644 index 0000000..dd1fe9d --- /dev/null +++ b/src/lib/core/services/event-service.ts @@ -0,0 +1,17 @@ +import { listen, type UnlistenFn } from '@tauri-apps/api/event'; +import type { GraphDelta, Session } from '#lib/core/types/session'; + +/** Eventos que el backend emite hacia el frontend (ver `core/events.rs`). */ +export const eventService = { + onSession: (handler: (session: Session) => void): Promise => + listen('session:upsert', (event) => handler(event.payload)), + + onSessionRemoved: (handler: (id: string) => void): Promise => + listen('session:removed', (event) => handler(event.payload)), + + onGraphDelta: (handler: (delta: GraphDelta) => void): Promise => + listen('graph:delta', (event) => handler(event.payload)), + + onFsChanged: (handler: (cwd: string) => void): Promise => + listen<{ cwd: string }>('fs:changed', (event) => handler(event.payload.cwd)), +}; diff --git a/src/lib/core/services/fs-service.ts b/src/lib/core/services/fs-service.ts index e2b11c5..988a866 100644 --- a/src/lib/core/services/fs-service.ts +++ b/src/lib/core/services/fs-service.ts @@ -1,40 +1,16 @@ -import { invoke } from "@tauri-apps/api/core"; -import type { GenericFile } from "../types/tab"; +import { call } from '#lib/core/services/ipc'; +import type { DepGraph, DirEntryInfo } from '#lib/core/types/files'; -const FILE_COMMANDS = { - READ_FOLDER: "read_folder_recursive", - READ_FILE: "read_file_content", - SAVE_FILE: "save_file", - CREATE_FILE: "create_file", - CREATE_DIR: "create_dir", - RENAME_FILE: "rename_file", - DELETE_FILE: "delete_file", - SEARCH_CONTENT: "search_in_files" -} - -export const FSService = { - async readFolder(path: string): Promise { - return await invoke(FILE_COMMANDS.READ_FOLDER, { path }); - }, - async readFile(path: string): Promise { - return await invoke(FILE_COMMANDS.READ_FILE, { path }); - }, - async saveFile(path: string, content: string): Promise { - await invoke(FILE_COMMANDS.SAVE_FILE, { path, content }); - }, - async createFile(path: string): Promise { - return await invoke(FILE_COMMANDS.CREATE_FILE, { path }); - }, - async createDir(path: string): Promise { - return await invoke(FILE_COMMANDS.CREATE_DIR, { path }); - }, - async deleteFile(path: string): Promise { - return await invoke(FILE_COMMANDS.DELETE_FILE, { path }); - }, - async renameFile(oldPath: string, newPath: string): Promise { - return await invoke(FILE_COMMANDS.RENAME_FILE, { oldPath, newPath }); - }, - async searchContent(root: string, query: string): Promise { - return await invoke(FILE_COMMANDS.SEARCH_CONTENT, { root, query }); - } -}; \ No newline at end of file +export const fsService = { + listDir: (path: string) => call('fs_list_dir', { path }), + listFiles: (root: string, limit?: number) => call('fs_list_files', { root, limit }), + read: (path: string) => call('fs_read', { path }), + write: (path: string, content: string) => call('fs_write', { path, content }), + createFile: (path: string) => call('fs_create_file', { path }), + createDir: (path: string) => call('fs_create_dir', { path }), + rename: (from: string, to: string) => call('fs_rename', { from, to }), + remove: (path: string) => call('fs_delete', { path }), + graph: (root: string, expanded: string[], refresh = false) => + call('fs_graph', { root, expanded, refresh }), + impact: (root: string, paths: string[]) => call('fs_impact', { root, paths }), +}; diff --git a/src/lib/core/services/ipc.ts b/src/lib/core/services/ipc.ts new file mode 100644 index 0000000..21351cb --- /dev/null +++ b/src/lib/core/services/ipc.ts @@ -0,0 +1,10 @@ +import { invoke } from '@tauri-apps/api/core'; + +/** Invoca un comando de Tauri y normaliza el error a un `Error` con mensaje legible. */ +export async function call(command: string, args?: Record): Promise { + try { + return await invoke(command, args); + } catch (error) { + throw error instanceof Error ? error : new Error(String(error)); + } +} diff --git a/src/lib/core/services/kanban-service.ts b/src/lib/core/services/kanban-service.ts new file mode 100644 index 0000000..d58d19b --- /dev/null +++ b/src/lib/core/services/kanban-service.ts @@ -0,0 +1,7 @@ +import { call } from '#lib/core/services/ipc'; +import type { KanbanBoard } from '#lib/core/types/kanban'; + +export const kanbanService = { + load: (project: string) => call('kanban_load', { project }), + save: (project: string, board: KanbanBoard) => call('kanban_save', { project, board }), +}; diff --git a/src/lib/core/services/review-service.ts b/src/lib/core/services/review-service.ts new file mode 100644 index 0000000..1fd2a28 --- /dev/null +++ b/src/lib/core/services/review-service.ts @@ -0,0 +1,10 @@ +import { call } from '#lib/core/services/ipc'; +import type { ChangedFile, ChangeStatus, FilePair, GitInfo } from '#lib/core/types/files'; + +export const reviewService = { + gitInfo: (path: string) => call('git_info', { path }), + changes: (sessionId: string) => call('review_changes', { sessionId }), + file: (sessionId: string, path: string, status: ChangeStatus) => + call('review_file', { sessionId, path, status }), + commit: (sessionId: string, message: string) => call('review_commit', { sessionId, message }), +}; diff --git a/src/lib/core/services/session-service.ts b/src/lib/core/services/session-service.ts new file mode 100644 index 0000000..31e3370 --- /dev/null +++ b/src/lib/core/services/session-service.ts @@ -0,0 +1,14 @@ +import { call } from '#lib/core/services/ipc'; +import type { CreateSessionRequest, Session, ThoughtNode } from '#lib/core/types/session'; + +export const sessionService = { + list: () => call('session_list'), + create: (request: CreateSessionRequest) => call('session_create', { request }), + restart: (id: string) => call('session_restart', { id }), + stop: (id: string) => call('session_stop', { id }), + remove: (id: string, removeWorktree: boolean) => call('session_remove', { id, removeWorktree }), + rename: (id: string, name: string) => call('session_rename', { id, name }), + setReviewed: (id: string, reviewed: boolean) => call('session_set_reviewed', { id, reviewed }), + graph: (id: string) => call('session_graph', { id }), + refresh: (id: string) => call('session_refresh', { id }), +}; diff --git a/src/lib/core/services/settings-service.ts b/src/lib/core/services/settings-service.ts deleted file mode 100644 index f4d1ee5..0000000 --- a/src/lib/core/services/settings-service.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { invoke } from "@tauri-apps/api/core"; -import type { Settings } from "$lib/features/settings/settings-types"; - -export const CONFIG_COMMANDS = { - GET_CONFIG: "get_config", - UPDATE_CONFIG: "update_config", -} - -export const SettingsService = { - async getConfig(): Promise { - return await invoke(CONFIG_COMMANDS.GET_CONFIG); - }, - async updateConfig(newConfig: Settings): Promise { - invoke(CONFIG_COMMANDS.UPDATE_CONFIG, { newConfig }); - }, -}; \ No newline at end of file diff --git a/src/lib/core/services/terminal-service.ts b/src/lib/core/services/terminal-service.ts new file mode 100644 index 0000000..8203726 --- /dev/null +++ b/src/lib/core/services/terminal-service.ts @@ -0,0 +1,32 @@ +import { Channel } from '@tauri-apps/api/core'; +import { call } from '#lib/core/services/ipc'; + +export const terminalService = { + /** + * Conecta la terminal de una sesión. Devuelve el historial reciente; lo posterior llega + * por `onData` (bytes crudos). + */ + async attach(id: string, onData: (bytes: Uint8Array) => void): Promise { + const channel = new Channel(); + const queue: Uint8Array[] = []; + let ready = false; + + channel.onmessage = (message) => { + const bytes = new Uint8Array(message); + if (ready) onData(bytes); + else queue.push(bytes); + }; + + const history = new Uint8Array(await call('term_attach', { id, channel })); + // El historial siempre se pinta antes que los mensajes que llegaron mientras tanto. + queueMicrotask(() => { + ready = true; + queue.splice(0).forEach(onData); + }); + return history; + }, + + detach: (id: string) => call('term_detach', { id }), + write: (id: string, data: string) => call('term_write', { id, data }), + resize: (id: string, rows: number, cols: number) => call('term_resize', { id, rows, cols }), +}; diff --git a/src/lib/core/services/vcs-service.ts b/src/lib/core/services/vcs-service.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/core/services/window-service.ts b/src/lib/core/services/window-service.ts new file mode 100644 index 0000000..ba4d4a6 --- /dev/null +++ b/src/lib/core/services/window-service.ts @@ -0,0 +1,21 @@ +import { getCurrentWindow } from '@tauri-apps/api/window'; +import { ask, open } from '@tauri-apps/plugin-dialog'; +import { openPath, openUrl } from '@tauri-apps/plugin-opener'; + +export const windowService = { + minimize: () => getCurrentWindow().minimize(), + toggleMaximize: () => getCurrentWindow().toggleMaximize(), + close: () => getCurrentWindow().close(), + + /** Abre el selector nativo de carpetas. */ + async pickFolder(title: string): Promise { + const selected = await open({ directory: true, multiple: false, title }); + return typeof selected === 'string' ? selected : null; + }, + + /** Confirmación nativa (sí/no). */ + confirm: (message: string, title: string) => ask(message, { title, kind: 'warning' }), + + openPath: (path: string) => openPath(path), + openUrl: (url: string) => openUrl(url), +}; diff --git a/src/lib/core/types/files.ts b/src/lib/core/types/files.ts new file mode 100644 index 0000000..c1ac420 --- /dev/null +++ b/src/lib/core/types/files.ts @@ -0,0 +1,52 @@ +export interface DirEntryInfo { + name: string; + path: string; + isDir: boolean; +} + +export interface GraphNode { + id: string; + label: string; + files: number; + bytes: number; + /** `dir`: carpeta agregada (se puede expandir). `file`: archivo individual. */ + kind: 'dir' | 'file'; +} + +export interface GraphEdge { + from: string; + to: string; + weight: number; +} + +/** Grafo de dependencias: las carpetas expandidas se abren en sus hijos, el resto queda agregado. */ +export interface DepGraph { + maxDepth: number; + fileCount: number; + /** Todas las carpetas con código analizado (para expandir hasta un nivel). */ + dirs: string[]; + nodes: GraphNode[]; + edges: GraphEdge[]; +} + +export interface GitInfo { + isRepo: boolean; + branch: string | null; +} + +/** Estado de un archivo cambiado: M modificado, A añadido, D borrado, U sin seguimiento. */ +export type ChangeStatus = 'M' | 'A' | 'D' | 'U'; + +export interface ChangedFile { + path: string; + status: ChangeStatus; + additions: number; + deletions: number; +} + +export interface FilePair { + path: string; + status: ChangeStatus; + original: string; + modified: string; +} diff --git a/src/lib/core/types/kanban.ts b/src/lib/core/types/kanban.ts new file mode 100644 index 0000000..3d0bf77 --- /dev/null +++ b/src/lib/core/types/kanban.ts @@ -0,0 +1,15 @@ +export type KanbanColumnID = 'backlog' | 'doing' | 'review' | 'done'; + +export interface KanbanTask { + id: string; + title: string; + notes: string; + column: KanbanColumnID; + /** Sesión que está trabajando en la tarea (si la hay). */ + sessionId: string | null; + createdAt: number; +} + +export interface KanbanBoard { + tasks: KanbanTask[]; +} diff --git a/src/lib/core/types/menu.ts b/src/lib/core/types/menu.ts index 1f0e889..b612508 100644 --- a/src/lib/core/types/menu.ts +++ b/src/lib/core/types/menu.ts @@ -1,8 +1,12 @@ -export interface MenuItem { +import type { Component } from 'svelte'; + +/** Acción disponible en la paleta de comandos. */ +export interface PaletteItem { + id: string; label: string; - icon?: any; - shortcut?: string; - action?: () => void; - danger?: boolean; - children?: MenuItem[]; -} \ No newline at end of file + hint?: string; + icon?: Component; + /** Texto adicional usado solo para filtrar. */ + keywords?: string; + run: () => void | Promise; +} diff --git a/src/lib/core/types/session.ts b/src/lib/core/types/session.ts new file mode 100644 index 0000000..3952e78 --- /dev/null +++ b/src/lib/core/types/session.ts @@ -0,0 +1,91 @@ +/** Estado operativo de una sesión; determina cuánta atención merece. */ +export type SessionStatus = 'starting' | 'working' | 'waiting' | 'review' | 'idle' | 'exited'; + +/** Familia de una acción de la IA (define icono y color en el grafo). */ +export type ActionFamily = + 'read' | 'write' | 'exec' | 'search' | 'web' | 'agent' | 'plan' | 'think' | 'other'; + +export interface NowInfo { + kind: ActionFamily; + label: string; + target: string | null; +} + +/** Indicadores que realmente merecen atención. */ +export interface SessionKpis { + turns: number; + toolCalls: number; + errors: number; + filesChanged: number; + additions: number; + deletions: number; + contextTokens: number; +} + +/** Punto del plan (checklist) que la IA mantiene con `TodoWrite`. */ +export interface PlanItem { + content: string; + status: 'pending' | 'in_progress' | 'completed'; +} + +export interface Session { + id: string; + name: string; + projectPath: string; + cwd: string; + branch: string | null; + baseSha: string | null; + worktree: boolean; + profileId: string; + profileName: string; + status: SessionStatus; + statusSince: number; + createdAt: number; + now: NowInfo | null; + kpis: SessionKpis; + plan: PlanItem[]; + model: string | null; + lastMessage: string | null; + claudeSessionId: string | null; + transcriptPath: string | null; + touched: string[]; + exitCode: number | null; + reviewed: boolean; + colorIdx: number; + observed: boolean; +} + +export interface CreateSessionRequest { + name: string; + profileId: string; + projectPath: string; + worktree: boolean; + branch?: string; + prompt?: string; +} + +export type NodeKind = 'prompt' | 'tool' | 'notice' | 'stop'; +export type NodeStatus = 'running' | 'ok' | 'error'; + +/** Un paso del razonamiento de la IA (nodo del thinking graph). */ +export interface ThoughtNode { + id: string; + turn: number; + seq: number; + kind: NodeKind; + family: ActionFamily; + tool: string | null; + label: string; + detail: string | null; + intent: string | null; + target: string | null; + status: NodeStatus; + parent: string | null; + ts: number; + durationMs: number | null; +} + +export interface GraphDelta { + sessionId: string; + nodes: ThoughtNode[]; +} diff --git a/src/lib/core/types/settings.ts b/src/lib/core/types/settings.ts new file mode 100644 index 0000000..6a65045 --- /dev/null +++ b/src/lib/core/types/settings.ts @@ -0,0 +1,63 @@ +export type ThemeMode = 'dark' | 'light' | 'system'; +export type AccentID = 'blue' | 'teal' | 'violet' | 'amber' | 'rose'; +export type Language = 'es' | 'en'; + +export interface CliProfile { + id: string; + name: string; + command: string; + args: string[]; + env: Record; + hooks: boolean; + resumeArgs: string[]; +} + +export interface WebhookConfig { + enabled: boolean; + url: string; + method: 'GET' | 'POST'; + body: string; + contentType: string; +} + +export interface NotificationConfig { + desktop: boolean; + onlyWhenUnfocused: boolean; + onNeedsYou: boolean; + onSessionDone: boolean; + onAllIdle: boolean; + webhook: WebhookConfig; +} + +export interface AppConfig { + theme: ThemeMode; + accent: AccentID; + language: Language; + uiScale: number; + reduceMotion: boolean; + autoSave: boolean; + terminalFontSize: number; + contextLimit: number; + shell: string | null; + lastProjectPath: string | null; + recentProjects: string[]; + profiles: CliProfile[]; + defaultProfileId: string; + notifications: NotificationConfig; +} + +export interface AppInfo { + version: string; + hookPort: number | null; + dataDir: string; + configDir: string; + shell: string; + git: string | null; +} + +export interface CommandCheck { + found: boolean; + path: string | null; + /** Variables `$NOMBRE` del perfil que no existen en el entorno del sistema. */ + missingEnv: string[]; +} diff --git a/src/lib/core/types/tab.ts b/src/lib/core/types/tab.ts index ea94383..e9bb9dc 100644 --- a/src/lib/core/types/tab.ts +++ b/src/lib/core/types/tab.ts @@ -1,82 +1,9 @@ -import type { EditorLanguage } from "$lib/features/editor/editor-types"; -import type { ActivityID } from "./work"; - -/** Estructura base para cualquier elemento que pueda ocupar una pestaña */ -export interface BaseTab { - id: string; // Ruta del archivo o ID único de actividad - label: string; // Texto a mostrar en la pestaña - icon: any; // Componente de icono (Lucide) - color: string; // Clase de color para la UI -} - -export type AssetExtension = - 'png' - | 'jpg' - | 'jpeg' - | 'gif' - | 'webp' - | 'svg' - | 'ico'; - -export const ASSET_EXTENSIONS: Set = new Set([ - 'png', 'jpg', 'jpeg', 'gif', 'webp', 'svg', 'ico' -]); - -export type CodeExtension = - 'astro' - | 'rs' - | 'js' - | 'ts' - | 'svelte' - | 'json' - | 'md' - | 'css' - | 'html' - | 'txt' - | 'toml' - | 'yaml' - | 'rb' - | 'cpp' - | 'hpp' - | 'java' - | 'other'; - -/** - * Define la estructura de un archivo cualquiera. - */ -export interface FileNode extends BaseTab{ +/** Archivo abierto en el editor. */ +export interface EditorTab { path: string; name: string; - is_dir: boolean; - extension: AssetExtension | CodeExtension; -} - -/** - * Define la estructura de un archivo de código. - */ -export interface CodeTab extends BaseTab, FileNode { content: string; - language: EditorLanguage; - isDirty: boolean; - type: 'code'; -} - -/** Pestañas de herramientas internas (Blueprint, Forge, Pulse) */ -export interface ActivityTab extends BaseTab { - type: ActivityID; -} - -/** Pestañas para archivos binarios o no editables (Imágenes, PDFs) */ -export interface AssetTab extends BaseTab, FileNode { - type: 'asset'; -} - -/** Pestañas genéricas para extensiones */ -export interface GenericTab extends BaseTab { - type: 'other'; + /** Contenido guardado en disco (para detectar cambios sin guardar). */ + saved: string; + error: string | null; } - -/** Unión discriminada para el control de flujo en el Workbench */ -export type Tab = ActivityTab | CodeTab | AssetTab | GenericTab; - -export type GenericFile = (AssetTab | CodeTab) & { children?: GenericFile[]; } \ No newline at end of file diff --git a/src/lib/core/types/work.ts b/src/lib/core/types/work.ts index eba0ea2..1485c07 100644 --- a/src/lib/core/types/work.ts +++ b/src/lib/core/types/work.ts @@ -1,16 +1,18 @@ -import type { WorkSectionIDs, ActivityIDs } from "$lib/core/constants/work-config"; +import type { WorkSectionIDs, ActivityIDs } from '#lib/core/constants/work-config'; +import type { Component } from 'svelte'; -/** Tipo de modo de trabajo del IDE */ -export type WorkSectionID = typeof WorkSectionIDs[keyof typeof WorkSectionIDs]; +/** Tipo de sección de trabajo del IDE */ +export type WorkSectionID = (typeof WorkSectionIDs)[keyof typeof WorkSectionIDs]; /** Tipo de identificador de actividad */ -export type ActivityID = typeof ActivityIDs[keyof typeof ActivityIDs]; +export type ActivityID = (typeof ActivityIDs)[keyof typeof ActivityIDs]; -/** Estructura de una nodo desplegable ({@link WorkSectionID} o {@link ActivityID}) */ +/** Estructura de un nodo visual ({@link WorkSectionID} o {@link ActivityID}) */ export interface DisplayNode { id: string; + /** Clave de i18n de la etiqueta */ label: string; - icon: any; - color?: string; - description?: string; -} \ No newline at end of file + icon: Component; + /** Atajo de teclado asociado (solo informativo) */ + shortcut?: string; +} diff --git a/src/lib/core/utils/force-layout.ts b/src/lib/core/utils/force-layout.ts new file mode 100644 index 0000000..04f0ff4 --- /dev/null +++ b/src/lib/core/utils/force-layout.ts @@ -0,0 +1,118 @@ +export interface LayoutNode { + id: string; + /** Radio aproximado: se usa para evitar solapamientos. */ + radius: number; + x: number; + y: number; +} + +export interface LayoutEdge { + from: string; + to: string; + weight: number; +} + +/** + * Distribución por fuerzas (repulsión + resortes + gravedad) calculada de una sola vez. + * Es determinista: parte de un círculo, así el grafo no "salta" entre recargas. + */ +export function forceLayout( + nodes: LayoutNode[], + edges: LayoutEdge[], + width: number, + height: number, + iterations = 260, +): LayoutNode[] { + const count = nodes.length; + if (count === 0) return nodes; + + const cx = width / 2; + const cy = height / 2; + const spread = Math.min(width, height) * 0.38; + + nodes.forEach((node, i) => { + const angle = (i / count) * Math.PI * 2; + node.x = cx + Math.cos(angle) * spread; + node.y = cy + Math.sin(angle) * spread; + }); + + const index = new Map(nodes.map((node, i) => [node.id, i])); + const links = edges + .map((edge) => [index.get(edge.from), index.get(edge.to), edge.weight] as const) + .filter( + (link): link is readonly [number, number, number] => + link[0] !== undefined && link[1] !== undefined, + ); + + const vx = new Float64Array(count); + const vy = new Float64Array(count); + const ideal = Math.max(90, Math.sqrt((width * height) / count) * 0.8); + + for (let step = 0; step < iterations; step++) { + const cooling = 1 - step / iterations; + + for (let i = 0; i < count; i++) { + for (let j = i + 1; j < count; j++) { + let dx = nodes[i].x - nodes[j].x; + let dy = nodes[i].y - nodes[j].y; + let distance = Math.hypot(dx, dy) || 0.01; + const minimum = nodes[i].radius + nodes[j].radius + 18; + const push = + ((ideal * ideal) / distance) * 0.05 + + (distance < minimum ? (minimum - distance) * 0.5 : 0); + + dx /= distance; + dy /= distance; + vx[i] += dx * push; + vy[i] += dy * push; + vx[j] -= dx * push; + vy[j] -= dy * push; + } + } + + for (const [a, b, weight] of links) { + const dx = nodes[b].x - nodes[a].x; + const dy = nodes[b].y - nodes[a].y; + const distance = Math.hypot(dx, dy) || 0.01; + const pull = (distance - ideal) * 0.012 * (1 + Math.log2(1 + weight) * 0.25); + + vx[a] += (dx / distance) * pull; + vy[a] += (dy / distance) * pull; + vx[b] -= (dx / distance) * pull; + vy[b] -= (dy / distance) * pull; + } + + for (let i = 0; i < count; i++) { + vx[i] += (cx - nodes[i].x) * 0.004; + vy[i] += (cy - nodes[i].y) * 0.004; + nodes[i].x += Math.max(-30, Math.min(30, vx[i])) * cooling; + nodes[i].y += Math.max(-30, Math.min(30, vy[i])) * cooling; + vx[i] *= 0.55; + vy[i] *= 0.55; + } + } + + fitToView(nodes, width, height); + return nodes; +} + +/** Escala y centra el resultado para que siempre quepa completo en el lienzo. */ +function fitToView(nodes: LayoutNode[], width: number, height: number, padding = 70): void { + const left = Math.min(...nodes.map((node) => node.x - node.radius)); + const right = Math.max(...nodes.map((node) => node.x + node.radius)); + const top = Math.min(...nodes.map((node) => node.y - node.radius)); + const bottom = Math.max(...nodes.map((node) => node.y + node.radius)); + + const scale = Math.min( + (width - padding * 2) / (right - left || 1), + (height - padding * 2) / (bottom - top || 1), + 1.6, + ); + const offsetX = (width - (right + left) * scale) / 2; + const offsetY = (height - (bottom + top) * scale) / 2; + + for (const node of nodes) { + node.x = node.x * scale + offsetX; + node.y = node.y * scale + offsetY; + } +} diff --git a/src/lib/core/utils/format.ts b/src/lib/core/utils/format.ts new file mode 100644 index 0000000..c79ec01 --- /dev/null +++ b/src/lib/core/utils/format.ts @@ -0,0 +1,68 @@ +/** Último segmento de una ruta (Windows o POSIX). */ +export function basename(path: string): string { + const parts = path.split(/[\\/]/).filter(Boolean); + return parts[parts.length - 1] ?? path; +} + +/** Ruta relativa a `root` con separadores `/` (si no cuelga de `root`, devuelve la original). */ +export function relativeTo(root: string, path: string): string { + const normalizedRoot = root.replace(/\\/g, '/').replace(/\/$/, ''); + const normalized = path.replace(/\\/g, '/'); + return normalized.startsWith(`${normalizedRoot}/`) + ? normalized.slice(normalizedRoot.length + 1) + : normalized; +} + +/** Une una ruta base con una relativa respetando el separador de la base. */ +export function joinPath(base: string, relative: string): string { + const separator = base.includes('\\') && !base.includes('/') ? '\\' : '/'; + return `${base.replace(/[\\/]$/, '')}${separator}${relative.replace(/[\\/]/g, separator)}`; +} + +/** Duración corta: `45s`, `3m`, `2h 10m`. */ +export function formatDuration(ms: number): string { + const seconds = Math.max(0, Math.floor(ms / 1000)); + if (seconds < 60) return `${seconds}s`; + + const minutes = Math.floor(seconds / 60); + if (minutes < 60) return `${minutes}m`; + + const hours = Math.floor(minutes / 60); + return `${hours}h ${minutes % 60}m`; +} + +/** Número compacto: `1.2k`, `140k`, `1.1M`. */ +export function formatCompact(value: number): string { + if (value < 1000) return String(value); + if (value < 100_000) return `${(value / 1000).toFixed(1).replace(/\.0$/, '')}k`; + if (value < 1_000_000) return `${Math.round(value / 1000)}k`; + return `${(value / 1_000_000).toFixed(1).replace(/\.0$/, '')}M`; +} + +/** Puntaje de coincidencia difusa (subsecuencia). `null` si no coincide. */ +export function fuzzyScore(query: string, text: string): number | null { + const needle = query.toLowerCase(); + const haystack = text.toLowerCase(); + if (!needle) return 0; + + let score = 0; + let cursor = 0; + let streak = 0; + + for (const char of needle) { + const found = haystack.indexOf(char, cursor); + if (found === -1) return null; + + streak = found === cursor ? streak + 1 : 0; + score += 1 + streak * 2 - (found - cursor) * 0.1; + // Premia coincidir al inicio de una palabra o del nombre de archivo. + if (found === 0 || /[\\/_\-. ]/.test(haystack[found - 1])) score += 3; + cursor = found + 1; + } + return score - haystack.length * 0.01; +} + +/** Une clases condicionales ignorando valores falsos. */ +export function cn(...parts: Array): string { + return parts.filter(Boolean).join(' '); +} diff --git a/src/lib/core/utils/graph-layout.ts b/src/lib/core/utils/graph-layout.ts new file mode 100644 index 0000000..2b06030 --- /dev/null +++ b/src/lib/core/utils/graph-layout.ts @@ -0,0 +1,158 @@ +import type { ThoughtNode } from '#lib/core/types/session'; + +export const ROW_HEIGHT = 34; +export const LANE_WIDTH = 18; + +export interface GraphRow { + type: 'header' | 'node'; + y: number; + turn: number; + node?: ThoughtNode; + lane: number; + /** Solo en cabeceras: resumen del turno. */ + summary?: { steps: number; files: number; errors: number; running: boolean }; + prompt?: string; + expanded?: boolean; +} + +export interface GraphLink { + from: { lane: number; y: number }; + to: { lane: number; y: number }; +} + +export interface GraphLayout { + rows: GraphRow[]; + links: GraphLink[]; + lanes: number; + height: number; +} + +/** + * Distribuye los nodos como un historial de git: el tiempo baja, las ramas paralelas + * (llamadas simultáneas) se abren hacia la derecha. Los turnos antiguos se colapsan. + */ +export function layoutGraph(nodes: ThoughtNode[], isExpanded: (turn: number) => boolean): GraphLayout { + const byTurn = new Map(); + for (const node of nodes) { + const list = byTurn.get(node.turn) ?? []; + list.push(node); + byTurn.set(node.turn, list); + } + + const rows: GraphRow[] = []; + const links: GraphLink[] = []; + let y = 0; + let lanes = 1; + + for (const [turn, turnNodes] of [...byTurn.entries()].sort((a, b) => a[0] - b[0])) { + const tools = turnNodes.filter((node) => node.kind === 'tool'); + const expanded = isExpanded(turn); + + rows.push({ + type: 'header', + y, + turn, + lane: 0, + expanded, + prompt: turnNodes.find((node) => node.kind === 'prompt')?.detail ?? turnNodes[0]?.label ?? '', + summary: { + steps: tools.length, + files: new Set( + tools.filter((node) => node.family === 'write' && node.target).map((node) => node.target), + ).size, + errors: tools.filter((node) => node.status === 'error').length, + running: tools.some((node) => node.status === 'running'), + }, + }); + y += ROW_HEIGHT; + if (!expanded) continue; + + const laneOf = new Map(); + const children = new Map(); + const position = new Map(); + + for (const node of turnNodes) { + let lane = 0; + if (node.parent && laneOf.has(node.parent)) { + const siblings = children.get(node.parent) ?? 0; + children.set(node.parent, siblings + 1); + lane = (laneOf.get(node.parent) ?? 0) + siblings; + } + laneOf.set(node.id, lane); + lanes = Math.max(lanes, lane + 1); + + rows.push({ type: 'node', y, turn, node, lane }); + position.set(node.id, { lane, y }); + + const parent = node.parent ? position.get(node.parent) : undefined; + if (parent) links.push({ from: parent, to: { lane, y } }); + y += ROW_HEIGHT; + } + } + + return { rows, links, lanes, height: y }; +} + +export interface Phase { + id: string; + family: ThoughtNode['family']; + nodes: ThoughtNode[]; + /** Alguna herramienta de la fase falló. */ + failed: boolean; + running: boolean; + /** Fase de edición que viene justo después de un fallo: se dibuja como reintento. */ + retry: boolean; +} + +export interface TurnDiagram { + turn: number; + prompt: string; + phases: Phase[]; + stop: ThoughtNode | null; + notices: ThoughtNode[]; +} + +/** + * Resume cada turno en fases: pasos consecutivos de la misma familia (leer, editar, ejecutar…) se agrupan en + * una sola caja. Es la vista "de lejos": explorar → editar → verificar → reintentar → listo. + */ +export function buildDiagram(nodes: ThoughtNode[]): TurnDiagram[] { + const turns = new Map(); + + for (const node of nodes) { + const turn = turns.get(node.turn) ?? { + turn: node.turn, + prompt: '', + phases: [], + stop: null, + notices: [], + }; + turns.set(node.turn, turn); + + if (node.kind === 'prompt') turn.prompt = node.detail ?? node.label; + else if (node.kind === 'stop') turn.stop = node; + else if (node.kind === 'notice') turn.notices.push(node); + else { + const last = turn.phases.at(-1); + if (last && last.family === node.family && node.family !== 'agent') last.nodes.push(node); + else + turn.phases.push({ + id: `${node.turn}:${node.id}`, + family: node.family, + nodes: [node], + failed: false, + running: false, + retry: false, + }); + } + } + + for (const turn of turns.values()) { + turn.phases.forEach((phase, index) => { + phase.failed = phase.nodes.some((node) => node.status === 'error'); + phase.running = phase.nodes.some((node) => node.status === 'running'); + phase.retry = phase.family === 'write' && turn.phases[index - 1]?.failed === true; + }); + } + return [...turns.values()].sort((a, b) => a.turn - b.turn); +} diff --git a/src/lib/core/utils/storage.ts b/src/lib/core/utils/storage.ts new file mode 100644 index 0000000..2d117cc --- /dev/null +++ b/src/lib/core/utils/storage.ts @@ -0,0 +1,17 @@ +/** Lectura/escritura segura de preferencias de interfaz en `localStorage`. */ +export function loadLocal(key: string, fallback: T): T { + try { + const raw = localStorage.getItem(`mod0.${key}`); + return raw === null ? fallback : (JSON.parse(raw) as T); + } catch { + return fallback; + } +} + +export function saveLocal(key: string, value: unknown): void { + try { + localStorage.setItem(`mod0.${key}`, JSON.stringify(value)); + } catch { + // Sin almacenamiento disponible: la preferencia simplemente no se recuerda. + } +} diff --git a/src/lib/core/utils/tree.ts b/src/lib/core/utils/tree.ts new file mode 100644 index 0000000..18a837e --- /dev/null +++ b/src/lib/core/utils/tree.ts @@ -0,0 +1,56 @@ +import type { ChangedFile } from '#lib/core/types/files'; + +export interface ChangeTreeNode { + /** Ruta completa de la carpeta (o del archivo). */ + path: string; + /** Nombre mostrado; las carpetas con un solo hijo carpeta se fusionan (`src/auth`). */ + name: string; + file: ChangedFile | null; + children: ChangeTreeNode[]; + /** Cantidad de archivos cambiados dentro (solo carpetas). */ + count: number; +} + +/** Agrupa los archivos cambiados por carpeta, como la vista en árbol del control de versiones de VS Code. */ +export function buildChangeTree(files: ChangedFile[]): ChangeTreeNode[] { + const root: ChangeTreeNode = { path: '', name: '', file: null, children: [], count: 0 }; + + for (const file of files) { + let cursor = root; + const parts = file.path.split('/'); + + parts.forEach((part, index) => { + cursor.count++; + const path = parts.slice(0, index + 1).join('/'); + let next = cursor.children.find((child) => child.path === path); + + if (!next) { + next = { + path, + name: part, + file: index === parts.length - 1 ? file : null, + children: [], + count: 0, + }; + cursor.children.push(next); + } + cursor = next; + }); + cursor.count = 1; + } + + const compact = (node: ChangeTreeNode): ChangeTreeNode => { + node.children = node.children.map(compact); + // Fusiona cadenas de carpetas con un único hijo carpeta. + while (!node.file && node.children.length === 1 && !node.children[0].file && node.path !== '') { + const only = node.children[0]; + node.name = `${node.name}/${only.name}`; + node.path = only.path; + node.children = only.children; + } + node.children.sort((a, b) => Number(!!a.file) - Number(!!b.file) || a.name.localeCompare(b.name)); + return node; + }; + + return compact(root).children; +} diff --git a/src/lib/features/accounts/AccountsMenu.svelte b/src/lib/features/accounts/AccountsMenu.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/editor/CodeEditor.svelte b/src/lib/features/editor/CodeEditor.svelte index 52bb9e1..7160b1e 100644 --- a/src/lib/features/editor/CodeEditor.svelte +++ b/src/lib/features/editor/CodeEditor.svelte @@ -1,74 +1,75 @@ -
\ No newline at end of file +
diff --git a/src/lib/features/editor/DiffView.svelte b/src/lib/features/editor/DiffView.svelte new file mode 100644 index 0000000..83655a6 --- /dev/null +++ b/src/lib/features/editor/DiffView.svelte @@ -0,0 +1,56 @@ + + +
diff --git a/src/lib/features/editor/FilePreview.svelte b/src/lib/features/editor/FilePreview.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/editor/editor-lsp.ts b/src/lib/features/editor/editor-lsp.ts deleted file mode 100644 index 881497d..0000000 --- a/src/lib/features/editor/editor-lsp.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { invoke } from "@tauri-apps/api/core"; - -export function createLSPPlugin(languageId: string) { - // Este pequeño objeto intercepta lo que CodeMirror necesita - // y lo manda al backend de Rust. - return languageServer({ - client: { - // No necesitas WebSockets, usas el Bridge de Tauri - request: (method, params) => invoke("lsp_request", { language: languageId, method, params }), - notify: (method, params) => invoke("lsp_notify", { language: languageId, method, params }), - }, - documentUri: `file://${currentFilePath}`, - languageId: languageId - }); -} \ No newline at end of file diff --git a/src/lib/features/editor/editor-runes.svelte.ts b/src/lib/features/editor/editor-runes.svelte.ts deleted file mode 100644 index b638c4a..0000000 --- a/src/lib/features/editor/editor-runes.svelte.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { tabsStack } from '../workbench/tabs/tabs-runes.svelte'; -import { fileStack } from '../system-atoms/pulse/files/files-runes.svelte'; -import type { CodeTab } from '$lib/core/types/tab'; -import { LanguageDescription } from '@codemirror/language'; -import { languages } from '@codemirror/language-data'; - -class EditorStack { - /** * Detecta el lenguaje basado en la extensión, igual que VSCode. - */ - getLanguageData(fileName: string) { - const desc = LanguageDescription.matchFilename(languages, fileName); - return desc; - } - - updateContent(content: string): void { - const active = tabsStack.activeTab; - if (active?.type === 'code') { - const file = active as CodeTab; - if (file.content !== content) { - file.content = content; - file.isDirty = true; - fileStack.updateFileContent(file.id, content); - } - } - } - - async saveFileChanges(): Promise { - const active = tabsStack.activeTab; - if (active?.type === 'code' && (active as CodeTab).isDirty) { - await fileStack.saveCurrentFile(); - (active as CodeTab).isDirty = false; - } - } - - /** - * Retorna la extensión de lenguaje cargada dinámicamente - */ - async getDynamicLanguage(fileName: string) { - const langDesc = this.getLanguageData(fileName); - if (langDesc) { - return await langDesc.load(); - } - return []; - } -} - -export const editorStack = new EditorStack(); \ No newline at end of file diff --git a/src/lib/features/editor/editor-theme.ts b/src/lib/features/editor/editor-theme.ts new file mode 100644 index 0000000..ee775e3 --- /dev/null +++ b/src/lib/features/editor/editor-theme.ts @@ -0,0 +1,53 @@ +import { HighlightStyle, syntaxHighlighting } from '@codemirror/language'; +import { EditorView } from '@codemirror/view'; +import { tags } from '@lezer/highlight'; + +/** Tema del editor basado en los tokens de `app.css`, así cambia solo con el tema de la app. */ +export const editorTheme = EditorView.theme({ + '&': { + height: '100%', + backgroundColor: 'var(--bg-main)', + color: 'var(--text-main)', + fontSize: '0.8125rem', + }, + '&.cm-focused': { outline: 'none' }, + '.cm-scroller': { fontFamily: 'var(--font-mono)', lineHeight: '1.6', overflow: 'auto' }, + '.cm-content': { caretColor: 'var(--text-main)', padding: '8px 0' }, + '.cm-gutters': { backgroundColor: 'var(--bg-main)', color: 'var(--text-faint)', border: 'none' }, + '.cm-activeLine': { backgroundColor: 'var(--bg-hover)' }, + '.cm-activeLineGutter': { backgroundColor: 'transparent', color: 'var(--text-muted)' }, + '.cm-cursor': { borderLeftColor: 'var(--text-main)' }, + '.cm-selectionBackground, &.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground': { + backgroundColor: 'var(--accent-soft)', + }, + '.cm-matchingBracket': { backgroundColor: 'var(--bg-active)', outline: 'none' }, + '.cm-panels': { backgroundColor: 'var(--bg-sidebar)', color: 'var(--text-main)' }, + '.cm-tooltip': { + backgroundColor: 'var(--bg-raised)', + border: '1px solid var(--border-subtle)', + color: 'var(--text-main)', + }, + '.cm-searchMatch': { backgroundColor: 'var(--accent-soft)' }, +}); + +export const highlightTheme = syntaxHighlighting( + HighlightStyle.define([ + { tag: [tags.keyword, tags.operatorKeyword, tags.modifier], color: 'var(--syn-keyword)' }, + { tag: [tags.string, tags.special(tags.string), tags.regexp], color: 'var(--syn-string)' }, + { tag: [tags.number, tags.bool, tags.null, tags.atom], color: 'var(--syn-number)' }, + { + tag: [tags.comment, tags.lineComment, tags.blockComment], + color: 'var(--syn-comment)', + fontStyle: 'italic', + }, + { + tag: [tags.function(tags.variableName), tags.function(tags.propertyName)], + color: 'var(--syn-function)', + }, + { tag: [tags.typeName, tags.className, tags.namespace], color: 'var(--syn-type)' }, + { tag: [tags.propertyName, tags.attributeName], color: 'var(--syn-function)' }, + { tag: [tags.punctuation, tags.bracket, tags.operator], color: 'var(--syn-punct)' }, + { tag: tags.heading, color: 'var(--syn-function)', fontWeight: '600' }, + { tag: tags.link, color: 'var(--accent)', textDecoration: 'underline' }, + ]), +); diff --git a/src/lib/features/editor/editor-types.ts b/src/lib/features/editor/editor-types.ts deleted file mode 100644 index f017457..0000000 --- a/src/lib/features/editor/editor-types.ts +++ /dev/null @@ -1,60 +0,0 @@ -import type { CodeExtension } from "$lib/core/types/tab"; - -/** - * Configuración de la selección actual del editor. - */ -export interface EditorSelection { - from: number; - to: number; - line: number; - column: number; -} - -/** - * Ajustes visuales del componente de edición. - */ -export interface EditorSettings { - fontSize: number; - tabSize: number; - lineNumbers: boolean; - wordWrap: boolean; - minimap: boolean; -} - -export type EditorLanguage = - 'rust' - | 'typescript' - | 'javascript' - | 'svelte' - | 'json' - | 'markdown' - | 'astro' - | 'ruby' - | 'c++' - | 'java' - | 'html' - | 'css' - | 'yaml' - | 'txt' - | 'toml' - | 'plaintext'; - -export const LANGUAGE_MAP: Record = { - 'rs': 'rust', - 'ts': 'typescript', - 'js': 'javascript', - 'svelte': 'svelte', - 'json': 'json', - 'md': 'markdown', - 'astro': 'astro', - 'rb': 'ruby', - 'cpp': 'c++', - 'hpp': 'c++', - 'java': 'java', - 'html': 'html', - 'css': 'css', - 'yaml': 'yaml', - 'txt': 'txt', - 'toml': 'toml', - 'other': 'plaintext' -}; \ No newline at end of file diff --git a/src/lib/features/screen_preview/ScreenPreview.svelte b/src/lib/features/screen_preview/ScreenPreview.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/settings/SettingsMainSpace.svelte b/src/lib/features/settings/SettingsMainSpace.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/settings/SettingsMenu.svelte b/src/lib/features/settings/SettingsMenu.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/settings/SettingsSidebar.svelte b/src/lib/features/settings/SettingsSidebar.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/settings/settings-runes.svelte.ts b/src/lib/features/settings/settings-runes.svelte.ts deleted file mode 100644 index 347ea07..0000000 --- a/src/lib/features/settings/settings-runes.svelte.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { SettingsService } from '../../core/services/settings-service'; -import { fileStack } from '../system-atoms/pulse/files/files-runes.svelte'; -import type { Settings } from "./settings-types"; - -class SettingsStack { - current = $state({ - theme: "dark", - language: "es", - last_project_path: null, - auto_save: false - }); - - constructor() { - this.init(); - } - - async init(): Promise { - try { - const savedConfig = await SettingsService.getConfig(); - this.current = savedConfig; - - this.applyTheme(); - this.applyLanguage(); - - if (this.current.last_project_path) { - console.log("Restaurando último workspace:", this.current.last_project_path); - fileStack.openFolder(this.current.last_project_path); - } - } catch (e) { - console.warn("Modo Web o Error: Usando configuración por defecto."); - this.applyTheme(); - } - } - - async update(newValues: Partial): Promise { - // Actualizamos el estado reactivo - Object.assign(this.current, newValues); - - if (newValues.theme) this.applyTheme(); - if (newValues.language) this.applyLanguage(); - - try { - await SettingsService.updateConfig(this.current); - } catch (e) { - console.error("Error al guardar en Rust:", e); - } - } - - private applyTheme(): void { - if (typeof document === 'undefined') return; - const root = document.documentElement; - document.body.classList.add('theme-transitioning'); - root.classList.toggle('dark', this.current.theme === 'dark'); - root.style.colorScheme = this.current.theme; - setTimeout(() => document.body.classList.remove('theme-transitioning'), 150); - } - - private applyLanguage(): void { - if (typeof document === 'undefined') return; - document.documentElement.lang = this.current.language; - } -} - -export const settingsStack = new SettingsStack(); \ No newline at end of file diff --git a/src/lib/features/settings/settings-types.ts b/src/lib/features/settings/settings-types.ts deleted file mode 100644 index 861d1b7..0000000 --- a/src/lib/features/settings/settings-types.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface Settings { - theme: "dark" | "light"; - language: "en" | "es"; - last_project_path: string | null; - auto_save: boolean -} \ No newline at end of file diff --git a/src/lib/features/system-atoms/blueprint/artifacts/ArtifactCanvas.svelte b/src/lib/features/system-atoms/blueprint/artifacts/ArtifactCanvas.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/blueprint/artifacts/DiagramCanvas.svelte b/src/lib/features/system-atoms/blueprint/artifacts/DiagramCanvas.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/blueprint/artifacts/UiUxDesignCanvas.svelte b/src/lib/features/system-atoms/blueprint/artifacts/UiUxDesignCanvas.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/blueprint/artifacts/artifacts-types.ts b/src/lib/features/system-atoms/blueprint/artifacts/artifacts-types.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/blueprint/chat/ChatCanvas.svelte b/src/lib/features/system-atoms/blueprint/chat/ChatCanvas.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/blueprint/chat/ChatInput.svelte b/src/lib/features/system-atoms/blueprint/chat/ChatInput.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/blueprint/chat/chat-types.ts b/src/lib/features/system-atoms/blueprint/chat/chat-types.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/forge/kanban/KanbanColumn.svelte b/src/lib/features/system-atoms/forge/kanban/KanbanColumn.svelte new file mode 100644 index 0000000..dca9e6b --- /dev/null +++ b/src/lib/features/system-atoms/forge/kanban/KanbanColumn.svelte @@ -0,0 +1,131 @@ + + + +
{ + event.preventDefault(); + over = true; + }} + ondragleave={() => (over = false)} + ondrop={drop} +> +
+

+ {t(`kanban.${column}`)} {tasks.length} +

+
+ +
+ {#each tasks as task (task.id)} + {@const session = sessionsStack.byId(task.sessionId)} +
event.dataTransfer?.setData('text/plain', task.id)} + > +
+ +
+

{task.title}

+ {#if task.notes}

+ {task.notes} +

{/if} +
+
+ +
+ {#if session} + + {:else} + + + {/if} + + +
+
+ {/each} +
+ +
{ + event.preventDefault(); + add(); + }} + > + + +
+
diff --git a/src/lib/features/system-atoms/forge/kanban/KanbanTask.svelte b/src/lib/features/system-atoms/forge/kanban/KanbanTask.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/forge/kanban/KanbanTaskDialog.svelte b/src/lib/features/system-atoms/forge/kanban/KanbanTaskDialog.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/forge/kanban/KanbanTaskList.svelte b/src/lib/features/system-atoms/forge/kanban/KanbanTaskList.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/forge/kanban/kanban-runes.svelte.ts b/src/lib/features/system-atoms/forge/kanban/kanban-runes.svelte.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/forge/kanban/kanban-types.ts b/src/lib/features/system-atoms/forge/kanban/kanban-types.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/forge/sessions/SessionCard.svelte b/src/lib/features/system-atoms/forge/sessions/SessionCard.svelte new file mode 100644 index 0000000..db35bdb --- /dev/null +++ b/src/lib/features/system-atoms/forge/sessions/SessionCard.svelte @@ -0,0 +1,237 @@ + + + +
sessionsStack.focus(session.id)} + ondblclick={() => open('thinking-graph')} +> + + +
+ + {#if editing} + + event.stopPropagation()} + onblur={commitRename} + onkeydown={(event) => + event.key === 'Enter' ? commitRename() : event.key === 'Escape' && (editing = false)} + /> + {:else} +

{session.name}

+ {/if} + {#if position < 9}Alt {position + 1}{/if} +
+ +

+ {session.profileName} + {#if session.branch}·{session.branch}{/if} + {#if session.worktree}worktree{/if} +

+ +
+ {#if session.status === 'working' && session.now} + +
+

{session.now.label}

+ {#if session.now.target}

+ {basename(session.now.target)} +

{/if} +
+ {:else} +

+ {headline} +

+ {/if} +
+ + {#if session.plan.length > 0} +
+ + + + {planDone}/{session.plan.length} + {planNow?.content ?? ''} +
+ {/if} + + + +
+ {since} + ↻ {session.kpis.turns} + + +{session.kpis.additions} + −{session.kpis.deletions} + + {#if session.kpis.errors > 0}⚠ {session.kpis.errors}{/if} + {#if session.kpis.contextTokens > 0} + + + + + {formatCompact(session.kpis.contextTokens)} + + {/if} +
+ +
+ + + + {#if session.status === 'exited'} + + {:else} + + {/if} + +
+
diff --git a/src/lib/features/system-atoms/forge/testing/testing-types.ts b/src/lib/features/system-atoms/forge/testing/testing-types.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/forge/thinking-graph/NodeDetail.svelte b/src/lib/features/system-atoms/forge/thinking-graph/NodeDetail.svelte new file mode 100644 index 0000000..ad5e971 --- /dev/null +++ b/src/lib/features/system-atoms/forge/thinking-graph/NodeDetail.svelte @@ -0,0 +1,78 @@ + + + diff --git a/src/lib/features/system-atoms/forge/thinking-graph/PhaseDiagram.svelte b/src/lib/features/system-atoms/forge/thinking-graph/PhaseDiagram.svelte new file mode 100644 index 0000000..d7edfe7 --- /dev/null +++ b/src/lib/features/system-atoms/forge/thinking-graph/PhaseDiagram.svelte @@ -0,0 +1,205 @@ + + +
+ {#each turns as turn (turn.turn)} + {@const expanded = graphStack.isExpanded(sessionId, turn.turn, lastTurn)} +
+ + + {#if expanded} +
+ {#each turn.phases as phase, index (phase.id)} + {@const visual = FamilyVisual[phase.family]} + {#if index > 0} + + {#if phase.retry}{:else}{/if} + + {/if} + +
+ + + {#if opened[phase.id]} +
    + {#each phase.nodes as node (node.id)} +
  • + +
  • + {/each} +
+ {/if} +
+ {/each} + + {#if session?.status === 'working' && turn.turn === lastTurn && !turn.stop} + +
+ + {session.now?.label ?? t('status.working')} +
+ {/if} + + {#each turn.notices as notice (notice.id)} + + + {/each} + + {#if turn.stop} + + + {/if} +
+ {/if} +
+ {/each} +
diff --git a/src/lib/features/system-atoms/forge/thinking-graph/ThinkingCanvas.svelte b/src/lib/features/system-atoms/forge/thinking-graph/ThinkingCanvas.svelte index e69de29..a3e2779 100644 --- a/src/lib/features/system-atoms/forge/thinking-graph/ThinkingCanvas.svelte +++ b/src/lib/features/system-atoms/forge/thinking-graph/ThinkingCanvas.svelte @@ -0,0 +1,186 @@ + + +
+
+ + + {#each layout.rows as row, index (index)} + {#if row.type === 'header'} + + {:else if row.node} + {@const node = row.node} + {@const visual = FamilyVisual[node.family]} + + {/if} + {/each} + + {#if session?.status === 'working' && layout.rows.length > 0} +
+ + {session.now?.label ?? t('status.working')} +
+ {/if} +
+
diff --git a/src/lib/features/system-atoms/forge/thinking-graph/ThoughtNode.svelte b/src/lib/features/system-atoms/forge/thinking-graph/ThoughtNode.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/forge/thinking-graph/thinking-graph-runes.svelte.ts b/src/lib/features/system-atoms/forge/thinking-graph/thinking-graph-runes.svelte.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/forge/thinking-graph/thinking-graph-types.ts b/src/lib/features/system-atoms/forge/thinking-graph/thinking-graph-types.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/pulse/files/FileGraph.svelte b/src/lib/features/system-atoms/pulse/files/FileGraph.svelte index e69de29..868b216 100644 --- a/src/lib/features/system-atoms/pulse/files/FileGraph.svelte +++ b/src/lib/features/system-atoms/pulse/files/FileGraph.svelte @@ -0,0 +1,289 @@ + + + { + dragging = false; + if (!moved) onselect(null); + }} + role="img" + aria-label="Grafo de dependencias" +> + + + + + + + + {#each graph.edges as edge (`${edge.from}>${edge.to}`)} + {@const a = laid.get(edge.from)} + {@const b = laid.get(edge.to)} + {#if a && b} + {@const dx = b.x - a.x} + {@const dy = b.y - a.y} + {@const length = Math.hypot(dx, dy) || 1} + {@const focus = hovered ?? selected} + {@const active = focus !== null && (edge.from === focus || edge.to === focus)} + + {/if} + {/each} + + {#each graph.nodes as node (node.id)} + {@const point = laid.get(node.id)} + {#if point} + {@const sessions = activity.get(node.id) ?? []} + {@const counts = changed.get(node.id)} + {@const dim = related && !related.has(node.id)} + {@const r = radius(node.files)} + + (hovered = node.id)} + onpointerleave={() => (hovered = null)} + onpointerdown={(event) => event.stopPropagation()} + onclick={(event) => { + event.stopPropagation(); + onselect(selected === node.id ? null : node.id); + }} + ondblclick={(event) => { + event.stopPropagation(); + if (node.kind === 'dir') onexpand(node.id); + }} + > + {#each sessions as session, index (index)} + + {/each} + {#if impactedNodes.has(node.id)} + + {/if} + + {#if node.kind === 'file'} + + {:else} + + + {node.files} + + {/if} + + + {node.label}{node.kind === 'dir' ? '/' : ''} + + + {#if counts} + + {#each Object.entries(counts) as [letter, count], index (letter)} + + {letter}{count > 1 ? count : ''} + + {/each} + + {/if} + + {/if} + {/each} + + diff --git a/src/lib/features/system-atoms/pulse/files/FileHistory.svelte b/src/lib/features/system-atoms/pulse/files/FileHistory.svelte deleted file mode 100644 index 9911959..0000000 --- a/src/lib/features/system-atoms/pulse/files/FileHistory.svelte +++ /dev/null @@ -1,27 +0,0 @@ - - -{#if fileStack.recentFiles.size > 0} -
-
- - Recents -
- -
- -
- {#each fileStack.recentFiles.values() as file} - - {/each} -
-{/if} \ No newline at end of file diff --git a/src/lib/features/system-atoms/pulse/files/FileSearch.svelte b/src/lib/features/system-atoms/pulse/files/FileSearch.svelte deleted file mode 100644 index fc47ec6..0000000 --- a/src/lib/features/system-atoms/pulse/files/FileSearch.svelte +++ /dev/null @@ -1,49 +0,0 @@ - - -
-
- - {fileStack.searchMode === 'content' ? 'Global Grep' : 'File Filter'} - -
- - -
-
- -
- - - {#if searchQuery} - - {/if} -
-
\ No newline at end of file diff --git a/src/lib/features/system-atoms/pulse/files/FileTree.svelte b/src/lib/features/system-atoms/pulse/files/FileTree.svelte deleted file mode 100644 index 3979897..0000000 --- a/src/lib/features/system-atoms/pulse/files/FileTree.svelte +++ /dev/null @@ -1,58 +0,0 @@ - - -
    - {#each nodes as node (node.path)} -
  • - - - {#if node.is_dir && fileStack.expandedPaths.has(node.path) && node.children} -
    - -
    - {/if} -
  • - {/each} -
\ No newline at end of file diff --git a/src/lib/features/system-atoms/pulse/files/FileTreeNode.svelte b/src/lib/features/system-atoms/pulse/files/FileTreeNode.svelte new file mode 100644 index 0000000..f47b6e8 --- /dev/null +++ b/src/lib/features/system-atoms/pulse/files/FileTreeNode.svelte @@ -0,0 +1,93 @@ + + + + +{#if entry.isDir && open} + {#each children as child (child.path)} + + {/each} +{/if} diff --git a/src/lib/features/system-atoms/pulse/files/files-runes.svelte.ts b/src/lib/features/system-atoms/pulse/files/files-runes.svelte.ts deleted file mode 100644 index bc3f612..0000000 --- a/src/lib/features/system-atoms/pulse/files/files-runes.svelte.ts +++ /dev/null @@ -1,316 +0,0 @@ -import { FSService } from "../../../../core/services/fs-service"; -import { tabsStack } from "../../../workbench/tabs/tabs-runes.svelte"; -import { FileCode, File as FileIcon, Folder, ImageIcon, FileText } from "lucide-svelte"; -import type { AssetExtension, AssetTab, CodeExtension, CodeTab, GenericFile, Tab } from "$lib/core/types/tab"; -import { settingsStack } from "../../../settings/settings-runes.svelte"; -import { SvelteSet } from "svelte/reactivity"; -import { LANGUAGE_MAP, type EditorLanguage } from "../../../editor/editor-types"; -import { ASSET_EXTENSIONS } from '../../../../core/types/tab'; - -class FileStack { - files = $state([]); - rootPath = $state(null); - expandedPaths = $state(new SvelteSet()); - recentFiles = $state(new SvelteSet()); - previewTabId = $state(null); - unsavedChanges = $state>({}); - isSearching = $state(false); - searchMode = $state<'files' | 'content'>('files'); - - constructor() { - const saved = localStorage.getItem('mod0_expanded_folders'); - if (saved) { - try { - this.expandedPaths = new SvelteSet(JSON.parse(saved)); - } catch { - this.expandedPaths = new SvelteSet(); - } - } - - $effect.root(() => { - $effect(() => { - localStorage.setItem('mod0_expanded_folders', JSON.stringify([...this.expandedPaths])); - }); - }); - - $effect.root(() => { - $effect(() => { - // Observamos cambios en unsavedChanges - const paths = Object.keys(this.unsavedChanges); - if (paths.length === 0) return; - - // Consultamos settings (Infrastructure ready) - const autoSaveEnabled = settingsStack.current.auto_save ?? false; - - if (autoSaveEnabled) { - // Aquí iría la lógica de debounce para no colapsar el disco - this.saveAllDirtyFiles(); - } - }); - }); - } - - // --- Gestión de UI --- - - toggleFolder(path: string) { - if (this.expandedPaths.has(path)) { - this.expandedPaths.delete(path); - } else { - this.expandedPaths.add(path); - } - } - - expandAll() { - const traverse = (nodes: GenericFile[]) => { - nodes.forEach(n => { - if (n.is_dir) { - this.expandedPaths.add(n.path); - if (n.children) traverse(n.children); - } - }); - }; - traverse(this.files); - } - - collapseAll() { - this.expandedPaths.clear(); - } - - addToHistory(file: GenericFile) { - if (!this.recentFiles.has(file)) - this.recentFiles.add(file); - } - - clearHistory() { - this.recentFiles.clear(); - } - - // --- Lógica de Pestañas y Caché --- - - promotePreview(path: string) { - if (this.previewTabId === path) { - this.previewTabId = null; - } - } - - updateFileContent(path: string, newContent: string) { - this.unsavedChanges[path] = newContent; - this.promotePreview(path); - - const tab = tabsStack.openTabs.find(t => t.id === path); - if (tab && tab.type === 'code') { - (tab as CodeTab).content = newContent; - (tab as CodeTab).isDirty = true; - } - } - - async openFile(node: GenericFile, isPreview = true) { - if (node.is_dir) return; - - // Si ya está abierta, solo navegamos - const activeTab = tabsStack.openTabs.find(t => t.id === node.path); - if (activeTab) { - tabsStack.navigate(node.path); - if (!isPreview) this.promotePreview(node.path); - return; - } - - const ext = node.path.split('.').pop()?.toLowerCase() || ''; - - const editorLang = LANGUAGE_MAP[ext as CodeExtension] as EditorLanguage; - const isAsset = ASSET_EXTENSIONS.has(ext as AssetExtension); - - let newTab: Tab; - - if (editorLang) { - // --- Caso: ARCHIVO DE CÓDIGO --- - const content = this.unsavedChanges[node.path] ?? await FSService.readFile(node.path); - newTab = { - ...node, - id: node.path, - type: 'code', - label: node.name, - icon: FileCode, - color: 'text-blue-400', - content, - language: editorLang, - isDirty: !!this.unsavedChanges[node.path] - } as CodeTab; - } else if (isAsset) { - // --- Caso: ASSET (IMAGEN/BINARIO) --- - newTab = { - ...node, - id: node.path, - type: 'asset', - label: node.name, - icon: ImageIcon, - color: 'text-purple-400' - } as AssetTab; - } else { - // --- Caso: ARCHIVO GENÉRICO (Tratar como texto plano por defecto) --- - const content = this.unsavedChanges[node.path] ?? await FSService.readFile(node.path); - newTab = { - ...node, - id: node.path, - type: 'code', - label: node.name, - icon: FileText, - color: 'text-gray-400', - content, - language: 'plaintext', - isDirty: !!this.unsavedChanges[node.path] - } as CodeTab; - } - - // Manejo de Preview - if (isPreview) { - if (this.previewTabId) tabsStack.closeTab(this.previewTabId); - this.previewTabId = newTab.id; - } else { - this.previewTabId = null; - } - - tabsStack.openTab(newTab); - this.addToHistory(node); - } - - async saveCurrentFile() { - const active = tabsStack.activeTab; - if (active?.type === 'code') { - const file = active as CodeTab; - await FSService.saveFile(file.path, file.content); - delete this.unsavedChanges[file.path]; - file.isDirty = false; - } - } - - async saveAllDirtyFiles() { - for (const path in this.unsavedChanges) { - await FSService.saveFile(path, this.unsavedChanges[path]); - delete this.unsavedChanges[path]; - - const tab = tabsStack.openTabs.find(t => t.id === path); - if (tab && tab.type === 'code') (tab as CodeTab).isDirty = false; - } - } - - // --- CRUD de Sistema de Archivos --- - - async refresh() { - if (this.rootPath) await this.openFolder(this.rootPath); - } - - async createNewFile(parentPath?: string) { - const name = prompt("File name:"); - if (!name) return; - const targetDir = parentPath || this.rootPath; - const path = `${targetDir}/${name}`; - await FSService.createFile(path); - await this.refresh(); - // Abrir automáticamente el archivo recién creado - await this.openFile({ path, name, is_dir: false, extension: name.split('.').pop() || '' } as any, false); - } - - async createNewFolder(parentPath?: string) { - const name = prompt("Folder name:"); - if (!name) return; - const targetDir = parentPath || this.rootPath; - const path = `${targetDir}/${name}`; - await FSService.createDir(path); - if (targetDir) this.expandedPaths.add(targetDir); - await this.refresh(); - } - - async rename(node: GenericFile) { - const newName = prompt("Rename to:", node.name); - if (!newName || newName === node.name) return; - - const parentDir = node.path.substring(0, node.path.lastIndexOf('/')); - const newPath = `${parentDir}/${newName}`; - - await FSService.renameFile(node.path, newPath); - - // Actualizar Tabs y Caché - const tabIndex = tabsStack.openTabs.findIndex(t => t.id === node.path); - if (tabIndex !== -1) { - const tab = tabsStack.openTabs[tabIndex]; - tab.id = newPath; - tab.label = newName; - (tab as any).path = newPath; - if (this.previewTabId === node.path) this.previewTabId = newPath; - } - - if (this.unsavedChanges[node.path]) { - this.unsavedChanges[newPath] = this.unsavedChanges[node.path]; - delete this.unsavedChanges[node.path]; - } - - await this.refresh(); - } - - async delete(node: GenericFile) { - if (!confirm(`Delete ${node.name}?`)) return; - - await FSService.deleteFile(node.path); - - // Si el archivo estaba en el Set de expandidos (si era dir) - this.expandedPaths.delete(node.path); - - // Cerrar tab si existe - tabsStack.closeTab(node.path); - delete this.unsavedChanges[node.path]; - if (this.previewTabId === node.path) this.previewTabId = null; - - await this.refresh(); - } - - async openFolder(path: string) { - try { - const rawFiles = await FSService.readFolder(path); - this.files = this._processAndSortNodes(rawFiles); - this.rootPath = path; - settingsStack.update({ last_project_path: path }); - } catch (err) { - console.error("FS Error:", err); - } - } - - // --- Internals --- - - private _getLanguage(ext: string): EditorLanguage { - const map: Record = { - 'rs': 'rust', - 'ts': 'typescript', - 'js': 'javascript', - 'svelte': 'svelte', - 'json': 'json', - 'md': 'markdown' - }; - return map[ext] || 'javascript'; - } - - private _processAndSortNodes(nodes: any[]): GenericFile[] { - if (!nodes) return []; - return nodes.map(node => { - const ext = node.name.split('.').pop()?.toLowerCase() || ''; - const commonProps = { - ...node, - label: node.name, - extension: ext, - icon: node.is_dir ? Folder : FileIcon, - color: node.is_dir ? "text-accent/60" : "text-text/40", - }; - - if (node.is_dir) { - return { - ...commonProps, - children: node.children ? this._processAndSortNodes(node.children) : [] - }; - } - - return commonProps; - }).sort((a, b) => (b.is_dir ? 1 : 0) - (a.is_dir ? 1 : 0) || a.name.localeCompare(b.name)); - } -} - -export const fileStack = new FileStack(); \ No newline at end of file diff --git a/src/lib/features/system-atoms/pulse/source-control/ChangedFiles.svelte b/src/lib/features/system-atoms/pulse/source-control/ChangedFiles.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/pulse/source-control/CommitInput.svelte b/src/lib/features/system-atoms/pulse/source-control/CommitInput.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/pulse/source-control/CommitsGraph.svelte b/src/lib/features/system-atoms/pulse/source-control/CommitsGraph.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/pulse/source-control/ConflictsResolver.svelte b/src/lib/features/system-atoms/pulse/source-control/ConflictsResolver.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/pulse/source-control/DiffReview.svelte b/src/lib/features/system-atoms/pulse/source-control/DiffReview.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/pulse/source-control/IssuesAndPRs.svelte b/src/lib/features/system-atoms/pulse/source-control/IssuesAndPRs.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/pulse/source-control/MergeCenter.svelte b/src/lib/features/system-atoms/pulse/source-control/MergeCenter.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/workspace/context/ContextManage.svelte b/src/lib/features/system-atoms/workspace/context/ContextManage.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/workspace/context/InitialContextForm.svelte b/src/lib/features/system-atoms/workspace/context/InitialContextForm.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/workspace/context/SkillsList.svelte b/src/lib/features/system-atoms/workspace/context/SkillsList.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/workspace/plugins/extensions/ExtensionList.svelte b/src/lib/features/system-atoms/workspace/plugins/extensions/ExtensionList.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/workspace/plugins/extensions/ExtensionPresentationTab.svelte b/src/lib/features/system-atoms/workspace/plugins/extensions/ExtensionPresentationTab.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/workspace/plugins/extensions/extensions-types.ts b/src/lib/features/system-atoms/workspace/plugins/extensions/extensions-types.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/workspace/plugins/mcp/MCPList.svelte b/src/lib/features/system-atoms/workspace/plugins/mcp/MCPList.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/workspace/plugins/mcp/MCPPresentationTab.svelte b/src/lib/features/system-atoms/workspace/plugins/mcp/MCPPresentationTab.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/workspace/settings/AboutPanel.svelte b/src/lib/features/system-atoms/workspace/settings/AboutPanel.svelte new file mode 100644 index 0000000..4feba52 --- /dev/null +++ b/src/lib/features/system-atoms/workspace/settings/AboutPanel.svelte @@ -0,0 +1,61 @@ + + +

+ MOD0 v{info?.version} +

+

{t('about.tagline')}

+ +
+

{t('about.runtime')}

+
+
{t('about.observer')}
+
{info?.hookPort ? `127.0.0.1:${info.hookPort}` : t('about.inactive')}
+
{t('about.shell')}
+
{info?.shell}
+
{t('about.data')}
+
+ {info?.dataDir} + {#if info}{/if} +
+
{t('about.config')}
+
{info?.configDir}
+
+
+ +
+

{t('about.how')}

+

{t('about.howText')}

+
+ +
+

{t('about.shortcuts')}

+
+ {#each shortcuts as [keys, label] (keys)} +
{keys}
+
{t(label)}
+ {/each} +
+
diff --git a/src/lib/features/system-atoms/workspace/settings/AppearanceForm.svelte b/src/lib/features/system-atoms/workspace/settings/AppearanceForm.svelte new file mode 100644 index 0000000..8fa16fd --- /dev/null +++ b/src/lib/features/system-atoms/workspace/settings/AppearanceForm.svelte @@ -0,0 +1,112 @@ + + +

{t('settings.appearance')}

+

{t('settings.appearanceHint')}

+ +
+
+ {t('settings.theme')} + settingsStack.save({ theme })} + /> +
+ +
+ {t('settings.accent')} +
+ {#each accents as accent (accent.id)} + + {/each} +
+
+ +
+ {t('settings.language')} + settingsStack.save({ language })} + /> +
+ +
+
+ + settingsStack.save({ uiScale: Number(event.currentTarget.value) })} + /> +
+
+ + + settingsStack.save({ terminalFontSize: Number(event.currentTarget.value) })} + /> +
+
+ + settingsStack.save({ reduceMotion })} + /> + + settingsStack.save({ autoSave })} + /> +
diff --git a/src/lib/features/system-atoms/workspace/settings/NotificationsForm.svelte b/src/lib/features/system-atoms/workspace/settings/NotificationsForm.svelte new file mode 100644 index 0000000..e5f8a4e --- /dev/null +++ b/src/lib/features/system-atoms/workspace/settings/NotificationsForm.svelte @@ -0,0 +1,163 @@ + + +

{t('settings.notifications')}

+

{t('settings.notificationsHint')}

+ +
+ patch({ onNeedsYou })} + /> + patch({ onSessionDone })} + /> + patch({ onAllIdle })} + /> +
+ +
+ patch({ desktop })} /> + patch({ onlyWhenUnfocused })} + /> +
+ +
+ patchWebhook({ enabled })} + /> + + {#if draft.webhook.enabled} +
+
+ {t('notify.presets')} +
+ {#each webhookPresets as preset (preset.id)} + + {/each} +
+
+ +
+
+ + +
+
+ + patchWebhook({ url: event.currentTarget.value })} + /> +
+
+ + {#if draft.webhook.method === 'POST'} +
+ + +
+
+ + patchWebhook({ contentType: event.currentTarget.value })} + /> +
+ {/if} + +

+ {t('notify.placeholders')}: + {'{title} {message} {session} {status}'} + · {'{message_url}'} · + {'{message_json}'} +

+

{t('notify.secretsWarning')}

+
+ {/if} +
+ +
+ + +
diff --git a/src/lib/features/system-atoms/workspace/settings/ProfilesForm.svelte b/src/lib/features/system-atoms/workspace/settings/ProfilesForm.svelte new file mode 100644 index 0000000..5263a61 --- /dev/null +++ b/src/lib/features/system-atoms/workspace/settings/ProfilesForm.svelte @@ -0,0 +1,251 @@ + + +

{t('settings.profiles')}

+

{t('settings.profilesHint')}

+ +
+

{t('profiles.fromTemplate')}

+
+ + +
+ {#if preset} +

{preset.note[i18n.language]}

+ {#if preset.install} +

+ {t('profiles.install')}: + {preset.install} +

+ {/if} + {/if} +

{t('profiles.keysTip')}

+
+ +
+ {#each profiles as profile (profile.id)} + {@const state = checks[profile.id]} +
+
+ (dirty = true)} + /> + + +
+ +
+
+ + (dirty = true)} + onchange={() => check(profile)} + /> +
+
+ + +
+
+ + +
+
+ + +
+
+ + {#if state} +
+ {#if profile.command.trim()} + {#if state.found} +

+ + {t('profiles.found')} + {#if state.path}{state.path}{/if} +

+ {:else} +

+ + {t('profiles.notFound', { command: profile.command })} + {#if installFor(profile)} + {installFor(profile)} + {/if} +

+ {/if} + {/if} + {#if state.missingEnv.length > 0} +

+ + {t('profiles.missingEnv')} + {state.missingEnv.join(', ')} +

+ {/if} +
+ {/if} + + touch(() => (profile.hooks = hooks))} + /> +
+ {/each} +
+ +
+ + +
+

{t('profiles.secretsHint')}

diff --git a/src/lib/features/system-atoms/workspace/workflows/WorkNode.svelte b/src/lib/features/system-atoms/workspace/workflows/WorkNode.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/workspace/workflows/WorkflowsCanvas.svelte b/src/lib/features/system-atoms/workspace/workflows/WorkflowsCanvas.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/workspace/workflows/WorkflowsForm.svelte b/src/lib/features/system-atoms/workspace/workflows/WorkflowsForm.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/workspace/workflows/workflows-runes.svelte.ts b/src/lib/features/system-atoms/workspace/workflows/workflows-runes.svelte.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/system-atoms/workspace/workflows/workflows-types.ts b/src/lib/features/system-atoms/workspace/workflows/workflows-types.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/terminal/Terminal.svelte b/src/lib/features/terminal/Terminal.svelte index 52d9f92..19bb408 100644 --- a/src/lib/features/terminal/Terminal.svelte +++ b/src/lib/features/terminal/Terminal.svelte @@ -1,61 +1,147 @@ + import { FitAddon } from '@xterm/addon-fit'; + import { WebglAddon } from '@xterm/addon-webgl'; + import { Terminal } from '@xterm/xterm'; + import '@xterm/xterm/css/xterm.css'; + import { onDestroy, onMount } from 'svelte'; + import { settingsStack } from '#lib/core/runes/settings.svelte'; + import { terminalService } from '#lib/core/services/terminal-service'; + import type { Session } from '#lib/core/types/session'; + import { isAppShortcut } from '#lib/features/workbench/hotkeys'; + import { terminalTheme } from './terminal-theme'; -{#if toggleUIStack.terminalOpen} - -
-
-
- Terminal -
- -
- -
-

mod0@system:~$ npm run dev

-

> mod0-ide@1.0.4 dev

- -
- mod0@system:~$ - -
-
-
-
-{/if} - - \ No newline at end of file + + onMount(() => { + const mono = getComputedStyle(document.documentElement).getPropertyValue('--font-mono').trim(); + const instance = new Terminal({ + fontFamily: mono || 'Consolas, monospace', + fontSize: settingsStack.config.terminalFontSize, + lineHeight: 1.2, + cursorBlink: false, + cursorStyle: 'bar', + scrollback: 5000, + macOptionIsMeta: true, + theme: terminalTheme(settingsStack.dark), + }); + + fit = new FitAddon(); + instance.loadAddon(fit); + instance.open(host); + + // Deja pasar los atajos de la aplicación y copia con Ctrl+C cuando hay selección. + instance.attachCustomKeyEventHandler((event) => { + if (isAppShortcut(event)) return false; + if (event.type === 'keydown' && event.ctrlKey && event.key === 'c' && instance.hasSelection()) { + void navigator.clipboard.writeText(instance.getSelection()); + instance.clearSelection(); + return false; + } + return true; + }); + + instance.onData((data) => void terminalService.write(session.id, data).catch(() => undefined)); + instance.onResize(({ rows, cols }) => { + if (attached) void terminalService.resize(session.id, rows, cols).catch(() => undefined); + }); + + observer = new ResizeObserver(fitNow); + observer.observe(host); + term = instance; + }); + + onDestroy(() => { + cancelAnimationFrame(frame); + observer?.disconnect(); + webgl?.dispose(); + term?.dispose(); + if (attached) void terminalService.detach(session.id).catch(() => undefined); + }); + + // Conectar al PTY mientras la sesión viva; avisar cuando termina. + $effect(() => { + if (!term) return; + if (alive) void attach(); + else if (attached) { + attached = false; + term.write('\r\n\x1b[2m[proceso terminado]\x1b[0m\r\n'); + } + }); + + $effect(() => { + if (!term) return; + useWebgl(visible); + if (visible) { + fitNow(); + term.focus(); + } + }); + + $effect(() => { + if (!term) return; + term.options.theme = terminalTheme(settingsStack.dark); + term.options.fontSize = settingsStack.config.terminalFontSize; + fitNow(); + }); + + +
diff --git a/src/lib/features/terminal/TerminalDock.svelte b/src/lib/features/terminal/TerminalDock.svelte new file mode 100644 index 0000000..aa59f7c --- /dev/null +++ b/src/lib/features/terminal/TerminalDock.svelte @@ -0,0 +1,84 @@ + + +
+
+ {#if focused} +
+ + {focused.name} + {focused.cwd} +
+
+ {#if focused.status === 'exited'} + + {:else} + + {/if} + +
+ {:else} + {t('terminal.title')} + + {/if} +
+ +
+ {#each sessionsStack.sessions as session (session.id)} + {#if started[session.id]} + + {/if} + {/each} + + {#if !focused} + + {/if} +
+
diff --git a/src/lib/features/terminal/TerminalInput.svelte b/src/lib/features/terminal/TerminalInput.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/terminal/terminal-runes.svelte.ts b/src/lib/features/terminal/terminal-runes.svelte.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/terminal/terminal-theme.ts b/src/lib/features/terminal/terminal-theme.ts new file mode 100644 index 0000000..dd69723 --- /dev/null +++ b/src/lib/features/terminal/terminal-theme.ts @@ -0,0 +1,52 @@ +import type { ITheme } from '@xterm/xterm'; + +/** Paletas de la terminal, alineadas con los tokens de `app.css` (colores suaves, sin negro puro). */ +export function terminalTheme(dark: boolean): ITheme { + return dark + ? { + background: '#0f1115', + foreground: '#d3d8e0', + cursor: '#8c95a5', + cursorAccent: '#0f1115', + selectionBackground: 'rgba(106,165,247,0.28)', + black: '#1a1e25', + red: '#e8706a', + green: '#55b78c', + yellow: '#e3ad4a', + blue: '#6aa5f7', + magenta: '#ad94f2', + cyan: '#4fb8cf', + white: '#d3d8e0', + brightBlack: '#5d6676', + brightRed: '#f08a85', + brightGreen: '#74cca4', + brightYellow: '#ecc072', + brightBlue: '#8bbcf9', + brightMagenta: '#c2aef6', + brightCyan: '#74cbdd', + brightWhite: '#eef1f5', + } + : { + background: '#f4f5f7', + foreground: '#1d2432', + cursor: '#566175', + cursorAccent: '#f4f5f7', + selectionBackground: 'rgba(47,111,214,0.22)', + black: '#1d2432', + red: '#c4433b', + green: '#2b8a62', + yellow: '#9a6408', + blue: '#2f6fd6', + magenta: '#7650d6', + cyan: '#1f8aa0', + white: '#d9dde4', + brightBlack: '#8791a3', + brightRed: '#d9574e', + brightGreen: '#37a276', + brightYellow: '#b4730a', + brightBlue: '#4a86e8', + brightMagenta: '#8d68e6', + brightCyan: '#2ba0b8', + brightWhite: '#ffffff', + }; +} diff --git a/src/lib/features/terminal/terminal-types.ts b/src/lib/features/terminal/terminal-types.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/workbench/NewSessionDialog.svelte b/src/lib/features/workbench/NewSessionDialog.svelte new file mode 100644 index 0000000..5b07dea --- /dev/null +++ b/src/lib/features/workbench/NewSessionDialog.svelte @@ -0,0 +1,148 @@ + + + + {#if !projectPath} +
+

{t('session.needProject')}

+ +
+ {:else} +
{ + event.preventDefault(); + void submit(); + }} + > +
+ + +
+ +
+ + +
+ +
+ {t('session.isolation')} + (isolation = value)} + /> +

+ {isolation === 'worktree' ? t('session.worktreeHint') : t('session.sameFolderHint')} +

+ {#if isolation === 'worktree'} + + {/if} +
+ +
+ + +
+ +
+ {projectPath} +
+ + +
+
+
+ {/if} +
diff --git a/src/lib/features/workbench/Omnibar.svelte b/src/lib/features/workbench/Omnibar.svelte new file mode 100644 index 0000000..587490e --- /dev/null +++ b/src/lib/features/workbench/Omnibar.svelte @@ -0,0 +1,153 @@ + + +{#if toggleUIStack.paletteOpen} + +
event.target === event.currentTarget && close()} + > +
+
+ + { + toggleUIStack.paletteMode = value; + void tick().then(() => input?.focus()); + }} + /> +
+ +
+ {#each results as item, index (item.id)} + + {:else} +

{t('palette.empty')}

+ {/each} +
+
+
+{/if} diff --git a/src/lib/features/workbench/command-center/InlinePrompt.svelte b/src/lib/features/workbench/command-center/InlinePrompt.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/workbench/command-center/ModeSelector.svelte b/src/lib/features/workbench/command-center/ModeSelector.svelte deleted file mode 100644 index 69753ab..0000000 --- a/src/lib/features/workbench/command-center/ModeSelector.svelte +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/lib/features/workbench/command-center/Omnibar.svelte b/src/lib/features/workbench/command-center/Omnibar.svelte deleted file mode 100644 index 03fec78..0000000 --- a/src/lib/features/workbench/command-center/Omnibar.svelte +++ /dev/null @@ -1,217 +0,0 @@ - - -
- {#if !isOpen} -
-
- {/if} - - -
- -{#if isOpen} - {#if view === 'modes'} - - {:else} - -
-
= 1} - class:step-vertical={step >= 2} - > - {#if showGlint} -
- {/if} - -
- -
- - -
-
- -
- {#if step === 2} -
- {#if view === 'commands'} -
- {#each commands as cmd, i} - - {/each} -
- {:else if view === 'themes'} -
- view = 'commands'} onSelect={handleClose} /> -
- {/if} -
- {/if} -
-
-
-
- {/if} -{/if} - - \ No newline at end of file diff --git a/src/lib/features/workbench/command-center/ThemeSelector.svelte b/src/lib/features/workbench/command-center/ThemeSelector.svelte deleted file mode 100644 index 3d7f022..0000000 --- a/src/lib/features/workbench/command-center/ThemeSelector.svelte +++ /dev/null @@ -1,28 +0,0 @@ - - -
- - {#each themes as theme, i} - - {/each} -
\ No newline at end of file diff --git a/src/lib/features/workbench/controls/LayoutConfig.svelte b/src/lib/features/workbench/controls/LayoutConfig.svelte deleted file mode 100644 index 9140722..0000000 --- a/src/lib/features/workbench/controls/LayoutConfig.svelte +++ /dev/null @@ -1,24 +0,0 @@ - - -
- - - -
\ No newline at end of file diff --git a/src/lib/features/workbench/controls/MainMenu.svelte b/src/lib/features/workbench/controls/MainMenu.svelte deleted file mode 100644 index cabd23e..0000000 --- a/src/lib/features/workbench/controls/MainMenu.svelte +++ /dev/null @@ -1,127 +0,0 @@ - - -
- - - {#if isOpen} - isOpen = false} - offset={10} - > - isOpen = false} /> - - {/if} -
\ No newline at end of file diff --git a/src/lib/features/workbench/controls/SystemControls.svelte b/src/lib/features/workbench/controls/SystemControls.svelte deleted file mode 100644 index ceabed0..0000000 --- a/src/lib/features/workbench/controls/SystemControls.svelte +++ /dev/null @@ -1,74 +0,0 @@ - - -{#if osType !== 'macos'} -
- - - - - -
-{/if} - - \ No newline at end of file diff --git a/src/lib/features/workbench/controls/quick-actions/QuickAutoComplete.svelte b/src/lib/features/workbench/controls/quick-actions/QuickAutoComplete.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/workbench/controls/quick-actions/QuickFix.svelte b/src/lib/features/workbench/controls/quick-actions/QuickFix.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/workbench/dialogs/AiDecision.svelte b/src/lib/features/workbench/dialogs/AiDecision.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/workbench/dialogs/IrreversibleAction.svelte b/src/lib/features/workbench/dialogs/IrreversibleAction.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/workbench/dialogs/MessageDialog.svelte b/src/lib/features/workbench/dialogs/MessageDialog.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/workbench/hotkeys.ts b/src/lib/features/workbench/hotkeys.ts new file mode 100644 index 0000000..00d6805 --- /dev/null +++ b/src/lib/features/workbench/hotkeys.ts @@ -0,0 +1,117 @@ +import { jumpToAttention } from '#lib/core/registry/actions'; +import { ActivityIDs } from '#lib/core/constants/work-config'; +import { sessionsStack } from '#lib/core/runes/sessions.svelte'; +import { settingsStack } from '#lib/core/runes/settings.svelte'; +import { toggleUIStack } from '#lib/core/runes/toggle-ui.svelte'; +import { workStack } from '#lib/core/runes/work-modes.svelte'; +import type { ActivityID } from '#lib/core/types/work'; + +const ACTIVITY_SHORTCUTS: ActivityID[] = [ + ActivityIDs.SESSIONS, + ActivityIDs.THINKING_GRAPH, + ActivityIDs.KANBAN, + ActivityIDs.FILES, + ActivityIDs.REVIEW, + ActivityIDs.EDITOR, +]; + +/** Atajo que la app maneja aunque el foco esté dentro de la terminal. */ +type Binding = { test: (event: KeyboardEvent) => boolean; run: () => void; global: boolean }; + +const ctrl = (event: KeyboardEvent) => (event.ctrlKey || event.metaKey) && !event.altKey; +const key = (event: KeyboardEvent) => event.key.toLowerCase(); + +const bindings: Binding[] = [ + // Sesiones + { test: (e) => e.altKey && !e.ctrlKey && /^[1-9]$/.test(e.key), run: () => {}, global: true }, + { test: (e) => ctrl(e) && e.shiftKey && key(e) === 'a', run: jumpToAttention, global: true }, + { + test: (e) => ctrl(e) && e.shiftKey && key(e) === 'n', + run: () => toggleUIStack.openNewSession(), + global: true, + }, + { + test: (e) => ctrl(e) && !e.shiftKey && key(e) === 'n', + run: () => toggleUIStack.openNewSession(), + global: false, + }, + + // Navegación + { + test: (e) => ctrl(e) && e.shiftKey && key(e) === 'p', + run: () => toggleUIStack.openPalette(), + global: true, + }, + { + test: (e) => ctrl(e) && !e.shiftKey && key(e) === 'k', + run: () => toggleUIStack.openPalette(), + global: false, + }, + { + test: (e) => ctrl(e) && e.shiftKey && key(e) === 'o', + run: () => toggleUIStack.openPalette('files'), + global: true, + }, + { + test: (e) => ctrl(e) && !e.shiftKey && key(e) === 'p', + run: () => toggleUIStack.openPalette('files'), + global: false, + }, + { + test: (e) => ctrl(e) && e.key === ',', + run: () => workStack.setActivity(ActivityIDs.SETTINGS), + global: true, + }, + { test: (e) => ctrl(e) && !e.shiftKey && /^[1-6]$/.test(e.key), run: () => {}, global: true }, + + // Paneles + { test: (e) => ctrl(e) && e.key === '`', run: toggleUIStack.toggleTerminal, global: true }, + { test: (e) => ctrl(e) && e.shiftKey && key(e) === 'b', run: toggleUIStack.toggleSidebar, global: true }, + { test: (e) => ctrl(e) && e.shiftKey && key(e) === 'r', run: toggleUIStack.toggleRail, global: true }, + + // Zoom de la interfaz + { + test: (e) => ctrl(e) && (e.key === '=' || e.key === '+'), + run: () => settingsStack.zoom(0.05), + global: true, + }, + { test: (e) => ctrl(e) && e.key === '-', run: () => settingsStack.zoom(-0.05), global: true }, + { + test: (e) => ctrl(e) && e.key === '0', + run: () => void settingsStack.save({ uiScale: 1 }), + global: true, + }, +]; + +function insideTerminal(event: KeyboardEvent): boolean { + return event.target instanceof Element && event.target.closest('.xterm') !== null; +} + +/** ¿La terminal debe ceder esta tecla a la aplicación? */ +export function isAppShortcut(event: KeyboardEvent): boolean { + return bindings.some((binding) => binding.global && binding.test(event)); +} + +export function handleHotkey(event: KeyboardEvent) { + const inTerminal = insideTerminal(event); + + // Alt+1..9: saltar a la n-ésima sesión. + if (event.altKey && !event.ctrlKey && /^[1-9]$/.test(event.key)) { + event.preventDefault(); + sessionsStack.focusIndex(Number(event.key)); + return; + } + + // Ctrl+1..6: cambiar de actividad. + if (ctrl(event) && !event.shiftKey && /^[1-6]$/.test(event.key)) { + event.preventDefault(); + workStack.setActivity(ACTIVITY_SHORTCUTS[Number(event.key) - 1]); + return; + } + + const match = bindings.find((binding) => binding.test(event) && (binding.global || !inTerminal)); + if (match) { + event.preventDefault(); + match.run(); + } +} diff --git a/src/lib/features/workbench/overlays/keybinding-visualizer/KeybindingVisualizer.svelte b/src/lib/features/workbench/overlays/keybinding-visualizer/KeybindingVisualizer.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/workbench/overlays/toasts/Toast.svelte b/src/lib/features/workbench/overlays/toasts/Toast.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/workbench/overlays/toasts/ToastManager.svelte b/src/lib/features/workbench/overlays/toasts/ToastManager.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/features/workbench/tabs/GoTo.svelte b/src/lib/features/workbench/tabs/GoTo.svelte deleted file mode 100644 index 07e14dc..0000000 --- a/src/lib/features/workbench/tabs/GoTo.svelte +++ /dev/null @@ -1,23 +0,0 @@ - - -
- - -
\ No newline at end of file diff --git a/src/lib/features/workbench/tabs/TabHeader.svelte b/src/lib/features/workbench/tabs/TabHeader.svelte deleted file mode 100644 index 14697d7..0000000 --- a/src/lib/features/workbench/tabs/TabHeader.svelte +++ /dev/null @@ -1,46 +0,0 @@ - - -
- {#if Icon} - - {/if} - - - {label} - - -
- {#if isModified} - - {/if} - - -
- - {#if active} -
- {/if} -
\ No newline at end of file diff --git a/src/lib/features/workbench/tabs/TabManager.svelte b/src/lib/features/workbench/tabs/TabManager.svelte deleted file mode 100644 index d6688e8..0000000 --- a/src/lib/features/workbench/tabs/TabManager.svelte +++ /dev/null @@ -1,43 +0,0 @@ - - -
- {#each tabsStack.openTabs as tab (tab.id)} -
- -
- {/each} -
- - \ No newline at end of file diff --git a/src/lib/features/workbench/tabs/TabSwitcher.svelte b/src/lib/features/workbench/tabs/TabSwitcher.svelte deleted file mode 100644 index 0a358b1..0000000 --- a/src/lib/features/workbench/tabs/TabSwitcher.svelte +++ /dev/null @@ -1,30 +0,0 @@ - - -
- {#key tabsStack.activeTabId} -
- {@render children()} -
- {/key} -
\ No newline at end of file diff --git a/src/lib/features/workbench/tabs/tabs-runes.svelte.ts b/src/lib/features/workbench/tabs/tabs-runes.svelte.ts deleted file mode 100644 index 0297bea..0000000 --- a/src/lib/features/workbench/tabs/tabs-runes.svelte.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { Tab } from "$lib/core/types/tab"; - -/** - * Gestiona el stack de pestañas abiertas y el historial de navegación. - */ -class TabsStack { - openTabs = $state([]); - activeTabId = $state(null); - - #history = $state([]); - #pointer = $state(0); - - /** Retorna el objeto Tab actualmente enfocado */ - get activeTab(): Tab | null { - return this.openTabs.find(t => t.id === this.activeTabId) || null; - } - - /** Abre una nueva pestaña o enfoca una existente */ - openTab(tab: Tab) { - if (!this.openTabs.find(t => t.id === tab.id)) { - this.openTabs = [...this.openTabs, tab]; - } - this.navigate(tab.id); - } - - /** Cambia el foco y actualiza el historial de navegación */ - navigate(id: string, addToHistory = true) { - if (this.activeTabId === id) return; - this.activeTabId = id; - if (addToHistory) { - this.#history = this.#history.slice(0, this.#pointer + 1); - this.#history.push(id); - this.#pointer = this.#history.length - 1; - } - } - - /** Cierra una pestaña y recalcula el foco adyacente */ - closeTab(id: string) { - const index = this.openTabs.findIndex(t => t.id === id); - this.openTabs = this.openTabs.filter(t => t.id !== id); - this.#history = this.#history.filter(tid => tid !== id); - this.#pointer = Math.max(0, this.#history.length - 1); - - if (this.activeTabId === id && this.openTabs.length > 0) { - this.activeTabId = this.openTabs[index - 1]?.id || this.openTabs[0].id; - } else if (this.openTabs.length === 0) { - this.activeTabId = null; - } - } -} - -export const tabsStack = new TabsStack(); \ No newline at end of file diff --git a/src/lib/systems/blueprint/artifacts/ArtifactsMainSpace.svelte b/src/lib/systems/blueprint/artifacts/ArtifactsMainSpace.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/systems/blueprint/artifacts/ArtifactsSidebar.svelte b/src/lib/systems/blueprint/artifacts/ArtifactsSidebar.svelte deleted file mode 100644 index 4939bd4..0000000 --- a/src/lib/systems/blueprint/artifacts/ArtifactsSidebar.svelte +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/src/lib/systems/blueprint/chat/ChatMainSpace.svelte b/src/lib/systems/blueprint/chat/ChatMainSpace.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/systems/blueprint/chat/ChatSidebar.svelte b/src/lib/systems/blueprint/chat/ChatSidebar.svelte deleted file mode 100644 index 826be4a..0000000 --- a/src/lib/systems/blueprint/chat/ChatSidebar.svelte +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/src/lib/systems/forge/kanban/KanbanMainSpace.svelte b/src/lib/systems/forge/kanban/KanbanMainSpace.svelte index e69de29..fe53973 100644 --- a/src/lib/systems/forge/kanban/KanbanMainSpace.svelte +++ b/src/lib/systems/forge/kanban/KanbanMainSpace.svelte @@ -0,0 +1,63 @@ + + +{#if !filesStack.projectPath} + +{:else} +
+ {#each kanbanColumns as column (column)} + + {/each} +
+{/if} + + (editing = null)}> +
+
+ + +
+
+ + +
+
+ {#snippet footer()} + + + {/snippet} +
diff --git a/src/lib/systems/forge/kanban/KanbanSidebar.svelte b/src/lib/systems/forge/kanban/KanbanSidebar.svelte deleted file mode 100644 index ae6d252..0000000 --- a/src/lib/systems/forge/kanban/KanbanSidebar.svelte +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/src/lib/systems/forge/sessions/SessionsMainSpace.svelte b/src/lib/systems/forge/sessions/SessionsMainSpace.svelte new file mode 100644 index 0000000..d8bee9c --- /dev/null +++ b/src/lib/systems/forge/sessions/SessionsMainSpace.svelte @@ -0,0 +1,70 @@ + + +
+
+ (sessionsStack.filter = value)} + /> + +
+ +
+ {#if sessionsStack.sessions.length === 0} + + + + {:else if visible.length === 0} +

{t('sessions.noMatch')}

+ {:else} +
+ {#each visible as session (session.id)} + + {/each} +
+ {/if} +
+
diff --git a/src/lib/systems/forge/sessions/SessionsSidebar.svelte b/src/lib/systems/forge/sessions/SessionsSidebar.svelte new file mode 100644 index 0000000..fd3be5a --- /dev/null +++ b/src/lib/systems/forge/sessions/SessionsSidebar.svelte @@ -0,0 +1,64 @@ + + +
+
{t('project.title')}
+
+ {#if filesStack.projectPath} +

{basename(filesStack.projectPath)}

+

+ {filesStack.projectPath} +

+ {#if filesStack.git?.branch} +

+ + {filesStack.git.branch} +

+ {/if} + {:else} +

{t('project.none')}

+ {/if} + +
+ +
{t('sidebar.launch')}
+
+ {#each settingsStack.config.profiles as profile (profile.id)} + + {/each} +
+ + {#if settingsStack.config.recentProjects.length > 1} +
{t('project.recent')}
+
+ {#each settingsStack.config.recentProjects.filter((path) => path !== filesStack.projectPath) as path (path)} + + {/each} +
+ {/if} +
diff --git a/src/lib/systems/forge/testing/TestingMainSpace.svelte b/src/lib/systems/forge/testing/TestingMainSpace.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/systems/forge/testing/TestingSidebar.svelte b/src/lib/systems/forge/testing/TestingSidebar.svelte deleted file mode 100644 index c2784d6..0000000 --- a/src/lib/systems/forge/testing/TestingSidebar.svelte +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/src/lib/systems/forge/thinking-graph/ThinkingGraphMainSpace.svelte b/src/lib/systems/forge/thinking-graph/ThinkingGraphMainSpace.svelte index e69de29..758c6b7 100644 --- a/src/lib/systems/forge/thinking-graph/ThinkingGraphMainSpace.svelte +++ b/src/lib/systems/forge/thinking-graph/ThinkingGraphMainSpace.svelte @@ -0,0 +1,76 @@ + + +{#if !session} + +{:else} +
+
+ +

{session.name}

+ + {session.now?.label ?? t(`status.${session.status}`)} + +
+ + {session.kpis.turns} + {t('unit.turns')} · {session.kpis.toolCalls} + {t('unit.steps')} + + graphStack.setView(view)} + /> + +
+
+ +
+
+ {#if empty} + + {:else} + {#key session.id} + {#if graphStack.view === 'diagram'}{:else}{/if} + {/key} + {/if} +
+ {#if selected}{/if} +
+
+{/if} diff --git a/src/lib/systems/forge/thinking-graph/ThinkingGraphSidebar.svelte b/src/lib/systems/forge/thinking-graph/ThinkingGraphSidebar.svelte index 5a85331..2a3ee8e 100644 --- a/src/lib/systems/forge/thinking-graph/ThinkingGraphSidebar.svelte +++ b/src/lib/systems/forge/thinking-graph/ThinkingGraphSidebar.svelte @@ -1,6 +1,100 @@ - \ No newline at end of file + + {#if plan.length > 0} +
+ {t('plan.title')} + {planDone}/{plan.length} +
+
+
+
+
    + {#each plan as item, index (index)} +
  • + {#if item.status === 'completed'} + + {:else if item.status === 'in_progress'} + + {:else} + + {/if} + + {item.content} + +
  • + {/each} +
+ {/if} + +
{t('graph.turns')}
+
+ {#each turns as turn (turn.turn)} + + {:else} +

{t('graph.empty')}

+ {/each} +
+ diff --git a/src/lib/systems/pulse/editor/EditorMainSpace.svelte b/src/lib/systems/pulse/editor/EditorMainSpace.svelte new file mode 100644 index 0000000..208ce83 --- /dev/null +++ b/src/lib/systems/pulse/editor/EditorMainSpace.svelte @@ -0,0 +1,67 @@ + + +
+ {#if editorStack.tabs.length > 0} +
+ {#each editorStack.tabs as tab (tab.path)} + {@const dirty = editorStack.isDirty(tab)} +
+ + +
+ {/each} +
+ {/if} + +
+ {#if active} + editorStack.setContent(active.path, content)} + onsave={() => editorStack.save(active.path)} + /> + {:else} + + + + {/if} +
+
diff --git a/src/lib/systems/pulse/files/FilesMainSpace.svelte b/src/lib/systems/pulse/files/FilesMainSpace.svelte index e69de29..48901cc 100644 --- a/src/lib/systems/pulse/files/FilesMainSpace.svelte +++ b/src/lib/systems/pulse/files/FilesMainSpace.svelte @@ -0,0 +1,199 @@ + + +{#if !filesStack.rootPath} + +{:else} +
+
+

{t('files.graph')}

+ + + + + + + + {#if graph} + + {graph.nodes.length} + {t('unit.nodes')} · {graph.edges.length} + {t('unit.links')} · {formatCompact(graph.fileCount)} + {t('unit.files')} + {#if filesStack.impactOn && filesStack.impact.length > 0} + · {impactedModules} {t('files.affectedNodes')} + {/if} + + {/if} + +
+ {#each live as item (item.id)} + + + {item.name} + + {/each} + +
+
+ +
+ {#if filesStack.graphError} + + {:else if graph && graph.nodes.length > 0} + (selected = id)} + onexpand={(id) => filesStack.toggleExpand(id)} + /> + {:else if !filesStack.graphLoading} + + {/if} + +

+ {t('files.graphTip')} +

+ + {#if node} + + {/if} +
+
+{/if} diff --git a/src/lib/systems/pulse/files/FilesSidebar.svelte b/src/lib/systems/pulse/files/FilesSidebar.svelte index abbeffb..ec65cbe 100644 --- a/src/lib/systems/pulse/files/FilesSidebar.svelte +++ b/src/lib/systems/pulse/files/FilesSidebar.svelte @@ -1,91 +1,100 @@ -
-
- Project -
- - - +{#if !filesStack.rootPath} + + + +{:else} +
+
+ {t('files.title')} +
+ + +
+
- {#if showMenu} - - showMenu = false} /> - - {/if} -
-
+ {#if roots.length > 1} +
+ +
+ {/if} - {#if fileStack.isSearching} - - {/if} + {#if session && changes.size > 0} +

+ {changes.size} + {t('files.changedBy')} + {session.name} +

+ {/if} -
- - -
- {#if displayedFiles.length > 0} - - {:else} -
- {searchQuery ? 'No results' : 'Empty'} -
- {/if} -
-
-
\ No newline at end of file +
+ {#each entries as entry (entry.path)} + + {/each} +
+ +{/if} diff --git a/src/lib/systems/pulse/files/files-types.ts b/src/lib/systems/pulse/files/files-types.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/systems/pulse/review/ReviewMainSpace.svelte b/src/lib/systems/pulse/review/ReviewMainSpace.svelte new file mode 100644 index 0000000..4a68441 --- /dev/null +++ b/src/lib/systems/pulse/review/ReviewMainSpace.svelte @@ -0,0 +1,93 @@ + + +{#if !session} + +{:else} +
+
+ {#if pair} + {pair.status} +

{pair.path}

+ {#if pair.status !== 'D'} + + {/if} + {:else} +

{t('review.pick')}

+ {/if} +
+ +
+ {#if pair} + {#key `${pair.path}:${pair.original.length}:${pair.modified.length}`} + + {/key} + {:else} + + {/if} +
+ + {#if reviewStack.changes.length > 0} +
+ event.key === 'Enter' && commit()} + /> + + +
+ {/if} +
+{/if} diff --git a/src/lib/systems/pulse/review/ReviewSidebar.svelte b/src/lib/systems/pulse/review/ReviewSidebar.svelte new file mode 100644 index 0000000..1241ab4 --- /dev/null +++ b/src/lib/systems/pulse/review/ReviewSidebar.svelte @@ -0,0 +1,143 @@ + + +{#snippet fileRow(file: ChangedFile, depth: number, showDir: boolean)} + {@const reviewed = reviewStack.isReviewed(file.path)} + {@const slash = file.path.lastIndexOf('/')} +
+ + +
+{/snippet} + +{#snippet branch(nodes: ChangeTreeNode[], depth: number)} + {#each nodes as node (node.path)} + {#if node.file} + {@render fileRow(node.file, depth, false)} + {:else} + + {#if !closed[node.path]}{@render branch(node.children, depth + 1)}{/if} + {/if} + {/each} +{/snippet} + +{#if !session} + +{:else} +
+
+ {session.name} + + +{reviewStack.totals.additions} + −{reviewStack.totals.deletions} + +
+ + {#if reviewStack.changes.length > 0} +
+ {done}/{reviewStack.changes.length} {t('review.reviewed')} +
+ + +
+
+ {/if} + +
+ {#if reviewStack.view === 'tree'} + {@render branch(tree, 0)} + {:else} + {#each reviewStack.changes as file (file.path)} + {@render fileRow(file, 0, true)} + {/each} + {/if} + {#if reviewStack.changes.length === 0} +

{t('review.noChanges')}

+ {/if} +
+
+{/if} diff --git a/src/lib/systems/pulse/source-control/SourceControlMainSpace.svelte b/src/lib/systems/pulse/source-control/SourceControlMainSpace.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/systems/pulse/source-control/SourceControlSidebar.svelte b/src/lib/systems/pulse/source-control/SourceControlSidebar.svelte deleted file mode 100644 index f5c740a..0000000 --- a/src/lib/systems/pulse/source-control/SourceControlSidebar.svelte +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/src/lib/systems/pulse/source-control/source-control-types.ts b/src/lib/systems/pulse/source-control/source-control-types.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/systems/workspace/context/ContextMainSpace.svelte b/src/lib/systems/workspace/context/ContextMainSpace.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/systems/workspace/context/ContextSidebar.svelte b/src/lib/systems/workspace/context/ContextSidebar.svelte deleted file mode 100644 index aa73fc5..0000000 --- a/src/lib/systems/workspace/context/ContextSidebar.svelte +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/src/lib/systems/workspace/context/context-types.ts b/src/lib/systems/workspace/context/context-types.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/systems/workspace/plugins/PluginsSidebar.svelte b/src/lib/systems/workspace/plugins/PluginsSidebar.svelte deleted file mode 100644 index fee28fc..0000000 --- a/src/lib/systems/workspace/plugins/PluginsSidebar.svelte +++ /dev/null @@ -1,9 +0,0 @@ - - -
- - -
\ No newline at end of file diff --git a/src/lib/systems/workspace/plugins/extensions/ExtensionsMainSpace.svelte b/src/lib/systems/workspace/plugins/extensions/ExtensionsMainSpace.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/systems/workspace/plugins/extensions/ExtensionsSidebar.svelte b/src/lib/systems/workspace/plugins/extensions/ExtensionsSidebar.svelte deleted file mode 100644 index e797d5c..0000000 --- a/src/lib/systems/workspace/plugins/extensions/ExtensionsSidebar.svelte +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/src/lib/systems/workspace/plugins/mcps/MCPMainSpace.svelte b/src/lib/systems/workspace/plugins/mcps/MCPMainSpace.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/systems/workspace/plugins/mcps/MCPSidebar.svelte b/src/lib/systems/workspace/plugins/mcps/MCPSidebar.svelte deleted file mode 100644 index e797d5c..0000000 --- a/src/lib/systems/workspace/plugins/mcps/MCPSidebar.svelte +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/src/lib/systems/workspace/settings/SettingsMainSpace.svelte b/src/lib/systems/workspace/settings/SettingsMainSpace.svelte new file mode 100644 index 0000000..0294fe5 --- /dev/null +++ b/src/lib/systems/workspace/settings/SettingsMainSpace.svelte @@ -0,0 +1,21 @@ + + +
+
+ {#if settingsStack.section === 'profiles'} + + {:else if settingsStack.section === 'notifications'} + + {:else if settingsStack.section === 'appearance'} + + {:else} + + {/if} +
+
diff --git a/src/lib/systems/workspace/settings/SettingsSidebar.svelte b/src/lib/systems/workspace/settings/SettingsSidebar.svelte new file mode 100644 index 0000000..6eb2bd6 --- /dev/null +++ b/src/lib/systems/workspace/settings/SettingsSidebar.svelte @@ -0,0 +1,30 @@ + + +
+
{t('activity.settings')}
+ +
diff --git a/src/lib/systems/workspace/workflows/WorkflowsMainSpace.svelte b/src/lib/systems/workspace/workflows/WorkflowsMainSpace.svelte deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/systems/workspace/workflows/WorkflowsSidebar.svelte b/src/lib/systems/workspace/workflows/WorkflowsSidebar.svelte deleted file mode 100644 index 448958b..0000000 --- a/src/lib/systems/workspace/workflows/WorkflowsSidebar.svelte +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/src/lib/systems/workspace/workflows/workflows-types.ts b/src/lib/systems/workspace/workflows/workflows-types.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 999df65..f37ae2f 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,67 +1,59 @@ -
-
- -
- - - -
-
- {@render children()} -
- - -
+{#if failure} +
+

{t('boot.failed')}

+

{failure}

+

{t('boot.hint')}

+{:else if ready} + {@render children()} +{/if} -
-
- - \ No newline at end of file + diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts index a3d1578..24f236b 100644 --- a/src/routes/+layout.ts +++ b/src/routes/+layout.ts @@ -1 +1,4 @@ +// Tauri no tiene servidor Node.js, así que no hay SSR: la app es una SPA estática. +// Ver: https://svelte.dev/docs/kit/single-page-apps export const ssr = false; +export const prerender = false; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 047ac5e..e501378 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,5 +1,24 @@ - \ No newline at end of file +
+
+
+ + + + +
+
+
+ + + diff --git a/svelte.config.js b/svelte.config.js deleted file mode 100644 index a7830ea..0000000 --- a/svelte.config.js +++ /dev/null @@ -1,18 +0,0 @@ -// Tauri doesn't have a Node.js server to do proper SSR -// so we use adapter-static with a fallback to index.html to put the site in SPA mode -// See: https://svelte.dev/docs/kit/single-page-apps -// See: https://v2.tauri.app/start/frontend/sveltekit/ for more info -import adapter from "@sveltejs/adapter-static"; -import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; - -/** @type {import('@sveltejs/kit').Config} */ -const config = { - preprocess: vitePreprocess(), - kit: { - adapter: adapter({ - fallback: "index.html", - }), - }, -}; - -export default config; diff --git a/tsconfig.json b/tsconfig.json index f4d0a0e..fa09f1a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,19 +1,18 @@ { - "extends": "./.svelte-kit/tsconfig.json", - "compilerOptions": { - "allowJs": true, - "checkJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "moduleResolution": "bundler" - } - // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias - // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files - // - // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes - // from the referenced tsconfig.json - TypeScript does not merge them in + "extends": "$app/tsconfig", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "paths": { + "#lib/*": ["./src/lib/*"] + } + }, + "include": ["src", "*.ts", "*.js"], + "exclude": ["src-tauri", "build", "node_modules"] } diff --git a/vite.config.js b/vite.config.js deleted file mode 100644 index a2ba0c2..0000000 --- a/vite.config.js +++ /dev/null @@ -1,26 +0,0 @@ -import { defineConfig } from "vite"; -import { sveltekit } from "@sveltejs/kit/vite"; - -// @ts-expect-error process is a nodejs global -const host = process.env.TAURI_DEV_HOST; - -export default defineConfig(async () => ({ - plugins: [sveltekit()], - - clearScreen: false, - server: { - port: 1420, - strictPort: true, - host: host || false, - hmr: host - ? { - protocol: "ws", - host, - port: 1421, - } - : undefined, - watch: { - ignored: ["**/src-tauri/**"], - }, - }, -})); diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..96802ea --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,29 @@ +import { sveltekit } from '@sveltejs/kit/vite'; +import adapter from '@sveltejs/adapter-static'; +import tailwindcss from '@tailwindcss/vite'; +import { defineConfig } from 'vite'; + +const host = process.env.TAURI_DEV_HOST; + +export default defineConfig({ + plugins: [ + tailwindcss(), + // SvelteKit 3 lee su configuración desde el plugin (ya no existe `svelte.config.js`). + // Tauri no tiene servidor Node.js para SSR: se usa adapter-static en modo SPA. + // Ver: https://v2.tauri.app/start/frontend/sveltekit/ + sveltekit({ + adapter: adapter({ fallback: 'index.html' }), + }), + ], + + clearScreen: false, + server: { + port: 1420, + strictPort: true, + host: host || false, + hmr: host ? { protocol: 'ws', host, port: 1421 } : undefined, + watch: { + ignored: ['**/src-tauri/**'], + }, + }, +});